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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
23,100 | common_arg::set_env(char const*) | monkey531[P]llama/common/arg.cpp | common_arg & common_arg::set_env(const char * env) {
help = help + "\n(env: " + env + ")";
this->env = env;
return *this;
} | O3 | cpp | common_arg::set_env(char const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x90(%rdi), %rsi
movq 0x98(%rdi), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x213b2
leaq 0xc4265(%rip), %rsi # 0xe5b50
movq %r15, %rdi
callq 0x1b0f0
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x1b0f0
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x21927
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x2192f
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xd1d01(%rip), %rsi # 0xf3653
callq 0x1b0f0
leaq 0x90(%rbx), %rdi
leaq 0x58(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x21985
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
jmp 0x2198c
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
leaq 0x48(%rsp), %r15
movq %rdx, 0x8(%r15)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r15, %rsi
callq 0x1aab0
movq (%r15), %rdi
cmpq %rbp, %rdi
je 0x219c5
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x1a8e0
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x219dc
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1a8e0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x219f3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8e0
movq %r14, 0x88(%rbx)
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x21a2d
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1a8e0
jmp 0x21a2d
jmp 0x21a2a
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x21a44
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8e0
movq %rbx, %rdi
callq 0x1afa0
| _ZN10common_arg7set_envEPKc:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov r14, rsi
mov rbx, rdi
lea r12, [rsp+98h+var_80]
mov [r12-10h], r12
mov rsi, [rdi+90h]
mov rdx, [rdi+98h]
add rdx, rsi
lea r15, [rsp+98h+var_90]
mov rdi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rsi, aEnv; "\n(env: "
mov rdi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea rdi, [rsp+98h+var_90]
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea r13, [rsp+98h+var_60]
mov [r13-10h], r13
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_21927
mov [rsp+98h+var_70], rdx
mov rdx, [rcx]
mov [rsp+98h+var_60], rdx
jmp short loc_2192F
loc_21927:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r13+0], xmm0
loc_2192F:
mov rdx, [rax+8]
lea rdi, [rsp+98h+var_70]
mov [rdi+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rsi, a09401910201912+51h; ")"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea rdi, [rbx+90h]
lea rbp, [rsp+98h+var_40]
mov [rbp-10h], rbp
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_21985
mov [rsp+98h+var_50], rdx
mov rdx, [rcx]
mov [rsp+98h+var_40], rdx
jmp short loc_2198C
loc_21985:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rbp+0], xmm0
loc_2198C:
mov rdx, [rax+8]
lea r15, [rsp+98h+var_50]
mov [r15+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r15]; void *
cmp rdi, rbp
jz short loc_219C5
mov rsi, [rsp+98h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_219C5:
mov rdi, [rsp+98h+var_70]; void *
cmp rdi, r13
jz short loc_219DC
mov rsi, [rsp+98h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_219DC:
mov rdi, [rsp+98h+var_90]; void *
cmp rdi, r12
jz short loc_219F3
mov rsi, [rsp+98h+var_80]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_219F3:
mov [rbx+88h], r14
mov rax, rbx
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_20]; void *
cmp rdi, r13
jz short loc_21A2D
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_21A2D
jmp short $+2
loc_21A2A:
mov rbx, rax
loc_21A2D:
mov rdi, [rsp+arg_0]; void *
cmp rdi, r12
jz short loc_21A44
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_21A44:
mov rdi, rbx
call __Unwind_Resume
| common_arg * common_arg::set_env(common_arg *this, const char *a2)
{
long long v2; // rax
__int128 *v3; // rcx
long long v4; // rax
_OWORD *v5; // rcx
void *v7[2]; // [rsp+8h] [rbp-90h] BYREF
_QWORD v8[2]; // [rsp+18h] [rbp-80h] BYREF
void *v9[2]; // [rsp+28h] [rbp-70h] BYREF
__int128 v10; // [rsp+38h] [rbp-60h] BYREF
void *v11[2]; // [rsp+48h] [rbp-50h] BYREF
_OWORD v12[4]; // [rsp+58h] [rbp-40h] BYREF
v7[0] = v8;
std::string::_M_construct<char *>(
(long long)v7,
*((_BYTE **)this + 18),
*((_QWORD *)this + 18) + *((_QWORD *)this + 19));
std::string::append(v7, "\n(env: ");
v2 = std::string::append(v7, a2);
v9[0] = &v10;
v3 = (__int128 *)(v2 + 16);
if ( *(_QWORD *)v2 == v2 + 16 )
{
v10 = *v3;
}
else
{
v9[0] = *(void **)v2;
*(_QWORD *)&v10 = *(_QWORD *)v3;
}
v9[1] = *(void **)(v2 + 8);
*(_QWORD *)v2 = v3;
*(_QWORD *)(v2 + 8) = 0LL;
*(_BYTE *)(v2 + 16) = 0;
v4 = std::string::append(v9, ")");
v11[0] = v12;
v5 = (_OWORD *)(v4 + 16);
if ( *(_QWORD *)v4 == v4 + 16 )
{
v12[0] = *v5;
}
else
{
v11[0] = *(void **)v4;
*(_QWORD *)&v12[0] = *(_QWORD *)v5;
}
v11[1] = *(void **)(v4 + 8);
*(_QWORD *)v4 = v5;
*(_QWORD *)(v4 + 8) = 0LL;
*(_BYTE *)(v4 + 16) = 0;
std::string::operator=((char *)this + 144, v11);
if ( v11[0] != v12 )
operator delete(v11[0], *(_QWORD *)&v12[0] + 1LL);
if ( v9[0] != &v10 )
operator delete(v9[0], v10 + 1);
if ( v7[0] != v8 )
operator delete(v7[0], v8[0] + 1LL);
*((_QWORD *)this + 17) = a2;
return this;
}
| set_env:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R14,RSI
MOV RBX,RDI
LEA R12,[RSP + 0x18]
MOV qword ptr [R12 + -0x10],R12
MOV RSI,qword ptr [RDI + 0x90]
MOV RDX,qword ptr [RDI + 0x98]
ADD RDX,RSI
LEA R15,[RSP + 0x8]
MOV RDI,R15
CALL 0x001213b2
LAB_001218e4:
LEA RSI,[0x1e5b50]
MOV RDI,R15
CALL 0x0011b0f0
LAB_001218f3:
LEA RDI,[RSP + 0x8]
MOV RSI,R14
CALL 0x0011b0f0
LEA R13,[RSP + 0x38]
MOV qword ptr [R13 + -0x10],R13
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x00121927
MOV qword ptr [RSP + 0x28],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x38],RDX
JMP 0x0012192f
LAB_00121927:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R13],XMM0
LAB_0012192f:
MOV RDX,qword ptr [RAX + 0x8]
LEA RDI,[RSP + 0x28]
MOV qword ptr [RDI + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LAB_0012194b:
LEA RSI,[0x1f3653]
CALL 0x0011b0f0
LAB_00121957:
LEA RDI,[RBX + 0x90]
LEA RBP,[RSP + 0x58]
MOV qword ptr [RBP + -0x10],RBP
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x00121985
MOV qword ptr [RSP + 0x48],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x58],RDX
JMP 0x0012198c
LAB_00121985:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RBP],XMM0
LAB_0012198c:
MOV RDX,qword ptr [RAX + 0x8]
LEA R15,[RSP + 0x48]
MOV qword ptr [R15 + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV RSI,R15
CALL 0x0011aab0
MOV RDI,qword ptr [R15]
CMP RDI,RBP
JZ 0x001219c5
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x0011a8e0
LAB_001219c5:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R13
JZ 0x001219dc
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x0011a8e0
LAB_001219dc:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x001219f3
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011a8e0
LAB_001219f3:
MOV qword ptr [RBX + 0x88],R14
MOV RAX,RBX
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_arg::set_env(char const*) */
common_arg * __thiscall common_arg::set_env(common_arg *this,char *param_1)
{
long *plVar1;
long *plVar2;
long *local_90 [2];
long local_80 [2];
long *local_70;
long local_68;
long local_60;
long lStack_58;
long *local_50;
long local_48;
long local_40;
long lStack_38;
local_90[0] = local_80;
std::__cxx11::string::_M_construct<char*>
(local_90,*(long *)(this + 0x90),*(long *)(this + 0x98) + *(long *)(this + 0x90));
/* try { // try from 001218e4 to 001218f2 has its CatchHandler @ 00121a2a */
std::__cxx11::string::append((char *)local_90);
/* try { // try from 001218f3 to 001218ff has its CatchHandler @ 00121a28 */
plVar1 = (long *)std::__cxx11::string::append((char *)local_90);
plVar2 = plVar1 + 2;
if ((long *)*plVar1 == plVar2) {
local_60 = *plVar2;
lStack_58 = plVar1[3];
local_70 = &local_60;
}
else {
local_60 = *plVar2;
local_70 = (long *)*plVar1;
}
local_68 = plVar1[1];
*plVar1 = (long)plVar2;
plVar1[1] = 0;
*(int1 *)(plVar1 + 2) = 0;
/* try { // try from 0012194b to 00121956 has its CatchHandler @ 00121a0c */
plVar1 = (long *)std::__cxx11::string::append((char *)&local_70);
plVar2 = plVar1 + 2;
if ((long *)*plVar1 == plVar2) {
local_40 = *plVar2;
lStack_38 = plVar1[3];
local_50 = &local_40;
}
else {
local_40 = *plVar2;
local_50 = (long *)*plVar1;
}
local_48 = plVar1[1];
*plVar1 = (long)plVar2;
plVar1[1] = 0;
*(int1 *)(plVar1 + 2) = 0;
std::__cxx11::string::operator=((string *)(this + 0x90),(string *)&local_50);
if (local_50 != &local_40) {
operator_delete(local_50,local_40 + 1);
}
if (local_70 != &local_60) {
operator_delete(local_70,local_60 + 1);
}
if (local_90[0] != local_80) {
operator_delete(local_90[0],local_80[0] + 1);
}
*(char **)(this + 0x88) = param_1;
return this;
}
| |
23,101 | JS_NewRuntime2 | bluesky950520[P]quickjs/quickjs.c | JSRuntime *JS_NewRuntime2(const JSMallocFunctions *mf, void *opaque)
{
JSRuntime *rt;
JSMallocState ms;
memset(&ms, 0, sizeof(ms));
ms.opaque = opaque;
ms.malloc_limit = 0;
rt = mf->js_calloc(opaque, 1, sizeof(JSRuntime));
if (!rt)
return NULL;
rt->mf = *mf;
if (!rt->mf.js_malloc_usable_size) {
/* use dummy function if none provided */
rt->mf.js_malloc_usable_size = js_malloc_usable_size_unknown;
}
/* Inline what js_malloc_rt does since we cannot use it here. */
ms.malloc_count++;
ms.malloc_size += rt->mf.js_malloc_usable_size(rt) + MALLOC_OVERHEAD;
rt->malloc_state = ms;
rt->malloc_gc_threshold = 256 * 1024;
bf_context_init(&rt->bf_ctx, js_bf_realloc, rt);
init_list_head(&rt->context_list);
init_list_head(&rt->gc_obj_list);
init_list_head(&rt->gc_zero_ref_count_list);
rt->gc_phase = JS_GC_PHASE_NONE;
#ifdef DUMP_LEAKS
init_list_head(&rt->string_list);
#endif
init_list_head(&rt->job_list);
if (JS_InitAtoms(rt))
goto fail;
/* create the object, array and function classes */
if (init_class_range(rt, js_std_class_def, JS_CLASS_OBJECT,
countof(js_std_class_def)) < 0)
goto fail;
rt->class_array[JS_CLASS_ARGUMENTS].exotic = &js_arguments_exotic_methods;
rt->class_array[JS_CLASS_STRING].exotic = &js_string_exotic_methods;
rt->class_array[JS_CLASS_MODULE_NS].exotic = &js_module_ns_exotic_methods;
rt->class_array[JS_CLASS_C_FUNCTION].call = js_call_c_function;
rt->class_array[JS_CLASS_C_FUNCTION_DATA].call = js_c_function_data_call;
rt->class_array[JS_CLASS_BOUND_FUNCTION].call = js_call_bound_function;
rt->class_array[JS_CLASS_GENERATOR_FUNCTION].call = js_generator_function_call;
if (init_shape_hash(rt))
goto fail;
rt->js_class_id_alloc = JS_CLASS_INIT_COUNT;
rt->stack_size = JS_DEFAULT_STACK_SIZE;
#ifdef __wasi__
rt->stack_size = 0;
#endif
JS_UpdateStackTop(rt);
rt->current_exception = JS_UNINITIALIZED;
return rt;
fail:
JS_FreeRuntime(rt);
return NULL;
} | O1 | c | JS_NewRuntime2:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, %esi
movl $0x228, %edx # imm = 0x228
movq %r14, %rdi
callq *(%r15)
testq %rax, %rax
jne 0x1ccb8
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x20(%r15), %rax
movq %rax, 0x20(%rbx)
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
testq %rax, %rax
jne 0x1cce3
leaq 0x162(%rip), %rax # 0x1ce41
movq %rax, 0x20(%rbx)
movq %rbx, %rdi
callq *0x20(%rbx)
addq $0x8, %rax
movq $0x1, 0x28(%rbx)
movq %rax, 0x30(%rbx)
xorl %r15d, %r15d
movq %r15, 0x38(%rbx)
movq %r14, 0x40(%rbx)
movq $0x40000, 0xd0(%rbx) # imm = 0x40000
leaq 0x198(%rbx), %rdi
leaq 0x127(%rip), %rsi # 0x1ce44
movq %rbx, %rdx
callq 0x84928
leaq 0x88(%rbx), %rax
movq %rax, 0x88(%rbx)
movq %rax, 0x90(%rbx)
leaq 0x98(%rbx), %rax
movq %rax, 0x98(%rbx)
movq %rax, 0xa0(%rbx)
leaq 0xa8(%rbx), %rax
movq %rax, 0xa8(%rbx)
movq %rax, 0xb0(%rbx)
movb $0x0, 0xc8(%rbx)
movq %rbx, %rax
addq $0x130, %rax # imm = 0x130
movq %rax, 0x130(%rbx)
movq %rax, 0x138(%rbx)
movl %r15d, 0x50(%rbx)
movq %r15, 0x60(%rbx)
movq %r15, 0x54(%rbx)
movl %r15d, 0x70(%rbx)
movq %rbx, %rdi
movl $0x100, %esi # imm = 0x100
callq 0x1090e
testl %eax, %eax
jne 0x1ce22
movl $0x1, %r12d
leaq 0x80b40(%rip), %r14 # 0x9d8f0
movl $0x4, %r13d
xorl %eax, %eax
cmpl $0xd3, %r12d
setae %al
cmpl $0xd2, %r12d
leal 0x1(%rax,%rax), %ebp
cmovel %r13d, %ebp
movq %r14, %rdi
callq 0xe240
movq %rax, %r15
movq %rbx, %rdi
movq %r14, %rsi
movl %r15d, %edx
movl %ebp, %ecx
callq 0xf48e
testl %eax, %eax
je 0x1ce22
movslq %r15d, %rax
addq %rax, %r14
incq %r14
incl %r12d
cmpl $0xe0, %r12d
jne 0x1cdb6
leaq 0xaa8a4(%rip), %rsi # 0xc76b0
movq %rbx, %rdi
movl $0x1, %edx
movl $0x2f, %ecx
callq 0x1ce49
testl %eax, %eax
jns 0x1ce2f
movq %rbx, %rdi
callq 0x1d50a
jmp 0x1cca4
movq %rbx, %rdi
callq 0x12e1c
testb $0x1, %al
je 0x1cca6
jmp 0x1ce22
| JS_NewRuntime2:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rsi
mov r15, rdi
mov esi, 1
mov edx, 228h
mov rdi, r14
call qword ptr [r15]
test rax, rax
jnz short loc_1CCB8
loc_1CCA4:
xor ebx, ebx
loc_1CCA6:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_1CCB8:
mov rbx, rax
mov rax, [r15+20h]
mov [rbx+20h], rax
movups xmm0, xmmword ptr [r15]
movups xmm1, xmmword ptr [r15+10h]
movups xmmword ptr [rbx+10h], xmm1
movups xmmword ptr [rbx], xmm0
test rax, rax
jnz short loc_1CCE3
lea rax, js_malloc_usable_size_unknown
mov [rbx+20h], rax
loc_1CCE3:
mov rdi, rbx
call qword ptr [rbx+20h]
add rax, 8
mov qword ptr [rbx+28h], 1
mov [rbx+30h], rax
xor r15d, r15d
mov [rbx+38h], r15
mov [rbx+40h], r14
mov qword ptr [rbx+0D0h], 40000h
lea rdi, [rbx+198h]
lea rsi, js_bf_realloc
mov rdx, rbx
call bf_context_init
lea rax, [rbx+88h]
mov [rbx+88h], rax
mov [rbx+90h], rax
lea rax, [rbx+98h]
mov [rbx+98h], rax
mov [rbx+0A0h], rax
lea rax, [rbx+0A8h]
mov [rbx+0A8h], rax
mov [rbx+0B0h], rax
mov byte ptr [rbx+0C8h], 0
mov rax, rbx
add rax, 130h
mov [rbx+130h], rax
mov [rbx+138h], rax
mov [rbx+50h], r15d
mov [rbx+60h], r15
mov [rbx+54h], r15
mov [rbx+70h], r15d
mov rdi, rbx
mov esi, 100h
call JS_ResizeAtomHash
test eax, eax
jnz short loc_1CE22
mov r12d, 1
lea r14, js_atom_init; "null"
mov r13d, 4
loc_1CDB6:
xor eax, eax
cmp r12d, 0D3h
setnb al
cmp r12d, 0D2h
lea ebp, [rax+rax+1]
cmovz ebp, r13d
mov rdi, r14
call _strlen
mov r15, rax
mov rdi, rbx
mov rsi, r14
mov edx, r15d
mov ecx, ebp
call __JS_NewAtomInit
test eax, eax
jz short loc_1CE22
movsxd rax, r15d
add r14, rax
inc r14
inc r12d
cmp r12d, 0E0h
jnz short loc_1CDB6
lea rsi, js_std_class_def
mov rdi, rbx
mov edx, 1
mov ecx, 2Fh ; '/'
call init_class_range
test eax, eax
jns short loc_1CE2F
loc_1CE22:
mov rdi, rbx
call JS_FreeRuntime
jmp loc_1CCA4
loc_1CE2F:
mov rdi, rbx
call JS_NewRuntime2_cold_1
test al, 1
jz loc_1CCA6
jmp short loc_1CE22
| long long JS_NewRuntime2(__int128 *a1, long long a2)
{
long long v2; // rax
long long v3; // rbx
long long v5; // rax
__int128 v6; // xmm0
long long v7; // rax
unsigned int v8; // r12d
const char *v9; // r14
unsigned int v10; // ebp
int v11; // r15d
v2 = (*(long long ( **)(long long, long long, long long))a1)(a2, 1LL, 552LL);
if ( v2 )
{
v3 = v2;
v5 = *((_QWORD *)a1 + 4);
*(_QWORD *)(v3 + 32) = v5;
v6 = *a1;
*(_OWORD *)(v3 + 16) = a1[1];
*(_OWORD *)v3 = v6;
if ( !v5 )
*(_QWORD *)(v3 + 32) = js_malloc_usable_size_unknown;
v7 = (*(long long ( **)(long long))(v3 + 32))(v3);
*(_QWORD *)(v3 + 40) = 1LL;
*(_QWORD *)(v3 + 48) = v7 + 8;
*(_QWORD *)(v3 + 56) = 0LL;
*(_QWORD *)(v3 + 64) = a2;
*(_QWORD *)(v3 + 208) = 0x40000LL;
bf_context_init(v3 + 408, js_bf_realloc, v3);
*(_QWORD *)(v3 + 136) = v3 + 136;
*(_QWORD *)(v3 + 144) = v3 + 136;
*(_QWORD *)(v3 + 152) = v3 + 152;
*(_QWORD *)(v3 + 160) = v3 + 152;
*(_QWORD *)(v3 + 168) = v3 + 168;
*(_QWORD *)(v3 + 176) = v3 + 168;
*(_BYTE *)(v3 + 200) = 0;
*(_QWORD *)(v3 + 304) = v3 + 304;
*(_QWORD *)(v3 + 312) = v3 + 304;
*(_DWORD *)(v3 + 80) = 0;
*(_QWORD *)(v3 + 96) = 0LL;
*(_QWORD *)(v3 + 84) = 0LL;
*(_DWORD *)(v3 + 112) = 0;
if ( !(unsigned int)JS_ResizeAtomHash(v3, 256) )
{
v8 = 1;
v9 = "null";
while ( 1 )
{
v10 = 2 * (v8 >= 0xD3) + 1;
if ( v8 == 210 )
v10 = 4;
v11 = strlen(v9);
if ( !(unsigned int)_JS_NewAtomInit(v3, (long long)v9, v11, v10) )
break;
v9 += v11 + 1;
if ( ++v8 == 224 )
{
if ( (int)init_class_range(v3, &js_std_class_def, 1LL, 47LL) >= 0 && (JS_NewRuntime2_cold_1(v3) & 1) == 0 )
return v3;
break;
}
}
}
JS_FreeRuntime(v3);
}
return 0LL;
}
| |||
23,102 | JS_NewRuntime2 | bluesky950520[P]quickjs/quickjs.c | JSRuntime *JS_NewRuntime2(const JSMallocFunctions *mf, void *opaque)
{
JSRuntime *rt;
JSMallocState ms;
memset(&ms, 0, sizeof(ms));
ms.opaque = opaque;
ms.malloc_limit = 0;
rt = mf->js_calloc(opaque, 1, sizeof(JSRuntime));
if (!rt)
return NULL;
rt->mf = *mf;
if (!rt->mf.js_malloc_usable_size) {
/* use dummy function if none provided */
rt->mf.js_malloc_usable_size = js_malloc_usable_size_unknown;
}
/* Inline what js_malloc_rt does since we cannot use it here. */
ms.malloc_count++;
ms.malloc_size += rt->mf.js_malloc_usable_size(rt) + MALLOC_OVERHEAD;
rt->malloc_state = ms;
rt->malloc_gc_threshold = 256 * 1024;
bf_context_init(&rt->bf_ctx, js_bf_realloc, rt);
init_list_head(&rt->context_list);
init_list_head(&rt->gc_obj_list);
init_list_head(&rt->gc_zero_ref_count_list);
rt->gc_phase = JS_GC_PHASE_NONE;
#ifdef DUMP_LEAKS
init_list_head(&rt->string_list);
#endif
init_list_head(&rt->job_list);
if (JS_InitAtoms(rt))
goto fail;
/* create the object, array and function classes */
if (init_class_range(rt, js_std_class_def, JS_CLASS_OBJECT,
countof(js_std_class_def)) < 0)
goto fail;
rt->class_array[JS_CLASS_ARGUMENTS].exotic = &js_arguments_exotic_methods;
rt->class_array[JS_CLASS_STRING].exotic = &js_string_exotic_methods;
rt->class_array[JS_CLASS_MODULE_NS].exotic = &js_module_ns_exotic_methods;
rt->class_array[JS_CLASS_C_FUNCTION].call = js_call_c_function;
rt->class_array[JS_CLASS_C_FUNCTION_DATA].call = js_c_function_data_call;
rt->class_array[JS_CLASS_BOUND_FUNCTION].call = js_call_bound_function;
rt->class_array[JS_CLASS_GENERATOR_FUNCTION].call = js_generator_function_call;
if (init_shape_hash(rt))
goto fail;
rt->js_class_id_alloc = JS_CLASS_INIT_COUNT;
rt->stack_size = JS_DEFAULT_STACK_SIZE;
#ifdef __wasi__
rt->stack_size = 0;
#endif
JS_UpdateStackTop(rt);
rt->current_exception = JS_UNINITIALIZED;
return rt;
fail:
JS_FreeRuntime(rt);
return NULL;
} | O3 | c | JS_NewRuntime2:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, %esi
movl $0x228, %edx # imm = 0x228
movq %r14, %rdi
callq *(%r15)
testq %rax, %rax
jne 0x1d5a0
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x20(%r15), %rax
movq %rax, 0x20(%rbx)
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
testq %rax, %rax
jne 0x1d5cb
leaq 0x161(%rip), %rax # 0x1d728
movq %rax, 0x20(%rbx)
movq %rbx, %rdi
callq *%rax
addq $0x8, %rax
movq $0x1, 0x28(%rbx)
movq %rax, 0x30(%rbx)
xorl %r15d, %r15d
movq %r15, 0x38(%rbx)
movq %r14, 0x40(%rbx)
movq $0x40000, 0xd0(%rbx) # imm = 0x40000
leaq 0x198(%rbx), %rdi
leaq 0x127(%rip), %rsi # 0x1d72b
movq %rbx, %rdx
callq 0x8736c
leaq 0x88(%rbx), %rax
movq %rax, 0x88(%rbx)
movq %rax, 0x90(%rbx)
leaq 0x98(%rbx), %rax
movq %rax, 0x98(%rbx)
movq %rax, 0xa0(%rbx)
leaq 0xa8(%rbx), %rax
movq %rax, 0xa8(%rbx)
movq %rax, 0xb0(%rbx)
movb $0x0, 0xc8(%rbx)
movq %rbx, %rax
addq $0x130, %rax # imm = 0x130
movq %rax, 0x130(%rbx)
movq %rax, 0x138(%rbx)
movl %r15d, 0x50(%rbx)
movq %r15, 0x60(%rbx)
movq %r15, 0x54(%rbx)
movl %r15d, 0x70(%rbx)
movq %rbx, %rdi
movl $0x100, %esi # imm = 0x100
callq 0x10bfc
testl %eax, %eax
jne 0x1d709
movl $0x1, %r12d
leaq 0x831d9(%rip), %r14 # 0xa0870
movl $0x4, %r13d
xorl %eax, %eax
cmpl $0xd3, %r12d
setae %al
cmpl $0xd2, %r12d
leal 0x1(%rax,%rax), %ebp
cmovel %r13d, %ebp
movq %r14, %rdi
callq 0xe240
movq %rax, %r15
movq %rbx, %rdi
movq %r14, %rsi
movl %r15d, %edx
movl %ebp, %ecx
callq 0xf4da
testl %eax, %eax
je 0x1d709
movslq %r15d, %rax
addq %rax, %r14
incq %r14
incl %r12d
cmpl $0xe0, %r12d
jne 0x1d69d
leaq 0xacfbd(%rip), %rsi # 0xca6b0
movq %rbx, %rdi
movl $0x1, %edx
movl $0x2f, %ecx
callq 0x1d730
testl %eax, %eax
jns 0x1d716
movq %rbx, %rdi
callq 0x1dddf
jmp 0x1d58c
movq %rbx, %rdi
callq 0x13537
testb $0x1, %al
je 0x1d58e
jmp 0x1d709
| JS_NewRuntime2:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rsi
mov r15, rdi
mov esi, 1
mov edx, 228h
mov rdi, r14
call qword ptr [r15]
test rax, rax
jnz short loc_1D5A0
loc_1D58C:
xor ebx, ebx
loc_1D58E:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_1D5A0:
mov rbx, rax
mov rax, [r15+20h]
mov [rbx+20h], rax
movups xmm0, xmmword ptr [r15]
movups xmm1, xmmword ptr [r15+10h]
movups xmmword ptr [rbx+10h], xmm1
movups xmmword ptr [rbx], xmm0
test rax, rax
jnz short loc_1D5CB
lea rax, js_malloc_usable_size_unknown
mov [rbx+20h], rax
loc_1D5CB:
mov rdi, rbx
call rax
add rax, 8
mov qword ptr [rbx+28h], 1
mov [rbx+30h], rax
xor r15d, r15d
mov [rbx+38h], r15
mov [rbx+40h], r14
mov qword ptr [rbx+0D0h], offset loc_40000
lea rdi, [rbx+198h]
lea rsi, js_bf_realloc
mov rdx, rbx
call bf_context_init
lea rax, [rbx+88h]
mov [rbx+88h], rax
mov [rbx+90h], rax
lea rax, [rbx+98h]
mov [rbx+98h], rax
mov [rbx+0A0h], rax
lea rax, [rbx+0A8h]
mov [rbx+0A8h], rax
mov [rbx+0B0h], rax
mov byte ptr [rbx+0C8h], 0
mov rax, rbx
add rax, 130h
mov [rbx+130h], rax
mov [rbx+138h], rax
mov [rbx+50h], r15d
mov [rbx+60h], r15
mov [rbx+54h], r15
mov [rbx+70h], r15d
mov rdi, rbx
mov esi, 100h
call JS_ResizeAtomHash
test eax, eax
jnz short loc_1D709
mov r12d, 1
lea r14, js_atom_init; "null"
mov r13d, 4
loc_1D69D:
xor eax, eax
cmp r12d, 0D3h
setnb al
cmp r12d, 0D2h
lea ebp, [rax+rax+1]
cmovz ebp, r13d
mov rdi, r14
call _strlen
mov r15, rax
mov rdi, rbx
mov rsi, r14
mov edx, r15d
mov ecx, ebp
call __JS_NewAtomInit
test eax, eax
jz short loc_1D709
movsxd rax, r15d
add r14, rax
inc r14
inc r12d
cmp r12d, 0E0h
jnz short loc_1D69D
lea rsi, js_std_class_def
mov rdi, rbx
mov edx, 1
mov ecx, 2Fh ; '/'
call init_class_range
test eax, eax
jns short loc_1D716
loc_1D709:
mov rdi, rbx
call JS_FreeRuntime
jmp loc_1D58C
loc_1D716:
mov rdi, rbx
call JS_NewRuntime2_cold_1
test al, 1
jz loc_1D58E
jmp short loc_1D709
| long long JS_NewRuntime2(__int128 *a1, long long a2)
{
long long v2; // rax
long long v3; // rbx
long long ( *v5)(); // rax
__int128 v6; // xmm0
long long v7; // rax
unsigned int v8; // r12d
const char *v9; // r14
unsigned int v10; // ebp
int v11; // r15d
v2 = (*(long long ( **)(long long, long long, long long))a1)(a2, 1LL, 552LL);
if ( v2 )
{
v3 = v2;
v5 = (long long ( *)())*((_QWORD *)a1 + 4);
*(_QWORD *)(v3 + 32) = v5;
v6 = *a1;
*(_OWORD *)(v3 + 16) = a1[1];
*(_OWORD *)v3 = v6;
if ( !v5 )
{
v5 = js_malloc_usable_size_unknown;
*(_QWORD *)(v3 + 32) = js_malloc_usable_size_unknown;
}
v7 = ((long long ( *)(long long))v5)(v3);
*(_QWORD *)(v3 + 40) = 1LL;
*(_QWORD *)(v3 + 48) = v7 + 8;
*(_QWORD *)(v3 + 56) = 0LL;
*(_QWORD *)(v3 + 64) = a2;
*(_QWORD *)(v3 + 208) = &loc_40000;
bf_context_init(v3 + 408, js_bf_realloc, v3);
*(_QWORD *)(v3 + 136) = v3 + 136;
*(_QWORD *)(v3 + 144) = v3 + 136;
*(_QWORD *)(v3 + 152) = v3 + 152;
*(_QWORD *)(v3 + 160) = v3 + 152;
*(_QWORD *)(v3 + 168) = v3 + 168;
*(_QWORD *)(v3 + 176) = v3 + 168;
*(_BYTE *)(v3 + 200) = 0;
*(_QWORD *)(v3 + 304) = v3 + 304;
*(_QWORD *)(v3 + 312) = v3 + 304;
*(_DWORD *)(v3 + 80) = 0;
*(_QWORD *)(v3 + 96) = 0LL;
*(_QWORD *)(v3 + 84) = 0LL;
*(_DWORD *)(v3 + 112) = 0;
if ( !(unsigned int)JS_ResizeAtomHash(v3, 256) )
{
v8 = 1;
v9 = "null";
while ( 1 )
{
v10 = 2 * (v8 >= 0xD3) + 1;
if ( v8 == 210 )
v10 = 4;
v11 = strlen(v9);
if ( !(unsigned int)_JS_NewAtomInit(v3, (long long)v9, v11, v10) )
break;
v9 += v11 + 1;
if ( ++v8 == 224 )
{
if ( (int)init_class_range(v3, &js_std_class_def, 1LL, 47LL) >= 0 && (JS_NewRuntime2_cold_1(v3) & 1) == 0 )
return v3;
break;
}
}
}
JS_FreeRuntime(v3);
}
return 0LL;
}
| JS_NewRuntime2:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV R15,RDI
MOV ESI,0x1
MOV EDX,0x228
MOV RDI,R14
CALL qword ptr [R15]
TEST RAX,RAX
JNZ 0x0011d5a0
LAB_0011d58c:
XOR EBX,EBX
LAB_0011d58e:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0011d5a0:
MOV RBX,RAX
MOV RAX,qword ptr [R15 + 0x20]
MOV qword ptr [RBX + 0x20],RAX
MOVUPS XMM0,xmmword ptr [R15]
MOVUPS XMM1,xmmword ptr [R15 + 0x10]
MOVUPS xmmword ptr [RBX + 0x10],XMM1
MOVUPS xmmword ptr [RBX],XMM0
TEST RAX,RAX
JNZ 0x0011d5cb
LEA RAX,[0x11d728]
MOV qword ptr [RBX + 0x20],RAX
LAB_0011d5cb:
MOV RDI,RBX
CALL RAX
ADD RAX,0x8
MOV qword ptr [RBX + 0x28],0x1
MOV qword ptr [RBX + 0x30],RAX
XOR R15D,R15D
MOV qword ptr [RBX + 0x38],R15
MOV qword ptr [RBX + 0x40],R14
MOV qword ptr [RBX + 0xd0],0x40000
LEA RDI,[RBX + 0x198]
LEA RSI,[0x11d72b]
MOV RDX,RBX
CALL 0x0018736c
LEA RAX,[RBX + 0x88]
MOV qword ptr [RBX + 0x88],RAX
MOV qword ptr [RBX + 0x90],RAX
LEA RAX,[RBX + 0x98]
MOV qword ptr [RBX + 0x98],RAX
MOV qword ptr [RBX + 0xa0],RAX
LEA RAX,[RBX + 0xa8]
MOV qword ptr [RBX + 0xa8],RAX
MOV qword ptr [RBX + 0xb0],RAX
MOV byte ptr [RBX + 0xc8],0x0
MOV RAX,RBX
ADD RAX,0x130
MOV qword ptr [RBX + 0x130],RAX
MOV qword ptr [RBX + 0x138],RAX
MOV dword ptr [RBX + 0x50],R15D
MOV qword ptr [RBX + 0x60],R15
MOV qword ptr [RBX + 0x54],R15
MOV dword ptr [RBX + 0x70],R15D
MOV RDI,RBX
MOV ESI,0x100
CALL 0x00110bfc
TEST EAX,EAX
JNZ 0x0011d709
MOV R12D,0x1
LEA R14,[0x1a0870]
MOV R13D,0x4
LAB_0011d69d:
XOR EAX,EAX
CMP R12D,0xd3
SETNC AL
CMP R12D,0xd2
LEA EBP,[RAX + RAX*0x1 + 0x1]
CMOVZ EBP,R13D
MOV RDI,R14
CALL 0x0010e240
MOV R15,RAX
MOV RDI,RBX
MOV RSI,R14
MOV EDX,R15D
MOV ECX,EBP
CALL 0x0010f4da
TEST EAX,EAX
JZ 0x0011d709
MOVSXD RAX,R15D
ADD R14,RAX
INC R14
INC R12D
CMP R12D,0xe0
JNZ 0x0011d69d
LEA RSI,[0x1ca6b0]
MOV RDI,RBX
MOV EDX,0x1
MOV ECX,0x2f
CALL 0x0011d730
TEST EAX,EAX
JNS 0x0011d716
LAB_0011d709:
MOV RDI,RBX
CALL 0x0011dddf
JMP 0x0011d58c
LAB_0011d716:
MOV RDI,RBX
CALL 0x00113537
TEST AL,0x1
JZ 0x0011d58e
JMP 0x0011d709
|
int4 * JS_NewRuntime2(int8 *param_1,int8 param_2)
{
int4 uVar1;
int4 uVar2;
int4 uVar3;
int4 uVar4;
int4 uVar5;
int4 uVar6;
int4 uVar7;
int iVar8;
int4 *puVar9;
code *pcVar10;
long lVar11;
size_t sVar12;
ulong uVar13;
char cVar14;
uint uVar15;
char *__s;
puVar9 = (int4 *)(*(code *)*param_1)(param_2,1,0x228);
if (puVar9 != (int4 *)0x0) {
pcVar10 = (code *)param_1[4];
*(code **)(puVar9 + 8) = pcVar10;
uVar1 = *(int4 *)param_1;
uVar2 = *(int4 *)((long)param_1 + 4);
uVar3 = *(int4 *)(param_1 + 1);
uVar4 = *(int4 *)((long)param_1 + 0xc);
uVar5 = *(int4 *)((long)param_1 + 0x14);
uVar6 = *(int4 *)(param_1 + 3);
uVar7 = *(int4 *)((long)param_1 + 0x1c);
puVar9[4] = *(int4 *)(param_1 + 2);
puVar9[5] = uVar5;
puVar9[6] = uVar6;
puVar9[7] = uVar7;
*puVar9 = uVar1;
puVar9[1] = uVar2;
puVar9[2] = uVar3;
puVar9[3] = uVar4;
if (pcVar10 == (code *)0x0) {
pcVar10 = js_malloc_usable_size_unknown;
*(code **)(puVar9 + 8) = js_malloc_usable_size_unknown;
}
lVar11 = (*pcVar10)(puVar9);
*(int8 *)(puVar9 + 10) = 1;
*(long *)(puVar9 + 0xc) = lVar11 + 8;
*(int8 *)(puVar9 + 0xe) = 0;
*(int8 *)(puVar9 + 0x10) = param_2;
*(int8 *)(puVar9 + 0x34) = 0x40000;
bf_context_init(puVar9 + 0x66,js_bf_realloc,puVar9);
*(int4 **)(puVar9 + 0x22) = puVar9 + 0x22;
*(int4 **)(puVar9 + 0x24) = puVar9 + 0x22;
*(int4 **)(puVar9 + 0x26) = puVar9 + 0x26;
*(int4 **)(puVar9 + 0x28) = puVar9 + 0x26;
*(int4 **)(puVar9 + 0x2a) = puVar9 + 0x2a;
*(int4 **)(puVar9 + 0x2c) = puVar9 + 0x2a;
*(int1 *)(puVar9 + 0x32) = 0;
*(int4 **)(puVar9 + 0x4c) = puVar9 + 0x4c;
*(int4 **)(puVar9 + 0x4e) = puVar9 + 0x4c;
puVar9[0x14] = 0;
*(int8 *)(puVar9 + 0x18) = 0;
*(int8 *)(puVar9 + 0x15) = 0;
puVar9[0x1c] = 0;
iVar8 = JS_ResizeAtomHash(puVar9,0x100);
if (iVar8 == 0) {
uVar15 = 1;
__s = "null";
do {
cVar14 = (0xd2 < uVar15) * '\x02' + '\x01';
if (uVar15 == 0xd2) {
cVar14 = '\x04';
}
sVar12 = strlen(__s);
iVar8 = __JS_NewAtomInit(puVar9,__s,sVar12 & 0xffffffff,cVar14);
if (iVar8 == 0) goto LAB_0011d709;
__s = __s + (long)(int)sVar12 + 1;
uVar15 = uVar15 + 1;
} while (uVar15 != 0xe0);
iVar8 = init_class_range(puVar9,&js_std_class_def,1,0x2f);
if ((-1 < iVar8) && (uVar13 = JS_NewRuntime2_cold_1(puVar9), (uVar13 & 1) == 0)) {
return puVar9;
}
}
LAB_0011d709:
JS_FreeRuntime(puVar9);
}
return (int4 *)0x0;
}
| |
23,103 | ma_zlib_compress | eloqsql/libmariadb/plugins/compress/c_zlib.c | my_bool ma_zlib_compress(ma_compress_ctx *ctx, void *dst,
size_t *dst_len, void *source, size_t source_len)
{
int rc;
if (!ctx)
return 1;
if ((rc= compress2((Bytef *)dst, (uLongf *)dst_len, (Bytef *)source, (uLong)source_len,
ctx->compression_level)) != Z_OK)
return 1;
return 0;
} | O0 | c | ma_zlib_compress:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x729a9
movb $0x1, -0x1(%rbp)
jmp 0x729d8
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movl 0x10(%rax), %r8d
callq 0x38660
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
je 0x729d4
movb $0x1, -0x1(%rbp)
jmp 0x729d8
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_zlib_compress:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
cmp [rbp+var_10], 0
jnz short loc_729A9
mov [rbp+var_1], 1
jmp short loc_729D8
loc_729A9:
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
mov rax, [rbp+var_10]
mov r8d, [rax+10h]
call _compress2
mov [rbp+var_34], eax
cmp eax, 0
jz short loc_729D4
mov [rbp+var_1], 1
jmp short loc_729D8
loc_729D4:
mov [rbp+var_1], 0
loc_729D8:
mov al, [rbp+var_1]
add rsp, 40h
pop rbp
retn
| bool ma_zlib_compress(long long a1, long long a2, long long a3, long long a4, long long a5)
{
return !a1 || (unsigned int)compress2(a2, a3, a4, a5, *(unsigned int *)(a1 + 16)) != 0;
}
| ma_zlib_compress:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x001729a9
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001729d8
LAB_001729a9:
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV R8D,dword ptr [RAX + 0x10]
CALL 0x00138660
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
JZ 0x001729d4
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001729d8
LAB_001729d4:
MOV byte ptr [RBP + -0x1],0x0
LAB_001729d8:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x40
POP RBP
RET
|
int1
ma_zlib_compress(long param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5)
{
int iVar1;
int1 local_9;
if (param_1 == 0) {
local_9 = 1;
}
else {
iVar1 = compress2(param_2,param_3,param_4,param_5,*(int4 *)(param_1 + 0x10));
if (iVar1 == 0) {
local_9 = 0;
}
else {
local_9 = 1;
}
}
return local_9;
}
| |
23,104 | JS_ReadObjectValue | bluesky950520[P]quickjs/quickjs.c | static JSValue JS_ReadObjectValue(BCReaderState *s)
{
JSContext *ctx = s->ctx;
JSValue val, obj = JS_UNDEFINED;
val = JS_ReadObjectRec(s);
if (JS_IsException(val))
goto fail;
obj = JS_ToObject(ctx, val);
if (JS_IsException(obj))
goto fail;
if (BC_add_object_ref(s, obj))
goto fail;
JS_FreeValue(ctx, val);
return obj;
fail:
JS_FreeValue(ctx, val);
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
} | O1 | c | JS_ReadObjectValue:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbp
movq (%rdi), %r14
callq 0x31cf5
movq %rax, %r13
movq %rdx, %r12
cmpl $0x6, %r12d
jne 0x4622e
movl $0x3, %ebx
xorl %r15d, %r15d
jmp 0x46256
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x261c9
movq %rax, %r15
movq %rdx, %rbx
cmpl $0x6, %ebx
je 0x46256
movq %rbp, %rdi
movq %r15, %rsi
callq 0x4647d
testl %eax, %eax
je 0x46291
movq 0x18(%r14), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x1ccb2
movq 0x18(%r14), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1ccb2
movl $0x6, %ebx
xorl %r15d, %r15d
movq %r15, %rax
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%r14), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x1ccb2
jmp 0x4627c
| JS_ReadObjectValue:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbp, rdi
mov r14, [rdi]
call JS_ReadObjectRec
mov r13, rax
mov r12, rdx
cmp r12d, 6
jnz short loc_4622E
mov ebx, 3
xor r15d, r15d
jmp short loc_46256
loc_4622E:
mov rdi, r14
mov rsi, r13
mov rdx, r12
call JS_ToObject
mov r15, rax
mov rbx, rdx
cmp ebx, 6
jz short loc_46256
mov rdi, rbp
mov rsi, r15
call BC_add_object_ref1
test eax, eax
jz short loc_46291
loc_46256:
mov rdi, [r14+18h]
mov rsi, r13
mov rdx, r12
call JS_FreeValueRT
mov rdi, [r14+18h]
mov rsi, r15
mov rdx, rbx
call JS_FreeValueRT
mov ebx, 6
xor r15d, r15d
loc_4627C:
mov rax, r15
mov rdx, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_46291:
mov rdi, [r14+18h]
mov rsi, r13
mov rdx, r12
call JS_FreeValueRT
jmp short loc_4627C
| _DWORD * JS_ReadObjectValue(
long long *a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v14; // r14
long long ObjectRec; // rax
long long v16; // rdx
long long v17; // rcx
long long v18; // r8
long long v19; // r9
__m128 v20; // xmm4
__m128 v21; // xmm5
_DWORD *v22; // r13
long long v23; // r12
long long v24; // rbx
_DWORD *v25; // r15
_DWORD *v26; // rax
long long v27; // rdx
v14 = *a1;
ObjectRec = JS_ReadObjectRec((long long)a1, a7, a8, a9, a10, a11, a12, a13, a14, a2, a3, a4, a5, a6);
v22 = (_DWORD *)ObjectRec;
v23 = v16;
if ( (_DWORD)v16 == 6 )
{
v24 = 3LL;
v25 = 0LL;
}
else
{
v26 = JS_ToObject(v14, ObjectRec, v16, v17, v18, v19, a7, a8, a9, a10, v20, v21, a13, a14);
v25 = v26;
v24 = v27;
if ( (_DWORD)v27 != 6 && !(unsigned int)BC_add_object_ref1(a1, v26) )
{
JS_FreeValueRT(*(_QWORD *)(v14 + 24), v22, v23);
return v25;
}
}
JS_FreeValueRT(*(_QWORD *)(v14 + 24), v22, v23);
JS_FreeValueRT(*(_QWORD *)(v14 + 24), v25, v24);
return 0LL;
}
| JS_ReadObjectValue:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBP,RDI
MOV R14,qword ptr [RDI]
CALL 0x00131cf5
MOV R13,RAX
MOV R12,RDX
CMP R12D,0x6
JNZ 0x0014622e
MOV EBX,0x3
XOR R15D,R15D
JMP 0x00146256
LAB_0014622e:
MOV RDI,R14
MOV RSI,R13
MOV RDX,R12
CALL 0x001261c9
MOV R15,RAX
MOV RBX,RDX
CMP EBX,0x6
JZ 0x00146256
MOV RDI,RBP
MOV RSI,R15
CALL 0x0014647d
TEST EAX,EAX
JZ 0x00146291
LAB_00146256:
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,R13
MOV RDX,R12
CALL 0x0011ccb2
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,R15
MOV RDX,RBX
CALL 0x0011ccb2
MOV EBX,0x6
XOR R15D,R15D
LAB_0014627c:
MOV RAX,R15
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00146291:
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,R13
MOV RDX,R12
CALL 0x0011ccb2
JMP 0x0014627c
|
int1 [16] JS_ReadObjectValue(long *param_1)
{
long lVar1;
int iVar2;
int8 uVar3;
int8 uVar4;
int1 auVar5 [16];
lVar1 = *param_1;
auVar5 = JS_ReadObjectRec();
uVar4 = auVar5._8_8_;
uVar3 = auVar5._0_8_;
if (auVar5._8_4_ == 6) {
auVar5 = ZEXT816(3) << 0x40;
}
else {
auVar5 = JS_ToObject(lVar1,uVar3,uVar4);
if ((auVar5._8_4_ != 6) && (iVar2 = BC_add_object_ref1(param_1,auVar5._0_8_), iVar2 == 0)) {
JS_FreeValueRT(*(int8 *)(lVar1 + 0x18),uVar3,uVar4);
return auVar5;
}
}
JS_FreeValueRT(*(int8 *)(lVar1 + 0x18),uVar3,uVar4);
JS_FreeValueRT(*(int8 *)(lVar1 + 0x18),auVar5._0_8_,auVar5._8_8_);
return ZEXT816(6) << 0x40;
}
| |
23,105 | my_charset_is_8bit_pure_ascii | eloqsql/strings/ctype-simple.c | static my_bool
my_charset_is_8bit_pure_ascii(CHARSET_INFO *cs)
{
size_t code;
if (!cs->tab_to_uni)
return 0;
for (code= 0; code < 256; code++)
{
if (cs->tab_to_uni[code] > 0x7F)
return 0;
}
return 1;
} | O0 | c | my_charset_is_8bit_pure_ascii:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x68(%rax)
jne 0x45289
movb $0x0, -0x1(%rbp)
jmp 0x452ca
movq $0x0, -0x18(%rbp)
cmpq $0x100, -0x18(%rbp) # imm = 0x100
jae 0x452c6
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movq -0x18(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
cmpl $0x7f, %eax
jle 0x452b6
movb $0x0, -0x1(%rbp)
jmp 0x452ca
jmp 0x452b8
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x45291
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nop
| my_charset_is_8bit_pure_ascii:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
cmp qword ptr [rax+68h], 0
jnz short loc_45289
mov [rbp+var_1], 0
jmp short loc_452CA
loc_45289:
mov [rbp+var_18], 0
loc_45291:
cmp [rbp+var_18], 100h
jnb short loc_452C6
mov rax, [rbp+var_10]
mov rax, [rax+68h]
mov rcx, [rbp+var_18]
movzx eax, word ptr [rax+rcx*2]
cmp eax, 7Fh
jle short loc_452B6
mov [rbp+var_1], 0
jmp short loc_452CA
loc_452B6:
jmp short $+2
loc_452B8:
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
jmp short loc_45291
loc_452C6:
mov [rbp+var_1], 1
loc_452CA:
mov al, [rbp+var_1]
pop rbp
retn
| char my_charset_is_8bit_pure_ascii(long long a1)
{
unsigned long long i; // [rsp+0h] [rbp-18h]
if ( !*(_QWORD *)(a1 + 104) )
return 0;
for ( i = 0LL; i < 0x100; ++i )
{
if ( *(unsigned __int16 *)(*(_QWORD *)(a1 + 104) + 2 * i) > 0x7Fu )
return 0;
}
return 1;
}
| my_charset_is_8bit_pure_ascii:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x68],0x0
JNZ 0x00145289
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001452ca
LAB_00145289:
MOV qword ptr [RBP + -0x18],0x0
LAB_00145291:
CMP qword ptr [RBP + -0x18],0x100
JNC 0x001452c6
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x68]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX EAX,word ptr [RAX + RCX*0x2]
CMP EAX,0x7f
JLE 0x001452b6
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001452ca
LAB_001452b6:
JMP 0x001452b8
LAB_001452b8:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00145291
LAB_001452c6:
MOV byte ptr [RBP + -0x1],0x1
LAB_001452ca:
MOV AL,byte ptr [RBP + -0x1]
POP RBP
RET
|
int1 my_charset_is_8bit_pure_ascii(long param_1)
{
ulong local_20;
int1 local_9;
if (*(long *)(param_1 + 0x68) == 0) {
local_9 = 0;
}
else {
for (local_20 = 0; local_20 < 0x100; local_20 = local_20 + 1) {
if (0x7f < *(ushort *)(*(long *)(param_1 + 0x68) + local_20 * 2)) {
return 0;
}
}
local_9 = 1;
}
return local_9;
}
| |
23,106 | nlohmann::json_abi_v3_11_2::detail::parse_error nlohmann::json_abi_v3_11_2::detail::parse_error::create<std::nullptr_t, 0>(int, nlohmann::json_abi_v3_11_2::detail::position_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t) | 7CodeWizard[P]stablediffusion/thirdparty/json.hpp | static parse_error create(int id_, const position_t& pos, const std::string& what_arg, BasicJsonContext context)
{
std::string w = concat(exception::name("parse_error", id_), "parse error",
position_string(pos), ": ", exception::diagnostics(context), what_arg);
return {id_, pos.chars_read_total, w.c_str()};
} | O1 | cpp | nlohmann::json_abi_v3_11_2::detail::parse_error nlohmann::json_abi_v3_11_2::detail::parse_error::create<std::nullptr_t, 0>(int, nlohmann::json_abi_v3_11_2::detail::position_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rcx, %r15
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x505b6(%rip), %rsi # 0xc312f
leaq 0x505ba(%rip), %rdx # 0xc313a
leaq 0x8(%rsp), %rdi
callq 0x2fa9c
leaq 0x68(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movl %ebp, %edx
callq 0x6ed2c
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq 0x7704c
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
movq %r15, (%rsp)
leaq 0x50572(%rip), %rdx # 0xc313b
leaq 0x4998c(%rip), %r8 # 0xbc55c
leaq 0x88(%rsp), %rdi
leaq 0x68(%rsp), %rsi
leaq 0x48(%rsp), %rcx
leaq 0x28(%rsp), %r9
callq 0x76f43
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x72c03
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xa5e0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x72c1e
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xa5e0
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x72c39
movq 0x78(%rsp), %rsi
incq %rsi
callq 0xa5e0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x72c50
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa5e0
movq (%r14), %r14
movq 0x88(%rsp), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x6ef28
leaq 0x8337c(%rip), %rax # 0xf5fe8
movq %rax, (%rbx)
movq %r14, 0x20(%rbx)
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x72c94
movq 0x98(%rsp), %rsi
incq %rsi
callq 0xa5e0
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x72d41
movq 0x98(%rsp), %rsi
jmp 0x72d34
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x72ce5
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xa5e0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x72d05
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xa5e0
jmp 0x72d05
movq %rax, %rbx
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x72d25
movq 0x78(%rsp), %rsi
incq %rsi
callq 0xa5e0
jmp 0x72d25
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x72d41
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa5e0
jmp 0x72d41
movq %rax, %rbx
movq %rbx, %rdi
callq 0xaae0
nop
| _ZN8nlohmann16json_abi_v3_11_26detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A8h
mov r15, rcx
mov r14, rdx
mov ebp, esi
mov rbx, rdi
lea r12, [rsp+0D8h+var_C0]
mov [r12-10h], r12
lea rsi, aParseError; "parse_error"
lea rdx, aParseError+0Bh; ""
lea rdi, [rsp+0D8h+var_D0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdi, [rsp+0D8h+var_70]; int
lea rsi, [rsp+0D8h+var_D0]; int
mov edx, ebp; int
call _ZN8nlohmann16json_abi_v3_11_26detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_2::detail::exception::name(std::string const&,int)
lea rdi, [rsp+0D8h+var_90]; int
mov rsi, r14; int
call _ZN8nlohmann16json_abi_v3_11_26detail11parse_error15position_stringB5cxx11ERKNS1_10position_tE; nlohmann::json_abi_v3_11_2::detail::parse_error::position_string(nlohmann::json_abi_v3_11_2::detail::position_t const&)
lea r13, [rsp+0D8h+var_A0]
mov [r13-10h], r13
mov qword ptr [r13-8], 0
mov byte ptr [r13+0], 0
mov [rsp+0D8h+var_D8], r15
lea rdx, aParseError_0; "parse error"
lea r8, aRng_0+3; ": "
lea rdi, [rsp+0D8h+var_50]
lea rsi, [rsp+0D8h+var_70]
lea rcx, [rsp+0D8h+var_90]
lea r9, [rsp+0D8h+var_B0]
call _ZN8nlohmann16json_abi_v3_11_26detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS8_RA12_KcS8_RA3_S9_S8_RKS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_2::detail::concat<std::string,std::string,char const(&)[12],std::string,char const(&)[3],std::string,std::string const&>(std::string,char const(&)[12],std::string,char const(&)[3],std::string,std::string const&)
mov rdi, [rsp+0D8h+var_B0]; void *
cmp rdi, r13
jz short loc_72C03
mov rsi, [rsp+0D8h+var_A0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_72C03:
lea rax, [rsp+0D8h+var_80]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_72C1E
mov rsi, [rsp+0D8h+var_80]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_72C1E:
lea rax, [rsp+0D8h+var_60]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_72C39
mov rsi, [rsp+0D8h+var_60]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_72C39:
mov rdi, [rsp+0D8h+var_D0]; void *
cmp rdi, r12
jz short loc_72C50
mov rsi, [rsp+0D8h+var_C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_72C50:
mov r14, [r14]
mov rdx, [rsp+0D8h+var_50]; char *
mov rdi, rbx; this
mov esi, ebp; int
call _ZN8nlohmann16json_abi_v3_11_26detail9exceptionC2EiPKc; nlohmann::json_abi_v3_11_2::detail::exception::exception(int,char const*)
lea rax, off_F5FE8
mov [rbx], rax
mov [rbx+20h], r14
lea rax, [rsp+0D8h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_72C94
mov rsi, [rsp+0D8h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_72C94:
mov rax, rbx
add rsp, 0A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rax, [rsp+arg_90]
mov rdi, [rax-10h]
cmp rdi, rax
jz loc_72D41
mov rsi, [rsp+arg_90]
jmp short loc_72D34
mov rbx, rax
mov rdi, [rsp+arg_20]; void *
cmp rdi, r13
jz short loc_72CE5
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_72CE5:
lea rax, [rsp+arg_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_72D05
mov rsi, [rsp+arg_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_72D05
mov rbx, rax
loc_72D05:
lea rax, [rsp+arg_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_72D25
mov rsi, [rsp+arg_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_72D25
mov rbx, rax
loc_72D25:
mov rdi, [rsp+arg_0]; void *
cmp rdi, r12
jz short loc_72D41
mov rsi, [rsp+arg_10]
loc_72D34:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_72D41
mov rbx, rax
loc_72D41:
mov rdi, rbx
call __Unwind_Resume
| nlohmann::json_abi_v3_11_2::detail::exception * ZN8nlohmann16json_abi_v3_11_26detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_(
nlohmann::json_abi_v3_11_2::detail::exception *this,
int a2,
long long *a3,
long long a4)
{
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
long long v10; // r14
void *v12; // [rsp+0h] [rbp-D8h]
void *v13[2]; // [rsp+8h] [rbp-D0h] BYREF
_QWORD v14[2]; // [rsp+18h] [rbp-C0h] BYREF
void *v15; // [rsp+28h] [rbp-B0h] BYREF
long long v16; // [rsp+30h] [rbp-A8h]
_QWORD v17[2]; // [rsp+38h] [rbp-A0h] BYREF
int v18[4]; // [rsp+48h] [rbp-90h] BYREF
long long v19; // [rsp+58h] [rbp-80h] BYREF
int v20[4]; // [rsp+68h] [rbp-70h] BYREF
long long v21; // [rsp+78h] [rbp-60h] BYREF
char *v22; // [rsp+88h] [rbp-50h] BYREF
long long v23; // [rsp+98h] [rbp-40h] BYREF
v13[0] = v14;
std::string::_M_construct<char const*>(v13, "parse_error", (long long)"");
nlohmann::json_abi_v3_11_2::detail::exception::name((long long)v20, (long long)v13, a2);
nlohmann::json_abi_v3_11_2::detail::parse_error::position_string[abi:cxx11](
(int)v18,
(int)a3,
v6,
v7,
v8,
v9,
v12,
(int)v13[0],
(long long)v13[1],
v14[0],
(void *)v14[1],
(int)v15,
v16);
v15 = v17;
v16 = 0LL;
LOBYTE(v17[0]) = 0;
nlohmann::json_abi_v3_11_2::detail::concat<std::string,std::string,char const(&)[12],std::string,char const(&)[3],std::string,std::string const&>(
(unsigned int)&v22,
(unsigned int)v20,
(unsigned int)"parse error",
(unsigned int)v18,
(unsigned int)": ",
(unsigned int)&v15,
a4);
if ( v15 != v17 )
operator delete(v15, v17[0] + 1LL);
if ( *(long long **)v18 != &v19 )
operator delete(*(void **)v18, v19 + 1);
if ( *(long long **)v20 != &v21 )
operator delete(*(void **)v20, v21 + 1);
if ( v13[0] != v14 )
operator delete(v13[0], v14[0] + 1LL);
v10 = *a3;
nlohmann::json_abi_v3_11_2::detail::exception::exception(this, a2, v22);
*(_QWORD *)this = off_F5FE8;
*((_QWORD *)this + 4) = v10;
if ( v22 != (char *)&v23 )
operator delete(v22, v23 + 1);
return this;
}
| |||
23,107 | nlohmann::json_abi_v3_11_2::detail::parse_error nlohmann::json_abi_v3_11_2::detail::parse_error::create<std::nullptr_t, 0>(int, nlohmann::json_abi_v3_11_2::detail::position_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t) | 7CodeWizard[P]stablediffusion/thirdparty/json.hpp | static parse_error create(int id_, const position_t& pos, const std::string& what_arg, BasicJsonContext context)
{
std::string w = concat(exception::name("parse_error", id_), "parse error",
position_string(pos), ": ", exception::diagnostics(context), what_arg);
return {id_, pos.chars_read_total, w.c_str()};
} | O2 | cpp | nlohmann::json_abi_v3_11_2::detail::parse_error nlohmann::json_abi_v3_11_2::detail::parse_error::create<std::nullptr_t, 0>(int, nlohmann::json_abi_v3_11_2::detail::position_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xb8, %rsp
movq %rcx, %r15
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x4f74a(%rip), %rsi # 0x9f03f
leaq 0x58(%rsp), %rdi
leaq 0x17(%rsp), %rdx
callq 0x19f24
leaq 0x78(%rsp), %rdi
leaq 0x58(%rsp), %rsi
movl %ebp, %edx
callq 0x4bc2a
leaq 0x38(%rsp), %rdi
movq %r14, %rsi
callq 0x53024
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0x4e236
movq %r15, (%rsp)
leaq 0x4f712(%rip), %rdx # 0x9f04b
leaq 0x48b5c(%rip), %r8 # 0x9849c
leaq 0x98(%rsp), %rdi
leaq 0x78(%rsp), %rsi
leaq 0x38(%rsp), %rcx
leaq 0x18(%rsp), %r9
callq 0x52f8d
leaq 0x18(%rsp), %rdi
callq 0xac60
leaq 0x38(%rsp), %rdi
callq 0xac60
leaq 0x78(%rsp), %rdi
callq 0xac60
leaq 0x58(%rsp), %rdi
callq 0xac60
movq (%r14), %rdx
movq 0x98(%rsp), %rcx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x530b4
leaq 0x98(%rsp), %rdi
callq 0xac60
movq %rbx, %rax
addq $0xb8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
jmp 0x4f9f9
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0xac60
jmp 0x4f9d6
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0xac60
jmp 0x4f9e5
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0xac60
jmp 0x4f9f4
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0xac60
movq %rbx, %rdi
callq 0xaab0
movq %rax, %rbx
jmp 0x4f9fe
nop
| _ZN8nlohmann16json_abi_v3_11_26detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_:
push rbp
push r15
push r14
push rbx
sub rsp, 0B8h
mov r15, rcx
mov r14, rdx
mov ebp, esi
mov rbx, rdi
lea rsi, aParseError; "parse_error"
lea rdi, [rsp+0D8h+var_80]
lea rdx, [rsp+0D8h+var_C1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdi, [rsp+0D8h+var_60]
lea rsi, [rsp+0D8h+var_80]
mov edx, ebp
call _ZN8nlohmann16json_abi_v3_11_26detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_2::detail::exception::name(std::string const&,int)
lea rdi, [rsp+0D8h+var_A0]
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_26detail11parse_error15position_stringB5cxx11ERKNS1_10position_tE; nlohmann::json_abi_v3_11_2::detail::parse_error::position_string(nlohmann::json_abi_v3_11_2::detail::position_t const&)
lea rdi, [rsp+0D8h+var_C0]
xor esi, esi
call _ZN8nlohmann16json_abi_v3_11_26detail9exception11diagnosticsB5cxx11EDn; nlohmann::json_abi_v3_11_2::detail::exception::diagnostics(decltype(nullptr))
mov [rsp+0D8h+var_D8], r15
lea rdx, aParseError_0; "parse error"
lea r8, aRng_0+3; ": "
lea rdi, [rsp+0D8h+var_40]
lea rsi, [rsp+0D8h+var_60]
lea rcx, [rsp+0D8h+var_A0]
lea r9, [rsp+0D8h+var_C0]
call _ZN8nlohmann16json_abi_v3_11_26detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS8_RA12_KcS8_RA3_S9_S8_RKS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_2::detail::concat<std::string,std::string,char const(&)[12],std::string,char const(&)[3],std::string,std::string const&>(std::string,char const(&)[12],std::string,char const(&)[3],std::string,std::string const&)
lea rdi, [rsp+0D8h+var_C0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0D8h+var_A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0D8h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0D8h+var_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdx, [r14]; unsigned __int64
mov rcx, [rsp+0D8h+var_40]; char *
mov rdi, rbx; this
mov esi, ebp; int
call _ZN8nlohmann16json_abi_v3_11_26detail11parse_errorC2EimPKc; nlohmann::json_abi_v3_11_2::detail::parse_error::parse_error(int,ulong,char const*)
lea rdi, [rsp+0D8h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, rbx
add rsp, 0B8h
pop rbx
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_90]
jmp short loc_4F9F9
mov rbx, rax
lea rdi, [rsp+arg_10]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_4F9D6
mov rbx, rax
loc_4F9D6:
lea rdi, [rsp+arg_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_4F9E5
mov rbx, rax
loc_4F9E5:
lea rdi, [rsp+arg_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_4F9F4
mov rbx, rax
loc_4F9F4:
lea rdi, [rsp+arg_50]; void *
loc_4F9F9:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_4F9FE:
mov rdi, rbx
call __Unwind_Resume
mov rbx, rax
jmp short loc_4F9FE
| nlohmann::json_abi_v3_11_2::detail::parse_error * ZN8nlohmann16json_abi_v3_11_26detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_(
nlohmann::json_abi_v3_11_2::detail::parse_error *this,
int a2,
unsigned long long *a3,
long long a4)
{
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
_QWORD v11[4]; // [rsp+18h] [rbp-C0h] BYREF
_BYTE v12[32]; // [rsp+38h] [rbp-A0h] BYREF
_QWORD v13[4]; // [rsp+58h] [rbp-80h] BYREF
_BYTE v14[32]; // [rsp+78h] [rbp-60h] BYREF
char *v15[8]; // [rsp+98h] [rbp-40h] BYREF
std::string::basic_string<std::allocator<char>>(v13, (long long)"parse_error");
nlohmann::json_abi_v3_11_2::detail::exception::name((long long)v14, (long long)v13, a2);
nlohmann::json_abi_v3_11_2::detail::parse_error::position_string[abi:cxx11](
(unsigned int)v12,
(_DWORD)a3,
v6,
v7,
v8,
v9);
nlohmann::json_abi_v3_11_2::detail::exception::diagnostics[abi:cxx11](v11);
nlohmann::json_abi_v3_11_2::detail::concat<std::string,std::string,char const(&)[12],std::string,char const(&)[3],std::string,std::string const&>(
(unsigned int)v15,
(unsigned int)v14,
(unsigned int)"parse error",
(unsigned int)v12,
(unsigned int)": ",
(unsigned int)v11,
a4);
std::string::~string(v11);
std::string::~string(v12);
std::string::~string(v14);
std::string::~string(v13);
nlohmann::json_abi_v3_11_2::detail::parse_error::parse_error(this, a2, *a3, v15[0]);
std::string::~string(v15);
return this;
}
| _ZN8nlohmann16json_abi_v3_11_26detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xb8
MOV R15,RCX
MOV R14,RDX
MOV EBP,ESI
MOV RBX,RDI
LAB_0014f8ee:
LEA RSI,[0x19f03f]
LEA RDI,[RSP + 0x58]
LEA RDX,[RSP + 0x17]
CALL 0x00119f24
LAB_0014f904:
LEA RDI,[RSP + 0x78]
LEA RSI,[RSP + 0x58]
MOV EDX,EBP
CALL 0x0014bc2a
LAB_0014f915:
LEA RDI,[RSP + 0x38]
MOV RSI,R14
CALL 0x00153024
LAB_0014f922:
LEA RDI,[RSP + 0x18]
XOR ESI,ESI
CALL 0x0014e236
LAB_0014f92e:
MOV qword ptr [RSP],R15
LEA RDX,[0x19f04b]
LEA R8,[0x19849c]
LEA RDI,[RSP + 0x98]
LEA RSI,[RSP + 0x78]
LEA RCX,[RSP + 0x38]
LEA R9,[RSP + 0x18]
CALL 0x00152f8d
LEA RDI,[RSP + 0x18]
CALL 0x0010ac60
LEA RDI,[RSP + 0x38]
CALL 0x0010ac60
LEA RDI,[RSP + 0x78]
CALL 0x0010ac60
LEA RDI,[RSP + 0x58]
CALL 0x0010ac60
MOV RDX,qword ptr [R14]
MOV RCX,qword ptr [RSP + 0x98]
LAB_0014f98f:
MOV RDI,RBX
MOV ESI,EBP
CALL 0x001530b4
LAB_0014f999:
LEA RDI,[RSP + 0x98]
CALL 0x0010ac60
MOV RAX,RBX
ADD RSP,0xb8
POP RBX
POP R14
POP R15
POP RBP
RET
|
parse_error *
_ZN8nlohmann16json_abi_v3_11_26detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_
(parse_error *param_1,int param_2,position_t *param_3,string *param_4)
{
allocator local_c1;
string local_c0 [32];
parse_error local_a0 [32];
string local_80 [32];
exception local_60 [32];
char *local_40 [4];
/* try { // try from 0014f8ee to 0014f903 has its CatchHandler @ 0014fa06 */
std::__cxx11::string::string<std::allocator<char>>(local_80,"parse_error",&local_c1);
/* try { // try from 0014f904 to 0014f914 has its CatchHandler @ 0014f9f1 */
nlohmann::json_abi_v3_11_2::detail::exception::name(local_60,local_80,param_2);
/* try { // try from 0014f915 to 0014f921 has its CatchHandler @ 0014f9e2 */
nlohmann::json_abi_v3_11_2::detail::parse_error::position_string_abi_cxx11_(local_a0,param_3);
/* try { // try from 0014f922 to 0014f92d has its CatchHandler @ 0014f9d3 */
nlohmann::json_abi_v3_11_2::detail::exception::diagnostics_abi_cxx11_
((_func_decltype_nullptr *)local_c0);
/* try { // try from 0014f92e to 0014f95b has its CatchHandler @ 0014f9c4 */
nlohmann::json_abi_v3_11_2::detail::
concat<std::__cxx11::string,std::__cxx11::string,char_const(&)[12],std::__cxx11::string,char_const(&)[3],std::__cxx11::string,std::__cxx11::string_const&>
((detail *)local_40,(string *)local_60,"parse error",(string *)local_a0,": ",local_c0,
param_4);
std::__cxx11::string::~string(local_c0);
std::__cxx11::string::~string((string *)local_a0);
std::__cxx11::string::~string((string *)local_60);
std::__cxx11::string::~string(local_80);
/* try { // try from 0014f98f to 0014f998 has its CatchHandler @ 0014f9b7 */
nlohmann::json_abi_v3_11_2::detail::parse_error::parse_error
(param_1,param_2,*(ulong *)param_3,local_40[0]);
std::__cxx11::string::~string((string *)local_40);
return param_1;
}
| |
23,108 | pagecache_wait_lock | eloqsql/storage/maria/ma_pagecache.c | static my_bool pagecache_wait_lock(PAGECACHE *pagecache,
PAGECACHE_BLOCK_LINK *block,
PAGECACHE_FILE file,
pgcache_page_no_t pageno,
uint lock_type)
{
/* Lock failed we will wait */
struct st_my_thread_var *thread= my_thread_var;
DBUG_ENTER("pagecache_wait_lock");
DBUG_PRINT("info", ("fail to lock, waiting... %p", block));
thread->lock_type= lock_type;
wqueue_add_to_queue(&block->wqueue[COND_FOR_WRLOCK], thread);
dec_counter_for_resize_op(pagecache);
do
{
DBUG_PRINT("wait",
("suspend thread %s %ld", thread->name, (ulong) thread->id));
pagecache_pthread_cond_wait(&thread->suspend,
&pagecache->cache_lock);
}
while(thread->next);
inc_counter_for_resize_op(pagecache);
PCBLOCK_INFO(block);
if ((block->status & (PCBLOCK_REASSIGNED | PCBLOCK_IN_SWITCH)) ||
!block->hash_link ||
file.file != block->hash_link->file.file ||
pageno != block->hash_link->pageno)
{
DBUG_PRINT("info", ("the block %p changed => need retry "
"status: %x files %d != %d or pages %lu != %lu",
block, block->status, file.file,
block->hash_link ? block->hash_link->file.file : -1,
(ulong) pageno,
(ulong) (block->hash_link ? block->hash_link->pageno : 0)));
DBUG_RETURN(1);
}
DBUG_RETURN(0);
} | O3 | c | pagecache_wait_lock:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %ebx
movq %rcx, -0x38(%rbp)
movl %edx, -0x2c(%rbp)
movq %rsi, %r15
movq %rdi, %r12
callq 0xa1ac2
movq %rax, %r13
movl %ebx, 0xe4(%rax)
leaq 0x58(%r15), %rdi
movq %rax, %rsi
callq 0xa6603
decq 0x68(%r12)
jne 0x3daa7
movq 0x110(%r12), %rax
testq %rax, %rax
je 0x3daa7
movq 0x88(%rax), %rbx
movq 0x38(%rbx), %rdi
addq $0x8, %rbx
testq %rdi, %rdi
jne 0x3db28
movq %rbx, %rdi
callq 0x295b0
movq %r13, %rbx
addq $0x8, %rbx
leaq 0xc8(%r12), %r14
cmpq $0x0, 0x38(%r13)
jne 0x3dad4
movq %rbx, %rdi
movq %r14, %rsi
callq 0x29420
cmpq $0x0, 0x88(%r13)
jne 0x3dab6
jmp 0x3daed
movq %rbx, %rdi
movq %r14, %rsi
leaq 0x9c829(%rip), %rdx # 0xda30a
movl $0x982, %ecx # imm = 0x982
callq 0x2ee80
jmp 0x3dac8
incq 0x68(%r12)
movb $0x1, %al
testb $0xc, 0x74(%r15)
je 0x3db0a
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x20(%r15), %rcx
testq %rcx, %rcx
je 0x3dafb
movl -0x2c(%rbp), %edx
cmpl %edx, 0x28(%rcx)
jne 0x3dafb
movq -0x38(%rbp), %rax
cmpq %rax, 0x60(%rcx)
setne %al
jmp 0x3dafb
leaq 0x3484e1(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x170(%rax)
jmp 0x3da9f
| pagecache_wait_lock:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov ebx, r8d
mov [rbp+var_38], rcx
mov [rbp+var_2C], edx
mov r15, rsi
mov r12, rdi
call _my_thread_var
mov r13, rax
mov [rax+0E4h], ebx
lea rdi, [r15+58h]
mov rsi, rax
call wqueue_add_to_queue
dec qword ptr [r12+68h]
jnz short loc_3DAA7
mov rax, [r12+110h]
test rax, rax
jz short loc_3DAA7
mov rbx, [rax+88h]
mov rdi, [rbx+38h]
add rbx, 8
test rdi, rdi
jnz loc_3DB28
loc_3DA9F:
mov rdi, rbx
call _pthread_cond_signal
loc_3DAA7:
mov rbx, r13
add rbx, 8
lea r14, [r12+0C8h]
loc_3DAB6:
cmp qword ptr [r13+38h], 0
jnz short loc_3DAD4
mov rdi, rbx
mov rsi, r14
call _pthread_cond_wait
loc_3DAC8:
cmp qword ptr [r13+88h], 0
jnz short loc_3DAB6
jmp short loc_3DAED
loc_3DAD4:
mov rdi, rbx
mov rsi, r14
lea rdx, aWorkspaceLlm4b_25; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 982h
call psi_cond_wait
jmp short loc_3DAC8
loc_3DAED:
inc qword ptr [r12+68h]
mov al, 1
test byte ptr [r15+74h], 0Ch
jz short loc_3DB0A
loc_3DAFB:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3DB0A:
mov rcx, [r15+20h]
test rcx, rcx
jz short loc_3DAFB
mov edx, [rbp+var_2C]
cmp [rcx+28h], edx
jnz short loc_3DAFB
mov rax, [rbp+var_38]
cmp [rcx+60h], rax
setnz al
jmp short loc_3DAFB
loc_3DB28:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+170h]
jmp loc_3DA9F
| bool pagecache_wait_lock(long long a1, long long a2, int a3, long long a4, int a5)
{
long long v7; // r13
long long v9; // rax
long long v10; // rbx
long long v11; // rdi
long long v12; // rbx
bool result; // al
long long v14; // rcx
v7 = my_thread_var(a1);
*(_DWORD *)(v7 + 228) = a5;
wqueue_add_to_queue(a2 + 88, v7);
if ( (*(_QWORD *)(a1 + 104))-- == 1LL )
{
v9 = *(_QWORD *)(a1 + 272);
if ( v9 )
{
v10 = *(_QWORD *)(v9 + 136);
v11 = *(_QWORD *)(v10 + 56);
v12 = v10 + 8;
if ( v11 )
PSI_server[46]();
pthread_cond_signal(v12);
}
}
do
{
if ( *(_QWORD *)(v7 + 56) )
psi_cond_wait(
v7 + 8,
a1 + 200,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",
0x982u);
else
pthread_cond_wait(v7 + 8, a1 + 200);
}
while ( *(_QWORD *)(v7 + 136) );
++*(_QWORD *)(a1 + 104);
result = 1;
if ( (*(_BYTE *)(a2 + 116) & 0xC) == 0 )
{
v14 = *(_QWORD *)(a2 + 32);
if ( v14 )
{
if ( *(_DWORD *)(v14 + 40) == a3 )
return *(_QWORD *)(v14 + 96) != a4;
}
}
return result;
}
| pagecache_wait_lock:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV EBX,R8D
MOV qword ptr [RBP + -0x38],RCX
MOV dword ptr [RBP + -0x2c],EDX
MOV R15,RSI
MOV R12,RDI
CALL 0x001a1ac2
MOV R13,RAX
MOV dword ptr [RAX + 0xe4],EBX
LEA RDI,[R15 + 0x58]
MOV RSI,RAX
CALL 0x001a6603
DEC qword ptr [R12 + 0x68]
JNZ 0x0013daa7
MOV RAX,qword ptr [R12 + 0x110]
TEST RAX,RAX
JZ 0x0013daa7
MOV RBX,qword ptr [RAX + 0x88]
MOV RDI,qword ptr [RBX + 0x38]
ADD RBX,0x8
TEST RDI,RDI
JNZ 0x0013db28
LAB_0013da9f:
MOV RDI,RBX
CALL 0x001295b0
LAB_0013daa7:
MOV RBX,R13
ADD RBX,0x8
LEA R14,[R12 + 0xc8]
LAB_0013dab6:
CMP qword ptr [R13 + 0x38],0x0
JNZ 0x0013dad4
MOV RDI,RBX
MOV RSI,R14
CALL 0x00129420
LAB_0013dac8:
CMP qword ptr [R13 + 0x88],0x0
JNZ 0x0013dab6
JMP 0x0013daed
LAB_0013dad4:
MOV RDI,RBX
MOV RSI,R14
LEA RDX,[0x1da30a]
MOV ECX,0x982
CALL 0x0012ee80
JMP 0x0013dac8
LAB_0013daed:
INC qword ptr [R12 + 0x68]
MOV AL,0x1
TEST byte ptr [R15 + 0x74],0xc
JZ 0x0013db0a
LAB_0013dafb:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013db0a:
MOV RCX,qword ptr [R15 + 0x20]
TEST RCX,RCX
JZ 0x0013dafb
MOV EDX,dword ptr [RBP + -0x2c]
CMP dword ptr [RCX + 0x28],EDX
JNZ 0x0013dafb
MOV RAX,qword ptr [RBP + -0x38]
CMP qword ptr [RCX + 0x60],RAX
SETNZ AL
JMP 0x0013dafb
LAB_0013db28:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x170]
JMP 0x0013da9f
|
bool pagecache_wait_lock(long param_1,long param_2,int param_3,long param_4,int4 param_5)
{
long *plVar1;
long lVar2;
long lVar3;
bool bVar4;
lVar3 = _my_thread_var();
*(int4 *)(lVar3 + 0xe4) = param_5;
wqueue_add_to_queue(param_2 + 0x58,lVar3);
plVar1 = (long *)(param_1 + 0x68);
*plVar1 = *plVar1 + -1;
if ((*plVar1 == 0) && (*(long *)(param_1 + 0x110) != 0)) {
lVar2 = *(long *)(*(long *)(param_1 + 0x110) + 0x88);
if (*(long *)(lVar2 + 0x38) != 0) {
(**(code **)(PSI_server + 0x170))();
}
pthread_cond_signal((pthread_cond_t *)(lVar2 + 8));
}
do {
if (*(long *)(lVar3 + 0x38) == 0) {
pthread_cond_wait((pthread_cond_t *)(lVar3 + 8),(pthread_mutex_t *)(param_1 + 200));
}
else {
psi_cond_wait((pthread_cond_t *)(lVar3 + 8),(pthread_mutex_t *)(param_1 + 200),
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",0x982);
}
} while (*(long *)(lVar3 + 0x88) != 0);
*(long *)(param_1 + 0x68) = *(long *)(param_1 + 0x68) + 1;
bVar4 = true;
if ((((*(byte *)(param_2 + 0x74) & 0xc) == 0) && (lVar3 = *(long *)(param_2 + 0x20), lVar3 != 0))
&& (*(int *)(lVar3 + 0x28) == param_3)) {
bVar4 = *(long *)(lVar3 + 0x60) != param_4;
}
return bVar4;
}
| |
23,109 | js_std_init | bluesky950520[P]quickjs/quickjs-libc.c | static int js_std_init(JSContext *ctx, JSModuleDef *m)
{
JSValue proto;
JSRuntime *rt = JS_GetRuntime(ctx);
JSThreadState *ts = js_get_thread_state(rt);
/* FILE class */
/* the class ID is created once */
JS_NewClassID(rt, &ts->std_file_class_id);
/* the class is created once per runtime */
JS_NewClass(rt, ts->std_file_class_id, &js_std_file_class);
proto = JS_NewObject(ctx);
JS_SetPropertyFunctionList(ctx, proto, js_std_file_proto_funcs,
countof(js_std_file_proto_funcs));
JS_SetClassProto(ctx, ts->std_file_class_id, proto);
JS_SetModuleExportList(ctx, m, js_std_funcs,
countof(js_std_funcs));
JS_SetModuleExport(ctx, m, "in", js_new_std_file(ctx, stdin, FALSE));
JS_SetModuleExport(ctx, m, "out", js_new_std_file(ctx, stdout, FALSE));
JS_SetModuleExport(ctx, m, "err", js_new_std_file(ctx, stderr, FALSE));
return 0;
} | O0 | c | js_std_init:
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x26c40
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rdi
callq 0x10310
movq %rax, 0x78(%rsp)
movq 0x80(%rsp), %rdi
movq 0x78(%rsp), %rsi
addq $0x78, %rsi
callq 0x27ef0
movq 0x80(%rsp), %rdi
movq 0x78(%rsp), %rax
movl 0x78(%rax), %esi
leaq 0x124f45(%rip), %rdx # 0x1344e0
callq 0x27fc0
movq 0xa0(%rsp), %rdi
callq 0x292b0
movq %rax, 0x68(%rsp)
movq %rdx, 0x70(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0xa0(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdx
leaq 0x11e0a0(%rip), %rcx # 0x12d690
movl $0x11, %r8d
callq 0x4b840
movq 0xa0(%rsp), %rdi
movq 0x78(%rsp), %rax
movl 0x78(%rax), %esi
movq 0x88(%rsp), %rdx
movq 0x90(%rsp), %rcx
callq 0x26730
movq 0xa0(%rsp), %rdi
movq 0x98(%rsp), %rsi
leaq 0x11e279(%rip), %rdx # 0x12d8b0
movl $0x16, %ecx
callq 0x4c0c0
movq 0xa0(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0xa0(%rsp), %rdi
movq 0x12495e(%rip), %rax # 0x133fc8
movq (%rax), %rsi
xorl %edx, %edx
callq 0x11400
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rax, 0x58(%rsp)
movq %rdx, 0x60(%rsp)
movq 0x58(%rsp), %rcx
movq 0x60(%rsp), %r8
leaq 0xfd1fb(%rip), %rdx # 0x10c894
callq 0x48700
movq 0xa0(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0xa0(%rsp), %rdi
movq 0x1248f9(%rip), %rax # 0x133fc0
movq (%rax), %rsi
xorl %edx, %edx
callq 0x11400
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %rax, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
movq 0x48(%rsp), %rcx
movq 0x50(%rsp), %r8
leaq 0xf937c(%rip), %rdx # 0x108a72
callq 0x48700
movq 0xa0(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0xa0(%rsp), %rdi
movq 0x1248cc(%rip), %rax # 0x133ff0
movq (%rax), %rsi
xorl %edx, %edx
callq 0x11400
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x38(%rsp), %rcx
movq 0x40(%rsp), %r8
leaq 0xf9326(%rip), %rdx # 0x108a79
callq 0x48700
xorl %eax, %eax
addq $0xa8, %rsp
retq
nopw %cs:(%rax,%rax)
| js_std_init:
sub rsp, 0A8h
mov [rsp+0A8h+var_8], rdi
mov [rsp+0A8h+var_10], rsi
mov rdi, [rsp+0A8h+var_8]
call JS_GetRuntime
mov [rsp+0A8h+var_28], rax
mov rdi, [rsp+0A8h+var_28]
call js_get_thread_state
mov [rsp+0A8h+var_30], rax
mov rdi, [rsp+0A8h+var_28]
mov rsi, [rsp+0A8h+var_30]
add rsi, 78h ; 'x'
call JS_NewClassID
mov rdi, [rsp+0A8h+var_28]
mov rax, [rsp+0A8h+var_30]
mov esi, [rax+78h]
lea rdx, js_std_file_class
call JS_NewClass
mov rdi, [rsp+0A8h+var_8]
call JS_NewObject
mov [rsp+0A8h+var_40], rax
mov [rsp+0A8h+var_38], rdx
mov rax, [rsp+0A8h+var_40]
mov [rsp+0A8h+var_20], rax
mov rax, [rsp+0A8h+var_38]
mov [rsp+0A8h+var_18], rax
mov rdi, [rsp+0A8h+var_8]
mov rsi, [rsp+0A8h+var_20]
mov rdx, [rsp+0A8h+var_18]
lea rcx, js_std_file_proto_funcs
mov r8d, 11h
call JS_SetPropertyFunctionList
mov rdi, [rsp+0A8h+var_8]
mov rax, [rsp+0A8h+var_30]
mov esi, [rax+78h]
mov rdx, [rsp+0A8h+var_20]
mov rcx, [rsp+0A8h+var_18]
call JS_SetClassProto
mov rdi, [rsp+0A8h+var_8]
mov rsi, [rsp+0A8h+var_10]
lea rdx, js_std_funcs
mov ecx, 16h
call JS_SetModuleExportList
mov rax, [rsp+0A8h+var_8]
mov [rsp+0A8h+var_A0], rax
mov rax, [rsp+0A8h+var_10]
mov [rsp+0A8h+var_98], rax
mov rdi, [rsp+0A8h+var_8]
mov rax, cs:stdin_ptr
mov rsi, [rax]
xor edx, edx
call js_new_std_file
mov rdi, [rsp+0A8h+var_A0]
mov rsi, [rsp+0A8h+var_98]
mov [rsp+0A8h+var_50], rax
mov [rsp+0A8h+var_48], rdx
mov rcx, [rsp+0A8h+var_50]
mov r8, [rsp+0A8h+var_48]
lea rdx, aCircularProtot+16h; "in"
call JS_SetModuleExport
mov rax, [rsp+0A8h+var_8]
mov [rsp+0A8h+var_90], rax
mov rax, [rsp+0A8h+var_10]
mov [rsp+0A8h+var_88], rax
mov rdi, [rsp+0A8h+var_8]
mov rax, cs:stdout_ptr
mov rsi, [rax]
xor edx, edx
call js_new_std_file
mov rdi, [rsp+0A8h+var_90]
mov rsi, [rsp+0A8h+var_88]
mov [rsp+0A8h+var_60], rax
mov [rsp+0A8h+var_58], rdx
mov rcx, [rsp+0A8h+var_60]
mov r8, [rsp+0A8h+var_58]
lea rdx, aStdout_0+3; "out"
call JS_SetModuleExport
mov rax, [rsp+0A8h+var_8]
mov [rsp+0A8h+var_80], rax
mov rax, [rsp+0A8h+var_10]
mov [rsp+0A8h+var_78], rax
mov rdi, [rsp+0A8h+var_8]
mov rax, cs:stderr_ptr
mov rsi, [rax]
xor edx, edx
call js_new_std_file
mov rdi, [rsp+0A8h+var_80]
mov rsi, [rsp+0A8h+var_78]
mov [rsp+0A8h+var_70], rax
mov [rsp+0A8h+var_68], rdx
mov rcx, [rsp+0A8h+var_70]
mov r8, [rsp+0A8h+var_68]
lea rdx, aStderr_0+3; "err"
call JS_SetModuleExport
xor eax, eax
add rsp, 0A8h
retn
| long long js_std_init(long long a1, long long a2)
{
long long v2; // rdx
long long v3; // rdx
long long v4; // rdx
long long v5; // rdx
long long v7; // [rsp+38h] [rbp-70h]
long long v8; // [rsp+48h] [rbp-60h]
long long v9; // [rsp+58h] [rbp-50h]
long long v10; // [rsp+68h] [rbp-40h]
long long thread_state; // [rsp+78h] [rbp-30h]
long long Runtime; // [rsp+80h] [rbp-28h]
long long v13; // [rsp+90h] [rbp-18h]
Runtime = JS_GetRuntime(a1);
thread_state = js_get_thread_state(Runtime);
JS_NewClassID(Runtime, thread_state + 120);
JS_NewClass(Runtime, *(unsigned int *)(thread_state + 120), &js_std_file_class);
v10 = JS_NewObject(a1);
v13 = v2;
JS_SetPropertyFunctionList(a1, v10, v2, &js_std_file_proto_funcs, 17LL);
JS_SetClassProto(a1, *(unsigned int *)(thread_state + 120), v10, v13);
JS_SetModuleExportList(a1, a2, &js_std_funcs, 22LL);
v9 = js_new_std_file(a1, stdin, 0LL);
JS_SetModuleExport(a1, a2, "in", v9, v3);
v8 = js_new_std_file(a1, stdout, 0LL);
JS_SetModuleExport(a1, a2, "out", v8, v4);
v7 = js_new_std_file(a1, stderr, 0LL);
JS_SetModuleExport(a1, a2, "err", v7, v5);
return 0LL;
}
| js_std_init:
SUB RSP,0xa8
MOV qword ptr [RSP + 0xa0],RDI
MOV qword ptr [RSP + 0x98],RSI
MOV RDI,qword ptr [RSP + 0xa0]
CALL 0x00126c40
MOV qword ptr [RSP + 0x80],RAX
MOV RDI,qword ptr [RSP + 0x80]
CALL 0x00110310
MOV qword ptr [RSP + 0x78],RAX
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x78]
ADD RSI,0x78
CALL 0x00127ef0
MOV RDI,qword ptr [RSP + 0x80]
MOV RAX,qword ptr [RSP + 0x78]
MOV ESI,dword ptr [RAX + 0x78]
LEA RDX,[0x2344e0]
CALL 0x00127fc0
MOV RDI,qword ptr [RSP + 0xa0]
CALL 0x001292b0
MOV qword ptr [RSP + 0x68],RAX
MOV qword ptr [RSP + 0x70],RDX
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x88],RAX
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x90],RAX
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0x88]
MOV RDX,qword ptr [RSP + 0x90]
LEA RCX,[0x22d690]
MOV R8D,0x11
CALL 0x0014b840
MOV RDI,qword ptr [RSP + 0xa0]
MOV RAX,qword ptr [RSP + 0x78]
MOV ESI,dword ptr [RAX + 0x78]
MOV RDX,qword ptr [RSP + 0x88]
MOV RCX,qword ptr [RSP + 0x90]
CALL 0x00126730
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0x98]
LEA RDX,[0x22d8b0]
MOV ECX,0x16
CALL 0x0014c0c0
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0xa0]
MOV RAX,qword ptr [0x00233fc8]
MOV RSI,qword ptr [RAX]
XOR EDX,EDX
CALL 0x00111400
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x58],RAX
MOV qword ptr [RSP + 0x60],RDX
MOV RCX,qword ptr [RSP + 0x58]
MOV R8,qword ptr [RSP + 0x60]
LEA RDX,[0x20c894]
CALL 0x00148700
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0xa0]
MOV RAX,qword ptr [0x00233fc0]
MOV RSI,qword ptr [RAX]
XOR EDX,EDX
CALL 0x00111400
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x48],RAX
MOV qword ptr [RSP + 0x50],RDX
MOV RCX,qword ptr [RSP + 0x48]
MOV R8,qword ptr [RSP + 0x50]
LEA RDX,[0x208a72]
CALL 0x00148700
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x30],RAX
MOV RDI,qword ptr [RSP + 0xa0]
MOV RAX,qword ptr [0x00233ff0]
MOV RSI,qword ptr [RAX]
XOR EDX,EDX
CALL 0x00111400
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RDX
MOV RCX,qword ptr [RSP + 0x38]
MOV R8,qword ptr [RSP + 0x40]
LEA RDX,[0x208a79]
CALL 0x00148700
XOR EAX,EAX
ADD RSP,0xa8
RET
|
int8 js_std_init(int8 param_1,int8 param_2)
{
int8 uVar1;
long lVar2;
int1 auVar3 [16];
uVar1 = JS_GetRuntime(param_1);
lVar2 = js_get_thread_state(uVar1);
JS_NewClassID(uVar1,lVar2 + 0x78);
JS_NewClass(uVar1,*(int4 *)(lVar2 + 0x78),js_std_file_class);
auVar3 = JS_NewObject(param_1);
JS_SetPropertyFunctionList(param_1,auVar3._0_8_,auVar3._8_8_,js_std_file_proto_funcs,0x11);
JS_SetClassProto(param_1,*(int4 *)(lVar2 + 0x78),auVar3._0_8_,auVar3._8_8_);
JS_SetModuleExportList(param_1,param_2,js_std_funcs,0x16);
auVar3 = js_new_std_file(param_1,*(int8 *)PTR_stdin_00233fc8,0);
JS_SetModuleExport(param_1,param_2,"in",auVar3._0_8_,auVar3._8_8_);
auVar3 = js_new_std_file(param_1,*(int8 *)PTR_stdout_00233fc0,0);
JS_SetModuleExport(param_1,param_2,"out",auVar3._0_8_,auVar3._8_8_);
auVar3 = js_new_std_file(param_1,*(int8 *)PTR_stderr_00233ff0,0);
JS_SetModuleExport(param_1,param_2,"err",auVar3._0_8_,auVar3._8_8_);
return 0;
}
| |
23,110 | js_std_init | bluesky950520[P]quickjs/quickjs-libc.c | static int js_std_init(JSContext *ctx, JSModuleDef *m)
{
JSValue proto;
JSRuntime *rt = JS_GetRuntime(ctx);
JSThreadState *ts = js_get_thread_state(rt);
/* FILE class */
/* the class ID is created once */
JS_NewClassID(rt, &ts->std_file_class_id);
/* the class is created once per runtime */
JS_NewClass(rt, ts->std_file_class_id, &js_std_file_class);
proto = JS_NewObject(ctx);
JS_SetPropertyFunctionList(ctx, proto, js_std_file_proto_funcs,
countof(js_std_file_proto_funcs));
JS_SetClassProto(ctx, ts->std_file_class_id, proto);
JS_SetModuleExportList(ctx, m, js_std_funcs,
countof(js_std_funcs));
JS_SetModuleExport(ctx, m, "in", js_new_std_file(ctx, stdin, FALSE));
JS_SetModuleExport(ctx, m, "out", js_new_std_file(ctx, stdout, FALSE));
JS_SetModuleExport(ctx, m, "err", js_new_std_file(ctx, stderr, FALSE));
return 0;
} | O3 | c | js_std_init:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x1f8ad
movq %rax, %r15
xorl %edi, %edi
movq %rax, %rsi
xorl %eax, %eax
callq 0x3af34
movq %rax, %r12
leaq 0x78(%rax), %rsi
movq %r15, %rdi
callq 0x20389
movl 0x78(%r12), %esi
leaq 0xb9a66(%rip), %rdx # 0xce4e0
movq %r15, %rdi
callq 0x203c6
movq %r14, %rdi
callq 0x20acf
movq %rax, %r15
movq %rdx, %r13
leaq 0xb2b29(%rip), %rcx # 0xc75c0
movq %r14, %rdi
movq %rax, %rsi
movl $0x11, %r8d
callq 0x3302c
movl 0x78(%r12), %esi
movq %r14, %rdi
movq %r15, %rdx
movq %r13, %rcx
callq 0x1f40e
leaq 0xb2d1e(%rip), %rdx # 0xc77e0
movq %r14, %rdi
movq %rbx, %rsi
movl $0x16, %ecx
callq 0x3343f
movq 0xb94ef(%rip), %rax # 0xcdfc8
movq (%rax), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x15b45
movq %rdx, %r8
leaq 0x8bd78(%rip), %rdx # 0xa0868
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rcx
callq 0x30ddc
movq 0xb94bb(%rip), %rax # 0xcdfc0
movq (%rax), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x15b45
movq %rdx, %r8
leaq 0x88e67(%rip), %rdx # 0x9d983
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rcx
callq 0x30ddc
movq 0xb94bf(%rip), %rax # 0xcdff0
movq (%rax), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x15b45
movq %rdx, %r8
leaq 0x88e42(%rip), %rdx # 0x9d98a
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rcx
callq 0x30ddc
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| js_std_init:
push r15
push r14
push r13
push r12
push rbx
mov rbx, rsi
mov r14, rdi
call JS_GetRuntime
mov r15, rax
xor edi, edi
mov rsi, rax
xor eax, eax
call js_std_cmd
mov r12, rax
lea rsi, [rax+78h]
mov rdi, r15
call JS_NewClassID
mov esi, [r12+78h]
lea rdx, js_std_file_class
mov rdi, r15
call JS_NewClass
mov rdi, r14
call JS_NewObject
mov r15, rax
mov r13, rdx
lea rcx, js_std_file_proto_funcs
mov rdi, r14
mov rsi, rax
mov r8d, 11h
call JS_SetPropertyFunctionList
mov esi, [r12+78h]
mov rdi, r14
mov rdx, r15
mov rcx, r13
call JS_SetClassProto
lea rdx, js_std_funcs
mov rdi, r14
mov rsi, rbx
mov ecx, 16h
call JS_SetModuleExportList
mov rax, cs:stdin_ptr
mov rsi, [rax]
mov rdi, r14
xor edx, edx
call js_new_std_file
mov r8, rdx
lea rdx, aCircularProtot+16h; "in"
mov rdi, r14
mov rsi, rbx
mov rcx, rax
call JS_SetModuleExport
mov rax, cs:stdout_ptr
mov rsi, [rax]
mov rdi, r14
xor edx, edx
call js_new_std_file
mov r8, rdx
lea rdx, aStdout_0+3; "out"
mov rdi, r14
mov rsi, rbx
mov rcx, rax
call JS_SetModuleExport
mov rax, cs:stderr_ptr
mov rsi, [rax]
mov rdi, r14
xor edx, edx
call js_new_std_file
mov r8, rdx
lea rdx, aStderr_0+3; "err"
mov rdi, r14
mov rsi, rbx
mov rcx, rax
call JS_SetModuleExport
xor eax, eax
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| long long js_std_init(long long a1, long long a2)
{
long long Runtime; // r15
int v3; // edx
int v4; // ecx
int v5; // r8d
int v6; // r9d
long long v7; // r12
long long v8; // r15
long long v9; // rdx
long long v10; // r13
long long v11; // rax
long long v12; // rdx
long long v13; // rax
long long v14; // rdx
long long v15; // rax
long long v16; // rdx
Runtime = JS_GetRuntime();
v7 = js_std_cmd(0, Runtime, v3, v4, v5, v6);
JS_NewClassID(Runtime, v7 + 120);
JS_NewClass(Runtime, *(unsigned int *)(v7 + 120), &js_std_file_class);
v8 = JS_NewObject(a1);
v10 = v9;
JS_SetPropertyFunctionList(a1, v8, v9, &js_std_file_proto_funcs, 17LL);
JS_SetClassProto(a1, *(unsigned int *)(v7 + 120), v8, v10);
JS_SetModuleExportList(a1, a2, &js_std_funcs, 22LL);
v11 = js_new_std_file(a1, stdin, 0LL);
JS_SetModuleExport(a1, a2, "in", v11, v12);
v13 = js_new_std_file(a1, stdout, 0LL);
JS_SetModuleExport(a1, a2, "out", v13, v14);
v15 = js_new_std_file(a1, stderr, 0LL);
JS_SetModuleExport(a1, a2, "err", v15, v16);
return 0LL;
}
| js_std_init:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
CALL 0x0011f8ad
MOV R15,RAX
XOR EDI,EDI
MOV RSI,RAX
XOR EAX,EAX
CALL 0x0013af34
MOV R12,RAX
LEA RSI,[RAX + 0x78]
MOV RDI,R15
CALL 0x00120389
MOV ESI,dword ptr [R12 + 0x78]
LEA RDX,[0x1ce4e0]
MOV RDI,R15
CALL 0x001203c6
MOV RDI,R14
CALL 0x00120acf
MOV R15,RAX
MOV R13,RDX
LEA RCX,[0x1c75c0]
MOV RDI,R14
MOV RSI,RAX
MOV R8D,0x11
CALL 0x0013302c
MOV ESI,dword ptr [R12 + 0x78]
MOV RDI,R14
MOV RDX,R15
MOV RCX,R13
CALL 0x0011f40e
LEA RDX,[0x1c77e0]
MOV RDI,R14
MOV RSI,RBX
MOV ECX,0x16
CALL 0x0013343f
MOV RAX,qword ptr [0x001cdfc8]
MOV RSI,qword ptr [RAX]
MOV RDI,R14
XOR EDX,EDX
CALL 0x00115b45
MOV R8,RDX
LEA RDX,[0x1a0868]
MOV RDI,R14
MOV RSI,RBX
MOV RCX,RAX
CALL 0x00130ddc
MOV RAX,qword ptr [0x001cdfc0]
MOV RSI,qword ptr [RAX]
MOV RDI,R14
XOR EDX,EDX
CALL 0x00115b45
MOV R8,RDX
LEA RDX,[0x19d983]
MOV RDI,R14
MOV RSI,RBX
MOV RCX,RAX
CALL 0x00130ddc
MOV RAX,qword ptr [0x001cdff0]
MOV RSI,qword ptr [RAX]
MOV RDI,R14
XOR EDX,EDX
CALL 0x00115b45
MOV R8,RDX
LEA RDX,[0x19d98a]
MOV RDI,R14
MOV RSI,RBX
MOV RCX,RAX
CALL 0x00130ddc
XOR EAX,EAX
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
int8 js_std_init(int8 param_1,int8 param_2)
{
int8 uVar1;
long lVar2;
int1 auVar3 [16];
uVar1 = JS_GetRuntime();
lVar2 = js_std_cmd(0,uVar1);
JS_NewClassID(uVar1,lVar2 + 0x78);
JS_NewClass(uVar1,*(int4 *)(lVar2 + 0x78),js_std_file_class);
auVar3 = JS_NewObject(param_1);
JS_SetPropertyFunctionList(param_1,auVar3._0_8_,auVar3._8_8_,js_std_file_proto_funcs,0x11);
JS_SetClassProto(param_1,*(int4 *)(lVar2 + 0x78),auVar3._0_8_,auVar3._8_8_);
JS_SetModuleExportList(param_1,param_2,js_std_funcs,0x16);
auVar3 = js_new_std_file(param_1,*(int8 *)PTR_stdin_001cdfc8,0);
JS_SetModuleExport(param_1,param_2,"in",auVar3._0_8_,auVar3._8_8_);
auVar3 = js_new_std_file(param_1,*(int8 *)PTR_stdout_001cdfc0,0);
JS_SetModuleExport(param_1,param_2,"out",auVar3._0_8_,auVar3._8_8_);
auVar3 = js_new_std_file(param_1,*(int8 *)PTR_stderr_001cdff0,0);
JS_SetModuleExport(param_1,param_2,"err",auVar3._0_8_,auVar3._8_8_);
return 0;
}
| |
23,111 | std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> string_split<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char) | monkey531[P]llama/common/common.h | std::vector<std::string> string_split<std::string>(const std::string & input, char separator)
{
std::vector<std::string> parts;
size_t begin_pos = 0;
size_t separator_pos = input.find(separator);
while (separator_pos != std::string::npos) {
std::string part = input.substr(begin_pos, separator_pos - begin_pos);
parts.emplace_back(part);
begin_pos = separator_pos + 1;
separator_pos = input.find(separator, begin_pos);
}
parts.emplace_back(input.substr(begin_pos, separator_pos - begin_pos));
return parts;
} | O1 | c | std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> string_split<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
xorl %r15d, %r15d
movq %rsi, %rdi
movl %edx, %esi
xorl %edx, %edx
callq 0x1bd20
cmpq $-0x1, %rax
je 0x522e7
movq %rax, %r12
xorl %r15d, %r15d
leaq 0x8(%rsp), %r13
movsbl %bpl, %ebp
movq %r12, %rcx
subq %r15, %rcx
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1bad0
movq %rbx, %rdi
movq %r13, %rsi
callq 0x59040
movq %r12, %r15
incq %r15
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x1bd20
movq %rax, %r12
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x522e1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1ba60
cmpq $-0x1, %r12
jne 0x52290
movq %r15, %rcx
notq %rcx
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1bad0
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x59086
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x52325
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1ba60
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0x52359
jmp 0x52347
movq %rax, %r14
jmp 0x5236b
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x5236b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1ba60
movq %rbx, %rdi
callq 0x240ba
movq %r14, %rdi
callq 0x1c250
nop
| _ZL12string_splitINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorIT_SaIS7_EERKS5_c:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebp, edx
mov r14, rsi
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
mov qword ptr [rdi+10h], 0
xor r15d, r15d
mov rdi, rsi
mov esi, edx
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
jz short loc_522E7
mov r12, rax
xor r15d, r15d
lea r13, [rsp+58h+var_50]
movsx ebp, bpl
loc_52290:
mov rcx, r12
sub rcx, r15
mov rdi, r13
mov rsi, r14
mov rdx, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rdi, rbx
mov rsi, r13
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJRS5_EEES9_DpOT_; std::vector<std::string>::emplace_back<std::string&>(std::string&)
mov r15, r12
inc r15
mov rdi, r14
mov esi, ebp
mov rdx, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
mov r12, rax
mov rdi, [rsp+58h+var_50]; void *
lea rax, [rsp+58h+var_40]
cmp rdi, rax
jz short loc_522E1
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_522E1:
cmp r12, 0FFFFFFFFFFFFFFFFh
jnz short loc_52290
loc_522E7:
mov rcx, r15
not rcx
lea rdi, [rsp+58h+var_50]
mov rsi, r14
mov rdx, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
lea rsi, [rsp+58h+var_50]
mov rdi, rbx
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
lea rax, [rsp+58h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_52325
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_52325:
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]
jmp short loc_52359
jmp short $+2
loc_52347:
mov r14, rax
jmp short loc_5236B
mov r14, rax
mov rdi, [rsp+arg_0]; void *
lea rax, [rsp+arg_10]
loc_52359:
cmp rdi, rax
jz short loc_5236B
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5236B:
mov rdi, rbx
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, r14
call __Unwind_Resume
| long long string_split<std::string>(long long a1, long long a2, unsigned int a3)
{
char v3; // bp
long long v4; // r15
long long v5; // rax
long long v6; // r12
void *v8[2]; // [rsp+8h] [rbp-50h] BYREF
_QWORD v9[8]; // [rsp+18h] [rbp-40h] BYREF
v3 = a3;
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
v4 = 0LL;
v5 = std::string::find(a2, a3, 0LL);
if ( v5 != -1 )
{
v6 = v5;
v4 = 0LL;
do
{
std::string::substr(v8, a2, v4, v6 - v4);
std::vector<std::string>::emplace_back<std::string&>(a1, v8);
v4 = v6 + 1;
v6 = std::string::find(a2, (unsigned int)v3, v6 + 1);
if ( v8[0] != v9 )
operator delete(v8[0], v9[0] + 1LL);
}
while ( v6 != -1 );
}
std::string::substr(v8, a2, v4, ~v4);
std::vector<std::string>::emplace_back<std::string>(a1, v8);
if ( v8[0] != v9 )
operator delete(v8[0], v9[0] + 1LL);
return a1;
}
| string_split<std::__cxx11::string>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
XOR R15D,R15D
MOV RDI,RSI
MOV ESI,EDX
XOR EDX,EDX
CALL 0x0011bd20
CMP RAX,-0x1
JZ 0x001522e7
MOV R12,RAX
XOR R15D,R15D
LEA R13,[RSP + 0x8]
MOVSX EBP,BPL
LAB_00152290:
MOV RCX,R12
SUB RCX,R15
LAB_00152296:
MOV RDI,R13
MOV RSI,R14
MOV RDX,R15
CALL 0x0011bad0
LAB_001522a4:
MOV RDI,RBX
MOV RSI,R13
CALL 0x00159040
MOV R15,R12
INC R15
MOV RDI,R14
MOV ESI,EBP
MOV RDX,R15
CALL 0x0011bd20
MOV R12,RAX
MOV RDI,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x001522e1
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011ba60
LAB_001522e1:
CMP R12,-0x1
JNZ 0x00152290
LAB_001522e7:
MOV RCX,R15
NOT RCX
LAB_001522ed:
LEA RDI,[RSP + 0x8]
MOV RSI,R14
MOV RDX,R15
CALL 0x0011bad0
LAB_001522fd:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00159086
LAB_0015230a:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00152325
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011ba60
LAB_00152325:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > >
string_split<std::__cxx11::string >(std::__cxx11::string const&, char) */
string * string_split<std::__cxx11::string>(string *param_1,char param_2)
{
long lVar1;
uint in_EDX;
int7 in_register_00000031;
long *local_50 [2];
long local_40 [2];
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
lVar1 = std::__cxx11::string::find(param_2,(ulong)in_EDX);
if (lVar1 != -1) {
do {
/* try { // try from 00152296 to 001522a3 has its CatchHandler @ 00152347 */
std::__cxx11::string::substr((ulong)local_50,CONCAT71(in_register_00000031,param_2));
/* try { // try from 001522a4 to 001522ae has its CatchHandler @ 0015234c */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string&>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1,
(string *)local_50);
lVar1 = std::__cxx11::string::find(param_2,(ulong)(uint)(int)(char)in_EDX);
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
} while (lVar1 != -1);
}
/* try { // try from 001522ed to 001522fc has its CatchHandler @ 00152345 */
std::__cxx11::string::substr((ulong)local_50,CONCAT71(in_register_00000031,param_2));
/* try { // try from 001522fd to 00152309 has its CatchHandler @ 00152337 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1,
(string *)local_50);
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
return param_1;
}
| |
23,112 | pre_modexp | corpus-core[P]colibri-stateless/src/chains/eth/precompiles/precompiles_basic.c | static pre_result_t pre_modexp(bytes_t input, buffer_t* output, uint64_t* gas_used) {
uint32_t l_base = (uint32_t) bytes_as_be(bytes_slice(input, 24, 8));
uint32_t l_exp = (uint32_t) bytes_as_be(bytes_slice(input, 32 + 24, 8));
uint32_t l_mod = (uint32_t) bytes_as_be(bytes_slice(input, 64 + 24, 8));
if (input.len < 96 + l_base + l_exp + l_mod) return PRE_INVALID_INPUT;
bytes_t b_base = bytes(input.data + 96, l_base);
bytes_t b_exp = bytes(input.data + 96 + l_base, l_exp);
bytes_t b_mod = bytes(input.data + 96 + l_base + l_exp, l_mod);
*gas_used = calculate_gas_for_modexp(l_base, l_exp, l_mod, b_exp);
// Initialize intx variables
intx_uint256_t base, exp, mod, result;
intx_init(&result);
// Convert input bytes to intx
intx_from_bytes(&base, b_base);
intx_from_bytes(&exp, b_exp);
intx_from_bytes(&mod, b_mod);
// Perform modular exponentiation
intx_modexp(&result, &base, &exp, &mod);
// Find first non-zero byte
int start_idx = 0;
while (start_idx < 32 && result.bytes[start_idx] == 0) {
start_idx++;
}
// If all zeros, output a single zero byte
size_t result_len = (start_idx == 32) ? 1 : 32 - start_idx;
// Set output buffer
output->data.len = 0;
buffer_grow(output, result_len);
buffer_append(output, bytes(result.bytes + ((start_idx == 32) ? 31 : start_idx), result_len));
return PRE_SUCCESS;
} | O3 | c | pre_modexp:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rcx, 0x20(%rsp)
movq %rdx, %r15
movq %rsi, %r14
movl %edi, %ebx
addq $0x18, %rsi
movl $0x8, %edi
callq 0x51c4e
movq %rax, %r12
leaq 0x38(%r14), %rsi
movl $0x8, %edi
callq 0x51c4e
movq %rax, %r13
leaq 0x58(%r14), %rsi
movl $0x8, %edi
callq 0x51c4e
movq %rax, %rbp
leal (%r12,%r13), %eax
leal (%rax,%rbp), %ecx
addl $0x60, %ecx
movl $0x3, %eax
cmpl %ebx, %ecx
ja 0x50e56
movl %r12d, %eax
leaq (%r14,%rax), %rsi
addq $0x60, %rsi
addq $0x60, %r14
movl %r13d, %eax
addq %rsi, %rax
movq %rax, 0x10(%rsp)
cmpl $0x20, %r13d
movq %r15, 0x18(%rsp)
movq %rsi, 0x8(%rsp)
ja 0x50cf7
xorl %ebx, %ebx
movl %r13d, %edi
xorl %edx, %edx
callq 0x51165
testb %al, %al
jne 0x50d59
xorl %eax, %eax
movl $0x0, %ebx
testl %r13d, %r13d
je 0x50d53
movl %r13d, %ecx
andl $0x3f, %ecx
xorl %edx, %edx
xorl %esi, %esi
movq 0x8(%rsp), %r9
movzbl (%r9,%rsi), %edi
testl %edi, %edi
je 0x50ce8
movl $0x8, %ebx
leal -0x1(%rbx), %r8d
movzbl %r8b, %r8d
btl %r8d, %edi
jb 0x50d51
decl %ebx
jne 0x50cd6
incq %rsi
addl $-0x8, %edx
cmpq %rcx, %rsi
jne 0x50cc8
xorl %ebx, %ebx
jmp 0x50d53
leal -0x20(%r13), %edx
leal -0x100(,%r13,8), %eax
cmpl $0x41, %r13d
movl $0x20, %ecx
cmovbl %edx, %ecx
xorl %edx, %edx
xorl %r9d, %r9d
movzbl (%rsi,%r9), %edi
testl %edi, %edi
je 0x50d34
movl $0x8, %ebx
leal -0x1(%rbx), %r8d
movzbl %r8b, %r8d
btl %r8d, %edi
jb 0x50d43
decl %ebx
jne 0x50d22
incq %r9
addl $-0x8, %edx
cmpq %rcx, %r9
jne 0x50d14
xorl %ebx, %ebx
jmp 0x50d45
subl %edx, %ebx
xorl %ecx, %ecx
subl $0x1, %ebx
cmovbl %ecx, %ebx
addl %eax, %ebx
jmp 0x50d59
subl %edx, %ebx
subl $0x1, %ebx
cmovbl %eax, %ebx
cmpl %ebp, %r12d
movl %ebp, %eax
cmoval %r12d, %eax
addq $0x7, %rax
shrq $0x3, %rax
imull %eax, %eax
cmpl $0x1, %ebx
adcl $0x0, %ebx
imull %eax, %ebx
movl $0xaaaaaaab, %eax # imm = 0xAAAAAAAB
imulq %rbx, %rax
shrq $0x21, %rax
cmpl $0xc9, %eax
movl $0xc8, %ecx
cmovael %eax, %ecx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0x7c9d0
leaq 0x88(%rsp), %rbx
movq %rbx, %rdi
movl %r12d, %esi
movq %r14, %rdx
callq 0x7e171
leaq 0x68(%rsp), %r14
movq %r14, %rdi
movl %r13d, %esi
movq 0x8(%rsp), %rdx
callq 0x7e171
leaq 0x48(%rsp), %r12
movq %r12, %rdi
movl %ebp, %esi
movq 0x10(%rsp), %rdx
callq 0x7e171
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x7dc35
xorl %eax, %eax
movq 0x18(%rsp), %r15
cmpb $0x0, 0x28(%rsp,%rax)
jne 0x50e11
incq %rax
cmpq $0x20, %rax
jne 0x50dfc
movl $0x20, %eax
movl %eax, %ecx
subl $0x20, %ecx
movl $0x1f, %r14d
cmovnel %eax, %r14d
negl %ecx
cmpl $0x20, %eax
movl $0x1, %eax
cmovnel %ecx, %eax
movslq %eax, %rbx
movl $0x0, (%r15)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x50f71
leaq (%rsp,%r14), %rdx
addq $0x28, %rdx
movq %r15, %rdi
movl %ebx, %esi
callq 0x50fdd
xorl %eax, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| pre_modexp:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A8h
mov [rsp+0D8h+var_B8], rcx
mov r15, rdx
mov r14, rsi
mov ebx, edi
add rsi, 18h
mov edi, 8
call bytes_as_be
mov r12, rax
lea rsi, [r14+38h]
mov edi, 8
call bytes_as_be
mov r13, rax
lea rsi, [r14+58h]
mov edi, 8
call bytes_as_be
mov rbp, rax
lea eax, [r12+r13]
lea ecx, [rax+rbp]
add ecx, 60h ; '`'
mov eax, 3
cmp ecx, ebx
ja loc_50E56
mov eax, r12d
lea rsi, [r14+rax]
add rsi, 60h ; '`'
add r14, 60h ; '`'
mov eax, r13d
add rax, rsi
mov [rsp+0D8h+var_C8], rax
cmp r13d, 20h ; ' '
mov [rsp+0D8h+var_C0], r15
mov [rsp+0D8h+var_D0], rsi
ja short loc_50CF7
xor ebx, ebx
mov edi, r13d
xor edx, edx
call bytes_all_equal
test al, al
jnz loc_50D59
xor eax, eax
mov ebx, 0
test r13d, r13d
jz loc_50D53
mov ecx, r13d
and ecx, 3Fh
xor edx, edx
xor esi, esi
mov r9, [rsp+0D8h+var_D0]
loc_50CC8:
movzx edi, byte ptr [r9+rsi]
test edi, edi
jz short loc_50CE8
mov ebx, 8
loc_50CD6:
lea r8d, [rbx-1]
movzx r8d, r8b
bt edi, r8d
jb short loc_50D51
dec ebx
jnz short loc_50CD6
loc_50CE8:
inc rsi
add edx, 0FFFFFFF8h
cmp rsi, rcx
jnz short loc_50CC8
xor ebx, ebx
jmp short loc_50D53
loc_50CF7:
lea edx, [r13-20h]
lea eax, ds:0FFFFFFFFFFFFFF00h[r13*8]
cmp r13d, 41h ; 'A'
mov ecx, 20h ; ' '
cmovb ecx, edx
xor edx, edx
xor r9d, r9d
loc_50D14:
movzx edi, byte ptr [rsi+r9]
test edi, edi
jz short loc_50D34
mov ebx, 8
loc_50D22:
lea r8d, [rbx-1]
movzx r8d, r8b
bt edi, r8d
jb short loc_50D43
dec ebx
jnz short loc_50D22
loc_50D34:
inc r9
add edx, 0FFFFFFF8h
cmp r9, rcx
jnz short loc_50D14
xor ebx, ebx
jmp short loc_50D45
loc_50D43:
sub ebx, edx
loc_50D45:
xor ecx, ecx
sub ebx, 1
cmovb ebx, ecx
add ebx, eax
jmp short loc_50D59
loc_50D51:
sub ebx, edx
loc_50D53:
sub ebx, 1
cmovb ebx, eax
loc_50D59:
cmp r12d, ebp
mov eax, ebp
cmova eax, r12d
add rax, 7
shr rax, 3
imul eax, eax
cmp ebx, 1
adc ebx, 0
imul ebx, eax
mov eax, 0AAAAAAABh
imul rax, rbx
shr rax, 21h
cmp eax, 0C9h
mov ecx, 0C8h
cmovnb ecx, eax
mov rax, [rsp+0D8h+var_B8]
mov [rax], rcx
lea r15, [rsp+0D8h+var_B0]
mov rdi, r15
call intx_init
lea rbx, [rsp+0D8h+var_50]
mov rdi, rbx
mov esi, r12d
mov rdx, r14
call intx_from_bytes
lea r14, [rsp+0D8h+var_70]
mov rdi, r14
mov esi, r13d
mov rdx, [rsp+0D8h+var_D0]
call intx_from_bytes
lea r12, [rsp+0D8h+var_90]
mov rdi, r12
mov esi, ebp
mov rdx, [rsp+0D8h+var_C8]
call intx_from_bytes
mov rdi, r15
mov rsi, rbx
mov rdx, r14
mov rcx, r12
call intx_modexp
xor eax, eax
mov r15, [rsp+0D8h+var_C0]
loc_50DFC:
cmp [rsp+rax+0D8h+var_B0], 0
jnz short loc_50E11
inc rax
cmp rax, 20h ; ' '
jnz short loc_50DFC
mov eax, 20h ; ' '
loc_50E11:
mov ecx, eax
sub ecx, 20h ; ' '
mov r14d, 1Fh
cmovnz r14d, eax
neg ecx
cmp eax, 20h ; ' '
mov eax, 1
cmovnz eax, ecx
movsxd rbx, eax
mov dword ptr [r15], 0
mov rdi, r15
mov rsi, rbx
call buffer_grow
lea rdx, [rsp+r14+0D8h+var_D8]
add rdx, 28h ; '('
mov rdi, r15
mov esi, ebx
call buffer_append
xor eax, eax
loc_50E56:
add rsp, 0A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long pre_modexp(unsigned int a1, long long a2, _DWORD *a3, long long *a4)
{
unsigned int v6; // r12d
unsigned int v7; // r13d
unsigned int v8; // ebp
long long result; // rax
long long v10; // rsi
long long v11; // r14
int v12; // ebx
int v13; // ebx
int v14; // edx
long long v15; // rsi
int v16; // edi
int v17; // ebx
long long v18; // rcx
int v19; // edx
long long v20; // r9
int v21; // edi
int v22; // ebx
int v23; // ebx
bool v24; // cf
int v25; // ebx
long long v26; // rax
unsigned int v27; // ebx
long long v28; // rcx
long long v29; // rax
long long v30; // r14
int v31; // ecx
bool v32; // zf
int v33; // eax
unsigned int v34; // ebx
long long v35; // [rsp+8h] [rbp-D0h]
long long v36; // [rsp+10h] [rbp-C8h]
_BYTE v38[32]; // [rsp+28h] [rbp-B0h] BYREF
_BYTE v39[32]; // [rsp+48h] [rbp-90h] BYREF
_BYTE v40[32]; // [rsp+68h] [rbp-70h] BYREF
_BYTE v41[80]; // [rsp+88h] [rbp-50h] BYREF
v6 = bytes_as_be(8LL, a2 + 24);
v7 = bytes_as_be(8LL, a2 + 56);
v8 = bytes_as_be(8LL, a2 + 88);
result = 3LL;
if ( v6 + v7 + v8 + 96 <= a1 )
{
v10 = a2 + v6 + 96;
v11 = a2 + 96;
v36 = v10 + v7;
v35 = v10;
if ( v7 > 0x20 )
{
v18 = 32LL;
if ( v7 < 0x41 )
v18 = v7 - 32;
v19 = 0;
v20 = 0LL;
while ( !*(_BYTE *)(v10 + v20) )
{
LABEL_19:
++v20;
v19 -= 8;
if ( v20 == v18 )
{
v23 = 0;
goto LABEL_22;
}
}
v22 = 8;
while ( 1 )
{
v21 = *(unsigned __int8 *)(v10 + v20);
if ( _bittest(&v21, (unsigned __int8)(v22 - 1)) )
break;
if ( !--v22 )
goto LABEL_19;
}
v23 = v22 - v19;
LABEL_22:
v24 = v23 == 0;
v25 = v23 - 1;
if ( v24 )
v25 = 0;
v12 = 8 * v7 - 256 + v25;
}
else
{
v12 = 0;
if ( !(unsigned __int8)bytes_all_equal(v7, v10, 0LL) )
{
v13 = 0;
if ( v7 )
{
v14 = 0;
v15 = 0LL;
while ( !*(_BYTE *)(v35 + v15) )
{
LABEL_10:
++v15;
v14 -= 8;
if ( v15 == (v7 & 0x3F) )
{
v13 = 0;
goto LABEL_26;
}
}
v17 = 8;
while ( 1 )
{
v16 = *(unsigned __int8 *)(v35 + v15);
if ( _bittest(&v16, (unsigned __int8)(v17 - 1)) )
break;
if ( !--v17 )
goto LABEL_10;
}
v13 = v17 - v14;
}
LABEL_26:
v24 = v13 == 0;
v12 = v13 - 1;
if ( v24 )
v12 = 0;
}
}
v26 = v8;
if ( v6 > v8 )
v26 = v6;
v27 = ((unsigned long long)(v26 + 7) >> 3) * ((unsigned long long)(v26 + 7) >> 3) * ((v12 == 0) + v12);
v28 = 200LL;
if ( v27 / 3 >= 0xC9 )
v28 = v27 / 3;
*a4 = v28;
intx_init(v38);
intx_from_bytes(v41, v6, v11);
intx_from_bytes(v40, v7, v35);
intx_from_bytes(v39, v8, v36);
intx_modexp(v38, v41, v40, v39);
v29 = 0LL;
while ( !v38[v29] )
{
if ( ++v29 == 32 )
{
LODWORD(v29) = 32;
break;
}
}
v30 = 31LL;
if ( (_DWORD)v29 != 32 )
v30 = (unsigned int)v29;
v31 = 32 - v29;
v32 = (_DWORD)v29 == 32;
v33 = 1;
if ( !v32 )
v33 = v31;
v34 = v33;
*a3 = 0;
buffer_grow(a3, v33);
buffer_append(a3, v34, &v38[v30]);
return 0LL;
}
return result;
}
| pre_modexp:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa8
MOV qword ptr [RSP + 0x20],RCX
MOV R15,RDX
MOV R14,RSI
MOV EBX,EDI
ADD RSI,0x18
MOV EDI,0x8
CALL 0x00151c4e
MOV R12,RAX
LEA RSI,[R14 + 0x38]
MOV EDI,0x8
CALL 0x00151c4e
MOV R13,RAX
LEA RSI,[R14 + 0x58]
MOV EDI,0x8
CALL 0x00151c4e
MOV RBP,RAX
LEA EAX,[R12 + R13*0x1]
LEA ECX,[RAX + RBP*0x1]
ADD ECX,0x60
MOV EAX,0x3
CMP ECX,EBX
JA 0x00150e56
MOV EAX,R12D
LEA RSI,[R14 + RAX*0x1]
ADD RSI,0x60
ADD R14,0x60
MOV EAX,R13D
ADD RAX,RSI
MOV qword ptr [RSP + 0x10],RAX
CMP R13D,0x20
MOV qword ptr [RSP + 0x18],R15
MOV qword ptr [RSP + 0x8],RSI
JA 0x00150cf7
XOR EBX,EBX
MOV EDI,R13D
XOR EDX,EDX
CALL 0x00151165
TEST AL,AL
JNZ 0x00150d59
XOR EAX,EAX
MOV EBX,0x0
TEST R13D,R13D
JZ 0x00150d53
MOV ECX,R13D
AND ECX,0x3f
XOR EDX,EDX
XOR ESI,ESI
MOV R9,qword ptr [RSP + 0x8]
LAB_00150cc8:
MOVZX EDI,byte ptr [R9 + RSI*0x1]
TEST EDI,EDI
JZ 0x00150ce8
MOV EBX,0x8
LAB_00150cd6:
LEA R8D,[RBX + -0x1]
MOVZX R8D,R8B
BT EDI,R8D
JC 0x00150d51
DEC EBX
JNZ 0x00150cd6
LAB_00150ce8:
INC RSI
ADD EDX,-0x8
CMP RSI,RCX
JNZ 0x00150cc8
XOR EBX,EBX
JMP 0x00150d53
LAB_00150cf7:
LEA EDX,[R13 + -0x20]
LEA EAX,[-0x100 + R13*0x8]
CMP R13D,0x41
MOV ECX,0x20
CMOVC ECX,EDX
XOR EDX,EDX
XOR R9D,R9D
LAB_00150d14:
MOVZX EDI,byte ptr [RSI + R9*0x1]
TEST EDI,EDI
JZ 0x00150d34
MOV EBX,0x8
LAB_00150d22:
LEA R8D,[RBX + -0x1]
MOVZX R8D,R8B
BT EDI,R8D
JC 0x00150d43
DEC EBX
JNZ 0x00150d22
LAB_00150d34:
INC R9
ADD EDX,-0x8
CMP R9,RCX
JNZ 0x00150d14
XOR EBX,EBX
JMP 0x00150d45
LAB_00150d43:
SUB EBX,EDX
LAB_00150d45:
XOR ECX,ECX
SUB EBX,0x1
CMOVC EBX,ECX
ADD EBX,EAX
JMP 0x00150d59
LAB_00150d51:
SUB EBX,EDX
LAB_00150d53:
SUB EBX,0x1
CMOVC EBX,EAX
LAB_00150d59:
CMP R12D,EBP
MOV EAX,EBP
CMOVA EAX,R12D
ADD RAX,0x7
SHR RAX,0x3
IMUL EAX,EAX
CMP EBX,0x1
ADC EBX,0x0
IMUL EBX,EAX
MOV EAX,0xaaaaaaab
IMUL RAX,RBX
SHR RAX,0x21
CMP EAX,0xc9
MOV ECX,0xc8
CMOVNC ECX,EAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX],RCX
LEA R15,[RSP + 0x28]
MOV RDI,R15
CALL 0x0017c9d0
LEA RBX,[RSP + 0x88]
MOV RDI,RBX
MOV ESI,R12D
MOV RDX,R14
CALL 0x0017e171
LEA R14,[RSP + 0x68]
MOV RDI,R14
MOV ESI,R13D
MOV RDX,qword ptr [RSP + 0x8]
CALL 0x0017e171
LEA R12,[RSP + 0x48]
MOV RDI,R12
MOV ESI,EBP
MOV RDX,qword ptr [RSP + 0x10]
CALL 0x0017e171
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R14
MOV RCX,R12
CALL 0x0017dc35
XOR EAX,EAX
MOV R15,qword ptr [RSP + 0x18]
LAB_00150dfc:
CMP byte ptr [RSP + RAX*0x1 + 0x28],0x0
JNZ 0x00150e11
INC RAX
CMP RAX,0x20
JNZ 0x00150dfc
MOV EAX,0x20
LAB_00150e11:
MOV ECX,EAX
SUB ECX,0x20
MOV R14D,0x1f
CMOVNZ R14D,EAX
NEG ECX
CMP EAX,0x20
MOV EAX,0x1
CMOVNZ EAX,ECX
MOVSXD RBX,EAX
MOV dword ptr [R15],0x0
MOV RDI,R15
MOV RSI,RBX
CALL 0x00150f71
LEA RDX,[RSP + R14*0x1]
ADD RDX,0x28
MOV RDI,R15
MOV ESI,EBX
CALL 0x00150fdd
XOR EAX,EAX
LAB_00150e56:
ADD RSP,0xa8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 pre_modexp(uint param_1,long param_2,int4 *param_3,ulong *param_4)
{
char cVar1;
uint uVar2;
uint uVar3;
uint uVar4;
uint uVar5;
int8 uVar6;
int iVar7;
int iVar8;
long lVar9;
ulong uVar10;
ulong uVar11;
char local_b0 [32];
int1 local_90 [32];
int1 local_70 [32];
int1 local_50 [32];
uVar2 = bytes_as_be(8,param_2 + 0x18);
uVar3 = bytes_as_be(8,param_2 + 0x38);
uVar4 = bytes_as_be(8,param_2 + 0x58);
uVar6 = 3;
if (uVar2 + uVar3 + uVar4 + 0x60 <= param_1) {
lVar9 = param_2 + (ulong)uVar2 + 0x60;
if (uVar3 < 0x21) {
iVar7 = 0;
cVar1 = bytes_all_equal(uVar3,lVar9,0);
if (cVar1 == '\0') {
iVar8 = 0;
if (uVar3 != 0) {
iVar7 = 0;
uVar10 = 0;
do {
if (*(byte *)(lVar9 + uVar10) != 0) {
iVar8 = 8;
do {
if ((*(byte *)(lVar9 + uVar10) >> (iVar8 - 1U & 0x1f) & 1) != 0) {
iVar8 = iVar8 - iVar7;
goto LAB_00150d53;
}
iVar8 = iVar8 + -1;
} while (iVar8 != 0);
}
uVar10 = uVar10 + 1;
iVar7 = iVar7 + -8;
} while (uVar10 != (uVar3 & 0x3f));
iVar8 = 0;
}
LAB_00150d53:
iVar7 = iVar8 + -1;
if (iVar8 == 0) {
iVar7 = 0;
}
}
}
else {
uVar10 = 0x20;
if (uVar3 < 0x41) {
uVar10 = (ulong)(uVar3 - 0x20);
}
iVar7 = 0;
uVar11 = 0;
do {
if (*(byte *)(lVar9 + uVar11) != 0) {
iVar8 = 8;
do {
if ((*(byte *)(lVar9 + uVar11) >> (iVar8 - 1U & 0x1f) & 1) != 0) {
iVar8 = iVar8 - iVar7;
goto LAB_00150d45;
}
iVar8 = iVar8 + -1;
} while (iVar8 != 0);
}
uVar11 = uVar11 + 1;
iVar7 = iVar7 + -8;
} while (uVar11 != uVar10);
iVar8 = 0;
LAB_00150d45:
iVar7 = iVar8 + -1;
if (iVar8 == 0) {
iVar7 = 0;
}
iVar7 = iVar7 + uVar3 * 8 + -0x100;
}
uVar5 = uVar4;
if (uVar4 < uVar2) {
uVar5 = uVar2;
}
iVar8 = (int)((ulong)uVar5 + 7 >> 3);
uVar5 = ((iVar7 + (uint)(iVar7 == 0)) * iVar8 * iVar8) / 3;
uVar10 = 200;
if (200 < uVar5) {
uVar10 = (ulong)uVar5;
}
*param_4 = uVar10;
intx_init(local_b0);
intx_from_bytes(local_50,uVar2,param_2 + 0x60);
intx_from_bytes(local_70,uVar3,lVar9);
intx_from_bytes(local_90,uVar4,(ulong)uVar3 + lVar9);
intx_modexp(local_b0,local_50,local_70,local_90);
uVar10 = 0;
do {
if (local_b0[uVar10] != '\0') goto LAB_00150e11;
uVar10 = uVar10 + 1;
} while (uVar10 != 0x20);
uVar10 = 0x20;
LAB_00150e11:
iVar7 = (int)uVar10 + -0x20;
uVar11 = 0x1f;
if (iVar7 != 0) {
uVar11 = uVar10 & 0xffffffff;
}
iVar8 = 1;
if ((int)uVar10 != 0x20) {
iVar8 = -iVar7;
}
*param_3 = 0;
buffer_grow(param_3,(long)iVar8);
buffer_append(param_3,iVar8,local_b0 + uVar11);
uVar6 = 0;
}
return uVar6;
}
| |
23,113 | google::protobuf::compiler::java::RepeatedImmutableMessageFieldGenerator::GenerateBuilderMembers(google::protobuf::io::Printer*) const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/message_field.cc | void RepeatedImmutableMessageFieldGenerator::GenerateBuilderMembers(
io::Printer* printer) const {
// When using nested-builders, the code initially works just like the
// non-nested builder case. It only creates a nested builder lazily on
// demand and then forever delegates to it after creation.
printer->Print(
variables_,
// Used when the builder is null.
// One field is the list and the other field keeps track of whether the
// list is immutable. If it's immutable, the invariant is that it must
// either an instance of Collections.emptyList() or it's an ArrayList
// wrapped in a Collections.unmodifiableList() wrapper and nobody else has
// a reference to the underlying ArrayList. This invariant allows us to
// share instances of lists between protocol buffers avoiding expensive
// memory allocations. Note, immutable is a strong guarantee here -- not
// just that the list cannot be modified via the reference but that the
// list can never be modified.
"private java.util.List<$type$> $name$_ =\n"
" java.util.Collections.emptyList();\n"
"private void ensure$capitalized_name$IsMutable() {\n"
" if (!$get_mutable_bit_builder$) {\n"
" $name$_ = new java.util.ArrayList<$type$>($name$_);\n"
" $set_mutable_bit_builder$;\n"
" }\n"
"}\n"
"\n");
printer->Print(
variables_,
// If this builder is non-null, it is used and the other fields are
// ignored.
"private com.google.protobuf.RepeatedFieldBuilder$ver$<\n"
" $type$, $type$.Builder, $type$OrBuilder> $name$Builder_;\n"
"\n");
// The comments above the methods below are based on a hypothetical
// repeated field of type "Field" called "RepeatedField".
// List<Field> getRepeatedFieldList()
WriteFieldDocComment(printer, descriptor_);
PrintNestedBuilderFunction(
printer,
"$deprecation$public java.util.List<$type$> "
"${$get$capitalized_name$List$}$()",
"return java.util.Collections.unmodifiableList($name$_);\n",
"return $name$Builder_.getMessageList();\n",
NULL);
// int getRepeatedFieldCount()
WriteFieldDocComment(printer, descriptor_);
PrintNestedBuilderFunction(
printer, "$deprecation$public int ${$get$capitalized_name$Count$}$()",
"return $name$_.size();\n", "return $name$Builder_.getCount();\n",
NULL);
// Field getRepeatedField(int index)
WriteFieldDocComment(printer, descriptor_);
PrintNestedBuilderFunction(
printer,
"$deprecation$public $type$ ${$get$capitalized_name$$}$(int index)",
"return $name$_.get(index);\n",
"return $name$Builder_.getMessage(index);\n",
NULL);
// Builder setRepeatedField(int index, Field value)
WriteFieldDocComment(printer, descriptor_);
PrintNestedBuilderFunction(
printer,
"$deprecation$public Builder ${$set$capitalized_name$$}$(\n"
" int index, $type$ value)",
"if (value == null) {\n"
" throw new NullPointerException();\n"
"}\n"
"ensure$capitalized_name$IsMutable();\n"
"$name$_.set(index, value);\n"
"$on_changed$\n",
"$name$Builder_.setMessage(index, value);\n", "return this;\n");
// Builder setRepeatedField(int index, Field.Builder builderForValue)
WriteFieldDocComment(printer, descriptor_);
PrintNestedBuilderFunction(
printer,
"$deprecation$public Builder ${$set$capitalized_name$$}$(\n"
" int index, $type$.Builder builderForValue)",
"ensure$capitalized_name$IsMutable();\n"
"$name$_.set(index, builderForValue.build());\n"
"$on_changed$\n",
"$name$Builder_.setMessage(index, builderForValue.build());\n",
"return this;\n");
// Builder addRepeatedField(Field value)
WriteFieldDocComment(printer, descriptor_);
PrintNestedBuilderFunction(
printer,
"$deprecation$public Builder ${$add$capitalized_name$$}$($type$ value)",
"if (value == null) {\n"
" throw new NullPointerException();\n"
"}\n"
"ensure$capitalized_name$IsMutable();\n"
"$name$_.add(value);\n"
"$on_changed$\n",
"$name$Builder_.addMessage(value);\n",
"return this;\n");
// Builder addRepeatedField(int index, Field value)
WriteFieldDocComment(printer, descriptor_);
PrintNestedBuilderFunction(
printer,
"$deprecation$public Builder ${$add$capitalized_name$$}$(\n"
" int index, $type$ value)",
"if (value == null) {\n"
" throw new NullPointerException();\n"
"}\n"
"ensure$capitalized_name$IsMutable();\n"
"$name$_.add(index, value);\n"
"$on_changed$\n",
"$name$Builder_.addMessage(index, value);\n",
"return this;\n");
// Builder addRepeatedField(Field.Builder builderForValue)
WriteFieldDocComment(printer, descriptor_);
PrintNestedBuilderFunction(
printer,
"$deprecation$public Builder ${$add$capitalized_name$$}$(\n"
" $type$.Builder builderForValue)",
"ensure$capitalized_name$IsMutable();\n"
"$name$_.add(builderForValue.build());\n"
"$on_changed$\n",
"$name$Builder_.addMessage(builderForValue.build());\n",
"return this;\n");
// Builder addRepeatedField(int index, Field.Builder builderForValue)
WriteFieldDocComment(printer, descriptor_);
PrintNestedBuilderFunction(
printer,
"$deprecation$public Builder ${$add$capitalized_name$$}$(\n"
" int index, $type$.Builder builderForValue)",
"ensure$capitalized_name$IsMutable();\n"
"$name$_.add(index, builderForValue.build());\n"
"$on_changed$\n",
"$name$Builder_.addMessage(index, builderForValue.build());\n",
"return this;\n");
// Builder addAllRepeatedField(Iterable<Field> values)
WriteFieldDocComment(printer, descriptor_);
PrintNestedBuilderFunction(
printer,
"$deprecation$public Builder ${$addAll$capitalized_name$$}$(\n"
" java.lang.Iterable<? extends $type$> values)",
"ensure$capitalized_name$IsMutable();\n"
"com.google.protobuf.AbstractMessageLite.Builder.addAll(\n"
" values, $name$_);\n"
"$on_changed$\n",
"$name$Builder_.addAllMessages(values);\n",
"return this;\n");
// Builder clearRepeatedField()
WriteFieldDocComment(printer, descriptor_);
PrintNestedBuilderFunction(
printer, "$deprecation$public Builder ${$clear$capitalized_name$$}$()",
"$name$_ = java.util.Collections.emptyList();\n"
"$clear_mutable_bit_builder$;\n"
"$on_changed$\n",
"$name$Builder_.clear();\n",
"return this;\n");
// Builder removeRepeatedField(int index)
WriteFieldDocComment(printer, descriptor_);
PrintNestedBuilderFunction(
printer,
"$deprecation$public Builder ${$remove$capitalized_name$$}$(int index)",
"ensure$capitalized_name$IsMutable();\n"
"$name$_.remove(index);\n"
"$on_changed$\n",
"$name$Builder_.remove(index);\n",
"return this;\n");
// Field.Builder getRepeatedFieldBuilder(int index)
WriteFieldDocComment(printer, descriptor_);
printer->Print(
variables_,
"$deprecation$public $type$.Builder ${$get$capitalized_name$Builder$}$(\n"
" int index) {\n"
" return get$capitalized_name$FieldBuilder().getBuilder(index);\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
// FieldOrBuilder getRepeatedFieldOrBuilder(int index)
WriteFieldDocComment(printer, descriptor_);
printer->Print(variables_,
"$deprecation$public $type$OrBuilder "
"${$get$capitalized_name$OrBuilder$}$(\n"
" int index) {\n"
" if ($name$Builder_ == null) {\n"
" return $name$_.get(index);"
" } else {\n"
" return $name$Builder_.getMessageOrBuilder(index);\n"
" }\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
// List<FieldOrBuilder> getRepeatedFieldOrBuilderList()
WriteFieldDocComment(printer, descriptor_);
printer->Print(
variables_,
"$deprecation$public java.util.List<? extends $type$OrBuilder> \n"
" ${$get$capitalized_name$OrBuilderList$}$() {\n"
" if ($name$Builder_ != null) {\n"
" return $name$Builder_.getMessageOrBuilderList();\n"
" } else {\n"
" return java.util.Collections.unmodifiableList($name$_);\n"
" }\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
// Field.Builder addRepeatedField()
WriteFieldDocComment(printer, descriptor_);
printer->Print(variables_,
"$deprecation$public $type$.Builder "
"${$add$capitalized_name$Builder$}$() {\n"
" return get$capitalized_name$FieldBuilder().addBuilder(\n"
" $type$.getDefaultInstance());\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
// Field.Builder addRepeatedFieldBuilder(int index)
WriteFieldDocComment(printer, descriptor_);
printer->Print(
variables_,
"$deprecation$public $type$.Builder ${$add$capitalized_name$Builder$}$(\n"
" int index) {\n"
" return get$capitalized_name$FieldBuilder().addBuilder(\n"
" index, $type$.getDefaultInstance());\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
// List<Field.Builder> getRepeatedFieldBuilderList()
WriteFieldDocComment(printer, descriptor_);
printer->Print(
variables_,
"$deprecation$public java.util.List<$type$.Builder> \n"
" ${$get$capitalized_name$BuilderList$}$() {\n"
" return get$capitalized_name$FieldBuilder().getBuilderList();\n"
"}\n"
"private com.google.protobuf.RepeatedFieldBuilder$ver$<\n"
" $type$, $type$.Builder, $type$OrBuilder> \n"
" get$capitalized_name$FieldBuilder() {\n"
" if ($name$Builder_ == null) {\n"
" $name$Builder_ = new "
"com.google.protobuf.RepeatedFieldBuilder$ver$<\n"
" $type$, $type$.Builder, $type$OrBuilder>(\n"
" $name$_,\n"
" $get_mutable_bit_builder$,\n"
" getParentForChildren(),\n"
" isClean());\n"
" $name$_ = null;\n"
" }\n"
" return $name$Builder_;\n"
"}\n");
printer->Annotate("{", "}", descriptor_);
} | O3 | cpp | google::protobuf::compiler::java::RepeatedImmutableMessageFieldGenerator::GenerateBuilderMembers(google::protobuf::io::Printer*) const:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x18(%rdi), %r15
leaq 0xfddcc(%rip), %rdx # 0x1db468
movq %rsi, %rdi
movq %r15, %rsi
callq 0x16cd32
leaq 0xfdebf(%rip), %rdx # 0x1db56d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x16cd32
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0xcfb21
movq (%r14), %rax
leaq 0xfdf14(%rip), %rdx # 0x1db5e3
leaq 0xfdf5a(%rip), %rcx # 0x1db630
leaq 0xfdf8c(%rip), %r8 # 0x1db669
movq %r14, %rdi
movq %rbx, %rsi
xorl %r9d, %r9d
callq *0xb8(%rax)
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0xcfb21
movq (%r14), %rax
leaq 0xfdf90(%rip), %rdx # 0x1db692
leaq 0xfdfc4(%rip), %rcx # 0x1db6cd
leaq 0xfdfd5(%rip), %r8 # 0x1db6e5
movq %r14, %rdi
movq %rbx, %rsi
xorl %r9d, %r9d
callq *0xb8(%rax)
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0xcfb21
movq (%r14), %rax
leaq 0xfdfd3(%rip), %rdx # 0x1db708
leaq 0xfe00e(%rip), %rcx # 0x1db74a
leaq 0xfe023(%rip), %r8 # 0x1db766
movq %r14, %rdi
movq %rbx, %rsi
xorl %r9d, %r9d
callq *0xb8(%rax)
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0xcfb21
movq (%r14), %rax
leaq 0xfe028(%rip), %rdx # 0x1db790
leaq 0xfe077(%rip), %rcx # 0x1db7e6
leaq 0xfe0f9(%rip), %r8 # 0x1db86f
leaq 0xfbe76(%rip), %r12 # 0x1d95f3
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %r9
callq *0xb8(%rax)
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0xcfb21
movq (%r14), %rax
leaq 0xfe0f7(%rip), %rdx # 0x1db899
leaq 0xfe158(%rip), %rcx # 0x1db901
leaq 0xfe1b1(%rip), %r8 # 0x1db961
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %r9
callq *0xb8(%rax)
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0xcfb21
movq (%r14), %rax
leaq 0xfe1c8(%rip), %rdx # 0x1db99d
leaq 0xfe207(%rip), %rcx # 0x1db9e3
leaq 0xfe282(%rip), %r8 # 0x1dba65
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %r9
callq *0xb8(%rax)
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0xcfb21
movq (%r14), %rax
leaq 0xfe280(%rip), %rdx # 0x1dba88
leaq 0xfe2cf(%rip), %rcx # 0x1dbade
leaq 0xfe351(%rip), %r8 # 0x1dbb67
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %r9
callq *0xb8(%rax)
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0xcfb21
movq (%r14), %rax
leaq 0xfe356(%rip), %rdx # 0x1dbb91
leaq 0xfe3ac(%rip), %rcx # 0x1dbbee
leaq 0xfe3fe(%rip), %r8 # 0x1dbc47
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %r9
callq *0xb8(%rax)
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0xcfb21
movq (%r14), %rax
leaq 0xfe40e(%rip), %rdx # 0x1dbc7c
leaq 0xfe46f(%rip), %rcx # 0x1dbce4
leaq 0xfe4c8(%rip), %r8 # 0x1dbd44
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %r9
callq *0xb8(%rax)
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0xcfb21
movq (%r14), %rax
leaq 0xfe4df(%rip), %rdx # 0x1dbd80
leaq 0xfe545(%rip), %rcx # 0x1dbded
leaq 0xfe5bf(%rip), %r8 # 0x1dbe6e
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %r9
callq *0xb8(%rax)
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0xcfb21
movq (%r14), %rax
leaq 0xfcf3e(%rip), %rdx # 0x1da812
leaq 0xfe5bb(%rip), %rcx # 0x1dbe96
leaq 0xfed6c(%rip), %r8 # 0x1dc64e
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %r9
callq *0xb8(%rax)
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0xcfb21
movq (%r14), %rax
leaq 0xfe5e7(%rip), %rdx # 0x1dbeee
leaq 0xfe626(%rip), %rcx # 0x1dbf34
leaq 0xfe669(%rip), %r8 # 0x1dbf7e
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %r9
callq *0xb8(%rax)
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0xcfb21
leaq 0xfe666(%rip), %rdx # 0x1dbf9d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x16cd32
movq 0x8(%r14), %rcx
leaq 0x11278c(%rip), %r12 # 0x1f00d9
leaq 0x102d79(%rip), %r13 # 0x1e06cd
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0xafc7e
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0xcfb21
leaq 0xfe6c3(%rip), %rdx # 0x1dc038
movq %rbx, %rdi
movq %r15, %rsi
callq 0x16cd32
movq 0x8(%r14), %rcx
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0xafc7e
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0xcfb21
leaq 0xfe774(%rip), %rdx # 0x1dc119
movq %rbx, %rdi
movq %r15, %rsi
callq 0x16cd32
movq 0x8(%r14), %rcx
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0xafc7e
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0xcfb21
leaq 0xfe858(%rip), %rdx # 0x1dc22d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x16cd32
movq 0x8(%r14), %rcx
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0xafc7e
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0xcfb21
leaq 0xfe8d2(%rip), %rdx # 0x1dc2d7
movq %rbx, %rdi
movq %r15, %rsi
callq 0x16cd32
movq 0x8(%r14), %rcx
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0xafc7e
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0xcfb21
leaq 0xfe961(%rip), %rdx # 0x1dc396
movq %rbx, %rdi
movq %r15, %rsi
callq 0x16cd32
movq 0x8(%r14), %rcx
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xafc7e
nop
| _ZNK6google8protobuf8compiler4java38RepeatedImmutableMessageFieldGenerator22GenerateBuilderMembersEPNS0_2io7PrinterE:
push r15; int
push r14; int
push r13; char
push r12; int
push rbx; void *
mov rbx, rsi
mov r14, rdi
lea r15, [rdi+18h]
lea rdx, aPrivateJavaUti_2; "private java.util.List<$type$> $name$_ "...
mov rdi, rsi; this
mov rsi, r15
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
lea rdx, aPrivateComGoog_4; "private com.google.protobuf.RepeatedFie"...
mov rdi, rbx; this
mov rsi, r15
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
mov rsi, [r14+8]; google::protobuf::io::Printer *
mov rdi, rbx; this
call _ZN6google8protobuf8compiler4java20WriteFieldDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorE; google::protobuf::compiler::java::WriteFieldDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*)
mov rax, [r14]
lea rdx, aDeprecationPub_36; "$deprecation$public java.util.List<$typ"...
lea rcx, aReturnJavaUtil; "return java.util.Collections.unmodifiab"...
lea r8, aReturnNameBuil_0; "return $name$Builder_.getMessageList();"...
mov rdi, r14
mov rsi, rbx
xor r9d, r9d
call qword ptr [rax+0B8h]
mov rsi, [r14+8]; google::protobuf::io::Printer *
mov rdi, rbx; this
call _ZN6google8protobuf8compiler4java20WriteFieldDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorE; google::protobuf::compiler::java::WriteFieldDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*)
mov rax, [r14]
lea rdx, aDeprecationPub_37; "$deprecation$public int ${$get$capitali"...
lea rcx, aReturnNameSize; "return $name$_.size();\n"
lea r8, aReturnNameBuil_1; "return $name$Builder_.getCount();\n"
mov rdi, r14
mov rsi, rbx
xor r9d, r9d
call qword ptr [rax+0B8h]
mov rsi, [r14+8]; google::protobuf::io::Printer *
mov rdi, rbx; this
call _ZN6google8protobuf8compiler4java20WriteFieldDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorE; google::protobuf::compiler::java::WriteFieldDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*)
mov rax, [r14]
lea rdx, aDeprecationPub_38; "$deprecation$public $type$ ${$get$capit"...
lea rcx, aReturnNameGetI; "return $name$_.get(index);\n"
lea r8, aReturnNameBuil_2; "return $name$Builder_.getMessage(index)"...
mov rdi, r14
mov rsi, rbx
xor r9d, r9d
call qword ptr [rax+0B8h]
mov rsi, [r14+8]; google::protobuf::io::Printer *
mov rdi, rbx; this
call _ZN6google8protobuf8compiler4java20WriteFieldDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorE; google::protobuf::compiler::java::WriteFieldDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*)
mov rax, [r14]
lea rdx, aDeprecationPub_39; "$deprecation$public Builder ${$set$capi"...
lea rcx, aIfValueNullThr_2; "if (value == null) {\n throw new NullP"...
lea r8, aNameBuilderSet_1; "$name$Builder_.setMessage(index, value)"...
lea r12, aSetHasFieldBit_0+29h; "return this;\n"
mov rdi, r14
mov rsi, rbx
mov r9, r12
call qword ptr [rax+0B8h]
mov rsi, [r14+8]; google::protobuf::io::Printer *
mov rdi, rbx; this
call _ZN6google8protobuf8compiler4java20WriteFieldDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorE; google::protobuf::compiler::java::WriteFieldDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*)
mov rax, [r14]
lea rdx, aDeprecationPub_40; "$deprecation$public Builder ${$set$capi"...
lea rcx, aEnsureCapitali; "ensure$capitalized_name$IsMutable();\n$"...
lea r8, aNameBuilderSet_2; "$name$Builder_.setMessage(index, builde"...
mov rdi, r14
mov rsi, rbx
mov r9, r12
call qword ptr [rax+0B8h]
mov rsi, [r14+8]; google::protobuf::io::Printer *
mov rdi, rbx; this
call _ZN6google8protobuf8compiler4java20WriteFieldDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorE; google::protobuf::compiler::java::WriteFieldDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*)
mov rax, [r14]
lea rdx, aDeprecationPub_41; "$deprecation$public Builder ${$add$capi"...
lea rcx, aIfValueNullThr_3; "if (value == null) {\n throw new NullP"...
lea r8, aNameBuilderAdd; "$name$Builder_.addMessage(value);\n"
mov rdi, r14
mov rsi, rbx
mov r9, r12
call qword ptr [rax+0B8h]
mov rsi, [r14+8]; google::protobuf::io::Printer *
mov rdi, rbx; this
call _ZN6google8protobuf8compiler4java20WriteFieldDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorE; google::protobuf::compiler::java::WriteFieldDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*)
mov rax, [r14]
lea rdx, aDeprecationPub_42; "$deprecation$public Builder ${$add$capi"...
lea rcx, aIfValueNullThr_4; "if (value == null) {\n throw new NullP"...
lea r8, aNameBuilderAdd_0; "$name$Builder_.addMessage(index, value)"...
mov rdi, r14
mov rsi, rbx
mov r9, r12
call qword ptr [rax+0B8h]
mov rsi, [r14+8]; google::protobuf::io::Printer *
mov rdi, rbx; this
call _ZN6google8protobuf8compiler4java20WriteFieldDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorE; google::protobuf::compiler::java::WriteFieldDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*)
mov rax, [r14]
lea rdx, aDeprecationPub_43; "$deprecation$public Builder ${$add$capi"...
lea rcx, aEnsureCapitali_0; "ensure$capitalized_name$IsMutable();\n$"...
lea r8, aNameBuilderAdd_1; "$name$Builder_.addMessage(builderForVal"...
mov rdi, r14
mov rsi, rbx
mov r9, r12
call qword ptr [rax+0B8h]
mov rsi, [r14+8]; google::protobuf::io::Printer *
mov rdi, rbx; this
call _ZN6google8protobuf8compiler4java20WriteFieldDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorE; google::protobuf::compiler::java::WriteFieldDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*)
mov rax, [r14]
lea rdx, aDeprecationPub_44; "$deprecation$public Builder ${$add$capi"...
lea rcx, aEnsureCapitali_1; "ensure$capitalized_name$IsMutable();\n$"...
lea r8, aNameBuilderAdd_2; "$name$Builder_.addMessage(index, builde"...
mov rdi, r14
mov rsi, rbx
mov r9, r12
call qword ptr [rax+0B8h]
mov rsi, [r14+8]; google::protobuf::io::Printer *
mov rdi, rbx; this
call _ZN6google8protobuf8compiler4java20WriteFieldDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorE; google::protobuf::compiler::java::WriteFieldDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*)
mov rax, [r14]
lea rdx, aDeprecationPub_45; "$deprecation$public Builder ${$addAll$c"...
lea rcx, aEnsureCapitali_2; "ensure$capitalized_name$IsMutable();\nc"...
lea r8, aNameBuilderAdd_3; "$name$Builder_.addAllMessages(values);"...
mov rdi, r14
mov rsi, rbx
mov r9, r12
call qword ptr [rax+0B8h]
mov rsi, [r14+8]; google::protobuf::io::Printer *
mov rdi, rbx; this
call _ZN6google8protobuf8compiler4java20WriteFieldDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorE; google::protobuf::compiler::java::WriteFieldDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*)
mov rax, [r14]
lea rdx, aDeprecationPub_28; "$deprecation$public Builder ${$clear$ca"...
lea rcx, aNameJavaUtilCo; "$name$_ = java.util.Collections.emptyLi"...
lea r8, aNameNullNameBu+10h; "$name$Builder_.clear();\n"
mov rdi, r14
mov rsi, rbx
mov r9, r12
call qword ptr [rax+0B8h]
mov rsi, [r14+8]; google::protobuf::io::Printer *
mov rdi, rbx; this
call _ZN6google8protobuf8compiler4java20WriteFieldDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorE; google::protobuf::compiler::java::WriteFieldDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*)
mov rax, [r14]
lea rdx, aDeprecationPub_46; "$deprecation$public Builder ${$remove$c"...
lea rcx, aEnsureCapitali_3; "ensure$capitalized_name$IsMutable();\n$"...
lea r8, aNameBuilderRem; "$name$Builder_.remove(index);\n"
mov rdi, r14
mov rsi, rbx
mov r9, r12
call qword ptr [rax+0B8h]
mov rsi, [r14+8]; google::protobuf::io::Printer *
mov rdi, rbx; this
call _ZN6google8protobuf8compiler4java20WriteFieldDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorE; google::protobuf::compiler::java::WriteFieldDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*)
lea rdx, aDeprecationPub_47; "$deprecation$public $type$.Builder ${$g"...
mov rdi, rbx; this
mov rsi, r15
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
mov rcx, [r14+8]
lea r12, a0oneof1+0Bh; "{"
lea r13, aKotlinJvmJvmsy_32+0E3h; "}"
mov rdi, rbx
mov rsi, r12
mov rdx, r13
call _ZN6google8protobuf2io7Printer8AnnotateINS0_15FieldDescriptorEEEvPKcS6_PKT_; google::protobuf::io::Printer::Annotate<google::protobuf::FieldDescriptor>(char const*,char const*,google::protobuf::FieldDescriptor const*)
mov rsi, [r14+8]; google::protobuf::io::Printer *
mov rdi, rbx; this
call _ZN6google8protobuf8compiler4java20WriteFieldDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorE; google::protobuf::compiler::java::WriteFieldDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*)
lea rdx, aDeprecationPub_48; "$deprecation$public $type$OrBuilder ${$"...
mov rdi, rbx; this
mov rsi, r15
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
mov rcx, [r14+8]
mov rdi, rbx
mov rsi, r12
mov rdx, r13
call _ZN6google8protobuf2io7Printer8AnnotateINS0_15FieldDescriptorEEEvPKcS6_PKT_; google::protobuf::io::Printer::Annotate<google::protobuf::FieldDescriptor>(char const*,char const*,google::protobuf::FieldDescriptor const*)
mov rsi, [r14+8]; google::protobuf::io::Printer *
mov rdi, rbx; this
call _ZN6google8protobuf8compiler4java20WriteFieldDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorE; google::protobuf::compiler::java::WriteFieldDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*)
lea rdx, aDeprecationPub_49; "$deprecation$public java.util.List<? ex"...
mov rdi, rbx; this
mov rsi, r15
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
mov rcx, [r14+8]
mov rdi, rbx
mov rsi, r12
mov rdx, r13
call _ZN6google8protobuf2io7Printer8AnnotateINS0_15FieldDescriptorEEEvPKcS6_PKT_; google::protobuf::io::Printer::Annotate<google::protobuf::FieldDescriptor>(char const*,char const*,google::protobuf::FieldDescriptor const*)
mov rsi, [r14+8]; google::protobuf::io::Printer *
mov rdi, rbx; this
call _ZN6google8protobuf8compiler4java20WriteFieldDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorE; google::protobuf::compiler::java::WriteFieldDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*)
lea rdx, aDeprecationPub_50; "$deprecation$public $type$.Builder ${$a"...
mov rdi, rbx; this
mov rsi, r15
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
mov rcx, [r14+8]
mov rdi, rbx
mov rsi, r12
mov rdx, r13
call _ZN6google8protobuf2io7Printer8AnnotateINS0_15FieldDescriptorEEEvPKcS6_PKT_; google::protobuf::io::Printer::Annotate<google::protobuf::FieldDescriptor>(char const*,char const*,google::protobuf::FieldDescriptor const*)
mov rsi, [r14+8]; google::protobuf::io::Printer *
mov rdi, rbx; this
call _ZN6google8protobuf8compiler4java20WriteFieldDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorE; google::protobuf::compiler::java::WriteFieldDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*)
lea rdx, aDeprecationPub_51; "$deprecation$public $type$.Builder ${$a"...
mov rdi, rbx; this
mov rsi, r15
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
mov rcx, [r14+8]
mov rdi, rbx
mov rsi, r12
mov rdx, r13
call _ZN6google8protobuf2io7Printer8AnnotateINS0_15FieldDescriptorEEEvPKcS6_PKT_; google::protobuf::io::Printer::Annotate<google::protobuf::FieldDescriptor>(char const*,char const*,google::protobuf::FieldDescriptor const*)
mov rsi, [r14+8]; google::protobuf::io::Printer *
mov rdi, rbx; this
call _ZN6google8protobuf8compiler4java20WriteFieldDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorE; google::protobuf::compiler::java::WriteFieldDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*)
lea rdx, aDeprecationPub_52; "$deprecation$public java.util.List<$typ"...
mov rdi, rbx; this
mov rsi, r15
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
mov rcx, [r14+8]
mov rdi, rbx
mov rsi, r12
mov rdx, r13
pop rbx
pop r12
pop r13
pop r14
pop r15
jmp _ZN6google8protobuf2io7Printer8AnnotateINS0_15FieldDescriptorEEEvPKcS6_PKT_; google::protobuf::io::Printer::Annotate<google::protobuf::FieldDescriptor>(char const*,char const*,google::protobuf::FieldDescriptor const*)
| GenerateBuilderMembers:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
LEA R15,[RDI + 0x18]
LEA RDX,[0x2db468]
MOV RDI,RSI
MOV RSI,R15
CALL 0x0026cd32
LEA RDX,[0x2db56d]
MOV RDI,RBX
MOV RSI,R15
CALL 0x0026cd32
MOV RSI,qword ptr [R14 + 0x8]
MOV RDI,RBX
CALL 0x001cfb21
MOV RAX,qword ptr [R14]
LEA RDX,[0x2db5e3]
LEA RCX,[0x2db630]
LEA R8,[0x2db669]
MOV RDI,R14
MOV RSI,RBX
XOR R9D,R9D
CALL qword ptr [RAX + 0xb8]
MOV RSI,qword ptr [R14 + 0x8]
MOV RDI,RBX
CALL 0x001cfb21
MOV RAX,qword ptr [R14]
LEA RDX,[0x2db692]
LEA RCX,[0x2db6cd]
LEA R8,[0x2db6e5]
MOV RDI,R14
MOV RSI,RBX
XOR R9D,R9D
CALL qword ptr [RAX + 0xb8]
MOV RSI,qword ptr [R14 + 0x8]
MOV RDI,RBX
CALL 0x001cfb21
MOV RAX,qword ptr [R14]
LEA RDX,[0x2db708]
LEA RCX,[0x2db74a]
LEA R8,[0x2db766]
MOV RDI,R14
MOV RSI,RBX
XOR R9D,R9D
CALL qword ptr [RAX + 0xb8]
MOV RSI,qword ptr [R14 + 0x8]
MOV RDI,RBX
CALL 0x001cfb21
MOV RAX,qword ptr [R14]
LEA RDX,[0x2db790]
LEA RCX,[0x2db7e6]
LEA R8,[0x2db86f]
LEA R12,[0x2d95f3]
MOV RDI,R14
MOV RSI,RBX
MOV R9,R12
CALL qword ptr [RAX + 0xb8]
MOV RSI,qword ptr [R14 + 0x8]
MOV RDI,RBX
CALL 0x001cfb21
MOV RAX,qword ptr [R14]
LEA RDX,[0x2db899]
LEA RCX,[0x2db901]
LEA R8,[0x2db961]
MOV RDI,R14
MOV RSI,RBX
MOV R9,R12
CALL qword ptr [RAX + 0xb8]
MOV RSI,qword ptr [R14 + 0x8]
MOV RDI,RBX
CALL 0x001cfb21
MOV RAX,qword ptr [R14]
LEA RDX,[0x2db99d]
LEA RCX,[0x2db9e3]
LEA R8,[0x2dba65]
MOV RDI,R14
MOV RSI,RBX
MOV R9,R12
CALL qword ptr [RAX + 0xb8]
MOV RSI,qword ptr [R14 + 0x8]
MOV RDI,RBX
CALL 0x001cfb21
MOV RAX,qword ptr [R14]
LEA RDX,[0x2dba88]
LEA RCX,[0x2dbade]
LEA R8,[0x2dbb67]
MOV RDI,R14
MOV RSI,RBX
MOV R9,R12
CALL qword ptr [RAX + 0xb8]
MOV RSI,qword ptr [R14 + 0x8]
MOV RDI,RBX
CALL 0x001cfb21
MOV RAX,qword ptr [R14]
LEA RDX,[0x2dbb91]
LEA RCX,[0x2dbbee]
LEA R8,[0x2dbc47]
MOV RDI,R14
MOV RSI,RBX
MOV R9,R12
CALL qword ptr [RAX + 0xb8]
MOV RSI,qword ptr [R14 + 0x8]
MOV RDI,RBX
CALL 0x001cfb21
MOV RAX,qword ptr [R14]
LEA RDX,[0x2dbc7c]
LEA RCX,[0x2dbce4]
LEA R8,[0x2dbd44]
MOV RDI,R14
MOV RSI,RBX
MOV R9,R12
CALL qword ptr [RAX + 0xb8]
MOV RSI,qword ptr [R14 + 0x8]
MOV RDI,RBX
CALL 0x001cfb21
MOV RAX,qword ptr [R14]
LEA RDX,[0x2dbd80]
LEA RCX,[0x2dbded]
LEA R8,[0x2dbe6e]
MOV RDI,R14
MOV RSI,RBX
MOV R9,R12
CALL qword ptr [RAX + 0xb8]
MOV RSI,qword ptr [R14 + 0x8]
MOV RDI,RBX
CALL 0x001cfb21
MOV RAX,qword ptr [R14]
LEA RDX,[0x2da812]
LEA RCX,[0x2dbe96]
LEA R8,[0x2dc64e]
MOV RDI,R14
MOV RSI,RBX
MOV R9,R12
CALL qword ptr [RAX + 0xb8]
MOV RSI,qword ptr [R14 + 0x8]
MOV RDI,RBX
CALL 0x001cfb21
MOV RAX,qword ptr [R14]
LEA RDX,[0x2dbeee]
LEA RCX,[0x2dbf34]
LEA R8,[0x2dbf7e]
MOV RDI,R14
MOV RSI,RBX
MOV R9,R12
CALL qword ptr [RAX + 0xb8]
MOV RSI,qword ptr [R14 + 0x8]
MOV RDI,RBX
CALL 0x001cfb21
LEA RDX,[0x2dbf9d]
MOV RDI,RBX
MOV RSI,R15
CALL 0x0026cd32
MOV RCX,qword ptr [R14 + 0x8]
LEA R12,[0x2f00d9]
LEA R13,[0x2e06cd]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
CALL 0x001afc7e
MOV RSI,qword ptr [R14 + 0x8]
MOV RDI,RBX
CALL 0x001cfb21
LEA RDX,[0x2dc038]
MOV RDI,RBX
MOV RSI,R15
CALL 0x0026cd32
MOV RCX,qword ptr [R14 + 0x8]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
CALL 0x001afc7e
MOV RSI,qword ptr [R14 + 0x8]
MOV RDI,RBX
CALL 0x001cfb21
LEA RDX,[0x2dc119]
MOV RDI,RBX
MOV RSI,R15
CALL 0x0026cd32
MOV RCX,qword ptr [R14 + 0x8]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
CALL 0x001afc7e
MOV RSI,qword ptr [R14 + 0x8]
MOV RDI,RBX
CALL 0x001cfb21
LEA RDX,[0x2dc22d]
MOV RDI,RBX
MOV RSI,R15
CALL 0x0026cd32
MOV RCX,qword ptr [R14 + 0x8]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
CALL 0x001afc7e
MOV RSI,qword ptr [R14 + 0x8]
MOV RDI,RBX
CALL 0x001cfb21
LEA RDX,[0x2dc2d7]
MOV RDI,RBX
MOV RSI,R15
CALL 0x0026cd32
MOV RCX,qword ptr [R14 + 0x8]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
CALL 0x001afc7e
MOV RSI,qword ptr [R14 + 0x8]
MOV RDI,RBX
CALL 0x001cfb21
LEA RDX,[0x2dc396]
MOV RDI,RBX
MOV RSI,R15
CALL 0x0026cd32
MOV RCX,qword ptr [R14 + 0x8]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
POP RBX
POP R12
POP R13
POP R14
POP R15
JMP 0x001afc7e
|
/* google::protobuf::compiler::java::RepeatedImmutableMessageFieldGenerator::GenerateBuilderMembers(google::protobuf::io::Printer*)
const */
void __thiscall
google::protobuf::compiler::java::RepeatedImmutableMessageFieldGenerator::GenerateBuilderMembers
(RepeatedImmutableMessageFieldGenerator *this,Printer *param_1)
{
map *pmVar1;
pmVar1 = (map *)(this + 0x18);
io::Printer::Print(param_1,pmVar1,
"private java.util.List<$type$> $name$_ =\n java.util.Collections.emptyList();\nprivate void ensure$capitalized_name$IsMutable() {\n if (!$get_mutable_bit_builder$) {\n $name$_ = new java.util.ArrayList<$type$>($name$_);\n $set_mutable_bit_builder$;\n }\n}\n\n"
);
io::Printer::Print(param_1,pmVar1,
"private com.google.protobuf.RepeatedFieldBuilder$ver$<\n $type$, $type$.Builder, $type$OrBuilder> $name$Builder_;\n\n"
);
WriteFieldDocComment(param_1,*(FieldDescriptor **)(this + 8));
(**(code **)(*(long *)this + 0xb8))
(this,param_1,
"$deprecation$public java.util.List<$type$> ${$get$capitalized_name$List$}$()",
"return java.util.Collections.unmodifiableList($name$_);\n",
"return $name$Builder_.getMessageList();\n",0);
WriteFieldDocComment(param_1,*(FieldDescriptor **)(this + 8));
(**(code **)(*(long *)this + 0xb8))
(this,param_1,"$deprecation$public int ${$get$capitalized_name$Count$}$()",
"return $name$_.size();\n","return $name$Builder_.getCount();\n",0);
WriteFieldDocComment(param_1,*(FieldDescriptor **)(this + 8));
(**(code **)(*(long *)this + 0xb8))
(this,param_1,"$deprecation$public $type$ ${$get$capitalized_name$$}$(int index)",
"return $name$_.get(index);\n","return $name$Builder_.getMessage(index);\n",0);
WriteFieldDocComment(param_1,*(FieldDescriptor **)(this + 8));
(**(code **)(*(long *)this + 0xb8))
(this,param_1,
"$deprecation$public Builder ${$set$capitalized_name$$}$(\n int index, $type$ value)"
,
"if (value == null) {\n throw new NullPointerException();\n}\nensure$capitalized_name$IsMutable();\n$name$_.set(index, value);\n$on_changed$\n"
,"$name$Builder_.setMessage(index, value);\n","return this;\n");
WriteFieldDocComment(param_1,*(FieldDescriptor **)(this + 8));
(**(code **)(*(long *)this + 0xb8))
(this,param_1,
"$deprecation$public Builder ${$set$capitalized_name$$}$(\n int index, $type$.Builder builderForValue)"
,
"ensure$capitalized_name$IsMutable();\n$name$_.set(index, builderForValue.build());\n$on_changed$\n"
,"$name$Builder_.setMessage(index, builderForValue.build());\n","return this;\n");
WriteFieldDocComment(param_1,*(FieldDescriptor **)(this + 8));
(**(code **)(*(long *)this + 0xb8))
(this,param_1,"$deprecation$public Builder ${$add$capitalized_name$$}$($type$ value)",
"if (value == null) {\n throw new NullPointerException();\n}\nensure$capitalized_name$IsMutable();\n$name$_.add(value);\n$on_changed$\n"
,"$name$Builder_.addMessage(value);\n","return this;\n");
WriteFieldDocComment(param_1,*(FieldDescriptor **)(this + 8));
(**(code **)(*(long *)this + 0xb8))
(this,param_1,
"$deprecation$public Builder ${$add$capitalized_name$$}$(\n int index, $type$ value)"
,
"if (value == null) {\n throw new NullPointerException();\n}\nensure$capitalized_name$IsMutable();\n$name$_.add(index, value);\n$on_changed$\n"
,"$name$Builder_.addMessage(index, value);\n","return this;\n");
WriteFieldDocComment(param_1,*(FieldDescriptor **)(this + 8));
(**(code **)(*(long *)this + 0xb8))
(this,param_1,
"$deprecation$public Builder ${$add$capitalized_name$$}$(\n $type$.Builder builderForValue)"
,
"ensure$capitalized_name$IsMutable();\n$name$_.add(builderForValue.build());\n$on_changed$\n"
,"$name$Builder_.addMessage(builderForValue.build());\n","return this;\n");
WriteFieldDocComment(param_1,*(FieldDescriptor **)(this + 8));
(**(code **)(*(long *)this + 0xb8))
(this,param_1,
"$deprecation$public Builder ${$add$capitalized_name$$}$(\n int index, $type$.Builder builderForValue)"
,
"ensure$capitalized_name$IsMutable();\n$name$_.add(index, builderForValue.build());\n$on_changed$\n"
,"$name$Builder_.addMessage(index, builderForValue.build());\n","return this;\n");
WriteFieldDocComment(param_1,*(FieldDescriptor **)(this + 8));
(**(code **)(*(long *)this + 0xb8))
(this,param_1,
"$deprecation$public Builder ${$addAll$capitalized_name$$}$(\n java.lang.Iterable<? extends $type$> values)"
,
"ensure$capitalized_name$IsMutable();\ncom.google.protobuf.AbstractMessageLite.Builder.addAll(\n values, $name$_);\n$on_changed$\n"
,"$name$Builder_.addAllMessages(values);\n","return this;\n");
WriteFieldDocComment(param_1,*(FieldDescriptor **)(this + 8));
(**(code **)(*(long *)this + 0xb8))
(this,param_1,"$deprecation$public Builder ${$clear$capitalized_name$$}$()",
"$name$_ = java.util.Collections.emptyList();\n$clear_mutable_bit_builder$;\n$on_changed$\n"
,"$name$Builder_.clear();\n","return this;\n");
WriteFieldDocComment(param_1,*(FieldDescriptor **)(this + 8));
(**(code **)(*(long *)this + 0xb8))
(this,param_1,"$deprecation$public Builder ${$remove$capitalized_name$$}$(int index)",
"ensure$capitalized_name$IsMutable();\n$name$_.remove(index);\n$on_changed$\n",
"$name$Builder_.remove(index);\n","return this;\n");
WriteFieldDocComment(param_1,*(FieldDescriptor **)(this + 8));
io::Printer::Print(param_1,pmVar1,
"$deprecation$public $type$.Builder ${$get$capitalized_name$Builder$}$(\n int index) {\n return get$capitalized_name$FieldBuilder().getBuilder(index);\n}\n"
);
io::Printer::Annotate<google::protobuf::FieldDescriptor>
(param_1,"{","}",*(FieldDescriptor **)(this + 8));
WriteFieldDocComment(param_1,*(FieldDescriptor **)(this + 8));
io::Printer::Print(param_1,pmVar1,
"$deprecation$public $type$OrBuilder ${$get$capitalized_name$OrBuilder$}$(\n int index) {\n if ($name$Builder_ == null) {\n return $name$_.get(index); } else {\n return $name$Builder_.getMessageOrBuilder(index);\n }\n}\n"
);
io::Printer::Annotate<google::protobuf::FieldDescriptor>
(param_1,"{","}",*(FieldDescriptor **)(this + 8));
WriteFieldDocComment(param_1,*(FieldDescriptor **)(this + 8));
io::Printer::Print(param_1,pmVar1,
"$deprecation$public java.util.List<? extends $type$OrBuilder> \n ${$get$capitalized_name$OrBuilderList$}$() {\n if ($name$Builder_ != null) {\n return $name$Builder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList($name$_);\n }\n}\n"
);
io::Printer::Annotate<google::protobuf::FieldDescriptor>
(param_1,"{","}",*(FieldDescriptor **)(this + 8));
WriteFieldDocComment(param_1,*(FieldDescriptor **)(this + 8));
io::Printer::Print(param_1,pmVar1,
"$deprecation$public $type$.Builder ${$add$capitalized_name$Builder$}$() {\n return get$capitalized_name$FieldBuilder().addBuilder(\n $type$.getDefaultInstance());\n}\n"
);
io::Printer::Annotate<google::protobuf::FieldDescriptor>
(param_1,"{","}",*(FieldDescriptor **)(this + 8));
WriteFieldDocComment(param_1,*(FieldDescriptor **)(this + 8));
io::Printer::Print(param_1,pmVar1,
"$deprecation$public $type$.Builder ${$add$capitalized_name$Builder$}$(\n int index) {\n return get$capitalized_name$FieldBuilder().addBuilder(\n index, $type$.getDefaultInstance());\n}\n"
);
io::Printer::Annotate<google::protobuf::FieldDescriptor>
(param_1,"{","}",*(FieldDescriptor **)(this + 8));
WriteFieldDocComment(param_1,*(FieldDescriptor **)(this + 8));
io::Printer::Print(param_1,pmVar1,
"$deprecation$public java.util.List<$type$.Builder> \n ${$get$capitalized_name$BuilderList$}$() {\n return get$capitalized_name$FieldBuilder().getBuilderList();\n}\nprivate com.google.protobuf.RepeatedFieldBuilder$ver$<\n $type$, $type$.Builder, $type$OrBuilder> \n get$capitalized_name$FieldBuilder() {\n if ($name$Builder_ == null) {\n $name$Builder_ = new com.google.protobuf.RepeatedFieldBuilder$ver$<\n $type$, $type$.Builder, $type$OrBuilder>(\n $name$_,\n $get_mutable_bit_builder$,\n getParentForChildren(),\n isClean());\n $name$_ = null;\n }\n return $name$Builder_;\n}\n"
);
io::Printer::Annotate<google::protobuf::FieldDescriptor>
(param_1,"{","}",*(FieldDescriptor **)(this + 8));
return;
}
| ||
23,114 | psi_rwlock_rdlock | eloqsql/mysys/my_thr_init.c | ATTRIBUTE_COLD
int psi_rwlock_rdlock(mysql_rwlock_t *that, const char *file, uint line)
{
PSI_rwlock_locker_state state;
PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_rdwait)
(&state, that->m_psi, PSI_RWLOCK_READLOCK, file, line);
int result= rw_rdlock(&that->m_rwlock);
if (locker)
PSI_RWLOCK_CALL(end_rwlock_rdwait)(locker, result);
return result;
} | O0 | c | psi_rwlock_rdlock:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq 0x1c9ffe(%rip), %rax # 0x2c2238
movq (%rax), %rax
movq 0x1a0(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x90(%rcx), %rsi
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %r8d
leaq -0x48(%rbp), %rdi
xorl %edx, %edx
callq *%rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
callq 0xfb930
movl %eax, -0x54(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0xf8290
leaq 0x1c9fbb(%rip), %rax # 0x2c2238
movq (%rax), %rax
movq 0x1a8(%rax), %rax
movq -0x50(%rbp), %rdi
movl -0x54(%rbp), %esi
callq *%rax
movl -0x54(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
| psi_rwlock_rdlock:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1A0h]
mov rcx, [rbp+var_8]
mov rsi, [rcx+90h]
mov rcx, [rbp+var_10]
mov r8d, [rbp+var_14]
lea rdi, [rbp+var_48]
xor edx, edx
call rax
mov [rbp+var_50], rax
mov rdi, [rbp+var_8]
call my_rw_rdlock
mov [rbp+var_54], eax
cmp [rbp+var_50], 0
jz short loc_F8290
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1A8h]
mov rdi, [rbp+var_50]
mov esi, [rbp+var_54]
call rax
loc_F8290:
mov eax, [rbp+var_54]
add rsp, 60h
pop rbp
retn
| long long psi_rwlock_rdlock(long long a1, long long a2, unsigned int a3)
{
unsigned int v4; // [rsp+Ch] [rbp-54h]
long long v5; // [rsp+10h] [rbp-50h]
_BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF
unsigned int v7; // [rsp+4Ch] [rbp-14h]
long long v8; // [rsp+50h] [rbp-10h]
long long v9; // [rsp+58h] [rbp-8h]
v9 = a1;
v8 = a2;
v7 = a3;
v5 = ((long long ( *)(_BYTE *, _QWORD, _QWORD, long long, _QWORD))PSI_server[52])(
v6,
*(_QWORD *)(a1 + 144),
0LL,
a2,
a3);
v4 = my_rw_rdlock(v9);
if ( v5 )
((void ( *)(long long, _QWORD))PSI_server[53])(v5, v4);
return v4;
}
| psi_rwlock_rdlock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
LEA RAX,[0x3c2238]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1a0]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x90]
MOV RCX,qword ptr [RBP + -0x10]
MOV R8D,dword ptr [RBP + -0x14]
LEA RDI,[RBP + -0x48]
XOR EDX,EDX
CALL RAX
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001fb930
MOV dword ptr [RBP + -0x54],EAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x001f8290
LEA RAX,[0x3c2238]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1a8]
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,dword ptr [RBP + -0x54]
CALL RAX
LAB_001f8290:
MOV EAX,dword ptr [RBP + -0x54]
ADD RSP,0x60
POP RBP
RET
|
int4 psi_rwlock_rdlock(long param_1,int8 param_2,int4 param_3)
{
int4 uVar1;
long lVar2;
int1 local_50 [52];
int4 local_1c;
int8 local_18;
long local_10;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
lVar2 = (**(code **)(PSI_server + 0x1a0))
(local_50,*(int8 *)(param_1 + 0x90),0,param_2,param_3);
uVar1 = my_rw_rdlock(local_10);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x1a8))(lVar2,uVar1);
}
return uVar1;
}
| |
23,115 | ggml_compute_forward_l2_norm | ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp | void ggml_compute_forward_l2_norm(
const ggml_compute_params * params,
ggml_tensor * dst) {
const ggml_tensor * src0 = dst->src[0];
switch (src0->type) {
case GGML_TYPE_F32:
{
ggml_compute_forward_l2_norm_f32(params, dst);
} break;
default:
{
GGML_ABORT("fatal error");
}
}
} | O0 | cpp | ggml_compute_forward_l2_norm:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq 0x98(%rax), %rax
movq %rax, (%rsp)
movq (%rsp), %rax
movl (%rax), %eax
testl %eax, %eax
jne 0x907cb
jmp 0x907ba
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x907f0
jmp 0x907e5
leaq 0x24ec6(%rip), %rdi # 0xb5698
movl $0xdf6, %esi # imm = 0xDF6
leaq 0x1b2b6(%rip), %rdx # 0xaba94
movb $0x0, %al
callq 0x10660
addq $0x18, %rsp
retq
nopw (%rax,%rax)
| ggml_compute_forward_l2_norm:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov [rsp+18h+var_10], rsi
mov rax, [rsp+18h+var_10]
mov rax, [rax+98h]
mov [rsp+18h+var_18], rax
mov rax, [rsp+18h+var_18]
mov eax, [rax]
test eax, eax
jnz short loc_907CB
jmp short $+2
loc_907BA:
mov rdi, [rsp+18h+var_8]
mov rsi, [rsp+18h+var_10]
call _ZL32ggml_compute_forward_l2_norm_f32PK19ggml_compute_paramsP11ggml_tensor; ggml_compute_forward_l2_norm_f32(ggml_compute_params const*,ggml_tensor *)
jmp short loc_907E5
loc_907CB:
lea rdi, aWorkspaceLlm4b_6; "/workspace/llm4binary/github/2025_star3"...
mov esi, 0DF6h
lea rdx, aFatalError; "fatal error"
mov al, 0
call _ggml_abort
loc_907E5:
add rsp, 18h
retn
| double ggml_compute_forward_l2_norm(long long a1, long long a2)
{
double result; // xmm0_8
if ( **(_DWORD **)(a2 + 152) )
return ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp",
3574LL,
"fatal error");
ggml_compute_forward_l2_norm_f32(a1, a2);
return result;
}
| ggml_compute_forward_l2_norm:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x8],RSI
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x98]
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP]
MOV EAX,dword ptr [RAX]
TEST EAX,EAX
JNZ 0x001907cb
JMP 0x001907ba
LAB_001907ba:
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x001907f0
JMP 0x001907e5
LAB_001907cb:
LEA RDI,[0x1b5698]
MOV ESI,0xdf6
LEA RDX,[0x1aba94]
MOV AL,0x0
CALL 0x00110660
LAB_001907e5:
ADD RSP,0x18
RET
|
void ggml_compute_forward_l2_norm(ggml_compute_params *param_1,ggml_tensor *param_2)
{
if (**(int **)(param_2 + 0x98) == 0) {
ggml_compute_forward_l2_norm_f32(param_1,param_2);
}
else {
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp"
,0xdf6,"fatal error");
}
return;
}
| |
23,116 | ggml_compute_forward_l2_norm | ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp | void ggml_compute_forward_l2_norm(
const ggml_compute_params * params,
ggml_tensor * dst) {
const ggml_tensor * src0 = dst->src[0];
switch (src0->type) {
case GGML_TYPE_F32:
{
ggml_compute_forward_l2_norm_f32(params, dst);
} break;
default:
{
GGML_ABORT("fatal error");
}
}
} | O1 | cpp | ggml_compute_forward_l2_norm:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp # imm = 0x158
movq 0x98(%rsi), %rbx
cmpl $0x0, (%rbx)
jne 0x39b93
movq %rdi, %r15
movq %rbx, %rdi
movq %rsi, 0x80(%rsp)
callq 0xaf20
testb %al, %al
je 0x39bad
cmpq $0x4, 0x30(%rbx)
jne 0x39bc9
movq 0x80(%rsp), %rdx
vmovss 0x54(%rdx), %xmm1
vxorps %xmm0, %xmm0, %xmm0
vmovaps %xmm1, 0x100(%rsp)
vucomiss %xmm0, %xmm1
jb 0x39be5
movq %rbx, %rsi
movq 0x28(%rbx), %rax
movq %rax, 0xa0(%rsp)
testq %rax, %rax
jle 0x39b7e
movslq (%r15), %rdi
movslq 0x4(%r15), %r8
movq 0x10(%rsi), %rbp
movq 0x18(%rsi), %rax
movq %rax, 0x88(%rsp)
movq 0x20(%rsi), %rax
movq %rax, 0x50(%rsp)
movq 0x38(%rsi), %r9
movq 0x40(%rsi), %rax
movq %rax, 0x60(%rsp)
movq 0x38(%rdx), %r10
movl %ebp, %r12d
andl $-0x40, %r12d
movslq %r12d, %rax
movslq %ebp, %rbx
leaq 0x1(%rax), %rcx
cmpq %rbx, %rcx
cmovgq %rcx, %rbx
subq %rax, %rbx
leaq -0x1(%rbx), %rcx
vpbroadcastq %rcx, %zmm0
vmovdqu64 %zmm0, 0x110(%rsp)
movq %r9, %rcx
imulq %rdi, %rcx
movq %rcx, 0x48(%rsp)
movq %r9, 0xc8(%rsp)
imulq %r8, %r9
movq %r9, 0xb8(%rsp)
movq %r10, %rcx
movq %rdi, 0x68(%rsp)
imulq %rdi, %rcx
movq %r10, 0xc0(%rsp)
movq %r8, 0xd0(%rsp)
imulq %r8, %r10
movq %r10, 0xb0(%rsp)
movq %rcx, 0x40(%rsp)
leaq (%rcx,%rax,4), %rax
movq %rax, 0x38(%rsp)
addq $0x7, %rbx
andq $-0x8, %rbx
movq 0x48(%rsi), %rax
movq %rax, 0x30(%rsp)
movq 0x40(%rdx), %rax
movq %rax, 0x58(%rsp)
movq 0x48(%rdx), %rax
movq %rax, 0x28(%rsp)
leaq (,%rbp,4), %rax
movq %rax, 0xa8(%rsp)
movq $0x0, 0x10(%rsp)
movq %rsi, 0xd8(%rsp)
cmpq $0x0, 0x50(%rsp)
jle 0x39b4a
movq 0x10(%rsp), %rax
movq %rax, %rcx
imulq 0x30(%rsp), %rcx
movq %rcx, 0xe8(%rsp)
imulq 0x28(%rsp), %rax
movq %rax, 0xe0(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x20(%rsp)
movq $0x0, 0x18(%rsp)
movq 0x88(%rsp), %rax
cmpq 0x68(%rsp), %rax
jle 0x39b14
movq 0x18(%rsp), %rax
movq %rax, %rcx
imulq 0x60(%rsp), %rcx
movq %rcx, 0xf8(%rsp)
imulq 0x58(%rsp), %rax
movq %rax, 0xf0(%rsp)
movq 0x78(%rsp), %rdi
movq 0x70(%rsp), %r8
movq 0x20(%rsp), %r13
movq 0x68(%rsp), %r14
movq 0xf8(%rsi), %rsi
testq %rbp, %rbp
movq %rdi, 0x98(%rsp)
movq %r8, 0x90(%rsp)
jle 0x39999
leaq (%rsi,%r13), %rax
vpxor %xmm0, %xmm0, %xmm0
xorl %ecx, %ecx
vmovss (%rax,%rcx,4), %xmm1
vmulss %xmm1, %xmm1, %xmm1
vcvtss2sd %xmm1, %xmm1, %xmm1
vaddsd %xmm1, %xmm0, %xmm0
incq %rcx
cmpq %rcx, %rbp
jne 0x3997a
vcvtsd2ss %xmm0, %xmm0, %xmm0
jmp 0x3999d
vpxor %xmm0, %xmm0, %xmm0
vmovss %xmm0, 0xc(%rsp)
movq %r14, %rax
imulq 0xc8(%rsp), %rax
addq 0xf8(%rsp), %rax
addq 0xe8(%rsp), %rax
addq %rax, %rsi
movq 0xf8(%rdx), %r15
movq %r14, %rdi
imulq 0xc0(%rsp), %rdi
addq 0xf0(%rsp), %rdi
addq 0xe0(%rsp), %rdi
addq %r15, %rdi
movq 0xa8(%rsp), %rdx
vzeroupper
callq 0xa700
vmovss 0xc(%rsp), %xmm0
vucomiss 0x19b62(%rip), %xmm0 # 0x53568
jb 0x39a0e
vsqrtss %xmm0, %xmm0, %xmm0
jmp 0x39a13
callq 0xb090
vmovdqu64 0x110(%rsp), %zmm3
vpmovsxbq 0x104f8(%rip), %zmm4 # 0x49f20
movq 0x98(%rsp), %rdi
movq 0x90(%rsp), %r8
vmovaps 0x100(%rsp), %xmm2
vmaxss %xmm0, %xmm2, %xmm1
vcmpunordss %xmm0, %xmm0, %k1
vmovss %xmm2, %xmm1, %xmm1 {%k1}
vmovss 0xf646(%rip), %xmm0 # 0x490a0
vdivss %xmm1, %xmm0, %xmm0
testl %r12d, %r12d
movq 0xd8(%rsp), %rsi
jle 0x39aa3
vbroadcastss %xmm0, %zmm1
leaq (%r15,%r8), %rax
xorl %ecx, %ecx
xorl %edx, %edx
vmulps (%rax,%rdx), %zmm1, %zmm2
vmovups %zmm2, (%rax,%rdx)
addq $0x40, %rdx
cmpq $0x100, %rdx # imm = 0x100
jne 0x39a79
addq $0x40, %rcx
addq $0x100, %rax # imm = 0x100
cmpq %r12, %rcx
jb 0x39a77
cmpl %ebp, %r12d
je 0x39ae0
vbroadcastss %xmm0, %ymm0
addq %rdi, %r15
xorl %eax, %eax
vpbroadcastq %rax, %zmm1
vporq %zmm4, %zmm1, %zmm1
vpcmpleuq %zmm3, %zmm1, %k1
vmovups (%r15,%rax,4), %ymm1 {%k1} {z}
vmulps %ymm1, %ymm0, %ymm1
vmovups %ymm1, (%r15,%rax,4) {%k1}
addq $0x8, %rax
cmpq %rax, %rbx
jne 0x39ab2
addq 0xd0(%rsp), %r14
addq 0xb8(%rsp), %r13
movq 0xb0(%rsp), %rax
addq %rax, %r8
addq %rax, %rdi
cmpq 0x88(%rsp), %r14
movq 0x80(%rsp), %rdx
jl 0x39954
movq 0x18(%rsp), %rcx
incq %rcx
movq 0x20(%rsp), %rax
addq 0x60(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x58(%rsp), %rax
addq %rax, 0x70(%rsp)
addq %rax, 0x78(%rsp)
movq %rcx, 0x18(%rsp)
cmpq 0x50(%rsp), %rcx
jne 0x39909
movq 0x10(%rsp), %rcx
incq %rcx
movq 0x30(%rsp), %rax
addq %rax, 0x48(%rsp)
movq 0x28(%rsp), %rax
addq %rax, 0x40(%rsp)
addq %rax, 0x38(%rsp)
movq %rcx, 0x10(%rsp)
cmpq 0xa0(%rsp), %rcx
jne 0x398b2
addq $0x158, %rsp # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
vzeroupper
retq
leaq 0x19f06(%rip), %rdi # 0x53aa0
leaq 0xfadf(%rip), %rdx # 0x49680
movl $0xdf6, %esi # imm = 0xDF6
xorl %eax, %eax
callq 0xaf40
leaq 0x19eec(%rip), %rdi # 0x53aa0
leaq 0xf9af(%rip), %rdx # 0x4956a
leaq 0x197f1(%rip), %rcx # 0x533b3
movl $0xdc4, %esi # imm = 0xDC4
jmp 0x39bff
leaq 0x19ed0(%rip), %rdi # 0x53aa0
leaq 0xf993(%rip), %rdx # 0x4956a
leaq 0x1a3d5(%rip), %rcx # 0x53fb3
movl $0xdc6, %esi # imm = 0xDC6
jmp 0x39bff
leaq 0x19eb4(%rip), %rdi # 0x53aa0
leaq 0xf977(%rip), %rdx # 0x4956a
leaq 0x1a53f(%rip), %rcx # 0x54139
movl $0xdd0, %esi # imm = 0xDD0
xorl %eax, %eax
callq 0xaf40
| ggml_compute_forward_l2_norm:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 158h
mov rbx, [rsi+98h]
cmp dword ptr [rbx], 0
jnz loc_39B93
mov r15, rdi
mov rdi, rbx
mov [rsp+188h+var_108], rsi
call _ggml_are_same_shape
test al, al
jz loc_39BAD
cmp qword ptr [rbx+30h], 4
jnz loc_39BC9
mov rdx, [rsp+188h+var_108]
vmovss xmm1, dword ptr [rdx+54h]
vxorps xmm0, xmm0, xmm0
vmovaps [rsp+188h+var_88], xmm1
vucomiss xmm1, xmm0
jb loc_39BE5
mov rsi, rbx
mov rax, [rbx+28h]
mov [rsp+188h+var_E8], rax
test rax, rax
jle loc_39B7E
movsxd rdi, dword ptr [r15]
movsxd r8, dword ptr [r15+4]
mov rbp, [rsi+10h]
mov rax, [rsi+18h]
mov [rsp+188h+var_100], rax
mov rax, [rsi+20h]
mov [rsp+188h+var_138], rax
mov r9, [rsi+38h]
mov rax, [rsi+40h]
mov [rsp+188h+var_128], rax
mov r10, [rdx+38h]
mov r12d, ebp
and r12d, 0FFFFFFC0h
movsxd rax, r12d
movsxd rbx, ebp
lea rcx, [rax+1]
cmp rcx, rbx
cmovg rbx, rcx
sub rbx, rax
lea rcx, [rbx-1]
vpbroadcastq zmm0, rcx
vmovdqu64 zmmword ptr [rsp+188h+var_78], zmm0
mov rcx, r9
imul rcx, rdi
mov [rsp+188h+var_140], rcx
mov [rsp+188h+var_C0], r9
imul r9, r8
mov [rsp+188h+var_D0], r9
mov rcx, r10
mov [rsp+188h+var_120], rdi
imul rcx, rdi
mov [rsp+188h+var_C8], r10
mov [rsp+188h+var_B8], r8
imul r10, r8
mov [rsp+188h+var_D8], r10
mov [rsp+188h+var_148], rcx
lea rax, [rcx+rax*4]
mov [rsp+188h+var_150], rax
add rbx, 7
and rbx, 0FFFFFFFFFFFFFFF8h
mov rax, [rsi+48h]
mov [rsp+188h+var_158], rax
mov rax, [rdx+40h]
mov [rsp+188h+var_130], rax
mov rax, [rdx+48h]
mov [rsp+188h+var_160], rax
lea rax, ds:0[rbp*4]
mov [rsp+188h+var_E0], rax
mov [rsp+188h+var_178], 0
mov [rsp+188h+var_B0], rsi
loc_398B2:
cmp [rsp+188h+var_138], 0
jle loc_39B4A
mov rax, [rsp+188h+var_178]
mov rcx, rax
imul rcx, [rsp+188h+var_158]
mov [rsp+188h+var_A0], rcx
imul rax, [rsp+188h+var_160]
mov [rsp+188h+var_A8], rax
mov rax, [rsp+188h+var_150]
mov [rsp+188h+var_110], rax
mov rax, [rsp+188h+var_148]
mov [rsp+188h+var_118], rax
mov rax, [rsp+188h+var_140]
mov [rsp+188h+var_168], rax
mov [rsp+188h+var_170], 0
loc_39909:
mov rax, [rsp+188h+var_100]
cmp rax, [rsp+188h+var_120]
jle loc_39B14
mov rax, [rsp+188h+var_170]
mov rcx, rax
imul rcx, [rsp+188h+var_128]
mov [rsp+188h+var_90], rcx
imul rax, [rsp+188h+var_130]
mov [rsp+188h+var_98], rax
mov rdi, [rsp+188h+var_110]
mov r8, [rsp+188h+var_118]
mov r13, [rsp+188h+var_168]
mov r14, [rsp+188h+var_120]
loc_39954:
mov rsi, [rsi+0F8h]
test rbp, rbp
mov [rsp+188h+var_F0], rdi
mov [rsp+188h+var_F8], r8
jle short loc_39999
lea rax, [rsi+r13]
vpxor xmm0, xmm0, xmm0
xor ecx, ecx
loc_3997A:
vmovss xmm1, dword ptr [rax+rcx*4]
vmulss xmm1, xmm1, xmm1
vcvtss2sd xmm1, xmm1, xmm1
vaddsd xmm0, xmm0, xmm1
inc rcx
cmp rbp, rcx
jnz short loc_3997A
vcvtsd2ss xmm0, xmm0, xmm0
jmp short loc_3999D
loc_39999:
vpxor xmm0, xmm0, xmm0
loc_3999D:
vmovss [rsp+188h+var_17C], xmm0
mov rax, r14
imul rax, [rsp+188h+var_C0]
add rax, [rsp+188h+var_90]
add rax, [rsp+188h+var_A0]
add rsi, rax
mov r15, [rdx+0F8h]
mov rdi, r14
imul rdi, [rsp+188h+var_C8]
add rdi, [rsp+188h+var_98]
add rdi, [rsp+188h+var_A8]
add rdi, r15
mov rdx, [rsp+188h+var_E0]
vzeroupper
call _memcpy
vmovss xmm0, [rsp+188h+var_17C]
vucomiss xmm0, cs:dword_53568
jb short loc_39A0E
vsqrtss xmm0, xmm0, xmm0
jmp short loc_39A13
loc_39A0E:
call _sqrtf
loc_39A13:
vmovdqu64 zmm3, zmmword ptr [rsp+188h+var_78]
vpmovsxbq zmm4, cs:qword_49F20
mov rdi, [rsp+188h+var_F0]
mov r8, [rsp+188h+var_F8]
vmovaps xmm2, [rsp+188h+var_88]
vmaxss xmm1, xmm2, xmm0
vcmpunordss k1, xmm0, xmm0
vmovss xmm1{k1}, xmm1, xmm2
vmovss xmm0, cs:dword_490A0
vdivss xmm0, xmm0, xmm1
test r12d, r12d
mov rsi, [rsp+188h+var_B0]
jle short loc_39AA3
vbroadcastss zmm1, xmm0
lea rax, [r15+r8]
xor ecx, ecx
loc_39A77:
xor edx, edx
loc_39A79:
vmulps zmm2, zmm1, zmmword ptr [rax+rdx]
vmovups zmmword ptr [rax+rdx], zmm2
add rdx, 40h ; '@'
cmp rdx, 100h
jnz short loc_39A79
add rcx, 40h ; '@'
add rax, 100h
cmp rcx, r12
jb short loc_39A77
loc_39AA3:
cmp r12d, ebp
jz short loc_39AE0
vbroadcastss ymm0, xmm0
add r15, rdi
xor eax, eax
loc_39AB2:
vpbroadcastq zmm1, rax
vporq zmm1, zmm1, zmm4
vpcmpleuq k1, zmm1, zmm3
vmovups ymm1{k1}{z}, ymmword ptr [r15+rax*4]
vmulps ymm1, ymm0, ymm1
vmovups ymmword ptr [r15+rax*4]{k1}, ymm1
add rax, 8
cmp rbx, rax
jnz short loc_39AB2
loc_39AE0:
add r14, [rsp+188h+var_B8]
add r13, [rsp+188h+var_D0]
mov rax, [rsp+188h+var_D8]
add r8, rax
add rdi, rax
cmp r14, [rsp+188h+var_100]
mov rdx, [rsp+188h+var_108]
jl loc_39954
loc_39B14:
mov rcx, [rsp+188h+var_170]
inc rcx
mov rax, [rsp+188h+var_168]
add rax, [rsp+188h+var_128]
mov [rsp+188h+var_168], rax
mov rax, [rsp+188h+var_130]
add [rsp+188h+var_118], rax
add [rsp+188h+var_110], rax
mov [rsp+188h+var_170], rcx
cmp rcx, [rsp+188h+var_138]
jnz loc_39909
loc_39B4A:
mov rcx, [rsp+188h+var_178]
inc rcx
mov rax, [rsp+188h+var_158]
add [rsp+188h+var_140], rax
mov rax, [rsp+188h+var_160]
add [rsp+188h+var_148], rax
add [rsp+188h+var_150], rax
mov [rsp+188h+var_178], rcx
cmp rcx, [rsp+188h+var_E8]
jnz loc_398B2
loc_39B7E:
add rsp, 158h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
vzeroupper
retn
loc_39B93:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aFatalError; "fatal error"
mov esi, 0DF6h
xor eax, eax
call _ggml_abort
loc_39BAD:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlCanRepeatS+1Fh; "ggml_are_same_shape(src0, dst)"
mov esi, 0DC4h
jmp short loc_39BFF
loc_39BC9:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aSrc0Nb0SizeofF; "src0->nb[0] == sizeof(float)"
mov esi, 0DC6h
jmp short loc_39BFF
loc_39BE5:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aEps00f; "eps >= 0.0f"
mov esi, 0DD0h
loc_39BFF:
xor eax, eax
call _ggml_abort
| long long ggml_compute_forward_l2_norm(
int *a1,
_QWORD *a2,
__m128 _XMM0,
double a4,
__m128 _XMM2,
double a6,
double a7,
double a8,
double a9,
double a10)
{
long long v10; // rbx
long long v15; // rsi
long long result; // rax
long long v17; // rdi
long long v18; // r8
long long v19; // rbp
long long v20; // r9
long long v21; // r10
unsigned long long v22; // r12
long long v23; // rbx
long long v24; // rbx
unsigned long long v27; // rbx
long long v28; // rdi
long long v29; // r8
long long v30; // r13
long long v31; // r14
long long v32; // rsi
long long v39; // r15
double v40; // xmm4_8
double v41; // xmm5_8
char v43; // cf
unsigned long long j; // rcx
long long v61; // [rsp+10h] [rbp-178h]
long long i; // [rsp+18h] [rbp-170h]
long long v63; // [rsp+20h] [rbp-168h]
long long v64; // [rsp+28h] [rbp-160h]
long long v65; // [rsp+30h] [rbp-158h]
long long v66; // [rsp+38h] [rbp-150h]
long long v67; // [rsp+40h] [rbp-148h]
long long v68; // [rsp+48h] [rbp-140h]
long long v69; // [rsp+50h] [rbp-138h]
long long v70; // [rsp+58h] [rbp-130h]
long long v71; // [rsp+60h] [rbp-128h]
long long v72; // [rsp+68h] [rbp-120h]
long long v73; // [rsp+70h] [rbp-118h]
long long v74; // [rsp+78h] [rbp-110h]
long long v76; // [rsp+88h] [rbp-100h]
long long v77; // [rsp+90h] [rbp-F8h]
long long v78; // [rsp+A0h] [rbp-E8h]
long long v79; // [rsp+B0h] [rbp-D8h]
long long v80; // [rsp+B8h] [rbp-D0h]
long long v81; // [rsp+C0h] [rbp-C8h]
long long v82; // [rsp+C8h] [rbp-C0h]
long long v83; // [rsp+D0h] [rbp-B8h]
long long v84; // [rsp+D8h] [rbp-B0h]
v10 = a2[19];
if ( *(_DWORD *)v10 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp",
3574LL,
"fatal error");
goto LABEL_34;
}
if ( !(unsigned __int8)ggml_are_same_shape(a2[19], a2) )
{
LABEL_34:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp",
3524LL,
"GGML_ASSERT(%s) failed",
"ggml_are_same_shape(src0, dst)");
return ggml_compute_forward_out_prod();
}
if ( *(_QWORD *)(v10 + 48) != 4LL )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp",
3526LL,
"GGML_ASSERT(%s) failed",
"src0->nb[0] == sizeof(float)");
return ggml_compute_forward_out_prod();
}
_RDX = a2;
__asm
{
vmovss xmm1, dword ptr [rdx+54h]
vxorps xmm0, xmm0, xmm0
vmovaps [rsp+188h+var_88], xmm1
vucomiss xmm1, xmm0
}
if ( *(_QWORD *)(v10 + 48) < 4uLL )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp",
3536LL,
"GGML_ASSERT(%s) failed",
"eps >= 0.0f");
return ggml_compute_forward_out_prod();
}
v15 = v10;
result = *(_QWORD *)(v10 + 40);
v78 = result;
if ( result > 0 )
{
v17 = *a1;
v18 = a1[1];
v19 = *(_QWORD *)(v10 + 16);
v76 = *(_QWORD *)(v10 + 24);
v69 = *(_QWORD *)(v10 + 32);
v20 = *(_QWORD *)(v10 + 56);
v71 = *(_QWORD *)(v10 + 64);
v21 = a2[7];
v22 = (unsigned int)v19 & 0xFFFFFFC0;
v23 = (int)v19;
if ( (int)(v19 & 0xFFFFFFC0) + 1LL > (int)v19 )
v23 = (int)v22 + 1LL;
v24 = v23 - (int)v22;
_RCX = v24 - 1;
__asm
{
vpbroadcastq zmm0, rcx
vmovdqu64 zmmword ptr [rsp+188h+var_78], zmm0
}
v68 = v17 * v20;
v82 = v20;
v80 = v18 * v20;
v72 = v17;
v81 = a2[7];
v83 = a1[1];
v79 = v18 * v21;
v67 = v17 * v21;
v66 = v17 * v21 + 4LL * (int)v22;
v27 = (v24 + 7) & 0xFFFFFFFFFFFFFFF8LL;
v65 = *(_QWORD *)(v15 + 72);
v70 = a2[8];
v64 = a2[9];
v61 = 0LL;
v84 = v15;
do
{
if ( v69 > 0 )
{
v74 = v66;
v73 = v67;
v63 = v68;
for ( i = 0LL; i != v69; ++i )
{
if ( v76 > v72 )
{
v28 = v74;
v29 = v73;
v30 = v63;
v31 = v72;
do
{
v32 = *(_QWORD *)(v15 + 248);
v77 = v29;
if ( v19 <= 0 )
{
__asm { vpxor xmm0, xmm0, xmm0 }
}
else
{
_RAX = v32 + v30;
__asm { vpxor xmm0, xmm0, xmm0 }
for ( _RCX = 0LL; _RCX != v19; ++_RCX )
{
__asm
{
vmovss xmm1, dword ptr [rax+rcx*4]
vmulss xmm1, xmm1, xmm1
vcvtss2sd xmm1, xmm1, xmm1
vaddsd xmm0, xmm0, xmm1
}
}
__asm { vcvtsd2ss xmm0, xmm0, xmm0 }
}
__asm { vmovss [rsp+188h+var_17C], xmm0 }
v39 = _RDX[31];
__asm { vzeroupper }
memcpy(v39 + v64 * v61 + v70 * i + v81 * v31, v65 * v61 + v71 * i + v82 * v31 + v32, 4 * v19);
__asm
{
vmovss xmm0, [rsp+188h+var_17C]
vucomiss xmm0, cs:dword_53568
}
if ( v43 )
*(double *)&_XMM0 = sqrtf(
*(double *)&_XMM0,
*(double *)&_XMM1,
*(double *)_XMM2.m128_u64,
a6,
v40,
v41,
a9,
a10);
else
__asm { vsqrtss xmm0, xmm0, xmm0 }
__asm
{
vmovdqu64 zmm3, zmmword ptr [rsp+188h+var_78]
vpmovsxbq zmm4, cs:qword_49F20
vmovaps xmm2, [rsp+188h+var_88]
vmaxss xmm1, xmm2, xmm0
vcmpunordss k1, xmm0, xmm0
vmovss xmm1{k1}, xmm1, xmm2
vmovss xmm0, cs:dword_490A0
vdivss xmm0, xmm0, xmm1
}
v15 = v84;
if ( (int)v22 > 0 )
{
__asm { vbroadcastss zmm1, xmm0 }
_RAX = v39 + v77;
for ( j = 0LL; j < v22; j += 64LL )
{
for ( _RDX = 0LL; _RDX != 256; _RDX += 64LL )
{
__asm
{
vmulps zmm2, zmm1, zmmword ptr [rax+rdx]
vmovups zmmword ptr [rax+rdx], zmm2
}
}
_RAX += 256LL;
}
}
if ( (_DWORD)v22 != (_DWORD)v19 )
{
__asm { vbroadcastss ymm0, xmm0 }
_R15 = v28 + v39;
_RAX = 0LL;
do
{
__asm
{
vpbroadcastq zmm1, rax
vporq zmm1, zmm1, zmm4
vpcmpleuq k1, zmm1, zmm3
vmovups ymm1{k1}{z}, ymmword ptr [r15+rax*4]
vmulps ymm1, ymm0, ymm1
vmovups ymmword ptr [r15+rax*4]{k1}, ymm1
}
_RAX += 8LL;
}
while ( v27 != _RAX );
}
v31 += v83;
v30 += v80;
v29 = v79 + v77;
v28 += v79;
_RDX = a2;
}
while ( v31 < v76 );
}
v63 += v71;
v73 += v70;
v74 += v70;
}
}
v68 += v65;
result = v64;
v67 += v64;
v66 += v64;
++v61;
}
while ( v61 != v78 );
}
__asm { vzeroupper }
return result;
}
| ggml_compute_forward_l2_norm:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x158
MOV RBX,qword ptr [RSI + 0x98]
CMP dword ptr [RBX],0x0
JNZ 0x00139b93
MOV R15,RDI
MOV RDI,RBX
MOV qword ptr [RSP + 0x80],RSI
CALL 0x0010af20
TEST AL,AL
JZ 0x00139bad
CMP qword ptr [RBX + 0x30],0x4
JNZ 0x00139bc9
MOV RDX,qword ptr [RSP + 0x80]
VMOVSS XMM1,dword ptr [RDX + 0x54]
VXORPS XMM0,XMM0,XMM0
VMOVAPS xmmword ptr [RSP + 0x100],XMM1
VUCOMISS XMM1,XMM0
JC 0x00139be5
MOV RSI,RBX
MOV RAX,qword ptr [RBX + 0x28]
MOV qword ptr [RSP + 0xa0],RAX
TEST RAX,RAX
JLE 0x00139b7e
MOVSXD RDI,dword ptr [R15]
MOVSXD R8,dword ptr [R15 + 0x4]
MOV RBP,qword ptr [RSI + 0x10]
MOV RAX,qword ptr [RSI + 0x18]
MOV qword ptr [RSP + 0x88],RAX
MOV RAX,qword ptr [RSI + 0x20]
MOV qword ptr [RSP + 0x50],RAX
MOV R9,qword ptr [RSI + 0x38]
MOV RAX,qword ptr [RSI + 0x40]
MOV qword ptr [RSP + 0x60],RAX
MOV R10,qword ptr [RDX + 0x38]
MOV R12D,EBP
AND R12D,0xffffffc0
MOVSXD RAX,R12D
MOVSXD RBX,EBP
LEA RCX,[RAX + 0x1]
CMP RCX,RBX
CMOVG RBX,RCX
SUB RBX,RAX
LEA RCX,[RBX + -0x1]
VPBROADCASTQ ZMM0
VMOVDQU64 zmmword ptr [RSP + 0x110],ZMM0
MOV RCX,R9
IMUL RCX,RDI
MOV qword ptr [RSP + 0x48],RCX
MOV qword ptr [RSP + 0xc8],R9
IMUL R9,R8
MOV qword ptr [RSP + 0xb8],R9
MOV RCX,R10
MOV qword ptr [RSP + 0x68],RDI
IMUL RCX,RDI
MOV qword ptr [RSP + 0xc0],R10
MOV qword ptr [RSP + 0xd0],R8
IMUL R10,R8
MOV qword ptr [RSP + 0xb0],R10
MOV qword ptr [RSP + 0x40],RCX
LEA RAX,[RCX + RAX*0x4]
MOV qword ptr [RSP + 0x38],RAX
ADD RBX,0x7
AND RBX,-0x8
MOV RAX,qword ptr [RSI + 0x48]
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RDX + 0x40]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RDX + 0x48]
MOV qword ptr [RSP + 0x28],RAX
LEA RAX,[RBP*0x4]
MOV qword ptr [RSP + 0xa8],RAX
MOV qword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0xd8],RSI
LAB_001398b2:
CMP qword ptr [RSP + 0x50],0x0
JLE 0x00139b4a
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,RAX
IMUL RCX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0xe8],RCX
IMUL RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0xe0],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x78],RAX
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x70],RAX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x18],0x0
LAB_00139909:
MOV RAX,qword ptr [RSP + 0x88]
CMP RAX,qword ptr [RSP + 0x68]
JLE 0x00139b14
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,RAX
IMUL RCX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0xf8],RCX
IMUL RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0xf0],RAX
MOV RDI,qword ptr [RSP + 0x78]
MOV R8,qword ptr [RSP + 0x70]
MOV R13,qword ptr [RSP + 0x20]
MOV R14,qword ptr [RSP + 0x68]
LAB_00139954:
MOV RSI,qword ptr [RSI + 0xf8]
TEST RBP,RBP
MOV qword ptr [RSP + 0x98],RDI
MOV qword ptr [RSP + 0x90],R8
JLE 0x00139999
LEA RAX,[RSI + R13*0x1]
VPXOR XMM0,XMM0,XMM0
XOR ECX,ECX
LAB_0013997a:
VMOVSS XMM1,dword ptr [RAX + RCX*0x4]
VMULSS XMM1,XMM1,XMM1
VCVTSS2SD XMM1,XMM1,XMM1
VADDSD XMM0,XMM0,XMM1
INC RCX
CMP RBP,RCX
JNZ 0x0013997a
VCVTSD2SS XMM0,XMM0,XMM0
JMP 0x0013999d
LAB_00139999:
VPXOR XMM0,XMM0,XMM0
LAB_0013999d:
VMOVSS dword ptr [RSP + 0xc],XMM0
MOV RAX,R14
IMUL RAX,qword ptr [RSP + 0xc8]
ADD RAX,qword ptr [RSP + 0xf8]
ADD RAX,qword ptr [RSP + 0xe8]
ADD RSI,RAX
MOV R15,qword ptr [RDX + 0xf8]
MOV RDI,R14
IMUL RDI,qword ptr [RSP + 0xc0]
ADD RDI,qword ptr [RSP + 0xf0]
ADD RDI,qword ptr [RSP + 0xe0]
ADD RDI,R15
MOV RDX,qword ptr [RSP + 0xa8]
VZEROUPPER
CALL 0x0010a700
VMOVSS XMM0,dword ptr [RSP + 0xc]
VUCOMISS XMM0,dword ptr [0x00153568]
JC 0x00139a0e
VSQRTSS XMM0,XMM0,XMM0
JMP 0x00139a13
LAB_00139a0e:
CALL 0x0010b090
LAB_00139a13:
VMOVDQU64 ZMM3,zmmword ptr [RSP + 0x110]
VPMOVSXBQ ZMM4,qword ptr [0x00149f20]
MOV RDI,qword ptr [RSP + 0x98]
MOV R8,qword ptr [RSP + 0x90]
VMOVAPS XMM2,xmmword ptr [RSP + 0x100]
VMAXSS XMM1,XMM2,XMM0
VCMPUNORDSS K1 {K0},XMM0,XMM0
VMOVSS XMM1{K1},XMM1,XMM2
VMOVSS XMM0,dword ptr [0x001490a0]
VDIVSS XMM0,XMM0,XMM1
TEST R12D,R12D
MOV RSI,qword ptr [RSP + 0xd8]
JLE 0x00139aa3
VBROADCASTSS ZMM1,XMM0
LEA RAX,[R15 + R8*0x1]
XOR ECX,ECX
LAB_00139a77:
XOR EDX,EDX
LAB_00139a79:
VMULPS ZMM2,ZMM1,zmmword ptr [RAX + RDX*0x1]
VMOVUPS zmmword ptr [RAX + RDX*0x1],ZMM2
ADD RDX,0x40
CMP RDX,0x100
JNZ 0x00139a79
ADD RCX,0x40
ADD RAX,0x100
CMP RCX,R12
JC 0x00139a77
LAB_00139aa3:
CMP R12D,EBP
JZ 0x00139ae0
VBROADCASTSS YMM0,XMM0
ADD R15,RDI
XOR EAX,EAX
LAB_00139ab2:
VPBROADCASTQ ZMM1
VPORQ ZMM1,ZMM1,ZMM4
VPCMPUQ K1 {K0},ZMM1,ZMM3,0x2
VMOVUPS YMM1{K1}{z},ymmword ptr [R15 + RAX*0x4]
VMULPS YMM1,YMM0,YMM1
VMOVUPS ymmword ptr [R15 + RAX*0x4] {K1},YMM1
ADD RAX,0x8
CMP RBX,RAX
JNZ 0x00139ab2
LAB_00139ae0:
ADD R14,qword ptr [RSP + 0xd0]
ADD R13,qword ptr [RSP + 0xb8]
MOV RAX,qword ptr [RSP + 0xb0]
ADD R8,RAX
ADD RDI,RAX
CMP R14,qword ptr [RSP + 0x88]
MOV RDX,qword ptr [RSP + 0x80]
JL 0x00139954
LAB_00139b14:
MOV RCX,qword ptr [RSP + 0x18]
INC RCX
MOV RAX,qword ptr [RSP + 0x20]
ADD RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x58]
ADD qword ptr [RSP + 0x70],RAX
ADD qword ptr [RSP + 0x78],RAX
MOV qword ptr [RSP + 0x18],RCX
CMP RCX,qword ptr [RSP + 0x50]
JNZ 0x00139909
LAB_00139b4a:
MOV RCX,qword ptr [RSP + 0x10]
INC RCX
MOV RAX,qword ptr [RSP + 0x30]
ADD qword ptr [RSP + 0x48],RAX
MOV RAX,qword ptr [RSP + 0x28]
ADD qword ptr [RSP + 0x40],RAX
ADD qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x10],RCX
CMP RCX,qword ptr [RSP + 0xa0]
JNZ 0x001398b2
LAB_00139b7e:
ADD RSP,0x158
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
VZEROUPPER
RET
LAB_00139b93:
LEA RDI,[0x153aa0]
LEA RDX,[0x149680]
MOV ESI,0xdf6
XOR EAX,EAX
CALL 0x0010af40
LAB_00139bad:
LEA RDI,[0x153aa0]
LEA RDX,[0x14956a]
LEA RCX,[0x1533b3]
MOV ESI,0xdc4
JMP 0x00139bff
LAB_00139bc9:
LEA RDI,[0x153aa0]
LEA RDX,[0x14956a]
LEA RCX,[0x153fb3]
MOV ESI,0xdc6
JMP 0x00139bff
LAB_00139be5:
LEA RDI,[0x153aa0]
LEA RDX,[0x14956a]
LEA RCX,[0x154139]
MOV ESI,0xdd0
LAB_00139bff:
XOR EAX,EAX
CALL 0x0010af40
|
void ggml_compute_forward_l2_norm(int *param_1,long param_2)
{
int *piVar1;
uint *puVar2;
float fVar3;
float fVar4;
int1 auVar5 [16];
int *piVar6;
long lVar7;
long lVar8;
long lVar9;
long lVar10;
long lVar11;
long lVar12;
long lVar13;
long lVar14;
long lVar15;
long lVar16;
bool bVar17;
bool bVar18;
bool bVar19;
bool bVar20;
bool bVar21;
bool bVar22;
bool bVar23;
bool bVar24;
int iVar25;
int iVar26;
int iVar27;
int iVar28;
int iVar29;
int iVar30;
int iVar31;
char cVar32;
long lVar33;
long lVar34;
long lVar35;
ulong uVar36;
char *pcVar37;
long lVar38;
long lVar39;
uint uVar40;
int8 uVar41;
long lVar42;
long lVar43;
long lVar44;
long lVar45;
uint uVar46;
long lVar47;
long lVar48;
byte in_K0;
ulong uVar49;
int1 auVar50 [64];
int1 auVar51 [64];
int1 auVar52 [64];
int1 auVar53 [64];
int1 auVar54 [64];
float __x;
int1 auVar55 [16];
int1 extraout_var [60];
long local_178;
long local_170;
long local_168;
long local_150;
long local_148;
long local_140;
long local_118;
long local_110;
piVar6 = *(int **)(param_2 + 0x98);
if (*piVar6 != 0) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp"
,0xdf6,"fatal error");
}
cVar32 = ggml_are_same_shape(piVar6);
if (cVar32 == '\0') {
pcVar37 = "ggml_are_same_shape(src0, dst)";
uVar41 = 0xdc4;
}
else if (*(long *)(piVar6 + 0xc) == 4) {
fVar3 = *(float *)(param_2 + 0x54);
if (0.0 <= fVar3) {
lVar7 = *(long *)(piVar6 + 10);
if (0 < lVar7) {
lVar42 = (long)*param_1;
lVar44 = (long)param_1[1];
lVar8 = *(long *)(piVar6 + 4);
lVar9 = *(long *)(piVar6 + 6);
lVar10 = *(long *)(piVar6 + 8);
lVar11 = *(long *)(piVar6 + 0xe);
lVar12 = *(long *)(piVar6 + 0x10);
lVar13 = *(long *)(param_2 + 0x38);
uVar40 = (uint)lVar8;
uVar46 = uVar40 & 0xffffffc0;
lVar33 = (long)(int)uVar46;
lVar39 = (long)(int)uVar40;
if ((long)(int)uVar40 < lVar33 + 1) {
lVar39 = lVar33 + 1;
}
auVar50 = vpbroadcastq_avx512f();
auVar50 = vmovdqu64_avx512f(auVar50);
local_140 = lVar11 * lVar42;
local_148 = lVar13 * lVar42;
local_150 = local_148 + lVar33 * 4;
lVar14 = *(long *)(piVar6 + 0x12);
lVar15 = *(long *)(param_2 + 0x40);
lVar16 = *(long *)(param_2 + 0x48);
local_178 = 0;
do {
if (0 < lVar10) {
local_110 = local_150;
local_118 = local_148;
local_168 = local_140;
local_170 = 0;
do {
if (lVar42 < lVar9) {
lVar43 = local_110;
lVar45 = local_118;
lVar47 = local_168;
lVar48 = lVar42;
do {
if (lVar8 < 1) {
__x = 0.0;
}
else {
__x = 0.0;
lVar35 = 0;
do {
fVar4 = *(float *)(*(long *)(piVar6 + 0x3e) + lVar47 + lVar35 * 4);
__x = __x + fVar4 * fVar4;
lVar35 = lVar35 + 1;
} while (lVar8 != lVar35);
}
lVar35 = *(long *)(param_2 + 0xf8);
memcpy((void *)(lVar48 * lVar13 + local_170 * lVar15 + local_178 * lVar16 + lVar35
),
(void *)(*(long *)(piVar6 + 0x3e) +
lVar48 * lVar11 + local_170 * lVar12 + local_178 * lVar14),
lVar8 * 4);
if (__x < DAT_00153568) {
auVar51._0_4_ = sqrtf(__x);
auVar51._4_60_ = extraout_var;
auVar55 = auVar51._0_16_;
}
else {
auVar55 = vsqrtss_avx(ZEXT416((uint)__x),ZEXT416((uint)__x));
}
auVar51 = vmovdqu64_avx512f(auVar50);
auVar5._8_8_ = 0;
auVar5._0_8_ = DAT_00149f20;
auVar52 = vpmovsxbq_avx512f(auVar5);
auVar5 = vmaxss_avx(ZEXT416((uint)fVar3),auVar55);
uVar41 = vcmpss_avx512f(auVar55,auVar55,3);
bVar24 = (bool)(in_K0 & 1 & (byte)uVar41);
auVar55._0_4_ =
DAT_001490a0 /
(float)((uint)bVar24 * (int)fVar3 + (uint)!bVar24 * auVar5._0_4_);
auVar55._4_12_ = SUB6012((int1 [60])0x0,0);
if (0 < (int)uVar46) {
auVar53 = vbroadcastss_avx512f(auVar55);
lVar34 = lVar35 + lVar45;
uVar36 = 0;
do {
lVar38 = 0;
do {
auVar54 = vmulps_avx512f(auVar53,*(int1 (*) [64])(lVar34 + lVar38));
*(int1 (*) [64])(lVar34 + lVar38) = auVar54;
lVar38 = lVar38 + 0x40;
} while (lVar38 != 0x100);
uVar36 = uVar36 + 0x40;
lVar34 = lVar34 + 0x100;
} while (uVar36 < uVar46);
}
if (uVar46 != uVar40) {
uVar36 = 0;
do {
auVar53 = vpbroadcastq_avx512f();
auVar53 = vporq_avx512f(auVar53,auVar52);
uVar49 = vpcmpuq_avx512f(auVar53,auVar51,2);
uVar49 = in_K0 & uVar49;
piVar1 = (int *)(lVar35 + lVar43 + uVar36 * 4);
iVar25 = piVar1[1];
iVar26 = piVar1[2];
iVar27 = piVar1[3];
iVar28 = piVar1[4];
iVar29 = piVar1[5];
iVar30 = piVar1[6];
iVar31 = piVar1[7];
puVar2 = (uint *)(lVar35 + lVar43 + uVar36 * 4);
bVar24 = (bool)((byte)uVar49 & 1);
bVar17 = (bool)((byte)(uVar49 >> 1) & 1);
bVar18 = (bool)((byte)(uVar49 >> 2) & 1);
bVar19 = (bool)((byte)(uVar49 >> 3) & 1);
bVar20 = (bool)((byte)(uVar49 >> 4) & 1);
bVar21 = (bool)((byte)(uVar49 >> 5) & 1);
bVar22 = (bool)((byte)(uVar49 >> 6) & 1);
bVar23 = SUB81(uVar49 >> 7,0);
*puVar2 = (uint)bVar24 *
(int)(auVar55._0_4_ * (float)((uint)((byte)uVar49 & 1) * *piVar1)) |
(uint)!bVar24 * *puVar2;
puVar2[1] = (uint)bVar17 *
(int)(auVar55._0_4_ *
(float)((uint)((byte)(uVar49 >> 1) & 1) * iVar25)) |
(uint)!bVar17 * puVar2[1];
puVar2[2] = (uint)bVar18 *
(int)(auVar55._0_4_ *
(float)((uint)((byte)(uVar49 >> 2) & 1) * iVar26)) |
(uint)!bVar18 * puVar2[2];
puVar2[3] = (uint)bVar19 *
(int)(auVar55._0_4_ *
(float)((uint)((byte)(uVar49 >> 3) & 1) * iVar27)) |
(uint)!bVar19 * puVar2[3];
puVar2[4] = (uint)bVar20 *
(int)(auVar55._0_4_ *
(float)((uint)((byte)(uVar49 >> 4) & 1) * iVar28)) |
(uint)!bVar20 * puVar2[4];
puVar2[5] = (uint)bVar21 *
(int)(auVar55._0_4_ *
(float)((uint)((byte)(uVar49 >> 5) & 1) * iVar29)) |
(uint)!bVar21 * puVar2[5];
puVar2[6] = (uint)bVar22 *
(int)(auVar55._0_4_ *
(float)((uint)((byte)(uVar49 >> 6) & 1) * iVar30)) |
(uint)!bVar22 * puVar2[6];
puVar2[7] = (uint)bVar23 * (uint)(byte)(uVar49 >> 7) * iVar31 |
(uint)!bVar23 * puVar2[7];
uVar36 = uVar36 + 8;
} while (((lVar39 - lVar33) + 7U & 0xfffffffffffffff8) != uVar36);
}
lVar48 = lVar48 + lVar44;
lVar47 = lVar47 + lVar11 * lVar44;
lVar45 = lVar45 + lVar13 * lVar44;
lVar43 = lVar43 + lVar13 * lVar44;
} while (lVar48 < lVar9);
}
local_170 = local_170 + 1;
local_168 = local_168 + lVar12;
local_118 = local_118 + lVar15;
local_110 = local_110 + lVar15;
} while (local_170 != lVar10);
}
local_178 = local_178 + 1;
local_140 = local_140 + lVar14;
local_148 = local_148 + lVar16;
local_150 = local_150 + lVar16;
} while (local_178 != lVar7);
}
return;
}
pcVar37 = "eps >= 0.0f";
uVar41 = 0xdd0;
}
else {
pcVar37 = "src0->nb[0] == sizeof(float)";
uVar41 = 0xdc6;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp",
uVar41,"GGML_ASSERT(%s) failed",pcVar37);
}
| |
23,117 | translog_next_LSN | eloqsql/storage/maria/ma_loghandler.c | LSN translog_next_LSN(TRANSLOG_ADDRESS addr, TRANSLOG_ADDRESS horizon)
{
TRANSLOG_SCANNER_DATA scanner;
LSN result;
DBUG_ENTER("translog_next_LSN");
if (horizon == LSN_IMPOSSIBLE)
horizon= translog_get_horizon();
if (addr == horizon)
DBUG_RETURN(LSN_IMPOSSIBLE);
translog_scanner_init(addr, 0, &scanner, 1);
/*
addr can point not to a chunk beginning but page end so next
page beginning.
*/
if (addr % TRANSLOG_PAGE_SIZE == 0)
{
/*
We are emulating the page end which cased such horizon value to
trigger translog_scanner_eop().
We can't just increase addr on page header overhead because it
can be file end so we allow translog_get_next_chunk() to skip
to the next page in correct way
*/
scanner.page_addr-= TRANSLOG_PAGE_SIZE;
scanner.page_offset= TRANSLOG_PAGE_SIZE;
#ifndef DBUG_OFF
scanner.page= NULL; /* prevent using incorrect page content */
#endif
}
/* addr can point not to a chunk beginning but to a page end */
if (translog_scanner_eop(&scanner))
{
if (translog_get_next_chunk(&scanner))
{
result= LSN_ERROR;
goto out;
}
if (scanner.page == END_OF_LOG)
{
result= LSN_IMPOSSIBLE;
goto out;
}
}
while (!translog_is_LSN_chunk(scanner.page[scanner.page_offset]) &&
scanner.page[scanner.page_offset] != TRANSLOG_FILLER)
{
if (translog_get_next_chunk(&scanner))
{
result= LSN_ERROR;
goto out;
}
if (scanner.page == END_OF_LOG)
{
result= LSN_IMPOSSIBLE;
goto out;
}
}
if (scanner.page[scanner.page_offset] == TRANSLOG_FILLER)
result= LSN_IMPOSSIBLE; /* reached page filler */
else
result= scanner.page_addr + scanner.page_offset;
out:
translog_destroy_scanner(&scanner);
DBUG_RETURN(result);
} | O3 | c | translog_next_LSN:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x2038, %rsp # imm = 0x2038
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x20(%rbp)
testq %rsi, %rsi
jne 0x37738
callq 0x35d90
movq %rax, %rsi
cmpq %rbx, %rsi
jne 0x37744
xorl %ebx, %ebx
jmp 0x3782a
leaq -0x2050(%rbp), %rdx
movq %rbx, %rdi
xorl %esi, %esi
movl $0x1, %ecx
callq 0x34a97
testl $0x1fff, %ebx # imm = 0x1FFF
je 0x37779
movl -0x28(%rbp), %eax
cmpq $0x1fff, %rax # imm = 0x1FFF
ja 0x37788
movq -0x38(%rbp), %rcx
cmpb $-0x1, (%rcx,%rax)
jne 0x377b1
jmp 0x37788
addq $-0x2000, -0x50(%rbp) # imm = 0xE000
movl $0x2000, -0x28(%rbp) # imm = 0x2000
leaq -0x2050(%rbp), %rdi
callq 0x34b3e
movl $0x1, %ebx
testb %al, %al
jne 0x37821
movq -0x38(%rbp), %rcx
leaq 0xbc77a4(%rip), %rax # 0xbfef50
cmpq %rax, %rcx
je 0x37818
xorl %ebx, %ebx
leaq -0x2050(%rbp), %r14
leaq 0xbc778f(%rip), %r15 # 0xbfef50
movl -0x28(%rbp), %eax
movzbl (%rcx,%rax), %ecx
movl %ecx, %edx
andl $-0x40, %edx
cmpl $0x40, %edx
je 0x37807
testl %edx, %edx
sete %dl
movl %ecx, %esi
notl %esi
testb $0x3f, %sil
setne %sil
testb %sil, %dl
jne 0x37807
cmpl $0xff, %ecx
je 0x37821
movq %r14, %rdi
callq 0x34b3e
testb %al, %al
jne 0x3781c
movq -0x38(%rbp), %rcx
cmpq %r15, %rcx
jne 0x377c1
jmp 0x37821
cmpl $0xff, %ecx
je 0x37818
addq -0x50(%rbp), %rax
movq %rax, %rbx
jmp 0x37821
xorl %ebx, %ebx
jmp 0x37821
movl $0x1, %ebx
movq -0x30(%rbp), %rdi
callq 0x35e4a
movq %fs:0x28, %rax
cmpq -0x20(%rbp), %rax
jne 0x3784a
movq %rbx, %rax
addq $0x2038, %rsp # imm = 0x2038
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x29260
| translog_next_LSN:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 2038h
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_20], rax
test rsi, rsi
jnz short loc_37738
call translog_get_horizon
mov rsi, rax
loc_37738:
cmp rsi, rbx
jnz short loc_37744
xor ebx, ebx
jmp loc_3782A
loc_37744:
lea rdx, [rbp+var_2050]
mov rdi, rbx
xor esi, esi
mov ecx, 1
call translog_scanner_init
test ebx, 1FFFh
jz short loc_37779
mov eax, [rbp+var_28]
cmp rax, 1FFFh
ja short loc_37788
mov rcx, [rbp+var_38]
cmp byte ptr [rcx+rax], 0FFh
jnz short loc_377B1
jmp short loc_37788
loc_37779:
add [rbp+var_50], 0FFFFFFFFFFFFE000h
mov [rbp+var_28], 2000h
loc_37788:
lea rdi, [rbp+var_2050]
call translog_get_next_chunk
mov ebx, 1
test al, al
jnz loc_37821
mov rcx, [rbp+var_38]
lea rax, end_of_log
cmp rcx, rax
jz short loc_37818
loc_377B1:
xor ebx, ebx
lea r14, [rbp+var_2050]
lea r15, end_of_log
loc_377C1:
mov eax, [rbp+var_28]
movzx ecx, byte ptr [rcx+rax]
mov edx, ecx
and edx, 0FFFFFFC0h
cmp edx, 40h ; '@'
jz short loc_37807
test edx, edx
setz dl
mov esi, ecx
not esi
test sil, 3Fh
setnz sil
test dl, sil
jnz short loc_37807
cmp ecx, 0FFh
jz short loc_37821
mov rdi, r14
call translog_get_next_chunk
test al, al
jnz short loc_3781C
mov rcx, [rbp+var_38]
cmp rcx, r15
jnz short loc_377C1
jmp short loc_37821
loc_37807:
cmp ecx, 0FFh
jz short loc_37818
add rax, [rbp+var_50]
mov rbx, rax
jmp short loc_37821
loc_37818:
xor ebx, ebx
jmp short loc_37821
loc_3781C:
mov ebx, 1
loc_37821:
mov rdi, [rbp+var_30]
call translog_free_link
loc_3782A:
mov rax, fs:28h
cmp rax, [rbp+var_20]
jnz short loc_3784A
mov rax, rbx
add rsp, 2038h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_3784A:
call ___stack_chk_fail
| long long translog_next_LSN(long long a1, long long horizon)
{
long long v2; // rbx
_BYTE *v3; // rcx
int v4; // ecx
_BYTE v6[8192]; // [rsp+0h] [rbp-2050h] BYREF
long long v7; // [rsp+2000h] [rbp-50h]
_BYTE *v8; // [rsp+2018h] [rbp-38h]
long long v9; // [rsp+2020h] [rbp-30h]
unsigned int v10; // [rsp+2028h] [rbp-28h]
unsigned long long v11; // [rsp+2030h] [rbp-20h]
v11 = __readfsqword(0x28u);
if ( !horizon )
horizon = translog_get_horizon();
if ( horizon != a1 )
{
translog_scanner_init(a1, 0, (long long)v6, 1);
if ( (a1 & 0x1FFF) != 0 )
{
if ( v10 <= 0x1FFFuLL )
{
v3 = v8;
if ( v8[v10] != 0xFF )
{
LABEL_12:
v2 = 0LL;
while ( 1 )
{
v4 = (unsigned __int8)v3[v10];
if ( (v4 & 0xFFFFFFC0) == 0x40 || (~(_BYTE)v4 & 0x3F) != 0 && (v4 & 0xFFFFFFC0) == 0 )
break;
if ( v4 == 255 )
goto LABEL_23;
if ( translog_get_next_chunk((long long)v6) )
{
v2 = 1LL;
goto LABEL_23;
}
v3 = v8;
if ( v8 == (_BYTE *)&end_of_log )
goto LABEL_23;
}
if ( v4 == 255 )
goto LABEL_21;
v2 = v7 + v10;
goto LABEL_23;
}
}
}
else
{
v7 -= 0x2000LL;
v10 = 0x2000;
}
v2 = 1LL;
if ( !translog_get_next_chunk((long long)v6) )
{
v3 = v8;
if ( v8 != (_BYTE *)&end_of_log )
goto LABEL_12;
LABEL_21:
v2 = 0LL;
}
LABEL_23:
translog_free_link(v9);
return v2;
}
return 0LL;
}
| translog_next_LSN:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x2038
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x20],RAX
TEST RSI,RSI
JNZ 0x00137738
CALL 0x00135d90
MOV RSI,RAX
LAB_00137738:
CMP RSI,RBX
JNZ 0x00137744
XOR EBX,EBX
JMP 0x0013782a
LAB_00137744:
LEA RDX,[RBP + -0x2050]
MOV RDI,RBX
XOR ESI,ESI
MOV ECX,0x1
CALL 0x00134a97
TEST EBX,0x1fff
JZ 0x00137779
MOV EAX,dword ptr [RBP + -0x28]
CMP RAX,0x1fff
JA 0x00137788
MOV RCX,qword ptr [RBP + -0x38]
CMP byte ptr [RCX + RAX*0x1],0xff
JNZ 0x001377b1
JMP 0x00137788
LAB_00137779:
ADD qword ptr [RBP + -0x50],-0x2000
MOV dword ptr [RBP + -0x28],0x2000
LAB_00137788:
LEA RDI,[RBP + -0x2050]
CALL 0x00134b3e
MOV EBX,0x1
TEST AL,AL
JNZ 0x00137821
MOV RCX,qword ptr [RBP + -0x38]
LEA RAX,[0xcfef50]
CMP RCX,RAX
JZ 0x00137818
LAB_001377b1:
XOR EBX,EBX
LEA R14,[RBP + -0x2050]
LEA R15,[0xcfef50]
LAB_001377c1:
MOV EAX,dword ptr [RBP + -0x28]
MOVZX ECX,byte ptr [RCX + RAX*0x1]
MOV EDX,ECX
AND EDX,0xffffffc0
CMP EDX,0x40
JZ 0x00137807
TEST EDX,EDX
SETZ DL
MOV ESI,ECX
NOT ESI
TEST SIL,0x3f
SETNZ SIL
TEST DL,SIL
JNZ 0x00137807
CMP ECX,0xff
JZ 0x00137821
MOV RDI,R14
CALL 0x00134b3e
TEST AL,AL
JNZ 0x0013781c
MOV RCX,qword ptr [RBP + -0x38]
CMP RCX,R15
JNZ 0x001377c1
JMP 0x00137821
LAB_00137807:
CMP ECX,0xff
JZ 0x00137818
ADD RAX,qword ptr [RBP + -0x50]
MOV RBX,RAX
JMP 0x00137821
LAB_00137818:
XOR EBX,EBX
JMP 0x00137821
LAB_0013781c:
MOV EBX,0x1
LAB_00137821:
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x00135e4a
LAB_0013782a:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x0013784a
MOV RAX,RBX
ADD RSP,0x2038
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0013784a:
CALL 0x00129260
|
long translog_next_LSN(ulong param_1,ulong param_2)
{
byte bVar1;
char cVar2;
long lVar3;
long in_FS_OFFSET;
int1 local_2058 [8192];
long local_58;
int1 *local_40;
int8 local_38;
uint local_30;
long local_28;
local_28 = *(long *)(in_FS_OFFSET + 0x28);
if (param_2 == 0) {
param_2 = translog_get_horizon();
}
if (param_2 == param_1) {
lVar3 = 0;
goto LAB_0013782a;
}
translog_scanner_init(param_1,0,local_2058,1);
if ((param_1 & 0x1fff) == 0) {
local_58 = local_58 + -0x2000;
local_30 = 0x2000;
LAB_00137788:
cVar2 = translog_get_next_chunk(local_2058);
lVar3 = 1;
if (cVar2 == '\0') {
if (local_40 != &end_of_log) goto LAB_001377b1;
LAB_00137818:
lVar3 = 0;
}
}
else {
if ((0x1fff < (ulong)local_30) || (local_40[local_30] == -1)) goto LAB_00137788;
LAB_001377b1:
lVar3 = 0;
do {
bVar1 = local_40[local_30];
if (((bVar1 & 0xc0) == 0x40) || ((bVar1 & 0xc0) == 0 && (~bVar1 & 0x3f) != 0)) {
if (bVar1 == 0xff) goto LAB_00137818;
lVar3 = (ulong)local_30 + local_58;
break;
}
if (bVar1 == 0xff) break;
cVar2 = translog_get_next_chunk(local_2058);
if (cVar2 != '\0') {
lVar3 = 1;
break;
}
} while (local_40 != &end_of_log);
}
translog_free_link(local_38);
LAB_0013782a:
if (*(long *)(in_FS_OFFSET + 0x28) != local_28) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return lVar3;
}
| |
23,118 | my_strntol_8bit | eloqsql/strings/ctype-simple.c | long my_strntol_8bit(CHARSET_INFO *cs,
const char *nptr, size_t l, int base,
char **endptr, int *err)
{
int negative;
register uint32 cutoff;
register uint cutlim;
register uint32 i;
register const char *s;
register uchar c;
const char *save, *e;
int overflow;
*err= 0; /* Initialize error indicator */
s = nptr;
e = nptr+l;
for ( ; s<e && my_isspace(cs, *s) ; s++);
if (s == e)
{
goto noconv;
}
/* Check for a sign. */
if (*s == '-')
{
negative = 1;
++s;
}
else if (*s == '+')
{
negative = 0;
++s;
}
else
negative = 0;
save = s;
cutoff = ((uint32)~0L) / (uint32) base;
cutlim = (uint) (((uint32)~0L) % (uint32) base);
overflow = 0;
i = 0;
for (c = *s; s != e; c = *++s)
{
if (c>='0' && c<='9')
c -= '0';
else if (c>='A' && c<='Z')
c = c - 'A' + 10;
else if (c>='a' && c<='z')
c = c - 'a' + 10;
else
break;
if (c >= base)
break;
if (i > cutoff || (i == cutoff && c > cutlim))
overflow = 1;
else
{
i *= (uint32) base;
i += c;
}
}
if (s == save)
goto noconv;
if (endptr != NULL)
*endptr = (char *) s;
if (negative)
{
if (i > (uint32) INT_MIN32)
overflow = 1;
}
else if (i > INT_MAX32)
overflow = 1;
if (overflow)
{
err[0]= ERANGE;
return negative ? INT_MIN32 : INT_MAX32;
}
return (negative ? -((long) i) : (long) i);
noconv:
err[0]= EDOM;
if (endptr != NULL)
*endptr = (char *) nptr;
return 0L;
} | O3 | c | my_strntol_8bit:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl $0x0, (%r9)
leaq (%rsi,%rdx), %r11
movq %rsi, %r10
testq %rdx, %rdx
jle 0x3887b
movq 0x40(%rdi), %rax
movq %rsi, %r10
movzbl (%r10), %edx
testb $0x8, 0x1(%rax,%rdx)
je 0x3887b
incq %r10
cmpq %r11, %r10
jb 0x38868
cmpq %r11, %r10
je 0x38980
movb (%r10), %dil
leal -0x2b(%rdi), %eax
andb $-0x3, %al
cmpb $0x1, %al
adcq $0x0, %r10
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
xorl %edx, %edx
divl %ecx
xorl %ebx, %ebx
cmpq %r11, %r10
je 0x3892c
movq %rdi, -0x30(%rbp)
xorl %r12d, %r12d
movq %r10, %r14
xorl %r13d, %r13d
movl %r13d, %ebx
movl %r12d, %r15d
movb (%r14), %r12b
leal -0x30(%r12), %edi
cmpb $0xa, %dil
jb 0x388ea
leal -0x41(%r12), %edi
cmpb $0x19, %dil
ja 0x388d8
addb $-0x37, %r12b
jmp 0x388e7
leal -0x61(%r12), %edi
cmpb $0x19, %dil
ja 0x38926
addb $-0x57, %r12b
movl %r12d, %edi
movzbl %dil, %edi
cmpl %ecx, %edi
jge 0x38926
movl $0x1, %r12d
cmpl %eax, %ebx
jbe 0x38901
movl %ebx, %r13d
jmp 0x38915
jne 0x3890a
movl %eax, %r13d
cmpl %edi, %edx
jb 0x38915
imull %ecx, %ebx
addl %edi, %ebx
movl %ebx, %r13d
movl %r15d, %r12d
incq %r14
cmpq %r11, %r14
jne 0x388b3
movl %r13d, %ebx
movq %r11, %r14
movl %r12d, %r15d
movq -0x30(%rbp), %rdi
jmp 0x38932
movq %r11, %r14
xorl %r15d, %r15d
cmpq %r10, %r14
je 0x38980
testq %r8, %r8
je 0x3893f
movq %r14, (%r8)
cmpl $0x80000001, %ebx # imm = 0x80000001
movl $0x1, %eax
movl %r15d, %ecx
cmovael %eax, %ecx
testl %ebx, %ebx
cmovsl %eax, %r15d
cmpb $0x2d, %dil
cmovel %ecx, %r15d
testl %r15d, %r15d
je 0x3899c
cmpb $0x2d, %dil
movl $0x22, (%r9)
movq $-0x80000000, %rcx # imm = 0x80000000
movl $0x7fffffff, %eax # imm = 0x7FFFFFFF
cmoveq %rcx, %rax
jmp 0x38991
movl $0x21, (%r9)
testq %r8, %r8
je 0x3898f
movq %rsi, (%r8)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %ebx, %ecx
movq %rcx, %rax
negq %rax
cmpb $0x2d, %dil
cmovneq %rcx, %rax
jmp 0x38991
| my_strntol_8bit:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
mov dword ptr [r9], 0
lea r11, [rsi+rdx]
mov r10, rsi
test rdx, rdx
jle short loc_3887B
mov rax, [rdi+40h]
mov r10, rsi
loc_38868:
movzx edx, byte ptr [r10]
test byte ptr [rax+rdx+1], 8
jz short loc_3887B
inc r10
cmp r10, r11
jb short loc_38868
loc_3887B:
cmp r10, r11
jz loc_38980
mov dil, [r10]
lea eax, [rdi-2Bh]
and al, 0FDh
cmp al, 1
adc r10, 0
mov eax, 0FFFFFFFFh
xor edx, edx
div ecx
xor ebx, ebx
cmp r10, r11
jz loc_3892C
mov [rbp+var_30], rdi
xor r12d, r12d
mov r14, r10
xor r13d, r13d
loc_388B3:
mov ebx, r13d
mov r15d, r12d
mov r12b, [r14]
lea edi, [r12-30h]
cmp dil, 0Ah
jb short loc_388EA
lea edi, [r12-41h]
cmp dil, 19h
ja short loc_388D8
add r12b, 0C9h
jmp short loc_388E7
loc_388D8:
lea edi, [r12-61h]
cmp dil, 19h
ja short loc_38926
add r12b, 0A9h
loc_388E7:
mov edi, r12d
loc_388EA:
movzx edi, dil
cmp edi, ecx
jge short loc_38926
mov r12d, 1
cmp ebx, eax
jbe short loc_38901
mov r13d, ebx
jmp short loc_38915
loc_38901:
jnz short loc_3890A
mov r13d, eax
cmp edx, edi
jb short loc_38915
loc_3890A:
imul ebx, ecx
add ebx, edi
mov r13d, ebx
mov r12d, r15d
loc_38915:
inc r14
cmp r14, r11
jnz short loc_388B3
mov ebx, r13d
mov r14, r11
mov r15d, r12d
loc_38926:
mov rdi, [rbp+var_30]
jmp short loc_38932
loc_3892C:
mov r14, r11
xor r15d, r15d
loc_38932:
cmp r14, r10
jz short loc_38980
test r8, r8
jz short loc_3893F
mov [r8], r14
loc_3893F:
cmp ebx, 80000001h
mov eax, 1
mov ecx, r15d
cmovnb ecx, eax
test ebx, ebx
cmovs r15d, eax
cmp dil, 2Dh ; '-'
cmovz r15d, ecx
test r15d, r15d
jz short loc_3899C
cmp dil, 2Dh ; '-'
mov dword ptr [r9], 22h ; '"'
mov rcx, 0FFFFFFFF80000000h
mov eax, 7FFFFFFFh
cmovz rax, rcx
jmp short loc_38991
loc_38980:
mov dword ptr [r9], 21h ; '!'
test r8, r8
jz short loc_3898F
mov [r8], rsi
loc_3898F:
xor eax, eax
loc_38991:
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3899C:
mov ecx, ebx
mov rax, rcx
neg rax
cmp dil, 2Dh ; '-'
cmovnz rax, rcx
jmp short loc_38991
| long long my_strntol_8bit(
long long a1,
unsigned __int8 *a2,
long long a3,
unsigned int a4,
unsigned __int8 **a5,
_DWORD *a6)
{
unsigned __int8 *v6; // r11
unsigned __int8 *v7; // r10
unsigned __int8 v8; // di
unsigned __int8 *v9; // r10
unsigned int v10; // eax
unsigned int v11; // ebx
int v12; // r12d
unsigned __int8 *v13; // r14
unsigned int v14; // r13d
int v15; // r15d
unsigned __int8 v16; // r12
unsigned __int8 v17; // di
unsigned __int8 v18; // r12
int v19; // ecx
long long result; // rax
unsigned __int8 v21; // [rsp+0h] [rbp-30h]
*a6 = 0;
v6 = &a2[a3];
v7 = a2;
if ( a3 > 0 )
{
v7 = a2;
do
{
if ( (*(_BYTE *)(*(_QWORD *)(a1 + 64) + *v7 + 1LL) & 8) == 0 )
break;
++v7;
}
while ( v7 < v6 );
}
if ( v7 == v6 )
goto LABEL_36;
v8 = *v7;
v9 = &v7[((*v7 - 43) & 0xFD) == 0];
v10 = 0xFFFFFFFF / a4;
v11 = 0;
if ( v9 == v6 )
{
v13 = &a2[a3];
v15 = 0;
}
else
{
v21 = v8;
v12 = 0;
v13 = v9;
v14 = 0;
while ( 1 )
{
v11 = v14;
v15 = v12;
v16 = *v13;
v17 = *v13 - 48;
if ( v17 >= 0xAu )
{
if ( (unsigned __int8)(v16 - 65) > 0x19u )
{
if ( (unsigned __int8)(v16 - 97) > 0x19u )
break;
v18 = v16 - 87;
}
else
{
v18 = v16 - 55;
}
v17 = v18;
}
if ( v17 >= (int)a4 )
break;
v12 = 1;
if ( v14 <= v10 )
{
if ( v14 != v10 || (v14 = 0xFFFFFFFF / a4, 0xFFFFFFFF % a4 >= v17) )
{
v14 = v17 + a4 * v11;
v12 = v15;
}
}
if ( ++v13 == v6 )
{
v11 = v14;
v13 = &a2[a3];
v15 = v12;
break;
}
}
v8 = v21;
}
if ( v13 == v9 )
{
LABEL_36:
*a6 = 33;
if ( a5 )
*a5 = a2;
return 0LL;
}
else
{
if ( a5 )
*a5 = v13;
v19 = v15;
if ( v11 >= 0x80000001 )
v19 = 1;
if ( (v11 & 0x80000000) != 0 )
v15 = 1;
if ( v8 == 45 )
v15 = v19;
if ( v15 )
{
*a6 = 34;
result = 0x7FFFFFFFLL;
if ( v8 == 45 )
return 0xFFFFFFFF80000000LL;
}
else
{
result = -(long long)v11;
if ( v8 != 45 )
return v11;
}
}
return result;
}
| my_strntol_8bit:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV dword ptr [R9],0x0
LEA R11,[RSI + RDX*0x1]
MOV R10,RSI
TEST RDX,RDX
JLE 0x0013887b
MOV RAX,qword ptr [RDI + 0x40]
MOV R10,RSI
LAB_00138868:
MOVZX EDX,byte ptr [R10]
TEST byte ptr [RAX + RDX*0x1 + 0x1],0x8
JZ 0x0013887b
INC R10
CMP R10,R11
JC 0x00138868
LAB_0013887b:
CMP R10,R11
JZ 0x00138980
MOV DIL,byte ptr [R10]
LEA EAX,[RDI + -0x2b]
AND AL,0xfd
CMP AL,0x1
ADC R10,0x0
MOV EAX,0xffffffff
XOR EDX,EDX
DIV ECX
XOR EBX,EBX
CMP R10,R11
JZ 0x0013892c
MOV qword ptr [RBP + -0x30],RDI
XOR R12D,R12D
MOV R14,R10
XOR R13D,R13D
LAB_001388b3:
MOV EBX,R13D
MOV R15D,R12D
MOV R12B,byte ptr [R14]
LEA EDI,[R12 + -0x30]
CMP DIL,0xa
JC 0x001388ea
LEA EDI,[R12 + -0x41]
CMP DIL,0x19
JA 0x001388d8
ADD R12B,0xc9
JMP 0x001388e7
LAB_001388d8:
LEA EDI,[R12 + -0x61]
CMP DIL,0x19
JA 0x00138926
ADD R12B,0xa9
LAB_001388e7:
MOV EDI,R12D
LAB_001388ea:
MOVZX EDI,DIL
CMP EDI,ECX
JGE 0x00138926
MOV R12D,0x1
CMP EBX,EAX
JBE 0x00138901
MOV R13D,EBX
JMP 0x00138915
LAB_00138901:
JNZ 0x0013890a
MOV R13D,EAX
CMP EDX,EDI
JC 0x00138915
LAB_0013890a:
IMUL EBX,ECX
ADD EBX,EDI
MOV R13D,EBX
MOV R12D,R15D
LAB_00138915:
INC R14
CMP R14,R11
JNZ 0x001388b3
MOV EBX,R13D
MOV R14,R11
MOV R15D,R12D
LAB_00138926:
MOV RDI,qword ptr [RBP + -0x30]
JMP 0x00138932
LAB_0013892c:
MOV R14,R11
XOR R15D,R15D
LAB_00138932:
CMP R14,R10
JZ 0x00138980
TEST R8,R8
JZ 0x0013893f
MOV qword ptr [R8],R14
LAB_0013893f:
CMP EBX,0x80000001
MOV EAX,0x1
MOV ECX,R15D
CMOVNC ECX,EAX
TEST EBX,EBX
CMOVS R15D,EAX
CMP DIL,0x2d
CMOVZ R15D,ECX
TEST R15D,R15D
JZ 0x0013899c
CMP DIL,0x2d
MOV dword ptr [R9],0x22
MOV RCX,-0x80000000
MOV EAX,0x7fffffff
CMOVZ RAX,RCX
JMP 0x00138991
LAB_00138980:
MOV dword ptr [R9],0x21
TEST R8,R8
JZ 0x0013898f
MOV qword ptr [R8],RSI
LAB_0013898f:
XOR EAX,EAX
LAB_00138991:
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013899c:
MOV ECX,EBX
MOV RAX,RCX
NEG RAX
CMP DIL,0x2d
CMOVNZ RAX,RCX
JMP 0x00138991
|
ulong my_strntol_8bit(long param_1,byte *param_2,long param_3,uint param_4,ulong *param_5,
int4 *param_6)
{
byte *pbVar1;
byte bVar2;
byte bVar3;
bool bVar4;
bool bVar5;
uint uVar6;
uint uVar7;
byte *pbVar8;
byte bVar9;
uint uVar10;
byte *pbVar11;
byte *pbVar12;
*param_6 = 0;
pbVar1 = param_2 + param_3;
pbVar8 = param_2;
if (0 < param_3) {
do {
if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*pbVar8) & 8) == 0) break;
pbVar8 = pbVar8 + 1;
} while (pbVar8 < pbVar1);
}
if (pbVar8 != pbVar1) {
bVar2 = *pbVar8;
pbVar8 = pbVar8 + ((bVar2 - 0x2b & 0xfd) == 0);
uVar10 = 0;
if (pbVar8 == pbVar1) {
bVar4 = false;
pbVar12 = pbVar1;
}
else {
bVar4 = false;
uVar10 = 0;
pbVar11 = pbVar8;
do {
bVar3 = *pbVar11;
bVar9 = bVar3 - 0x30;
pbVar12 = pbVar11;
if (9 < bVar9) {
if ((byte)(bVar3 + 0xbf) < 0x1a) {
bVar9 = bVar3 - 0x37;
}
else {
if (0x19 < (byte)(bVar3 + 0x9f)) break;
bVar9 = bVar3 + 0xa9;
}
}
if ((int)param_4 <= (int)(uint)bVar9) break;
uVar7 = (uint)(0xffffffff / (ulong)param_4);
uVar6 = uVar10;
bVar5 = true;
if ((uVar10 <= uVar7) &&
((uVar10 != uVar7 || (uVar6 = uVar7, (uint)bVar9 <= (uint)(0xffffffff % (ulong)param_4)))
)) {
uVar6 = uVar10 * param_4 + (uint)bVar9;
bVar5 = bVar4;
}
bVar4 = bVar5;
uVar10 = uVar6;
pbVar11 = pbVar11 + 1;
pbVar12 = pbVar1;
} while (pbVar11 != pbVar1);
}
if (pbVar12 != pbVar8) {
if (param_5 != (ulong *)0x0) {
*param_5 = (ulong)pbVar12;
}
bVar5 = bVar4;
if (0x80000000 < uVar10) {
bVar5 = true;
}
if ((int)uVar10 < 0) {
bVar4 = true;
}
if (bVar2 == 0x2d) {
bVar4 = bVar5;
}
if (bVar4) {
*param_6 = 0x22;
if (bVar2 != 0x2d) {
return 0x7fffffff;
}
return 0xffffffff80000000;
}
if (bVar2 == 0x2d) {
return -(ulong)uVar10;
}
return (ulong)uVar10;
}
}
*param_6 = 0x21;
if (param_5 != (ulong *)0x0) {
*param_5 = (ulong)param_2;
}
return 0;
}
| |
23,119 | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::get() | monkey531[P]llama/common/json.hpp | char_int_type get()
{
++position.chars_read_total;
++position.chars_read_current_line;
if (next_unget)
{
// just reset the next_unget variable and work with current
next_unget = false;
}
else
{
current = ia.get_character();
}
if (JSON_HEDLEY_LIKELY(current != char_traits<char_type>::eof()))
{
token_string.push_back(char_traits<char_type>::to_char_type(current));
}
if (current == '\n')
{
++position.lines_read;
position.chars_read_current_line = 0;
}
return current;
} | O0 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::get():
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x20(%rax)
movq 0x28(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x28(%rax)
testb $0x1, 0x18(%rax)
je 0xed38c
movq 0x10(%rsp), %rax
movb $0x0, 0x18(%rax)
jmp 0xed3a0
movq 0x10(%rsp), %rdi
callq 0xed500
movl %eax, %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0x14(%rax)
movq 0x10(%rsp), %rax
movl 0x14(%rax), %eax
movl %eax, 0xc(%rsp)
callq 0xebb10
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0xed3c6
jmp 0xed3f1
movq 0x10(%rsp), %rdi
movq %rdi, %rax
addq $0x38, %rax
movq %rax, (%rsp)
addq $0x14, %rdi
callq 0xed570
movq (%rsp), %rdi
movb %al, 0x1f(%rsp)
leaq 0x1f(%rsp), %rsi
callq 0x8d420
movq 0x10(%rsp), %rax
cmpl $0xa, 0x14(%rax)
jne 0xed415
movq 0x10(%rsp), %rax
movq 0x30(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x30(%rax)
movq $0x0, 0x28(%rax)
movq 0x10(%rsp), %rax
movl 0x14(%rax), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov rax, [rsp+28h+var_8]
mov [rsp+28h+var_18], rax
mov rcx, [rax+20h]
add rcx, 1
mov [rax+20h], rcx
mov rcx, [rax+28h]
add rcx, 1
mov [rax+28h], rcx
test byte ptr [rax+18h], 1
jz short loc_ED38C
mov rax, [rsp+28h+var_18]
mov byte ptr [rax+18h], 0
jmp short loc_ED3A0
loc_ED38C:
mov rdi, [rsp+28h+var_18]
call _ZN8nlohmann16json_abi_v3_11_36detail22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEE13get_characterEv; nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>::get_character(void)
mov ecx, eax
mov rax, [rsp+28h+var_18]
mov [rax+14h], ecx
loc_ED3A0:
mov rax, [rsp+28h+var_18]
mov eax, [rax+14h]
mov [rsp+28h+var_1C], eax
call _ZNSt11char_traitsIcE3eofEv; std::char_traits<char>::eof(void)
mov ecx, eax
mov eax, [rsp+28h+var_1C]
cmp eax, ecx
setnz al
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_ED3C6
jmp short loc_ED3F1
loc_ED3C6:
mov rdi, [rsp+28h+var_18]
mov rax, rdi
add rax, 38h ; '8'
mov [rsp+28h+var_28], rax
add rdi, 14h
call _ZNSt11char_traitsIcE12to_char_typeERKi; std::char_traits<char>::to_char_type(int const&)
mov rdi, [rsp+28h+var_28]
mov [rsp+28h+var_9], al
lea rsi, [rsp+28h+var_9]
call _ZNSt6vectorIcSaIcEE9push_backEOc; std::vector<char>::push_back(char &&)
loc_ED3F1:
mov rax, [rsp+28h+var_18]
cmp dword ptr [rax+14h], 0Ah
jnz short loc_ED415
mov rax, [rsp+28h+var_18]
mov rcx, [rax+30h]
add rcx, 1
mov [rax+30h], rcx
mov qword ptr [rax+28h], 0
loc_ED415:
mov rax, [rsp+28h+var_18]
mov eax, [rax+14h]
add rsp, 28h
retn
| long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(
long long a1)
{
int v2; // [rsp+Ch] [rbp-1Ch]
char v3; // [rsp+1Fh] [rbp-9h] BYREF
long long v4; // [rsp+20h] [rbp-8h]
v4 = a1;
++*(_QWORD *)(a1 + 32);
++*(_QWORD *)(a1 + 40);
if ( (*(_BYTE *)(a1 + 24) & 1) != 0 )
*(_BYTE *)(a1 + 24) = 0;
else
*(_DWORD *)(a1 + 20) = nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>::get_character(a1);
v2 = *(_DWORD *)(a1 + 20);
if ( v2 != (unsigned int)std::char_traits<char>::eof() )
{
v3 = std::char_traits<char>::to_char_type(a1 + 20);
std::vector<char>::push_back(a1 + 56, (long long)&v3);
}
if ( *(_DWORD *)(a1 + 20) == 10 )
{
++*(_QWORD *)(a1 + 48);
*(_QWORD *)(a1 + 40) = 0LL;
}
return *(unsigned int *)(a1 + 20);
}
| get:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x10],RAX
MOV RCX,qword ptr [RAX + 0x20]
ADD RCX,0x1
MOV qword ptr [RAX + 0x20],RCX
MOV RCX,qword ptr [RAX + 0x28]
ADD RCX,0x1
MOV qword ptr [RAX + 0x28],RCX
TEST byte ptr [RAX + 0x18],0x1
JZ 0x001ed38c
MOV RAX,qword ptr [RSP + 0x10]
MOV byte ptr [RAX + 0x18],0x0
JMP 0x001ed3a0
LAB_001ed38c:
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x001ed500
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RAX + 0x14],ECX
LAB_001ed3a0:
MOV RAX,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RAX + 0x14]
MOV dword ptr [RSP + 0xc],EAX
CALL 0x001ebb10
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0xc]
CMP EAX,ECX
SETNZ AL
XOR AL,0xff
XOR AL,0xff
TEST AL,0x1
JNZ 0x001ed3c6
JMP 0x001ed3f1
LAB_001ed3c6:
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,RDI
ADD RAX,0x38
MOV qword ptr [RSP],RAX
ADD RDI,0x14
CALL 0x001ed570
MOV RDI,qword ptr [RSP]
MOV byte ptr [RSP + 0x1f],AL
LEA RSI,[RSP + 0x1f]
CALL 0x0018d420
LAB_001ed3f1:
MOV RAX,qword ptr [RSP + 0x10]
CMP dword ptr [RAX + 0x14],0xa
JNZ 0x001ed415
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RAX + 0x30]
ADD RCX,0x1
MOV qword ptr [RAX + 0x30],RCX
MOV qword ptr [RAX + 0x28],0x0
LAB_001ed415:
MOV RAX,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RAX + 0x14]
ADD RSP,0x28
RET
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::get() */
int4 __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::get(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
int iVar1;
int4 uVar2;
int iVar3;
char local_9;
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*local_8;
*(long *)(this + 0x20) = *(long *)(this + 0x20) + 1;
*(long *)(this + 0x28) = *(long *)(this + 0x28) + 1;
local_8 = this;
if (((byte)this[0x18] & 1) == 0) {
uVar2 = iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>::
get_character((iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>
*)this);
*(int4 *)(this + 0x14) = uVar2;
}
else {
this[0x18] = (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
)0x0;
}
iVar1 = *(int *)(this + 0x14);
iVar3 = std::char_traits<char>::eof();
if (iVar1 != iVar3) {
local_9 = std::char_traits<char>::to_char_type((int *)(this + 0x14));
std::vector<char,std::allocator<char>>::push_back
((vector<char,std::allocator<char>> *)(this + 0x38),&local_9);
}
if (*(int *)(this + 0x14) == 10) {
*(long *)(this + 0x30) = *(long *)(this + 0x30) + 1;
*(int8 *)(this + 0x28) = 0;
}
return *(int4 *)(this + 0x14);
}
| |
23,120 | Item_sum_avg::create_tmp_field(st_mem_root*, bool, TABLE*) | eloqsql/sql/item_sum.cc | Field *Item_sum_avg::create_tmp_field(MEM_ROOT *root, bool group, TABLE *table)
{
if (group)
{
/*
We must store both value and counter in the temporary table in one field.
The easiest way is to do this is to store both value in a string
and unpack on access.
*/
Field *field= new (root)
Field_string(((result_type() == DECIMAL_RESULT) ?
dec_bin_size : sizeof(double)) + sizeof(longlong),
0, &name, &my_charset_bin);
if (field)
field->init(table);
return field;
}
return tmp_table_field_from_field_type(root, table);
} | O0 | cpp | Item_sum_avg::create_tmp_field(st_mem_root*, bool, TABLE*):
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x70(%rbp)
testb $0x1, -0x19(%rbp)
je 0xd037a8
movq -0x18(%rbp), %rsi
movq %rsi, -0x88(%rbp)
movl $0xe0, %edi
callq 0x980870
movq %rax, %rcx
movq %rcx, -0x80(%rbp)
movb $0x0, -0x41(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movq %rax, -0x78(%rbp)
je 0xd0375d
movq -0x70(%rbp), %rdi
movq -0x88(%rbp), %rax
movq -0x80(%rbp), %rcx
movq %rcx, -0x38(%rbp)
movq %rax, -0x40(%rbp)
movb $0x1, -0x41(%rbp)
callq 0x7fb480
movl %eax, -0x8c(%rbp)
jmp 0xd036d8
movl -0x8c(%rbp), %eax
cmpl $0x4, %eax
jne 0xd036f6
movq -0x70(%rbp), %rax
movl 0x20c(%rax), %eax
movq %rax, -0x98(%rbp)
jmp 0xd03704
movl $0x8, %eax
movq %rax, -0x98(%rbp)
jmp 0xd03704
movq -0x70(%rbp), %rax
movq -0x98(%rbp), %rcx
addl $0x8, %ecx
movl %ecx, -0xa4(%rbp)
addq $0x48, %rax
movq %rax, -0xa0(%rbp)
leaq 0xe0dcf6(%rip), %rsi # 0x1b11420
leaq -0x68(%rbp), %rdi
callq 0x870000
jmp 0xd03735
movq -0xa0(%rbp), %rcx
movl -0xa4(%rbp), %esi
movq -0x80(%rbp), %rdi
xorl %edx, %edx
leaq -0x68(%rbp), %r8
callq 0xd0b8a0
jmp 0xd03753
movq -0x80(%rbp), %rax
movq %rax, -0x78(%rbp)
jmp 0xd0375d
movq -0x78(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0xd0379e
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x822690
jmp 0xd0379e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
testb $0x1, -0x41(%rbp)
jne 0xd0378f
jmp 0xd0379c
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x980980
jmp 0xd037ca
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xd037bd
movq -0x70(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x7f0760
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x7589b0
nopw %cs:(%rax,%rax)
| _ZN12Item_sum_avg16create_tmp_fieldEP11st_mem_rootbP5TABLE:
push rbp
mov rbp, rsp
sub rsp, 0B0h
mov al, dl
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
and al, 1
mov [rbp+var_19], al
mov [rbp+var_28], rcx
mov rax, [rbp+var_10]
mov [rbp+var_70], rax
test [rbp+var_19], 1
jz loc_D037A8
mov rsi, [rbp+var_18]
mov [rbp+var_88], rsi
mov edi, 0E0h
call _ZN5FieldnwEmP11st_mem_root; Field::operator new(ulong,st_mem_root *)
mov rcx, rax
mov [rbp+var_80], rcx
mov [rbp+var_41], 0
xor eax, eax
cmp rcx, 0
mov [rbp+var_78], rax
jz loc_D0375D
mov rdi, [rbp+var_70]; this
mov rax, [rbp+var_88]
mov rcx, [rbp+var_80]
mov [rbp+var_38], rcx
mov [rbp+var_40], rax
mov [rbp+var_41], 1
call _ZNK4Item11result_typeEv; Item::result_type(void)
mov [rbp+var_8C], eax
jmp short $+2
loc_D036D8:
mov eax, [rbp+var_8C]
cmp eax, 4
jnz short loc_D036F6
mov rax, [rbp+var_70]
mov eax, [rax+20Ch]
mov [rbp+var_98], rax
jmp short loc_D03704
loc_D036F6:
mov eax, 8
mov [rbp+var_98], rax
jmp short $+2
loc_D03704:
mov rax, [rbp+var_70]
mov rcx, [rbp+var_98]
add ecx, 8
mov [rbp+var_A4], ecx
add rax, 48h ; 'H'
mov [rbp+var_A0], rax
lea rsi, my_charset_bin; charset_info_st *
lea rdi, [rbp+var_68]; this
call _ZN11DTCollationC2EPK15charset_info_st; DTCollation::DTCollation(charset_info_st const*)
jmp short $+2
loc_D03735:
mov rcx, [rbp+var_A0]
mov esi, [rbp+var_A4]
mov rdi, [rbp+var_80]
xor edx, edx
lea r8, [rbp+var_68]
call _ZN12Field_stringC2EjbPK25st_mysql_const_lex_stringRK11DTCollation; Field_string::Field_string(uint,bool,st_mysql_const_lex_string const*,DTCollation const&)
jmp short $+2
loc_D03753:
mov rax, [rbp+var_80]
mov [rbp+var_78], rax
jmp short $+2
loc_D0375D:
mov rax, [rbp+var_78]
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
jz short loc_D0379E
mov rdi, [rbp+var_30]; this
mov rsi, [rbp+var_28]; TABLE *
call _ZN5Field4initEP5TABLE; Field::init(TABLE *)
jmp short loc_D0379E
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
test [rbp+var_41], 1
jnz short loc_D0378F
jmp short loc_D0379C
loc_D0378F:
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_40]
call _ZN5FielddlEPvP11st_mem_root; Field::operator delete(void *,st_mem_root *)
loc_D0379C:
jmp short loc_D037CA
loc_D0379E:
mov rax, [rbp+var_30]
mov [rbp+var_8], rax
jmp short loc_D037BD
loc_D037A8:
mov rdi, [rbp+var_70]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_28]
call _ZN4Item31tmp_table_field_from_field_typeEP11st_mem_rootP5TABLE; Item::tmp_table_field_from_field_type(st_mem_root *,TABLE *)
mov [rbp+var_8], rax
loc_D037BD:
mov rax, [rbp+var_8]
add rsp, 0B0h
pop rbp
retn
loc_D037CA:
mov rdi, [rbp+var_50]
call __Unwind_Resume
| Field * Item_sum_avg::create_tmp_field(Item *a1, long long a2, char a3, TABLE *a4)
{
int v5; // [rsp+18h] [rbp-98h]
long long v6; // [rsp+30h] [rbp-80h]
Field *v7; // [rsp+38h] [rbp-78h]
_BYTE v8[20]; // [rsp+48h] [rbp-68h] BYREF
char v9; // [rsp+6Fh] [rbp-41h]
long long v10; // [rsp+70h] [rbp-40h]
long long v11; // [rsp+78h] [rbp-38h]
Field *v12; // [rsp+80h] [rbp-30h]
TABLE *v13; // [rsp+88h] [rbp-28h]
char v14; // [rsp+97h] [rbp-19h]
long long v15; // [rsp+98h] [rbp-18h]
Item *v16; // [rsp+A0h] [rbp-10h]
v16 = a1;
v15 = a2;
v14 = a3 & 1;
v13 = a4;
if ( (a3 & 1) == 0 )
return (Field *)Item::tmp_table_field_from_field_type(a1, v15, (long long)v13);
v6 = Field::operator new(224LL, v15);
v9 = 0;
v7 = 0LL;
if ( v6 )
{
v11 = v6;
v10 = v15;
v9 = 1;
if ( (unsigned int)Item::result_type(a1) == 4 )
v5 = *((_DWORD *)a1 + 131);
else
v5 = 8;
DTCollation::DTCollation((DTCollation *)v8, (const charset_info_st *)&my_charset_bin);
Field_string::Field_string(v6, (unsigned int)(v5 + 8), 0LL, (char *)a1 + 72, v8);
v7 = (Field *)v6;
}
v12 = v7;
if ( v7 )
Field::init(v12, v13);
return v12;
}
| create_length_to_internal_length_newdecimal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00d03666
LAB_00d03666:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX + 0x8]
MOV EDI,ECX
MOV CX,word ptr [RAX + 0x28]
MOV EAX,dword ptr [RAX + 0x68]
AND EAX,0x20
CMP EAX,0x0
SETNZ AL
MOVZX ESI,CX
MOVZX EDX,AL
AND EDX,0x1
CALL 0x00cecef0
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX ECX,CX
MOV dword ptr [RBP + -0xc],ECX
MOV ECX,dword ptr [RBP + -0xc]
MOVZX EDI,CX
MOVZX ESI,word ptr [RAX + 0x28]
CALL 0x00a814d0
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x6c],ECX
ADD RSP,0x20
POP RBP
RET
|
/* Column_definition::create_length_to_internal_length_newdecimal() */
void __thiscall
Column_definition::create_length_to_internal_length_newdecimal(Column_definition *this)
{
ushort uVar1;
int4 uVar2;
uVar1 = get_decimal_precision
((uint)*(int8 *)(this + 8),*(ushort *)(this + 0x28),
(*(uint *)(this + 0x68) & 0x20) != 0);
uVar2 = my_decimal_get_binary_size(uVar1,*(ushort *)(this + 0x28));
*(int4 *)(this + 0x6c) = uVar2;
return;
}
| |
23,121 | my_strnncollsp_nchars_binary | eloqsql/strings/ctype-bin.c | static int my_strnncollsp_nchars_binary(CHARSET_INFO * cs __attribute__((unused)),
const uchar *s, size_t slen,
const uchar *t, size_t tlen,
size_t nchars)
{
set_if_smaller(slen, nchars);
set_if_smaller(tlen, nchars);
return my_strnncoll_binary(cs, s, slen, t, tlen, 0);
} | O3 | c | my_strnncollsp_nchars_binary:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %r9, %rbx
movq %rdx, %r14
cmpq %r9, %rdx
cmovaeq %r9, %r14
movq %rsi, %rdi
cmpq %r9, %r8
cmovbq %r8, %rbx
cmpq %rbx, %r14
movq %rbx, %rdx
cmovbq %r14, %rdx
movq %rcx, %rsi
callq 0x2a910
subl %ebx, %r14d
testl %eax, %eax
cmovel %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
| my_strnncollsp_nchars_binary:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, r9
mov r14, rdx
cmp rdx, r9
cmovnb r14, r9
mov rdi, rsi
cmp r8, r9
cmovb rbx, r8
cmp r14, rbx
mov rdx, rbx
cmovb rdx, r14
mov rsi, rcx
call _memcmp
sub r14d, ebx
test eax, eax
cmovz eax, r14d
pop rbx
pop r14
pop rbp
retn
| long long my_strnncollsp_nchars_binary(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
unsigned long long a6)
{
unsigned long long v6; // rbx
unsigned long long v7; // r14
unsigned long long v8; // rdx
long long result; // rax
unsigned int v10; // r14d
v6 = a6;
v7 = a3;
if ( a3 >= a6 )
v7 = a6;
if ( a5 < a6 )
v6 = a5;
v8 = v6;
if ( v7 < v6 )
v8 = v7;
result = memcmp(a2, a4, v8);
v10 = v7 - v6;
if ( !(_DWORD)result )
return v10;
return result;
}
| my_strnncollsp_nchars_binary:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,R9
MOV R14,RDX
CMP RDX,R9
CMOVNC R14,R9
MOV RDI,RSI
CMP R8,R9
CMOVC RBX,R8
CMP R14,RBX
MOV RDX,RBX
CMOVC RDX,R14
MOV RSI,RCX
CALL 0x0012a910
SUB R14D,EBX
TEST EAX,EAX
CMOVZ EAX,R14D
POP RBX
POP R14
POP RBP
RET
|
int my_strnncollsp_nchars_binary
(int8 param_1,void *param_2,ulong param_3,void *param_4,ulong param_5,
ulong param_6)
{
int iVar1;
ulong __n;
if (param_6 <= param_3) {
param_3 = param_6;
}
if (param_5 < param_6) {
param_6 = param_5;
}
__n = param_6;
if (param_3 < param_6) {
__n = param_3;
}
iVar1 = memcmp(param_2,param_4,__n);
if (iVar1 == 0) {
iVar1 = (int)param_3 - (int)param_6;
}
return iVar1;
}
| |
23,122 | add_rpc_devices(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) | monkey531[P]llama/common/arg.cpp | static void add_rpc_devices(std::string servers) {
auto rpc_servers = string_split<std::string>(servers, ',');
if (rpc_servers.empty()) {
throw std::invalid_argument("no RPC servers specified");
}
ggml_backend_reg_t rpc_reg = ggml_backend_reg_by_name("RPC");
if (!rpc_reg) {
throw std::invalid_argument("failed to find RPC backend");
}
typedef ggml_backend_dev_t (*ggml_backend_rpc_add_device_t)(const char * endpoint);
ggml_backend_rpc_add_device_t ggml_backend_rpc_add_device_fn = (ggml_backend_rpc_add_device_t) ggml_backend_reg_get_proc_address(rpc_reg, "ggml_backend_rpc_add_device");
if (!ggml_backend_rpc_add_device_fn) {
throw std::invalid_argument("failed to find RPC device add function");
}
for (const auto & server : rpc_servers) {
ggml_backend_dev_t dev = ggml_backend_rpc_add_device_fn(server.c_str());
if (dev) {
ggml_backend_device_register(dev);
} else {
throw std::invalid_argument("failed to register RPC device");
}
}
} | O0 | cpp | add_rpc_devices(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>):
subq $0xa8, %rsp
movq %rdi, %rsi
movq %rsi, 0xa0(%rsp)
leaq 0x88(%rsp), %rdi
movl $0x2c, %edx
callq 0x84500
leaq 0x88(%rsp), %rdi
callq 0x8ec20
testb $0x1, %al
jne 0x883e7
jmp 0x8845d
movl $0x10, %edi
callq 0x5a680
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x38(%rsp)
leaq 0x187406(%rip), %rsi # 0x20f809
callq 0x5a300
jmp 0x8840a
movq 0x38(%rsp), %rdi
movq 0x21bb12(%rip), %rsi # 0x2a3f28
movq 0x21bb03(%rip), %rdx # 0x2a3f20
callq 0x5aae0
jmp 0x8869a
movq 0x38(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
callq 0x5af60
jmp 0x88680
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
jmp 0x88680
leaq 0x183437(%rip), %rdi # 0x20b89b
callq 0x5aee0
movq %rax, 0x30(%rsp)
jmp 0x88470
movq 0x30(%rsp), %rax
movq %rax, 0x70(%rsp)
cmpq $0x0, 0x70(%rsp)
jne 0x884e2
movl $0x10, %edi
callq 0x5a680
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x28(%rsp)
leaq 0x187384(%rip), %rsi # 0x20f822
callq 0x5a300
jmp 0x884a5
movq 0x28(%rsp), %rdi
movq 0x21ba77(%rip), %rsi # 0x2a3f28
movq 0x21ba68(%rip), %rdx # 0x2a3f20
callq 0x5aae0
jmp 0x8869a
movq 0x28(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
callq 0x5af60
jmp 0x88680
movq 0x70(%rsp), %rdi
leaq 0x18734f(%rip), %rsi # 0x20f83d
callq 0x5a410
movq %rax, 0x20(%rsp)
jmp 0x884fa
movq 0x20(%rsp), %rax
movq %rax, 0x68(%rsp)
cmpq $0x0, 0x68(%rsp)
jne 0x8856c
movl $0x10, %edi
callq 0x5a680
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x18(%rsp)
leaq 0x187331(%rip), %rsi # 0x20f859
callq 0x5a300
jmp 0x8852f
movq 0x18(%rsp), %rdi
movq 0x21b9ed(%rip), %rsi # 0x2a3f28
movq 0x21b9de(%rip), %rdx # 0x2a3f20
callq 0x5aae0
jmp 0x8869a
movq 0x18(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
callq 0x5af60
jmp 0x88680
leaq 0x88(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rdi
callq 0x629a0
movq %rax, 0x58(%rsp)
movq 0x60(%rsp), %rdi
callq 0x629d0
movq %rax, 0x50(%rsp)
leaq 0x58(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x62a00
testb $0x1, %al
jne 0x885af
jmp 0x8866b
leaq 0x58(%rsp), %rdi
callq 0x62a40
movq %rax, 0x48(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x48(%rsp), %rdi
callq 0x5a1c0
movq %rax, %rdi
movq 0x8(%rsp), %rax
callq *%rax
movq %rax, 0x10(%rsp)
jmp 0x885e3
movq 0x10(%rsp), %rax
movq %rax, 0x40(%rsp)
cmpq $0x0, 0x40(%rsp)
je 0x88603
movq 0x40(%rsp), %rdi
callq 0x5b010
jmp 0x88601
jmp 0x8865a
movl $0x10, %edi
callq 0x5a680
movq %rax, %rdi
movq %rdi, %rax
movq %rax, (%rsp)
leaq 0x187262(%rip), %rsi # 0x20f880
callq 0x5a300
jmp 0x88625
movq (%rsp), %rdi
movq 0x21b8f8(%rip), %rsi # 0x2a3f28
movq 0x21b8e9(%rip), %rdx # 0x2a3f20
callq 0x5aae0
jmp 0x8869a
movq (%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
callq 0x5af60
jmp 0x88680
jmp 0x8865c
leaq 0x58(%rsp), %rdi
callq 0x62b40
jmp 0x88597
leaq 0x88(%rsp), %rdi
callq 0x62f80
addq $0xa8, %rsp
retq
leaq 0x88(%rsp), %rdi
callq 0x62f80
movq 0x80(%rsp), %rdi
callq 0x5aba0
nopw (%rax,%rax)
| _ZL15add_rpc_devicesNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 0A8h
mov rsi, rdi
mov [rsp+0A8h+var_8], rsi
lea rdi, [rsp+0A8h+var_20]
mov edx, 2Ch ; ','
call _ZL12string_splitINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorIT_SaIS7_EERKS5_c; string_split<std::string>(std::string const&,char)
lea rdi, [rsp+0A8h+var_20]
call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5emptyEv; std::vector<std::string>::empty(void)
test al, 1
jnz short loc_883E7
jmp short loc_8845D
loc_883E7:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rsp+0A8h+var_70], rax
lea rsi, aNoRpcServersSp; "no RPC servers specified"
call __ZNSt16invalid_argumentC1EPKc; std::invalid_argument::invalid_argument(char const*)
jmp short $+2
loc_8840A:
mov rdi, [rsp+0A8h+var_70]; void *
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt16invalid_argumentD1Ev_ptr; void (*)(void *)
call ___cxa_throw
jmp loc_8869A
mov rdi, [rsp+arg_30]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_78], rcx
mov [rsp+arg_74], eax
call ___cxa_free_exception
jmp loc_88680
mov rcx, rax
mov eax, edx
mov [rsp+arg_78], rcx
mov [rsp+arg_74], eax
jmp loc_88680
loc_8845D:
lea rdi, aLlamaArgRpc+0Ah; "RPC"
call _ggml_backend_reg_by_name
mov [rsp+0A8h+var_78], rax
jmp short $+2
loc_88470:
mov rax, [rsp+0A8h+var_78]
mov [rsp+0A8h+var_38], rax
cmp [rsp+0A8h+var_38], 0
jnz short loc_884E2
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rsp+0A8h+var_80], rax
lea rsi, aFailedToFindRp; "failed to find RPC backend"
call __ZNSt16invalid_argumentC1EPKc; std::invalid_argument::invalid_argument(char const*)
jmp short $+2
loc_884A5:
mov rdi, [rsp+0A8h+var_80]; void *
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt16invalid_argumentD1Ev_ptr; void (*)(void *)
call ___cxa_throw
jmp loc_8869A
mov rdi, [rsp+arg_20]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_78], rcx
mov [rsp+arg_74], eax
call ___cxa_free_exception
jmp loc_88680
loc_884E2:
mov rdi, [rsp+0A8h+var_38]
lea rsi, aGgmlBackendRpc; "ggml_backend_rpc_add_device"
call _ggml_backend_reg_get_proc_address
mov [rsp+0A8h+var_88], rax
jmp short $+2
loc_884FA:
mov rax, [rsp+0A8h+var_88]
mov [rsp+0A8h+var_40], rax
cmp [rsp+0A8h+var_40], 0
jnz short loc_8856C
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rsp+0A8h+var_90], rax
lea rsi, aFailedToFindRp_0; "failed to find RPC device add function"
call __ZNSt16invalid_argumentC1EPKc; std::invalid_argument::invalid_argument(char const*)
jmp short $+2
loc_8852F:
mov rdi, [rsp+0A8h+var_90]; void *
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt16invalid_argumentD1Ev_ptr; void (*)(void *)
call ___cxa_throw
jmp loc_8869A
mov rdi, [rsp+arg_10]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_78], rcx
mov [rsp+arg_74], eax
call ___cxa_free_exception
jmp loc_88680
loc_8856C:
lea rax, [rsp+0A8h+var_20]
mov [rsp+0A8h+var_48], rax
mov rdi, [rsp+0A8h+var_48]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void)
mov [rsp+0A8h+var_50], rax
mov rdi, [rsp+0A8h+var_48]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE3endEv; std::vector<std::string>::end(void)
mov [rsp+0A8h+var_58], rax
loc_88597:
lea rdi, [rsp+0A8h+var_50]
lea rsi, [rsp+0A8h+var_58]
call _ZN9__gnu_cxxneIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_; __gnu_cxx::operator!=<std::string *,std::vector<std::string>>(__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>> const&,__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>> const&)
test al, 1
jnz short loc_885AF
jmp loc_8866B
loc_885AF:
lea rdi, [rsp+0A8h+var_50]
call _ZNK9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEdeEv; __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator*(void)
mov [rsp+0A8h+var_60], rax
mov rax, [rsp+0A8h+var_40]
mov [rsp+0A8h+var_A0], rax
mov rdi, [rsp+0A8h+var_60]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdi, rax
mov rax, [rsp+0A8h+var_A0]
call rax
mov [rsp+0A8h+var_98], rax
jmp short $+2
loc_885E3:
mov rax, [rsp+0A8h+var_98]
mov [rsp+0A8h+var_68], rax
cmp [rsp+0A8h+var_68], 0
jz short loc_88603
mov rdi, [rsp+0A8h+var_68]
call _ggml_backend_device_register
jmp short $+2
loc_88601:
jmp short loc_8865A
loc_88603:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rsp+0A8h+var_A8], rax
lea rsi, aFailedToRegist; "failed to register RPC device"
call __ZNSt16invalid_argumentC1EPKc; std::invalid_argument::invalid_argument(char const*)
jmp short $+2
loc_88625:
mov rdi, [rsp+0A8h+var_A8]; void *
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt16invalid_argumentD1Ev_ptr; void (*)(void *)
call ___cxa_throw
jmp short loc_8869A
mov rdi, [rsp+0]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_78], rcx
mov [rsp+arg_74], eax
call ___cxa_free_exception
jmp short loc_88680
loc_8865A:
jmp short $+2
loc_8865C:
lea rdi, [rsp+0A8h+var_50]
call _ZN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEppEv; __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator++(void)
jmp loc_88597
loc_8866B:
lea rdi, [rsp+0A8h+var_20]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
add rsp, 0A8h
retn
loc_88680:
lea rdi, [rsp+arg_80]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, [rsp+arg_78]
call __Unwind_Resume
loc_8869A:
nop word ptr [rax+rax+00h]
| long long add_rpc_devices(long long a1)
{
long long v1; // rax
std::invalid_argument *v3; // [rsp+0h] [rbp-A8h]
long long ( *v4)(long long); // [rsp+8h] [rbp-A0h]
std::invalid_argument *v5; // [rsp+18h] [rbp-90h]
std::invalid_argument *v6; // [rsp+28h] [rbp-80h]
std::invalid_argument *exception; // [rsp+38h] [rbp-70h]
long long v8; // [rsp+40h] [rbp-68h]
long long v9; // [rsp+48h] [rbp-60h]
long long v10; // [rsp+50h] [rbp-58h] BYREF
_QWORD v11[2]; // [rsp+58h] [rbp-50h] BYREF
long long proc_address; // [rsp+68h] [rbp-40h]
long long v13; // [rsp+70h] [rbp-38h]
long long v14[4]; // [rsp+88h] [rbp-20h] BYREF
v14[3] = a1;
string_split<std::string>((long long)v14, a1, 44);
if ( (std::vector<std::string>::empty(v14) & 1) != 0 )
{
exception = (std::invalid_argument *)__cxa_allocate_exception(0x10uLL);
std::invalid_argument::invalid_argument(exception, "no RPC servers specified");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::invalid_argument,
(void (*)(void *))&std::invalid_argument::~invalid_argument);
}
v13 = ggml_backend_reg_by_name("RPC");
if ( !v13 )
{
v6 = (std::invalid_argument *)__cxa_allocate_exception(0x10uLL);
std::invalid_argument::invalid_argument(v6, "failed to find RPC backend");
__cxa_throw(
v6,
(struct type_info *)&`typeinfo for'std::invalid_argument,
(void (*)(void *))&std::invalid_argument::~invalid_argument);
}
proc_address = ggml_backend_reg_get_proc_address(v13, "ggml_backend_rpc_add_device");
if ( !proc_address )
{
v5 = (std::invalid_argument *)__cxa_allocate_exception(0x10uLL);
std::invalid_argument::invalid_argument(v5, "failed to find RPC device add function");
__cxa_throw(
v5,
(struct type_info *)&`typeinfo for'std::invalid_argument,
(void (*)(void *))&std::invalid_argument::~invalid_argument);
}
v11[1] = v14;
v11[0] = std::vector<std::string>::begin((long long)v14);
v10 = std::vector<std::string>::end((long long)v14);
while ( __gnu_cxx::operator!=<std::string *,std::vector<std::string>>((long long)v11, (long long)&v10) )
{
v9 = __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator*((long long)v11);
v4 = (long long ( *)(long long))proc_address;
v1 = std::string::c_str(v9);
v8 = v4(v1);
if ( !v8 )
{
v3 = (std::invalid_argument *)__cxa_allocate_exception(0x10uLL);
std::invalid_argument::invalid_argument(v3, "failed to register RPC device");
__cxa_throw(
v3,
(struct type_info *)&`typeinfo for'std::invalid_argument,
(void (*)(void *))&std::invalid_argument::~invalid_argument);
}
ggml_backend_device_register(v8);
__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator++(v11);
}
return std::vector<std::string>::~vector(v14);
}
| add_rpc_devices:
SUB RSP,0xa8
MOV RSI,RDI
MOV qword ptr [RSP + 0xa0],RSI
LEA RDI,[RSP + 0x88]
MOV EDX,0x2c
CALL 0x00184500
LEA RDI,[RSP + 0x88]
CALL 0x0018ec20
TEST AL,0x1
JNZ 0x001883e7
JMP 0x0018845d
LAB_001883e7:
MOV EDI,0x10
CALL 0x0015a680
MOV RDI,RAX
MOV RAX,RDI
MOV qword ptr [RSP + 0x38],RAX
LAB_001883fc:
LEA RSI,[0x30f809]
CALL 0x0015a300
JMP 0x0018840a
LAB_0018840a:
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [0x003a3f28]
MOV RDX,qword ptr [0x003a3f20]
CALL 0x0015aae0
LAB_0018845d:
LEA RDI,[0x30b89b]
CALL 0x0015aee0
LAB_00188469:
MOV qword ptr [RSP + 0x30],RAX
JMP 0x00188470
LAB_00188470:
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x70],RAX
CMP qword ptr [RSP + 0x70],0x0
JNZ 0x001884e2
MOV EDI,0x10
CALL 0x0015a680
MOV RDI,RAX
MOV RAX,RDI
MOV qword ptr [RSP + 0x28],RAX
LAB_00188497:
LEA RSI,[0x30f822]
CALL 0x0015a300
JMP 0x001884a5
LAB_001884a5:
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [0x003a3f28]
MOV RDX,qword ptr [0x003a3f20]
CALL 0x0015aae0
LAB_001884e2:
MOV RDI,qword ptr [RSP + 0x70]
LAB_001884e7:
LEA RSI,[0x30f83d]
CALL 0x0015a410
LAB_001884f3:
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001884fa
LAB_001884fa:
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x68],RAX
CMP qword ptr [RSP + 0x68],0x0
JNZ 0x0018856c
MOV EDI,0x10
CALL 0x0015a680
MOV RDI,RAX
MOV RAX,RDI
MOV qword ptr [RSP + 0x18],RAX
LAB_00188521:
LEA RSI,[0x30f859]
CALL 0x0015a300
JMP 0x0018852f
LAB_0018852f:
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [0x003a3f28]
MOV RDX,qword ptr [0x003a3f20]
CALL 0x0015aae0
LAB_0018856c:
LEA RAX,[RSP + 0x88]
MOV qword ptr [RSP + 0x60],RAX
MOV RDI,qword ptr [RSP + 0x60]
CALL 0x001629a0
MOV qword ptr [RSP + 0x58],RAX
MOV RDI,qword ptr [RSP + 0x60]
CALL 0x001629d0
MOV qword ptr [RSP + 0x50],RAX
LAB_00188597:
LEA RDI,[RSP + 0x58]
LEA RSI,[RSP + 0x50]
CALL 0x00162a00
TEST AL,0x1
JNZ 0x001885af
JMP 0x0018866b
LAB_001885af:
LEA RDI,[RSP + 0x58]
CALL 0x00162a40
MOV qword ptr [RSP + 0x48],RAX
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x48]
CALL 0x0015a1c0
MOV RDI,RAX
MOV RAX,qword ptr [RSP + 0x8]
LAB_001885da:
CALL RAX
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001885e3
LAB_001885e3:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x40],RAX
CMP qword ptr [RSP + 0x40],0x0
JZ 0x00188603
MOV RDI,qword ptr [RSP + 0x40]
CALL 0x0015b010
LAB_001885ff:
JMP 0x00188601
LAB_00188601:
JMP 0x0018865a
LAB_00188603:
MOV EDI,0x10
CALL 0x0015a680
MOV RDI,RAX
MOV RAX,RDI
MOV qword ptr [RSP],RAX
LAB_00188617:
LEA RSI,[0x30f880]
CALL 0x0015a300
JMP 0x00188625
LAB_00188625:
MOV RDI,qword ptr [RSP]
MOV RSI,qword ptr [0x003a3f28]
MOV RDX,qword ptr [0x003a3f20]
CALL 0x0015aae0
LAB_0018865a:
JMP 0x0018865c
LAB_0018865c:
LEA RDI,[RSP + 0x58]
CALL 0x00162b40
JMP 0x00188597
LAB_0018866b:
LEA RDI,[RSP + 0x88]
CALL 0x00162f80
ADD RSP,0xa8
RET
|
/* add_rpc_devices(std::__cxx11::string) */
void add_rpc_devices(int8 param_1)
{
code *pcVar1;
bool bVar2;
ulong uVar3;
invalid_argument *piVar4;
int8 uVar5;
long lVar6;
int8 local_58;
int8 local_50;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_48;
code *local_40;
long local_38;
string local_20 [24];
int8 local_8;
local_8 = param_1;
string_split<std::__cxx11::string>(local_20,(char)param_1);
uVar3 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::empty
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_20);
if ((uVar3 & 1) != 0) {
piVar4 = (invalid_argument *)__cxa_allocate_exception(0x10);
/* try { // try from 001883fc to 00188407 has its CatchHandler @ 00188427 */
std::invalid_argument::invalid_argument(piVar4,"no RPC servers specified");
/* try { // try from 0018840a to 00188421 has its CatchHandler @ 00188447 */
/* WARNING: Subroutine does not return */
__cxa_throw(piVar4,PTR_typeinfo_003a3f28,PTR__invalid_argument_003a3f20);
}
/* try { // try from 0018845d to 00188468 has its CatchHandler @ 00188447 */
local_38 = ggml_backend_reg_by_name("RPC");
if (local_38 == 0) {
piVar4 = (invalid_argument *)__cxa_allocate_exception(0x10);
/* try { // try from 00188497 to 001884a2 has its CatchHandler @ 001884c2 */
std::invalid_argument::invalid_argument(piVar4,"failed to find RPC backend");
/* try { // try from 001884a5 to 001884bc has its CatchHandler @ 00188447 */
/* WARNING: Subroutine does not return */
__cxa_throw(piVar4,PTR_typeinfo_003a3f28,PTR__invalid_argument_003a3f20);
}
/* try { // try from 001884e7 to 001884f2 has its CatchHandler @ 00188447 */
local_40 = (code *)ggml_backend_reg_get_proc_address(local_38,"ggml_backend_rpc_add_device");
if (local_40 == (code *)0x0) {
piVar4 = (invalid_argument *)__cxa_allocate_exception(0x10);
/* try { // try from 00188521 to 0018852c has its CatchHandler @ 0018854c */
std::invalid_argument::invalid_argument(piVar4,"failed to find RPC device add function");
/* try { // try from 0018852f to 00188546 has its CatchHandler @ 00188447 */
/* WARNING: Subroutine does not return */
__cxa_throw(piVar4,PTR_typeinfo_003a3f28,PTR__invalid_argument_003a3f20);
}
local_48 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_20;
local_50 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::begin(local_48)
;
local_58 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::end(local_48);
while( true ) {
bVar2 = __gnu_cxx::operator!=((__normal_iterator *)&local_50,(__normal_iterator *)&local_58);
if (!bVar2) {
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_20);
return;
}
__gnu_cxx::
__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
::operator*((__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
*)&local_50);
pcVar1 = local_40;
uVar5 = std::__cxx11::string::c_str();
/* try { // try from 001885da to 001885fe has its CatchHandler @ 00188447 */
lVar6 = (*pcVar1)(uVar5);
if (lVar6 == 0) break;
ggml_backend_device_register(lVar6);
__gnu_cxx::
__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
::operator++((__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
*)&local_50);
}
piVar4 = (invalid_argument *)__cxa_allocate_exception(0x10);
/* try { // try from 00188617 to 00188622 has its CatchHandler @ 0018863e */
std::invalid_argument::invalid_argument(piVar4,"failed to register RPC device");
/* try { // try from 00188625 to 0018863b has its CatchHandler @ 00188447 */
/* WARNING: Subroutine does not return */
__cxa_throw(piVar4,PTR_typeinfo_003a3f28,PTR__invalid_argument_003a3f20);
}
| |
23,123 | nglog::tools::GetSectionHeaderByName(int, char const*, unsigned long, Elf64_Shdr*) | ng-log[P]ng-log/src/symbolize.cc | bool GetSectionHeaderByName(int fd, const char* name, size_t name_len,
ElfW(Shdr) * out) {
ElfW(Ehdr) elf_header;
if (!ReadFromOffsetExact(fd, &elf_header, sizeof(elf_header), 0)) {
return false;
}
ElfW(Shdr) shstrtab;
size_t shstrtab_offset =
(elf_header.e_shoff + static_cast<size_t>(elf_header.e_shentsize) *
static_cast<size_t>(elf_header.e_shstrndx));
if (!ReadFromOffsetExact(fd, &shstrtab, sizeof(shstrtab), shstrtab_offset)) {
return false;
}
for (size_t i = 0; i < elf_header.e_shnum; ++i) {
size_t section_header_offset =
(elf_header.e_shoff + elf_header.e_shentsize * i);
if (!ReadFromOffsetExact(fd, out, sizeof(*out), section_header_offset)) {
return false;
}
char header_name[kMaxSectionNameLen];
if (sizeof(header_name) < name_len) {
RAW_LOG(WARNING,
"Section name '%s' is too long (%zu); "
"section will not be found (even if present).",
name, name_len);
// No point in even trying.
return false;
}
size_t name_offset = shstrtab.sh_offset + out->sh_name;
ssize_t n_read = ReadFromOffset(fd, &header_name, name_len, name_offset);
if (n_read == -1) {
return false;
} else if (static_cast<size_t>(n_read) != name_len) {
// Short read -- name could be at end of file.
continue;
}
if (memcmp(header_name, name, name_len) == 0) {
return true;
}
}
return false;
} | O1 | cpp | nglog::tools::GetSectionHeaderByName(int, char const*, unsigned long, Elf64_Shdr*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rcx, %rbx
movq %rdx, 0x20(%rsp)
movq %rsi, 0x10(%rsp)
movl %edi, %ebp
xorl %r13d, %r13d
leaq 0x30(%rsp), %rsi
movl $0x40, %edx
xorl %ecx, %ecx
callq 0x21664
cmpq $0x40, %rax
jne 0x2164b
movq 0x58(%rsp), %r12
movzwl 0x6a(%rsp), %eax
movzwl 0x6e(%rsp), %ecx
movq %rax, 0x28(%rsp)
imulq %rax, %rcx
addq %r12, %rcx
leaq 0xb8(%rsp), %rsi
movl $0x40, %edx
movl %ebp, %edi
callq 0x21664
cmpq $0x40, %rax
jne 0x21648
movzwl 0x6c(%rsp), %r15d
testq %r15, %r15
je 0x21648
movq 0xd0(%rsp), %rax
movq %rax, 0x18(%rsp)
movq %rbx, 0x8(%rsp)
movl $0x40, %edx
movl %ebp, %edi
movq %rbx, %rsi
movq %r12, %rcx
callq 0x21664
cmpq $0x40, %rax
jne 0x215d1
movq 0x20(%rsp), %rax
cmpq $0x41, %rax
jb 0x215dc
xorl %r13d, %r13d
movl $0x1, %r14d
movl $0x1, %edi
leaq 0x3ab3(%rip), %rsi # 0x25067
movl $0x10d, %edx # imm = 0x10D
leaq 0x3af0(%rip), %rcx # 0x250b0
movq 0x10(%rsp), %r8
movq %rax, %r9
xorl %eax, %eax
callq 0x2046c
jmp 0x21634
movl $0x1, %r14d
xorl %r13d, %r13d
jmp 0x21634
movl (%rbx), %ecx
addq 0x18(%rsp), %rcx
movl %ebp, %edi
leaq 0x70(%rsp), %rsi
movq %rax, %rdx
movq %rax, %rbx
callq 0x21664
cmpq $-0x1, %rax
je 0x21626
movl $0x4, %r14d
cmpq %rbx, %rax
jne 0x2162f
leaq 0x70(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rbx, %rdx
callq 0x7540
xorl %r14d, %r14d
testl %eax, %eax
sete %r14b
orb %r14b, %r13b
jmp 0x2162f
movl $0x1, %r14d
xorl %r13d, %r13d
movq 0x8(%rsp), %rbx
testb $0x3, %r14b
jne 0x2164b
addq 0x28(%rsp), %r12
decq %r15
jne 0x2157c
xorl %r13d, %r13d
andb $0x1, %r13b
movl %r13d, %eax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN5nglog5tools22GetSectionHeaderByNameEiPKcmP10Elf64_Shdr:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0F8h
mov rbx, rcx
mov [rsp+128h+var_108], rdx
mov [rsp+128h+var_118], rsi
mov ebp, edi
xor r13d, r13d
lea rsi, [rsp+128h+var_F8]; int
mov edx, offset dword_40; void *
xor ecx, ecx; unsigned __int64
call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong)
cmp rax, 40h ; '@'
jnz loc_2164B
mov r12, [rsp+128h+var_D0]
movzx eax, [rsp+128h+var_BE]
movzx ecx, [rsp+128h+var_BA]
mov [rsp+128h+var_100], rax
imul rcx, rax
add rcx, r12; unsigned __int64
lea rsi, [rsp+128h+var_70]; int
mov edx, offset dword_40; void *
mov edi, ebp; this
call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong)
cmp rax, 40h ; '@'
jnz loc_21648
movzx r15d, [rsp+128h+var_BC]
test r15, r15
jz loc_21648
mov rax, [rsp+128h+var_58]
mov [rsp+128h+var_110], rax
mov [rsp+128h+var_120], rbx
loc_2157C:
mov edx, offset dword_40; void *
mov edi, ebp; this
mov rsi, rbx; int
mov rcx, r12; unsigned __int64
call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong)
cmp rax, 40h ; '@'
jnz short loc_215D1
mov rax, [rsp+128h+var_108]
cmp rax, 41h ; 'A'
jb short loc_215DC
xor r13d, r13d
mov r14d, 1
mov edi, 1
lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
mov edx, 10Dh
lea rcx, aSectionNameSIs; "Section name '%s' is too long (%zu); se"...
mov r8, [rsp+128h+var_118]
mov r9, rax
xor eax, eax
call _ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z; nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)
jmp short loc_21634
loc_215D1:
mov r14d, 1
xor r13d, r13d
jmp short loc_21634
loc_215DC:
mov ecx, [rbx]
add rcx, [rsp+128h+var_110]; unsigned __int64
mov edi, ebp; this
lea rsi, [rsp+128h+var_B8]; int
mov rdx, rax; void *
mov rbx, rax
call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
jz short loc_21626
mov r14d, 4
cmp rax, rbx
jnz short loc_2162F
lea rdi, [rsp+128h+var_B8]
mov rsi, [rsp+128h+var_118]
mov rdx, rbx
call _bcmp
xor r14d, r14d
test eax, eax
setz r14b
or r13b, r14b
jmp short loc_2162F
loc_21626:
mov r14d, 1
xor r13d, r13d
loc_2162F:
mov rbx, [rsp+128h+var_120]
loc_21634:
test r14b, 3
jnz short loc_2164B
add r12, [rsp+128h+var_100]
dec r15
jnz loc_2157C
loc_21648:
xor r13d, r13d
loc_2164B:
and r13b, 1
mov eax, r13d
add rsp, 0F8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long nglog::tools::GetSectionHeaderByName(
nglog::tools *this,
long long a2,
void *a3,
unsigned int *a4,
unsigned long long a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
unsigned int v14; // r13d
unsigned long long v15; // r8
unsigned long long v16; // r12
unsigned long long v17; // r8
long long v18; // r15
__m128 v19; // xmm4
__m128 v20; // xmm5
char v21; // r14
long long v22; // rax
char v24; // [rsp+0h] [rbp-128h]
unsigned int *v25; // [rsp+8h] [rbp-120h]
long long v26; // [rsp+18h] [rbp-110h]
long long v28; // [rsp+28h] [rbp-100h]
int v29; // [rsp+30h] [rbp-F8h] BYREF
unsigned long long v30; // [rsp+58h] [rbp-D0h]
unsigned __int16 v31; // [rsp+6Ah] [rbp-BEh]
unsigned __int16 v32; // [rsp+6Ch] [rbp-BCh]
unsigned __int16 v33; // [rsp+6Eh] [rbp-BAh]
int v34[18]; // [rsp+70h] [rbp-B8h] BYREF
int v35; // [rsp+B8h] [rbp-70h] BYREF
long long v36; // [rsp+D0h] [rbp-58h]
v14 = 0;
if ( nglog::tools::ReadFromOffset(this, (int)&v29, &dword_40, 0LL, a5) == 64 )
{
v16 = v30;
v28 = v31;
if ( nglog::tools::ReadFromOffset(
(nglog::tools *)(unsigned int)this,
(int)&v35,
&dword_40,
v30 + v31 * (unsigned long long)v33,
v15) == 64
&& (v18 = v32) != 0 )
{
v26 = v36;
v25 = a4;
while ( 1 )
{
if ( nglog::tools::ReadFromOffset((nglog::tools *)(unsigned int)this, (int)a4, &dword_40, v16, v17) == 64 )
{
if ( (unsigned long long)a3 < 0x41 )
{
v22 = nglog::tools::ReadFromOffset((nglog::tools *)(unsigned int)this, (int)v34, a3, v26 + *a4, v17);
if ( v22 == -1 )
{
v21 = 1;
v14 = 0;
}
else
{
v21 = 4;
if ( (void *)v22 == a3 )
{
v21 = (unsigned int)bcmp(v34, a2) == 0;
LOBYTE(v14) = v21 | v14;
}
}
a4 = v25;
}
else
{
v14 = 0;
v21 = 1;
nglog::RawLog(
(nglog *)((char *)&dword_0 + 1),
(nglog::tools *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/symbolize.cc",
269,
(long long)"Section name '%s' is too long (%zu); section will not be found (even if present).",
a2,
(long long)a3,
a6,
a7,
a8,
a9,
v19,
v20,
a12,
a13,
v24);
}
}
else
{
v21 = 1;
v14 = 0;
}
if ( (v21 & 3) != 0 )
break;
v16 += v28;
if ( !--v18 )
goto LABEL_16;
}
}
else
{
LABEL_16:
v14 = 0;
}
}
LOBYTE(v14) = v14 & 1;
return v14;
}
| GetSectionHeaderByName:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xf8
MOV RBX,RCX
MOV qword ptr [RSP + 0x20],RDX
MOV qword ptr [RSP + 0x10],RSI
MOV EBP,EDI
XOR R13D,R13D
LEA RSI,[RSP + 0x30]
MOV EDX,0x40
XOR ECX,ECX
CALL 0x00121664
CMP RAX,0x40
JNZ 0x0012164b
MOV R12,qword ptr [RSP + 0x58]
MOVZX EAX,word ptr [RSP + 0x6a]
MOVZX ECX,word ptr [RSP + 0x6e]
MOV qword ptr [RSP + 0x28],RAX
IMUL RCX,RAX
ADD RCX,R12
LEA RSI,[RSP + 0xb8]
MOV EDX,0x40
MOV EDI,EBP
CALL 0x00121664
CMP RAX,0x40
JNZ 0x00121648
MOVZX R15D,word ptr [RSP + 0x6c]
TEST R15,R15
JZ 0x00121648
MOV RAX,qword ptr [RSP + 0xd0]
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x8],RBX
LAB_0012157c:
MOV EDX,0x40
MOV EDI,EBP
MOV RSI,RBX
MOV RCX,R12
CALL 0x00121664
CMP RAX,0x40
JNZ 0x001215d1
MOV RAX,qword ptr [RSP + 0x20]
CMP RAX,0x41
JC 0x001215dc
XOR R13D,R13D
MOV R14D,0x1
MOV EDI,0x1
LEA RSI,[0x125067]
MOV EDX,0x10d
LEA RCX,[0x1250b0]
MOV R8,qword ptr [RSP + 0x10]
MOV R9,RAX
XOR EAX,EAX
CALL 0x0012046c
JMP 0x00121634
LAB_001215d1:
MOV R14D,0x1
XOR R13D,R13D
JMP 0x00121634
LAB_001215dc:
MOV ECX,dword ptr [RBX]
ADD RCX,qword ptr [RSP + 0x18]
MOV EDI,EBP
LEA RSI,[RSP + 0x70]
MOV RDX,RAX
MOV RBX,RAX
CALL 0x00121664
CMP RAX,-0x1
JZ 0x00121626
MOV R14D,0x4
CMP RAX,RBX
JNZ 0x0012162f
LEA RDI,[RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,RBX
CALL 0x00107540
XOR R14D,R14D
TEST EAX,EAX
SETZ R14B
OR R13B,R14B
JMP 0x0012162f
LAB_00121626:
MOV R14D,0x1
XOR R13D,R13D
LAB_0012162f:
MOV RBX,qword ptr [RSP + 0x8]
LAB_00121634:
TEST R14B,0x3
JNZ 0x0012164b
ADD R12,qword ptr [RSP + 0x28]
DEC R15
JNZ 0x0012157c
LAB_00121648:
XOR R13D,R13D
LAB_0012164b:
AND R13B,0x1
MOV EAX,R13D
ADD RSP,0xf8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nglog::tools::GetSectionHeaderByName(int, char const*, unsigned long, Elf64_Shdr*) */
byte nglog::tools::GetSectionHeaderByName
(int param_1,char *param_2,ulong param_3,Elf64_Shdr *param_4)
{
int iVar1;
long lVar2;
ulong uVar3;
ulong uVar4;
byte bVar5;
ulong uVar6;
bool bVar7;
int1 local_f8 [40];
ulong local_d0;
ushort local_be;
ushort local_bc;
ushort local_ba;
int1 local_b8 [72];
int1 local_70 [24];
long local_58;
bVar5 = 0;
lVar2 = ReadFromOffset(param_1,local_f8,0x40,0);
if (lVar2 == 0x40) {
lVar2 = ReadFromOffset(param_1,local_70,0x40,(ulong)local_ba * (ulong)local_be + local_d0);
if (lVar2 == 0x40) {
uVar4 = local_d0;
for (uVar6 = (ulong)local_bc; uVar6 != 0; uVar6 = uVar6 - 1) {
lVar2 = ReadFromOffset(param_1,param_4,0x40,uVar4);
if (lVar2 == 0x40) {
if (param_3 < 0x41) {
uVar3 = ReadFromOffset(param_1,local_b8,param_3,(ulong)param_4->sh_name + local_58);
if (uVar3 == 0xffffffffffffffff) {
bVar7 = true;
bVar5 = 0;
}
else {
bVar7 = false;
if (uVar3 == param_3) {
iVar1 = bcmp(local_b8,param_2,param_3);
bVar7 = iVar1 == 0;
bVar5 = bVar5 | bVar7;
}
}
}
else {
bVar5 = 0;
bVar7 = true;
RawLog(1,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/symbolize.cc",
0x10d,
"Section name \'%s\' is too long (%zu); section will not be found (even if present)."
,param_2,param_3);
}
}
else {
bVar7 = true;
bVar5 = 0;
}
if (bVar7) {
return bVar5;
}
uVar4 = uVar4 + local_be;
}
}
}
return 0;
}
| |
23,124 | nglog::tools::GetSectionHeaderByName(int, char const*, unsigned long, Elf64_Shdr*) | ng-log[P]ng-log/src/symbolize.cc | bool GetSectionHeaderByName(int fd, const char* name, size_t name_len,
ElfW(Shdr) * out) {
ElfW(Ehdr) elf_header;
if (!ReadFromOffsetExact(fd, &elf_header, sizeof(elf_header), 0)) {
return false;
}
ElfW(Shdr) shstrtab;
size_t shstrtab_offset =
(elf_header.e_shoff + static_cast<size_t>(elf_header.e_shentsize) *
static_cast<size_t>(elf_header.e_shstrndx));
if (!ReadFromOffsetExact(fd, &shstrtab, sizeof(shstrtab), shstrtab_offset)) {
return false;
}
for (size_t i = 0; i < elf_header.e_shnum; ++i) {
size_t section_header_offset =
(elf_header.e_shoff + elf_header.e_shentsize * i);
if (!ReadFromOffsetExact(fd, out, sizeof(*out), section_header_offset)) {
return false;
}
char header_name[kMaxSectionNameLen];
if (sizeof(header_name) < name_len) {
RAW_LOG(WARNING,
"Section name '%s' is too long (%zu); "
"section will not be found (even if present).",
name, name_len);
// No point in even trying.
return false;
}
size_t name_offset = shstrtab.sh_offset + out->sh_name;
ssize_t n_read = ReadFromOffset(fd, &header_name, name_len, name_offset);
if (n_read == -1) {
return false;
} else if (static_cast<size_t>(n_read) != name_len) {
// Short read -- name could be at end of file.
continue;
}
if (memcmp(header_name, name, name_len) == 0) {
return true;
}
}
return false;
} | O2 | cpp | nglog::tools::GetSectionHeaderByName(int, char const*, unsigned long, Elf64_Shdr*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rcx, %r15
movq %rdx, %rbx
movq %rsi, (%rsp)
movl %edi, %ebp
xorl %r12d, %r12d
leaq 0x20(%rsp), %rsi
pushq $0x40
popq %rdx
xorl %ecx, %ecx
callq 0x1de06
testb %al, %al
je 0x1ddf1
movq 0x48(%rsp), %r12
movzwl 0x5a(%rsp), %eax
movzwl 0x5e(%rsp), %ecx
movq %rax, 0x18(%rsp)
imulq %rax, %rcx
addq %r12, %rcx
leaq 0xa8(%rsp), %rsi
pushq $0x40
popq %rdx
movl %ebp, %edi
callq 0x1de06
testb %al, %al
je 0x1ddb4
movzwl 0x5c(%rsp), %eax
movq %rax, 0x8(%rsp)
movq 0xc0(%rsp), %rax
movq %rax, 0x10(%rsp)
xorl %r13d, %r13d
cmpq %r13, 0x8(%rsp)
je 0x1ddb9
movl %ebp, %edi
movq %r15, %rsi
pushq $0x40
popq %rdx
movq %r12, %rcx
callq 0x1de06
testb %al, %al
je 0x1ddb9
cmpq $0x41, %rbx
jae 0x1ddbe
movl (%r15), %ecx
addq 0x10(%rsp), %rcx
movl %ebp, %edi
leaq 0x60(%rsp), %rsi
movq %rbx, %rdx
callq 0x1de17
cmpq $-0x1, %rax
setne %r14b
je 0x1dde5
cmpq %rbx, %rax
jne 0x1ddaa
leaq 0x60(%rsp), %rdi
movq (%rsp), %rsi
movq %rbx, %rdx
callq 0x85c0
testl %eax, %eax
je 0x1dde5
incq %r13
addq 0x18(%rsp), %r12
jmp 0x1dd4e
xorl %r12d, %r12d
jmp 0x1ddf1
xorl %r14d, %r14d
jmp 0x1dde5
leaq 0x42a2(%rip), %rsi # 0x22067
leaq 0x42e4(%rip), %rcx # 0x220b0
xorl %r14d, %r14d
pushq $0x1
popq %rdi
movl $0x10d, %edx # imm = 0x10D
movq (%rsp), %r8
movq %rbx, %r9
xorl %eax, %eax
callq 0x1d004
cmpq 0x8(%rsp), %r13
setb %r12b
andb %r14b, %r12b
movl %r12d, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN5nglog5tools22GetSectionHeaderByNameEiPKcmP10Elf64_Shdr:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0E8h
mov r15, rcx
mov rbx, rdx
mov [rsp+118h+var_118], rsi
mov ebp, edi
xor r12d, r12d
lea rsi, [rsp+118h+var_F8]; int
push 40h ; '@'
pop rdx; void *
xor ecx, ecx; unsigned __int64
call _ZN5nglog5toolsL19ReadFromOffsetExactEiPvmm; nglog::tools::ReadFromOffsetExact(int,void *,ulong,ulong)
test al, al
jz loc_1DDF1
mov r12, [rsp+118h+var_D0]
movzx eax, [rsp+118h+var_BE]
movzx ecx, [rsp+118h+var_BA]
mov [rsp+118h+var_100], rax
imul rcx, rax
add rcx, r12; unsigned __int64
lea rsi, [rsp+118h+var_70]; int
push 40h ; '@'
pop rdx; void *
mov edi, ebp; this
call _ZN5nglog5toolsL19ReadFromOffsetExactEiPvmm; nglog::tools::ReadFromOffsetExact(int,void *,ulong,ulong)
test al, al
jz loc_1DDB4
movzx eax, [rsp+118h+var_BC]
mov [rsp+118h+var_110], rax
mov rax, [rsp+118h+var_58]
mov [rsp+118h+var_108], rax
xor r13d, r13d
loc_1DD4E:
cmp [rsp+118h+var_110], r13
jz short loc_1DDB9
mov edi, ebp; this
mov rsi, r15; int
push 40h ; '@'
pop rdx; void *
mov rcx, r12; unsigned __int64
call _ZN5nglog5toolsL19ReadFromOffsetExactEiPvmm; nglog::tools::ReadFromOffsetExact(int,void *,ulong,ulong)
test al, al
jz short loc_1DDB9
cmp rbx, 41h ; 'A'
jnb short loc_1DDBE
mov ecx, [r15]
add rcx, [rsp+118h+var_108]; unsigned __int64
mov edi, ebp; this
lea rsi, [rsp+118h+var_B8]; int
mov rdx, rbx; void *
call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
setnz r14b
jz short loc_1DDE5
cmp rax, rbx
jnz short loc_1DDAA
lea rdi, [rsp+118h+var_B8]
mov rsi, [rsp+118h+var_118]
mov rdx, rbx
call _bcmp
test eax, eax
jz short loc_1DDE5
loc_1DDAA:
inc r13
add r12, [rsp+118h+var_100]
jmp short loc_1DD4E
loc_1DDB4:
xor r12d, r12d
jmp short loc_1DDF1
loc_1DDB9:
xor r14d, r14d
jmp short loc_1DDE5
loc_1DDBE:
lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aSectionNameSIs; "Section name '%s' is too long (%zu); se"...
xor r14d, r14d
push 1
pop rdi
mov edx, 10Dh
mov r8, [rsp+118h+var_118]
mov r9, rbx
xor eax, eax
call _ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z; nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)
loc_1DDE5:
cmp r13, [rsp+118h+var_110]
setb r12b
and r12b, r14b
loc_1DDF1:
mov eax, r12d
add rsp, 0E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long nglog::tools::GetSectionHeaderByName(
nglog::tools *this,
const char *a2,
void *a3,
unsigned int *a4,
unsigned long long a5)
{
unsigned long long v7; // r12
unsigned long long v8; // r8
unsigned long long v9; // r8
unsigned long long i; // r13
unsigned long long v11; // r8
long long v12; // rax
bool v13; // r14
unsigned long long v15; // [rsp+8h] [rbp-110h]
long long v16; // [rsp+10h] [rbp-108h]
long long v17; // [rsp+18h] [rbp-100h]
int v18; // [rsp+20h] [rbp-F8h] BYREF
unsigned long long v19; // [rsp+48h] [rbp-D0h]
unsigned __int16 v20; // [rsp+5Ah] [rbp-BEh]
unsigned __int16 v21; // [rsp+5Ch] [rbp-BCh]
unsigned __int16 v22; // [rsp+5Eh] [rbp-BAh]
int v23[18]; // [rsp+60h] [rbp-B8h] BYREF
int v24; // [rsp+A8h] [rbp-70h] BYREF
long long v25; // [rsp+C0h] [rbp-58h]
LODWORD(v7) = 0;
if ( (unsigned __int8)nglog::tools::ReadFromOffsetExact(this, (int)&v18, &dword_40, 0LL, a5) )
{
v7 = v19;
v17 = v20;
if ( (unsigned __int8)nglog::tools::ReadFromOffsetExact(
(nglog::tools *)(unsigned int)this,
(int)&v24,
&dword_40,
v19 + v20 * (unsigned long long)v22,
v8) )
{
v15 = v21;
v16 = v25;
for ( i = 0LL; ; ++i )
{
if ( v15 == i
|| !(unsigned __int8)nglog::tools::ReadFromOffsetExact(
(nglog::tools *)(unsigned int)this,
(int)a4,
&dword_40,
v7,
v9) )
{
v13 = 0;
goto LABEL_14;
}
if ( (unsigned long long)a3 >= 0x41 )
break;
v12 = nglog::tools::ReadFromOffset((nglog::tools *)(unsigned int)this, (int)v23, a3, v16 + *a4, v11);
v13 = v12 != -1;
if ( v12 == -1 || (void *)v12 == a3 && !(unsigned int)bcmp(v23, a2, a3) )
goto LABEL_14;
v7 += v17;
}
v13 = 0;
nglog::RawLog(
(nglog *)((char *)&dword_0 + 1),
(nglog::tools *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/symbolize.cc",
269,
"Section name '%s' is too long (%zu); section will not be found (even if present).",
a2,
(size_t)a3);
LABEL_14:
LOBYTE(v7) = v13 && i < v15;
}
else
{
LODWORD(v7) = 0;
}
}
return (unsigned int)v7;
}
| GetSectionHeaderByName:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xe8
MOV R15,RCX
MOV RBX,RDX
MOV qword ptr [RSP],RSI
MOV EBP,EDI
XOR R12D,R12D
LEA RSI,[RSP + 0x20]
PUSH 0x40
POP RDX
XOR ECX,ECX
CALL 0x0011de06
TEST AL,AL
JZ 0x0011ddf1
MOV R12,qword ptr [RSP + 0x48]
MOVZX EAX,word ptr [RSP + 0x5a]
MOVZX ECX,word ptr [RSP + 0x5e]
MOV qword ptr [RSP + 0x18],RAX
IMUL RCX,RAX
ADD RCX,R12
LEA RSI,[RSP + 0xa8]
PUSH 0x40
POP RDX
MOV EDI,EBP
CALL 0x0011de06
TEST AL,AL
JZ 0x0011ddb4
MOVZX EAX,word ptr [RSP + 0x5c]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0xc0]
MOV qword ptr [RSP + 0x10],RAX
XOR R13D,R13D
LAB_0011dd4e:
CMP qword ptr [RSP + 0x8],R13
JZ 0x0011ddb9
MOV EDI,EBP
MOV RSI,R15
PUSH 0x40
POP RDX
MOV RCX,R12
CALL 0x0011de06
TEST AL,AL
JZ 0x0011ddb9
CMP RBX,0x41
JNC 0x0011ddbe
MOV ECX,dword ptr [R15]
ADD RCX,qword ptr [RSP + 0x10]
MOV EDI,EBP
LEA RSI,[RSP + 0x60]
MOV RDX,RBX
CALL 0x0011de17
CMP RAX,-0x1
SETNZ R14B
JZ 0x0011dde5
CMP RAX,RBX
JNZ 0x0011ddaa
LEA RDI,[RSP + 0x60]
MOV RSI,qword ptr [RSP]
MOV RDX,RBX
CALL 0x001085c0
TEST EAX,EAX
JZ 0x0011dde5
LAB_0011ddaa:
INC R13
ADD R12,qword ptr [RSP + 0x18]
JMP 0x0011dd4e
LAB_0011ddb4:
XOR R12D,R12D
JMP 0x0011ddf1
LAB_0011ddb9:
XOR R14D,R14D
JMP 0x0011dde5
LAB_0011ddbe:
LEA RSI,[0x122067]
LEA RCX,[0x1220b0]
XOR R14D,R14D
PUSH 0x1
POP RDI
MOV EDX,0x10d
MOV R8,qword ptr [RSP]
MOV R9,RBX
XOR EAX,EAX
CALL 0x0011d004
LAB_0011dde5:
CMP R13,qword ptr [RSP + 0x8]
SETC R12B
AND R12B,R14B
LAB_0011ddf1:
MOV EAX,R12D
ADD RSP,0xe8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nglog::tools::GetSectionHeaderByName(int, char const*, unsigned long, Elf64_Shdr*) */
ulong nglog::tools::GetSectionHeaderByName
(int param_1,char *param_2,ulong param_3,Elf64_Shdr *param_4)
{
char cVar1;
int iVar2;
ulong uVar3;
ulong uVar4;
ulong uVar5;
bool bVar6;
int1 local_f8 [40];
ulong local_d0;
ushort local_be;
ushort local_bc;
ushort local_ba;
int1 local_b8 [72];
int1 local_70 [24];
long local_58;
uVar4 = 0;
cVar1 = ReadFromOffsetExact(param_1,local_f8,0x40,0);
if (cVar1 != '\0') {
cVar1 = ReadFromOffsetExact(param_1,local_70,0x40,(ulong)local_ba * (ulong)local_be + local_d0);
if (cVar1 == '\0') {
uVar4 = 0;
}
else {
uVar4 = local_d0;
for (uVar5 = 0; local_bc != uVar5; uVar5 = uVar5 + 1) {
cVar1 = ReadFromOffsetExact(param_1,param_4,0x40,uVar4);
if (cVar1 == '\0') break;
if (0x40 < param_3) {
bVar6 = false;
RawLog(1,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/symbolize.cc",0x10d,
"Section name \'%s\' is too long (%zu); section will not be found (even if present)."
,param_2,param_3);
goto LAB_0011dde5;
}
uVar3 = ReadFromOffset(param_1,local_b8,param_3,(ulong)param_4->sh_name + local_58);
bVar6 = uVar3 != 0xffffffffffffffff;
if (uVar3 == 0xffffffffffffffff) goto LAB_0011dde5;
if (uVar3 == param_3) {
iVar2 = bcmp(local_b8,param_2,param_3);
if (iVar2 == 0) goto LAB_0011dde5;
}
uVar4 = uVar4 + local_be;
}
bVar6 = false;
LAB_0011dde5:
uVar4 = CONCAT71((int7)(uVar4 >> 8),uVar5 < local_bc & bVar6);
}
}
return uVar4 & 0xffffffff;
}
| |
23,125 | nglog::tools::GetSectionHeaderByName(int, char const*, unsigned long, Elf64_Shdr*) | ng-log[P]ng-log/src/symbolize.cc | bool GetSectionHeaderByName(int fd, const char* name, size_t name_len,
ElfW(Shdr) * out) {
ElfW(Ehdr) elf_header;
if (!ReadFromOffsetExact(fd, &elf_header, sizeof(elf_header), 0)) {
return false;
}
ElfW(Shdr) shstrtab;
size_t shstrtab_offset =
(elf_header.e_shoff + static_cast<size_t>(elf_header.e_shentsize) *
static_cast<size_t>(elf_header.e_shstrndx));
if (!ReadFromOffsetExact(fd, &shstrtab, sizeof(shstrtab), shstrtab_offset)) {
return false;
}
for (size_t i = 0; i < elf_header.e_shnum; ++i) {
size_t section_header_offset =
(elf_header.e_shoff + elf_header.e_shentsize * i);
if (!ReadFromOffsetExact(fd, out, sizeof(*out), section_header_offset)) {
return false;
}
char header_name[kMaxSectionNameLen];
if (sizeof(header_name) < name_len) {
RAW_LOG(WARNING,
"Section name '%s' is too long (%zu); "
"section will not be found (even if present).",
name, name_len);
// No point in even trying.
return false;
}
size_t name_offset = shstrtab.sh_offset + out->sh_name;
ssize_t n_read = ReadFromOffset(fd, &header_name, name_len, name_offset);
if (n_read == -1) {
return false;
} else if (static_cast<size_t>(n_read) != name_len) {
// Short read -- name could be at end of file.
continue;
}
if (memcmp(header_name, name, name_len) == 0) {
return true;
}
}
return false;
} | O3 | cpp | nglog::tools::GetSectionHeaderByName(int, char const*, unsigned long, Elf64_Shdr*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp # imm = 0x108
movq %rcx, %r12
movq %rdx, 0x38(%rsp)
movq %rsi, %r14
movl %edi, %ebp
xorl %ebx, %ebx
leaq 0x40(%rsp), %rsi
movl $0x40, %edx
xorl %ecx, %ecx
callq 0x21365
cmpq $0x40, %rax
jne 0x2134e
movq 0x68(%rsp), %r13
movzwl 0x7a(%rsp), %eax
movzwl 0x7e(%rsp), %ecx
movq %rax, 0x30(%rsp)
imulq %rax, %rcx
addq %r13, %rcx
leaq 0xc8(%rsp), %rsi
movl $0x40, %edx
movl %ebp, %edi
callq 0x21365
cmpq $0x40, %rax
jne 0x21310
movzwl 0x7c(%rsp), %ecx
testq %rcx, %rcx
je 0x21314
movq %r14, 0x10(%rsp)
movq 0xe0(%rsp), %rax
movq %rax, 0x28(%rsp)
movq %rcx, %rax
negq %rax
movq %rax, 0x18(%rsp)
movb $0x1, %al
movq %rax, 0x8(%rsp)
movl $0x1, %r14d
movq %rcx, 0x20(%rsp)
movl $0x40, %edx
movl %ebp, %edi
movq %r12, %rsi
movq %r13, %rcx
callq 0x21365
cmpq $0x40, %rax
jne 0x2130b
movq 0x38(%rsp), %r9
cmpq $0x41, %r9
jae 0x21318
movq %r12, %rbx
movl (%r12), %ecx
addq 0x28(%rsp), %rcx
movl %ebp, %r15d
movl %ebp, %edi
leaq 0x80(%rsp), %rsi
movq %r9, %rdx
movq %r9, %rbp
callq 0x21365
cmpq $-0x1, %rax
setne %r12b
je 0x21346
cmpq %rbp, %rax
jne 0x212d8
leaq 0x80(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rbp, %rdx
callq 0x7540
testl %eax, %eax
je 0x21346
movq 0x20(%rsp), %rcx
cmpq %rcx, %r14
setb %al
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rax
addq %r14, %rax
incq %rax
incq %r14
addq 0x30(%rsp), %r13
cmpq $0x1, %rax
movq %rbx, %r12
movl %r15d, %ebp
jne 0x2125d
xorl %r12d, %r12d
jmp 0x21346
xorl %ebx, %ebx
jmp 0x2134e
xorl %ebx, %ebx
jmp 0x2134b
leaq 0x3d22(%rip), %rsi # 0x25041
leaq 0x3d64(%rip), %rcx # 0x2508a
xorl %r12d, %r12d
movl $0x1, %edi
movl $0x10d, %edx # imm = 0x10D
movq 0x10(%rsp), %r8
xorl %eax, %eax
callq 0x20194
movb $0x1, %al
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rbx
andb %r12b, %bl
andb $0x1, %bl
movl %ebx, %eax
addq $0x108, %rsp # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN5nglog5tools22GetSectionHeaderByNameEiPKcmP10Elf64_Shdr:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 108h
mov r12, rcx
mov [rsp+138h+var_100], rdx
mov r14, rsi
mov ebp, edi
xor ebx, ebx
lea rsi, [rsp+138h+var_F8]; int
mov edx, offset dword_40; void *
xor ecx, ecx; unsigned __int64
call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong)
cmp rax, 40h ; '@'
jnz loc_2134E
mov r13, [rsp+138h+var_D0]
movzx eax, [rsp+138h+var_BE]
movzx ecx, [rsp+138h+var_BA]
mov [rsp+138h+var_108], rax
imul rcx, rax
add rcx, r13; unsigned __int64
lea rsi, [rsp+138h+var_70]; int
mov edx, offset dword_40; void *
mov edi, ebp; this
call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong)
cmp rax, 40h ; '@'
jnz loc_21310
movzx ecx, [rsp+138h+var_BC]
test rcx, rcx
jz loc_21314
mov [rsp+138h+var_128], r14
mov rax, [rsp+138h+var_58]
mov [rsp+138h+var_110], rax
mov rax, rcx
neg rax
mov [rsp+138h+var_120], rax
mov al, 1
mov [rsp+138h+var_130], rax
mov r14d, 1
mov [rsp+138h+var_118], rcx
loc_2125D:
mov edx, offset dword_40; void *
mov edi, ebp; this
mov rsi, r12; int
mov rcx, r13; unsigned __int64
call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong)
cmp rax, 40h ; '@'
jnz loc_2130B
mov r9, [rsp+138h+var_100]
cmp r9, 41h ; 'A'
jnb loc_21318
mov rbx, r12
mov ecx, [r12]
add rcx, [rsp+138h+var_110]; unsigned __int64
mov r15d, ebp
mov edi, ebp; this
lea rsi, [rsp+138h+var_B8]; int
mov rdx, r9; void *
mov rbp, r9
call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
setnz r12b
jz loc_21346
cmp rax, rbp
jnz short loc_212D8
lea rdi, [rsp+138h+var_B8]
mov rsi, [rsp+138h+var_128]
mov rdx, rbp
call _bcmp
test eax, eax
jz short loc_21346
loc_212D8:
mov rcx, [rsp+138h+var_118]
cmp r14, rcx
setb al
mov [rsp+138h+var_130], rax
mov rax, [rsp+138h+var_120]
add rax, r14
inc rax
inc r14
add r13, [rsp+138h+var_108]
cmp rax, 1
mov r12, rbx
mov ebp, r15d
jnz loc_2125D
loc_2130B:
xor r12d, r12d
jmp short loc_21346
loc_21310:
xor ebx, ebx
jmp short loc_2134E
loc_21314:
xor ebx, ebx
jmp short loc_2134B
loc_21318:
lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aSectionNameSIs; "Section name '%s' is too long (%zu); se"...
xor r12d, r12d
mov edi, 1
mov edx, 10Dh
mov r8, [rsp+138h+var_128]
xor eax, eax
call _ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z; nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)
mov al, 1
mov [rsp+138h+var_130], rax
loc_21346:
mov rbx, [rsp+138h+var_130]
loc_2134B:
and bl, r12b
loc_2134E:
and bl, 1
mov eax, ebx
add rsp, 108h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long nglog::tools::GetSectionHeaderByName(
nglog::tools *this,
long long a2,
void *a3,
unsigned int *a4,
unsigned long long a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
unsigned int v14; // ebx
unsigned long long v15; // r8
unsigned long long v16; // r13
unsigned long long v17; // r8
long long v18; // rax
unsigned long long v19; // r14
unsigned long long v20; // r8
__m128 v21; // xmm4
__m128 v22; // xmm5
unsigned int *v23; // rbx
long long v24; // rax
long long v25; // rax
unsigned int v26; // eax
char v28; // [rsp+0h] [rbp-138h]
unsigned int v29; // [rsp+8h] [rbp-130h]
long long v30; // [rsp+18h] [rbp-120h]
unsigned long long v31; // [rsp+20h] [rbp-118h]
long long v32; // [rsp+28h] [rbp-110h]
long long v33; // [rsp+30h] [rbp-108h]
int v35; // [rsp+40h] [rbp-F8h] BYREF
unsigned long long v36; // [rsp+68h] [rbp-D0h]
unsigned __int16 v37; // [rsp+7Ah] [rbp-BEh]
unsigned __int16 v38; // [rsp+7Ch] [rbp-BCh]
unsigned __int16 v39; // [rsp+7Eh] [rbp-BAh]
int v40[18]; // [rsp+80h] [rbp-B8h] BYREF
int v41; // [rsp+C8h] [rbp-70h] BYREF
long long v42; // [rsp+E0h] [rbp-58h]
v14 = 0;
if ( nglog::tools::ReadFromOffset(this, (int)&v35, &dword_40, 0LL, a5) == 64 )
{
v16 = v36;
v33 = v37;
if ( nglog::tools::ReadFromOffset(
(nglog::tools *)(unsigned int)this,
(int)&v41,
&dword_40,
v36 + v37 * (unsigned long long)v39,
v15) == 64 )
{
if ( v38 )
{
v32 = v42;
v18 = -(long long)v38;
v30 = v18;
LOBYTE(v18) = 1;
v29 = v18;
v19 = 1LL;
v31 = v38;
while ( 1 )
{
if ( nglog::tools::ReadFromOffset((nglog::tools *)(unsigned int)this, (int)a4, &dword_40, v16, v17) != 64 )
{
LABEL_11:
LOBYTE(a4) = 0;
goto LABEL_15;
}
if ( (unsigned long long)a3 >= 0x41 )
break;
v23 = a4;
v24 = nglog::tools::ReadFromOffset((nglog::tools *)(unsigned int)this, (int)v40, a3, v32 + *a4, v20);
LOBYTE(a4) = v24 != -1;
if ( v24 == -1 )
goto LABEL_15;
if ( (void *)v24 == a3 )
{
LODWORD(v24) = bcmp(v40, a2, a3);
if ( !(_DWORD)v24 )
goto LABEL_15;
}
LOBYTE(v24) = v19 < v31;
v29 = v24;
v25 = v19 + v30 + 1;
++v19;
v16 += v33;
a4 = v23;
if ( v25 == 1 )
goto LABEL_11;
}
LOBYTE(a4) = 0;
nglog::RawLog(
(nglog *)((char *)&dword_0 + 1),
(nglog::tools *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/symbolize.cc",
269,
(long long)"Section name '%s' is too long (%zu); section will not be found (even if present).",
a2,
(long long)a3,
a6,
a7,
a8,
a9,
v21,
v22,
a12,
a13,
v28);
LOBYTE(v26) = 1;
v29 = v26;
LABEL_15:
v14 = v29;
}
else
{
v14 = 0;
}
LOBYTE(v14) = (unsigned __int8)a4 & v14;
}
else
{
v14 = 0;
}
}
LOBYTE(v14) = v14 & 1;
return v14;
}
| GetSectionHeaderByName:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x108
MOV R12,RCX
MOV qword ptr [RSP + 0x38],RDX
MOV R14,RSI
MOV EBP,EDI
XOR EBX,EBX
LEA RSI,[RSP + 0x40]
MOV EDX,0x40
XOR ECX,ECX
CALL 0x00121365
CMP RAX,0x40
JNZ 0x0012134e
MOV R13,qword ptr [RSP + 0x68]
MOVZX EAX,word ptr [RSP + 0x7a]
MOVZX ECX,word ptr [RSP + 0x7e]
MOV qword ptr [RSP + 0x30],RAX
IMUL RCX,RAX
ADD RCX,R13
LEA RSI,[RSP + 0xc8]
MOV EDX,0x40
MOV EDI,EBP
CALL 0x00121365
CMP RAX,0x40
JNZ 0x00121310
MOVZX ECX,word ptr [RSP + 0x7c]
TEST RCX,RCX
JZ 0x00121314
MOV qword ptr [RSP + 0x10],R14
MOV RAX,qword ptr [RSP + 0xe0]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,RCX
NEG RAX
MOV qword ptr [RSP + 0x18],RAX
MOV AL,0x1
MOV qword ptr [RSP + 0x8],RAX
MOV R14D,0x1
MOV qword ptr [RSP + 0x20],RCX
LAB_0012125d:
MOV EDX,0x40
MOV EDI,EBP
MOV RSI,R12
MOV RCX,R13
CALL 0x00121365
CMP RAX,0x40
JNZ 0x0012130b
MOV R9,qword ptr [RSP + 0x38]
CMP R9,0x41
JNC 0x00121318
MOV RBX,R12
MOV ECX,dword ptr [R12]
ADD RCX,qword ptr [RSP + 0x28]
MOV R15D,EBP
MOV EDI,EBP
LEA RSI,[RSP + 0x80]
MOV RDX,R9
MOV RBP,R9
CALL 0x00121365
CMP RAX,-0x1
SETNZ R12B
JZ 0x00121346
CMP RAX,RBP
JNZ 0x001212d8
LEA RDI,[RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,RBP
CALL 0x00107540
TEST EAX,EAX
JZ 0x00121346
LAB_001212d8:
MOV RCX,qword ptr [RSP + 0x20]
CMP R14,RCX
SETC AL
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x18]
ADD RAX,R14
INC RAX
INC R14
ADD R13,qword ptr [RSP + 0x30]
CMP RAX,0x1
MOV R12,RBX
MOV EBP,R15D
JNZ 0x0012125d
LAB_0012130b:
XOR R12D,R12D
JMP 0x00121346
LAB_00121310:
XOR EBX,EBX
JMP 0x0012134e
LAB_00121314:
XOR EBX,EBX
JMP 0x0012134b
LAB_00121318:
LEA RSI,[0x125041]
LEA RCX,[0x12508a]
XOR R12D,R12D
MOV EDI,0x1
MOV EDX,0x10d
MOV R8,qword ptr [RSP + 0x10]
XOR EAX,EAX
CALL 0x00120194
MOV AL,0x1
MOV qword ptr [RSP + 0x8],RAX
LAB_00121346:
MOV RBX,qword ptr [RSP + 0x8]
LAB_0012134b:
AND BL,R12B
LAB_0012134e:
AND BL,0x1
MOV EAX,EBX
ADD RSP,0x108
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nglog::tools::GetSectionHeaderByName(int, char const*, unsigned long, Elf64_Shdr*) */
ulong nglog::tools::GetSectionHeaderByName
(int param_1,char *param_2,ulong param_3,Elf64_Shdr *param_4)
{
uint uVar1;
long lVar2;
ulong uVar3;
int8 uVar4;
ulong uVar5;
Elf64_Shdr *pEVar6;
ulong uVar7;
ulong uVar8;
bool bVar9;
bool local_130;
int7 uStack_12f;
int1 local_f8 [40];
ulong local_d0;
ushort local_be;
ushort local_bc;
ushort local_ba;
int1 local_b8 [72];
int1 local_70 [24];
long local_58;
uVar5 = 0;
lVar2 = ReadFromOffset(param_1,local_f8,0x40,0);
if (lVar2 == 0x40) {
lVar2 = ReadFromOffset(param_1,local_70,0x40,(ulong)local_ba * (ulong)local_be + local_d0);
if (lVar2 == 0x40) {
uVar5 = (ulong)local_bc;
if (uVar5 == 0) {
local_130 = false;
uStack_12f = 0;
pEVar6 = param_4;
}
else {
uStack_12f = (int7)(-uVar5 >> 8);
local_130 = true;
uVar7 = local_d0;
uVar8 = 1;
do {
lVar2 = ReadFromOffset(param_1,param_4,0x40,uVar7);
if (lVar2 != 0x40) break;
if (0x40 < param_3) {
pEVar6 = (Elf64_Shdr *)0x0;
uVar4 = RawLog(1,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/symbolize.cc"
,0x10d,
"Section name \'%s\' is too long (%zu); section will not be found (even if present)."
,param_2);
uStack_12f = (int7)((ulong)uVar4 >> 8);
local_130 = true;
goto LAB_0012134b;
}
uVar3 = ReadFromOffset(param_1,local_b8,param_3,(ulong)param_4->sh_name + local_58);
pEVar6 = (Elf64_Shdr *)(ulong)(uVar3 != 0xffffffffffffffff);
if (uVar3 == 0xffffffffffffffff) goto LAB_0012134b;
if (uVar3 == param_3) {
uVar1 = bcmp(local_b8,param_2,param_3);
uVar3 = (ulong)uVar1;
if (uVar1 == 0) goto LAB_0012134b;
}
local_130 = uVar8 < uVar5;
uStack_12f = (int7)(uVar3 >> 8);
uVar7 = uVar7 + local_be;
bVar9 = uVar8 != uVar5;
uVar8 = uVar8 + 1;
} while (bVar9);
pEVar6 = (Elf64_Shdr *)0x0;
}
LAB_0012134b:
uVar5 = CONCAT71(uStack_12f,local_130 & (byte)pEVar6);
}
else {
uVar5 = 0;
}
}
return uVar5 & 0xffffff01;
}
| |
23,126 | my_dirend | eloqsql/mysys/my_lib.c | void my_dirend(MY_DIR *dir)
{
MY_DIR_HANDLE *dirh= (MY_DIR_HANDLE*) dir;
DBUG_ENTER("my_dirend");
if (dirh)
{
delete_dynamic(&dirh->array);
free_root(&dirh->root, MYF(0));
my_free(dirh);
}
DBUG_VOID_RETURN;
} | O0 | c | my_dirend:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xf2f92
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
callq 0xdae00
movq -0x10(%rbp), %rdi
addq $0x38, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xeda10
movq -0x10(%rbp), %rdi
callq 0xf3be0
jmp 0xf2f94
jmp 0xf2f96
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| my_dirend:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
cmp [rbp+var_10], 0
jz short loc_F2F92
mov rdi, [rbp+var_10]
add rdi, 10h
call delete_dynamic
mov rdi, [rbp+var_10]
add rdi, 38h ; '8'
xor eax, eax
mov esi, eax
call free_root
mov rdi, [rbp+var_10]
call my_free
loc_F2F92:
jmp short $+2
loc_F2F94:
jmp short $+2
loc_F2F96:
add rsp, 10h
pop rbp
retn
| long long my_dirend(long long a1)
{
long long result; // rax
result = a1;
if ( a1 )
{
delete_dynamic(a1 + 16);
free_root(a1 + 56, 0);
return my_free(a1);
}
return result;
}
| my_dirend:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
CMP qword ptr [RBP + -0x10],0x0
JZ 0x001f2f92
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x10
CALL 0x001dae00
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x38
XOR EAX,EAX
MOV ESI,EAX
CALL 0x001eda10
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001f3be0
LAB_001f2f92:
JMP 0x001f2f94
LAB_001f2f94:
JMP 0x001f2f96
LAB_001f2f96:
ADD RSP,0x10
POP RBP
RET
|
void my_dirend(long param_1)
{
if (param_1 != 0) {
delete_dynamic(param_1 + 0x10);
free_root(param_1 + 0x38,0);
my_free(param_1);
}
return;
}
| |
23,127 | SEL_ARG::find_range(SEL_ARG*) | eloqsql/sql/opt_range.cc | SEL_ARG *
SEL_ARG::find_range(SEL_ARG *key)
{
SEL_ARG *element=this,*found=0;
for (;;)
{
if (element == &null_element)
return found;
int cmp=element->cmp_min_to_min(key);
if (cmp == 0)
return element;
if (cmp < 0)
{
found=element;
element=element->right;
}
else
element=element->left;
}
} | O0 | cpp | SEL_ARG::find_range(SEL_ARG*):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
leaq 0xba5631(%rip), %rax # 0x15f3bb8
cmpq %rax, -0x20(%rbp)
jne 0xa4e597
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xa4e5e1
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xa5cfa0
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0xa4e5b7
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xa4e5e1
cmpl $0x0, -0x2c(%rbp)
jge 0xa4e5d3
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0xa4e5df
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0xa4e580
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _ZN7SEL_ARG10find_rangeEPS_:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov [rbp+var_20], rax
mov [rbp+var_28], 0
loc_A4E580:
lea rax, null_element_0
cmp [rbp+var_20], rax
jnz short loc_A4E597
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
jmp short loc_A4E5E1
loc_A4E597:
mov rdi, [rbp+var_20]; this
mov rsi, [rbp+var_18]; SEL_ARG *
call _ZNK7SEL_ARG14cmp_min_to_minEPKS_; SEL_ARG::cmp_min_to_min(SEL_ARG const*)
mov [rbp+var_2C], eax
cmp [rbp+var_2C], 0
jnz short loc_A4E5B7
mov rax, [rbp+var_20]
mov [rbp+var_8], rax
jmp short loc_A4E5E1
loc_A4E5B7:
cmp [rbp+var_2C], 0
jge short loc_A4E5D3
mov rax, [rbp+var_20]
mov [rbp+var_28], rax
mov rax, [rbp+var_20]
mov rax, [rax+38h]
mov [rbp+var_20], rax
jmp short loc_A4E5DF
loc_A4E5D3:
mov rax, [rbp+var_20]
mov rax, [rax+30h]
mov [rbp+var_20], rax
loc_A4E5DF:
jmp short loc_A4E580
loc_A4E5E1:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| SEL_ARG * SEL_ARG::find_range(SEL_ARG *this, SEL_ARG *a2)
{
int v3; // [rsp+4h] [rbp-2Ch]
SEL_ARG *v4; // [rsp+8h] [rbp-28h]
v4 = 0LL;
while ( 1 )
{
if ( this == (SEL_ARG *)&null_element_0 )
return v4;
v3 = SEL_ARG::cmp_min_to_min(this, a2);
if ( !v3 )
break;
if ( v3 >= 0 )
{
this = (SEL_ARG *)*((_QWORD *)this + 6);
}
else
{
v4 = this;
this = (SEL_ARG *)*((_QWORD *)this + 7);
}
}
return this;
}
| ~Create_func_to_seconds:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00a4f360
ADD RSP,0x10
POP RBP
RET
|
/* Create_func_to_seconds::~Create_func_to_seconds() */
void __thiscall Create_func_to_seconds::~Create_func_to_seconds(Create_func_to_seconds *this)
{
Create_func_arg1::~Create_func_arg1((Create_func_arg1 *)this);
return;
}
| |
23,128 | ma_write_keypage | eloqsql/storage/maria/ma_page.c | my_bool _ma_write_keypage(MARIA_PAGE *page, enum pagecache_page_lock lock,
int level)
{
MARIA_SHARE *share= page->info->s;
uint block_size= share->block_size;
uchar *buff= page->buff;
my_bool res;
MARIA_PINNED_PAGE page_link;
DBUG_ENTER("_ma_write_keypage");
/*
The following ensures that for transactional tables we have logged
all changes that changes the page size (as the logging code sets
page->org_size)
*/
DBUG_ASSERT(!share->now_transactional || page->size == page->org_size);
#ifdef EXTRA_DEBUG /* Safety check */
{
uint page_length, nod_flag;
page_length= _ma_get_page_used(share, buff);
nod_flag= _ma_test_if_nod(share, buff);
DBUG_ASSERT(page->size == page_length);
DBUG_ASSERT(page->size <= share->max_index_block_size);
DBUG_ASSERT(page->flag == _ma_get_keypage_flag(share, buff));
if (page->pos < share->base.keystart ||
page->pos+block_size > share->state.state.key_file_length ||
(page->pos & (maria_block_size-1)))
{
DBUG_PRINT("error",("Trying to write inside key status region: "
"key_start: %lu length: %lu page_pos: %lu",
(long) share->base.keystart,
(long) share->state.state.key_file_length,
(long) page->pos));
my_errno=EINVAL;
DBUG_ASSERT(0);
DBUG_RETURN(1);
}
DBUG_PRINT("page",("write page at: %lu",(ulong) (page->pos / block_size)));
DBUG_DUMP("buff", buff, page_length);
DBUG_ASSERT(page_length >= share->keypage_header + nod_flag +
page->keyinfo->minlength || maria_in_recovery);
}
#endif
/* Verify that keynr is correct */
DBUG_ASSERT(_ma_get_keynr(share, buff) == page->keyinfo->key_nr);
#if defined(EXTRA_DEBUG) && defined(HAVE_valgrind) && defined(WHEN_DEBUGGING)
MEM_CHECK_DEFINED(buff, block_size);
#endif
page_cleanup(share, page);
{
PAGECACHE_BLOCK_LINK **link;
enum pagecache_page_pin pin;
if (lock == PAGECACHE_LOCK_LEFT_WRITELOCKED)
{
pin= PAGECACHE_PIN_LEFT_PINNED;
link= &page_link.link;
}
else if (lock == PAGECACHE_LOCK_WRITE_UNLOCK)
{
pin= PAGECACHE_UNPIN;
/*
We unlock this page so link should be 0 to prevent it usage
even accidentally
*/
link= NULL;
}
else
{
pin= PAGECACHE_PIN;
link= &page_link.link;
}
res= pagecache_write(share->pagecache,
&share->kfile,
(pgcache_page_no_t) (page->pos / block_size),
level, buff, share->page_type,
lock, pin, PAGECACHE_WRITE_DELAY, link,
LSN_IMPOSSIBLE);
}
if (lock == PAGECACHE_LOCK_WRITE)
{
/* It was not locked before, we have to unlock it when we unpin pages */
page_link.unlock= PAGECACHE_LOCK_WRITE_UNLOCK;
page_link.changed= 1;
push_dynamic(&page->info->pinned_pages, (void*) &page_link);
}
DBUG_RETURN(res);
} | O3 | c | ma_write_keypage:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %edx, %ecx
movl %esi, %r14d
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x10(%rdi), %r8
movq (%rax), %r9
movl 0x7bc(%r9), %r12d
leaq -0x38(%rbp), %r11
xorl %r10d, %r10d
cmpl $0x2, %esi
je 0x6f346
cmpl $0x6, %r14d
jne 0x6f34b
movl $0x3, %r15d
xorl %r11d, %r11d
jmp 0x6f351
xorl %r15d, %r15d
jmp 0x6f351
movl $0x2, %r15d
movq 0x600(%r9), %rdi
leaq 0x750(%r9), %rsi
movq 0x18(%rbx), %rax
xorl %edx, %edx
divq %r12
movl 0x7d4(%r9), %r9d
movl 0x80(%rdi), %r12d
subq $0x8, %rsp
movq %rax, %rdx
pushq %r12
pushq %r10
pushq $0x0
pushq %r11
pushq %r10
pushq %r15
pushq %r14
callq 0x3c57a
addq $0x40, %rsp
movl %eax, %r15d
cmpl $0x4, %r14d
jne 0x6f3b9
leaq -0x38(%rbp), %rsi
movl $0x6, 0x8(%rsi)
movb $0x1, 0x10(%rsi)
movl $0x2e8, %edi # imm = 0x2E8
addq (%rbx), %rdi
callq 0x91a26
movl %r15d, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| _ma_write_keypage:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 20h
mov ecx, edx
mov r14d, esi
mov rbx, rdi
mov rax, [rdi]
mov r8, [rdi+10h]
mov r9, [rax]
mov r12d, [r9+7BCh]
lea r11, [rbp+var_38]
xor r10d, r10d
cmp esi, 2
jz short loc_6F346
cmp r14d, 6
jnz short loc_6F34B
mov r15d, 3
xor r11d, r11d
jmp short loc_6F351
loc_6F346:
xor r15d, r15d
jmp short loc_6F351
loc_6F34B:
mov r15d, 2
loc_6F351:
mov rdi, [r9+600h]
lea rsi, [r9+750h]
mov rax, [rbx+18h]
xor edx, edx
div r12
mov r9d, [r9+7D4h]
mov r12d, [rdi+80h]
sub rsp, 8
mov rdx, rax
push r12
push r10
push 0
push r11
push r10
push r15
push r14
call pagecache_write_part
add rsp, 40h
mov r15d, eax
cmp r14d, 4
jnz short loc_6F3B9
lea rsi, [rbp+var_38]
mov dword ptr [rsi+8], 6
mov byte ptr [rsi+10h], 1
mov edi, 2E8h
add rdi, [rbx]
call insert_dynamic
loc_6F3B9:
mov eax, r15d
add rsp, 20h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long ma_write_keypage(long long **a1, unsigned int a2, int a3)
{
long long v3; // r9
_QWORD *v4; // r11
unsigned int v5; // r15d
unsigned int v6; // r15d
_BYTE v8[8]; // [rsp+8h] [rbp-38h] BYREF
int v9; // [rsp+10h] [rbp-30h]
char v10; // [rsp+18h] [rbp-28h]
v4 = v8;
if ( a2 == 2 )
{
v5 = 0;
}
else if ( a2 == 6 )
{
v5 = 3;
v4 = 0LL;
}
else
{
v5 = 2;
}
v3 = **a1;
v6 = pagecache_write_part(
*(__m128i **)(v3 + 1536),
(char *)(v3 + 1872),
(unsigned long long)a1[3] / *(unsigned int *)(v3 + 1980),
a3,
(char *)a1[2],
*(_DWORD *)(v3 + 2004),
a2,
v5,
0,
v4,
0LL,
0,
*(_DWORD *)(*(_QWORD *)(v3 + 1536) + 128LL));
if ( a2 == 4 )
{
v9 = 6;
v10 = 1;
insert_dynamic(*a1 + 93, v8);
}
return v6;
}
| _ma_write_keypage:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV ECX,EDX
MOV R14D,ESI
MOV RBX,RDI
MOV RAX,qword ptr [RDI]
MOV R8,qword ptr [RDI + 0x10]
MOV R9,qword ptr [RAX]
MOV R12D,dword ptr [R9 + 0x7bc]
LEA R11,[RBP + -0x38]
XOR R10D,R10D
CMP ESI,0x2
JZ 0x0016f346
CMP R14D,0x6
JNZ 0x0016f34b
MOV R15D,0x3
XOR R11D,R11D
JMP 0x0016f351
LAB_0016f346:
XOR R15D,R15D
JMP 0x0016f351
LAB_0016f34b:
MOV R15D,0x2
LAB_0016f351:
MOV RDI,qword ptr [R9 + 0x600]
LEA RSI,[R9 + 0x750]
MOV RAX,qword ptr [RBX + 0x18]
XOR EDX,EDX
DIV R12
MOV R9D,dword ptr [R9 + 0x7d4]
MOV R12D,dword ptr [RDI + 0x80]
SUB RSP,0x8
MOV RDX,RAX
PUSH R12
PUSH R10
PUSH 0x0
PUSH R11
PUSH R10
PUSH R15
PUSH R14
CALL 0x0013c57a
ADD RSP,0x40
MOV R15D,EAX
CMP R14D,0x4
JNZ 0x0016f3b9
LEA RSI,[RBP + -0x38]
MOV dword ptr [RSI + 0x8],0x6
MOV byte ptr [RSI + 0x10],0x1
MOV EDI,0x2e8
ADD RDI,qword ptr [RBX]
CALL 0x00191a26
LAB_0016f3b9:
MOV EAX,R15D
ADD RSP,0x20
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int4 _ma_write_keypage(long *param_1,int param_2,int4 param_3)
{
long lVar1;
int4 uVar2;
int1 *puVar3;
int8 uVar4;
int1 local_40 [8];
int4 local_38;
int1 local_30;
lVar1 = *(long *)*param_1;
puVar3 = local_40;
if (param_2 == 2) {
uVar4 = 0;
}
else if (param_2 == 6) {
uVar4 = 3;
puVar3 = (int1 *)0x0;
}
else {
uVar4 = 2;
}
uVar2 = pagecache_write_part
(*(long *)(lVar1 + 0x600),lVar1 + 0x750,
(ulong)param_1[3] / (ulong)*(uint *)(lVar1 + 0x7bc),param_3,param_1[2],
*(int4 *)(lVar1 + 0x7d4),param_2,uVar4,0,puVar3,0,0,
*(int4 *)(*(long *)(lVar1 + 0x600) + 0x80));
if (param_2 == 4) {
local_38 = 6;
local_30 = 1;
insert_dynamic(*param_1 + 0x2e8);
}
return uVar2;
}
| |
23,129 | LefDefParser::lefwLayerCutSpacingLayer(char const*, int) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp | int
lefwLayerCutSpacingLayer(const char *name2,
int stack)
{ // optional
if (!lefwIsLayerCutSpacing)
return LEFW_BAD_ORDER; // has to be after
// lefwLayerCutSpacing is called
if (lefwWriteEncrypt) {
encPrint(lefwFile, (char*) "\n LAYER %s", name2);
if (stack)
encPrint(lefwFile, (char*) " STACK");
} else {
fprintf(lefwFile, "\n LAYER %s", name2);
if (stack)
fprintf(lefwFile, " STACK");
}
lefwLines++;
lefwState = LEFW_LAYER;
return LEFW_OK;
} | O0 | cpp | LefDefParser::lefwLayerCutSpacingLayer(char const*, int):
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movl %esi, 0x4(%rsp)
cmpl $0x0, 0x2562c(%rip) # 0x330f0
jne 0xdad3
movl $0x2, 0x14(%rsp)
jmp 0xdb82
cmpl $0x0, 0x25612(%rip) # 0x330ec
je 0xdb1a
leaq 0x2531d(%rip), %rax # 0x32e00
movq (%rax), %rdi
movq 0x8(%rsp), %rdx
leaq 0x1c5f4(%rip), %rsi # 0x2a0e6
movb $0x0, %al
callq 0x289b0
cmpl $0x0, 0x4(%rsp)
je 0xdb18
leaq 0x252f9(%rip), %rax # 0x32e00
movq (%rax), %rdi
leaq 0x1c5e4(%rip), %rsi # 0x2a0f5
movb $0x0, %al
callq 0x289b0
jmp 0xdb58
leaq 0x252df(%rip), %rax # 0x32e00
movq (%rax), %rdi
movq 0x8(%rsp), %rdx
leaq 0x1c5b6(%rip), %rsi # 0x2a0e6
movb $0x0, %al
callq 0x1100
cmpl $0x0, 0x4(%rsp)
je 0xdb56
leaq 0x252bb(%rip), %rax # 0x32e00
movq (%rax), %rdi
leaq 0x1c5a6(%rip), %rsi # 0x2a0f5
movb $0x0, %al
callq 0x1100
jmp 0xdb58
leaq 0x254ed(%rip), %rax # 0x3304c
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x254e1(%rip), %rax # 0x3304c
movl %ecx, (%rax)
leaq 0x254dc(%rip), %rax # 0x33050
movl $0x1c, (%rax)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopl (%rax,%rax)
| _ZN12LefDefParser24lefwLayerCutSpacingLayerEPKci:
sub rsp, 18h
mov [rsp+18h+var_10], rdi
mov [rsp+18h+var_14], esi
cmp cs:_ZN12LefDefParserL21lefwIsLayerCutSpacingE, 0; LefDefParser::lefwIsLayerCutSpacing
jnz short loc_DAD3
mov [rsp+18h+var_4], 2
jmp loc_DB82
loc_DAD3:
cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt
jz short loc_DB1A
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
mov rdx, [rsp+18h+var_10]
lea rsi, aLayerS_0; "\n LAYER %s"
mov al, 0
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
cmp [rsp+18h+var_14], 0
jz short loc_DB18
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
lea rsi, aStack; " STACK"
mov al, 0
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
loc_DB18:
jmp short loc_DB58
loc_DB1A:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
mov rdx, [rsp+18h+var_10]
lea rsi, aLayerS_0; "\n LAYER %s"
mov al, 0
call _fprintf
cmp [rsp+18h+var_14], 0
jz short loc_DB56
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
lea rsi, aStack; " STACK"
mov al, 0
call _fprintf
loc_DB56:
jmp short $+2
loc_DB58:
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
mov [rax], ecx
lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
mov dword ptr [rax], 1Ch
mov [rsp+18h+var_4], 0
loc_DB82:
mov eax, [rsp+18h+var_4]
add rsp, 18h
retn
| long long LefDefParser::lefwLayerCutSpacingLayer(
LefDefParser *this,
const char *a2,
int a3,
int a4,
int a5,
int a6)
{
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
if ( LefDefParser::lefwIsLayerCutSpacing )
{
if ( LefDefParser::lefwWriteEncrypt )
{
LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)"\n LAYER %s", (_DWORD)this, a4, a5, a6);
if ( (_DWORD)a2 )
LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)" STACK", v6, v7, v8, v9);
}
else
{
fprintf(*(_QWORD *)&LefDefParser::lefwFile, "\n LAYER %s", (const char *)this);
if ( (_DWORD)a2 )
fprintf(*(_QWORD *)&LefDefParser::lefwFile, " STACK");
}
++LefDefParser::lefwLines;
LefDefParser::lefwState = 28;
return 0;
}
else
{
return 2;
}
}
| lefwLayerCutSpacingLayer:
SUB RSP,0x18
MOV qword ptr [RSP + 0x8],RDI
MOV dword ptr [RSP + 0x4],ESI
CMP dword ptr [0x001330f0],0x0
JNZ 0x0010dad3
MOV dword ptr [RSP + 0x14],0x2
JMP 0x0010db82
LAB_0010dad3:
CMP dword ptr [0x001330ec],0x0
JZ 0x0010db1a
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x8]
LEA RSI,[0x12a0e6]
MOV AL,0x0
CALL 0x001289b0
CMP dword ptr [RSP + 0x4],0x0
JZ 0x0010db18
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x12a0f5]
MOV AL,0x0
CALL 0x001289b0
LAB_0010db18:
JMP 0x0010db58
LAB_0010db1a:
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x8]
LEA RSI,[0x12a0e6]
MOV AL,0x0
CALL 0x00101100
CMP dword ptr [RSP + 0x4],0x0
JZ 0x0010db56
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x12a0f5]
MOV AL,0x0
CALL 0x00101100
LAB_0010db56:
JMP 0x0010db58
LAB_0010db58:
LEA RAX,[0x13304c]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x13304c]
MOV dword ptr [RAX],ECX
LEA RAX,[0x133050]
MOV dword ptr [RAX],0x1c
MOV dword ptr [RSP + 0x14],0x0
LAB_0010db82:
MOV EAX,dword ptr [RSP + 0x14]
ADD RSP,0x18
RET
|
/* LefDefParser::lefwLayerCutSpacingLayer(char const*, int) */
int4 LefDefParser::lefwLayerCutSpacingLayer(char *param_1,int param_2)
{
int4 local_4;
if (lefwIsLayerCutSpacing == 0) {
local_4 = 2;
}
else {
if (lefwWriteEncrypt == 0) {
fprintf(lefwFile,"\n LAYER %s",param_1);
if (param_2 != 0) {
fprintf(lefwFile," STACK");
}
}
else {
encPrint(lefwFile,"\n LAYER %s",param_1);
if (param_2 != 0) {
encPrint(lefwFile," STACK");
}
}
lefwLines = lefwLines + 1;
lefwState = 0x1c;
local_4 = 0;
}
return local_4;
}
| |
23,130 | my_coll_parser_scan_character_list | eloqsql/strings/ctype-uca.c | static int
my_coll_parser_scan_character_list(MY_COLL_RULE_PARSER *p,
my_wc_t *pwc, size_t limit,
const char *name)
{
if (my_coll_parser_curr(p)->term != MY_COLL_LEXEM_CHAR)
return my_coll_parser_expected_error(p, MY_COLL_LEXEM_CHAR);
if (!my_coll_rule_expand(pwc, limit, my_coll_parser_curr(p)->code))
return my_coll_parser_too_long_error(p, name);
if (!my_coll_parser_scan_term(p, MY_COLL_LEXEM_CHAR))
return 0;
while (my_coll_parser_curr(p)->term == MY_COLL_LEXEM_CHAR)
{
if (!my_coll_rule_expand(pwc, limit, my_coll_parser_curr(p)->code))
return my_coll_parser_too_long_error(p, name);
my_coll_parser_scan(p);
}
return 1;
} | O3 | c | my_coll_parser_scan_character_list:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x5, (%rdi)
jne 0x76989
movq %rcx, %r14
movq %rdx, %r12
testq %rdx, %rdx
je 0x7696b
movq %rsi, %r13
movslq 0x24(%rbx), %rax
xorl %ecx, %ecx
cmpq $0x0, (%r13,%rcx,8)
je 0x769c2
incq %rcx
cmpq %rcx, %r12
jne 0x7695b
addq $0xf8, %rbx
leaq 0x2002f(%rip), %rdx # 0x969a8
xorl %r15d, %r15d
movl $0x80, %esi
movq %rbx, %rdi
movq %r14, %rcx
jmp 0x769a9
addq $0xf8, %rbx
leaq 0x20020(%rip), %rdx # 0x969b7
leaq 0x2002f(%rip), %rcx # 0x969cd
xorl %r15d, %r15d
movl $0x80, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x903ee
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, (%r13,%rcx,8)
movq %rbx, %rdi
movl $0x5, %esi
callq 0x76695
testl %eax, %eax
je 0x76a38
movl $0x1, %r15d
cmpl $0x5, (%rbx)
jne 0x769b0
leaq 0x28(%rbx), %rdx
movslq 0x24(%rbx), %rax
xorl %ecx, %ecx
cmpq $0x0, (%r13,%rcx,8)
je 0x76a02
incq %rcx
cmpq %rcx, %r12
jne 0x769ed
jmp 0x7696b
movq %rax, (%r13,%rcx,8)
movq 0x20(%rdx), %rax
movq %rax, 0x20(%rbx)
movups (%rdx), %xmm0
movups 0x10(%rdx), %xmm1
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
movq %rdx, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x76437
movq -0x30(%rbp), %rdx
cmpl $0x5, (%rbx)
je 0x769e7
jmp 0x769b0
xorl %r15d, %r15d
jmp 0x769b0
| my_coll_parser_scan_character_list:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
cmp dword ptr [rdi], 5
jnz short loc_76989
mov r14, rcx
mov r12, rdx
test rdx, rdx
jz short loc_7696B
mov r13, rsi
movsxd rax, dword ptr [rbx+24h]
xor ecx, ecx
loc_7695B:
cmp qword ptr [r13+rcx*8+0], 0
jz short loc_769C2
inc rcx
cmp r12, rcx
jnz short loc_7695B
loc_7696B:
add rbx, 0F8h
lea rdx, aSIsTooLong; "%s is too long"
xor r15d, r15d
mov esi, 80h
mov rdi, rbx
mov rcx, r14
jmp short loc_769A9
loc_76989:
add rbx, 0F8h
lea rdx, aSExpected; "%s expected"
lea rcx, aCharacter; "Character"
xor r15d, r15d
mov esi, 80h
mov rdi, rbx
loc_769A9:
xor eax, eax
call my_snprintf
loc_769B0:
mov eax, r15d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_769C2:
mov [r13+rcx*8+0], rax
mov rdi, rbx
mov esi, 5
call my_coll_parser_scan_term
test eax, eax
jz short loc_76A38
mov r15d, 1
cmp dword ptr [rbx], 5
jnz short loc_769B0
lea rdx, [rbx+28h]
loc_769E7:
movsxd rax, dword ptr [rbx+24h]
xor ecx, ecx
loc_769ED:
cmp qword ptr [r13+rcx*8+0], 0
jz short loc_76A02
inc rcx
cmp r12, rcx
jnz short loc_769ED
jmp loc_7696B
loc_76A02:
mov [r13+rcx*8+0], rax
mov rax, [rdx+20h]
mov [rbx+20h], rax
movups xmm0, xmmword ptr [rdx]
movups xmm1, xmmword ptr [rdx+10h]
movups xmmword ptr [rbx+10h], xmm1
movups xmmword ptr [rbx], xmm0
mov [rbp+var_30], rdx
mov rdi, [rbp+var_30]
call my_coll_lexem_next
mov rdx, [rbp+var_30]
cmp dword ptr [rbx], 5
jz short loc_769E7
jmp loc_769B0
loc_76A38:
xor r15d, r15d
jmp loc_769B0
| long long my_coll_parser_scan_character_list(long long a1, long long a2, long long a3, int a4, int a5, int a6)
{
long long v8; // rcx
const char *v9; // rdx
unsigned int v10; // r15d
int v11; // edi
const char *v12; // rcx
long long v14; // rdx
long long v15; // rcx
__int128 v16; // xmm0
long long v17; // [rsp+0h] [rbp-30h]
if ( *(_DWORD *)a1 != 5 )
{
v9 = "%s expected";
v12 = "Character";
v10 = 0;
v11 = a1 + 248;
goto LABEL_8;
}
if ( !a3 )
{
LABEL_6:
v9 = "%s is too long";
v10 = 0;
v11 = a1 + 248;
LODWORD(v12) = a4;
LABEL_8:
my_snprintf(v11, 128, (_DWORD)v9, (_DWORD)v12, a5, a6);
return v10;
}
v8 = 0LL;
while ( *(_QWORD *)(a2 + 8 * v8) )
{
if ( a3 == ++v8 )
goto LABEL_6;
}
*(_QWORD *)(a2 + 8 * v8) = *(int *)(a1 + 36);
if ( (unsigned int)my_coll_parser_scan_term(a1, 5) )
{
v10 = 1;
if ( *(_DWORD *)a1 == 5 )
{
v14 = a1 + 40;
do
{
v15 = 0LL;
while ( *(_QWORD *)(a2 + 8 * v15) )
{
if ( a3 == ++v15 )
goto LABEL_6;
}
*(_QWORD *)(a2 + 8 * v15) = *(int *)(a1 + 36);
*(_QWORD *)(a1 + 32) = *(_QWORD *)(v14 + 32);
v16 = *(_OWORD *)v14;
*(_OWORD *)(a1 + 16) = *(_OWORD *)(v14 + 16);
*(_OWORD *)a1 = v16;
v17 = v14;
my_coll_lexem_next(v14);
v14 = v17;
}
while ( *(_DWORD *)a1 == 5 );
}
}
else
{
return 0;
}
return v10;
}
| my_coll_parser_scan_character_list:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
CMP dword ptr [RDI],0x5
JNZ 0x00176989
MOV R14,RCX
MOV R12,RDX
TEST RDX,RDX
JZ 0x0017696b
MOV R13,RSI
MOVSXD RAX,dword ptr [RBX + 0x24]
XOR ECX,ECX
LAB_0017695b:
CMP qword ptr [R13 + RCX*0x8],0x0
JZ 0x001769c2
INC RCX
CMP R12,RCX
JNZ 0x0017695b
LAB_0017696b:
ADD RBX,0xf8
LEA RDX,[0x1969a8]
XOR R15D,R15D
MOV ESI,0x80
MOV RDI,RBX
MOV RCX,R14
JMP 0x001769a9
LAB_00176989:
ADD RBX,0xf8
LEA RDX,[0x1969b7]
LEA RCX,[0x1969cd]
XOR R15D,R15D
MOV ESI,0x80
MOV RDI,RBX
LAB_001769a9:
XOR EAX,EAX
CALL 0x001903ee
LAB_001769b0:
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001769c2:
MOV qword ptr [R13 + RCX*0x8],RAX
MOV RDI,RBX
MOV ESI,0x5
CALL 0x00176695
TEST EAX,EAX
JZ 0x00176a38
MOV R15D,0x1
CMP dword ptr [RBX],0x5
JNZ 0x001769b0
LEA RDX,[RBX + 0x28]
LAB_001769e7:
MOVSXD RAX,dword ptr [RBX + 0x24]
XOR ECX,ECX
LAB_001769ed:
CMP qword ptr [R13 + RCX*0x8],0x0
JZ 0x00176a02
INC RCX
CMP R12,RCX
JNZ 0x001769ed
JMP 0x0017696b
LAB_00176a02:
MOV qword ptr [R13 + RCX*0x8],RAX
MOV RAX,qword ptr [RDX + 0x20]
MOV qword ptr [RBX + 0x20],RAX
MOVUPS XMM0,xmmword ptr [RDX]
MOVUPS XMM1,xmmword ptr [RDX + 0x10]
MOVUPS xmmword ptr [RBX + 0x10],XMM1
MOVUPS xmmword ptr [RBX],XMM0
MOV qword ptr [RBP + -0x30],RDX
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x00176437
MOV RDX,qword ptr [RBP + -0x30]
CMP dword ptr [RBX],0x5
JZ 0x001769e7
JMP 0x001769b0
LAB_00176a38:
XOR R15D,R15D
JMP 0x001769b0
|
int8 my_coll_parser_scan_character_list(int *param_1,long param_2,long param_3,char *param_4)
{
int iVar1;
long lVar2;
char *pcVar3;
if (*param_1 == 5) {
if (param_3 != 0) {
lVar2 = 0;
do {
if (*(long *)(param_2 + lVar2 * 8) == 0) {
*(long *)(param_2 + lVar2 * 8) = (long)param_1[9];
iVar1 = my_coll_parser_scan_term(param_1,5);
if (iVar1 == 0) {
return 0;
}
if (*param_1 != 5) {
return 1;
}
do {
lVar2 = 0;
while (*(long *)(param_2 + lVar2 * 8) != 0) {
lVar2 = lVar2 + 1;
if (param_3 == lVar2) goto LAB_0017696b;
}
*(long *)(param_2 + lVar2 * 8) = (long)param_1[9];
*(int8 *)(param_1 + 8) = *(int8 *)(param_1 + 0x12);
param_1[4] = param_1[0xe];
param_1[5] = param_1[0xf];
param_1[6] = param_1[0x10];
param_1[7] = param_1[0x11];
*param_1 = param_1[10];
param_1[1] = param_1[0xb];
param_1[2] = param_1[0xc];
param_1[3] = param_1[0xd];
my_coll_lexem_next(param_1 + 10);
if (*param_1 != 5) {
return 1;
}
} while( true );
}
lVar2 = lVar2 + 1;
} while (param_3 != lVar2);
}
LAB_0017696b:
pcVar3 = "%s is too long";
}
else {
pcVar3 = "%s expected";
param_4 = "Character";
}
my_snprintf(param_1 + 0x3e,0x80,pcVar3,param_4);
return 0;
}
| |
23,131 | bf_exp_internal | bluesky950520[P]quickjs/libbf.c | static int bf_exp_internal(bf_t *r, const bf_t *a, limb_t prec, void *opaque)
{
bf_context_t *s = r->ctx;
bf_t T_s, *T = &T_s;
slimb_t n, K, l, i, prec1;
assert(r != a);
/* argument reduction:
T = a - n*log(2) with 0 <= T < log(2) and n integer.
*/
bf_init(s, T);
if (a->expn <= -1) {
/* 0 <= abs(a) <= 0.5 */
if (a->sign)
n = -1;
else
n = 0;
} else {
bf_const_log2(T, LIMB_BITS, BF_RNDZ);
bf_div(T, a, T, LIMB_BITS, BF_RNDD);
bf_get_limb(&n, T, 0);
}
K = bf_isqrt((prec + 1) / 2);
l = (prec - 1) / K + 1;
/* XXX: precision analysis ? */
prec1 = prec + (K + 2 * l + 18) + K + 8;
if (a->expn > 0)
prec1 += a->expn;
// printf("n=%ld K=%ld prec1=%ld\n", n, K, prec1);
bf_const_log2(T, prec1, BF_RNDF);
bf_mul_si(T, T, n, prec1, BF_RNDN);
bf_sub(T, a, T, prec1, BF_RNDN);
/* reduce the range of T */
bf_mul_2exp(T, -K, BF_PREC_INF, BF_RNDZ);
/* Taylor expansion around zero :
1 + x + x^2/2 + ... + x^n/n!
= (1 + x * (1 + x/2 * (1 + ... (x/n))))
*/
{
bf_t U_s, *U = &U_s;
bf_init(s, U);
bf_set_ui(r, 1);
for(i = l ; i >= 1; i--) {
bf_set_ui(U, i);
bf_div(U, T, U, prec1, BF_RNDN);
bf_mul(r, r, U, prec1, BF_RNDN);
bf_add_si(r, r, 1, prec1, BF_RNDN);
}
bf_delete(U);
}
bf_delete(T);
/* undo the range reduction */
for(i = 0; i < K; i++) {
bf_mul(r, r, r, prec1, BF_RNDN | BF_FLAG_EXT_EXP);
}
/* undo the argument reduction */
bf_mul_2exp(r, n, BF_PREC_INF, BF_RNDZ | BF_FLAG_EXT_EXP);
return BF_ST_INEXACT;
} | O1 | c | bf_exp_internal:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %r12
movq %rsi, %rbp
movq %rdi, %rbx
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq (%rdi), %r15
movq %r15, 0x18(%rsp)
movl $0x0, 0x20(%rsp)
movq %rax, 0x28(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rsp)
cmpq $0x0, 0x10(%rsi)
js 0x8ae64
leaq 0x10(%r15), %rcx
leaq -0x6df(%rip), %r8 # 0x8a73c
leaq 0x18(%rsp), %r14
movl $0x40, %esi
movq %r14, %rdi
movl $0x1, %edx
xorl %r9d, %r9d
callq 0x8a640
leaq -0x3249(%rip), %r9 # 0x87bf3
movl $0x40, %ecx
movq %r14, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl $0x2, %r8d
callq 0x87b3a
movq %rsp, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x888e2
jmp 0x8ae7c
cmpl $0x0, 0x8(%rbp)
je 0x8ae74
movq $-0x1, (%rsp)
jmp 0x8ae7c
movq $0x0, (%rsp)
leaq 0x1(%r12), %rsi
cmpq $0x2, %rsi
movq %r15, 0x10(%rsp)
jae 0x8ae91
xorl %r14d, %r14d
jmp 0x8aebb
shrq %rsi
bsrq %rsi, %r15
xorq $0x3f, %r15
movl %r15d, %ecx
andb $0x3e, %cl
shlq %cl, %rsi
leaq 0x40(%rsp), %rdi
callq 0x8712d
movq %rax, %r14
shrl %r15d
movl %r15d, %ecx
shrq %cl, %r14
leaq -0x1(%r12), %rax
xorl %ecx, %ecx
xorl %edx, %edx
divq %r14
movq %rax, %r15
movq 0x10(%rbp), %rax
testq %rax, %rax
cmovleq %rcx, %rax
leaq (%r15,%r14), %rcx
incq %rcx
addq %r12, %rax
leaq (%rax,%rcx,2), %r12
addq $0x1a, %r12
leaq 0x18(%rsp), %r13
movq (%r13), %rcx
addq $0x10, %rcx
leaq -0x7bf(%rip), %r8 # 0x8a73c
movq %r13, %rdi
movq %r12, %rsi
movl $0x6, %edx
xorl %r9d, %r9d
callq 0x8a640
movq (%rsp), %rdx
movq %r13, %rdi
movq %r13, %rsi
movq %rdx, 0x8(%rsp)
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x87fdf
leaq -0x3353(%rip), %r9 # 0x87bdc
movq %r13, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x87b3a
movq 0x18(%r13), %rcx
movabsq $-0x3fffffffffffffff, %rdx # imm = 0xC000000000000001
testq %rcx, %rcx
je 0x8af8a
movq %r14, %rax
negq %rax
cmpq %rdx, %rax
cmovleq %rdx, %rax
movabsq $0x3fffffffffffffff, %rsi # imm = 0x3FFFFFFFFFFFFFFF
cmpq %rsi, %rax
cmovgeq %rsi, %rax
leaq 0x18(%rsp), %rdi
addq %rax, 0x10(%rdi)
movl $0x1, %edx
xorl %r8d, %r8d
callq 0x84e26
movq 0x10(%rsp), %rax
movq %rax, 0x40(%rsp)
movl $0x0, 0x48(%rsp)
movabsq $-0x8000000000000000, %r13 # imm = 0x8000000000000000
movq %r13, 0x50(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rsp)
movl $0x1, %esi
movq %rbx, %rdi
callq 0x84abb
decq %r13
cmpq %r13, %r15
jae 0x8b032
incq %r15
leaq 0x40(%rsp), %rbp
leaq 0x18(%rsp), %r13
movq %rbp, %rdi
movq %r15, %rsi
callq 0x84abb
movq %rbp, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
leaq -0x3403(%rip), %r9 # 0x87bf3
callq 0x87b3a
movq %rbx, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x86711
movl $0x1, %edx
movq %rbx, %rdi
movq %rbx, %rsi
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x86f60
leaq -0x1(%r15), %rax
cmpq $0x1, %r15
movq %rax, %r15
jg 0x8afd5
movq 0x40(%rsp), %rax
testq %rax, %rax
je 0x8b04e
movq 0x60(%rsp), %rsi
testq %rsi, %rsi
je 0x8b04e
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
movq 0x18(%rsp), %rax
testq %rax, %rax
movabsq $0x3fffffffffffffff, %r15 # imm = 0x3FFFFFFFFFFFFFFF
movabsq $-0x3fffffffffffffff, %r13 # imm = 0xC000000000000001
je 0x8b07e
movq 0x38(%rsp), %rsi
testq %rsi, %rsi
je 0x8b07e
movq (%rax), %rdi
xorl %edx, %edx
callq *0x8(%rax)
testq %r14, %r14
jle 0x8b09f
movq %rbx, %rdi
movq %rbx, %rsi
movq %rbx, %rdx
movq %r12, %rcx
movl $0x7e0, %r8d # imm = 0x7E0
callq 0x86711
decq %r14
jne 0x8b083
movq 0x18(%rbx), %rcx
testq %rcx, %rcx
je 0x8b0d2
movq 0x8(%rsp), %rax
cmpq %r13, %rax
cmovgq %rax, %r13
cmpq %r15, %r13
cmovgeq %r15, %r13
addq %r13, 0x10(%rbx)
movq %rbx, %rdi
movq %r15, %rsi
movl $0x7e1, %edx # imm = 0x7E1
xorl %r8d, %r8d
callq 0x84e26
movl $0x10, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| bf_exp_internal:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov r12, rdx
mov rbp, rsi
mov rbx, rdi
mov rax, 8000000000000000h
mov r15, [rdi]
mov [rsp+98h+var_80], r15
mov [rsp+98h+var_78], 0
mov [rsp+98h+var_70], rax
xorps xmm0, xmm0
movups [rsp+98h+var_68], xmm0
cmp qword ptr [rsi+10h], 0
js short loc_8AE64
lea rcx, [r15+10h]
lea r8, bf_const_log2_internal
lea r14, [rsp+98h+var_80]
mov esi, 40h ; '@'
mov rdi, r14
mov edx, 1
xor r9d, r9d
call bf_const_get
lea r9, __bf_div
mov ecx, 40h ; '@'
mov rdi, r14
mov rsi, rbp
mov rdx, r14
mov r8d, 2
call bf_op2
mov rdi, rsp
mov rsi, r14
xor edx, edx
call bf_get_int64
jmp short loc_8AE7C
loc_8AE64:
cmp dword ptr [rbp+8], 0
jz short loc_8AE74
mov [rsp+98h+var_98], 0FFFFFFFFFFFFFFFFh
jmp short loc_8AE7C
loc_8AE74:
mov [rsp+98h+var_98], 0
loc_8AE7C:
lea rsi, [r12+1]
cmp rsi, 2
mov [rsp+98h+var_88], r15
jnb short loc_8AE91
xor r14d, r14d
jmp short loc_8AEBB
loc_8AE91:
shr rsi, 1
bsr r15, rsi
xor r15, 3Fh
mov ecx, r15d
and cl, 3Eh
shl rsi, cl
lea rdi, [rsp+98h+var_58]
call mp_sqrtrem1
mov r14, rax
shr r15d, 1
mov ecx, r15d
shr r14, cl
loc_8AEBB:
lea rax, [r12-1]
xor ecx, ecx
xor edx, edx
div r14
mov r15, rax
mov rax, [rbp+10h]
test rax, rax
cmovle rax, rcx
lea rcx, [r15+r14]
inc rcx
add rax, r12
lea r12, [rax+rcx*2]
add r12, 1Ah
lea r13, [rsp+98h+var_80]
mov rcx, [r13+0]
add rcx, 10h
lea r8, bf_const_log2_internal
mov rdi, r13
mov rsi, r12
mov edx, 6
xor r9d, r9d
call bf_const_get
mov rdx, [rsp+98h+var_98]
mov rdi, r13
mov rsi, r13
mov [rsp+98h+var_90], rdx
mov rcx, r12
xor r8d, r8d
call bf_mul_si
lea r9, __bf_sub
mov rdi, r13
mov rsi, rbp
mov rdx, r13
mov rcx, r12
xor r8d, r8d
call bf_op2
mov rcx, [r13+18h]
mov rdx, 0C000000000000001h
test rcx, rcx
jz short loc_8AF8A
mov rax, r14
neg rax
cmp rax, rdx
cmovle rax, rdx
mov rsi, 3FFFFFFFFFFFFFFFh
cmp rax, rsi
cmovge rax, rsi
lea rdi, [rsp+98h+var_80]
add [rdi+10h], rax
mov edx, 1
xor r8d, r8d
call __bf_round
loc_8AF8A:
mov rax, [rsp+98h+var_88]
mov [rsp+98h+var_58], rax
mov [rsp+98h+var_50], 0
mov r13, 8000000000000000h
mov [rsp+98h+var_48], r13
xorps xmm0, xmm0
movups [rsp+98h+var_40], xmm0
mov esi, 1
mov rdi, rbx
call bf_set_ui
dec r13
cmp r15, r13
jnb short loc_8B032
inc r15
lea rbp, [rsp+98h+var_58]
lea r13, [rsp+98h+var_80]
loc_8AFD5:
mov rdi, rbp
mov rsi, r15
call bf_set_ui
mov rdi, rbp
mov rsi, r13
mov rdx, rbp
mov rcx, r12
xor r8d, r8d
lea r9, __bf_div
call bf_op2
mov rdi, rbx
mov rsi, rbx
mov rdx, rbp
mov rcx, r12
xor r8d, r8d
call bf_mul
mov edx, 1
mov rdi, rbx
mov rsi, rbx
mov rcx, r12
xor r8d, r8d
call bf_add_si
lea rax, [r15-1]
cmp r15, 1
mov r15, rax
jg short loc_8AFD5
loc_8B032:
mov rax, [rsp+98h+var_58]
test rax, rax
jz short loc_8B04E
mov rsi, qword ptr [rsp+98h+var_40+8]
test rsi, rsi
jz short loc_8B04E
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
loc_8B04E:
mov rax, [rsp+98h+var_80]
test rax, rax
mov r15, 3FFFFFFFFFFFFFFFh
mov r13, 0C000000000000001h
jz short loc_8B07E
mov rsi, qword ptr [rsp+98h+var_68+8]
test rsi, rsi
jz short loc_8B07E
mov rdi, [rax]
xor edx, edx
call qword ptr [rax+8]
loc_8B07E:
test r14, r14
jle short loc_8B09F
loc_8B083:
mov rdi, rbx
mov rsi, rbx
mov rdx, rbx
mov rcx, r12
mov r8d, 7E0h
call bf_mul
dec r14
jnz short loc_8B083
loc_8B09F:
mov rcx, [rbx+18h]
test rcx, rcx
jz short loc_8B0D2
mov rax, [rsp+98h+var_90]
cmp rax, r13
cmovg r13, rax
cmp r13, r15
cmovge r13, r15
add [rbx+10h], r13
mov rdi, rbx
mov rsi, r15
mov edx, 7E1h
xor r8d, r8d
call __bf_round
loc_8B0D2:
mov eax, 10h
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long bf_exp_internal(long long a1, long long a2, long long a3)
{
_QWORD *v5; // r15
signed long long v6; // r14
unsigned long long v7; // rsi
unsigned long long v8; // r15
unsigned long long v9; // r15
long long v10; // rax
long long v11; // r12
long long v12; // rax
signed long long v13; // r15
long long v15; // r13
unsigned long long v16; // rcx
long long v18; // [rsp+0h] [rbp-98h] BYREF
signed long long v19; // [rsp+8h] [rbp-90h]
_QWORD *v20; // [rsp+10h] [rbp-88h]
__int128 v21; // [rsp+18h] [rbp-80h] BYREF
unsigned long long v22; // [rsp+28h] [rbp-70h]
__int128 v23; // [rsp+30h] [rbp-68h]
__int128 v24; // [rsp+40h] [rbp-58h] BYREF
unsigned long long v25; // [rsp+50h] [rbp-48h]
__int128 v26; // [rsp+58h] [rbp-40h]
v5 = *(_QWORD **)a1;
*(_QWORD *)&v21 = *(_QWORD *)a1;
DWORD2(v21) = 0;
v22 = 0x8000000000000000LL;
v23 = 0LL;
if ( *(long long *)(a2 + 16) < 0 )
{
if ( *(_DWORD *)(a2 + 8) )
v18 = -1LL;
else
v18 = 0LL;
}
else
{
bf_const_get(
(long long)&v21,
64LL,
1u,
(long long)(v5 + 2),
(void ( *)(long long, unsigned long long))bf_const_log2_internal,
0);
bf_op2(&v21, (__int128 *)a2, &v21, 64LL, 2LL, (long long ( *)(__int128 *))_bf_div);
bf_get_int64(&v18, (long long)&v21, 0);
}
v20 = v5;
if ( (unsigned long long)(a3 + 1) >= 2 )
{
v7 = (unsigned long long)(a3 + 1) >> 1;
_BitScanReverse64(&v8, v7);
v6 = mp_sqrtrem1(&v24, v7 << ((v8 ^ 0x3F) & 0x3E)) >> (((unsigned int)v8 ^ 0x3F) >> 1);
}
else
{
v6 = 0LL;
}
v9 = (a3 - 1) / (unsigned long long)v6;
v10 = *(_QWORD *)(a2 + 16);
if ( v10 <= 0 )
v10 = 0LL;
v11 = a3 + v10 + 2 * (v9 + v6 + 1) + 26;
bf_const_get(
(long long)&v21,
v11,
6u,
v21 + 16,
(void ( *)(long long, unsigned long long))bf_const_log2_internal,
0);
v19 = v18;
bf_mul_si(&v21, (long long)&v21, v18, v11, 0);
bf_op2(&v21, (__int128 *)a2, &v21, v11, 0LL, (long long ( *)(__int128 *))_bf_sub);
if ( (_QWORD)v23 )
{
v12 = -v6;
if ( -v6 <= (long long)0xC000000000000001LL )
v12 = 0xC000000000000001LL;
if ( v12 >= 0x3FFFFFFFFFFFFFFFLL )
v12 = 0x3FFFFFFFFFFFFFFFLL;
v22 += v12;
_bf_round((long long)&v21, 0x3FFFFFFFFFFFFFFFLL, 1LL, v23, 0);
}
*(_QWORD *)&v24 = v20;
DWORD2(v24) = 0;
v25 = 0x8000000000000000LL;
v26 = 0LL;
bf_set_ui((_QWORD **)a1, 1uLL);
if ( v9 < 0x7FFFFFFFFFFFFFFFLL )
{
v13 = v9 + 1;
do
{
bf_set_ui((_QWORD **)&v24, v13);
bf_op2(&v24, &v21, &v24, v11, 0LL, (long long ( *)(__int128 *))_bf_div);
bf_mul((__int128 *)a1, a1, (long long)&v24, v11, 0);
bf_add_si((long long *)a1, a1, 1LL, v11, 0);
}
while ( v13-- > 1 );
}
if ( (_QWORD)v24 && *((_QWORD *)&v26 + 1) )
(*(void ( **)(_QWORD, _QWORD, _QWORD))(v24 + 8))(*(_QWORD *)v24, *((_QWORD *)&v26 + 1), 0LL);
v15 = 0xC000000000000001LL;
if ( (_QWORD)v21 && *((_QWORD *)&v23 + 1) )
(*(void ( **)(_QWORD, _QWORD, _QWORD))(v21 + 8))(*(_QWORD *)v21, *((_QWORD *)&v23 + 1), 0LL);
if ( v6 > 0 )
{
do
{
bf_mul((__int128 *)a1, a1, a1, v11, 0x7E0u);
--v6;
}
while ( v6 );
}
v16 = *(_QWORD *)(a1 + 24);
if ( v16 )
{
if ( v19 > (long long)0xC000000000000001LL )
v15 = v19;
if ( v15 >= 0x3FFFFFFFFFFFFFFFLL )
v15 = 0x3FFFFFFFFFFFFFFFLL;
*(_QWORD *)(a1 + 16) += v15;
_bf_round(a1, 0x3FFFFFFFFFFFFFFFLL, 2017LL, v16, 0);
}
return 16LL;
}
| |||
23,132 | bf_exp_internal | bluesky950520[P]quickjs/libbf.c | static int bf_exp_internal(bf_t *r, const bf_t *a, limb_t prec, void *opaque)
{
bf_context_t *s = r->ctx;
bf_t T_s, *T = &T_s;
slimb_t n, K, l, i, prec1;
assert(r != a);
/* argument reduction:
T = a - n*log(2) with 0 <= T < log(2) and n integer.
*/
bf_init(s, T);
if (a->expn <= -1) {
/* 0 <= abs(a) <= 0.5 */
if (a->sign)
n = -1;
else
n = 0;
} else {
bf_const_log2(T, LIMB_BITS, BF_RNDZ);
bf_div(T, a, T, LIMB_BITS, BF_RNDD);
bf_get_limb(&n, T, 0);
}
K = bf_isqrt((prec + 1) / 2);
l = (prec - 1) / K + 1;
/* XXX: precision analysis ? */
prec1 = prec + (K + 2 * l + 18) + K + 8;
if (a->expn > 0)
prec1 += a->expn;
// printf("n=%ld K=%ld prec1=%ld\n", n, K, prec1);
bf_const_log2(T, prec1, BF_RNDF);
bf_mul_si(T, T, n, prec1, BF_RNDN);
bf_sub(T, a, T, prec1, BF_RNDN);
/* reduce the range of T */
bf_mul_2exp(T, -K, BF_PREC_INF, BF_RNDZ);
/* Taylor expansion around zero :
1 + x + x^2/2 + ... + x^n/n!
= (1 + x * (1 + x/2 * (1 + ... (x/n))))
*/
{
bf_t U_s, *U = &U_s;
bf_init(s, U);
bf_set_ui(r, 1);
for(i = l ; i >= 1; i--) {
bf_set_ui(U, i);
bf_div(U, T, U, prec1, BF_RNDN);
bf_mul(r, r, U, prec1, BF_RNDN);
bf_add_si(r, r, 1, prec1, BF_RNDN);
}
bf_delete(U);
}
bf_delete(T);
/* undo the range reduction */
for(i = 0; i < K; i++) {
bf_mul(r, r, r, prec1, BF_RNDN | BF_FLAG_EXT_EXP);
}
/* undo the argument reduction */
bf_mul_2exp(r, n, BF_PREC_INF, BF_RNDZ | BF_FLAG_EXT_EXP);
return BF_ST_INEXACT;
} | O2 | c | bf_exp_internal:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %r14
movq %rsi, %rbp
movq %rdi, %rbx
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq (%rdi), %rcx
movq %rcx, 0x18(%rsp)
movq %rcx, 0x20(%rsp)
andl $0x0, 0x28(%rsp)
movq %rax, 0x30(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rsp)
movq 0x10(%rsi), %r13
testq %r13, %r13
movq %rsi, 0x8(%rsp)
js 0x745f4
leaq 0x20(%rsp), %r15
pushq $0x40
popq %r12
pushq $0x1
popq %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x73f65
pushq $0x2
popq %r8
movq %r15, %rdi
movq %rbp, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x71cf2
leaq 0x48(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x726a3
movq 0x10(%rbp), %r13
movq (%r12), %rax
jmp 0x745fc
xorl %eax, %eax
cmpl 0x8(%rbp), %eax
sbbq %rax, %rax
movq %rax, 0x10(%rsp)
leaq 0x1(%r14), %rdi
shrq %rdi
callq 0x714de
movq %rax, %rbp
leaq -0x1(%r14), %rax
xorl %ecx, %ecx
xorl %edx, %edx
divq %rbp
testq %r13, %r13
cmovleq %rcx, %r13
leaq 0x1(%rax), %r15
addq %rbp, %rax
incq %rax
addq %r14, %r13
leaq 0x1a(,%rax,2), %r12
addq %r13, %r12
leaq 0x20(%rsp), %r14
pushq $0x6
popq %rdx
movq %r14, %rdi
movq %r12, %rsi
callq 0x73f65
movq %r14, %rdi
movq %r14, %rsi
movq 0x10(%rsp), %rdx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x71fa7
movq %r14, %rdi
movq 0x8(%rsp), %rsi
movq %r14, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x713f7
movq %rbp, 0x8(%rsp)
negq %rbp
pushq $0x1
popq %rcx
movq %r14, %rdi
movq %rbp, %rsi
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
callq 0x70fe2
leaq 0x50(%rsp), %rbp
movq 0x18(%rsp), %rax
movq %rax, (%rbp)
andl $0x0, 0x8(%rbp)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x10(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rbp)
pushq $0x1
popq %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x6f556
testq %r15, %r15
jle 0x74720
movq %rbp, %rdi
movq %r15, %rsi
callq 0x6f556
movq %rbp, %rdi
movq %r14, %rsi
movq %rbp, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x71cf2
movq %rbx, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x70da9
movq %rbx, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x7137a
decq %r15
jmp 0x746cf
leaq 0x50(%rsp), %rdi
callq 0x7145e
leaq 0x20(%rsp), %rdi
callq 0x7145e
xorl %r14d, %r14d
movq 0x8(%rsp), %rax
testq %rax, %rax
cmovgq %rax, %r14
movq 0x10(%rsp), %r15
subq $0x1, %r14
jb 0x74767
movq %rbx, %rdi
movq %rbx, %rsi
movq %rbx, %rdx
movq %r12, %rcx
movl $0x7e0, %r8d # imm = 0x7E0
callq 0x70da9
jmp 0x74748
movq %rbx, %rdi
movq %r15, %rsi
movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF
movl $0x7e1, %ecx # imm = 0x7E1
callq 0x70fe2
pushq $0x10
popq %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| bf_exp_internal:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov r14, rdx
mov rbp, rsi
mov rbx, rdi
mov rax, 8000000000000000h
mov rcx, [rdi]
mov [rsp+0A8h+var_90], rcx
mov [rsp+0A8h+var_88], rcx
and [rsp+0A8h+var_80], 0
mov [rsp+0A8h+var_78], rax
xorps xmm0, xmm0
movups [rsp+0A8h+var_70], xmm0
mov r13, [rsi+10h]
test r13, r13
mov [rsp+0A8h+var_A0], rsi
js short loc_745F4
lea r15, [rsp+0A8h+var_88]
push 40h ; '@'
pop r12
push 1
pop rdx
mov rdi, r15
mov rsi, r12
call bf_const_log2
push 2
pop r8
mov rdi, r15
mov rsi, rbp
mov rdx, r15
mov rcx, r12
call bf_div
lea r12, [rsp+0A8h+var_60]
mov rdi, r12
mov rsi, r15
xor edx, edx
call bf_get_int64
mov r13, [rbp+10h]
mov rax, [r12]
jmp short loc_745FC
loc_745F4:
xor eax, eax
cmp eax, [rbp+8]
sbb rax, rax
loc_745FC:
mov [rsp+0A8h+var_98], rax
lea rdi, [r14+1]
shr rdi, 1
call bf_isqrt
mov rbp, rax
lea rax, [r14-1]
xor ecx, ecx
xor edx, edx
div rbp
test r13, r13
cmovle r13, rcx
lea r15, [rax+1]
add rax, rbp
inc rax
add r13, r14
lea r12, ds:1Ah[rax*2]
add r12, r13
lea r14, [rsp+0A8h+var_88]
push 6
pop rdx
mov rdi, r14
mov rsi, r12
call bf_const_log2
mov rdi, r14
mov rsi, r14
mov rdx, [rsp+0A8h+var_98]
mov rcx, r12
xor r8d, r8d
call bf_mul_si
mov rdi, r14
mov rsi, [rsp+0A8h+var_A0]
mov rdx, r14
mov rcx, r12
xor r8d, r8d
call bf_sub
mov [rsp+0A8h+var_A0], rbp
neg rbp
push 1
pop rcx
mov rdi, r14
mov rsi, rbp
mov rdx, 3FFFFFFFFFFFFFFFh
call bf_mul_2exp
lea rbp, [rsp+0A8h+var_58]
mov rax, [rsp+0A8h+var_90]
mov [rbp+0], rax
and dword ptr [rbp+8], 0
mov rax, 8000000000000000h
mov [rbp+10h], rax
xorps xmm0, xmm0
movups xmmword ptr [rbp+18h], xmm0
push 1
pop r13
mov rdi, rbx
mov rsi, r13
call bf_set_ui
loc_746CF:
test r15, r15
jle short loc_74720
mov rdi, rbp
mov rsi, r15
call bf_set_ui
mov rdi, rbp
mov rsi, r14
mov rdx, rbp
mov rcx, r12
xor r8d, r8d
call bf_div
mov rdi, rbx
mov rsi, rbx
mov rdx, rbp
mov rcx, r12
xor r8d, r8d
call bf_mul
mov rdi, rbx
mov rsi, rbx
mov rdx, r13
mov rcx, r12
xor r8d, r8d
call bf_add_si
dec r15
jmp short loc_746CF
loc_74720:
lea rdi, [rsp+0A8h+var_58]
call bf_delete_0
lea rdi, [rsp+0A8h+var_88]
call bf_delete_0
xor r14d, r14d
mov rax, [rsp+0A8h+var_A0]
test rax, rax
cmovg r14, rax
mov r15, [rsp+0A8h+var_98]
loc_74748:
sub r14, 1
jb short loc_74767
mov rdi, rbx
mov rsi, rbx
mov rdx, rbx
mov rcx, r12
mov r8d, 7E0h
call bf_mul
jmp short loc_74748
loc_74767:
mov rdi, rbx
mov rsi, r15
mov rdx, 3FFFFFFFFFFFFFFFh
mov ecx, 7E1h
call bf_mul_2exp
push 10h
pop rax
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long bf_exp_internal(long long *a1, long long a2, long long a3)
{
long long v4; // r13
long long v5; // rax
signed long long v6; // rbp
unsigned long long v7; // rax
signed long long v8; // r15
long long v9; // r12
signed long long v10; // r14
signed long long v13; // [rsp+10h] [rbp-98h]
long long v14; // [rsp+18h] [rbp-90h]
__int128 v15; // [rsp+20h] [rbp-88h] BYREF
unsigned long long v16; // [rsp+30h] [rbp-78h]
__int128 v17; // [rsp+38h] [rbp-70h]
long long v18; // [rsp+48h] [rbp-60h] BYREF
__int128 v19; // [rsp+50h] [rbp-58h] BYREF
unsigned long long v20; // [rsp+60h] [rbp-48h]
__int128 v21; // [rsp+68h] [rbp-40h]
v14 = *a1;
*(_QWORD *)&v15 = *a1;
DWORD2(v15) = 0;
v16 = 0x8000000000000000LL;
v17 = 0LL;
v4 = *(_QWORD *)(a2 + 16);
if ( v4 < 0 )
{
v5 = -(long long)(*(_DWORD *)(a2 + 8) != 0);
}
else
{
bf_const_log2(&v15, 64LL, 1LL);
bf_div(&v15, (__int128 *)a2, &v15, 64LL, 2LL);
bf_get_int64(&v18, (long long)&v15, 0);
v4 = *(_QWORD *)(a2 + 16);
v5 = v18;
}
v13 = v5;
v6 = bf_isqrt((unsigned long long)(a3 + 1) >> 1);
v7 = (a3 - 1) / (unsigned long long)v6;
if ( v4 <= 0 )
v4 = 0LL;
v8 = v7 + 1;
v9 = a3 + v4 + 2 * (v6 + v7 + 1) + 26;
bf_const_log2(&v15, v9, 6LL);
bf_mul_si((long long *)&v15, (long long *)&v15, v13, v9, 0);
bf_sub((long long)&v15, a2, (long long)&v15, v9, 0LL);
bf_mul_2exp((long long)&v15, -v6, 0x3FFFFFFFFFFFFFFFLL, 1u);
*(_QWORD *)&v19 = v14;
DWORD2(v19) = 0;
v20 = 0x8000000000000000LL;
v21 = 0LL;
bf_set_ui((long long)a1, 1uLL);
while ( v8 > 0 )
{
bf_set_ui((long long)&v19, v8);
bf_div(&v19, &v15, &v19, v9, 0LL);
bf_mul(a1, a1, (long long *)&v19, v9, 0);
bf_add_si(a1, (long long)a1, 1LL, v9, 0);
--v8;
}
bf_delete_0((long long *)&v19);
bf_delete_0((long long *)&v15);
v10 = 0LL;
if ( v6 > 0 )
v10 = v6;
while ( v10-- != 0 )
bf_mul(a1, a1, a1, v9, 0x7E0u);
bf_mul_2exp((long long)a1, v13, 0x3FFFFFFFFFFFFFFFLL, 0x7E1u);
return 16LL;
}
| bf_exp_internal:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV R14,RDX
MOV RBP,RSI
MOV RBX,RDI
MOV RAX,-0x8000000000000000
MOV RCX,qword ptr [RDI]
MOV qword ptr [RSP + 0x18],RCX
MOV qword ptr [RSP + 0x20],RCX
AND dword ptr [RSP + 0x28],0x0
MOV qword ptr [RSP + 0x30],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP + 0x38],XMM0
MOV R13,qword ptr [RSI + 0x10]
TEST R13,R13
MOV qword ptr [RSP + 0x8],RSI
JS 0x001745f4
LEA R15,[RSP + 0x20]
PUSH 0x40
POP R12
PUSH 0x1
POP RDX
MOV RDI,R15
MOV RSI,R12
CALL 0x00173f65
PUSH 0x2
POP R8
MOV RDI,R15
MOV RSI,RBP
MOV RDX,R15
MOV RCX,R12
CALL 0x00171cf2
LEA R12,[RSP + 0x48]
MOV RDI,R12
MOV RSI,R15
XOR EDX,EDX
CALL 0x001726a3
MOV R13,qword ptr [RBP + 0x10]
MOV RAX,qword ptr [R12]
JMP 0x001745fc
LAB_001745f4:
XOR EAX,EAX
CMP EAX,dword ptr [RBP + 0x8]
SBB RAX,RAX
LAB_001745fc:
MOV qword ptr [RSP + 0x10],RAX
LEA RDI,[R14 + 0x1]
SHR RDI,0x1
CALL 0x001714de
MOV RBP,RAX
LEA RAX,[R14 + -0x1]
XOR ECX,ECX
XOR EDX,EDX
DIV RBP
TEST R13,R13
CMOVLE R13,RCX
LEA R15,[RAX + 0x1]
ADD RAX,RBP
INC RAX
ADD R13,R14
LEA R12,[0x1a + RAX*0x2]
ADD R12,R13
LEA R14,[RSP + 0x20]
PUSH 0x6
POP RDX
MOV RDI,R14
MOV RSI,R12
CALL 0x00173f65
MOV RDI,R14
MOV RSI,R14
MOV RDX,qword ptr [RSP + 0x10]
MOV RCX,R12
XOR R8D,R8D
CALL 0x00171fa7
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,R14
MOV RCX,R12
XOR R8D,R8D
CALL 0x001713f7
MOV qword ptr [RSP + 0x8],RBP
NEG RBP
PUSH 0x1
POP RCX
MOV RDI,R14
MOV RSI,RBP
MOV RDX,0x3fffffffffffffff
CALL 0x00170fe2
LEA RBP,[RSP + 0x50]
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RBP],RAX
AND dword ptr [RBP + 0x8],0x0
MOV RAX,-0x8000000000000000
MOV qword ptr [RBP + 0x10],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBP + 0x18],XMM0
PUSH 0x1
POP R13
MOV RDI,RBX
MOV RSI,R13
CALL 0x0016f556
LAB_001746cf:
TEST R15,R15
JLE 0x00174720
MOV RDI,RBP
MOV RSI,R15
CALL 0x0016f556
MOV RDI,RBP
MOV RSI,R14
MOV RDX,RBP
MOV RCX,R12
XOR R8D,R8D
CALL 0x00171cf2
MOV RDI,RBX
MOV RSI,RBX
MOV RDX,RBP
MOV RCX,R12
XOR R8D,R8D
CALL 0x00170da9
MOV RDI,RBX
MOV RSI,RBX
MOV RDX,R13
MOV RCX,R12
XOR R8D,R8D
CALL 0x0017137a
DEC R15
JMP 0x001746cf
LAB_00174720:
LEA RDI,[RSP + 0x50]
CALL 0x0017145e
LEA RDI,[RSP + 0x20]
CALL 0x0017145e
XOR R14D,R14D
MOV RAX,qword ptr [RSP + 0x8]
TEST RAX,RAX
CMOVG R14,RAX
MOV R15,qword ptr [RSP + 0x10]
LAB_00174748:
SUB R14,0x1
JC 0x00174767
MOV RDI,RBX
MOV RSI,RBX
MOV RDX,RBX
MOV RCX,R12
MOV R8D,0x7e0
CALL 0x00170da9
JMP 0x00174748
LAB_00174767:
MOV RDI,RBX
MOV RSI,R15
MOV RDX,0x3fffffffffffffff
MOV ECX,0x7e1
CALL 0x00170fe2
PUSH 0x10
POP RAX
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 bf_exp_internal(int8 *param_1,long param_2,long param_3)
{
int8 uVar1;
long lVar2;
ulong uVar3;
ulong uVar4;
long lVar5;
long lVar6;
int8 local_88;
int4 local_80;
int8 local_78;
int8 local_70;
int8 uStack_68;
long local_60;
int8 local_58;
int4 local_50;
int8 local_48;
int8 local_40;
int8 uStack_38;
uVar1 = *param_1;
local_80 = 0;
local_78 = 0x8000000000000000;
local_70 = 0;
uStack_68 = 0;
lVar6 = *(long *)(param_2 + 0x10);
local_88 = uVar1;
if (lVar6 < 0) {
lVar2 = -(ulong)(*(int *)(param_2 + 8) != 0);
}
else {
bf_const_log2(&local_88,0x40,1);
bf_div(&local_88,param_2,&local_88,0x40,2);
bf_get_int64(&local_60,&local_88,0);
lVar6 = *(long *)(param_2 + 0x10);
lVar2 = local_60;
}
uVar3 = bf_isqrt(param_3 + 1U >> 1);
uVar4 = (param_3 - 1U) / uVar3;
if (lVar6 < 1) {
lVar6 = 0;
}
lVar5 = (uVar4 + uVar3 + 1) * 2 + 0x1a + lVar6 + param_3;
bf_const_log2(&local_88,lVar5,6);
bf_mul_si(&local_88,&local_88,lVar2,lVar5,0);
bf_sub(&local_88,param_2,&local_88,lVar5,0);
bf_mul_2exp(&local_88,-uVar3,0x3fffffffffffffff,1);
local_50 = 0;
local_48 = 0x8000000000000000;
local_40 = 0;
uStack_38 = 0;
local_58 = uVar1;
bf_set_ui(param_1,1);
for (lVar6 = uVar4 + 1; 0 < lVar6; lVar6 = lVar6 + -1) {
bf_set_ui(&local_58,lVar6);
bf_div(&local_58,&local_88,&local_58,lVar5,0);
bf_mul(param_1,param_1,&local_58,lVar5);
bf_add_si(param_1,param_1,1,lVar5);
}
bf_delete(&local_58);
bf_delete(&local_88);
uVar4 = 0;
if (0 < (long)uVar3) {
uVar4 = uVar3;
}
while (uVar4 != 0) {
bf_mul(param_1,param_1,param_1,lVar5,0x7e0);
uVar4 = uVar4 - 1;
}
bf_mul_2exp(param_1,lVar2,0x3fffffffffffffff,0x7e1);
return 0x10;
}
| |
23,133 | minja::Value::to_bool() const | monkey531[P]llama/common/minja.hpp | bool to_bool() const {
if (is_null()) return false;
if (is_boolean()) return get<bool>();
if (is_number()) return get<double>() != 0;
if (is_string()) return !get<std::string>().empty();
if (is_array()) return !empty();
return true;
} | O3 | cpp | minja::Value::to_bool() const:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rsi
cmpq $0x0, 0x20(%rdi)
movq 0x10(%rdi), %rax
movb 0x40(%rdi), %cl
jne 0x3cf98
testq %rax, %rax
jne 0x3cf98
testb %cl, %cl
jne 0x3cf98
cmpq $0x0, 0x30(%rsi)
jne 0x3cf98
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
cmpb $0x4, %cl
jne 0x3cfac
movq %rsi, %rdi
addq $0x28, %rsp
popq %rbx
popq %r14
jmp 0x3ec9a
leal -0x5(%rcx), %edx
cmpb $0x2, %dl
ja 0x3cfcf
movq %rsi, %rdi
callq 0x3d2ce
xorpd %xmm1, %xmm1
cmpneqsd %xmm0, %xmm1
movq %xmm1, %rbx
andl $0x1, %ebx
jmp 0x3cf8e
cmpb $0x3, %cl
jne 0x3d005
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x3edaa
cmpq $0x0, 0x8(%r14)
setne %bl
movq (%r14), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x3cf8e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x3cf8e
testq %rax, %rax
je 0x3d01c
movq %rsi, %rdi
callq 0x3eeb4
movl %eax, %ebx
xorb $0x1, %bl
jmp 0x3cf8e
movb $0x1, %bl
jmp 0x3cf8e
nop
| _ZNK5minja5Value7to_boolEv:
push r14
push rbx
sub rsp, 28h
mov rsi, rdi
cmp qword ptr [rdi+20h], 0
mov rax, [rdi+10h]
mov cl, [rdi+40h]
jnz short loc_3CF98
test rax, rax
jnz short loc_3CF98
test cl, cl
jnz short loc_3CF98
cmp qword ptr [rsi+30h], 0
jnz short loc_3CF98
xor ebx, ebx
loc_3CF8E:
mov eax, ebx
add rsp, 28h
pop rbx
pop r14
retn
loc_3CF98:
cmp cl, 4
jnz short loc_3CFAC
mov rdi, rsi
add rsp, 28h
pop rbx
pop r14
jmp _ZNK5minja5Value3getIbEET_v; minja::Value::get<bool>(void)
loc_3CFAC:
lea edx, [rcx-5]
cmp dl, 2
ja short loc_3CFCF
mov rdi, rsi
call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void)
xorpd xmm1, xmm1
cmpneqsd xmm1, xmm0
movq rbx, xmm1
and ebx, 1
jmp short loc_3CF8E
loc_3CFCF:
cmp cl, 3
jnz short loc_3D005
lea r14, [rsp+38h+var_30]
mov rdi, r14
call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void)
cmp qword ptr [r14+8], 0
setnz bl
mov rdi, [r14]; void *
lea rax, [rsp+38h+var_20]
cmp rdi, rax
jz short loc_3CF8E
mov rsi, [rsp+38h+var_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_3CF8E
loc_3D005:
test rax, rax
jz short loc_3D01C
mov rdi, rsi; this
call _ZNK5minja5Value5emptyEv; minja::Value::empty(void)
mov ebx, eax
xor bl, 1
jmp loc_3CF8E
loc_3D01C:
mov bl, 1
jmp loc_3CF8E
| long long minja::Value::to_bool(minja::Value *this)
{
unsigned int v1; // ebx
long long v2; // rax
char v3; // cl
__m128d v5; // xmm0
void *v6[2]; // [rsp+8h] [rbp-30h] BYREF
long long v7; // [rsp+18h] [rbp-20h] BYREF
v2 = *((_QWORD *)this + 2);
v3 = *((_BYTE *)this + 64);
if ( !*((_QWORD *)this + 4) && !v2 && !v3 && !*((_QWORD *)this + 6) )
return 0;
if ( v3 != 4 )
{
if ( (unsigned __int8)(v3 - 5) > 2u )
{
if ( v3 == 3 )
{
minja::Value::get<std::string>(v6, this);
LOBYTE(v1) = v6[1] != 0LL;
if ( v6[0] != &v7 )
operator delete(v6[0], v7 + 1);
}
else if ( v2 )
{
v1 = minja::Value::empty(this);
LOBYTE(v1) = v1 ^ 1;
}
else
{
LOBYTE(v1) = 1;
}
}
else
{
v5.m128d_f64[0] = minja::Value::get<double>(this);
return *(_OWORD *)&_mm_cmpneq_sd((__m128d)0LL, v5) & 1;
}
return v1;
}
return minja::Value::get<bool>(this);
}
| to_bool:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RSI,RDI
CMP qword ptr [RDI + 0x20],0x0
MOV RAX,qword ptr [RDI + 0x10]
MOV CL,byte ptr [RDI + 0x40]
JNZ 0x0013cf98
TEST RAX,RAX
JNZ 0x0013cf98
TEST CL,CL
JNZ 0x0013cf98
CMP qword ptr [RSI + 0x30],0x0
JNZ 0x0013cf98
XOR EBX,EBX
LAB_0013cf8e:
MOV EAX,EBX
ADD RSP,0x28
POP RBX
POP R14
RET
LAB_0013cf98:
CMP CL,0x4
JNZ 0x0013cfac
MOV RDI,RSI
ADD RSP,0x28
POP RBX
POP R14
JMP 0x0013ec9a
LAB_0013cfac:
LEA EDX,[RCX + -0x5]
CMP DL,0x2
JA 0x0013cfcf
MOV RDI,RSI
CALL 0x0013d2ce
XORPD XMM1,XMM1
CMPNEQSD XMM1,XMM0
MOVQ RBX,XMM1
AND EBX,0x1
JMP 0x0013cf8e
LAB_0013cfcf:
CMP CL,0x3
JNZ 0x0013d005
LEA R14,[RSP + 0x8]
MOV RDI,R14
CALL 0x0013edaa
CMP qword ptr [R14 + 0x8],0x0
SETNZ BL
MOV RDI,qword ptr [R14]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x0013cf8e
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001186a0
JMP 0x0013cf8e
LAB_0013d005:
TEST RAX,RAX
JZ 0x0013d01c
MOV RDI,RSI
CALL 0x0013eeb4
MOV EBX,EAX
XOR BL,0x1
JMP 0x0013cf8e
LAB_0013d01c:
MOV BL,0x1
JMP 0x0013cf8e
|
/* minja::Value::to_bool() const */
byte __thiscall minja::Value::to_bool(Value *this)
{
Value VVar1;
bool bVar2;
byte bVar3;
double dVar4;
long *local_30;
long local_28;
long local_20 [2];
VVar1 = this[0x40];
if ((((*(long *)(this + 0x20) == 0) && (*(long *)(this + 0x10) == 0)) && (VVar1 == (Value)0x0)) &&
(*(long *)(this + 0x30) == 0)) {
bVar3 = 0;
}
else {
if (VVar1 == (Value)0x4) {
bVar2 = get<bool>(this);
return bVar2;
}
if ((byte)((char)VVar1 - 5U) < 3) {
dVar4 = get<double>(this);
bVar3 = -(dVar4 != 0.0) & 1;
}
else if (VVar1 == (Value)0x3) {
get<std::__cxx11::string>();
bVar3 = local_28 != 0;
if (local_30 != local_20) {
operator_delete(local_30,local_20[0] + 1);
}
}
else if (*(long *)(this + 0x10) == 0) {
bVar3 = 1;
}
else {
bVar3 = empty(this);
bVar3 = bVar3 ^ 1;
}
}
return bVar3;
}
| |
23,134 | mysql_free_result_start | eloqsql/libmariadb/libmariadb/mariadb_async.c | int STDCALL
mysql_free_result_start(MYSQL_RES *result)
{
MK_ASYNC_START_BODY_VOID_RETURN(
mysql_free_result,
result->handle,
{
WIN_SET_NONBLOCKING(result->handle)
parms.result= result;
},
/*
mysql_free_result() can have NULL in result->handle (this happens when all
rows have been fetched and mysql_fetch_row() returned NULL.)
So we cannot suspend, but it does not matter, as in this case
mysql_free_result() cannot block.
It is also legitimate to have NULL result, which will do nothing.
*/
if (!result || !result->handle)
{
mysql_free_result(result);
return 0;
})
} | O0 | c | mysql_free_result_start:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x391ee
movq -0x10(%rbp), %rax
cmpq $0x0, 0x78(%rax)
jne 0x39203
movq -0x10(%rbp), %rdi
callq 0x16f60
movl $0x0, -0x4(%rbp)
jmp 0x392f9
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movb $0x1, 0x14(%rax)
movq -0x20(%rbp), %rdi
addq $0x38, %rdi
leaq 0xd7(%rip), %rsi # 0x39310
leaq -0x28(%rbp), %rdx
callq 0x3f170
movl %eax, -0x14(%rbp)
movq -0x20(%rbp), %rax
movb $0x0, 0x15(%rax)
movq -0x20(%rbp), %rax
movb $0x0, 0x14(%rax)
cmpl $0x0, -0x14(%rbp)
jle 0x39271
movq -0x20(%rbp), %rax
movb $0x1, 0x15(%rax)
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x392f9
cmpl $0x0, -0x14(%rbp)
jge 0x392f2
jmp 0x39279
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movl $0x7d8, 0x90(%rax) # imm = 0x7D8
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rdi
addq $0x297, %rdi # imm = 0x297
leaq 0x26c0f(%rip), %rax # 0x5feb0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13210
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movb $0x0, 0x29c(%rax)
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rdi
addq $0x97, %rdi
leaq 0x26bed(%rip), %rax # 0x5fec0
movq 0x40(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x13210
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movb $0x0, 0x296(%rax)
jmp 0x392f2
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| mysql_free_result_start:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
cmp [rbp+var_10], 0
jz short loc_391EE
mov rax, [rbp+var_10]
cmp qword ptr [rax+78h], 0
jnz short loc_39203
loc_391EE:
mov rdi, [rbp+var_10]
call mysql_free_result
mov [rbp+var_4], 0
jmp loc_392F9
loc_39203:
mov rax, [rbp+var_10]
mov rax, [rax+78h]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
mov rax, [rbp+var_20]
mov byte ptr [rax+14h], 1
mov rdi, [rbp+var_20]
add rdi, 38h ; '8'
lea rsi, mysql_free_result_start_internal
lea rdx, [rbp+var_28]
call my_context_spawn
mov [rbp+var_14], eax
mov rax, [rbp+var_20]
mov byte ptr [rax+15h], 0
mov rax, [rbp+var_20]
mov byte ptr [rax+14h], 0
cmp [rbp+var_14], 0
jle short loc_39271
mov rax, [rbp+var_20]
mov byte ptr [rax+15h], 1
mov rax, [rbp+var_20]
mov eax, [rax]
mov [rbp+var_4], eax
jmp loc_392F9
loc_39271:
cmp [rbp+var_14], 0
jge short loc_392F2
jmp short $+2
loc_39279:
mov rax, [rbp+var_10]
mov rax, [rax+78h]
mov dword ptr [rax+90h], 7D8h
mov rax, [rbp+var_10]
mov rdi, [rax+78h]
add rdi, 297h
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_10]
mov rax, [rax+78h]
mov byte ptr [rax+29Ch], 0
mov rax, [rbp+var_10]
mov rdi, [rax+78h]
add rdi, 97h
lea rax, client_errors
mov rsi, [rax+40h]
mov edx, 1FFh
call _strncpy
mov rax, [rbp+var_10]
mov rax, [rax+78h]
mov byte ptr [rax+296h], 0
jmp short $+2
loc_392F2:
mov [rbp+var_4], 0
loc_392F9:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long mysql_free_result_start(_QWORD *a1)
{
_QWORD *v2; // [rsp+8h] [rbp-28h] BYREF
_BYTE *v3; // [rsp+10h] [rbp-20h]
int v4; // [rsp+1Ch] [rbp-14h]
_QWORD *v5; // [rsp+20h] [rbp-10h]
v5 = a1;
if ( a1 && v5[15] )
{
v3 = *(_BYTE **)(*(_QWORD *)(v5[15] + 1152LL) + 40LL);
v2 = v5;
v3[20] = 1;
v4 = my_context_spawn(v3 + 56, mysql_free_result_start_internal, &v2);
v3[21] = 0;
v3[20] = 0;
if ( v4 <= 0 )
{
if ( v4 < 0 )
{
*(_DWORD *)(v5[15] + 144LL) = 2008;
strncpy(v5[15] + 663LL, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(v5[15] + 668LL) = 0;
strncpy(v5[15] + 151LL, client_errors[8], 511LL);
*(_BYTE *)(v5[15] + 662LL) = 0;
}
return 0;
}
else
{
v3[21] = 1;
return *(unsigned int *)v3;
}
}
else
{
mysql_free_result(v5);
return 0;
}
}
| mysql_free_result_start:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
CMP qword ptr [RBP + -0x10],0x0
JZ 0x001391ee
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x78],0x0
JNZ 0x00139203
LAB_001391ee:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00116f60
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001392f9
LAB_00139203:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x78]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x14],0x1
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x38
LEA RSI,[0x139310]
LEA RDX,[RBP + -0x28]
CALL 0x0013f170
MOV dword ptr [RBP + -0x14],EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x15],0x0
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x14],0x0
CMP dword ptr [RBP + -0x14],0x0
JLE 0x00139271
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x15],0x1
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001392f9
LAB_00139271:
CMP dword ptr [RBP + -0x14],0x0
JGE 0x001392f2
JMP 0x00139279
LAB_00139279:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x78]
MOV dword ptr [RAX + 0x90],0x7d8
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x78]
ADD RDI,0x297
LEA RAX,[0x15feb0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x78]
MOV byte ptr [RAX + 0x29c],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x78]
ADD RDI,0x97
LEA RAX,[0x15fec0]
MOV RSI,qword ptr [RAX + 0x40]
MOV EDX,0x1ff
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x78]
MOV byte ptr [RAX + 0x296],0x0
JMP 0x001392f2
LAB_001392f2:
MOV dword ptr [RBP + -0x4],0x0
LAB_001392f9:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 mysql_free_result_start(long param_1)
{
long local_30;
int4 *local_28;
int local_1c;
long local_18;
int4 local_c;
local_18 = param_1;
if ((param_1 == 0) || (*(long *)(param_1 + 0x78) == 0)) {
mysql_free_result(param_1);
local_c = 0;
}
else {
local_28 = *(int4 **)(*(long *)(*(long *)(param_1 + 0x78) + 0x480) + 0x28);
*(int1 *)(local_28 + 5) = 1;
local_30 = param_1;
local_1c = my_context_spawn(local_28 + 0xe,mysql_free_result_start_internal,&local_30);
*(int1 *)((long)local_28 + 0x15) = 0;
*(int1 *)(local_28 + 5) = 0;
if (local_1c < 1) {
if (local_1c < 0) {
*(int4 *)(*(long *)(local_18 + 0x78) + 0x90) = 0x7d8;
strncpy((char *)(*(long *)(local_18 + 0x78) + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)(*(long *)(local_18 + 0x78) + 0x29c) = 0;
strncpy((char *)(*(long *)(local_18 + 0x78) + 0x97),PTR_s_Client_run_out_of_memory_0015ff00,
0x1ff);
*(int1 *)(*(long *)(local_18 + 0x78) + 0x296) = 0;
}
local_c = 0;
}
else {
*(int1 *)((long)local_28 + 0x15) = 1;
local_c = *local_28;
}
}
return local_c;
}
| |
23,135 | mi_get_status | eloqsql/storage/myisam/mi_locking.c | my_bool mi_get_status(void* param, my_bool concurrent_insert)
{
MI_INFO *info=(MI_INFO*) param;
DBUG_ENTER("mi_get_status");
DBUG_PRINT("info",("name: %s key_file: %lu data_file: %lu rows: %lu concurrent_insert: %d",
info->s->index_file_name,
(ulong) info->s->state.state.key_file_length,
(ulong) info->s->state.state.data_file_length,
(ulong) info->s->state.state.records,
concurrent_insert));
#ifndef DBUG_OFF
if (info->state->key_file_length > info->s->state.state.key_file_length ||
info->state->data_file_length > info->s->state.state.data_file_length)
DBUG_PRINT("warning",("old info: key_file: %ld data_file: %ld",
(long) info->state->key_file_length,
(long) info->state->data_file_length));
#endif
info->save_state=info->s->state.state;
info->state= &info->save_state;
info->append_insert_at_end= concurrent_insert;
if (concurrent_insert)
info->s->state.state.uncacheable= TRUE;
DBUG_RETURN(0);
} | O0 | c | mi_get_status:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0xb0b7c
movq -0x18(%rbp), %rdi
addq $0x10, %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
addq $0x18, %rsi
movl $0x38, %edx
callq 0x2a090
movq -0x18(%rbp), %rcx
addq $0x10, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movb -0x9(%rbp), %cl
movq -0x18(%rbp), %rax
movb %cl, 0x33a(%rax)
cmpb $0x0, -0x9(%rbp)
je 0xb0bc7
movq -0x18(%rbp), %rax
movq (%rax), %rax
movb $0x1, 0x4c(%rax)
jmp 0xb0bc9
jmp 0xb0bcb
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| mi_get_status:
push rbp
mov rbp, rsp
sub rsp, 20h
mov al, sil
mov [rbp+var_8], rdi
mov [rbp+var_9], al
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
jmp short $+2
loc_B0B7C:
mov rdi, [rbp+var_18]
add rdi, 10h
mov rax, [rbp+var_18]
mov rsi, [rax]
add rsi, 18h
mov edx, 38h ; '8'
call _memcpy
mov rcx, [rbp+var_18]
add rcx, 10h
mov rax, [rbp+var_18]
mov [rax+8], rcx
mov cl, [rbp+var_9]
mov rax, [rbp+var_18]
mov [rax+33Ah], cl
cmp [rbp+var_9], 0
jz short loc_B0BC7
mov rax, [rbp+var_18]
mov rax, [rax]
mov byte ptr [rax+4Ch], 1
loc_B0BC7:
jmp short $+2
loc_B0BC9:
jmp short $+2
loc_B0BCB:
xor eax, eax
add rsp, 20h
pop rbp
retn
| long long mi_get_status(long long a1, char a2)
{
memcpy(a1 + 16, *(_QWORD *)a1 + 24LL, 56LL);
*(_QWORD *)(a1 + 8) = a1 + 16;
*(_BYTE *)(a1 + 826) = a2;
if ( a2 )
*(_BYTE *)(*(_QWORD *)a1 + 76LL) = 1;
return 0LL;
}
| mi_get_status:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV AL,SIL
MOV qword ptr [RBP + -0x8],RDI
MOV byte ptr [RBP + -0x9],AL
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001b0b7c
LAB_001b0b7c:
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x10
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX]
ADD RSI,0x18
MOV EDX,0x38
CALL 0x0012a090
MOV RCX,qword ptr [RBP + -0x18]
ADD RCX,0x10
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x8],RCX
MOV CL,byte ptr [RBP + -0x9]
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x33a],CL
CMP byte ptr [RBP + -0x9],0x0
JZ 0x001b0bc7
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV byte ptr [RAX + 0x4c],0x1
LAB_001b0bc7:
JMP 0x001b0bc9
LAB_001b0bc9:
JMP 0x001b0bcb
LAB_001b0bcb:
XOR EAX,EAX
ADD RSP,0x20
POP RBP
RET
|
int8 mi_get_status(long *param_1,char param_2)
{
memcpy(param_1 + 2,(void *)(*param_1 + 0x18),0x38);
param_1[1] = (long)(param_1 + 2);
*(char *)((long)param_1 + 0x33a) = param_2;
if (param_2 != '\0') {
*(int1 *)(*param_1 + 0x4c) = 1;
}
return 0;
}
| |
23,136 | verify_call_proof | corpus-core[P]colibri-stateless/src/chains/eth/verifier/verify_call.c | bool verify_call_proof(verify_ctx_t* ctx) {
bytes32_t body_root = {0};
bytes32_t state_root = {0};
ssz_ob_t state_proof = ssz_get(&ctx->proof, "state_proof");
ssz_ob_t accounts = ssz_get(&ctx->proof, "accounts");
ssz_ob_t header = ssz_get(&state_proof, "header");
ssz_ob_t sync_committee_bits = ssz_get(&state_proof, "sync_committee_bits");
ssz_ob_t sync_committee_signature = ssz_get(&state_proof, "sync_committee_signature");
bytes_t call_result = NULL_BYTES;
call_code_t* call_codes = NULL;
bool match = false;
CHECK_JSON_VERIFY(ctx->args, "[{to:address,data:bytes,gas?:hexuint,value?:hexuint,gasPrice?:hexuint,from?:address},block]", "Invalid transaction");
if (eth_get_call_codes(ctx, &call_codes, accounts) != C4_SUCCESS) return false;
#ifdef EVMONE
c4_status_t call_status = eth_run_call_evmone(ctx, call_codes, accounts, json_at(ctx->args, 0), &call_result);
#else
c4_status_t call_status = c4_state_add_error(&ctx->state, "no EVM is enabled, build with -DEVMONE=1");
#endif
if (call_result.data && (ctx->data.def == NULL || ctx->data.def->type == SSZ_TYPE_NONE)) {
ctx->data = (ssz_ob_t) {.bytes = call_result, .def = eth_ssz_verification_type(ETH_SSZ_DATA_BYTES)};
ctx->flags |= VERIFY_FLAG_FREE_DATA;
match = true;
}
else {
match = call_result.data && bytes_eq(call_result, ctx->data.bytes);
safe_free(call_result.data);
}
eth_free_codes(call_codes);
if (call_status != C4_SUCCESS) return false;
if (!match) RETURN_VERIFY_ERROR(ctx, "Call result mismatch");
if (!verify_accounts(ctx, accounts, state_root)) RETURN_VERIFY_ERROR(ctx, "Failed to verify accounts");
if (!eth_verify_state_proof(ctx, state_proof, state_root)) false;
if (c4_verify_blockroot_signature(ctx, &header, &sync_committee_bits, &sync_committee_signature, 0) != C4_SUCCESS) return false;
ctx->success = true;
return ctx->success;
} | O0 | c | verify_call_proof:
pushq %rbp
movq %rsp, %rbp
subq $0x180, %rsp # imm = 0x180
movq %rdi, -0x10(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x23140
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x23140
movq -0x10(%rbp), %rsi
addq $0x20, %rsi
leaq -0x68(%rbp), %rdi
leaq 0xb094d(%rip), %rdx # 0xda6bf
callq 0xa05c0
movq -0x10(%rbp), %rsi
addq $0x20, %rsi
leaq -0x80(%rbp), %rdi
leaq 0xb1302(%rip), %rdx # 0xdb08c
callq 0xa05c0
leaq -0x98(%rbp), %rdi
leaq -0x68(%rbp), %rsi
leaq 0xb192f(%rip), %rdx # 0xdb6d0
callq 0xa05c0
leaq -0xb0(%rbp), %rdi
leaq -0x68(%rbp), %rsi
leaq 0xb0926(%rip), %rdx # 0xda6de
callq 0xa05c0
leaq -0xc8(%rbp), %rdi
leaq -0x68(%rbp), %rsi
leaq 0xb0923(%rip), %rdx # 0xda6f2
callq 0xa05c0
leaq -0xd8(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x23140
movq $0x0, -0xe0(%rbp)
movb $0x0, -0xe1(%rbp)
movq -0x10(%rbp), %rax
addq $0x8, %rax
leaq 0xb11ee(%rip), %rdi # 0xdaff6
leaq 0xb1243(%rip), %rsi # 0xdb052
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xa4bd0
movq %rax, -0xf0(%rbp)
cmpq $0x0, -0xf0(%rbp)
je 0x29e5e
movq -0xf0(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x78(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x68(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x2a14a
jmp 0x29e60
movq -0x10(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
leaq -0x80(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x32220
cmpl $0x0, %eax
je 0x29e9b
movb $0x0, -0x1(%rbp)
jmp 0x2a14a
movq -0x10(%rbp), %rax
movq %rax, -0x138(%rbp)
movq -0xe0(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0x10(%rbp), %rax
addq $0x8, %rax
leaq -0x110(%rbp), %rdi
xorl %ecx, %ecx
movl %ecx, %esi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xa44c0
movq -0x138(%rbp), %rdi
movq -0x130(%rbp), %rsi
leaq -0x80(%rbp), %rcx
leaq -0x110(%rbp), %rax
leaq -0xd8(%rbp), %rdx
movq (%rcx), %r8
movq %r8, (%rsp)
movq 0x8(%rcx), %r8
movq %r8, 0x8(%rsp)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rsp)
movq (%rax), %rcx
movq %rcx, 0x18(%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x20(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
callq 0x2a3b0
movl %eax, -0xf4(%rbp)
cmpq $0x0, -0xd0(%rbp)
je 0x29fe9
movq -0x10(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x29f6a
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
cmpl $0x8, 0x8(%rax)
jne 0x29fe9
movq -0x10(%rbp), %rax
movq %rax, -0x140(%rbp)
movq -0xd8(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0x120(%rbp)
movl $0x12, %edi
callq 0x254a0
movq %rax, %rcx
movq -0x140(%rbp), %rax
movq %rcx, -0x118(%rbp)
movq -0x128(%rbp), %rcx
movq %rcx, 0x38(%rax)
movq -0x120(%rbp), %rcx
movq %rcx, 0x40(%rax)
movq -0x118(%rbp), %rcx
movq %rcx, 0x48(%rax)
movq -0x10(%rbp), %rax
movl 0x84(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0x84(%rax)
movb $0x1, -0xe1(%rbp)
jmp 0x2a038
xorl %eax, %eax
cmpq $0x0, -0xd0(%rbp)
movb %al, -0x141(%rbp)
je 0x2a01e
movq -0x10(%rbp), %rax
movl -0xd8(%rbp), %edi
movq -0xd0(%rbp), %rsi
movl 0x38(%rax), %edx
movq 0x40(%rax), %rcx
callq 0x9deb0
movb %al, -0x141(%rbp)
movb -0x141(%rbp), %al
andb $0x1, %al
movb %al, -0xe1(%rbp)
movq -0xd0(%rbp), %rdi
callq 0x9c5a0
movq -0xe0(%rbp), %rdi
callq 0x32900
cmpl $0x0, -0xf4(%rbp)
je 0x2a056
movb $0x0, -0x1(%rbp)
jmp 0x2a14a
testb $0x1, -0xe1(%rbp)
jne 0x2a086
jmp 0x2a061
movq -0x10(%rbp), %rdi
addq $0x70, %rdi
leaq 0xb0ff6(%rip), %rsi # 0xdb066
callq 0xa6370
movq -0x10(%rbp), %rax
movb $0x0, 0x68(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x2a14a
movq -0x10(%rbp), %rdi
leaq -0x50(%rbp), %rsi
leaq -0x80(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x2a160
testb $0x1, %al
jne 0x2a0d8
jmp 0x2a0b6
movq -0x10(%rbp), %rdi
addq $0x70, %rdi
leaq 0xb0fb6(%rip), %rsi # 0xdb07b
callq 0xa6370
movq -0x10(%rbp), %rax
movb $0x0, 0x68(%rax)
movb $0x0, -0x1(%rbp)
jmp 0x2a14a
movq -0x10(%rbp), %rdi
leaq -0x50(%rbp), %rsi
leaq -0x68(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x329c0
testb $0x1, %al
jne 0x2a108
jmp 0x2a108
movq -0x10(%rbp), %rdi
leaq -0x98(%rbp), %rsi
leaq -0xb0(%rbp), %rdx
leaq -0xc8(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0x2e870
cmpl $0x0, %eax
je 0x2a136
movb $0x0, -0x1(%rbp)
jmp 0x2a14a
movq -0x10(%rbp), %rax
movb $0x1, 0x68(%rax)
movq -0x10(%rbp), %rax
movb 0x68(%rax), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x180, %rsp # imm = 0x180
popq %rbp
retq
nopl (%rax,%rax)
| verify_call_proof:
push rbp
mov rbp, rsp
sub rsp, 180h
mov [rbp+var_10], rdi
lea rdi, [rbp+var_30]
xor esi, esi
mov edx, 20h ; ' '
call _memset
lea rdi, [rbp+var_50]
xor esi, esi
mov edx, 20h ; ' '
call _memset
mov rsi, [rbp+var_10]
add rsi, 20h ; ' '
lea rdi, [rbp+var_68]
lea rdx, aStateProof; "state_proof"
call ssz_get
mov rsi, [rbp+var_10]
add rsi, 20h ; ' '
lea rdi, [rbp+var_80]
lea rdx, aFailedToVerify+11h; "accounts"
call ssz_get
lea rdi, [rbp+var_98]
lea rsi, [rbp+var_68]
lea rdx, aInvalidRespons+15h; "header"
call ssz_get
lea rdi, [rbp+var_B0]
lea rsi, [rbp+var_68]
lea rdx, aSyncCommitteeB; "sync_committee_bits"
call ssz_get
lea rdi, [rbp+var_C8]
lea rsi, [rbp+var_68]
lea rdx, aSyncCommitteeS; "sync_committee_signature"
call ssz_get
lea rdi, [rbp+var_D8]
xor esi, esi
mov edx, 10h
call _memset
mov [rbp+var_E0], 0
mov [rbp+var_E1], 0
mov rax, [rbp+var_10]
add rax, 8
lea rdi, aToAddressDataB; "[{to:address,data:bytes,gas?:hexuint,va"...
lea rsi, aInvalidTransac; "Invalid transaction"
mov rcx, [rax]
mov [rsp+180h+var_180], rcx
mov rcx, [rax+8]
mov [rsp+180h+var_178], rcx
mov rax, [rax+10h]
mov [rsp+180h+var_170], rax
call json_validate
mov [rbp+var_F0], rax
cmp [rbp+var_F0], 0
jz short loc_29E5E
mov rcx, [rbp+var_F0]
mov rax, [rbp+var_10]
mov [rax+78h], rcx
mov rax, [rbp+var_10]
mov byte ptr [rax+68h], 0
mov [rbp+var_1], 0
jmp loc_2A14A
loc_29E5E:
jmp short $+2
loc_29E60:
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_E0]
lea rax, [rbp+var_80]
mov rcx, [rax]
mov [rsp+180h+var_180], rcx
mov rcx, [rax+8]
mov [rsp+180h+var_178], rcx
mov rax, [rax+10h]
mov [rsp+180h+var_170], rax
call eth_get_call_codes
cmp eax, 0
jz short loc_29E9B
mov [rbp+var_1], 0
jmp loc_2A14A
loc_29E9B:
mov rax, [rbp+var_10]
mov [rbp+var_138], rax
mov rax, [rbp+var_E0]
mov [rbp+var_130], rax
mov rax, [rbp+var_10]
add rax, 8
lea rdi, [rbp+var_110]
xor ecx, ecx
mov esi, ecx
mov rcx, [rax]
mov [rsp+180h+var_180], rcx
mov rcx, [rax+8]
mov [rsp+180h+var_178], rcx
mov rax, [rax+10h]
mov [rsp+180h+var_170], rax
call json_at
mov rdi, [rbp+var_138]
mov rsi, [rbp+var_130]
lea rcx, [rbp+var_80]
lea rax, [rbp+var_110]
lea rdx, [rbp+var_D8]
mov r8, [rcx]
mov [rsp+180h+var_180], r8
mov r8, [rcx+8]
mov [rsp+180h+var_178], r8
mov rcx, [rcx+10h]
mov [rsp+180h+var_170], rcx
mov rcx, [rax]
mov [rsp+180h+var_168], rcx
mov rcx, [rax+8]
mov [rsp+180h+var_160], rcx
mov rax, [rax+10h]
mov [rsp+180h+var_158], rax
call eth_run_call_evmone
mov [rbp+var_F4], eax
cmp [rbp+var_D0], 0
jz loc_29FE9
mov rax, [rbp+var_10]
cmp qword ptr [rax+48h], 0
jz short loc_29F6A
mov rax, [rbp+var_10]
mov rax, [rax+48h]
cmp dword ptr [rax+8], 8
jnz short loc_29FE9
loc_29F6A:
mov rax, [rbp+var_10]
mov [rbp+var_140], rax
mov rax, [rbp+var_D8]
mov [rbp+var_128], rax
mov rax, [rbp+var_D0]
mov [rbp+var_120], rax
mov edi, 12h
call eth_ssz_verification_type
mov rcx, rax
mov rax, [rbp+var_140]
mov [rbp+var_118], rcx
mov rcx, [rbp+var_128]
mov [rax+38h], rcx
mov rcx, [rbp+var_120]
mov [rax+40h], rcx
mov rcx, [rbp+var_118]
mov [rax+48h], rcx
mov rax, [rbp+var_10]
mov ecx, [rax+84h]
or ecx, 1
mov [rax+84h], ecx
mov [rbp+var_E1], 1
jmp short loc_2A038
loc_29FE9:
xor eax, eax
cmp [rbp+var_D0], 0
mov [rbp+var_141], al
jz short loc_2A01E
mov rax, [rbp+var_10]
mov edi, dword ptr [rbp+var_D8]
mov rsi, [rbp+var_D0]
mov edx, [rax+38h]
mov rcx, [rax+40h]
call bytes_eq
mov [rbp+var_141], al
loc_2A01E:
mov al, [rbp+var_141]
and al, 1
mov [rbp+var_E1], al
mov rdi, [rbp+var_D0]
call safe_free
loc_2A038:
mov rdi, [rbp+var_E0]
call eth_free_codes
cmp [rbp+var_F4], 0
jz short loc_2A056
mov [rbp+var_1], 0
jmp loc_2A14A
loc_2A056:
test [rbp+var_E1], 1
jnz short loc_2A086
jmp short $+2
loc_2A061:
mov rdi, [rbp+var_10]
add rdi, 70h ; 'p'
lea rsi, aCallResultMism; "Call result mismatch"
call c4_state_add_error
mov rax, [rbp+var_10]
mov byte ptr [rax+68h], 0
mov [rbp+var_1], 0
jmp loc_2A14A
loc_2A086:
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_50]
lea rax, [rbp+var_80]
mov rcx, [rax]
mov [rsp+180h+var_180], rcx
mov rcx, [rax+8]
mov [rsp+180h+var_178], rcx
mov rax, [rax+10h]
mov [rsp+180h+var_170], rax
call verify_accounts
test al, 1
jnz short loc_2A0D8
jmp short $+2
loc_2A0B6:
mov rdi, [rbp+var_10]
add rdi, 70h ; 'p'
lea rsi, aFailedToVerify; "Failed to verify accounts"
call c4_state_add_error
mov rax, [rbp+var_10]
mov byte ptr [rax+68h], 0
mov [rbp+var_1], 0
jmp short loc_2A14A
loc_2A0D8:
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_50]
lea rax, [rbp+var_68]
mov rcx, [rax]
mov [rsp+180h+var_180], rcx
mov rcx, [rax+8]
mov [rsp+180h+var_178], rcx
mov rax, [rax+10h]
mov [rsp+180h+var_170], rax
call eth_verify_state_proof
test al, 1
jnz short loc_2A108
jmp short $+2
loc_2A108:
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_98]
lea rdx, [rbp+var_B0]
lea rcx, [rbp+var_C8]
xor eax, eax
mov r8d, eax
call c4_verify_blockroot_signature
cmp eax, 0
jz short loc_2A136
mov [rbp+var_1], 0
jmp short loc_2A14A
loc_2A136:
mov rax, [rbp+var_10]
mov byte ptr [rax+68h], 1
mov rax, [rbp+var_10]
mov al, [rax+68h]
and al, 1
mov [rbp+var_1], al
loc_2A14A:
mov al, [rbp+var_1]
and al, 1
add rsp, 180h
pop rbp
retn
| char verify_call_proof(long long a1)
{
int v1; // edx
int v2; // r8d
int v3; // r9d
int v4; // edx
int v5; // r8d
int v6; // r9d
int v7; // edx
int v8; // r8d
int v9; // r9d
int v10; // r9d
int v11; // edx
int v12; // r8d
int v13; // r9d
int v14; // edx
int v15; // r8d
int v16; // r9d
char v18; // [rsp+3Fh] [rbp-141h]
_QWORD *v19; // [rsp+40h] [rbp-140h]
int v20; // [rsp+48h] [rbp-138h]
int v21; // [rsp+50h] [rbp-130h]
long long v22; // [rsp+58h] [rbp-128h]
long long v23; // [rsp+60h] [rbp-120h]
char **v24; // [rsp+68h] [rbp-118h]
long long v25; // [rsp+70h] [rbp-110h] BYREF
long long v26; // [rsp+78h] [rbp-108h]
long long v27; // [rsp+80h] [rbp-100h]
int v28; // [rsp+8Ch] [rbp-F4h]
long long v29; // [rsp+90h] [rbp-F0h]
char v30; // [rsp+9Fh] [rbp-E1h]
long long v31; // [rsp+A0h] [rbp-E0h] BYREF
long long v32; // [rsp+A8h] [rbp-D8h] BYREF
long long v33; // [rsp+B0h] [rbp-D0h]
_BYTE v34[24]; // [rsp+B8h] [rbp-C8h] BYREF
_BYTE v35[24]; // [rsp+D0h] [rbp-B0h] BYREF
_BYTE v36[24]; // [rsp+E8h] [rbp-98h] BYREF
long long v37; // [rsp+100h] [rbp-80h] BYREF
long long v38; // [rsp+108h] [rbp-78h]
long long v39; // [rsp+110h] [rbp-70h]
long long v40; // [rsp+118h] [rbp-68h] BYREF
long long v41; // [rsp+120h] [rbp-60h]
long long v42; // [rsp+128h] [rbp-58h]
_BYTE v43[32]; // [rsp+130h] [rbp-50h] BYREF
_BYTE v44[32]; // [rsp+150h] [rbp-30h] BYREF
long long v45; // [rsp+170h] [rbp-10h]
v45 = a1;
memset(v44, 0LL, sizeof(v44));
memset(v43, 0LL, sizeof(v43));
ssz_get(&v40, v45 + 32, "state_proof");
ssz_get(&v37, v45 + 32, "accounts");
ssz_get(v36, &v40, "header");
ssz_get(v35, &v40, "sync_committee_bits");
ssz_get(v34, &v40, "sync_committee_signature");
memset(&v32, 0LL, 16LL);
v31 = 0LL;
v30 = 0;
v29 = json_validate(
(unsigned int)"[{to:address,data:bytes,gas?:hexuint,value?:hexuint,gasPrice?:hexuint,from?:address},block]",
(unsigned int)"Invalid transaction",
v1,
*(_QWORD *)(v45 + 16),
v2,
v3,
*(_QWORD *)(v45 + 8),
*(_QWORD *)(v45 + 16),
*(_QWORD *)(v45 + 24));
if ( v29 )
{
*(_QWORD *)(v45 + 120) = v29;
*(_BYTE *)(v45 + 104) = 0;
return 0;
}
else if ( (unsigned int)eth_get_call_codes(v45, (unsigned int)&v31, v4, v38, v5, v6, v37, v38, v39) )
{
return 0;
}
else
{
v20 = v45;
v21 = v31;
json_at(
(unsigned int)&v25,
0,
v7,
*(_QWORD *)(v45 + 16),
v8,
v9,
*(_QWORD *)(v45 + 8),
*(_QWORD *)(v45 + 16),
*(_QWORD *)(v45 + 24));
v28 = eth_run_call_evmone(v20, v21, (unsigned int)&v32, v26, v38, v10, v37, v38, v39, v25, v26, v27);
if ( v33 && (!*(_QWORD *)(v45 + 72) || *(_DWORD *)(*(_QWORD *)(v45 + 72) + 8LL) == 8) )
{
v19 = (_QWORD *)v45;
v22 = v32;
v23 = v33;
v24 = eth_ssz_verification_type(18);
v19[7] = v22;
v19[8] = v23;
v19[9] = v24;
*(_DWORD *)(v45 + 132) |= 1u;
v30 = 1;
}
else
{
v18 = 0;
if ( v33 )
v18 = bytes_eq((unsigned int)v32, v33, *(unsigned int *)(v45 + 56), *(_QWORD *)(v45 + 64));
v30 = v18 & 1;
safe_free(v33);
}
eth_free_codes(v31);
if ( v28 )
{
return 0;
}
else if ( (v30 & 1) != 0 )
{
if ( (verify_accounts(v45, (unsigned int)v43, v11, v38, v12, v13, v37, v38, v39) & 1) != 0 )
{
eth_verify_state_proof(v45, (unsigned int)v43, v14, v41, v15, v16, v40, v41, v42);
if ( (unsigned int)c4_verify_blockroot_signature(v45, v36, v35, v34, 0LL) )
{
return 0;
}
else
{
*(_BYTE *)(v45 + 104) = 1;
return *(_BYTE *)(v45 + 104) & 1;
}
}
else
{
c4_state_add_error(v45 + 112, "Failed to verify accounts");
*(_BYTE *)(v45 + 104) = 0;
return 0;
}
}
else
{
c4_state_add_error(v45 + 112, "Call result mismatch");
*(_BYTE *)(v45 + 104) = 0;
return 0;
}
}
}
| verify_call_proof:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x180
MOV qword ptr [RBP + -0x10],RDI
LEA RDI,[RBP + -0x30]
XOR ESI,ESI
MOV EDX,0x20
CALL 0x00123140
LEA RDI,[RBP + -0x50]
XOR ESI,ESI
MOV EDX,0x20
CALL 0x00123140
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x20
LEA RDI,[RBP + -0x68]
LEA RDX,[0x1da6bf]
CALL 0x001a05c0
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x20
LEA RDI,[RBP + -0x80]
LEA RDX,[0x1db08c]
CALL 0x001a05c0
LEA RDI,[RBP + -0x98]
LEA RSI,[RBP + -0x68]
LEA RDX,[0x1db6d0]
CALL 0x001a05c0
LEA RDI,[RBP + -0xb0]
LEA RSI,[RBP + -0x68]
LEA RDX,[0x1da6de]
CALL 0x001a05c0
LEA RDI,[RBP + -0xc8]
LEA RSI,[RBP + -0x68]
LEA RDX,[0x1da6f2]
CALL 0x001a05c0
LEA RDI,[RBP + -0xd8]
XOR ESI,ESI
MOV EDX,0x10
CALL 0x00123140
MOV qword ptr [RBP + -0xe0],0x0
MOV byte ptr [RBP + -0xe1],0x0
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x8
LEA RDI,[0x1daff6]
LEA RSI,[0x1db052]
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 0x001a4bd0
MOV qword ptr [RBP + -0xf0],RAX
CMP qword ptr [RBP + -0xf0],0x0
JZ 0x00129e5e
MOV RCX,qword ptr [RBP + -0xf0]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x78],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x68],0x0
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0012a14a
LAB_00129e5e:
JMP 0x00129e60
LAB_00129e60:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0xe0]
LEA RAX,[RBP + -0x80]
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 0x00132220
CMP EAX,0x0
JZ 0x00129e9b
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0012a14a
LAB_00129e9b:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x138],RAX
MOV RAX,qword ptr [RBP + -0xe0]
MOV qword ptr [RBP + -0x130],RAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x8
LEA RDI,[RBP + -0x110]
XOR ECX,ECX
MOV ESI,ECX
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 0x001a44c0
MOV RDI,qword ptr [RBP + -0x138]
MOV RSI,qword ptr [RBP + -0x130]
LEA RCX,[RBP + -0x80]
LEA RAX,[RBP + -0x110]
LEA RDX,[RBP + -0xd8]
MOV R8,qword ptr [RCX]
MOV qword ptr [RSP],R8
MOV R8,qword ptr [RCX + 0x8]
MOV qword ptr [RSP + 0x8],R8
MOV RCX,qword ptr [RCX + 0x10]
MOV qword ptr [RSP + 0x10],RCX
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP + 0x18],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x20],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x28],RAX
CALL 0x0012a3b0
MOV dword ptr [RBP + -0xf4],EAX
CMP qword ptr [RBP + -0xd0],0x0
JZ 0x00129fe9
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x48],0x0
JZ 0x00129f6a
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x48]
CMP dword ptr [RAX + 0x8],0x8
JNZ 0x00129fe9
LAB_00129f6a:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x140],RAX
MOV RAX,qword ptr [RBP + -0xd8]
MOV qword ptr [RBP + -0x128],RAX
MOV RAX,qword ptr [RBP + -0xd0]
MOV qword ptr [RBP + -0x120],RAX
MOV EDI,0x12
CALL 0x001254a0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x140]
MOV qword ptr [RBP + -0x118],RCX
MOV RCX,qword ptr [RBP + -0x128]
MOV qword ptr [RAX + 0x38],RCX
MOV RCX,qword ptr [RBP + -0x120]
MOV qword ptr [RAX + 0x40],RCX
MOV RCX,qword ptr [RBP + -0x118]
MOV qword ptr [RAX + 0x48],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x84]
OR ECX,0x1
MOV dword ptr [RAX + 0x84],ECX
MOV byte ptr [RBP + -0xe1],0x1
JMP 0x0012a038
LAB_00129fe9:
XOR EAX,EAX
CMP qword ptr [RBP + -0xd0],0x0
MOV byte ptr [RBP + -0x141],AL
JZ 0x0012a01e
MOV RAX,qword ptr [RBP + -0x10]
MOV EDI,dword ptr [RBP + -0xd8]
MOV RSI,qword ptr [RBP + -0xd0]
MOV EDX,dword ptr [RAX + 0x38]
MOV RCX,qword ptr [RAX + 0x40]
CALL 0x0019deb0
MOV byte ptr [RBP + -0x141],AL
LAB_0012a01e:
MOV AL,byte ptr [RBP + -0x141]
AND AL,0x1
MOV byte ptr [RBP + -0xe1],AL
MOV RDI,qword ptr [RBP + -0xd0]
CALL 0x0019c5a0
LAB_0012a038:
MOV RDI,qword ptr [RBP + -0xe0]
CALL 0x00132900
CMP dword ptr [RBP + -0xf4],0x0
JZ 0x0012a056
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0012a14a
LAB_0012a056:
TEST byte ptr [RBP + -0xe1],0x1
JNZ 0x0012a086
JMP 0x0012a061
LAB_0012a061:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x70
LEA RSI,[0x1db066]
CALL 0x001a6370
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x68],0x0
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0012a14a
LAB_0012a086:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0x50]
LEA RAX,[RBP + -0x80]
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 0x0012a160
TEST AL,0x1
JNZ 0x0012a0d8
JMP 0x0012a0b6
LAB_0012a0b6:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x70
LEA RSI,[0x1db07b]
CALL 0x001a6370
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x68],0x0
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0012a14a
LAB_0012a0d8:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0x50]
LEA RAX,[RBP + -0x68]
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 0x001329c0
TEST AL,0x1
JNZ 0x0012a108
JMP 0x0012a108
LAB_0012a108:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0x98]
LEA RDX,[RBP + -0xb0]
LEA RCX,[RBP + -0xc8]
XOR EAX,EAX
MOV R8D,EAX
CALL 0x0012e870
CMP EAX,0x0
JZ 0x0012a136
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0012a14a
LAB_0012a136:
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x68],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV AL,byte ptr [RAX + 0x68]
AND AL,0x1
MOV byte ptr [RBP + -0x1],AL
LAB_0012a14a:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x180
POP RBP
RET
|
byte verify_call_proof(long param_1)
{
long lVar1;
int iVar2;
int8 uVar3;
ulong uVar4;
int8 in_R9;
byte local_149;
int1 local_118 [28];
int local_fc;
long local_f8;
byte local_e9;
int8 local_e8;
int4 local_e0;
int4 uStack_dc;
long local_d8;
int1 local_d0 [24];
int1 local_b8 [24];
int1 local_a0 [24];
int1 local_88 [24];
int8 local_70;
int8 local_68;
int8 local_60;
int1 local_58 [32];
int1 local_38 [32];
long local_18;
byte local_9;
local_18 = param_1;
memset(local_38,0,0x20);
memset(local_58,0,0x20);
ssz_get(&local_70,local_18 + 0x20,"state_proof");
ssz_get(local_88,local_18 + 0x20,"accounts");
ssz_get(local_a0,&local_70,"header");
ssz_get(local_b8,&local_70,"sync_committee_bits");
ssz_get(local_d0,&local_70,"sync_committee_signature");
memset(&local_e0,0,0x10);
local_e8 = 0;
local_e9 = 0;
local_f8 = json_validate("[{to:address,data:bytes,gas?:hexuint,value?:hexuint,gasPrice?:hexuint,from?:address},block]"
,"Invalid transaction");
if (local_f8 == 0) {
iVar2 = eth_get_call_codes(local_18,&local_e8);
lVar1 = local_18;
uVar3 = local_e8;
if (iVar2 == 0) {
json_at(local_118,0);
local_fc = eth_run_call_evmone(lVar1,uVar3,&local_e0);
lVar1 = local_18;
if ((local_d8 == 0) ||
((*(long *)(local_18 + 0x48) != 0 && (*(int *)(*(long *)(local_18 + 0x48) + 8) != 8)))) {
local_149 = 0;
if (local_d8 != 0) {
local_149 = bytes_eq(local_e0,local_d8,*(int4 *)(local_18 + 0x38),
*(int8 *)(local_18 + 0x40));
}
local_e9 = local_149 & 1;
safe_free(local_d8);
}
else {
uVar3 = eth_ssz_verification_type(0x12);
*(ulong *)(lVar1 + 0x38) = CONCAT44(uStack_dc,local_e0);
*(long *)(lVar1 + 0x40) = local_d8;
*(int8 *)(lVar1 + 0x48) = uVar3;
*(uint *)(local_18 + 0x84) = *(uint *)(local_18 + 0x84) | 1;
local_e9 = 1;
}
eth_free_codes(local_e8);
if (local_fc == 0) {
if ((local_e9 & 1) == 0) {
c4_state_add_error(local_18 + 0x70,"Call result mismatch");
*(int1 *)(local_18 + 0x68) = 0;
local_9 = 0;
}
else {
uVar4 = verify_accounts(local_18,local_58);
if ((uVar4 & 1) == 0) {
c4_state_add_error(local_18 + 0x70,"Failed to verify accounts");
*(int1 *)(local_18 + 0x68) = 0;
local_9 = 0;
}
else {
eth_verify_state_proof(local_18,local_58);
iVar2 = c4_verify_blockroot_signature
(local_18,local_a0,local_b8,local_d0,0,in_R9,local_70,local_68,
local_60);
if (iVar2 == 0) {
*(int1 *)(local_18 + 0x68) = 1;
local_9 = *(byte *)(local_18 + 0x68) & 1;
}
else {
local_9 = 0;
}
}
}
}
else {
local_9 = 0;
}
}
else {
local_9 = 0;
}
}
else {
*(long *)(local_18 + 0x78) = local_f8;
*(int1 *)(local_18 + 0x68) = 0;
local_9 = 0;
}
return local_9;
}
| |
23,137 | verify_call_proof | corpus-core[P]colibri-stateless/src/chains/eth/verifier/verify_call.c | bool verify_call_proof(verify_ctx_t* ctx) {
bytes32_t body_root = {0};
bytes32_t state_root = {0};
ssz_ob_t state_proof = ssz_get(&ctx->proof, "state_proof");
ssz_ob_t accounts = ssz_get(&ctx->proof, "accounts");
ssz_ob_t header = ssz_get(&state_proof, "header");
ssz_ob_t sync_committee_bits = ssz_get(&state_proof, "sync_committee_bits");
ssz_ob_t sync_committee_signature = ssz_get(&state_proof, "sync_committee_signature");
bytes_t call_result = NULL_BYTES;
call_code_t* call_codes = NULL;
bool match = false;
CHECK_JSON_VERIFY(ctx->args, "[{to:address,data:bytes,gas?:hexuint,value?:hexuint,gasPrice?:hexuint,from?:address},block]", "Invalid transaction");
if (eth_get_call_codes(ctx, &call_codes, accounts) != C4_SUCCESS) return false;
#ifdef EVMONE
c4_status_t call_status = eth_run_call_evmone(ctx, call_codes, accounts, json_at(ctx->args, 0), &call_result);
#else
c4_status_t call_status = c4_state_add_error(&ctx->state, "no EVM is enabled, build with -DEVMONE=1");
#endif
if (call_result.data && (ctx->data.def == NULL || ctx->data.def->type == SSZ_TYPE_NONE)) {
ctx->data = (ssz_ob_t) {.bytes = call_result, .def = eth_ssz_verification_type(ETH_SSZ_DATA_BYTES)};
ctx->flags |= VERIFY_FLAG_FREE_DATA;
match = true;
}
else {
match = call_result.data && bytes_eq(call_result, ctx->data.bytes);
safe_free(call_result.data);
}
eth_free_codes(call_codes);
if (call_status != C4_SUCCESS) return false;
if (!match) RETURN_VERIFY_ERROR(ctx, "Call result mismatch");
if (!verify_accounts(ctx, accounts, state_root)) RETURN_VERIFY_ERROR(ctx, "Failed to verify accounts");
if (!eth_verify_state_proof(ctx, state_proof, state_root)) false;
if (c4_verify_blockroot_signature(ctx, &header, &sync_committee_bits, &sync_committee_signature, 0) != C4_SUCCESS) return false;
ctx->success = true;
return ctx->success;
} | O2 | c | verify_call_proof:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp # imm = 0x1C8
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x80(%rsp)
movaps %xmm0, 0x70(%rsp)
leaq 0x20(%rdi), %r15
leaq 0x4cc74(%rip), %rdx # 0x73773
leaq 0xf8(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x4c201
leaq 0x4d64f(%rip), %rdx # 0x74168
leaq 0x48(%rsp), %rdi
movq %r15, %rsi
callq 0x4c201
leaq 0x4da61(%rip), %rdx # 0x7458e
leaq 0x180(%rsp), %rdi
movq %r14, %rsi
callq 0x4c201
leaq 0x4cc4e(%rip), %rdx # 0x73792
leaq 0x168(%rsp), %rdi
movq %r14, %rsi
callq 0x4c201
leaq 0x4cc4b(%rip), %rdx # 0x737a6
leaq 0x150(%rsp), %rdi
movq %r14, %rsi
callq 0x4c201
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
andq $0x0, 0x40(%rsp)
movq 0x18(%rbx), %rax
movq %rax, 0x10(%rsp)
movups 0x8(%rbx), %xmm0
movups %xmm0, (%rsp)
leaq 0x4d541(%rip), %rdi # 0x740d2
leaq 0x4d596(%rip), %rsi # 0x7412e
callq 0x4eb30
testq %rax, %rax
je 0x26bb3
movq %rax, 0x78(%rbx)
xorl %eax, %eax
xorl %r14d, %r14d
movb %al, 0x68(%rbx)
jmp 0x26cc9
movq 0x58(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x48(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x40(%rsp), %rsi
movq %rbx, %rdi
callq 0x2b816
testl %eax, %eax
jne 0x26cc6
leaq 0x8(%rbx), %rax
movq 0x40(%rsp), %r15
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movups (%rax), %xmm0
movups %xmm0, (%rsp)
xorl %r14d, %r14d
leaq 0x198(%rsp), %r12
movq %r12, %rdi
xorl %esi, %esi
callq 0x4e72e
movq 0x10(%r12), %rax
movq %rax, 0x28(%rsp)
movups (%r12), %xmm0
movups %xmm0, 0x18(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x48(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x60(%rsp), %r12
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x26f34
movl %eax, %ebp
movq 0x8(%r12), %rsi
testq %rsi, %rsi
je 0x26c93
movq 0x48(%rbx), %rax
testq %rax, %rax
je 0x26c5e
cmpl $0x8, 0x8(%rax)
jne 0x26c98
leaq 0x38(%rbx), %r14
movaps 0x60(%rsp), %xmm0
movaps %xmm0, 0xe0(%rsp)
pushq $0x12
popq %rdi
callq 0x23d84
movaps 0xe0(%rsp), %xmm0
movups %xmm0, (%r14)
movq %rax, 0x48(%rbx)
orb $0x1, 0x84(%rbx)
movb $0x1, %r15b
jmp 0x26cb8
xorl %r15d, %r15d
jmp 0x26cb0
movl 0x60(%rsp), %edi
movl 0x38(%rbx), %edx
movq 0x40(%rbx), %rcx
callq 0x4ac78
movl %eax, %r15d
movq 0x68(%rsp), %r14
movq %r14, %rdi
callq 0x4a0e0
movq 0x40(%rsp), %rdi
callq 0x2bc7c
testl %ebp, %ebp
je 0x26cde
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x1c8, %rsp # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testb %r15b, %r15b
je 0x26e70
movq 0x58(%rsp), %rax
movq %rax, 0xa0(%rsp)
movups 0x48(%rsp), %xmm0
movaps %xmm0, 0x90(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x48(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x4b70e
movl %eax, 0x3c(%rsp)
xorps %xmm0, %xmm0
leaq 0xc0(%rsp), %rax
movaps %xmm0, 0x10(%rax)
movaps %xmm0, (%rax)
leaq 0x130(%rsp), %rax
movaps %xmm0, 0x10(%rax)
movaps %xmm0, (%rax)
xorl %r12d, %r12d
leaq 0x1b0(%rsp), %r13
pushq $0x20
popq %r15
leaq 0x70(%rsp), %r14
cmpl %r12d, 0x3c(%rsp)
je 0x26ed3
movq 0xa0(%rsp), %rax
movq %rax, 0x10(%rsp)
movaps 0x90(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r13, %rdi
movl %r12d, %esi
callq 0x4b599
movq %rbx, %rdi
movq %r13, %rsi
leaq 0xc0(%rsp), %rdx
pushq $0x4
popq %rcx
movl %r15d, %r8d
leaq 0x130(%rsp), %r9
callq 0x2b214
testb %al, %al
je 0x26e7d
leaq 0xa8(%rsp), %rdi
movq %r13, %rsi
leaq 0x4ca6a(%rip), %rdx # 0x73826
callq 0x4c201
movq 0xb8(%rsp), %rax
cmpl $0x4, 0x8(%rax)
jne 0x26e1e
movl %r12d, %ebp
xorps %xmm0, %xmm0
movaps %xmm0, 0x120(%rsp)
movaps %xmm0, 0x110(%rsp)
movl 0xa8(%rsp), %edi
movq 0xb0(%rsp), %rsi
leaq 0x110(%rsp), %r12
movq %r12, %rdx
callq 0x4dcd0
leaq 0x130(%rsp), %rdi
movq %r12, %rsi
pushq $0x20
popq %rdx
callq 0x22230
testl %eax, %eax
jne 0x26e8a
movl %ebp, %r12d
movl %r15d, %edi
movq %r14, %rbp
movq %r14, %rsi
xorl %edx, %edx
callq 0x4a2f6
testb %al, %al
je 0x26e51
movaps 0xc0(%rsp), %xmm0
movaps 0xd0(%rsp), %xmm1
movaps %xmm1, 0x80(%rsp)
movaps %xmm0, 0x70(%rsp)
jmp 0x26e68
movq %rbp, %rdi
leaq 0xc0(%rsp), %rsi
pushq $0x20
popq %rdx
callq 0x22230
testl %eax, %eax
jne 0x26ea3
incl %r12d
jmp 0x26d52
leaq 0x70(%rbx), %rdi
leaq 0x4d2c7(%rip), %rsi # 0x74142
jmp 0x26ec9
leaq 0x70(%rbx), %rdi
leaq 0x4d2e9(%rip), %rsi # 0x74171
jmp 0x26eae
leaq 0x70(%rbx), %rdi
leaq 0x4d2fb(%rip), %rsi # 0x74190
callq 0x4f75d
movb $0x0, 0x68(%rbx)
movl %ebp, %r12d
jmp 0x26eb7
leaq 0x70(%rbx), %rdi
leaq 0x4d2f5(%rip), %rsi # 0x741a3
callq 0x4f75d
movb $0x0, 0x68(%rbx)
cmpl 0x3c(%rsp), %r12d
jae 0x26ed3
leaq 0x70(%rbx), %rdi
leaq 0x4d28e(%rip), %rsi # 0x74157
callq 0x4f75d
jmp 0x26ba6
movq 0x108(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0xf8(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x70(%rsp), %rsi
movq %rbx, %rdi
callq 0x2bce7
xorl %r14d, %r14d
leaq 0x180(%rsp), %rsi
leaq 0x168(%rsp), %rdx
leaq 0x150(%rsp), %rcx
movq %rbx, %rdi
xorl %r8d, %r8d
callq 0x293cc
testl %eax, %eax
jne 0x26cc9
movb $0x1, %al
movb $0x1, %r14b
jmp 0x26bab
nopl (%rax)
| verify_call_proof:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1C8h
mov rbx, rdi
xorps xmm0, xmm0
movaps [rsp+1F8h+var_178], xmm0
movaps [rsp+1F8h+var_188], xmm0
lea r15, [rdi+20h]
lea rdx, aStateProof; "state_proof"
lea r14, [rsp+1F8h+var_100]
mov rdi, r14
mov rsi, r15
call ssz_get
lea rdx, aFailedToVerify_0+11h; "accounts"
lea rdi, [rsp+1F8h+var_1B0]
mov rsi, r15
call ssz_get
lea rdx, aInvalidRespons+15h; "header"
lea rdi, [rsp+1F8h+var_78]
mov rsi, r14
call ssz_get
lea rdx, aSyncCommitteeB; "sync_committee_bits"
lea rdi, [rsp+1F8h+var_90]
mov rsi, r14
call ssz_get
lea rdx, aSyncCommitteeS; "sync_committee_signature"
lea rdi, [rsp+1F8h+var_A8]
mov rsi, r14
call ssz_get
xorps xmm0, xmm0
movaps [rsp+1F8h+var_198], xmm0
and [rsp+1F8h+var_1B8], 0
mov rax, [rbx+18h]
mov [rsp+1F8h+var_1E8], rax
movups xmm0, xmmword ptr [rbx+8]
movups [rsp+1F8h+var_1F8], xmm0
lea rdi, aToAddressDataB; "[{to:address,data:bytes,gas?:hexuint,va"...
lea rsi, aInvalidTransac; "Invalid transaction"
call json_validate
test rax, rax
jz short loc_26BB3
mov [rbx+78h], rax
loc_26BA6:
xor eax, eax
xor r14d, r14d
loc_26BAB:
mov [rbx+68h], al
jmp loc_26CC9
loc_26BB3:
mov rax, [rsp+1F8h+var_1A0]
mov [rsp+1F8h+var_1E8], rax
movups xmm0, [rsp+1F8h+var_1B0]
movups [rsp+1F8h+var_1F8], xmm0
lea rsi, [rsp+1F8h+var_1B8]
mov rdi, rbx
call eth_get_call_codes
test eax, eax
jnz loc_26CC6
lea rax, [rbx+8]
mov r15, [rsp+1F8h+var_1B8]
mov rcx, [rax+10h]
mov [rsp+1F8h+var_1E8], rcx
movups xmm0, xmmword ptr [rax]
movups [rsp+1F8h+var_1F8], xmm0
xor r14d, r14d
lea r12, [rsp+1F8h+var_60]
mov rdi, r12
xor esi, esi
call json_at
mov rax, [r12+10h]
mov [rsp+1F8h+var_1D0], rax
movups xmm0, xmmword ptr [r12]
movups [rsp+1F8h+var_1E0], xmm0
mov rax, [rsp+1F8h+var_1A0]
mov [rsp+1F8h+var_1E8], rax
movups xmm0, [rsp+1F8h+var_1B0]
movups [rsp+1F8h+var_1F8], xmm0
lea r12, [rsp+1F8h+var_198]
mov rdi, rbx
mov rsi, r15
mov rdx, r12
call eth_run_call_evmone
mov ebp, eax
mov rsi, [r12+8]
test rsi, rsi
jz short loc_26C93
mov rax, [rbx+48h]
test rax, rax
jz short loc_26C5E
cmp dword ptr [rax+8], 8
jnz short loc_26C98
loc_26C5E:
lea r14, [rbx+38h]
movaps xmm0, [rsp+1F8h+var_198]
movaps [rsp+1F8h+var_118], xmm0
push 12h
pop rdi
call eth_ssz_verification_type
movaps xmm0, [rsp+1F8h+var_118]
movups xmmword ptr [r14], xmm0
mov [rbx+48h], rax
or byte ptr [rbx+84h], 1
mov r15b, 1
jmp short loc_26CB8
loc_26C93:
xor r15d, r15d
jmp short loc_26CB0
loc_26C98:
mov edi, dword ptr [rsp+1F8h+var_198]
mov edx, [rbx+38h]
mov rcx, [rbx+40h]
call bytes_eq
mov r15d, eax
mov r14, qword ptr [rsp+1F8h+var_198+8]
loc_26CB0:
mov rdi, r14
call safe_free
loc_26CB8:
mov rdi, [rsp+1F8h+var_1B8]
call eth_free_codes
test ebp, ebp
jz short loc_26CDE
loc_26CC6:
xor r14d, r14d
loc_26CC9:
mov eax, r14d
add rsp, 1C8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_26CDE:
test r15b, r15b
jz loc_26E70
mov rax, [rsp+1F8h+var_1A0]
mov [rsp+1F8h+var_158], rax
movups xmm0, [rsp+1F8h+var_1B0]
movaps [rsp+1F8h+var_168], xmm0
mov rax, [rsp+1F8h+var_1A0]
mov [rsp+1F8h+var_1E8], rax
movups xmm0, [rsp+1F8h+var_1B0]
movups [rsp+1F8h+var_1F8], xmm0
call ssz_len
mov [rsp+1F8h+var_1BC], eax
xorps xmm0, xmm0
lea rax, [rsp+1F8h+var_138]
movaps xmmword ptr [rax+10h], xmm0
movaps xmmword ptr [rax], xmm0
lea rax, [rsp+1F8h+var_C8]
movaps xmmword ptr [rax+10h], xmm0
movaps xmmword ptr [rax], xmm0
xor r12d, r12d
lea r13, [rsp+1F8h+var_48]
push 20h ; ' '
pop r15
lea r14, [rsp+1F8h+var_188]
loc_26D52:
cmp [rsp+1F8h+var_1BC], r12d
jz loc_26ED3
mov rax, [rsp+1F8h+var_158]
mov [rsp+1F8h+var_1E8], rax
movaps xmm0, [rsp+1F8h+var_168]
movups [rsp+1F8h+var_1F8], xmm0
mov rdi, r13
mov esi, r12d
call ssz_at
mov rdi, rbx
mov rsi, r13
lea rdx, [rsp+1F8h+var_138]
push 4
pop rcx
mov r8d, r15d
lea r9, [rsp+1F8h+var_C8]
call eth_verify_account_proof_exec
test al, al
jz loc_26E7D
lea rdi, [rsp+1F8h+var_150]
mov rsi, r13
lea rdx, aCode; "code"
call ssz_get
mov rax, [rsp+1F8h+var_140]
cmp dword ptr [rax+8], 4
jnz short loc_26E1E
mov ebp, r12d
xorps xmm0, xmm0
movaps [rsp+1F8h+var_D8], xmm0
movaps [rsp+1F8h+var_E8], xmm0
mov edi, [rsp+1F8h+var_150]
mov rsi, [rsp+1F8h+var_148]
lea r12, [rsp+1F8h+var_E8]
mov rdx, r12
call keccak
lea rdi, [rsp+1F8h+var_C8]
mov rsi, r12
push 20h ; ' '
pop rdx
call _bcmp
test eax, eax
jnz short loc_26E8A
mov r12d, ebp
loc_26E1E:
mov edi, r15d
mov rbp, r14
mov rsi, r14
xor edx, edx
call bytes_all_equal
test al, al
jz short loc_26E51
movaps xmm0, [rsp+1F8h+var_138]
movaps xmm1, [rsp+1F8h+var_128]
movaps [rsp+1F8h+var_178], xmm1
movaps [rsp+1F8h+var_188], xmm0
jmp short loc_26E68
loc_26E51:
mov rdi, rbp
lea rsi, [rsp+1F8h+var_138]
push 20h ; ' '
pop rdx
call _bcmp
test eax, eax
jnz short loc_26EA3
loc_26E68:
inc r12d
jmp loc_26D52
loc_26E70:
lea rdi, [rbx+70h]
lea rsi, aCallResultMism; "Call result mismatch"
jmp short loc_26EC9
loc_26E7D:
lea rdi, [rbx+70h]
lea rsi, aFailedToVerify; "Failed to verify account proof"
jmp short loc_26EAE
loc_26E8A:
lea rdi, [rbx+70h]
lea rsi, aCodeHashMismat; "Code hash mismatch"
call c4_state_add_error
mov byte ptr [rbx+68h], 0
mov r12d, ebp
jmp short loc_26EB7
loc_26EA3:
lea rdi, [rbx+70h]
lea rsi, aStateRootMisma; "State root mismatch"
loc_26EAE:
call c4_state_add_error
mov byte ptr [rbx+68h], 0
loc_26EB7:
cmp r12d, [rsp+1F8h+var_1BC]
jnb short loc_26ED3
lea rdi, [rbx+70h]
lea rsi, aFailedToVerify_0; "Failed to verify accounts"
loc_26EC9:
call c4_state_add_error
jmp loc_26BA6
loc_26ED3:
mov rax, [rsp+1F8h+var_F0]
mov [rsp+1F8h+var_1E8], rax
movups xmm0, [rsp+1F8h+var_100]
movups [rsp+1F8h+var_1F8], xmm0
lea rsi, [rsp+1F8h+var_188]
mov rdi, rbx
call eth_verify_state_proof
xor r14d, r14d
lea rsi, [rsp+1F8h+var_78]
lea rdx, [rsp+1F8h+var_90]
lea rcx, [rsp+1F8h+var_A8]
mov rdi, rbx
xor r8d, r8d
call c4_verify_blockroot_signature
test eax, eax
jnz loc_26CC9
mov al, 1
mov r14b, 1
jmp loc_26BAB
| long long verify_call_proof(long long a1)
{
int v2; // edx
int v3; // ecx
int v4; // r8d
int v5; // r9d
long long v6; // rax
int v7; // edx
int v8; // ecx
int v9; // r8d
int v10; // r9d
char v11; // al
unsigned int v12; // r14d
int v13; // edx
int v14; // r8d
int v15; // r9d
int v16; // r15d
long long v17; // r14
int v18; // ecx
int v19; // r8d
int v20; // r9d
int v21; // ebp
int v22; // esi
long long v23; // rax
char **v24; // rax
char v25; // r15
int v26; // edi
int v27; // edx
int v28; // ecx
int v29; // r8d
int v30; // r9d
int v32; // edx
int v33; // ecx
int v34; // r8d
int v35; // r9d
unsigned int i; // r12d
long long v37; // rdi
const char *v38; // rsi
long long v39; // rdi
const char *v40; // rsi
unsigned int v41; // [rsp+3Ch] [rbp-1BCh]
long long v42; // [rsp+40h] [rbp-1B8h] BYREF
__int128 v43; // [rsp+48h] [rbp-1B0h] BYREF
long long v44; // [rsp+58h] [rbp-1A0h]
__int128 v45; // [rsp+60h] [rbp-198h] BYREF
__int128 v46; // [rsp+70h] [rbp-188h] BYREF
__int128 v47; // [rsp+80h] [rbp-178h]
__int128 v48; // [rsp+90h] [rbp-168h]
long long v49; // [rsp+A0h] [rbp-158h]
unsigned int v50; // [rsp+A8h] [rbp-150h] BYREF
long long v51; // [rsp+B0h] [rbp-148h]
long long v52; // [rsp+B8h] [rbp-140h]
__int128 v53; // [rsp+C0h] [rbp-138h] BYREF
__int128 v54; // [rsp+D0h] [rbp-128h]
__int128 v55; // [rsp+E0h] [rbp-118h]
__int128 v56; // [rsp+F8h] [rbp-100h] BYREF
long long v57; // [rsp+108h] [rbp-F0h]
_OWORD v58[2]; // [rsp+110h] [rbp-E8h] BYREF
_BYTE v59[32]; // [rsp+130h] [rbp-C8h] BYREF
_BYTE v60[24]; // [rsp+150h] [rbp-A8h] BYREF
_BYTE v61[24]; // [rsp+168h] [rbp-90h] BYREF
_BYTE v62[24]; // [rsp+180h] [rbp-78h] BYREF
__int128 v63; // [rsp+198h] [rbp-60h] BYREF
long long v64; // [rsp+1A8h] [rbp-50h]
_BYTE v65[72]; // [rsp+1B0h] [rbp-48h] BYREF
v47 = 0LL;
v46 = 0LL;
ssz_get(&v56, a1 + 32);
ssz_get(&v43, a1 + 32);
ssz_get(v62, &v56);
ssz_get(v61, &v56);
ssz_get(v60, &v56);
v45 = 0LL;
v42 = 0LL;
v6 = json_validate(
(unsigned int)"[{to:address,data:bytes,gas?:hexuint,value?:hexuint,gasPrice?:hexuint,from?:address},block]",
(unsigned int)"Invalid transaction",
v2,
v3,
v4,
v5,
*(_QWORD *)(a1 + 8),
*(_QWORD *)(a1 + 16),
*(_QWORD *)(a1 + 24));
if ( v6 )
{
*(_QWORD *)(a1 + 120) = v6;
LABEL_3:
v11 = 0;
v12 = 0;
LABEL_4:
*(_BYTE *)(a1 + 104) = v11;
return v12;
}
if ( (unsigned int)eth_get_call_codes(a1, (unsigned int)&v42, v7, v8, v9, v10, v43, v44) )
return 0;
v16 = v42;
v17 = 0LL;
json_at(
(unsigned int)&v63,
0,
v13,
*(_QWORD *)(a1 + 24),
v14,
v15,
*(_QWORD *)(a1 + 8),
*(_QWORD *)(a1 + 16),
*(_QWORD *)(a1 + 24));
v21 = eth_run_call_evmone(a1, v16, (unsigned int)&v45, v18, v19, v20, v43, DWORD2(v43), v44, v63, v64);
v22 = DWORD2(v45);
if ( *((_QWORD *)&v45 + 1) )
{
v23 = *(_QWORD *)(a1 + 72);
if ( !v23 || *(_DWORD *)(v23 + 8) == 8 )
{
v55 = v45;
v24 = eth_ssz_verification_type(18);
*(_OWORD *)(a1 + 56) = v55;
*(_QWORD *)(a1 + 72) = v24;
*(_BYTE *)(a1 + 132) |= 1u;
v25 = 1;
goto LABEL_13;
}
v25 = bytes_eq((unsigned int)v45, *((_QWORD *)&v45 + 1), *(unsigned int *)(a1 + 56), *(_QWORD *)(a1 + 64));
v17 = *((_QWORD *)&v45 + 1);
}
else
{
v25 = 0;
}
safe_free(v17);
LABEL_13:
v26 = v42;
eth_free_codes(v42);
if ( v21 )
return 0;
if ( !v25 )
{
v37 = a1 + 112;
v38 = "Call result mismatch";
LABEL_33:
c4_state_add_error(v37, v38);
goto LABEL_3;
}
v49 = v44;
v48 = v43;
v41 = ssz_len(v26, v22, v27, v28, v29, v30, v43, DWORD2(v43), v44);
v54 = 0LL;
v53 = 0LL;
memset(v59, 0, sizeof(v59));
for ( i = 0; v41 != i; ++i )
{
ssz_at((unsigned int)v65, i, v32, v33, v34, v35, v48, *((long long *)&v48 + 1), v49);
if ( !(unsigned __int8)eth_verify_account_proof_exec(a1, v65, &v53, 4LL, 32LL, v59) )
{
v39 = a1 + 112;
v40 = "Failed to verify account proof";
LABEL_30:
c4_state_add_error(v39, v40);
*(_BYTE *)(a1 + 104) = 0;
LABEL_31:
if ( i < v41 )
{
v37 = a1 + 112;
v38 = "Failed to verify accounts";
goto LABEL_33;
}
break;
}
ssz_get(&v50, v65);
if ( *(_DWORD *)(v52 + 8) == 4 )
{
memset(v58, 0, sizeof(v58));
keccak(v50, v51, v58);
if ( (unsigned int)bcmp(v59, v58, 32LL) )
{
c4_state_add_error(a1 + 112, "Code hash mismatch");
*(_BYTE *)(a1 + 104) = 0;
goto LABEL_31;
}
}
if ( (unsigned __int8)bytes_all_equal(32LL, &v46, 0LL) )
{
v47 = v54;
v46 = v53;
}
else if ( (unsigned int)bcmp(&v46, &v53, 32LL) )
{
v39 = a1 + 112;
v40 = "State root mismatch";
goto LABEL_30;
}
}
eth_verify_state_proof(a1, (unsigned int)&v46, v32, v33, v34, v35, v56, v57);
v12 = 0;
if ( !(unsigned int)c4_verify_blockroot_signature(a1, v62, v61, v60, 0LL) )
{
v11 = 1;
LOBYTE(v12) = 1;
goto LABEL_4;
}
return v12;
}
| verify_call_proof:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1c8
MOV RBX,RDI
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x80],XMM0
MOVAPS xmmword ptr [RSP + 0x70],XMM0
LEA R15,[RDI + 0x20]
LEA RDX,[0x173773]
LEA R14,[RSP + 0xf8]
MOV RDI,R14
MOV RSI,R15
CALL 0x0014c201
LEA RDX,[0x174168]
LEA RDI,[RSP + 0x48]
MOV RSI,R15
CALL 0x0014c201
LEA RDX,[0x17458e]
LEA RDI,[RSP + 0x180]
MOV RSI,R14
CALL 0x0014c201
LEA RDX,[0x173792]
LEA RDI,[RSP + 0x168]
MOV RSI,R14
CALL 0x0014c201
LEA RDX,[0x1737a6]
LEA RDI,[RSP + 0x150]
MOV RSI,R14
CALL 0x0014c201
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x60],XMM0
AND qword ptr [RSP + 0x40],0x0
MOV RAX,qword ptr [RBX + 0x18]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RBX + 0x8]
MOVUPS xmmword ptr [RSP],XMM0
LEA RDI,[0x1740d2]
LEA RSI,[0x17412e]
CALL 0x0014eb30
TEST RAX,RAX
JZ 0x00126bb3
MOV qword ptr [RBX + 0x78],RAX
LAB_00126ba6:
XOR EAX,EAX
XOR R14D,R14D
LAB_00126bab:
MOV byte ptr [RBX + 0x68],AL
JMP 0x00126cc9
LAB_00126bb3:
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x48]
MOVUPS xmmword ptr [RSP],XMM0
LEA RSI,[RSP + 0x40]
MOV RDI,RBX
CALL 0x0012b816
TEST EAX,EAX
JNZ 0x00126cc6
LEA RAX,[RBX + 0x8]
MOV R15,qword ptr [RSP + 0x40]
MOV RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RCX
MOVUPS XMM0,xmmword ptr [RAX]
MOVUPS xmmword ptr [RSP],XMM0
XOR R14D,R14D
LEA R12,[RSP + 0x198]
MOV RDI,R12
XOR ESI,ESI
CALL 0x0014e72e
MOV RAX,qword ptr [R12 + 0x10]
MOV qword ptr [RSP + 0x28],RAX
MOVUPS XMM0,xmmword ptr [R12]
MOVUPS xmmword ptr [RSP + 0x18],XMM0
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x48]
MOVUPS xmmword ptr [RSP],XMM0
LEA R12,[RSP + 0x60]
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R12
CALL 0x00126f34
MOV EBP,EAX
MOV RSI,qword ptr [R12 + 0x8]
TEST RSI,RSI
JZ 0x00126c93
MOV RAX,qword ptr [RBX + 0x48]
TEST RAX,RAX
JZ 0x00126c5e
CMP dword ptr [RAX + 0x8],0x8
JNZ 0x00126c98
LAB_00126c5e:
LEA R14,[RBX + 0x38]
MOVAPS XMM0,xmmword ptr [RSP + 0x60]
MOVAPS xmmword ptr [RSP + 0xe0],XMM0
PUSH 0x12
POP RDI
CALL 0x00123d84
MOVAPS XMM0,xmmword ptr [RSP + 0xe0]
MOVUPS xmmword ptr [R14],XMM0
MOV qword ptr [RBX + 0x48],RAX
OR byte ptr [RBX + 0x84],0x1
MOV R15B,0x1
JMP 0x00126cb8
LAB_00126c93:
XOR R15D,R15D
JMP 0x00126cb0
LAB_00126c98:
MOV EDI,dword ptr [RSP + 0x60]
MOV EDX,dword ptr [RBX + 0x38]
MOV RCX,qword ptr [RBX + 0x40]
CALL 0x0014ac78
MOV R15D,EAX
MOV R14,qword ptr [RSP + 0x68]
LAB_00126cb0:
MOV RDI,R14
CALL 0x0014a0e0
LAB_00126cb8:
MOV RDI,qword ptr [RSP + 0x40]
CALL 0x0012bc7c
TEST EBP,EBP
JZ 0x00126cde
LAB_00126cc6:
XOR R14D,R14D
LAB_00126cc9:
MOV EAX,R14D
ADD RSP,0x1c8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00126cde:
TEST R15B,R15B
JZ 0x00126e70
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0xa0],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x48]
MOVAPS xmmword ptr [RSP + 0x90],XMM0
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x48]
MOVUPS xmmword ptr [RSP],XMM0
CALL 0x0014b70e
MOV dword ptr [RSP + 0x3c],EAX
XORPS XMM0,XMM0
LEA RAX,[RSP + 0xc0]
MOVAPS xmmword ptr [RAX + 0x10],XMM0
MOVAPS xmmword ptr [RAX],XMM0
LEA RAX,[RSP + 0x130]
MOVAPS xmmword ptr [RAX + 0x10],XMM0
MOVAPS xmmword ptr [RAX],XMM0
XOR R12D,R12D
LEA R13,[RSP + 0x1b0]
PUSH 0x20
POP R15
LEA R14,[RSP + 0x70]
LAB_00126d52:
CMP dword ptr [RSP + 0x3c],R12D
JZ 0x00126ed3
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x10],RAX
MOVAPS XMM0,xmmword ptr [RSP + 0x90]
MOVUPS xmmword ptr [RSP],XMM0
MOV RDI,R13
MOV ESI,R12D
CALL 0x0014b599
MOV RDI,RBX
MOV RSI,R13
LEA RDX,[RSP + 0xc0]
PUSH 0x4
POP RCX
MOV R8D,R15D
LEA R9,[RSP + 0x130]
CALL 0x0012b214
TEST AL,AL
JZ 0x00126e7d
LEA RDI,[RSP + 0xa8]
MOV RSI,R13
LEA RDX,[0x173826]
CALL 0x0014c201
MOV RAX,qword ptr [RSP + 0xb8]
CMP dword ptr [RAX + 0x8],0x4
JNZ 0x00126e1e
MOV EBP,R12D
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x120],XMM0
MOVAPS xmmword ptr [RSP + 0x110],XMM0
MOV EDI,dword ptr [RSP + 0xa8]
MOV RSI,qword ptr [RSP + 0xb0]
LEA R12,[RSP + 0x110]
MOV RDX,R12
CALL 0x0014dcd0
LEA RDI,[RSP + 0x130]
MOV RSI,R12
PUSH 0x20
POP RDX
CALL 0x00122230
TEST EAX,EAX
JNZ 0x00126e8a
MOV R12D,EBP
LAB_00126e1e:
MOV EDI,R15D
MOV RBP,R14
MOV RSI,R14
XOR EDX,EDX
CALL 0x0014a2f6
TEST AL,AL
JZ 0x00126e51
MOVAPS XMM0,xmmword ptr [RSP + 0xc0]
MOVAPS XMM1,xmmword ptr [RSP + 0xd0]
MOVAPS xmmword ptr [RSP + 0x80],XMM1
MOVAPS xmmword ptr [RSP + 0x70],XMM0
JMP 0x00126e68
LAB_00126e51:
MOV RDI,RBP
LEA RSI,[RSP + 0xc0]
PUSH 0x20
POP RDX
CALL 0x00122230
TEST EAX,EAX
JNZ 0x00126ea3
LAB_00126e68:
INC R12D
JMP 0x00126d52
LAB_00126e70:
LEA RDI,[RBX + 0x70]
LEA RSI,[0x174142]
JMP 0x00126ec9
LAB_00126e7d:
LEA RDI,[RBX + 0x70]
LEA RSI,[0x174171]
JMP 0x00126eae
LAB_00126e8a:
LEA RDI,[RBX + 0x70]
LEA RSI,[0x174190]
CALL 0x0014f75d
MOV byte ptr [RBX + 0x68],0x0
MOV R12D,EBP
JMP 0x00126eb7
LAB_00126ea3:
LEA RDI,[RBX + 0x70]
LEA RSI,[0x1741a3]
LAB_00126eae:
CALL 0x0014f75d
MOV byte ptr [RBX + 0x68],0x0
LAB_00126eb7:
CMP R12D,dword ptr [RSP + 0x3c]
JNC 0x00126ed3
LEA RDI,[RBX + 0x70]
LEA RSI,[0x174157]
LAB_00126ec9:
CALL 0x0014f75d
JMP 0x00126ba6
LAB_00126ed3:
MOV RAX,qword ptr [RSP + 0x108]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0xf8]
MOVUPS xmmword ptr [RSP],XMM0
LEA RSI,[RSP + 0x70]
MOV RDI,RBX
CALL 0x0012bce7
XOR R14D,R14D
LEA RSI,[RSP + 0x180]
LEA RDX,[RSP + 0x168]
LEA RCX,[RSP + 0x150]
MOV RDI,RBX
XOR R8D,R8D
CALL 0x001293cc
TEST EAX,EAX
JNZ 0x00126cc9
MOV AL,0x1
MOV R14B,0x1
JMP 0x00126bab
|
int8 verify_call_proof(long param_1)
{
int1 uVar1;
char cVar2;
int iVar3;
uint uVar4;
long lVar5;
int8 uVar6;
char *pcVar7;
uint uVar8;
int4 uVar9;
int4 uVar10;
int8 local_1b8;
uint local_1b0 [2];
uint uStack_1a8;
int8 local_1a0;
int8 local_198;
int8 uStack_190;
int8 local_188;
int8 uStack_180;
int8 local_178;
int8 uStack_170;
ulong local_168;
ulong uStack_160;
int8 local_158;
int4 local_150 [2];
int8 local_148;
long local_140;
int8 local_138;
int8 uStack_130;
int8 local_128;
int8 uStack_120;
int4 local_118;
int4 uStack_114;
int4 uStack_110;
int4 uStack_10c;
int1 local_100 [24];
int8 local_e8;
int8 uStack_e0;
int8 local_d8;
int8 uStack_d0;
int8 local_c8;
int8 uStack_c0;
int8 local_b8;
int8 uStack_b0;
int1 local_a8 [24];
int1 local_90 [24];
int1 local_78 [24];
int1 local_60 [24];
int1 local_48 [24];
local_178 = 0;
uStack_170 = 0;
local_188 = 0;
uStack_180 = 0;
ssz_get(local_100,param_1 + 0x20,"state_proof");
ssz_get(local_1b0,param_1 + 0x20,"accounts");
ssz_get(local_78,local_100,"header");
ssz_get(local_90,local_100,"sync_committee_bits");
ssz_get(local_a8,local_100,"sync_committee_signature");
local_198 = 0;
uStack_190 = 0;
local_1b8 = 0;
lVar5 = json_validate("[{to:address,data:bytes,gas?:hexuint,value?:hexuint,gasPrice?:hexuint,from?:address},block]"
,"Invalid transaction");
if (lVar5 == 0) {
iVar3 = eth_get_call_codes(param_1,&local_1b8);
uVar6 = local_1b8;
if (iVar3 == 0) {
lVar5 = 0;
json_at(local_60,0);
iVar3 = eth_run_call_evmone(param_1,uVar6,&local_198);
if (uStack_190 == 0) {
cVar2 = '\0';
LAB_00126cb0:
safe_free(lVar5);
}
else {
if ((*(long *)(param_1 + 0x48) != 0) && (*(int *)(*(long *)(param_1 + 0x48) + 8) != 8)) {
cVar2 = bytes_eq(local_198 & 0xffffffff,uStack_190,*(int4 *)(param_1 + 0x38),
*(int8 *)(param_1 + 0x40));
lVar5 = uStack_190;
goto LAB_00126cb0;
}
local_118 = (int4)local_198;
uStack_114 = local_198._4_4_;
uStack_110 = (int4)uStack_190;
uStack_10c = uStack_190._4_4_;
uVar6 = eth_ssz_verification_type(0x12);
*(int4 *)(param_1 + 0x38) = local_118;
*(int4 *)(param_1 + 0x3c) = uStack_114;
*(int4 *)(param_1 + 0x40) = uStack_110;
*(int4 *)(param_1 + 0x44) = uStack_10c;
*(int8 *)(param_1 + 0x48) = uVar6;
*(byte *)(param_1 + 0x84) = *(byte *)(param_1 + 0x84) | 1;
cVar2 = '\x01';
}
eth_free_codes(local_1b8);
if (iVar3 == 0) {
if (cVar2 == '\0') {
pcVar7 = "Call result mismatch";
LAB_00126ec9:
c4_state_add_error(param_1 + 0x70,pcVar7);
goto LAB_00126ba6;
}
local_158 = local_1a0;
local_168 = (ulong)local_1b0[0];
uStack_160 = (ulong)uStack_1a8;
uVar4 = ssz_len();
local_128 = 0;
uStack_120 = 0;
local_138 = 0;
uStack_130 = 0;
local_b8 = 0;
uStack_b0 = 0;
local_c8 = 0;
uStack_c0 = 0;
for (uVar8 = 0; uVar4 != uVar8; uVar8 = uVar8 + 1) {
uVar9 = (int4)local_168;
uVar10 = (int4)uStack_160;
uVar6 = local_158;
ssz_at(local_48,uVar8);
cVar2 = eth_verify_account_proof_exec
(param_1,local_48,&local_138,4,0x20,&local_c8,uVar9,uVar10,uVar6);
if (cVar2 == '\0') {
pcVar7 = "Failed to verify account proof";
LAB_00126eae:
c4_state_add_error(param_1 + 0x70,pcVar7);
*(int1 *)(param_1 + 0x68) = 0;
LAB_00126eb7:
if (uVar8 < uVar4) {
pcVar7 = "Failed to verify accounts";
goto LAB_00126ec9;
}
break;
}
ssz_get(local_150,local_48,&DAT_00173826);
if (*(int *)(local_140 + 8) == 4) {
local_d8 = 0;
uStack_d0 = 0;
local_e8 = 0;
uStack_e0 = 0;
keccak(local_150[0],local_148,&local_e8);
iVar3 = bcmp(&local_c8,&local_e8,0x20);
if (iVar3 == 0) goto LAB_00126e1e;
c4_state_add_error(param_1 + 0x70,"Code hash mismatch");
*(int1 *)(param_1 + 0x68) = 0;
goto LAB_00126eb7;
}
LAB_00126e1e:
cVar2 = bytes_all_equal(0x20,&local_188,0);
if (cVar2 == '\0') {
iVar3 = bcmp(&local_188,&local_138,0x20);
if (iVar3 != 0) {
pcVar7 = "State root mismatch";
goto LAB_00126eae;
}
}
else {
local_178 = local_128;
uStack_170 = uStack_120;
local_188 = local_138;
uStack_180 = uStack_130;
}
}
eth_verify_state_proof(param_1,&local_188);
iVar3 = c4_verify_blockroot_signature(param_1,local_78,local_90,local_a8,0);
if (iVar3 != 0) {
return 0;
}
uVar1 = 1;
uVar6 = 1;
goto LAB_00126bab;
}
}
uVar6 = 0;
}
else {
*(long *)(param_1 + 0x78) = lVar5;
LAB_00126ba6:
uVar1 = 0;
uVar6 = 0;
LAB_00126bab:
*(int1 *)(param_1 + 0x68) = uVar1;
}
return uVar6;
}
| |
23,138 | verify_call_proof | corpus-core[P]colibri-stateless/src/chains/eth/verifier/verify_call.c | bool verify_call_proof(verify_ctx_t* ctx) {
bytes32_t body_root = {0};
bytes32_t state_root = {0};
ssz_ob_t state_proof = ssz_get(&ctx->proof, "state_proof");
ssz_ob_t accounts = ssz_get(&ctx->proof, "accounts");
ssz_ob_t header = ssz_get(&state_proof, "header");
ssz_ob_t sync_committee_bits = ssz_get(&state_proof, "sync_committee_bits");
ssz_ob_t sync_committee_signature = ssz_get(&state_proof, "sync_committee_signature");
bytes_t call_result = NULL_BYTES;
call_code_t* call_codes = NULL;
bool match = false;
CHECK_JSON_VERIFY(ctx->args, "[{to:address,data:bytes,gas?:hexuint,value?:hexuint,gasPrice?:hexuint,from?:address},block]", "Invalid transaction");
if (eth_get_call_codes(ctx, &call_codes, accounts) != C4_SUCCESS) return false;
#ifdef EVMONE
c4_status_t call_status = eth_run_call_evmone(ctx, call_codes, accounts, json_at(ctx->args, 0), &call_result);
#else
c4_status_t call_status = c4_state_add_error(&ctx->state, "no EVM is enabled, build with -DEVMONE=1");
#endif
if (call_result.data && (ctx->data.def == NULL || ctx->data.def->type == SSZ_TYPE_NONE)) {
ctx->data = (ssz_ob_t) {.bytes = call_result, .def = eth_ssz_verification_type(ETH_SSZ_DATA_BYTES)};
ctx->flags |= VERIFY_FLAG_FREE_DATA;
match = true;
}
else {
match = call_result.data && bytes_eq(call_result, ctx->data.bytes);
safe_free(call_result.data);
}
eth_free_codes(call_codes);
if (call_status != C4_SUCCESS) return false;
if (!match) RETURN_VERIFY_ERROR(ctx, "Call result mismatch");
if (!verify_accounts(ctx, accounts, state_root)) RETURN_VERIFY_ERROR(ctx, "Failed to verify accounts");
if (!eth_verify_state_proof(ctx, state_proof, state_root)) false;
if (c4_verify_blockroot_signature(ctx, &header, &sync_committee_bits, &sync_committee_signature, 0) != C4_SUCCESS) return false;
ctx->success = true;
return ctx->success;
} | O3 | c | verify_call_proof:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp # imm = 0x1B8
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
leaq 0x20(%rdi), %r15
leaq 0x58ca3(%rip), %rdx # 0x7f773
leaq 0x128(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x53211
leaq 0x5967e(%rip), %rdx # 0x80168
leaq 0x38(%rsp), %rdi
movq %r15, %rsi
callq 0x53211
leaq 0x59a90(%rip), %rdx # 0x8058e
leaq 0x170(%rsp), %rdi
movq %r14, %rsi
callq 0x53211
leaq 0x58c7d(%rip), %rdx # 0x7f792
leaq 0x158(%rsp), %rdi
movq %r14, %rsi
callq 0x53211
leaq 0x58c7a(%rip), %rdx # 0x7f7a6
leaq 0x140(%rsp), %rdi
movq %r14, %rsi
callq 0x53211
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
movq $0x0, 0x30(%rsp)
movq 0x18(%rbx), %rax
movq %rax, 0x10(%rsp)
movdqu 0x8(%rbx), %xmm0
movdqu %xmm0, (%rsp)
leaq 0x5956b(%rip), %rdi # 0x800d2
leaq 0x595c0(%rip), %rsi # 0x8012e
callq 0x55c28
testq %rax, %rax
je 0x26b86
movq %rax, 0x78(%rbx)
xorl %eax, %eax
xorl %r14d, %r14d
movb %al, 0x68(%rbx)
jmp 0x26baf
movq 0x48(%rsp), %rax
movq %rax, 0x10(%rsp)
movdqu 0x38(%rsp), %xmm0
movdqu %xmm0, (%rsp)
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x2bc38
testl %eax, %eax
je 0x26bc4
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x1b8, %rsp # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8(%rbx), %rax
movq 0x30(%rsp), %r15
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movups (%rax), %xmm0
movups %xmm0, (%rsp)
xorl %r14d, %r14d
leaq 0x188(%rsp), %r12
movq %r12, %rdi
xorl %esi, %esi
callq 0x557fb
movq 0x10(%r12), %rax
movq %rax, 0x28(%rsp)
movups (%r12), %xmm0
movups %xmm0, 0x18(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x10(%rsp)
movdqu 0x38(%rsp), %xmm0
movdqu %xmm0, (%rsp)
leaq 0x50(%rsp), %r12
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x26f58
movl %eax, %ebp
movq 0x8(%r12), %rsi
testq %rsi, %rsi
je 0x26c91
movq 0x48(%rbx), %rax
testq %rax, %rax
je 0x26c49
cmpl $0x8, 0x8(%rax)
jne 0x26c96
leaq 0x38(%rbx), %r14
movaps 0x50(%rsp), %xmm0
movaps %xmm0, 0x110(%rsp)
movl $0x12, %edi
callq 0x23998
movdqa 0x110(%rsp), %xmm0
movdqu %xmm0, (%r14)
movq %rax, 0x48(%rbx)
orb $0x1, 0x84(%rbx)
movq 0x30(%rsp), %rdi
callq 0x2c112
testl %ebp, %ebp
jne 0x26bac
jmp 0x26cd1
xorl %r15d, %r15d
jmp 0x26cae
movl 0x50(%rsp), %edi
movl 0x38(%rbx), %edx
movq 0x40(%rbx), %rcx
callq 0x51bfd
movl %eax, %r15d
movq 0x58(%rsp), %r14
movq %r14, %rdi
callq 0x50f4c
movq 0x30(%rsp), %rdi
callq 0x2c112
testl %ebp, %ebp
jne 0x26bac
testb %r15b, %r15b
je 0x26e9e
movq 0x48(%rsp), %rax
movq %rax, 0xb0(%rsp)
movups 0x38(%rsp), %xmm0
movaps %xmm0, 0xa0(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x10(%rsp)
movdqu 0x38(%rsp), %xmm0
movdqu %xmm0, (%rsp)
callq 0x5276c
pxor %xmm0, %xmm0
movdqa %xmm0, 0x90(%rsp)
movdqa %xmm0, 0x80(%rsp)
movdqa %xmm0, 0x100(%rsp)
movdqa %xmm0, 0xf0(%rsp)
testl %eax, %eax
je 0x26ee2
movl %eax, %ebp
xorl %r13d, %r13d
leaq 0x1a0(%rsp), %r14
leaq 0xf0(%rsp), %r12
xorl %r15d, %r15d
movq 0xb0(%rsp), %rax
movq %rax, 0x10(%rsp)
movdqa 0xa0(%rsp), %xmm0
movdqu %xmm0, (%rsp)
movq %r14, %rdi
movl %r15d, %esi
callq 0x525f1
movq %rbx, %rdi
movq %r14, %rsi
leaq 0x80(%rsp), %rdx
movl $0x4, %ecx
movl $0x20, %r8d
movq %r12, %r9
callq 0x2b610
testb %al, %al
je 0x26eae
leaq 0xb8(%rsp), %rdi
movq %r14, %rsi
leaq 0x58a78(%rip), %rdx # 0x7f826
callq 0x53211
movq 0xc8(%rsp), %rax
cmpl $0x4, 0x8(%rax)
jne 0x26e2a
pxor %xmm0, %xmm0
movdqa %xmm0, 0xe0(%rsp)
movdqa %xmm0, 0xd0(%rsp)
movl 0xb8(%rsp), %edi
movq 0xc0(%rsp), %rsi
leaq 0xd0(%rsp), %rdx
callq 0x54d10
movdqa 0xf0(%rsp), %xmm0
movdqa 0x100(%rsp), %xmm1
pcmpeqb 0xe0(%rsp), %xmm1
pcmpeqb 0xd0(%rsp), %xmm0
pand %xmm1, %xmm0
pmovmskb %xmm0, %eax
cmpl $0xffff, %eax # imm = 0xFFFF
jne 0x26ebb
movl $0x20, %edi
leaq 0x60(%rsp), %rsi
xorl %edx, %edx
callq 0x51165
testb %al, %al
je 0x26e5f
movdqa 0x80(%rsp), %xmm0
movdqa 0x90(%rsp), %xmm1
movdqa %xmm1, 0x70(%rsp)
movdqa %xmm0, 0x60(%rsp)
jmp 0x26e8c
movdqa 0x60(%rsp), %xmm0
movdqa 0x70(%rsp), %xmm1
pcmpeqb 0x90(%rsp), %xmm1
pcmpeqb 0x80(%rsp), %xmm0
pand %xmm1, %xmm0
pmovmskb %xmm0, %eax
cmpl $0xffff, %eax # imm = 0xFFFF
jne 0x26ec8
incl %r15d
cmpl %ebp, %r15d
setae %r13b
jne 0x26d4d
jmp 0x26ee2
leaq 0x70(%rbx), %rdi
leaq 0x59299(%rip), %rsi # 0x80142
jmp 0x26f4d
leaq 0x70(%rbx), %rdi
leaq 0x592b8(%rip), %rsi # 0x80171
jmp 0x26ed3
leaq 0x70(%rbx), %rdi
leaq 0x592ca(%rip), %rsi # 0x80190
jmp 0x26ed3
leaq 0x70(%rbx), %rdi
leaq 0x592d0(%rip), %rsi # 0x801a3
callq 0x56981
movb $0x0, 0x68(%rbx)
testb $0x1, %r13b
je 0x26f42
movq 0x138(%rsp), %rax
movq %rax, 0x10(%rsp)
movdqu 0x128(%rsp), %xmm0
movdqu %xmm0, (%rsp)
leaq 0x60(%rsp), %rsi
movq %rbx, %rdi
callq 0x2c180
xorl %r14d, %r14d
leaq 0x170(%rsp), %rsi
leaq 0x158(%rsp), %rdx
leaq 0x140(%rsp), %rcx
movq %rbx, %rdi
xorl %r8d, %r8d
callq 0x2960f
testl %eax, %eax
jne 0x26baf
movb $0x1, %al
movb $0x1, %r14b
jmp 0x26b81
leaq 0x70(%rbx), %rdi
leaq 0x5920a(%rip), %rsi # 0x80157
callq 0x56981
jmp 0x26b7c
nop
| verify_call_proof:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1B8h
mov rbx, rdi
xorps xmm0, xmm0
movaps [rsp+1E8h+var_178], xmm0
movaps [rsp+1E8h+var_188], xmm0
lea r15, [rdi+20h]
lea rdx, aStateProof; "state_proof"
lea r14, [rsp+1E8h+var_C0]
mov rdi, r14
mov rsi, r15
call ssz_get
lea rdx, aFailedToVerify_0+11h; "accounts"
lea rdi, [rsp+1E8h+var_1B0]
mov rsi, r15
call ssz_get
lea rdx, aInvalidRespons+15h; "header"
lea rdi, [rsp+1E8h+var_78]
mov rsi, r14
call ssz_get
lea rdx, aSyncCommitteeB; "sync_committee_bits"
lea rdi, [rsp+1E8h+var_90]
mov rsi, r14
call ssz_get
lea rdx, aSyncCommitteeS; "sync_committee_signature"
lea rdi, [rsp+1E8h+var_A8]
mov rsi, r14
call ssz_get
xorps xmm0, xmm0
movaps [rsp+1E8h+var_198], xmm0
mov [rsp+1E8h+var_1B8], 0
mov rax, [rbx+18h]
mov [rsp+1E8h+var_1D8], rax
movdqu xmm0, xmmword ptr [rbx+8]
movdqu [rsp+1E8h+var_1E8], xmm0
lea rdi, aToAddressDataB; "[{to:address,data:bytes,gas?:hexuint,va"...
lea rsi, aInvalidTransac; "Invalid transaction"
call json_validate
test rax, rax
jz short loc_26B86
mov [rbx+78h], rax
loc_26B7C:
xor eax, eax
xor r14d, r14d
loc_26B81:
mov [rbx+68h], al
jmp short loc_26BAF
loc_26B86:
mov rax, [rsp+1E8h+var_1A0]
mov [rsp+1E8h+var_1D8], rax
movdqu xmm0, [rsp+1E8h+var_1B0]
movdqu [rsp+1E8h+var_1E8], xmm0
lea rsi, [rsp+1E8h+var_1B8]
mov rdi, rbx
call eth_get_call_codes
test eax, eax
jz short loc_26BC4
loc_26BAC:
xor r14d, r14d
loc_26BAF:
mov eax, r14d
add rsp, 1B8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_26BC4:
lea rax, [rbx+8]
mov r15, [rsp+1E8h+var_1B8]
mov rcx, [rax+10h]
mov [rsp+1E8h+var_1D8], rcx
movups xmm0, xmmword ptr [rax]
movups [rsp+1E8h+var_1E8], xmm0
xor r14d, r14d
lea r12, [rsp+1E8h+var_60]
mov rdi, r12
xor esi, esi
call json_at
mov rax, [r12+10h]
mov [rsp+1E8h+var_1C0], rax
movups xmm0, xmmword ptr [r12]
movups [rsp+1E8h+var_1D0], xmm0
mov rax, [rsp+1E8h+var_1A0]
mov [rsp+1E8h+var_1D8], rax
movdqu xmm0, [rsp+1E8h+var_1B0]
movdqu [rsp+1E8h+var_1E8], xmm0
lea r12, [rsp+1E8h+var_198]
mov rdi, rbx
mov rsi, r15
mov rdx, r12
call eth_run_call_evmone
mov ebp, eax
mov rsi, [r12+8]
test rsi, rsi
jz short loc_26C91
mov rax, [rbx+48h]
test rax, rax
jz short loc_26C49
cmp dword ptr [rax+8], 8
jnz short loc_26C96
loc_26C49:
lea r14, [rbx+38h]
movaps xmm0, [rsp+1E8h+var_198]
movaps [rsp+1E8h+var_D8], xmm0
mov edi, 12h
call eth_ssz_verification_type
movdqa xmm0, [rsp+1E8h+var_D8]
movdqu xmmword ptr [r14], xmm0
mov [rbx+48h], rax
or byte ptr [rbx+84h], 1
mov rdi, [rsp+1E8h+var_1B8]
call eth_free_codes
test ebp, ebp
jnz loc_26BAC
jmp short loc_26CD1
loc_26C91:
xor r15d, r15d
jmp short loc_26CAE
loc_26C96:
mov edi, dword ptr [rsp+1E8h+var_198]
mov edx, [rbx+38h]
mov rcx, [rbx+40h]
call bytes_eq
mov r15d, eax
mov r14, qword ptr [rsp+1E8h+var_198+8]
loc_26CAE:
mov rdi, r14
call safe_free
mov rdi, [rsp+1E8h+var_1B8]
call eth_free_codes
test ebp, ebp
jnz loc_26BAC
test r15b, r15b
jz loc_26E9E
loc_26CD1:
mov rax, [rsp+1E8h+var_1A0]
mov [rsp+1E8h+var_138], rax
movups xmm0, [rsp+1E8h+var_1B0]
movaps [rsp+1E8h+var_148], xmm0
mov rax, [rsp+1E8h+var_1A0]
mov [rsp+1E8h+var_1D8], rax
movdqu xmm0, [rsp+1E8h+var_1B0]
movdqu [rsp+1E8h+var_1E8], xmm0
call ssz_len
pxor xmm0, xmm0
movdqa [rsp+1E8h+var_158], xmm0
movdqa [rsp+1E8h+var_168], xmm0
movdqa [rsp+1E8h+var_E8], xmm0
movdqa [rsp+1E8h+var_F8], xmm0
test eax, eax
jz loc_26EE2
mov ebp, eax
xor r13d, r13d
lea r14, [rsp+1E8h+var_48]
lea r12, [rsp+1E8h+var_F8]
xor r15d, r15d
loc_26D4D:
mov rax, [rsp+1E8h+var_138]
mov [rsp+1E8h+var_1D8], rax
movdqa xmm0, [rsp+1E8h+var_148]
movdqu [rsp+1E8h+var_1E8], xmm0
mov rdi, r14
mov esi, r15d
call ssz_at
mov rdi, rbx
mov rsi, r14
lea rdx, [rsp+1E8h+var_168]
mov ecx, 4
mov r8d, 20h ; ' '
mov r9, r12
call eth_verify_account_proof_exec
test al, al
jz loc_26EAE
lea rdi, [rsp+1E8h+var_130]
mov rsi, r14
lea rdx, aCode; "code"
call ssz_get
mov rax, [rsp+1E8h+var_120]
cmp dword ptr [rax+8], 4
jnz short loc_26E2A
pxor xmm0, xmm0
movdqa [rsp+1E8h+var_108], xmm0
movdqa [rsp+1E8h+var_118], xmm0
mov edi, [rsp+1E8h+var_130]
mov rsi, [rsp+1E8h+var_128]
lea rdx, [rsp+1E8h+var_118]
call keccak
movdqa xmm0, [rsp+1E8h+var_F8]
movdqa xmm1, [rsp+1E8h+var_E8]
pcmpeqb xmm1, [rsp+1E8h+var_108]
pcmpeqb xmm0, [rsp+1E8h+var_118]
pand xmm0, xmm1
pmovmskb eax, xmm0
cmp eax, 0FFFFh
jnz loc_26EBB
loc_26E2A:
mov edi, 20h ; ' '
lea rsi, [rsp+1E8h+var_188]
xor edx, edx
call bytes_all_equal
test al, al
jz short loc_26E5F
movdqa xmm0, [rsp+1E8h+var_168]
movdqa xmm1, [rsp+1E8h+var_158]
movdqa [rsp+1E8h+var_178], xmm1
movdqa [rsp+1E8h+var_188], xmm0
jmp short loc_26E8C
loc_26E5F:
movdqa xmm0, [rsp+1E8h+var_188]
movdqa xmm1, [rsp+1E8h+var_178]
pcmpeqb xmm1, [rsp+1E8h+var_158]
pcmpeqb xmm0, [rsp+1E8h+var_168]
pand xmm0, xmm1
pmovmskb eax, xmm0
cmp eax, 0FFFFh
jnz short loc_26EC8
loc_26E8C:
inc r15d
cmp r15d, ebp
setnb r13b
jnz loc_26D4D
jmp short loc_26EE2
loc_26E9E:
lea rdi, [rbx+70h]
lea rsi, aCallResultMism; "Call result mismatch"
jmp loc_26F4D
loc_26EAE:
lea rdi, [rbx+70h]
lea rsi, aFailedToVerify; "Failed to verify account proof"
jmp short loc_26ED3
loc_26EBB:
lea rdi, [rbx+70h]
lea rsi, aCodeHashMismat; "Code hash mismatch"
jmp short loc_26ED3
loc_26EC8:
lea rdi, [rbx+70h]
lea rsi, aStateRootMisma; "State root mismatch"
loc_26ED3:
call c4_state_add_error
mov byte ptr [rbx+68h], 0
test r13b, 1
jz short loc_26F42
loc_26EE2:
mov rax, [rsp+1E8h+var_B0]
mov [rsp+1E8h+var_1D8], rax
movdqu xmm0, [rsp+1E8h+var_C0]
movdqu [rsp+1E8h+var_1E8], xmm0
lea rsi, [rsp+1E8h+var_188]
mov rdi, rbx
call eth_verify_state_proof
xor r14d, r14d
lea rsi, [rsp+1E8h+var_78]
lea rdx, [rsp+1E8h+var_90]
lea rcx, [rsp+1E8h+var_A8]
mov rdi, rbx
xor r8d, r8d
call c4_verify_blockroot_signature
test eax, eax
jnz loc_26BAF
mov al, 1
mov r14b, 1
jmp loc_26B81
loc_26F42:
lea rdi, [rbx+70h]
lea rsi, aFailedToVerify_0; "Failed to verify accounts"
loc_26F4D:
call c4_state_add_error
jmp loc_26B7C
| long long verify_call_proof(long long a1)
{
int v2; // edx
int v3; // ecx
int v4; // r8d
int v5; // r9d
long long v6; // rax
int v7; // edx
int v8; // ecx
int v9; // r8d
int v10; // r9d
char v11; // al
unsigned int v12; // r14d
int v13; // edx
int v14; // r8d
int v15; // r9d
int v17; // r15d
long long v18; // r14
__m128i v19; // xmm0
int v20; // ecx
int v21; // r8d
int v22; // r9d
int v23; // ebp
__int32 v24; // esi
long long v25; // rax
char **v26; // rax
int v27; // edi
int v28; // edx
int v29; // ecx
int v30; // r8d
int v31; // r9d
char v32; // r15
unsigned int v33; // eax
int v34; // edx
int v35; // ecx
int v36; // r8d
int v37; // r9d
unsigned int v38; // ebp
bool v39; // r13
int v40; // r15d
__m128i v41; // xmm0
__m128i v42; // xmm0
long long v43; // rdi
const char *v44; // rsi
long long v45; // rdi
const char *v46; // rsi
__m128i v47; // [rsp+0h] [rbp-1E8h]
long long v48; // [rsp+30h] [rbp-1B8h] BYREF
__m128i v49; // [rsp+38h] [rbp-1B0h] BYREF
long long v50; // [rsp+48h] [rbp-1A0h]
__m128i v51; // [rsp+50h] [rbp-198h] BYREF
__m128i v52; // [rsp+60h] [rbp-188h] BYREF
__m128i v53; // [rsp+70h] [rbp-178h] BYREF
__m128i v54; // [rsp+80h] [rbp-168h] BYREF
__m128i v55; // [rsp+90h] [rbp-158h] BYREF
__m128i v56; // [rsp+A0h] [rbp-148h] BYREF
long long v57; // [rsp+B0h] [rbp-138h]
unsigned int v58; // [rsp+B8h] [rbp-130h] BYREF
long long v59; // [rsp+C0h] [rbp-128h]
long long v60; // [rsp+C8h] [rbp-120h]
__m128i v61; // [rsp+D0h] [rbp-118h] BYREF
__m128i v62; // [rsp+E0h] [rbp-108h]
__m128i v63; // [rsp+F0h] [rbp-F8h] BYREF
__m128i v64; // [rsp+100h] [rbp-E8h] BYREF
__m128i v65; // [rsp+110h] [rbp-D8h] BYREF
__m128i v66; // [rsp+128h] [rbp-C0h] BYREF
long long v67; // [rsp+138h] [rbp-B0h]
_BYTE v68[24]; // [rsp+140h] [rbp-A8h] BYREF
_BYTE v69[24]; // [rsp+158h] [rbp-90h] BYREF
_BYTE v70[24]; // [rsp+170h] [rbp-78h] BYREF
__int128 v71; // [rsp+188h] [rbp-60h] BYREF
long long v72; // [rsp+198h] [rbp-50h]
_BYTE v73[72]; // [rsp+1A0h] [rbp-48h] BYREF
v53 = 0LL;
v52 = 0LL;
ssz_get(&v66, a1 + 32);
ssz_get(&v49, a1 + 32);
ssz_get(v70, &v66);
ssz_get(v69, &v66);
ssz_get(v68, &v66);
v51 = 0LL;
v48 = 0LL;
v6 = json_validate(
(unsigned int)"[{to:address,data:bytes,gas?:hexuint,value?:hexuint,gasPrice?:hexuint,from?:address},block]",
(unsigned int)"Invalid transaction",
v2,
v3,
v4,
v5,
_mm_loadu_si128((const __m128i *)(a1 + 8)),
*(_QWORD *)(a1 + 24));
if ( v6 )
{
*(_QWORD *)(a1 + 120) = v6;
LABEL_3:
v11 = 0;
v12 = 0;
goto LABEL_4;
}
if ( (unsigned int)eth_get_call_codes(a1, (unsigned int)&v48, v7, v8, v9, v10, *(_OWORD *)&_mm_loadu_si128(&v49), v50) )
return 0;
v17 = v48;
v18 = 0LL;
json_at(
(unsigned int)&v71,
0,
v13,
*(_QWORD *)(a1 + 24),
v14,
v15,
*(_QWORD *)(a1 + 8),
*(_QWORD *)(a1 + 16),
*(_QWORD *)(a1 + 24));
v19 = _mm_loadu_si128(&v49);
v23 = eth_run_call_evmone(
a1,
v17,
(unsigned int)&v51,
v20,
v21,
v22,
v19.m128i_i8[0],
v19.m128i_i32[2],
v50,
v71,
v72);
v24 = v51.m128i_i32[2];
if ( v51.m128i_i64[1] )
{
v25 = *(_QWORD *)(a1 + 72);
if ( !v25 || *(_DWORD *)(v25 + 8) == 8 )
{
v65 = v51;
v26 = eth_ssz_verification_type(18);
*(__m128i *)(a1 + 56) = _mm_load_si128(&v65);
*(_QWORD *)(a1 + 72) = v26;
*(_BYTE *)(a1 + 132) |= 1u;
v27 = v48;
eth_free_codes(v48);
if ( v23 )
return 0;
goto LABEL_17;
}
v32 = bytes_eq(v51.m128i_u32[0], v51.m128i_i64[1], *(unsigned int *)(a1 + 56), *(_QWORD *)(a1 + 64));
v18 = v51.m128i_i64[1];
}
else
{
v32 = 0;
}
safe_free(v18);
v27 = v48;
eth_free_codes(v48);
if ( v23 )
return 0;
if ( !v32 )
{
v43 = a1 + 112;
v44 = "Call result mismatch";
LABEL_35:
c4_state_add_error(v43, v44);
goto LABEL_3;
}
LABEL_17:
v57 = v50;
v56 = v49;
v47 = _mm_loadu_si128(&v49);
v33 = ssz_len(v27, v24, v28, v29, v30, v31, v47.m128i_i8[0], v47.m128i_i32[2], v50);
v55 = 0LL;
v54 = 0LL;
v64 = 0LL;
v63 = 0LL;
if ( !v33 )
goto LABEL_32;
v38 = v33;
v39 = 0;
v40 = 0;
while ( 1 )
{
v41 = _mm_load_si128(&v56);
ssz_at((unsigned int)v73, v40, v34, v35, v36, v37, v41.m128i_i32[0], v41.m128i_i64[1], v57);
if ( !(unsigned __int8)eth_verify_account_proof_exec(a1, v73, &v54, 4LL, 32LL, &v63) )
{
v45 = a1 + 112;
v46 = "Failed to verify account proof";
goto LABEL_31;
}
ssz_get(&v58, v73);
if ( *(_DWORD *)(v60 + 8) == 4 )
{
v62 = 0LL;
v61 = 0LL;
keccak(v58, v59, &v61);
if ( _mm_movemask_epi8(_mm_and_si128(_mm_cmpeq_epi8(_mm_load_si128(&v63), v61), _mm_cmpeq_epi8(_mm_load_si128(&v64), v62))) != 0xFFFF )
{
v45 = a1 + 112;
v46 = "Code hash mismatch";
goto LABEL_31;
}
}
if ( !(unsigned __int8)bytes_all_equal(32LL, &v52, 0LL) )
break;
v42 = _mm_load_si128(&v54);
v53 = _mm_load_si128(&v55);
v52 = v42;
LABEL_25:
v39 = ++v40 >= v38;
if ( v40 == v38 )
goto LABEL_32;
}
if ( _mm_movemask_epi8(_mm_and_si128(_mm_cmpeq_epi8(_mm_load_si128(&v52), v54), _mm_cmpeq_epi8(_mm_load_si128(&v53), v55))) == 0xFFFF )
goto LABEL_25;
v45 = a1 + 112;
v46 = "State root mismatch";
LABEL_31:
c4_state_add_error(v45, v46);
*(_BYTE *)(a1 + 104) = 0;
if ( !v39 )
{
v43 = a1 + 112;
v44 = "Failed to verify accounts";
goto LABEL_35;
}
LABEL_32:
eth_verify_state_proof(a1, (unsigned int)&v52, v34, v35, v36, v37, _mm_loadu_si128(&v66), v67);
v12 = 0;
if ( !(unsigned int)c4_verify_blockroot_signature(a1, v70, v69, v68, 0LL) )
{
v11 = 1;
LOBYTE(v12) = 1;
LABEL_4:
*(_BYTE *)(a1 + 104) = v11;
}
return v12;
}
| verify_call_proof:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1b8
MOV RBX,RDI
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x70],XMM0
MOVAPS xmmword ptr [RSP + 0x60],XMM0
LEA R15,[RDI + 0x20]
LEA RDX,[0x17f773]
LEA R14,[RSP + 0x128]
MOV RDI,R14
MOV RSI,R15
CALL 0x00153211
LEA RDX,[0x180168]
LEA RDI,[RSP + 0x38]
MOV RSI,R15
CALL 0x00153211
LEA RDX,[0x18058e]
LEA RDI,[RSP + 0x170]
MOV RSI,R14
CALL 0x00153211
LEA RDX,[0x17f792]
LEA RDI,[RSP + 0x158]
MOV RSI,R14
CALL 0x00153211
LEA RDX,[0x17f7a6]
LEA RDI,[RSP + 0x140]
MOV RSI,R14
CALL 0x00153211
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x50],XMM0
MOV qword ptr [RSP + 0x30],0x0
MOV RAX,qword ptr [RBX + 0x18]
MOV qword ptr [RSP + 0x10],RAX
MOVDQU XMM0,xmmword ptr [RBX + 0x8]
MOVDQU xmmword ptr [RSP],XMM0
LEA RDI,[0x1800d2]
LEA RSI,[0x18012e]
CALL 0x00155c28
TEST RAX,RAX
JZ 0x00126b86
MOV qword ptr [RBX + 0x78],RAX
LAB_00126b7c:
XOR EAX,EAX
XOR R14D,R14D
LAB_00126b81:
MOV byte ptr [RBX + 0x68],AL
JMP 0x00126baf
LAB_00126b86:
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x10],RAX
MOVDQU XMM0,xmmword ptr [RSP + 0x38]
MOVDQU xmmword ptr [RSP],XMM0
LEA RSI,[RSP + 0x30]
MOV RDI,RBX
CALL 0x0012bc38
TEST EAX,EAX
JZ 0x00126bc4
LAB_00126bac:
XOR R14D,R14D
LAB_00126baf:
MOV EAX,R14D
ADD RSP,0x1b8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00126bc4:
LEA RAX,[RBX + 0x8]
MOV R15,qword ptr [RSP + 0x30]
MOV RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RCX
MOVUPS XMM0,xmmword ptr [RAX]
MOVUPS xmmword ptr [RSP],XMM0
XOR R14D,R14D
LEA R12,[RSP + 0x188]
MOV RDI,R12
XOR ESI,ESI
CALL 0x001557fb
MOV RAX,qword ptr [R12 + 0x10]
MOV qword ptr [RSP + 0x28],RAX
MOVUPS XMM0,xmmword ptr [R12]
MOVUPS xmmword ptr [RSP + 0x18],XMM0
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x10],RAX
MOVDQU XMM0,xmmword ptr [RSP + 0x38]
MOVDQU xmmword ptr [RSP],XMM0
LEA R12,[RSP + 0x50]
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R12
CALL 0x00126f58
MOV EBP,EAX
MOV RSI,qword ptr [R12 + 0x8]
TEST RSI,RSI
JZ 0x00126c91
MOV RAX,qword ptr [RBX + 0x48]
TEST RAX,RAX
JZ 0x00126c49
CMP dword ptr [RAX + 0x8],0x8
JNZ 0x00126c96
LAB_00126c49:
LEA R14,[RBX + 0x38]
MOVAPS XMM0,xmmword ptr [RSP + 0x50]
MOVAPS xmmword ptr [RSP + 0x110],XMM0
MOV EDI,0x12
CALL 0x00123998
MOVDQA XMM0,xmmword ptr [RSP + 0x110]
MOVDQU xmmword ptr [R14],XMM0
MOV qword ptr [RBX + 0x48],RAX
OR byte ptr [RBX + 0x84],0x1
MOV RDI,qword ptr [RSP + 0x30]
CALL 0x0012c112
TEST EBP,EBP
JNZ 0x00126bac
JMP 0x00126cd1
LAB_00126c91:
XOR R15D,R15D
JMP 0x00126cae
LAB_00126c96:
MOV EDI,dword ptr [RSP + 0x50]
MOV EDX,dword ptr [RBX + 0x38]
MOV RCX,qword ptr [RBX + 0x40]
CALL 0x00151bfd
MOV R15D,EAX
MOV R14,qword ptr [RSP + 0x58]
LAB_00126cae:
MOV RDI,R14
CALL 0x00150f4c
MOV RDI,qword ptr [RSP + 0x30]
CALL 0x0012c112
TEST EBP,EBP
JNZ 0x00126bac
TEST R15B,R15B
JZ 0x00126e9e
LAB_00126cd1:
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0xb0],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x38]
MOVAPS xmmword ptr [RSP + 0xa0],XMM0
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x10],RAX
MOVDQU XMM0,xmmword ptr [RSP + 0x38]
MOVDQU xmmword ptr [RSP],XMM0
CALL 0x0015276c
PXOR XMM0,XMM0
MOVDQA xmmword ptr [RSP + 0x90],XMM0
MOVDQA xmmword ptr [RSP + 0x80],XMM0
MOVDQA xmmword ptr [RSP + 0x100],XMM0
MOVDQA xmmword ptr [RSP + 0xf0],XMM0
TEST EAX,EAX
JZ 0x00126ee2
MOV EBP,EAX
XOR R13D,R13D
LEA R14,[RSP + 0x1a0]
LEA R12,[RSP + 0xf0]
XOR R15D,R15D
LAB_00126d4d:
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0x10],RAX
MOVDQA XMM0,xmmword ptr [RSP + 0xa0]
MOVDQU xmmword ptr [RSP],XMM0
MOV RDI,R14
MOV ESI,R15D
CALL 0x001525f1
MOV RDI,RBX
MOV RSI,R14
LEA RDX,[RSP + 0x80]
MOV ECX,0x4
MOV R8D,0x20
MOV R9,R12
CALL 0x0012b610
TEST AL,AL
JZ 0x00126eae
LEA RDI,[RSP + 0xb8]
MOV RSI,R14
LEA RDX,[0x17f826]
CALL 0x00153211
MOV RAX,qword ptr [RSP + 0xc8]
CMP dword ptr [RAX + 0x8],0x4
JNZ 0x00126e2a
PXOR XMM0,XMM0
MOVDQA xmmword ptr [RSP + 0xe0],XMM0
MOVDQA xmmword ptr [RSP + 0xd0],XMM0
MOV EDI,dword ptr [RSP + 0xb8]
MOV RSI,qword ptr [RSP + 0xc0]
LEA RDX,[RSP + 0xd0]
CALL 0x00154d10
MOVDQA XMM0,xmmword ptr [RSP + 0xf0]
MOVDQA XMM1,xmmword ptr [RSP + 0x100]
PCMPEQB XMM1,xmmword ptr [RSP + 0xe0]
PCMPEQB XMM0,xmmword ptr [RSP + 0xd0]
PAND XMM0,XMM1
PMOVMSKB EAX,XMM0
CMP EAX,0xffff
JNZ 0x00126ebb
LAB_00126e2a:
MOV EDI,0x20
LEA RSI,[RSP + 0x60]
XOR EDX,EDX
CALL 0x00151165
TEST AL,AL
JZ 0x00126e5f
MOVDQA XMM0,xmmword ptr [RSP + 0x80]
MOVDQA XMM1,xmmword ptr [RSP + 0x90]
MOVDQA xmmword ptr [RSP + 0x70],XMM1
MOVDQA xmmword ptr [RSP + 0x60],XMM0
JMP 0x00126e8c
LAB_00126e5f:
MOVDQA XMM0,xmmword ptr [RSP + 0x60]
MOVDQA XMM1,xmmword ptr [RSP + 0x70]
PCMPEQB XMM1,xmmword ptr [RSP + 0x90]
PCMPEQB XMM0,xmmword ptr [RSP + 0x80]
PAND XMM0,XMM1
PMOVMSKB EAX,XMM0
CMP EAX,0xffff
JNZ 0x00126ec8
LAB_00126e8c:
INC R15D
CMP R15D,EBP
SETNC R13B
JNZ 0x00126d4d
JMP 0x00126ee2
LAB_00126e9e:
LEA RDI,[RBX + 0x70]
LEA RSI,[0x180142]
JMP 0x00126f4d
LAB_00126eae:
LEA RDI,[RBX + 0x70]
LEA RSI,[0x180171]
JMP 0x00126ed3
LAB_00126ebb:
LEA RDI,[RBX + 0x70]
LEA RSI,[0x180190]
JMP 0x00126ed3
LAB_00126ec8:
LEA RDI,[RBX + 0x70]
LEA RSI,[0x1801a3]
LAB_00126ed3:
CALL 0x00156981
MOV byte ptr [RBX + 0x68],0x0
TEST R13B,0x1
JZ 0x00126f42
LAB_00126ee2:
MOV RAX,qword ptr [RSP + 0x138]
MOV qword ptr [RSP + 0x10],RAX
MOVDQU XMM0,xmmword ptr [RSP + 0x128]
MOVDQU xmmword ptr [RSP],XMM0
LEA RSI,[RSP + 0x60]
MOV RDI,RBX
CALL 0x0012c180
XOR R14D,R14D
LEA RSI,[RSP + 0x170]
LEA RDX,[RSP + 0x158]
LEA RCX,[RSP + 0x140]
MOV RDI,RBX
XOR R8D,R8D
CALL 0x0012960f
TEST EAX,EAX
JNZ 0x00126baf
MOV AL,0x1
MOV R14B,0x1
JMP 0x00126b81
LAB_00126f42:
LEA RDI,[RBX + 0x70]
LEA RSI,[0x180157]
LAB_00126f4d:
CALL 0x00156981
JMP 0x00126b7c
|
int8 verify_call_proof(long param_1)
{
int1 uVar1;
char cVar2;
int iVar3;
uint uVar4;
long lVar5;
int8 uVar6;
char *pcVar7;
uint uVar8;
bool bVar9;
int1 auVar10 [16];
int1 auVar11 [16];
int1 auVar12 [16];
int1 auVar13 [16];
int8 uVar14;
int8 uVar15;
int8 local_1b8;
int8 local_1b0;
int8 uStack_1a8;
int8 local_1a0;
ulong local_198;
long lStack_190;
int8 local_188;
int8 uStack_180;
int8 local_178;
int8 uStack_170;
int1 local_168 [16];
int1 local_158 [16];
int8 local_148;
int8 uStack_140;
int8 local_138;
int4 local_130 [2];
int8 local_128;
long local_120;
int1 local_118 [16];
int1 local_108 [16];
int1 local_f8 [16];
int1 local_e8 [16];
ulong local_d8;
long lStack_d0;
int1 local_c0 [24];
int1 local_a8 [24];
int1 local_90 [24];
int1 local_78 [24];
int1 local_60 [24];
int1 local_48 [24];
local_178 = 0;
uStack_170 = 0;
local_188 = 0;
uStack_180 = 0;
ssz_get(local_c0,param_1 + 0x20,"state_proof");
ssz_get(&local_1b0,param_1 + 0x20,"accounts");
ssz_get(local_78,local_c0,"header");
ssz_get(local_90,local_c0,"sync_committee_bits");
ssz_get(local_a8,local_c0,"sync_committee_signature");
local_198 = 0;
lStack_190 = 0;
local_1b8 = 0;
lVar5 = json_validate("[{to:address,data:bytes,gas?:hexuint,value?:hexuint,gasPrice?:hexuint,from?:address},block]"
,"Invalid transaction");
if (lVar5 == 0) {
iVar3 = eth_get_call_codes(param_1,&local_1b8);
uVar6 = local_1b8;
if (iVar3 != 0) {
return 0;
}
lVar5 = 0;
json_at(local_60,0);
iVar3 = eth_run_call_evmone(param_1,uVar6,&local_198);
if (lStack_190 == 0) {
cVar2 = '\0';
LAB_00126cae:
safe_free(lVar5);
eth_free_codes(local_1b8);
if (iVar3 != 0) {
return 0;
}
if (cVar2 == '\0') {
pcVar7 = "Call result mismatch";
LAB_00126f4d:
c4_state_add_error(param_1 + 0x70,pcVar7);
goto LAB_00126b7c;
}
}
else {
if ((*(long *)(param_1 + 0x48) != 0) && (*(int *)(*(long *)(param_1 + 0x48) + 8) != 8)) {
cVar2 = bytes_eq(local_198 & 0xffffffff,lStack_190,*(int4 *)(param_1 + 0x38),
*(int8 *)(param_1 + 0x40));
lVar5 = lStack_190;
goto LAB_00126cae;
}
local_d8 = local_198;
lStack_d0 = lStack_190;
uVar6 = eth_ssz_verification_type(0x12);
*(ulong *)(param_1 + 0x38) = local_d8;
*(long *)(param_1 + 0x40) = lStack_d0;
*(int8 *)(param_1 + 0x48) = uVar6;
*(byte *)(param_1 + 0x84) = *(byte *)(param_1 + 0x84) | 1;
eth_free_codes(local_1b8);
if (iVar3 != 0) {
return 0;
}
}
local_138 = local_1a0;
local_148 = local_1b0;
uStack_140 = uStack_1a8;
uVar4 = ssz_len();
local_158 = (int1 [16])0x0;
local_168 = (int1 [16])0x0;
local_e8 = (int1 [16])0x0;
local_f8 = (int1 [16])0x0;
if (uVar4 != 0) {
bVar9 = false;
uVar8 = 0;
do {
uVar6 = local_148;
uVar14 = uStack_140;
uVar15 = local_138;
ssz_at(local_48,uVar8);
cVar2 = eth_verify_account_proof_exec
(param_1,local_48,local_168,4,0x20,local_f8,uVar6,uVar14,uVar15);
if (cVar2 == '\0') {
pcVar7 = "Failed to verify account proof";
LAB_00126ed3:
c4_state_add_error(param_1 + 0x70,pcVar7);
*(int1 *)(param_1 + 0x68) = 0;
if (!bVar9) {
pcVar7 = "Failed to verify accounts";
goto LAB_00126f4d;
}
break;
}
ssz_get(local_130,local_48,&DAT_0017f826);
if (*(int *)(local_120 + 8) == 4) {
local_108 = (int1 [16])0x0;
local_118 = (int1 [16])0x0;
keccak(local_130[0],local_128,local_118);
auVar12[0] = -(local_e8[0] == local_108[0]);
auVar12[1] = -(local_e8[1] == local_108[1]);
auVar12[2] = -(local_e8[2] == local_108[2]);
auVar12[3] = -(local_e8[3] == local_108[3]);
auVar12[4] = -(local_e8[4] == local_108[4]);
auVar12[5] = -(local_e8[5] == local_108[5]);
auVar12[6] = -(local_e8[6] == local_108[6]);
auVar12[7] = -(local_e8[7] == local_108[7]);
auVar12[8] = -(local_e8[8] == local_108[8]);
auVar12[9] = -(local_e8[9] == local_108[9]);
auVar12[10] = -(local_e8[10] == local_108[10]);
auVar12[0xb] = -(local_e8[0xb] == local_108[0xb]);
auVar12[0xc] = -(local_e8[0xc] == local_108[0xc]);
auVar12[0xd] = -(local_e8[0xd] == local_108[0xd]);
auVar12[0xe] = -(local_e8[0xe] == local_108[0xe]);
auVar12[0xf] = -(local_e8[0xf] == local_108[0xf]);
auVar10[0] = -(local_f8[0] == local_118[0]);
auVar10[1] = -(local_f8[1] == local_118[1]);
auVar10[2] = -(local_f8[2] == local_118[2]);
auVar10[3] = -(local_f8[3] == local_118[3]);
auVar10[4] = -(local_f8[4] == local_118[4]);
auVar10[5] = -(local_f8[5] == local_118[5]);
auVar10[6] = -(local_f8[6] == local_118[6]);
auVar10[7] = -(local_f8[7] == local_118[7]);
auVar10[8] = -(local_f8[8] == local_118[8]);
auVar10[9] = -(local_f8[9] == local_118[9]);
auVar10[10] = -(local_f8[10] == local_118[10]);
auVar10[0xb] = -(local_f8[0xb] == local_118[0xb]);
auVar10[0xc] = -(local_f8[0xc] == local_118[0xc]);
auVar10[0xd] = -(local_f8[0xd] == local_118[0xd]);
auVar10[0xe] = -(local_f8[0xe] == local_118[0xe]);
auVar10[0xf] = -(local_f8[0xf] == local_118[0xf]);
auVar10 = auVar10 & auVar12;
if ((ushort)((ushort)(SUB161(auVar10 >> 7,0) & 1) |
(ushort)(SUB161(auVar10 >> 0xf,0) & 1) << 1 |
(ushort)(SUB161(auVar10 >> 0x17,0) & 1) << 2 |
(ushort)(SUB161(auVar10 >> 0x1f,0) & 1) << 3 |
(ushort)(SUB161(auVar10 >> 0x27,0) & 1) << 4 |
(ushort)(SUB161(auVar10 >> 0x2f,0) & 1) << 5 |
(ushort)(SUB161(auVar10 >> 0x37,0) & 1) << 6 |
(ushort)(SUB161(auVar10 >> 0x3f,0) & 1) << 7 |
(ushort)(SUB161(auVar10 >> 0x47,0) & 1) << 8 |
(ushort)(SUB161(auVar10 >> 0x4f,0) & 1) << 9 |
(ushort)(SUB161(auVar10 >> 0x57,0) & 1) << 10 |
(ushort)(SUB161(auVar10 >> 0x5f,0) & 1) << 0xb |
(ushort)(SUB161(auVar10 >> 0x67,0) & 1) << 0xc |
(ushort)(SUB161(auVar10 >> 0x6f,0) & 1) << 0xd |
(ushort)(SUB161(auVar10 >> 0x77,0) & 1) << 0xe |
(ushort)(byte)(auVar10[0xf] >> 7) << 0xf) != 0xffff) {
pcVar7 = "Code hash mismatch";
goto LAB_00126ed3;
}
}
cVar2 = bytes_all_equal(0x20,&local_188,0);
if (cVar2 == '\0') {
auVar13[0] = -((char)local_178 == local_158[0]);
auVar13[1] = -(local_178._1_1_ == local_158[1]);
auVar13[2] = -(local_178._2_1_ == local_158[2]);
auVar13[3] = -(local_178._3_1_ == local_158[3]);
auVar13[4] = -(local_178._4_1_ == local_158[4]);
auVar13[5] = -(local_178._5_1_ == local_158[5]);
auVar13[6] = -(local_178._6_1_ == local_158[6]);
auVar13[7] = -(local_178._7_1_ == local_158[7]);
auVar13[8] = -((char)uStack_170 == local_158[8]);
auVar13[9] = -(uStack_170._1_1_ == local_158[9]);
auVar13[10] = -(uStack_170._2_1_ == local_158[10]);
auVar13[0xb] = -(uStack_170._3_1_ == local_158[0xb]);
auVar13[0xc] = -(uStack_170._4_1_ == local_158[0xc]);
auVar13[0xd] = -(uStack_170._5_1_ == local_158[0xd]);
auVar13[0xe] = -(uStack_170._6_1_ == local_158[0xe]);
auVar13[0xf] = -(uStack_170._7_1_ == local_158[0xf]);
auVar11[0] = -((char)local_188 == local_168[0]);
auVar11[1] = -(local_188._1_1_ == local_168[1]);
auVar11[2] = -(local_188._2_1_ == local_168[2]);
auVar11[3] = -(local_188._3_1_ == local_168[3]);
auVar11[4] = -(local_188._4_1_ == local_168[4]);
auVar11[5] = -(local_188._5_1_ == local_168[5]);
auVar11[6] = -(local_188._6_1_ == local_168[6]);
auVar11[7] = -(local_188._7_1_ == local_168[7]);
auVar11[8] = -((char)uStack_180 == local_168[8]);
auVar11[9] = -(uStack_180._1_1_ == local_168[9]);
auVar11[10] = -(uStack_180._2_1_ == local_168[10]);
auVar11[0xb] = -(uStack_180._3_1_ == local_168[0xb]);
auVar11[0xc] = -(uStack_180._4_1_ == local_168[0xc]);
auVar11[0xd] = -(uStack_180._5_1_ == local_168[0xd]);
auVar11[0xe] = -(uStack_180._6_1_ == local_168[0xe]);
auVar11[0xf] = -(uStack_180._7_1_ == local_168[0xf]);
auVar11 = auVar11 & auVar13;
if ((ushort)((ushort)(SUB161(auVar11 >> 7,0) & 1) |
(ushort)(SUB161(auVar11 >> 0xf,0) & 1) << 1 |
(ushort)(SUB161(auVar11 >> 0x17,0) & 1) << 2 |
(ushort)(SUB161(auVar11 >> 0x1f,0) & 1) << 3 |
(ushort)(SUB161(auVar11 >> 0x27,0) & 1) << 4 |
(ushort)(SUB161(auVar11 >> 0x2f,0) & 1) << 5 |
(ushort)(SUB161(auVar11 >> 0x37,0) & 1) << 6 |
(ushort)(SUB161(auVar11 >> 0x3f,0) & 1) << 7 |
(ushort)(SUB161(auVar11 >> 0x47,0) & 1) << 8 |
(ushort)(SUB161(auVar11 >> 0x4f,0) & 1) << 9 |
(ushort)(SUB161(auVar11 >> 0x57,0) & 1) << 10 |
(ushort)(SUB161(auVar11 >> 0x5f,0) & 1) << 0xb |
(ushort)(SUB161(auVar11 >> 0x67,0) & 1) << 0xc |
(ushort)(SUB161(auVar11 >> 0x6f,0) & 1) << 0xd |
(ushort)(SUB161(auVar11 >> 0x77,0) & 1) << 0xe |
(ushort)(byte)(auVar11[0xf] >> 7) << 0xf) != 0xffff) {
pcVar7 = "State root mismatch";
goto LAB_00126ed3;
}
}
else {
local_178 = local_158._0_8_;
uStack_170 = local_158._8_8_;
local_188 = local_168._0_8_;
uStack_180 = local_168._8_8_;
}
uVar8 = uVar8 + 1;
bVar9 = uVar4 <= uVar8;
} while (uVar8 != uVar4);
}
eth_verify_state_proof(param_1,&local_188);
iVar3 = c4_verify_blockroot_signature(param_1,local_78,local_90,local_a8,0);
if (iVar3 != 0) {
return 0;
}
uVar1 = 1;
uVar6 = 1;
}
else {
*(long *)(param_1 + 0x78) = lVar5;
LAB_00126b7c:
uVar1 = 0;
uVar6 = 0;
}
*(int1 *)(param_1 + 0x68) = uVar1;
return uVar6;
}
| |
23,139 | mi_bin_search | eloqsql/storage/myisam/mi_search.c | int _mi_bin_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page,
uchar *key, uint key_len, uint comp_flag, uchar **ret_pos,
uchar *buff __attribute__((unused)), my_bool *last_key)
{
reg4 int start,mid,end,save_end;
int UNINIT_VAR(flag);
uint totlength,nod_flag,not_used[2];
DBUG_ENTER("_mi_bin_search");
totlength=keyinfo->keylength+(nod_flag=mi_test_if_nod(page));
start=0; mid=1;
save_end=end=(int) ((mi_getint(page)-2-nod_flag)/totlength-1);
DBUG_PRINT("test",("mi_getint: %d end: %d",mi_getint(page),end));
page+=2+nod_flag;
while (start != end)
{
mid= (start+end)/2;
if ((flag=ha_key_cmp(keyinfo->seg,page+(uint) mid*totlength,key,key_len,
comp_flag, not_used))
>= 0)
end=mid;
else
start=mid+1;
}
if (mid != start)
flag=ha_key_cmp(keyinfo->seg,page+(uint) start*totlength,key,key_len,
comp_flag, not_used);
if (flag < 0)
start++; /* point at next, bigger key */
*ret_pos=page+(uint) start*totlength;
*last_key= end == save_end;
DBUG_PRINT("exit",("flag: %d keypos: %d",flag,start));
DBUG_RETURN(flag);
} | O3 | c | mi_bin_search:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r9d, -0x34(%rbp)
movl %r8d, -0x30(%rbp)
movq %rcx, -0x50(%rbp)
movq %rdx, %rcx
movq %rsi, -0x48(%rbp)
movzwl 0x12(%rsi), %r15d
movzbl (%rdx), %eax
xorl %r14d, %r14d
movl $0x0, %ebx
testb %al, %al
jns 0x878f7
movq (%rdi), %rdx
movl 0x17c(%rdx), %ebx
movq 0x20(%rbp), %r12
movq 0x10(%rbp), %r13
addl %ebx, %r15d
movzbl 0x1(%rcx), %edx
andl $0x7f, %eax
shll $0x8, %eax
subl %ebx, %eax
addl %edx, %eax
addl $-0x2, %eax
xorl %edx, %edx
divl %r15d
addl $0x2, %ebx
addq %rcx, %rbx
decl %eax
movl %eax, -0x2c(%rbp)
je 0x87996
movq %rbx, -0x40(%rbp)
movl %r15d, %ebx
xorl %r15d, %r15d
movl -0x2c(%rbp), %eax
movl %eax, %r12d
leal (%r15,%r12), %eax
movl %eax, %r13d
shrl $0x1f, %r13d
addl %eax, %r13d
sarl %r13d
movq -0x48(%rbp), %rax
movq 0x28(%rax), %rdi
movl %r13d, %esi
imull %ebx, %esi
addq -0x40(%rbp), %rsi
movq -0x50(%rbp), %rdx
movl -0x30(%rbp), %ecx
movl -0x34(%rbp), %r8d
leaq -0x58(%rbp), %r9
callq 0xa1506
movl %r13d, %r14d
testl %eax, %eax
jns 0x8797a
leal 0x1(%r13), %r15d
movl %r12d, %r14d
movl %r14d, %r12d
cmpl %r14d, %r15d
jne 0x87935
cmpl %r14d, %r13d
movl %ebx, %r15d
movq -0x40(%rbp), %rbx
movq 0x20(%rbp), %r12
movq 0x10(%rbp), %r13
je 0x879bc
movq -0x48(%rbp), %rax
movq 0x28(%rax), %rdi
movl %r14d, %esi
imull %r15d, %esi
addq %rbx, %rsi
leaq -0x58(%rbp), %r9
movq -0x50(%rbp), %rdx
movl -0x30(%rbp), %ecx
movl -0x34(%rbp), %r8d
callq 0xa1506
movl %eax, %ecx
shrl $0x1f, %ecx
addl %r14d, %ecx
imull %r15d, %ecx
addq %rcx, %rbx
movq %rbx, (%r13)
cmpl -0x2c(%rbp), %r14d
sete (%r12)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _mi_bin_search:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov [rbp+var_34], r9d
mov [rbp+var_30], r8d
mov [rbp+var_50], rcx
mov rcx, rdx
mov [rbp+var_48], rsi
movzx r15d, word ptr [rsi+12h]
movzx eax, byte ptr [rdx]
xor r14d, r14d
mov ebx, 0
test al, al
jns short loc_878F7
mov rdx, [rdi]
mov ebx, [rdx+17Ch]
loc_878F7:
mov r12, [rbp+arg_10]
mov r13, [rbp+arg_0]
add r15d, ebx
movzx edx, byte ptr [rcx+1]
and eax, 7Fh
shl eax, 8
sub eax, ebx
add eax, edx
add eax, 0FFFFFFFEh
xor edx, edx
div r15d
add ebx, 2
add rbx, rcx
dec eax
mov [rbp+var_2C], eax
jz short loc_87996
mov [rbp+var_40], rbx
mov ebx, r15d
xor r15d, r15d
mov eax, [rbp+var_2C]
mov r12d, eax
loc_87935:
lea eax, [r15+r12]
mov r13d, eax
shr r13d, 1Fh
add r13d, eax
sar r13d, 1
mov rax, [rbp+var_48]
mov rdi, [rax+28h]
mov esi, r13d
imul esi, ebx
add rsi, [rbp+var_40]
mov rdx, [rbp+var_50]
mov ecx, [rbp+var_30]
mov r8d, [rbp+var_34]
lea r9, [rbp+var_58]
call ha_key_cmp
mov r14d, r13d
test eax, eax
jns short loc_8797A
lea r15d, [r13+1]
mov r14d, r12d
loc_8797A:
mov r12d, r14d
cmp r15d, r14d
jnz short loc_87935
cmp r13d, r14d
mov r15d, ebx
mov rbx, [rbp+var_40]
mov r12, [rbp+arg_10]
mov r13, [rbp+arg_0]
jz short loc_879BC
loc_87996:
mov rax, [rbp+var_48]
mov rdi, [rax+28h]
mov esi, r14d
imul esi, r15d
add rsi, rbx
lea r9, [rbp+var_58]
mov rdx, [rbp+var_50]
mov ecx, [rbp+var_30]
mov r8d, [rbp+var_34]
call ha_key_cmp
loc_879BC:
mov ecx, eax
shr ecx, 1Fh
add ecx, r14d
imul ecx, r15d
add rbx, rcx
mov [r13+0], rbx
cmp r14d, [rbp+var_2C]
setz byte ptr [r12]
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long mi_bin_search(
long long a1,
long long a2,
long long a3,
long long a4,
unsigned int a5,
unsigned int a6,
_QWORD *a7,
int a8,
bool *a9)
{
int v9; // r14d
int v10; // ebx
bool *v11; // r12
_QWORD *v12; // r13
unsigned int v13; // r15d
int v14; // eax
long long v15; // rbx
unsigned int v16; // ebx
int v17; // r15d
int v18; // r12d
int v19; // r13d
long long result; // rax
bool v21; // zf
char v22[8]; // [rsp+8h] [rbp-58h] BYREF
long long v23; // [rsp+10h] [rbp-50h]
long long v24; // [rsp+18h] [rbp-48h]
long long v25; // [rsp+20h] [rbp-40h]
unsigned int v26; // [rsp+2Ch] [rbp-34h]
unsigned int v27; // [rsp+30h] [rbp-30h]
int v28; // [rsp+34h] [rbp-2Ch]
v26 = a6;
v27 = a5;
v23 = a4;
v24 = a2;
v9 = 0;
v10 = 0;
if ( *(char *)a3 < 0 )
v10 = *(_DWORD *)(*(_QWORD *)a1 + 380LL);
v11 = a9;
v12 = a7;
v13 = v10 + *(unsigned __int16 *)(a2 + 18);
v14 = (*(unsigned __int8 *)(a3 + 1) + ((unsigned __int8)(*(_BYTE *)a3 & 0x7F) << 8) - v10 - 2) / v13;
v15 = a3 + (unsigned int)(v10 + 2);
v28 = v14 - 1;
if ( v14 == 1 )
goto LABEL_9;
v25 = v15;
v16 = v13;
v17 = 0;
v18 = v28;
do
{
v19 = (v17 + v18) / 2;
result = ha_key_cmp(*(_QWORD *)(v24 + 40), v25 + v16 * v19, v23, v27, v26, v22);
v9 = v19;
if ( (int)result < 0 )
{
v17 = v19 + 1;
v9 = v18;
}
v18 = v9;
}
while ( v17 != v9 );
v21 = v19 == v9;
v13 = v16;
v15 = v25;
v11 = a9;
v12 = a7;
if ( !v21 )
LABEL_9:
result = ha_key_cmp(*(_QWORD *)(v24 + 40), v15 + v13 * v9, v23, v27, v26, v22);
*v12 = v13 * (v9 + ((unsigned int)result >> 31)) + v15;
*v11 = v9 == v28;
return result;
}
| _mi_bin_search:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV dword ptr [RBP + -0x34],R9D
MOV dword ptr [RBP + -0x30],R8D
MOV qword ptr [RBP + -0x50],RCX
MOV RCX,RDX
MOV qword ptr [RBP + -0x48],RSI
MOVZX R15D,word ptr [RSI + 0x12]
MOVZX EAX,byte ptr [RDX]
XOR R14D,R14D
MOV EBX,0x0
TEST AL,AL
JNS 0x001878f7
MOV RDX,qword ptr [RDI]
MOV EBX,dword ptr [RDX + 0x17c]
LAB_001878f7:
MOV R12,qword ptr [RBP + 0x20]
MOV R13,qword ptr [RBP + 0x10]
ADD R15D,EBX
MOVZX EDX,byte ptr [RCX + 0x1]
AND EAX,0x7f
SHL EAX,0x8
SUB EAX,EBX
ADD EAX,EDX
ADD EAX,-0x2
XOR EDX,EDX
DIV R15D
ADD EBX,0x2
ADD RBX,RCX
DEC EAX
MOV dword ptr [RBP + -0x2c],EAX
JZ 0x00187996
MOV qword ptr [RBP + -0x40],RBX
MOV EBX,R15D
XOR R15D,R15D
MOV EAX,dword ptr [RBP + -0x2c]
MOV R12D,EAX
LAB_00187935:
LEA EAX,[R15 + R12*0x1]
MOV R13D,EAX
SHR R13D,0x1f
ADD R13D,EAX
SAR R13D,0x1
MOV RAX,qword ptr [RBP + -0x48]
MOV RDI,qword ptr [RAX + 0x28]
MOV ESI,R13D
IMUL ESI,EBX
ADD RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RBP + -0x30]
MOV R8D,dword ptr [RBP + -0x34]
LEA R9,[RBP + -0x58]
CALL 0x001a1506
MOV R14D,R13D
TEST EAX,EAX
JNS 0x0018797a
LEA R15D,[R13 + 0x1]
MOV R14D,R12D
LAB_0018797a:
MOV R12D,R14D
CMP R15D,R14D
JNZ 0x00187935
CMP R13D,R14D
MOV R15D,EBX
MOV RBX,qword ptr [RBP + -0x40]
MOV R12,qword ptr [RBP + 0x20]
MOV R13,qword ptr [RBP + 0x10]
JZ 0x001879bc
LAB_00187996:
MOV RAX,qword ptr [RBP + -0x48]
MOV RDI,qword ptr [RAX + 0x28]
MOV ESI,R14D
IMUL ESI,R15D
ADD RSI,RBX
LEA R9,[RBP + -0x58]
MOV RDX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RBP + -0x30]
MOV R8D,dword ptr [RBP + -0x34]
CALL 0x001a1506
LAB_001879bc:
MOV ECX,EAX
SHR ECX,0x1f
ADD ECX,R14D
IMUL ECX,R15D
ADD RBX,RCX
MOV qword ptr [R13],RBX
CMP R14D,dword ptr [RBP + -0x2c]
SETZ byte ptr [R12]
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void _mi_bin_search(long *param_1,long param_2,byte *param_3,int8 param_4,int4 param_5,
int4 param_6,int8 *param_7,int8 param_8,int8 param_9)
{
int iVar1;
int iVar2;
int iVar3;
byte *pbVar4;
int iVar5;
uint uVar6;
int iVar7;
int1 local_60 [8];
int8 local_58;
long local_50;
byte *local_48;
int4 local_3c;
int4 local_38;
int local_34;
iVar3 = 0;
if ((char)*param_3 < '\0') {
iVar3 = *(int *)(*param_1 + 0x17c);
}
uVar6 = (uint)*(ushort *)(param_2 + 0x12) + iVar3;
iVar1 = ((((*param_3 & 0x7f) * 0x100 - iVar3) + (uint)param_3[1]) - 2) / uVar6 - 1;
pbVar4 = param_3 + (iVar3 + 2);
iVar7 = 0;
local_58 = param_4;
local_50 = param_2;
local_3c = param_6;
local_38 = param_5;
local_34 = iVar1;
if (iVar1 != 0) {
iVar7 = 0;
local_48 = param_3 + (iVar3 + 2);
do {
iVar5 = (iVar7 + iVar1) / 2;
iVar2 = ha_key_cmp(*(int8 *)(local_50 + 0x28),local_48 + iVar5 * uVar6,local_58,local_38
,local_3c,local_60);
iVar3 = iVar5;
if (iVar2 < 0) {
iVar7 = iVar5 + 1;
iVar3 = iVar1;
}
iVar1 = iVar3;
} while (iVar7 != iVar1);
pbVar4 = local_48;
iVar7 = iVar1;
if (iVar5 == iVar1) goto LAB_001879bc;
}
iVar2 = ha_key_cmp(*(int8 *)(local_50 + 0x28),pbVar4 + iVar7 * uVar6,local_58,local_38,
local_3c,local_60);
LAB_001879bc:
*param_7 = pbVar4 + (iVar7 - (iVar2 >> 0x1f)) * uVar6;
*(bool *)param_9 = iVar7 == local_34;
return;
}
| |
23,140 | evmone::instr::core::extcodehash(evmone::StackTop, long, evmone::ExecutionState&) | corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/instructions.hpp | inline Result extcodehash(StackTop stack, int64_t gas_left, ExecutionState& state) noexcept
{
auto& x = stack.top();
const auto addr = intx::be::trunc<evmc::address>(x);
if (state.rev >= EVMC_BERLIN && state.host.access_account(addr) == EVMC_ACCESS_COLD)
{
if ((gas_left -= instr::additional_cold_account_access_cost) < 0)
return {EVMC_OUT_OF_GAS, gas_left};
}
x = intx::be::load<uint256>(state.host.get_code_hash(addr));
return {EVMC_SUCCESS, gas_left};
} | O0 | cpp | evmone::instr::core::extcodehash(evmone::StackTop, long, evmone::ExecutionState&):
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x611d0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rsi
leaq -0x44(%rbp), %rdi
callq 0x68cf0
movq -0x28(%rbp), %rax
cmpl $0x8, 0x40(%rax)
jl 0x69cf8
movq -0x28(%rbp), %rdi
addq $0x28, %rdi
leaq -0x44(%rbp), %rsi
callq 0x3b8e0
cmpl $0x0, %eax
jne 0x69cf8
movq -0x20(%rbp), %rax
subq $0x9c4, %rax # imm = 0x9C4
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jge 0x69cf6
movl $0x3, -0x10(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x69d52
jmp 0x69cf8
movq -0x28(%rbp), %rsi
addq $0x28, %rsi
leaq -0x88(%rbp), %rdi
leaq -0x44(%rbp), %rdx
callq 0x3b630
leaq -0x68(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x68d50
movq -0x30(%rbp), %rax
movq -0x68(%rbp), %rcx
movq %rcx, (%rax)
movq -0x60(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x58(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x50(%rbp), %rcx
movq %rcx, 0x18(%rax)
movl $0x0, -0x10(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rdx
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZN6evmone5instr4core11extcodehashENS_8StackTopElRNS_14ExecutionStateE:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov [rbp+var_28], rdx
lea rdi, [rbp+var_18]; this
call _ZN6evmone8StackTop3topEv; evmone::StackTop::top(void)
mov [rbp+var_30], rax
mov rsi, [rbp+var_30]
lea rdi, [rbp+var_44]
call _ZN4intx2be5truncIN4evmc7addressELj256EEET_RKNS_4uintIXT0_EEE; intx::be::trunc<evmc::address,256u>(intx::uint<256u> const&)
mov rax, [rbp+var_28]
cmp dword ptr [rax+40h], 8
jl short loc_69CF8
mov rdi, [rbp+var_28]
add rdi, 28h ; '('
lea rsi, [rbp+var_44]
call _ZN4evmc11HostContext14access_accountERKNS_7addressE; evmc::HostContext::access_account(evmc::address const&)
cmp eax, 0
jnz short loc_69CF8
mov rax, [rbp+var_20]
sub rax, 9C4h
mov [rbp+var_20], rax
cmp rax, 0
jge short loc_69CF6
mov [rbp+var_10], 3
mov rax, [rbp+var_20]
mov [rbp+var_8], rax
jmp short loc_69D52
loc_69CF6:
jmp short $+2
loc_69CF8:
mov rsi, [rbp+var_28]
add rsi, 28h ; '('
lea rdi, [rbp+var_88]
lea rdx, [rbp+var_44]
call _ZNK4evmc11HostContext13get_code_hashERKNS_7addressE; evmc::HostContext::get_code_hash(evmc::address const&)
lea rdi, [rbp+var_68]
lea rsi, [rbp+var_88]
call _ZN4intx2be4loadINS_4uintILj256EEEN4evmc7bytes32EEET_RKT0_; intx::be::load<intx::uint<256u>,evmc::bytes32>(evmc::bytes32 const&)
mov rax, [rbp+var_30]
mov rcx, [rbp+var_68]
mov [rax], rcx
mov rcx, [rbp+var_60]
mov [rax+8], rcx
mov rcx, [rbp+var_58]
mov [rax+10h], rcx
mov rcx, [rbp+var_50]
mov [rax+18h], rcx
mov [rbp+var_10], 0
mov rax, [rbp+var_20]
mov [rbp+var_8], rax
loc_69D52:
mov eax, [rbp+var_10]
mov rdx, [rbp+var_8]
add rsp, 90h
pop rbp
retn
| long long evmone::instr::core::extcodehash(long long a1, long long a2, long long a3)
{
_QWORD *v3; // rax
_QWORD v5[4]; // [rsp+8h] [rbp-88h] BYREF
_QWORD v6[4]; // [rsp+28h] [rbp-68h] BYREF
_BYTE v7[20]; // [rsp+4Ch] [rbp-44h] BYREF
_QWORD *v8; // [rsp+60h] [rbp-30h]
long long v9; // [rsp+68h] [rbp-28h]
long long v10; // [rsp+70h] [rbp-20h]
long long v11; // [rsp+78h] [rbp-18h] BYREF
unsigned int v12; // [rsp+80h] [rbp-10h]
long long v13; // [rsp+88h] [rbp-8h]
v11 = a1;
v10 = a2;
v9 = a3;
v8 = (_QWORD *)evmone::StackTop::top((evmone::StackTop *)&v11);
intx::be::trunc<evmc::address,256u>((long long)v7, (long long)v8);
if ( *(int *)(v9 + 64) < 8 || (unsigned int)evmc::HostContext::access_account(v9 + 40) || (v10 -= 2500LL, v10 >= 0) )
{
evmc::HostContext::get_code_hash(v5, v9 + 40, (long long)v7);
intx::be::load<intx::uint<256u>,evmc::bytes32>(v6, v5);
v3 = v8;
*v8 = v6[0];
v3[1] = v6[1];
v3[2] = v6[2];
v3[3] = v6[3];
v12 = 0;
v13 = v10;
}
else
{
v12 = 3;
v13 = v10;
}
return v12;
}
| extcodehash:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x20],RSI
MOV qword ptr [RBP + -0x28],RDX
LEA RDI,[RBP + -0x18]
CALL 0x001611d0
MOV qword ptr [RBP + -0x30],RAX
MOV RSI,qword ptr [RBP + -0x30]
LEA RDI,[RBP + -0x44]
CALL 0x00168cf0
MOV RAX,qword ptr [RBP + -0x28]
CMP dword ptr [RAX + 0x40],0x8
JL 0x00169cf8
MOV RDI,qword ptr [RBP + -0x28]
ADD RDI,0x28
LEA RSI,[RBP + -0x44]
CALL 0x0013b8e0
CMP EAX,0x0
JNZ 0x00169cf8
MOV RAX,qword ptr [RBP + -0x20]
SUB RAX,0x9c4
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JGE 0x00169cf6
MOV dword ptr [RBP + -0x10],0x3
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00169d52
LAB_00169cf6:
JMP 0x00169cf8
LAB_00169cf8:
MOV RSI,qword ptr [RBP + -0x28]
ADD RSI,0x28
LEA RDI,[RBP + -0x88]
LEA RDX,[RBP + -0x44]
CALL 0x0013b630
LEA RDI,[RBP + -0x68]
LEA RSI,[RBP + -0x88]
CALL 0x00168d50
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x68]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x60]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RBP + -0x58]
MOV qword ptr [RAX + 0x10],RCX
MOV RCX,qword ptr [RBP + -0x50]
MOV qword ptr [RAX + 0x18],RCX
MOV dword ptr [RBP + -0x10],0x0
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x8],RAX
LAB_00169d52:
MOV EAX,dword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x8]
ADD RSP,0x90
POP RBP
RET
|
/* evmone::instr::core::extcodehash(evmone::StackTop, long, evmone::ExecutionState&) */
int1 [16] evmone::instr::core::extcodehash(int8 param_1,long param_2,long param_3)
{
int iVar1;
int1 auVar2 [16];
address local_90 [32];
int8 local_70;
int8 local_68;
int8 local_60;
int8 local_58;
be local_4c [20];
uint *local_38;
long local_30;
long local_28;
int8 local_20;
uint local_18;
long local_10;
local_30 = param_3;
local_28 = param_2;
local_20 = param_1;
local_38 = (uint *)StackTop::top((StackTop *)&local_20);
intx::be::trunc<evmc::address,256u>(local_4c,local_38);
if (((*(int *)(local_30 + 0x40) < 8) ||
(iVar1 = evmc::HostContext::access_account
((HostContext *)(local_30 + 0x28),(address *)local_4c), iVar1 != 0)) ||
(local_28 = local_28 + -0x9c4, -1 < local_28)) {
evmc::HostContext::get_code_hash(local_90);
intx::be::load<intx::uint<256u>,evmc::bytes32>((be *)&local_70,(bytes32 *)local_90);
*(int8 *)local_38 = local_70;
*(int8 *)(local_38 + 8) = local_68;
*(int8 *)(local_38 + 0x10) = local_60;
*(int8 *)(local_38 + 0x18) = local_58;
local_18 = 0;
local_10 = local_28;
}
else {
local_18 = 3;
local_10 = local_28;
}
auVar2._4_4_ = 0;
auVar2._0_4_ = local_18;
auVar2._8_8_ = local_10;
return auVar2;
}
| |
23,141 | my_snprintf_mb2 | eloqsql/strings/ctype-ucs2.c | static size_t
my_snprintf_mb2(CHARSET_INFO *cs __attribute__((unused)),
char* to, size_t n, const char* fmt, ...)
{
size_t ret;
va_list args;
va_start(args,fmt);
ret= my_vsnprintf_mb2(to, n, fmt, args);
va_end(args);
return ret;
} | O0 | c | my_snprintf_mb2:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
testb %al, %al
je 0x5b0ab
movaps %xmm0, -0xc0(%rbp)
movaps %xmm1, -0xb0(%rbp)
movaps %xmm2, -0xa0(%rbp)
movaps %xmm3, -0x90(%rbp)
movaps %xmm4, -0x80(%rbp)
movaps %xmm5, -0x70(%rbp)
movaps %xmm6, -0x60(%rbp)
movaps %xmm7, -0x50(%rbp)
movq %r9, -0xc8(%rbp)
movq %r8, -0xd0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
leaq -0xf0(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x30, -0x3c(%rbp)
movl $0x20, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x40(%rbp), %rcx
callq 0x5e520
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0xf0, %rsp
popq %rbp
retq
| my_snprintf_mb2:
push rbp
mov rbp, rsp
sub rsp, 0F0h
test al, al
jz short loc_5B0AB
movaps [rbp+var_C0], xmm0
movaps [rbp+var_B0], xmm1
movaps [rbp+var_A0], xmm2
movaps [rbp+var_90], xmm3
movaps [rbp+var_80], xmm4
movaps [rbp+var_70], xmm5
movaps [rbp+var_60], xmm6
movaps [rbp+var_50], xmm7
loc_5B0AB:
mov [rbp+var_C8], r9
mov [rbp+var_D0], r8
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
lea rax, [rbp+var_F0]
mov [rbp+var_30], rax
lea rax, [rbp+arg_0]
mov [rbp+var_38], rax
mov [rbp+var_3C], 30h ; '0'
mov [rbp+var_40], 20h ; ' '
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
lea rcx, [rbp+var_40]
call my_vsnprintf_mb2
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
add rsp, 0F0h
pop rbp
retn
| long long my_snprintf_mb2(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
char v16; // [rsp+0h] [rbp-F0h] BYREF
long long v17; // [rsp+20h] [rbp-D0h]
long long v18; // [rsp+28h] [rbp-C8h]
__m128 v19; // [rsp+30h] [rbp-C0h]
__m128 v20; // [rsp+40h] [rbp-B0h]
__m128 v21; // [rsp+50h] [rbp-A0h]
__m128 v22; // [rsp+60h] [rbp-90h]
__m128 v23; // [rsp+70h] [rbp-80h]
__m128 v24; // [rsp+80h] [rbp-70h]
__m128 v25; // [rsp+90h] [rbp-60h]
__m128 v26; // [rsp+A0h] [rbp-50h]
_DWORD v27[2]; // [rsp+B0h] [rbp-40h] BYREF
char *v28; // [rsp+B8h] [rbp-38h]
char *v29; // [rsp+C0h] [rbp-30h]
long long v30; // [rsp+D0h] [rbp-20h]
long long v31; // [rsp+D8h] [rbp-18h]
long long v32; // [rsp+E0h] [rbp-10h]
long long v33; // [rsp+E8h] [rbp-8h]
v19 = a7;
v20 = a8;
v21 = a9;
v22 = a10;
v23 = a11;
v24 = a12;
v25 = a13;
v26 = a14;
v18 = a6;
v17 = a5;
v33 = a1;
v32 = a2;
v31 = a3;
v30 = a4;
v29 = &v16;
v28 = &a15;
v27[1] = 48;
v27[0] = 32;
return my_vsnprintf_mb2(a2, a3, a4, v27);
}
| my_snprintf_mb2:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xf0
TEST AL,AL
JZ 0x0015b0ab
MOVAPS xmmword ptr [RBP + -0xc0],XMM0
MOVAPS xmmword ptr [RBP + -0xb0],XMM1
MOVAPS xmmword ptr [RBP + -0xa0],XMM2
MOVAPS xmmword ptr [RBP + -0x90],XMM3
MOVAPS xmmword ptr [RBP + -0x80],XMM4
MOVAPS xmmword ptr [RBP + -0x70],XMM5
MOVAPS xmmword ptr [RBP + -0x60],XMM6
MOVAPS xmmword ptr [RBP + -0x50],XMM7
LAB_0015b0ab:
MOV qword ptr [RBP + -0xc8],R9
MOV qword ptr [RBP + -0xd0],R8
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
LEA RAX,[RBP + -0xf0]
MOV qword ptr [RBP + -0x30],RAX
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV dword ptr [RBP + -0x3c],0x30
MOV dword ptr [RBP + -0x40],0x20
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
LEA RCX,[RBP + -0x40]
CALL 0x0015e520
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RSP,0xf0
POP RBP
RET
|
int8
my_snprintf_mb2(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
int8 uVar1;
int1 local_f8 [32];
int8 local_d8;
int8 local_d0;
int8 local_c8;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int4 local_48;
int4 local_44;
int1 *local_40;
int1 *local_38;
int8 local_28;
int8 local_20;
int8 local_18;
int8 local_10;
if (in_AL != '\0') {
local_c8 = param_1;
local_b8 = param_2;
local_a8 = param_3;
local_98 = param_4;
local_88 = param_5;
local_78 = param_6;
local_68 = param_7;
local_58 = param_8;
}
local_38 = local_f8;
local_40 = &stack0x00000008;
local_44 = 0x30;
local_48 = 0x20;
local_d8 = param_13;
local_d0 = param_14;
local_28 = param_12;
local_20 = param_11;
local_18 = param_10;
local_10 = param_9;
uVar1 = my_vsnprintf_mb2(param_10,param_11,param_12,&local_48);
return uVar1;
}
| |
23,142 | 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 0xe0d5b
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
jmp 0xe0d67
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0xe0d84
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_E0D5B
mov rax, [rbp+var_10]
mov rcx, [rax+8]
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rax+8], rcx
jmp short loc_E0D67
loc_E0D5B:
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rbp+var_8], rax
loc_E0D67:
mov rax, [rbp+var_10]
cmp qword ptr [rax+8], 0
jz short loc_E0D84
mov rax, [rbp+var_10]
mov rcx, [rax]
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rax], rcx
loc_E0D84:
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 0x001e0d5b
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 0x001e0d67
LAB_001e0d5b:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x8],RAX
LAB_001e0d67:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x001e0d84
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_001e0d84:
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;
}
| |
23,143 | JS_ArraySpeciesCreate | bluesky950520[P]quickjs/quickjs.c | static JSValue JS_ArraySpeciesCreate(JSContext *ctx, JSValue obj,
JSValue len_val)
{
JSValue ctor, ret, species;
int res;
JSContext *realm;
res = JS_IsArray(ctx, obj);
if (res < 0)
return JS_EXCEPTION;
if (!res)
return js_array_constructor(ctx, JS_UNDEFINED, 1, &len_val);
ctor = JS_GetProperty(ctx, obj, JS_ATOM_constructor);
if (JS_IsException(ctor))
return ctor;
if (JS_IsConstructor(ctx, ctor)) {
/* legacy web compatibility */
realm = JS_GetFunctionRealm(ctx, ctor);
if (!realm) {
JS_FreeValue(ctx, ctor);
return JS_EXCEPTION;
}
if (realm != ctx &&
js_same_value(ctx, ctor, realm->array_ctor)) {
JS_FreeValue(ctx, ctor);
ctor = JS_UNDEFINED;
}
}
if (JS_IsObject(ctor)) {
species = JS_GetProperty(ctx, ctor, JS_ATOM_Symbol_species);
JS_FreeValue(ctx, ctor);
if (JS_IsException(species))
return species;
ctor = species;
if (JS_IsNull(ctor))
ctor = JS_UNDEFINED;
}
if (JS_IsUndefined(ctor)) {
return js_array_constructor(ctx, JS_UNDEFINED, 1, &len_val);
} else {
ret = JS_CallConstructor(ctx, ctor, 1, &len_val);
JS_FreeValue(ctx, ctor);
return ret;
}
} | O0 | c | JS_ArraySpeciesCreate:
subq $0xe8, %rsp
movq %rsi, 0xc8(%rsp)
movq %rdx, 0xd0(%rsp)
movq %rcx, 0xb8(%rsp)
movq %r8, 0xc0(%rsp)
movq %rdi, 0xb0(%rsp)
movq 0xb0(%rsp), %rdi
movq 0xc8(%rsp), %rsi
movq 0xd0(%rsp), %rdx
callq 0x39ba0
movl %eax, 0x7c(%rsp)
cmpl $0x0, 0x7c(%rsp)
jge 0xcde43
movl $0x0, 0xd8(%rsp)
movq $0x6, 0xe0(%rsp)
jmp 0xce23e
cmpl $0x0, 0x7c(%rsp)
jne 0xcde94
movq 0xb0(%rsp), %rdi
movl $0x0, 0x60(%rsp)
movq $0x3, 0x68(%rsp)
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
movl $0x1, %ecx
leaq 0xb8(%rsp), %r8
callq 0x56dc0
movq %rax, 0xd8(%rsp)
movq %rdx, 0xe0(%rsp)
jmp 0xce23e
movq 0xb0(%rsp), %rdi
movq 0xc8(%rsp), %rsi
movq 0xd0(%rsp), %rdx
movl $0x3d, %ecx
callq 0x29d80
movq %rax, 0x50(%rsp)
movq %rdx, 0x58(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0xa0(%rsp), %rdi
movq 0xa8(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
je 0xcdf19
movq 0xa0(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0xe0(%rsp)
jmp 0xce23e
movq 0xb0(%rsp), %rdi
movq 0xa0(%rsp), %rsi
movq 0xa8(%rsp), %rdx
callq 0x380f0
cmpl $0x0, %eax
je 0xce02a
movq 0xb0(%rsp), %rdi
movq 0xa0(%rsp), %rsi
movq 0xa8(%rsp), %rdx
callq 0x95b70
movq %rax, 0x70(%rsp)
cmpq $0x0, 0x70(%rsp)
jne 0xcdfa2
movq 0xb0(%rsp), %rdi
movq 0xa0(%rsp), %rsi
movq 0xa8(%rsp), %rdx
callq 0x23c90
movl $0x0, 0xd8(%rsp)
movq $0x6, 0xe0(%rsp)
jmp 0xce23e
movq 0x70(%rsp), %rax
cmpq 0xb0(%rsp), %rax
je 0xce028
movq 0xb0(%rsp), %rdi
movq 0x70(%rsp), %rax
movq 0xa0(%rsp), %rsi
movq 0xa8(%rsp), %rdx
movq 0x68(%rax), %rcx
movq 0x70(%rax), %r8
callq 0x35b10
cmpl $0x0, %eax
je 0xce028
movq 0xb0(%rsp), %rdi
movq 0xa0(%rsp), %rsi
movq 0xa8(%rsp), %rdx
callq 0x23c90
movl $0x0, 0x40(%rsp)
movq $0x3, 0x48(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0xa8(%rsp)
jmp 0xce02a
movq 0xa0(%rsp), %rdi
movq 0xa8(%rsp), %rsi
callq 0x2af70
cmpl $0x0, %eax
je 0xce151
movq 0xb0(%rsp), %rdi
movq 0xa0(%rsp), %rsi
movq 0xa8(%rsp), %rdx
movl $0xdd, %ecx
callq 0x29d80
movq %rax, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0xb0(%rsp), %rdi
movq 0xa0(%rsp), %rsi
movq 0xa8(%rsp), %rdx
callq 0x23c90
movq 0x80(%rsp), %rdi
movq 0x88(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
je 0xce0ea
movq 0x80(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0xe0(%rsp)
jmp 0xce23e
movq 0x80(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0xa0(%rsp), %rdi
movq 0xa8(%rsp), %rsi
callq 0x2e240
cmpl $0x0, %eax
je 0xce14f
movl $0x0, 0x20(%rsp)
movq $0x3, 0x28(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0xa8(%rsp)
jmp 0xce151
movq 0xa0(%rsp), %rdi
movq 0xa8(%rsp), %rsi
callq 0x2e260
cmpl $0x0, %eax
je 0xce1b5
movq 0xb0(%rsp), %rdi
movl $0x0, 0x10(%rsp)
movq $0x3, 0x18(%rsp)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movl $0x1, %ecx
leaq 0xb8(%rsp), %r8
callq 0x56dc0
movq %rax, 0xd8(%rsp)
movq %rdx, 0xe0(%rsp)
jmp 0xce23e
movq 0xb0(%rsp), %rdi
movq 0xa0(%rsp), %rsi
movq 0xa8(%rsp), %rdx
movl $0x1, %ecx
leaq 0xb8(%rsp), %r8
callq 0x48550
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
movq (%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0xb0(%rsp), %rdi
movq 0xa0(%rsp), %rsi
movq 0xa8(%rsp), %rdx
callq 0x23c90
movq 0x90(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0xe0(%rsp)
movq 0xd8(%rsp), %rax
movq 0xe0(%rsp), %rdx
addq $0xe8, %rsp
retq
nopw %cs:(%rax,%rax)
| JS_ArraySpeciesCreate:
sub rsp, 0E8h
mov [rsp+0E8h+var_20], rsi
mov [rsp+0E8h+var_18], rdx
mov [rsp+0E8h+var_30], rcx
mov [rsp+0E8h+var_28], r8
mov [rsp+0E8h+var_38], rdi
mov rdi, [rsp+0E8h+var_38]
mov rsi, [rsp+0E8h+var_20]
mov rdx, [rsp+0E8h+var_18]
call JS_IsArray
mov [rsp+0E8h+var_6C], eax
cmp [rsp+0E8h+var_6C], 0
jge short loc_CDE43
mov dword ptr [rsp+0E8h+var_10], 0
mov [rsp+0E8h+var_8], 6
jmp loc_CE23E
loc_CDE43:
cmp [rsp+0E8h+var_6C], 0
jnz short loc_CDE94
mov rdi, [rsp+0E8h+var_38]
mov dword ptr [rsp+0E8h+var_88], 0
mov [rsp+0E8h+var_80], 3
mov rsi, [rsp+0E8h+var_88]
mov rdx, [rsp+0E8h+var_80]
mov ecx, 1
lea r8, [rsp+0E8h+var_30]
call js_array_constructor
mov [rsp+0E8h+var_10], rax
mov [rsp+0E8h+var_8], rdx
jmp loc_CE23E
loc_CDE94:
mov rdi, [rsp+0E8h+var_38]
mov rsi, [rsp+0E8h+var_20]
mov rdx, [rsp+0E8h+var_18]
mov ecx, 3Dh ; '='
call JS_GetProperty
mov [rsp+0E8h+var_98], rax
mov [rsp+0E8h+var_90], rdx
mov rax, [rsp+0E8h+var_98]
mov [rsp+0E8h+var_48], rax
mov rax, [rsp+0E8h+var_90]
mov [rsp+0E8h+var_40], rax
mov rdi, [rsp+0E8h+var_48]
mov rsi, [rsp+0E8h+var_40]
call JS_IsException_1
cmp eax, 0
jz short loc_CDF19
mov rax, [rsp+0E8h+var_48]
mov [rsp+0E8h+var_10], rax
mov rax, [rsp+0E8h+var_40]
mov [rsp+0E8h+var_8], rax
jmp loc_CE23E
loc_CDF19:
mov rdi, [rsp+0E8h+var_38]
mov rsi, [rsp+0E8h+var_48]
mov rdx, [rsp+0E8h+var_40]
call JS_IsConstructor
cmp eax, 0
jz loc_CE02A
mov rdi, [rsp+0E8h+var_38]
mov rsi, [rsp+0E8h+var_48]
mov rdx, [rsp+0E8h+var_40]
call JS_GetFunctionRealm
mov [rsp+0E8h+var_78], rax
cmp [rsp+0E8h+var_78], 0
jnz short loc_CDFA2
mov rdi, [rsp+0E8h+var_38]
mov rsi, [rsp+0E8h+var_48]
mov rdx, [rsp+0E8h+var_40]
call JS_FreeValue
mov dword ptr [rsp+0E8h+var_10], 0
mov [rsp+0E8h+var_8], 6
jmp loc_CE23E
loc_CDFA2:
mov rax, [rsp+0E8h+var_78]
cmp rax, [rsp+0E8h+var_38]
jz short loc_CE028
mov rdi, [rsp+0E8h+var_38]
mov rax, [rsp+0E8h+var_78]
mov rsi, [rsp+0E8h+var_48]
mov rdx, [rsp+0E8h+var_40]
mov rcx, [rax+68h]
mov r8, [rax+70h]
call js_same_value
cmp eax, 0
jz short loc_CE028
mov rdi, [rsp+0E8h+var_38]
mov rsi, [rsp+0E8h+var_48]
mov rdx, [rsp+0E8h+var_40]
call JS_FreeValue
mov dword ptr [rsp+0E8h+var_A8], 0
mov [rsp+0E8h+var_A0], 3
mov rax, [rsp+0E8h+var_A8]
mov [rsp+0E8h+var_48], rax
mov rax, [rsp+0E8h+var_A0]
mov [rsp+0E8h+var_40], rax
loc_CE028:
jmp short $+2
loc_CE02A:
mov rdi, [rsp+0E8h+var_48]
mov rsi, [rsp+0E8h+var_40]
call JS_IsObject
cmp eax, 0
jz loc_CE151
mov rdi, [rsp+0E8h+var_38]
mov rsi, [rsp+0E8h+var_48]
mov rdx, [rsp+0E8h+var_40]
mov ecx, 0DDh
call JS_GetProperty
mov [rsp+0E8h+var_B8], rax
mov [rsp+0E8h+var_B0], rdx
mov rax, [rsp+0E8h+var_B8]
mov [rsp+0E8h+var_68], rax
mov rax, [rsp+0E8h+var_B0]
mov [rsp+0E8h+var_60], rax
mov rdi, [rsp+0E8h+var_38]
mov rsi, [rsp+0E8h+var_48]
mov rdx, [rsp+0E8h+var_40]
call JS_FreeValue
mov rdi, [rsp+0E8h+var_68]
mov rsi, [rsp+0E8h+var_60]
call JS_IsException_1
cmp eax, 0
jz short loc_CE0EA
mov rax, [rsp+0E8h+var_68]
mov [rsp+0E8h+var_10], rax
mov rax, [rsp+0E8h+var_60]
mov [rsp+0E8h+var_8], rax
jmp loc_CE23E
loc_CE0EA:
mov rax, [rsp+0E8h+var_68]
mov [rsp+0E8h+var_48], rax
mov rax, [rsp+0E8h+var_60]
mov [rsp+0E8h+var_40], rax
mov rdi, [rsp+0E8h+var_48]
mov rsi, [rsp+0E8h+var_40]
call JS_IsNull_0
cmp eax, 0
jz short loc_CE14F
mov dword ptr [rsp+0E8h+var_C8], 0
mov [rsp+0E8h+var_C0], 3
mov rax, [rsp+0E8h+var_C8]
mov [rsp+0E8h+var_48], rax
mov rax, [rsp+0E8h+var_C0]
mov [rsp+0E8h+var_40], rax
loc_CE14F:
jmp short $+2
loc_CE151:
mov rdi, [rsp+0E8h+var_48]
mov rsi, [rsp+0E8h+var_40]
call JS_IsUndefined_0
cmp eax, 0
jz short loc_CE1B5
mov rdi, [rsp+0E8h+var_38]
mov dword ptr [rsp+0E8h+var_D8], 0
mov [rsp+0E8h+var_D0], 3
mov rsi, [rsp+0E8h+var_D8]
mov rdx, [rsp+0E8h+var_D0]
mov ecx, 1
lea r8, [rsp+0E8h+var_30]
call js_array_constructor
mov [rsp+0E8h+var_10], rax
mov [rsp+0E8h+var_8], rdx
jmp loc_CE23E
loc_CE1B5:
mov rdi, [rsp+0E8h+var_38]
mov rsi, [rsp+0E8h+var_48]
mov rdx, [rsp+0E8h+var_40]
mov ecx, 1
lea r8, [rsp+0E8h+var_30]
call JS_CallConstructor
mov [rsp+0E8h+var_E8], rax
mov [rsp+0E8h+var_E0], rdx
mov rax, [rsp+0E8h+var_E8]
mov [rsp+0E8h+var_58], rax
mov rax, [rsp+0E8h+var_E0]
mov [rsp+0E8h+var_50], rax
mov rdi, [rsp+0E8h+var_38]
mov rsi, [rsp+0E8h+var_48]
mov rdx, [rsp+0E8h+var_40]
call JS_FreeValue
mov rax, [rsp+0E8h+var_58]
mov [rsp+0E8h+var_10], rax
mov rax, [rsp+0E8h+var_50]
mov [rsp+0E8h+var_8], rax
loc_CE23E:
mov rax, [rsp+0E8h+var_10]
mov rdx, [rsp+0E8h+var_8]
add rsp, 0E8h
retn
| long long JS_ArraySpeciesCreate(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
double v13; // xmm4_8
double v14; // xmm5_8
long long v15; // rdx
long long v16; // rdx
long long v17; // rcx
long long v18; // r8
long long v19; // r9
__m128 v20; // xmm4
__m128 v21; // xmm5
long long v22; // rdx
double v23; // xmm4_8
double v24; // xmm5_8
long long v25; // rdx
long long v26; // rdx
long long v28; // [rsp+0h] [rbp-E8h]
long long v29; // [rsp+10h] [rbp-D8h]
long long v30; // [rsp+20h] [rbp-C8h]
long long v31; // [rsp+30h] [rbp-B8h]
long long v32; // [rsp+40h] [rbp-A8h]
_DWORD *Property; // [rsp+50h] [rbp-98h]
long long v34; // [rsp+60h] [rbp-88h]
long long FunctionRealm; // [rsp+70h] [rbp-78h]
int IsArray; // [rsp+7Ch] [rbp-6Ch]
long long v37; // [rsp+88h] [rbp-60h]
long long v38; // [rsp+98h] [rbp-50h]
long long v39; // [rsp+A0h] [rbp-48h]
long long v40; // [rsp+A8h] [rbp-40h]
long long v41[2]; // [rsp+B8h] [rbp-30h] BYREF
long long v42; // [rsp+C8h] [rbp-20h]
long long v43; // [rsp+D0h] [rbp-18h]
long long v44; // [rsp+D8h] [rbp-10h]
long long v45; // [rsp+E0h] [rbp-8h]
v42 = a2;
v43 = a3;
v41[0] = a4;
v41[1] = a5;
IsArray = JS_IsArray(a1, a2, a3);
if ( IsArray >= 0 )
{
if ( IsArray )
{
Property = (_DWORD *)JS_GetProperty(a1, v42, v43, 61);
v39 = (long long)Property;
v40 = v16;
if ( JS_IsException_1((long long)Property, v16) )
{
v44 = (long long)Property;
v45 = v40;
}
else
{
if ( JS_IsConstructor(a1, (long long)Property, v40) )
{
FunctionRealm = JS_GetFunctionRealm(
a1,
(long long)Property,
v40,
a6,
a7,
a8,
a9,
v20,
v21,
a12,
a13,
v17,
v18,
v19);
if ( !FunctionRealm )
{
JS_FreeValue(a1, (long long)Property, v40);
LODWORD(v44) = 0;
v45 = 6LL;
return v44;
}
if ( FunctionRealm != a1
&& (unsigned int)js_same_value(
a1,
Property,
v40,
*(_DWORD **)(FunctionRealm + 104),
*(_QWORD *)(FunctionRealm + 112)) )
{
JS_FreeValue(a1, (long long)Property, v40);
LODWORD(v32) = 0;
v39 = v32;
v40 = 3LL;
}
}
if ( JS_IsObject(v39, v40) )
{
v31 = JS_GetProperty(a1, v39, v40, 221);
v37 = v22;
JS_FreeValue(a1, v39, v40);
if ( JS_IsException_1(v31, v37) )
{
v44 = v31;
v45 = v37;
return v44;
}
v39 = v31;
v40 = v37;
if ( JS_IsNull_0(v31, v37) )
{
LODWORD(v30) = 0;
v39 = v30;
v40 = 3LL;
}
}
if ( JS_IsUndefined_0(v39, v40) )
{
LODWORD(v29) = 0;
v44 = js_array_constructor(a1, v29, 3LL, 1, v41, a6, a7, a8, a9, v23, v24, a12, a13);
v45 = v25;
}
else
{
v28 = JS_CallConstructor(a1, v39, v40, 1u, (long long)v41, a6, a7, a8, a9, v23, v24, a12, a13);
v38 = v26;
JS_FreeValue(a1, v39, v40);
v44 = v28;
v45 = v38;
}
}
}
else
{
LODWORD(v34) = 0;
v44 = js_array_constructor(a1, v34, 3LL, 1, v41, a6, a7, a8, a9, v13, v14, a12, a13);
v45 = v15;
}
}
else
{
LODWORD(v44) = 0;
v45 = 6LL;
}
return v44;
}
| JS_ArraySpeciesCreate:
SUB RSP,0xe8
MOV qword ptr [RSP + 0xc8],RSI
MOV qword ptr [RSP + 0xd0],RDX
MOV qword ptr [RSP + 0xb8],RCX
MOV qword ptr [RSP + 0xc0],R8
MOV qword ptr [RSP + 0xb0],RDI
MOV RDI,qword ptr [RSP + 0xb0]
MOV RSI,qword ptr [RSP + 0xc8]
MOV RDX,qword ptr [RSP + 0xd0]
CALL 0x00139ba0
MOV dword ptr [RSP + 0x7c],EAX
CMP dword ptr [RSP + 0x7c],0x0
JGE 0x001cde43
MOV dword ptr [RSP + 0xd8],0x0
MOV qword ptr [RSP + 0xe0],0x6
JMP 0x001ce23e
LAB_001cde43:
CMP dword ptr [RSP + 0x7c],0x0
JNZ 0x001cde94
MOV RDI,qword ptr [RSP + 0xb0]
MOV dword ptr [RSP + 0x60],0x0
MOV qword ptr [RSP + 0x68],0x3
MOV RSI,qword ptr [RSP + 0x60]
MOV RDX,qword ptr [RSP + 0x68]
MOV ECX,0x1
LEA R8,[RSP + 0xb8]
CALL 0x00156dc0
MOV qword ptr [RSP + 0xd8],RAX
MOV qword ptr [RSP + 0xe0],RDX
JMP 0x001ce23e
LAB_001cde94:
MOV RDI,qword ptr [RSP + 0xb0]
MOV RSI,qword ptr [RSP + 0xc8]
MOV RDX,qword ptr [RSP + 0xd0]
MOV ECX,0x3d
CALL 0x00129d80
MOV qword ptr [RSP + 0x50],RAX
MOV qword ptr [RSP + 0x58],RDX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0xa0],RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0xa8],RAX
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0xa8]
CALL 0x00123cc0
CMP EAX,0x0
JZ 0x001cdf19
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0xd8],RAX
MOV RAX,qword ptr [RSP + 0xa8]
MOV qword ptr [RSP + 0xe0],RAX
JMP 0x001ce23e
LAB_001cdf19:
MOV RDI,qword ptr [RSP + 0xb0]
MOV RSI,qword ptr [RSP + 0xa0]
MOV RDX,qword ptr [RSP + 0xa8]
CALL 0x001380f0
CMP EAX,0x0
JZ 0x001ce02a
MOV RDI,qword ptr [RSP + 0xb0]
MOV RSI,qword ptr [RSP + 0xa0]
MOV RDX,qword ptr [RSP + 0xa8]
CALL 0x00195b70
MOV qword ptr [RSP + 0x70],RAX
CMP qword ptr [RSP + 0x70],0x0
JNZ 0x001cdfa2
MOV RDI,qword ptr [RSP + 0xb0]
MOV RSI,qword ptr [RSP + 0xa0]
MOV RDX,qword ptr [RSP + 0xa8]
CALL 0x00123c90
MOV dword ptr [RSP + 0xd8],0x0
MOV qword ptr [RSP + 0xe0],0x6
JMP 0x001ce23e
LAB_001cdfa2:
MOV RAX,qword ptr [RSP + 0x70]
CMP RAX,qword ptr [RSP + 0xb0]
JZ 0x001ce028
MOV RDI,qword ptr [RSP + 0xb0]
MOV RAX,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0xa0]
MOV RDX,qword ptr [RSP + 0xa8]
MOV RCX,qword ptr [RAX + 0x68]
MOV R8,qword ptr [RAX + 0x70]
CALL 0x00135b10
CMP EAX,0x0
JZ 0x001ce028
MOV RDI,qword ptr [RSP + 0xb0]
MOV RSI,qword ptr [RSP + 0xa0]
MOV RDX,qword ptr [RSP + 0xa8]
CALL 0x00123c90
MOV dword ptr [RSP + 0x40],0x0
MOV qword ptr [RSP + 0x48],0x3
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0xa0],RAX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0xa8],RAX
LAB_001ce028:
JMP 0x001ce02a
LAB_001ce02a:
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0xa8]
CALL 0x0012af70
CMP EAX,0x0
JZ 0x001ce151
MOV RDI,qword ptr [RSP + 0xb0]
MOV RSI,qword ptr [RSP + 0xa0]
MOV RDX,qword ptr [RSP + 0xa8]
MOV ECX,0xdd
CALL 0x00129d80
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x38],RDX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x80],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x88],RAX
MOV RDI,qword ptr [RSP + 0xb0]
MOV RSI,qword ptr [RSP + 0xa0]
MOV RDX,qword ptr [RSP + 0xa8]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x88]
CALL 0x00123cc0
CMP EAX,0x0
JZ 0x001ce0ea
MOV RAX,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0xd8],RAX
MOV RAX,qword ptr [RSP + 0x88]
MOV qword ptr [RSP + 0xe0],RAX
JMP 0x001ce23e
LAB_001ce0ea:
MOV RAX,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0xa0],RAX
MOV RAX,qword ptr [RSP + 0x88]
MOV qword ptr [RSP + 0xa8],RAX
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0xa8]
CALL 0x0012e240
CMP EAX,0x0
JZ 0x001ce14f
MOV dword ptr [RSP + 0x20],0x0
MOV qword ptr [RSP + 0x28],0x3
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0xa0],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0xa8],RAX
LAB_001ce14f:
JMP 0x001ce151
LAB_001ce151:
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0xa8]
CALL 0x0012e260
CMP EAX,0x0
JZ 0x001ce1b5
MOV RDI,qword ptr [RSP + 0xb0]
MOV dword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],0x3
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
MOV ECX,0x1
LEA R8,[RSP + 0xb8]
CALL 0x00156dc0
MOV qword ptr [RSP + 0xd8],RAX
MOV qword ptr [RSP + 0xe0],RDX
JMP 0x001ce23e
LAB_001ce1b5:
MOV RDI,qword ptr [RSP + 0xb0]
MOV RSI,qword ptr [RSP + 0xa0]
MOV RDX,qword ptr [RSP + 0xa8]
MOV ECX,0x1
LEA R8,[RSP + 0xb8]
CALL 0x00148550
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],RDX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x90],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x98],RAX
MOV RDI,qword ptr [RSP + 0xb0]
MOV RSI,qword ptr [RSP + 0xa0]
MOV RDX,qword ptr [RSP + 0xa8]
CALL 0x00123c90
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0xd8],RAX
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0xe0],RAX
LAB_001ce23e:
MOV RAX,qword ptr [RSP + 0xd8]
MOV RDX,qword ptr [RSP + 0xe0]
ADD RSP,0xe8
RET
|
int1 [16]
JS_ArraySpeciesCreate
(long param_1,int8 param_2,int8 param_3,int8 param_4,int8 param_5)
{
int1 auVar1 [16];
int iVar2;
int8 uVar3;
long lVar4;
int8 uVar5;
int1 auVar6 [16];
uint uStack_d4;
uint uStack_c4;
uint uStack_a4;
uint uStack_84;
int8 local_48;
int8 local_40;
int8 local_30;
int8 local_28;
int8 local_20;
int8 local_18;
int4 local_10;
int4 uStack_c;
int8 local_8;
local_30 = param_4;
local_28 = param_5;
local_20 = param_2;
local_18 = param_3;
iVar2 = JS_IsArray(param_1,param_2,param_3);
if (iVar2 < 0) {
local_10 = 0;
local_8 = 6;
}
else if (iVar2 == 0) {
auVar6 = js_array_constructor(param_1,(ulong)uStack_84 << 0x20,3,1,&local_30);
local_10 = auVar6._0_4_;
uStack_c = auVar6._4_4_;
local_8 = auVar6._8_8_;
}
else {
auVar6 = JS_GetProperty(param_1,local_20,local_18,0x3d);
uVar5 = auVar6._8_8_;
uVar3 = auVar6._0_8_;
iVar2 = JS_IsException(uVar3,uVar5);
if (iVar2 == 0) {
iVar2 = JS_IsConstructor(param_1,uVar3,uVar5);
if (iVar2 != 0) {
lVar4 = JS_GetFunctionRealm(param_1,uVar3,uVar5);
if (lVar4 == 0) {
JS_FreeValue(param_1,uVar3,uVar5);
local_10 = 0;
local_8 = 6;
goto LAB_001ce23e;
}
if ((lVar4 != param_1) &&
(iVar2 = js_same_value(param_1,uVar3,uVar5,*(int8 *)(lVar4 + 0x68),
*(int8 *)(lVar4 + 0x70)), iVar2 != 0)) {
JS_FreeValue(param_1,uVar3,uVar5);
auVar6._8_8_ = 3;
auVar6._0_8_ = (ulong)uStack_a4 << 0x20;
}
}
local_40 = auVar6._8_8_;
local_48 = auVar6._0_8_;
iVar2 = JS_IsObject(local_48,local_40);
if (iVar2 != 0) {
auVar6 = JS_GetProperty(param_1,local_48,local_40,0xdd);
uVar3 = auVar6._8_8_;
JS_FreeValue(param_1,local_48,local_40);
iVar2 = JS_IsException(auVar6._0_8_,uVar3);
if (iVar2 != 0) {
local_10 = auVar6._0_4_;
uStack_c = auVar6._4_4_;
local_8 = uVar3;
goto LAB_001ce23e;
}
iVar2 = JS_IsNull(auVar6._0_8_,uVar3);
if (iVar2 != 0) {
auVar6._8_8_ = 3;
auVar6._0_8_ = (ulong)uStack_c4 << 0x20;
}
}
local_40 = auVar6._8_8_;
local_48 = auVar6._0_8_;
iVar2 = JS_IsUndefined(local_48,local_40);
if (iVar2 == 0) {
auVar6 = JS_CallConstructor(param_1,local_48,local_40,1,&local_30);
JS_FreeValue(param_1,local_48,local_40);
local_10 = auVar6._0_4_;
uStack_c = auVar6._4_4_;
local_8 = auVar6._8_8_;
}
else {
auVar6 = js_array_constructor(param_1,(ulong)uStack_d4 << 0x20,3,1,&local_30);
local_10 = auVar6._0_4_;
uStack_c = auVar6._4_4_;
local_8 = auVar6._8_8_;
}
}
else {
local_10 = auVar6._0_4_;
uStack_c = auVar6._4_4_;
local_8 = uVar5;
}
}
LAB_001ce23e:
auVar1._4_4_ = uStack_c;
auVar1._0_4_ = local_10;
auVar1._8_8_ = local_8;
return auVar1;
}
| |
23,144 | JS_ArraySpeciesCreate | bluesky950520[P]quickjs/quickjs.c | static JSValue JS_ArraySpeciesCreate(JSContext *ctx, JSValue obj,
JSValue len_val)
{
JSValue ctor, ret, species;
int res;
JSContext *realm;
res = JS_IsArray(ctx, obj);
if (res < 0)
return JS_EXCEPTION;
if (!res)
return js_array_constructor(ctx, JS_UNDEFINED, 1, &len_val);
ctor = JS_GetProperty(ctx, obj, JS_ATOM_constructor);
if (JS_IsException(ctor))
return ctor;
if (JS_IsConstructor(ctx, ctor)) {
/* legacy web compatibility */
realm = JS_GetFunctionRealm(ctx, ctor);
if (!realm) {
JS_FreeValue(ctx, ctor);
return JS_EXCEPTION;
}
if (realm != ctx &&
js_same_value(ctx, ctor, realm->array_ctor)) {
JS_FreeValue(ctx, ctor);
ctor = JS_UNDEFINED;
}
}
if (JS_IsObject(ctor)) {
species = JS_GetProperty(ctx, ctor, JS_ATOM_Symbol_species);
JS_FreeValue(ctx, ctor);
if (JS_IsException(species))
return species;
ctor = species;
if (JS_IsNull(ctor))
ctor = JS_UNDEFINED;
}
if (JS_IsUndefined(ctor)) {
return js_array_constructor(ctx, JS_UNDEFINED, 1, &len_val);
} else {
ret = JS_CallConstructor(ctx, ctor, 1, &len_val);
JS_FreeValue(ctx, ctor);
return ret;
}
} | O1 | c | JS_ArraySpeciesCreate:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq %rcx, (%rsp)
movq %r8, 0x8(%rsp)
callq 0x282d2
movl $0x6, %r12d
testl %eax, %eax
js 0x77f0f
movabsq $-0x100000000, %rbp # imm = 0xFFFFFFFF00000000
je 0x77e13
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl $0x3d, %ecx
movq %r15, %r8
movq %r14, %r9
pushq $0x0
pushq $0x0
callq 0x22fa3
addq $0x10, %rsp
movq %rax, %r14
movq %rdx, %r13
movq %rax, %r15
andq %rbp, %r15
movl %r13d, %eax
cmpq $0x6, %rax
je 0x77e80
movq %r14, 0x10(%rsp)
cmpl $-0x1, %eax
jne 0x77db0
movq 0x10(%rsp), %rax
testb $0x10, 0x5(%rax)
jne 0x77e88
cmpl $-0x1, %r13d
jne 0x77e0a
movl %r14d, %eax
orq %rax, %r15
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
movl $0xdd, %ecx
movq %r15, %r8
movq %r13, %r9
pushq $0x0
pushq $0x0
callq 0x22fa3
addq $0x10, %rsp
movq %rax, %r14
movq %rdx, %r12
movq 0x18(%rbx), %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x1d8c6
movl %r12d, %eax
cmpq $0x6, %rax
jne 0x77edf
movq %r14, %r15
andq %rbp, %r15
jmp 0x77f15
movq %r13, %r12
cmpl $0x3, %r12d
jne 0x77e3b
movq %rsp, %r8
movl $0x3, %edx
movq %rbx, %rdi
xorl %esi, %esi
movl $0x1, %ecx
callq 0x386b8
movq %rax, %r14
movq %rdx, %r12
andq %rax, %rbp
movq %rbp, %r15
jmp 0x77f15
movl %r14d, %eax
orq %rax, %r15
movq %rsp, %rax
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %r12, %r8
movl $0x1, %r9d
pushq $0x2
pushq %rax
callq 0x2fa61
addq $0x10, %rsp
movq %rax, %r14
movq %rdx, %r13
movq 0x18(%rbx), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1d8c6
andq %r14, %rbp
movq %rbp, %r15
movq %r13, %r12
jmp 0x77f15
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x54e81
testq %rax, %rax
je 0x77f00
cmpq %rbx, %rax
je 0x77db0
movq 0x68(%rax), %rcx
movq 0x70(%rax), %r8
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x26461
testl %eax, %eax
je 0x77db0
movq 0x18(%rbx), %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x1d8c6
xorl %r14d, %r14d
movl $0x3, %r13d
jmp 0x77db0
cmpl $0x2, %eax
jne 0x77ef5
xorl %r14d, %r14d
movl $0x3, %r12d
xorl %r15d, %r15d
jmp 0x77e0d
movq %r14, %r15
andq %rbp, %r15
jmp 0x77e0d
movq 0x18(%rbx), %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x1d8c6
xorl %r14d, %r14d
xorl %r15d, %r15d
movl %r14d, %eax
orq %r15, %rax
movq %r12, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| JS_ArraySpeciesCreate:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov [rsp+48h+var_48], rcx
mov [rsp+48h+var_40], r8
call JS_IsArray
mov r12d, 6
test eax, eax
js loc_77F0F
mov rbp, 0FFFFFFFF00000000h
jz loc_77E13
mov rdi, rbx
mov rsi, r15
mov rdx, r14
mov ecx, 3Dh ; '='
mov r8, r15
mov r9, r14
push 0
push 0
call JS_GetPropertyInternal2
add rsp, 10h
mov r14, rax
mov r13, rdx
mov r15, rax
and r15, rbp
mov eax, r13d
cmp rax, 6
jz loc_77E80
mov [rsp+48h+var_38], r14
cmp eax, 0FFFFFFFFh
jnz short loc_77DB0
mov rax, [rsp+48h+var_38]
test byte ptr [rax+5], 10h
jnz loc_77E88
loc_77DB0:
cmp r13d, 0FFFFFFFFh
jnz short loc_77E0A
mov eax, r14d
or r15, rax
mov rdi, rbx
mov rsi, r15
mov rdx, r13
mov ecx, 0DDh
mov r8, r15
mov r9, r13
push 0
push 0
call JS_GetPropertyInternal2
add rsp, 10h
mov r14, rax
mov r12, rdx
mov rdi, [rbx+18h]
mov rsi, r15
mov rdx, r13
call JS_FreeValueRT
mov eax, r12d
cmp rax, 6
jnz loc_77EDF
mov r15, r14
and r15, rbp
jmp loc_77F15
loc_77E0A:
mov r12, r13
loc_77E0D:
cmp r12d, 3
jnz short loc_77E3B
loc_77E13:
mov r8, rsp
mov edx, 3
mov rdi, rbx
xor esi, esi
mov ecx, 1
call js_array_constructor
mov r14, rax
mov r12, rdx
and rbp, rax
mov r15, rbp
jmp loc_77F15
loc_77E3B:
mov eax, r14d
or r15, rax
mov rax, rsp
mov rdi, rbx
mov rsi, r15
mov rdx, r12
mov rcx, r15
mov r8, r12
mov r9d, 1
push 2
push rax
call JS_CallConstructorInternal
add rsp, 10h
mov r14, rax
mov r13, rdx
mov rdi, [rbx+18h]
mov rsi, r15
mov rdx, r12
call JS_FreeValueRT
and rbp, r14
mov r15, rbp
loc_77E80:
mov r12, r13
jmp loc_77F15
loc_77E88:
mov rdi, rbx
mov rsi, r14
mov rdx, r13
call JS_GetFunctionRealm
test rax, rax
jz short loc_77F00
cmp rax, rbx
jz loc_77DB0
mov rcx, [rax+68h]
mov r8, [rax+70h]
mov rdi, rbx
mov rsi, r14
mov rdx, r13
call js_same_value
test eax, eax
jz loc_77DB0
mov rdi, [rbx+18h]
mov rsi, r14
mov rdx, r13
call JS_FreeValueRT
xor r14d, r14d
mov r13d, 3
jmp loc_77DB0
loc_77EDF:
cmp eax, 2
jnz short loc_77EF5
xor r14d, r14d
mov r12d, 3
xor r15d, r15d
jmp loc_77E0D
loc_77EF5:
mov r15, r14
and r15, rbp
jmp loc_77E0D
loc_77F00:
mov rdi, [rbx+18h]
mov rsi, r14
mov rdx, r13
call JS_FreeValueRT
loc_77F0F:
xor r14d, r14d
xor r15d, r15d
loc_77F15:
mov eax, r14d
or rax, r15
mov rdx, r12
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| unsigned long long JS_ArraySpeciesCreate(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
int IsArray; // eax
__m128 v15; // xmm4
__m128 v16; // xmm5
long long v17; // rdx
long long v18; // rcx
long long v19; // r8
long long v20; // r9
unsigned long long PropertyInternal2; // r14
long long v22; // r13
unsigned long long v23; // r15
_DWORD *v24; // r15
long long v25; // rdx
long long v26; // r12
unsigned long long v27; // rax
_DWORD *v28; // r15
long long FunctionRealm; // rax
_QWORD v31[2]; // [rsp+0h] [rbp-48h] BYREF
unsigned long long v32; // [rsp+10h] [rbp-38h]
v31[0] = a4;
v31[1] = a5;
IsArray = JS_IsArray(a1, a2, a3);
if ( IsArray < 0 )
goto LABEL_22;
if ( !IsArray )
{
LABEL_11:
v27 = js_array_constructor(
a1,
0LL,
3LL,
1,
(long long)v31,
a6,
a7,
a8,
a9,
*(double *)v15.m128_u64,
*(double *)v16.m128_u64,
a12,
a13);
LODWORD(PropertyInternal2) = v27;
v23 = v27 & 0xFFFFFFFF00000000LL;
return v23 | (unsigned int)PropertyInternal2;
}
PropertyInternal2 = JS_GetPropertyInternal2(a1, a2, a3, 0x3Du, a2, a3, 0LL, 0);
v22 = v17;
v23 = PropertyInternal2 & 0xFFFFFFFF00000000LL;
if ( (unsigned int)v17 == 6LL )
return v23 | (unsigned int)PropertyInternal2;
v32 = PropertyInternal2;
if ( (_DWORD)v17 == -1 && (*(_BYTE *)(v32 + 5) & 0x10) != 0 )
{
FunctionRealm = JS_GetFunctionRealm(a1, PropertyInternal2, v17, a6, a7, a8, a9, v15, v16, a12, a13, v18, v19, v20);
if ( FunctionRealm )
{
if ( FunctionRealm != a1
&& (unsigned int)js_same_value(
a1,
(_DWORD *)PropertyInternal2,
v22,
*(_DWORD **)(FunctionRealm + 104),
*(_QWORD *)(FunctionRealm + 112)) )
{
JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)PropertyInternal2, v22);
LODWORD(PropertyInternal2) = 0;
v22 = 3LL;
}
goto LABEL_6;
}
JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)PropertyInternal2, v22);
LABEL_22:
LODWORD(PropertyInternal2) = 0;
v23 = 0LL;
return v23 | (unsigned int)PropertyInternal2;
}
LABEL_6:
if ( (_DWORD)v22 != -1 )
{
v26 = v22;
goto LABEL_10;
}
v24 = (_DWORD *)((unsigned int)PropertyInternal2 | v23);
PropertyInternal2 = JS_GetPropertyInternal2(a1, (long long)v24, v22, 0xDDu, (long long)v24, v22, 0LL, 0);
v26 = v25;
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v24, v22);
if ( (unsigned int)v26 != 6LL )
{
if ( (_DWORD)v26 == 2 )
{
LODWORD(PropertyInternal2) = 0;
v26 = 3LL;
v23 = 0LL;
}
else
{
v23 = PropertyInternal2 & 0xFFFFFFFF00000000LL;
}
LABEL_10:
if ( (_DWORD)v26 != 3 )
{
v28 = (_DWORD *)((unsigned int)PropertyInternal2 | v23);
PropertyInternal2 = JS_CallConstructorInternal(
a1,
(long long)v28,
v26,
(unsigned long long)v28,
v26,
1LL,
a6,
a7,
a8,
a9,
v15,
v16,
a12,
a13,
(long long)v31,
2);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v28, v26);
v23 = PropertyInternal2 & 0xFFFFFFFF00000000LL;
return v23 | (unsigned int)PropertyInternal2;
}
goto LABEL_11;
}
v23 = PropertyInternal2 & 0xFFFFFFFF00000000LL;
return v23 | (unsigned int)PropertyInternal2;
}
| JS_ArraySpeciesCreate:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV qword ptr [RSP],RCX
MOV qword ptr [RSP + 0x8],R8
CALL 0x001282d2
MOV R12D,0x6
TEST EAX,EAX
JS 0x00177f0f
MOV RBP,-0x100000000
JZ 0x00177e13
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
MOV ECX,0x3d
MOV R8,R15
MOV R9,R14
PUSH 0x0
PUSH 0x0
CALL 0x00122fa3
ADD RSP,0x10
MOV R14,RAX
MOV R13,RDX
MOV R15,RAX
AND R15,RBP
MOV EAX,R13D
CMP RAX,0x6
JZ 0x00177e80
MOV qword ptr [RSP + 0x10],R14
CMP EAX,-0x1
JNZ 0x00177db0
MOV RAX,qword ptr [RSP + 0x10]
TEST byte ptr [RAX + 0x5],0x10
JNZ 0x00177e88
LAB_00177db0:
CMP R13D,-0x1
JNZ 0x00177e0a
MOV EAX,R14D
OR R15,RAX
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R13
MOV ECX,0xdd
MOV R8,R15
MOV R9,R13
PUSH 0x0
PUSH 0x0
CALL 0x00122fa3
ADD RSP,0x10
MOV R14,RAX
MOV R12,RDX
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R15
MOV RDX,R13
CALL 0x0011d8c6
MOV EAX,R12D
CMP RAX,0x6
JNZ 0x00177edf
MOV R15,R14
AND R15,RBP
JMP 0x00177f15
LAB_00177e0a:
MOV R12,R13
LAB_00177e0d:
CMP R12D,0x3
JNZ 0x00177e3b
LAB_00177e13:
MOV R8,RSP
MOV EDX,0x3
MOV RDI,RBX
XOR ESI,ESI
MOV ECX,0x1
CALL 0x001386b8
MOV R14,RAX
MOV R12,RDX
AND RBP,RAX
MOV R15,RBP
JMP 0x00177f15
LAB_00177e3b:
MOV EAX,R14D
OR R15,RAX
MOV RAX,RSP
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R12
MOV RCX,R15
MOV R8,R12
MOV R9D,0x1
PUSH 0x2
PUSH RAX
CALL 0x0012fa61
ADD RSP,0x10
MOV R14,RAX
MOV R13,RDX
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R15
MOV RDX,R12
CALL 0x0011d8c6
AND RBP,R14
MOV R15,RBP
LAB_00177e80:
MOV R12,R13
JMP 0x00177f15
LAB_00177e88:
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R13
CALL 0x00154e81
TEST RAX,RAX
JZ 0x00177f00
CMP RAX,RBX
JZ 0x00177db0
MOV RCX,qword ptr [RAX + 0x68]
MOV R8,qword ptr [RAX + 0x70]
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R13
CALL 0x00126461
TEST EAX,EAX
JZ 0x00177db0
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R14
MOV RDX,R13
CALL 0x0011d8c6
XOR R14D,R14D
MOV R13D,0x3
JMP 0x00177db0
LAB_00177edf:
CMP EAX,0x2
JNZ 0x00177ef5
XOR R14D,R14D
MOV R12D,0x3
XOR R15D,R15D
JMP 0x00177e0d
LAB_00177ef5:
MOV R15,R14
AND R15,RBP
JMP 0x00177e0d
LAB_00177f00:
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R14
MOV RDX,R13
CALL 0x0011d8c6
LAB_00177f0f:
XOR R14D,R14D
XOR R15D,R15D
LAB_00177f15:
MOV EAX,R14D
OR RAX,R15
MOV RDX,R12
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16]
JS_ArraySpeciesCreate
(long param_1,int8 param_2,int8 param_3,int8 param_4,int8 param_5)
{
int iVar1;
ulong uVar2;
long lVar3;
ulong uVar4;
int8 uVar5;
ulong uVar6;
int1 auVar7 [16];
int1 auVar8 [16];
int8 local_48;
int8 local_40;
ulong local_38;
local_48 = param_4;
local_40 = param_5;
iVar1 = JS_IsArray();
if (iVar1 < 0) {
LAB_00177f0f:
auVar7 = ZEXT816(6) << 0x40;
uVar6 = 0;
}
else {
if (iVar1 != 0) {
auVar7 = JS_GetPropertyInternal2(param_1,param_2,param_3,0x3d,param_2,param_3,0,0);
uVar4 = auVar7._8_8_;
uVar2 = auVar7._0_8_;
uVar6 = uVar2 & 0xffffffff00000000;
if ((uVar4 & 0xffffffff) == 6) goto LAB_00177f15;
local_38 = uVar2;
if ((auVar7._8_4_ == -1) && ((*(byte *)(uVar2 + 5) & 0x10) != 0)) {
lVar3 = JS_GetFunctionRealm(param_1,uVar2,uVar4);
if (lVar3 == 0) {
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar2,uVar4);
goto LAB_00177f0f;
}
if ((lVar3 != param_1) &&
(iVar1 = js_same_value(param_1,uVar2,uVar4,*(int8 *)(lVar3 + 0x68),
*(int8 *)(lVar3 + 0x70)), iVar1 != 0)) {
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar2,uVar4);
auVar7 = ZEXT816(3) << 0x40;
}
}
uVar5 = auVar7._8_8_;
if (auVar7._8_4_ == -1) {
uVar6 = uVar6 | auVar7._0_8_ & 0xffffffff;
auVar7 = JS_GetPropertyInternal2(param_1,uVar6,uVar5,0xdd,uVar6,uVar5,0,0);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar6,uVar5);
if ((auVar7._8_8_ & 0xffffffff) == 6) {
uVar6 = auVar7._0_8_ & 0xffffffff00000000;
goto LAB_00177f15;
}
if (auVar7._8_4_ == 2) {
auVar7 = ZEXT816(3) << 0x40;
uVar6 = 0;
}
else {
uVar6 = auVar7._0_8_ & 0xffffffff00000000;
}
}
uVar5 = auVar7._8_8_;
if (auVar7._8_4_ != 3) {
uVar6 = uVar6 | auVar7._0_8_ & 0xffffffff;
auVar7 = JS_CallConstructorInternal(param_1,uVar6,uVar5,uVar6,uVar5,1,&local_48,2);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar6,uVar5);
uVar6 = auVar7._0_8_ & 0xffffffff00000000;
goto LAB_00177f15;
}
}
auVar7 = js_array_constructor(param_1,0,3,1,&local_48);
uVar6 = auVar7._0_8_ & 0xffffffff00000000;
}
LAB_00177f15:
auVar8._0_8_ = auVar7._0_8_ & 0xffffffff | uVar6;
auVar8._8_8_ = auVar7._8_8_;
return auVar8;
}
| |
23,145 | JS_ArraySpeciesCreate | bluesky950520[P]quickjs/quickjs.c | static JSValue JS_ArraySpeciesCreate(JSContext *ctx, JSValue obj,
JSValue len_val)
{
JSValue ctor, ret, species;
int res;
JSContext *realm;
res = JS_IsArray(ctx, obj);
if (res < 0)
return JS_EXCEPTION;
if (!res)
return js_array_constructor(ctx, JS_UNDEFINED, 1, &len_val);
ctor = JS_GetProperty(ctx, obj, JS_ATOM_constructor);
if (JS_IsException(ctor))
return ctor;
if (JS_IsConstructor(ctx, ctor)) {
/* legacy web compatibility */
realm = JS_GetFunctionRealm(ctx, ctor);
if (!realm) {
JS_FreeValue(ctx, ctor);
return JS_EXCEPTION;
}
if (realm != ctx &&
js_same_value(ctx, ctor, realm->array_ctor)) {
JS_FreeValue(ctx, ctor);
ctor = JS_UNDEFINED;
}
}
if (JS_IsObject(ctor)) {
species = JS_GetProperty(ctx, ctor, JS_ATOM_Symbol_species);
JS_FreeValue(ctx, ctor);
if (JS_IsException(species))
return species;
ctor = species;
if (JS_IsNull(ctor))
ctor = JS_UNDEFINED;
}
if (JS_IsUndefined(ctor)) {
return js_array_constructor(ctx, JS_UNDEFINED, 1, &len_val);
} else {
ret = JS_CallConstructor(ctx, ctor, 1, &len_val);
JS_FreeValue(ctx, ctor);
return ret;
}
} | O2 | c | JS_ArraySpeciesCreate:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movq %rcx, 0x8(%rsp)
movq %r8, 0x10(%rsp)
callq 0x21d01
pushq $0x6
popq %r15
testl %eax, %eax
js 0x64e42
movabsq $-0x100000000, %rbp # imm = 0xFFFFFFFF00000000
je 0x64d84
pushq $0x3d
popq %rcx
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x1b043
movq %rax, %r14
movq %rdx, %r13
movq %rax, %r12
andq %rbp, %r12
cmpl $0x6, %r13d
je 0x64daa
cmpl $-0x1, %r13d
jne 0x64d38
testb $0x10, 0x5(%r14)
jne 0x64de7
cmpl $-0x1, %r13d
jne 0x64d7e
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
movl $0xdd, %ecx
callq 0x1b043
movq %rax, %r12
movq %rdx, %r15
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x1801e
cmpl $0x2, %r15d
je 0x64d84
movq %r12, %r14
andq %rbp, %r12
movq %r15, %r13
cmpl $0x6, %r15d
je 0x64e48
cmpl $0x3, %r13d
jne 0x64db2
pushq $0x3
popq %rdx
pushq $0x1
popq %rcx
leaq 0x8(%rsp), %r8
movq %rbx, %rdi
xorl %esi, %esi
callq 0x31963
movq %rax, %r14
movq %rdx, %r15
andq %rax, %rbp
movq %rbp, %r12
jmp 0x64e48
movq %r13, %r15
jmp 0x64e48
movl %r14d, %eax
orq %rax, %r12
pushq $0x1
popq %rcx
leaq 0x8(%rsp), %r8
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x283f2
movq %rax, %r14
movq %rdx, %r15
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x1801e
andq %r14, %rbp
jmp 0x64da2
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x48cd3
testq %rax, %rax
je 0x64e34
cmpq %rbx, %rax
je 0x64d38
movq 0x68(%rax), %rcx
movq 0x70(%rax), %r8
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x1ff32
testl %eax, %eax
je 0x64d38
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x1801e
jmp 0x64d84
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x1801e
xorl %r14d, %r14d
xorl %r12d, %r12d
movl %r14d, %eax
orq %r12, %rax
movq %r15, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| JS_ArraySpeciesCreate:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14, rdx
mov r12, rsi
mov rbx, rdi
mov [rsp+48h+var_40], rcx
mov [rsp+48h+var_38], r8
call JS_IsArray
push 6
pop r15
test eax, eax
js loc_64E42
mov rbp, 0FFFFFFFF00000000h
jz loc_64D84
push 3Dh ; '='
pop rcx
mov rdi, rbx
mov rsi, r12
mov rdx, r14
call JS_GetProperty
mov r14, rax
mov r13, rdx
mov r12, rax
and r12, rbp
cmp r13d, 6
jz loc_64DAA
cmp r13d, 0FFFFFFFFh
jnz short loc_64D38
test byte ptr [r14+5], 10h
jnz loc_64DE7
loc_64D38:
cmp r13d, 0FFFFFFFFh
jnz short loc_64D7E
mov rdi, rbx
mov rsi, r14
mov rdx, r13
mov ecx, 0DDh
call JS_GetProperty
mov r12, rax
mov r15, rdx
mov rdi, rbx
mov rsi, r14
mov rdx, r13
call JS_FreeValue
cmp r15d, 2
jz short loc_64D84
mov r14, r12
and r12, rbp
mov r13, r15
cmp r15d, 6
jz loc_64E48
loc_64D7E:
cmp r13d, 3
jnz short loc_64DB2
loc_64D84:
push 3
pop rdx
push 1
pop rcx
lea r8, [rsp+48h+var_40]
mov rdi, rbx
xor esi, esi
call js_array_constructor
mov r14, rax
mov r15, rdx
and rbp, rax
loc_64DA2:
mov r12, rbp
jmp loc_64E48
loc_64DAA:
mov r15, r13
jmp loc_64E48
loc_64DB2:
mov eax, r14d
or r12, rax
push 1
pop rcx
lea r8, [rsp+48h+var_40]
mov rdi, rbx
mov rsi, r12
mov rdx, r13
call JS_CallConstructor
mov r14, rax
mov r15, rdx
mov rdi, rbx
mov rsi, r12
mov rdx, r13
call JS_FreeValue
and rbp, r14
jmp short loc_64DA2
loc_64DE7:
mov rdi, rbx
mov rsi, r14
mov rdx, r13
call JS_GetFunctionRealm
test rax, rax
jz short loc_64E34
cmp rax, rbx
jz loc_64D38
mov rcx, [rax+68h]
mov r8, [rax+70h]
mov rdi, rbx
mov rsi, r14
mov rdx, r13
call js_same_value
test eax, eax
jz loc_64D38
mov rdi, rbx
mov rsi, r14
mov rdx, r13
call JS_FreeValue
jmp loc_64D84
loc_64E34:
mov rdi, rbx
mov rsi, r14
mov rdx, r13
call JS_FreeValue
loc_64E42:
xor r14d, r14d
xor r12d, r12d
loc_64E48:
mov eax, r14d
or rax, r12
mov rdx, r15
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| unsigned long long JS_ArraySpeciesCreate(
long long a1,
long long a2,
int a3,
long long a4,
long long a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
int IsArray; // eax
__m128 v15; // xmm4
__m128 v16; // xmm5
long long Property; // rax
unsigned long long v18; // rdx
long long v19; // rcx
long long v20; // r8
long long v21; // r9
unsigned long long v22; // r14
unsigned long long v23; // r13
unsigned long long v24; // r12
long long v25; // r12
unsigned long long v26; // rdx
unsigned long long v27; // r15
unsigned long long v28; // rax
unsigned long long v29; // rbp
unsigned long long v30; // r12
long long FunctionRealm; // rax
long long v33[8]; // [rsp+8h] [rbp-40h] BYREF
v33[0] = a4;
v33[1] = a5;
IsArray = JS_IsArray(a1, a2, a3);
if ( IsArray < 0 )
goto LABEL_19;
if ( !IsArray )
goto LABEL_10;
Property = JS_GetProperty(a1, a2, a3, 61);
v22 = Property;
v23 = v18;
v24 = Property & 0xFFFFFFFF00000000LL;
if ( (_DWORD)v18 == 6 )
return v24 | (unsigned int)v22;
if ( (_DWORD)v18 != -1 || (*(_BYTE *)(Property + 5) & 0x10) == 0 )
goto LABEL_6;
FunctionRealm = JS_GetFunctionRealm(a1, Property, -1, a6, a7, a8, a9, v15, v16, a12, a13, v19, v20, v21);
if ( !FunctionRealm )
{
JS_FreeValue(a1, v22, v23);
LABEL_19:
LODWORD(v22) = 0;
v24 = 0LL;
return v24 | (unsigned int)v22;
}
if ( FunctionRealm != a1
&& (unsigned int)js_same_value(
a1,
(_DWORD *)v22,
v23,
*(_DWORD **)(FunctionRealm + 104),
*(_QWORD *)(FunctionRealm + 112)) )
{
JS_FreeValue(a1, v22, v23);
goto LABEL_10;
}
LABEL_6:
if ( (_DWORD)v23 != -1 )
goto LABEL_9;
v25 = JS_GetProperty(a1, v22, -1, 221);
v27 = v26;
JS_FreeValue(a1, v22, v23);
if ( (_DWORD)v27 == 2 )
goto LABEL_10;
LODWORD(v22) = v25;
v24 = v25 & 0xFFFFFFFF00000000LL;
v23 = v27;
if ( (_DWORD)v27 != 6 )
{
LABEL_9:
if ( (_DWORD)v23 != 3 )
{
v30 = (unsigned int)v22 | v24;
v22 = JS_CallConstructor(
a1,
v30,
v23,
1u,
(long long)v33,
a6,
a7,
a8,
a9,
*(double *)v15.m128_u64,
*(double *)v16.m128_u64,
a12,
a13);
JS_FreeValue(a1, v30, v23);
v29 = v22 & 0xFFFFFFFF00000000LL;
goto LABEL_11;
}
LABEL_10:
v28 = js_array_constructor(
a1,
0LL,
3LL,
1u,
v33,
a6,
a7,
a8,
a9,
*(double *)v15.m128_u64,
*(double *)v16.m128_u64,
a12,
a13);
LODWORD(v22) = v28;
v29 = v28 & 0xFFFFFFFF00000000LL;
LABEL_11:
v24 = v29;
}
return v24 | (unsigned int)v22;
}
| JS_ArraySpeciesCreate:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,RDX
MOV R12,RSI
MOV RBX,RDI
MOV qword ptr [RSP + 0x8],RCX
MOV qword ptr [RSP + 0x10],R8
CALL 0x00121d01
PUSH 0x6
POP R15
TEST EAX,EAX
JS 0x00164e42
MOV RBP,-0x100000000
JZ 0x00164d84
PUSH 0x3d
POP RCX
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R14
CALL 0x0011b043
MOV R14,RAX
MOV R13,RDX
MOV R12,RAX
AND R12,RBP
CMP R13D,0x6
JZ 0x00164daa
CMP R13D,-0x1
JNZ 0x00164d38
TEST byte ptr [R14 + 0x5],0x10
JNZ 0x00164de7
LAB_00164d38:
CMP R13D,-0x1
JNZ 0x00164d7e
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R13
MOV ECX,0xdd
CALL 0x0011b043
MOV R12,RAX
MOV R15,RDX
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R13
CALL 0x0011801e
CMP R15D,0x2
JZ 0x00164d84
MOV R14,R12
AND R12,RBP
MOV R13,R15
CMP R15D,0x6
JZ 0x00164e48
LAB_00164d7e:
CMP R13D,0x3
JNZ 0x00164db2
LAB_00164d84:
PUSH 0x3
POP RDX
PUSH 0x1
POP RCX
LEA R8,[RSP + 0x8]
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00131963
MOV R14,RAX
MOV R15,RDX
AND RBP,RAX
LAB_00164da2:
MOV R12,RBP
JMP 0x00164e48
LAB_00164daa:
MOV R15,R13
JMP 0x00164e48
LAB_00164db2:
MOV EAX,R14D
OR R12,RAX
PUSH 0x1
POP RCX
LEA R8,[RSP + 0x8]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
CALL 0x001283f2
MOV R14,RAX
MOV R15,RDX
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
CALL 0x0011801e
AND RBP,R14
JMP 0x00164da2
LAB_00164de7:
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R13
CALL 0x00148cd3
TEST RAX,RAX
JZ 0x00164e34
CMP RAX,RBX
JZ 0x00164d38
MOV RCX,qword ptr [RAX + 0x68]
MOV R8,qword ptr [RAX + 0x70]
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R13
CALL 0x0011ff32
TEST EAX,EAX
JZ 0x00164d38
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R13
CALL 0x0011801e
JMP 0x00164d84
LAB_00164e34:
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R13
CALL 0x0011801e
LAB_00164e42:
XOR R14D,R14D
XOR R12D,R12D
LAB_00164e48:
MOV EAX,R14D
OR RAX,R12
MOV RDX,R15
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16]
JS_ArraySpeciesCreate
(long param_1,int8 param_2,int8 param_3,int8 param_4,int8 param_5)
{
int iVar1;
int iVar2;
ulong uVar3;
long lVar4;
ulong uVar5;
int8 uVar6;
int1 auVar7 [16];
int1 auVar8 [16];
int8 local_40;
int8 local_38;
local_40 = param_4;
local_38 = param_5;
iVar1 = JS_IsArray();
if (iVar1 < 0) {
LAB_00164e42:
auVar7 = ZEXT816(6) << 0x40;
uVar5 = 0;
goto LAB_00164e48;
}
if (iVar1 == 0) {
LAB_00164d84:
auVar7 = js_array_constructor(param_1,0,3,1,&local_40);
}
else {
auVar7 = JS_GetProperty(param_1,param_2,param_3,0x3d);
uVar6 = auVar7._8_8_;
uVar3 = auVar7._0_8_;
uVar5 = uVar3 & 0xffffffff00000000;
iVar1 = auVar7._8_4_;
if (iVar1 == 6) goto LAB_00164e48;
if ((iVar1 == -1) && ((*(byte *)(uVar3 + 5) & 0x10) != 0)) {
lVar4 = JS_GetFunctionRealm(param_1,uVar3,uVar6);
if (lVar4 == 0) {
JS_FreeValue(param_1,uVar3,uVar6);
goto LAB_00164e42;
}
if ((lVar4 != param_1) &&
(iVar2 = js_same_value(param_1,uVar3,uVar6,*(int8 *)(lVar4 + 0x68),
*(int8 *)(lVar4 + 0x70)), iVar2 != 0)) {
JS_FreeValue(param_1,uVar3,uVar6);
goto LAB_00164d84;
}
}
if (iVar1 == -1) {
auVar7 = JS_GetProperty(param_1,uVar3,uVar6,0xdd);
JS_FreeValue(param_1,uVar3,uVar6);
if (auVar7._8_4_ == 2) goto LAB_00164d84;
uVar5 = auVar7._0_8_ & 0xffffffff00000000;
if (auVar7._8_4_ == 6) goto LAB_00164e48;
}
uVar6 = auVar7._8_8_;
if (auVar7._8_4_ == 3) goto LAB_00164d84;
uVar5 = uVar5 | auVar7._0_8_ & 0xffffffff;
auVar7 = JS_CallConstructor(param_1,uVar5,uVar6,1,&local_40);
JS_FreeValue(param_1,uVar5,uVar6);
}
uVar5 = auVar7._0_8_ & 0xffffffff00000000;
LAB_00164e48:
auVar8._0_8_ = auVar7._0_8_ & 0xffffffff | uVar5;
auVar8._8_8_ = auVar7._8_8_;
return auVar8;
}
| |
23,146 | escape_string_for_mysql | eloqsql/mysys/charset.c | size_t escape_string_for_mysql(CHARSET_INFO *charset_info,
char *to, size_t to_length,
const char *from, size_t length,
my_bool *overflow)
{
const char *to_start= to;
const char *end, *to_end=to_start + (to_length ? to_length-1 : 2*length);
*overflow= FALSE;
for (end= from + length; from < end; from++)
{
char escape= 0;
#ifdef USE_MB
int tmp_length= my_ci_charlen(charset_info, (const uchar *) from, (const uchar *) end);
if (tmp_length > 1)
{
if (to + tmp_length > to_end)
{
*overflow= TRUE;
break;
}
while (tmp_length--)
*to++= *from++;
from--;
continue;
}
/*
If the next character appears to begin a multi-byte character, we
escape that first byte of that apparent multi-byte character. (The
character just looks like a multi-byte character -- if it were actually
a multi-byte character, it would have been passed through in the test
above.)
Without this check, we can create a problem by converting an invalid
multi-byte character into a valid one. For example, 0xbf27 is not
a valid GBK character, but 0xbf5c is. (0x27 = ', 0x5c = \)
*/
if (tmp_length < 1) /* Bad byte sequence */
escape= *from;
else
#endif
switch (*from) {
case 0: /* Must be escaped for 'mysql' */
escape= '0';
break;
case '\n': /* Must be escaped for logs */
escape= 'n';
break;
case '\r':
escape= 'r';
break;
case '\\':
escape= '\\';
break;
case '\'':
escape= '\'';
break;
case '"': /* Better safe than sorry */
escape= '"';
break;
case '\032': /* This gives problems on Win32 */
escape= 'Z';
break;
}
if (escape)
{
if (to + 2 > to_end)
{
*overflow= TRUE;
break;
}
*to++= '\\';
*to++= escape;
}
else
{
if (to + 1 > to_end)
{
*overflow= TRUE;
break;
}
*to++= *from;
}
}
*to= 0;
return (size_t) (to - to_start);
} | O3 | c | escape_string_for_mysql:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r12
leaq (%r8,%r8), %rax
subq $0x1, %r12
cmovbq %rax, %r12
movq %r9, -0x38(%rbp)
movb $0x0, (%r9)
movq %rsi, -0x30(%rbp)
movq %rsi, %rax
testq %r8, %r8
jle 0x640a7
movq %r8, %r15
movq %rcx, %r13
movq %rdi, %r14
movq -0x30(%rbp), %rbx
addq %rbx, %r12
addq %rcx, %r15
movq 0xb8(%r14), %rax
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq *0xc0(%rax)
movl %eax, %ecx
cmpl $0x2, %eax
jl 0x6401e
movl %ecx, %eax
addq %rbx, %rax
cmpq %r12, %rax
ja 0x6409d
decq %r13
movq %r13, %rdx
leaq 0x1(%rdx), %r13
leaq 0x1(%rbx), %rax
movb 0x1(%rdx), %dl
movb %dl, (%rbx)
movq %r13, %rdx
movq %rax, %rbx
decl %ecx
jne 0x64005
jmp 0x64074
movb (%r13), %dl
cmpl $0x1, %ecx
jne 0x64040
movzbl %dl, %eax
cmpl $0x19, %eax
jle 0x64055
cmpl $0x26, %eax
jg 0x64085
cmpl $0x1a, %eax
je 0x64095
cmpl $0x22, %eax
je 0x64044
jmp 0x64069
testb %dl, %dl
je 0x64067
leaq 0x2(%rbx), %rax
cmpq %r12, %rax
ja 0x6409d
movb $0x5c, (%rbx)
movb %dl, 0x1(%rbx)
jmp 0x64074
testl %eax, %eax
je 0x64091
cmpl $0xa, %eax
je 0x64099
cmpl $0xd, %eax
jne 0x64069
movb $0x72, %dl
jmp 0x64044
xorl %edx, %edx
leaq 0x1(%rbx), %rax
cmpq %r12, %rax
ja 0x6409d
movb %dl, (%rbx)
incq %r13
movq %rax, %rbx
cmpq %r15, %r13
jb 0x63fd4
jmp 0x640a7
cmpl $0x27, %eax
je 0x64044
cmpl $0x5c, %eax
je 0x64044
jmp 0x64069
movb $0x30, %dl
jmp 0x64044
movb $0x5a, %dl
jmp 0x64044
movb $0x6e, %dl
jmp 0x64044
movq -0x38(%rbp), %rax
movb $0x1, (%rax)
movq %rbx, %rax
movb $0x0, (%rax)
subq -0x30(%rbp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| escape_string_for_mysql:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r12, rdx
lea rax, [r8+r8]
sub r12, 1
cmovb r12, rax
mov [rbp+var_38], r9
mov byte ptr [r9], 0
mov [rbp+var_30], rsi
mov rax, rsi
test r8, r8
jle loc_640A7
mov r15, r8
mov r13, rcx
mov r14, rdi
mov rbx, [rbp+var_30]
add r12, rbx
add r15, rcx
loc_63FD4:
mov rax, [r14+0B8h]
mov rdi, r14
mov rsi, r13
mov rdx, r15
call qword ptr [rax+0C0h]
mov ecx, eax
cmp eax, 2
jl short loc_6401E
mov eax, ecx
add rax, rbx
cmp rax, r12
ja loc_6409D
dec r13
mov rdx, r13
loc_64005:
lea r13, [rdx+1]
lea rax, [rbx+1]
mov dl, [rdx+1]
mov [rbx], dl
mov rdx, r13
mov rbx, rax
dec ecx
jnz short loc_64005
jmp short loc_64074
loc_6401E:
mov dl, [r13+0]
cmp ecx, 1
jnz short loc_64040
movzx eax, dl
cmp eax, 19h
jle short loc_64055
cmp eax, 26h ; '&'
jg short loc_64085
cmp eax, 1Ah
jz short loc_64095
cmp eax, 22h ; '"'
jz short loc_64044
jmp short loc_64069
loc_64040:
test dl, dl
jz short loc_64067
loc_64044:
lea rax, [rbx+2]
cmp rax, r12
ja short loc_6409D
mov byte ptr [rbx], 5Ch ; '\'
mov [rbx+1], dl
jmp short loc_64074
loc_64055:
test eax, eax
jz short loc_64091
cmp eax, 0Ah
jz short loc_64099
cmp eax, 0Dh
jnz short loc_64069
mov dl, 72h ; 'r'
jmp short loc_64044
loc_64067:
xor edx, edx
loc_64069:
lea rax, [rbx+1]
cmp rax, r12
ja short loc_6409D
mov [rbx], dl
loc_64074:
inc r13
mov rbx, rax
cmp r13, r15
jb loc_63FD4
jmp short loc_640A7
loc_64085:
cmp eax, 27h ; '''
jz short loc_64044
cmp eax, 5Ch ; '\'
jz short loc_64044
jmp short loc_64069
loc_64091:
mov dl, 30h ; '0'
jmp short loc_64044
loc_64095:
mov dl, 5Ah ; 'Z'
jmp short loc_64044
loc_64099:
mov dl, 6Eh ; 'n'
jmp short loc_64044
loc_6409D:
mov rax, [rbp+var_38]
mov byte ptr [rax], 1
mov rax, rbx
loc_640A7:
mov byte ptr [rax], 0
sub rax, [rbp+var_30]
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _BYTE * escape_string_for_mysql(
long long a1,
unsigned __int8 *a2,
long long a3,
unsigned __int8 *a4,
long long a5,
_BYTE *a6)
{
long long v6; // r12
unsigned __int8 *v7; // rax
unsigned __int8 *v8; // r13
unsigned __int8 *v9; // rbx
unsigned long long v10; // r12
unsigned long long v11; // r15
int v12; // ecx
unsigned __int8 *v13; // rdx
unsigned __int8 v14; // dl
v6 = a3 - 1;
if ( !a3 )
v6 = 2 * a5;
*a6 = 0;
v7 = a2;
if ( a5 > 0 )
{
v8 = a4;
v9 = a2;
v10 = (unsigned long long)&a2[v6];
v11 = (unsigned long long)&a4[a5];
do
{
v12 = (*(long long ( **)(long long, unsigned __int8 *, unsigned long long))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
v8,
v11);
if ( v12 >= 2 )
{
if ( (unsigned long long)&v9[v12] > v10 )
goto LABEL_34;
v13 = v8 - 1;
do
{
v8 = v13 + 1;
v7 = v9 + 1;
*v9++ = *++v13;
--v12;
}
while ( v12 );
goto LABEL_26;
}
v14 = *v8;
if ( v12 == 1 )
{
if ( v14 <= 0x19u )
{
switch ( v14 )
{
case 0u:
v14 = 48;
goto LABEL_17;
case 0xAu:
v14 = 110;
goto LABEL_17;
case 0xDu:
v14 = 114;
LABEL_17:
v7 = v9 + 2;
if ( (unsigned long long)(v9 + 2) > v10 )
goto LABEL_34;
*v9 = 92;
v9[1] = v14;
goto LABEL_26;
}
}
else if ( v14 > 0x26u )
{
if ( v14 == 39 || v14 == 92 )
goto LABEL_17;
}
else
{
if ( v14 == 26 )
{
v14 = 90;
goto LABEL_17;
}
if ( v14 == 34 )
goto LABEL_17;
}
}
else
{
if ( v14 )
goto LABEL_17;
v14 = 0;
}
v7 = v9 + 1;
if ( (unsigned long long)(v9 + 1) > v10 )
{
LABEL_34:
*a6 = 1;
v7 = v9;
break;
}
*v9 = v14;
LABEL_26:
++v8;
v9 = v7;
}
while ( (unsigned long long)v8 < v11 );
}
*v7 = 0;
return (_BYTE *)(v7 - a2);
}
| escape_string_for_mysql:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R12,RDX
LEA RAX,[R8 + R8*0x1]
SUB R12,0x1
CMOVC R12,RAX
MOV qword ptr [RBP + -0x38],R9
MOV byte ptr [R9],0x0
MOV qword ptr [RBP + -0x30],RSI
MOV RAX,RSI
TEST R8,R8
JLE 0x001640a7
MOV R15,R8
MOV R13,RCX
MOV R14,RDI
MOV RBX,qword ptr [RBP + -0x30]
ADD R12,RBX
ADD R15,RCX
LAB_00163fd4:
MOV RAX,qword ptr [R14 + 0xb8]
MOV RDI,R14
MOV RSI,R13
MOV RDX,R15
CALL qword ptr [RAX + 0xc0]
MOV ECX,EAX
CMP EAX,0x2
JL 0x0016401e
MOV EAX,ECX
ADD RAX,RBX
CMP RAX,R12
JA 0x0016409d
DEC R13
MOV RDX,R13
LAB_00164005:
LEA R13,[RDX + 0x1]
LEA RAX,[RBX + 0x1]
MOV DL,byte ptr [RDX + 0x1]
MOV byte ptr [RBX],DL
MOV RDX,R13
MOV RBX,RAX
DEC ECX
JNZ 0x00164005
JMP 0x00164074
LAB_0016401e:
MOV DL,byte ptr [R13]
CMP ECX,0x1
JNZ 0x00164040
MOVZX EAX,DL
CMP EAX,0x19
JLE 0x00164055
CMP EAX,0x26
JG 0x00164085
CMP EAX,0x1a
JZ 0x00164095
CMP EAX,0x22
JZ 0x00164044
JMP 0x00164069
LAB_00164040:
TEST DL,DL
JZ 0x00164067
LAB_00164044:
LEA RAX,[RBX + 0x2]
CMP RAX,R12
JA 0x0016409d
MOV byte ptr [RBX],0x5c
MOV byte ptr [RBX + 0x1],DL
JMP 0x00164074
LAB_00164055:
TEST EAX,EAX
JZ 0x00164091
CMP EAX,0xa
JZ 0x00164099
CMP EAX,0xd
JNZ 0x00164069
MOV DL,0x72
JMP 0x00164044
LAB_00164067:
XOR EDX,EDX
LAB_00164069:
LEA RAX,[RBX + 0x1]
CMP RAX,R12
JA 0x0016409d
MOV byte ptr [RBX],DL
LAB_00164074:
INC R13
MOV RBX,RAX
CMP R13,R15
JC 0x00163fd4
JMP 0x001640a7
LAB_00164085:
CMP EAX,0x27
JZ 0x00164044
CMP EAX,0x5c
JZ 0x00164044
JMP 0x00164069
LAB_00164091:
MOV DL,0x30
JMP 0x00164044
LAB_00164095:
MOV DL,0x5a
JMP 0x00164044
LAB_00164099:
MOV DL,0x6e
JMP 0x00164044
LAB_0016409d:
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX],0x1
MOV RAX,RBX
LAB_001640a7:
MOV byte ptr [RAX],0x0
SUB RAX,qword ptr [RBP + -0x30]
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long escape_string_for_mysql
(long param_1,byte *param_2,long param_3,byte *param_4,long param_5,
int1 *param_6)
{
uint uVar1;
byte *pbVar2;
ulong uVar3;
byte bVar4;
byte *pbVar5;
byte *pbVar6;
long lVar7;
byte *pbVar8;
byte *pbVar9;
lVar7 = param_3 + -1;
if (param_3 == 0) {
lVar7 = param_5 * 2;
}
*param_6 = 0;
pbVar2 = param_2;
if (0 < param_5) {
pbVar8 = param_2 + lVar7;
pbVar9 = param_4 + param_5;
pbVar6 = param_2;
do {
uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_4,pbVar9);
uVar3 = (ulong)uVar1;
if ((int)uVar1 < 2) {
bVar4 = *param_4;
if (uVar1 == 1) {
if (bVar4 < 0x1a) {
if (bVar4 == 0) {
bVar4 = 0x30;
}
else if (bVar4 == 10) {
bVar4 = 0x6e;
}
else {
if (bVar4 != 0xd) goto LAB_00164069;
bVar4 = 0x72;
}
}
else if (bVar4 < 0x27) {
if (bVar4 == 0x1a) {
bVar4 = 0x5a;
}
else if (bVar4 != 0x22) goto LAB_00164069;
}
else if ((bVar4 != 0x27) && (bVar4 != 0x5c)) {
LAB_00164069:
pbVar2 = pbVar6 + 1;
if (pbVar8 < pbVar2) goto LAB_0016409d;
*pbVar6 = bVar4;
goto LAB_00164074;
}
}
else if (bVar4 == 0) {
bVar4 = 0;
goto LAB_00164069;
}
pbVar2 = pbVar6 + 2;
if (pbVar8 < pbVar2) goto LAB_0016409d;
*pbVar6 = 0x5c;
pbVar6[1] = bVar4;
}
else {
if (pbVar8 < pbVar6 + uVar3) {
LAB_0016409d:
*param_6 = 1;
pbVar2 = pbVar6;
break;
}
pbVar5 = param_4 + -1;
do {
param_4 = pbVar5 + 1;
pbVar2 = pbVar6 + 1;
*pbVar6 = pbVar5[1];
uVar1 = (int)uVar3 - 1;
uVar3 = (ulong)uVar1;
pbVar5 = param_4;
pbVar6 = pbVar2;
} while (uVar1 != 0);
}
LAB_00164074:
param_4 = param_4 + 1;
pbVar6 = pbVar2;
} while (param_4 < pbVar9);
}
*pbVar2 = 0;
return (long)pbVar2 - (long)param_2;
}
| |
23,147 | google::protobuf::ExistingFileMatchesProto(google::protobuf::FileDescriptor const*, google::protobuf::FileDescriptorProto const&) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc | static bool ExistingFileMatchesProto(const FileDescriptor* existing_file,
const FileDescriptorProto& proto) {
FileDescriptorProto existing_proto;
existing_file->CopyTo(&existing_proto);
// TODO(liujisi): Remove it when CopyTo supports copying syntax params when
// syntax="proto2".
if (existing_file->syntax() == FileDescriptor::SYNTAX_PROTO2 &&
proto.has_syntax()) {
existing_proto.set_syntax(
existing_file->SyntaxName(existing_file->syntax()));
}
return existing_proto.SerializeAsString() == proto.SerializeAsString();
} | O0 | cpp | google::protobuf::ExistingFileMatchesProto(google::protobuf::FileDescriptor const*, google::protobuf::FileDescriptorProto const&):
subq $0x198, %rsp # imm = 0x198
movq %rdi, 0x170(%rsp)
movq %rsi, 0x168(%rsp)
leaq 0x90(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x758e0
movq 0x30(%rsp), %rsi
movq 0x170(%rsp), %rdi
callq 0x37970
jmp 0x47a9d
movq 0x170(%rsp), %rdi
callq 0x75b20
cmpl $0x2, %eax
jne 0x47bad
movq 0x168(%rsp), %rdi
callq 0x83e40
movb %al, 0x2f(%rsp)
jmp 0x47ac6
movb 0x2f(%rsp), %al
testb $0x1, %al
jne 0x47ad3
jmp 0x47bad
movq 0x170(%rsp), %rdi
callq 0x75b20
movl %eax, %edi
callq 0x31e10
movq %rax, 0x20(%rsp)
jmp 0x47aee
movq 0x20(%rsp), %rax
movq %rax, 0x78(%rsp)
leaq 0x90(%rsp), %rax
movq %rax, 0x180(%rsp)
leaq 0x78(%rsp), %rax
movq %rax, 0x178(%rsp)
movq 0x180(%rsp), %rdi
movq %rdi, %rax
addq $0x10, %rax
movq %rax, 0x190(%rsp)
movl $0x0, 0x18c(%rsp)
movq 0x190(%rsp), %rax
movslq 0x18c(%rsp), %rcx
movl (%rax,%rcx,4), %edx
orl $0x4, %edx
movl %edx, (%rax,%rcx,4)
movq %rdi, %rax
addq $0xc0, %rax
movq %rax, 0x8(%rsp)
movq 0x178(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x80180
movq %rax, 0x18(%rsp)
jmp 0x47b7a
movq 0x18(%rsp), %rdx
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x98820
jmp 0x47b90
jmp 0x47b92
jmp 0x47bad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
jmp 0x47c35
leaq 0x58(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x1b06e0
jmp 0x47bc1
movq 0x168(%rsp), %rsi
leaq 0x38(%rsp), %rdi
callq 0x1b06e0
jmp 0x47bd5
leaq 0x58(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x17780
movb %al, 0x7(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x13290
leaq 0x58(%rsp), %rdi
callq 0x13290
leaq 0x90(%rsp), %rdi
callq 0xa9790
movb 0x7(%rsp), %al
andb $0x1, %al
addq $0x198, %rsp # imm = 0x198
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x88(%rsp)
movl %eax, 0x84(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x13290
leaq 0x90(%rsp), %rdi
callq 0xa9790
movq 0x88(%rsp), %rdi
callq 0x13750
nop
| _ZN6google8protobufL24ExistingFileMatchesProtoEPKNS0_14FileDescriptorERKNS0_19FileDescriptorProtoE:
sub rsp, 198h
mov [rsp+198h+var_28], rdi
mov [rsp+198h+var_30], rsi
lea rdi, [rsp+198h+var_108]; this
mov [rsp+198h+var_168], rdi
call _ZN6google8protobuf19FileDescriptorProtoC2Ev; google::protobuf::FileDescriptorProto::FileDescriptorProto(void)
mov rsi, [rsp+198h+var_168]; google::protobuf::FileDescriptorProto *
mov rdi, [rsp+198h+var_28]; this
call _ZNK6google8protobuf14FileDescriptor6CopyToEPNS0_19FileDescriptorProtoE; google::protobuf::FileDescriptor::CopyTo(google::protobuf::FileDescriptorProto *)
jmp short $+2
loc_47A9D:
mov rdi, [rsp+198h+var_28]; this
call _ZNK6google8protobuf14FileDescriptor6syntaxEv; google::protobuf::FileDescriptor::syntax(void)
cmp eax, 2
jnz loc_47BAD
mov rdi, [rsp+198h+var_30]; this
call _ZNK6google8protobuf19FileDescriptorProto10has_syntaxEv; google::protobuf::FileDescriptorProto::has_syntax(void)
mov [rsp+198h+var_169], al
jmp short $+2
loc_47AC6:
mov al, [rsp+198h+var_169]
test al, 1
jnz short loc_47AD3
jmp loc_47BAD
loc_47AD3:
mov rdi, [rsp+198h+var_28]; this
call _ZNK6google8protobuf14FileDescriptor6syntaxEv; google::protobuf::FileDescriptor::syntax(void)
mov edi, eax
call _ZN6google8protobuf14FileDescriptor10SyntaxNameENS1_6SyntaxE; google::protobuf::FileDescriptor::SyntaxName(google::protobuf::FileDescriptor::Syntax)
mov [rsp+198h+var_178], rax
jmp short $+2
loc_47AEE:
mov rax, [rsp+198h+var_178]
mov [rsp+198h+var_120], rax
lea rax, [rsp+198h+var_108]
mov [rsp+198h+var_18], rax
lea rax, [rsp+198h+var_120]
mov [rsp+198h+var_20], rax
mov rdi, [rsp+198h+var_18]; this
mov rax, rdi
add rax, 10h
mov [rsp+198h+var_8], rax
mov [rsp+198h+var_C], 0
mov rax, [rsp+198h+var_8]
movsxd rcx, [rsp+198h+var_C]
mov edx, [rax+rcx*4]
or edx, 4
mov [rax+rcx*4], edx
mov rax, rdi
add rax, 0C0h
mov [rsp+198h+var_190], rax
mov rax, [rsp+198h+var_20]
mov rax, [rax]
mov [rsp+198h+var_188], rax
call _ZNK6google8protobuf11MessageLite21GetArenaForAllocationEv; google::protobuf::MessageLite::GetArenaForAllocation(void)
mov [rsp+198h+var_180], rax
jmp short $+2
loc_47B7A:
mov rdx, [rsp+198h+var_180]; google::protobuf::Arena *
mov rsi, [rsp+198h+var_188]; char *
mov rdi, [rsp+198h+var_190]; this
call _ZN6google8protobuf8internal14ArenaStringPtr3SetEPKcPNS0_5ArenaE; google::protobuf::internal::ArenaStringPtr::Set(char const*,google::protobuf::Arena *)
jmp short $+2
loc_47B90:
jmp short $+2
loc_47B92:
jmp short loc_47BAD
mov rcx, rax
mov eax, edx
mov [rsp+arg_80], rcx
mov [rsp+arg_7C], eax
jmp loc_47C35
loc_47BAD:
lea rdi, [rsp+198h+var_140]
lea rsi, [rsp+198h+var_108]
call _ZNK6google8protobuf11MessageLite17SerializeAsStringB5cxx11Ev; google::protobuf::MessageLite::SerializeAsString(void)
jmp short $+2
loc_47BC1:
mov rsi, [rsp+198h+var_30]
lea rdi, [rsp+198h+var_160]
call _ZNK6google8protobuf11MessageLite17SerializeAsStringB5cxx11Ev; google::protobuf::MessageLite::SerializeAsString(void)
jmp short $+2
loc_47BD5:
lea rdi, [rsp+198h+var_140]
lea rsi, [rsp+198h+var_160]
call _ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_
mov [rsp+198h+var_191], al
lea rdi, [rsp+198h+var_160]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+198h+var_140]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+198h+var_108]; this
call _ZN6google8protobuf19FileDescriptorProtoD2Ev; google::protobuf::FileDescriptorProto::~FileDescriptorProto()
mov al, [rsp+198h+var_191]
and al, 1
add rsp, 198h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_80], rcx
mov [rsp+arg_7C], eax
lea rdi, [rsp+arg_50]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_47C35:
lea rdi, [rsp+arg_88]; this
call _ZN6google8protobuf19FileDescriptorProtoD2Ev; google::protobuf::FileDescriptorProto::~FileDescriptorProto()
mov rdi, [rsp+arg_80]
call __Unwind_Resume
| char google::protobuf::ExistingFileMatchesProto(
google::protobuf *this,
const google::protobuf::FileDescriptor *a2,
const google::protobuf::FileDescriptorProto *a3)
{
int v3; // edx
int v4; // ecx
int v5; // r8d
int v6; // r9d
int v7; // eax
int v8; // edx
int v9; // ecx
int v10; // r8d
int v11; // r9d
char v13; // [rsp+7h] [rbp-191h]
char *v14; // [rsp+10h] [rbp-188h]
google::protobuf::Arena *ArenaForAllocation; // [rsp+18h] [rbp-180h]
_BYTE v16[32]; // [rsp+38h] [rbp-160h] BYREF
_BYTE v17[32]; // [rsp+58h] [rbp-140h] BYREF
const char *v18; // [rsp+78h] [rbp-120h] BYREF
_BYTE v19[16]; // [rsp+90h] [rbp-108h] BYREF
int v20; // [rsp+A0h] [rbp-F8h] BYREF
long long v21; // [rsp+150h] [rbp-48h] BYREF
google::protobuf::FileDescriptorProto *v22; // [rsp+168h] [rbp-30h]
google::protobuf::FileDescriptor *v23; // [rsp+170h] [rbp-28h]
const char **v24; // [rsp+178h] [rbp-20h]
google::protobuf::MessageLite *v25; // [rsp+180h] [rbp-18h]
int v26; // [rsp+18Ch] [rbp-Ch]
int *v27; // [rsp+190h] [rbp-8h]
v23 = this;
v22 = a2;
google::protobuf::FileDescriptorProto::FileDescriptorProto((google::protobuf::FileDescriptorProto *)v19);
google::protobuf::FileDescriptor::CopyTo(v23, (google::protobuf::FileDescriptorProto *)v19);
if ( (unsigned int)google::protobuf::FileDescriptor::syntax(v23) == 2
&& (google::protobuf::FileDescriptorProto::has_syntax(v22) & 1) != 0 )
{
v7 = google::protobuf::FileDescriptor::syntax(v23);
v18 = google::protobuf::FileDescriptor::SyntaxName(v7);
v25 = (google::protobuf::MessageLite *)v19;
v24 = &v18;
v27 = &v20;
v26 = 0;
v20 |= 4u;
v14 = (char *)v18;
ArenaForAllocation = (google::protobuf::Arena *)google::protobuf::MessageLite::GetArenaForAllocation((google::protobuf::MessageLite *)v19);
google::protobuf::internal::ArenaStringPtr::Set(
(google::protobuf::internal::ArenaStringPtr *)&v21,
v14,
ArenaForAllocation);
}
google::protobuf::MessageLite::SerializeAsString[abi:cxx11]((unsigned int)v17, (unsigned int)v19, v3, v4, v5, v6);
google::protobuf::MessageLite::SerializeAsString[abi:cxx11]((unsigned int)v16, (_DWORD)v22, v8, v9, v10, v11);
v13 = std::operator==<char>((long long)v17, (long long)v16);
std::string::~string(v16);
std::string::~string(v17);
google::protobuf::FileDescriptorProto::~FileDescriptorProto((google::protobuf::FileDescriptorProto *)v19);
return v13 & 1;
}
| ExistingFileMatchesProto:
SUB RSP,0x198
MOV qword ptr [RSP + 0x170],RDI
MOV qword ptr [RSP + 0x168],RSI
LEA RDI,[RSP + 0x90]
MOV qword ptr [RSP + 0x30],RDI
CALL 0x001758e0
MOV RSI,qword ptr [RSP + 0x30]
MOV RDI,qword ptr [RSP + 0x170]
LAB_00147a96:
CALL 0x00137970
JMP 0x00147a9d
LAB_00147a9d:
MOV RDI,qword ptr [RSP + 0x170]
CALL 0x00175b20
CMP EAX,0x2
JNZ 0x00147bad
MOV RDI,qword ptr [RSP + 0x168]
CALL 0x00183e40
MOV byte ptr [RSP + 0x2f],AL
JMP 0x00147ac6
LAB_00147ac6:
MOV AL,byte ptr [RSP + 0x2f]
TEST AL,0x1
JNZ 0x00147ad3
JMP 0x00147bad
LAB_00147ad3:
MOV RDI,qword ptr [RSP + 0x170]
CALL 0x00175b20
MOV EDI,EAX
CALL 0x00131e10
MOV qword ptr [RSP + 0x20],RAX
JMP 0x00147aee
LAB_00147aee:
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x78],RAX
LEA RAX,[RSP + 0x90]
MOV qword ptr [RSP + 0x180],RAX
LEA RAX,[RSP + 0x78]
MOV qword ptr [RSP + 0x178],RAX
MOV RDI,qword ptr [RSP + 0x180]
MOV RAX,RDI
ADD RAX,0x10
MOV qword ptr [RSP + 0x190],RAX
MOV dword ptr [RSP + 0x18c],0x0
MOV RAX,qword ptr [RSP + 0x190]
MOVSXD RCX,dword ptr [RSP + 0x18c]
MOV EDX,dword ptr [RAX + RCX*0x4]
OR EDX,0x4
MOV dword ptr [RAX + RCX*0x4],EDX
MOV RAX,RDI
ADD RAX,0xc0
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x178]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00180180
MOV qword ptr [RSP + 0x18],RAX
JMP 0x00147b7a
LAB_00147b7a:
MOV RDX,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00198820
JMP 0x00147b90
LAB_00147b90:
JMP 0x00147b92
LAB_00147b92:
JMP 0x00147bad
LAB_00147bad:
LEA RDI,[RSP + 0x58]
LEA RSI,[RSP + 0x90]
CALL 0x002b06e0
JMP 0x00147bc1
LAB_00147bc1:
MOV RSI,qword ptr [RSP + 0x168]
LAB_00147bc9:
LEA RDI,[RSP + 0x38]
CALL 0x002b06e0
LAB_00147bd3:
JMP 0x00147bd5
LAB_00147bd5:
LEA RDI,[RSP + 0x58]
LEA RSI,[RSP + 0x38]
CALL 0x00117780
MOV byte ptr [RSP + 0x7],AL
LEA RDI,[RSP + 0x38]
CALL 0x00113290
LEA RDI,[RSP + 0x58]
CALL 0x00113290
LEA RDI,[RSP + 0x90]
CALL 0x001a9790
MOV AL,byte ptr [RSP + 0x7]
AND AL,0x1
ADD RSP,0x198
RET
|
/* WARNING: Restarted to delay deadcode elimination for space: stack */
/* google::protobuf::ExistingFileMatchesProto(google::protobuf::FileDescriptor const*,
google::protobuf::FileDescriptorProto const&) */
ulong google::protobuf::ExistingFileMatchesProto
(FileDescriptor *param_1,FileDescriptorProto *param_2)
{
byte bVar1;
int1 uVar2;
int iVar3;
int4 uVar4;
char *pcVar5;
Arena *pAVar6;
int8 uVar7;
string local_160 [32];
string local_140 [32];
char *local_120 [3];
FileDescriptorProto local_108 [16];
uint auStack_f8 [44];
ArenaStringPtr aAStack_48 [24];
FileDescriptorProto *local_30;
FileDescriptor *local_28;
char **local_20;
MessageLite *local_18;
int4 local_c;
uint *local_8;
local_30 = param_2;
local_28 = param_1;
FileDescriptorProto::FileDescriptorProto(local_108);
/* try { // try from 00147a96 to 00147bbe has its CatchHandler @ 00147b94 */
FileDescriptor::CopyTo(local_28,local_108);
iVar3 = FileDescriptor::syntax(local_28);
if ((iVar3 == 2) && (bVar1 = FileDescriptorProto::has_syntax(local_30), (bVar1 & 1) != 0)) {
uVar4 = FileDescriptor::syntax(local_28);
pcVar5 = (char *)FileDescriptor::SyntaxName(uVar4);
local_18 = (MessageLite *)local_108;
local_20 = local_120;
local_8 = auStack_f8;
local_c = 0;
auStack_f8[0] = auStack_f8[0] | 4;
local_120[0] = pcVar5;
pAVar6 = (Arena *)MessageLite::GetArenaForAllocation(local_18);
internal::ArenaStringPtr::Set(aAStack_48,pcVar5,pAVar6);
}
MessageLite::SerializeAsString_abi_cxx11_();
/* try { // try from 00147bc9 to 00147bd2 has its CatchHandler @ 00147c17 */
MessageLite::SerializeAsString_abi_cxx11_();
uVar2 = std::operator==(local_140,local_160);
std::__cxx11::string::~string(local_160);
std::__cxx11::string::~string(local_140);
uVar7 = FileDescriptorProto::~FileDescriptorProto(local_108);
return CONCAT71((int7)((ulong)uVar7 >> 8),uVar2) & 0xffffffffffffff01;
}
| |
23,148 | google::protobuf::FieldDescriptor::CopyJsonNameTo(google::protobuf::FieldDescriptorProto*) const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc | void FieldDescriptor::CopyJsonNameTo(FieldDescriptorProto* proto) const {
proto->set_json_name(json_name());
} | O3 | cpp | google::protobuf::FieldDescriptor::CopyJsonNameTo(google::protobuf::FieldDescriptorProto*) const:
movq %rsi, %rax
movq 0x8(%rdi), %rcx
movzbl 0x3(%rdi), %esi
orl $0x10, 0x10(%rax)
movq 0x8(%rax), %rdi
movq %rdi, %rdx
andq $-0x4, %rdx
testb $0x1, %dil
jne 0xc304f
addq $0x38, %rax
andl $0x70, %esi
leaq (%rcx,%rsi,2), %rsi
movq %rax, %rdi
jmp 0x786ce
movq (%rdx), %rdx
jmp 0xc303c
| _ZNK6google8protobuf15FieldDescriptor14CopyJsonNameToEPNS0_20FieldDescriptorProtoE:
mov rax, rsi
mov rcx, [rdi+8]
movzx esi, byte ptr [rdi+3]
or dword ptr [rax+10h], 10h
mov rdi, [rax+8]
mov rdx, rdi
and rdx, 0FFFFFFFFFFFFFFFCh
test dil, 1
jnz short loc_C304F
loc_C303C:
add rax, 38h ; '8'
and esi, 70h
lea rsi, [rcx+rsi*2]
mov rdi, rax
jmp _ZN6google8protobuf8internal14ArenaStringPtr3SetERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS0_5ArenaE; google::protobuf::internal::ArenaStringPtr::Set(std::string const&,google::protobuf::Arena *)
loc_C304F:
mov rdx, [rdx]
jmp short loc_C303C
| long long google::protobuf::FieldDescriptor::CopyJsonNameTo(
google::protobuf::FieldDescriptor *this,
google::protobuf::FieldDescriptorProto *a2)
{
long long v3; // rcx
char v4; // si
google::protobuf::Arena *v5; // rdx
v3 = *((_QWORD *)this + 1);
v4 = *((_BYTE *)this + 3);
*((_DWORD *)a2 + 4) |= 0x10u;
v5 = (google::protobuf::Arena *)(*((_QWORD *)a2 + 1) & 0xFFFFFFFFFFFFFFFCLL);
if ( (*((_QWORD *)a2 + 1) & 1) != 0 )
v5 = *(google::protobuf::Arena **)v5;
return google::protobuf::internal::ArenaStringPtr::Set((long long *)a2 + 7, v3 + 2LL * (v4 & 0x70), v5);
}
| CopyJsonNameTo:
MOV RAX,RSI
MOV RCX,qword ptr [RDI + 0x8]
MOVZX ESI,byte ptr [RDI + 0x3]
OR dword ptr [RAX + 0x10],0x10
MOV RDI,qword ptr [RAX + 0x8]
MOV RDX,RDI
AND RDX,-0x4
TEST DIL,0x1
JNZ 0x001c304f
LAB_001c303c:
ADD RAX,0x38
AND ESI,0x70
LEA RSI,[RCX + RSI*0x2]
MOV RDI,RAX
JMP 0x001786ce
LAB_001c304f:
MOV RDX,qword ptr [RDX]
JMP 0x001c303c
|
/* google::protobuf::FieldDescriptor::CopyJsonNameTo(google::protobuf::FieldDescriptorProto*) const
*/
void __thiscall
google::protobuf::FieldDescriptor::CopyJsonNameTo
(FieldDescriptor *this,FieldDescriptorProto *param_1)
{
FieldDescriptor FVar1;
long lVar2;
Arena *pAVar3;
lVar2 = *(long *)(this + 8);
FVar1 = this[3];
*(uint *)(param_1 + 0x10) = *(uint *)(param_1 + 0x10) | 0x10;
pAVar3 = (Arena *)(*(ulong *)(param_1 + 8) & 0xfffffffffffffffc);
if ((*(ulong *)(param_1 + 8) & 1) != 0) {
pAVar3 = *(Arena **)pAVar3;
}
internal::ArenaStringPtr::Set
((ArenaStringPtr *)(param_1 + 0x38),(string *)(lVar2 + (ulong)((byte)FVar1 & 0x70) * 2),
pAVar3);
return;
}
| |
23,149 | unsigned long OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::Populate<512u>(OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<unsigned char, 512u, false>&, OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::BuildDescriptor const&, bool) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/../tmr/../tmr/neighborhoodBuilder.h | inline size_t NeighborhoodBuilder::Populate(
StackBuffer<SIZE>& data, BuildDescriptor const& desc, bool remapVerts) {
assert(desc.faceIndex != INDEX_INVALID && desc.startingEdge >= 0);
if (desc.fvarChannel < 0)
gatherVertexTopology(desc);
else
gatherFVarTopology(desc);
size_t byteSize = computeByteSize(remapVerts);
data.SetSize((unsigned int)byteSize);
if (byteSize > 0)
populateData(data, data.GetSize(), desc.startingEdge, remapVerts);
return byteSize;
} | O2 | c | unsigned long OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::Populate<512u>(OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<unsigned char, 512u, false>&, OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::BuildDescriptor const&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
cmpl $-0x1, 0x8(%rdx)
je 0xb8e5f
movq %rdx, %r14
cmpl $0x0, 0xc(%rdx)
js 0xb8e5f
movl %ecx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
cmpl $0x0, 0x10(%r14)
js 0xb8e11
movq %rbx, %rdi
movq %r14, %rsi
callq 0x541d0
jmp 0xb8e1c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x55490
movzbl %bpl, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x543b0
movq %rax, %r12
movq %r15, %rdi
movl %r12d, %esi
callq 0x52fe0
testq %r12, %r12
je 0xb8e53
movq (%r15), %rsi
movl 0x8(%r15), %edx
movl 0xc(%r14), %ecx
movq %rbx, %rdi
movl %ebp, %r8d
callq 0x53c90
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x17822(%rip), %rdi # 0xd0688
leaq 0x17855(%rip), %rsi # 0xd06c2
leaq 0x178bf(%rip), %rcx # 0xd0733
movl $0xb7, %edx
callq 0x512a0
| _ZN10OpenSubdiv6v3_6_03Tmr19NeighborhoodBuilder8PopulateILj512EEEmRNS0_3Vtr8internal11StackBufferIhXT_ELb0EEERKNS2_15BuildDescriptorEb:
push rbp
push r15
push r14
push r12
push rbx
cmp dword ptr [rdx+8], 0FFFFFFFFh
jz short loc_B8E5F
mov r14, rdx
cmp dword ptr [rdx+0Ch], 0
js short loc_B8E5F
mov ebp, ecx
mov r15, rsi
mov rbx, rdi
cmp dword ptr [r14+10h], 0
js short loc_B8E11
mov rdi, rbx; this
mov rsi, r14
call __ZN10OpenSubdiv6v3_6_03Tmr19NeighborhoodBuilder18gatherFVarTopologyERKNS2_15BuildDescriptorE; OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::gatherFVarTopology(OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::BuildDescriptor const&)
jmp short loc_B8E1C
loc_B8E11:
mov rdi, rbx; this
mov rsi, r14
call __ZN10OpenSubdiv6v3_6_03Tmr19NeighborhoodBuilder20gatherVertexTopologyERKNS2_15BuildDescriptorE; OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::gatherVertexTopology(OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::BuildDescriptor const&)
loc_B8E1C:
movzx ebp, bpl
mov rdi, rbx; this
mov esi, ebp; bool
call __ZNK10OpenSubdiv6v3_6_03Tmr19NeighborhoodBuilder15computeByteSizeEb; OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::computeByteSize(bool)
mov r12, rax
mov rdi, r15
mov esi, r12d
call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIhLj512ELb0EE7SetSizeEj; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<uchar,512u,false>::SetSize(uint)
test r12, r12
jz short loc_B8E53
mov rsi, [r15]; unsigned __int8 *
mov edx, [r15+8]; unsigned __int64
mov ecx, [r14+0Ch]; int
mov rdi, rbx; this
mov r8d, ebp; bool
call __ZNK10OpenSubdiv6v3_6_03Tmr19NeighborhoodBuilder12populateDataEPhmib; OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::populateData(uchar *,ulong,int,bool)
loc_B8E53:
mov rax, r12
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_B8E5F:
lea rdi, aDescFaceindexI; "desc.faceIndex != INDEX_INVALID && desc"...
lea rsi, aWorkspaceLlm4b_52; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aSizeTOpensubdi_0; "size_t OpenSubdiv::v3_6_0::Tmr::Neighbo"...
mov edx, 0B7h
call ___assert_fail
| long long OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::Populate<512u>(
OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder *this,
long long a2,
_DWORD *a3,
bool a4)
{
long long v6; // r12
if ( a3[2] == -1 || (int)a3[3] < 0 )
__assert_fail(
"desc.faceIndex != INDEX_INVALID && desc.startingEdge >= 0",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/../tmr/../tmr/neighborhoodBuilder.h",
183LL,
"size_t OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::Populate(StackBuffer<SIZE> &, const BuildDescriptor &, bool) [SIZE = 512U]");
if ( (int)a3[4] < 0 )
OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::gatherVertexTopology(this);
else
OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::gatherFVarTopology(this);
v6 = OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::computeByteSize(this, a4);
OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<unsigned char,512u,false>::SetSize(a2, (unsigned int)v6);
if ( v6 )
OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::populateData(
this,
*(unsigned __int8 **)a2,
*(unsigned int *)(a2 + 8),
a3[3],
a4);
return v6;
}
| Populate<512u>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
CMP dword ptr [RDX + 0x8],-0x1
JZ 0x001b8e5f
MOV R14,RDX
CMP dword ptr [RDX + 0xc],0x0
JS 0x001b8e5f
MOV EBP,ECX
MOV R15,RSI
MOV RBX,RDI
CMP dword ptr [R14 + 0x10],0x0
JS 0x001b8e11
MOV RDI,RBX
MOV RSI,R14
CALL 0x001541d0
JMP 0x001b8e1c
LAB_001b8e11:
MOV RDI,RBX
MOV RSI,R14
CALL 0x00155490
LAB_001b8e1c:
MOVZX EBP,BPL
MOV RDI,RBX
MOV ESI,EBP
CALL 0x001543b0
MOV R12,RAX
MOV RDI,R15
MOV ESI,R12D
CALL 0x00152fe0
TEST R12,R12
JZ 0x001b8e53
MOV RSI,qword ptr [R15]
MOV EDX,dword ptr [R15 + 0x8]
MOV ECX,dword ptr [R14 + 0xc]
MOV RDI,RBX
MOV R8D,EBP
CALL 0x00153c90
LAB_001b8e53:
MOV RAX,R12
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001b8e5f:
LEA RDI,[0x1d0688]
LEA RSI,[0x1d06c2]
LEA RCX,[0x1d0733]
MOV EDX,0xb7
CALL 0x001512a0
|
/* unsigned long
OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::Populate<512u>(OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<unsigned
char, 512u, false>&, OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::BuildDescriptor const&, bool)
*/
ulong __thiscall
OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::Populate<512u>
(NeighborhoodBuilder *this,StackBuffer *param_1,BuildDescriptor *param_2,bool param_3)
{
ulong uVar1;
if ((*(int *)(param_2 + 8) != -1) && (-1 < *(int *)(param_2 + 0xc))) {
if (*(int *)(param_2 + 0x10) < 0) {
gatherVertexTopology(this,param_2);
}
else {
gatherFVarTopology(this,param_2);
}
uVar1 = computeByteSize(this,param_3);
Vtr::internal::StackBuffer<unsigned_char,512u,false>::SetSize
((StackBuffer<unsigned_char,512u,false> *)param_1,(uint)uVar1);
if (uVar1 != 0) {
populateData(this,*(uchar **)param_1,(ulong)*(uint *)(param_1 + 8),*(int *)(param_2 + 0xc),
param_3);
}
return uVar1;
}
/* WARNING: Subroutine does not return */
__assert_fail("desc.faceIndex != INDEX_INVALID && desc.startingEdge >= 0",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/../tmr/../tmr/neighborhoodBuilder.h"
,0xb7,
"size_t OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::Populate(StackBuffer<SIZE> &, const BuildDescriptor &, bool) [SIZE = 512U]"
);
}
| |
23,150 | unsigned long OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::Populate<512u>(OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<unsigned char, 512u, false>&, OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::BuildDescriptor const&, bool) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/../tmr/../tmr/neighborhoodBuilder.h | inline size_t NeighborhoodBuilder::Populate(
StackBuffer<SIZE>& data, BuildDescriptor const& desc, bool remapVerts) {
assert(desc.faceIndex != INDEX_INVALID && desc.startingEdge >= 0);
if (desc.fvarChannel < 0)
gatherVertexTopology(desc);
else
gatherFVarTopology(desc);
size_t byteSize = computeByteSize(remapVerts);
data.SetSize((unsigned int)byteSize);
if (byteSize > 0)
populateData(data, data.GetSize(), desc.startingEdge, remapVerts);
return byteSize;
} | O3 | c | unsigned long OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::Populate<512u>(OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<unsigned char, 512u, false>&, OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::BuildDescriptor const&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
cmpl $-0x1, 0x8(%rdx)
je 0xb184b
movq %rdx, %r14
cmpl $0x0, 0xc(%rdx)
js 0xb184b
movl %ecx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
cmpl $0x0, 0x10(%r14)
js 0xb17a1
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3b1f0
jmp 0xb17ac
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3be10
movzbl %bpl, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x3b310
movq %rax, %r12
testl %r12d, %r12d
je 0xb17fe
cmpl %r12d, 0xc(%r15)
jae 0xb1826
movq 0x210(%r15), %rdi
callq 0x3a0a0
leaq 0x10(%r15), %rax
movq %rax, (%r15)
movl $0x200, 0xc(%r15) # imm = 0x200
movl %r12d, %edi
callq 0x3a210
movq %rax, %rsi
movq %rax, 0x210(%r15)
movq %rax, (%r15)
movl %r12d, 0xc(%r15)
jmp 0xb1829
movq 0x210(%r15), %rdi
callq 0x3a0a0
leaq 0x10(%r15), %rsi
movq %rsi, (%r15)
movabsq $0x20000000000, %rax # imm = 0x20000000000
movq %rax, 0x8(%r15)
testq %r12, %r12
jne 0xb182d
jmp 0xb183f
movq (%r15), %rsi
movl %r12d, 0x8(%r15)
movl %r12d, %edx
movl 0xc(%r14), %ecx
movq %rbx, %rdi
movl %ebp, %r8d
callq 0x3ae80
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x17a2a(%rip), %rdi # 0xc927c
leaq 0x17a5d(%rip), %rsi # 0xc92b6
leaq 0x17ac7(%rip), %rcx # 0xc9327
movl $0xb7, %edx
callq 0x39540
| _ZN10OpenSubdiv6v3_6_03Tmr19NeighborhoodBuilder8PopulateILj512EEEmRNS0_3Vtr8internal11StackBufferIhXT_ELb0EEERKNS2_15BuildDescriptorEb:
push rbp
push r15
push r14
push r12
push rbx
cmp dword ptr [rdx+8], 0FFFFFFFFh
jz loc_B184B
mov r14, rdx
cmp dword ptr [rdx+0Ch], 0
js loc_B184B
mov ebp, ecx
mov r15, rsi
mov rbx, rdi
cmp dword ptr [r14+10h], 0
js short loc_B17A1
mov rdi, rbx
mov rsi, r14
call __ZN10OpenSubdiv6v3_6_03Tmr19NeighborhoodBuilder18gatherFVarTopologyERKNS2_15BuildDescriptorE; OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::gatherFVarTopology(OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::BuildDescriptor const&)
jmp short loc_B17AC
loc_B17A1:
mov rdi, rbx; this
mov rsi, r14
call __ZN10OpenSubdiv6v3_6_03Tmr19NeighborhoodBuilder20gatherVertexTopologyERKNS2_15BuildDescriptorE; OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::gatherVertexTopology(OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::BuildDescriptor const&)
loc_B17AC:
movzx ebp, bpl
mov rdi, rbx; this
mov esi, ebp; bool
call __ZNK10OpenSubdiv6v3_6_03Tmr19NeighborhoodBuilder15computeByteSizeEb; OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::computeByteSize(bool)
mov r12, rax
test r12d, r12d
jz short loc_B17FE
cmp [r15+0Ch], r12d
jnb short loc_B1826
mov rdi, [r15+210h]; void *
call __ZdlPv; operator delete(void *)
lea rax, [r15+10h]
mov [r15], rax
mov dword ptr [r15+0Ch], 200h
mov edi, r12d; unsigned __int64
call __Znwm; operator new(ulong)
mov rsi, rax
mov [r15+210h], rax
mov [r15], rax
mov [r15+0Ch], r12d
jmp short loc_B1829
loc_B17FE:
mov rdi, [r15+210h]; void *
call __ZdlPv; operator delete(void *)
lea rsi, [r15+10h]
mov [r15], rsi
mov rax, 20000000000h
mov [r15+8], rax
test r12, r12
jnz short loc_B182D
jmp short loc_B183F
loc_B1826:
mov rsi, [r15]; unsigned __int8 *
loc_B1829:
mov [r15+8], r12d
loc_B182D:
mov edx, r12d; unsigned __int64
mov ecx, [r14+0Ch]; int
mov rdi, rbx; this
mov r8d, ebp; bool
call __ZNK10OpenSubdiv6v3_6_03Tmr19NeighborhoodBuilder12populateDataEPhmib; OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::populateData(uchar *,ulong,int,bool)
loc_B183F:
mov rax, r12
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_B184B:
lea rdi, aDescFaceindexI; "desc.faceIndex != INDEX_INVALID && desc"...
lea rsi, aWorkspaceLlm4b_56; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aSizeTOpensubdi_0; "size_t OpenSubdiv::v3_6_0::Tmr::Neighbo"...
mov edx, 0B7h
call ___assert_fail
| long long OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::Populate<512u>(
OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder *this,
long long a2,
_DWORD *a3,
bool a4)
{
long long v7; // rax
long long v8; // r12
unsigned __int8 *v9; // rsi
if ( a3[2] == -1 || (int)a3[3] < 0 )
__assert_fail(
"desc.faceIndex != INDEX_INVALID && desc.startingEdge >= 0",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/../tmr/../tmr/neighborhoodBuilder.h",
183LL,
"size_t OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::Populate(StackBuffer<SIZE> &, const BuildDescriptor &, bool) [SIZE = 512U]");
if ( (int)a3[4] < 0 )
OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::gatherVertexTopology(this);
else
OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::gatherFVarTopology(this, a3);
v7 = OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::computeByteSize(this, a4);
v8 = v7;
if ( (_DWORD)v7 )
{
if ( *(_DWORD *)(a2 + 12) >= (unsigned int)v7 )
{
v9 = *(unsigned __int8 **)a2;
}
else
{
operator delete(*(void **)(a2 + 528));
*(_QWORD *)a2 = a2 + 16;
*(_DWORD *)(a2 + 12) = 512;
v9 = (unsigned __int8 *)operator new((unsigned int)v8);
*(_QWORD *)(a2 + 528) = v9;
*(_QWORD *)a2 = v9;
*(_DWORD *)(a2 + 12) = v8;
}
*(_DWORD *)(a2 + 8) = v8;
}
else
{
operator delete(*(void **)(a2 + 528));
v9 = (unsigned __int8 *)(a2 + 16);
*(_QWORD *)a2 = a2 + 16;
*(_QWORD *)(a2 + 8) = 0x20000000000LL;
if ( !v8 )
return v8;
}
OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::populateData(this, v9, (unsigned int)v8, a3[3], a4);
return v8;
}
| Populate<512u>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
CMP dword ptr [RDX + 0x8],-0x1
JZ 0x001b184b
MOV R14,RDX
CMP dword ptr [RDX + 0xc],0x0
JS 0x001b184b
MOV EBP,ECX
MOV R15,RSI
MOV RBX,RDI
CMP dword ptr [R14 + 0x10],0x0
JS 0x001b17a1
MOV RDI,RBX
MOV RSI,R14
CALL 0x0013b1f0
JMP 0x001b17ac
LAB_001b17a1:
MOV RDI,RBX
MOV RSI,R14
CALL 0x0013be10
LAB_001b17ac:
MOVZX EBP,BPL
MOV RDI,RBX
MOV ESI,EBP
CALL 0x0013b310
MOV R12,RAX
TEST R12D,R12D
JZ 0x001b17fe
CMP dword ptr [R15 + 0xc],R12D
JNC 0x001b1826
MOV RDI,qword ptr [R15 + 0x210]
CALL 0x0013a0a0
LEA RAX,[R15 + 0x10]
MOV qword ptr [R15],RAX
MOV dword ptr [R15 + 0xc],0x200
MOV EDI,R12D
CALL 0x0013a210
MOV RSI,RAX
MOV qword ptr [R15 + 0x210],RAX
MOV qword ptr [R15],RAX
MOV dword ptr [R15 + 0xc],R12D
JMP 0x001b1829
LAB_001b17fe:
MOV RDI,qword ptr [R15 + 0x210]
CALL 0x0013a0a0
LEA RSI,[R15 + 0x10]
MOV qword ptr [R15],RSI
MOV RAX,0x20000000000
MOV qword ptr [R15 + 0x8],RAX
TEST R12,R12
JNZ 0x001b182d
JMP 0x001b183f
LAB_001b1826:
MOV RSI,qword ptr [R15]
LAB_001b1829:
MOV dword ptr [R15 + 0x8],R12D
LAB_001b182d:
MOV EDX,R12D
MOV ECX,dword ptr [R14 + 0xc]
MOV RDI,RBX
MOV R8D,EBP
CALL 0x0013ae80
LAB_001b183f:
MOV RAX,R12
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001b184b:
LEA RDI,[0x1c927c]
LEA RSI,[0x1c92b6]
LEA RCX,[0x1c9327]
MOV EDX,0xb7
CALL 0x00139540
|
/* unsigned long
OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::Populate<512u>(OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<unsigned
char, 512u, false>&, OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::BuildDescriptor const&, bool)
*/
ulong __thiscall
OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::Populate<512u>
(NeighborhoodBuilder *this,StackBuffer *param_1,BuildDescriptor *param_2,bool param_3)
{
ulong uVar1;
StackBuffer *pSVar2;
uint uVar3;
if ((*(int *)(param_2 + 8) != -1) && (-1 < *(int *)(param_2 + 0xc))) {
if (*(int *)(param_2 + 0x10) < 0) {
gatherVertexTopology(this,param_2);
}
else {
gatherFVarTopology(this,param_2);
}
uVar1 = computeByteSize(this,param_3);
uVar3 = (uint)uVar1;
if (uVar3 == 0) {
operator_delete(*(void **)(param_1 + 0x210));
pSVar2 = param_1 + 0x10;
*(StackBuffer **)param_1 = pSVar2;
*(int8 *)(param_1 + 8) = 0x20000000000;
if (uVar1 == 0) {
return 0;
}
}
else {
if (*(uint *)(param_1 + 0xc) < uVar3) {
operator_delete(*(void **)(param_1 + 0x210));
*(StackBuffer **)param_1 = param_1 + 0x10;
*(int4 *)(param_1 + 0xc) = 0x200;
pSVar2 = (StackBuffer *)operator_new(uVar1 & 0xffffffff);
*(StackBuffer **)(param_1 + 0x210) = pSVar2;
*(StackBuffer **)param_1 = pSVar2;
*(uint *)(param_1 + 0xc) = uVar3;
}
else {
pSVar2 = *(StackBuffer **)param_1;
}
*(uint *)(param_1 + 8) = uVar3;
}
populateData(this,(uchar *)pSVar2,uVar1 & 0xffffffff,*(int *)(param_2 + 0xc),param_3);
return uVar1;
}
/* WARNING: Subroutine does not return */
__assert_fail("desc.faceIndex != INDEX_INVALID && desc.startingEdge >= 0",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/../tmr/../tmr/neighborhoodBuilder.h"
,0xb7,
"size_t OpenSubdiv::v3_6_0::Tmr::NeighborhoodBuilder::Populate(StackBuffer<SIZE> &, const BuildDescriptor &, bool) [SIZE = 512U]"
);
}
| |
23,151 | my_caseup_utf16 | eloqsql/strings/ctype-ucs2.c | static size_t
my_caseup_utf16(CHARSET_INFO *cs, const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
my_charset_conv_wc_mb wc_mb= cs->cset->wc_mb;
int res;
const char *srcend= src + srclen;
char *dstend= dst + dstlen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(srclen <= dstlen);
while ((src < srcend) &&
(res= mb_wc(cs, &wc, (uchar *) src, (uchar *) srcend)) > 0)
{
my_toupper_utf16(uni_plane, &wc);
if (res != wc_mb(cs, wc, (uchar *) dst, (uchar *) dstend))
break;
src+= res;
dst+= res;
}
return srclen;
} | O3 | c | my_caseup_utf16:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, -0x38(%rbp)
movq %rdx, -0x30(%rbp)
testq %rdx, %rdx
jle 0x65dc9
movq %rcx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq 0x78(%rdi), %rax
movq %rax, -0x50(%rbp)
movq 0xb8(%rdi), %rax
movq 0x28(%rax), %rcx
movq %rcx, -0x58(%rbp)
movq 0x30(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
leaq (%rsi,%rax), %r14
addq %r15, -0x38(%rbp)
movq %r13, %rdi
leaq -0x40(%rbp), %rsi
movq %r12, %rdx
movq %r14, %rcx
callq *-0x58(%rbp)
testl %eax, %eax
jle 0x65dc9
movl %eax, %ebx
movq -0x40(%rbp), %rsi
movq -0x50(%rbp), %rax
cmpq (%rax), %rsi
ja 0x65dab
movq 0x8(%rax), %rax
movq %rsi, %rcx
shrq $0x8, %rcx
movq (%rax,%rcx,8), %rax
testq %rax, %rax
je 0x65dab
movzbl %sil, %ecx
leaq (%rcx,%rcx,2), %rcx
movl (%rax,%rcx,4), %esi
movq %rsi, -0x40(%rbp)
movq %r13, %rdi
movq %r15, %rdx
movq -0x38(%rbp), %rcx
callq *-0x48(%rbp)
cmpl %eax, %ebx
jne 0x65dc9
movl %ebx, %eax
addq %rax, %r12
addq %rax, %r15
cmpq %r14, %r12
jb 0x65d65
movq -0x30(%rbp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_caseup_utf16:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov [rbp+var_38], r8
mov [rbp+var_30], rdx
test rdx, rdx
jle loc_65DC9
mov r15, rcx
mov r12, rsi
mov r13, rdi
mov rax, [rdi+78h]
mov [rbp+var_50], rax
mov rax, [rdi+0B8h]
mov rcx, [rax+28h]
mov [rbp+var_58], rcx
mov rax, [rax+30h]
mov [rbp+var_48], rax
mov rax, [rbp+var_30]
lea r14, [rsi+rax]
add [rbp+var_38], r15
loc_65D65:
mov rdi, r13
lea rsi, [rbp+var_40]
mov rdx, r12
mov rcx, r14
call [rbp+var_58]
test eax, eax
jle short loc_65DC9
mov ebx, eax
mov rsi, [rbp+var_40]
mov rax, [rbp+var_50]
cmp rsi, [rax]
ja short loc_65DAB
mov rax, [rax+8]
mov rcx, rsi
shr rcx, 8
mov rax, [rax+rcx*8]
test rax, rax
jz short loc_65DAB
movzx ecx, sil
lea rcx, [rcx+rcx*2]
mov esi, [rax+rcx*4]
mov [rbp+var_40], rsi
loc_65DAB:
mov rdi, r13
mov rdx, r15
mov rcx, [rbp+var_38]
call [rbp+var_48]
cmp ebx, eax
jnz short loc_65DC9
mov eax, ebx
add r12, rax
add r15, rax
cmp r12, r14
jb short loc_65D65
loc_65DC9:
mov rax, [rbp+var_30]
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_caseup_utf16(long long a1, unsigned long long a2, long long a3, long long a4, long long a5)
{
long long v5; // r15
unsigned long long v6; // r12
long long v7; // rax
unsigned long long v8; // r14
int v9; // eax
unsigned int v10; // ebx
unsigned long long v11; // rsi
long long v12; // rax
long long ( *v14)(long long, unsigned long long *, unsigned long long, unsigned long long); // [rsp+8h] [rbp-58h]
unsigned long long *v15; // [rsp+10h] [rbp-50h]
unsigned int ( *v16)(long long, unsigned long long, long long, long long); // [rsp+18h] [rbp-48h]
unsigned long long v17; // [rsp+20h] [rbp-40h] BYREF
long long v18; // [rsp+28h] [rbp-38h]
long long v19; // [rsp+30h] [rbp-30h]
v18 = a5;
v19 = a3;
if ( a3 > 0 )
{
v5 = a4;
v6 = a2;
v15 = *(unsigned long long **)(a1 + 120);
v7 = *(_QWORD *)(a1 + 184);
v14 = *(long long ( **)(long long, unsigned long long *, unsigned long long, unsigned long long))(v7 + 40);
v16 = *(unsigned int ( **)(long long, unsigned long long, long long, long long))(v7 + 48);
v8 = a2 + v19;
v18 += a4;
do
{
v9 = v14(a1, &v17, v6, v8);
if ( v9 <= 0 )
break;
v10 = v9;
v11 = v17;
if ( v17 <= *v15 )
{
v12 = *(_QWORD *)(v15[1] + 8 * (v17 >> 8));
if ( v12 )
{
v11 = *(unsigned int *)(v12 + 12LL * (unsigned __int8)v17);
v17 = v11;
}
}
if ( v10 != v16(a1, v11, v5, v18) )
break;
v6 += v10;
v5 += v10;
}
while ( v6 < v8 );
}
return v19;
}
| my_caseup_utf16:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x38],R8
MOV qword ptr [RBP + -0x30],RDX
TEST RDX,RDX
JLE 0x00165dc9
MOV R15,RCX
MOV R12,RSI
MOV R13,RDI
MOV RAX,qword ptr [RDI + 0x78]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RDI + 0xb8]
MOV RCX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x58],RCX
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x30]
LEA R14,[RSI + RAX*0x1]
ADD qword ptr [RBP + -0x38],R15
LAB_00165d65:
MOV RDI,R13
LEA RSI,[RBP + -0x40]
MOV RDX,R12
MOV RCX,R14
CALL qword ptr [RBP + -0x58]
TEST EAX,EAX
JLE 0x00165dc9
MOV EBX,EAX
MOV RSI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x50]
CMP RSI,qword ptr [RAX]
JA 0x00165dab
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,RSI
SHR RCX,0x8
MOV RAX,qword ptr [RAX + RCX*0x8]
TEST RAX,RAX
JZ 0x00165dab
MOVZX ECX,SIL
LEA RCX,[RCX + RCX*0x2]
MOV ESI,dword ptr [RAX + RCX*0x4]
MOV qword ptr [RBP + -0x40],RSI
LAB_00165dab:
MOV RDI,R13
MOV RDX,R15
MOV RCX,qword ptr [RBP + -0x38]
CALL qword ptr [RBP + -0x48]
CMP EBX,EAX
JNZ 0x00165dc9
MOV EAX,EBX
ADD R12,RAX
ADD R15,RAX
CMP R12,R14
JC 0x00165d65
LAB_00165dc9:
MOV RAX,qword ptr [RBP + -0x30]
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_caseup_utf16(long param_1,ulong param_2,long param_3,long param_4,long param_5)
{
ulong uVar1;
ulong *puVar2;
code *pcVar3;
code *pcVar4;
long lVar5;
uint uVar6;
uint uVar7;
ulong local_48;
long local_40;
long local_38;
local_38 = param_3;
if (0 < param_3) {
puVar2 = *(ulong **)(param_1 + 0x78);
pcVar3 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
pcVar4 = *(code **)(*(long *)(param_1 + 0xb8) + 0x30);
uVar1 = param_2 + param_3;
local_40 = param_5 + param_4;
do {
uVar6 = (*pcVar3)(param_1,&local_48,param_2,uVar1);
if ((int)uVar6 < 1) {
return local_38;
}
if ((local_48 <= *puVar2) && (lVar5 = *(long *)(puVar2[1] + (local_48 >> 8) * 8), lVar5 != 0))
{
local_48 = (ulong)*(uint *)(lVar5 + (local_48 & 0xff) * 0xc);
}
uVar7 = (*pcVar4)(param_1,local_48,param_4,local_40);
if (uVar6 != uVar7) {
return local_38;
}
param_2 = param_2 + uVar6;
param_4 = param_4 + (ulong)uVar6;
} while (param_2 < uVar1);
}
return local_38;
}
| |
23,152 | hi0bits | eloqsql/strings/dtoa.c | static int hi0bits(register ULong x)
{
register int k= 0;
if (!(x & 0xffff0000))
{
k= 16;
x<<= 16;
}
if (!(x & 0xff000000))
{
k+= 8;
x<<= 8;
}
if (!(x & 0xf0000000))
{
k+= 4;
x<<= 4;
}
if (!(x & 0xc0000000))
{
k+= 2;
x<<= 2;
}
if (!(x & 0x80000000))
{
k++;
if (!(x & 0x40000000))
return 32;
}
return k;
} | O3 | c | hi0bits:
pushq %rbp
movq %rsp, %rbp
movl %edi, %eax
shll $0x10, %eax
xorl %ecx, %ecx
cmpl $0x10000, %edi # imm = 0x10000
setb %cl
cmovael %edi, %eax
shll $0x4, %ecx
movl %eax, %edx
shll $0x8, %edx
cmpl $0x1000000, %eax # imm = 0x1000000
cmovael %eax, %edx
leal 0x8(%rcx), %eax
cmovael %ecx, %eax
movl %edx, %ecx
shll $0x4, %ecx
cmpl $0x10000000, %edx # imm = 0x10000000
cmovael %edx, %ecx
leal 0x4(%rax), %edx
cmovael %eax, %edx
leal (,%rcx,4), %esi
movl $0x40000000, %eax # imm = 0x40000000
cmpl %eax, %ecx
cmovael %ecx, %esi
leal 0x2(%rdx), %ecx
cmovael %edx, %ecx
leal 0x1(%rcx), %edx
cmpl %eax, %esi
movl $0x20, %eax
cmovael %edx, %eax
testl %esi, %esi
cmovsl %ecx, %eax
popq %rbp
retq
| hi0bits:
push rbp
mov rbp, rsp
mov eax, edi
shl eax, 10h
xor ecx, ecx
cmp edi, offset stru_10000
setb cl
cmovnb eax, edi
shl ecx, 4
mov edx, eax
shl edx, 8
cmp eax, 1000000h
cmovnb edx, eax
lea eax, [rcx+8]
cmovnb eax, ecx
mov ecx, edx
shl ecx, 4
cmp edx, 10000000h
cmovnb ecx, edx
lea edx, [rax+4]
cmovnb edx, eax
lea esi, ds:0[rcx*4]
mov eax, 40000000h
cmp ecx, eax
cmovnb esi, ecx
lea ecx, [rdx+2]
cmovnb ecx, edx
lea edx, [rcx+1]
cmp esi, eax
mov eax, 20h ; ' '
cmovnb eax, edx
test esi, esi
cmovs eax, ecx
pop rbp
retn
| long long hi0bits(unsigned int a1)
{
unsigned int v1; // eax
unsigned int v2; // edx
bool v3; // cf
int v4; // eax
unsigned int v5; // ecx
bool v6; // cf
int v7; // edx
int v8; // esi
bool v9; // cf
unsigned int v10; // ecx
long long result; // rax
v1 = a1 << 16;
if ( a1 >= (unsigned int)&stru_10000 )
v1 = a1;
v2 = v1 << 8;
v3 = v1 < 0x1000000;
if ( v1 >= 0x1000000 )
v2 = v1;
v4 = 16 * (a1 < (unsigned int)&stru_10000) + 8;
if ( !v3 )
v4 = 16 * (a1 < (unsigned int)&stru_10000);
v5 = 16 * v2;
v6 = v2 < 0x10000000;
if ( v2 >= 0x10000000 )
v5 = v2;
v7 = v4 + 4;
if ( !v6 )
v7 = v4;
v8 = 4 * v5;
v9 = v5 < 0x40000000;
if ( v5 >= 0x40000000 )
v8 = v5;
v10 = v7 + 2;
if ( !v9 )
v10 = v7;
result = 32LL;
if ( (unsigned int)v8 >= 0x40000000 )
result = v10 + 1;
if ( v8 < 0 )
return v10;
return result;
}
| hi0bits:
PUSH RBP
MOV RBP,RSP
MOV EAX,EDI
SHL EAX,0x10
XOR ECX,ECX
CMP EDI,0x10000
SETC CL
CMOVNC EAX,EDI
SHL ECX,0x4
MOV EDX,EAX
SHL EDX,0x8
CMP EAX,0x1000000
CMOVNC EDX,EAX
LEA EAX,[RCX + 0x8]
CMOVNC EAX,ECX
MOV ECX,EDX
SHL ECX,0x4
CMP EDX,0x10000000
CMOVNC ECX,EDX
LEA EDX,[RAX + 0x4]
CMOVNC EDX,EAX
LEA ESI,[RCX*0x4]
MOV EAX,0x40000000
CMP ECX,EAX
CMOVNC ESI,ECX
LEA ECX,[RDX + 0x2]
CMOVNC ECX,EDX
LEA EDX,[RCX + 0x1]
CMP ESI,EAX
MOV EAX,0x20
CMOVNC EAX,EDX
TEST ESI,ESI
CMOVS EAX,ECX
POP RBP
RET
|
int hi0bits(uint param_1)
{
uint uVar1;
uint uVar2;
int iVar3;
int iVar4;
uVar2 = param_1 << 0x10;
if (param_1 >= 0x10000) {
uVar2 = param_1;
}
iVar4 = (uint)(param_1 < 0x10000) * 0x10;
uVar1 = uVar2 << 8;
if (0xffffff < uVar2) {
uVar1 = uVar2;
}
iVar3 = iVar4 + 8;
if (0xffffff < uVar2) {
iVar3 = iVar4;
}
uVar2 = uVar1 << 4;
if (0xfffffff < uVar1) {
uVar2 = uVar1;
}
iVar4 = iVar3 + 4;
if (0xfffffff < uVar1) {
iVar4 = iVar3;
}
uVar1 = uVar2 * 4;
if (0x3fffffff < uVar2) {
uVar1 = uVar2;
}
iVar3 = iVar4 + 2;
if (0x3fffffff < uVar2) {
iVar3 = iVar4;
}
iVar4 = 0x20;
if (0x3fffffff < uVar1) {
iVar4 = iVar3 + 1;
}
if ((int)uVar1 < 0) {
iVar4 = iVar3;
}
return iVar4;
}
| |
23,153 | mariadb_reconnect | eloqsql/libmariadb/libmariadb/mariadb_lib.c | my_bool STDCALL mariadb_reconnect(MYSQL *mysql)
{
MYSQL tmp_mysql;
struct my_hook_data hook_data;
struct mysql_async_context *ctxt= NULL;
LIST *li_stmt= mysql->stmts;
/* check if connection handler is active */
if (IS_CONNHDLR_ACTIVE(mysql))
{
if (mysql->extension->conn_hdlr->plugin && mysql->extension->conn_hdlr->plugin->reconnect)
return(mysql->extension->conn_hdlr->plugin->reconnect(mysql));
}
if (!mysql->options.reconnect ||
(mysql->server_status & SERVER_STATUS_IN_TRANS) || !mysql->host_info)
{
/* Allow reconnect next time */
mysql->server_status&= ~SERVER_STATUS_IN_TRANS;
my_set_error(mysql, CR_SERVER_GONE_ERROR, SQLSTATE_UNKNOWN, 0);
return(1);
}
mysql_init(&tmp_mysql);
tmp_mysql.free_me= 0;
tmp_mysql.options=mysql->options;
if (mysql->extension->conn_hdlr)
{
tmp_mysql.extension->conn_hdlr= mysql->extension->conn_hdlr;
mysql->extension->conn_hdlr= 0;
}
/* don't reread options from configuration files */
tmp_mysql.options.my_cnf_group= tmp_mysql.options.my_cnf_file= NULL;
if (IS_MYSQL_ASYNC_ACTIVE(mysql))
{
ctxt= mysql->options.extension->async_context;
hook_data.orig_mysql= mysql;
hook_data.new_mysql= &tmp_mysql;
hook_data.orig_pvio= mysql->net.pvio;
my_context_install_suspend_resume_hook(ctxt, my_suspend_hook, &hook_data);
}
if (!mysql_real_connect(&tmp_mysql,mysql->host,mysql->user,mysql->passwd,
mysql->db, mysql->port, mysql->unix_socket,
mysql->client_flag | CLIENT_REMEMBER_OPTIONS) ||
mysql_set_character_set(&tmp_mysql, mysql->charset->csname))
{
if (ctxt)
my_context_install_suspend_resume_hook(ctxt, NULL, NULL);
/* don't free options (CONC-118) */
memset(&tmp_mysql.options, 0, sizeof(struct st_mysql_options));
my_set_error(mysql, tmp_mysql.net.last_errno,
tmp_mysql.net.sqlstate,
tmp_mysql.net.last_error);
mysql_close(&tmp_mysql);
return(1);
}
for (;li_stmt;li_stmt= li_stmt->next)
{
MYSQL_STMT *stmt= (MYSQL_STMT *)li_stmt->data;
if (stmt->state != MYSQL_STMT_INITTED)
{
stmt->state= MYSQL_STMT_INITTED;
SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0);
}
}
tmp_mysql.free_me= mysql->free_me;
tmp_mysql.stmts= mysql->stmts;
mysql->stmts= NULL;
if (ctxt)
my_context_install_suspend_resume_hook(ctxt, NULL, NULL);
/* Don't free options, we moved them to tmp_mysql */
memset(&mysql->options, 0, sizeof(mysql->options));
mysql->free_me=0;
mysql_close(mysql);
*mysql=tmp_mysql;
mysql->net.pvio->mysql= mysql;
#ifdef HAVE_TLS
/* CONC-604: Set new connection handle */
if (mysql_get_ssl_cipher(mysql))
ma_pvio_tls_set_connection(mysql);
#endif
ma_net_clear(&mysql->net);
mysql->affected_rows= ~(unsigned long long) 0;
mysql->info= 0;
return(0);
} | O0 | c | mariadb_reconnect:
pushq %rbp
movq %rsp, %rbp
subq $0x560, %rsp # imm = 0x560
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x510(%rbp)
movq $0x0, -0x530(%rbp)
movq -0x510(%rbp), %rax
movq 0x4c8(%rax), %rax
movq %rax, -0x538(%rbp)
movq -0x510(%rbp), %rax
cmpq $0x0, 0x4f0(%rax)
je 0x1e834
movq -0x510(%rbp), %rax
movq 0x4f0(%rax), %rax
cmpq $0x0, (%rax)
je 0x1e834
movq -0x510(%rbp), %rax
movq 0x4f0(%rax), %rax
movq (%rax), %rax
cmpq $0x0, (%rax)
je 0x1e832
movq -0x510(%rbp), %rax
movq 0x4f0(%rax), %rax
movq (%rax), %rax
movq (%rax), %rax
cmpq $0x0, 0x78(%rax)
je 0x1e832
movq -0x510(%rbp), %rax
movq 0x4f0(%rax), %rax
movq (%rax), %rax
movq (%rax), %rax
movq 0x78(%rax), %rax
movq -0x510(%rbp), %rdi
callq *%rax
movb %al, -0x501(%rbp)
jmp 0x1ecdd
jmp 0x1e834
movq -0x510(%rbp), %rax
cmpb $0x0, 0x43b(%rax)
je 0x1e86a
movq -0x510(%rbp), %rax
movl 0x380(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x1e86a
movq -0x510(%rbp), %rax
cmpq $0x0, 0x2d8(%rax)
jne 0x1e8ad
movq -0x510(%rbp), %rax
movl 0x380(%rax), %ecx
andl $-0x2, %ecx
movl %ecx, 0x380(%rax)
movq -0x510(%rbp), %rdi
leaq 0x4bb02(%rip), %rax # 0x6a390
movq (%rax), %rdx
movl $0x7d6, %esi # imm = 0x7D6
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0x1dec0
movb $0x1, -0x501(%rbp)
jmp 0x1ecdd
leaq -0x500(%rbp), %rdi
callq 0x22810
movb $0x0, -0x74(%rbp)
leaq -0x500(%rbp), %rdi
addq $0x390, %rdi # imm = 0x390
movq -0x510(%rbp), %rsi
addq $0x390, %rsi # imm = 0x390
movl $0xf8, %edx
callq 0x13360
movq -0x510(%rbp), %rax
movq 0x4f0(%rax), %rax
cmpq $0x0, (%rax)
je 0x1e924
movq -0x510(%rbp), %rax
movq 0x4f0(%rax), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x510(%rbp), %rax
movq 0x4f0(%rax), %rax
movq $0x0, (%rax)
movq $0x0, -0x120(%rbp)
movq $0x0, -0x118(%rbp)
movq -0x510(%rbp), %rax
cmpq $0x0, 0x480(%rax)
je 0x1e9df
movq -0x510(%rbp), %rax
movq 0x480(%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0x1e9df
movq -0x510(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movsbl 0x14(%rax), %eax
cmpl $0x0, %eax
je 0x1e9df
movq -0x510(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x530(%rbp)
movq -0x510(%rbp), %rax
movq %rax, -0x528(%rbp)
leaq -0x500(%rbp), %rax
movq %rax, -0x520(%rbp)
movq -0x510(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x518(%rbp)
movq -0x530(%rbp), %rdi
leaq 0x6d8d(%rip), %rsi # 0x25760
leaq -0x528(%rbp), %rdx
callq 0x3f9e0
movq -0x510(%rbp), %rax
movq 0x2b0(%rax), %rsi
movq -0x510(%rbp), %rax
movq 0x2b8(%rax), %rdx
movq -0x510(%rbp), %rax
movq 0x2c0(%rax), %rcx
movq -0x510(%rbp), %rax
movq 0x2e8(%rax), %r8
movq -0x510(%rbp), %rax
movl 0x360(%rax), %r9d
movq -0x510(%rbp), %rax
movq 0x2c8(%rax), %r10
movq -0x510(%rbp), %rdi
movabsq $0x80000000, %rax # imm = 0x80000000
orq 0x368(%rdi), %rax
leaq -0x500(%rbp), %rdi
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x22ce0
cmpq $0x0, %rax
je 0x1ea89
movq -0x510(%rbp), %rax
movq 0x2f0(%rax), %rax
movq 0x8(%rax), %rsi
leaq -0x500(%rbp), %rdi
callq 0x257c0
cmpl $0x0, %eax
je 0x1eb08
cmpq $0x0, -0x530(%rbp)
je 0x1eaa6
movq -0x530(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0x3f9e0
leaq -0x500(%rbp), %rdi
addq $0x390, %rdi # imm = 0x390
xorl %esi, %esi
movl $0xf8, %edx
callq 0x13250
movq -0x510(%rbp), %rdi
movl -0x470(%rbp), %esi
leaq -0x500(%rbp), %rdx
addq $0x297, %rdx # imm = 0x297
leaq -0x500(%rbp), %rcx
addq $0x97, %rcx
movb $0x0, %al
callq 0x1dec0
leaq -0x500(%rbp), %rdi
callq 0x258e0
movb $0x1, -0x501(%rbp)
jmp 0x1ecdd
jmp 0x1eb0a
cmpq $0x0, -0x538(%rbp)
je 0x1ebd6
movq -0x538(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x540(%rbp)
movq -0x540(%rbp), %rax
cmpl $0x0, 0x50(%rax)
je 0x1ebbd
movq -0x540(%rbp), %rax
movl $0x0, 0x50(%rax)
movq -0x540(%rbp), %rax
movl $0x7dd, 0x108(%rax) # imm = 0x7DD
movq -0x540(%rbp), %rdi
addq $0x30d, %rdi # imm = 0x30D
leaq 0x4b821(%rip), %rax # 0x6a390
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13210
movq -0x540(%rbp), %rax
movb $0x0, 0x312(%rax)
movq -0x540(%rbp), %rdi
addq $0x10c, %rdi # imm = 0x10C
leaq 0x4b801(%rip), %rax # 0x6a3a0
movq 0x68(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13210
movq -0x540(%rbp), %rax
movb $0x0, 0x30b(%rax)
jmp 0x1ebbd
jmp 0x1ebbf
movq -0x538(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x538(%rbp)
jmp 0x1eb0a
movq -0x510(%rbp), %rax
movb 0x48c(%rax), %al
movb %al, -0x74(%rbp)
movq -0x510(%rbp), %rax
movq 0x4c8(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x510(%rbp), %rax
movq $0x0, 0x4c8(%rax)
cmpq $0x0, -0x530(%rbp)
je 0x1ec27
movq -0x530(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0x3f9e0
movq -0x510(%rbp), %rdi
addq $0x390, %rdi # imm = 0x390
xorl %esi, %esi
movl $0xf8, %edx
callq 0x13250
movq -0x510(%rbp), %rax
movb $0x0, 0x48c(%rax)
movq -0x510(%rbp), %rdi
callq 0x258e0
movq -0x510(%rbp), %rdi
leaq -0x500(%rbp), %rsi
movl $0x4f8, %edx # imm = 0x4F8
callq 0x13360
movq -0x510(%rbp), %rcx
movq -0x510(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x40(%rax)
movq -0x510(%rbp), %rdi
callq 0x22b10
cmpq $0x0, %rax
je 0x1eca6
movq -0x510(%rbp), %rdi
callq 0x2c730
movq -0x510(%rbp), %rdi
callq 0x4d9d0
movq -0x510(%rbp), %rax
movq $-0x1, 0x338(%rax)
movq -0x510(%rbp), %rax
movq $0x0, 0x2e0(%rax)
movb $0x0, -0x501(%rbp)
movb -0x501(%rbp), %al
movb %al, -0x541(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x1ed0a
movb -0x541(%rbp), %al
addq $0x560, %rsp # imm = 0x560
popq %rbp
retq
callq 0x134b0
nop
| mariadb_reconnect:
push rbp
mov rbp, rsp
sub rsp, 560h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_510], rdi
mov [rbp+var_530], 0
mov rax, [rbp+var_510]
mov rax, [rax+4C8h]
mov [rbp+var_538], rax
mov rax, [rbp+var_510]
cmp qword ptr [rax+4F0h], 0
jz short loc_1E834
mov rax, [rbp+var_510]
mov rax, [rax+4F0h]
cmp qword ptr [rax], 0
jz short loc_1E834
mov rax, [rbp+var_510]
mov rax, [rax+4F0h]
mov rax, [rax]
cmp qword ptr [rax], 0
jz short loc_1E832
mov rax, [rbp+var_510]
mov rax, [rax+4F0h]
mov rax, [rax]
mov rax, [rax]
cmp qword ptr [rax+78h], 0
jz short loc_1E832
mov rax, [rbp+var_510]
mov rax, [rax+4F0h]
mov rax, [rax]
mov rax, [rax]
mov rax, [rax+78h]
mov rdi, [rbp+var_510]
call rax
mov [rbp+var_501], al
jmp loc_1ECDD
loc_1E832:
jmp short $+2
loc_1E834:
mov rax, [rbp+var_510]
cmp byte ptr [rax+43Bh], 0
jz short loc_1E86A
mov rax, [rbp+var_510]
mov eax, [rax+380h]
and eax, 1
cmp eax, 0
jnz short loc_1E86A
mov rax, [rbp+var_510]
cmp qword ptr [rax+2D8h], 0
jnz short loc_1E8AD
loc_1E86A:
mov rax, [rbp+var_510]
mov ecx, [rax+380h]
and ecx, 0FFFFFFFEh
mov [rax+380h], ecx
mov rdi, [rbp+var_510]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov esi, 7D6h
xor eax, eax
mov ecx, eax
mov al, 0
call my_set_error
mov [rbp+var_501], 1
jmp loc_1ECDD
loc_1E8AD:
lea rdi, [rbp+var_500]
call mysql_init
mov [rbp+var_74], 0
lea rdi, [rbp+var_500]
add rdi, 390h
mov rsi, [rbp+var_510]
add rsi, 390h
mov edx, 0F8h
call _memcpy
mov rax, [rbp+var_510]
mov rax, [rax+4F0h]
cmp qword ptr [rax], 0
jz short loc_1E924
mov rax, [rbp+var_510]
mov rax, [rax+4F0h]
mov rcx, [rax]
mov rax, [rbp+var_10]
mov [rax], rcx
mov rax, [rbp+var_510]
mov rax, [rax+4F0h]
mov qword ptr [rax], 0
loc_1E924:
mov [rbp+var_120], 0
mov [rbp+var_118], 0
mov rax, [rbp+var_510]
cmp qword ptr [rax+480h], 0
jz loc_1E9DF
mov rax, [rbp+var_510]
mov rax, [rax+480h]
cmp qword ptr [rax+28h], 0
jz short loc_1E9DF
mov rax, [rbp+var_510]
mov rax, [rax+480h]
mov rax, [rax+28h]
movsx eax, byte ptr [rax+14h]
cmp eax, 0
jz short loc_1E9DF
mov rax, [rbp+var_510]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_530], rax
mov rax, [rbp+var_510]
mov [rbp+var_528], rax
lea rax, [rbp+var_500]
mov [rbp+var_520], rax
mov rax, [rbp+var_510]
mov rax, [rax]
mov [rbp+var_518], rax
mov rdi, [rbp+var_530]
lea rsi, my_suspend_hook
lea rdx, [rbp+var_528]
call my_context_install_suspend_resume_hook
loc_1E9DF:
mov rax, [rbp+var_510]
mov rsi, [rax+2B0h]
mov rax, [rbp+var_510]
mov rdx, [rax+2B8h]
mov rax, [rbp+var_510]
mov rcx, [rax+2C0h]
mov rax, [rbp+var_510]
mov r8, [rax+2E8h]
mov rax, [rbp+var_510]
mov r9d, [rax+360h]
mov rax, [rbp+var_510]
mov r10, [rax+2C8h]
mov rdi, [rbp+var_510]
mov rax, 80000000h
or rax, [rdi+368h]
lea rdi, [rbp+var_500]
mov [rsp+560h+var_560], r10
mov [rsp+560h+var_558], rax
call mysql_real_connect
cmp rax, 0
jz short loc_1EA89
mov rax, [rbp+var_510]
mov rax, [rax+2F0h]
mov rsi, [rax+8]
lea rdi, [rbp+var_500]
call mysql_set_character_set
cmp eax, 0
jz short loc_1EB08
loc_1EA89:
cmp [rbp+var_530], 0
jz short loc_1EAA6
mov rdi, [rbp+var_530]
xor eax, eax
mov edx, eax
mov rsi, rdx
call my_context_install_suspend_resume_hook
loc_1EAA6:
lea rdi, [rbp+var_500]
add rdi, 390h
xor esi, esi
mov edx, 0F8h
call _memset
mov rdi, [rbp+var_510]
mov esi, [rbp+var_470]
lea rdx, [rbp+var_500]
add rdx, 297h
lea rcx, [rbp+var_500]
add rcx, 97h
mov al, 0
call my_set_error
lea rdi, [rbp+var_500]
call mysql_close
mov [rbp+var_501], 1
jmp loc_1ECDD
loc_1EB08:
jmp short $+2
loc_1EB0A:
cmp [rbp+var_538], 0
jz loc_1EBD6
mov rax, [rbp+var_538]
mov rax, [rax+10h]
mov [rbp+var_540], rax
mov rax, [rbp+var_540]
cmp dword ptr [rax+50h], 0
jz loc_1EBBD
mov rax, [rbp+var_540]
mov dword ptr [rax+50h], 0
mov rax, [rbp+var_540]
mov dword ptr [rax+108h], 7DDh
mov rdi, [rbp+var_540]
add rdi, 30Dh
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_540]
mov byte ptr [rax+312h], 0
mov rdi, [rbp+var_540]
add rdi, 10Ch
lea rax, client_errors
mov rsi, [rax+68h]
mov edx, 200h
call _strncpy
mov rax, [rbp+var_540]
mov byte ptr [rax+30Bh], 0
jmp short $+2
loc_1EBBD:
jmp short $+2
loc_1EBBF:
mov rax, [rbp+var_538]
mov rax, [rax+8]
mov [rbp+var_538], rax
jmp loc_1EB0A
loc_1EBD6:
mov rax, [rbp+var_510]
mov al, [rax+48Ch]
mov [rbp+var_74], al
mov rax, [rbp+var_510]
mov rax, [rax+4C8h]
mov [rbp+var_38], rax
mov rax, [rbp+var_510]
mov qword ptr [rax+4C8h], 0
cmp [rbp+var_530], 0
jz short loc_1EC27
mov rdi, [rbp+var_530]
xor eax, eax
mov edx, eax
mov rsi, rdx
call my_context_install_suspend_resume_hook
loc_1EC27:
mov rdi, [rbp+var_510]
add rdi, 390h
xor esi, esi
mov edx, 0F8h
call _memset
mov rax, [rbp+var_510]
mov byte ptr [rax+48Ch], 0
mov rdi, [rbp+var_510]
call mysql_close
mov rdi, [rbp+var_510]
lea rsi, [rbp+var_500]
mov edx, 4F8h
call _memcpy
mov rcx, [rbp+var_510]
mov rax, [rbp+var_510]
mov rax, [rax]
mov [rax+40h], rcx
mov rdi, [rbp+var_510]
call mysql_get_ssl_cipher
cmp rax, 0
jz short loc_1ECA6
mov rdi, [rbp+var_510]
call ma_pvio_tls_set_connection
loc_1ECA6:
mov rdi, [rbp+var_510]
call ma_net_clear
mov rax, [rbp+var_510]
mov qword ptr [rax+338h], 0FFFFFFFFFFFFFFFFh
mov rax, [rbp+var_510]
mov qword ptr [rax+2E0h], 0
mov [rbp+var_501], 0
loc_1ECDD:
mov al, [rbp+var_501]
mov [rbp+var_541], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_1ED0A
mov al, [rbp+var_541]
add rsp, 560h
pop rbp
retn
loc_1ED0A:
call ___stack_chk_fail
| char mariadb_reconnect(long long a1)
{
long long v2; // [rsp+20h] [rbp-540h]
long long v3; // [rsp+28h] [rbp-538h]
long long v4; // [rsp+30h] [rbp-530h]
_QWORD v5[3]; // [rsp+38h] [rbp-528h] BYREF
long long v6; // [rsp+50h] [rbp-510h]
_BYTE v8[144]; // [rsp+60h] [rbp-500h] BYREF
unsigned int v9; // [rsp+F0h] [rbp-470h]
char v10; // [rsp+F7h] [rbp-469h] BYREF
char v11; // [rsp+2F7h] [rbp-269h] BYREF
_QWORD v12[31]; // [rsp+3F0h] [rbp-170h] BYREF
char v13; // [rsp+4ECh] [rbp-74h]
long long v14; // [rsp+528h] [rbp-38h]
_QWORD *v15; // [rsp+550h] [rbp-10h]
unsigned long long v16; // [rsp+558h] [rbp-8h]
v16 = __readfsqword(0x28u);
v6 = a1;
v4 = 0LL;
v3 = *(_QWORD *)(a1 + 1224);
if ( *(_QWORD *)(a1 + 1264)
&& **(_QWORD **)(v6 + 1264)
&& ***(_QWORD ***)(v6 + 1264)
&& *(_QWORD *)(***(_QWORD ***)(v6 + 1264) + 120LL) )
{
return (*(long long ( **)(long long))(***(_QWORD ***)(v6 + 1264) + 120LL))(v6);
}
if ( *(_BYTE *)(v6 + 1083) && (*(_DWORD *)(v6 + 896) & 1) == 0 && *(_QWORD *)(v6 + 728) )
{
mysql_init(v8);
v13 = 0;
memcpy(v12, v6 + 912, sizeof(v12));
if ( **(_QWORD **)(v6 + 1264) )
{
*v15 = **(_QWORD **)(v6 + 1264);
**(_QWORD **)(v6 + 1264) = 0LL;
}
v12[10] = 0LL;
v12[11] = 0LL;
if ( *(_QWORD *)(v6 + 1152)
&& *(_QWORD *)(*(_QWORD *)(v6 + 1152) + 40LL)
&& *(_BYTE *)(*(_QWORD *)(*(_QWORD *)(v6 + 1152) + 40LL) + 20LL) )
{
v4 = *(_QWORD *)(*(_QWORD *)(v6 + 1152) + 40LL);
v5[0] = v6;
v5[1] = v8;
v5[2] = *(_QWORD *)v6;
my_context_install_suspend_resume_hook(v4, my_suspend_hook, v5);
}
if ( mysql_real_connect(
(unsigned int)v8,
*(_QWORD *)(v6 + 688),
*(_QWORD *)(v6 + 696),
*(_QWORD *)(v6 + 704),
*(_QWORD *)(v6 + 744),
*(_DWORD *)(v6 + 864),
*(_QWORD *)(v6 + 712),
*(_QWORD *)(v6 + 872) | 0x80000000LL)
&& !(unsigned int)mysql_set_character_set(v8, *(_QWORD *)(*(_QWORD *)(v6 + 752) + 8LL)) )
{
while ( v3 )
{
v2 = *(_QWORD *)(v3 + 16);
if ( *(_DWORD *)(v2 + 80) )
{
*(_DWORD *)(v2 + 80) = 0;
*(_DWORD *)(v2 + 264) = 2013;
strncpy(v2 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(v2 + 786) = 0;
strncpy(v2 + 268, client_errors[13], 512LL);
*(_BYTE *)(v2 + 779) = 0;
}
v3 = *(_QWORD *)(v3 + 8);
}
v13 = *(_BYTE *)(v6 + 1164);
v14 = *(_QWORD *)(v6 + 1224);
*(_QWORD *)(v6 + 1224) = 0LL;
if ( v4 )
my_context_install_suspend_resume_hook(v4, 0LL, 0LL);
memset(v6 + 912, 0LL, 248LL);
*(_BYTE *)(v6 + 1164) = 0;
mysql_close(v6);
memcpy(v6, v8, 1272LL);
*(_QWORD *)(*(_QWORD *)v6 + 64LL) = v6;
if ( mysql_get_ssl_cipher(v6) )
ma_pvio_tls_set_connection(v6);
ma_net_clear(v6);
*(_QWORD *)(v6 + 824) = -1LL;
*(_QWORD *)(v6 + 736) = 0LL;
return 0;
}
else
{
if ( v4 )
my_context_install_suspend_resume_hook(v4, 0LL, 0LL);
memset(v12, 0LL, sizeof(v12));
my_set_error(v6, v9, (long long)&v11, (long long)&v10);
mysql_close(v8);
return 1;
}
}
else
{
*(_DWORD *)(v6 + 896) &= ~1u;
my_set_error(v6, 0x7D6u, (long long)SQLSTATE_UNKNOWN, 0LL);
return 1;
}
}
| mariadb_reconnect:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x560
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x510],RDI
MOV qword ptr [RBP + -0x530],0x0
MOV RAX,qword ptr [RBP + -0x510]
MOV RAX,qword ptr [RAX + 0x4c8]
MOV qword ptr [RBP + -0x538],RAX
MOV RAX,qword ptr [RBP + -0x510]
CMP qword ptr [RAX + 0x4f0],0x0
JZ 0x0011e834
MOV RAX,qword ptr [RBP + -0x510]
MOV RAX,qword ptr [RAX + 0x4f0]
CMP qword ptr [RAX],0x0
JZ 0x0011e834
MOV RAX,qword ptr [RBP + -0x510]
MOV RAX,qword ptr [RAX + 0x4f0]
MOV RAX,qword ptr [RAX]
CMP qword ptr [RAX],0x0
JZ 0x0011e832
MOV RAX,qword ptr [RBP + -0x510]
MOV RAX,qword ptr [RAX + 0x4f0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX]
CMP qword ptr [RAX + 0x78],0x0
JZ 0x0011e832
MOV RAX,qword ptr [RBP + -0x510]
MOV RAX,qword ptr [RAX + 0x4f0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x78]
MOV RDI,qword ptr [RBP + -0x510]
CALL RAX
MOV byte ptr [RBP + -0x501],AL
JMP 0x0011ecdd
LAB_0011e832:
JMP 0x0011e834
LAB_0011e834:
MOV RAX,qword ptr [RBP + -0x510]
CMP byte ptr [RAX + 0x43b],0x0
JZ 0x0011e86a
MOV RAX,qword ptr [RBP + -0x510]
MOV EAX,dword ptr [RAX + 0x380]
AND EAX,0x1
CMP EAX,0x0
JNZ 0x0011e86a
MOV RAX,qword ptr [RBP + -0x510]
CMP qword ptr [RAX + 0x2d8],0x0
JNZ 0x0011e8ad
LAB_0011e86a:
MOV RAX,qword ptr [RBP + -0x510]
MOV ECX,dword ptr [RAX + 0x380]
AND ECX,0xfffffffe
MOV dword ptr [RAX + 0x380],ECX
MOV RDI,qword ptr [RBP + -0x510]
LEA RAX,[0x16a390]
MOV RDX,qword ptr [RAX]
MOV ESI,0x7d6
XOR EAX,EAX
MOV ECX,EAX
MOV AL,0x0
CALL 0x0011dec0
MOV byte ptr [RBP + -0x501],0x1
JMP 0x0011ecdd
LAB_0011e8ad:
LEA RDI,[RBP + -0x500]
CALL 0x00122810
MOV byte ptr [RBP + -0x74],0x0
LEA RDI,[RBP + -0x500]
ADD RDI,0x390
MOV RSI,qword ptr [RBP + -0x510]
ADD RSI,0x390
MOV EDX,0xf8
CALL 0x00113360
MOV RAX,qword ptr [RBP + -0x510]
MOV RAX,qword ptr [RAX + 0x4f0]
CMP qword ptr [RAX],0x0
JZ 0x0011e924
MOV RAX,qword ptr [RBP + -0x510]
MOV RAX,qword ptr [RAX + 0x4f0]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x510]
MOV RAX,qword ptr [RAX + 0x4f0]
MOV qword ptr [RAX],0x0
LAB_0011e924:
MOV qword ptr [RBP + -0x120],0x0
MOV qword ptr [RBP + -0x118],0x0
MOV RAX,qword ptr [RBP + -0x510]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x0011e9df
MOV RAX,qword ptr [RBP + -0x510]
MOV RAX,qword ptr [RAX + 0x480]
CMP qword ptr [RAX + 0x28],0x0
JZ 0x0011e9df
MOV RAX,qword ptr [RBP + -0x510]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOVSX EAX,byte ptr [RAX + 0x14]
CMP EAX,0x0
JZ 0x0011e9df
MOV RAX,qword ptr [RBP + -0x510]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x530],RAX
MOV RAX,qword ptr [RBP + -0x510]
MOV qword ptr [RBP + -0x528],RAX
LEA RAX,[RBP + -0x500]
MOV qword ptr [RBP + -0x520],RAX
MOV RAX,qword ptr [RBP + -0x510]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x518],RAX
MOV RDI,qword ptr [RBP + -0x530]
LEA RSI,[0x125760]
LEA RDX,[RBP + -0x528]
CALL 0x0013f9e0
LAB_0011e9df:
MOV RAX,qword ptr [RBP + -0x510]
MOV RSI,qword ptr [RAX + 0x2b0]
MOV RAX,qword ptr [RBP + -0x510]
MOV RDX,qword ptr [RAX + 0x2b8]
MOV RAX,qword ptr [RBP + -0x510]
MOV RCX,qword ptr [RAX + 0x2c0]
MOV RAX,qword ptr [RBP + -0x510]
MOV R8,qword ptr [RAX + 0x2e8]
MOV RAX,qword ptr [RBP + -0x510]
MOV R9D,dword ptr [RAX + 0x360]
MOV RAX,qword ptr [RBP + -0x510]
MOV R10,qword ptr [RAX + 0x2c8]
MOV RDI,qword ptr [RBP + -0x510]
MOV RAX,0x80000000
OR RAX,qword ptr [RDI + 0x368]
LEA RDI,[RBP + -0x500]
MOV qword ptr [RSP],R10
MOV qword ptr [RSP + 0x8],RAX
CALL 0x00122ce0
CMP RAX,0x0
JZ 0x0011ea89
MOV RAX,qword ptr [RBP + -0x510]
MOV RAX,qword ptr [RAX + 0x2f0]
MOV RSI,qword ptr [RAX + 0x8]
LEA RDI,[RBP + -0x500]
CALL 0x001257c0
CMP EAX,0x0
JZ 0x0011eb08
LAB_0011ea89:
CMP qword ptr [RBP + -0x530],0x0
JZ 0x0011eaa6
MOV RDI,qword ptr [RBP + -0x530]
XOR EAX,EAX
MOV EDX,EAX
MOV RSI,RDX
CALL 0x0013f9e0
LAB_0011eaa6:
LEA RDI,[RBP + -0x500]
ADD RDI,0x390
XOR ESI,ESI
MOV EDX,0xf8
CALL 0x00113250
MOV RDI,qword ptr [RBP + -0x510]
MOV ESI,dword ptr [RBP + -0x470]
LEA RDX,[RBP + -0x500]
ADD RDX,0x297
LEA RCX,[RBP + -0x500]
ADD RCX,0x97
MOV AL,0x0
CALL 0x0011dec0
LEA RDI,[RBP + -0x500]
CALL 0x001258e0
MOV byte ptr [RBP + -0x501],0x1
JMP 0x0011ecdd
LAB_0011eb08:
JMP 0x0011eb0a
LAB_0011eb0a:
CMP qword ptr [RBP + -0x538],0x0
JZ 0x0011ebd6
MOV RAX,qword ptr [RBP + -0x538]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x540],RAX
MOV RAX,qword ptr [RBP + -0x540]
CMP dword ptr [RAX + 0x50],0x0
JZ 0x0011ebbd
MOV RAX,qword ptr [RBP + -0x540]
MOV dword ptr [RAX + 0x50],0x0
MOV RAX,qword ptr [RBP + -0x540]
MOV dword ptr [RAX + 0x108],0x7dd
MOV RDI,qword ptr [RBP + -0x540]
ADD RDI,0x30d
LEA RAX,[0x16a390]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x540]
MOV byte ptr [RAX + 0x312],0x0
MOV RDI,qword ptr [RBP + -0x540]
ADD RDI,0x10c
LEA RAX,[0x16a3a0]
MOV RSI,qword ptr [RAX + 0x68]
MOV EDX,0x200
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x540]
MOV byte ptr [RAX + 0x30b],0x0
JMP 0x0011ebbd
LAB_0011ebbd:
JMP 0x0011ebbf
LAB_0011ebbf:
MOV RAX,qword ptr [RBP + -0x538]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x538],RAX
JMP 0x0011eb0a
LAB_0011ebd6:
MOV RAX,qword ptr [RBP + -0x510]
MOV AL,byte ptr [RAX + 0x48c]
MOV byte ptr [RBP + -0x74],AL
MOV RAX,qword ptr [RBP + -0x510]
MOV RAX,qword ptr [RAX + 0x4c8]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x510]
MOV qword ptr [RAX + 0x4c8],0x0
CMP qword ptr [RBP + -0x530],0x0
JZ 0x0011ec27
MOV RDI,qword ptr [RBP + -0x530]
XOR EAX,EAX
MOV EDX,EAX
MOV RSI,RDX
CALL 0x0013f9e0
LAB_0011ec27:
MOV RDI,qword ptr [RBP + -0x510]
ADD RDI,0x390
XOR ESI,ESI
MOV EDX,0xf8
CALL 0x00113250
MOV RAX,qword ptr [RBP + -0x510]
MOV byte ptr [RAX + 0x48c],0x0
MOV RDI,qword ptr [RBP + -0x510]
CALL 0x001258e0
MOV RDI,qword ptr [RBP + -0x510]
LEA RSI,[RBP + -0x500]
MOV EDX,0x4f8
CALL 0x00113360
MOV RCX,qword ptr [RBP + -0x510]
MOV RAX,qword ptr [RBP + -0x510]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX + 0x40],RCX
MOV RDI,qword ptr [RBP + -0x510]
CALL 0x00122b10
CMP RAX,0x0
JZ 0x0011eca6
MOV RDI,qword ptr [RBP + -0x510]
CALL 0x0012c730
LAB_0011eca6:
MOV RDI,qword ptr [RBP + -0x510]
CALL 0x0014d9d0
MOV RAX,qword ptr [RBP + -0x510]
MOV qword ptr [RAX + 0x338],-0x1
MOV RAX,qword ptr [RBP + -0x510]
MOV qword ptr [RAX + 0x2e0],0x0
MOV byte ptr [RBP + -0x501],0x0
LAB_0011ecdd:
MOV AL,byte ptr [RBP + -0x501]
MOV byte ptr [RBP + -0x541],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0011ed0a
MOV AL,byte ptr [RBP + -0x541]
ADD RSP,0x560
POP RBP
RET
LAB_0011ed0a:
CALL 0x001134b0
|
int8 mariadb_reconnect(long *param_1)
{
int iVar1;
long lVar2;
long in_FS_OFFSET;
long local_540;
long local_538;
long *local_530;
int1 *local_528;
long local_520;
long *local_518;
int1 local_509;
int1 local_508 [144];
int4 local_478;
int1 auStack_471 [512];
int1 auStack_271 [249];
int1 auStack_178 [80];
int8 local_128;
int8 local_120;
int1 local_7c;
long local_40;
int8 *local_18;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_538 = 0;
local_540 = param_1[0x99];
local_518 = param_1;
if ((((param_1[0x9e] == 0) || (*(long *)param_1[0x9e] == 0)) || (**(long **)param_1[0x9e] == 0))
|| (*(long *)(**(long **)param_1[0x9e] + 0x78) == 0)) {
if (((*(char *)((long)param_1 + 0x43b) == '\0') || ((*(uint *)(param_1 + 0x70) & 1) != 0)) ||
(param_1[0x5b] == 0)) {
*(uint *)(param_1 + 0x70) = *(uint *)(param_1 + 0x70) & 0xfffffffe;
my_set_error(param_1,0x7d6,SQLSTATE_UNKNOWN,0);
local_509 = 1;
}
else {
mysql_init(local_508);
local_7c = 0;
memcpy(auStack_178,local_518 + 0x72,0xf8);
if (*(long *)local_518[0x9e] != 0) {
*local_18 = *(int8 *)local_518[0x9e];
*(int8 *)local_518[0x9e] = 0;
}
local_128 = 0;
local_120 = 0;
if (((local_518[0x90] != 0) && (*(long *)(local_518[0x90] + 0x28) != 0)) &&
(*(char *)(*(long *)(local_518[0x90] + 0x28) + 0x14) != '\0')) {
local_538 = *(long *)(local_518[0x90] + 0x28);
local_530 = local_518;
local_528 = local_508;
local_520 = *local_518;
my_context_install_suspend_resume_hook(local_538,my_suspend_hook,&local_530);
}
lVar2 = mysql_real_connect(local_508,local_518[0x56],local_518[0x57],local_518[0x58],
local_518[0x5d],(int)local_518[0x6c],local_518[0x59],
local_518[0x6d] | 0x80000000);
if ((lVar2 == 0) || (iVar1 = mysql_set_character_set(local_508), iVar1 != 0)) {
if (local_538 != 0) {
my_context_install_suspend_resume_hook(local_538);
}
memset(auStack_178,0,0xf8);
my_set_error(local_518,local_478,auStack_271,auStack_471);
mysql_close(local_508);
local_509 = 1;
}
else {
for (; local_540 != 0; local_540 = *(long *)(local_540 + 8)) {
lVar2 = *(long *)(local_540 + 0x10);
if (*(int *)(lVar2 + 0x50) != 0) {
*(int4 *)(lVar2 + 0x50) = 0;
*(int4 *)(lVar2 + 0x108) = 0x7dd;
strncpy((char *)(lVar2 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(lVar2 + 0x312) = 0;
strncpy((char *)(lVar2 + 0x10c),PTR_s_Lost_connection_to_server_during_0016a408,0x200);
*(int1 *)(lVar2 + 0x30b) = 0;
}
}
local_7c = *(int1 *)((long)local_518 + 0x48c);
local_40 = local_518[0x99];
local_518[0x99] = 0;
if (local_538 != 0) {
my_context_install_suspend_resume_hook(local_538);
}
memset(local_518 + 0x72,0,0xf8);
*(int1 *)((long)local_518 + 0x48c) = 0;
mysql_close(local_518);
memcpy(local_518,local_508,0x4f8);
*(long **)(*local_518 + 0x40) = local_518;
lVar2 = mysql_get_ssl_cipher(local_518);
if (lVar2 != 0) {
ma_pvio_tls_set_connection(local_518);
}
ma_net_clear(local_518);
local_518[0x67] = -1;
local_518[0x5c] = 0;
local_509 = 0;
}
}
}
else {
local_509 = (**(code **)(**(long **)param_1[0x9e] + 0x78))(param_1);
}
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_509);
}
| |
23,154 | end_pagecache | eloqsql/storage/maria/ma_pagecache.c | void end_pagecache(PAGECACHE *pagecache, my_bool cleanup)
{
DBUG_ENTER("end_pagecache");
DBUG_PRINT("enter", ("key_cache: %p", pagecache));
if (!pagecache->inited)
DBUG_VOID_RETURN;
if (pagecache->disk_blocks > 0)
{
#ifndef DBUG_OFF
check_pagecache_is_cleaned_up(pagecache);
#endif
if (pagecache->block_mem)
{
my_large_free(pagecache->block_mem, pagecache->mem_size);
pagecache->block_mem= NULL;
my_free(pagecache->block_root);
pagecache->block_root= NULL;
}
pagecache->disk_blocks= -1;
/* Reset blocks_changed to be safe if flush_all_key_blocks is called */
pagecache->blocks_changed= 0;
}
DBUG_PRINT("status", ("used: %zu changed: %zu w_requests: %llu "
"writes: %llu r_requests: %llu reads: %llu",
pagecache->blocks_used,
pagecache->global_blocks_changed,
pagecache->global_cache_w_requests,
pagecache->global_cache_write,
pagecache->global_cache_r_requests,
pagecache->global_cache_read));
if (cleanup)
{
my_hash_free(&pagecache->files_in_flush);
mysql_mutex_destroy(&pagecache->cache_lock);
pagecache->inited= pagecache->can_be_used= 0;
PAGECACHE_DEBUG_CLOSE;
}
DBUG_VOID_RETURN;
} | O3 | c | end_pagecache:
cmpb $0x0, 0x1a8(%rdi)
je 0x71730
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
cmpq $0x0, 0x40(%rdi)
jle 0x716d4
movq 0xb0(%rbx), %rdi
testq %rdi, %rdi
je 0x716c4
movq (%rbx), %rsi
callq 0xb2cf3
xorl %r15d, %r15d
movq %r15, 0xb0(%rbx)
movq 0xa8(%rbx), %rdi
callq 0xaa406
movq %r15, 0xa8(%rbx)
movq $-0x1, 0x40(%rbx)
movq $0x0, 0x58(%rbx)
testb %r14b, %r14b
je 0x71726
leaq 0x1b0(%rbx), %rdi
callq 0x9b281
leaq 0xc8(%rbx), %r14
movq 0x108(%rbx), %rdi
testq %rdi, %rdi
je 0x71710
leaq 0x322359(%rip), %rax # 0x393a58
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x108(%rbx)
movq %r14, %rdi
callq 0x2a0e0
xorl %eax, %eax
movb %al, 0x1aa(%rbx)
movb %al, 0x1a8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| end_pagecache:
cmp byte ptr [rdi+1A8h], 0
jz locret_71730
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14d, esi
mov rbx, rdi
cmp qword ptr [rdi+40h], 0
jle short loc_716D4
mov rdi, [rbx+0B0h]
test rdi, rdi
jz short loc_716C4
mov rsi, [rbx]
call my_large_free
xor r15d, r15d
mov [rbx+0B0h], r15
mov rdi, [rbx+0A8h]
call my_free
mov [rbx+0A8h], r15
loc_716C4:
mov qword ptr [rbx+40h], 0FFFFFFFFFFFFFFFFh
mov qword ptr [rbx+58h], 0
loc_716D4:
test r14b, r14b
jz short loc_71726
lea rdi, [rbx+1B0h]
call my_hash_free
lea r14, [rbx+0C8h]
mov rdi, [rbx+108h]
test rdi, rdi
jz short loc_71710
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [rbx+108h], 0
loc_71710:
mov rdi, r14
call _pthread_mutex_destroy
xor eax, eax
mov [rbx+1AAh], al
mov [rbx+1A8h], al
loc_71726:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
locret_71730:
retn
| long long end_pagecache(long long a1, char a2)
{
long long v3; // rdi
long long result; // rax
long long v5; // rdi
if ( *(_BYTE *)(a1 + 424) )
{
if ( *(long long *)(a1 + 64) > 0 )
{
v3 = *(_QWORD *)(a1 + 176);
if ( v3 )
{
my_large_free(v3, *(_QWORD *)a1);
*(_QWORD *)(a1 + 176) = 0LL;
result = my_free(*(_QWORD *)(a1 + 168));
*(_QWORD *)(a1 + 168) = 0LL;
}
*(_QWORD *)(a1 + 64) = -1LL;
*(_QWORD *)(a1 + 88) = 0LL;
}
if ( a2 )
{
my_hash_free(a1 + 432);
v5 = *(_QWORD *)(a1 + 264);
if ( v5 )
{
((void ( *)(long long))PSI_server[9])(v5);
*(_QWORD *)(a1 + 264) = 0LL;
}
pthread_mutex_destroy(a1 + 200);
result = 0LL;
*(_BYTE *)(a1 + 426) = 0;
*(_BYTE *)(a1 + 424) = 0;
}
}
return result;
}
| end_pagecache:
CMP byte ptr [RDI + 0x1a8],0x0
JZ 0x00171730
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14D,ESI
MOV RBX,RDI
CMP qword ptr [RDI + 0x40],0x0
JLE 0x001716d4
MOV RDI,qword ptr [RBX + 0xb0]
TEST RDI,RDI
JZ 0x001716c4
MOV RSI,qword ptr [RBX]
CALL 0x001b2cf3
XOR R15D,R15D
MOV qword ptr [RBX + 0xb0],R15
MOV RDI,qword ptr [RBX + 0xa8]
CALL 0x001aa406
MOV qword ptr [RBX + 0xa8],R15
LAB_001716c4:
MOV qword ptr [RBX + 0x40],-0x1
MOV qword ptr [RBX + 0x58],0x0
LAB_001716d4:
TEST R14B,R14B
JZ 0x00171726
LEA RDI,[RBX + 0x1b0]
CALL 0x0019b281
LEA R14,[RBX + 0xc8]
MOV RDI,qword ptr [RBX + 0x108]
TEST RDI,RDI
JZ 0x00171710
LEA RAX,[0x493a58]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [RBX + 0x108],0x0
LAB_00171710:
MOV RDI,R14
CALL 0x0012a0e0
XOR EAX,EAX
MOV byte ptr [RBX + 0x1aa],AL
MOV byte ptr [RBX + 0x1a8],AL
LAB_00171726:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
LAB_00171730:
RET
|
void end_pagecache(int8 *param_1,char param_2)
{
if (*(char *)(param_1 + 0x35) != '\0') {
if (0 < (long)param_1[8]) {
if (param_1[0x16] != 0) {
my_large_free(param_1[0x16],*param_1);
param_1[0x16] = 0;
my_free(param_1[0x15]);
param_1[0x15] = 0;
}
param_1[8] = 0xffffffffffffffff;
param_1[0xb] = 0;
}
if (param_2 != '\0') {
my_hash_free(param_1 + 0x36);
if (param_1[0x21] != 0) {
(**(code **)(PSI_server + 0x48))();
param_1[0x21] = 0;
}
pthread_mutex_destroy((pthread_mutex_t *)(param_1 + 0x19));
*(int1 *)((long)param_1 + 0x1aa) = 0;
*(int1 *)(param_1 + 0x35) = 0;
}
}
return;
}
| |
23,155 | buffer_splice | corpus-core[P]colibri-stateless/src/util/bytes.c | void buffer_splice(buffer_t* buffer, size_t offset, uint32_t len, bytes_t data) {
buffer_grow(buffer, buffer->data.len + data.len - len);
uint32_t old_end_offset = offset + len;
uint32_t new_end_offset = offset + data.len;
// TODO add preallocated check
if (new_end_offset != old_end_offset && buffer->data.len - old_end_offset > 0)
memmove(buffer->data.data + new_end_offset, buffer->data.data + old_end_offset, buffer->data.len - old_end_offset);
if (data.len) {
if (data.data)
memcpy(buffer->data.data + offset, data.data, data.len);
else
memset(buffer->data.data + offset, 0, data.len);
}
buffer->data.len = buffer->data.len + data.len - len;
} | O0 | c | buffer_splice:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %ecx, -0x10(%rbp)
movq %r8, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movl %edx, -0x24(%rbp)
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rax
movl (%rax), %eax
addl -0x10(%rbp), %eax
subl -0x24(%rbp), %eax
movl %eax, %eax
movl %eax, %esi
callq 0x9dfa0
movq -0x20(%rbp), %rax
movl -0x24(%rbp), %ecx
addq %rcx, %rax
movl %eax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movl -0x10(%rbp), %ecx
addq %rcx, %rax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x28(%rbp), %eax
je 0x9e1e1
movq -0x18(%rbp), %rax
movl (%rax), %eax
subl -0x28(%rbp), %eax
cmpl $0x0, %eax
jbe 0x9e1e1
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
movl -0x2c(%rbp), %eax
addq %rax, %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
movl -0x28(%rbp), %eax
addq %rax, %rsi
movq -0x18(%rbp), %rax
movl (%rax), %eax
subl -0x28(%rbp), %eax
movl %eax, %eax
movl %eax, %edx
callq 0x23110
cmpl $0x0, -0x10(%rbp)
je 0x9e224
cmpq $0x0, -0x8(%rbp)
je 0x9e20a
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
addq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rsi
movl -0x10(%rbp), %eax
movl %eax, %edx
callq 0x230a0
jmp 0x9e222
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
addq -0x20(%rbp), %rdi
movl -0x10(%rbp), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x231c0
jmp 0x9e224
movq -0x18(%rbp), %rax
movl (%rax), %ecx
addl -0x10(%rbp), %ecx
subl -0x24(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| buffer_splice:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], ecx
mov [rbp+var_8], r8
mov [rbp+var_18], rdi
mov [rbp+var_20], rsi
mov [rbp+var_24], edx
mov rdi, [rbp+var_18]
mov rax, [rbp+var_18]
mov eax, [rax]
add eax, [rbp+var_10]
sub eax, [rbp+var_24]
mov eax, eax
mov esi, eax
call buffer_grow
mov rax, [rbp+var_20]
mov ecx, [rbp+var_24]
add rax, rcx
mov [rbp+var_28], eax
mov rax, [rbp+var_20]
mov ecx, [rbp+var_10]
add rax, rcx
mov [rbp+var_2C], eax
mov eax, [rbp+var_2C]
cmp eax, [rbp+var_28]
jz short loc_9E1E1
mov rax, [rbp+var_18]
mov eax, [rax]
sub eax, [rbp+var_28]
cmp eax, 0
jbe short loc_9E1E1
mov rax, [rbp+var_18]
mov rdi, [rax+8]
mov eax, [rbp+var_2C]
add rdi, rax
mov rax, [rbp+var_18]
mov rsi, [rax+8]
mov eax, [rbp+var_28]
add rsi, rax
mov rax, [rbp+var_18]
mov eax, [rax]
sub eax, [rbp+var_28]
mov eax, eax
mov edx, eax
call _memmove
loc_9E1E1:
cmp [rbp+var_10], 0
jz short loc_9E224
cmp [rbp+var_8], 0
jz short loc_9E20A
mov rax, [rbp+var_18]
mov rdi, [rax+8]
add rdi, [rbp+var_20]
mov rsi, [rbp+var_8]
mov eax, [rbp+var_10]
mov edx, eax
call _memcpy
jmp short loc_9E222
loc_9E20A:
mov rax, [rbp+var_18]
mov rdi, [rax+8]
add rdi, [rbp+var_20]
mov eax, [rbp+var_10]
mov edx, eax
xor esi, esi
call _memset
loc_9E222:
jmp short $+2
loc_9E224:
mov rax, [rbp+var_18]
mov ecx, [rax]
add ecx, [rbp+var_10]
sub ecx, [rbp+var_24]
mov rax, [rbp+var_18]
mov [rax], ecx
add rsp, 30h
pop rbp
retn
| unsigned long long buffer_splice(unsigned long long a1, long long a2, int a3, unsigned int a4, long long a5)
{
unsigned long long result; // rax
unsigned int v6; // [rsp+8h] [rbp-28h]
buffer_grow(a1, a4 + *(_DWORD *)a1 - a3);
v6 = a3 + a2;
if ( a4 + (_DWORD)a2 != a3 + (_DWORD)a2 && *(_DWORD *)a1 != v6 )
memmove(a4 + (unsigned int)a2 + *(_QWORD *)(a1 + 8), v6 + *(_QWORD *)(a1 + 8), *(_DWORD *)a1 - v6);
if ( a4 )
{
if ( a5 )
memcpy(a2 + *(_QWORD *)(a1 + 8), a5, a4);
else
memset(a2 + *(_QWORD *)(a1 + 8), 0LL, a4);
}
result = a1;
*(_DWORD *)a1 = a4 + *(_DWORD *)a1 - a3;
return result;
}
| buffer_splice:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV dword ptr [RBP + -0x10],ECX
MOV qword ptr [RBP + -0x8],R8
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x20],RSI
MOV dword ptr [RBP + -0x24],EDX
MOV RDI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
ADD EAX,dword ptr [RBP + -0x10]
SUB EAX,dword ptr [RBP + -0x24]
MOV EAX,EAX
MOV ESI,EAX
CALL 0x0019dfa0
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x24]
ADD RAX,RCX
MOV dword ptr [RBP + -0x28],EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x10]
ADD RAX,RCX
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,dword ptr [RBP + -0x2c]
CMP EAX,dword ptr [RBP + -0x28]
JZ 0x0019e1e1
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
SUB EAX,dword ptr [RBP + -0x28]
CMP EAX,0x0
JBE 0x0019e1e1
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x8]
MOV EAX,dword ptr [RBP + -0x2c]
ADD RDI,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + 0x8]
MOV EAX,dword ptr [RBP + -0x28]
ADD RSI,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
SUB EAX,dword ptr [RBP + -0x28]
MOV EAX,EAX
MOV EDX,EAX
CALL 0x00123110
LAB_0019e1e1:
CMP dword ptr [RBP + -0x10],0x0
JZ 0x0019e224
CMP qword ptr [RBP + -0x8],0x0
JZ 0x0019e20a
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x8]
ADD RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RBP + -0x10]
MOV EDX,EAX
CALL 0x001230a0
JMP 0x0019e222
LAB_0019e20a:
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x8]
ADD RDI,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RBP + -0x10]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x001231c0
LAB_0019e222:
JMP 0x0019e224
LAB_0019e224:
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RAX]
ADD ECX,dword ptr [RBP + -0x10]
SUB ECX,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX],ECX
ADD RSP,0x30
POP RBP
RET
|
void buffer_splice(uint *param_1,long param_2,int param_3,uint param_4,void *param_5)
{
uint uVar1;
uint uVar2;
buffer_grow(param_1);
uVar1 = (int)param_2 + param_3;
uVar2 = (int)param_2 + param_4;
if ((uVar2 != uVar1) && (*param_1 != uVar1)) {
memmove((void *)(*(long *)(param_1 + 2) + (ulong)uVar2),
(void *)(*(long *)(param_1 + 2) + (ulong)uVar1),(ulong)(*param_1 - uVar1));
}
if (param_4 != 0) {
if (param_5 == (void *)0x0) {
memset((void *)(*(long *)(param_1 + 2) + param_2),0,(ulong)param_4);
}
else {
memcpy((void *)(*(long *)(param_1 + 2) + param_2),param_5,(ulong)param_4);
}
}
*param_1 = (*param_1 + param_4) - param_3;
return;
}
| |
23,156 | ha_maria::implicit_commit(THD*, bool) | eloqsql/storage/maria/ha_maria.cc | int ha_maria::implicit_commit(THD *thd, bool new_trn)
{
#ifndef MARIA_CANNOT_ROLLBACK
#error this method should be removed
#endif
TRN *trn;
int error;
uint locked_tables;
extern my_bool plugins_are_initialized;
MARIA_HA *used_tables, *trn_next;
DBUG_ENTER("ha_maria::implicit_commit");
if (!maria_hton || !plugins_are_initialized || !(trn= THD_TRN))
DBUG_RETURN(0);
if (!new_trn && (thd->locked_tables_mode == LTM_LOCK_TABLES ||
thd->locked_tables_mode == LTM_PRELOCKED_UNDER_LOCK_TABLES))
{
/*
No commit inside LOCK TABLES.
Note that we come here only at the end of the top statement
(dispatch_command()), we are never committing inside a sub-statement./
*/
DBUG_PRINT("info", ("locked_tables, skipping"));
DBUG_RETURN(0);
}
/* Prepare to move used_instances and locked tables to new TRN object */
locked_tables= trnman_has_locked_tables(trn);
trnman_reset_locked_tables(trn, 0);
relink_trn_used_instances(&used_tables, trn);
error= 0;
if (unlikely(ma_commit(trn)))
error= HA_ERR_COMMIT_ERROR;
if (!new_trn)
{
reset_thd_trn(thd, used_tables);
goto end;
}
/*
We need to create a new transaction and put it in THD_TRN. Indeed,
tables may be under LOCK TABLES, and so they will start the next
statement assuming they have a trn (see ha_maria::start_stmt()).
*/
trn= trnman_new_trn(& thd->transaction->wt);
thd_set_ha_data(thd, maria_hton, trn);
if (unlikely(trn == NULL))
{
reset_thd_trn(thd, used_tables);
error= HA_ERR_OUT_OF_MEM;
goto end;
}
/*
Move all locked tables to the new transaction
We must do it here as otherwise file->thd and file->state may be
stale pointers. We can't do this in start_stmt() as we don't know
when we should call _ma_setup_live_state() and in some cases, like
in check table, we use the table without calling start_stmt().
*/
for (MARIA_HA *handler= used_tables; handler ;
handler= trn_next)
{
trn_next= handler->trn_next;
DBUG_ASSERT(handler->s->base.born_transactional);
/* If handler uses versioning */
if (handler->s->lock_key_trees)
{
/* _ma_set_trn_for_table() will be called indirectly */
if (_ma_setup_live_state(handler))
error= HA_ERR_OUT_OF_MEM;
}
else
_ma_set_trn_for_table(handler, trn);
}
/* This is just a commit, tables stay locked if they were: */
trnman_reset_locked_tables(trn, locked_tables);
end:
DBUG_RETURN(error);
} | O0 | cpp | ha_maria::implicit_commit(THD*, bool):
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
cmpq $0x0, 0xaeff84(%rip) # 0x15f7310
je 0xb073b4
leaq 0xab9664(%rip), %rax # 0x15c09f9
cmpb $0x0, (%rax)
je 0xb073b4
movq -0x10(%rbp), %rdi
movq 0xaeff6b(%rip), %rsi # 0x15f7310
callq 0x53dca0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0xb073c2
jmp 0xb073b6
movl $0x0, -0x4(%rbp)
jmp 0xb07513
testb $0x1, -0x11(%rbp)
jne 0xb073f4
movq -0x10(%rbp), %rax
cmpl $0x1, 0x120(%rax)
je 0xb073e2
movq -0x10(%rbp), %rax
cmpl $0x3, 0x120(%rax)
jne 0xb073f4
jmp 0xb073e4
jmp 0xb073e6
jmp 0xb073e8
movl $0x0, -0x4(%rbp)
jmp 0xb07513
movq -0x20(%rbp), %rdi
callq 0xb0dc70
movl %eax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0xb0dcb0
movq -0x20(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0xb09880
movl $0x0, -0x24(%rbp)
movq -0x20(%rbp), %rdi
callq 0xb2e5f0
cmpl $0x0, %eax
je 0xb07434
movl $0xc5, -0x24(%rbp)
testb $0x1, -0x11(%rbp)
jne 0xb0744c
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0xb098d0
jmp 0xb0750b
movq -0x10(%rbp), %rax
movq 0x3998(%rax), %rdi
addq $0xe0, %rdi
callq 0xb0e040
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq 0xaefe9e(%rip), %rsi # 0x15f7310
movq -0x20(%rbp), %rdx
callq 0x53dcd0
cmpq $0x0, -0x20(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0xb074a3
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0xb098d0
movl $0x80, -0x24(%rbp)
jmp 0xb0750b
movq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0xb074ff
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0xb074c0
movq -0x40(%rbp), %rax
movq (%rax), %rax
cmpb $0x0, 0x7e3(%rax)
je 0xb074e6
movq -0x40(%rbp), %rdi
callq 0xaf6270
cmpb $0x0, %al
je 0xb074e4
movl $0x80, -0x24(%rbp)
jmp 0xb074f3
movq -0x40(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xb05be0
jmp 0xb074f5
movq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0xb074ab
movq -0x20(%rbp), %rdi
movl -0x28(%rbp), %esi
callq 0xb0dcb0
jmp 0xb0750d
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
| _ZN8ha_maria15implicit_commitEP3THDb:
push rbp
mov rbp, rsp
sub rsp, 40h
mov al, sil
mov [rbp+var_10], rdi
and al, 1
mov [rbp+var_11], al
cmp cs:maria_hton, 0
jz short loc_B073B4
lea rax, plugins_are_initialized
cmp byte ptr [rax], 0
jz short loc_B073B4
mov rdi, [rbp+var_10]
mov rsi, cs:maria_hton
call thd_get_ha_data
mov [rbp+var_20], rax
cmp rax, 0
jnz short loc_B073C2
loc_B073B4:
jmp short $+2
loc_B073B6:
mov [rbp+var_4], 0
jmp loc_B07513
loc_B073C2:
test [rbp+var_11], 1
jnz short loc_B073F4
mov rax, [rbp+var_10]
cmp dword ptr [rax+120h], 1
jz short loc_B073E2
mov rax, [rbp+var_10]
cmp dword ptr [rax+120h], 3
jnz short loc_B073F4
loc_B073E2:
jmp short $+2
loc_B073E4:
jmp short $+2
loc_B073E6:
jmp short $+2
loc_B073E8:
mov [rbp+var_4], 0
jmp loc_B07513
loc_B073F4:
mov rdi, [rbp+var_20]
call trnman_has_locked_tables
mov [rbp+var_28], eax
mov rdi, [rbp+var_20]
xor esi, esi
call trnman_reset_locked_tables
mov rsi, [rbp+var_20]
lea rdi, [rbp+var_30]
call _ZL25relink_trn_used_instancesPP16st_maria_handlerP17st_ma_transaction; relink_trn_used_instances(st_maria_handler **,st_ma_transaction *)
mov [rbp+var_24], 0
mov rdi, [rbp+var_20]
call ma_commit
cmp eax, 0
jz short loc_B07434
mov [rbp+var_24], 0C5h
loc_B07434:
test [rbp+var_11], 1
jnz short loc_B0744C
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_30]
call _ZL13reset_thd_trnP3THDP16st_maria_handler; reset_thd_trn(THD *,st_maria_handler *)
jmp loc_B0750B
loc_B0744C:
mov rax, [rbp+var_10]
mov rdi, [rax+3998h]
add rdi, 0E0h
call trnman_new_trn
mov [rbp+var_20], rax
mov rdi, [rbp+var_10]
mov rsi, cs:maria_hton
mov rdx, [rbp+var_20]
call thd_set_ha_data
cmp [rbp+var_20], 0
setz al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_B074A3
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_30]
call _ZL13reset_thd_trnP3THDP16st_maria_handler; reset_thd_trn(THD *,st_maria_handler *)
mov [rbp+var_24], 80h
jmp short loc_B0750B
loc_B074A3:
mov rax, [rbp+var_30]
mov [rbp+var_40], rax
loc_B074AB:
cmp [rbp+var_40], 0
jz short loc_B074FF
mov rax, [rbp+var_40]
mov rax, [rax+10h]
mov [rbp+var_38], rax
jmp short $+2
loc_B074C0:
mov rax, [rbp+var_40]
mov rax, [rax]
cmp byte ptr [rax+7E3h], 0
jz short loc_B074E6
mov rdi, [rbp+var_40]
call _ma_setup_live_state
cmp al, 0
jz short loc_B074E4
mov [rbp+var_24], 80h
loc_B074E4:
jmp short loc_B074F3
loc_B074E6:
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_20]
call _ZL21_ma_set_trn_for_tableP16st_maria_handlerP17st_ma_transaction; _ma_set_trn_for_table(st_maria_handler *,st_ma_transaction *)
loc_B074F3:
jmp short $+2
loc_B074F5:
mov rax, [rbp+var_38]
mov [rbp+var_40], rax
jmp short loc_B074AB
loc_B074FF:
mov rdi, [rbp+var_20]
mov esi, [rbp+var_28]
call trnman_reset_locked_tables
loc_B0750B:
jmp short $+2
loc_B0750D:
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
loc_B07513:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
| long long ha_maria::implicit_commit(ha_maria *this, THD *a2)
{
long long *i; // [rsp+0h] [rbp-40h]
long long *v4; // [rsp+8h] [rbp-38h]
long long *v5; // [rsp+10h] [rbp-30h] BYREF
unsigned int has_locked_tables; // [rsp+18h] [rbp-28h]
unsigned int v7; // [rsp+1Ch] [rbp-24h]
long long ha_data; // [rsp+20h] [rbp-20h]
char v9; // [rsp+2Fh] [rbp-11h]
ha_maria *v10; // [rsp+30h] [rbp-10h]
v10 = this;
v9 = (unsigned __int8)a2 & 1;
if ( maria_hton && plugins_are_initialized && (ha_data = thd_get_ha_data((long long)v10, maria_hton)) != 0 )
{
if ( (v9 & 1) == 0 && (*((_DWORD *)v10 + 72) == 1 || *((_DWORD *)v10 + 72) == 3) )
{
return 0;
}
else
{
has_locked_tables = trnman_has_locked_tables(ha_data);
trnman_reset_locked_tables(ha_data, 0LL);
relink_trn_used_instances(&v5, ha_data);
v7 = 0;
if ( (unsigned int)ma_commit(ha_data) )
v7 = 197;
if ( (v9 & 1) != 0 )
{
ha_data = trnman_new_trn(*((_QWORD *)v10 + 1843) + 224LL);
thd_set_ha_data((long long)v10, maria_hton, ha_data);
if ( ha_data )
{
for ( i = v5; i; i = v4 )
{
v4 = (long long *)i[2];
if ( *(_BYTE *)(*i + 2019) )
{
if ( ma_setup_live_state(i) )
v7 = 128;
}
else
{
_ma_set_trn_for_table(i, ha_data);
}
}
trnman_reset_locked_tables(ha_data, has_locked_tables);
}
else
{
reset_thd_trn(v10, v5);
return 128;
}
}
else
{
reset_thd_trn(v10, v5);
}
return v7;
}
}
else
{
return 0;
}
}
| make_global_read_lock_block_commit:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x40],RAX
CMP dword ptr [RAX],0x1
JZ 0x00b07398
JMP 0x00b0738f
LAB_00b0738f:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00b074fb
LAB_00b07398:
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,RAX
ADD RDI,0x150
MOV RSI,qword ptr [RCX + 0x8]
MOVQ XMM0,qword ptr [RAX + 0x968]
MOVAPS XMM1,xmmword ptr [0x00f0ca90]
PUNPCKLDQ XMM0,XMM1
MOVAPD XMM1,xmmword ptr [0x00f0caa0]
SUBPD XMM0,XMM1
MOVAPS XMM1,XMM0
UNPCKHPD XMM0,XMM0
ADDSD XMM0,XMM1
MOV EDX,0x6
CALL 0x00825d40
TEST AL,0x1
JNZ 0x00b073e8
JMP 0x00b073f3
LAB_00b073e8:
JMP 0x00b073ea
LAB_00b073ea:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00b074fb
LAB_00b073f3:
MOV RAX,qword ptr [RBP + -0x40]
MOV dword ptr [RAX],0x2
CALL 0x0059d240
MOV qword ptr [RBP + -0x20],RAX
LEA RDI,[RBP + -0x28]
CALL 0x00655bc0
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x0059d250
CMP EAX,0x6
JZ 0x00b07444
LEA RAX,[0x1f4e3c4]
TEST byte ptr [RAX],0x1
JZ 0x00b0745b
MOV RAX,qword ptr [RBP + -0x18]
CMP byte ptr [RAX + 0xbd0],0x0
JZ 0x00b0745b
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x0059d250
CMP EAX,0x7
JZ 0x00b0745b
LAB_00b07444:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00e4d320
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00b074a3
LAB_00b0745b:
LEA RAX,[0x1f4e3c4]
TEST byte ptr [RAX],0x1
JZ 0x00b07499
MOV RAX,qword ptr [RBP + -0x18]
CMP byte ptr [RAX + 0xbd0],0x0
JZ 0x00b07499
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x0059d250
CMP EAX,0x7
JNZ 0x00b07499
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00e4d750
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00b074a1
LAB_00b07499:
JMP 0x00b0749b
LAB_00b0749b:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00b074fb
LAB_00b074a1:
JMP 0x00b074a3
LAB_00b074a3:
LEA RDI,[RBP + -0x28]
CALL 0x009ed390
MOV R8,RAX
LEA RDI,[0xaf0b80]
LEA RSI,[0xec9cbd]
MOV EDX,0x4bd
LEA RCX,[0xec9cf2]
MOV AL,0x0
CALL 0x00e19c90
LEA RDI,[RBP + -0x28]
CALL 0x009ed390
CMP RAX,0x0
JL 0x00b074f5
LEA RDI,[RBP + -0x28]
CALL 0x009ed390
MOV RCX,RAX
LEA RAX,[0x16ba718]
MOV qword ptr [RAX],RCX
LAB_00b074f5:
JMP 0x00b074f7
LAB_00b074f7:
MOV byte ptr [RBP + -0x1],0x0
LAB_00b074fb:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x40
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* Global_read_lock::make_global_read_lock_block_commit(THD*) */
int1 __thiscall
Global_read_lock::make_global_read_lock_block_commit(Global_read_lock *this,THD *param_1)
{
int iVar1;
ulong uVar2;
int8 uVar3;
long lVar4;
int1 auVar5 [16];
int8 local_30;
server_state *local_28;
THD *local_20;
Global_read_lock *local_18;
if (*(int *)this != 1) {
return 0;
}
uVar3 = *(int8 *)(param_1 + 0x968);
auVar5._8_4_ = (int)((ulong)uVar3 >> 0x20);
auVar5._0_8_ = uVar3;
auVar5._12_4_ = _UNK_00f0ca94;
local_20 = param_1;
local_18 = this;
uVar2 = MDL_context::upgrade_shared_lock
((MDL_context *)
((auVar5._8_8_ - _UNK_00f0caa8) +
((double)CONCAT44(_DAT_00f0ca90,(int)uVar3) - _DAT_00f0caa0)),param_1 + 0x150,
*(int8 *)(this + 8),6);
if ((uVar2 & 1) != 0) {
return 1;
}
*(int4 *)this = 2;
local_28 = (server_state *)Wsrep_server_state::instance();
wsrep::seqno::seqno((seqno *)&local_30);
iVar1 = wsrep::server_state::state(local_28);
if ((iVar1 == 6) ||
((((WSREP_PROVIDER_EXISTS_ & 1) != 0 && (local_20[0xbd0] != (THD)0x0)) &&
(iVar1 = wsrep::server_state::state(local_28), iVar1 != 7)))) {
local_30 = wsrep::server_state::pause(local_28);
}
else {
if ((WSREP_PROVIDER_EXISTS_ & 1) == 0) {
return 0;
}
if (local_20[0xbd0] == (THD)0x0) {
return 0;
}
iVar1 = wsrep::server_state::state(local_28);
if (iVar1 != 7) {
return 0;
}
local_30 = wsrep::server_state::desync_and_pause(local_28);
}
uVar3 = wsrep::seqno::get((seqno *)&local_30);
WSREP_LOG(glog_print_information,"/workspace/llm4binary/github2025/eloqsql/sql/lock.cc",0x4bd,
"Server paused at: %lld",uVar3);
lVar4 = wsrep::seqno::get((seqno *)&local_30);
if (-1 < lVar4) {
wsrep_locked_seqno = wsrep::seqno::get((seqno *)&local_30);
}
return 0;
}
| |
23,157 | chess::Board::unmakeMove(chess::Move) | Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp | void unmakeMove(const Move move) {
const auto prev = prev_states_.back();
prev_states_.pop_back();
ep_sq_ = prev.enpassant;
cr_ = prev.castling;
hfm_ = prev.half_moves;
stm_ = ~stm_;
plies_--;
if (move.typeOf() == Move::CASTLING) {
const bool king_side = move.to() > move.from();
const auto rook_from_sq = Square(king_side ? File::FILE_F : File::FILE_D, move.from().rank());
const auto king_to_sq = Square(king_side ? File::FILE_G : File::FILE_C, move.from().rank());
assert(at<PieceType>(rook_from_sq) == PieceType::ROOK);
assert(at<PieceType>(king_to_sq) == PieceType::KING);
const auto rook = at(rook_from_sq);
const auto king = at(king_to_sq);
removePiece(rook, rook_from_sq);
removePiece(king, king_to_sq);
assert(king == Piece(PieceType::KING, stm_));
assert(rook == Piece(PieceType::ROOK, stm_));
placePiece(king, move.from());
placePiece(rook, move.to());
key_ = prev.hash;
return;
} else if (move.typeOf() == Move::PROMOTION) {
const auto pawn = Piece(PieceType::PAWN, stm_);
const auto piece = at(move.to());
assert(piece.type() == move.promotionType());
assert(piece.type() != PieceType::PAWN);
assert(piece.type() != PieceType::KING);
assert(piece.type() != PieceType::NONE);
removePiece(piece, move.to());
placePiece(pawn, move.from());
if (prev.captured_piece != Piece::NONE) {
assert(at(move.to()) == Piece::NONE);
placePiece(prev.captured_piece, move.to());
}
key_ = prev.hash;
return;
} else {
assert(at(move.to()) != Piece::NONE);
assert(at(move.from()) == Piece::NONE);
const auto piece = at(move.to());
removePiece(piece, move.to());
placePiece(piece, move.from());
}
if (move.typeOf() == Move::ENPASSANT) {
const auto pawn = Piece(PieceType::PAWN, ~stm_);
const auto pawnTo = static_cast<Square>(ep_sq_ ^ 8);
assert(at(pawnTo) == Piece::NONE);
placePiece(pawn, pawnTo);
} else if (prev.captured_piece != Piece::NONE) {
assert(at(move.to()) == Piece::NONE);
placePiece(prev.captured_piece, move.to());
}
key_ = prev.hash;
} | O1 | cpp | chess::Board::unmakeMove(chess::Move):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %r14d
movq %rdi, %rbx
movq 0x10(%rdi), %rax
leaq -0x18(%rax), %rcx
movq -0x18(%rax), %r8
movl -0x10(%rax), %edx
movl -0xc(%rax), %esi
movb -0x8(%rax), %dil
movb -0x7(%rax), %r12b
movq %rcx, 0x10(%rbx)
movl %esi, 0xb0(%rbx)
movl %edx, 0xa8(%rbx)
movb %dil, 0xb4(%rbx)
movb 0xae(%rbx), %al
cmpb $0x2, %al
jae 0xbdeb
xorb $0x1, %al
movb %al, 0xae(%rbx)
decw 0xac(%rbx)
movl %r14d, %r13d
andl $0xc000, %r13d # imm = 0xC000
cmpl $0x4000, %r13d # imm = 0x4000
movq %r8, 0x10(%rsp)
je 0xbc78
cmpl $0xc000, %r13d # imm = 0xC000
jne 0xbd20
movl %r14d, %edx
andl $0x3f, %edx
shrl $0x6, %r14d
movl %r14d, %esi
andl $0x3f, %esi
xorl %eax, %eax
cmpl %esi, %edx
seta %al
andl $0x38, %r14d
leal (%r14,%rax,2), %ecx
movzbl 0x63(%rcx,%rbx), %ebp
leal -0x6(%rbp), %ecx
cmpb $0x6, %bpl
movzbl %cl, %ecx
cmovbl %ebp, %ecx
cmpb $0x3, %cl
jne 0xbe0a
movl %esi, 0x8(%rsp)
movl %edx, 0xc(%rsp)
leal (%r14,%rax,4), %r13d
addl $0x2, %r13d
movzbl 0x60(%rbx,%r13), %r15d
leal -0x6(%r15), %ecx
cmpb $0x6, %r15b
movzbl %cl, %ecx
cmovbl %r15d, %ecx
cmpb $0x5, %cl
jne 0xbe67
leal (%r14,%rax,2), %edx
addl $0x3, %edx
movq (%rbx), %rax
movzbl %bpl, %r14d
movq %rbx, %rdi
movl %r14d, %esi
callq *0x10(%rax)
movq (%rbx), %rax
movzbl %r15b, %r12d
movq %rbx, %rdi
movl %r12d, %esi
movl %r13d, %edx
callq *0x10(%rax)
movzbl 0xae(%rbx), %eax
movl %eax, %ecx
addl %ecx, %ecx
leal (%rcx,%rcx,2), %ecx
leal 0x5(%rcx), %edx
cmpb $-0x1, %al
movzbl %dl, %esi
movl $0xc, %edx
cmovel %edx, %esi
cmpb %sil, %r15b
jne 0xbec4
addb $0x3, %cl
cmpb $-0x1, %al
movzbl %cl, %eax
cmovel %edx, %eax
cmpb %al, %bpl
jne 0xbf02
movq (%rbx), %rax
movq %rbx, %rdi
movl %r12d, %esi
movl 0x8(%rsp), %edx
callq *0x8(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
movl %r14d, %esi
movl 0xc(%rsp), %edx
jmp 0xbdcd
movl %r14d, %r15d
andl $0x3f, %r15d
movzbl 0x60(%rbx,%r15), %ecx
leal -0x6(%rcx), %edx
cmpb $0x6, %cl
movzbl %dl, %edx
cmovbl %ecx, %edx
movl %r14d, %esi
shrl $0xc, %esi
andb $0x3, %sil
incb %sil
cmpb %sil, %dl
jne 0xbe29
cmpb $0x6, %dl
je 0xbe86
movzbl %dl, %edx
cmpl $0x5, %edx
je 0xbee3
movzbl %al, %eax
addl %eax, %eax
leal (%rax,%rax,2), %ebp
movq (%rbx), %rax
movzbl %cl, %esi
movq %rbx, %rdi
movl %r15d, %edx
callq *0x10(%rax)
shrl $0x6, %r14d
andl $0x3f, %r14d
movq (%rbx), %rax
movzbl %bpl, %esi
movq %rbx, %rdi
movl %r14d, %edx
callq *0x8(%rax)
cmpb $0xc, %r12b
je 0xbdd0
cmpb $0xc, 0x60(%rbx,%r15)
je 0xbdc0
leaq 0x5536(%rip), %rdi # 0x1123e
leaq 0x4ecd(%rip), %rsi # 0x10bdc
leaq 0x589f(%rip), %rcx # 0x115b5
movl $0x889, %edx # imm = 0x889
callq 0x3130
movl %r14d, %r15d
andl $0x3f, %r15d
movb 0x60(%rbx,%r15), %al
cmpb $0xc, %al
je 0xbe48
shrl $0x6, %r14d
andl $0x3f, %r14d
cmpb $0xc, 0x60(%rbx,%r14)
jne 0xbea5
movq (%rbx), %rcx
movzbl %al, %ebp
movq %rbx, %rdi
movl %ebp, %esi
movl %r15d, %edx
callq *0x10(%rcx)
movq (%rbx), %rax
movq %rbx, %rdi
movl %ebp, %esi
movl %r14d, %edx
callq *0x8(%rax)
negw %r13w
jno 0xbdae
movb 0xae(%rbx), %al
cmpb $0x2, %al
jae 0xbdeb
movl 0xb0(%rbx), %edx
cmpq $0x40, %rdx
jae 0xbf21
xorq $0x8, %rdx
cmpb $0xc, 0x60(%rbx,%rdx)
jne 0xbf40
xorb $0x1, %al
movzbl %al, %eax
addl %eax, %eax
leal (%rax,%rax,2), %eax
movq (%rbx), %rcx
movzbl %al, %esi
movq %rbx, %rdi
callq *0x8(%rcx)
jmp 0xbdd0
cmpb $0xc, %r12b
je 0xbdd0
cmpb $0xc, 0x60(%rbx,%r15)
jne 0xbf5f
movq (%rbx), %rax
movzbl %r12b, %esi
movq %rbx, %rdi
movl %r15d, %edx
callq *0x8(%rax)
movq 0x10(%rsp), %rax
movq %rax, 0xa0(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x29ba(%rip), %rdi # 0xe7ac
leaq 0x4de3(%rip), %rsi # 0x10bdc
leaq 0x29c8(%rip), %rcx # 0xe7c8
movl $0x48, %edx
callq 0x3130
leaq 0x5775(%rip), %rdi # 0x11586
leaq 0x4dc4(%rip), %rsi # 0x10bdc
leaq 0x5796(%rip), %rcx # 0x115b5
movl $0x86a, %edx # imm = 0x86A
callq 0x3130
leaq 0x57dc(%rip), %rdi # 0x1160c
leaq 0x4da5(%rip), %rsi # 0x10bdc
leaq 0x5777(%rip), %rcx # 0x115b5
movl $0x880, %edx # imm = 0x880
callq 0x3130
leaq 0x5822(%rip), %rdi # 0x11671
leaq 0x4d86(%rip), %rsi # 0x10bdc
leaq 0x5758(%rip), %rcx # 0x115b5
movl $0x890, %edx # imm = 0x890
callq 0x3130
leaq 0x5771(%rip), %rdi # 0x115df
leaq 0x4d67(%rip), %rsi # 0x10bdc
leaq 0x5739(%rip), %rcx # 0x115b5
movl $0x86b, %edx # imm = 0x86B
callq 0x3130
leaq 0x57c4(%rip), %rdi # 0x11651
leaq 0x4d48(%rip), %rsi # 0x10bdc
leaq 0x571a(%rip), %rcx # 0x115b5
movl $0x883, %edx # imm = 0x883
callq 0x3130
leaq 0x57e2(%rip), %rdi # 0x1168e
leaq 0x4d29(%rip), %rsi # 0x10bdc
leaq 0x56fb(%rip), %rcx # 0x115b5
movl $0x891, %edx # imm = 0x891
callq 0x3130
leaq 0x530a(%rip), %rdi # 0x111d5
leaq 0x4d0a(%rip), %rsi # 0x10bdc
leaq 0x56dc(%rip), %rcx # 0x115b5
movl $0x873, %edx # imm = 0x873
callq 0x3130
leaq 0x5747(%rip), %rdi # 0x11631
leaq 0x4ceb(%rip), %rsi # 0x10bdc
leaq 0x56bd(%rip), %rcx # 0x115b5
movl $0x882, %edx # imm = 0x882
callq 0x3130
leaq 0x52f1(%rip), %rdi # 0x111fa
leaq 0x4ccc(%rip), %rsi # 0x10bdc
leaq 0x569e(%rip), %rcx # 0x115b5
movl $0x874, %edx # imm = 0x874
callq 0x3130
leaq 0x295c(%rip), %rdi # 0xe884
leaq 0x4cad(%rip), %rsi # 0x10bdc
leaq 0x4e0e(%rip), %rcx # 0x10d44
movl $0x908, %edx # imm = 0x908
callq 0x3130
leaq 0x5766(%rip), %rdi # 0x116ad
leaq 0x4c8e(%rip), %rsi # 0x10bdc
leaq 0x5660(%rip), %rcx # 0x115b5
movl $0x89d, %edx # imm = 0x89D
callq 0x3130
leaq 0x52d8(%rip), %rdi # 0x1123e
leaq 0x4c6f(%rip), %rsi # 0x10bdc
leaq 0x5641(%rip), %rcx # 0x115b5
movl $0x8a1, %edx # imm = 0x8A1
callq 0x3130
| _ZN5chess5Board10unmakeMoveENS_4MoveE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14d, esi
mov rbx, rdi
mov rax, [rdi+10h]
lea rcx, [rax-18h]
mov r8, [rax-18h]
mov edx, [rax-10h]
mov esi, [rax-0Ch]
mov dil, [rax-8]
mov r12b, [rax-7]
mov [rbx+10h], rcx
mov [rbx+0B0h], esi
mov [rbx+0A8h], edx
mov [rbx+0B4h], dil
mov al, [rbx+0AEh]
cmp al, 2
jnb loc_BDEB
xor al, 1
mov [rbx+0AEh], al
dec word ptr [rbx+0ACh]
mov r13d, r14d
and r13d, 0C000h
cmp r13d, 4000h
mov [rsp+48h+var_38], r8
jz loc_BC78
cmp r13d, 0C000h
jnz loc_BD20
mov edx, r14d
and edx, 3Fh
shr r14d, 6
mov esi, r14d
and esi, 3Fh
xor eax, eax
cmp edx, esi
setnbe al
and r14d, 38h
lea ecx, [r14+rax*2]
movzx ebp, byte ptr [rcx+rbx+63h]
lea ecx, [rbp-6]
cmp bpl, 6
movzx ecx, cl
cmovb ecx, ebp
cmp cl, 3
jnz loc_BE0A
mov [rsp+48h+var_40], esi
mov [rsp+48h+var_3C], edx
lea r13d, [r14+rax*4]
add r13d, 2
movzx r15d, byte ptr [rbx+r13+60h]
lea ecx, [r15-6]
cmp r15b, 6
movzx ecx, cl
cmovb ecx, r15d
cmp cl, 5
jnz loc_BE67
lea edx, [r14+rax*2]
add edx, 3
mov rax, [rbx]
movzx r14d, bpl
mov rdi, rbx
mov esi, r14d
call qword ptr [rax+10h]
mov rax, [rbx]
movzx r12d, r15b
mov rdi, rbx
mov esi, r12d
mov edx, r13d
call qword ptr [rax+10h]
movzx eax, byte ptr [rbx+0AEh]
mov ecx, eax
add ecx, ecx
lea ecx, [rcx+rcx*2]
lea edx, [rcx+5]
cmp al, 0FFh
movzx esi, dl
mov edx, 0Ch
cmovz esi, edx
cmp r15b, sil
jnz loc_BEC4
add cl, 3
cmp al, 0FFh
movzx eax, cl
cmovz eax, edx
cmp bpl, al
jnz loc_BF02
mov rax, [rbx]
mov rdi, rbx
mov esi, r12d
mov edx, [rsp+48h+var_40]
call qword ptr [rax+8]
mov rax, [rbx]
mov rdi, rbx
mov esi, r14d
mov edx, [rsp+48h+var_3C]
jmp loc_BDCD
loc_BC78:
mov r15d, r14d
and r15d, 3Fh
movzx ecx, byte ptr [rbx+r15+60h]
lea edx, [rcx-6]
cmp cl, 6
movzx edx, dl
cmovb edx, ecx
mov esi, r14d
shr esi, 0Ch
and sil, 3
inc sil
cmp dl, sil
jnz loc_BE29
cmp dl, 6
jz loc_BE86
movzx edx, dl
cmp edx, 5
jz loc_BEE3
movzx eax, al
add eax, eax
lea ebp, [rax+rax*2]
mov rax, [rbx]
movzx esi, cl
mov rdi, rbx
mov edx, r15d
call qword ptr [rax+10h]
shr r14d, 6
and r14d, 3Fh
mov rax, [rbx]
movzx esi, bpl
mov rdi, rbx
mov edx, r14d
call qword ptr [rax+8]
cmp r12b, 0Ch
jz loc_BDD0
cmp byte ptr [rbx+r15+60h], 0Ch
jz loc_BDC0
lea rdi, aAtMoveToPieceN; "at(move.to()) == Piece::NONE"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidChessBoard_4; "void chess::Board::unmakeMove(const Mov"...
mov edx, 889h
call ___assert_fail
loc_BD20:
mov r15d, r14d
and r15d, 3Fh
mov al, [rbx+r15+60h]
cmp al, 0Ch
jz loc_BE48
shr r14d, 6
and r14d, 3Fh
cmp byte ptr [rbx+r14+60h], 0Ch
jnz loc_BEA5
mov rcx, [rbx]
movzx ebp, al
mov rdi, rbx
mov esi, ebp
mov edx, r15d
call qword ptr [rcx+10h]
mov rax, [rbx]
mov rdi, rbx
mov esi, ebp
mov edx, r14d
call qword ptr [rax+8]
neg r13w
jno short loc_BDAE
mov al, [rbx+0AEh]
cmp al, 2
jnb short loc_BDEB
mov edx, [rbx+0B0h]
cmp rdx, 40h ; '@'
jnb loc_BF21
xor rdx, 8
cmp byte ptr [rbx+rdx+60h], 0Ch
jnz loc_BF40
xor al, 1
movzx eax, al
add eax, eax
lea eax, [rax+rax*2]
mov rcx, [rbx]
movzx esi, al
mov rdi, rbx
call qword ptr [rcx+8]
jmp short loc_BDD0
loc_BDAE:
cmp r12b, 0Ch
jz short loc_BDD0
cmp byte ptr [rbx+r15+60h], 0Ch
jnz loc_BF5F
loc_BDC0:
mov rax, [rbx]
movzx esi, r12b
mov rdi, rbx
mov edx, r15d
loc_BDCD:
call qword ptr [rax+8]
loc_BDD0:
mov rax, [rsp+48h+var_38]
mov [rbx+0A0h], rax
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_BDEB:
lea rdi, aC0C1C1; "c == 0 || c == 1 || c == -1"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aChessColorColo; "chess::Color::Color(int)"
mov edx, 48h ; 'H'
call ___assert_fail
loc_BE0A:
lea rdi, aAtPiecetypeRoo; "at<PieceType>(rook_from_sq) == PieceTyp"...
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidChessBoard_4; "void chess::Board::unmakeMove(const Mov"...
mov edx, 86Ah
call ___assert_fail
loc_BE29:
lea rdi, aPieceTypeMoveP; "piece.type() == move.promotionType()"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidChessBoard_4; "void chess::Board::unmakeMove(const Mov"...
mov edx, 880h
call ___assert_fail
loc_BE48:
lea rdi, aAtMoveToPieceN_0; "at(move.to()) != Piece::NONE"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidChessBoard_4; "void chess::Board::unmakeMove(const Mov"...
mov edx, 890h
call ___assert_fail
loc_BE67:
lea rdi, aAtPiecetypeKin; "at<PieceType>(king_to_sq) == PieceType:"...
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidChessBoard_4; "void chess::Board::unmakeMove(const Mov"...
mov edx, 86Bh
call ___assert_fail
loc_BE86:
lea rdi, aPieceTypePiece; "piece.type() != PieceType::NONE"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidChessBoard_4; "void chess::Board::unmakeMove(const Mov"...
mov edx, 883h
call ___assert_fail
loc_BEA5:
lea rdi, aAtMoveFromPiec_1; "at(move.from()) == Piece::NONE"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidChessBoard_4; "void chess::Board::unmakeMove(const Mov"...
mov edx, 891h
call ___assert_fail
loc_BEC4:
lea rdi, aKingPiecePiece; "king == Piece(PieceType::KING, stm_)"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidChessBoard_4; "void chess::Board::unmakeMove(const Mov"...
mov edx, 873h
call ___assert_fail
loc_BEE3:
lea rdi, aPieceTypePiece_0; "piece.type() != PieceType::KING"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidChessBoard_4; "void chess::Board::unmakeMove(const Mov"...
mov edx, 882h
call ___assert_fail
loc_BF02:
lea rdi, aRookPiecePiece; "rook == Piece(PieceType::ROOK, stm_)"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidChessBoard_4; "void chess::Board::unmakeMove(const Mov"...
mov edx, 874h
call ___assert_fail
loc_BF21:
lea rdi, aSqIndex64SqInd; "sq.index() < 64 && sq.index() >= 0"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aTChessBoardAtS_0; "T chess::Board::at(Square) const [T = c"...
mov edx, 908h
call ___assert_fail
loc_BF40:
lea rdi, aAtPawntoPieceN; "at(pawnTo) == Piece::NONE"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidChessBoard_4; "void chess::Board::unmakeMove(const Mov"...
mov edx, 89Dh
call ___assert_fail
loc_BF5F:
lea rdi, aAtMoveToPieceN; "at(move.to()) == Piece::NONE"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidChessBoard_4; "void chess::Board::unmakeMove(const Mov"...
mov edx, 8A1h
call ___assert_fail
| long long chess::Board::unmakeMove(_QWORD *a1, unsigned int a2)
{
long long v4; // rax
long long v5; // r8
int v6; // edx
int v7; // esi
char v8; // di
unsigned __int8 v9; // r12
unsigned __int8 v10; // al
char v11; // al
int v12; // r13d
unsigned int v13; // edx
unsigned int v14; // r14d
unsigned int v15; // esi
BOOL v16; // eax
int v17; // r14d
unsigned __int8 v18; // bp
char v19; // cl
long long v20; // r13
unsigned __int8 v21; // r15
char v22; // cl
char v23; // al
char v24; // si
bool v25; // zf
char v26; // al
long long v27; // rax
_QWORD *v28; // rdi
long long v29; // rsi
long long v30; // rdx
long long v31; // r15
unsigned __int8 v32; // cl
char v33; // dl
unsigned __int8 v34; // bp
unsigned __int8 v35; // al
long long v36; // r14
unsigned int v37; // ebp
unsigned __int8 v38; // al
unsigned long long v39; // rdx
long long result; // rax
unsigned int v41; // [rsp+8h] [rbp-40h]
unsigned int v42; // [rsp+Ch] [rbp-3Ch]
long long v43; // [rsp+10h] [rbp-38h]
v4 = a1[2];
v5 = *(_QWORD *)(v4 - 24);
v6 = *(_DWORD *)(v4 - 16);
v7 = *(_DWORD *)(v4 - 12);
v8 = *(_BYTE *)(v4 - 8);
v9 = *(_BYTE *)(v4 - 7);
a1[2] = v4 - 24;
*((_DWORD *)a1 + 44) = v7;
*((_DWORD *)a1 + 42) = v6;
*((_BYTE *)a1 + 180) = v8;
v10 = *((_BYTE *)a1 + 174);
if ( v10 >= 2u )
goto LABEL_37;
v11 = v10 ^ 1;
*((_BYTE *)a1 + 174) = v11;
--*((_WORD *)a1 + 86);
v12 = a2 & 0xC000;
v43 = v5;
if ( v12 != 0x4000 )
{
if ( v12 == 49152 )
{
v13 = a2 & 0x3F;
v14 = a2 >> 6;
v15 = v14 & 0x3F;
v16 = v13 > v15;
v17 = v14 & 0x38;
v18 = *((_BYTE *)a1 + (unsigned int)(v17 + 2 * v16) + 99);
v19 = v18 - 6;
if ( v18 < 6u )
v19 = *((_BYTE *)a1 + (unsigned int)(v17 + 2 * v16) + 99);
if ( v19 != 3 )
__assert_fail(
"at<PieceType>(rook_from_sq) == PieceType::ROOK",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp",
2154LL,
"void chess::Board::unmakeMove(const Move)");
v41 = v15;
v42 = v13;
v20 = (unsigned int)(v17 + 4 * v16 + 2);
v21 = *((_BYTE *)a1 + v20 + 96);
v22 = v21 - 6;
if ( v21 < 6u )
v22 = *((_BYTE *)a1 + v20 + 96);
if ( v22 != 5 )
__assert_fail(
"at<PieceType>(king_to_sq) == PieceType::KING",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp",
2155LL,
"void chess::Board::unmakeMove(const Move)");
(*(void ( **)(_QWORD *, _QWORD, _QWORD))(*a1 + 16LL))(a1, v18, (unsigned int)(v17 + 2 * v16 + 3));
(*(void ( **)(_QWORD *, _QWORD, _QWORD))(*a1 + 16LL))(a1, v21, (unsigned int)v20);
v23 = *((_BYTE *)a1 + 174);
v24 = 6 * v23 + 5;
if ( v23 == -1 )
v24 = 12;
if ( v21 != v24 )
__assert_fail(
"king == Piece(PieceType::KING, stm_)",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp",
2163LL,
"void chess::Board::unmakeMove(const Move)");
v25 = v23 == -1;
v26 = 6 * *((_BYTE *)a1 + 174) + 3;
if ( v25 )
v26 = 12;
if ( v18 != v26 )
__assert_fail(
"rook == Piece(PieceType::ROOK, stm_)",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp",
2164LL,
"void chess::Board::unmakeMove(const Move)");
(*(void ( **)(_QWORD *, _QWORD, _QWORD))(*a1 + 8LL))(a1, v21, v41);
v27 = *a1;
v28 = a1;
v29 = v18;
v30 = v42;
goto LABEL_35;
}
v31 = a2 & 0x3F;
v35 = *((_BYTE *)a1 + v31 + 96);
if ( v35 == 12 )
__assert_fail(
"at(move.to()) != Piece::NONE",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp",
2192LL,
"void chess::Board::unmakeMove(const Move)");
v36 = (a2 >> 6) & 0x3F;
if ( *((_BYTE *)a1 + v36 + 96) != 12 )
__assert_fail(
"at(move.from()) == Piece::NONE",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp",
2193LL,
"void chess::Board::unmakeMove(const Move)");
v37 = v35;
(*(void ( **)(_QWORD *, _QWORD, _QWORD))(*a1 + 16LL))(a1, v35, (unsigned int)v31);
(*(void ( **)(_QWORD *, _QWORD, _QWORD))(*a1 + 8LL))(a1, v37, (unsigned int)v36);
if ( __OFSUB__(-(__int16)v12, 1) )
{
v38 = *((_BYTE *)a1 + 174);
if ( v38 < 2u )
{
v39 = *((unsigned int *)a1 + 44);
if ( v39 >= 0x40 )
__assert_fail(
"sq.index() < 64 && sq.index() >= 0",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp",
2312LL,
"T chess::Board::at(Square) const [T = chess::Piece]");
if ( *((_BYTE *)a1 + (v39 ^ 8) + 96) != 12 )
__assert_fail(
"at(pawnTo) == Piece::NONE",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp",
2205LL,
"void chess::Board::unmakeMove(const Move)");
(*(void ( **)(_QWORD *, _QWORD))(*a1 + 8LL))(a1, (unsigned __int8)(6 * (v38 ^ 1)));
goto LABEL_36;
}
LABEL_37:
__assert_fail(
"c == 0 || c == 1 || c == -1",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp",
72LL,
"chess::Color::Color(int)");
}
if ( v9 == 12 )
goto LABEL_36;
if ( *((_BYTE *)a1 + v31 + 96) != 12 )
__assert_fail(
"at(move.to()) == Piece::NONE",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp",
2209LL,
"void chess::Board::unmakeMove(const Move)");
LABEL_34:
v27 = *a1;
v29 = v9;
v28 = a1;
v30 = (unsigned int)v31;
LABEL_35:
(*(void ( **)(_QWORD *, long long, long long))(v27 + 8))(v28, v29, v30);
goto LABEL_36;
}
v31 = a2 & 0x3F;
v32 = *((_BYTE *)a1 + v31 + 96);
v33 = v32 - 6;
if ( v32 < 6u )
v33 = *((_BYTE *)a1 + v31 + 96);
if ( v33 != ((a2 >> 12) & 3) + 1 )
__assert_fail(
"piece.type() == move.promotionType()",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp",
2176LL,
"void chess::Board::unmakeMove(const Move)");
if ( v33 == 6 )
__assert_fail(
"piece.type() != PieceType::NONE",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp",
2179LL,
"void chess::Board::unmakeMove(const Move)");
if ( v33 == 5 )
__assert_fail(
"piece.type() != PieceType::KING",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp",
2178LL,
"void chess::Board::unmakeMove(const Move)");
v34 = 6 * v11;
(*(void ( **)(_QWORD *, _QWORD, _QWORD))(*a1 + 16LL))(a1, v32, a2 & 0x3F);
(*(void ( **)(_QWORD *, _QWORD, _QWORD))(*a1 + 8LL))(a1, v34, (a2 >> 6) & 0x3F);
if ( v9 != 12 )
{
if ( *((_BYTE *)a1 + v31 + 96) != 12 )
__assert_fail(
"at(move.to()) == Piece::NONE",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp",
2185LL,
"void chess::Board::unmakeMove(const Move)");
goto LABEL_34;
}
LABEL_36:
result = v43;
a1[20] = v43;
return result;
}
| unmakeMove:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14D,ESI
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x10]
LEA RCX,[RAX + -0x18]
MOV R8,qword ptr [RAX + -0x18]
MOV EDX,dword ptr [RAX + -0x10]
MOV ESI,dword ptr [RAX + -0xc]
MOV DIL,byte ptr [RAX + -0x8]
MOV R12B,byte ptr [RAX + -0x7]
MOV qword ptr [RBX + 0x10],RCX
MOV dword ptr [RBX + 0xb0],ESI
MOV dword ptr [RBX + 0xa8],EDX
MOV byte ptr [RBX + 0xb4],DIL
MOV AL,byte ptr [RBX + 0xae]
CMP AL,0x2
JNC 0x0010bdeb
XOR AL,0x1
MOV byte ptr [RBX + 0xae],AL
DEC word ptr [RBX + 0xac]
MOV R13D,R14D
AND R13D,0xc000
CMP R13D,0x4000
MOV qword ptr [RSP + 0x10],R8
JZ 0x0010bc78
CMP R13D,0xc000
JNZ 0x0010bd20
MOV EDX,R14D
AND EDX,0x3f
SHR R14D,0x6
MOV ESI,R14D
AND ESI,0x3f
XOR EAX,EAX
CMP EDX,ESI
SETA AL
AND R14D,0x38
LEA ECX,[R14 + RAX*0x2]
MOVZX EBP,byte ptr [RCX + RBX*0x1 + 0x63]
LEA ECX,[RBP + -0x6]
CMP BPL,0x6
MOVZX ECX,CL
CMOVC ECX,EBP
CMP CL,0x3
JNZ 0x0010be0a
MOV dword ptr [RSP + 0x8],ESI
MOV dword ptr [RSP + 0xc],EDX
LEA R13D,[R14 + RAX*0x4]
ADD R13D,0x2
MOVZX R15D,byte ptr [RBX + R13*0x1 + 0x60]
LEA ECX,[R15 + -0x6]
CMP R15B,0x6
MOVZX ECX,CL
CMOVC ECX,R15D
CMP CL,0x5
JNZ 0x0010be67
LEA EDX,[R14 + RAX*0x2]
ADD EDX,0x3
MOV RAX,qword ptr [RBX]
MOVZX R14D,BPL
MOV RDI,RBX
MOV ESI,R14D
CALL qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBX]
MOVZX R12D,R15B
MOV RDI,RBX
MOV ESI,R12D
MOV EDX,R13D
CALL qword ptr [RAX + 0x10]
MOVZX EAX,byte ptr [RBX + 0xae]
MOV ECX,EAX
ADD ECX,ECX
LEA ECX,[RCX + RCX*0x2]
LEA EDX,[RCX + 0x5]
CMP AL,0xff
MOVZX ESI,DL
MOV EDX,0xc
CMOVZ ESI,EDX
CMP R15B,SIL
JNZ 0x0010bec4
ADD CL,0x3
CMP AL,0xff
MOVZX EAX,CL
CMOVZ EAX,EDX
CMP BPL,AL
JNZ 0x0010bf02
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
MOV ESI,R12D
MOV EDX,dword ptr [RSP + 0x8]
CALL qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
MOV ESI,R14D
MOV EDX,dword ptr [RSP + 0xc]
JMP 0x0010bdcd
LAB_0010bc78:
MOV R15D,R14D
AND R15D,0x3f
MOVZX ECX,byte ptr [RBX + R15*0x1 + 0x60]
LEA EDX,[RCX + -0x6]
CMP CL,0x6
MOVZX EDX,DL
CMOVC EDX,ECX
MOV ESI,R14D
SHR ESI,0xc
AND SIL,0x3
INC SIL
CMP DL,SIL
JNZ 0x0010be29
CMP DL,0x6
JZ 0x0010be86
MOVZX EDX,DL
CMP EDX,0x5
JZ 0x0010bee3
MOVZX EAX,AL
ADD EAX,EAX
LEA EBP,[RAX + RAX*0x2]
MOV RAX,qword ptr [RBX]
MOVZX ESI,CL
MOV RDI,RBX
MOV EDX,R15D
CALL qword ptr [RAX + 0x10]
SHR R14D,0x6
AND R14D,0x3f
MOV RAX,qword ptr [RBX]
MOVZX ESI,BPL
MOV RDI,RBX
MOV EDX,R14D
CALL qword ptr [RAX + 0x8]
CMP R12B,0xc
JZ 0x0010bdd0
CMP byte ptr [RBX + R15*0x1 + 0x60],0xc
JZ 0x0010bdc0
LEA RDI,[0x11123e]
LEA RSI,[0x110bdc]
LEA RCX,[0x1115b5]
MOV EDX,0x889
CALL 0x00103130
LAB_0010bd20:
MOV R15D,R14D
AND R15D,0x3f
MOV AL,byte ptr [RBX + R15*0x1 + 0x60]
CMP AL,0xc
JZ 0x0010be48
SHR R14D,0x6
AND R14D,0x3f
CMP byte ptr [RBX + R14*0x1 + 0x60],0xc
JNZ 0x0010bea5
MOV RCX,qword ptr [RBX]
MOVZX EBP,AL
MOV RDI,RBX
MOV ESI,EBP
MOV EDX,R15D
CALL qword ptr [RCX + 0x10]
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
MOV ESI,EBP
MOV EDX,R14D
CALL qword ptr [RAX + 0x8]
NEG R13W
JNO 0x0010bdae
MOV AL,byte ptr [RBX + 0xae]
CMP AL,0x2
JNC 0x0010bdeb
MOV EDX,dword ptr [RBX + 0xb0]
CMP RDX,0x40
JNC 0x0010bf21
XOR RDX,0x8
CMP byte ptr [RBX + RDX*0x1 + 0x60],0xc
JNZ 0x0010bf40
XOR AL,0x1
MOVZX EAX,AL
ADD EAX,EAX
LEA EAX,[RAX + RAX*0x2]
MOV RCX,qword ptr [RBX]
MOVZX ESI,AL
MOV RDI,RBX
CALL qword ptr [RCX + 0x8]
JMP 0x0010bdd0
LAB_0010bdae:
CMP R12B,0xc
JZ 0x0010bdd0
CMP byte ptr [RBX + R15*0x1 + 0x60],0xc
JNZ 0x0010bf5f
LAB_0010bdc0:
MOV RAX,qword ptr [RBX]
MOVZX ESI,R12B
MOV RDI,RBX
MOV EDX,R15D
LAB_0010bdcd:
CALL qword ptr [RAX + 0x8]
LAB_0010bdd0:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RBX + 0xa0],RAX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0010bdeb:
LEA RDI,[0x10e7ac]
LEA RSI,[0x110bdc]
LEA RCX,[0x10e7c8]
MOV EDX,0x48
CALL 0x00103130
LAB_0010be0a:
LEA RDI,[0x111586]
LEA RSI,[0x110bdc]
LEA RCX,[0x1115b5]
MOV EDX,0x86a
CALL 0x00103130
LAB_0010be29:
LEA RDI,[0x11160c]
LEA RSI,[0x110bdc]
LEA RCX,[0x1115b5]
MOV EDX,0x880
CALL 0x00103130
LAB_0010be48:
LEA RDI,[0x111671]
LEA RSI,[0x110bdc]
LEA RCX,[0x1115b5]
MOV EDX,0x890
CALL 0x00103130
LAB_0010be67:
LEA RDI,[0x1115df]
LEA RSI,[0x110bdc]
LEA RCX,[0x1115b5]
MOV EDX,0x86b
CALL 0x00103130
LAB_0010be86:
LEA RDI,[0x111651]
LEA RSI,[0x110bdc]
LEA RCX,[0x1115b5]
MOV EDX,0x883
CALL 0x00103130
LAB_0010bea5:
LEA RDI,[0x11168e]
LEA RSI,[0x110bdc]
LEA RCX,[0x1115b5]
MOV EDX,0x891
CALL 0x00103130
LAB_0010bec4:
LEA RDI,[0x1111d5]
LEA RSI,[0x110bdc]
LEA RCX,[0x1115b5]
MOV EDX,0x873
CALL 0x00103130
LAB_0010bee3:
LEA RDI,[0x111631]
LEA RSI,[0x110bdc]
LEA RCX,[0x1115b5]
MOV EDX,0x882
CALL 0x00103130
LAB_0010bf02:
LEA RDI,[0x1111fa]
LEA RSI,[0x110bdc]
LEA RCX,[0x1115b5]
MOV EDX,0x874
CALL 0x00103130
LAB_0010bf21:
LEA RDI,[0x10e884]
LEA RSI,[0x110bdc]
LEA RCX,[0x110d44]
MOV EDX,0x908
CALL 0x00103130
LAB_0010bf40:
LEA RDI,[0x1116ad]
LEA RSI,[0x110bdc]
LEA RCX,[0x1115b5]
MOV EDX,0x89d
CALL 0x00103130
LAB_0010bf5f:
LEA RDI,[0x11123e]
LEA RSI,[0x110bdc]
LEA RCX,[0x1115b5]
MOV EDX,0x8a1
CALL 0x00103130
|
/* WARNING: Removing unreachable block (ram,0x0010bd6d) */
/* WARNING: Removing unreachable block (ram,0x0010bd77) */
/* WARNING: Removing unreachable block (ram,0x0010bf21) */
/* WARNING: Removing unreachable block (ram,0x0010bd87) */
/* WARNING: Removing unreachable block (ram,0x0010bf40) */
/* WARNING: Removing unreachable block (ram,0x0010bd96) */
/* chess::Board::unmakeMove(chess::Move) */
void __thiscall chess::Board::unmakeMove(Board *this,uint param_2)
{
Board BVar1;
int4 uVar2;
int4 uVar3;
int8 uVar4;
bool bVar5;
Board BVar6;
long lVar7;
Board BVar8;
Board BVar9;
ulong uVar10;
uint uVar11;
uint uVar12;
ulong uVar13;
lVar7 = *(long *)(this + 0x10);
uVar4 = *(int8 *)(lVar7 + -0x18);
uVar2 = *(int4 *)(lVar7 + -0x10);
uVar3 = *(int4 *)(lVar7 + -0xc);
BVar6 = *(Board *)(lVar7 + -8);
BVar1 = *(Board *)(lVar7 + -7);
*(long *)(this + 0x10) = lVar7 + -0x18;
*(int4 *)(this + 0xb0) = uVar3;
*(int4 *)(this + 0xa8) = uVar2;
this[0xb4] = BVar6;
if (1 < (byte)this[0xae]) {
/* WARNING: Subroutine does not return */
__assert_fail("c == 0 || c == 1 || c == -1",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp"
,0x48,"chess::Color::Color(int)");
}
BVar6 = (Board)((byte)this[0xae] ^ 1);
this[0xae] = BVar6;
*(short *)(this + 0xac) = *(short *)(this + 0xac) + -1;
if ((param_2 & 0xc000) == 0x4000) {
uVar10 = (ulong)(param_2 & 0x3f);
BVar8 = this[uVar10 + 0x60];
BVar9 = (Board)((char)BVar8 - 6);
if ((byte)BVar8 < 6) {
BVar9 = BVar8;
}
if (BVar9 != (Board)(((byte)(param_2 >> 0xc) & 3) + 1)) {
/* WARNING: Subroutine does not return */
__assert_fail("piece.type() == move.promotionType()",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp"
,0x880,"void chess::Board::unmakeMove(const Move)");
}
if (BVar9 == (Board)0x6) {
/* WARNING: Subroutine does not return */
__assert_fail("piece.type() != PieceType::NONE",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp"
,0x883,"void chess::Board::unmakeMove(const Move)");
}
if (BVar9 == (Board)0x5) {
/* WARNING: Subroutine does not return */
__assert_fail("piece.type() != PieceType::KING",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp"
,0x882,"void chess::Board::unmakeMove(const Move)");
}
(**(code **)(*(long *)this + 0x10))(this,BVar8,uVar10);
(**(code **)(*(long *)this + 8))(this,(char)BVar6 * '\x06',param_2 >> 6 & 0x3f);
if (BVar1 == (Board)0xc) goto LAB_0010bdd0;
if (this[uVar10 + 0x60] != (Board)0xc) {
/* WARNING: Subroutine does not return */
__assert_fail("at(move.to()) == Piece::NONE",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp"
,0x889,"void chess::Board::unmakeMove(const Move)");
}
LAB_0010bdc0:
lVar7 = *(long *)this;
}
else {
if ((param_2 & 0xc000) != 0xc000) {
uVar10 = (ulong)(param_2 & 0x3f);
BVar6 = this[uVar10 + 0x60];
if (BVar6 == (Board)0xc) {
/* WARNING: Subroutine does not return */
__assert_fail("at(move.to()) != Piece::NONE",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp"
,0x890,"void chess::Board::unmakeMove(const Move)");
}
uVar13 = (ulong)(param_2 >> 6 & 0x3f);
if (this[uVar13 + 0x60] != (Board)0xc) {
/* WARNING: Subroutine does not return */
__assert_fail("at(move.from()) == Piece::NONE",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp"
,0x891,"void chess::Board::unmakeMove(const Move)");
}
(**(code **)(*(long *)this + 0x10))(this,BVar6,uVar10);
(**(code **)(*(long *)this + 8))(this,BVar6,uVar13);
if (BVar1 == (Board)0xc) goto LAB_0010bdd0;
if (this[uVar10 + 0x60] != (Board)0xc) {
/* WARNING: Subroutine does not return */
__assert_fail("at(move.to()) == Piece::NONE",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp"
,0x8a1,"void chess::Board::unmakeMove(const Move)");
}
goto LAB_0010bdc0;
}
uVar11 = param_2 >> 6 & 0x3f;
bVar5 = uVar11 < (param_2 & 0x3f);
uVar12 = param_2 >> 6 & 0x38;
BVar1 = this[(ulong)(uVar12 + (uint)bVar5 * 2) + 99];
BVar6 = (Board)((char)BVar1 - 6);
if ((byte)BVar1 < 6) {
BVar6 = BVar1;
}
if (BVar6 != (Board)0x3) {
/* WARNING: Subroutine does not return */
__assert_fail("at<PieceType>(rook_from_sq) == PieceType::ROOK",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp"
,0x86a,"void chess::Board::unmakeMove(const Move)");
}
uVar10 = (ulong)(uVar12 + (uint)bVar5 * 4 + 2);
BVar6 = this[uVar10 + 0x60];
BVar8 = (Board)((char)BVar6 - 6);
if ((byte)BVar6 < 6) {
BVar8 = BVar6;
}
if (BVar8 != (Board)0x5) {
/* WARNING: Subroutine does not return */
__assert_fail("at<PieceType>(king_to_sq) == PieceType::KING",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp"
,0x86b,"void chess::Board::unmakeMove(const Move)");
}
(**(code **)(*(long *)this + 0x10))(this,BVar1,uVar12 + (uint)bVar5 * 2 + 3);
(**(code **)(*(long *)this + 0x10))(this,BVar6,uVar10);
BVar8 = this[0xae];
BVar9 = (Board)((char)BVar8 * '\x06' + 5);
if (BVar8 == (Board)0xff) {
BVar9 = (Board)0xc;
}
if (BVar6 != BVar9) {
/* WARNING: Subroutine does not return */
__assert_fail("king == Piece(PieceType::KING, stm_)",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp"
,0x873,"void chess::Board::unmakeMove(const Move)");
}
BVar9 = (Board)((char)BVar8 * '\x06' + 3);
if (BVar8 == (Board)0xff) {
BVar9 = (Board)0xc;
}
if (BVar1 != BVar9) {
/* WARNING: Subroutine does not return */
__assert_fail("rook == Piece(PieceType::ROOK, stm_)",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp"
,0x874,"void chess::Board::unmakeMove(const Move)");
}
(**(code **)(*(long *)this + 8))(this,BVar6,uVar11);
lVar7 = *(long *)this;
uVar10 = (ulong)(param_2 & 0x3f);
}
(**(code **)(lVar7 + 8))(this,BVar1,uVar10);
LAB_0010bdd0:
*(int8 *)(this + 0xa0) = uVar4;
return;
}
| |
23,158 | chess::Board::unmakeMove(chess::Move) | Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp | void unmakeMove(const Move move) {
const auto prev = prev_states_.back();
prev_states_.pop_back();
ep_sq_ = prev.enpassant;
cr_ = prev.castling;
hfm_ = prev.half_moves;
stm_ = ~stm_;
plies_--;
if (move.typeOf() == Move::CASTLING) {
const bool king_side = move.to() > move.from();
const auto rook_from_sq = Square(king_side ? File::FILE_F : File::FILE_D, move.from().rank());
const auto king_to_sq = Square(king_side ? File::FILE_G : File::FILE_C, move.from().rank());
assert(at<PieceType>(rook_from_sq) == PieceType::ROOK);
assert(at<PieceType>(king_to_sq) == PieceType::KING);
const auto rook = at(rook_from_sq);
const auto king = at(king_to_sq);
removePiece(rook, rook_from_sq);
removePiece(king, king_to_sq);
assert(king == Piece(PieceType::KING, stm_));
assert(rook == Piece(PieceType::ROOK, stm_));
placePiece(king, move.from());
placePiece(rook, move.to());
key_ = prev.hash;
return;
} else if (move.typeOf() == Move::PROMOTION) {
const auto pawn = Piece(PieceType::PAWN, stm_);
const auto piece = at(move.to());
assert(piece.type() == move.promotionType());
assert(piece.type() != PieceType::PAWN);
assert(piece.type() != PieceType::KING);
assert(piece.type() != PieceType::NONE);
removePiece(piece, move.to());
placePiece(pawn, move.from());
if (prev.captured_piece != Piece::NONE) {
assert(at(move.to()) == Piece::NONE);
placePiece(prev.captured_piece, move.to());
}
key_ = prev.hash;
return;
} else {
assert(at(move.to()) != Piece::NONE);
assert(at(move.from()) == Piece::NONE);
const auto piece = at(move.to());
removePiece(piece, move.to());
placePiece(piece, move.from());
}
if (move.typeOf() == Move::ENPASSANT) {
const auto pawn = Piece(PieceType::PAWN, ~stm_);
const auto pawnTo = static_cast<Square>(ep_sq_ ^ 8);
assert(at(pawnTo) == Piece::NONE);
placePiece(pawn, pawnTo);
} else if (prev.captured_piece != Piece::NONE) {
assert(at(move.to()) == Piece::NONE);
placePiece(prev.captured_piece, move.to());
}
key_ = prev.hash;
} | O3 | cpp | chess::Board::unmakeMove(chess::Move):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %r15d
movq %rdi, %rbx
movq 0x10(%rdi), %rax
leaq -0x18(%rax), %rcx
movq -0x18(%rax), %r8
movl -0x10(%rax), %edx
movl -0xc(%rax), %esi
movb -0x8(%rax), %dil
movb -0x7(%rax), %r12b
movq %rcx, 0x10(%rbx)
movl %esi, 0xb0(%rbx)
movl %edx, 0xa8(%rbx)
movb %dil, 0xb4(%rbx)
movb 0xae(%rbx), %al
cmpb $0x2, %al
jae 0xab9b
xorb $0x1, %al
movb %al, 0xae(%rbx)
decw 0xac(%rbx)
movl %r15d, %r13d
andl $0xc000, %r13d # imm = 0xC000
movl %r15d, %r14d
andl $0x3f, %r14d
cmpl $0x4000, %r13d # imm = 0x4000
movq %r8, 0x10(%rsp)
je 0xaa4d
cmpl $0xc000, %r13d # imm = 0xC000
jne 0xaad7
shrl $0x6, %r15d
movl %r15d, %edx
andl $0x3f, %edx
xorl %eax, %eax
cmpl %edx, %r14d
seta %al
andl $0x38, %r15d
leal (%r15,%rax,2), %ecx
movzbl 0x63(%rcx,%rbx), %ebp
leal -0x6(%rbp), %ecx
cmpb $0x6, %bpl
movzbl %cl, %ecx
cmovbl %ebp, %ecx
cmpb $0x3, %cl
jne 0xabba
movl %edx, 0xc(%rsp)
leal (%r15,%rax,4), %r13d
addl $0x2, %r13d
movzbl 0x60(%rbx,%r13), %r12d
leal -0x6(%r12), %ecx
cmpb $0x6, %r12b
movzbl %cl, %ecx
cmovbl %r12d, %ecx
cmpb $0x5, %cl
jne 0xac17
leal (%r15,%rax,2), %edx
addl $0x3, %edx
movq (%rbx), %rax
movzbl %bpl, %esi
movq %rbx, %rdi
movl %esi, 0x8(%rsp)
callq *0x10(%rax)
movq (%rbx), %rax
movzbl %r12b, %r15d
movq %rbx, %rdi
movl %r15d, %esi
movl %r13d, %edx
callq *0x10(%rax)
movzbl 0xae(%rbx), %eax
movl %eax, %ecx
addl %ecx, %ecx
leal (%rcx,%rcx,2), %ecx
leal 0x5(%rcx), %edx
cmpb $-0x1, %al
movzbl %dl, %esi
movl $0xc, %edx
cmovel %edx, %esi
cmpb %sil, %r12b
jne 0xac55
addb $0x3, %cl
cmpb $-0x1, %al
movzbl %cl, %eax
cmovel %edx, %eax
cmpb %al, %bpl
jne 0xac74
movq (%rbx), %rax
movq %rbx, %rdi
movl %r15d, %esi
movl 0xc(%rsp), %edx
callq *0x8(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
movl 0x8(%rsp), %esi
jmp 0xab7a
movzbl 0x60(%rbx,%r14), %ecx
leal -0x6(%rcx), %edx
cmpb $0x6, %cl
movzbl %dl, %edx
cmovbl %ecx, %edx
movl %r15d, %esi
shrl $0xc, %esi
andb $0x3, %sil
incb %sil
cmpb %sil, %dl
jne 0xabd9
movzbl %al, %eax
addl %eax, %eax
leal (%rax,%rax,2), %ebp
movq (%rbx), %rax
movzbl %cl, %esi
movq %rbx, %rdi
movl %r14d, %edx
callq *0x10(%rax)
shrl $0x6, %r15d
andl $0x3f, %r15d
movq (%rbx), %rax
movq %rbx, %rdi
movl %ebp, %esi
movl %r15d, %edx
callq *0x8(%rax)
cmpb $0xc, %r12b
je 0xab80
cmpb $0xc, 0x60(%rbx,%r14)
je 0xab70
leaq 0x474f(%rip), %rdi # 0xf20e
leaq 0x40e6(%rip), %rsi # 0xebac
leaq 0x4ab8(%rip), %rcx # 0xf585
movl $0x889, %edx # imm = 0x889
callq 0x2130
movb 0x60(%rbx,%r14), %al
cmpb $0xc, %al
je 0xabf8
shrl $0x6, %r15d
andl $0x3f, %r15d
cmpb $0xc, 0x60(%rbx,%r15)
jne 0xac36
movq (%rbx), %rcx
movzbl %al, %ebp
movq %rbx, %rdi
movl %ebp, %esi
movl %r14d, %edx
callq *0x10(%rcx)
movq (%rbx), %rax
movq %rbx, %rdi
movl %ebp, %esi
movl %r15d, %edx
callq *0x8(%rax)
negw %r13w
jno 0xab5e
movb 0xae(%rbx), %al
cmpb $0x2, %al
jae 0xab9b
movl 0xb0(%rbx), %edx
cmpq $0x40, %rdx
jae 0xac93
xorq $0x8, %rdx
cmpb $0xc, 0x60(%rbx,%rdx)
jne 0xacb2
xorb $0x1, %al
movzbl %al, %eax
addl %eax, %eax
leal (%rax,%rax,2), %eax
movq (%rbx), %rcx
movzbl %al, %esi
movq %rbx, %rdi
callq *0x8(%rcx)
jmp 0xab80
cmpb $0xc, %r12b
je 0xab80
cmpb $0xc, 0x60(%rbx,%r14)
jne 0xacd1
movq (%rbx), %rax
movzbl %r12b, %esi
movq %rbx, %rdi
movl %r14d, %edx
callq *0x8(%rax)
movq 0x10(%rsp), %rax
movq %rax, 0xa0(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1bd1(%rip), %rdi # 0xc773
leaq 0x4003(%rip), %rsi # 0xebac
leaq 0x1bdf(%rip), %rcx # 0xc78f
movl $0x48, %edx
callq 0x2130
leaq 0x4995(%rip), %rdi # 0xf556
leaq 0x3fe4(%rip), %rsi # 0xebac
leaq 0x49b6(%rip), %rcx # 0xf585
movl $0x86a, %edx # imm = 0x86A
callq 0x2130
leaq 0x49fc(%rip), %rdi # 0xf5dc
leaq 0x3fc5(%rip), %rsi # 0xebac
leaq 0x4997(%rip), %rcx # 0xf585
movl $0x880, %edx # imm = 0x880
callq 0x2130
leaq 0x4a02(%rip), %rdi # 0xf601
leaq 0x3fa6(%rip), %rsi # 0xebac
leaq 0x4978(%rip), %rcx # 0xf585
movl $0x890, %edx # imm = 0x890
callq 0x2130
leaq 0x4991(%rip), %rdi # 0xf5af
leaq 0x3f87(%rip), %rsi # 0xebac
leaq 0x4959(%rip), %rcx # 0xf585
movl $0x86b, %edx # imm = 0x86B
callq 0x2130
leaq 0x49e1(%rip), %rdi # 0xf61e
leaq 0x3f68(%rip), %rsi # 0xebac
leaq 0x493a(%rip), %rcx # 0xf585
movl $0x891, %edx # imm = 0x891
callq 0x2130
leaq 0x4549(%rip), %rdi # 0xf1a5
leaq 0x3f49(%rip), %rsi # 0xebac
leaq 0x491b(%rip), %rcx # 0xf585
movl $0x873, %edx # imm = 0x873
callq 0x2130
leaq 0x454f(%rip), %rdi # 0xf1ca
leaq 0x3f2a(%rip), %rsi # 0xebac
leaq 0x48fc(%rip), %rcx # 0xf585
movl $0x874, %edx # imm = 0x874
callq 0x2130
leaq 0x1bb1(%rip), %rdi # 0xc84b
leaq 0x3f0b(%rip), %rsi # 0xebac
leaq 0x406c(%rip), %rcx # 0xed14
movl $0x908, %edx # imm = 0x908
callq 0x2130
leaq 0x4984(%rip), %rdi # 0xf63d
leaq 0x3eec(%rip), %rsi # 0xebac
leaq 0x48be(%rip), %rcx # 0xf585
movl $0x89d, %edx # imm = 0x89D
callq 0x2130
leaq 0x4536(%rip), %rdi # 0xf20e
leaq 0x3ecd(%rip), %rsi # 0xebac
leaq 0x489f(%rip), %rcx # 0xf585
movl $0x8a1, %edx # imm = 0x8A1
callq 0x2130
| _ZN5chess5Board10unmakeMoveENS_4MoveE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15d, esi
mov rbx, rdi
mov rax, [rdi+10h]
lea rcx, [rax-18h]
mov r8, [rax-18h]
mov edx, [rax-10h]
mov esi, [rax-0Ch]
mov dil, [rax-8]
mov r12b, [rax-7]
mov [rbx+10h], rcx
mov [rbx+0B0h], esi
mov [rbx+0A8h], edx
mov [rbx+0B4h], dil
mov al, [rbx+0AEh]
cmp al, 2
jnb loc_AB9B
xor al, 1
mov [rbx+0AEh], al
dec word ptr [rbx+0ACh]
mov r13d, r15d
and r13d, 0C000h
mov r14d, r15d
and r14d, 3Fh
cmp r13d, 4000h
mov [rsp+48h+var_38], r8
jz loc_AA4D
cmp r13d, 0C000h
jnz loc_AAD7
shr r15d, 6
mov edx, r15d
and edx, 3Fh
xor eax, eax
cmp r14d, edx
setnbe al
and r15d, 38h
lea ecx, [r15+rax*2]
movzx ebp, byte ptr [rcx+rbx+63h]
lea ecx, [rbp-6]
cmp bpl, 6
movzx ecx, cl
cmovb ecx, ebp
cmp cl, 3
jnz loc_ABBA
mov [rsp+48h+var_3C], edx
lea r13d, [r15+rax*4]
add r13d, 2
movzx r12d, byte ptr [rbx+r13+60h]
lea ecx, [r12-6]
cmp r12b, 6
movzx ecx, cl
cmovb ecx, r12d
cmp cl, 5
jnz loc_AC17
lea edx, [r15+rax*2]
add edx, 3
mov rax, [rbx]
movzx esi, bpl
mov rdi, rbx
mov [rsp+48h+var_40], esi
call qword ptr [rax+10h]
mov rax, [rbx]
movzx r15d, r12b
mov rdi, rbx
mov esi, r15d
mov edx, r13d
call qword ptr [rax+10h]
movzx eax, byte ptr [rbx+0AEh]
mov ecx, eax
add ecx, ecx
lea ecx, [rcx+rcx*2]
lea edx, [rcx+5]
cmp al, 0FFh
movzx esi, dl
mov edx, 0Ch
cmovz esi, edx
cmp r12b, sil
jnz loc_AC55
add cl, 3
cmp al, 0FFh
movzx eax, cl
cmovz eax, edx
cmp bpl, al
jnz loc_AC74
mov rax, [rbx]
mov rdi, rbx
mov esi, r15d
mov edx, [rsp+48h+var_3C]
call qword ptr [rax+8]
mov rax, [rbx]
mov rdi, rbx
mov esi, [rsp+48h+var_40]
jmp loc_AB7A
loc_AA4D:
movzx ecx, byte ptr [rbx+r14+60h]
lea edx, [rcx-6]
cmp cl, 6
movzx edx, dl
cmovb edx, ecx
mov esi, r15d
shr esi, 0Ch
and sil, 3
inc sil
cmp dl, sil
jnz loc_ABD9
movzx eax, al
add eax, eax
lea ebp, [rax+rax*2]
mov rax, [rbx]
movzx esi, cl
mov rdi, rbx
mov edx, r14d
call qword ptr [rax+10h]
shr r15d, 6
and r15d, 3Fh
mov rax, [rbx]
mov rdi, rbx
mov esi, ebp
mov edx, r15d
call qword ptr [rax+8]
cmp r12b, 0Ch
jz loc_AB80
cmp byte ptr [rbx+r14+60h], 0Ch
jz loc_AB70
lea rdi, aAtMoveToPieceN; "at(move.to()) == Piece::NONE"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidChessBoard_4; "void chess::Board::unmakeMove(const Mov"...
mov edx, 889h
call ___assert_fail
loc_AAD7:
mov al, [rbx+r14+60h]
cmp al, 0Ch
jz loc_ABF8
shr r15d, 6
and r15d, 3Fh
cmp byte ptr [rbx+r15+60h], 0Ch
jnz loc_AC36
mov rcx, [rbx]
movzx ebp, al
mov rdi, rbx
mov esi, ebp
mov edx, r14d
call qword ptr [rcx+10h]
mov rax, [rbx]
mov rdi, rbx
mov esi, ebp
mov edx, r15d
call qword ptr [rax+8]
neg r13w
jno short loc_AB5E
mov al, [rbx+0AEh]
cmp al, 2
jnb short loc_AB9B
mov edx, [rbx+0B0h]
cmp rdx, 40h ; '@'
jnb loc_AC93
xor rdx, 8
cmp byte ptr [rbx+rdx+60h], 0Ch
jnz loc_ACB2
xor al, 1
movzx eax, al
add eax, eax
lea eax, [rax+rax*2]
mov rcx, [rbx]
movzx esi, al
mov rdi, rbx
call qword ptr [rcx+8]
jmp short loc_AB80
loc_AB5E:
cmp r12b, 0Ch
jz short loc_AB80
cmp byte ptr [rbx+r14+60h], 0Ch
jnz loc_ACD1
loc_AB70:
mov rax, [rbx]
movzx esi, r12b
mov rdi, rbx
loc_AB7A:
mov edx, r14d
call qword ptr [rax+8]
loc_AB80:
mov rax, [rsp+48h+var_38]
mov [rbx+0A0h], rax
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_AB9B:
lea rdi, aC0C1C1; "c == 0 || c == 1 || c == -1"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aChessColorColo; "chess::Color::Color(int)"
mov edx, 48h ; 'H'
call ___assert_fail
loc_ABBA:
lea rdi, aAtPiecetypeRoo; "at<PieceType>(rook_from_sq) == PieceTyp"...
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidChessBoard_4; "void chess::Board::unmakeMove(const Mov"...
mov edx, 86Ah
call ___assert_fail
loc_ABD9:
lea rdi, aPieceTypeMoveP; "piece.type() == move.promotionType()"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidChessBoard_4; "void chess::Board::unmakeMove(const Mov"...
mov edx, 880h
call ___assert_fail
loc_ABF8:
lea rdi, aAtMoveToPieceN_0; "at(move.to()) != Piece::NONE"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidChessBoard_4; "void chess::Board::unmakeMove(const Mov"...
mov edx, 890h
call ___assert_fail
loc_AC17:
lea rdi, aAtPiecetypeKin; "at<PieceType>(king_to_sq) == PieceType:"...
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidChessBoard_4; "void chess::Board::unmakeMove(const Mov"...
mov edx, 86Bh
call ___assert_fail
loc_AC36:
lea rdi, aAtMoveFromPiec_1; "at(move.from()) == Piece::NONE"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidChessBoard_4; "void chess::Board::unmakeMove(const Mov"...
mov edx, 891h
call ___assert_fail
loc_AC55:
lea rdi, aKingPiecePiece; "king == Piece(PieceType::KING, stm_)"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidChessBoard_4; "void chess::Board::unmakeMove(const Mov"...
mov edx, 873h
call ___assert_fail
loc_AC74:
lea rdi, aRookPiecePiece; "rook == Piece(PieceType::ROOK, stm_)"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidChessBoard_4; "void chess::Board::unmakeMove(const Mov"...
mov edx, 874h
call ___assert_fail
loc_AC93:
lea rdi, aSqIndex64SqInd; "sq.index() < 64 && sq.index() >= 0"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aTChessBoardAtS_0; "T chess::Board::at(Square) const [T = c"...
mov edx, 908h
call ___assert_fail
loc_ACB2:
lea rdi, aAtPawntoPieceN; "at(pawnTo) == Piece::NONE"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidChessBoard_4; "void chess::Board::unmakeMove(const Mov"...
mov edx, 89Dh
call ___assert_fail
loc_ACD1:
lea rdi, aAtMoveToPieceN; "at(move.to()) == Piece::NONE"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidChessBoard_4; "void chess::Board::unmakeMove(const Mov"...
mov edx, 8A1h
call ___assert_fail
| long long chess::Board::unmakeMove(_QWORD *a1, unsigned int a2)
{
long long v4; // rax
long long v5; // r8
int v6; // edx
int v7; // esi
char v8; // di
unsigned __int8 v9; // r12
unsigned __int8 v10; // al
unsigned __int8 v11; // al
int v12; // r13d
long long v13; // r14
unsigned int v14; // r15d
unsigned int v15; // edx
BOOL v16; // eax
int v17; // r15d
unsigned __int8 v18; // bp
char v19; // cl
long long v20; // r13
unsigned __int8 v21; // r12
char v22; // cl
char v23; // al
char v24; // si
bool v25; // zf
char v26; // al
long long v27; // rax
_QWORD *v28; // rdi
long long v29; // rsi
unsigned __int8 v30; // cl
char v31; // dl
unsigned int v32; // ebp
unsigned __int8 v33; // al
long long v34; // r15
unsigned int v35; // ebp
unsigned __int8 v36; // al
unsigned long long v37; // rdx
long long result; // rax
unsigned int v39; // [rsp+Ch] [rbp-3Ch]
long long v40; // [rsp+10h] [rbp-38h]
v4 = a1[2];
v5 = *(_QWORD *)(v4 - 24);
v6 = *(_DWORD *)(v4 - 16);
v7 = *(_DWORD *)(v4 - 12);
v8 = *(_BYTE *)(v4 - 8);
v9 = *(_BYTE *)(v4 - 7);
a1[2] = v4 - 24;
*((_DWORD *)a1 + 44) = v7;
*((_DWORD *)a1 + 42) = v6;
*((_BYTE *)a1 + 180) = v8;
v10 = *((_BYTE *)a1 + 174);
if ( v10 >= 2u )
goto LABEL_35;
v11 = v10 ^ 1;
*((_BYTE *)a1 + 174) = v11;
--*((_WORD *)a1 + 86);
v12 = a2 & 0xC000;
v13 = a2 & 0x3F;
v40 = v5;
if ( v12 != 0x4000 )
{
if ( v12 == 49152 )
{
v14 = a2 >> 6;
v15 = v14 & 0x3F;
v16 = (unsigned int)v13 > v15;
v17 = v14 & 0x38;
v18 = *((_BYTE *)a1 + (unsigned int)(v17 + 2 * v16) + 99);
v19 = v18 - 6;
if ( v18 < 6u )
v19 = *((_BYTE *)a1 + (unsigned int)(v17 + 2 * v16) + 99);
if ( v19 != 3 )
__assert_fail(
"at<PieceType>(rook_from_sq) == PieceType::ROOK",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp",
2154LL,
"void chess::Board::unmakeMove(const Move)");
v39 = v15;
v20 = (unsigned int)(v17 + 4 * v16 + 2);
v21 = *((_BYTE *)a1 + v20 + 96);
v22 = v21 - 6;
if ( v21 < 6u )
v22 = *((_BYTE *)a1 + v20 + 96);
if ( v22 != 5 )
__assert_fail(
"at<PieceType>(king_to_sq) == PieceType::KING",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp",
2155LL,
"void chess::Board::unmakeMove(const Move)");
(*(void ( **)(_QWORD *, _QWORD, _QWORD))(*a1 + 16LL))(a1, v18, (unsigned int)(v17 + 2 * v16 + 3));
(*(void ( **)(_QWORD *, _QWORD, _QWORD))(*a1 + 16LL))(a1, v21, (unsigned int)v20);
v23 = *((_BYTE *)a1 + 174);
v24 = 6 * v23 + 5;
if ( v23 == -1 )
v24 = 12;
if ( v21 != v24 )
__assert_fail(
"king == Piece(PieceType::KING, stm_)",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp",
2163LL,
"void chess::Board::unmakeMove(const Move)");
v25 = v23 == -1;
v26 = 6 * *((_BYTE *)a1 + 174) + 3;
if ( v25 )
v26 = 12;
if ( v18 != v26 )
__assert_fail(
"rook == Piece(PieceType::ROOK, stm_)",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp",
2164LL,
"void chess::Board::unmakeMove(const Move)");
(*(void ( **)(_QWORD *, _QWORD, _QWORD))(*a1 + 8LL))(a1, v21, v39);
v27 = *a1;
v28 = a1;
v29 = v18;
goto LABEL_33;
}
v33 = *((_BYTE *)a1 + v13 + 96);
if ( v33 == 12 )
__assert_fail(
"at(move.to()) != Piece::NONE",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp",
2192LL,
"void chess::Board::unmakeMove(const Move)");
v34 = (a2 >> 6) & 0x3F;
if ( *((_BYTE *)a1 + v34 + 96) != 12 )
__assert_fail(
"at(move.from()) == Piece::NONE",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp",
2193LL,
"void chess::Board::unmakeMove(const Move)");
v35 = v33;
(*(void ( **)(_QWORD *, _QWORD, _QWORD))(*a1 + 16LL))(a1, v33, (unsigned int)v13);
(*(void ( **)(_QWORD *, _QWORD, _QWORD))(*a1 + 8LL))(a1, v35, (unsigned int)v34);
if ( __OFSUB__(-(__int16)v12, 1) )
{
v36 = *((_BYTE *)a1 + 174);
if ( v36 < 2u )
{
v37 = *((unsigned int *)a1 + 44);
if ( v37 >= 0x40 )
__assert_fail(
"sq.index() < 64 && sq.index() >= 0",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp",
2312LL,
"T chess::Board::at(Square) const [T = chess::Piece]");
if ( *((_BYTE *)a1 + (v37 ^ 8) + 96) != 12 )
__assert_fail(
"at(pawnTo) == Piece::NONE",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp",
2205LL,
"void chess::Board::unmakeMove(const Move)");
(*(void ( **)(_QWORD *, _QWORD))(*a1 + 8LL))(a1, (unsigned __int8)(6 * (v36 ^ 1)));
goto LABEL_34;
}
LABEL_35:
__assert_fail(
"c == 0 || c == 1 || c == -1",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp",
72LL,
"chess::Color::Color(int)");
}
if ( v9 == 12 )
goto LABEL_34;
if ( *((_BYTE *)a1 + v13 + 96) != 12 )
__assert_fail(
"at(move.to()) == Piece::NONE",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp",
2209LL,
"void chess::Board::unmakeMove(const Move)");
LABEL_32:
v27 = *a1;
v29 = v9;
v28 = a1;
LABEL_33:
(*(void ( **)(_QWORD *, long long, _QWORD))(v27 + 8))(v28, v29, (unsigned int)v13);
goto LABEL_34;
}
v30 = *((_BYTE *)a1 + v13 + 96);
v31 = v30 - 6;
if ( v30 < 6u )
v31 = *((_BYTE *)a1 + v13 + 96);
if ( v31 != ((a2 >> 12) & 3) + 1 )
__assert_fail(
"piece.type() == move.promotionType()",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp",
2176LL,
"void chess::Board::unmakeMove(const Move)");
v32 = 6 * v11;
(*(void ( **)(_QWORD *, _QWORD, _QWORD))(*a1 + 16LL))(a1, v30, a2 & 0x3F);
(*(void ( **)(_QWORD *, _QWORD, _QWORD))(*a1 + 8LL))(a1, v32, (a2 >> 6) & 0x3F);
if ( v9 != 12 )
{
if ( *((_BYTE *)a1 + v13 + 96) != 12 )
__assert_fail(
"at(move.to()) == Piece::NONE",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp",
2185LL,
"void chess::Board::unmakeMove(const Move)");
goto LABEL_32;
}
LABEL_34:
result = v40;
a1[20] = v40;
return result;
}
| unmakeMove:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15D,ESI
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x10]
LEA RCX,[RAX + -0x18]
MOV R8,qword ptr [RAX + -0x18]
MOV EDX,dword ptr [RAX + -0x10]
MOV ESI,dword ptr [RAX + -0xc]
MOV DIL,byte ptr [RAX + -0x8]
MOV R12B,byte ptr [RAX + -0x7]
MOV qword ptr [RBX + 0x10],RCX
MOV dword ptr [RBX + 0xb0],ESI
MOV dword ptr [RBX + 0xa8],EDX
MOV byte ptr [RBX + 0xb4],DIL
MOV AL,byte ptr [RBX + 0xae]
CMP AL,0x2
JNC 0x0010ab9b
XOR AL,0x1
MOV byte ptr [RBX + 0xae],AL
DEC word ptr [RBX + 0xac]
MOV R13D,R15D
AND R13D,0xc000
MOV R14D,R15D
AND R14D,0x3f
CMP R13D,0x4000
MOV qword ptr [RSP + 0x10],R8
JZ 0x0010aa4d
CMP R13D,0xc000
JNZ 0x0010aad7
SHR R15D,0x6
MOV EDX,R15D
AND EDX,0x3f
XOR EAX,EAX
CMP R14D,EDX
SETA AL
AND R15D,0x38
LEA ECX,[R15 + RAX*0x2]
MOVZX EBP,byte ptr [RCX + RBX*0x1 + 0x63]
LEA ECX,[RBP + -0x6]
CMP BPL,0x6
MOVZX ECX,CL
CMOVC ECX,EBP
CMP CL,0x3
JNZ 0x0010abba
MOV dword ptr [RSP + 0xc],EDX
LEA R13D,[R15 + RAX*0x4]
ADD R13D,0x2
MOVZX R12D,byte ptr [RBX + R13*0x1 + 0x60]
LEA ECX,[R12 + -0x6]
CMP R12B,0x6
MOVZX ECX,CL
CMOVC ECX,R12D
CMP CL,0x5
JNZ 0x0010ac17
LEA EDX,[R15 + RAX*0x2]
ADD EDX,0x3
MOV RAX,qword ptr [RBX]
MOVZX ESI,BPL
MOV RDI,RBX
MOV dword ptr [RSP + 0x8],ESI
CALL qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBX]
MOVZX R15D,R12B
MOV RDI,RBX
MOV ESI,R15D
MOV EDX,R13D
CALL qword ptr [RAX + 0x10]
MOVZX EAX,byte ptr [RBX + 0xae]
MOV ECX,EAX
ADD ECX,ECX
LEA ECX,[RCX + RCX*0x2]
LEA EDX,[RCX + 0x5]
CMP AL,0xff
MOVZX ESI,DL
MOV EDX,0xc
CMOVZ ESI,EDX
CMP R12B,SIL
JNZ 0x0010ac55
ADD CL,0x3
CMP AL,0xff
MOVZX EAX,CL
CMOVZ EAX,EDX
CMP BPL,AL
JNZ 0x0010ac74
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
MOV ESI,R15D
MOV EDX,dword ptr [RSP + 0xc]
CALL qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
MOV ESI,dword ptr [RSP + 0x8]
JMP 0x0010ab7a
LAB_0010aa4d:
MOVZX ECX,byte ptr [RBX + R14*0x1 + 0x60]
LEA EDX,[RCX + -0x6]
CMP CL,0x6
MOVZX EDX,DL
CMOVC EDX,ECX
MOV ESI,R15D
SHR ESI,0xc
AND SIL,0x3
INC SIL
CMP DL,SIL
JNZ 0x0010abd9
MOVZX EAX,AL
ADD EAX,EAX
LEA EBP,[RAX + RAX*0x2]
MOV RAX,qword ptr [RBX]
MOVZX ESI,CL
MOV RDI,RBX
MOV EDX,R14D
CALL qword ptr [RAX + 0x10]
SHR R15D,0x6
AND R15D,0x3f
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
MOV ESI,EBP
MOV EDX,R15D
CALL qword ptr [RAX + 0x8]
CMP R12B,0xc
JZ 0x0010ab80
CMP byte ptr [RBX + R14*0x1 + 0x60],0xc
JZ 0x0010ab70
LEA RDI,[0x10f20e]
LEA RSI,[0x10ebac]
LEA RCX,[0x10f585]
MOV EDX,0x889
CALL 0x00102130
LAB_0010aad7:
MOV AL,byte ptr [RBX + R14*0x1 + 0x60]
CMP AL,0xc
JZ 0x0010abf8
SHR R15D,0x6
AND R15D,0x3f
CMP byte ptr [RBX + R15*0x1 + 0x60],0xc
JNZ 0x0010ac36
MOV RCX,qword ptr [RBX]
MOVZX EBP,AL
MOV RDI,RBX
MOV ESI,EBP
MOV EDX,R14D
CALL qword ptr [RCX + 0x10]
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
MOV ESI,EBP
MOV EDX,R15D
CALL qword ptr [RAX + 0x8]
NEG R13W
JNO 0x0010ab5e
MOV AL,byte ptr [RBX + 0xae]
CMP AL,0x2
JNC 0x0010ab9b
MOV EDX,dword ptr [RBX + 0xb0]
CMP RDX,0x40
JNC 0x0010ac93
XOR RDX,0x8
CMP byte ptr [RBX + RDX*0x1 + 0x60],0xc
JNZ 0x0010acb2
XOR AL,0x1
MOVZX EAX,AL
ADD EAX,EAX
LEA EAX,[RAX + RAX*0x2]
MOV RCX,qword ptr [RBX]
MOVZX ESI,AL
MOV RDI,RBX
CALL qword ptr [RCX + 0x8]
JMP 0x0010ab80
LAB_0010ab5e:
CMP R12B,0xc
JZ 0x0010ab80
CMP byte ptr [RBX + R14*0x1 + 0x60],0xc
JNZ 0x0010acd1
LAB_0010ab70:
MOV RAX,qword ptr [RBX]
MOVZX ESI,R12B
MOV RDI,RBX
LAB_0010ab7a:
MOV EDX,R14D
CALL qword ptr [RAX + 0x8]
LAB_0010ab80:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RBX + 0xa0],RAX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0010ab9b:
LEA RDI,[0x10c773]
LEA RSI,[0x10ebac]
LEA RCX,[0x10c78f]
MOV EDX,0x48
CALL 0x00102130
LAB_0010abba:
LEA RDI,[0x10f556]
LEA RSI,[0x10ebac]
LEA RCX,[0x10f585]
MOV EDX,0x86a
CALL 0x00102130
LAB_0010abd9:
LEA RDI,[0x10f5dc]
LEA RSI,[0x10ebac]
LEA RCX,[0x10f585]
MOV EDX,0x880
CALL 0x00102130
LAB_0010abf8:
LEA RDI,[0x10f601]
LEA RSI,[0x10ebac]
LEA RCX,[0x10f585]
MOV EDX,0x890
CALL 0x00102130
LAB_0010ac17:
LEA RDI,[0x10f5af]
LEA RSI,[0x10ebac]
LEA RCX,[0x10f585]
MOV EDX,0x86b
CALL 0x00102130
LAB_0010ac36:
LEA RDI,[0x10f61e]
LEA RSI,[0x10ebac]
LEA RCX,[0x10f585]
MOV EDX,0x891
CALL 0x00102130
LAB_0010ac55:
LEA RDI,[0x10f1a5]
LEA RSI,[0x10ebac]
LEA RCX,[0x10f585]
MOV EDX,0x873
CALL 0x00102130
LAB_0010ac74:
LEA RDI,[0x10f1ca]
LEA RSI,[0x10ebac]
LEA RCX,[0x10f585]
MOV EDX,0x874
CALL 0x00102130
LAB_0010ac93:
LEA RDI,[0x10c84b]
LEA RSI,[0x10ebac]
LEA RCX,[0x10ed14]
MOV EDX,0x908
CALL 0x00102130
LAB_0010acb2:
LEA RDI,[0x10f63d]
LEA RSI,[0x10ebac]
LEA RCX,[0x10f585]
MOV EDX,0x89d
CALL 0x00102130
LAB_0010acd1:
LEA RDI,[0x10f20e]
LEA RSI,[0x10ebac]
LEA RCX,[0x10f585]
MOV EDX,0x8a1
CALL 0x00102130
|
/* WARNING: Removing unreachable block (ram,0x0010ab1d) */
/* WARNING: Removing unreachable block (ram,0x0010ab27) */
/* WARNING: Removing unreachable block (ram,0x0010ac93) */
/* WARNING: Removing unreachable block (ram,0x0010ab37) */
/* WARNING: Removing unreachable block (ram,0x0010acb2) */
/* WARNING: Removing unreachable block (ram,0x0010ab46) */
/* chess::Board::unmakeMove(chess::Move) */
void __thiscall chess::Board::unmakeMove(Board *this,uint param_2)
{
Board BVar1;
int4 uVar2;
int4 uVar3;
int8 uVar4;
bool bVar5;
long lVar6;
Board BVar7;
Board BVar8;
Board BVar9;
uint uVar10;
ulong uVar11;
ulong uVar12;
uint uVar13;
lVar6 = *(long *)(this + 0x10);
uVar4 = *(int8 *)(lVar6 + -0x18);
uVar2 = *(int4 *)(lVar6 + -0x10);
uVar3 = *(int4 *)(lVar6 + -0xc);
BVar7 = *(Board *)(lVar6 + -8);
BVar1 = *(Board *)(lVar6 + -7);
*(long *)(this + 0x10) = lVar6 + -0x18;
*(int4 *)(this + 0xb0) = uVar3;
*(int4 *)(this + 0xa8) = uVar2;
this[0xb4] = BVar7;
if (1 < (byte)this[0xae]) {
/* WARNING: Subroutine does not return */
__assert_fail("c == 0 || c == 1 || c == -1",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp"
,0x48,"chess::Color::Color(int)");
}
BVar7 = (Board)((byte)this[0xae] ^ 1);
this[0xae] = BVar7;
*(short *)(this + 0xac) = *(short *)(this + 0xac) + -1;
uVar12 = (ulong)(param_2 & 0x3f);
if ((param_2 & 0xc000) == 0x4000) {
BVar8 = this[uVar12 + 0x60];
BVar9 = (Board)((char)BVar8 - 6);
if ((byte)BVar8 < 6) {
BVar9 = BVar8;
}
if (BVar9 != (Board)(((byte)(param_2 >> 0xc) & 3) + 1)) {
/* WARNING: Subroutine does not return */
__assert_fail("piece.type() == move.promotionType()",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp"
,0x880,"void chess::Board::unmakeMove(const Move)");
}
(**(code **)(*(long *)this + 0x10))(this,BVar8,uVar12);
(**(code **)(*(long *)this + 8))(this,(uint)(byte)BVar7 * 6,param_2 >> 6 & 0x3f);
if (BVar1 == (Board)0xc) goto LAB_0010ab80;
if (this[uVar12 + 0x60] != (Board)0xc) {
/* WARNING: Subroutine does not return */
__assert_fail("at(move.to()) == Piece::NONE",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp"
,0x889,"void chess::Board::unmakeMove(const Move)");
}
LAB_0010ab70:
lVar6 = *(long *)this;
}
else {
if ((param_2 & 0xc000) != 0xc000) {
BVar7 = this[uVar12 + 0x60];
if (BVar7 == (Board)0xc) {
/* WARNING: Subroutine does not return */
__assert_fail("at(move.to()) != Piece::NONE",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp"
,0x890,"void chess::Board::unmakeMove(const Move)");
}
uVar11 = (ulong)(param_2 >> 6 & 0x3f);
if (this[uVar11 + 0x60] != (Board)0xc) {
/* WARNING: Subroutine does not return */
__assert_fail("at(move.from()) == Piece::NONE",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp"
,0x891,"void chess::Board::unmakeMove(const Move)");
}
(**(code **)(*(long *)this + 0x10))(this,BVar7,uVar12);
(**(code **)(*(long *)this + 8))(this,BVar7,uVar11);
if (BVar1 == (Board)0xc) goto LAB_0010ab80;
if (this[uVar12 + 0x60] != (Board)0xc) {
/* WARNING: Subroutine does not return */
__assert_fail("at(move.to()) == Piece::NONE",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp"
,0x8a1,"void chess::Board::unmakeMove(const Move)");
}
goto LAB_0010ab70;
}
uVar10 = param_2 >> 6 & 0x3f;
bVar5 = uVar10 < (param_2 & 0x3f);
uVar13 = param_2 >> 6 & 0x38;
BVar1 = this[(ulong)(uVar13 + (uint)bVar5 * 2) + 99];
BVar7 = (Board)((char)BVar1 - 6);
if ((byte)BVar1 < 6) {
BVar7 = BVar1;
}
if (BVar7 != (Board)0x3) {
/* WARNING: Subroutine does not return */
__assert_fail("at<PieceType>(rook_from_sq) == PieceType::ROOK",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp"
,0x86a,"void chess::Board::unmakeMove(const Move)");
}
uVar11 = (ulong)(uVar13 + (uint)bVar5 * 4 + 2);
BVar7 = this[uVar11 + 0x60];
BVar8 = (Board)((char)BVar7 - 6);
if ((byte)BVar7 < 6) {
BVar8 = BVar7;
}
if (BVar8 != (Board)0x5) {
/* WARNING: Subroutine does not return */
__assert_fail("at<PieceType>(king_to_sq) == PieceType::KING",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp"
,0x86b,"void chess::Board::unmakeMove(const Move)");
}
(**(code **)(*(long *)this + 0x10))(this,BVar1,uVar13 + (uint)bVar5 * 2 + 3);
(**(code **)(*(long *)this + 0x10))(this,BVar7,uVar11);
BVar8 = this[0xae];
BVar9 = (Board)((char)BVar8 * '\x06' + 5);
if (BVar8 == (Board)0xff) {
BVar9 = (Board)0xc;
}
if (BVar7 != BVar9) {
/* WARNING: Subroutine does not return */
__assert_fail("king == Piece(PieceType::KING, stm_)",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp"
,0x873,"void chess::Board::unmakeMove(const Move)");
}
BVar9 = (Board)((char)BVar8 * '\x06' + 3);
if (BVar8 == (Board)0xff) {
BVar9 = (Board)0xc;
}
if (BVar1 != BVar9) {
/* WARNING: Subroutine does not return */
__assert_fail("rook == Piece(PieceType::ROOK, stm_)",
"/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp"
,0x874,"void chess::Board::unmakeMove(const Move)");
}
(**(code **)(*(long *)this + 8))(this,BVar7,uVar10);
lVar6 = *(long *)this;
}
(**(code **)(lVar6 + 8))(this,BVar1,uVar12);
LAB_0010ab80:
*(int8 *)(this + 0xa0) = uVar4;
return;
}
| |
23,159 | my_strnxfrm_tis620_nopad | eloqsql/strings/ctype-tis620.c | static size_t
my_strnxfrm_tis620_nopad(CHARSET_INFO *cs,
uchar *dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags)
{
size_t len, dstlen0= dstlen;
len= MY_MIN(dstlen, srclen);
memcpy(dst, src, len);
len= thai2sortable(dst, len);
set_if_smaller(dstlen, nweights);
set_if_smaller(len, dstlen);
len= my_strxfrm_pad_desc_and_reverse_nopad(cs, dst, dst + len, dst + dstlen,
(uint)(dstlen - len), flags, 0);
if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len < dstlen0)
{
size_t fill_length= dstlen0 - len;
memset(dst + len, 0x00, fill_length);
len= dstlen0;
}
return len;
} | O0 | c | my_strnxfrm_tis620_nopad:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x4a19e
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x4a1a6
movq -0x30(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x24200
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x49f40
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
cmpq %rcx, %rax
jbe 0x4a1e3
movl -0x1c(%rbp), %eax
movq %rax, -0x18(%rbp)
jmp 0x4a1e5
jmp 0x4a1e7
movq -0x38(%rbp), %rax
cmpq -0x18(%rbp), %rax
jbe 0x4a1f9
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x4a1fb
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq -0x38(%rbp), %rdx
movq -0x10(%rbp), %rcx
addq -0x18(%rbp), %rcx
movq -0x18(%rbp), %rax
subq -0x38(%rbp), %rax
movl %eax, %r8d
movl 0x10(%rbp), %r9d
xorl %eax, %eax
movl $0x0, (%rsp)
callq 0x446c0
movq %rax, -0x38(%rbp)
movl 0x10(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x4a272
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x4a272
movq -0x40(%rbp), %rax
subq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
addq -0x38(%rbp), %rdi
movq -0x48(%rbp), %rdx
xorl %esi, %esi
callq 0x24180
movq -0x40(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
| my_strnxfrm_tis620_nopad:
push rbp
mov rbp, rsp
sub rsp, 60h
mov eax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+var_18]
mov [rbp+var_40], rax
mov rax, [rbp+var_18]
cmp rax, [rbp+var_30]
jnb short loc_4A19E
mov rax, [rbp+var_18]
mov [rbp+var_50], rax
jmp short loc_4A1A6
loc_4A19E:
mov rax, [rbp+var_30]
mov [rbp+var_50], rax
loc_4A1A6:
mov rax, [rbp+var_50]
mov [rbp+var_38], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_38]
call _memcpy
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_38]
call thai2sortable
mov [rbp+var_38], rax
mov rax, [rbp+var_18]
mov ecx, [rbp+var_1C]
cmp rax, rcx
jbe short loc_4A1E3
mov eax, [rbp+var_1C]
mov [rbp+var_18], rax
loc_4A1E3:
jmp short $+2
loc_4A1E5:
jmp short $+2
loc_4A1E7:
mov rax, [rbp+var_38]
cmp rax, [rbp+var_18]
jbe short loc_4A1F9
mov rax, [rbp+var_18]
mov [rbp+var_38], rax
loc_4A1F9:
jmp short $+2
loc_4A1FB:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_10]
add rdx, [rbp+var_38]
mov rcx, [rbp+var_10]
add rcx, [rbp+var_18]
mov rax, [rbp+var_18]
sub rax, [rbp+var_38]
mov r8d, eax
mov r9d, [rbp+arg_0]
xor eax, eax
mov [rsp+60h+var_60], 0
call my_strxfrm_pad_desc_and_reverse_nopad
mov [rbp+var_38], rax
mov eax, [rbp+arg_0]
and eax, 80h
cmp eax, 0
jz short loc_4A272
mov rax, [rbp+var_38]
cmp rax, [rbp+var_40]
jnb short loc_4A272
mov rax, [rbp+var_40]
sub rax, [rbp+var_38]
mov [rbp+var_48], rax
mov rdi, [rbp+var_10]
add rdi, [rbp+var_38]
mov rdx, [rbp+var_48]
xor esi, esi
call _memset
mov rax, [rbp+var_40]
mov [rbp+var_38], rax
loc_4A272:
mov rax, [rbp+var_38]
add rsp, 60h
pop rbp
retn
| unsigned long long my_strnxfrm_tis620_nopad(
long long a1,
unsigned __int8 *a2,
unsigned long long a3,
unsigned int a4,
long long a5,
unsigned long long a6,
unsigned int a7)
{
long long v8; // [rsp+10h] [rbp-50h]
unsigned long long v10; // [rsp+28h] [rbp-38h]
unsigned long long v11; // [rsp+28h] [rbp-38h]
unsigned long long v13; // [rsp+48h] [rbp-18h]
v13 = a3;
if ( a3 >= a6 )
v8 = a6;
else
v8 = a3;
memcpy(a2, a5, v8);
v10 = thai2sortable(a2, v8);
if ( v13 > a4 )
v13 = a4;
if ( v10 > v13 )
v10 = v13;
v11 = my_strxfrm_pad_desc_and_reverse_nopad(
a1,
(long long)a2,
(unsigned long long)&a2[v10],
(unsigned long long)&a2[v13],
(int)v13 - (int)v10,
a7,
0);
if ( (a7 & 0x80) != 0 && v11 < a3 )
{
memset(&a2[v11], 0LL, a3 - v11);
return a3;
}
return v11;
}
| my_strnxfrm_tis620_nopad:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV EAX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x0014a19e
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0014a1a6
LAB_0014a19e:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x50],RAX
LAB_0014a1a6:
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x38]
CALL 0x00124200
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x00149f40
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x1c]
CMP RAX,RCX
JBE 0x0014a1e3
MOV EAX,dword ptr [RBP + -0x1c]
MOV qword ptr [RBP + -0x18],RAX
LAB_0014a1e3:
JMP 0x0014a1e5
LAB_0014a1e5:
JMP 0x0014a1e7
LAB_0014a1e7:
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x18]
JBE 0x0014a1f9
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x38],RAX
LAB_0014a1f9:
JMP 0x0014a1fb
LAB_0014a1fb:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x10]
ADD RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,qword ptr [RBP + -0x38]
MOV R8D,EAX
MOV R9D,dword ptr [RBP + 0x10]
XOR EAX,EAX
MOV dword ptr [RSP],0x0
CALL 0x001446c0
MOV qword ptr [RBP + -0x38],RAX
MOV EAX,dword ptr [RBP + 0x10]
AND EAX,0x80
CMP EAX,0x0
JZ 0x0014a272
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x0014a272
MOV RAX,qword ptr [RBP + -0x40]
SUB RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x48]
XOR ESI,ESI
CALL 0x00124180
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x38],RAX
LAB_0014a272:
MOV RAX,qword ptr [RBP + -0x38]
ADD RSP,0x60
POP RBP
RET
|
ulong my_strnxfrm_tis620_nopad
(int8 param_1,void *param_2,ulong param_3,uint param_4,void *param_5,
ulong param_6,uint param_7)
{
size_t local_58;
ulong local_40;
ulong local_20;
local_58 = param_6;
if (param_3 < param_6) {
local_58 = param_3;
}
memcpy(param_2,param_5,local_58);
local_40 = thai2sortable(param_2,local_58);
local_20 = param_3;
if (param_4 < param_3) {
local_20 = (ulong)param_4;
}
if (local_20 < local_40) {
local_40 = local_20;
}
local_40 = my_strxfrm_pad_desc_and_reverse_nopad
(param_1,param_2,(long)param_2 + local_40,(long)param_2 + local_20,
(int)local_20 - (int)local_40,param_7,0);
if (((param_7 & 0x80) != 0) && (local_40 < param_3)) {
memset((void *)((long)param_2 + local_40),0,param_3 - local_40);
local_40 = param_3;
}
return local_40;
}
| |
23,160 | js_symbol_constructor | bluesky950520[P]quickjs/quickjs.c | static JSValue js_symbol_constructor(JSContext *ctx, JSValue new_target,
int argc, JSValue *argv)
{
JSValue str;
JSString *p;
if (!JS_IsUndefined(new_target))
return JS_ThrowTypeError(ctx, "not a constructor");
if (argc == 0 || JS_IsUndefined(argv[0])) {
p = NULL;
} else {
str = JS_ToString(ctx, argv[0]);
if (JS_IsException(str))
return JS_EXCEPTION;
p = JS_VALUE_GET_STRING(str);
}
return JS_NewSymbolInternal(ctx, p, JS_ATOM_TYPE_SYMBOL);
} | O1 | c | js_symbol_constructor:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x3, %edx
jne 0x38b70
testl %ecx, %ecx
je 0x38b4f
movq 0x8(%r8), %rdx
cmpl $0x3, %edx
jne 0x38b99
xorl %esi, %esi
movq %rbx, %rdi
movl $0x3, %edx
callq 0x3bc1f
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
movl %eax, %r14d
jmp 0x38b8b
leaq 0x66b69(%rip), %rsi # 0x9f6e0
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x22567
movl $0x6, %edx
xorl %ecx, %ecx
orq %rcx, %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq (%r8), %rsi
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x27add
movq %rax, (%rsp)
cmpl $0x6, %edx
je 0x38b84
movq (%rsp), %rsi
jmp 0x38b51
| js_symbol_constructor:
push r14
push rbx
push rax
mov rbx, rdi
cmp edx, 3
jnz short loc_38B70
test ecx, ecx
jz short loc_38B4F
mov rdx, [r8+8]
cmp edx, 3
jnz short loc_38B99
loc_38B4F:
xor esi, esi
loc_38B51:
mov rdi, rbx
mov edx, 3
call JS_NewSymbolInternal
mov rcx, 0FFFFFFFF00000000h
and rcx, rax
mov r14d, eax
jmp short loc_38B8B
loc_38B70:
lea rsi, aNotAConstructo; "not a constructor"
xor r14d, r14d
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
loc_38B84:
mov edx, 6
xor ecx, ecx
loc_38B8B:
or r14, rcx
mov rax, r14
add rsp, 8
pop rbx
pop r14
retn
loc_38B99:
mov rsi, [r8]
xor r14d, r14d
mov rdi, rbx
xor ecx, ecx
call JS_ToStringInternal
mov [rsp+18h+var_18], rax
cmp edx, 6
jz short loc_38B84
mov rsi, [rsp+18h+var_18]
jmp short loc_38B51
| unsigned long long js_symbol_constructor(
long long a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
long long *a13,
long long a14)
{
char v14; // al
long long v15; // rdx
unsigned long long v16; // rsi
long long v17; // rax
unsigned long long v18; // rcx
long long v19; // r14
int v21; // edx
unsigned long long v22; // [rsp+0h] [rbp-18h]
if ( (_DWORD)a11 != 3 )
{
v19 = 0LL;
JS_ThrowTypeError(
a1,
(long long)"not a constructor",
a11,
a12,
(long long)a13,
a14,
a2,
a3,
a4,
a5,
a6,
a7,
a8,
a9,
v14);
goto LABEL_7;
}
if ( (_DWORD)a12 )
{
v15 = a13[1];
if ( (_DWORD)v15 != 3 )
{
v19 = 0LL;
v22 = JS_ToStringInternal(a1, *a13, v15, 0, (long long)a13, a14, a2, a3, a4, a5, a6, a7, a8, a9);
if ( v21 != 6 )
{
v16 = v22;
goto LABEL_5;
}
LABEL_7:
v18 = 0LL;
return v18 | v19;
}
}
v16 = 0LL;
LABEL_5:
v17 = JS_NewSymbolInternal(a1, v16, 3LL);
v18 = v17 & 0xFFFFFFFF00000000LL;
v19 = (unsigned int)v17;
return v18 | v19;
}
| js_symbol_constructor:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
CMP EDX,0x3
JNZ 0x00138b70
TEST ECX,ECX
JZ 0x00138b4f
MOV RDX,qword ptr [R8 + 0x8]
CMP EDX,0x3
JNZ 0x00138b99
LAB_00138b4f:
XOR ESI,ESI
LAB_00138b51:
MOV RDI,RBX
MOV EDX,0x3
CALL 0x0013bc1f
MOV RCX,-0x100000000
AND RCX,RAX
MOV R14D,EAX
JMP 0x00138b8b
LAB_00138b70:
LEA RSI,[0x19f6e0]
XOR R14D,R14D
MOV RDI,RBX
XOR EAX,EAX
CALL 0x00122567
LAB_00138b84:
MOV EDX,0x6
XOR ECX,ECX
LAB_00138b8b:
OR R14,RCX
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_00138b99:
MOV RSI,qword ptr [R8]
XOR R14D,R14D
MOV RDI,RBX
XOR ECX,ECX
CALL 0x00127add
MOV qword ptr [RSP],RAX
CMP EDX,0x6
JZ 0x00138b84
MOV RSI,qword ptr [RSP]
JMP 0x00138b51
|
ulong js_symbol_constructor
(int8 param_1,int8 param_2,int param_3,int param_4,int8 *param_5)
{
ulong uVar1;
ulong uVar2;
int8 uVar3;
int1 auVar4 [12];
if (param_3 == 3) {
if ((param_4 == 0) || ((int)param_5[1] == 3)) {
uVar3 = 0;
}
else {
auVar4 = JS_ToStringInternal(param_1,*param_5,param_5[1],0);
uVar3 = auVar4._0_8_;
if (auVar4._8_4_ == 6) goto LAB_00138b84;
}
uVar1 = JS_NewSymbolInternal(param_1,uVar3,3);
uVar2 = uVar1 & 0xffffffff00000000;
uVar1 = uVar1 & 0xffffffff;
}
else {
JS_ThrowTypeError(param_1,"not a constructor");
LAB_00138b84:
uVar1 = 0;
uVar2 = 0;
}
return uVar1 | uVar2;
}
| |
23,161 | js_symbol_constructor | bluesky950520[P]quickjs/quickjs.c | static JSValue js_symbol_constructor(JSContext *ctx, JSValue new_target,
int argc, JSValue *argv)
{
JSValue str;
JSString *p;
if (!JS_IsUndefined(new_target))
return JS_ThrowTypeError(ctx, "not a constructor");
if (argc == 0 || JS_IsUndefined(argv[0])) {
p = NULL;
} else {
str = JS_ToString(ctx, argv[0]);
if (JS_IsException(str))
return JS_EXCEPTION;
p = JS_VALUE_GET_STRING(str);
}
return JS_NewSymbolInternal(ctx, p, JS_ATOM_TYPE_SYMBOL);
} | O2 | c | js_symbol_constructor:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x3, %edx
jne 0x31d0d
testl %ecx, %ecx
je 0x31cee
movq 0x8(%r8), %rdx
cmpl $0x3, %edx
jne 0x31d34
xorl %esi, %esi
pushq $0x3
popq %rdx
movq %rbx, %rdi
callq 0x34a2a
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
movl %eax, %r14d
jmp 0x31d26
leaq 0x5491c(%rip), %rsi # 0x86630
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1c64d
pushq $0x6
popq %rdx
xorl %ecx, %ecx
orq %rcx, %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq (%r8), %rsi
movq %rbx, %rdi
callq 0x1b03c
cmpl $0x6, %edx
jne 0x31d4c
pushq $0x6
popq %rdx
xorl %r14d, %r14d
jmp 0x31d24
movq %rax, %rsi
jmp 0x31cf0
| js_symbol_constructor:
push r14
push rbx
push rax
mov rbx, rdi
cmp edx, 3
jnz short loc_31D0D
test ecx, ecx
jz short loc_31CEE
mov rdx, [r8+8]
cmp edx, 3
jnz short loc_31D34
loc_31CEE:
xor esi, esi
loc_31CF0:
push 3
pop rdx
mov rdi, rbx
call JS_NewSymbolInternal
mov rcx, 0FFFFFFFF00000000h
and rcx, rax
mov r14d, eax
jmp short loc_31D26
loc_31D0D:
lea rsi, aNotAConstructo; "not a constructor"
xor r14d, r14d
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
push 6
pop rdx
loc_31D24:
xor ecx, ecx
loc_31D26:
or r14, rcx
mov rax, r14
add rsp, 8
pop rbx
pop r14
retn
loc_31D34:
mov rsi, [r8]
mov rdi, rbx
call JS_ToString
cmp edx, 6
jnz short loc_31D4C
push 6
pop rdx
xor r14d, r14d
jmp short loc_31D24
loc_31D4C:
mov rsi, rax
jmp short loc_31CF0
| unsigned long long js_symbol_constructor(
long long a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
long long *a13,
long long a14)
{
char v14; // al
long long v15; // rdx
long long v16; // rsi
long long v17; // rax
unsigned long long v18; // rcx
long long v19; // r14
long long v21; // rax
int v22; // edx
if ( (_DWORD)a11 != 3 )
{
v19 = 0LL;
JS_ThrowTypeError(
a1,
(long long)"not a constructor",
a11,
a12,
(long long)a13,
a14,
a2,
a3,
a4,
a5,
a6,
a7,
a8,
a9,
v14);
goto LABEL_7;
}
if ( (_DWORD)a12 )
{
v15 = a13[1];
if ( (_DWORD)v15 != 3 )
{
v21 = JS_ToString(a1, *a13, v15);
if ( v22 != 6 )
{
v16 = v21;
goto LABEL_5;
}
v19 = 0LL;
LABEL_7:
v18 = 0LL;
return v18 | v19;
}
}
v16 = 0LL;
LABEL_5:
v17 = JS_NewSymbolInternal(a1, v16, 3LL);
v18 = v17 & 0xFFFFFFFF00000000LL;
v19 = (unsigned int)v17;
return v18 | v19;
}
| js_symbol_constructor:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
CMP EDX,0x3
JNZ 0x00131d0d
TEST ECX,ECX
JZ 0x00131cee
MOV RDX,qword ptr [R8 + 0x8]
CMP EDX,0x3
JNZ 0x00131d34
LAB_00131cee:
XOR ESI,ESI
LAB_00131cf0:
PUSH 0x3
POP RDX
MOV RDI,RBX
CALL 0x00134a2a
MOV RCX,-0x100000000
AND RCX,RAX
MOV R14D,EAX
JMP 0x00131d26
LAB_00131d0d:
LEA RSI,[0x186630]
XOR R14D,R14D
MOV RDI,RBX
XOR EAX,EAX
CALL 0x0011c64d
PUSH 0x6
POP RDX
LAB_00131d24:
XOR ECX,ECX
LAB_00131d26:
OR R14,RCX
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_00131d34:
MOV RSI,qword ptr [R8]
MOV RDI,RBX
CALL 0x0011b03c
CMP EDX,0x6
JNZ 0x00131d4c
PUSH 0x6
POP RDX
XOR R14D,R14D
JMP 0x00131d24
LAB_00131d4c:
MOV RSI,RAX
JMP 0x00131cf0
|
ulong js_symbol_constructor
(int8 param_1,int8 param_2,int param_3,int param_4,int8 *param_5)
{
ulong uVar1;
ulong uVar2;
int8 uVar3;
int1 auVar4 [12];
if (param_3 == 3) {
if ((param_4 == 0) || ((int)param_5[1] == 3)) {
uVar3 = 0;
}
else {
auVar4 = JS_ToString(param_1,*param_5);
uVar3 = auVar4._0_8_;
if (auVar4._8_4_ == 6) goto LAB_00131d24;
}
uVar1 = JS_NewSymbolInternal(param_1,uVar3,3);
uVar2 = uVar1 & 0xffffffff00000000;
uVar1 = uVar1 & 0xffffffff;
}
else {
JS_ThrowTypeError(param_1,"not a constructor");
LAB_00131d24:
uVar1 = 0;
uVar2 = 0;
}
return uVar1 | uVar2;
}
| |
23,162 | google::protobuf::OneofDescriptorProto::~OneofDescriptorProto() | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc | OneofDescriptorProto::~OneofDescriptorProto() {
// @@protoc_insertion_point(destructor:google.protobuf.OneofDescriptorProto)
if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
(void)arena;
return;
}
SharedDtor();
} | O3 | cpp | google::protobuf::OneofDescriptorProto::~OneofDescriptorProto():
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %rbx
movq 0x8(%rdi), %rax
testb $0x1, %al
jne 0xef2ac
andq $-0x4, %rax
jmp 0xef2b4
movq %rbx, %rdi
callq 0x734ec
testq %rax, %rax
jne 0xef2e7
leaq 0x18(%r14), %rdi
callq 0x78a24
leaq 0x122abf(%rip), %rax # 0x211d88
cmpq %rax, %r14
je 0xef2e7
movq 0x20(%r14), %r15
testq %r15, %r15
je 0xef2df
movq %r15, %rdi
callq 0xf536e
movq %r15, %rdi
callq 0x2d160
leaq 0x11b232(%rip), %rax # 0x20a520
addq $0x10, %rax
movq %rax, (%r14)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x73456
movq %rax, %rdi
callq 0x33bfc
| _ZN6google8protobuf20OneofDescriptorProtoD2Ev:
push r15
push r14
push rbx
mov r14, rdi
lea rbx, [rdi+8]
mov rax, [rdi+8]
test al, 1
jnz short loc_EF2AC
and rax, 0FFFFFFFFFFFFFFFCh
jmp short loc_EF2B4
loc_EF2AC:
mov rdi, rbx
call _ZN6google8protobuf8internal16InternalMetadata21DeleteOutOfLineHelperINS0_15UnknownFieldSetEEEPNS0_5ArenaEv; google::protobuf::internal::InternalMetadata::DeleteOutOfLineHelper<google::protobuf::UnknownFieldSet>(void)
loc_EF2B4:
test rax, rax
jnz short loc_EF2E7
lea rdi, [r14+18h]; this
call _ZN6google8protobuf8internal14ArenaStringPtr7DestroyEv; google::protobuf::internal::ArenaStringPtr::Destroy(void)
lea rax, _ZN6google8protobuf39_OneofDescriptorProto_default_instance_E; google::protobuf::_OneofDescriptorProto_default_instance_
cmp r14, rax
jz short loc_EF2E7
mov r15, [r14+20h]
test r15, r15
jz short loc_EF2DF
mov rdi, r15; this
call _ZN6google8protobuf12OneofOptionsD2Ev; google::protobuf::OneofOptions::~OneofOptions()
loc_EF2DF:
mov rdi, r15; void *
call __ZdlPv; operator delete(void *)
loc_EF2E7:
lea rax, _ZTVN6google8protobuf11MessageLiteE; `vtable for'google::protobuf::MessageLite
add rax, 10h
mov [r14], rax
mov rdi, rbx; this
pop rbx
pop r14
pop r15
jmp _ZN6google8protobuf8internal16InternalMetadataD2Ev; google::protobuf::internal::InternalMetadata::~InternalMetadata()
mov rdi, rax
call __clang_call_terminate
| void google::protobuf::OneofDescriptorProto::~OneofDescriptorProto(
void ( ***this)(google::protobuf::OneofDescriptorProto *__hidden this))
{
unsigned long long v1; // rax
unsigned long long v2; // rax
void ( **v3)(google::protobuf::OneofDescriptorProto *__hidden); // r15
v1 = (unsigned long long)this[1];
if ( (v1 & 1) != 0 )
v2 = google::protobuf::internal::InternalMetadata::DeleteOutOfLineHelper<google::protobuf::UnknownFieldSet>((long long *)this + 1);
else
v2 = v1 & 0xFFFFFFFFFFFFFFFCLL;
if ( !v2 )
{
google::protobuf::internal::ArenaStringPtr::Destroy((google::protobuf::internal::ArenaStringPtr *)(this + 3));
if ( this != &google::protobuf::_OneofDescriptorProto_default_instance_ )
{
v3 = this[4];
if ( v3 )
google::protobuf::OneofOptions::~OneofOptions((google::protobuf::OneofOptions *)this[4]);
operator delete(v3);
}
}
*this = (void ( **)(google::protobuf::OneofDescriptorProto *__hidden))(&`vtable for'google::protobuf::MessageLite
+ 2);
google::protobuf::internal::InternalMetadata::~InternalMetadata((google::protobuf::internal::InternalMetadata *)(this + 1));
}
| ~OneofDescriptorProto:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RDI
LEA RBX,[RDI + 0x8]
MOV RAX,qword ptr [RDI + 0x8]
TEST AL,0x1
JNZ 0x001ef2ac
AND RAX,-0x4
JMP 0x001ef2b4
LAB_001ef2ac:
MOV RDI,RBX
CALL 0x001734ec
LAB_001ef2b4:
TEST RAX,RAX
JNZ 0x001ef2e7
LEA RDI,[R14 + 0x18]
CALL 0x00178a24
LEA RAX,[0x311d88]
CMP R14,RAX
JZ 0x001ef2e7
MOV R15,qword ptr [R14 + 0x20]
TEST R15,R15
JZ 0x001ef2df
MOV RDI,R15
CALL 0x001f536e
LAB_001ef2df:
MOV RDI,R15
CALL 0x0012d160
LAB_001ef2e7:
LEA RAX,[0x30a520]
ADD RAX,0x10
MOV qword ptr [R14],RAX
MOV RDI,RBX
POP RBX
POP R14
POP R15
JMP 0x00173456
|
/* google::protobuf::OneofDescriptorProto::~OneofDescriptorProto() */
void __thiscall
google::protobuf::OneofDescriptorProto::~OneofDescriptorProto(OneofDescriptorProto *this)
{
OneofOptions *this_00;
Arena *pAVar1;
if ((*(ulong *)(this + 8) & 1) == 0) {
pAVar1 = (Arena *)(*(ulong *)(this + 8) & 0xfffffffffffffffc);
}
else {
/* try { // try from 001ef2ac to 001ef2c1 has its CatchHandler @ 001ef302 */
pAVar1 = internal::InternalMetadata::DeleteOutOfLineHelper<google::protobuf::UnknownFieldSet>
((InternalMetadata *)(this + 8));
}
if (pAVar1 == (Arena *)0x0) {
internal::ArenaStringPtr::Destroy((ArenaStringPtr *)(this + 0x18));
if (this != (OneofDescriptorProto *)_OneofDescriptorProto_default_instance_) {
this_00 = *(OneofOptions **)(this + 0x20);
if (this_00 != (OneofOptions *)0x0) {
OneofOptions::~OneofOptions(this_00);
}
operator_delete(this_00);
}
}
*(int ***)this = &PTR__MessageLite_0030a530;
internal::InternalMetadata::~InternalMetadata((InternalMetadata *)(this + 8));
return;
}
| |
23,163 | minja::ExpressionNode::ExpressionNode(minja::Location const&, std::shared_ptr<minja::Expression>&&) | monkey531[P]llama/common/minja.hpp | ExpressionNode(const Location & location, std::shared_ptr<Expression> && e) : TemplateNode(location), expr(std::move(e)) {} | O2 | cpp | minja::ExpressionNode::ExpressionNode(minja::Location const&, std::shared_ptr<minja::Expression>&&):
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
callq 0x7320c
leaq 0x89838(%rip), %rax # 0xff2a8
addq $0x10, %rax
movq %rax, (%r14)
andq $0x0, 0x28(%r14)
movups (%rbx), %xmm0
andq $0x0, 0x8(%rbx)
movups %xmm0, 0x20(%r14)
andq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
| _ZN5minja14ExpressionNodeC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEE:
push r14
push rbx
push rax
mov rbx, rdx
mov r14, rdi
call _ZN5minja12TemplateNodeC2ERKNS_8LocationE; minja::TemplateNode::TemplateNode(minja::Location const&)
lea rax, _ZTVN5minja14ExpressionNodeE; `vtable for'minja::ExpressionNode
add rax, 10h
mov [r14], rax
and qword ptr [r14+28h], 0
movups xmm0, xmmword ptr [rbx]
and qword ptr [rbx+8], 0
movups xmmword ptr [r14+20h], xmm0
and qword ptr [rbx], 0
add rsp, 8
pop rbx
pop r14
retn
| long long * minja::ExpressionNode::ExpressionNode(long long a1, _QWORD *a2, __int128 *a3)
{
long long *result; // rax
__int128 v5; // xmm0
minja::TemplateNode::TemplateNode((_QWORD *)a1, a2);
result = &`vtable for'minja::ExpressionNode + 2;
*(_QWORD *)a1 = &`vtable for'minja::ExpressionNode + 2;
*(_QWORD *)(a1 + 40) = 0LL;
v5 = *a3;
*((_QWORD *)a3 + 1) = 0LL;
*(_OWORD *)(a1 + 32) = v5;
*(_QWORD *)a3 = 0LL;
return result;
}
| ExpressionNode:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RDI
CALL 0x0017320c
LEA RAX,[0x1ff2a8]
ADD RAX,0x10
MOV qword ptr [R14],RAX
AND qword ptr [R14 + 0x28],0x0
MOVUPS XMM0,xmmword ptr [RBX]
AND qword ptr [RBX + 0x8],0x0
MOVUPS xmmword ptr [R14 + 0x20],XMM0
AND qword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* minja::ExpressionNode::ExpressionNode(minja::Location const&,
std::shared_ptr<minja::Expression>&&) */
void __thiscall
minja::ExpressionNode::ExpressionNode(ExpressionNode *this,Location *param_1,shared_ptr *param_2)
{
int8 uVar1;
TemplateNode::TemplateNode((TemplateNode *)this,param_1);
*(int ***)this = &PTR_do_render_001ff2b8;
*(int8 *)(this + 0x28) = 0;
uVar1 = *(int8 *)(param_2 + 8);
*(int8 *)(param_2 + 8) = 0;
*(int8 *)(this + 0x20) = *(int8 *)param_2;
*(int8 *)(this + 0x28) = uVar1;
*(int8 *)param_2 = 0;
return;
}
| |
23,164 | minja::ExpressionNode::ExpressionNode(minja::Location const&, std::shared_ptr<minja::Expression>&&) | monkey531[P]llama/common/minja.hpp | ExpressionNode(const Location & location, std::shared_ptr<Expression> && e) : TemplateNode(location), expr(std::move(e)) {} | O3 | cpp | minja::ExpressionNode::ExpressionNode(minja::Location const&, std::shared_ptr<minja::Expression>&&):
pushq %rbx
movq %rdi, %rbx
leaq 0x8f597(%rip), %rax # 0x12d298
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x28(%rdi), %rdi
testq %rdi, %rdi
je 0x9dd16
callq 0x6d556
leaq 0x8f29b(%rip), %rax # 0x12cfb8
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x9dd33
popq %rbx
jmp 0x6d556
popq %rbx
retq
nop
| _ZN5minja14ExpressionNodeD2Ev:
push rbx
mov rbx, rdi
lea rax, _ZTVN5minja14ExpressionNodeE; `vtable for'minja::ExpressionNode
add rax, 10h
mov [rdi], rax
mov rdi, [rdi+28h]
test rdi, rdi
jz short loc_9DD16
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9DD16:
lea rax, _ZTVN5minja12TemplateNodeE; `vtable for'minja::TemplateNode
add rax, 10h
mov [rbx], rax
mov rdi, [rbx+10h]
test rdi, rdi
jz short loc_9DD33
pop rbx
jmp _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9DD33:
pop rbx
retn
| void minja::ExpressionNode::~ExpressionNode(minja::ExpressionNode *this)
{
volatile signed __int32 *v2; // rdi
volatile signed __int32 *v3; // rdi
*(_QWORD *)this = &`vtable for'minja::ExpressionNode + 2;
v2 = (volatile signed __int32 *)*((_QWORD *)this + 5);
if ( v2 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2);
*(_QWORD *)this = &`vtable for'minja::TemplateNode + 2;
v3 = (volatile signed __int32 *)*((_QWORD *)this + 2);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
}
| ~ExpressionNode:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x22d298]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x28]
TEST RDI,RDI
JZ 0x0019dd16
CALL 0x0016d556
LAB_0019dd16:
LEA RAX,[0x22cfb8]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x10]
TEST RDI,RDI
JZ 0x0019dd33
POP RBX
JMP 0x0016d556
LAB_0019dd33:
POP RBX
RET
|
/* minja::ExpressionNode::~ExpressionNode() */
void __thiscall minja::ExpressionNode::~ExpressionNode(ExpressionNode *this)
{
*(int ***)this = &PTR_do_render_0022d2a8;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x28) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x28));
}
*(int ***)this = &PTR___cxa_pure_virtual_0022cfc8;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10));
return;
}
return;
}
| |
23,165 | TinyDecoder::get_num_tensors() | 7CodeWizard[P]stablediffusion/tae.hpp | int get_num_tensors() {
int num_tensors = 9;
for (int i = 0; i < num_blocks; i++) {
num_tensors += input_blocks[i].get_num_tensors();
num_tensors += middle_blocks[i].get_num_tensors();
num_tensors += output_blocks[i].get_num_tensors();
}
num_tensors += final_block.get_num_tensors();
return num_tensors;
} | O0 | cpp | TinyDecoder::get_num_tensors():
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movl $0x9, 0xc(%rsp)
movl $0x0, 0x8(%rsp)
movq (%rsp), %rcx
movl 0x8(%rsp), %eax
cmpl 0xc(%rcx), %eax
jge 0x4cf88
movq (%rsp), %rdi
addq $0x20, %rdi
movslq 0x8(%rsp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x4d080
movq (%rsp), %rdi
addl 0xc(%rsp), %eax
movl %eax, 0xc(%rsp)
addq $0xe8, %rdi
movslq 0x8(%rsp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x4d080
movq (%rsp), %rdi
addl 0xc(%rsp), %eax
movl %eax, 0xc(%rsp)
addq $0x1b0, %rdi # imm = 0x1B0
movslq 0x8(%rsp), %rax
shlq $0x6, %rax
addq %rax, %rdi
callq 0x4d080
addl 0xc(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x4cf02
movq (%rsp), %rdi
addq $0x278, %rdi # imm = 0x278
callq 0x4d080
addl 0xc(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
addq $0x18, %rsp
retq
nopl (%rax)
| _ZN11TinyDecoder15get_num_tensorsEv:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov rax, [rsp+18h+var_8]
mov [rsp+18h+var_18], rax
mov [rsp+18h+var_C], 9
mov [rsp+18h+var_10], 0
loc_4CF02:
mov rcx, [rsp+18h+var_18]
mov eax, [rsp+18h+var_10]
cmp eax, [rcx+0Ch]
jge short loc_4CF88
mov rdi, [rsp+18h+var_18]
add rdi, 20h ; ' '
movsxd rax, [rsp+18h+var_10]
shl rax, 6
add rdi, rax; this
call _ZN8TAEBlock15get_num_tensorsEv; TAEBlock::get_num_tensors(void)
mov rdi, [rsp+18h+var_18]
add eax, [rsp+18h+var_C]
mov [rsp+18h+var_C], eax
add rdi, 0E8h
movsxd rax, [rsp+18h+var_10]
shl rax, 6
add rdi, rax; this
call _ZN8TAEBlock15get_num_tensorsEv; TAEBlock::get_num_tensors(void)
mov rdi, [rsp+18h+var_18]
add eax, [rsp+18h+var_C]
mov [rsp+18h+var_C], eax
add rdi, 1B0h
movsxd rax, [rsp+18h+var_10]
shl rax, 6
add rdi, rax; this
call _ZN8TAEBlock15get_num_tensorsEv; TAEBlock::get_num_tensors(void)
add eax, [rsp+18h+var_C]
mov [rsp+18h+var_C], eax
mov eax, [rsp+18h+var_10]
add eax, 1
mov [rsp+18h+var_10], eax
jmp loc_4CF02
loc_4CF88:
mov rdi, [rsp+18h+var_18]
add rdi, 278h; this
call _ZN8TAEBlock15get_num_tensorsEv; TAEBlock::get_num_tensors(void)
add eax, [rsp+18h+var_C]
mov [rsp+18h+var_C], eax
mov eax, [rsp+18h+var_C]
add rsp, 18h
retn
| long long TinyDecoder::get_num_tensors(TinyDecoder *this)
{
int i; // [rsp+8h] [rbp-10h]
int v3; // [rsp+Ch] [rbp-Ch]
int v4; // [rsp+Ch] [rbp-Ch]
int v5; // [rsp+Ch] [rbp-Ch]
v3 = 9;
for ( i = 0; i < *((_DWORD *)this + 3); ++i )
{
v4 = v3 + TAEBlock::get_num_tensors((TinyDecoder *)((char *)this + 64 * (long long)i + 32));
v5 = v4 + TAEBlock::get_num_tensors((TinyDecoder *)((char *)this + 64 * (long long)i + 232));
v3 = v5 + TAEBlock::get_num_tensors((TinyDecoder *)((char *)this + 64 * (long long)i + 432));
}
return v3 + (unsigned int)TAEBlock::get_num_tensors((TinyDecoder *)((char *)this + 632));
}
| get_num_tensors:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP],RAX
MOV dword ptr [RSP + 0xc],0x9
MOV dword ptr [RSP + 0x8],0x0
LAB_0014cf02:
MOV RCX,qword ptr [RSP]
MOV EAX,dword ptr [RSP + 0x8]
CMP EAX,dword ptr [RCX + 0xc]
JGE 0x0014cf88
MOV RDI,qword ptr [RSP]
ADD RDI,0x20
MOVSXD RAX,dword ptr [RSP + 0x8]
SHL RAX,0x6
ADD RDI,RAX
CALL 0x0014d080
MOV RDI,qword ptr [RSP]
ADD EAX,dword ptr [RSP + 0xc]
MOV dword ptr [RSP + 0xc],EAX
ADD RDI,0xe8
MOVSXD RAX,dword ptr [RSP + 0x8]
SHL RAX,0x6
ADD RDI,RAX
CALL 0x0014d080
MOV RDI,qword ptr [RSP]
ADD EAX,dword ptr [RSP + 0xc]
MOV dword ptr [RSP + 0xc],EAX
ADD RDI,0x1b0
MOVSXD RAX,dword ptr [RSP + 0x8]
SHL RAX,0x6
ADD RDI,RAX
CALL 0x0014d080
ADD EAX,dword ptr [RSP + 0xc]
MOV dword ptr [RSP + 0xc],EAX
MOV EAX,dword ptr [RSP + 0x8]
ADD EAX,0x1
MOV dword ptr [RSP + 0x8],EAX
JMP 0x0014cf02
LAB_0014cf88:
MOV RDI,qword ptr [RSP]
ADD RDI,0x278
CALL 0x0014d080
ADD EAX,dword ptr [RSP + 0xc]
MOV dword ptr [RSP + 0xc],EAX
MOV EAX,dword ptr [RSP + 0xc]
ADD RSP,0x18
RET
|
/* TinyDecoder::get_num_tensors() */
int __thiscall TinyDecoder::get_num_tensors(TinyDecoder *this)
{
int iVar1;
int iVar2;
int iVar3;
int local_10;
int local_c;
local_c = 9;
for (local_10 = 0; local_10 < *(int *)(this + 0xc); local_10 = local_10 + 1) {
iVar1 = TAEBlock::get_num_tensors((TAEBlock *)(this + (long)local_10 * 0x40 + 0x20));
iVar2 = TAEBlock::get_num_tensors((TAEBlock *)(this + (long)local_10 * 0x40 + 0xe8));
iVar3 = TAEBlock::get_num_tensors((TAEBlock *)(this + (long)local_10 * 0x40 + 0x1b0));
local_c = iVar3 + iVar2 + iVar1 + local_c;
}
iVar1 = TAEBlock::get_num_tensors((TAEBlock *)(this + 0x278));
return iVar1 + local_c;
}
| |
23,166 | TinyDecoder::get_num_tensors() | 7CodeWizard[P]stablediffusion/tae.hpp | int get_num_tensors() {
int num_tensors = 9;
for (int i = 0; i < num_blocks; i++) {
num_tensors += input_blocks[i].get_num_tensors();
num_tensors += middle_blocks[i].get_num_tensors();
num_tensors += output_blocks[i].get_num_tensors();
}
num_tensors += final_block.get_num_tensors();
return num_tensors;
} | O1 | cpp | TinyDecoder::get_num_tensors():
movslq 0xc(%rdi), %rax
testq %rax, %rax
jle 0x3b7a9
shlq $0x6, %rax
movl $0x9, %ecx
xorl %edx, %edx
movl 0x20(%rdi,%rdx), %esi
movl 0xe8(%rdi,%rdx), %r8d
xorl %r9d, %r9d
cmpl 0x24(%rdi,%rdx), %esi
sete %r9b
xorl $0x7, %r9d
addl %ecx, %r9d
xorl %esi, %esi
cmpl 0xec(%rdi,%rdx), %r8d
sete %sil
xorl $0x7, %esi
movl 0x1b0(%rdi,%rdx), %r8d
xorl %ecx, %ecx
cmpl 0x1b4(%rdi,%rdx), %r8d
sete %cl
xorl $0x7, %ecx
addl %esi, %ecx
addl %r9d, %ecx
addq $0x40, %rdx
cmpq %rdx, %rax
jne 0x3b752
jmp 0x3b7ae
movl $0x9, %ecx
movl 0x278(%rdi), %edx
xorl %eax, %eax
cmpl 0x27c(%rdi), %edx
sete %al
xorl $0x7, %eax
addl %ecx, %eax
retq
nop
| _ZN11TinyDecoder15get_num_tensorsEv:
movsxd rax, dword ptr [rdi+0Ch]
test rax, rax
jle short loc_3B7A9
shl rax, 6
mov ecx, 9
xor edx, edx
loc_3B752:
mov esi, [rdi+rdx+20h]
mov r8d, [rdi+rdx+0E8h]
xor r9d, r9d
cmp esi, [rdi+rdx+24h]
setz r9b
xor r9d, 7
add r9d, ecx
xor esi, esi
cmp r8d, [rdi+rdx+0ECh]
setz sil
xor esi, 7
mov r8d, [rdi+rdx+1B0h]
xor ecx, ecx
cmp r8d, [rdi+rdx+1B4h]
setz cl
xor ecx, 7
add ecx, esi
add ecx, r9d
add rdx, 40h ; '@'
cmp rax, rdx
jnz short loc_3B752
jmp short loc_3B7AE
loc_3B7A9:
mov ecx, 9
loc_3B7AE:
mov edx, [rdi+278h]
xor eax, eax
cmp edx, [rdi+27Ch]
setz al
xor eax, 7
add eax, ecx
retn
| long long TinyDecoder::get_num_tensors(TinyDecoder *this)
{
long long v1; // rax
long long v2; // rax
int v3; // ecx
long long v4; // rdx
v1 = *((int *)this + 3);
if ( v1 <= 0 )
{
v3 = 9;
}
else
{
v2 = v1 << 6;
v3 = 9;
v4 = 0LL;
do
{
v3 += ((*(_DWORD *)((char *)this + v4 + 32) == *(_DWORD *)((char *)this + v4 + 36)) ^ 7)
+ ((*(_DWORD *)((char *)this + v4 + 232) == *(_DWORD *)((char *)this + v4 + 236)) ^ 7)
+ ((*(_DWORD *)((char *)this + v4 + 432) == *(_DWORD *)((char *)this + v4 + 436)) ^ 7);
v4 += 64LL;
}
while ( v2 != v4 );
}
return v3 + ((*((_DWORD *)this + 158) == *((_DWORD *)this + 159)) ^ 7u);
}
| |||
23,167 | TinyDecoder::get_num_tensors() | 7CodeWizard[P]stablediffusion/tae.hpp | int get_num_tensors() {
int num_tensors = 9;
for (int i = 0; i < num_blocks; i++) {
num_tensors += input_blocks[i].get_num_tensors();
num_tensors += middle_blocks[i].get_num_tensors();
num_tensors += output_blocks[i].get_num_tensors();
}
num_tensors += final_block.get_num_tensors();
return num_tensors;
} | O3 | cpp | TinyDecoder::get_num_tensors():
movslq 0xc(%rdi), %rax
testq %rax, %rax
jle 0x3ab8f
shlq $0x6, %rax
movl $0x9, %ecx
xorl %edx, %edx
movl 0x20(%rdi,%rdx), %esi
movl 0xe8(%rdi,%rdx), %r8d
xorl %r9d, %r9d
cmpl 0x24(%rdi,%rdx), %esi
sete %r9b
xorl $0x7, %r9d
addl %ecx, %r9d
xorl %esi, %esi
cmpl 0xec(%rdi,%rdx), %r8d
sete %sil
xorl $0x7, %esi
movl 0x1b0(%rdi,%rdx), %r8d
xorl %ecx, %ecx
cmpl 0x1b4(%rdi,%rdx), %r8d
sete %cl
xorl $0x7, %ecx
addl %esi, %ecx
addl %r9d, %ecx
addq $0x40, %rdx
cmpq %rdx, %rax
jne 0x3ab38
jmp 0x3ab94
movl $0x9, %ecx
movl 0x278(%rdi), %edx
xorl %eax, %eax
cmpl 0x27c(%rdi), %edx
sete %al
xorl $0x7, %eax
addl %ecx, %eax
retq
nop
| _ZN11TinyDecoder15get_num_tensorsEv:
movsxd rax, dword ptr [rdi+0Ch]
test rax, rax
jle short loc_3AB8F
shl rax, 6
mov ecx, 9
xor edx, edx
loc_3AB38:
mov esi, [rdi+rdx+20h]
mov r8d, [rdi+rdx+0E8h]
xor r9d, r9d
cmp esi, [rdi+rdx+24h]
setz r9b
xor r9d, 7
add r9d, ecx
xor esi, esi
cmp r8d, [rdi+rdx+0ECh]
setz sil
xor esi, 7
mov r8d, [rdi+rdx+1B0h]
xor ecx, ecx
cmp r8d, [rdi+rdx+1B4h]
setz cl
xor ecx, 7
add ecx, esi
add ecx, r9d
add rdx, 40h ; '@'
cmp rax, rdx
jnz short loc_3AB38
jmp short loc_3AB94
loc_3AB8F:
mov ecx, 9
loc_3AB94:
mov edx, [rdi+278h]
xor eax, eax
cmp edx, [rdi+27Ch]
setz al
xor eax, 7
add eax, ecx
retn
| long long TinyDecoder::get_num_tensors(TinyDecoder *this)
{
long long v1; // rax
long long v2; // rax
int v3; // ecx
long long v4; // rdx
v1 = *((int *)this + 3);
if ( v1 <= 0 )
{
v3 = 9;
}
else
{
v2 = v1 << 6;
v3 = 9;
v4 = 0LL;
do
{
v3 += ((*(_DWORD *)((char *)this + v4 + 32) == *(_DWORD *)((char *)this + v4 + 36)) ^ 7)
+ ((*(_DWORD *)((char *)this + v4 + 232) == *(_DWORD *)((char *)this + v4 + 236)) ^ 7)
+ ((*(_DWORD *)((char *)this + v4 + 432) == *(_DWORD *)((char *)this + v4 + 436)) ^ 7);
v4 += 64LL;
}
while ( v2 != v4 );
}
return v3 + ((*((_DWORD *)this + 158) == *((_DWORD *)this + 159)) ^ 7u);
}
| |||
23,168 | translog_buffer_flush | eloqsql/storage/maria/ma_loghandler.c | static my_bool translog_buffer_flush(struct st_translog_buffer *buffer)
{
uint32 i, pg;
TRANSLOG_ADDRESS offset= buffer->offset;
TRANSLOG_FILE *file= buffer->file;
uint8 ver= buffer->ver;
uint skipped_data;
DBUG_ENTER("translog_buffer_flush");
DBUG_PRINT("enter",
("Buffer: #%u %p file: %d offset: " LSN_FMT " size: %lu",
(uint) buffer->buffer_no, buffer,
buffer->file->handler.file,
LSN_IN_PARTS(buffer->offset),
(ulong) buffer->size));
translog_buffer_lock_assert_owner(buffer);
if (buffer->file == NULL)
DBUG_RETURN(0);
translog_wait_for_writers(buffer);
if (buffer->file != file || buffer->offset != offset || buffer->ver != ver)
DBUG_RETURN(0); /* some the thread flushed the buffer already */
if (buffer->is_closing_buffer)
{
/* some other flush in progress */
translog_wait_for_closing(buffer);
if (buffer->file != file || buffer->offset != offset || buffer->ver != ver)
DBUG_RETURN(0); /* some the thread flushed the buffer already */
}
if (buffer->overlay && translog_prev_buffer_flush_wait(buffer))
DBUG_RETURN(0); /* some the thread flushed the buffer already */
/*
Send page by page in the pagecache what we are going to write on the
disk
*/
file= buffer->file;
skipped_data= buffer->skipped_data;
DBUG_ASSERT(skipped_data < TRANSLOG_PAGE_SIZE);
for (i= 0, pg= LSN_OFFSET(buffer->offset) / TRANSLOG_PAGE_SIZE;
i < buffer->size;
i+= TRANSLOG_PAGE_SIZE, pg++)
{
#ifndef DBUG_OFF
TRANSLOG_ADDRESS addr= (buffer->offset + i);
#endif
DBUG_PRINT("info", ("send log form %lu till %lu address: " LSN_FMT " "
"page #: %lu buffer size: %lu buffer: %p",
(ulong) i, (ulong) (i + TRANSLOG_PAGE_SIZE),
LSN_IN_PARTS(addr), (ulong) pg, (ulong) buffer->size,
buffer));
DBUG_ASSERT(log_descriptor.pagecache->block_size == TRANSLOG_PAGE_SIZE);
DBUG_ASSERT(i + TRANSLOG_PAGE_SIZE <= buffer->size);
if (translog_status != TRANSLOG_OK && translog_status != TRANSLOG_SHUTDOWN)
DBUG_RETURN(1);
if (pagecache_write_part(log_descriptor.pagecache,
&file->handler, pg, 3,
buffer->buffer + i,
PAGECACHE_PLAIN_PAGE,
PAGECACHE_LOCK_LEFT_UNLOCKED,
PAGECACHE_PIN_LEFT_UNPINNED,
PAGECACHE_WRITE_DONE, 0,
LSN_IMPOSSIBLE,
skipped_data,
TRANSLOG_PAGE_SIZE - skipped_data))
{
DBUG_PRINT("error",
("Can't write page " LSN_FMT " to pagecache, error: %d",
buffer->file->number,
(uint)(LSN_OFFSET(buffer->offset)+ i),
my_errno));
translog_stop_writing();
DBUG_RETURN(1);
}
skipped_data= 0;
}
file->is_sync= 0;
if (my_pwrite(file->handler.file, buffer->buffer + buffer->skipped_data,
buffer->size - buffer->skipped_data,
LSN_OFFSET(buffer->offset) + buffer->skipped_data,
log_write_flags))
{
DBUG_PRINT("error", ("Can't write buffer " LSN_FMT " size %lu "
"to the disk (%d)",
(uint) file->handler.file,
(uint) LSN_OFFSET(buffer->offset),
(ulong) buffer->size, errno));
translog_stop_writing();
DBUG_RETURN(1);
}
/*
Dropping the flag in such way can make false alarm: signalling than the
file in not sync when it is sync, but the situation is quite rare and
protections with mutexes give much more overhead to the whole engine
*/
file->is_sync= 0;
if (LSN_OFFSET(buffer->last_lsn) != 0) /* if buffer->last_lsn is set */
{
if (translog_prev_buffer_flush_wait(buffer))
DBUG_RETURN(0); /* some the thread flushed the buffer already */
translog_set_sent_to_disk(buffer);
}
else
translog_set_only_in_buffers(buffer->next_buffer_offset);
/* say to next buffer that we are finished */
{
struct st_translog_buffer *next_buffer=
log_descriptor.buffers + ((buffer->buffer_no + 1) % TRANSLOG_BUFFERS_NO);
if (likely(translog_status == TRANSLOG_OK)){
translog_buffer_lock(next_buffer);
next_buffer->prev_sent_to_disk= buffer->offset;
translog_buffer_unlock(next_buffer);
mysql_cond_broadcast(&next_buffer->prev_sent_to_disk_cond);
}
else
{
/*
It is shutdown =>
1) there is only one thread
2) mutexes of other buffers can be destroyed => we can't use them
*/
next_buffer->prev_sent_to_disk= buffer->offset;
}
}
/* Free buffer */
buffer->file= NULL;
buffer->overlay= 0;
buffer->ver++;
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);
mysql_cond_broadcast(&buffer->waiting_filling_buffer);
DBUG_RETURN(0);
} | O0 | c | translog_buffer_flush:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x100010(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x100038(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movb 0x1000d9(%rax), %al
movb %al, -0x29(%rbp)
jmp 0x326a9
movq -0x10(%rbp), %rax
cmpq $0x0, 0x100038(%rax)
jne 0x326c2
jmp 0x326b9
movb $0x0, -0x1(%rbp)
jmp 0x32ac0
movq -0x10(%rbp), %rdi
callq 0x351d0
movq -0x10(%rbp), %rax
movq 0x100038(%rax), %rax
cmpq -0x28(%rbp), %rax
jne 0x32700
movq -0x10(%rbp), %rax
movq 0x100010(%rax), %rax
cmpq -0x20(%rbp), %rax
jne 0x32700
movq -0x10(%rbp), %rax
movzbl 0x1000d9(%rax), %eax
movzbl -0x29(%rbp), %ecx
cmpl %ecx, %eax
je 0x3270b
jmp 0x32702
movb $0x0, -0x1(%rbp)
jmp 0x32ac0
movq -0x10(%rbp), %rax
cmpb $0x0, 0x1000d8(%rax)
je 0x32763
movq -0x10(%rbp), %rdi
callq 0x38f80
movq -0x10(%rbp), %rax
movq 0x100038(%rax), %rax
cmpq -0x28(%rbp), %rax
jne 0x32756
movq -0x10(%rbp), %rax
movq 0x100010(%rax), %rax
cmpq -0x20(%rbp), %rax
jne 0x32756
movq -0x10(%rbp), %rax
movzbl 0x1000d9(%rax), %eax
movzbl -0x29(%rbp), %ecx
cmpl %ecx, %eax
je 0x32761
jmp 0x32758
movb $0x0, -0x1(%rbp)
jmp 0x32ac0
jmp 0x32763
movq -0x10(%rbp), %rax
movsbl 0x100088(%rax), %eax
cmpl $0x0, %eax
je 0x3278f
movq -0x10(%rbp), %rdi
callq 0x2c260
movsbl %al, %eax
cmpl $0x0, %eax
je 0x3278f
jmp 0x32786
movb $0x0, -0x1(%rbp)
jmp 0x32ac0
movq -0x10(%rbp), %rax
movq 0x100038(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl 0x100034(%rax), %eax
movl %eax, -0x30(%rbp)
jmp 0x327ad
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rcx
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq 0x100010(%rcx), %rax
shrq $0xd, %rax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x100030(%rcx), %eax
jae 0x328b4
jmp 0x327e5
jmp 0x327e7
jmp 0x327e9
jmp 0x327eb
jmp 0x327ed
jmp 0x327ef
cmpl $0x1, 0x44c38a(%rip) # 0x47eb80
je 0x3280c
cmpl $0x3, 0x44c381(%rip) # 0x47eb80
je 0x3280c
jmp 0x32803
movb $0x1, -0x1(%rbp)
jmp 0x32ac0
movq 0x44d57d(%rip), %rdi # 0x47fd90
movq -0x28(%rbp), %rsi
addq $0x8, %rsi
movl -0x18(%rbp), %eax
movl %eax, %edx
movq -0x10(%rbp), %r8
movl -0x14(%rbp), %eax
addq %rax, %r8
movl -0x30(%rbp), %r10d
movl $0x2000, %eax # imm = 0x2000
subl -0x30(%rbp), %eax
movl $0x3, %ecx
movl $0x1, %r9d
xorl %r11d, %r11d
xorl %r11d, %r11d
movl $0x0, (%rsp)
movl $0x1, 0x8(%rsp)
movl $0x1, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movl %r10d, 0x28(%rsp)
movl %eax, 0x30(%rsp)
callq 0x3cb70
cmpb $0x0, %al
je 0x32894
jmp 0x32884
jmp 0x32886
callq 0x2bab0
movb $0x1, -0x1(%rbp)
jmp 0x32ac0
movl $0x0, -0x30(%rbp)
movl -0x14(%rbp), %eax
addl $0x2000, %eax # imm = 0x2000
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x327d0
movq -0x28(%rbp), %rax
movb $0x0, 0x51(%rax)
movq -0x28(%rbp), %rax
movl 0x18(%rax), %edi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x100034(%rax), %eax
addq %rax, %rsi
movq -0x10(%rbp), %rax
movl 0x100030(%rax), %eax
movq -0x10(%rbp), %rcx
subl 0x100034(%rcx), %eax
movl %eax, %eax
movl %eax, %edx
movq -0x10(%rbp), %rax
movabsq $0xffffffff, %rcx # imm = 0xFFFFFFFF
andq 0x100010(%rax), %rcx
movq -0x10(%rbp), %rax
movl 0x100034(%rax), %eax
addq %rax, %rcx
movl $0x34, %r8d
callq 0xfa980
cmpq $0x0, %rax
je 0x32931
jmp 0x32921
jmp 0x32923
callq 0x2bab0
movb $0x1, -0x1(%rbp)
jmp 0x32ac0
movq -0x28(%rbp), %rax
movb $0x0, 0x51(%rax)
movq -0x10(%rbp), %rcx
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq 0x100000(%rcx), %rax
cmpq $0x0, %rax
je 0x32977
movq -0x10(%rbp), %rdi
callq 0x2c260
cmpb $0x0, %al
je 0x3296c
jmp 0x32963
movb $0x0, -0x1(%rbp)
jmp 0x32ac0
movq -0x10(%rbp), %rdi
callq 0x38fe0
jmp 0x32987
movq -0x10(%rbp), %rax
movq 0x100018(%rax), %rdi
callq 0x39080
movq -0x10(%rbp), %rax
movl 0x10008c(%rax), %eax
addl $0x1, %eax
andl $0x7, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x44d3ee(%rip), %rax # 0x47fd90
addq $0x2f8, %rax # imm = 0x2F8
imulq $0x100120, %rcx, %rcx # imm = 0x100120
addq %rcx, %rax
movq %rax, -0x38(%rbp)
cmpl $0x1, 0x44c1c3(%rip) # 0x47eb80
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x32a12
movq -0x38(%rbp), %rdi
callq 0x2c440
movq -0x10(%rbp), %rax
movq 0x100010(%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x1000e0(%rax)
movq -0x38(%rbp), %rdi
callq 0x2c480
movq -0x38(%rbp), %rdi
addq $0x1000e8, %rdi # imm = 0x1000E8
callq 0x32270
jmp 0x32a28
movq -0x10(%rbp), %rax
movq 0x100010(%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x1000e0(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x100038(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x100088(%rax)
movq -0x10(%rbp), %rax
movb 0x1000d9(%rax), %cl
addb $0x1, %cl
movb %cl, 0x1000d9(%rax)
leaq 0x44d334(%rip), %rdi # 0x47fd90
addq $0x800c00, %rdi # imm = 0x800C00
leaq 0x124940(%rip), %rsi # 0x1573aa
movl $0xabf, %edx # imm = 0xABF
callq 0x2bff0
movq -0x10(%rbp), %rax
movl 0x10008c(%rax), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, %ecx
xorl $-0x1, %ecx
movzbl 0xc4def7(%rip), %eax # 0xc80988
andl %ecx, %eax
movb %al, 0xc4deef(%rip) # 0xc80988
leaq 0x44d2f0(%rip), %rdi # 0x47fd90
addq $0x800c00, %rdi # imm = 0x800C00
callq 0x2c060
movq -0x10(%rbp), %rdi
addq $0x100040, %rdi # imm = 0x100040
callq 0x32270
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
| translog_buffer_flush:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax+100010h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rax, qword ptr ds:loc_100038[rax]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov al, [rax+1000D9h]
mov [rbp+var_29], al
jmp short $+2
loc_326A9:
mov rax, [rbp+var_10]
cmp qword ptr ds:loc_100038[rax], 0
jnz short loc_326C2
jmp short $+2
loc_326B9:
mov [rbp+var_1], 0
jmp loc_32AC0
loc_326C2:
mov rdi, [rbp+var_10]
call translog_wait_for_writers
mov rax, [rbp+var_10]
mov rax, qword ptr ds:loc_100038[rax]
cmp rax, [rbp+var_28]
jnz short loc_32700
mov rax, [rbp+var_10]
mov rax, [rax+100010h]
cmp rax, [rbp+var_20]
jnz short loc_32700
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+1000D9h]
movzx ecx, [rbp+var_29]
cmp eax, ecx
jz short loc_3270B
loc_32700:
jmp short $+2
loc_32702:
mov [rbp+var_1], 0
jmp loc_32AC0
loc_3270B:
mov rax, [rbp+var_10]
cmp byte ptr [rax+1000D8h], 0
jz short loc_32763
mov rdi, [rbp+var_10]
call translog_wait_for_closing
mov rax, [rbp+var_10]
mov rax, qword ptr ds:loc_100038[rax]
cmp rax, [rbp+var_28]
jnz short loc_32756
mov rax, [rbp+var_10]
mov rax, [rax+100010h]
cmp rax, [rbp+var_20]
jnz short loc_32756
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+1000D9h]
movzx ecx, [rbp+var_29]
cmp eax, ecx
jz short loc_32761
loc_32756:
jmp short $+2
loc_32758:
mov [rbp+var_1], 0
jmp loc_32AC0
loc_32761:
jmp short $+2
loc_32763:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax+100088h]
cmp eax, 0
jz short loc_3278F
mov rdi, [rbp+var_10]
call translog_prev_buffer_flush_wait
movsx eax, al
cmp eax, 0
jz short loc_3278F
jmp short $+2
loc_32786:
mov [rbp+var_1], 0
jmp loc_32AC0
loc_3278F:
mov rax, [rbp+var_10]
mov rax, qword ptr ds:loc_100038[rax]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov eax, dword ptr ds:loc_100034[rax]
mov [rbp+var_30], eax
jmp short $+2
loc_327AD:
mov [rbp+var_14], 0
mov rcx, [rbp+var_10]
mov rax, 0FFFFFFFFh
and rax, [rcx+100010h]
shr rax, 0Dh
mov [rbp+var_18], eax
loc_327D0:
mov eax, [rbp+var_14]
mov rcx, [rbp+var_10]
cmp eax, dword ptr ds:my_rw_destroy[rcx]
jnb loc_328B4
jmp short $+2
loc_327E5:
jmp short $+2
loc_327E7:
jmp short $+2
loc_327E9:
jmp short $+2
loc_327EB:
jmp short $+2
loc_327ED:
jmp short $+2
loc_327EF:
cmp cs:translog_status, 1
jz short loc_3280C
cmp cs:translog_status, 3
jz short loc_3280C
jmp short $+2
loc_32803:
mov [rbp+var_1], 1
jmp loc_32AC0
loc_3280C:
mov rdi, cs:log_descriptor
mov rsi, [rbp+var_28]
add rsi, 8
mov eax, [rbp+var_18]
mov edx, eax
mov r8, [rbp+var_10]
mov eax, [rbp+var_14]
add r8, rax
mov r10d, [rbp+var_30]
mov eax, 2000h
sub eax, [rbp+var_30]
mov ecx, 3
mov r9d, 1
xor r11d, r11d
xor r11d, r11d
mov [rsp+70h+var_70], 0
mov [rsp+70h+var_68], 1
mov [rsp+70h+var_60], 1
mov [rsp+70h+var_58], 0
mov [rsp+70h+var_50], 0
mov [rsp+70h+var_48], r10d
mov [rsp+70h+var_40], eax
call pagecache_write_part
cmp al, 0
jz short loc_32894
jmp short $+2
loc_32884:
jmp short $+2
loc_32886:
call translog_stop_writing
mov [rbp+var_1], 1
jmp loc_32AC0
loc_32894:
mov [rbp+var_30], 0
mov eax, [rbp+var_14]
add eax, 2000h
mov [rbp+var_14], eax
mov eax, [rbp+var_18]
add eax, 1
mov [rbp+var_18], eax
jmp loc_327D0
loc_328B4:
mov rax, [rbp+var_28]
mov byte ptr [rax+51h], 0
mov rax, [rbp+var_28]
mov edi, [rax+18h]
mov rsi, [rbp+var_10]
mov rax, [rbp+var_10]
mov eax, dword ptr ds:loc_100034[rax]
add rsi, rax
mov rax, [rbp+var_10]
mov eax, dword ptr ds:my_rw_destroy[rax]
mov rcx, [rbp+var_10]
sub eax, dword ptr ds:loc_100034[rcx]
mov eax, eax
mov edx, eax
mov rax, [rbp+var_10]
mov rcx, 0FFFFFFFFh
and rcx, [rax+100010h]
mov rax, [rbp+var_10]
mov eax, dword ptr ds:loc_100034[rax]
add rcx, rax
mov r8d, 34h ; '4'
call my_pwrite
cmp rax, 0
jz short loc_32931
jmp short $+2
loc_32921:
jmp short $+2
loc_32923:
call translog_stop_writing
mov [rbp+var_1], 1
jmp loc_32AC0
loc_32931:
mov rax, [rbp+var_28]
mov byte ptr [rax+51h], 0
mov rcx, [rbp+var_10]
mov rax, 0FFFFFFFFh
and rax, qword ptr ds:loc_100000[rcx]
cmp rax, 0
jz short loc_32977
mov rdi, [rbp+var_10]
call translog_prev_buffer_flush_wait
cmp al, 0
jz short loc_3296C
jmp short $+2
loc_32963:
mov [rbp+var_1], 0
jmp loc_32AC0
loc_3296C:
mov rdi, [rbp+var_10]
call translog_set_sent_to_disk
jmp short loc_32987
loc_32977:
mov rax, [rbp+var_10]
mov rdi, [rax+100018h]
call translog_set_only_in_buffers
loc_32987:
mov rax, [rbp+var_10]
mov eax, [rax+10008Ch]
add eax, 1
and eax, 7
mov eax, eax
mov ecx, eax
lea rax, log_descriptor
add rax, 2F8h
imul rcx, 100120h
add rax, rcx
mov [rbp+var_38], rax
cmp cs:translog_status, 1
setz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_32A12
mov rdi, [rbp+var_38]
call translog_buffer_lock
mov rax, [rbp+var_10]
mov rcx, [rax+100010h]
mov rax, [rbp+var_38]
mov qword ptr ds:loc_1000E0[rax], rcx
mov rdi, [rbp+var_38]
call translog_buffer_unlock
mov rdi, [rbp+var_38]
add rdi, 1000E8h
call inline_mysql_cond_broadcast
jmp short loc_32A28
loc_32A12:
mov rax, [rbp+var_10]
mov rcx, [rax+100010h]
mov rax, [rbp+var_38]
mov qword ptr ds:loc_1000E0[rax], rcx
loc_32A28:
mov rax, [rbp+var_10]
mov qword ptr ds:loc_100038[rax], 0
mov rax, [rbp+var_10]
mov byte ptr [rax+100088h], 0
mov rax, [rbp+var_10]
mov cl, [rax+1000D9h]
add cl, 1
mov [rax+1000D9h], cl
lea rdi, log_descriptor
add rdi, 800C00h
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0ABFh
call inline_mysql_mutex_lock
mov rax, [rbp+var_10]
mov ecx, [rax+10008Ch]
mov eax, 1
shl eax, cl
mov ecx, eax
xor ecx, 0FFFFFFFFh
movzx eax, cs:byte_C80988
and eax, ecx
mov cs:byte_C80988, al
lea rdi, log_descriptor
add rdi, 800C00h
call inline_mysql_mutex_unlock
mov rdi, [rbp+var_10]
add rdi, 100040h
call inline_mysql_cond_broadcast
mov [rbp+var_1], 0
loc_32AC0:
mov al, [rbp+var_1]
add rsp, 70h
pop rbp
retn
| char translog_buffer_flush(long long a1)
{
long long *v2; // [rsp+38h] [rbp-38h]
int v3; // [rsp+40h] [rbp-30h]
unsigned __int8 v4; // [rsp+47h] [rbp-29h]
long long v5; // [rsp+48h] [rbp-28h]
long long v6; // [rsp+48h] [rbp-28h]
long long v7; // [rsp+50h] [rbp-20h]
unsigned int v8; // [rsp+58h] [rbp-18h]
unsigned int v9; // [rsp+5Ch] [rbp-14h]
v7 = *(_QWORD *)(a1 + 1048592);
v5 = *(_QWORD *)((char *)&loc_100038 + a1);
v4 = *(_BYTE *)(a1 + 1048793);
if ( !v5 )
return 0;
translog_wait_for_writers(a1);
if ( *(_QWORD *)((char *)&loc_100038 + a1) != v5
|| *(_QWORD *)(a1 + 1048592) != v7
|| *(unsigned __int8 *)(a1 + 1048793) != v4 )
{
return 0;
}
if ( *(_BYTE *)(a1 + 1048792) )
{
translog_wait_for_closing(a1);
if ( *(_QWORD *)((char *)&loc_100038 + a1) != v5
|| *(_QWORD *)(a1 + 1048592) != v7
|| *(unsigned __int8 *)(a1 + 1048793) != v4 )
{
return 0;
}
}
if ( *(_BYTE *)(a1 + 1048712) && translog_prev_buffer_flush_wait(a1) )
return 0;
v6 = *(_QWORD *)((char *)&loc_100038 + a1);
v3 = *(_DWORD *)((char *)&loc_100034 + a1);
v9 = 0;
v8 = (unsigned int)*(_QWORD *)(a1 + 1048592) >> 13;
while ( v9 < *(_DWORD *)((char *)my_rw_destroy + a1) )
{
if ( translog_status != 1 && translog_status != 3 )
return 1;
if ( (unsigned __int8)pagecache_write_part(
log_descriptor[0],
(int)v6 + 8,
v8,
3,
v9 + (unsigned int)a1,
1,
0,
1,
1,
0LL,
0LL,
v3,
0x2000 - v3) )
goto LABEL_21;
v3 = 0;
v9 += 0x2000;
++v8;
}
*(_BYTE *)(v6 + 81) = 0;
if ( my_pwrite(
*(unsigned int *)(v6 + 24),
*(unsigned int *)((char *)&loc_100034 + a1) + a1,
(unsigned int)(*(_DWORD *)((char *)my_rw_destroy + a1) - *(_DWORD *)((char *)&loc_100034 + a1)),
*(unsigned int *)((char *)&loc_100034 + a1) + (unsigned long long)(unsigned int)*(_QWORD *)(a1 + 1048592),
52LL) )
{
LABEL_21:
translog_stop_writing();
return 1;
}
*(_BYTE *)(v6 + 81) = 0;
if ( (unsigned int)*(_QWORD *)((char *)&loc_100000 + a1) )
{
if ( translog_prev_buffer_flush_wait(a1) )
return 0;
translog_set_sent_to_disk(a1);
}
else
{
translog_set_only_in_buffers(*(_QWORD *)(a1 + 1048600));
}
v2 = &log_descriptor[131108 * (((unsigned __int8)*(_DWORD *)(a1 + 1048716) + 1) & 7) + 95];
if ( translog_status == 1 )
{
translog_buffer_lock((long long)v2);
*(_QWORD *)((char *)&loc_1000E0 + (_QWORD)v2) = *(_QWORD *)(a1 + 1048592);
translog_buffer_unlock((long long)v2);
inline_mysql_cond_broadcast((long long)(v2 + 131101));
}
else
{
*(_QWORD *)((char *)&loc_1000E0 + (_QWORD)v2) = *(_QWORD *)(a1 + 1048592);
}
*(_QWORD *)((char *)&loc_100038 + a1) = 0LL;
*(_BYTE *)(a1 + 1048712) = 0;
++*(_BYTE *)(a1 + 1048793);
inline_mysql_mutex_lock(
(long long)&log_descriptor[1048960],
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0xABFu);
byte_C80988 &= ~(1 << *(_DWORD *)(a1 + 1048716));
inline_mysql_mutex_unlock((long long)&log_descriptor[1048960]);
inline_mysql_cond_broadcast(a1 + 1048640);
return 0;
}
| translog_buffer_flush:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x100010]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x100038]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV AL,byte ptr [RAX + 0x1000d9]
MOV byte ptr [RBP + -0x29],AL
JMP 0x001326a9
LAB_001326a9:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x100038],0x0
JNZ 0x001326c2
JMP 0x001326b9
LAB_001326b9:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00132ac0
LAB_001326c2:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001351d0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x100038]
CMP RAX,qword ptr [RBP + -0x28]
JNZ 0x00132700
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x100010]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x00132700
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1000d9]
MOVZX ECX,byte ptr [RBP + -0x29]
CMP EAX,ECX
JZ 0x0013270b
LAB_00132700:
JMP 0x00132702
LAB_00132702:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00132ac0
LAB_0013270b:
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX + 0x1000d8],0x0
JZ 0x00132763
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00138f80
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x100038]
CMP RAX,qword ptr [RBP + -0x28]
JNZ 0x00132756
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x100010]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x00132756
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x1000d9]
MOVZX ECX,byte ptr [RBP + -0x29]
CMP EAX,ECX
JZ 0x00132761
LAB_00132756:
JMP 0x00132758
LAB_00132758:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00132ac0
LAB_00132761:
JMP 0x00132763
LAB_00132763:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX + 0x100088]
CMP EAX,0x0
JZ 0x0013278f
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0012c260
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x0013278f
JMP 0x00132786
LAB_00132786:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00132ac0
LAB_0013278f:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x100038]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x100034]
MOV dword ptr [RBP + -0x30],EAX
JMP 0x001327ad
LAB_001327ad:
MOV dword ptr [RBP + -0x14],0x0
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,0xffffffff
AND RAX,qword ptr [RCX + 0x100010]
SHR RAX,0xd
MOV dword ptr [RBP + -0x18],EAX
LAB_001327d0:
MOV EAX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0x100030]
JNC 0x001328b4
JMP 0x001327e5
LAB_001327e5:
JMP 0x001327e7
LAB_001327e7:
JMP 0x001327e9
LAB_001327e9:
JMP 0x001327eb
LAB_001327eb:
JMP 0x001327ed
LAB_001327ed:
JMP 0x001327ef
LAB_001327ef:
CMP dword ptr [0x0057eb80],0x1
JZ 0x0013280c
CMP dword ptr [0x0057eb80],0x3
JZ 0x0013280c
JMP 0x00132803
LAB_00132803:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00132ac0
LAB_0013280c:
MOV RDI,qword ptr [0x0057fd90]
MOV RSI,qword ptr [RBP + -0x28]
ADD RSI,0x8
MOV EAX,dword ptr [RBP + -0x18]
MOV EDX,EAX
MOV R8,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x14]
ADD R8,RAX
MOV R10D,dword ptr [RBP + -0x30]
MOV EAX,0x2000
SUB EAX,dword ptr [RBP + -0x30]
MOV ECX,0x3
MOV R9D,0x1
XOR R11D,R11D
XOR R11D,R11D
MOV dword ptr [RSP],0x0
MOV dword ptr [RSP + 0x8],0x1
MOV dword ptr [RSP + 0x10],0x1
MOV qword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x0
MOV dword ptr [RSP + 0x28],R10D
MOV dword ptr [RSP + 0x30],EAX
CALL 0x0013cb70
CMP AL,0x0
JZ 0x00132894
JMP 0x00132884
LAB_00132884:
JMP 0x00132886
LAB_00132886:
CALL 0x0012bab0
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00132ac0
LAB_00132894:
MOV dword ptr [RBP + -0x30],0x0
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x2000
MOV dword ptr [RBP + -0x14],EAX
MOV EAX,dword ptr [RBP + -0x18]
ADD EAX,0x1
MOV dword ptr [RBP + -0x18],EAX
JMP 0x001327d0
LAB_001328b4:
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x51],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV EDI,dword ptr [RAX + 0x18]
MOV RSI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x100034]
ADD RSI,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x100030]
MOV RCX,qword ptr [RBP + -0x10]
SUB EAX,dword ptr [RCX + 0x100034]
MOV EAX,EAX
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,0xffffffff
AND RCX,qword ptr [RAX + 0x100010]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x100034]
ADD RCX,RAX
MOV R8D,0x34
CALL 0x001fa980
CMP RAX,0x0
JZ 0x00132931
JMP 0x00132921
LAB_00132921:
JMP 0x00132923
LAB_00132923:
CALL 0x0012bab0
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00132ac0
LAB_00132931:
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x51],0x0
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,0xffffffff
AND RAX,qword ptr [RCX + 0x100000]
CMP RAX,0x0
JZ 0x00132977
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0012c260
CMP AL,0x0
JZ 0x0013296c
JMP 0x00132963
LAB_00132963:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00132ac0
LAB_0013296c:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00138fe0
JMP 0x00132987
LAB_00132977:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x100018]
CALL 0x00139080
LAB_00132987:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x10008c]
ADD EAX,0x1
AND EAX,0x7
MOV EAX,EAX
MOV ECX,EAX
LEA RAX,[0x57fd90]
ADD RAX,0x2f8
IMUL RCX,RCX,0x100120
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
CMP dword ptr [0x0057eb80],0x1
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00132a12
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x0012c440
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x100010]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x1000e0],RCX
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x0012c480
MOV RDI,qword ptr [RBP + -0x38]
ADD RDI,0x1000e8
CALL 0x00132270
JMP 0x00132a28
LAB_00132a12:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x100010]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x1000e0],RCX
LAB_00132a28:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x100038],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x100088],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV CL,byte ptr [RAX + 0x1000d9]
ADD CL,0x1
MOV byte ptr [RAX + 0x1000d9],CL
LEA RDI,[0x57fd90]
ADD RDI,0x800c00
LEA RSI,[0x2573aa]
MOV EDX,0xabf
CALL 0x0012bff0
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x10008c]
MOV EAX,0x1
SHL EAX,CL
MOV ECX,EAX
XOR ECX,0xffffffff
MOVZX EAX,byte ptr [0x00d80988]
AND EAX,ECX
MOV byte ptr [0x00d80988],AL
LEA RDI,[0x57fd90]
ADD RDI,0x800c00
CALL 0x0012c060
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x100040
CALL 0x00132270
MOV byte ptr [RBP + -0x1],0x0
LAB_00132ac0:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x70
POP RBP
RET
|
int1 translog_buffer_flush(long param_1)
{
char cVar1;
long lVar2;
long lVar3;
int local_38;
int local_20;
uint local_1c;
int1 local_9;
lVar3 = *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7);
lVar2 = *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f);
cVar1 = *(char *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_memsz + param_1 + 1);
if (*(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f) == 0) {
local_9 = 0;
}
else {
translog_wait_for_writers(param_1);
if (((*(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f) == lVar2) &&
(*(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7) == lVar3)) &&
(*(char *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_memsz + param_1 + 1) == cVar1)) {
if ((*(char *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_memsz + param_1) == '\0') ||
(((translog_wait_for_closing(param_1),
*(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f) == lVar2 &&
(*(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7) == lVar3)) &&
(*(char *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_memsz + param_1 + 1) == cVar1)))) {
if ((*(char *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_vaddr + param_1) == '\0') ||
(cVar1 = translog_prev_buffer_flush_wait(param_1), cVar1 == '\0')) {
lVar3 = *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f);
local_38 = *(int *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2b);
local_1c = 0;
local_20 = (int)((*(ulong *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7) & 0xffffffff)
>> 0xd);
for (; local_1c < *(uint *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x27);
local_1c = local_1c + 0x2000) {
if ((translog_status != 1) && (translog_status != 3)) {
return 1;
}
cVar1 = pagecache_write_part
(log_descriptor,lVar3 + 8,local_20,3,param_1 + (ulong)local_1c,1,0,1,1
,0,0,local_38,0x2000 - local_38);
if (cVar1 != '\0') {
translog_stop_writing();
return 1;
}
local_38 = 0;
local_20 = local_20 + 1;
}
*(int1 *)(lVar3 + 0x51) = 0;
lVar2 = my_pwrite(*(int4 *)(lVar3 + 0x18),
param_1 + (ulong)*(uint *)(Elf64_Ehdr_00100000.e_ident_pad +
param_1 + 0x2b),
*(int *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x27) -
*(int *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2b),
(*(ulong *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7) & 0xffffffff)
+ (ulong)*(uint *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2b),
0x34);
if (lVar2 == 0) {
*(int1 *)(lVar3 + 0x51) = 0;
if ((*(ulong *)(param_1 + 0x100000) & 0xffffffff) == 0) {
translog_set_only_in_buffers
(*(int8 *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0xf));
}
else {
cVar1 = translog_prev_buffer_flush_wait(param_1);
if (cVar1 != '\0') {
return 0;
}
translog_set_sent_to_disk(param_1);
}
lVar3 = (ulong)(*(int *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_vaddr + param_1 + 4) + 1U
& 7) * 0x100120;
if (translog_status == 1) {
translog_buffer_lock(&DAT_00580088 + lVar3);
*(int8 *)(&DAT_00680168 + lVar3) =
*(int8 *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7);
translog_buffer_unlock(&DAT_00580088 + lVar3);
inline_mysql_cond_broadcast(lVar3 + 0x680170);
}
else {
*(int8 *)(&DAT_00680168 + lVar3) =
*(int8 *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7);
}
*(int8 *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f) = 0;
*(int1 *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_vaddr + param_1) = 0;
*(char *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_memsz + param_1 + 1) =
*(char *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_memsz + param_1 + 1) + '\x01';
inline_mysql_mutex_lock
(&DAT_00d80990,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0xabf);
DAT_00d80988 = DAT_00d80988 &
((byte)(1 << ((byte)*(int4 *)
((long)&Elf64_Phdr_ARRAY_00100040[1].p_vaddr +
param_1 + 4) & 0x1f)) ^ 0xff);
inline_mysql_mutex_unlock(&DAT_00d80990);
inline_mysql_cond_broadcast((long)&Elf64_Phdr_ARRAY_00100040[0].p_type + param_1);
local_9 = 0;
}
else {
translog_stop_writing();
local_9 = 1;
}
}
else {
local_9 = 0;
}
}
else {
local_9 = 0;
}
}
else {
local_9 = 0;
}
}
return local_9;
}
| |
23,169 | from_hex | bluesky950520[P]quickjs/cutils.h | static inline int from_hex(int c)
{
if (c >= '0' && c <= '9')
return c - '0';
else if (c >= 'A' && c <= 'F')
return c - 'A' + 10;
else if (c >= 'a' && c <= 'f')
return c - 'a' + 10;
else
return -1;
} | O2 | c | from_hex:
leal -0x30(%rdi), %eax
cmpl $0xa, %eax
jb 0x7bb8c
leal -0x41(%rdi), %eax
cmpl $0x5, %eax
ja 0x7bb7d
addl $-0x37, %edi
movl %edi, %eax
retq
leal -0x61(%rdi), %eax
addl $-0x57, %edi
cmpl $0x6, %eax
pushq $-0x1
popq %rax
cmovbl %edi, %eax
retq
| from_hex_0:
lea eax, [rdi-30h]
cmp eax, 0Ah
jb short locret_7BB8C
lea eax, [rdi-41h]
cmp eax, 5
ja short loc_7BB7D
add edi, 0FFFFFFC9h
mov eax, edi
retn
loc_7BB7D:
lea eax, [rdi-61h]
add edi, 0FFFFFFA9h
cmp eax, 6
push 0FFFFFFFFFFFFFFFFh
pop rax
cmovb eax, edi
locret_7BB8C:
retn
| long long from_hex_0(int a1)
{
long long result; // rax
unsigned int v2; // eax
unsigned int v3; // edi
bool v4; // cf
result = (unsigned int)(a1 - 48);
if ( (unsigned int)result >= 0xA )
{
if ( (unsigned int)(a1 - 65) > 5 )
{
v2 = a1 - 97;
v3 = a1 - 87;
v4 = v2 < 6;
result = -1LL;
if ( v4 )
return v3;
}
else
{
return (unsigned int)(a1 - 55);
}
}
return result;
}
| from_hex:
LEA EAX,[RDI + -0x30]
CMP EAX,0xa
JC 0x0017bb8c
LEA EAX,[RDI + -0x41]
CMP EAX,0x5
JA 0x0017bb7d
ADD EDI,-0x37
MOV EAX,EDI
RET
LAB_0017bb7d:
LEA EAX,[RDI + -0x61]
ADD EDI,-0x57
CMP EAX,0x6
PUSH -0x1
POP RAX
CMOVC EAX,EDI
LAB_0017bb8c:
RET
|
uint from_hex(int param_1)
{
uint uVar1;
uVar1 = param_1 - 0x30U;
if (9 < param_1 - 0x30U) {
if (param_1 - 0x41U < 6) {
return param_1 - 0x37;
}
uVar1 = 0xffffffff;
if (param_1 - 0x61U < 6) {
uVar1 = param_1 - 0x57;
}
}
return uVar1;
}
| |
23,170 | fmt::v10::appender fmt::v10::detail::write_padded<(fmt::v10::align::type)1, fmt::v10::appender, char, fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender>(fmt::v10::appender, fmt::v10::basic_string_view<char>, fmt::v10::format_specs<char> const&)::'lambda'(fmt::v10::appender)>(fmt::v10::appender, fmt::v10::format_specs<char> const&, unsigned long, unsigned long, fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender>(fmt::v10::appender, fmt::v10::basic_string_view<char>, fmt::v10::format_specs<char> const&)::'lambda'(fmt::v10::appender)&&) | aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h | FMT_CONSTEXPR auto write_padded(OutputIt out, const format_specs<Char>& specs,
size_t size, size_t width, F&& f) -> OutputIt {
static_assert(align == align::left || align == align::right, "");
unsigned spec_width = to_unsigned(specs.width);
size_t padding = spec_width > width ? spec_width - width : 0;
// Shifts are encoded as string literals because static constexpr is not
// supported in constexpr functions.
auto* shifts = align == align::left ? "\x1f\x1f\x00\x01" : "\x00\x1f\x00\x01";
size_t left_padding = padding >> shifts[specs.align];
size_t right_padding = padding - left_padding;
auto it = reserve(out, size + padding * specs.fill.size());
if (left_padding != 0) it = fill(it, left_padding, specs.fill);
it = f(it);
if (right_padding != 0) it = fill(it, right_padding, specs.fill);
return base_iterator(out, it);
} | O0 | c | fmt::v10::appender fmt::v10::detail::write_padded<(fmt::v10::align::type)1, fmt::v10::appender, char, fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender>(fmt::v10::appender, fmt::v10::basic_string_view<char>, fmt::v10::format_specs<char> const&)::'lambda'(fmt::v10::appender)>(fmt::v10::appender, fmt::v10::format_specs<char> const&, unsigned long, unsigned long, fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender>(fmt::v10::appender, fmt::v10::basic_string_view<char>, fmt::v10::format_specs<char> const&)::'lambda'(fmt::v10::appender)&&):
subq $0xb8, %rsp
movq %rdi, 0xa8(%rsp)
movq %rsi, 0xa0(%rsp)
movq %rdx, 0x98(%rsp)
movq %rcx, 0x90(%rsp)
movq %r8, 0x88(%rsp)
movq 0xa0(%rsp), %rax
movl (%rax), %edi
callq 0xa6e00
movl %eax, 0x84(%rsp)
movl 0x84(%rsp), %eax
cmpq 0x90(%rsp), %rax
jbe 0xc746c
movl 0x84(%rsp), %eax
subq 0x90(%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0xc7475
xorl %eax, %eax
movq %rax, 0x10(%rsp)
jmp 0xc7475
movq 0x10(%rsp), %rax
movq %rax, 0x78(%rsp)
leaq 0xe5bf4(%rip), %rax # 0x1ad07a
movq %rax, 0x70(%rsp)
movq 0x78(%rsp), %rax
movq 0x70(%rsp), %rcx
movq 0xa0(%rsp), %rdx
movw 0x9(%rdx), %dx
andw $0xf, %dx
movzbl %dl, %edx
movsbl (%rcx,%rdx), %ecx
movl %ecx, %ecx
shrq %cl, %rax
movq %rax, 0x68(%rsp)
movq 0x78(%rsp), %rax
subq 0x68(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x98(%rsp), %rax
movq %rax, (%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0xa0(%rsp), %rdi
addq $0xb, %rdi
callq 0xa75d0
movq (%rsp), %rsi
movq %rax, %rcx
movq 0x8(%rsp), %rax
imulq %rcx, %rax
addq %rax, %rsi
leaq 0xa8(%rsp), %rdi
callq 0xa20e0
movq (%rax), %rax
movq %rax, 0x58(%rsp)
cmpq $0x0, 0x68(%rsp)
je 0xc7550
movq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x68(%rsp), %rsi
movq 0xa0(%rsp), %rdx
addq $0xb, %rdx
movq 0x48(%rsp), %rdi
callq 0xa75e0
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x88(%rsp), %rdi
movq 0x58(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rsi
callq 0xc8be0
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x58(%rsp)
cmpq $0x0, 0x60(%rsp)
je 0xc75b7
movq 0x58(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x60(%rsp), %rsi
movq 0xa0(%rsp), %rdx
addq $0xb, %rdx
movq 0x28(%rsp), %rdi
callq 0xa75e0
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0xa23e0
movq %rax, 0xb0(%rsp)
movq 0xb0(%rsp), %rax
addq $0xb8, %rsp
retq
nopw %cs:(%rax,%rax)
nop
| _ZN3fmt3v106detail12write_paddedILNS0_5align4typeE1ENS0_8appenderEcZNS1_5writeIcS5_EET0_S7_NS0_17basic_string_viewIT_EERKNS0_12format_specsIS9_EEEUlS5_E_EES7_S7_RKNSB_IT1_EEmmOT2_:
sub rsp, 0B8h
mov [rsp+0B8h+var_10], rdi
mov [rsp+0B8h+var_18], rsi
mov [rsp+0B8h+var_20], rdx
mov [rsp+0B8h+var_28], rcx
mov [rsp+0B8h+var_30], r8
mov rax, [rsp+0B8h+var_18]
mov edi, [rax]
call _ZN3fmt3v106detail11to_unsignedIiEENSt13make_unsignedIT_E4typeES4_; fmt::v10::detail::to_unsigned<int>(int)
mov [rsp+0B8h+var_34], eax
mov eax, [rsp+0B8h+var_34]
cmp rax, [rsp+0B8h+var_28]
jbe short loc_C746C
mov eax, [rsp+0B8h+var_34]
sub rax, [rsp+0B8h+var_28]
mov [rsp+0B8h+var_A8], rax
jmp short loc_C7475
loc_C746C:
xor eax, eax
mov [rsp+0B8h+var_A8], rax
jmp short $+2
loc_C7475:
mov rax, [rsp+0B8h+var_A8]
mov [rsp+0B8h+var_40], rax
lea rax, byte_1AD07A
mov [rsp+0B8h+var_48], rax
mov rax, [rsp+0B8h+var_40]
mov rcx, [rsp+0B8h+var_48]
mov rdx, [rsp+0B8h+var_18]
mov dx, [rdx+9]
and dx, 0Fh
movzx edx, dl
movsx ecx, byte ptr [rcx+rdx]
mov ecx, ecx
shr rax, cl
mov [rsp+0B8h+var_50], rax
mov rax, [rsp+0B8h+var_40]
sub rax, [rsp+0B8h+var_50]
mov [rsp+0B8h+var_58], rax
mov rax, [rsp+0B8h+var_20]
mov [rsp+0B8h+var_B8], rax
mov rax, [rsp+0B8h+var_40]
mov [rsp+0B8h+var_B0], rax
mov rdi, [rsp+0B8h+var_18]
add rdi, 0Bh
call _ZNK3fmt3v106detail6fill_tIcE4sizeEv; fmt::v10::detail::fill_t<char>::size(void)
mov rsi, [rsp+0B8h+var_B8]
mov rcx, rax
mov rax, [rsp+0B8h+var_B0]
imul rax, rcx
add rsi, rax
lea rdi, [rsp+0B8h+var_10]
call _ZN3fmt3v106detail7reserveINS0_8appenderEEERT_S5_m; fmt::v10::detail::reserve<fmt::v10::appender>(fmt::v10::appender &,ulong)
mov rax, [rax]
mov [rsp+0B8h+var_60], rax
cmp [rsp+0B8h+var_50], 0
jz short loc_C7550
mov rax, [rsp+0B8h+var_60]
mov [rsp+0B8h+var_70], rax
mov rsi, [rsp+0B8h+var_50]
mov rdx, [rsp+0B8h+var_18]
add rdx, 0Bh
mov rdi, [rsp+0B8h+var_70]
call _ZN3fmt3v106detail4fillINS0_8appenderEcEET_S4_mRKNS1_6fill_tIT0_EE; fmt::v10::detail::fill<fmt::v10::appender,char>(fmt::v10::appender,ulong,fmt::v10::detail::fill_t<char> const&)
mov [rsp+0B8h+var_68], rax
mov rax, [rsp+0B8h+var_68]
mov [rsp+0B8h+var_60], rax
loc_C7550:
mov rdi, [rsp+0B8h+var_30]
mov rax, [rsp+0B8h+var_60]
mov [rsp+0B8h+var_80], rax
mov rsi, [rsp+0B8h+var_80]
call _ZZN3fmt3v106detail5writeIcNS0_8appenderEEET0_S4_NS0_17basic_string_viewIT_EERKNS0_12format_specsIS6_EEENKUlS3_E_clES3_; fmt::v10::detail::write<char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>,fmt::v10::format_specs<char> const&)::{lambda(fmt::v10::appender)#1}::operator()(fmt::v10::appender)
mov [rsp+0B8h+var_78], rax
mov rax, [rsp+0B8h+var_78]
mov [rsp+0B8h+var_60], rax
cmp [rsp+0B8h+var_58], 0
jz short loc_C75B7
mov rax, [rsp+0B8h+var_60]
mov [rsp+0B8h+var_90], rax
mov rsi, [rsp+0B8h+var_58]
mov rdx, [rsp+0B8h+var_18]
add rdx, 0Bh
mov rdi, [rsp+0B8h+var_90]
call _ZN3fmt3v106detail4fillINS0_8appenderEcEET_S4_mRKNS1_6fill_tIT0_EE; fmt::v10::detail::fill<fmt::v10::appender,char>(fmt::v10::appender,ulong,fmt::v10::detail::fill_t<char> const&)
mov [rsp+0B8h+var_88], rax
mov rax, [rsp+0B8h+var_88]
mov [rsp+0B8h+var_60], rax
loc_C75B7:
mov rax, [rsp+0B8h+var_10]
mov [rsp+0B8h+var_98], rax
mov rax, [rsp+0B8h+var_60]
mov [rsp+0B8h+var_A0], rax
mov rdi, [rsp+0B8h+var_98]
mov rsi, [rsp+0B8h+var_A0]
call _ZN3fmt3v106detail13base_iteratorINS0_8appenderEEET_S4_S4_; fmt::v10::detail::base_iterator<fmt::v10::appender>(fmt::v10::appender,fmt::v10::appender)
mov [rsp+0B8h+var_8], rax
mov rax, [rsp+0B8h+var_8]
add rsp, 0B8h
retn
| long long fmt::v10::detail::write_padded<(fmt::v10::align::type)1,fmt::v10::appender,char,fmt::v10::appender fmt::v10::detail::write<char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>,fmt::v10::format_specs<char> const&)::{lambda(fmt::v10::appender)#1}>(
long long a1,
long long a2,
long long a3,
unsigned long long a4,
long long a5)
{
unsigned long long v6; // [rsp+10h] [rbp-A8h]
long long v7; // [rsp+58h] [rbp-60h]
long long v8; // [rsp+58h] [rbp-60h]
unsigned long long v9; // [rsp+60h] [rbp-58h]
unsigned long long v10; // [rsp+68h] [rbp-50h]
unsigned int v11; // [rsp+84h] [rbp-34h]
long long v14; // [rsp+A8h] [rbp-10h] BYREF
v14 = a1;
v11 = fmt::v10::detail::to_unsigned<int>(*(_DWORD *)a2);
if ( v11 <= a4 )
v6 = 0LL;
else
v6 = v11 - a4;
v10 = v6 >> byte_1AD07A[*(_WORD *)(a2 + 9) & 0xF];
v9 = v6 - v10;
fmt::v10::detail::fill_t<char>::size(a2 + 11);
v7 = *(_QWORD *)fmt::v10::detail::reserve<fmt::v10::appender>((long long)&v14);
if ( v10 )
v7 = fmt::v10::detail::fill<fmt::v10::appender,char>(v7, v10, a2 + 11);
v8 = fmt::v10::detail::write<char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>,fmt::v10::format_specs<char> const&)::{lambda(fmt::v10::appender)#1}::operator()(
a5,
v7);
if ( v9 )
v8 = fmt::v10::detail::fill<fmt::v10::appender,char>(v8, v9, a2 + 11);
return fmt::v10::detail::base_iterator<fmt::v10::appender>(v14, v8);
}
| write_padded<(fmt::v10::align::type)1,fmt::v10::appender,char,fmt::v10::detail::write<char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>,fmt::v10::format_specs<char>const&)::{lambda(fmt::v10::appender)#1}>:
SUB RSP,0xb8
MOV qword ptr [RSP + 0xa8],RDI
MOV qword ptr [RSP + 0xa0],RSI
MOV qword ptr [RSP + 0x98],RDX
MOV qword ptr [RSP + 0x90],RCX
MOV qword ptr [RSP + 0x88],R8
MOV RAX,qword ptr [RSP + 0xa0]
MOV EDI,dword ptr [RAX]
CALL 0x001a6e00
MOV dword ptr [RSP + 0x84],EAX
MOV EAX,dword ptr [RSP + 0x84]
CMP RAX,qword ptr [RSP + 0x90]
JBE 0x001c746c
MOV EAX,dword ptr [RSP + 0x84]
SUB RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001c7475
LAB_001c746c:
XOR EAX,EAX
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001c7475
LAB_001c7475:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x78],RAX
LEA RAX,[0x2ad07a]
MOV qword ptr [RSP + 0x70],RAX
MOV RAX,qword ptr [RSP + 0x78]
MOV RCX,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RSP + 0xa0]
MOV DX,word ptr [RDX + 0x9]
AND DX,0xf
MOVZX EDX,DL
MOVSX ECX,byte ptr [RCX + RDX*0x1]
MOV ECX,ECX
SHR RAX,CL
MOV qword ptr [RSP + 0x68],RAX
MOV RAX,qword ptr [RSP + 0x78]
SUB RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0xa0]
ADD RDI,0xb
CALL 0x001a75d0
MOV RSI,qword ptr [RSP]
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
IMUL RAX,RCX
ADD RSI,RAX
LEA RDI,[RSP + 0xa8]
CALL 0x001a20e0
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x58],RAX
CMP qword ptr [RSP + 0x68],0x0
JZ 0x001c7550
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x48],RAX
MOV RSI,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0xa0]
ADD RDX,0xb
MOV RDI,qword ptr [RSP + 0x48]
CALL 0x001a75e0
MOV qword ptr [RSP + 0x50],RAX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x58],RAX
LAB_001c7550:
MOV RDI,qword ptr [RSP + 0x88]
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x38],RAX
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x001c8be0
MOV qword ptr [RSP + 0x40],RAX
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x58],RAX
CMP qword ptr [RSP + 0x60],0x0
JZ 0x001c75b7
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x28],RAX
MOV RSI,qword ptr [RSP + 0x60]
MOV RDX,qword ptr [RSP + 0xa0]
ADD RDX,0xb
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x001a75e0
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x58],RAX
LAB_001c75b7:
MOV RAX,qword ptr [RSP + 0xa8]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x001a23e0
MOV qword ptr [RSP + 0xb0],RAX
MOV RAX,qword ptr [RSP + 0xb0]
ADD RSP,0xb8
RET
|
/* fmt::v10::appender fmt::v10::detail::write_padded<(fmt::v10::align::type)1, fmt::v10::appender,
char, fmt::v10::detail::write<char, fmt::v10::appender>(fmt::v10::appender,
fmt::v10::basic_string_view<char>, fmt::v10::format_specs<char>
const&)::{lambda(fmt::v10::appender)#1}>(fmt::v10::appender, fmt::v10::format_specs<char> const&,
unsigned long, unsigned long, fmt::v10::detail::write<char,
fmt::v10::appender>(fmt::v10::appender, fmt::v10::basic_string_view<char>,
fmt::v10::format_specs<char> const&)::{lambda(fmt::v10::appender)#1}&&) */
int8
fmt::v10::detail::
write_padded<(fmt::v10::align::type)1,fmt::v10::appender,char,fmt::v10::detail::write<char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>,fmt::v10::format_specs<char>const&)::_lambda(fmt::v10::appender)_1_>
(int8 param_1,int *param_2,long param_3,ulong param_4,
_lambda_fmt__v10__appender__1_ *param_5)
{
uint uVar1;
ulong uVar2;
long lVar3;
int8 *puVar4;
int8 uVar5;
ulong local_a8;
int8 local_60;
int8 local_10 [2];
local_10[0] = param_1;
uVar1 = to_unsigned<int>(*param_2);
if (param_4 < uVar1) {
local_a8 = uVar1 - param_4;
}
else {
local_a8 = 0;
}
uVar2 = local_a8 >> ((&DAT_002ad07a)[(byte)*(int2 *)((long)param_2 + 9) & 0xf] & 0x3f);
lVar3 = fill_t<char>::size((fill_t<char> *)((long)param_2 + 0xb));
puVar4 = (int8 *)
reserve<fmt::v10::appender>((appender *)local_10,param_3 + local_a8 * lVar3);
local_60 = *puVar4;
if (uVar2 != 0) {
local_60 = fill<fmt::v10::appender,char>(local_60,uVar2,(long)param_2 + 0xb);
}
local_60 = write<char,fmt::v10::appender>(fmt::v10::appender,fmt::v10::basic_string_view<char>,fmt::v10::format_specs<char>const&)
::{lambda(fmt::v10::appender)#1}::operator()(param_5,local_60);
if (local_a8 - uVar2 != 0) {
local_60 = fill<fmt::v10::appender,char>(local_60,local_a8 - uVar2,(long)param_2 + 0xb);
}
uVar5 = base_iterator<fmt::v10::appender>(local_10[0],local_60);
return uVar5;
}
| |
23,171 | fmt::v10::appender fmt::v10::detail::write_padded<(fmt::v10::align::type)1, fmt::v10::appender, char, fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender>(fmt::v10::appender, fmt::v10::basic_string_view<char>, fmt::v10::format_specs<char> const&)::'lambda'(fmt::v10::appender)>(fmt::v10::appender, fmt::v10::format_specs<char> const&, unsigned long, unsigned long, fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender>(fmt::v10::appender, fmt::v10::basic_string_view<char>, fmt::v10::format_specs<char> const&)::'lambda'(fmt::v10::appender)&&) | aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h | FMT_CONSTEXPR auto write_padded(OutputIt out, const format_specs<Char>& specs,
size_t size, size_t width, F&& f) -> OutputIt {
static_assert(align == align::left || align == align::right, "");
unsigned spec_width = to_unsigned(specs.width);
size_t padding = spec_width > width ? spec_width - width : 0;
// Shifts are encoded as string literals because static constexpr is not
// supported in constexpr functions.
auto* shifts = align == align::left ? "\x1f\x1f\x00\x01" : "\x00\x1f\x00\x01";
size_t left_padding = padding >> shifts[specs.align];
size_t right_padding = padding - left_padding;
auto it = reserve(out, size + padding * specs.fill.size());
if (left_padding != 0) it = fill(it, left_padding, specs.fill);
it = f(it);
if (right_padding != 0) it = fill(it, right_padding, specs.fill);
return base_iterator(out, it);
} | O3 | c | fmt::v10::appender fmt::v10::detail::write_padded<(fmt::v10::align::type)1, fmt::v10::appender, char, fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender>(fmt::v10::appender, fmt::v10::basic_string_view<char>, fmt::v10::format_specs<char> const&)::'lambda'(fmt::v10::appender)>(fmt::v10::appender, fmt::v10::format_specs<char> const&, unsigned long, unsigned long, fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender>(fmt::v10::appender, fmt::v10::basic_string_view<char>, fmt::v10::format_specs<char> const&)::'lambda'(fmt::v10::appender)&&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movl (%rsi), %eax
xorl %r14d, %r14d
subq %rcx, %rax
cmovaeq %rax, %r14
movzwl 0x9(%rsi), %eax
andl $0xf, %eax
leaq 0x53502(%rip), %rcx # 0x83dff
movb (%rax,%rcx), %cl
movq %r14, %r15
shrq %cl, %r15
movq %r8, %r12
movq %rdi, %r13
addq $0xb, %rbx
testq %r15, %r15
je 0x30926
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x27ce2
movq %rax, %r13
movl $0xffffff, %ebp # imm = 0xFFFFFF
andl (%r12), %ebp
je 0x3096b
movq 0x10(%r13), %rax
leaq 0x1(%rax), %rsi
cmpq %rsi, 0x18(%r13)
jae 0x30950
movq (%r13), %rax
movq %r13, %rdi
callq *(%rax)
movq 0x10(%r13), %rax
leaq 0x1(%rax), %rsi
movq 0x8(%r13), %rcx
movq %rsi, 0x10(%r13)
movb %bpl, (%rcx,%rax)
movl %ebp, %eax
shrl $0x8, %eax
cmpl $0x100, %ebp # imm = 0x100
movl %eax, %ebp
jae 0x30931
movq 0x10(%r12), %rsi
movq %rsp, %rdx
movb $0x30, (%rdx)
movq %r13, %rdi
callq 0x27d41
movq 0x18(%r12), %rcx
movl 0x20(%r12), %esi
movslq %esi, %rdx
movb 0x24(%r12), %r8b
movq 0x10(%rax), %rdi
addq %rdi, %rsi
cmpq %rsi, 0x18(%rax)
jb 0x309ec
movq %rsi, 0x10(%rax)
movq 0x8(%rax), %r9
testq %r9, %r9
je 0x309ec
leaq 0x52fa1(%rip), %r10 # 0x83952
leaq 0x52fab(%rip), %rsi # 0x83963
testb %r8b, %r8b
cmovneq %r10, %rsi
addq %rdx, %rdi
leaq (%r9,%rdi), %rdx
decq %rdx
movq %rcx, %rdi
movl %ecx, %r8d
andl $0xf, %r8d
movb (%rsi,%r8), %r8b
movb %r8b, (%rdx)
shrq $0x4, %rdi
decq %rdx
cmpq $0x10, %rcx
movq %rdi, %rcx
jae 0x309cc
jmp 0x30a43
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movb $0x0, 0x10(%rsp)
leaq (%rsp,%rdx), %rsi
leaq 0x52f4f(%rip), %r9 # 0x83952
leaq 0x52f59(%rip), %rdi # 0x83963
testb %r8b, %r8b
cmovneq %r9, %rdi
addq %rsp, %rdx
decq %rdx
movq %rcx, %r8
movl %ecx, %r9d
andl $0xf, %r9d
movb (%rdi,%r9), %r9b
movb %r9b, (%rdx)
shrq $0x4, %r8
decq %rdx
cmpq $0xf, %rcx
movq %r8, %rcx
ja 0x30a1a
movq %rsp, %rdi
movq %rax, %rdx
callq 0x25736
cmpq %r15, %r14
je 0x30a59
subq %r15, %r14
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x27ce2
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN3fmt3v106detail12write_paddedILNS0_5align4typeE2ENS0_8appenderEcRZNS1_9write_intIS5_cZNS1_9write_intIcS5_mEET0_S8_NS1_13write_int_argIT1_EERKNS0_12format_specsIT_EENS1_10locale_refEEUlS5_E0_EESD_SD_ijRKNSC_IS8_EESA_EUlS5_E_EES8_S8_RKNSC_ISA_EEmmOT2_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rsi
mov eax, [rsi]
xor r14d, r14d
sub rax, rcx
cmovnb r14, rax
movzx eax, word ptr [rsi+9]
and eax, 0Fh
lea rcx, byte_83DFF
mov cl, [rax+rcx]
mov r15, r14
shr r15, cl
mov r12, r8
mov r13, rdi
add rbx, 0Bh
test r15, r15
jz short loc_30926
mov rdi, r13
mov rsi, r15
mov rdx, rbx
call _ZN3fmt3v106detail4fillINS0_8appenderEcEET_S4_mRKNS1_6fill_tIT0_EE; fmt::v10::detail::fill<fmt::v10::appender,char>(fmt::v10::appender,ulong,fmt::v10::detail::fill_t<char> const&)
mov r13, rax
loc_30926:
mov ebp, 0FFFFFFh
and ebp, [r12]
jz short loc_3096B
loc_30931:
mov rax, [r13+10h]
lea rsi, [rax+1]
cmp [r13+18h], rsi
jnb short loc_30950
mov rax, [r13+0]
mov rdi, r13
call qword ptr [rax]
mov rax, [r13+10h]
lea rsi, [rax+1]
loc_30950:
mov rcx, [r13+8]
mov [r13+10h], rsi
mov [rcx+rax], bpl
mov eax, ebp
shr eax, 8
cmp ebp, 100h
mov ebp, eax
jnb short loc_30931
loc_3096B:
mov rsi, [r12+10h]
mov rdx, rsp
mov byte ptr [rdx], 30h ; '0'
mov rdi, r13
call _ZN3fmt3v106detail6fill_nINS0_8appenderEmcEET_S4_T0_RKT1_; fmt::v10::detail::fill_n<fmt::v10::appender,ulong,char>(fmt::v10::appender,ulong,char const&)
mov rcx, [r12+18h]
mov esi, [r12+20h]
movsxd rdx, esi
mov r8b, [r12+24h]
mov rdi, [rax+10h]
add rsi, rdi
cmp [rax+18h], rsi
jb short loc_309EC
mov [rax+10h], rsi
mov r9, [rax+8]
test r9, r9
jz short loc_309EC
lea r10, a0123456789abcd; "0123456789ABCDEF"
lea rsi, a0123456789abcd_0; "0123456789abcdef"
test r8b, r8b
cmovnz rsi, r10
add rdi, rdx
lea rdx, [r9+rdi]
dec rdx
mov rdi, rcx
loc_309CC:
mov r8d, ecx
and r8d, 0Fh
mov r8b, [rsi+r8]
mov [rdx], r8b
shr rdi, 4
dec rdx
cmp rcx, 10h
mov rcx, rdi
jnb short loc_309CC
jmp short loc_30A43
loc_309EC:
xorps xmm0, xmm0
movaps [rsp+48h+var_48], xmm0
mov [rsp+48h+var_38], 0
lea rsi, [rsp+rdx+48h+var_48]
lea r9, a0123456789abcd; "0123456789ABCDEF"
lea rdi, a0123456789abcd_0; "0123456789abcdef"
test r8b, r8b
cmovnz rdi, r9
add rdx, rsp
dec rdx
mov r8, rcx
loc_30A1A:
mov r9d, ecx
and r9d, 0Fh
mov r9b, [rdi+r9]
mov [rdx], r9b
shr r8, 4
dec rdx
cmp rcx, 0Fh
mov rcx, r8
ja short loc_30A1A
mov rdi, rsp
mov rdx, rax
call _ZN3fmt3v106detail17copy_str_noinlineIcPcNS0_8appenderEEET1_T0_S6_S5_; fmt::v10::detail::copy_str_noinline<char,char *,fmt::v10::appender>(char *,char *,fmt::v10::appender)
loc_30A43:
cmp r14, r15
jz short loc_30A59
sub r14, r15
mov rdi, rax
mov rsi, r14
mov rdx, rbx
call _ZN3fmt3v106detail4fillINS0_8appenderEcEET_S4_mRKNS1_6fill_tIT0_EE; fmt::v10::detail::fill<fmt::v10::appender,char>(fmt::v10::appender,ulong,fmt::v10::detail::fill_t<char> const&)
loc_30A59:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _QWORD * fmt::v10::detail::write_padded<(fmt::v10::align::type)2,fmt::v10::appender,char,char fmt::v10::detail::write_int<fmt::v10::appender,char,fmt::v10::appender fmt::v10::detail::write_int<char,fmt::v10::appender,unsigned long>(fmt::v10::appender,fmt::v10::detail::write_int_arg<unsigned long>,fmt::v10::format_specs<char> const&,fmt::v10::detail::locale_ref)::{lambda(fmt::v10::appender)#2}>(char,int,unsigned int,fmt::v10::format_specs<fmt::v10::appender> const&,unsigned long)::{lambda(fmt::v10::appender)#1} &>(
long long a1,
unsigned int *a2,
long long a3,
unsigned long long a4,
long long a5)
{
unsigned long long v5; // rax
unsigned long long v6; // r14
bool v7; // cf
unsigned long long v8; // rax
char v9; // cl
unsigned long long v10; // r15
long long v12; // r13
long long v13; // rbx
unsigned int v14; // ebp
long long v15; // rax
long long v16; // rsi
long long v17; // rcx
long long v18; // rsi
_QWORD *result; // rax
unsigned long long v20; // rcx
long long v21; // rsi
long long v22; // rdx
char v23; // r8
long long v24; // rdi
unsigned long long v25; // rsi
long long v26; // r9
const char *v27; // rsi
_BYTE *v28; // rdx
unsigned long long v29; // rdi
char *v30; // rsi
const char *v31; // rdi
_BYTE *v32; // rdx
unsigned long long v33; // r8
bool v34; // cc
__int128 v35; // [rsp+0h] [rbp-48h] BYREF
char v36; // [rsp+10h] [rbp-38h]
v5 = *a2;
v6 = 0LL;
v7 = v5 < a4;
v8 = v5 - a4;
if ( !v7 )
v6 = v8;
v9 = byte_83DFF[*(_WORD *)((_BYTE *)a2 + 9) & 0xF];
v10 = v6 >> v9;
v12 = a1;
v13 = (long long)a2 + 11;
if ( v6 >> v9 )
v12 = fmt::v10::detail::fill<fmt::v10::appender,char>(a1, v6 >> v9, v13);
v14 = *(_DWORD *)a5 & 0xFFFFFF;
if ( v14 )
{
do
{
v15 = *(_QWORD *)(v12 + 16);
v16 = v15 + 1;
if ( *(_QWORD *)(v12 + 24) < (unsigned long long)(v15 + 1) )
{
(**(void ( ***)(long long))v12)(v12);
v15 = *(_QWORD *)(v12 + 16);
v16 = v15 + 1;
}
v17 = *(_QWORD *)(v12 + 8);
*(_QWORD *)(v12 + 16) = v16;
*(_BYTE *)(v17 + v15) = v14;
v7 = v14 < 0x100;
v14 >>= 8;
}
while ( !v7 );
}
v18 = *(_QWORD *)(a5 + 16);
LOBYTE(v35) = 48;
result = (_QWORD *)fmt::v10::detail::fill_n<fmt::v10::appender,unsigned long,char>(v12, v18, (char *)&v35);
v20 = *(_QWORD *)(a5 + 24);
v21 = *(unsigned int *)(a5 + 32);
v22 = (int)v21;
v23 = *(_BYTE *)(a5 + 36);
v24 = result[2];
v25 = v24 + v21;
if ( result[3] >= v25 && (result[2] = v25, (v26 = result[1]) != 0) )
{
v27 = "0123456789abcdef";
if ( v23 )
v27 = "0123456789ABCDEF";
v28 = (_BYTE *)(v26 + v22 + v24 - 1);
v29 = v20;
do
{
*v28 = v27[v20 & 0xF];
v29 >>= 4;
--v28;
v7 = v20 < 0x10;
v20 = v29;
}
while ( !v7 );
}
else
{
v35 = 0LL;
v36 = 0;
v30 = (char *)&v35 + v22;
v31 = "0123456789abcdef";
if ( v23 )
v31 = "0123456789ABCDEF";
v32 = (char *)&v35 + v22 - 1;
v33 = v20;
do
{
*v32 = v31[v20 & 0xF];
v33 >>= 4;
--v32;
v34 = v20 <= 0xF;
v20 = v33;
}
while ( !v34 );
result = (_QWORD *)fmt::v10::detail::copy_str_noinline<char,char *,fmt::v10::appender>(
(long long)&v35,
(long long)v30,
(long long)result);
}
if ( v6 != v10 )
return (_QWORD *)fmt::v10::detail::fill<fmt::v10::appender,char>((long long)result, v6 - v10, v13);
return result;
}
| write_padded<(fmt::v10::align::type)2,fmt::v10::appender,char,fmt::v10::detail::write_int<fmt::v10::appender,char,fmt::v10::detail::write_int<char,fmt::v10::appender,unsigned_long>(fmt::v10::appender,fmt::v10::detail::write_int_arg<unsigned_long>,fmt::v10::format_specs<char>const&,fmt::v10::detail::locale_ref)::{lambda(fmt::v10::appender)#2}>(fmt::v10::appender,int,unsigned_int,fmt::v10::format_specs<char>const&,fmt::v10::detail::write_int<char,fmt::v10::appender,unsigned_long>(fmt::v10::appender,fmt::v10::detail::write_int_arg<unsigned_long>,fmt::v10::format_specs<char>const&,fmt::v10::detail::locale_ref)::{lambda(fmt::v10::appender)#2})::{lambda(fmt::v10::appender)#1}&>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RSI
MOV EAX,dword ptr [RSI]
XOR R14D,R14D
SUB RAX,RCX
CMOVNC R14,RAX
MOVZX EAX,word ptr [RSI + 0x9]
AND EAX,0xf
LEA RCX,[0x183dff]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV R15,R14
SHR R15,CL
MOV R12,R8
MOV R13,RDI
ADD RBX,0xb
TEST R15,R15
JZ 0x00130926
MOV RDI,R13
MOV RSI,R15
MOV RDX,RBX
CALL 0x00127ce2
MOV R13,RAX
LAB_00130926:
MOV EBP,0xffffff
AND EBP,dword ptr [R12]
JZ 0x0013096b
LAB_00130931:
MOV RAX,qword ptr [R13 + 0x10]
LEA RSI,[RAX + 0x1]
CMP qword ptr [R13 + 0x18],RSI
JNC 0x00130950
MOV RAX,qword ptr [R13]
MOV RDI,R13
CALL qword ptr [RAX]
MOV RAX,qword ptr [R13 + 0x10]
LEA RSI,[RAX + 0x1]
LAB_00130950:
MOV RCX,qword ptr [R13 + 0x8]
MOV qword ptr [R13 + 0x10],RSI
MOV byte ptr [RCX + RAX*0x1],BPL
MOV EAX,EBP
SHR EAX,0x8
CMP EBP,0x100
MOV EBP,EAX
JNC 0x00130931
LAB_0013096b:
MOV RSI,qword ptr [R12 + 0x10]
MOV RDX,RSP
MOV byte ptr [RDX],0x30
MOV RDI,R13
CALL 0x00127d41
MOV RCX,qword ptr [R12 + 0x18]
MOV ESI,dword ptr [R12 + 0x20]
MOVSXD RDX,ESI
MOV R8B,byte ptr [R12 + 0x24]
MOV RDI,qword ptr [RAX + 0x10]
ADD RSI,RDI
CMP qword ptr [RAX + 0x18],RSI
JC 0x001309ec
MOV qword ptr [RAX + 0x10],RSI
MOV R9,qword ptr [RAX + 0x8]
TEST R9,R9
JZ 0x001309ec
LEA R10,[0x183952]
LEA RSI,[0x183963]
TEST R8B,R8B
CMOVNZ RSI,R10
ADD RDI,RDX
LEA RDX,[R9 + RDI*0x1]
DEC RDX
MOV RDI,RCX
LAB_001309cc:
MOV R8D,ECX
AND R8D,0xf
MOV R8B,byte ptr [RSI + R8*0x1]
MOV byte ptr [RDX],R8B
SHR RDI,0x4
DEC RDX
CMP RCX,0x10
MOV RCX,RDI
JNC 0x001309cc
JMP 0x00130a43
LAB_001309ec:
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
MOV byte ptr [RSP + 0x10],0x0
LEA RSI,[RSP + RDX*0x1]
LEA R9,[0x183952]
LEA RDI,[0x183963]
TEST R8B,R8B
CMOVNZ RDI,R9
ADD RDX,RSP
DEC RDX
MOV R8,RCX
LAB_00130a1a:
MOV R9D,ECX
AND R9D,0xf
MOV R9B,byte ptr [RDI + R9*0x1]
MOV byte ptr [RDX],R9B
SHR R8,0x4
DEC RDX
CMP RCX,0xf
MOV RCX,R8
JA 0x00130a1a
MOV RDI,RSP
MOV RDX,RAX
CALL 0x00125736
LAB_00130a43:
CMP R14,R15
JZ 0x00130a59
SUB R14,R15
MOV RDI,RAX
MOV RSI,R14
MOV RDX,RBX
CALL 0x00127ce2
LAB_00130a59:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* fmt::v10::appender fmt::v10::detail::write_padded<(fmt::v10::align::type)2, fmt::v10::appender,
char, fmt::v10::detail::write_int<fmt::v10::appender, char, fmt::v10::detail::write_int<char,
fmt::v10::appender, unsigned long>(fmt::v10::appender, fmt::v10::detail::write_int_arg<unsigned
long>, fmt::v10::format_specs<char> const&,
fmt::v10::detail::locale_ref)::{lambda(fmt::v10::appender)#2}>(fmt::v10::appender, int, unsigned
int, fmt::v10::format_specs<char> const&, fmt::v10::detail::write_int<char, fmt::v10::appender,
unsigned long>(fmt::v10::appender, fmt::v10::detail::write_int_arg<unsigned long>,
fmt::v10::format_specs<char> const&,
fmt::v10::detail::locale_ref)::{lambda(fmt::v10::appender)#2})::{lambda(fmt::v10::appender)#1}&>(fmt::v10::appender,
fmt::v10::format_specs<char> const&, unsigned long, unsigned long,
fmt::v10::detail::write_int<fmt::v10::appender, char, fmt::v10::detail::write_int<char,
fmt::v10::appender, unsigned long>(fmt::v10::appender, fmt::v10::detail::write_int_arg<unsigned
long>, fmt::v10::format_specs<char> const&,
fmt::v10::detail::locale_ref)::{lambda(fmt::v10::appender)#2}>(fmt::v10::appender, int, unsigned
int, fmt::v10::format_specs<char> const&, fmt::v10::detail::write_int<char, fmt::v10::appender,
unsigned long>(fmt::v10::appender, fmt::v10::detail::write_int_arg<unsigned long>,
fmt::v10::format_specs<char> const&,
fmt::v10::detail::locale_ref)::{lambda(fmt::v10::appender)#2})::{lambda(fmt::v10::appender)#1}&)
*/
void fmt::v10::detail::
write_padded<(fmt::v10::align::type)2,fmt::v10::appender,char,fmt::v10::detail::write_int<fmt::v10::appender,char,fmt::v10::detail::write_int<char,fmt::v10::appender,unsigned_long>(fmt::v10::appender,fmt::v10::detail::write_int_arg<unsigned_long>,fmt::v10::format_specs<char>const&,fmt::v10::detail::locale_ref)::_lambda(fmt::v10::appender)_2_>(fmt::v10::appender,int,unsigned_int,fmt::v10::format_specs<char>const&,fmt::v10::detail::write_int<char,fmt::v10::appender,unsigned_long>(fmt::v10::appender,fmt::v10::detail::write_int_arg<unsigned_long>,fmt::v10::format_specs<char>const&,fmt::v10::detail::locale_ref)::_lambda(fmt::v10::appender)_2_)::_lambda(fmt::v10::appender)_1_&>
(int8 *param_1,uint *param_2,int8 param_3,ulong param_4,uint *param_5)
{
long lVar1;
long lVar2;
long lVar3;
char *pcVar4;
uint uVar5;
ulong uVar6;
ulong uVar7;
char *pcVar8;
ulong uVar9;
ulong uVar10;
bool bVar11;
char local_48 [24];
uVar9 = 0;
if (param_4 <= *param_2) {
uVar9 = *param_2 - param_4;
}
uVar10 = uVar9 >> ((&DAT_00183dff)[*(ushort *)((long)param_2 + 9) & 0xf] & 0x3f);
if (uVar10 != 0) {
param_1 = (int8 *)fill<fmt::v10::appender,char>(param_1,uVar10,(long)param_2 + 0xb);
}
uVar5 = *param_5 & 0xffffff;
if ((*param_5 & 0xffffff) != 0) {
do {
lVar1 = param_1[2];
uVar6 = lVar1 + 1;
if ((ulong)param_1[3] < uVar6) {
(**(code **)*param_1)(param_1);
lVar1 = param_1[2];
uVar6 = lVar1 + 1;
}
param_1[2] = uVar6;
*(char *)(param_1[1] + lVar1) = (char)uVar5;
bVar11 = 0xff < uVar5;
uVar5 = uVar5 >> 8;
} while (bVar11);
}
local_48[0] = 0x30;
lVar2 = fill_n<fmt::v10::appender,unsigned_long,char>(param_1,*(int8 *)(param_5 + 4));
uVar6 = *(ulong *)(param_5 + 6);
lVar3 = (long)(int)param_5[8];
uVar5 = param_5[9];
lVar1 = *(long *)(lVar2 + 0x10);
uVar7 = (ulong)param_5[8] + lVar1;
if (uVar7 <= *(ulong *)(lVar2 + 0x18)) {
*(ulong *)(lVar2 + 0x10) = uVar7;
if (*(long *)(lVar2 + 8) != 0) {
pcVar8 = "0123456789abcdef";
if ((char)uVar5 != '\0') {
pcVar8 = "0123456789ABCDEF";
}
pcVar4 = (char *)(*(long *)(lVar2 + 8) + lVar1 + lVar3);
do {
pcVar4 = pcVar4 + -1;
*pcVar4 = pcVar8[(uint)uVar6 & 0xf];
bVar11 = 0xf < uVar6;
uVar6 = uVar6 >> 4;
} while (bVar11);
goto LAB_00130a43;
}
}
local_48[0] = '\0';
local_48[1] = '\0';
local_48[2] = '\0';
local_48[3] = '\0';
local_48[4] = '\0';
local_48[5] = '\0';
local_48[6] = '\0';
local_48[7] = '\0';
local_48[8] = '\0';
local_48[9] = '\0';
local_48[10] = '\0';
local_48[0xb] = '\0';
local_48[0xc] = '\0';
local_48[0xd] = '\0';
local_48[0xe] = '\0';
local_48[0xf] = '\0';
local_48[0x10] = 0;
pcVar8 = "0123456789abcdef";
if ((char)uVar5 != '\0') {
pcVar8 = "0123456789ABCDEF";
}
pcVar4 = local_48 + lVar3;
do {
pcVar4 = pcVar4 + -1;
*pcVar4 = pcVar8[(uint)uVar6 & 0xf];
bVar11 = 0xf < uVar6;
uVar6 = uVar6 >> 4;
} while (bVar11);
lVar2 = copy_str_noinline<char,char*,fmt::v10::appender>(local_48,local_48 + lVar3,lVar2);
LAB_00130a43:
if (uVar9 != uVar10) {
fill<fmt::v10::appender,char>(lVar2,uVar9 - uVar10,(long)param_2 + 0xb);
}
return;
}
| |
23,172 | OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexEdgesFromParentEdges() | NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/quadRefinement.cpp | void
QuadRefinement::populateVertexEdgesFromParentEdges() {
//
// This relation turns out to be awkward to populate given the mixed parentage
// of the incident edges of the child vertex of an edge -- two child edges
// originate from the parent edge while one or more will originate from the
// faces incident the parent edge. The need to interleave these for proper
// CC-wise orientation is what really complicates this.
//
// Unlike other relations, we generate the results and then re-order them as
// needed. In this case we assign the first two incident edges as the child
// edges of the parent edge, followed then by those originating from a parent
// face. We then swap the second and third (and possibly the first two) so
// that we have the desired origin sequence beginning [edge, face, edge, ...]
//
for (int pEdge = 0; pEdge < _parent->getNumEdges(); ++pEdge) {
int cVert = _edgeChildVertIndex[pEdge];
if (!IndexIsValid(cVert)) continue;
ConstIndexArray pEdgeFaces = _parent->getEdgeFaces(pEdge);
ConstLocalIndexArray pEdgeInFace = _parent->getEdgeFaceLocalIndices(pEdge);
ConstIndexArray pEdgeVerts = _parent->getEdgeVertices(pEdge),
pEdgeChildEdges = getEdgeChildEdges(pEdge);
//
// Reserve enough vert-edges, populate and trim to the actual size:
//
_child->resizeVertexEdges(cVert, pEdgeFaces.size() + 2);
IndexArray cVertEdges = _child->getVertexEdges(cVert);
LocalIndexArray cVertInEdge = _child->getVertexEdgeLocalIndices(cVert);
//
// Identify and assign the first two child edges of the parent edge -- until
// we look more closely at the orientation of the parent edge in the first
// face we don't know what order these two should be in, so just assign them
// for now and swap them later if necessary:
//
int cVertEdgeCount = 0;
if (IndexIsValid(pEdgeChildEdges[0])) {
cVertEdges[cVertEdgeCount] = pEdgeChildEdges[0];
cVertInEdge[cVertEdgeCount] = 0;
cVertEdgeCount++;
}
if (IndexIsValid(pEdgeChildEdges[1])) {
cVertEdges[cVertEdgeCount] = pEdgeChildEdges[1];
cVertInEdge[cVertEdgeCount] = 0;
cVertEdgeCount++;
}
//
// Append the interior edge of each incident parent face -- swapping the
// first face-edge with the second edge-edge just added to get the desired
// sequence of child edges originating from (edge, face0, edge, ...)
//
for (int i = 0; i < pEdgeFaces.size(); ++i) {
Index pFace = pEdgeFaces[i];
int edgeInFace = pEdgeInFace[i];
Index cEdgeOfFace = getFaceChildEdges(pFace)[edgeInFace];
if (IndexIsValid(cEdgeOfFace)) {
cVertEdges[cVertEdgeCount] = cEdgeOfFace;
cVertInEdge[cVertEdgeCount] = 1;
cVertEdgeCount++;
// Check if swapping this first face-edge with the last edge-edge
// is necessary:
if ((i == 0) && (cVertEdgeCount == 3)) {
// Remember to order the first of the two child edges according
// to the parent edge's orientation in this first face:
if ((pEdgeVerts[0] != pEdgeVerts[1]) &&
(_parent->getFaceVertices(pFace)[edgeInFace] == pEdgeVerts[0])) {
std::swap(cVertEdges[0], cVertEdges[1]);
std::swap(cVertInEdge[0], cVertInEdge[1]);
}
std::swap(cVertEdges[1], cVertEdges[2]);
std::swap(cVertInEdge[1], cVertInEdge[2]);
}
}
}
_child->trimVertexEdges(cVert, cVertEdgeCount);
}
} | O1 | cpp | OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexEdgesFromParentEdges():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x8(%rdi), %rax
movq %rax, -0x38(%rsp)
cmpl $0x0, 0x4(%rax)
jle 0x480f0
movq 0xd8(%rdi), %rax
movq %rax, -0x20(%rsp)
movq 0xc0(%rdi), %rsi
movq 0x10(%rdi), %r9
movq 0x68(%rdi), %r8
movq 0x90(%rdi), %rdi
xorl %r10d, %r10d
movq %rsi, -0x28(%rsp)
movq %r9, -0x30(%rsp)
movq -0x20(%rsp), %rax
movslq (%rax,%r10,4), %r15
cmpq $-0x1, %r15
je 0x480db
movl %r15d, %edx
movq -0x38(%rsp), %rcx
movq 0x90(%rcx), %rax
movslq 0x4(%rax,%r10,8), %r11
leaq (,%r11,4), %rbx
addq 0xa8(%rcx), %rbx
movq 0x78(%rcx), %r14
addq %r11, %r11
addq 0xc0(%rcx), %r11
movl (%rax,%r10,8), %r12d
leal 0x2(%r12), %eax
movq 0x150(%r9), %r13
movl %eax, (%r13,%r15,8)
addq %r15, %r15
xorl %ebp, %ebp
movl $0x0, %ecx
testl %edx, %edx
movq %r13, %rdx
je 0x47fb6
movl -0x4(%rdx,%r15,4), %ecx
addl -0x8(%rdx,%r15,4), %ecx
leaq (%r10,%r10), %r13
movl %ecx, 0x4(%rdx,%r15,4)
movl 0x14(%r9), %ecx
cmpl %eax, %ecx
cmovgl %ecx, %eax
movl %eax, 0x14(%r9)
movl %r15d, %eax
orl $0x1, %eax
cltq
movq %rdx, -0x18(%rsp)
movslq (%rdx,%rax,4), %rcx
leaq (,%rcx,4), %rdx
addq 0x168(%r9), %rdx
addq %rcx, %rcx
addq 0x180(%r9), %rcx
movl (%rsi,%r13,4), %eax
cmpl $-0x1, %eax
je 0x4800b
movl %eax, (%rdx)
movw $0x0, (%rcx)
movl $0x1, %ebp
movl 0x4(%rsi,%r13,4), %eax
cmpl $-0x1, %eax
je 0x48022
movl %ebp, %esi
movl %eax, (%rdx,%rsi,4)
movw $0x0, (%rcx,%rsi,2)
incl %ebp
movq %r15, -0x10(%rsp)
movq %r10, -0x8(%rsp)
testl %r12d, %r12d
jle 0x480bf
xorl %esi, %esi
movslq (%rbx,%rsi,4), %rax
movzwl (%r11,%rsi,2), %r15d
leaq (%rax,%rax), %r10
movslq 0x4(%r8,%r10,4), %r10
leaq (%rdi,%r10,4), %r10
movl (%r10,%r15,4), %r10d
cmpl $-0x1, %r10d
je 0x480b3
movslq %ebp, %rbp
movl %r10d, (%rdx,%rbp,4)
movw $0x1, (%rcx,%rbp,2)
incl %ebp
testq %rsi, %rsi
jne 0x480b3
cmpl $0x3, %ebp
jne 0x480b3
movl (%r14,%r13,4), %ebp
cmpl 0x4(%r14,%r13,4), %ebp
je 0x480a5
leaq 0x1(,%rax,2), %rax
movq -0x38(%rsp), %r9
movq 0x18(%r9), %r10
movslq (%r10,%rax,4), %rax
shlq $0x2, %rax
addq 0x30(%r9), %rax
cmpl %ebp, (%rax,%r15,4)
jne 0x480a5
rolq $0x20, (%rdx)
roll $0x10, (%rcx)
rolq $0x20, 0x4(%rdx)
roll $0x10, 0x2(%rcx)
movl $0x3, %ebp
incq %rsi
cmpq %rsi, %r12
jne 0x48037
movq -0x10(%rsp), %rax
movq -0x18(%rsp), %rcx
movl %ebp, (%rcx,%rax,4)
movq -0x28(%rsp), %rsi
movq -0x30(%rsp), %r9
movq -0x8(%rsp), %r10
incq %r10
movq -0x38(%rsp), %rax
movslq 0x4(%rax), %rax
cmpq %rax, %r10
jl 0x47f42
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN10OpenSubdiv6v3_6_03Vtr8internal14QuadRefinement34populateVertexEdgesFromParentEdgesEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
mov rax, [rdi+8]
mov [rsp+30h+var_68], rax
cmp dword ptr [rax+4], 0
jle loc_480F0
mov rax, [rdi+0D8h]
mov [rsp+30h+var_50], rax
mov rsi, [rdi+0C0h]
mov r9, [rdi+10h]
mov r8, [rdi+68h]
mov rdi, [rdi+90h]
xor r10d, r10d
mov [rsp+30h+var_58], rsi
mov [rsp+30h+var_60], r9
loc_47F42:
mov rax, [rsp+30h+var_50]
movsxd r15, dword ptr [rax+r10*4]
cmp r15, 0FFFFFFFFFFFFFFFFh
jz loc_480DB
mov edx, r15d
mov rcx, [rsp+30h+var_68]
mov rax, [rcx+90h]
movsxd r11, dword ptr [rax+r10*8+4]
lea rbx, ds:0[r11*4]
add rbx, [rcx+0A8h]
mov r14, [rcx+78h]
add r11, r11
add r11, [rcx+0C0h]
mov r12d, [rax+r10*8]
lea eax, [r12+2]
mov r13, [r9+150h]
mov [r13+r15*8+0], eax
add r15, r15
xor ebp, ebp
mov ecx, 0
test edx, edx
mov rdx, r13
jz short loc_47FB6
mov ecx, [rdx+r15*4-4]
add ecx, [rdx+r15*4-8]
loc_47FB6:
lea r13, [r10+r10]
mov [rdx+r15*4+4], ecx
mov ecx, [r9+14h]
cmp ecx, eax
cmovg eax, ecx
mov [r9+14h], eax
mov eax, r15d
or eax, 1
cdqe
mov [rsp+30h+var_48], rdx
movsxd rcx, dword ptr [rdx+rax*4]
lea rdx, ds:0[rcx*4]
add rdx, [r9+168h]
add rcx, rcx
add rcx, [r9+180h]
mov eax, [rsi+r13*4]
cmp eax, 0FFFFFFFFh
jz short loc_4800B
mov [rdx], eax
mov word ptr [rcx], 0
mov ebp, 1
loc_4800B:
mov eax, [rsi+r13*4+4]
cmp eax, 0FFFFFFFFh
jz short loc_48022
mov esi, ebp
mov [rdx+rsi*4], eax
mov word ptr [rcx+rsi*2], 0
inc ebp
loc_48022:
mov [rsp+30h+var_40], r15
mov [rsp+30h+var_38], r10
test r12d, r12d
jle loc_480BF
xor esi, esi
loc_48037:
movsxd rax, dword ptr [rbx+rsi*4]
movzx r15d, word ptr [r11+rsi*2]
lea r10, [rax+rax]
movsxd r10, dword ptr [r8+r10*4+4]
lea r10, [rdi+r10*4]
mov r10d, [r10+r15*4]
cmp r10d, 0FFFFFFFFh
jz short loc_480B3
movsxd rbp, ebp
mov [rdx+rbp*4], r10d
mov word ptr [rcx+rbp*2], 1
inc ebp
test rsi, rsi
jnz short loc_480B3
cmp ebp, 3
jnz short loc_480B3
mov ebp, [r14+r13*4]
cmp ebp, [r14+r13*4+4]
jz short loc_480A5
lea rax, ds:1[rax*2]
mov r9, [rsp+30h+var_68]
mov r10, [r9+18h]
movsxd rax, dword ptr [r10+rax*4]
shl rax, 2
add rax, [r9+30h]
cmp [rax+r15*4], ebp
jnz short loc_480A5
rol qword ptr [rdx], 20h
rol dword ptr [rcx], 10h
loc_480A5:
rol qword ptr [rdx+4], 20h
rol dword ptr [rcx+2], 10h
mov ebp, 3
loc_480B3:
inc rsi
cmp r12, rsi
jnz loc_48037
loc_480BF:
mov rax, [rsp+30h+var_40]
mov rcx, [rsp+30h+var_48]
mov [rcx+rax*4], ebp
mov rsi, [rsp+30h+var_58]
mov r9, [rsp+30h+var_60]
mov r10, [rsp+30h+var_38]
loc_480DB:
inc r10
mov rax, [rsp+30h+var_68]
movsxd rax, dword ptr [rax+4]
cmp r10, rax
jl loc_47F42
loc_480F0:
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexEdgesFromParentEdges(
OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement *this)
{
long long result; // rax
long long v2; // rsi
long long v3; // r9
long long v4; // r8
long long v5; // rdi
long long v6; // r10
long long v7; // r15
int v8; // edx
long long v9; // rax
long long v10; // r11
long long v11; // rbx
long long v12; // r14
long long v13; // r11
long long v14; // r12
int v15; // eax
long long v16; // r13
long long v17; // r15
int v18; // ebp
int v19; // ecx
bool v20; // zf
long long v21; // rdx
long long v22; // r13
long long v23; // rcx
_QWORD *v24; // rdx
_DWORD *v25; // rcx
int v26; // eax
int v27; // eax
long long i; // rsi
long long v29; // rax
long long v30; // r15
int v31; // r10d
int v32; // ebp
long long v33; // [rsp+0h] [rbp-68h]
long long v34; // [rsp+8h] [rbp-60h]
long long v35; // [rsp+10h] [rbp-58h]
long long v36; // [rsp+18h] [rbp-50h]
long long v37; // [rsp+20h] [rbp-48h]
long long v38; // [rsp+28h] [rbp-40h]
long long v39; // [rsp+30h] [rbp-38h]
result = *((_QWORD *)this + 1);
v33 = result;
if ( *(int *)(result + 4) > 0 )
{
v36 = *((_QWORD *)this + 27);
v2 = *((_QWORD *)this + 24);
v3 = *((_QWORD *)this + 2);
v4 = *((_QWORD *)this + 13);
v5 = *((_QWORD *)this + 18);
v6 = 0LL;
v35 = v2;
v34 = v3;
do
{
v7 = *(int *)(v36 + 4 * v6);
if ( v7 != -1 )
{
v8 = *(_DWORD *)(v36 + 4 * v6);
v9 = *(_QWORD *)(v33 + 144);
v10 = *(int *)(v9 + 8 * v6 + 4);
v11 = *(_QWORD *)(v33 + 168) + 4 * v10;
v12 = *(_QWORD *)(v33 + 120);
v13 = *(_QWORD *)(v33 + 192) + 2 * v10;
v14 = *(unsigned int *)(v9 + 8 * v6);
v15 = v14 + 2;
v16 = *(_QWORD *)(v3 + 336);
*(_DWORD *)(v16 + 8 * v7) = v14 + 2;
v17 = 2 * v7;
v18 = 0;
v19 = 0;
v20 = v8 == 0;
v21 = v16;
if ( !v20 )
v19 = *(_DWORD *)(v16 + 4 * v17 - 8) + *(_DWORD *)(v16 + 4 * v17 - 4);
v22 = 2 * v6;
*(_DWORD *)(v21 + 4 * v17 + 4) = v19;
if ( *(_DWORD *)(v3 + 20) > v15 )
v15 = *(_DWORD *)(v3 + 20);
*(_DWORD *)(v3 + 20) = v15;
v37 = v21;
v23 = *(int *)(v21 + 4LL * (int)(v17 | 1));
v24 = (_QWORD *)(*(_QWORD *)(v3 + 360) + 4 * v23);
v25 = (_DWORD *)(*(_QWORD *)(v3 + 384) + 2 * v23);
v26 = *(_DWORD *)(v2 + 8 * v6);
if ( v26 != -1 )
{
*(_DWORD *)v24 = v26;
*(_WORD *)v25 = 0;
v18 = 1;
}
v27 = *(_DWORD *)(v2 + 8 * v6 + 4);
if ( v27 != -1 )
{
*((_DWORD *)v24 + (unsigned int)v18) = v27;
*((_WORD *)v25 + (unsigned int)v18++) = 0;
}
v38 = v17;
v39 = v6;
if ( (int)v14 > 0 )
{
for ( i = 0LL; i != v14; ++i )
{
v29 = *(int *)(v11 + 4 * i);
v30 = *(unsigned __int16 *)(v13 + 2 * i);
v31 = *(_DWORD *)(v5 + 4LL * *(int *)(v4 + 8 * v29 + 4) + 4 * v30);
if ( v31 != -1 )
{
*((_DWORD *)v24 + v18) = v31;
*((_WORD *)v25 + v18++) = 1;
if ( !i && v18 == 3 )
{
v32 = *(_DWORD *)(v12 + 4 * v22);
if ( v32 != *(_DWORD *)(v12 + 4 * v22 + 4)
&& *(_DWORD *)(*(_QWORD *)(v33 + 48)
+ 4LL * *(int *)(*(_QWORD *)(v33 + 24) + 4 * (2 * v29 + 1))
+ 4 * v30) == v32 )
{
*v24 = __ROL8__(*v24, 32);
*v25 = __ROL4__(*v25, 16);
}
*(_QWORD *)((char *)v24 + 4) = __ROL8__(*(_QWORD *)((char *)v24 + 4), 32);
*(_DWORD *)((char *)v25 + 2) = __ROL4__(*(_DWORD *)((char *)v25 + 2), 16);
v18 = 3;
}
}
}
}
*(_DWORD *)(v37 + 4 * v38) = v18;
v2 = v35;
v3 = v34;
v6 = v39;
}
++v6;
result = *(int *)(v33 + 4);
}
while ( v6 < result );
}
return result;
}
| populateVertexEdgesFromParentEdges:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RAX,qword ptr [RDI + 0x8]
MOV qword ptr [RSP + -0x38],RAX
CMP dword ptr [RAX + 0x4],0x0
JLE 0x001480f0
MOV RAX,qword ptr [RDI + 0xd8]
MOV qword ptr [RSP + -0x20],RAX
MOV RSI,qword ptr [RDI + 0xc0]
MOV R9,qword ptr [RDI + 0x10]
MOV R8,qword ptr [RDI + 0x68]
MOV RDI,qword ptr [RDI + 0x90]
XOR R10D,R10D
MOV qword ptr [RSP + -0x28],RSI
MOV qword ptr [RSP + -0x30],R9
LAB_00147f42:
MOV RAX,qword ptr [RSP + -0x20]
MOVSXD R15,dword ptr [RAX + R10*0x4]
CMP R15,-0x1
JZ 0x001480db
MOV EDX,R15D
MOV RCX,qword ptr [RSP + -0x38]
MOV RAX,qword ptr [RCX + 0x90]
MOVSXD R11,dword ptr [RAX + R10*0x8 + 0x4]
LEA RBX,[R11*0x4]
ADD RBX,qword ptr [RCX + 0xa8]
MOV R14,qword ptr [RCX + 0x78]
ADD R11,R11
ADD R11,qword ptr [RCX + 0xc0]
MOV R12D,dword ptr [RAX + R10*0x8]
LEA EAX,[R12 + 0x2]
MOV R13,qword ptr [R9 + 0x150]
MOV dword ptr [R13 + R15*0x8],EAX
ADD R15,R15
XOR EBP,EBP
MOV ECX,0x0
TEST EDX,EDX
MOV RDX,R13
JZ 0x00147fb6
MOV ECX,dword ptr [RDX + R15*0x4 + -0x4]
ADD ECX,dword ptr [RDX + R15*0x4 + -0x8]
LAB_00147fb6:
LEA R13,[R10 + R10*0x1]
MOV dword ptr [RDX + R15*0x4 + 0x4],ECX
MOV ECX,dword ptr [R9 + 0x14]
CMP ECX,EAX
CMOVG EAX,ECX
MOV dword ptr [R9 + 0x14],EAX
MOV EAX,R15D
OR EAX,0x1
CDQE
MOV qword ptr [RSP + -0x18],RDX
MOVSXD RCX,dword ptr [RDX + RAX*0x4]
LEA RDX,[RCX*0x4]
ADD RDX,qword ptr [R9 + 0x168]
ADD RCX,RCX
ADD RCX,qword ptr [R9 + 0x180]
MOV EAX,dword ptr [RSI + R13*0x4]
CMP EAX,-0x1
JZ 0x0014800b
MOV dword ptr [RDX],EAX
MOV word ptr [RCX],0x0
MOV EBP,0x1
LAB_0014800b:
MOV EAX,dword ptr [RSI + R13*0x4 + 0x4]
CMP EAX,-0x1
JZ 0x00148022
MOV ESI,EBP
MOV dword ptr [RDX + RSI*0x4],EAX
MOV word ptr [RCX + RSI*0x2],0x0
INC EBP
LAB_00148022:
MOV qword ptr [RSP + -0x10],R15
MOV qword ptr [RSP + -0x8],R10
TEST R12D,R12D
JLE 0x001480bf
XOR ESI,ESI
LAB_00148037:
MOVSXD RAX,dword ptr [RBX + RSI*0x4]
MOVZX R15D,word ptr [R11 + RSI*0x2]
LEA R10,[RAX + RAX*0x1]
MOVSXD R10,dword ptr [R8 + R10*0x4 + 0x4]
LEA R10,[RDI + R10*0x4]
MOV R10D,dword ptr [R10 + R15*0x4]
CMP R10D,-0x1
JZ 0x001480b3
MOVSXD RBP,EBP
MOV dword ptr [RDX + RBP*0x4],R10D
MOV word ptr [RCX + RBP*0x2],0x1
INC EBP
TEST RSI,RSI
JNZ 0x001480b3
CMP EBP,0x3
JNZ 0x001480b3
MOV EBP,dword ptr [R14 + R13*0x4]
CMP EBP,dword ptr [R14 + R13*0x4 + 0x4]
JZ 0x001480a5
LEA RAX,[0x1 + RAX*0x2]
MOV R9,qword ptr [RSP + -0x38]
MOV R10,qword ptr [R9 + 0x18]
MOVSXD RAX,dword ptr [R10 + RAX*0x4]
SHL RAX,0x2
ADD RAX,qword ptr [R9 + 0x30]
CMP dword ptr [RAX + R15*0x4],EBP
JNZ 0x001480a5
ROL qword ptr [RDX],0x20
ROL dword ptr [RCX],0x10
LAB_001480a5:
ROL qword ptr [RDX + 0x4],0x20
ROL dword ptr [RCX + 0x2],0x10
MOV EBP,0x3
LAB_001480b3:
INC RSI
CMP R12,RSI
JNZ 0x00148037
LAB_001480bf:
MOV RAX,qword ptr [RSP + -0x10]
MOV RCX,qword ptr [RSP + -0x18]
MOV dword ptr [RCX + RAX*0x4],EBP
MOV RSI,qword ptr [RSP + -0x28]
MOV R9,qword ptr [RSP + -0x30]
MOV R10,qword ptr [RSP + -0x8]
LAB_001480db:
INC R10
MOV RAX,qword ptr [RSP + -0x38]
MOVSXD RAX,dword ptr [RAX + 0x4]
CMP R10,RAX
JL 0x00147f42
LAB_001480f0:
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexEdgesFromParentEdges() */
void __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexEdgesFromParentEdges
(QuadRefinement *this)
{
ulong *puVar1;
uint *puVar2;
int iVar3;
uint uVar4;
long lVar5;
long lVar6;
long lVar7;
long lVar8;
long lVar9;
long lVar10;
long lVar11;
long lVar12;
long lVar13;
long lVar14;
int iVar15;
int iVar16;
long lVar17;
uint *puVar18;
ulong *puVar19;
int4 uVar20;
ulong uVar21;
ulong uVar22;
long lVar23;
long lVar24;
long lVar25;
ulong uVar26;
bool bVar27;
lVar5 = *(long *)(this + 8);
if (0 < *(int *)(lVar5 + 4)) {
lVar6 = *(long *)(this + 0xd8);
lVar7 = *(long *)(this + 0xc0);
lVar8 = *(long *)(this + 0x10);
lVar9 = *(long *)(this + 0x68);
lVar10 = *(long *)(this + 0x90);
lVar23 = 0;
do {
iVar3 = *(int *)(lVar6 + lVar23 * 4);
lVar25 = (long)iVar3;
if (lVar25 != -1) {
lVar24 = (long)*(int *)(*(long *)(lVar5 + 0x90) + 4 + lVar23 * 8);
lVar11 = *(long *)(lVar5 + 0xa8);
lVar12 = *(long *)(lVar5 + 0x78);
lVar13 = *(long *)(lVar5 + 0xc0);
uVar4 = *(uint *)(*(long *)(lVar5 + 0x90) + lVar23 * 8);
iVar15 = uVar4 + 2;
lVar14 = *(long *)(lVar8 + 0x150);
*(int *)(lVar14 + lVar25 * 8) = iVar15;
iVar16 = 0;
if (iVar3 != 0) {
iVar16 = *(int *)(lVar14 + -4 + lVar25 * 8) + *(int *)(lVar14 + -8 + lVar25 * 8);
}
*(int *)(lVar14 + 4 + lVar25 * 8) = iVar16;
if (iVar15 < *(int *)(lVar8 + 0x14)) {
iVar15 = *(int *)(lVar8 + 0x14);
}
*(int *)(lVar8 + 0x14) = iVar15;
lVar17 = (long)*(int *)(lVar14 + (long)(int)(iVar3 * 2 | 1) * 4);
puVar19 = (ulong *)(lVar17 * 4 + *(long *)(lVar8 + 0x168));
puVar18 = (uint *)(lVar17 * 2 + *(long *)(lVar8 + 0x180));
iVar3 = *(int *)(lVar7 + lVar23 * 8);
bVar27 = iVar3 != -1;
if (bVar27) {
*(int *)puVar19 = iVar3;
*(int2 *)puVar18 = 0;
}
uVar21 = (ulong)bVar27;
iVar3 = *(int *)(lVar7 + 4 + lVar23 * 8);
if (iVar3 != -1) {
*(int *)((long)puVar19 + uVar21 * 4) = iVar3;
*(int2 *)((long)puVar18 + uVar21 * 2) = 0;
uVar21 = (ulong)(bVar27 + 1);
}
uVar20 = (int4)uVar21;
if (0 < (int)uVar4) {
uVar22 = 0;
do {
lVar17 = (long)*(int *)(lVar24 * 4 + lVar11 + uVar22 * 4);
uVar26 = (ulong)*(ushort *)(lVar24 * 2 + lVar13 + uVar22 * 2);
iVar3 = *(int *)(lVar10 + (long)*(int *)(lVar9 + 4 + lVar17 * 8) * 4 + uVar26 * 4);
if (iVar3 != -1) {
iVar15 = (int)uVar21;
*(int *)((long)puVar19 + (long)iVar15 * 4) = iVar3;
*(int2 *)((long)puVar18 + (long)iVar15 * 2) = 1;
uVar21 = (ulong)(iVar15 + 1U);
if ((uVar22 == 0) && (iVar15 + 1U == 3)) {
iVar3 = *(int *)(lVar12 + lVar23 * 8);
if ((iVar3 != *(int *)(lVar12 + 4 + lVar23 * 8)) &&
(*(int *)((long)*(int *)(*(long *)(lVar5 + 0x18) + (lVar17 * 2 + 1) * 4) * 4 +
*(long *)(lVar5 + 0x30) + uVar26 * 4) == iVar3)) {
*puVar19 = *puVar19 << 0x20 | *puVar19 >> 0x20;
*puVar18 = *puVar18 << 0x10 | *puVar18 >> 0x10;
}
puVar1 = (ulong *)((long)puVar19 + 4);
*puVar1 = *puVar1 << 0x20 | *puVar1 >> 0x20;
puVar2 = (uint *)((long)puVar18 + 2);
*puVar2 = *puVar2 << 0x10 | *puVar2 >> 0x10;
uVar21 = 3;
}
}
uVar20 = (int4)uVar21;
uVar22 = uVar22 + 1;
} while (uVar4 != uVar22);
}
*(int4 *)(lVar14 + lVar25 * 8) = uVar20;
}
lVar23 = lVar23 + 1;
} while (lVar23 < *(int *)(lVar5 + 4));
}
return;
}
| |
23,173 | OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexEdgesFromParentEdges() | NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/quadRefinement.cpp | void
QuadRefinement::populateVertexEdgesFromParentEdges() {
//
// This relation turns out to be awkward to populate given the mixed parentage
// of the incident edges of the child vertex of an edge -- two child edges
// originate from the parent edge while one or more will originate from the
// faces incident the parent edge. The need to interleave these for proper
// CC-wise orientation is what really complicates this.
//
// Unlike other relations, we generate the results and then re-order them as
// needed. In this case we assign the first two incident edges as the child
// edges of the parent edge, followed then by those originating from a parent
// face. We then swap the second and third (and possibly the first two) so
// that we have the desired origin sequence beginning [edge, face, edge, ...]
//
for (int pEdge = 0; pEdge < _parent->getNumEdges(); ++pEdge) {
int cVert = _edgeChildVertIndex[pEdge];
if (!IndexIsValid(cVert)) continue;
ConstIndexArray pEdgeFaces = _parent->getEdgeFaces(pEdge);
ConstLocalIndexArray pEdgeInFace = _parent->getEdgeFaceLocalIndices(pEdge);
ConstIndexArray pEdgeVerts = _parent->getEdgeVertices(pEdge),
pEdgeChildEdges = getEdgeChildEdges(pEdge);
//
// Reserve enough vert-edges, populate and trim to the actual size:
//
_child->resizeVertexEdges(cVert, pEdgeFaces.size() + 2);
IndexArray cVertEdges = _child->getVertexEdges(cVert);
LocalIndexArray cVertInEdge = _child->getVertexEdgeLocalIndices(cVert);
//
// Identify and assign the first two child edges of the parent edge -- until
// we look more closely at the orientation of the parent edge in the first
// face we don't know what order these two should be in, so just assign them
// for now and swap them later if necessary:
//
int cVertEdgeCount = 0;
if (IndexIsValid(pEdgeChildEdges[0])) {
cVertEdges[cVertEdgeCount] = pEdgeChildEdges[0];
cVertInEdge[cVertEdgeCount] = 0;
cVertEdgeCount++;
}
if (IndexIsValid(pEdgeChildEdges[1])) {
cVertEdges[cVertEdgeCount] = pEdgeChildEdges[1];
cVertInEdge[cVertEdgeCount] = 0;
cVertEdgeCount++;
}
//
// Append the interior edge of each incident parent face -- swapping the
// first face-edge with the second edge-edge just added to get the desired
// sequence of child edges originating from (edge, face0, edge, ...)
//
for (int i = 0; i < pEdgeFaces.size(); ++i) {
Index pFace = pEdgeFaces[i];
int edgeInFace = pEdgeInFace[i];
Index cEdgeOfFace = getFaceChildEdges(pFace)[edgeInFace];
if (IndexIsValid(cEdgeOfFace)) {
cVertEdges[cVertEdgeCount] = cEdgeOfFace;
cVertInEdge[cVertEdgeCount] = 1;
cVertEdgeCount++;
// Check if swapping this first face-edge with the last edge-edge
// is necessary:
if ((i == 0) && (cVertEdgeCount == 3)) {
// Remember to order the first of the two child edges according
// to the parent edge's orientation in this first face:
if ((pEdgeVerts[0] != pEdgeVerts[1]) &&
(_parent->getFaceVertices(pFace)[edgeInFace] == pEdgeVerts[0])) {
std::swap(cVertEdges[0], cVertEdges[1]);
std::swap(cVertInEdge[0], cVertInEdge[1]);
}
std::swap(cVertEdges[1], cVertEdges[2]);
std::swap(cVertInEdge[1], cVertInEdge[2]);
}
}
}
_child->trimVertexEdges(cVert, cVertEdgeCount);
}
} | O2 | cpp | OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexEdgesFromParentEdges():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
xorl %ebp, %ebp
movq %rdi, 0x18(%rsp)
movq 0x8(%rbx), %rdi
movslq 0x4(%rdi), %rax
cmpq %rax, %rbp
jge 0x60256
movq 0xd8(%rbx), %rax
movslq (%rax,%rbp,4), %r14
cmpq $-0x1, %r14
je 0x6024e
movl %ebp, %esi
callq 0x52330
movq %rax, 0x40(%rsp)
movl %edx, %r15d
movq 0x8(%rbx), %rdi
movl %ebp, %esi
callq 0x540a0
movq %rax, 0x38(%rsp)
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rdi
movq 0x78(%rax), %rax
movq %rax, 0x30(%rsp)
movq 0xc0(%rbx), %r12
movq %r15, 0x10(%rsp)
leal 0x2(%r15), %edx
movl %r14d, %esi
callq 0x4f4f0
movq 0x10(%rbx), %rdi
movl %r14d, %esi
callq 0x4f370
movq %rax, %r15
movq 0x10(%rbx), %rdi
movq %r14, 0x20(%rsp)
movl %r14d, %esi
callq 0x516c0
movq %rax, %r14
movl (%r12,%rbp,8), %eax
cmpl $-0x1, %eax
je 0x60108
movl %eax, (%r15)
andw $0x0, (%r14)
pushq $0x1
popq %rax
movl %eax, %r13d
jmp 0x6010b
xorl %r13d, %r13d
leaq (,%rbp,2), %rsi
movl 0x4(%r12,%rsi,4), %eax
cmpl $-0x1, %eax
movq %r15, 0x8(%rsp)
movq %rbp, 0x28(%rsp)
je 0x60137
movl %r13d, %ecx
movl %eax, (%r15,%rcx,4)
andw $0x0, (%r14,%rcx,2)
incl %r13d
movq 0x10(%rsp), %rcx
testl %ecx, %ecx
movl $0x0, %eax
cmovlel %eax, %ecx
movq %rcx, 0x10(%rsp)
xorl %ebp, %ebp
cmpq %rbp, 0x10(%rsp)
je 0x60230
movq %rsi, %r15
movq 0x40(%rsp), %rax
movl (%rax,%rbp,4), %r12d
movq 0x38(%rsp), %rax
movzwl (%rax,%rbp,2), %ebx
movq 0x18(%rsp), %rdi
movl %r12d, %esi
callq 0x4f470
movl (%rax,%rbx,4), %eax
cmpl $-0x1, %eax
je 0x601ca
movslq %r13d, %r13
movq 0x8(%rsp), %rcx
movl %eax, (%rcx,%r13,4)
movw $0x1, (%r14,%r13,2)
incl %r13d
testq %rbp, %rbp
movq %r15, %rsi
jne 0x60228
cmpl $0x3, %r13d
jne 0x60228
movq 0x30(%rsp), %r13
movl (%r13,%rsi,4), %eax
cmpl 0x4(%r13,%rsi,4), %eax
jne 0x601cf
movq 0x8(%rsp), %rdi
movl 0x4(%rdi), %ecx
movzwl 0x2(%r14), %eax
jmp 0x6020a
movq %r15, %rsi
jmp 0x60228
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rdi
movl %r12d, %esi
callq 0x52db0
movq %r15, %rsi
movl (%rax,%rbx,4), %edx
movq 0x8(%rsp), %rdi
movl 0x4(%rdi), %ecx
movzwl 0x2(%r14), %eax
cmpl (%r13,%r15,4), %edx
jne 0x6020a
movl (%rdi), %edx
movl %ecx, (%rdi)
movzwl (%r14), %ecx
movw %ax, (%r14)
movl %ecx, %eax
movl %edx, %ecx
movl 0x8(%rdi), %edx
movl %edx, 0x4(%rdi)
movl %ecx, 0x8(%rdi)
movzwl 0x4(%r14), %ecx
movw %cx, 0x2(%r14)
movw %ax, 0x4(%r14)
pushq $0x3
popq %rax
movl %eax, %r13d
incq %rbp
jmp 0x6014d
movq 0x18(%rsp), %rbx
movq 0x10(%rbx), %rax
movq 0x150(%rax), %rax
movq 0x20(%rsp), %rcx
movl %r13d, (%rax,%rcx,8)
movq 0x28(%rsp), %rbp
incq %rbp
jmp 0x6005e
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN10OpenSubdiv6v3_6_03Vtr8internal14QuadRefinement34populateVertexEdgesFromParentEdgesEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rbx, rdi
xor ebp, ebp
mov [rsp+78h+var_60], rdi
loc_6005E:
mov rdi, [rbx+8]; this
movsxd rax, dword ptr [rdi+4]
cmp rbp, rax
jge loc_60256
mov rax, [rbx+0D8h]
movsxd r14, dword ptr [rax+rbp*4]
cmp r14, 0FFFFFFFFFFFFFFFFh
jz loc_6024E
mov esi, ebp; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level12getEdgeFacesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getEdgeFaces(int)
mov [rsp+78h+var_38], rax
mov r15d, edx
mov rdi, [rbx+8]; this
mov esi, ebp; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level23getEdgeFaceLocalIndicesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getEdgeFaceLocalIndices(int)
mov [rsp+78h+var_40], rax
mov rax, [rbx+8]
mov rdi, [rbx+10h]; this
mov rax, [rax+78h]
mov [rsp+78h+var_48], rax
mov r12, [rbx+0C0h]
mov [rsp+78h+var_68], r15
lea edx, [r15+2]; int
mov esi, r14d; int
call __ZN10OpenSubdiv6v3_6_03Vtr8internal5Level17resizeVertexEdgesEii; OpenSubdiv::v3_6_0::Vtr::internal::Level::resizeVertexEdges(int,int)
mov rdi, [rbx+10h]; this
mov esi, r14d; int
call __ZN10OpenSubdiv6v3_6_03Vtr8internal5Level14getVertexEdgesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexEdges(int)
mov r15, rax
mov rdi, [rbx+10h]; this
mov [rsp+78h+var_58], r14
mov esi, r14d; int
call __ZN10OpenSubdiv6v3_6_03Vtr8internal5Level25getVertexEdgeLocalIndicesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexEdgeLocalIndices(int)
mov r14, rax
mov eax, [r12+rbp*8]
cmp eax, 0FFFFFFFFh
jz short loc_60108
mov [r15], eax
and word ptr [r14], 0
push 1
pop rax
mov r13d, eax
jmp short loc_6010B
loc_60108:
xor r13d, r13d
loc_6010B:
lea rsi, ds:0[rbp*2]
mov eax, [r12+rsi*4+4]
cmp eax, 0FFFFFFFFh
mov [rsp+78h+var_70], r15
mov [rsp+78h+var_50], rbp
jz short loc_60137
mov ecx, r13d
mov [r15+rcx*4], eax
and word ptr [r14+rcx*2], 0
inc r13d
loc_60137:
mov rcx, [rsp+78h+var_68]
test ecx, ecx
mov eax, 0
cmovle ecx, eax
mov [rsp+78h+var_68], rcx
xor ebp, ebp
loc_6014D:
cmp [rsp+78h+var_68], rbp
jz loc_60230
mov r15, rsi
mov rax, [rsp+78h+var_38]
mov r12d, [rax+rbp*4]
mov rax, [rsp+78h+var_40]
movzx ebx, word ptr [rax+rbp*2]
mov rdi, [rsp+78h+var_60]; this
mov esi, r12d; int
call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement17getFaceChildEdgesEi; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::getFaceChildEdges(int)
mov eax, [rax+rbx*4]
cmp eax, 0FFFFFFFFh
jz short loc_601CA
movsxd r13, r13d
mov rcx, [rsp+78h+var_70]
mov [rcx+r13*4], eax
mov word ptr [r14+r13*2], 1
inc r13d
test rbp, rbp
mov rsi, r15
jnz loc_60228
cmp r13d, 3
jnz short loc_60228
mov r13, [rsp+78h+var_48]
mov eax, [r13+rsi*4+0]
cmp eax, [r13+rsi*4+4]
jnz short loc_601CF
mov rdi, [rsp+78h+var_70]
mov ecx, [rdi+4]
movzx eax, word ptr [r14+2]
jmp short loc_6020A
loc_601CA:
mov rsi, r15
jmp short loc_60228
loc_601CF:
mov rax, [rsp+78h+var_60]
mov rdi, [rax+8]; this
mov esi, r12d; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level15getFaceVerticesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(int)
mov rsi, r15
mov edx, [rax+rbx*4]
mov rdi, [rsp+78h+var_70]
mov ecx, [rdi+4]
movzx eax, word ptr [r14+2]
cmp edx, [r13+r15*4+0]
jnz short loc_6020A
mov edx, [rdi]
mov [rdi], ecx
movzx ecx, word ptr [r14]
mov [r14], ax
mov eax, ecx
mov ecx, edx
loc_6020A:
mov edx, [rdi+8]
mov [rdi+4], edx
mov [rdi+8], ecx
movzx ecx, word ptr [r14+4]
mov [r14+2], cx
mov [r14+4], ax
push 3
pop rax
mov r13d, eax
loc_60228:
inc rbp
jmp loc_6014D
loc_60230:
mov rbx, [rsp+78h+var_60]
mov rax, [rbx+10h]
mov rax, [rax+150h]
mov rcx, [rsp+78h+var_58]
mov [rax+rcx*8], r13d
mov rbp, [rsp+78h+var_50]
loc_6024E:
inc rbp
jmp loc_6005E
loc_60256:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexEdgesFromParentEdges(
OpenSubdiv::v3_6_0::Vtr::internal::Level **this)
{
OpenSubdiv::v3_6_0::Vtr::internal::Level **v1; // rbx
long long i; // rbp
int *v3; // rdi
long long result; // rax
long long v5; // r14
unsigned int v6; // edx
long long v7; // r15
OpenSubdiv::v3_6_0::Vtr::internal::Level *v8; // r12
_DWORD *VertexEdges; // r15
__int16 *VertexEdgeLocalIndices; // r14
int v11; // eax
int v12; // r13d
long long v13; // rsi
int v14; // eax
long long v15; // rcx
long long j; // rbp
int v17; // r12d
long long v18; // rbx
int v19; // eax
_DWORD *v20; // rdi
int v21; // ecx
__int16 v22; // ax
int v23; // edx
int v24; // edx
__int16 v25; // cx
long long v26; // [rsp+10h] [rbp-68h]
long long v27; // [rsp+10h] [rbp-68h]
long long v29; // [rsp+20h] [rbp-58h]
long long v30; // [rsp+28h] [rbp-50h]
long long v31; // [rsp+30h] [rbp-48h]
long long EdgeFaceLocalIndices; // [rsp+38h] [rbp-40h]
long long EdgeFaces; // [rsp+40h] [rbp-38h]
v1 = this;
for ( i = 0LL; ; ++i )
{
v3 = (int *)v1[1];
result = v3[1];
if ( i >= result )
break;
v5 = *((int *)v1[27] + i);
if ( v5 != -1 )
{
EdgeFaces = OpenSubdiv::v3_6_0::Vtr::internal::Level::getEdgeFaces(
(OpenSubdiv::v3_6_0::Vtr::internal::Level *)v3,
i);
v7 = v6;
EdgeFaceLocalIndices = OpenSubdiv::v3_6_0::Vtr::internal::Level::getEdgeFaceLocalIndices(v1[1], i);
v31 = *((_QWORD *)v1[1] + 15);
v8 = v1[24];
v26 = v7;
OpenSubdiv::v3_6_0::Vtr::internal::Level::resizeVertexEdges(v1[2], v5, v7 + 2);
VertexEdges = (_DWORD *)OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexEdges(v1[2], v5);
v29 = v5;
VertexEdgeLocalIndices = (__int16 *)OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexEdgeLocalIndices(v1[2], v5);
v11 = *((_DWORD *)v8 + 2 * i);
if ( v11 == -1 )
{
v12 = 0;
}
else
{
*VertexEdges = v11;
*VertexEdgeLocalIndices = 0;
v12 = 1;
}
v13 = 2 * i;
v14 = *((_DWORD *)v8 + 2 * i + 1);
v30 = i;
if ( v14 != -1 )
{
VertexEdges[v12] = v14;
VertexEdgeLocalIndices[v12++] = 0;
}
v15 = v26;
if ( (int)v26 <= 0 )
v15 = 0LL;
v27 = v15;
for ( j = 0LL; v27 != j; ++j )
{
v17 = *(_DWORD *)(EdgeFaces + 4 * j);
v18 = *(unsigned __int16 *)(EdgeFaceLocalIndices + 2 * j);
v19 = *(_DWORD *)(OpenSubdiv::v3_6_0::Vtr::internal::Refinement::getFaceChildEdges(
(OpenSubdiv::v3_6_0::Vtr::internal::Refinement *)this,
v17)
+ 4 * v18);
if ( v19 != -1 )
{
VertexEdges[v12] = v19;
VertexEdgeLocalIndices[v12++] = 1;
if ( !j && v12 == 3 )
{
if ( *(_DWORD *)(v31 + 4 * v13) == *(_DWORD *)(v31 + 4 * v13 + 4) )
{
v20 = VertexEdges;
v21 = VertexEdges[1];
v22 = VertexEdgeLocalIndices[1];
}
else
{
v23 = *(_DWORD *)(OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(this[1], v17) + 4 * v18);
v20 = VertexEdges;
v21 = VertexEdges[1];
v22 = VertexEdgeLocalIndices[1];
if ( v23 == *(_DWORD *)(v31 + 4 * v13) )
{
v24 = *VertexEdges;
*VertexEdges = v21;
v25 = *VertexEdgeLocalIndices;
*VertexEdgeLocalIndices = v22;
v22 = v25;
v21 = v24;
}
}
v20[1] = v20[2];
v20[2] = v21;
VertexEdgeLocalIndices[1] = VertexEdgeLocalIndices[2];
VertexEdgeLocalIndices[2] = v22;
v12 = 3;
}
}
}
v1 = this;
*(_DWORD *)(*((_QWORD *)this[2] + 42) + 8 * v29) = v12;
i = v30;
}
}
return result;
}
| populateVertexEdgesFromParentEdges:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RBX,RDI
XOR EBP,EBP
MOV qword ptr [RSP + 0x18],RDI
LAB_0016005e:
MOV RDI,qword ptr [RBX + 0x8]
MOVSXD RAX,dword ptr [RDI + 0x4]
CMP RBP,RAX
JGE 0x00160256
MOV RAX,qword ptr [RBX + 0xd8]
MOVSXD R14,dword ptr [RAX + RBP*0x4]
CMP R14,-0x1
JZ 0x0016024e
MOV ESI,EBP
CALL 0x00152330
MOV qword ptr [RSP + 0x40],RAX
MOV R15D,EDX
MOV RDI,qword ptr [RBX + 0x8]
MOV ESI,EBP
CALL 0x001540a0
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,qword ptr [RBX + 0x8]
MOV RDI,qword ptr [RBX + 0x10]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RSP + 0x30],RAX
MOV R12,qword ptr [RBX + 0xc0]
MOV qword ptr [RSP + 0x10],R15
LEA EDX,[R15 + 0x2]
MOV ESI,R14D
CALL 0x0014f4f0
MOV RDI,qword ptr [RBX + 0x10]
MOV ESI,R14D
CALL 0x0014f370
MOV R15,RAX
MOV RDI,qword ptr [RBX + 0x10]
MOV qword ptr [RSP + 0x20],R14
MOV ESI,R14D
CALL 0x001516c0
MOV R14,RAX
MOV EAX,dword ptr [R12 + RBP*0x8]
CMP EAX,-0x1
JZ 0x00160108
MOV dword ptr [R15],EAX
AND word ptr [R14],0x0
PUSH 0x1
POP RAX
MOV R13D,EAX
JMP 0x0016010b
LAB_00160108:
XOR R13D,R13D
LAB_0016010b:
LEA RSI,[RBP*0x2]
MOV EAX,dword ptr [R12 + RSI*0x4 + 0x4]
CMP EAX,-0x1
MOV qword ptr [RSP + 0x8],R15
MOV qword ptr [RSP + 0x28],RBP
JZ 0x00160137
MOV ECX,R13D
MOV dword ptr [R15 + RCX*0x4],EAX
AND word ptr [R14 + RCX*0x2],0x0
INC R13D
LAB_00160137:
MOV RCX,qword ptr [RSP + 0x10]
TEST ECX,ECX
MOV EAX,0x0
CMOVLE ECX,EAX
MOV qword ptr [RSP + 0x10],RCX
XOR EBP,EBP
LAB_0016014d:
CMP qword ptr [RSP + 0x10],RBP
JZ 0x00160230
MOV R15,RSI
MOV RAX,qword ptr [RSP + 0x40]
MOV R12D,dword ptr [RAX + RBP*0x4]
MOV RAX,qword ptr [RSP + 0x38]
MOVZX EBX,word ptr [RAX + RBP*0x2]
MOV RDI,qword ptr [RSP + 0x18]
MOV ESI,R12D
CALL 0x0014f470
MOV EAX,dword ptr [RAX + RBX*0x4]
CMP EAX,-0x1
JZ 0x001601ca
MOVSXD R13,R13D
MOV RCX,qword ptr [RSP + 0x8]
MOV dword ptr [RCX + R13*0x4],EAX
MOV word ptr [R14 + R13*0x2],0x1
INC R13D
TEST RBP,RBP
MOV RSI,R15
JNZ 0x00160228
CMP R13D,0x3
JNZ 0x00160228
MOV R13,qword ptr [RSP + 0x30]
MOV EAX,dword ptr [R13 + RSI*0x4]
CMP EAX,dword ptr [R13 + RSI*0x4 + 0x4]
JNZ 0x001601cf
MOV RDI,qword ptr [RSP + 0x8]
MOV ECX,dword ptr [RDI + 0x4]
MOVZX EAX,word ptr [R14 + 0x2]
JMP 0x0016020a
LAB_001601ca:
MOV RSI,R15
JMP 0x00160228
LAB_001601cf:
MOV RAX,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RAX + 0x8]
MOV ESI,R12D
CALL 0x00152db0
MOV RSI,R15
MOV EDX,dword ptr [RAX + RBX*0x4]
MOV RDI,qword ptr [RSP + 0x8]
MOV ECX,dword ptr [RDI + 0x4]
MOVZX EAX,word ptr [R14 + 0x2]
CMP EDX,dword ptr [R13 + R15*0x4]
JNZ 0x0016020a
MOV EDX,dword ptr [RDI]
MOV dword ptr [RDI],ECX
MOVZX ECX,word ptr [R14]
MOV word ptr [R14],AX
MOV EAX,ECX
MOV ECX,EDX
LAB_0016020a:
MOV EDX,dword ptr [RDI + 0x8]
MOV dword ptr [RDI + 0x4],EDX
MOV dword ptr [RDI + 0x8],ECX
MOVZX ECX,word ptr [R14 + 0x4]
MOV word ptr [R14 + 0x2],CX
MOV word ptr [R14 + 0x4],AX
PUSH 0x3
POP RAX
MOV R13D,EAX
LAB_00160228:
INC RBP
JMP 0x0016014d
LAB_00160230:
MOV RBX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RBX + 0x10]
MOV RAX,qword ptr [RAX + 0x150]
MOV RCX,qword ptr [RSP + 0x20]
MOV dword ptr [RAX + RCX*0x8],R13D
MOV RBP,qword ptr [RSP + 0x28]
LAB_0016024e:
INC RBP
JMP 0x0016005e
LAB_00160256:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexEdgesFromParentEdges() */
void __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexEdgesFromParentEdges
(QuadRefinement *this)
{
int2 uVar1;
int iVar2;
int iVar3;
int iVar4;
long lVar5;
int2 uVar6;
long lVar7;
int *piVar8;
int2 *puVar9;
long lVar10;
ulong uVar11;
uint uVar12;
ulong uVar13;
ulong uVar14;
long lVar15;
int iVar16;
ulong uVar17;
bool bVar18;
int1 auVar19 [12];
for (lVar15 = 0; lVar15 < *(int *)(*(Level **)(this + 8) + 4); lVar15 = lVar15 + 1) {
iVar2 = *(int *)(*(long *)(this + 0xd8) + lVar15 * 4);
if ((long)iVar2 != -1) {
auVar19 = Level::getEdgeFaces(*(Level **)(this + 8),(int)lVar15);
uVar12 = auVar19._8_4_;
uVar11 = (ulong)uVar12;
lVar7 = Level::getEdgeFaceLocalIndices(*(Level **)(this + 8),(int)lVar15);
lVar5 = *(long *)(*(long *)(this + 8) + 0x78);
lVar10 = *(long *)(this + 0xc0);
Level::resizeVertexEdges(*(Level **)(this + 0x10),iVar2,uVar12 + 2);
piVar8 = (int *)Level::getVertexEdges(*(Level **)(this + 0x10),iVar2);
puVar9 = (int2 *)Level::getVertexEdgeLocalIndices(*(Level **)(this + 0x10),iVar2);
iVar16 = *(int *)(lVar10 + lVar15 * 8);
bVar18 = iVar16 != -1;
if (bVar18) {
*piVar8 = iVar16;
*puVar9 = 0;
}
uVar17 = (ulong)bVar18;
iVar16 = *(int *)(lVar10 + 4 + lVar15 * 8);
if (iVar16 != -1) {
piVar8[uVar17] = iVar16;
puVar9[uVar17] = 0;
uVar17 = (ulong)(bVar18 + 1);
}
if ((int)uVar12 < 1) {
uVar11 = 0;
}
for (uVar14 = 0; iVar16 = (int)uVar17, uVar11 != uVar14; uVar14 = uVar14 + 1) {
iVar3 = *(int *)(auVar19._0_8_ + uVar14 * 4);
uVar13 = (ulong)*(ushort *)(lVar7 + uVar14 * 2);
lVar10 = Refinement::getFaceChildEdges((Refinement *)this,iVar3);
iVar4 = *(int *)(lVar10 + uVar13 * 4);
if (iVar4 != -1) {
piVar8[iVar16] = iVar4;
puVar9[iVar16] = 1;
uVar17 = (ulong)(iVar16 + 1U);
if ((uVar14 == 0) && (iVar16 + 1U == 3)) {
if (*(int *)(lVar5 + lVar15 * 8) == *(int *)(lVar5 + 4 + lVar15 * 8)) {
iVar16 = piVar8[1];
uVar6 = puVar9[1];
}
else {
lVar10 = Level::getFaceVertices(*(Level **)(this + 8),iVar3);
uVar1 = puVar9[1];
iVar16 = piVar8[1];
uVar6 = uVar1;
if (*(int *)(lVar10 + uVar13 * 4) == *(int *)(lVar5 + lVar15 * 8)) {
iVar16 = *piVar8;
*piVar8 = piVar8[1];
uVar6 = *puVar9;
*puVar9 = uVar1;
}
}
piVar8[1] = piVar8[2];
piVar8[2] = iVar16;
puVar9[1] = puVar9[2];
puVar9[2] = uVar6;
uVar17 = 3;
}
}
}
*(int *)(*(long *)(*(long *)(this + 0x10) + 0x150) + (long)iVar2 * 8) = iVar16;
}
}
return;
}
| |
23,174 | OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexEdgesFromParentEdges() | NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/quadRefinement.cpp | void
QuadRefinement::populateVertexEdgesFromParentEdges() {
//
// This relation turns out to be awkward to populate given the mixed parentage
// of the incident edges of the child vertex of an edge -- two child edges
// originate from the parent edge while one or more will originate from the
// faces incident the parent edge. The need to interleave these for proper
// CC-wise orientation is what really complicates this.
//
// Unlike other relations, we generate the results and then re-order them as
// needed. In this case we assign the first two incident edges as the child
// edges of the parent edge, followed then by those originating from a parent
// face. We then swap the second and third (and possibly the first two) so
// that we have the desired origin sequence beginning [edge, face, edge, ...]
//
for (int pEdge = 0; pEdge < _parent->getNumEdges(); ++pEdge) {
int cVert = _edgeChildVertIndex[pEdge];
if (!IndexIsValid(cVert)) continue;
ConstIndexArray pEdgeFaces = _parent->getEdgeFaces(pEdge);
ConstLocalIndexArray pEdgeInFace = _parent->getEdgeFaceLocalIndices(pEdge);
ConstIndexArray pEdgeVerts = _parent->getEdgeVertices(pEdge),
pEdgeChildEdges = getEdgeChildEdges(pEdge);
//
// Reserve enough vert-edges, populate and trim to the actual size:
//
_child->resizeVertexEdges(cVert, pEdgeFaces.size() + 2);
IndexArray cVertEdges = _child->getVertexEdges(cVert);
LocalIndexArray cVertInEdge = _child->getVertexEdgeLocalIndices(cVert);
//
// Identify and assign the first two child edges of the parent edge -- until
// we look more closely at the orientation of the parent edge in the first
// face we don't know what order these two should be in, so just assign them
// for now and swap them later if necessary:
//
int cVertEdgeCount = 0;
if (IndexIsValid(pEdgeChildEdges[0])) {
cVertEdges[cVertEdgeCount] = pEdgeChildEdges[0];
cVertInEdge[cVertEdgeCount] = 0;
cVertEdgeCount++;
}
if (IndexIsValid(pEdgeChildEdges[1])) {
cVertEdges[cVertEdgeCount] = pEdgeChildEdges[1];
cVertInEdge[cVertEdgeCount] = 0;
cVertEdgeCount++;
}
//
// Append the interior edge of each incident parent face -- swapping the
// first face-edge with the second edge-edge just added to get the desired
// sequence of child edges originating from (edge, face0, edge, ...)
//
for (int i = 0; i < pEdgeFaces.size(); ++i) {
Index pFace = pEdgeFaces[i];
int edgeInFace = pEdgeInFace[i];
Index cEdgeOfFace = getFaceChildEdges(pFace)[edgeInFace];
if (IndexIsValid(cEdgeOfFace)) {
cVertEdges[cVertEdgeCount] = cEdgeOfFace;
cVertInEdge[cVertEdgeCount] = 1;
cVertEdgeCount++;
// Check if swapping this first face-edge with the last edge-edge
// is necessary:
if ((i == 0) && (cVertEdgeCount == 3)) {
// Remember to order the first of the two child edges according
// to the parent edge's orientation in this first face:
if ((pEdgeVerts[0] != pEdgeVerts[1]) &&
(_parent->getFaceVertices(pFace)[edgeInFace] == pEdgeVerts[0])) {
std::swap(cVertEdges[0], cVertEdges[1]);
std::swap(cVertInEdge[0], cVertInEdge[1]);
}
std::swap(cVertEdges[1], cVertEdges[2]);
std::swap(cVertInEdge[1], cVertInEdge[2]);
}
}
}
_child->trimVertexEdges(cVert, cVertEdgeCount);
}
} | O3 | cpp | OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexEdgesFromParentEdges():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x8(%rdi), %rax
movq %rax, -0x40(%rsp)
movl 0x4(%rax), %ecx
testl %ecx, %ecx
jle 0x497df
movq 0xd8(%rdi), %rax
movq %rax, -0x28(%rsp)
movq 0xc0(%rdi), %r9
movq 0x10(%rdi), %r10
movq 0x68(%rdi), %r8
movq 0x90(%rdi), %rdi
xorl %r14d, %r14d
movq %r9, -0x30(%rsp)
movq %r10, -0x38(%rsp)
movq -0x28(%rsp), %rax
movslq (%rax,%r14,4), %r15
cmpq $-0x1, %r15
je 0x497d0
movl %r15d, %esi
movq -0x40(%rsp), %rcx
movq 0x90(%rcx), %rax
movslq 0x4(%rax,%r14,8), %r11
leaq (,%r11,4), %rbx
addq 0xa8(%rcx), %rbx
movq 0x78(%rcx), %rdx
movq %rdx, -0x8(%rsp)
addq %r11, %r11
addq 0xc0(%rcx), %r11
movl (%rax,%r14,8), %r12d
leal 0x2(%r12), %eax
movq 0x150(%r10), %rbp
movl %eax, (%rbp,%r15,8)
addq %r15, %r15
xorl %edx, %edx
movl $0x0, %ecx
testl %esi, %esi
je 0x4966d
movl -0x4(%rbp,%r15,4), %ecx
addl -0x8(%rbp,%r15,4), %ecx
leaq (%r14,%r14), %r13
movl %ecx, 0x4(%rbp,%r15,4)
movl 0x14(%r10), %ecx
cmpl %eax, %ecx
cmovgl %ecx, %eax
movl %eax, 0x14(%r10)
movl %r15d, %eax
orl $0x1, %eax
cltq
movq %rbp, -0x20(%rsp)
movslq (%rbp,%rax,4), %rbp
leaq (,%rbp,4), %rcx
addq 0x168(%r10), %rcx
addq %rbp, %rbp
addq 0x180(%r10), %rbp
movl (%r9,%r13,4), %eax
cmpl $-0x1, %eax
je 0x496c4
movl %eax, (%rcx)
movw $0x0, (%rbp)
movl $0x1, %edx
movl 0x4(%r9,%r13,4), %eax
cmpl $-0x1, %eax
je 0x496dc
movl %edx, %esi
movl %eax, (%rcx,%rsi,4)
movw $0x0, (%rbp,%rsi,2)
incl %edx
movq %r15, -0x18(%rsp)
movq %r14, -0x10(%rsp)
testl %r12d, %r12d
jle 0x497ac
xorl %esi, %esi
movslq (%rbx,%rsi,4), %rax
movzwl (%r11,%rsi,2), %r15d
leaq (%rax,%rax), %r10
movslq 0x4(%r8,%r10,4), %r10
leaq (%rdi,%r10,4), %r10
movl (%r10,%r15,4), %r10d
cmpl $-0x1, %r10d
je 0x497a0
movslq %edx, %rdx
movl %r10d, (%rcx,%rdx,4)
movw $0x1, (%rbp,%rdx,2)
incl %edx
testq %rsi, %rsi
jne 0x497a0
cmpl $0x3, %edx
jne 0x497a0
movq -0x8(%rsp), %rdx
movl (%rdx,%r13,4), %r10d
cmpl 0x4(%rdx,%r13,4), %r10d
jne 0x49748
movl 0x4(%rcx), %edx
movzwl 0x2(%rbp), %eax
jmp 0x49784
leaq 0x1(,%rax,2), %rax
movq -0x40(%rsp), %r14
movq 0x18(%r14), %rdx
movslq (%rdx,%rax,4), %r9
shlq $0x2, %r9
addq 0x30(%r14), %r9
movl 0x4(%rcx), %edx
movzwl 0x2(%rbp), %eax
cmpl %r10d, (%r9,%r15,4)
jne 0x49784
movl (%rcx), %r9d
movl %edx, (%rcx)
movzwl (%rbp), %edx
movw %ax, (%rbp)
movl %edx, %eax
movl %r9d, %edx
movl 0x8(%rcx), %r9d
movl %r9d, 0x4(%rcx)
movl %edx, 0x8(%rcx)
movzwl 0x4(%rbp), %edx
movw %dx, 0x2(%rbp)
movw %ax, 0x4(%rbp)
movl $0x3, %edx
incq %rsi
cmpq %rsi, %r12
jne 0x496f1
movq -0x18(%rsp), %rax
movq -0x20(%rsp), %rcx
movl %edx, (%rcx,%rax,4)
movq -0x40(%rsp), %rax
movl 0x4(%rax), %ecx
movq -0x30(%rsp), %r9
movq -0x38(%rsp), %r10
movq -0x10(%rsp), %r14
incq %r14
movslq %ecx, %rax
cmpq %rax, %r14
jl 0x495f7
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN10OpenSubdiv6v3_6_03Vtr8internal14QuadRefinement34populateVertexEdgesFromParentEdgesEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
mov rax, [rdi+8]
mov [rsp+30h+var_70], rax
mov ecx, [rax+4]
test ecx, ecx
jle loc_497DF
mov rax, [rdi+0D8h]
mov [rsp+30h+var_58], rax
mov r9, [rdi+0C0h]
mov r10, [rdi+10h]
mov r8, [rdi+68h]
mov rdi, [rdi+90h]
xor r14d, r14d
mov [rsp+30h+var_60], r9
mov [rsp+30h+var_68], r10
loc_495F7:
mov rax, [rsp+30h+var_58]
movsxd r15, dword ptr [rax+r14*4]
cmp r15, 0FFFFFFFFFFFFFFFFh
jz loc_497D0
mov esi, r15d
mov rcx, [rsp+30h+var_70]
mov rax, [rcx+90h]
movsxd r11, dword ptr [rax+r14*8+4]
lea rbx, ds:0[r11*4]
add rbx, [rcx+0A8h]
mov rdx, [rcx+78h]
mov [rsp+30h+var_38], rdx
add r11, r11
add r11, [rcx+0C0h]
mov r12d, [rax+r14*8]
lea eax, [r12+2]
mov rbp, [r10+150h]
mov [rbp+r15*8+0], eax
add r15, r15
xor edx, edx
mov ecx, 0
test esi, esi
jz short loc_4966D
mov ecx, [rbp+r15*4-4]
add ecx, [rbp+r15*4-8]
loc_4966D:
lea r13, [r14+r14]
mov [rbp+r15*4+4], ecx
mov ecx, [r10+14h]
cmp ecx, eax
cmovg eax, ecx
mov [r10+14h], eax
mov eax, r15d
or eax, 1
cdqe
mov [rsp+30h+var_50], rbp
movsxd rbp, dword ptr [rbp+rax*4+0]
lea rcx, ds:0[rbp*4]
add rcx, [r10+168h]
add rbp, rbp
add rbp, [r10+180h]
mov eax, [r9+r13*4]
cmp eax, 0FFFFFFFFh
jz short loc_496C4
mov [rcx], eax
mov word ptr [rbp+0], 0
mov edx, 1
loc_496C4:
mov eax, [r9+r13*4+4]
cmp eax, 0FFFFFFFFh
jz short loc_496DC
mov esi, edx
mov [rcx+rsi*4], eax
mov word ptr [rbp+rsi*2+0], 0
inc edx
loc_496DC:
mov [rsp+30h+var_48], r15
mov [rsp+30h+var_40], r14
test r12d, r12d
jle loc_497AC
xor esi, esi
loc_496F1:
movsxd rax, dword ptr [rbx+rsi*4]
movzx r15d, word ptr [r11+rsi*2]
lea r10, [rax+rax]
movsxd r10, dword ptr [r8+r10*4+4]
lea r10, [rdi+r10*4]
mov r10d, [r10+r15*4]
cmp r10d, 0FFFFFFFFh
jz loc_497A0
movsxd rdx, edx
mov [rcx+rdx*4], r10d
mov word ptr [rbp+rdx*2+0], 1
inc edx
test rsi, rsi
jnz short loc_497A0
cmp edx, 3
jnz short loc_497A0
mov rdx, [rsp+30h+var_38]
mov r10d, [rdx+r13*4]
cmp r10d, [rdx+r13*4+4]
jnz short loc_49748
mov edx, [rcx+4]
movzx eax, word ptr [rbp+2]
jmp short loc_49784
loc_49748:
lea rax, ds:1[rax*2]
mov r14, [rsp+30h+var_70]
mov rdx, [r14+18h]
movsxd r9, dword ptr [rdx+rax*4]
shl r9, 2
add r9, [r14+30h]
mov edx, [rcx+4]
movzx eax, word ptr [rbp+2]
cmp [r9+r15*4], r10d
jnz short loc_49784
mov r9d, [rcx]
mov [rcx], edx
movzx edx, word ptr [rbp+0]
mov [rbp+0], ax
mov eax, edx
mov edx, r9d
loc_49784:
mov r9d, [rcx+8]
mov [rcx+4], r9d
mov [rcx+8], edx
movzx edx, word ptr [rbp+4]
mov [rbp+2], dx
mov [rbp+4], ax
mov edx, 3
loc_497A0:
inc rsi
cmp r12, rsi
jnz loc_496F1
loc_497AC:
mov rax, [rsp+30h+var_48]
mov rcx, [rsp+30h+var_50]
mov [rcx+rax*4], edx
mov rax, [rsp+30h+var_70]
mov ecx, [rax+4]
mov r9, [rsp+30h+var_60]
mov r10, [rsp+30h+var_68]
mov r14, [rsp+30h+var_40]
loc_497D0:
inc r14
movsxd rax, ecx
cmp r14, rax
jl loc_495F7
loc_497DF:
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexEdgesFromParentEdges(
OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement *this)
{
long long result; // rax
int v2; // ecx
long long v3; // r9
long long v4; // r10
long long v5; // r8
long long v6; // rdi
long long v7; // r14
long long v8; // r15
int v9; // esi
long long v10; // rax
long long v11; // r11
long long v12; // rbx
long long v13; // r11
long long v14; // r12
int v15; // eax
long long v16; // rbp
long long v17; // r15
int v18; // edx
int v19; // ecx
long long v20; // rbp
int *v21; // rcx
__int16 *v22; // rbp
int v23; // eax
int v24; // eax
long long i; // rsi
long long v26; // rax
long long v27; // r15
int v28; // r10d
int v29; // r10d
int v30; // edx
__int16 v31; // ax
long long v32; // r9
int v33; // r9d
__int16 v34; // dx
long long v35; // [rsp+0h] [rbp-70h]
long long v36; // [rsp+8h] [rbp-68h]
long long v37; // [rsp+10h] [rbp-60h]
long long v38; // [rsp+18h] [rbp-58h]
long long v39; // [rsp+20h] [rbp-50h]
long long v40; // [rsp+28h] [rbp-48h]
long long v41; // [rsp+38h] [rbp-38h]
result = *((_QWORD *)this + 1);
v35 = result;
v2 = *(_DWORD *)(result + 4);
if ( v2 > 0 )
{
v38 = *((_QWORD *)this + 27);
v3 = *((_QWORD *)this + 24);
v4 = *((_QWORD *)this + 2);
v5 = *((_QWORD *)this + 13);
v6 = *((_QWORD *)this + 18);
v7 = 0LL;
v37 = v3;
v36 = v4;
do
{
v8 = *(int *)(v38 + 4 * v7);
if ( v8 != -1 )
{
v9 = *(_DWORD *)(v38 + 4 * v7);
v10 = *(_QWORD *)(v35 + 144);
v11 = *(int *)(v10 + 8 * v7 + 4);
v12 = *(_QWORD *)(v35 + 168) + 4 * v11;
v41 = *(_QWORD *)(v35 + 120);
v13 = *(_QWORD *)(v35 + 192) + 2 * v11;
v14 = *(unsigned int *)(v10 + 8 * v7);
v15 = v14 + 2;
v16 = *(_QWORD *)(v4 + 336);
*(_DWORD *)(v16 + 8 * v8) = v14 + 2;
v17 = 2 * v8;
v18 = 0;
v19 = 0;
if ( v9 )
v19 = *(_DWORD *)(v16 + 4 * v17 - 8) + *(_DWORD *)(v16 + 4 * v17 - 4);
*(_DWORD *)(v16 + 4 * v17 + 4) = v19;
if ( *(_DWORD *)(v4 + 20) > v15 )
v15 = *(_DWORD *)(v4 + 20);
*(_DWORD *)(v4 + 20) = v15;
v39 = v16;
v20 = *(int *)(v16 + 4LL * (int)(v17 | 1));
v21 = (int *)(*(_QWORD *)(v4 + 360) + 4 * v20);
v22 = (__int16 *)(*(_QWORD *)(v4 + 384) + 2 * v20);
v23 = *(_DWORD *)(v3 + 8 * v7);
if ( v23 != -1 )
{
*v21 = v23;
*v22 = 0;
v18 = 1;
}
v24 = *(_DWORD *)(v3 + 8 * v7 + 4);
if ( v24 != -1 )
{
v21[v18] = v24;
v22[v18++] = 0;
}
v40 = v17;
if ( (int)v14 > 0 )
{
for ( i = 0LL; i != v14; ++i )
{
v26 = *(int *)(v12 + 4 * i);
v27 = *(unsigned __int16 *)(v13 + 2 * i);
v28 = *(_DWORD *)(v6 + 4LL * *(int *)(v5 + 8 * v26 + 4) + 4 * v27);
if ( v28 != -1 )
{
v21[v18] = v28;
v22[v18++] = 1;
if ( !i && v18 == 3 )
{
v29 = *(_DWORD *)(v41 + 8 * v7);
if ( v29 == *(_DWORD *)(v41 + 8 * v7 + 4) )
{
v30 = v21[1];
v31 = v22[1];
}
else
{
v32 = *(_QWORD *)(v35 + 48) + 4LL * *(int *)(*(_QWORD *)(v35 + 24) + 4 * (2 * v26 + 1));
v30 = v21[1];
v31 = v22[1];
if ( *(_DWORD *)(v32 + 4 * v27) == v29 )
{
v33 = *v21;
*v21 = v30;
v34 = *v22;
*v22 = v31;
v31 = v34;
v30 = v33;
}
}
v21[1] = v21[2];
v21[2] = v30;
v22[1] = v22[2];
v22[2] = v31;
v18 = 3;
}
}
}
}
*(_DWORD *)(v39 + 4 * v40) = v18;
v2 = *(_DWORD *)(v35 + 4);
v3 = v37;
v4 = v36;
}
++v7;
result = v2;
}
while ( v7 < v2 );
}
return result;
}
| populateVertexEdgesFromParentEdges:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RAX,qword ptr [RDI + 0x8]
MOV qword ptr [RSP + -0x40],RAX
MOV ECX,dword ptr [RAX + 0x4]
TEST ECX,ECX
JLE 0x001497df
MOV RAX,qword ptr [RDI + 0xd8]
MOV qword ptr [RSP + -0x28],RAX
MOV R9,qword ptr [RDI + 0xc0]
MOV R10,qword ptr [RDI + 0x10]
MOV R8,qword ptr [RDI + 0x68]
MOV RDI,qword ptr [RDI + 0x90]
XOR R14D,R14D
MOV qword ptr [RSP + -0x30],R9
MOV qword ptr [RSP + -0x38],R10
LAB_001495f7:
MOV RAX,qword ptr [RSP + -0x28]
MOVSXD R15,dword ptr [RAX + R14*0x4]
CMP R15,-0x1
JZ 0x001497d0
MOV ESI,R15D
MOV RCX,qword ptr [RSP + -0x40]
MOV RAX,qword ptr [RCX + 0x90]
MOVSXD R11,dword ptr [RAX + R14*0x8 + 0x4]
LEA RBX,[R11*0x4]
ADD RBX,qword ptr [RCX + 0xa8]
MOV RDX,qword ptr [RCX + 0x78]
MOV qword ptr [RSP + -0x8],RDX
ADD R11,R11
ADD R11,qword ptr [RCX + 0xc0]
MOV R12D,dword ptr [RAX + R14*0x8]
LEA EAX,[R12 + 0x2]
MOV RBP,qword ptr [R10 + 0x150]
MOV dword ptr [RBP + R15*0x8],EAX
ADD R15,R15
XOR EDX,EDX
MOV ECX,0x0
TEST ESI,ESI
JZ 0x0014966d
MOV ECX,dword ptr [RBP + R15*0x4 + -0x4]
ADD ECX,dword ptr [RBP + R15*0x4 + -0x8]
LAB_0014966d:
LEA R13,[R14 + R14*0x1]
MOV dword ptr [RBP + R15*0x4 + 0x4],ECX
MOV ECX,dword ptr [R10 + 0x14]
CMP ECX,EAX
CMOVG EAX,ECX
MOV dword ptr [R10 + 0x14],EAX
MOV EAX,R15D
OR EAX,0x1
CDQE
MOV qword ptr [RSP + -0x20],RBP
MOVSXD RBP,dword ptr [RBP + RAX*0x4]
LEA RCX,[RBP*0x4]
ADD RCX,qword ptr [R10 + 0x168]
ADD RBP,RBP
ADD RBP,qword ptr [R10 + 0x180]
MOV EAX,dword ptr [R9 + R13*0x4]
CMP EAX,-0x1
JZ 0x001496c4
MOV dword ptr [RCX],EAX
MOV word ptr [RBP],0x0
MOV EDX,0x1
LAB_001496c4:
MOV EAX,dword ptr [R9 + R13*0x4 + 0x4]
CMP EAX,-0x1
JZ 0x001496dc
MOV ESI,EDX
MOV dword ptr [RCX + RSI*0x4],EAX
MOV word ptr [RBP + RSI*0x2],0x0
INC EDX
LAB_001496dc:
MOV qword ptr [RSP + -0x18],R15
MOV qword ptr [RSP + -0x10],R14
TEST R12D,R12D
JLE 0x001497ac
XOR ESI,ESI
LAB_001496f1:
MOVSXD RAX,dword ptr [RBX + RSI*0x4]
MOVZX R15D,word ptr [R11 + RSI*0x2]
LEA R10,[RAX + RAX*0x1]
MOVSXD R10,dword ptr [R8 + R10*0x4 + 0x4]
LEA R10,[RDI + R10*0x4]
MOV R10D,dword ptr [R10 + R15*0x4]
CMP R10D,-0x1
JZ 0x001497a0
MOVSXD RDX,EDX
MOV dword ptr [RCX + RDX*0x4],R10D
MOV word ptr [RBP + RDX*0x2],0x1
INC EDX
TEST RSI,RSI
JNZ 0x001497a0
CMP EDX,0x3
JNZ 0x001497a0
MOV RDX,qword ptr [RSP + -0x8]
MOV R10D,dword ptr [RDX + R13*0x4]
CMP R10D,dword ptr [RDX + R13*0x4 + 0x4]
JNZ 0x00149748
MOV EDX,dword ptr [RCX + 0x4]
MOVZX EAX,word ptr [RBP + 0x2]
JMP 0x00149784
LAB_00149748:
LEA RAX,[0x1 + RAX*0x2]
MOV R14,qword ptr [RSP + -0x40]
MOV RDX,qword ptr [R14 + 0x18]
MOVSXD R9,dword ptr [RDX + RAX*0x4]
SHL R9,0x2
ADD R9,qword ptr [R14 + 0x30]
MOV EDX,dword ptr [RCX + 0x4]
MOVZX EAX,word ptr [RBP + 0x2]
CMP dword ptr [R9 + R15*0x4],R10D
JNZ 0x00149784
MOV R9D,dword ptr [RCX]
MOV dword ptr [RCX],EDX
MOVZX EDX,word ptr [RBP]
MOV word ptr [RBP],AX
MOV EAX,EDX
MOV EDX,R9D
LAB_00149784:
MOV R9D,dword ptr [RCX + 0x8]
MOV dword ptr [RCX + 0x4],R9D
MOV dword ptr [RCX + 0x8],EDX
MOVZX EDX,word ptr [RBP + 0x4]
MOV word ptr [RBP + 0x2],DX
MOV word ptr [RBP + 0x4],AX
MOV EDX,0x3
LAB_001497a0:
INC RSI
CMP R12,RSI
JNZ 0x001496f1
LAB_001497ac:
MOV RAX,qword ptr [RSP + -0x18]
MOV RCX,qword ptr [RSP + -0x20]
MOV dword ptr [RCX + RAX*0x4],EDX
MOV RAX,qword ptr [RSP + -0x40]
MOV ECX,dword ptr [RAX + 0x4]
MOV R9,qword ptr [RSP + -0x30]
MOV R10,qword ptr [RSP + -0x38]
MOV R14,qword ptr [RSP + -0x10]
LAB_001497d0:
INC R14
MOVSXD RAX,ECX
CMP R14,RAX
JL 0x001495f7
LAB_001497df:
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexEdgesFromParentEdges() */
void __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexEdgesFromParentEdges
(QuadRefinement *this)
{
int2 uVar1;
uint uVar2;
long lVar3;
long lVar4;
long lVar5;
long lVar6;
long lVar7;
long lVar8;
long lVar9;
long lVar10;
long lVar11;
long lVar12;
int2 uVar13;
int iVar14;
int iVar15;
int *piVar16;
uint uVar17;
int iVar18;
long lVar19;
int2 *puVar20;
ulong uVar21;
long lVar22;
long lVar23;
long lVar24;
ulong uVar25;
lVar3 = *(long *)(this + 8);
iVar14 = *(int *)(lVar3 + 4);
if (0 < iVar14) {
lVar4 = *(long *)(this + 0xd8);
lVar5 = *(long *)(this + 0xc0);
lVar6 = *(long *)(this + 0x10);
lVar7 = *(long *)(this + 0x68);
lVar8 = *(long *)(this + 0x90);
lVar23 = 0;
do {
iVar18 = *(int *)(lVar4 + lVar23 * 4);
lVar24 = (long)iVar18;
if (lVar24 != -1) {
lVar22 = (long)*(int *)(*(long *)(lVar3 + 0x90) + 4 + lVar23 * 8);
lVar9 = *(long *)(lVar3 + 0xa8);
lVar10 = *(long *)(lVar3 + 0x78);
lVar11 = *(long *)(lVar3 + 0xc0);
uVar2 = *(uint *)(*(long *)(lVar3 + 0x90) + lVar23 * 8);
iVar14 = uVar2 + 2;
lVar12 = *(long *)(lVar6 + 0x150);
*(int *)(lVar12 + lVar24 * 8) = iVar14;
iVar15 = 0;
if (iVar18 != 0) {
iVar15 = *(int *)(lVar12 + -4 + lVar24 * 8) + *(int *)(lVar12 + -8 + lVar24 * 8);
}
*(int *)(lVar12 + 4 + lVar24 * 8) = iVar15;
if (iVar14 < *(int *)(lVar6 + 0x14)) {
iVar14 = *(int *)(lVar6 + 0x14);
}
*(int *)(lVar6 + 0x14) = iVar14;
lVar19 = (long)*(int *)(lVar12 + (long)(int)(iVar18 * 2 | 1) * 4);
piVar16 = (int *)(lVar19 * 4 + *(long *)(lVar6 + 0x168));
puVar20 = (int2 *)(lVar19 * 2 + *(long *)(lVar6 + 0x180));
iVar14 = *(int *)(lVar5 + lVar23 * 8);
if (iVar14 != -1) {
*piVar16 = iVar14;
*puVar20 = 0;
}
uVar17 = (uint)(iVar14 != -1);
iVar14 = *(int *)(lVar5 + 4 + lVar23 * 8);
if (iVar14 != -1) {
piVar16[uVar17] = iVar14;
puVar20[uVar17] = 0;
uVar17 = uVar17 + 1;
}
if (0 < (int)uVar2) {
uVar21 = 0;
do {
lVar19 = (long)*(int *)(lVar22 * 4 + lVar9 + uVar21 * 4);
uVar25 = (ulong)*(ushort *)(lVar22 * 2 + lVar11 + uVar21 * 2);
iVar14 = *(int *)(lVar8 + (long)*(int *)(lVar7 + 4 + lVar19 * 8) * 4 + uVar25 * 4);
if (iVar14 != -1) {
piVar16[(int)uVar17] = iVar14;
puVar20[(int)uVar17] = 1;
uVar17 = uVar17 + 1;
if ((uVar21 == 0) && (uVar17 == 3)) {
iVar14 = *(int *)(lVar10 + lVar23 * 8);
if (iVar14 == *(int *)(lVar10 + 4 + lVar23 * 8)) {
iVar18 = piVar16[1];
uVar13 = puVar20[1];
}
else {
uVar1 = puVar20[1];
iVar18 = piVar16[1];
uVar13 = uVar1;
if (*(int *)((long)*(int *)(*(long *)(lVar3 + 0x18) + (lVar19 * 2 + 1) * 4) * 4 +
*(long *)(lVar3 + 0x30) + uVar25 * 4) == iVar14) {
iVar18 = *piVar16;
*piVar16 = piVar16[1];
uVar13 = *puVar20;
*puVar20 = uVar1;
}
}
piVar16[1] = piVar16[2];
piVar16[2] = iVar18;
puVar20[1] = puVar20[2];
puVar20[2] = uVar13;
uVar17 = 3;
}
}
uVar21 = uVar21 + 1;
} while (uVar2 != uVar21);
}
*(uint *)(lVar12 + lVar24 * 8) = uVar17;
iVar14 = *(int *)(lVar3 + 4);
}
lVar23 = lVar23 + 1;
} while (lVar23 < iVar14);
}
return;
}
| |
23,175 | st_select_lex_unit::init_query() | eloqsql/sql/sql_lex.cc | void st_select_lex_unit::init_query()
{
init_query_common();
set_linkage(GLOBAL_OPTIONS_TYPE);
lim.clear();
union_distinct= 0;
item= 0;
union_result= 0;
table= 0;
fake_select_lex= 0;
saved_fake_select_lex= 0;
item_list.empty();
found_rows_for_union= 0;
derived= 0;
with_clause= 0;
with_element= 0;
/* reset all bit fields */
prepared= 0;
optimized= 0;
optimized_2= 0;
executed= 0;
cleaned= 0;
bag_set_op_optimized= 0;
optimize_started= 0;
have_except_all_or_intersect_all= 0;
with_wrapped_tvc= 0;
is_view= 0;
describe= 0;
cloned_from= 0;
columns_are_renamed= 0;
} | O0 | cpp | st_select_lex_unit::init_query():
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
callq 0x8c5210
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0x8dfab0
movq -0x10(%rbp), %rdi
addq $0x758, %rdi # imm = 0x758
callq 0x8dfae0
movq -0x10(%rbp), %rdi
movq $0x0, 0x7b0(%rdi)
movq $0x0, 0x770(%rdi)
movq $0x0, 0x728(%rdi)
movq $0x0, 0x738(%rdi)
movq $0x0, 0x7a0(%rdi)
movq $0x0, 0x7a8(%rdi)
addq $0x7c0, %rdi # imm = 0x7C0
callq 0x7dd9b0
movq -0x10(%rbp), %rax
movq $0x0, 0x730(%rax)
movq $0x0, 0x778(%rax)
movq $0x0, 0x780(%rax)
movq $0x0, 0x788(%rax)
movw 0x7f0(%rax), %cx
andw $-0x2, %cx
orw $0x0, %cx
movw %cx, 0x7f0(%rax)
movw 0x7f0(%rax), %cx
andw $-0x3, %cx
orw $0x0, %cx
movw %cx, 0x7f0(%rax)
movw 0x7f0(%rax), %cx
andw $-0x5, %cx
orw $0x0, %cx
movw %cx, 0x7f0(%rax)
movw 0x7f0(%rax), %cx
andw $-0x9, %cx
orw $0x0, %cx
movw %cx, 0x7f0(%rax)
movw 0x7f0(%rax), %cx
andw $-0x11, %cx
orw $0x0, %cx
movw %cx, 0x7f0(%rax)
movw 0x7f0(%rax), %cx
andw $-0x21, %cx
orw $0x0, %cx
movw %cx, 0x7f0(%rax)
movw 0x7f0(%rax), %cx
andw $-0x41, %cx
orw $0x0, %cx
movw %cx, 0x7f0(%rax)
movw 0x7f0(%rax), %cx
andw $0xff7f, %cx # imm = 0xFF7F
orw $0x0, %cx
movw %cx, 0x7f0(%rax)
movw 0x7f0(%rax), %cx
andw $0xfeff, %cx # imm = 0xFEFF
orw $0x0, %cx
movw %cx, 0x7f0(%rax)
movw 0x7f0(%rax), %cx
andw $0xfdff, %cx # imm = 0xFDFF
orw $0x0, %cx
movw %cx, 0x7f0(%rax)
movw 0x7f0(%rax), %cx
andw $0xfbff, %cx # imm = 0xFBFF
orw $0x0, %cx
movw %cx, 0x7f0(%rax)
movq $0x0, 0x790(%rax)
movw 0x7f0(%rax), %cx
andw $0xf7ff, %cx # imm = 0xF7FF
orw $0x0, %cx
movw %cx, 0x7f0(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _ZN18st_select_lex_unit10init_queryEv:
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 _ZN18st_select_lex_node17init_query_commonEv; st_select_lex_node::init_query_common(void)
mov rdi, [rbp+var_10]
mov esi, 4
call _ZN18st_select_lex_node11set_linkageE15sub_select_type; st_select_lex_node::set_linkage(sub_select_type)
mov rdi, [rbp+var_10]
add rdi, 758h; this
call _ZN21Select_limit_counters5clearEv; Select_limit_counters::clear(void)
mov rdi, [rbp+var_10]
mov qword ptr [rdi+7B0h], 0
mov qword ptr [rdi+770h], 0
mov qword ptr [rdi+728h], 0
mov qword ptr [rdi+738h], 0
mov qword ptr [rdi+7A0h], 0
mov qword ptr [rdi+7A8h], 0
add rdi, 7C0h; this
call _ZN9base_list5emptyEv; base_list::empty(void)
mov rax, [rbp+var_10]
mov qword ptr [rax+730h], 0
mov qword ptr [rax+778h], 0
mov qword ptr [rax+780h], 0
mov qword ptr [rax+788h], 0
mov cx, [rax+7F0h]
and cx, 0FFFEh
or cx, 0
mov [rax+7F0h], cx
mov cx, [rax+7F0h]
and cx, 0FFFDh
or cx, 0
mov [rax+7F0h], cx
mov cx, [rax+7F0h]
and cx, 0FFFBh
or cx, 0
mov [rax+7F0h], cx
mov cx, [rax+7F0h]
and cx, 0FFF7h
or cx, 0
mov [rax+7F0h], cx
mov cx, [rax+7F0h]
and cx, 0FFEFh
or cx, 0
mov [rax+7F0h], cx
mov cx, [rax+7F0h]
and cx, 0FFDFh
or cx, 0
mov [rax+7F0h], cx
mov cx, [rax+7F0h]
and cx, 0FFBFh
or cx, 0
mov [rax+7F0h], cx
mov cx, [rax+7F0h]
and cx, 0FF7Fh
or cx, 0
mov [rax+7F0h], cx
mov cx, [rax+7F0h]
and cx, 0FEFFh
or cx, 0
mov [rax+7F0h], cx
mov cx, [rax+7F0h]
and cx, 0FDFFh
or cx, 0
mov [rax+7F0h], cx
mov cx, [rax+7F0h]
and cx, 0FBFFh
or cx, 0
mov [rax+7F0h], cx
mov qword ptr [rax+790h], 0
mov cx, [rax+7F0h]
and cx, 0F7FFh
or cx, 0
mov [rax+7F0h], cx
add rsp, 10h
pop rbp
retn
| st_select_lex_unit * st_select_lex_unit::init_query(st_select_lex_unit *this)
{
st_select_lex_unit *result; // rax
st_select_lex_node::init_query_common(this);
st_select_lex_node::set_linkage(this, 4LL);
Select_limit_counters::clear((st_select_lex_unit *)((char *)this + 1880));
*((_QWORD *)this + 246) = 0LL;
*((_QWORD *)this + 238) = 0LL;
*((_QWORD *)this + 229) = 0LL;
*((_QWORD *)this + 231) = 0LL;
*((_QWORD *)this + 244) = 0LL;
*((_QWORD *)this + 245) = 0LL;
base_list::empty((st_select_lex_unit *)((char *)this + 1984));
result = this;
*((_QWORD *)this + 230) = 0LL;
*((_QWORD *)this + 239) = 0LL;
*((_QWORD *)this + 240) = 0LL;
*((_QWORD *)this + 241) = 0LL;
*((_WORD *)this + 1016) &= ~1u;
*((_WORD *)this + 1016) &= ~2u;
*((_WORD *)this + 1016) &= ~4u;
*((_WORD *)this + 1016) &= ~8u;
*((_WORD *)this + 1016) &= ~0x10u;
*((_WORD *)this + 1016) &= ~0x20u;
*((_WORD *)this + 1016) &= ~0x40u;
*((_WORD *)this + 1016) &= ~0x80u;
*((_WORD *)this + 1016) &= ~0x100u;
*((_WORD *)this + 1016) &= ~0x200u;
*((_WORD *)this + 1016) &= ~0x400u;
*((_QWORD *)this + 242) = 0LL;
*((_WORD *)this + 1016) &= ~0x800u;
return result;
}
| __cxx_global_var_init.8:
PUSH RBP
MOV RBP,RSP
LEA RDI,[0x2696fb0]
MOV ESI,0x1800000
CALL 0x008db900
POP RBP
RET
|
void __cxx_global_var_init_8(void)
{
date_conv_mode_t::date_conv_mode_t((date_conv_mode_t *)&TIME_NO_ZEROS,0x1800000);
return;
}
| |
23,176 | Parser::error_expected(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const | BhuvanGudi[P]LexiParse/src/parser.hpp | void error_expected(const std::string& msg) const
{
std::cerr << "[Parse Error] Expected " << msg << " on line " << peek(-1).value().line << std::endl;
exit(EXIT_FAILURE);
} | O1 | cpp | Parser::error_expected(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x7d5e(%rip), %r15 # 0xcff0
leaq 0x4118(%rip), %rsi # 0x93b1
movl $0x17, %edx
movq %r15, %rdi
callq 0x2230
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r15, %rdi
callq 0x2230
movq %rax, %r14
leaq 0x410a(%rip), %rsi # 0x93c9
movl $0x9, %edx
movq %rax, %rdi
callq 0x2230
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
callq 0x3da6
leaq 0x38(%rsp), %rbx
cmpb $0x0, (%rbx)
je 0x5332
movl 0xc(%rsp), %esi
movq %r14, %rdi
callq 0x22c0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2130
leaq 0x8(%rsp), %rdi
callq 0x3df6
movl $0x1, %edi
callq 0x2240
callq 0x38a0
movq %rax, %r14
cmpb $0x1, 0x38(%rsp)
jne 0x534e
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x23a6
movq %r14, %rdi
callq 0x22d0
| _ZNK6Parser14error_expectedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push rbx
sub rsp, 40h
mov r14, rsi
mov rbx, rdi
mov r15, cs:_ZSt4cerr_ptr
lea rsi, aParseErrorExpe; "[Parse Error] Expected "
mov edx, 17h
mov rdi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [r14]
mov rdx, [r14+8]
mov rdi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r14, rax
lea rsi, aOnLine; " on line "
mov edx, 9
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 rdi, [rsp+58h+var_50]; this
mov rsi, rbx; int
mov edx, 0FFFFFFFFh
call _ZNK6Parser4peekEi; Parser::peek(int)
lea rbx, [rsp+58h+var_20]
cmp byte ptr [rbx], 0
jz short loc_5332
mov esi, [rsp+58h+var_4C]
mov rdi, r14
call __ZNSolsEi; std::ostream::operator<<(int)
mov r14, rax
mov rax, [rax]
mov rdi, [rax-18h]
add rdi, r14
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, r14; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
lea rdi, [rsp+58h+var_50]
call _ZNSt14_Optional_baseI5TokenLb0ELb0EED2Ev; std::_Optional_base<Token,false,false>::~_Optional_base()
mov edi, 1
call _exit
loc_5332:
call _ZSt27__throw_bad_optional_accessv; std::__throw_bad_optional_access(void)
mov r14, rax
cmp [rsp+58h+var_20], 1
jnz short loc_534E
lea rsi, [rsp+58h+var_50]
mov rdi, rbx
call _ZNK6Parser14error_expectedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE_cold_1; Parser::error_expected(std::string const&) [clone]
loc_534E:
mov rdi, r14
call __Unwind_Resume
| void __noreturn Parser::error_expected(long long *a1, _QWORD *a2)
{
long long v2; // r14
std::ostream *v3; // r14
char v4; // al
std::ostream *v5; // rax
_BYTE v6[4]; // [rsp+8h] [rbp-50h] BYREF
unsigned int v7; // [rsp+Ch] [rbp-4Ch]
char v8; // [rsp+38h] [rbp-20h]
std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, "[Parse Error] Expected ", 23LL);
v2 = std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, *a2, a2[1]);
std::__ostream_insert<char,std::char_traits<char>>(v2, " on line ", 9LL);
Parser::peek((Parser *)v6, a1, -1);
if ( v8 )
{
v3 = (std::ostream *)std::ostream::operator<<(v2, v7);
v4 = std::ios::widen((char *)v3 + *(_QWORD *)(*(_QWORD *)v3 - 24LL), 10LL);
v5 = (std::ostream *)std::ostream::put(v3, v4);
std::ostream::flush(v5);
std::_Optional_base<Token,false,false>::~_Optional_base((long long)v6);
exit(1LL);
}
std::__throw_bad_optional_access();
}
| error_expected:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RSI
MOV RBX,RDI
MOV R15,qword ptr [0x0010cff0]
LEA RSI,[0x1093b1]
MOV EDX,0x17
MOV RDI,R15
CALL 0x00102230
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
MOV RDI,R15
CALL 0x00102230
MOV R14,RAX
LEA RSI,[0x1093c9]
MOV EDX,0x9
MOV RDI,RAX
CALL 0x00102230
LEA RDI,[RSP + 0x8]
MOV RSI,RBX
MOV EDX,0xffffffff
CALL 0x00103da6
LEA RBX,[RSP + 0x38]
CMP byte ptr [RBX],0x0
JZ 0x00105332
MOV ESI,dword ptr [RSP + 0xc]
LAB_001052ec:
MOV RDI,R14
CALL 0x001022c0
MOV R14,RAX
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,R14
MOV ESI,0xa
CALL 0x001021d0
MOVSX ESI,AL
MOV RDI,R14
CALL 0x00102040
MOV RDI,RAX
CALL 0x00102130
LEA RDI,[RSP + 0x8]
CALL 0x00103df6
MOV EDI,0x1
CALL 0x00102240
LAB_00105332:
CALL 0x001038a0
|
/* Parser::error_expected(std::__cxx11::string const&) const */
void __thiscall Parser::error_expected(Parser *this,string *param_1)
{
int *puVar1;
ostream *this_00;
long *plVar2;
_Optional_base<Token,false,false> local_50 [4];
int local_4c;
char local_20;
puVar1 = PTR_cerr_0010cff0;
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cerr_0010cff0,"[Parse Error] Expected ",0x17);
this_00 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)puVar1,*(char **)param_1,*(long *)(param_1 + 8));
std::__ostream_insert<char,std::char_traits<char>>(this_00," on line ",9);
peek((int)local_50);
if (local_20 != '\0') {
/* try { // try from 001052ec to 00105336 has its CatchHandler @ 00105337 */
plVar2 = (long *)std::ostream::operator<<(this_00,local_4c);
std::ios::widen((char)*(int8 *)(*plVar2 + -0x18) + (char)plVar2);
std::ostream::put((char)plVar2);
std::ostream::flush();
std::_Optional_base<Token,false,false>::~_Optional_base(local_50);
/* WARNING: Subroutine does not return */
exit(1);
}
/* WARNING: Subroutine does not return */
std::__throw_bad_optional_access();
}
| |
23,177 | Parser::error_expected(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const | BhuvanGudi[P]LexiParse/src/parser.hpp | void error_expected(const std::string& msg) const
{
std::cerr << "[Parse Error] Expected " << msg << " on line " << peek(-1).value().line << std::endl;
exit(EXIT_FAILURE);
} | O2 | cpp | Parser::error_expected(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8cb8(%rip), %rdi # 0xcff0
leaq 0x4046(%rip), %rsi # 0x8385
callq 0x21a0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2190
leaq 0x4047(%rip), %rsi # 0x839d
movq %rax, %rdi
callq 0x21a0
movq %rax, %rbx
leaq 0x8(%rsp), %r15
pushq $-0x1
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x3a44
cmpb $0x0, 0x30(%r15)
je 0x43a1
movl 0xc(%rsp), %esi
movq %rbx, %rdi
callq 0x2260
movq %rax, %rdi
callq 0x20c0
leaq 0x8(%rsp), %rdi
callq 0x3a84
pushq $0x1
popq %rdi
callq 0x21e0
callq 0x34d8
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4492
movq %rbx, %rdi
callq 0x2270
nop
| _ZNK6Parser14error_expectedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push rbx
sub rsp, 40h
mov rbx, rsi
mov r14, rdi
mov rdi, cs:_ZSt4cerr_ptr
lea rsi, aParseErrorExpe; "[Parse Error] Expected "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, rax
mov rsi, rbx
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
lea rsi, aOnLine; " on line "
mov rdi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rbx, rax
lea r15, [rsp+58h+var_50]
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rdi, r15; this
mov rsi, r14; int
call _ZNK6Parser4peekEi; Parser::peek(int)
cmp byte ptr [r15+30h], 0
jz short loc_43A1
mov esi, [rsp+58h+var_4C]
mov rdi, rbx
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+58h+var_50]
call _ZNSt14_Optional_baseI5TokenLb0ELb0EED2Ev; std::_Optional_base<Token,false,false>::~_Optional_base()
push 1
pop rdi
call _exit
loc_43A1:
call _ZSt27__throw_bad_optional_accessv; std::__throw_bad_optional_access(void)
mov rbx, rax
lea rdi, [rsp+58h+var_50]
call _ZNSt22_Optional_payload_baseI5TokenE8_M_resetEv; std::_Optional_payload_base<Token>::_M_reset(void)
mov rdi, rbx
call __Unwind_Resume
| void __noreturn Parser::error_expected(_QWORD *a1, long long a2, long long a3)
{
long long v3; // rax
long long v4; // rax
long long v5; // rdx
long long v6; // rbx
long long v7; // rax
_BYTE v8[4]; // [rsp+8h] [rbp-50h] BYREF
unsigned int v9; // [rsp+Ch] [rbp-4Ch]
char v10; // [rsp+38h] [rbp-20h]
v3 = std::operator<<<std::char_traits<char>>(&std::cerr, "[Parse Error] Expected ", a3);
v4 = std::operator<<<char>(v3, a2);
v6 = std::operator<<<std::char_traits<char>>(v4, " on line ", v5);
Parser::peek((Parser *)v8, a1, -1);
if ( v10 )
{
v7 = std::ostream::operator<<(v6, v9);
std::endl<char,std::char_traits<char>>(v7);
std::_Optional_base<Token,false,false>::~_Optional_base((long long)v8);
exit(1LL);
}
std::__throw_bad_optional_access();
}
| error_expected:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV RBX,RSI
MOV R14,RDI
MOV RDI,qword ptr [0x0010cff0]
LEA RSI,[0x108385]
CALL 0x001021a0
MOV RDI,RAX
MOV RSI,RBX
CALL 0x00102190
LEA RSI,[0x10839d]
MOV RDI,RAX
CALL 0x001021a0
MOV RBX,RAX
LEA R15,[RSP + 0x8]
PUSH -0x1
POP RDX
MOV RDI,R15
MOV RSI,R14
CALL 0x00103a44
CMP byte ptr [R15 + 0x30],0x0
JZ 0x001043a1
MOV ESI,dword ptr [RSP + 0xc]
LAB_0010437f:
MOV RDI,RBX
CALL 0x00102260
MOV RDI,RAX
CALL 0x001020c0
LEA RDI,[RSP + 0x8]
CALL 0x00103a84
PUSH 0x1
POP RDI
CALL 0x001021e0
LAB_001043a1:
CALL 0x001034d8
LAB_001043a6:
MOV RBX,RAX
LEA RDI,[RSP + 0x8]
CALL 0x00104492
MOV RDI,RBX
CALL 0x00102270
|
/* Parser::error_expected(std::__cxx11::string const&) const */
void __thiscall Parser::error_expected(Parser *this,string *param_1)
{
ostream *poVar1;
int8 uVar2;
_Optional_base<Token,false,false> local_50 [4];
int local_4c;
char local_20;
poVar1 = std::operator<<((ostream *)PTR_cerr_0010cff0,"[Parse Error] Expected ");
poVar1 = std::operator<<(poVar1,param_1);
poVar1 = std::operator<<(poVar1," on line ");
peek((int)local_50);
if (local_20 != '\0') {
/* try { // try from 0010437f to 001043a5 has its CatchHandler @ 001043a6 */
poVar1 = (ostream *)std::ostream::operator<<(poVar1,local_4c);
std::endl<char,std::char_traits<char>>(poVar1);
std::_Optional_base<Token,false,false>::~_Optional_base(local_50);
/* WARNING: Subroutine does not return */
exit(1);
}
uVar2 = std::__throw_bad_optional_access();
/* catch() { ... } // from try @ 0010437f with catch @ 001043a6 */
std::_Optional_payload_base<Token>::_M_reset((_Optional_payload_base<Token> *)local_50);
/* WARNING: Subroutine does not return */
_Unwind_Resume(uVar2);
}
| |
23,178 | Parser::error_expected(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const | BhuvanGudi[P]LexiParse/src/parser.hpp | void error_expected(const std::string& msg) const
{
std::cerr << "[Parse Error] Expected " << msg << " on line " << peek(-1).value().line << std::endl;
exit(EXIT_FAILURE);
} | O3 | cpp | Parser::error_expected(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x825c(%rip), %r15 # 0xcff0
leaq 0x4636(%rip), %rsi # 0x93d1
movl $0x17, %edx
movq %r15, %rdi
callq 0x2230
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq %r15, %rdi
callq 0x2230
movq %rax, %r14
leaq 0x4628(%rip), %rsi # 0x93e9
movl $0x9, %edx
movq %rax, %rdi
callq 0x2230
movq 0x18(%rbx), %rax
decq %rax
movq (%rbx), %rsi
movq 0x8(%rbx), %rcx
subq %rsi, %rcx
sarq $0x4, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
cmpq %rdx, %rax
jae 0x4e5c
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
addq %rax, %rsi
leaq 0x8(%rsp), %rdi
callq 0x4e88
leaq 0x38(%rsp), %rbx
movb $0x1, (%rbx)
movl -0x2c(%rbx), %esi
movq %r14, %rdi
callq 0x22c0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2130
leaq 0x8(%rsp), %rdi
callq 0x3bf4
movl $0x1, %edi
callq 0x2240
leaq 0x38(%rsp), %rbx
movb $0x0, (%rbx)
callq 0x36ac
movq %rax, %r14
cmpb $0x1, 0x38(%rsp)
jne 0x4e80
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x23b8
movq %r14, %rdi
callq 0x22d0
| _ZNK6Parser14error_expectedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push rbx
sub rsp, 40h
mov r14, rsi
mov rbx, rdi
mov r15, cs:_ZSt4cerr_ptr
lea rsi, aParseErrorExpe; "[Parse Error] Expected "
mov edx, 17h
mov rdi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rsi, [r14]
mov rdx, [r14+8]
mov rdi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r14, rax
lea rsi, aOnLine; " on line "
mov edx, 9
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 rax, [rbx+18h]
dec rax
mov rsi, [rbx]
mov rcx, [rbx+8]
sub rcx, rsi
sar rcx, 4
mov rdx, 0AAAAAAAAAAAAAAABh
imul rdx, rcx
cmp rax, rdx
jnb short loc_4E5C
lea rax, [rax+rax*2]
shl rax, 4
add rsi, rax
lea rdi, [rsp+58h+var_50]
call _ZNSt22_Optional_payload_baseI5TokenE8_StorageIS0_Lb0EEC2IJRKS0_EEESt10in_place_tDpOT_; std::_Optional_payload_base<Token>::_Storage<Token,false>::_Storage<Token const&>(std::in_place_t,Token const&)
lea rbx, [rsp+58h+var_20]
mov byte ptr [rbx], 1
mov esi, [rbx-2Ch]
mov rdi, r14
call __ZNSolsEi; std::ostream::operator<<(int)
mov r14, rax
mov rax, [rax]
mov rdi, [rax-18h]
add rdi, r14
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx esi, al; char
mov rdi, r14; this
call __ZNSo3putEc; std::ostream::put(char)
mov rdi, rax; this
call __ZNSo5flushEv; std::ostream::flush(void)
lea rdi, [rsp+58h+var_50]
call _ZNSt14_Optional_baseI5TokenLb0ELb0EED2Ev; std::_Optional_base<Token,false,false>::~_Optional_base()
mov edi, 1
call _exit
loc_4E5C:
lea rbx, [rsp+58h+var_20]
mov byte ptr [rbx], 0
call _ZSt27__throw_bad_optional_accessv; std::__throw_bad_optional_access(void)
mov r14, rax
cmp [rsp+58h+var_20], 1
jnz short loc_4E80
lea rsi, [rsp+58h+var_50]
mov rdi, rbx
call _ZNK6Parser14error_expectedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE_cold_1; Parser::error_expected(std::string const&) [clone]
loc_4E80:
mov rdi, r14
call __Unwind_Resume
| void __noreturn Parser::error_expected(_QWORD *a1, _QWORD *a2)
{
long long v2; // r14
unsigned long long v3; // rax
std::ostream *v4; // r14
char v5; // al
std::ostream *v6; // rax
_BYTE v7[4]; // [rsp+8h] [rbp-50h] BYREF
unsigned int v8; // [rsp+Ch] [rbp-4Ch]
char v9; // [rsp+38h] [rbp-20h]
std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, "[Parse Error] Expected ", 23LL);
v2 = std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, *a2, a2[1]);
std::__ostream_insert<char,std::char_traits<char>>(v2, " on line ", 9LL);
v3 = a1[3] - 1LL;
if ( v3 < 0xAAAAAAAAAAAAAAABLL * ((long long)(a1[1] - *a1) >> 4) )
{
std::_Optional_payload_base<Token>::_Storage<Token,false>::_Storage<Token const&>(v7, 48 * v3 + *a1);
v9 = 1;
v4 = (std::ostream *)std::ostream::operator<<(v2, v8);
v5 = std::ios::widen((char *)v4 + *(_QWORD *)(*(_QWORD *)v4 - 24LL), 10LL);
v6 = (std::ostream *)std::ostream::put(v4, v5);
std::ostream::flush(v6);
std::_Optional_base<Token,false,false>::~_Optional_base((long long)v7);
exit(1LL);
}
v9 = 0;
std::__throw_bad_optional_access();
}
| error_expected:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RSI
MOV RBX,RDI
MOV R15,qword ptr [0x0010cff0]
LEA RSI,[0x1093d1]
MOV EDX,0x17
MOV RDI,R15
CALL 0x00102230
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
MOV RDI,R15
CALL 0x00102230
MOV R14,RAX
LEA RSI,[0x1093e9]
MOV EDX,0x9
MOV RDI,RAX
CALL 0x00102230
MOV RAX,qword ptr [RBX + 0x18]
DEC RAX
MOV RSI,qword ptr [RBX]
MOV RCX,qword ptr [RBX + 0x8]
SUB RCX,RSI
SAR RCX,0x4
MOV RDX,-0x5555555555555555
IMUL RDX,RCX
CMP RAX,RDX
JNC 0x00104e5c
LEA RAX,[RAX + RAX*0x2]
SHL RAX,0x4
ADD RSI,RAX
LEA RDI,[RSP + 0x8]
CALL 0x00104e88
LEA RBX,[RSP + 0x38]
MOV byte ptr [RBX],0x1
MOV ESI,dword ptr [RBX + -0x2c]
LAB_00104e16:
MOV RDI,R14
CALL 0x001022c0
MOV R14,RAX
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,R14
MOV ESI,0xa
CALL 0x001021d0
MOVSX ESI,AL
MOV RDI,R14
CALL 0x00102040
MOV RDI,RAX
CALL 0x00102130
LEA RDI,[RSP + 0x8]
CALL 0x00103bf4
MOV EDI,0x1
CALL 0x00102240
LAB_00104e5c:
LEA RBX,[RSP + 0x38]
MOV byte ptr [RBX],0x0
CALL 0x001036ac
|
/* Parser::error_expected(std::__cxx11::string const&) const */
void __thiscall Parser::error_expected(Parser *this,string *param_1)
{
int *puVar1;
ostream *this_00;
long *plVar2;
_Optional_base<Token,false,false> local_50 [4];
int local_4c;
int1 local_20;
puVar1 = PTR_cerr_0010cff0;
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cerr_0010cff0,"[Parse Error] Expected ",0x17);
this_00 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)puVar1,*(char **)param_1,*(long *)(param_1 + 8));
std::__ostream_insert<char,std::char_traits<char>>(this_00," on line ",9);
if (*(long *)(this + 0x18) - 1U <
(ulong)((*(long *)(this + 8) - *(long *)this >> 4) * -0x5555555555555555)) {
std::_Optional_payload_base<Token>::_Storage<Token,false>::_Storage<Token_const&>
(local_50,*(long *)this + (*(long *)(this + 0x18) - 1U) * 0x30);
local_20 = 1;
/* try { // try from 00104e16 to 00104e68 has its CatchHandler @ 00104e69 */
plVar2 = (long *)std::ostream::operator<<(this_00,local_4c);
std::ios::widen((char)*(int8 *)(*plVar2 + -0x18) + (char)plVar2);
std::ostream::put((char)plVar2);
std::ostream::flush();
std::_Optional_base<Token,false,false>::~_Optional_base(local_50);
/* WARNING: Subroutine does not return */
exit(1);
}
local_20 = 0;
/* WARNING: Subroutine does not return */
std::__throw_bad_optional_access();
}
| |
23,179 | mark_blocks_free | eloqsql/mysys/my_alloc.c | static inline void mark_blocks_free(MEM_ROOT* root)
{
reg1 USED_MEM *next;
reg2 USED_MEM **last;
/* iterate through (partially) free blocks, mark them free */
last= &root->free;
for (next= root->free; next; next= *(last= &next->next))
{
next->left= next->size - ALIGN_SIZE(sizeof(USED_MEM));
TRASH_MEM(next);
}
/* Combine the free and the used list */
*last= next=root->used;
/* now go through the used blocks and mark them free */
for (; next; next= next->next)
{
next->left= next->size - ALIGN_SIZE(sizeof(USED_MEM));
TRASH_MEM(next);
}
/* Now everything is set; Indicate that nothing is used anymore */
root->used= 0;
root->first_block_usage= 0;
root->block_num= 4;
} | O0 | c | mark_blocks_free:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x3ab2f
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
subq $0x18, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x3ab18
jmp 0x3ab1a
jmp 0x3ab1c
jmp 0x3ab1e
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq (%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x3aafb
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
movq %rcx, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, -0x10(%rbp)
je 0x3ab72
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
subq $0x18, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x3ab5f
jmp 0x3ab61
jmp 0x3ab63
jmp 0x3ab65
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x3ab42
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x2c(%rax)
movq -0x8(%rbp), %rax
movl $0x4, 0x28(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
| mark_blocks_free:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_10], rax
loc_3AAFB:
cmp [rbp+var_10], 0
jz short loc_3AB2F
mov rax, [rbp+var_10]
mov rcx, [rax+10h]
sub rcx, 18h
mov rax, [rbp+var_10]
mov [rax+8], rcx
jmp short $+2
loc_3AB18:
jmp short $+2
loc_3AB1A:
jmp short $+2
loc_3AB1C:
jmp short $+2
loc_3AB1E:
mov rax, [rbp+var_10]
mov [rbp+var_18], rax
mov rax, [rax]
mov [rbp+var_10], rax
jmp short loc_3AAFB
loc_3AB2F:
mov rax, [rbp+var_8]
mov rcx, [rax+8]
mov [rbp+var_10], rcx
mov rax, [rbp+var_18]
mov [rax], rcx
loc_3AB42:
cmp [rbp+var_10], 0
jz short loc_3AB72
mov rax, [rbp+var_10]
mov rcx, [rax+10h]
sub rcx, 18h
mov rax, [rbp+var_10]
mov [rax+8], rcx
jmp short $+2
loc_3AB5F:
jmp short $+2
loc_3AB61:
jmp short $+2
loc_3AB63:
jmp short $+2
loc_3AB65:
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_10], rax
jmp short loc_3AB42
loc_3AB72:
mov rax, [rbp+var_8]
mov qword ptr [rax+8], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+2Ch], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+28h], 4
pop rbp
retn
| long long mark_blocks_free(long long a1)
{
long long result; // rax
_QWORD *v2; // [rsp+0h] [rbp-18h]
_QWORD *i; // [rsp+8h] [rbp-10h]
_QWORD *v4; // [rsp+8h] [rbp-10h]
v2 = (_QWORD *)a1;
for ( i = *(_QWORD **)a1; i; i = (_QWORD *)*i )
{
i[1] = i[2] - 24LL;
v2 = i;
}
v4 = *(_QWORD **)(a1 + 8);
*v2 = v4;
while ( v4 )
{
v4[1] = v4[2] - 24LL;
v4 = (_QWORD *)*v4;
}
*(_QWORD *)(a1 + 8) = 0LL;
*(_DWORD *)(a1 + 44) = 0;
result = a1;
*(_DWORD *)(a1 + 40) = 4;
return result;
}
| mark_blocks_free:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x10],RAX
LAB_0013aafb:
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0013ab2f
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x10]
SUB RCX,0x18
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x0013ab18
LAB_0013ab18:
JMP 0x0013ab1a
LAB_0013ab1a:
JMP 0x0013ab1c
LAB_0013ab1c:
JMP 0x0013ab1e
LAB_0013ab1e:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0013aafb
LAB_0013ab2f:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x10],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
LAB_0013ab42:
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0013ab72
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x10]
SUB RCX,0x18
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x0013ab5f
LAB_0013ab5f:
JMP 0x0013ab61
LAB_0013ab61:
JMP 0x0013ab63
LAB_0013ab63:
JMP 0x0013ab65
LAB_0013ab65:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0013ab42
LAB_0013ab72:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x8],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x2c],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x28],0x4
POP RBP
RET
|
void mark_blocks_free(int8 *param_1)
{
int8 *local_20;
int8 *local_18;
local_20 = param_1;
for (local_18 = (int8 *)*param_1; local_18 != (int8 *)0x0;
local_18 = (int8 *)*local_18) {
local_18[1] = local_18[2] + -0x18;
local_20 = local_18;
}
local_18 = (int8 *)param_1[1];
*local_20 = local_18;
for (; local_18 != (int8 *)0x0; local_18 = (int8 *)*local_18) {
local_18[1] = local_18[2] + -0x18;
}
param_1[1] = 0;
*(int4 *)((long)param_1 + 0x2c) = 0;
*(int4 *)(param_1 + 5) = 4;
return;
}
| |
23,180 | my_mutex_init | eloqsql/mysys/thr_mutex.c | void my_mutex_init()
{
/* Initialize mutex attributes */
#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
/*
Set mutex type to "fast" a.k.a "adaptive"
In this case the thread may steal the mutex from some other thread
that is waiting for the same mutex. This will save us some
context switches but may cause a thread to 'starve forever' while
waiting for the mutex (not likely if the code within the mutex is
short).
*/
pthread_mutexattr_init(&my_fast_mutexattr);
pthread_mutexattr_settype(&my_fast_mutexattr,
PTHREAD_MUTEX_ADAPTIVE_NP);
#endif
#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
/*
Set mutex type to "errorcheck"
*/
pthread_mutexattr_init(&my_errorcheck_mutexattr);
pthread_mutexattr_settype(&my_errorcheck_mutexattr,
PTHREAD_MUTEX_ERRORCHECK);
#endif
#if defined(SAFE_MUTEX_DEFINED)
safe_mutex_global_init();
#endif
} | O3 | c | my_mutex_init:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x341987(%rip), %rbx # 0x36ab68
movq %rbx, %rdi
callq 0x24060
movq %rbx, %rdi
movl $0x3, %esi
callq 0x244e0
leaq 0x34196f(%rip), %rbx # 0x36ab6c
movq %rbx, %rdi
callq 0x24060
movq %rbx, %rdi
movl $0x2, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x244e0
| my_mutex_init:
push rbp
mov rbp, rsp
push rbx
push rax
lea rbx, my_fast_mutexattr
mov rdi, rbx
call _pthread_mutexattr_init
mov rdi, rbx
mov esi, 3
call _pthread_mutexattr_settype
lea rbx, my_errorcheck_mutexattr
mov rdi, rbx
call _pthread_mutexattr_init
mov rdi, rbx
mov esi, 2
add rsp, 8
pop rbx
pop rbp
jmp _pthread_mutexattr_settype
| long long my_mutex_init()
{
pthread_mutexattr_init(&my_fast_mutexattr);
pthread_mutexattr_settype(&my_fast_mutexattr, 3LL);
pthread_mutexattr_init(&my_errorcheck_mutexattr);
return pthread_mutexattr_settype(&my_errorcheck_mutexattr, 2LL);
}
| my_mutex_init:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
LEA RBX,[0x46ab68]
MOV RDI,RBX
CALL 0x00124060
MOV RDI,RBX
MOV ESI,0x3
CALL 0x001244e0
LEA RBX,[0x46ab6c]
MOV RDI,RBX
CALL 0x00124060
MOV RDI,RBX
MOV ESI,0x2
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x001244e0
|
void my_mutex_init(void)
{
pthread_mutexattr_init((pthread_mutexattr_t *)&my_fast_mutexattr);
pthread_mutexattr_settype((pthread_mutexattr_t *)&my_fast_mutexattr,3);
pthread_mutexattr_init((pthread_mutexattr_t *)&my_errorcheck_mutexattr);
pthread_mutexattr_settype((pthread_mutexattr_t *)&my_errorcheck_mutexattr,2);
return;
}
| |
23,181 | common_log::resume() | monkey531[P]llama/common/log.cpp | void resume() {
std::lock_guard<std::mutex> lock(mtx);
if (running) {
return;
}
running = true;
thrd = std::thread([this]() {
while (true) {
{
std::unique_lock<std::mutex> lock(mtx);
cv.wait(lock, [this]() { return head != tail; });
cur = entries[head];
head = (head + 1) % entries.size();
}
if (cur.is_end) {
break;
}
cur.print(); // stdout and stderr
if (file) {
cur.print(file);
}
}
});
} | O2 | cpp | common_log::resume():
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
callq 0x75b94
cmpb $0x0, 0x6a(%rbx)
jne 0x753f2
movb $0x1, 0x6a(%rbx)
leaq 0x10(%rsp), %rsi
movq %rbx, (%rsi)
leaq 0x8(%rsp), %rdi
callq 0x75ba8
leaq 0x28(%rbx), %rdi
leaq 0x8(%rsp), %r14
movq %r14, %rsi
callq 0x75c14
movq %r14, %rdi
callq 0x758c2
movq %rbx, %rdi
callq 0x22580
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x22580
movq %r14, %rdi
callq 0x22d30
nop
| _ZN10common_log6resumeEv:
push r14
push rbx
sub rsp, 18h
mov rbx, rdi
call _ZNSt5mutex4lockEv; std::mutex::lock(void)
cmp byte ptr [rbx+6Ah], 0
jnz short loc_753F2
mov byte ptr [rbx+6Ah], 1
lea rsi, [rsp+28h+var_18]
mov [rsi], rbx
lea rdi, [rsp+28h+var_20]
call _ZNSt6threadC2IZN10common_log6resumeEvEUlvE_JEvEEOT_DpOT0_
lea rdi, [rbx+28h]
lea r14, [rsp+28h+var_20]
mov rsi, r14
call _ZNSt6threadaSEOS_; std::thread::operator=(std::thread&&)
mov rdi, r14; this
call _ZNSt6threadD2Ev; std::thread::~thread()
loc_753F2:
mov rdi, rbx
call _pthread_mutex_unlock
add rsp, 18h
pop rbx
pop r14
retn
mov r14, rax
mov rdi, rbx
call _pthread_mutex_unlock
mov rdi, r14
call __Unwind_Resume
| long long common_log::resume(common_log *this)
{
_BYTE v2[8]; // [rsp+8h] [rbp-20h] BYREF
common_log *v3; // [rsp+10h] [rbp-18h]
std::mutex::lock(this);
if ( !*((_BYTE *)this + 106) )
{
*((_BYTE *)this + 106) = 1;
v3 = this;
ZNSt6threadC2IZN10common_log6resumeEvEUlvE_JEvEEOT_DpOT0_(v2);
std::thread::operator=((char *)this + 40, v2);
std::thread::~thread((std::thread *)v2);
}
return pthread_mutex_unlock(this);
}
| resume:
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
CALL 0x00175b94
CMP byte ptr [RBX + 0x6a],0x0
JNZ 0x001753f2
MOV byte ptr [RBX + 0x6a],0x1
LEA RSI,[RSP + 0x10]
MOV qword ptr [RSI],RBX
LAB_001753cf:
LEA RDI,[RSP + 0x8]
CALL 0x00175ba8
LAB_001753d9:
LEA RDI,[RBX + 0x28]
LEA R14,[RSP + 0x8]
MOV RSI,R14
CALL 0x00175c14
MOV RDI,R14
CALL 0x001758c2
LAB_001753f2:
MOV RDI,RBX
CALL 0x00122580
ADD RSP,0x18
POP RBX
POP R14
RET
|
/* common_log::resume() */
void __thiscall common_log::resume(common_log *this)
{
thread local_20 [8];
common_log *local_18;
std::mutex::lock((mutex *)this);
if (this[0x6a] == (common_log)0x0) {
this[0x6a] = (common_log)0x1;
/* try { // try from 001753cf to 001753d8 has its CatchHandler @ 00175402 */
local_18 = this;
std::thread::thread<common_log::resume()::_lambda()_1_,,void>
(local_20,(_lambda___1_ *)&local_18);
std::thread::operator=((thread *)(this + 0x28),local_20);
std::thread::~thread(local_20);
}
pthread_mutex_unlock((pthread_mutex_t *)this);
return;
}
| |
23,182 | common_log::resume() | monkey531[P]llama/common/log.cpp | void resume() {
std::lock_guard<std::mutex> lock(mtx);
if (running) {
return;
}
running = true;
thrd = std::thread([this]() {
while (true) {
{
std::unique_lock<std::mutex> lock(mtx);
cv.wait(lock, [this]() { return head != tail; });
cur = entries[head];
head = (head + 1) % entries.size();
}
if (cur.is_end) {
break;
}
cur.print(); // stdout and stderr
if (file) {
cur.print(file);
}
}
});
} | O3 | cpp | common_log::resume():
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
callq 0x1ab20
testl %eax, %eax
jne 0x8458f
cmpb $0x0, 0x6a(%rbx)
jne 0x8457f
movb $0x1, 0x6a(%rbx)
leaq 0x10(%rsp), %rsi
movq %rbx, (%rsi)
leaq 0x8(%rsp), %rdi
callq 0x84dc2
cmpq $0x0, 0x28(%rbx)
jne 0x84596
movq 0x8(%rsp), %rax
movq %rax, 0x28(%rbx)
movq %rbx, %rdi
callq 0x1a560
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movl %eax, %edi
callq 0x1a4c0
callq 0x1a190
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a560
movq %r14, %rdi
callq 0x1ad30
| _ZN10common_log6resumeEv:
push r14
push rbx
sub rsp, 18h
mov rbx, rdi
call _pthread_mutex_lock
test eax, eax
jnz short loc_8458F
cmp byte ptr [rbx+6Ah], 0
jnz short loc_8457F
mov byte ptr [rbx+6Ah], 1
lea rsi, [rsp+28h+var_18]
mov [rsi], rbx
lea rdi, [rsp+28h+var_20]
call _ZNSt6threadC2IZN10common_log6resumeEvEUlvE_JEvEEOT_DpOT0_
cmp qword ptr [rbx+28h], 0
jnz short loc_84596
mov rax, [rsp+28h+var_20]
mov [rbx+28h], rax
loc_8457F:
mov rdi, rbx
call _pthread_mutex_unlock
add rsp, 18h
pop rbx
pop r14
retn
loc_8458F:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
loc_84596:
call __ZSt9terminatev; std::terminate(void)
mov r14, rax
mov rdi, rbx
call _pthread_mutex_unlock
mov rdi, r14
call __Unwind_Resume
| long long common_log::resume(common_log *this)
{
int v1; // eax
_QWORD v3[4]; // [rsp+8h] [rbp-20h] BYREF
v1 = pthread_mutex_lock();
if ( v1 )
std::__throw_system_error(v1);
if ( !*((_BYTE *)this + 106) )
{
*((_BYTE *)this + 106) = 1;
v3[1] = this;
ZNSt6threadC2IZN10common_log6resumeEvEUlvE_JEvEEOT_DpOT0_(v3);
if ( *((_QWORD *)this + 5) )
std::terminate();
*((_QWORD *)this + 5) = v3[0];
}
return pthread_mutex_unlock(this);
}
| resume:
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
CALL 0x0011ab20
TEST EAX,EAX
JNZ 0x0018458f
CMP byte ptr [RBX + 0x6a],0x0
JNZ 0x0018457f
MOV byte ptr [RBX + 0x6a],0x1
LEA RSI,[RSP + 0x10]
MOV qword ptr [RSI],RBX
LAB_00184565:
LEA RDI,[RSP + 0x8]
CALL 0x00184dc2
LAB_0018456f:
CMP qword ptr [RBX + 0x28],0x0
JNZ 0x00184596
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RBX + 0x28],RAX
LAB_0018457f:
MOV RDI,RBX
CALL 0x0011a560
ADD RSP,0x18
POP RBX
POP R14
RET
LAB_0018458f:
MOV EDI,EAX
CALL 0x0011a4c0
LAB_00184596:
CALL 0x0011a190
|
/* common_log::resume() */
void __thiscall common_log::resume(common_log *this)
{
int iVar1;
int8 local_20;
common_log *local_18;
iVar1 = pthread_mutex_lock((pthread_mutex_t *)this);
if (iVar1 != 0) {
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar1);
}
if (this[0x6a] == (common_log)0x0) {
this[0x6a] = (common_log)0x1;
/* try { // try from 00184565 to 0018456e has its CatchHandler @ 0018459b */
local_18 = this;
std::thread::thread<common_log::resume()::_lambda()_1_,,void>
((thread *)&local_20,(_lambda___1_ *)&local_18);
if (*(long *)(this + 0x28) != 0) {
/* WARNING: Subroutine does not return */
std::terminate();
}
*(int8 *)(this + 0x28) = local_20;
}
pthread_mutex_unlock((pthread_mutex_t *)this);
return;
}
| |
23,183 | HeapSetZeroOnFree | seiftnesse[P]memoryallocator/src/custom_alloc_debug.c | void HeapSetZeroOnFree(int depth, size_t shallow_size) {
if (depth >= ZERO_DEPTH_NONE && depth <= ZERO_DEPTH_DEEP) {
zero_on_free_depth = depth;
} else {
HEAP_LOG("Invalid zero-on-free depth: %d, using default\n", depth);
zero_on_free_depth = ZERO_DEPTH_NONE;
}
if (shallow_size > 0) {
shallow_zero_size = shallow_size;
}
const char *depth_str;
switch (zero_on_free_depth) {
case ZERO_DEPTH_NONE:
depth_str = "none (best performance)";
break;
case ZERO_DEPTH_SHALLOW:
depth_str = "shallow (headers/pointers only)";
break;
case ZERO_DEPTH_MEDIUM:
depth_str = "medium (50% of memory)";
break;
case ZERO_DEPTH_DEEP:
depth_str = "deep (entire memory block)";
break;
default:
depth_str = "unknown";
}
HEAP_LOG("Zero-on-free configured: depth=%s, shallow_size=%zu bytes\n",
depth_str, shallow_zero_size);
} | O0 | c | HeapSetZeroOnFree:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x0, -0x4(%rbp)
jl 0x4d62
cmpl $0x3, -0x4(%rbp)
jg 0x4d62
movl -0x4(%rbp), %eax
movl %eax, 0x41043d8(%rip) # 0x4109138
jmp 0x4d6c
movl $0x0, 0x41043cc(%rip) # 0x4109138
cmpq $0x0, -0x10(%rbp)
jbe 0x4d7e
movq -0x10(%rbp), %rax
movq %rax, 0x3342(%rip) # 0x80c0
movl 0x41043b4(%rip), %eax # 0x4109138
movq %rax, -0x20(%rbp)
subq $0x3, %rax
ja 0x4dd6
movq -0x20(%rbp), %rax
leaq 0x74f(%rip), %rcx # 0x54e8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x74f(%rip), %rax # 0x54f8
movq %rax, -0x18(%rbp)
jmp 0x4de1
leaq 0x75a(%rip), %rax # 0x5510
movq %rax, -0x18(%rbp)
jmp 0x4de1
leaq 0x76d(%rip), %rax # 0x5530
movq %rax, -0x18(%rbp)
jmp 0x4de1
leaq 0x777(%rip), %rax # 0x5547
movq %rax, -0x18(%rbp)
jmp 0x4de1
leaq 0x785(%rip), %rax # 0x5562
movq %rax, -0x18(%rbp)
popq %rbp
retq
nopw %cs:(%rax,%rax)
| HeapSetZeroOnFree:
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
cmp [rbp+var_4], 0
jl short loc_4D62
cmp [rbp+var_4], 3
jg short loc_4D62
mov eax, [rbp+var_4]
mov cs:zero_on_free_depth, eax
jmp short loc_4D6C
loc_4D62:
mov cs:zero_on_free_depth, 0
loc_4D6C:
cmp [rbp+var_10], 0
jbe short loc_4D7E
mov rax, [rbp+var_10]
mov cs:shallow_zero_size, rax
loc_4D7E:
mov eax, cs:zero_on_free_depth
mov [rbp+var_20], rax
sub rax, 3; switch 4 cases
ja short def_4DA0; jumptable 0000000000004DA0 default case
mov rax, [rbp+var_20]
lea rcx, jpt_4DA0
movsxd rax, ds:(jpt_4DA0 - 54E8h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_4DA2:
lea rax, aNoneBestPerfor; jumptable 0000000000004DA0 case 0
mov [rbp+var_18], rax
jmp short loc_4DE1
loc_4DAF:
lea rax, aShallowHeaders; jumptable 0000000000004DA0 case 1
mov [rbp+var_18], rax
jmp short loc_4DE1
loc_4DBC:
lea rax, aMedium50OfMemo; jumptable 0000000000004DA0 case 2
mov [rbp+var_18], rax
jmp short loc_4DE1
loc_4DC9:
lea rax, aDeepEntireMemo; jumptable 0000000000004DA0 case 3
mov [rbp+var_18], rax
jmp short loc_4DE1
def_4DA0:
lea rax, aUnknown; jumptable 0000000000004DA0 default case
mov [rbp+var_18], rax
loc_4DE1:
pop rbp
retn
| const char * HeapSetZeroOnFree(unsigned int a1, int *a2)
{
const char *result; // rax
if ( a1 >= 4 )
zero_on_free_depth = 0;
else
zero_on_free_depth = a1;
if ( a2 )
shallow_zero_size = a2;
switch ( zero_on_free_depth )
{
case 0:
result = "none (best performance)";
break;
case 1:
result = "shallow (headers/pointers only)";
break;
case 2:
result = "medium (50% of memory)";
break;
case 3:
result = "deep (entire memory block)";
break;
default:
result = "unknown";
break;
}
return result;
}
| HeapSetZeroOnFree:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
CMP dword ptr [RBP + -0x4],0x0
JL 0x00104d62
CMP dword ptr [RBP + -0x4],0x3
JG 0x00104d62
MOV EAX,dword ptr [RBP + -0x4]
MOV dword ptr [0x04209138],EAX
JMP 0x00104d6c
LAB_00104d62:
MOV dword ptr [0x04209138],0x0
LAB_00104d6c:
CMP qword ptr [RBP + -0x10],0x0
JBE 0x00104d7e
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [0x001080c0],RAX
LAB_00104d7e:
MOV EAX,dword ptr [0x04209138]
MOV qword ptr [RBP + -0x20],RAX
SUB RAX,0x3
JA 0x00104dd6
MOV RAX,qword ptr [RBP + -0x20]
LEA RCX,[0x1054e8]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
LEA RAX,[0x1054f8]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00104de1
caseD_1:
LEA RAX,[0x105510]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00104de1
caseD_2:
LEA RAX,[0x105530]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00104de1
caseD_3:
LEA RAX,[0x105547]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00104de1
LAB_00104dd6:
LEA RAX,[0x105562]
MOV qword ptr [RBP + -0x18],RAX
default:
POP RBP
RET
|
void HeapSetZeroOnFree(int param_1,long param_2)
{
if ((param_1 < 0) || (zero_on_free_depth = param_1, 3 < param_1)) {
zero_on_free_depth = 0;
}
if (param_2 != 0) {
shallow_zero_size = param_2;
}
switch(zero_on_free_depth) {
case 0:
break;
case 1:
break;
case 2:
break;
case 3:
}
return;
}
| |
23,184 | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan_comment() | monkey531[P]llama/common/json.hpp | bool scan_comment()
{
switch (get())
{
// single-line comments skip input until a newline or EOF is read
case '/':
{
while (true)
{
switch (get())
{
case '\n':
case '\r':
case char_traits<char_type>::eof():
case '\0':
return true;
default:
break;
}
}
}
// multi-line comments skip input until */ is read
case '*':
{
while (true)
{
switch (get())
{
case char_traits<char_type>::eof():
case '\0':
{
error_message = "invalid comment; missing closing '*/'";
return false;
}
case '*':
{
switch (get())
{
case '/':
return true;
default:
{
unget();
continue;
}
}
}
default:
continue;
}
}
}
// unexpected character after reading '/'
default:
{
error_message = "invalid comment; expecting '/' or '*' after '/'";
return false;
}
}
} | O1 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan_comment():
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x1c3fc
cmpl $0x2f, %eax
je 0x6b5a5
cmpl $0x2a, %eax
jne 0x6b5c2
movq %rbx, %rdi
callq 0x1c3fc
leal 0x1(%rax), %ecx
cmpl $0x2, %ecx
jb 0x6b5cb
cmpl $0x2a, %eax
jne 0x6b579
movq %rbx, %rdi
callq 0x1c3fc
cmpl $0x2f, %eax
je 0x6b5be
movq %rbx, %rdi
callq 0x6be8e
jmp 0x6b579
movl $0x4803, %ebp # imm = 0x4803
movq %rbx, %rdi
callq 0x1c3fc
incl %eax
cmpl $0xf, %eax
jae 0x6b5aa
btl %eax, %ebp
jae 0x6b5aa
movb $0x1, %al
jmp 0x6b5d8
leaq 0x89928(%rip), %rax # 0xf4ef1
jmp 0x6b5d2
leaq 0x898f9(%rip), %rax # 0xf4ecb
movq %rax, 0x70(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE12scan_commentEv:
push rbp
push rbx
push rax
mov rbx, rdi
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
cmp eax, 2Fh ; '/'
jz short loc_6B5A5
cmp eax, 2Ah ; '*'
jnz short loc_6B5C2
loc_6B579:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
lea ecx, [rax+1]
cmp ecx, 2
jb short loc_6B5CB
cmp eax, 2Ah ; '*'
jnz short loc_6B579
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
cmp eax, 2Fh ; '/'
jz short loc_6B5BE
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(void)
jmp short loc_6B579
loc_6B5A5:
mov ebp, 4803h
loc_6B5AA:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
inc eax
cmp eax, 0Fh
jnb short loc_6B5AA
bt ebp, eax
jnb short loc_6B5AA
loc_6B5BE:
mov al, 1
jmp short loc_6B5D8
loc_6B5C2:
lea rax, aInvalidComment; "invalid comment; expecting '/' or '*' a"...
jmp short loc_6B5D2
loc_6B5CB:
lea rax, aInvalidComment_0; "invalid comment; missing closing '*/'"
loc_6B5D2:
mov [rbx+70h], rax
xor eax, eax
loc_6B5D8:
add rsp, 8
pop rbx
pop rbp
retn
| char nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_comment(
__m128i *a1)
{
int v1; // eax
int v2; // eax
int v3; // ebp
unsigned int v4; // eax
const char *v6; // rax
v1 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1);
if ( v1 == 47 )
{
v3 = 18435;
do
{
do
v4 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1)
+ 1;
while ( v4 >= 0xF );
}
while ( !_bittest(&v3, v4) );
return 1;
}
else
{
if ( v1 == 42 )
{
while ( 1 )
{
v2 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1);
if ( (unsigned int)(v2 + 1) < 2 )
break;
if ( v2 == 42 )
{
if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) == 47 )
return 1;
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(a1);
}
}
v6 = "invalid comment; missing closing '*/'";
}
else
{
v6 = "invalid comment; expecting '/' or '*' after '/'";
}
a1[7].m128i_i64[0] = (long long)v6;
return 0;
}
}
| scan_comment:
PUSH RBP
PUSH RBX
PUSH RAX
MOV RBX,RDI
CALL 0x0011c3fc
CMP EAX,0x2f
JZ 0x0016b5a5
CMP EAX,0x2a
JNZ 0x0016b5c2
LAB_0016b579:
MOV RDI,RBX
CALL 0x0011c3fc
LEA ECX,[RAX + 0x1]
CMP ECX,0x2
JC 0x0016b5cb
CMP EAX,0x2a
JNZ 0x0016b579
MOV RDI,RBX
CALL 0x0011c3fc
CMP EAX,0x2f
JZ 0x0016b5be
MOV RDI,RBX
CALL 0x0016be8e
JMP 0x0016b579
LAB_0016b5a5:
MOV EBP,0x4803
LAB_0016b5aa:
MOV RDI,RBX
CALL 0x0011c3fc
INC EAX
CMP EAX,0xf
JNC 0x0016b5aa
BT EBP,EAX
JNC 0x0016b5aa
LAB_0016b5be:
MOV AL,0x1
JMP 0x0016b5d8
LAB_0016b5c2:
LEA RAX,[0x1f4ef1]
JMP 0x0016b5d2
LAB_0016b5cb:
LEA RAX,[0x1f4ecb]
LAB_0016b5d2:
MOV qword ptr [RBX + 0x70],RAX
XOR EAX,EAX
LAB_0016b5d8:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::scan_comment() */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::scan_comment(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
int iVar1;
int8 uVar2;
char *pcVar3;
iVar1 = get(this);
if (iVar1 == 0x2f) {
do {
do {
iVar1 = get(this);
} while (0xe < iVar1 + 1U);
} while ((0x4803U >> (iVar1 + 1U & 0x1f) & 1) == 0);
LAB_0016b5be:
uVar2 = 1;
}
else {
if (iVar1 == 0x2a) {
while (iVar1 = get(this), 1 < iVar1 + 1U) {
if (iVar1 == 0x2a) {
iVar1 = get(this);
if (iVar1 == 0x2f) goto LAB_0016b5be;
unget(this);
}
}
pcVar3 = "invalid comment; missing closing \'*/\'";
}
else {
pcVar3 = "invalid comment; expecting \'/\' or \'*\' after \'/\'";
}
*(char **)(this + 0x70) = pcVar3;
uVar2 = 0;
}
return uVar2;
}
| |
23,185 | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan_comment() | monkey531[P]llama/common/json.hpp | bool scan_comment()
{
switch (get())
{
// single-line comments skip input until a newline or EOF is read
case '/':
{
while (true)
{
switch (get())
{
case '\n':
case '\r':
case char_traits<char_type>::eof():
case '\0':
return true;
default:
break;
}
}
}
// multi-line comments skip input until */ is read
case '*':
{
while (true)
{
switch (get())
{
case char_traits<char_type>::eof():
case '\0':
{
error_message = "invalid comment; missing closing '*/'";
return false;
}
case '*':
{
switch (get())
{
case '/':
return true;
default:
{
unget();
continue;
}
}
}
default:
continue;
}
}
}
// unexpected character after reading '/'
default:
{
error_message = "invalid comment; expecting '/' or '*' after '/'";
return false;
}
}
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan_comment():
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x4f1bc
cmpl $0x2f, %eax
je 0x4e984
cmpl $0x2a, %eax
jne 0x4e9a1
movq %rbx, %rdi
callq 0x4f1bc
cmpl $0x2a, %eax
je 0x4e96d
incl %eax
cmpl $0x2, %eax
jae 0x4e957
jmp 0x4e9aa
movq %rbx, %rdi
callq 0x4f1bc
cmpl $0x2f, %eax
je 0x4e99d
movq %rbx, %rdi
callq 0x4f232
jmp 0x4e957
movl $0x4803, %ebp # imm = 0x4803
movq %rbx, %rdi
callq 0x4f1bc
incl %eax
cmpl $0xf, %eax
jae 0x4e989
btl %eax, %ebp
jae 0x4e989
movb $0x1, %al
jmp 0x4e9b7
leaq 0x6755b(%rip), %rax # 0xb5f03
jmp 0x4e9b1
leaq 0x6752c(%rip), %rax # 0xb5edd
movq %rax, 0x70(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE12scan_commentEv:
push rbp
push rbx
push rax
mov rbx, rdi
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
cmp eax, 2Fh ; '/'
jz short loc_4E984
cmp eax, 2Ah ; '*'
jnz short loc_4E9A1
loc_4E957:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
cmp eax, 2Ah ; '*'
jz short loc_4E96D
inc eax
cmp eax, 2
jnb short loc_4E957
jmp short loc_4E9AA
loc_4E96D:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
cmp eax, 2Fh ; '/'
jz short loc_4E99D
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(void)
jmp short loc_4E957
loc_4E984:
mov ebp, 4803h
loc_4E989:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
inc eax
cmp eax, 0Fh
jnb short loc_4E989
bt ebp, eax
jnb short loc_4E989
loc_4E99D:
mov al, 1
jmp short loc_4E9B7
loc_4E9A1:
lea rax, aInvalidComment; "invalid comment; expecting '/' or '*' a"...
jmp short loc_4E9B1
loc_4E9AA:
lea rax, aInvalidComment_0; "invalid comment; missing closing '*/'"
loc_4E9B1:
mov [rbx+70h], rax
xor eax, eax
loc_4E9B7:
add rsp, 8
pop rbx
pop rbp
retn
| char nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_comment(
long long a1)
{
int v1; // eax
int v2; // eax
int v3; // ebp
unsigned int v4; // eax
const char *v6; // rax
v1 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1);
if ( v1 == 47 )
{
v3 = 18435;
do
{
do
v4 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1)
+ 1;
while ( v4 >= 0xF );
}
while ( !_bittest(&v3, v4) );
return 1;
}
else
{
if ( v1 == 42 )
{
do
{
while ( 1 )
{
v2 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1);
if ( v2 != 42 )
break;
if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) == 47 )
return 1;
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(a1);
}
}
while ( (unsigned int)(v2 + 1) >= 2 );
v6 = "invalid comment; missing closing '*/'";
}
else
{
v6 = "invalid comment; expecting '/' or '*' after '/'";
}
*(_QWORD *)(a1 + 112) = v6;
return 0;
}
}
| scan_comment:
PUSH RBP
PUSH RBX
PUSH RAX
MOV RBX,RDI
CALL 0x0014f1bc
CMP EAX,0x2f
JZ 0x0014e984
CMP EAX,0x2a
JNZ 0x0014e9a1
LAB_0014e957:
MOV RDI,RBX
CALL 0x0014f1bc
CMP EAX,0x2a
JZ 0x0014e96d
INC EAX
CMP EAX,0x2
JNC 0x0014e957
JMP 0x0014e9aa
LAB_0014e96d:
MOV RDI,RBX
CALL 0x0014f1bc
CMP EAX,0x2f
JZ 0x0014e99d
MOV RDI,RBX
CALL 0x0014f232
JMP 0x0014e957
LAB_0014e984:
MOV EBP,0x4803
LAB_0014e989:
MOV RDI,RBX
CALL 0x0014f1bc
INC EAX
CMP EAX,0xf
JNC 0x0014e989
BT EBP,EAX
JNC 0x0014e989
LAB_0014e99d:
MOV AL,0x1
JMP 0x0014e9b7
LAB_0014e9a1:
LEA RAX,[0x1b5f03]
JMP 0x0014e9b1
LAB_0014e9aa:
LEA RAX,[0x1b5edd]
LAB_0014e9b1:
MOV qword ptr [RBX + 0x70],RAX
XOR EAX,EAX
LAB_0014e9b7:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::scan_comment() */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::scan_comment(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
int iVar1;
int8 uVar2;
char *pcVar3;
iVar1 = get(this);
if (iVar1 == 0x2f) {
do {
do {
iVar1 = get(this);
} while (0xe < iVar1 + 1U);
} while ((0x4803U >> (iVar1 + 1U & 0x1f) & 1) == 0);
LAB_0014e99d:
uVar2 = 1;
}
else {
if (iVar1 == 0x2a) {
do {
while (iVar1 = get(this), iVar1 == 0x2a) {
iVar1 = get(this);
if (iVar1 == 0x2f) goto LAB_0014e99d;
unget(this);
}
} while (1 < iVar1 + 1U);
pcVar3 = "invalid comment; missing closing \'*/\'";
}
else {
pcVar3 = "invalid comment; expecting \'/\' or \'*\' after \'/\'";
}
*(char **)(this + 0x70) = pcVar3;
uVar2 = 0;
}
return uVar2;
}
| |
23,186 | translog_wait_for_writers | eloqsql/storage/maria/ma_loghandler.c | static void translog_wait_for_writers(struct st_translog_buffer *buffer)
{
DBUG_ENTER("translog_wait_for_writers");
DBUG_PRINT("enter", ("Buffer #%u %p copies in progress: %u "
"is closing %u File: %d size: %lu",
(uint) buffer->buffer_no, buffer,
(uint) buffer->copy_to_buffer_in_progress,
(uint) buffer->is_closing_buffer,
(buffer->file ? buffer->file->handler.file : -1),
(ulong) buffer->size));
translog_buffer_lock_assert_owner(buffer);
while (buffer->copy_to_buffer_in_progress)
{
DBUG_PRINT("info", ("wait for writers... buffer: #%u %p",
(uint) buffer->buffer_no, buffer));
DBUG_ASSERT(buffer->file != NULL);
mysql_cond_wait(&buffer->waiting_filling_buffer, &buffer->mutex);
DBUG_PRINT("info", ("wait for writers done buffer: #%u %p",
(uint) buffer->buffer_no, buffer));
}
DBUG_VOID_RETURN;
} | O3 | c | translog_wait_for_writers:
cmpl $0x0, 0x100078(%rdi)
je 0x38565
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x100040(%rdi), %r14
leaq 0x100090(%rdi), %r15
leaq 0xa131d(%rip), %r12 # 0xd9845
cmpq $0x0, 0x100070(%rbx)
jne 0x38548
movq %r14, %rdi
movq %r15, %rsi
callq 0x29420
cmpl $0x0, 0x100078(%rbx)
jne 0x38528
jmp 0x3855d
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movl $0x806, %ecx # imm = 0x806
callq 0x2ee80
jmp 0x3853d
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| translog_wait_for_writers:
cmp ds:dword_100078[rdi], 0
jz short locret_38565
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rdi
lea r14, unk_100040[rdi]
lea r15, unk_100090[rdi]
lea r12, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
loc_38528:
cmp ds:qword_100070[rbx], 0
jnz short loc_38548
mov rdi, r14
mov rsi, r15
call _pthread_cond_wait
loc_3853D:
cmp ds:dword_100078[rbx], 0
jnz short loc_38528
jmp short loc_3855D
loc_38548:
mov rdi, r14
mov rsi, r15
mov rdx, r12
mov ecx, 806h
call psi_cond_wait
jmp short loc_3853D
loc_3855D:
pop rbx
pop r12
pop r14
pop r15
pop rbp
locret_38565:
retn
| long long translog_wait_for_writers(long long a1)
{
char *v1; // r14
char *v2; // r15
long long result; // rax
if ( *(int *)((char *)&dword_100078 + a1) )
{
v1 = (char *)&unk_100040 + a1;
v2 = (char *)&unk_100090 + a1;
do
{
if ( *(long long *)((char *)&qword_100070 + a1) )
result = psi_cond_wait(
(long long)v1,
(long long)v2,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x806u);
else
result = pthread_cond_wait(v1, v2);
}
while ( *(int *)((char *)&dword_100078 + a1) );
}
return result;
}
| translog_wait_for_writers:
CMP dword ptr [RDI + 0x100078],0x0
JZ 0x00138565
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RDI
LEA R14,[RDI + 0x100040]
LEA R15,[RDI + 0x100090]
LEA R12,[0x1d9845]
LAB_00138528:
CMP qword ptr [RBX + 0x100070],0x0
JNZ 0x00138548
MOV RDI,R14
MOV RSI,R15
CALL 0x00129420
LAB_0013853d:
CMP dword ptr [RBX + 0x100078],0x0
JNZ 0x00138528
JMP 0x0013855d
LAB_00138548:
MOV RDI,R14
MOV RSI,R15
MOV RDX,R12
MOV ECX,0x806
CALL 0x0012ee80
JMP 0x0013853d
LAB_0013855d:
POP RBX
POP R12
POP R14
POP R15
POP RBP
LAB_00138565:
RET
|
void translog_wait_for_writers(long param_1)
{
pthread_cond_t *__cond;
pthread_mutex_t *__mutex;
if (*(int *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_type + param_1) != 0) {
__cond = (pthread_cond_t *)((long)&Elf64_Phdr_ARRAY_00100040[0].p_type + param_1);
__mutex = (pthread_mutex_t *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_paddr + param_1);
do {
if (*(long *)((long)&Elf64_Phdr_ARRAY_00100040[0].p_align + param_1) == 0) {
pthread_cond_wait(__cond,__mutex);
}
else {
psi_cond_wait(__cond,__mutex,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",0x806
);
}
} while (*(int *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_type + param_1) != 0);
}
return;
}
| |
23,187 | OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::VertexDescriptor::setIncidentFaceSize(int, int) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/unorderedSubset.cpp | void UnorderedSubset::VertexDescriptor::setIncidentFaceSize(int incFaceIndex, int faceSize) {
if (!hasFaceSizes) {
faceSizeOffsets.SetSize(numFaces + 1);
std::fill(&faceSizeOffsets[0], &faceSizeOffsets[numFaces + 1], 0);
hasFaceSizes = true;
}
faceSizeOffsets[incFaceIndex] = faceSize;
} | O1 | cpp | OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::VertexDescriptor::setIncidentFaceSize(int, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
testb $0x8, 0x8(%rdi)
jne 0xb03e5
movzwl 0x4(%r14), %eax
leaq 0x1(%rax), %r15
cmpl %eax, 0x1c(%r14)
ja 0xb03b7
movq 0x60(%r14), %rdi
callq 0x3a0c0
leaq 0x20(%r14), %rax
movq %rax, 0x10(%r14)
movl $0x10, 0x1c(%r14)
movl %r15d, %edi
shll $0x2, %edi
callq 0x3a230
movq %rax, 0x60(%r14)
movq %rax, 0x10(%r14)
movl %r15d, 0x1c(%r14)
movl %r15d, 0x18(%r14)
movq 0x10(%r14), %rdi
movzwl 0x4(%r14), %eax
leaq (%rdi,%rax,4), %rcx
addq $0x4, %rcx
cmpq %rcx, %rdi
je 0xb03e0
leaq 0x4(,%rax,4), %rdx
xorl %esi, %esi
callq 0x391b0
orb $0x8, 0x8(%r14)
movq 0x10(%r14), %rax
movslq %ebp, %rcx
movl %ebx, (%rax,%rcx,4)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| _ZN10OpenSubdiv6v3_6_03Tmr15UnorderedSubset16VertexDescriptor19setIncidentFaceSizeEii:
push rbp
push r15
push r14
push rbx
push rax
mov ebx, edx
mov ebp, esi
mov r14, rdi
test byte ptr [rdi+8], 8
jnz short loc_B03E5
movzx eax, word ptr [r14+4]
lea r15, [rax+1]
cmp [r14+1Ch], eax
ja short loc_B03B7
mov rdi, [r14+60h]; void *
call __ZdlPv; operator delete(void *)
lea rax, [r14+20h]
mov [r14+10h], rax
mov dword ptr [r14+1Ch], 10h
mov edi, r15d
shl edi, 2; unsigned __int64
call __Znwm; operator new(ulong)
mov [r14+60h], rax
mov [r14+10h], rax
mov [r14+1Ch], r15d
loc_B03B7:
mov [r14+18h], r15d
mov rdi, [r14+10h]
movzx eax, word ptr [r14+4]
lea rcx, [rdi+rax*4]
add rcx, 4
cmp rdi, rcx
jz short loc_B03E0
lea rdx, ds:4[rax*4]
xor esi, esi
call _memset
loc_B03E0:
or byte ptr [r14+8], 8
loc_B03E5:
mov rax, [r14+10h]
movsxd rcx, ebp
mov [rax+rcx*4], ebx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| _DWORD * OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::VertexDescriptor::setIncidentFaceSize(
void **this,
int a2,
int a3)
{
unsigned int v5; // eax
unsigned int v6; // r15d
void *v7; // rax
char *v8; // rdi
long long v9; // rax
_DWORD *result; // rax
if ( ((_BYTE)this[1] & 8) == 0 )
{
v5 = *((unsigned __int16 *)this + 2);
v6 = v5 + 1;
if ( *((_DWORD *)this + 7) <= v5 )
{
operator delete(this[12]);
this[2] = this + 4;
*((_DWORD *)this + 7) = 16;
v7 = (void *)operator new(4 * v6);
this[12] = v7;
this[2] = v7;
*((_DWORD *)this + 7) = v6;
}
*((_DWORD *)this + 6) = v6;
v8 = (char *)this[2];
v9 = *((unsigned __int16 *)this + 2);
if ( v8 != &v8[4 * v9 + 4] )
memset(v8, 0LL, 4 * v9 + 4);
*((_BYTE *)this + 8) |= 8u;
}
result = this[2];
result[a2] = a3;
return result;
}
| setIncidentFaceSize:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,EDX
MOV EBP,ESI
MOV R14,RDI
TEST byte ptr [RDI + 0x8],0x8
JNZ 0x001b03e5
MOVZX EAX,word ptr [R14 + 0x4]
LEA R15,[RAX + 0x1]
CMP dword ptr [R14 + 0x1c],EAX
JA 0x001b03b7
MOV RDI,qword ptr [R14 + 0x60]
CALL 0x0013a0c0
LEA RAX,[R14 + 0x20]
MOV qword ptr [R14 + 0x10],RAX
MOV dword ptr [R14 + 0x1c],0x10
MOV EDI,R15D
SHL EDI,0x2
CALL 0x0013a230
MOV qword ptr [R14 + 0x60],RAX
MOV qword ptr [R14 + 0x10],RAX
MOV dword ptr [R14 + 0x1c],R15D
LAB_001b03b7:
MOV dword ptr [R14 + 0x18],R15D
MOV RDI,qword ptr [R14 + 0x10]
MOVZX EAX,word ptr [R14 + 0x4]
LEA RCX,[RDI + RAX*0x4]
ADD RCX,0x4
CMP RDI,RCX
JZ 0x001b03e0
LEA RDX,[0x4 + RAX*0x4]
XOR ESI,ESI
CALL 0x001391b0
LAB_001b03e0:
OR byte ptr [R14 + 0x8],0x8
LAB_001b03e5:
MOV RAX,qword ptr [R14 + 0x10]
MOVSXD RCX,EBP
MOV dword ptr [RAX + RCX*0x4],EBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::VertexDescriptor::setIncidentFaceSize(int, int) */
void __thiscall
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::VertexDescriptor::setIncidentFaceSize
(VertexDescriptor *this,int param_1,int param_2)
{
int iVar1;
void *pvVar2;
if (((byte)this[8] & 8) == 0) {
iVar1 = *(ushort *)(this + 4) + 1;
if (*(uint *)(this + 0x1c) <= (uint)*(ushort *)(this + 4)) {
operator_delete(*(void **)(this + 0x60));
*(VertexDescriptor **)(this + 0x10) = this + 0x20;
*(int4 *)(this + 0x1c) = 0x10;
pvVar2 = operator_new((ulong)(uint)(iVar1 * 4));
*(void **)(this + 0x60) = pvVar2;
*(void **)(this + 0x10) = pvVar2;
*(int *)(this + 0x1c) = iVar1;
}
*(int *)(this + 0x18) = iVar1;
pvVar2 = *(void **)(this + 0x10);
if (pvVar2 != (void *)((long)pvVar2 + (ulong)*(ushort *)(this + 4) * 4 + 4)) {
memset(pvVar2,0,(ulong)*(ushort *)(this + 4) * 4 + 4);
}
this[8] = (VertexDescriptor)((byte)this[8] | 8);
}
*(int *)(*(long *)(this + 0x10) + (long)param_1 * 4) = param_2;
return;
}
| |
23,188 | OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::VertexDescriptor::setIncidentFaceSize(int, int) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/unorderedSubset.cpp | void UnorderedSubset::VertexDescriptor::setIncidentFaceSize(int incFaceIndex, int faceSize) {
if (!hasFaceSizes) {
faceSizeOffsets.SetSize(numFaces + 1);
std::fill(&faceSizeOffsets[0], &faceSizeOffsets[numFaces + 1], 0);
hasFaceSizes = true;
}
faceSizeOffsets[incFaceIndex] = faceSize;
} | O2 | cpp | OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::VertexDescriptor::setIncidentFaceSize(int, int):
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
addq $0x10, %rdi
testb $0x8, 0x8(%r14)
jne 0xba5ec
movzwl 0x4(%r14), %esi
incl %esi
callq 0x4fc90
movq 0x10(%r14), %rax
movzwl 0x4(%r14), %ecx
leaq 0x4(,%rcx,4), %rcx
xorl %edx, %edx
cmpq %rdx, %rcx
je 0xba5f1
andl $0x0, (%rax,%rdx)
addq $0x4, %rdx
jmp 0xba5dd
movq (%rdi), %rax
jmp 0xba5f6
orb $0x8, 0x8(%r14)
movslq %ebp, %rcx
movl %ebx, (%rax,%rcx,4)
popq %rbx
popq %r14
popq %rbp
retq
nop
| _ZN10OpenSubdiv6v3_6_03Tmr15UnorderedSubset16VertexDescriptor19setIncidentFaceSizeEii:
push rbp
push r14
push rbx
mov ebx, edx
mov ebp, esi
mov r14, rdi
add rdi, 10h
test byte ptr [r14+8], 8
jnz short loc_BA5EC
movzx esi, word ptr [r14+4]
inc esi
call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIiLj16ELb1EE7SetSizeEj; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int,16u,true>::SetSize(uint)
mov rax, [r14+10h]
movzx ecx, word ptr [r14+4]
lea rcx, ds:4[rcx*4]
xor edx, edx
loc_BA5DD:
cmp rcx, rdx
jz short loc_BA5F1
and dword ptr [rax+rdx], 0
add rdx, 4
jmp short loc_BA5DD
loc_BA5EC:
mov rax, [rdi]
jmp short loc_BA5F6
loc_BA5F1:
or byte ptr [r14+8], 8
loc_BA5F6:
movsxd rcx, ebp
mov [rax+rcx*4], ebx
pop rbx
pop r14
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::VertexDescriptor::setIncidentFaceSize(
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::VertexDescriptor *this,
int a2,
int a3)
{
long long *v5; // rdi
long long result; // rax
long long v7; // rcx
long long i; // rdx
v5 = (long long *)((char *)this + 16);
if ( (*((_BYTE *)this + 8) & 8) != 0 )
{
result = *v5;
}
else
{
OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int,16u,true>::SetSize(
v5,
(unsigned int)*((unsigned __int16 *)this + 2) + 1);
result = *((_QWORD *)this + 2);
v7 = 4LL * *((unsigned __int16 *)this + 2) + 4;
for ( i = 0LL; v7 != i; i += 4LL )
*(_DWORD *)(result + i) = 0;
*((_BYTE *)this + 8) |= 8u;
}
*(_DWORD *)(result + 4LL * a2) = a3;
return result;
}
| setIncidentFaceSize:
PUSH RBP
PUSH R14
PUSH RBX
MOV EBX,EDX
MOV EBP,ESI
MOV R14,RDI
ADD RDI,0x10
TEST byte ptr [R14 + 0x8],0x8
JNZ 0x001ba5ec
MOVZX ESI,word ptr [R14 + 0x4]
INC ESI
CALL 0x0014fc90
MOV RAX,qword ptr [R14 + 0x10]
MOVZX ECX,word ptr [R14 + 0x4]
LEA RCX,[0x4 + RCX*0x4]
XOR EDX,EDX
LAB_001ba5dd:
CMP RCX,RDX
JZ 0x001ba5f1
AND dword ptr [RAX + RDX*0x1],0x0
ADD RDX,0x4
JMP 0x001ba5dd
LAB_001ba5ec:
MOV RAX,qword ptr [RDI]
JMP 0x001ba5f6
LAB_001ba5f1:
OR byte ptr [R14 + 0x8],0x8
LAB_001ba5f6:
MOVSXD RCX,EBP
MOV dword ptr [RAX + RCX*0x4],EBX
POP RBX
POP R14
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::VertexDescriptor::setIncidentFaceSize(int, int) */
void __thiscall
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::VertexDescriptor::setIncidentFaceSize
(VertexDescriptor *this,int param_1,int param_2)
{
ushort uVar1;
long lVar2;
long lVar3;
if (((byte)this[8] & 8) == 0) {
Vtr::internal::StackBuffer<int,16u,true>::SetSize
((StackBuffer<int,16u,true> *)(this + 0x10),*(ushort *)(this + 4) + 1);
lVar2 = *(long *)(this + 0x10);
uVar1 = *(ushort *)(this + 4);
for (lVar3 = 0; (ulong)uVar1 * 4 + 4 != lVar3; lVar3 = lVar3 + 4) {
*(int4 *)(lVar2 + lVar3) = 0;
}
this[8] = (VertexDescriptor)((byte)this[8] | 8);
}
else {
lVar2 = *(long *)(this + 0x10);
}
*(int *)(lVar2 + (long)param_1 * 4) = param_2;
return;
}
| |
23,189 | google::protobuf::(anonymous namespace)::OptionsToInterpret::~OptionsToInterpret() | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc | OptionsToInterpret(const std::string& ns, const std::string& el,
const std::vector<int>& path, const Message* orig_opt,
Message* opt)
: name_scope(ns),
element_name(el),
element_path(path),
original_options(orig_opt),
options(opt) {} | O3 | cpp | google::protobuf::(anonymous namespace)::OptionsToInterpret::~OptionsToInterpret():
pushq %rbx
movq %rdi, %rbx
movq 0x40(%rdi), %rdi
testq %rdi, %rdi
je 0xdf90a
callq 0x2d160
movq 0x20(%rbx), %rdi
leaq 0x30(%rbx), %rax
cmpq %rax, %rdi
je 0xdf91c
callq 0x2d160
movq (%rbx), %rdi
addq $0x10, %rbx
cmpq %rbx, %rdi
je 0xdf92e
popq %rbx
jmp 0x2d160
popq %rbx
retq
| _ZN6google8protobuf12_GLOBAL__N_118OptionsToInterpretD2Ev:
push rbx
mov rbx, rdi
mov rdi, [rdi+40h]; void *
test rdi, rdi
jz short loc_DF90A
call __ZdlPv; operator delete(void *)
loc_DF90A:
mov rdi, [rbx+20h]; void *
lea rax, [rbx+30h]
cmp rdi, rax
jz short loc_DF91C
call __ZdlPv; operator delete(void *)
loc_DF91C:
mov rdi, [rbx]; void *
add rbx, 10h
cmp rdi, rbx
jz short loc_DF92E
pop rbx
jmp __ZdlPv; operator delete(void *)
loc_DF92E:
pop rbx
retn
| void google::protobuf::`anonymous namespace'::OptionsToInterpret::~OptionsToInterpret(
google::protobuf::_anonymous_namespace_::OptionsToInterpret *this)
{
void *v2; // rdi
char *v3; // rdi
v2 = (void *)*((_QWORD *)this + 8);
if ( v2 )
operator delete(v2);
v3 = (char *)*((_QWORD *)this + 4);
if ( v3 != (char *)this + 48 )
operator delete(v3);
if ( *(google::protobuf::_anonymous_namespace_::OptionsToInterpret **)this != (google::protobuf::_anonymous_namespace_::OptionsToInterpret *)((char *)this + 16) )
operator delete(*(void **)this);
}
| ~OptionsToInterpret:
PUSH RBX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x40]
TEST RDI,RDI
JZ 0x001df90a
CALL 0x0012d160
LAB_001df90a:
MOV RDI,qword ptr [RBX + 0x20]
LEA RAX,[RBX + 0x30]
CMP RDI,RAX
JZ 0x001df91c
CALL 0x0012d160
LAB_001df91c:
MOV RDI,qword ptr [RBX]
ADD RBX,0x10
CMP RDI,RBX
JZ 0x001df92e
POP RBX
JMP 0x0012d160
LAB_001df92e:
POP RBX
RET
|
/* google::protobuf::(anonymous namespace)::OptionsToInterpret::~OptionsToInterpret() */
void __thiscall
google::protobuf::(anonymous_namespace)::OptionsToInterpret::~OptionsToInterpret
(OptionsToInterpret *this)
{
if (*(void **)(this + 0x40) != (void *)0x0) {
operator_delete(*(void **)(this + 0x40));
}
if (*(OptionsToInterpret **)(this + 0x20) != this + 0x30) {
operator_delete(*(OptionsToInterpret **)(this + 0x20));
}
if (*(OptionsToInterpret **)this != this + 0x10) {
operator_delete(*(OptionsToInterpret **)this);
return;
}
return;
}
| |
23,190 | mi_split_page | eloqsql/storage/myisam/mi_write.c | int _mi_split_page(register MI_INFO *info, register MI_KEYDEF *keyinfo,
uchar *key, uchar *buff, uchar *key_buff,
my_bool insert_last_key)
{
uint length,a_length,key_ref_length,t_length,nod_flag,key_length;
uchar *key_pos,*pos, *UNINIT_VAR(after_key);
my_off_t new_pos;
MI_KEY_PARAM s_temp;
DBUG_ENTER("mi_split_page");
DBUG_DUMP("buff",(uchar*) buff,mi_getint(buff));
if (info->s->keyinfo+info->lastinx == keyinfo)
info->page_changed=1; /* Info->buff is used */
info->buff_used=1;
nod_flag=mi_test_if_nod(buff);
key_ref_length=2+nod_flag;
if (insert_last_key)
key_pos=_mi_find_last_pos(keyinfo,buff,key_buff, &key_length, &after_key);
else
key_pos=_mi_find_half_pos(nod_flag,keyinfo,buff,key_buff, &key_length,
&after_key);
if (!key_pos)
DBUG_RETURN(-1);
length=(uint) (key_pos-buff);
a_length=mi_getint(buff);
mi_putint(buff,length,nod_flag);
key_pos=after_key;
if (nod_flag)
{
DBUG_PRINT("test",("Splitting nod"));
pos=key_pos-nod_flag;
memcpy((uchar*) info->buff+2,(uchar*) pos,(size_t) nod_flag);
}
/* Move middle item to key and pointer to new page */
if ((new_pos=_mi_new(info,keyinfo,DFLT_INIT_HITS)) == HA_OFFSET_ERROR)
DBUG_RETURN(-1);
_mi_kpointer(info,_mi_move_key(keyinfo,key,key_buff),new_pos);
/* Store new page */
if (!(*keyinfo->get_key)(keyinfo,nod_flag,&key_pos,key_buff))
DBUG_RETURN(-1);
t_length=(*keyinfo->pack_key)(keyinfo,nod_flag,(uchar *) 0,
(uchar*) 0, (uchar*) 0,
key_buff, &s_temp);
length=(uint) ((buff+a_length)-key_pos);
memcpy((uchar*) info->buff+key_ref_length+t_length,(uchar*) key_pos,
(size_t) length);
(*keyinfo->store_key)(keyinfo,info->buff+key_ref_length,&s_temp);
mi_putint(info->buff,length+t_length+key_ref_length,nod_flag);
if (_mi_write_keypage(info,keyinfo,new_pos,DFLT_INIT_HITS,info->buff))
DBUG_RETURN(-1);
DBUG_DUMP("key",(uchar*) key,_mi_keylength(keyinfo,key));
DBUG_RETURN(2); /* Middle key up */
} | O3 | c | mi_split_page:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x518, %rsp # imm = 0x518
movq %r8, %r13
movq %rdx, %r15
movq %rdi, %r12
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq (%rdi), %rdx
movslq 0x1d4(%rdi), %rax
imulq $0x70, %rax, %rax
addq 0x218(%rdx), %rax
cmpq %rsi, %rax
jne 0x88daf
movb $0x1, 0x33c(%r12)
movb $0x1, 0x33d(%r12)
movzbl (%rcx), %eax
xorl %edi, %edi
testb %al, %al
jns 0x88dc7
movl 0x17c(%rdx), %edi
testb %r9b, %r9b
movq %rsi, -0x518(%rbp)
movq %rdi, -0x530(%rbp)
movq %rcx, -0x528(%rbp)
je 0x88e7f
movq %r12, -0x508(%rbp)
movzbl 0x1(%rcx), %edx
andl $0x7f, %eax
shll $0x8, %eax
addl %edx, %eax
addl $-0x2, %eax
leaq 0x2(%rcx), %r12
movq %r12, -0x510(%rbp)
testb $0x2e, 0xa(%rsi)
je 0x88e9d
movq %r15, -0x4f8(%rbp)
movl %eax, %eax
leaq (%r12,%rax), %r15
addq $-0x2, %r15
movq %r13, -0x500(%rbp)
movb $0x0, (%r13)
xorl %eax, %eax
leaq -0x4f0(%rbp), %r14
movq %r12, %r13
movq %r13, %rbx
movq %r12, %r13
movl %eax, %edx
movq -0x500(%rbp), %rdi
movq %r14, %rsi
callq 0x29080
movq -0x518(%rbp), %rdi
xorl %esi, %esi
leaq -0x510(%rbp), %rdx
movq %r14, %rcx
callq *0x48(%rdi)
testl %eax, %eax
je 0x88ed3
movq -0x510(%rbp), %r12
cmpq %r15, %r12
jb 0x88e39
movq %r13, -0x520(%rbp)
jmp 0x88efb
leaq -0x534(%rbp), %r8
leaq -0x520(%rbp), %r9
movq %rcx, %rdx
movq %r13, %rcx
callq 0x890f4
movq %rax, %rbx
jmp 0x88f10
movzwl 0x12(%rsi), %ecx
xorl %edx, %edx
divl %ecx
addl $-0x2, %eax
imull %ecx, %eax
addq %rax, %r12
leaq (%r12,%rcx), %rax
movq %rax, -0x520(%rbp)
movq %r13, %rdi
movq %r12, %rsi
movq %rcx, %rdx
callq 0x29080
movq %r12, %rbx
movq -0x508(%rbp), %r12
jmp 0x88f10
movq -0x518(%rbp), %rax
movq (%rax), %rax
movq 0x268(%rax), %rsi
movl $0x7e, %edi
callq 0x7aa9e
callq 0xa1672
movl $0x7e, (%rax)
xorl %ebx, %ebx
movq -0x508(%rbp), %r12
movq -0x500(%rbp), %r13
movq -0x4f8(%rbp), %r15
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
testq %rbx, %rbx
je 0x890cc
movq -0x528(%rbp), %rcx
subq %rcx, %rbx
movzbl 0x1(%rcx), %eax
movq %rax, -0x4f8(%rbp)
movzbl (%rcx), %r14d
xorl %eax, %eax
movq -0x530(%rbp), %rdx
testl %edx, %edx
setne %al
shll $0xf, %eax
movq %rax, -0x508(%rbp)
addl %ebx, %eax
movb %bl, 0x1(%rcx)
movb %ah, (%rcx)
movq -0x520(%rbp), %rsi
movq %rsi, -0x510(%rbp)
testl %edx, %edx
je 0x88f7e
movl %edx, %edx
subq %rdx, %rsi
movq 0x100(%r12), %rdi
addq $0x2, %rdi
callq 0x29080
movq %r12, %rdi
movq -0x518(%rbp), %rbx
movq %rbx, %rsi
movl $0x3, %edx
callq 0x83a86
movq %rax, -0x500(%rbp)
cmpq $-0x1, %rax
je 0x890c7
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x85867
movq %r12, %rdi
movq %rax, %rsi
movq -0x500(%rbp), %rdx
callq 0x84d0d
leaq -0x510(%rbp), %rdx
movq %rbx, %rdi
movq -0x530(%rbp), %r15
movl %r15d, %esi
movq %r13, %rcx
callq *0x48(%rbx)
testl %eax, %eax
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
je 0x890cc
andl $0x7f, %r14d
shll $0x8, %r14d
addq -0x4f8(%rbp), %r14
leal 0x2(%r15), %eax
movl %eax, -0x4f8(%rbp)
leaq -0x4f0(%rbp), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
movl %r15d, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %r13, %r9
callq *0x50(%rbx)
movl %eax, %r15d
movq -0x528(%rbp), %r13
addq %r14, %r13
movq -0x510(%rbp), %rsi
subq %rsi, %r13
movl -0x4f8(%rbp), %r14d
movq 0x100(%r12), %rax
addq %r14, %rax
movl %r15d, %edi
addq %rax, %rdi
movl %r13d, %edx
callq 0x29080
addq 0x100(%r12), %r14
movq %rbx, %rdi
movq %r14, %rsi
leaq -0x4f0(%rbp), %rdx
callq *0x58(%rbx)
addl -0x4f8(%rbp), %r15d
addl %r13d, %r15d
movq -0x508(%rbp), %rcx
addl %r15d, %ecx
movq 0x100(%r12), %rax
movb %r15b, 0x1(%rax)
movq 0x100(%r12), %rax
movb %ch, (%rax)
movq 0x100(%r12), %r8
movq %r12, %rdi
movq %rbx, %rsi
movq -0x500(%rbp), %rdx
movl $0x3, %ecx
callq 0x838d4
xorl %ecx, %ecx
negl %eax
sbbl %ecx, %ecx
orl $0x2, %ecx
jmp 0x890cc
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x890ef
movl %ecx, %eax
addq $0x518, %rsp # imm = 0x518
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29270
| _mi_split_page:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 518h
mov r13, r8
mov r15, rdx
mov r12, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov rdx, [rdi]
movsxd rax, dword ptr [rdi+1D4h]
imul rax, 70h ; 'p'
add rax, [rdx+218h]
cmp rax, rsi
jnz short loc_88DAF
mov byte ptr [r12+33Ch], 1
loc_88DAF:
mov byte ptr [r12+33Dh], 1
movzx eax, byte ptr [rcx]
xor edi, edi
test al, al
jns short loc_88DC7
mov edi, [rdx+17Ch]
loc_88DC7:
test r9b, r9b
mov [rbp+var_518], rsi
mov [rbp+var_530], rdi
mov [rbp+var_528], rcx
jz loc_88E7F
mov [rbp+var_508], r12
movzx edx, byte ptr [rcx+1]
and eax, 7Fh
shl eax, 8
add eax, edx
add eax, 0FFFFFFFEh
lea r12, [rcx+2]
mov [rbp+var_510], r12
test byte ptr [rsi+0Ah], 2Eh
jz loc_88E9D
mov [rbp+var_4F8], r15
mov eax, eax
lea r15, [r12+rax]
add r15, 0FFFFFFFFFFFFFFFEh
mov [rbp+var_500], r13
mov byte ptr [r13+0], 0
xor eax, eax
lea r14, [rbp+var_4F0]
mov r13, r12
loc_88E39:
mov rbx, r13
mov r13, r12
mov edx, eax
mov rdi, [rbp+var_500]
mov rsi, r14
call _memcpy
mov rdi, [rbp+var_518]
xor esi, esi
lea rdx, [rbp+var_510]
mov rcx, r14
call qword ptr [rdi+48h]
test eax, eax
jz short loc_88ED3
mov r12, [rbp+var_510]
cmp r12, r15
jb short loc_88E39
mov [rbp+var_520], r13
jmp short loc_88EFB
loc_88E7F:
lea r8, [rbp+var_534]
lea r9, [rbp+var_520]
mov rdx, rcx
mov rcx, r13
call _mi_find_half_pos
mov rbx, rax
jmp short loc_88F10
loc_88E9D:
movzx ecx, word ptr [rsi+12h]
xor edx, edx
div ecx
add eax, 0FFFFFFFEh
imul eax, ecx
add r12, rax
lea rax, [r12+rcx]
mov [rbp+var_520], rax
mov rdi, r13
mov rsi, r12
mov rdx, rcx
call _memcpy
mov rbx, r12
mov r12, [rbp+var_508]
jmp short loc_88F10
loc_88ED3:
mov rax, [rbp+var_518]
mov rax, [rax]
mov rsi, [rax+268h]
mov edi, 7Eh ; '~'
call mi_report_error
call _my_thread_var
mov dword ptr [rax], 7Eh ; '~'
xor ebx, ebx
loc_88EFB:
mov r12, [rbp+var_508]
mov r13, [rbp+var_500]
mov r15, [rbp+var_4F8]
loc_88F10:
mov ecx, 0FFFFFFFFh
test rbx, rbx
jz loc_890CC
mov rcx, [rbp+var_528]
sub rbx, rcx
movzx eax, byte ptr [rcx+1]
mov [rbp+var_4F8], rax
movzx r14d, byte ptr [rcx]
xor eax, eax
mov rdx, [rbp+var_530]
test edx, edx
setnz al
shl eax, 0Fh
mov [rbp+var_508], rax
add eax, ebx
mov [rcx+1], bl
mov [rcx], ah
mov rsi, [rbp+var_520]
mov [rbp+var_510], rsi
test edx, edx
jz short loc_88F7E
mov edx, edx
sub rsi, rdx
mov rdi, [r12+100h]
add rdi, 2
call _memcpy
loc_88F7E:
mov rdi, r12
mov rbx, [rbp+var_518]
mov rsi, rbx
mov edx, 3
call _mi_new
mov [rbp+var_500], rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jz loc_890C7
mov rdi, rbx
mov rsi, r15
mov rdx, r13
call _mi_move_key
mov rdi, r12
mov rsi, rax
mov rdx, [rbp+var_500]
call _mi_kpointer
lea rdx, [rbp+var_510]
mov rdi, rbx
mov r15, [rbp+var_530]
mov esi, r15d
mov rcx, r13
call qword ptr [rbx+48h]
test eax, eax
mov ecx, 0FFFFFFFFh
jz loc_890CC
and r14d, 7Fh
shl r14d, 8
add r14, [rbp+var_4F8]
lea eax, [r15+2]
mov dword ptr [rbp+var_4F8], eax
lea rax, [rbp+var_4F0]
mov [rsp+540h+var_540], rax
mov rdi, rbx
mov esi, r15d
xor edx, edx
xor ecx, ecx
xor r8d, r8d
mov r9, r13
call qword ptr [rbx+50h]
mov r15d, eax
mov r13, [rbp+var_528]
add r13, r14
mov rsi, [rbp+var_510]
sub r13, rsi
mov r14d, dword ptr [rbp+var_4F8]
mov rax, [r12+100h]
add rax, r14
mov edi, r15d
add rdi, rax
mov edx, r13d
call _memcpy
add r14, [r12+100h]
mov rdi, rbx
mov rsi, r14
lea rdx, [rbp+var_4F0]
call qword ptr [rbx+58h]
add r15d, dword ptr [rbp+var_4F8]
add r15d, r13d
mov rcx, [rbp+var_508]
add ecx, r15d
mov rax, [r12+100h]
mov [rax+1], r15b
mov rax, [r12+100h]
mov [rax], ch
mov r8, [r12+100h]
mov rdi, r12
mov rsi, rbx
mov rdx, [rbp+var_500]
mov ecx, 3
call _mi_write_keypage
xor ecx, ecx
neg eax
sbb ecx, ecx
or ecx, 2
jmp short loc_890CC
loc_890C7:
mov ecx, 0FFFFFFFFh
loc_890CC:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_890EF
mov eax, ecx
add rsp, 518h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_890EF:
call ___stack_chk_fail
| long long mi_split_page(long long a1, unsigned __int16 *a2, long long a3, char *a4, unsigned __int8 *a5, char a6)
{
unsigned __int8 *v6; // r13
long long *v8; // r12
long long v9; // rdx
char v10; // al
long long v11; // rdi
unsigned int v12; // eax
char *v13; // r12
char *v14; // r15
unsigned int v15; // eax
char *v16; // r13
long long half_pos; // rbx
long long v18; // rcx
long long v19; // r12
const char *v20; // rsi
unsigned int v21; // ecx
char *v22; // rcx
__int16 v23; // bx
char v24; // r14
unsigned int v25; // edx
bool v26; // zf
__int16 v27; // ax
unsigned __int16 *v28; // rbx
_BYTE *v29; // rax
unsigned int v30; // r15d
int v31; // eax
int v32; // r14d
long long v33; // r15
unsigned int v34; // r13d
long long v35; // r14
__int16 v36; // cx
char v38[4]; // [rsp+Ch] [rbp-534h] BYREF
long long v39; // [rsp+10h] [rbp-530h]
char *v40; // [rsp+18h] [rbp-528h]
char *v41; // [rsp+20h] [rbp-520h] BYREF
unsigned __int16 *v42; // [rsp+28h] [rbp-518h]
char *v43; // [rsp+30h] [rbp-510h] BYREF
long long *v44; // [rsp+38h] [rbp-508h]
unsigned __int8 *v45; // [rsp+40h] [rbp-500h]
long long v46; // [rsp+48h] [rbp-4F8h]
_BYTE v47[1216]; // [rsp+50h] [rbp-4F0h] BYREF
unsigned long long v48; // [rsp+510h] [rbp-30h]
v6 = a5;
v8 = (long long *)a1;
v48 = __readfsqword(0x28u);
v9 = *(_QWORD *)a1;
if ( (unsigned __int16 *)(*(_QWORD *)(*(_QWORD *)a1 + 536LL) + 112LL * *(int *)(a1 + 468)) == a2 )
*(_BYTE *)(a1 + 828) = 1;
*(_BYTE *)(a1 + 829) = 1;
v10 = *a4;
v11 = 0LL;
if ( *a4 < 0 )
v11 = *(unsigned int *)(v9 + 380);
v42 = a2;
v39 = v11;
v40 = a4;
if ( a6 )
{
v44 = v8;
v12 = (unsigned __int8)a4[1] + ((v10 & 0x7F) << 8) - 2;
v13 = a4 + 2;
v43 = a4 + 2;
if ( (a2[5] & 0x2E) != 0 )
{
v46 = a3;
v14 = &a4[v12];
v45 = a5;
*a5 = 0;
v15 = 0;
v16 = a4 + 2;
while ( 1 )
{
half_pos = (long long)v16;
v16 = v13;
memcpy(v45, v47, v15);
v15 = (*((long long ( **)(unsigned __int16 *, _QWORD, char **, _BYTE *))v42 + 9))(v42, 0LL, &v43, v47);
if ( !v15 )
break;
v13 = v43;
if ( v43 >= v14 )
{
v41 = v16;
goto LABEL_14;
}
}
v20 = *(const char **)(*(_QWORD *)v42 + 616LL);
mi_report_error(126, (long long)v20);
*(_DWORD *)my_thread_var(126LL, v20) = 126;
half_pos = 0LL;
LABEL_14:
v8 = v44;
v6 = v45;
a3 = v46;
}
else
{
v18 = a2[9];
v19 = (long long)&v13[(unsigned int)v18 * (v12 / a2[9] - 2)];
v41 = (char *)(v19 + v18);
memcpy(a5, v19, v18);
half_pos = v19;
v8 = v44;
}
}
else
{
half_pos = mi_find_half_pos(v11, a2, a4, a5, v38, &v41);
}
v21 = -1;
if ( half_pos )
{
v22 = v40;
v23 = half_pos - (_WORD)v40;
v46 = (unsigned __int8)v40[1];
v24 = *v40;
v25 = v39;
v26 = (_DWORD)v39 == 0;
v44 = (long long *)((unsigned __int8)((_DWORD)v39 != 0) << 15);
v27 = v23 + (((_DWORD)v39 != 0) << 15);
v40[1] = v23;
*v22 = HIBYTE(v27);
v43 = v41;
if ( !v26 )
memcpy(v8[32] + 2, &v41[-v25], v25);
v28 = v42;
v45 = (unsigned __int8 *)mi_new(v8, (long long)v42);
if ( v45 == (unsigned __int8 *)-1LL )
{
return (unsigned int)-1;
}
else
{
v29 = (_BYTE *)mi_move_key((long long)v28, a3, v6);
mi_kpointer((long long)v8, v29, (unsigned long long)v45);
v30 = v39;
v31 = (*((long long ( **)(unsigned __int16 *, _QWORD, char **, unsigned __int8 *))v28 + 9))(
v28,
(unsigned int)v39,
&v43,
v6);
v21 = -1;
if ( v31 )
{
v32 = v46 + ((v24 & 0x7F) << 8);
LODWORD(v46) = v30 + 2;
v33 = (*((unsigned int ( **)(unsigned __int16 *, _QWORD, _QWORD, _QWORD, _QWORD, unsigned __int8 *, _BYTE *))v28
+ 10))(
v28,
v30,
0LL,
0LL,
0LL,
v6,
v47);
v34 = v32 + (_DWORD)v40 - (_DWORD)v43;
v35 = (unsigned int)v46;
memcpy((unsigned int)v46 + v8[32] + v33, v43, v34);
(*((void ( **)(unsigned __int16 *, long long, _BYTE *))v28 + 11))(v28, v8[32] + v35, v47);
LOWORD(v33) = v34 + v46 + v33;
v36 = v33 + (_WORD)v44;
*(_BYTE *)(v8[32] + 1) = v33;
*(_BYTE *)v8[32] = HIBYTE(v36);
return (unsigned int)mi_write_keypage(v8, (long long)v28, (unsigned long long)v45, 3u, (_BYTE *)v8[32]) != 0
? -1
: 2;
}
}
}
return v21;
}
| _mi_split_page:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x518
MOV R13,R8
MOV R15,RDX
MOV R12,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RDX,qword ptr [RDI]
MOVSXD RAX,dword ptr [RDI + 0x1d4]
IMUL RAX,RAX,0x70
ADD RAX,qword ptr [RDX + 0x218]
CMP RAX,RSI
JNZ 0x00188daf
MOV byte ptr [R12 + 0x33c],0x1
LAB_00188daf:
MOV byte ptr [R12 + 0x33d],0x1
MOVZX EAX,byte ptr [RCX]
XOR EDI,EDI
TEST AL,AL
JNS 0x00188dc7
MOV EDI,dword ptr [RDX + 0x17c]
LAB_00188dc7:
TEST R9B,R9B
MOV qword ptr [RBP + -0x518],RSI
MOV qword ptr [RBP + -0x530],RDI
MOV qword ptr [RBP + -0x528],RCX
JZ 0x00188e7f
MOV qword ptr [RBP + -0x508],R12
MOVZX EDX,byte ptr [RCX + 0x1]
AND EAX,0x7f
SHL EAX,0x8
ADD EAX,EDX
ADD EAX,-0x2
LEA R12,[RCX + 0x2]
MOV qword ptr [RBP + -0x510],R12
TEST byte ptr [RSI + 0xa],0x2e
JZ 0x00188e9d
MOV qword ptr [RBP + -0x4f8],R15
MOV EAX,EAX
LEA R15,[R12 + RAX*0x1]
ADD R15,-0x2
MOV qword ptr [RBP + -0x500],R13
MOV byte ptr [R13],0x0
XOR EAX,EAX
LEA R14,[RBP + -0x4f0]
MOV R13,R12
LAB_00188e39:
MOV RBX,R13
MOV R13,R12
MOV EDX,EAX
MOV RDI,qword ptr [RBP + -0x500]
MOV RSI,R14
CALL 0x00129080
MOV RDI,qword ptr [RBP + -0x518]
XOR ESI,ESI
LEA RDX,[RBP + -0x510]
MOV RCX,R14
CALL qword ptr [RDI + 0x48]
TEST EAX,EAX
JZ 0x00188ed3
MOV R12,qword ptr [RBP + -0x510]
CMP R12,R15
JC 0x00188e39
MOV qword ptr [RBP + -0x520],R13
JMP 0x00188efb
LAB_00188e7f:
LEA R8,[RBP + -0x534]
LEA R9,[RBP + -0x520]
MOV RDX,RCX
MOV RCX,R13
CALL 0x001890f4
MOV RBX,RAX
JMP 0x00188f10
LAB_00188e9d:
MOVZX ECX,word ptr [RSI + 0x12]
XOR EDX,EDX
DIV ECX
ADD EAX,-0x2
IMUL EAX,ECX
ADD R12,RAX
LEA RAX,[R12 + RCX*0x1]
MOV qword ptr [RBP + -0x520],RAX
MOV RDI,R13
MOV RSI,R12
MOV RDX,RCX
CALL 0x00129080
MOV RBX,R12
MOV R12,qword ptr [RBP + -0x508]
JMP 0x00188f10
LAB_00188ed3:
MOV RAX,qword ptr [RBP + -0x518]
MOV RAX,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x268]
MOV EDI,0x7e
CALL 0x0017aa9e
CALL 0x001a1672
MOV dword ptr [RAX],0x7e
XOR EBX,EBX
LAB_00188efb:
MOV R12,qword ptr [RBP + -0x508]
MOV R13,qword ptr [RBP + -0x500]
MOV R15,qword ptr [RBP + -0x4f8]
LAB_00188f10:
MOV ECX,0xffffffff
TEST RBX,RBX
JZ 0x001890cc
MOV RCX,qword ptr [RBP + -0x528]
SUB RBX,RCX
MOVZX EAX,byte ptr [RCX + 0x1]
MOV qword ptr [RBP + -0x4f8],RAX
MOVZX R14D,byte ptr [RCX]
XOR EAX,EAX
MOV RDX,qword ptr [RBP + -0x530]
TEST EDX,EDX
SETNZ AL
SHL EAX,0xf
MOV qword ptr [RBP + -0x508],RAX
ADD EAX,EBX
MOV byte ptr [RCX + 0x1],BL
MOV byte ptr [RCX],AH
MOV RSI,qword ptr [RBP + -0x520]
MOV qword ptr [RBP + -0x510],RSI
TEST EDX,EDX
JZ 0x00188f7e
MOV EDX,EDX
SUB RSI,RDX
MOV RDI,qword ptr [R12 + 0x100]
ADD RDI,0x2
CALL 0x00129080
LAB_00188f7e:
MOV RDI,R12
MOV RBX,qword ptr [RBP + -0x518]
MOV RSI,RBX
MOV EDX,0x3
CALL 0x00183a86
MOV qword ptr [RBP + -0x500],RAX
CMP RAX,-0x1
JZ 0x001890c7
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R13
CALL 0x00185867
MOV RDI,R12
MOV RSI,RAX
MOV RDX,qword ptr [RBP + -0x500]
CALL 0x00184d0d
LEA RDX,[RBP + -0x510]
MOV RDI,RBX
MOV R15,qword ptr [RBP + -0x530]
MOV ESI,R15D
MOV RCX,R13
CALL qword ptr [RBX + 0x48]
TEST EAX,EAX
MOV ECX,0xffffffff
JZ 0x001890cc
AND R14D,0x7f
SHL R14D,0x8
ADD R14,qword ptr [RBP + -0x4f8]
LEA EAX,[R15 + 0x2]
MOV dword ptr [RBP + -0x4f8],EAX
LEA RAX,[RBP + -0x4f0]
MOV qword ptr [RSP],RAX
MOV RDI,RBX
MOV ESI,R15D
XOR EDX,EDX
XOR ECX,ECX
XOR R8D,R8D
MOV R9,R13
CALL qword ptr [RBX + 0x50]
MOV R15D,EAX
MOV R13,qword ptr [RBP + -0x528]
ADD R13,R14
MOV RSI,qword ptr [RBP + -0x510]
SUB R13,RSI
MOV R14D,dword ptr [RBP + -0x4f8]
MOV RAX,qword ptr [R12 + 0x100]
ADD RAX,R14
MOV EDI,R15D
ADD RDI,RAX
MOV EDX,R13D
CALL 0x00129080
ADD R14,qword ptr [R12 + 0x100]
MOV RDI,RBX
MOV RSI,R14
LEA RDX,[RBP + -0x4f0]
CALL qword ptr [RBX + 0x58]
ADD R15D,dword ptr [RBP + -0x4f8]
ADD R15D,R13D
MOV RCX,qword ptr [RBP + -0x508]
ADD ECX,R15D
MOV RAX,qword ptr [R12 + 0x100]
MOV byte ptr [RAX + 0x1],R15B
MOV RAX,qword ptr [R12 + 0x100]
MOV byte ptr [RAX],CH
MOV R8,qword ptr [R12 + 0x100]
MOV RDI,R12
MOV RSI,RBX
MOV RDX,qword ptr [RBP + -0x500]
MOV ECX,0x3
CALL 0x001838d4
XOR ECX,ECX
NEG EAX
SBB ECX,ECX
OR ECX,0x2
JMP 0x001890cc
LAB_001890c7:
MOV ECX,0xffffffff
LAB_001890cc:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001890ef
MOV EAX,ECX
ADD RSP,0x518
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001890ef:
CALL 0x00129270
|
uint _mi_split_page(long *param_1,long *param_2,ulong param_3,byte *param_4,int1 *param_5,
char param_6)
{
byte bVar1;
ushort uVar2;
long *plVar3;
uint uVar4;
int iVar5;
int4 *puVar6;
int8 uVar7;
byte *__src;
long *plVar8;
byte *pbVar9;
long lVar10;
ulong uVar11;
byte *pbVar12;
long in_FS_OFFSET;
int1 local_53c [4];
ulong local_538;
byte *local_530;
byte *local_528;
long *local_520;
byte *local_518;
long *local_510;
int1 *local_508;
ulong local_500;
int1 local_4f8 [1216];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
if ((long *)((long)*(int *)((long)param_1 + 0x1d4) * 0x70 + *(long *)(*param_1 + 0x218)) ==
param_2) {
*(int1 *)((long)param_1 + 0x33c) = 1;
}
*(int1 *)((long)param_1 + 0x33d) = 1;
local_538 = 0;
if ((char)*param_4 < '\0') {
local_538 = (ulong)*(uint *)(*param_1 + 0x17c);
}
local_530 = param_4;
local_520 = param_2;
if (param_6 == '\0') {
__src = (byte *)_mi_find_half_pos(local_538,param_2,param_4,param_5,local_53c,&local_528);
plVar8 = param_1;
pbVar9 = local_528;
}
else {
uVar4 = ((*param_4 & 0x7f) * 0x100 + (uint)param_4[1]) - 2;
local_518 = param_4 + 2;
local_510 = param_1;
if ((*(byte *)((long)param_2 + 10) & 0x2e) == 0) {
uVar2 = *(ushort *)((long)param_2 + 0x12);
__src = local_518 + (uVar4 / uVar2 - 2) * (uint)uVar2;
local_528 = __src + uVar2;
memcpy(param_5,__src,(ulong)uVar2);
plVar8 = local_510;
pbVar9 = local_528;
}
else {
pbVar12 = local_518 + ((ulong)uVar4 - 2);
*param_5 = 0;
uVar4 = 0;
pbVar9 = local_518;
local_508 = param_5;
local_500 = param_3;
do {
__src = pbVar9;
pbVar9 = local_518;
memcpy(local_508,local_4f8,(ulong)uVar4);
uVar4 = (*(code *)local_520[9])(local_520,0,&local_518,local_4f8);
if (uVar4 == 0) {
mi_report_error(0x7e,*(int8 *)(*local_520 + 0x268));
puVar6 = (int4 *)_my_thread_var();
*puVar6 = 0x7e;
__src = (byte *)0x0;
plVar8 = local_510;
param_5 = local_508;
param_3 = local_500;
pbVar9 = local_528;
break;
}
plVar8 = local_510;
param_5 = local_508;
param_3 = local_500;
} while (local_518 < pbVar12);
}
}
local_528 = pbVar9;
uVar4 = 0xffffffff;
if (__src != (byte *)0x0) {
local_500 = (ulong)local_530[1];
bVar1 = *local_530;
iVar5 = (int)local_538;
local_510 = (long *)((ulong)(iVar5 != 0) << 0xf);
local_530[1] = (byte)((long)__src - (long)local_530);
*local_530 = (byte)((uint)(iVar5 != 0) * 0x8000 + (int)((long)__src - (long)local_530) >> 8);
local_518 = local_528;
if (iVar5 != 0) {
memcpy((void *)(plVar8[0x20] + 2),local_528 + -(local_538 & 0xffffffff),local_538 & 0xffffffff
);
}
plVar3 = local_520;
local_508 = (int1 *)_mi_new(plVar8,local_520,3);
if (local_508 == (int1 *)0xffffffffffffffff) {
uVar4 = 0xffffffff;
}
else {
uVar7 = _mi_move_key(plVar3,param_3,param_5);
_mi_kpointer(plVar8,uVar7,local_508);
uVar11 = local_538;
iVar5 = (*(code *)plVar3[9])(plVar3,local_538 & 0xffffffff,&local_518,param_5);
uVar4 = 0xffffffff;
if (iVar5 != 0) {
lVar10 = ((bVar1 & 0x7f) << 8) + local_500;
local_500 = CONCAT44(local_500._4_4_,(int)uVar11 + 2);
uVar4 = (*(code *)plVar3[10])(plVar3,uVar11 & 0xffffffff,0,0,0,param_5,local_4f8);
pbVar9 = local_530 + (lVar10 - (long)local_518);
uVar11 = local_500 & 0xffffffff;
memcpy((void *)((ulong)uVar4 + plVar8[0x20] + uVar11),local_518,(ulong)pbVar9 & 0xffffffff);
(*(code *)plVar3[0xb])(plVar3,uVar11 + plVar8[0x20],local_4f8);
iVar5 = uVar4 + (int)local_500 + (int)pbVar9;
*(char *)(plVar8[0x20] + 1) = (char)iVar5;
*(char *)plVar8[0x20] = (char)((uint)((int)local_510 + iVar5) >> 8);
iVar5 = _mi_write_keypage(plVar8,plVar3,local_508,3,plVar8[0x20]);
uVar4 = -(uint)(iVar5 != 0) | 2;
}
}
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar4;
}
| |
23,191 | seek_io_cache | eloqsql/mysys/mf_iocache.c | void seek_io_cache(IO_CACHE *cache, my_off_t needed_offset)
{
my_off_t cached_data_start= cache->pos_in_file;
my_off_t cached_data_end= cache->pos_in_file + (cache->read_end -
cache->buffer);
if (needed_offset >= cached_data_start &&
needed_offset < cached_data_end)
{
/*
The offset we're seeking to is in the buffer.
Move buffer's read position accordingly
*/
cache->read_pos= cache->buffer + (needed_offset - cached_data_start);
}
else
{
if (needed_offset > cache->end_of_file)
needed_offset= cache->end_of_file;
/*
The offset we're seeking to is not in the buffer.
- Set the buffer to be exhausted.
- Make the next read to a mysql_file_seek() call to the required
offset.
TODO(cvicentiu, spetrunia) properly implement aligned seeks for
efficiency.
*/
cache->seek_not_done= 1;
cache->pos_in_file= needed_offset;
/* When reading it must appear as if we've started from the offset
that we've seeked here. We must let _my_b_cache_read assume that
by implying "no reading starting from pos_in_file" has happened. */
cache->read_pos= cache->buffer;
cache->read_end= cache->buffer;
}
} | O3 | c | seek_io_cache:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rdx
movq 0x20(%rdi), %rax
movq %rsi, %rcx
subq %rdx, %rcx
jb 0x50682
subq %rax, %rdx
addq 0x18(%rdi), %rdx
cmpq %rsi, %rdx
jbe 0x50682
addq %rcx, %rax
movq %rax, 0x10(%rdi)
jmp 0x506a2
movq 0x8(%rdi), %rcx
cmpq %rsi, %rcx
cmovbq %rcx, %rsi
movl $0x1, 0xe0(%rdi)
movq %rsi, (%rdi)
movq %rax, 0x10(%rdi)
movq %rax, 0x18(%rdi)
popq %rbp
retq
| seek_io_cache:
push rbp
mov rbp, rsp
mov rdx, [rdi]
mov rax, [rdi+20h]
mov rcx, rsi
sub rcx, rdx
jb short loc_50682
sub rdx, rax
add rdx, [rdi+18h]
cmp rdx, rsi
jbe short loc_50682
add rax, rcx
mov [rdi+10h], rax
jmp short loc_506A2
loc_50682:
mov rcx, [rdi+8]
cmp rcx, rsi
cmovb rsi, rcx
mov dword ptr [rdi+0E0h], 1
mov [rdi], rsi
mov [rdi+10h], rax
mov [rdi+18h], rax
loc_506A2:
pop rbp
retn
| long long seek_io_cache(long long a1, unsigned long long a2)
{
long long result; // rax
result = *(_QWORD *)(a1 + 32);
if ( a2 < *(_QWORD *)a1 || *(_QWORD *)(a1 + 24) + *(_QWORD *)a1 - result <= a2 )
{
if ( *(_QWORD *)(a1 + 8) < a2 )
a2 = *(_QWORD *)(a1 + 8);
*(_DWORD *)(a1 + 224) = 1;
*(_QWORD *)a1 = a2;
*(_QWORD *)(a1 + 16) = result;
*(_QWORD *)(a1 + 24) = result;
}
else
{
result += a2 - *(_QWORD *)a1;
*(_QWORD *)(a1 + 16) = result;
}
return result;
}
| seek_io_cache:
PUSH RBP
MOV RBP,RSP
MOV RDX,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x20]
MOV RCX,RSI
SUB RCX,RDX
JC 0x00150682
SUB RDX,RAX
ADD RDX,qword ptr [RDI + 0x18]
CMP RDX,RSI
JBE 0x00150682
ADD RAX,RCX
MOV qword ptr [RDI + 0x10],RAX
JMP 0x001506a2
LAB_00150682:
MOV RCX,qword ptr [RDI + 0x8]
CMP RCX,RSI
CMOVC RSI,RCX
MOV dword ptr [RDI + 0xe0],0x1
MOV qword ptr [RDI],RSI
MOV qword ptr [RDI + 0x10],RAX
MOV qword ptr [RDI + 0x18],RAX
LAB_001506a2:
POP RBP
RET
|
void seek_io_cache(ulong *param_1,ulong param_2)
{
ulong uVar1;
ulong uVar2;
uVar1 = *param_1;
uVar2 = param_1[4];
if ((param_2 < uVar1) || ((uVar1 - uVar2) + param_1[3] <= param_2)) {
if (param_1[1] < param_2) {
param_2 = param_1[1];
}
*(int4 *)(param_1 + 0x1c) = 1;
*param_1 = param_2;
param_1[2] = uVar2;
param_1[3] = uVar2;
}
else {
param_1[2] = uVar2 + (param_2 - uVar1);
}
return;
}
| |
23,192 | null_part_in_key(KEY_PART*, unsigned char const*, unsigned int) | eloqsql/sql/opt_range.cc | static bool null_part_in_key(KEY_PART *key_part, const uchar *key, uint length)
{
for (const uchar *end=key+length ;
key < end;
key+= key_part++->store_length)
{
if (key_part->null_bit && *key)
return 1;
}
return 0;
} | O0 | cpp | null_part_in_key(KEY_PART*, unsigned char const*, unsigned int):
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x8bcfb5
movq -0x10(%rbp), %rax
cmpb $0x0, 0x8(%rax)
je 0x8bcf90
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
je 0x8bcf90
movb $0x1, -0x1(%rbp)
jmp 0x8bcfb9
jmp 0x8bcf92
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x20, %rcx
movq %rcx, -0x10(%rbp)
movzwl 0x4(%rax), %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x8bcf6d
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
| _ZL16null_part_in_keyP8KEY_PARTPKhj:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov rax, [rbp+var_18]
mov ecx, [rbp+var_1C]
add rax, rcx
mov [rbp+var_28], rax
loc_8BCF6D:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_28]
jnb short loc_8BCFB5
mov rax, [rbp+var_10]
cmp byte ptr [rax+8], 0
jz short loc_8BCF90
mov rax, [rbp+var_18]
cmp byte ptr [rax], 0
jz short loc_8BCF90
mov [rbp+var_1], 1
jmp short loc_8BCFB9
loc_8BCF90:
jmp short $+2
loc_8BCF92:
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 20h ; ' '
mov [rbp+var_10], rcx
movzx ecx, word ptr [rax+4]
mov rax, [rbp+var_18]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_18], rax
jmp short loc_8BCF6D
loc_8BCFB5:
mov [rbp+var_1], 0
loc_8BCFB9:
mov al, [rbp+var_1]
and al, 1
pop rbp
retn
| char null_part_in_key(long long a1, _BYTE *a2, int a3)
{
long long v3; // rax
_BYTE *i; // [rsp+10h] [rbp-18h]
for ( i = a2; i < &a2[a3]; i += *(unsigned __int16 *)(v3 + 4) )
{
if ( *(_BYTE *)(a1 + 8) && *i )
return 1;
v3 = a1;
a1 += 32LL;
}
return 0;
}
| __cxx_global_var_init.96:
PUSH RBP
MOV RBP,RSP
LEA RDI,[0x1e7ea48]
LEA RSI,[0x1c643a0]
MOV EDX,0x9a
CALL 0x00e7b280
POP RBP
RET
|
void __cxx_global_var_init_96(void)
{
Native_func_registry_array::Native_func_registry_array
((Native_func_registry_array *)native_func_registry_array_geom,
(Native_func_registry *)func_array_geom,0x9a);
return;
}
| |
23,193 | my_printv_error | eloqsql/mysys/my_error.c | void my_printv_error(uint error, const char *format, myf MyFlags, va_list ap)
{
char ebuff[ERRMSGSIZE];
DBUG_ENTER("my_printv_error");
DBUG_PRINT("my", ("nr: %d MyFlags: %lu errno: %d format: %s",
error, MyFlags, errno, format));
(void) my_vsnprintf(ebuff, sizeof(ebuff), format, ap);
(*error_handler_hook)(error, ebuff, MyFlags);
DBUG_VOID_RETURN;
} | O0 | c | my_printv_error:
pushq %rbp
movq %rsp, %rbp
subq $0x230, %rsp # imm = 0x230
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movl %edi, -0x214(%rbp)
movq %rsi, -0x220(%rbp)
movq %rdx, -0x228(%rbp)
movq %rcx, -0x230(%rbp)
jmp 0xef7c5
leaq -0x210(%rbp), %rdi
movq -0x220(%rbp), %rdx
movq -0x230(%rbp), %rcx
movl $0x200, %esi # imm = 0x200
callq 0x14cca0
leaq 0x1cf3f5(%rip), %rax # 0x2bebe0
movq (%rax), %rax
movl -0x214(%rbp), %edi
leaq -0x210(%rbp), %rsi
movq -0x228(%rbp), %rdx
callq *%rax
jmp 0xef806
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xef821
addq $0x230, %rsp # imm = 0x230
popq %rbp
retq
callq 0x2a270
nopw %cs:(%rax,%rax)
| my_printv_error:
push rbp
mov rbp, rsp
sub rsp, 230h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_214], edi
mov [rbp+var_220], rsi
mov [rbp+var_228], rdx
mov [rbp+var_230], rcx
jmp short $+2
loc_EF7C5:
lea rdi, [rbp+var_210]
mov rdx, [rbp+var_220]
mov rcx, [rbp+var_230]
mov esi, 200h
call my_vsnprintf
lea rax, error_handler_hook
mov rax, [rax]
mov edi, [rbp+var_214]
lea rsi, [rbp+var_210]
mov rdx, [rbp+var_228]
call rax
jmp short $+2
loc_EF806:
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_EF821
add rsp, 230h
pop rbp
retn
loc_EF821:
call ___stack_chk_fail
| unsigned long long my_printv_error(long long a1, long long a2, long long a3, long long a4)
{
_BYTE v5[520]; // [rsp+20h] [rbp-210h] BYREF
unsigned long long v6; // [rsp+228h] [rbp-8h]
v6 = __readfsqword(0x28u);
my_vsnprintf(v5, 512LL, a2, a4);
error_handler_hook();
return __readfsqword(0x28u);
}
| my_printv_error:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x230
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV dword ptr [RBP + -0x214],EDI
MOV qword ptr [RBP + -0x220],RSI
MOV qword ptr [RBP + -0x228],RDX
MOV qword ptr [RBP + -0x230],RCX
JMP 0x001ef7c5
LAB_001ef7c5:
LEA RDI,[RBP + -0x210]
MOV RDX,qword ptr [RBP + -0x220]
MOV RCX,qword ptr [RBP + -0x230]
MOV ESI,0x200
CALL 0x0024cca0
LEA RAX,[0x3bebe0]
MOV RAX,qword ptr [RAX]
MOV EDI,dword ptr [RBP + -0x214]
LEA RSI,[RBP + -0x210]
MOV RDX,qword ptr [RBP + -0x228]
CALL RAX
JMP 0x001ef806
LAB_001ef806:
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001ef821
ADD RSP,0x230
POP RBP
RET
LAB_001ef821:
CALL 0x0012a270
|
void my_printv_error(int4 param_1,int8 param_2,int8 param_3,int8 param_4)
{
long in_FS_OFFSET;
int1 local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
my_vsnprintf(local_218,0x200,param_2,param_4);
(*(code *)error_handler_hook)(param_1,local_218,param_3);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
23,194 | my_hash_sort_bin | eloqsql/strings/ctype-bin.c | void my_hash_sort_bin(CHARSET_INFO *cs __attribute__((unused)),
const uchar *key, size_t len,ulong *nr1, ulong *nr2)
{
const uchar *end = key + len;
ulong tmp1= *nr1;
ulong tmp2= *nr2;
for (; key < end ; key++)
{
MY_HASH_ADD(tmp1, tmp2, (uint) *key);
}
*nr1= tmp1;
*nr2= tmp2;
} | O3 | c | my_hash_sort_bin:
movq (%rcx), %rax
movq (%r8), %rdi
testq %rdx, %rdx
jle 0x3634b
pushq %rbp
movq %rsp, %rbp
addq %rsi, %rdx
movl %eax, %r9d
andl $0x3f, %r9d
addq %rdi, %r9
movzbl (%rsi), %r10d
imulq %r9, %r10
movq %rax, %r9
shlq $0x8, %r9
addq %r10, %r9
xorq %r9, %rax
addq $0x3, %rdi
incq %rsi
cmpq %rdx, %rsi
jb 0x3631f
popq %rbp
movq %rax, (%rcx)
movq %rdi, (%r8)
retq
| my_hash_sort_bin:
mov rax, [rcx]
mov rdi, [r8]
test rdx, rdx
jle short loc_3634B
push rbp
mov rbp, rsp
add rdx, rsi
loc_3631F:
mov r9d, eax
and r9d, 3Fh
add r9, rdi
movzx r10d, byte ptr [rsi]
imul r10, r9
mov r9, rax
shl r9, 8
add r9, r10
xor rax, r9
add rdi, 3
inc rsi
cmp rsi, rdx
jb short loc_3631F
pop rbp
loc_3634B:
mov [rcx], rax
mov [r8], rdi
retn
| long long my_hash_sort_bin(long long a1, unsigned __int8 *a2, long long a3, long long *a4, long long *a5)
{
long long result; // rax
long long v6; // rdi
unsigned __int8 *v7; // rdx
result = *a4;
v6 = *a5;
if ( a3 > 0 )
{
v7 = &a2[a3];
do
{
result ^= (v6 + (result & 0x3F)) * *a2 + (result << 8);
v6 += 3LL;
++a2;
}
while ( a2 < v7 );
}
*a4 = result;
*a5 = v6;
return result;
}
| my_hash_sort_bin:
MOV RAX,qword ptr [RCX]
MOV RDI,qword ptr [R8]
TEST RDX,RDX
JLE 0x0013634b
PUSH RBP
MOV RBP,RSP
ADD RDX,RSI
LAB_0013631f:
MOV R9D,EAX
AND R9D,0x3f
ADD R9,RDI
MOVZX R10D,byte ptr [RSI]
IMUL R10,R9
MOV R9,RAX
SHL R9,0x8
ADD R9,R10
XOR RAX,R9
ADD RDI,0x3
INC RSI
CMP RSI,RDX
JC 0x0013631f
POP RBP
LAB_0013634b:
MOV qword ptr [RCX],RAX
MOV qword ptr [R8],RDI
RET
|
void my_hash_sort_bin(int8 param_1,byte *param_2,long param_3,ulong *param_4,long *param_5)
{
ulong uVar1;
byte *pbVar2;
long lVar3;
uVar1 = *param_4;
lVar3 = *param_5;
if (0 < param_3) {
pbVar2 = param_2 + param_3;
do {
uVar1 = uVar1 ^ uVar1 * 0x100 + (ulong)*param_2 * ((ulong)((uint)uVar1 & 0x3f) + lVar3);
lVar3 = lVar3 + 3;
param_2 = param_2 + 1;
} while (param_2 < pbVar2);
}
*param_4 = uVar1;
*param_5 = lVar3;
return;
}
| |
23,195 | translog_mark_file_finished | eloqsql/storage/maria/ma_loghandler.c | static void translog_mark_file_finished(uint32 file)
{
int i;
struct st_file_counter *UNINIT_VAR(fc_ptr);
DBUG_ENTER("translog_mark_file_finished");
DBUG_PRINT("enter", ("file: %lu", (ulong) file));
mysql_mutex_lock(&log_descriptor.unfinished_files_lock);
DBUG_ASSERT(log_descriptor.unfinished_files.elements > 0);
for (i= 0;
i < (int) log_descriptor.unfinished_files.elements;
i++)
{
fc_ptr= dynamic_element(&log_descriptor.unfinished_files,
i, struct st_file_counter *);
if (fc_ptr->file == file)
{
break;
}
}
DBUG_ASSERT(i < (int) log_descriptor.unfinished_files.elements);
if (! --fc_ptr->counter)
delete_dynamic_element(&log_descriptor.unfinished_files, i);
mysql_mutex_unlock(&log_descriptor.unfinished_files_lock);
DBUG_VOID_RETURN;
} | O0 | c | translog_mark_file_finished:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x3b035
leaq 0x43ed84(%rip), %rdi # 0x479dc0
addq $0x800e08, %rdi # imm = 0x800E08
leaq 0x11797f(%rip), %rsi # 0x1529c9
movl $0x58d, %edx # imm = 0x58D
callq 0x2ea70
jmp 0x3b056
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl 0xc3fbb2(%rip), %eax # 0xc7ac18
jge 0x3b098
movq 0xc3fba1(%rip), %rax # 0xc7ac10
movslq -0x8(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
cmpl -0x4(%rbp), %eax
jne 0x3b08b
jmp 0x3b098
jmp 0x3b08d
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x3b05d
jmp 0x3b09a
jmp 0x3b09c
movq -0x10(%rbp), %rcx
movl 0x4(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x4(%rcx)
cmpl $0x0, %eax
jne 0x3b0c4
movl -0x8(%rbp), %esi
leaq 0x43ed08(%rip), %rdi # 0x479dc0
addq $0x800e50, %rdi # imm = 0x800E50
callq 0xdba90
leaq 0x43ecf5(%rip), %rdi # 0x479dc0
addq $0x800e08, %rdi # imm = 0x800E08
callq 0x2eae0
jmp 0x3b0d9
addq $0x10, %rsp
popq %rbp
retq
nop
| translog_mark_file_finished:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_4], edi
mov rax, [rbp+var_10]
mov [rbp+var_10], rax
jmp short $+2
loc_3B035:
lea rdi, log_descriptor
add rdi, 800E08h
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 58Dh
call inline_mysql_mutex_lock
jmp short $+2
loc_3B056:
mov [rbp+var_8], 0
loc_3B05D:
mov eax, [rbp+var_8]
cmp eax, cs:dword_C7AC18
jge short loc_3B098
mov rax, cs:qword_C7AC10
movsxd rcx, [rbp+var_8]
shl rcx, 3
add rax, rcx
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov eax, [rax]
cmp eax, [rbp+var_4]
jnz short loc_3B08B
jmp short loc_3B098
loc_3B08B:
jmp short $+2
loc_3B08D:
mov eax, [rbp+var_8]
add eax, 1
mov [rbp+var_8], eax
jmp short loc_3B05D
loc_3B098:
jmp short $+2
loc_3B09A:
jmp short $+2
loc_3B09C:
mov rcx, [rbp+var_10]
mov eax, [rcx+4]
add eax, 0FFFFFFFFh
mov [rcx+4], eax
cmp eax, 0
jnz short loc_3B0C4
mov esi, [rbp+var_8]
lea rdi, log_descriptor
add rdi, 800E50h
call delete_dynamic_element
loc_3B0C4:
lea rdi, log_descriptor
add rdi, 800E08h
call inline_mysql_mutex_unlock
jmp short $+2
loc_3B0D9:
add rsp, 10h
pop rbp
retn
| long long translog_mark_file_finished(int a1)
{
int v1; // eax
_DWORD *v3; // [rsp+0h] [rbp-10h]
int i; // [rsp+8h] [rbp-8h]
inline_mysql_mutex_lock(
(long long)&log_descriptor[1049025],
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x58Du);
for ( i = 0; i < dword_C7AC18; ++i )
{
v3 = (_DWORD *)(8LL * i + qword_C7AC10);
if ( *v3 == a1 )
break;
}
v1 = v3[1] - 1;
v3[1] = v1;
if ( !v1 )
delete_dynamic_element(&log_descriptor[1049034], (unsigned int)i);
return inline_mysql_mutex_unlock((long long)&log_descriptor[1049025]);
}
| translog_mark_file_finished:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV dword ptr [RBP + -0x4],EDI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0013b035
LAB_0013b035:
LEA RDI,[0x579dc0]
ADD RDI,0x800e08
LEA RSI,[0x2529c9]
MOV EDX,0x58d
CALL 0x0012ea70
JMP 0x0013b056
LAB_0013b056:
MOV dword ptr [RBP + -0x8],0x0
LAB_0013b05d:
MOV EAX,dword ptr [RBP + -0x8]
CMP EAX,dword ptr [0x00d7ac18]
JGE 0x0013b098
MOV RAX,qword ptr [0x00d7ac10]
MOVSXD RCX,dword ptr [RBP + -0x8]
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
CMP EAX,dword ptr [RBP + -0x4]
JNZ 0x0013b08b
JMP 0x0013b098
LAB_0013b08b:
JMP 0x0013b08d
LAB_0013b08d:
MOV EAX,dword ptr [RBP + -0x8]
ADD EAX,0x1
MOV dword ptr [RBP + -0x8],EAX
JMP 0x0013b05d
LAB_0013b098:
JMP 0x0013b09a
LAB_0013b09a:
JMP 0x0013b09c
LAB_0013b09c:
MOV RCX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RCX + 0x4]
ADD EAX,-0x1
MOV dword ptr [RCX + 0x4],EAX
CMP EAX,0x0
JNZ 0x0013b0c4
MOV ESI,dword ptr [RBP + -0x8]
LEA RDI,[0x579dc0]
ADD RDI,0x800e50
CALL 0x001dba90
LAB_0013b0c4:
LEA RDI,[0x579dc0]
ADD RDI,0x800e08
CALL 0x0012eae0
JMP 0x0013b0d9
LAB_0013b0d9:
ADD RSP,0x10
POP RBP
RET
|
void translog_mark_file_finished(int param_1)
{
int iVar1;
int *local_18;
int local_10;
inline_mysql_mutex_lock
(&DAT_00d7abc8,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x58d);
local_10 = 0;
while ((local_10 < DAT_00d7ac18 &&
(local_18 = (int *)(DAT_00d7ac10 + (long)local_10 * 8), *local_18 != param_1))) {
local_10 = local_10 + 1;
}
iVar1 = local_18[1];
local_18[1] = iVar1 + -1;
if (iVar1 + -1 == 0) {
delete_dynamic_element(&DAT_00d7ac10,local_10);
}
inline_mysql_mutex_unlock(&DAT_00d7abc8);
return;
}
| |
23,196 | maria_rtree_real_delete | eloqsql/storage/maria/ma_rt_index.c | my_bool maria_rtree_real_delete(MARIA_HA *info, MARIA_KEY *key,
my_off_t *root)
{
uint page_size;
stPageList ReinsertList;
my_off_t old_root;
MARIA_SHARE *share= info->s;
MARIA_KEYDEF *keyinfo= key->keyinfo;
uint key_data_length= key->data_length;
my_bool buff_alloced= 0;
uchar *page_buf= 0;
DBUG_ENTER("maria_rtree_real_delete");
if ((old_root= share->state.key_root[keyinfo->key_nr]) ==
HA_OFFSET_ERROR)
{
my_errno= HA_ERR_END_OF_FILE;
DBUG_RETURN(1); /* purecov: inspected */
}
DBUG_PRINT("rtree", ("starting deletion at root page: %lu",
(ulong) old_root));
ReinsertList.pages= NULL;
ReinsertList.n_pages= 0;
ReinsertList.m_pages= 0;
switch (maria_rtree_delete_req(info, key, old_root, &page_size,
&ReinsertList, 0)) {
case 2: /* empty */
{
*root= HA_OFFSET_ERROR;
break;
}
case 0: /* deleted */
{
uint nod_flag;
ulong i;
MARIA_PAGE page;
MARIA_KEY tmp_key;
tmp_key.keyinfo= key->keyinfo;
tmp_key.data_length= key->data_length;
tmp_key.ref_length= key->ref_length;
tmp_key.flag= 0; /* Safety */
if (ReinsertList.n_pages)
{
alloc_on_stack(*info->stack_end_ptr, page_buf, buff_alloced,
keyinfo->block_length);
if (!page_buf)
{
my_errno= HA_ERR_OUT_OF_MEM;
goto err;
}
for (i= 0; i < ReinsertList.n_pages; ++i)
{
uchar *k, *last;
if (_ma_fetch_keypage(&page, info, keyinfo, ReinsertList.pages[i].offs,
PAGECACHE_LOCK_WRITE,
DFLT_INIT_HITS, page_buf, 0))
goto err;
nod_flag= page.node;
DBUG_PRINT("rtree", ("reinserting keys from "
"page: %lu level: %d nod_flag: %u",
(ulong) ReinsertList.pages[i].offs,
ReinsertList.pages[i].level, nod_flag));
k= rt_PAGE_FIRST_KEY(share, page.buff, nod_flag);
last= rt_PAGE_END(&page);
for (; k < last; k= rt_PAGE_NEXT_KEY(share, k, key_data_length,
nod_flag))
{
int res;
tmp_key.data= k;
if ((res= maria_rtree_insert_level(info, &tmp_key,
ReinsertList.pages[i].level,
root)) == -1)
goto err;
if (res)
{
uint j;
DBUG_PRINT("rtree", ("root has been split, adjust levels"));
for (j= i; j < ReinsertList.n_pages; j++)
{
ReinsertList.pages[j].level++;
DBUG_PRINT("rtree", ("keys from page: %lu now level: %d",
(ulong) ReinsertList.pages[i].offs,
ReinsertList.pages[i].level));
}
}
}
page_mark_changed(info, &page);
if (_ma_dispose(info, page.pos, 0))
goto err;
}
}
/* check for redundant root (not leaf, 1 child) and eliminate */
if ((old_root= *root) == HA_OFFSET_ERROR)
goto err;
if (_ma_fetch_keypage(&page, info, keyinfo, old_root,
PAGECACHE_LOCK_WRITE,
DFLT_INIT_HITS, info->buff, 0))
goto err;
nod_flag= page.node;
if (nod_flag && (page.size == share->keypage_header + key_data_length +
nod_flag))
{
*root= _ma_kpos(nod_flag,
rt_PAGE_FIRST_KEY(share, info->buff, nod_flag));
page_mark_changed(info, &page);
if (_ma_dispose(info, page.pos, 0))
goto err;
}
info->update= HA_STATE_DELETED;
break;
}
case 1: /* not found */
{
my_errno= HA_ERR_KEY_NOT_FOUND;
goto err;
}
case -1: /* error */
default:
goto err; /* purecov: inspected */
}
my_free(ReinsertList.pages);
stack_alloc_free(page_buf, buff_alloced);
DBUG_RETURN(0);
err:
my_free(ReinsertList.pages);
stack_alloc_free(page_buf, buff_alloced);
DBUG_RETURN(1);
} | O3 | c | maria_rtree_real_delete:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rdx, -0x48(%rbp)
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq (%rdi), %rax
movq 0x8(%rsi), %r12
movq %rax, -0x70(%rbp)
movq 0x118(%rax), %rax
movzbl 0xa5(%r12), %ecx
movq (%rax,%rcx,8), %rdx
cmpq $-0x1, %rdx
je 0x62882
movq %rsi, %r15
movq %rdi, %rbx
movl 0x10(%rsi), %r14d
xorps %xmm0, %xmm0
leaq -0x60(%rbp), %r8
movaps %xmm0, (%r8)
leaq -0xa4(%rbp), %rcx
xorl %r9d, %r9d
callq 0x62bf6
testl %eax, %eax
je 0x628a6
cmpl $0x1, %eax
je 0x62892
cmpl $0x2, %eax
jne 0x6289d
movq -0x48(%rbp), %rax
movq $-0x1, (%rax)
movq -0x58(%rbp), %rdi
callq 0xa014e
xorl %eax, %eax
jmp 0x62b3d
callq 0xa1c92
movl $0x89, (%rax)
jmp 0x62b3b
callq 0xa1c92
movl $0x78, (%rax)
movq -0x58(%rbp), %rdi
jmp 0x62b36
movq 0x8(%r15), %rax
movq %rax, -0xf8(%rbp)
movq 0x10(%r15), %rax
movq %rax, -0xf0(%rbp)
movl $0x0, -0xe8(%rbp)
movl -0x60(%rbp), %eax
movq %rax, -0x68(%rbp)
testq %rax, %rax
je 0x62ab8
movzwl 0xa6(%r12), %esi
leaq -0x108(%rbp), %rcx
movq %rsi, (%rcx)
movq 0x78(%rbx), %rax
movq (%rax), %rax
subq %rcx, %rax
subq %rsi, %rax
jbe 0x6292c
cmpq $0x10000, %rax # imm = 0x10000
ja 0x62910
cmpl $0x1000, %esi # imm = 0x1000
jb 0x6292c
cmpq $0x8001, %rax # imm = 0x8001
jb 0x6292c
movq %rsp, %rcx
addl $0xf, %esi
andl $-0x10, %esi
subq %rsi, %rcx
movq %rcx, -0x40(%rbp)
movq %rcx, %rsp
movl $0x0, -0x34(%rbp)
jmp 0x6294a
movl $0x10010, %edx # imm = 0x10010
xorl %edi, %edi
callq 0x9ff21
movq %rax, -0x40(%rbp)
testq %rax, %rax
je 0x62b16
movb $0x1, %al
movl %eax, -0x34(%rbp)
movq -0x58(%rbp), %rax
xorl %r13d, %r13d
movq -0x68(%rbp), %rcx
movq %rcx, -0x88(%rbp)
movq %rax, -0x78(%rbp)
movq %rax, -0x80(%rbp)
movq %r14, -0x98(%rbp)
movq %r12, -0xa0(%rbp)
movq %r13, %r15
shlq $0x4, %r15
movq -0x78(%rbp), %rax
movq 0x8(%rax,%r15), %rcx
leaq -0xe0(%rbp), %rdi
movq %rbx, %rsi
movq %r12, %rdx
movl $0x4, %r8d
movl $0x3, %r9d
pushq $0x0
pushq -0x40(%rbp)
callq 0x6f32e
addq $0x10, %rsp
testb %al, %al
jne 0x62b02
movq %r13, -0x90(%rbp)
movq %rbx, %r14
movl -0xb8(%rbp), %r12d
movq -0xd0(%rbp), %rax
movq -0x70(%rbp), %rcx
movl 0x744(%rcx), %r13d
addq %rax, %r13
addq %r12, %r13
movl -0xc0(%rbp), %ebx
addq %rax, %rbx
cmpq %rbx, %r13
jae 0x62a5a
addq -0x78(%rbp), %r15
movq %r13, -0x100(%rbp)
movl (%r15), %edx
movq %r14, %rdi
leaq -0x100(%rbp), %rsi
movq -0x48(%rbp), %rcx
callq 0x61d92
testl %eax, %eax
je 0x62a39
cmpl $-0x1, %eax
je 0x62b02
movq -0x90(%rbp), %rax
cmpq -0x68(%rbp), %rax
jae 0x62a39
movq -0x88(%rbp), %rax
movq -0x80(%rbp), %rcx
incl (%rcx)
addq $0x10, %rcx
decq %rax
jne 0x62a2e
movq %r12, %rax
testl %r12d, %r12d
jne 0x62a4b
movq -0x70(%rbp), %rax
movl 0x3e0(%rax), %eax
addq -0x98(%rbp), %r13
addq %rax, %r13
cmpq %rbx, %r13
jb 0x629ec
movq %r14, %rbx
movq 0x2e8(%r14), %rax
movl -0xb0(%rbp), %ecx
leaq (%rcx,%rcx,2), %rcx
movb $0x1, 0x10(%rax,%rcx,8)
movq -0xc8(%rbp), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x6f535
testl %eax, %eax
jne 0x62b02
movq -0x90(%rbp), %r13
incq %r13
addq $0x10, -0x80(%rbp)
decq -0x88(%rbp)
cmpq -0x68(%rbp), %r13
movq -0x98(%rbp), %r14
movq -0xa0(%rbp), %r12
jne 0x62972
jmp 0x62ac7
movq $0x0, -0x40(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x48(%rbp), %rax
movq (%rax), %rcx
cmpq $-0x1, %rcx
je 0x62b02
leaq -0xe0(%rbp), %rdi
movq %rbx, %rsi
movq %r12, %rdx
movl $0x4, %r8d
movl $0x3, %r9d
pushq $0x0
pushq 0x378(%rbx)
callq 0x6f32e
addq $0x10, %rsp
testb %al, %al
je 0x62b5f
movl -0x34(%rbp), %r15d
movq -0x58(%rbp), %rdi
callq 0xa014e
testb %r15b, %r15b
jne 0x62b32
jmp 0x62b3b
callq 0xa1c92
movl $0x80, (%rax)
movq -0x58(%rbp), %rdi
callq 0xa014e
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0xa014e
movb $0x1, %al
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x62bf1
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl -0xb8(%rbp), %edi
testq %rdi, %rdi
movl -0x34(%rbp), %r15d
je 0x62bcc
movq -0x70(%rbp), %rax
movl 0x744(%rax), %esi
addl %edi, %r14d
addl %esi, %r14d
cmpl %r14d, -0xc0(%rbp)
jne 0x62bcc
addq 0x378(%rbx), %rsi
addq %rdi, %rsi
callq 0x6d33f
movq -0x48(%rbp), %rcx
movq %rax, (%rcx)
movq 0x2e8(%rbx), %rax
movl -0xb0(%rbp), %ecx
leaq (%rcx,%rcx,2), %rcx
movb $0x1, 0x10(%rax,%rcx,8)
movq -0xc8(%rbp), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x6f535
testl %eax, %eax
jne 0x62b06
movl $0x8, 0x624(%rbx)
movq -0x58(%rbp), %rdi
callq 0xa014e
testb %r15b, %r15b
je 0x6287b
movq -0x40(%rbp), %rdi
jmp 0x62876
callq 0x29260
| maria_rtree_real_delete:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0E8h
mov [rbp+var_48], rdx
mov rax, fs:28h
mov [rbp+var_30], rax
mov rax, [rdi]
mov r12, [rsi+8]
mov [rbp+var_70], rax
mov rax, [rax+118h]
movzx ecx, byte ptr [r12+0A5h]
mov rdx, [rax+rcx*8]
cmp rdx, 0FFFFFFFFFFFFFFFFh
jz short loc_62882
mov r15, rsi
mov rbx, rdi
mov r14d, [rsi+10h]
xorps xmm0, xmm0
lea r8, [rbp+var_60]
movaps xmmword ptr [r8], xmm0
lea rcx, [rbp+var_A4]
xor r9d, r9d
call maria_rtree_delete_req
test eax, eax
jz short loc_628A6
cmp eax, 1
jz short loc_62892
cmp eax, 2
jnz short loc_6289D
mov rax, [rbp+var_48]
mov qword ptr [rax], 0FFFFFFFFFFFFFFFFh
mov rdi, [rbp+var_58]
loc_62876:
call my_free
loc_6287B:
xor eax, eax
jmp loc_62B3D
loc_62882:
call _my_thread_var
mov dword ptr [rax], 89h
jmp loc_62B3B
loc_62892:
call _my_thread_var
mov dword ptr [rax], 78h ; 'x'
loc_6289D:
mov rdi, [rbp+var_58]
jmp loc_62B36
loc_628A6:
mov rax, [r15+8]
mov [rbp+var_F8], rax
mov rax, [r15+10h]
mov [rbp+var_F0], rax
mov [rbp+var_E8], 0
mov eax, [rbp+var_60]
mov [rbp+var_68], rax
test rax, rax
jz loc_62AB8
movzx esi, word ptr [r12+0A6h]
lea rcx, [rbp+var_108]
mov [rcx], rsi
mov rax, [rbx+78h]
mov rax, [rax]
sub rax, rcx
sub rax, rsi
jbe short loc_6292C
cmp rax, 10000h
ja short loc_62910
cmp esi, 1000h
jb short loc_6292C
cmp rax, 8001h
jb short loc_6292C
loc_62910:
mov rcx, rsp
add esi, 0Fh
and esi, 0FFFFFFF0h
sub rcx, rsi
mov [rbp+var_40], rcx
mov rsp, rcx
mov [rbp+var_34], 0
jmp short loc_6294A
loc_6292C:
mov edx, 10010h
xor edi, edi
call my_malloc
mov [rbp+var_40], rax
test rax, rax
jz loc_62B16
mov al, 1
mov [rbp+var_34], eax
loc_6294A:
mov rax, [rbp+var_58]
xor r13d, r13d
mov rcx, [rbp+var_68]
mov [rbp+var_88], rcx
mov [rbp+var_78], rax
mov [rbp+var_80], rax
mov [rbp+var_98], r14
mov [rbp+var_A0], r12
loc_62972:
mov r15, r13
shl r15, 4
mov rax, [rbp+var_78]
mov rcx, [rax+r15+8]
lea rdi, [rbp+var_E0]
mov rsi, rbx
mov rdx, r12
mov r8d, 4
mov r9d, 3
push 0
push [rbp+var_40]
call _ma_fetch_keypage
add rsp, 10h
test al, al
jnz loc_62B02
mov [rbp+var_90], r13
mov r14, rbx
mov r12d, [rbp+var_B8]
mov rax, [rbp+var_D0]
mov rcx, [rbp+var_70]
mov r13d, [rcx+744h]
add r13, rax
add r13, r12
mov ebx, [rbp+var_C0]
add rbx, rax
cmp r13, rbx
jnb short loc_62A5A
add r15, [rbp+var_78]
loc_629EC:
mov [rbp+var_100], r13
mov edx, [r15]
mov rdi, r14
lea rsi, [rbp+var_100]
mov rcx, [rbp+var_48]
call maria_rtree_insert_level
test eax, eax
jz short loc_62A39
cmp eax, 0FFFFFFFFh
jz loc_62B02
mov rax, [rbp+var_90]
cmp rax, [rbp+var_68]
jnb short loc_62A39
mov rax, [rbp+var_88]
mov rcx, [rbp+var_80]
loc_62A2E:
inc dword ptr [rcx]
add rcx, 10h
dec rax
jnz short loc_62A2E
loc_62A39:
mov rax, r12
test r12d, r12d
jnz short loc_62A4B
mov rax, [rbp+var_70]
mov eax, [rax+3E0h]
loc_62A4B:
add r13, [rbp+var_98]
add r13, rax
cmp r13, rbx
jb short loc_629EC
loc_62A5A:
mov rbx, r14
mov rax, [r14+2E8h]
mov ecx, [rbp+var_B0]
lea rcx, [rcx+rcx*2]
mov byte ptr [rax+rcx*8+10h], 1
mov rsi, [rbp+var_C8]
mov rdi, r14
xor edx, edx
call _ma_dispose
test eax, eax
jnz short loc_62B02
mov r13, [rbp+var_90]
inc r13
add [rbp+var_80], 10h
dec [rbp+var_88]
cmp r13, [rbp+var_68]
mov r14, [rbp+var_98]
mov r12, [rbp+var_A0]
jnz loc_62972
jmp short loc_62AC7
loc_62AB8:
mov [rbp+var_40], 0
mov [rbp+var_34], 0
loc_62AC7:
mov rax, [rbp+var_48]
mov rcx, [rax]
cmp rcx, 0FFFFFFFFFFFFFFFFh
jz short loc_62B02
lea rdi, [rbp+var_E0]
mov rsi, rbx
mov rdx, r12
mov r8d, 4
mov r9d, 3
push 0
push qword ptr [rbx+378h]
call _ma_fetch_keypage
add rsp, 10h
test al, al
jz short loc_62B5F
loc_62B02:
mov r15d, [rbp+var_34]
loc_62B06:
mov rdi, [rbp+var_58]
call my_free
test r15b, r15b
jnz short loc_62B32
jmp short loc_62B3B
loc_62B16:
call _my_thread_var
mov dword ptr [rax], 80h
mov rdi, [rbp+var_58]
call my_free
mov [rbp+var_40], 0
loc_62B32:
mov rdi, [rbp+var_40]
loc_62B36:
call my_free
loc_62B3B:
mov al, 1
loc_62B3D:
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz loc_62BF1
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_62B5F:
mov edi, [rbp+var_B8]
test rdi, rdi
mov r15d, [rbp+var_34]
jz short loc_62BCC
mov rax, [rbp+var_70]
mov esi, [rax+744h]
add r14d, edi
add r14d, esi
cmp [rbp+var_C0], r14d
jnz short loc_62BCC
add rsi, [rbx+378h]
add rsi, rdi
call _ma_kpos
mov rcx, [rbp+var_48]
mov [rcx], rax
mov rax, [rbx+2E8h]
mov ecx, [rbp+var_B0]
lea rcx, [rcx+rcx*2]
mov byte ptr [rax+rcx*8+10h], 1
mov rsi, [rbp+var_C8]
mov rdi, rbx
xor edx, edx
call _ma_dispose
test eax, eax
jnz loc_62B06
loc_62BCC:
mov dword ptr [rbx+624h], 8
mov rdi, [rbp+var_58]
call my_free
test r15b, r15b
jz loc_6287B
mov rdi, [rbp+var_40]
jmp loc_62876
loc_62BF1:
call ___stack_chk_fail
| char maria_rtree_real_delete(long long a1, long long a2, long long *a3)
{
long long v3; // r12
long long v4; // rdx
long long *v5; // rbx
long long v6; // r14
int v7; // eax
long long v8; // rdi
long long v10; // rdi
unsigned long long v11; // rsi
unsigned long long v12; // rax
bool v13; // cc
unsigned long long v14; // rax
long long v15; // rax
unsigned long long v16; // r13
long long v17; // r15
long long *v18; // r14
long long v19; // r12
unsigned long long v20; // r13
unsigned long long v21; // rbx
unsigned int *v22; // r15
int inserted; // eax
unsigned long long v24; // rax
_DWORD *v25; // rcx
long long v26; // rax
char v27; // r15
long long v28; // rsi
long long v29; // rax
long long v30; // [rsp+0h] [rbp-110h] BYREF
unsigned long long v31; // [rsp+8h] [rbp-108h] BYREF
_QWORD v32[3]; // [rsp+10h] [rbp-100h] BYREF
int v33; // [rsp+28h] [rbp-E8h]
_BYTE v34[16]; // [rsp+30h] [rbp-E0h] BYREF
long long v35; // [rsp+40h] [rbp-D0h]
long long v36; // [rsp+48h] [rbp-C8h]
unsigned int v37; // [rsp+50h] [rbp-C0h]
unsigned int v38; // [rsp+58h] [rbp-B8h]
unsigned int v39; // [rsp+60h] [rbp-B0h]
char v40[4]; // [rsp+6Ch] [rbp-A4h] BYREF
long long v41; // [rsp+70h] [rbp-A0h]
long long v42; // [rsp+78h] [rbp-98h]
unsigned long long v43; // [rsp+80h] [rbp-90h]
unsigned long long v44; // [rsp+88h] [rbp-88h]
_DWORD *v45; // [rsp+90h] [rbp-80h]
long long v46; // [rsp+98h] [rbp-78h]
long long v47; // [rsp+A0h] [rbp-70h]
unsigned long long v48; // [rsp+A8h] [rbp-68h]
__int128 v49; // [rsp+B0h] [rbp-60h] BYREF
long long *v50; // [rsp+C8h] [rbp-48h]
long long v51; // [rsp+D0h] [rbp-40h]
int v52; // [rsp+DCh] [rbp-34h]
unsigned long long v53; // [rsp+E0h] [rbp-30h]
v50 = a3;
v53 = __readfsqword(0x28u);
v3 = *(_QWORD *)(a2 + 8);
v47 = *(_QWORD *)a1;
v4 = *(_QWORD *)(*(_QWORD *)(v47 + 280) + 8LL * *(unsigned __int8 *)(v3 + 165));
if ( v4 != -1 )
{
v5 = (long long *)a1;
v6 = *(unsigned int *)(a2 + 16);
v49 = 0LL;
v7 = maria_rtree_delete_req(a1, a2, v4, v40, &v49, 0LL);
if ( v7 )
{
if ( v7 == 1 )
{
*(_DWORD *)my_thread_var(a1) = 120;
}
else if ( v7 == 2 )
{
*v50 = -1LL;
v8 = *((_QWORD *)&v49 + 1);
goto LABEL_6;
}
v10 = *((_QWORD *)&v49 + 1);
goto LABEL_42;
}
v32[1] = *(_QWORD *)(a2 + 8);
v32[2] = *(_QWORD *)(a2 + 16);
v33 = 0;
v48 = (unsigned int)v49;
if ( (_DWORD)v49 )
{
v11 = *(unsigned __int16 *)(v3 + 166);
v31 = v11;
v12 = **(_QWORD **)(a1 + 120) - (_QWORD)&v31;
v13 = v12 <= v11;
v14 = v12 - v11;
if ( v13 || v14 <= 0x10000 && ((unsigned int)v11 < 0x1000 || v14 < 0x8001) )
{
v15 = my_malloc(0LL, v11, 65552LL);
v51 = v15;
if ( !v15 )
{
*(_DWORD *)my_thread_var(0LL) = 128;
my_free(*((_QWORD *)&v49 + 1));
v51 = 0LL;
LABEL_41:
v10 = v51;
LABEL_42:
my_free(v10);
return 1;
}
LOBYTE(v15) = 1;
v52 = v15;
}
else
{
v51 = (long long)&v30 - (((_DWORD)v11 + 15) & 0xFFFFFFF0);
v52 = 0;
}
v16 = 0LL;
v44 = v48;
v46 = *((_QWORD *)&v49 + 1);
v45 = (_DWORD *)*((_QWORD *)&v49 + 1);
v42 = v6;
v41 = v3;
while ( 1 )
{
v17 = 16 * v16;
if ( (unsigned __int8)ma_fetch_keypage(
(unsigned int)v34,
(_DWORD)v5,
v3,
*(_QWORD *)(v46 + 16 * v16 + 8),
4,
3,
v51) )
break;
v43 = v16;
v18 = v5;
v19 = v38;
v20 = v38 + v35 + *(unsigned int *)(v47 + 1860);
v21 = v35 + v37;
if ( v20 < v21 )
{
v22 = (unsigned int *)(v46 + v17);
do
{
v32[0] = v20;
inserted = maria_rtree_insert_level(v18, (long long)v32, *v22, v50);
if ( inserted )
{
if ( inserted == -1 )
goto LABEL_37;
if ( v43 < v48 )
{
v24 = v44;
v25 = v45;
do
{
++*v25;
v25 += 4;
--v24;
}
while ( v24 );
}
}
v26 = v19;
if ( !(_DWORD)v19 )
v26 = *(unsigned int *)(v47 + 992);
v20 += v26 + v42;
}
while ( v20 < v21 );
}
v5 = v18;
*(_BYTE *)(v18[93] + 24LL * v39 + 16) = 1;
if ( (unsigned int)ma_dispose(v18, v36, 0LL) )
break;
v16 = v43 + 1;
v45 += 4;
--v44;
LODWORD(v6) = v42;
LODWORD(v3) = v41;
if ( v43 + 1 == v48 )
goto LABEL_35;
}
}
else
{
v51 = 0LL;
v52 = 0;
LABEL_35:
if ( *v50 != -1 && !(unsigned __int8)ma_fetch_keypage((unsigned int)v34, (_DWORD)v5, v3, *v50, 4, 3, v5[111]) )
{
v27 = v52;
if ( !v38
|| (v28 = *(unsigned int *)(v47 + 1860), v37 != (_DWORD)v28 + v38 + (_DWORD)v6)
|| (v29 = ma_kpos(v38, v38 + v5[111] + v28),
*v50 = v29,
*(_BYTE *)(v5[93] + 24LL * v39 + 16) = 1,
!(unsigned int)ma_dispose(v5, v36, 0LL)) )
{
*((_DWORD *)v5 + 393) = 8;
my_free(*((_QWORD *)&v49 + 1));
if ( !v27 )
return 0;
v8 = v51;
LABEL_6:
my_free(v8);
return 0;
}
LABEL_38:
my_free(*((_QWORD *)&v49 + 1));
if ( !v27 )
return 1;
goto LABEL_41;
}
}
LABEL_37:
v27 = v52;
goto LABEL_38;
}
*(_DWORD *)my_thread_var(a1) = 137;
return 1;
}
| maria_rtree_real_delete:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xe8
MOV qword ptr [RBP + -0x48],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RDI]
MOV R12,qword ptr [RSI + 0x8]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RAX + 0x118]
MOVZX ECX,byte ptr [R12 + 0xa5]
MOV RDX,qword ptr [RAX + RCX*0x8]
CMP RDX,-0x1
JZ 0x00162882
MOV R15,RSI
MOV RBX,RDI
MOV R14D,dword ptr [RSI + 0x10]
XORPS XMM0,XMM0
LEA R8,[RBP + -0x60]
MOVAPS xmmword ptr [R8],XMM0
LEA RCX,[RBP + -0xa4]
XOR R9D,R9D
CALL 0x00162bf6
TEST EAX,EAX
JZ 0x001628a6
CMP EAX,0x1
JZ 0x00162892
CMP EAX,0x2
JNZ 0x0016289d
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RAX],-0x1
MOV RDI,qword ptr [RBP + -0x58]
LAB_00162876:
CALL 0x001a014e
LAB_0016287b:
XOR EAX,EAX
JMP 0x00162b3d
LAB_00162882:
CALL 0x001a1c92
MOV dword ptr [RAX],0x89
JMP 0x00162b3b
LAB_00162892:
CALL 0x001a1c92
MOV dword ptr [RAX],0x78
LAB_0016289d:
MOV RDI,qword ptr [RBP + -0x58]
JMP 0x00162b36
LAB_001628a6:
MOV RAX,qword ptr [R15 + 0x8]
MOV qword ptr [RBP + -0xf8],RAX
MOV RAX,qword ptr [R15 + 0x10]
MOV qword ptr [RBP + -0xf0],RAX
MOV dword ptr [RBP + -0xe8],0x0
MOV EAX,dword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x68],RAX
TEST RAX,RAX
JZ 0x00162ab8
MOVZX ESI,word ptr [R12 + 0xa6]
LEA RCX,[RBP + -0x108]
MOV qword ptr [RCX],RSI
MOV RAX,qword ptr [RBX + 0x78]
MOV RAX,qword ptr [RAX]
SUB RAX,RCX
SUB RAX,RSI
JBE 0x0016292c
CMP RAX,0x10000
JA 0x00162910
CMP ESI,0x1000
JC 0x0016292c
CMP RAX,0x8001
JC 0x0016292c
LAB_00162910:
MOV RCX,RSP
ADD ESI,0xf
AND ESI,0xfffffff0
SUB RCX,RSI
MOV qword ptr [RBP + -0x40],RCX
MOV RSP,RCX
MOV dword ptr [RBP + -0x34],0x0
JMP 0x0016294a
LAB_0016292c:
MOV EDX,0x10010
XOR EDI,EDI
CALL 0x0019ff21
MOV qword ptr [RBP + -0x40],RAX
TEST RAX,RAX
JZ 0x00162b16
MOV AL,0x1
MOV dword ptr [RBP + -0x34],EAX
LAB_0016294a:
MOV RAX,qword ptr [RBP + -0x58]
XOR R13D,R13D
MOV RCX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x88],RCX
MOV qword ptr [RBP + -0x78],RAX
MOV qword ptr [RBP + -0x80],RAX
MOV qword ptr [RBP + -0x98],R14
MOV qword ptr [RBP + -0xa0],R12
LAB_00162972:
MOV R15,R13
SHL R15,0x4
MOV RAX,qword ptr [RBP + -0x78]
MOV RCX,qword ptr [RAX + R15*0x1 + 0x8]
LEA RDI,[RBP + -0xe0]
MOV RSI,RBX
MOV RDX,R12
MOV R8D,0x4
MOV R9D,0x3
PUSH 0x0
PUSH qword ptr [RBP + -0x40]
CALL 0x0016f32e
ADD RSP,0x10
TEST AL,AL
JNZ 0x00162b02
MOV qword ptr [RBP + -0x90],R13
MOV R14,RBX
MOV R12D,dword ptr [RBP + -0xb8]
MOV RAX,qword ptr [RBP + -0xd0]
MOV RCX,qword ptr [RBP + -0x70]
MOV R13D,dword ptr [RCX + 0x744]
ADD R13,RAX
ADD R13,R12
MOV EBX,dword ptr [RBP + -0xc0]
ADD RBX,RAX
CMP R13,RBX
JNC 0x00162a5a
ADD R15,qword ptr [RBP + -0x78]
LAB_001629ec:
MOV qword ptr [RBP + -0x100],R13
MOV EDX,dword ptr [R15]
MOV RDI,R14
LEA RSI,[RBP + -0x100]
MOV RCX,qword ptr [RBP + -0x48]
CALL 0x00161d92
TEST EAX,EAX
JZ 0x00162a39
CMP EAX,-0x1
JZ 0x00162b02
MOV RAX,qword ptr [RBP + -0x90]
CMP RAX,qword ptr [RBP + -0x68]
JNC 0x00162a39
MOV RAX,qword ptr [RBP + -0x88]
MOV RCX,qword ptr [RBP + -0x80]
LAB_00162a2e:
INC dword ptr [RCX]
ADD RCX,0x10
DEC RAX
JNZ 0x00162a2e
LAB_00162a39:
MOV RAX,R12
TEST R12D,R12D
JNZ 0x00162a4b
MOV RAX,qword ptr [RBP + -0x70]
MOV EAX,dword ptr [RAX + 0x3e0]
LAB_00162a4b:
ADD R13,qword ptr [RBP + -0x98]
ADD R13,RAX
CMP R13,RBX
JC 0x001629ec
LAB_00162a5a:
MOV RBX,R14
MOV RAX,qword ptr [R14 + 0x2e8]
MOV ECX,dword ptr [RBP + -0xb0]
LEA RCX,[RCX + RCX*0x2]
MOV byte ptr [RAX + RCX*0x8 + 0x10],0x1
MOV RSI,qword ptr [RBP + -0xc8]
MOV RDI,R14
XOR EDX,EDX
CALL 0x0016f535
TEST EAX,EAX
JNZ 0x00162b02
MOV R13,qword ptr [RBP + -0x90]
INC R13
ADD qword ptr [RBP + -0x80],0x10
DEC qword ptr [RBP + -0x88]
CMP R13,qword ptr [RBP + -0x68]
MOV R14,qword ptr [RBP + -0x98]
MOV R12,qword ptr [RBP + -0xa0]
JNZ 0x00162972
JMP 0x00162ac7
LAB_00162ab8:
MOV qword ptr [RBP + -0x40],0x0
MOV dword ptr [RBP + -0x34],0x0
LAB_00162ac7:
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RAX]
CMP RCX,-0x1
JZ 0x00162b02
LEA RDI,[RBP + -0xe0]
MOV RSI,RBX
MOV RDX,R12
MOV R8D,0x4
MOV R9D,0x3
PUSH 0x0
PUSH qword ptr [RBX + 0x378]
CALL 0x0016f32e
ADD RSP,0x10
TEST AL,AL
JZ 0x00162b5f
LAB_00162b02:
MOV R15D,dword ptr [RBP + -0x34]
LAB_00162b06:
MOV RDI,qword ptr [RBP + -0x58]
CALL 0x001a014e
TEST R15B,R15B
JNZ 0x00162b32
JMP 0x00162b3b
LAB_00162b16:
CALL 0x001a1c92
MOV dword ptr [RAX],0x80
MOV RDI,qword ptr [RBP + -0x58]
CALL 0x001a014e
MOV qword ptr [RBP + -0x40],0x0
LAB_00162b32:
MOV RDI,qword ptr [RBP + -0x40]
LAB_00162b36:
CALL 0x001a014e
LAB_00162b3b:
MOV AL,0x1
LAB_00162b3d:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x00162bf1
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00162b5f:
MOV EDI,dword ptr [RBP + -0xb8]
TEST RDI,RDI
MOV R15D,dword ptr [RBP + -0x34]
JZ 0x00162bcc
MOV RAX,qword ptr [RBP + -0x70]
MOV ESI,dword ptr [RAX + 0x744]
ADD R14D,EDI
ADD R14D,ESI
CMP dword ptr [RBP + -0xc0],R14D
JNZ 0x00162bcc
ADD RSI,qword ptr [RBX + 0x378]
ADD RSI,RDI
CALL 0x0016d33f
MOV RCX,qword ptr [RBP + -0x48]
MOV qword ptr [RCX],RAX
MOV RAX,qword ptr [RBX + 0x2e8]
MOV ECX,dword ptr [RBP + -0xb0]
LEA RCX,[RCX + RCX*0x2]
MOV byte ptr [RAX + RCX*0x8 + 0x10],0x1
MOV RSI,qword ptr [RBP + -0xc8]
MOV RDI,RBX
XOR EDX,EDX
CALL 0x0016f535
TEST EAX,EAX
JNZ 0x00162b06
LAB_00162bcc:
MOV dword ptr [RBX + 0x624],0x8
MOV RDI,qword ptr [RBP + -0x58]
CALL 0x001a014e
TEST R15B,R15B
JZ 0x0016287b
MOV RDI,qword ptr [RBP + -0x40]
JMP 0x00162876
LAB_00162bf1:
CALL 0x00129260
|
int8 maria_rtree_real_delete(long *param_1,long param_2,long *param_3)
{
ushort uVar1;
uint uVar2;
long lVar3;
long *plVar4;
char cVar5;
int iVar6;
int4 *puVar7;
ulong uVar8;
int8 uVar9;
long lVar10;
int *piVar11;
ulong uVar12;
int *piVar13;
int *piVar14;
ulong uVar15;
ulong uVar16;
uint uVar17;
long in_FS_OFFSET;
int aiStack_118 [2];
ulong local_110;
ulong local_108;
int8 local_100;
int8 local_f8;
int4 local_f0;
int1 local_e8 [16];
long local_d8;
int8 local_d0;
uint local_c8;
uint local_c0;
uint local_b8;
long local_a8;
ulong local_a0;
ulong local_98;
ulong local_90;
int *local_88;
int *local_80;
long local_78;
ulong local_70;
ulong local_68;
int *piStack_60;
long *local_50;
int *local_48;
int4 local_3c;
long local_38;
piVar14 = aiStack_118;
piVar13 = aiStack_118;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
local_78 = *param_1;
lVar10 = *(long *)(param_2 + 8);
local_50 = param_3;
if (*(long *)(*(long *)(local_78 + 0x118) + (ulong)*(byte *)(lVar10 + 0xa5) * 8) == -1) {
puVar7 = (int4 *)_my_thread_var();
*puVar7 = 0x89;
piVar13 = aiStack_118;
}
else {
uVar17 = *(uint *)(param_2 + 0x10);
local_68 = 0;
piStack_60 = (int *)0x0;
iVar6 = maria_rtree_delete_req();
if (iVar6 == 0) {
local_100 = *(int8 *)(param_2 + 8);
local_f8 = *(int8 *)(param_2 + 0x10);
local_f0 = 0;
local_70 = local_68 & 0xffffffff;
if (local_70 == 0) {
local_48 = (int *)0x0;
local_3c = 0;
}
else {
uVar1 = *(ushort *)(lVar10 + 0xa6);
local_110 = (ulong)uVar1;
uVar8 = (*(long *)param_1[0xf] - (long)&local_110) - local_110;
if ((local_110 < (ulong)(*(long *)param_1[0xf] - (long)&local_110)) &&
((0x10000 < uVar8 || ((0xfff < uVar1 && (0x8000 < uVar8)))))) {
local_48 = (int *)((long)aiStack_118 - (ulong)(uVar1 + 0xf & 0xfffffff0));
local_3c = 0;
piVar13 = local_48;
}
else {
local_48 = (int *)my_malloc(0,local_110,0x10010);
if (local_48 == (int *)0x0) {
puVar7 = (int4 *)_my_thread_var();
*puVar7 = 0x80;
my_free(piStack_60);
local_48 = (int *)0x0;
piVar14 = aiStack_118;
piVar11 = local_48;
goto LAB_00162b36;
}
local_3c = (int4)CONCAT71((int7)((ulong)local_48 >> 8),1);
piVar13 = aiStack_118;
}
uVar8 = 0;
local_90 = local_70;
local_80 = piStack_60;
local_88 = piStack_60;
local_a8 = lVar10;
local_a0 = (ulong)uVar17;
do {
lVar10 = local_a8;
uVar9 = *(int8 *)(local_80 + uVar8 * 4 + 2);
piVar13[-2] = 0;
piVar13[-1] = 0;
*(int **)(piVar13 + -4) = local_48;
piVar13[-6] = 0x1629a5;
piVar13[-5] = 0;
cVar5 = _ma_fetch_keypage(local_e8,param_1,lVar10,uVar9,4,3);
uVar17 = local_c0;
if (cVar5 != '\0') goto LAB_00162b02;
uVar15 = (ulong)local_c0;
uVar16 = (ulong)*(uint *)(local_78 + 0x744) + local_d8 + uVar15;
uVar12 = (ulong)local_c8 + local_d8;
local_98 = uVar8;
if (uVar16 < uVar12) {
piVar14 = local_80 + uVar8 * 4;
do {
plVar4 = local_50;
iVar6 = *piVar14;
local_108 = uVar16;
piVar13[-2] = 0x162a09;
piVar13[-1] = 0;
iVar6 = maria_rtree_insert_level(param_1,&local_108,iVar6,plVar4);
if (iVar6 != 0) {
if (iVar6 == -1) goto LAB_00162b02;
uVar8 = local_90;
piVar11 = local_88;
if (local_98 < local_70) {
do {
*piVar11 = *piVar11 + 1;
uVar8 = uVar8 - 1;
piVar11 = piVar11 + 4;
} while (uVar8 != 0);
}
}
uVar8 = uVar15;
if (uVar17 == 0) {
uVar8 = (ulong)*(uint *)(local_78 + 0x3e0);
}
uVar16 = uVar16 + local_a0 + uVar8;
} while (uVar16 < uVar12);
}
uVar9 = local_d0;
*(int1 *)(param_1[0x5d] + 0x10 + (ulong)local_b8 * 0x18) = 1;
piVar13[-2] = 0x162a84;
piVar13[-1] = 0;
iVar6 = _ma_dispose(param_1,uVar9,0);
if (iVar6 != 0) goto LAB_00162b02;
uVar8 = local_98 + 1;
local_88 = local_88 + 4;
local_90 = local_90 - 1;
uVar17 = (uint)local_a0;
lVar10 = local_a8;
} while (uVar8 != local_70);
}
lVar3 = *local_50;
if (lVar3 == -1) {
LAB_00162b02:
cVar5 = (char)local_3c;
}
else {
*(int8 *)((long)piVar13 + -8) = 0;
*(long *)((long)piVar13 + -0x10) = param_1[0x6f];
*(int8 *)((long)piVar13 + -0x18) = 0x162afa;
cVar5 = _ma_fetch_keypage(local_e8,param_1,lVar10,lVar3,4,3);
if (cVar5 != '\0') goto LAB_00162b02;
uVar8 = (ulong)local_c0;
cVar5 = (char)local_3c;
if ((uVar8 == 0) ||
(uVar2 = *(uint *)(local_78 + 0x744), local_c8 != uVar17 + local_c0 + uVar2)) {
LAB_00162bcc:
piVar14 = piStack_60;
*(int4 *)((long)param_1 + 0x624) = 8;
*(int8 *)((long)piVar13 + -8) = 0x162bdf;
my_free(piVar14);
piVar14 = local_48;
if (cVar5 != '\0') goto LAB_00162876;
goto LAB_0016287b;
}
lVar10 = param_1[0x6f];
*(int8 *)((long)piVar13 + -8) = 0x162b96;
lVar10 = _ma_kpos(uVar8,(ulong)uVar2 + lVar10 + uVar8);
*local_50 = lVar10;
*(int1 *)(param_1[0x5d] + 0x10 + (ulong)local_b8 * 0x18) = 1;
*(int8 *)((long)piVar13 + -8) = 0x162bc4;
iVar6 = _ma_dispose(param_1,local_d0,0);
if (iVar6 == 0) goto LAB_00162bcc;
}
piVar14 = piStack_60;
*(int8 *)((long)piVar13 + -8) = 0x162b0f;
my_free(piVar14);
piVar14 = piVar13;
piVar11 = local_48;
if (cVar5 == '\0') goto LAB_00162b3b;
}
else if (iVar6 == 1) {
puVar7 = (int4 *)_my_thread_var();
*puVar7 = 0x78;
piVar11 = piStack_60;
}
else {
piVar14 = aiStack_118;
piVar11 = piStack_60;
if (iVar6 == 2) {
*local_50 = -1;
piVar13 = aiStack_118;
piVar14 = piStack_60;
LAB_00162876:
*(int8 *)((long)piVar13 + -8) = 0x16287b;
my_free(piVar14);
LAB_0016287b:
uVar9 = 0;
goto LAB_00162b3d;
}
}
LAB_00162b36:
*(int8 *)((long)piVar14 + -8) = 0x162b3b;
my_free(piVar11);
piVar13 = piVar14;
}
LAB_00162b3b:
uVar9 = 1;
LAB_00162b3d:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
*(code **)((long)piVar13 + -8) = maria_rtree_delete_req;
__stack_chk_fail();
}
return uVar9;
}
| |
23,197 | mysql_local_infile_init | eloqsql/libmariadb/libmariadb/ma_loaddata.c | static
int mysql_local_infile_init(void **ptr, const char *filename, void *userdata)
{
MYSQL_INFILE_INFO *info;
MYSQL *mysql= (MYSQL *)userdata;
info = (MYSQL_INFILE_INFO *)malloc(sizeof(MYSQL_INFILE_INFO));
if (!info) {
return(1);
}
memset(info, 0, sizeof(MYSQL_INFILE_INFO));
*ptr = info;
info->filename = filename;
info->fp= ma_open(filename, "rb", mysql);
if (!info->fp)
{
/* error handling is done via mysql_local_infile_error function, so we
need to copy error to info */
if (mysql_errno(mysql) && !info->error_no)
{
info->error_no= mysql_errno(mysql);
ma_strmake(info->error_msg, mysql_error(mysql), MYSQL_ERRMSG_SIZE);
}
else
{
info->error_no = errno;
snprintf((char *)info->error_msg, sizeof(info->error_msg),
CER(CR_FILE_NOT_FOUND), filename, info->error_no);
}
return(1);
}
return(0);
} | O0 | c | mysql_local_infile_init:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x218, %edi # imm = 0x218
callq 0x368f0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x527bd
movl $0x1, -0x4(%rbp)
jmp 0x528ae
movq -0x28(%rbp), %rdi
xorl %esi, %esi
movl $0x218, %edx # imm = 0x218
callq 0x362e0
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x210(%rax)
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rdx
leaq 0x7ac48(%rip), %rsi # 0xcd43e
callq 0x5b700
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x528a7
movq -0x30(%rbp), %rdi
callq 0x46ee0
cmpl $0x0, %eax
je 0x52865
movq -0x28(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x52865
movq -0x30(%rbp), %rdi
callq 0x46ee0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x28(%rbp), %rax
addq $0xc, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
callq 0x46f10
movq -0x38(%rbp), %rdi
movq %rax, %rsi
movl $0x200, %edx # imm = 0x200
callq 0x57170
jmp 0x5289e
callq 0x369b0
movl (%rax), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x28(%rbp), %rdi
addq $0xc, %rdi
leaq 0x1e2a0e(%rip), %rax # 0x235290
movq 0x20(%rax), %rdx
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movl 0x8(%rax), %r8d
movl $0x201, %esi # imm = 0x201
movb $0x0, %al
callq 0x364c0
movl $0x1, -0x4(%rbp)
jmp 0x528ae
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| mysql_local_infile_init:
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_20]
mov [rbp+var_30], rax
mov edi, 218h
call _malloc
mov [rbp+var_28], rax
cmp [rbp+var_28], 0
jnz short loc_527BD
mov [rbp+var_4], 1
jmp loc_528AE
loc_527BD:
mov rdi, [rbp+var_28]
xor esi, esi
mov edx, 218h
call _memset
mov rcx, [rbp+var_28]
mov rax, [rbp+var_10]
mov [rax], rcx
mov rcx, [rbp+var_18]
mov rax, [rbp+var_28]
mov [rax+210h], rcx
mov rdi, [rbp+var_18]
mov rdx, [rbp+var_30]
lea rsi, aRb; "rb"
call ma_open
mov rcx, rax
mov rax, [rbp+var_28]
mov [rax], rcx
mov rax, [rbp+var_28]
cmp qword ptr [rax], 0
jnz loc_528A7
mov rdi, [rbp+var_30]
call mysql_errno
cmp eax, 0
jz short loc_52865
mov rax, [rbp+var_28]
cmp dword ptr [rax+8], 0
jnz short loc_52865
mov rdi, [rbp+var_30]
call mysql_errno
mov ecx, eax
mov rax, [rbp+var_28]
mov [rax+8], ecx
mov rax, [rbp+var_28]
add rax, 0Ch
mov [rbp+var_38], rax
mov rdi, [rbp+var_30]
call mysql_error
mov rdi, [rbp+var_38]
mov rsi, rax
mov edx, 200h
call ma_strmake
jmp short loc_5289E
loc_52865:
call ___errno_location
mov ecx, [rax]
mov rax, [rbp+var_28]
mov [rax+8], ecx
mov rdi, [rbp+var_28]
add rdi, 0Ch
lea rax, mariadb_client_errors
mov rdx, [rax+20h]
mov rcx, [rbp+var_18]
mov rax, [rbp+var_28]
mov r8d, [rax+8]
mov esi, 201h
mov al, 0
call _snprintf
loc_5289E:
mov [rbp+var_4], 1
jmp short loc_528AE
loc_528A7:
mov [rbp+var_4], 0
loc_528AE:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
| long long mysql_local_infile_init(long long *a1, long long a2, long long a3)
{
char *v3; // rax
long long v6; // [rsp+18h] [rbp-28h]
v6 = malloc(536LL);
if ( v6 )
{
memset(v6, 0LL, 536LL);
*a1 = v6;
*(_QWORD *)(v6 + 528) = a2;
*(_QWORD *)v6 = ma_open(a2, "rb", a3);
if ( *(_QWORD *)v6 )
{
return 0;
}
else
{
if ( !(unsigned int)mysql_errno(a3) || *(_DWORD *)(v6 + 8) )
{
*(_DWORD *)(v6 + 8) = *(_DWORD *)__errno_location();
snprintf(v6 + 12, 513LL, mariadb_client_errors[4], a2, *(unsigned int *)(v6 + 8));
}
else
{
*(_DWORD *)(v6 + 8) = mysql_errno(a3);
v3 = mysql_error(a3);
ma_strmake(v6 + 12, v3, 512LL);
}
return 1;
}
}
else
{
return 1;
}
}
| mysql_local_infile_init:
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 + -0x20]
MOV qword ptr [RBP + -0x30],RAX
MOV EDI,0x218
CALL 0x001368f0
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x001527bd
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001528ae
LAB_001527bd:
MOV RDI,qword ptr [RBP + -0x28]
XOR ESI,ESI
MOV EDX,0x218
CALL 0x001362e0
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x210],RCX
MOV RDI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x30]
LEA RSI,[0x1cd43e]
CALL 0x0015b700
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x28]
CMP qword ptr [RAX],0x0
JNZ 0x001528a7
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x00146ee0
CMP EAX,0x0
JZ 0x00152865
MOV RAX,qword ptr [RBP + -0x28]
CMP dword ptr [RAX + 0x8],0x0
JNZ 0x00152865
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x00146ee0
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x8],ECX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0xc
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x00146f10
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,RAX
MOV EDX,0x200
CALL 0x00157170
JMP 0x0015289e
LAB_00152865:
CALL 0x001369b0
MOV ECX,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x8],ECX
MOV RDI,qword ptr [RBP + -0x28]
ADD RDI,0xc
LEA RAX,[0x335290]
MOV RDX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x28]
MOV R8D,dword ptr [RAX + 0x8]
MOV ESI,0x201
MOV AL,0x0
CALL 0x001364c0
LAB_0015289e:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001528ae
LAB_001528a7:
MOV dword ptr [RBP + -0x4],0x0
LAB_001528ae:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int4 mysql_local_infile_init(int8 *param_1,long param_2,int8 param_3)
{
int iVar1;
int4 uVar2;
long *__s;
long lVar3;
int8 uVar4;
int *piVar5;
int4 local_c;
__s = (long *)malloc(0x218);
if (__s == (long *)0x0) {
local_c = 1;
}
else {
memset(__s,0,0x218);
*param_1 = __s;
__s[0x42] = param_2;
lVar3 = ma_open(param_2,&DAT_001cd43e,param_3);
*__s = lVar3;
if (*__s == 0) {
iVar1 = mysql_errno(param_3);
if ((iVar1 == 0) || ((int)__s[1] != 0)) {
piVar5 = __errno_location();
*(int *)(__s + 1) = *piVar5;
snprintf((char *)((long)__s + 0xc),0x201,(char *)mariadb_client_errors._32_8_,param_2,
(ulong)*(uint *)(__s + 1));
}
else {
uVar2 = mysql_errno(param_3);
*(int4 *)(__s + 1) = uVar2;
uVar4 = mysql_error(param_3);
ma_strmake((long)__s + 0xc,uVar4,0x200);
}
local_c = 1;
}
else {
local_c = 0;
}
}
return local_c;
}
| |
23,198 | js_parse_check_duplicate_parameter | bluesky950520[P]quickjs/quickjs.c | static int js_parse_check_duplicate_parameter(JSParseState *s, JSAtom name)
{
/* Check for duplicate parameter names */
JSFunctionDef *fd = s->cur_func;
int i;
for (i = 0; i < fd->arg_count; i++) {
if (fd->args[i].var_name == name)
goto duplicate;
}
for (i = 0; i < fd->var_count; i++) {
if (fd->vars[i].var_name == name)
goto duplicate;
}
return 0;
duplicate:
return js_parse_error(s, "Duplicate parameter name not allowed in this context");
} | O1 | c | js_parse_check_duplicate_parameter:
pushq %rax
movq 0x90(%rdi), %rax
movslq 0xb4(%rax), %rcx
testq %rcx, %rcx
jle 0x64d43
movq 0xa8(%rax), %rdx
shlq $0x4, %rcx
xorl %r8d, %r8d
cmpl %esi, (%rdx,%r8)
je 0x64d6e
addq $0x10, %r8
cmpq %r8, %rcx
jne 0x64d34
movslq 0xa4(%rax), %rcx
testq %rcx, %rcx
jle 0x64d6a
movq 0x90(%rax), %rax
shlq $0x4, %rcx
xorl %edx, %edx
cmpl %esi, (%rax,%rdx)
je 0x64d6e
addq $0x10, %rdx
cmpq %rdx, %rcx
jne 0x64d5c
xorl %eax, %eax
jmp 0x64d81
leaq 0x3c473(%rip), %rsi # 0xa11e8
xorl %eax, %eax
callq 0x2fce9
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
popq %rcx
retq
| js_parse_check_duplicate_parameter:
push rax
mov rax, [rdi+90h]
movsxd rcx, dword ptr [rax+0B4h]
test rcx, rcx
jle short loc_64D43
mov rdx, [rax+0A8h]
shl rcx, 4
xor r8d, r8d
loc_64D34:
cmp [rdx+r8], esi
jz short loc_64D6E
add r8, 10h
cmp rcx, r8
jnz short loc_64D34
loc_64D43:
movsxd rcx, dword ptr [rax+0A4h]
test rcx, rcx
jle short loc_64D6A
mov rax, [rax+90h]
shl rcx, 4
xor edx, edx
loc_64D5C:
cmp [rax+rdx], esi
jz short loc_64D6E
add rdx, 10h
cmp rcx, rdx
jnz short loc_64D5C
loc_64D6A:
xor eax, eax
jmp short loc_64D81
loc_64D6E:
lea rsi, aDuplicateParam; "Duplicate parameter name not allowed in"...
xor eax, eax
call js_parse_error
mov eax, 0FFFFFFFFh
loc_64D81:
pop rcx
retn
| long long js_parse_check_duplicate_parameter(
long long *a1,
int a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
long long a11,
long long a12,
long long a13,
long long a14)
{
char v14; // al
long long v15; // rax
long long v16; // rcx
long long v17; // rdx
long long v18; // rcx
long long v19; // rcx
long long v20; // rax
char v22; // [rsp-8h] [rbp-8h]
v22 = v14;
v15 = a1[18];
v16 = *(int *)(v15 + 180);
if ( v16 <= 0 )
{
LABEL_5:
v19 = *(int *)(v15 + 164);
if ( v19 <= 0 )
return 0LL;
v20 = *(_QWORD *)(v15 + 144);
v18 = 16 * v19;
v17 = 0LL;
while ( *(_DWORD *)(v20 + v17) != a2 )
{
v17 += 16LL;
if ( v18 == v17 )
return 0LL;
}
}
else
{
v17 = *(_QWORD *)(v15 + 168);
v18 = 16 * v16;
a13 = 0LL;
while ( *(_DWORD *)(v17 + a13) != a2 )
{
a13 += 16LL;
if ( v18 == a13 )
goto LABEL_5;
}
}
js_parse_error(
a1,
(long long)"Duplicate parameter name not allowed in this context",
v17,
v18,
a13,
a14,
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
v22);
return 0xFFFFFFFFLL;
}
| |||
23,199 | js_parse_check_duplicate_parameter | bluesky950520[P]quickjs/quickjs.c | static int js_parse_check_duplicate_parameter(JSParseState *s, JSAtom name)
{
/* Check for duplicate parameter names */
JSFunctionDef *fd = s->cur_func;
int i;
for (i = 0; i < fd->arg_count; i++) {
if (fd->args[i].var_name == name)
goto duplicate;
}
for (i = 0; i < fd->var_count; i++) {
if (fd->vars[i].var_name == name)
goto duplicate;
}
return 0;
duplicate:
return js_parse_error(s, "Duplicate parameter name not allowed in this context");
} | O2 | c | js_parse_check_duplicate_parameter:
pushq %rax
movq 0x90(%rdi), %rcx
movl 0xb4(%rcx), %eax
xorl %edx, %edx
testl %eax, %eax
cmovlel %edx, %eax
shlq $0x4, %rax
addq $0x10, %rax
leaq 0x10(%rdx), %r8
cmpq %r8, %rax
je 0x56007
movq 0xa8(%rcx), %r9
cmpl %esi, (%r9,%rdx)
movq %r8, %rdx
jne 0x55fec
jmp 0x56038
movl 0xa4(%rcx), %edx
xorl %eax, %eax
testl %edx, %edx
cmovlel %eax, %edx
shlq $0x4, %rdx
addq $0x10, %rdx
xorl %r8d, %r8d
leaq 0x10(%r8), %r9
cmpq %r9, %rdx
je 0x56049
movq 0x90(%rcx), %r10
cmpl %esi, (%r10,%r8)
movq %r9, %r8
jne 0x5601f
leaq 0x320e3(%rip), %rsi # 0x88122
xorl %eax, %eax
callq 0x28457
pushq $-0x1
popq %rax
popq %rcx
retq
| js_parse_check_duplicate_parameter:
push rax
mov rcx, [rdi+90h]
mov eax, [rcx+0B4h]
xor edx, edx
test eax, eax
cmovle eax, edx
shl rax, 4
add rax, 10h
loc_55FEC:
lea r8, [rdx+10h]
cmp rax, r8
jz short loc_56007
mov r9, [rcx+0A8h]
cmp [r9+rdx], esi
mov rdx, r8
jnz short loc_55FEC
jmp short loc_56038
loc_56007:
mov edx, [rcx+0A4h]
xor eax, eax
test edx, edx
cmovle edx, eax
shl rdx, 4
add rdx, 10h
xor r8d, r8d
loc_5601F:
lea r9, [r8+10h]
cmp rdx, r9
jz short loc_56049
mov r10, [rcx+90h]
cmp [r10+r8], esi
mov r8, r9
jnz short loc_5601F
loc_56038:
lea rsi, aDuplicateParam; "Duplicate parameter name not allowed in"...
xor eax, eax
call js_parse_error
push 0FFFFFFFFFFFFFFFFh
pop rax
loc_56049:
pop rcx
retn
| long long js_parse_check_duplicate_parameter(
long long *a1,
int a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10)
{
char v10; // al
long long v11; // rcx
long long v12; // rax
long long v13; // rdx
long long v14; // rax
long long v15; // r8
long long v16; // r9
bool v17; // zf
long long v18; // rdx
long long result; // rax
char v20; // [rsp-8h] [rbp-8h]
v20 = v10;
v11 = a1[18];
v12 = *(unsigned int *)(v11 + 180);
v13 = 0LL;
if ( (int)v12 <= 0 )
v12 = 0LL;
v14 = 16 * v12 + 16;
while ( 1 )
{
v15 = v13 + 16;
if ( v14 == v13 + 16 )
break;
v16 = *(_QWORD *)(v11 + 168);
v17 = *(_DWORD *)(v16 + v13) == a2;
v13 += 16LL;
if ( v17 )
{
LABEL_12:
js_parse_error(
a1,
(long long)"Duplicate parameter name not allowed in this context",
v13,
v11,
v15,
v16,
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
v20);
return -1LL;
}
}
v18 = *(unsigned int *)(v11 + 164);
result = 0LL;
if ( (int)v18 <= 0 )
v18 = 0LL;
v13 = 16 * v18 + 16;
v15 = 0LL;
while ( 1 )
{
v16 = v15 + 16;
if ( v13 == v15 + 16 )
return result;
v17 = *(_DWORD *)(*(_QWORD *)(v11 + 144) + v15) == a2;
v15 += 16LL;
if ( v17 )
goto LABEL_12;
}
}
| js_parse_check_duplicate_parameter:
PUSH RAX
MOV RCX,qword ptr [RDI + 0x90]
MOV EAX,dword ptr [RCX + 0xb4]
XOR EDX,EDX
TEST EAX,EAX
CMOVLE EAX,EDX
SHL RAX,0x4
ADD RAX,0x10
LAB_00155fec:
LEA R8,[RDX + 0x10]
CMP RAX,R8
JZ 0x00156007
MOV R9,qword ptr [RCX + 0xa8]
CMP dword ptr [R9 + RDX*0x1],ESI
MOV RDX,R8
JNZ 0x00155fec
JMP 0x00156038
LAB_00156007:
MOV EDX,dword ptr [RCX + 0xa4]
XOR EAX,EAX
TEST EDX,EDX
CMOVLE EDX,EAX
SHL RDX,0x4
ADD RDX,0x10
XOR R8D,R8D
LAB_0015601f:
LEA R9,[R8 + 0x10]
CMP RDX,R9
JZ 0x00156049
MOV R10,qword ptr [RCX + 0x90]
CMP dword ptr [R10 + R8*0x1],ESI
MOV R8,R9
JNZ 0x0015601f
LAB_00156038:
LEA RSI,[0x188122]
XOR EAX,EAX
CALL 0x00128457
PUSH -0x1
POP RAX
LAB_00156049:
POP RCX
RET
|
int8 js_parse_check_duplicate_parameter(long param_1,int param_2)
{
int *piVar1;
long lVar2;
ulong uVar3;
ulong uVar4;
long lVar5;
lVar2 = *(long *)(param_1 + 0x90);
uVar3 = (ulong)*(uint *)(lVar2 + 0xb4);
if ((int)*(uint *)(lVar2 + 0xb4) < 1) {
uVar3 = 0;
}
uVar4 = 0;
while (uVar3 * 0x10 + 0x10 != uVar4 + 0x10) {
piVar1 = (int *)(*(long *)(lVar2 + 0xa8) + uVar4);
uVar4 = uVar4 + 0x10;
if (*piVar1 == param_2) goto LAB_00156038;
}
uVar3 = (ulong)*(uint *)(lVar2 + 0xa4);
if ((int)*(uint *)(lVar2 + 0xa4) < 1) {
uVar3 = 0;
}
lVar5 = 0;
do {
if (uVar3 * 0x10 + 0x10 == lVar5 + 0x10) {
return 0;
}
piVar1 = (int *)(*(long *)(lVar2 + 0x90) + lVar5);
lVar5 = lVar5 + 0x10;
} while (*piVar1 != param_2);
LAB_00156038:
js_parse_error(param_1,"Duplicate parameter name not allowed in this context");
return 0xffffffffffffffff;
}
|
Subsets and Splits
C++ Functions Using STL
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++ STL Function Queries
Filters C++ code examples that use standard library containers and algorithms, helping identify common programming patterns and library usage in code generation tasks.
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.