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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
33,500 | void qdevtools::registerBuildinEditor<qdevtools::StyleSheetEdit>(char const*) | HuaiminNotSleepYet[P]QDevTools/qdevtools.cpp | void registerBuildinEditor(const char* property)
{
static_assert(std::is_base_of_v<BuiltinEditor, E>, "W must be a subclass of BuildinEditor");
registerEditor(
property,
[]() -> QWidget* { return new E; },
[](QWidget* w) -> QVariant { return static_cast<E*>(w)->value(); },
[](QWidget* w, const QVariant& v) { static_cast<E*>(w)->setValue(v); },
QMetaMethod::fromSignal(&E::valueChanged));
} | O3 | cpp | void qdevtools::registerBuildinEditor<qdevtools::StyleSheetEdit>(char const*):
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq -0x550e(%rip), %rax # 0x10a0e
leaq 0x8(%rsp), %r14
movq %rax, (%r14)
movq $0x0, 0x8(%r14)
leaq 0x14d6d(%rip), %rdi # 0x2aca0
movq %r14, %rsi
callq 0xfb40
movq %rax, (%r14)
movq %rdx, 0x8(%r14)
leaq 0x9c15(%rip), %rsi # 0x1fb5e
leaq 0xb20a(%rip), %rdx # 0x2115a
leaq 0xb215(%rip), %rcx # 0x2116c
leaq 0x8(%rsp), %r8
movq %rbx, %rdi
callq 0x11be1
addq $0x18, %rsp
popq %rbx
popq %r14
retq
| _ZN9qdevtools21registerBuildinEditorINS_14StyleSheetEditEEEvPKc:
push r14
push rbx
sub rsp, 18h
mov rbx, rdi
lea rax, _ZN9qdevtools13BuiltinEditor12valueChangedEv; qdevtools::BuiltinEditor::valueChanged(void)
lea r14, [rsp+28h+var_20]
mov [r14], rax
mov qword ptr [r14+8], 0
lea rdi, _ZN9qdevtools13BuiltinEditor16staticMetaObjectE; this
mov rsi, r14; QMetaObject *
call __ZN11QMetaMethod14fromSignalImplEPK11QMetaObjectPPv; QMetaMethod::fromSignalImpl(QMetaObject const*,void **)
mov [r14], rax
mov [r14+8], rdx
lea rsi, _ZZN9qdevtools21registerBuildinEditorINS_14StyleSheetEditEEEvPKcENUlvE_8__invokeEv; qdevtools::registerBuildinEditor<qdevtools::StyleSheetEdit>(char const*)::{lambda(void)#1}::__invoke(void)
lea rdx, _ZZN9qdevtools21registerBuildinEditorINS_14StyleSheetEditEEEvPKcENUlP7QWidgetE_8__invokeES5_; qdevtools::registerBuildinEditor<qdevtools::StyleSheetEdit>(char const*)::{lambda(QWidget *)#1}::__invoke(QWidget *)
lea rcx, _ZZN9qdevtools21registerBuildinEditorINS_14StyleSheetEditEEEvPKcENUlP7QWidgetRK8QVariantE_8__invokeES5_S8_; qdevtools::registerBuildinEditor<qdevtools::StyleSheetEdit>(char const*)::{lambda(QWidget *,QVariant const&)#1}::__invoke(QWidget *,QVariant const&)
lea r8, [rsp+28h+var_20]
mov rdi, rbx
call _ZN9qdevtools14registerEditorEPKcPFP7QWidgetvEPF8QVariantS3_EPFvS3_RKS6_ERK11QMetaMethod; qdevtools::registerEditor(char const*,QWidget * (*)(void),QVariant (*)(QWidget *),void (*)(QWidget *,QVariant const&),QMetaMethod const&)
add rsp, 18h
pop rbx
pop r14
retn
| long long qdevtools::registerBuildinEditor<qdevtools::StyleSheetEdit>(long long a1, long long a2, void **a3)
{
long long v3; // rdx
__int128 v5[2]; // [rsp+8h] [rbp-20h] BYREF
*(_QWORD *)&v5[0] = qdevtools::BuiltinEditor::valueChanged;
*((_QWORD *)&v5[0] + 1) = 0LL;
*(_QWORD *)&v5[0] = QMetaMethod::fromSignalImpl(
(QMetaMethod *)&qdevtools::BuiltinEditor::staticMetaObject,
(const QMetaObject *)v5,
a3);
*((_QWORD *)&v5[0] + 1) = v3;
return qdevtools::registerEditor(
a1,
(long long)qdevtools::registerBuildinEditor<qdevtools::StyleSheetEdit>(char const*)::{lambda(void)#1}::__invoke,
(long long)qdevtools::registerBuildinEditor<qdevtools::StyleSheetEdit>(char const*)::{lambda(QWidget *)#1}::__invoke,
(long long)qdevtools::registerBuildinEditor<qdevtools::StyleSheetEdit>(char const*)::{lambda(QWidget *,QVariant const&)#1}::__invoke,
v5);
}
| registerBuildinEditor<qdevtools::StyleSheetEdit>:
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
LEA RAX,[0x110a0e]
LEA R14,[RSP + 0x8]
MOV qword ptr [R14],RAX
MOV qword ptr [R14 + 0x8],0x0
LEA RDI,[0x12aca0]
MOV RSI,R14
CALL 0x0010fb40
MOV qword ptr [R14],RAX
MOV qword ptr [R14 + 0x8],RDX
LEA RSI,[0x11fb5e]
LEA RDX,[0x12115a]
LEA RCX,[0x12116c]
LEA R8,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00111be1
ADD RSP,0x18
POP RBX
POP R14
RET
|
/* void qdevtools::registerBuildinEditor<qdevtools::StyleSheetEdit>(char const*) */
void qdevtools::registerBuildinEditor<qdevtools::StyleSheetEdit>(char *param_1)
{
int1 local_20 [16];
local_20._0_8_ = BuiltinEditor::valueChanged;
local_20._8_8_ = 0;
local_20 = QMetaMethod::fromSignalImpl
((QMetaObject *)BuiltinEditor::staticMetaObject,(void **)local_20);
registerEditor(param_1,registerBuildinEditor<qdevtools::StyleSheetEdit>(char_const*)::{lambda()#1}
::__invoke,
registerBuildinEditor<qdevtools::StyleSheetEdit>(char_const*)::{lambda(QWidget*)#1}
::__invoke,
registerBuildinEditor<qdevtools::StyleSheetEdit>(char_const*)::
{lambda(QWidget*,QVariant_const&)#1}::__invoke,(QMetaMethod *)local_20);
return;
}
| |
33,501 | ggml_backend_cpu_device_supports_op(ggml_backend_device*, ggml_tensor const*) | ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.cpp | static bool ggml_backend_cpu_device_supports_op(ggml_backend_dev_t dev, const struct ggml_tensor * op) {
const struct ggml_tensor * src0 = op->src[0];
const struct ggml_tensor * src1 = op->src[1];
if (op->op == GGML_OP_NONE || op->op == GGML_OP_RESHAPE || op->op == GGML_OP_VIEW || op->op == GGML_OP_PERMUTE || op->op == GGML_OP_TRANSPOSE) {
return true;
}
// extra_buffer_op?
for (auto extra : ggml_backend_cpu_get_extra_buffers_type()) {
if (extra) {
auto buf_extra = (ggml::cpu::extra_buffer_type*) extra->context;
if (buf_extra && buf_extra->supports_op(dev, op)) {
return true;
}
}
}
// the other case need host buffer.
for (int i = 0; i < GGML_MAX_SRC; i++) {
if (op->src[i] && op->src[i]->buffer && !ggml_backend_buft_is_host(op->src[i]->buffer->buft)) {
return false;
}
}
switch (op->op) {
case GGML_OP_CPY:
return
op->type != GGML_TYPE_IQ3_XXS &&
op->type != GGML_TYPE_IQ3_S &&
op->type != GGML_TYPE_IQ2_XXS &&
op->type != GGML_TYPE_IQ2_XS &&
op->type != GGML_TYPE_IQ2_S &&
op->type != GGML_TYPE_IQ1_S &&
op->type != GGML_TYPE_IQ1_M; // missing type_traits.from_float
case GGML_OP_MUL_MAT:
return src1->type == GGML_TYPE_F32 || src1->type == ggml_get_type_traits_cpu(src0->type)->vec_dot_type;
case GGML_OP_SOFT_MAX_BACK: {
if (op->src[0]->type != GGML_TYPE_F32 || op->src[1]->type != GGML_TYPE_F32) {
return false;
}
float max_bias = 0.0f;
memcpy(&max_bias, (const float *) op->op_params + 1, sizeof(float));
return max_bias == 0.0f;
}
case GGML_OP_IM2COL_BACK:
return src0->type == GGML_TYPE_F32 && src1->type == GGML_TYPE_F32;
case GGML_OP_GET_ROWS_BACK:
return src0->type == GGML_TYPE_F32 || src0->type == GGML_TYPE_F16;
case GGML_OP_OUT_PROD:
return (src0->type == GGML_TYPE_F32 || (ggml_is_quantized(src0->type) && src0->ne[2] == src1->ne[2] && src0->ne[3] == src1->ne[3])) &&
src1->type == GGML_TYPE_F32 && op->type == GGML_TYPE_F32;
default:
return true;
}
} | O1 | cpp | ggml_backend_cpu_device_supports_op(ggml_backend_device*, ggml_tensor const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x98(%rsi), %r15
movq 0xa0(%rsi), %r12
movl 0x50(%rsi), %ecx
cmpq $0x26, %rcx
jae 0x10c8e
movb $0x1, %al
movabsq $0x3c00000001, %rdx # imm = 0x3C00000001
btq %rcx, %rdx
jb 0x10dc8
callq 0xa1c0
movq 0x4fdf6(%rip), %r13 # 0x60a90
movq 0x4fdf7(%rip), %rbp # 0x60a98
cmpq %rbp, %r13
je 0x10cd2
movq (%r13), %rax
testq %rax, %rax
je 0x10ccc
movq 0x38(%rax), %rdi
testq %rdi, %rdi
je 0x10ccc
movq (%rdi), %rax
movq %r14, %rsi
movq %rbx, %rdx
callq *0x10(%rax)
testb %al, %al
jne 0x10d57
addq $0x8, %r13
jmp 0x10ca1
movl $0x13, %r14d
movq (%rbx,%r14,8), %rax
testq %rax, %rax
je 0x10cfb
movq 0x8(%rax), %rax
testq %rax, %rax
je 0x10cfb
movq 0x48(%rax), %rdi
callq 0xa980
testb %al, %al
je 0x10dc6
incq %r14
cmpq $0x1d, %r14
jne 0x10cd8
movl 0x50(%rbx), %ecx
movb $0x1, %al
cmpl $0x26, %ecx
jg 0x10d3b
cmpl $0x1b, %ecx
je 0x10d5b
cmpl $0x1d, %ecx
je 0x10d79
cmpl $0x20, %ecx
jne 0x10dc8
movl (%rbx), %ecx
cmpl $0x1e, %ecx
jae 0x10dc8
movl $0x1f90ffff, %eax # imm = 0x1F90FFFF
shrxl %ecx, %eax, %eax
jmp 0x10dc8
cmpl $0x27, %ecx
je 0x10d70
cmpl $0x2c, %ecx
je 0x10dae
cmpl $0x32, %ecx
jne 0x10dc8
cmpl $0x0, (%r15)
jne 0x10dc6
cmpl $0x0, (%r12)
jmp 0x10da9
movb $0x1, %al
jmp 0x10dc8
movl (%r12), %ebx
testl %ebx, %ebx
je 0x10dc8
movl (%r15), %edi
callq 0xa120
cmpl 0x10(%rax), %ebx
jmp 0x10da9
cmpl $0x2, (%r15)
setb %al
jmp 0x10dc8
movl (%r15), %edi
testl %edi, %edi
je 0x10d9f
callq 0xa4d0
testb %al, %al
je 0x10dc6
movq 0x20(%r15), %rax
cmpq 0x20(%r12), %rax
jne 0x10dc6
movq 0x28(%r15), %rax
cmpq 0x28(%r12), %rax
jne 0x10dc6
cmpl $0x0, (%r12)
jne 0x10dc6
cmpl $0x0, (%rbx)
sete %al
jmp 0x10dc8
movq 0x98(%rbx), %rax
cmpl $0x0, (%rax)
jne 0x10dc6
movq 0xa0(%rbx), %rax
cmpl $0x0, (%rax)
je 0x10dd9
xorl %eax, %eax
andb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
vxorps %xmm0, %xmm0, %xmm0
vcmpeqss 0x58(%rbx), %xmm0, %k0
kmovd %k0, %eax
jmp 0x10dc8
| _ZL35ggml_backend_cpu_device_supports_opP19ggml_backend_devicePK11ggml_tensor:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
mov r14, rdi
mov r15, [rsi+98h]
mov r12, [rsi+0A0h]
mov ecx, [rsi+50h]
cmp rcx, 26h ; '&'
jnb short loc_10C8E
mov al, 1
mov rdx, 3C00000001h
bt rdx, rcx
jb loc_10DC8
loc_10C8E:
call __Z39ggml_backend_cpu_get_extra_buffers_typev; ggml_backend_cpu_get_extra_buffers_type(void)
mov r13, qword ptr cs:_ZZ39ggml_backend_cpu_get_extra_buffers_typevE5bufts; ggml_backend_cpu_get_extra_buffers_type(void)::bufts
mov rbp, qword ptr cs:_ZZ39ggml_backend_cpu_get_extra_buffers_typevE5bufts+8; ggml_backend_cpu_get_extra_buffers_type(void)::bufts
loc_10CA1:
cmp r13, rbp
jz short loc_10CD2
mov rax, [r13+0]
test rax, rax
jz short loc_10CCC
mov rdi, [rax+38h]
test rdi, rdi
jz short loc_10CCC
mov rax, [rdi]
mov rsi, r14
mov rdx, rbx
call qword ptr [rax+10h]
test al, al
jnz loc_10D57
loc_10CCC:
add r13, 8
jmp short loc_10CA1
loc_10CD2:
mov r14d, 13h
loc_10CD8:
mov rax, [rbx+r14*8]
test rax, rax
jz short loc_10CFB
mov rax, [rax+8]
test rax, rax
jz short loc_10CFB
mov rdi, [rax+48h]
call _ggml_backend_buft_is_host
test al, al
jz loc_10DC6
loc_10CFB:
inc r14
cmp r14, 1Dh
jnz short loc_10CD8
mov ecx, [rbx+50h]
mov al, 1
cmp ecx, 26h ; '&'
jg short loc_10D3B
cmp ecx, 1Bh
jz short loc_10D5B
cmp ecx, 1Dh
jz short loc_10D79
cmp ecx, 20h ; ' '
jnz loc_10DC8
mov ecx, [rbx]
cmp ecx, 1Eh
jnb loc_10DC8
mov eax, 1F90FFFFh
shrx eax, eax, ecx
jmp loc_10DC8
loc_10D3B:
cmp ecx, 27h ; '''
jz short loc_10D70
cmp ecx, 2Ch ; ','
jz short loc_10DAE
cmp ecx, 32h ; '2'
jnz short loc_10DC8
cmp dword ptr [r15], 0
jnz short loc_10DC6
cmp dword ptr [r12], 0
jmp short loc_10DA9
loc_10D57:
mov al, 1
jmp short loc_10DC8
loc_10D5B:
mov ebx, [r12]
test ebx, ebx
jz short loc_10DC8
mov edi, [r15]
call _ggml_get_type_traits_cpu
cmp ebx, [rax+10h]
jmp short loc_10DA9
loc_10D70:
cmp dword ptr [r15], 2
setb al
jmp short loc_10DC8
loc_10D79:
mov edi, [r15]
test edi, edi
jz short loc_10D9F
call _ggml_is_quantized
test al, al
jz short loc_10DC6
mov rax, [r15+20h]
cmp rax, [r12+20h]
jnz short loc_10DC6
mov rax, [r15+28h]
cmp rax, [r12+28h]
jnz short loc_10DC6
loc_10D9F:
cmp dword ptr [r12], 0
jnz short loc_10DC6
cmp dword ptr [rbx], 0
loc_10DA9:
setz al
jmp short loc_10DC8
loc_10DAE:
mov rax, [rbx+98h]
cmp dword ptr [rax], 0
jnz short loc_10DC6
mov rax, [rbx+0A0h]
cmp dword ptr [rax], 0
jz short loc_10DD9
loc_10DC6:
xor eax, eax
loc_10DC8:
and al, 1
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_10DD9:
vxorps xmm0, xmm0, xmm0
vcmpeqss k0, xmm0, dword ptr [rbx+58h]
kmovd eax, k0
jmp short loc_10DC8
| char ggml_backend_cpu_device_supports_op(long long a1, long long a2, __m128 _XMM0)
{
unsigned int *v4; // r15
int *v5; // r12
unsigned long long v6; // rcx
long long v8; // rdx
char *v9; // rbp
char *i; // r13
long long v11; // rdi
long long j; // r14
long long v13; // rax
long long v14; // rax
int v15; // ecx
bool v16; // zf
int v17; // ebx
long long v18; // rdi
v4 = *(unsigned int **)(a2 + 152);
v5 = *(int **)(a2 + 160);
v6 = *(unsigned int *)(a2 + 80);
if ( v6 < 0x26 )
{
LOBYTE(_EAX) = 1;
v8 = 0x3C00000001LL;
if ( _bittest64(&v8, v6) )
return _EAX & 1;
}
ggml_backend_cpu_get_extra_buffers_type();
v9 = (char *)*(&ggml_backend_cpu_get_extra_buffers_type(void)::bufts + 1);
for ( i = (char *)ggml_backend_cpu_get_extra_buffers_type(void)::bufts; i != v9; i += 8 )
{
if ( *(_QWORD *)i )
{
v11 = *(_QWORD *)(*(_QWORD *)i + 56LL);
if ( v11 )
{
if ( (*(unsigned __int8 ( **)(long long, long long, long long))(*(_QWORD *)v11 + 16LL))(v11, a1, a2) )
{
LOBYTE(_EAX) = 1;
return _EAX & 1;
}
}
}
}
for ( j = 19LL; j != 29; ++j )
{
v13 = *(_QWORD *)(a2 + 8 * j);
if ( v13 )
{
v14 = *(_QWORD *)(v13 + 8);
if ( v14 )
{
if ( !(unsigned __int8)ggml_backend_buft_is_host(*(_QWORD *)(v14 + 72)) )
goto LABEL_38;
}
}
}
v15 = *(_DWORD *)(a2 + 80);
LOBYTE(_EAX) = 1;
if ( v15 > 38 )
{
switch ( v15 )
{
case '\'':
LOBYTE(_EAX) = *v4 < 2;
return _EAX & 1;
case ',':
if ( !**(_DWORD **)(a2 + 152) && !**(_DWORD **)(a2 + 160) )
{
__asm
{
vxorps xmm0, xmm0, xmm0
vcmpeqss k0, xmm0, dword ptr [rbx+58h]
kmovd eax, k0
}
return _EAX & 1;
}
break;
case '2':
if ( !*v4 )
{
v16 = *v5 == 0;
LABEL_35:
LOBYTE(_EAX) = v16;
return _EAX & 1;
}
break;
default:
return _EAX & 1;
}
LABEL_38:
LOBYTE(_EAX) = 0;
return _EAX & 1;
}
if ( v15 == 27 )
{
if ( !*v5 )
return _EAX & 1;
v17 = *v5;
v16 = v17 == *((_DWORD *)ggml_get_type_traits_cpu(*v4) + 4);
goto LABEL_35;
}
if ( v15 == 29 )
{
v18 = *v4;
if ( (!(_DWORD)v18
|| (unsigned __int8)ggml_is_quantized(v18)
&& *((_QWORD *)v4 + 4) == *((_QWORD *)v5 + 4)
&& *((_QWORD *)v4 + 5) == *((_QWORD *)v5 + 5))
&& !*v5 )
{
v16 = *(_DWORD *)a2 == 0;
goto LABEL_35;
}
goto LABEL_38;
}
if ( v15 == 32 && *(_DWORD *)a2 < 0x1Eu )
_EAX = 0x1F90FFFFu >> *(_DWORD *)a2;
return _EAX & 1;
}
| ggml_backend_cpu_device_supports_op:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOV R15,qword ptr [RSI + 0x98]
MOV R12,qword ptr [RSI + 0xa0]
MOV ECX,dword ptr [RSI + 0x50]
CMP RCX,0x26
JNC 0x00110c8e
MOV AL,0x1
MOV RDX,0x3c00000001
BT RDX,RCX
JC 0x00110dc8
LAB_00110c8e:
CALL 0x0010a1c0
MOV R13,qword ptr [0x00160a90]
MOV RBP,qword ptr [0x00160a98]
LAB_00110ca1:
CMP R13,RBP
JZ 0x00110cd2
MOV RAX,qword ptr [R13]
TEST RAX,RAX
JZ 0x00110ccc
MOV RDI,qword ptr [RAX + 0x38]
TEST RDI,RDI
JZ 0x00110ccc
MOV RAX,qword ptr [RDI]
MOV RSI,R14
MOV RDX,RBX
CALL qword ptr [RAX + 0x10]
TEST AL,AL
JNZ 0x00110d57
LAB_00110ccc:
ADD R13,0x8
JMP 0x00110ca1
LAB_00110cd2:
MOV R14D,0x13
LAB_00110cd8:
MOV RAX,qword ptr [RBX + R14*0x8]
TEST RAX,RAX
JZ 0x00110cfb
MOV RAX,qword ptr [RAX + 0x8]
TEST RAX,RAX
JZ 0x00110cfb
MOV RDI,qword ptr [RAX + 0x48]
CALL 0x0010a980
TEST AL,AL
JZ 0x00110dc6
LAB_00110cfb:
INC R14
CMP R14,0x1d
JNZ 0x00110cd8
MOV ECX,dword ptr [RBX + 0x50]
MOV AL,0x1
CMP ECX,0x26
JG 0x00110d3b
CMP ECX,0x1b
JZ 0x00110d5b
CMP ECX,0x1d
JZ 0x00110d79
CMP ECX,0x20
JNZ 0x00110dc8
MOV ECX,dword ptr [RBX]
CMP ECX,0x1e
JNC 0x00110dc8
MOV EAX,0x1f90ffff
SHRX EAX,EAX,ECX
JMP 0x00110dc8
LAB_00110d3b:
CMP ECX,0x27
JZ 0x00110d70
CMP ECX,0x2c
JZ 0x00110dae
CMP ECX,0x32
JNZ 0x00110dc8
CMP dword ptr [R15],0x0
JNZ 0x00110dc6
CMP dword ptr [R12],0x0
JMP 0x00110da9
LAB_00110d57:
MOV AL,0x1
JMP 0x00110dc8
LAB_00110d5b:
MOV EBX,dword ptr [R12]
TEST EBX,EBX
JZ 0x00110dc8
MOV EDI,dword ptr [R15]
CALL 0x0010a120
CMP EBX,dword ptr [RAX + 0x10]
JMP 0x00110da9
LAB_00110d70:
CMP dword ptr [R15],0x2
SETC AL
JMP 0x00110dc8
LAB_00110d79:
MOV EDI,dword ptr [R15]
TEST EDI,EDI
JZ 0x00110d9f
CALL 0x0010a4d0
TEST AL,AL
JZ 0x00110dc6
MOV RAX,qword ptr [R15 + 0x20]
CMP RAX,qword ptr [R12 + 0x20]
JNZ 0x00110dc6
MOV RAX,qword ptr [R15 + 0x28]
CMP RAX,qword ptr [R12 + 0x28]
JNZ 0x00110dc6
LAB_00110d9f:
CMP dword ptr [R12],0x0
JNZ 0x00110dc6
CMP dword ptr [RBX],0x0
LAB_00110da9:
SETZ AL
JMP 0x00110dc8
LAB_00110dae:
MOV RAX,qword ptr [RBX + 0x98]
CMP dword ptr [RAX],0x0
JNZ 0x00110dc6
MOV RAX,qword ptr [RBX + 0xa0]
CMP dword ptr [RAX],0x0
JZ 0x00110dd9
LAB_00110dc6:
XOR EAX,EAX
LAB_00110dc8:
AND AL,0x1
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00110dd9:
VXORPS XMM0,XMM0,XMM0
VCMPEQSS K0 {K0},XMM0,dword ptr [RBX + 0x58]
KMOVD EAX,K0
JMP 0x00110dc8
|
/* ggml_backend_cpu_device_supports_op(ggml_backend_device*, ggml_tensor const*) */
ulong ggml_backend_cpu_device_supports_op(ggml_backend_device *param_1,ggml_tensor *param_2)
{
int iVar1;
uint *puVar2;
int *piVar3;
long *plVar4;
long *plVar5;
char cVar6;
int8 in_RAX;
int8 uVar7;
long lVar8;
int7 uVar10;
ulong uVar9;
long *plVar11;
long lVar12;
bool bVar13;
int8 in_K0;
puVar2 = *(uint **)(param_2 + 0x98);
piVar3 = *(int **)(param_2 + 0xa0);
if (((ulong)*(uint *)(param_2 + 0x50) < 0x26) &&
(uVar9 = CONCAT71((int7)((ulong)in_RAX >> 8),1),
(0x3c00000001U >> ((ulong)*(uint *)(param_2 + 0x50) & 0x3f) & 1) != 0)) goto LAB_00110dc8;
ggml_backend_cpu_get_extra_buffers_type();
plVar5 = DAT_00160a98;
for (plVar11 = ggml_backend_cpu_get_extra_buffers_type()::bufts; plVar11 != plVar5;
plVar11 = plVar11 + 1) {
if ((*plVar11 != 0) && (plVar4 = *(long **)(*plVar11 + 0x38), plVar4 != (long *)0x0)) {
uVar7 = (**(code **)(*plVar4 + 0x10))(plVar4,param_1,param_2);
if ((char)uVar7 != '\0') {
uVar9 = CONCAT71((int7)((ulong)uVar7 >> 8),1);
goto LAB_00110dc8;
}
}
}
lVar12 = 0x13;
do {
lVar8 = *(long *)(param_2 + lVar12 * 8);
if ((lVar8 != 0) && (lVar8 = *(long *)(lVar8 + 8), lVar8 != 0)) {
lVar8 = ggml_backend_buft_is_host(*(int8 *)(lVar8 + 0x48));
if ((char)lVar8 == '\0') goto LAB_00110dc6;
}
lVar12 = lVar12 + 1;
} while (lVar12 != 0x1d);
iVar1 = *(int *)(param_2 + 0x50);
uVar10 = (int7)((ulong)lVar8 >> 8);
uVar9 = CONCAT71(uVar10,1);
if (iVar1 < 0x27) {
if (iVar1 == 0x1b) {
iVar1 = *piVar3;
if (iVar1 == 0) goto LAB_00110dc8;
uVar9 = ggml_get_type_traits_cpu(*puVar2);
bVar13 = iVar1 == *(int *)(uVar9 + 0x10);
}
else {
if (iVar1 != 0x1d) {
if ((iVar1 == 0x20) && (*(uint *)param_2 < 0x1e)) {
uVar9 = (ulong)(0x1f90ffff >> (*(uint *)param_2 & 0x1f));
}
goto LAB_00110dc8;
}
if (*puVar2 != 0) {
cVar6 = ggml_is_quantized();
if (((cVar6 == '\0') || (*(long *)(puVar2 + 8) != *(long *)(piVar3 + 8))) ||
(uVar9 = *(ulong *)(puVar2 + 10), uVar9 != *(ulong *)(piVar3 + 10))) goto LAB_00110dc6;
}
if (*piVar3 != 0) goto LAB_00110dc6;
bVar13 = *(int *)param_2 == 0;
}
LAB_00110da9:
uVar9 = CONCAT71((int7)(uVar9 >> 8),bVar13);
}
else {
if (iVar1 == 0x27) {
uVar9 = CONCAT71(uVar10,*puVar2 < 2);
goto LAB_00110dc8;
}
if (iVar1 == 0x2c) {
if ((**(int **)(param_2 + 0x98) == 0) && (**(int **)(param_2 + 0xa0) == 0)) {
uVar7 = vcmpss_avx512f(ZEXT816(0) << 0x40,ZEXT416(*(uint *)(param_2 + 0x58)),0);
uVar9 = CONCAT44((int)((ulong)*(int **)(param_2 + 0xa0) >> 0x20),
(uint)((byte)in_K0 & 1) & (uint)uVar7);
goto LAB_00110dc8;
}
}
else {
if (iVar1 != 0x32) goto LAB_00110dc8;
if (*puVar2 == 0) {
bVar13 = *piVar3 == 0;
goto LAB_00110da9;
}
}
LAB_00110dc6:
uVar9 = 0;
}
LAB_00110dc8:
return uVar9 & 0xffffffffffffff01;
}
| |
33,502 | ggml_backend_cpu_device_supports_op(ggml_backend_device*, ggml_tensor const*) | ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.cpp | static bool ggml_backend_cpu_device_supports_op(ggml_backend_dev_t dev, const struct ggml_tensor * op) {
const struct ggml_tensor * src0 = op->src[0];
const struct ggml_tensor * src1 = op->src[1];
if (op->op == GGML_OP_NONE || op->op == GGML_OP_RESHAPE || op->op == GGML_OP_VIEW || op->op == GGML_OP_PERMUTE || op->op == GGML_OP_TRANSPOSE) {
return true;
}
// extra_buffer_op?
for (auto extra : ggml_backend_cpu_get_extra_buffers_type()) {
if (extra) {
auto buf_extra = (ggml::cpu::extra_buffer_type*) extra->context;
if (buf_extra && buf_extra->supports_op(dev, op)) {
return true;
}
}
}
// the other case need host buffer.
for (int i = 0; i < GGML_MAX_SRC; i++) {
if (op->src[i] && op->src[i]->buffer && !ggml_backend_buft_is_host(op->src[i]->buffer->buft)) {
return false;
}
}
switch (op->op) {
case GGML_OP_CPY:
return
op->type != GGML_TYPE_IQ3_XXS &&
op->type != GGML_TYPE_IQ3_S &&
op->type != GGML_TYPE_IQ2_XXS &&
op->type != GGML_TYPE_IQ2_XS &&
op->type != GGML_TYPE_IQ2_S &&
op->type != GGML_TYPE_IQ1_S &&
op->type != GGML_TYPE_IQ1_M; // missing type_traits.from_float
case GGML_OP_MUL_MAT:
return src1->type == GGML_TYPE_F32 || src1->type == ggml_get_type_traits_cpu(src0->type)->vec_dot_type;
case GGML_OP_SOFT_MAX_BACK: {
if (op->src[0]->type != GGML_TYPE_F32 || op->src[1]->type != GGML_TYPE_F32) {
return false;
}
float max_bias = 0.0f;
memcpy(&max_bias, (const float *) op->op_params + 1, sizeof(float));
return max_bias == 0.0f;
}
case GGML_OP_IM2COL_BACK:
return src0->type == GGML_TYPE_F32 && src1->type == GGML_TYPE_F32;
case GGML_OP_GET_ROWS_BACK:
return src0->type == GGML_TYPE_F32 || src0->type == GGML_TYPE_F16;
case GGML_OP_OUT_PROD:
return (src0->type == GGML_TYPE_F32 || (ggml_is_quantized(src0->type) && src0->ne[2] == src1->ne[2] && src0->ne[3] == src1->ne[3])) &&
src1->type == GGML_TYPE_F32 && op->type == GGML_TYPE_F32;
default:
return true;
}
} | O2 | cpp | ggml_backend_cpu_device_supports_op(ggml_backend_device*, ggml_tensor const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x98(%rsi), %r15
movq 0xa0(%rsi), %r12
movl 0x50(%rsi), %ecx
cmpq $0x26, %rcx
jae 0x10f05
movb $0x1, %al
movabsq $0x3c00000001, %rdx # imm = 0x3C00000001
btq %rcx, %rdx
jb 0x1102f
callq 0xb1d0
movq 0x4ac1f(%rip), %r13 # 0x5bb30
movq 0x4ac20(%rip), %rbp # 0x5bb38
cmpq %rbp, %r13
je 0x10f45
movq (%r13), %rax
testq %rax, %rax
je 0x10f3f
movq 0x38(%rax), %rdi
testq %rdi, %rdi
je 0x10f3f
movq (%rdi), %rax
movq %r14, %rsi
movq %rbx, %rdx
callq *0x10(%rax)
testb %al, %al
jne 0x10fb9
addq $0x8, %r13
jmp 0x10f18
pushq $0x13
popq %r14
cmpq $0x1d, %r14
je 0x10f77
movq (%rbx,%r14,8), %rax
testq %rax, %rax
je 0x10f72
movq 0x8(%rax), %rax
testq %rax, %rax
je 0x10f72
movq 0x48(%rax), %rdi
callq 0xba30
testb %al, %al
je 0x1102d
incq %r14
jmp 0x10f49
movl 0x50(%rbx), %ecx
movb $0x1, %al
cmpl $0x1b, %ecx
je 0x11040
cmpl $0x1d, %ecx
je 0x11000
cmpl $0x32, %ecx
je 0x10fbd
cmpl $0x27, %ecx
je 0x10ff7
cmpl $0x2c, %ecx
je 0x10fcd
cmpl $0x20, %ecx
jne 0x1102f
movl (%rbx), %ecx
cmpl $0x1e, %ecx
jae 0x1102f
movl $0x1f90ffff, %eax # imm = 0x1F90FFFF
shrxl %ecx, %eax, %eax
jmp 0x1102f
movb $0x1, %al
jmp 0x1102f
cmpl $0x0, (%r15)
jne 0x1102d
cmpl $0x0, (%r12)
jmp 0x11058
movq 0x98(%rbx), %rax
cmpl $0x0, (%rax)
jne 0x1102d
movq 0xa0(%rbx), %rax
cmpl $0x0, (%rax)
jne 0x1102d
vxorps %xmm0, %xmm0, %xmm0
vcmpeqss 0x58(%rbx), %xmm0, %k0
kmovd %k0, %eax
jmp 0x1102f
cmpl $0x2, (%r15)
setb %al
jmp 0x1102f
movl (%r15), %edi
testl %edi, %edi
je 0x11026
callq 0xb550
testb %al, %al
je 0x1102d
movq 0x20(%r15), %rax
cmpq 0x20(%r12), %rax
jne 0x1102d
movq 0x28(%r15), %rax
cmpq 0x28(%r12), %rax
jne 0x1102d
cmpl $0x0, (%r12)
je 0x11055
xorl %eax, %eax
andb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl (%r12), %ebx
testl %ebx, %ebx
je 0x1102f
movl (%r15), %edi
callq 0xb130
cmpl 0x10(%rax), %ebx
jmp 0x11058
cmpl $0x0, (%rbx)
sete %al
jmp 0x1102f
| _ZL35ggml_backend_cpu_device_supports_opP19ggml_backend_devicePK11ggml_tensor:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
mov r14, rdi
mov r15, [rsi+98h]
mov r12, [rsi+0A0h]
mov ecx, [rsi+50h]
cmp rcx, 26h ; '&'
jnb short loc_10F05
mov al, 1
mov rdx, 3C00000001h
bt rdx, rcx
jb loc_1102F
loc_10F05:
call __Z39ggml_backend_cpu_get_extra_buffers_typev; ggml_backend_cpu_get_extra_buffers_type(void)
mov r13, qword ptr cs:_ZZ39ggml_backend_cpu_get_extra_buffers_typevE5bufts; ggml_backend_cpu_get_extra_buffers_type(void)::bufts
mov rbp, qword ptr cs:_ZZ39ggml_backend_cpu_get_extra_buffers_typevE5bufts+8; ggml_backend_cpu_get_extra_buffers_type(void)::bufts
loc_10F18:
cmp r13, rbp
jz short loc_10F45
mov rax, [r13+0]
test rax, rax
jz short loc_10F3F
mov rdi, [rax+38h]
test rdi, rdi
jz short loc_10F3F
mov rax, [rdi]
mov rsi, r14
mov rdx, rbx
call qword ptr [rax+10h]
test al, al
jnz short loc_10FB9
loc_10F3F:
add r13, 8
jmp short loc_10F18
loc_10F45:
push 13h
pop r14
loc_10F49:
cmp r14, 1Dh
jz short loc_10F77
mov rax, [rbx+r14*8]
test rax, rax
jz short loc_10F72
mov rax, [rax+8]
test rax, rax
jz short loc_10F72
mov rdi, [rax+48h]
call _ggml_backend_buft_is_host
test al, al
jz loc_1102D
loc_10F72:
inc r14
jmp short loc_10F49
loc_10F77:
mov ecx, [rbx+50h]
mov al, 1
cmp ecx, 1Bh
jz loc_11040
cmp ecx, 1Dh
jz short loc_11000
cmp ecx, 32h ; '2'
jz short loc_10FBD
cmp ecx, 27h ; '''
jz short loc_10FF7
cmp ecx, 2Ch ; ','
jz short loc_10FCD
cmp ecx, 20h ; ' '
jnz loc_1102F
mov ecx, [rbx]
cmp ecx, 1Eh
jnb loc_1102F
mov eax, 1F90FFFFh
shrx eax, eax, ecx
jmp short loc_1102F
loc_10FB9:
mov al, 1
jmp short loc_1102F
loc_10FBD:
cmp dword ptr [r15], 0
jnz short loc_1102D
cmp dword ptr [r12], 0
jmp loc_11058
loc_10FCD:
mov rax, [rbx+98h]
cmp dword ptr [rax], 0
jnz short loc_1102D
mov rax, [rbx+0A0h]
cmp dword ptr [rax], 0
jnz short loc_1102D
vxorps xmm0, xmm0, xmm0
vcmpeqss k0, xmm0, dword ptr [rbx+58h]
kmovd eax, k0
jmp short loc_1102F
loc_10FF7:
cmp dword ptr [r15], 2
setb al
jmp short loc_1102F
loc_11000:
mov edi, [r15]
test edi, edi
jz short loc_11026
call _ggml_is_quantized
test al, al
jz short loc_1102D
mov rax, [r15+20h]
cmp rax, [r12+20h]
jnz short loc_1102D
mov rax, [r15+28h]
cmp rax, [r12+28h]
jnz short loc_1102D
loc_11026:
cmp dword ptr [r12], 0
jz short loc_11055
loc_1102D:
xor eax, eax
loc_1102F:
and al, 1
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_11040:
mov ebx, [r12]
test ebx, ebx
jz short loc_1102F
mov edi, [r15]
call _ggml_get_type_traits_cpu
cmp ebx, [rax+10h]
jmp short loc_11058
loc_11055:
cmp dword ptr [rbx], 0
loc_11058:
setz al
jmp short loc_1102F
| char ggml_backend_cpu_device_supports_op(long long a1, long long a2, __m128 _XMM0)
{
unsigned int *v4; // r15
int *v5; // r12
unsigned long long v6; // rcx
long long v8; // rdx
long long v9; // rbp
long long i; // r13
long long v11; // rdi
long long j; // r14
long long v13; // rax
long long v14; // rax
int v15; // ecx
bool v16; // zf
long long v18; // rdi
int v20; // ebx
v4 = *(unsigned int **)(a2 + 152);
v5 = *(int **)(a2 + 160);
v6 = *(unsigned int *)(a2 + 80);
if ( v6 < 0x26 )
{
LOBYTE(_EAX) = 1;
v8 = 0x3C00000001LL;
if ( _bittest64(&v8, v6) )
return _EAX & 1;
}
ggml_backend_cpu_get_extra_buffers_type();
v9 = *((_QWORD *)&ggml_backend_cpu_get_extra_buffers_type(void)::bufts + 1);
for ( i = ggml_backend_cpu_get_extra_buffers_type(void)::bufts; i != v9; i += 8LL )
{
if ( *(_QWORD *)i )
{
v11 = *(_QWORD *)(*(_QWORD *)i + 56LL);
if ( v11 )
{
if ( (*(unsigned __int8 ( **)(long long, long long, long long))(*(_QWORD *)v11 + 16LL))(v11, a1, a2) )
{
LOBYTE(_EAX) = 1;
return _EAX & 1;
}
}
}
}
for ( j = 19LL; j != 29; ++j )
{
v13 = *(_QWORD *)(a2 + 8 * j);
if ( v13 )
{
v14 = *(_QWORD *)(v13 + 8);
if ( v14 )
{
if ( !(unsigned __int8)ggml_backend_buft_is_host(*(_QWORD *)(v14 + 72)) )
goto LABEL_35;
}
}
}
v15 = *(_DWORD *)(a2 + 80);
LOBYTE(_EAX) = 1;
switch ( v15 )
{
case 27:
if ( !*v5 )
return _EAX & 1;
v20 = *v5;
v16 = v20 == *((_DWORD *)ggml_get_type_traits_cpu(*v4) + 4);
LABEL_40:
LOBYTE(_EAX) = v16;
return _EAX & 1;
case 29:
v18 = *v4;
if ( (!(_DWORD)v18
|| (unsigned __int8)ggml_is_quantized(v18)
&& *((_QWORD *)v4 + 4) == *((_QWORD *)v5 + 4)
&& *((_QWORD *)v4 + 5) == *((_QWORD *)v5 + 5))
&& !*v5 )
{
v16 = *(_DWORD *)a2 == 0;
goto LABEL_40;
}
goto LABEL_35;
case 50:
if ( !*v4 )
{
v16 = *v5 == 0;
goto LABEL_40;
}
LABEL_35:
LOBYTE(_EAX) = 0;
return _EAX & 1;
case 39:
LOBYTE(_EAX) = *v4 < 2;
return _EAX & 1;
case 44:
if ( !**(_DWORD **)(a2 + 152) && !**(_DWORD **)(a2 + 160) )
{
__asm
{
vxorps xmm0, xmm0, xmm0
vcmpeqss k0, xmm0, dword ptr [rbx+58h]
kmovd eax, k0
}
return _EAX & 1;
}
goto LABEL_35;
}
if ( v15 == 32 && *(_DWORD *)a2 < 0x1Eu )
_EAX = 0x1F90FFFFu >> *(_DWORD *)a2;
return _EAX & 1;
}
| ggml_backend_cpu_device_supports_op:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOV R15,qword ptr [RSI + 0x98]
MOV R12,qword ptr [RSI + 0xa0]
MOV ECX,dword ptr [RSI + 0x50]
CMP RCX,0x26
JNC 0x00110f05
MOV AL,0x1
MOV RDX,0x3c00000001
BT RDX,RCX
JC 0x0011102f
LAB_00110f05:
CALL 0x0010b1d0
MOV R13,qword ptr [0x0015bb30]
MOV RBP,qword ptr [0x0015bb38]
LAB_00110f18:
CMP R13,RBP
JZ 0x00110f45
MOV RAX,qword ptr [R13]
TEST RAX,RAX
JZ 0x00110f3f
MOV RDI,qword ptr [RAX + 0x38]
TEST RDI,RDI
JZ 0x00110f3f
MOV RAX,qword ptr [RDI]
MOV RSI,R14
MOV RDX,RBX
CALL qword ptr [RAX + 0x10]
TEST AL,AL
JNZ 0x00110fb9
LAB_00110f3f:
ADD R13,0x8
JMP 0x00110f18
LAB_00110f45:
PUSH 0x13
POP R14
LAB_00110f49:
CMP R14,0x1d
JZ 0x00110f77
MOV RAX,qword ptr [RBX + R14*0x8]
TEST RAX,RAX
JZ 0x00110f72
MOV RAX,qword ptr [RAX + 0x8]
TEST RAX,RAX
JZ 0x00110f72
MOV RDI,qword ptr [RAX + 0x48]
CALL 0x0010ba30
TEST AL,AL
JZ 0x0011102d
LAB_00110f72:
INC R14
JMP 0x00110f49
LAB_00110f77:
MOV ECX,dword ptr [RBX + 0x50]
MOV AL,0x1
CMP ECX,0x1b
JZ 0x00111040
CMP ECX,0x1d
JZ 0x00111000
CMP ECX,0x32
JZ 0x00110fbd
CMP ECX,0x27
JZ 0x00110ff7
CMP ECX,0x2c
JZ 0x00110fcd
CMP ECX,0x20
JNZ 0x0011102f
MOV ECX,dword ptr [RBX]
CMP ECX,0x1e
JNC 0x0011102f
MOV EAX,0x1f90ffff
SHRX EAX,EAX,ECX
JMP 0x0011102f
LAB_00110fb9:
MOV AL,0x1
JMP 0x0011102f
LAB_00110fbd:
CMP dword ptr [R15],0x0
JNZ 0x0011102d
CMP dword ptr [R12],0x0
JMP 0x00111058
LAB_00110fcd:
MOV RAX,qword ptr [RBX + 0x98]
CMP dword ptr [RAX],0x0
JNZ 0x0011102d
MOV RAX,qword ptr [RBX + 0xa0]
CMP dword ptr [RAX],0x0
JNZ 0x0011102d
VXORPS XMM0,XMM0,XMM0
VCMPEQSS K0 {K0},XMM0,dword ptr [RBX + 0x58]
KMOVD EAX,K0
JMP 0x0011102f
LAB_00110ff7:
CMP dword ptr [R15],0x2
SETC AL
JMP 0x0011102f
LAB_00111000:
MOV EDI,dword ptr [R15]
TEST EDI,EDI
JZ 0x00111026
CALL 0x0010b550
TEST AL,AL
JZ 0x0011102d
MOV RAX,qword ptr [R15 + 0x20]
CMP RAX,qword ptr [R12 + 0x20]
JNZ 0x0011102d
MOV RAX,qword ptr [R15 + 0x28]
CMP RAX,qword ptr [R12 + 0x28]
JNZ 0x0011102d
LAB_00111026:
CMP dword ptr [R12],0x0
JZ 0x00111055
LAB_0011102d:
XOR EAX,EAX
LAB_0011102f:
AND AL,0x1
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00111040:
MOV EBX,dword ptr [R12]
TEST EBX,EBX
JZ 0x0011102f
MOV EDI,dword ptr [R15]
CALL 0x0010b130
CMP EBX,dword ptr [RAX + 0x10]
JMP 0x00111058
LAB_00111055:
CMP dword ptr [RBX],0x0
LAB_00111058:
SETZ AL
JMP 0x0011102f
|
/* ggml_backend_cpu_device_supports_op(ggml_backend_device*, ggml_tensor const*) */
ulong ggml_backend_cpu_device_supports_op(ggml_backend_device *param_1,ggml_tensor *param_2)
{
int iVar1;
uint *puVar2;
int *piVar3;
long *plVar4;
int8 uVar5;
long *plVar6;
char cVar7;
int8 in_RAX;
long lVar8;
int7 uVar10;
ulong uVar9;
long *plVar11;
long lVar12;
bool bVar13;
int8 in_K0;
puVar2 = *(uint **)(param_2 + 0x98);
piVar3 = *(int **)(param_2 + 0xa0);
if (((ulong)*(uint *)(param_2 + 0x50) < 0x26) &&
(uVar9 = CONCAT71((int7)((ulong)in_RAX >> 8),1),
(0x3c00000001U >> ((ulong)*(uint *)(param_2 + 0x50) & 0x3f) & 1) != 0)) goto LAB_0011102f;
lVar8 = ggml_backend_cpu_get_extra_buffers_type();
plVar6 = DAT_0015bb38;
for (plVar11 = ggml_backend_cpu_get_extra_buffers_type()::bufts; plVar11 != plVar6;
plVar11 = plVar11 + 1) {
lVar8 = *plVar11;
if ((lVar8 != 0) && (plVar4 = *(long **)(lVar8 + 0x38), plVar4 != (long *)0x0)) {
lVar8 = (**(code **)(*plVar4 + 0x10))(plVar4,param_1,param_2);
if ((char)lVar8 != '\0') {
uVar9 = CONCAT71((int7)((ulong)lVar8 >> 8),1);
goto LAB_0011102f;
}
}
}
for (lVar12 = 0x13; lVar12 != 0x1d; lVar12 = lVar12 + 1) {
lVar8 = *(long *)(param_2 + lVar12 * 8);
if ((lVar8 != 0) && (lVar8 = *(long *)(lVar8 + 8), lVar8 != 0)) {
lVar8 = ggml_backend_buft_is_host(*(int8 *)(lVar8 + 0x48));
if ((char)lVar8 == '\0') goto LAB_0011102d;
}
}
iVar1 = *(int *)(param_2 + 0x50);
uVar10 = (int7)((ulong)lVar8 >> 8);
uVar9 = CONCAT71(uVar10,1);
if (iVar1 == 0x1b) {
iVar1 = *piVar3;
if (iVar1 == 0) goto LAB_0011102f;
uVar9 = ggml_get_type_traits_cpu(*puVar2);
bVar13 = iVar1 == *(int *)(uVar9 + 0x10);
LAB_00111058:
uVar9 = CONCAT71((int7)(uVar9 >> 8),bVar13);
}
else {
if (iVar1 == 0x1d) {
if (*puVar2 != 0) {
cVar7 = ggml_is_quantized();
if (((cVar7 == '\0') || (*(long *)(puVar2 + 8) != *(long *)(piVar3 + 8))) ||
(uVar9 = *(ulong *)(puVar2 + 10), uVar9 != *(ulong *)(piVar3 + 10))) goto LAB_0011102d;
}
if (*piVar3 == 0) {
bVar13 = *(int *)param_2 == 0;
goto LAB_00111058;
}
}
else if (iVar1 == 0x32) {
if (*puVar2 == 0) {
bVar13 = *piVar3 == 0;
goto LAB_00111058;
}
}
else {
if (iVar1 == 0x27) {
uVar9 = CONCAT71(uVar10,*puVar2 < 2);
goto LAB_0011102f;
}
if (iVar1 != 0x2c) {
if ((iVar1 == 0x20) && (*(uint *)param_2 < 0x1e)) {
uVar9 = (ulong)(0x1f90ffff >> (*(uint *)param_2 & 0x1f));
}
goto LAB_0011102f;
}
if ((**(int **)(param_2 + 0x98) == 0) && (**(int **)(param_2 + 0xa0) == 0)) {
uVar5 = vcmpss_avx512f(ZEXT816(0) << 0x40,ZEXT416(*(uint *)(param_2 + 0x58)),0);
uVar9 = CONCAT44((int)((ulong)*(int **)(param_2 + 0xa0) >> 0x20),
(uint)((byte)in_K0 & 1) & (uint)uVar5);
goto LAB_0011102f;
}
}
LAB_0011102d:
uVar9 = 0;
}
LAB_0011102f:
return uVar9 & 0xffffffffffffff01;
}
| |
33,503 | ggml_backend_cpu_device_supports_op(ggml_backend_device*, ggml_tensor const*) | ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.cpp | static bool ggml_backend_cpu_device_supports_op(ggml_backend_dev_t dev, const struct ggml_tensor * op) {
const struct ggml_tensor * src0 = op->src[0];
const struct ggml_tensor * src1 = op->src[1];
if (op->op == GGML_OP_NONE || op->op == GGML_OP_RESHAPE || op->op == GGML_OP_VIEW || op->op == GGML_OP_PERMUTE || op->op == GGML_OP_TRANSPOSE) {
return true;
}
// extra_buffer_op?
for (auto extra : ggml_backend_cpu_get_extra_buffers_type()) {
if (extra) {
auto buf_extra = (ggml::cpu::extra_buffer_type*) extra->context;
if (buf_extra && buf_extra->supports_op(dev, op)) {
return true;
}
}
}
// the other case need host buffer.
for (int i = 0; i < GGML_MAX_SRC; i++) {
if (op->src[i] && op->src[i]->buffer && !ggml_backend_buft_is_host(op->src[i]->buffer->buft)) {
return false;
}
}
switch (op->op) {
case GGML_OP_CPY:
return
op->type != GGML_TYPE_IQ3_XXS &&
op->type != GGML_TYPE_IQ3_S &&
op->type != GGML_TYPE_IQ2_XXS &&
op->type != GGML_TYPE_IQ2_XS &&
op->type != GGML_TYPE_IQ2_S &&
op->type != GGML_TYPE_IQ1_S &&
op->type != GGML_TYPE_IQ1_M; // missing type_traits.from_float
case GGML_OP_MUL_MAT:
return src1->type == GGML_TYPE_F32 || src1->type == ggml_get_type_traits_cpu(src0->type)->vec_dot_type;
case GGML_OP_SOFT_MAX_BACK: {
if (op->src[0]->type != GGML_TYPE_F32 || op->src[1]->type != GGML_TYPE_F32) {
return false;
}
float max_bias = 0.0f;
memcpy(&max_bias, (const float *) op->op_params + 1, sizeof(float));
return max_bias == 0.0f;
}
case GGML_OP_IM2COL_BACK:
return src0->type == GGML_TYPE_F32 && src1->type == GGML_TYPE_F32;
case GGML_OP_GET_ROWS_BACK:
return src0->type == GGML_TYPE_F32 || src0->type == GGML_TYPE_F16;
case GGML_OP_OUT_PROD:
return (src0->type == GGML_TYPE_F32 || (ggml_is_quantized(src0->type) && src0->ne[2] == src1->ne[2] && src0->ne[3] == src1->ne[3])) &&
src1->type == GGML_TYPE_F32 && op->type == GGML_TYPE_F32;
default:
return true;
}
} | O3 | cpp | ggml_backend_cpu_device_supports_op(ggml_backend_device*, ggml_tensor const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x98(%rsi), %r15
movq 0xa0(%rsi), %r12
movl 0x50(%rsi), %ecx
cmpq $0x26, %rcx
jae 0x10c18
movb $0x1, %al
movabsq $0x3c00000001, %rdx # imm = 0x3C00000001
btq %rcx, %rdx
jb 0x10d52
callq 0xa1c0
movq 0x4ee6c(%rip), %r13 # 0x5fa90
movq 0x4ee6d(%rip), %rbp # 0x5fa98
cmpq %rbp, %r13
je 0x10c5c
movq (%r13), %rax
testq %rax, %rax
je 0x10c56
movq 0x38(%rax), %rdi
testq %rdi, %rdi
je 0x10c56
movq (%rdi), %rax
movq %r14, %rsi
movq %rbx, %rdx
callq *0x10(%rax)
testb %al, %al
jne 0x10ce1
addq $0x8, %r13
jmp 0x10c2b
movl $0x13, %r14d
movq (%rbx,%r14,8), %rax
testq %rax, %rax
je 0x10c85
movq 0x8(%rax), %rax
testq %rax, %rax
je 0x10c85
movq 0x48(%rax), %rdi
callq 0xa980
testb %al, %al
je 0x10d50
incq %r14
cmpq $0x1d, %r14
jne 0x10c62
movl 0x50(%rbx), %ecx
movb $0x1, %al
cmpl $0x26, %ecx
jg 0x10cc5
cmpl $0x1b, %ecx
je 0x10ce5
cmpl $0x1d, %ecx
je 0x10d03
cmpl $0x20, %ecx
jne 0x10d52
movl (%rbx), %ecx
cmpl $0x1e, %ecx
jae 0x10d52
movl $0x1f90ffff, %eax # imm = 0x1F90FFFF
shrxl %ecx, %eax, %eax
jmp 0x10d52
cmpl $0x27, %ecx
je 0x10cfa
cmpl $0x2c, %ecx
je 0x10d38
cmpl $0x32, %ecx
jne 0x10d52
cmpl $0x0, (%r15)
jne 0x10d50
cmpl $0x0, (%r12)
jmp 0x10d33
movb $0x1, %al
jmp 0x10d52
movl (%r12), %ebx
testl %ebx, %ebx
je 0x10d52
movl (%r15), %edi
callq 0xa120
cmpl 0x10(%rax), %ebx
jmp 0x10d33
cmpl $0x2, (%r15)
setb %al
jmp 0x10d52
movl (%r15), %edi
testl %edi, %edi
je 0x10d29
callq 0xa4d0
testb %al, %al
je 0x10d50
movq 0x20(%r15), %rax
cmpq 0x20(%r12), %rax
jne 0x10d50
movq 0x28(%r15), %rax
cmpq 0x28(%r12), %rax
jne 0x10d50
cmpl $0x0, (%r12)
jne 0x10d50
cmpl $0x0, (%rbx)
sete %al
jmp 0x10d52
movq 0x98(%rbx), %rax
cmpl $0x0, (%rax)
jne 0x10d50
movq 0xa0(%rbx), %rax
cmpl $0x0, (%rax)
je 0x10d63
xorl %eax, %eax
andb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
vxorps %xmm0, %xmm0, %xmm0
vcmpeqss 0x58(%rbx), %xmm0, %k0
kmovd %k0, %eax
jmp 0x10d52
| _ZL35ggml_backend_cpu_device_supports_opP19ggml_backend_devicePK11ggml_tensor:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
mov r14, rdi
mov r15, [rsi+98h]
mov r12, [rsi+0A0h]
mov ecx, [rsi+50h]
cmp rcx, 26h ; '&'
jnb short loc_10C18
mov al, 1
mov rdx, 3C00000001h
bt rdx, rcx
jb loc_10D52
loc_10C18:
call __Z39ggml_backend_cpu_get_extra_buffers_typev; ggml_backend_cpu_get_extra_buffers_type(void)
mov r13, qword ptr cs:_ZZ39ggml_backend_cpu_get_extra_buffers_typevE5bufts; ggml_backend_cpu_get_extra_buffers_type(void)::bufts
mov rbp, qword ptr cs:_ZZ39ggml_backend_cpu_get_extra_buffers_typevE5bufts+8; ggml_backend_cpu_get_extra_buffers_type(void)::bufts
loc_10C2B:
cmp r13, rbp
jz short loc_10C5C
mov rax, [r13+0]
test rax, rax
jz short loc_10C56
mov rdi, [rax+38h]
test rdi, rdi
jz short loc_10C56
mov rax, [rdi]
mov rsi, r14
mov rdx, rbx
call qword ptr [rax+10h]
test al, al
jnz loc_10CE1
loc_10C56:
add r13, 8
jmp short loc_10C2B
loc_10C5C:
mov r14d, 13h
loc_10C62:
mov rax, [rbx+r14*8]
test rax, rax
jz short loc_10C85
mov rax, [rax+8]
test rax, rax
jz short loc_10C85
mov rdi, [rax+48h]
call _ggml_backend_buft_is_host
test al, al
jz loc_10D50
loc_10C85:
inc r14
cmp r14, 1Dh
jnz short loc_10C62
mov ecx, [rbx+50h]
mov al, 1
cmp ecx, 26h ; '&'
jg short loc_10CC5
cmp ecx, 1Bh
jz short loc_10CE5
cmp ecx, 1Dh
jz short loc_10D03
cmp ecx, 20h ; ' '
jnz loc_10D52
mov ecx, [rbx]
cmp ecx, 1Eh
jnb loc_10D52
mov eax, 1F90FFFFh
shrx eax, eax, ecx
jmp loc_10D52
loc_10CC5:
cmp ecx, 27h ; '''
jz short loc_10CFA
cmp ecx, 2Ch ; ','
jz short loc_10D38
cmp ecx, 32h ; '2'
jnz short loc_10D52
cmp dword ptr [r15], 0
jnz short loc_10D50
cmp dword ptr [r12], 0
jmp short loc_10D33
loc_10CE1:
mov al, 1
jmp short loc_10D52
loc_10CE5:
mov ebx, [r12]
test ebx, ebx
jz short loc_10D52
mov edi, [r15]
call _ggml_get_type_traits_cpu
cmp ebx, [rax+10h]
jmp short loc_10D33
loc_10CFA:
cmp dword ptr [r15], 2
setb al
jmp short loc_10D52
loc_10D03:
mov edi, [r15]
test edi, edi
jz short loc_10D29
call _ggml_is_quantized
test al, al
jz short loc_10D50
mov rax, [r15+20h]
cmp rax, [r12+20h]
jnz short loc_10D50
mov rax, [r15+28h]
cmp rax, [r12+28h]
jnz short loc_10D50
loc_10D29:
cmp dword ptr [r12], 0
jnz short loc_10D50
cmp dword ptr [rbx], 0
loc_10D33:
setz al
jmp short loc_10D52
loc_10D38:
mov rax, [rbx+98h]
cmp dword ptr [rax], 0
jnz short loc_10D50
mov rax, [rbx+0A0h]
cmp dword ptr [rax], 0
jz short loc_10D63
loc_10D50:
xor eax, eax
loc_10D52:
and al, 1
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_10D63:
vxorps xmm0, xmm0, xmm0
vcmpeqss k0, xmm0, dword ptr [rbx+58h]
kmovd eax, k0
jmp short loc_10D52
| char ggml_backend_cpu_device_supports_op(long long a1, long long a2, __m128 _XMM0)
{
unsigned int *v4; // r15
int *v5; // r12
unsigned long long v6; // rcx
long long v8; // rdx
char *v9; // rbp
char *i; // r13
long long v11; // rdi
long long j; // r14
long long v13; // rax
long long v14; // rax
int v15; // ecx
bool v16; // zf
int v17; // ebx
long long v18; // rdi
v4 = *(unsigned int **)(a2 + 152);
v5 = *(int **)(a2 + 160);
v6 = *(unsigned int *)(a2 + 80);
if ( v6 < 0x26 )
{
LOBYTE(_EAX) = 1;
v8 = 0x3C00000001LL;
if ( _bittest64(&v8, v6) )
return _EAX & 1;
}
ggml_backend_cpu_get_extra_buffers_type();
v9 = (char *)*(&ggml_backend_cpu_get_extra_buffers_type(void)::bufts + 1);
for ( i = (char *)ggml_backend_cpu_get_extra_buffers_type(void)::bufts; i != v9; i += 8 )
{
if ( *(_QWORD *)i )
{
v11 = *(_QWORD *)(*(_QWORD *)i + 56LL);
if ( v11 )
{
if ( (*(unsigned __int8 ( **)(long long, long long, long long))(*(_QWORD *)v11 + 16LL))(v11, a1, a2) )
{
LOBYTE(_EAX) = 1;
return _EAX & 1;
}
}
}
}
for ( j = 19LL; j != 29; ++j )
{
v13 = *(_QWORD *)(a2 + 8 * j);
if ( v13 )
{
v14 = *(_QWORD *)(v13 + 8);
if ( v14 )
{
if ( !(unsigned __int8)ggml_backend_buft_is_host(*(_QWORD *)(v14 + 72)) )
goto LABEL_38;
}
}
}
v15 = *(_DWORD *)(a2 + 80);
LOBYTE(_EAX) = 1;
if ( v15 > 38 )
{
switch ( v15 )
{
case '\'':
LOBYTE(_EAX) = *v4 < 2;
return _EAX & 1;
case ',':
if ( !**(_DWORD **)(a2 + 152) && !**(_DWORD **)(a2 + 160) )
{
__asm
{
vxorps xmm0, xmm0, xmm0
vcmpeqss k0, xmm0, dword ptr [rbx+58h]
kmovd eax, k0
}
return _EAX & 1;
}
break;
case '2':
if ( !*v4 )
{
v16 = *v5 == 0;
LABEL_35:
LOBYTE(_EAX) = v16;
return _EAX & 1;
}
break;
default:
return _EAX & 1;
}
LABEL_38:
LOBYTE(_EAX) = 0;
return _EAX & 1;
}
if ( v15 == 27 )
{
if ( !*v5 )
return _EAX & 1;
v17 = *v5;
v16 = v17 == *((_DWORD *)ggml_get_type_traits_cpu(*v4) + 4);
goto LABEL_35;
}
if ( v15 == 29 )
{
v18 = *v4;
if ( (!(_DWORD)v18
|| (unsigned __int8)ggml_is_quantized(v18)
&& *((_QWORD *)v4 + 4) == *((_QWORD *)v5 + 4)
&& *((_QWORD *)v4 + 5) == *((_QWORD *)v5 + 5))
&& !*v5 )
{
v16 = *(_DWORD *)a2 == 0;
goto LABEL_35;
}
goto LABEL_38;
}
if ( v15 == 32 && *(_DWORD *)a2 < 0x1Eu )
_EAX = 0x1F90FFFFu >> *(_DWORD *)a2;
return _EAX & 1;
}
| ggml_backend_cpu_device_supports_op:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOV R15,qword ptr [RSI + 0x98]
MOV R12,qword ptr [RSI + 0xa0]
MOV ECX,dword ptr [RSI + 0x50]
CMP RCX,0x26
JNC 0x00110c18
MOV AL,0x1
MOV RDX,0x3c00000001
BT RDX,RCX
JC 0x00110d52
LAB_00110c18:
CALL 0x0010a1c0
MOV R13,qword ptr [0x0015fa90]
MOV RBP,qword ptr [0x0015fa98]
LAB_00110c2b:
CMP R13,RBP
JZ 0x00110c5c
MOV RAX,qword ptr [R13]
TEST RAX,RAX
JZ 0x00110c56
MOV RDI,qword ptr [RAX + 0x38]
TEST RDI,RDI
JZ 0x00110c56
MOV RAX,qword ptr [RDI]
MOV RSI,R14
MOV RDX,RBX
CALL qword ptr [RAX + 0x10]
TEST AL,AL
JNZ 0x00110ce1
LAB_00110c56:
ADD R13,0x8
JMP 0x00110c2b
LAB_00110c5c:
MOV R14D,0x13
LAB_00110c62:
MOV RAX,qword ptr [RBX + R14*0x8]
TEST RAX,RAX
JZ 0x00110c85
MOV RAX,qword ptr [RAX + 0x8]
TEST RAX,RAX
JZ 0x00110c85
MOV RDI,qword ptr [RAX + 0x48]
CALL 0x0010a980
TEST AL,AL
JZ 0x00110d50
LAB_00110c85:
INC R14
CMP R14,0x1d
JNZ 0x00110c62
MOV ECX,dword ptr [RBX + 0x50]
MOV AL,0x1
CMP ECX,0x26
JG 0x00110cc5
CMP ECX,0x1b
JZ 0x00110ce5
CMP ECX,0x1d
JZ 0x00110d03
CMP ECX,0x20
JNZ 0x00110d52
MOV ECX,dword ptr [RBX]
CMP ECX,0x1e
JNC 0x00110d52
MOV EAX,0x1f90ffff
SHRX EAX,EAX,ECX
JMP 0x00110d52
LAB_00110cc5:
CMP ECX,0x27
JZ 0x00110cfa
CMP ECX,0x2c
JZ 0x00110d38
CMP ECX,0x32
JNZ 0x00110d52
CMP dword ptr [R15],0x0
JNZ 0x00110d50
CMP dword ptr [R12],0x0
JMP 0x00110d33
LAB_00110ce1:
MOV AL,0x1
JMP 0x00110d52
LAB_00110ce5:
MOV EBX,dword ptr [R12]
TEST EBX,EBX
JZ 0x00110d52
MOV EDI,dword ptr [R15]
CALL 0x0010a120
CMP EBX,dword ptr [RAX + 0x10]
JMP 0x00110d33
LAB_00110cfa:
CMP dword ptr [R15],0x2
SETC AL
JMP 0x00110d52
LAB_00110d03:
MOV EDI,dword ptr [R15]
TEST EDI,EDI
JZ 0x00110d29
CALL 0x0010a4d0
TEST AL,AL
JZ 0x00110d50
MOV RAX,qword ptr [R15 + 0x20]
CMP RAX,qword ptr [R12 + 0x20]
JNZ 0x00110d50
MOV RAX,qword ptr [R15 + 0x28]
CMP RAX,qword ptr [R12 + 0x28]
JNZ 0x00110d50
LAB_00110d29:
CMP dword ptr [R12],0x0
JNZ 0x00110d50
CMP dword ptr [RBX],0x0
LAB_00110d33:
SETZ AL
JMP 0x00110d52
LAB_00110d38:
MOV RAX,qword ptr [RBX + 0x98]
CMP dword ptr [RAX],0x0
JNZ 0x00110d50
MOV RAX,qword ptr [RBX + 0xa0]
CMP dword ptr [RAX],0x0
JZ 0x00110d63
LAB_00110d50:
XOR EAX,EAX
LAB_00110d52:
AND AL,0x1
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00110d63:
VXORPS XMM0,XMM0,XMM0
VCMPEQSS K0 {K0},XMM0,dword ptr [RBX + 0x58]
KMOVD EAX,K0
JMP 0x00110d52
|
/* ggml_backend_cpu_device_supports_op(ggml_backend_device*, ggml_tensor const*) */
ulong ggml_backend_cpu_device_supports_op(ggml_backend_device *param_1,ggml_tensor *param_2)
{
int iVar1;
uint *puVar2;
int *piVar3;
long *plVar4;
long *plVar5;
char cVar6;
int8 in_RAX;
int8 uVar7;
long lVar8;
int7 uVar10;
ulong uVar9;
long *plVar11;
long lVar12;
bool bVar13;
int8 in_K0;
puVar2 = *(uint **)(param_2 + 0x98);
piVar3 = *(int **)(param_2 + 0xa0);
if (((ulong)*(uint *)(param_2 + 0x50) < 0x26) &&
(uVar9 = CONCAT71((int7)((ulong)in_RAX >> 8),1),
(0x3c00000001U >> ((ulong)*(uint *)(param_2 + 0x50) & 0x3f) & 1) != 0)) goto LAB_00110d52;
ggml_backend_cpu_get_extra_buffers_type();
plVar5 = DAT_0015fa98;
for (plVar11 = ggml_backend_cpu_get_extra_buffers_type()::bufts; plVar11 != plVar5;
plVar11 = plVar11 + 1) {
if ((*plVar11 != 0) && (plVar4 = *(long **)(*plVar11 + 0x38), plVar4 != (long *)0x0)) {
uVar7 = (**(code **)(*plVar4 + 0x10))(plVar4,param_1,param_2);
if ((char)uVar7 != '\0') {
uVar9 = CONCAT71((int7)((ulong)uVar7 >> 8),1);
goto LAB_00110d52;
}
}
}
lVar12 = 0x13;
do {
lVar8 = *(long *)(param_2 + lVar12 * 8);
if ((lVar8 != 0) && (lVar8 = *(long *)(lVar8 + 8), lVar8 != 0)) {
lVar8 = ggml_backend_buft_is_host(*(int8 *)(lVar8 + 0x48));
if ((char)lVar8 == '\0') goto LAB_00110d50;
}
lVar12 = lVar12 + 1;
} while (lVar12 != 0x1d);
iVar1 = *(int *)(param_2 + 0x50);
uVar10 = (int7)((ulong)lVar8 >> 8);
uVar9 = CONCAT71(uVar10,1);
if (iVar1 < 0x27) {
if (iVar1 == 0x1b) {
iVar1 = *piVar3;
if (iVar1 == 0) goto LAB_00110d52;
uVar9 = ggml_get_type_traits_cpu(*puVar2);
bVar13 = iVar1 == *(int *)(uVar9 + 0x10);
}
else {
if (iVar1 != 0x1d) {
if ((iVar1 == 0x20) && (*(uint *)param_2 < 0x1e)) {
uVar9 = (ulong)(0x1f90ffff >> (*(uint *)param_2 & 0x1f));
}
goto LAB_00110d52;
}
if (*puVar2 != 0) {
cVar6 = ggml_is_quantized();
if (((cVar6 == '\0') || (*(long *)(puVar2 + 8) != *(long *)(piVar3 + 8))) ||
(uVar9 = *(ulong *)(puVar2 + 10), uVar9 != *(ulong *)(piVar3 + 10))) goto LAB_00110d50;
}
if (*piVar3 != 0) goto LAB_00110d50;
bVar13 = *(int *)param_2 == 0;
}
LAB_00110d33:
uVar9 = CONCAT71((int7)(uVar9 >> 8),bVar13);
}
else {
if (iVar1 == 0x27) {
uVar9 = CONCAT71(uVar10,*puVar2 < 2);
goto LAB_00110d52;
}
if (iVar1 == 0x2c) {
if ((**(int **)(param_2 + 0x98) == 0) && (**(int **)(param_2 + 0xa0) == 0)) {
uVar7 = vcmpss_avx512f(ZEXT816(0) << 0x40,ZEXT416(*(uint *)(param_2 + 0x58)),0);
uVar9 = CONCAT44((int)((ulong)*(int **)(param_2 + 0xa0) >> 0x20),
(uint)((byte)in_K0 & 1) & (uint)uVar7);
goto LAB_00110d52;
}
}
else {
if (iVar1 != 0x32) goto LAB_00110d52;
if (*puVar2 == 0) {
bVar13 = *piVar3 == 0;
goto LAB_00110d33;
}
}
LAB_00110d50:
uVar9 = 0;
}
LAB_00110d52:
return uVar9 & 0xffffffffffffff01;
}
| |
33,504 | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int) | monkey531[P]llama/common/json.hpp | inline cached_power get_cached_power_for_binary_exponent(int e)
{
// Now
//
// alpha <= e_c + e + q <= gamma (1)
// ==> f_c * 2^alpha <= c * 2^e * 2^q
//
// and since the c's are normalized, 2^(q-1) <= f_c,
//
// ==> 2^(q - 1 + alpha) <= c * 2^(e + q)
// ==> 2^(alpha - e - 1) <= c
//
// If c were an exact power of ten, i.e. c = 10^k, one may determine k as
//
// k = ceil( log_10( 2^(alpha - e - 1) ) )
// = ceil( (alpha - e - 1) * log_10(2) )
//
// From the paper:
// "In theory the result of the procedure could be wrong since c is rounded,
// and the computation itself is approximated [...]. In practice, however,
// this simple function is sufficient."
//
// For IEEE double precision floating-point numbers converted into
// normalized diyfp's w = f * 2^e, with q = 64,
//
// e >= -1022 (min IEEE exponent)
// -52 (p - 1)
// -52 (p - 1, possibly normalize denormal IEEE numbers)
// -11 (normalize the diyfp)
// = -1137
//
// and
//
// e <= +1023 (max IEEE exponent)
// -52 (p - 1)
// -11 (normalize the diyfp)
// = 960
//
// This binary exponent range [-1137,960] results in a decimal exponent
// range [-307,324]. One does not need to store a cached power for each
// k in this range. For each such k it suffices to find a cached power
// such that the exponent of the product lies in [alpha,gamma].
// This implies that the difference of the decimal exponents of adjacent
// table entries must be less than or equal to
//
// floor( (gamma - alpha) * log_10(2) ) = 8.
//
// (A smaller distance gamma-alpha would require a larger table.)
// NB:
// Actually this function returns c, such that -60 <= e_c + e + 64 <= -34.
constexpr int kCachedPowersMinDecExp = -300;
constexpr int kCachedPowersDecStep = 8;
static constexpr std::array<cached_power, 79> kCachedPowers =
{
{
{ 0xAB70FE17C79AC6CA, -1060, -300 },
{ 0xFF77B1FCBEBCDC4F, -1034, -292 },
{ 0xBE5691EF416BD60C, -1007, -284 },
{ 0x8DD01FAD907FFC3C, -980, -276 },
{ 0xD3515C2831559A83, -954, -268 },
{ 0x9D71AC8FADA6C9B5, -927, -260 },
{ 0xEA9C227723EE8BCB, -901, -252 },
{ 0xAECC49914078536D, -874, -244 },
{ 0x823C12795DB6CE57, -847, -236 },
{ 0xC21094364DFB5637, -821, -228 },
{ 0x9096EA6F3848984F, -794, -220 },
{ 0xD77485CB25823AC7, -768, -212 },
{ 0xA086CFCD97BF97F4, -741, -204 },
{ 0xEF340A98172AACE5, -715, -196 },
{ 0xB23867FB2A35B28E, -688, -188 },
{ 0x84C8D4DFD2C63F3B, -661, -180 },
{ 0xC5DD44271AD3CDBA, -635, -172 },
{ 0x936B9FCEBB25C996, -608, -164 },
{ 0xDBAC6C247D62A584, -582, -156 },
{ 0xA3AB66580D5FDAF6, -555, -148 },
{ 0xF3E2F893DEC3F126, -529, -140 },
{ 0xB5B5ADA8AAFF80B8, -502, -132 },
{ 0x87625F056C7C4A8B, -475, -124 },
{ 0xC9BCFF6034C13053, -449, -116 },
{ 0x964E858C91BA2655, -422, -108 },
{ 0xDFF9772470297EBD, -396, -100 },
{ 0xA6DFBD9FB8E5B88F, -369, -92 },
{ 0xF8A95FCF88747D94, -343, -84 },
{ 0xB94470938FA89BCF, -316, -76 },
{ 0x8A08F0F8BF0F156B, -289, -68 },
{ 0xCDB02555653131B6, -263, -60 },
{ 0x993FE2C6D07B7FAC, -236, -52 },
{ 0xE45C10C42A2B3B06, -210, -44 },
{ 0xAA242499697392D3, -183, -36 },
{ 0xFD87B5F28300CA0E, -157, -28 },
{ 0xBCE5086492111AEB, -130, -20 },
{ 0x8CBCCC096F5088CC, -103, -12 },
{ 0xD1B71758E219652C, -77, -4 },
{ 0x9C40000000000000, -50, 4 },
{ 0xE8D4A51000000000, -24, 12 },
{ 0xAD78EBC5AC620000, 3, 20 },
{ 0x813F3978F8940984, 30, 28 },
{ 0xC097CE7BC90715B3, 56, 36 },
{ 0x8F7E32CE7BEA5C70, 83, 44 },
{ 0xD5D238A4ABE98068, 109, 52 },
{ 0x9F4F2726179A2245, 136, 60 },
{ 0xED63A231D4C4FB27, 162, 68 },
{ 0xB0DE65388CC8ADA8, 189, 76 },
{ 0x83C7088E1AAB65DB, 216, 84 },
{ 0xC45D1DF942711D9A, 242, 92 },
{ 0x924D692CA61BE758, 269, 100 },
{ 0xDA01EE641A708DEA, 295, 108 },
{ 0xA26DA3999AEF774A, 322, 116 },
{ 0xF209787BB47D6B85, 348, 124 },
{ 0xB454E4A179DD1877, 375, 132 },
{ 0x865B86925B9BC5C2, 402, 140 },
{ 0xC83553C5C8965D3D, 428, 148 },
{ 0x952AB45CFA97A0B3, 455, 156 },
{ 0xDE469FBD99A05FE3, 481, 164 },
{ 0xA59BC234DB398C25, 508, 172 },
{ 0xF6C69A72A3989F5C, 534, 180 },
{ 0xB7DCBF5354E9BECE, 561, 188 },
{ 0x88FCF317F22241E2, 588, 196 },
{ 0xCC20CE9BD35C78A5, 614, 204 },
{ 0x98165AF37B2153DF, 641, 212 },
{ 0xE2A0B5DC971F303A, 667, 220 },
{ 0xA8D9D1535CE3B396, 694, 228 },
{ 0xFB9B7CD9A4A7443C, 720, 236 },
{ 0xBB764C4CA7A44410, 747, 244 },
{ 0x8BAB8EEFB6409C1A, 774, 252 },
{ 0xD01FEF10A657842C, 800, 260 },
{ 0x9B10A4E5E9913129, 827, 268 },
{ 0xE7109BFBA19C0C9D, 853, 276 },
{ 0xAC2820D9623BF429, 880, 284 },
{ 0x80444B5E7AA7CF85, 907, 292 },
{ 0xBF21E44003ACDD2D, 933, 300 },
{ 0x8E679C2F5E44FF8F, 960, 308 },
{ 0xD433179D9C8CB841, 986, 316 },
{ 0x9E19DB92B4E31BA9, 1013, 324 },
}
};
// This computation gives exactly the same results for k as
// k = ceil((kAlpha - e - 1) * 0.30102999566398114)
// for |e| <= 1500, but doesn't require floating-point operations.
// NB: log_10(2) ~= 78913 / 2^18
JSON_ASSERT(e >= -1500);
JSON_ASSERT(e <= 1500);
const int f = kAlpha - e - 1;
const int k = (f * 78913) / (1 << 18) + static_cast<int>(f > 0);
const int index = (-kCachedPowersMinDecExp + k + (kCachedPowersDecStep - 1)) / kCachedPowersDecStep;
JSON_ASSERT(index >= 0);
JSON_ASSERT(static_cast<std::size_t>(index) < kCachedPowers.size());
const cached_power cached = kCachedPowers[static_cast<std::size_t>(index)];
JSON_ASSERT(kAlpha <= cached.e + e + 64);
JSON_ASSERT(kGamma >= cached.e + e + 64);
return cached;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int):
pushq %rax
cmpl $0xfffffa23, %edi # imm = 0xFFFFFA23
jle 0x7b774
cmpl $0x5dd, %edi # imm = 0x5DD
jge 0x7b793
xorl %eax, %eax
movl %edi, %ecx
subl $-0x3d, %ecx
setl %al
negl %ecx
imull $0x13441, %ecx, %ecx # imm = 0x13441
leal 0x3ffff(%rcx), %edx
testl %ecx, %ecx
cmovnsl %ecx, %edx
sarl $0x12, %edx
addl %edx, %eax
cmpl $0xfffffec5, %eax # imm = 0xFFFFFEC5
jle 0x7b7af
leal 0x133(%rax), %ecx
addl $0x13a, %eax # imm = 0x13A
testw %cx, %cx
cmovnsl %ecx, %eax
cwtl
shrl $0x3, %eax
cmpw $0x4f, %ax
jae 0x7b7cb
movzwl %ax, %eax
shll $0x4, %eax
leaq 0x340f3(%rip), %rcx # 0xaf848
movq 0x8(%rcx,%rax), %rdx
addl %edx, %edi
cmpl $-0x7d, %edi
jle 0x7b7e7
cmpl $-0x5f, %edi
jge 0x7b803
movq (%rcx,%rax), %rax
popq %rcx
retq
leaq 0x2e68c(%rip), %rdi # 0xa9e07
leaq 0x2bb0a(%rip), %rdx # 0xa728c
leaq 0x3132f(%rip), %rcx # 0xacab8
movl $0x43e4, %esi # imm = 0x43E4
jmp 0x7b81d
leaq 0x2e66d(%rip), %rdi # 0xa9e07
leaq 0x2baeb(%rip), %rdx # 0xa728c
leaq 0x3131b(%rip), %rcx # 0xacac3
movl $0x43e5, %esi # imm = 0x43E5
jmp 0x7b81d
leaq 0x2e651(%rip), %rdi # 0xa9e07
leaq 0x2bacf(%rip), %rdx # 0xa728c
leaq 0x31309(%rip), %rcx # 0xacacd
movl $0x43ea, %esi # imm = 0x43EA
jmp 0x7b81d
leaq 0x2e635(%rip), %rdi # 0xa9e07
leaq 0x2bab3(%rip), %rdx # 0xa728c
leaq 0x312f8(%rip), %rcx # 0xacad8
movl $0x43eb, %esi # imm = 0x43EB
jmp 0x7b81d
leaq 0x2e619(%rip), %rdi # 0xa9e07
leaq 0x2ba97(%rip), %rdx # 0xa728c
leaq 0x31313(%rip), %rcx # 0xacb0f
movl $0x43ee, %esi # imm = 0x43EE
jmp 0x7b81d
leaq 0x2e5fd(%rip), %rdi # 0xa9e07
leaq 0x2ba7b(%rip), %rdx # 0xa728c
leaq 0x31313(%rip), %rcx # 0xacb2b
movl $0x43ef, %esi # imm = 0x43EF
xorl %eax, %eax
callq 0x18ad0
| _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl36get_cached_power_for_binary_exponentEi:
push rax
cmp edi, 0FFFFFA23h
jle loc_7B774
cmp edi, 5DDh
jge loc_7B793
xor eax, eax
mov ecx, edi
sub ecx, 0FFFFFFC3h
setl al
neg ecx
imul ecx, 13441h
lea edx, [rcx+3FFFFh]
test ecx, ecx
cmovns edx, ecx
sar edx, 12h
add eax, edx
cmp eax, 0FFFFFEC5h
jle loc_7B7AF
lea ecx, [rax+133h]
add eax, 13Ah
test cx, cx
cmovns eax, ecx
cwde
shr eax, 3
cmp ax, 4Fh ; 'O'
jnb loc_7B7CB
movzx eax, ax
shl eax, 4
lea rcx, _ZZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl36get_cached_power_for_binary_exponentEiE13kCachedPowers; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)::kCachedPowers
mov rdx, [rcx+rax+8]
add edi, edx
cmp edi, 0FFFFFF83h
jle loc_7B7E7
cmp edi, 0FFFFFFA1h
jge loc_7B803
mov rax, [rcx+rax]
pop rcx
retn
loc_7B774:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aE1500; "e >= -1500"
mov esi, 43E4h
jmp loc_7B81D
loc_7B793:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aE1500_0; "e <= 1500"
mov esi, 43E5h
jmp short loc_7B81D
loc_7B7AF:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aIndex0; "index >= 0"
mov esi, 43EAh
jmp short loc_7B81D
loc_7B7CB:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aStaticCastStdS; "static_cast<std::size_t>(index) < kCach"...
mov esi, 43EBh
jmp short loc_7B81D
loc_7B7E7:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKalphaCachedEE; "kAlpha <= cached.e + e + 64"
mov esi, 43EEh
jmp short loc_7B81D
loc_7B803:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKgammaCachedEE; "kGamma >= cached.e + e + 64"
mov esi, 43EFh
loc_7B81D:
xor eax, eax
call _ggml_abort
| long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(
nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this)
{
int v1; // eax
__int16 v2; // cx
__int16 v3; // ax
unsigned int v4; // eax
long long v5; // rax
int v6; // edi
long long v8; // rsi
if ( (int)this <= -1501 )
{
v8 = 17380LL;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17380LL,
"GGML_ASSERT(%s) failed",
"e >= -1500");
}
else if ( (int)this >= 1501 )
{
v8 = 17381LL;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17381LL,
"GGML_ASSERT(%s) failed",
"e <= 1500");
}
else
{
v1 = -78913 * ((int)this + 61) / 0x40000 + ((int)this < -61);
if ( v1 <= -315 )
{
v8 = 17386LL;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17386LL,
"GGML_ASSERT(%s) failed",
"index >= 0");
}
else
{
v2 = v1 + 307;
v3 = v1 + 314;
if ( v2 >= 0 )
v3 = v2;
v4 = (unsigned int)v3 >> 3;
if ( (unsigned __int16)v4 >= 0x4Fu )
{
v8 = 17387LL;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17387LL,
"GGML_ASSERT(%s) failed",
"static_cast<std::size_t>(index) < kCachedPowers.size()");
}
else
{
v5 = 16 * (unsigned int)(unsigned __int16)v4;
v6 = *(_QWORD *)((char *)&nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)::kCachedPowers
+ v5
+ 8)
+ (_DWORD)this;
if ( v6 <= -125 )
{
v8 = 17390LL;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17390LL,
"GGML_ASSERT(%s) failed",
"kAlpha <= cached.e + e + 64");
}
else
{
if ( v6 < -95 )
return *(_QWORD *)((char *)&nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)::kCachedPowers
+ v5);
v8 = 17391LL;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17391LL,
"GGML_ASSERT(%s) failed",
"kGamma >= cached.e + e + 64");
}
}
}
}
return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
v8);
}
| get_cached_power_for_binary_exponent:
PUSH RAX
CMP EDI,0xfffffa23
JLE 0x0017b774
CMP EDI,0x5dd
JGE 0x0017b793
XOR EAX,EAX
MOV ECX,EDI
SUB ECX,-0x3d
SETL AL
NEG ECX
IMUL ECX,ECX,0x13441
LEA EDX,[RCX + 0x3ffff]
TEST ECX,ECX
CMOVNS EDX,ECX
SAR EDX,0x12
ADD EAX,EDX
CMP EAX,0xfffffec5
JLE 0x0017b7af
LEA ECX,[RAX + 0x133]
ADD EAX,0x13a
TEST CX,CX
CMOVNS EAX,ECX
CWDE
SHR EAX,0x3
CMP AX,0x4f
JNC 0x0017b7cb
MOVZX EAX,AX
SHL EAX,0x4
LEA RCX,[0x1af848]
MOV RDX,qword ptr [RCX + RAX*0x1 + 0x8]
ADD EDI,EDX
CMP EDI,-0x7d
JLE 0x0017b7e7
CMP EDI,-0x5f
JGE 0x0017b803
MOV RAX,qword ptr [RCX + RAX*0x1]
POP RCX
RET
LAB_0017b774:
LEA RDI,[0x1a9e07]
LEA RDX,[0x1a728c]
LEA RCX,[0x1acab8]
MOV ESI,0x43e4
JMP 0x0017b81d
LAB_0017b793:
LEA RDI,[0x1a9e07]
LEA RDX,[0x1a728c]
LEA RCX,[0x1acac3]
MOV ESI,0x43e5
JMP 0x0017b81d
LAB_0017b7af:
LEA RDI,[0x1a9e07]
LEA RDX,[0x1a728c]
LEA RCX,[0x1acacd]
MOV ESI,0x43ea
JMP 0x0017b81d
LAB_0017b7cb:
LEA RDI,[0x1a9e07]
LEA RDX,[0x1a728c]
LEA RCX,[0x1acad8]
MOV ESI,0x43eb
JMP 0x0017b81d
LAB_0017b7e7:
LEA RDI,[0x1a9e07]
LEA RDX,[0x1a728c]
LEA RCX,[0x1acb0f]
MOV ESI,0x43ee
JMP 0x0017b81d
LAB_0017b803:
LEA RDI,[0x1a9e07]
LEA RDX,[0x1a728c]
LEA RCX,[0x1acb2b]
MOV ESI,0x43ef
LAB_0017b81d:
XOR EAX,EAX
CALL 0x00118ad0
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int) */
int8
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int param_1)
{
short sVar1;
int iVar2;
ulong uVar3;
short sVar4;
int iVar5;
char *pcVar6;
int8 uVar7;
if (param_1 < -0x5dc) {
pcVar6 = "e >= -1500";
uVar7 = 0x43e4;
}
else if (param_1 < 0x5dd) {
iVar5 = (param_1 + 0x3d) * -0x13441;
iVar2 = iVar5 + 0x3ffff;
if (-1 < iVar5) {
iVar2 = iVar5;
}
iVar2 = (uint)(param_1 < -0x3d) + (iVar2 >> 0x12);
if (iVar2 < -0x13a) {
pcVar6 = "index >= 0";
uVar7 = 0x43ea;
}
else {
sVar1 = (short)iVar2;
sVar4 = sVar1 + 0x133;
sVar1 = sVar1 + 0x13a;
if (-1 < sVar4) {
sVar1 = sVar4;
}
if ((ushort)((uint)(int)sVar1 >> 3) < 0x4f) {
uVar3 = (ulong)(((uint)(int)sVar1 >> 3 & 0xffff) << 4);
iVar2 = param_1 + (int)*(int8 *)
(get_cached_power_for_binary_exponent(int)::kCachedPowers +
uVar3 + 8);
if (iVar2 < -0x7c) {
pcVar6 = "kAlpha <= cached.e + e + 64";
uVar7 = 0x43ee;
}
else {
if (iVar2 < -0x5f) {
return *(int8 *)(get_cached_power_for_binary_exponent(int)::kCachedPowers + uVar3)
;
}
pcVar6 = "kGamma >= cached.e + e + 64";
uVar7 = 0x43ef;
}
}
else {
pcVar6 = "static_cast<std::size_t>(index) < kCachedPowers.size()";
uVar7 = 0x43eb;
}
}
}
else {
pcVar6 = "e <= 1500";
uVar7 = 0x43e5;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar7,
"GGML_ASSERT(%s) failed",pcVar6);
}
| |
33,505 | list_builtin_chat_templates[abi:cxx11]() | monkey531[P]llama/common/arg.cpp | static std::string list_builtin_chat_templates() {
std::vector<const char *> supported_tmpl;
int32_t res = llama_chat_builtin_templates(nullptr, 0);
supported_tmpl.resize(res);
res = llama_chat_builtin_templates(supported_tmpl.data(), supported_tmpl.size());
std::ostringstream msg;
for (auto & tmpl : supported_tmpl) {
msg << tmpl << (&tmpl == &supported_tmpl.back() ? "" : ", ");
}
return msg.str();
} | O0 | cpp | list_builtin_chat_templates[abi:cxx11]():
subq $0x218, %rsp # imm = 0x218
movq %rdi, 0x30(%rsp)
movq %rdi, %rax
movq %rax, 0x38(%rsp)
movq %rdi, 0x210(%rsp)
leaq 0x1f8(%rsp), %rdi
callq 0xeaab0
xorl %eax, %eax
movl %eax, %esi
movq %rsi, %rdi
callq 0x5ad70
movl %eax, 0x44(%rsp)
jmp 0x81c4b
movl 0x44(%rsp), %eax
movl %eax, 0x1f4(%rsp)
movslq 0x1f4(%rsp), %rsi
leaq 0x1f8(%rsp), %rdi
callq 0xeaac0
jmp 0x81c6d
leaq 0x1f8(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0xeab60
movq 0x18(%rsp), %rdi
movq %rax, 0x20(%rsp)
callq 0x8ae40
movq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x5ad70
movl %eax, 0x2c(%rsp)
jmp 0x81ca1
movl 0x2c(%rsp), %eax
movl %eax, 0x1f4(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x5b0c0
jmp 0x81cb8
leaq 0x1f8(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rdi
callq 0x8ad60
movq %rax, 0x58(%rsp)
movq 0x60(%rsp), %rdi
callq 0x8ad90
movq %rax, 0x50(%rsp)
leaq 0x58(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x8adc0
testb $0x1, %al
jne 0x81cfb
jmp 0x81daa
leaq 0x58(%rsp), %rdi
callq 0x8ae00
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq (%rax), %rsi
leaq 0x68(%rsp), %rdi
callq 0x5aa50
movq %rax, 0x10(%rsp)
jmp 0x81d23
movq 0x48(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x1f8(%rsp), %rdi
callq 0x8aea0
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movq 0x8(%rsp), %rax
subq %rcx, %rax
leaq 0x18b4f0(%rip), %rax # 0x20d241
leaq 0x18f2d2(%rip), %rsi # 0x21102a
cmoveq %rax, %rsi
callq 0x5aa50
jmp 0x81d63
jmp 0x81d65
leaq 0x58(%rsp), %rdi
callq 0x8aee0
jmp 0x81ce3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e8(%rsp)
movl %eax, 0x1e4(%rsp)
jmp 0x81ddf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1e8(%rsp)
movl %eax, 0x1e4(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x5afe0
jmp 0x81ddf
movq 0x30(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x5b450
jmp 0x81dbb
leaq 0x68(%rsp), %rdi
callq 0x5afe0
leaq 0x1f8(%rsp), %rdi
callq 0x9ccc0
movq 0x38(%rsp), %rax
addq $0x218, %rsp # imm = 0x218
retq
leaq 0x1f8(%rsp), %rdi
callq 0x9ccc0
movq 0x1e8(%rsp), %rdi
callq 0x5abf0
nopl (%rax)
| _ZL27list_builtin_chat_templatesB5cxx11v:
sub rsp, 218h
mov [rsp+218h+var_1E8], rdi
mov rax, rdi
mov [rsp+218h+var_1E0], rax
mov [rsp+218h+var_8], rdi
lea rdi, [rsp+218h+var_20]
call _ZNSt6vectorIPKcSaIS1_EEC2Ev; std::vector<char const*>::vector(void)
xor eax, eax
mov esi, eax
mov rdi, rsi
call _llama_chat_builtin_templates
mov [rsp+218h+var_1D4], eax
jmp short $+2
loc_81C4B:
mov eax, [rsp+218h+var_1D4]
mov [rsp+218h+var_24], eax
movsxd rsi, [rsp+218h+var_24]
lea rdi, [rsp+218h+var_20]
call _ZNSt6vectorIPKcSaIS1_EE6resizeEm; std::vector<char const*>::resize(ulong)
jmp short $+2
loc_81C6D:
lea rdi, [rsp+218h+var_20]
mov [rsp+218h+var_200], rdi
call _ZNSt6vectorIPKcSaIS1_EE4dataEv; std::vector<char const*>::data(void)
mov rdi, [rsp+218h+var_200]
mov [rsp+218h+var_1F8], rax
call _ZNKSt6vectorIPKcSaIS1_EE4sizeEv; std::vector<char const*>::size(void)
mov rdi, [rsp+218h+var_1F8]
mov rsi, rax
call _llama_chat_builtin_templates
mov [rsp+218h+var_1EC], eax
jmp short $+2
loc_81CA1:
mov eax, [rsp+218h+var_1EC]
mov [rsp+218h+var_24], eax
lea rdi, [rsp+218h+var_1B0]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
jmp short $+2
loc_81CB8:
lea rax, [rsp+218h+var_20]
mov [rsp+218h+var_1B8], rax
mov rdi, [rsp+218h+var_1B8]
call _ZNSt6vectorIPKcSaIS1_EE5beginEv; std::vector<char const*>::begin(void)
mov [rsp+218h+var_1C0], rax
mov rdi, [rsp+218h+var_1B8]
call _ZNSt6vectorIPKcSaIS1_EE3endEv; std::vector<char const*>::end(void)
mov [rsp+218h+var_1C8], rax
loc_81CE3:
lea rdi, [rsp+218h+var_1C0]
lea rsi, [rsp+218h+var_1C8]
call _ZN9__gnu_cxxneIPPKcSt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_; __gnu_cxx::operator!=<char const**,std::vector<char const*>>(__gnu_cxx::__normal_iterator<char const**,std::vector<char const*>> const&,__gnu_cxx::__normal_iterator<char const**,std::vector<char const*>> const&)
test al, 1
jnz short loc_81CFB
jmp loc_81DAA
loc_81CFB:
lea rdi, [rsp+218h+var_1C0]
call _ZNK9__gnu_cxx17__normal_iteratorIPPKcSt6vectorIS2_SaIS2_EEEdeEv; __gnu_cxx::__normal_iterator<char const**,std::vector<char const*>>::operator*(void)
mov [rsp+218h+var_1D0], rax
mov rax, [rsp+218h+var_1D0]
mov rsi, [rax]
lea rdi, [rsp+218h+var_1B0]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+218h+var_208], rax
jmp short $+2
loc_81D23:
mov rax, [rsp+218h+var_1D0]
mov [rsp+218h+var_210], rax
lea rdi, [rsp+218h+var_20]
call _ZNSt6vectorIPKcSaIS1_EE4backEv; std::vector<char const*>::back(void)
mov rdi, [rsp+218h+var_208]
mov rcx, rax
mov rax, [rsp+218h+var_210]
sub rax, rcx
lea rax, aExampleSpecifi+27h; ""
lea rsi, aZuD+6; ", "
cmovz rsi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_81D63:
jmp short $+2
loc_81D65:
lea rdi, [rsp+218h+var_1C0]
call _ZN9__gnu_cxx17__normal_iteratorIPPKcSt6vectorIS2_SaIS2_EEEppEv; __gnu_cxx::__normal_iterator<char const**,std::vector<char const*>>::operator++(void)
jmp loc_81CE3
mov rcx, rax
mov eax, edx
mov [rsp+arg_1E0], rcx
mov [rsp+arg_1DC], eax
jmp short loc_81DDF
mov rcx, rax
mov eax, edx
mov [rsp+arg_1E0], rcx
mov [rsp+arg_1DC], eax
lea rdi, [rsp+arg_60]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream()
jmp short loc_81DDF
loc_81DAA:
mov rdi, [rsp+218h+var_1E8]
lea rsi, [rsp+218h+var_1B0]
call __ZNKSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEE3strEv; std::ostringstream::str(void)
jmp short $+2
loc_81DBB:
lea rdi, [rsp+218h+var_1B0]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+218h+var_20]; void *
call _ZNSt6vectorIPKcSaIS1_EED2Ev; std::vector<char const*>::~vector()
mov rax, [rsp+218h+var_1E0]
add rsp, 218h
retn
loc_81DDF:
lea rdi, [rsp+arg_1F0]; void *
call _ZNSt6vectorIPKcSaIS1_EED2Ev; std::vector<char const*>::~vector()
mov rdi, [rsp+arg_1E0]
call __Unwind_Resume
| long long list_builtin_chat_templates[abi:cxx11](long long a1)
{
long long v1; // rdi
char *v2; // rsi
long long v4; // [rsp+20h] [rbp-1F8h]
int v7; // [rsp+44h] [rbp-1D4h]
_QWORD *v8; // [rsp+48h] [rbp-1D0h]
long long v9; // [rsp+50h] [rbp-1C8h] BYREF
_QWORD v10[2]; // [rsp+58h] [rbp-1C0h] BYREF
_BYTE v11[396]; // [rsp+68h] [rbp-1B0h] BYREF
int v12; // [rsp+1F4h] [rbp-24h]
_BYTE v13[24]; // [rsp+1F8h] [rbp-20h] BYREF
long long v14; // [rsp+210h] [rbp-8h]
v14 = a1;
std::vector<char const*>::vector(v13);
v7 = llama_chat_builtin_templates(0LL);
std::vector<char const*>::resize(v13, v7);
v4 = std::vector<char const*>::data();
std::vector<char const*>::size(v13);
v12 = llama_chat_builtin_templates(v4);
std::ostringstream::basic_ostringstream(v11);
v10[1] = v13;
v10[0] = std::vector<char const*>::begin(v13);
v9 = std::vector<char const*>::end(v13);
while ( (__gnu_cxx::operator!=<char const**,std::vector<char const*>>(v10, &v9) & 1) != 0 )
{
v8 = (_QWORD *)__gnu_cxx::__normal_iterator<char const**,std::vector<char const*>>::operator*(v10);
v1 = std::operator<<<std::char_traits<char>>(v11, *v8);
v2 = ", ";
if ( v8 == (_QWORD *)std::vector<char const*>::back(v13) )
v2 = "";
std::operator<<<std::char_traits<char>>(v1, v2);
__gnu_cxx::__normal_iterator<char const**,std::vector<char const*>>::operator++(v10);
}
std::ostringstream::str(a1, v11);
std::ostringstream::~ostringstream(v11);
std::vector<char const*>::~vector(v13);
return a1;
}
| list_builtin_chat_templates[abi:cxx11]:
SUB RSP,0x218
MOV qword ptr [RSP + 0x30],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x210],RDI
LEA RDI,[RSP + 0x1f8]
CALL 0x001eaab0
LAB_00181c39:
XOR EAX,EAX
MOV ESI,EAX
MOV RDI,RSI
CALL 0x0015ad70
MOV dword ptr [RSP + 0x44],EAX
JMP 0x00181c4b
LAB_00181c4b:
MOV EAX,dword ptr [RSP + 0x44]
MOV dword ptr [RSP + 0x1f4],EAX
MOVSXD RSI,dword ptr [RSP + 0x1f4]
LEA RDI,[RSP + 0x1f8]
CALL 0x001eaac0
JMP 0x00181c6d
LAB_00181c6d:
LEA RDI,[RSP + 0x1f8]
MOV qword ptr [RSP + 0x18],RDI
CALL 0x001eab60
MOV RDI,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x20],RAX
CALL 0x0018ae40
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,RAX
CALL 0x0015ad70
MOV dword ptr [RSP + 0x2c],EAX
JMP 0x00181ca1
LAB_00181ca1:
MOV EAX,dword ptr [RSP + 0x2c]
MOV dword ptr [RSP + 0x1f4],EAX
LEA RDI,[RSP + 0x68]
CALL 0x0015b0c0
JMP 0x00181cb8
LAB_00181cb8:
LEA RAX,[RSP + 0x1f8]
MOV qword ptr [RSP + 0x60],RAX
MOV RDI,qword ptr [RSP + 0x60]
CALL 0x0018ad60
MOV qword ptr [RSP + 0x58],RAX
MOV RDI,qword ptr [RSP + 0x60]
CALL 0x0018ad90
MOV qword ptr [RSP + 0x50],RAX
LAB_00181ce3:
LEA RDI,[RSP + 0x58]
LEA RSI,[RSP + 0x50]
CALL 0x0018adc0
TEST AL,0x1
JNZ 0x00181cfb
JMP 0x00181daa
LAB_00181cfb:
LEA RDI,[RSP + 0x58]
CALL 0x0018ae00
MOV qword ptr [RSP + 0x48],RAX
MOV RAX,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RAX]
LAB_00181d12:
LEA RDI,[RSP + 0x68]
CALL 0x0015aa50
MOV qword ptr [RSP + 0x10],RAX
JMP 0x00181d23
LAB_00181d23:
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x8],RAX
LEA RDI,[RSP + 0x1f8]
CALL 0x0018aea0
MOV RDI,qword ptr [RSP + 0x10]
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
SUB RAX,RCX
LEA RAX,[0x30d241]
LEA RSI,[0x31102a]
CMOVZ RSI,RAX
CALL 0x0015aa50
JMP 0x00181d63
LAB_00181d63:
JMP 0x00181d65
LAB_00181d65:
LEA RDI,[RSP + 0x58]
CALL 0x0018aee0
JMP 0x00181ce3
LAB_00181daa:
MOV RDI,qword ptr [RSP + 0x30]
LEA RSI,[RSP + 0x68]
CALL 0x0015b450
LAB_00181db9:
JMP 0x00181dbb
LAB_00181dbb:
LEA RDI,[RSP + 0x68]
CALL 0x0015afe0
LEA RDI,[RSP + 0x1f8]
CALL 0x0019ccc0
MOV RAX,qword ptr [RSP + 0x38]
ADD RSP,0x218
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* list_builtin_chat_templates[abi:cxx11]() */
int8 list_builtin_chat_templates_abi_cxx11_(void)
{
bool bVar1;
int8 uVar2;
int8 uVar3;
int8 *puVar4;
ostream *poVar5;
int8 *puVar6;
char *pcVar7;
int8 in_RDI;
int8 local_1c8;
int8 local_1c0;
vector<char_const*,std::allocator<char_const*>> *local_1b8;
ostringstream local_1b0 [396];
int local_24;
vector<char_const*,std::allocator<char_const*>> local_20 [32];
std::vector<char_const*,std::allocator<char_const*>>::vector(local_20);
/* try { // try from 00181c39 to 00181cb5 has its CatchHandler @ 00181d74 */
local_24 = llama_chat_builtin_templates(0);
std::vector<char_const*,std::allocator<char_const*>>::resize(local_20,(long)local_24);
uVar2 = std::vector<char_const*,std::allocator<char_const*>>::data(local_20);
uVar3 = std::vector<char_const*,std::allocator<char_const*>>::size(local_20);
local_24 = llama_chat_builtin_templates(uVar2,uVar3);
std::__cxx11::ostringstream::ostringstream(local_1b0);
local_1b8 = local_20;
local_1c0 = std::vector<char_const*,std::allocator<char_const*>>::begin(local_1b8);
local_1c8 = std::vector<char_const*,std::allocator<char_const*>>::end(local_1b8);
while( true ) {
bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_1c0,(__normal_iterator *)&local_1c8);
if (!bVar1) break;
puVar4 = (int8 *)
__gnu_cxx::
__normal_iterator<char_const**,std::vector<char_const*,std::allocator<char_const*>>>::
operator*((__normal_iterator<char_const**,std::vector<char_const*,std::allocator<char_const*>>>
*)&local_1c0);
/* try { // try from 00181d12 to 00181db8 has its CatchHandler @ 00181d8a */
poVar5 = std::operator<<((ostream *)local_1b0,(char *)*puVar4);
puVar6 = (int8 *)std::vector<char_const*,std::allocator<char_const*>>::back(local_20);
pcVar7 = ", ";
if (puVar4 == puVar6) {
pcVar7 = "";
}
std::operator<<(poVar5,pcVar7);
__gnu_cxx::__normal_iterator<char_const**,std::vector<char_const*,std::allocator<char_const*>>>
::operator++((__normal_iterator<char_const**,std::vector<char_const*,std::allocator<char_const*>>>
*)&local_1c0);
}
std::__cxx11::ostringstream::str();
std::__cxx11::ostringstream::~ostringstream(local_1b0);
std::vector<char_const*,std::allocator<char_const*>>::~vector(local_20);
return in_RDI;
}
| |
33,506 | ma_get_key | eloqsql/storage/maria/ma_search.c | uchar *_ma_get_key(MARIA_KEY *key, MARIA_PAGE *ma_page, uchar *keypos)
{
uint page_flag, nod_flag;
MARIA_KEYDEF *keyinfo= key->keyinfo;
uchar *page;
DBUG_ENTER("_ma_get_key");
page= ma_page->buff;
page_flag= ma_page->flag;
nod_flag= ma_page->node;
if (! (keyinfo->flag & (HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY)) &&
! (page_flag & KEYPAGE_FLAG_HAS_TRANSID))
{
bmove(key->data, keypos, keyinfo->keylength+nod_flag);
key->ref_length= keyinfo->share->rec_reflength;
key->data_length= keyinfo->keylength - key->ref_length;
key->flag= 0;
DBUG_RETURN(keypos+keyinfo->keylength+nod_flag);
}
else
{
page+= keyinfo->share->keypage_header + nod_flag;
key->data[0]= 0; /* safety */
while (page <= keypos)
{
if (!(*keyinfo->get_key)(key, page_flag, nod_flag, &page))
{
_ma_set_fatal_error_with_share(keyinfo->share, HA_ERR_CRASHED);
DBUG_RETURN(0);
}
}
}
DBUG_PRINT("exit",("page: %p length: %u", page,
key->data_length + key->ref_length));
DBUG_RETURN(page);
} | O3 | c | ma_get_key:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r15
movq 0x8(%rdi), %r13
movl 0x28(%rsi), %r14d
movl 0x2c(%rsi), %r12d
testb $0x28, 0xa2(%r13)
sete %al
testb $0x2, %r12b
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x5752a
movq (%r15), %rdi
movzwl 0xaa(%r13), %edx
addl %r14d, %edx
movq %rbx, %rsi
callq 0x29120
movq (%r13), %rax
movl 0x740(%rax), %eax
movl %eax, 0x14(%r15)
movzwl 0xaa(%r13), %ecx
subl %eax, %ecx
movl %ecx, 0x10(%r15)
movl $0x0, 0x18(%r15)
movzwl 0xaa(%r13), %eax
addq %r14, %rbx
addq %rax, %rbx
movq %rbx, %rax
jmp 0x57579
movq (%r13), %rax
movl 0x744(%rax), %eax
addl %r14d, %eax
addq 0x10(%rsi), %rax
leaq -0x30(%rbp), %rcx
movq %rax, (%rcx)
movq (%r15), %rax
movb $0x0, (%rax)
movq -0x30(%rbp), %rax
cmpq %rbx, %rax
ja 0x57579
movq %r15, %rdi
movl %r12d, %esi
movl %r14d, %edx
leaq -0x30(%rbp), %rcx
callq *0xe0(%r13)
testl %eax, %eax
jne 0x57548
movq (%r13), %rdi
movl $0x7e, %esi
callq 0x32b2a
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ma_get_key:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdx
mov r15, rdi
mov r13, [rdi+8]
mov r14d, [rsi+28h]
mov r12d, [rsi+2Ch]
test byte ptr [r13+0A2h], 28h
setz al
test r12b, 2
setz cl
and cl, al
cmp cl, 1
jnz short loc_5752A
mov rdi, [r15]
movzx edx, word ptr [r13+0AAh]
add edx, r14d
mov rsi, rbx
call _memmove
mov rax, [r13+0]
mov eax, [rax+740h]
mov [r15+14h], eax
movzx ecx, word ptr [r13+0AAh]
sub ecx, eax
mov [r15+10h], ecx
mov dword ptr [r15+18h], 0
movzx eax, word ptr [r13+0AAh]
add rbx, r14
add rbx, rax
mov rax, rbx
jmp short loc_57579
loc_5752A:
mov rax, [r13+0]
mov eax, [rax+744h]
add eax, r14d
add rax, [rsi+10h]
lea rcx, [rbp+var_30]
mov [rcx], rax
mov rax, [r15]
mov byte ptr [rax], 0
loc_57548:
mov rax, [rbp+var_30]
cmp rax, rbx
ja short loc_57579
mov rdi, r15
mov esi, r12d
mov edx, r14d
lea rcx, [rbp+var_30]
call qword ptr [r13+0E0h]
test eax, eax
jnz short loc_57548
mov rdi, [r13+0]
mov esi, 7Eh ; '~'
call _ma_set_fatal_error_with_share
xor eax, eax
loc_57579:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ma_get_key(long long a1, long long a2, unsigned long long a3)
{
long long v3; // rax
unsigned __int16 *v5; // r13
long long v6; // r14
unsigned int v7; // r12d
int v8; // eax
long long result; // rax
long long v10; // rdx
long long v11; // rcx
long long v12; // r8
int v13; // r9d
_QWORD v14[6]; // [rsp+0h] [rbp-30h] BYREF
v14[0] = v3;
v5 = *(unsigned __int16 **)(a1 + 8);
v6 = *(unsigned int *)(a2 + 40);
v7 = *(_DWORD *)(a2 + 44);
if ( (v5[81] & 0x28) == 0 && (v7 & 2) == 0 )
{
memmove(*(_QWORD *)a1, a3, (unsigned int)v6 + v5[85]);
v8 = *(_DWORD *)(*(_QWORD *)v5 + 1856LL);
*(_DWORD *)(a1 + 20) = v8;
*(_DWORD *)(a1 + 16) = v5[85] - v8;
*(_DWORD *)(a1 + 24) = 0;
return v5[85] + v6 + a3;
}
else
{
v14[0] = *(_QWORD *)(a2 + 16) + (unsigned int)(v6 + *(_DWORD *)(*(_QWORD *)v5 + 1860LL));
**(_BYTE **)a1 = 0;
while ( 1 )
{
result = v14[0];
if ( v14[0] > a3 )
break;
if ( !(*((unsigned int ( **)(long long, _QWORD, _QWORD, _QWORD *))v5 + 28))(a1, v7, (unsigned int)v6, v14) )
{
ma_set_fatal_error_with_share(*(_QWORD *)v5, 126, v10, v11, v12, v13);
return 0LL;
}
}
}
return result;
}
| _ma_get_key:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R15,RDI
MOV R13,qword ptr [RDI + 0x8]
MOV R14D,dword ptr [RSI + 0x28]
MOV R12D,dword ptr [RSI + 0x2c]
TEST byte ptr [R13 + 0xa2],0x28
SETZ AL
TEST R12B,0x2
SETZ CL
AND CL,AL
CMP CL,0x1
JNZ 0x0015752a
MOV RDI,qword ptr [R15]
MOVZX EDX,word ptr [R13 + 0xaa]
ADD EDX,R14D
MOV RSI,RBX
CALL 0x00129120
MOV RAX,qword ptr [R13]
MOV EAX,dword ptr [RAX + 0x740]
MOV dword ptr [R15 + 0x14],EAX
MOVZX ECX,word ptr [R13 + 0xaa]
SUB ECX,EAX
MOV dword ptr [R15 + 0x10],ECX
MOV dword ptr [R15 + 0x18],0x0
MOVZX EAX,word ptr [R13 + 0xaa]
ADD RBX,R14
ADD RBX,RAX
MOV RAX,RBX
JMP 0x00157579
LAB_0015752a:
MOV RAX,qword ptr [R13]
MOV EAX,dword ptr [RAX + 0x744]
ADD EAX,R14D
ADD RAX,qword ptr [RSI + 0x10]
LEA RCX,[RBP + -0x30]
MOV qword ptr [RCX],RAX
MOV RAX,qword ptr [R15]
MOV byte ptr [RAX],0x0
LAB_00157548:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,RBX
JA 0x00157579
MOV RDI,R15
MOV ESI,R12D
MOV EDX,R14D
LEA RCX,[RBP + -0x30]
CALL qword ptr [R13 + 0xe0]
TEST EAX,EAX
JNZ 0x00157548
MOV RDI,qword ptr [R13]
MOV ESI,0x7e
CALL 0x00132b2a
XOR EAX,EAX
LAB_00157579:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void * _ma_get_key(int8 *param_1,long param_2,void *param_3)
{
uint uVar1;
uint uVar2;
long *plVar3;
int iVar4;
void *local_38;
plVar3 = (long *)param_1[1];
uVar1 = *(uint *)(param_2 + 0x28);
uVar2 = *(uint *)(param_2 + 0x2c);
if ((uVar2 & 2) == 0 && (*(byte *)((long)plVar3 + 0xa2) & 0x28) == 0) {
memmove((void *)*param_1,param_3,(ulong)(*(ushort *)((long)plVar3 + 0xaa) + uVar1));
iVar4 = *(int *)(*plVar3 + 0x740);
*(int *)((long)param_1 + 0x14) = iVar4;
*(uint *)(param_1 + 2) = (uint)*(ushort *)((long)plVar3 + 0xaa) - iVar4;
*(int4 *)(param_1 + 3) = 0;
param_3 = (void *)((long)param_3 + (ulong)*(ushort *)((long)plVar3 + 0xaa) + (ulong)uVar1);
}
else {
local_38 = (void *)((ulong)(*(int *)(*plVar3 + 0x744) + uVar1) + *(long *)(param_2 + 0x10));
*(int1 *)*param_1 = 0;
do {
if (param_3 < local_38) {
return local_38;
}
iVar4 = (*(code *)plVar3[0x1c])(param_1,uVar2,uVar1,&local_38);
} while (iVar4 != 0);
_ma_set_fatal_error_with_share(*plVar3,0x7e);
param_3 = (void *)0x0;
}
return param_3;
}
| |
33,507 | nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, 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>>>>>::parser(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>>>>&&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>&)>, bool, bool) | monkey531[P]llama/common/json.hpp | explicit parser(InputAdapterType&& adapter,
const parser_callback_t<BasicJsonType> cb = nullptr,
const bool allow_exceptions_ = true,
const bool skip_comments = false)
: callback(cb)
, m_lexer(std::move(adapter), skip_comments)
, allow_exceptions(allow_exceptions_)
{
// read first token
get_token();
} | O1 | cpp | nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, 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>>>>>::parser(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>>>>&&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>&)>, bool, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %r15d
movl %ecx, %ebp
movq %rsi, %r12
movq %rdi, %rbx
movq %rdx, %rsi
callq 0x5c5f4
movl $0x0, 0x20(%rbx)
leaq 0x28(%rbx), %r14
movups (%r12), %xmm0
movups %xmm0, 0x28(%rbx)
movb %r15b, 0x38(%rbx)
movl $0xffffffff, 0x3c(%rbx) # imm = 0xFFFFFFFF
xorl %eax, %eax
movb %al, 0x40(%rbx)
leaq 0x88(%rbx), %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x48(%rbx)
movups %xmm0, 0x58(%rbx)
movups %xmm0, 0x68(%rbx)
movq %rcx, 0x78(%rbx)
movq %rax, 0x80(%rbx)
movb %al, 0x88(%rbx)
leaq 0x950cd(%rip), %rcx # 0xf213c
movq %rcx, 0x98(%rbx)
movups %xmm0, 0xa0(%rbx)
movq %rax, 0xb0(%rbx)
callq 0x5d112
movsbl %al, %eax
movl %eax, 0xb8(%rbx)
movb %bpl, 0xc0(%rbx)
movq %r14, %rdi
callq 0x5d156
movl %eax, 0x20(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq %r14, %rdi
callq 0x5d0de
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x5d0ce
movq %rbx, %rdi
movq %rbx, %rsi
movl $0x3, %edx
callq *%rax
movq %r15, %rdi
callq 0x1c030
movq %rax, %rdi
callq 0x24da5
| _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEEC2EOSM_St8functionIFbiNS1_13parse_event_tERSF_EEbb:
push rbp
push r15
push r14
push r12
push rbx
mov r15d, r8d
mov ebp, ecx
mov r12, rsi
mov rbx, rdi
mov rsi, rdx
call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2ERKSJ_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<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> &)>::function(std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)> const&)
mov dword ptr [rbx+20h], 0
lea r14, [rbx+28h]
movups xmm0, xmmword ptr [r12]
movups xmmword ptr [rbx+28h], xmm0
mov [rbx+38h], r15b
mov dword ptr [rbx+3Ch], 0FFFFFFFFh
xor eax, eax
mov [rbx+40h], al
lea rcx, [rbx+88h]
xorps xmm0, xmm0
movups xmmword ptr [rbx+48h], xmm0
movups xmmword ptr [rbx+58h], xmm0
movups xmmword ptr [rbx+68h], xmm0
mov [rbx+78h], rcx
mov [rbx+80h], rax
mov [rbx+88h], al
lea rcx, aErrorWhileHand_0+34h; ""
mov [rbx+98h], rcx
movups xmmword ptr [rbx+0A0h], xmm0
mov [rbx+0B0h], rax
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE17get_decimal_pointEv; 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_decimal_point(void)
movsx eax, al
mov [rbx+0B8h], eax
mov [rbx+0C0h], bpl
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE4scanEv; 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>>>::scan(void)
mov [rbx+20h], eax
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
mov r15, rax
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; 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>>>::~lexer()
mov rax, [rbx+10h]
test rax, rax
jz short loc_5D0CE
mov rdi, rbx
mov rsi, rbx
mov edx, 3
call rax
loc_5D0CE:
mov rdi, r15
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
| long long nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parser(
long long a1,
_OWORD *a2,
long long a3,
char a4,
char a5)
{
long long result; // rax
std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::function(
(_OWORD *)a1,
a3);
*(_DWORD *)(a1 + 32) = 0;
*(_OWORD *)(a1 + 40) = *a2;
*(_BYTE *)(a1 + 56) = a5;
*(_DWORD *)(a1 + 60) = -1;
*(_BYTE *)(a1 + 64) = 0;
*(_OWORD *)(a1 + 72) = 0LL;
*(_OWORD *)(a1 + 88) = 0LL;
*(_OWORD *)(a1 + 104) = 0LL;
*(_QWORD *)(a1 + 120) = a1 + 136;
*(_QWORD *)(a1 + 128) = 0LL;
*(_BYTE *)(a1 + 136) = 0;
*(_QWORD *)(a1 + 152) = "";
*(_OWORD *)(a1 + 160) = 0LL;
*(_QWORD *)(a1 + 176) = 0LL;
*(_DWORD *)(a1 + 184) = (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>>>::get_decimal_point();
*(_BYTE *)(a1 + 192) = a4;
result = 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(a1 + 40);
*(_DWORD *)(a1 + 32) = result;
return result;
}
| parser:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R15D,R8D
MOV EBP,ECX
MOV R12,RSI
MOV RBX,RDI
MOV RSI,RDX
CALL 0x0015c5f4
MOV dword ptr [RBX + 0x20],0x0
LEA R14,[RBX + 0x28]
MOVUPS XMM0,xmmword ptr [R12]
MOVUPS xmmword ptr [RBX + 0x28],XMM0
MOV byte ptr [RBX + 0x38],R15B
MOV dword ptr [RBX + 0x3c],0xffffffff
XOR EAX,EAX
MOV byte ptr [RBX + 0x40],AL
LEA RCX,[RBX + 0x88]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x48],XMM0
MOVUPS xmmword ptr [RBX + 0x58],XMM0
MOVUPS xmmword ptr [RBX + 0x68],XMM0
MOV qword ptr [RBX + 0x78],RCX
MOV qword ptr [RBX + 0x80],RAX
MOV byte ptr [RBX + 0x88],AL
LEA RCX,[0x1f213c]
MOV qword ptr [RBX + 0x98],RCX
MOVUPS xmmword ptr [RBX + 0xa0],XMM0
MOV qword ptr [RBX + 0xb0],RAX
CALL 0x0015d112
MOVSX EAX,AL
MOV dword ptr [RBX + 0xb8],EAX
MOV byte ptr [RBX + 0xc0],BPL
LAB_0015d099:
MOV RDI,R14
CALL 0x0015d156
MOV dword ptr [RBX + 0x20],EAX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, 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 > >
>::parser(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > >&&, std::function<bool (int,
nlohmann::json_abi_v3_11_3::detail::parse_event_t,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&)>, bool, bool) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::parser(parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this,int8 *param_1,function *param_3,
parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
param_4,parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
param_5)
{
int8 uVar1;
char cVar2;
int4 uVar3;
std::
function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
::function((function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
*)this,param_3);
*(int4 *)(this + 0x20) = 0;
uVar1 = param_1[1];
*(int8 *)(this + 0x28) = *param_1;
*(int8 *)(this + 0x30) = uVar1;
this[0x38] = param_5;
*(int4 *)(this + 0x3c) = 0xffffffff;
this[0x40] = (parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
)0x0;
*(int8 *)(this + 0x48) = 0;
*(int8 *)(this + 0x50) = 0;
*(int8 *)(this + 0x58) = 0;
*(int8 *)(this + 0x60) = 0;
*(int8 *)(this + 0x68) = 0;
*(int8 *)(this + 0x70) = 0;
*(parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
**)(this + 0x78) = this + 0x88;
*(int8 *)(this + 0x80) = 0;
this[0x88] = (parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
)0x0;
*(char **)(this + 0x98) = "";
*(int8 *)(this + 0xa0) = 0;
*(int8 *)(this + 0xa8) = 0;
*(int8 *)(this + 0xb0) = 0;
cVar2 = 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_decimal_point();
*(int *)(this + 0xb8) = (int)cVar2;
this[0xc0] = param_4;
/* try { // try from 0015d099 to 0015d0a0 has its CatchHandler @ 0015d0ad */
uVar3 = 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((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 + 0x28));
*(int4 *)(this + 0x20) = uVar3;
return;
}
| |
33,508 | change_simple_key_cache_param | eloqsql/mysys/mf_keycache.c | static
void change_simple_key_cache_param(SIMPLE_KEY_CACHE_CB *keycache, uint division_limit,
uint age_threshold)
{
DBUG_ENTER("change_simple_key_cache_param");
keycache_pthread_mutex_lock(&keycache->cache_lock);
if (division_limit)
keycache->min_warm_blocks= (keycache->disk_blocks *
division_limit / 100 + 1);
if (age_threshold)
keycache->age_threshold= (keycache->disk_blocks *
age_threshold / 100);
keycache_pthread_mutex_unlock(&keycache->cache_lock);
DBUG_VOID_RETURN;
} | O3 | c | change_simple_key_cache_param:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r15d
movl %esi, %r12d
movq %rdi, %r14
leaq 0xc0(%rdi), %rbx
cmpq $0x0, 0x100(%rdi)
jne 0x98dc7
movq %rbx, %rdi
callq 0x29220
testl %r12d, %r12d
je 0x98d92
imull 0x48(%r14), %r12d
imulq $0x51eb851f, %r12, %rax # imm = 0x51EB851F
shrq $0x25, %rax
incl %eax
movq %rax, 0x20(%r14)
testl %r15d, %r15d
je 0x98dab
imull 0x48(%r14), %r15d
imulq $0x51eb851f, %r15, %rax # imm = 0x51EB851F
shrq $0x25, %rax
movq %rax, 0x28(%r14)
movq 0x100(%r14), %rdi
testq %rdi, %rdi
jne 0x98ddd
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x291e0
leaq 0x43296(%rip), %rsi # 0xdc064
movq %rbx, %rdi
movl $0x399, %edx # imm = 0x399
callq 0x2eb8f
jmp 0x98d77
leaq 0x2ed22c(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x98db7
| change_simple_key_cache_param:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov r15d, edx
mov r12d, esi
mov r14, rdi
lea rbx, [rdi+0C0h]
cmp qword ptr [rdi+100h], 0
jnz short loc_98DC7
mov rdi, rbx
call _pthread_mutex_lock
loc_98D77:
test r12d, r12d
jz short loc_98D92
imul r12d, [r14+48h]
imul rax, r12, 51EB851Fh
shr rax, 25h
inc eax
mov [r14+20h], rax
loc_98D92:
test r15d, r15d
jz short loc_98DAB
imul r15d, [r14+48h]
imul rax, r15, 51EB851Fh
shr rax, 25h
mov [r14+28h], rax
loc_98DAB:
mov rdi, [r14+100h]
test rdi, rdi
jnz short loc_98DDD
loc_98DB7:
mov rdi, rbx
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp _pthread_mutex_unlock
loc_98DC7:
lea rsi, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, rbx
mov edx, 399h
call psi_mutex_lock
jmp short loc_98D77
loc_98DDD:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_98DB7
| long long change_simple_key_cache_param(long long a1, int a2, int a3)
{
if ( *(_QWORD *)(a1 + 256) )
psi_mutex_lock(a1 + 192, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0x399u);
else
pthread_mutex_lock(a1 + 192);
if ( a2 )
*(_QWORD *)(a1 + 32) = *(_DWORD *)(a1 + 72) * a2 / 0x64u + 1;
if ( a3 )
*(_QWORD *)(a1 + 40) = (unsigned int)(*(_DWORD *)(a1 + 72) * a3) / 0x64uLL;
if ( *(_QWORD *)(a1 + 256) )
PSI_server[44]();
return pthread_mutex_unlock(a1 + 192);
}
| change_simple_key_cache_param:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R15D,EDX
MOV R12D,ESI
MOV R14,RDI
LEA RBX,[RDI + 0xc0]
CMP qword ptr [RDI + 0x100],0x0
JNZ 0x00198dc7
MOV RDI,RBX
CALL 0x00129220
LAB_00198d77:
TEST R12D,R12D
JZ 0x00198d92
IMUL R12D,dword ptr [R14 + 0x48]
IMUL RAX,R12,0x51eb851f
SHR RAX,0x25
INC EAX
MOV qword ptr [R14 + 0x20],RAX
LAB_00198d92:
TEST R15D,R15D
JZ 0x00198dab
IMUL R15D,dword ptr [R14 + 0x48]
IMUL RAX,R15,0x51eb851f
SHR RAX,0x25
MOV qword ptr [R14 + 0x28],RAX
LAB_00198dab:
MOV RDI,qword ptr [R14 + 0x100]
TEST RDI,RDI
JNZ 0x00198ddd
LAB_00198db7:
MOV RDI,RBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x001291e0
LAB_00198dc7:
LEA RSI,[0x1dc064]
MOV RDI,RBX
MOV EDX,0x399
CALL 0x0012eb8f
JMP 0x00198d77
LAB_00198ddd:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00198db7
|
void change_simple_key_cache_param(long param_1,int param_2,int param_3)
{
pthread_mutex_t *__mutex;
__mutex = (pthread_mutex_t *)(param_1 + 0xc0);
if (*(long *)(param_1 + 0x100) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0x399);
}
if (param_2 != 0) {
*(ulong *)(param_1 + 0x20) = (ulong)((uint)(param_2 * *(int *)(param_1 + 0x48)) / 100 + 1);
}
if (param_3 != 0) {
*(ulong *)(param_1 + 0x28) = (ulong)(uint)(param_3 * *(int *)(param_1 + 0x48)) / 100;
}
if (*(long *)(param_1 + 0x100) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
return;
}
| |
33,509 | read_next_extent | eloqsql/storage/maria/ma_blockrec.c | static uchar *read_next_extent(MARIA_HA *info, MARIA_EXTENT_CURSOR *extent,
uchar **end_of_data)
{
MARIA_SHARE *share= info->s;
uchar *buff, *data;
MARIA_PINNED_PAGE page_link;
enum pagecache_page_lock lock;
DBUG_ENTER("read_next_extent");
if (!extent->page_count)
{
uint page_count;
if (!--extent->extent_count)
goto crashed;
extent->extent+= ROW_EXTENT_SIZE;
extent->page= page_korr(extent->extent);
page_count= (uint2korr(extent->extent+ROW_EXTENT_PAGE_SIZE) &
~START_EXTENT_BIT);
if (!page_count)
goto crashed;
extent->tail= page_count & TAIL_BIT;
if (extent->tail)
extent->tail_row_nr= page_count & ~TAIL_BIT;
else
extent->page_count= page_count;
DBUG_PRINT("info",("New extent. Page: %lu page_count: %u tail_flag: %d",
(ulong) extent->page, extent->page_count,
extent->tail != 0));
}
extent->first_extent= 0;
lock= PAGECACHE_LOCK_LEFT_UNLOCKED;
if (extent->tail)
lock= extent->lock_for_tail_pages;
buff= pagecache_read(share->pagecache,
&info->dfile, extent->page, 0,
info->buff, share->page_type,
lock, &page_link.link);
if (lock != PAGECACHE_LOCK_LEFT_UNLOCKED)
{
/* Read during UNDO */
page_link.unlock= PAGECACHE_LOCK_WRITE_UNLOCK;
page_link.changed= buff != 0;
push_dynamic(&info->pinned_pages, (void*) &page_link);
}
if (!buff)
{
/* check if we tried to read over end of file (ie: bad data in record) */
if ((extent->page + 1) * share->block_size >
share->state.state.data_file_length)
goto crashed;
DBUG_RETURN(0);
}
if (!extent->tail)
{
/* Full data page */
if ((buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) != BLOB_PAGE)
goto crashed;
extent->page++; /* point to next page */
extent->page_count--;
*end_of_data= buff + share->block_size - PAGE_SUFFIX_SIZE;
info->cur_row.full_page_count++; /* For maria_chk */
DBUG_RETURN(extent->data_start= buff + FULL_PAGE_HEADER_SIZE(share));
}
/* Found tail */
if ((buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) != TAIL_PAGE)
goto crashed;
*(extent->tail_positions++)= ma_recordpos(extent->page,
extent->tail_row_nr);
info->cur_row.tail_count++; /* For maria_chk */
if (!(data= get_record_position(share, buff,
extent->tail_row_nr,
end_of_data)))
goto crashed;
extent->data_start= data;
extent->page_count= 0; /* No more data in extent */
DBUG_RETURN(data);
crashed:
DBUG_ASSERT(!maria_assert_if_crashed_table);
_ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD);
DBUG_PRINT("error", ("wrong extent information"));
DBUG_RETURN(0);
} | O3 | c | read_next_extent:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, -0x38(%rbp)
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %r15
cmpl $0x0, 0x20(%rsi)
je 0x5e31b
leaq 0x2c(%rbx), %rax
movq %rax, -0x30(%rbp)
cmpl $0x0, 0x2c(%rbx)
movb $0x0, 0x34(%rbx)
je 0x5e36f
movl 0x24(%rbx), %r12d
jmp 0x5e372
decl 0x28(%rbx)
je 0x5e482
movq (%rbx), %rax
leaq 0x7(%rax), %rcx
movq %rcx, (%rbx)
movl 0x7(%rax), %ecx
movzbl 0xb(%rax), %edx
shlq $0x20, %rdx
orq %rcx, %rdx
movq %rdx, 0x18(%rbx)
movzwl 0xc(%rax), %eax
andl $0xbfff, %eax # imm = 0xBFFF
je 0x5e482
movl %eax, %ecx
andl $0x8000, %ecx # imm = 0x8000
movl %ecx, 0x2c(%rbx)
jne 0x5e4a0
movl %eax, 0x20(%rbx)
movb $0x0, 0x34(%rbx)
leaq 0x2c(%rbx), %rax
movq %rax, -0x30(%rbp)
xorl %r12d, %r12d
movq 0x600(%r15), %rdi
leaq 0x470(%r14), %rsi
movq 0x18(%rbx), %rdx
movq 0x378(%r14), %r8
movl 0x7d4(%r15), %r9d
leaq -0x50(%rbp), %rax
xorl %ecx, %ecx
pushq %rax
pushq %r12
callq 0x3263a
addq $0x10, %rsp
movq %rax, %r13
testl %r12d, %r12d
je 0x5e3ca
leaq -0x50(%rbp), %rsi
movl $0x6, 0x8(%rsi)
testq %r13, %r13
setne 0x10(%rsi)
leaq 0x2e8(%r14), %rdi
callq 0x91bc6
testq %r13, %r13
je 0x5e42e
movb 0x7(%r13), %al
andb $0x7, %al
movq -0x30(%rbp), %rcx
cmpl $0x0, (%rcx)
je 0x5e448
cmpb $0x2, %al
jne 0x5e482
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rcx
movl 0x30(%rbx), %edx
shlq $0x8, %rcx
orq %rdx, %rcx
leaq 0x8(%rax), %rdx
movq %rdx, 0x10(%rbx)
movq %rcx, (%rax)
incl 0x134(%r14)
movl 0x30(%rbx), %edx
movq %r15, %rdi
movq %r13, %rsi
movq -0x38(%rbp), %rcx
callq 0x5e56a
testq %rax, %rax
je 0x5e482
movq %rax, 0x8(%rbx)
movl $0x0, 0x20(%rbx)
jmp 0x5e491
movq 0x18(%rbx), %rax
incq %rax
movl 0x7bc(%r15), %ecx
imulq %rax, %rcx
cmpq 0x40(%r15), %rcx
ja 0x5e482
jmp 0x5e48f
cmpb $0x3, %al
jne 0x5e482
incq 0x18(%rbx)
decl 0x20(%rbx)
movl 0x7bc(%r15), %eax
addq %r13, %rax
addq $-0x4, %rax
movq -0x38(%rbp), %rcx
movq %rax, (%rcx)
incl 0x130(%r14)
movl 0xc18(%r15), %eax
addl $0x8, %eax
addq %r13, %rax
movq %rax, 0x8(%rbx)
jmp 0x5e491
movq %r14, %rdi
movl $0x7f, %esi
callq 0x36a4c
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
andl $0x3fff, %eax # imm = 0x3FFF
movl %eax, 0x30(%rbx)
movb $0x0, 0x34(%rbx)
leaq 0x2c(%rbx), %rax
movq %rax, -0x30(%rbp)
jmp 0x5e315
| read_next_extent:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov [rbp+var_38], rdx
mov rbx, rsi
mov r14, rdi
mov r15, [rdi]
cmp dword ptr [rsi+20h], 0
jz short loc_5E31B
lea rax, [rbx+2Ch]
mov [rbp+var_30], rax
cmp dword ptr [rbx+2Ch], 0
mov byte ptr [rbx+34h], 0
jz short loc_5E36F
loc_5E315:
mov r12d, [rbx+24h]
jmp short loc_5E372
loc_5E31B:
dec dword ptr [rbx+28h]
jz loc_5E482
mov rax, [rbx]
lea rcx, [rax+7]
mov [rbx], rcx
mov ecx, [rax+7]
movzx edx, byte ptr [rax+0Bh]
shl rdx, 20h
or rdx, rcx
mov [rbx+18h], rdx
movzx eax, word ptr [rax+0Ch]
and eax, 0BFFFh
jz loc_5E482
mov ecx, eax
and ecx, 8000h
mov [rbx+2Ch], ecx
jnz loc_5E4A0
mov [rbx+20h], eax
mov byte ptr [rbx+34h], 0
lea rax, [rbx+2Ch]
mov [rbp+var_30], rax
loc_5E36F:
xor r12d, r12d
loc_5E372:
mov rdi, [r15+600h]
lea rsi, [r14+470h]
mov rdx, [rbx+18h]
mov r8, [r14+378h]
mov r9d, [r15+7D4h]
lea rax, [rbp+var_50]
xor ecx, ecx
push rax
push r12
call pagecache_read
add rsp, 10h
mov r13, rax
test r12d, r12d
jz short loc_5E3CA
lea rsi, [rbp+var_50]
mov dword ptr [rsi+8], 6
test r13, r13
setnz byte ptr [rsi+10h]
lea rdi, [r14+2E8h]
call insert_dynamic
loc_5E3CA:
test r13, r13
jz short loc_5E42E
mov al, [r13+7]
and al, 7
mov rcx, [rbp+var_30]
cmp dword ptr [rcx], 0
jz short loc_5E448
cmp al, 2
jnz loc_5E482
mov rax, [rbx+10h]
mov rcx, [rbx+18h]
mov edx, [rbx+30h]
shl rcx, 8
or rcx, rdx
lea rdx, [rax+8]
mov [rbx+10h], rdx
mov [rax], rcx
inc dword ptr [r14+134h]
mov edx, [rbx+30h]
mov rdi, r15
mov rsi, r13
mov rcx, [rbp+var_38]
call get_record_position
test rax, rax
jz short loc_5E482
mov [rbx+8], rax
mov dword ptr [rbx+20h], 0
jmp short loc_5E491
loc_5E42E:
mov rax, [rbx+18h]
inc rax
mov ecx, [r15+7BCh]
imul rcx, rax
cmp rcx, [r15+40h]
ja short loc_5E482
jmp short loc_5E48F
loc_5E448:
cmp al, 3
jnz short loc_5E482
inc qword ptr [rbx+18h]
dec dword ptr [rbx+20h]
mov eax, [r15+7BCh]
add rax, r13
add rax, 0FFFFFFFFFFFFFFFCh
mov rcx, [rbp+var_38]
mov [rcx], rax
inc dword ptr [r14+130h]
mov eax, [r15+0C18h]
add eax, 8
add rax, r13
mov [rbx+8], rax
jmp short loc_5E491
loc_5E482:
mov rdi, r14
mov esi, 7Fh
call _ma_set_fatal_error
loc_5E48F:
xor eax, eax
loc_5E491:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5E4A0:
and eax, 3FFFh
mov [rbx+30h], eax
mov byte ptr [rbx+34h], 0
lea rax, [rbx+2Ch]
mov [rbp+var_30], rax
jmp loc_5E315
| long long read_next_extent(
long long *a1,
long long *a2,
unsigned long long a3,
unsigned long long a4,
long long a5,
int a6)
{
long long v6; // r15
bool v7; // zf
unsigned int v8; // r12d
long long v9; // rax
int v10; // eax
long long v11; // rax
long long v12; // r13
char v13; // al
unsigned long long *v14; // rax
unsigned long long v15; // rcx
long long result; // rax
long long v17; // [rsp+0h] [rbp-50h] BYREF
int v18; // [rsp+8h] [rbp-48h]
bool v19; // [rsp+10h] [rbp-40h]
_QWORD *v20; // [rsp+18h] [rbp-38h]
_DWORD *v21; // [rsp+20h] [rbp-30h]
v20 = (_QWORD *)a3;
v6 = *a1;
if ( *((_DWORD *)a2 + 8) )
{
v21 = (_DWORD *)a2 + 11;
v7 = *((_DWORD *)a2 + 11) == 0;
*((_BYTE *)a2 + 52) = 0;
if ( !v7 )
{
LABEL_3:
v8 = *((_DWORD *)a2 + 9);
goto LABEL_9;
}
}
else
{
v7 = (*((_DWORD *)a2 + 10))-- == 1;
if ( v7 )
goto LABEL_20;
v9 = *a2;
*a2 += 7LL;
a4 = *(unsigned int *)(v9 + 7);
a3 = a4 | ((unsigned long long)*(unsigned __int8 *)(v9 + 11) << 32);
a2[3] = a3;
v10 = *(_WORD *)(v9 + 12) & 0xBFFF;
if ( !v10 )
goto LABEL_20;
*((_DWORD *)a2 + 11) = v10 & 0x8000;
if ( (v10 & 0x8000) != 0 )
{
*((_DWORD *)a2 + 12) = v10 & 0x3FFF;
*((_BYTE *)a2 + 52) = 0;
v21 = (_DWORD *)a2 + 11;
goto LABEL_3;
}
*((_DWORD *)a2 + 8) = v10;
*((_BYTE *)a2 + 52) = 0;
v21 = (_DWORD *)a2 + 11;
}
v8 = 0;
LABEL_9:
v11 = pagecache_read(*(_QWORD *)(v6 + 1536), (long long)(a1 + 142), a2[3], 0, a1[111], *(_DWORD *)(v6 + 2004), v8, &v17);
v12 = v11;
if ( v8 )
{
v18 = 6;
v19 = v11 != 0;
insert_dynamic(a1 + 93, &v17);
}
if ( v12 )
{
v13 = *(_BYTE *)(v12 + 7) & 7;
a4 = (unsigned long long)v21;
if ( *v21 )
{
if ( v13 == 2 )
{
v14 = (unsigned long long *)a2[2];
v15 = *((unsigned int *)a2 + 12) | (unsigned long long)(a2[3] << 8);
a2[2] = (long long)(v14 + 1);
*v14 = v15;
++*((_DWORD *)a1 + 77);
result = get_record_position(v6, v12, *((unsigned int *)a2 + 12), v20);
if ( result )
{
a2[1] = result;
*((_DWORD *)a2 + 8) = 0;
return result;
}
}
}
else if ( v13 == 3 )
{
++a2[3];
--*((_DWORD *)a2 + 8);
*v20 = v12 + *(unsigned int *)(v6 + 1980) - 4;
++*((_DWORD *)a1 + 76);
result = v12 + (unsigned int)(*(_DWORD *)(v6 + 3096) + 8);
a2[1] = result;
return result;
}
}
else
{
a4 = (a2[3] + 1) * *(unsigned int *)(v6 + 1980);
if ( a4 <= *(_QWORD *)(v6 + 64) )
return 0LL;
}
LABEL_20:
ma_set_fatal_error(a1, 127LL, a3, a4, a5, a6);
return 0LL;
}
| read_next_extent:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x38],RDX
MOV RBX,RSI
MOV R14,RDI
MOV R15,qword ptr [RDI]
CMP dword ptr [RSI + 0x20],0x0
JZ 0x0015e31b
LEA RAX,[RBX + 0x2c]
MOV qword ptr [RBP + -0x30],RAX
CMP dword ptr [RBX + 0x2c],0x0
MOV byte ptr [RBX + 0x34],0x0
JZ 0x0015e36f
LAB_0015e315:
MOV R12D,dword ptr [RBX + 0x24]
JMP 0x0015e372
LAB_0015e31b:
DEC dword ptr [RBX + 0x28]
JZ 0x0015e482
MOV RAX,qword ptr [RBX]
LEA RCX,[RAX + 0x7]
MOV qword ptr [RBX],RCX
MOV ECX,dword ptr [RAX + 0x7]
MOVZX EDX,byte ptr [RAX + 0xb]
SHL RDX,0x20
OR RDX,RCX
MOV qword ptr [RBX + 0x18],RDX
MOVZX EAX,word ptr [RAX + 0xc]
AND EAX,0xbfff
JZ 0x0015e482
MOV ECX,EAX
AND ECX,0x8000
MOV dword ptr [RBX + 0x2c],ECX
JNZ 0x0015e4a0
MOV dword ptr [RBX + 0x20],EAX
MOV byte ptr [RBX + 0x34],0x0
LEA RAX,[RBX + 0x2c]
MOV qword ptr [RBP + -0x30],RAX
LAB_0015e36f:
XOR R12D,R12D
LAB_0015e372:
MOV RDI,qword ptr [R15 + 0x600]
LEA RSI,[R14 + 0x470]
MOV RDX,qword ptr [RBX + 0x18]
MOV R8,qword ptr [R14 + 0x378]
MOV R9D,dword ptr [R15 + 0x7d4]
LEA RAX,[RBP + -0x50]
XOR ECX,ECX
PUSH RAX
PUSH R12
CALL 0x0013263a
ADD RSP,0x10
MOV R13,RAX
TEST R12D,R12D
JZ 0x0015e3ca
LEA RSI,[RBP + -0x50]
MOV dword ptr [RSI + 0x8],0x6
TEST R13,R13
SETNZ byte ptr [RSI + 0x10]
LEA RDI,[R14 + 0x2e8]
CALL 0x00191bc6
LAB_0015e3ca:
TEST R13,R13
JZ 0x0015e42e
MOV AL,byte ptr [R13 + 0x7]
AND AL,0x7
MOV RCX,qword ptr [RBP + -0x30]
CMP dword ptr [RCX],0x0
JZ 0x0015e448
CMP AL,0x2
JNZ 0x0015e482
MOV RAX,qword ptr [RBX + 0x10]
MOV RCX,qword ptr [RBX + 0x18]
MOV EDX,dword ptr [RBX + 0x30]
SHL RCX,0x8
OR RCX,RDX
LEA RDX,[RAX + 0x8]
MOV qword ptr [RBX + 0x10],RDX
MOV qword ptr [RAX],RCX
INC dword ptr [R14 + 0x134]
MOV EDX,dword ptr [RBX + 0x30]
MOV RDI,R15
MOV RSI,R13
MOV RCX,qword ptr [RBP + -0x38]
CALL 0x0015e56a
TEST RAX,RAX
JZ 0x0015e482
MOV qword ptr [RBX + 0x8],RAX
MOV dword ptr [RBX + 0x20],0x0
JMP 0x0015e491
LAB_0015e42e:
MOV RAX,qword ptr [RBX + 0x18]
INC RAX
MOV ECX,dword ptr [R15 + 0x7bc]
IMUL RCX,RAX
CMP RCX,qword ptr [R15 + 0x40]
JA 0x0015e482
JMP 0x0015e48f
LAB_0015e448:
CMP AL,0x3
JNZ 0x0015e482
INC qword ptr [RBX + 0x18]
DEC dword ptr [RBX + 0x20]
MOV EAX,dword ptr [R15 + 0x7bc]
ADD RAX,R13
ADD RAX,-0x4
MOV RCX,qword ptr [RBP + -0x38]
MOV qword ptr [RCX],RAX
INC dword ptr [R14 + 0x130]
MOV EAX,dword ptr [R15 + 0xc18]
ADD EAX,0x8
ADD RAX,R13
MOV qword ptr [RBX + 0x8],RAX
JMP 0x0015e491
LAB_0015e482:
MOV RDI,R14
MOV ESI,0x7f
CALL 0x00136a4c
LAB_0015e48f:
XOR EAX,EAX
LAB_0015e491:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015e4a0:
AND EAX,0x3fff
MOV dword ptr [RBX + 0x30],EAX
MOV byte ptr [RBX + 0x34],0x0
LEA RAX,[RBX + 0x2c]
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0015e315
|
long read_next_extent(long *param_1,long *param_2,long *param_3)
{
long *plVar1;
ushort uVar2;
ulong *puVar3;
byte bVar4;
uint uVar5;
long lVar6;
long lVar7;
ulong uVar8;
int iVar9;
int1 local_58 [8];
int4 local_50;
int1 local_48;
long *local_40;
int *local_38;
lVar7 = *param_1;
local_40 = param_3;
if ((int)param_2[4] == 0) {
plVar1 = param_2 + 5;
*(int *)plVar1 = (int)*plVar1 + -1;
if ((int)*plVar1 == 0) goto LAB_0015e482;
lVar6 = *param_2;
*param_2 = lVar6 + 7;
param_2[3] = (ulong)*(uint5 *)(lVar6 + 7);
uVar2 = *(ushort *)(lVar6 + 0xc);
uVar5 = (uint)uVar2;
if ((uVar2 & 0xbfff) == 0) goto LAB_0015e482;
*(uint *)((long)param_2 + 0x2c) = uVar5 & 0x8000;
if ((uVar2 & 0x8000) == 0) {
*(uint *)(param_2 + 4) = uVar5 & 0xbfff;
*(int1 *)((long)param_2 + 0x34) = 0;
goto LAB_0015e36f;
}
*(uint *)(param_2 + 6) = uVar5 & 0x3fff;
*(int1 *)((long)param_2 + 0x34) = 0;
LAB_0015e315:
iVar9 = *(int *)((long)param_2 + 0x24);
}
else {
*(int1 *)((long)param_2 + 0x34) = 0;
if (*(int *)((long)param_2 + 0x2c) != 0) goto LAB_0015e315;
LAB_0015e36f:
iVar9 = 0;
}
local_38 = (int *)((long)param_2 + 0x2c);
lVar6 = pagecache_read(*(int8 *)(lVar7 + 0x600),param_1 + 0x8e,param_2[3],0,param_1[0x6f],
*(int4 *)(lVar7 + 0x7d4),iVar9,local_58);
if (iVar9 != 0) {
local_50 = 6;
local_48 = lVar6 != 0;
insert_dynamic(param_1 + 0x5d);
}
if (lVar6 == 0) {
uVar8 = (ulong)*(uint *)(lVar7 + 0x7bc) * (param_2[3] + 1);
if (uVar8 < *(ulong *)(lVar7 + 0x40) || uVar8 - *(ulong *)(lVar7 + 0x40) == 0) {
return 0;
}
}
else {
bVar4 = *(byte *)(lVar6 + 7) & 7;
if (*local_38 == 0) {
if (bVar4 == 3) {
param_2[3] = param_2[3] + 1;
*(int *)(param_2 + 4) = (int)param_2[4] + -1;
*local_40 = (ulong)*(uint *)(lVar7 + 0x7bc) + lVar6 + -4;
*(int *)(param_1 + 0x26) = (int)param_1[0x26] + 1;
lVar6 = (ulong)(*(int *)(lVar7 + 0xc18) + 8) + lVar6;
param_2[1] = lVar6;
return lVar6;
}
}
else if (bVar4 == 2) {
puVar3 = (ulong *)param_2[2];
param_2[2] = (long)(puVar3 + 1);
*puVar3 = param_2[3] << 8 | (ulong)*(uint *)(param_2 + 6);
*(int *)((long)param_1 + 0x134) = *(int *)((long)param_1 + 0x134) + 1;
lVar7 = get_record_position(lVar7,lVar6,(int)param_2[6],local_40);
if (lVar7 != 0) {
param_2[1] = lVar7;
*(int4 *)(param_2 + 4) = 0;
return lVar7;
}
}
}
LAB_0015e482:
_ma_set_fatal_error(param_1,0x7f);
return 0;
}
| |
33,510 | ggml_threadpool_params_from_cpu_params(cpu_params const&) | monkey531[P]llama/common/common.cpp | struct ggml_threadpool_params ggml_threadpool_params_from_cpu_params(const cpu_params & params) {
struct ggml_threadpool_params tpp;
ggml_threadpool_params_init(&tpp, params.n_threads); // setup the defaults
if (params.mask_valid) {
std::memcpy(&tpp.cpumask, ¶ms.cpumask, GGML_MAX_N_THREADS);
}
tpp.prio = params.priority;
tpp.poll = params.poll;
tpp.strict_cpu = params.strict_cpu;
return tpp;
} | O3 | cpp | ggml_threadpool_params_from_cpu_params(cpu_params const&):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %esi
callq 0x196a0
cmpb $0x1, 0x204(%r14)
jne 0x512b3
leaq 0x4(%r14), %rsi
movl $0x200, %edx # imm = 0x200
movq %rbx, %rdi
callq 0x19620
movl 0x208(%r14), %eax
movl %eax, 0x204(%rbx)
movl 0x210(%r14), %eax
movl %eax, 0x208(%rbx)
movb 0x20c(%r14), %al
movb %al, 0x20c(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| _Z38ggml_threadpool_params_from_cpu_paramsRK10cpu_params:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov esi, [rsi]
call _ggml_threadpool_params_init
cmp byte ptr [r14+204h], 1
jnz short loc_512B3
lea rsi, [r14+4]
mov edx, 200h
mov rdi, rbx
call _memcpy
loc_512B3:
mov eax, [r14+208h]
mov [rbx+204h], eax
mov eax, [r14+210h]
mov [rbx+208h], eax
mov al, [r14+20Ch]
mov [rbx+20Ch], al
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
| long long ggml_threadpool_params_from_cpu_params(long long a1, unsigned int *a2)
{
ggml_threadpool_params_init(a1, *a2);
if ( *((_BYTE *)a2 + 516) == 1 )
memcpy(a1, a2 + 1, 512LL);
*(_DWORD *)(a1 + 516) = a2[130];
*(_DWORD *)(a1 + 520) = a2[132];
*(_BYTE *)(a1 + 524) = *((_BYTE *)a2 + 524);
return a1;
}
| ggml_threadpool_params_from_cpu_params:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV ESI,dword ptr [RSI]
CALL 0x001196a0
CMP byte ptr [R14 + 0x204],0x1
JNZ 0x001512b3
LEA RSI,[R14 + 0x4]
MOV EDX,0x200
MOV RDI,RBX
CALL 0x00119620
LAB_001512b3:
MOV EAX,dword ptr [R14 + 0x208]
MOV dword ptr [RBX + 0x204],EAX
MOV EAX,dword ptr [R14 + 0x210]
MOV dword ptr [RBX + 0x208],EAX
MOV AL,byte ptr [R14 + 0x20c]
MOV byte ptr [RBX + 0x20c],AL
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* ggml_threadpool_params_from_cpu_params(cpu_params const&) */
cpu_params * ggml_threadpool_params_from_cpu_params(cpu_params *param_1)
{
int4 *in_RSI;
ggml_threadpool_params_init(param_1,*in_RSI);
if (*(char *)(in_RSI + 0x81) == '\x01') {
memcpy(param_1,in_RSI + 1,0x200);
}
*(int4 *)(param_1 + 0x204) = in_RSI[0x82];
*(int4 *)(param_1 + 0x208) = in_RSI[0x84];
param_1[0x20c] = *(cpu_params *)(in_RSI + 0x83);
return param_1;
}
| |
33,511 | CLI::ValidationError::ValidationError(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) | MikePodsytnik[P]TCRtrie/build_O1/_deps/cli11-src/include/CLI/Error.hpp | explicit ValidationError(std::string name, std::string msg) : ValidationError(name + ": " + msg) {} | O1 | cpp | CLI::ValidationError::ValidationError(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x8b4c(%rip), %rsi # 0x374c9
leaq 0x8b54(%rip), %rdx # 0x374d8
leaq 0x28(%rsp), %rdi
callq 0x12040
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x178c0
leaq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x69, %ecx
callq 0x1609e
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x2e9da
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7430
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x2e9f1
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x7430
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x2ea1c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7430
jmp 0x2ea1c
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x2ea33
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x7430
movq %rbx, %rdi
callq 0x7780
nop
| _ZN3CLI15ValidationErrorC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push r12
push rbx
sub rsp, 48h
mov r14, rsi
mov rbx, rdi
lea r15, [rsp+68h+var_30]
mov [r15-10h], r15
lea rsi, aValidationerro; "ValidationError"
lea rdx, aValidationerro+0Fh; ""
lea rdi, [rsp+68h+var_40]
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 r12, [rsp+68h+var_50]
mov [r12-10h], r12
mov rsi, [r14]
mov rdx, [r14+8]
add rdx, rsi
lea rdi, [rsp+68h+var_60]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rsi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_60]
mov rdi, rbx; int
mov ecx, 69h ; 'i'
call _ZN3CLI15ValidationErrorC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_NS_9ExitCodesE; CLI::ValidationError::ValidationError(std::string,std::string,CLI::ExitCodes)
mov rdi, [rsp+68h+var_60]; void *
cmp rdi, r12
jz short loc_2E9DA
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2E9DA:
mov rdi, [rsp+68h+var_40]; void *
cmp rdi, r15
jz short loc_2E9F1
mov rsi, [rsp+68h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2E9F1:
add rsp, 48h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r12
jz short loc_2EA1C
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_2EA1C
mov rbx, rax
loc_2EA1C:
mov rdi, [rsp+arg_20]; void *
cmp rdi, r15
jz short loc_2EA33
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2EA33:
mov rdi, rbx
call __Unwind_Resume
| void CLI::ValidationError::ValidationError(_QWORD *a1, long long a2)
{
void *v2[2]; // [rsp+8h] [rbp-60h] BYREF
_QWORD v3[2]; // [rsp+18h] [rbp-50h] BYREF
void *v4[2]; // [rsp+28h] [rbp-40h] BYREF
_QWORD v5[6]; // [rsp+38h] [rbp-30h] BYREF
v4[0] = v5;
std::string::_M_construct<char const*>(v4, "ValidationError", (long long)"");
v2[0] = v3;
std::string::_M_construct<char *>(v2, *(_BYTE **)a2, *(_QWORD *)a2 + *(_QWORD *)(a2 + 8));
CLI::ValidationError::ValidationError(a1, (long long)v4, (long long)v2);
if ( v2[0] != v3 )
operator delete(v2[0], v3[0] + 1LL);
if ( v4[0] != v5 )
operator delete(v4[0], v5[0] + 1LL);
}
| ValidationError:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
MOV RBX,RDI
LEA R15,[RSP + 0x38]
MOV qword ptr [R15 + -0x10],R15
LEA RSI,[0x1374c9]
LEA RDX,[0x1374d8]
LEA RDI,[RSP + 0x28]
CALL 0x00112040
LEA R12,[RSP + 0x18]
MOV qword ptr [R12 + -0x10],R12
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
ADD RDX,RSI
LAB_0012e9a2:
LEA RDI,[RSP + 0x8]
CALL 0x001178c0
LAB_0012e9ac:
LEA RSI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ECX,0x69
CALL 0x0011609e
LAB_0012e9c3:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x0012e9da
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00107430
LAB_0012e9da:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R15
JZ 0x0012e9f1
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x00107430
LAB_0012e9f1:
ADD RSP,0x48
POP RBX
POP R12
POP R14
POP R15
RET
|
/* CLI::ValidationError::ValidationError(std::__cxx11::string) */
void __thiscall CLI::ValidationError::ValidationError(ValidationError *this,long *param_2)
{
long *local_60 [2];
long local_50 [2];
long *local_40 [2];
long local_30 [2];
local_40[0] = local_30;
std::__cxx11::string::_M_construct<char_const*>(local_40,"ValidationError","");
/* try { // try from 0012e9a2 to 0012e9ab has its CatchHandler @ 0012ea19 */
local_60[0] = local_50;
std::__cxx11::string::_M_construct<char*>(local_60,*param_2,param_2[1] + *param_2);
/* try { // try from 0012e9ac to 0012e9c2 has its CatchHandler @ 0012e9fd */
ValidationError(this,local_40,local_60,0x69);
if (local_60[0] != local_50) {
operator_delete(local_60[0],local_50[0] + 1);
}
if (local_40[0] != local_30) {
operator_delete(local_40[0],local_30[0] + 1);
}
return;
}
| |
33,512 | ggml_compute_forward_repeat_back | ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp | void ggml_compute_forward_repeat_back(
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_repeat_back_f32(params, dst);
} break;
default:
{
GGML_ABORT("fatal error");
}
}
} | O1 | cpp | ggml_compute_forward_repeat_back:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rsi, 0x30(%rsp)
movq 0x98(%rsi), %rax
movq %rax, 0xa0(%rsp)
cmpl $0x0, (%rax)
jne 0x36efe
cmpl $0x0, (%rdi)
jne 0x36eec
movq 0x30(%rsp), %r14
movq %r14, %rdi
movq 0xa0(%rsp), %rbx
movq %rbx, %rsi
callq 0xab50
testb %al, %al
je 0x36f18
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rcx
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdi
movq 0x10(%r14), %rbp
movq 0x18(%r14), %r9
movq 0x20(%r14), %r10
movq 0x28(%r14), %r11
movq 0x30(%r14), %r8
cqto
idivq %rbp
movq %rax, 0xa8(%rsp)
movq %rcx, %rax
cqto
movq %r9, 0x28(%rsp)
idivq %r9
movq %rax, 0x90(%rsp)
movq %rsi, %rax
cqto
movq %r10, 0x18(%rsp)
idivq %r10
movq %rax, 0x78(%rsp)
movq %rdi, %rax
cqto
movq %r11, 0x10(%rsp)
idivq %r11
movq %rax, 0x38(%rsp)
cmpq $0x4, %r8
jne 0x36f34
cmpq $0x4, 0x30(%rbx)
jne 0x36f50
movq 0x38(%rbx), %r12
movq 0x40(%rbx), %rax
movq %rax, 0x88(%rsp)
movq 0x48(%rbx), %rax
movq %rax, 0x70(%rsp)
movq 0x38(%r14), %rbx
movq 0x40(%r14), %rax
movq %rax, 0x98(%rsp)
movq 0x48(%r14), %rax
movq %rax, 0x80(%rsp)
movq %r14, %rdi
callq 0xa230
testb %al, %al
je 0x36bc3
movq 0x28(%rsp), %rax
imulq %rbp, %rax
movq 0x18(%rsp), %rdx
imulq 0x10(%rsp), %rdx
imulq %rax, %rdx
testl %edx, %edx
jle 0x36c79
movq 0x30(%rsp), %rax
movq 0xf8(%rax), %rdi
andl $0x7fffffff, %edx # imm = 0x7FFFFFFF
shlq $0x2, %rdx
xorl %esi, %esi
callq 0xa480
jmp 0x36c79
cmpq $0x0, 0x10(%rsp)
jle 0x36c79
movl %ebp, %r13d
andl $0x7fffffff, %r13d # imm = 0x7FFFFFFF
shlq $0x2, %r13
movq $0x0, 0x8(%rsp)
xorl %ecx, %ecx
movq %rcx, 0x20(%rsp)
cmpq $0x0, 0x18(%rsp)
jle 0x36c54
movq 0x8(%rsp), %r15
xorl %eax, %eax
movq %rax, 0x60(%rsp)
movq 0x28(%rsp), %rax
movq %rax, %r14
movq %r15, 0x68(%rsp)
testq %rax, %rax
jle 0x36c38
testl %ebp, %ebp
jle 0x36c30
movq 0x30(%rsp), %rax
movq 0xf8(%rax), %rdi
addq %r15, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0xa480
addq %rbx, %r15
decq %r14
jne 0x36c13
movq 0x60(%rsp), %rax
incq %rax
movq 0x68(%rsp), %r15
addq 0x98(%rsp), %r15
cmpq 0x18(%rsp), %rax
jne 0x36bfc
movq 0x20(%rsp), %rcx
incq %rcx
movq 0x8(%rsp), %rax
addq 0x80(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq 0x10(%rsp), %rcx
jne 0x36be8
cmpl $0x0, 0x38(%rsp)
jle 0x36eec
leaq (,%rbp,4), %rax
movl $0x7fffffff, %edx # imm = 0x7FFFFFFF
movq %rbp, %rcx
andq %rdx, %rcx
andq %rdx, 0x38(%rsp)
movq 0x78(%rsp), %rsi
andq %rdx, %rsi
movq %rsi, 0xd0(%rsp)
movq 0x90(%rsp), %rsi
andq %rdx, %rsi
movq %rsi, 0x68(%rsp)
movq 0xa8(%rsp), %rdi
andq %rdx, %rdi
movq 0x10(%rsp), %rdx
imulq 0x70(%rsp), %rdx
movq %rdx, 0xb0(%rsp)
movq 0x18(%rsp), %rdx
imulq 0x88(%rsp), %rdx
movq %rdx, 0xc8(%rsp)
movq 0x28(%rsp), %rdx
imulq %r12, %rdx
movq %rdx, 0x60(%rsp)
movq $0x0, 0x40(%rsp)
xorl %esi, %esi
movq %rsi, 0xb8(%rsp)
cmpq $0x0, 0x10(%rsp)
jle 0x36ec4
movq 0x40(%rsp), %rdx
movq %rdx, 0x48(%rsp)
movq $0x0, 0x50(%rsp)
xorl %esi, %esi
movq %rsi, 0xc0(%rsp)
cmpl $0x0, 0x78(%rsp)
jle 0x36e8d
movq 0x48(%rsp), %rdx
movq %rdx, 0x58(%rsp)
xorl %esi, %esi
movq %rsi, 0xd8(%rsp)
cmpq $0x0, 0x18(%rsp)
jle 0x36e62
movq 0x58(%rsp), %rdx
movq %rdx, 0x20(%rsp)
movq 0x50(%rsp), %rdx
movq %rdx, 0x8(%rsp)
xorl %esi, %esi
movq %rsi, 0xe0(%rsp)
cmpl $0x0, 0x90(%rsp)
jle 0x36e28
movq 0x20(%rsp), %r9
xorl %edx, %edx
cmpq $0x0, 0x28(%rsp)
jle 0x36e15
movq %r9, %r11
movq 0x8(%rsp), %r8
xorl %r10d, %r10d
cmpl $0x0, 0xa8(%rsp)
jle 0x36e05
movq 0x30(%rsp), %rsi
movq 0xf8(%rsi), %rsi
addq %r8, %rsi
movq 0xa0(%rsp), %r14
movq 0xf8(%r14), %r14
addq %r11, %r14
xorl %r15d, %r15d
testl %ebp, %ebp
jle 0x36dfa
xorl %r13d, %r13d
vmovss (%r14,%r13,4), %xmm0
vaddss (%rsi,%r13,4), %xmm0, %xmm0
vmovss %xmm0, (%rsi,%r13,4)
incq %r13
cmpq %r13, %rcx
jne 0x36de0
incq %r15
addq %rax, %r14
cmpq %rdi, %r15
jne 0x36dd9
incq %r10
addq %rbx, %r8
addq %r12, %r11
cmpq 0x28(%rsp), %r10
jne 0x36dab
incq %rdx
addq 0x60(%rsp), %r9
cmpq 0x68(%rsp), %rdx
jne 0x36d98
movq 0xe0(%rsp), %rsi
incq %rsi
movq 0x8(%rsp), %rdx
addq 0x98(%rsp), %rdx
movq %rdx, 0x8(%rsp)
movq 0x20(%rsp), %rdx
addq 0x88(%rsp), %rdx
movq %rdx, 0x20(%rsp)
cmpq 0x18(%rsp), %rsi
jne 0x36d7b
movq 0xd8(%rsp), %rsi
incq %rsi
movq 0x58(%rsp), %rdx
addq 0xc8(%rsp), %rdx
movq %rdx, 0x58(%rsp)
cmpq 0xd0(%rsp), %rsi
jne 0x36d51
movq 0xc0(%rsp), %rsi
incq %rsi
movq 0x50(%rsp), %rdx
addq 0x80(%rsp), %rdx
movq %rdx, 0x50(%rsp)
movq 0x48(%rsp), %rdx
addq 0x70(%rsp), %rdx
movq %rdx, 0x48(%rsp)
cmpq 0x10(%rsp), %rsi
jne 0x36d32
movq 0xb8(%rsp), %rsi
incq %rsi
movq 0x40(%rsp), %rdx
addq 0xb0(%rsp), %rdx
movq %rdx, 0x40(%rsp)
cmpq 0x38(%rsp), %rsi
jne 0x36d09
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1cb9b(%rip), %rdi # 0x53aa0
leaq 0x12774(%rip), %rdx # 0x49680
movl $0x95c, %esi # imm = 0x95C
xorl %eax, %eax
callq 0xaf40
leaq 0x1cb81(%rip), %rdi # 0x53aa0
leaq 0x12644(%rip), %rdx # 0x4956a
leaq 0x1d152(%rip), %rcx # 0x5407f
movl $0x91f, %esi # imm = 0x91F
jmp 0x36f6a
leaq 0x1cb65(%rip), %rdi # 0x53aa0
leaq 0x12628(%rip), %rdx # 0x4956a
leaq 0x12a5d(%rip), %rcx # 0x499a6
movl $0x92a, %esi # imm = 0x92A
jmp 0x36f6a
leaq 0x1cb49(%rip), %rdi # 0x53aa0
leaq 0x1260c(%rip), %rdx # 0x4956a
leaq 0x1ce10(%rip), %rcx # 0x53d75
movl $0x92b, %esi # imm = 0x92B
xorl %eax, %eax
callq 0xaf40
| ggml_compute_forward_repeat_back:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0E8h
mov [rsp+118h+var_E8], rsi
mov rax, [rsi+98h]
mov [rsp+118h+var_78], rax
cmp dword ptr [rax], 0
jnz loc_36EFE
cmp dword ptr [rdi], 0
jnz loc_36EEC
mov r14, [rsp+118h+var_E8]
mov rdi, r14
mov rbx, [rsp+118h+var_78]
mov rsi, rbx
call _ggml_can_repeat
test al, al
jz loc_36F18
mov rax, [rbx+10h]
mov rcx, [rbx+18h]
mov rsi, [rbx+20h]
mov rdi, [rbx+28h]
mov rbp, [r14+10h]
mov r9, [r14+18h]
mov r10, [r14+20h]
mov r11, [r14+28h]
mov r8, [r14+30h]
cqo
idiv rbp
mov [rsp+118h+var_70], rax
mov rax, rcx
cqo
mov [rsp+118h+var_F0], r9
idiv r9
mov [rsp+118h+var_88], rax
mov rax, rsi
cqo
mov [rsp+118h+var_100], r10
idiv r10
mov [rsp+118h+var_A0], rax
mov rax, rdi
cqo
mov [rsp+118h+var_108], r11
idiv r11
mov [rsp+118h+var_E0], rax
cmp r8, 4
jnz loc_36F34
cmp qword ptr [rbx+30h], 4
jnz loc_36F50
mov r12, [rbx+38h]
mov rax, [rbx+40h]
mov [rsp+118h+var_90], rax
mov rax, [rbx+48h]
mov [rsp+118h+var_A8], rax
mov rbx, [r14+38h]
mov rax, [r14+40h]
mov [rsp+118h+var_80], rax
mov rax, [r14+48h]
mov [rsp+118h+var_98], rax
mov rdi, r14
call _ggml_is_contiguous
test al, al
jz short loc_36BC3
mov rax, [rsp+118h+var_F0]
imul rax, rbp
mov rdx, [rsp+118h+var_100]
imul rdx, [rsp+118h+var_108]
imul rdx, rax
test edx, edx
jle loc_36C79
mov rax, [rsp+118h+var_E8]
mov rdi, [rax+0F8h]
and edx, 7FFFFFFFh
shl rdx, 2
xor esi, esi
call _memset
jmp loc_36C79
loc_36BC3:
cmp [rsp+118h+var_108], 0
jle loc_36C79
mov r13d, ebp
and r13d, 7FFFFFFFh
shl r13, 2
mov [rsp+118h+var_110], 0
xor ecx, ecx
loc_36BE8:
mov [rsp+118h+var_F8], rcx
cmp [rsp+118h+var_100], 0
jle short loc_36C54
mov r15, [rsp+118h+var_110]
xor eax, eax
loc_36BFC:
mov [rsp+118h+var_B8], rax
mov rax, [rsp+118h+var_F0]
mov r14, rax
mov [rsp+118h+var_B0], r15
test rax, rax
jle short loc_36C38
loc_36C13:
test ebp, ebp
jle short loc_36C30
mov rax, [rsp+118h+var_E8]
mov rdi, [rax+0F8h]
add rdi, r15
xor esi, esi
mov rdx, r13
call _memset
loc_36C30:
add r15, rbx
dec r14
jnz short loc_36C13
loc_36C38:
mov rax, [rsp+118h+var_B8]
inc rax
mov r15, [rsp+118h+var_B0]
add r15, [rsp+118h+var_80]
cmp rax, [rsp+118h+var_100]
jnz short loc_36BFC
loc_36C54:
mov rcx, [rsp+118h+var_F8]
inc rcx
mov rax, [rsp+118h+var_110]
add rax, [rsp+118h+var_98]
mov [rsp+118h+var_110], rax
cmp rcx, [rsp+118h+var_108]
jnz loc_36BE8
loc_36C79:
cmp dword ptr [rsp+118h+var_E0], 0
jle loc_36EEC
lea rax, ds:0[rbp*4]
mov edx, 7FFFFFFFh
mov rcx, rbp
and rcx, rdx
and [rsp+118h+var_E0], rdx
mov rsi, [rsp+118h+var_A0]
and rsi, rdx
mov [rsp+118h+var_48], rsi
mov rsi, [rsp+118h+var_88]
and rsi, rdx
mov [rsp+118h+var_B0], rsi
mov rdi, [rsp+118h+var_70]
and rdi, rdx
mov rdx, [rsp+118h+var_108]
imul rdx, [rsp+118h+var_A8]
mov [rsp+118h+var_68], rdx
mov rdx, [rsp+118h+var_100]
imul rdx, [rsp+118h+var_90]
mov [rsp+118h+var_50], rdx
mov rdx, [rsp+118h+var_F0]
imul rdx, r12
mov [rsp+118h+var_B8], rdx
mov [rsp+118h+var_D8], 0
xor esi, esi
loc_36D09:
mov [rsp+118h+var_60], rsi
cmp [rsp+118h+var_108], 0
jle loc_36EC4
mov rdx, [rsp+118h+var_D8]
mov [rsp+118h+var_D0], rdx
mov [rsp+118h+var_C8], 0
xor esi, esi
loc_36D32:
mov [rsp+118h+var_58], rsi
cmp dword ptr [rsp+118h+var_A0], 0
jle loc_36E8D
mov rdx, [rsp+118h+var_D0]
mov [rsp+118h+var_C0], rdx
xor esi, esi
loc_36D51:
mov [rsp+118h+var_40], rsi
cmp [rsp+118h+var_100], 0
jle loc_36E62
mov rdx, [rsp+118h+var_C0]
mov [rsp+118h+var_F8], rdx
mov rdx, [rsp+118h+var_C8]
mov [rsp+118h+var_110], rdx
xor esi, esi
loc_36D7B:
mov [rsp+118h+var_38], rsi
cmp dword ptr [rsp+118h+var_88], 0
jle loc_36E28
mov r9, [rsp+118h+var_F8]
xor edx, edx
loc_36D98:
cmp [rsp+118h+var_F0], 0
jle short loc_36E15
mov r11, r9
mov r8, [rsp+118h+var_110]
xor r10d, r10d
loc_36DAB:
cmp dword ptr [rsp+118h+var_70], 0
jle short loc_36E05
mov rsi, [rsp+118h+var_E8]
mov rsi, [rsi+0F8h]
add rsi, r8
mov r14, [rsp+118h+var_78]
mov r14, [r14+0F8h]
add r14, r11
xor r15d, r15d
loc_36DD9:
test ebp, ebp
jle short loc_36DFA
xor r13d, r13d
loc_36DE0:
vmovss xmm0, dword ptr [r14+r13*4]
vaddss xmm0, xmm0, dword ptr [rsi+r13*4]
vmovss dword ptr [rsi+r13*4], xmm0
inc r13
cmp rcx, r13
jnz short loc_36DE0
loc_36DFA:
inc r15
add r14, rax
cmp r15, rdi
jnz short loc_36DD9
loc_36E05:
inc r10
add r8, rbx
add r11, r12
cmp r10, [rsp+118h+var_F0]
jnz short loc_36DAB
loc_36E15:
inc rdx
add r9, [rsp+118h+var_B8]
cmp rdx, [rsp+118h+var_B0]
jnz loc_36D98
loc_36E28:
mov rsi, [rsp+118h+var_38]
inc rsi
mov rdx, [rsp+118h+var_110]
add rdx, [rsp+118h+var_80]
mov [rsp+118h+var_110], rdx
mov rdx, [rsp+118h+var_F8]
add rdx, [rsp+118h+var_90]
mov [rsp+118h+var_F8], rdx
cmp rsi, [rsp+118h+var_100]
jnz loc_36D7B
loc_36E62:
mov rsi, [rsp+118h+var_40]
inc rsi
mov rdx, [rsp+118h+var_C0]
add rdx, [rsp+118h+var_50]
mov [rsp+118h+var_C0], rdx
cmp rsi, [rsp+118h+var_48]
jnz loc_36D51
loc_36E8D:
mov rsi, [rsp+118h+var_58]
inc rsi
mov rdx, [rsp+118h+var_C8]
add rdx, [rsp+118h+var_98]
mov [rsp+118h+var_C8], rdx
mov rdx, [rsp+118h+var_D0]
add rdx, [rsp+118h+var_A8]
mov [rsp+118h+var_D0], rdx
cmp rsi, [rsp+118h+var_108]
jnz loc_36D32
loc_36EC4:
mov rsi, [rsp+118h+var_60]
inc rsi
mov rdx, [rsp+118h+var_D8]
add rdx, [rsp+118h+var_68]
mov [rsp+118h+var_D8], rdx
cmp rsi, [rsp+118h+var_E0]
jnz loc_36D09
loc_36EEC:
add rsp, 0E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_36EFE:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aFatalError; "fatal error"
mov esi, 95Ch
xor eax, eax
call _ggml_abort
loc_36F18:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlCanRepeatD; "ggml_can_repeat(dst, src0)"
mov esi, 91Fh
jmp short loc_36F6A
loc_36F34:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNb0SizeofFloat; "nb0 == sizeof(float)"
mov esi, 92Ah
jmp short loc_36F6A
loc_36F50:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNb00SizeofFloa; "nb00 == sizeof(float)"
mov esi, 92Bh
loc_36F6A:
xor eax, eax
call _ggml_abort
| long long ggml_compute_forward_repeat_back(_DWORD *a1, _QWORD *a2)
{
long long result; // rax
long long v3; // rsi
long long v4; // rdi
long long v5; // rbp
long long v6; // r12
long long v7; // rbx
int v8; // edx
long long v9; // rcx
long long v10; // r15
long long v11; // rax
long long v12; // r14
long long v13; // rsi
long long v14; // rsi
long long v15; // rsi
long long v16; // rsi
long long v17; // r9
long long v18; // rdx
long long v19; // r11
long long v20; // r8
long long i; // r10
long long v24; // r15
long long v28; // [rsp+8h] [rbp-110h]
long long v29; // [rsp+8h] [rbp-110h]
long long v30; // [rsp+10h] [rbp-108h]
long long v31; // [rsp+18h] [rbp-100h]
long long v32; // [rsp+20h] [rbp-F8h]
long long v33; // [rsp+20h] [rbp-F8h]
long long v34; // [rsp+28h] [rbp-F0h]
long long v36; // [rsp+40h] [rbp-D8h]
long long v37; // [rsp+48h] [rbp-D0h]
long long v38; // [rsp+50h] [rbp-C8h]
long long v39; // [rsp+58h] [rbp-C0h]
long long v40; // [rsp+60h] [rbp-B8h]
long long v41; // [rsp+68h] [rbp-B0h]
long long v42; // [rsp+70h] [rbp-A8h]
long long v43; // [rsp+78h] [rbp-A0h]
long long v44; // [rsp+80h] [rbp-98h]
long long v45; // [rsp+88h] [rbp-90h]
long long v46; // [rsp+90h] [rbp-88h]
long long v47; // [rsp+98h] [rbp-80h]
_QWORD *v48; // [rsp+A0h] [rbp-78h]
long long v49; // [rsp+A8h] [rbp-70h]
long long v50; // [rsp+B8h] [rbp-60h]
long long v51; // [rsp+C0h] [rbp-58h]
long long v52; // [rsp+D8h] [rbp-40h]
long long v53; // [rsp+E0h] [rbp-38h]
result = a2[19];
v48 = (_QWORD *)result;
if ( *(_DWORD *)result )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp",
2396LL,
"fatal error");
LABEL_45:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp",
2335LL,
"GGML_ASSERT(%s) failed",
"ggml_can_repeat(dst, src0)");
return ggml_compute_forward_concat();
}
if ( *a1 )
return result;
if ( !(unsigned __int8)ggml_can_repeat(a2, result) )
goto LABEL_45;
v3 = v48[4];
v4 = v48[5];
v5 = a2[2];
v49 = v48[2] / v5;
v34 = a2[3];
v46 = v48[3] / v34;
v31 = a2[4];
v43 = v3 / v31;
v30 = a2[5];
if ( a2[6] != 4LL )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp",
2346LL,
"GGML_ASSERT(%s) failed",
"nb0 == sizeof(float)");
return ggml_compute_forward_concat();
}
if ( v48[6] != 4LL )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp",
2347LL,
"GGML_ASSERT(%s) failed",
"nb00 == sizeof(float)");
return ggml_compute_forward_concat();
}
v6 = v48[7];
v45 = v48[8];
v42 = v48[9];
v7 = a2[7];
v47 = a2[8];
v44 = a2[9];
result = ggml_is_contiguous(a2, v3, v4 % v30);
if ( (_BYTE)result )
{
result = v5 * v34;
v8 = v5 * v34 * v30 * v31;
if ( v8 > 0 )
result = memset(a2[31], 0LL, 4LL * (v8 & 0x7FFFFFFF));
}
else if ( v30 > 0 )
{
v28 = 0LL;
v9 = 0LL;
do
{
v32 = v9;
if ( v31 > 0 )
{
v10 = v28;
v11 = 0LL;
do
{
v40 = v11;
v12 = v34;
v41 = v10;
if ( v34 > 0 )
{
do
{
if ( (int)v5 > 0 )
memset(v10 + a2[31], 0LL, 4 * (v5 & 0x7FFFFFFF));
v10 += v7;
--v12;
}
while ( v12 );
}
v11 = v40 + 1;
v10 = v47 + v41;
}
while ( v40 + 1 != v31 );
}
v9 = v32 + 1;
result = v44 + v28;
v28 += v44;
}
while ( v32 + 1 != v30 );
}
if ( (int)(v4 / v30) > 0 )
{
result = 4 * v5;
v36 = 0LL;
v13 = 0LL;
do
{
v50 = v13;
if ( v30 > 0 )
{
v37 = v36;
v38 = 0LL;
v14 = 0LL;
do
{
v51 = v14;
if ( (int)v43 > 0 )
{
v39 = v37;
v15 = 0LL;
do
{
v52 = v15;
if ( v31 > 0 )
{
v33 = v39;
v29 = v38;
v16 = 0LL;
do
{
v53 = v16;
if ( (int)v46 > 0 )
{
v17 = v33;
v18 = 0LL;
do
{
if ( v34 > 0 )
{
v19 = v17;
v20 = v29;
for ( i = 0LL; i != v34; ++i )
{
if ( (int)v49 > 0 )
{
_RSI = v20 + a2[31];
_R14 = v19 + v48[31];
v24 = 0LL;
do
{
if ( (int)v5 > 0 )
{
_R13 = 0LL;
do
{
__asm
{
vmovss xmm0, dword ptr [r14+r13*4]
vaddss xmm0, xmm0, dword ptr [rsi+r13*4]
vmovss dword ptr [rsi+r13*4], xmm0
}
++_R13;
}
while ( (v5 & 0x7FFFFFFF) != _R13 );
}
++v24;
_R14 += result;
}
while ( v24 != (v49 & 0x7FFFFFFF) );
}
v20 += v7;
v19 += v6;
}
}
++v18;
v17 += v6 * v34;
}
while ( v18 != (v46 & 0x7FFFFFFF) );
}
v16 = v53 + 1;
v29 += v47;
v33 += v45;
}
while ( v53 + 1 != v31 );
}
v15 = v52 + 1;
v39 += v45 * v31;
}
while ( v52 + 1 != (v43 & 0x7FFFFFFF) );
}
v14 = v51 + 1;
v38 += v44;
v37 += v42;
}
while ( v51 + 1 != v30 );
}
v13 = v50 + 1;
v36 += v42 * v30;
}
while ( v50 + 1 != ((v4 / v30) & 0x7FFFFFFF) );
}
return result;
}
| ggml_compute_forward_repeat_back:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xe8
MOV qword ptr [RSP + 0x30],RSI
MOV RAX,qword ptr [RSI + 0x98]
MOV qword ptr [RSP + 0xa0],RAX
CMP dword ptr [RAX],0x0
JNZ 0x00136efe
CMP dword ptr [RDI],0x0
JNZ 0x00136eec
MOV R14,qword ptr [RSP + 0x30]
MOV RDI,R14
MOV RBX,qword ptr [RSP + 0xa0]
MOV RSI,RBX
CALL 0x0010ab50
TEST AL,AL
JZ 0x00136f18
MOV RAX,qword ptr [RBX + 0x10]
MOV RCX,qword ptr [RBX + 0x18]
MOV RSI,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [RBX + 0x28]
MOV RBP,qword ptr [R14 + 0x10]
MOV R9,qword ptr [R14 + 0x18]
MOV R10,qword ptr [R14 + 0x20]
MOV R11,qword ptr [R14 + 0x28]
MOV R8,qword ptr [R14 + 0x30]
CQO
IDIV RBP
MOV qword ptr [RSP + 0xa8],RAX
MOV RAX,RCX
CQO
MOV qword ptr [RSP + 0x28],R9
IDIV R9
MOV qword ptr [RSP + 0x90],RAX
MOV RAX,RSI
CQO
MOV qword ptr [RSP + 0x18],R10
IDIV R10
MOV qword ptr [RSP + 0x78],RAX
MOV RAX,RDI
CQO
MOV qword ptr [RSP + 0x10],R11
IDIV R11
MOV qword ptr [RSP + 0x38],RAX
CMP R8,0x4
JNZ 0x00136f34
CMP qword ptr [RBX + 0x30],0x4
JNZ 0x00136f50
MOV R12,qword ptr [RBX + 0x38]
MOV RAX,qword ptr [RBX + 0x40]
MOV qword ptr [RSP + 0x88],RAX
MOV RAX,qword ptr [RBX + 0x48]
MOV qword ptr [RSP + 0x70],RAX
MOV RBX,qword ptr [R14 + 0x38]
MOV RAX,qword ptr [R14 + 0x40]
MOV qword ptr [RSP + 0x98],RAX
MOV RAX,qword ptr [R14 + 0x48]
MOV qword ptr [RSP + 0x80],RAX
MOV RDI,R14
CALL 0x0010a230
TEST AL,AL
JZ 0x00136bc3
MOV RAX,qword ptr [RSP + 0x28]
IMUL RAX,RBP
MOV RDX,qword ptr [RSP + 0x18]
IMUL RDX,qword ptr [RSP + 0x10]
IMUL RDX,RAX
TEST EDX,EDX
JLE 0x00136c79
MOV RAX,qword ptr [RSP + 0x30]
MOV RDI,qword ptr [RAX + 0xf8]
AND EDX,0x7fffffff
SHL RDX,0x2
XOR ESI,ESI
CALL 0x0010a480
JMP 0x00136c79
LAB_00136bc3:
CMP qword ptr [RSP + 0x10],0x0
JLE 0x00136c79
MOV R13D,EBP
AND R13D,0x7fffffff
SHL R13,0x2
MOV qword ptr [RSP + 0x8],0x0
XOR ECX,ECX
LAB_00136be8:
MOV qword ptr [RSP + 0x20],RCX
CMP qword ptr [RSP + 0x18],0x0
JLE 0x00136c54
MOV R15,qword ptr [RSP + 0x8]
XOR EAX,EAX
LAB_00136bfc:
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV R14,RAX
MOV qword ptr [RSP + 0x68],R15
TEST RAX,RAX
JLE 0x00136c38
LAB_00136c13:
TEST EBP,EBP
JLE 0x00136c30
MOV RAX,qword ptr [RSP + 0x30]
MOV RDI,qword ptr [RAX + 0xf8]
ADD RDI,R15
XOR ESI,ESI
MOV RDX,R13
CALL 0x0010a480
LAB_00136c30:
ADD R15,RBX
DEC R14
JNZ 0x00136c13
LAB_00136c38:
MOV RAX,qword ptr [RSP + 0x60]
INC RAX
MOV R15,qword ptr [RSP + 0x68]
ADD R15,qword ptr [RSP + 0x98]
CMP RAX,qword ptr [RSP + 0x18]
JNZ 0x00136bfc
LAB_00136c54:
MOV RCX,qword ptr [RSP + 0x20]
INC RCX
MOV RAX,qword ptr [RSP + 0x8]
ADD RAX,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0x8],RAX
CMP RCX,qword ptr [RSP + 0x10]
JNZ 0x00136be8
LAB_00136c79:
CMP dword ptr [RSP + 0x38],0x0
JLE 0x00136eec
LEA RAX,[RBP*0x4]
MOV EDX,0x7fffffff
MOV RCX,RBP
AND RCX,RDX
AND qword ptr [RSP + 0x38],RDX
MOV RSI,qword ptr [RSP + 0x78]
AND RSI,RDX
MOV qword ptr [RSP + 0xd0],RSI
MOV RSI,qword ptr [RSP + 0x90]
AND RSI,RDX
MOV qword ptr [RSP + 0x68],RSI
MOV RDI,qword ptr [RSP + 0xa8]
AND RDI,RDX
MOV RDX,qword ptr [RSP + 0x10]
IMUL RDX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0xb0],RDX
MOV RDX,qword ptr [RSP + 0x18]
IMUL RDX,qword ptr [RSP + 0x88]
MOV qword ptr [RSP + 0xc8],RDX
MOV RDX,qword ptr [RSP + 0x28]
IMUL RDX,R12
MOV qword ptr [RSP + 0x60],RDX
MOV qword ptr [RSP + 0x40],0x0
XOR ESI,ESI
LAB_00136d09:
MOV qword ptr [RSP + 0xb8],RSI
CMP qword ptr [RSP + 0x10],0x0
JLE 0x00136ec4
MOV RDX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x48],RDX
MOV qword ptr [RSP + 0x50],0x0
XOR ESI,ESI
LAB_00136d32:
MOV qword ptr [RSP + 0xc0],RSI
CMP dword ptr [RSP + 0x78],0x0
JLE 0x00136e8d
MOV RDX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x58],RDX
XOR ESI,ESI
LAB_00136d51:
MOV qword ptr [RSP + 0xd8],RSI
CMP qword ptr [RSP + 0x18],0x0
JLE 0x00136e62
MOV RDX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x20],RDX
MOV RDX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x8],RDX
XOR ESI,ESI
LAB_00136d7b:
MOV qword ptr [RSP + 0xe0],RSI
CMP dword ptr [RSP + 0x90],0x0
JLE 0x00136e28
MOV R9,qword ptr [RSP + 0x20]
XOR EDX,EDX
LAB_00136d98:
CMP qword ptr [RSP + 0x28],0x0
JLE 0x00136e15
MOV R11,R9
MOV R8,qword ptr [RSP + 0x8]
XOR R10D,R10D
LAB_00136dab:
CMP dword ptr [RSP + 0xa8],0x0
JLE 0x00136e05
MOV RSI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSI + 0xf8]
ADD RSI,R8
MOV R14,qword ptr [RSP + 0xa0]
MOV R14,qword ptr [R14 + 0xf8]
ADD R14,R11
XOR R15D,R15D
LAB_00136dd9:
TEST EBP,EBP
JLE 0x00136dfa
XOR R13D,R13D
LAB_00136de0:
VMOVSS XMM0,dword ptr [R14 + R13*0x4]
VADDSS XMM0,XMM0,dword ptr [RSI + R13*0x4]
VMOVSS dword ptr [RSI + R13*0x4],XMM0
INC R13
CMP RCX,R13
JNZ 0x00136de0
LAB_00136dfa:
INC R15
ADD R14,RAX
CMP R15,RDI
JNZ 0x00136dd9
LAB_00136e05:
INC R10
ADD R8,RBX
ADD R11,R12
CMP R10,qword ptr [RSP + 0x28]
JNZ 0x00136dab
LAB_00136e15:
INC RDX
ADD R9,qword ptr [RSP + 0x60]
CMP RDX,qword ptr [RSP + 0x68]
JNZ 0x00136d98
LAB_00136e28:
MOV RSI,qword ptr [RSP + 0xe0]
INC RSI
MOV RDX,qword ptr [RSP + 0x8]
ADD RDX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x8],RDX
MOV RDX,qword ptr [RSP + 0x20]
ADD RDX,qword ptr [RSP + 0x88]
MOV qword ptr [RSP + 0x20],RDX
CMP RSI,qword ptr [RSP + 0x18]
JNZ 0x00136d7b
LAB_00136e62:
MOV RSI,qword ptr [RSP + 0xd8]
INC RSI
MOV RDX,qword ptr [RSP + 0x58]
ADD RDX,qword ptr [RSP + 0xc8]
MOV qword ptr [RSP + 0x58],RDX
CMP RSI,qword ptr [RSP + 0xd0]
JNZ 0x00136d51
LAB_00136e8d:
MOV RSI,qword ptr [RSP + 0xc0]
INC RSI
MOV RDX,qword ptr [RSP + 0x50]
ADD RDX,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0x50],RDX
MOV RDX,qword ptr [RSP + 0x48]
ADD RDX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x48],RDX
CMP RSI,qword ptr [RSP + 0x10]
JNZ 0x00136d32
LAB_00136ec4:
MOV RSI,qword ptr [RSP + 0xb8]
INC RSI
MOV RDX,qword ptr [RSP + 0x40]
ADD RDX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0x40],RDX
CMP RSI,qword ptr [RSP + 0x38]
JNZ 0x00136d09
LAB_00136eec:
ADD RSP,0xe8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00136efe:
LEA RDI,[0x153aa0]
LEA RDX,[0x149680]
MOV ESI,0x95c
XOR EAX,EAX
CALL 0x0010af40
LAB_00136f18:
LEA RDI,[0x153aa0]
LEA RDX,[0x14956a]
LEA RCX,[0x15407f]
MOV ESI,0x91f
JMP 0x00136f6a
LAB_00136f34:
LEA RDI,[0x153aa0]
LEA RDX,[0x14956a]
LEA RCX,[0x1499a6]
MOV ESI,0x92a
JMP 0x00136f6a
LAB_00136f50:
LEA RDI,[0x153aa0]
LEA RDX,[0x14956a]
LEA RCX,[0x153d75]
MOV ESI,0x92b
LAB_00136f6a:
XOR EAX,EAX
CALL 0x0010af40
|
void ggml_compute_forward_repeat_back(int *param_1,long param_2)
{
int *piVar1;
long lVar2;
long lVar3;
ulong uVar4;
long lVar5;
long lVar6;
long lVar7;
long lVar8;
long lVar9;
long lVar10;
long lVar11;
long lVar12;
long lVar13;
char cVar14;
ulong uVar15;
ulong uVar16;
char *pcVar17;
uint uVar18;
ulong uVar19;
uint uVar20;
long lVar21;
long lVar22;
ulong uVar23;
long lVar24;
ulong uVar25;
int8 uVar26;
long lVar27;
long lVar28;
long lVar29;
long lVar30;
ulong uVar31;
long lVar32;
ulong uVar33;
long local_110;
long local_f8;
int local_e0;
long local_d8;
long local_d0;
long local_c8;
long local_c0;
int local_a0;
int local_88;
int local_70;
piVar1 = *(int **)(param_2 + 0x98);
if (*piVar1 != 0) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp"
,0x95c,"fatal error");
}
if (*param_1 != 0) {
return;
}
cVar14 = ggml_can_repeat(param_2,piVar1);
if (cVar14 == '\0') {
pcVar17 = "ggml_can_repeat(dst, src0)";
uVar26 = 0x91f;
}
else {
lVar2 = *(long *)(piVar1 + 4);
lVar3 = *(long *)(piVar1 + 6);
uVar4 = *(ulong *)(param_2 + 0x10);
lVar5 = *(long *)(param_2 + 0x18);
lVar6 = *(long *)(param_2 + 0x20);
lVar7 = *(long *)(param_2 + 0x28);
uVar15 = *(long *)(piVar1 + 8) / lVar6;
uVar16 = *(long *)(piVar1 + 10) / lVar7;
if (*(long *)(param_2 + 0x30) == 4) {
if (*(long *)(piVar1 + 0xc) == 4) {
lVar8 = *(long *)(piVar1 + 0xe);
lVar9 = *(long *)(piVar1 + 0x10);
lVar10 = *(long *)(piVar1 + 0x12);
lVar11 = *(long *)(param_2 + 0x38);
lVar12 = *(long *)(param_2 + 0x40);
lVar13 = *(long *)(param_2 + 0x48);
cVar14 = ggml_is_contiguous(param_2,*(long *)(piVar1 + 8),*(long *)(piVar1 + 10) % lVar7);
uVar20 = (uint)uVar4;
if (cVar14 == '\0') {
if (0 < lVar7) {
local_110 = 0;
lVar24 = 0;
do {
if (0 < lVar6) {
lVar28 = 0;
lVar22 = local_110;
do {
lVar27 = lVar5;
lVar30 = lVar22;
if (0 < lVar5) {
do {
if (0 < (int)uVar20) {
memset((void *)(*(long *)(param_2 + 0xf8) + lVar30),0,
(ulong)(uVar20 & 0x7fffffff) << 2);
}
lVar30 = lVar30 + lVar11;
lVar27 = lVar27 + -1;
} while (lVar27 != 0);
}
lVar28 = lVar28 + 1;
lVar22 = lVar22 + lVar12;
} while (lVar28 != lVar6);
}
lVar24 = lVar24 + 1;
local_110 = local_110 + lVar13;
} while (lVar24 != lVar7);
}
}
else {
uVar18 = (int)lVar6 * (int)lVar7 * (int)lVar5 * uVar20;
if (0 < (int)uVar18) {
memset(*(void **)(param_2 + 0xf8),0,(ulong)(uVar18 & 0x7fffffff) << 2);
}
}
local_e0 = (int)uVar16;
if (local_e0 < 1) {
return;
}
local_d8 = 0;
uVar25 = 0;
do {
if (0 < lVar7) {
local_d0 = local_d8;
local_c8 = 0;
lVar24 = 0;
do {
local_a0 = (int)uVar15;
if (0 < local_a0) {
local_c0 = local_d0;
uVar23 = 0;
do {
if (0 < lVar6) {
local_f8 = local_c0;
local_110 = local_c8;
lVar22 = 0;
do {
local_88 = (int)(lVar3 / lVar5);
if (0 < local_88) {
uVar19 = 0;
lVar28 = local_f8;
do {
if (0 < lVar5) {
lVar29 = 0;
lVar27 = local_110;
lVar30 = lVar28;
do {
local_70 = (int)(lVar2 / (long)uVar4);
if (0 < local_70) {
lVar21 = *(long *)(param_2 + 0xf8) + lVar27;
lVar32 = *(long *)(piVar1 + 0x3e) + lVar30;
uVar33 = 0;
do {
if (0 < (int)uVar20) {
uVar31 = 0;
do {
*(float *)(lVar21 + uVar31 * 4) =
*(float *)(lVar32 + uVar31 * 4) +
*(float *)(lVar21 + uVar31 * 4);
uVar31 = uVar31 + 1;
} while ((uVar4 & 0x7fffffff) != uVar31);
}
uVar33 = uVar33 + 1;
lVar32 = lVar32 + uVar4 * 4;
} while (uVar33 != (lVar2 / (long)uVar4 & 0x7fffffffU));
}
lVar29 = lVar29 + 1;
lVar27 = lVar27 + lVar11;
lVar30 = lVar30 + lVar8;
} while (lVar29 != lVar5);
}
uVar19 = uVar19 + 1;
lVar28 = lVar28 + lVar5 * lVar8;
} while (uVar19 != (lVar3 / lVar5 & 0x7fffffffU));
}
lVar22 = lVar22 + 1;
local_110 = local_110 + lVar12;
local_f8 = local_f8 + lVar9;
} while (lVar22 != lVar6);
}
uVar23 = uVar23 + 1;
local_c0 = local_c0 + lVar6 * lVar9;
} while (uVar23 != (uVar15 & 0x7fffffff));
}
lVar24 = lVar24 + 1;
local_c8 = local_c8 + lVar13;
local_d0 = local_d0 + lVar10;
} while (lVar24 != lVar7);
}
uVar25 = uVar25 + 1;
local_d8 = local_d8 + lVar7 * lVar10;
} while (uVar25 != (uVar16 & 0x7fffffff));
return;
}
pcVar17 = "nb00 == sizeof(float)";
uVar26 = 0x92b;
}
else {
pcVar17 = "nb0 == sizeof(float)";
uVar26 = 0x92a;
}
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp",
uVar26,"GGML_ASSERT(%s) failed",pcVar17);
}
| |
33,513 | list_free | eloqsql/mysys/list.c | void list_free(LIST *root, uint free_data)
{
LIST *next;
while (root)
{
next=root->next;
if (free_data)
my_free(root->data);
my_free(root);
root=next;
}
} | O0 | c | list_free:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xe6e48
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0xe6e35
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xfb710
movq -0x8(%rbp), %rdi
callq 0xfb710
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xe6e0f
addq $0x20, %rsp
popq %rbp
retq
nop
| list_free:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
loc_E6E0F:
cmp [rbp+var_8], 0
jz short loc_E6E48
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov [rbp+var_18], rax
cmp [rbp+var_C], 0
jz short loc_E6E35
mov rax, [rbp+var_8]
mov rdi, [rax+10h]
call my_free
loc_E6E35:
mov rdi, [rbp+var_8]
call my_free
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
jmp short loc_E6E0F
loc_E6E48:
add rsp, 20h
pop rbp
retn
| long long list_free(long long a1, int a2)
{
long long result; // rax
long long v3; // [rsp+8h] [rbp-18h]
while ( a1 )
{
v3 = *(_QWORD *)(a1 + 8);
if ( a2 )
my_free(*(_QWORD *)(a1 + 16));
my_free(a1);
result = v3;
a1 = v3;
}
return result;
}
| list_free:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
LAB_001e6e0f:
CMP qword ptr [RBP + -0x8],0x0
JZ 0x001e6e48
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x18],RAX
CMP dword ptr [RBP + -0xc],0x0
JZ 0x001e6e35
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x001fb710
LAB_001e6e35:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001fb710
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001e6e0f
LAB_001e6e48:
ADD RSP,0x20
POP RBP
RET
|
void list_free(long param_1,int param_2)
{
long lVar1;
int8 local_10;
local_10 = param_1;
while (local_10 != 0) {
lVar1 = *(long *)(local_10 + 8);
if (param_2 != 0) {
my_free(*(int8 *)(local_10 + 0x10));
}
my_free(local_10);
local_10 = lVar1;
}
return;
}
| |
33,514 | gguf_write_to_buf(gguf_context const*, std::vector<signed char, std::allocator<signed char>>&, bool) | ngxson[P]ggml-easy/ggml/src/gguf.cpp | void gguf_write_to_buf(const struct gguf_context * ctx, std::vector<int8_t> & buf, bool only_meta) {
const struct gguf_writer gw(buf);
const int64_t n_kv = gguf_get_n_kv(ctx);
const int64_t n_tensors = gguf_get_n_tensors(ctx);
// write header
gw.write(GGUF_MAGIC[0]);
gw.write(GGUF_MAGIC[1]);
gw.write(GGUF_MAGIC[2]);
gw.write(GGUF_MAGIC[3]);
gw.write(ctx->version);
gw.write(n_tensors);
gw.write(n_kv);
// write key-value pairs
for (int64_t i = 0; i < n_kv; ++i) {
gw.write(ctx->kv[i]);
}
// write tensor info
for (int64_t i = 0; i < n_tensors; ++i) {
gw.write_tensor_meta(ctx->info[i]);
}
// we require the data section to be aligned
gw.pad(ctx->alignment);
if (only_meta) {
return;
}
const size_t offset_data = gw.buf.size();
// write tensor data
for (int64_t i = 0; i < n_tensors; ++i) {
gw.write_tensor_data(ctx->info[i], offset_data, ctx->alignment);
}
} | O1 | cpp | gguf_write_to_buf(gguf_context const*, std::vector<signed char, std::allocator<signed char>>&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq %rsi, (%rsp)
movq 0x10(%rdi), %rax
subq 0x8(%rdi), %rax
sarq $0x3, %rax
movabsq $0x2e8ba2e8ba2e8ba3, %rcx # imm = 0x2E8BA2E8BA2E8BA3
imulq %rax, %rcx
movq %rcx, 0x10(%rsp)
movq 0x28(%rdi), %rax
subq 0x20(%rdi), %rax
movl %edx, %ebp
sarq $0x3, %rax
movabsq $-0x7d05f417d05f417d, %rcx # imm = 0x82FA0BE82FA0BE83
imulq %rax, %rcx
movq %rcx, 0x8(%rsp)
movq 0x8(%rsi), %rax
cmpq 0x10(%rsi), %rax
je 0x3f3c6
movb $0x47, (%rax)
incq 0x8(%rsi)
jmp 0x3f3d8
leaq 0x1a806(%rip), %rdx # 0x59bd3
movq %rsi, %rdi
movq %rax, %rsi
callq 0x17810
movq (%rsp), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x3f3ef
movb $0x47, (%rsi)
incq 0x8(%rdi)
jmp 0x3f3fb
leaq 0x1a7de(%rip), %rdx # 0x59bd4
callq 0x17810
movq (%rsp), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x3f412
movb $0x55, (%rsi)
incq 0x8(%rdi)
jmp 0x3f41e
leaq 0x1a7bc(%rip), %rdx # 0x59bd5
callq 0x17810
movq (%rsp), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x3f435
movb $0x46, (%rsi)
incq 0x8(%rdi)
jmp 0x3f441
leaq 0x1a79a(%rip), %rdx # 0x59bd6
callq 0x17810
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x17b30
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x17a20
leaq 0x10(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x17a20
cmpq $0x0, (%r15)
jle 0x3f498
xorl %r15d, %r15d
movq %rsp, %r14
xorl %r12d, %r12d
movq 0x8(%rbx), %rsi
addq %r15, %rsi
movq %r14, %rdi
callq 0x16070
incq %r12
addq $0x58, %r15
cmpq 0x10(%rsp), %r12
jl 0x3f47b
cmpq $0x0, 0x8(%rsp)
jle 0x3f4c9
xorl %r15d, %r15d
movq %rsp, %r14
xorl %r12d, %r12d
movq 0x20(%rbx), %rsi
addq %r15, %rsi
movq %r14, %rdi
callq 0x16ae0
incq %r12
addq $0x158, %r15 # imm = 0x158
cmpq 0x8(%rsp), %r12
jl 0x3f4a9
movq 0x38(%rbx), %rsi
movq %rsp, %rdi
callq 0x17300
testb %bpl, %bpl
jne 0x3f51c
cmpq $0x0, 0x8(%rsp)
jle 0x3f51c
movq %rsp, %r14
movq (%r14), %rax
movq 0x8(%rax), %r15
subq (%rax), %r15
xorl %r12d, %r12d
xorl %r13d, %r13d
movq 0x20(%rbx), %rsi
addq %r12, %rsi
movq 0x38(%rbx), %rcx
movq %r14, %rdi
movq %r15, %rdx
callq 0x161d0
incq %r13
addq $0x158, %r12 # imm = 0x158
cmpq 0x8(%rsp), %r13
jl 0x3f4f5
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _Z17gguf_write_to_bufPK12gguf_contextRSt6vectorIaSaIaEEb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
mov [rsp+48h+var_48], rsi
mov rax, [rdi+10h]
sub rax, [rdi+8]
sar rax, 3
mov rcx, 2E8BA2E8BA2E8BA3h
imul rcx, rax
mov [rsp+48h+var_38], rcx
mov rax, [rdi+28h]
sub rax, [rdi+20h]
mov ebp, edx
sar rax, 3
mov rcx, 82FA0BE82FA0BE83h
imul rcx, rax
mov [rsp+48h+var_40], rcx
mov rax, [rsi+8]
cmp rax, [rsi+10h]
jz short loc_3F3C6
mov byte ptr [rax], 47h ; 'G'
inc qword ptr [rsi+8]
jmp short loc_3F3D8
loc_3F3C6:
lea rdx, aGguf; "GGUF"
mov rdi, rsi
mov rsi, rax
call __ZNSt6vectorIaSaIaEE17_M_realloc_insertIJRKaEEEvN9__gnu_cxx17__normal_iteratorIPaS1_EEDpOT_; std::vector<signed char>::_M_realloc_insert<signed char const&>(__gnu_cxx::__normal_iterator<signed char *,std::vector<signed char>>,signed char const&)
loc_3F3D8:
mov rdi, [rsp+48h+var_48]
mov rsi, [rdi+8]
cmp rsi, [rdi+10h]
jz short loc_3F3EF
mov byte ptr [rsi], 47h ; 'G'
inc qword ptr [rdi+8]
jmp short loc_3F3FB
loc_3F3EF:
lea rdx, aGguf+1; "GUF"
call __ZNSt6vectorIaSaIaEE17_M_realloc_insertIJRKaEEEvN9__gnu_cxx17__normal_iteratorIPaS1_EEDpOT_; std::vector<signed char>::_M_realloc_insert<signed char const&>(__gnu_cxx::__normal_iterator<signed char *,std::vector<signed char>>,signed char const&)
loc_3F3FB:
mov rdi, [rsp+48h+var_48]
mov rsi, [rdi+8]
cmp rsi, [rdi+10h]
jz short loc_3F412
mov byte ptr [rsi], 55h ; 'U'
inc qword ptr [rdi+8]
jmp short loc_3F41E
loc_3F412:
lea rdx, aGguf+2; "UF"
call __ZNSt6vectorIaSaIaEE17_M_realloc_insertIJRKaEEEvN9__gnu_cxx17__normal_iteratorIPaS1_EEDpOT_; std::vector<signed char>::_M_realloc_insert<signed char const&>(__gnu_cxx::__normal_iterator<signed char *,std::vector<signed char>>,signed char const&)
loc_3F41E:
mov rdi, [rsp+48h+var_48]
mov rsi, [rdi+8]
cmp rsi, [rdi+10h]
jz short loc_3F435
mov byte ptr [rsi], 46h ; 'F'
inc qword ptr [rdi+8]
jmp short loc_3F441
loc_3F435:
lea rdx, aGguf+3; "F"
call __ZNSt6vectorIaSaIaEE17_M_realloc_insertIJRKaEEEvN9__gnu_cxx17__normal_iteratorIPaS1_EEDpOT_; std::vector<signed char>::_M_realloc_insert<signed char const&>(__gnu_cxx::__normal_iterator<signed char *,std::vector<signed char>>,signed char const&)
loc_3F441:
mov r14, rsp
mov rdi, r14
mov rsi, rbx
call __ZNK11gguf_writer5writeIjEEvRKT_; gguf_writer::write<uint>(uint const&)
lea rsi, [rsp+48h+var_40]
mov rdi, r14
call __ZNK11gguf_writer5writeIlEEvRKT_; gguf_writer::write<long>(long const&)
lea r15, [rsp+48h+var_38]
mov rdi, r14
mov rsi, r15
call __ZNK11gguf_writer5writeIlEEvRKT_; gguf_writer::write<long>(long const&)
cmp qword ptr [r15], 0
jle short loc_3F498
xor r15d, r15d
mov r14, rsp
xor r12d, r12d
loc_3F47B:
mov rsi, [rbx+8]
add rsi, r15; gguf_kv *
mov rdi, r14; this
call __ZNK11gguf_writer5writeERK7gguf_kv; gguf_writer::write(gguf_kv const&)
inc r12
add r15, 58h ; 'X'
cmp r12, [rsp+48h+var_38]
jl short loc_3F47B
loc_3F498:
cmp [rsp+48h+var_40], 0
jle short loc_3F4C9
xor r15d, r15d
mov r14, rsp
xor r12d, r12d
loc_3F4A9:
mov rsi, [rbx+20h]
add rsi, r15
mov rdi, r14
call __ZNK11gguf_writer17write_tensor_metaERK16gguf_tensor_info; gguf_writer::write_tensor_meta(gguf_tensor_info const&)
inc r12
add r15, 158h
cmp r12, [rsp+48h+var_40]
jl short loc_3F4A9
loc_3F4C9:
mov rsi, [rbx+38h]; unsigned __int64
mov rdi, rsp; this
call __ZNK11gguf_writer3padEm; gguf_writer::pad(ulong)
test bpl, bpl
jnz short loc_3F51C
cmp [rsp+48h+var_40], 0
jle short loc_3F51C
mov r14, rsp
mov rax, [r14]
mov r15, [rax+8]
sub r15, [rax]
xor r12d, r12d
xor r13d, r13d
loc_3F4F5:
mov rsi, [rbx+20h]
add rsi, r12
mov rcx, [rbx+38h]
mov rdi, r14; this
mov rdx, r15
call __ZNK11gguf_writer17write_tensor_dataERK16gguf_tensor_infomm; gguf_writer::write_tensor_data(gguf_tensor_info const&,ulong,ulong)
inc r13
add r12, 158h
cmp r13, [rsp+48h+var_40]
jl short loc_3F4F5
loc_3F51C:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long gguf_write_to_buf(_QWORD *a1, long long a2, char a3)
{
_BYTE *v5; // rax
long long v6; // rdi
_BYTE *v7; // rsi
long long v8; // rdi
_BYTE *v9; // rsi
long long v10; // rdi
_BYTE *v11; // rsi
long long v12; // r15
long long v13; // r12
long long v14; // r15
signed long long i; // r12
long long result; // rax
long long v17; // r12
signed long long j; // r13
long long v19; // [rsp+0h] [rbp-48h] BYREF
signed long long v20; // [rsp+8h] [rbp-40h] BYREF
long long v21[7]; // [rsp+10h] [rbp-38h] BYREF
v19 = a2;
v21[0] = 0x2E8BA2E8BA2E8BA3LL * ((long long)(a1[2] - a1[1]) >> 3);
v20 = 0x82FA0BE82FA0BE83LL * ((long long)(a1[5] - a1[4]) >> 3);
v5 = *(_BYTE **)(a2 + 8);
if ( v5 == *(_BYTE **)(a2 + 16) )
{
std::vector<signed char>::_M_realloc_insert<signed char const&>(a2, *(_QWORD *)(a2 + 8), "GGUF");
}
else
{
*v5 = 71;
++*(_QWORD *)(a2 + 8);
}
v6 = v19;
v7 = *(_BYTE **)(v19 + 8);
if ( v7 == *(_BYTE **)(v19 + 16) )
{
std::vector<signed char>::_M_realloc_insert<signed char const&>(v19, v7, "GUF");
}
else
{
*v7 = 71;
++*(_QWORD *)(v6 + 8);
}
v8 = v19;
v9 = *(_BYTE **)(v19 + 8);
if ( v9 == *(_BYTE **)(v19 + 16) )
{
std::vector<signed char>::_M_realloc_insert<signed char const&>(v19, v9, "UF");
}
else
{
*v9 = 85;
++*(_QWORD *)(v8 + 8);
}
v10 = v19;
v11 = *(_BYTE **)(v19 + 8);
if ( v11 == *(_BYTE **)(v19 + 16) )
{
std::vector<signed char>::_M_realloc_insert<signed char const&>(v19, v11, "F");
}
else
{
*v11 = 70;
++*(_QWORD *)(v10 + 8);
}
gguf_writer::write<unsigned int>(&v19, a1);
gguf_writer::write<long>(&v19, &v20);
gguf_writer::write<long>(&v19, v21);
if ( v21[0] > 0 )
{
v12 = 0LL;
v13 = 0LL;
do
{
gguf_writer::write((gguf_writer *)&v19, (const gguf_kv *)(v12 + a1[1]));
++v13;
v12 += 88LL;
}
while ( v13 < v21[0] );
}
if ( v20 > 0 )
{
v14 = 0LL;
for ( i = 0LL; i < v20; ++i )
{
gguf_writer::write_tensor_meta(&v19, v14 + a1[4]);
v14 += 344LL;
}
}
result = gguf_writer::pad((gguf_writer *)&v19, a1[7]);
if ( !a3 && v20 > 0 )
{
v17 = 0LL;
for ( j = 0LL; j < v20; ++j )
{
result = gguf_writer::write_tensor_data((gguf_writer *)&v19);
v17 += 344LL;
}
}
return result;
}
| gguf_write_to_buf:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
MOV qword ptr [RSP],RSI
MOV RAX,qword ptr [RDI + 0x10]
SUB RAX,qword ptr [RDI + 0x8]
SAR RAX,0x3
MOV RCX,0x2e8ba2e8ba2e8ba3
IMUL RCX,RAX
MOV qword ptr [RSP + 0x10],RCX
MOV RAX,qword ptr [RDI + 0x28]
SUB RAX,qword ptr [RDI + 0x20]
MOV EBP,EDX
SAR RAX,0x3
MOV RCX,-0x7d05f417d05f417d
IMUL RCX,RAX
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RSI + 0x8]
CMP RAX,qword ptr [RSI + 0x10]
JZ 0x0013f3c6
MOV byte ptr [RAX],0x47
INC qword ptr [RSI + 0x8]
JMP 0x0013f3d8
LAB_0013f3c6:
LEA RDX,[0x159bd3]
MOV RDI,RSI
MOV RSI,RAX
CALL 0x00117810
LAB_0013f3d8:
MOV RDI,qword ptr [RSP]
MOV RSI,qword ptr [RDI + 0x8]
CMP RSI,qword ptr [RDI + 0x10]
JZ 0x0013f3ef
MOV byte ptr [RSI],0x47
INC qword ptr [RDI + 0x8]
JMP 0x0013f3fb
LAB_0013f3ef:
LEA RDX,[0x159bd4]
CALL 0x00117810
LAB_0013f3fb:
MOV RDI,qword ptr [RSP]
MOV RSI,qword ptr [RDI + 0x8]
CMP RSI,qword ptr [RDI + 0x10]
JZ 0x0013f412
MOV byte ptr [RSI],0x55
INC qword ptr [RDI + 0x8]
JMP 0x0013f41e
LAB_0013f412:
LEA RDX,[0x159bd5]
CALL 0x00117810
LAB_0013f41e:
MOV RDI,qword ptr [RSP]
MOV RSI,qword ptr [RDI + 0x8]
CMP RSI,qword ptr [RDI + 0x10]
JZ 0x0013f435
MOV byte ptr [RSI],0x46
INC qword ptr [RDI + 0x8]
JMP 0x0013f441
LAB_0013f435:
LEA RDX,[0x159bd6]
CALL 0x00117810
LAB_0013f441:
MOV R14,RSP
MOV RDI,R14
MOV RSI,RBX
CALL 0x00117b30
LEA RSI,[RSP + 0x8]
MOV RDI,R14
CALL 0x00117a20
LEA R15,[RSP + 0x10]
MOV RDI,R14
MOV RSI,R15
CALL 0x00117a20
CMP qword ptr [R15],0x0
JLE 0x0013f498
XOR R15D,R15D
MOV R14,RSP
XOR R12D,R12D
LAB_0013f47b:
MOV RSI,qword ptr [RBX + 0x8]
ADD RSI,R15
MOV RDI,R14
CALL 0x00116070
INC R12
ADD R15,0x58
CMP R12,qword ptr [RSP + 0x10]
JL 0x0013f47b
LAB_0013f498:
CMP qword ptr [RSP + 0x8],0x0
JLE 0x0013f4c9
XOR R15D,R15D
MOV R14,RSP
XOR R12D,R12D
LAB_0013f4a9:
MOV RSI,qword ptr [RBX + 0x20]
ADD RSI,R15
MOV RDI,R14
CALL 0x00116ae0
INC R12
ADD R15,0x158
CMP R12,qword ptr [RSP + 0x8]
JL 0x0013f4a9
LAB_0013f4c9:
MOV RSI,qword ptr [RBX + 0x38]
MOV RDI,RSP
CALL 0x00117300
TEST BPL,BPL
JNZ 0x0013f51c
CMP qword ptr [RSP + 0x8],0x0
JLE 0x0013f51c
MOV R14,RSP
MOV RAX,qword ptr [R14]
MOV R15,qword ptr [RAX + 0x8]
SUB R15,qword ptr [RAX]
XOR R12D,R12D
XOR R13D,R13D
LAB_0013f4f5:
MOV RSI,qword ptr [RBX + 0x20]
ADD RSI,R12
MOV RCX,qword ptr [RBX + 0x38]
MOV RDI,R14
MOV RDX,R15
CALL 0x001161d0
INC R13
ADD R12,0x158
CMP R13,qword ptr [RSP + 0x8]
JL 0x0013f4f5
LAB_0013f51c:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* gguf_write_to_buf(gguf_context const*, std::vector<signed char, std::allocator<signed char> >&,
bool) */
void gguf_write_to_buf(gguf_context *param_1,vector *param_2,bool param_3)
{
int1 *puVar1;
long lVar2;
long lVar3;
long lVar4;
long lVar5;
vector *local_48;
long local_40;
long local_38;
local_38 = (*(long *)(param_1 + 0x10) - *(long *)(param_1 + 8) >> 3) * 0x2e8ba2e8ba2e8ba3;
local_40 = (*(long *)(param_1 + 0x28) - *(long *)(param_1 + 0x20) >> 3) * -0x7d05f417d05f417d;
puVar1 = *(int1 **)(param_2 + 8);
local_48 = param_2;
if (puVar1 == *(int1 **)(param_2 + 0x10)) {
std::vector<signed_char,std::allocator<signed_char>>::_M_realloc_insert<signed_char_const&>
((vector<signed_char,std::allocator<signed_char>> *)param_2,puVar1,&DAT_00159bd3);
}
else {
*puVar1 = 0x47;
*(long *)(param_2 + 8) = *(long *)(param_2 + 8) + 1;
}
puVar1 = *(int1 **)(local_48 + 8);
if (puVar1 == *(int1 **)(local_48 + 0x10)) {
std::vector<signed_char,std::allocator<signed_char>>::_M_realloc_insert<signed_char_const&>
((vector<signed_char,std::allocator<signed_char>> *)local_48,puVar1,&DAT_00159bd4);
}
else {
*puVar1 = 0x47;
*(long *)(local_48 + 8) = *(long *)(local_48 + 8) + 1;
}
puVar1 = *(int1 **)(local_48 + 8);
if (puVar1 == *(int1 **)(local_48 + 0x10)) {
std::vector<signed_char,std::allocator<signed_char>>::_M_realloc_insert<signed_char_const&>
((vector<signed_char,std::allocator<signed_char>> *)local_48,puVar1,&DAT_00159bd5);
}
else {
*puVar1 = 0x55;
*(long *)(local_48 + 8) = *(long *)(local_48 + 8) + 1;
}
puVar1 = *(int1 **)(local_48 + 8);
if (puVar1 == *(int1 **)(local_48 + 0x10)) {
std::vector<signed_char,std::allocator<signed_char>>::_M_realloc_insert<signed_char_const&>
((vector<signed_char,std::allocator<signed_char>> *)local_48,puVar1,&DAT_00159bd6);
}
else {
*puVar1 = 0x46;
*(long *)(local_48 + 8) = *(long *)(local_48 + 8) + 1;
}
gguf_writer::write<unsigned_int>((gguf_writer *)&local_48,(uint *)param_1);
gguf_writer::write<long>((gguf_writer *)&local_48,&local_40);
gguf_writer::write<long>((gguf_writer *)&local_48,&local_38);
if (0 < local_38) {
lVar5 = 0;
lVar2 = 0;
do {
gguf_writer::write((gguf_writer *)&local_48,(gguf_kv *)(*(long *)(param_1 + 8) + lVar5));
lVar2 = lVar2 + 1;
lVar5 = lVar5 + 0x58;
} while (lVar2 < local_38);
}
if (0 < local_40) {
lVar5 = 0;
lVar2 = 0;
do {
gguf_writer::write_tensor_meta
((gguf_writer *)&local_48,(gguf_tensor_info *)(*(long *)(param_1 + 0x20) + lVar5));
lVar2 = lVar2 + 1;
lVar5 = lVar5 + 0x158;
} while (lVar2 < local_40);
}
gguf_writer::pad((gguf_writer *)&local_48,*(ulong *)(param_1 + 0x38));
if ((!param_3) && (0 < local_40)) {
lVar2 = *(long *)(local_48 + 8);
lVar5 = *(long *)local_48;
lVar3 = 0;
lVar4 = 0;
do {
gguf_writer::write_tensor_data
((gguf_writer *)&local_48,(gguf_tensor_info *)(*(long *)(param_1 + 0x20) + lVar3),
lVar2 - lVar5,*(ulong *)(param_1 + 0x38));
lVar4 = lVar4 + 1;
lVar3 = lVar3 + 0x158;
} while (lVar4 < local_40);
}
return;
}
| |
33,515 | os_event_init | navaro[P]qoraal-tictactoe/build_O3/_deps/qoraal-src/src/os_posix.c | int32_t
os_event_init (p_event_t* event)
{
if (event == NULL) {
return EFAIL;
}
os_event_t* pevent = (os_event_t*)(*event);
if (pthread_cond_init(&pevent->cond, NULL) != 0 ||
pthread_mutex_init(&pevent->mutex, NULL) != 0) {
qoraal_free(QORAAL_HeapOperatingSystem, *event);
*event = NULL;
return EFAIL;
}
pevent->flags = 0;
return EOK;
} | O3 | c | os_event_init:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
testq %rdi, %rdi
je 0x15339
movq %rdi, %r14
movq (%rdi), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x6380
testl %eax, %eax
jne 0x15328
leaq 0x30(%r15), %rdi
xorl %esi, %esi
callq 0x6550
testl %eax, %eax
je 0x15346
movq (%r14), %rsi
xorl %edi, %edi
callq 0x14243
movq $0x0, (%r14)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x0, 0x58(%r15)
xorl %ebx, %ebx
jmp 0x15339
| os_event_init:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov ebx, 0FFFFFFFFh
test rdi, rdi
jz short loc_15339
mov r14, rdi
mov r15, [rdi]
mov rdi, r15
xor esi, esi
call _pthread_cond_init
test eax, eax
jnz short loc_15328
lea rdi, [r15+30h]
xor esi, esi
call _pthread_mutex_init
test eax, eax
jz short loc_15346
loc_15328:
mov rsi, [r14]
xor edi, edi
call qoraal_free
mov qword ptr [r14], 0
loc_15339:
mov eax, ebx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_15346:
mov dword ptr [r15+58h], 0
xor ebx, ebx
jmp short loc_15339
| long long os_event_init(long long *a1)
{
unsigned int v1; // ebx
long long v2; // r15
v1 = -1;
if ( a1 )
{
v2 = *a1;
if ( (unsigned int)pthread_cond_init(*a1, 0LL) || (unsigned int)pthread_mutex_init(v2 + 48, 0LL) )
{
qoraal_free(0LL, *a1);
*a1 = 0LL;
}
else
{
*(_DWORD *)(v2 + 88) = 0;
return 0;
}
}
return v1;
}
| os_event_init:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,0xffffffff
TEST RDI,RDI
JZ 0x00115339
MOV R14,RDI
MOV R15,qword ptr [RDI]
MOV RDI,R15
XOR ESI,ESI
CALL 0x00106380
TEST EAX,EAX
JNZ 0x00115328
LEA RDI,[R15 + 0x30]
XOR ESI,ESI
CALL 0x00106550
TEST EAX,EAX
JZ 0x00115346
LAB_00115328:
MOV RSI,qword ptr [R14]
XOR EDI,EDI
CALL 0x00114243
MOV qword ptr [R14],0x0
LAB_00115339:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00115346:
MOV dword ptr [R15 + 0x58],0x0
XOR EBX,EBX
JMP 0x00115339
|
int8 os_event_init(int8 *param_1)
{
pthread_cond_t *__cond;
int iVar1;
if (param_1 != (int8 *)0x0) {
__cond = (pthread_cond_t *)*param_1;
iVar1 = pthread_cond_init(__cond,(pthread_condattr_t *)0x0);
if ((iVar1 == 0) &&
(iVar1 = pthread_mutex_init((pthread_mutex_t *)(__cond + 1),(pthread_mutexattr_t *)0x0),
iVar1 == 0)) {
*(int4 *)((long)__cond + 0x58) = 0;
return 0;
}
qoraal_free(0,*param_1);
*param_1 = 0;
}
return 0xffffffff;
}
| |
33,516 | mysys_namespace::crc32c::cpuid_ecx() | eloqsql/mysys/crc32/crc32c.cc | static uint32_t cpuid_ecx()
{
#ifdef __GNUC__
uint32_t reax= 0, rebx= 0, recx= 0, redx= 0;
__cpuid(1, reax, rebx, recx, redx);
return recx;
#elif defined _MSC_VER
int regs[4];
__cpuid(regs, 1);
return regs[2];
#else
# error "unknown compiler"
#endif
} | O0 | cpp | mysys_namespace::crc32c::cpuid_ecx():
pushq %rbp
movq %rsp, %rbp
movl $0x0, -0x4(%rbp)
movl $0x0, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl $0x1, %eax
xchgq %rbx, %rsi
cpuid
xchgq %rbx, %rsi
movl %esi, -0x14(%rbp)
movl %eax, %esi
movl -0x14(%rbp), %eax
movl %esi, -0x4(%rbp)
movl %eax, -0x8(%rbp)
movl %ecx, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl -0xc(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZN15mysys_namespace6crc32cL9cpuid_ecxEv:
push rbp
mov rbp, rsp
mov [rbp+var_4], 0
mov [rbp+var_8], 0
mov [rbp+var_C], 0
mov [rbp+var_10], 0
mov eax, 1
xchg rsi, rbx
cpuid
xchg rsi, rbx
mov [rbp+var_14], esi
mov esi, eax
mov eax, [rbp+var_14]
mov [rbp+var_4], esi
mov [rbp+var_8], eax
mov [rbp+var_C], ecx
mov [rbp+var_10], edx
mov eax, [rbp+var_C]
pop rbp
retn
| long long mysys_namespace::crc32c::cpuid_ecx(mysys_namespace::crc32c *this)
{
_RAX = 1LL;
__asm { cpuid }
return (unsigned int)_RCX;
}
| cpuid_ecx:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],0x0
MOV dword ptr [RBP + -0x8],0x0
MOV dword ptr [RBP + -0xc],0x0
MOV dword ptr [RBP + -0x10],0x0
MOV EAX,0x1
XCHG RBX,RSI
CPUID
XCHG RBX,RSI
MOV dword ptr [RBP + -0x14],ESI
MOV ESI,EAX
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x4],ESI
MOV dword ptr [RBP + -0x8],EAX
MOV dword ptr [RBP + -0xc],ECX
MOV dword ptr [RBP + -0x10],EDX
MOV EAX,dword ptr [RBP + -0xc]
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x001d0288) */
/* mysys_namespace::crc32c::cpuid_ecx() */
int4 mysys_namespace::crc32c::cpuid_ecx(void)
{
long lVar1;
lVar1 = cpuid_Version_info(1);
return *(int4 *)(lVar1 + 0xc);
}
| |
33,517 | my_caseup_utf32 | eloqsql/strings/ctype-ucs2.c | static size_t
my_caseup_utf32(CHARSET_INFO *cs, const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
int res;
const char *srcend= src + srclen;
char *dstend= dst + dstlen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(srclen <= dstlen);
while ((src < srcend) &&
(res= my_utf32_uni(cs, &wc, (uchar *)src, (uchar*) srcend)) > 0)
{
my_toupper_utf32(uni_plane, &wc);
if (res != my_uni_utf32(cs, wc, (uchar*) dst, (uchar*) dstend))
break;
src+= res;
dst+= res;
}
return srclen;
} | O3 | c | my_caseup_utf32:
movq %rdx, %rax
cmpq $0x4, %rdx
jl 0xa410d
pushq %rbp
movq %rsp, %rbp
pushq %rbx
leaq (%rsi,%rax), %rdx
addq %rcx, %r8
movq 0x78(%rdi), %rdi
addq $0x4, %rcx
movzbl (%rsi), %r9d
shll $0x18, %r9d
movzbl 0x1(%rsi), %r10d
shll $0x10, %r10d
orl %r9d, %r10d
cmpl $0x10ffff, %r10d # imm = 0x10FFFF
ja 0xa410b
movzbl 0x2(%rsi), %ebx
shll $0x8, %ebx
movzbl 0x3(%rsi), %r9d
orq %r9, %rbx
orq %r10, %rbx
cmpq (%rdi), %rbx
ja 0xa40cc
movq 0x8(%rdi), %r10
movl %ebx, %r11d
shrl $0x8, %r11d
movq (%r10,%r11,8), %r10
testq %r10, %r10
je 0xa40cc
leaq (%r9,%r9,2), %r9
movl (%r10,%r9,4), %ebx
cmpq %r8, %rcx
ja 0xa410b
cmpl $0x10ffff, %ebx # imm = 0x10FFFF
ja 0xa410b
movb $0x0, -0x4(%rcx)
movl %ebx, %r9d
shrl $0x10, %r9d
movb %r9b, -0x3(%rcx)
movb %bh, -0x2(%rcx)
movb %bl, -0x1(%rcx)
leaq 0x4(%rsi), %r9
cmpq %rdx, %r9
jae 0xa410b
addq $0x8, %rsi
addq $0x4, %rcx
cmpq %rdx, %rsi
movq %r9, %rsi
jbe 0xa407c
popq %rbx
popq %rbp
retq
| my_caseup_utf32:
mov rax, rdx
cmp rdx, 4
jl locret_A410D
push rbp
mov rbp, rsp
push rbx
lea rdx, [rsi+rax]
add r8, rcx
mov rdi, [rdi+78h]
add rcx, 4
loc_A407C:
movzx r9d, byte ptr [rsi]
shl r9d, 18h
movzx r10d, byte ptr [rsi+1]
shl r10d, 10h
or r10d, r9d
cmp r10d, offset unk_10FFFF
ja short loc_A410B
movzx ebx, byte ptr [rsi+2]
shl ebx, 8
movzx r9d, byte ptr [rsi+3]
or rbx, r9
or rbx, r10
cmp rbx, [rdi]
ja short loc_A40CC
mov r10, [rdi+8]
mov r11d, ebx
shr r11d, 8
mov r10, [r10+r11*8]
test r10, r10
jz short loc_A40CC
lea r9, [r9+r9*2]
mov ebx, [r10+r9*4]
loc_A40CC:
cmp rcx, r8
ja short loc_A410B
cmp ebx, offset unk_10FFFF
ja short loc_A410B
mov byte ptr [rcx-4], 0
mov r9d, ebx
shr r9d, 10h
mov [rcx-3], r9b
mov [rcx-2], bh
mov [rcx-1], bl
lea r9, [rsi+4]
cmp r9, rdx
jnb short loc_A410B
add rsi, 8
add rcx, 4
cmp rsi, rdx
mov rsi, r9
jbe loc_A407C
loc_A410B:
pop rbx
pop rbp
locret_A410D:
retn
| long long my_caseup_utf32(long long a1, unsigned __int8 *a2, long long a3, long long a4, long long a5)
{
long long result; // rax
unsigned long long v6; // rdx
unsigned long long v7; // r8
unsigned long long *v8; // rdi
unsigned long long v9; // rcx
long long v10; // r10
long long v11; // r9
unsigned long long v12; // rbx
long long v13; // r10
bool v14; // cc
result = a3;
if ( a3 >= 4 )
{
v6 = (unsigned long long)&a2[a3];
v7 = a4 + a5;
v8 = *(unsigned long long **)(a1 + 120);
v9 = a4 + 4;
do
{
v10 = (*a2 << 24) | (a2[1] << 16);
if ( (unsigned int)v10 > (unsigned int)&unk_10FFFF )
break;
v11 = a2[3];
v12 = v10 | v11 | (a2[2] << 8);
if ( v12 <= *v8 )
{
v13 = *(_QWORD *)(v8[1] + 8LL * ((unsigned int)v12 >> 8));
if ( v13 )
LODWORD(v12) = *(_DWORD *)(v13 + 12 * v11);
}
if ( v9 > v7 )
break;
if ( (unsigned int)v12 > (unsigned int)&unk_10FFFF )
break;
*(_BYTE *)(v9 - 4) = 0;
*(_BYTE *)(v9 - 3) = BYTE2(v12);
*(_BYTE *)(v9 - 2) = BYTE1(v12);
*(_BYTE *)(v9 - 1) = v12;
if ( (unsigned long long)(a2 + 4) >= v6 )
break;
v9 += 4LL;
v14 = (unsigned long long)(a2 + 8) <= v6;
a2 += 4;
}
while ( v14 );
}
return result;
}
| my_caseup_utf32:
MOV RAX,RDX
CMP RDX,0x4
JL 0x001a410d
PUSH RBP
MOV RBP,RSP
PUSH RBX
LEA RDX,[RSI + RAX*0x1]
ADD R8,RCX
MOV RDI,qword ptr [RDI + 0x78]
ADD RCX,0x4
LAB_001a407c:
MOVZX R9D,byte ptr [RSI]
SHL R9D,0x18
MOVZX R10D,byte ptr [RSI + 0x1]
SHL R10D,0x10
OR R10D,R9D
CMP R10D,0x10ffff
JA 0x001a410b
MOVZX EBX,byte ptr [RSI + 0x2]
SHL EBX,0x8
MOVZX R9D,byte ptr [RSI + 0x3]
OR RBX,R9
OR RBX,R10
CMP RBX,qword ptr [RDI]
JA 0x001a40cc
MOV R10,qword ptr [RDI + 0x8]
MOV R11D,EBX
SHR R11D,0x8
MOV R10,qword ptr [R10 + R11*0x8]
TEST R10,R10
JZ 0x001a40cc
LEA R9,[R9 + R9*0x2]
MOV EBX,dword ptr [R10 + R9*0x4]
LAB_001a40cc:
CMP RCX,R8
JA 0x001a410b
CMP EBX,0x10ffff
JA 0x001a410b
MOV byte ptr [RCX + -0x4],0x0
MOV R9D,EBX
SHR R9D,0x10
MOV byte ptr [RCX + -0x3],R9B
MOV byte ptr [RCX + -0x2],BH
MOV byte ptr [RCX + -0x1],BL
LEA R9,[RSI + 0x4]
CMP R9,RDX
JNC 0x001a410b
ADD RSI,0x8
ADD RCX,0x4
CMP RSI,RDX
MOV RSI,R9
JBE 0x001a407c
LAB_001a410b:
POP RBX
POP RBP
LAB_001a410d:
RET
|
void my_caseup_utf32(long param_1,byte *param_2,long param_3,long param_4,long param_5)
{
ulong *puVar1;
long lVar2;
ulong uVar3;
ulong uVar4;
byte *pbVar5;
byte *pbVar6;
uint uVar7;
if (3 < param_3) {
puVar1 = *(ulong **)(param_1 + 0x78);
uVar3 = param_4 + 4;
pbVar5 = param_2;
while (uVar7 = (uint)pbVar5[1] << 0x10 | (uint)*pbVar5 << 0x18, uVar7 < 0x110000) {
uVar4 = (ulong)CONCAT11(pbVar5[2],pbVar5[3]) | (ulong)uVar7;
if ((uVar4 <= *puVar1) && (lVar2 = *(long *)(puVar1[1] + (uVar4 >> 8) * 8), lVar2 != 0)) {
uVar4 = (ulong)*(uint *)(lVar2 + (ulong)pbVar5[3] * 0xc);
}
if ((ulong)(param_5 + param_4) < uVar3) {
return;
}
if (0x10ffff < (uint)uVar4) {
return;
}
*(int1 *)(uVar3 - 4) = 0;
*(char *)(uVar3 - 3) = (char)(uVar4 >> 0x10);
*(char *)(uVar3 - 2) = (char)(uVar4 >> 8);
*(char *)(uVar3 - 1) = (char)uVar4;
if (param_2 + param_3 <= pbVar5 + 4) {
return;
}
pbVar6 = pbVar5 + 8;
uVar3 = uVar3 + 4;
pbVar5 = pbVar5 + 4;
if (param_2 + param_3 < pbVar6) {
return;
}
}
}
return;
}
| |
33,518 | mi_readinfo | eloqsql/storage/myisam/mi_locking.c | int _mi_readinfo(register MI_INFO *info, int lock_type, int check_keybuffer)
{
DBUG_ENTER("_mi_readinfo");
if (info->lock_type == F_UNLCK)
{
MYISAM_SHARE *share=info->s;
if (!share->tot_locks)
{
if (my_lock(share->kfile,lock_type,0L,F_TO_EOF,
info->lock_wait | MY_SEEK_NOT_DONE))
DBUG_RETURN(1);
if (mi_state_info_read_dsk(share->kfile, &share->state, 1))
{
int error= my_errno ? my_errno : HA_ERR_FILE_TOO_SHORT;
(void) my_lock(share->kfile,F_UNLCK,0L,F_TO_EOF,
MYF(MY_SEEK_NOT_DONE));
my_errno= error;
DBUG_RETURN(1);
}
}
if (check_keybuffer)
(void) _mi_test_if_changed(info);
info->invalidator=info->s->invalidator;
}
else if (lock_type == F_WRLCK && info->lock_type == F_RDLCK)
{
my_errno=EACCES; /* Not allowed to change */
DBUG_RETURN(-1); /* when have read_lock() */
}
DBUG_RETURN(0);
} | O0 | c | mi_readinfo:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x2, 0x1f4(%rax)
jne 0xb2593
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, 0x368(%rax)
jne 0xb2569
movq -0x20(%rbp), %rax
movl 0x350(%rax), %edi
movl -0x14(%rbp), %esi
movq -0x10(%rbp), %rax
movq 0x330(%rax), %r8
orq $0x20, %r8
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0xf48b0
cmpl $0x0, %eax
je 0xb24ea
jmp 0xb24de
movl $0x1, -0x4(%rbp)
jmp 0xb25c5
movq -0x20(%rbp), %rax
movl 0x350(%rax), %edi
movq -0x20(%rbp), %rsi
movl $0x1, %edx
callq 0xb9ff0
cmpl $0x0, %eax
je 0xb2567
callq 0xf7440
cmpl $0x0, (%rax)
je 0xb251d
callq 0xf7440
movl (%rax), %eax
movl %eax, -0x28(%rbp)
jmp 0xb2527
movl $0xaf, %eax
movl %eax, -0x28(%rbp)
jmp 0xb2527
movl -0x28(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
movl 0x350(%rax), %edi
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %ecx
movl $0x20, %r8d
movq %rcx, %rdx
callq 0xf48b0
movl -0x24(%rbp), %eax
movl %eax, -0x2c(%rbp)
callq 0xf7440
movl -0x2c(%rbp), %ecx
movl %ecx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0xb25c5
jmp 0xb2569
cmpl $0x0, -0x18(%rbp)
je 0xb2578
movq -0x10(%rbp), %rdi
callq 0xb1ff0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x2f0(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x148(%rax)
jmp 0xb25bc
cmpl $0x1, -0x14(%rbp)
jne 0xb25ba
movq -0x10(%rbp), %rax
cmpl $0x0, 0x1f4(%rax)
jne 0xb25ba
callq 0xf7440
movl $0xd, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xb25c5
jmp 0xb25bc
jmp 0xb25be
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
| _mi_readinfo:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov rax, [rbp+var_10]
cmp dword ptr [rax+1F4h], 2
jnz loc_B2593
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
cmp dword ptr [rax+368h], 0
jnz loc_B2569
mov rax, [rbp+var_20]
mov edi, [rax+350h]
mov esi, [rbp+var_14]
mov rax, [rbp+var_10]
mov r8, [rax+330h]
or r8, 20h
xor eax, eax
mov ecx, eax
mov rdx, rcx
call my_lock
cmp eax, 0
jz short loc_B24EA
jmp short $+2
loc_B24DE:
mov [rbp+var_4], 1
jmp loc_B25C5
loc_B24EA:
mov rax, [rbp+var_20]
mov edi, [rax+350h]
mov rsi, [rbp+var_20]
mov edx, 1
call mi_state_info_read_dsk
cmp eax, 0
jz short loc_B2567
call _my_thread_var
cmp dword ptr [rax], 0
jz short loc_B251D
call _my_thread_var
mov eax, [rax]
mov [rbp+var_28], eax
jmp short loc_B2527
loc_B251D:
mov eax, 0AFh
mov [rbp+var_28], eax
jmp short $+2
loc_B2527:
mov eax, [rbp+var_28]
mov [rbp+var_24], eax
mov rax, [rbp+var_20]
mov edi, [rax+350h]
mov esi, 2
xor eax, eax
mov ecx, eax
mov r8d, 20h ; ' '
mov rdx, rcx
call my_lock
mov eax, [rbp+var_24]
mov [rbp+var_2C], eax
call _my_thread_var
mov ecx, [rbp+var_2C]
mov [rax], ecx
mov [rbp+var_4], 1
jmp short loc_B25C5
loc_B2567:
jmp short $+2
loc_B2569:
cmp [rbp+var_18], 0
jz short loc_B2578
mov rdi, [rbp+var_10]
call _mi_test_if_changed
loc_B2578:
mov rax, [rbp+var_10]
mov rax, [rax]
mov rcx, [rax+2F0h]
mov rax, [rbp+var_10]
mov [rax+148h], rcx
jmp short loc_B25BC
loc_B2593:
cmp [rbp+var_14], 1
jnz short loc_B25BA
mov rax, [rbp+var_10]
cmp dword ptr [rax+1F4h], 0
jnz short loc_B25BA
call _my_thread_var
mov dword ptr [rax], 0Dh
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_B25C5
loc_B25BA:
jmp short $+2
loc_B25BC:
jmp short $+2
loc_B25BE:
mov [rbp+var_4], 0
loc_B25C5:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long mi_readinfo(long long *a1, const char *a2, int a3)
{
long long v3; // rdi
long long v4; // rdi
int v6; // [rsp+8h] [rbp-28h]
long long v7; // [rsp+10h] [rbp-20h]
if ( *((_DWORD *)a1 + 125) != 2 )
{
if ( (_DWORD)a2 == 1 && !*((_DWORD *)a1 + 125) )
{
*(_DWORD *)my_thread_var(a1, a2) = 13;
return (unsigned int)-1;
}
return 0;
}
v7 = *a1;
if ( *(_DWORD *)(*a1 + 872) )
goto LABEL_10;
if ( (unsigned int)my_lock(*(unsigned int *)(v7 + 848), (unsigned int)a2, 0LL, 0LL, a1[102] | 0x20) )
return 1;
v3 = *(unsigned int *)(v7 + 848);
if ( !(unsigned int)mi_state_info_read_dsk(v3, v7, 1LL) )
{
LABEL_10:
if ( a3 )
mi_test_if_changed(a1);
a1[41] = *(_QWORD *)(*a1 + 752);
return 0;
}
if ( *(_DWORD *)my_thread_var(v3, (const char *)v7) )
v6 = *(_DWORD *)my_thread_var(v3, (const char *)v7);
else
v6 = 175;
v4 = *(unsigned int *)(v7 + 848);
my_lock(v4, 2LL, 0LL, 0LL, 32LL);
*(_DWORD *)my_thread_var(v4, (_BYTE *)&dword_0 + 2) = v6;
return 1;
}
| _mi_readinfo:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x1f4],0x2
JNZ 0x001b2593
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX + 0x368],0x0
JNZ 0x001b2569
MOV RAX,qword ptr [RBP + -0x20]
MOV EDI,dword ptr [RAX + 0x350]
MOV ESI,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOV R8,qword ptr [RAX + 0x330]
OR R8,0x20
XOR EAX,EAX
MOV ECX,EAX
MOV RDX,RCX
CALL 0x001f48b0
CMP EAX,0x0
JZ 0x001b24ea
JMP 0x001b24de
LAB_001b24de:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001b25c5
LAB_001b24ea:
MOV RAX,qword ptr [RBP + -0x20]
MOV EDI,dword ptr [RAX + 0x350]
MOV RSI,qword ptr [RBP + -0x20]
MOV EDX,0x1
CALL 0x001b9ff0
CMP EAX,0x0
JZ 0x001b2567
CALL 0x001f7440
CMP dword ptr [RAX],0x0
JZ 0x001b251d
CALL 0x001f7440
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x28],EAX
JMP 0x001b2527
LAB_001b251d:
MOV EAX,0xaf
MOV dword ptr [RBP + -0x28],EAX
JMP 0x001b2527
LAB_001b2527:
MOV EAX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV EDI,dword ptr [RAX + 0x350]
MOV ESI,0x2
XOR EAX,EAX
MOV ECX,EAX
MOV R8D,0x20
MOV RDX,RCX
CALL 0x001f48b0
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x2c],EAX
CALL 0x001f7440
MOV ECX,dword ptr [RBP + -0x2c]
MOV dword ptr [RAX],ECX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001b25c5
LAB_001b2567:
JMP 0x001b2569
LAB_001b2569:
CMP dword ptr [RBP + -0x18],0x0
JZ 0x001b2578
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001b1ff0
LAB_001b2578:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x2f0]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x148],RCX
JMP 0x001b25bc
LAB_001b2593:
CMP dword ptr [RBP + -0x14],0x1
JNZ 0x001b25ba
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x1f4],0x0
JNZ 0x001b25ba
CALL 0x001f7440
MOV dword ptr [RAX],0xd
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001b25c5
LAB_001b25ba:
JMP 0x001b25bc
LAB_001b25bc:
JMP 0x001b25be
LAB_001b25be:
MOV dword ptr [RBP + -0x4],0x0
LAB_001b25c5:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 _mi_readinfo(long *param_1,int param_2,int param_3)
{
long lVar1;
int iVar2;
int *piVar3;
int4 *puVar4;
int4 local_30;
if (*(int *)((long)param_1 + 500) == 2) {
lVar1 = *param_1;
if (*(int *)(lVar1 + 0x368) == 0) {
iVar2 = my_lock(*(int4 *)(lVar1 + 0x350),param_2,0,0,param_1[0x66] | 0x20);
if (iVar2 != 0) {
return 1;
}
iVar2 = mi_state_info_read_dsk(*(int4 *)(lVar1 + 0x350),lVar1,1);
if (iVar2 != 0) {
piVar3 = (int *)_my_thread_var();
if (*piVar3 == 0) {
local_30 = 0xaf;
}
else {
puVar4 = (int4 *)_my_thread_var();
local_30 = *puVar4;
}
my_lock(*(int4 *)(lVar1 + 0x350),2,0,0,0x20);
puVar4 = (int4 *)_my_thread_var();
*puVar4 = local_30;
return 1;
}
}
if (param_3 != 0) {
_mi_test_if_changed(param_1);
}
param_1[0x29] = *(long *)(*param_1 + 0x2f0);
}
else if ((param_2 == 1) && (*(int *)((long)param_1 + 500) == 0)) {
puVar4 = (int4 *)_my_thread_var();
*puVar4 = 0xd;
return 0xffffffff;
}
return 0;
}
| |
33,519 | get_default_configuration_dirs | eloqsql/libmariadb/libmariadb/ma_default.c | char **get_default_configuration_dirs()
{
#ifdef _WIN32
char dirname[FN_REFLEN];
#endif
char *env;
configuration_dirs= (char **)calloc(1, (MAX_CONFIG_DIRS + 1) * sizeof(char *));
if (!configuration_dirs)
goto end;
#ifdef _WIN32
/* On Windows operating systems configuration files are stored in
1. System Windows directory
2. System directory
3. Windows directory
4. C:\
*/
if (!GetSystemWindowsDirectory(dirname, FN_REFLEN) ||
add_cfg_dir(configuration_dirs, dirname))
goto error;
if (!GetWindowsDirectory(dirname, FN_REFLEN) ||
add_cfg_dir(configuration_dirs, dirname))
goto error;
if (add_cfg_dir(configuration_dirs, "C:"))
goto error;
if (GetModuleFileName(NULL, dirname, FN_REFLEN))
{
PathRemoveFileSpec(dirname);
if (add_cfg_dir(configuration_dirs, dirname))
goto error;
}
#else
/* on *nix platforms configuration files are stored in
1. SYSCONFDIR (if build happens inside server package, or
-DDEFAULT_SYSCONFDIR was specified
2. /etc
3. /etc/mysql
*/
#ifdef DEFAULT_SYSCONFDIR
if (add_cfg_dir(configuration_dirs, DEFAULT_SYSCONFDIR))
goto error;
#else
if (add_cfg_dir(configuration_dirs, "/etc"))
goto error;
if (add_cfg_dir(configuration_dirs, "/etc/mysql"))
goto error;
#endif
#endif
/* CONC-537: Read configuration files from MYSQL_HOME directory only if
MARIADB_HOME was not set */
if (!(env= getenv("MARIADB_HOME")))
env= getenv("MYSQL_HOME");
if (env && add_cfg_dir(configuration_dirs, env))
goto error;
end:
return configuration_dirs;
error:
return NULL;
} | O0 | c | get_default_configuration_dirs:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x1, %edi
movl $0x38, %esi
callq 0x132c0
movq %rax, %rcx
leaq 0x1b00f(%rip), %rax # 0x61da0
movq %rcx, (%rax)
leaq 0x1b005(%rip), %rax # 0x61da0
cmpq $0x0, (%rax)
jne 0x46da6
jmp 0x46e29
leaq 0x1aff3(%rip), %rax # 0x61da0
movq (%rax), %rdi
leaq 0x756c(%rip), %rsi # 0x4e323
callq 0x46e50
cmpl $0x0, %eax
je 0x46dc3
jmp 0x46e39
leaq 0x1afd6(%rip), %rax # 0x61da0
movq (%rax), %rdi
leaq 0x7554(%rip), %rsi # 0x4e328
callq 0x46e50
cmpl $0x0, %eax
je 0x46de0
jmp 0x46e39
leaq 0x754c(%rip), %rdi # 0x4e333
callq 0x13540
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
jne 0x46e06
leaq 0x7543(%rip), %rdi # 0x4e340
callq 0x13540
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x46e27
leaq 0x1af8c(%rip), %rax # 0x61da0
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x46e50
cmpl $0x0, %eax
je 0x46e27
jmp 0x46e39
jmp 0x46e29
leaq 0x1af70(%rip), %rax # 0x61da0
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x46e41
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| get_default_configuration_dirs:
push rbp
mov rbp, rsp
sub rsp, 10h
mov edi, 1
mov esi, 38h ; '8'
call _calloc
mov rcx, rax
lea rax, configuration_dirs
mov [rax], rcx
lea rax, configuration_dirs
cmp qword ptr [rax], 0
jnz short loc_46DA6
jmp loc_46E29
loc_46DA6:
lea rax, configuration_dirs
mov rdi, [rax]
lea rsi, aEtc; "/etc"
call add_cfg_dir
cmp eax, 0
jz short loc_46DC3
jmp short loc_46E39
loc_46DC3:
lea rax, configuration_dirs
mov rdi, [rax]
lea rsi, aEtcMysql; "/etc/mysql"
call add_cfg_dir
cmp eax, 0
jz short loc_46DE0
jmp short loc_46E39
loc_46DE0:
lea rdi, aMariadbHome; "MARIADB_HOME"
call _getenv
mov [rbp+var_10], rax
cmp rax, 0
jnz short loc_46E06
lea rdi, aMysqlHome; "MYSQL_HOME"
call _getenv
mov [rbp+var_10], rax
loc_46E06:
cmp [rbp+var_10], 0
jz short loc_46E27
lea rax, configuration_dirs
mov rdi, [rax]
mov rsi, [rbp+var_10]
call add_cfg_dir
cmp eax, 0
jz short loc_46E27
jmp short loc_46E39
loc_46E27:
jmp short $+2
loc_46E29:
lea rax, configuration_dirs
mov rax, [rax]
mov [rbp+var_8], rax
jmp short loc_46E41
loc_46E39:
mov [rbp+var_8], 0
loc_46E41:
mov rax, [rbp+var_8]
add rsp, 10h
pop rbp
retn
| long long get_default_configuration_dirs()
{
long long v1; // [rsp+0h] [rbp-10h]
configuration_dirs[0] = calloc(1LL, 56LL);
if ( !configuration_dirs[0] )
return configuration_dirs[0];
if ( (unsigned int)add_cfg_dir(configuration_dirs[0], "/etc")
|| (unsigned int)add_cfg_dir(configuration_dirs[0], "/etc/mysql") )
{
return 0LL;
}
v1 = getenv("MARIADB_HOME");
if ( !v1 )
v1 = getenv("MYSQL_HOME");
if ( v1 && (unsigned int)add_cfg_dir(configuration_dirs[0], v1) )
return 0LL;
else
return configuration_dirs[0];
}
| get_default_configuration_dirs:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV EDI,0x1
MOV ESI,0x38
CALL 0x001132c0
MOV RCX,RAX
LEA RAX,[0x161da0]
MOV qword ptr [RAX],RCX
LEA RAX,[0x161da0]
CMP qword ptr [RAX],0x0
JNZ 0x00146da6
JMP 0x00146e29
LAB_00146da6:
LEA RAX,[0x161da0]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x14e323]
CALL 0x00146e50
CMP EAX,0x0
JZ 0x00146dc3
JMP 0x00146e39
LAB_00146dc3:
LEA RAX,[0x161da0]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x14e328]
CALL 0x00146e50
CMP EAX,0x0
JZ 0x00146de0
JMP 0x00146e39
LAB_00146de0:
LEA RDI,[0x14e333]
CALL 0x00113540
MOV qword ptr [RBP + -0x10],RAX
CMP RAX,0x0
JNZ 0x00146e06
LEA RDI,[0x14e340]
CALL 0x00113540
MOV qword ptr [RBP + -0x10],RAX
LAB_00146e06:
CMP qword ptr [RBP + -0x10],0x0
JZ 0x00146e27
LEA RAX,[0x161da0]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00146e50
CMP EAX,0x0
JZ 0x00146e27
JMP 0x00146e39
LAB_00146e27:
JMP 0x00146e29
LAB_00146e29:
LEA RAX,[0x161da0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00146e41
LAB_00146e39:
MOV qword ptr [RBP + -0x8],0x0
LAB_00146e41:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x10
POP RBP
RET
|
void * get_default_configuration_dirs(void)
{
int iVar1;
char *local_18;
void *local_10;
configuration_dirs = calloc(1,0x38);
if (configuration_dirs == (void *)0x0) {
LAB_00146e29:
local_10 = configuration_dirs;
}
else {
iVar1 = add_cfg_dir(configuration_dirs,&DAT_0014e323);
if ((iVar1 == 0) && (iVar1 = add_cfg_dir(configuration_dirs,"/etc/mysql"), iVar1 == 0)) {
local_18 = getenv("MARIADB_HOME");
if (local_18 == (char *)0x0) {
local_18 = getenv("MYSQL_HOME");
}
if ((local_18 == (char *)0x0) ||
(iVar1 = add_cfg_dir(configuration_dirs,local_18), iVar1 == 0)) goto LAB_00146e29;
}
local_10 = (void *)0x0;
}
return local_10;
}
| |
33,520 | get_default_configuration_dirs | eloqsql/libmariadb/libmariadb/ma_default.c | char **get_default_configuration_dirs()
{
#ifdef _WIN32
char dirname[FN_REFLEN];
#endif
char *env;
configuration_dirs= (char **)calloc(1, (MAX_CONFIG_DIRS + 1) * sizeof(char *));
if (!configuration_dirs)
goto end;
#ifdef _WIN32
/* On Windows operating systems configuration files are stored in
1. System Windows directory
2. System directory
3. Windows directory
4. C:\
*/
if (!GetSystemWindowsDirectory(dirname, FN_REFLEN) ||
add_cfg_dir(configuration_dirs, dirname))
goto error;
if (!GetWindowsDirectory(dirname, FN_REFLEN) ||
add_cfg_dir(configuration_dirs, dirname))
goto error;
if (add_cfg_dir(configuration_dirs, "C:"))
goto error;
if (GetModuleFileName(NULL, dirname, FN_REFLEN))
{
PathRemoveFileSpec(dirname);
if (add_cfg_dir(configuration_dirs, dirname))
goto error;
}
#else
/* on *nix platforms configuration files are stored in
1. SYSCONFDIR (if build happens inside server package, or
-DDEFAULT_SYSCONFDIR was specified
2. /etc
3. /etc/mysql
*/
#ifdef DEFAULT_SYSCONFDIR
if (add_cfg_dir(configuration_dirs, DEFAULT_SYSCONFDIR))
goto error;
#else
if (add_cfg_dir(configuration_dirs, "/etc"))
goto error;
if (add_cfg_dir(configuration_dirs, "/etc/mysql"))
goto error;
#endif
#endif
/* CONC-537: Read configuration files from MYSQL_HOME directory only if
MARIADB_HOME was not set */
if (!(env= getenv("MARIADB_HOME")))
env= getenv("MYSQL_HOME");
if (env && add_cfg_dir(configuration_dirs, env))
goto error;
end:
return configuration_dirs;
error:
return NULL;
} | O3 | c | get_default_configuration_dirs:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl $0x1, %edi
movl $0x38, %esi
callq 0x132e0
movq %rax, %rbx
leaq 0x18e2f(%rip), %rax # 0x4a8b0
movq %rbx, (%rax)
testq %rbx, %rbx
je 0x31ae2
leaq 0x5795(%rip), %rsi # 0x37225
movq %rbx, %rdi
callq 0x31aec
testl %eax, %eax
jne 0x31ae0
leaq 0x5787(%rip), %rsi # 0x3722a
movq %rbx, %rdi
callq 0x31aec
testl %eax, %eax
jne 0x31ae0
leaq 0x577f(%rip), %rdi # 0x37235
callq 0x13590
testq %rax, %rax
jne 0x31ad1
leaq 0x577b(%rip), %rdi # 0x37242
callq 0x13590
testq %rax, %rax
je 0x31ae2
movq %rbx, %rdi
movq %rax, %rsi
callq 0x31aec
testl %eax, %eax
je 0x31ae2
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| get_default_configuration_dirs:
push rbp
mov rbp, rsp
push rbx
push rax
mov edi, 1
mov esi, 38h ; '8'
call _calloc
mov rbx, rax
lea rax, configuration_dirs
mov [rax], rbx
test rbx, rbx
jz short loc_31AE2
lea rsi, aEtc; "/etc"
mov rdi, rbx
call add_cfg_dir
test eax, eax
jnz short loc_31AE0
lea rsi, aEtcMysql; "/etc/mysql"
mov rdi, rbx
call add_cfg_dir
test eax, eax
jnz short loc_31AE0
lea rdi, aMariadbHome; "MARIADB_HOME"
call _getenv
test rax, rax
jnz short loc_31AD1
lea rdi, aMysqlHome; "MYSQL_HOME"
call _getenv
test rax, rax
jz short loc_31AE2
loc_31AD1:
mov rdi, rbx
mov rsi, rax
call add_cfg_dir
test eax, eax
jz short loc_31AE2
loc_31AE0:
xor ebx, ebx
loc_31AE2:
mov rax, rbx
add rsp, 8
pop rbx
pop rbp
retn
| long long get_default_configuration_dirs()
{
long long v0; // rbx
long long v1; // rax
v0 = calloc(1LL, 56LL);
configuration_dirs = v0;
if ( v0 )
{
if ( (unsigned int)add_cfg_dir(v0, "/etc") || (unsigned int)add_cfg_dir(v0, "/etc/mysql") )
return 0LL;
v1 = getenv("MARIADB_HOME");
if ( v1 || (v1 = getenv("MYSQL_HOME")) != 0 )
{
if ( (unsigned int)add_cfg_dir(v0, v1) )
return 0LL;
}
}
return v0;
}
| get_default_configuration_dirs:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV EDI,0x1
MOV ESI,0x38
CALL 0x001132e0
MOV RBX,RAX
LEA RAX,[0x14a8b0]
MOV qword ptr [RAX],RBX
TEST RBX,RBX
JZ 0x00131ae2
LEA RSI,[0x137225]
MOV RDI,RBX
CALL 0x00131aec
TEST EAX,EAX
JNZ 0x00131ae0
LEA RSI,[0x13722a]
MOV RDI,RBX
CALL 0x00131aec
TEST EAX,EAX
JNZ 0x00131ae0
LEA RDI,[0x137235]
CALL 0x00113590
TEST RAX,RAX
JNZ 0x00131ad1
LEA RDI,[0x137242]
CALL 0x00113590
TEST RAX,RAX
JZ 0x00131ae2
LAB_00131ad1:
MOV RDI,RBX
MOV RSI,RAX
CALL 0x00131aec
TEST EAX,EAX
JZ 0x00131ae2
LAB_00131ae0:
XOR EBX,EBX
LAB_00131ae2:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void * get_default_configuration_dirs(void)
{
int iVar1;
void *pvVar2;
char *pcVar3;
pvVar2 = calloc(1,0x38);
configuration_dirs = pvVar2;
if (pvVar2 != (void *)0x0) {
iVar1 = add_cfg_dir(pvVar2,&DAT_00137225);
if ((iVar1 == 0) && (iVar1 = add_cfg_dir(pvVar2,"/etc/mysql"), iVar1 == 0)) {
pcVar3 = getenv("MARIADB_HOME");
if ((pcVar3 == (char *)0x0) && (pcVar3 = getenv("MYSQL_HOME"), pcVar3 == (char *)0x0)) {
return pvVar2;
}
iVar1 = add_cfg_dir(pvVar2,pcVar3);
if (iVar1 == 0) {
return pvVar2;
}
}
pvVar2 = (void *)0x0;
}
return pvVar2;
}
| |
33,521 | chess::Board::getHalfMoveDrawType() const | Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp | [[nodiscard]] std::pair<GameResultReason, GameResult> getHalfMoveDrawType() const {
Movelist movelist;
movegen::legalmoves(movelist, *this);
if (movelist.empty() && inCheck()) {
return {GameResultReason::CHECKMATE, GameResult::LOSE};
}
return {GameResultReason::FIFTY_MOVE_RULE, GameResult::DRAW};
} | O0 | cpp | chess::Board::getHalfMoveDrawType() const:
pushq %rbp
movq %rsp, %rbp
subq $0x430, %rsp # imm = 0x430
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x430(%rbp)
leaq -0x414(%rbp), %rdi
callq 0x12f00
movq -0x430(%rbp), %rsi
leaq -0x414(%rbp), %rdi
movl $0x3f, %edx
callq 0x12f20
leaq -0x414(%rbp), %rdi
callq 0x12f90
testb $0x1, %al
jne 0x12960
jmp 0x1299f
movq -0x430(%rbp), %rdi
callq 0x12fb0
testb $0x1, %al
jne 0x12972
jmp 0x1299f
movl $0x0, -0x418(%rbp)
movl $0x1, -0x41c(%rbp)
leaq -0x8(%rbp), %rdi
leaq -0x418(%rbp), %rsi
leaq -0x41c(%rbp), %rdx
callq 0x12e10
jmp 0x129ca
movl $0x3, -0x420(%rbp)
movl $0x2, -0x424(%rbp)
leaq -0x8(%rbp), %rdi
leaq -0x420(%rbp), %rsi
leaq -0x424(%rbp), %rdx
callq 0x12e10
movq -0x8(%rbp), %rax
addq $0x430, %rsp # imm = 0x430
popq %rbp
retq
nopw (%rax,%rax)
| _ZNK5chess5Board19getHalfMoveDrawTypeEv:
push rbp
mov rbp, rsp
sub rsp, 430h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov [rbp+var_430], rax
lea rdi, [rbp+var_414]; this
call _ZN5chess8MovelistC2Ev; chess::Movelist::Movelist(void)
mov rsi, [rbp+var_430]
lea rdi, [rbp+var_414]
mov edx, 3Fh ; '?'
call _ZN5chess7movegen10legalmovesILNS0_11MoveGenTypeE0EEEvRNS_8MovelistERKNS_5BoardEi; chess::movegen::legalmoves<(chess::movegen::MoveGenType)0>(chess::Movelist &,chess::Board const&,int)
lea rdi, [rbp+var_414]; this
call _ZNK5chess8Movelist5emptyEv; chess::Movelist::empty(void)
test al, 1
jnz short loc_12960
jmp short loc_1299F
loc_12960:
mov rdi, [rbp+var_430]; this
call _ZNK5chess5Board7inCheckEv; chess::Board::inCheck(void)
test al, 1
jnz short loc_12972
jmp short loc_1299F
loc_12972:
mov [rbp+var_418], 0
mov [rbp+var_41C], 1
lea rdi, [rbp+var_8]
lea rsi, [rbp+var_418]
lea rdx, [rbp+var_41C]
call _ZNSt4pairIN5chess16GameResultReasonENS0_10GameResultEEC2IS1_S2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS6_S7_EEEbE4typeELb1EEEOS6_OS7_
jmp short loc_129CA
loc_1299F:
mov [rbp+var_420], 3
mov [rbp+var_424], 2
lea rdi, [rbp+var_8]
lea rsi, [rbp+var_420]
lea rdx, [rbp+var_424]
call _ZNSt4pairIN5chess16GameResultReasonENS0_10GameResultEEC2IS1_S2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS6_S7_EEEbE4typeELb1EEEOS6_OS7_
loc_129CA:
mov rax, [rbp+var_8]
add rsp, 430h
pop rbp
retn
| long long chess::Board::getHalfMoveDrawType(chess::Board *this)
{
int v2; // [rsp+Ch] [rbp-424h] BYREF
int v3; // [rsp+10h] [rbp-420h] BYREF
int v4; // [rsp+14h] [rbp-41Ch] BYREF
int v5; // [rsp+18h] [rbp-418h] BYREF
_BYTE v6[1028]; // [rsp+1Ch] [rbp-414h] BYREF
chess::Board *v7; // [rsp+420h] [rbp-10h]
long long v8; // [rsp+428h] [rbp-8h] BYREF
v7 = this;
chess::Movelist::Movelist((chess::Movelist *)v6);
chess::movegen::legalmoves<(chess::movegen::MoveGenType)0>(v6, this, 63LL);
if ( (chess::Movelist::empty((chess::Movelist *)v6) & 1) != 0 && (chess::Board::inCheck(this) & 1) != 0 )
{
v5 = 0;
v4 = 1;
ZNSt4pairIN5chess16GameResultReasonENS0_10GameResultEEC2IS1_S2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS6_S7_EEEbE4typeELb1EEEOS6_OS7_(
&v8,
&v5,
&v4);
}
else
{
v3 = 3;
v2 = 2;
ZNSt4pairIN5chess16GameResultReasonENS0_10GameResultEEC2IS1_S2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS6_S7_EEEbE4typeELb1EEEOS6_OS7_(
&v8,
&v3,
&v2);
}
return v8;
}
| getHalfMoveDrawType:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x430
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x430],RAX
LEA RDI,[RBP + -0x414]
CALL 0x00112f00
MOV RSI,qword ptr [RBP + -0x430]
LEA RDI,[RBP + -0x414]
MOV EDX,0x3f
CALL 0x00112f20
LEA RDI,[RBP + -0x414]
CALL 0x00112f90
TEST AL,0x1
JNZ 0x00112960
JMP 0x0011299f
LAB_00112960:
MOV RDI,qword ptr [RBP + -0x430]
CALL 0x00112fb0
TEST AL,0x1
JNZ 0x00112972
JMP 0x0011299f
LAB_00112972:
MOV dword ptr [RBP + -0x418],0x0
MOV dword ptr [RBP + -0x41c],0x1
LEA RDI,[RBP + -0x8]
LEA RSI,[RBP + -0x418]
LEA RDX,[RBP + -0x41c]
CALL 0x00112e10
JMP 0x001129ca
LAB_0011299f:
MOV dword ptr [RBP + -0x420],0x3
MOV dword ptr [RBP + -0x424],0x2
LEA RDI,[RBP + -0x8]
LEA RSI,[RBP + -0x420]
LEA RDX,[RBP + -0x424]
CALL 0x00112e10
LAB_001129ca:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x430
POP RBP
RET
|
/* chess::Board::getHalfMoveDrawType() const */
int8 __thiscall chess::Board::getHalfMoveDrawType(Board *this)
{
ulong uVar1;
int4 local_42c;
int4 local_428;
int4 local_424;
int4 local_420;
Movelist local_41c [1028];
Board *local_18;
int8 local_10;
local_18 = this;
Movelist::Movelist(local_41c);
movegen::legalmoves<(chess::movegen::MoveGenType)0>(local_41c,this,0x3f);
uVar1 = Movelist::empty(local_41c);
if (((uVar1 & 1) == 0) || (uVar1 = inCheck(this), (uVar1 & 1) == 0)) {
local_428 = 3;
local_42c = 2;
_ZNSt4pairIN5chess16GameResultReasonENS0_10GameResultEEC2IS1_S2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS6_S7_EEEbE4typeELb1EEEOS6_OS7_
(&local_10,&local_428,&local_42c);
}
else {
local_420 = 0;
local_424 = 1;
_ZNSt4pairIN5chess16GameResultReasonENS0_10GameResultEEC2IS1_S2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS6_S7_EEEbE4typeELb1EEEOS6_OS7_
(&local_10,&local_420,&local_424);
}
return local_10;
}
| |
33,522 | chess::Board::getHalfMoveDrawType() const | Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp | [[nodiscard]] std::pair<GameResultReason, GameResult> getHalfMoveDrawType() const {
Movelist movelist;
movegen::legalmoves(movelist, *this);
if (movelist.empty() && inCheck()) {
return {GameResultReason::CHECKMATE, GameResult::LOSE};
}
return {GameResultReason::FIFTY_MOVE_RULE, GameResult::DRAW};
} | O1 | cpp | chess::Board::getHalfMoveDrawType() const:
pushq %rbx
subq $0x410, %rsp # imm = 0x410
movq %rdi, %rbx
movl $0x0, 0x40c(%rsp)
cmpb $0x0, 0xae(%rdi)
je 0x8249
leaq 0xc(%rsp), %rdi
movq %rbx, %rsi
movl $0x3f, %edx
callq 0x8b88
jmp 0x825b
leaq 0xc(%rsp), %rdi
movq %rbx, %rsi
movl $0x3f, %edx
callq 0x8522
cmpl $0x0, 0x40c(%rsp)
jne 0x827f
movq %rbx, %rdi
callq 0x84bc
testb %al, %al
je 0x827f
movabsq $0x100000000, %rcx # imm = 0x100000000
xorl %eax, %eax
jmp 0x828e
movabsq $0x200000000, %rcx # imm = 0x200000000
movl $0x3, %eax
orq %rcx, %rax
addq $0x410, %rsp # imm = 0x410
popq %rbx
retq
| _ZNK5chess5Board19getHalfMoveDrawTypeEv:
push rbx
sub rsp, 410h
mov rbx, rdi
mov [rsp+418h+var_C], 0
cmp byte ptr [rdi+0AEh], 0
jz short loc_8249
lea rdi, [rsp+418h+var_40C]
mov rsi, rbx
mov edx, 3Fh ; '?'
call _ZN5chess7movegen10legalmovesILNS_5Color10underlyingE1ELNS0_11MoveGenTypeE0EEEvRNS_8MovelistERKNS_5BoardEi; chess::movegen::legalmoves<(chess::Color::underlying)1,(chess::movegen::MoveGenType)0>(chess::Movelist &,chess::Board const&,int)
jmp short loc_825B
loc_8249:
lea rdi, [rsp+418h+var_40C]
mov rsi, rbx
mov edx, 3Fh ; '?'
call _ZN5chess7movegen10legalmovesILNS_5Color10underlyingE0ELNS0_11MoveGenTypeE0EEEvRNS_8MovelistERKNS_5BoardEi; chess::movegen::legalmoves<(chess::Color::underlying)0,(chess::movegen::MoveGenType)0>(chess::Movelist &,chess::Board const&,int)
loc_825B:
cmp [rsp+418h+var_C], 0
jnz short loc_827F
mov rdi, rbx; this
call _ZNK5chess5Board7inCheckEv; chess::Board::inCheck(void)
test al, al
jz short loc_827F
mov rcx, 100000000h
xor eax, eax
jmp short loc_828E
loc_827F:
mov rcx, 200000000h
mov eax, 3
loc_828E:
or rax, rcx
add rsp, 410h
pop rbx
retn
| long long chess::Board::getHalfMoveDrawType(chess::Board *this)
{
long long v1; // rcx
long long v2; // rax
_BYTE v4[1024]; // [rsp+Ch] [rbp-40Ch] BYREF
int v5; // [rsp+40Ch] [rbp-Ch]
v5 = 0;
if ( *((_BYTE *)this + 174) )
chess::movegen::legalmoves<(chess::Color::underlying)1,(chess::movegen::MoveGenType)0>(v4, this, 63LL);
else
chess::movegen::legalmoves<(chess::Color::underlying)0,(chess::movegen::MoveGenType)0>(v4, this, 63LL);
if ( v5 || !(unsigned __int8)chess::Board::inCheck(this) )
{
v1 = 0x200000000LL;
v2 = 3LL;
}
else
{
v1 = 0x100000000LL;
v2 = 0LL;
}
return v1 | v2;
}
| getHalfMoveDrawType:
PUSH RBX
SUB RSP,0x410
MOV RBX,RDI
MOV dword ptr [RSP + 0x40c],0x0
CMP byte ptr [RDI + 0xae],0x0
JZ 0x00108249
LEA RDI,[RSP + 0xc]
MOV RSI,RBX
MOV EDX,0x3f
CALL 0x00108b88
JMP 0x0010825b
LAB_00108249:
LEA RDI,[RSP + 0xc]
MOV RSI,RBX
MOV EDX,0x3f
CALL 0x00108522
LAB_0010825b:
CMP dword ptr [RSP + 0x40c],0x0
JNZ 0x0010827f
MOV RDI,RBX
CALL 0x001084bc
TEST AL,AL
JZ 0x0010827f
MOV RCX,0x100000000
XOR EAX,EAX
JMP 0x0010828e
LAB_0010827f:
MOV RCX,0x200000000
MOV EAX,0x3
LAB_0010828e:
OR RAX,RCX
ADD RSP,0x410
POP RBX
RET
|
/* chess::Board::getHalfMoveDrawType() const */
ulong __thiscall chess::Board::getHalfMoveDrawType(Board *this)
{
char cVar1;
ulong uVar2;
ulong uVar3;
Movelist local_40c [1024];
int local_c;
local_c = 0;
if (this[0xae] == (Board)0x0) {
movegen::legalmoves<(chess::Color::underlying)0,(chess::movegen::MoveGenType)0>
(local_40c,this,0x3f);
}
else {
movegen::legalmoves<(chess::Color::underlying)1,(chess::movegen::MoveGenType)0>
(local_40c,this,0x3f);
}
if (local_c == 0) {
cVar1 = inCheck(this);
if (cVar1 != '\0') {
uVar3 = 0x100000000;
uVar2 = 0;
goto LAB_0010828e;
}
}
uVar3 = 0x200000000;
uVar2 = 3;
LAB_0010828e:
return uVar2 | uVar3;
}
| |
33,523 | ma_dynstr_realloc | eloqsql/libmariadb/libmariadb/ma_string.c | my_bool ma_dynstr_realloc(DYNAMIC_STRING *str, size_t additional_size)
{
if (!additional_size) return(FALSE);
if (str->length + additional_size > str->max_length)
{
str->max_length=((str->length + additional_size+str->alloc_increment-1)/
str->alloc_increment)*str->alloc_increment;
if (!(str->str=(char*) realloc(str->str,str->max_length)))
return(TRUE);
}
return(FALSE);
} | O3 | c | ma_dynstr_realloc:
testq %rsi, %rsi
je 0x297ff
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
jbe 0x297f6
movq (%rbx), %rdi
movq 0x18(%rbx), %rcx
addq %rcx, %rsi
decq %rsi
movq %rsi, %rax
xorl %edx, %edx
divq %rcx
subq %rdx, %rsi
movq %rsi, 0x10(%rbx)
callq 0x13760
movq %rax, (%rbx)
testq %rax, %rax
je 0x29802
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
xorl %eax, %eax
retq
movb $0x1, %al
jmp 0x297f8
| ma_dynstr_realloc:
test rsi, rsi
jz short loc_297FF
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
add rsi, [rdi+8]
cmp rsi, [rdi+10h]
jbe short loc_297F6
mov rdi, [rbx]
mov rcx, [rbx+18h]
add rsi, rcx
dec rsi
mov rax, rsi
xor edx, edx
div rcx
sub rsi, rdx
mov [rbx+10h], rsi
call _realloc
mov [rbx], rax
test rax, rax
jz short loc_29802
loc_297F6:
xor eax, eax
loc_297F8:
add rsp, 8
pop rbx
pop rbp
retn
loc_297FF:
xor eax, eax
retn
loc_29802:
mov al, 1
jmp short loc_297F8
| _BOOL8 ma_dynstr_realloc(long long *a1, long long a2)
{
unsigned long long v3; // rsi
long long v4; // rdi
unsigned long long v5; // rsi
long long v6; // rax
_BOOL8 result; // rax
if ( !a2 )
return 0LL;
v3 = a1[1] + a2;
result = 0;
if ( v3 > a1[2] )
{
v4 = *a1;
v5 = a1[3] + v3 - 1 - (a1[3] + v3 - 1) % a1[3];
a1[2] = v5;
v6 = realloc(v4, v5);
*a1 = v6;
if ( !v6 )
return 1;
}
return result;
}
| ma_dynstr_realloc:
TEST RSI,RSI
JZ 0x001297ff
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
ADD RSI,qword ptr [RDI + 0x8]
CMP RSI,qword ptr [RDI + 0x10]
JBE 0x001297f6
MOV RDI,qword ptr [RBX]
MOV RCX,qword ptr [RBX + 0x18]
ADD RSI,RCX
DEC RSI
MOV RAX,RSI
XOR EDX,EDX
DIV RCX
SUB RSI,RDX
MOV qword ptr [RBX + 0x10],RSI
CALL 0x00113760
MOV qword ptr [RBX],RAX
TEST RAX,RAX
JZ 0x00129802
LAB_001297f6:
XOR EAX,EAX
LAB_001297f8:
ADD RSP,0x8
POP RBX
POP RBP
RET
LAB_001297ff:
XOR EAX,EAX
RET
LAB_00129802:
MOV AL,0x1
JMP 0x001297f8
|
int8 ma_dynstr_realloc(int8 *param_1,long param_2)
{
void *pvVar1;
ulong uVar2;
size_t __size;
if (param_2 == 0) {
return 0;
}
if ((ulong)param_1[2] < (ulong)(param_2 + param_1[1])) {
uVar2 = (param_2 + param_1[1] + param_1[3]) - 1;
__size = uVar2 - uVar2 % (ulong)param_1[3];
param_1[2] = __size;
pvVar1 = realloc((void *)*param_1,__size);
*param_1 = pvVar1;
if (pvVar1 == (void *)0x0) {
return 1;
}
}
return 0;
}
| |
33,524 | fmt::v10::format_arg_store<fmt::v10::basic_format_context<fmt::v10::appender, char>, std::remove_cv<std::remove_reference<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::type>::type, std::remove_cv<std::remove_reference<int>::type>::type, std::remove_cv<std::remove_reference<char const [8]>::type>::type> fmt::v10::make_format_args<fmt::v10::basic_format_context<fmt::v10::appender, char>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, char const [8]>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, int&, char const (&) [8]) | AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/core.h | constexpr auto make_format_args(T&... args)
-> format_arg_store<Context, remove_cvref_t<T>...> {
return {args...};
} | O0 | c | fmt::v10::format_arg_store<fmt::v10::basic_format_context<fmt::v10::appender, char>, std::remove_cv<std::remove_reference<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::type>::type, std::remove_cv<std::remove_reference<int>::type>::type, std::remove_cv<std::remove_reference<char const [8]>::type>::type> fmt::v10::make_format_args<fmt::v10::basic_format_context<fmt::v10::appender, char>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, char const [8]>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, int&, char const (&) [8]):
subq $0x18, %rsp
movq %rdi, -0x78(%rsp)
movq -0x78(%rsp), %rax
leaq -0x70(%rsp), %rcx
movq %rcx, -0x48(%rsp)
movq %rax, -0x50(%rsp)
movq -0x48(%rsp), %rax
movq -0x50(%rsp), %rcx
movq %rcx, -0x38(%rsp)
movb $0x1, -0x39(%rsp)
movb $0x1, -0x3a(%rsp)
movb $0x1, -0x3b(%rsp)
movq -0x38(%rsp), %rcx
movl (%rcx), %ecx
leaq -0x3c(%rsp), %rdx
movq %rdx, -0x10(%rsp)
movl %ecx, -0x14(%rsp)
movl -0x14(%rsp), %ecx
leaq -0x30(%rsp), %rdx
movq %rdx, (%rsp)
movl %ecx, -0x4(%rsp)
movq (%rsp), %rcx
movl -0x4(%rsp), %edx
movl %edx, (%rcx)
movq -0x30(%rsp), %rdx
movq -0x28(%rsp), %rcx
movq %rdx, -0x60(%rsp)
movq %rcx, -0x58(%rsp)
movq %rax, 0x10(%rsp)
leaq -0x60(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rcx
movaps (%rcx), %xmm0
movaps %xmm0, (%rax)
movq -0x70(%rsp), %rax
movq -0x68(%rsp), %rdx
addq $0x18, %rsp
retq
nopl (%rax)
| _ZN3fmt3v1016make_format_argsINS0_20basic_format_contextINS0_8appenderEcEEJiEEENS0_16format_arg_storeIT_JDpNSt9remove_cvINSt16remove_referenceIT0_E4typeEE4typeEEEEDpRS9_:
sub rsp, 18h
mov [rsp+18h+var_90], rdi
mov rax, [rsp+18h+var_90]
lea rcx, [rsp+18h+var_88]
mov [rsp+18h+var_60], rcx
mov [rsp+18h+var_68], rax
mov rax, [rsp+18h+var_60]
mov rcx, [rsp+18h+var_68]
mov [rsp+18h+var_50], rcx
mov [rsp+18h+var_51], 1
mov [rsp+18h+var_52], 1
mov [rsp+18h+var_53], 1
mov rcx, [rsp+18h+var_50]
mov ecx, [rcx]
lea rdx, [rsp+18h+var_54]
mov [rsp+18h+var_28], rdx
mov [rsp+18h+var_2C], ecx
mov ecx, [rsp+18h+var_2C]
lea rdx, [rsp+18h+var_48]
mov [rsp+18h+var_18], rdx
mov [rsp+18h+var_1C], ecx
mov rcx, [rsp+18h+var_18]
mov edx, [rsp+18h+var_1C]
mov [rcx], edx
mov rdx, [rsp+18h+var_48]
mov rcx, [rsp+18h+var_40]
mov [rsp+18h+var_78], rdx
mov [rsp+18h+var_70], rcx
mov [rsp+18h+var_8], rax
lea rax, [rsp+18h+var_78]
mov [rsp+18h+var_10], rax
mov rax, [rsp+18h+var_8]
mov rcx, [rsp+18h+var_10]
movaps xmm0, xmmword ptr [rcx]
movaps xmmword ptr [rax], xmm0
mov rax, [rsp+18h+var_88]
mov rdx, [rsp+18h+var_80]
add rsp, 18h
retn
| long long fmt::v10::make_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>,int>(_DWORD *a1)
{
__int128 v2; // [rsp+8h] [rbp-88h] BYREF
_DWORD *v3; // [rsp+28h] [rbp-68h]
__int128 *v4; // [rsp+30h] [rbp-60h]
char v5; // [rsp+3Dh] [rbp-53h]
char v6; // [rsp+3Eh] [rbp-52h]
char v7; // [rsp+3Fh] [rbp-51h]
_DWORD *v8; // [rsp+40h] [rbp-50h]
__int128 v9; // [rsp+48h] [rbp-48h]
v4 = &v2;
v3 = a1;
v8 = a1;
v7 = 1;
v6 = 1;
v5 = 1;
LODWORD(v9) = *a1;
return v9;
}
| make_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>,int>:
SUB RSP,0x18
MOV qword ptr [RSP + -0x78],RDI
MOV RAX,qword ptr [RSP + -0x78]
LEA RCX,[RSP + -0x70]
MOV qword ptr [RSP + -0x48],RCX
MOV qword ptr [RSP + -0x50],RAX
MOV RAX,qword ptr [RSP + -0x48]
MOV RCX,qword ptr [RSP + -0x50]
MOV qword ptr [RSP + -0x38],RCX
MOV byte ptr [RSP + -0x39],0x1
MOV byte ptr [RSP + -0x3a],0x1
MOV byte ptr [RSP + -0x3b],0x1
MOV RCX,qword ptr [RSP + -0x38]
MOV ECX,dword ptr [RCX]
LEA RDX,[RSP + -0x3c]
MOV qword ptr [RSP + -0x10],RDX
MOV dword ptr [RSP + -0x14],ECX
MOV ECX,dword ptr [RSP + -0x14]
LEA RDX,[RSP + -0x30]
MOV qword ptr [RSP],RDX
MOV dword ptr [RSP + -0x4],ECX
MOV RCX,qword ptr [RSP]
MOV EDX,dword ptr [RSP + -0x4]
MOV dword ptr [RCX],EDX
MOV RDX,qword ptr [RSP + -0x30]
MOV RCX,qword ptr [RSP + -0x28]
MOV qword ptr [RSP + -0x60],RDX
MOV qword ptr [RSP + -0x58],RCX
MOV qword ptr [RSP + 0x10],RAX
LEA RAX,[RSP + -0x60]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x8]
MOVAPS XMM0,xmmword ptr [RCX]
MOVAPS xmmword ptr [RAX],XMM0
MOV RAX,qword ptr [RSP + -0x70]
MOV RDX,qword ptr [RSP + -0x68]
ADD RSP,0x18
RET
|
/* WARNING: Restarted to delay deadcode elimination for space: stack */
/* fmt::v10::format_arg_store<fmt::v10::basic_format_context<fmt::v10::appender, char>,
std::remove_cv<std::remove_reference<int>::type>::type>
fmt::v10::make_format_args<fmt::v10::basic_format_context<fmt::v10::appender, char>, int>(int&)
*/
int1 [16]
fmt::v10::make_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>,int>
(int *param_1)
{
int1 local_88 [16];
int8 local_48;
int8 local_40;
/* WARNING: Ignoring partial resolution of indirect */
local_48._0_4_ = *param_1;
/* WARNING: Ignoring partial resolution of indirect */
local_88._0_8_ = local_48;
local_88._8_8_ = local_40;
return local_88;
}
| |
33,525 | my_message_stderr | eloqsql/mysys/my_mess.c | void my_message_stderr(uint error __attribute__((unused)),
const char *str, myf MyFlags)
{
DBUG_ENTER("my_message_stderr");
DBUG_PRINT("enter",("message: %s",str));
(void) fflush(stdout);
if (MyFlags & (ME_NOTE | ME_ERROR_LOG_ONLY))
DBUG_VOID_RETURN;
if (MyFlags & ME_BELL)
(void) fputc('\007', stderr);
if (my_progname)
{
(void)fputs(my_progname,stderr); (void)fputs(": ",stderr);
}
(void)fputs(str,stderr);
(void)fputc('\n',stderr);
(void)fflush(stderr);
DBUG_VOID_RETURN;
} | O0 | c | my_message_stderr:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
jmp 0xfc595
movq 0x1cba3c(%rip), %rax # 0x2c7fd8
movq (%rax), %rdi
callq 0x2a410
movq -0x18(%rbp), %rax
andq $0x480, %rax # imm = 0x480
cmpq $0x0, %rax
je 0xfc5bb
jmp 0xfc5b6
jmp 0xfc651
movq -0x18(%rbp), %rax
andq $0x4, %rax
cmpq $0x0, %rax
je 0xfc5dd
movq 0x1cba10(%rip), %rax # 0x2c7fe0
movq (%rax), %rsi
movl $0x7, %edi
callq 0x2a700
leaq 0xb9179c(%rip), %rax # 0xc8dd80
cmpq $0x0, (%rax)
je 0xfc619
leaq 0xb9178f(%rip), %rax # 0xc8dd80
movq (%rax), %rdi
movq 0x1cb9e5(%rip), %rax # 0x2c7fe0
movq (%rax), %rsi
callq 0x2a2e0
movq 0x1cb9d6(%rip), %rax # 0x2c7fe0
movq (%rax), %rsi
leaq 0x62421(%rip), %rdi # 0x15ea35
callq 0x2a2e0
movq -0x10(%rbp), %rdi
movq 0x1cb9bc(%rip), %rax # 0x2c7fe0
movq (%rax), %rsi
callq 0x2a2e0
movq 0x1cb9ad(%rip), %rax # 0x2c7fe0
movq (%rax), %rsi
movl $0xa, %edi
callq 0x2a700
movq 0x1cb999(%rip), %rax # 0x2c7fe0
movq (%rax), %rdi
callq 0x2a410
jmp 0xfc651
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| my_message_stderr:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
jmp short $+2
loc_FC595:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, [rbp+var_18]
and rax, 480h
cmp rax, 0
jz short loc_FC5BB
jmp short $+2
loc_FC5B6:
jmp loc_FC651
loc_FC5BB:
mov rax, [rbp+var_18]
and rax, 4
cmp rax, 0
jz short loc_FC5DD
mov rax, cs:stderr_ptr
mov rsi, [rax]
mov edi, 7
call _fputc
loc_FC5DD:
lea rax, my_progname
cmp qword ptr [rax], 0
jz short loc_FC619
lea rax, my_progname
mov rdi, [rax]
mov rax, cs:stderr_ptr
mov rsi, [rax]
call _fputs
mov rax, cs:stderr_ptr
mov rsi, [rax]
lea rdi, aWarning_1+8; ": "
call _fputs
loc_FC619:
mov rdi, [rbp+var_10]
mov rax, cs:stderr_ptr
mov rsi, [rax]
call _fputs
mov rax, cs:stderr_ptr
mov rsi, [rax]
mov edi, 0Ah
call _fputc
mov rax, cs:stderr_ptr
mov rdi, [rax]
call _fflush
jmp short $+2
loc_FC651:
add rsp, 20h
pop rbp
retn
| long long my_message_stderr(long long a1, long long a2, __int16 a3)
{
long long result; // rax
fflush(stdout);
result = a3 & 0x480;
if ( (a3 & 0x480) == 0 )
{
if ( (a3 & 4) != 0 )
fputc(7LL, stderr);
if ( my_progname )
{
fputs(my_progname, stderr);
fputs(": ", stderr);
}
fputs(a2, stderr);
fputc(10LL, stderr);
return fflush(stderr);
}
return result;
}
| my_message_stderr:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
JMP 0x001fc595
LAB_001fc595:
MOV RAX,qword ptr [0x003c7fd8]
MOV RDI,qword ptr [RAX]
CALL 0x0012a410
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x480
CMP RAX,0x0
JZ 0x001fc5bb
JMP 0x001fc5b6
LAB_001fc5b6:
JMP 0x001fc651
LAB_001fc5bb:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x4
CMP RAX,0x0
JZ 0x001fc5dd
MOV RAX,qword ptr [0x003c7fe0]
MOV RSI,qword ptr [RAX]
MOV EDI,0x7
CALL 0x0012a700
LAB_001fc5dd:
LEA RAX,[0xd8dd80]
CMP qword ptr [RAX],0x0
JZ 0x001fc619
LEA RAX,[0xd8dd80]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [0x003c7fe0]
MOV RSI,qword ptr [RAX]
CALL 0x0012a2e0
MOV RAX,qword ptr [0x003c7fe0]
MOV RSI,qword ptr [RAX]
LEA RDI,[0x25ea35]
CALL 0x0012a2e0
LAB_001fc619:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [0x003c7fe0]
MOV RSI,qword ptr [RAX]
CALL 0x0012a2e0
MOV RAX,qword ptr [0x003c7fe0]
MOV RSI,qword ptr [RAX]
MOV EDI,0xa
CALL 0x0012a700
MOV RAX,qword ptr [0x003c7fe0]
MOV RDI,qword ptr [RAX]
CALL 0x0012a410
JMP 0x001fc651
LAB_001fc651:
ADD RSP,0x20
POP RBP
RET
|
void my_message_stderr(int8 param_1,char *param_2,ulong param_3)
{
fflush(*(FILE **)PTR_stdout_003c7fd8);
if ((param_3 & 0x480) == 0) {
if ((param_3 & 4) != 0) {
fputc(7,*(FILE **)PTR_stderr_003c7fe0);
}
if (my_progname != (char *)0x0) {
fputs(my_progname,*(FILE **)PTR_stderr_003c7fe0);
fputs(": ",*(FILE **)PTR_stderr_003c7fe0);
}
fputs(param_2,*(FILE **)PTR_stderr_003c7fe0);
fputc(10,*(FILE **)PTR_stderr_003c7fe0);
fflush(*(FILE **)PTR_stderr_003c7fe0);
}
return;
}
| |
33,526 | StartTree::BIONJMatrix<float>::chooseLambda(unsigned long, unsigned long, float) | iqtree3/utils/bionj2.cpp | inline T chooseLambda(size_t a, size_t b, T Vab) {
//Assumed 0<=a<b<n
T lambda = 0;
if (Vab==0.0) {
return 0.5;
}
for (size_t i=0; i<a; ++i) {
lambda += variance.rows[b][i] - variance.rows[a][i];
}
for (size_t i=a+1; i<b; ++i) {
lambda += variance.rows[b][i] - variance.rows[a][i];
}
for (size_t i=b+1; i<n; ++i) {
lambda += variance.rows[b][i] - variance.rows[a][i];
}
lambda = 0.5 + lambda / (2.0*((T)n-2)*Vab);
if (1.0<lambda) lambda=1.0;
if (lambda<0.0) lambda=0.0;
return lambda;
} | O0 | cpp | StartTree::BIONJMatrix<float>::chooseLambda(unsigned long, unsigned long, float):
movq %rdi, -0x10(%rsp)
movq %rsi, -0x18(%rsp)
movq %rdx, -0x20(%rsp)
movss %xmm0, -0x24(%rsp)
movq -0x10(%rsp), %rax
movq %rax, -0x48(%rsp)
xorps %xmm0, %xmm0
movss %xmm0, -0x28(%rsp)
movss -0x24(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x557d0
jp 0x557d0
movss 0x13d0f(%rip), %xmm0 # 0x694d4
movss %xmm0, -0x4(%rsp)
jmp 0x55a0c
movq $0x0, -0x30(%rsp)
movq -0x30(%rsp), %rax
cmpq -0x18(%rsp), %rax
jae 0x5583a
movq -0x48(%rsp), %rax
movq 0xb8(%rax), %rcx
movq -0x20(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
movq -0x30(%rsp), %rdx
movss (%rcx,%rdx,4), %xmm0
movq 0xb8(%rax), %rax
movq -0x18(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x30(%rsp), %rcx
subss (%rax,%rcx,4), %xmm0
addss -0x28(%rsp), %xmm0
movss %xmm0, -0x28(%rsp)
movq -0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rsp)
jmp 0x557d9
movq -0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rsp)
movq -0x38(%rsp), %rax
cmpq -0x20(%rsp), %rax
jae 0x558a9
movq -0x48(%rsp), %rax
movq 0xb8(%rax), %rcx
movq -0x20(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
movq -0x38(%rsp), %rdx
movss (%rcx,%rdx,4), %xmm0
movq 0xb8(%rax), %rax
movq -0x18(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x38(%rsp), %rcx
subss (%rax,%rcx,4), %xmm0
addss -0x28(%rsp), %xmm0
movss %xmm0, -0x28(%rsp)
movq -0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rsp)
jmp 0x55848
movq -0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rsp)
movq -0x48(%rsp), %rcx
movq -0x40(%rsp), %rax
cmpq 0x8(%rcx), %rax
jae 0x5591c
movq -0x48(%rsp), %rax
movq 0xb8(%rax), %rcx
movq -0x20(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
movq -0x40(%rsp), %rdx
movss (%rcx,%rdx,4), %xmm0
movq 0xb8(%rax), %rax
movq -0x18(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq -0x40(%rsp), %rcx
subss (%rax,%rcx,4), %xmm0
addss -0x28(%rsp), %xmm0
movss %xmm0, -0x28(%rsp)
movq -0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rsp)
jmp 0x558b7
movq -0x48(%rsp), %rax
movss -0x28(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x58(%rsp)
movq 0x8(%rax), %rax
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, -0x50(%rsp)
testq %rax, %rax
movss %xmm0, -0x4c(%rsp)
js 0x5596e
movss -0x50(%rsp), %xmm0
movss %xmm0, -0x4c(%rsp)
movsd -0x58(%rsp), %xmm1
movss -0x4c(%rsp), %xmm0
movss 0x13b4a(%rip), %xmm2 # 0x694cc
subss %xmm2, %xmm0
cvtss2sd %xmm0, %xmm2
movsd 0x13d1e(%rip), %xmm0 # 0x696b0
mulsd %xmm2, %xmm0
movss -0x24(%rsp), %xmm2
cvtss2sd %xmm2, %xmm2
mulsd %xmm2, %xmm0
divsd %xmm0, %xmm1
movsd 0x13b30(%rip), %xmm0 # 0x694e0
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x28(%rsp)
movss -0x28(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x13b18(%rip), %xmm1 # 0x694e8
ucomisd %xmm1, %xmm0
jbe 0x559e4
movss 0x13aea(%rip), %xmm0 # 0x694c8
movss %xmm0, -0x28(%rsp)
movss -0x28(%rsp), %xmm0
cvtss2sd %xmm0, %xmm1
xorps %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x55a00
xorps %xmm0, %xmm0
movss %xmm0, -0x28(%rsp)
movss -0x28(%rsp), %xmm0
movss %xmm0, -0x4(%rsp)
movss -0x4(%rsp), %xmm0
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZN9StartTree11BIONJMatrixIfE12chooseLambdaEmmf:
mov [rsp+var_10], rdi
mov [rsp+var_18], rsi
mov [rsp+var_20], rdx
movss [rsp+var_24], xmm0
mov rax, [rsp+var_10]
mov [rsp+var_48], rax
xorps xmm0, xmm0
movss [rsp+var_28], xmm0
movss xmm0, [rsp+var_24]
cvtss2sd xmm0, xmm0
xorps xmm1, xmm1
ucomisd xmm0, xmm1
jnz short loc_557D0
jp short loc_557D0
movss xmm0, cs:dword_694D4
movss [rsp+var_4], xmm0
jmp loc_55A0C
loc_557D0:
mov [rsp+var_30], 0
loc_557D9:
mov rax, [rsp+var_30]
cmp rax, [rsp+var_18]
jnb short loc_5583A
mov rax, [rsp+var_48]
mov rcx, [rax+0B8h]
mov rdx, [rsp+var_20]
mov rcx, [rcx+rdx*8]
mov rdx, [rsp+var_30]
movss xmm0, dword ptr [rcx+rdx*4]
mov rax, [rax+0B8h]
mov rcx, [rsp+var_18]
mov rax, [rax+rcx*8]
mov rcx, [rsp+var_30]
subss xmm0, dword ptr [rax+rcx*4]
addss xmm0, [rsp+var_28]
movss [rsp+var_28], xmm0
mov rax, [rsp+var_30]
add rax, 1
mov [rsp+var_30], rax
jmp short loc_557D9
loc_5583A:
mov rax, [rsp+var_18]
add rax, 1
mov [rsp+var_38], rax
loc_55848:
mov rax, [rsp+var_38]
cmp rax, [rsp+var_20]
jnb short loc_558A9
mov rax, [rsp+var_48]
mov rcx, [rax+0B8h]
mov rdx, [rsp+var_20]
mov rcx, [rcx+rdx*8]
mov rdx, [rsp+var_38]
movss xmm0, dword ptr [rcx+rdx*4]
mov rax, [rax+0B8h]
mov rcx, [rsp+var_18]
mov rax, [rax+rcx*8]
mov rcx, [rsp+var_38]
subss xmm0, dword ptr [rax+rcx*4]
addss xmm0, [rsp+var_28]
movss [rsp+var_28], xmm0
mov rax, [rsp+var_38]
add rax, 1
mov [rsp+var_38], rax
jmp short loc_55848
loc_558A9:
mov rax, [rsp+var_20]
add rax, 1
mov [rsp+var_40], rax
loc_558B7:
mov rcx, [rsp+var_48]
mov rax, [rsp+var_40]
cmp rax, [rcx+8]
jnb short loc_5591C
mov rax, [rsp+var_48]
mov rcx, [rax+0B8h]
mov rdx, [rsp+var_20]
mov rcx, [rcx+rdx*8]
mov rdx, [rsp+var_40]
movss xmm0, dword ptr [rcx+rdx*4]
mov rax, [rax+0B8h]
mov rcx, [rsp+var_18]
mov rax, [rax+rcx*8]
mov rcx, [rsp+var_40]
subss xmm0, dword ptr [rax+rcx*4]
addss xmm0, [rsp+var_28]
movss [rsp+var_28], xmm0
mov rax, [rsp+var_40]
add rax, 1
mov [rsp+var_40], rax
jmp short loc_558B7
loc_5591C:
mov rax, [rsp+var_48]
movss xmm0, [rsp+var_28]
cvtss2sd xmm0, xmm0
movsd [rsp+var_58], xmm0
mov rax, [rax+8]
mov rdx, rax
shr rdx, 1
mov ecx, eax
and ecx, 1
or rcx, rdx
cvtsi2ss xmm0, rcx
addss xmm0, xmm0
cvtsi2ss xmm1, rax
movss [rsp+var_50], xmm1
test rax, rax
movss [rsp+var_4C], xmm0
js short loc_5596E
movss xmm0, [rsp+var_50]
movss [rsp+var_4C], xmm0
loc_5596E:
movsd xmm1, [rsp+var_58]
movss xmm0, [rsp+var_4C]
movss xmm2, cs:dword_694CC
subss xmm0, xmm2
cvtss2sd xmm2, xmm0
movsd xmm0, cs:qword_696B0
mulsd xmm0, xmm2
movss xmm2, [rsp+var_24]
cvtss2sd xmm2, xmm2
mulsd xmm0, xmm2
divsd xmm1, xmm0
movsd xmm0, cs:qword_694E0
addsd xmm0, xmm1
cvtsd2ss xmm0, xmm0
movss [rsp+var_28], xmm0
movss xmm0, [rsp+var_28]
cvtss2sd xmm0, xmm0
movsd xmm1, cs:qword_694E8
ucomisd xmm0, xmm1
jbe short loc_559E4
movss xmm0, cs:dword_694C8
movss [rsp+var_28], xmm0
loc_559E4:
movss xmm0, [rsp+var_28]
cvtss2sd xmm1, xmm0
xorps xmm0, xmm0
ucomisd xmm0, xmm1
jbe short loc_55A00
xorps xmm0, xmm0
movss [rsp+var_28], xmm0
loc_55A00:
movss xmm0, [rsp+var_28]
movss [rsp+var_4], xmm0
loc_55A0C:
movss xmm0, [rsp+var_4]
retn
| float StartTree::BIONJMatrix<float>::chooseLambda(
long long a1,
unsigned long long a2,
unsigned long long a3,
float a4)
{
long long v4; // rax
float v5; // xmm0_4
float v7; // [rsp+Ch] [rbp-4Ch]
unsigned long long k; // [rsp+18h] [rbp-40h]
unsigned long long j; // [rsp+20h] [rbp-38h]
unsigned long long i; // [rsp+28h] [rbp-30h]
float v11; // [rsp+30h] [rbp-28h]
float v12; // [rsp+30h] [rbp-28h]
v11 = 0.0;
if ( a4 == 0.0 )
return 0.5;
for ( i = 0LL; i < a2; ++i )
v11 = (float)(*(float *)(*(_QWORD *)(*(_QWORD *)(a1 + 184) + 8 * a3) + 4 * i)
- *(float *)(*(_QWORD *)(*(_QWORD *)(a1 + 184) + 8 * a2) + 4 * i))
+ v11;
for ( j = a2 + 1; j < a3; ++j )
v11 = (float)(*(float *)(*(_QWORD *)(*(_QWORD *)(a1 + 184) + 8 * a3) + 4 * j)
- *(float *)(*(_QWORD *)(*(_QWORD *)(a1 + 184) + 8 * a2) + 4 * j))
+ v11;
for ( k = a3 + 1; k < *(_QWORD *)(a1 + 8); ++k )
v11 = (float)(*(float *)(*(_QWORD *)(*(_QWORD *)(a1 + 184) + 8 * a3) + 4 * k)
- *(float *)(*(_QWORD *)(*(_QWORD *)(a1 + 184) + 8 * a2) + 4 * k))
+ v11;
v4 = *(_QWORD *)(a1 + 8);
v7 = (float)(int)(((unsigned long long)v4 >> 1) | v4 & 1) + (float)(int)(((unsigned long long)v4 >> 1) | v4 & 1);
if ( v4 >= 0 )
v7 = (float)(int)v4;
v5 = v11 / (2.0 * (float)(v7 - 2.0) * a4) + 0.5;
v12 = v5;
if ( v5 > 1.0 )
v12 = 1.0;
if ( v12 < 0.0 )
return 0.0;
return v12;
}
| chooseLambda:
MOV qword ptr [RSP + -0x10],RDI
MOV qword ptr [RSP + -0x18],RSI
MOV qword ptr [RSP + -0x20],RDX
MOVSS dword ptr [RSP + -0x24],XMM0
MOV RAX,qword ptr [RSP + -0x10]
MOV qword ptr [RSP + -0x48],RAX
XORPS XMM0,XMM0
MOVSS dword ptr [RSP + -0x28],XMM0
MOVSS XMM0,dword ptr [RSP + -0x24]
CVTSS2SD XMM0,XMM0
XORPS XMM1,XMM1
UCOMISD XMM0,XMM1
JNZ 0x001557d0
JP 0x001557d0
MOVSS XMM0,dword ptr [0x001694d4]
MOVSS dword ptr [RSP + -0x4],XMM0
JMP 0x00155a0c
LAB_001557d0:
MOV qword ptr [RSP + -0x30],0x0
LAB_001557d9:
MOV RAX,qword ptr [RSP + -0x30]
CMP RAX,qword ptr [RSP + -0x18]
JNC 0x0015583a
MOV RAX,qword ptr [RSP + -0x48]
MOV RCX,qword ptr [RAX + 0xb8]
MOV RDX,qword ptr [RSP + -0x20]
MOV RCX,qword ptr [RCX + RDX*0x8]
MOV RDX,qword ptr [RSP + -0x30]
MOVSS XMM0,dword ptr [RCX + RDX*0x4]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RCX,qword ptr [RSP + -0x18]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV RCX,qword ptr [RSP + -0x30]
SUBSS XMM0,dword ptr [RAX + RCX*0x4]
ADDSS XMM0,dword ptr [RSP + -0x28]
MOVSS dword ptr [RSP + -0x28],XMM0
MOV RAX,qword ptr [RSP + -0x30]
ADD RAX,0x1
MOV qword ptr [RSP + -0x30],RAX
JMP 0x001557d9
LAB_0015583a:
MOV RAX,qword ptr [RSP + -0x18]
ADD RAX,0x1
MOV qword ptr [RSP + -0x38],RAX
LAB_00155848:
MOV RAX,qword ptr [RSP + -0x38]
CMP RAX,qword ptr [RSP + -0x20]
JNC 0x001558a9
MOV RAX,qword ptr [RSP + -0x48]
MOV RCX,qword ptr [RAX + 0xb8]
MOV RDX,qword ptr [RSP + -0x20]
MOV RCX,qword ptr [RCX + RDX*0x8]
MOV RDX,qword ptr [RSP + -0x38]
MOVSS XMM0,dword ptr [RCX + RDX*0x4]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RCX,qword ptr [RSP + -0x18]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV RCX,qword ptr [RSP + -0x38]
SUBSS XMM0,dword ptr [RAX + RCX*0x4]
ADDSS XMM0,dword ptr [RSP + -0x28]
MOVSS dword ptr [RSP + -0x28],XMM0
MOV RAX,qword ptr [RSP + -0x38]
ADD RAX,0x1
MOV qword ptr [RSP + -0x38],RAX
JMP 0x00155848
LAB_001558a9:
MOV RAX,qword ptr [RSP + -0x20]
ADD RAX,0x1
MOV qword ptr [RSP + -0x40],RAX
LAB_001558b7:
MOV RCX,qword ptr [RSP + -0x48]
MOV RAX,qword ptr [RSP + -0x40]
CMP RAX,qword ptr [RCX + 0x8]
JNC 0x0015591c
MOV RAX,qword ptr [RSP + -0x48]
MOV RCX,qword ptr [RAX + 0xb8]
MOV RDX,qword ptr [RSP + -0x20]
MOV RCX,qword ptr [RCX + RDX*0x8]
MOV RDX,qword ptr [RSP + -0x40]
MOVSS XMM0,dword ptr [RCX + RDX*0x4]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RCX,qword ptr [RSP + -0x18]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV RCX,qword ptr [RSP + -0x40]
SUBSS XMM0,dword ptr [RAX + RCX*0x4]
ADDSS XMM0,dword ptr [RSP + -0x28]
MOVSS dword ptr [RSP + -0x28],XMM0
MOV RAX,qword ptr [RSP + -0x40]
ADD RAX,0x1
MOV qword ptr [RSP + -0x40],RAX
JMP 0x001558b7
LAB_0015591c:
MOV RAX,qword ptr [RSP + -0x48]
MOVSS XMM0,dword ptr [RSP + -0x28]
CVTSS2SD XMM0,XMM0
MOVSD qword ptr [RSP + -0x58],XMM0
MOV RAX,qword ptr [RAX + 0x8]
MOV RDX,RAX
SHR RDX,0x1
MOV ECX,EAX
AND ECX,0x1
OR RCX,RDX
CVTSI2SS XMM0,RCX
ADDSS XMM0,XMM0
CVTSI2SS XMM1,RAX
MOVSS dword ptr [RSP + -0x50],XMM1
TEST RAX,RAX
MOVSS dword ptr [RSP + -0x4c],XMM0
JS 0x0015596e
MOVSS XMM0,dword ptr [RSP + -0x50]
MOVSS dword ptr [RSP + -0x4c],XMM0
LAB_0015596e:
MOVSD XMM1,qword ptr [RSP + -0x58]
MOVSS XMM0,dword ptr [RSP + -0x4c]
MOVSS XMM2,dword ptr [0x001694cc]
SUBSS XMM0,XMM2
CVTSS2SD XMM2,XMM0
MOVSD XMM0,qword ptr [0x001696b0]
MULSD XMM0,XMM2
MOVSS XMM2,dword ptr [RSP + -0x24]
CVTSS2SD XMM2,XMM2
MULSD XMM0,XMM2
DIVSD XMM1,XMM0
MOVSD XMM0,qword ptr [0x001694e0]
ADDSD XMM0,XMM1
CVTSD2SS XMM0,XMM0
MOVSS dword ptr [RSP + -0x28],XMM0
MOVSS XMM0,dword ptr [RSP + -0x28]
CVTSS2SD XMM0,XMM0
MOVSD XMM1,qword ptr [0x001694e8]
UCOMISD XMM0,XMM1
JBE 0x001559e4
MOVSS XMM0,dword ptr [0x001694c8]
MOVSS dword ptr [RSP + -0x28],XMM0
LAB_001559e4:
MOVSS XMM0,dword ptr [RSP + -0x28]
CVTSS2SD XMM1,XMM0
XORPS XMM0,XMM0
UCOMISD XMM0,XMM1
JBE 0x00155a00
XORPS XMM0,XMM0
MOVSS dword ptr [RSP + -0x28],XMM0
LAB_00155a00:
MOVSS XMM0,dword ptr [RSP + -0x28]
MOVSS dword ptr [RSP + -0x4],XMM0
LAB_00155a0c:
MOVSS XMM0,dword ptr [RSP + -0x4]
RET
|
/* StartTree::BIONJMatrix<float>::chooseLambda(unsigned long, unsigned long, float) */
float __thiscall
StartTree::BIONJMatrix<float>::chooseLambda
(BIONJMatrix<float> *this,ulong param_1,ulong param_2,float param_3)
{
float local_4c;
ulong local_40;
ulong local_38;
ulong local_30;
float local_28;
float local_4;
local_28 = 0.0;
if ((param_3 != 0.0) || (NAN(param_3))) {
for (local_30 = 0; local_30 < param_1; local_30 = local_30 + 1) {
local_28 = (*(float *)(*(long *)(*(long *)(this + 0xb8) + param_2 * 8) + local_30 * 4) -
*(float *)(*(long *)(*(long *)(this + 0xb8) + param_1 * 8) + local_30 * 4)) +
local_28;
}
for (local_38 = param_1 + 1; local_38 < param_2; local_38 = local_38 + 1) {
local_28 = (*(float *)(*(long *)(*(long *)(this + 0xb8) + param_2 * 8) + local_38 * 4) -
*(float *)(*(long *)(*(long *)(this + 0xb8) + param_1 * 8) + local_38 * 4)) +
local_28;
}
for (local_40 = param_2 + 1; local_40 < *(ulong *)(this + 8); local_40 = local_40 + 1) {
local_28 = (*(float *)(*(long *)(*(long *)(this + 0xb8) + param_2 * 8) + local_40 * 4) -
*(float *)(*(long *)(*(long *)(this + 0xb8) + param_1 * 8) + local_40 * 4)) +
local_28;
}
local_4c = (float)*(ulong *)(this + 8);
local_28 = (float)(DAT_001694e0 +
(double)local_28 /
(DAT_001696b0 * (double)(local_4c - DAT_001694cc) * (double)param_3));
if (DAT_001694e8 < (double)local_28) {
local_28 = DAT_001694c8;
}
if (local_28 < 0.0) {
local_28 = 0.0;
}
local_4 = local_28;
}
else {
local_4 = DAT_001694d4;
}
return local_4;
}
| |
33,527 | ma_remove_table_from_trnman | eloqsql/storage/maria/ma_state.c | void _ma_remove_table_from_trnman(MARIA_HA *info)
{
MARIA_SHARE *share= info->s;
TRN *trn= info->trn;
MARIA_USED_TABLES *tables, **prev;
DBUG_ENTER("_ma_remove_table_from_trnman");
DBUG_PRINT("enter", ("trn: %p used_tables: %p share: %p in_trans: %d",
trn, trn->used_tables, share, share->in_trans));
mysql_mutex_assert_owner(&share->intern_lock);
if (trn == &dummy_transaction_object)
DBUG_VOID_RETURN;
/* First remove share from used_tables */
for (prev= (MARIA_USED_TABLES**) (char*) &trn->used_tables;
(tables= *prev);
prev= &tables->next)
{
if (tables->share == share)
{
*prev= tables->next;
/*
We don't have to and can't call decrement_share_in_trans(share) here
as we know there is an active MARIA_HA handler around.
*/
share->in_trans--;
my_free(tables);
break;
}
}
if (!tables)
{
/*
This can only happens in case of rename of intermediate table as
part of alter table
*/
DBUG_PRINT("warning", ("share: %p where not in used_tables_list", share));
}
/* Reset trn and remove table from used_instances */
_ma_reset_trn_for_table(info);
DBUG_VOID_RETURN;
} | O3 | c | ma_remove_table_from_trnman:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
cmpq 0x34b44e(%rip), %rdi # 0x383f70
je 0x38b84
movq (%rbx), %rax
addq $0x58, %rdi
movq %rdi, %rcx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x38b4d
cmpq %rax, 0x8(%rdi)
jne 0x38b2b
movq (%rdi), %rdx
movq %rdx, (%rcx)
decl 0x7ac(%rax)
callq 0x9ffde
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0x38b7c
leaq 0x10(%rbx), %rcx
movq 0x10(%rbx), %rdx
testq %rdx, %rdx
je 0x38b71
movq %rax, 0x18(%rdx)
movq 0x10(%rbx), %rdx
movq 0x18(%rbx), %rax
jmp 0x38b73
xorl %edx, %edx
movq %rdx, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rcx)
movq $0x0, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| _ma_remove_table_from_trnman:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
mov rdi, [rdi+8]
cmp rdi, cs:dummy_transaction_object_ptr
jz short loc_38B84
mov rax, [rbx]
add rdi, 58h ; 'X'
loc_38B2B:
mov rcx, rdi
mov rdi, [rdi]
test rdi, rdi
jz short loc_38B4D
cmp [rdi+8], rax
jnz short loc_38B2B
mov rdx, [rdi]
mov [rcx], rdx
dec dword ptr [rax+7ACh]
call my_free
loc_38B4D:
mov rax, [rbx+18h]
test rax, rax
jz short loc_38B7C
lea rcx, [rbx+10h]
mov rdx, [rbx+10h]
test rdx, rdx
jz short loc_38B71
mov [rdx+18h], rax
mov rdx, [rbx+10h]
mov rax, [rbx+18h]
jmp short loc_38B73
loc_38B71:
xor edx, edx
loc_38B73:
mov [rax], rdx
xorps xmm0, xmm0
movups xmmword ptr [rcx], xmm0
loc_38B7C:
mov qword ptr [rbx+8], 0
loc_38B84:
add rsp, 8
pop rbx
pop rbp
retn
| _QWORD * ma_remove_table_from_trnman(_QWORD *a1)
{
_QWORD *result; // rax
_QWORD *v3; // rdi
long long v4; // rax
_QWORD *v5; // rdi
_QWORD *v6; // rcx
long long v7; // rdx
long long v8; // rdx
v3 = (_QWORD *)a1[1];
if ( v3 != dummy_transaction_object )
{
v4 = *a1;
v5 = v3 + 11;
while ( 1 )
{
v6 = v5;
v5 = (_QWORD *)*v5;
if ( !v5 )
break;
if ( v5[1] == v4 )
{
*v6 = *v5;
--*(_DWORD *)(v4 + 1964);
my_free(v5);
break;
}
}
result = (_QWORD *)a1[3];
if ( result )
{
v7 = a1[2];
if ( v7 )
{
*(_QWORD *)(v7 + 24) = result;
v8 = a1[2];
result = (_QWORD *)a1[3];
}
else
{
v8 = 0LL;
}
*result = v8;
*((_OWORD *)a1 + 1) = 0LL;
}
a1[1] = 0LL;
}
return result;
}
| _ma_remove_table_from_trnman:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x8]
CMP RDI,qword ptr [0x00483f70]
JZ 0x00138b84
MOV RAX,qword ptr [RBX]
ADD RDI,0x58
LAB_00138b2b:
MOV RCX,RDI
MOV RDI,qword ptr [RDI]
TEST RDI,RDI
JZ 0x00138b4d
CMP qword ptr [RDI + 0x8],RAX
JNZ 0x00138b2b
MOV RDX,qword ptr [RDI]
MOV qword ptr [RCX],RDX
DEC dword ptr [RAX + 0x7ac]
CALL 0x0019ffde
LAB_00138b4d:
MOV RAX,qword ptr [RBX + 0x18]
TEST RAX,RAX
JZ 0x00138b7c
LEA RCX,[RBX + 0x10]
MOV RDX,qword ptr [RBX + 0x10]
TEST RDX,RDX
JZ 0x00138b71
MOV qword ptr [RDX + 0x18],RAX
MOV RDX,qword ptr [RBX + 0x10]
MOV RAX,qword ptr [RBX + 0x18]
JMP 0x00138b73
LAB_00138b71:
XOR EDX,EDX
LAB_00138b73:
MOV qword ptr [RAX],RDX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RCX],XMM0
LAB_00138b7c:
MOV qword ptr [RBX + 0x8],0x0
LAB_00138b84:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void _ma_remove_table_from_trnman(long *param_1)
{
int *piVar1;
long *plVar2;
long lVar3;
long *plVar4;
if ((int *)param_1[1] != PTR_dummy_transaction_object_00483f70) {
lVar3 = *param_1;
plVar2 = (long *)((int *)param_1[1] + 0x58);
do {
plVar4 = plVar2;
plVar2 = (long *)*plVar4;
if (plVar2 == (long *)0x0) goto LAB_00138b4d;
} while (plVar2[1] != lVar3);
*plVar4 = *plVar2;
piVar1 = (int *)(lVar3 + 0x7ac);
*piVar1 = *piVar1 + -1;
my_free();
LAB_00138b4d:
plVar2 = (long *)param_1[3];
if (plVar2 != (long *)0x0) {
if (param_1[2] == 0) {
lVar3 = 0;
}
else {
*(long **)(param_1[2] + 0x18) = plVar2;
lVar3 = param_1[2];
plVar2 = (long *)param_1[3];
}
*plVar2 = lVar3;
param_1[2] = 0;
param_1[3] = 0;
}
param_1[1] = 0;
}
return;
}
| |
33,528 | plutovg_font_face_get_metrics | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-font.c | void plutovg_font_face_get_metrics(const plutovg_font_face_t* face, float size, float* ascent, float* descent, float* line_gap, plutovg_rect_t* extents)
{
float scale = plutovg_font_face_get_scale(face, size);
if(ascent) *ascent = face->ascent * scale;
if(descent) *descent = face->descent * scale;
if(line_gap) *line_gap = face->line_gap * scale;
if(extents) {
extents->x = face->x1 * scale;
extents->y = face->y2 * -scale;
extents->w = (face->x2 - face->x1) * scale;
extents->h = (face->y1 - face->y2) * -scale;
}
} | O0 | c | plutovg_font_face_get_metrics:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movss %xmm0, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movss -0xc(%rbp), %xmm0
callq 0x57310
movss %xmm0, -0x34(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x57231
movq -0x8(%rbp), %rax
cvtsi2ssl 0x4(%rax), %xmm0
mulss -0x34(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, (%rax)
cmpq $0x0, -0x20(%rbp)
je 0x5724e
movq -0x8(%rbp), %rax
cvtsi2ssl 0x8(%rax), %xmm0
mulss -0x34(%rbp), %xmm0
movq -0x20(%rbp), %rax
movss %xmm0, (%rax)
cmpq $0x0, -0x28(%rbp)
je 0x5726b
movq -0x8(%rbp), %rax
cvtsi2ssl 0xc(%rax), %xmm0
mulss -0x34(%rbp), %xmm0
movq -0x28(%rbp), %rax
movss %xmm0, (%rax)
cmpq $0x0, -0x30(%rbp)
je 0x57305
movq -0x8(%rbp), %rax
cvtsi2ssl 0x10(%rax), %xmm0
mulss -0x34(%rbp), %xmm0
movq -0x30(%rbp), %rax
movss %xmm0, (%rax)
movq -0x8(%rbp), %rax
cvtsi2ssl 0x1c(%rax), %xmm0
movss -0x34(%rbp), %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax # imm = 0x80000000
movd %eax, %xmm1
mulss %xmm1, %xmm0
movq -0x30(%rbp), %rax
movss %xmm0, 0x4(%rax)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
movq -0x8(%rbp), %rcx
subl 0x10(%rcx), %eax
cvtsi2ss %eax, %xmm0
mulss -0x34(%rbp), %xmm0
movq -0x30(%rbp), %rax
movss %xmm0, 0x8(%rax)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movq -0x8(%rbp), %rcx
subl 0x1c(%rcx), %eax
cvtsi2ss %eax, %xmm0
movss -0x34(%rbp), %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax # imm = 0x80000000
movd %eax, %xmm1
mulss %xmm1, %xmm0
movq -0x30(%rbp), %rax
movss %xmm0, 0xc(%rax)
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| plutovg_font_face_get_metrics:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
movss [rbp+var_C], xmm0
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov rdi, [rbp+var_8]
movss xmm0, [rbp+var_C]
call plutovg_font_face_get_scale
movss [rbp+var_34], xmm0
cmp [rbp+var_18], 0
jz short loc_57231
mov rax, [rbp+var_8]
cvtsi2ss xmm0, dword ptr [rax+4]
mulss xmm0, [rbp+var_34]
mov rax, [rbp+var_18]
movss dword ptr [rax], xmm0
loc_57231:
cmp [rbp+var_20], 0
jz short loc_5724E
mov rax, [rbp+var_8]
cvtsi2ss xmm0, dword ptr [rax+8]
mulss xmm0, [rbp+var_34]
mov rax, [rbp+var_20]
movss dword ptr [rax], xmm0
loc_5724E:
cmp [rbp+var_28], 0
jz short loc_5726B
mov rax, [rbp+var_8]
cvtsi2ss xmm0, dword ptr [rax+0Ch]
mulss xmm0, [rbp+var_34]
mov rax, [rbp+var_28]
movss dword ptr [rax], xmm0
loc_5726B:
cmp [rbp+var_30], 0
jz loc_57305
mov rax, [rbp+var_8]
cvtsi2ss xmm0, dword ptr [rax+10h]
mulss xmm0, [rbp+var_34]
mov rax, [rbp+var_30]
movss dword ptr [rax], xmm0
mov rax, [rbp+var_8]
cvtsi2ss xmm0, dword ptr [rax+1Ch]
movss xmm1, [rbp+var_34]
movd eax, xmm1
xor eax, 80000000h
movd xmm1, eax
mulss xmm0, xmm1
mov rax, [rbp+var_30]
movss dword ptr [rax+4], xmm0
mov rax, [rbp+var_8]
mov eax, [rax+18h]
mov rcx, [rbp+var_8]
sub eax, [rcx+10h]
cvtsi2ss xmm0, eax
mulss xmm0, [rbp+var_34]
mov rax, [rbp+var_30]
movss dword ptr [rax+8], xmm0
mov rax, [rbp+var_8]
mov eax, [rax+14h]
mov rcx, [rbp+var_8]
sub eax, [rcx+1Ch]
cvtsi2ss xmm0, eax
movss xmm1, [rbp+var_34]
movd eax, xmm1
xor eax, 80000000h
movd xmm1, eax
mulss xmm0, xmm1
mov rax, [rbp+var_30]
movss dword ptr [rax+0Ch], xmm0
loc_57305:
add rsp, 40h
pop rbp
retn
| void plutovg_font_face_get_metrics(int *a1, float *a2, float *a3, float *a4, float *a5, float a6)
{
float scale; // [rsp+Ch] [rbp-34h]
scale = plutovg_font_face_get_scale(a1, a6);
if ( a2 )
*a2 = (float)a1[1] * scale;
if ( a3 )
*a3 = (float)a1[2] * scale;
if ( a4 )
*a4 = (float)a1[3] * scale;
if ( a5 )
{
*a5 = (float)a1[4] * scale;
a5[1] = (float)a1[7] * COERCE_FLOAT(_mm_cvtsi128_si32((__m128i)LODWORD(scale)) ^ 0x80000000);
a5[2] = (float)(a1[6] - a1[4]) * scale;
a5[3] = (float)(a1[5] - a1[7]) * COERCE_FLOAT(_mm_cvtsi128_si32((__m128i)LODWORD(scale)) ^ 0x80000000);
}
}
| plutovg_font_face_get_metrics:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOVSS dword ptr [RBP + -0xc],XMM0
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV RDI,qword ptr [RBP + -0x8]
MOVSS XMM0,dword ptr [RBP + -0xc]
CALL 0x00157310
MOVSS dword ptr [RBP + -0x34],XMM0
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00157231
MOV RAX,qword ptr [RBP + -0x8]
CVTSI2SS XMM0,dword ptr [RAX + 0x4]
MULSS XMM0,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x18]
MOVSS dword ptr [RAX],XMM0
LAB_00157231:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x0015724e
MOV RAX,qword ptr [RBP + -0x8]
CVTSI2SS XMM0,dword ptr [RAX + 0x8]
MULSS XMM0,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x20]
MOVSS dword ptr [RAX],XMM0
LAB_0015724e:
CMP qword ptr [RBP + -0x28],0x0
JZ 0x0015726b
MOV RAX,qword ptr [RBP + -0x8]
CVTSI2SS XMM0,dword ptr [RAX + 0xc]
MULSS XMM0,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x28]
MOVSS dword ptr [RAX],XMM0
LAB_0015726b:
CMP qword ptr [RBP + -0x30],0x0
JZ 0x00157305
MOV RAX,qword ptr [RBP + -0x8]
CVTSI2SS XMM0,dword ptr [RAX + 0x10]
MULSS XMM0,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x30]
MOVSS dword ptr [RAX],XMM0
MOV RAX,qword ptr [RBP + -0x8]
CVTSI2SS XMM0,dword ptr [RAX + 0x1c]
MOVSS XMM1,dword ptr [RBP + -0x34]
MOVD EAX,XMM1
XOR EAX,0x80000000
MOVD XMM1,EAX
MULSS XMM0,XMM1
MOV RAX,qword ptr [RBP + -0x30]
MOVSS dword ptr [RAX + 0x4],XMM0
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x18]
MOV RCX,qword ptr [RBP + -0x8]
SUB EAX,dword ptr [RCX + 0x10]
CVTSI2SS XMM0,EAX
MULSS XMM0,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x30]
MOVSS dword ptr [RAX + 0x8],XMM0
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x14]
MOV RCX,qword ptr [RBP + -0x8]
SUB EAX,dword ptr [RCX + 0x1c]
CVTSI2SS XMM0,EAX
MOVSS XMM1,dword ptr [RBP + -0x34]
MOVD EAX,XMM1
XOR EAX,0x80000000
MOVD XMM1,EAX
MULSS XMM0,XMM1
MOV RAX,qword ptr [RBP + -0x30]
MOVSS dword ptr [RAX + 0xc],XMM0
LAB_00157305:
ADD RSP,0x40
POP RBP
RET
|
void plutovg_font_face_get_metrics
(int4 param_1,long param_2,float *param_3,float *param_4,float *param_5,
float *param_6)
{
float fVar1;
fVar1 = (float)plutovg_font_face_get_scale(param_1,param_2);
if (param_3 != (float *)0x0) {
*param_3 = (float)*(int *)(param_2 + 4) * fVar1;
}
if (param_4 != (float *)0x0) {
*param_4 = (float)*(int *)(param_2 + 8) * fVar1;
}
if (param_5 != (float *)0x0) {
*param_5 = (float)*(int *)(param_2 + 0xc) * fVar1;
}
if (param_6 != (float *)0x0) {
*param_6 = (float)*(int *)(param_2 + 0x10) * fVar1;
param_6[1] = (float)*(int *)(param_2 + 0x1c) * -fVar1;
param_6[2] = (float)(*(int *)(param_2 + 0x18) - *(int *)(param_2 + 0x10)) * fVar1;
param_6[3] = (float)(*(int *)(param_2 + 0x14) - *(int *)(param_2 + 0x1c)) * -fVar1;
}
return;
}
| |
33,529 | ma_net_real_write | eloqsql/libmariadb/libmariadb/ma_net.c | int ma_net_real_write(NET *net, const char *packet, size_t len)
{
ssize_t length;
char *pos,*end;
if (net->error == 2)
return(-1); /* socket can't be used */
net->reading_or_writing=2;
#ifdef HAVE_COMPRESS
if (net->compress)
{
size_t complen;
uchar *b;
uint header_length=NET_HEADER_SIZE+COMP_HEADER_SIZE;
if (!(b=(uchar*) malloc(len + NET_HEADER_SIZE + COMP_HEADER_SIZE + 1)))
{
net->pvio->set_error(net->pvio->mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0);
net->error=2;
net->reading_or_writing=0;
return(1);
}
memcpy(b+header_length,packet,len);
if (_mariadb_compress(net, (unsigned char*) b+header_length,&len,&complen))
{
complen=0;
}
int3store(&b[NET_HEADER_SIZE],complen);
int3store(b,len);
b[3]=(uchar) (net->compress_pkt_nr++);
len+= header_length;
packet= (char*) b;
}
#endif /* HAVE_COMPRESS */
pos=(char*) packet; end=pos+len;
while (pos != end)
{
if ((length=ma_pvio_write(net->pvio,(uchar *)pos,(size_t) (end-pos))) <= 0)
{
int save_errno= errno;
char errmsg[100];
net->error=2; /* Close socket */
strerror_r(save_errno, errmsg, 100);
net->pvio->set_error(net->pvio->mysql, CR_ERR_NET_WRITE, SQLSTATE_UNKNOWN, 0,
errmsg, save_errno);
net->reading_or_writing=0;
#ifdef HAVE_COMPRESS
if (net->compress)
free((char*) packet);
#endif
return(1);
}
pos+=length;
}
#ifdef HAVE_COMPRESS
if (net->compress)
free((char*) packet);
#endif
net->reading_or_writing=0;
return(((int) (pos != end)));
} | O3 | c | ma_net_real_write:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq %rdx, -0xa8(%rbp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpb $0x2, 0x94(%rdi)
je 0x313cd
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movb $0x2, 0x80(%rdi)
cmpb $0x0, 0x84(%rdi)
je 0x3129e
leaq 0x8(%rbx), %rdi
callq 0x13600
testq %rax, %rax
je 0x312a3
movq %rax, %r12
movq %rax, %r13
addq $0x7, %r13
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x13390
leaq -0xa8(%rbp), %rdx
leaq -0xa0(%rbp), %rcx
movq %r14, %rdi
movq %r13, %rsi
callq 0x1e0c3
testb %al, %al
jne 0x312d6
movq -0xa0(%rbp), %rax
jmp 0x312d8
movq %r15, %r12
jmp 0x3131e
movq (%r14), %r8
movq 0x40(%r8), %rdi
leaq 0x177af(%rip), %rax # 0x48a60
movq (%rax), %rdx
movl $0x7d8, %esi # imm = 0x7D8
xorl %ecx, %ecx
xorl %eax, %eax
callq *0x50(%r8)
movb $0x2, 0x94(%r14)
movb $0x0, 0x80(%r14)
jmp 0x313c8
xorl %eax, %eax
movq %r12, %rdx
movb %al, 0x4(%r12)
movb %ah, 0x5(%rdx)
shrl $0x10, %eax
movb %al, 0x6(%r12)
movq -0xa8(%rbp), %rbx
movb %bl, (%r12)
movb %bh, 0x1(%rdx)
movl %ebx, %eax
shrl $0x10, %eax
movb %al, 0x2(%r12)
movl 0x64(%r14), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x64(%r14)
movb %al, 0x3(%r12)
addq $0x7, %rbx
movq %rbx, -0xa8(%rbp)
testq %rbx, %rbx
je 0x31347
movq %r12, %r15
addq %r12, %rbx
movq (%r14), %rdi
movq %rbx, %rdx
subq %r15, %rdx
movq %r15, %rsi
callq 0x1d4aa
testq %rax, %rax
jle 0x31365
addq %rax, %r15
cmpq %rbx, %r15
jne 0x31329
cmpb $0x0, 0x84(%r14)
je 0x31359
movq %r12, %rdi
callq 0x13570
movb $0x0, 0x80(%r14)
xorl %eax, %eax
jmp 0x313cd
callq 0x13060
movl (%rax), %ebx
movb $0x2, 0x94(%r14)
leaq -0xa0(%rbp), %r15
movl $0x64, %edx
movl %ebx, %edi
movq %r15, %rsi
callq 0x131e0
movq (%r14), %r10
movq 0x40(%r10), %rdi
leaq 0x176c8(%rip), %rax # 0x48a60
movq (%rax), %rdx
movl $0x1396, %esi # imm = 0x1396
xorl %ecx, %ecx
movq %r15, %r8
movl %ebx, %r9d
xorl %eax, %eax
callq *0x50(%r10)
movb $0x0, 0x80(%r14)
cmpb $0x0, 0x84(%r14)
je 0x313c8
movq %r12, %rdi
callq 0x13570
movl $0x1, %eax
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x313ee
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x13500
| ma_net_real_write:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov rax, fs:28h
mov [rbp+var_30], rax
mov [rbp+var_A8], rdx
mov eax, 0FFFFFFFFh
cmp byte ptr [rdi+94h], 2
jz loc_313CD
mov rbx, rdx
mov r15, rsi
mov r14, rdi
mov byte ptr [rdi+80h], 2
cmp byte ptr [rdi+84h], 0
jz short loc_3129E
lea rdi, [rbx+8]
call _malloc
test rax, rax
jz short loc_312A3
mov r12, rax
mov r13, rax
add r13, 7
mov rdi, r13
mov rsi, r15
mov rdx, rbx
call _memcpy
lea rdx, [rbp+var_A8]
lea rcx, [rbp+var_A0]
mov rdi, r14
mov rsi, r13
call _mariadb_compress
test al, al
jnz short loc_312D6
mov rax, [rbp+var_A0]
jmp short loc_312D8
loc_3129E:
mov r12, r15
jmp short loc_3131E
loc_312A3:
mov r8, [r14]
mov rdi, [r8+40h]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov esi, 7D8h
xor ecx, ecx
xor eax, eax
call qword ptr [r8+50h]
mov byte ptr [r14+94h], 2
mov byte ptr [r14+80h], 0
jmp loc_313C8
loc_312D6:
xor eax, eax
loc_312D8:
mov rdx, r12
mov [r12+4], al
mov [rdx+5], ah
shr eax, 10h
mov [r12+6], al
mov rbx, [rbp+var_A8]
mov [r12], bl
mov [rdx+1], bh
mov eax, ebx
shr eax, 10h
mov [r12+2], al
mov eax, [r14+64h]
lea ecx, [rax+1]
mov [r14+64h], ecx
mov [r12+3], al
add rbx, 7
mov [rbp+var_A8], rbx
loc_3131E:
test rbx, rbx
jz short loc_31347
mov r15, r12
add rbx, r12
loc_31329:
mov rdi, [r14]
mov rdx, rbx
sub rdx, r15
mov rsi, r15
call ma_pvio_write
test rax, rax
jle short loc_31365
add r15, rax
cmp r15, rbx
jnz short loc_31329
loc_31347:
cmp byte ptr [r14+84h], 0
jz short loc_31359
mov rdi, r12
call _free
loc_31359:
mov byte ptr [r14+80h], 0
xor eax, eax
jmp short loc_313CD
loc_31365:
call ___errno_location
mov ebx, [rax]
mov byte ptr [r14+94h], 2
lea r15, [rbp+var_A0]
mov edx, 64h ; 'd'
mov edi, ebx
mov rsi, r15
call ___xpg_strerror_r
mov r10, [r14]
mov rdi, [r10+40h]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov esi, 1396h
xor ecx, ecx
mov r8, r15
mov r9d, ebx
xor eax, eax
call qword ptr [r10+50h]
mov byte ptr [r14+80h], 0
cmp byte ptr [r14+84h], 0
jz short loc_313C8
mov rdi, r12
call _free
loc_313C8:
mov eax, 1
loc_313CD:
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz short loc_313EE
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_313EE:
call ___stack_chk_fail
| long long ma_net_real_write(_BYTE *a1, long long a2, long long a3)
{
long long result; // rax
long long v4; // rbx
long long v6; // rax
long long v7; // r12
long long v8; // r13
int v9; // eax
long long v10; // rbx
int v11; // eax
long long v12; // r15
long long v13; // rbx
long long v14; // rdi
long long v15; // rax
unsigned int v16; // ebx
long long v17; // [rsp+8h] [rbp-A8h] BYREF
_QWORD v18[20]; // [rsp+10h] [rbp-A0h] BYREF
v18[14] = __readfsqword(0x28u);
v17 = a3;
result = 0xFFFFFFFFLL;
if ( a1[148] != 2 )
{
v4 = a3;
a1[128] = 2;
if ( a1[132] )
{
v6 = malloc(a3 + 8);
if ( !v6 )
{
(*(void ( **)(_QWORD, long long, char *, _QWORD))(*(_QWORD *)a1 + 80LL))(
*(_QWORD *)(*(_QWORD *)a1 + 64LL),
2008LL,
SQLSTATE_UNKNOWN,
0LL);
a1[148] = 2;
a1[128] = 0;
return 1LL;
}
v7 = v6;
v8 = v6 + 7;
memcpy(v6 + 7, a2, v4);
if ( mariadb_compress((long long)a1, v8, &v17, v18) )
v9 = 0;
else
v9 = v18[0];
*(_WORD *)(v7 + 4) = v9;
*(_BYTE *)(v7 + 6) = BYTE2(v9);
v10 = v17;
*(_WORD *)v7 = v17;
*(_BYTE *)(v7 + 2) = BYTE2(v10);
v11 = *((_DWORD *)a1 + 25);
*((_DWORD *)a1 + 25) = v11 + 1;
*(_BYTE *)(v7 + 3) = v11;
v4 = v10 + 7;
v17 = v4;
}
else
{
v7 = a2;
}
if ( v4 )
{
v12 = v7;
v13 = v7 + v4;
while ( 1 )
{
v14 = *(_QWORD *)a1;
v15 = ma_pvio_write(*(_QWORD *)a1, v12, v13 - v12);
if ( v15 <= 0 )
break;
v12 += v15;
if ( v12 == v13 )
goto LABEL_14;
}
v16 = *(_DWORD *)__errno_location(v14);
a1[148] = 2;
__xpg_strerror_r(v16, v18, 100LL);
(*(void ( **)(_QWORD, long long, char *, _QWORD, _QWORD *, _QWORD))(*(_QWORD *)a1 + 80LL))(
*(_QWORD *)(*(_QWORD *)a1 + 64LL),
5014LL,
SQLSTATE_UNKNOWN,
0LL,
v18,
v16);
a1[128] = 0;
if ( a1[132] )
free(v7);
return 1LL;
}
LABEL_14:
if ( a1[132] )
free(v7);
a1[128] = 0;
return 0LL;
}
return result;
}
| ma_net_real_write:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV qword ptr [RBP + -0xa8],RDX
MOV EAX,0xffffffff
CMP byte ptr [RDI + 0x94],0x2
JZ 0x001313cd
MOV RBX,RDX
MOV R15,RSI
MOV R14,RDI
MOV byte ptr [RDI + 0x80],0x2
CMP byte ptr [RDI + 0x84],0x0
JZ 0x0013129e
LEA RDI,[RBX + 0x8]
CALL 0x00113600
TEST RAX,RAX
JZ 0x001312a3
MOV R12,RAX
MOV R13,RAX
ADD R13,0x7
MOV RDI,R13
MOV RSI,R15
MOV RDX,RBX
CALL 0x00113390
LEA RDX,[RBP + -0xa8]
LEA RCX,[RBP + -0xa0]
MOV RDI,R14
MOV RSI,R13
CALL 0x0011e0c3
TEST AL,AL
JNZ 0x001312d6
MOV RAX,qword ptr [RBP + -0xa0]
JMP 0x001312d8
LAB_0013129e:
MOV R12,R15
JMP 0x0013131e
LAB_001312a3:
MOV R8,qword ptr [R14]
MOV RDI,qword ptr [R8 + 0x40]
LEA RAX,[0x148a60]
MOV RDX,qword ptr [RAX]
MOV ESI,0x7d8
XOR ECX,ECX
XOR EAX,EAX
CALL qword ptr [R8 + 0x50]
MOV byte ptr [R14 + 0x94],0x2
MOV byte ptr [R14 + 0x80],0x0
JMP 0x001313c8
LAB_001312d6:
XOR EAX,EAX
LAB_001312d8:
MOV RDX,R12
MOV byte ptr [R12 + 0x4],AL
MOV byte ptr [RDX + 0x5],AH
SHR EAX,0x10
MOV byte ptr [R12 + 0x6],AL
MOV RBX,qword ptr [RBP + -0xa8]
MOV byte ptr [R12],BL
MOV byte ptr [RDX + 0x1],BH
MOV EAX,EBX
SHR EAX,0x10
MOV byte ptr [R12 + 0x2],AL
MOV EAX,dword ptr [R14 + 0x64]
LEA ECX,[RAX + 0x1]
MOV dword ptr [R14 + 0x64],ECX
MOV byte ptr [R12 + 0x3],AL
ADD RBX,0x7
MOV qword ptr [RBP + -0xa8],RBX
LAB_0013131e:
TEST RBX,RBX
JZ 0x00131347
MOV R15,R12
ADD RBX,R12
LAB_00131329:
MOV RDI,qword ptr [R14]
MOV RDX,RBX
SUB RDX,R15
MOV RSI,R15
CALL 0x0011d4aa
TEST RAX,RAX
JLE 0x00131365
ADD R15,RAX
CMP R15,RBX
JNZ 0x00131329
LAB_00131347:
CMP byte ptr [R14 + 0x84],0x0
JZ 0x00131359
MOV RDI,R12
CALL 0x00113570
LAB_00131359:
MOV byte ptr [R14 + 0x80],0x0
XOR EAX,EAX
JMP 0x001313cd
LAB_00131365:
CALL 0x00113060
MOV EBX,dword ptr [RAX]
MOV byte ptr [R14 + 0x94],0x2
LEA R15,[RBP + -0xa0]
MOV EDX,0x64
MOV EDI,EBX
MOV RSI,R15
CALL 0x001131e0
MOV R10,qword ptr [R14]
MOV RDI,qword ptr [R10 + 0x40]
LEA RAX,[0x148a60]
MOV RDX,qword ptr [RAX]
MOV ESI,0x1396
XOR ECX,ECX
MOV R8,R15
MOV R9D,EBX
XOR EAX,EAX
CALL qword ptr [R10 + 0x50]
MOV byte ptr [R14 + 0x80],0x0
CMP byte ptr [R14 + 0x84],0x0
JZ 0x001313c8
MOV RDI,R12
CALL 0x00113570
LAB_001313c8:
MOV EAX,0x1
LAB_001313cd:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x001313ee
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001313ee:
CALL 0x00113500
|
int8 ma_net_real_write(long *param_1,int1 *param_2,size_t param_3)
{
int iVar1;
char cVar2;
int8 uVar3;
int1 *puVar4;
long lVar5;
int *piVar6;
int1 *puVar7;
long in_FS_OFFSET;
size_t local_b0;
int4 local_a8 [28];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
uVar3 = 0xffffffff;
local_b0 = param_3;
if (*(char *)((long)param_1 + 0x94) != '\x02') {
*(int1 *)(param_1 + 0x10) = 2;
if (*(char *)((long)param_1 + 0x84) != '\0') {
puVar4 = (int1 *)malloc(param_3 + 8);
if (puVar4 == (int1 *)0x0) {
(**(code **)(*param_1 + 0x50))(*(int8 *)(*param_1 + 0x40),0x7d8,SQLSTATE_UNKNOWN,0);
*(int1 *)((long)param_1 + 0x94) = 2;
*(int1 *)(param_1 + 0x10) = 0;
LAB_001313c8:
uVar3 = 1;
goto LAB_001313cd;
}
memcpy(puVar4 + 7,param_2,param_3);
cVar2 = _mariadb_compress(param_1,puVar4 + 7,&local_b0,local_a8);
if (cVar2 != '\0') {
local_a8[0] = 0;
}
puVar4[4] = (char)local_a8[0];
puVar4[5] = (char)((uint)local_a8[0] >> 8);
puVar4[6] = (char)((uint)local_a8[0] >> 0x10);
*puVar4 = (char)local_b0;
puVar4[1] = (char)(local_b0 >> 8);
puVar4[2] = (char)(local_b0 >> 0x10);
iVar1 = *(int *)((long)param_1 + 100);
*(int *)((long)param_1 + 100) = iVar1 + 1;
puVar4[3] = (char)iVar1;
local_b0 = local_b0 + 7;
param_2 = puVar4;
}
if (local_b0 != 0) {
puVar7 = param_2 + local_b0;
puVar4 = param_2;
do {
lVar5 = ma_pvio_write(*param_1,puVar4,(long)puVar7 - (long)puVar4);
if (lVar5 < 1) {
piVar6 = __errno_location();
iVar1 = *piVar6;
*(int1 *)((long)param_1 + 0x94) = 2;
__xpg_strerror_r(iVar1,local_a8,100);
(**(code **)(*param_1 + 0x50))
(*(int8 *)(*param_1 + 0x40),0x1396,SQLSTATE_UNKNOWN,0,local_a8,iVar1);
*(int1 *)(param_1 + 0x10) = 0;
if (*(char *)((long)param_1 + 0x84) != '\0') {
free(param_2);
}
goto LAB_001313c8;
}
puVar4 = puVar4 + lVar5;
} while (puVar4 != puVar7);
}
if (*(char *)((long)param_1 + 0x84) != '\0') {
free(param_2);
}
*(int1 *)(param_1 + 0x10) = 0;
uVar3 = 0;
}
LAB_001313cd:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar3;
}
| |
33,530 | my_vfprintf | eloqsql/strings/my_vsnprintf.c | int my_vfprintf(FILE *stream, const char* format, va_list args)
{
char cvtbuf[1024];
int alloc= 0;
char *p= cvtbuf;
size_t cur_len= sizeof(cvtbuf), actual;
int ret;
/*
We do not know how much buffer we need.
So start with a reasonably-sized stack-allocated buffer, and increase
it exponentially until it is big enough.
*/
for (;;)
{
size_t new_len;
actual= my_vsnprintf(p, cur_len, format, args);
if (actual < cur_len - 1)
break;
/*
Not enough space (or just enough with nothing to spare - but we cannot
distinguish this case from the return value). Allocate a bigger buffer
and try again.
*/
if (alloc)
my_free(p);
else
alloc= 1;
new_len= cur_len*2;
if (new_len < cur_len)
return 0; /* Overflow */
cur_len= new_len;
p= my_malloc(PSI_INSTRUMENT_ME, cur_len, MYF(MY_FAE));
if (!p)
return 0;
}
ret= (int) actual;
if (fputs(p, stream) < 0)
ret= -1;
if (alloc)
my_free(p);
return ret;
} | O0 | c | my_vfprintf:
pushq %rbp
movq %rsp, %rbp
subq $0x470, %rsp # imm = 0x470
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x420(%rbp)
movq %rsi, -0x428(%rbp)
movq %rdx, -0x430(%rbp)
movl $0x0, -0x434(%rbp)
leaq -0x410(%rbp), %rax
movq %rax, -0x440(%rbp)
movq $0x400, -0x448(%rbp) # imm = 0x400
movq -0x440(%rbp), %rdi
movq -0x448(%rbp), %rsi
movq -0x428(%rbp), %rdx
movq -0x430(%rbp), %rcx
callq 0xd56f0
movq %rax, -0x450(%rbp)
movq -0x450(%rbp), %rax
movq -0x448(%rbp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0xd5874
jmp 0xd5908
cmpl $0x0, -0x434(%rbp)
je 0xd588b
movq -0x440(%rbp), %rdi
callq 0x80a40
jmp 0xd5895
movl $0x1, -0x434(%rbp)
movq -0x448(%rbp), %rax
shlq %rax
movq %rax, -0x460(%rbp)
movq -0x460(%rbp), %rax
cmpq -0x448(%rbp), %rax
jae 0xd58c5
movl $0x0, -0x414(%rbp)
jmp 0xd5958
movq -0x460(%rbp), %rax
movq %rax, -0x448(%rbp)
movq -0x448(%rbp), %rsi
xorl %edi, %edi
movl $0x8, %edx
callq 0x806c0
movq %rax, -0x440(%rbp)
cmpq $0x0, -0x440(%rbp)
jne 0xd5903
movl $0x0, -0x414(%rbp)
jmp 0xd5958
jmp 0xd5830
movq -0x450(%rbp), %rax
movl %eax, -0x454(%rbp)
movq -0x440(%rbp), %rdi
movq -0x420(%rbp), %rsi
callq 0x283a0
cmpl $0x0, %eax
jge 0xd5937
movl $0xffffffff, -0x454(%rbp) # imm = 0xFFFFFFFF
cmpl $0x0, -0x434(%rbp)
je 0xd594c
movq -0x440(%rbp), %rdi
callq 0x80a40
movl -0x454(%rbp), %eax
movl %eax, -0x414(%rbp)
movl -0x414(%rbp), %eax
movl %eax, -0x464(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xd5985
movl -0x464(%rbp), %eax
addq $0x470, %rsp # imm = 0x470
popq %rbp
retq
callq 0x28390
nopw (%rax,%rax)
| my_vfprintf:
push rbp
mov rbp, rsp
sub rsp, 470h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_420], rdi
mov [rbp+var_428], rsi
mov [rbp+var_430], rdx
mov [rbp+var_434], 0
lea rax, [rbp+var_410]
mov [rbp+var_440], rax
mov [rbp+var_448], 400h
loc_D5830:
mov rdi, [rbp+var_440]
mov rsi, [rbp+var_448]
mov rdx, [rbp+var_428]
mov rcx, [rbp+var_430]
call my_vsnprintf
mov [rbp+var_450], rax
mov rax, [rbp+var_450]
mov rcx, [rbp+var_448]
sub rcx, 1
cmp rax, rcx
jnb short loc_D5874
jmp loc_D5908
loc_D5874:
cmp [rbp+var_434], 0
jz short loc_D588B
mov rdi, [rbp+var_440]
call my_free
jmp short loc_D5895
loc_D588B:
mov [rbp+var_434], 1
loc_D5895:
mov rax, [rbp+var_448]
shl rax, 1
mov [rbp+var_460], rax
mov rax, [rbp+var_460]
cmp rax, [rbp+var_448]
jnb short loc_D58C5
mov [rbp+var_414], 0
jmp loc_D5958
loc_D58C5:
mov rax, [rbp+var_460]
mov [rbp+var_448], rax
mov rsi, [rbp+var_448]
xor edi, edi
mov edx, 8
call my_malloc
mov [rbp+var_440], rax
cmp [rbp+var_440], 0
jnz short loc_D5903
mov [rbp+var_414], 0
jmp short loc_D5958
loc_D5903:
jmp loc_D5830
loc_D5908:
mov rax, [rbp+var_450]
mov [rbp+var_454], eax
mov rdi, [rbp+var_440]
mov rsi, [rbp+var_420]
call _fputs
cmp eax, 0
jge short loc_D5937
mov [rbp+var_454], 0FFFFFFFFh
loc_D5937:
cmp [rbp+var_434], 0
jz short loc_D594C
mov rdi, [rbp+var_440]
call my_free
loc_D594C:
mov eax, [rbp+var_454]
mov [rbp+var_414], eax
loc_D5958:
mov eax, [rbp+var_414]
mov [rbp+var_464], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_D5985
mov eax, [rbp+var_464]
add rsp, 470h
pop rbp
retn
loc_D5985:
call ___stack_chk_fail
| long long my_vfprintf(long long a1, char *a2, int *a3)
{
const char *v4; // [rsp+10h] [rbp-460h]
unsigned int v5; // [rsp+1Ch] [rbp-454h]
_BYTE *v6; // [rsp+20h] [rbp-450h]
unsigned long long i; // [rsp+28h] [rbp-448h]
char *v8; // [rsp+30h] [rbp-440h]
int v9; // [rsp+3Ch] [rbp-434h]
char v12; // [rsp+60h] [rbp-410h] BYREF
unsigned long long v13; // [rsp+468h] [rbp-8h]
v13 = __readfsqword(0x28u);
v9 = 0;
v8 = &v12;
for ( i = 1024LL; ; i *= 2LL )
{
v6 = my_vsnprintf(v8, i, a2, a3);
if ( (unsigned long long)v6 < i - 1 )
break;
if ( v9 )
my_free((long long)v8);
else
v9 = 1;
v4 = (const char *)(2 * i);
if ( 2 * i < i )
return 0;
v8 = (char *)my_malloc(0, v4, 8);
if ( !v8 )
return 0;
}
v5 = (unsigned int)v6;
if ( (int)fputs(v8, a1) < 0 )
v5 = -1;
if ( v9 )
my_free((long long)v8);
return v5;
}
| my_vfprintf:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x470
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x420],RDI
MOV qword ptr [RBP + -0x428],RSI
MOV qword ptr [RBP + -0x430],RDX
MOV dword ptr [RBP + -0x434],0x0
LEA RAX,[RBP + -0x410]
MOV qword ptr [RBP + -0x440],RAX
MOV qword ptr [RBP + -0x448],0x400
LAB_001d5830:
MOV RDI,qword ptr [RBP + -0x440]
MOV RSI,qword ptr [RBP + -0x448]
MOV RDX,qword ptr [RBP + -0x428]
MOV RCX,qword ptr [RBP + -0x430]
CALL 0x001d56f0
MOV qword ptr [RBP + -0x450],RAX
MOV RAX,qword ptr [RBP + -0x450]
MOV RCX,qword ptr [RBP + -0x448]
SUB RCX,0x1
CMP RAX,RCX
JNC 0x001d5874
JMP 0x001d5908
LAB_001d5874:
CMP dword ptr [RBP + -0x434],0x0
JZ 0x001d588b
MOV RDI,qword ptr [RBP + -0x440]
CALL 0x00180a40
JMP 0x001d5895
LAB_001d588b:
MOV dword ptr [RBP + -0x434],0x1
LAB_001d5895:
MOV RAX,qword ptr [RBP + -0x448]
SHL RAX,0x1
MOV qword ptr [RBP + -0x460],RAX
MOV RAX,qword ptr [RBP + -0x460]
CMP RAX,qword ptr [RBP + -0x448]
JNC 0x001d58c5
MOV dword ptr [RBP + -0x414],0x0
JMP 0x001d5958
LAB_001d58c5:
MOV RAX,qword ptr [RBP + -0x460]
MOV qword ptr [RBP + -0x448],RAX
MOV RSI,qword ptr [RBP + -0x448]
XOR EDI,EDI
MOV EDX,0x8
CALL 0x001806c0
MOV qword ptr [RBP + -0x440],RAX
CMP qword ptr [RBP + -0x440],0x0
JNZ 0x001d5903
MOV dword ptr [RBP + -0x414],0x0
JMP 0x001d5958
LAB_001d5903:
JMP 0x001d5830
LAB_001d5908:
MOV RAX,qword ptr [RBP + -0x450]
MOV dword ptr [RBP + -0x454],EAX
MOV RDI,qword ptr [RBP + -0x440]
MOV RSI,qword ptr [RBP + -0x420]
CALL 0x001283a0
CMP EAX,0x0
JGE 0x001d5937
MOV dword ptr [RBP + -0x454],0xffffffff
LAB_001d5937:
CMP dword ptr [RBP + -0x434],0x0
JZ 0x001d594c
MOV RDI,qword ptr [RBP + -0x440]
CALL 0x00180a40
LAB_001d594c:
MOV EAX,dword ptr [RBP + -0x454]
MOV dword ptr [RBP + -0x414],EAX
LAB_001d5958:
MOV EAX,dword ptr [RBP + -0x414]
MOV dword ptr [RBP + -0x464],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001d5985
MOV EAX,dword ptr [RBP + -0x464]
ADD RSP,0x470
POP RBP
RET
LAB_001d5985:
CALL 0x00128390
|
int4 my_vfprintf(FILE *param_1,int8 param_2,int8 param_3)
{
bool bVar1;
int iVar2;
ulong uVar3;
long in_FS_OFFSET;
int4 local_45c;
ulong local_450;
char *local_448;
int4 local_41c;
char local_418 [1032];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
bVar1 = false;
local_448 = local_418;
local_450 = 0x400;
do {
uVar3 = my_vsnprintf(local_448,local_450,param_2,param_3);
if (uVar3 < local_450 - 1) {
local_45c = (int4)uVar3;
iVar2 = fputs(local_448,param_1);
if (iVar2 < 0) {
local_45c = 0xffffffff;
}
if (bVar1) {
my_free(local_448);
}
local_41c = local_45c;
goto LAB_001d5958;
}
if (bVar1) {
my_free(local_448);
}
else {
bVar1 = true;
}
uVar3 = local_450 << 1;
if (uVar3 < local_450) {
local_41c = 0;
goto LAB_001d5958;
}
local_448 = (char *)my_malloc(0,uVar3,8);
local_450 = uVar3;
} while (local_448 != (char *)0x0);
local_41c = 0;
LAB_001d5958:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_41c;
}
| |
33,531 | my_string_repertoire_8bit | eloqsql/strings/ctype.c | uint
my_string_repertoire_8bit(CHARSET_INFO *cs, const char *str, size_t length)
{
const char *strend;
if ((cs->state & MY_CS_NONASCII) && length > 0)
return MY_REPERTOIRE_UNICODE30;
for (strend= str + length; str < strend; str++)
{
if (((uchar) *str) > 0x7F)
return MY_REPERTOIRE_UNICODE30;
}
return MY_REPERTOIRE_ASCII;
} | O3 | c | my_string_repertoire_8bit:
movl $0x3, %eax
testq %rdx, %rdx
je 0x5d783
movl $0x2000, %ecx # imm = 0x2000
andl 0xc(%rdi), %ecx
je 0x5d783
retq
testq %rdx, %rdx
jle 0x5d7a3
pushq %rbp
movq %rsp, %rbp
addq %rsi, %rdx
cmpb $0x0, (%rsi)
js 0x5d7a1
incq %rsi
cmpq %rdx, %rsi
jb 0x5d78f
movl $0x1, %eax
popq %rbp
retq
movl $0x1, %eax
retq
| my_string_repertoire_8bit:
mov eax, 3
test rdx, rdx
jz short loc_5D783
mov ecx, 2000h
and ecx, [rdi+0Ch]
jz short loc_5D783
retn
loc_5D783:
test rdx, rdx
jle short loc_5D7A3
push rbp
mov rbp, rsp
add rdx, rsi
loc_5D78F:
cmp byte ptr [rsi], 0
js short loc_5D7A1
inc rsi
cmp rsi, rdx
jb short loc_5D78F
mov eax, 1
loc_5D7A1:
pop rbp
retn
loc_5D7A3:
mov eax, 1
retn
| long long my_string_repertoire_8bit(long long a1, char *a2, long long a3)
{
long long result; // rax
char *v4; // rdx
result = 3LL;
if ( !a3 || (*(_DWORD *)(a1 + 12) & 0x2000) == 0 )
{
if ( a3 <= 0 )
{
return 1LL;
}
else
{
v4 = &a2[a3];
while ( *a2 >= 0 )
{
if ( ++a2 >= v4 )
return 1LL;
}
}
}
return result;
}
| my_string_repertoire_8bit:
MOV EAX,0x3
TEST RDX,RDX
JZ 0x0015d783
MOV ECX,0x2000
AND ECX,dword ptr [RDI + 0xc]
JZ 0x0015d783
RET
LAB_0015d783:
TEST RDX,RDX
JLE 0x0015d7a3
PUSH RBP
MOV RBP,RSP
ADD RDX,RSI
LAB_0015d78f:
CMP byte ptr [RSI],0x0
JS 0x0015d7a1
INC RSI
CMP RSI,RDX
JC 0x0015d78f
MOV EAX,0x1
LAB_0015d7a1:
POP RBP
RET
LAB_0015d7a3:
MOV EAX,0x1
RET
|
int8 my_string_repertoire_8bit(long param_1,char *param_2,long param_3)
{
char *pcVar1;
if ((param_3 != 0) && ((*(uint *)(param_1 + 0xc) & 0x2000) != 0)) {
return 3;
}
if (param_3 < 1) {
return 1;
}
pcVar1 = param_2 + param_3;
do {
if (*param_2 < '\0') {
return 3;
}
param_2 = param_2 + 1;
} while (param_2 < pcVar1);
return 1;
}
| |
33,532 | ma_split_page | eloqsql/storage/maria/ma_write.c | int _ma_split_page(MARIA_HA *info, MARIA_KEY *key, MARIA_PAGE *split_page,
uint org_split_length,
uchar *inserted_key_pos, uint changed_length,
int move_length,
uchar *key_buff, my_bool insert_last_key)
{
uint keynr;
uint length,a_length,key_ref_length,t_length,nod_flag,key_length;
uint page_length, split_length, page_flag;
uchar *key_pos, *pos, *UNINIT_VAR(after_key);
MARIA_KEY_PARAM s_temp;
MARIA_PINNED_PAGE tmp_page_link, *page_link= &tmp_page_link;
MARIA_SHARE *share= info->s;
MARIA_KEYDEF *keyinfo= key->keyinfo;
MARIA_KEY tmp_key;
MARIA_PAGE new_page;
int res;
DBUG_ENTER("_ma_split_page");
DBUG_DUMP("buff", split_page->buff, split_page->size);
info->page_changed=1; /* Info->buff is used */
info->keyread_buff_used=1;
page_flag= split_page->flag;
nod_flag= split_page->node;
key_ref_length= share->keypage_header + nod_flag;
new_page.info= info;
new_page.buff= info->buff;
new_page.keyinfo= keyinfo;
tmp_key.data= key_buff;
tmp_key.keyinfo= keyinfo;
if (insert_last_key)
key_pos= _ma_find_last_pos(&tmp_key, split_page, &after_key);
else
key_pos= _ma_find_half_pos(&tmp_key, split_page, &after_key);
if (!key_pos)
DBUG_RETURN(-1);
key_length= tmp_key.data_length + tmp_key.ref_length;
split_length= (uint) (key_pos - split_page->buff);
a_length= split_page->size;
split_page->size= split_length;
page_store_size(share, split_page);
key_pos=after_key;
if (nod_flag)
{
DBUG_PRINT("test",("Splitting nod"));
pos=key_pos-nod_flag;
memcpy(new_page.buff + share->keypage_header, pos, (size_t) nod_flag);
}
/* Move middle item to key and pointer to new page */
if ((new_page.pos= _ma_new(info, PAGECACHE_PRIORITY_HIGH, &page_link)) ==
HA_OFFSET_ERROR)
DBUG_RETURN(-1);
_ma_copy_key(key, &tmp_key);
_ma_kpointer(info, key->data + key_length, new_page.pos);
/* Store new page */
if (!(*keyinfo->get_key)(&tmp_key, page_flag, nod_flag, &key_pos))
DBUG_RETURN(-1);
t_length=(*keyinfo->pack_key)(&tmp_key, nod_flag, (uchar *) 0,
(uchar*) 0, (uchar*) 0, &s_temp);
length=(uint) ((split_page->buff + a_length) - key_pos);
memcpy(new_page.buff + key_ref_length + t_length, key_pos,
(size_t) length);
(*keyinfo->store_key)(keyinfo,new_page.buff+key_ref_length,&s_temp);
page_length= length + t_length + key_ref_length;
bzero(new_page.buff, share->keypage_header);
/* Copy KEYFLAG_FLAG_ISNODE and KEYPAGE_FLAG_HAS_TRANSID from parent page */
new_page.flag= page_flag;
new_page.size= page_length;
page_store_info(share, &new_page);
/* Copy key number */
keynr= _ma_get_keynr(share, split_page->buff);
_ma_store_keynr(share, new_page.buff, keynr);
res= 2; /* Middle key up */
if (share->now_transactional && _ma_log_new(&new_page, 0))
res= -1;
/*
Clear unitialized part of page to avoid valgrind/purify warnings
and to get a clean page that is easier to compress and compare with
pages generated with redo
*/
bzero(new_page.buff + page_length, share->block_size - page_length);
if (_ma_write_keypage(&new_page, page_link->write_lock,
DFLT_INIT_HITS))
res= -1;
/* Save changes to split pages */
if (share->now_transactional &&
_ma_log_split(split_page, org_split_length, split_length,
inserted_key_pos, changed_length, move_length,
KEY_OP_NONE, (uchar*) 0, 0, 0))
res= -1;
DBUG_DUMP_KEY("middle_key", key);
DBUG_RETURN(res);
} | O3 | c | ma_split_page:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xaf8, %rsp # imm = 0xAF8
movl %r9d, -0xa50(%rbp)
movq %r8, -0xa98(%rbp)
movl %ecx, -0xa4c(%rbp)
movq %rdx, %r12
movq %rdi, %rdx
movq 0x18(%rbp), %rdi
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
leaq -0xb20(%rbp), %rax
movq %rax, -0xa80(%rbp)
movq (%rdx), %r15
movq %rsi, -0xaa0(%rbp)
movq 0x8(%rsi), %r14
movw $0x101, 0x684(%rdx) # imm = 0x101
movl 0x28(%r12), %ecx
movl 0x2c(%r12), %r8d
movl 0x744(%r15), %eax
movq %rcx, -0xab0(%rbp)
addl %ecx, %eax
movl %eax, -0xa2c(%rbp)
movq %rdx, -0xb08(%rbp)
movq %rdx, -0xaa8(%rbp)
movq 0x378(%rdx), %rax
movq %rax, -0xa78(%rbp)
movq %rax, -0xaf8(%rbp)
movq %r14, -0xb00(%rbp)
movq %rdi, -0xa70(%rbp)
movq %r14, -0xa68(%rbp)
cmpb $0x0, 0x20(%rbp)
movq %r15, -0xa28(%rbp)
movq %r12, -0xa18(%rbp)
movl %r8d, -0xa1c(%rbp)
je 0x531fc
movq (%r12), %r13
movq (%r13), %rsi
movl 0x744(%rsi), %edx
movl 0x20(%r12), %eax
subl %edx, %eax
movq 0x10(%r12), %r15
addq %rdx, %r15
movq %r15, -0xa38(%rbp)
testb $0x2e, 0xa2(%r14)
sete %r9b
testb $0x2, %r8b
sete %cl
andb %r9b, %cl
cmpb $0x1, %cl
jne 0x5321a
movzwl 0xaa(%r14), %ecx
xorl %edx, %edx
divl %ecx
addl $-0x2, %eax
imull %ecx, %eax
movl 0x740(%rsi), %edx
movl %ecx, %esi
subl %edx, %esi
movl %esi, -0xa60(%rbp)
movq (%r13), %rdx
movl 0x740(%rdx), %edx
movl %edx, -0xa5c(%rbp)
movl $0x0, -0xa58(%rbp)
addq %rax, %r15
leaq (%r15,%rcx), %rax
movq %rax, -0xa48(%rbp)
movq %r15, %rsi
movq %rcx, %rdx
callq 0x29080
movq %r15, %rbx
jmp 0x532ee
leaq -0xa70(%rbp), %rdi
leaq -0xa48(%rbp), %rdx
movq %r12, %rsi
callq 0x5361f
movq %rax, %rbx
jmp 0x53322
movl %eax, %r12d
movq %rdx, %rbx
leaq -0xa10(%rbp), %rax
leaq -0xad0(%rbp), %rdi
movq %rax, (%rdi)
movq %r14, 0x8(%rdi)
movb $0x0, (%rax)
leaq -0xa38(%rbp), %rcx
movl %r8d, %esi
xorl %edx, %edx
callq *0xe0(%r14)
testl %eax, %eax
je 0x532df
movq %r13, -0xa40(%rbp)
movq %r14, %r13
movl -0xa1c(%rbp), %r14d
movl %r12d, %r12d
addq %r15, %r12
subq %rbx, %r12
leaq -0xa38(%rbp), %rcx
movq (%rcx), %rcx
movq %r15, %rbx
movq %rcx, %r15
movq -0xac0(%rbp), %rcx
movq %rcx, -0xa60(%rbp)
movl -0xab8(%rbp), %ecx
movl %ecx, -0xa58(%rbp)
movq -0xa70(%rbp), %rdi
movl %eax, %edx
leaq -0xa10(%rbp), %rsi
callq 0x29080
leaq -0xad0(%rbp), %rdi
movl %r14d, %esi
xorl %edx, %edx
leaq -0xa38(%rbp), %rcx
callq *0xe0(%r13)
testl %eax, %eax
je 0x532fe
movq -0xa38(%rbp), %rcx
cmpq %r12, %rcx
jb 0x53277
movq %r15, -0xa48(%rbp)
jmp 0x53311
movq %r13, %rdi
movl $0x7e, %esi
callq 0x37328
xorl %ebx, %ebx
movq -0xa18(%rbp), %r12
movq -0xa28(%rbp), %r15
jmp 0x53322
movq -0xa40(%rbp), %rdi
movl $0x7e, %esi
callq 0x37328
xorl %ebx, %ebx
movq -0xa18(%rbp), %r12
movq -0xa28(%rbp), %r15
movq %r13, %r14
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testq %rbx, %rbx
je 0x535f9
movq %r14, -0xa40(%rbp)
movl -0xa5c(%rbp), %r14d
addl -0xa60(%rbp), %r14d
movq 0x10(%r12), %rax
subq %rax, %rbx
movl 0x20(%r12), %r13d
movl %ebx, 0x20(%r12)
movl 0x744(%r15), %ecx
movb %bl, -0x1(%rax,%rcx)
movq 0x10(%r12), %rax
movl 0x744(%r15), %ecx
movq %rbx, -0xa90(%rbp)
movb %bh, -0x2(%rax,%rcx)
movq -0xa48(%rbp), %rsi
movq %rsi, -0xad0(%rbp)
movq -0xab0(%rbp), %r12
testq %r12, %r12
je 0x533ac
subq %r12, %rsi
movl 0x744(%r15), %edi
addq -0xa78(%rbp), %rdi
movq %r12, %rdx
callq 0x29080
leaq -0xa80(%rbp), %rdx
movq -0xaa8(%rbp), %r15
movq %r15, %rdi
movl $0x6, %esi
callq 0x3a89f
movq %rax, -0xaf0(%rbp)
cmpq $-0x1, %rax
je 0x53555
movq %rax, %rbx
movq %r13, -0xa88(%rbp)
leaq -0xa70(%rbp), %rsi
movq -0xaa0(%rbp), %r13
movq %r13, %rdi
callq 0x3cda4
movl %r14d, %esi
addq (%r13), %rsi
movq %r15, %rdi
movq %rbx, %rdx
callq 0x38535
leaq -0xad0(%rbp), %rcx
leaq -0xa70(%rbp), %rdi
movl -0xa1c(%rbp), %esi
movl %r12d, %edx
movq -0xa40(%rbp), %r14
callq *0xe0(%r14)
testl %eax, %eax
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
je 0x535f9
leaq -0xa70(%rbp), %rdi
leaq -0xa10(%rbp), %r9
movl %r12d, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq *0xf0(%r14)
movq -0xa88(%rbp), %r13
movq -0xa18(%rbp), %rcx
addq 0x10(%rcx), %r13
movl %eax, %ebx
movq -0xad0(%rbp), %rsi
subq %rsi, %r13
movl -0xa2c(%rbp), %r12d
movq -0xa78(%rbp), %r15
addq %r15, %r12
movl %eax, %edi
addq %r12, %rdi
movl %r13d, %edx
callq 0x29080
movq %r14, %rdi
movq %r12, %rsi
leaq -0xa10(%rbp), %rdx
callq *0xf8(%r14)
addl -0xa2c(%rbp), %ebx
addl %r13d, %ebx
movq -0xa28(%rbp), %r14
movl 0x744(%r14), %edx
movq %r15, %rdi
xorl %esi, %esi
callq 0x29270
movl -0xa1c(%rbp), %ecx
movl %ecx, -0xadc(%rbp)
movl %ebx, -0xae8(%rbp)
movl 0x744(%r14), %eax
addl $-0x3, %eax
movq %r15, %rdx
movb %cl, (%r15,%rax)
movl 0x744(%r14), %eax
movb %bl, -0x1(%r15,%rax)
movl 0x744(%r14), %eax
movl %ebx, %r12d
movb %bh, -0x2(%rdx,%rax)
movq -0xa18(%rbp), %rax
movq 0x10(%rax), %rax
movl 0x744(%r14), %ecx
addl $-0x4, %ecx
movb (%rax,%rcx), %al
movb %al, (%r15,%rcx)
cmpb $0x0, 0x7e7(%r14)
je 0x5355f
leaq -0xb08(%rbp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x51ec8
negb %al
movl $0x0, %r15d
sbbl %r15d, %r15d
orl $0x2, %r15d
movq 0x10(%r14), %rbx
jmp 0x53568
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x535f9
movq %r15, %rbx
movl $0x2, %r15d
movl %r12d, %edi
addq %rbx, %rdi
movq -0xa28(%rbp), %r14
movl 0x7bc(%r14), %edx
subl %r12d, %edx
xorl %esi, %esi
callq 0x29270
movq -0xa80(%rbp), %rax
movl 0xc(%rax), %esi
leaq -0xb08(%rbp), %rdi
movl $0x3, %edx
callq 0x3a5b5
negb %al
movl $0x0, %eax
sbbl %eax, %eax
orl %r15d, %eax
cmpb $0x0, 0x7e7(%r14)
je 0x535f9
movl 0x10(%rbp), %r9d
xorl %ebx, %ebx
movq -0xa18(%rbp), %rdi
movl -0xa4c(%rbp), %esi
movq -0xa90(%rbp), %rdx
movq %rax, %r14
movq -0xa98(%rbp), %rcx
movl -0xa50(%rbp), %r8d
pushq %rbx
pushq %rbx
pushq $0x0
pushq %rbx
callq 0x53737
addq $0x20, %rsp
negb %al
sbbl %ebx, %ebx
orl %r14d, %ebx
movl %ebx, %eax
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x5361a
addq $0xaf8, %rsp # imm = 0xAF8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29220
| _ma_split_page:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0AF8h
mov [rbp+var_A50], r9d
mov [rbp+var_A98], r8
mov [rbp+var_A4C], ecx
mov r12, rdx
mov rdx, rdi
mov rdi, [rbp+arg_8]
mov rax, fs:28h
mov [rbp+var_30], rax
lea rax, [rbp+var_B20]
mov [rbp+var_A80], rax
mov r15, [rdx]
mov [rbp+var_AA0], rsi
mov r14, [rsi+8]
mov word ptr [rdx+684h], 101h
mov ecx, [r12+28h]
mov r8d, [r12+2Ch]
mov eax, [r15+744h]
mov [rbp+var_AB0], rcx
add eax, ecx
mov [rbp+var_A2C], eax
mov [rbp+var_B08], rdx
mov [rbp+var_AA8], rdx
mov rax, [rdx+378h]
mov [rbp+var_A78], rax
mov [rbp+var_AF8], rax
mov [rbp+var_B00], r14
mov [rbp+var_A70], rdi
mov [rbp+var_A68], r14
cmp [rbp+arg_10], 0
mov [rbp+var_A28], r15
mov [rbp+var_A18], r12
mov [rbp+var_A1C], r8d
jz loc_531FC
mov r13, [r12]
mov rsi, [r13+0]
mov edx, [rsi+744h]
mov eax, [r12+20h]
sub eax, edx
mov r15, [r12+10h]
add r15, rdx
mov [rbp+var_A38], r15
test byte ptr [r14+0A2h], 2Eh
setz r9b
test r8b, 2
setz cl
and cl, r9b
cmp cl, 1
jnz short loc_5321A
movzx ecx, word ptr [r14+0AAh]
xor edx, edx
div ecx
add eax, 0FFFFFFFEh
imul eax, ecx
mov edx, [rsi+740h]
mov esi, ecx
sub esi, edx
mov dword ptr [rbp+var_A60], esi
mov rdx, [r13+0]
mov edx, [rdx+740h]
mov dword ptr [rbp+var_A60+4], edx
mov [rbp+var_A58], 0
add r15, rax
lea rax, [r15+rcx]
mov [rbp+var_A48], rax
mov rsi, r15
mov rdx, rcx
call _memcpy
mov rbx, r15
jmp loc_532EE
loc_531FC:
lea rdi, [rbp+var_A70]
lea rdx, [rbp+var_A48]
mov rsi, r12
call _ma_find_half_pos
mov rbx, rax
jmp loc_53322
loc_5321A:
mov r12d, eax
mov rbx, rdx
lea rax, [rbp+var_A10]
lea rdi, [rbp+var_AD0]
mov [rdi], rax
mov [rdi+8], r14
mov byte ptr [rax], 0
lea rcx, [rbp+var_A38]
mov esi, r8d
xor edx, edx
call qword ptr [r14+0E0h]
test eax, eax
jz loc_532DF
mov [rbp+var_A40], r13
mov r13, r14
mov r14d, [rbp+var_A1C]
mov r12d, r12d
add r12, r15
sub r12, rbx
lea rcx, [rbp+var_A38]
mov rcx, [rcx]
loc_53277:
mov rbx, r15
mov r15, rcx
mov rcx, [rbp+var_AC0]
mov [rbp+var_A60], rcx
mov ecx, [rbp+var_AB8]
mov [rbp+var_A58], ecx
mov rdi, [rbp+var_A70]
mov edx, eax
lea rsi, [rbp+var_A10]
call _memcpy
lea rdi, [rbp+var_AD0]
mov esi, r14d
xor edx, edx
lea rcx, [rbp+var_A38]
call qword ptr [r13+0E0h]
test eax, eax
jz short loc_532FE
mov rcx, [rbp+var_A38]
cmp rcx, r12
jb short loc_53277
mov [rbp+var_A48], r15
jmp short loc_53311
loc_532DF:
mov rdi, r13
mov esi, 7Eh ; '~'
call _ma_set_fatal_error
xor ebx, ebx
loc_532EE:
mov r12, [rbp+var_A18]
mov r15, [rbp+var_A28]
jmp short loc_53322
loc_532FE:
mov rdi, [rbp+var_A40]
mov esi, 7Eh ; '~'
call _ma_set_fatal_error
xor ebx, ebx
loc_53311:
mov r12, [rbp+var_A18]
mov r15, [rbp+var_A28]
mov r14, r13
loc_53322:
mov eax, 0FFFFFFFFh
test rbx, rbx
jz loc_535F9
mov [rbp+var_A40], r14
mov r14d, dword ptr [rbp+var_A60+4]
add r14d, dword ptr [rbp+var_A60]
mov rax, [r12+10h]
sub rbx, rax
mov r13d, [r12+20h]
mov [r12+20h], ebx
mov ecx, [r15+744h]
mov [rax+rcx-1], bl
mov rax, [r12+10h]
mov ecx, [r15+744h]
mov [rbp+var_A90], rbx
mov [rax+rcx-2], bh
mov rsi, [rbp+var_A48]
mov [rbp+var_AD0], rsi
mov r12, [rbp+var_AB0]
test r12, r12
jz short loc_533AC
sub rsi, r12
mov edi, [r15+744h]
add rdi, [rbp+var_A78]
mov rdx, r12
call _memcpy
loc_533AC:
lea rdx, [rbp+var_A80]
mov r15, [rbp+var_AA8]
mov rdi, r15
mov esi, 6
call _ma_new
mov [rbp+var_AF0], rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jz loc_53555
mov rbx, rax
mov [rbp+var_A88], r13
lea rsi, [rbp+var_A70]
mov r13, [rbp+var_AA0]
mov rdi, r13
call _ma_copy_key
mov esi, r14d
add rsi, [r13+0]
mov rdi, r15
mov rdx, rbx
call _ma_kpointer
lea rcx, [rbp+var_AD0]
lea rdi, [rbp+var_A70]
mov esi, [rbp+var_A1C]
mov edx, r12d
mov r14, [rbp+var_A40]
call qword ptr [r14+0E0h]
test eax, eax
mov eax, 0FFFFFFFFh
jz loc_535F9
lea rdi, [rbp+var_A70]
lea r9, [rbp+var_A10]
mov esi, r12d
xor edx, edx
xor ecx, ecx
xor r8d, r8d
call qword ptr [r14+0F0h]
mov r13, [rbp+var_A88]
mov rcx, [rbp+var_A18]
add r13, [rcx+10h]
mov ebx, eax
mov rsi, [rbp+var_AD0]
sub r13, rsi
mov r12d, [rbp+var_A2C]
mov r15, [rbp+var_A78]
add r12, r15
mov edi, eax
add rdi, r12
mov edx, r13d
call _memcpy
mov rdi, r14
mov rsi, r12
lea rdx, [rbp+var_A10]
call qword ptr [r14+0F8h]
add ebx, [rbp+var_A2C]
add ebx, r13d
mov r14, [rbp+var_A28]
mov edx, [r14+744h]
mov rdi, r15
xor esi, esi
call _memset
mov ecx, [rbp+var_A1C]
mov [rbp+var_ADC], ecx
mov [rbp+var_AE8], ebx
mov eax, [r14+744h]
add eax, 0FFFFFFFDh
mov rdx, r15
mov [r15+rax], cl
mov eax, [r14+744h]
mov [r15+rax-1], bl
mov eax, [r14+744h]
mov r12d, ebx
mov [rdx+rax-2], bh
mov rax, [rbp+var_A18]
mov rax, [rax+10h]
mov ecx, [r14+744h]
add ecx, 0FFFFFFFCh
mov al, [rax+rcx]
mov [r15+rcx], al
cmp byte ptr [r14+7E7h], 0
jz short loc_5355F
lea r14, [rbp+var_B08]
mov rdi, r14
xor esi, esi
call _ma_log_new
neg al
mov r15d, 0
sbb r15d, r15d
or r15d, 2
mov rbx, [r14+10h]
jmp short loc_53568
loc_53555:
mov eax, 0FFFFFFFFh
jmp loc_535F9
loc_5355F:
mov rbx, r15
mov r15d, 2
loc_53568:
mov edi, r12d
add rdi, rbx
mov r14, [rbp+var_A28]
mov edx, [r14+7BCh]
sub edx, r12d
xor esi, esi
call _memset
mov rax, [rbp+var_A80]
mov esi, [rax+0Ch]
lea rdi, [rbp+var_B08]
mov edx, 3
call _ma_write_keypage
neg al
mov eax, 0
sbb eax, eax
or eax, r15d
cmp byte ptr [r14+7E7h], 0
jz short loc_535F9
mov r9d, [rbp+arg_0]
xor ebx, ebx
mov rdi, [rbp+var_A18]
mov esi, [rbp+var_A4C]
mov rdx, [rbp+var_A90]
mov r14, rax
mov rcx, [rbp+var_A98]
mov r8d, [rbp+var_A50]
push rbx
push rbx
push 0
push rbx
call _ma_log_split
add rsp, 20h
neg al
sbb ebx, ebx
or ebx, r14d
mov eax, ebx
loc_535F9:
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz short loc_5361A
add rsp, 0AF8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5361A:
call ___stack_chk_fail
| long long ma_split_page(
long long a1,
long long a2,
long long **a3,
int a4,
long long a5,
int a6,
int a7,
long long a8,
char a9)
{
long long **v9; // r12
long long v10; // r15
long long v11; // r14
unsigned int v12; // r8d
int v13; // eax
long long *v14; // r13
long long v15; // rsi
long long v16; // rdx
unsigned int v17; // eax
long long v18; // r15
long long v19; // rcx
long long v20; // rax
long long v21; // r15
long long half_pos; // rbx
unsigned int v23; // r12d
long long v24; // rbx
unsigned int v25; // eax
long long v26; // rdx
long long v27; // rcx
long long v28; // r8
int v29; // r9d
long long v30; // r13
unsigned int v31; // r14d
unsigned long long v32; // r12
long long v33; // rcx
long long v34; // rdx
long long v35; // rcx
long long v36; // r8
int v37; // r9d
long long result; // rax
unsigned int v39; // r14d
long long *v40; // rax
long long v41; // rbx
long long v42; // r13
long long *v43; // rax
long long v44; // rcx
unsigned int v45; // r12d
long long *v46; // r15
long long v47; // rax
unsigned long long v48; // rbx
_QWORD *v49; // r13
long long *v50; // r14
bool v51; // zf
long long v52; // rbx
long long v53; // r13
long long v54; // r15
long long v55; // r12
long long v56; // r14
unsigned int v57; // r12d
int v58; // r15d
long long v59; // rbx
long long v60; // r14
char v61; // [rsp+0h] [rbp-B20h] BYREF
long long *v62[2]; // [rsp+18h] [rbp-B08h] BYREF
long long v63; // [rsp+28h] [rbp-AF8h]
long long v64; // [rsp+30h] [rbp-AF0h]
int v65; // [rsp+38h] [rbp-AE8h]
unsigned int v66; // [rsp+44h] [rbp-ADCh]
_QWORD v67[3]; // [rsp+50h] [rbp-AD0h] BYREF
int v68; // [rsp+68h] [rbp-AB8h]
long long v69; // [rsp+70h] [rbp-AB0h]
long long *v70; // [rsp+78h] [rbp-AA8h]
_QWORD *v71; // [rsp+80h] [rbp-AA0h]
long long v72; // [rsp+88h] [rbp-A98h]
long long v73; // [rsp+90h] [rbp-A90h]
long long v74; // [rsp+98h] [rbp-A88h]
char *v75; // [rsp+A0h] [rbp-A80h] BYREF
long long v76; // [rsp+A8h] [rbp-A78h]
_QWORD v77[2]; // [rsp+B0h] [rbp-A70h] BYREF
long long v78; // [rsp+C0h] [rbp-A60h]
int v79; // [rsp+C8h] [rbp-A58h]
int v80; // [rsp+D0h] [rbp-A50h]
int v81; // [rsp+D4h] [rbp-A4Ch]
long long v82; // [rsp+D8h] [rbp-A48h] BYREF
long long *v83; // [rsp+E0h] [rbp-A40h]
unsigned long long v84; // [rsp+E8h] [rbp-A38h] BYREF
unsigned int v85; // [rsp+F4h] [rbp-A2Ch]
long long v86; // [rsp+F8h] [rbp-A28h]
unsigned int v87; // [rsp+104h] [rbp-A1Ch]
long long **v88; // [rsp+108h] [rbp-A18h]
_BYTE v89[2528]; // [rsp+110h] [rbp-A10h] BYREF
unsigned long long v90; // [rsp+AF0h] [rbp-30h]
v80 = a6;
v72 = a5;
v81 = a4;
v9 = a3;
v90 = __readfsqword(0x28u);
v75 = &v61;
v10 = *(_QWORD *)a1;
v71 = (_QWORD *)a2;
v11 = *(_QWORD *)(a2 + 8);
*(_WORD *)(a1 + 1668) = 257;
v12 = *((_DWORD *)a3 + 11);
v13 = *(_DWORD *)(v10 + 1860);
v69 = *((unsigned int *)a3 + 10);
v85 = v69 + v13;
v62[0] = (long long *)a1;
v70 = (long long *)a1;
v76 = *(_QWORD *)(a1 + 888);
v63 = v76;
v62[1] = (long long *)v11;
v77[0] = a8;
v77[1] = v11;
v86 = v10;
v88 = a3;
v87 = v12;
if ( !a9 )
{
half_pos = ma_find_half_pos(v77, a3, &v82);
goto LABEL_14;
}
v14 = *a3;
v15 = **a3;
v16 = *(unsigned int *)(v15 + 1860);
v17 = *((_DWORD *)v9 + 8) - v16;
v18 = (long long)v9[2] + v16;
v84 = v18;
if ( (*(_BYTE *)(v11 + 162) & 0x2E) == 0 && (v12 & 2) == 0 )
{
v19 = *(unsigned __int16 *)(v11 + 170);
v20 = (unsigned int)v19 * (v17 / *(unsigned __int16 *)(v11 + 170) - 2);
LODWORD(v78) = *(unsigned __int16 *)(v11 + 170) - *(_DWORD *)(v15 + 1856);
HIDWORD(v78) = *(_DWORD *)(*v14 + 1856);
v79 = 0;
v21 = v20 + v18;
v82 = v21 + v19;
memcpy(a8, v21, v19);
half_pos = v21;
LABEL_11:
v9 = v88;
v10 = v86;
goto LABEL_14;
}
v23 = v17;
v24 = v16;
v67[0] = v89;
v67[1] = v11;
v89[0] = 0;
v25 = (*(long long ( **)(_QWORD *, _QWORD, _QWORD, unsigned long long *))(v11 + 224))(v67, v12, 0LL, &v84);
if ( !v25 )
{
ma_set_fatal_error(v14, 126, v26, v27, v28, v29);
half_pos = 0LL;
goto LABEL_11;
}
v83 = v14;
v30 = v11;
v31 = v87;
v32 = v18 + v23 - v24;
v33 = v84;
while ( 1 )
{
half_pos = v18;
v18 = v33;
v78 = v67[2];
v79 = v68;
memcpy(v77[0], v89, v25);
v25 = (*(long long ( **)(_QWORD *, _QWORD, _QWORD, unsigned long long *))(v30 + 224))(v67, v31, 0LL, &v84);
if ( !v25 )
break;
v33 = v84;
if ( v84 >= v32 )
{
v82 = v18;
goto LABEL_13;
}
}
ma_set_fatal_error(v83, 126, v34, v35, v36, v37);
half_pos = 0LL;
LABEL_13:
v9 = v88;
v10 = v86;
v11 = v30;
LABEL_14:
result = 0xFFFFFFFFLL;
if ( half_pos )
{
v83 = (long long *)v11;
v39 = v78 + HIDWORD(v78);
v40 = v9[2];
v41 = half_pos - (_QWORD)v40;
v42 = *((unsigned int *)v9 + 8);
*((_DWORD *)v9 + 8) = v41;
*((_BYTE *)v40 + *(unsigned int *)(v10 + 1860) - 1) = v41;
v43 = v9[2];
v44 = *(unsigned int *)(v10 + 1860);
v73 = v41;
*((_BYTE *)v43 + v44 - 2) = BYTE1(v41);
v67[0] = v82;
v45 = v69;
if ( v69 )
memcpy(v76 + *(unsigned int *)(v10 + 1860), v82 - v69, v69);
v46 = v70;
v47 = ma_new(v70, 6, (long long *)&v75);
v64 = v47;
if ( v47 == -1 )
{
return 0xFFFFFFFFLL;
}
else
{
v48 = v47;
v74 = v42;
v49 = v71;
ma_copy_key((long long)v71, (long long)v77);
ma_kpointer((long long)v46, *v49 + v39, v48);
v50 = v83;
v51 = ((unsigned int ( *)(_QWORD *, _QWORD, _QWORD, _QWORD *))v83[28])(v77, v87, v45, v67) == 0;
result = 0xFFFFFFFFLL;
if ( !v51 )
{
v52 = ((unsigned int ( *)(_QWORD *, _QWORD, _QWORD, _QWORD, _QWORD, _BYTE *))v50[30])(
v77,
v45,
0LL,
0LL,
0LL,
v89);
v53 = (long long)v88[2] + v74 - v67[0];
v54 = v76;
v55 = v76 + v85;
memcpy(v55 + v52, v67[0], (unsigned int)(*((_DWORD *)v88 + 4) + v74 - LODWORD(v67[0])));
((void ( *)(long long *, long long, _BYTE *))v50[31])(v50, v55, v89);
LODWORD(v52) = v53 + v85 + v52;
v56 = v86;
memset(v54, 0LL, *(unsigned int *)(v86 + 1860));
v66 = v87;
v65 = v52;
*(_BYTE *)(v54 + (unsigned int)(*(_DWORD *)(v56 + 1860) - 3)) = v87;
*(_BYTE *)(v54 + *(unsigned int *)(v56 + 1860) - 1) = v52;
v57 = v52;
*(_BYTE *)(v54 + *(unsigned int *)(v56 + 1860) - 2) = BYTE1(v52);
*(_BYTE *)(v54 + (unsigned int)(*(_DWORD *)(v56 + 1860) - 4)) = *((_BYTE *)v88[2]
+ (unsigned int)(*(_DWORD *)(v56 + 1860) - 4));
if ( *(_BYTE *)(v56 + 2023) )
{
v58 = ma_log_new(v62, 0) ? -1 : 2;
v59 = v63;
}
else
{
v59 = v54;
v58 = 2;
}
v60 = v86;
memset(v59 + v57, 0LL, *(_DWORD *)(v86 + 1980) - v57);
result = v58 | (unsigned int)-((unsigned __int8)ma_write_keypage(v62, *((_DWORD *)v75 + 3), 3) != 0);
if ( *(_BYTE *)(v60 + 2023) )
return (unsigned __int8)ma_log_split((_DWORD)v88, v81, v73, v72, v80, a7, 0, 0LL, 0, 0) != 0
? -1
: (unsigned int)result;
}
}
}
return result;
}
| _ma_split_page:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xaf8
MOV dword ptr [RBP + -0xa50],R9D
MOV qword ptr [RBP + -0xa98],R8
MOV dword ptr [RBP + -0xa4c],ECX
MOV R12,RDX
MOV RDX,RDI
MOV RDI,qword ptr [RBP + 0x18]
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
LEA RAX,[RBP + -0xb20]
MOV qword ptr [RBP + -0xa80],RAX
MOV R15,qword ptr [RDX]
MOV qword ptr [RBP + -0xaa0],RSI
MOV R14,qword ptr [RSI + 0x8]
MOV word ptr [RDX + 0x684],0x101
MOV ECX,dword ptr [R12 + 0x28]
MOV R8D,dword ptr [R12 + 0x2c]
MOV EAX,dword ptr [R15 + 0x744]
MOV qword ptr [RBP + -0xab0],RCX
ADD EAX,ECX
MOV dword ptr [RBP + -0xa2c],EAX
MOV qword ptr [RBP + -0xb08],RDX
MOV qword ptr [RBP + -0xaa8],RDX
MOV RAX,qword ptr [RDX + 0x378]
MOV qword ptr [RBP + -0xa78],RAX
MOV qword ptr [RBP + -0xaf8],RAX
MOV qword ptr [RBP + -0xb00],R14
MOV qword ptr [RBP + -0xa70],RDI
MOV qword ptr [RBP + -0xa68],R14
CMP byte ptr [RBP + 0x20],0x0
MOV qword ptr [RBP + -0xa28],R15
MOV qword ptr [RBP + -0xa18],R12
MOV dword ptr [RBP + -0xa1c],R8D
JZ 0x001531fc
MOV R13,qword ptr [R12]
MOV RSI,qword ptr [R13]
MOV EDX,dword ptr [RSI + 0x744]
MOV EAX,dword ptr [R12 + 0x20]
SUB EAX,EDX
MOV R15,qword ptr [R12 + 0x10]
ADD R15,RDX
MOV qword ptr [RBP + -0xa38],R15
TEST byte ptr [R14 + 0xa2],0x2e
SETZ R9B
TEST R8B,0x2
SETZ CL
AND CL,R9B
CMP CL,0x1
JNZ 0x0015321a
MOVZX ECX,word ptr [R14 + 0xaa]
XOR EDX,EDX
DIV ECX
ADD EAX,-0x2
IMUL EAX,ECX
MOV EDX,dword ptr [RSI + 0x740]
MOV ESI,ECX
SUB ESI,EDX
MOV dword ptr [RBP + -0xa60],ESI
MOV RDX,qword ptr [R13]
MOV EDX,dword ptr [RDX + 0x740]
MOV dword ptr [RBP + -0xa5c],EDX
MOV dword ptr [RBP + -0xa58],0x0
ADD R15,RAX
LEA RAX,[R15 + RCX*0x1]
MOV qword ptr [RBP + -0xa48],RAX
MOV RSI,R15
MOV RDX,RCX
CALL 0x00129080
MOV RBX,R15
JMP 0x001532ee
LAB_001531fc:
LEA RDI,[RBP + -0xa70]
LEA RDX,[RBP + -0xa48]
MOV RSI,R12
CALL 0x0015361f
MOV RBX,RAX
JMP 0x00153322
LAB_0015321a:
MOV R12D,EAX
MOV RBX,RDX
LEA RAX,[RBP + -0xa10]
LEA RDI,[RBP + -0xad0]
MOV qword ptr [RDI],RAX
MOV qword ptr [RDI + 0x8],R14
MOV byte ptr [RAX],0x0
LEA RCX,[RBP + -0xa38]
MOV ESI,R8D
XOR EDX,EDX
CALL qword ptr [R14 + 0xe0]
TEST EAX,EAX
JZ 0x001532df
MOV qword ptr [RBP + -0xa40],R13
MOV R13,R14
MOV R14D,dword ptr [RBP + -0xa1c]
MOV R12D,R12D
ADD R12,R15
SUB R12,RBX
LEA RCX,[RBP + -0xa38]
MOV RCX,qword ptr [RCX]
LAB_00153277:
MOV RBX,R15
MOV R15,RCX
MOV RCX,qword ptr [RBP + -0xac0]
MOV qword ptr [RBP + -0xa60],RCX
MOV ECX,dword ptr [RBP + -0xab8]
MOV dword ptr [RBP + -0xa58],ECX
MOV RDI,qword ptr [RBP + -0xa70]
MOV EDX,EAX
LEA RSI,[RBP + -0xa10]
CALL 0x00129080
LEA RDI,[RBP + -0xad0]
MOV ESI,R14D
XOR EDX,EDX
LEA RCX,[RBP + -0xa38]
CALL qword ptr [R13 + 0xe0]
TEST EAX,EAX
JZ 0x001532fe
MOV RCX,qword ptr [RBP + -0xa38]
CMP RCX,R12
JC 0x00153277
MOV qword ptr [RBP + -0xa48],R15
JMP 0x00153311
LAB_001532df:
MOV RDI,R13
MOV ESI,0x7e
CALL 0x00137328
XOR EBX,EBX
LAB_001532ee:
MOV R12,qword ptr [RBP + -0xa18]
MOV R15,qword ptr [RBP + -0xa28]
JMP 0x00153322
LAB_001532fe:
MOV RDI,qword ptr [RBP + -0xa40]
MOV ESI,0x7e
CALL 0x00137328
XOR EBX,EBX
LAB_00153311:
MOV R12,qword ptr [RBP + -0xa18]
MOV R15,qword ptr [RBP + -0xa28]
MOV R14,R13
LAB_00153322:
MOV EAX,0xffffffff
TEST RBX,RBX
JZ 0x001535f9
MOV qword ptr [RBP + -0xa40],R14
MOV R14D,dword ptr [RBP + -0xa5c]
ADD R14D,dword ptr [RBP + -0xa60]
MOV RAX,qword ptr [R12 + 0x10]
SUB RBX,RAX
MOV R13D,dword ptr [R12 + 0x20]
MOV dword ptr [R12 + 0x20],EBX
MOV ECX,dword ptr [R15 + 0x744]
MOV byte ptr [RAX + RCX*0x1 + -0x1],BL
MOV RAX,qword ptr [R12 + 0x10]
MOV ECX,dword ptr [R15 + 0x744]
MOV qword ptr [RBP + -0xa90],RBX
MOV byte ptr [RAX + RCX*0x1 + -0x2],BH
MOV RSI,qword ptr [RBP + -0xa48]
MOV qword ptr [RBP + -0xad0],RSI
MOV R12,qword ptr [RBP + -0xab0]
TEST R12,R12
JZ 0x001533ac
SUB RSI,R12
MOV EDI,dword ptr [R15 + 0x744]
ADD RDI,qword ptr [RBP + -0xa78]
MOV RDX,R12
CALL 0x00129080
LAB_001533ac:
LEA RDX,[RBP + -0xa80]
MOV R15,qword ptr [RBP + -0xaa8]
MOV RDI,R15
MOV ESI,0x6
CALL 0x0013a89f
MOV qword ptr [RBP + -0xaf0],RAX
CMP RAX,-0x1
JZ 0x00153555
MOV RBX,RAX
MOV qword ptr [RBP + -0xa88],R13
LEA RSI,[RBP + -0xa70]
MOV R13,qword ptr [RBP + -0xaa0]
MOV RDI,R13
CALL 0x0013cda4
MOV ESI,R14D
ADD RSI,qword ptr [R13]
MOV RDI,R15
MOV RDX,RBX
CALL 0x00138535
LEA RCX,[RBP + -0xad0]
LEA RDI,[RBP + -0xa70]
MOV ESI,dword ptr [RBP + -0xa1c]
MOV EDX,R12D
MOV R14,qword ptr [RBP + -0xa40]
CALL qword ptr [R14 + 0xe0]
TEST EAX,EAX
MOV EAX,0xffffffff
JZ 0x001535f9
LEA RDI,[RBP + -0xa70]
LEA R9,[RBP + -0xa10]
MOV ESI,R12D
XOR EDX,EDX
XOR ECX,ECX
XOR R8D,R8D
CALL qword ptr [R14 + 0xf0]
MOV R13,qword ptr [RBP + -0xa88]
MOV RCX,qword ptr [RBP + -0xa18]
ADD R13,qword ptr [RCX + 0x10]
MOV EBX,EAX
MOV RSI,qword ptr [RBP + -0xad0]
SUB R13,RSI
MOV R12D,dword ptr [RBP + -0xa2c]
MOV R15,qword ptr [RBP + -0xa78]
ADD R12,R15
MOV EDI,EAX
ADD RDI,R12
MOV EDX,R13D
CALL 0x00129080
MOV RDI,R14
MOV RSI,R12
LEA RDX,[RBP + -0xa10]
CALL qword ptr [R14 + 0xf8]
ADD EBX,dword ptr [RBP + -0xa2c]
ADD EBX,R13D
MOV R14,qword ptr [RBP + -0xa28]
MOV EDX,dword ptr [R14 + 0x744]
MOV RDI,R15
XOR ESI,ESI
CALL 0x00129270
MOV ECX,dword ptr [RBP + -0xa1c]
MOV dword ptr [RBP + -0xadc],ECX
MOV dword ptr [RBP + -0xae8],EBX
MOV EAX,dword ptr [R14 + 0x744]
ADD EAX,-0x3
MOV RDX,R15
MOV byte ptr [R15 + RAX*0x1],CL
MOV EAX,dword ptr [R14 + 0x744]
MOV byte ptr [R15 + RAX*0x1 + -0x1],BL
MOV EAX,dword ptr [R14 + 0x744]
MOV R12D,EBX
MOV byte ptr [RDX + RAX*0x1 + -0x2],BH
MOV RAX,qword ptr [RBP + -0xa18]
MOV RAX,qword ptr [RAX + 0x10]
MOV ECX,dword ptr [R14 + 0x744]
ADD ECX,-0x4
MOV AL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [R15 + RCX*0x1],AL
CMP byte ptr [R14 + 0x7e7],0x0
JZ 0x0015355f
LEA R14,[RBP + -0xb08]
MOV RDI,R14
XOR ESI,ESI
CALL 0x00151ec8
NEG AL
MOV R15D,0x0
SBB R15D,R15D
OR R15D,0x2
MOV RBX,qword ptr [R14 + 0x10]
JMP 0x00153568
LAB_00153555:
MOV EAX,0xffffffff
JMP 0x001535f9
LAB_0015355f:
MOV RBX,R15
MOV R15D,0x2
LAB_00153568:
MOV EDI,R12D
ADD RDI,RBX
MOV R14,qword ptr [RBP + -0xa28]
MOV EDX,dword ptr [R14 + 0x7bc]
SUB EDX,R12D
XOR ESI,ESI
CALL 0x00129270
MOV RAX,qword ptr [RBP + -0xa80]
MOV ESI,dword ptr [RAX + 0xc]
LEA RDI,[RBP + -0xb08]
MOV EDX,0x3
CALL 0x0013a5b5
NEG AL
MOV EAX,0x0
SBB EAX,EAX
OR EAX,R15D
CMP byte ptr [R14 + 0x7e7],0x0
JZ 0x001535f9
MOV R9D,dword ptr [RBP + 0x10]
XOR EBX,EBX
MOV RDI,qword ptr [RBP + -0xa18]
MOV ESI,dword ptr [RBP + -0xa4c]
MOV RDX,qword ptr [RBP + -0xa90]
MOV R14,RAX
MOV RCX,qword ptr [RBP + -0xa98]
MOV R8D,dword ptr [RBP + -0xa50]
PUSH RBX
PUSH RBX
PUSH 0x0
PUSH RBX
CALL 0x00153737
ADD RSP,0x20
NEG AL
SBB EBX,EBX
OR EBX,R14D
MOV EAX,EBX
LAB_001535f9:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x0015361a
ADD RSP,0xaf8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015361a:
CALL 0x00129220
|
uint _ma_split_page(long *param_1,long *param_2,long *param_3,int4 param_4,int8 param_5,
int4 param_6,int4 param_7,void *param_8,char param_9)
{
ushort uVar1;
long *plVar2;
long *plVar3;
uint uVar4;
int1 *puVar5;
char cVar6;
uint uVar7;
uint uVar8;
int iVar9;
uint uVar10;
long lVar11;
void *__s;
ulong uVar12;
int1 *puVar13;
int1 *__src;
long in_FS_OFFSET;
int1 local_b28 [24];
long *local_b10;
long *local_b08;
void *local_b00;
long local_af8;
uint local_af0;
uint local_ae4;
int1 *local_ad8;
long *local_ad0;
int8 local_ac8;
int4 local_ac0;
ulong local_ab8;
long *local_ab0;
long *local_aa8;
int8 local_aa0;
long local_a98;
ulong local_a90;
int1 *local_a88;
void *local_a80;
void *local_a78;
long *local_a70;
int8 local_a68;
int4 local_a60;
int4 local_a58;
int4 local_a54;
int1 *local_a50;
long *local_a48;
int1 *local_a40;
uint local_a34;
long local_a30;
uint local_a24;
long *local_a20;
int1 local_a18 [2528];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
local_a88 = local_b28;
lVar11 = *param_1;
plVar2 = (long *)param_2[1];
*(int2 *)((long)param_1 + 0x684) = 0x101;
local_ab8 = (ulong)*(uint *)(param_3 + 5);
local_a24 = *(uint *)((long)param_3 + 0x2c);
local_a34 = *(int *)(lVar11 + 0x744) + *(uint *)(param_3 + 5);
local_b00 = (void *)param_1[0x6f];
local_a78 = param_8;
local_b10 = param_1;
local_b08 = plVar2;
local_ab0 = param_1;
local_aa8 = param_2;
local_aa0 = param_5;
local_a80 = local_b00;
local_a70 = plVar2;
local_a58 = param_6;
local_a54 = param_4;
local_a30 = lVar11;
local_a20 = param_3;
if (param_9 == '\0') {
__src = (int1 *)_ma_find_half_pos(&local_a78,param_3,&local_a50);
}
else {
plVar3 = (long *)*param_3;
uVar10 = *(uint *)(*plVar3 + 0x744);
uVar7 = (int)param_3[4] - uVar10;
puVar13 = (int1 *)(param_3[2] + (ulong)uVar10);
local_a40 = puVar13;
if ((local_a24 & 2) == 0 && (*(byte *)((long)plVar2 + 0xa2) & 0x2e) == 0) {
uVar1 = *(ushort *)((long)plVar2 + 0xaa);
local_a68 = CONCAT44(*(int4 *)(*plVar3 + 0x740),(uint)uVar1 - *(int *)(*plVar3 + 0x740))
;
local_a60 = 0;
__src = puVar13 + (uVar7 / uVar1 - 2) * (uint)uVar1;
local_a50 = __src + uVar1;
memcpy(param_8,__src,(ulong)uVar1);
param_3 = local_a20;
lVar11 = local_a30;
}
else {
local_ad8 = local_a18;
local_a18[0] = 0;
local_ad0 = plVar2;
uVar8 = (*(code *)plVar2[0x1c])(&local_ad8,local_a24,0,&local_a40);
uVar4 = local_a24;
if (uVar8 == 0) {
_ma_set_fatal_error(plVar3,0x7e);
__src = (int1 *)0x0;
param_3 = local_a20;
lVar11 = local_a30;
}
else {
puVar5 = puVar13;
local_a48 = plVar3;
do {
__src = puVar5;
puVar5 = local_a40;
local_a68 = local_ac8;
local_a60 = local_ac0;
memcpy(local_a78,local_a18,(ulong)uVar8);
uVar8 = (*(code *)plVar2[0x1c])(&local_ad8,uVar4,0,&local_a40);
if (uVar8 == 0) {
_ma_set_fatal_error(local_a48,0x7e);
__src = (int1 *)0x0;
param_3 = local_a20;
lVar11 = local_a30;
goto LAB_00153322;
}
} while (local_a40 < puVar13 + ((ulong)uVar7 - (ulong)uVar10));
local_a50 = puVar5;
param_3 = local_a20;
lVar11 = local_a30;
}
}
}
LAB_00153322:
uVar12 = local_ab8;
uVar10 = 0xffffffff;
if (__src != (int1 *)0x0) {
uVar7 = local_a68._4_4_ + (int)local_a68;
local_a98 = (long)__src - param_3[2];
uVar10 = *(uint *)(param_3 + 4);
*(int *)(param_3 + 4) = (int)local_a98;
*(char *)(param_3[2] + -1 + (ulong)*(uint *)(lVar11 + 0x744)) = (char)local_a98;
*(char *)(param_3[2] + -2 + (ulong)*(uint *)(lVar11 + 0x744)) = (char)((ulong)local_a98 >> 8);
local_ad8 = local_a50;
local_a48 = plVar2;
if (local_ab8 != 0) {
memcpy((void *)((ulong)*(uint *)(lVar11 + 0x744) + (long)local_a80),local_a50 + -local_ab8,
local_ab8);
}
plVar2 = local_ab0;
lVar11 = _ma_new(local_ab0,6,&local_a88);
plVar3 = local_aa8;
local_af8 = lVar11;
if (lVar11 == -1) {
uVar10 = 0xffffffff;
}
else {
local_a90 = (ulong)uVar10;
_ma_copy_key(local_aa8,&local_a78);
_ma_kpointer(plVar2,(ulong)uVar7 + *plVar3,lVar11);
plVar2 = local_a48;
iVar9 = (*(code *)local_a48[0x1c])(&local_a78,local_a24,uVar12 & 0xffffffff,&local_ad8);
uVar10 = 0xffffffff;
if (iVar9 != 0) {
uVar10 = (*(code *)plVar2[0x1e])(&local_a78,uVar12 & 0xffffffff,0,0,0,local_a18);
__s = local_a80;
uVar12 = (local_a90 + local_a20[2]) - (long)local_ad8;
lVar11 = (ulong)local_a34 + (long)local_a80;
memcpy((void *)((ulong)uVar10 + lVar11),local_ad8,uVar12 & 0xffffffff);
(*(code *)plVar2[0x1f])(plVar2,lVar11,local_a18);
lVar11 = local_a30;
uVar7 = uVar10 + local_a34 + (int)uVar12;
memset(__s,0,(ulong)*(uint *)(local_a30 + 0x744));
local_ae4 = local_a24;
*(char *)((long)__s + (ulong)(*(int *)(lVar11 + 0x744) - 3)) = (char)local_a24;
*(char *)((long)__s + ((ulong)*(uint *)(lVar11 + 0x744) - 1)) = (char)uVar7;
*(char *)((long)__s + ((ulong)*(uint *)(lVar11 + 0x744) - 2)) = (char)(uVar7 >> 8);
uVar12 = (ulong)(*(int *)(lVar11 + 0x744) - 4);
*(int1 *)((long)__s + uVar12) = *(int1 *)(local_a20[2] + uVar12);
local_af0 = uVar7;
if (*(char *)(lVar11 + 0x7e7) == '\0') {
uVar10 = 2;
}
else {
cVar6 = _ma_log_new(&local_b10);
uVar10 = -(uint)(cVar6 != '\0') | 2;
__s = local_b00;
}
lVar11 = local_a30;
memset((void *)((ulong)uVar7 + (long)__s),0,(ulong)(*(int *)(local_a30 + 0x7bc) - uVar7));
cVar6 = _ma_write_keypage(&local_b10,*(int4 *)(local_a88 + 0xc),3);
uVar10 = -(uint)(cVar6 != '\0') | uVar10;
if (*(char *)(lVar11 + 0x7e7) != '\0') {
cVar6 = _ma_log_split(local_a20,local_a54,local_a98,local_aa0,local_a58,param_7,0,0,0,0);
uVar10 = -(uint)(cVar6 != '\0') | uVar10;
}
}
}
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar10;
}
| |
33,533 | mi_store_var_pack_key | eloqsql/storage/myisam/mi_search.c | void _mi_store_var_pack_key(MI_KEYDEF *keyinfo __attribute__((unused)),
register uchar *key_pos,
register MI_KEY_PARAM *s_temp)
{
uint length;
uchar *start;
start=key_pos;
if (s_temp->ref_length)
{
/* Packed against previous key */
store_pack_length(s_temp->pack_marker == 128,key_pos,s_temp->ref_length);
/* If not same key after */
if (s_temp->ref_length != s_temp->pack_marker)
store_key_length_inc(key_pos,s_temp->key_length);
}
else
{
/* Not packed against previous key */
store_pack_length(s_temp->pack_marker == 128,key_pos,s_temp->key_length);
}
bmove((uchar*) key_pos,(uchar*) s_temp->key,
(length=s_temp->totlength-(uint) (key_pos-start)));
if (!s_temp->next_key_pos) /* No following key */
return;
key_pos+=length;
if (s_temp->prev_length)
{
/* Extend next key because new key didn't have same prefix as prev key */
if (s_temp->part_of_prev_key)
{
store_pack_length(s_temp->pack_marker == 128,key_pos,
s_temp->part_of_prev_key);
store_key_length_inc(key_pos,s_temp->n_length);
}
else
{
s_temp->n_length+= s_temp->store_not_null;
store_pack_length(s_temp->pack_marker == 128,key_pos,
s_temp->n_length);
}
memcpy(key_pos, s_temp->prev_key, s_temp->prev_length);
}
else if (s_temp->n_ref_length)
{
store_pack_length(s_temp->pack_marker == 128,key_pos,s_temp->n_ref_length);
if (s_temp->n_ref_length == s_temp->pack_marker)
return; /* Identical key */
store_key_length(key_pos,s_temp->n_length);
}
else
{
s_temp->n_length+= s_temp->store_not_null;
store_pack_length(s_temp->pack_marker == 128,key_pos,s_temp->n_length);
}
} | O3 | c | mi_store_var_pack_key:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movl (%rdx), %eax
movl 0x1c(%rdx), %ecx
testl %eax, %eax
je 0x4fce4
movl $0x1, %r15d
cmpl $0x80, %ecx
jne 0x4fcf8
movq %rbx, %rcx
jmp 0x4fd07
movl 0x4(%r14), %eax
cmpl $0x80, %ecx
jne 0x4fd28
leaq 0x1(%rbx), %r15
movb %al, (%rbx)
jmp 0x4fd4d
leaq 0x1(%rbx), %rcx
movb %ah, (%rbx)
movl (%r14), %eax
movl $0x2, %r15d
addq %rbx, %r15
movb %al, (%rcx)
movl (%r14), %eax
cmpl 0x1c(%r14), %eax
je 0x4fd4d
movl 0x4(%r14), %eax
cmpl $0xfe, %eax
ja 0x4fd37
movb %al, (%r15)
incq %r15
jmp 0x4fd4d
movb %ah, (%rbx)
movb 0x4(%r14), %al
leaq 0x2(%rbx), %r15
movb %al, 0x1(%rbx)
jmp 0x4fd4d
movb $-0x1, (%r15)
movzwl 0x4(%r14), %eax
rolw $0x8, %ax
movw %ax, 0x1(%r15)
addq $0x3, %r15
movq 0x20(%r14), %rsi
subl %r15d, %ebx
addl 0x10(%r14), %ebx
movq %r15, %rdi
movq %rbx, %rdx
callq 0x29720
cmpq $0x0, 0x30(%r14)
je 0x4fe9c
addq %rbx, %r15
cmpl $0x0, 0x18(%r14)
movq %r15, %rdi
je 0x4fd97
movl 0x14(%r14), %eax
testl %eax, %eax
je 0x4fdc1
movl $0x1, %ecx
cmpl $0x80, 0x1c(%r14)
jne 0x4fde7
movq %rdi, %rdx
jmp 0x4fdf6
movl 0x8(%r14), %ecx
testl %ecx, %ecx
je 0x4fe38
movl $0x1, %eax
cmpl $0x80, 0x1c(%r14)
movq %rdi, %rsi
jne 0x4fe53
movq %rdi, %rdx
jmp 0x4fe62
movsbl 0x38(%r14), %eax
addl 0xc(%r14), %eax
movl %eax, 0xc(%r14)
cmpl $0x80, 0x1c(%r14)
je 0x4fe06
movb %ah, (%rdi)
movb 0xc(%r14), %al
movb %al, 0x1(%rdi)
addq $0x2, %rdi
jmp 0x4fe21
leaq 0x1(%rdi), %rdx
movb %ah, (%rdi)
movl 0x14(%r14), %eax
movl $0x2, %ecx
addq %rcx, %rdi
movb %al, (%rdx)
movl 0xc(%r14), %eax
cmpl $0xfe, %eax
ja 0x4fe0d
movb %al, (%rdi)
incq %rdi
jmp 0x4fe21
movb $-0x1, (%rdi)
movzwl 0xc(%r14), %eax
rolw $0x8, %ax
movw %ax, 0x1(%rdi)
addq $0x3, %rdi
movq 0x28(%r14), %rsi
movl 0x18(%r14), %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x292f0
movsbl 0x38(%r14), %eax
addl 0xc(%r14), %eax
movl %eax, 0xc(%r14)
cmpl $0x80, 0x1c(%r14)
jne 0x4fe7f
movb %al, (%rdi)
jmp 0x4fe9c
leaq 0x1(%rdi), %rdx
movb %ch, (%rdi)
movl 0x8(%r14), %ecx
movl $0x2, %eax
movb %cl, (%rdx)
movl 0x8(%r14), %ecx
cmpl 0x1c(%r14), %ecx
je 0x4fe9c
movl 0xc(%r14), %ecx
cmpl $0xfe, %ecx
ja 0x4fe8a
movb %cl, (%rsi,%rax)
jmp 0x4fe9c
movb %ah, (%rdi)
movb 0xc(%r14), %al
movb %al, 0x1(%rdi)
jmp 0x4fe9c
movb $-0x1, (%rsi,%rax)
movzwl 0xc(%r14), %ecx
rolw $0x8, %cx
movw %cx, 0x1(%rsi,%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| _mi_store_var_pack_key:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14, rdx
mov rbx, rsi
mov eax, [rdx]
mov ecx, [rdx+1Ch]
test eax, eax
jz short loc_4FCE4
mov r15d, 1
cmp ecx, 80h
jnz short loc_4FCF8
mov rcx, rbx
jmp short loc_4FD07
loc_4FCE4:
mov eax, [r14+4]
cmp ecx, 80h
jnz short loc_4FD28
lea r15, [rbx+1]
mov [rbx], al
jmp short loc_4FD4D
loc_4FCF8:
lea rcx, [rbx+1]
mov [rbx], ah
mov eax, [r14]
mov r15d, 2
loc_4FD07:
add r15, rbx
mov [rcx], al
mov eax, [r14]
cmp eax, [r14+1Ch]
jz short loc_4FD4D
mov eax, [r14+4]
cmp eax, 0FEh
ja short loc_4FD37
mov [r15], al
inc r15
jmp short loc_4FD4D
loc_4FD28:
mov [rbx], ah
mov al, [r14+4]
lea r15, [rbx+2]
mov [rbx+1], al
jmp short loc_4FD4D
loc_4FD37:
mov byte ptr [r15], 0FFh
movzx eax, word ptr [r14+4]
rol ax, 8
mov [r15+1], ax
add r15, 3
loc_4FD4D:
mov rsi, [r14+20h]
sub ebx, r15d
add ebx, [r14+10h]
mov rdi, r15
mov rdx, rbx
call _memmove
cmp qword ptr [r14+30h], 0
jz loc_4FE9C
add r15, rbx
cmp dword ptr [r14+18h], 0
mov rdi, r15
jz short loc_4FD97
mov eax, [r14+14h]
test eax, eax
jz short loc_4FDC1
mov ecx, 1
cmp dword ptr [r14+1Ch], 80h
jnz short loc_4FDE7
mov rdx, rdi
jmp short loc_4FDF6
loc_4FD97:
mov ecx, [r14+8]
test ecx, ecx
jz loc_4FE38
mov eax, 1
cmp dword ptr [r14+1Ch], 80h
mov rsi, rdi
jnz loc_4FE53
mov rdx, rdi
jmp loc_4FE62
loc_4FDC1:
movsx eax, byte ptr [r14+38h]
add eax, [r14+0Ch]
mov [r14+0Ch], eax
cmp dword ptr [r14+1Ch], 80h
jz short loc_4FE06
mov [rdi], ah
mov al, [r14+0Ch]
mov [rdi+1], al
add rdi, 2
jmp short loc_4FE21
loc_4FDE7:
lea rdx, [rdi+1]
mov [rdi], ah
mov eax, [r14+14h]
mov ecx, 2
loc_4FDF6:
add rdi, rcx
mov [rdx], al
mov eax, [r14+0Ch]
cmp eax, 0FEh
ja short loc_4FE0D
loc_4FE06:
mov [rdi], al
inc rdi
jmp short loc_4FE21
loc_4FE0D:
mov byte ptr [rdi], 0FFh
movzx eax, word ptr [r14+0Ch]
rol ax, 8
mov [rdi+1], ax
add rdi, 3
loc_4FE21:
mov rsi, [r14+28h]
mov edx, [r14+18h]
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp _memcpy
loc_4FE38:
movsx eax, byte ptr [r14+38h]
add eax, [r14+0Ch]
mov [r14+0Ch], eax
cmp dword ptr [r14+1Ch], 80h
jnz short loc_4FE7F
mov [rdi], al
jmp short loc_4FE9C
loc_4FE53:
lea rdx, [rdi+1]
mov [rdi], ch
mov ecx, [r14+8]
mov eax, 2
loc_4FE62:
mov [rdx], cl
mov ecx, [r14+8]
cmp ecx, [r14+1Ch]
jz short loc_4FE9C
mov ecx, [r14+0Ch]
cmp ecx, 0FEh
ja short loc_4FE8A
mov [rsi+rax], cl
jmp short loc_4FE9C
loc_4FE7F:
mov [rdi], ah
mov al, [r14+0Ch]
mov [rdi+1], al
jmp short loc_4FE9C
loc_4FE8A:
mov byte ptr [rsi+rax], 0FFh
movzx ecx, word ptr [r14+0Ch]
rol cx, 8
mov [rsi+rax+1], cx
loc_4FE9C:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| char mi_store_var_pack_key(long long a1, _BYTE *a2, int *a3)
{
int v4; // eax
int v5; // ecx
long long v6; // r15
_BYTE *v7; // rcx
int v8; // eax
_BYTE *v9; // r15
unsigned int v10; // eax
long long v11; // rbx
long long v12; // rax
_BYTE *v13; // r15
_BYTE *v14; // rdi
int v15; // eax
long long v16; // rcx
_BYTE *v17; // rdx
int v18; // ecx
_BYTE *v19; // rdx
unsigned int v20; // eax
_BYTE *v21; // rdi
unsigned int v22; // ecx
v4 = *a3;
v5 = a3[7];
if ( *a3 )
{
v6 = 1LL;
if ( v5 == 128 )
{
v7 = a2;
}
else
{
v7 = a2 + 1;
*a2 = BYTE1(v4);
v4 = *a3;
v6 = 2LL;
}
v9 = &a2[v6];
*v7 = v4;
if ( *a3 != a3[7] )
{
v10 = a3[1];
if ( v10 > 0xFE )
{
*v9 = -1;
*(_WORD *)(v9 + 1) = __ROL2__(*((_WORD *)a3 + 2), 8);
v9 += 3;
}
else
{
*v9++ = v10;
}
}
}
else
{
v8 = a3[1];
if ( v5 == 128 )
{
v9 = a2 + 1;
*a2 = v8;
}
else
{
*a2 = BYTE1(v8);
v9 = a2 + 2;
a2[1] = *((_BYTE *)a3 + 4);
}
}
v11 = (unsigned int)(a3[4] + (_DWORD)a2 - (_DWORD)v9);
LOBYTE(v12) = memmove(v9, *((_QWORD *)a3 + 4), v11);
if ( *((_QWORD *)a3 + 6) )
{
v13 = &v9[v11];
v14 = v13;
if ( a3[6] )
{
v15 = a3[5];
if ( v15 )
{
v16 = 1LL;
if ( a3[7] == 128 )
{
v17 = v13;
}
else
{
v17 = v13 + 1;
*v13 = BYTE1(v15);
v15 = a3[5];
v16 = 2LL;
}
v14 = &v13[v16];
*v17 = v15;
v20 = a3[3];
if ( v20 > 0xFE )
{
*v14 = -1;
*(_WORD *)(v14 + 1) = __ROL2__(*((_WORD *)a3 + 6), 8);
v21 = v14 + 3;
goto LABEL_26;
}
}
else
{
v20 = a3[3] + *((char *)a3 + 56);
a3[3] = v20;
if ( a3[7] != 128 )
{
*v13 = BYTE1(v20);
v13[1] = *((_BYTE *)a3 + 12);
v21 = v13 + 2;
LABEL_26:
LOBYTE(v12) = memcpy(v21, *((_QWORD *)a3 + 5), (unsigned int)a3[6]);
return v12;
}
}
*v14 = v20;
v21 = v14 + 1;
goto LABEL_26;
}
v18 = a3[2];
if ( v18 )
{
v12 = 1LL;
if ( a3[7] == 128 )
{
v19 = v13;
}
else
{
v19 = v13 + 1;
*v13 = BYTE1(v18);
v18 = a3[2];
v12 = 2LL;
}
*v19 = v18;
if ( a3[2] != a3[7] )
{
v22 = a3[3];
if ( v22 > 0xFE )
{
v13[v12] = -1;
*(_WORD *)&v13[v12 + 1] = __ROL2__(*((_WORD *)a3 + 6), 8);
}
else
{
v13[v12] = v22;
}
}
}
else
{
LODWORD(v12) = a3[3] + *((char *)a3 + 56);
a3[3] = v12;
if ( a3[7] == 128 )
{
*v13 = v12;
}
else
{
*v13 = BYTE1(v12);
LOBYTE(v12) = *((_BYTE *)a3 + 12);
v13[1] = v12;
}
}
}
return v12;
}
| _mi_store_var_pack_key:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RDX
MOV RBX,RSI
MOV EAX,dword ptr [RDX]
MOV ECX,dword ptr [RDX + 0x1c]
TEST EAX,EAX
JZ 0x0014fce4
MOV R15D,0x1
CMP ECX,0x80
JNZ 0x0014fcf8
MOV RCX,RBX
JMP 0x0014fd07
LAB_0014fce4:
MOV EAX,dword ptr [R14 + 0x4]
CMP ECX,0x80
JNZ 0x0014fd28
LEA R15,[RBX + 0x1]
MOV byte ptr [RBX],AL
JMP 0x0014fd4d
LAB_0014fcf8:
LEA RCX,[RBX + 0x1]
MOV byte ptr [RBX],AH
MOV EAX,dword ptr [R14]
MOV R15D,0x2
LAB_0014fd07:
ADD R15,RBX
MOV byte ptr [RCX],AL
MOV EAX,dword ptr [R14]
CMP EAX,dword ptr [R14 + 0x1c]
JZ 0x0014fd4d
MOV EAX,dword ptr [R14 + 0x4]
CMP EAX,0xfe
JA 0x0014fd37
MOV byte ptr [R15],AL
INC R15
JMP 0x0014fd4d
LAB_0014fd28:
MOV byte ptr [RBX],AH
MOV AL,byte ptr [R14 + 0x4]
LEA R15,[RBX + 0x2]
MOV byte ptr [RBX + 0x1],AL
JMP 0x0014fd4d
LAB_0014fd37:
MOV byte ptr [R15],0xff
MOVZX EAX,word ptr [R14 + 0x4]
ROL AX,0x8
MOV word ptr [R15 + 0x1],AX
ADD R15,0x3
LAB_0014fd4d:
MOV RSI,qword ptr [R14 + 0x20]
SUB EBX,R15D
ADD EBX,dword ptr [R14 + 0x10]
MOV RDI,R15
MOV RDX,RBX
CALL 0x00129720
CMP qword ptr [R14 + 0x30],0x0
JZ 0x0014fe9c
ADD R15,RBX
CMP dword ptr [R14 + 0x18],0x0
MOV RDI,R15
JZ 0x0014fd97
MOV EAX,dword ptr [R14 + 0x14]
TEST EAX,EAX
JZ 0x0014fdc1
MOV ECX,0x1
CMP dword ptr [R14 + 0x1c],0x80
JNZ 0x0014fde7
MOV RDX,RDI
JMP 0x0014fdf6
LAB_0014fd97:
MOV ECX,dword ptr [R14 + 0x8]
TEST ECX,ECX
JZ 0x0014fe38
MOV EAX,0x1
CMP dword ptr [R14 + 0x1c],0x80
MOV RSI,RDI
JNZ 0x0014fe53
MOV RDX,RDI
JMP 0x0014fe62
LAB_0014fdc1:
MOVSX EAX,byte ptr [R14 + 0x38]
ADD EAX,dword ptr [R14 + 0xc]
MOV dword ptr [R14 + 0xc],EAX
CMP dword ptr [R14 + 0x1c],0x80
JZ 0x0014fe06
MOV byte ptr [RDI],AH
MOV AL,byte ptr [R14 + 0xc]
MOV byte ptr [RDI + 0x1],AL
ADD RDI,0x2
JMP 0x0014fe21
LAB_0014fde7:
LEA RDX,[RDI + 0x1]
MOV byte ptr [RDI],AH
MOV EAX,dword ptr [R14 + 0x14]
MOV ECX,0x2
LAB_0014fdf6:
ADD RDI,RCX
MOV byte ptr [RDX],AL
MOV EAX,dword ptr [R14 + 0xc]
CMP EAX,0xfe
JA 0x0014fe0d
LAB_0014fe06:
MOV byte ptr [RDI],AL
INC RDI
JMP 0x0014fe21
LAB_0014fe0d:
MOV byte ptr [RDI],0xff
MOVZX EAX,word ptr [R14 + 0xc]
ROL AX,0x8
MOV word ptr [RDI + 0x1],AX
ADD RDI,0x3
LAB_0014fe21:
MOV RSI,qword ptr [R14 + 0x28]
MOV EDX,dword ptr [R14 + 0x18]
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x001292f0
LAB_0014fe38:
MOVSX EAX,byte ptr [R14 + 0x38]
ADD EAX,dword ptr [R14 + 0xc]
MOV dword ptr [R14 + 0xc],EAX
CMP dword ptr [R14 + 0x1c],0x80
JNZ 0x0014fe7f
MOV byte ptr [RDI],AL
JMP 0x0014fe9c
LAB_0014fe53:
LEA RDX,[RDI + 0x1]
MOV byte ptr [RDI],CH
MOV ECX,dword ptr [R14 + 0x8]
MOV EAX,0x2
LAB_0014fe62:
MOV byte ptr [RDX],CL
MOV ECX,dword ptr [R14 + 0x8]
CMP ECX,dword ptr [R14 + 0x1c]
JZ 0x0014fe9c
MOV ECX,dword ptr [R14 + 0xc]
CMP ECX,0xfe
JA 0x0014fe8a
MOV byte ptr [RSI + RAX*0x1],CL
JMP 0x0014fe9c
LAB_0014fe7f:
MOV byte ptr [RDI],AH
MOV AL,byte ptr [R14 + 0xc]
MOV byte ptr [RDI + 0x1],AL
JMP 0x0014fe9c
LAB_0014fe8a:
MOV byte ptr [RSI + RAX*0x1],0xff
MOVZX ECX,word ptr [R14 + 0xc]
ROL CX,0x8
MOV word ptr [RSI + RAX*0x1 + 0x1],CX
LAB_0014fe9c:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void _mi_store_var_pack_key(int8 param_1,int1 *param_2,int *param_3)
{
uint uVar1;
int iVar2;
int1 *puVar3;
ulong __n;
long lVar4;
int1 *puVar5;
iVar2 = *param_3;
if (iVar2 == 0) {
if (param_3[7] == 0x80) {
puVar5 = param_2 + 1;
*param_2 = (char)param_3[1];
}
else {
*param_2 = (char)((uint)param_3[1] >> 8);
puVar5 = param_2 + 2;
param_2[1] = (char)param_3[1];
}
}
else {
lVar4 = 1;
puVar3 = param_2;
if (param_3[7] != 0x80) {
*param_2 = (char)((uint)iVar2 >> 8);
iVar2 = *param_3;
lVar4 = 2;
puVar3 = param_2 + 1;
}
puVar5 = param_2 + lVar4;
*puVar3 = (char)iVar2;
if (*param_3 != param_3[7]) {
if ((uint)param_3[1] < 0xff) {
*puVar5 = (char)param_3[1];
puVar5 = puVar5 + 1;
}
else {
*puVar5 = 0xff;
*(ushort *)(puVar5 + 1) = *(ushort *)(param_3 + 1) << 8 | *(ushort *)(param_3 + 1) >> 8;
puVar5 = puVar5 + 3;
}
}
}
__n = (ulong)(uint)(((int)param_2 - (int)puVar5) + param_3[4]);
memmove(puVar5,*(void **)(param_3 + 8),__n);
if (*(long *)(param_3 + 0xc) == 0) {
return;
}
puVar5 = puVar5 + __n;
if (param_3[6] == 0) {
iVar2 = param_3[2];
if (iVar2 == 0) {
iVar2 = (int)(char)param_3[0xe] + param_3[3];
param_3[3] = iVar2;
if (param_3[7] == 0x80) {
*puVar5 = (char)iVar2;
return;
}
*puVar5 = (char)((uint)iVar2 >> 8);
puVar5[1] = (char)param_3[3];
return;
}
lVar4 = 1;
puVar3 = puVar5;
if (param_3[7] != 0x80) {
*puVar5 = (char)((uint)iVar2 >> 8);
iVar2 = param_3[2];
lVar4 = 2;
puVar3 = puVar5 + 1;
}
*puVar3 = (char)iVar2;
if (param_3[2] == param_3[7]) {
return;
}
if ((uint)param_3[3] < 0xff) {
puVar5[lVar4] = (char)param_3[3];
return;
}
puVar5[lVar4] = 0xff;
*(ushort *)(puVar5 + lVar4 + 1) = *(ushort *)(param_3 + 3) << 8 | *(ushort *)(param_3 + 3) >> 8;
return;
}
iVar2 = param_3[5];
if (iVar2 == 0) {
uVar1 = (int)(char)param_3[0xe] + param_3[3];
param_3[3] = uVar1;
if (param_3[7] != 0x80) {
*puVar5 = (char)(uVar1 >> 8);
puVar5[1] = (char)param_3[3];
puVar5 = puVar5 + 2;
goto LAB_0014fe21;
}
}
else {
lVar4 = 1;
puVar3 = puVar5;
if (param_3[7] != 0x80) {
*puVar5 = (char)((uint)iVar2 >> 8);
iVar2 = param_3[5];
lVar4 = 2;
puVar3 = puVar5 + 1;
}
puVar5 = puVar5 + lVar4;
*puVar3 = (char)iVar2;
uVar1 = param_3[3];
if (0xfe < uVar1) {
*puVar5 = 0xff;
*(ushort *)(puVar5 + 1) = *(ushort *)(param_3 + 3) << 8 | *(ushort *)(param_3 + 3) >> 8;
puVar5 = puVar5 + 3;
goto LAB_0014fe21;
}
}
*puVar5 = (char)uVar1;
puVar5 = puVar5 + 1;
LAB_0014fe21:
memcpy(puVar5,*(void **)(param_3 + 10),(ulong)(uint)param_3[6]);
return;
}
| |
33,534 | translog_get_file_max_lsn_stored | eloqsql/storage/maria/ma_loghandler.c | LSN translog_get_file_max_lsn_stored(uint32 file)
{
uint32 limit= FILENO_IMPOSSIBLE;
DBUG_ENTER("translog_get_file_max_lsn_stored");
DBUG_PRINT("enter", ("file: %lu", (ulong)file));
DBUG_ASSERT(translog_status == TRANSLOG_OK ||
translog_status == TRANSLOG_READONLY);
mysql_mutex_lock(&log_descriptor.unfinished_files_lock);
/* find file with minimum file number "in progress" */
if (log_descriptor.unfinished_files.elements > 0)
{
struct st_file_counter *fc_ptr;
fc_ptr= dynamic_element(&log_descriptor.unfinished_files,
0, struct st_file_counter *);
limit= fc_ptr->file; /* minimal file number "in progress" */
}
mysql_mutex_unlock(&log_descriptor.unfinished_files_lock);
/*
if there is no "in progress file" then unfinished file is in progress
for sure
*/
if (limit == FILENO_IMPOSSIBLE)
{
TRANSLOG_ADDRESS horizon= translog_get_horizon();
limit= LSN_FILE_NO(horizon);
}
if (file >= limit)
{
DBUG_PRINT("info", ("The file in in progress"));
DBUG_RETURN(LSN_IMPOSSIBLE);
}
{
LOGHANDLER_FILE_INFO info;
File fd;
fd= open_logfile_by_number_no_cache(file);
if(fd < 0)
{
DBUG_PRINT("error", ("Can't open file"));
DBUG_RETURN(LSN_ERROR);
}
if (translog_read_file_header(&info, fd))
{
DBUG_PRINT("error", ("Can't read file header"));
info.max_lsn= LSN_ERROR;
}
if (mysql_file_close(fd, MYF(MY_WME)))
{
DBUG_PRINT("error", ("Can't close file"));
info.max_lsn= LSN_ERROR;
}
DBUG_PRINT("info", ("Max lsn: " LSN_FMT, LSN_IN_PARTS(info.max_lsn)));
DBUG_RETURN(info.max_lsn);
}
} | O3 | c | translog_get_file_max_lsn_stored:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x90, %rsp
movl %edi, %ebx
cmpq $0x0, 0xbb7cf8(%rip) # 0xc018b8
jne 0x49c95
leaq 0xbb7cab(%rip), %rdi # 0xc01878
callq 0x29220
cmpl $0x0, 0xbb7cef(%rip) # 0xc018c8
je 0x49be7
movq 0xbb7cde(%rip), %rax # 0xc018c0
movl (%rax), %r14d
jmp 0x49bea
xorl %r14d, %r14d
movq 0xbb7cc7(%rip), %rdi # 0xc018b8
testq %rdi, %rdi
jne 0x49c9f
leaq 0xbb7c77(%rip), %rdi # 0xc01878
callq 0x291e0
testl %r14d, %r14d
jne 0x49c17
callq 0x4ce58
movq %rax, %r14
shrq $0x20, %r14
cmpl %ebx, %r14d
jbe 0x49c80
movl %ebx, %edi
callq 0x49cea
testl %eax, %eax
js 0x49c84
movl %eax, %ebx
leaq -0x50(%rbp), %rdi
movl %eax, %esi
callq 0x49aa4
testb %al, %al
je 0x49c40
movq $0x1, -0x50(%rbp)
leaq 0x33e479(%rip), %rax # 0x3880c0
movq (%rax), %rax
leaq -0x98(%rbp), %rdi
movl %ebx, %esi
movl $0x4, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x49cb4
movl $0x10, %esi
movl %ebx, %edi
callq 0xa1461
movl %eax, %ecx
movl $0x1, %eax
testl %ecx, %ecx
jne 0x49c89
movq -0x50(%rbp), %rax
jmp 0x49c89
xorl %eax, %eax
jmp 0x49c89
movl $0x1, %eax
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x2c303
jmp 0x49bd2
leaq 0x33e41a(%rip), %rax # 0x3880c0
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x49bfa
leaq -0x14(%rbp), %r14
movq %rax, %rdi
movl %ebx, %esi
movq %r14, %rdx
callq 0x2c320
movl (%r14), %ecx
jmp 0x49c71
| translog_get_file_max_lsn_stored:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 90h
mov ebx, edi
cmp cs:qword_C018B8, 0
jnz loc_49C95
lea rdi, unk_C01878
call _pthread_mutex_lock
loc_49BD2:
cmp cs:dword_C018C8, 0
jz short loc_49BE7
mov rax, cs:qword_C018C0
mov r14d, [rax]
jmp short loc_49BEA
loc_49BE7:
xor r14d, r14d
loc_49BEA:
mov rdi, cs:qword_C018B8
test rdi, rdi
jnz loc_49C9F
loc_49BFA:
lea rdi, unk_C01878
call _pthread_mutex_unlock
test r14d, r14d
jnz short loc_49C17
call translog_get_horizon
mov r14, rax
shr r14, 20h
loc_49C17:
cmp r14d, ebx
jbe short loc_49C80
mov edi, ebx
call open_logfile_by_number_no_cache
test eax, eax
js short loc_49C84
mov ebx, eax
lea rdi, [rbp+var_50]
mov esi, eax
call translog_read_file_header
test al, al
jz short loc_49C40
mov [rbp+var_50], 1
loc_49C40:
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_98]
mov esi, ebx
mov edx, 4
call qword ptr [rax+158h]
test rax, rax
jnz short loc_49CB4
mov esi, 10h
mov edi, ebx
call my_close
mov ecx, eax
loc_49C71:
mov eax, 1
test ecx, ecx
jnz short loc_49C89
mov rax, [rbp+var_50]
jmp short loc_49C89
loc_49C80:
xor eax, eax
jmp short loc_49C89
loc_49C84:
mov eax, 1
loc_49C89:
add rsp, 90h
pop rbx
pop r14
pop rbp
retn
loc_49C95:
call translog_get_file_max_lsn_stored_cold_1
jmp loc_49BD2
loc_49C9F:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_49BFA
loc_49CB4:
lea r14, [rbp+var_14]
mov rdi, rax
mov esi, ebx
mov rdx, r14
call translog_get_file_max_lsn_stored_cold_2
mov ecx, [r14]
jmp short loc_49C71
| unsigned long long translog_get_file_max_lsn_stored(unsigned int a1)
{
unsigned long long v1; // r14
int v2; // eax
unsigned int v3; // ebx
long long v4; // rax
unsigned int v5; // ecx
unsigned long long result; // rax
_BYTE v7[72]; // [rsp+8h] [rbp-98h] BYREF
__m128 v8[3]; // [rsp+50h] [rbp-50h] BYREF
unsigned int v9[5]; // [rsp+8Ch] [rbp-14h] BYREF
if ( qword_C018B8 )
translog_get_file_max_lsn_stored_cold_1();
else
pthread_mutex_lock(&unk_C01878);
if ( dword_C018C8 )
LODWORD(v1) = *(_DWORD *)qword_C018C0;
else
LODWORD(v1) = 0;
if ( qword_C018B8 )
PSI_server[44]();
pthread_mutex_unlock(&unk_C01878);
if ( !(_DWORD)v1 )
v1 = (unsigned long long)translog_get_horizon() >> 32;
if ( (unsigned int)v1 <= a1 )
return 0LL;
v2 = open_logfile_by_number_no_cache(a1);
if ( v2 < 0 )
return 1LL;
v3 = v2;
if ( translog_read_file_header(v8, (unsigned int)v2) )
v8[0].m128_u64[0] = 1LL;
v4 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v7, v3, 4LL);
if ( v4 )
{
translog_get_file_max_lsn_stored_cold_2(v4, v3, v9);
v5 = v9[0];
}
else
{
v5 = my_close(v3, 16LL);
}
result = 1LL;
if ( !v5 )
return v8[0].m128_u64[0];
return result;
}
| translog_get_file_max_lsn_stored:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x90
MOV EBX,EDI
CMP qword ptr [0x00d018b8],0x0
JNZ 0x00149c95
LEA RDI,[0xd01878]
CALL 0x00129220
LAB_00149bd2:
CMP dword ptr [0x00d018c8],0x0
JZ 0x00149be7
MOV RAX,qword ptr [0x00d018c0]
MOV R14D,dword ptr [RAX]
JMP 0x00149bea
LAB_00149be7:
XOR R14D,R14D
LAB_00149bea:
MOV RDI,qword ptr [0x00d018b8]
TEST RDI,RDI
JNZ 0x00149c9f
LAB_00149bfa:
LEA RDI,[0xd01878]
CALL 0x001291e0
TEST R14D,R14D
JNZ 0x00149c17
CALL 0x0014ce58
MOV R14,RAX
SHR R14,0x20
LAB_00149c17:
CMP R14D,EBX
JBE 0x00149c80
MOV EDI,EBX
CALL 0x00149cea
TEST EAX,EAX
JS 0x00149c84
MOV EBX,EAX
LEA RDI,[RBP + -0x50]
MOV ESI,EAX
CALL 0x00149aa4
TEST AL,AL
JZ 0x00149c40
MOV qword ptr [RBP + -0x50],0x1
LAB_00149c40:
LEA RAX,[0x4880c0]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x98]
MOV ESI,EBX
MOV EDX,0x4
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x00149cb4
MOV ESI,0x10
MOV EDI,EBX
CALL 0x001a1461
MOV ECX,EAX
LAB_00149c71:
MOV EAX,0x1
TEST ECX,ECX
JNZ 0x00149c89
MOV RAX,qword ptr [RBP + -0x50]
JMP 0x00149c89
LAB_00149c80:
XOR EAX,EAX
JMP 0x00149c89
LAB_00149c84:
MOV EAX,0x1
LAB_00149c89:
ADD RSP,0x90
POP RBX
POP R14
POP RBP
RET
LAB_00149c95:
CALL 0x0012c303
JMP 0x00149bd2
LAB_00149c9f:
LEA RAX,[0x4880c0]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00149bfa
LAB_00149cb4:
LEA R14,[RBP + -0x14]
MOV RDI,RAX
MOV ESI,EBX
MOV RDX,R14
CALL 0x0012c320
MOV ECX,dword ptr [R14]
JMP 0x00149c71
|
int8 translog_get_file_max_lsn_stored(uint param_1)
{
char cVar1;
int iVar2;
uint extraout_var;
long lVar3;
int8 uVar4;
uint uVar5;
int1 local_a0 [72];
int8 local_58 [7];
int local_1c;
if (DAT_00d018b8 == 0) {
pthread_mutex_lock((pthread_mutex_t *)&DAT_00d01878);
}
else {
translog_get_file_max_lsn_stored_cold_1();
}
if (DAT_00d018c8 == 0) {
uVar5 = 0;
}
else {
uVar5 = *DAT_00d018c0;
}
if (DAT_00d018b8 != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)&DAT_00d01878);
if (uVar5 == 0) {
translog_get_horizon();
uVar5 = extraout_var;
}
if (param_1 < uVar5) {
iVar2 = open_logfile_by_number_no_cache(param_1);
if (iVar2 < 0) {
uVar4 = 1;
}
else {
cVar1 = translog_read_file_header(local_58,iVar2);
if (cVar1 != '\0') {
local_58[0] = 1;
}
lVar3 = (**(code **)(PSI_server + 0x158))(local_a0,iVar2,4);
if (lVar3 == 0) {
local_1c = my_close(iVar2,0x10);
}
else {
translog_get_file_max_lsn_stored_cold_2(lVar3,iVar2,&local_1c);
}
uVar4 = 1;
if (local_1c == 0) {
uVar4 = local_58[0];
}
}
}
else {
uVar4 = 0;
}
return uVar4;
}
| |
33,535 | my_strnncollsp_padspace_bin | eloqsql/strings/ctype-bin.c | int my_strnncollsp_padspace_bin(const uchar *str, size_t length)
{
for ( ; length ; str++, length--)
{
if (*str < ' ')
return -1;
else if (*str > ' ')
return 1;
}
return 0;
} | O0 | c | my_strnncollsp_padspace_bin:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x3f77b
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x20, %eax
jge 0x3f748
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x3f782
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x20, %eax
jle 0x3f75d
movl $0x1, -0x4(%rbp)
jmp 0x3f782
jmp 0x3f75f
jmp 0x3f761
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x3f72c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
| my_strnncollsp_padspace_bin:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
loc_3F72C:
cmp [rbp+var_18], 0
jz short loc_3F77B
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
cmp eax, 20h ; ' '
jge short loc_3F748
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_3F782
loc_3F748:
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
cmp eax, 20h ; ' '
jle short loc_3F75D
mov [rbp+var_4], 1
jmp short loc_3F782
loc_3F75D:
jmp short $+2
loc_3F75F:
jmp short $+2
loc_3F761:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
mov rax, [rbp+var_18]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_18], rax
jmp short loc_3F72C
loc_3F77B:
mov [rbp+var_4], 0
loc_3F782:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_strnncollsp_padspace_bin(unsigned __int8 *a1, long long a2)
{
while ( a2 )
{
if ( *a1 < 0x20u )
return (unsigned int)-1;
if ( *a1 > 0x20u )
return 1;
++a1;
--a2;
}
return 0;
}
| my_strnncollsp_padspace_bin:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
LAB_0013f72c:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0013f77b
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x20
JGE 0x0013f748
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0013f782
LAB_0013f748:
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x20
JLE 0x0013f75d
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0013f782
LAB_0013f75d:
JMP 0x0013f75f
LAB_0013f75f:
JMP 0x0013f761
LAB_0013f761:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0013f72c
LAB_0013f77b:
MOV dword ptr [RBP + -0x4],0x0
LAB_0013f782:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_strnncollsp_padspace_bin(byte *param_1,long param_2)
{
long local_20;
byte *local_18;
local_20 = param_2;
local_18 = param_1;
while( true ) {
if (local_20 == 0) {
return 0;
}
if (*local_18 < 0x20) break;
if (0x20 < *local_18) {
return 1;
}
local_18 = local_18 + 1;
local_20 = local_20 + -1;
}
return 0xffffffff;
}
| |
33,536 | ma_update_state_lsns_sub | eloqsql/storage/maria/ma_create.c | int _ma_update_state_lsns_sub(MARIA_SHARE *share, LSN lsn, TrID create_trid,
my_bool do_sync,
my_bool update_create_rename_lsn)
{
uchar buf[LSN_STORE_SIZE * 3], *ptr;
uchar trid_buff[8];
File file= share->kfile.file;
DBUG_ENTER("_ma_update_state_lsns_sub");
DBUG_ASSERT(file >= 0);
CRASH_IF_S3_TABLE(share);
if (lsn == LSN_IMPOSSIBLE)
{
int res;
LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 1];
/* table name is logged only for information */
log_array[TRANSLOG_INTERNAL_PARTS + 0].str=
(uchar *)(share->open_file_name.str);
log_array[TRANSLOG_INTERNAL_PARTS + 0].length=
share->open_file_name.length + 1;
if ((res= translog_write_record(&lsn, LOGREC_IMPORTED_TABLE,
&dummy_transaction_object, NULL,
(translog_size_t)
log_array[TRANSLOG_INTERNAL_PARTS +
0].length,
sizeof(log_array)/sizeof(log_array[0]),
log_array, NULL, NULL)))
DBUG_RETURN(res);
}
for (ptr= buf; ptr < (buf + sizeof(buf)); ptr+= LSN_STORE_SIZE)
lsn_store(ptr, lsn);
share->state.skip_redo_lsn= share->state.is_of_horizon= lsn;
share->state.create_trid= create_trid;
mi_int8store(trid_buff, create_trid);
/*
Update create_rename_lsn if update was requested or if the old one had an
impossible value.
*/
if (update_create_rename_lsn ||
(share->state.create_rename_lsn > lsn && lsn != LSN_IMPOSSIBLE))
{
share->state.create_rename_lsn= lsn;
if (share->id != 0)
{
/*
If OP is the operation which is calling us, if table is later written,
we could see in the log:
FILE_ID ... REDO_OP ... REDO_INSERT.
(that can happen in real life at least with OP=REPAIR).
As FILE_ID will be ignored by Recovery because it is <
create_rename_lsn, REDO_INSERT would be ignored too, wrongly.
To avoid that, we force a LOGREC_FILE_ID to be logged at next write:
*/
translog_deassign_id_from_share(share);
}
}
else
lsn_store(buf, share->state.create_rename_lsn);
DBUG_RETURN(my_pwrite(file, buf, sizeof(buf),
sizeof(share->state.header) +
MARIA_FILE_CREATE_RENAME_LSN_OFFSET, MYF(MY_NABP)) ||
my_pwrite(file, trid_buff, sizeof(trid_buff),
sizeof(share->state.header) +
MARIA_FILE_CREATE_TRID_OFFSET, MYF(MY_NABP)) ||
(do_sync && mysql_file_sync(file, MYF(0))));
} | O0 | c | ma_update_state_lsns_sub:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movb %r8b, %al
movq %fs:0x28, %r8
movq %r8, -0x8(%rbp)
movq %rdi, -0x38(%rbp)
movq %rsi, -0x40(%rbp)
movq %rdx, -0x48(%rbp)
movb %cl, -0x49(%rbp)
movb %al, -0x4a(%rbp)
movq -0x38(%rbp), %rax
movl 0x760(%rax), %eax
movl %eax, -0x5c(%rbp)
jmp 0x4aa7c
jmp 0x4aa7e
jmp 0x4aa80
cmpq $0x0, -0x40(%rbp)
jne 0x4ab04
movq -0x38(%rbp), %rax
movq 0x5e0(%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x38(%rbp), %rax
movq 0x5e8(%rax), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movl %eax, %r8d
leaq -0x90(%rbp), %rax
leaq -0x40(%rbp), %rdi
movl $0x29, %esi
leaq 0x42d119(%rip), %rdx # 0x477be0
xorl %ecx, %ecx
movl $0x3, %r9d
movq %rax, (%rsp)
movq $0x0, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
callq 0x53fc0
movsbl %al, %eax
movl %eax, -0x60(%rbp)
cmpl $0x0, %eax
je 0x4ab02
jmp 0x4aaf7
movl -0x60(%rbp), %eax
movl %eax, -0x2c(%rbp)
jmp 0x4adca
jmp 0x4ab04
leaq -0x20(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
leaq -0x20(%rbp), %rcx
addq $0x15, %rcx
cmpq %rcx, %rax
jae 0x4ab98
jmp 0x4ab1f
jmp 0x4ab21
movq -0x40(%rbp), %rax
sarq $0x20, %rax
movb %al, %cl
movq -0x58(%rbp), %rax
movb %cl, (%rax)
movq -0x40(%rbp), %rax
sarq $0x20, %rax
shrl $0x8, %eax
movb %al, %cl
movq -0x58(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x40(%rbp), %rax
sarq $0x20, %rax
shrl $0x10, %eax
movb %al, %cl
movq -0x58(%rbp), %rax
movb %cl, 0x2(%rax)
jmp 0x4ab5b
movq -0x58(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x98(%rbp)
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq -0x40(%rbp), %rax
movl %eax, %ecx
movq -0x98(%rbp), %rax
movl %ecx, (%rax)
jmp 0x4ab85
jmp 0x4ab87
movq -0x58(%rbp), %rax
addq $0x7, %rax
movq %rax, -0x58(%rbp)
jmp 0x4ab0c
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x180(%rax)
movq -0x38(%rbp), %rax
movq %rcx, 0x188(%rax)
movq -0x48(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0xe0(%rax)
movq -0x48(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x48(%rbp), %rax
shrq $0x20, %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
movb %al, -0x25(%rbp)
movq -0xb0(%rbp), %rax
shrq $0x8, %rax
movb %al, -0x26(%rbp)
movq -0xb0(%rbp), %rax
shrq $0x10, %rax
movb %al, -0x27(%rbp)
movq -0xb0(%rbp), %rax
shrq $0x18, %rax
movb %al, -0x28(%rbp)
movq -0xa0(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rax
movb %al, -0x21(%rbp)
movq -0xb8(%rbp), %rax
shrq $0x8, %rax
movb %al, -0x22(%rbp)
movq -0xb8(%rbp), %rax
shrq $0x10, %rax
movb %al, -0x23(%rbp)
movq -0xb8(%rbp), %rax
shrq $0x18, %rax
movb %al, -0x24(%rbp)
movsbl -0x4a(%rbp), %eax
cmpl $0x0, %eax
jne 0x4ac80
movq -0x38(%rbp), %rax
movq 0x178(%rax), %rax
cmpq -0x40(%rbp), %rax
jle 0x4acaa
cmpq $0x0, -0x40(%rbp)
je 0x4acaa
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x178(%rax)
movq -0x38(%rbp), %rax
movzwl 0x620(%rax), %eax
cmpl $0x0, %eax
je 0x4aca8
movq -0x38(%rbp), %rdi
callq 0x56e40
jmp 0x4ad1f
jmp 0x4acac
jmp 0x4acae
movq -0x38(%rbp), %rax
movq 0x178(%rax), %rax
sarq $0x20, %rax
movb %al, -0x20(%rbp)
movq -0x38(%rbp), %rax
movq 0x178(%rax), %rax
sarq $0x20, %rax
shrl $0x8, %eax
movb %al, -0x1f(%rbp)
movq -0x38(%rbp), %rax
movq 0x178(%rax), %rax
sarq $0x20, %rax
shrl $0x10, %eax
movb %al, -0x1e(%rbp)
jmp 0x4acec
leaq -0x20(%rbp), %rax
addq $0x3, %rax
movq %rax, -0xc0(%rbp)
movq -0x38(%rbp), %rcx
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq 0x178(%rcx), %rax
movl %eax, %ecx
movq -0xc0(%rbp), %rax
movl %ecx, (%rax)
jmp 0x4ad1d
jmp 0x4ad1f
jmp 0x4ad21
movl -0x5c(%rbp), %edi
leaq -0x20(%rbp), %rsi
movl $0x15, %edx
movl $0x1c, %ecx
movl $0x4, %r8d
callq 0xf4860
movq %rax, %rcx
movb $0x1, %al
cmpq $0x0, %rcx
movb %al, -0xc1(%rbp)
jne 0x4adbc
movl -0x5c(%rbp), %edi
leaq -0x28(%rbp), %rsi
movl $0x8, %edx
movl $0x89, %ecx
movl $0x4, %r8d
callq 0xf4860
movq %rax, %rcx
movb $0x1, %al
cmpq $0x0, %rcx
movb %al, -0xc1(%rbp)
jne 0x4adbc
movsbl -0x49(%rbp), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0xc2(%rbp)
je 0x4adb0
movl -0x5c(%rbp), %edx
leaq 0x1069cd(%rip), %rdi # 0x151763
movl $0x5f1, %esi # imm = 0x5F1
xorl %eax, %eax
movl %eax, %ecx
callq 0x4af50
cmpl $0x0, %eax
setne %al
movb %al, -0xc2(%rbp)
movb -0xc2(%rbp), %al
movb %al, -0xc1(%rbp)
movb -0xc1(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0xc8(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x4adf4
movl -0xc8(%rbp), %eax
addq $0xe0, %rsp
popq %rbp
retq
callq 0x2a270
nopl (%rax)
| _ma_update_state_lsns_sub:
push rbp
mov rbp, rsp
sub rsp, 0E0h
mov al, r8b
mov r8, fs:28h
mov [rbp+var_8], r8
mov [rbp+var_38], rdi
mov [rbp+var_40], rsi
mov [rbp+var_48], rdx
mov [rbp+var_49], cl
mov [rbp+var_4A], al
mov rax, [rbp+var_38]
mov eax, [rax+760h]
mov [rbp+var_5C], eax
jmp short $+2
loc_4AA7C:
jmp short $+2
loc_4AA7E:
jmp short $+2
loc_4AA80:
cmp [rbp+var_40], 0
jnz short loc_4AB04
mov rax, [rbp+var_38]
mov rax, [rax+5E0h]
mov [rbp+var_70], rax
mov rax, [rbp+var_38]
mov rax, [rax+5E8h]
add rax, 1
mov [rbp+var_68], rax
mov rax, [rbp+var_68]
mov r8d, eax
lea rax, [rbp+var_90]
lea rdi, [rbp+var_40]
mov esi, 29h ; ')'
lea rdx, dummy_transaction_object
xor ecx, ecx
mov r9d, 3
mov [rsp+0E0h+var_E0], rax
mov [rsp+0E0h+var_D8], 0
mov [rsp+0E0h+var_D0], 0
call translog_write_record
movsx eax, al
mov [rbp+var_60], eax
cmp eax, 0
jz short loc_4AB02
jmp short $+2
loc_4AAF7:
mov eax, [rbp+var_60]
mov [rbp+var_2C], eax
jmp loc_4ADCA
loc_4AB02:
jmp short $+2
loc_4AB04:
lea rax, [rbp+var_20]
mov [rbp+var_58], rax
loc_4AB0C:
mov rax, [rbp+var_58]
lea rcx, [rbp+var_20]
add rcx, 15h
cmp rax, rcx
jnb short loc_4AB98
jmp short $+2
loc_4AB1F:
jmp short $+2
loc_4AB21:
mov rax, [rbp+var_40]
sar rax, 20h
mov cl, al
mov rax, [rbp+var_58]
mov [rax], cl
mov rax, [rbp+var_40]
sar rax, 20h
shr eax, 8
mov cl, al
mov rax, [rbp+var_58]
mov [rax+1], cl
mov rax, [rbp+var_40]
sar rax, 20h
shr eax, 10h
mov cl, al
mov rax, [rbp+var_58]
mov [rax+2], cl
jmp short $+2
loc_4AB5B:
mov rax, [rbp+var_58]
add rax, 3
mov [rbp+var_98], rax
mov rax, 0FFFFFFFFh
and rax, [rbp+var_40]
mov ecx, eax
mov rax, [rbp+var_98]
mov [rax], ecx
jmp short $+2
loc_4AB85:
jmp short $+2
loc_4AB87:
mov rax, [rbp+var_58]
add rax, 7
mov [rbp+var_58], rax
jmp loc_4AB0C
loc_4AB98:
mov rcx, [rbp+var_40]
mov rax, [rbp+var_38]
mov [rax+180h], rcx
mov rax, [rbp+var_38]
mov [rax+188h], rcx
mov rcx, [rbp+var_48]
mov rax, [rbp+var_38]
mov [rax+0E0h], rcx
mov rax, [rbp+var_48]
mov [rbp+var_A0], rax
mov rax, [rbp+var_48]
shr rax, 20h
mov [rbp+var_A8], rax
mov rax, [rbp+var_A8]
mov [rbp+var_B0], rax
mov rax, [rbp+var_B0]
mov [rbp+var_25], al
mov rax, [rbp+var_B0]
shr rax, 8
mov [rbp+var_26], al
mov rax, [rbp+var_B0]
shr rax, 10h
mov [rbp+var_27], al
mov rax, [rbp+var_B0]
shr rax, 18h
mov [rbp+var_28], al
mov rax, [rbp+var_A0]
mov [rbp+var_B8], rax
mov rax, [rbp+var_B8]
mov [rbp+var_21], al
mov rax, [rbp+var_B8]
shr rax, 8
mov [rbp+var_22], al
mov rax, [rbp+var_B8]
shr rax, 10h
mov [rbp+var_23], al
mov rax, [rbp+var_B8]
shr rax, 18h
mov [rbp+var_24], al
movsx eax, [rbp+var_4A]
cmp eax, 0
jnz short loc_4AC80
mov rax, [rbp+var_38]
mov rax, [rax+178h]
cmp rax, [rbp+var_40]
jle short loc_4ACAA
cmp [rbp+var_40], 0
jz short loc_4ACAA
loc_4AC80:
mov rcx, [rbp+var_40]
mov rax, [rbp+var_38]
mov [rax+178h], rcx
mov rax, [rbp+var_38]
movzx eax, word ptr [rax+620h]
cmp eax, 0
jz short loc_4ACA8
mov rdi, [rbp+var_38]
call translog_deassign_id_from_share
loc_4ACA8:
jmp short loc_4AD1F
loc_4ACAA:
jmp short $+2
loc_4ACAC:
jmp short $+2
loc_4ACAE:
mov rax, [rbp+var_38]
mov rax, [rax+178h]
sar rax, 20h
mov [rbp+var_20], al
mov rax, [rbp+var_38]
mov rax, [rax+178h]
sar rax, 20h
shr eax, 8
mov [rbp+var_1F], al
mov rax, [rbp+var_38]
mov rax, [rax+178h]
sar rax, 20h
shr eax, 10h
mov [rbp+var_1E], al
jmp short $+2
loc_4ACEC:
lea rax, [rbp+var_20]
add rax, 3
mov [rbp+var_C0], rax
mov rcx, [rbp+var_38]
mov rax, 0FFFFFFFFh
and rax, [rcx+178h]
mov ecx, eax
mov rax, [rbp+var_C0]
mov [rax], ecx
jmp short $+2
loc_4AD1D:
jmp short $+2
loc_4AD1F:
jmp short $+2
loc_4AD21:
mov edi, [rbp+var_5C]
lea rsi, [rbp+var_20]
mov edx, 15h
mov ecx, 1Ch
mov r8d, 4
call my_pwrite
mov rcx, rax
mov al, 1
cmp rcx, 0
mov [rbp+var_C1], al
jnz short loc_4ADBC
mov edi, [rbp+var_5C]
lea rsi, [rbp+var_28]
mov edx, 8
mov ecx, 89h
mov r8d, 4
call my_pwrite
mov rcx, rax
mov al, 1
cmp rcx, 0
mov [rbp+var_C1], al
jnz short loc_4ADBC
movsx ecx, [rbp+var_49]
xor eax, eax
cmp ecx, 0
mov [rbp+var_C2], al
jz short loc_4ADB0
mov edx, [rbp+var_5C]
lea rdi, aWorkspaceLlm4b_8; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 5F1h
xor eax, eax
mov ecx, eax
call inline_mysql_file_sync_1
cmp eax, 0
setnz al
mov [rbp+var_C2], al
loc_4ADB0:
mov al, [rbp+var_C2]
mov [rbp+var_C1], al
loc_4ADBC:
mov al, [rbp+var_C1]
and al, 1
movzx eax, al
mov [rbp+var_2C], eax
loc_4ADCA:
mov eax, [rbp+var_2C]
mov [rbp+var_C8], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_4ADF4
mov eax, [rbp+var_C8]
add rsp, 0E0h
pop rbp
retn
loc_4ADF4:
call ___stack_chk_fail
| long long ma_update_state_lsns_sub(long long a1, long long a2, long long a3, char a4, char a5)
{
char v5; // al
long long v6; // rcx
bool v8; // [rsp+1Eh] [rbp-C2h]
char v9; // [rsp+1Fh] [rbp-C1h]
_BYTE v10[32]; // [rsp+50h] [rbp-90h] BYREF
long long v11; // [rsp+70h] [rbp-70h]
long long v12; // [rsp+78h] [rbp-68h]
unsigned int v13; // [rsp+80h] [rbp-60h]
unsigned int v14; // [rsp+84h] [rbp-5Ch]
_BYTE *i; // [rsp+88h] [rbp-58h]
char v16; // [rsp+96h] [rbp-4Ah]
char v17; // [rsp+97h] [rbp-49h]
long long v18; // [rsp+98h] [rbp-48h]
long long v19; // [rsp+A0h] [rbp-40h] BYREF
long long v20; // [rsp+A8h] [rbp-38h]
_BYTE v22[8]; // [rsp+B8h] [rbp-28h] BYREF
_BYTE v23[3]; // [rsp+C0h] [rbp-20h] BYREF
int v24; // [rsp+C3h] [rbp-1Dh]
_BYTE v25[11]; // [rsp+D5h] [rbp-Bh] BYREF
*(_QWORD *)&v25[3] = __readfsqword(0x28u);
v20 = a1;
v19 = a2;
v18 = a3;
v17 = a4;
v16 = a5;
v14 = *(_DWORD *)(a1 + 1888);
if ( a2
|| (v11 = *(_QWORD *)(v20 + 1504),
v12 = *(_QWORD *)(v20 + 1512) + 1LL,
v5 = translog_write_record(
(unsigned int)&v19,
41,
(unsigned int)&dummy_transaction_object,
0,
v12,
3,
(long long)v10,
0LL,
0LL),
(v13 = v5) == 0) )
{
for ( i = v23; i < v25; i += 7 )
{
*(_WORD *)i = WORD2(v19);
i[2] = BYTE6(v19);
*(_DWORD *)(i + 3) = v19;
}
v6 = v19;
*(_QWORD *)(v20 + 384) = v19;
*(_QWORD *)(v20 + 392) = v6;
*(_QWORD *)(v20 + 224) = v18;
v22[2] = BYTE5(v18);
v22[3] = BYTE4(v18);
v22[0] = HIBYTE(v18);
v22[1] = BYTE6(v18);
v22[6] = BYTE1(v18);
v22[7] = v18;
v22[4] = BYTE3(v18);
v22[5] = BYTE2(v18);
if ( v16 || *(_QWORD *)(v20 + 376) > v19 && v19 )
{
*(_QWORD *)(v20 + 376) = v19;
if ( *(_WORD *)(v20 + 1568) )
translog_deassign_id_from_share(v20);
}
else
{
v23[0] = BYTE4(*(_QWORD *)(v20 + 376));
v23[1] = (unsigned __int16)WORD2(*(_QWORD *)(v20 + 376)) >> 8;
v23[2] = BYTE6(*(_QWORD *)(v20 + 376));
v24 = *(_QWORD *)(v20 + 376);
}
v9 = 1;
if ( !my_pwrite(v14, v23, 21LL, 28LL) )
{
v9 = 1;
if ( !my_pwrite(v14, v22, 8LL, 137LL) )
{
v8 = 0;
if ( v17 )
v8 = (unsigned int)inline_mysql_file_sync_1(
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_create.c",
1521LL,
v14,
0LL) != 0;
v9 = v8;
}
}
return v9 & 1;
}
else
{
return v13;
}
}
| _ma_update_state_lsns_sub:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xe0
MOV AL,R8B
MOV R8,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],R8
MOV qword ptr [RBP + -0x38],RDI
MOV qword ptr [RBP + -0x40],RSI
MOV qword ptr [RBP + -0x48],RDX
MOV byte ptr [RBP + -0x49],CL
MOV byte ptr [RBP + -0x4a],AL
MOV RAX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RAX + 0x760]
MOV dword ptr [RBP + -0x5c],EAX
JMP 0x0014aa7c
LAB_0014aa7c:
JMP 0x0014aa7e
LAB_0014aa7e:
JMP 0x0014aa80
LAB_0014aa80:
CMP qword ptr [RBP + -0x40],0x0
JNZ 0x0014ab04
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x5e0]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x5e8]
ADD RAX,0x1
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV R8D,EAX
LEA RAX,[RBP + -0x90]
LEA RDI,[RBP + -0x40]
MOV ESI,0x29
LEA RDX,[0x577be0]
XOR ECX,ECX
MOV R9D,0x3
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],0x0
MOV qword ptr [RSP + 0x10],0x0
CALL 0x00153fc0
MOVSX EAX,AL
MOV dword ptr [RBP + -0x60],EAX
CMP EAX,0x0
JZ 0x0014ab02
JMP 0x0014aaf7
LAB_0014aaf7:
MOV EAX,dword ptr [RBP + -0x60]
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x0014adca
LAB_0014ab02:
JMP 0x0014ab04
LAB_0014ab04:
LEA RAX,[RBP + -0x20]
MOV qword ptr [RBP + -0x58],RAX
LAB_0014ab0c:
MOV RAX,qword ptr [RBP + -0x58]
LEA RCX,[RBP + -0x20]
ADD RCX,0x15
CMP RAX,RCX
JNC 0x0014ab98
JMP 0x0014ab1f
LAB_0014ab1f:
JMP 0x0014ab21
LAB_0014ab21:
MOV RAX,qword ptr [RBP + -0x40]
SAR RAX,0x20
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x58]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x40]
SAR RAX,0x20
SHR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x58]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x40]
SAR RAX,0x20
SHR EAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x58]
MOV byte ptr [RAX + 0x2],CL
JMP 0x0014ab5b
LAB_0014ab5b:
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x3
MOV qword ptr [RBP + -0x98],RAX
MOV RAX,0xffffffff
AND RAX,qword ptr [RBP + -0x40]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x98]
MOV dword ptr [RAX],ECX
JMP 0x0014ab85
LAB_0014ab85:
JMP 0x0014ab87
LAB_0014ab87:
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x7
MOV qword ptr [RBP + -0x58],RAX
JMP 0x0014ab0c
LAB_0014ab98:
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x180],RCX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x188],RCX
MOV RCX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0xe0],RCX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0xa0],RAX
MOV RAX,qword ptr [RBP + -0x48]
SHR RAX,0x20
MOV qword ptr [RBP + -0xa8],RAX
MOV RAX,qword ptr [RBP + -0xa8]
MOV qword ptr [RBP + -0xb0],RAX
MOV RAX,qword ptr [RBP + -0xb0]
MOV byte ptr [RBP + -0x25],AL
MOV RAX,qword ptr [RBP + -0xb0]
SHR RAX,0x8
MOV byte ptr [RBP + -0x26],AL
MOV RAX,qword ptr [RBP + -0xb0]
SHR RAX,0x10
MOV byte ptr [RBP + -0x27],AL
MOV RAX,qword ptr [RBP + -0xb0]
SHR RAX,0x18
MOV byte ptr [RBP + -0x28],AL
MOV RAX,qword ptr [RBP + -0xa0]
MOV qword ptr [RBP + -0xb8],RAX
MOV RAX,qword ptr [RBP + -0xb8]
MOV byte ptr [RBP + -0x21],AL
MOV RAX,qword ptr [RBP + -0xb8]
SHR RAX,0x8
MOV byte ptr [RBP + -0x22],AL
MOV RAX,qword ptr [RBP + -0xb8]
SHR RAX,0x10
MOV byte ptr [RBP + -0x23],AL
MOV RAX,qword ptr [RBP + -0xb8]
SHR RAX,0x18
MOV byte ptr [RBP + -0x24],AL
MOVSX EAX,byte ptr [RBP + -0x4a]
CMP EAX,0x0
JNZ 0x0014ac80
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x178]
CMP RAX,qword ptr [RBP + -0x40]
JLE 0x0014acaa
CMP qword ptr [RBP + -0x40],0x0
JZ 0x0014acaa
LAB_0014ac80:
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x178],RCX
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EAX,word ptr [RAX + 0x620]
CMP EAX,0x0
JZ 0x0014aca8
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x00156e40
LAB_0014aca8:
JMP 0x0014ad1f
LAB_0014acaa:
JMP 0x0014acac
LAB_0014acac:
JMP 0x0014acae
LAB_0014acae:
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x178]
SAR RAX,0x20
MOV byte ptr [RBP + -0x20],AL
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x178]
SAR RAX,0x20
SHR EAX,0x8
MOV byte ptr [RBP + -0x1f],AL
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x178]
SAR RAX,0x20
SHR EAX,0x10
MOV byte ptr [RBP + -0x1e],AL
JMP 0x0014acec
LAB_0014acec:
LEA RAX,[RBP + -0x20]
ADD RAX,0x3
MOV qword ptr [RBP + -0xc0],RAX
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,0xffffffff
AND RAX,qword ptr [RCX + 0x178]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0xc0]
MOV dword ptr [RAX],ECX
JMP 0x0014ad1d
LAB_0014ad1d:
JMP 0x0014ad1f
LAB_0014ad1f:
JMP 0x0014ad21
LAB_0014ad21:
MOV EDI,dword ptr [RBP + -0x5c]
LEA RSI,[RBP + -0x20]
MOV EDX,0x15
MOV ECX,0x1c
MOV R8D,0x4
CALL 0x001f4860
MOV RCX,RAX
MOV AL,0x1
CMP RCX,0x0
MOV byte ptr [RBP + -0xc1],AL
JNZ 0x0014adbc
MOV EDI,dword ptr [RBP + -0x5c]
LEA RSI,[RBP + -0x28]
MOV EDX,0x8
MOV ECX,0x89
MOV R8D,0x4
CALL 0x001f4860
MOV RCX,RAX
MOV AL,0x1
CMP RCX,0x0
MOV byte ptr [RBP + -0xc1],AL
JNZ 0x0014adbc
MOVSX ECX,byte ptr [RBP + -0x49]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0xc2],AL
JZ 0x0014adb0
MOV EDX,dword ptr [RBP + -0x5c]
LEA RDI,[0x251763]
MOV ESI,0x5f1
XOR EAX,EAX
MOV ECX,EAX
CALL 0x0014af50
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0xc2],AL
LAB_0014adb0:
MOV AL,byte ptr [RBP + -0xc2]
MOV byte ptr [RBP + -0xc1],AL
LAB_0014adbc:
MOV AL,byte ptr [RBP + -0xc1]
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x2c],EAX
LAB_0014adca:
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0xc8],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0014adf4
MOV EAX,dword ptr [RBP + -0xc8]
ADD RSP,0xe0
POP RBP
RET
LAB_0014adf4:
CALL 0x0012a270
|
uint _ma_update_state_lsns_sub
(long param_1,long param_2,int8 param_3,char param_4,char param_5)
{
char cVar1;
int iVar2;
long lVar3;
long in_FS_OFFSET;
bool local_ca;
bool local_c9;
int1 local_98 [32];
int8 local_78;
ulong local_70;
uint local_68;
int4 local_64;
int1 *local_60;
char local_52;
char local_51;
int8 local_50;
long local_48;
long local_40;
uint local_34;
int1 local_30;
int1 local_2f;
int1 local_2e;
int1 local_2d;
int1 local_2c;
int1 local_2b;
int1 local_2a;
int1 local_29;
int1 local_28;
int1 local_27;
int1 local_26;
int4 local_25;
int1 auStack_13 [3];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_64 = *(int4 *)(param_1 + 0x760);
local_52 = param_5;
local_51 = param_4;
local_50 = param_3;
local_48 = param_2;
local_40 = param_1;
if (param_2 == 0) {
local_78 = *(int8 *)(param_1 + 0x5e0);
local_70 = *(long *)(param_1 + 0x5e8) + 1;
cVar1 = translog_write_record
(&local_48,0x29,dummy_transaction_object,0,local_70 & 0xffffffff,3,local_98,0,
0);
local_68 = (uint)cVar1;
local_34 = local_68;
if (local_68 != 0) goto LAB_0014adca;
}
for (local_60 = &local_28; local_60 < auStack_13; local_60 = local_60 + 7) {
*local_60 = (char)((ulong)local_48 >> 0x20);
local_60[1] = (char)((ulong)local_48 >> 0x28);
local_60[2] = (char)((ulong)local_48 >> 0x30);
*(int *)(local_60 + 3) = (int)local_48;
}
*(long *)(local_40 + 0x180) = local_48;
*(long *)(local_40 + 0x188) = local_48;
*(int8 *)(local_40 + 0xe0) = local_50;
local_2d = (int1)((ulong)local_50 >> 0x20);
local_2e = (int1)((ulong)local_50 >> 0x28);
local_2f = (int1)((ulong)local_50 >> 0x30);
local_30 = (int1)((ulong)local_50 >> 0x38);
local_29 = (int1)local_50;
local_2a = (int1)((ulong)local_50 >> 8);
local_2b = (int1)((ulong)local_50 >> 0x10);
local_2c = (int1)((ulong)local_50 >> 0x18);
if ((local_52 == '\0') && ((*(long *)(local_40 + 0x178) <= local_48 || (local_48 == 0)))) {
local_28 = (int1)((ulong)*(int8 *)(local_40 + 0x178) >> 0x20);
local_27 = (int1)((ulong)*(int8 *)(local_40 + 0x178) >> 0x28);
local_26 = (int1)((ulong)*(int8 *)(local_40 + 0x178) >> 0x30);
local_25 = (int4)*(int8 *)(local_40 + 0x178);
}
else {
*(long *)(local_40 + 0x178) = local_48;
if (*(short *)(local_40 + 0x620) != 0) {
translog_deassign_id_from_share(local_40);
}
}
lVar3 = my_pwrite(local_64,&local_28,0x15,0x1c,4);
local_c9 = true;
if (lVar3 == 0) {
lVar3 = my_pwrite(local_64,&local_30,8,0x89,4);
local_c9 = true;
if (lVar3 == 0) {
local_ca = false;
if (local_51 != '\0') {
iVar2 = inline_mysql_file_sync
("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_create.c",
0x5f1,local_64,0);
local_ca = iVar2 != 0;
}
local_c9 = local_ca;
}
}
local_34 = (uint)local_c9;
LAB_0014adca:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_34;
}
| |
33,537 | minja::Parser::parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, minja::Options const&) | monkey531[P]llama/common/minja.hpp | static std::shared_ptr<TemplateNode> parse(const std::string& template_str, const Options & options) {
Parser parser(std::make_shared<std::string>(normalize_newlines(template_str)), options);
auto tokens = parser.tokenize();
TemplateTokenIterator begin = tokens.begin();
auto it = begin;
TemplateTokenIterator end = tokens.end();
return parser.parseTemplate(begin, it, end, /* full= */ true);
} | O2 | cpp | minja::Parser::parse(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, minja::Options const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x23cd0
movq %rsp, %rdi
movq %r15, %rsi
callq 0x606d6
leaq 0x40(%rsp), %rdi
movq %rsp, %rsi
movq %r14, %rdx
callq 0x606f4
leaq 0x8(%rsp), %rdi
callq 0x2adb8
leaq 0x10(%rsp), %rdi
callq 0x24348
leaq 0x10(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x6079c
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rsi
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0x38(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x30(%rsp), %r8
movq %rsi, (%r8)
leaq 0x40(%rsp), %rsi
pushq $0x1
popq %r9
movq %rbx, %rdi
callq 0x6253c
leaq 0x10(%rsp), %rdi
callq 0x6345c
leaq 0x48(%rsp), %rdi
callq 0x2adb8
movq %rbx, %rax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x6345c
jmp 0x5fc14
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x2adb8
jmp 0x5fc3c
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2adb8
jmp 0x5fc32
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x24348
movq %rbx, %rdi
callq 0x240e0
| _ZN5minja6Parser5parseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_7OptionsE:
push r15
push r14
push rbx
sub rsp, 70h
mov r14, rdx
mov rbx, rdi
lea r15, [rsp+88h+var_78]
mov rdi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
mov rdi, rsp
mov rsi, r15
call _ZSt11make_sharedINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS5_EESt10shared_ptrIT_EDpOT0_; std::make_shared<std::string,std::string>(std::string &&)
lea rdi, [rsp+88h+var_48]
mov rsi, rsp
mov rdx, r14
call _ZN5minja6ParserC2ERKSt10shared_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEERKNS_7OptionsE; minja::Parser::Parser(std::shared_ptr<std::string> const&,minja::Options const&)
lea rdi, [rsp+88h+var_80]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+88h+var_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+88h+var_78]; this
lea rsi, [rsp+88h+var_48]
call _ZN5minja6Parser8tokenizeEv; minja::Parser::tokenize(void)
mov rax, [rsp+88h+var_78]
mov rsi, [rsp+88h+var_70]
mov rdx, rsp
mov [rdx], rax
lea rcx, [rsp+88h+var_50]
mov [rcx], rax
lea r8, [rsp+88h+var_58]
mov [r8], rsi
lea rsi, [rsp+88h+var_48]
push 1
pop r9
mov rdi, rbx
call _ZNK5minja6Parser13parseTemplateERKN9__gnu_cxx17__normal_iteratorIPKSt10unique_ptrINS_13TemplateTokenESt14default_deleteIS4_EESt6vectorIS7_SaIS7_EEEERSD_SF_b; minja::Parser::parseTemplate(__gnu_cxx::__normal_iterator<std::unique_ptr<minja::TemplateToken> const*,std::vector<std::unique_ptr<minja::TemplateToken>>> const&,__gnu_cxx::__normal_iterator<std::unique_ptr<minja::TemplateToken> const*,std::vector<std::unique_ptr<minja::TemplateToken>>>&,__gnu_cxx::__normal_iterator<std::unique_ptr<minja::TemplateToken> const*,std::vector<std::unique_ptr<minja::TemplateToken>>> const&,bool)
lea rdi, [rsp+88h+var_78]
call _ZNSt6vectorISt10unique_ptrIN5minja13TemplateTokenESt14default_deleteIS2_EESaIS5_EED2Ev; std::vector<std::unique_ptr<minja::TemplateToken>>::~vector()
lea rdi, [rsp+88h+var_40]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rax, rbx
add rsp, 70h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_8]
call _ZNSt6vectorISt10unique_ptrIN5minja13TemplateTokenESt14default_deleteIS2_EESaIS5_EED2Ev; std::vector<std::unique_ptr<minja::TemplateToken>>::~vector()
jmp short loc_5FC14
mov rbx, rax
loc_5FC14:
lea rdi, [rsp+arg_40]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_5FC3C
mov rbx, rax
lea rdi, [rsp+arg_0]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_5FC32
mov rbx, rax
loc_5FC32:
lea rdi, [rsp+arg_8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_5FC3C:
mov rdi, rbx
call __Unwind_Resume
| long long minja::Parser::parse(long long a1, long long a2, long long a3)
{
long long v5; // [rsp+0h] [rbp-88h] BYREF
long long v6; // [rsp+8h] [rbp-80h] BYREF
_QWORD v7[4]; // [rsp+10h] [rbp-78h] BYREF
long long v8; // [rsp+30h] [rbp-58h] BYREF
long long v9; // [rsp+38h] [rbp-50h] BYREF
_BYTE v10[8]; // [rsp+40h] [rbp-48h] BYREF
_QWORD v11[8]; // [rsp+48h] [rbp-40h] BYREF
std::string::basic_string(v7, a2);
std::make_shared<std::string,std::string>(&v5, v7);
minja::Parser::Parser(v10, &v5, a3);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v6);
std::string::~string(v7);
minja::Parser::tokenize((minja::Parser *)v7);
v5 = v7[0];
v9 = v7[0];
v8 = v7[1];
((void ( *)(long long, _BYTE *, long long *, long long *, long long *, long long))minja::Parser::parseTemplate)(
a1,
v10,
&v5,
&v9,
&v8,
1LL);
std::vector<std::unique_ptr<minja::TemplateToken>>::~vector(v7);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v11);
return a1;
}
| parse:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x70
MOV R14,RDX
MOV RBX,RDI
LEA R15,[RSP + 0x10]
MOV RDI,R15
CALL 0x00123cd0
LAB_0015fb72:
MOV RDI,RSP
MOV RSI,R15
CALL 0x001606d6
LAB_0015fb7d:
LEA RDI,[RSP + 0x40]
MOV RSI,RSP
MOV RDX,R14
CALL 0x001606f4
LEA RDI,[RSP + 0x8]
CALL 0x0012adb8
LEA RDI,[RSP + 0x10]
CALL 0x00124348
LAB_0015fba1:
LEA RDI,[RSP + 0x10]
LEA RSI,[RSP + 0x40]
CALL 0x0016079c
MOV RAX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,RSP
MOV qword ptr [RDX],RAX
LEA RCX,[RSP + 0x38]
MOV qword ptr [RCX],RAX
LEA R8,[RSP + 0x30]
MOV qword ptr [R8],RSI
LAB_0015fbd0:
LEA RSI,[RSP + 0x40]
PUSH 0x1
POP R9
MOV RDI,RBX
CALL 0x0016253c
LAB_0015fbe1:
LEA RDI,[RSP + 0x10]
CALL 0x0016345c
LEA RDI,[RSP + 0x48]
CALL 0x0012adb8
MOV RAX,RBX
ADD RSP,0x70
POP RBX
POP R14
POP R15
RET
|
/* minja::Parser::parse(std::__cxx11::string const&, minja::Options const&) */
Parser * __thiscall minja::Parser::parse(Parser *this,string *param_1,Options *param_2)
{
int8 local_88;
__shared_count<(__gnu_cxx::_Lock_policy)2> local_80 [8];
int8 local_78;
int8 local_70;
int8 local_58;
int8 local_50;
Parser local_48 [8];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_40 [40];
std::__cxx11::string::string((string *)&local_78,param_1);
/* try { // try from 0015fb72 to 0015fb7c has its CatchHandler @ 0015fc2f */
std::make_shared<std::__cxx11::string,std::__cxx11::string>((string *)&local_88);
/* try { // try from 0015fb7d to 0015fb8c has its CatchHandler @ 0015fc20 */
Parser(local_48,(shared_ptr *)&local_88,param_2);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_80);
std::__cxx11::string::~string((string *)&local_78);
/* try { // try from 0015fba1 to 0015fbaf has its CatchHandler @ 0015fc11 */
tokenize();
local_88 = local_78;
local_50 = local_78;
local_58 = local_70;
/* try { // try from 0015fbd0 to 0015fbe0 has its CatchHandler @ 0015fc02 */
parseTemplate(this,local_48,(__normal_iterator *)&local_88,SUB81(&local_50,0));
std::
vector<std::unique_ptr<minja::TemplateToken,std::default_delete<minja::TemplateToken>>,std::allocator<std::unique_ptr<minja::TemplateToken,std::default_delete<minja::TemplateToken>>>>
::~vector((vector<std::unique_ptr<minja::TemplateToken,std::default_delete<minja::TemplateToken>>,std::allocator<std::unique_ptr<minja::TemplateToken,std::default_delete<minja::TemplateToken>>>>
*)&local_78);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_40);
return this;
}
| |
33,538 | my_fill_mb2 | eloqsql/strings/ctype-ucs2.c | static void
my_fill_mb2(CHARSET_INFO *cs, char *s, size_t slen, int fill)
{
char buf[10], *last;
size_t buflen, remainder;
DBUG_ASSERT((slen % 2) == 0);
buflen= my_ci_wc_mb(cs, (my_wc_t) fill, (uchar*) buf,
(uchar*) buf + sizeof(buf));
DBUG_ASSERT(buflen > 0);
/*
"last" in the last position where a sequence of "buflen" bytes can start.
*/
for (last= s + slen - buflen; s <= last; s+= buflen)
{
/* Enough space for the character */
memcpy(s, buf, buflen);
}
/*
If there are some more space which is not enough
for the whole multibyte character, then add trailing zeros.
*/
if ((remainder= last + buflen - s) > 0)
bzero(s, (size_t) remainder);
} | O3 | c | my_fill_mb2:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq 0xb8(%rdi), %rax
movslq %ecx, %rsi
leaq -0x30(%rbp), %rcx
leaq -0x3a(%rbp), %rdx
callq *0x30(%rax)
movslq %eax, %r15
addq %r14, %rbx
movq %rbx, %r13
subq %r15, %r13
cmpq %r14, %r13
jb 0xc35cb
leaq -0x3a(%rbp), %r12
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x29080
addq %r15, %r14
cmpq %r13, %r14
jbe 0xc35b5
subq %r14, %rbx
je 0xc35dd
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x292c0
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0xc35fb
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29270
| my_fill_mb2:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdx
mov r14, rsi
mov rax, fs:28h
mov [rbp+var_30], rax
mov rax, [rdi+0B8h]
movsxd rsi, ecx
lea rcx, [rbp+var_30]
lea rdx, [rbp+var_3A]
call qword ptr [rax+30h]
movsxd r15, eax
add rbx, r14
mov r13, rbx
sub r13, r15
cmp r13, r14
jb short loc_C35CB
lea r12, [rbp+var_3A]
loc_C35B5:
mov rdi, r14
mov rsi, r12
mov rdx, r15
call _memcpy
add r14, r15
cmp r14, r13
jbe short loc_C35B5
loc_C35CB:
sub rbx, r14
jz short loc_C35DD
mov rdi, r14
xor esi, esi
mov rdx, rbx
call _memset
loc_C35DD:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_C35FB
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_C35FB:
call ___stack_chk_fail
| unsigned long long my_fill_mb2(long long a1, unsigned long long a2, long long a3, int a4)
{
unsigned long long v5; // r14
long long v6; // r15
long long v7; // rbx
long long v8; // rbx
_BYTE v10[10]; // [rsp+6h] [rbp-3Ah] BYREF
unsigned long long v11[6]; // [rsp+10h] [rbp-30h] BYREF
v5 = a2;
v11[0] = __readfsqword(0x28u);
v6 = (*(int ( **)(long long, _QWORD, _BYTE *, unsigned long long *))(*(_QWORD *)(a1 + 184) + 48LL))(
a1,
a4,
v10,
v11);
v7 = a2 + a3;
if ( v7 - v6 >= a2 )
{
do
{
memcpy(v5, v10, v6);
v5 += v6;
}
while ( v5 <= v7 - v6 );
}
v8 = v7 - v5;
if ( v8 )
memset(v5, 0LL, v8);
return __readfsqword(0x28u);
}
| my_fill_mb2:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDX
MOV R14,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RDI + 0xb8]
MOVSXD RSI,ECX
LEA RCX,[RBP + -0x30]
LEA RDX,[RBP + -0x3a]
CALL qword ptr [RAX + 0x30]
MOVSXD R15,EAX
ADD RBX,R14
MOV R13,RBX
SUB R13,R15
CMP R13,R14
JC 0x001c35cb
LEA R12,[RBP + -0x3a]
LAB_001c35b5:
MOV RDI,R14
MOV RSI,R12
MOV RDX,R15
CALL 0x00129080
ADD R14,R15
CMP R14,R13
JBE 0x001c35b5
LAB_001c35cb:
SUB RBX,R14
JZ 0x001c35dd
MOV RDI,R14
XOR ESI,ESI
MOV RDX,RBX
CALL 0x001292c0
LAB_001c35dd:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001c35fb
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001c35fb:
CALL 0x00129270
|
void my_fill_mb2(long param_1,void *param_2,long param_3,int param_4)
{
int iVar1;
void *pvVar2;
void *__dest;
size_t sVar3;
long in_FS_OFFSET;
int1 local_42 [10];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
iVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))(param_1,(long)param_4,local_42,&local_38);
sVar3 = (size_t)iVar1;
pvVar2 = (void *)((long)param_2 + (param_3 - sVar3));
__dest = param_2;
if (param_2 <= pvVar2) {
do {
memcpy(__dest,local_42,sVar3);
__dest = (void *)((long)__dest + sVar3);
} while (__dest <= pvVar2);
}
sVar3 = (long)param_2 + (param_3 - (long)__dest);
if (sVar3 != 0) {
memset(__dest,0,sVar3);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
33,539 | background::layout() | untodesu[P]voxelius/game/client/background.cc | void background::layout(void)
{
auto viewport = ImGui::GetMainViewport();
auto draw_list = ImGui::GetBackgroundDrawList();
auto scaled_width = 0.75f * static_cast<float>(globals::width / globals::gui_scale);
auto scaled_height = 0.75f * static_cast<float>(globals::height / globals::gui_scale);
auto scale_uv = ImVec2(scaled_width / static_cast<float>(texture->size.x), scaled_height / static_cast<float>(texture->size.y));
draw_list->AddImage(texture->handle, ImVec2(0.0f, 0.0f), viewport->Size, ImVec2(0.0f, 0.0f), scale_uv);
} | O0 | cpp | background::layout():
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
callq 0x235ff0
movq %rax, -0x8(%rbp)
callq 0x22c480
movq %rax, -0x10(%rbp)
leaq 0x4dd22f(%rip), %rax # 0x50e200
movl (%rax), %eax
leaq 0x4dd296(%rip), %rcx # 0x50e270
movl (%rcx), %esi
xorl %edx, %edx
movl %edx, -0x58(%rbp)
divl %esi
movl -0x58(%rbp), %edx
cvtsi2ss %rax, %xmm0
movss 0x339011(%rip), %xmm1 # 0x36a004
mulss %xmm1, %xmm0
movss %xmm0, -0x14(%rbp)
leaq 0x4dd201(%rip), %rax # 0x50e204
movl (%rax), %eax
movl (%rcx), %ecx
divl %ecx
cvtsi2ss %rax, %xmm1
movss 0x338fee(%rip), %xmm0 # 0x36a004
mulss %xmm1, %xmm0
movss %xmm0, -0x18(%rbp)
movss -0x14(%rbp), %xmm0
movss %xmm0, -0x54(%rbp)
leaq 0x4dc6e0(%rip), %rdi # 0x50d710
callq 0x311c0
movss -0x54(%rbp), %xmm0
cvtsi2ssl 0x8(%rax), %xmm1
divss %xmm1, %xmm0
movss %xmm0, -0x4c(%rbp)
movss -0x18(%rbp), %xmm0
movss %xmm0, -0x50(%rbp)
leaq 0x4dc6b7(%rip), %rdi # 0x50d710
callq 0x311c0
movss -0x50(%rbp), %xmm1
movss -0x4c(%rbp), %xmm0
cvtsi2ssl 0xc(%rax), %xmm2
divss %xmm2, %xmm1
leaq -0x20(%rbp), %rdi
callq 0x311e0
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq 0x4dc687(%rip), %rdi # 0x50d710
callq 0x311c0
movq (%rax), %rax
movq %rax, -0x40(%rbp)
leaq -0x28(%rbp), %rdi
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0x311e0
movq -0x8(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0x311e0
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rcx
leaq -0x28(%rbp), %rdx
leaq -0x30(%rbp), %r8
leaq -0x20(%rbp), %r9
movl $0xffffffff, (%rsp) # imm = 0xFFFFFFFF
callq 0x1cbf50
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
| _ZN10background6layoutEv:
push rbp
mov rbp, rsp
sub rsp, 60h
call _ZN5ImGui15GetMainViewportEv; ImGui::GetMainViewport(void)
mov [rbp+var_8], rax
call _ZN5ImGui21GetBackgroundDrawListEv; ImGui::GetBackgroundDrawList(void)
mov [rbp+var_10], rax
lea rax, _ZN7globals5widthE; globals::width
mov eax, [rax]
lea rcx, _ZN7globals9gui_scaleE; globals::gui_scale
mov esi, [rcx]
xor edx, edx
mov [rbp+var_58], edx
div esi
mov edx, [rbp+var_58]
cvtsi2ss xmm0, rax
movss xmm1, cs:flt_36A004
mulss xmm0, xmm1
movss [rbp+var_14], xmm0
lea rax, _ZN7globals6heightE; globals::height
mov eax, [rax]
mov ecx, [rcx]
div ecx
cvtsi2ss xmm1, rax
movss xmm0, cs:flt_36A004
mulss xmm0, xmm1
movss [rbp+var_18], xmm0
movss xmm0, [rbp+var_14]
movss [rbp+var_54], xmm0
lea rdi, _ZL7texture; texture
call _ZNKSt19__shared_ptr_accessIK10TextureGUILN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<TextureGUI const,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
movss xmm0, [rbp+var_54]
cvtsi2ss xmm1, dword ptr [rax+8]
divss xmm0, xmm1
movss [rbp+var_4C], xmm0
movss xmm0, [rbp+var_18]
movss [rbp+var_50], xmm0
lea rdi, _ZL7texture; texture
call _ZNKSt19__shared_ptr_accessIK10TextureGUILN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<TextureGUI const,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
movss xmm1, [rbp+var_50]
movss xmm0, [rbp+var_4C]; float
cvtsi2ss xmm2, dword ptr [rax+0Ch]
divss xmm1, xmm2; float
lea rdi, [rbp+var_20]; this
call _ZN6ImVec2C2Eff; ImVec2::ImVec2(float,float)
mov rax, [rbp+var_10]
mov [rbp+var_48], rax
lea rdi, _ZL7texture; texture
call _ZNKSt19__shared_ptr_accessIK10TextureGUILN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<TextureGUI const,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rax, [rax]
mov [rbp+var_40], rax
lea rdi, [rbp+var_28]; this
xorps xmm1, xmm1; float
movaps xmm0, xmm1; float
call _ZN6ImVec2C2Eff; ImVec2::ImVec2(float,float)
mov rax, [rbp+var_8]
add rax, 10h
mov [rbp+var_38], rax
lea rdi, [rbp+var_30]; this
xorps xmm1, xmm1; float
movaps xmm0, xmm1; float
call _ZN6ImVec2C2Eff; ImVec2::ImVec2(float,float)
mov rdi, [rbp+var_48]; this
mov rsi, [rbp+var_40]; unsigned __int64
mov rcx, [rbp+var_38]; ImVec2 *
lea rdx, [rbp+var_28]; ImVec2 *
lea r8, [rbp+var_30]; ImVec2 *
lea r9, [rbp+var_20]; ImVec2 *
mov [rsp+60h+var_60], 0FFFFFFFFh; unsigned int
call _ZN10ImDrawList8AddImageEyRK6ImVec2S2_S2_S2_j; ImDrawList::AddImage(ulong long,ImVec2 const&,ImVec2 const&,ImVec2 const&,ImVec2 const&,uint)
add rsp, 60h
pop rbp
retn
| long long background::layout(background *this)
{
long long v1; // rsi
long long v2; // rdx
long long v3; // rax
long long v4; // rdx
float v6; // [rsp+14h] [rbp-4Ch]
ImDrawList *v7; // [rsp+18h] [rbp-48h]
unsigned long long v8; // [rsp+20h] [rbp-40h]
ImVec2 *v9; // [rsp+28h] [rbp-38h]
_BYTE v10[8]; // [rsp+30h] [rbp-30h] BYREF
_BYTE v11[8]; // [rsp+38h] [rbp-28h] BYREF
_BYTE v12[8]; // [rsp+40h] [rbp-20h] BYREF
float v13; // [rsp+48h] [rbp-18h]
float v14; // [rsp+4Ch] [rbp-14h]
long long BackgroundDrawList; // [rsp+50h] [rbp-10h]
long long MainViewport; // [rsp+58h] [rbp-8h]
MainViewport = ImGui::GetMainViewport(this);
BackgroundDrawList = ImGui::GetBackgroundDrawList(this);
v1 = globals::gui_scale;
v14 = (float)(int)(globals::width / globals::gui_scale) * 0.75;
v13 = 0.75 * (float)(int)(globals::height / globals::gui_scale);
v6 = v14
/ (float)*(int *)(std::__shared_ptr_access<TextureGUI const,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(
&texture,
globals::gui_scale,
globals::height % globals::gui_scale)
+ 8);
v3 = std::__shared_ptr_access<TextureGUI const,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(&texture, v1, v2);
ImVec2::ImVec2((ImVec2 *)v12, v6, v13 / (float)*(int *)(v3 + 12));
v7 = (ImDrawList *)BackgroundDrawList;
v8 = *(_QWORD *)std::__shared_ptr_access<TextureGUI const,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(
&texture,
v1,
v4);
ImVec2::ImVec2((ImVec2 *)v11, 0.0, 0.0);
v9 = (ImVec2 *)(MainViewport + 16);
ImVec2::ImVec2((ImVec2 *)v10, 0.0, 0.0);
return ImDrawList::AddImage(v7, v8, (const ImVec2 *)v11, v9, (const ImVec2 *)v10, (const ImVec2 *)v12, 0xFFFFFFFF);
}
| layout:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
CALL 0x00335ff0
MOV qword ptr [RBP + -0x8],RAX
CALL 0x0032c480
MOV qword ptr [RBP + -0x10],RAX
LEA RAX,[0x60e200]
MOV EAX,dword ptr [RAX]
LEA RCX,[0x60e270]
MOV ESI,dword ptr [RCX]
XOR EDX,EDX
MOV dword ptr [RBP + -0x58],EDX
DIV ESI
MOV EDX,dword ptr [RBP + -0x58]
CVTSI2SS XMM0,RAX
MOVSS XMM1,dword ptr [0x0046a004]
MULSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x14],XMM0
LEA RAX,[0x60e204]
MOV EAX,dword ptr [RAX]
MOV ECX,dword ptr [RCX]
DIV ECX
CVTSI2SS XMM1,RAX
MOVSS XMM0,dword ptr [0x0046a004]
MULSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x18],XMM0
MOVSS XMM0,dword ptr [RBP + -0x14]
MOVSS dword ptr [RBP + -0x54],XMM0
LEA RDI,[0x60d710]
CALL 0x001311c0
MOVSS XMM0,dword ptr [RBP + -0x54]
CVTSI2SS XMM1,dword ptr [RAX + 0x8]
DIVSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x4c],XMM0
MOVSS XMM0,dword ptr [RBP + -0x18]
MOVSS dword ptr [RBP + -0x50],XMM0
LEA RDI,[0x60d710]
CALL 0x001311c0
MOVSS XMM1,dword ptr [RBP + -0x50]
MOVSS XMM0,dword ptr [RBP + -0x4c]
CVTSI2SS XMM2,dword ptr [RAX + 0xc]
DIVSS XMM1,XMM2
LEA RDI,[RBP + -0x20]
CALL 0x001311e0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x48],RAX
LEA RDI,[0x60d710]
CALL 0x001311c0
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
LEA RDI,[RBP + -0x28]
XORPS XMM1,XMM1
MOVAPS XMM0,XMM1
CALL 0x001311e0
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x10
MOV qword ptr [RBP + -0x38],RAX
LEA RDI,[RBP + -0x30]
XORPS XMM1,XMM1
MOVAPS XMM0,XMM1
CALL 0x001311e0
MOV RDI,qword ptr [RBP + -0x48]
MOV RSI,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x38]
LEA RDX,[RBP + -0x28]
LEA R8,[RBP + -0x30]
LEA R9,[RBP + -0x20]
MOV dword ptr [RSP],0xffffffff
CALL 0x002cbf50
ADD RSP,0x60
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* background::layout() */
void background::layout(void)
{
int iVar1;
ulonglong uVar2;
float fVar3;
ImDrawList *this;
long lVar4;
ulonglong *puVar5;
ImVec2 *pIVar6;
float fVar7;
ImVec2 local_38 [8];
ImVec2 local_30 [8];
ImVec2 local_28 [8];
float local_20;
float local_1c;
ImDrawList *local_18;
long local_10;
local_10 = ImGui::GetMainViewport();
local_18 = (ImDrawList *)ImGui::GetBackgroundDrawList();
fVar7 = (float)((ulong)globals::width / (ulong)globals::gui_scale) * _DAT_0046a004;
local_20 = _DAT_0046a004 * (float)((ulong)globals::height / (ulong)globals::gui_scale);
local_1c = fVar7;
lVar4 = std::__shared_ptr_access<TextureGUI_const,(__gnu_cxx::_Lock_policy)2,false,false>::
operator->((__shared_ptr_access<TextureGUI_const,(__gnu_cxx::_Lock_policy)2,false,false> *
)texture);
fVar3 = local_20;
iVar1 = *(int *)(lVar4 + 8);
lVar4 = std::__shared_ptr_access<TextureGUI_const,(__gnu_cxx::_Lock_policy)2,false,false>::
operator->((__shared_ptr_access<TextureGUI_const,(__gnu_cxx::_Lock_policy)2,false,false> *
)texture);
ImVec2::ImVec2(local_28,fVar7 / (float)iVar1,fVar3 / (float)*(int *)(lVar4 + 0xc));
this = local_18;
puVar5 = (ulonglong *)
std::__shared_ptr_access<TextureGUI_const,(__gnu_cxx::_Lock_policy)2,false,false>::
operator->((__shared_ptr_access<TextureGUI_const,(__gnu_cxx::_Lock_policy)2,false,false>
*)texture);
uVar2 = *puVar5;
ImVec2::ImVec2(local_30,0.0,0.0);
pIVar6 = (ImVec2 *)(local_10 + 0x10);
ImVec2::ImVec2(local_38,0.0,0.0);
ImDrawList::AddImage(this,uVar2,local_30,pIVar6,local_38,local_28,0xffffffff);
return;
}
| |
33,540 | background::layout() | untodesu[P]voxelius/game/client/background.cc | void background::layout(void)
{
auto viewport = ImGui::GetMainViewport();
auto draw_list = ImGui::GetBackgroundDrawList();
auto scaled_width = 0.75f * static_cast<float>(globals::width / globals::gui_scale);
auto scaled_height = 0.75f * static_cast<float>(globals::height / globals::gui_scale);
auto scale_uv = ImVec2(scaled_width / static_cast<float>(texture->size.x), scaled_height / static_cast<float>(texture->size.y));
draw_list->AddImage(texture->handle, ImVec2(0.0f, 0.0f), viewport->Size, ImVec2(0.0f, 0.0f), scale_uv);
} | O2 | cpp | background::layout():
pushq %rbx
subq $0x20, %rsp
callq 0xf14bf
movq %rax, %rbx
callq 0xe8006
movq %rax, %rdi
leaq 0x22b474(%rip), %rax # 0x255028
movl (%rax), %eax
leaq 0x22b4db(%rip), %rcx # 0x255098
movl (%rcx), %ecx
xorl %edx, %edx
divl %ecx
cvtsi2ss %rax, %xmm0
movss 0x142434(%rip), %xmm1 # 0x16c004
leaq 0x22b455(%rip), %rax # 0x25502c
movl (%rax), %eax
xorl %edx, %edx
divl %ecx
cvtsi2ss %rax, %xmm2
movq 0x22a947(%rip), %rax # 0x254530
cvtsi2ssl 0x8(%rax), %xmm3
mulss %xmm1, %xmm0
cvtsi2ssl 0xc(%rax), %xmm4
mulss %xmm1, %xmm2
divss %xmm3, %xmm0
divss %xmm4, %xmm2
leaq 0x18(%rsp), %r9
movss %xmm0, (%r9)
movss %xmm2, 0x4(%r9)
movq (%rax), %rsi
leaq 0x10(%rsp), %rdx
andq $0x0, (%rdx)
addq $0x10, %rbx
leaq 0x8(%rsp), %r8
andq $0x0, (%r8)
orl $-0x1, (%rsp)
movq %rbx, %rcx
callq 0xb2512
addq $0x20, %rsp
popq %rbx
retq
| _ZN10background6layoutEv:
push rbx
sub rsp, 20h
call _ZN5ImGui15GetMainViewportEv; ImGui::GetMainViewport(void)
mov rbx, rax
call _ZN5ImGui21GetBackgroundDrawListEv; ImGui::GetBackgroundDrawList(void)
mov rdi, rax; this
lea rax, _ZN7globals5widthE; globals::width
mov eax, [rax]
lea rcx, _ZN7globals9gui_scaleE; globals::gui_scale
mov ecx, [rcx]
xor edx, edx
div ecx
cvtsi2ss xmm0, rax
movss xmm1, cs:dword_16C004
lea rax, _ZN7globals6heightE; globals::height
mov eax, [rax]
xor edx, edx
div ecx
cvtsi2ss xmm2, rax
mov rax, cs:_ZL7texture; texture
cvtsi2ss xmm3, dword ptr [rax+8]
mulss xmm0, xmm1
cvtsi2ss xmm4, dword ptr [rax+0Ch]
mulss xmm2, xmm1
divss xmm0, xmm3
divss xmm2, xmm4
lea r9, [rsp+28h+var_10]
movss dword ptr [r9], xmm0
movss dword ptr [r9+4], xmm2
mov rsi, [rax]
lea rdx, [rsp+28h+var_18]
and qword ptr [rdx], 0
add rbx, 10h
lea r8, [rsp+28h+var_20]
and qword ptr [r8], 0
or [rsp+28h+var_28], 0FFFFFFFFh
mov rcx, rbx
call _ZN10ImDrawList8AddImageEyRK6ImVec2S2_S2_S2_j; ImDrawList::AddImage(ulong long,ImVec2 const&,ImVec2 const&,ImVec2 const&,ImVec2 const&,uint)
add rsp, 20h
pop rbx
retn
| long long background::layout(background *this)
{
ImDrawList *BackgroundDrawList; // rax
ImGui::GetMainViewport(this);
BackgroundDrawList = (ImDrawList *)ImGui::GetBackgroundDrawList(this);
return ImDrawList::AddImage(BackgroundDrawList, -1);
}
| layout:
PUSH RBX
SUB RSP,0x20
CALL 0x001f14bf
MOV RBX,RAX
CALL 0x001e8006
MOV RDI,RAX
LEA RAX,[0x355028]
MOV EAX,dword ptr [RAX]
LEA RCX,[0x355098]
MOV ECX,dword ptr [RCX]
XOR EDX,EDX
DIV ECX
CVTSI2SS XMM0,RAX
MOVSS XMM1,dword ptr [0x0026c004]
LEA RAX,[0x35502c]
MOV EAX,dword ptr [RAX]
XOR EDX,EDX
DIV ECX
CVTSI2SS XMM2,RAX
MOV RAX,qword ptr [0x00354530]
CVTSI2SS XMM3,dword ptr [RAX + 0x8]
MULSS XMM0,XMM1
CVTSI2SS XMM4,dword ptr [RAX + 0xc]
MULSS XMM2,XMM1
DIVSS XMM0,XMM3
DIVSS XMM2,XMM4
LEA R9,[RSP + 0x18]
MOVSS dword ptr [R9],XMM0
MOVSS dword ptr [R9 + 0x4],XMM2
MOV RSI,qword ptr [RAX]
LEA RDX,[RSP + 0x10]
AND qword ptr [RDX],0x0
ADD RBX,0x10
LEA R8,[RSP + 0x8]
AND qword ptr [R8],0x0
OR dword ptr [RSP],0xffffffff
MOV RCX,RBX
CALL 0x001b2512
ADD RSP,0x20
POP RBX
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* background::layout() */
void background::layout(void)
{
long lVar1;
ImDrawList *this;
int8 local_20;
int8 local_18;
float local_10;
float local_c;
lVar1 = ImGui::GetMainViewport();
this = (ImDrawList *)ImGui::GetBackgroundDrawList();
local_10 = ((float)((ulong)globals::width / (ulong)globals::gui_scale) * _DAT_0026c004) /
(float)(int)texture[1];
local_c = ((float)((ulong)globals::height / (ulong)globals::gui_scale) * _DAT_0026c004) /
(float)*(int *)((long)texture + 0xc);
local_18 = 0;
local_20 = 0;
ImDrawList::AddImage
(this,*texture,(ImVec2 *)&local_18,(ImVec2 *)(lVar1 + 0x10),(ImVec2 *)&local_20,
(ImVec2 *)&local_10,0xffffffff);
return;
}
| |
33,541 | my_strnxfrm_tis620 | eloqsql/strings/ctype-tis620.c | static size_t
my_strnxfrm_tis620(CHARSET_INFO *cs,
uchar *dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags)
{
size_t len, dstlen0= dstlen;
len= MY_MIN(dstlen, srclen);
memcpy(dst, src, len);
len= thai2sortable(dst, len);
set_if_smaller(dstlen, nweights);
set_if_smaller(len, dstlen);
len= my_strxfrm_pad_desc_and_reverse(cs, dst, dst + len, dst + dstlen,
(uint)(dstlen - len), flags, 0);
if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len < dstlen0)
{
size_t fill_length= dstlen0 - len;
my_ci_fill(cs, (char*) dst + len, fill_length, cs->pad_char);
len= dstlen0;
}
return len;
} | O0 | c | my_strnxfrm_tis620:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x477ee
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x477f6
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 0x24220
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x478e0
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
cmpq %rcx, %rax
jbe 0x47833
movl -0x1c(%rbp), %eax
movq %rax, -0x18(%rbp)
jmp 0x47835
jmp 0x47837
movq -0x38(%rbp), %rax
cmpq -0x18(%rbp), %rax
jbe 0x47849
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x4784b
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 0x41ea0
movq %rax, -0x38(%rbp)
movl 0x10(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x478cf
movq -0x38(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x478cf
movq -0x40(%rbp), %rax
subq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq -0x38(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq -0x8(%rbp), %rax
movzbl 0xb0(%rax), %ecx
callq 0x47a80
movq -0x40(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
| my_strnxfrm_tis620:
push rbp
mov rbp, rsp
sub rsp, 60h
mov eax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+var_18]
mov [rbp+var_40], rax
mov rax, [rbp+var_18]
cmp rax, [rbp+var_30]
jnb short loc_477EE
mov rax, [rbp+var_18]
mov [rbp+var_50], rax
jmp short loc_477F6
loc_477EE:
mov rax, [rbp+var_30]
mov [rbp+var_50], rax
loc_477F6:
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_47833
mov eax, [rbp+var_1C]
mov [rbp+var_18], rax
loc_47833:
jmp short $+2
loc_47835:
jmp short $+2
loc_47837:
mov rax, [rbp+var_38]
cmp rax, [rbp+var_18]
jbe short loc_47849
mov rax, [rbp+var_18]
mov [rbp+var_38], rax
loc_47849:
jmp short $+2
loc_4784B:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_10]
add rdx, [rbp+var_38]
mov rcx, [rbp+var_10]
add rcx, [rbp+var_18]
mov rax, [rbp+var_18]
sub rax, [rbp+var_38]
mov r8d, eax
mov r9d, [rbp+arg_0]
xor eax, eax
mov [rsp+60h+var_60], 0
call my_strxfrm_pad_desc_and_reverse
mov [rbp+var_38], rax
mov eax, [rbp+arg_0]
and eax, 80h
cmp eax, 0
jz short loc_478CF
mov rax, [rbp+var_38]
cmp rax, [rbp+var_40]
jnb short loc_478CF
mov rax, [rbp+var_40]
sub rax, [rbp+var_38]
mov [rbp+var_48], rax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
add rsi, [rbp+var_38]
mov rdx, [rbp+var_48]
mov rax, [rbp+var_8]
movzx ecx, byte ptr [rax+0B0h]
call my_ci_fill_1
mov rax, [rbp+var_40]
mov [rbp+var_38], rax
loc_478CF:
mov rax, [rbp+var_38]
add rsp, 60h
pop rbp
retn
| unsigned long long my_strnxfrm_tis620(
long long a1,
long long a2,
unsigned long long a3,
unsigned int a4,
long long a5,
unsigned long long a6,
unsigned int a7)
{
unsigned long long v8; // [rsp+10h] [rbp-50h]
unsigned long long v10; // [rsp+28h] [rbp-38h]
unsigned long long v11; // [rsp+28h] [rbp-38h]
unsigned long long v13; // [rsp+48h] [rbp-18h]
v13 = a3;
if ( a3 >= a6 )
v8 = a6;
else
v8 = a3;
memcpy(a2, a5, v8);
v10 = thai2sortable(a2, v8);
if ( v13 > a4 )
v13 = a4;
if ( v10 > v13 )
v10 = v13;
v11 = my_strxfrm_pad_desc_and_reverse(a1, a2, v10 + a2, v13 + a2, (int)v13 - (int)v10, a7, 0);
if ( (a7 & 0x80) != 0 && v11 < a3 )
{
my_ci_fill_1(a1, v11 + a2, a3 - v11, *(unsigned __int8 *)(a1 + 176));
return a3;
}
return v11;
}
| my_strnxfrm_tis620:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV EAX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x30]
JNC 0x001477ee
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x001477f6
LAB_001477ee:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x50],RAX
LAB_001477f6:
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 0x00124220
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x001478e0
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x1c]
CMP RAX,RCX
JBE 0x00147833
MOV EAX,dword ptr [RBP + -0x1c]
MOV qword ptr [RBP + -0x18],RAX
LAB_00147833:
JMP 0x00147835
LAB_00147835:
JMP 0x00147837
LAB_00147837:
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x18]
JBE 0x00147849
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x38],RAX
LAB_00147849:
JMP 0x0014784b
LAB_0014784b:
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 0x00141ea0
MOV qword ptr [RBP + -0x38],RAX
MOV EAX,dword ptr [RBP + 0x10]
AND EAX,0x80
CMP EAX,0x0
JZ 0x001478cf
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x001478cf
MOV RAX,qword ptr [RBP + -0x40]
SUB RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RAX + 0xb0]
CALL 0x00147a80
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x38],RAX
LAB_001478cf:
MOV RAX,qword ptr [RBP + -0x38]
ADD RSP,0x60
POP RBP
RET
|
ulong my_strnxfrm_tis620(long param_1,void *param_2,ulong param_3,uint param_4,void *param_5,
ulong param_6,uint param_7)
{
size_t local_58;
ulong local_40;
ulong local_20;
local_58 = param_6;
if (param_3 < param_6) {
local_58 = param_3;
}
memcpy(param_2,param_5,local_58);
local_40 = thai2sortable(param_2,local_58);
local_20 = param_3;
if (param_4 < param_3) {
local_20 = (ulong)param_4;
}
if (local_20 < local_40) {
local_40 = local_20;
}
local_40 = my_strxfrm_pad_desc_and_reverse
(param_1,param_2,(long)param_2 + local_40,(long)param_2 + local_20,
(int)local_20 - (int)local_40,param_7,0);
if (((param_7 & 0x80) != 0) && (local_40 < param_3)) {
my_ci_fill(param_1,(long)param_2 + local_40,param_3 - local_40,*(int1 *)(param_1 + 0xb0));
local_40 = param_3;
}
return local_40;
}
| |
33,542 | extend_area_on_page | eloqsql/storage/maria/ma_blockrec.c | static my_bool extend_area_on_page(MARIA_HA *info,
uchar *buff, uchar *dir,
uint rownr,
uint request_length,
uint *empty_space, uint *ret_offset,
uint *ret_length,
my_bool head_page)
{
uint rec_offset, length, org_rec_length;
uint max_entry= (uint) buff[DIR_COUNT_OFFSET];
MARIA_SHARE *share= info->s;
uint block_size= share->block_size;
DBUG_ENTER("extend_area_on_page");
/*
We can't check for min length here as we may have called
extend_directory() to create a new (empty) entry just before
*/
check_directory(share, buff, block_size, 0, *empty_space);
rec_offset= uint2korr(dir);
if (rec_offset)
{
/* Extending old row; Mark current space as 'free' */
length= org_rec_length= uint2korr(dir + 2);
DBUG_PRINT("info", ("rec_offset: %u length: %u request_length: %u "
"empty_space: %u",
rec_offset, org_rec_length, request_length,
*empty_space));
*empty_space+= org_rec_length;
}
else
{
/* Reusing free directory entry; Free it from the directory list */
if (dir[2] == END_OF_DIR_FREE_LIST)
buff[DIR_FREE_OFFSET]= dir[3];
else
{
uchar *prev_dir= dir_entry_pos(buff, block_size, (uint) dir[2]);
DBUG_ASSERT(uint2korr(prev_dir) == 0 && prev_dir[3] == (uchar) rownr);
prev_dir[3]= dir[3];
}
if (dir[3] != END_OF_DIR_FREE_LIST)
{
uchar *next_dir= dir_entry_pos(buff, block_size, (uint) dir[3]);
DBUG_ASSERT(uint2korr(next_dir) == 0 && next_dir[2] == (uchar) rownr);
next_dir[2]= dir[2];
}
rec_offset= start_of_next_entry(dir);
length= 0;
}
if (length < request_length)
{
uint old_rec_offset;
/*
New data did not fit in old position.
Find first possible position where to put new data.
*/
old_rec_offset= rec_offset;
rec_offset= end_of_previous_entry(share,
dir, buff + block_size -
PAGE_SUFFIX_SIZE);
length+= (uint) (old_rec_offset - rec_offset);
DBUG_ASSERT(old_rec_offset);
/*
'length' is 0 if we are doing an insert into a not allocated block.
This can only happen during "REDO of INSERT" or "UNDO of DELETE."
*/
if (length < request_length)
{
/*
Did not fit in current block + empty space. Extend with
empty space after block.
*/
if (rownr == max_entry - 1)
{
/* Last entry; Everything is free between this and directory */
length= ((block_size - PAGE_SUFFIX_SIZE - DIR_ENTRY_SIZE * max_entry) -
rec_offset);
}
else
length= start_of_next_entry(dir) - rec_offset;
DBUG_ASSERT((int) length >= 0);
if (length < request_length)
{
/* Not enough continuous space, compact page to get more */
int2store(dir, rec_offset);
/* Reset length, as this may be a deleted block */
int2store(dir+2, 0);
_ma_compact_block_page(share,
buff, rownr, 1,
head_page ? info->trn->min_read_from: 0,
head_page ? share->base.min_block_length : 0);
rec_offset= uint2korr(dir);
length= uint2korr(dir+2);
if (length < request_length)
{
DBUG_PRINT("error", ("Not enough space: "
"length: %u request_length: %u",
length, request_length));
_ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD);
DBUG_RETURN(1); /* Error in block */
}
*empty_space= length; /* All space is here */
}
}
}
int2store(dir, rec_offset);
int2store(dir + 2, length);
*ret_offset= rec_offset;
*ret_length= length;
check_directory(share,
buff, block_size,
head_page ? share->base.min_block_length : 0,
*empty_space - length);
DBUG_RETURN(0);
} | O0 | c | extend_area_on_page:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movb 0x20(%rbp), %al
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl %r8d, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x18(%rbp), %rax
movzbl 0x8(%rax), %eax
movl %eax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movl 0x7bc(%rax), %eax
movl %eax, -0x4c(%rbp)
movq -0x20(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
je 0x79d70
movq -0x20(%rbp), %rax
movzwl 0x2(%rax), %eax
movl %eax, -0x3c(%rbp)
movl %eax, -0x38(%rbp)
jmp 0x79d60
movl -0x3c(%rbp), %ecx
movq -0x30(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
jmp 0x79e01
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %eax
cmpl $0xff, %eax
jne 0x79d8f
movq -0x20(%rbp), %rax
movb 0x3(%rax), %cl
movq -0x18(%rbp), %rax
movb %cl, 0x9(%rax)
jmp 0x79db7
movq -0x18(%rbp), %rdi
movl -0x4c(%rbp), %esi
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %edx
callq 0x749b0
movq %rax, -0x58(%rbp)
jmp 0x79da9
movq -0x20(%rbp), %rax
movb 0x3(%rax), %cl
movq -0x58(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x20(%rbp), %rax
movzbl 0x3(%rax), %eax
cmpl $0xff, %eax
je 0x79dee
movq -0x18(%rbp), %rdi
movl -0x4c(%rbp), %esi
movq -0x20(%rbp), %rax
movzbl 0x3(%rax), %edx
callq 0x749b0
movq %rax, -0x60(%rbp)
jmp 0x79de0
movq -0x20(%rbp), %rax
movb 0x2(%rax), %cl
movq -0x60(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x20(%rbp), %rdi
callq 0x7fbf0
movl %eax, -0x34(%rbp)
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x28(%rbp), %eax
jae 0x79fad
movl -0x34(%rbp), %eax
movl %eax, -0x64(%rbp)
movq -0x48(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x4c(%rbp), %eax
addq %rax, %rdx
addq $-0x4, %rdx
callq 0x7fb80
movl %eax, -0x34(%rbp)
movl -0x64(%rbp), %eax
subl -0x34(%rbp), %eax
addl -0x38(%rbp), %eax
movl %eax, -0x38(%rbp)
jmp 0x79e3f
movl -0x38(%rbp), %eax
cmpl -0x28(%rbp), %eax
jae 0x79fab
movl -0x24(%rbp), %eax
movl -0x40(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x79e6e
movl -0x4c(%rbp), %eax
subl $0x4, %eax
movl -0x40(%rbp), %ecx
shll $0x2, %ecx
subl %ecx, %eax
subl -0x34(%rbp), %eax
movl %eax, -0x38(%rbp)
jmp 0x79e7d
movq -0x20(%rbp), %rdi
callq 0x7fbf0
subl -0x34(%rbp), %eax
movl %eax, -0x38(%rbp)
jmp 0x79e7f
jmp 0x79e81
movl -0x38(%rbp), %eax
cmpl -0x28(%rbp), %eax
jae 0x79fa9
jmp 0x79e8f
movq -0x20(%rbp), %rax
movq %rax, -0x70(%rbp)
movl -0x34(%rbp), %eax
movw %ax, %cx
movq -0x70(%rbp), %rax
movw %cx, (%rax)
jmp 0x79ea6
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movw $0x0, (%rax)
movq -0x48(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x98(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x8c(%rbp)
movsbl 0x20(%rbp), %eax
cmpl $0x0, %eax
je 0x79efb
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x80(%rax), %rax
movq %rax, -0xa8(%rbp)
jmp 0x79f06
xorl %eax, %eax
movq %rax, -0xa8(%rbp)
jmp 0x79f06
movq -0xa8(%rbp), %rax
movq %rax, -0xb0(%rbp)
movsbl 0x20(%rbp), %eax
cmpl $0x0, %eax
je 0x79f31
movq -0x48(%rbp), %rax
movq 0x3b8(%rax), %rax
movq %rax, -0xb8(%rbp)
jmp 0x79f3c
xorl %eax, %eax
movq %rax, -0xb8(%rbp)
jmp 0x79f3c
movq -0xb0(%rbp), %r8
movl -0x8c(%rbp), %edx
movq -0x98(%rbp), %rsi
movq -0xa0(%rbp), %rdi
movq -0xb8(%rbp), %rax
movl %eax, %r9d
movl $0x1, %ecx
callq 0x74280
movq -0x20(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x20(%rbp), %rax
movzwl 0x2(%rax), %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x28(%rbp), %eax
jae 0x79fa0
jmp 0x79f8a
jmp 0x79f8c
movq -0x10(%rbp), %rdi
movl $0x7f, %esi
callq 0x33260
movb $0x1, -0x1(%rbp)
jmp 0x79ffb
movl -0x38(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
jmp 0x79fab
jmp 0x79fad
jmp 0x79faf
movq -0x20(%rbp), %rax
movq %rax, -0x80(%rbp)
movl -0x34(%rbp), %eax
movw %ax, %cx
movq -0x80(%rbp), %rax
movw %cx, (%rax)
jmp 0x79fc6
movq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x88(%rbp)
movl -0x38(%rbp), %eax
movw %ax, %cx
movq -0x88(%rbp), %rax
movw %cx, (%rax)
movl -0x34(%rbp), %ecx
movq 0x10(%rbp), %rax
movl %ecx, (%rax)
movl -0x38(%rbp), %ecx
movq 0x18(%rbp), %rax
movl %ecx, (%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0xc0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| extend_area_on_page:
push rbp
mov rbp, rsp
sub rsp, 0C0h
mov al, [rbp+arg_10]
mov rax, [rbp+arg_8]
mov rax, [rbp+arg_0]
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov [rbp+var_28], r8d
mov [rbp+var_30], r9
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+8]
mov [rbp+var_40], eax
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_48], rax
mov rax, [rbp+var_48]
mov eax, [rax+7BCh]
mov [rbp+var_4C], eax
mov rax, [rbp+var_20]
movzx eax, word ptr [rax]
mov [rbp+var_34], eax
cmp [rbp+var_34], 0
jz short loc_79D70
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+2]
mov [rbp+var_3C], eax
mov [rbp+var_38], eax
jmp short $+2
loc_79D60:
mov ecx, [rbp+var_3C]
mov rax, [rbp+var_30]
add ecx, [rax]
mov [rax], ecx
jmp loc_79E01
loc_79D70:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+2]
cmp eax, 0FFh
jnz short loc_79D8F
mov rax, [rbp+var_20]
mov cl, [rax+3]
mov rax, [rbp+var_18]
mov [rax+9], cl
jmp short loc_79DB7
loc_79D8F:
mov rdi, [rbp+var_18]
mov esi, [rbp+var_4C]
mov rax, [rbp+var_20]
movzx edx, byte ptr [rax+2]
call dir_entry_pos
mov [rbp+var_58], rax
jmp short $+2
loc_79DA9:
mov rax, [rbp+var_20]
mov cl, [rax+3]
mov rax, [rbp+var_58]
mov [rax+3], cl
loc_79DB7:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+3]
cmp eax, 0FFh
jz short loc_79DEE
mov rdi, [rbp+var_18]
mov esi, [rbp+var_4C]
mov rax, [rbp+var_20]
movzx edx, byte ptr [rax+3]
call dir_entry_pos
mov [rbp+var_60], rax
jmp short $+2
loc_79DE0:
mov rax, [rbp+var_20]
mov cl, [rax+2]
mov rax, [rbp+var_60]
mov [rax+2], cl
loc_79DEE:
mov rdi, [rbp+var_20]
call start_of_next_entry
mov [rbp+var_34], eax
mov [rbp+var_38], 0
loc_79E01:
mov eax, [rbp+var_38]
cmp eax, [rbp+var_28]
jnb loc_79FAD
mov eax, [rbp+var_34]
mov [rbp+var_64], eax
mov rdi, [rbp+var_48]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_18]
mov eax, [rbp+var_4C]
add rdx, rax
add rdx, 0FFFFFFFFFFFFFFFCh
call end_of_previous_entry
mov [rbp+var_34], eax
mov eax, [rbp+var_64]
sub eax, [rbp+var_34]
add eax, [rbp+var_38]
mov [rbp+var_38], eax
jmp short $+2
loc_79E3F:
mov eax, [rbp+var_38]
cmp eax, [rbp+var_28]
jnb loc_79FAB
mov eax, [rbp+var_24]
mov ecx, [rbp+var_40]
sub ecx, 1
cmp eax, ecx
jnz short loc_79E6E
mov eax, [rbp+var_4C]
sub eax, 4
mov ecx, [rbp+var_40]
shl ecx, 2
sub eax, ecx
sub eax, [rbp+var_34]
mov [rbp+var_38], eax
jmp short loc_79E7D
loc_79E6E:
mov rdi, [rbp+var_20]
call start_of_next_entry
sub eax, [rbp+var_34]
mov [rbp+var_38], eax
loc_79E7D:
jmp short $+2
loc_79E7F:
jmp short $+2
loc_79E81:
mov eax, [rbp+var_38]
cmp eax, [rbp+var_28]
jnb loc_79FA9
jmp short $+2
loc_79E8F:
mov rax, [rbp+var_20]
mov [rbp+var_70], rax
mov eax, [rbp+var_34]
mov cx, ax
mov rax, [rbp+var_70]
mov [rax], cx
jmp short $+2
loc_79EA6:
mov rax, [rbp+var_20]
add rax, 2
mov [rbp+var_78], rax
mov rax, [rbp+var_78]
mov word ptr [rax], 0
mov rax, [rbp+var_48]
mov [rbp+var_A0], rax
mov rax, [rbp+var_18]
mov [rbp+var_98], rax
mov eax, [rbp+var_24]
mov [rbp+var_8C], eax
movsx eax, [rbp+arg_10]
cmp eax, 0
jz short loc_79EFB
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rax, [rax+80h]
mov [rbp+var_A8], rax
jmp short loc_79F06
loc_79EFB:
xor eax, eax
mov [rbp+var_A8], rax
jmp short $+2
loc_79F06:
mov rax, [rbp+var_A8]
mov [rbp+var_B0], rax
movsx eax, [rbp+arg_10]
cmp eax, 0
jz short loc_79F31
mov rax, [rbp+var_48]
mov rax, [rax+3B8h]
mov [rbp+var_B8], rax
jmp short loc_79F3C
loc_79F31:
xor eax, eax
mov [rbp+var_B8], rax
jmp short $+2
loc_79F3C:
mov r8, [rbp+var_B0]
mov edx, [rbp+var_8C]
mov rsi, [rbp+var_98]
mov rdi, [rbp+var_A0]
mov rax, [rbp+var_B8]
mov r9d, eax
mov ecx, 1
call _ma_compact_block_page
mov rax, [rbp+var_20]
movzx eax, word ptr [rax]
mov [rbp+var_34], eax
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+2]
mov [rbp+var_38], eax
mov eax, [rbp+var_38]
cmp eax, [rbp+var_28]
jnb short loc_79FA0
jmp short $+2
loc_79F8A:
jmp short $+2
loc_79F8C:
mov rdi, [rbp+var_10]
mov esi, 7Fh
call _ma_set_fatal_error
mov [rbp+var_1], 1
jmp short loc_79FFB
loc_79FA0:
mov ecx, [rbp+var_38]
mov rax, [rbp+var_30]
mov [rax], ecx
loc_79FA9:
jmp short $+2
loc_79FAB:
jmp short $+2
loc_79FAD:
jmp short $+2
loc_79FAF:
mov rax, [rbp+var_20]
mov [rbp+var_80], rax
mov eax, [rbp+var_34]
mov cx, ax
mov rax, [rbp+var_80]
mov [rax], cx
jmp short $+2
loc_79FC6:
mov rax, [rbp+var_20]
add rax, 2
mov [rbp+var_88], rax
mov eax, [rbp+var_38]
mov cx, ax
mov rax, [rbp+var_88]
mov [rax], cx
mov ecx, [rbp+var_34]
mov rax, [rbp+arg_0]
mov [rax], ecx
mov ecx, [rbp+var_38]
mov rax, [rbp+arg_8]
mov [rax], ecx
mov [rbp+var_1], 0
loc_79FFB:
mov al, [rbp+var_1]
add rsp, 0C0h
pop rbp
retn
| char extend_area_on_page(
long long *a1,
long long a2,
unsigned __int16 *a3,
unsigned int a4,
unsigned int a5,
unsigned int *a6,
_DWORD *a7,
unsigned int *a8,
char a9)
{
long long v9; // rdx
long long v10; // rcx
long long v11; // r8
int v12; // r9d
unsigned long long v14; // [rsp+18h] [rbp-A8h]
int v15; // [rsp+5Ch] [rbp-64h]
unsigned int v16; // [rsp+74h] [rbp-4Ch]
long long v17; // [rsp+78h] [rbp-48h]
int v18; // [rsp+80h] [rbp-40h]
unsigned int v19; // [rsp+88h] [rbp-38h]
int entry; // [rsp+8Ch] [rbp-34h]
v18 = *(unsigned __int8 *)(a2 + 8);
v17 = *a1;
v16 = *(_DWORD *)(*a1 + 1980);
entry = *a3;
if ( *a3 )
{
v19 = a3[1];
*a6 += v19;
}
else
{
if ( *((unsigned __int8 *)a3 + 2) == 255 )
*(_BYTE *)(a2 + 9) = *((_BYTE *)a3 + 3);
else
*(_BYTE *)(dir_entry_pos(a2, v16, *((unsigned __int8 *)a3 + 2)) + 3) = *((_BYTE *)a3 + 3);
if ( *((unsigned __int8 *)a3 + 3) != 255 )
*(_BYTE *)(dir_entry_pos(a2, v16, *((unsigned __int8 *)a3 + 3)) + 2) = *((_BYTE *)a3 + 2);
entry = start_of_next_entry(a3);
v19 = 0;
}
if ( v19 >= a5 )
goto LABEL_24;
v15 = entry;
entry = end_of_previous_entry(v17, a3, v16 + a2 - 4);
v19 += v15 - entry;
if ( v19 >= a5 )
goto LABEL_24;
v19 = a4 == v18 - 1 ? v16 - 4 - 4 * v18 - entry : start_of_next_entry(a3) - entry;
if ( v19 >= a5 )
goto LABEL_24;
*a3 = entry;
a3[1] = 0;
if ( a9 )
v14 = *(_QWORD *)(a1[1] + 128);
else
v14 = 0LL;
if ( a9 )
ma_compact_block_page(v17, a2, a4, 1, v14, *(_QWORD *)(v17 + 952));
else
ma_compact_block_page(v17, a2, a4, 1, v14, 0);
entry = *a3;
v19 = a3[1];
if ( v19 >= a5 )
{
*a6 = v19;
LABEL_24:
*a3 = entry;
a3[1] = v19;
*a7 = entry;
*a8 = v19;
return 0;
}
ma_set_fatal_error(a1, 127, v9, v10, v11, v12);
return 1;
}
| extend_area_on_page:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc0
MOV AL,byte ptr [RBP + 0x20]
MOV RAX,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
MOV dword ptr [RBP + -0x28],R8D
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x40],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV EAX,dword ptr [RAX + 0x7bc]
MOV dword ptr [RBP + -0x4c],EAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX]
MOV dword ptr [RBP + -0x34],EAX
CMP dword ptr [RBP + -0x34],0x0
JZ 0x00179d70
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0x2]
MOV dword ptr [RBP + -0x3c],EAX
MOV dword ptr [RBP + -0x38],EAX
JMP 0x00179d60
LAB_00179d60:
MOV ECX,dword ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x30]
ADD ECX,dword ptr [RAX]
MOV dword ptr [RAX],ECX
JMP 0x00179e01
LAB_00179d70:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x2]
CMP EAX,0xff
JNZ 0x00179d8f
MOV RAX,qword ptr [RBP + -0x20]
MOV CL,byte ptr [RAX + 0x3]
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x9],CL
JMP 0x00179db7
LAB_00179d8f:
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EDX,byte ptr [RAX + 0x2]
CALL 0x001749b0
MOV qword ptr [RBP + -0x58],RAX
JMP 0x00179da9
LAB_00179da9:
MOV RAX,qword ptr [RBP + -0x20]
MOV CL,byte ptr [RAX + 0x3]
MOV RAX,qword ptr [RBP + -0x58]
MOV byte ptr [RAX + 0x3],CL
LAB_00179db7:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x3]
CMP EAX,0xff
JZ 0x00179dee
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EDX,byte ptr [RAX + 0x3]
CALL 0x001749b0
MOV qword ptr [RBP + -0x60],RAX
JMP 0x00179de0
LAB_00179de0:
MOV RAX,qword ptr [RBP + -0x20]
MOV CL,byte ptr [RAX + 0x2]
MOV RAX,qword ptr [RBP + -0x60]
MOV byte ptr [RAX + 0x2],CL
LAB_00179dee:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x0017fbf0
MOV dword ptr [RBP + -0x34],EAX
MOV dword ptr [RBP + -0x38],0x0
LAB_00179e01:
MOV EAX,dword ptr [RBP + -0x38]
CMP EAX,dword ptr [RBP + -0x28]
JNC 0x00179fad
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x64],EAX
MOV RDI,qword ptr [RBP + -0x48]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RBP + -0x4c]
ADD RDX,RAX
ADD RDX,-0x4
CALL 0x0017fb80
MOV dword ptr [RBP + -0x34],EAX
MOV EAX,dword ptr [RBP + -0x64]
SUB EAX,dword ptr [RBP + -0x34]
ADD EAX,dword ptr [RBP + -0x38]
MOV dword ptr [RBP + -0x38],EAX
JMP 0x00179e3f
LAB_00179e3f:
MOV EAX,dword ptr [RBP + -0x38]
CMP EAX,dword ptr [RBP + -0x28]
JNC 0x00179fab
MOV EAX,dword ptr [RBP + -0x24]
MOV ECX,dword ptr [RBP + -0x40]
SUB ECX,0x1
CMP EAX,ECX
JNZ 0x00179e6e
MOV EAX,dword ptr [RBP + -0x4c]
SUB EAX,0x4
MOV ECX,dword ptr [RBP + -0x40]
SHL ECX,0x2
SUB EAX,ECX
SUB EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x38],EAX
JMP 0x00179e7d
LAB_00179e6e:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x0017fbf0
SUB EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x38],EAX
LAB_00179e7d:
JMP 0x00179e7f
LAB_00179e7f:
JMP 0x00179e81
LAB_00179e81:
MOV EAX,dword ptr [RBP + -0x38]
CMP EAX,dword ptr [RBP + -0x28]
JNC 0x00179fa9
JMP 0x00179e8f
LAB_00179e8f:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x70],RAX
MOV EAX,dword ptr [RBP + -0x34]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x70]
MOV word ptr [RAX],CX
JMP 0x00179ea6
LAB_00179ea6:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x78]
MOV word ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0xa0],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x98],RAX
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x8c],EAX
MOVSX EAX,byte ptr [RBP + 0x20]
CMP EAX,0x0
JZ 0x00179efb
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x80]
MOV qword ptr [RBP + -0xa8],RAX
JMP 0x00179f06
LAB_00179efb:
XOR EAX,EAX
MOV qword ptr [RBP + -0xa8],RAX
JMP 0x00179f06
LAB_00179f06:
MOV RAX,qword ptr [RBP + -0xa8]
MOV qword ptr [RBP + -0xb0],RAX
MOVSX EAX,byte ptr [RBP + 0x20]
CMP EAX,0x0
JZ 0x00179f31
MOV RAX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RAX + 0x3b8]
MOV qword ptr [RBP + -0xb8],RAX
JMP 0x00179f3c
LAB_00179f31:
XOR EAX,EAX
MOV qword ptr [RBP + -0xb8],RAX
JMP 0x00179f3c
LAB_00179f3c:
MOV R8,qword ptr [RBP + -0xb0]
MOV EDX,dword ptr [RBP + -0x8c]
MOV RSI,qword ptr [RBP + -0x98]
MOV RDI,qword ptr [RBP + -0xa0]
MOV RAX,qword ptr [RBP + -0xb8]
MOV R9D,EAX
MOV ECX,0x1
CALL 0x00174280
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX]
MOV dword ptr [RBP + -0x34],EAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0x2]
MOV dword ptr [RBP + -0x38],EAX
MOV EAX,dword ptr [RBP + -0x38]
CMP EAX,dword ptr [RBP + -0x28]
JNC 0x00179fa0
JMP 0x00179f8a
LAB_00179f8a:
JMP 0x00179f8c
LAB_00179f8c:
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x7f
CALL 0x00133260
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00179ffb
LAB_00179fa0:
MOV ECX,dword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX],ECX
LAB_00179fa9:
JMP 0x00179fab
LAB_00179fab:
JMP 0x00179fad
LAB_00179fad:
JMP 0x00179faf
LAB_00179faf:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x80],RAX
MOV EAX,dword ptr [RBP + -0x34]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x80]
MOV word ptr [RAX],CX
JMP 0x00179fc6
LAB_00179fc6:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
MOV qword ptr [RBP + -0x88],RAX
MOV EAX,dword ptr [RBP + -0x38]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x88]
MOV word ptr [RAX],CX
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + 0x10]
MOV dword ptr [RAX],ECX
MOV ECX,dword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + 0x18]
MOV dword ptr [RAX],ECX
MOV byte ptr [RBP + -0x1],0x0
LAB_00179ffb:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0xc0
POP RBP
RET
|
int1
extend_area_on_page(long *param_1,long param_2,ushort *param_3,int param_4,uint param_5,
uint *param_6,uint *param_7,uint *param_8,char param_9)
{
byte bVar1;
uint uVar2;
long lVar3;
uint uVar4;
int iVar5;
long lVar6;
ulong local_c0;
int8 local_b0;
uint local_40;
uint local_3c;
bVar1 = *(byte *)(param_2 + 8);
lVar3 = *param_1;
uVar2 = *(uint *)(lVar3 + 0x7bc);
local_3c = (uint)*param_3;
if (local_3c == 0) {
if ((char)param_3[1] == -1) {
*(int1 *)(param_2 + 9) = *(int1 *)((long)param_3 + 3);
}
else {
lVar6 = dir_entry_pos(param_2,uVar2,(char)param_3[1]);
*(int1 *)(lVar6 + 3) = *(int1 *)((long)param_3 + 3);
}
if (*(char *)((long)param_3 + 3) != -1) {
lVar6 = dir_entry_pos(param_2,uVar2,*(int1 *)((long)param_3 + 3));
*(char *)(lVar6 + 2) = (char)param_3[1];
}
local_3c = start_of_next_entry(param_3);
local_40 = 0;
}
else {
local_40 = (uint)param_3[1];
*param_6 = local_40 + *param_6;
}
if (local_40 < param_5) {
uVar4 = end_of_previous_entry(lVar3,param_3,param_2 + (ulong)uVar2 + -4);
local_40 = (local_3c - uVar4) + local_40;
local_3c = uVar4;
if (local_40 < param_5) {
if (param_4 == bVar1 - 1) {
local_40 = ((uVar2 - 4) + (uint)bVar1 * -4) - uVar4;
}
else {
iVar5 = start_of_next_entry(param_3);
local_40 = iVar5 - uVar4;
}
if (local_40 < param_5) {
*param_3 = (ushort)uVar4;
param_3[1] = 0;
if (param_9 == '\0') {
local_b0 = 0;
local_c0 = 0;
}
else {
local_b0 = *(int8 *)(param_1[1] + 0x80);
local_c0 = *(ulong *)(lVar3 + 0x3b8);
}
_ma_compact_block_page(lVar3,param_2,param_4,1,local_b0,local_c0 & 0xffffffff);
local_3c = (uint)*param_3;
local_40 = (uint)param_3[1];
if (local_40 < param_5) {
_ma_set_fatal_error(param_1,0x7f);
return 1;
}
*param_6 = local_40;
}
}
}
*param_3 = (ushort)local_3c;
param_3[1] = (ushort)local_40;
*param_7 = local_3c;
*param_8 = local_40;
return 0;
}
| |
33,543 | ggml_compute_forward_silu_back_f32(ggml_compute_params const*, ggml_tensor*) | ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp | static void ggml_compute_forward_silu_back_f32(
const ggml_compute_params * params,
ggml_tensor * dst) {
const ggml_tensor * grad = dst->src[0];
const ggml_tensor * src1 = dst->src[1];
assert(ggml_is_contiguous_1(grad));
assert(ggml_is_contiguous_1(src1));
assert(ggml_is_contiguous_1(dst));
assert(ggml_are_same_shape(src1, dst));
assert(ggml_are_same_shape(src1, grad));
const int ith = params->ith;
const int nth = params->nth;
const int nc = src1->ne[0];
const int nr = ggml_nrows(src1);
// rows per thread
const int dr = (nr + nth - 1)/nth;
// row range for this thread
const int ir0 = dr*ith;
const int ir1 = MIN(ir0 + dr, nr);
for (int i1 = ir0; i1 < ir1; i1++) {
ggml_vec_silu_backward_f32(nc,
(float *) ((char *) dst->data + i1*( dst->nb[1])),
(float *) ((char *) src1->data + i1*(src1->nb[1])),
(float *) ((char *) grad->data + i1*(grad->nb[1])));
#ifndef NDEBUG
for (int k = 0; k < nc; k++) {
const float x = ((float *) ((char *) dst->data + i1*( dst->nb[1])))[k];
GGML_UNUSED(x);
assert(!isnan(x));
assert(!isinf(x));
}
#endif
}
} | O0 | cpp | ggml_compute_forward_silu_back_f32(ggml_compute_params const*, ggml_tensor*):
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq 0x98(%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x38(%rsp), %rax
movq 0xa0(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x40(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x24(%rsp)
movq 0x40(%rsp), %rax
movl 0x4(%rax), %eax
movl %eax, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rax
movl %eax, 0x1c(%rsp)
movq 0x28(%rsp), %rdi
callq 0xfee0
movl %eax, 0x18(%rsp)
movl 0x18(%rsp), %eax
addl 0x20(%rsp), %eax
subl $0x1, %eax
cltd
idivl 0x20(%rsp)
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %eax
imull 0x24(%rsp), %eax
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %eax
addl 0x14(%rsp), %eax
cmpl 0x18(%rsp), %eax
jge 0x8ed9f
movl 0x10(%rsp), %eax
addl 0x14(%rsp), %eax
movl %eax, 0x4(%rsp)
jmp 0x8eda7
movl 0x18(%rsp), %eax
movl %eax, 0x4(%rsp)
movl 0x4(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0x10(%rsp), %eax
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %eax
cmpl 0xc(%rsp), %eax
jge 0x8ee31
movl 0x1c(%rsp), %edi
movq 0x38(%rsp), %rax
movq 0xf8(%rax), %rsi
movslq 0x8(%rsp), %rax
movq 0x38(%rsp), %rcx
imulq 0x38(%rcx), %rax
addq %rax, %rsi
movq 0x28(%rsp), %rax
movq 0xf8(%rax), %rdx
movslq 0x8(%rsp), %rax
movq 0x28(%rsp), %rcx
imulq 0x38(%rcx), %rax
addq %rax, %rdx
movq 0x30(%rsp), %rax
movq 0xf8(%rax), %rcx
movslq 0x8(%rsp), %rax
movq 0x30(%rsp), %r8
imulq 0x38(%r8), %rax
addq %rax, %rcx
callq 0xa8170
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x8edb7
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZL34ggml_compute_forward_silu_back_f32PK19ggml_compute_paramsP11ggml_tensor:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_10], rsi
mov rax, [rsp+48h+var_10]
mov rax, [rax+98h]
mov [rsp+48h+var_18], rax
mov rax, [rsp+48h+var_10]
mov rax, [rax+0A0h]
mov [rsp+48h+var_20], rax
mov rax, [rsp+48h+var_8]
mov eax, [rax]
mov [rsp+48h+var_24], eax
mov rax, [rsp+48h+var_8]
mov eax, [rax+4]
mov [rsp+48h+var_28], eax
mov rax, [rsp+48h+var_20]
mov rax, [rax+10h]
mov [rsp+48h+var_2C], eax
mov rdi, [rsp+48h+var_20]
call _ggml_nrows
mov [rsp+48h+var_30], eax
mov eax, [rsp+48h+var_30]
add eax, [rsp+48h+var_28]
sub eax, 1
cdq
idiv [rsp+48h+var_28]
mov [rsp+48h+var_34], eax
mov eax, [rsp+48h+var_34]
imul eax, [rsp+48h+var_24]
mov [rsp+48h+var_38], eax
mov eax, [rsp+48h+var_38]
add eax, [rsp+48h+var_34]
cmp eax, [rsp+48h+var_30]
jge short loc_8ED9F
mov eax, [rsp+48h+var_38]
add eax, [rsp+48h+var_34]
mov [rsp+48h+var_44], eax
jmp short loc_8EDA7
loc_8ED9F:
mov eax, [rsp+48h+var_30]
mov [rsp+48h+var_44], eax
loc_8EDA7:
mov eax, [rsp+48h+var_44]
mov [rsp+48h+var_3C], eax
mov eax, [rsp+48h+var_38]
mov [rsp+48h+var_40], eax
loc_8EDB7:
mov eax, [rsp+48h+var_40]
cmp eax, [rsp+48h+var_3C]
jge short loc_8EE31
mov edi, [rsp+48h+var_2C]; int
mov rax, [rsp+48h+var_10]
mov rsi, [rax+0F8h]
movsxd rax, [rsp+48h+var_40]
mov rcx, [rsp+48h+var_10]
imul rax, [rcx+38h]
add rsi, rax; float *
mov rax, [rsp+48h+var_20]
mov rdx, [rax+0F8h]
movsxd rax, [rsp+48h+var_40]
mov rcx, [rsp+48h+var_20]
imul rax, [rcx+38h]
add rdx, rax; float *
mov rax, [rsp+48h+var_18]
mov rcx, [rax+0F8h]
movsxd rax, [rsp+48h+var_40]
mov r8, [rsp+48h+var_18]
imul rax, [r8+38h]
add rcx, rax; float *
call _ZL26ggml_vec_silu_backward_f32iPfPKfS1_; ggml_vec_silu_backward_f32(int,float *,float const*,float const*)
mov eax, [rsp+48h+var_40]
add eax, 1
mov [rsp+48h+var_40], eax
jmp short loc_8EDB7
loc_8EE31:
add rsp, 48h
retn
| long long ggml_compute_forward_silu_back_f32(int *a1, _QWORD *a2)
{
long long result; // rax
int v3; // [rsp+4h] [rbp-44h]
int i; // [rsp+8h] [rbp-40h]
int v5; // [rsp+14h] [rbp-34h]
int v6; // [rsp+18h] [rbp-30h]
int v7; // [rsp+1Ch] [rbp-2Ch]
int v8; // [rsp+20h] [rbp-28h]
int v9; // [rsp+24h] [rbp-24h]
_QWORD *v10; // [rsp+28h] [rbp-20h]
long long v11; // [rsp+30h] [rbp-18h]
v11 = a2[19];
v10 = (_QWORD *)a2[20];
v9 = *a1;
v8 = a1[1];
v7 = v10[2];
v6 = ggml_nrows(v10);
v5 = (v8 + v6 - 1) / v8;
if ( v5 + v9 * v5 >= v6 )
v3 = v6;
else
v3 = v5 + v9 * v5;
for ( i = v9 * v5; ; ++i )
{
result = (unsigned int)i;
if ( i >= v3 )
break;
ggml_vec_silu_backward_f32(
v7,
(float *)(a2[7] * i + a2[31]),
(const float *)(v10[7] * i + v10[31]),
(const float *)(*(_QWORD *)(v11 + 56) * i + *(_QWORD *)(v11 + 248)));
}
return result;
}
| ggml_compute_forward_silu_back_f32:
SUB RSP,0x48
MOV qword ptr [RSP + 0x40],RDI
MOV qword ptr [RSP + 0x38],RSI
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0x98]
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0xa0]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x40]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x24],EAX
MOV RAX,qword ptr [RSP + 0x40]
MOV EAX,dword ptr [RAX + 0x4]
MOV dword ptr [RSP + 0x20],EAX
MOV RAX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX + 0x10]
MOV dword ptr [RSP + 0x1c],EAX
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x0010fee0
MOV dword ptr [RSP + 0x18],EAX
MOV EAX,dword ptr [RSP + 0x18]
ADD EAX,dword ptr [RSP + 0x20]
SUB EAX,0x1
CDQ
IDIV dword ptr [RSP + 0x20]
MOV dword ptr [RSP + 0x14],EAX
MOV EAX,dword ptr [RSP + 0x14]
IMUL EAX,dword ptr [RSP + 0x24]
MOV dword ptr [RSP + 0x10],EAX
MOV EAX,dword ptr [RSP + 0x10]
ADD EAX,dword ptr [RSP + 0x14]
CMP EAX,dword ptr [RSP + 0x18]
JGE 0x0018ed9f
MOV EAX,dword ptr [RSP + 0x10]
ADD EAX,dword ptr [RSP + 0x14]
MOV dword ptr [RSP + 0x4],EAX
JMP 0x0018eda7
LAB_0018ed9f:
MOV EAX,dword ptr [RSP + 0x18]
MOV dword ptr [RSP + 0x4],EAX
LAB_0018eda7:
MOV EAX,dword ptr [RSP + 0x4]
MOV dword ptr [RSP + 0xc],EAX
MOV EAX,dword ptr [RSP + 0x10]
MOV dword ptr [RSP + 0x8],EAX
LAB_0018edb7:
MOV EAX,dword ptr [RSP + 0x8]
CMP EAX,dword ptr [RSP + 0xc]
JGE 0x0018ee31
MOV EDI,dword ptr [RSP + 0x1c]
MOV RAX,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RAX + 0xf8]
MOVSXD RAX,dword ptr [RSP + 0x8]
MOV RCX,qword ptr [RSP + 0x38]
IMUL RAX,qword ptr [RCX + 0x38]
ADD RSI,RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RAX + 0xf8]
MOVSXD RAX,dword ptr [RSP + 0x8]
MOV RCX,qword ptr [RSP + 0x28]
IMUL RAX,qword ptr [RCX + 0x38]
ADD RDX,RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV RCX,qword ptr [RAX + 0xf8]
MOVSXD RAX,dword ptr [RSP + 0x8]
MOV R8,qword ptr [RSP + 0x30]
IMUL RAX,qword ptr [R8 + 0x38]
ADD RCX,RAX
CALL 0x001a8170
MOV EAX,dword ptr [RSP + 0x8]
ADD EAX,0x1
MOV dword ptr [RSP + 0x8],EAX
JMP 0x0018edb7
LAB_0018ee31:
ADD RSP,0x48
RET
|
/* ggml_compute_forward_silu_back_f32(ggml_compute_params const*, ggml_tensor*) */
void ggml_compute_forward_silu_back_f32(ggml_compute_params *param_1,ggml_tensor *param_2)
{
long lVar1;
long lVar2;
int8 uVar3;
int iVar4;
int local_44;
int local_40;
lVar1 = *(long *)(param_2 + 0x98);
lVar2 = *(long *)(param_2 + 0xa0);
local_40 = *(int *)param_1;
iVar4 = *(int *)(param_1 + 4);
uVar3 = *(int8 *)(lVar2 + 0x10);
local_44 = ggml_nrows(lVar2);
iVar4 = (local_44 + iVar4 + -1) / iVar4;
local_40 = iVar4 * local_40;
if (local_40 + iVar4 < local_44) {
local_44 = local_40 + iVar4;
}
for (; local_40 < local_44; local_40 = local_40 + 1) {
ggml_vec_silu_backward_f32
((int)uVar3,
(float *)(*(long *)(param_2 + 0xf8) + (long)local_40 * *(long *)(param_2 + 0x38)),
(float *)(*(long *)(lVar2 + 0xf8) + (long)local_40 * *(long *)(lVar2 + 0x38)),
(float *)(*(long *)(lVar1 + 0xf8) + (long)local_40 * *(long *)(lVar1 + 0x38)));
}
return;
}
| |
33,544 | my_strnncollsp_8bit_bin | eloqsql/strings/ctype-bin.c | static int my_strnncollsp_8bit_bin(CHARSET_INFO * cs __attribute__((unused)),
const uchar *a, size_t a_length,
const uchar *b, size_t b_length)
{
const uchar *end;
size_t length;
end= a + (length= MY_MIN(a_length, b_length));
while (a < end)
{
if (*a++ != *b++)
return ((int) a[-1] - (int) b[-1]);
}
return a_length == b_length ? 0 :
a_length < b_length ?
-my_strnncollsp_padspace_bin(b, b_length - length) :
my_strnncollsp_padspace_bin(a, a_length - length);
} | O0 | c | my_strnncollsp_8bit_bin:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x119818
movq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x119820
movq -0x30(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movq -0x50(%rbp), %rcx
movq %rcx, -0x40(%rbp)
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x11987e
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movzbl (%rax), %eax
movq -0x28(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movzbl (%rcx), %ecx
cmpl %ecx, %eax
je 0x11987c
movq -0x18(%rbp), %rax
movzbl -0x1(%rax), %eax
movq -0x28(%rbp), %rcx
movzbl -0x1(%rcx), %ecx
subl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x1198d5
jmp 0x119833
movq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
jne 0x11988f
xorl %eax, %eax
movl %eax, -0x54(%rbp)
jmp 0x1198cf
movq -0x20(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x1198b5
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
subq -0x40(%rbp), %rsi
callq 0x119040
movl %eax, %ecx
xorl %eax, %eax
subl %ecx, %eax
movl %eax, -0x58(%rbp)
jmp 0x1198c9
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
subq -0x40(%rbp), %rsi
callq 0x119040
movl %eax, -0x58(%rbp)
movl -0x58(%rbp), %eax
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nop
| my_strnncollsp_8bit_bin:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov rax, [rbp+var_18]
mov [rbp+var_48], rax
mov rax, [rbp+var_20]
cmp rax, [rbp+var_30]
jnb short loc_119818
mov rax, [rbp+var_20]
mov [rbp+var_50], rax
jmp short loc_119820
loc_119818:
mov rax, [rbp+var_30]
mov [rbp+var_50], rax
loc_119820:
mov rax, [rbp+var_48]
mov rcx, [rbp+var_50]
mov [rbp+var_40], rcx
add rax, rcx
mov [rbp+var_38], rax
loc_119833:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_38]
jnb short loc_11987E
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 1
mov [rbp+var_18], rcx
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_28]
mov rdx, rcx
add rdx, 1
mov [rbp+var_28], rdx
movzx ecx, byte ptr [rcx]
cmp eax, ecx
jz short loc_11987C
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax-1]
mov rcx, [rbp+var_28]
movzx ecx, byte ptr [rcx-1]
sub eax, ecx
mov [rbp+var_4], eax
jmp short loc_1198D5
loc_11987C:
jmp short loc_119833
loc_11987E:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_30]
jnz short loc_11988F
xor eax, eax
mov [rbp+var_54], eax
jmp short loc_1198CF
loc_11988F:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_30]
jnb short loc_1198B5
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_30]
sub rsi, [rbp+var_40]
call my_strnncollsp_padspace_bin
mov ecx, eax
xor eax, eax
sub eax, ecx
mov [rbp+var_58], eax
jmp short loc_1198C9
loc_1198B5:
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
sub rsi, [rbp+var_40]
call my_strnncollsp_padspace_bin
mov [rbp+var_58], eax
loc_1198C9:
mov eax, [rbp+var_58]
mov [rbp+var_54], eax
loc_1198CF:
mov eax, [rbp+var_54]
mov [rbp+var_4], eax
loc_1198D5:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
| long long my_strnncollsp_8bit_bin(
long long a1,
unsigned __int8 *a2,
unsigned long long a3,
unsigned __int8 *a4,
unsigned long long a5)
{
unsigned __int8 *v5; // rax
unsigned __int8 *v6; // rcx
unsigned long long v10; // [rsp+10h] [rbp-50h]
unsigned __int8 *v12; // [rsp+48h] [rbp-18h]
v12 = a2;
if ( a3 >= a5 )
v10 = a5;
else
v10 = a3;
while ( v12 < &a2[v10] )
{
v5 = v12++;
v6 = a4++;
if ( *v5 != *v6 )
return (unsigned int)(*(v12 - 1) - *(a4 - 1));
}
if ( a3 == a5 )
{
return 0;
}
else if ( a3 >= a5 )
{
return (unsigned int)my_strnncollsp_padspace_bin(v12, a3 - v10);
}
else
{
return (unsigned int)-(int)my_strnncollsp_padspace_bin(a4, a5 - v10);
}
}
| |||
33,545 | my_strnncollsp_8bit_bin | eloqsql/strings/ctype-bin.c | static int my_strnncollsp_8bit_bin(CHARSET_INFO * cs __attribute__((unused)),
const uchar *a, size_t a_length,
const uchar *b, size_t b_length)
{
const uchar *end;
size_t length;
end= a + (length= MY_MIN(a_length, b_length));
while (a < end)
{
if (*a++ != *b++)
return ((int) a[-1] - (int) b[-1]);
}
return a_length == b_length ? 0 :
a_length < b_length ?
-my_strnncollsp_padspace_bin(b, b_length - length) :
my_strnncollsp_padspace_bin(a, a_length - length);
} | O3 | c | my_strnncollsp_8bit_bin:
pushq %rbp
movq %rsp, %rbp
cmpq %r8, %rdx
movq %r8, %rdi
cmovbq %rdx, %rdi
leaq (%rsi,%rdi), %r9
cmpq %r9, %rsi
jae 0xb52d9
movzbl (%rsi), %eax
incq %rsi
movzbl (%rcx), %r10d
incq %rcx
cmpb %r10b, %al
je 0xb52bd
subl %r10d, %eax
jmp 0xb52e0
xorl %eax, %eax
cmpq %r8, %rdx
jne 0xb52e2
popq %rbp
retq
jae 0xb52ff
subq %rdi, %r8
je 0xb52e0
xorl %edx, %edx
xorl %eax, %eax
cmpb $0x20, (%rcx,%rdx)
jb 0xb531a
jne 0xb5321
incq %rdx
cmpq %rdx, %r8
jne 0xb52ed
jmp 0xb52e0
subq %rdi, %rdx
je 0xb52e0
xorl %ecx, %ecx
xorl %eax, %eax
cmpb $0x20, (%rsi,%rcx)
jb 0xb5321
jne 0xb531a
incq %rcx
cmpq %rcx, %rdx
jne 0xb5308
jmp 0xb52e0
movl $0x1, %eax
jmp 0xb52e0
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0xb52e0
| my_strnncollsp_8bit_bin:
push rbp
mov rbp, rsp
cmp rdx, r8
mov rdi, r8
cmovb rdi, rdx
lea r9, [rsi+rdi]
loc_B52BD:
cmp rsi, r9
jnb short loc_B52D9
movzx eax, byte ptr [rsi]
inc rsi
movzx r10d, byte ptr [rcx]
inc rcx
cmp al, r10b
jz short loc_B52BD
sub eax, r10d
jmp short loc_B52E0
loc_B52D9:
xor eax, eax
cmp rdx, r8
jnz short loc_B52E2
loc_B52E0:
pop rbp
retn
loc_B52E2:
jnb short loc_B52FF
sub r8, rdi
jz short loc_B52E0
xor edx, edx
xor eax, eax
loc_B52ED:
cmp byte ptr [rcx+rdx], 20h ; ' '
jb short loc_B531A
jnz short loc_B5321
inc rdx
cmp r8, rdx
jnz short loc_B52ED
jmp short loc_B52E0
loc_B52FF:
sub rdx, rdi
jz short loc_B52E0
xor ecx, ecx
xor eax, eax
loc_B5308:
cmp byte ptr [rsi+rcx], 20h ; ' '
jb short loc_B5321
jnz short loc_B531A
inc rcx
cmp rdx, rcx
jnz short loc_B5308
jmp short loc_B52E0
loc_B531A:
mov eax, 1
jmp short loc_B52E0
loc_B5321:
mov eax, 0FFFFFFFFh
jmp short loc_B52E0
| long long my_strnncollsp_8bit_bin(
long long a1,
unsigned __int8 *a2,
unsigned long long a3,
unsigned __int8 *a4,
unsigned long long a5)
{
unsigned long long v5; // rdi
unsigned __int8 *v6; // r9
int v7; // eax
int v8; // r10d
long long result; // rax
unsigned long long v10; // r8
long long v11; // rdx
unsigned long long v12; // rdx
long long v13; // rcx
v5 = a5;
if ( a3 < a5 )
v5 = a3;
v6 = &a2[v5];
while ( a2 < v6 )
{
v7 = *a2++;
v8 = *a4++;
if ( (_BYTE)v7 != (_BYTE)v8 )
return (unsigned int)(v7 - v8);
}
result = 0LL;
if ( a3 != a5 )
{
if ( a3 >= a5 )
{
v12 = a3 - v5;
if ( v12 )
{
v13 = 0LL;
result = 0LL;
while ( a2[v13] >= 0x20u )
{
if ( a2[v13] != 32 )
return 1LL;
if ( v12 == ++v13 )
return result;
}
return 0xFFFFFFFFLL;
}
}
else
{
v10 = a5 - v5;
if ( v10 )
{
v11 = 0LL;
result = 0LL;
while ( a4[v11] >= 0x20u )
{
if ( a4[v11] != 32 )
return 0xFFFFFFFFLL;
if ( v10 == ++v11 )
return result;
}
return 1LL;
}
}
}
return result;
}
| my_strnncollsp_8bit_bin:
PUSH RBP
MOV RBP,RSP
CMP RDX,R8
MOV RDI,R8
CMOVC RDI,RDX
LEA R9,[RSI + RDI*0x1]
LAB_001b52bd:
CMP RSI,R9
JNC 0x001b52d9
MOVZX EAX,byte ptr [RSI]
INC RSI
MOVZX R10D,byte ptr [RCX]
INC RCX
CMP AL,R10B
JZ 0x001b52bd
SUB EAX,R10D
JMP 0x001b52e0
LAB_001b52d9:
XOR EAX,EAX
CMP RDX,R8
JNZ 0x001b52e2
LAB_001b52e0:
POP RBP
RET
LAB_001b52e2:
JNC 0x001b52ff
SUB R8,RDI
JZ 0x001b52e0
XOR EDX,EDX
XOR EAX,EAX
LAB_001b52ed:
CMP byte ptr [RCX + RDX*0x1],0x20
JC 0x001b531a
JNZ 0x001b5321
INC RDX
CMP R8,RDX
JNZ 0x001b52ed
JMP 0x001b52e0
LAB_001b52ff:
SUB RDX,RDI
JZ 0x001b52e0
XOR ECX,ECX
XOR EAX,EAX
LAB_001b5308:
CMP byte ptr [RSI + RCX*0x1],0x20
JC 0x001b5321
JNZ 0x001b531a
INC RCX
CMP RDX,RCX
JNZ 0x001b5308
JMP 0x001b52e0
LAB_001b531a:
MOV EAX,0x1
JMP 0x001b52e0
LAB_001b5321:
MOV EAX,0xffffffff
JMP 0x001b52e0
|
int my_strnncollsp_8bit_bin
(int8 param_1,byte *param_2,ulong param_3,byte *param_4,ulong param_5)
{
byte *pbVar1;
byte bVar2;
byte bVar3;
long lVar4;
ulong uVar5;
uVar5 = param_5;
if (param_3 < param_5) {
uVar5 = param_3;
}
pbVar1 = param_2 + uVar5;
while (param_2 < pbVar1) {
bVar2 = *param_2;
param_2 = param_2 + 1;
bVar3 = *param_4;
param_4 = param_4 + 1;
if (bVar2 != bVar3) {
return (uint)bVar2 - (uint)bVar3;
}
}
if (param_3 == param_5) {
return 0;
}
if (param_3 < param_5) {
if (param_5 == uVar5) {
return 0;
}
lVar4 = 0;
while( true ) {
if (param_4[lVar4] < 0x20) {
return 1;
}
if (param_4[lVar4] != 0x20) break;
lVar4 = lVar4 + 1;
if (param_5 - uVar5 == lVar4) {
return 0;
}
}
return -1;
}
if (param_3 != uVar5) {
lVar4 = 0;
while( true ) {
if (param_2[lVar4] < 0x20) {
return -1;
}
if (param_2[lVar4] != 0x20) break;
lVar4 = lVar4 + 1;
if (param_3 - uVar5 == lVar4) {
return 0;
}
}
return 1;
}
return 0;
}
| |
33,546 | bool fmt::v10::detail::basic_fp<unsigned __int128>::assign<long double, 0>(long double) | AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h | FMT_CONSTEXPR auto assign(Float n) -> bool {
static_assert(std::numeric_limits<Float>::digits <= 113, "unsupported FP");
// Assume Float is in the format [sign][exponent][significand].
using carrier_uint = typename dragonbox::float_info<Float>::carrier_uint;
const auto num_float_significand_bits =
detail::num_significand_bits<Float>();
const auto implicit_bit = carrier_uint(1) << num_float_significand_bits;
const auto significand_mask = implicit_bit - 1;
auto u = bit_cast<carrier_uint>(n);
f = static_cast<F>(u & significand_mask);
auto biased_e = static_cast<int>((u & exponent_mask<Float>()) >>
num_float_significand_bits);
// The predecessor is closer if n is a normalized power of 2 (f == 0)
// other than the smallest normalized number (biased_e > 1).
auto is_predecessor_closer = f == 0 && biased_e > 1;
if (biased_e == 0)
biased_e = 1; // Subnormals use biased exponent 1 (min exponent).
else if (has_implicit_bit<Float>())
f += static_cast<F>(implicit_bit);
e = biased_e - exponent_bias<Float>() - num_float_significand_bits;
if (!has_implicit_bit<Float>()) ++e;
return is_predecessor_closer;
} | O0 | c | bool fmt::v10::detail::basic_fp<unsigned __int128>::assign<long double, 0>(long double):
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movsd %xmm0, 0x48(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x18(%rsp)
movl $0x34, 0x44(%rsp)
movabsq $0x10000000000000, %rax # imm = 0x10000000000000
movq %rax, 0x38(%rsp)
movabsq $0xfffffffffffff, %rax # imm = 0xFFFFFFFFFFFFF
movq %rax, 0x8(%rsp)
movq %rax, 0x30(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x939b0
movq 0x8(%rsp), %rdx
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x28(%rsp)
movq 0x28(%rsp), %rcx
andq %rdx, %rcx
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
callq 0x939e0
movq 0x10(%rsp), %rcx
movq %rax, %rdx
movq 0x18(%rsp), %rax
andq %rdx, %rcx
shrq $0x34, %rcx
movl %ecx, 0x24(%rsp)
movq (%rax), %rcx
movq 0x8(%rax), %rdx
xorl %eax, %eax
orq %rdx, %rcx
movb %al, 0x22(%rsp)
jne 0xb413a
jmp 0xb412e
cmpl $0x1, 0x24(%rsp)
setg %al
movb %al, 0x22(%rsp)
movb 0x22(%rsp), %al
andb $0x1, %al
movb %al, 0x23(%rsp)
cmpl $0x0, 0x24(%rsp)
jne 0xb4155
movl $0x1, 0x24(%rsp)
jmp 0xb4172
movq 0x18(%rsp), %rax
movq (%rax), %rcx
movabsq $0x10000000000000, %rdx # imm = 0x10000000000000
addq %rdx, %rcx
adcq $0x0, 0x8(%rax)
movq %rcx, (%rax)
movl 0x24(%rsp), %eax
movl %eax, 0x4(%rsp)
callq 0x93a10
movl 0x4(%rsp), %ecx
movl %eax, %edx
movq 0x18(%rsp), %rax
subl %edx, %ecx
subl $0x34, %ecx
movl %ecx, 0x10(%rax)
movb 0x23(%rsp), %al
andb $0x1, %al
addq $0x58, %rsp
retq
nopl (%rax)
| _ZN3fmt3v106detail8basic_fpIoE6assignIdTnNSt9enable_ifIXntsr16is_double_doubleIT_EE5valueEiE4typeELi0EEEbS6_:
sub rsp, 58h
mov [rsp+58h+var_8], rdi
movsd [rsp+58h+var_10], xmm0
mov rax, [rsp+58h+var_8]
mov [rsp+58h+var_40], rax
mov [rsp+58h+var_14], 34h ; '4'
mov rax, 10000000000000h
mov [rsp+58h+var_20], rax
mov rax, 0FFFFFFFFFFFFFh
mov [rsp+58h+var_50], rax
mov [rsp+58h+var_28], rax
lea rdi, [rsp+58h+var_10]
call _ZN3fmt3v106detail8bit_castImdTnNSt9enable_ifIXeqstT_stT0_EiE4typeELi0EEES4_RKS5_
mov rdx, [rsp+58h+var_50]
mov rcx, rax
mov rax, [rsp+58h+var_40]
mov [rsp+58h+var_30], rcx
mov rcx, [rsp+58h+var_30]
and rcx, rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov rax, [rsp+58h+var_30]
mov [rsp+58h+var_48], rax
call _ZN3fmt3v106detail13exponent_maskIdEENS1_9dragonbox10float_infoIT_vE12carrier_uintEv; fmt::v10::detail::exponent_mask<double>(void)
mov rcx, [rsp+58h+var_48]
mov rdx, rax
mov rax, [rsp+58h+var_40]
and rcx, rdx
shr rcx, 34h
mov [rsp+58h+var_34], ecx
mov rcx, [rax]
mov rdx, [rax+8]
xor eax, eax
or rcx, rdx
mov [rsp+58h+var_36], al
jnz short loc_B413A
jmp short $+2
loc_B412E:
cmp [rsp+58h+var_34], 1
setnle al
mov [rsp+58h+var_36], al
loc_B413A:
mov al, [rsp+58h+var_36]
and al, 1
mov [rsp+58h+var_35], al
cmp [rsp+58h+var_34], 0
jnz short loc_B4155
mov [rsp+58h+var_34], 1
jmp short loc_B4172
loc_B4155:
mov rax, [rsp+58h+var_40]
mov rcx, [rax]
mov rdx, 10000000000000h
add rcx, rdx
adc qword ptr [rax+8], 0
mov [rax], rcx
loc_B4172:
mov eax, [rsp+58h+var_34]
mov [rsp+58h+var_54], eax
call _ZN3fmt3v106detail13exponent_biasIdEEiv; fmt::v10::detail::exponent_bias<double>(void)
mov ecx, [rsp+58h+var_54]
mov edx, eax
mov rax, [rsp+58h+var_40]
sub ecx, edx
sub ecx, 34h ; '4'
mov [rax+10h], ecx
mov al, [rsp+58h+var_35]
and al, 1
add rsp, 58h
retn
| bool ZN3fmt3v106detail8basic_fpIoE6assignIdTnNSt9enable_ifIXntsr16is_double_doubleIT_EE5valueEiE4typeELi0EEEbS6_(
long long a1,
double a2)
{
long long v2; // rcx
bool v4; // [rsp+22h] [rbp-36h]
int v5; // [rsp+24h] [rbp-34h]
long long v6; // [rsp+28h] [rbp-30h]
_QWORD v7[2]; // [rsp+48h] [rbp-10h] BYREF
v7[1] = a1;
*(double *)v7 = a2;
v6 = ZN3fmt3v106detail8bit_castImdTnNSt9enable_ifIXeqstT_stT0_EiE4typeELi0EEES4_RKS5_((long long)v7);
*(_QWORD *)a1 = v6 & 0xFFFFFFFFFFFFFLL;
*(_QWORD *)(a1 + 8) = 0LL;
v5 = (fmt::v10::detail::exponent_mask<double>((long long)v7) & (unsigned long long)v6) >> 52;
v4 = 0;
if ( *(_OWORD *)a1 == 0LL )
v4 = v5 > 1;
if ( v5 )
{
v2 = *(_QWORD *)a1 + 0x10000000000000LL;
*(_QWORD *)(a1 + 8) += __CFADD__(*(_QWORD *)a1, 0x10000000000000LL);
*(_QWORD *)a1 = v2;
}
else
{
v5 = 1;
}
*(_DWORD *)(a1 + 16) = v5 - fmt::v10::detail::exponent_bias<double>() - 52;
return v4;
}
| _ZN3fmt3v106detail8basic_fpIoE6assignIdTnNSt9enable_ifIXntsr16is_double_doubleIT_EE5valueEiE4typeELi0EEEbS6_:
SUB RSP,0x58
MOV qword ptr [RSP + 0x50],RDI
MOVSD qword ptr [RSP + 0x48],XMM0
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x18],RAX
MOV dword ptr [RSP + 0x44],0x34
MOV RAX,0x10000000000000
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,0xfffffffffffff
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x30],RAX
LEA RDI,[RSP + 0x48]
CALL 0x001939b0
MOV RDX,qword ptr [RSP + 0x8]
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x28],RCX
MOV RCX,qword ptr [RSP + 0x28]
AND RCX,RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x001939e0
MOV RCX,qword ptr [RSP + 0x10]
MOV RDX,RAX
MOV RAX,qword ptr [RSP + 0x18]
AND RCX,RDX
SHR RCX,0x34
MOV dword ptr [RSP + 0x24],ECX
MOV RCX,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
XOR EAX,EAX
OR RCX,RDX
MOV byte ptr [RSP + 0x22],AL
JNZ 0x001b413a
JMP 0x001b412e
LAB_001b412e:
CMP dword ptr [RSP + 0x24],0x1
SETG AL
MOV byte ptr [RSP + 0x22],AL
LAB_001b413a:
MOV AL,byte ptr [RSP + 0x22]
AND AL,0x1
MOV byte ptr [RSP + 0x23],AL
CMP dword ptr [RSP + 0x24],0x0
JNZ 0x001b4155
MOV dword ptr [RSP + 0x24],0x1
JMP 0x001b4172
LAB_001b4155:
MOV RAX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RAX]
MOV RDX,0x10000000000000
ADD RCX,RDX
ADC qword ptr [RAX + 0x8],0x0
MOV qword ptr [RAX],RCX
LAB_001b4172:
MOV EAX,dword ptr [RSP + 0x24]
MOV dword ptr [RSP + 0x4],EAX
CALL 0x00193a10
MOV ECX,dword ptr [RSP + 0x4]
MOV EDX,EAX
MOV RAX,qword ptr [RSP + 0x18]
SUB ECX,EDX
SUB ECX,0x34
MOV dword ptr [RAX + 0x10],ECX
MOV AL,byte ptr [RSP + 0x23]
AND AL,0x1
ADD RSP,0x58
RET
|
bool _ZN3fmt3v106detail8basic_fpIoE6assignIdTnNSt9enable_ifIXntsr16is_double_doubleIT_EE5valueEiE4typeELi0EEEbS6_
(int8 param_1,ulong *param_2)
{
int iVar1;
ulong uVar2;
uint extraout_var;
bool local_36;
uint local_34;
int8 local_10;
ulong *local_8;
local_10 = param_1;
local_8 = param_2;
uVar2 = _ZN3fmt3v106detail8bit_castImdTnNSt9enable_ifIXeqstT_stT0_EiE4typeELi0EEES4_RKS5_
(&local_10);
*param_2 = uVar2 & 0xfffffffffffff;
param_2[1] = 0;
fmt::v10::detail::exponent_mask<double>();
local_34 = ((uint)(uVar2 >> 0x20) & extraout_var) >> 0x14;
local_36 = (*param_2 == 0 && param_2[1] == 0) && 1 < local_34;
if (local_34 == 0) {
local_34 = 1;
}
else {
param_2[1] = param_2[1] + (ulong)(0xffefffffffffffff < *param_2);
*param_2 = *param_2 + 0x10000000000000;
}
iVar1 = fmt::v10::detail::exponent_bias<double>();
*(uint *)(param_2 + 2) = (local_34 - iVar1) + -0x34;
return local_36;
}
| |
33,547 | engine_stop | navaro[P]qoraal-tictactoe/build_O3/_deps/qoraal_engine-src/src/engine.c | int32_t
engine_stop (void)
{
int32_t res = ENGINE_FAIL ;
ENGINE_DEFERED_T* start ;
uint32_t i ;
if (!_engine_started) return E_UNEXP ;
engine_port_lock () ;
_engine_started = false ;
if (_engine_instance_count) {
uint32_t cnt = _engine_instance_count ;
_engine_instance_count = 0 ;
ENGINE_LOG(0, ENGINE_LOG_TYPE_DEBUG, "[dbg] engine_stop") ;
for (i=0; i<cnt; i++) {
PENGINE_T engine = &_engine_instance[i] ;
if (engine->statemachine) {
while (engine->deferred) {
start = engine->deferred ;
engine->deferred = start->next ;
engine_port_free (heapMachine, start) ;
}
/*status = */parts_cmd (engine, PART_CMD_PARM_STOP) ;
}
}
parts_cmd (0, PART_CMD_PARM_STOP) ;
res = ENGINE_OK ;
}
engine_port_unlock () ;
engine_port_stop () ;
return res ;
} | O3 | c | engine_stop:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl $0xfffff6fa, %ebx # imm = 0xFFFFF6FA
cmpb $0x1, 0x30eac(%rip) # 0x40858
jne 0xfa5f
callq 0xda0b
movb $0x0, 0x30e9a(%rip) # 0x40858
movl 0x2fd5b(%rip), %r14d # 0x3f720
testq %r14, %r14
je 0xfa50
movl $0x0, 0x2fd48(%rip) # 0x3f720
testb $0x1, 0x2e999(%rip) # 0x3e378
je 0xf9f6
leaq 0x16af4(%rip), %rdx # 0x264dc
xorl %edi, %edi
movl $0x1, %esi
xorl %eax, %eax
callq 0xe379
xorl %r15d, %r15d
leaq 0x2fd30(%rip), %r12 # 0x3f730
imulq $0xd8, %r15, %rbx
cmpq $0x0, 0x8(%rbx,%r12)
je 0xfa3b
addq %r12, %rbx
movq 0x80(%rbx), %rsi
testq %rsi, %rsi
je 0xfa31
movq (%rsi), %rax
movq %rax, 0x80(%rbx)
xorl %edi, %edi
callq 0xd999
jmp 0xfa12
movq %rbx, %rdi
xorl %esi, %esi
callq 0x8064
incq %r15
cmpq %r14, %r15
jne 0xfa00
xorl %ebx, %ebx
xorl %edi, %edi
xorl %esi, %esi
callq 0x8064
jmp 0xfa55
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
callq 0xda1c
callq 0xd8d2
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| engine_stop:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov ebx, 0FFFFF6FAh
cmp cs:_engine_started, 1
jnz loc_FA5F
call engine_port_lock
mov cs:_engine_started, 0
mov r14d, cs:_engine_instance_count
test r14, r14
jz loc_FA50
mov cs:_engine_instance_count, 0
test byte ptr cs:_engine_log_filter, 1
jz short loc_F9F6
lea rdx, aDbgEngineStop; "[dbg] engine_stop"
xor edi, edi
mov esi, 1
xor eax, eax
call engine_log
loc_F9F6:
xor r15d, r15d
lea r12, _engine_instance
loc_FA00:
imul rbx, r15, 0D8h
cmp qword ptr [rbx+r12+8], 0
jz short loc_FA3B
add rbx, r12
loc_FA12:
mov rsi, [rbx+80h]
test rsi, rsi
jz short loc_FA31
mov rax, [rsi]
mov [rbx+80h], rax
xor edi, edi
call engine_port_free
jmp short loc_FA12
loc_FA31:
mov rdi, rbx
xor esi, esi
call parts_cmd
loc_FA3B:
inc r15
cmp r15, r14
jnz short loc_FA00
xor ebx, ebx
xor edi, edi
xor esi, esi
call parts_cmd
jmp short loc_FA55
loc_FA50:
mov ebx, 0FFFFFFFFh
loc_FA55:
call engine_port_unlock
call engine_port_stop
loc_FA5F:
mov eax, ebx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long engine_stop(
long long a1,
long long a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
unsigned int v10; // ebx
long long v11; // rdx
long long v12; // rcx
long long v13; // r8
long long v14; // r9
__m128 v15; // xmm4
__m128 v16; // xmm5
long long v17; // r14
long long v18; // r15
char *v19; // rbx
_QWORD *v20; // rsi
char v22; // [rsp+0h] [rbp-20h]
v10 = -2310;
if ( engine_started == 1 )
{
engine_port_lock(a1);
engine_started = 0;
v17 = (unsigned int)engine_instance_count;
if ( engine_instance_count )
{
engine_instance_count = 0;
if ( (engine_log_filter & 1) != 0 )
engine_log(0LL, 1, (long long)aDbgEngineStop, v12, v13, v14, a3, a4, a5, a6, v15, v16, a9, a10, v22);
v18 = 0LL;
do
{
if ( *((_QWORD *)&engine_instance + 27 * v18 + 1) )
{
v19 = (char *)&engine_instance + 216 * v18;
while ( 1 )
{
v20 = (_QWORD *)*((_QWORD *)v19 + 16);
if ( !v20 )
break;
*((_QWORD *)v19 + 16) = *v20;
engine_port_free(0, (long long)v20);
}
parts_cmd((long long)v19, 0, v11, v12, v13, v14);
}
++v18;
}
while ( v18 != v17 );
v10 = 0;
a1 = 0LL;
a2 = 0LL;
parts_cmd(0LL, 0, v11, v12, v13, v14);
}
else
{
v10 = -1;
}
engine_port_unlock(a1, a2, v11, v12);
engine_port_stop();
}
return v10;
}
| engine_stop:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV EBX,0xfffff6fa
CMP byte ptr [0x00140858],0x1
JNZ 0x0010fa5f
CALL 0x0010da0b
MOV byte ptr [0x00140858],0x0
MOV R14D,dword ptr [0x0013f720]
TEST R14,R14
JZ 0x0010fa50
MOV dword ptr [0x0013f720],0x0
TEST byte ptr [0x0013e378],0x1
JZ 0x0010f9f6
LEA RDX,[0x1264dc]
XOR EDI,EDI
MOV ESI,0x1
XOR EAX,EAX
CALL 0x0010e379
LAB_0010f9f6:
XOR R15D,R15D
LEA R12,[0x13f730]
LAB_0010fa00:
IMUL RBX,R15,0xd8
CMP qword ptr [RBX + R12*0x1 + 0x8],0x0
JZ 0x0010fa3b
ADD RBX,R12
LAB_0010fa12:
MOV RSI,qword ptr [RBX + 0x80]
TEST RSI,RSI
JZ 0x0010fa31
MOV RAX,qword ptr [RSI]
MOV qword ptr [RBX + 0x80],RAX
XOR EDI,EDI
CALL 0x0010d999
JMP 0x0010fa12
LAB_0010fa31:
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00108064
LAB_0010fa3b:
INC R15
CMP R15,R14
JNZ 0x0010fa00
XOR EBX,EBX
XOR EDI,EDI
XOR ESI,ESI
CALL 0x00108064
JMP 0x0010fa55
LAB_0010fa50:
MOV EBX,0xffffffff
LAB_0010fa55:
CALL 0x0010da1c
CALL 0x0010d8d2
LAB_0010fa5f:
MOV EAX,EBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int8 engine_stop(void)
{
int8 uVar1;
ulong uVar2;
ulong uVar3;
uVar1 = 0xfffff6fa;
if (_engine_started == '\x01') {
engine_port_lock();
_engine_started = '\0';
uVar2 = (ulong)_engine_instance_count;
if (uVar2 == 0) {
uVar1 = 0xffffffff;
}
else {
_engine_instance_count = 0;
if (((byte)_engine_log_filter & 1) != 0) {
engine_log(0,1,s__dbg__engine_stop_001264dc);
}
uVar3 = 0;
do {
if ((&DAT_0013f738)[uVar3 * 0x1b] != 0) {
while ((int8 *)(&DAT_0013f7b0)[uVar3 * 0x1b] != (int8 *)0x0) {
(&DAT_0013f7b0)[uVar3 * 0x1b] = *(int8 *)(&DAT_0013f7b0)[uVar3 * 0x1b];
engine_port_free(0);
}
parts_cmd(&_engine_instance + uVar3 * 0x36,0);
}
uVar3 = uVar3 + 1;
} while (uVar3 != uVar2);
uVar1 = 0;
parts_cmd(0,0);
}
engine_port_unlock();
engine_port_stop();
}
return uVar1;
}
| |
33,548 | dump_page | eloqsql/storage/maria/ma_loghandler.c | void dump_page(uchar *buffer, File handler)
{
if (strncmp((char*)maria_trans_file_magic, (char*)buffer,
sizeof(maria_trans_file_magic)) == 0)
{
dump_header_page(buffer);
return;
}
dump_datapage(buffer, handler);
} | O0 | c | dump_page:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rsi
leaq 0x265d6e(%rip), %rdi # 0x2bdff8
movl $0xc, %edx
callq 0x2a1e0
cmpl $0x0, %eax
jne 0x582a4
movq -0x8(%rbp), %rdi
callq 0x582c0
jmp 0x582b0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x58430
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| dump_page:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov rsi, [rbp+var_8]
lea rdi, maria_trans_file_magic
mov edx, 0Ch
call _strncmp
cmp eax, 0
jnz short loc_582A4
mov rdi, [rbp+var_8]
call dump_header_page
jmp short loc_582B0
loc_582A4:
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
call dump_datapage
loc_582B0:
add rsp, 10h
pop rbp
retn
| long long dump_page(long long a1, unsigned int a2)
{
if ( !(unsigned int)strncmp(&maria_trans_file_magic, a1, 12LL) )
return dump_header_page(a1);
else
return dump_datapage(a1, a2);
}
| dump_page:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV RSI,qword ptr [RBP + -0x8]
LEA RDI,[0x3bdff8]
MOV EDX,0xc
CALL 0x0012a1e0
CMP EAX,0x0
JNZ 0x001582a4
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001582c0
JMP 0x001582b0
LAB_001582a4:
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
CALL 0x00158430
LAB_001582b0:
ADD RSP,0x10
POP RBP
RET
|
void dump_page(char *param_1,int4 param_2)
{
int iVar1;
iVar1 = strncmp((char *)&maria_trans_file_magic,param_1,0xc);
if (iVar1 == 0) {
dump_header_page(param_1);
}
else {
dump_datapage(param_1,param_2);
}
return;
}
| |
33,549 | test_bug5126 | eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c | static int test_bug5126(MYSQL *mysql)
{
MYSQL_STMT *stmt;
MYSQL_BIND my_bind[2];
int32 c1, c2;
const char *stmt_text;
int rc;
stmt_text= "DROP TABLE IF EXISTS t1";
rc= mysql_real_query(mysql, SL(stmt_text));
check_mysql_rc(rc, mysql);
stmt_text= "CREATE TABLE t1 (a mediumint, b int)";
rc= mysql_real_query(mysql, SL(stmt_text));
check_mysql_rc(rc, mysql);
stmt_text= "INSERT INTO t1 VALUES (8386608, 1)";
rc= mysql_real_query(mysql, SL(stmt_text));
check_mysql_rc(rc, mysql);
stmt= mysql_stmt_init(mysql);
stmt_text= "SELECT a, b FROM t1";
rc= mysql_stmt_prepare(stmt, SL(stmt_text));
check_stmt_rc(rc, stmt);
rc= mysql_stmt_execute(stmt);
check_stmt_rc(rc, stmt);
/* Bind output buffers */
memset(my_bind, '\0', sizeof(my_bind));
my_bind[0].buffer_type= MYSQL_TYPE_LONG;
my_bind[0].buffer= &c1;
my_bind[1].buffer_type= MYSQL_TYPE_LONG;
my_bind[1].buffer= &c2;
mysql_stmt_bind_result(stmt, my_bind);
rc= mysql_stmt_fetch(stmt);
FAIL_UNLESS(rc == 0, "rc != 0");
FAIL_UNLESS(c1 == 8386608 && c2 == 1, "c1 != 8386608 || c2 != 1");
mysql_stmt_close(stmt);
return OK;
} | O0 | c | test_bug5126:
pushq %rbp
movq %rsp, %rbp
subq $0x190, %rsp # imm = 0x190
movq %rdi, -0x10(%rbp)
leaq 0x3f040(%rip), %rax # 0x66636
movq %rax, -0x110(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x110(%rbp), %rax
movq %rax, -0x120(%rbp)
movq -0x110(%rbp), %rdi
callq 0x141a0
movq -0x128(%rbp), %rdi
movq -0x120(%rbp), %rsi
movq %rax, %rdx
callq 0x377f0
movl %eax, -0x114(%rbp)
cmpl $0x0, -0x114(%rbp)
je 0x276a2
movl -0x114(%rbp), %eax
movl %eax, -0x134(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3f0
movq %rax, -0x130(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3c0
movl -0x134(%rbp), %esi
movq -0x130(%rbp), %rdx
movl %eax, %ecx
leaq 0x3e053(%rip), %rdi # 0x656d5
leaq 0x3e9e4(%rip), %r8 # 0x6606d
movl $0x9f1, %r9d # imm = 0x9F1
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x279d7
jmp 0x276a4
leaq 0x4186a(%rip), %rax # 0x68f15
movq %rax, -0x110(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x148(%rbp)
movq -0x110(%rbp), %rax
movq %rax, -0x140(%rbp)
movq -0x110(%rbp), %rdi
callq 0x141a0
movq -0x148(%rbp), %rdi
movq -0x140(%rbp), %rsi
movq %rax, %rdx
callq 0x377f0
movl %eax, -0x114(%rbp)
cmpl $0x0, -0x114(%rbp)
je 0x27757
movl -0x114(%rbp), %eax
movl %eax, -0x154(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3f0
movq %rax, -0x150(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3c0
movl -0x154(%rbp), %esi
movq -0x150(%rbp), %rdx
movl %eax, %ecx
leaq 0x3df9e(%rip), %rdi # 0x656d5
leaq 0x3e92f(%rip), %r8 # 0x6606d
movl $0x9f5, %r9d # imm = 0x9F5
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x279d7
jmp 0x27759
leaq 0x417da(%rip), %rax # 0x68f3a
movq %rax, -0x110(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x168(%rbp)
movq -0x110(%rbp), %rax
movq %rax, -0x160(%rbp)
movq -0x110(%rbp), %rdi
callq 0x141a0
movq -0x168(%rbp), %rdi
movq -0x160(%rbp), %rsi
movq %rax, %rdx
callq 0x377f0
movl %eax, -0x114(%rbp)
cmpl $0x0, -0x114(%rbp)
je 0x2780c
movl -0x114(%rbp), %eax
movl %eax, -0x174(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3f0
movq %rax, -0x170(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3c0
movl -0x174(%rbp), %esi
movq -0x170(%rbp), %rdx
movl %eax, %ecx
leaq 0x3dee9(%rip), %rdi # 0x656d5
leaq 0x3e87a(%rip), %r8 # 0x6606d
movl $0x9f9, %r9d # imm = 0x9F9
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x279d7
jmp 0x2780e
movq -0x10(%rbp), %rdi
callq 0x44950
movq %rax, -0x18(%rbp)
leaq 0x4173b(%rip), %rax # 0x68f5d
movq %rax, -0x110(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x188(%rbp)
movq -0x110(%rbp), %rax
movq %rax, -0x180(%rbp)
movq -0x110(%rbp), %rdi
callq 0x141a0
movq -0x188(%rbp), %rdi
movq -0x180(%rbp), %rsi
movq %rax, %rdx
callq 0x45070
movl %eax, -0x114(%rbp)
cmpl $0x0, -0x114(%rbp)
je 0x278a5
movq -0x18(%rbp), %rdi
callq 0x43fd0
movq %rax, %rsi
leaq 0x3dd0a(%rip), %rdi # 0x65590
leaq 0x3e7e0(%rip), %rdx # 0x6606d
movl $0x9fe, %ecx # imm = 0x9FE
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x279d7
jmp 0x278a7
movq -0x18(%rbp), %rdi
callq 0x46580
movl %eax, -0x114(%rbp)
cmpl $0x0, -0x114(%rbp)
je 0x278f1
movq -0x18(%rbp), %rdi
callq 0x43fd0
movq %rax, %rsi
leaq 0x3dcbe(%rip), %rdi # 0x65590
leaq 0x3e794(%rip), %rdx # 0x6606d
movl $0xa00, %ecx # imm = 0xA00
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x279d7
jmp 0x278f3
leaq -0x100(%rbp), %rdi
xorl %esi, %esi
movl $0xe0, %edx
callq 0x14260
movl $0x3, -0xa0(%rbp)
leaq -0x104(%rbp), %rax
movq %rax, -0xf0(%rbp)
movl $0x3, -0x30(%rbp)
leaq -0x108(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0x43940
movq -0x18(%rbp), %rdi
callq 0x44020
movl %eax, -0x114(%rbp)
cmpl $0x0, -0x114(%rbp)
je 0x27982
leaq 0x3dc31(%rip), %rdi # 0x65590
leaq 0x41403(%rip), %rsi # 0x68d69
leaq 0x3e700(%rip), %rdx # 0x6606d
movl $0xa0b, %ecx # imm = 0xA0B
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x279d7
jmp 0x27984
jmp 0x27986
cmpl $0x7ff830, -0x104(%rbp) # imm = 0x7FF830
jne 0x2799b
cmpl $0x1, -0x108(%rbp)
je 0x279c5
leaq 0x3dbee(%rip), %rdi # 0x65590
leaq 0x415c8(%rip), %rsi # 0x68f71
leaq 0x3e6bd(%rip), %rdx # 0x6606d
movl $0xa0c, %ecx # imm = 0xA0C
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x279d7
jmp 0x279c7
movq -0x18(%rbp), %rdi
callq 0x43eb0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x190, %rsp # imm = 0x190
popq %rbp
retq
nopw %cs:(%rax,%rax)
| test_bug5126:
push rbp
mov rbp, rsp
sub rsp, 190h
mov [rbp+var_10], rdi
lea rax, aDropTableIfExi_0; "DROP TABLE IF EXISTS t1"
mov [rbp+var_110], rax
mov rax, [rbp+var_10]
mov [rbp+var_128], rax
mov rax, [rbp+var_110]
mov [rbp+var_120], rax
mov rdi, [rbp+var_110]
call _strlen
mov rdi, [rbp+var_128]
mov rsi, [rbp+var_120]
mov rdx, rax
call mysql_real_query
mov [rbp+var_114], eax
cmp [rbp+var_114], 0
jz short loc_276A2
mov eax, [rbp+var_114]
mov [rbp+var_134], eax
mov rdi, [rbp+var_10]
call mysql_error
mov [rbp+var_130], rax
mov rdi, [rbp+var_10]
call mysql_errno
mov esi, [rbp+var_134]
mov rdx, [rbp+var_130]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 9F1h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_279D7
loc_276A2:
jmp short $+2
loc_276A4:
lea rax, aCreateTableT1A_8; "CREATE TABLE t1 (a mediumint, b int)"
mov [rbp+var_110], rax
mov rax, [rbp+var_10]
mov [rbp+var_148], rax
mov rax, [rbp+var_110]
mov [rbp+var_140], rax
mov rdi, [rbp+var_110]
call _strlen
mov rdi, [rbp+var_148]
mov rsi, [rbp+var_140]
mov rdx, rax
call mysql_real_query
mov [rbp+var_114], eax
cmp [rbp+var_114], 0
jz short loc_27757
mov eax, [rbp+var_114]
mov [rbp+var_154], eax
mov rdi, [rbp+var_10]
call mysql_error
mov [rbp+var_150], rax
mov rdi, [rbp+var_10]
call mysql_errno
mov esi, [rbp+var_154]
mov rdx, [rbp+var_150]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 9F5h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_279D7
loc_27757:
jmp short $+2
loc_27759:
lea rax, aInsertIntoT1Va_15; "INSERT INTO t1 VALUES (8386608, 1)"
mov [rbp+var_110], rax
mov rax, [rbp+var_10]
mov [rbp+var_168], rax
mov rax, [rbp+var_110]
mov [rbp+var_160], rax
mov rdi, [rbp+var_110]
call _strlen
mov rdi, [rbp+var_168]
mov rsi, [rbp+var_160]
mov rdx, rax
call mysql_real_query
mov [rbp+var_114], eax
cmp [rbp+var_114], 0
jz short loc_2780C
mov eax, [rbp+var_114]
mov [rbp+var_174], eax
mov rdi, [rbp+var_10]
call mysql_error
mov [rbp+var_170], rax
mov rdi, [rbp+var_10]
call mysql_errno
mov esi, [rbp+var_174]
mov rdx, [rbp+var_170]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 9F9h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_279D7
loc_2780C:
jmp short $+2
loc_2780E:
mov rdi, [rbp+var_10]
call mysql_stmt_init
mov [rbp+var_18], rax
lea rax, aSelectABFromT1_0; "SELECT a, b FROM t1"
mov [rbp+var_110], rax
mov rax, [rbp+var_18]
mov [rbp+var_188], rax
mov rax, [rbp+var_110]
mov [rbp+var_180], rax
mov rdi, [rbp+var_110]
call _strlen
mov rdi, [rbp+var_188]
mov rsi, [rbp+var_180]
mov rdx, rax
call mysql_stmt_prepare
mov [rbp+var_114], eax
cmp [rbp+var_114], 0
jz short loc_278A5
mov rdi, [rbp+var_18]
call mysql_stmt_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 9FEh
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_279D7
loc_278A5:
jmp short $+2
loc_278A7:
mov rdi, [rbp+var_18]
call mysql_stmt_execute
mov [rbp+var_114], eax
cmp [rbp+var_114], 0
jz short loc_278F1
mov rdi, [rbp+var_18]
call mysql_stmt_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 0A00h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_279D7
loc_278F1:
jmp short $+2
loc_278F3:
lea rdi, [rbp+var_100]
xor esi, esi
mov edx, 0E0h
call _memset
mov [rbp+var_A0], 3
lea rax, [rbp+var_104]
mov [rbp+var_F0], rax
mov [rbp+var_30], 3
lea rax, [rbp+var_108]
mov [rbp+var_80], rax
mov rdi, [rbp+var_18]
lea rsi, [rbp+var_100]
call mysql_stmt_bind_result
mov rdi, [rbp+var_18]
call mysql_stmt_fetch
mov [rbp+var_114], eax
cmp [rbp+var_114], 0
jz short loc_27982
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aRc0_0; "rc != 0"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 0A0Bh
mov al, 0
call diag
mov [rbp+var_4], 1
jmp short loc_279D7
loc_27982:
jmp short $+2
loc_27984:
jmp short $+2
loc_27986:
cmp [rbp+var_104], 7FF830h
jnz short loc_2799B
cmp [rbp+var_108], 1
jz short loc_279C5
loc_2799B:
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aC18386608C21; "c1 != 8386608 || c2 != 1"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 0A0Ch
mov al, 0
call diag
mov [rbp+var_4], 1
jmp short loc_279D7
loc_279C5:
jmp short $+2
loc_279C7:
mov rdi, [rbp+var_18]
call mysql_stmt_close
mov [rbp+var_4], 0
loc_279D7:
mov eax, [rbp+var_4]
add rsp, 190h
pop rbp
retn
| long long test_bug5126(long long a1)
{
long long v1; // rax
int v2; // eax
long long v3; // rax
int v4; // eax
long long v5; // rax
int v6; // eax
long long v7; // rax
int v8; // eax
int v9; // r8d
int v10; // r9d
int v11; // eax
int v12; // r8d
int v13; // r9d
int v14; // r8d
int v15; // r9d
int v17; // [rsp+20h] [rbp-170h]
int v18; // [rsp+40h] [rbp-150h]
int v19; // [rsp+60h] [rbp-130h]
int v20; // [rsp+7Ch] [rbp-114h]
int v21; // [rsp+7Ch] [rbp-114h]
int v22; // [rsp+7Ch] [rbp-114h]
int v23; // [rsp+88h] [rbp-108h] BYREF
int v24; // [rsp+8Ch] [rbp-104h] BYREF
_BYTE v25[16]; // [rsp+90h] [rbp-100h] BYREF
int *v26; // [rsp+A0h] [rbp-F0h]
int v27; // [rsp+F0h] [rbp-A0h]
int *v28; // [rsp+110h] [rbp-80h]
int v29; // [rsp+160h] [rbp-30h]
long long v30; // [rsp+178h] [rbp-18h]
long long v31; // [rsp+180h] [rbp-10h]
v31 = a1;
v1 = strlen("DROP TABLE IF EXISTS t1");
v20 = mysql_real_query(a1, "DROP TABLE IF EXISTS t1", v1);
if ( v20 )
{
v19 = mysql_error(v31);
v2 = mysql_errno(v31);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v20,
v19,
v2,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
2545);
return 1;
}
else
{
v3 = strlen("CREATE TABLE t1 (a mediumint, b int)");
v21 = mysql_real_query(v31, "CREATE TABLE t1 (a mediumint, b int)", v3);
if ( v21 )
{
v18 = mysql_error(v31);
v4 = mysql_errno(v31);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v21,
v18,
v4,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
2549);
return 1;
}
else
{
v5 = strlen("INSERT INTO t1 VALUES (8386608, 1)");
v22 = mysql_real_query(v31, "INSERT INTO t1 VALUES (8386608, 1)", v5);
if ( v22 )
{
v17 = mysql_error(v31);
v6 = mysql_errno(v31);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v22,
v17,
v6,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
2553);
return 1;
}
else
{
v30 = mysql_stmt_init(v31);
v7 = strlen("SELECT a, b FROM t1");
if ( (unsigned int)mysql_stmt_prepare(v30, "SELECT a, b FROM t1", v7) )
{
v8 = mysql_stmt_error(v30);
diag(
(unsigned int)"Error: %s (%s: %d)",
v8,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
2558,
v9,
v10);
return 1;
}
else if ( (unsigned int)mysql_stmt_execute(v30) )
{
v11 = mysql_stmt_error(v30);
diag(
(unsigned int)"Error: %s (%s: %d)",
v11,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
2560,
v12,
v13);
return 1;
}
else
{
memset(v25, 0LL, 224LL);
v27 = 3;
v26 = &v24;
v29 = 3;
v28 = &v23;
mysql_stmt_bind_result(v30, v25);
if ( (unsigned int)mysql_stmt_fetch(v30) )
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"rc != 0",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
2571,
v14,
v15);
return 1;
}
else if ( v24 == 8386608 && v23 == 1 )
{
mysql_stmt_close(v30);
return 0;
}
else
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"c1 != 8386608 || c2 != 1",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
2572,
v14,
v15);
return 1;
}
}
}
}
}
}
| test_bug5126:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x190
MOV qword ptr [RBP + -0x10],RDI
LEA RAX,[0x166636]
MOV qword ptr [RBP + -0x110],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x128],RAX
MOV RAX,qword ptr [RBP + -0x110]
MOV qword ptr [RBP + -0x120],RAX
MOV RDI,qword ptr [RBP + -0x110]
CALL 0x001141a0
MOV RDI,qword ptr [RBP + -0x128]
MOV RSI,qword ptr [RBP + -0x120]
MOV RDX,RAX
CALL 0x001377f0
MOV dword ptr [RBP + -0x114],EAX
CMP dword ptr [RBP + -0x114],0x0
JZ 0x001276a2
MOV EAX,dword ptr [RBP + -0x114]
MOV dword ptr [RBP + -0x134],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3f0
MOV qword ptr [RBP + -0x130],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3c0
MOV ESI,dword ptr [RBP + -0x134]
MOV RDX,qword ptr [RBP + -0x130]
MOV ECX,EAX
LEA RDI,[0x1656d5]
LEA R8,[0x16606d]
MOV R9D,0x9f1
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001279d7
LAB_001276a2:
JMP 0x001276a4
LAB_001276a4:
LEA RAX,[0x168f15]
MOV qword ptr [RBP + -0x110],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x148],RAX
MOV RAX,qword ptr [RBP + -0x110]
MOV qword ptr [RBP + -0x140],RAX
MOV RDI,qword ptr [RBP + -0x110]
CALL 0x001141a0
MOV RDI,qword ptr [RBP + -0x148]
MOV RSI,qword ptr [RBP + -0x140]
MOV RDX,RAX
CALL 0x001377f0
MOV dword ptr [RBP + -0x114],EAX
CMP dword ptr [RBP + -0x114],0x0
JZ 0x00127757
MOV EAX,dword ptr [RBP + -0x114]
MOV dword ptr [RBP + -0x154],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3f0
MOV qword ptr [RBP + -0x150],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3c0
MOV ESI,dword ptr [RBP + -0x154]
MOV RDX,qword ptr [RBP + -0x150]
MOV ECX,EAX
LEA RDI,[0x1656d5]
LEA R8,[0x16606d]
MOV R9D,0x9f5
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001279d7
LAB_00127757:
JMP 0x00127759
LAB_00127759:
LEA RAX,[0x168f3a]
MOV qword ptr [RBP + -0x110],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x168],RAX
MOV RAX,qword ptr [RBP + -0x110]
MOV qword ptr [RBP + -0x160],RAX
MOV RDI,qword ptr [RBP + -0x110]
CALL 0x001141a0
MOV RDI,qword ptr [RBP + -0x168]
MOV RSI,qword ptr [RBP + -0x160]
MOV RDX,RAX
CALL 0x001377f0
MOV dword ptr [RBP + -0x114],EAX
CMP dword ptr [RBP + -0x114],0x0
JZ 0x0012780c
MOV EAX,dword ptr [RBP + -0x114]
MOV dword ptr [RBP + -0x174],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3f0
MOV qword ptr [RBP + -0x170],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3c0
MOV ESI,dword ptr [RBP + -0x174]
MOV RDX,qword ptr [RBP + -0x170]
MOV ECX,EAX
LEA RDI,[0x1656d5]
LEA R8,[0x16606d]
MOV R9D,0x9f9
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001279d7
LAB_0012780c:
JMP 0x0012780e
LAB_0012780e:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00144950
MOV qword ptr [RBP + -0x18],RAX
LEA RAX,[0x168f5d]
MOV qword ptr [RBP + -0x110],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x188],RAX
MOV RAX,qword ptr [RBP + -0x110]
MOV qword ptr [RBP + -0x180],RAX
MOV RDI,qword ptr [RBP + -0x110]
CALL 0x001141a0
MOV RDI,qword ptr [RBP + -0x188]
MOV RSI,qword ptr [RBP + -0x180]
MOV RDX,RAX
CALL 0x00145070
MOV dword ptr [RBP + -0x114],EAX
CMP dword ptr [RBP + -0x114],0x0
JZ 0x001278a5
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00143fd0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0x9fe
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001279d7
LAB_001278a5:
JMP 0x001278a7
LAB_001278a7:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00146580
MOV dword ptr [RBP + -0x114],EAX
CMP dword ptr [RBP + -0x114],0x0
JZ 0x001278f1
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00143fd0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0xa00
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001279d7
LAB_001278f1:
JMP 0x001278f3
LAB_001278f3:
LEA RDI,[RBP + -0x100]
XOR ESI,ESI
MOV EDX,0xe0
CALL 0x00114260
MOV dword ptr [RBP + -0xa0],0x3
LEA RAX,[RBP + -0x104]
MOV qword ptr [RBP + -0xf0],RAX
MOV dword ptr [RBP + -0x30],0x3
LEA RAX,[RBP + -0x108]
MOV qword ptr [RBP + -0x80],RAX
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[RBP + -0x100]
CALL 0x00143940
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00144020
MOV dword ptr [RBP + -0x114],EAX
CMP dword ptr [RBP + -0x114],0x0
JZ 0x00127982
LEA RDI,[0x165590]
LEA RSI,[0x168d69]
LEA RDX,[0x16606d]
MOV ECX,0xa0b
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001279d7
LAB_00127982:
JMP 0x00127984
LAB_00127984:
JMP 0x00127986
LAB_00127986:
CMP dword ptr [RBP + -0x104],0x7ff830
JNZ 0x0012799b
CMP dword ptr [RBP + -0x108],0x1
JZ 0x001279c5
LAB_0012799b:
LEA RDI,[0x165590]
LEA RSI,[0x168f71]
LEA RDX,[0x16606d]
MOV ECX,0xa0c
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001279d7
LAB_001279c5:
JMP 0x001279c7
LAB_001279c7:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00143eb0
MOV dword ptr [RBP + -0x4],0x0
LAB_001279d7:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x190
POP RBP
RET
|
int4 test_bug5126(int8 param_1)
{
int iVar1;
int4 uVar2;
size_t sVar3;
int8 uVar4;
int local_110;
int local_10c;
int1 local_108 [16];
int *local_f8;
int4 local_a8;
int *local_88;
int4 local_38;
int8 local_20;
int8 local_18;
int4 local_c;
local_18 = param_1;
sVar3 = strlen("DROP TABLE IF EXISTS t1");
iVar1 = mysql_real_query(param_1,"DROP TABLE IF EXISTS t1",sVar3);
uVar4 = local_18;
if (iVar1 == 0) {
sVar3 = strlen("CREATE TABLE t1 (a mediumint, b int)");
iVar1 = mysql_real_query(uVar4,"CREATE TABLE t1 (a mediumint, b int)",sVar3);
uVar4 = local_18;
if (iVar1 == 0) {
sVar3 = strlen("INSERT INTO t1 VALUES (8386608, 1)");
iVar1 = mysql_real_query(uVar4,"INSERT INTO t1 VALUES (8386608, 1)",sVar3);
if (iVar1 == 0) {
uVar4 = mysql_stmt_init(local_18);
local_20 = uVar4;
sVar3 = strlen("SELECT a, b FROM t1");
iVar1 = mysql_stmt_prepare(uVar4,"SELECT a, b FROM t1",sVar3);
if (iVar1 == 0) {
iVar1 = mysql_stmt_execute(local_20);
if (iVar1 == 0) {
memset(local_108,0,0xe0);
local_a8 = 3;
local_f8 = &local_10c;
local_38 = 3;
local_88 = &local_110;
mysql_stmt_bind_result(local_20,local_108);
iVar1 = mysql_stmt_fetch(local_20);
if (iVar1 == 0) {
if ((local_10c == 0x7ff830) && (local_110 == 1)) {
mysql_stmt_close(local_20);
local_c = 0;
}
else {
diag("Error: %s (%s: %d)",&DAT_00168f71,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0xa0c);
local_c = 1;
}
}
else {
diag("Error: %s (%s: %d)","rc != 0",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0xa0b);
local_c = 1;
}
}
else {
uVar4 = mysql_stmt_error(local_20);
diag("Error: %s (%s: %d)",uVar4,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0xa00);
local_c = 1;
}
}
else {
uVar4 = mysql_stmt_error(local_20);
diag("Error: %s (%s: %d)",uVar4,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
0x9fe);
local_c = 1;
}
}
else {
uVar4 = mysql_error(local_18);
uVar2 = mysql_errno(local_18);
diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar4,uVar2,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
0x9f9);
local_c = 1;
}
}
else {
uVar4 = mysql_error(local_18);
uVar2 = mysql_errno(local_18);
diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar4,uVar2,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",0x9f5
);
local_c = 1;
}
}
else {
uVar4 = mysql_error(local_18);
uVar2 = mysql_errno(local_18);
diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar4,uVar2,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",0x9f1);
local_c = 1;
}
return local_c;
}
| |
33,550 | nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, 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>>>>>::parser(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>>>>&&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>&)>, bool, bool) | monkey531[P]llama/common/json.hpp | explicit parser(InputAdapterType&& adapter,
const parser_callback_t<BasicJsonType> cb = nullptr,
const bool allow_exceptions_ = true,
const bool skip_comments = false)
: callback(cb)
, m_lexer(std::move(adapter), skip_comments)
, allow_exceptions(allow_exceptions_)
{
// read first token
get_token();
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, 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>>>>>::parser(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>>>>&&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>&)>, bool, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %r15d
movl %ecx, %ebp
movq %rsi, %r12
movq %rdi, %rbx
movq %rdx, %rsi
callq 0x6b1a2
movl $0x0, 0x20(%rbx)
leaq 0x28(%rbx), %r14
movups (%r12), %xmm0
movups %xmm0, 0x28(%rbx)
movb %r15b, 0x38(%rbx)
movl $0xffffffff, 0x3c(%rbx) # imm = 0xFFFFFFFF
xorl %eax, %eax
movb %al, 0x40(%rbx)
leaq 0x88(%rbx), %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x48(%rbx)
movups %xmm0, 0x58(%rbx)
movups %xmm0, 0x68(%rbx)
movq %rcx, 0x78(%rbx)
movq %rax, 0x80(%rbx)
movb %al, 0x88(%rbx)
leaq 0x85d31(%rip), %rcx # 0xf19f4
movq %rcx, 0x98(%rbx)
movups %xmm0, 0xa0(%rbx)
movq %rax, 0xb0(%rbx)
callq 0x6bd66
movsbl %al, %eax
movl %eax, 0xb8(%rbx)
movb %bpl, 0xc0(%rbx)
movq %r14, %rdi
callq 0x6bdaa
movl %eax, 0x20(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq %r14, %rdi
callq 0x6bd32
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x6bd22
movq %rbx, %rdi
movq %rbx, %rsi
movl $0x3, %edx
callq *%rax
movq %r15, %rdi
callq 0x1bff0
movq %rax, %rdi
callq 0x259fd
| _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEEC2EOSM_St8functionIFbiNS1_13parse_event_tERSF_EEbb:
push rbp
push r15
push r14
push r12
push rbx
mov r15d, r8d
mov ebp, ecx
mov r12, rsi
mov rbx, rdi
mov rsi, rdx
call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2ERKSJ_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<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> &)>::function(std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)> const&)
mov dword ptr [rbx+20h], 0
lea r14, [rbx+28h]
movups xmm0, xmmword ptr [r12]
movups xmmword ptr [rbx+28h], xmm0
mov [rbx+38h], r15b
mov dword ptr [rbx+3Ch], 0FFFFFFFFh
xor eax, eax
mov [rbx+40h], al
lea rcx, [rbx+88h]
xorps xmm0, xmm0
movups xmmword ptr [rbx+48h], xmm0
movups xmmword ptr [rbx+58h], xmm0
movups xmmword ptr [rbx+68h], xmm0
mov [rbx+78h], rcx
mov [rbx+80h], rax
mov [rbx+88h], al
lea rcx, aErrorWhileHand_0+34h; ""
mov [rbx+98h], rcx
movups xmmword ptr [rbx+0A0h], xmm0
mov [rbx+0B0h], rax
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE17get_decimal_pointEv; 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_decimal_point(void)
movsx eax, al
mov [rbx+0B8h], eax
mov [rbx+0C0h], bpl
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE4scanEv; 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>>>::scan(void)
mov [rbx+20h], eax
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
mov r15, rax
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; 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>>>::~lexer()
mov rax, [rbx+10h]
test rax, rax
jz short loc_6BD22
mov rdi, rbx
mov rsi, rbx
mov edx, 3
call rax
loc_6BD22:
mov rdi, r15
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
| long long nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parser(
long long a1,
_OWORD *a2,
long long a3,
char a4,
char a5)
{
long long result; // rax
std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::function(
(_OWORD *)a1,
a3);
*(_DWORD *)(a1 + 32) = 0;
*(_OWORD *)(a1 + 40) = *a2;
*(_BYTE *)(a1 + 56) = a5;
*(_DWORD *)(a1 + 60) = -1;
*(_BYTE *)(a1 + 64) = 0;
*(_OWORD *)(a1 + 72) = 0LL;
*(_OWORD *)(a1 + 88) = 0LL;
*(_OWORD *)(a1 + 104) = 0LL;
*(_QWORD *)(a1 + 120) = a1 + 136;
*(_QWORD *)(a1 + 128) = 0LL;
*(_BYTE *)(a1 + 136) = 0;
*(_QWORD *)(a1 + 152) = "";
*(_OWORD *)(a1 + 160) = 0LL;
*(_QWORD *)(a1 + 176) = 0LL;
*(_DWORD *)(a1 + 184) = (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>>>::get_decimal_point();
*(_BYTE *)(a1 + 192) = a4;
result = 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(a1 + 40);
*(_DWORD *)(a1 + 32) = result;
return result;
}
| parser:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R15D,R8D
MOV EBP,ECX
MOV R12,RSI
MOV RBX,RDI
MOV RSI,RDX
CALL 0x0016b1a2
MOV dword ptr [RBX + 0x20],0x0
LEA R14,[RBX + 0x28]
MOVUPS XMM0,xmmword ptr [R12]
MOVUPS xmmword ptr [RBX + 0x28],XMM0
MOV byte ptr [RBX + 0x38],R15B
MOV dword ptr [RBX + 0x3c],0xffffffff
XOR EAX,EAX
MOV byte ptr [RBX + 0x40],AL
LEA RCX,[RBX + 0x88]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x48],XMM0
MOVUPS xmmword ptr [RBX + 0x58],XMM0
MOVUPS xmmword ptr [RBX + 0x68],XMM0
MOV qword ptr [RBX + 0x78],RCX
MOV qword ptr [RBX + 0x80],RAX
MOV byte ptr [RBX + 0x88],AL
LEA RCX,[0x1f19f4]
MOV qword ptr [RBX + 0x98],RCX
MOVUPS xmmword ptr [RBX + 0xa0],XMM0
MOV qword ptr [RBX + 0xb0],RAX
CALL 0x0016bd66
MOVSX EAX,AL
MOV dword ptr [RBX + 0xb8],EAX
MOV byte ptr [RBX + 0xc0],BPL
LAB_0016bced:
MOV RDI,R14
CALL 0x0016bdaa
MOV dword ptr [RBX + 0x20],EAX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, 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 > >
>::parser(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > >&&, std::function<bool (int,
nlohmann::json_abi_v3_11_3::detail::parse_event_t,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&)>, bool, bool) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::parser(parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this,int8 *param_1,function *param_3,
parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
param_4,parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
param_5)
{
int8 uVar1;
char cVar2;
int4 uVar3;
std::
function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
::function((function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
*)this,param_3);
*(int4 *)(this + 0x20) = 0;
uVar1 = param_1[1];
*(int8 *)(this + 0x28) = *param_1;
*(int8 *)(this + 0x30) = uVar1;
this[0x38] = param_5;
*(int4 *)(this + 0x3c) = 0xffffffff;
this[0x40] = (parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
)0x0;
*(int8 *)(this + 0x48) = 0;
*(int8 *)(this + 0x50) = 0;
*(int8 *)(this + 0x58) = 0;
*(int8 *)(this + 0x60) = 0;
*(int8 *)(this + 0x68) = 0;
*(int8 *)(this + 0x70) = 0;
*(parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
**)(this + 0x78) = this + 0x88;
*(int8 *)(this + 0x80) = 0;
this[0x88] = (parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
)0x0;
*(char **)(this + 0x98) = "";
*(int8 *)(this + 0xa0) = 0;
*(int8 *)(this + 0xa8) = 0;
*(int8 *)(this + 0xb0) = 0;
cVar2 = 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_decimal_point();
*(int *)(this + 0xb8) = (int)cVar2;
this[0xc0] = param_4;
/* try { // try from 0016bced to 0016bcf4 has its CatchHandler @ 0016bd01 */
uVar3 = 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((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 + 0x28));
*(int4 *)(this + 0x20) = uVar3;
return;
}
| |
33,551 | google::protobuf::internal::EpsCopyInputStream::InitFrom(google::protobuf::stringpiece_internal::StringPiece) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/parse_context.h | const char* InitFrom(StringPiece flat) {
overall_limit_ = 0;
if (flat.size() > kSlopBytes) {
limit_ = kSlopBytes;
limit_end_ = buffer_end_ = flat.data() + flat.size() - kSlopBytes;
next_chunk_ = buffer_;
if (aliasing_ == kOnPatch) aliasing_ = kNoDelta;
return flat.data();
} else {
std::memcpy(buffer_, flat.data(), flat.size());
limit_ = 0;
limit_end_ = buffer_end_ = buffer_ + flat.size();
next_chunk_ = nullptr;
if (aliasing_ == kOnPatch) {
aliasing_ = reinterpret_cast<std::uintptr_t>(flat.data()) -
reinterpret_cast<std::uintptr_t>(buffer_);
}
return buffer_;
}
} | O0 | c | google::protobuf::internal::EpsCopyInputStream::InitFrom(google::protobuf::stringpiece_internal::StringPiece):
subq $0x48, %rsp
movq %rsi, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x20(%rsp)
movl $0x0, 0x54(%rax)
leaq 0x30(%rsp), %rdi
callq 0x178030
cmpq $0x10, %rax
jbe 0x177f77
movq 0x20(%rsp), %rax
movl $0x10, 0x1c(%rax)
leaq 0x30(%rsp), %rdi
callq 0x178040
movq %rax, 0x18(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x178030
movq 0x18(%rsp), %rcx
movq %rax, %rdx
movq 0x20(%rsp), %rax
addq %rdx, %rcx
addq $-0x10, %rcx
movq %rcx, 0x8(%rax)
movq %rcx, (%rax)
movq %rax, %rcx
addq $0x28, %rcx
movq %rcx, 0x10(%rax)
cmpq $0x1, 0x48(%rax)
jne 0x177f63
movq 0x20(%rsp), %rax
movq $0x2, 0x48(%rax)
leaq 0x30(%rsp), %rdi
callq 0x178040
movq %rax, 0x40(%rsp)
jmp 0x178021
movq 0x20(%rsp), %rax
addq $0x28, %rax
movq %rax, (%rsp)
leaq 0x30(%rsp), %rdi
callq 0x178040
movq %rax, 0x8(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x178030
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
movq %rax, %rdx
callq 0x8b800
movq 0x20(%rsp), %rax
movl $0x0, 0x1c(%rax)
addq $0x28, %rax
movq %rax, 0x10(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x178030
movq 0x10(%rsp), %rcx
movq %rax, %rdx
movq 0x20(%rsp), %rax
addq %rdx, %rcx
movq %rcx, 0x8(%rax)
movq %rcx, (%rax)
movq $0x0, 0x10(%rax)
cmpq $0x1, 0x48(%rax)
jne 0x178013
leaq 0x30(%rsp), %rdi
callq 0x178040
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rax, %rdx
addq $0x28, %rdx
subq %rdx, %rcx
movq %rcx, 0x48(%rax)
movq 0x20(%rsp), %rax
addq $0x28, %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopl (%rax,%rax)
| _ZN6google8protobuf8internal18EpsCopyInputStream8InitFromENS0_20stringpiece_internal11StringPieceE:
sub rsp, 48h
mov [rsp+48h+var_18], rsi
mov [rsp+48h+var_10], rdx
mov [rsp+48h+var_20], rdi
mov rax, [rsp+48h+var_20]
mov [rsp+48h+var_28], rax
mov dword ptr [rax+54h], 0
lea rdi, [rsp+48h+var_18]; this
call _ZNK6google8protobuf20stringpiece_internal11StringPiece4sizeEv; google::protobuf::stringpiece_internal::StringPiece::size(void)
cmp rax, 10h
jbe short loc_177F77
mov rax, [rsp+48h+var_28]
mov dword ptr [rax+1Ch], 10h
lea rdi, [rsp+48h+var_18]; this
call _ZNK6google8protobuf20stringpiece_internal11StringPiece4dataEv; google::protobuf::stringpiece_internal::StringPiece::data(void)
mov [rsp+48h+var_30], rax
lea rdi, [rsp+48h+var_18]; this
call _ZNK6google8protobuf20stringpiece_internal11StringPiece4sizeEv; google::protobuf::stringpiece_internal::StringPiece::size(void)
mov rcx, [rsp+48h+var_30]
mov rdx, rax
mov rax, [rsp+48h+var_28]
add rcx, rdx
add rcx, 0FFFFFFFFFFFFFFF0h
mov [rax+8], rcx
mov [rax], rcx
mov rcx, rax
add rcx, 28h ; '('
mov [rax+10h], rcx
cmp qword ptr [rax+48h], 1
jnz short loc_177F63
mov rax, [rsp+48h+var_28]
mov qword ptr [rax+48h], 2
loc_177F63:
lea rdi, [rsp+48h+var_18]; this
call _ZNK6google8protobuf20stringpiece_internal11StringPiece4dataEv; google::protobuf::stringpiece_internal::StringPiece::data(void)
mov [rsp+48h+var_8], rax
jmp loc_178021
loc_177F77:
mov rax, [rsp+48h+var_28]
add rax, 28h ; '('
mov [rsp+48h+var_48], rax
lea rdi, [rsp+48h+var_18]; this
call _ZNK6google8protobuf20stringpiece_internal11StringPiece4dataEv; google::protobuf::stringpiece_internal::StringPiece::data(void)
mov [rsp+48h+var_40], rax
lea rdi, [rsp+48h+var_18]; this
call _ZNK6google8protobuf20stringpiece_internal11StringPiece4sizeEv; google::protobuf::stringpiece_internal::StringPiece::size(void)
mov rdi, [rsp+48h+var_48]
mov rsi, [rsp+48h+var_40]
mov rdx, rax
call _memcpy
mov rax, [rsp+48h+var_28]
mov dword ptr [rax+1Ch], 0
add rax, 28h ; '('
mov [rsp+48h+var_38], rax
lea rdi, [rsp+48h+var_18]; this
call _ZNK6google8protobuf20stringpiece_internal11StringPiece4sizeEv; google::protobuf::stringpiece_internal::StringPiece::size(void)
mov rcx, [rsp+48h+var_38]
mov rdx, rax
mov rax, [rsp+48h+var_28]
add rcx, rdx
mov [rax+8], rcx
mov [rax], rcx
mov qword ptr [rax+10h], 0
cmp qword ptr [rax+48h], 1
jnz short loc_178013
lea rdi, [rsp+48h+var_18]; this
call _ZNK6google8protobuf20stringpiece_internal11StringPiece4dataEv; google::protobuf::stringpiece_internal::StringPiece::data(void)
mov rcx, rax
mov rax, [rsp+48h+var_28]
mov rdx, rax
add rdx, 28h ; '('
sub rcx, rdx
mov [rax+48h], rcx
loc_178013:
mov rax, [rsp+48h+var_28]
add rax, 28h ; '('
mov [rsp+48h+var_8], rax
loc_178021:
mov rax, [rsp+48h+var_8]
add rsp, 48h
retn
| long long google::protobuf::internal::EpsCopyInputStream::InitFrom(long long a1, long long a2, long long a3)
{
long long v3; // rcx
long long v4; // rax
long long v5; // rax
long long v7; // [rsp+8h] [rbp-40h]
long long v8; // [rsp+18h] [rbp-30h]
_QWORD v9[2]; // [rsp+30h] [rbp-18h] BYREF
v9[0] = a2;
v9[1] = a3;
*(_DWORD *)(a1 + 84) = 0;
if ( (unsigned long long)google::protobuf::stringpiece_internal::StringPiece::size((google::protobuf::stringpiece_internal::StringPiece *)v9) <= 0x10 )
{
v7 = google::protobuf::stringpiece_internal::StringPiece::data((google::protobuf::stringpiece_internal::StringPiece *)v9);
v4 = google::protobuf::stringpiece_internal::StringPiece::size((google::protobuf::stringpiece_internal::StringPiece *)v9);
memcpy(a1 + 40, v7, v4);
*(_DWORD *)(a1 + 28) = 0;
v5 = google::protobuf::stringpiece_internal::StringPiece::size((google::protobuf::stringpiece_internal::StringPiece *)v9);
*(_QWORD *)(a1 + 8) = v5 + a1 + 40;
*(_QWORD *)a1 = v5 + a1 + 40;
*(_QWORD *)(a1 + 16) = 0LL;
if ( *(_QWORD *)(a1 + 72) == 1LL )
*(_QWORD *)(a1 + 72) = google::protobuf::stringpiece_internal::StringPiece::data((google::protobuf::stringpiece_internal::StringPiece *)v9)
- (a1
+ 40);
return a1 + 40;
}
else
{
*(_DWORD *)(a1 + 28) = 16;
v8 = google::protobuf::stringpiece_internal::StringPiece::data((google::protobuf::stringpiece_internal::StringPiece *)v9);
v3 = google::protobuf::stringpiece_internal::StringPiece::size((google::protobuf::stringpiece_internal::StringPiece *)v9)
+ v8
- 16;
*(_QWORD *)(a1 + 8) = v3;
*(_QWORD *)a1 = v3;
*(_QWORD *)(a1 + 16) = a1 + 40;
if ( *(_QWORD *)(a1 + 72) == 1LL )
*(_QWORD *)(a1 + 72) = 2LL;
return google::protobuf::stringpiece_internal::StringPiece::data((google::protobuf::stringpiece_internal::StringPiece *)v9);
}
}
| |||
33,552 | google::protobuf::internal::EpsCopyInputStream::InitFrom(google::protobuf::stringpiece_internal::StringPiece) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/parse_context.h | const char* InitFrom(StringPiece flat) {
overall_limit_ = 0;
if (flat.size() > kSlopBytes) {
limit_ = kSlopBytes;
limit_end_ = buffer_end_ = flat.data() + flat.size() - kSlopBytes;
next_chunk_ = buffer_;
if (aliasing_ == kOnPatch) aliasing_ = kNoDelta;
return flat.data();
} else {
std::memcpy(buffer_, flat.data(), flat.size());
limit_ = 0;
limit_end_ = buffer_end_ = buffer_ + flat.size();
next_chunk_ = nullptr;
if (aliasing_ == kOnPatch) {
aliasing_ = reinterpret_cast<std::uintptr_t>(flat.data()) -
reinterpret_cast<std::uintptr_t>(buffer_);
}
return buffer_;
}
} | O3 | c | google::protobuf::internal::EpsCopyInputStream::InitFrom(google::protobuf::stringpiece_internal::StringPiece):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movl $0x0, 0x54(%rdi)
cmpq $0x11, %rdx
jb 0x7c7fd
movl $0x10, 0x1c(%r14)
leaq (%rbx,%r12), %rax
addq $-0x10, %rax
movq %rax, 0x8(%r14)
movq %rax, (%r14)
leaq 0x28(%r14), %rax
movq %rax, 0x10(%r14)
movl $0x2, %eax
cmpq $0x1, 0x48(%r14)
je 0x7c83e
jmp 0x7c847
leaq 0x28(%r14), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x2ceb0
movl $0x0, 0x1c(%r14)
leaq (%r14,%r12), %rax
addq $0x28, %rax
movq %rax, 0x8(%r14)
movq %rax, (%r14)
movq $0x0, 0x10(%r14)
cmpq $0x1, 0x48(%r14)
jne 0x7c844
subq %r15, %rbx
movq %rbx, %rax
movq %r15, %rbx
movq %rax, 0x48(%r14)
jmp 0x7c847
movq %r15, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| _ZN6google8protobuf8internal18EpsCopyInputStream8InitFromENS0_20stringpiece_internal11StringPieceE:
push r15
push r14
push r12
push rbx
push rax
mov r12, rdx
mov rbx, rsi
mov r14, rdi
mov dword ptr [rdi+54h], 0
cmp rdx, 11h
jb short loc_7C7FD
mov dword ptr [r14+1Ch], 10h
lea rax, [rbx+r12]
add rax, 0FFFFFFFFFFFFFFF0h
mov [r14+8], rax
mov [r14], rax
lea rax, [r14+28h]
mov [r14+10h], rax
mov eax, 2
cmp qword ptr [r14+48h], 1
jz short loc_7C83E
jmp short loc_7C847
loc_7C7FD:
lea r15, [r14+28h]
mov rdi, r15
mov rsi, rbx
mov rdx, r12
call _memcpy
mov dword ptr [r14+1Ch], 0
lea rax, [r14+r12]
add rax, 28h ; '('
mov [r14+8], rax
mov [r14], rax
mov qword ptr [r14+10h], 0
cmp qword ptr [r14+48h], 1
jnz short loc_7C844
sub rbx, r15
mov rax, rbx
mov rbx, r15
loc_7C83E:
mov [r14+48h], rax
jmp short loc_7C847
loc_7C844:
mov rbx, r15
loc_7C847:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| long long google::protobuf::internal::EpsCopyInputStream::InitFrom(
long long a1,
long long a2,
unsigned long long a3)
{
long long v4; // rbx
long long v5; // rax
long long v6; // rax
long long v7; // rax
v4 = a2;
*(_DWORD *)(a1 + 84) = 0;
if ( a3 < 0x11 )
{
memcpy(a1 + 40);
*(_DWORD *)(a1 + 28) = 0;
v7 = a1 + a3 + 40;
*(_QWORD *)(a1 + 8) = v7;
*(_QWORD *)a1 = v7;
*(_QWORD *)(a1 + 16) = 0LL;
if ( *(_QWORD *)(a1 + 72) != 1LL )
return a1 + 40;
v6 = a2 - (a1 + 40);
v4 = a1 + 40;
}
else
{
*(_DWORD *)(a1 + 28) = 16;
v5 = a2 + a3 - 16;
*(_QWORD *)(a1 + 8) = v5;
*(_QWORD *)a1 = v5;
*(_QWORD *)(a1 + 16) = a1 + 40;
v6 = 2LL;
if ( *(_QWORD *)(a1 + 72) != 1LL )
return v4;
}
*(_QWORD *)(a1 + 72) = v6;
return v4;
}
| InitFrom:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R12,RDX
MOV RBX,RSI
MOV R14,RDI
MOV dword ptr [RDI + 0x54],0x0
CMP RDX,0x11
JC 0x0017c7fd
MOV dword ptr [R14 + 0x1c],0x10
LEA RAX,[RBX + R12*0x1]
ADD RAX,-0x10
MOV qword ptr [R14 + 0x8],RAX
MOV qword ptr [R14],RAX
LEA RAX,[R14 + 0x28]
MOV qword ptr [R14 + 0x10],RAX
MOV EAX,0x2
CMP qword ptr [R14 + 0x48],0x1
JZ 0x0017c83e
JMP 0x0017c847
LAB_0017c7fd:
LEA R15,[R14 + 0x28]
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R12
CALL 0x0012ceb0
MOV dword ptr [R14 + 0x1c],0x0
LEA RAX,[R14 + R12*0x1]
ADD RAX,0x28
MOV qword ptr [R14 + 0x8],RAX
MOV qword ptr [R14],RAX
MOV qword ptr [R14 + 0x10],0x0
CMP qword ptr [R14 + 0x48],0x1
JNZ 0x0017c844
SUB RBX,R15
MOV RAX,RBX
MOV RBX,R15
LAB_0017c83e:
MOV qword ptr [R14 + 0x48],RAX
JMP 0x0017c847
LAB_0017c844:
MOV RBX,R15
LAB_0017c847:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* google::protobuf::internal::EpsCopyInputStream::InitFrom(google::protobuf::stringpiece_internal::StringPiece)
*/
long * google::protobuf::internal::EpsCopyInputStream::InitFrom
(long *param_1,long *param_2,ulong param_3)
{
long lVar1;
long *__dest;
*(int4 *)((long)param_1 + 0x54) = 0;
if (param_3 < 0x11) {
__dest = param_1 + 5;
memcpy(__dest,param_2,param_3);
*(int4 *)((long)param_1 + 0x1c) = 0;
lVar1 = (long)param_1 + param_3 + 0x28;
param_1[1] = lVar1;
*param_1 = lVar1;
param_1[2] = 0;
if (param_1[9] != 1) {
return __dest;
}
lVar1 = (long)param_2 - (long)__dest;
}
else {
*(int4 *)((long)param_1 + 0x1c) = 0x10;
lVar1 = (long)param_2 + (param_3 - 0x10);
param_1[1] = lVar1;
*param_1 = lVar1;
param_1[2] = (long)(param_1 + 5);
lVar1 = 2;
__dest = param_2;
if (param_1[9] != 1) {
return param_2;
}
}
param_1[9] = lVar1;
return __dest;
}
| |
33,553 | my_hash_iterate | eloqsql/mysys/hash.c | my_bool my_hash_iterate(HASH *hash, my_hash_walk_action action, void *argument)
{
uint records, i;
records= hash->records;
for (i= 0 ; i < records ; i++)
{
if ((*action)(dynamic_element(&hash->array, i, HASH_LINK *)->data,
argument))
return 1;
}
return 0;
} | O3 | c | my_hash_iterate:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl 0x18(%rdi), %r12d
testq %r12, %r12
je 0x9476c
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
shlq $0x4, %r12
xorl %r13d, %r13d
movq 0x28(%r15), %rax
movq 0x8(%rax,%r13), %rdi
movq %rbx, %rsi
callq *%r14
testb %al, %al
jne 0x94770
addq $0x10, %r13
cmpq %r13, %r12
jne 0x94750
xorl %eax, %eax
jmp 0x94772
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
| my_hash_iterate:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12d, [rdi+18h]
test r12, r12
jz short loc_9476C
mov rbx, rdx
mov r14, rsi
mov r15, rdi
shl r12, 4
xor r13d, r13d
loc_94750:
mov rax, [r15+28h]
mov rdi, [rax+r13+8]
mov rsi, rbx
call r14
test al, al
jnz short loc_94770
add r13, 10h
cmp r12, r13
jnz short loc_94750
loc_9476C:
xor eax, eax
jmp short loc_94772
loc_94770:
mov al, 1
loc_94772:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| char my_hash_iterate(long long a1, unsigned __int8 ( *a2)(_QWORD, long long), long long a3)
{
long long v4; // r12
long long v5; // r13
if ( !*(_DWORD *)(a1 + 24) )
return 0;
v4 = 16LL * *(unsigned int *)(a1 + 24);
v5 = 0LL;
while ( !a2(*(_QWORD *)(*(_QWORD *)(a1 + 40) + v5 + 8), a3) )
{
v5 += 16LL;
if ( v4 == v5 )
return 0;
}
return 1;
}
| my_hash_iterate:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12D,dword ptr [RDI + 0x18]
TEST R12,R12
JZ 0x0019476c
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
SHL R12,0x4
XOR R13D,R13D
LAB_00194750:
MOV RAX,qword ptr [R15 + 0x28]
MOV RDI,qword ptr [RAX + R13*0x1 + 0x8]
MOV RSI,RBX
CALL R14
TEST AL,AL
JNZ 0x00194770
ADD R13,0x10
CMP R12,R13
JNZ 0x00194750
LAB_0019476c:
XOR EAX,EAX
JMP 0x00194772
LAB_00194770:
MOV AL,0x1
LAB_00194772:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 my_hash_iterate(long param_1,code *param_2,int8 param_3)
{
uint uVar1;
char cVar2;
long lVar3;
uVar1 = *(uint *)(param_1 + 0x18);
if ((ulong)uVar1 != 0) {
lVar3 = 0;
do {
cVar2 = (*param_2)(*(int8 *)(*(long *)(param_1 + 0x28) + 8 + lVar3),param_3);
if (cVar2 != '\0') {
return 1;
}
lVar3 = lVar3 + 0x10;
} while ((ulong)uVar1 << 4 != lVar3);
}
return 0;
}
| |
33,554 | tree_walk | eloqsql/mysys/tree.c | int tree_walk(TREE *tree, tree_walk_action action, void *argument, TREE_WALK visit)
{
switch (visit) {
case left_root_right:
return tree_walk_left_root_right(tree,tree->root,action,argument);
case right_root_left:
return tree_walk_right_root_left(tree,tree->root,action,argument);
}
return 0; /* Keep gcc happy */
} | O3 | c | tree_walk:
pushq %rbp
movq %rsp, %rbp
movq %rdx, %rax
movq %rsi, %rdx
cmpl $0x1, %ecx
je 0x61317
testl %ecx, %ecx
jne 0x61323
movq (%rdi), %rsi
movq %rax, %rcx
popq %rbp
jmp 0x61327
movq (%rdi), %rsi
movq %rax, %rcx
popq %rbp
jmp 0x613a8
xorl %eax, %eax
popq %rbp
retq
| tree_walk:
push rbp
mov rbp, rsp
mov rax, rdx
mov rdx, rsi
cmp ecx, 1
jz short loc_61317
test ecx, ecx
jnz short loc_61323
mov rsi, [rdi]
mov rcx, rax
pop rbp
jmp short tree_walk_left_root_right
loc_61317:
mov rsi, [rdi]
mov rcx, rax
pop rbp
jmp tree_walk_right_root_left
loc_61323:
xor eax, eax
pop rbp
retn
| long long tree_walk(_QWORD *a1, long long a2, long long a3, int a4)
{
if ( a4 == 1 )
return tree_walk_right_root_left(a1, *a1, a2, a3);
if ( a4 )
return 0LL;
return tree_walk_left_root_right(a1, *a1, a2, a3);
}
| tree_walk:
PUSH RBP
MOV RBP,RSP
MOV RAX,RDX
MOV RDX,RSI
CMP ECX,0x1
JZ 0x00161317
TEST ECX,ECX
JNZ 0x00161323
MOV RSI,qword ptr [RDI]
MOV RCX,RAX
POP RBP
JMP 0x00161327
LAB_00161317:
MOV RSI,qword ptr [RDI]
MOV RCX,RAX
POP RBP
JMP 0x001613a8
LAB_00161323:
XOR EAX,EAX
POP RBP
RET
|
int8 tree_walk(int8 *param_1,int8 param_2,int8 param_3,int param_4)
{
int8 uVar1;
if (param_4 == 1) {
uVar1 = tree_walk_right_root_left(param_1,*param_1,param_2,param_3);
return uVar1;
}
if (param_4 == 0) {
uVar1 = tree_walk_left_root_right(param_1,*param_1,param_2,param_3);
return uVar1;
}
return 0;
}
| |
33,555 | r3d_primitive_load_cube | r3d/src/details/r3d_primitives.c | r3d_primitive_t r3d_primitive_load_cube(void)
{
static const float VERTICES[] =
{
// Positions // Normals // Texcoords
-1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, // Front top-left
-1.0f, -1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, // Front bottom-left
1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, // Front top-right
1.0f, -1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, // Front bottom-right
-1.0f, 1.0f, -1.0f, 0.0f, 0.0f, -1.0f, 1.0f, 1.0f, // Back top-left
-1.0f, -1.0f, -1.0f, 0.0f, 0.0f, -1.0f, 1.0f, 0.0f, // Back bottom-left
1.0f, 1.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 1.0f, // Back top-right
1.0f, -1.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f, // Back bottom-right
};
static const unsigned short INDICES[] =
{
// Front face
0, 1, 2, 2, 1, 3,
// Back face
4, 5, 6, 6, 5, 7,
// Left face
4, 5, 0, 0, 5, 1,
// Right face
2, 3, 6, 6, 3, 7,
// Top face
4, 0, 6, 6, 0, 2,
// Bottom face
1, 5, 3, 3, 5, 7
};
r3d_primitive_t cube = { 0 };
cube.vao = rlLoadVertexArray();
rlEnableVertexArray(cube.vao);
cube.ebo = rlLoadVertexBufferElement(INDICES, sizeof(INDICES), false);
cube.vbo = rlLoadVertexBuffer(VERTICES, sizeof(VERTICES), false);
rlSetVertexAttribute(RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION, 3, RL_FLOAT, false, 8 * sizeof(float), 0);
rlSetVertexAttribute(RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD, 2, RL_FLOAT, false, 8 * sizeof(float), 6 * sizeof(float));
rlSetVertexAttribute(RL_DEFAULT_SHADER_ATTRIB_LOCATION_NORMAL, 3, RL_FLOAT, false, 8 * sizeof(float), 3 * sizeof(float));
rlEnableVertexAttribute(RL_DEFAULT_SHADER_ATTRIB_LOCATION_POSITION);
rlEnableVertexAttribute(RL_DEFAULT_SHADER_ATTRIB_LOCATION_TEXCOORD);
rlEnableVertexAttribute(RL_DEFAULT_SHADER_ATTRIB_LOCATION_NORMAL);
rlDisableVertexArray();
return cube;
} | O3 | c | r3d_primitive_load_cube:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
callq 0x1ecd8
movl %eax, %ebx
movl %eax, %edi
callq 0x1ec11
leaq 0x92cce(%rip), %rdi # 0x1651d0
movl $0x48, %esi
xorl %edx, %edx
callq 0x1ead4
movl %eax, %r14d
leaq 0x92bb8(%rip), %rdi # 0x1650d0
movl $0x100, %esi # imm = 0x100
xorl %edx, %edx
callq 0x1ea6b
movl %eax, %r15d
xorl %edi, %edi
movl $0x3, %esi
movl $0x1406, %edx # imm = 0x1406
xorl %ecx, %ecx
movl $0x20, %r8d
xorl %r9d, %r9d
callq 0x1ed0b
movl $0x1, %edi
movl $0x2, %esi
movl $0x1406, %edx # imm = 0x1406
xorl %ecx, %ecx
movl $0x20, %r8d
movl $0x18, %r9d
callq 0x1ed0b
movl $0x2, %edi
movl $0x3, %esi
movl $0x1406, %edx # imm = 0x1406
xorl %ecx, %ecx
movl $0x20, %r8d
movl $0xc, %r9d
callq 0x1ed0b
xorl %edi, %edi
callq 0x1ec49
movl $0x1, %edi
callq 0x1ec49
movl $0x2, %edi
callq 0x1ec49
callq 0x1ec31
shlq $0x20, %r15
movl %ebx, %eax
orq %r15, %rax
movl %r14d, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| r3d_primitive_load_cube:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
call rlLoadVertexArray
mov ebx, eax
mov edi, eax
call rlEnableVertexArray
lea rdi, r3d_primitive_load_cube_INDICES
mov esi, 48h ; 'H'
xor edx, edx
call rlLoadVertexBufferElement
mov r14d, eax
lea rdi, r3d_primitive_load_cube_VERTICES
mov esi, 100h
xor edx, edx
call rlLoadVertexBuffer
mov r15d, eax
xor edi, edi
mov esi, 3
mov edx, 1406h
xor ecx, ecx
mov r8d, 20h ; ' '
xor r9d, r9d
call rlSetVertexAttribute
mov edi, 1
mov esi, 2
mov edx, 1406h
xor ecx, ecx
mov r8d, 20h ; ' '
mov r9d, 18h
call rlSetVertexAttribute
mov edi, 2
mov esi, 3
mov edx, 1406h
xor ecx, ecx
mov r8d, 20h ; ' '
mov r9d, 0Ch
call rlSetVertexAttribute
xor edi, edi
call rlEnableVertexAttribute
mov edi, 1
call rlEnableVertexAttribute
mov edi, 2
call rlEnableVertexAttribute
call rlDisableVertexArray
shl r15, 20h
mov eax, ebx
or rax, r15
mov edx, r14d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long r3d_primitive_load_cube(long long a1)
{
long long VertexArray; // rbx
long long VertexBuffer; // r15
VertexArray = (unsigned int)rlLoadVertexArray(a1);
rlEnableVertexArray(VertexArray);
rlLoadVertexBufferElement((long long)&r3d_primitive_load_cube_INDICES, 72, 0);
VertexBuffer = (unsigned int)rlLoadVertexBuffer((long long)&r3d_primitive_load_cube_VERTICES, 256, 0);
rlSetVertexAttribute(0LL, 3LL, 5126LL, 0LL, 32LL, 0);
rlSetVertexAttribute(1LL, 2LL, 5126LL, 0LL, 32LL, 24);
rlSetVertexAttribute(2LL, 3LL, 5126LL, 0LL, 32LL, 12);
rlEnableVertexAttribute(0LL);
rlEnableVertexAttribute(1LL);
rlEnableVertexAttribute(2LL);
rlDisableVertexArray(2LL);
return (VertexBuffer << 32) | (unsigned int)VertexArray;
}
| r3d_primitive_load_cube:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
CALL 0x0011ecd8
MOV EBX,EAX
MOV EDI,EAX
CALL 0x0011ec11
LEA RDI,[0x2651d0]
MOV ESI,0x48
XOR EDX,EDX
CALL 0x0011ead4
MOV R14D,EAX
LEA RDI,[0x2650d0]
MOV ESI,0x100
XOR EDX,EDX
CALL 0x0011ea6b
MOV R15D,EAX
XOR EDI,EDI
MOV ESI,0x3
MOV EDX,0x1406
XOR ECX,ECX
MOV R8D,0x20
XOR R9D,R9D
CALL 0x0011ed0b
MOV EDI,0x1
MOV ESI,0x2
MOV EDX,0x1406
XOR ECX,ECX
MOV R8D,0x20
MOV R9D,0x18
CALL 0x0011ed0b
MOV EDI,0x2
MOV ESI,0x3
MOV EDX,0x1406
XOR ECX,ECX
MOV R8D,0x20
MOV R9D,0xc
CALL 0x0011ed0b
XOR EDI,EDI
CALL 0x0011ec49
MOV EDI,0x1
CALL 0x0011ec49
MOV EDI,0x2
CALL 0x0011ec49
CALL 0x0011ec31
SHL R15,0x20
MOV EAX,EBX
OR RAX,R15
MOV EDX,R14D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int1 [16] r3d_primitive_load_cube(void)
{
int4 uVar1;
int4 uVar2;
int1 auVar3 [16];
auVar3._0_4_ = rlLoadVertexArray();
rlEnableVertexArray(auVar3._0_4_);
uVar1 = rlLoadVertexBufferElement(r3d_primitive_load_cube_INDICES,0x48,0);
uVar2 = rlLoadVertexBuffer(r3d_primitive_load_cube_VERTICES,0x100,0);
rlSetVertexAttribute(0,3,0x1406,0,0x20,0);
rlSetVertexAttribute(1,2,0x1406,0,0x20,0x18);
rlSetVertexAttribute(2,3,0x1406,0,0x20,0xc);
rlEnableVertexAttribute(0);
rlEnableVertexAttribute(1);
rlEnableVertexAttribute(2);
rlDisableVertexArray();
auVar3._4_4_ = uVar2;
auVar3._8_4_ = uVar1;
auVar3._12_4_ = 0;
return auVar3;
}
| |
33,556 | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::end_array() | monkey531[P]llama/common/json.hpp | bool end_array()
{
bool keep = true;
if (ref_stack.back())
{
keep = callback(static_cast<int>(ref_stack.size()) - 1, parse_event_t::array_end, *ref_stack.back());
if (keep)
{
ref_stack.back()->set_parents();
}
else
{
// discard array
*ref_stack.back() = discarded;
}
}
JSON_ASSERT(!ref_stack.empty());
JSON_ASSERT(!keep_stack.empty());
ref_stack.pop_back();
keep_stack.pop_back();
// remove discarded value
if (!keep && !ref_stack.empty() && ref_stack.back()->is_array())
{
ref_stack.back()->m_data.m_value.array->pop_back();
}
return true;
} | O0 | cpp | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::end_array():
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movb $0x1, 0x2f(%rsp)
addq $0x8, %rdi
callq 0xae1c0
cmpq $0x0, (%rax)
je 0xad482
movq 0x10(%rsp), %rdi
movq %rdi, %rax
addq $0x80, %rax
movq %rax, (%rsp)
addq $0x8, %rdi
callq 0xadbd0
movq 0x10(%rsp), %rdi
subl $0x1, %eax
movl %eax, 0xc(%rsp)
addq $0x8, %rdi
callq 0xae1c0
movq (%rsp), %rdi
movl 0xc(%rsp), %esi
movq (%rax), %rcx
movl $0x3, %edx
callq 0xadb70
andb $0x1, %al
movb %al, 0x2f(%rsp)
testb $0x1, 0x2f(%rsp)
je 0xad445
movq 0x10(%rsp), %rdi
addq $0x8, %rdi
callq 0xae1c0
movq (%rax), %rdi
callq 0xae910
jmp 0xad480
movq 0x10(%rsp), %rsi
addq $0xa8, %rsi
leaq 0x18(%rsp), %rdi
callq 0xafbb0
movq 0x10(%rsp), %rdi
addq $0x8, %rdi
callq 0xae1c0
movq (%rax), %rdi
leaq 0x18(%rsp), %rsi
callq 0xa85f0
leaq 0x18(%rsp), %rdi
callq 0x9f450
jmp 0xad482
movq 0x10(%rsp), %rdi
addq $0x8, %rdi
callq 0xae610
testb $0x1, %al
jne 0xad496
jmp 0xad4b7
leaq 0x15ef11(%rip), %rdi # 0x20c3ae
movl $0x1bf5, %esi # imm = 0x1BF5
leaq 0x158d2d(%rip), %rdx # 0x2061d6
leaq 0x15ff04(%rip), %rcx # 0x20d3b4
movb $0x0, %al
callq 0x5aee0
movq 0x10(%rsp), %rdi
addq $0x20, %rdi
callq 0xada50
testb $0x1, %al
jne 0xad4cb
jmp 0xad4ec
leaq 0x15eedc(%rip), %rdi # 0x20c3ae
movl $0x1bf6, %esi # imm = 0x1BF6
leaq 0x158cf8(%rip), %rdx # 0x2061d6
leaq 0x15fe49(%rip), %rcx # 0x20d32e
movb $0x0, %al
callq 0x5aee0
movq 0x10(%rsp), %rdi
addq $0x8, %rdi
callq 0xafda0
movq 0x10(%rsp), %rdi
addq $0x20, %rdi
callq 0xadb50
testb $0x1, 0x2f(%rsp)
jne 0xad557
movq 0x10(%rsp), %rdi
addq $0x8, %rdi
callq 0xae610
testb $0x1, %al
jne 0xad557
movq 0x10(%rsp), %rdi
addq $0x8, %rdi
callq 0xae1c0
movq (%rax), %rdi
callq 0xae710
testb $0x1, %al
jne 0xad53d
jmp 0xad557
movq 0x10(%rsp), %rdi
addq $0x8, %rdi
callq 0xae1c0
movq (%rax), %rax
movq 0x8(%rax), %rdi
callq 0xb3c40
movb $0x1, %al
andb $0x1, %al
addq $0x38, %rsp
retq
| _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9end_arrayEv:
sub rsp, 38h
mov [rsp+38h+var_8], rdi
mov rdi, [rsp+38h+var_8]
mov [rsp+38h+var_28], rdi
mov [rsp+38h+var_9], 1
add rdi, 8
call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<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> *>>::back(void)
cmp qword ptr [rax], 0
jz loc_AD482
mov rdi, [rsp+38h+var_28]
mov rax, rdi
add rax, 80h
mov [rsp+38h+var_38], rax
add rdi, 8
call _ZNKSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4sizeEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<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> *>>::size(void)
mov rdi, [rsp+38h+var_28]
sub eax, 1
mov [rsp+38h+var_2C], eax
add rdi, 8
call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<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> *>>::back(void)
mov rdi, [rsp+38h+var_38]
mov esi, [rsp+38h+var_2C]
mov rcx, [rax]
mov edx, 3
call _ZNKSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEclEiS3_SH_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::operator()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)
and al, 1
mov [rsp+38h+var_9], al
test [rsp+38h+var_9], 1
jz short loc_AD445
mov rdi, [rsp+38h+var_28]
add rdi, 8
call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<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> *>>::back(void)
mov rdi, [rax]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE11set_parentsEv; 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>::set_parents(void)
jmp short loc_AD480
loc_AD445:
mov rsi, [rsp+38h+var_28]
add rsi, 0A8h
lea rdi, [rsp+38h+var_20]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
mov rdi, [rsp+38h+var_28]
add rdi, 8
call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<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> *>>::back(void)
mov rdi, [rax]
lea rsi, [rsp+38h+var_20]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
lea rdi, [rsp+38h+var_20]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
loc_AD480:
jmp short $+2
loc_AD482:
mov rdi, [rsp+38h+var_28]
add rdi, 8
call _ZNKSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE5emptyEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::empty(void)
test al, 1
jnz short loc_AD496
jmp short loc_AD4B7
loc_AD496:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov esi, 1BF5h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aRefStackEmpty; "!ref_stack.empty()"
mov al, 0
call _ggml_abort
loc_AD4B7:
mov rdi, [rsp+38h+var_28]
add rdi, 20h ; ' '
call _ZNKSt6vectorIbSaIbEE5emptyEv; std::vector<bool>::empty(void)
test al, 1
jnz short loc_AD4CB
jmp short loc_AD4EC
loc_AD4CB:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov esi, 1BF6h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeepStackEmpty; "!keep_stack.empty()"
mov al, 0
call _ggml_abort
loc_AD4EC:
mov rdi, [rsp+38h+var_28]
add rdi, 8
call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE8pop_backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<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> *>>::pop_back(void)
mov rdi, [rsp+38h+var_28]
add rdi, 20h ; ' '
call _ZNSt6vectorIbSaIbEE8pop_backEv; std::vector<bool>::pop_back(void)
test [rsp+38h+var_9], 1
jnz short loc_AD557
mov rdi, [rsp+38h+var_28]
add rdi, 8
call _ZNKSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE5emptyEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::empty(void)
test al, 1
jnz short loc_AD557
mov rdi, [rsp+38h+var_28]
add rdi, 8
call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<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> *>>::back(void)
mov rdi, [rax]
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8is_arrayEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::is_array(void)
test al, 1
jnz short loc_AD53D
jmp short loc_AD557
loc_AD53D:
mov rdi, [rsp+38h+var_28]
add rdi, 8
call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<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> *>>::back(void)
mov rax, [rax]
mov rdi, [rax+8]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE8pop_backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::pop_back(void)
loc_AD557:
mov al, 1
and al, 1
add rsp, 38h
retn
| char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::end_array(
long long a1)
{
_QWORD *v1; // rax
int v2; // edx
int v3; // ecx
int v4; // r8d
int v5; // r9d
_QWORD *v6; // rax
long long *v7; // rax
_QWORD *v8; // rax
long long v9; // rax
int v11; // [rsp+8h] [rbp-30h]
unsigned int v12; // [rsp+Ch] [rbp-2Ch]
long long v13; // [rsp+10h] [rbp-28h]
_DWORD v14[5]; // [rsp+18h] [rbp-20h] BYREF
char v15; // [rsp+2Fh] [rbp-9h]
long long v16; // [rsp+30h] [rbp-8h]
v16 = a1;
v13 = a1;
v15 = 1;
if ( *(_QWORD *)std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<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> *>>::back(a1 + 8) )
{
v12 = std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<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> *>>::size(a1 + 8)
- 1;
v1 = (_QWORD *)std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<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> *>>::back(a1 + 8);
v15 = std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::operator()(
a1 + 128,
v12,
3LL,
*v1) & 1;
if ( v15 )
{
v6 = (_QWORD *)std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<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> *>>::back(a1 + 8);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::set_parents(*v6);
}
else
{
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
(unsigned int)v14,
a1 + 168,
v2,
v3,
v4,
v5,
a1 + 128,
v11,
a1,
v14[0],
v14[2]);
v7 = (long long *)std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<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> *>>::back(v13 + 8);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
*v7,
(long long)v14);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v14);
}
}
if ( (std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *>>::empty(v13 + 8) & 1) != 0 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7157LL,
"GGML_ASSERT(%s) failed",
"!ref_stack.empty()");
if ( (std::vector<bool>::empty(v13 + 32) & 1) != 0 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7158LL,
"GGML_ASSERT(%s) failed",
"!keep_stack.empty()");
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<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> *>>::pop_back(v13 + 8);
std::vector<bool>::pop_back(v13 + 32);
if ( (v15 & 1) == 0
&& (std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *>>::empty(v13 + 8) & 1) == 0 )
{
v8 = (_QWORD *)std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<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> *>>::back(v13 + 8);
if ( (nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::is_array(*v8) & 1) != 0 )
{
v9 = std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<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> *>>::back(v13 + 8);
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::pop_back(*(_QWORD *)(*(_QWORD *)v9 + 8LL));
}
}
return 1;
}
| end_array:
SUB RSP,0x38
MOV qword ptr [RSP + 0x30],RDI
MOV RDI,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x10],RDI
MOV byte ptr [RSP + 0x2f],0x1
ADD RDI,0x8
CALL 0x001ae1c0
CMP qword ptr [RAX],0x0
JZ 0x001ad482
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,RDI
ADD RAX,0x80
MOV qword ptr [RSP],RAX
ADD RDI,0x8
CALL 0x001adbd0
MOV RDI,qword ptr [RSP + 0x10]
SUB EAX,0x1
MOV dword ptr [RSP + 0xc],EAX
ADD RDI,0x8
CALL 0x001ae1c0
MOV RDI,qword ptr [RSP]
MOV ESI,dword ptr [RSP + 0xc]
MOV RCX,qword ptr [RAX]
MOV EDX,0x3
CALL 0x001adb70
AND AL,0x1
MOV byte ptr [RSP + 0x2f],AL
TEST byte ptr [RSP + 0x2f],0x1
JZ 0x001ad445
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,0x8
CALL 0x001ae1c0
MOV RDI,qword ptr [RAX]
CALL 0x001ae910
JMP 0x001ad480
LAB_001ad445:
MOV RSI,qword ptr [RSP + 0x10]
ADD RSI,0xa8
LEA RDI,[RSP + 0x18]
CALL 0x001afbb0
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,0x8
CALL 0x001ae1c0
MOV RDI,qword ptr [RAX]
LEA RSI,[RSP + 0x18]
CALL 0x001a85f0
LEA RDI,[RSP + 0x18]
CALL 0x0019f450
LAB_001ad480:
JMP 0x001ad482
LAB_001ad482:
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,0x8
CALL 0x001ae610
TEST AL,0x1
JNZ 0x001ad496
JMP 0x001ad4b7
LAB_001ad496:
LEA RDI,[0x30c3ae]
MOV ESI,0x1bf5
LEA RDX,[0x3061d6]
LEA RCX,[0x30d3b4]
MOV AL,0x0
CALL 0x0015aee0
LAB_001ad4b7:
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,0x20
CALL 0x001ada50
TEST AL,0x1
JNZ 0x001ad4cb
JMP 0x001ad4ec
LAB_001ad4cb:
LEA RDI,[0x30c3ae]
MOV ESI,0x1bf6
LEA RDX,[0x3061d6]
LEA RCX,[0x30d32e]
MOV AL,0x0
CALL 0x0015aee0
LAB_001ad4ec:
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,0x8
CALL 0x001afda0
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,0x20
CALL 0x001adb50
TEST byte ptr [RSP + 0x2f],0x1
JNZ 0x001ad557
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,0x8
CALL 0x001ae610
TEST AL,0x1
JNZ 0x001ad557
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,0x8
CALL 0x001ae1c0
MOV RDI,qword ptr [RAX]
CALL 0x001ae710
TEST AL,0x1
JNZ 0x001ad53d
JMP 0x001ad557
LAB_001ad53d:
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,0x8
CALL 0x001ae1c0
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x001b3c40
LAB_001ad557:
MOV AL,0x1
AND AL,0x1
ADD RSP,0x38
RET
|
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::end_array() */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::end_array(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this)
{
int iVar1;
long *plVar2;
int8 *puVar3;
ulong uVar4;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_20 [23];
byte local_9;
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*local_8;
local_9 = 1;
local_8 = this;
plVar2 = (long *)std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8));
if (*plVar2 != 0) {
iVar1 = std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
::size((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8));
puVar3 = (int8 *)
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8));
local_9 = std::
function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
::operator()((function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
*)(this + 0x80),iVar1 + -1,3,*puVar3);
local_9 = local_9 & 1;
if (local_9 == 0) {
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_20,this + 0xa8);
puVar3 = (int8 *)
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8));
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)*puVar3,local_20);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::~basic_json(local_20);
}
else {
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8));
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::set_parents();
}
}
uVar4 = std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
::empty((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8));
if ((uVar4 & 1) != 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1bf5,
"GGML_ASSERT(%s) failed","!ref_stack.empty()");
}
uVar4 = std::vector<bool,std::allocator<bool>>::empty
((vector<bool,std::allocator<bool>> *)(this + 0x20));
if ((uVar4 & 1) != 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1bf6,
"GGML_ASSERT(%s) failed","!keep_stack.empty()");
}
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
::pop_back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8));
std::vector<bool,std::allocator<bool>>::pop_back
((vector<bool,std::allocator<bool>> *)(this + 0x20));
if (((local_9 & 1) == 0) &&
(uVar4 = std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
::empty((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8)), (uVar4 & 1) == 0)) {
puVar3 = (int8 *)
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8));
uVar4 = basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::is_array((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)*puVar3);
if ((uVar4 & 1) != 0) {
plVar2 = (long *)std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>>
*)(this + 8));
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::pop_back(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(*plVar2 + 8));
}
}
return 1;
}
| |
33,557 | thr_multi_unlock | eloqsql/mysys/thr_lock.c | void thr_multi_unlock(THR_LOCK_DATA **data,uint count, uint unlock_flags)
{
THR_LOCK_DATA **pos,**end;
DBUG_ENTER("thr_multi_unlock");
DBUG_PRINT("lock",("data: %p count: %d flags: %u", data, count,
unlock_flags));
for (pos=data,end=data+count; pos < end ; pos++)
{
#ifdef MAIN
printf("Thread: %s Rel lock: %p type: %d\n",
my_thread_name(), pos[0]->lock, pos[0]->type);
fflush(stdout);
#endif
if ((*pos)->type != TL_UNLOCK)
thr_unlock(*pos, unlock_flags);
else
{
DBUG_PRINT("lock",("Free lock: data: %p thread:%lu lock: %p",
*pos, (ulong) (*pos)->owner->thread_id,
(*pos)->lock));
}
}
DBUG_VOID_RETURN;
} | O3 | c | thr_multi_unlock:
testl %esi, %esi
je 0xa343c
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rdi, %r14
movl %esi, %eax
leaq (%rdi,%rax,8), %r15
movq (%r14), %rdi
cmpl $0x0, 0x40(%rdi)
je 0xa3429
movl %ebx, %esi
callq 0xa2734
addq $0x8, %r14
cmpq %r15, %r14
jb 0xa3419
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| thr_multi_unlock:
test esi, esi
jz short locret_A343C
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov ebx, edx
mov r14, rdi
mov eax, esi
lea r15, [rdi+rax*8]
loc_A3419:
mov rdi, [r14]
cmp dword ptr [rdi+40h], 0
jz short loc_A3429
mov esi, ebx
call thr_unlock
loc_A3429:
add r14, 8
cmp r14, r15
jb short loc_A3419
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
locret_A343C:
retn
| long long thr_multi_unlock(long long *a1, unsigned int a2, char a3)
{
long long *v4; // r14
long long result; // rax
if ( a2 )
{
v4 = a1;
result = a2;
do
{
if ( *(_DWORD *)(*v4 + 64) )
result = thr_unlock(*v4, a3);
++v4;
}
while ( v4 < &a1[a2] );
}
return result;
}
| thr_multi_unlock:
TEST ESI,ESI
JZ 0x001a343c
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,EDX
MOV R14,RDI
MOV EAX,ESI
LEA R15,[RDI + RAX*0x8]
LAB_001a3419:
MOV RDI,qword ptr [R14]
CMP dword ptr [RDI + 0x40],0x0
JZ 0x001a3429
MOV ESI,EBX
CALL 0x001a2734
LAB_001a3429:
ADD R14,0x8
CMP R14,R15
JC 0x001a3419
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
LAB_001a343c:
RET
|
void thr_multi_unlock(long *param_1,uint param_2,int4 param_3)
{
long *plVar1;
if (param_2 != 0) {
plVar1 = param_1 + param_2;
do {
if (*(int *)(*param_1 + 0x40) != 0) {
thr_unlock(*param_1,param_3);
}
param_1 = param_1 + 1;
} while (param_1 < plVar1);
}
return;
}
| |
33,558 | my_strnxfrm_8bit_nopad_bin | eloqsql/strings/ctype-bin.c | static size_t
my_strnxfrm_8bit_nopad_bin(CHARSET_INFO *cs,
uchar * dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags)
{
set_if_smaller(srclen, dstlen);
set_if_smaller(srclen, nweights);
if (dst != src)
memcpy(dst, src, srclen);
return my_strxfrm_pad_desc_and_reverse_nopad(cs, dst, dst + srclen,
dst + dstlen,(uint)(nweights - srclen),
flags, 0);
} | O0 | c | my_strnxfrm_8bit_nopad_bin:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %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 -0x30(%rbp), %rax
cmpq -0x18(%rbp), %rax
jbe 0x364b4
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x364b6
jmp 0x364b8
movq -0x30(%rbp), %rax
movl -0x1c(%rbp), %ecx
cmpq %rcx, %rax
jbe 0x364cb
movl -0x1c(%rbp), %eax
movq %rax, -0x30(%rbp)
jmp 0x364cd
movq -0x10(%rbp), %rax
cmpq -0x28(%rbp), %rax
je 0x364e8
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x24210
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq -0x30(%rbp), %rdx
movq -0x10(%rbp), %rcx
addq -0x18(%rbp), %rcx
movl -0x1c(%rbp), %eax
subq -0x30(%rbp), %rax
movl %eax, %r8d
movl 0x10(%rbp), %r9d
xorl %eax, %eax
movl $0x0, (%rsp)
callq 0x42120
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_strnxfrm_8bit_nopad_bin:
push rbp
mov rbp, rsp
sub rsp, 40h
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_30]
cmp rax, [rbp+var_18]
jbe short loc_364B4
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
loc_364B4:
jmp short $+2
loc_364B6:
jmp short $+2
loc_364B8:
mov rax, [rbp+var_30]
mov ecx, [rbp+var_1C]
cmp rax, rcx
jbe short loc_364CB
mov eax, [rbp+var_1C]
mov [rbp+var_30], rax
loc_364CB:
jmp short $+2
loc_364CD:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_28]
jz short loc_364E8
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_30]
call _memcpy
loc_364E8:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_10]
add rdx, [rbp+var_30]
mov rcx, [rbp+var_10]
add rcx, [rbp+var_18]
mov eax, [rbp+var_1C]
sub rax, [rbp+var_30]
mov r8d, eax
mov r9d, [rbp+arg_0]
xor eax, eax
mov [rsp+40h+var_40], 0
call my_strxfrm_pad_desc_and_reverse_nopad
add rsp, 40h
pop rbp
retn
| long long my_strnxfrm_8bit_nopad_bin(
int a1,
long long a2,
unsigned long long a3,
unsigned int a4,
long long a5,
unsigned long long a6,
int a7)
{
unsigned long long v8; // [rsp+10h] [rbp-30h]
int v10; // [rsp+28h] [rbp-18h]
v10 = a3;
v8 = a6;
if ( a6 > a3 )
v8 = a3;
if ( v8 > a4 )
v8 = a4;
if ( a2 != a5 )
memcpy(a2, a5, v8);
return my_strxfrm_pad_desc_and_reverse_nopad(a1, a2, (int)v8 + (int)a2, v10 + (int)a2, a4 - (unsigned int)v8, a7, 0);
}
| my_strnxfrm_8bit_nopad_bin:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
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 + -0x30]
CMP RAX,qword ptr [RBP + -0x18]
JBE 0x001364b4
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
LAB_001364b4:
JMP 0x001364b6
LAB_001364b6:
JMP 0x001364b8
LAB_001364b8:
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RBP + -0x1c]
CMP RAX,RCX
JBE 0x001364cb
MOV EAX,dword ptr [RBP + -0x1c]
MOV qword ptr [RBP + -0x30],RAX
LAB_001364cb:
JMP 0x001364cd
LAB_001364cd:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x28]
JZ 0x001364e8
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x00124210
LAB_001364e8:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x10]
ADD RCX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RBP + -0x1c]
SUB RAX,qword ptr [RBP + -0x30]
MOV R8D,EAX
MOV R9D,dword ptr [RBP + 0x10]
XOR EAX,EAX
MOV dword ptr [RSP],0x0
CALL 0x00142120
ADD RSP,0x40
POP RBP
RET
|
void my_strnxfrm_8bit_nopad_bin
(int8 param_1,void *param_2,ulong param_3,uint param_4,void *param_5,
ulong param_6,int4 param_7)
{
int8 local_38;
local_38 = param_6;
if (param_3 < param_6) {
local_38 = param_3;
}
if (param_4 < local_38) {
local_38 = (ulong)param_4;
}
if (param_2 != param_5) {
memcpy(param_2,param_5,local_38);
}
my_strxfrm_pad_desc_and_reverse_nopad
(param_1,param_2,(long)param_2 + local_38,(long)param_2 + param_3,
param_4 - (int)local_38,param_7,0);
return;
}
| |
33,559 | my_strnxfrm_8bit_nopad_bin | eloqsql/strings/ctype-bin.c | static size_t
my_strnxfrm_8bit_nopad_bin(CHARSET_INFO *cs,
uchar * dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags)
{
set_if_smaller(srclen, dstlen);
set_if_smaller(srclen, nweights);
if (dst != src)
memcpy(dst, src, srclen);
return my_strxfrm_pad_desc_and_reverse_nopad(cs, dst, dst + srclen,
dst + dstlen,(uint)(nweights - srclen),
flags, 0);
} | O3 | c | my_strnxfrm_8bit_nopad_bin:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r13
movl %ecx, %ebx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movl 0x10(%rbp), %r9d
cmpq %rdx, %r13
cmovaeq %rdx, %r13
movl %ecx, %eax
cmpq %rax, %r13
cmovaeq %rax, %r13
cmpq %r8, %rsi
je 0x2f276
movq %r12, %rdi
movq %r8, %rsi
movq %r13, %rdx
callq 0x24220
movl 0x10(%rbp), %r9d
leaq (%r12,%r13), %rdx
addq %r12, %r14
subl %r13d, %ebx
movl $0x0, (%rsp)
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rcx
movl %ebx, %r8d
callq 0x37596
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_strnxfrm_8bit_nopad_bin:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r13, r9
mov ebx, ecx
mov r14, rdx
mov r12, rsi
mov r15, rdi
mov r9d, [rbp+arg_0]
cmp r13, rdx
cmovnb r13, rdx
mov eax, ecx
cmp r13, rax
cmovnb r13, rax
cmp rsi, r8
jz short loc_2F276
mov rdi, r12
mov rsi, r8
mov rdx, r13
call _memcpy
mov r9d, [rbp+arg_0]
loc_2F276:
lea rdx, [r12+r13]
add r14, r12
sub ebx, r13d
mov [rsp+30h+var_30], 0
mov rdi, r15
mov rsi, r12
mov rcx, r14
mov r8d, ebx
call my_strxfrm_pad_desc_and_reverse_nopad
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_strnxfrm_8bit_nopad_bin(
int a1,
long long a2,
unsigned long long a3,
unsigned int a4,
long long a5,
unsigned long long a6,
int a7)
{
int v9; // r14d
int v10; // r9d
v9 = a3;
v10 = a7;
if ( a6 >= a3 )
a6 = a3;
if ( a6 >= a4 )
a6 = a4;
if ( a2 != a5 )
{
memcpy(a2, a5, a6);
v10 = a7;
}
return my_strxfrm_pad_desc_and_reverse_nopad(a1, a2, (int)a2 + (int)a6, (int)a2 + v9, a4 - (unsigned int)a6, v10, 0);
}
| my_strnxfrm_8bit_nopad_bin:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R13,R9
MOV EBX,ECX
MOV R14,RDX
MOV R12,RSI
MOV R15,RDI
MOV R9D,dword ptr [RBP + 0x10]
CMP R13,RDX
CMOVNC R13,RDX
MOV EAX,ECX
CMP R13,RAX
CMOVNC R13,RAX
CMP RSI,R8
JZ 0x0012f276
MOV RDI,R12
MOV RSI,R8
MOV RDX,R13
CALL 0x00124220
MOV R9D,dword ptr [RBP + 0x10]
LAB_0012f276:
LEA RDX,[R12 + R13*0x1]
ADD R14,R12
SUB EBX,R13D
MOV dword ptr [RSP],0x0
MOV RDI,R15
MOV RSI,R12
MOV RCX,R14
MOV R8D,EBX
CALL 0x00137596
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void my_strnxfrm_8bit_nopad_bin
(int8 param_1,void *param_2,ulong param_3,uint param_4,void *param_5,
ulong param_6,int4 param_7)
{
int8 in_RAX;
uint uVar1;
uVar1 = (uint)((ulong)in_RAX >> 0x20);
if (param_3 <= param_6) {
param_6 = param_3;
}
if (param_4 <= param_6) {
param_6 = (ulong)param_4;
}
if (param_2 != param_5) {
memcpy(param_2,param_5,param_6);
}
my_strxfrm_pad_desc_and_reverse_nopad
(param_1,param_2,(long)param_2 + param_6,param_3 + (long)param_2,param_4 - (int)param_6,
param_7,(ulong)uVar1 << 0x20);
return;
}
| |
33,560 | PFS_buffer_default_allocator<PFS_cond>::alloc_array(PFS_buffer_default_array<PFS_cond>*) | eloqsql/storage/perfschema/pfs_buffer_container.h | int alloc_array(array_type *array)
{
array->m_ptr= NULL;
array->m_full= true;
array->m_monotonic.m_u32= 0;
if (array->m_max > 0)
{
array->m_ptr= PFS_MALLOC_ARRAY(m_builtin_class,
array->m_max, sizeof(T), T, MYF(MY_ZEROFILL));
if (array->m_ptr == NULL)
return 1;
array->m_full= false;
}
return 0;
} | O0 | c | PFS_buffer_default_allocator<PFS_cond>::alloc_array(PFS_buffer_default_array<PFS_cond>*):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x18(%rbp), %rax
movb $0x1, (%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x50(%rax)
jbe 0x42e25
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rsi
movl $0x40, %edx
movl $0x20, %ecx
callq 0x39270
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x42e1e
movl $0x1, -0x4(%rbp)
jmp 0x42e2c
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
| _ZN28PFS_buffer_default_allocatorI8PFS_condE11alloc_arrayEP24PFS_buffer_default_arrayIS0_E:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
mov qword ptr [rax+48h], 0
mov rax, [rbp+var_18]
mov byte ptr [rax], 1
mov rax, [rbp+var_18]
mov dword ptr [rax+4], 0
mov rax, [rbp+var_18]
cmp qword ptr [rax+50h], 0
jbe short loc_42E25
mov rax, [rbp+var_20]
mov rdi, [rax]; PFS_builtin_memory_class *
mov rax, [rbp+var_18]
mov rsi, [rax+50h]; unsigned __int64
mov edx, 40h ; '@'; unsigned __int64
mov ecx, 20h ; ' '; unsigned __int64
call _Z16pfs_malloc_arrayP24PFS_builtin_memory_classmmm; pfs_malloc_array(PFS_builtin_memory_class *,ulong,ulong,ulong)
mov rcx, rax
mov rax, [rbp+var_18]
mov [rax+48h], rcx
mov rax, [rbp+var_18]
cmp qword ptr [rax+48h], 0
jnz short loc_42E1E
mov [rbp+var_4], 1
jmp short loc_42E2C
loc_42E1E:
mov rax, [rbp+var_18]
mov byte ptr [rax], 0
loc_42E25:
mov [rbp+var_4], 0
loc_42E2C:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long PFS_buffer_default_allocator<PFS_cond>::alloc_array(PFS_builtin_memory_class **a1, long long a2)
{
*(_QWORD *)(a2 + 72) = 0LL;
*(_BYTE *)a2 = 1;
*(_DWORD *)(a2 + 4) = 0;
if ( !*(_QWORD *)(a2 + 80) )
return 0;
*(_QWORD *)(a2 + 72) = pfs_malloc_array(*a1, *(_QWORD *)(a2 + 80), 0x40uLL, 32);
if ( *(_QWORD *)(a2 + 72) )
{
*(_BYTE *)a2 = 0;
return 0;
}
return 1;
}
| alloc_array:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x48],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX],0x1
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x4],0x0
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x50],0x0
JBE 0x00142e25
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + 0x50]
MOV EDX,0x40
MOV ECX,0x20
CALL 0x00139270
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x48],RCX
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x48],0x0
JNZ 0x00142e1e
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00142e2c
LAB_00142e1e:
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX],0x0
LAB_00142e25:
MOV dword ptr [RBP + -0x4],0x0
LAB_00142e2c:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
/* PFS_buffer_default_allocator<PFS_cond>::alloc_array(PFS_buffer_default_array<PFS_cond>*) */
int4 __thiscall
PFS_buffer_default_allocator<PFS_cond>::alloc_array
(PFS_buffer_default_allocator<PFS_cond> *this,PFS_buffer_default_array *param_1)
{
int8 uVar1;
*(int8 *)(param_1 + 0x48) = 0;
*param_1 = (PFS_buffer_default_array)0x1;
*(int4 *)(param_1 + 4) = 0;
if (*(long *)(param_1 + 0x50) != 0) {
uVar1 = pfs_malloc_array(*(PFS_builtin_memory_class **)this,*(ulong *)(param_1 + 0x50),0x40,0x20
);
*(int8 *)(param_1 + 0x48) = uVar1;
if (*(long *)(param_1 + 0x48) == 0) {
return 1;
}
*param_1 = (PFS_buffer_default_array)0x0;
}
return 0;
}
| |
33,561 | PFS_buffer_default_allocator<PFS_cond>::alloc_array(PFS_buffer_default_array<PFS_cond>*) | eloqsql/storage/perfschema/pfs_buffer_container.h | int alloc_array(array_type *array)
{
array->m_ptr= NULL;
array->m_full= true;
array->m_monotonic.m_u32= 0;
if (array->m_max > 0)
{
array->m_ptr= PFS_MALLOC_ARRAY(m_builtin_class,
array->m_max, sizeof(T), T, MYF(MY_ZEROFILL));
if (array->m_ptr == NULL)
return 1;
array->m_full= false;
}
return 0;
} | O3 | c | PFS_buffer_default_allocator<PFS_cond>::alloc_array(PFS_buffer_default_array<PFS_cond>*):
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq $0x0, 0x48(%rsi)
movb $0x1, (%rsi)
movl $0x0, 0x4(%rsi)
movq 0x50(%rsi), %rsi
xorl %ebx, %ebx
testq %rsi, %rsi
je 0x3b925
movq (%rdi), %rdi
movl $0x140, %edx # imm = 0x140
movl $0x20, %ecx
callq 0x361cd
movq %rax, 0x48(%r14)
testq %rax, %rax
je 0x3b920
movb $0x0, (%r14)
jmp 0x3b925
movl $0x1, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
| _ZN28PFS_buffer_default_allocatorI10PFS_socketE11alloc_arrayEP24PFS_buffer_default_arrayIS0_E:
push rbp
mov rbp, rsp
push r14
push rbx
mov r14, rsi
mov qword ptr [rsi+48h], 0
mov byte ptr [rsi], 1
mov dword ptr [rsi+4], 0
mov rsi, [rsi+50h]
xor ebx, ebx
test rsi, rsi
jz short loc_3B925
mov rdi, [rdi]
mov edx, 140h
mov ecx, 20h ; ' '
call _Z16pfs_malloc_arrayP24PFS_builtin_memory_classmmm; pfs_malloc_array(PFS_builtin_memory_class *,ulong,ulong,ulong)
mov [r14+48h], rax
test rax, rax
jz short loc_3B920
mov byte ptr [r14], 0
jmp short loc_3B925
loc_3B920:
mov ebx, 1
loc_3B925:
mov eax, ebx
pop rbx
pop r14
pop rbp
retn
| long long PFS_buffer_default_allocator<PFS_socket>::alloc_array(long long *a1, long long a2)
{
unsigned long long v3; // rsi
unsigned int v4; // ebx
long long v5; // rax
*(_QWORD *)(a2 + 72) = 0LL;
*(_BYTE *)a2 = 1;
*(_DWORD *)(a2 + 4) = 0;
v3 = *(_QWORD *)(a2 + 80);
v4 = 0;
if ( v3 )
{
v5 = pfs_malloc_array(*a1, v3, 0x140uLL, 32);
*(_QWORD *)(a2 + 72) = v5;
if ( v5 )
*(_BYTE *)a2 = 0;
else
return 1;
}
return v4;
}
| alloc_array:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV R14,RSI
MOV qword ptr [RSI + 0x48],0x0
MOV byte ptr [RSI],0x1
MOV dword ptr [RSI + 0x4],0x0
MOV RSI,qword ptr [RSI + 0x50]
XOR EBX,EBX
TEST RSI,RSI
JZ 0x0013b925
MOV RDI,qword ptr [RDI]
MOV EDX,0x140
MOV ECX,0x20
CALL 0x001361cd
MOV qword ptr [R14 + 0x48],RAX
TEST RAX,RAX
JZ 0x0013b920
MOV byte ptr [R14],0x0
JMP 0x0013b925
LAB_0013b920:
MOV EBX,0x1
LAB_0013b925:
MOV EAX,EBX
POP RBX
POP R14
POP RBP
RET
|
/* PFS_buffer_default_allocator<PFS_socket>::alloc_array(PFS_buffer_default_array<PFS_socket>*) */
int8 __thiscall
PFS_buffer_default_allocator<PFS_socket>::alloc_array
(PFS_buffer_default_allocator<PFS_socket> *this,PFS_buffer_default_array *param_1)
{
long lVar1;
int8 uVar2;
*(int8 *)(param_1 + 0x48) = 0;
*param_1 = (PFS_buffer_default_array)0x1;
*(int4 *)(param_1 + 4) = 0;
uVar2 = 0;
if (*(ulong *)(param_1 + 0x50) != 0) {
lVar1 = pfs_malloc_array(*(PFS_builtin_memory_class **)this,*(ulong *)(param_1 + 0x50),0x140,
0x20);
*(long *)(param_1 + 0x48) = lVar1;
if (lVar1 == 0) {
uVar2 = 1;
}
else {
*param_1 = (PFS_buffer_default_array)0x0;
}
}
return uVar2;
}
| |
33,562 | ssz_add_uint64 | corpus-core[P]colibri-stateless/src/util/ssz_builder.c | void ssz_add_uint64(ssz_builder_t* buffer, uint64_t value) {
uint8_t tmp[8];
tmp[0] = value & 0xFF;
tmp[1] = (value >> 8) & 0xFF;
tmp[2] = (value >> 16) & 0xFF;
tmp[3] = (value >> 24) & 0xFF;
tmp[4] = (value >> 32) & 0xFF;
tmp[5] = (value >> 40) & 0xFF;
tmp[6] = (value >> 48) & 0xFF;
tmp[7] = (value >> 56) & 0xFF;
buffer_append(&buffer->fixed, bytes(tmp, 8));
} | O0 | c | ssz_add_uint64:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
andq $0xff, %rax
movb %al, -0x18(%rbp)
movq -0x10(%rbp), %rax
shrq $0x8, %rax
andq $0xff, %rax
movb %al, -0x17(%rbp)
movq -0x10(%rbp), %rax
shrq $0x10, %rax
andq $0xff, %rax
movb %al, -0x16(%rbp)
movq -0x10(%rbp), %rax
shrq $0x18, %rax
andq $0xff, %rax
movb %al, -0x15(%rbp)
movq -0x10(%rbp), %rax
shrq $0x20, %rax
andq $0xff, %rax
movb %al, -0x14(%rbp)
movq -0x10(%rbp), %rax
shrq $0x28, %rax
andq $0xff, %rax
movb %al, -0x13(%rbp)
movq -0x10(%rbp), %rax
shrq $0x30, %rax
andq $0xff, %rax
movb %al, -0x12(%rbp)
movq -0x10(%rbp), %rax
shrq $0x38, %rax
andq $0xff, %rax
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
movl $0x8, -0x28(%rbp)
leaq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x28(%rbp), %esi
movq -0x20(%rbp), %rdx
callq 0x18bd0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| ssz_add_uint64:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
and rax, 0FFh
mov [rbp+var_18], al
mov rax, [rbp+var_10]
shr rax, 8
and rax, 0FFh
mov [rbp+var_17], al
mov rax, [rbp+var_10]
shr rax, 10h
and rax, 0FFh
mov [rbp+var_16], al
mov rax, [rbp+var_10]
shr rax, 18h
and rax, 0FFh
mov [rbp+var_15], al
mov rax, [rbp+var_10]
shr rax, 20h
and rax, 0FFh
mov [rbp+var_14], al
mov rax, [rbp+var_10]
shr rax, 28h
and rax, 0FFh
mov [rbp+var_13], al
mov rax, [rbp+var_10]
shr rax, 30h
and rax, 0FFh
mov [rbp+var_12], al
mov rax, [rbp+var_10]
shr rax, 38h
and rax, 0FFh
mov [rbp+var_11], al
mov rdi, [rbp+var_8]
add rdi, 8
mov [rbp+var_28], 8
lea rax, [rbp+var_18]
mov [rbp+var_20], rax
mov esi, [rbp+var_28]
mov rdx, [rbp+var_20]
call buffer_append
add rsp, 30h
pop rbp
retn
| long long ssz_add_uint64(long long a1, long long a2)
{
_QWORD v3[3]; // [rsp+18h] [rbp-18h] BYREF
v3[2] = a1;
v3[1] = a2;
v3[0] = a2;
return buffer_append((unsigned int *)(a1 + 8), 8u, (long long)v3);
}
| ssz_add_uint64:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
AND RAX,0xff
MOV byte ptr [RBP + -0x18],AL
MOV RAX,qword ptr [RBP + -0x10]
SHR RAX,0x8
AND RAX,0xff
MOV byte ptr [RBP + -0x17],AL
MOV RAX,qword ptr [RBP + -0x10]
SHR RAX,0x10
AND RAX,0xff
MOV byte ptr [RBP + -0x16],AL
MOV RAX,qword ptr [RBP + -0x10]
SHR RAX,0x18
AND RAX,0xff
MOV byte ptr [RBP + -0x15],AL
MOV RAX,qword ptr [RBP + -0x10]
SHR RAX,0x20
AND RAX,0xff
MOV byte ptr [RBP + -0x14],AL
MOV RAX,qword ptr [RBP + -0x10]
SHR RAX,0x28
AND RAX,0xff
MOV byte ptr [RBP + -0x13],AL
MOV RAX,qword ptr [RBP + -0x10]
SHR RAX,0x30
AND RAX,0xff
MOV byte ptr [RBP + -0x12],AL
MOV RAX,qword ptr [RBP + -0x10]
SHR RAX,0x38
AND RAX,0xff
MOV byte ptr [RBP + -0x11],AL
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x8
MOV dword ptr [RBP + -0x28],0x8
LEA RAX,[RBP + -0x18]
MOV qword ptr [RBP + -0x20],RAX
MOV ESI,dword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00118bd0
ADD RSP,0x30
POP RBP
RET
|
void ssz_add_uint64(long param_1,int8 param_2)
{
int1 local_20;
int1 local_1f;
int1 local_1e;
int1 local_1d;
int1 local_1c;
int1 local_1b;
int1 local_1a;
int1 local_19;
int8 local_18;
long local_10;
local_20 = (int1)param_2;
local_1f = (int1)((ulong)param_2 >> 8);
local_1e = (int1)((ulong)param_2 >> 0x10);
local_1d = (int1)((ulong)param_2 >> 0x18);
local_1c = (int1)((ulong)param_2 >> 0x20);
local_1b = (int1)((ulong)param_2 >> 0x28);
local_1a = (int1)((ulong)param_2 >> 0x30);
local_19 = (int1)((ulong)param_2 >> 0x38);
local_18 = param_2;
local_10 = param_1;
buffer_append(param_1 + 8,8,&local_20);
return;
}
| |
33,563 | ssz_add_uint64 | corpus-core[P]colibri-stateless/src/util/ssz_builder.c | void ssz_add_uint64(ssz_builder_t* buffer, uint64_t value) {
uint8_t tmp[8];
tmp[0] = value & 0xFF;
tmp[1] = (value >> 8) & 0xFF;
tmp[2] = (value >> 16) & 0xFF;
tmp[3] = (value >> 24) & 0xFF;
tmp[4] = (value >> 32) & 0xFF;
tmp[5] = (value >> 40) & 0xFF;
tmp[6] = (value >> 48) & 0xFF;
tmp[7] = (value >> 56) & 0xFF;
buffer_append(&buffer->fixed, bytes(tmp, 8));
} | O3 | c | ssz_add_uint64:
pushq %rax
movq %rsp, %rdx
movq %rsi, (%rdx)
addq $0x8, %rdi
movl $0x8, %esi
callq 0x12651
popq %rax
retq
| ssz_add_uint64:
push rax
mov rdx, rsp
mov [rdx], rsi
add rdi, 8
mov esi, 8
call buffer_append
pop rax
retn
| long long ssz_add_uint64(long long a1, long long a2)
{
long long v3; // [rsp-8h] [rbp-8h] BYREF
v3 = a2;
buffer_append((unsigned int *)(a1 + 8), 8u, (long long)&v3);
return v3;
}
| ssz_add_uint64:
PUSH RAX
MOV RDX,RSP
MOV qword ptr [RDX],RSI
ADD RDI,0x8
MOV ESI,0x8
CALL 0x00112651
POP RAX
RET
|
int8 ssz_add_uint64(long param_1,int8 param_2)
{
buffer_append(param_1 + 8,8);
return param_2;
}
| |
33,564 | inline_mysql_rwlock_unlock | eloqsql/include/mysql/psi/mysql_thread.h | static inline int inline_mysql_rwlock_unlock(
mysql_rwlock_t *that)
{
int result;
#ifdef HAVE_PSI_RWLOCK_INTERFACE
if (psi_likely(that->m_psi != NULL))
PSI_RWLOCK_CALL(unlock_rwlock)(that->m_psi);
#endif
result= rw_unlock(&that->m_rwlock);
return result;
} | O0 | c | inline_mysql_rwlock_unlock:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x90(%rax)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0xc54f1
leaq 0x2020c6(%rip), %rax # 0x2c75a0
movq (%rax), %rax
movq 0x168(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x90(%rcx), %rdi
callq *%rax
movq -0x8(%rbp), %rdi
callq 0x100240
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| inline_mysql_rwlock_unlock_7:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
cmp qword ptr [rax+90h], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_C54F1
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+168h]
mov rcx, [rbp+var_8]
mov rdi, [rcx+90h]
call rax
loc_C54F1:
mov rdi, [rbp+var_8]
call my_rw_unlock
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
add rsp, 10h
pop rbp
retn
| long long inline_mysql_rwlock_unlock_7(long long a1)
{
if ( *(_QWORD *)(a1 + 144) )
((void ( *)(_QWORD))PSI_server[45])(*(_QWORD *)(a1 + 144));
return (unsigned int)my_rw_unlock(a1);
}
| inline_mysql_rwlock_unlock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x90],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x001c54f1
LEA RAX,[0x3c75a0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x168]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x90]
CALL RAX
LAB_001c54f1:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00200240
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
ADD RSP,0x10
POP RBP
RET
|
int4 inline_mysql_rwlock_unlock(long param_1)
{
int4 uVar1;
if (*(long *)(param_1 + 0x90) != 0) {
(**(code **)(PSI_server + 0x168))(*(int8 *)(param_1 + 0x90));
}
uVar1 = my_rw_unlock(param_1);
return uVar1;
}
| |
33,565 | aimrt::runtime::core::logger::LoggerManager::GenInitializationReport[abi:cxx11]() const | aimrt_mujoco_sim/_deps/aimrt-src/src/runtime/core/logger/logger_manager.cc | std::list<std::pair<std::string, std::string>> LoggerManager::GenInitializationReport() const {
AIMRT_CHECK_ERROR_THROW(
state_.load() == State::kInit,
"Method can only be called when state is 'Init'.");
std::vector<std::string> logger_backend_type_vec;
logger_backend_type_vec.reserve(logger_backend_vec_.size());
for (const auto& logger_backend : logger_backend_vec_) {
logger_backend_type_vec.emplace_back(logger_backend->Type());
}
std::string log_backend_name_list;
if (logger_backend_type_vec.empty()) {
log_backend_name_list = "<empty>";
} else {
log_backend_name_list = "[ " + aimrt::common::util::JoinVec(logger_backend_type_vec, " , ") + " ]";
}
std::list<std::pair<std::string, std::string>> report{
{"Log Backend List", log_backend_name_list}};
for (const auto& backend_ptr : logger_backend_vec_) {
report.splice(report.end(), backend_ptr->GenInitializationReport());
}
return report;
} | O3 | cpp | aimrt::runtime::core::logger::LoggerManager::GenInitializationReport[abi:cxx11]() const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %r14
movl 0x20(%rsi), %eax
cmpl $0x1, %eax
jne 0x570bc
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq 0x70(%rsp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x98(%r14), %rsi
subq 0x90(%r14), %rsi
sarq $0x3, %rsi
callq 0x1f590
movq 0x90(%r14), %r13
movq 0x98(%r14), %rbp
cmpq %rbp, %r13
je 0x56df6
leaq 0x70(%rsp), %r15
leaq 0x10(%rsp), %r12
movq (%r13), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x1f6d0
addq $0x8, %r13
cmpq %rbp, %r13
jne 0x56dce
leaq 0xa0(%rsp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
movq 0x70(%rsp), %rbp
cmpq 0x78(%rsp), %rbp
jne 0x56f3a
leaq 0x304e7(%rip), %rcx # 0x8730d
leaq 0x90(%rsp), %rdi
movl $0x7, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x1edc0
leaq 0x304db(%rip), %rsi # 0x8731f
leaq 0x10(%rsp), %rdi
leaq 0x90(%rsp), %rdx
callq 0x1ecd0
leaq 0x10(%rsp), %r15
leaq 0xb8(%rsp), %rcx
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1e560
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x56e8e
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x1f250
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x56ea9
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1f250
movq 0x90(%r14), %r12
movq 0x98(%r14), %r14
cmpq %r14, %r12
je 0x56efe
movq (%r12), %rsi
movq (%rsi), %rax
movq %r15, %rdi
callq *0x30(%rax)
movq 0x10(%rsp), %rsi
cmpq %r15, %rsi
je 0x56ef0
movq %rbx, %rdi
movq %r15, %rdx
callq 0x1e820
movq 0x20(%rsp), %rax
addq %rax, 0x10(%rbx)
movq $0x0, 0x20(%rsp)
movq %r15, %rdi
callq 0x1ef70
addq $0x8, %r12
jmp 0x56eb7
movq 0x90(%rsp), %rdi
cmpq %r13, %rdi
je 0x56f1b
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x1f250
leaq 0x70(%rsp), %rdi
callq 0x1ebd0
movq %rbx, %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x60(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x50(%rsp), %r15
leaq 0x303be(%rip), %r12 # 0x87318
cmpq 0x70(%rsp), %rbp
je 0x56f71
movl $0x3, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x1e2c0
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
movq %r15, %rdi
callq 0x201d0
addq $0x20, %rbp
cmpq 0x78(%rsp), %rbp
jne 0x56f5a
leaq 0x30382(%rip), %rcx # 0x87315
leaq 0x50(%rsp), %rdi
movl $0x2, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x1fbb0
leaq 0xc8(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x56fcd
movups (%rcx), %xmm0
movups %xmm0, (%r12)
jmp 0x56fe0
movq %rdx, 0xb8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xc8(%rsp)
movq 0x8(%rax), %rdx
leaq 0xb8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x30316(%rip), %rsi # 0x8731c
callq 0x20280
leaq 0x20(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x5702c
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
jmp 0x57039
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
movq 0x8(%rax), %rdx
leaq 0x10(%rsp), %r15
movq %rdx, 0x8(%r15)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x90(%rsp), %rdi
movq %r15, %rsi
callq 0x1e6d0
movq (%r15), %rdi
cmpq %rbp, %rdi
je 0x5707a
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1f250
movq 0xb8(%rsp), %rdi
cmpq %r12, %rdi
je 0x57097
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x1f250
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x56e3d
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x1f250
jmp 0x56e3d
leaq 0x2e975(%rip), %rsi # 0x85a38
leaq 0x10(%rsp), %rdi
leaq 0x90(%rsp), %r8
movl $0x2f, %edx
xorl %ecx, %ecx
callq 0x25059
movq 0x28(%r14), %rbx
cmpq $0x0, 0x10(%rbx)
jne 0x570ec
callq 0x1e580
movq %rbx, %rdi
callq *0x18(%rbx)
cmpl $0x4, %eax
ja 0x57129
movq 0x10(%rsp), %r9
movq 0x18(%rsp), %rax
addq $0x20, %rbx
movq %rax, (%rsp)
leaq 0x30011(%rip), %rcx # 0x87121
leaq 0x301de(%rip), %r8 # 0x872f5
movq %rbx, %rdi
movl $0x4, %esi
movl $0xf6, %edx
callq 0x1ff80
movl $0x28, %edi
callq 0x1e7e0
leaq 0x57316(%rip), %rcx # 0xae450
movq %rcx, (%rax)
leaq 0x18(%rax), %rdx
movq %rdx, 0x8(%rax)
leaq 0x20(%rsp), %rcx
movq -0x10(%rcx), %rsi
cmpq %rcx, %rsi
jne 0x5715b
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
jmp 0x57168
movq %rsi, 0x8(%rax)
movq 0x20(%rsp), %rdx
movq %rdx, 0x18(%rax)
movq 0x18(%rsp), %rdx
movq %rdx, 0x10(%rax)
movq %rcx, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movb $0x0, 0x20(%rsp)
leaq 0x571f5(%rip), %rsi # 0xae380
leaq -0x3345e(%rip), %rdx # 0x23d34
movq %rax, %rdi
callq 0x1fec0
movq %rax, %rbx
movq 0xb8(%rsp), %rdi
cmpq %r12, %rdi
je 0x571e0
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x1f250
jmp 0x571e0
jmp 0x571dd
jmp 0x571cf
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1fca0
jmp 0x571fc
movq %rax, %rbx
jmp 0x571fc
jmp 0x571d6
movq %rax, %rbx
jmp 0x57219
jmp 0x57225
movq %rax, %rbx
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x571fc
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x1f250
movq 0x90(%rsp), %rdi
cmpq %r13, %rdi
je 0x57219
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x1f250
leaq 0x70(%rsp), %rdi
callq 0x1ebd0
jmp 0x57243
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x57243
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1f250
movq %rbx, %rdi
callq 0x1ffd0
nop
| _ZNK5aimrt7runtime4core6logger13LoggerManager23GenInitializationReportB5cxx11Ev:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0D8h
mov r14, rsi
mov eax, [rsi+20h]
cmp eax, 1
jnz loc_570BC
mov rbx, rdi
xorps xmm0, xmm0
lea rdi, [rsp+108h+var_98]
movaps xmmword ptr [rdi], xmm0
mov qword ptr [rdi+10h], 0
mov rsi, [r14+98h]
sub rsi, [r14+90h]
sar rsi, 3
call __ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE7reserveEm; std::vector<std::string>::reserve(ulong)
mov r13, [r14+90h]
mov rbp, [r14+98h]
cmp r13, rbp
jz short loc_56DF6
lea r15, [rsp+108h+var_98]
lea r12, [rsp+108h+var_F8]
loc_56DCE:
mov rdi, [r13+0]
mov rax, [rdi]
call qword ptr [rax+10h]
mov [rsp+108h+var_F8], rax
mov [rsp+108h+var_F0], rdx
mov rdi, r15
mov rsi, r12
call __ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJSt17basic_string_viewIcS3_EEEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string_view>(std::string_view &&)
add r13, 8
cmp r13, rbp
jnz short loc_56DCE
loc_56DF6:
lea r13, [rsp+108h+var_68]
mov [r13-10h], r13
mov qword ptr [r13-8], 0
mov byte ptr [r13+0], 0
mov rbp, [rsp+108h+var_98]
cmp rbp, [rsp+108h+var_90]
jnz loc_56F3A
lea rcx, aEmpty; "<empty>"
lea rdi, [rsp+108h+var_78]
mov r8d, 7
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
loc_56E3D:
lea rsi, aLogBackendList; "Log Backend List"
lea rdi, [rsp+108h+var_F8]
lea rdx, [rsp+108h+var_78]
call __ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_EC2IRA17_KcRS5_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISD_SE_EEEbE4typeELb1EEEOSD_OSE_
lea r15, [rsp+108h+var_F8]
lea rcx, [rsp+108h+var_50]
mov edx, 1
mov rdi, rbx
mov rsi, r15
call __ZNSt7__cxx114listISt4pairINS_12basic_stringIcSt11char_traitsIcESaIcEEES6_ESaIS7_EEC2ESt16initializer_listIS7_ERKS8_; std::list<std::pair<std::string,std::string>>::list(std::initializer_list<std::pair<std::string,std::string>>,std::allocator<std::pair<std::string,std::string>> const&)
lea rax, [rsp+108h+var_C8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_56E8E
mov rsi, [rsp+108h+var_C8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_56E8E:
lea rax, [rsp+108h+var_E8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_56EA9
mov rsi, [rsp+108h+var_E8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_56EA9:
mov r12, [r14+90h]
mov r14, [r14+98h]
loc_56EB7:
cmp r12, r14
jz short loc_56EFE
mov rsi, [r12]
mov rax, [rsi]
mov rdi, r15
call qword ptr [rax+30h]
mov rsi, [rsp+108h+var_F8]; std::__detail::_List_node_base *
cmp rsi, r15
jz short loc_56EF0
mov rdi, rbx; this
mov rdx, r15; std::__detail::_List_node_base *
call __ZNSt8__detail15_List_node_base11_M_transferEPS0_S1_; std::__detail::_List_node_base::_M_transfer(std::__detail::_List_node_base*,std::__detail::_List_node_base*)
mov rax, [rsp+108h+var_E8]
add [rbx+10h], rax
mov [rsp+108h+var_E8], 0
loc_56EF0:
mov rdi, r15
call __ZNSt7__cxx1110_List_baseISt4pairINS_12basic_stringIcSt11char_traitsIcESaIcEEES6_ESaIS7_EE8_M_clearEv; std::_List_base<std::pair<std::string,std::string>>::_M_clear(void)
add r12, 8
jmp short loc_56EB7
loc_56EFE:
mov rdi, [rsp+108h+var_78]; void *
cmp rdi, r13
jz short loc_56F1B
mov rsi, [rsp+108h+var_68]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_56F1B:
lea rdi, [rsp+108h+var_98]
call __ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rax, rbx
add rsp, 0D8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_56F3A:
lea rax, [rsp+108h+var_A8]
mov [rax-10h], rax
mov qword ptr [rax-8], 0
mov byte ptr [rax], 0
lea r15, [rsp+108h+var_B8]
lea r12, asc_87318; " , "
loc_56F5A:
cmp rbp, [rsp+108h+var_98]
jz short loc_56F71
mov edx, 3
mov rdi, r15
mov rsi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong)
loc_56F71:
mov rsi, [rbp+0]
mov rdx, [rbp+8]
mov rdi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
add rbp, 20h ; ' '
cmp rbp, [rsp+108h+var_90]
jnz short loc_56F5A
lea rcx, asc_87315; "[ "
lea rdi, [rsp+108h+var_B8]
mov r8d, 2
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
lea r12, [rsp+108h+var_40]
mov [r12-10h], r12
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jnz short loc_56FCD
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r12], xmm0
jmp short loc_56FE0
loc_56FCD:
mov [rsp+108h+var_50], rdx
mov rdx, [rcx]
mov [rsp+108h+var_40], rdx
loc_56FE0:
mov rdx, [rax+8]
lea rdi, [rsp+108h+var_50]
mov [rdi+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rsi, asc_8731C; " ]"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea rbp, [rsp+108h+var_E8]
mov [rbp-10h], rbp
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jnz short loc_5702C
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rbp+0], xmm0
jmp short loc_57039
loc_5702C:
mov [rsp+108h+var_F8], rdx
mov rdx, [rcx]
mov [rsp+108h+var_E8], rdx
loc_57039:
mov rdx, [rax+8]
lea r15, [rsp+108h+var_F8]
mov [r15+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rdi, [rsp+108h+var_78]
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r15]; void *
cmp rdi, rbp
jz short loc_5707A
mov rsi, [rsp+108h+var_E8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5707A:
mov rdi, [rsp+108h+var_50]; void *
cmp rdi, r12
jz short loc_57097
mov rsi, [rsp+108h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_57097:
mov rdi, [rsp+108h+var_B8]; void *
lea rax, [rsp+108h+var_A8]
cmp rdi, rax
jz loc_56E3D
mov rsi, [rsp+108h+var_A8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp loc_56E3D
loc_570BC:
lea rsi, aMethodCanOnlyB; "Method can only be called when state is"...
lea rdi, [rsp+108h+var_F8]; int
lea r8, [rsp+108h+var_78]; int
mov edx, 2Fh ; '/'; int
xor ecx, ecx; int
call _ZN3fmt3v107vformatB5cxx11ENS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_20basic_format_contextINS0_8appenderEcEEEE; fmt::v10::vformat(fmt::v10::basic_string_view<char>,fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>)
mov rbx, [r14+28h]
cmp qword ptr [rbx+10h], 0
jnz short loc_570EC
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
loc_570EC:
mov rdi, rbx
call qword ptr [rbx+18h]
cmp eax, 4
ja short loc_57129
mov r9, [rsp+108h+var_F8]
mov rax, [rsp+108h+var_F0]
add rbx, 20h ; ' '
mov [rsp+108h+var_108], rax
lea rcx, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/aimrt_"...
lea r8, aGeninitializat; "GenInitializationReport"
mov rdi, rbx
mov esi, 4
mov edx, 0F6h
call __ZNKSt8functionIFvjjPKcS1_S1_mEEclEjjS1_S1_S1_m; std::function<void ()(uint,uint,char const*,char const*,char const*,ulong)>::operator()(uint,uint,char const*,char const*,char const*,ulong)
loc_57129:
mov edi, 28h ; '('; thrown_size
call ___cxa_allocate_exception
lea rcx, off_AE450
mov [rax], rcx
lea rdx, [rax+18h]
mov [rax+8], rdx
lea rcx, [rsp+108h+var_E8]
mov rsi, [rcx-10h]
cmp rsi, rcx
jnz short loc_5715B
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rdx], xmm0
jmp short loc_57168
loc_5715B:
mov [rax+8], rsi
mov rdx, [rsp+108h+var_E8]
mov [rax+18h], rdx
loc_57168:
mov rdx, [rsp+108h+var_F0]
mov [rax+10h], rdx
mov [rsp+108h+var_F8], rcx
mov [rsp+108h+var_F0], 0
mov byte ptr [rsp+108h+var_E8], 0
lea rsi, _ZTIN5aimrt6common4util14AimRTExceptionE; lptinfo
lea rdx, _ZN5aimrt6common4util14AimRTExceptionD2Ev; void (*)(void *)
mov rdi, rax; void *
call ___cxa_throw
mov rbx, rax
mov rdi, [rsp+108h+var_50]; void *
cmp rdi, r12
jz short loc_571E0
mov rsi, [rsp+108h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_571E0
jmp short loc_571DD
jmp short loc_571CF
mov rbx, rax
lea rdi, [rsp+108h+var_F8]
call __ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ED2Ev; std::pair<std::string,std::string>::~pair()
jmp short loc_571FC
loc_571CF:
mov rbx, rax
jmp short loc_571FC
jmp short $+2
loc_571D6:
mov rbx, rax
jmp short loc_57219
jmp short loc_57225
loc_571DD:
mov rbx, rax
loc_571E0:
mov rdi, [rsp+108h+var_B8]; void *
lea rax, [rsp+108h+var_A8]
cmp rdi, rax
jz short loc_571FC
mov rsi, [rsp+108h+var_A8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_571FC:
mov rdi, [rsp+108h+var_78]; void *
cmp rdi, r13
jz short loc_57219
mov rsi, [rsp+108h+var_68]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_57219:
lea rdi, [rsp+108h+var_98]
call __ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
jmp short loc_57243
loc_57225:
mov rbx, rax
lea rax, [rsp+108h+var_E8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_57243
mov rsi, [rsp+108h+var_E8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_57243:
mov rdi, rbx
call __Unwind_Resume
| std::__detail::_List_node_base * aimrt::runtime::core::logger::LoggerManager::GenInitializationReport[abi:cxx11](
std::__detail::_List_node_base *this,
long long a2)
{
_QWORD *v2; // r13
_QWORD *i; // rbp
long long v4; // rdx
_QWORD *v5; // rbp
long long v6; // r12
long long v7; // r14
long long v9; // rax
_OWORD *v10; // rcx
long long v11; // rax
__int128 *v12; // rcx
long long v13; // rbx
char *exception; // rax
std::__detail::_List_node_base *v15; // [rsp+10h] [rbp-F8h] BYREF
long long v16; // [rsp+18h] [rbp-F0h]
__int128 v17; // [rsp+20h] [rbp-E8h] BYREF
long long *v18; // [rsp+30h] [rbp-D8h]
long long v19; // [rsp+40h] [rbp-C8h] BYREF
void *v20[2]; // [rsp+50h] [rbp-B8h] BYREF
_QWORD v21[2]; // [rsp+60h] [rbp-A8h] BYREF
__int128 v22; // [rsp+70h] [rbp-98h] BYREF
long long v23; // [rsp+80h] [rbp-88h]
void *v24[2]; // [rsp+90h] [rbp-78h] BYREF
_QWORD v25[3]; // [rsp+A0h] [rbp-68h] BYREF
void *v26[2]; // [rsp+B8h] [rbp-50h] BYREF
_OWORD v27[4]; // [rsp+C8h] [rbp-40h] BYREF
if ( *(_DWORD *)(a2 + 32) != 1 )
{
fmt::v10::vformat[abi:cxx11](&v15);
v13 = *(_QWORD *)(a2 + 40);
if ( !*(_QWORD *)(v13 + 16) )
std::__throw_bad_function_call();
if ( (*(unsigned int ( **)(_QWORD, const char *))(v13 + 24))(
*(_QWORD *)(a2 + 40),
"Method can only be called when state is 'Init'.") <= 4 )
std::function<void ()(unsigned int,unsigned int,char const*,char const*,char const*,unsigned long)>::operator()(
v13 + 32,
4,
246,
(unsigned int)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/aimrt-src/src/runtime/core/logger/logger_manager.cc",
(unsigned int)"GenInitializationReport",
(_DWORD)v15,
v16);
exception = (char *)__cxa_allocate_exception(0x28uLL);
*(_QWORD *)exception = off_AE450;
*((_QWORD *)exception + 1) = exception + 24;
if ( v15 == (std::__detail::_List_node_base *)&v17 )
{
*(_OWORD *)(exception + 24) = v17;
}
else
{
*((_QWORD *)exception + 1) = v15;
*((_QWORD *)exception + 3) = v17;
}
*((_QWORD *)exception + 2) = v16;
v15 = (std::__detail::_List_node_base *)&v17;
v16 = 0LL;
LOBYTE(v17) = 0;
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'aimrt::common::util::AimRTException,
(void (*)(void *))aimrt::common::util::AimRTException::~AimRTException);
}
v22 = 0LL;
v23 = 0LL;
std::vector<std::string>::reserve(&v22, (long long)(*(_QWORD *)(a2 + 152) - *(_QWORD *)(a2 + 144)) >> 3);
v2 = *(_QWORD **)(a2 + 144);
for ( i = *(_QWORD **)(a2 + 152); v2 != i; ++v2 )
{
v15 = (std::__detail::_List_node_base *)(*(long long ( **)(_QWORD))(*(_QWORD *)*v2 + 16LL))(*v2);
v16 = v4;
std::vector<std::string>::emplace_back<std::string_view>(&v22, &v15);
}
v24[0] = v25;
v24[1] = 0LL;
LOBYTE(v25[0]) = 0;
v5 = (_QWORD *)v22;
if ( (_QWORD)v22 == *((_QWORD *)&v22 + 1) )
{
std::string::_M_replace(v24, 0LL, 0LL, "<empty>", 7uLL);
}
else
{
v20[0] = v21;
v20[1] = 0LL;
LOBYTE(v21[0]) = 0;
do
{
if ( v5 != (_QWORD *)v22 )
std::string::append(v20, " , ", 3LL);
std::string::_M_append(v20, *v5, v5[1]);
v5 += 4;
}
while ( v5 != *((_QWORD **)&v22 + 1) );
v9 = std::string::replace(v20, 0LL, 0LL, "[ ", 2LL);
v26[0] = v27;
v10 = (_OWORD *)(v9 + 16);
if ( *(_QWORD *)v9 == v9 + 16 )
{
v27[0] = *v10;
}
else
{
v26[0] = *(void **)v9;
*(_QWORD *)&v27[0] = *(_QWORD *)v10;
}
v26[1] = *(void **)(v9 + 8);
*(_QWORD *)v9 = v10;
*(_QWORD *)(v9 + 8) = 0LL;
*(_BYTE *)(v9 + 16) = 0;
v11 = std::string::append(v26, " ]");
v15 = (std::__detail::_List_node_base *)&v17;
v12 = (__int128 *)(v11 + 16);
if ( *(_QWORD *)v11 == v11 + 16 )
{
v17 = *v12;
}
else
{
v15 = *(std::__detail::_List_node_base **)v11;
*(_QWORD *)&v17 = *(_QWORD *)v12;
}
v16 = *(_QWORD *)(v11 + 8);
*(_QWORD *)v11 = v12;
*(_QWORD *)(v11 + 8) = 0LL;
*(_BYTE *)(v11 + 16) = 0;
std::string::operator=(v24, (long long)&v15);
if ( v15 != (std::__detail::_List_node_base *)&v17 )
operator delete(v15, v17 + 1);
if ( v26[0] != v27 )
operator delete(v26[0], *(_QWORD *)&v27[0] + 1LL);
if ( v20[0] != v21 )
operator delete(v20[0], v21[0] + 1LL);
}
_ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_EC2IRA17_KcRS5_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISD_SE_EEEbE4typeELb1EEEOSD_OSE_(
&v15,
"Log Backend List",
v24);
std::list<std::pair<std::string,std::string>>::list(this, &v15, 1LL, v26);
if ( v18 != &v19 )
operator delete(v18, v19 + 1);
if ( v15 != (std::__detail::_List_node_base *)&v17 )
operator delete(v15, v17 + 1);
v6 = *(_QWORD *)(a2 + 144);
v7 = *(_QWORD *)(a2 + 152);
while ( v6 != v7 )
{
(*(void ( **)(std::__detail::_List_node_base **))(**(_QWORD **)v6 + 48LL))(&v15);
if ( v15 != (std::__detail::_List_node_base *)&v15 )
{
std::__detail::_List_node_base::_M_transfer(this, v15, (std::__detail::_List_node_base *)&v15);
*((_QWORD *)this + 2) += v17;
*(_QWORD *)&v17 = 0LL;
}
std::_List_base<std::pair<std::string,std::string>>::_M_clear(&v15);
v6 += 8LL;
}
if ( v24[0] != v25 )
operator delete(v24[0], v25[0] + 1LL);
std::vector<std::string>::~vector(&v22);
return this;
}
| GenInitializationReport[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xd8
MOV R14,RSI
MOV EAX,dword ptr [RSI + 0x20]
CMP EAX,0x1
JNZ 0x001570bc
MOV RBX,RDI
XORPS XMM0,XMM0
LEA RDI,[RSP + 0x70]
MOVAPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
MOV RSI,qword ptr [R14 + 0x98]
SUB RSI,qword ptr [R14 + 0x90]
SAR RSI,0x3
LAB_00156dac:
CALL 0x0011f590
LAB_00156db1:
MOV R13,qword ptr [R14 + 0x90]
MOV RBP,qword ptr [R14 + 0x98]
CMP R13,RBP
JZ 0x00156df6
LEA R15,[RSP + 0x70]
LEA R12,[RSP + 0x10]
LAB_00156dce:
MOV RDI,qword ptr [R13]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
LAB_00156de2:
MOV RDI,R15
MOV RSI,R12
CALL 0x0011f6d0
ADD R13,0x8
CMP R13,RBP
JNZ 0x00156dce
LAB_00156df6:
LEA R13,[RSP + 0xa0]
MOV qword ptr [R13 + -0x10],R13
MOV qword ptr [R13 + -0x8],0x0
MOV byte ptr [R13],0x0
MOV RBP,qword ptr [RSP + 0x70]
CMP RBP,qword ptr [RSP + 0x78]
JNZ 0x00156f3a
LAB_00156e1f:
LEA RCX,[0x18730d]
LEA RDI,[RSP + 0x90]
MOV R8D,0x7
XOR ESI,ESI
XOR EDX,EDX
CALL 0x0011edc0
LAB_00156e3d:
LEA RSI,[0x18731f]
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0x90]
CALL 0x0011ecd0
LAB_00156e56:
LEA R15,[RSP + 0x10]
LEA RCX,[RSP + 0xb8]
MOV EDX,0x1
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011e560
LAB_00156e73:
LEA RAX,[RSP + 0x40]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00156e8e
MOV RSI,qword ptr [RSP + 0x40]
INC RSI
CALL 0x0011f250
LAB_00156e8e:
LEA RAX,[RSP + 0x20]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00156ea9
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x0011f250
LAB_00156ea9:
MOV R12,qword ptr [R14 + 0x90]
MOV R14,qword ptr [R14 + 0x98]
LAB_00156eb7:
CMP R12,R14
JZ 0x00156efe
MOV RSI,qword ptr [R12]
MOV RAX,qword ptr [RSI]
MOV RDI,R15
CALL qword ptr [RAX + 0x30]
MOV RSI,qword ptr [RSP + 0x10]
CMP RSI,R15
JZ 0x00156ef0
MOV RDI,RBX
MOV RDX,R15
CALL 0x0011e820
MOV RAX,qword ptr [RSP + 0x20]
ADD qword ptr [RBX + 0x10],RAX
MOV qword ptr [RSP + 0x20],0x0
LAB_00156ef0:
MOV RDI,R15
CALL 0x0011ef70
ADD R12,0x8
JMP 0x00156eb7
LAB_00156efe:
MOV RDI,qword ptr [RSP + 0x90]
CMP RDI,R13
JZ 0x00156f1b
MOV RSI,qword ptr [RSP + 0xa0]
INC RSI
CALL 0x0011f250
LAB_00156f1b:
LEA RDI,[RSP + 0x70]
CALL 0x0011ebd0
MOV RAX,RBX
ADD RSP,0xd8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00156f3a:
LEA RAX,[RSP + 0x60]
MOV qword ptr [RAX + -0x10],RAX
MOV qword ptr [RAX + -0x8],0x0
MOV byte ptr [RAX],0x0
LEA R15,[RSP + 0x50]
LEA R12,[0x187318]
LAB_00156f5a:
CMP RBP,qword ptr [RSP + 0x70]
JZ 0x00156f71
LAB_00156f61:
MOV EDX,0x3
MOV RDI,R15
MOV RSI,R12
CALL 0x0011e2c0
LAB_00156f71:
MOV RSI,qword ptr [RBP]
MOV RDX,qword ptr [RBP + 0x8]
MOV RDI,R15
CALL 0x001201d0
ADD RBP,0x20
CMP RBP,qword ptr [RSP + 0x78]
JNZ 0x00156f5a
LAB_00156f8c:
LEA RCX,[0x187315]
LEA RDI,[RSP + 0x50]
MOV R8D,0x2
XOR ESI,ESI
XOR EDX,EDX
CALL 0x0011fbb0
LEA R12,[RSP + 0xc8]
MOV qword ptr [R12 + -0x10],R12
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JNZ 0x00156fcd
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R12],XMM0
JMP 0x00156fe0
LAB_00156fcd:
MOV qword ptr [RSP + 0xb8],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0xc8],RDX
LAB_00156fe0:
MOV RDX,qword ptr [RAX + 0x8]
LEA RDI,[RSP + 0xb8]
MOV qword ptr [RDI + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LAB_00156fff:
LEA RSI,[0x18731c]
CALL 0x00120280
LAB_0015700b:
LEA RBP,[RSP + 0x20]
MOV qword ptr [RBP + -0x10],RBP
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JNZ 0x0015702c
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RBP],XMM0
JMP 0x00157039
LAB_0015702c:
MOV qword ptr [RSP + 0x10],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x20],RDX
LAB_00157039:
MOV RDX,qword ptr [RAX + 0x8]
LEA R15,[RSP + 0x10]
MOV qword ptr [R15 + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LEA RDI,[RSP + 0x90]
MOV RSI,R15
CALL 0x0011e6d0
MOV RDI,qword ptr [R15]
CMP RDI,RBP
JZ 0x0015707a
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x0011f250
LAB_0015707a:
MOV RDI,qword ptr [RSP + 0xb8]
CMP RDI,R12
JZ 0x00157097
MOV RSI,qword ptr [RSP + 0xc8]
INC RSI
CALL 0x0011f250
LAB_00157097:
MOV RDI,qword ptr [RSP + 0x50]
LEA RAX,[RSP + 0x60]
CMP RDI,RAX
JZ 0x00156e3d
MOV RSI,qword ptr [RSP + 0x60]
INC RSI
CALL 0x0011f250
JMP 0x00156e3d
LAB_001570bc:
LEA RSI,[0x185a38]
LEA RDI,[RSP + 0x10]
LEA R8,[RSP + 0x90]
MOV EDX,0x2f
XOR ECX,ECX
CALL 0x00125059
MOV RBX,qword ptr [R14 + 0x28]
CMP qword ptr [RBX + 0x10],0x0
JNZ 0x001570ec
LAB_001570e7:
CALL 0x0011e580
LAB_001570ec:
MOV RDI,RBX
CALL qword ptr [RBX + 0x18]
CMP EAX,0x4
JA 0x00157129
MOV R9,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x18]
ADD RBX,0x20
LAB_00157105:
MOV qword ptr [RSP],RAX
LEA RCX,[0x187121]
LEA R8,[0x1872f5]
MOV RDI,RBX
MOV ESI,0x4
MOV EDX,0xf6
CALL 0x0011ff80
LAB_00157129:
MOV EDI,0x28
CALL 0x0011e7e0
LEA RCX,[0x1ae450]
MOV qword ptr [RAX],RCX
LEA RDX,[RAX + 0x18]
MOV qword ptr [RAX + 0x8],RDX
LEA RCX,[RSP + 0x20]
MOV RSI,qword ptr [RCX + -0x10]
CMP RSI,RCX
JNZ 0x0015715b
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RDX],XMM0
JMP 0x00157168
LAB_0015715b:
MOV qword ptr [RAX + 0x8],RSI
MOV RDX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX + 0x18],RDX
LAB_00157168:
MOV RDX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX + 0x10],RDX
MOV qword ptr [RSP + 0x10],RCX
MOV qword ptr [RSP + 0x18],0x0
MOV byte ptr [RSP + 0x20],0x0
LAB_00157184:
LEA RSI,[0x1ae380]
LEA RDX,[0x123d34]
MOV RDI,RAX
CALL 0x0011fec0
|
/* aimrt::runtime::core::logger::LoggerManager::GenInitializationReport[abi:cxx11]() const */
void aimrt::runtime::core::logger::LoggerManager::GenInitializationReport_abi_cxx11_(void)
{
int8 *puVar1;
long lVar2;
uint uVar3;
long *plVar4;
int8 *puVar5;
long *plVar6;
ulong *puVar7;
long in_RSI;
_List_node_base *in_RDI;
int1 auVar8 [16];
int1 local_f8 [16];
int8 local_e8;
int8 uStack_e0;
long *local_d8;
long local_c8 [2];
int1 *local_b8;
int8 local_b0;
int1 local_a8;
int7 uStack_a7;
int8 *local_98;
int8 *puStack_90;
int8 local_88;
int1 *local_78;
int8 local_70;
int1 local_68;
int7 uStack_67;
long *local_50;
long local_48;
long local_40;
long lStack_38;
if (*(int *)(in_RSI + 0x20) == 1) {
local_98 = (int8 *)0x0;
puStack_90 = (int8 *)0x0;
local_88 = 0;
/* try { // try from 00156dac to 00156db0 has its CatchHandler @ 001571d4 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::reserve
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_98,
*(long *)(in_RSI + 0x98) - *(long *)(in_RSI + 0x90) >> 3);
puVar5 = *(int8 **)(in_RSI + 0x90);
puVar1 = *(int8 **)(in_RSI + 0x98);
if (puVar5 != puVar1) {
do {
auVar8 = (**(code **)(*(long *)*puVar5 + 0x10))();
local_f8 = auVar8;
/* try { // try from 00156de2 to 00156dec has its CatchHandler @ 001571d6 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::basic_string_view<char,std::char_traits<char>>>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_98,
local_f8);
puVar5 = puVar5 + 1;
} while (puVar5 != puVar1);
}
local_70 = 0;
local_68 = 0;
local_78 = &local_68;
if (local_98 == puStack_90) {
/* try { // try from 00156e1f to 00156e3c has its CatchHandler @ 001571be */
std::__cxx11::string::_M_replace((string *)&local_78,0,0,"<empty>",7);
}
else {
local_b8 = &local_a8;
local_b0 = 0;
local_a8 = 0;
puVar5 = local_98;
do {
if (puVar5 != local_98) {
/* try { // try from 00156f61 to 00156f80 has its CatchHandler @ 001571dd */
std::__cxx11::string::append((string *)&local_b8," , ",3);
}
std::__cxx11::string::_M_append((string *)&local_b8,(char *)*puVar5,puVar5[1]);
puVar5 = puVar5 + 4;
} while (puVar5 != puStack_90);
/* try { // try from 00156f8c to 00156fa6 has its CatchHandler @ 001571bc */
plVar4 = (long *)std::__cxx11::string::replace((string *)&local_b8,0,0,"[ ",2);
local_50 = (long *)*plVar4;
plVar6 = plVar4 + 2;
if (local_50 == plVar6) {
local_40 = *plVar6;
lStack_38 = plVar4[3];
local_50 = &local_40;
}
else {
local_40 = *plVar6;
}
local_48 = plVar4[1];
*plVar4 = (long)plVar6;
plVar4[1] = 0;
*(int1 *)(plVar4 + 2) = 0;
/* try { // try from 00156fff to 0015700a has its CatchHandler @ 0015719a */
plVar4 = (long *)std::__cxx11::string::append((string *)&local_50," ]");
local_f8._0_8_ = *plVar4;
puVar7 = (ulong *)(plVar4 + 2);
if ((ulong *)local_f8._0_8_ == puVar7) {
local_e8 = *puVar7;
uStack_e0 = plVar4[3];
local_f8._0_8_ = &local_e8;
}
else {
local_e8 = *puVar7;
}
local_f8._8_8_ = plVar4[1];
*plVar4 = (long)puVar7;
plVar4[1] = 0;
*(int1 *)(plVar4 + 2) = 0;
std::__cxx11::string::operator=((string *)&local_78,(string *)local_f8);
if ((int8 *)local_f8._0_8_ != &local_e8) {
operator_delete((void *)local_f8._0_8_,local_e8 + 1);
}
if (local_50 != &local_40) {
operator_delete(local_50,local_40 + 1);
}
if (local_b8 != &local_a8) {
operator_delete(local_b8,CONCAT71(uStack_a7,local_a8) + 1);
}
}
/* try { // try from 00156e3d to 00156e55 has its CatchHandler @ 001571cf */
_ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_EC2IRA17_KcRS5_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISD_SE_EEEbE4typeELb1EEEOSD_OSE_
(local_f8,"Log Backend List",&local_78);
/* try { // try from 00156e56 to 00156e72 has its CatchHandler @ 001571c0 */
std::__cxx11::
list<std::pair<std::__cxx11::string,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string,std::__cxx11::string>>>
::list();
if (local_d8 != local_c8) {
operator_delete(local_d8,local_c8[0] + 1);
}
if ((int8 *)local_f8._0_8_ != &local_e8) {
operator_delete((void *)local_f8._0_8_,local_e8 + 1);
}
puVar1 = *(int8 **)(in_RSI + 0x98);
for (puVar5 = *(int8 **)(in_RSI + 0x90); puVar5 != puVar1; puVar5 = puVar5 + 1) {
(**(code **)(*(long *)*puVar5 + 0x30))
((_List_base<std::pair<std::__cxx11::string,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string,std::__cxx11::string>>>
*)local_f8);
if ((_List_base<std::pair<std::__cxx11::string,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string,std::__cxx11::string>>>
*)local_f8._0_8_ !=
(_List_base<std::pair<std::__cxx11::string,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string,std::__cxx11::string>>>
*)local_f8) {
std::__detail::_List_node_base::_M_transfer(in_RDI,(_List_node_base *)local_f8._0_8_);
*(ulong *)(in_RDI + 0x10) = *(long *)(in_RDI + 0x10) + local_e8;
local_e8 = 0;
}
std::__cxx11::
_List_base<std::pair<std::__cxx11::string,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string,std::__cxx11::string>>>
::_M_clear((_List_base<std::pair<std::__cxx11::string,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string,std::__cxx11::string>>>
*)local_f8);
}
if (local_78 != &local_68) {
operator_delete(local_78,CONCAT71(uStack_67,local_68) + 1);
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_98);
return;
}
fmt::v10::vformat_abi_cxx11_
(local_f8,"Method can only be called when state is \'Init\'.",0x2f,0,&local_78);
lVar2 = *(long *)(in_RSI + 0x28);
if (*(long *)(lVar2 + 0x10) == 0) {
/* WARNING: Subroutine does not return */
/* try { // try from 001570e7 to 001570f1 has its CatchHandler @ 00157225 */
std::__throw_bad_function_call();
}
uVar3 = (**(code **)(lVar2 + 0x18))(lVar2);
if (uVar3 < 5) {
/* try { // try from 00157105 to 00157128 has its CatchHandler @ 001571db */
std::function<void(unsigned_int,unsigned_int,char_const*,char_const*,char_const*,unsigned_long)>
::operator()((int)lVar2 + 0x20,4,(char *)0xf6,
"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/aimrt-src/src/runtime/core/logger/logger_manager.cc"
,"GenInitializationReport",local_f8._0_8_);
}
puVar5 = (int8 *)__cxa_allocate_exception(0x28);
*puVar5 = &PTR__AimRTException_001ae450;
puVar5[1] = puVar5 + 3;
if ((int8 *)local_f8._0_8_ == &local_e8) {
*(int4 *)(puVar5 + 3) = (int4)local_e8;
*(int4 *)((long)puVar5 + 0x1c) = local_e8._4_4_;
*(int4 *)(puVar5 + 4) = (int4)uStack_e0;
*(int4 *)((long)puVar5 + 0x24) = uStack_e0._4_4_;
}
else {
puVar5[1] = local_f8._0_8_;
puVar5[3] = local_e8;
}
puVar5[2] = local_f8._8_8_;
local_f8._8_8_ = 0;
local_e8 = local_e8 & 0xffffffffffffff00;
local_f8._0_8_ = &local_e8;
/* try { // try from 00157184 to 00157199 has its CatchHandler @ 00157225 */
/* WARNING: Subroutine does not return */
__cxa_throw(puVar5,&common::util::AimRTException::typeinfo,
common::util::AimRTException::~AimRTException);
}
| |
33,566 | ma_redo_not_needed_for_page | eloqsql/storage/maria/ma_recovery_util.c | my_bool _ma_redo_not_needed_for_page(uint16 shortid, LSN lsn,
pgcache_page_no_t page,
my_bool index)
{
if (cmp_translog_addr(lsn, checkpoint_start) < 0)
{
/*
64-bit key is formed like this:
Most significant byte: 0 if data page, 1 if index page
Next 2 bytes: table's short id
Next 5 bytes: page number
*/
char llbuf[22];
uint64 file_and_page_id=
(((uint64)((index << 16) | shortid)) << 40) | page;
struct st_dirty_page *dirty_page= (struct st_dirty_page *)
my_hash_search(&all_dirty_pages,
(uchar *)&file_and_page_id, sizeof(file_and_page_id));
DBUG_PRINT("info", ("page %lld in dirty pages list: %d",
(ulonglong) page,
dirty_page != NULL));
if ((dirty_page == NULL) ||
cmp_translog_addr(lsn, dirty_page->rec_lsn) < 0)
{
tprint(tracef, ", ignoring page %s because of dirty_pages list\n",
llstr((ulonglong) page, llbuf));
return TRUE;
}
}
return FALSE;
} | O0 | c | ma_redo_not_needed_for_page:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movb %cl, %al
movw %di, %cx
movq %fs:0x28, %rdi
movq %rdi, -0x8(%rbp)
movw %cx, -0x24(%rbp)
movq %rsi, -0x30(%rbp)
movq %rdx, -0x38(%rbp)
movb %al, -0x39(%rbp)
movq -0x30(%rbp), %rax
subq 0xbe9b3c(%rip), %rax # 0xc895b0
cmpq $0x0, %rax
jge 0x9fb02
movsbl -0x39(%rbp), %eax
shll $0x10, %eax
movzwl -0x24(%rbp), %ecx
orl %ecx, %eax
cltq
shlq $0x28, %rax
orq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq 0xbe9b20(%rip), %rdi # 0xc895c0
leaq -0x48(%rbp), %rsi
movl $0x8, %edx
callq 0xe30b0
movq %rax, -0x50(%rbp)
jmp 0x9fab4
cmpq $0x0, -0x50(%rbp)
je 0x9facd
movq -0x30(%rbp), %rax
movq -0x50(%rbp), %rcx
subq 0x8(%rcx), %rax
cmpq $0x0, %rax
jge 0x9fb00
movq 0xbe9b5c(%rip), %rax # 0xc89630
movq %rax, -0x58(%rbp)
movq -0x38(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x156730
movq -0x58(%rbp), %rdi
movq %rax, %rdx
leaq 0xbe66a(%rip), %rsi # 0x15e15d
movb $0x0, %al
callq 0x9f840
movb $0x1, -0x21(%rbp)
jmp 0x9fb06
jmp 0x9fb02
movb $0x0, -0x21(%rbp)
movb -0x21(%rbp), %al
movb %al, -0x59(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x9fb27
movb -0x59(%rbp), %al
addq $0x60, %rsp
popq %rbp
retq
callq 0x2a250
nopl (%rax)
| _ma_redo_not_needed_for_page:
push rbp
mov rbp, rsp
sub rsp, 60h
mov al, cl
mov cx, di
mov rdi, fs:28h
mov [rbp+var_8], rdi
mov [rbp+var_24], cx
mov [rbp+var_30], rsi
mov [rbp+var_38], rdx
mov [rbp+var_39], al
mov rax, [rbp+var_30]
sub rax, cs:checkpoint_start
cmp rax, 0
jge loc_9FB02
movsx eax, [rbp+var_39]
shl eax, 10h
movzx ecx, [rbp+var_24]
or eax, ecx
cdqe
shl rax, 28h
or rax, [rbp+var_38]
mov [rbp+var_48], rax
lea rdi, all_dirty_pages
lea rsi, [rbp+var_48]
mov edx, 8
call my_hash_search
mov [rbp+var_50], rax
jmp short $+2
loc_9FAB4:
cmp [rbp+var_50], 0
jz short loc_9FACD
mov rax, [rbp+var_30]
mov rcx, [rbp+var_50]
sub rax, [rcx+8]
cmp rax, 0
jge short loc_9FB00
loc_9FACD:
mov rax, cs:tracef
mov [rbp+var_58], rax
mov rdi, [rbp+var_38]
lea rsi, [rbp+var_20]
call llstr
mov rdi, [rbp+var_58]
mov rdx, rax
lea rsi, aIgnoringPageSB; ", ignoring page %s because of dirty_pag"...
mov al, 0
call tprint
mov [rbp+var_21], 1
jmp short loc_9FB06
loc_9FB00:
jmp short $+2
loc_9FB02:
mov [rbp+var_21], 0
loc_9FB06:
mov al, [rbp+var_21]
mov [rbp+var_59], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_9FB27
mov al, [rbp+var_59]
add rsp, 60h
pop rbp
retn
loc_9FB27:
call ___stack_chk_fail
| char ma_redo_not_needed_for_page(
unsigned __int16 a1,
long long a2,
long long a3,
char a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
long long v12; // rax
long long v13; // rcx
long long v14; // r8
long long v15; // r9
__m128 v16; // xmm4
__m128 v17; // xmm5
char v19; // [rsp+0h] [rbp-60h]
long long v20; // [rsp+8h] [rbp-58h]
long long v21; // [rsp+10h] [rbp-50h]
long long v22; // [rsp+18h] [rbp-48h] BYREF
char v23; // [rsp+27h] [rbp-39h]
long long v24; // [rsp+28h] [rbp-38h]
long long v25; // [rsp+30h] [rbp-30h]
unsigned __int16 v26; // [rsp+3Ch] [rbp-24h]
_BYTE v28[24]; // [rsp+40h] [rbp-20h] BYREF
unsigned long long v29; // [rsp+58h] [rbp-8h]
v29 = __readfsqword(0x28u);
v26 = a1;
v25 = a2;
v24 = a3;
v23 = a4;
if ( a2 - checkpoint_start >= 0 )
return 0;
v22 = v24 | ((long long)(v26 | (v23 << 16)) << 40);
v21 = my_hash_search(&all_dirty_pages, &v22, 8LL);
if ( v21 )
{
if ( v25 - *(_QWORD *)(v21 + 8) >= 0 )
return 0;
}
v20 = tracef;
v12 = llstr(v24, v28);
tprint(
v20,
(long long)", ignoring page %s because of dirty_pages list\n",
v12,
v13,
v14,
v15,
a5,
a6,
a7,
a8,
v16,
v17,
a11,
a12,
v19);
return 1;
}
| _ma_redo_not_needed_for_page:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV AL,CL
MOV CX,DI
MOV RDI,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RDI
MOV word ptr [RBP + -0x24],CX
MOV qword ptr [RBP + -0x30],RSI
MOV qword ptr [RBP + -0x38],RDX
MOV byte ptr [RBP + -0x39],AL
MOV RAX,qword ptr [RBP + -0x30]
SUB RAX,qword ptr [0x00d895b0]
CMP RAX,0x0
JGE 0x0019fb02
MOVSX EAX,byte ptr [RBP + -0x39]
SHL EAX,0x10
MOVZX ECX,word ptr [RBP + -0x24]
OR EAX,ECX
CDQE
SHL RAX,0x28
OR RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x48],RAX
LEA RDI,[0xd895c0]
LEA RSI,[RBP + -0x48]
MOV EDX,0x8
CALL 0x001e30b0
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0019fab4
LAB_0019fab4:
CMP qword ptr [RBP + -0x50],0x0
JZ 0x0019facd
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x50]
SUB RAX,qword ptr [RCX + 0x8]
CMP RAX,0x0
JGE 0x0019fb00
LAB_0019facd:
MOV RAX,qword ptr [0x00d89630]
MOV qword ptr [RBP + -0x58],RAX
MOV RDI,qword ptr [RBP + -0x38]
LEA RSI,[RBP + -0x20]
CALL 0x00256730
MOV RDI,qword ptr [RBP + -0x58]
MOV RDX,RAX
LEA RSI,[0x25e15d]
MOV AL,0x0
CALL 0x0019f840
MOV byte ptr [RBP + -0x21],0x1
JMP 0x0019fb06
LAB_0019fb00:
JMP 0x0019fb02
LAB_0019fb02:
MOV byte ptr [RBP + -0x21],0x0
LAB_0019fb06:
MOV AL,byte ptr [RBP + -0x21]
MOV byte ptr [RBP + -0x59],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0019fb27
MOV AL,byte ptr [RBP + -0x59]
ADD RSP,0x60
POP RBP
RET
LAB_0019fb27:
CALL 0x0012a250
|
int8
_ma_redo_not_needed_for_page(int2 param_1,long param_2,ulong param_3,int1 param_4)
{
int8 uVar1;
long lVar2;
int8 uVar3;
long in_FS_OFFSET;
ulong local_50;
int1 local_41;
ulong local_40;
long local_38;
int2 local_2c;
int1 local_29;
int1 local_28 [24];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_41 = param_4;
local_40 = param_3;
local_38 = param_2;
local_2c = param_1;
if (param_2 - checkpoint_start < 0) {
local_50 = (long)(int)CONCAT12(param_4,param_1) << 0x28 | param_3;
lVar2 = my_hash_search(all_dirty_pages,&local_50,8);
uVar1 = tracef;
if ((lVar2 == 0) || (local_38 - *(long *)(lVar2 + 8) < 0)) {
uVar3 = llstr(local_40,local_28);
tprint(uVar1,", ignoring page %s because of dirty_pages list\n",uVar3);
local_29 = 1;
goto LAB_0019fb06;
}
}
local_29 = 0;
LAB_0019fb06:
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_29);
}
| |
33,567 | psi_mutex_lock | eloqsql/mysys/my_thr_init.c | ATTRIBUTE_COLD int psi_mutex_lock(mysql_mutex_t *that,
const char *file, uint line)
{
PSI_mutex_locker_state state;
PSI_mutex_locker *locker= PSI_MUTEX_CALL(start_mutex_wait)
(&state, that->m_psi, PSI_MUTEX_LOCK, file, line);
# ifdef SAFE_MUTEX
int result= safe_mutex_lock(&that->m_mutex, FALSE, file, line);
# else
int result= pthread_mutex_lock(&that->m_mutex);
# endif
if (locker)
PSI_MUTEX_CALL(end_mutex_wait)(locker, result);
return result;
} | O0 | c | psi_mutex_lock:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq 0x1ba606(%rip), %rax # 0x217310
movq (%rax), %rax
movq 0x190(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x40(%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 0x264c0
movl %eax, -0x54(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x5cd5d
leaq 0x1ba5c6(%rip), %rax # 0x217310
movq (%rax), %rax
movq 0x198(%rax), %rax
movq -0x50(%rbp), %rdi
movl -0x54(%rbp), %esi
callq *%rax
movl -0x54(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| psi_mutex_lock:
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+190h]
mov rcx, [rbp+var_8]
mov rsi, [rcx+40h]
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 _pthread_mutex_lock
mov [rbp+var_54], eax
cmp [rbp+var_50], 0
jz short loc_5CD5D
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+198h]
mov rdi, [rbp+var_50]
mov esi, [rbp+var_54]
call rax
loc_5CD5D:
mov eax, [rbp+var_54]
add rsp, 60h
pop rbp
retn
| long long psi_mutex_lock(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[50])(
v6,
*(_QWORD *)(a1 + 64),
0LL,
a2,
a3);
v4 = pthread_mutex_lock(v9);
if ( v5 )
((void ( *)(long long, _QWORD))PSI_server[51])(v5, v4);
return v4;
}
| psi_mutex_lock:
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,[0x317310]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x190]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x40]
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 0x001264c0
MOV dword ptr [RBP + -0x54],EAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x0015cd5d
LEA RAX,[0x317310]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x198]
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,dword ptr [RBP + -0x54]
CALL RAX
LAB_0015cd5d:
MOV EAX,dword ptr [RBP + -0x54]
ADD RSP,0x60
POP RBP
RET
|
int psi_mutex_lock(pthread_mutex_t *param_1,int8 param_2,int4 param_3)
{
int iVar1;
long lVar2;
int1 local_50 [52];
int4 local_1c;
int8 local_18;
pthread_mutex_t *local_10;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
lVar2 = (**(code **)(PSI_server + 400))
(local_50,*(int8 *)((long)param_1 + 0x40),0,param_2,param_3);
iVar1 = pthread_mutex_lock(local_10);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x198))(lVar2,iVar1);
}
return iVar1;
}
| |
33,568 | eval_num_suffix_ll | eloqsql/mysys/my_getopt.c | static longlong eval_num_suffix_ll(char *argument,
int *error, char *option_name)
{
char *endchar;
longlong num;
DBUG_ENTER("eval_num_suffix_ll");
*error= 0;
errno= 0;
num= strtoll(argument, &endchar, 10);
if (errno == ERANGE)
{
my_getopt_error_reporter(ERROR_LEVEL,
"Incorrect integer value: '%s'", argument);
*error= 1;
DBUG_RETURN(0);
}
num*= eval_num_suffix(endchar, error);
if (*error)
fprintf(stderr,
"Unknown suffix '%c' used for variable '%s' (value '%s')\n",
*endchar, option_name, argument);
DBUG_RETURN(num);
} | O0 | c | eval_num_suffix_ll:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movl $0x0, (%rax)
callq 0x2a7d0
movl $0x0, (%rax)
movq -0x10(%rbp), %rdi
leaq -0x28(%rbp), %rsi
movl $0xa, %edx
callq 0x2a750
movq %rax, -0x30(%rbp)
callq 0x2a7d0
cmpl $0x22, (%rax)
jne 0xf8628
leaq 0x1d25e0(%rip), %rax # 0x2cabe0
movq (%rax), %rcx
movq -0x10(%rbp), %rdx
xorl %edi, %edi
leaq 0x65e32(%rip), %rsi # 0x15e442
movb $0x0, %al
callq *%rcx
movq -0x18(%rbp), %rax
movl $0x1, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0xf8678
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xf8690
imulq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
je 0xf866e
movq 0x1cf992(%rip), %rax # 0x2c7fe0
movq (%rax), %rdi
movq -0x28(%rbp), %rax
movsbl (%rax), %edx
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %r8
leaq 0x65df9(%rip), %rsi # 0x15e460
movb $0x0, %al
callq 0x2a180
jmp 0xf8670
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| eval_num_suffix_ll:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_18]
mov dword ptr [rax], 0
call ___errno_location
mov dword ptr [rax], 0
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_28]
mov edx, 0Ah
call ___isoc23_strtol
mov [rbp+var_30], rax
call ___errno_location
cmp dword ptr [rax], 22h ; '"'
jnz short loc_F8628
lea rax, my_getopt_error_reporter
mov rcx, [rax]
mov rdx, [rbp+var_10]
xor edi, edi
lea rsi, aIncorrectInteg; "Incorrect integer value: '%s'"
mov al, 0
call rcx
mov rax, [rbp+var_18]
mov dword ptr [rax], 1
mov [rbp+var_8], 0
jmp short loc_F8678
loc_F8628:
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_18]
call eval_num_suffix
imul rax, [rbp+var_30]
mov [rbp+var_30], rax
mov rax, [rbp+var_18]
cmp dword ptr [rax], 0
jz short loc_F866E
mov rax, cs:stderr_ptr
mov rdi, [rax]
mov rax, [rbp+var_28]
movsx edx, byte ptr [rax]
mov rcx, [rbp+var_20]
mov r8, [rbp+var_10]
lea rsi, aUnknownSuffixC; "Unknown suffix '%c' used for variable '"...
mov al, 0
call _fprintf
loc_F866E:
jmp short $+2
loc_F8670:
mov rax, [rbp+var_30]
mov [rbp+var_8], rax
loc_F8678:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| long long eval_num_suffix_ll(const char *a1, _DWORD *a2, const char *a3)
{
long long v4; // [rsp+0h] [rbp-30h]
long long v5; // [rsp+0h] [rbp-30h]
char *v6; // [rsp+8h] [rbp-28h] BYREF
const char *v7; // [rsp+10h] [rbp-20h]
_DWORD *v8; // [rsp+18h] [rbp-18h]
const char *v9; // [rsp+20h] [rbp-10h]
v9 = a1;
v8 = a2;
v7 = a3;
*a2 = 0;
*(_DWORD *)__errno_location() = 0;
v4 = __isoc23_strtol(v9, &v6, 10LL);
if ( *(_DWORD *)__errno_location() == 34 )
{
my_getopt_error_reporter(0, (long long)"Incorrect integer value: '%s'", v9);
*v8 = 1;
return 0LL;
}
else
{
v5 = v4 * eval_num_suffix(v6, v8);
if ( *v8 )
fprintf(stderr, "Unknown suffix '%c' used for variable '%s' (value '%s')\n", (unsigned int)*v6, v7, v9);
return v5;
}
}
| eval_num_suffix_ll:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX],0x0
CALL 0x0012a7d0
MOV dword ptr [RAX],0x0
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0x28]
MOV EDX,0xa
CALL 0x0012a750
MOV qword ptr [RBP + -0x30],RAX
CALL 0x0012a7d0
CMP dword ptr [RAX],0x22
JNZ 0x001f8628
LEA RAX,[0x3cabe0]
MOV RCX,qword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x10]
XOR EDI,EDI
LEA RSI,[0x25e442]
MOV AL,0x0
CALL RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX],0x1
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001f8678
LAB_001f8628:
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001f8690
IMUL RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX],0x0
JZ 0x001f866e
MOV RAX,qword ptr [0x003c7fe0]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x28]
MOVSX EDX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x20]
MOV R8,qword ptr [RBP + -0x10]
LEA RSI,[0x25e460]
MOV AL,0x0
CALL 0x0012a180
LAB_001f866e:
JMP 0x001f8670
LAB_001f8670:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x8],RAX
LAB_001f8678:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
long eval_num_suffix_ll(int8 param_1,int *param_2,int8 param_3)
{
int *piVar1;
long lVar2;
char *local_30;
int8 local_28;
int *local_20;
int8 local_18;
long local_10;
*param_2 = 0;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
piVar1 = __errno_location();
*piVar1 = 0;
lVar2 = __isoc23_strtol(local_18,&local_30,10);
piVar1 = __errno_location();
if (*piVar1 == 0x22) {
(*(code *)my_getopt_error_reporter)(0,"Incorrect integer value: \'%s\'",local_18);
*local_20 = 1;
local_10 = 0;
}
else {
local_10 = eval_num_suffix(local_30,local_20);
local_10 = local_10 * lVar2;
if (*local_20 != 0) {
fprintf(*(FILE **)PTR_stderr_003c7fe0,
"Unknown suffix \'%c\' used for variable \'%s\' (value \'%s\')\n",
(ulong)(uint)(int)*local_30,local_28,local_18);
}
}
return local_10;
}
| |
33,569 | js_generator_function_call | bluesky950520[P]quickjs/quickjs.c | static JSValue js_generator_function_call(JSContext *ctx, JSValue func_obj,
JSValue this_obj,
int argc, JSValue *argv,
int flags)
{
JSValue obj, func_ret;
JSGeneratorData *s;
s = js_mallocz(ctx, sizeof(*s));
if (!s)
return JS_EXCEPTION;
s->state = JS_GENERATOR_STATE_SUSPENDED_START;
if (async_func_init(ctx, &s->func_state, func_obj, this_obj, argc, argv)) {
s->state = JS_GENERATOR_STATE_COMPLETED;
goto fail;
}
/* execute the function up to 'OP_initial_yield' */
func_ret = async_func_resume(ctx, &s->func_state);
if (JS_IsException(func_ret))
goto fail;
JS_FreeValue(ctx, func_ret);
obj = js_create_from_ctor(ctx, func_obj, JS_CLASS_GENERATOR);
if (JS_IsException(obj))
goto fail;
JS_SetOpaqueInternal(obj, s);
return obj;
fail:
free_generator_stack_rt(ctx->rt, s);
js_free(ctx, s);
return JS_EXCEPTION;
} | O0 | c | js_generator_function_call:
subq $0x98, %rsp
movl 0xa8(%rsp), %eax
movq 0xa0(%rsp), %rax
movq %rsi, 0x78(%rsp)
movq %rdx, 0x80(%rsp)
movq %rcx, 0x68(%rsp)
movq %r8, 0x70(%rsp)
movq %rdi, 0x60(%rsp)
movl %r9d, 0x5c(%rsp)
movq 0x60(%rsp), %rdi
movl $0x70, %esi
callq 0x28020
movq %rax, 0x30(%rsp)
cmpq $0x0, 0x30(%rsp)
jne 0x294bf
movl $0x0, 0x88(%rsp)
movq $0x6, 0x90(%rsp)
jmp 0x29636
movq 0x30(%rsp), %rax
movl $0x0, (%rax)
movq 0x60(%rsp), %rdi
movq 0x30(%rsp), %rsi
addq $0x8, %rsi
movl 0x5c(%rsp), %r10d
movq 0xa0(%rsp), %rax
movq 0x78(%rsp), %rdx
movq 0x80(%rsp), %rcx
movq 0x68(%rsp), %r8
movq 0x70(%rsp), %r9
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x782a0
cmpl $0x0, %eax
je 0x2951f
movq 0x30(%rsp), %rax
movl $0x4, (%rax)
jmp 0x295fd
movq 0x60(%rsp), %rdi
movq 0x30(%rsp), %rsi
addq $0x8, %rsi
callq 0x78610
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x29fb0
cmpl $0x0, %eax
je 0x29569
jmp 0x295fd
movq 0x60(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
callq 0x29f80
movq 0x60(%rsp), %rdi
movq 0x78(%rsp), %rsi
movq 0x80(%rsp), %rdx
movl $0x2f, %ecx
callq 0x5b0f0
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0x29fb0
cmpl $0x0, %eax
je 0x295cd
jmp 0x295fd
movq 0x30(%rsp), %rdx
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0x30c90
movq 0x48(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x90(%rsp)
jmp 0x29636
movq 0x60(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x30(%rsp), %rsi
callq 0x624c0
movq 0x60(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x280a0
movl $0x0, 0x88(%rsp)
movq $0x6, 0x90(%rsp)
movq 0x88(%rsp), %rax
movq 0x90(%rsp), %rdx
addq $0x98, %rsp
retq
nop
| js_generator_function_call:
sub rsp, 98h
mov eax, [rsp+98h+arg_8]
mov rax, [rsp+98h+arg_0]
mov [rsp+98h+var_20], rsi
mov [rsp+98h+var_18], rdx
mov [rsp+98h+var_30], rcx
mov [rsp+98h+var_28], r8
mov [rsp+98h+var_38], rdi
mov [rsp+98h+var_3C], r9d
mov rdi, [rsp+98h+var_38]
mov esi, 70h ; 'p'
call js_mallocz
mov [rsp+98h+var_68], rax
cmp [rsp+98h+var_68], 0
jnz short loc_294BF
mov dword ptr [rsp+98h+var_10], 0
mov [rsp+98h+var_8], 6
jmp loc_29636
loc_294BF:
mov rax, [rsp+98h+var_68]
mov dword ptr [rax], 0
mov rdi, [rsp+98h+var_38]
mov rsi, [rsp+98h+var_68]
add rsi, 8
mov r10d, [rsp+98h+var_3C]
mov rax, [rsp+98h+arg_0]
mov rdx, [rsp+98h+var_20]
mov rcx, [rsp+98h+var_18]
mov r8, [rsp+98h+var_30]
mov r9, [rsp+98h+var_28]
mov [rsp+98h+var_98], r10d
mov [rsp+98h+var_90], rax
call async_func_init
cmp eax, 0
jz short loc_2951F
mov rax, [rsp+98h+var_68]
mov dword ptr [rax], 4
jmp loc_295FD
loc_2951F:
mov rdi, [rsp+98h+var_38]
mov rsi, [rsp+98h+var_68]
add rsi, 8
call async_func_resume
mov [rsp+98h+var_78], rax
mov [rsp+98h+var_70], rdx
mov rax, [rsp+98h+var_78]
mov [rsp+98h+var_60], rax
mov rax, [rsp+98h+var_70]
mov [rsp+98h+var_58], rax
mov rdi, [rsp+98h+var_60]
mov rsi, [rsp+98h+var_58]
call JS_IsException_1
cmp eax, 0
jz short loc_29569
jmp loc_295FD
loc_29569:
mov rdi, [rsp+98h+var_38]
mov rsi, [rsp+98h+var_60]
mov rdx, [rsp+98h+var_58]
call JS_FreeValue
mov rdi, [rsp+98h+var_38]
mov rsi, [rsp+98h+var_20]
mov rdx, [rsp+98h+var_18]
mov ecx, 2Fh ; '/'
call js_create_from_ctor
mov [rsp+98h+var_88], rax
mov [rsp+98h+var_80], rdx
mov rax, [rsp+98h+var_88]
mov [rsp+98h+var_50], rax
mov rax, [rsp+98h+var_80]
mov [rsp+98h+var_48], rax
mov rdi, [rsp+98h+var_50]
mov rsi, [rsp+98h+var_48]
call JS_IsException_1
cmp eax, 0
jz short loc_295CD
jmp short loc_295FD
loc_295CD:
mov rdx, [rsp+98h+var_68]
mov rdi, [rsp+98h+var_50]
mov rsi, [rsp+98h+var_48]
call JS_SetOpaqueInternal
mov rax, [rsp+98h+var_50]
mov [rsp+98h+var_10], rax
mov rax, [rsp+98h+var_48]
mov [rsp+98h+var_8], rax
jmp short loc_29636
loc_295FD:
mov rax, [rsp+98h+var_38]
mov rdi, [rax+18h]
mov rsi, [rsp+98h+var_68]
call free_generator_stack_rt
mov rdi, [rsp+98h+var_38]
mov rsi, [rsp+98h+var_68]
call js_free
mov dword ptr [rsp+98h+var_10], 0
mov [rsp+98h+var_8], 6
loc_29636:
mov rax, [rsp+98h+var_10]
mov rdx, [rsp+98h+var_8]
add rsp, 98h
retn
| long long js_generator_function_call(long long a1, long long a2, long long a3, int a4, int a5, int a6, long long a7)
{
long long v7; // rdx
long long v8; // rdx
long long v10; // [rsp+10h] [rbp-88h]
long long v11; // [rsp+20h] [rbp-78h]
_DWORD *v12; // [rsp+30h] [rbp-68h]
long long v13; // [rsp+40h] [rbp-58h]
long long v14; // [rsp+50h] [rbp-48h]
long long v19; // [rsp+88h] [rbp-10h]
v12 = (_DWORD *)js_mallocz(a1, 0x70uLL);
if ( v12 )
{
*v12 = 0;
if ( (unsigned int)async_func_init(a1, (int)v12 + 8, a2, a3, a4, a5, a6, a7) )
{
*v12 = 4;
}
else
{
v11 = async_func_resume(a1, v12 + 2);
v13 = v7;
if ( !(unsigned int)JS_IsException_1(v11, v7) )
{
JS_FreeValue(a1, v11, v13);
v10 = js_create_from_ctor(a1, a2, a3, 47LL);
v14 = v8;
if ( !(unsigned int)JS_IsException_1(v10, v8) )
{
JS_SetOpaqueInternal(v10, v14, v12);
return v10;
}
}
}
free_generator_stack_rt(*(_QWORD *)(a1 + 24), v12);
js_free(a1, (long long)v12);
LODWORD(v19) = 0;
return v19;
}
LODWORD(v19) = 0;
return v19;
}
| js_generator_function_call:
SUB RSP,0x98
MOV EAX,dword ptr [RSP + 0xa8]
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x78],RSI
MOV qword ptr [RSP + 0x80],RDX
MOV qword ptr [RSP + 0x68],RCX
MOV qword ptr [RSP + 0x70],R8
MOV qword ptr [RSP + 0x60],RDI
MOV dword ptr [RSP + 0x5c],R9D
MOV RDI,qword ptr [RSP + 0x60]
MOV ESI,0x70
CALL 0x00128020
MOV qword ptr [RSP + 0x30],RAX
CMP qword ptr [RSP + 0x30],0x0
JNZ 0x001294bf
MOV dword ptr [RSP + 0x88],0x0
MOV qword ptr [RSP + 0x90],0x6
JMP 0x00129636
LAB_001294bf:
MOV RAX,qword ptr [RSP + 0x30]
MOV dword ptr [RAX],0x0
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x30]
ADD RSI,0x8
MOV R10D,dword ptr [RSP + 0x5c]
MOV RAX,qword ptr [RSP + 0xa0]
MOV RDX,qword ptr [RSP + 0x78]
MOV RCX,qword ptr [RSP + 0x80]
MOV R8,qword ptr [RSP + 0x68]
MOV R9,qword ptr [RSP + 0x70]
MOV dword ptr [RSP],R10D
MOV qword ptr [RSP + 0x8],RAX
CALL 0x001782a0
CMP EAX,0x0
JZ 0x0012951f
MOV RAX,qword ptr [RSP + 0x30]
MOV dword ptr [RAX],0x4
JMP 0x001295fd
LAB_0012951f:
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x30]
ADD RSI,0x8
CALL 0x00178610
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],RDX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x40],RAX
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RSP + 0x40]
CALL 0x00129fb0
CMP EAX,0x0
JZ 0x00129569
JMP 0x001295fd
LAB_00129569:
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
CALL 0x00129f80
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x78]
MOV RDX,qword ptr [RSP + 0x80]
MOV ECX,0x2f
CALL 0x0015b0f0
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x48],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x50],RAX
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x50]
CALL 0x00129fb0
CMP EAX,0x0
JZ 0x001295cd
JMP 0x001295fd
LAB_001295cd:
MOV RDX,qword ptr [RSP + 0x30]
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x50]
CALL 0x00130c90
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x88],RAX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x90],RAX
JMP 0x00129636
LAB_001295fd:
MOV RAX,qword ptr [RSP + 0x60]
MOV RDI,qword ptr [RAX + 0x18]
MOV RSI,qword ptr [RSP + 0x30]
CALL 0x001624c0
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x30]
CALL 0x001280a0
MOV dword ptr [RSP + 0x88],0x0
MOV qword ptr [RSP + 0x90],0x6
LAB_00129636:
MOV RAX,qword ptr [RSP + 0x88]
MOV RDX,qword ptr [RSP + 0x90]
ADD RSP,0x98
RET
|
int1 [16]
js_generator_function_call
(long param_1,int8 param_2,int8 param_3,int8 param_4,int8 param_5,
int4 param_6,int8 param_7)
{
int iVar1;
int4 *puVar2;
int1 auVar3 [16];
int4 local_10;
int4 uStack_c;
int8 local_8;
puVar2 = (int4 *)js_mallocz(param_1,0x70);
if (puVar2 == (int4 *)0x0) {
local_10 = 0;
local_8 = 6;
}
else {
*puVar2 = 0;
iVar1 = async_func_init(param_1,puVar2 + 2,param_2,param_3,param_4,param_5,param_6,param_7);
if (iVar1 == 0) {
auVar3 = async_func_resume(param_1,puVar2 + 2);
iVar1 = JS_IsException(auVar3._0_8_,auVar3._8_8_);
if (iVar1 == 0) {
JS_FreeValue(param_1,auVar3._0_8_,auVar3._8_8_);
auVar3 = js_create_from_ctor(param_1,param_2,param_3,0x2f);
local_8 = auVar3._8_8_;
iVar1 = JS_IsException(auVar3._0_8_,local_8);
if (iVar1 == 0) {
JS_SetOpaqueInternal(auVar3._0_8_,local_8,puVar2);
local_10 = auVar3._0_4_;
uStack_c = auVar3._4_4_;
goto LAB_00129636;
}
}
}
else {
*puVar2 = 4;
}
free_generator_stack_rt(*(int8 *)(param_1 + 0x18),puVar2);
js_free(param_1,puVar2);
local_10 = 0;
local_8 = 6;
}
LAB_00129636:
auVar3._4_4_ = uStack_c;
auVar3._0_4_ = local_10;
auVar3._8_8_ = local_8;
return auVar3;
}
| |
33,570 | glfwPlatformSetWindowAspectRatio | untodesu[P]riteg/build_O3/_deps/glfw-src/src/x11_window.c | void _glfwPlatformSetWindowAspectRatio(_GLFWwindow* window, int numer, int denom)
{
int width, height;
_glfwPlatformGetWindowSize(window, &width, &height);
updateNormalHints(window, width, height);
XFlush(_glfw.x11.display);
} | O3 | c | glfwPlatformSetWindowAspectRatio:
pushq %r15
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %rdi, %rbx
leaq 0x85682(%rip), %r15 # 0xa8638
movq 0x1fec0(%r15), %rdi
movq 0x348(%rbx), %rsi
leaq 0x8(%rsp), %r14
movq %r14, %rdx
callq 0xcf20
movl 0x8(%r14), %esi
movl 0xc(%r14), %edx
movq %rbx, %rdi
callq 0x22e55
movq 0x1fec0(%r15), %rdi
callq 0xcce0
addq $0x90, %rsp
popq %rbx
popq %r14
popq %r15
retq
| _glfwPlatformSetWindowAspectRatio:
push r15
push r14
push rbx
sub rsp, 90h
mov rbx, rdi
lea r15, _glfw
mov rdi, [r15+1FEC0h]
mov rsi, [rbx+348h]
lea r14, [rsp+0A8h+var_A0]
mov rdx, r14
call _XGetWindowAttributes
mov esi, [r14+8]
mov edx, [r14+0Ch]
mov rdi, rbx
call updateNormalHints
mov rdi, [r15+1FEC0h]
call _XFlush
add rsp, 90h
pop rbx
pop r14
pop r15
retn
| long long glfwPlatformSetWindowAspectRatio(long long a1)
{
_BYTE v2[8]; // [rsp+8h] [rbp-A0h] BYREF
int v3; // [rsp+10h] [rbp-98h]
int v4; // [rsp+14h] [rbp-94h]
XGetWindowAttributes(*(_QWORD *)&glfw[32688], *(_QWORD *)(a1 + 840), v2);
updateNormalHints(a1, v3, v4);
return XFlush(*(_QWORD *)&glfw[32688]);
}
| _glfwPlatformSetWindowAspectRatio:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x90
MOV RBX,RDI
LEA R15,[0x1a8638]
MOV RDI,qword ptr [R15 + 0x1fec0]
MOV RSI,qword ptr [RBX + 0x348]
LEA R14,[RSP + 0x8]
MOV RDX,R14
CALL 0x0010cf20
MOV ESI,dword ptr [R14 + 0x8]
MOV EDX,dword ptr [R14 + 0xc]
MOV RDI,RBX
CALL 0x00122e55
MOV RDI,qword ptr [R15 + 0x1fec0]
CALL 0x0010cce0
ADD RSP,0x90
POP RBX
POP R14
POP R15
RET
|
void _glfwPlatformSetWindowAspectRatio(long param_1)
{
int1 local_a0 [8];
int4 local_98;
int4 local_94;
XGetWindowAttributes(DAT_001c84f8,*(int8 *)(param_1 + 0x348),local_a0);
updateNormalHints(param_1,local_98,local_94);
XFlush(DAT_001c84f8);
return;
}
| |
33,571 | string_format[abi:cxx11](char const*, ...) | llama.cpp/common/common.cpp | std::string string_format(const char * fmt, ...) {
va_list ap;
va_list ap2;
va_start(ap, fmt);
va_copy(ap2, ap);
int size = vsnprintf(NULL, 0, fmt, ap);
GGML_ASSERT(size >= 0 && size < INT_MAX); // NOLINT
std::vector<char> buf(size + 1);
int size2 = vsnprintf(buf.data(), size + 1, fmt, ap2);
GGML_ASSERT(size2 == size);
va_end(ap2);
va_end(ap);
return std::string(buf.data(), size);
} | O3 | cpp | string_format[abi:cxx11](char const*, ...):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x110, %rsp # imm = 0x110
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x60(%rsp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0xf5486
movaps %xmm0, 0x90(%rsp)
movaps %xmm1, 0xa0(%rsp)
movaps %xmm2, 0xb0(%rsp)
movaps %xmm3, 0xc0(%rsp)
movaps %xmm4, 0xd0(%rsp)
movaps %xmm5, 0xe0(%rsp)
movaps %xmm6, 0xf0(%rsp)
movaps %xmm7, 0x100(%rsp)
movabsq $0x3000000010, %rax # imm = 0x3000000010
leaq 0x40(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x140(%rsp), %rax
movq %rax, 0x8(%rcx)
movq %rsi, 0x10(%rcx)
movq %rsi, 0x30(%rsp)
movq (%rcx), %rax
movq %rax, 0x20(%rsp)
movq 0x8(%rcx), %rax
movq %rax, 0x28(%rsp)
xorl %edi, %edi
xorl %esi, %esi
movq %r14, %rdx
callq 0x21438
cmpl $0x7fffffff, %eax # imm = 0x7FFFFFFF
jae 0xf5546
movl %eax, %r15d
leal 0x1(%r15), %r12d
leaq 0x8(%rsp), %r13
leaq 0x7(%rsp), %rdx
movq %r13, %rdi
movq %r12, %rsi
callq 0xcd86e
movq (%r13), %rdi
leaq 0x20(%rsp), %rcx
movq %r12, %rsi
movq %r14, %rdx
callq 0x21438
cmpl %r15d, %eax
jne 0xf5567
movq 0x8(%rsp), %rsi
movl %r15d, %edx
leaq 0x7(%rsp), %rcx
movq %rbx, %rdi
callq 0x20e10
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xf5532
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x20170
movq %rbx, %rax
addq $0x110, %rsp # imm = 0x110
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x2db58(%rip), %rdi # 0x1230a5
leaq 0x22fef(%rip), %rdx # 0x118543
leaq 0x2db87(%rip), %rcx # 0x1230e2
movl $0x188, %esi # imm = 0x188
xorl %eax, %eax
callq 0x20e00
leaq 0x2db37(%rip), %rdi # 0x1230a5
leaq 0x22fce(%rip), %rdx # 0x118543
leaq 0x2db82(%rip), %rcx # 0x1230fe
movl $0x18b, %esi # imm = 0x18B
xorl %eax, %eax
callq 0x20e00
jmp 0xf558a
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xf55a4
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x20170
movq %rbx, %rdi
callq 0x20ab0
| _Z13string_formatB5cxx11PKcz:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 110h
mov r14, rsi
mov rbx, rdi
lea rsi, [rsp+138h+var_D8]
mov [rsi+10h], rdx
mov [rsi+18h], rcx
mov [rsi+20h], r8
mov [rsi+28h], r9
test al, al
jz short loc_F5486
movaps [rsp+138h+var_A8], xmm0
movaps [rsp+138h+var_98], xmm1
movaps [rsp+138h+var_88], xmm2
movaps [rsp+138h+var_78], xmm3
movaps [rsp+138h+var_68], xmm4
movaps [rsp+138h+var_58], xmm5
movaps [rsp+138h+var_48], xmm6
movaps [rsp+138h+var_38], xmm7
loc_F5486:
mov rax, 3000000010h
lea rcx, [rsp+138h+var_F8]
mov [rcx], rax
lea rax, [rsp+138h+arg_0]
mov [rcx+8], rax
mov [rcx+10h], rsi
mov [rsp+138h+var_108], rsi
mov rax, [rcx]
mov [rsp+138h+var_118], rax
mov rax, [rcx+8]
mov [rsp+138h+var_110], rax
xor edi, edi
xor esi, esi
mov rdx, r14
call vsnprintf
cmp eax, 7FFFFFFFh
jnb short loc_F5546
mov r15d, eax
lea r12d, [r15+1]
lea r13, [rsp+138h+var_130]
lea rdx, [rsp+138h+var_131]
mov rdi, r13
mov rsi, r12
call _ZNSt6vectorIcSaIcEEC2EmRKS0_; std::vector<char>::vector(ulong,std::allocator<char> const&)
mov rdi, [r13+0]
lea rcx, [rsp+138h+var_118]
mov rsi, r12
mov rdx, r14
call vsnprintf
cmp eax, r15d
jnz short loc_F5567
mov rsi, [rsp+138h+var_130]
mov edx, r15d
lea rcx, [rsp+138h+var_131]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcmRKS3_; std::string::basic_string(char const*,ulong,std::allocator<char> const&)
mov rdi, [rsp+138h+var_130]; void *
test rdi, rdi
jz short loc_F5532
mov rsi, [rsp+138h+var_120]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_F5532:
mov rax, rbx
add rsp, 110h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_F5546:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aSize0SizeIntMa; "size >= 0 && size < INT_MAX"
mov esi, 188h
xor eax, eax
call _ggml_abort
loc_F5567:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/llama."...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aSize2Size; "size2 == size"
mov esi, 18Bh
xor eax, eax
call _ggml_abort
jmp short $+2
loc_F558A:
mov rbx, rax
mov rdi, [rsp+138h+var_130]; void *
test rdi, rdi
jz short loc_F55A4
mov rsi, [rsp+138h+var_120]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_F55A4:
mov rdi, rbx
call __Unwind_Resume
| long long string_format[abi:cxx11](
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)
{
unsigned int v15; // eax
unsigned int v16; // r15d
signed long long v17; // r12
long long v19; // rax
long long v20; // rbx
char v21; // [rsp+7h] [rbp-131h] BYREF
void *v22; // [rsp+8h] [rbp-130h] BYREF
long long v23; // [rsp+18h] [rbp-120h]
_QWORD v24[4]; // [rsp+20h] [rbp-118h] BYREF
_QWORD v25[4]; // [rsp+40h] [rbp-F8h] BYREF
_BYTE v26[16]; // [rsp+60h] [rbp-D8h] BYREF
long long v27; // [rsp+70h] [rbp-C8h]
long long v28; // [rsp+78h] [rbp-C0h]
long long v29; // [rsp+80h] [rbp-B8h]
long long v30; // [rsp+88h] [rbp-B0h]
__m128 v31; // [rsp+90h] [rbp-A8h]
__m128 v32; // [rsp+A0h] [rbp-98h]
__m128 v33; // [rsp+B0h] [rbp-88h]
__m128 v34; // [rsp+C0h] [rbp-78h]
__m128 v35; // [rsp+D0h] [rbp-68h]
__m128 v36; // [rsp+E0h] [rbp-58h]
__m128 v37; // [rsp+F0h] [rbp-48h]
__m128 v38; // [rsp+100h] [rbp-38h]
v31 = a7;
v32 = a8;
v33 = a9;
v34 = a10;
v35 = a11;
v36 = a12;
v37 = a13;
v38 = a14;
v27 = a3;
v28 = a4;
v29 = a5;
v30 = a6;
v25[0] = 0x3000000010LL;
v25[1] = &a15;
v25[2] = v26;
v24[2] = v26;
v24[0] = 0x3000000010LL;
v24[1] = &a15;
v15 = vsnprintf(0LL, 0LL, a2, v25);
if ( v15 >= 0x7FFFFFFF )
{
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/common.cpp",
392LL,
"GGML_ASSERT(%s) failed",
"size >= 0 && size < INT_MAX");
LABEL_7:
ggml_abort(
"/workspace/llm4binary/github2025/llama.cpp/common/common.cpp",
395LL,
"GGML_ASSERT(%s) failed",
"size2 == size");
v20 = v19;
if ( v22 )
operator delete(v22, v23 - (_QWORD)v22);
_Unwind_Resume(v20);
}
v16 = v15;
v17 = v15 + 1;
std::vector<char>::vector(&v22, v17);
if ( (unsigned int)vsnprintf(v22, v17, a2, v24) != v16 )
goto LABEL_7;
std::string::basic_string(a1, v22, v16, &v21);
if ( v22 )
operator delete(v22, v23 - (_QWORD)v22);
return a1;
}
| string_format[abi:cxx11]:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x110
MOV R14,RSI
MOV RBX,RDI
LEA RSI,[RSP + 0x60]
MOV qword ptr [RSI + 0x10],RDX
MOV qword ptr [RSI + 0x18],RCX
MOV qword ptr [RSI + 0x20],R8
MOV qword ptr [RSI + 0x28],R9
TEST AL,AL
JZ 0x001f5486
MOVAPS xmmword ptr [RSP + 0x90],XMM0
MOVAPS xmmword ptr [RSP + 0xa0],XMM1
MOVAPS xmmword ptr [RSP + 0xb0],XMM2
MOVAPS xmmword ptr [RSP + 0xc0],XMM3
MOVAPS xmmword ptr [RSP + 0xd0],XMM4
MOVAPS xmmword ptr [RSP + 0xe0],XMM5
MOVAPS xmmword ptr [RSP + 0xf0],XMM6
MOVAPS xmmword ptr [RSP + 0x100],XMM7
LAB_001f5486:
MOV RAX,0x3000000010
LEA RCX,[RSP + 0x40]
MOV qword ptr [RCX],RAX
LEA RAX,[RSP + 0x140]
MOV qword ptr [RCX + 0x8],RAX
MOV qword ptr [RCX + 0x10],RSI
MOV qword ptr [RSP + 0x30],RSI
MOV RAX,qword ptr [RCX]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RCX + 0x8]
MOV qword ptr [RSP + 0x28],RAX
XOR EDI,EDI
XOR ESI,ESI
MOV RDX,R14
CALL 0x00121438
CMP EAX,0x7fffffff
JNC 0x001f5546
MOV R15D,EAX
LEA R12D,[R15 + 0x1]
LEA R13,[RSP + 0x8]
LEA RDX,[RSP + 0x7]
MOV RDI,R13
MOV RSI,R12
CALL 0x001cd86e
MOV RDI,qword ptr [R13]
LEA RCX,[RSP + 0x20]
MOV RSI,R12
MOV RDX,R14
CALL 0x00121438
CMP EAX,R15D
JNZ 0x001f5567
MOV RSI,qword ptr [RSP + 0x8]
MOV EDX,R15D
LAB_001f550e:
LEA RCX,[RSP + 0x7]
MOV RDI,RBX
CALL 0x00120e10
LAB_001f551b:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x001f5532
MOV RSI,qword ptr [RSP + 0x18]
SUB RSI,RDI
CALL 0x00120170
LAB_001f5532:
MOV RAX,RBX
ADD RSP,0x110
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_001f5546:
LEA RDI,[0x2230a5]
LEA RDX,[0x218543]
LEA RCX,[0x2230e2]
MOV ESI,0x188
XOR EAX,EAX
CALL 0x00120e00
LAB_001f5567:
LEA RDI,[0x2230a5]
LEA RDX,[0x218543]
LEA RCX,[0x2230fe]
MOV ESI,0x18b
XOR EAX,EAX
CALL 0x00120e00
|
/* string_format[abi:cxx11](char const*, ...) */
char * string_format_abi_cxx11_(char *param_1,...)
{
char in_AL;
uint uVar1;
uint uVar2;
int8 in_RCX;
int8 in_RDX;
char *in_RSI;
int8 in_R8;
int8 in_R9;
int8 in_XMM0_Qa;
int8 in_XMM1_Qa;
int8 in_XMM2_Qa;
int8 in_XMM3_Qa;
int8 in_XMM4_Qa;
int8 in_XMM5_Qa;
int8 in_XMM6_Qa;
int8 in_XMM7_Qa;
allocator local_131;
char *local_130 [2];
long local_120;
int8 local_118;
int1 *local_110;
int1 *local_108;
int8 local_f8;
int1 *local_f0;
int1 *local_e8;
int1 local_d8 [16];
int8 local_c8;
int8 local_c0;
int8 local_b8;
int8 local_b0;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
int8 local_38;
local_108 = local_d8;
if (in_AL != '\0') {
local_a8 = in_XMM0_Qa;
local_98 = in_XMM1_Qa;
local_88 = in_XMM2_Qa;
local_78 = in_XMM3_Qa;
local_68 = in_XMM4_Qa;
local_58 = in_XMM5_Qa;
local_48 = in_XMM6_Qa;
local_38 = in_XMM7_Qa;
}
local_f8 = 0x3000000010;
local_110 = &stack0x00000008;
local_118 = 0x3000000010;
local_f0 = local_110;
local_e8 = local_108;
local_c8 = in_RDX;
local_c0 = in_RCX;
local_b8 = in_R8;
local_b0 = in_R9;
uVar1 = vsnprintf((char *)0x0,0,in_RSI,&local_f8);
if (uVar1 < 0x7fffffff) {
std::vector<char,std::allocator<char>>::vector((ulong)local_130,(allocator *)(ulong)(uVar1 + 1))
;
uVar2 = vsnprintf(local_130[0],(size_t)(ulong)(uVar1 + 1),in_RSI,&local_118);
if (uVar2 == uVar1) {
/* try { // try from 001f550e to 001f551a has its CatchHandler @ 001f5588 */
std::__cxx11::string::string((string *)param_1,local_130[0],(ulong)uVar1,&local_131);
if (local_130[0] != (char *)0x0) {
operator_delete(local_130[0],local_120 - (long)local_130[0]);
}
return param_1;
}
/* try { // try from 001f5567 to 001f5587 has its CatchHandler @ 001f558a */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/common.cpp",0x18b,
"GGML_ASSERT(%s) failed","size2 == size");
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/common.cpp",0x188,
"GGML_ASSERT(%s) failed","size >= 0 && size < INT_MAX");
}
| |
33,572 | ma_get_dynamic | eloqsql/libmariadb/libmariadb/ma_array.c | void ma_get_dynamic(DYNAMIC_ARRAY *array, void * element, uint idx)
{
if (idx >= array->elements)
{
memset(element, 0, array->size_of_element);
return;
}
memcpy(element,array->buffer+idx*array->size_of_element,
(size_t) array->size_of_element);
} | O0 | c | ma_get_dynamic:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jb 0xcb3a5
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x3a2e0
jmp 0xcb3ce
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
imull 0x14(%rcx), %eax
movl %eax, %eax
addq %rax, %rsi
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, %edx
callq 0x3a0b0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_get_dynamic:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov eax, [rbp+var_14]
mov rcx, [rbp+var_8]
cmp eax, [rcx+8]
jb short loc_CB3A5
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov eax, [rax+14h]
mov edx, eax
xor esi, esi
call _memset
jmp short loc_CB3CE
loc_CB3A5:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov rsi, [rax]
mov eax, [rbp+var_14]
mov rcx, [rbp+var_8]
imul eax, [rcx+14h]
mov eax, eax
add rsi, rax
mov rax, [rbp+var_8]
mov eax, [rax+14h]
mov edx, eax
call _memcpy
loc_CB3CE:
add rsp, 20h
pop rbp
retn
| long long ma_get_dynamic(long long a1, long long a2, unsigned int a3)
{
if ( a3 < *(_DWORD *)(a1 + 8) )
return memcpy(a2, *(_DWORD *)(a1 + 20) * a3 + *(_QWORD *)a1, *(unsigned int *)(a1 + 20));
else
return memset(a2, 0LL, *(unsigned int *)(a1 + 20));
}
| ma_get_dynamic:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV EAX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX + 0x8]
JC 0x001cb3a5
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x14]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x0013a2e0
JMP 0x001cb3ce
LAB_001cb3a5:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RAX]
MOV EAX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x8]
IMUL EAX,dword ptr [RCX + 0x14]
MOV EAX,EAX
ADD RSI,RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x14]
MOV EDX,EAX
CALL 0x0013a0b0
LAB_001cb3ce:
ADD RSP,0x20
POP RBP
RET
|
void ma_get_dynamic(long *param_1,void *param_2,uint param_3)
{
if (param_3 < *(uint *)(param_1 + 1)) {
memcpy(param_2,(void *)(*param_1 + (ulong)(param_3 * *(int *)((long)param_1 + 0x14))),
(ulong)*(uint *)((long)param_1 + 0x14));
}
else {
memset(param_2,0,(ulong)*(uint *)((long)param_1 + 0x14));
}
return;
}
| |
33,573 | ma_check_bitmap_data | eloqsql/storage/maria/ma_bitmap.c | my_bool _ma_check_bitmap_data(MARIA_HA *info, enum en_page_type page_type,
uint empty_space, uint bitmap_pattern)
{
uint bits;
switch (page_type) {
case UNALLOCATED_PAGE:
case MAX_PAGE_TYPE:
bits= 0;
break;
case HEAD_PAGE:
bits= _ma_free_size_to_head_pattern(&info->s->bitmap, empty_space);
break;
case TAIL_PAGE:
bits= free_size_to_tail_pattern(&info->s->bitmap, empty_space);
break;
case BLOB_PAGE:
bits= FULL_TAIL_PAGE;
break;
default:
bits= 0; /* to satisfy compiler */
DBUG_ASSERT(0);
}
return (bitmap_pattern != bits);
} | O0 | c | ma_check_bitmap_data:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0x20(%rbp)
subq $0x4, %rax
ja 0x454fe
movq -0x20(%rbp), %rax
leaq 0x114c3b(%rip), %rcx # 0x15a0e8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x0, -0x18(%rbp)
jmp 0x45509
movq -0x8(%rbp), %rax
movq (%rax), %rdi
addq $0xa10, %rdi # imm = 0xA10
movl -0x10(%rbp), %esi
callq 0x43880
movl %eax, -0x18(%rbp)
jmp 0x45509
movq -0x8(%rbp), %rax
movq (%rax), %rdi
addq $0xa10, %rdi # imm = 0xA10
movl -0x10(%rbp), %esi
callq 0x45200
movl %eax, -0x18(%rbp)
jmp 0x45509
movl $0x7, -0x18(%rbp)
jmp 0x45509
movl $0x0, -0x18(%rbp)
jmp 0x45507
jmp 0x45509
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| _ma_check_bitmap_data:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], edx
mov [rbp+var_14], ecx
mov eax, [rbp+var_C]
mov [rbp+var_20], rax
sub rax, 4; switch 5 cases
ja short def_454B4; jumptable 00000000000454B4 default case
mov rax, [rbp+var_20]
lea rcx, jpt_454B4
movsxd rax, ds:(jpt_454B4 - 15A0E8h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_454B6:
mov [rbp+var_18], 0; jumptable 00000000000454B4 cases 0,4
jmp short loc_45509
loc_454BF:
mov rax, [rbp+var_8]; jumptable 00000000000454B4 case 1
mov rdi, [rax]
add rdi, 0A10h
mov esi, [rbp+var_10]
call _ma_free_size_to_head_pattern
mov [rbp+var_18], eax
jmp short loc_45509
loc_454DA:
mov rax, [rbp+var_8]; jumptable 00000000000454B4 case 2
mov rdi, [rax]
add rdi, 0A10h
mov esi, [rbp+var_10]
call free_size_to_tail_pattern
mov [rbp+var_18], eax
jmp short loc_45509
loc_454F5:
mov [rbp+var_18], 7; jumptable 00000000000454B4 case 3
jmp short loc_45509
def_454B4:
mov [rbp+var_18], 0; jumptable 00000000000454B4 default case
jmp short $+2
loc_45507:
jmp short $+2
loc_45509:
mov eax, [rbp+var_14]
cmp eax, [rbp+var_18]
setnz al
and al, 1
movzx eax, al
add rsp, 20h
pop rbp
retn
| _BOOL8 ma_check_bitmap_data(long long a1, int a2, unsigned int a3, int a4)
{
int v5; // [rsp+8h] [rbp-18h]
switch ( a2 )
{
case 0:
case 4:
v5 = 0;
break;
case 1:
v5 = ma_free_size_to_head_pattern((_DWORD *)(*(_QWORD *)a1 + 2576LL), a3);
break;
case 2:
v5 = free_size_to_tail_pattern((_DWORD *)(*(_QWORD *)a1 + 2576LL), a3);
break;
case 3:
v5 = 7;
break;
default:
v5 = 0;
break;
}
return a4 != v5;
}
| _ma_check_bitmap_data:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],EDX
MOV dword ptr [RBP + -0x14],ECX
MOV EAX,dword ptr [RBP + -0xc]
MOV qword ptr [RBP + -0x20],RAX
SUB RAX,0x4
JA 0x001454fe
MOV RAX,qword ptr [RBP + -0x20]
LEA RCX,[0x25a0e8]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
MOV dword ptr [RBP + -0x18],0x0
JMP 0x00145509
caseD_1:
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX]
ADD RDI,0xa10
MOV ESI,dword ptr [RBP + -0x10]
CALL 0x00143880
MOV dword ptr [RBP + -0x18],EAX
JMP 0x00145509
caseD_2:
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX]
ADD RDI,0xa10
MOV ESI,dword ptr [RBP + -0x10]
CALL 0x00145200
MOV dword ptr [RBP + -0x18],EAX
JMP 0x00145509
caseD_3:
MOV dword ptr [RBP + -0x18],0x7
JMP 0x00145509
default:
MOV dword ptr [RBP + -0x18],0x0
JMP 0x00145507
LAB_00145507:
JMP 0x00145509
LAB_00145509:
MOV EAX,dword ptr [RBP + -0x14]
CMP EAX,dword ptr [RBP + -0x18]
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
ADD RSP,0x20
POP RBP
RET
|
bool _ma_check_bitmap_data(long *param_1,int4 param_2,int4 param_3,int param_4)
{
int local_20;
switch(param_2) {
case 0:
case 4:
local_20 = 0;
break;
case 1:
local_20 = _ma_free_size_to_head_pattern(*param_1 + 0xa10,param_3);
break;
case 2:
local_20 = free_size_to_tail_pattern(*param_1 + 0xa10,param_3);
break;
case 3:
local_20 = 7;
break;
default:
local_20 = 0;
}
return param_4 != local_20;
}
| |
33,574 | js_new_promise_capability | bluesky950520[P]quickjs/quickjs.c | static JSValue js_new_promise_capability(JSContext *ctx,
JSValue *resolving_funcs,
JSValue ctor)
{
JSValue executor, result_promise;
JSCFunctionDataRecord *s;
int i;
executor = js_promise_executor_new(ctx);
if (JS_IsException(executor))
return executor;
if (JS_IsUndefined(ctor)) {
result_promise = js_promise_constructor(ctx, ctor, 1,
&executor);
} else {
result_promise = JS_CallConstructor(ctx, ctor, 1,
&executor);
}
if (JS_IsException(result_promise))
goto fail;
s = JS_GetOpaque(executor, JS_CLASS_C_FUNCTION_DATA);
for(i = 0; i < 2; i++) {
if (check_function(ctx, s->data[i]))
goto fail;
}
for(i = 0; i < 2; i++)
resolving_funcs[i] = js_dup(s->data[i]);
JS_FreeValue(ctx, executor);
return result_promise;
fail:
JS_FreeValue(ctx, executor);
JS_FreeValue(ctx, result_promise);
return JS_EXCEPTION;
} | O0 | c | js_new_promise_capability:
subq $0xa8, %rsp
movq %rdx, 0x88(%rsp)
movq %rcx, 0x90(%rsp)
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq 0x80(%rsp), %rdi
callq 0x91400
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x68(%rsp), %rdi
movq 0x70(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
je 0x53842
movq 0x68(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0xa0(%rsp)
jmp 0x53a57
movq 0x88(%rsp), %rdi
movq 0x90(%rsp), %rsi
callq 0x2e260
cmpl $0x0, %eax
je 0x538a3
movq 0x80(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdx
movl $0x1, %ecx
leaq 0x68(%rsp), %r8
callq 0x543c0
movq %rax, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x60(%rsp)
jmp 0x538e8
movq 0x80(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdx
movl $0x1, %ecx
leaq 0x68(%rsp), %r8
callq 0x48550
movq %rax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x58(%rsp), %rdi
movq 0x60(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
je 0x53901
jmp 0x53a12
movq 0x68(%rsp), %rdi
movq 0x70(%rsp), %rsi
movl $0xf, %edx
callq 0x38350
movq %rax, 0x50(%rsp)
movl $0x0, 0x4c(%rsp)
cmpl $0x2, 0x4c(%rsp)
jge 0x5396b
movq 0x80(%rsp), %rdi
movq 0x50(%rsp), %rax
addq $0x10, %rax
movslq 0x4c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x6da80
cmpl $0x0, %eax
je 0x5395c
jmp 0x53a12
jmp 0x5395e
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0x53922
movl $0x0, 0x4c(%rsp)
cmpl $0x2, 0x4c(%rsp)
jge 0x539df
movq 0x78(%rsp), %rax
movslq 0x4c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, (%rsp)
movq 0x50(%rsp), %rax
addq $0x10, %rax
movslq 0x4c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x216d0
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x8(%rsp), %rcx
movq %rcx, (%rax)
movq 0x10(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0x53973
movq 0x80(%rsp), %rdi
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
callq 0x23c90
movq 0x58(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0xa0(%rsp)
jmp 0x53a57
movq 0x80(%rsp), %rdi
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
callq 0x23c90
movq 0x80(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
callq 0x23c90
movl $0x0, 0x98(%rsp)
movq $0x6, 0xa0(%rsp)
movq 0x98(%rsp), %rax
movq 0xa0(%rsp), %rdx
addq $0xa8, %rsp
retq
nop
| js_new_promise_capability:
sub rsp, 0A8h
mov [rsp+0A8h+var_20], rdx
mov [rsp+0A8h+var_18], rcx
mov [rsp+0A8h+var_28], rdi
mov [rsp+0A8h+var_30], rsi
mov rdi, [rsp+0A8h+var_28]
call js_promise_executor_new
mov [rsp+0A8h+var_70], rax
mov [rsp+0A8h+var_68], rdx
mov rax, [rsp+0A8h+var_70]
mov [rsp+0A8h+var_40], rax
mov rax, [rsp+0A8h+var_68]
mov [rsp+0A8h+var_38], rax
mov rdi, [rsp+0A8h+var_40]
mov rsi, [rsp+0A8h+var_38]
call JS_IsException_1
cmp eax, 0
jz short loc_53842
mov rax, [rsp+0A8h+var_40]
mov [rsp+0A8h+var_10], rax
mov rax, [rsp+0A8h+var_38]
mov [rsp+0A8h+var_8], rax
jmp loc_53A57
loc_53842:
mov rdi, [rsp+0A8h+var_20]
mov rsi, [rsp+0A8h+var_18]
call JS_IsUndefined_0
cmp eax, 0
jz short loc_538A3
mov rdi, [rsp+0A8h+var_28]
mov rsi, [rsp+0A8h+var_20]
mov rdx, [rsp+0A8h+var_18]
mov ecx, 1
lea r8, [rsp+0A8h+var_40]
call js_promise_constructor
mov [rsp+0A8h+var_80], rax
mov [rsp+0A8h+var_78], rdx
mov rax, [rsp+0A8h+var_80]
mov [rsp+0A8h+var_50], rax
mov rax, [rsp+0A8h+var_78]
mov [rsp+0A8h+var_48], rax
jmp short loc_538E8
loc_538A3:
mov rdi, [rsp+0A8h+var_28]
mov rsi, [rsp+0A8h+var_20]
mov rdx, [rsp+0A8h+var_18]
mov ecx, 1
lea r8, [rsp+0A8h+var_40]
call JS_CallConstructor
mov [rsp+0A8h+var_90], rax
mov [rsp+0A8h+var_88], rdx
mov rax, [rsp+0A8h+var_90]
mov [rsp+0A8h+var_50], rax
mov rax, [rsp+0A8h+var_88]
mov [rsp+0A8h+var_48], rax
loc_538E8:
mov rdi, [rsp+0A8h+var_50]
mov rsi, [rsp+0A8h+var_48]
call JS_IsException_1
cmp eax, 0
jz short loc_53901
jmp loc_53A12
loc_53901:
mov rdi, [rsp+0A8h+var_40]
mov rsi, [rsp+0A8h+var_38]
mov edx, 0Fh
call JS_GetOpaque
mov [rsp+0A8h+var_58], rax
mov [rsp+0A8h+var_5C], 0
loc_53922:
cmp [rsp+0A8h+var_5C], 2
jge short loc_5396B
mov rdi, [rsp+0A8h+var_28]
mov rax, [rsp+0A8h+var_58]
add rax, 10h
movsxd rcx, [rsp+0A8h+var_5C]
shl rcx, 4
add rax, rcx
mov rsi, [rax]
mov rdx, [rax+8]
call check_function
cmp eax, 0
jz short loc_5395C
jmp loc_53A12
loc_5395C:
jmp short $+2
loc_5395E:
mov eax, [rsp+0A8h+var_5C]
add eax, 1
mov [rsp+0A8h+var_5C], eax
jmp short loc_53922
loc_5396B:
mov [rsp+0A8h+var_5C], 0
loc_53973:
cmp [rsp+0A8h+var_5C], 2
jge short loc_539DF
mov rax, [rsp+0A8h+var_30]
movsxd rcx, [rsp+0A8h+var_5C]
shl rcx, 4
add rax, rcx
mov [rsp+0A8h+var_A8], rax
mov rax, [rsp+0A8h+var_58]
add rax, 10h
movsxd rcx, [rsp+0A8h+var_5C]
shl rcx, 4
add rax, rcx
mov rdi, [rax]
mov rsi, [rax+8]
call js_dup
mov rcx, rax
mov rax, [rsp+0A8h+var_A8]
mov [rsp+0A8h+var_A0], rcx
mov [rsp+0A8h+var_98], rdx
mov rcx, [rsp+0A8h+var_A0]
mov [rax], rcx
mov rcx, [rsp+0A8h+var_98]
mov [rax+8], rcx
mov eax, [rsp+0A8h+var_5C]
add eax, 1
mov [rsp+0A8h+var_5C], eax
jmp short loc_53973
loc_539DF:
mov rdi, [rsp+0A8h+var_28]
mov rsi, [rsp+0A8h+var_40]
mov rdx, [rsp+0A8h+var_38]
call JS_FreeValue
mov rax, [rsp+0A8h+var_50]
mov [rsp+0A8h+var_10], rax
mov rax, [rsp+0A8h+var_48]
mov [rsp+0A8h+var_8], rax
jmp short loc_53A57
loc_53A12:
mov rdi, [rsp+0A8h+var_28]
mov rsi, [rsp+0A8h+var_40]
mov rdx, [rsp+0A8h+var_38]
call JS_FreeValue
mov rdi, [rsp+0A8h+var_28]
mov rsi, [rsp+0A8h+var_50]
mov rdx, [rsp+0A8h+var_48]
call JS_FreeValue
mov dword ptr [rsp+0A8h+var_10], 0
mov [rsp+0A8h+var_8], 6
loc_53A57:
mov rax, [rsp+0A8h+var_10]
mov rdx, [rsp+0A8h+var_8]
add rsp, 0A8h
retn
| long long js_new_promise_capability(
long long a1,
long long a2,
long long a3,
unsigned long long a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
long long v12; // rdx
double v13; // xmm4_8
double v14; // xmm5_8
long long v15; // rdx
long long v16; // rdx
_QWORD *v18; // [rsp+0h] [rbp-A8h]
int i; // [rsp+4Ch] [rbp-5Ch]
int j; // [rsp+4Ch] [rbp-5Ch]
long long Opaque; // [rsp+50h] [rbp-58h]
long long v22; // [rsp+58h] [rbp-50h]
long long v23; // [rsp+60h] [rbp-48h]
long long v24; // [rsp+68h] [rbp-40h] BYREF
long long v25; // [rsp+70h] [rbp-38h]
long long v26; // [rsp+78h] [rbp-30h]
long long v27; // [rsp+80h] [rbp-28h]
long long v28; // [rsp+88h] [rbp-20h]
unsigned long long v29; // [rsp+90h] [rbp-18h]
long long v30; // [rsp+98h] [rbp-10h]
long long v31; // [rsp+A0h] [rbp-8h]
v28 = a3;
v29 = a4;
v27 = a1;
v26 = a2;
v24 = js_promise_executor_new(a1);
v25 = v12;
if ( JS_IsException_1(v24, v12) )
{
v30 = v24;
v31 = v25;
}
else
{
if ( JS_IsUndefined_0(v28, v29) )
v22 = js_promise_constructor(v27, v28, v29, 1LL, &v24);
else
v22 = JS_CallConstructor(v27, v28, v29, 1u, (long long)&v24, a5, a6, a7, a8, v13, v14, a11, a12);
v23 = v15;
if ( JS_IsException_1(v22, v15) )
{
LABEL_15:
JS_FreeValue(v27, v24, v25);
JS_FreeValue(v27, v22, v23);
LODWORD(v30) = 0;
v31 = 6LL;
}
else
{
Opaque = JS_GetOpaque(v24, v25, 15);
for ( i = 0; i < 2; ++i )
{
if ( (unsigned int)check_function(
v27,
*(_QWORD *)(16LL * i + Opaque + 16),
*(_QWORD *)(16LL * i + Opaque + 16 + 8)) )
goto LABEL_15;
}
for ( j = 0; j < 2; ++j )
{
v18 = (_QWORD *)(16LL * j + v26);
*v18 = js_dup(*(_DWORD **)(16LL * j + Opaque + 16), *(_QWORD *)(16LL * j + Opaque + 16 + 8));
v18[1] = v16;
}
JS_FreeValue(v27, v24, v25);
v30 = v22;
v31 = v23;
}
}
return v30;
}
| js_new_promise_capability:
SUB RSP,0xa8
MOV qword ptr [RSP + 0x88],RDX
MOV qword ptr [RSP + 0x90],RCX
MOV qword ptr [RSP + 0x80],RDI
MOV qword ptr [RSP + 0x78],RSI
MOV RDI,qword ptr [RSP + 0x80]
CALL 0x00191400
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RDX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x68],RAX
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x70],RAX
MOV RDI,qword ptr [RSP + 0x68]
MOV RSI,qword ptr [RSP + 0x70]
CALL 0x00123cc0
CMP EAX,0x0
JZ 0x00153842
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x98],RAX
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0xa0],RAX
JMP 0x00153a57
LAB_00153842:
MOV RDI,qword ptr [RSP + 0x88]
MOV RSI,qword ptr [RSP + 0x90]
CALL 0x0012e260
CMP EAX,0x0
JZ 0x001538a3
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x88]
MOV RDX,qword ptr [RSP + 0x90]
MOV ECX,0x1
LEA R8,[RSP + 0x68]
CALL 0x001543c0
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x30],RDX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x60],RAX
JMP 0x001538e8
LAB_001538a3:
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x88]
MOV RDX,qword ptr [RSP + 0x90]
MOV ECX,0x1
LEA R8,[RSP + 0x68]
CALL 0x00148550
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x20],RDX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x60],RAX
LAB_001538e8:
MOV RDI,qword ptr [RSP + 0x58]
MOV RSI,qword ptr [RSP + 0x60]
CALL 0x00123cc0
CMP EAX,0x0
JZ 0x00153901
JMP 0x00153a12
LAB_00153901:
MOV RDI,qword ptr [RSP + 0x68]
MOV RSI,qword ptr [RSP + 0x70]
MOV EDX,0xf
CALL 0x00138350
MOV qword ptr [RSP + 0x50],RAX
MOV dword ptr [RSP + 0x4c],0x0
LAB_00153922:
CMP dword ptr [RSP + 0x4c],0x2
JGE 0x0015396b
MOV RDI,qword ptr [RSP + 0x80]
MOV RAX,qword ptr [RSP + 0x50]
ADD RAX,0x10
MOVSXD RCX,dword ptr [RSP + 0x4c]
SHL RCX,0x4
ADD RAX,RCX
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x0016da80
CMP EAX,0x0
JZ 0x0015395c
JMP 0x00153a12
LAB_0015395c:
JMP 0x0015395e
LAB_0015395e:
MOV EAX,dword ptr [RSP + 0x4c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x4c],EAX
JMP 0x00153922
LAB_0015396b:
MOV dword ptr [RSP + 0x4c],0x0
LAB_00153973:
CMP dword ptr [RSP + 0x4c],0x2
JGE 0x001539df
MOV RAX,qword ptr [RSP + 0x78]
MOVSXD RCX,dword ptr [RSP + 0x4c]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP + 0x50]
ADD RAX,0x10
MOVSXD RCX,dword ptr [RSP + 0x4c]
SHL RCX,0x4
ADD RAX,RCX
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x001216d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x8],RCX
MOV qword ptr [RSP + 0x10],RDX
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV EAX,dword ptr [RSP + 0x4c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x4c],EAX
JMP 0x00153973
LAB_001539df:
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
CALL 0x00123c90
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x98],RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0xa0],RAX
JMP 0x00153a57
LAB_00153a12:
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
CALL 0x00123c90
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x60]
CALL 0x00123c90
MOV dword ptr [RSP + 0x98],0x0
MOV qword ptr [RSP + 0xa0],0x6
LAB_00153a57:
MOV RAX,qword ptr [RSP + 0x98]
MOV RDX,qword ptr [RSP + 0xa0]
ADD RSP,0xa8
RET
|
int1 [16]
js_new_promise_capability(int8 param_1,long param_2,int8 param_3,int8 param_4)
{
int iVar1;
long lVar2;
int8 *puVar3;
int1 (*pauVar4) [16];
int1 auVar5 [16];
int1 auVar6 [16];
int local_5c;
int8 local_50;
int8 local_48;
int1 local_40 [16];
long local_30;
int8 local_28;
int8 local_20;
int8 local_18;
int4 local_10;
int4 uStack_c;
int8 local_8;
local_30 = param_2;
local_28 = param_1;
local_20 = param_3;
local_18 = param_4;
local_40 = js_promise_executor_new(param_1);
iVar1 = JS_IsException(local_40._0_8_,local_40._8_8_);
if (iVar1 == 0) {
iVar1 = JS_IsUndefined(local_20,local_18);
if (iVar1 == 0) {
auVar5 = JS_CallConstructor(local_28,local_20,local_18,1,local_40);
}
else {
auVar5 = js_promise_constructor(local_28,local_20,local_18,1,local_40);
}
local_48 = auVar5._8_8_;
local_50 = auVar5._0_8_;
iVar1 = JS_IsException(local_50,local_48);
if (iVar1 == 0) {
lVar2 = JS_GetOpaque(local_40._0_8_,local_40._8_8_,0xf);
for (local_5c = 0; local_5c < 2; local_5c = local_5c + 1) {
puVar3 = (int8 *)(lVar2 + 0x10 + (long)local_5c * 0x10);
iVar1 = check_function(local_28,*puVar3,puVar3[1]);
if (iVar1 != 0) goto LAB_00153a12;
}
local_5c = 0;
while( true ) {
if (1 < local_5c) break;
pauVar4 = (int1 (*) [16])(local_30 + (long)local_5c * 0x10);
puVar3 = (int8 *)(lVar2 + 0x10 + (long)local_5c * 0x10);
auVar6 = js_dup(*puVar3,puVar3[1]);
*pauVar4 = auVar6;
local_5c = local_5c + 1;
}
JS_FreeValue(local_28,local_40._0_8_,local_40._8_8_);
local_10 = auVar5._0_4_;
uStack_c = auVar5._4_4_;
local_8 = local_48;
}
else {
LAB_00153a12:
JS_FreeValue(local_28,local_40._0_8_,local_40._8_8_);
JS_FreeValue(local_28,local_50,local_48);
local_10 = 0;
local_8 = 6;
}
}
else {
local_10 = local_40._0_4_;
uStack_c = local_40._4_4_;
local_8 = local_40._8_8_;
}
auVar5._4_4_ = uStack_c;
auVar5._0_4_ = local_10;
auVar5._8_8_ = local_8;
return auVar5;
}
| |
33,575 | js_new_promise_capability | bluesky950520[P]quickjs/quickjs.c | static JSValue js_new_promise_capability(JSContext *ctx,
JSValue *resolving_funcs,
JSValue ctor)
{
JSValue executor, result_promise;
JSCFunctionDataRecord *s;
int i;
executor = js_promise_executor_new(ctx);
if (JS_IsException(executor))
return executor;
if (JS_IsUndefined(ctor)) {
result_promise = js_promise_constructor(ctx, ctor, 1,
&executor);
} else {
result_promise = JS_CallConstructor(ctx, ctor, 1,
&executor);
}
if (JS_IsException(result_promise))
goto fail;
s = JS_GetOpaque(executor, JS_CLASS_C_FUNCTION_DATA);
for(i = 0; i < 2; i++) {
if (check_function(ctx, s->data[i]))
goto fail;
}
for(i = 0; i < 2; i++)
resolving_funcs[i] = js_dup(s->data[i]);
JS_FreeValue(ctx, executor);
return result_promise;
fail:
JS_FreeValue(ctx, executor);
JS_FreeValue(ctx, result_promise);
return JS_EXCEPTION;
} | O1 | c | js_new_promise_capability:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r13
movq %rdx, 0x8(%rsp)
movq %rsi, %r12
movq %rdi, %rbx
xorl %eax, %eax
leaq 0x10(%rsp), %rbp
movl %eax, (%rbp)
movl $0x3, %ecx
movq %rcx, 0x8(%rbp)
movl %eax, 0x10(%rbp)
movq %rcx, 0x18(%rbp)
leaq 0x1c351(%rip), %rsi # 0x52644
movl $0x2, %edx
xorl %ecx, %ecx
movl $0x2, %r8d
movq %rbp, %r9
callq 0x210ea
movq %rdx, %r14
movq %rax, (%rbp)
movq %rdx, 0x8(%rbp)
cmpl $0x6, %r14d
jne 0x3632b
movq %rax, %r15
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
jmp 0x363a4
cmpl $0x3, %r13d
jne 0x36348
leaq 0x10(%rsp), %r8
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movq %r13, %rdx
callq 0x3670e
jmp 0x3636b
movq %rbx, %rdi
movq 0x8(%rsp), %rcx
movq %rcx, %rsi
movq %r13, %rdx
movq %r13, %r8
movl $0x1, %r9d
pushq $0x2
pushq %rbp
callq 0x2fa61
addq $0x10, %rsp
movq %rax, %r15
movq %rdx, %r14
cmpl $0x6, %r14d
jne 0x363bc
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x18(%rbx), %rdi
callq 0x1d8c6
movq 0x18(%rbx), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1d8c6
movl $0x6, %r14d
xorl %r15d, %r15d
xorl %ecx, %ecx
movl %r15d, %eax
orq %rcx, %rax
movq %r14, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movsd 0x10(%rsp), %xmm0
movl 0x18(%rsp), %eax
movsd %xmm0, (%rsp)
cmpl $-0x1, %eax
jne 0x363e1
movq (%rsp), %rax
cmpw $0xf, 0x6(%rax)
jne 0x363e1
movq 0x30(%rax), %r13
jmp 0x363e4
xorl %r13d, %r13d
xorl %ebp, %ebp
movq 0x10(%r13,%rbp), %rsi
movq 0x18(%r13,%rbp), %rdx
movq %rbx, %rdi
callq 0x415b1
testl %eax, %eax
jne 0x36377
addq $0x10, %rbp
cmpq $0x10, %rbp
je 0x363e6
xorl %eax, %eax
movq 0x10(%r13,%rax), %rcx
movq 0x18(%r13,%rax), %rdx
movq %rcx, (%rsp)
cmpl $-0x9, %edx
jb 0x36425
movq (%rsp), %rsi
incl (%rsi)
movq %rcx, (%r12,%rax)
movq %rdx, 0x8(%r12,%rax)
addq $0x10, %rax
cmpq $0x10, %rax
je 0x3640c
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x18(%rbx), %rdi
callq 0x1d8c6
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r15, %rcx
jmp 0x36326
| js_new_promise_capability:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r13, rcx
mov [rsp+68h+var_60], rdx
mov r12, rsi
mov rbx, rdi
xor eax, eax
lea rbp, [rsp+68h+var_58]
mov [rbp+0], eax
mov ecx, 3
mov [rbp+8], rcx
mov [rbp+10h], eax
mov [rbp+18h], rcx
lea rsi, js_promise_executor
mov edx, 2
xor ecx, ecx
mov r8d, 2
mov r9, rbp
call JS_NewCFunctionData
mov r14, rdx
mov [rbp+0], rax
mov [rbp+8], rdx
cmp r14d, 6
jnz short loc_3632B
mov r15, rax
mov rcx, 0FFFFFFFF00000000h
loc_36326:
and rcx, rax
jmp short loc_363A4
loc_3632B:
cmp r13d, 3
jnz short loc_36348
lea r8, [rsp+68h+var_58]
mov rdi, rbx
mov rsi, [rsp+68h+var_60]
mov rdx, r13
call js_promise_constructor
jmp short loc_3636B
loc_36348:
mov rdi, rbx
mov rcx, [rsp+68h+var_60]
mov rsi, rcx
mov rdx, r13
mov r8, r13
mov r9d, 1
push 2
push rbp
call JS_CallConstructorInternal
add rsp, 10h
loc_3636B:
mov r15, rax
mov r14, rdx
cmp r14d, 6
jnz short loc_363BC
loc_36377:
mov rsi, [rsp+68h+var_58]
mov rdx, [rsp+68h+var_50]
mov rdi, [rbx+18h]
call JS_FreeValueRT
mov rdi, [rbx+18h]
mov rsi, r15
mov rdx, r14
call JS_FreeValueRT
mov r14d, 6
xor r15d, r15d
xor ecx, ecx
loc_363A4:
mov eax, r15d
or rax, rcx
mov rdx, r14
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_363BC:
movsd xmm0, [rsp+68h+var_58]
mov eax, dword ptr [rsp+68h+var_50]
movsd [rsp+68h+var_68], xmm0
cmp eax, 0FFFFFFFFh
jnz short loc_363E1
mov rax, [rsp+68h+var_68]
cmp word ptr [rax+6], 0Fh
jnz short loc_363E1
mov r13, [rax+30h]
jmp short loc_363E4
loc_363E1:
xor r13d, r13d
loc_363E4:
xor ebp, ebp
loc_363E6:
mov rsi, [r13+rbp+10h]
mov rdx, [r13+rbp+18h]
mov rdi, rbx
call check_function
test eax, eax
jnz loc_36377
add rbp, 10h
cmp rbp, 10h
jz short loc_363E6
xor eax, eax
loc_3640C:
mov rcx, [r13+rax+10h]
mov rdx, [r13+rax+18h]
mov [rsp+68h+var_68], rcx
cmp edx, 0FFFFFFF7h
jb short loc_36425
mov rsi, [rsp+68h+var_68]
inc dword ptr [rsi]
loc_36425:
mov [r12+rax], rcx
mov [r12+rax+8], rdx
add rax, 10h
cmp rax, 10h
jz short loc_3640C
mov rsi, [rsp+68h+var_58]
mov rdx, [rsp+68h+var_50]
mov rdi, [rbx+18h]
call JS_FreeValueRT
mov rax, 0FFFFFFFF00000000h
mov rcx, r15
jmp loc_36326
| unsigned long long js_new_promise_capability(
long long *a1,
long long a2,
unsigned long long a3,
long long a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
unsigned long long v13; // rax
long long v14; // rcx
__m128 v15; // xmm4
__m128 v16; // xmm5
long long v17; // rdx
_DWORD *v18; // r15
unsigned long long v19; // rcx
unsigned long long v20; // rcx
unsigned long long v21; // rax
long long v22; // rdx
long long v23; // r14
long long v25; // r13
long long v26; // rbp
long long v27; // rax
long long v28; // rcx
long long v29; // rdx
_DWORD *v31; // [rsp+10h] [rbp-58h] BYREF
long long v32; // [rsp+18h] [rbp-50h]
int v33; // [rsp+20h] [rbp-48h]
long long v34; // [rsp+28h] [rbp-40h]
LODWORD(v31) = 0;
v32 = 3LL;
v33 = 0;
v34 = 3LL;
v13 = JS_NewCFunctionData(a1, (long long)js_promise_executor, 2u, 0, 2, (long long)&v31);
v31 = (_DWORD *)v13;
v32 = v17;
if ( (_DWORD)v17 == 6 )
{
LODWORD(v18) = v13;
v19 = 0xFFFFFFFF00000000LL;
LABEL_3:
v20 = v13 & v19;
}
else
{
if ( (_DWORD)a4 == 3 )
v21 = js_promise_constructor(a1, a3, a4, v14, &v31);
else
v21 = JS_CallConstructorInternal(
(long long)a1,
a3,
a4,
a3,
a4,
1LL,
a5,
a6,
a7,
a8,
v15,
v16,
a11,
a12,
(long long)&v31,
2);
v18 = (_DWORD *)v21;
v23 = v22;
if ( (_DWORD)v22 != 6 )
{
if ( (_DWORD)v32 == -1 && *((_WORD *)v31 + 3) == 15 )
v25 = *((_QWORD *)v31 + 6);
else
v25 = 0LL;
v26 = 0LL;
while ( !(unsigned int)check_function(a1, *(_QWORD *)(v25 + v26 + 16), *(_QWORD *)(v25 + v26 + 24)) )
{
v26 += 16LL;
if ( v26 != 16 )
{
v27 = 0LL;
do
{
v28 = *(_QWORD *)(v25 + v27 + 16);
v29 = *(_QWORD *)(v25 + v27 + 24);
if ( (unsigned int)v29 >= 0xFFFFFFF7 )
++**(_DWORD **)(v25 + v27 + 16);
*(_QWORD *)(a2 + v27) = v28;
*(_QWORD *)(a2 + v27 + 8) = v29;
v27 += 16LL;
}
while ( v27 == 16 );
JS_FreeValueRT(a1[3], v31, v32);
v13 = 0xFFFFFFFF00000000LL;
v19 = (unsigned long long)v18;
goto LABEL_3;
}
}
}
JS_FreeValueRT(a1[3], v31, v32);
JS_FreeValueRT(a1[3], v18, v23);
LODWORD(v18) = 0;
v20 = 0LL;
}
return v20 | (unsigned int)v18;
}
| js_new_promise_capability:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R13,RCX
MOV qword ptr [RSP + 0x8],RDX
MOV R12,RSI
MOV RBX,RDI
XOR EAX,EAX
LEA RBP,[RSP + 0x10]
MOV dword ptr [RBP],EAX
MOV ECX,0x3
MOV qword ptr [RBP + 0x8],RCX
MOV dword ptr [RBP + 0x10],EAX
MOV qword ptr [RBP + 0x18],RCX
LEA RSI,[0x152644]
MOV EDX,0x2
XOR ECX,ECX
MOV R8D,0x2
MOV R9,RBP
CALL 0x001210ea
MOV R14,RDX
MOV qword ptr [RBP],RAX
MOV qword ptr [RBP + 0x8],RDX
CMP R14D,0x6
JNZ 0x0013632b
MOV R15,RAX
MOV RCX,-0x100000000
LAB_00136326:
AND RCX,RAX
JMP 0x001363a4
LAB_0013632b:
CMP R13D,0x3
JNZ 0x00136348
LEA R8,[RSP + 0x10]
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,R13
CALL 0x0013670e
JMP 0x0013636b
LAB_00136348:
MOV RDI,RBX
MOV RCX,qword ptr [RSP + 0x8]
MOV RSI,RCX
MOV RDX,R13
MOV R8,R13
MOV R9D,0x1
PUSH 0x2
PUSH RBP
CALL 0x0012fa61
ADD RSP,0x10
LAB_0013636b:
MOV R15,RAX
MOV R14,RDX
CMP R14D,0x6
JNZ 0x001363bc
LAB_00136377:
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x0011d8c6
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R15
MOV RDX,R14
CALL 0x0011d8c6
MOV R14D,0x6
XOR R15D,R15D
XOR ECX,ECX
LAB_001363a4:
MOV EAX,R15D
OR RAX,RCX
MOV RDX,R14
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001363bc:
MOVSD XMM0,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RSP + 0x18]
MOVSD qword ptr [RSP],XMM0
CMP EAX,-0x1
JNZ 0x001363e1
MOV RAX,qword ptr [RSP]
CMP word ptr [RAX + 0x6],0xf
JNZ 0x001363e1
MOV R13,qword ptr [RAX + 0x30]
JMP 0x001363e4
LAB_001363e1:
XOR R13D,R13D
LAB_001363e4:
XOR EBP,EBP
LAB_001363e6:
MOV RSI,qword ptr [R13 + RBP*0x1 + 0x10]
MOV RDX,qword ptr [R13 + RBP*0x1 + 0x18]
MOV RDI,RBX
CALL 0x001415b1
TEST EAX,EAX
JNZ 0x00136377
ADD RBP,0x10
CMP RBP,0x10
JZ 0x001363e6
XOR EAX,EAX
LAB_0013640c:
MOV RCX,qword ptr [R13 + RAX*0x1 + 0x10]
MOV RDX,qword ptr [R13 + RAX*0x1 + 0x18]
MOV qword ptr [RSP],RCX
CMP EDX,-0x9
JC 0x00136425
MOV RSI,qword ptr [RSP]
INC dword ptr [RSI]
LAB_00136425:
MOV qword ptr [R12 + RAX*0x1],RCX
MOV qword ptr [R12 + RAX*0x1 + 0x8],RDX
ADD RAX,0x10
CMP RAX,0x10
JZ 0x0013640c
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x0011d8c6
MOV RAX,-0x100000000
MOV RCX,R15
JMP 0x00136326
|
int1 [16]
js_new_promise_capability(long param_1,long param_2,int8 param_3,int8 param_4)
{
int *piVar1;
int iVar2;
ulong uVar3;
long lVar4;
long lVar5;
int8 uVar6;
ulong uVar7;
int1 auVar8 [16];
int1 local_58 [16];
int4 local_48;
int8 local_40;
local_58._0_8_ = local_58._0_8_ & 0xffffffff00000000;
local_58._8_8_ = 3;
local_48 = 0;
local_40 = 3;
local_58 = JS_NewCFunctionData(param_1,js_promise_executor,2,0,2,local_58);
if (local_58._8_4_ == 6) {
uVar3 = 0xffffffff00000000;
uVar7 = local_58._0_8_;
}
else {
if ((int)param_4 == 3) {
auVar8 = js_promise_constructor(param_1,param_3,param_4);
}
else {
auVar8 = JS_CallConstructorInternal(param_1,param_3,param_4,param_3,param_4,1,local_58,2);
}
uVar3 = auVar8._0_8_;
if (auVar8._8_4_ == 6) {
LAB_00136377:
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_58._0_8_,local_58._8_8_);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar3,auVar8._8_8_);
uVar6 = 6;
uVar7 = 0;
uVar3 = 0;
goto LAB_001363a4;
}
if ((local_58._8_4_ == -1) && (*(short *)(local_58._0_8_ + 6) == 0xf)) {
lVar5 = *(long *)(local_58._0_8_ + 0x30);
}
else {
lVar5 = 0;
}
lVar4 = 0;
do {
iVar2 = check_function(param_1,*(int8 *)(lVar5 + 0x10 + lVar4),
*(int8 *)(lVar5 + 0x18 + lVar4));
if (iVar2 != 0) goto LAB_00136377;
lVar4 = lVar4 + 0x10;
} while (lVar4 == 0x10);
lVar4 = 0;
do {
piVar1 = *(int **)(lVar5 + 0x10 + lVar4);
uVar6 = *(int8 *)(lVar5 + 0x18 + lVar4);
if (0xfffffff6 < (uint)uVar6) {
*piVar1 = *piVar1 + 1;
}
*(int **)(param_2 + lVar4) = piVar1;
*(int8 *)(param_2 + 8 + lVar4) = uVar6;
lVar4 = lVar4 + 0x10;
} while (lVar4 == 0x10);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_58._0_8_,local_58._8_8_);
local_58._8_8_ = auVar8._8_8_;
local_58._0_8_ = 0xffffffff00000000;
uVar7 = uVar3;
}
uVar6 = local_58._8_8_;
uVar3 = uVar3 & local_58._0_8_;
LAB_001363a4:
auVar8._0_8_ = uVar7 & 0xffffffff | uVar3;
auVar8._8_8_ = uVar6;
return auVar8;
}
| |
33,576 | js_new_promise_capability | bluesky950520[P]quickjs/quickjs.c | static JSValue js_new_promise_capability(JSContext *ctx,
JSValue *resolving_funcs,
JSValue ctor)
{
JSValue executor, result_promise;
JSCFunctionDataRecord *s;
int i;
executor = js_promise_executor_new(ctx);
if (JS_IsException(executor))
return executor;
if (JS_IsUndefined(ctor)) {
result_promise = js_promise_constructor(ctx, ctor, 1,
&executor);
} else {
result_promise = JS_CallConstructor(ctx, ctor, 1,
&executor);
}
if (JS_IsException(result_promise))
goto fail;
s = JS_GetOpaque(executor, JS_CLASS_C_FUNCTION_DATA);
for(i = 0; i < 2; i++) {
if (check_function(ctx, s->data[i]))
goto fail;
}
for(i = 0; i < 2; i++)
resolving_funcs[i] = js_dup(s->data[i]);
JS_FreeValue(ctx, executor);
return result_promise;
fail:
JS_FreeValue(ctx, executor);
JS_FreeValue(ctx, result_promise);
return JS_EXCEPTION;
} | O2 | c | js_new_promise_capability:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r15
movq %rdx, 0x8(%rsp)
leaq 0x10(%rsp), %r12
andl $0x0, (%r12)
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x3
popq %rax
movq %rax, 0x8(%r12)
andl $0x0, 0x10(%r12)
movq %rax, 0x18(%r12)
leaq 0x171b0(%rip), %rsi # 0x46b60
pushq $0x2
popq %rdx
xorl %ecx, %ecx
movl %edx, %r8d
movq %r12, %r9
callq 0x1b3ba
movq %rax, %r13
movq %rdx, %rbp
movq %rax, (%r12)
movq %rdx, 0x8(%r12)
cmpl $0x6, %ebp
jne 0x2f9e9
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r13, %rcx
andq %rax, %rcx
jmp 0x2faf6
cmpl $0x3, %r15d
jne 0x2fa0c
leaq 0x10(%rsp), %r8
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movq %r15, %rdx
callq 0x2ff48
movq %rax, %r15
movq %rdx, %r12
jmp 0x2fa35
pushq $0x1
popq %rcx
leaq 0x10(%rsp), %rbp
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movq %r15, %rdx
movq %rbp, %r8
callq 0x283f2
movq %rax, %r15
movq %rdx, %r12
movq (%rbp), %r13
movq 0x8(%rbp), %rbp
cmpl $0x6, %r12d
je 0x2fa80
cmpl $-0x1, %ebp
jne 0x2fa4e
cmpw $0xf, 0x6(%r13)
jne 0x2fa4e
movq 0x30(%r13), %r13
jmp 0x2fa51
xorl %r13d, %r13d
xorl %ecx, %ecx
leaq 0x10(%rcx), %rbp
cmpq $0x30, %rbp
je 0x2faa6
movq 0x10(%r13,%rcx), %rsi
movq 0x18(%r13,%rcx), %rdx
movq %rbx, %rdi
callq 0x3949a
movq %rbp, %rcx
testl %eax, %eax
je 0x2fa53
movq 0x10(%rsp), %r13
movq 0x18(%rsp), %rbp
movq %rbx, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x1801e
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1801e
pushq $0x6
popq %rbp
xorl %r13d, %r13d
xorl %ecx, %ecx
jmp 0x2faf6
xorl %eax, %eax
cmpq $0x20, %rax
je 0x2face
movq 0x10(%r13,%rax), %rcx
movq 0x18(%r13,%rax), %rdx
cmpl $-0x9, %edx
jb 0x2fabf
incl (%rcx)
movq %rcx, (%r14,%rax)
movq %rdx, 0x8(%r14,%rax)
addq $0x10, %rax
jmp 0x2faa8
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %rbx, %rdi
callq 0x1801e
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r15, %rcx
andq %rax, %rcx
movq %r12, %rbp
movq %r15, %r13
movl %r13d, %eax
orq %rcx, %rax
movq %rbp, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_new_promise_capability:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r15, rcx
mov [rsp+68h+var_60], rdx
lea r12, [rsp+68h+var_58]
and dword ptr [r12], 0
mov r14, rsi
mov rbx, rdi
push 3
pop rax
mov [r12+8], rax
and dword ptr [r12+10h], 0
mov [r12+18h], rax
lea rsi, js_promise_executor
push 2
pop rdx
xor ecx, ecx
mov r8d, edx
mov r9, r12
call JS_NewCFunctionData
mov r13, rax
mov rbp, rdx
mov [r12], rax
mov [r12+8], rdx
cmp ebp, 6
jnz short loc_2F9E9
mov rax, 0FFFFFFFF00000000h
mov rcx, r13
and rcx, rax
jmp loc_2FAF6
loc_2F9E9:
cmp r15d, 3
jnz short loc_2FA0C
lea r8, [rsp+68h+var_58]
mov rdi, rbx
mov rsi, [rsp+68h+var_60]
mov rdx, r15
call js_promise_constructor
mov r15, rax
mov r12, rdx
jmp short loc_2FA35
loc_2FA0C:
push 1
pop rcx
lea rbp, [rsp+68h+var_58]
mov rdi, rbx
mov rsi, [rsp+68h+var_60]
mov rdx, r15
mov r8, rbp
call JS_CallConstructor
mov r15, rax
mov r12, rdx
mov r13, [rbp+0]
mov rbp, [rbp+8]
loc_2FA35:
cmp r12d, 6
jz short loc_2FA80
cmp ebp, 0FFFFFFFFh
jnz short loc_2FA4E
cmp word ptr [r13+6], 0Fh
jnz short loc_2FA4E
mov r13, [r13+30h]
jmp short loc_2FA51
loc_2FA4E:
xor r13d, r13d
loc_2FA51:
xor ecx, ecx
loc_2FA53:
lea rbp, [rcx+10h]
cmp rbp, 30h ; '0'
jz short loc_2FAA6
mov rsi, [r13+rcx+10h]
mov rdx, [r13+rcx+18h]
mov rdi, rbx
call check_function
mov rcx, rbp
test eax, eax
jz short loc_2FA53
mov r13, [rsp+68h+var_58]
mov rbp, [rsp+68h+var_50]
loc_2FA80:
mov rdi, rbx
mov rsi, r13
mov rdx, rbp
call JS_FreeValue
mov rdi, rbx
mov rsi, r15
mov rdx, r12
call JS_FreeValue
push 6
pop rbp
xor r13d, r13d
xor ecx, ecx
jmp short loc_2FAF6
loc_2FAA6:
xor eax, eax
loc_2FAA8:
cmp rax, 20h ; ' '
jz short loc_2FACE
mov rcx, [r13+rax+10h]
mov rdx, [r13+rax+18h]
cmp edx, 0FFFFFFF7h
jb short loc_2FABF
inc dword ptr [rcx]
loc_2FABF:
mov [r14+rax], rcx
mov [r14+rax+8], rdx
add rax, 10h
jmp short loc_2FAA8
loc_2FACE:
mov rsi, [rsp+68h+var_58]
mov rdx, [rsp+68h+var_50]
mov rdi, rbx
call JS_FreeValue
mov rax, 0FFFFFFFF00000000h
mov rcx, r15
and rcx, rax
mov rbp, r12
mov r13, r15
loc_2FAF6:
mov eax, r13d
or rax, rcx
mov rdx, rbp
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| unsigned long long js_new_promise_capability(
long long a1,
long long a2,
unsigned long long a3,
unsigned long long a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
long long v13; // rcx
unsigned long long v14; // r13
double v15; // xmm4_8
double v16; // xmm5_8
long long v17; // rdx
long long v18; // rbp
unsigned long long v19; // rcx
unsigned long long v20; // r15
long long v21; // rdx
long long v22; // r12
long long v23; // rdx
long long v24; // r13
long long v25; // rcx
long long v26; // rbp
int v27; // eax
long long i; // rax
_DWORD *v29; // rcx
long long v30; // rdx
unsigned long long v33; // [rsp+10h] [rbp-58h] BYREF
long long v34; // [rsp+18h] [rbp-50h]
int v35; // [rsp+20h] [rbp-48h]
long long v36; // [rsp+28h] [rbp-40h]
LODWORD(v33) = 0;
v34 = 3LL;
v35 = 0;
v36 = 3LL;
v14 = JS_NewCFunctionData(a1, (long long)js_promise_executor, 2u, 0, 2u, (long long)&v33);
v18 = v17;
v33 = v14;
v34 = v17;
if ( (_DWORD)v17 == 6 )
{
v19 = v14 & 0xFFFFFFFF00000000LL;
}
else
{
if ( (_DWORD)a4 == 3 )
{
v20 = js_promise_constructor(a1, a3, a4, v13, &v33);
v22 = v21;
}
else
{
v20 = JS_CallConstructor(a1, a3, a4, 1u, (long long)&v33, a5, a6, a7, a8, v15, v16, a11, a12);
v22 = v23;
v14 = v33;
v18 = v34;
}
if ( (_DWORD)v22 == 6 )
{
LABEL_15:
JS_FreeValue(a1, v14, v18);
JS_FreeValue(a1, v20, v22);
LODWORD(v14) = 0;
v19 = 0LL;
}
else
{
if ( (_DWORD)v18 == -1 && *(_WORD *)(v14 + 6) == 15 )
v24 = *(_QWORD *)(v14 + 48);
else
v24 = 0LL;
v25 = 0LL;
while ( 1 )
{
v26 = v25 + 16;
if ( v25 == 32 )
break;
v27 = check_function(a1, *(_QWORD *)(v24 + v25 + 16), *(_QWORD *)(v24 + v25 + 24));
v25 = v26;
if ( v27 )
{
v14 = v33;
v18 = v34;
goto LABEL_15;
}
}
for ( i = 0LL; i != 32; i += 16LL )
{
v29 = *(_DWORD **)(v24 + i + 16);
v30 = *(_QWORD *)(v24 + i + 24);
if ( (unsigned int)v30 >= 0xFFFFFFF7 )
++*v29;
*(_QWORD *)(a2 + i) = v29;
*(_QWORD *)(a2 + i + 8) = v30;
}
JS_FreeValue(a1, v33, v34);
v19 = v20 & 0xFFFFFFFF00000000LL;
LODWORD(v14) = v20;
}
}
return v19 | (unsigned int)v14;
}
| js_new_promise_capability:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R15,RCX
MOV qword ptr [RSP + 0x8],RDX
LEA R12,[RSP + 0x10]
AND dword ptr [R12],0x0
MOV R14,RSI
MOV RBX,RDI
PUSH 0x3
POP RAX
MOV qword ptr [R12 + 0x8],RAX
AND dword ptr [R12 + 0x10],0x0
MOV qword ptr [R12 + 0x18],RAX
LEA RSI,[0x146b60]
PUSH 0x2
POP RDX
XOR ECX,ECX
MOV R8D,EDX
MOV R9,R12
CALL 0x0011b3ba
MOV R13,RAX
MOV RBP,RDX
MOV qword ptr [R12],RAX
MOV qword ptr [R12 + 0x8],RDX
CMP EBP,0x6
JNZ 0x0012f9e9
MOV RAX,-0x100000000
MOV RCX,R13
AND RCX,RAX
JMP 0x0012faf6
LAB_0012f9e9:
CMP R15D,0x3
JNZ 0x0012fa0c
LEA R8,[RSP + 0x10]
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,R15
CALL 0x0012ff48
MOV R15,RAX
MOV R12,RDX
JMP 0x0012fa35
LAB_0012fa0c:
PUSH 0x1
POP RCX
LEA RBP,[RSP + 0x10]
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,R15
MOV R8,RBP
CALL 0x001283f2
MOV R15,RAX
MOV R12,RDX
MOV R13,qword ptr [RBP]
MOV RBP,qword ptr [RBP + 0x8]
LAB_0012fa35:
CMP R12D,0x6
JZ 0x0012fa80
CMP EBP,-0x1
JNZ 0x0012fa4e
CMP word ptr [R13 + 0x6],0xf
JNZ 0x0012fa4e
MOV R13,qword ptr [R13 + 0x30]
JMP 0x0012fa51
LAB_0012fa4e:
XOR R13D,R13D
LAB_0012fa51:
XOR ECX,ECX
LAB_0012fa53:
LEA RBP,[RCX + 0x10]
CMP RBP,0x30
JZ 0x0012faa6
MOV RSI,qword ptr [R13 + RCX*0x1 + 0x10]
MOV RDX,qword ptr [R13 + RCX*0x1 + 0x18]
MOV RDI,RBX
CALL 0x0013949a
MOV RCX,RBP
TEST EAX,EAX
JZ 0x0012fa53
MOV R13,qword ptr [RSP + 0x10]
MOV RBP,qword ptr [RSP + 0x18]
LAB_0012fa80:
MOV RDI,RBX
MOV RSI,R13
MOV RDX,RBP
CALL 0x0011801e
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R12
CALL 0x0011801e
PUSH 0x6
POP RBP
XOR R13D,R13D
XOR ECX,ECX
JMP 0x0012faf6
LAB_0012faa6:
XOR EAX,EAX
LAB_0012faa8:
CMP RAX,0x20
JZ 0x0012face
MOV RCX,qword ptr [R13 + RAX*0x1 + 0x10]
MOV RDX,qword ptr [R13 + RAX*0x1 + 0x18]
CMP EDX,-0x9
JC 0x0012fabf
INC dword ptr [RCX]
LAB_0012fabf:
MOV qword ptr [R14 + RAX*0x1],RCX
MOV qword ptr [R14 + RAX*0x1 + 0x8],RDX
ADD RAX,0x10
JMP 0x0012faa8
LAB_0012face:
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
MOV RDI,RBX
CALL 0x0011801e
MOV RAX,-0x100000000
MOV RCX,R15
AND RCX,RAX
MOV RBP,R12
MOV R13,R15
LAB_0012faf6:
MOV EAX,R13D
OR RAX,RCX
MOV RDX,RBP
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16]
js_new_promise_capability(int8 param_1,long param_2,int8 param_3,int8 param_4)
{
int *piVar1;
int1 auVar2 [16];
int iVar3;
long lVar4;
ulong uVar5;
int8 uVar6;
long lVar7;
int8 uVar8;
int1 auVar9 [16];
int1 auVar10 [16];
int1 local_58 [16];
int4 local_48;
int8 local_40;
local_58._0_8_ = local_58._0_8_ & 0xffffffff00000000;
local_58._8_8_ = 3;
local_48 = 0;
local_40 = 3;
auVar9 = JS_NewCFunctionData(param_1,js_promise_executor,2,0,2,local_58);
if (auVar9._8_4_ == 6) {
uVar5 = auVar9._0_8_ & 0xffffffff00000000;
auVar10 = auVar9;
}
else {
local_58 = auVar9;
if ((int)param_4 == 3) {
auVar10 = js_promise_constructor(param_1,param_3,param_4);
auVar2 = local_58;
}
else {
auVar10 = JS_CallConstructor(param_1,param_3,param_4,1,local_58);
auVar9 = local_58;
auVar2 = local_58;
}
local_58 = auVar9;
if (auVar10._8_4_ != 6) {
if ((auVar9._8_4_ == -1) && (*(short *)(auVar9._0_8_ + 6) == 0xf)) {
lVar7 = *(long *)(auVar9._0_8_ + 0x30);
}
else {
lVar7 = 0;
}
lVar4 = 0;
local_58 = auVar2;
do {
if (lVar4 + 0x10 == 0x30) {
for (lVar4 = 0; lVar4 != 0x20; lVar4 = lVar4 + 0x10) {
piVar1 = *(int **)(lVar7 + 0x10 + lVar4);
uVar6 = *(int8 *)(lVar7 + 0x18 + lVar4);
if (0xfffffff6 < (uint)uVar6) {
*piVar1 = *piVar1 + 1;
}
*(int **)(param_2 + lVar4) = piVar1;
*(int8 *)(param_2 + 8 + lVar4) = uVar6;
}
JS_FreeValue(param_1,local_58._0_8_,local_58._8_8_);
uVar5 = auVar10._0_8_ & 0xffffffff00000000;
goto LAB_0012faf6;
}
iVar3 = check_function(param_1,*(int8 *)(lVar7 + 0x10 + lVar4),
*(int8 *)(lVar7 + 0x18 + lVar4));
lVar4 = lVar4 + 0x10;
auVar2 = local_58;
} while (iVar3 == 0);
}
uVar6 = local_58._8_8_;
uVar8 = local_58._0_8_;
local_58 = auVar2;
JS_FreeValue(param_1,uVar8,uVar6);
JS_FreeValue(param_1,auVar10._0_8_,auVar10._8_8_);
auVar10 = ZEXT816(6) << 0x40;
uVar5 = 0;
}
LAB_0012faf6:
auVar9._0_8_ = auVar10._0_8_ & 0xffffffff | uVar5;
auVar9._8_8_ = auVar10._8_8_;
return auVar9;
}
| |
33,577 | tls_load_ext_alpn | xtate/src/proto/proto-tls.c | size_t tls_load_ext_alpn(unsigned char *px, const char **proto_list,
unsigned proto_count) {
if (proto_count == 0)
return 0;
U16_TO_BE(px, TLSEXT_TYPE_application_layer_protocol_negotiation);
unsigned char *proto_start = px + 6;
size_t tmp_len;
for (unsigned i = 0; i < proto_count; i++) {
tmp_len = tls_load_ext_alpn_proto(proto_start, proto_list[i]);
proto_start += tmp_len;
}
uint16_t alpn_len = proto_start - (px + 6);
uint16_t ext_len = alpn_len + 2;
U16_TO_BE(px + 2, ext_len);
U16_TO_BE(px + 4, alpn_len);
return ((size_t)ext_len) + 4;
} | O3 | c | tls_load_ext_alpn:
testl %edx, %edx
je 0x35a4e
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movw $0x1000, (%rdi) # imm = 0x1000
leaq 0x6(%rdi), %r12
movl %edx, %r13d
xorl %ebp, %ebp
movq %r12, %rax
movq %rax, %r15
movq (%r14,%rbp,8), %rsi
movq %rax, %rdi
callq 0x359a5
addq %r15, %rax
incq %rbp
cmpq %rbp, %r13
jne 0x35a0c
subq %r12, %rax
leal 0x2(%rax), %ecx
movb %ch, 0x2(%rbx)
movb %cl, 0x3(%rbx)
movb %ah, 0x4(%rbx)
movb %al, 0x5(%rbx)
movzwl %cx, %eax
addq $0x4, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq
nopl (%rax)
| tls_load_ext_alpn:
test edx, edx
jz short loc_35A4E
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov word ptr [rdi], 1000h
lea r12, [rdi+6]
mov r13d, edx
xor ebp, ebp
mov rax, r12
loc_35A0C:
mov r15, rax
mov rsi, [r14+rbp*8]
mov rdi, rax
call tls_load_ext_alpn_proto
add rax, r15
inc rbp
cmp r13, rbp
jnz short loc_35A0C
sub rax, r12
lea ecx, [rax+2]
mov [rbx+2], ch
mov [rbx+3], cl
mov [rbx+4], ah
mov [rbx+5], al
movzx eax, cx
add rax, 4
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_35A4E:
xor eax, eax
retn
| long long tls_load_ext_alpn(long long a1, long long a2, unsigned int a3)
{
long long v3; // r13
long long v4; // rbp
_BYTE *v5; // rax
__int16 v6; // ax
if ( !a3 )
return 0LL;
*(_WORD *)a1 = 4096;
v3 = a3;
v4 = 0LL;
v5 = (_BYTE *)(a1 + 6);
do
v5 += tls_load_ext_alpn_proto(v5, *(_QWORD *)(a2 + 8 * v4++));
while ( v3 != v4 );
v6 = (_WORD)v5 - (a1 + 6);
*(_BYTE *)(a1 + 2) = (unsigned __int16)(v6 + 2) >> 8;
*(_BYTE *)(a1 + 3) = v6 + 2;
*(_BYTE *)(a1 + 4) = HIBYTE(v6);
*(_BYTE *)(a1 + 5) = v6;
return (unsigned __int16)(v6 + 2) + 4LL;
}
| tls_load_ext_alpn:
TEST EDX,EDX
JZ 0x00135a4e
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV word ptr [RDI],0x1000
LEA R12,[RDI + 0x6]
MOV R13D,EDX
XOR EBP,EBP
MOV RAX,R12
LAB_00135a0c:
MOV R15,RAX
MOV RSI,qword ptr [R14 + RBP*0x8]
MOV RDI,RAX
CALL 0x001359a5
ADD RAX,R15
INC RBP
CMP R13,RBP
JNZ 0x00135a0c
SUB RAX,R12
LEA ECX,[RAX + 0x2]
MOV byte ptr [RBX + 0x2],CH
MOV byte ptr [RBX + 0x3],CL
MOV byte ptr [RBX + 0x4],AH
MOV byte ptr [RBX + 0x5],AL
MOVZX EAX,CX
ADD RAX,0x4
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00135a4e:
XOR EAX,EAX
RET
|
int tls_load_ext_alpn(int2 *param_1,long param_2,uint param_3)
{
long lVar1;
int2 *puVar2;
uint uVar3;
ulong uVar4;
if (param_3 != 0) {
*param_1 = 0x1000;
uVar4 = 0;
puVar2 = param_1 + 3;
do {
lVar1 = tls_load_ext_alpn_proto(puVar2,*(int8 *)(param_2 + uVar4 * 8));
puVar2 = (int2 *)(lVar1 + (long)puVar2);
uVar4 = uVar4 + 1;
} while (param_3 != uVar4);
lVar1 = (long)puVar2 - (long)(param_1 + 3);
uVar3 = (int)lVar1 + 2;
*(char *)(param_1 + 1) = (char)(uVar3 >> 8);
*(char *)((long)param_1 + 3) = (char)uVar3;
*(char *)(param_1 + 2) = (char)((ulong)lVar1 >> 8);
*(char *)((long)param_1 + 5) = (char)lVar1;
return (uVar3 & 0xffff) + 4;
}
return 0;
}
| |
33,578 | _gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>> nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::find<char const (&) [11], 0>(char const (&) [11]) | monkey531[P]llama/common/json.hpp | iterator find(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-forward)
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
return it;
}
}
return Container::end();
} | O2 | cpp | _gnu_cxx::__normal_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>*, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>> nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::find<char const (&) [11], 0>(char const (&) [11]):
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
movq (%rdi), %r14
movq 0x8(%r15), %rax
cmpq %rax, %r14
je 0x8cd4d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x26888
testb %al, %al
jne 0x8cd4a
addq $0x30, %r14
jmp 0x8cd2c
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA21_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_:
push r15
push r14
push rbx
mov rbx, rsi
mov r15, rdi
mov r14, [rdi]
loc_8CD2C:
mov rax, [r15+8]
cmp r14, rax
jz short loc_8CD4D
mov rdi, r14
mov rsi, rbx
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jnz short loc_8CD4A
add r14, 30h ; '0'
jmp short loc_8CD2C
loc_8CD4A:
mov rax, r14
loc_8CD4D:
pop rbx
pop r14
pop r15
retn
| long long ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA21_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_(
long long *a1)
{
long long i; // r14
long long result; // rax
for ( i = *a1; ; i += 48LL )
{
result = a1[1];
if ( i == result )
break;
if ( std::operator==<char>(i) )
return i;
}
return result;
}
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA21_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R15,RDI
MOV R14,qword ptr [RDI]
LAB_0018cd2c:
MOV RAX,qword ptr [R15 + 0x8]
CMP R14,RAX
JZ 0x0018cd4d
MOV RDI,R14
MOV RSI,RBX
CALL 0x00126888
TEST AL,AL
JNZ 0x0018cd4a
ADD R14,0x30
JMP 0x0018cd2c
LAB_0018cd4a:
MOV RAX,R14
LAB_0018cd4d:
POP RBX
POP R14
POP R15
RET
|
string * _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA21_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_
(int8 *param_1,char *param_2)
{
bool bVar1;
string *psVar2;
string *psVar3;
psVar3 = (string *)*param_1;
while ((psVar2 = (string *)param_1[1], psVar3 != (string *)param_1[1] &&
(bVar1 = std::operator==(psVar3,param_2), psVar2 = psVar3, !bVar1))) {
psVar3 = psVar3 + 0x30;
}
return psVar2;
}
| |
33,579 | nglog::RawLog(nglog::LogSeverity, char const*, int, char const*, ...) | ng-log[P]ng-log/src/raw_logging.cc | void RawLog(LogSeverity severity, const char* file, int line,
const char* format, ...) {
if (!(FLAGS_logtostdout || FLAGS_logtostderr ||
severity >= FLAGS_stderrthreshold || FLAGS_alsologtostderr ||
!IsLoggingInitialized())) {
return; // this stderr log message is suppressed
}
// We do not have any any option other that string streams to obtain the
// thread identifier as the corresponding value is not convertible to an
// integer. Use a statically allocated buffer to avoid dynamic memory
// allocations.
StaticStringBuf<kLogBufSize> sbuf;
std::ostream oss(&sbuf);
oss << std::setw(5) << std::this_thread::get_id();
// can't call localtime_r here: it can allocate
char buffer[kLogBufSize];
char* buf = buffer;
size_t size = sizeof(buffer);
// NOTE: this format should match the specification in base/logging.h
DoRawLog(&buf, &size, "%c00000000 00:00:00.000000 %s %s:%d] RAW: ",
GetLogSeverityName(severity)[0], sbuf.data(),
const_basename(const_cast<char*>(file)), line);
// Record the position and size of the buffer after the prefix
const char* msg_start = buf;
const size_t msg_size = size;
va_list ap;
va_start(ap, format);
bool no_chop = VADoRawLog(&buf, &size, format, ap);
va_end(ap);
if (no_chop) {
DoRawLog(&buf, &size, "\n");
} else {
DoRawLog(&buf, &size, "RAW_LOG ERROR: The Message was too long!\n");
}
// We make a raw syscall to write directly to the stderr file descriptor,
// avoiding FILE buffering (to avoid invoking malloc()), and bypassing
// libc (to side-step any libc interception).
// We write just once to avoid races with other invocations of RawLog.
safe_write(fileno(stderr), buffer, strlen(buffer));
if (severity == NGLOG_FATAL) {
std::call_once(crashed, [file, line, msg_start, msg_size] {
crash_reason.filename = file;
crash_reason.line_number = line;
memcpy(crash_buf, msg_start, msg_size); // Don't include prefix
crash_reason.message = crash_buf;
#ifdef HAVE_STACKTRACE
crash_reason.depth =
GetStackTrace(crash_reason.stack, ARRAYSIZE(crash_reason.stack), 1);
#else
crash_reason.depth = 0;
#endif
SetCrashReason(&crash_reason);
});
LogMessage::Fail(); // abort()
}
} | O1 | cpp | nglog::RawLog(nglog::LogSeverity, char const*, int, char const*, ...):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x19e8, %rsp # imm = 0x19E8
movq %rcx, %r15
movl %edx, %r12d
movq %rsi, 0x28(%rsp)
movl %edi, 0xc(%rsp)
testb %al, %al
je 0x20288
movaps %xmm0, 0x1b0(%rsp)
movaps %xmm1, 0x1c0(%rsp)
movaps %xmm2, 0x1d0(%rsp)
movaps %xmm3, 0x1e0(%rsp)
movaps %xmm4, 0x1f0(%rsp)
movaps %xmm5, 0x200(%rsp)
movaps %xmm6, 0x210(%rsp)
movaps %xmm7, 0x220(%rsp)
movq %r8, 0x1a0(%rsp)
movq %r9, 0x1a8(%rsp)
leaq 0x1176b(%rip), %rax # 0x31a0a
cmpb $0x0, (%rax)
je 0x2034c
movq 0x10c99(%rip), %rbx # 0x30f48
addq $0x10, %rbx
leaq 0x270(%rsp), %r14
movq %rbx, -0x38(%r14)
xorps %xmm0, %xmm0
movups %xmm0, -0x30(%r14)
movups %xmm0, -0x20(%r14)
movups %xmm0, -0x10(%r14)
movq %r14, %rdi
callq 0x7a60
leaq 0x10930(%rip), %rax # 0x30c10
movq %rax, -0x38(%r14)
leaq 0x278(%rsp), %r13
leaq 0xe30(%rsp), %rax
movq %r13, -0x18(%r13)
movq %r13, -0x20(%r13)
movq %rax, -0x10(%r13)
movq %r13, -0x38(%r13)
movq %r13, -0x30(%r13)
movq %rax, -0x28(%r13)
leaq 0x70(%rsp), %rdi
leaq 0x238(%rsp), %rsi
callq 0x71d0
movq 0x70(%rsp), %rax
movq -0x18(%rax), %rax
movq $0x5, 0x80(%rsp,%rax)
callq 0x7470
testq %rax, %rax
je 0x20391
leaq 0x70(%rsp), %rdi
movq %rax, %rsi
callq 0x7360
jmp 0x203a7
leaq 0x116af(%rip), %rax # 0x31a02
cmpb $0x0, (%rax)
jne 0x202a8
leaq 0x116ad(%rip), %rax # 0x31a10
movl 0xc(%rsp), %ecx
cmpl %ecx, (%rax)
jle 0x202a8
leaq 0x1168e(%rip), %rax # 0x31a04
cmpb $0x0, (%rax)
jne 0x202a8
callq 0x220ec
testb %al, %al
je 0x202a8
jmp 0x20511
leaq 0x44d0(%rip), %rsi # 0x24868
leaq 0x70(%rsp), %rdi
movl $0x24, %edx
callq 0x7610
leaq 0xe30(%rsp), %rax
movq %rax, 0x18(%rsp)
movq $0xbb8, 0x10(%rsp) # imm = 0xBB8
movl 0xc(%rsp), %edi
callq 0xa4b4
movsbl (%rax), %ebp
movq 0x260(%rsp), %rax
cmpq 0x258(%rsp), %rax
je 0x20402
movq 0x268(%rsp), %rcx
cmpq %rcx, %rax
je 0x20402
cmpb $0x0, -0x1(%rax)
je 0x20402
cmpq %rcx, %rax
jae 0x20523
movb $0x0, (%rax)
incq 0x260(%rsp)
movq 0x28(%rsp), %rdi
callq 0x220f9
movl %r12d, 0x24(%rsp)
movl %r12d, (%rsp)
leaq 0x4a41(%rip), %rdx # 0x24e5d
leaq 0x18(%rsp), %r14
leaq 0x10(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
movl %ebp, %ecx
movq %r13, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0x2059b
movq (%r14), %r13
movq (%r12), %rbp
leaq 0x180(%rsp), %rax
leaq 0x30(%rsp), %rcx
movq %rax, 0x10(%rcx)
leaq 0x1a20(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000020, %rax # imm = 0x3000000020
movq %rax, (%rcx)
movq %r13, %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x7300
leaq 0x4a07(%rip), %rdx # 0x24e88
testl %eax, %eax
js 0x204a3
movl %eax, %eax
movq %rbp, %rcx
subq %rax, %rcx
jb 0x204a3
movq %rcx, 0x10(%rsp)
addq %r13, %rax
movq %rax, 0x18(%rsp)
leaq 0x395c(%rip), %rdx # 0x23dff
leaq 0x18(%rsp), %rdi
leaq 0x10(%rsp), %rsi
xorl %eax, %eax
callq 0x2059b
movq 0x10add(%rip), %rax # 0x30f98
movq (%rax), %rdi
callq 0x7590
movl %eax, %r14d
leaq 0xe30(%rsp), %r12
movq %r12, %rdi
callq 0x7200
movl $0x1, %edi
movl %r14d, %esi
movq %r12, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x7090
cmpl $0x3, 0xc(%rsp)
je 0x20538
leaq 0x78(%rsp), %rdi
callq 0x7180
movq %rbx, 0x238(%rsp)
leaq 0x270(%rsp), %rdi
callq 0x77b0
addq $0x19e8, %rsp # imm = 0x19E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x238(%rsp), %rdi
movq (%rdi), %rax
xorl %esi, %esi
callq *0x68(%rax)
jmp 0x20402
leaq 0x50(%rsp), %rdi
movq 0x28(%rsp), %rax
movq %rax, (%rdi)
movl 0x24(%rsp), %eax
movl %eax, 0x8(%rdi)
movq %r13, 0x10(%rdi)
movq %rbp, 0x18(%rdi)
callq 0x20641
callq 0xbb62
movq %rax, %rdi
callq 0x9fcd
jmp 0x20571
jmp 0x20571
jmp 0x20571
movq %rax, %r14
jmp 0x2057e
movq %rax, %r14
leaq 0x78(%rsp), %rdi
callq 0x7180
movq %rbx, 0x238(%rsp)
leaq 0x270(%rsp), %rdi
callq 0x77b0
movq %r14, %rdi
callq 0x7990
| _ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 19E8h
mov r15, rcx
mov r12d, edx
mov [rsp+1A18h+var_19F0], rsi
mov [rsp+1A18h+var_1A0C], edi
test al, al
jz short loc_20288
movaps [rsp+1A18h+var_1868], xmm0
movaps [rsp+1A18h+var_1858], xmm1
movaps [rsp+1A18h+var_1848], xmm2
movaps [rsp+1A18h+var_1838], xmm3
movaps [rsp+1A18h+var_1828], xmm4
movaps [rsp+1A18h+var_1818], xmm5
movaps [rsp+1A18h+var_1808], xmm6
movaps [rsp+1A18h+var_17F8], xmm7
loc_20288:
mov [rsp+1A18h+var_1878], r8
mov [rsp+1A18h+var_1870], r9
lea rax, _ZN3fLB17FLAGS_logtostdoutE; fLB::FLAGS_logtostdout
cmp byte ptr [rax], 0
jz loc_2034C
loc_202A8:
mov rbx, cs:_ZTVSt15basic_streambufIcSt11char_traitsIcEE_ptr
add rbx, 10h
lea r14, [rsp+1A18h+var_17A8]
mov [r14-38h], rbx
xorps xmm0, xmm0
movups xmmword ptr [r14-30h], xmm0
movups xmmword ptr [r14-20h], xmm0
movups xmmword ptr [r14-10h], xmm0
mov rdi, r14; this
call __ZNSt6localeC1Ev; std::locale::locale(void)
lea rax, off_30C10
mov [r14-38h], rax
lea r13, [rsp+1A18h+var_17A0]
lea rax, [rsp+1A18h+var_BE8]
mov [r13-18h], r13
mov [r13-20h], r13
mov [r13-10h], rax
mov [r13-38h], r13
mov [r13-30h], r13
mov [r13-28h], rax
lea rdi, [rsp+1A18h+var_19A8]
lea rsi, [rsp+1A18h+var_17E0]
call __ZNSoC1EPSt15basic_streambufIcSt11char_traitsIcEE; std::ostream::ostream(std::streambuf *)
mov rax, [rsp+1A18h+var_19A8]
mov rax, [rax-18h]
mov [rsp+rax+1A18h+var_1998], 5
call _pthread_self
test rax, rax
jz short loc_20391
lea rdi, [rsp+1A18h+var_19A8]; this
mov rsi, rax
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
jmp short loc_203A7
loc_2034C:
lea rax, _ZN3fLB17FLAGS_logtostderrE; fLB::FLAGS_logtostderr
cmp byte ptr [rax], 0
jnz loc_202A8
lea rax, _ZN3fLI21FLAGS_stderrthresholdE; fLI::FLAGS_stderrthreshold
mov ecx, [rsp+1A18h+var_1A0C]
cmp [rax], ecx
jle loc_202A8
lea rax, _ZN3fLB21FLAGS_alsologtostderrE; fLB::FLAGS_alsologtostderr
cmp byte ptr [rax], 0
jnz loc_202A8
call _ZN5nglog20IsLoggingInitializedEv; nglog::IsLoggingInitialized(void)
test al, al
jz loc_202A8
jmp loc_20511
loc_20391:
lea rsi, aThreadIdOfANon; "thread::id of a non-executing thread"
lea rdi, [rsp+1A18h+var_19A8]
mov edx, 24h ; '$'
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_203A7:
lea rax, [rsp+1A18h+var_BE8]
mov [rsp+1A18h+var_1A00], rax
mov [rsp+1A18h+var_1A08], 0BB8h
mov edi, [rsp+1A18h+var_1A0C]
call _ZN5nglog18GetLogSeverityNameENS_11LogSeverityE; nglog::GetLogSeverityName(nglog::LogSeverity)
movsx ebp, byte ptr [rax]
mov rax, [rsp+1A18h+var_17B8]
cmp rax, [rsp+1A18h+var_17C0]
jz short loc_20402
mov rcx, [rsp+1A18h+var_17B0]
cmp rax, rcx
jz short loc_20402
cmp byte ptr [rax-1], 0
jz short loc_20402
cmp rax, rcx
jnb loc_20523
mov byte ptr [rax], 0
inc [rsp+1A18h+var_17B8]
loc_20402:
mov rdi, [rsp+1A18h+var_19F0]; this
call _ZN5nglog5tools14const_basenameEPKc; nglog::tools::const_basename(char const*)
mov [rsp+1A18h+var_19F4], r12d
mov [rsp+1A18h+var_1A18], r12d
lea rdx, aC0000000000000; "%c00000000 00:00:00.000000 %s %s:%d] RA"...
lea r14, [rsp+1A18h+var_1A00]
lea r12, [rsp+1A18h+var_1A08]
mov rdi, r14; this
mov rsi, r12; char **
mov ecx, ebp; char *
mov r8, r13
mov r9, rax
xor eax, eax
call _ZN5nglogL8DoRawLogEPPcPmPKcz; nglog::DoRawLog(char **,ulong *,char const*,...)
mov r13, [r14]
mov rbp, [r12]
lea rax, [rsp+1A18h+var_1898]
lea rcx, [rsp+1A18h+var_19E8]
mov [rcx+10h], rax
lea rax, [rsp+1A18h+arg_0]
mov [rcx+8], rax
mov rax, 3000000020h
mov [rcx], rax
mov rdi, r13
mov rsi, rbp
mov rdx, r15
call _vsnprintf
lea rdx, aRawLogErrorThe; "RAW_LOG ERROR: The Message was too long"...
test eax, eax
js short loc_204A3
mov eax, eax
mov rcx, rbp
sub rcx, rax; char *
jb short loc_204A3
mov [rsp+1A18h+var_1A08], rcx
add rax, r13
mov [rsp+1A18h+var_1A00], rax
lea rdx, asc_23DFE+1; unsigned __int64 *
loc_204A3:
lea rdi, [rsp+1A18h+var_1A00]; this
lea rsi, [rsp+1A18h+var_1A08]; char **
xor eax, eax
call _ZN5nglogL8DoRawLogEPPcPmPKcz; nglog::DoRawLog(char **,ulong *,char const*,...)
mov rax, cs:stderr_ptr
mov rdi, [rax]
call _fileno
mov r14d, eax
lea r12, [rsp+1A18h+var_BE8]
mov rdi, r12
call _strlen
mov edi, 1
mov esi, r14d
mov rdx, r12
mov rcx, rax
xor eax, eax
call _syscall
cmp [rsp+1A18h+var_1A0C], 3
jz short loc_20538
lea rdi, [rsp+1A18h+var_19A0]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov [rsp+1A18h+var_17E0], rbx
lea rdi, [rsp+1A18h+var_17A8]; this
call __ZNSt6localeD1Ev; std::locale::~locale()
loc_20511:
add rsp, 19E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_20523:
lea rdi, [rsp+1A18h+var_17E0]
mov rax, [rdi]
xor esi, esi
call qword ptr [rax+68h]
jmp loc_20402
loc_20538:
lea rdi, [rsp+1A18h+var_19C8]; this
mov rax, [rsp+1A18h+var_19F0]
mov [rdi], rax
mov eax, [rsp+1A18h+var_19F4]
mov [rdi+8], eax
mov [rdi+10h], r13
mov [rdi+18h], rbp
call _ZSt9call_onceIZN5nglog6RawLogENS0_11LogSeverityEPKciS3_zE3$_0JEEvRSt9once_flagOT_DpOT0_; std::call_once<nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)::$_0>(std::once_flag &,nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)::$_0 &&)
call _ZN5nglog10LogMessage4FailEv; nglog::LogMessage::Fail(void)
mov rdi, rax
call __clang_call_terminate
jmp short loc_20571
jmp short loc_20571
jmp short loc_20571
mov r14, rax
jmp short loc_2057E
loc_20571:
mov r14, rax
lea rdi, [rsp+1A18h+var_19A0]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
loc_2057E:
mov [rsp+1A18h+var_17E0], rbx
lea rdi, [rsp+1A18h+var_17A8]; this
call __ZNSt6localeD1Ev; std::locale::~locale()
mov rdi, r14
call __Unwind_Resume
| void nglog::RawLog(
nglog *a1,
nglog::tools *a2,
int 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)
{
long long v17; // rax
const char *v18; // rsi
unsigned int v19; // ebp
long long v20; // rax
_BYTE *v21; // r13
char *v22; // rbp
unsigned int v23; // eax
const char *v24; // rcx
char *v25; // rdx
unsigned int v26; // r14d
long long v27; // rax
char *v28; // [rsp+10h] [rbp-1A08h] BYREF
_BYTE *v29; // [rsp+18h] [rbp-1A00h] BYREF
int v30; // [rsp+24h] [rbp-19F4h]
nglog::tools *v31; // [rsp+28h] [rbp-19F0h]
_QWORD v32[4]; // [rsp+30h] [rbp-19E8h] BYREF
nglog::tools *v33; // [rsp+50h] [rbp-19C8h] BYREF
int v34; // [rsp+58h] [rbp-19C0h]
_BYTE *v35; // [rsp+60h] [rbp-19B8h]
char *v36; // [rsp+68h] [rbp-19B0h]
long long v37; // [rsp+70h] [rbp-19A8h] BYREF
_BYTE v38[264]; // [rsp+78h] [rbp-19A0h] BYREF
char v39; // [rsp+180h] [rbp-1898h] BYREF
long long v40; // [rsp+1A0h] [rbp-1878h]
long long v41; // [rsp+1A8h] [rbp-1870h]
__m128 v42; // [rsp+1B0h] [rbp-1868h]
__m128 v43; // [rsp+1C0h] [rbp-1858h]
__m128 v44; // [rsp+1D0h] [rbp-1848h]
__m128 v45; // [rsp+1E0h] [rbp-1838h]
__m128 v46; // [rsp+1F0h] [rbp-1828h]
__m128 v47; // [rsp+200h] [rbp-1818h]
__m128 v48; // [rsp+210h] [rbp-1808h]
__m128 v49; // [rsp+220h] [rbp-17F8h]
_QWORD v50[4]; // [rsp+238h] [rbp-17E0h] BYREF
_BYTE *v51; // [rsp+258h] [rbp-17C0h]
_BYTE *v52; // [rsp+260h] [rbp-17B8h]
_BYTE *v53; // [rsp+268h] [rbp-17B0h]
char v54[8]; // [rsp+270h] [rbp-17A8h] BYREF
_BYTE v55[3000]; // [rsp+278h] [rbp-17A0h] BYREF
_BYTE v56[3048]; // [rsp+E30h] [rbp-BE8h] BYREF
v42 = a7;
v43 = a8;
v44 = a9;
v45 = a10;
v46 = a11;
v47 = a12;
v48 = a13;
v49 = a14;
v31 = a2;
v40 = a5;
v41 = a6;
if ( fLB::FLAGS_logtostdout
|| fLB::FLAGS_logtostderr
|| fLI::FLAGS_stderrthreshold <= (int)a1
|| fLB::FLAGS_alsologtostderr
|| !(unsigned __int8)nglog::IsLoggingInitialized(a1) )
{
std::locale::locale((std::locale *)v54);
v50[0] = &off_30C10;
v52 = v55;
v51 = v55;
v53 = v56;
v50[1] = v55;
v50[2] = v55;
v50[3] = v56;
std::ostream::ostream(&v37, v50);
*(_QWORD *)&v38[*(_QWORD *)(v37 - 24) + 8] = 5LL;
v17 = pthread_self();
if ( v17 )
{
v18 = (const char *)v17;
std::ostream::_M_insert<unsigned long>(&v37);
}
else
{
v18 = "thread::id of a non-executing thread";
std::__ostream_insert<char,std::char_traits<char>>(&v37, "thread::id of a non-executing thread", 36LL);
}
v29 = v56;
v28 = (_BYTE *)(&stru_BB0 + 8);
v19 = *nglog::GetLogSeverityName((int)a1);
if ( v52 != v51 && v52 != v53 && *(v52 - 1) )
{
if ( v52 >= v53 )
{
v18 = 0LL;
(*(void ( **)(_QWORD *, _QWORD))(v50[0] + 104LL))(v50, 0LL);
}
else
{
*v52++ = 0;
}
}
v20 = nglog::tools::const_basename(v31, v18);
v30 = a3;
nglog::DoRawLog(
(nglog *)&v29,
&v28,
(unsigned long long *)"%c00000000 00:00:00.000000 %s %s:%d] RAW: ",
(const char *)v19,
v55,
v20,
a3);
v21 = v29;
v22 = v28;
v32[2] = &v39;
v32[1] = &a15;
v32[0] = 0x3000000020LL;
v23 = vsnprintf(v29, v28, a4, v32);
v25 = "RAW_LOG ERROR: The Message was too long!\n";
if ( (v23 & 0x80000000) == 0 )
{
v24 = &v22[-v23];
if ( (unsigned long long)v22 >= v23 )
{
v28 = &v22[-v23];
v29 = &v21[v23];
v25 = "\n";
}
}
nglog::DoRawLog((nglog *)&v29, &v28, (unsigned long long *)v25, v24);
v26 = fileno(stderr);
v27 = strlen(v56);
syscall(1LL, v26, v56, v27);
if ( (_DWORD)a1 == 3 )
{
v33 = v31;
v34 = v30;
v35 = v21;
v36 = v22;
std::call_once<nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)::$_0>();
nglog::LogMessage::Fail((nglog::LogMessage *)&v33);
}
std::ios_base::~ios_base((std::ios_base *)v38);
v50[0] = (char *)&`vtable for'std::streambuf + 16;
std::locale::~locale((std::locale *)v54);
}
}
| RawLog:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x19e8
MOV R15,RCX
MOV R12D,EDX
MOV qword ptr [RSP + 0x28],RSI
MOV dword ptr [RSP + 0xc],EDI
TEST AL,AL
JZ 0x00120288
MOVAPS xmmword ptr [RSP + 0x1b0],XMM0
MOVAPS xmmword ptr [RSP + 0x1c0],XMM1
MOVAPS xmmword ptr [RSP + 0x1d0],XMM2
MOVAPS xmmword ptr [RSP + 0x1e0],XMM3
MOVAPS xmmword ptr [RSP + 0x1f0],XMM4
MOVAPS xmmword ptr [RSP + 0x200],XMM5
MOVAPS xmmword ptr [RSP + 0x210],XMM6
MOVAPS xmmword ptr [RSP + 0x220],XMM7
LAB_00120288:
MOV qword ptr [RSP + 0x1a0],R8
MOV qword ptr [RSP + 0x1a8],R9
LEA RAX,[0x131a0a]
CMP byte ptr [RAX],0x0
JZ 0x0012034c
LAB_001202a8:
MOV RBX,qword ptr [0x00130f48]
ADD RBX,0x10
LEA R14,[RSP + 0x270]
MOV qword ptr [R14 + -0x38],RBX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + -0x30],XMM0
MOVUPS xmmword ptr [R14 + -0x20],XMM0
MOVUPS xmmword ptr [R14 + -0x10],XMM0
MOV RDI,R14
CALL 0x00107a60
LEA RAX,[0x130c10]
MOV qword ptr [R14 + -0x38],RAX
LEA R13,[RSP + 0x278]
LEA RAX,[RSP + 0xe30]
MOV qword ptr [R13 + -0x18],R13
MOV qword ptr [R13 + -0x20],R13
MOV qword ptr [R13 + -0x10],RAX
MOV qword ptr [R13 + -0x38],R13
MOV qword ptr [R13 + -0x30],R13
MOV qword ptr [R13 + -0x28],RAX
LAB_0012030c:
LEA RDI,[RSP + 0x70]
LEA RSI,[RSP + 0x238]
CALL 0x001071d0
MOV RAX,qword ptr [RSP + 0x70]
MOV RAX,qword ptr [RAX + -0x18]
MOV qword ptr [RSP + RAX*0x1 + 0x80],0x5
CALL 0x00107470
TEST RAX,RAX
JZ 0x00120391
LAB_0012033d:
LEA RDI,[RSP + 0x70]
MOV RSI,RAX
CALL 0x00107360
LAB_0012034a:
JMP 0x001203a7
LAB_0012034c:
LEA RAX,[0x131a02]
CMP byte ptr [RAX],0x0
JNZ 0x001202a8
LEA RAX,[0x131a10]
MOV ECX,dword ptr [RSP + 0xc]
CMP dword ptr [RAX],ECX
JLE 0x001202a8
LEA RAX,[0x131a04]
CMP byte ptr [RAX],0x0
JNZ 0x001202a8
CALL 0x001220ec
TEST AL,AL
JZ 0x001202a8
JMP 0x00120511
LAB_00120391:
LEA RSI,[0x124868]
LEA RDI,[RSP + 0x70]
MOV EDX,0x24
CALL 0x00107610
LAB_001203a7:
LEA RAX,[RSP + 0xe30]
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x10],0xbb8
LAB_001203bd:
MOV EDI,dword ptr [RSP + 0xc]
CALL 0x0010a4b4
MOVSX EBP,byte ptr [RAX]
MOV RAX,qword ptr [RSP + 0x260]
CMP RAX,qword ptr [RSP + 0x258]
JZ 0x00120402
MOV RCX,qword ptr [RSP + 0x268]
CMP RAX,RCX
JZ 0x00120402
CMP byte ptr [RAX + -0x1],0x0
JZ 0x00120402
CMP RAX,RCX
JNC 0x00120523
MOV byte ptr [RAX],0x0
INC qword ptr [RSP + 0x260]
LAB_00120402:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x001220f9
MOV dword ptr [RSP + 0x24],R12D
MOV dword ptr [RSP],R12D
LEA RDX,[0x124e5d]
LEA R14,[RSP + 0x18]
LEA R12,[RSP + 0x10]
MOV RDI,R14
MOV RSI,R12
MOV ECX,EBP
MOV R8,R13
MOV R9,RAX
XOR EAX,EAX
CALL 0x0012059b
MOV R13,qword ptr [R14]
MOV RBP,qword ptr [R12]
LEA RAX,[RSP + 0x180]
LEA RCX,[RSP + 0x30]
MOV qword ptr [RCX + 0x10],RAX
LEA RAX,[RSP + 0x1a20]
MOV qword ptr [RCX + 0x8],RAX
MOV RAX,0x3000000020
MOV qword ptr [RCX],RAX
MOV RDI,R13
MOV RSI,RBP
MOV RDX,R15
CALL 0x00107300
LEA RDX,[0x124e88]
TEST EAX,EAX
JS 0x001204a3
MOV EAX,EAX
MOV RCX,RBP
SUB RCX,RAX
JC 0x001204a3
MOV qword ptr [RSP + 0x10],RCX
ADD RAX,R13
MOV qword ptr [RSP + 0x18],RAX
LEA RDX,[0x123dff]
LAB_001204a3:
LEA RDI,[RSP + 0x18]
LEA RSI,[RSP + 0x10]
XOR EAX,EAX
CALL 0x0012059b
MOV RAX,qword ptr [0x00130f98]
MOV RDI,qword ptr [RAX]
CALL 0x00107590
MOV R14D,EAX
LEA R12,[RSP + 0xe30]
MOV RDI,R12
CALL 0x00107200
MOV EDI,0x1
MOV ESI,R14D
MOV RDX,R12
MOV RCX,RAX
XOR EAX,EAX
CALL 0x00107090
CMP dword ptr [RSP + 0xc],0x3
JZ 0x00120538
LEA RDI,[RSP + 0x78]
CALL 0x00107180
MOV qword ptr [RSP + 0x238],RBX
LEA RDI,[RSP + 0x270]
CALL 0x001077b0
LAB_00120511:
ADD RSP,0x19e8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00120523:
LEA RDI,[RSP + 0x238]
MOV RAX,qword ptr [RDI]
LAB_0012052e:
XOR ESI,ESI
CALL qword ptr [RAX + 0x68]
JMP 0x00120402
LAB_00120538:
LEA RDI,[RSP + 0x50]
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RDI],RAX
MOV EAX,dword ptr [RSP + 0x24]
MOV dword ptr [RDI + 0x8],EAX
MOV qword ptr [RDI + 0x10],R13
MOV qword ptr [RDI + 0x18],RBP
LAB_00120554:
CALL 0x00120641
LAB_00120559:
CALL 0x0010bb62
LAB_0012055e:
MOV RDI,RAX
CALL 0x00109fcd
|
/* nglog::RawLog(nglog::LogSeverity, char const*, int, char const*, ...) */
void nglog::RawLog(int4 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int param_9,char *param_10,int4 param_11,char *param_12,int8 param_13,
int8 param_14,...)
{
ulong uVar1;
char in_AL;
char cVar2;
uint uVar3;
pthread_t pVar4;
char *pcVar5;
int8 uVar6;
ulong uVar7;
size_t sVar8;
char *pcVar9;
int **ppuVar10;
__0 *p_Var11;
ulong local_1a08;
char *local_1a00;
int4 local_19f4;
char *local_19f0;
int8 local_19e8;
int1 *local_19e0;
int1 *local_19d8;
char *local_19c8;
int4 local_19c0;
char *local_19b8;
ulong local_19b0;
long local_19a8;
ios_base local_19a0 [8];
int8 auStack_1998 [32];
int1 local_1898 [32];
int8 local_1878;
int8 local_1870;
int4 local_1868;
int8 local_1858;
int8 local_1848;
int8 local_1838;
int8 local_1828;
int8 local_1818;
int8 local_1808;
int8 local_17f8;
int **local_17e0;
char *local_17d8;
char *pcStack_17d0;
char *local_17c8;
char *pcStack_17c0;
char *local_17b8;
char *pcStack_17b0;
locale local_17a8 [8];
char local_17a0 [3000];
char local_be8 [3000];
if (in_AL != '\0') {
local_1868 = param_1;
local_1858 = param_2;
local_1848 = param_3;
local_1838 = param_4;
local_1828 = param_5;
local_1818 = param_6;
local_1808 = param_7;
local_17f8 = param_8;
}
local_19f0 = param_10;
local_1878 = param_13;
local_1870 = param_14;
if ((((fLB::FLAGS_logtostdout != '\0') || (fLB::FLAGS_logtostderr != '\0')) ||
(fLI::FLAGS_stderrthreshold <= param_9)) ||
((fLB::FLAGS_alsologtostderr != '\0' || (cVar2 = IsLoggingInitialized(), cVar2 == '\0')))) {
ppuVar10 = (int **)(PTR_vtable_00130f48 + 0x10);
local_17d8 = (char *)0x0;
pcStack_17d0 = (char *)0x0;
local_17c8 = (char *)0x0;
pcStack_17c0 = (char *)0x0;
local_17b8 = (char *)0x0;
pcStack_17b0 = (char *)0x0;
local_17e0 = ppuVar10;
std::locale::locale(local_17a8);
local_17e0 = &PTR__streambuf_00130c10;
local_17c8 = local_be8;
/* try { // try from 0012030c to 0012031d has its CatchHandler @ 0012056c */
local_17d8 = local_17a0;
pcStack_17d0 = local_17a0;
pcStack_17c0 = local_17a0;
local_17b8 = local_17a0;
pcStack_17b0 = local_17c8;
std::ostream::ostream((ostream *)&local_19a8,(streambuf *)&local_17e0);
*(int8 *)((long)auStack_1998 + *(long *)(local_19a8 + -0x18)) = 5;
pVar4 = pthread_self();
if (pVar4 == 0) {
/* try { // try from 00120391 to 001203a6 has its CatchHandler @ 0012056a */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)&local_19a8,"thread::id of a non-executing thread",0x24);
}
else {
/* try { // try from 0012033d to 00120349 has its CatchHandler @ 0012056a */
std::ostream::_M_insert<unsigned_long>((ulong)&local_19a8);
}
local_1a00 = local_be8;
local_1a08 = 3000;
/* try { // try from 001203bd to 0012040b has its CatchHandler @ 00120571 */
pcVar5 = (char *)GetLogSeverityName(param_9);
cVar2 = *pcVar5;
if (((local_17b8 != pcStack_17c0) && (local_17b8 != pcStack_17b0)) && (local_17b8[-1] != '\0'))
{
if (local_17b8 < pcStack_17b0) {
*local_17b8 = '\0';
local_17b8 = local_17b8 + 1;
}
else {
/* try { // try from 0012052e to 00120532 has its CatchHandler @ 0012055e */
(*(code *)local_17e0[0xd])(&local_17e0,0);
}
}
uVar6 = tools::const_basename(local_19f0);
local_19f4 = param_11;
DoRawLog(&local_1a00,&local_1a08,"%c00000000 00:00:00.000000 %s %s:%d] RAW: ",
(ulong)(uint)(int)cVar2,local_17a0,uVar6,param_11);
pcVar5 = local_1a00;
uVar1 = local_1a08;
local_19d8 = local_1898;
local_19e0 = &stack0x00000008;
local_19e8 = 0x3000000020;
uVar3 = vsnprintf(local_1a00,local_1a08,param_12,&local_19e8);
pcVar9 = "RAW_LOG ERROR: The Message was too long!\n";
if (-1 < (int)uVar3) {
uVar7 = (ulong)uVar3;
if (uVar7 <= uVar1) {
local_1a00 = pcVar5 + uVar7;
pcVar9 = "\n";
local_1a08 = uVar1 - uVar7;
}
}
DoRawLog(&local_1a00,&local_1a08,pcVar9);
uVar3 = fileno(*(FILE **)PTR_stderr_00130f98);
sVar8 = strlen(local_be8);
p_Var11 = (__0 *)(ulong)uVar3;
syscall(1,p_Var11,local_be8,sVar8);
if (param_9 == 3) {
local_19c8 = local_19f0;
local_19c0 = local_19f4;
local_19b8 = pcVar5;
local_19b0 = uVar1;
/* try { // try from 00120554 to 00120558 has its CatchHandler @ 00120568 */
std::call_once<nglog::RawLog(nglog::LogSeverity,char_const*,int,char_const*,___)::__0>
((once_flag *)&local_19c8,p_Var11);
/* try { // try from 00120559 to 0012055d has its CatchHandler @ 00120566 */
uVar6 = LogMessage::Fail();
/* catch(type#1 @ 00000000) { ... } // from try @ 0012052e with catch @ 0012055e
*/
/* WARNING: Subroutine does not return */
__clang_call_terminate(uVar6);
}
std::ios_base::~ios_base(local_19a0);
local_17e0 = ppuVar10;
std::locale::~locale(local_17a8);
}
return;
}
| |
33,580 | nglog::RawLog(nglog::LogSeverity, char const*, int, char const*, ...) | ng-log[P]ng-log/src/raw_logging.cc | void RawLog(LogSeverity severity, const char* file, int line,
const char* format, ...) {
if (!(FLAGS_logtostdout || FLAGS_logtostderr ||
severity >= FLAGS_stderrthreshold || FLAGS_alsologtostderr ||
!IsLoggingInitialized())) {
return; // this stderr log message is suppressed
}
// We do not have any any option other that string streams to obtain the
// thread identifier as the corresponding value is not convertible to an
// integer. Use a statically allocated buffer to avoid dynamic memory
// allocations.
StaticStringBuf<kLogBufSize> sbuf;
std::ostream oss(&sbuf);
oss << std::setw(5) << std::this_thread::get_id();
// can't call localtime_r here: it can allocate
char buffer[kLogBufSize];
char* buf = buffer;
size_t size = sizeof(buffer);
// NOTE: this format should match the specification in base/logging.h
DoRawLog(&buf, &size, "%c00000000 00:00:00.000000 %s %s:%d] RAW: ",
GetLogSeverityName(severity)[0], sbuf.data(),
const_basename(const_cast<char*>(file)), line);
// Record the position and size of the buffer after the prefix
const char* msg_start = buf;
const size_t msg_size = size;
va_list ap;
va_start(ap, format);
bool no_chop = VADoRawLog(&buf, &size, format, ap);
va_end(ap);
if (no_chop) {
DoRawLog(&buf, &size, "\n");
} else {
DoRawLog(&buf, &size, "RAW_LOG ERROR: The Message was too long!\n");
}
// We make a raw syscall to write directly to the stderr file descriptor,
// avoiding FILE buffering (to avoid invoking malloc()), and bypassing
// libc (to side-step any libc interception).
// We write just once to avoid races with other invocations of RawLog.
safe_write(fileno(stderr), buffer, strlen(buffer));
if (severity == NGLOG_FATAL) {
std::call_once(crashed, [file, line, msg_start, msg_size] {
crash_reason.filename = file;
crash_reason.line_number = line;
memcpy(crash_buf, msg_start, msg_size); // Don't include prefix
crash_reason.message = crash_buf;
#ifdef HAVE_STACKTRACE
crash_reason.depth =
GetStackTrace(crash_reason.stack, ARRAYSIZE(crash_reason.stack), 1);
#else
crash_reason.depth = 0;
#endif
SetCrashReason(&crash_reason);
});
LogMessage::Fail(); // abort()
}
} | O3 | cpp | nglog::RawLog(nglog::LogSeverity, char const*, int, char const*, ...):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x19e8, %rsp # imm = 0x19E8
movq %rcx, %r15
movl %edx, %r12d
movq %rsi, 0x28(%rsp)
movl %edi, 0xc(%rsp)
testb %al, %al
je 0x1fcac
movaps %xmm0, 0x1b0(%rsp)
movaps %xmm1, 0x1c0(%rsp)
movaps %xmm2, 0x1d0(%rsp)
movaps %xmm3, 0x1e0(%rsp)
movaps %xmm4, 0x1f0(%rsp)
movaps %xmm5, 0x200(%rsp)
movaps %xmm6, 0x210(%rsp)
movaps %xmm7, 0x220(%rsp)
movq %r8, 0x1a0(%rsp)
movq %r9, 0x1a8(%rsp)
leaq 0x10d47(%rip), %rax # 0x30a0a
cmpb $0x0, (%rax)
je 0x1fd70
movq 0x10275(%rip), %rbx # 0x2ff48
addq $0x10, %rbx
leaq 0x270(%rsp), %r14
movq %rbx, -0x38(%r14)
xorps %xmm0, %xmm0
movups %xmm0, -0x30(%r14)
movups %xmm0, -0x20(%r14)
movups %xmm0, -0x10(%r14)
movq %r14, %rdi
callq 0x7a60
leaq 0xff14(%rip), %rax # 0x2fc18
movq %rax, -0x38(%r14)
leaq 0x278(%rsp), %r13
leaq 0xe30(%rsp), %rax
movq %r13, -0x18(%r13)
movq %r13, -0x20(%r13)
movq %rax, -0x10(%r13)
movq %r13, -0x38(%r13)
movq %r13, -0x30(%r13)
movq %rax, -0x28(%r13)
leaq 0x70(%rsp), %rdi
leaq 0x238(%rsp), %rsi
callq 0x71d0
movq 0x70(%rsp), %rax
movq -0x18(%rax), %rax
movq $0x5, 0x80(%rsp,%rax)
callq 0x7470
testq %rax, %rax
je 0x1fdb5
leaq 0x70(%rsp), %rdi
movq %rax, %rsi
callq 0x7360
jmp 0x1fdcb
leaq 0x10c8b(%rip), %rax # 0x30a02
cmpb $0x0, (%rax)
jne 0x1fccc
leaq 0x10c89(%rip), %rax # 0x30a10
movl 0xc(%rsp), %ecx
cmpl %ecx, (%rax)
jle 0x1fccc
leaq 0x10c6a(%rip), %rax # 0x30a04
cmpb $0x0, (%rax)
jne 0x1fccc
callq 0x21a30
testb %al, %al
je 0x1fccc
jmp 0x1ff35
leaq 0x4a91(%rip), %rsi # 0x2484d
leaq 0x70(%rsp), %rdi
movl $0x24, %edx
callq 0x7610
leaq 0xe30(%rsp), %rax
movq %rax, 0x18(%rsp)
movq $0xbb8, 0x10(%rsp) # imm = 0xBB8
movl 0xc(%rsp), %edi
callq 0x9fac
movsbl (%rax), %ebp
movq 0x260(%rsp), %rax
cmpq 0x258(%rsp), %rax
je 0x1fe26
movq 0x268(%rsp), %rcx
cmpq %rcx, %rax
je 0x1fe26
cmpb $0x0, -0x1(%rax)
je 0x1fe26
cmpq %rcx, %rax
jae 0x1ff47
movb $0x0, (%rax)
incq 0x260(%rsp)
movq 0x28(%rsp), %rdi
callq 0x21a3d
movl %r12d, 0x24(%rsp)
movl %r12d, (%rsp)
leaq 0x500d(%rip), %rdx # 0x24e4d
leaq 0x18(%rsp), %r14
leaq 0x10(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
movl %ebp, %ecx
movq %r13, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0x1ffbf
movq (%r14), %r13
movq (%r12), %rbp
leaq 0x180(%rsp), %rax
leaq 0x30(%rsp), %rcx
movq %rax, 0x10(%rcx)
leaq 0x1a20(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000020, %rax # imm = 0x3000000020
movq %rax, (%rcx)
movq %r13, %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x7300
leaq 0x4fd3(%rip), %rdx # 0x24e78
testl %eax, %eax
js 0x1fec7
movl %eax, %eax
movq %rbp, %rcx
subq %rax, %rcx
jb 0x1fec7
movq %rcx, 0x10(%rsp)
addq %r13, %rax
movq %rax, 0x18(%rsp)
leaq 0x3f1d(%rip), %rdx # 0x23de4
leaq 0x18(%rsp), %rdi
leaq 0x10(%rsp), %rsi
xorl %eax, %eax
callq 0x1ffbf
movq 0x100b9(%rip), %rax # 0x2ff98
movq (%rax), %rdi
callq 0x7590
movl %eax, %r14d
leaq 0xe30(%rsp), %r12
movq %r12, %rdi
callq 0x7200
movl $0x1, %edi
movl %r14d, %esi
movq %r12, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x7090
cmpl $0x3, 0xc(%rsp)
je 0x1ff5c
leaq 0x78(%rsp), %rdi
callq 0x7180
movq %rbx, 0x238(%rsp)
leaq 0x270(%rsp), %rdi
callq 0x77b0
addq $0x19e8, %rsp # imm = 0x19E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x238(%rsp), %rdi
movq (%rdi), %rax
xorl %esi, %esi
callq *0x68(%rax)
jmp 0x1fe26
leaq 0x50(%rsp), %rdi
movq 0x28(%rsp), %rax
movq %rax, (%rdi)
movl 0x24(%rsp), %eax
movl %eax, 0x8(%rdi)
movq %r13, 0x10(%rdi)
movq %rbp, 0x18(%rdi)
callq 0x20065
callq 0xb650
movq %rax, %rdi
callq 0x9b03
jmp 0x1ff95
jmp 0x1ff95
jmp 0x1ff95
movq %rax, %r14
jmp 0x1ffa2
movq %rax, %r14
leaq 0x78(%rsp), %rdi
callq 0x7180
movq %rbx, 0x238(%rsp)
leaq 0x270(%rsp), %rdi
callq 0x77b0
movq %r14, %rdi
callq 0x7990
| _ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 19E8h
mov r15, rcx
mov r12d, edx
mov [rsp+1A18h+var_19F0], rsi
mov [rsp+1A18h+var_1A0C], edi
test al, al
jz short loc_1FCAC
movaps [rsp+1A18h+var_1868], xmm0
movaps [rsp+1A18h+var_1858], xmm1
movaps [rsp+1A18h+var_1848], xmm2
movaps [rsp+1A18h+var_1838], xmm3
movaps [rsp+1A18h+var_1828], xmm4
movaps [rsp+1A18h+var_1818], xmm5
movaps [rsp+1A18h+var_1808], xmm6
movaps [rsp+1A18h+var_17F8], xmm7
loc_1FCAC:
mov [rsp+1A18h+var_1878], r8
mov [rsp+1A18h+var_1870], r9
lea rax, _ZN3fLB17FLAGS_logtostdoutE; fLB::FLAGS_logtostdout
cmp byte ptr [rax], 0
jz loc_1FD70
loc_1FCCC:
mov rbx, cs:_ZTVSt15basic_streambufIcSt11char_traitsIcEE_ptr
add rbx, 10h
lea r14, [rsp+1A18h+var_17A8]
mov [r14-38h], rbx
xorps xmm0, xmm0
movups xmmword ptr [r14-30h], xmm0
movups xmmword ptr [r14-20h], xmm0
movups xmmword ptr [r14-10h], xmm0
mov rdi, r14; this
call __ZNSt6localeC1Ev; std::locale::locale(void)
lea rax, off_2FC18
mov [r14-38h], rax
lea r13, [rsp+1A18h+var_17A0]
lea rax, [rsp+1A18h+var_BE8]
mov [r13-18h], r13
mov [r13-20h], r13
mov [r13-10h], rax
mov [r13-38h], r13
mov [r13-30h], r13
mov [r13-28h], rax
lea rdi, [rsp+1A18h+var_19A8]
lea rsi, [rsp+1A18h+var_17E0]
call __ZNSoC1EPSt15basic_streambufIcSt11char_traitsIcEE; std::ostream::ostream(std::streambuf *)
mov rax, [rsp+1A18h+var_19A8]
mov rax, [rax-18h]
mov [rsp+rax+1A18h+var_1998], 5
call _pthread_self
test rax, rax
jz short loc_1FDB5
lea rdi, [rsp+1A18h+var_19A8]; this
mov rsi, rax
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
jmp short loc_1FDCB
loc_1FD70:
lea rax, _ZN3fLB17FLAGS_logtostderrE; fLB::FLAGS_logtostderr
cmp byte ptr [rax], 0
jnz loc_1FCCC
lea rax, _ZN3fLI21FLAGS_stderrthresholdE; fLI::FLAGS_stderrthreshold
mov ecx, [rsp+1A18h+var_1A0C]
cmp [rax], ecx
jle loc_1FCCC
lea rax, _ZN3fLB21FLAGS_alsologtostderrE; fLB::FLAGS_alsologtostderr
cmp byte ptr [rax], 0
jnz loc_1FCCC
call _ZN5nglog20IsLoggingInitializedEv; nglog::IsLoggingInitialized(void)
test al, al
jz loc_1FCCC
jmp loc_1FF35
loc_1FDB5:
lea rsi, aThreadIdOfANon; "thread::id of a non-executing thread"
lea rdi, [rsp+1A18h+var_19A8]
mov edx, 24h ; '$'
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_1FDCB:
lea rax, [rsp+1A18h+var_BE8]
mov [rsp+1A18h+var_1A00], rax
mov [rsp+1A18h+var_1A08], 0BB8h
mov edi, [rsp+1A18h+var_1A0C]
call _ZN5nglog18GetLogSeverityNameENS_11LogSeverityE; nglog::GetLogSeverityName(nglog::LogSeverity)
movsx ebp, byte ptr [rax]
mov rax, [rsp+1A18h+var_17B8]
cmp rax, [rsp+1A18h+var_17C0]
jz short loc_1FE26
mov rcx, [rsp+1A18h+var_17B0]
cmp rax, rcx
jz short loc_1FE26
cmp byte ptr [rax-1], 0
jz short loc_1FE26
cmp rax, rcx
jnb loc_1FF47
mov byte ptr [rax], 0
inc [rsp+1A18h+var_17B8]
loc_1FE26:
mov rdi, [rsp+1A18h+var_19F0]; this
call _ZN5nglog5tools14const_basenameEPKc; nglog::tools::const_basename(char const*)
mov [rsp+1A18h+var_19F4], r12d
mov [rsp+1A18h+var_1A18], r12d
lea rdx, aC0000000000000; "%c00000000 00:00:00.000000 %s %s:%d] RA"...
lea r14, [rsp+1A18h+var_1A00]
lea r12, [rsp+1A18h+var_1A08]
mov rdi, r14; this
mov rsi, r12; char **
mov ecx, ebp; char *
mov r8, r13
mov r9, rax
xor eax, eax
call _ZN5nglogL8DoRawLogEPPcPmPKcz; nglog::DoRawLog(char **,ulong *,char const*,...)
mov r13, [r14]
mov rbp, [r12]
lea rax, [rsp+1A18h+var_1898]
lea rcx, [rsp+1A18h+var_19E8]
mov [rcx+10h], rax
lea rax, [rsp+1A18h+arg_0]
mov [rcx+8], rax
mov rax, 3000000020h
mov [rcx], rax
mov rdi, r13
mov rsi, rbp
mov rdx, r15
call _vsnprintf
lea rdx, aRawLogErrorThe; "RAW_LOG ERROR: The Message was too long"...
test eax, eax
js short loc_1FEC7
mov eax, eax
mov rcx, rbp
sub rcx, rax; char *
jb short loc_1FEC7
mov [rsp+1A18h+var_1A08], rcx
add rax, r13
mov [rsp+1A18h+var_1A00], rax
lea rdx, asc_23DE3+1; unsigned __int64 *
loc_1FEC7:
lea rdi, [rsp+1A18h+var_1A00]; this
lea rsi, [rsp+1A18h+var_1A08]; char **
xor eax, eax
call _ZN5nglogL8DoRawLogEPPcPmPKcz; nglog::DoRawLog(char **,ulong *,char const*,...)
mov rax, cs:stderr_ptr
mov rdi, [rax]
call _fileno
mov r14d, eax
lea r12, [rsp+1A18h+var_BE8]
mov rdi, r12
call _strlen
mov edi, 1
mov esi, r14d
mov rdx, r12
mov rcx, rax
xor eax, eax
call _syscall
cmp [rsp+1A18h+var_1A0C], 3
jz short loc_1FF5C
lea rdi, [rsp+1A18h+var_19A0]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov [rsp+1A18h+var_17E0], rbx
lea rdi, [rsp+1A18h+var_17A8]; this
call __ZNSt6localeD1Ev; std::locale::~locale()
loc_1FF35:
add rsp, 19E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_1FF47:
lea rdi, [rsp+1A18h+var_17E0]
mov rax, [rdi]
xor esi, esi
call qword ptr [rax+68h]
jmp loc_1FE26
loc_1FF5C:
lea rdi, [rsp+1A18h+var_19C8]; this
mov rax, [rsp+1A18h+var_19F0]
mov [rdi], rax
mov eax, [rsp+1A18h+var_19F4]
mov [rdi+8], eax
mov [rdi+10h], r13
mov [rdi+18h], rbp
call _ZSt9call_onceIZN5nglog6RawLogENS0_11LogSeverityEPKciS3_zE3$_0JEEvRSt9once_flagOT_DpOT0_; std::call_once<nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)::$_0>(std::once_flag &,nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)::$_0 &&)
call _ZN5nglog10LogMessage4FailEv; nglog::LogMessage::Fail(void)
mov rdi, rax
call __clang_call_terminate
jmp short loc_1FF95
jmp short loc_1FF95
jmp short loc_1FF95
mov r14, rax
jmp short loc_1FFA2
loc_1FF95:
mov r14, rax
lea rdi, [rsp+1A18h+var_19A0]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
loc_1FFA2:
mov [rsp+1A18h+var_17E0], rbx
lea rdi, [rsp+1A18h+var_17A8]; this
call __ZNSt6localeD1Ev; std::locale::~locale()
mov rdi, r14
call __Unwind_Resume
| void nglog::RawLog(
nglog *a1,
nglog::tools *a2,
int 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)
{
long long v17; // rax
const char *v18; // rsi
unsigned int v19; // ebp
long long v20; // rax
_BYTE *v21; // r13
char *v22; // rbp
unsigned int v23; // eax
const char *v24; // rcx
char *v25; // rdx
unsigned int v26; // r14d
long long v27; // rax
char *v28; // [rsp+10h] [rbp-1A08h] BYREF
_BYTE *v29; // [rsp+18h] [rbp-1A00h] BYREF
int v30; // [rsp+24h] [rbp-19F4h]
nglog::tools *v31; // [rsp+28h] [rbp-19F0h]
_QWORD v32[4]; // [rsp+30h] [rbp-19E8h] BYREF
nglog::tools *v33; // [rsp+50h] [rbp-19C8h] BYREF
int v34; // [rsp+58h] [rbp-19C0h]
_BYTE *v35; // [rsp+60h] [rbp-19B8h]
char *v36; // [rsp+68h] [rbp-19B0h]
long long v37; // [rsp+70h] [rbp-19A8h] BYREF
_BYTE v38[264]; // [rsp+78h] [rbp-19A0h] BYREF
char v39; // [rsp+180h] [rbp-1898h] BYREF
long long v40; // [rsp+1A0h] [rbp-1878h]
long long v41; // [rsp+1A8h] [rbp-1870h]
__m128 v42; // [rsp+1B0h] [rbp-1868h]
__m128 v43; // [rsp+1C0h] [rbp-1858h]
__m128 v44; // [rsp+1D0h] [rbp-1848h]
__m128 v45; // [rsp+1E0h] [rbp-1838h]
__m128 v46; // [rsp+1F0h] [rbp-1828h]
__m128 v47; // [rsp+200h] [rbp-1818h]
__m128 v48; // [rsp+210h] [rbp-1808h]
__m128 v49; // [rsp+220h] [rbp-17F8h]
_QWORD v50[4]; // [rsp+238h] [rbp-17E0h] BYREF
_BYTE *v51; // [rsp+258h] [rbp-17C0h]
_BYTE *v52; // [rsp+260h] [rbp-17B8h]
_BYTE *v53; // [rsp+268h] [rbp-17B0h]
char v54[8]; // [rsp+270h] [rbp-17A8h] BYREF
_BYTE v55[3000]; // [rsp+278h] [rbp-17A0h] BYREF
_BYTE v56[3048]; // [rsp+E30h] [rbp-BE8h] BYREF
v42 = a7;
v43 = a8;
v44 = a9;
v45 = a10;
v46 = a11;
v47 = a12;
v48 = a13;
v49 = a14;
v31 = a2;
v40 = a5;
v41 = a6;
if ( fLB::FLAGS_logtostdout
|| fLB::FLAGS_logtostderr
|| fLI::FLAGS_stderrthreshold <= (int)a1
|| fLB::FLAGS_alsologtostderr
|| !(unsigned __int8)nglog::IsLoggingInitialized(a1) )
{
std::locale::locale((std::locale *)v54);
v50[0] = &off_2FC18;
v52 = v55;
v51 = v55;
v53 = v56;
v50[1] = v55;
v50[2] = v55;
v50[3] = v56;
std::ostream::ostream(&v37, v50);
*(_QWORD *)&v38[*(_QWORD *)(v37 - 24) + 8] = 5LL;
v17 = pthread_self();
if ( v17 )
{
v18 = (const char *)v17;
std::ostream::_M_insert<unsigned long>(&v37);
}
else
{
v18 = "thread::id of a non-executing thread";
std::__ostream_insert<char,std::char_traits<char>>(&v37, "thread::id of a non-executing thread", 36LL);
}
v29 = v56;
v28 = (_BYTE *)(&stru_BB0 + 8);
v19 = *nglog::GetLogSeverityName((int)a1);
if ( v52 != v51 && v52 != v53 && *(v52 - 1) )
{
if ( v52 >= v53 )
{
v18 = 0LL;
(*(void ( **)(_QWORD *, _QWORD))(v50[0] + 104LL))(v50, 0LL);
}
else
{
*v52++ = 0;
}
}
v20 = nglog::tools::const_basename(v31, v18);
v30 = a3;
nglog::DoRawLog(
(nglog *)&v29,
&v28,
(unsigned long long *)"%c00000000 00:00:00.000000 %s %s:%d] RAW: ",
(const char *)v19,
v55,
v20,
a3);
v21 = v29;
v22 = v28;
v32[2] = &v39;
v32[1] = &a15;
v32[0] = 0x3000000020LL;
v23 = vsnprintf(v29, v28, a4, v32);
v25 = "RAW_LOG ERROR: The Message was too long!\n";
if ( (v23 & 0x80000000) == 0 )
{
v24 = &v22[-v23];
if ( (unsigned long long)v22 >= v23 )
{
v28 = &v22[-v23];
v29 = &v21[v23];
v25 = "\n";
}
}
nglog::DoRawLog((nglog *)&v29, &v28, (unsigned long long *)v25, v24);
v26 = fileno(stderr);
v27 = strlen(v56);
syscall(1LL, v26, v56, v27);
if ( (_DWORD)a1 == 3 )
{
v33 = v31;
v34 = v30;
v35 = v21;
v36 = v22;
std::call_once<nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)::$_0>();
nglog::LogMessage::Fail((nglog::LogMessage *)&v33);
}
std::ios_base::~ios_base((std::ios_base *)v38);
v50[0] = (char *)&`vtable for'std::streambuf + 16;
std::locale::~locale((std::locale *)v54);
}
}
| RawLog:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x19e8
MOV R15,RCX
MOV R12D,EDX
MOV qword ptr [RSP + 0x28],RSI
MOV dword ptr [RSP + 0xc],EDI
TEST AL,AL
JZ 0x0011fcac
MOVAPS xmmword ptr [RSP + 0x1b0],XMM0
MOVAPS xmmword ptr [RSP + 0x1c0],XMM1
MOVAPS xmmword ptr [RSP + 0x1d0],XMM2
MOVAPS xmmword ptr [RSP + 0x1e0],XMM3
MOVAPS xmmword ptr [RSP + 0x1f0],XMM4
MOVAPS xmmword ptr [RSP + 0x200],XMM5
MOVAPS xmmword ptr [RSP + 0x210],XMM6
MOVAPS xmmword ptr [RSP + 0x220],XMM7
LAB_0011fcac:
MOV qword ptr [RSP + 0x1a0],R8
MOV qword ptr [RSP + 0x1a8],R9
LEA RAX,[0x130a0a]
CMP byte ptr [RAX],0x0
JZ 0x0011fd70
LAB_0011fccc:
MOV RBX,qword ptr [0x0012ff48]
ADD RBX,0x10
LEA R14,[RSP + 0x270]
MOV qword ptr [R14 + -0x38],RBX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + -0x30],XMM0
MOVUPS xmmword ptr [R14 + -0x20],XMM0
MOVUPS xmmword ptr [R14 + -0x10],XMM0
MOV RDI,R14
CALL 0x00107a60
LEA RAX,[0x12fc18]
MOV qword ptr [R14 + -0x38],RAX
LEA R13,[RSP + 0x278]
LEA RAX,[RSP + 0xe30]
MOV qword ptr [R13 + -0x18],R13
MOV qword ptr [R13 + -0x20],R13
MOV qword ptr [R13 + -0x10],RAX
MOV qword ptr [R13 + -0x38],R13
MOV qword ptr [R13 + -0x30],R13
MOV qword ptr [R13 + -0x28],RAX
LAB_0011fd30:
LEA RDI,[RSP + 0x70]
LEA RSI,[RSP + 0x238]
CALL 0x001071d0
MOV RAX,qword ptr [RSP + 0x70]
MOV RAX,qword ptr [RAX + -0x18]
MOV qword ptr [RSP + RAX*0x1 + 0x80],0x5
CALL 0x00107470
TEST RAX,RAX
JZ 0x0011fdb5
LAB_0011fd61:
LEA RDI,[RSP + 0x70]
MOV RSI,RAX
CALL 0x00107360
LAB_0011fd6e:
JMP 0x0011fdcb
LAB_0011fd70:
LEA RAX,[0x130a02]
CMP byte ptr [RAX],0x0
JNZ 0x0011fccc
LEA RAX,[0x130a10]
MOV ECX,dword ptr [RSP + 0xc]
CMP dword ptr [RAX],ECX
JLE 0x0011fccc
LEA RAX,[0x130a04]
CMP byte ptr [RAX],0x0
JNZ 0x0011fccc
CALL 0x00121a30
TEST AL,AL
JZ 0x0011fccc
JMP 0x0011ff35
LAB_0011fdb5:
LEA RSI,[0x12484d]
LEA RDI,[RSP + 0x70]
MOV EDX,0x24
CALL 0x00107610
LAB_0011fdcb:
LEA RAX,[RSP + 0xe30]
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x10],0xbb8
LAB_0011fde1:
MOV EDI,dword ptr [RSP + 0xc]
CALL 0x00109fac
MOVSX EBP,byte ptr [RAX]
MOV RAX,qword ptr [RSP + 0x260]
CMP RAX,qword ptr [RSP + 0x258]
JZ 0x0011fe26
MOV RCX,qword ptr [RSP + 0x268]
CMP RAX,RCX
JZ 0x0011fe26
CMP byte ptr [RAX + -0x1],0x0
JZ 0x0011fe26
CMP RAX,RCX
JNC 0x0011ff47
MOV byte ptr [RAX],0x0
INC qword ptr [RSP + 0x260]
LAB_0011fe26:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00121a3d
MOV dword ptr [RSP + 0x24],R12D
MOV dword ptr [RSP],R12D
LEA RDX,[0x124e4d]
LEA R14,[RSP + 0x18]
LEA R12,[RSP + 0x10]
MOV RDI,R14
MOV RSI,R12
MOV ECX,EBP
MOV R8,R13
MOV R9,RAX
XOR EAX,EAX
CALL 0x0011ffbf
MOV R13,qword ptr [R14]
MOV RBP,qword ptr [R12]
LEA RAX,[RSP + 0x180]
LEA RCX,[RSP + 0x30]
MOV qword ptr [RCX + 0x10],RAX
LEA RAX,[RSP + 0x1a20]
MOV qword ptr [RCX + 0x8],RAX
MOV RAX,0x3000000020
MOV qword ptr [RCX],RAX
MOV RDI,R13
MOV RSI,RBP
MOV RDX,R15
CALL 0x00107300
LEA RDX,[0x124e78]
TEST EAX,EAX
JS 0x0011fec7
MOV EAX,EAX
MOV RCX,RBP
SUB RCX,RAX
JC 0x0011fec7
MOV qword ptr [RSP + 0x10],RCX
ADD RAX,R13
MOV qword ptr [RSP + 0x18],RAX
LEA RDX,[0x123de4]
LAB_0011fec7:
LEA RDI,[RSP + 0x18]
LEA RSI,[RSP + 0x10]
XOR EAX,EAX
CALL 0x0011ffbf
MOV RAX,qword ptr [0x0012ff98]
MOV RDI,qword ptr [RAX]
CALL 0x00107590
MOV R14D,EAX
LEA R12,[RSP + 0xe30]
MOV RDI,R12
CALL 0x00107200
MOV EDI,0x1
MOV ESI,R14D
MOV RDX,R12
MOV RCX,RAX
XOR EAX,EAX
CALL 0x00107090
CMP dword ptr [RSP + 0xc],0x3
JZ 0x0011ff5c
LEA RDI,[RSP + 0x78]
CALL 0x00107180
MOV qword ptr [RSP + 0x238],RBX
LEA RDI,[RSP + 0x270]
CALL 0x001077b0
LAB_0011ff35:
ADD RSP,0x19e8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0011ff47:
LEA RDI,[RSP + 0x238]
MOV RAX,qword ptr [RDI]
LAB_0011ff52:
XOR ESI,ESI
CALL qword ptr [RAX + 0x68]
JMP 0x0011fe26
LAB_0011ff5c:
LEA RDI,[RSP + 0x50]
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RDI],RAX
MOV EAX,dword ptr [RSP + 0x24]
MOV dword ptr [RDI + 0x8],EAX
MOV qword ptr [RDI + 0x10],R13
MOV qword ptr [RDI + 0x18],RBP
LAB_0011ff78:
CALL 0x00120065
LAB_0011ff7d:
CALL 0x0010b650
LAB_0011ff82:
MOV RDI,RAX
CALL 0x00109b03
|
/* nglog::RawLog(nglog::LogSeverity, char const*, int, char const*, ...) */
void nglog::RawLog(int4 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int param_9,char *param_10,int4 param_11,char *param_12,int8 param_13,
int8 param_14,...)
{
ulong uVar1;
char in_AL;
char cVar2;
uint uVar3;
pthread_t pVar4;
char *pcVar5;
int8 uVar6;
ulong uVar7;
size_t sVar8;
char *pcVar9;
int **ppuVar10;
__0 *p_Var11;
ulong local_1a08;
char *local_1a00;
int4 local_19f4;
char *local_19f0;
int8 local_19e8;
int1 *local_19e0;
int1 *local_19d8;
char *local_19c8;
int4 local_19c0;
char *local_19b8;
ulong local_19b0;
long local_19a8;
ios_base local_19a0 [8];
int8 auStack_1998 [32];
int1 local_1898 [32];
int8 local_1878;
int8 local_1870;
int4 local_1868;
int8 local_1858;
int8 local_1848;
int8 local_1838;
int8 local_1828;
int8 local_1818;
int8 local_1808;
int8 local_17f8;
int **local_17e0;
char *local_17d8;
char *pcStack_17d0;
char *local_17c8;
char *pcStack_17c0;
char *local_17b8;
char *pcStack_17b0;
locale local_17a8 [8];
char local_17a0 [3000];
char local_be8 [3000];
if (in_AL != '\0') {
local_1868 = param_1;
local_1858 = param_2;
local_1848 = param_3;
local_1838 = param_4;
local_1828 = param_5;
local_1818 = param_6;
local_1808 = param_7;
local_17f8 = param_8;
}
local_19f0 = param_10;
local_1878 = param_13;
local_1870 = param_14;
if ((((fLB::FLAGS_logtostdout != '\0') || (fLB::FLAGS_logtostderr != '\0')) ||
(fLI::FLAGS_stderrthreshold <= param_9)) ||
((fLB::FLAGS_alsologtostderr != '\0' || (cVar2 = IsLoggingInitialized(), cVar2 == '\0')))) {
ppuVar10 = (int **)(PTR_vtable_0012ff48 + 0x10);
local_17d8 = (char *)0x0;
pcStack_17d0 = (char *)0x0;
local_17c8 = (char *)0x0;
pcStack_17c0 = (char *)0x0;
local_17b8 = (char *)0x0;
pcStack_17b0 = (char *)0x0;
local_17e0 = ppuVar10;
std::locale::locale(local_17a8);
local_17e0 = &PTR__streambuf_0012fc18;
local_17c8 = local_be8;
/* try { // try from 0011fd30 to 0011fd41 has its CatchHandler @ 0011ff90 */
local_17d8 = local_17a0;
pcStack_17d0 = local_17a0;
pcStack_17c0 = local_17a0;
local_17b8 = local_17a0;
pcStack_17b0 = local_17c8;
std::ostream::ostream((ostream *)&local_19a8,(streambuf *)&local_17e0);
*(int8 *)((long)auStack_1998 + *(long *)(local_19a8 + -0x18)) = 5;
pVar4 = pthread_self();
if (pVar4 == 0) {
/* try { // try from 0011fdb5 to 0011fdca has its CatchHandler @ 0011ff8e */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)&local_19a8,"thread::id of a non-executing thread",0x24);
}
else {
/* try { // try from 0011fd61 to 0011fd6d has its CatchHandler @ 0011ff8e */
std::ostream::_M_insert<unsigned_long>((ulong)&local_19a8);
}
local_1a00 = local_be8;
local_1a08 = 3000;
/* try { // try from 0011fde1 to 0011fe2f has its CatchHandler @ 0011ff95 */
pcVar5 = (char *)GetLogSeverityName(param_9);
cVar2 = *pcVar5;
if (((local_17b8 != pcStack_17c0) && (local_17b8 != pcStack_17b0)) && (local_17b8[-1] != '\0'))
{
if (local_17b8 < pcStack_17b0) {
*local_17b8 = '\0';
local_17b8 = local_17b8 + 1;
}
else {
/* try { // try from 0011ff52 to 0011ff56 has its CatchHandler @ 0011ff82 */
(*(code *)local_17e0[0xd])(&local_17e0,0);
}
}
uVar6 = tools::const_basename(local_19f0);
local_19f4 = param_11;
DoRawLog(&local_1a00,&local_1a08,"%c00000000 00:00:00.000000 %s %s:%d] RAW: ",
(ulong)(uint)(int)cVar2,local_17a0,uVar6,param_11);
pcVar5 = local_1a00;
uVar1 = local_1a08;
local_19d8 = local_1898;
local_19e0 = &stack0x00000008;
local_19e8 = 0x3000000020;
uVar3 = vsnprintf(local_1a00,local_1a08,param_12,&local_19e8);
pcVar9 = "RAW_LOG ERROR: The Message was too long!\n";
if (-1 < (int)uVar3) {
uVar7 = (ulong)uVar3;
if (uVar7 <= uVar1) {
local_1a00 = pcVar5 + uVar7;
pcVar9 = "\n";
local_1a08 = uVar1 - uVar7;
}
}
DoRawLog(&local_1a00,&local_1a08,pcVar9);
uVar3 = fileno(*(FILE **)PTR_stderr_0012ff98);
sVar8 = strlen(local_be8);
p_Var11 = (__0 *)(ulong)uVar3;
syscall(1,p_Var11,local_be8,sVar8);
if (param_9 == 3) {
local_19c8 = local_19f0;
local_19c0 = local_19f4;
local_19b8 = pcVar5;
local_19b0 = uVar1;
/* try { // try from 0011ff78 to 0011ff7c has its CatchHandler @ 0011ff8c */
std::call_once<nglog::RawLog(nglog::LogSeverity,char_const*,int,char_const*,___)::__0>
((once_flag *)&local_19c8,p_Var11);
/* try { // try from 0011ff7d to 0011ff81 has its CatchHandler @ 0011ff8a */
uVar6 = LogMessage::Fail();
/* catch(type#1 @ 00000000) { ... } // from try @ 0011ff52 with catch @ 0011ff82
*/
/* WARNING: Subroutine does not return */
__clang_call_terminate(uVar6);
}
std::ios_base::~ios_base(local_19a0);
local_17e0 = ppuVar10;
std::locale::~locale(local_17a8);
}
return;
}
| |
33,581 | trnman_init_tmp_trn_for_logging_trid | eloqsql/storage/maria/trnman.c | void trnman_init_tmp_trn_for_logging_trid(TRN *trn)
{
*trn= dummy_transaction_object;
/* Avoid logging short_id */
trn->short_id= 1;
/* Trid gets logged in translog_write_record */
trn->first_undo_lsn= 0;
/* Get next free trid */
trn->trid= trnman_get_min_safe_trid();
} | O0 | c | trnman_init_tmp_trn_for_logging_trid:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x438f99(%rip), %rsi # 0x482b30
movl $0xb0, %edx
callq 0x2a0b0
movq -0x8(%rbp), %rax
movw $0x1, 0xac(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0xa0(%rax)
callq 0x4a560
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x78(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| trnman_init_tmp_trn_for_logging_trid:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
lea rsi, dummy_transaction_object
mov edx, 0B0h
call _memcpy
mov rax, [rbp+var_8]
mov word ptr [rax+0ACh], 1
mov rax, [rbp+var_8]
mov qword ptr [rax+0A0h], 0
call trnman_get_min_safe_trid
mov rcx, rax
mov rax, [rbp+var_8]
mov [rax+78h], rcx
add rsp, 10h
pop rbp
retn
| long long trnman_init_tmp_trn_for_logging_trid(long long a1)
{
long long min_safe_trid; // rcx
long long result; // rax
memcpy(a1, dummy_transaction_object, 176LL);
*(_WORD *)(a1 + 172) = 1;
*(_QWORD *)(a1 + 160) = 0LL;
min_safe_trid = trnman_get_min_safe_trid();
result = a1;
*(_QWORD *)(a1 + 120) = min_safe_trid;
return result;
}
| trnman_init_tmp_trn_for_logging_trid:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x582b30]
MOV EDX,0xb0
CALL 0x0012a0b0
MOV RAX,qword ptr [RBP + -0x8]
MOV word ptr [RAX + 0xac],0x1
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0xa0],0x0
CALL 0x0014a560
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x78],RCX
ADD RSP,0x10
POP RBP
RET
|
void trnman_init_tmp_trn_for_logging_trid(void *param_1)
{
int8 uVar1;
memcpy(param_1,dummy_transaction_object,0xb0);
*(int2 *)((long)param_1 + 0xac) = 1;
*(int8 *)((long)param_1 + 0xa0) = 0;
uVar1 = trnman_get_min_safe_trid();
*(int8 *)((long)param_1 + 0x78) = uVar1;
return;
}
| |
33,582 | JS_GetModuleNamespace | bluesky950520[P]quickjs/quickjs.c | JSValue JS_GetModuleNamespace(JSContext *ctx, JSModuleDef *m)
{
if (JS_IsUndefined(m->module_ns)) {
JSValue val;
val = js_build_module_ns(ctx, m);
if (JS_IsException(val))
return JS_EXCEPTION;
m->module_ns = val;
}
return js_dup(m->module_ns);
} | O0 | c | JS_GetModuleNamespace:
subq $0x48, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq 0x58(%rax), %rdi
movq 0x60(%rax), %rsi
callq 0x2cfa0
cmpl $0x0, %eax
je 0x48920
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x48950
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0x48909
movl $0x0, 0x38(%rsp)
movq $0x6, 0x40(%rsp)
jmp 0x4893c
movq 0x28(%rsp), %rax
movq 0x18(%rsp), %rcx
movq %rcx, 0x58(%rax)
movq 0x20(%rsp), %rcx
movq %rcx, 0x60(%rax)
movq 0x28(%rsp), %rax
movq 0x58(%rax), %rdi
movq 0x60(%rax), %rsi
callq 0x20410
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rdx
addq $0x48, %rsp
retq
nopl (%rax,%rax)
| JS_GetModuleNamespace:
sub rsp, 48h
mov [rsp+48h+var_18], rdi
mov [rsp+48h+var_20], rsi
mov rax, [rsp+48h+var_20]
mov rdi, [rax+58h]
mov rsi, [rax+60h]
call JS_IsUndefined_0
cmp eax, 0
jz short loc_48920
mov rdi, [rsp+48h+var_18]
mov rsi, [rsp+48h+var_20]
call js_build_module_ns
mov [rsp+48h+var_40], rax
mov [rsp+48h+var_38], rdx
mov rax, [rsp+48h+var_40]
mov [rsp+48h+var_30], rax
mov rax, [rsp+48h+var_38]
mov [rsp+48h+var_28], rax
mov rdi, [rsp+48h+var_30]
mov rsi, [rsp+48h+var_28]
call JS_IsException_1
cmp eax, 0
jz short loc_48909
mov dword ptr [rsp+48h+var_10], 0
mov [rsp+48h+var_8], 6
jmp short loc_4893C
loc_48909:
mov rax, [rsp+48h+var_20]
mov rcx, [rsp+48h+var_30]
mov [rax+58h], rcx
mov rcx, [rsp+48h+var_28]
mov [rax+60h], rcx
loc_48920:
mov rax, [rsp+48h+var_20]
mov rdi, [rax+58h]
mov rsi, [rax+60h]
call js_dup
mov [rsp+48h+var_10], rax
mov [rsp+48h+var_8], rdx
loc_4893C:
mov rax, [rsp+48h+var_10]
mov rdx, [rsp+48h+var_8]
add rsp, 48h
retn
| _DWORD * JS_GetModuleNamespace(long long a1, long long a2)
{
long long v2; // rdx
long long v4; // [rsp+8h] [rbp-40h]
long long v5; // [rsp+20h] [rbp-28h]
long long v6; // [rsp+38h] [rbp-10h]
if ( !JS_IsUndefined_0(*(_QWORD *)(a2 + 88), *(_QWORD *)(a2 + 96)) )
return js_dup(*(_DWORD **)(a2 + 88), *(_QWORD *)(a2 + 96));
v4 = js_build_module_ns(a1, a2);
v5 = v2;
if ( !JS_IsException_1(v4, v2) )
{
*(_QWORD *)(a2 + 88) = v4;
*(_QWORD *)(a2 + 96) = v5;
return js_dup(*(_DWORD **)(a2 + 88), *(_QWORD *)(a2 + 96));
}
LODWORD(v6) = 0;
return (_DWORD *)v6;
}
| JS_GetModuleNamespace:
SUB RSP,0x48
MOV qword ptr [RSP + 0x30],RDI
MOV qword ptr [RSP + 0x28],RSI
MOV RAX,qword ptr [RSP + 0x28]
MOV RDI,qword ptr [RAX + 0x58]
MOV RSI,qword ptr [RAX + 0x60]
CALL 0x0012cfa0
CMP EAX,0x0
JZ 0x00148920
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x00148950
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RDX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x00148909
MOV dword ptr [RSP + 0x38],0x0
MOV qword ptr [RSP + 0x40],0x6
JMP 0x0014893c
LAB_00148909:
MOV RAX,qword ptr [RSP + 0x28]
MOV RCX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX + 0x58],RCX
MOV RCX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX + 0x60],RCX
LAB_00148920:
MOV RAX,qword ptr [RSP + 0x28]
MOV RDI,qword ptr [RAX + 0x58]
MOV RSI,qword ptr [RAX + 0x60]
CALL 0x00120410
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RDX
LAB_0014893c:
MOV RAX,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
ADD RSP,0x48
RET
|
int1 [16] JS_GetModuleNamespace(int8 param_1,long param_2)
{
int iVar1;
int1 auVar2 [16];
int4 local_10;
int4 uStack_c;
int8 local_8;
iVar1 = JS_IsUndefined(*(int8 *)(param_2 + 0x58),*(int8 *)(param_2 + 0x60));
if (iVar1 != 0) {
auVar2 = js_build_module_ns(param_1,param_2);
iVar1 = JS_IsException(auVar2._0_8_,auVar2._8_8_);
if (iVar1 != 0) {
local_10 = 0;
local_8 = 6;
goto LAB_0014893c;
}
*(int1 (*) [16])(param_2 + 0x58) = auVar2;
}
auVar2 = js_dup(*(int8 *)(param_2 + 0x58),*(int8 *)(param_2 + 0x60));
local_8 = auVar2._8_8_;
local_10 = auVar2._0_4_;
uStack_c = auVar2._4_4_;
LAB_0014893c:
auVar2._4_4_ = uStack_c;
auVar2._0_4_ = local_10;
auVar2._8_8_ = local_8;
return auVar2;
}
| |
33,583 | JS_GetModuleNamespace | bluesky950520[P]quickjs/quickjs.c | JSValue JS_GetModuleNamespace(JSContext *ctx, JSModuleDef *m)
{
if (JS_IsUndefined(m->module_ns)) {
JSValue val;
val = js_build_module_ns(ctx, m);
if (JS_IsException(val))
return JS_EXCEPTION;
m->module_ns = val;
}
return js_dup(m->module_ns);
} | O2 | c | JS_GetModuleNamespace:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbp
movq 0x60(%rsi), %rbx
cmpl $0x3, %ebx
jne 0x28616
movq %rdi, %r12
pushq $0xb
popq %rsi
callq 0x1a71b
movq %rax, %r15
movq %rdx, %rbx
cmpl $0x6, %ebx
jne 0x28624
cmpl $0x6, %ebx
je 0x2867e
movq %r15, 0x58(%rbp)
movq %rbx, 0x60(%rbp)
jmp 0x2861a
movq 0x58(%rbp), %r15
cmpl $-0x9, %ebx
jb 0x28684
incl (%r15)
jmp 0x28684
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %r13
movaps %xmm0, 0x10(%r13)
movaps %xmm0, (%r13)
xorl %r14d, %r14d
movq %r12, %rdi
movq %r13, %rsi
movq %rbp, %rdx
xorl %ecx, %ecx
callq 0x3a61c
movq %rbp, 0x30(%rsp)
movl %eax, %ebp
movq (%r13), %rsi
movq %r12, %rdi
callq 0x166f2
testl %ebp, %ebp
je 0x28699
movq 0x50(%rsp), %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x166f2
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x174a2
pushq $0x6
popq %rbx
xorl %r15d, %r15d
movq %r15, %rax
movq %rbx, %rdx
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movslq 0x5c(%rsp), %rax
testl %eax, %eax
movl $0x0, %edx
movq %rax, 0x28(%rsp)
cmovgl %eax, %edx
movq 0x50(%rsp), %r13
shlq $0x4, %rdx
movq 0x30(%rsp), %rbp
movq %rdx, 0x10(%rsp)
cmpq %r14, %rdx
je 0x28779
movq 0x8(%r13,%r14), %rax
testq %rax, %rax
je 0x286da
movq %rbp, 0x20(%rsp)
jmp 0x2870b
movl (%r13,%r14), %r8d
movq %r12, %rdi
leaq 0x20(%rsp), %rsi
leaq 0x38(%rsp), %rdx
movq %rbp, %rcx
callq 0x3a7be
cmpl $0x3, %eax
je 0x2874a
testl %eax, %eax
jne 0x28872
movq 0x38(%rsp), %rax
movq 0x10(%rsp), %rdx
cmpl $0x7e, 0x14(%rax)
jne 0x28731
movl $0x2, 0x4(%r13,%r14)
movq 0x20(%rsp), %rcx
movq 0x18(%rcx), %rcx
movslq (%rax), %rax
shlq $0x4, %rax
movq 0x8(%rcx,%rax), %rax
jmp 0x2876b
movl $0x1, 0x4(%r13,%r14)
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0x28757
movq %rcx, 0x8(%r13,%r14)
jmp 0x28770
andl $0x0, 0x4(%r13,%r14)
movq 0x10(%rsp), %rdx
jmp 0x28770
movq 0x20(%rsp), %rcx
movq 0x68(%rcx), %rcx
movq 0x38(%rcx), %rcx
movslq (%rax), %rax
movq (%rcx,%rax,8), %rax
movq %rax, 0x8(%r13,%r14)
addq $0x10, %r14
jmp 0x286c0
leaq 0x12126(%rip), %rcx # 0x3a8a6
pushq $0x10
popq %rdx
movq %r13, %rdi
movq 0x28(%rsp), %rsi
movq %r12, %r8
callq 0x15cc0
movq 0x10(%rsp), %rcx
xorl %r14d, %r14d
movq %rbx, 0x18(%rsp)
cmpq %r14, %rcx
je 0x28835
movl 0x4(%r13,%r14), %eax
cmpl $0x2, %eax
je 0x287fc
cmpl $0x1, %eax
jne 0x2882c
movq %r15, %rbx
movq 0x8(%r13,%r14), %r15
movl (%r13,%r14), %ecx
testq %r15, %r15
je 0x28889
movq %r12, %rdi
movq %rbx, %rsi
movl %ecx, %edx
pushq $0x26
popq %rcx
callq 0x3419e
testq %rax, %rax
je 0x28897
incl (%r15)
movq %r15, (%rax)
movq %rbx, %r15
movq 0x18(%rsp), %rbx
movq 0x10(%rsp), %rcx
jmp 0x2882c
movl (%r13,%r14), %ecx
movq 0x8(%r13,%r14), %r9
movl $0x6, (%rsp)
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
pushq $0x1
popq %r8
callq 0x38876
movq 0x10(%rsp), %rcx
testl %eax, %eax
js 0x28665
addq $0x10, %r14
jmp 0x287a0
movq %r12, %rdi
movq %r13, %rsi
callq 0x166f2
pushq $0x7f
popq %rsi
movq %r12, %rdi
callq 0x19e14
movq %rdx, %r9
andl $0x0, (%rsp)
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movl $0xda, %ecx
movq %rax, %r8
callq 0x1fcf6
andb $-0x2, 0x5(%r15)
jmp 0x28607
movl (%r13,%r14), %ecx
movq %r12, %rdi
movl %eax, %esi
movq %rbp, %rdx
callq 0x3a827
jmp 0x28665
pushq $0x2
popq %rsi
movq %r12, %rdi
movq %rbp, %rdx
callq 0x3a827
movq %rbx, %r15
movq 0x18(%rsp), %rbx
jmp 0x28665
| JS_GetModuleNamespace:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov rbp, rsi
mov rbx, [rsi+60h]
cmp ebx, 3
jnz short loc_28616
mov r12, rdi
push 0Bh
pop rsi
call JS_NewObjectClass
mov r15, rax
mov rbx, rdx
cmp ebx, 6
jnz short loc_28624
loc_28607:
cmp ebx, 6
jz short loc_2867E
mov [rbp+58h], r15
mov [rbp+60h], rbx
jmp short loc_2861A
loc_28616:
mov r15, [rbp+58h]
loc_2861A:
cmp ebx, 0FFFFFFF7h
jb short loc_28684
inc dword ptr [r15]
jmp short loc_28684
loc_28624:
xorps xmm0, xmm0
lea r13, [rsp+98h+var_58]
movaps xmmword ptr [r13+10h], xmm0
movaps xmmword ptr [r13+0], xmm0
xor r14d, r14d
mov rdi, r12
mov rsi, r13
mov rdx, rbp
xor ecx, ecx
call get_exported_names
mov [rsp+98h+var_68], rbp
mov ebp, eax
mov rsi, [r13+0]
mov rdi, r12
call js_free
test ebp, ebp
jz short loc_28699
mov r13, [rsp+98h+var_48]
loc_28665:
mov rdi, r12
mov rsi, r13
call js_free
mov rdi, r12
mov rsi, r15
mov rdx, rbx
call JS_FreeValue
loc_2867E:
push 6
pop rbx
xor r15d, r15d
loc_28684:
mov rax, r15
mov rdx, rbx
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_28699:
movsxd rax, [rsp+98h+var_3C]
test eax, eax
mov edx, 0
mov [rsp+98h+var_70], rax
cmovg edx, eax
mov r13, [rsp+98h+var_48]
shl rdx, 4
mov rbp, [rsp+98h+var_68]
mov [rsp+98h+var_88], rdx
loc_286C0:
cmp rdx, r14
jz loc_28779
mov rax, [r13+r14+8]
test rax, rax
jz short loc_286DA
mov [rsp+98h+var_78], rbp
jmp short loc_2870B
loc_286DA:
mov r8d, [r13+r14+0]
mov rdi, r12
lea rsi, [rsp+98h+var_78]
lea rdx, [rsp+98h+var_60]
mov rcx, rbp
call js_resolve_export
cmp eax, 3
jz short loc_2874A
test eax, eax
jnz loc_28872
mov rax, [rsp+98h+var_60]
mov rdx, [rsp+98h+var_88]
loc_2870B:
cmp dword ptr [rax+14h], 7Eh ; '~'
jnz short loc_28731
mov dword ptr [r13+r14+4], 2
mov rcx, [rsp+98h+var_78]
mov rcx, [rcx+18h]
movsxd rax, dword ptr [rax]
shl rax, 4
mov rax, [rcx+rax+8]
jmp short loc_2876B
loc_28731:
mov dword ptr [r13+r14+4], 1
mov rcx, [rax+8]
test rcx, rcx
jz short loc_28757
mov [r13+r14+8], rcx
jmp short loc_28770
loc_2874A:
and dword ptr [r13+r14+4], 0
mov rdx, [rsp+98h+var_88]
jmp short loc_28770
loc_28757:
mov rcx, [rsp+98h+var_78]
mov rcx, [rcx+68h]
mov rcx, [rcx+38h]
movsxd rax, dword ptr [rax]
mov rax, [rcx+rax*8]
loc_2876B:
mov [r13+r14+8], rax
loc_28770:
add r14, 10h
jmp loc_286C0
loc_28779:
lea rcx, exported_names_cmp
push 10h
pop rdx
mov rdi, r13
mov rsi, [rsp+98h+var_70]
mov r8, r12
call rqsort
mov rcx, [rsp+98h+var_88]
xor r14d, r14d
mov [rsp+98h+var_80], rbx
loc_287A0:
cmp rcx, r14
jz loc_28835
mov eax, [r13+r14+4]
cmp eax, 2
jz short loc_287FC
cmp eax, 1
jnz short loc_2882C
mov rbx, r15
mov r15, [r13+r14+8]
mov ecx, [r13+r14+0]
test r15, r15
jz loc_28889
mov rdi, r12
mov rsi, rbx
mov edx, ecx
push 26h ; '&'
pop rcx
call add_property
test rax, rax
jz loc_28897
inc dword ptr [r15]
mov [rax], r15
mov r15, rbx
mov rbx, [rsp+98h+var_80]
mov rcx, [rsp+98h+var_88]
jmp short loc_2882C
loc_287FC:
mov ecx, [r13+r14+0]
mov r9, [r13+r14+8]
mov [rsp+98h+var_98], 6
mov rdi, r12
mov rsi, r15
mov rdx, rbx
push 1
pop r8
call JS_DefineAutoInitProperty
mov rcx, [rsp+98h+var_88]
test eax, eax
js loc_28665
loc_2882C:
add r14, 10h
jmp loc_287A0
loc_28835:
mov rdi, r12
mov rsi, r13
call js_free
push 7Fh
pop rsi
mov rdi, r12
call JS_AtomToString
mov r9, rdx
and [rsp+98h+var_98], 0
mov rdi, r12
mov rsi, r15
mov rdx, rbx
mov ecx, 0DAh
mov r8, rax
call JS_DefinePropertyValue
and byte ptr [r15+5], 0FEh
jmp loc_28607
loc_28872:
mov ecx, [r13+r14+0]
mov rdi, r12
mov esi, eax
mov rdx, rbp
call js_resolve_export_throw_error
jmp loc_28665
loc_28889:
push 2
pop rsi
mov rdi, r12
mov rdx, rbp
call js_resolve_export_throw_error
loc_28897:
mov r15, rbx
mov rbx, [rsp+98h+var_80]
jmp loc_28665
| long long JS_GetModuleNamespace(
long long a1,
long long a2,
double a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
long long v10; // rbp
long long v11; // rbx
long long v12; // r15
long long v13; // rdx
long long v14; // r14
int exported_names; // ebp
long long v16; // r13
long long v18; // rdx
long long v19; // rdx
int *v20; // rax
unsigned int v21; // eax
long long v22; // rax
long long v23; // rcx
long long v24; // rcx
long long v25; // r14
int v26; // eax
long long v27; // rbx
_DWORD *v28; // r15
long long v29; // rcx
_QWORD *v30; // rax
int inited; // eax
_DWORD *v32; // rax
long long v33; // rdx
__m128 v34; // xmm4
__m128 v35; // xmm5
long long v36; // [rsp+10h] [rbp-88h]
long long v37; // [rsp+18h] [rbp-80h]
long long v38; // [rsp+20h] [rbp-78h] BYREF
unsigned long long v39; // [rsp+28h] [rbp-70h]
long long v40; // [rsp+30h] [rbp-68h]
int *v41; // [rsp+38h] [rbp-60h] BYREF
__int128 v42; // [rsp+40h] [rbp-58h] BYREF
__int128 v43; // [rsp+50h] [rbp-48h]
v10 = a2;
v11 = *(_QWORD *)(a2 + 96);
if ( (_DWORD)v11 != 3 )
{
v12 = *(_QWORD *)(a2 + 88);
LABEL_6:
if ( (unsigned int)v11 >= 0xFFFFFFF7 )
++*(_DWORD *)v12;
return v12;
}
v12 = JS_NewObjectClass(a1, 11);
v11 = v13;
if ( (_DWORD)v13 == 6 )
{
LABEL_3:
if ( (_DWORD)v11 == 6 )
return 0LL;
*(_QWORD *)(v10 + 88) = v12;
*(_QWORD *)(v10 + 96) = v11;
goto LABEL_6;
}
v43 = 0LL;
v42 = 0LL;
v14 = 0LL;
v40 = a2;
exported_names = get_exported_names(a1, &v42, a2, 0LL);
js_free(a1, v42);
if ( exported_names )
{
v16 = v43;
goto LABEL_10;
}
v18 = 0LL;
v39 = SHIDWORD(v43);
if ( SHIDWORD(v43) > 0 )
v18 = HIDWORD(v43);
v16 = v43;
v19 = 16 * v18;
v10 = v40;
v36 = v19;
while ( v19 != v14 )
{
v20 = *(int **)(v16 + v14 + 8);
if ( v20 )
{
v38 = v10;
}
else
{
v21 = js_resolve_export(a1, &v38, &v41, v10, *(unsigned int *)(v16 + v14));
if ( v21 == 3 )
{
*(_DWORD *)(v16 + v14 + 4) = 0;
v19 = v36;
goto LABEL_29;
}
if ( v21 )
{
js_resolve_export_throw_error(a1, v21, v10, *(unsigned int *)(v16 + v14));
goto LABEL_10;
}
v20 = v41;
v19 = v36;
}
if ( v20[5] == 126 )
{
*(_DWORD *)(v16 + v14 + 4) = 2;
v22 = *(_QWORD *)(*(_QWORD *)(v38 + 24) + 16LL * *v20 + 8);
}
else
{
*(_DWORD *)(v16 + v14 + 4) = 1;
v23 = *((_QWORD *)v20 + 1);
if ( v23 )
{
*(_QWORD *)(v16 + v14 + 8) = v23;
goto LABEL_29;
}
v22 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(v38 + 104) + 56LL) + 8LL * *v20);
}
*(_QWORD *)(v16 + v14 + 8) = v22;
LABEL_29:
v14 += 16LL;
}
rqsort(v16, v39, 16LL, (long long ( *)(unsigned long long, unsigned long long, long long))exported_names_cmp, a1);
v24 = v36;
v25 = 0LL;
v37 = v11;
while ( 1 )
{
if ( v24 == v25 )
{
js_free(a1, v16);
v32 = (_DWORD *)JS_AtomToString(a1, 127);
JS_DefinePropertyValue(a1, v12, v11, 218LL, v32, v33, 0.0, a4, a5, a6, v34, v35, a9, a10, 0);
*(_BYTE *)(v12 + 5) &= ~1u;
goto LABEL_3;
}
v26 = *(_DWORD *)(v16 + v25 + 4);
if ( v26 == 2 )
{
inited = JS_DefineAutoInitProperty(a1, v12, v11, *(_DWORD *)(v16 + v25), 1, *(_QWORD *)(v16 + v25 + 8), 6);
v24 = v36;
if ( inited < 0 )
goto LABEL_10;
goto LABEL_38;
}
if ( v26 != 1 )
goto LABEL_38;
v27 = v12;
v28 = *(_DWORD **)(v16 + v25 + 8);
v29 = *(unsigned int *)(v16 + v25);
if ( !v28 )
break;
v30 = (_QWORD *)add_property(a1, v27, (unsigned int)v29, 38LL);
if ( !v30 )
goto LABEL_42;
++*v28;
*v30 = v28;
v12 = v27;
v11 = v37;
v24 = v36;
LABEL_38:
v25 += 16LL;
}
js_resolve_export_throw_error(a1, 2LL, v10, v29);
LABEL_42:
v12 = v27;
v11 = v37;
LABEL_10:
js_free(a1, v16);
JS_FreeValue(a1, v12, v11);
return 0LL;
}
| JS_GetModuleNamespace:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV RBP,RSI
MOV RBX,qword ptr [RSI + 0x60]
CMP EBX,0x3
JNZ 0x00128616
MOV R12,RDI
PUSH 0xb
POP RSI
CALL 0x0011a71b
MOV R15,RAX
MOV RBX,RDX
CMP EBX,0x6
JNZ 0x00128624
LAB_00128607:
CMP EBX,0x6
JZ 0x0012867e
MOV qword ptr [RBP + 0x58],R15
MOV qword ptr [RBP + 0x60],RBX
JMP 0x0012861a
LAB_00128616:
MOV R15,qword ptr [RBP + 0x58]
LAB_0012861a:
CMP EBX,-0x9
JC 0x00128684
INC dword ptr [R15]
JMP 0x00128684
LAB_00128624:
XORPS XMM0,XMM0
LEA R13,[RSP + 0x40]
MOVAPS xmmword ptr [R13 + 0x10],XMM0
MOVAPS xmmword ptr [R13],XMM0
XOR R14D,R14D
MOV RDI,R12
MOV RSI,R13
MOV RDX,RBP
XOR ECX,ECX
CALL 0x0013a61c
MOV qword ptr [RSP + 0x30],RBP
MOV EBP,EAX
MOV RSI,qword ptr [R13]
MOV RDI,R12
CALL 0x001166f2
TEST EBP,EBP
JZ 0x00128699
MOV R13,qword ptr [RSP + 0x50]
LAB_00128665:
MOV RDI,R12
MOV RSI,R13
CALL 0x001166f2
MOV RDI,R12
MOV RSI,R15
MOV RDX,RBX
CALL 0x001174a2
LAB_0012867e:
PUSH 0x6
POP RBX
XOR R15D,R15D
LAB_00128684:
MOV RAX,R15
MOV RDX,RBX
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00128699:
MOVSXD RAX,dword ptr [RSP + 0x5c]
TEST EAX,EAX
MOV EDX,0x0
MOV qword ptr [RSP + 0x28],RAX
CMOVG EDX,EAX
MOV R13,qword ptr [RSP + 0x50]
SHL RDX,0x4
MOV RBP,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x10],RDX
LAB_001286c0:
CMP RDX,R14
JZ 0x00128779
MOV RAX,qword ptr [R13 + R14*0x1 + 0x8]
TEST RAX,RAX
JZ 0x001286da
MOV qword ptr [RSP + 0x20],RBP
JMP 0x0012870b
LAB_001286da:
MOV R8D,dword ptr [R13 + R14*0x1]
MOV RDI,R12
LEA RSI,[RSP + 0x20]
LEA RDX,[RSP + 0x38]
MOV RCX,RBP
CALL 0x0013a7be
CMP EAX,0x3
JZ 0x0012874a
TEST EAX,EAX
JNZ 0x00128872
MOV RAX,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x10]
LAB_0012870b:
CMP dword ptr [RAX + 0x14],0x7e
JNZ 0x00128731
MOV dword ptr [R13 + R14*0x1 + 0x4],0x2
MOV RCX,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [RCX + 0x18]
MOVSXD RAX,dword ptr [RAX]
SHL RAX,0x4
MOV RAX,qword ptr [RCX + RAX*0x1 + 0x8]
JMP 0x0012876b
LAB_00128731:
MOV dword ptr [R13 + R14*0x1 + 0x4],0x1
MOV RCX,qword ptr [RAX + 0x8]
TEST RCX,RCX
JZ 0x00128757
MOV qword ptr [R13 + R14*0x1 + 0x8],RCX
JMP 0x00128770
LAB_0012874a:
AND dword ptr [R13 + R14*0x1 + 0x4],0x0
MOV RDX,qword ptr [RSP + 0x10]
JMP 0x00128770
LAB_00128757:
MOV RCX,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [RCX + 0x68]
MOV RCX,qword ptr [RCX + 0x38]
MOVSXD RAX,dword ptr [RAX]
MOV RAX,qword ptr [RCX + RAX*0x8]
LAB_0012876b:
MOV qword ptr [R13 + R14*0x1 + 0x8],RAX
LAB_00128770:
ADD R14,0x10
JMP 0x001286c0
LAB_00128779:
LEA RCX,[0x13a8a6]
PUSH 0x10
POP RDX
MOV RDI,R13
MOV RSI,qword ptr [RSP + 0x28]
MOV R8,R12
CALL 0x00115cc0
MOV RCX,qword ptr [RSP + 0x10]
XOR R14D,R14D
MOV qword ptr [RSP + 0x18],RBX
LAB_001287a0:
CMP RCX,R14
JZ 0x00128835
MOV EAX,dword ptr [R13 + R14*0x1 + 0x4]
CMP EAX,0x2
JZ 0x001287fc
CMP EAX,0x1
JNZ 0x0012882c
MOV RBX,R15
MOV R15,qword ptr [R13 + R14*0x1 + 0x8]
MOV ECX,dword ptr [R13 + R14*0x1]
TEST R15,R15
JZ 0x00128889
MOV RDI,R12
MOV RSI,RBX
MOV EDX,ECX
PUSH 0x26
POP RCX
CALL 0x0013419e
TEST RAX,RAX
JZ 0x00128897
INC dword ptr [R15]
MOV qword ptr [RAX],R15
MOV R15,RBX
MOV RBX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x10]
JMP 0x0012882c
LAB_001287fc:
MOV ECX,dword ptr [R13 + R14*0x1]
MOV R9,qword ptr [R13 + R14*0x1 + 0x8]
MOV dword ptr [RSP],0x6
MOV RDI,R12
MOV RSI,R15
MOV RDX,RBX
PUSH 0x1
POP R8
CALL 0x00138876
MOV RCX,qword ptr [RSP + 0x10]
TEST EAX,EAX
JS 0x00128665
LAB_0012882c:
ADD R14,0x10
JMP 0x001287a0
LAB_00128835:
MOV RDI,R12
MOV RSI,R13
CALL 0x001166f2
PUSH 0x7f
POP RSI
MOV RDI,R12
CALL 0x00119e14
MOV R9,RDX
AND dword ptr [RSP],0x0
MOV RDI,R12
MOV RSI,R15
MOV RDX,RBX
MOV ECX,0xda
MOV R8,RAX
CALL 0x0011fcf6
AND byte ptr [R15 + 0x5],0xfe
JMP 0x00128607
LAB_00128872:
MOV ECX,dword ptr [R13 + R14*0x1]
MOV RDI,R12
MOV ESI,EAX
MOV RDX,RBP
CALL 0x0013a827
JMP 0x00128665
LAB_00128889:
PUSH 0x2
POP RSI
MOV RDI,R12
MOV RDX,RBP
CALL 0x0013a827
LAB_00128897:
MOV R15,RBX
MOV RBX,qword ptr [RSP + 0x18]
JMP 0x00128665
|
int1 [16] JS_GetModuleNamespace(int8 param_1,long param_2)
{
long lVar1;
int iVar2;
int *piVar4;
int8 uVar5;
int8 *puVar6;
ulong uVar8;
long lVar9;
int1 auVar10 [16];
int1 auVar11 [16];
long local_78;
long local_70;
long local_68;
int *local_60;
int8 local_58;
int8 uStack_50;
long local_48;
int8 uStack_40;
long lVar3;
int8 uVar7;
if ((int)*(int8 *)(param_2 + 0x60) == 3) {
auVar10 = JS_NewObjectClass(param_1,0xb);
uVar7 = auVar10._8_8_;
lVar3 = auVar10._0_8_;
if (auVar10._8_4_ == 6) {
LAB_00128607:
if (auVar10._8_4_ != 6) {
*(int1 (*) [16])(param_2 + 0x58) = auVar10;
goto LAB_0012861a;
}
}
else {
local_48 = 0;
uStack_40 = 0;
local_58 = 0;
uStack_50 = 0;
lVar9 = 0;
iVar2 = get_exported_names(param_1,&local_58,param_2,0);
local_68 = param_2;
js_free(param_1,local_58);
lVar1 = local_48;
param_2 = local_68;
if (iVar2 == 0) {
local_70 = (long)(int)uStack_40._4_4_;
uVar8 = 0;
if (0 < (int)uStack_40._4_4_) {
uVar8 = (ulong)uStack_40._4_4_;
}
for (; uVar8 << 4 != lVar9; lVar9 = lVar9 + 0x10) {
piVar4 = *(int **)(lVar1 + 8 + lVar9);
if (piVar4 == (int *)0x0) {
iVar2 = js_resolve_export(param_1,&local_78,&local_60,param_2,
*(int4 *)(lVar1 + lVar9));
if (iVar2 != 3) {
piVar4 = local_60;
if (iVar2 == 0) goto LAB_0012870b;
js_resolve_export_throw_error(param_1,iVar2,param_2,*(int4 *)(lVar1 + lVar9));
goto LAB_00128665;
}
*(int4 *)(lVar1 + 4 + lVar9) = 0;
}
else {
local_78 = param_2;
LAB_0012870b:
if (piVar4[5] == 0x7e) {
*(int4 *)(lVar1 + 4 + lVar9) = 2;
uVar5 = *(int8 *)(*(long *)(local_78 + 0x18) + 8 + (long)*piVar4 * 0x10);
}
else {
*(int4 *)(lVar1 + 4 + lVar9) = 1;
if (*(long *)(piVar4 + 2) != 0) {
*(long *)(lVar1 + 8 + lVar9) = *(long *)(piVar4 + 2);
goto LAB_00128770;
}
uVar5 = *(int8 *)
(*(long *)(*(long *)(local_78 + 0x68) + 0x38) + (long)*piVar4 * 8);
}
*(int8 *)(lVar1 + 8 + lVar9) = uVar5;
}
LAB_00128770:
}
rqsort(lVar1,local_70,0x10,exported_names_cmp,param_1);
for (lVar9 = 0; uVar8 << 4 != lVar9; lVar9 = lVar9 + 0x10) {
iVar2 = *(int *)(lVar1 + 4 + lVar9);
if (iVar2 == 2) {
iVar2 = JS_DefineAutoInitProperty
(param_1,lVar3,uVar7,*(int4 *)(lVar1 + lVar9),1,
*(int8 *)(lVar1 + 8 + lVar9),6);
if (iVar2 < 0) goto LAB_00128665;
}
else if (iVar2 == 1) {
piVar4 = *(int **)(lVar1 + 8 + lVar9);
if (piVar4 == (int *)0x0) {
js_resolve_export_throw_error(param_1,2,param_2);
goto LAB_00128665;
}
puVar6 = (int8 *)add_property(param_1,lVar3,*(int4 *)(lVar1 + lVar9),0x26);
if (puVar6 == (int8 *)0x0) goto LAB_00128665;
*piVar4 = *piVar4 + 1;
*puVar6 = piVar4;
}
}
js_free(param_1,lVar1);
auVar11 = JS_AtomToString(param_1,0x7f);
JS_DefinePropertyValue(param_1,lVar3,uVar7,0xda,auVar11._0_8_,auVar11._8_8_,0);
*(byte *)(lVar3 + 5) = *(byte *)(lVar3 + 5) & 0xfe;
goto LAB_00128607;
}
LAB_00128665:
js_free(param_1,lVar1);
JS_FreeValue(param_1,lVar3,uVar7);
}
auVar10 = ZEXT816(6) << 0x40;
}
else {
auVar10._8_8_ = *(int8 *)(param_2 + 0x60);
auVar10._0_8_ = *(int8 *)(param_2 + 0x58);
LAB_0012861a:
if (0xfffffff6 < auVar10._8_4_) {
*auVar10._0_8_ = *auVar10._0_8_ + 1;
}
}
return auVar10;
}
| |
33,584 | JS_GetModuleNamespace | bluesky950520[P]quickjs/quickjs.c | JSValue JS_GetModuleNamespace(JSContext *ctx, JSModuleDef *m)
{
if (JS_IsUndefined(m->module_ns)) {
JSValue val;
val = js_build_module_ns(ctx, m);
if (JS_IsException(val))
return JS_EXCEPTION;
m->module_ns = val;
}
return js_dup(m->module_ns);
} | O3 | c | JS_GetModuleNamespace:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r12
movq 0x60(%rsi), %rbx
cmpl $0x3, %ebx
jne 0x30f92
movq %rdi, %r14
movq 0x40(%rdi), %rax
movq 0xb0(%rax), %rsi
movq 0xb8(%rax), %rdx
movl $0xb, %ecx
callq 0x20a15
movq %rax, %r15
movq %rdx, %rbx
movl %ebx, %eax
cmpq $0x6, %rax
je 0x30f88
movq %rax, 0x30(%rsp)
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %r13
movaps %xmm0, 0x10(%r13)
movaps %xmm0, (%r13)
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x4459b
movl %eax, %ebp
movq (%r13), %rsi
movq %r14, 0x10(%rsp)
movq %r14, %rdi
callq 0x1c845
testl %ebp, %ebp
je 0x30fb4
movq 0x50(%rsp), %r13
movq 0x10(%rsp), %rbp
movq %rbp, %rdi
movq %r13, %rsi
callq 0x1c845
cmpl $-0x9, %ebx
jb 0x30f88
movq 0x18(%rbp), %rdi
movl (%r15), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r15)
cmpl $0x1, %eax
jg 0x30f88
movq %r15, %rsi
movq %rbx, %rdx
callq 0x20d90
movl $0x6, %ebx
xorl %r15d, %r15d
jmp 0x30f9f
movq 0x58(%r12), %r15
cmpl $-0x9, %ebx
jb 0x30f9f
incl (%r15)
movq %r15, %rax
movq %rbx, %rdx
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movslq 0x5c(%rsp), %rsi
movq 0x50(%rsp), %r13
testq %rsi, %rsi
jle 0x31153
movq %rsi, 0x28(%rsp)
movq %rsi, %rdx
shlq $0x4, %rdx
xorl %r14d, %r14d
movq 0x10(%rsp), %rbp
movq %rdx, 0x18(%rsp)
movq 0x8(%r13,%r14), %rax
testq %rax, %rax
je 0x30ff1
movq %r12, 0x20(%rsp)
jmp 0x31022
movl (%r13,%r14), %r8d
movq %rbp, %rdi
leaq 0x20(%rsp), %rsi
leaq 0x38(%rsp), %rdx
movq %r12, %rcx
callq 0x44755
cmpl $0x3, %eax
je 0x31061
testl %eax, %eax
movq 0x18(%rsp), %rdx
jne 0x311f6
movq 0x38(%rsp), %rax
cmpl $0x7e, 0x14(%rax)
jne 0x31048
movl $0x2, 0x4(%r13,%r14)
movq 0x20(%rsp), %rcx
movq 0x18(%rcx), %rcx
movslq (%rax), %rax
shlq $0x4, %rax
movq 0x8(%rcx,%rax), %rax
jmp 0x31085
movl $0x1, 0x4(%r13,%r14)
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0x31071
movq %rcx, 0x8(%r13,%r14)
jmp 0x3108a
movl $0x0, 0x4(%r13,%r14)
movq 0x18(%rsp), %rdx
jmp 0x3108a
movq 0x20(%rsp), %rcx
movq 0x68(%rcx), %rcx
movq 0x38(%rcx), %rcx
movslq (%rax), %rax
movq (%rcx,%rax,8), %rax
movq %rax, 0x8(%r13,%r14)
addq $0x10, %r14
cmpq %r14, %rdx
jne 0x30fe0
leaq 0x1379e(%rip), %rcx # 0x4483c
movl $0x10, %edx
movq %r13, %rdi
movq 0x28(%rsp), %rsi
movq %rbp, %r8
callq 0x1bcf8
movq 0x18(%rsp), %rcx
xorl %r14d, %r14d
movl 0x4(%r13,%r14), %eax
cmpl $0x2, %eax
je 0x31112
cmpl $0x1, %eax
jne 0x31144
movq %r15, %rbp
movq 0x8(%r13,%r14), %r15
movl (%r13,%r14), %ecx
testq %r15, %r15
je 0x3120d
movq 0x10(%rsp), %rdi
movq %rbp, %rsi
movl %ecx, %edx
movl $0x26, %ecx
callq 0x3c9b8
testq %rax, %rax
je 0x3122d
incl (%r15)
movq %r15, (%rax)
movq %rbp, %r15
movq 0x10(%rsp), %rbp
movq 0x18(%rsp), %rcx
jmp 0x31144
movl (%r13,%r14), %ecx
movq 0x8(%r13,%r14), %r9
movl $0x6, (%rsp)
movq %rbp, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movl $0x1, %r8d
callq 0x422ab
movq 0x18(%rsp), %rcx
testl %eax, %eax
js 0x30f5b
addq $0x10, %r14
cmpq %r14, %rcx
jne 0x310bb
jmp 0x3116f
leaq 0x136e2(%rip), %rcx # 0x4483c
movl $0x10, %edx
movq %r13, %rdi
movq 0x10(%rsp), %rbp
movq %rbp, %r8
callq 0x1bcf8
movq %rbp, %rdi
movq %r13, %rsi
callq 0x1c845
movq 0x18(%rbp), %rax
movq 0x68(%rax), %rax
movq 0x3f8(%rax), %r8
movq 0x4(%r8), %rcx
movq %rcx, %rdx
shrq $0x3e, %rdx
cmpl $0x1, %edx
sete %dl
negl %ecx
setno %cl
orb %dl, %cl
jne 0x311aa
movq 0x178(%rax), %r8
incl (%r8)
movl $0x0, (%rsp)
movq %rbp, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movl $0xda, %ecx
movq $-0x7, %r9
callq 0x26541
andb $-0x2, 0x5(%r15)
cmpl $0x6, 0x30(%rsp)
jne 0x311e7
xorl %r15d, %r15d
movl $0x6, %ebx
jmp 0x30f9f
movq %r15, 0x58(%r12)
movq %rbx, 0x60(%r12)
jmp 0x30f97
movl (%r13,%r14), %ecx
movq %rbp, %rdi
movl %eax, %esi
movq %r12, %rdx
callq 0x447bb
jmp 0x30f5b
movq 0x10(%rsp), %r14
movq %r14, %rdi
movl $0x2, %esi
movq %r12, %rdx
callq 0x447bb
movq %rbp, %r15
movq %r14, %rbp
jmp 0x30f5b
movq %rbp, %r15
jmp 0x30f56
| JS_GetModuleNamespace:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov r12, rsi
mov rbx, [rsi+60h]
cmp ebx, 3
jnz loc_30F92
mov r14, rdi
mov rax, [rdi+40h]
mov rsi, [rax+0B0h]
mov rdx, [rax+0B8h]
mov ecx, 0Bh
call JS_NewObjectProtoClass
mov r15, rax
mov rbx, rdx
mov eax, ebx
cmp rax, 6
jz short loc_30F88
mov [rsp+98h+var_68], rax
xorps xmm0, xmm0
lea r13, [rsp+98h+var_58]
movaps xmmword ptr [r13+10h], xmm0
movaps xmmword ptr [r13+0], xmm0
mov rdi, r14
mov rsi, r13
mov rdx, r12
xor ecx, ecx
call get_exported_names
mov ebp, eax
mov rsi, [r13+0]
mov [rsp+98h+var_88], r14
mov rdi, r14
call js_free
test ebp, ebp
jz short loc_30FB4
mov r13, [rsp+98h+var_48]
loc_30F56:
mov rbp, [rsp+98h+var_88]
loc_30F5B:
mov rdi, rbp
mov rsi, r13
call js_free
cmp ebx, 0FFFFFFF7h
jb short loc_30F88
mov rdi, [rbp+18h]
mov eax, [r15]
lea ecx, [rax-1]
mov [r15], ecx
cmp eax, 1
jg short loc_30F88
mov rsi, r15
mov rdx, rbx
call js_free_value_rt
loc_30F88:
mov ebx, 6
xor r15d, r15d
jmp short loc_30F9F
loc_30F92:
mov r15, [r12+58h]
loc_30F97:
cmp ebx, 0FFFFFFF7h
jb short loc_30F9F
inc dword ptr [r15]
loc_30F9F:
mov rax, r15
mov rdx, rbx
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_30FB4:
movsxd rsi, [rsp+98h+var_3C]
mov r13, [rsp+98h+var_48]
test rsi, rsi
jle loc_31153
mov [rsp+98h+var_70], rsi
mov rdx, rsi
shl rdx, 4
xor r14d, r14d
mov rbp, [rsp+98h+var_88]
mov [rsp+98h+var_80], rdx
loc_30FE0:
mov rax, [r13+r14+8]
test rax, rax
jz short loc_30FF1
mov [rsp+98h+var_78], r12
jmp short loc_31022
loc_30FF1:
mov r8d, [r13+r14+0]
mov rdi, rbp
lea rsi, [rsp+98h+var_78]
lea rdx, [rsp+98h+var_60]
mov rcx, r12
call js_resolve_export
cmp eax, 3
jz short loc_31061
test eax, eax
mov rdx, [rsp+98h+var_80]
jnz loc_311F6
mov rax, [rsp+98h+var_60]
loc_31022:
cmp dword ptr [rax+14h], 7Eh ; '~'
jnz short loc_31048
mov dword ptr [r13+r14+4], 2
mov rcx, [rsp+98h+var_78]
mov rcx, [rcx+18h]
movsxd rax, dword ptr [rax]
shl rax, 4
mov rax, [rcx+rax+8]
jmp short loc_31085
loc_31048:
mov dword ptr [r13+r14+4], 1
mov rcx, [rax+8]
test rcx, rcx
jz short loc_31071
mov [r13+r14+8], rcx
jmp short loc_3108A
loc_31061:
mov dword ptr [r13+r14+4], 0
mov rdx, [rsp+98h+var_80]
jmp short loc_3108A
loc_31071:
mov rcx, [rsp+98h+var_78]
mov rcx, [rcx+68h]
mov rcx, [rcx+38h]
movsxd rax, dword ptr [rax]
mov rax, [rcx+rax*8]
loc_31085:
mov [r13+r14+8], rax
loc_3108A:
add r14, 10h
cmp rdx, r14
jnz loc_30FE0
lea rcx, exported_names_cmp
mov edx, 10h
mov rdi, r13
mov rsi, [rsp+98h+var_70]
mov r8, rbp
call rqsort
mov rcx, [rsp+98h+var_80]
xor r14d, r14d
loc_310BB:
mov eax, [r13+r14+4]
cmp eax, 2
jz short loc_31112
cmp eax, 1
jnz short loc_31144
mov rbp, r15
mov r15, [r13+r14+8]
mov ecx, [r13+r14+0]
test r15, r15
jz loc_3120D
mov rdi, [rsp+98h+var_88]
mov rsi, rbp
mov edx, ecx
mov ecx, 26h ; '&'
call add_property
test rax, rax
jz loc_3122D
inc dword ptr [r15]
mov [rax], r15
mov r15, rbp
mov rbp, [rsp+98h+var_88]
mov rcx, [rsp+98h+var_80]
jmp short loc_31144
loc_31112:
mov ecx, [r13+r14+0]
mov r9, [r13+r14+8]
mov [rsp+98h+var_98], 6
mov rdi, rbp
mov rsi, r15
mov rdx, rbx
mov r8d, 1
call JS_DefineAutoInitProperty
mov rcx, [rsp+98h+var_80]
test eax, eax
js loc_30F5B
loc_31144:
add r14, 10h
cmp rcx, r14
jnz loc_310BB
jmp short loc_3116F
loc_31153:
lea rcx, exported_names_cmp
mov edx, 10h
mov rdi, r13
mov rbp, [rsp+98h+var_88]
mov r8, rbp
call rqsort
loc_3116F:
mov rdi, rbp
mov rsi, r13
call js_free
mov rax, [rbp+18h]
mov rax, [rax+68h]
mov r8, [rax+3F8h]
mov rcx, [r8+4]
mov rdx, rcx
shr rdx, 3Eh
cmp edx, 1
setz dl
neg ecx
setno cl
or cl, dl
jnz short loc_311AA
mov r8, [rax+178h]
loc_311AA:
inc dword ptr [r8]
mov [rsp+98h+var_98], 0
mov rdi, rbp
mov rsi, r15
mov rdx, rbx
mov ecx, 0DAh
mov r9, 0FFFFFFFFFFFFFFF9h
call JS_DefinePropertyValue
and byte ptr [r15+5], 0FEh
cmp dword ptr [rsp+98h+var_68], 6
jnz short loc_311E7
xor r15d, r15d
mov ebx, 6
jmp loc_30F9F
loc_311E7:
mov [r12+58h], r15
mov [r12+60h], rbx
jmp loc_30F97
loc_311F6:
mov ecx, [r13+r14+0]
mov rdi, rbp
mov esi, eax
mov rdx, r12
call js_resolve_export_throw_error
jmp loc_30F5B
loc_3120D:
mov r14, [rsp+98h+var_88]
mov rdi, r14
mov esi, 2
mov rdx, r12
call js_resolve_export_throw_error
mov r15, rbp
mov rbp, r14
jmp loc_30F5B
loc_3122D:
mov r15, rbp
jmp loc_30F56
| long long JS_GetModuleNamespace(
long long a1,
long long a2,
double a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
long long v10; // rbx
long long v11; // rdx
long long v12; // r15
int exported_names; // ebp
long long v14; // r13
long long v15; // rbp
long long v16; // r8
long long v17; // r9
long long v18; // rdi
int v19; // eax
long long v20; // rcx
long long v22; // rdx
long long v23; // r14
int *v24; // rax
unsigned int v25; // eax
long long v26; // rax
long long v27; // rcx
long long v28; // rcx
long long v29; // r14
int v30; // eax
long long v31; // rbp
_DWORD *v32; // r15
long long v33; // rcx
_QWORD *v34; // rax
int inited; // eax
__m128 v36; // xmm4
__m128 v37; // xmm5
long long v38; // rax
long long v39; // r8
long long v40; // [rsp+18h] [rbp-80h]
long long v41; // [rsp+20h] [rbp-78h] BYREF
unsigned long long v42; // [rsp+28h] [rbp-70h]
long long v43; // [rsp+30h] [rbp-68h]
int *v44; // [rsp+38h] [rbp-60h] BYREF
__int128 v45; // [rsp+40h] [rbp-58h] BYREF
__int128 v46; // [rsp+50h] [rbp-48h]
v10 = *(_QWORD *)(a2 + 96);
if ( (_DWORD)v10 != 3 )
{
v12 = *(_QWORD *)(a2 + 88);
LABEL_11:
if ( (unsigned int)v10 >= 0xFFFFFFF7 )
++*(_DWORD *)v12;
return v12;
}
v12 = JS_NewObjectProtoClass(
a1,
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 176LL),
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 184LL),
0xBu);
v10 = v11;
if ( (unsigned int)v11 == 6LL )
return 0LL;
v43 = (unsigned int)v11;
v46 = 0LL;
v45 = 0LL;
exported_names = get_exported_names(a1, &v45, a2, 0LL);
js_free(a1, v45);
if ( exported_names )
{
v14 = v46;
goto LABEL_5;
}
v14 = v46;
if ( SHIDWORD(v46) <= 0 )
{
v15 = a1;
rqsort(
v46,
SHIDWORD(v46),
16LL,
(long long ( *)(unsigned long long, unsigned long long, long long))exported_names_cmp,
a1);
LABEL_39:
js_free(v15, v14);
v38 = *(_QWORD *)(*(_QWORD *)(v15 + 24) + 104LL);
v39 = *(_QWORD *)(v38 + 1016);
if ( !((*(_QWORD *)(v39 + 4) >> 62 == 1) | !__OFSUB__(-(int)*(_QWORD *)(v39 + 4), 1)) )
v39 = *(_QWORD *)(v38 + 376);
++*(_DWORD *)v39;
JS_DefinePropertyValue(v15, v12, v10, 218LL, (int *)v39, -7LL, 0.0, a4, a5, a6, v36, v37, a9, a10, 0);
*(_BYTE *)(v12 + 5) &= ~1u;
if ( (_DWORD)v43 == 6 )
return 0LL;
*(_QWORD *)(a2 + 88) = v12;
*(_QWORD *)(a2 + 96) = v10;
goto LABEL_11;
}
v42 = SHIDWORD(v46);
v22 = 16LL * SHIDWORD(v46);
v23 = 0LL;
v15 = a1;
v40 = v22;
do
{
v24 = *(int **)(v14 + v23 + 8);
if ( v24 )
{
v41 = a2;
}
else
{
v25 = js_resolve_export(a1, &v41, &v44, a2, *(unsigned int *)(v14 + v23));
if ( v25 == 3 )
{
*(_DWORD *)(v14 + v23 + 4) = 0;
v22 = v40;
goto LABEL_28;
}
v22 = v40;
if ( v25 )
{
js_resolve_export_throw_error(a1, v25, a2, *(unsigned int *)(v14 + v23));
goto LABEL_6;
}
v24 = v44;
}
if ( v24[5] == 126 )
{
*(_DWORD *)(v14 + v23 + 4) = 2;
v26 = *(_QWORD *)(*(_QWORD *)(v41 + 24) + 16LL * *v24 + 8);
}
else
{
*(_DWORD *)(v14 + v23 + 4) = 1;
v27 = *((_QWORD *)v24 + 1);
if ( v27 )
{
*(_QWORD *)(v14 + v23 + 8) = v27;
goto LABEL_28;
}
v26 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(v41 + 104) + 56LL) + 8LL * *v24);
}
*(_QWORD *)(v14 + v23 + 8) = v26;
LABEL_28:
v23 += 16LL;
}
while ( v22 != v23 );
rqsort(v14, v42, 16LL, (long long ( *)(unsigned long long, unsigned long long, long long))exported_names_cmp, a1);
v28 = v40;
v29 = 0LL;
while ( 1 )
{
v30 = *(_DWORD *)(v14 + v29 + 4);
if ( v30 == 2 )
{
inited = JS_DefineAutoInitProperty(v15, v12, v10, *(_DWORD *)(v14 + v29), 1, *(_QWORD *)(v14 + v29 + 8), 6);
v28 = v40;
if ( inited < 0 )
goto LABEL_6;
goto LABEL_36;
}
if ( v30 == 1 )
break;
LABEL_36:
v29 += 16LL;
if ( v28 == v29 )
goto LABEL_39;
}
v31 = v12;
v32 = *(_DWORD **)(v14 + v29 + 8);
v33 = *(unsigned int *)(v14 + v29);
if ( !v32 )
{
js_resolve_export_throw_error(a1, 2LL, a2, v33);
v12 = v31;
v15 = a1;
goto LABEL_6;
}
v34 = (_QWORD *)add_property(a1, v31, (unsigned int)v33, 38LL);
if ( v34 )
{
++*v32;
*v34 = v32;
v12 = v31;
v15 = a1;
v28 = v40;
goto LABEL_36;
}
v12 = v31;
LABEL_5:
v15 = a1;
LABEL_6:
js_free(v15, v14);
if ( (unsigned int)v10 >= 0xFFFFFFF7 )
{
v18 = *(_QWORD *)(v15 + 24);
v19 = *(_DWORD *)v12;
v20 = (unsigned int)(*(_DWORD *)v12 - 1);
*(_DWORD *)v12 = v20;
if ( v19 <= 1 )
js_free_value_rt(v18, (_QWORD *)v12, v10, v20, v16, v17);
}
return 0LL;
}
| JS_GetModuleNamespace:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R12,RSI
MOV RBX,qword ptr [RSI + 0x60]
CMP EBX,0x3
JNZ 0x00130f92
MOV R14,RDI
MOV RAX,qword ptr [RDI + 0x40]
MOV RSI,qword ptr [RAX + 0xb0]
MOV RDX,qword ptr [RAX + 0xb8]
MOV ECX,0xb
CALL 0x00120a15
MOV R15,RAX
MOV RBX,RDX
MOV EAX,EBX
CMP RAX,0x6
JZ 0x00130f88
MOV qword ptr [RSP + 0x30],RAX
XORPS XMM0,XMM0
LEA R13,[RSP + 0x40]
MOVAPS xmmword ptr [R13 + 0x10],XMM0
MOVAPS xmmword ptr [R13],XMM0
MOV RDI,R14
MOV RSI,R13
MOV RDX,R12
XOR ECX,ECX
CALL 0x0014459b
MOV EBP,EAX
MOV RSI,qword ptr [R13]
MOV qword ptr [RSP + 0x10],R14
MOV RDI,R14
CALL 0x0011c845
TEST EBP,EBP
JZ 0x00130fb4
MOV R13,qword ptr [RSP + 0x50]
LAB_00130f56:
MOV RBP,qword ptr [RSP + 0x10]
LAB_00130f5b:
MOV RDI,RBP
MOV RSI,R13
CALL 0x0011c845
CMP EBX,-0x9
JC 0x00130f88
MOV RDI,qword ptr [RBP + 0x18]
MOV EAX,dword ptr [R15]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R15],ECX
CMP EAX,0x1
JG 0x00130f88
MOV RSI,R15
MOV RDX,RBX
CALL 0x00120d90
LAB_00130f88:
MOV EBX,0x6
XOR R15D,R15D
JMP 0x00130f9f
LAB_00130f92:
MOV R15,qword ptr [R12 + 0x58]
LAB_00130f97:
CMP EBX,-0x9
JC 0x00130f9f
INC dword ptr [R15]
LAB_00130f9f:
MOV RAX,R15
MOV RDX,RBX
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00130fb4:
MOVSXD RSI,dword ptr [RSP + 0x5c]
MOV R13,qword ptr [RSP + 0x50]
TEST RSI,RSI
JLE 0x00131153
MOV qword ptr [RSP + 0x28],RSI
MOV RDX,RSI
SHL RDX,0x4
XOR R14D,R14D
MOV RBP,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x18],RDX
LAB_00130fe0:
MOV RAX,qword ptr [R13 + R14*0x1 + 0x8]
TEST RAX,RAX
JZ 0x00130ff1
MOV qword ptr [RSP + 0x20],R12
JMP 0x00131022
LAB_00130ff1:
MOV R8D,dword ptr [R13 + R14*0x1]
MOV RDI,RBP
LEA RSI,[RSP + 0x20]
LEA RDX,[RSP + 0x38]
MOV RCX,R12
CALL 0x00144755
CMP EAX,0x3
JZ 0x00131061
TEST EAX,EAX
MOV RDX,qword ptr [RSP + 0x18]
JNZ 0x001311f6
MOV RAX,qword ptr [RSP + 0x38]
LAB_00131022:
CMP dword ptr [RAX + 0x14],0x7e
JNZ 0x00131048
MOV dword ptr [R13 + R14*0x1 + 0x4],0x2
MOV RCX,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [RCX + 0x18]
MOVSXD RAX,dword ptr [RAX]
SHL RAX,0x4
MOV RAX,qword ptr [RCX + RAX*0x1 + 0x8]
JMP 0x00131085
LAB_00131048:
MOV dword ptr [R13 + R14*0x1 + 0x4],0x1
MOV RCX,qword ptr [RAX + 0x8]
TEST RCX,RCX
JZ 0x00131071
MOV qword ptr [R13 + R14*0x1 + 0x8],RCX
JMP 0x0013108a
LAB_00131061:
MOV dword ptr [R13 + R14*0x1 + 0x4],0x0
MOV RDX,qword ptr [RSP + 0x18]
JMP 0x0013108a
LAB_00131071:
MOV RCX,qword ptr [RSP + 0x20]
MOV RCX,qword ptr [RCX + 0x68]
MOV RCX,qword ptr [RCX + 0x38]
MOVSXD RAX,dword ptr [RAX]
MOV RAX,qword ptr [RCX + RAX*0x8]
LAB_00131085:
MOV qword ptr [R13 + R14*0x1 + 0x8],RAX
LAB_0013108a:
ADD R14,0x10
CMP RDX,R14
JNZ 0x00130fe0
LEA RCX,[0x14483c]
MOV EDX,0x10
MOV RDI,R13
MOV RSI,qword ptr [RSP + 0x28]
MOV R8,RBP
CALL 0x0011bcf8
MOV RCX,qword ptr [RSP + 0x18]
XOR R14D,R14D
LAB_001310bb:
MOV EAX,dword ptr [R13 + R14*0x1 + 0x4]
CMP EAX,0x2
JZ 0x00131112
CMP EAX,0x1
JNZ 0x00131144
MOV RBP,R15
MOV R15,qword ptr [R13 + R14*0x1 + 0x8]
MOV ECX,dword ptr [R13 + R14*0x1]
TEST R15,R15
JZ 0x0013120d
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,RBP
MOV EDX,ECX
MOV ECX,0x26
CALL 0x0013c9b8
TEST RAX,RAX
JZ 0x0013122d
INC dword ptr [R15]
MOV qword ptr [RAX],R15
MOV R15,RBP
MOV RBP,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x18]
JMP 0x00131144
LAB_00131112:
MOV ECX,dword ptr [R13 + R14*0x1]
MOV R9,qword ptr [R13 + R14*0x1 + 0x8]
MOV dword ptr [RSP],0x6
MOV RDI,RBP
MOV RSI,R15
MOV RDX,RBX
MOV R8D,0x1
CALL 0x001422ab
MOV RCX,qword ptr [RSP + 0x18]
TEST EAX,EAX
JS 0x00130f5b
LAB_00131144:
ADD R14,0x10
CMP RCX,R14
JNZ 0x001310bb
JMP 0x0013116f
LAB_00131153:
LEA RCX,[0x14483c]
MOV EDX,0x10
MOV RDI,R13
MOV RBP,qword ptr [RSP + 0x10]
MOV R8,RBP
CALL 0x0011bcf8
LAB_0013116f:
MOV RDI,RBP
MOV RSI,R13
CALL 0x0011c845
MOV RAX,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RAX + 0x68]
MOV R8,qword ptr [RAX + 0x3f8]
MOV RCX,qword ptr [R8 + 0x4]
MOV RDX,RCX
SHR RDX,0x3e
CMP EDX,0x1
SETZ DL
NEG ECX
SETNO CL
OR CL,DL
JNZ 0x001311aa
MOV R8,qword ptr [RAX + 0x178]
LAB_001311aa:
INC dword ptr [R8]
MOV dword ptr [RSP],0x0
MOV RDI,RBP
MOV RSI,R15
MOV RDX,RBX
MOV ECX,0xda
MOV R9,-0x7
CALL 0x00126541
AND byte ptr [R15 + 0x5],0xfe
CMP dword ptr [RSP + 0x30],0x6
JNZ 0x001311e7
XOR R15D,R15D
MOV EBX,0x6
JMP 0x00130f9f
LAB_001311e7:
MOV qword ptr [R12 + 0x58],R15
MOV qword ptr [R12 + 0x60],RBX
JMP 0x00130f97
LAB_001311f6:
MOV ECX,dword ptr [R13 + R14*0x1]
MOV RDI,RBP
MOV ESI,EAX
MOV RDX,R12
CALL 0x001447bb
JMP 0x00130f5b
LAB_0013120d:
MOV R14,qword ptr [RSP + 0x10]
MOV RDI,R14
MOV ESI,0x2
MOV RDX,R12
CALL 0x001447bb
MOV R15,RBP
MOV RBP,R14
JMP 0x00130f5b
LAB_0013122d:
MOV R15,RBP
JMP 0x00130f56
|
/* WARNING: Removing unreachable block (ram,0x001311a3) */
int1 [16] JS_GetModuleNamespace(long param_1,long param_2)
{
long lVar1;
long lVar2;
int iVar3;
int *piVar5;
int8 uVar6;
int8 *puVar7;
long lVar9;
long lVar10;
int1 auVar11 [16];
long local_78;
long local_70;
ulong local_68;
int *local_60;
int8 local_58;
int8 uStack_50;
long local_48;
int8 uStack_40;
int *piVar4;
ulong uVar8;
if ((int)*(int8 *)(param_2 + 0x60) == 3) {
auVar11 = JS_NewObjectProtoClass
(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0xb0),
*(int8 *)(*(long *)(param_1 + 0x40) + 0xb8),0xb);
uVar8 = auVar11._8_8_;
piVar4 = auVar11._0_8_;
local_68 = uVar8 & 0xffffffff;
if (local_68 != 6) {
local_48 = 0;
uStack_40 = 0;
local_58 = 0;
uStack_50 = 0;
iVar3 = get_exported_names(param_1,&local_58,param_2,0);
js_free(param_1,local_58);
lVar1 = local_48;
if (iVar3 == 0) {
lVar9 = (long)uStack_40._4_4_;
if (lVar9 < 1) {
rqsort(local_48,lVar9,0x10,exported_names_cmp,param_1);
}
else {
lVar10 = 0;
local_70 = lVar9;
do {
piVar5 = *(int **)(lVar1 + 8 + lVar10);
lVar2 = param_2;
if (piVar5 == (int *)0x0) {
iVar3 = js_resolve_export(param_1,&local_78,&local_60,param_2,
*(int4 *)(lVar1 + lVar10));
if (iVar3 != 3) {
piVar5 = local_60;
lVar2 = local_78;
if (iVar3 == 0) goto LAB_00131022;
js_resolve_export_throw_error(param_1,iVar3,param_2,*(int4 *)(lVar1 + lVar10))
;
goto LAB_00130f5b;
}
*(int4 *)(lVar1 + 4 + lVar10) = 0;
}
else {
LAB_00131022:
local_78 = lVar2;
if (piVar5[5] == 0x7e) {
*(int4 *)(lVar1 + 4 + lVar10) = 2;
uVar6 = *(int8 *)(*(long *)(local_78 + 0x18) + 8 + (long)*piVar5 * 0x10);
}
else {
*(int4 *)(lVar1 + 4 + lVar10) = 1;
if (*(long *)(piVar5 + 2) != 0) {
*(long *)(lVar1 + 8 + lVar10) = *(long *)(piVar5 + 2);
goto LAB_0013108a;
}
uVar6 = *(int8 *)
(*(long *)(*(long *)(local_78 + 0x68) + 0x38) + (long)*piVar5 * 8);
}
*(int8 *)(lVar1 + 8 + lVar10) = uVar6;
}
LAB_0013108a:
lVar10 = lVar10 + 0x10;
} while (lVar9 << 4 != lVar10);
rqsort(lVar1,local_70,0x10,exported_names_cmp,param_1);
lVar10 = 0;
do {
iVar3 = *(int *)(lVar1 + 4 + lVar10);
if (iVar3 == 2) {
iVar3 = JS_DefineAutoInitProperty
(param_1,piVar4,uVar8,*(int4 *)(lVar1 + lVar10),1,
*(int8 *)(lVar1 + 8 + lVar10),6);
if (iVar3 < 0) goto LAB_00130f5b;
}
else if (iVar3 == 1) {
piVar5 = *(int **)(lVar1 + 8 + lVar10);
if (piVar5 == (int *)0x0) {
js_resolve_export_throw_error(param_1,2,param_2);
goto LAB_00130f5b;
}
puVar7 = (int8 *)
add_property(param_1,piVar4,*(int4 *)(lVar1 + lVar10),0x26);
if (puVar7 == (int8 *)0x0) goto LAB_00130f5b;
*piVar5 = *piVar5 + 1;
*puVar7 = piVar5;
}
lVar10 = lVar10 + 0x10;
} while (lVar9 << 4 != lVar10);
}
js_free(param_1,lVar1);
piVar5 = *(int **)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) + 0x3f8);
*piVar5 = *piVar5 + 1;
JS_DefinePropertyValue(param_1,piVar4,uVar8,0xda,piVar5,0xfffffffffffffff9,0);
*(byte *)((long)piVar4 + 5) = *(byte *)((long)piVar4 + 5) & 0xfe;
if ((int)local_68 == 6) {
return ZEXT816(6) << 0x40;
}
*(int1 (*) [16])(param_2 + 0x58) = auVar11;
goto LAB_00130f97;
}
LAB_00130f5b:
js_free(param_1,lVar1);
if (0xfffffff6 < auVar11._8_4_) {
uVar6 = *(int8 *)(param_1 + 0x18);
iVar3 = *piVar4;
*piVar4 = iVar3 + -1;
if (iVar3 < 2) {
js_free_value_rt(uVar6,piVar4,uVar8);
}
}
}
auVar11 = ZEXT816(6) << 0x40;
}
else {
auVar11._8_8_ = *(int8 *)(param_2 + 0x60);
auVar11._0_8_ = *(int8 *)(param_2 + 0x58);
LAB_00130f97:
if (0xfffffff6 < auVar11._8_4_) {
*auVar11._0_8_ = *auVar11._0_8_ + 1;
}
}
return auVar11;
}
| |
33,585 | js_compile_regexp | bluesky950520[P]quickjs/quickjs.c | static JSValue js_compile_regexp(JSContext *ctx, JSValue pattern,
JSValue flags)
{
const char *str;
int re_flags, mask;
uint8_t *re_bytecode_buf;
size_t i, len;
int re_bytecode_len;
JSValue ret;
char error_msg[64];
re_flags = 0;
if (!JS_IsUndefined(flags)) {
str = JS_ToCStringLen(ctx, &len, flags);
if (!str)
return JS_EXCEPTION;
/* XXX: re_flags = LRE_FLAG_OCTAL unless strict mode? */
for (i = 0; i < len; i++) {
switch(str[i]) {
case 'd':
mask = LRE_FLAG_INDICES;
break;
case 'g':
mask = LRE_FLAG_GLOBAL;
break;
case 'i':
mask = LRE_FLAG_IGNORECASE;
break;
case 'm':
mask = LRE_FLAG_MULTILINE;
break;
case 's':
mask = LRE_FLAG_DOTALL;
break;
case 'u':
mask = LRE_FLAG_UNICODE;
break;
case 'v':
mask = LRE_FLAG_UNICODE_SETS;
break;
case 'y':
mask = LRE_FLAG_STICKY;
break;
default:
goto bad_flags;
}
if ((re_flags & mask) != 0) {
bad_flags:
JS_FreeCString(ctx, str);
return JS_ThrowSyntaxError(ctx, "invalid regular expression flags");
}
re_flags |= mask;
}
JS_FreeCString(ctx, str);
}
if (re_flags & LRE_FLAG_UNICODE)
if (re_flags & LRE_FLAG_UNICODE_SETS)
return JS_ThrowSyntaxError(ctx, "invalid regular expression flags");
str = JS_ToCStringLen2(ctx, &len, pattern, !(re_flags & LRE_FLAG_UNICODE));
if (!str)
return JS_EXCEPTION;
re_bytecode_buf = lre_compile(&re_bytecode_len, error_msg,
sizeof(error_msg), str, len, re_flags, ctx);
JS_FreeCString(ctx, str);
if (!re_bytecode_buf) {
JS_ThrowSyntaxError(ctx, "%s", error_msg);
return JS_EXCEPTION;
}
ret = js_new_string8_len(ctx, (char *)re_bytecode_buf, re_bytecode_len);
js_free(ctx, re_bytecode_buf);
return ret;
} | O2 | c | js_compile_regexp:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r15
xorl %r14d, %r14d
pushq $0x6
popq %rbx
cmpl $0x3, %r8d
jne 0x3082b
xorl %r8d, %r8d
testb $0x10, %r14b
sete %r8b
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
movq %r13, %rdx
movq %r12, %rcx
callq 0x1e96b
testq %rax, %rax
je 0x308c7
movq %rax, %r12
movq 0x10(%rsp), %r8
movq %r15, (%rsp)
leaq 0x1c(%rsp), %rdi
leaq 0x20(%rsp), %rsi
pushq $0x40
popq %rdx
movq %rax, %rcx
movl %r14d, %r9d
callq 0x7f73d
movq %rax, %r14
movq %r15, %rdi
movq %r12, %rsi
callq 0x1ec07
testq %r14, %r14
je 0x30909
movl 0x1c(%rsp), %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x1e098
movq %rax, %r12
movq %rdx, %rbx
movq %r15, %rdi
movq %r14, %rsi
callq 0x1ae1e
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
andq %r12, %rax
movl %r12d, %r14d
jmp 0x30924
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
movq %rcx, %rdx
movq %r8, %rcx
callq 0x3a79e
xorl %r14d, %r14d
testq %rax, %rax
je 0x30922
movq 0x10(%rsp), %rcx
pushq $0x40
popq %r9
leaq 0x56296(%rip), %rsi # 0x86af0
leaq 0x56267(%rip), %r10 # 0x86ac8
pushq $0x2
popq %rbp
pushq $0x4
popq %rdi
xorl %r8d, %r8d
cmpq %r8, %rcx
je 0x308d9
movzbl (%rax,%r8), %edx
leal -0x64(%rdx), %r11d
cmpl $0x9, %r11d
jbe 0x30893
addl $-0x73, %edx
cmpl $0x6, %edx
ja 0x308cc
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
pushq $0x8
jmp 0x308b9
movslq (%r10,%r11,4), %r11
addq %r10, %r11
movl %r9d, %edx
jmpq *%r11
pushq $0x1
jmp 0x308b9
movl %ebp, %edx
jmp 0x308ba
movl %edi, %edx
jmp 0x308ba
movl $0x100, %edx # imm = 0x100
jmp 0x308ba
pushq $0x10
jmp 0x308b9
pushq $0x20
popq %rdx
testl %r14d, %edx
jne 0x308cc
orl %edx, %r14d
incq %r8
jmp 0x3086a
xorl %r14d, %r14d
jmp 0x30922
movq %r15, %rdi
movq %rax, %rsi
callq 0x1ec07
jmp 0x308f3
movq %r15, %rdi
movq %rax, %rsi
callq 0x1ec07
movl %r14d, %eax
notl %eax
testw $0x110, %ax # imm = 0x110
jne 0x30794
leaq 0x5936f(%rip), %rsi # 0x89c69
xorl %r14d, %r14d
movq %r15, %rdi
xorl %eax, %eax
callq 0x2016b
jmp 0x30922
leaq 0x5af56(%rip), %rsi # 0x8b866
xorl %r14d, %r14d
leaq 0x20(%rsp), %rdx
movq %r15, %rdi
xorl %eax, %eax
callq 0x2016b
xorl %eax, %eax
orq %rax, %r14
movq %r14, %rax
movq %rbx, %rdx
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_compile_regexp:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov r12, rdx
mov r13, rsi
mov r15, rdi
xor r14d, r14d
push 6
pop rbx
cmp r8d, 3
jnz loc_3082B
loc_30794:
xor r8d, r8d
test r14b, 10h
setz r8b
lea rsi, [rsp+98h+var_88]
mov rdi, r15
mov rdx, r13
mov rcx, r12
call JS_ToCStringLen2
test rax, rax
jz loc_308C7
mov r12, rax
mov r8, [rsp+98h+var_88]
mov [rsp+98h+var_98], r15
lea rdi, [rsp+98h+var_7C]
lea rsi, [rsp+98h+var_78]
push 40h ; '@'
pop rdx
mov rcx, rax
mov r9d, r14d
call lre_compile
mov r14, rax
mov rdi, r15
mov rsi, r12
call JS_FreeCString
test r14, r14
jz loc_30909
mov edx, [rsp+98h+var_7C]
mov rdi, r15
mov rsi, r14
call js_new_string8_len
mov r12, rax
mov rbx, rdx
mov rdi, r15
mov rsi, r14
call js_free
mov rax, 0FFFFFFFF00000000h
and rax, r12
mov r14d, r12d
jmp loc_30924
loc_3082B:
lea rsi, [rsp+98h+var_88]
mov rdi, r15
mov rdx, rcx
mov rcx, r8
call JS_ToCStringLen_0
xor r14d, r14d
test rax, rax
jz loc_30922
mov rcx, [rsp+98h+var_88]
push 40h ; '@'
pop r9
lea rsi, jpt_3088D
lea r10, jpt_3089D
push 2
pop rbp
push 4
pop rdi
xor r8d, r8d
loc_3086A:
cmp rcx, r8
jz short loc_308D9
movzx edx, byte ptr [rax+r8]
lea r11d, [rdx-64h]; switch 10 cases
cmp r11d, 9
jbe short loc_30893
def_3089D:
add edx, 0FFFFFF8Dh; jumptable 000000000003089D default case
cmp edx, 6
ja short def_3088D; jumptable 000000000003088D default case, cases 116,119,120
movsxd rdx, ds:(jpt_3088D - 86AF0h)[rsi+rdx*4]
add rdx, rsi
jmp rdx; switch jump
loc_3088F:
push 8; jumptable 000000000003088D case 115
jmp short loc_308B9
loc_30893:
movsxd r11, ds:(jpt_3089D - 86AC8h)[r10+r11*4]
add r11, r10
mov edx, r9d
jmp r11; switch jump
loc_308A0:
push 1; jumptable 000000000003089D case 103
jmp short loc_308B9
loc_308A4:
mov edx, ebp; jumptable 000000000003089D case 105
jmp short loc_308BA; jumptable 000000000003089D case 100
loc_308A8:
mov edx, edi; jumptable 000000000003089D case 109
jmp short loc_308BA; jumptable 000000000003089D case 100
loc_308AC:
mov edx, 100h; jumptable 000000000003088D case 118
jmp short loc_308BA; jumptable 000000000003089D case 100
loc_308B3:
push 10h; jumptable 000000000003088D case 117
jmp short loc_308B9
loc_308B7:
push 20h ; ' '; jumptable 000000000003088D case 121
loc_308B9:
pop rdx
loc_308BA:
test edx, r14d; jumptable 000000000003089D case 100
jnz short def_3088D; jumptable 000000000003088D default case, cases 116,119,120
or r14d, edx
inc r8
jmp short loc_3086A
loc_308C7:
xor r14d, r14d
jmp short loc_30922
def_3088D:
mov rdi, r15; jumptable 000000000003088D default case, cases 116,119,120
mov rsi, rax
call JS_FreeCString
jmp short loc_308F3
loc_308D9:
mov rdi, r15
mov rsi, rax
call JS_FreeCString
mov eax, r14d
not eax
test ax, 110h
jnz loc_30794
loc_308F3:
lea rsi, aInvalidRegular; "invalid regular expression flags"
xor r14d, r14d
mov rdi, r15
xor eax, eax
call JS_ThrowSyntaxError
jmp short loc_30922
loc_30909:
lea rsi, aUnsupportedKey+15h; "%s"
xor r14d, r14d
lea rdx, [rsp+98h+var_78]
mov rdi, r15
xor eax, eax
call JS_ThrowSyntaxError
loc_30922:
xor eax, eax
loc_30924:
or r14, rax
mov rax, r14
mov rdx, rbx
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| unsigned long long js_compile_regexp(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
long long v14; // r14
long long v15; // rax
long long v16; // r12
long long v17; // r14
long long v18; // rcx
long long v19; // r8
long long v20; // r9
__m128 v21; // xmm4
__m128 v22; // xmm5
long long v23; // r12
unsigned long long v24; // rax
long long v25; // rax
long long v26; // r8
int v27; // edx
long long v28; // rdx
long long v29; // rcx
long long v30; // r8
long long v31; // r9
__m128 v32; // xmm4
__m128 v33; // xmm5
char v35; // [rsp+0h] [rbp-98h]
char v36; // [rsp+0h] [rbp-98h]
long long v37; // [rsp+10h] [rbp-88h] BYREF
unsigned int v38; // [rsp+1Ch] [rbp-7Ch] BYREF
_BYTE v39[120]; // [rsp+20h] [rbp-78h] BYREF
LODWORD(v14) = 0;
if ( (_DWORD)a5 != 3 )
{
v25 = JS_ToCStringLen_0(a1, &v37, a4, a5);
v14 = 0LL;
if ( !v25 )
{
LABEL_19:
v24 = 0LL;
return v24 | v14;
}
v26 = 0LL;
while ( 2 )
{
if ( v37 != v26 )
{
v27 = 64;
switch ( *(_BYTE *)(v25 + v26) )
{
case 'd':
goto LABEL_12;
case 'g':
v27 = 1;
goto LABEL_12;
case 'i':
v27 = 2;
goto LABEL_12;
case 'm':
v27 = 4;
LABEL_12:
if ( ((unsigned int)v14 & v27) != 0 )
goto LABEL_15;
LODWORD(v14) = v27 | v14;
++v26;
continue;
default:
LABEL_15:
JS_FreeCString(a1, v25);
goto LABEL_17;
}
}
break;
}
JS_FreeCString(a1, v25);
if ( (~(_WORD)v14 & 0x110) == 0 )
{
LABEL_17:
v14 = 0LL;
JS_ThrowSyntaxError(
a1,
(long long)"invalid regular expression flags",
v28,
v29,
v30,
v31,
a6,
a7,
a8,
a9,
v32,
v33,
a12,
a13,
v35);
goto LABEL_19;
}
}
v15 = JS_ToCStringLen2(a1, &v37, a2, a3, (v14 & 0x10) == 0);
if ( !v15 )
{
v14 = 0LL;
goto LABEL_19;
}
v16 = v15;
v17 = lre_compile((unsigned int)&v38, (unsigned int)v39, 64, v15, v37, v14, a1);
JS_FreeCString(a1, v16);
if ( !v17 )
{
v14 = 0LL;
JS_ThrowSyntaxError(a1, (long long)"%s", (long long)v39, v18, v19, v20, a6, a7, a8, a9, v21, v22, a12, a13, v36);
goto LABEL_19;
}
v23 = js_new_string8_len(a1, v17, v38);
js_free(a1, v17);
v24 = v23 & 0xFFFFFFFF00000000LL;
v14 = (unsigned int)v23;
return v24 | v14;
}
| js_compile_regexp:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R12,RDX
MOV R13,RSI
MOV R15,RDI
XOR R14D,R14D
PUSH 0x6
POP RBX
CMP R8D,0x3
JNZ 0x0013082b
LAB_00130794:
XOR R8D,R8D
TEST R14B,0x10
SETZ R8B
LEA RSI,[RSP + 0x10]
MOV RDI,R15
MOV RDX,R13
MOV RCX,R12
CALL 0x0011e96b
TEST RAX,RAX
JZ 0x001308c7
MOV R12,RAX
MOV R8,qword ptr [RSP + 0x10]
MOV qword ptr [RSP],R15
LEA RDI,[RSP + 0x1c]
LEA RSI,[RSP + 0x20]
PUSH 0x40
POP RDX
MOV RCX,RAX
MOV R9D,R14D
CALL 0x0017f73d
MOV R14,RAX
MOV RDI,R15
MOV RSI,R12
CALL 0x0011ec07
TEST R14,R14
JZ 0x00130909
MOV EDX,dword ptr [RSP + 0x1c]
MOV RDI,R15
MOV RSI,R14
CALL 0x0011e098
MOV R12,RAX
MOV RBX,RDX
MOV RDI,R15
MOV RSI,R14
CALL 0x0011ae1e
MOV RAX,-0x100000000
AND RAX,R12
MOV R14D,R12D
JMP 0x00130924
LAB_0013082b:
LEA RSI,[RSP + 0x10]
MOV RDI,R15
MOV RDX,RCX
MOV RCX,R8
CALL 0x0013a79e
XOR R14D,R14D
TEST RAX,RAX
JZ 0x00130922
MOV RCX,qword ptr [RSP + 0x10]
PUSH 0x40
POP R9
LEA RSI,[0x186af0]
LEA R10,[0x186ac8]
PUSH 0x2
POP RBP
PUSH 0x4
POP RDI
XOR R8D,R8D
LAB_0013086a:
CMP RCX,R8
JZ 0x001308d9
MOVZX EDX,byte ptr [RAX + R8*0x1]
LEA R11D,[RDX + -0x64]
CMP R11D,0x9
JBE 0x00130893
default:
ADD EDX,-0x73
CMP EDX,0x6
JA 0x001308cc
MOVSXD RDX,dword ptr [RSI + RDX*0x4]
ADD RDX,RSI
switchD:
JMP RDX
caseD_73:
PUSH 0x8
JMP 0x001308b9
LAB_00130893:
MOVSXD R11,dword ptr [R10 + R11*0x4]
ADD R11,R10
MOV EDX,R9D
switchD:
JMP R11
caseD_67:
PUSH 0x1
JMP 0x001308b9
caseD_69:
MOV EDX,EBP
JMP 0x001308ba
caseD_6d:
MOV EDX,EDI
JMP 0x001308ba
caseD_76:
MOV EDX,0x100
JMP 0x001308ba
caseD_75:
PUSH 0x10
JMP 0x001308b9
caseD_79:
PUSH 0x20
LAB_001308b9:
POP RDX
caseD_64:
TEST EDX,R14D
JNZ 0x001308cc
OR R14D,EDX
INC R8
JMP 0x0013086a
LAB_001308c7:
XOR R14D,R14D
JMP 0x00130922
caseD_74:
MOV RDI,R15
MOV RSI,RAX
CALL 0x0011ec07
JMP 0x001308f3
LAB_001308d9:
MOV RDI,R15
MOV RSI,RAX
CALL 0x0011ec07
MOV EAX,R14D
NOT EAX
TEST AX,0x110
JNZ 0x00130794
LAB_001308f3:
LEA RSI,[0x189c69]
XOR R14D,R14D
MOV RDI,R15
XOR EAX,EAX
CALL 0x0012016b
JMP 0x00130922
LAB_00130909:
LEA RSI,[0x18b866]
XOR R14D,R14D
LEA RDX,[RSP + 0x20]
MOV RDI,R15
XOR EAX,EAX
CALL 0x0012016b
LAB_00130922:
XOR EAX,EAX
LAB_00130924:
OR R14,RAX
MOV RAX,R14
MOV RDX,RBX
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16]
js_compile_regexp(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5)
{
long lVar1;
long lVar2;
ulong uVar3;
uint uVar4;
int8 uVar5;
uint uVar6;
ulong uVar7;
int1 auVar8 [16];
long local_88;
int4 local_7c;
int1 local_78 [72];
uVar6 = 0;
uVar5 = 6;
if ((int)param_5 == 3) {
LAB_00130794:
lVar1 = JS_ToCStringLen2(param_1,&local_88,param_2,param_3,(uVar6 & 0x10) == 0);
if (lVar1 != 0) {
lVar2 = lre_compile(&local_7c,local_78,0x40,lVar1,local_88,uVar6,param_1);
JS_FreeCString(param_1,lVar1);
if (lVar2 != 0) {
auVar8 = js_new_string8_len(param_1,lVar2,local_7c);
uVar5 = auVar8._8_8_;
js_free(param_1,lVar2);
uVar3 = auVar8._0_8_ & 0xffffffff00000000;
uVar7 = auVar8._0_8_ & 0xffffffff;
goto LAB_00130924;
}
JS_ThrowSyntaxError(param_1,"%s",local_78);
}
}
else {
lVar1 = JS_ToCStringLen(param_1,&local_88,param_4,param_5);
uVar6 = 0;
if (lVar1 != 0) {
for (lVar2 = 0; local_88 != lVar2; lVar2 = lVar2 + 1) {
uVar4 = 0x40;
switch(*(int1 *)(lVar1 + lVar2)) {
case 100:
break;
case 0x65:
case 0x66:
case 0x68:
case 0x6a:
case 0x6b:
case 0x6c:
goto switchD_0013088d_caseD_74;
case 0x67:
uVar4 = 1;
break;
case 0x69:
uVar4 = 2;
break;
case 0x6d:
uVar4 = 4;
break;
default:
switch(*(int1 *)(lVar1 + lVar2)) {
case 0x73:
uVar4 = 8;
break;
default:
goto switchD_0013088d_caseD_74;
case 0x75:
uVar4 = 0x10;
break;
case 0x76:
uVar4 = 0x100;
break;
case 0x79:
uVar4 = 0x20;
}
}
if ((uVar4 & uVar6) != 0) {
switchD_0013088d_caseD_74:
JS_FreeCString(param_1,lVar1);
goto LAB_001308f3;
}
uVar6 = uVar6 | uVar4;
}
JS_FreeCString(param_1,lVar1);
if ((~uVar6 & 0x110) != 0) goto LAB_00130794;
LAB_001308f3:
JS_ThrowSyntaxError(param_1,"invalid regular expression flags");
}
}
uVar7 = 0;
uVar3 = 0;
LAB_00130924:
auVar8._8_8_ = uVar5;
auVar8._0_8_ = uVar7 | uVar3;
return auVar8;
}
| |
33,586 | end_key_cache_internal | eloqsql/mysys/mf_keycache.c | static
void end_key_cache_internal(KEY_CACHE *keycache, my_bool cleanup,
my_bool use_op_lock)
{
if (keycache->key_cache_inited)
{
keycache->interface_funcs->end(keycache->keycache_cb, cleanup);
if (cleanup)
{
if (keycache->keycache_cb)
{
my_free(keycache->keycache_cb);
keycache->keycache_cb= 0;
}
/*
We do not destroy op_lock if we are going to reuse the same key cache.
This happens if we are called from repartition_key_cache_internal().
*/
if (use_op_lock)
pthread_mutex_destroy(&keycache->op_lock);
keycache->key_cache_inited= 0;
}
keycache->can_be_used= 0;
}
} | O0 | c | end_key_cache_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dl, %al
movb %sil, %cl
movq %rdi, -0x8(%rbp)
movb %cl, -0x9(%rbp)
movb %al, -0xa(%rbp)
movq -0x8(%rbp), %rax
cmpb $0x0, 0x48(%rax)
je 0xe4af8
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x40(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rdi
movsbl -0x9(%rbp), %esi
callq *%rax
cmpb $0x0, -0x9(%rbp)
je 0xe4af0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0xe4ad5
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0xf3be0
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
cmpb $0x0, -0xa(%rbp)
je 0xe4ae8
movq -0x8(%rbp), %rdi
addq $0x58, %rdi
callq 0x2a0d0
movq -0x8(%rbp), %rax
movb $0x0, 0x48(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x49(%rax)
addq $0x10, %rsp
popq %rbp
retq
nop
| end_key_cache_internal:
push rbp
mov rbp, rsp
sub rsp, 10h
mov al, dl
mov cl, sil
mov [rbp+var_8], rdi
mov [rbp+var_9], cl
mov [rbp+var_A], al
mov rax, [rbp+var_8]
cmp byte ptr [rax+48h], 0
jz short loc_E4AF8
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov rax, [rax+40h]
mov rcx, [rbp+var_8]
mov rdi, [rcx+8]
movsx esi, [rbp+var_9]
call rax
cmp [rbp+var_9], 0
jz short loc_E4AF0
mov rax, [rbp+var_8]
cmp qword ptr [rax+8], 0
jz short loc_E4AD5
mov rax, [rbp+var_8]
mov rdi, [rax+8]
call my_free
mov rax, [rbp+var_8]
mov qword ptr [rax+8], 0
loc_E4AD5:
cmp [rbp+var_A], 0
jz short loc_E4AE8
mov rdi, [rbp+var_8]
add rdi, 58h ; 'X'
call _pthread_mutex_destroy
loc_E4AE8:
mov rax, [rbp+var_8]
mov byte ptr [rax+48h], 0
loc_E4AF0:
mov rax, [rbp+var_8]
mov byte ptr [rax+49h], 0
loc_E4AF8:
add rsp, 10h
pop rbp
retn
| long long end_key_cache_internal(long long a1, char a2, char a3)
{
long long result; // rax
result = a1;
if ( *(_BYTE *)(a1 + 72) )
{
(*(void ( **)(_QWORD, _QWORD))(*(_QWORD *)(a1 + 16) + 64LL))(*(_QWORD *)(a1 + 8), (unsigned int)a2);
if ( a2 )
{
if ( *(_QWORD *)(a1 + 8) )
{
my_free(*(_QWORD *)(a1 + 8));
*(_QWORD *)(a1 + 8) = 0LL;
}
if ( a3 )
pthread_mutex_destroy(a1 + 88);
*(_BYTE *)(a1 + 72) = 0;
}
result = a1;
*(_BYTE *)(a1 + 73) = 0;
}
return result;
}
| end_key_cache_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV AL,DL
MOV CL,SIL
MOV qword ptr [RBP + -0x8],RDI
MOV byte ptr [RBP + -0x9],CL
MOV byte ptr [RBP + -0xa],AL
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX + 0x48],0x0
JZ 0x001e4af8
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x8]
MOVSX ESI,byte ptr [RBP + -0x9]
CALL RAX
CMP byte ptr [RBP + -0x9],0x0
JZ 0x001e4af0
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x001e4ad5
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x001f3be0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x8],0x0
LAB_001e4ad5:
CMP byte ptr [RBP + -0xa],0x0
JZ 0x001e4ae8
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x58
CALL 0x0012a0d0
LAB_001e4ae8:
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x48],0x0
LAB_001e4af0:
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x49],0x0
LAB_001e4af8:
ADD RSP,0x10
POP RBP
RET
|
void end_key_cache_internal(long param_1,char param_2,char param_3)
{
if (*(char *)(param_1 + 0x48) != '\0') {
(**(code **)(*(long *)(param_1 + 0x10) + 0x40))(*(int8 *)(param_1 + 8),(int)param_2);
if (param_2 != '\0') {
if (*(long *)(param_1 + 8) != 0) {
my_free(*(int8 *)(param_1 + 8));
*(int8 *)(param_1 + 8) = 0;
}
if (param_3 != '\0') {
pthread_mutex_destroy((pthread_mutex_t *)(param_1 + 0x58));
}
*(int1 *)(param_1 + 0x48) = 0;
}
*(int1 *)(param_1 + 0x49) = 0;
}
return;
}
| |
33,587 | end_key_cache_internal | eloqsql/mysys/mf_keycache.c | static
void end_key_cache_internal(KEY_CACHE *keycache, my_bool cleanup,
my_bool use_op_lock)
{
if (keycache->key_cache_inited)
{
keycache->interface_funcs->end(keycache->keycache_cb, cleanup);
if (cleanup)
{
if (keycache->keycache_cb)
{
my_free(keycache->keycache_cb);
keycache->keycache_cb= 0;
}
/*
We do not destroy op_lock if we are going to reuse the same key cache.
This happens if we are called from repartition_key_cache_internal().
*/
if (use_op_lock)
pthread_mutex_destroy(&keycache->op_lock);
keycache->key_cache_inited= 0;
}
keycache->can_be_used= 0;
}
} | O3 | c | end_key_cache_internal:
cmpb $0x0, 0x48(%rdi)
je 0x98653
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r14d
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
movq 0x10(%rbx), %rax
movsbl %sil, %r15d
movl %r15d, %esi
callq *0x40(%rax)
testb %r15b, %r15b
je 0x98645
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x98633
callq 0x9ffde
movq $0x0, 0x8(%rbx)
testb %r14b, %r14b
je 0x98641
leaq 0x58(%rbx), %rdi
callq 0x290c0
movb $0x0, 0x48(%rbx)
movb $0x0, 0x49(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| end_key_cache_internal:
cmp byte ptr [rdi+48h], 0
jz short locret_98653
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14d, edx
mov rbx, rdi
mov rdi, [rdi+8]
mov rax, [rbx+10h]
movsx r15d, sil
mov esi, r15d
call qword ptr [rax+40h]
test r15b, r15b
jz short loc_98645
mov rdi, [rbx+8]
test rdi, rdi
jz short loc_98633
call my_free
mov qword ptr [rbx+8], 0
loc_98633:
test r14b, r14b
jz short loc_98641
lea rdi, [rbx+58h]
call _pthread_mutex_destroy
loc_98641:
mov byte ptr [rbx+48h], 0
loc_98645:
mov byte ptr [rbx+49h], 0
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
locret_98653:
retn
| long long end_key_cache_internal(long long a1, char a2, char a3)
{
long long result; // rax
long long v6; // rdi
if ( *(_BYTE *)(a1 + 72) )
{
result = (*(long long ( **)(_QWORD, _QWORD))(*(_QWORD *)(a1 + 16) + 64LL))(
*(_QWORD *)(a1 + 8),
(unsigned int)a2);
if ( a2 )
{
v6 = *(_QWORD *)(a1 + 8);
if ( v6 )
{
result = my_free(v6);
*(_QWORD *)(a1 + 8) = 0LL;
}
if ( a3 )
result = pthread_mutex_destroy(a1 + 88);
*(_BYTE *)(a1 + 72) = 0;
}
*(_BYTE *)(a1 + 73) = 0;
}
return result;
}
| end_key_cache_internal:
CMP byte ptr [RDI + 0x48],0x0
JZ 0x00198653
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14D,EDX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RBX + 0x10]
MOVSX R15D,SIL
MOV ESI,R15D
CALL qword ptr [RAX + 0x40]
TEST R15B,R15B
JZ 0x00198645
MOV RDI,qword ptr [RBX + 0x8]
TEST RDI,RDI
JZ 0x00198633
CALL 0x0019ffde
MOV qword ptr [RBX + 0x8],0x0
LAB_00198633:
TEST R14B,R14B
JZ 0x00198641
LEA RDI,[RBX + 0x58]
CALL 0x001290c0
LAB_00198641:
MOV byte ptr [RBX + 0x48],0x0
LAB_00198645:
MOV byte ptr [RBX + 0x49],0x0
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
LAB_00198653:
RET
|
void end_key_cache_internal(long param_1,char param_2,char param_3)
{
if (*(char *)(param_1 + 0x48) != '\0') {
(**(code **)(*(long *)(param_1 + 0x10) + 0x40))(*(int8 *)(param_1 + 8),(int)param_2);
if (param_2 != '\0') {
if (*(long *)(param_1 + 8) != 0) {
my_free();
*(int8 *)(param_1 + 8) = 0;
}
if (param_3 != '\0') {
pthread_mutex_destroy((pthread_mutex_t *)(param_1 + 0x58));
}
*(int1 *)(param_1 + 0x48) = 0;
}
*(int1 *)(param_1 + 0x49) = 0;
}
return;
}
| |
33,588 | LefDefParser::lefiValidUser() | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiTBExt.cpp | int
lefiValidUser()
{
int j = 0, i;
for (i = 0; i < (int) strlen(tagName); i++) {
j += (int) tagName[i];
}
if (atoi(tagNum) == j)
return (1);
return (0);
} | O0 | cpp | LefDefParser::lefiValidUser():
subq $0x18, %rsp
movl $0x0, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl %eax, 0x8(%rsp)
leaq 0x7356d(%rip), %rdi # 0xa2250
callq 0x20d0
movq %rax, %rcx
movl 0x8(%rsp), %eax
cmpl %ecx, %eax
jge 0x2ed18
movslq 0xc(%rsp), %rcx
leaq 0x73551(%rip), %rax # 0xa2250
movsbl (%rax,%rcx), %eax
addl 0x10(%rsp), %eax
movl %eax, 0x10(%rsp)
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x2ecd4
leaq 0x73601(%rip), %rdi # 0xa2320
callq 0x23a0
cmpl 0x10(%rsp), %eax
jne 0x2ed34
movl $0x1, 0x14(%rsp)
jmp 0x2ed3c
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZN12LefDefParser13lefiValidUserEv:
sub rsp, 18h
mov [rsp+18h+var_8], 0
mov [rsp+18h+var_C], 0
loc_2ECD4:
mov eax, [rsp+18h+var_C]
mov [rsp+18h+var_10], eax
lea rdi, _ZN12LefDefParserL7tagNameE; "CDNDESYS"
call _strlen
mov rcx, rax
mov eax, [rsp+18h+var_10]
cmp eax, ecx
jge short loc_2ED18
movsxd rcx, [rsp+18h+var_C]
lea rax, _ZN12LefDefParserL7tagNameE; "CDNDESYS"
movsx eax, byte ptr [rax+rcx]
add eax, [rsp+18h+var_8]
mov [rsp+18h+var_8], eax
mov eax, [rsp+18h+var_C]
add eax, 1
mov [rsp+18h+var_C], eax
jmp short loc_2ECD4
loc_2ED18:
lea rdi, _ZN12LefDefParserL6tagNumE; "CDNCHKSM"
call _atoi
cmp eax, [rsp+18h+var_8]
jnz short loc_2ED34
mov [rsp+18h+var_4], 1
jmp short loc_2ED3C
loc_2ED34:
mov [rsp+18h+var_4], 0
loc_2ED3C:
mov eax, [rsp+18h+var_4]
add rsp, 18h
retn
| _BOOL8 LefDefParser::lefiValidUser(LefDefParser *this)
{
int i; // [rsp+Ch] [rbp-Ch]
int v3; // [rsp+10h] [rbp-8h]
v3 = 0;
for ( i = 0; i < (int)strlen(LefDefParser::tagName); ++i )
v3 += LefDefParser::tagName[i];
return (unsigned int)atoi(LefDefParser::tagNum) == v3;
}
| lefiValidUser:
SUB RSP,0x18
MOV dword ptr [RSP + 0x10],0x0
MOV dword ptr [RSP + 0xc],0x0
LAB_0012ecd4:
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [RSP + 0x8],EAX
LEA RDI,[0x1a2250]
CALL 0x001020d0
MOV RCX,RAX
MOV EAX,dword ptr [RSP + 0x8]
CMP EAX,ECX
JGE 0x0012ed18
MOVSXD RCX,dword ptr [RSP + 0xc]
LEA RAX,[0x1a2250]
MOVSX EAX,byte ptr [RAX + RCX*0x1]
ADD EAX,dword ptr [RSP + 0x10]
MOV dword ptr [RSP + 0x10],EAX
MOV EAX,dword ptr [RSP + 0xc]
ADD EAX,0x1
MOV dword ptr [RSP + 0xc],EAX
JMP 0x0012ecd4
LAB_0012ed18:
LEA RDI,[0x1a2320]
CALL 0x001023a0
CMP EAX,dword ptr [RSP + 0x10]
JNZ 0x0012ed34
MOV dword ptr [RSP + 0x14],0x1
JMP 0x0012ed3c
LAB_0012ed34:
MOV dword ptr [RSP + 0x14],0x0
LAB_0012ed3c:
MOV EAX,dword ptr [RSP + 0x14]
ADD RSP,0x18
RET
|
/* LefDefParser::lefiValidUser() */
bool LefDefParser::lefiValidUser(void)
{
int iVar1;
size_t sVar2;
int local_c;
int local_8;
local_8 = 0;
for (local_c = 0; sVar2 = strlen(tagName), local_c < (int)sVar2; local_c = local_c + 1) {
local_8 = tagName[local_c] + local_8;
}
iVar1 = atoi(tagNum);
return iVar1 == local_8;
}
| |
33,589 | LefDefParser::lefiValidUser() | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiTBExt.cpp | int
lefiValidUser()
{
int j = 0, i;
for (i = 0; i < (int) strlen(tagName); i++) {
j += (int) tagName[i];
}
if (atoi(tagNum) == j)
return (1);
return (0);
} | O3 | cpp | LefDefParser::lefiValidUser():
pushq %rbp
pushq %rbx
pushq %rax
leaq 0x5640e(%rip), %rbx # 0x771f0
movq %rbx, %rdi
callq 0x20d0
testl %eax, %eax
jle 0x20e07
andl $0x7fffffff, %eax # imm = 0x7FFFFFFF
xorl %ecx, %ecx
xorl %ebp, %ebp
movsbl (%rcx,%rbx), %edx
addl %edx, %ebp
incq %rcx
cmpq %rcx, %rax
jne 0x20df7
jmp 0x20e09
xorl %ebp, %ebp
leaq 0x564b0(%rip), %rdi # 0x772c0
callq 0x22f0
xorl %ecx, %ecx
cmpl %ebp, %eax
sete %cl
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| _ZN12LefDefParser13lefiValidUserEv:
push rbp
push rbx
push rax
lea rbx, _ZN12LefDefParserL7tagNameE; "CDNDESYS"
mov rdi, rbx
call _strlen
test eax, eax
jle short loc_20E07
and eax, 7FFFFFFFh
xor ecx, ecx
xor ebp, ebp
loc_20DF7:
movsx edx, byte ptr [rcx+rbx]
add ebp, edx
inc rcx
cmp rax, rcx
jnz short loc_20DF7
jmp short loc_20E09
loc_20E07:
xor ebp, ebp
loc_20E09:
lea rdi, _ZN12LefDefParserL6tagNumE; "CDNCHKSM"
call _atoi
xor ecx, ecx
cmp eax, ebp
setz cl
mov eax, ecx
add rsp, 8
pop rbx
pop rbp
retn
| _BOOL8 LefDefParser::lefiValidUser(LefDefParser *this)
{
int v1; // eax
long long v2; // rax
long long v3; // rcx
int v4; // ebp
v1 = strlen(LefDefParser::tagName);
if ( v1 <= 0 )
{
v4 = 0;
}
else
{
v2 = v1 & 0x7FFFFFFF;
v3 = 0LL;
v4 = 0;
do
v4 += LefDefParser::tagName[v3++];
while ( v2 != v3 );
}
return (unsigned int)atoi(LefDefParser::tagNum) == v4;
}
| lefiValidUser:
PUSH RBP
PUSH RBX
PUSH RAX
LEA RBX,[0x1771f0]
MOV RDI,RBX
CALL 0x001020d0
TEST EAX,EAX
JLE 0x00120e07
AND EAX,0x7fffffff
XOR ECX,ECX
XOR EBP,EBP
LAB_00120df7:
MOVSX EDX,byte ptr [RCX + RBX*0x1]
ADD EBP,EDX
INC RCX
CMP RAX,RCX
JNZ 0x00120df7
JMP 0x00120e09
LAB_00120e07:
XOR EBP,EBP
LAB_00120e09:
LEA RDI,[0x1772c0]
CALL 0x001022f0
XOR ECX,ECX
CMP EAX,EBP
SETZ CL
MOV EAX,ECX
ADD RSP,0x8
POP RBX
POP RBP
RET
|
/* LefDefParser::lefiValidUser() */
bool LefDefParser::lefiValidUser(void)
{
int iVar1;
size_t sVar2;
ulong uVar3;
int iVar4;
sVar2 = strlen(tagName);
if ((int)(uint)sVar2 < 1) {
iVar4 = 0;
}
else {
uVar3 = 0;
iVar4 = 0;
do {
iVar4 = iVar4 + tagName[uVar3];
uVar3 = uVar3 + 1;
} while (((uint)sVar2 & 0x7fffffff) != uVar3);
}
iVar1 = atoi(tagNum);
return iVar1 == iVar4;
}
| |
33,590 | coro::io_scheduler::yield_until(std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>>) | AlayaLite/build_O3/_deps/libcoro-src/src/io_scheduler.cpp | auto io_scheduler::yield_until(time_point time) -> coro::task<void>
{
auto now = clock::now();
// If the requested time is in the past (or now!) bail out!
if (time <= now)
{
co_await schedule();
}
else
{
m_size.fetch_add(1, std::memory_order::release);
auto amount = std::chrono::duration_cast<std::chrono::milliseconds>(time - now);
detail::poll_info pi{};
add_timer_token(now + amount, pi);
co_await pi;
m_size.fetch_sub(1, std::memory_order::release);
}
co_return;
} | O3 | cpp | coro::io_scheduler::yield_until(std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>>):
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x68, %edi
callq 0x32b0
leaq 0x93f(%rip), %rcx # 0x7b80
movq %rcx, (%rax)
leaq 0xa73(%rip), %rcx # 0x7cbe
movq %rcx, 0x8(%rax)
movq %rbx, 0x58(%rax)
movq %r14, 0x50(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movq %rax, (%r15)
movb $0x0, 0x60(%rax)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
| _ZN4coro12io_scheduler11yield_untilENSt6chrono10time_pointINS1_3_V212steady_clockENS1_8durationIlSt5ratioILl1ELl1000000000EEEEEE:
push r15
push r14
push rbx
mov rbx, rdx
mov r14, rsi
mov r15, rdi
mov edi, 68h ; 'h'; unsigned __int64
call __Znwm; operator new(ulong)
lea rcx, _ZN4coro12io_scheduler11yield_untilENSt6chrono10time_pointINS1_3_V212steady_clockENS1_8durationIlSt5ratioILl1ELl1000000000EEEEEE_resume; coro::io_scheduler::yield_until(std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>) [clone]
mov [rax], rcx
lea rcx, _ZN4coro12io_scheduler11yield_untilENSt6chrono10time_pointINS1_3_V212steady_clockENS1_8durationIlSt5ratioILl1ELl1000000000EEEEEE_destroy; coro::io_scheduler::yield_until(std::chrono::time_point<std::chrono::_V2::steady_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>>) [clone]
mov [rax+8], rcx
mov [rax+58h], rbx
mov [rax+50h], r14
xorps xmm0, xmm0
movups xmmword ptr [rax+10h], xmm0
mov [r15], rax
mov byte ptr [rax+60h], 0
mov rax, r15
pop rbx
pop r14
pop r15
retn
| _QWORD * coro::io_scheduler::yield_until(_QWORD *a1, long long a2, long long a3)
{
long long v4; // rax
v4 = operator new(0x68uLL);
*(_QWORD *)v4 = coro::io_scheduler::yield_until;
*(_QWORD *)(v4 + 8) = coro::io_scheduler::yield_until;
*(_QWORD *)(v4 + 88) = a3;
*(_QWORD *)(v4 + 80) = a2;
*(_OWORD *)(v4 + 16) = 0LL;
*a1 = v4;
*(_BYTE *)(v4 + 96) = 0;
return a1;
}
| yield_until:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
MOV EDI,0x68
CALL 0x001032b0
LEA RCX,[0x107b80]
MOV qword ptr [RAX],RCX
LEA RCX,[0x107cbe]
MOV qword ptr [RAX + 0x8],RCX
MOV qword ptr [RAX + 0x58],RBX
MOV qword ptr [RAX + 0x50],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + 0x10],XMM0
MOV qword ptr [R15],RAX
MOV byte ptr [RAX + 0x60],0x0
MOV RAX,R15
POP RBX
POP R14
POP R15
RET
|
/* coro::io_scheduler::yield_until(std::chrono::time_point<std::chrono::_V2::steady_clock,
std::chrono::duration<long, std::ratio<1l, 1000000000l> > >) */
int8 *
coro::io_scheduler::yield_until(int8 *param_1,int8 param_2,int8 param_3)
{
int8 *puVar1;
puVar1 = (int8 *)operator_new(0x68);
*puVar1 = yield_until;
puVar1[1] = yield_until;
puVar1[0xb] = param_3;
puVar1[10] = param_2;
puVar1[2] = 0;
puVar1[3] = 0;
*param_1 = puVar1;
*(int1 *)(puVar1 + 0xc) = 0;
return param_1;
}
| |
33,591 | ma_write_clr | eloqsql/storage/maria/ma_key_recover.c | my_bool _ma_write_clr(MARIA_HA *info, LSN undo_lsn,
enum translog_record_type undo_type,
my_bool store_checksum, ha_checksum checksum,
LSN *res_lsn, void *extra_msg)
{
uchar log_data[LSN_STORE_SIZE + FILEID_STORE_SIZE + CLR_TYPE_STORE_SIZE +
HA_CHECKSUM_STORE_SIZE+ KEY_NR_STORE_SIZE + PAGE_STORE_SIZE];
uchar *log_pos;
LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 1];
struct st_msg_to_write_hook_for_clr_end msg;
my_bool res;
DBUG_ENTER("_ma_write_clr");
/* undo_lsn must be first for compression to work */
lsn_store(log_data, undo_lsn);
clr_type_store(log_data + LSN_STORE_SIZE + FILEID_STORE_SIZE, undo_type);
log_pos= log_data + LSN_STORE_SIZE + FILEID_STORE_SIZE + CLR_TYPE_STORE_SIZE;
/* Extra_msg is handled in write_hook_for_clr_end() */
msg.undone_record_type= undo_type;
msg.previous_undo_lsn= undo_lsn;
msg.extra_msg= extra_msg;
msg.checksum_delta= 0;
if (store_checksum)
{
msg.checksum_delta= checksum;
ha_checksum_store(log_pos, checksum);
log_pos+= HA_CHECKSUM_STORE_SIZE;
}
else if (undo_type == LOGREC_UNDO_KEY_INSERT_WITH_ROOT ||
undo_type == LOGREC_UNDO_KEY_DELETE_WITH_ROOT)
{
/* Key root changed. Store new key root */
struct st_msg_to_write_hook_for_undo_key *undo_msg= extra_msg;
pgcache_page_no_t page;
key_nr_store(log_pos, undo_msg->keynr);
page= (undo_msg->value == HA_OFFSET_ERROR ? IMPOSSIBLE_PAGE_NO :
undo_msg->value / info->s->block_size);
page_store(log_pos + KEY_NR_STORE_SIZE, page);
log_pos+= KEY_NR_STORE_SIZE + PAGE_STORE_SIZE;
}
log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data;
log_array[TRANSLOG_INTERNAL_PARTS + 0].length= (uint) (log_pos - log_data);
/*
We need intern_lock mutex for calling _ma_state_info_write in the trigger.
We do it here to have the same sequence of mutexes locking everywhere
(first intern_lock then transactional log buffer lock)
*/
if (undo_type == LOGREC_UNDO_BULK_INSERT)
mysql_mutex_lock(&info->s->intern_lock);
res= translog_write_record(res_lsn, LOGREC_CLR_END,
info->trn, info,
(translog_size_t)
log_array[TRANSLOG_INTERNAL_PARTS + 0].length,
TRANSLOG_INTERNAL_PARTS + 1, log_array,
log_data + LSN_STORE_SIZE, &msg);
if (undo_type == LOGREC_UNDO_BULK_INSERT)
mysql_mutex_unlock(&info->s->intern_lock);
DBUG_RETURN(res);
} | O0 | c | ma_write_clr:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movb %cl, %al
movq 0x10(%rbp), %rcx
movq %fs:0x28, %rcx
movq %rcx, -0x8(%rbp)
movq %rdi, -0x28(%rbp)
movq %rsi, -0x30(%rbp)
movl %edx, -0x34(%rbp)
movb %al, -0x35(%rbp)
movl %r8d, -0x3c(%rbp)
movq %r9, -0x48(%rbp)
jmp 0x40a56
movq -0x30(%rbp), %rax
sarq $0x20, %rax
movb %al, -0x20(%rbp)
movq -0x30(%rbp), %rax
sarq $0x20, %rax
shrl $0x8, %eax
movb %al, -0x1f(%rbp)
movq -0x30(%rbp), %rax
sarq $0x20, %rax
shrl $0x10, %eax
movb %al, -0x1e(%rbp)
jmp 0x40a7f
leaq -0x20(%rbp), %rax
addq $0x3, %rax
movq %rax, -0xa8(%rbp)
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq -0x30(%rbp), %rax
movl %eax, %ecx
movq -0xa8(%rbp), %rax
movl %ecx, (%rax)
jmp 0x40aa9
movl -0x34(%rbp), %eax
movb %al, -0x17(%rbp)
leaq -0x20(%rbp), %rax
addq $0x7, %rax
addq $0x2, %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x90(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x98(%rbp)
movq 0x10(%rbp), %rax
movq %rax, -0x88(%rbp)
movl $0x0, -0x8c(%rbp)
cmpb $0x0, -0x35(%rbp)
je 0x40b23
movl -0x3c(%rbp), %eax
movl %eax, -0x8c(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0xb0(%rbp)
movl -0x3c(%rbp), %ecx
movq -0xb0(%rbp), %rax
movl %ecx, (%rax)
movq -0x50(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x50(%rbp)
jmp 0x40be9
cmpl $0x16, -0x34(%rbp)
je 0x40b33
cmpl $0x18, -0x34(%rbp)
jne 0x40be7
movq 0x10(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rax
movl 0x10(%rax), %eax
movb %al, %cl
movq -0x50(%rbp), %rax
movb %cl, (%rax)
movq -0xb8(%rbp), %rax
cmpq $-0x1, 0x8(%rax)
jne 0x40b71
movabsq $0xffffffffff, %rax # imm = 0xFFFFFFFFFF
movq %rax, -0xd0(%rbp)
jmp 0x40b95
movq -0xb8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rcx), %rcx
movl 0x7bc(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xc8(%rbp)
movq -0xc0(%rbp), %rax
movl %eax, %ecx
movq -0xc8(%rbp), %rax
movl %ecx, (%rax)
movq -0xc0(%rbp), %rax
shrq $0x20, %rax
movb %al, %cl
movq -0xc8(%rbp), %rax
movb %cl, 0x4(%rax)
movq -0x50(%rbp), %rax
addq $0x6, %rax
movq %rax, -0x50(%rbp)
jmp 0x40be9
leaq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x50(%rbp), %rax
leaq -0x20(%rbp), %rcx
subq %rcx, %rax
movl %eax, %eax
movq %rax, -0x58(%rbp)
cmpl $0x27, -0x34(%rbp)
jne 0x40c27
movq -0x28(%rbp), %rax
movq (%rax), %rdi
addq $0x8f0, %rdi # imm = 0x8F0
leaq 0x11bf93(%rip), %rsi # 0x15cbb0
movl $0x86, %edx
callq 0x40cd0
movq -0x48(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0x28(%rbp), %rcx
movq -0x58(%rbp), %rax
movl %eax, %r8d
leaq -0x80(%rbp), %r11
leaq -0x20(%rbp), %r10
addq $0x7, %r10
movl $0x10, %esi
movl $0x3, %r9d
leaq -0x98(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x8e280
movb %al, -0x99(%rbp)
cmpl $0x27, -0x34(%rbp)
jne 0x40c8e
movq -0x28(%rbp), %rax
movq (%rax), %rdi
addq $0x8f0, %rdi # imm = 0x8F0
callq 0x40d40
jmp 0x40c90
movb -0x99(%rbp), %al
movb %al, -0xd1(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x40cbd
movb -0xd1(%rbp), %al
addq $0xf0, %rsp
popq %rbp
retq
callq 0x2a250
nopw %cs:(%rax,%rax)
| _ma_write_clr:
push rbp
mov rbp, rsp
sub rsp, 0F0h
mov al, cl
mov rcx, [rbp+arg_0]
mov rcx, fs:28h
mov [rbp+var_8], rcx
mov [rbp+var_28], rdi
mov [rbp+var_30], rsi
mov [rbp+var_34], edx
mov [rbp+var_35], al
mov [rbp+var_3C], r8d
mov [rbp+var_48], r9
jmp short $+2
loc_40A56:
mov rax, [rbp+var_30]
sar rax, 20h
mov [rbp+var_20], al
mov rax, [rbp+var_30]
sar rax, 20h
shr eax, 8
mov [rbp+var_1F], al
mov rax, [rbp+var_30]
sar rax, 20h
shr eax, 10h
mov [rbp+var_1E], al
jmp short $+2
loc_40A7F:
lea rax, [rbp+var_20]
add rax, 3
mov [rbp+var_A8], rax
mov rax, 0FFFFFFFFh
and rax, [rbp+var_30]
mov ecx, eax
mov rax, [rbp+var_A8]
mov [rax], ecx
jmp short $+2
loc_40AA9:
mov eax, [rbp+var_34]
mov [rbp+var_17], al
lea rax, [rbp+var_20]
add rax, 7
add rax, 2
add rax, 1
mov [rbp+var_50], rax
mov eax, [rbp+var_34]
mov [rbp+var_90], eax
mov rax, [rbp+var_30]
mov [rbp+var_98], rax
mov rax, [rbp+arg_0]
mov [rbp+var_88], rax
mov [rbp+var_8C], 0
cmp [rbp+var_35], 0
jz short loc_40B23
mov eax, [rbp+var_3C]
mov [rbp+var_8C], eax
mov rax, [rbp+var_50]
mov [rbp+var_B0], rax
mov ecx, [rbp+var_3C]
mov rax, [rbp+var_B0]
mov [rax], ecx
mov rax, [rbp+var_50]
add rax, 4
mov [rbp+var_50], rax
jmp loc_40BE9
loc_40B23:
cmp [rbp+var_34], 16h
jz short loc_40B33
cmp [rbp+var_34], 18h
jnz loc_40BE7
loc_40B33:
mov rax, [rbp+arg_0]
mov [rbp+var_B8], rax
mov rax, [rbp+var_B8]
mov eax, [rax+10h]
mov cl, al
mov rax, [rbp+var_50]
mov [rax], cl
mov rax, [rbp+var_B8]
cmp qword ptr [rax+8], 0FFFFFFFFFFFFFFFFh
jnz short loc_40B71
mov rax, 0FFFFFFFFFFh
mov [rbp+var_D0], rax
jmp short loc_40B95
loc_40B71:
mov rax, [rbp+var_B8]
mov rax, [rax+8]
mov rcx, [rbp+var_28]
mov rcx, [rcx]
mov ecx, [rcx+7BCh]
xor edx, edx
div rcx
mov [rbp+var_D0], rax
loc_40B95:
mov rax, [rbp+var_D0]
mov [rbp+var_C0], rax
mov rax, [rbp+var_50]
add rax, 1
mov [rbp+var_C8], rax
mov rax, [rbp+var_C0]
mov ecx, eax
mov rax, [rbp+var_C8]
mov [rax], ecx
mov rax, [rbp+var_C0]
shr rax, 20h
mov cl, al
mov rax, [rbp+var_C8]
mov [rax+4], cl
mov rax, [rbp+var_50]
add rax, 6
mov [rbp+var_50], rax
loc_40BE7:
jmp short $+2
loc_40BE9:
lea rax, [rbp+var_20]
mov [rbp+var_60], rax
mov rax, [rbp+var_50]
lea rcx, [rbp+var_20]
sub rax, rcx
mov eax, eax
mov [rbp+var_58], rax
cmp [rbp+var_34], 27h ; '''
jnz short loc_40C27
mov rax, [rbp+var_28]
mov rdi, [rax]
add rdi, 8F0h
lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 86h
call inline_mysql_mutex_lock_3
loc_40C27:
mov rdi, [rbp+var_48]
mov rax, [rbp+var_28]
mov rdx, [rax+8]
mov rcx, [rbp+var_28]
mov rax, [rbp+var_58]
mov r8d, eax
lea r11, [rbp+var_80]
lea r10, [rbp+var_20]
add r10, 7
mov esi, 10h
mov r9d, 3
lea rax, [rbp+var_98]
mov [rsp+0F0h+var_F0], r11
mov [rsp+0F0h+var_E8], r10
mov [rsp+0F0h+var_E0], rax
call translog_write_record
mov [rbp+var_99], al
cmp [rbp+var_34], 27h ; '''
jnz short loc_40C8E
mov rax, [rbp+var_28]
mov rdi, [rax]
add rdi, 8F0h
call inline_mysql_mutex_unlock_3
loc_40C8E:
jmp short $+2
loc_40C90:
mov al, [rbp+var_99]
mov [rbp+var_D1], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_40CBD
mov al, [rbp+var_D1]
add rsp, 0F0h
pop rbp
retn
loc_40CBD:
call ___stack_chk_fail
| char ma_write_clr(_QWORD *a1, long long a2, int a3, char a4, int a5, long long a6, long long a7)
{
unsigned long long v8; // [rsp+20h] [rbp-D0h]
char *v9; // [rsp+28h] [rbp-C8h]
char v10; // [rsp+57h] [rbp-99h]
long long v11; // [rsp+58h] [rbp-98h] BYREF
int v12; // [rsp+60h] [rbp-90h]
int v13; // [rsp+64h] [rbp-8Ch]
long long v14; // [rsp+68h] [rbp-88h]
_BYTE v15[32]; // [rsp+70h] [rbp-80h] BYREF
__int16 *v16; // [rsp+90h] [rbp-60h]
long long v17; // [rsp+98h] [rbp-58h]
_DWORD *v18; // [rsp+A0h] [rbp-50h]
long long v19; // [rsp+A8h] [rbp-48h]
int v20; // [rsp+B4h] [rbp-3Ch]
char v21; // [rsp+BBh] [rbp-35h]
int v22; // [rsp+BCh] [rbp-34h]
long long v23; // [rsp+C0h] [rbp-30h]
_QWORD *v24; // [rsp+C8h] [rbp-28h]
__int16 v25; // [rsp+D0h] [rbp-20h] BYREF
char v26; // [rsp+D2h] [rbp-1Eh]
int v27; // [rsp+D3h] [rbp-1Dh]
_BYTE v28[3]; // [rsp+D7h] [rbp-19h] BYREF
_BYTE v29[22]; // [rsp+DAh] [rbp-16h] BYREF
*(_QWORD *)&v29[14] = __readfsqword(0x28u);
v24 = a1;
v23 = a2;
v22 = a3;
v21 = a4;
v20 = a5;
v19 = a6;
v25 = WORD2(a2);
v26 = BYTE6(a2);
v27 = a2;
v28[2] = a3;
v18 = v29;
v12 = a3;
v11 = a2;
v14 = a7;
v13 = 0;
if ( a4 )
{
v13 = v20;
*v18++ = v20;
}
else if ( v22 == 22 || v22 == 24 )
{
*(_BYTE *)v18 = *(_DWORD *)(a7 + 16);
if ( *(_QWORD *)(a7 + 8) == -1LL )
v8 = 0xFFFFFFFFFFLL;
else
v8 = *(_QWORD *)(a7 + 8) / (unsigned long long)*(unsigned int *)(*v24 + 1980LL);
v9 = (char *)v18 + 1;
*(_DWORD *)((char *)v18 + 1) = v8;
v9[4] = BYTE4(v8);
v18 = (_DWORD *)((char *)v18 + 6);
}
v16 = &v25;
v17 = (unsigned int)v18 - (unsigned int)&v25;
if ( v22 == 39 )
inline_mysql_mutex_lock_3(
*v24 + 2288LL,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_key_recover.c",
134LL);
v10 = translog_write_record(v19, 16, v24[1], (_DWORD)v24, v17, 3, (long long)v15, (long long)v28, (long long)&v11);
if ( v22 == 39 )
inline_mysql_mutex_unlock_3(*v24 + 2288LL);
return v10;
}
| _ma_write_clr:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xf0
MOV AL,CL
MOV RCX,qword ptr [RBP + 0x10]
MOV RCX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RCX
MOV qword ptr [RBP + -0x28],RDI
MOV qword ptr [RBP + -0x30],RSI
MOV dword ptr [RBP + -0x34],EDX
MOV byte ptr [RBP + -0x35],AL
MOV dword ptr [RBP + -0x3c],R8D
MOV qword ptr [RBP + -0x48],R9
JMP 0x00140a56
LAB_00140a56:
MOV RAX,qword ptr [RBP + -0x30]
SAR RAX,0x20
MOV byte ptr [RBP + -0x20],AL
MOV RAX,qword ptr [RBP + -0x30]
SAR RAX,0x20
SHR EAX,0x8
MOV byte ptr [RBP + -0x1f],AL
MOV RAX,qword ptr [RBP + -0x30]
SAR RAX,0x20
SHR EAX,0x10
MOV byte ptr [RBP + -0x1e],AL
JMP 0x00140a7f
LAB_00140a7f:
LEA RAX,[RBP + -0x20]
ADD RAX,0x3
MOV qword ptr [RBP + -0xa8],RAX
MOV RAX,0xffffffff
AND RAX,qword ptr [RBP + -0x30]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0xa8]
MOV dword ptr [RAX],ECX
JMP 0x00140aa9
LAB_00140aa9:
MOV EAX,dword ptr [RBP + -0x34]
MOV byte ptr [RBP + -0x17],AL
LEA RAX,[RBP + -0x20]
ADD RAX,0x7
ADD RAX,0x2
ADD RAX,0x1
MOV qword ptr [RBP + -0x50],RAX
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x90],EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x98],RAX
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x88],RAX
MOV dword ptr [RBP + -0x8c],0x0
CMP byte ptr [RBP + -0x35],0x0
JZ 0x00140b23
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x8c],EAX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0xb0],RAX
MOV ECX,dword ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0xb0]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x4
MOV qword ptr [RBP + -0x50],RAX
JMP 0x00140be9
LAB_00140b23:
CMP dword ptr [RBP + -0x34],0x16
JZ 0x00140b33
CMP dword ptr [RBP + -0x34],0x18
JNZ 0x00140be7
LAB_00140b33:
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0xb8],RAX
MOV RAX,qword ptr [RBP + -0xb8]
MOV EAX,dword ptr [RAX + 0x10]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x50]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0xb8]
CMP qword ptr [RAX + 0x8],-0x1
JNZ 0x00140b71
MOV RAX,0xffffffffff
MOV qword ptr [RBP + -0xd0],RAX
JMP 0x00140b95
LAB_00140b71:
MOV RAX,qword ptr [RBP + -0xb8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0x7bc]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0xd0],RAX
LAB_00140b95:
MOV RAX,qword ptr [RBP + -0xd0]
MOV qword ptr [RBP + -0xc0],RAX
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x1
MOV qword ptr [RBP + -0xc8],RAX
MOV RAX,qword ptr [RBP + -0xc0]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0xc8]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0xc0]
SHR RAX,0x20
MOV CL,AL
MOV RAX,qword ptr [RBP + -0xc8]
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x6
MOV qword ptr [RBP + -0x50],RAX
LAB_00140be7:
JMP 0x00140be9
LAB_00140be9:
LEA RAX,[RBP + -0x20]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x50]
LEA RCX,[RBP + -0x20]
SUB RAX,RCX
MOV EAX,EAX
MOV qword ptr [RBP + -0x58],RAX
CMP dword ptr [RBP + -0x34],0x27
JNZ 0x00140c27
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX]
ADD RDI,0x8f0
LEA RSI,[0x25cbb0]
MOV EDX,0x86
CALL 0x00140cd0
LAB_00140c27:
MOV RDI,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x58]
MOV R8D,EAX
LEA R11,[RBP + -0x80]
LEA R10,[RBP + -0x20]
ADD R10,0x7
MOV ESI,0x10
MOV R9D,0x3
LEA RAX,[RBP + -0x98]
MOV qword ptr [RSP],R11
MOV qword ptr [RSP + 0x8],R10
MOV qword ptr [RSP + 0x10],RAX
CALL 0x0018e280
MOV byte ptr [RBP + -0x99],AL
CMP dword ptr [RBP + -0x34],0x27
JNZ 0x00140c8e
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX]
ADD RDI,0x8f0
CALL 0x00140d40
LAB_00140c8e:
JMP 0x00140c90
LAB_00140c90:
MOV AL,byte ptr [RBP + -0x99]
MOV byte ptr [RBP + -0xd1],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00140cbd
MOV AL,byte ptr [RBP + -0xd1]
ADD RSP,0xf0
POP RBP
RET
LAB_00140cbd:
CALL 0x0012a250
|
int8
_ma_write_clr(long *param_1,int8 param_2,int param_3,char param_4,int4 param_5,
int8 param_6,long param_7)
{
int1 uVar1;
long in_FS_OFFSET;
int1 uStack_d4;
int8 local_a0;
int local_98;
int4 local_94;
long local_90;
int1 local_88 [32];
int1 *local_68;
ulong local_60;
int4 *local_58;
int8 local_50;
int4 local_44;
char local_3d;
int local_3c;
int8 local_38;
long *local_30;
int1 local_28;
int1 local_27;
int1 local_26;
int4 local_25;
int1 auStack_21 [2];
int1 local_1f;
int4 local_1e;
int1 auStack_1a [10];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_28 = (int1)((ulong)param_2 >> 0x20);
local_27 = (int1)((ulong)param_2 >> 0x28);
local_26 = (int1)((ulong)param_2 >> 0x30);
local_25 = (int4)param_2;
local_1f = (int1)param_3;
local_58 = &local_1e;
local_90 = param_7;
local_94 = 0;
if (param_4 == '\0') {
if ((param_3 == 0x16) || (param_3 == 0x18)) {
local_1e = CONCAT31(local_1e._1_3_,(char)*(int4 *)(param_7 + 0x10));
if (*(long *)(param_7 + 8) == -1) {
uStack_d4 = 0xff;
}
else {
uStack_d4 = (int1)
(*(ulong *)(param_7 + 8) / (ulong)*(uint *)(*param_1 + 0x7bc) >> 0x20);
}
auStack_1a[1] = uStack_d4;
local_58 = (int4 *)(auStack_1a + 2);
}
}
else {
local_58 = (int4 *)auStack_1a;
local_94 = param_5;
local_1e = param_5;
}
local_68 = &local_28;
local_60 = (ulong)(uint)((int)local_58 - (int)&local_28);
local_a0 = param_2;
local_98 = param_3;
local_50 = param_6;
local_44 = param_5;
local_3d = param_4;
local_3c = param_3;
local_38 = param_2;
local_30 = param_1;
if (param_3 == 0x27) {
inline_mysql_mutex_lock
(*param_1 + 0x8f0,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_key_recover.c",0x86);
}
uVar1 = translog_write_record
(local_50,0x10,local_30[1],local_30,local_60 & 0xffffffff,3,local_88,auStack_21,
&local_a0);
if (local_3c == 0x27) {
inline_mysql_mutex_unlock(*local_30 + 0x8f0);
}
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),uVar1);
}
| |
33,592 | init_weight_level | eloqsql/strings/ctype-uca.c | static my_bool
init_weight_level(MY_CHARSET_LOADER *loader, MY_COLL_RULES *rules,
MY_UCA_WEIGHT_LEVEL *dst, const MY_UCA_WEIGHT_LEVEL *src)
{
MY_COLL_RULE *r, *rlast;
int ncontractions= 0;
size_t i, npages= (src->maxchar + 1) / 256;
dst->maxchar= src->maxchar;
dst->levelno= src->levelno;
if (check_rules(loader, rules, dst, src))
return TRUE;
/* Allocate memory for pages and their lengths */
if (!(dst->lengths= (uchar *) (loader->once_alloc)(npages)) ||
!(dst->weights= (uint16 **) (loader->once_alloc)(npages *
sizeof(uint16 *))))
return TRUE;
/* Copy pages lengths and page pointers from the default UCA weights */
memcpy(dst->lengths, src->lengths, npages);
memcpy(dst->weights, src->weights, npages * sizeof(uint16 *));
/*
Calculate maximum lengths for the pages which will be overwritten.
Mark pages that will be otherwriten as NULL.
We'll allocate their own memory.
*/
for (r= rules->rule, rlast= rules->rule + rules->nrules; r < rlast; r++)
{
if (!r->curr[1]) /* If not a contraction */
{
uint pagec= (r->curr[0] >> 8);
if (r->base[1]) /* Expansion */
{
/* Reserve space for maximum possible length */
dst->lengths[pagec]= MY_UCA_MAX_WEIGHT_SIZE;
}
else
{
/*
Not an expansion and not a contraction.
The page corresponding to r->curr[0] in "dst"
will need at least the same amount of weights
that r->base[0] has in "src".
*/
uint wsize= my_weight_size_on_page(src, r->base[0] >> 8);
if (dst->lengths[pagec] < wsize)
dst->lengths[pagec]= wsize;
}
dst->weights[pagec]= NULL; /* Mark that we'll overwrite this page */
}
else
ncontractions++;
}
ncontractions += (int)src->contractions.nitems;
if ((my_uca_generate_pages(loader, dst, src, (uint)npages)))
return TRUE;
if (ncontractions)
{
if (my_uca_alloc_contractions(&dst->contractions, loader, ncontractions))
return TRUE;
}
/*
Preparatory step is done at this point.
Now we have memory allocated for the pages that we'll overwrite,
and for contractions, including previous context contractions.
Also, for the pages that we'll overwrite, we have copied default weights.
Now iterate through the rules, overwrite weights for the characters
that appear in the rules, and put all contractions into contraction list.
*/
for (r= rules->rule; r < rlast; r++)
{
if (apply_one_rule(loader, rules, r, dst))
return TRUE;
}
/*
Add built-in contractions (e.g. for Thai)
*/
for (i= 0; i != src->contractions.nitems; i++)
{
MY_CONTRACTION *item= &src->contractions.item[i];
/*
TODO: calculate length from item->ch.
Generally contractions can consist of more than 2 characters.
*/
uint length= 2;
uint16 *weights= my_uca_init_one_contraction(&dst->contractions,
item->ch, length,
item->with_context);
memcpy(weights, item->weight, length * sizeof(uint16));
weights[length]= 0;
}
return FALSE;
} | O0 | c | init_weight_level:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl $0x0, -0x3c(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
addq $0x1, %rax
shrq $0x8, %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movl 0x30(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x30(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x521e0
cmpl $0x0, %eax
je 0x50901
movb $0x1, -0x1(%rbp)
jmp 0x50b95
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rax
movq -0x50(%rbp), %rdi
callq *%rax
movq -0x20(%rbp), %rcx
movq %rax, 0x8(%rcx)
cmpq $0x0, %rax
je 0x50943
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rax
movq -0x50(%rbp), %rdi
shlq $0x3, %rdi
callq *%rax
movq -0x20(%rbp), %rcx
movq %rax, 0x10(%rcx)
cmpq $0x0, %rax
jne 0x5094c
movb $0x1, -0x1(%rbp)
jmp 0x50b95
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x50(%rbp), %rdx
callq 0x25220
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x50(%rbp), %rdx
shlq $0x3, %rdx
callq 0x25220
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x18(%rbp), %rcx
imulq $0xa0, 0x10(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x50a66
movq -0x30(%rbp), %rax
cmpq $0x0, 0x58(%rax)
jne 0x50a48
movq -0x30(%rbp), %rax
movq 0x50(%rax), %rax
shrq $0x8, %rax
movl %eax, -0x54(%rbp)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x509f1
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x54(%rbp), %ecx
movb $0x9, (%rax,%rcx)
jmp 0x50a33
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rax
shrq $0x8, %rax
movl %eax, %esi
callq 0x522d0
movl %eax, -0x58(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x54(%rbp), %ecx
movzbl (%rax,%rcx), %eax
cmpl -0x58(%rbp), %eax
jae 0x50a31
movl -0x58(%rbp), %eax
movb %al, %dl
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x54(%rbp), %ecx
movb %dl, (%rax,%rcx)
jmp 0x50a33
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x54(%rbp), %ecx
movq $0x0, (%rax,%rcx,8)
jmp 0x50a51
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x50a53
movq -0x30(%rbp), %rax
addq $0xa0, %rax
movq %rax, -0x30(%rbp)
jmp 0x509a9
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
addl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x50(%rbp), %rax
movl %eax, %ecx
callq 0x52320
cmpb $0x0, %al
je 0x50a98
movb $0x1, -0x1(%rbp)
jmp 0x50b95
cmpl $0x0, -0x3c(%rbp)
je 0x50ac2
movq -0x20(%rbp), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rsi
movslq -0x3c(%rbp), %rdx
callq 0x523b0
cmpb $0x0, %al
je 0x50ac0
movb $0x1, -0x1(%rbp)
jmp 0x50b95
jmp 0x50ac2
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x50b0c
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x52450
cmpb $0x0, %al
je 0x50afa
movb $0x1, -0x1(%rbp)
jmp 0x50b95
jmp 0x50afc
movq -0x30(%rbp), %rax
addq $0xa0, %rax
movq %rax, -0x30(%rbp)
jmp 0x50ace
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq -0x28(%rbp), %rcx
cmpq 0x18(%rcx), %rax
je 0x50b91
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
imulq $0x58, -0x48(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movl $0x2, -0x64(%rbp)
movq -0x20(%rbp), %rdi
addq $0x18, %rdi
movq -0x60(%rbp), %rsi
movl -0x64(%rbp), %edx
movq -0x60(%rbp), %rax
movsbl 0x52(%rax), %ecx
callq 0x52630
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rdi
movq -0x60(%rbp), %rsi
addq $0x30, %rsi
movl -0x64(%rbp), %eax
movl %eax, %edx
shlq %rdx
callq 0x25220
movq -0x70(%rbp), %rax
movl -0x64(%rbp), %ecx
movw $0x0, (%rax,%rcx,2)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x50b14
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x70, %rsp
popq %rbp
retq
nop
| init_weight_level:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_3C], 0
mov rax, [rbp+var_28]
mov rax, [rax]
add rax, 1
shr rax, 8
mov [rbp+var_50], rax
mov rax, [rbp+var_28]
mov rcx, [rax]
mov rax, [rbp+var_20]
mov [rax], rcx
mov rax, [rbp+var_28]
mov ecx, [rax+30h]
mov rax, [rbp+var_20]
mov [rax+30h], ecx
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
call check_rules
cmp eax, 0
jz short loc_50901
mov [rbp+var_1], 1
jmp loc_50B95
loc_50901:
mov rax, [rbp+var_10]
mov rax, [rax+80h]
mov rdi, [rbp+var_50]
call rax
mov rcx, [rbp+var_20]
mov [rcx+8], rax
cmp rax, 0
jz short loc_50943
mov rax, [rbp+var_10]
mov rax, [rax+80h]
mov rdi, [rbp+var_50]
shl rdi, 3
call rax
mov rcx, [rbp+var_20]
mov [rcx+10h], rax
cmp rax, 0
jnz short loc_5094C
loc_50943:
mov [rbp+var_1], 1
jmp loc_50B95
loc_5094C:
mov rax, [rbp+var_20]
mov rdi, [rax+8]
mov rax, [rbp+var_28]
mov rsi, [rax+8]
mov rdx, [rbp+var_50]
call _memcpy
mov rax, [rbp+var_20]
mov rdi, [rax+10h]
mov rax, [rbp+var_28]
mov rsi, [rax+10h]
mov rdx, [rbp+var_50]
shl rdx, 3
call _memcpy
mov rax, [rbp+var_18]
mov rax, [rax+20h]
mov [rbp+var_30], rax
mov rax, [rbp+var_18]
mov rax, [rax+20h]
mov rcx, [rbp+var_18]
imul rcx, [rcx+10h], 0A0h
add rax, rcx
mov [rbp+var_38], rax
loc_509A9:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jnb loc_50A66
mov rax, [rbp+var_30]
cmp qword ptr [rax+58h], 0
jnz loc_50A48
mov rax, [rbp+var_30]
mov rax, [rax+50h]
shr rax, 8
mov [rbp+var_54], eax
mov rax, [rbp+var_30]
cmp qword ptr [rax+8], 0
jz short loc_509F1
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov ecx, [rbp+var_54]
mov byte ptr [rax+rcx], 9
jmp short loc_50A33
loc_509F1:
mov rdi, [rbp+var_28]
mov rax, [rbp+var_30]
mov rax, [rax]
shr rax, 8
mov esi, eax
call my_weight_size_on_page
mov [rbp+var_58], eax
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov ecx, [rbp+var_54]
movzx eax, byte ptr [rax+rcx]
cmp eax, [rbp+var_58]
jnb short loc_50A31
mov eax, [rbp+var_58]
mov dl, al
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov ecx, [rbp+var_54]
mov [rax+rcx], dl
loc_50A31:
jmp short $+2
loc_50A33:
mov rax, [rbp+var_20]
mov rax, [rax+10h]
mov ecx, [rbp+var_54]
mov qword ptr [rax+rcx*8], 0
jmp short loc_50A51
loc_50A48:
mov eax, [rbp+var_3C]
add eax, 1
mov [rbp+var_3C], eax
loc_50A51:
jmp short $+2
loc_50A53:
mov rax, [rbp+var_30]
add rax, 0A0h
mov [rbp+var_30], rax
jmp loc_509A9
loc_50A66:
mov rax, [rbp+var_28]
mov rax, [rax+18h]
add eax, [rbp+var_3C]
mov [rbp+var_3C], eax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
mov rax, [rbp+var_50]
mov ecx, eax
call my_uca_generate_pages
cmp al, 0
jz short loc_50A98
mov [rbp+var_1], 1
jmp loc_50B95
loc_50A98:
cmp [rbp+var_3C], 0
jz short loc_50AC2
mov rdi, [rbp+var_20]
add rdi, 18h
mov rsi, [rbp+var_10]
movsxd rdx, [rbp+var_3C]
call my_uca_alloc_contractions
cmp al, 0
jz short loc_50AC0
mov [rbp+var_1], 1
jmp loc_50B95
loc_50AC0:
jmp short $+2
loc_50AC2:
mov rax, [rbp+var_18]
mov rax, [rax+20h]
mov [rbp+var_30], rax
loc_50ACE:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jnb short loc_50B0C
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_30]
mov rcx, [rbp+var_20]
call apply_one_rule
cmp al, 0
jz short loc_50AFA
mov [rbp+var_1], 1
jmp loc_50B95
loc_50AFA:
jmp short $+2
loc_50AFC:
mov rax, [rbp+var_30]
add rax, 0A0h
mov [rbp+var_30], rax
jmp short loc_50ACE
loc_50B0C:
mov [rbp+var_48], 0
loc_50B14:
mov rax, [rbp+var_48]
mov rcx, [rbp+var_28]
cmp rax, [rcx+18h]
jz short loc_50B91
mov rax, [rbp+var_28]
mov rax, [rax+20h]
imul rcx, [rbp+var_48], 58h ; 'X'
add rax, rcx
mov [rbp+var_60], rax
mov [rbp+var_64], 2
mov rdi, [rbp+var_20]
add rdi, 18h
mov rsi, [rbp+var_60]
mov edx, [rbp+var_64]
mov rax, [rbp+var_60]
movsx ecx, byte ptr [rax+52h]
call my_uca_init_one_contraction
mov [rbp+var_70], rax
mov rdi, [rbp+var_70]
mov rsi, [rbp+var_60]
add rsi, 30h ; '0'
mov eax, [rbp+var_64]
mov edx, eax
shl rdx, 1
call _memcpy
mov rax, [rbp+var_70]
mov ecx, [rbp+var_64]
mov word ptr [rax+rcx*2], 0
mov rax, [rbp+var_48]
add rax, 1
mov [rbp+var_48], rax
jmp short loc_50B14
loc_50B91:
mov [rbp+var_1], 0
loc_50B95:
mov al, [rbp+var_1]
add rsp, 70h
pop rbp
retn
| char init_weight_level(long long a1, long long a2, long long a3, long long a4)
{
long long v4; // rax
long long v5; // rax
long long inited; // [rsp+0h] [rbp-70h]
long long v8; // [rsp+10h] [rbp-60h]
unsigned int v9; // [rsp+18h] [rbp-58h]
unsigned int v10; // [rsp+1Ch] [rbp-54h]
unsigned long long v11; // [rsp+20h] [rbp-50h]
long long j; // [rsp+28h] [rbp-48h]
int v13; // [rsp+34h] [rbp-3Ch]
int v14; // [rsp+34h] [rbp-3Ch]
_QWORD *v15; // [rsp+38h] [rbp-38h]
_QWORD *v16; // [rsp+40h] [rbp-30h]
unsigned long long i; // [rsp+40h] [rbp-30h]
v13 = 0;
v11 = (unsigned long long)(*(_QWORD *)a4 + 1LL) >> 8;
*(_QWORD *)a3 = *(_QWORD *)a4;
*(_DWORD *)(a3 + 48) = *(_DWORD *)(a4 + 48);
if ( (unsigned int)check_rules(a1, a2, a3, a4) )
return 1;
v4 = (*(long long ( **)(unsigned long long))(a1 + 128))(v11);
*(_QWORD *)(a3 + 8) = v4;
if ( !v4 )
return 1;
v5 = (*(long long ( **)(unsigned long long))(a1 + 128))(8 * v11);
*(_QWORD *)(a3 + 16) = v5;
if ( !v5 )
return 1;
memcpy(*(_QWORD *)(a3 + 8), *(_QWORD *)(a4 + 8), v11);
memcpy(*(_QWORD *)(a3 + 16), *(_QWORD *)(a4 + 16), 8 * v11);
v16 = *(_QWORD **)(a2 + 32);
v15 = &v16[20 * *(_QWORD *)(a2 + 16)];
while ( v16 < v15 )
{
if ( v16[11] )
{
++v13;
}
else
{
v10 = v16[10] >> 8;
if ( v16[1] )
{
*(_BYTE *)(*(_QWORD *)(a3 + 8) + v10) = 9;
}
else
{
v9 = my_weight_size_on_page(a4, (unsigned int)(*v16 >> 8));
if ( *(unsigned __int8 *)(*(_QWORD *)(a3 + 8) + v10) < v9 )
*(_BYTE *)(*(_QWORD *)(a3 + 8) + v10) = v9;
}
*(_QWORD *)(*(_QWORD *)(a3 + 16) + 8LL * v10) = 0LL;
}
v16 += 20;
}
v14 = v13 + *(_QWORD *)(a4 + 24);
if ( (unsigned __int8)my_uca_generate_pages(a1, a3, a4, (unsigned int)v11) )
return 1;
if ( v14 && (unsigned __int8)my_uca_alloc_contractions(a3 + 24, a1, v14) )
return 1;
for ( i = *(_QWORD *)(a2 + 32); i < (unsigned long long)v15; i += 160LL )
{
if ( (unsigned __int8)apply_one_rule(a1, a2, i, a3) )
return 1;
}
for ( j = 0LL; j != *(_QWORD *)(a4 + 24); ++j )
{
v8 = 88 * j + *(_QWORD *)(a4 + 32);
inited = my_uca_init_one_contraction(a3 + 24, v8, 2LL, (unsigned int)*(char *)(v8 + 82));
memcpy(inited, v8 + 48, 4LL);
*(_WORD *)(inited + 4) = 0;
}
return 0;
}
| init_weight_level:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV dword ptr [RBP + -0x3c],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
ADD RAX,0x1
SHR RAX,0x8
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RAX + 0x30]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x30],ECX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
CALL 0x001521e0
CMP EAX,0x0
JZ 0x00150901
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00150b95
LAB_00150901:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x80]
MOV RDI,qword ptr [RBP + -0x50]
CALL RAX
MOV RCX,qword ptr [RBP + -0x20]
MOV qword ptr [RCX + 0x8],RAX
CMP RAX,0x0
JZ 0x00150943
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x80]
MOV RDI,qword ptr [RBP + -0x50]
SHL RDI,0x3
CALL RAX
MOV RCX,qword ptr [RBP + -0x20]
MOV qword ptr [RCX + 0x10],RAX
CMP RAX,0x0
JNZ 0x0015094c
LAB_00150943:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00150b95
LAB_0015094c:
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RAX + 0x8]
MOV RDX,qword ptr [RBP + -0x50]
CALL 0x00125220
MOV RAX,qword ptr [RBP + -0x20]
MOV RDI,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RAX + 0x10]
MOV RDX,qword ptr [RBP + -0x50]
SHL RDX,0x3
CALL 0x00125220
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x20]
MOV RCX,qword ptr [RBP + -0x18]
IMUL RCX,qword ptr [RCX + 0x10],0xa0
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
LAB_001509a9:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x00150a66
MOV RAX,qword ptr [RBP + -0x30]
CMP qword ptr [RAX + 0x58],0x0
JNZ 0x00150a48
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x50]
SHR RAX,0x8
MOV dword ptr [RBP + -0x54],EAX
MOV RAX,qword ptr [RBP + -0x30]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x001509f1
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x54]
MOV byte ptr [RAX + RCX*0x1],0x9
JMP 0x00150a33
LAB_001509f1:
MOV RDI,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
SHR RAX,0x8
MOV ESI,EAX
CALL 0x001522d0
MOV dword ptr [RBP + -0x58],EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x54]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,dword ptr [RBP + -0x58]
JNC 0x00150a31
MOV EAX,dword ptr [RBP + -0x58]
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x54]
MOV byte ptr [RAX + RCX*0x1],DL
LAB_00150a31:
JMP 0x00150a33
LAB_00150a33:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x10]
MOV ECX,dword ptr [RBP + -0x54]
MOV qword ptr [RAX + RCX*0x8],0x0
JMP 0x00150a51
LAB_00150a48:
MOV EAX,dword ptr [RBP + -0x3c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x3c],EAX
LAB_00150a51:
JMP 0x00150a53
LAB_00150a53:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0xa0
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001509a9
LAB_00150a66:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x18]
ADD EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x3c],EAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x50]
MOV ECX,EAX
CALL 0x00152320
CMP AL,0x0
JZ 0x00150a98
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00150b95
LAB_00150a98:
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x00150ac2
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x18
MOV RSI,qword ptr [RBP + -0x10]
MOVSXD RDX,dword ptr [RBP + -0x3c]
CALL 0x001523b0
CMP AL,0x0
JZ 0x00150ac0
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00150b95
LAB_00150ac0:
JMP 0x00150ac2
LAB_00150ac2:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x30],RAX
LAB_00150ace:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x00150b0c
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x20]
CALL 0x00152450
CMP AL,0x0
JZ 0x00150afa
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00150b95
LAB_00150afa:
JMP 0x00150afc
LAB_00150afc:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0xa0
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00150ace
LAB_00150b0c:
MOV qword ptr [RBP + -0x48],0x0
LAB_00150b14:
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RCX + 0x18]
JZ 0x00150b91
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x20]
IMUL RCX,qword ptr [RBP + -0x48],0x58
ADD RAX,RCX
MOV qword ptr [RBP + -0x60],RAX
MOV dword ptr [RBP + -0x64],0x2
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x18
MOV RSI,qword ptr [RBP + -0x60]
MOV EDX,dword ptr [RBP + -0x64]
MOV RAX,qword ptr [RBP + -0x60]
MOVSX ECX,byte ptr [RAX + 0x52]
CALL 0x00152630
MOV qword ptr [RBP + -0x70],RAX
MOV RDI,qword ptr [RBP + -0x70]
MOV RSI,qword ptr [RBP + -0x60]
ADD RSI,0x30
MOV EAX,dword ptr [RBP + -0x64]
MOV EDX,EAX
SHL RDX,0x1
CALL 0x00125220
MOV RAX,qword ptr [RBP + -0x70]
MOV ECX,dword ptr [RBP + -0x64]
MOV word ptr [RAX + RCX*0x2],0x0
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x1
MOV qword ptr [RBP + -0x48],RAX
JMP 0x00150b14
LAB_00150b91:
MOV byte ptr [RBP + -0x1],0x0
LAB_00150b95:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x70
POP RBP
RET
|
int1 init_weight_level(long param_1,long param_2,long *param_3,long *param_4)
{
char cVar1;
int iVar2;
uint uVar3;
uint uVar4;
ulong __n;
long lVar5;
ulong *puVar6;
void *__dest;
long local_50;
int local_44;
ulong *local_38;
local_44 = 0;
__n = *param_4 + 1U >> 8;
*param_3 = *param_4;
*(int *)(param_3 + 6) = (int)param_4[6];
iVar2 = check_rules(param_1,param_2,param_3,param_4);
if (iVar2 == 0) {
lVar5 = (**(code **)(param_1 + 0x80))(__n);
param_3[1] = lVar5;
if (lVar5 != 0) {
lVar5 = (**(code **)(param_1 + 0x80))(__n << 3);
param_3[2] = lVar5;
if (lVar5 != 0) {
memcpy((void *)param_3[1],(void *)param_4[1],__n);
memcpy((void *)param_3[2],(void *)param_4[2],__n << 3);
puVar6 = (ulong *)(*(long *)(param_2 + 0x20) + *(long *)(param_2 + 0x10) * 0xa0);
for (local_38 = *(ulong **)(param_2 + 0x20); local_38 < puVar6; local_38 = local_38 + 0x14)
{
if (local_38[0xb] == 0) {
uVar3 = (uint)(local_38[10] >> 8);
if (local_38[1] == 0) {
uVar4 = my_weight_size_on_page(param_4,*local_38 >> 8 & 0xffffffff);
if (*(byte *)(param_3[1] + (ulong)uVar3) < uVar4) {
*(char *)(param_3[1] + (ulong)uVar3) = (char)uVar4;
}
}
else {
*(int1 *)(param_3[1] + (ulong)uVar3) = 9;
}
*(int8 *)(param_3[2] + (ulong)uVar3 * 8) = 0;
}
else {
local_44 = local_44 + 1;
}
}
local_44 = (int)param_4[3] + local_44;
cVar1 = my_uca_generate_pages(param_1,param_3,param_4,__n & 0xffffffff);
if (cVar1 == '\0') {
if ((local_44 != 0) &&
(cVar1 = my_uca_alloc_contractions(param_3 + 3,param_1,(long)local_44), cVar1 != '\0'))
{
return 1;
}
local_38 = *(ulong **)(param_2 + 0x20);
while( true ) {
if (puVar6 <= local_38) {
for (local_50 = 0; local_50 != param_4[3]; local_50 = local_50 + 1) {
lVar5 = param_4[4] + local_50 * 0x58;
__dest = (void *)my_uca_init_one_contraction
(param_3 + 3,lVar5,2,(int)*(char *)(lVar5 + 0x52));
memcpy(__dest,(void *)(lVar5 + 0x30),4);
*(int2 *)((long)__dest + 4) = 0;
}
return 0;
}
cVar1 = apply_one_rule(param_1,param_2,local_38,param_3);
if (cVar1 != '\0') break;
local_38 = local_38 + 0x14;
}
return 1;
}
return 1;
}
}
}
return 1;
}
| |
33,593 | my_block_write | eloqsql/mysys/mf_iocache.c | int my_block_write(IO_CACHE *info, const uchar *Buffer, size_t Count,
my_off_t pos)
{
size_t length;
int error=0;
/*
Assert that we cannot come here with a shared cache. If we do one
day, we might need to add a call to copy_to_read_buffer().
*/
DBUG_ASSERT(!info->share);
DBUG_ASSERT(!(info->myflags & MY_ENCRYPT));
if (pos < info->pos_in_file)
{
/* Of no overlap, write everything without buffering */
if (pos + Count <= info->pos_in_file)
return (int)mysql_file_pwrite(info->file, Buffer, Count, pos,
info->myflags | MY_NABP);
/* Write the part of the block that is before buffer */
length= (uint) (info->pos_in_file - pos);
if (mysql_file_pwrite(info->file, Buffer, length, pos, info->myflags | MY_NABP))
info->error= error= -1;
Buffer+=length;
pos+= length;
Count-= length;
}
/* Check if we want to write inside the used part of the buffer.*/
length= (size_t) (info->write_end - info->buffer);
if (pos < info->pos_in_file + length)
{
size_t offset= (size_t) (pos - info->pos_in_file);
length-=offset;
if (length > Count)
length=Count;
memcpy(info->buffer+offset, Buffer, length);
Buffer+=length;
Count-= length;
/* Fix length of buffer if the new data was larger */
if (info->buffer+length > info->write_pos)
info->write_pos=info->buffer+length;
if (!Count)
return (error);
}
/* Write at the end of the current buffer; This is the normal case */
if (_my_b_write(info, Buffer, Count))
error= -1;
return error;
} | O0 | c | my_block_write:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl $0x0, -0x34(%rbp)
jmp 0xe99b1
jmp 0xe99b3
jmp 0xe99b5
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
jae 0xe9aa6
movq -0x28(%rbp), %rax
addq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
ja 0xe9a19
movq -0x10(%rbp), %rax
movl 0xd4(%rax), %edx
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
movq -0x28(%rbp), %r9
movq -0x10(%rbp), %rax
movq 0xf8(%rax), %rax
orq $0x4, %rax
leaq 0x7266b(%rip), %rdi # 0x15c06e
movl $0x673, %esi # imm = 0x673
movq %rax, (%rsp)
callq 0xe9ba0
movl %eax, -0x4(%rbp)
jmp 0xe9b97
movq -0x10(%rbp), %rax
movq (%rax), %rax
subq -0x28(%rbp), %rax
movl %eax, %eax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl 0xd4(%rax), %edx
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %r8
movq -0x28(%rbp), %r9
movq -0x10(%rbp), %rax
movq 0xf8(%rax), %rax
orq $0x4, %rax
leaq 0x72618(%rip), %rdi # 0x15c06e
movl $0x676, %esi # imm = 0x676
movq %rax, (%rsp)
callq 0xe9ba0
cmpq $0x0, %rax
je 0xe9a7f
movl $0xffffffff, -0x34(%rbp) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
movl $0xffffffff, 0xe4(%rax) # imm = 0xFFFFFFFF
movq -0x30(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x30(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x20(%rcx), %rcx
subq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
addq -0x30(%rbp), %rcx
cmpq %rcx, %rax
jae 0xe9b74
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
subq (%rcx), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rcx
movq -0x30(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
jbe 0xe9b05
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
addq -0x40(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x29090
movq -0x30(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
addq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x40(%rcx), %rax
jbe 0xe9b63
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
addq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
cmpq $0x0, -0x20(%rbp)
jne 0xe9b72
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xe9b97
jmp 0xe9b74
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xe8a30
cmpl $0x0, %eax
je 0xe9b91
movl $0xffffffff, -0x34(%rbp) # imm = 0xFFFFFFFF
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
| my_block_write:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_34], 0
jmp short $+2
loc_E99B1:
jmp short $+2
loc_E99B3:
jmp short $+2
loc_E99B5:
mov rax, [rbp+var_28]
mov rcx, [rbp+var_10]
cmp rax, [rcx]
jnb loc_E9AA6
mov rax, [rbp+var_28]
add rax, [rbp+var_20]
mov rcx, [rbp+var_10]
cmp rax, [rcx]
ja short loc_E9A19
mov rax, [rbp+var_10]
mov edx, [rax+0D4h]
mov rcx, [rbp+var_18]
mov r8, [rbp+var_20]
mov r9, [rbp+var_28]
mov rax, [rbp+var_10]
mov rax, [rax+0F8h]
or rax, 4
lea rdi, aWorkspaceLlm4b_44; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 673h
mov [rsp+50h+var_50], rax
call inline_mysql_file_pwrite_3
mov [rbp+var_4], eax
jmp loc_E9B97
loc_E9A19:
mov rax, [rbp+var_10]
mov rax, [rax]
sub rax, [rbp+var_28]
mov eax, eax
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
mov edx, [rax+0D4h]
mov rcx, [rbp+var_18]
mov r8, [rbp+var_30]
mov r9, [rbp+var_28]
mov rax, [rbp+var_10]
mov rax, [rax+0F8h]
or rax, 4
lea rdi, aWorkspaceLlm4b_44; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 676h
mov [rsp+50h+var_50], rax
call inline_mysql_file_pwrite_3
cmp rax, 0
jz short loc_E9A7F
mov [rbp+var_34], 0FFFFFFFFh
mov rax, [rbp+var_10]
mov dword ptr [rax+0E4h], 0FFFFFFFFh
loc_E9A7F:
mov rax, [rbp+var_30]
add rax, [rbp+var_18]
mov [rbp+var_18], rax
mov rax, [rbp+var_30]
add rax, [rbp+var_28]
mov [rbp+var_28], rax
mov rcx, [rbp+var_30]
mov rax, [rbp+var_20]
sub rax, rcx
mov [rbp+var_20], rax
loc_E9AA6:
mov rax, [rbp+var_10]
mov rax, [rax+48h]
mov rcx, [rbp+var_10]
mov rcx, [rcx+20h]
sub rax, rcx
mov [rbp+var_30], rax
mov rax, [rbp+var_28]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
add rcx, [rbp+var_30]
cmp rax, rcx
jnb loc_E9B74
mov rax, [rbp+var_28]
mov rcx, [rbp+var_10]
sub rax, [rcx]
mov [rbp+var_40], rax
mov rcx, [rbp+var_40]
mov rax, [rbp+var_30]
sub rax, rcx
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
cmp rax, [rbp+var_20]
jbe short loc_E9B05
mov rax, [rbp+var_20]
mov [rbp+var_30], rax
loc_E9B05:
mov rax, [rbp+var_10]
mov rdi, [rax+20h]
add rdi, [rbp+var_40]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_30]
call _memcpy
mov rax, [rbp+var_30]
add rax, [rbp+var_18]
mov [rbp+var_18], rax
mov rcx, [rbp+var_30]
mov rax, [rbp+var_20]
sub rax, rcx
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rax, [rax+20h]
add rax, [rbp+var_30]
mov rcx, [rbp+var_10]
cmp rax, [rcx+40h]
jbe short loc_E9B63
mov rax, [rbp+var_10]
mov rcx, [rax+20h]
add rcx, [rbp+var_30]
mov rax, [rbp+var_10]
mov [rax+40h], rcx
loc_E9B63:
cmp [rbp+var_20], 0
jnz short loc_E9B72
mov eax, [rbp+var_34]
mov [rbp+var_4], eax
jmp short loc_E9B97
loc_E9B72:
jmp short $+2
loc_E9B74:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call _my_b_write
cmp eax, 0
jz short loc_E9B91
mov [rbp+var_34], 0FFFFFFFFh
loc_E9B91:
mov eax, [rbp+var_34]
mov [rbp+var_4], eax
loc_E9B97:
mov eax, [rbp+var_4]
add rsp, 50h
pop rbp
retn
| long long my_block_write(long long a1, const char *a2, unsigned long long a3, unsigned long long a4)
{
unsigned long long v5; // [rsp+10h] [rbp-40h]
unsigned int v6; // [rsp+1Ch] [rbp-34h]
long long v7; // [rsp+20h] [rbp-30h]
long long v8; // [rsp+20h] [rbp-30h]
unsigned long long v9; // [rsp+20h] [rbp-30h]
unsigned long long v10; // [rsp+28h] [rbp-28h]
unsigned long long v11; // [rsp+30h] [rbp-20h]
const char *v12; // [rsp+38h] [rbp-18h]
v12 = a2;
v11 = a3;
v10 = a4;
v6 = 0;
if ( a4 < *(_QWORD *)a1 )
{
if ( a3 + a4 <= *(_QWORD *)a1 )
return (unsigned int)inline_mysql_file_pwrite_3(
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
1651,
*(_DWORD *)(a1 + 212),
(_DWORD)a2,
a3,
a4,
*(_QWORD *)(a1 + 248) | 4LL);
v7 = (unsigned int)*(_QWORD *)a1 - (unsigned int)a4;
if ( inline_mysql_file_pwrite_3(
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
1654,
*(_DWORD *)(a1 + 212),
(_DWORD)a2,
(unsigned int)*(_QWORD *)a1 - (unsigned int)a4,
a4,
*(_QWORD *)(a1 + 248) | 4LL) )
{
v6 = -1;
*(_DWORD *)(a1 + 228) = -1;
}
v12 = &a2[v7];
v10 += v7;
v11 -= v7;
}
v8 = *(_QWORD *)(a1 + 72) - *(_QWORD *)(a1 + 32);
if ( v10 >= v8 + *(_QWORD *)a1 )
goto LABEL_20;
v5 = v10 - *(_QWORD *)a1;
v9 = v8 - v5;
if ( v9 > v11 )
v9 = v11;
memcpy(v5 + *(_QWORD *)(a1 + 32), v12, v9);
v12 += v9;
v11 -= v9;
if ( v9 + *(_QWORD *)(a1 + 32) > *(_QWORD *)(a1 + 64) )
*(_QWORD *)(a1 + 64) = v9 + *(_QWORD *)(a1 + 32);
if ( v11 )
{
LABEL_20:
if ( (unsigned int)my_b_write(a1, v12, v11) )
return (unsigned int)-1;
return v6;
}
else
{
return v6;
}
}
| my_block_write:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
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 dword ptr [RBP + -0x34],0x0
JMP 0x001e99b1
LAB_001e99b1:
JMP 0x001e99b3
LAB_001e99b3:
JMP 0x001e99b5
LAB_001e99b5:
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX]
JNC 0x001e9aa6
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX]
JA 0x001e9a19
MOV RAX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RAX + 0xd4]
MOV RCX,qword ptr [RBP + -0x18]
MOV R8,qword ptr [RBP + -0x20]
MOV R9,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xf8]
OR RAX,0x4
LEA RDI,[0x25c06e]
MOV ESI,0x673
MOV qword ptr [RSP],RAX
CALL 0x001e9ba0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001e9b97
LAB_001e9a19:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
SUB RAX,qword ptr [RBP + -0x28]
MOV EAX,EAX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RAX + 0xd4]
MOV RCX,qword ptr [RBP + -0x18]
MOV R8,qword ptr [RBP + -0x30]
MOV R9,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xf8]
OR RAX,0x4
LEA RDI,[0x25c06e]
MOV ESI,0x676
MOV qword ptr [RSP],RAX
CALL 0x001e9ba0
CMP RAX,0x0
JZ 0x001e9a7f
MOV dword ptr [RBP + -0x34],0xffffffff
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xe4],0xffffffff
LAB_001e9a7f:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x28],RAX
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x20]
SUB RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
LAB_001e9aa6:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x48]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x20]
SUB RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
ADD RCX,qword ptr [RBP + -0x30]
CMP RAX,RCX
JNC 0x001e9b74
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x10]
SUB RAX,qword ptr [RCX]
MOV qword ptr [RBP + -0x40],RAX
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x30]
SUB RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x20]
JBE 0x001e9b05
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x30],RAX
LAB_001e9b05:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x20]
ADD RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x00129090
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x18],RAX
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x20]
SUB RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
ADD RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x40]
JBE 0x001e9b63
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x20]
ADD RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x40],RCX
LAB_001e9b63:
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x001e9b72
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001e9b97
LAB_001e9b72:
JMP 0x001e9b74
LAB_001e9b74:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x001e8a30
CMP EAX,0x0
JZ 0x001e9b91
MOV dword ptr [RBP + -0x34],0xffffffff
LAB_001e9b91:
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x4],EAX
LAB_001e9b97:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x50
POP RBP
RET
|
int4 my_block_write(ulong *param_1,void *param_2,ulong param_3,ulong param_4)
{
int4 uVar1;
int iVar2;
long lVar3;
int4 local_3c;
size_t local_38;
ulong local_30;
ulong local_28;
void *local_20;
local_3c = 0;
local_30 = param_4;
local_28 = param_3;
local_20 = param_2;
if (param_4 < *param_1) {
if (param_4 + param_3 <= *param_1) {
uVar1 = inline_mysql_file_pwrite
("/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x673,
*(int4 *)((long)param_1 + 0xd4),param_2,param_3,param_4,
param_1[0x1f] | 4);
return uVar1;
}
local_28 = (ulong)(uint)((int)*param_1 - (int)param_4);
lVar3 = inline_mysql_file_pwrite
("/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x676,
*(int4 *)((long)param_1 + 0xd4),param_2,local_28,param_4,
param_1[0x1f] | 4);
if (lVar3 != 0) {
local_3c = 0xffffffff;
*(int4 *)((long)param_1 + 0xe4) = 0xffffffff;
}
local_20 = (void *)(local_28 + (long)param_2);
local_30 = local_28 + param_4;
local_28 = param_3 - local_28;
}
if (local_30 < *param_1 + (param_1[9] - param_1[4])) {
local_38 = (param_1[9] - param_1[4]) - (local_30 - *param_1);
if (local_28 < local_38) {
local_38 = local_28;
}
memcpy((void *)(param_1[4] + (local_30 - *param_1)),local_20,local_38);
local_20 = (void *)(local_38 + (long)local_20);
local_28 = local_28 - local_38;
if (param_1[8] < param_1[4] + local_38) {
param_1[8] = param_1[4] + local_38;
}
if (local_28 == 0) {
return local_3c;
}
}
iVar2 = _my_b_write(param_1,local_20,local_28);
if (iVar2 != 0) {
local_3c = 0xffffffff;
}
return local_3c;
}
| |
33,594 | rak_dump_chunk | fabiosvm[P]rak/src/dump.c | void rak_dump_chunk(RakChunk *chunk)
{
printf("%d constant(s)\n", chunk->consts.len);
int len = chunk->instrs.len;
printf("%d instruction(s)\n", len);
for (int i = 0; i < len; ++i)
{
uint32_t instr = rak_slice_get(&chunk->instrs, i);
RakOpcode op = rak_instr_opcode(instr);
printf("[%04d] ", i);
switch (op)
{
case RAK_OP_NOP:
case RAK_OP_PUSH_NIL:
case RAK_OP_PUSH_FALSE:
case RAK_OP_PUSH_TRUE:
case RAK_OP_LOAD_ELEMENT:
case RAK_OP_NEW_RANGE:
case RAK_OP_POP:
case RAK_OP_EQ:
case RAK_OP_GT:
case RAK_OP_LT:
case RAK_OP_ADD:
case RAK_OP_SUB:
case RAK_OP_MUL:
case RAK_OP_DIV:
case RAK_OP_MOD:
case RAK_OP_NOT:
case RAK_OP_NEG:
case RAK_OP_HALT:
printf("%-15s\n", rak_opcode_to_cstr(op));
break;
case RAK_OP_LOAD_CONST:
case RAK_OP_LOAD_GLOBAL:
case RAK_OP_LOAD_LOCAL:
case RAK_OP_STORE_LOCAL:
case RAK_OP_NEW_ARRAY:
case RAK_OP_NEW_RECORD:
case RAK_OP_CALL:
{
uint8_t a = rak_instr_a(instr);
printf("%-15s %-5d\n", rak_opcode_to_cstr(op), a);
}
break;
case RAK_OP_JUMP:
case RAK_OP_JUMP_IF_FALSE:
case RAK_OP_JUMP_IF_TRUE:
{
uint16_t ab = rak_instr_ab(instr);
printf("%-15s %d\n", rak_opcode_to_cstr(op), ab);
}
break;
}
}
printf("\n");
} | O2 | c | rak_dump_chunk:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r12
movl 0x4(%rdi), %esi
leaq 0x433e(%rip), %rdi # 0x967a
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x2090
movl 0xffc(%r12), %r14d
leaq 0x4336(%rip), %rdi # 0x968a
movl %r14d, %esi
xorl %eax, %eax
callq 0x2090
testl %r14d, %r14d
cmovlel %ebx, %r14d
leaq 0x4331(%rip), %r15 # 0x969d
movl $0xbff148f, %r13d # imm = 0xBFF148F
xorl %ebp, %ebp
cmpq %rbp, %r14
je 0x53f2
movq 0x1000(%r12), %rax
movl (%rax,%rbp,4), %ebx
movq %r15, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x2090
cmpb $0x1b, %bl
ja 0x53ed
movzbl %bl, %edi
btl %edi, %r13d
jae 0x53b6
callq 0x3220
leaq 0x42fb(%rip), %rdi # 0x96a5
movq %rax, %rsi
xorl %eax, %eax
callq 0x2090
jmp 0x53ed
movl $0x4000b70, %eax # imm = 0x4000B70
btl %edi, %eax
jae 0x53d1
callq 0x3220
movzbl %bh, %edx
leaq 0x42dd(%rip), %rdi # 0x96ac
jmp 0x53e3
shrl $0x8, %ebx
callq 0x3220
movzwl %bx, %edx
leaq 0x42d5(%rip), %rdi # 0x96b8
movq %rax, %rsi
xorl %eax, %eax
callq 0x2090
incq %rbp
jmp 0x5374
pushq $0xa
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2040
| rak_dump_chunk:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12, rdi
mov esi, [rdi+4]
lea rdi, aDConstantS; "%d constant(s)\n"
xor ebx, ebx
xor eax, eax
call _printf
mov r14d, [r12+0FFCh]
lea rdi, aDInstructionS; "%d instruction(s)\n"
mov esi, r14d
xor eax, eax
call _printf
test r14d, r14d
cmovle r14d, ebx
lea r15, a04d; "[%04d] "
mov r13d, 0BFF148Fh
xor ebp, ebp
loc_5374:
cmp r14, rbp
jz short loc_53F2
mov rax, [r12+1000h]
mov ebx, [rax+rbp*4]
mov rdi, r15
mov esi, ebp
xor eax, eax
call _printf
cmp bl, 1Bh
ja short loc_53ED
movzx edi, bl
bt r13d, edi
jnb short loc_53B6
call rak_opcode_to_cstr
lea rdi, a15s; "%-15s\n"
mov rsi, rax
xor eax, eax
call _printf
jmp short loc_53ED
loc_53B6:
mov eax, 4000B70h
bt eax, edi
jnb short loc_53D1
call rak_opcode_to_cstr
movzx edx, bh
lea rdi, a15s5d; "%-15s %-5d\n"
jmp short loc_53E3
loc_53D1:
shr ebx, 8
call rak_opcode_to_cstr
movzx edx, bx
lea rdi, a15sD; "%-15s %d\n"
loc_53E3:
mov rsi, rax
xor eax, eax
call _printf
loc_53ED:
inc rbp
jmp short loc_5374
loc_53F2:
push 0Ah
pop rdi
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _putchar
| long long rak_dump_chunk(long long a1)
{
long long v1; // r14
int v2; // r13d
long long i; // rbp
unsigned int v4; // ebx
char *v5; // rax
int v6; // eax
char *v7; // rax
char *v8; // rax
printf("%d constant(s)\n", *(_DWORD *)(a1 + 4));
v1 = *(unsigned int *)(a1 + 4092);
printf("%d instruction(s)\n", *(_DWORD *)(a1 + 4092));
if ( (int)v1 <= 0 )
v1 = 0LL;
v2 = 201266319;
for ( i = 0LL; v1 != i; ++i )
{
v4 = *(_DWORD *)(*(_QWORD *)(a1 + 4096) + 4 * i);
printf("[%04d] ", i);
if ( (unsigned __int8)v4 <= 0x1Bu )
{
if ( _bittest(&v2, (unsigned __int8)v4) )
{
v5 = rak_opcode_to_cstr((unsigned __int8)v4);
printf("%-15s\n", v5);
}
else
{
v6 = 67111792;
if ( _bittest(&v6, (unsigned __int8)v4) )
{
v7 = rak_opcode_to_cstr((unsigned __int8)v4);
printf("%-15s %-5d\n", v7, BYTE1(v4));
}
else
{
v8 = rak_opcode_to_cstr((unsigned __int8)v4);
printf("%-15s %d\n", v8, (unsigned __int16)(v4 >> 8));
}
}
}
}
return putchar(10LL);
}
| rak_dump_chunk:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12,RDI
MOV ESI,dword ptr [RDI + 0x4]
LEA RDI,[0x10967a]
XOR EBX,EBX
XOR EAX,EAX
CALL 0x00102090
MOV R14D,dword ptr [R12 + 0xffc]
LEA RDI,[0x10968a]
MOV ESI,R14D
XOR EAX,EAX
CALL 0x00102090
TEST R14D,R14D
CMOVLE R14D,EBX
LEA R15,[0x10969d]
MOV R13D,0xbff148f
XOR EBP,EBP
LAB_00105374:
CMP R14,RBP
JZ 0x001053f2
MOV RAX,qword ptr [R12 + 0x1000]
MOV EBX,dword ptr [RAX + RBP*0x4]
MOV RDI,R15
MOV ESI,EBP
XOR EAX,EAX
CALL 0x00102090
CMP BL,0x1b
JA 0x001053ed
MOVZX EDI,BL
BT R13D,EDI
JNC 0x001053b6
CALL 0x00103220
LEA RDI,[0x1096a5]
MOV RSI,RAX
XOR EAX,EAX
CALL 0x00102090
JMP 0x001053ed
LAB_001053b6:
MOV EAX,0x4000b70
BT EAX,EDI
JNC 0x001053d1
CALL 0x00103220
MOVZX EDX,BH
LEA RDI,[0x1096ac]
JMP 0x001053e3
LAB_001053d1:
SHR EBX,0x8
CALL 0x00103220
MOVZX EDX,BX
LEA RDI,[0x1096b8]
LAB_001053e3:
MOV RSI,RAX
XOR EAX,EAX
CALL 0x00102090
LAB_001053ed:
INC RBP
JMP 0x00105374
LAB_001053f2:
PUSH 0xa
POP RDI
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00102040
|
void rak_dump_chunk(long param_1)
{
uint uVar1;
int8 uVar2;
uint uVar3;
ulong uVar4;
char *__format;
printf("%d constant(s)\n",(ulong)*(uint *)(param_1 + 4));
uVar1 = *(uint *)(param_1 + 0xffc);
printf("%d instruction(s)\n",(ulong)uVar1);
if ((int)uVar1 < 1) {
uVar1 = 0;
}
for (uVar4 = 0; uVar1 != uVar4; uVar4 = uVar4 + 1) {
uVar3 = *(uint *)(*(long *)(param_1 + 0x1000) + uVar4 * 4);
printf("[%04d] ",uVar4 & 0xffffffff);
if ((byte)uVar3 < 0x1c) {
if ((0xbff148fU >> (uVar3 & 0x1f) & 1) == 0) {
if ((0x4000b70U >> (uVar3 & 0x1f) & 1) == 0) {
uVar2 = rak_opcode_to_cstr();
uVar3 = uVar3 >> 8 & 0xffff;
__format = "%-15s %d\n";
}
else {
uVar2 = rak_opcode_to_cstr();
uVar3 = uVar3 >> 8 & 0xff;
__format = "%-15s %-5d\n";
}
printf(__format,uVar2,(ulong)uVar3);
}
else {
uVar2 = rak_opcode_to_cstr();
printf("%-15s\n",uVar2);
}
}
}
putchar(10);
return;
}
| |
33,595 | rak_dump_chunk | fabiosvm[P]rak/src/dump.c | void rak_dump_chunk(RakChunk *chunk)
{
printf("%d constant(s)\n", chunk->consts.len);
int len = chunk->instrs.len;
printf("%d instruction(s)\n", len);
for (int i = 0; i < len; ++i)
{
uint32_t instr = rak_slice_get(&chunk->instrs, i);
RakOpcode op = rak_instr_opcode(instr);
printf("[%04d] ", i);
switch (op)
{
case RAK_OP_NOP:
case RAK_OP_PUSH_NIL:
case RAK_OP_PUSH_FALSE:
case RAK_OP_PUSH_TRUE:
case RAK_OP_LOAD_ELEMENT:
case RAK_OP_NEW_RANGE:
case RAK_OP_POP:
case RAK_OP_EQ:
case RAK_OP_GT:
case RAK_OP_LT:
case RAK_OP_ADD:
case RAK_OP_SUB:
case RAK_OP_MUL:
case RAK_OP_DIV:
case RAK_OP_MOD:
case RAK_OP_NOT:
case RAK_OP_NEG:
case RAK_OP_HALT:
printf("%-15s\n", rak_opcode_to_cstr(op));
break;
case RAK_OP_LOAD_CONST:
case RAK_OP_LOAD_GLOBAL:
case RAK_OP_LOAD_LOCAL:
case RAK_OP_STORE_LOCAL:
case RAK_OP_NEW_ARRAY:
case RAK_OP_NEW_RECORD:
case RAK_OP_CALL:
{
uint8_t a = rak_instr_a(instr);
printf("%-15s %-5d\n", rak_opcode_to_cstr(op), a);
}
break;
case RAK_OP_JUMP:
case RAK_OP_JUMP_IF_FALSE:
case RAK_OP_JUMP_IF_TRUE:
{
uint16_t ab = rak_instr_ab(instr);
printf("%-15s %d\n", rak_opcode_to_cstr(op), ab);
}
break;
}
}
printf("\n");
} | O3 | c | rak_dump_chunk:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r12
movl 0x4(%rdi), %esi
leaq 0x4082(%rip), %rdi # 0xa622
xorl %eax, %eax
callq 0x2090
movslq 0xffc(%r12), %r14
leaq 0x407c(%rip), %rdi # 0xa632
movl %r14d, %esi
xorl %eax, %eax
callq 0x2090
testq %r14, %r14
jle 0x6654
leaq 0x4075(%rip), %r15 # 0xa645
movl $0xbff148f, %r13d # imm = 0xBFF148F
xorl %ebp, %ebp
movq 0x1000(%r12), %rax
movl (%rax,%rbp,4), %ebx
movq %r15, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x2090
cmpb $0x1b, %bl
ja 0x664c
movzbl %bl, %edi
btl %edi, %r13d
jae 0x6615
callq 0x3854
leaq 0x4044(%rip), %rdi # 0xa64d
movq %rax, %rsi
xorl %eax, %eax
callq 0x2090
jmp 0x664c
movl $0x4000b70, %eax # imm = 0x4000B70
btl %edi, %eax
jae 0x6630
callq 0x3854
movzbl %bh, %edx
leaq 0x4026(%rip), %rdi # 0xa654
jmp 0x6642
shrl $0x8, %ebx
callq 0x3854
movzwl %bx, %edx
leaq 0x401e(%rip), %rdi # 0xa660
movq %rax, %rsi
xorl %eax, %eax
callq 0x2090
incq %rbp
cmpq %rbp, %r14
jne 0x65d8
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2040
| rak_dump_chunk:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12, rdi
mov esi, [rdi+4]
lea rdi, aDConstantS; "%d constant(s)\n"
xor eax, eax
call _printf
movsxd r14, dword ptr [r12+0FFCh]
lea rdi, aDInstructionS; "%d instruction(s)\n"
mov esi, r14d
xor eax, eax
call _printf
test r14, r14
jle loc_6654
lea r15, a04d; "[%04d] "
mov r13d, 0BFF148Fh
xor ebp, ebp
loc_65D8:
mov rax, [r12+1000h]
mov ebx, [rax+rbp*4]
mov rdi, r15
mov esi, ebp
xor eax, eax
call _printf
cmp bl, 1Bh
ja short loc_664C
movzx edi, bl
bt r13d, edi
jnb short loc_6615
call rak_opcode_to_cstr
lea rdi, a15s; "%-15s\n"
mov rsi, rax
xor eax, eax
call _printf
jmp short loc_664C
loc_6615:
mov eax, 4000B70h
bt eax, edi
jnb short loc_6630
call rak_opcode_to_cstr
movzx edx, bh
lea rdi, a15s5d; "%-15s %-5d\n"
jmp short loc_6642
loc_6630:
shr ebx, 8
call rak_opcode_to_cstr
movzx edx, bx
lea rdi, a15sD; "%-15s %d\n"
loc_6642:
mov rsi, rax
xor eax, eax
call _printf
loc_664C:
inc rbp
cmp r14, rbp
jnz short loc_65D8
loc_6654:
mov edi, 0Ah
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _putchar
| long long rak_dump_chunk(long long a1)
{
long long v1; // r14
int v2; // r13d
long long i; // rbp
unsigned int v4; // ebx
char *v5; // rax
int v6; // eax
char *v7; // rax
char *v8; // rax
printf("%d constant(s)\n", *(_DWORD *)(a1 + 4));
v1 = *(int *)(a1 + 4092);
printf("%d instruction(s)\n", *(_DWORD *)(a1 + 4092));
if ( v1 > 0 )
{
v2 = 201266319;
for ( i = 0LL; i != v1; ++i )
{
v4 = *(_DWORD *)(*(_QWORD *)(a1 + 4096) + 4 * i);
printf("[%04d] ", i);
if ( (unsigned __int8)v4 <= 0x1Bu )
{
if ( _bittest(&v2, (unsigned __int8)v4) )
{
v5 = rak_opcode_to_cstr((unsigned __int8)v4);
printf("%-15s\n", v5);
}
else
{
v6 = 67111792;
if ( _bittest(&v6, (unsigned __int8)v4) )
{
v7 = rak_opcode_to_cstr((unsigned __int8)v4);
printf("%-15s %-5d\n", v7, BYTE1(v4));
}
else
{
v8 = rak_opcode_to_cstr((unsigned __int8)v4);
printf("%-15s %d\n", v8, (unsigned __int16)(v4 >> 8));
}
}
}
}
}
return putchar(10LL);
}
| rak_dump_chunk:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12,RDI
MOV ESI,dword ptr [RDI + 0x4]
LEA RDI,[0x10a622]
XOR EAX,EAX
CALL 0x00102090
MOVSXD R14,dword ptr [R12 + 0xffc]
LEA RDI,[0x10a632]
MOV ESI,R14D
XOR EAX,EAX
CALL 0x00102090
TEST R14,R14
JLE 0x00106654
LEA R15,[0x10a645]
MOV R13D,0xbff148f
XOR EBP,EBP
LAB_001065d8:
MOV RAX,qword ptr [R12 + 0x1000]
MOV EBX,dword ptr [RAX + RBP*0x4]
MOV RDI,R15
MOV ESI,EBP
XOR EAX,EAX
CALL 0x00102090
CMP BL,0x1b
JA 0x0010664c
MOVZX EDI,BL
BT R13D,EDI
JNC 0x00106615
CALL 0x00103854
LEA RDI,[0x10a64d]
MOV RSI,RAX
XOR EAX,EAX
CALL 0x00102090
JMP 0x0010664c
LAB_00106615:
MOV EAX,0x4000b70
BT EAX,EDI
JNC 0x00106630
CALL 0x00103854
MOVZX EDX,BH
LEA RDI,[0x10a654]
JMP 0x00106642
LAB_00106630:
SHR EBX,0x8
CALL 0x00103854
MOVZX EDX,BX
LEA RDI,[0x10a660]
LAB_00106642:
MOV RSI,RAX
XOR EAX,EAX
CALL 0x00102090
LAB_0010664c:
INC RBP
CMP R14,RBP
JNZ 0x001065d8
LAB_00106654:
MOV EDI,0xa
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00102040
|
void rak_dump_chunk(long param_1)
{
uint uVar1;
int8 uVar2;
uint uVar3;
ulong uVar4;
char *__format;
printf("%d constant(s)\n",(ulong)*(uint *)(param_1 + 4));
uVar1 = *(uint *)(param_1 + 0xffc);
printf("%d instruction(s)\n",(ulong)uVar1);
if (0 < (long)(int)uVar1) {
uVar4 = 0;
do {
uVar3 = *(uint *)(*(long *)(param_1 + 0x1000) + uVar4 * 4);
printf("[%04d] ",uVar4 & 0xffffffff);
if ((byte)uVar3 < 0x1c) {
if ((0xbff148fU >> (uVar3 & 0x1f) & 1) == 0) {
if ((0x4000b70U >> (uVar3 & 0x1f) & 1) == 0) {
uVar2 = rak_opcode_to_cstr();
uVar3 = uVar3 >> 8 & 0xffff;
__format = "%-15s %d\n";
}
else {
uVar2 = rak_opcode_to_cstr();
uVar3 = uVar3 >> 8 & 0xff;
__format = "%-15s %-5d\n";
}
printf(__format,uVar2,(ulong)uVar3);
}
else {
uVar2 = rak_opcode_to_cstr();
printf("%-15s\n",uVar2);
}
}
uVar4 = uVar4 + 1;
} while ((long)(int)uVar1 != uVar4);
}
putchar(10);
return;
}
| |
33,596 | close_lexical_var | bluesky950520[P]quickjs/quickjs.c | static void close_lexical_var(JSContext *ctx, JSStackFrame *sf, int var_idx)
{
struct list_head *el, *el1;
JSVarRef *var_ref;
list_for_each_safe(el, el1, &sf->var_ref_list) {
var_ref = list_entry(el, JSVarRef, header.link);
if (var_idx == var_ref->var_idx && !var_ref->is_arg) {
var_ref->value = js_dup(sf->var_buf[var_idx]);
var_ref->pvalue = &var_ref->value;
list_del(&var_ref->header.link);
/* the reference is no longer to a local variable */
var_ref->is_detached = TRUE;
add_gc_object(ctx->rt, &var_ref->header, JS_GC_OBJ_TYPE_VAR_REF);
}
}
} | O0 | c | close_lexical_var:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movl %edx, 0x34(%rsp)
movq 0x38(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq 0x38(%rsp), %rcx
addq $0x28, %rcx
cmpq %rcx, %rax
je 0x65fa1
movq 0x28(%rsp), %rax
addq $-0x8, %rax
movq %rax, 0x18(%rsp)
movl 0x34(%rsp), %eax
movq 0x18(%rsp), %rcx
movzwl 0x6(%rcx), %ecx
cmpl %ecx, %eax
jne 0x65f82
movq 0x18(%rsp), %rax
movb 0x5(%rax), %al
shrb %al
andb $0x1, %al
cmpb $0x0, %al
jne 0x65f82
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
movq 0x38(%rsp), %rax
movq 0x20(%rax), %rax
movslq 0x34(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x20410
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x8(%rsp), %rcx
movq %rcx, 0x20(%rax)
movq 0x10(%rsp), %rcx
movq %rcx, 0x28(%rax)
movq 0x18(%rsp), %rcx
addq $0x20, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x18(%rsp), %rdi
addq $0x8, %rdi
callq 0x22970
movq 0x18(%rsp), %rax
movb 0x5(%rax), %cl
andb $-0x2, %cl
orb $0x1, %cl
movb %cl, 0x5(%rax)
movq 0x40(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x18(%rsp), %rsi
movl $0x3, %edx
callq 0x22e10
jmp 0x65f84
movq 0x20(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x20(%rsp)
jmp 0x65e9e
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
| close_lexical_var:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_10], rsi
mov [rsp+48h+var_14], edx
mov rax, [rsp+48h+var_10]
mov rax, [rax+30h]
mov [rsp+48h+var_20], rax
mov rax, [rsp+48h+var_20]
mov rax, [rax+8]
mov [rsp+48h+var_28], rax
loc_65E9E:
mov rax, [rsp+48h+var_20]
mov rcx, [rsp+48h+var_10]
add rcx, 28h ; '('
cmp rax, rcx
jz loc_65FA1
mov rax, [rsp+48h+var_20]
add rax, 0FFFFFFFFFFFFFFF8h
mov [rsp+48h+var_30], rax
mov eax, [rsp+48h+var_14]
mov rcx, [rsp+48h+var_30]
movzx ecx, word ptr [rcx+6]
cmp eax, ecx
jnz loc_65F82
mov rax, [rsp+48h+var_30]
mov al, [rax+5]
shr al, 1
and al, 1
cmp al, 0
jnz loc_65F82
mov rax, [rsp+48h+var_30]
mov [rsp+48h+var_48], rax
mov rax, [rsp+48h+var_10]
mov rax, [rax+20h]
movsxd rcx, [rsp+48h+var_14]
shl rcx, 4
add rax, rcx
mov rdi, [rax]
mov rsi, [rax+8]
call js_dup
mov rcx, rax
mov rax, [rsp+48h+var_48]
mov [rsp+48h+var_40], rcx
mov [rsp+48h+var_38], rdx
mov rcx, [rsp+48h+var_40]
mov [rax+20h], rcx
mov rcx, [rsp+48h+var_38]
mov [rax+28h], rcx
mov rcx, [rsp+48h+var_30]
add rcx, 20h ; ' '
mov rax, [rsp+48h+var_30]
mov [rax+18h], rcx
mov rdi, [rsp+48h+var_30]
add rdi, 8
call list_del_0
mov rax, [rsp+48h+var_30]
mov cl, [rax+5]
and cl, 0FEh
or cl, 1
mov [rax+5], cl
mov rax, [rsp+48h+var_8]
mov rdi, [rax+18h]
mov rsi, [rsp+48h+var_30]
mov edx, 3
call add_gc_object
loc_65F82:
jmp short $+2
loc_65F84:
mov rax, [rsp+48h+var_28]
mov [rsp+48h+var_20], rax
mov rax, [rsp+48h+var_20]
mov rax, [rax+8]
mov [rsp+48h+var_28], rax
jmp loc_65E9E
loc_65FA1:
add rsp, 48h
retn
| _QWORD * close_lexical_var(long long a1, _QWORD *a2, int a3)
{
_QWORD *result; // rax
long long v4; // rax
long long v5; // rdx
long long v6; // [rsp+18h] [rbp-30h]
_QWORD *i; // [rsp+20h] [rbp-28h]
_QWORD *v8; // [rsp+28h] [rbp-20h]
v8 = (_QWORD *)a2[6];
for ( i = (_QWORD *)v8[1]; ; i = (_QWORD *)i[1] )
{
result = v8;
if ( v8 == a2 + 5 )
break;
v6 = (long long)(v8 - 1);
if ( a3 == *((unsigned __int16 *)v8 - 1) && (*(_BYTE *)(v6 + 5) & 2) == 0 )
{
v4 = 16LL * a3 + a2[4];
*(_QWORD *)(v6 + 32) = js_dup(*(_DWORD **)v4, *(_QWORD *)(v4 + 8));
*(_QWORD *)(v6 + 40) = v5;
*(_QWORD *)(v6 + 24) = v6 + 32;
list_del_0(v8);
*(_BYTE *)(v6 + 5) = *(_BYTE *)(v6 + 5) & 0xFE | 1;
add_gc_object(*(_QWORD *)(a1 + 24), v6, 3);
}
v8 = i;
}
return result;
}
| close_lexical_var:
SUB RSP,0x48
MOV qword ptr [RSP + 0x40],RDI
MOV qword ptr [RSP + 0x38],RSI
MOV dword ptr [RSP + 0x34],EDX
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x20],RAX
LAB_00165e9e:
MOV RAX,qword ptr [RSP + 0x28]
MOV RCX,qword ptr [RSP + 0x38]
ADD RCX,0x28
CMP RAX,RCX
JZ 0x00165fa1
MOV RAX,qword ptr [RSP + 0x28]
ADD RAX,-0x8
MOV qword ptr [RSP + 0x18],RAX
MOV EAX,dword ptr [RSP + 0x34]
MOV RCX,qword ptr [RSP + 0x18]
MOVZX ECX,word ptr [RCX + 0x6]
CMP EAX,ECX
JNZ 0x00165f82
MOV RAX,qword ptr [RSP + 0x18]
MOV AL,byte ptr [RAX + 0x5]
SHR AL,0x1
AND AL,0x1
CMP AL,0x0
JNZ 0x00165f82
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0x20]
MOVSXD RCX,dword ptr [RSP + 0x34]
SHL RCX,0x4
ADD RAX,RCX
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x8]
CALL 0x00120410
MOV RCX,RAX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x8],RCX
MOV qword ptr [RSP + 0x10],RDX
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX + 0x20],RCX
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0x28],RCX
MOV RCX,qword ptr [RSP + 0x18]
ADD RCX,0x20
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX + 0x18],RCX
MOV RDI,qword ptr [RSP + 0x18]
ADD RDI,0x8
CALL 0x00122970
MOV RAX,qword ptr [RSP + 0x18]
MOV CL,byte ptr [RAX + 0x5]
AND CL,0xfe
OR CL,0x1
MOV byte ptr [RAX + 0x5],CL
MOV RAX,qword ptr [RSP + 0x40]
MOV RDI,qword ptr [RAX + 0x18]
MOV RSI,qword ptr [RSP + 0x18]
MOV EDX,0x3
CALL 0x00122e10
LAB_00165f82:
JMP 0x00165f84
LAB_00165f84:
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x20],RAX
JMP 0x00165e9e
LAB_00165fa1:
ADD RSP,0x48
RET
|
void close_lexical_var(long param_1,long param_2,uint param_3)
{
int8 *puVar1;
int1 auVar2 [16];
long local_28;
long local_20;
local_20 = *(long *)(param_2 + 0x30);
local_28 = *(long *)(local_20 + 8);
while (local_20 != param_2 + 0x28) {
if ((param_3 == *(ushort *)(local_20 + -2)) && ((*(byte *)(local_20 + -3) >> 1 & 1) == 0)) {
puVar1 = (int8 *)(*(long *)(param_2 + 0x20) + (long)(int)param_3 * 0x10);
auVar2 = js_dup(*puVar1,puVar1[1]);
*(int1 (*) [16])(local_20 + 0x18) = auVar2;
*(long *)(local_20 + 0x10) = local_20 + 0x18;
list_del(local_20);
*(byte *)(local_20 + -3) = *(byte *)(local_20 + -3) & 0xfe | 1;
add_gc_object(*(int8 *)(param_1 + 0x18),local_20 + -8,3);
}
local_20 = local_28;
local_28 = *(long *)(local_28 + 8);
}
return;
}
| |
33,597 | mysql_cset_escape_quotes | eloqsql/libmariadb/libmariadb/ma_charset.c | size_t mysql_cset_escape_quotes(const MARIADB_CHARSET_INFO *cset, char *newstr,
const char * escapestr, size_t escapestr_len )
{
const char *newstr_s = newstr;
const char *newstr_e = newstr + 2 * escapestr_len;
const char *end = escapestr + escapestr_len;
my_bool escape_overflow = FALSE;
for (;escapestr < end; escapestr++) {
unsigned int len = 0;
/* check unicode characters */
if (cset->char_maxlen > 1 && (len = cset->mb_valid(escapestr, end))) {
/* check possible overflow */
if ((newstr + len) > newstr_e) {
escape_overflow = TRUE;
break;
}
/* copy mb char without escaping it */
while (len--) {
*newstr++ = *escapestr++;
}
escapestr--;
continue;
}
if (*escapestr == '\'') {
if (newstr + 2 > newstr_e) {
escape_overflow = TRUE;
break;
}
*newstr++ = '\'';
*newstr++ = '\'';
} else {
if (newstr + 1 > newstr_e) {
escape_overflow = TRUE;
break;
}
*newstr++ = *escapestr;
}
}
*newstr = '\0';
if (escape_overflow) {
return((size_t)~0);
}
return((size_t)(newstr - newstr_s));
} | O0 | c | mysql_cset_escape_quotes:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movb $0x0, -0x41(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x44eec
movl $0x0, -0x48(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x1, 0x34(%rax)
jbe 0x44e68
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x20(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq *%rax
movl %eax, -0x48(%rbp)
cmpl $0x0, %eax
je 0x44e68
movq -0x18(%rbp), %rax
movl -0x48(%rbp), %ecx
addq %rcx, %rax
cmpq -0x38(%rbp), %rax
jbe 0x44e24
movb $0x1, -0x41(%rbp)
jmp 0x44eec
jmp 0x44e26
movl -0x48(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x48(%rbp)
cmpl $0x0, %eax
je 0x44e5a
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb (%rax), %cl
movq -0x18(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movb %cl, (%rax)
jmp 0x44e26
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x44edb
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x27, %eax
jne 0x44eae
movq -0x18(%rbp), %rax
addq $0x2, %rax
cmpq -0x38(%rbp), %rax
jbe 0x44e88
movb $0x1, -0x41(%rbp)
jmp 0x44eec
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb $0x27, (%rax)
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb $0x27, (%rax)
jmp 0x44ed9
movq -0x18(%rbp), %rax
addq $0x1, %rax
cmpq -0x38(%rbp), %rax
jbe 0x44ec2
movb $0x1, -0x41(%rbp)
jmp 0x44eec
movq -0x20(%rbp), %rax
movb (%rax), %cl
movq -0x18(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movb %cl, (%rax)
jmp 0x44edb
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x44dd2
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
cmpb $0x0, -0x41(%rbp)
je 0x44f03
movq $-0x1, -0x8(%rbp)
jmp 0x44f12
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
| mysql_cset_escape_quotes:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
mov rax, [rbp+var_18]
mov rcx, [rbp+var_28]
shl rcx, 1
add rax, rcx
mov [rbp+var_38], rax
mov rax, [rbp+var_20]
add rax, [rbp+var_28]
mov [rbp+var_40], rax
mov [rbp+var_41], 0
loc_44DD2:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_40]
jnb loc_44EEC
mov [rbp+var_48], 0
mov rax, [rbp+var_10]
cmp dword ptr [rax+34h], 1
jbe short loc_44E68
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_40]
call rax
mov [rbp+var_48], eax
cmp eax, 0
jz short loc_44E68
mov rax, [rbp+var_18]
mov ecx, [rbp+var_48]
add rax, rcx
cmp rax, [rbp+var_38]
jbe short loc_44E24
mov [rbp+var_41], 1
jmp loc_44EEC
loc_44E24:
jmp short $+2
loc_44E26:
mov eax, [rbp+var_48]
mov ecx, eax
add ecx, 0FFFFFFFFh
mov [rbp+var_48], ecx
cmp eax, 0
jz short loc_44E5A
mov rax, [rbp+var_20]
mov rcx, rax
add rcx, 1
mov [rbp+var_20], rcx
mov cl, [rax]
mov rax, [rbp+var_18]
mov rdx, rax
add rdx, 1
mov [rbp+var_18], rdx
mov [rax], cl
jmp short loc_44E26
loc_44E5A:
mov rax, [rbp+var_20]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_20], rax
jmp short loc_44EDB
loc_44E68:
mov rax, [rbp+var_20]
movsx eax, byte ptr [rax]
cmp eax, 27h ; '''
jnz short loc_44EAE
mov rax, [rbp+var_18]
add rax, 2
cmp rax, [rbp+var_38]
jbe short loc_44E88
mov [rbp+var_41], 1
jmp short loc_44EEC
loc_44E88:
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 1
mov [rbp+var_18], rcx
mov byte ptr [rax], 27h ; '''
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 1
mov [rbp+var_18], rcx
mov byte ptr [rax], 27h ; '''
jmp short loc_44ED9
loc_44EAE:
mov rax, [rbp+var_18]
add rax, 1
cmp rax, [rbp+var_38]
jbe short loc_44EC2
mov [rbp+var_41], 1
jmp short loc_44EEC
loc_44EC2:
mov rax, [rbp+var_20]
mov cl, [rax]
mov rax, [rbp+var_18]
mov rdx, rax
add rdx, 1
mov [rbp+var_18], rdx
mov [rax], cl
loc_44ED9:
jmp short $+2
loc_44EDB:
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp loc_44DD2
loc_44EEC:
mov rax, [rbp+var_18]
mov byte ptr [rax], 0
cmp [rbp+var_41], 0
jz short loc_44F03
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_44F12
loc_44F03:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_30]
sub rax, rcx
mov [rbp+var_8], rax
loc_44F12:
mov rax, [rbp+var_8]
add rsp, 50h
pop rbp
retn
| long long mysql_cset_escape_quotes(long long a1, char *a2, char *a3, long long a4)
{
char *v5; // rax
char v6; // cl
char *v7; // rax
_BYTE *v8; // rax
char *v9; // rax
int v11; // [rsp+8h] [rbp-48h]
char v12; // [rsp+Fh] [rbp-41h]
unsigned long long v13; // [rsp+10h] [rbp-40h]
unsigned long long v14; // [rsp+18h] [rbp-38h]
char *v15; // [rsp+30h] [rbp-20h]
char *v16; // [rsp+38h] [rbp-18h]
v16 = a2;
v15 = a3;
v14 = (unsigned long long)&a2[2 * a4];
v13 = (unsigned long long)&a3[a4];
v12 = 0;
while ( (unsigned long long)v15 < v13 )
{
if ( *(_DWORD *)(a1 + 52) > 1u
&& (v11 = (*(long long ( **)(char *, unsigned long long))(a1 + 64))(v15, v13)) != 0 )
{
if ( (unsigned long long)&v16[v11] > v14 )
{
v12 = 1;
break;
}
while ( v11-- )
{
v5 = v15++;
v6 = *v5;
v7 = v16++;
*v7 = v6;
}
--v15;
}
else if ( *v15 == 39 )
{
if ( (unsigned long long)(v16 + 2) > v14 )
{
v12 = 1;
break;
}
*v16 = 39;
v8 = v16 + 1;
v16 += 2;
*v8 = 39;
}
else
{
if ( (unsigned long long)(v16 + 1) > v14 )
{
v12 = 1;
break;
}
v9 = v16++;
*v9 = *v15;
}
++v15;
}
*v16 = 0;
if ( v12 )
return -1LL;
else
return v16 - a2;
}
| mysql_cset_escape_quotes:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x28]
SHL RCX,0x1
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
MOV byte ptr [RBP + -0x41],0x0
LAB_00144dd2:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x00144eec
MOV dword ptr [RBP + -0x48],0x0
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x34],0x1
JBE 0x00144e68
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x40]
CALL RAX
MOV dword ptr [RBP + -0x48],EAX
CMP EAX,0x0
JZ 0x00144e68
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x48]
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x38]
JBE 0x00144e24
MOV byte ptr [RBP + -0x41],0x1
JMP 0x00144eec
LAB_00144e24:
JMP 0x00144e26
LAB_00144e26:
MOV EAX,dword ptr [RBP + -0x48]
MOV ECX,EAX
ADD ECX,-0x1
MOV dword ptr [RBP + -0x48],ECX
CMP EAX,0x0
JZ 0x00144e5a
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x20],RCX
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x18],RDX
MOV byte ptr [RAX],CL
JMP 0x00144e26
LAB_00144e5a:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00144edb
LAB_00144e68:
MOV RAX,qword ptr [RBP + -0x20]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x27
JNZ 0x00144eae
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x38]
JBE 0x00144e88
MOV byte ptr [RBP + -0x41],0x1
JMP 0x00144eec
LAB_00144e88:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x18],RCX
MOV byte ptr [RAX],0x27
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x18],RCX
MOV byte ptr [RAX],0x27
JMP 0x00144ed9
LAB_00144eae:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
CMP RAX,qword ptr [RBP + -0x38]
JBE 0x00144ec2
MOV byte ptr [RBP + -0x41],0x1
JMP 0x00144eec
LAB_00144ec2:
MOV RAX,qword ptr [RBP + -0x20]
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x18],RDX
MOV byte ptr [RAX],CL
LAB_00144ed9:
JMP 0x00144edb
LAB_00144edb:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00144dd2
LAB_00144eec:
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX],0x0
CMP byte ptr [RBP + -0x41],0x0
JZ 0x00144f03
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x00144f12
LAB_00144f03:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x30]
SUB RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
LAB_00144f12:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x50
POP RBP
RET
|
long mysql_cset_escape_quotes(long param_1,char *param_2,char *param_3,long param_4)
{
bool bVar1;
char *pcVar2;
uint local_50;
char *local_28;
char *local_20;
long local_10;
pcVar2 = param_2 + param_4 * 2;
bVar1 = false;
local_28 = param_3;
local_20 = param_2;
do {
if (param_3 + param_4 <= local_28) {
LAB_00144eec:
*local_20 = '\0';
if (bVar1) {
local_10 = -1;
}
else {
local_10 = (long)local_20 - (long)param_2;
}
return local_10;
}
if ((*(uint *)(param_1 + 0x34) < 2) ||
(local_50 = (**(code **)(param_1 + 0x40))(local_28,param_3 + param_4), local_50 == 0)) {
if (*local_28 == '\'') {
if (pcVar2 < local_20 + 2) {
bVar1 = true;
goto LAB_00144eec;
}
*local_20 = '\'';
local_20[1] = '\'';
local_20 = local_20 + 2;
}
else {
if (pcVar2 < local_20 + 1) {
bVar1 = true;
goto LAB_00144eec;
}
*local_20 = *local_28;
local_20 = local_20 + 1;
}
}
else {
if (pcVar2 < local_20 + local_50) {
bVar1 = true;
goto LAB_00144eec;
}
while (local_50 != 0) {
*local_20 = *local_28;
local_50 = local_50 - 1;
local_28 = local_28 + 1;
local_20 = local_20 + 1;
}
local_28 = local_28 + -1;
}
local_28 = local_28 + 1;
} while( true );
}
| |
33,598 | ggml_backend_cpu_device_context::ggml_backend_cpu_device_context() | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.cpp | ggml_backend_cpu_device_context() {
#ifdef __APPLE__
size_t len = 0;
if (!sysctlbyname("machdep.cpu.brand_string", NULL, &len, NULL, 0)) {
description.resize(len);
sysctlbyname("machdep.cpu.brand_string", &description[0], &len, NULL, 0); // NOLINT
}
#elif defined(__linux__)
FILE * f = fopen("/proc/cpuinfo", "r");
if (f) {
char buf[1024];
while (fgets(buf, sizeof(buf), f)) {
if (strncmp(buf, "model name", 10) == 0) {
char * p = strchr(buf, ':');
if (p) {
p++;
while (std::isspace(*p)) {
p++;
}
while (std::isspace(p[strlen(p) - 1])) {
p[strlen(p) - 1] = '\0';
}
description = p;
break;
}
}
}
fclose(f);
}
#elif defined(_WIN32)
HKEY hKey;
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE,
TEXT("HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0"),
0,
KEY_READ,
&hKey) == ERROR_SUCCESS) {
DWORD cpu_brand_size = 0;
if (RegQueryValueExA(hKey,
TEXT("ProcessorNameString"),
NULL,
NULL,
NULL,
&cpu_brand_size) == ERROR_SUCCESS) {
description.resize(cpu_brand_size);
if (RegQueryValueExA(hKey,
TEXT("ProcessorNameString"),
NULL,
NULL,
(LPBYTE)&description[0], // NOLINT
&cpu_brand_size) == ERROR_SUCCESS) {
if (description.find('\0') != std::string::npos) {
description.resize(description.find('\0'));
}
}
}
RegCloseKey(hKey);
}
#endif
} | O2 | cpp | ggml_backend_cpu_device_context::ggml_backend_cpu_device_context():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x418, %rsp # imm = 0x418
movq %rdi, %rbx
leaq 0xf6b4(%rip), %rsi # 0x3608b
leaq 0x10(%rsp), %rdx
callq 0x8b60
leaq 0xf6b2(%rip), %rdi # 0x3609a
leaq 0xe1f2(%rip), %rsi # 0x34be1
callq 0x8800
testq %rax, %rax
je 0x26a98
movq %rax, %r14
movq %rbx, 0x8(%rsp)
leaq 0x10(%rsp), %r12
leaq 0xf697(%rip), %r13 # 0x360a8
pushq $0xa
popq %rbp
pushq $0x3a
popq %rbx
movq %r12, %rdi
movl $0x400, %esi # imm = 0x400
movq %r14, %rdx
callq 0x8a20
testq %rax, %rax
je 0x26a90
movq %r12, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x8740
testl %eax, %eax
jne 0x26a17
movq %r12, %rdi
movl %ebx, %esi
callq 0x8240
testq %rax, %rax
je 0x26a17
movq %rax, %r15
movsbl 0x1(%r15), %edi
incq %r15
callq 0x8090
testl %eax, %eax
jne 0x26a50
jmp 0x26a69
movb $0x0, -0x1(%r15,%rbx)
movq %r15, %rdi
callq 0x82d0
movq %rax, %rbx
movsbl -0x1(%rax,%r15), %edi
callq 0x8090
testl %eax, %eax
jne 0x26a63
movq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x8ab0
movq %r14, %rdi
callq 0x86f0
addq $0x418, %rsp # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
callq 0x8de0
movq %rbx, %rdi
callq 0x8bd0
nop
| _ZN31ggml_backend_cpu_device_contextC2Ev:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 418h
mov rbx, rdi
lea rsi, aCpu; "CPU"
lea rdx, [rsp+448h+var_438]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdi, aProcCpuinfo; "/proc/cpuinfo"
lea rsi, aGgmlNrowsDstNr+14h; "r"
call _fopen
test rax, rax
jz loc_26A98
mov r14, rax
mov [rsp+448h+var_440], rbx
lea r12, [rsp+448h+var_438]
lea r13, aModelName; "model name"
push 0Ah
pop rbp
push 3Ah ; ':'
pop rbx
loc_26A17:
mov rdi, r12
mov esi, 400h
mov rdx, r14
call _fgets
test rax, rax
jz short loc_26A90
mov rdi, r12
mov rsi, r13
mov rdx, rbp
call _bcmp
test eax, eax
jnz short loc_26A17
mov rdi, r12
mov esi, ebx
call _strchr
test rax, rax
jz short loc_26A17
mov r15, rax
loc_26A50:
movsx edi, byte ptr [r15+1]
inc r15
call _isspace
test eax, eax
jnz short loc_26A50
jmp short loc_26A69
loc_26A63:
mov byte ptr [r15+rbx-1], 0
loc_26A69:
mov rdi, r15
call _strlen
mov rbx, rax
movsx edi, byte ptr [rax+r15-1]
call _isspace
test eax, eax
jnz short loc_26A63
mov rdi, [rsp+448h+var_440]
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*)
loc_26A90:
mov rdi, r14
call _fclose
loc_26A98:
add rsp, 418h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
call j__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
| void ggml_backend_cpu_device_context::ggml_backend_cpu_device_context(ggml_backend_cpu_device_context *this)
{
long long v1; // rax
long long v2; // r14
long long v3; // rax
long long v4; // r15
long long v5; // rdi
long long v6; // rbx
_BYTE v8[1080]; // [rsp+10h] [rbp-438h] BYREF
std::string::basic_string<std::allocator<char>>(this, "CPU", v8);
v1 = fopen("/proc/cpuinfo", "r");
if ( v1 )
{
v2 = v1;
while ( fgets(v8, 1024LL, v2) )
{
if ( !(unsigned int)bcmp(v8, "model name", 10LL) )
{
v3 = strchr(v8, 58LL);
if ( v3 )
{
v4 = v3;
do
v5 = (unsigned int)*(char *)++v4;
while ( (unsigned int)isspace(v5) );
while ( 1 )
{
v6 = strlen(v4);
if ( !(unsigned int)isspace((unsigned int)*(char *)(v6 + v4 - 1)) )
break;
*(_BYTE *)(v4 + v6 - 1) = 0;
}
std::string::assign(this, v4);
break;
}
}
}
fclose(v2);
}
}
| ggml_backend_cpu_device_context:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x418
MOV RBX,RDI
LEA RSI,[0x13608b]
LEA RDX,[RSP + 0x10]
CALL 0x00108b60
LEA RDI,[0x13609a]
LEA RSI,[0x134be1]
CALL 0x00108800
TEST RAX,RAX
JZ 0x00126a98
MOV R14,RAX
MOV qword ptr [RSP + 0x8],RBX
LEA R12,[RSP + 0x10]
LEA R13,[0x1360a8]
PUSH 0xa
POP RBP
PUSH 0x3a
POP RBX
LAB_00126a17:
MOV RDI,R12
MOV ESI,0x400
MOV RDX,R14
CALL 0x00108a20
TEST RAX,RAX
JZ 0x00126a90
MOV RDI,R12
MOV RSI,R13
MOV RDX,RBP
CALL 0x00108740
TEST EAX,EAX
JNZ 0x00126a17
MOV RDI,R12
MOV ESI,EBX
CALL 0x00108240
TEST RAX,RAX
JZ 0x00126a17
MOV R15,RAX
LAB_00126a50:
MOVSX EDI,byte ptr [R15 + 0x1]
INC R15
CALL 0x00108090
TEST EAX,EAX
JNZ 0x00126a50
JMP 0x00126a69
LAB_00126a63:
MOV byte ptr [R15 + RBX*0x1 + -0x1],0x0
LAB_00126a69:
MOV RDI,R15
CALL 0x001082d0
MOV RBX,RAX
MOVSX EDI,byte ptr [RAX + R15*0x1 + -0x1]
CALL 0x00108090
TEST EAX,EAX
JNZ 0x00126a63
LAB_00126a83:
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,R15
CALL 0x00108ab0
LAB_00126a90:
MOV RDI,R14
CALL 0x001086f0
LAB_00126a98:
ADD RSP,0x418
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* ggml_backend_cpu_device_context::ggml_backend_cpu_device_context() */
void __thiscall
ggml_backend_cpu_device_context::ggml_backend_cpu_device_context
(ggml_backend_cpu_device_context *this)
{
int iVar1;
FILE *__stream;
char *pcVar2;
size_t sVar3;
char *pcVar4;
allocator local_438 [1032];
std::__cxx11::string::string<std::allocator<char>>((string *)this,"CPU",local_438);
__stream = fopen("/proc/cpuinfo","r");
if (__stream != (FILE *)0x0) {
do {
pcVar2 = fgets((char *)local_438,0x400,__stream);
if (pcVar2 == (char *)0x0) goto LAB_00126a90;
iVar1 = bcmp(local_438,"model name",10);
} while ((iVar1 != 0) || (pcVar2 = strchr((char *)local_438,0x3a), pcVar2 == (char *)0x0));
do {
pcVar4 = pcVar2;
pcVar2 = pcVar4 + 1;
iVar1 = isspace((int)pcVar4[1]);
} while (iVar1 != 0);
while( true ) {
sVar3 = strlen(pcVar2);
iVar1 = isspace((int)pcVar2[sVar3 - 1]);
if (iVar1 == 0) break;
pcVar4[sVar3] = '\0';
}
/* try { // try from 00126a83 to 00126a8f has its CatchHandler @ 00126aaa */
std::__cxx11::string::assign((string *)this,pcVar2);
LAB_00126a90:
fclose(__stream);
}
return;
}
| |
33,599 | compare_columns | eloqsql/storage/maria/ma_create.c | static int compare_columns(MARIA_COLUMNDEF **a_ptr, MARIA_COLUMNDEF **b_ptr)
{
MARIA_COLUMNDEF *a= *a_ptr, *b= *b_ptr;
enum en_fieldtype a_type, b_type;
a_type= (a->type == FIELD_CHECK) ? FIELD_NORMAL : a->type;
b_type= (b->type == FIELD_CHECK) ? FIELD_NORMAL : b->type;
if (a_type == FIELD_NORMAL && !a->null_bit)
{
if (b_type != FIELD_NORMAL || b->null_bit)
return -1;
return sign((long) a->offset - (long) b->offset);
}
if (b_type == FIELD_NORMAL && !b->null_bit)
return 1;
if (a_type == b_type)
return sign((long) a->offset - (long) b->offset);
if (a_type == FIELD_NORMAL)
return -1;
if (b_type == FIELD_NORMAL)
return 1;
if (a_type == FIELD_SKIP_ZERO)
return -1;
if (b_type == FIELD_SKIP_ZERO)
return 1;
if (a->type != FIELD_BLOB && b->type != FIELD_BLOB)
if (a->length != b->length)
return sign((long) a->length - (long) b->length);
if (a_type == FIELD_BLOB)
return 1;
if (b_type == FIELD_BLOB)
return -1;
return sign((long) a->offset - (long) b->offset);
} | O0 | c | compare_columns:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x9, (%rax)
jne 0x71666
xorl %eax, %eax
movl %eax, -0x34(%rbp)
jmp 0x7166f
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x9, (%rax)
jne 0x71685
xorl %eax, %eax
movl %eax, -0x38(%rbp)
jmp 0x7168e
movq -0x28(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0x716e3
movq -0x20(%rbp), %rax
cmpb $0x0, 0x12(%rax)
jne 0x716e3
cmpl $0x0, -0x30(%rbp)
jne 0x716b7
movq -0x28(%rbp), %rax
movzbl 0x12(%rax), %eax
cmpl $0x0, %eax
je 0x716c3
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x717ef
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, %edi
movq -0x28(%rbp), %rax
movl 0x4(%rax), %eax
subq %rax, %rdi
callq 0x722d0
movl %eax, -0x4(%rbp)
jmp 0x717ef
cmpl $0x0, -0x30(%rbp)
jne 0x716ff
movq -0x28(%rbp), %rax
cmpb $0x0, 0x12(%rax)
jne 0x716ff
movl $0x1, -0x4(%rbp)
jmp 0x717ef
movl -0x2c(%rbp), %eax
cmpl -0x30(%rbp), %eax
jne 0x71727
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, %edi
movq -0x28(%rbp), %rax
movl 0x4(%rax), %eax
subq %rax, %rdi
callq 0x722d0
movl %eax, -0x4(%rbp)
jmp 0x717ef
cmpl $0x0, -0x2c(%rbp)
jne 0x71739
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x717ef
cmpl $0x0, -0x30(%rbp)
jne 0x7174b
movl $0x1, -0x4(%rbp)
jmp 0x717ef
cmpl $0x3, -0x2c(%rbp)
jne 0x7175d
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x717ef
cmpl $0x3, -0x30(%rbp)
jne 0x7176f
movl $0x1, -0x4(%rbp)
jmp 0x717ef
movq -0x20(%rbp), %rax
cmpl $0x4, (%rax)
je 0x717b6
movq -0x28(%rbp), %rax
cmpl $0x4, (%rax)
je 0x717b6
movq -0x20(%rbp), %rax
movzwl 0x8(%rax), %eax
movq -0x28(%rbp), %rcx
movzwl 0x8(%rcx), %ecx
cmpl %ecx, %eax
je 0x717b4
movq -0x20(%rbp), %rax
movzwl 0x8(%rax), %eax
movl %eax, %edi
movq -0x28(%rbp), %rax
movzwl 0x8(%rax), %eax
subq %rax, %rdi
callq 0x722d0
movl %eax, -0x4(%rbp)
jmp 0x717ef
jmp 0x717b6
cmpl $0x4, -0x2c(%rbp)
jne 0x717c5
movl $0x1, -0x4(%rbp)
jmp 0x717ef
cmpl $0x4, -0x30(%rbp)
jne 0x717d4
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x717ef
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, %edi
movq -0x28(%rbp), %rax
movl 0x4(%rax), %eax
subq %rax, %rdi
callq 0x722d0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| compare_columns:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_28], rax
mov rax, [rbp+var_20]
cmp dword ptr [rax], 9
jnz short loc_71666
xor eax, eax
mov [rbp+var_34], eax
jmp short loc_7166F
loc_71666:
mov rax, [rbp+var_20]
mov eax, [rax]
mov [rbp+var_34], eax
loc_7166F:
mov eax, [rbp+var_34]
mov [rbp+var_2C], eax
mov rax, [rbp+var_28]
cmp dword ptr [rax], 9
jnz short loc_71685
xor eax, eax
mov [rbp+var_38], eax
jmp short loc_7168E
loc_71685:
mov rax, [rbp+var_28]
mov eax, [rax]
mov [rbp+var_38], eax
loc_7168E:
mov eax, [rbp+var_38]
mov [rbp+var_30], eax
cmp [rbp+var_2C], 0
jnz short loc_716E3
mov rax, [rbp+var_20]
cmp byte ptr [rax+12h], 0
jnz short loc_716E3
cmp [rbp+var_30], 0
jnz short loc_716B7
mov rax, [rbp+var_28]
movzx eax, byte ptr [rax+12h]
cmp eax, 0
jz short loc_716C3
loc_716B7:
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_717EF
loc_716C3:
mov rax, [rbp+var_20]
mov eax, [rax+4]
mov edi, eax
mov rax, [rbp+var_28]
mov eax, [rax+4]
sub rdi, rax
call sign
mov [rbp+var_4], eax
jmp loc_717EF
loc_716E3:
cmp [rbp+var_30], 0
jnz short loc_716FF
mov rax, [rbp+var_28]
cmp byte ptr [rax+12h], 0
jnz short loc_716FF
mov [rbp+var_4], 1
jmp loc_717EF
loc_716FF:
mov eax, [rbp+var_2C]
cmp eax, [rbp+var_30]
jnz short loc_71727
mov rax, [rbp+var_20]
mov eax, [rax+4]
mov edi, eax
mov rax, [rbp+var_28]
mov eax, [rax+4]
sub rdi, rax
call sign
mov [rbp+var_4], eax
jmp loc_717EF
loc_71727:
cmp [rbp+var_2C], 0
jnz short loc_71739
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_717EF
loc_71739:
cmp [rbp+var_30], 0
jnz short loc_7174B
mov [rbp+var_4], 1
jmp loc_717EF
loc_7174B:
cmp [rbp+var_2C], 3
jnz short loc_7175D
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_717EF
loc_7175D:
cmp [rbp+var_30], 3
jnz short loc_7176F
mov [rbp+var_4], 1
jmp loc_717EF
loc_7176F:
mov rax, [rbp+var_20]
cmp dword ptr [rax], 4
jz short loc_717B6
mov rax, [rbp+var_28]
cmp dword ptr [rax], 4
jz short loc_717B6
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+8]
mov rcx, [rbp+var_28]
movzx ecx, word ptr [rcx+8]
cmp eax, ecx
jz short loc_717B4
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+8]
mov edi, eax
mov rax, [rbp+var_28]
movzx eax, word ptr [rax+8]
sub rdi, rax
call sign
mov [rbp+var_4], eax
jmp short loc_717EF
loc_717B4:
jmp short $+2
loc_717B6:
cmp [rbp+var_2C], 4
jnz short loc_717C5
mov [rbp+var_4], 1
jmp short loc_717EF
loc_717C5:
cmp [rbp+var_30], 4
jnz short loc_717D4
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_717EF
loc_717D4:
mov rax, [rbp+var_20]
mov eax, [rax+4]
mov edi, eax
mov rax, [rbp+var_28]
mov eax, [rax+4]
sub rdi, rax
call sign
mov [rbp+var_4], eax
loc_717EF:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
| long long compare_columns(_QWORD *a1, int **a2)
{
int v3; // [rsp+8h] [rbp-38h]
int v4; // [rsp+Ch] [rbp-34h]
int *v5; // [rsp+18h] [rbp-28h]
_DWORD *v6; // [rsp+20h] [rbp-20h]
v6 = (_DWORD *)*a1;
v5 = *a2;
if ( *(_DWORD *)*a1 == 9 )
v4 = 0;
else
v4 = *v6;
if ( *v5 == 9 )
v3 = 0;
else
v3 = *v5;
if ( v4 || *((_BYTE *)v6 + 18) )
{
if ( !v3 && !*((_BYTE *)v5 + 18) )
return 1;
if ( v4 != v3 )
{
if ( !v4 )
return (unsigned int)-1;
if ( !v3 )
return 1;
if ( v4 == 3 )
return (unsigned int)-1;
if ( v3 == 3 )
return 1;
if ( *v6 != 4 && *v5 != 4 && *((unsigned __int16 *)v6 + 4) != *((unsigned __int16 *)v5 + 4) )
return (unsigned int)sign(*((unsigned __int16 *)v6 + 4) - (unsigned long long)*((unsigned __int16 *)v5 + 4));
if ( v4 == 4 )
return 1;
if ( v3 == 4 )
return (unsigned int)-1;
}
return (unsigned int)sign((unsigned int)v6[1] - (unsigned long long)(unsigned int)v5[1]);
}
if ( !v3 && !*((_BYTE *)v5 + 18) )
return (unsigned int)sign((unsigned int)v6[1] - (unsigned long long)(unsigned int)v5[1]);
return (unsigned int)-1;
}
| compare_columns:
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 RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX],0x9
JNZ 0x00171666
XOR EAX,EAX
MOV dword ptr [RBP + -0x34],EAX
JMP 0x0017166f
LAB_00171666:
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x34],EAX
LAB_0017166f:
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x28]
CMP dword ptr [RAX],0x9
JNZ 0x00171685
XOR EAX,EAX
MOV dword ptr [RBP + -0x38],EAX
JMP 0x0017168e
LAB_00171685:
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x38],EAX
LAB_0017168e:
MOV EAX,dword ptr [RBP + -0x38]
MOV dword ptr [RBP + -0x30],EAX
CMP dword ptr [RBP + -0x2c],0x0
JNZ 0x001716e3
MOV RAX,qword ptr [RBP + -0x20]
CMP byte ptr [RAX + 0x12],0x0
JNZ 0x001716e3
CMP dword ptr [RBP + -0x30],0x0
JNZ 0x001716b7
MOV RAX,qword ptr [RBP + -0x28]
MOVZX EAX,byte ptr [RAX + 0x12]
CMP EAX,0x0
JZ 0x001716c3
LAB_001716b7:
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001717ef
LAB_001716c3:
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x4]
MOV EDI,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x4]
SUB RDI,RAX
CALL 0x001722d0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001717ef
LAB_001716e3:
CMP dword ptr [RBP + -0x30],0x0
JNZ 0x001716ff
MOV RAX,qword ptr [RBP + -0x28]
CMP byte ptr [RAX + 0x12],0x0
JNZ 0x001716ff
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001717ef
LAB_001716ff:
MOV EAX,dword ptr [RBP + -0x2c]
CMP EAX,dword ptr [RBP + -0x30]
JNZ 0x00171727
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x4]
MOV EDI,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x4]
SUB RDI,RAX
CALL 0x001722d0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001717ef
LAB_00171727:
CMP dword ptr [RBP + -0x2c],0x0
JNZ 0x00171739
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001717ef
LAB_00171739:
CMP dword ptr [RBP + -0x30],0x0
JNZ 0x0017174b
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001717ef
LAB_0017174b:
CMP dword ptr [RBP + -0x2c],0x3
JNZ 0x0017175d
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001717ef
LAB_0017175d:
CMP dword ptr [RBP + -0x30],0x3
JNZ 0x0017176f
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001717ef
LAB_0017176f:
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX],0x4
JZ 0x001717b6
MOV RAX,qword ptr [RBP + -0x28]
CMP dword ptr [RAX],0x4
JZ 0x001717b6
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x28]
MOVZX ECX,word ptr [RCX + 0x8]
CMP EAX,ECX
JZ 0x001717b4
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0x8]
MOV EDI,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOVZX EAX,word ptr [RAX + 0x8]
SUB RDI,RAX
CALL 0x001722d0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001717ef
LAB_001717b4:
JMP 0x001717b6
LAB_001717b6:
CMP dword ptr [RBP + -0x2c],0x4
JNZ 0x001717c5
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001717ef
LAB_001717c5:
CMP dword ptr [RBP + -0x30],0x4
JNZ 0x001717d4
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001717ef
LAB_001717d4:
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x4]
MOV EDI,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x4]
SUB RDI,RAX
CALL 0x001722d0
MOV dword ptr [RBP + -0x4],EAX
LAB_001717ef:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int compare_columns(int8 *param_1,uchar *param_2,size_t *param_3,uchar *param_4,size_t param_5
)
{
int *piVar1;
int *piVar2;
int local_40;
int local_3c;
int local_c;
piVar1 = (int *)*param_1;
piVar2 = *(int **)param_2;
if (*piVar1 == 9) {
local_3c = 0;
}
else {
local_3c = *piVar1;
}
if (*piVar2 == 9) {
local_40 = 0;
}
else {
local_40 = *piVar2;
}
if ((local_3c == 0) && (*(char *)((long)piVar1 + 0x12) == '\0')) {
if ((local_40 == 0) && (*(char *)((long)piVar2 + 0x12) == '\0')) {
local_c = sign((EVP_PKEY_CTX *)((ulong)(uint)piVar1[1] - (ulong)(uint)piVar2[1]),param_2,
param_3,param_4,param_5);
}
else {
local_c = -1;
}
}
else if ((local_40 == 0) && (*(char *)((long)piVar2 + 0x12) == '\0')) {
local_c = 1;
}
else if (local_3c == local_40) {
local_c = sign((EVP_PKEY_CTX *)((ulong)(uint)piVar1[1] - (ulong)(uint)piVar2[1]),param_2,param_3
,param_4,param_5);
}
else if (local_3c == 0) {
local_c = -1;
}
else if (local_40 == 0) {
local_c = 1;
}
else if (local_3c == 3) {
local_c = -1;
}
else if (local_40 == 3) {
local_c = 1;
}
else if (((*piVar1 == 4) || (*piVar2 == 4)) ||
(param_4 = (uchar *)(ulong)*(ushort *)(piVar2 + 2),
*(ushort *)(piVar1 + 2) == *(ushort *)(piVar2 + 2))) {
if (local_3c == 4) {
local_c = 1;
}
else if (local_40 == 4) {
local_c = -1;
}
else {
local_c = sign((EVP_PKEY_CTX *)((ulong)(uint)piVar1[1] - (ulong)(uint)piVar2[1]),param_2,
param_3,param_4,param_5);
}
}
else {
local_c = sign((EVP_PKEY_CTX *)((ulong)*(ushort *)(piVar1 + 2) - (ulong)*(ushort *)(piVar2 + 2))
,param_2,param_3,param_4,param_5);
}
return local_c;
}
|
Subsets and Splits
C++ Functions With Standard Library Dependencies
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ Standard Library Function Analysis
Filters C++ code examples that use standard library containers and types, providing useful insights into common programming patterns and data structures in the dataset.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.