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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
26,500 | minja::IfExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const | monkey531[P]llama/common/minja.hpp | Value do_evaluate(const std::shared_ptr<Context> & context) const override {
if (!condition) throw std::runtime_error("IfExpr.condition is null");
if (!then_expr) throw std::runtime_error("IfExpr.then_expr is null");
if (condition->evaluate(context).to_bool()) {
return then_expr->evaluate(context);
}
if (else_expr) {
return else_expr->evaluate(context);
}
return nullptr;
} | O0 | cpp | minja::IfExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const:
subq $0xb8, %rsp
movq %rdi, 0x20(%rsp)
movq %rdi, %rax
movq %rax, 0x28(%rsp)
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xa0(%rsp)
movq 0xa8(%rsp), %rdi
movq %rdi, 0x30(%rsp)
addq $0x20, %rdi
callq 0x109d40
testb $0x1, %al
jne 0x13d464
movl $0x10, %edi
callq 0x59660
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x18(%rsp)
leaq 0xd1d24(%rip), %rsi # 0x20f146
callq 0x59450
jmp 0x13d429
movq 0x18(%rsp), %rdi
movq 0x162b7b(%rip), %rsi # 0x29ffb0
movq 0x162b3c(%rip), %rdx # 0x29ff78
callq 0x59ac0
movq 0x18(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
callq 0x59f20
jmp 0x13d5c1
movq 0x30(%rsp), %rdi
addq $0x30, %rdi
callq 0x109d40
testb $0x1, %al
jne 0x13d4d4
movl $0x10, %edi
callq 0x59660
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x10(%rsp)
leaq 0xd1ccd(%rip), %rsi # 0x20f15f
callq 0x59450
jmp 0x13d499
movq 0x10(%rsp), %rdi
movq 0x162b0b(%rip), %rsi # 0x29ffb0
movq 0x162acc(%rip), %rdx # 0x29ff78
callq 0x59ac0
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
callq 0x59f20
jmp 0x13d5c1
movq 0x30(%rsp), %rdi
addq $0x20, %rdi
callq 0x10fe70
movq %rax, %rsi
movq 0xa0(%rsp), %rdx
leaq 0x40(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x10fe80
movq (%rsp), %rdi
callq 0x1101d0
movb %al, 0xf(%rsp)
jmp 0x13d50a
leaq 0x40(%rsp), %rdi
callq 0x110320
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x13d51e
jmp 0x13d563
movq 0x30(%rsp), %rdi
addq $0x30, %rdi
callq 0x10fe70
movq 0x20(%rsp), %rdi
movq %rax, %rsi
movq 0xa0(%rsp), %rdx
callq 0x10fe80
jmp 0x13d5b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x110320
jmp 0x13d5c1
movq 0x30(%rsp), %rdi
addq $0x40, %rdi
callq 0x109d40
testb $0x1, %al
jne 0x13d577
jmp 0x13d59c
movq 0x30(%rsp), %rdi
addq $0x40, %rdi
callq 0x10fe70
movq 0x20(%rsp), %rdi
movq %rax, %rsi
movq 0xa0(%rsp), %rdx
callq 0x10fe80
jmp 0x13d5b4
movq 0x20(%rsp), %rdi
movq $0x0, 0x38(%rsp)
leaq 0x38(%rsp), %rsi
callq 0x11baa0
movq 0x28(%rsp), %rax
addq $0xb8, %rsp
retq
movq 0x98(%rsp), %rdi
callq 0x59b80
nop
| _ZNK5minja6IfExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE:
sub rsp, 0B8h
mov [rsp+0B8h+var_98], rdi
mov rax, rdi
mov [rsp+0B8h+var_90], rax
mov [rsp+0B8h+var_8], rdi
mov [rsp+0B8h+var_10], rsi
mov [rsp+0B8h+var_18], rdx
mov rdi, [rsp+0B8h+var_10]
mov [rsp+0B8h+var_88], rdi
add rdi, 20h ; ' '
call _ZNKSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(void)
test al, 1
jnz short loc_13D464
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rsp+0B8h+var_A0], rax
lea rsi, aIfexprConditio; "IfExpr.condition is null"
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short $+2
loc_13D429:
mov rdi, [rsp+0B8h+var_A0]; void *
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
mov rdi, [rsp+0B8h+var_A0]; void *
mov rcx, rax
mov eax, edx
mov [rsp+0B8h+var_20], rcx
mov [rsp+0B8h+var_24], eax
call ___cxa_free_exception
jmp loc_13D5C1
loc_13D464:
mov rdi, [rsp+0B8h+var_88]
add rdi, 30h ; '0'
call _ZNKSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(void)
test al, 1
jnz short loc_13D4D4
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rsp+0B8h+var_A8], rax
lea rsi, aIfexprThenExpr; "IfExpr.then_expr is null"
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short $+2
loc_13D499:
mov rdi, [rsp+0B8h+var_A8]; void *
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
mov rdi, [rsp+0B8h+var_A8]; void *
mov rcx, rax
mov eax, edx
mov [rsp+0B8h+var_20], rcx
mov [rsp+0B8h+var_24], eax
call ___cxa_free_exception
jmp loc_13D5C1
loc_13D4D4:
mov rdi, [rsp+0B8h+var_88]
add rdi, 20h ; ' '
call _ZNKSt19__shared_ptr_accessIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rsi, rax
mov rdx, [rsp+0B8h+var_18]
lea rdi, [rsp+0B8h+var_78]
mov [rsp+0B8h+var_B8], rdi
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov rdi, [rsp+0B8h+var_B8]; this
call _ZNK5minja5Value7to_boolEv; minja::Value::to_bool(void)
mov [rsp+0B8h+var_A9], al
jmp short $+2
loc_13D50A:
lea rdi, [rsp+0B8h+var_78]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov al, [rsp+0B8h+var_A9]
test al, 1
jnz short loc_13D51E
jmp short loc_13D563
loc_13D51E:
mov rdi, [rsp+0B8h+var_88]
add rdi, 30h ; '0'
call _ZNKSt19__shared_ptr_accessIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, [rsp+0B8h+var_98]
mov rsi, rax
mov rdx, [rsp+0B8h+var_18]
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
jmp short loc_13D5B4
mov rcx, rax
mov eax, edx
mov [rsp+0B8h+var_20], rcx
mov [rsp+0B8h+var_24], eax
lea rdi, [rsp+0B8h+var_78]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_13D5C1
loc_13D563:
mov rdi, [rsp+0B8h+var_88]
add rdi, 40h ; '@'
call _ZNKSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(void)
test al, 1
jnz short loc_13D577
jmp short loc_13D59C
loc_13D577:
mov rdi, [rsp+0B8h+var_88]
add rdi, 40h ; '@'
call _ZNKSt19__shared_ptr_accessIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, [rsp+0B8h+var_98]
mov rsi, rax
mov rdx, [rsp+0B8h+var_18]
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
jmp short loc_13D5B4
loc_13D59C:
mov rdi, [rsp+0B8h+var_98]
mov [rsp+0B8h+var_80], 0
lea rsi, [rsp+0B8h+var_80]
call _ZN5minja5ValueC2ERKDn; minja::Value::Value(decltype(nullptr) const&)
loc_13D5B4:
mov rax, [rsp+0B8h+var_90]
add rsp, 0B8h
retn
loc_13D5C1:
mov rdi, [rsp+0B8h+var_20]
call __Unwind_Resume
| long long minja::IfExpr::do_evaluate(long long a1, _QWORD *a2, long long a3)
{
void (***v3)(void); // rax
void (***v4)(void); // rax
void (***v5)(void); // rax
char v7; // [rsp+Fh] [rbp-A9h]
std::runtime_error *v8; // [rsp+10h] [rbp-A8h]
std::runtime_error *exception; // [rsp+18h] [rbp-A0h]
_BYTE v10[84]; // [rsp+40h] [rbp-78h] BYREF
long long v11; // [rsp+A0h] [rbp-18h]
_QWORD *v12; // [rsp+A8h] [rbp-10h]
long long v13; // [rsp+B0h] [rbp-8h]
v13 = a1;
v12 = a2;
v11 = a3;
if ( !std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(a2 + 4) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "IfExpr.condition is null");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( !std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(a2 + 6) )
{
v8 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v8, "IfExpr.then_expr is null");
__cxa_throw(
v8,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v3 = (void (***)(void))std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::operator->((long long)(a2 + 4));
minja::Expression::evaluate((long long)v10, v3);
v7 = minja::Value::to_bool((minja::Value *)v10);
minja::Value::~Value((minja::Value *)v10);
if ( (v7 & 1) != 0 )
{
v4 = (void (***)(void))std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::operator->((long long)(a2 + 6));
minja::Expression::evaluate(a1, v4);
}
else if ( std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(a2 + 8) )
{
v5 = (void (***)(void))std::__shared_ptr_access<minja::Expression,(__gnu_cxx::_Lock_policy)2,false,false>::operator->((long long)(a2 + 8));
minja::Expression::evaluate(a1, v5);
}
else
{
minja::Value::Value(a1);
}
return a1;
}
| |||
26,501 | minja::IfExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const | monkey531[P]llama/common/minja.hpp | Value do_evaluate(const std::shared_ptr<Context> & context) const override {
if (!condition) throw std::runtime_error("IfExpr.condition is null");
if (!then_expr) throw std::runtime_error("IfExpr.then_expr is null");
if (condition->evaluate(context).to_bool()) {
return then_expr->evaluate(context);
}
if (else_expr) {
return else_expr->evaluate(context);
}
return nullptr;
} | O2 | cpp | minja::IfExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rsi, %r15
movq 0x20(%rsi), %rsi
testq %rsi, %rsi
je 0x7085a
cmpq $0x0, 0x30(%r15)
je 0x70876
movq %rdx, %r14
movq %rdi, %rbx
movq %rsp, %r12
movq %r12, %rdi
callq 0x6206e
movq %r12, %rdi
callq 0x62244
movl %eax, %ebp
movq %rsp, %rdi
callq 0x622fe
testb %bpl, %bpl
je 0x70825
movq 0x30(%r15), %rsi
jmp 0x7082e
movq 0x40(%r15), %rsi
testq %rsi, %rsi
je 0x70849
movq %rbx, %rdi
movq %r14, %rdx
callq 0x6206e
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rsp, %rsi
andq $0x0, (%rsi)
movq %rbx, %rdi
callq 0x66956
jmp 0x70839
pushq $0x10
popq %rdi
callq 0x23450
movq %rax, %r14
leaq 0x42ef3(%rip), %rsi # 0xb375f
movq %rax, %rdi
callq 0x23310
jmp 0x70890
pushq $0x10
popq %rdi
callq 0x23450
movq %rax, %r14
leaq 0x42ef0(%rip), %rsi # 0xb3778
movq %rax, %rdi
callq 0x23310
movq 0x8b759(%rip), %rsi # 0xfbff0
movq 0x8b6ba(%rip), %rdx # 0xfbf58
movq %r14, %rdi
callq 0x23e90
jmp 0x708a8
movq %rax, %rbx
movq %r14, %rdi
callq 0x23660
jmp 0x708c0
movq %rax, %rbx
movq %rsp, %rdi
callq 0x622fe
movq %rbx, %rdi
callq 0x23f10
| _ZNK5minja6IfExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 50h
mov r15, rsi
mov rsi, [rsi+20h]
test rsi, rsi
jz short loc_7085A
cmp qword ptr [r15+30h], 0
jz short loc_70876
mov r14, rdx
mov rbx, rdi
mov r12, rsp
mov rdi, r12
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
mov rdi, r12; this
call _ZNK5minja5Value7to_boolEv; minja::Value::to_bool(void)
mov ebp, eax
mov rdi, rsp; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
test bpl, bpl
jz short loc_70825
mov rsi, [r15+30h]
jmp short loc_7082E
loc_70825:
mov rsi, [r15+40h]
test rsi, rsi
jz short loc_70849
loc_7082E:
mov rdi, rbx
mov rdx, r14
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
loc_70839:
mov rax, rbx
add rsp, 50h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_70849:
mov rsi, rsp
and qword ptr [rsi], 0
mov rdi, rbx
call _ZN5minja5ValueC2ERKDn; minja::Value::Value(decltype(nullptr) const&)
jmp short loc_70839
loc_7085A:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aIfexprConditio; "IfExpr.condition is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short loc_70890
loc_70876:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aIfexprThenExpr; "IfExpr.then_expr is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
loc_70890:
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short $+2
loc_708A8:
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_708C0
mov rbx, rax
mov rdi, rsp; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_708C0:
mov rdi, rbx
call __Unwind_Resume
| _OWORD * minja::IfExpr::do_evaluate(_OWORD *a1, _QWORD *a2)
{
void (***v3)(void); // rsi
char v4; // bp
void (***v5)(void); // rsi
std::runtime_error *exception; // r14
_QWORD v8[15]; // [rsp+0h] [rbp-78h] BYREF
v3 = (void (***)(void))a2[4];
if ( !v3 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "IfExpr.condition is null");
goto LABEL_11;
}
if ( !a2[6] )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "IfExpr.then_expr is null");
LABEL_11:
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Expression::evaluate((long long)v8, v3);
v4 = minja::Value::to_bool((minja::Value *)v8);
minja::Value::~Value((minja::Value *)v8);
if ( v4 )
{
v5 = (void (***)(void))a2[6];
}
else
{
v5 = (void (***)(void))a2[8];
if ( !v5 )
{
v8[0] = 0LL;
minja::Value::Value(a1);
return a1;
}
}
minja::Expression::evaluate((long long)a1, v5);
return a1;
}
| do_evaluate:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x50
MOV R15,RSI
MOV RSI,qword ptr [RSI + 0x20]
TEST RSI,RSI
JZ 0x0017085a
CMP qword ptr [R15 + 0x30],0x0
JZ 0x00170876
MOV R14,RDX
MOV RBX,RDI
MOV R12,RSP
MOV RDI,R12
CALL 0x0016206e
LAB_00170808:
MOV RDI,R12
CALL 0x00162244
LAB_00170810:
MOV EBP,EAX
MOV RDI,RSP
CALL 0x001622fe
TEST BPL,BPL
JZ 0x00170825
MOV RSI,qword ptr [R15 + 0x30]
JMP 0x0017082e
LAB_00170825:
MOV RSI,qword ptr [R15 + 0x40]
TEST RSI,RSI
JZ 0x00170849
LAB_0017082e:
MOV RDI,RBX
MOV RDX,R14
CALL 0x0016206e
LAB_00170839:
MOV RAX,RBX
ADD RSP,0x50
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00170849:
MOV RSI,RSP
AND qword ptr [RSI],0x0
MOV RDI,RBX
CALL 0x00166956
JMP 0x00170839
LAB_0017085a:
PUSH 0x10
POP RDI
CALL 0x00123450
MOV R14,RAX
LAB_00170865:
LEA RSI,[0x1b375f]
MOV RDI,RAX
CALL 0x00123310
LAB_00170874:
JMP 0x00170890
LAB_00170876:
PUSH 0x10
POP RDI
CALL 0x00123450
MOV R14,RAX
LAB_00170881:
LEA RSI,[0x1b3778]
MOV RDI,RAX
CALL 0x00123310
LAB_00170890:
MOV RSI,qword ptr [0x001fbff0]
MOV RDX,qword ptr [0x001fbf58]
MOV RDI,R14
CALL 0x00123e90
|
/* minja::IfExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */
IfExpr * __thiscall minja::IfExpr::do_evaluate(IfExpr *this,shared_ptr *param_1)
{
char cVar1;
runtime_error *this_00;
shared_ptr *psVar2;
_func_decltype_nullptr *local_78 [10];
if (*(shared_ptr **)(param_1 + 0x20) == (shared_ptr *)0x0) {
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00170865 to 00170873 has its CatchHandler @ 001708a8 */
std::runtime_error::runtime_error(this_00,"IfExpr.condition is null");
}
else {
if (*(long *)(param_1 + 0x30) != 0) {
Expression::evaluate((Expression *)local_78,*(shared_ptr **)(param_1 + 0x20));
/* try { // try from 00170808 to 0017080f has its CatchHandler @ 001708b5 */
cVar1 = Value::to_bool((Value *)local_78);
Value::~Value((Value *)local_78);
if (cVar1 == '\0') {
psVar2 = *(shared_ptr **)(param_1 + 0x40);
if (psVar2 == (shared_ptr *)0x0) {
local_78[0] = (_func_decltype_nullptr *)0x0;
Value::Value((Value *)this,local_78);
return this;
}
}
else {
psVar2 = *(shared_ptr **)(param_1 + 0x30);
}
Expression::evaluate((Expression *)this,psVar2);
return this;
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00170881 to 0017088f has its CatchHandler @ 001708a6 */
std::runtime_error::runtime_error(this_00,"IfExpr.then_expr is null");
}
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_001fbff0,PTR__runtime_error_001fbf58);
}
| |
26,502 | compare_bin | eloqsql/mysys/my_compare.c | static int compare_bin(const uchar *a, uint a_length,
const uchar *b, uint b_length,
my_bool part_key, my_bool skip_end_space)
{
uint length= MY_MIN(a_length,b_length);
const uchar *end= a+ length;
int flag;
while (a < end)
if ((flag= (int) *a++ - (int) *b++))
return flag;
if (part_key && b_length < a_length)
return 0;
if (skip_end_space && a_length != b_length)
{
int swap= 1;
/*
We are using space compression. We have to check if longer key
has next character < ' ', in which case it's less than the shorter
key that has an implicite space afterwards.
This code is identical to the one in
strings/ctype-simple.c:my_strnncollsp_simple
*/
if (a_length < b_length)
{
/* put shorter key in a */
a_length= b_length;
a= b;
swap= -1; /* swap sign of result */
}
for (end= a + a_length-length; a < end ; a++)
{
if (*a != ' ')
return (*a < ' ') ? -swap : swap;
}
return 0;
}
return (int) (a_length-b_length);
} | O3 | c | compare_bin:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
cmpl %ecx, %esi
movl %ecx, %r10d
cmovbl %esi, %r10d
leaq (%rdi,%r10), %r11
cmpq %r11, %rdi
jae 0x9f238
movzbl (%rdi), %eax
incq %rdi
movzbl (%rdx), %ebx
incq %rdx
subl %ebx, %eax
je 0x9f221
jmp 0x9f2a6
testb %r8b, %r8b
setne %al
cmpl %ecx, %esi
seta %r8b
testb %al, %r8b
je 0x9f24d
xorl %eax, %eax
jmp 0x9f2a6
testb %r9b, %r9b
sete %r8b
movl %esi, %eax
subl %ecx, %eax
sete %r9b
orb %r8b, %r9b
jne 0x9f2a6
xorl %eax, %eax
cmpl %ecx, %esi
cmoval %esi, %ecx
cmovbq %rdx, %rdi
movl $0x0, %edx
sbbl %edx, %edx
leaq (%rdi,%rcx), %rsi
subq %r10, %rsi
cmpq %rsi, %rdi
jae 0x9f2a6
orl $0x1, %edx
subq %r10, %rcx
xorl %eax, %eax
movb (%rdi,%rax), %sil
cmpb $0x20, %sil
jne 0x9f29b
incq %rax
cmpq %rax, %rcx
jne 0x9f287
jmp 0x9f249
movl %edx, %eax
negl %eax
cmpb $0x20, %sil
cmovael %edx, %eax
popq %rbx
popq %rbp
retq
| compare_bin:
push rbp
mov rbp, rsp
push rbx
cmp esi, ecx
mov r10d, ecx
cmovb r10d, esi
lea r11, [rdi+r10]
loc_9F221:
cmp rdi, r11
jnb short loc_9F238
movzx eax, byte ptr [rdi]
inc rdi
movzx ebx, byte ptr [rdx]
inc rdx
sub eax, ebx
jz short loc_9F221
jmp short loc_9F2A6
loc_9F238:
test r8b, r8b
setnz al
cmp esi, ecx
setnbe r8b
test r8b, al
jz short loc_9F24D
loc_9F249:
xor eax, eax
jmp short loc_9F2A6
loc_9F24D:
test r9b, r9b
setz r8b
mov eax, esi
sub eax, ecx
setz r9b
or r9b, r8b
jnz short loc_9F2A6
xor eax, eax
cmp esi, ecx
cmova ecx, esi
cmovb rdi, rdx
mov edx, 0
sbb edx, edx
lea rsi, [rdi+rcx]
sub rsi, r10
cmp rdi, rsi
jnb short loc_9F2A6
or edx, 1
sub rcx, r10
xor eax, eax
loc_9F287:
mov sil, [rdi+rax]
cmp sil, 20h ; ' '
jnz short loc_9F29B
inc rax
cmp rcx, rax
jnz short loc_9F287
jmp short loc_9F249
loc_9F29B:
mov eax, edx
neg eax
cmp sil, 20h ; ' '
cmovnb eax, edx
loc_9F2A6:
pop rbx
pop rbp
retn
| long long compare_bin(unsigned __int8 *a1, unsigned int a2, unsigned __int8 *a3, long long a4, char a5, char a6)
{
long long v6; // r10
unsigned __int8 *v7; // r11
int v8; // eax
int v9; // ebx
long long result; // rax
bool v11; // cf
unsigned int v12; // edx
long long v13; // rcx
long long v14; // rax
unsigned __int8 v15; // si
v6 = (unsigned int)a4;
if ( a2 < (unsigned int)a4 )
v6 = a2;
v7 = &a1[v6];
while ( a1 < v7 )
{
v8 = *a1++;
v9 = *a3++;
result = (unsigned int)(v8 - v9);
if ( (_DWORD)result )
return result;
}
if ( a5 != 0 && a2 > (unsigned int)a4 )
return 0LL;
result = a2 - (unsigned int)a4;
if ( a6 != 0 && a2 != (_DWORD)a4 )
{
result = 0LL;
v11 = a2 < (unsigned int)a4;
if ( a2 > (unsigned int)a4 )
a4 = a2;
if ( v11 )
a1 = a3;
if ( a1 < &a1[a4 - v6] )
{
v12 = v11 ? -1 : 1;
v13 = a4 - v6;
v14 = 0LL;
while ( 1 )
{
v15 = a1[v14];
if ( v15 != 32 )
break;
if ( v13 == ++v14 )
return 0LL;
}
result = -v12;
if ( v15 >= 0x20u )
return v12;
}
}
return result;
}
| compare_bin:
PUSH RBP
MOV RBP,RSP
PUSH RBX
CMP ESI,ECX
MOV R10D,ECX
CMOVC R10D,ESI
LEA R11,[RDI + R10*0x1]
LAB_0019f221:
CMP RDI,R11
JNC 0x0019f238
MOVZX EAX,byte ptr [RDI]
INC RDI
MOVZX EBX,byte ptr [RDX]
INC RDX
SUB EAX,EBX
JZ 0x0019f221
JMP 0x0019f2a6
LAB_0019f238:
TEST R8B,R8B
SETNZ AL
CMP ESI,ECX
SETA R8B
TEST R8B,AL
JZ 0x0019f24d
LAB_0019f249:
XOR EAX,EAX
JMP 0x0019f2a6
LAB_0019f24d:
TEST R9B,R9B
SETZ R8B
MOV EAX,ESI
SUB EAX,ECX
SETZ R9B
OR R9B,R8B
JNZ 0x0019f2a6
XOR EAX,EAX
CMP ESI,ECX
CMOVA ECX,ESI
CMOVC RDI,RDX
MOV EDX,0x0
SBB EDX,EDX
LEA RSI,[RDI + RCX*0x1]
SUB RSI,R10
CMP RDI,RSI
JNC 0x0019f2a6
OR EDX,0x1
SUB RCX,R10
XOR EAX,EAX
LAB_0019f287:
MOV SIL,byte ptr [RDI + RAX*0x1]
CMP SIL,0x20
JNZ 0x0019f29b
INC RAX
CMP RCX,RAX
JNZ 0x0019f287
JMP 0x0019f249
LAB_0019f29b:
MOV EAX,EDX
NEG EAX
CMP SIL,0x20
CMOVNC EAX,EDX
LAB_0019f2a6:
POP RBX
POP RBP
RET
|
uint compare_bin(byte *param_1,uint param_2,byte *param_3,uint param_4,char param_5,char param_6)
{
byte *pbVar1;
byte bVar2;
byte bVar3;
long lVar4;
ulong uVar5;
uint uVar6;
ulong uVar7;
uVar7 = (ulong)param_4;
if (param_2 < param_4) {
uVar7 = (ulong)param_2;
}
pbVar1 = param_1 + uVar7;
while (param_1 < pbVar1) {
bVar2 = *param_1;
param_1 = param_1 + 1;
bVar3 = *param_3;
param_3 = param_3 + 1;
if ((uint)bVar2 - (uint)bVar3 != 0) {
return (uint)bVar2 - (uint)bVar3;
}
}
if (param_2 <= param_4 || param_5 == '\0') {
if (param_2 - param_4 == 0 || param_6 == '\0') {
return param_2 - param_4;
}
uVar5 = (ulong)param_4;
if (param_4 < param_2) {
uVar5 = (ulong)param_2;
}
if (param_2 < param_4) {
param_1 = param_3;
}
if (param_1 + (uVar5 - uVar7) <= param_1) {
return 0;
}
uVar6 = -(uint)(param_2 < param_4) | 1;
lVar4 = 0;
do {
if (param_1[lVar4] != 0x20) {
if (param_1[lVar4] < 0x20) {
return -uVar6;
}
return uVar6;
}
lVar4 = lVar4 + 1;
} while (uVar5 - uVar7 != lVar4);
}
return 0;
}
| |
26,503 | ggml_graph_cpy | ngxson[P]ggml-easy/ggml/src/ggml.c | void ggml_graph_cpy(struct ggml_cgraph * src, struct ggml_cgraph * dst) {
GGML_ASSERT(dst->size >= src->n_leafs);
GGML_ASSERT(dst->size >= src->n_nodes);
GGML_ASSERT(dst->visited_hash_set.size >= src->visited_hash_set.size);
dst->n_leafs = src->n_leafs;
dst->n_nodes = src->n_nodes;
dst->order = src->order;
for (int i = 0; i < src->n_leafs; ++i) {
dst->leafs[i] = src->leafs[i];
}
for (int i = 0; i < src->n_nodes; ++i) {
dst->nodes[i] = src->nodes[i];
}
for (size_t i = 0; i < src->visited_hash_set.size; ++i) {
// copy all hashset keys (tensors) that are in use
if (ggml_bitset_get(src->visited_hash_set.used, i)) {
ggml_hash_insert(&dst->visited_hash_set, src->visited_hash_set.keys[i]);
}
}
if (dst->grads) {
memset(dst->grads, 0, dst->visited_hash_set.size*sizeof(struct ggml_tensor *));
memset(dst->grad_accs, 0, dst->visited_hash_set.size*sizeof(struct ggml_tensor *));
}
if (src->grads) {
GGML_ASSERT(dst->grads != NULL);
GGML_ASSERT(dst->grad_accs != NULL);
for (int i = 0; i < src->n_nodes; ++i) {
const size_t igrad_src = ggml_hash_find(&src->visited_hash_set, src->nodes[i]);
const size_t igrad_dst = ggml_hash_find(&dst->visited_hash_set, dst->nodes[i]);
GGML_ASSERT(igrad_src != GGML_HASHSET_FULL);
GGML_ASSERT(ggml_bitset_get(src->visited_hash_set.used, igrad_src));
GGML_ASSERT(igrad_dst != GGML_HASHSET_FULL);
GGML_ASSERT(ggml_bitset_get(dst->visited_hash_set.used, igrad_dst));
dst->grads[igrad_dst] = src->grads[igrad_src];
dst->grad_accs[igrad_dst] = src->grad_accs[igrad_src];
}
}
} | O2 | c | ggml_graph_cpy:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl (%rsi), %eax
movl 0x8(%rdi), %ecx
cmpl %ecx, %eax
jl 0x275b7
movq %rdi, %r14
movl 0x4(%rdi), %edx
cmpl %edx, %eax
jl 0x275d3
movq %rsi, %rbx
movq 0x30(%r14), %rax
cmpq %rax, 0x30(%rsi)
jb 0x275ef
leaq 0x30(%rbx), %r15
leaq 0x30(%r14), %rsi
movq %rsi, (%rsp)
movl %ecx, 0x8(%rbx)
movl %edx, 0x4(%rbx)
movl 0x48(%r14), %ecx
movl %ecx, 0x48(%rbx)
movl 0x8(%r14), %ecx
xorl %edx, %edx
testl %ecx, %ecx
cmovlel %edx, %ecx
cmpq %rdx, %rcx
je 0x273f0
movq 0x28(%r14), %rsi
movq (%rsi,%rdx,8), %rsi
movq 0x28(%rbx), %rdi
movq %rsi, (%rdi,%rdx,8)
incq %rdx
jmp 0x273d6
movl 0x4(%r14), %ecx
xorl %edx, %edx
testl %ecx, %ecx
cmovlel %edx, %ecx
cmpq %rdx, %rcx
je 0x27415
movq 0x10(%r14), %rsi
movq (%rsi,%rdx,8), %rsi
movq 0x10(%rbx), %rdi
movq %rsi, (%rdi,%rdx,8)
incq %rdx
jmp 0x273fb
xorl %r12d, %r12d
cmpq %rax, %r12
jae 0x2744a
movq 0x38(%r14), %rcx
movq %r12, %rdx
shrq $0x5, %rdx
movl (%rcx,%rdx,4), %ecx
btl %r12d, %ecx
jae 0x27445
movq 0x40(%r14), %rax
movq (%rax,%r12,8), %rsi
movq %r15, %rdi
callq 0x27646
movq 0x30(%r14), %rax
incq %r12
jmp 0x27418
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x27475
movq 0x30(%rbx), %rdx
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x1cc30
movq 0x20(%rbx), %rdi
movq 0x30(%rbx), %rdx
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x1cc30
cmpq $0x0, 0x18(%r14)
je 0x27533
cmpq $0x0, 0x18(%rbx)
je 0x2760b
cmpq $0x0, 0x20(%rbx)
je 0x27627
movl 0x4(%r14), %ebp
xorl %r12d, %r12d
testl %ebp, %ebp
cmovlel %r12d, %ebp
cmpq %r12, %rbp
je 0x27533
movq 0x10(%r14), %rax
movq (%rax,%r12,8), %rsi
movq (%rsp), %rdi
callq 0x2719c
movq %rax, %r13
movq 0x10(%rbx), %rax
movq (%rax,%r12,8), %rsi
movq %r15, %rdi
callq 0x2719c
cmpq $-0x1, %r13
je 0x27542
movq 0x38(%r14), %rcx
movq %r13, %rdx
shrq $0x5, %rdx
movl (%rcx,%rdx,4), %ecx
btl %r13d, %ecx
jae 0x2755e
cmpq $-0x1, %rax
je 0x2757a
movq 0x38(%rbx), %rcx
movq %rax, %rdx
shrq $0x5, %rdx
movl (%rcx,%rdx,4), %ecx
btl %eax, %ecx
jae 0x27596
movq 0x18(%r14), %rcx
movq (%rcx,%r13,8), %rcx
movq 0x18(%rbx), %rdx
movq %rcx, (%rdx,%rax,8)
movq 0x20(%r14), %rcx
movq (%rcx,%r13,8), %rcx
movq 0x20(%rbx), %rdx
movq %rcx, (%rdx,%rax,8)
incq %r12
jmp 0x274a3
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2403a(%rip), %rdi # 0x4b583
leaq 0x2407e(%rip), %rdx # 0x4b5ce
leaq 0x251bb(%rip), %rcx # 0x4c712
movl $0x179d, %esi # imm = 0x179D
jmp 0x275b0
leaq 0x2401e(%rip), %rdi # 0x4b583
leaq 0x24062(%rip), %rdx # 0x4b5ce
leaq 0x251be(%rip), %rcx # 0x4c731
movl $0x179e, %esi # imm = 0x179E
jmp 0x275b0
leaq 0x24002(%rip), %rdi # 0x4b583
leaq 0x24046(%rip), %rdx # 0x4b5ce
leaq 0x251d9(%rip), %rcx # 0x4c768
movl $0x179f, %esi # imm = 0x179F
jmp 0x275b0
leaq 0x23fe6(%rip), %rdi # 0x4b583
leaq 0x2402a(%rip), %rdx # 0x4b5ce
leaq 0x251dc(%rip), %rcx # 0x4c787
movl $0x17a0, %esi # imm = 0x17A0
xorl %eax, %eax
callq 0x1e770
leaq 0x23fc5(%rip), %rdi # 0x4b583
leaq 0x24009(%rip), %rdx # 0x4b5ce
leaq 0x250af(%rip), %rcx # 0x4c67b
movl $0x177b, %esi # imm = 0x177B
jmp 0x275b0
leaq 0x23fa9(%rip), %rdi # 0x4b583
leaq 0x23fed(%rip), %rdx # 0x4b5ce
leaq 0x250ad(%rip), %rcx # 0x4c695
movl $0x177c, %esi # imm = 0x177C
jmp 0x275b0
leaq 0x23f8d(%rip), %rdi # 0x4b583
leaq 0x23fd1(%rip), %rdx # 0x4b5ce
leaq 0x250ab(%rip), %rcx # 0x4c6af
movl $0x177d, %esi # imm = 0x177D
jmp 0x275b0
leaq 0x23f71(%rip), %rdi # 0x4b583
leaq 0x23fb5(%rip), %rdx # 0x4b5ce
leaq 0x250c8(%rip), %rcx # 0x4c6e8
movl $0x1797, %esi # imm = 0x1797
jmp 0x275b0
leaq 0x23f55(%rip), %rdi # 0x4b583
leaq 0x23f99(%rip), %rdx # 0x4b5ce
leaq 0x250bf(%rip), %rcx # 0x4c6fb
movl $0x1798, %esi # imm = 0x1798
jmp 0x275b0
| ggml_graph_cpy:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov eax, [rsi]
mov ecx, [rdi+8]
cmp eax, ecx
jl loc_275B7
mov r14, rdi
mov edx, [rdi+4]
cmp eax, edx
jl loc_275D3
mov rbx, rsi
mov rax, [r14+30h]
cmp [rsi+30h], rax
jb loc_275EF
lea r15, [rbx+30h]
lea rsi, [r14+30h]
mov [rsp+38h+var_38], rsi
mov [rbx+8], ecx
mov [rbx+4], edx
mov ecx, [r14+48h]
mov [rbx+48h], ecx
mov ecx, [r14+8]
xor edx, edx
test ecx, ecx
cmovle ecx, edx
loc_273D6:
cmp rcx, rdx
jz short loc_273F0
mov rsi, [r14+28h]
mov rsi, [rsi+rdx*8]
mov rdi, [rbx+28h]
mov [rdi+rdx*8], rsi
inc rdx
jmp short loc_273D6
loc_273F0:
mov ecx, [r14+4]
xor edx, edx
test ecx, ecx
cmovle ecx, edx
loc_273FB:
cmp rcx, rdx
jz short loc_27415
mov rsi, [r14+10h]
mov rsi, [rsi+rdx*8]
mov rdi, [rbx+10h]
mov [rdi+rdx*8], rsi
inc rdx
jmp short loc_273FB
loc_27415:
xor r12d, r12d
loc_27418:
cmp r12, rax
jnb short loc_2744A
mov rcx, [r14+38h]
mov rdx, r12
shr rdx, 5
mov ecx, [rcx+rdx*4]
bt ecx, r12d
jnb short loc_27445
mov rax, [r14+40h]
mov rsi, [rax+r12*8]
mov rdi, r15
call ggml_hash_insert
mov rax, [r14+30h]
loc_27445:
inc r12
jmp short loc_27418
loc_2744A:
mov rdi, [rbx+18h]
test rdi, rdi
jz short loc_27475
mov rdx, [rbx+30h]
shl rdx, 3
xor esi, esi
call _memset
mov rdi, [rbx+20h]
mov rdx, [rbx+30h]
shl rdx, 3
xor esi, esi
call _memset
loc_27475:
cmp qword ptr [r14+18h], 0
jz loc_27533
cmp qword ptr [rbx+18h], 0
jz loc_2760B
cmp qword ptr [rbx+20h], 0
jz loc_27627
mov ebp, [r14+4]
xor r12d, r12d
test ebp, ebp
cmovle ebp, r12d
loc_274A3:
cmp rbp, r12
jz loc_27533
mov rax, [r14+10h]
mov rsi, [rax+r12*8]
mov rdi, [rsp+38h+var_38]
call ggml_hash_find
mov r13, rax
mov rax, [rbx+10h]
mov rsi, [rax+r12*8]
mov rdi, r15
call ggml_hash_find
cmp r13, 0FFFFFFFFFFFFFFFFh
jz short loc_27542
mov rcx, [r14+38h]
mov rdx, r13
shr rdx, 5
mov ecx, [rcx+rdx*4]
bt ecx, r13d
jnb short loc_2755E
cmp rax, 0FFFFFFFFFFFFFFFFh
jz loc_2757A
mov rcx, [rbx+38h]
mov rdx, rax
shr rdx, 5
mov ecx, [rcx+rdx*4]
bt ecx, eax
jnb loc_27596
mov rcx, [r14+18h]
mov rcx, [rcx+r13*8]
mov rdx, [rbx+18h]
mov [rdx+rax*8], rcx
mov rcx, [r14+20h]
mov rcx, [rcx+r13*8]
mov rdx, [rbx+20h]
mov [rdx+rax*8], rcx
inc r12
jmp loc_274A3
loc_27533:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_27542:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aIgradSrcGgmlHa; "igrad_src != GGML_HASHSET_FULL"
mov esi, 179Dh
jmp short loc_275B0
loc_2755E:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlBitsetGetS; "ggml_bitset_get(src->visited_hash_set.u"...
mov esi, 179Eh
jmp short loc_275B0
loc_2757A:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aIgradDstGgmlHa; "igrad_dst != GGML_HASHSET_FULL"
mov esi, 179Fh
jmp short loc_275B0
loc_27596:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlBitsetGetD; "ggml_bitset_get(dst->visited_hash_set.u"...
mov esi, 17A0h
loc_275B0:
xor eax, eax
call _ggml_abort
loc_275B7:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDstSizeSrcNLea; "dst->size >= src->n_leafs"
mov esi, 177Bh
jmp short loc_275B0
loc_275D3:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDstSizeSrcNNod; "dst->size >= src->n_nodes"
mov esi, 177Ch
jmp short loc_275B0
loc_275EF:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDstVisitedHash; "dst->visited_hash_set.size >= src->visi"...
mov esi, 177Dh
jmp short loc_275B0
loc_2760B:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDstGradsNull; "dst->grads != NULL"
mov esi, 1797h
jmp short loc_275B0
loc_27627:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDstGradAccsNul; "dst->grad_accs != NULL"
mov esi, 1798h
jmp loc_275B0
| unsigned long long ggml_graph_cpy(
long long a1,
long long a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
long long a11,
long long a12,
long long a13,
long long a14)
{
char v14; // al
int v15; // ecx
int v17; // edx
unsigned long long result; // rax
long long v19; // rcx
long long v20; // rdx
long long v21; // rcx
long long v22; // rdx
unsigned long long i; // r12
int v24; // ecx
long long v25; // rdi
long long v26; // rbp
long long v27; // r12
unsigned long long v28; // r13
int v29; // ecx
int v30; // ecx
const char *v31; // rcx
int v32; // esi
_QWORD *v33; // [rsp+0h] [rbp-38h]
LOBYTE(v33) = v14;
v15 = *(_DWORD *)(a1 + 8);
if ( *(_DWORD *)a2 < v15 )
{
v31 = "dst->size >= src->n_leafs";
v32 = 6011;
goto LABEL_35;
}
v17 = *(_DWORD *)(a1 + 4);
if ( *(_DWORD *)a2 < v17 )
{
v31 = "dst->size >= src->n_nodes";
v32 = 6012;
goto LABEL_35;
}
result = *(_QWORD *)(a1 + 48);
if ( *(_QWORD *)(a2 + 48) < result )
{
v31 = "dst->visited_hash_set.size >= src->visited_hash_set.size";
v32 = 6013;
goto LABEL_35;
}
v33 = (_QWORD *)(a1 + 48);
*(_DWORD *)(a2 + 8) = v15;
*(_DWORD *)(a2 + 4) = v17;
*(_DWORD *)(a2 + 72) = *(_DWORD *)(a1 + 72);
v19 = *(unsigned int *)(a1 + 8);
v20 = 0LL;
if ( (int)v19 <= 0 )
v19 = 0LL;
while ( v19 != v20 )
{
*(_QWORD *)(*(_QWORD *)(a2 + 40) + 8 * v20) = *(_QWORD *)(*(_QWORD *)(a1 + 40) + 8 * v20);
++v20;
}
v21 = *(unsigned int *)(a1 + 4);
v22 = 0LL;
if ( (int)v21 <= 0 )
v21 = 0LL;
while ( v21 != v22 )
{
*(_QWORD *)(*(_QWORD *)(a2 + 16) + 8 * v22) = *(_QWORD *)(*(_QWORD *)(a1 + 16) + 8 * v22);
++v22;
}
for ( i = 0LL; i < result; ++i )
{
v24 = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 4 * (i >> 5));
if ( _bittest(&v24, i) )
{
ggml_hash_insert(a2 + 48, *(_QWORD *)(*(_QWORD *)(a1 + 64) + 8 * i));
result = *(_QWORD *)(a1 + 48);
}
}
v25 = *(_QWORD *)(a2 + 24);
if ( v25 )
{
memset(v25, 0LL, 8LL * *(_QWORD *)(a2 + 48));
result = memset(*(_QWORD *)(a2 + 32), 0LL, 8LL * *(_QWORD *)(a2 + 48));
}
if ( *(_QWORD *)(a1 + 24) )
{
if ( *(_QWORD *)(a2 + 24) )
{
if ( *(_QWORD *)(a2 + 32) )
{
v26 = *(unsigned int *)(a1 + 4);
v27 = 0LL;
if ( (int)v26 <= 0 )
v26 = 0LL;
while ( 1 )
{
if ( v26 == v27 )
return result;
v28 = ggml_hash_find(v33, *(_QWORD *)(*(_QWORD *)(a1 + 16) + 8 * v27));
result = ggml_hash_find((_QWORD *)(a2 + 48), *(_QWORD *)(*(_QWORD *)(a2 + 16) + 8 * v27));
if ( v28 == -1LL )
{
v31 = "igrad_src != GGML_HASHSET_FULL";
v32 = 6045;
goto LABEL_35;
}
v29 = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 4 * (v28 >> 5));
if ( !_bittest(&v29, v28) )
{
v31 = "ggml_bitset_get(src->visited_hash_set.used, igrad_src)";
v32 = 6046;
goto LABEL_35;
}
if ( result == -1LL )
{
v31 = "igrad_dst != GGML_HASHSET_FULL";
v32 = 6047;
goto LABEL_35;
}
v30 = *(_DWORD *)(*(_QWORD *)(a2 + 56) + 4 * (result >> 5));
if ( !_bittest(&v30, result) )
break;
*(_QWORD *)(*(_QWORD *)(a2 + 24) + 8 * result) = *(_QWORD *)(*(_QWORD *)(a1 + 24) + 8 * v28);
*(_QWORD *)(*(_QWORD *)(a2 + 32) + 8 * result) = *(_QWORD *)(*(_QWORD *)(a1 + 32) + 8 * v28);
++v27;
}
v31 = "ggml_bitset_get(dst->visited_hash_set.used, igrad_dst)";
v32 = 6048;
}
else
{
v31 = "dst->grad_accs != NULL";
v32 = 6040;
}
}
else
{
v31 = "dst->grads != NULL";
v32 = 6039;
}
LABEL_35:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",
v32,
(long long)"GGML_ASSERT(%s) failed",
(long long)v31,
a13,
a14,
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
(char)v33);
}
return result;
}
| ggml_graph_cpy:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EAX,dword ptr [RSI]
MOV ECX,dword ptr [RDI + 0x8]
CMP EAX,ECX
JL 0x001275b7
MOV R14,RDI
MOV EDX,dword ptr [RDI + 0x4]
CMP EAX,EDX
JL 0x001275d3
MOV RBX,RSI
MOV RAX,qword ptr [R14 + 0x30]
CMP qword ptr [RSI + 0x30],RAX
JC 0x001275ef
LEA R15,[RBX + 0x30]
LEA RSI,[R14 + 0x30]
MOV qword ptr [RSP],RSI
MOV dword ptr [RBX + 0x8],ECX
MOV dword ptr [RBX + 0x4],EDX
MOV ECX,dword ptr [R14 + 0x48]
MOV dword ptr [RBX + 0x48],ECX
MOV ECX,dword ptr [R14 + 0x8]
XOR EDX,EDX
TEST ECX,ECX
CMOVLE ECX,EDX
LAB_001273d6:
CMP RCX,RDX
JZ 0x001273f0
MOV RSI,qword ptr [R14 + 0x28]
MOV RSI,qword ptr [RSI + RDX*0x8]
MOV RDI,qword ptr [RBX + 0x28]
MOV qword ptr [RDI + RDX*0x8],RSI
INC RDX
JMP 0x001273d6
LAB_001273f0:
MOV ECX,dword ptr [R14 + 0x4]
XOR EDX,EDX
TEST ECX,ECX
CMOVLE ECX,EDX
LAB_001273fb:
CMP RCX,RDX
JZ 0x00127415
MOV RSI,qword ptr [R14 + 0x10]
MOV RSI,qword ptr [RSI + RDX*0x8]
MOV RDI,qword ptr [RBX + 0x10]
MOV qword ptr [RDI + RDX*0x8],RSI
INC RDX
JMP 0x001273fb
LAB_00127415:
XOR R12D,R12D
LAB_00127418:
CMP R12,RAX
JNC 0x0012744a
MOV RCX,qword ptr [R14 + 0x38]
MOV RDX,R12
SHR RDX,0x5
MOV ECX,dword ptr [RCX + RDX*0x4]
BT ECX,R12D
JNC 0x00127445
MOV RAX,qword ptr [R14 + 0x40]
MOV RSI,qword ptr [RAX + R12*0x8]
MOV RDI,R15
CALL 0x00127646
MOV RAX,qword ptr [R14 + 0x30]
LAB_00127445:
INC R12
JMP 0x00127418
LAB_0012744a:
MOV RDI,qword ptr [RBX + 0x18]
TEST RDI,RDI
JZ 0x00127475
MOV RDX,qword ptr [RBX + 0x30]
SHL RDX,0x3
XOR ESI,ESI
CALL 0x0011cc30
MOV RDI,qword ptr [RBX + 0x20]
MOV RDX,qword ptr [RBX + 0x30]
SHL RDX,0x3
XOR ESI,ESI
CALL 0x0011cc30
LAB_00127475:
CMP qword ptr [R14 + 0x18],0x0
JZ 0x00127533
CMP qword ptr [RBX + 0x18],0x0
JZ 0x0012760b
CMP qword ptr [RBX + 0x20],0x0
JZ 0x00127627
MOV EBP,dword ptr [R14 + 0x4]
XOR R12D,R12D
TEST EBP,EBP
CMOVLE EBP,R12D
LAB_001274a3:
CMP RBP,R12
JZ 0x00127533
MOV RAX,qword ptr [R14 + 0x10]
MOV RSI,qword ptr [RAX + R12*0x8]
MOV RDI,qword ptr [RSP]
CALL 0x0012719c
MOV R13,RAX
MOV RAX,qword ptr [RBX + 0x10]
MOV RSI,qword ptr [RAX + R12*0x8]
MOV RDI,R15
CALL 0x0012719c
CMP R13,-0x1
JZ 0x00127542
MOV RCX,qword ptr [R14 + 0x38]
MOV RDX,R13
SHR RDX,0x5
MOV ECX,dword ptr [RCX + RDX*0x4]
BT ECX,R13D
JNC 0x0012755e
CMP RAX,-0x1
JZ 0x0012757a
MOV RCX,qword ptr [RBX + 0x38]
MOV RDX,RAX
SHR RDX,0x5
MOV ECX,dword ptr [RCX + RDX*0x4]
BT ECX,EAX
JNC 0x00127596
MOV RCX,qword ptr [R14 + 0x18]
MOV RCX,qword ptr [RCX + R13*0x8]
MOV RDX,qword ptr [RBX + 0x18]
MOV qword ptr [RDX + RAX*0x8],RCX
MOV RCX,qword ptr [R14 + 0x20]
MOV RCX,qword ptr [RCX + R13*0x8]
MOV RDX,qword ptr [RBX + 0x20]
MOV qword ptr [RDX + RAX*0x8],RCX
INC R12
JMP 0x001274a3
LAB_00127533:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00127542:
LEA RDI,[0x14b583]
LEA RDX,[0x14b5ce]
LEA RCX,[0x14c712]
MOV ESI,0x179d
JMP 0x001275b0
LAB_0012755e:
LEA RDI,[0x14b583]
LEA RDX,[0x14b5ce]
LEA RCX,[0x14c731]
MOV ESI,0x179e
JMP 0x001275b0
LAB_0012757a:
LEA RDI,[0x14b583]
LEA RDX,[0x14b5ce]
LEA RCX,[0x14c768]
MOV ESI,0x179f
JMP 0x001275b0
LAB_00127596:
LEA RDI,[0x14b583]
LEA RDX,[0x14b5ce]
LEA RCX,[0x14c787]
MOV ESI,0x17a0
LAB_001275b0:
XOR EAX,EAX
CALL 0x0011e770
LAB_001275b7:
LEA RDI,[0x14b583]
LEA RDX,[0x14b5ce]
LEA RCX,[0x14c67b]
MOV ESI,0x177b
JMP 0x001275b0
LAB_001275d3:
LEA RDI,[0x14b583]
LEA RDX,[0x14b5ce]
LEA RCX,[0x14c695]
MOV ESI,0x177c
JMP 0x001275b0
LAB_001275ef:
LEA RDI,[0x14b583]
LEA RDX,[0x14b5ce]
LEA RCX,[0x14c6af]
MOV ESI,0x177d
JMP 0x001275b0
LAB_0012760b:
LEA RDI,[0x14b583]
LEA RDX,[0x14b5ce]
LEA RCX,[0x14c6e8]
MOV ESI,0x1797
JMP 0x001275b0
LAB_00127627:
LEA RDI,[0x14b583]
LEA RDX,[0x14b5ce]
LEA RCX,[0x14c6fb]
MOV ESI,0x1798
JMP 0x001275b0
|
void ggml_graph_cpy(long param_1,int *param_2)
{
int iVar1;
ulong uVar2;
ulong uVar3;
char *pcVar4;
ulong uVar5;
int8 uVar6;
ulong uVar7;
if (*param_2 < *(int *)(param_1 + 8)) {
pcVar4 = "dst->size >= src->n_leafs";
uVar6 = 0x177b;
}
else {
iVar1 = *(int *)(param_1 + 4);
if (*param_2 < iVar1) {
pcVar4 = "dst->size >= src->n_nodes";
uVar6 = 0x177c;
}
else {
uVar2 = *(ulong *)(param_1 + 0x30);
if (*(ulong *)(param_2 + 0xc) < uVar2) {
pcVar4 = "dst->visited_hash_set.size >= src->visited_hash_set.size";
uVar6 = 0x177d;
}
else {
param_2[2] = *(int *)(param_1 + 8);
param_2[1] = iVar1;
param_2[0x12] = *(int *)(param_1 + 0x48);
uVar5 = 0;
uVar7 = (ulong)*(uint *)(param_1 + 8);
if ((int)*(uint *)(param_1 + 8) < 1) {
uVar7 = uVar5;
}
for (; uVar7 != uVar5; uVar5 = uVar5 + 1) {
*(int8 *)(*(long *)(param_2 + 10) + uVar5 * 8) =
*(int8 *)(*(long *)(param_1 + 0x28) + uVar5 * 8);
}
uVar5 = 0;
uVar7 = (ulong)*(uint *)(param_1 + 4);
if ((int)*(uint *)(param_1 + 4) < 1) {
uVar7 = uVar5;
}
for (; uVar7 != uVar5; uVar5 = uVar5 + 1) {
*(int8 *)(*(long *)(param_2 + 4) + uVar5 * 8) =
*(int8 *)(*(long *)(param_1 + 0x10) + uVar5 * 8);
}
for (uVar7 = 0; uVar7 < uVar2; uVar7 = uVar7 + 1) {
if ((*(uint *)(*(long *)(param_1 + 0x38) + (uVar7 >> 5) * 4) >> ((uint)uVar7 & 0x1f) & 1)
!= 0) {
ggml_hash_insert(param_2 + 0xc);
uVar2 = *(ulong *)(param_1 + 0x30);
}
}
if (*(void **)(param_2 + 6) != (void *)0x0) {
memset(*(void **)(param_2 + 6),0,*(long *)(param_2 + 0xc) << 3);
memset(*(void **)(param_2 + 8),0,*(long *)(param_2 + 0xc) << 3);
}
if (*(long *)(param_1 + 0x18) == 0) {
return;
}
if (*(long *)(param_2 + 6) == 0) {
pcVar4 = "dst->grads != NULL";
uVar6 = 0x1797;
}
else if (*(long *)(param_2 + 8) == 0) {
pcVar4 = "dst->grad_accs != NULL";
uVar6 = 0x1798;
}
else {
uVar7 = 0;
uVar2 = (ulong)*(uint *)(param_1 + 4);
if ((int)*(uint *)(param_1 + 4) < 1) {
uVar2 = uVar7;
}
while( true ) {
if (uVar2 == uVar7) {
return;
}
uVar5 = ggml_hash_find(param_1 + 0x30,
*(int8 *)(*(long *)(param_1 + 0x10) + uVar7 * 8));
uVar3 = ggml_hash_find(param_2 + 0xc,*(int8 *)(*(long *)(param_2 + 4) + uVar7 * 8)
);
if (uVar5 == 0xffffffffffffffff) break;
if ((*(uint *)(*(long *)(param_1 + 0x38) + (uVar5 >> 5) * 4) >> ((uint)uVar5 & 0x1f) & 1
) == 0) {
pcVar4 = "ggml_bitset_get(src->visited_hash_set.used, igrad_src)";
uVar6 = 0x179e;
goto LAB_001275b0;
}
if (uVar3 == 0xffffffffffffffff) {
pcVar4 = "igrad_dst != GGML_HASHSET_FULL";
uVar6 = 0x179f;
goto LAB_001275b0;
}
if ((*(uint *)(*(long *)(param_2 + 0xe) + (uVar3 >> 5) * 4) >> ((uint)uVar3 & 0x1f) & 1)
== 0) {
pcVar4 = "ggml_bitset_get(dst->visited_hash_set.used, igrad_dst)";
uVar6 = 0x17a0;
goto LAB_001275b0;
}
*(int8 *)(*(long *)(param_2 + 6) + uVar3 * 8) =
*(int8 *)(*(long *)(param_1 + 0x18) + uVar5 * 8);
*(int8 *)(*(long *)(param_2 + 8) + uVar3 * 8) =
*(int8 *)(*(long *)(param_1 + 0x20) + uVar5 * 8);
uVar7 = uVar7 + 1;
}
pcVar4 = "igrad_src != GGML_HASHSET_FULL";
uVar6 = 0x179d;
}
}
}
}
LAB_001275b0:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",uVar6,
"GGML_ASSERT(%s) failed",pcVar4);
}
| |
26,504 | ggml_graph_cpy | ngxson[P]ggml-easy/ggml/src/ggml.c | void ggml_graph_cpy(struct ggml_cgraph * src, struct ggml_cgraph * dst) {
GGML_ASSERT(dst->size >= src->n_leafs);
GGML_ASSERT(dst->size >= src->n_nodes);
GGML_ASSERT(dst->visited_hash_set.size >= src->visited_hash_set.size);
dst->n_leafs = src->n_leafs;
dst->n_nodes = src->n_nodes;
dst->order = src->order;
for (int i = 0; i < src->n_leafs; ++i) {
dst->leafs[i] = src->leafs[i];
}
for (int i = 0; i < src->n_nodes; ++i) {
dst->nodes[i] = src->nodes[i];
}
for (size_t i = 0; i < src->visited_hash_set.size; ++i) {
// copy all hashset keys (tensors) that are in use
if (ggml_bitset_get(src->visited_hash_set.used, i)) {
ggml_hash_insert(&dst->visited_hash_set, src->visited_hash_set.keys[i]);
}
}
if (dst->grads) {
memset(dst->grads, 0, dst->visited_hash_set.size*sizeof(struct ggml_tensor *));
memset(dst->grad_accs, 0, dst->visited_hash_set.size*sizeof(struct ggml_tensor *));
}
if (src->grads) {
GGML_ASSERT(dst->grads != NULL);
GGML_ASSERT(dst->grad_accs != NULL);
for (int i = 0; i < src->n_nodes; ++i) {
const size_t igrad_src = ggml_hash_find(&src->visited_hash_set, src->nodes[i]);
const size_t igrad_dst = ggml_hash_find(&dst->visited_hash_set, dst->nodes[i]);
GGML_ASSERT(igrad_src != GGML_HASHSET_FULL);
GGML_ASSERT(ggml_bitset_get(src->visited_hash_set.used, igrad_src));
GGML_ASSERT(igrad_dst != GGML_HASHSET_FULL);
GGML_ASSERT(ggml_bitset_get(dst->visited_hash_set.used, igrad_dst));
dst->grads[igrad_dst] = src->grads[igrad_src];
dst->grad_accs[igrad_dst] = src->grad_accs[igrad_src];
}
}
} | O3 | c | ggml_graph_cpy:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl (%rsi), %eax
movl 0x8(%rdi), %ecx
cmpl %ecx, %eax
jl 0x2228a
movq %rdi, %r14
movl 0x4(%rdi), %edx
cmpl %edx, %eax
jl 0x222a6
movq %rsi, %rbx
movq 0x30(%r14), %rax
cmpq %rax, 0x30(%rsi)
jb 0x222c2
movl %ecx, 0x8(%rbx)
movl %edx, 0x4(%rbx)
movl 0x48(%r14), %ecx
movl %ecx, 0x48(%rbx)
movslq 0x8(%r14), %rcx
testq %rcx, %rcx
jle 0x220b8
xorl %edx, %edx
movq 0x28(%r14), %rsi
movq (%rsi,%rdx,8), %rsi
movq 0x28(%rbx), %rdi
movq %rsi, (%rdi,%rdx,8)
incq %rdx
cmpq %rdx, %rcx
jne 0x220a0
movslq 0x4(%r14), %rcx
testq %rcx, %rcx
jle 0x220db
xorl %edx, %edx
movq 0x10(%r14), %rsi
movq (%rsi,%rdx,8), %rsi
movq 0x10(%rbx), %rdi
movq %rsi, (%rdi,%rdx,8)
incq %rdx
cmpq %rdx, %rcx
jne 0x220c3
leaq 0x30(%rbx), %r15
testq %rax, %rax
je 0x22117
xorl %r12d, %r12d
movq 0x38(%r14), %rcx
movq %r12, %rdx
shrq $0x5, %rdx
movl (%rcx,%rdx,4), %ecx
btl %r12d, %ecx
jae 0x2210f
movq 0x40(%r14), %rax
movq (%rax,%r12,8), %rsi
movq %r15, %rdi
callq 0x22319
movq 0x30(%r14), %rax
incq %r12
cmpq %rax, %r12
jb 0x220e7
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x22142
movq 0x30(%rbx), %rdx
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x168e0
movq 0x20(%rbx), %rdi
movq 0x30(%rbx), %rdx
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x168e0
cmpq $0x0, 0x18(%r14)
je 0x22206
cmpq $0x0, 0x18(%rbx)
je 0x222de
cmpq $0x0, 0x20(%rbx)
je 0x222fa
movslq 0x4(%r14), %rbp
testq %rbp, %rbp
jle 0x22206
leaq 0x30(%r14), %rax
movq %rax, (%rsp)
xorl %r12d, %r12d
movq 0x10(%r14), %rax
movq (%rax,%r12,8), %rsi
movq (%rsp), %rdi
callq 0x21e12
movq %rax, %r13
movq 0x10(%rbx), %rax
movq (%rax,%r12,8), %rsi
movq %r15, %rdi
callq 0x21e12
cmpq $-0x1, %r13
je 0x22215
movq 0x38(%r14), %rcx
movq %r13, %rdx
shrq $0x5, %rdx
movl (%rcx,%rdx,4), %ecx
btl %r13d, %ecx
jae 0x22231
cmpq $-0x1, %rax
je 0x2224d
movq 0x38(%rbx), %rcx
movq %rax, %rdx
shrq $0x5, %rdx
movl (%rcx,%rdx,4), %ecx
btl %eax, %ecx
jae 0x22269
movq 0x18(%r14), %rcx
movq (%rcx,%r13,8), %rcx
movq 0x18(%rbx), %rdx
movq %rcx, (%rdx,%rax,8)
movq 0x20(%r14), %rcx
movq (%rcx,%r13,8), %rcx
movq 0x20(%rbx), %rdx
movq %rcx, (%rdx,%rax,8)
incq %r12
cmpq %r12, %rbp
jne 0x2217b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x283f7(%rip), %rdi # 0x4a613
leaq 0x2843b(%rip), %rdx # 0x4a65e
leaq 0x29578(%rip), %rcx # 0x4b7a2
movl $0x179d, %esi # imm = 0x179D
jmp 0x22283
leaq 0x283db(%rip), %rdi # 0x4a613
leaq 0x2841f(%rip), %rdx # 0x4a65e
leaq 0x2957b(%rip), %rcx # 0x4b7c1
movl $0x179e, %esi # imm = 0x179E
jmp 0x22283
leaq 0x283bf(%rip), %rdi # 0x4a613
leaq 0x28403(%rip), %rdx # 0x4a65e
leaq 0x29596(%rip), %rcx # 0x4b7f8
movl $0x179f, %esi # imm = 0x179F
jmp 0x22283
leaq 0x283a3(%rip), %rdi # 0x4a613
leaq 0x283e7(%rip), %rdx # 0x4a65e
leaq 0x29599(%rip), %rcx # 0x4b817
movl $0x17a0, %esi # imm = 0x17A0
xorl %eax, %eax
callq 0x17c60
leaq 0x28382(%rip), %rdi # 0x4a613
leaq 0x283c6(%rip), %rdx # 0x4a65e
leaq 0x2946c(%rip), %rcx # 0x4b70b
movl $0x177b, %esi # imm = 0x177B
jmp 0x22283
leaq 0x28366(%rip), %rdi # 0x4a613
leaq 0x283aa(%rip), %rdx # 0x4a65e
leaq 0x2946a(%rip), %rcx # 0x4b725
movl $0x177c, %esi # imm = 0x177C
jmp 0x22283
leaq 0x2834a(%rip), %rdi # 0x4a613
leaq 0x2838e(%rip), %rdx # 0x4a65e
leaq 0x29468(%rip), %rcx # 0x4b73f
movl $0x177d, %esi # imm = 0x177D
jmp 0x22283
leaq 0x2832e(%rip), %rdi # 0x4a613
leaq 0x28372(%rip), %rdx # 0x4a65e
leaq 0x29485(%rip), %rcx # 0x4b778
movl $0x1797, %esi # imm = 0x1797
jmp 0x22283
leaq 0x28312(%rip), %rdi # 0x4a613
leaq 0x28356(%rip), %rdx # 0x4a65e
leaq 0x2947c(%rip), %rcx # 0x4b78b
movl $0x1798, %esi # imm = 0x1798
jmp 0x22283
| ggml_graph_cpy:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov eax, [rsi]
mov ecx, [rdi+8]
cmp eax, ecx
jl loc_2228A
mov r14, rdi
mov edx, [rdi+4]
cmp eax, edx
jl loc_222A6
mov rbx, rsi
mov rax, [r14+30h]
cmp [rsi+30h], rax
jb loc_222C2
mov [rbx+8], ecx
mov [rbx+4], edx
mov ecx, [r14+48h]
mov [rbx+48h], ecx
movsxd rcx, dword ptr [r14+8]
test rcx, rcx
jle short loc_220B8
xor edx, edx
loc_220A0:
mov rsi, [r14+28h]
mov rsi, [rsi+rdx*8]
mov rdi, [rbx+28h]
mov [rdi+rdx*8], rsi
inc rdx
cmp rcx, rdx
jnz short loc_220A0
loc_220B8:
movsxd rcx, dword ptr [r14+4]
test rcx, rcx
jle short loc_220DB
xor edx, edx
loc_220C3:
mov rsi, [r14+10h]
mov rsi, [rsi+rdx*8]
mov rdi, [rbx+10h]
mov [rdi+rdx*8], rsi
inc rdx
cmp rcx, rdx
jnz short loc_220C3
loc_220DB:
lea r15, [rbx+30h]
test rax, rax
jz short loc_22117
xor r12d, r12d
loc_220E7:
mov rcx, [r14+38h]
mov rdx, r12
shr rdx, 5
mov ecx, [rcx+rdx*4]
bt ecx, r12d
jnb short loc_2210F
mov rax, [r14+40h]
mov rsi, [rax+r12*8]
mov rdi, r15
call ggml_hash_insert
mov rax, [r14+30h]
loc_2210F:
inc r12
cmp r12, rax
jb short loc_220E7
loc_22117:
mov rdi, [rbx+18h]
test rdi, rdi
jz short loc_22142
mov rdx, [rbx+30h]
shl rdx, 3
xor esi, esi
call _memset
mov rdi, [rbx+20h]
mov rdx, [rbx+30h]
shl rdx, 3
xor esi, esi
call _memset
loc_22142:
cmp qword ptr [r14+18h], 0
jz loc_22206
cmp qword ptr [rbx+18h], 0
jz loc_222DE
cmp qword ptr [rbx+20h], 0
jz loc_222FA
movsxd rbp, dword ptr [r14+4]
test rbp, rbp
jle loc_22206
lea rax, [r14+30h]
mov [rsp+38h+var_38], rax
xor r12d, r12d
loc_2217B:
mov rax, [r14+10h]
mov rsi, [rax+r12*8]
mov rdi, [rsp+38h+var_38]
call ggml_hash_find
mov r13, rax
mov rax, [rbx+10h]
mov rsi, [rax+r12*8]
mov rdi, r15
call ggml_hash_find
cmp r13, 0FFFFFFFFFFFFFFFFh
jz short loc_22215
mov rcx, [r14+38h]
mov rdx, r13
shr rdx, 5
mov ecx, [rcx+rdx*4]
bt ecx, r13d
jnb short loc_22231
cmp rax, 0FFFFFFFFFFFFFFFFh
jz loc_2224D
mov rcx, [rbx+38h]
mov rdx, rax
shr rdx, 5
mov ecx, [rcx+rdx*4]
bt ecx, eax
jnb loc_22269
mov rcx, [r14+18h]
mov rcx, [rcx+r13*8]
mov rdx, [rbx+18h]
mov [rdx+rax*8], rcx
mov rcx, [r14+20h]
mov rcx, [rcx+r13*8]
mov rdx, [rbx+20h]
mov [rdx+rax*8], rcx
inc r12
cmp rbp, r12
jnz loc_2217B
loc_22206:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_22215:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aIgradSrcGgmlHa; "igrad_src != GGML_HASHSET_FULL"
mov esi, 179Dh
jmp short loc_22283
loc_22231:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlBitsetGetS; "ggml_bitset_get(src->visited_hash_set.u"...
mov esi, 179Eh
jmp short loc_22283
loc_2224D:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aIgradDstGgmlHa; "igrad_dst != GGML_HASHSET_FULL"
mov esi, 179Fh
jmp short loc_22283
loc_22269:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlBitsetGetD; "ggml_bitset_get(dst->visited_hash_set.u"...
mov esi, 17A0h
loc_22283:
xor eax, eax
call _ggml_abort
loc_2228A:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDstSizeSrcNLea; "dst->size >= src->n_leafs"
mov esi, 177Bh
jmp short loc_22283
loc_222A6:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDstSizeSrcNNod; "dst->size >= src->n_nodes"
mov esi, 177Ch
jmp short loc_22283
loc_222C2:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDstVisitedHash; "dst->visited_hash_set.size >= src->visi"...
mov esi, 177Dh
jmp short loc_22283
loc_222DE:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDstGradsNull; "dst->grads != NULL"
mov esi, 1797h
jmp short loc_22283
loc_222FA:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDstGradAccsNul; "dst->grad_accs != NULL"
mov esi, 1798h
jmp loc_22283
| unsigned long long ggml_graph_cpy(long long a1, long long a2, long long a3, long long a4, int a5, int a6)
{
int v6; // ecx
int v8; // edx
unsigned long long result; // rax
long long v10; // rcx
long long i; // rdx
long long v12; // rcx
long long j; // rdx
unsigned long long k; // r12
int v15; // ecx
long long v16; // rdi
long long v17; // rbp
long long v18; // r12
unsigned long long v19; // r13
int v20; // ecx
int v21; // ecx
const char *v22; // rcx
int v23; // esi
v6 = *(_DWORD *)(a1 + 8);
if ( *(_DWORD *)a2 < v6 )
{
v22 = "dst->size >= src->n_leafs";
v23 = 6011;
goto LABEL_32;
}
v8 = *(_DWORD *)(a1 + 4);
if ( *(_DWORD *)a2 < v8 )
{
v22 = "dst->size >= src->n_nodes";
v23 = 6012;
goto LABEL_32;
}
result = *(_QWORD *)(a1 + 48);
if ( *(_QWORD *)(a2 + 48) < result )
{
v22 = "dst->visited_hash_set.size >= src->visited_hash_set.size";
v23 = 6013;
goto LABEL_32;
}
*(_DWORD *)(a2 + 8) = v6;
*(_DWORD *)(a2 + 4) = v8;
*(_DWORD *)(a2 + 72) = *(_DWORD *)(a1 + 72);
v10 = *(int *)(a1 + 8);
if ( v10 > 0 )
{
for ( i = 0LL; i != v10; ++i )
*(_QWORD *)(*(_QWORD *)(a2 + 40) + 8 * i) = *(_QWORD *)(*(_QWORD *)(a1 + 40) + 8 * i);
}
v12 = *(int *)(a1 + 4);
if ( v12 > 0 )
{
for ( j = 0LL; j != v12; ++j )
*(_QWORD *)(*(_QWORD *)(a2 + 16) + 8 * j) = *(_QWORD *)(*(_QWORD *)(a1 + 16) + 8 * j);
}
if ( result )
{
for ( k = 0LL; k < result; ++k )
{
v15 = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 4 * (k >> 5));
if ( _bittest(&v15, k) )
{
ggml_hash_insert(a2 + 48, *(_QWORD *)(*(_QWORD *)(a1 + 64) + 8 * k));
result = *(_QWORD *)(a1 + 48);
}
}
}
v16 = *(_QWORD *)(a2 + 24);
if ( v16 )
{
memset(v16, 0LL, 8LL * *(_QWORD *)(a2 + 48));
result = memset(*(_QWORD *)(a2 + 32), 0LL, 8LL * *(_QWORD *)(a2 + 48));
}
if ( *(_QWORD *)(a1 + 24) )
{
if ( !*(_QWORD *)(a2 + 24) )
{
v22 = "dst->grads != NULL";
v23 = 6039;
goto LABEL_32;
}
if ( !*(_QWORD *)(a2 + 32) )
{
v22 = "dst->grad_accs != NULL";
v23 = 6040;
goto LABEL_32;
}
v17 = *(int *)(a1 + 4);
if ( v17 > 0 )
{
v18 = 0LL;
while ( 1 )
{
v19 = ggml_hash_find((_QWORD *)(a1 + 48), *(_QWORD *)(*(_QWORD *)(a1 + 16) + 8 * v18));
result = ggml_hash_find((_QWORD *)(a2 + 48), *(_QWORD *)(*(_QWORD *)(a2 + 16) + 8 * v18));
if ( v19 == -1LL )
{
v22 = "igrad_src != GGML_HASHSET_FULL";
v23 = 6045;
goto LABEL_32;
}
v20 = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 4 * (v19 >> 5));
if ( !_bittest(&v20, v19) )
{
v22 = "ggml_bitset_get(src->visited_hash_set.used, igrad_src)";
v23 = 6046;
goto LABEL_32;
}
if ( result == -1LL )
{
v22 = "igrad_dst != GGML_HASHSET_FULL";
v23 = 6047;
goto LABEL_32;
}
v21 = *(_DWORD *)(*(_QWORD *)(a2 + 56) + 4 * (result >> 5));
if ( !_bittest(&v21, result) )
break;
*(_QWORD *)(*(_QWORD *)(a2 + 24) + 8 * result) = *(_QWORD *)(*(_QWORD *)(a1 + 24) + 8 * v19);
*(_QWORD *)(*(_QWORD *)(a2 + 32) + 8 * result) = *(_QWORD *)(*(_QWORD *)(a1 + 32) + 8 * v19);
if ( v17 == ++v18 )
return result;
}
v22 = "ggml_bitset_get(dst->visited_hash_set.used, igrad_dst)";
v23 = 6048;
LABEL_32:
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",
v23,
(unsigned int)"GGML_ASSERT(%s) failed",
(_DWORD)v22,
a5,
a6);
}
}
return result;
}
| ggml_graph_cpy:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EAX,dword ptr [RSI]
MOV ECX,dword ptr [RDI + 0x8]
CMP EAX,ECX
JL 0x0012228a
MOV R14,RDI
MOV EDX,dword ptr [RDI + 0x4]
CMP EAX,EDX
JL 0x001222a6
MOV RBX,RSI
MOV RAX,qword ptr [R14 + 0x30]
CMP qword ptr [RSI + 0x30],RAX
JC 0x001222c2
MOV dword ptr [RBX + 0x8],ECX
MOV dword ptr [RBX + 0x4],EDX
MOV ECX,dword ptr [R14 + 0x48]
MOV dword ptr [RBX + 0x48],ECX
MOVSXD RCX,dword ptr [R14 + 0x8]
TEST RCX,RCX
JLE 0x001220b8
XOR EDX,EDX
LAB_001220a0:
MOV RSI,qword ptr [R14 + 0x28]
MOV RSI,qword ptr [RSI + RDX*0x8]
MOV RDI,qword ptr [RBX + 0x28]
MOV qword ptr [RDI + RDX*0x8],RSI
INC RDX
CMP RCX,RDX
JNZ 0x001220a0
LAB_001220b8:
MOVSXD RCX,dword ptr [R14 + 0x4]
TEST RCX,RCX
JLE 0x001220db
XOR EDX,EDX
LAB_001220c3:
MOV RSI,qword ptr [R14 + 0x10]
MOV RSI,qword ptr [RSI + RDX*0x8]
MOV RDI,qword ptr [RBX + 0x10]
MOV qword ptr [RDI + RDX*0x8],RSI
INC RDX
CMP RCX,RDX
JNZ 0x001220c3
LAB_001220db:
LEA R15,[RBX + 0x30]
TEST RAX,RAX
JZ 0x00122117
XOR R12D,R12D
LAB_001220e7:
MOV RCX,qword ptr [R14 + 0x38]
MOV RDX,R12
SHR RDX,0x5
MOV ECX,dword ptr [RCX + RDX*0x4]
BT ECX,R12D
JNC 0x0012210f
MOV RAX,qword ptr [R14 + 0x40]
MOV RSI,qword ptr [RAX + R12*0x8]
MOV RDI,R15
CALL 0x00122319
MOV RAX,qword ptr [R14 + 0x30]
LAB_0012210f:
INC R12
CMP R12,RAX
JC 0x001220e7
LAB_00122117:
MOV RDI,qword ptr [RBX + 0x18]
TEST RDI,RDI
JZ 0x00122142
MOV RDX,qword ptr [RBX + 0x30]
SHL RDX,0x3
XOR ESI,ESI
CALL 0x001168e0
MOV RDI,qword ptr [RBX + 0x20]
MOV RDX,qword ptr [RBX + 0x30]
SHL RDX,0x3
XOR ESI,ESI
CALL 0x001168e0
LAB_00122142:
CMP qword ptr [R14 + 0x18],0x0
JZ 0x00122206
CMP qword ptr [RBX + 0x18],0x0
JZ 0x001222de
CMP qword ptr [RBX + 0x20],0x0
JZ 0x001222fa
MOVSXD RBP,dword ptr [R14 + 0x4]
TEST RBP,RBP
JLE 0x00122206
LEA RAX,[R14 + 0x30]
MOV qword ptr [RSP],RAX
XOR R12D,R12D
LAB_0012217b:
MOV RAX,qword ptr [R14 + 0x10]
MOV RSI,qword ptr [RAX + R12*0x8]
MOV RDI,qword ptr [RSP]
CALL 0x00121e12
MOV R13,RAX
MOV RAX,qword ptr [RBX + 0x10]
MOV RSI,qword ptr [RAX + R12*0x8]
MOV RDI,R15
CALL 0x00121e12
CMP R13,-0x1
JZ 0x00122215
MOV RCX,qword ptr [R14 + 0x38]
MOV RDX,R13
SHR RDX,0x5
MOV ECX,dword ptr [RCX + RDX*0x4]
BT ECX,R13D
JNC 0x00122231
CMP RAX,-0x1
JZ 0x0012224d
MOV RCX,qword ptr [RBX + 0x38]
MOV RDX,RAX
SHR RDX,0x5
MOV ECX,dword ptr [RCX + RDX*0x4]
BT ECX,EAX
JNC 0x00122269
MOV RCX,qword ptr [R14 + 0x18]
MOV RCX,qword ptr [RCX + R13*0x8]
MOV RDX,qword ptr [RBX + 0x18]
MOV qword ptr [RDX + RAX*0x8],RCX
MOV RCX,qword ptr [R14 + 0x20]
MOV RCX,qword ptr [RCX + R13*0x8]
MOV RDX,qword ptr [RBX + 0x20]
MOV qword ptr [RDX + RAX*0x8],RCX
INC R12
CMP RBP,R12
JNZ 0x0012217b
LAB_00122206:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00122215:
LEA RDI,[0x14a613]
LEA RDX,[0x14a65e]
LEA RCX,[0x14b7a2]
MOV ESI,0x179d
JMP 0x00122283
LAB_00122231:
LEA RDI,[0x14a613]
LEA RDX,[0x14a65e]
LEA RCX,[0x14b7c1]
MOV ESI,0x179e
JMP 0x00122283
LAB_0012224d:
LEA RDI,[0x14a613]
LEA RDX,[0x14a65e]
LEA RCX,[0x14b7f8]
MOV ESI,0x179f
JMP 0x00122283
LAB_00122269:
LEA RDI,[0x14a613]
LEA RDX,[0x14a65e]
LEA RCX,[0x14b817]
MOV ESI,0x17a0
LAB_00122283:
XOR EAX,EAX
CALL 0x00117c60
LAB_0012228a:
LEA RDI,[0x14a613]
LEA RDX,[0x14a65e]
LEA RCX,[0x14b70b]
MOV ESI,0x177b
JMP 0x00122283
LAB_001222a6:
LEA RDI,[0x14a613]
LEA RDX,[0x14a65e]
LEA RCX,[0x14b725]
MOV ESI,0x177c
JMP 0x00122283
LAB_001222c2:
LEA RDI,[0x14a613]
LEA RDX,[0x14a65e]
LEA RCX,[0x14b73f]
MOV ESI,0x177d
JMP 0x00122283
LAB_001222de:
LEA RDI,[0x14a613]
LEA RDX,[0x14a65e]
LEA RCX,[0x14b778]
MOV ESI,0x1797
JMP 0x00122283
LAB_001222fa:
LEA RDI,[0x14a613]
LEA RDX,[0x14a65e]
LEA RCX,[0x14b78b]
MOV ESI,0x1798
JMP 0x00122283
|
void ggml_graph_cpy(long param_1,int *param_2)
{
int iVar1;
ulong uVar2;
char *pcVar3;
long lVar4;
int8 uVar5;
ulong uVar6;
if (*param_2 < *(int *)(param_1 + 8)) {
pcVar3 = "dst->size >= src->n_leafs";
uVar5 = 0x177b;
}
else {
iVar1 = *(int *)(param_1 + 4);
if (*param_2 < iVar1) {
pcVar3 = "dst->size >= src->n_nodes";
uVar5 = 0x177c;
}
else {
uVar2 = *(ulong *)(param_1 + 0x30);
if (*(ulong *)(param_2 + 0xc) < uVar2) {
pcVar3 = "dst->visited_hash_set.size >= src->visited_hash_set.size";
uVar5 = 0x177d;
}
else {
param_2[2] = *(int *)(param_1 + 8);
param_2[1] = iVar1;
param_2[0x12] = *(int *)(param_1 + 0x48);
iVar1 = *(int *)(param_1 + 8);
if (0 < (long)iVar1) {
lVar4 = 0;
do {
*(int8 *)(*(long *)(param_2 + 10) + lVar4 * 8) =
*(int8 *)(*(long *)(param_1 + 0x28) + lVar4 * 8);
lVar4 = lVar4 + 1;
} while (iVar1 != lVar4);
}
iVar1 = *(int *)(param_1 + 4);
if (0 < (long)iVar1) {
lVar4 = 0;
do {
*(int8 *)(*(long *)(param_2 + 4) + lVar4 * 8) =
*(int8 *)(*(long *)(param_1 + 0x10) + lVar4 * 8);
lVar4 = lVar4 + 1;
} while (iVar1 != lVar4);
}
if (uVar2 != 0) {
uVar6 = 0;
do {
if ((*(uint *)(*(long *)(param_1 + 0x38) + (uVar6 >> 5) * 4) >> ((uint)uVar6 & 0x1f) & 1
) != 0) {
ggml_hash_insert(param_2 + 0xc);
uVar2 = *(ulong *)(param_1 + 0x30);
}
uVar6 = uVar6 + 1;
} while (uVar6 < uVar2);
}
if (*(void **)(param_2 + 6) != (void *)0x0) {
memset(*(void **)(param_2 + 6),0,*(long *)(param_2 + 0xc) << 3);
memset(*(void **)(param_2 + 8),0,*(long *)(param_2 + 0xc) << 3);
}
if (*(long *)(param_1 + 0x18) == 0) {
return;
}
if (*(long *)(param_2 + 6) == 0) {
pcVar3 = "dst->grads != NULL";
uVar5 = 0x1797;
}
else if (*(long *)(param_2 + 8) == 0) {
pcVar3 = "dst->grad_accs != NULL";
uVar5 = 0x1798;
}
else {
iVar1 = *(int *)(param_1 + 4);
if ((long)iVar1 < 1) {
return;
}
lVar4 = 0;
while( true ) {
uVar2 = ggml_hash_find(param_1 + 0x30,
*(int8 *)(*(long *)(param_1 + 0x10) + lVar4 * 8));
uVar6 = ggml_hash_find(param_2 + 0xc,*(int8 *)(*(long *)(param_2 + 4) + lVar4 * 8)
);
if (uVar2 == 0xffffffffffffffff) {
pcVar3 = "igrad_src != GGML_HASHSET_FULL";
uVar5 = 0x179d;
goto LAB_00122283;
}
if ((*(uint *)(*(long *)(param_1 + 0x38) + (uVar2 >> 5) * 4) >> ((uint)uVar2 & 0x1f) & 1
) == 0) break;
if (uVar6 == 0xffffffffffffffff) {
pcVar3 = "igrad_dst != GGML_HASHSET_FULL";
uVar5 = 0x179f;
goto LAB_00122283;
}
if ((*(uint *)(*(long *)(param_2 + 0xe) + (uVar6 >> 5) * 4) >> ((uint)uVar6 & 0x1f) & 1)
== 0) {
pcVar3 = "ggml_bitset_get(dst->visited_hash_set.used, igrad_dst)";
uVar5 = 0x17a0;
goto LAB_00122283;
}
*(int8 *)(*(long *)(param_2 + 6) + uVar6 * 8) =
*(int8 *)(*(long *)(param_1 + 0x18) + uVar2 * 8);
*(int8 *)(*(long *)(param_2 + 8) + uVar6 * 8) =
*(int8 *)(*(long *)(param_1 + 0x20) + uVar2 * 8);
lVar4 = lVar4 + 1;
if (iVar1 == lVar4) {
return;
}
}
pcVar3 = "ggml_bitset_get(src->visited_hash_set.used, igrad_src)";
uVar5 = 0x179e;
}
}
}
}
LAB_00122283:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",uVar5,
"GGML_ASSERT(%s) failed",pcVar3);
}
| |
26,505 | find_longest_bitstream | eloqsql/storage/myisam/mi_packrec.c | static uint find_longest_bitstream(uint16 *table, uint16 *end)
{
uint length= 1;
uint length2;
if (!(*table & IS_CHAR))
{
uint16 *next= table + *table;
if (next > end || next == table)
{
DBUG_PRINT("error", ("ERROR: illegal pointer in decode tree"));
return OFFSET_TABLE_SIZE;
}
length= find_longest_bitstream(next, end) + 1;
}
table++;
if (!(*table & IS_CHAR))
{
uint16 *next= table + *table;
if (next > end || next == table)
{
DBUG_PRINT("error", ("ERROR: illegal pointer in decode tree"));
return OFFSET_TABLE_SIZE;
}
length2= find_longest_bitstream(next, end) + 1;
length=MY_MAX(length,length2);
}
return length;
} | O3 | c | find_longest_bitstream:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movswq (%rdi), %rax
testq %rax, %rax
js 0x8517c
leaq (%r14,%rax,2), %rdi
cmpq %rbx, %rdi
seta %cl
testw %ax, %ax
sete %al
orb %cl, %al
movl $0x200, %eax # imm = 0x200
jne 0x851bf
movq %rbx, %rsi
callq 0x8513a
movl %eax, %r15d
incl %r15d
jmp 0x85182
movl $0x1, %r15d
movswq 0x2(%r14), %rax
testq %rax, %rax
js 0x851bc
addq $0x2, %r14
leaq (%r14,%rax,2), %rdi
cmpq %rbx, %rdi
setbe %cl
testw %ax, %ax
setne %dl
movl $0x200, %eax # imm = 0x200
testb %cl, %dl
je 0x851bf
movq %rbx, %rsi
callq 0x8513a
incl %eax
cmpl %eax, %r15d
cmoval %r15d, %eax
jmp 0x851bf
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| find_longest_bitstream_0:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
movsx rax, word ptr [rdi]
test rax, rax
js short loc_8517C
lea rdi, [r14+rax*2]
cmp rdi, rbx
setnbe cl
test ax, ax
setz al
or al, cl
mov eax, 200h
jnz short loc_851BF
mov rsi, rbx
call find_longest_bitstream_0
mov r15d, eax
inc r15d
jmp short loc_85182
loc_8517C:
mov r15d, 1
loc_85182:
movsx rax, word ptr [r14+2]
test rax, rax
js short loc_851BC
add r14, 2
lea rdi, [r14+rax*2]
cmp rdi, rbx
setbe cl
test ax, ax
setnz dl
mov eax, 200h
test dl, cl
jz short loc_851BF
mov rsi, rbx
call find_longest_bitstream_0
inc eax
cmp r15d, eax
cmova eax, r15d
jmp short loc_851BF
loc_851BC:
mov eax, r15d
loc_851BF:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long find_longest_bitstream_0(__int16 *a1, unsigned long long a2)
{
long long v3; // rax
__int16 *v4; // rdi
bool v5; // zf
long long result; // rax
unsigned int v7; // r15d
long long v8; // rax
unsigned long long v9; // rdi
bool v10; // dl
v3 = *a1;
if ( v3 < 0 )
{
v7 = 1;
}
else
{
v4 = &a1[v3];
v5 = (unsigned long long)v4 <= a2 && (_WORD)v3 != 0;
result = 512LL;
if ( !v5 )
return result;
v7 = find_longest_bitstream_0(v4) + 1;
}
v8 = a1[1];
if ( v8 < 0 )
return v7;
v9 = (unsigned long long)&a1[v8 + 1];
v10 = (_WORD)v8 != 0;
result = 512LL;
if ( v9 <= a2 && v10 )
{
result = (unsigned int)find_longest_bitstream_0(v9) + 1;
if ( v7 > (unsigned int)result )
return v7;
}
return result;
}
| find_longest_bitstream:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
MOVSX RAX,word ptr [RDI]
TEST RAX,RAX
JS 0x0018517c
LEA RDI,[R14 + RAX*0x2]
CMP RDI,RBX
SETA CL
TEST AX,AX
SETZ AL
OR AL,CL
MOV EAX,0x200
JNZ 0x001851bf
MOV RSI,RBX
CALL 0x0018513a
MOV R15D,EAX
INC R15D
JMP 0x00185182
LAB_0018517c:
MOV R15D,0x1
LAB_00185182:
MOVSX RAX,word ptr [R14 + 0x2]
TEST RAX,RAX
JS 0x001851bc
ADD R14,0x2
LEA RDI,[R14 + RAX*0x2]
CMP RDI,RBX
SETBE CL
TEST AX,AX
SETNZ DL
MOV EAX,0x200
TEST DL,CL
JZ 0x001851bf
MOV RSI,RBX
CALL 0x0018513a
INC EAX
CMP R15D,EAX
CMOVA EAX,R15D
JMP 0x001851bf
LAB_001851bc:
MOV EAX,R15D
LAB_001851bf:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
uint find_longest_bitstream(short *param_1,short *param_2)
{
short sVar1;
int iVar2;
uint uVar3;
uint uVar4;
sVar1 = *param_1;
if ((long)sVar1 < 0) {
uVar4 = 1;
}
else {
if (sVar1 == 0 || param_2 < param_1 + sVar1) {
return 0x200;
}
iVar2 = find_longest_bitstream(param_1 + sVar1,param_2);
uVar4 = iVar2 + 1;
}
sVar1 = param_1[1];
uVar3 = uVar4;
if (-1 < (long)sVar1) {
uVar3 = 0x200;
if (sVar1 != 0 && param_1 + (long)sVar1 + 1 <= param_2) {
iVar2 = find_longest_bitstream(param_1 + (long)sVar1 + 1,param_2);
uVar3 = iVar2 + 1U;
if (iVar2 + 1U < uVar4) {
uVar3 = uVar4;
}
}
}
return uVar3;
}
| |
26,506 | mariadb_reconnect | eloqsql/libmariadb/libmariadb/mariadb_lib.c | my_bool STDCALL mariadb_reconnect(MYSQL *mysql)
{
MYSQL tmp_mysql;
struct my_hook_data hook_data;
struct mysql_async_context *ctxt= NULL;
LIST *li_stmt= mysql->stmts;
/* check if connection handler is active */
if (IS_CONNHDLR_ACTIVE(mysql))
{
if (mysql->extension->conn_hdlr->plugin && mysql->extension->conn_hdlr->plugin->reconnect)
return(mysql->extension->conn_hdlr->plugin->reconnect(mysql));
}
if (!mysql->options.reconnect ||
(mysql->server_status & SERVER_STATUS_IN_TRANS) || !mysql->host_info)
{
/* Allow reconnect next time */
mysql->server_status&= ~SERVER_STATUS_IN_TRANS;
my_set_error(mysql, CR_SERVER_GONE_ERROR, SQLSTATE_UNKNOWN, 0);
return(1);
}
mysql_init(&tmp_mysql);
tmp_mysql.free_me= 0;
tmp_mysql.options=mysql->options;
if (mysql->extension->conn_hdlr)
{
tmp_mysql.extension->conn_hdlr= mysql->extension->conn_hdlr;
mysql->extension->conn_hdlr= 0;
}
/* don't reread options from configuration files */
tmp_mysql.options.my_cnf_group= tmp_mysql.options.my_cnf_file= NULL;
if (IS_MYSQL_ASYNC_ACTIVE(mysql))
{
ctxt= mysql->options.extension->async_context;
hook_data.orig_mysql= mysql;
hook_data.new_mysql= &tmp_mysql;
hook_data.orig_pvio= mysql->net.pvio;
my_context_install_suspend_resume_hook(ctxt, my_suspend_hook, &hook_data);
}
if (!mysql_real_connect(&tmp_mysql,mysql->host,mysql->user,mysql->passwd,
mysql->db, mysql->port, mysql->unix_socket,
mysql->client_flag | CLIENT_REMEMBER_OPTIONS) ||
mysql_set_character_set(&tmp_mysql, mysql->charset->csname))
{
if (ctxt)
my_context_install_suspend_resume_hook(ctxt, NULL, NULL);
/* don't free options (CONC-118) */
memset(&tmp_mysql.options, 0, sizeof(struct st_mysql_options));
my_set_error(mysql, tmp_mysql.net.last_errno,
tmp_mysql.net.sqlstate,
tmp_mysql.net.last_error);
mysql_close(&tmp_mysql);
return(1);
}
for (;li_stmt;li_stmt= li_stmt->next)
{
MYSQL_STMT *stmt= (MYSQL_STMT *)li_stmt->data;
if (stmt->state != MYSQL_STMT_INITTED)
{
stmt->state= MYSQL_STMT_INITTED;
SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0);
}
}
tmp_mysql.free_me= mysql->free_me;
tmp_mysql.stmts= mysql->stmts;
mysql->stmts= NULL;
if (ctxt)
my_context_install_suspend_resume_hook(ctxt, NULL, NULL);
/* Don't free options, we moved them to tmp_mysql */
memset(&mysql->options, 0, sizeof(mysql->options));
mysql->free_me=0;
mysql_close(mysql);
*mysql=tmp_mysql;
mysql->net.pvio->mysql= mysql;
#ifdef HAVE_TLS
/* CONC-604: Set new connection handle */
if (mysql_get_ssl_cipher(mysql))
ma_pvio_tls_set_connection(mysql);
#endif
ma_net_clear(&mysql->net);
mysql->affected_rows= ~(unsigned long long) 0;
mysql->info= 0;
return(0);
} | O0 | c | mariadb_reconnect:
pushq %rbp
movq %rsp, %rbp
subq $0x560, %rsp # imm = 0x560
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x510(%rbp)
movq $0x0, -0x530(%rbp)
movq -0x510(%rbp), %rax
movq 0x4c8(%rax), %rax
movq %rax, -0x538(%rbp)
movq -0x510(%rbp), %rax
cmpq $0x0, 0x4f0(%rax)
je 0x1c454
movq -0x510(%rbp), %rax
movq 0x4f0(%rax), %rax
cmpq $0x0, (%rax)
je 0x1c454
movq -0x510(%rbp), %rax
movq 0x4f0(%rax), %rax
movq (%rax), %rax
cmpq $0x0, (%rax)
je 0x1c452
movq -0x510(%rbp), %rax
movq 0x4f0(%rax), %rax
movq (%rax), %rax
movq (%rax), %rax
cmpq $0x0, 0x78(%rax)
je 0x1c452
movq -0x510(%rbp), %rax
movq 0x4f0(%rax), %rax
movq (%rax), %rax
movq (%rax), %rax
movq 0x78(%rax), %rax
movq -0x510(%rbp), %rdi
callq *%rax
movb %al, -0x501(%rbp)
jmp 0x1c8fd
jmp 0x1c454
movq -0x510(%rbp), %rax
cmpb $0x0, 0x43b(%rax)
je 0x1c48a
movq -0x510(%rbp), %rax
movl 0x380(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x1c48a
movq -0x510(%rbp), %rax
cmpq $0x0, 0x2d8(%rax)
jne 0x1c4cd
movq -0x510(%rbp), %rax
movl 0x380(%rax), %ecx
andl $-0x2, %ecx
movl %ecx, 0x380(%rax)
movq -0x510(%rbp), %rdi
leaq 0x4ad92(%rip), %rax # 0x67240
movq (%rax), %rdx
movl $0x7d6, %esi # imm = 0x7D6
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0x1bae0
movb $0x1, -0x501(%rbp)
jmp 0x1c8fd
leaq -0x500(%rbp), %rdi
callq 0x20430
movb $0x0, -0x74(%rbp)
leaq -0x500(%rbp), %rdi
addq $0x390, %rdi # imm = 0x390
movq -0x510(%rbp), %rsi
addq $0x390, %rsi # imm = 0x390
movl $0xf8, %edx
callq 0x13360
movq -0x510(%rbp), %rax
movq 0x4f0(%rax), %rax
cmpq $0x0, (%rax)
je 0x1c544
movq -0x510(%rbp), %rax
movq 0x4f0(%rax), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x510(%rbp), %rax
movq 0x4f0(%rax), %rax
movq $0x0, (%rax)
movq $0x0, -0x120(%rbp)
movq $0x0, -0x118(%rbp)
movq -0x510(%rbp), %rax
cmpq $0x0, 0x480(%rax)
je 0x1c5ff
movq -0x510(%rbp), %rax
movq 0x480(%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0x1c5ff
movq -0x510(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movsbl 0x14(%rax), %eax
cmpl $0x0, %eax
je 0x1c5ff
movq -0x510(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x530(%rbp)
movq -0x510(%rbp), %rax
movq %rax, -0x528(%rbp)
leaq -0x500(%rbp), %rax
movq %rax, -0x520(%rbp)
movq -0x510(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x518(%rbp)
movq -0x530(%rbp), %rdi
leaq 0x6d8d(%rip), %rsi # 0x23380
leaq -0x528(%rbp), %rdx
callq 0x3d600
movq -0x510(%rbp), %rax
movq 0x2b0(%rax), %rsi
movq -0x510(%rbp), %rax
movq 0x2b8(%rax), %rdx
movq -0x510(%rbp), %rax
movq 0x2c0(%rax), %rcx
movq -0x510(%rbp), %rax
movq 0x2e8(%rax), %r8
movq -0x510(%rbp), %rax
movl 0x360(%rax), %r9d
movq -0x510(%rbp), %rax
movq 0x2c8(%rax), %r10
movq -0x510(%rbp), %rdi
movabsq $0x80000000, %rax # imm = 0x80000000
orq 0x368(%rdi), %rax
leaq -0x500(%rbp), %rdi
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x20900
cmpq $0x0, %rax
je 0x1c6a9
movq -0x510(%rbp), %rax
movq 0x2f0(%rax), %rax
movq 0x8(%rax), %rsi
leaq -0x500(%rbp), %rdi
callq 0x233e0
cmpl $0x0, %eax
je 0x1c728
cmpq $0x0, -0x530(%rbp)
je 0x1c6c6
movq -0x530(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0x3d600
leaq -0x500(%rbp), %rdi
addq $0x390, %rdi # imm = 0x390
xorl %esi, %esi
movl $0xf8, %edx
callq 0x13250
movq -0x510(%rbp), %rdi
movl -0x470(%rbp), %esi
leaq -0x500(%rbp), %rdx
addq $0x297, %rdx # imm = 0x297
leaq -0x500(%rbp), %rcx
addq $0x97, %rcx
movb $0x0, %al
callq 0x1bae0
leaq -0x500(%rbp), %rdi
callq 0x23500
movb $0x1, -0x501(%rbp)
jmp 0x1c8fd
jmp 0x1c72a
cmpq $0x0, -0x538(%rbp)
je 0x1c7f6
movq -0x538(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x540(%rbp)
movq -0x540(%rbp), %rax
cmpl $0x0, 0x50(%rax)
je 0x1c7dd
movq -0x540(%rbp), %rax
movl $0x0, 0x50(%rax)
movq -0x540(%rbp), %rax
movl $0x7dd, 0x108(%rax) # imm = 0x7DD
movq -0x540(%rbp), %rdi
addq $0x30d, %rdi # imm = 0x30D
leaq 0x4aab1(%rip), %rax # 0x67240
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13210
movq -0x540(%rbp), %rax
movb $0x0, 0x312(%rax)
movq -0x540(%rbp), %rdi
addq $0x10c, %rdi # imm = 0x10C
leaq 0x4aa91(%rip), %rax # 0x67250
movq 0x68(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13210
movq -0x540(%rbp), %rax
movb $0x0, 0x30b(%rax)
jmp 0x1c7dd
jmp 0x1c7df
movq -0x538(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x538(%rbp)
jmp 0x1c72a
movq -0x510(%rbp), %rax
movb 0x48c(%rax), %al
movb %al, -0x74(%rbp)
movq -0x510(%rbp), %rax
movq 0x4c8(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x510(%rbp), %rax
movq $0x0, 0x4c8(%rax)
cmpq $0x0, -0x530(%rbp)
je 0x1c847
movq -0x530(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0x3d600
movq -0x510(%rbp), %rdi
addq $0x390, %rdi # imm = 0x390
xorl %esi, %esi
movl $0xf8, %edx
callq 0x13250
movq -0x510(%rbp), %rax
movb $0x0, 0x48c(%rax)
movq -0x510(%rbp), %rdi
callq 0x23500
movq -0x510(%rbp), %rdi
leaq -0x500(%rbp), %rsi
movl $0x4f8, %edx # imm = 0x4F8
callq 0x13360
movq -0x510(%rbp), %rcx
movq -0x510(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x40(%rax)
movq -0x510(%rbp), %rdi
callq 0x20730
cmpq $0x0, %rax
je 0x1c8c6
movq -0x510(%rbp), %rdi
callq 0x2a350
movq -0x510(%rbp), %rdi
callq 0x4b5f0
movq -0x510(%rbp), %rax
movq $-0x1, 0x338(%rax)
movq -0x510(%rbp), %rax
movq $0x0, 0x2e0(%rax)
movb $0x0, -0x501(%rbp)
movb -0x501(%rbp), %al
movb %al, -0x541(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x1c92a
movb -0x541(%rbp), %al
addq $0x560, %rsp # imm = 0x560
popq %rbp
retq
callq 0x134b0
nop
| mariadb_reconnect:
push rbp
mov rbp, rsp
sub rsp, 560h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_510], rdi
mov [rbp+var_530], 0
mov rax, [rbp+var_510]
mov rax, [rax+4C8h]
mov [rbp+var_538], rax
mov rax, [rbp+var_510]
cmp qword ptr [rax+4F0h], 0
jz short loc_1C454
mov rax, [rbp+var_510]
mov rax, [rax+4F0h]
cmp qword ptr [rax], 0
jz short loc_1C454
mov rax, [rbp+var_510]
mov rax, [rax+4F0h]
mov rax, [rax]
cmp qword ptr [rax], 0
jz short loc_1C452
mov rax, [rbp+var_510]
mov rax, [rax+4F0h]
mov rax, [rax]
mov rax, [rax]
cmp qword ptr [rax+78h], 0
jz short loc_1C452
mov rax, [rbp+var_510]
mov rax, [rax+4F0h]
mov rax, [rax]
mov rax, [rax]
mov rax, [rax+78h]
mov rdi, [rbp+var_510]
call rax
mov [rbp+var_501], al
jmp loc_1C8FD
loc_1C452:
jmp short $+2
loc_1C454:
mov rax, [rbp+var_510]
cmp byte ptr [rax+43Bh], 0
jz short loc_1C48A
mov rax, [rbp+var_510]
mov eax, [rax+380h]
and eax, 1
cmp eax, 0
jnz short loc_1C48A
mov rax, [rbp+var_510]
cmp qword ptr [rax+2D8h], 0
jnz short loc_1C4CD
loc_1C48A:
mov rax, [rbp+var_510]
mov ecx, [rax+380h]
and ecx, 0FFFFFFFEh
mov [rax+380h], ecx
mov rdi, [rbp+var_510]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov esi, 7D6h
xor eax, eax
mov ecx, eax
mov al, 0
call my_set_error
mov [rbp+var_501], 1
jmp loc_1C8FD
loc_1C4CD:
lea rdi, [rbp+var_500]
call mysql_init
mov [rbp+var_74], 0
lea rdi, [rbp+var_500]
add rdi, 390h
mov rsi, [rbp+var_510]
add rsi, 390h
mov edx, 0F8h
call _memcpy
mov rax, [rbp+var_510]
mov rax, [rax+4F0h]
cmp qword ptr [rax], 0
jz short loc_1C544
mov rax, [rbp+var_510]
mov rax, [rax+4F0h]
mov rcx, [rax]
mov rax, [rbp+var_10]
mov [rax], rcx
mov rax, [rbp+var_510]
mov rax, [rax+4F0h]
mov qword ptr [rax], 0
loc_1C544:
mov [rbp+var_120], 0
mov [rbp+var_118], 0
mov rax, [rbp+var_510]
cmp qword ptr [rax+480h], 0
jz loc_1C5FF
mov rax, [rbp+var_510]
mov rax, [rax+480h]
cmp qword ptr [rax+28h], 0
jz short loc_1C5FF
mov rax, [rbp+var_510]
mov rax, [rax+480h]
mov rax, [rax+28h]
movsx eax, byte ptr [rax+14h]
cmp eax, 0
jz short loc_1C5FF
mov rax, [rbp+var_510]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_530], rax
mov rax, [rbp+var_510]
mov [rbp+var_528], rax
lea rax, [rbp+var_500]
mov [rbp+var_520], rax
mov rax, [rbp+var_510]
mov rax, [rax]
mov [rbp+var_518], rax
mov rdi, [rbp+var_530]
lea rsi, my_suspend_hook
lea rdx, [rbp+var_528]
call my_context_install_suspend_resume_hook
loc_1C5FF:
mov rax, [rbp+var_510]
mov rsi, [rax+2B0h]
mov rax, [rbp+var_510]
mov rdx, [rax+2B8h]
mov rax, [rbp+var_510]
mov rcx, [rax+2C0h]
mov rax, [rbp+var_510]
mov r8, [rax+2E8h]
mov rax, [rbp+var_510]
mov r9d, [rax+360h]
mov rax, [rbp+var_510]
mov r10, [rax+2C8h]
mov rdi, [rbp+var_510]
mov rax, 80000000h
or rax, [rdi+368h]
lea rdi, [rbp+var_500]
mov [rsp+560h+var_560], r10
mov [rsp+560h+var_558], rax
call mysql_real_connect
cmp rax, 0
jz short loc_1C6A9
mov rax, [rbp+var_510]
mov rax, [rax+2F0h]
mov rsi, [rax+8]
lea rdi, [rbp+var_500]
call mysql_set_character_set
cmp eax, 0
jz short loc_1C728
loc_1C6A9:
cmp [rbp+var_530], 0
jz short loc_1C6C6
mov rdi, [rbp+var_530]
xor eax, eax
mov edx, eax
mov rsi, rdx
call my_context_install_suspend_resume_hook
loc_1C6C6:
lea rdi, [rbp+var_500]
add rdi, 390h
xor esi, esi
mov edx, 0F8h
call _memset
mov rdi, [rbp+var_510]
mov esi, [rbp+var_470]
lea rdx, [rbp+var_500]
add rdx, 297h
lea rcx, [rbp+var_500]
add rcx, 97h
mov al, 0
call my_set_error
lea rdi, [rbp+var_500]
call mysql_close
mov [rbp+var_501], 1
jmp loc_1C8FD
loc_1C728:
jmp short $+2
loc_1C72A:
cmp [rbp+var_538], 0
jz loc_1C7F6
mov rax, [rbp+var_538]
mov rax, [rax+10h]
mov [rbp+var_540], rax
mov rax, [rbp+var_540]
cmp dword ptr [rax+50h], 0
jz loc_1C7DD
mov rax, [rbp+var_540]
mov dword ptr [rax+50h], 0
mov rax, [rbp+var_540]
mov dword ptr [rax+108h], 7DDh
mov rdi, [rbp+var_540]
add rdi, 30Dh
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_540]
mov byte ptr [rax+312h], 0
mov rdi, [rbp+var_540]
add rdi, 10Ch
lea rax, client_errors
mov rsi, [rax+68h]
mov edx, 200h
call _strncpy
mov rax, [rbp+var_540]
mov byte ptr [rax+30Bh], 0
jmp short $+2
loc_1C7DD:
jmp short $+2
loc_1C7DF:
mov rax, [rbp+var_538]
mov rax, [rax+8]
mov [rbp+var_538], rax
jmp loc_1C72A
loc_1C7F6:
mov rax, [rbp+var_510]
mov al, [rax+48Ch]
mov [rbp+var_74], al
mov rax, [rbp+var_510]
mov rax, [rax+4C8h]
mov [rbp+var_38], rax
mov rax, [rbp+var_510]
mov qword ptr [rax+4C8h], 0
cmp [rbp+var_530], 0
jz short loc_1C847
mov rdi, [rbp+var_530]
xor eax, eax
mov edx, eax
mov rsi, rdx
call my_context_install_suspend_resume_hook
loc_1C847:
mov rdi, [rbp+var_510]
add rdi, 390h
xor esi, esi
mov edx, 0F8h
call _memset
mov rax, [rbp+var_510]
mov byte ptr [rax+48Ch], 0
mov rdi, [rbp+var_510]
call mysql_close
mov rdi, [rbp+var_510]
lea rsi, [rbp+var_500]
mov edx, 4F8h
call _memcpy
mov rcx, [rbp+var_510]
mov rax, [rbp+var_510]
mov rax, [rax]
mov [rax+40h], rcx
mov rdi, [rbp+var_510]
call mysql_get_ssl_cipher
cmp rax, 0
jz short loc_1C8C6
mov rdi, [rbp+var_510]
call ma_pvio_tls_set_connection
loc_1C8C6:
mov rdi, [rbp+var_510]
call ma_net_clear
mov rax, [rbp+var_510]
mov qword ptr [rax+338h], 0FFFFFFFFFFFFFFFFh
mov rax, [rbp+var_510]
mov qword ptr [rax+2E0h], 0
mov [rbp+var_501], 0
loc_1C8FD:
mov al, [rbp+var_501]
mov [rbp+var_541], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_1C92A
mov al, [rbp+var_541]
add rsp, 560h
pop rbp
retn
loc_1C92A:
call ___stack_chk_fail
| char mariadb_reconnect(long long a1)
{
long long v2; // [rsp+20h] [rbp-540h]
long long v3; // [rsp+28h] [rbp-538h]
long long v4; // [rsp+30h] [rbp-530h]
_QWORD v5[3]; // [rsp+38h] [rbp-528h] BYREF
long long v6; // [rsp+50h] [rbp-510h]
_BYTE v8[144]; // [rsp+60h] [rbp-500h] BYREF
unsigned int v9; // [rsp+F0h] [rbp-470h]
char v10; // [rsp+F7h] [rbp-469h] BYREF
char v11; // [rsp+2F7h] [rbp-269h] BYREF
_QWORD v12[31]; // [rsp+3F0h] [rbp-170h] BYREF
char v13; // [rsp+4ECh] [rbp-74h]
long long v14; // [rsp+528h] [rbp-38h]
_QWORD *v15; // [rsp+550h] [rbp-10h]
unsigned long long v16; // [rsp+558h] [rbp-8h]
v16 = __readfsqword(0x28u);
v6 = a1;
v4 = 0LL;
v3 = *(_QWORD *)(a1 + 1224);
if ( *(_QWORD *)(a1 + 1264)
&& **(_QWORD **)(v6 + 1264)
&& ***(_QWORD ***)(v6 + 1264)
&& *(_QWORD *)(***(_QWORD ***)(v6 + 1264) + 120LL) )
{
return (*(long long ( **)(long long))(***(_QWORD ***)(v6 + 1264) + 120LL))(v6);
}
if ( *(_BYTE *)(v6 + 1083) && (*(_DWORD *)(v6 + 896) & 1) == 0 && *(_QWORD *)(v6 + 728) )
{
mysql_init(v8);
v13 = 0;
memcpy(v12, v6 + 912, sizeof(v12));
if ( **(_QWORD **)(v6 + 1264) )
{
*v15 = **(_QWORD **)(v6 + 1264);
**(_QWORD **)(v6 + 1264) = 0LL;
}
v12[10] = 0LL;
v12[11] = 0LL;
if ( *(_QWORD *)(v6 + 1152)
&& *(_QWORD *)(*(_QWORD *)(v6 + 1152) + 40LL)
&& *(_BYTE *)(*(_QWORD *)(*(_QWORD *)(v6 + 1152) + 40LL) + 20LL) )
{
v4 = *(_QWORD *)(*(_QWORD *)(v6 + 1152) + 40LL);
v5[0] = v6;
v5[1] = v8;
v5[2] = *(_QWORD *)v6;
my_context_install_suspend_resume_hook(v4, my_suspend_hook, v5);
}
if ( mysql_real_connect(
(unsigned int)v8,
*(_QWORD *)(v6 + 688),
*(_QWORD *)(v6 + 696),
*(_QWORD *)(v6 + 704),
*(_QWORD *)(v6 + 744),
*(_DWORD *)(v6 + 864),
*(_QWORD *)(v6 + 712),
*(_QWORD *)(v6 + 872) | 0x80000000LL)
&& !(unsigned int)mysql_set_character_set(v8, *(_QWORD *)(*(_QWORD *)(v6 + 752) + 8LL)) )
{
while ( v3 )
{
v2 = *(_QWORD *)(v3 + 16);
if ( *(_DWORD *)(v2 + 80) )
{
*(_DWORD *)(v2 + 80) = 0;
*(_DWORD *)(v2 + 264) = 2013;
strncpy(v2 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(v2 + 786) = 0;
strncpy(v2 + 268, client_errors[13], 512LL);
*(_BYTE *)(v2 + 779) = 0;
}
v3 = *(_QWORD *)(v3 + 8);
}
v13 = *(_BYTE *)(v6 + 1164);
v14 = *(_QWORD *)(v6 + 1224);
*(_QWORD *)(v6 + 1224) = 0LL;
if ( v4 )
my_context_install_suspend_resume_hook(v4, 0LL, 0LL);
memset(v6 + 912, 0LL, 248LL);
*(_BYTE *)(v6 + 1164) = 0;
mysql_close(v6);
memcpy(v6, v8, 1272LL);
*(_QWORD *)(*(_QWORD *)v6 + 64LL) = v6;
if ( mysql_get_ssl_cipher(v6) )
ma_pvio_tls_set_connection(v6);
ma_net_clear(v6);
*(_QWORD *)(v6 + 824) = -1LL;
*(_QWORD *)(v6 + 736) = 0LL;
return 0;
}
else
{
if ( v4 )
my_context_install_suspend_resume_hook(v4, 0LL, 0LL);
memset(v12, 0LL, sizeof(v12));
my_set_error(v6, v9, (long long)&v11, (long long)&v10);
mysql_close(v8);
return 1;
}
}
else
{
*(_DWORD *)(v6 + 896) &= ~1u;
my_set_error(v6, 0x7D6u, (long long)SQLSTATE_UNKNOWN, 0LL);
return 1;
}
}
| mariadb_reconnect:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x560
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x510],RDI
MOV qword ptr [RBP + -0x530],0x0
MOV RAX,qword ptr [RBP + -0x510]
MOV RAX,qword ptr [RAX + 0x4c8]
MOV qword ptr [RBP + -0x538],RAX
MOV RAX,qword ptr [RBP + -0x510]
CMP qword ptr [RAX + 0x4f0],0x0
JZ 0x0011c454
MOV RAX,qword ptr [RBP + -0x510]
MOV RAX,qword ptr [RAX + 0x4f0]
CMP qword ptr [RAX],0x0
JZ 0x0011c454
MOV RAX,qword ptr [RBP + -0x510]
MOV RAX,qword ptr [RAX + 0x4f0]
MOV RAX,qword ptr [RAX]
CMP qword ptr [RAX],0x0
JZ 0x0011c452
MOV RAX,qword ptr [RBP + -0x510]
MOV RAX,qword ptr [RAX + 0x4f0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX]
CMP qword ptr [RAX + 0x78],0x0
JZ 0x0011c452
MOV RAX,qword ptr [RBP + -0x510]
MOV RAX,qword ptr [RAX + 0x4f0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x78]
MOV RDI,qword ptr [RBP + -0x510]
CALL RAX
MOV byte ptr [RBP + -0x501],AL
JMP 0x0011c8fd
LAB_0011c452:
JMP 0x0011c454
LAB_0011c454:
MOV RAX,qword ptr [RBP + -0x510]
CMP byte ptr [RAX + 0x43b],0x0
JZ 0x0011c48a
MOV RAX,qword ptr [RBP + -0x510]
MOV EAX,dword ptr [RAX + 0x380]
AND EAX,0x1
CMP EAX,0x0
JNZ 0x0011c48a
MOV RAX,qword ptr [RBP + -0x510]
CMP qword ptr [RAX + 0x2d8],0x0
JNZ 0x0011c4cd
LAB_0011c48a:
MOV RAX,qword ptr [RBP + -0x510]
MOV ECX,dword ptr [RAX + 0x380]
AND ECX,0xfffffffe
MOV dword ptr [RAX + 0x380],ECX
MOV RDI,qword ptr [RBP + -0x510]
LEA RAX,[0x167240]
MOV RDX,qword ptr [RAX]
MOV ESI,0x7d6
XOR EAX,EAX
MOV ECX,EAX
MOV AL,0x0
CALL 0x0011bae0
MOV byte ptr [RBP + -0x501],0x1
JMP 0x0011c8fd
LAB_0011c4cd:
LEA RDI,[RBP + -0x500]
CALL 0x00120430
MOV byte ptr [RBP + -0x74],0x0
LEA RDI,[RBP + -0x500]
ADD RDI,0x390
MOV RSI,qword ptr [RBP + -0x510]
ADD RSI,0x390
MOV EDX,0xf8
CALL 0x00113360
MOV RAX,qword ptr [RBP + -0x510]
MOV RAX,qword ptr [RAX + 0x4f0]
CMP qword ptr [RAX],0x0
JZ 0x0011c544
MOV RAX,qword ptr [RBP + -0x510]
MOV RAX,qword ptr [RAX + 0x4f0]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x510]
MOV RAX,qword ptr [RAX + 0x4f0]
MOV qword ptr [RAX],0x0
LAB_0011c544:
MOV qword ptr [RBP + -0x120],0x0
MOV qword ptr [RBP + -0x118],0x0
MOV RAX,qword ptr [RBP + -0x510]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x0011c5ff
MOV RAX,qword ptr [RBP + -0x510]
MOV RAX,qword ptr [RAX + 0x480]
CMP qword ptr [RAX + 0x28],0x0
JZ 0x0011c5ff
MOV RAX,qword ptr [RBP + -0x510]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOVSX EAX,byte ptr [RAX + 0x14]
CMP EAX,0x0
JZ 0x0011c5ff
MOV RAX,qword ptr [RBP + -0x510]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x530],RAX
MOV RAX,qword ptr [RBP + -0x510]
MOV qword ptr [RBP + -0x528],RAX
LEA RAX,[RBP + -0x500]
MOV qword ptr [RBP + -0x520],RAX
MOV RAX,qword ptr [RBP + -0x510]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x518],RAX
MOV RDI,qword ptr [RBP + -0x530]
LEA RSI,[0x123380]
LEA RDX,[RBP + -0x528]
CALL 0x0013d600
LAB_0011c5ff:
MOV RAX,qword ptr [RBP + -0x510]
MOV RSI,qword ptr [RAX + 0x2b0]
MOV RAX,qword ptr [RBP + -0x510]
MOV RDX,qword ptr [RAX + 0x2b8]
MOV RAX,qword ptr [RBP + -0x510]
MOV RCX,qword ptr [RAX + 0x2c0]
MOV RAX,qword ptr [RBP + -0x510]
MOV R8,qword ptr [RAX + 0x2e8]
MOV RAX,qword ptr [RBP + -0x510]
MOV R9D,dword ptr [RAX + 0x360]
MOV RAX,qword ptr [RBP + -0x510]
MOV R10,qword ptr [RAX + 0x2c8]
MOV RDI,qword ptr [RBP + -0x510]
MOV RAX,0x80000000
OR RAX,qword ptr [RDI + 0x368]
LEA RDI,[RBP + -0x500]
MOV qword ptr [RSP],R10
MOV qword ptr [RSP + 0x8],RAX
CALL 0x00120900
CMP RAX,0x0
JZ 0x0011c6a9
MOV RAX,qword ptr [RBP + -0x510]
MOV RAX,qword ptr [RAX + 0x2f0]
MOV RSI,qword ptr [RAX + 0x8]
LEA RDI,[RBP + -0x500]
CALL 0x001233e0
CMP EAX,0x0
JZ 0x0011c728
LAB_0011c6a9:
CMP qword ptr [RBP + -0x530],0x0
JZ 0x0011c6c6
MOV RDI,qword ptr [RBP + -0x530]
XOR EAX,EAX
MOV EDX,EAX
MOV RSI,RDX
CALL 0x0013d600
LAB_0011c6c6:
LEA RDI,[RBP + -0x500]
ADD RDI,0x390
XOR ESI,ESI
MOV EDX,0xf8
CALL 0x00113250
MOV RDI,qword ptr [RBP + -0x510]
MOV ESI,dword ptr [RBP + -0x470]
LEA RDX,[RBP + -0x500]
ADD RDX,0x297
LEA RCX,[RBP + -0x500]
ADD RCX,0x97
MOV AL,0x0
CALL 0x0011bae0
LEA RDI,[RBP + -0x500]
CALL 0x00123500
MOV byte ptr [RBP + -0x501],0x1
JMP 0x0011c8fd
LAB_0011c728:
JMP 0x0011c72a
LAB_0011c72a:
CMP qword ptr [RBP + -0x538],0x0
JZ 0x0011c7f6
MOV RAX,qword ptr [RBP + -0x538]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x540],RAX
MOV RAX,qword ptr [RBP + -0x540]
CMP dword ptr [RAX + 0x50],0x0
JZ 0x0011c7dd
MOV RAX,qword ptr [RBP + -0x540]
MOV dword ptr [RAX + 0x50],0x0
MOV RAX,qword ptr [RBP + -0x540]
MOV dword ptr [RAX + 0x108],0x7dd
MOV RDI,qword ptr [RBP + -0x540]
ADD RDI,0x30d
LEA RAX,[0x167240]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x540]
MOV byte ptr [RAX + 0x312],0x0
MOV RDI,qword ptr [RBP + -0x540]
ADD RDI,0x10c
LEA RAX,[0x167250]
MOV RSI,qword ptr [RAX + 0x68]
MOV EDX,0x200
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x540]
MOV byte ptr [RAX + 0x30b],0x0
JMP 0x0011c7dd
LAB_0011c7dd:
JMP 0x0011c7df
LAB_0011c7df:
MOV RAX,qword ptr [RBP + -0x538]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x538],RAX
JMP 0x0011c72a
LAB_0011c7f6:
MOV RAX,qword ptr [RBP + -0x510]
MOV AL,byte ptr [RAX + 0x48c]
MOV byte ptr [RBP + -0x74],AL
MOV RAX,qword ptr [RBP + -0x510]
MOV RAX,qword ptr [RAX + 0x4c8]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x510]
MOV qword ptr [RAX + 0x4c8],0x0
CMP qword ptr [RBP + -0x530],0x0
JZ 0x0011c847
MOV RDI,qword ptr [RBP + -0x530]
XOR EAX,EAX
MOV EDX,EAX
MOV RSI,RDX
CALL 0x0013d600
LAB_0011c847:
MOV RDI,qword ptr [RBP + -0x510]
ADD RDI,0x390
XOR ESI,ESI
MOV EDX,0xf8
CALL 0x00113250
MOV RAX,qword ptr [RBP + -0x510]
MOV byte ptr [RAX + 0x48c],0x0
MOV RDI,qword ptr [RBP + -0x510]
CALL 0x00123500
MOV RDI,qword ptr [RBP + -0x510]
LEA RSI,[RBP + -0x500]
MOV EDX,0x4f8
CALL 0x00113360
MOV RCX,qword ptr [RBP + -0x510]
MOV RAX,qword ptr [RBP + -0x510]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX + 0x40],RCX
MOV RDI,qword ptr [RBP + -0x510]
CALL 0x00120730
CMP RAX,0x0
JZ 0x0011c8c6
MOV RDI,qword ptr [RBP + -0x510]
CALL 0x0012a350
LAB_0011c8c6:
MOV RDI,qword ptr [RBP + -0x510]
CALL 0x0014b5f0
MOV RAX,qword ptr [RBP + -0x510]
MOV qword ptr [RAX + 0x338],-0x1
MOV RAX,qword ptr [RBP + -0x510]
MOV qword ptr [RAX + 0x2e0],0x0
MOV byte ptr [RBP + -0x501],0x0
LAB_0011c8fd:
MOV AL,byte ptr [RBP + -0x501]
MOV byte ptr [RBP + -0x541],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0011c92a
MOV AL,byte ptr [RBP + -0x541]
ADD RSP,0x560
POP RBP
RET
LAB_0011c92a:
CALL 0x001134b0
|
int8 mariadb_reconnect(long *param_1)
{
int iVar1;
long lVar2;
long in_FS_OFFSET;
long local_540;
long local_538;
long *local_530;
int1 *local_528;
long local_520;
long *local_518;
int1 local_509;
int1 local_508 [144];
int4 local_478;
int1 auStack_471 [512];
int1 auStack_271 [249];
int1 auStack_178 [80];
int8 local_128;
int8 local_120;
int1 local_7c;
long local_40;
int8 *local_18;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_538 = 0;
local_540 = param_1[0x99];
local_518 = param_1;
if ((((param_1[0x9e] == 0) || (*(long *)param_1[0x9e] == 0)) || (**(long **)param_1[0x9e] == 0))
|| (*(long *)(**(long **)param_1[0x9e] + 0x78) == 0)) {
if (((*(char *)((long)param_1 + 0x43b) == '\0') || ((*(uint *)(param_1 + 0x70) & 1) != 0)) ||
(param_1[0x5b] == 0)) {
*(uint *)(param_1 + 0x70) = *(uint *)(param_1 + 0x70) & 0xfffffffe;
my_set_error(param_1,0x7d6,SQLSTATE_UNKNOWN,0);
local_509 = 1;
}
else {
mysql_init(local_508);
local_7c = 0;
memcpy(auStack_178,local_518 + 0x72,0xf8);
if (*(long *)local_518[0x9e] != 0) {
*local_18 = *(int8 *)local_518[0x9e];
*(int8 *)local_518[0x9e] = 0;
}
local_128 = 0;
local_120 = 0;
if (((local_518[0x90] != 0) && (*(long *)(local_518[0x90] + 0x28) != 0)) &&
(*(char *)(*(long *)(local_518[0x90] + 0x28) + 0x14) != '\0')) {
local_538 = *(long *)(local_518[0x90] + 0x28);
local_530 = local_518;
local_528 = local_508;
local_520 = *local_518;
my_context_install_suspend_resume_hook(local_538,my_suspend_hook,&local_530);
}
lVar2 = mysql_real_connect(local_508,local_518[0x56],local_518[0x57],local_518[0x58],
local_518[0x5d],(int)local_518[0x6c],local_518[0x59],
local_518[0x6d] | 0x80000000);
if ((lVar2 == 0) || (iVar1 = mysql_set_character_set(local_508), iVar1 != 0)) {
if (local_538 != 0) {
my_context_install_suspend_resume_hook(local_538);
}
memset(auStack_178,0,0xf8);
my_set_error(local_518,local_478,auStack_271,auStack_471);
mysql_close(local_508);
local_509 = 1;
}
else {
for (; local_540 != 0; local_540 = *(long *)(local_540 + 8)) {
lVar2 = *(long *)(local_540 + 0x10);
if (*(int *)(lVar2 + 0x50) != 0) {
*(int4 *)(lVar2 + 0x50) = 0;
*(int4 *)(lVar2 + 0x108) = 0x7dd;
strncpy((char *)(lVar2 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(lVar2 + 0x312) = 0;
strncpy((char *)(lVar2 + 0x10c),PTR_s_Lost_connection_to_server_during_001672b8,0x200);
*(int1 *)(lVar2 + 0x30b) = 0;
}
}
local_7c = *(int1 *)((long)local_518 + 0x48c);
local_40 = local_518[0x99];
local_518[0x99] = 0;
if (local_538 != 0) {
my_context_install_suspend_resume_hook(local_538);
}
memset(local_518 + 0x72,0,0xf8);
*(int1 *)((long)local_518 + 0x48c) = 0;
mysql_close(local_518);
memcpy(local_518,local_508,0x4f8);
*(long **)(*local_518 + 0x40) = local_518;
lVar2 = mysql_get_ssl_cipher(local_518);
if (lVar2 != 0) {
ma_pvio_tls_set_connection(local_518);
}
ma_net_clear(local_518);
local_518[0x67] = -1;
local_518[0x5c] = 0;
local_509 = 0;
}
}
}
else {
local_509 = (**(code **)(**(long **)param_1[0x9e] + 0x78))(param_1);
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_509);
}
| |
26,507 | diag | eloqsql/unittest/mytap/tap.c | void
diag(char const *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
fprintf(tapout, "# ");
vfprintf(tapout, fmt, ap);
emit_endl();
va_end(ap);
} | O0 | c | diag:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
testb %al, %al
je 0xd9985
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
movq %r9, -0xa8(%rbp)
movq %r8, -0xb0(%rbp)
movq %rcx, -0xb8(%rbp)
movq %rdx, -0xc0(%rbp)
movq %rsi, -0xc8(%rbp)
movq %rdi, -0x8(%rbp)
leaq -0xd0(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x30, -0x1c(%rbp)
movl $0x8, -0x20(%rbp)
movq 0x1e35fc(%rip), %rax # 0x2bcfd0
movq %rax, -0xd8(%rbp)
movq (%rax), %rdi
leaq 0x7a1c0(%rip), %rsi # 0x153ba5
xorl %eax, %eax
callq 0x2a160
movq -0xd8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x2a7c0
callq 0xda240
addq $0xe0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| diag:
push rbp
mov rbp, rsp
sub rsp, 0E0h
test al, al
jz short loc_D9985
movaps [rbp+var_A0], xmm0
movaps [rbp+var_90], xmm1
movaps [rbp+var_80], xmm2
movaps [rbp+var_70], xmm3
movaps [rbp+var_60], xmm4
movaps [rbp+var_50], xmm5
movaps [rbp+var_40], xmm6
movaps [rbp+var_30], xmm7
loc_D9985:
mov [rbp+var_A8], r9
mov [rbp+var_B0], r8
mov [rbp+var_B8], rcx
mov [rbp+var_C0], rdx
mov [rbp+var_C8], rsi
mov [rbp+var_8], rdi
lea rax, [rbp+var_D0]
mov [rbp+var_10], rax
lea rax, [rbp+arg_0]
mov [rbp+var_18], rax
mov [rbp+var_1C], 30h ; '0'
mov [rbp+var_20], 8
mov rax, cs:stdout_ptr
mov [rbp+var_D8], rax
mov rdi, [rax]
lea rsi, asc_153BA5; "# "
xor eax, eax
call _fprintf
mov rax, [rbp+var_D8]
mov rdi, [rax]
mov rsi, [rbp+var_8]
lea rdx, [rbp+var_20]
call _vfprintf
call emit_endl
add rsp, 0E0h
pop rbp
retn
| long long diag(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
char v16; // [rsp+10h] [rbp-D0h] BYREF
long long v17; // [rsp+18h] [rbp-C8h]
long long v18; // [rsp+20h] [rbp-C0h]
long long v19; // [rsp+28h] [rbp-B8h]
long long v20; // [rsp+30h] [rbp-B0h]
long long v21; // [rsp+38h] [rbp-A8h]
__m128 v22; // [rsp+40h] [rbp-A0h]
__m128 v23; // [rsp+50h] [rbp-90h]
__m128 v24; // [rsp+60h] [rbp-80h]
__m128 v25; // [rsp+70h] [rbp-70h]
__m128 v26; // [rsp+80h] [rbp-60h]
__m128 v27; // [rsp+90h] [rbp-50h]
__m128 v28; // [rsp+A0h] [rbp-40h]
__m128 v29; // [rsp+B0h] [rbp-30h]
_DWORD v30[2]; // [rsp+C0h] [rbp-20h] BYREF
char *v31; // [rsp+C8h] [rbp-18h]
char *v32; // [rsp+D0h] [rbp-10h]
long long v33; // [rsp+D8h] [rbp-8h]
v22 = a7;
v23 = a8;
v24 = a9;
v25 = a10;
v26 = a11;
v27 = a12;
v28 = a13;
v29 = a14;
v21 = a6;
v20 = a5;
v19 = a4;
v18 = a3;
v17 = a2;
v33 = a1;
v32 = &v16;
v31 = &a15;
v30[1] = 48;
v30[0] = 8;
fprintf(stdout, "# ");
vfprintf(stdout, v33, v30);
return emit_endl();
}
| diag:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xe0
TEST AL,AL
JZ 0x001d9985
MOVAPS xmmword ptr [RBP + -0xa0],XMM0
MOVAPS xmmword ptr [RBP + -0x90],XMM1
MOVAPS xmmword ptr [RBP + -0x80],XMM2
MOVAPS xmmword ptr [RBP + -0x70],XMM3
MOVAPS xmmword ptr [RBP + -0x60],XMM4
MOVAPS xmmword ptr [RBP + -0x50],XMM5
MOVAPS xmmword ptr [RBP + -0x40],XMM6
MOVAPS xmmword ptr [RBP + -0x30],XMM7
LAB_001d9985:
MOV qword ptr [RBP + -0xa8],R9
MOV qword ptr [RBP + -0xb0],R8
MOV qword ptr [RBP + -0xb8],RCX
MOV qword ptr [RBP + -0xc0],RDX
MOV qword ptr [RBP + -0xc8],RSI
MOV qword ptr [RBP + -0x8],RDI
LEA RAX,[RBP + -0xd0]
MOV qword ptr [RBP + -0x10],RAX
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x18],RAX
MOV dword ptr [RBP + -0x1c],0x30
MOV dword ptr [RBP + -0x20],0x8
MOV RAX,qword ptr [0x003bcfd0]
MOV qword ptr [RBP + -0xd8],RAX
MOV RDI,qword ptr [RAX]
LEA RSI,[0x253ba5]
XOR EAX,EAX
CALL 0x0012a160
MOV RAX,qword ptr [RBP + -0xd8]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x8]
LEA RDX,[RBP + -0x20]
CALL 0x0012a7c0
CALL 0x001da240
ADD RSP,0xe0
POP RBP
RET
|
void diag(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,char *param_9,
int8 param_10,int8 param_11,int8 param_12,int8 param_13,
int8 param_14)
{
int *puVar1;
char in_AL;
int1 local_d8 [8];
int8 local_d0;
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;
int4 local_28;
int4 local_24;
int1 *local_20;
int1 *local_18;
char *local_10;
puVar1 = PTR_stdout_003bcfd0;
if (in_AL != '\0') {
local_a8 = param_1;
local_98 = param_2;
local_88 = param_3;
local_78 = param_4;
local_68 = param_5;
local_58 = param_6;
local_48 = param_7;
local_38 = param_8;
}
local_18 = local_d8;
local_20 = &stack0x00000008;
local_24 = 0x30;
local_28 = 8;
local_d0 = param_10;
local_c8 = param_11;
local_c0 = param_12;
local_b8 = param_13;
local_b0 = param_14;
local_10 = param_9;
fprintf(*(FILE **)PTR_stdout_003bcfd0,"# ");
vfprintf(*(FILE **)puVar1,local_10,&local_28);
emit_endl();
return;
}
| |
26,508 | print_tz_as_sql(char const*, st_time_zone_info const*) | eloqsql/sql/tztime.cc | void
print_tz_as_sql(const char* tz_name, const TIME_ZONE_INFO *sp)
{
uint i;
/* Here we assume that all time zones have same leap correction tables */
printf("INSERT INTO time_zone (Use_leap_seconds) VALUES ('%s');\n",
sp->leapcnt ? "Y" : "N");
printf("SET @time_zone_id= LAST_INSERT_ID();\n");
printf("INSERT INTO time_zone_name (Name, Time_zone_id) VALUES \
('%s', @time_zone_id);\n", tz_name);
if (sp->timecnt)
{
printf("INSERT INTO time_zone_transition \
(Time_zone_id, Transition_time, Transition_type_id) VALUES\n");
for (i= 0; i < sp->timecnt; i++)
printf("%s(@time_zone_id, %ld, %u)\n", (i == 0 ? " " : ","), sp->ats[i],
(uint)sp->types[i]);
printf(";\n");
}
printf("INSERT INTO time_zone_transition_type \
(Time_zone_id, Transition_type_id, `Offset`, Is_DST, Abbreviation) VALUES\n");
for (i= 0; i < sp->typecnt; i++)
printf("%s(@time_zone_id, %u, %ld, %d, '%s')\n", (i == 0 ? " " : ","), i,
sp->ttis[i].tt_gmtoff, sp->ttis[i].tt_isdst,
sp->chars + sp->ttis[i].tt_abbrind);
printf(";\n");
} | O3 | cpp | print_tz_as_sql(char const*, st_time_zone_info const*):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0x0, (%rsi)
leaq 0x3cbf6(%rip), %rax # 0x62930
leaq 0x3a2fc(%rip), %rsi # 0x6003d
cmoveq %rax, %rsi
leaq 0x3a2b8(%rip), %rdi # 0x60004
xorl %eax, %eax
callq 0x24060
leaq 0x3b234(%rip), %rdi # 0x60f8e
callq 0x24550
leaq 0x3a2d9(%rip), %rdi # 0x6003f
movq %r14, %rsi
xorl %eax, %eax
callq 0x24060
cmpl $0x0, 0x4(%rbx)
je 0x25ddc
leaq 0x3b236(%rip), %rdi # 0x60fb3
callq 0x24550
cmpl $0x0, 0x4(%rbx)
je 0x25dd0
leaq 0x3c1ee(%rip), %r15 # 0x61f7d
leaq 0x3c358(%rip), %r12 # 0x620ee
leaq 0x3a2f1(%rip), %r14 # 0x6008e
xorl %r13d, %r13d
testq %r13, %r13
movq %r12, %rsi
cmoveq %r15, %rsi
movq 0x18(%rbx), %rax
movq 0x20(%rbx), %rcx
movq (%rax,%r13,8), %rdx
movzbl (%rcx,%r13), %ecx
movq %r14, %rdi
xorl %eax, %eax
callq 0x24060
incq %r13
movl 0x4(%rbx), %eax
cmpq %rax, %r13
jb 0x25da0
leaq 0x3b3e5(%rip), %rdi # 0x611bc
callq 0x24550
leaq 0x3b22c(%rip), %rdi # 0x6100f
callq 0x24550
cmpl $0x0, 0x8(%rbx)
je 0x25e48
movl $0xc, %r12d
leaq 0x3c2f3(%rip), %r13 # 0x620ee
leaq 0x3a2a8(%rip), %r14 # 0x600aa
xorl %r15d, %r15d
testq %r15, %r15
movq %r13, %rsi
leaq 0x3c16b(%rip), %rax # 0x61f7d
cmoveq %rax, %rsi
movq 0x28(%rbx), %rax
movq -0xc(%rax,%r12), %rcx
movl -0x4(%rax,%r12), %r8d
movl (%rax,%r12), %r9d
addq 0x30(%rbx), %r9
movq %r14, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0x24060
incq %r15
movl 0x8(%rbx), %eax
addq $0x10, %r12
cmpq %rax, %r15
jb 0x25e05
leaq 0x3b36d(%rip), %rdi # 0x611bc
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x24550
| _Z15print_tz_as_sqlPKcPK17st_time_zone_info:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
mov r14, rdi
cmp dword ptr [rsi], 0
lea rax, aEucCn+5; "N"
lea rsi, aY; "Y"
cmovz rsi, rax
lea rdi, aInsertIntoTime; "INSERT INTO time_zone (Use_leap_seconds"...
xor eax, eax
call _printf
lea rdi, aSetTimeZoneIdL; "SET @time_zone_id= LAST_INSERT_ID();"
call _puts
lea rdi, aInsertIntoTime_0; "INSERT INTO time_zone_name (Name, Time_"...
mov rsi, r14
xor eax, eax
call _printf
cmp dword ptr [rbx+4], 0
jz short loc_25DDC
lea rdi, aInsertIntoTime_1; "INSERT INTO time_zone_transition (Time_"...
call _puts
cmp dword ptr [rbx+4], 0
jz short loc_25DD0
lea r15, asc_61F7C+1; " "
lea r12, aS+2; ","
lea r14, aSTimeZoneIdLdU; "%s(@time_zone_id, %ld, %u)\n"
xor r13d, r13d
loc_25DA0:
test r13, r13
mov rsi, r12
cmovz rsi, r15
mov rax, [rbx+18h]
mov rcx, [rbx+20h]
mov rdx, [rax+r13*8]
movzx ecx, byte ptr [rcx+r13]
mov rdi, r14
xor eax, eax
call _printf
inc r13
mov eax, [rbx+4]
cmp r13, rax
jb short loc_25DA0
loc_25DD0:
lea rdi, aExecuteImmedia+13Dh; ";"
call _puts
loc_25DDC:
lea rdi, aInsertIntoTime_2; "INSERT INTO time_zone_transition_type ("...
call _puts
cmp dword ptr [rbx+8], 0
jz short loc_25E48
mov r12d, 0Ch
lea r13, aS+2; ","
lea r14, aSTimeZoneIdULd; "%s(@time_zone_id, %u, %ld, %d, '%s')\n"
xor r15d, r15d
loc_25E05:
test r15, r15
mov rsi, r13
lea rax, asc_61F7C+1; " "
cmovz rsi, rax
mov rax, [rbx+28h]
mov rcx, [rax+r12-0Ch]
mov r8d, [rax+r12-4]
mov r9d, [rax+r12]
add r9, [rbx+30h]
mov rdi, r14
mov edx, r15d
xor eax, eax
call _printf
inc r15
mov eax, [rbx+8]
add r12, 10h
cmp r15, rax
jb short loc_25E05
loc_25E48:
lea rdi, aExecuteImmedia+13Dh; ";"
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _puts
| long long print_tz_as_sql(const char *a1, long long a2)
{
bool v3; // zf
const char *v4; // rsi
unsigned long long v5; // r13
const char *v6; // rsi
long long v7; // r12
unsigned long long v8; // r15
const char *v9; // rsi
v3 = *(_DWORD *)a2 == 0;
v4 = "Y";
if ( v3 )
v4 = "N";
printf("INSERT INTO time_zone (Use_leap_seconds) VALUES ('%s');\n", v4);
puts("SET @time_zone_id= LAST_INSERT_ID();");
printf("INSERT INTO time_zone_name (Name, Time_zone_id) VALUES ('%s', @time_zone_id);\n", a1);
if ( *(_DWORD *)(a2 + 4) )
{
puts("INSERT INTO time_zone_transition (Time_zone_id, Transition_time, Transition_type_id) VALUES");
if ( *(_DWORD *)(a2 + 4) )
{
v5 = 0LL;
do
{
v6 = ",";
if ( !v5 )
v6 = " ";
printf(
"%s(@time_zone_id, %ld, %u)\n",
v6,
*(_QWORD *)(*(_QWORD *)(a2 + 24) + 8 * v5),
*(unsigned __int8 *)(*(_QWORD *)(a2 + 32) + v5));
++v5;
}
while ( v5 < *(unsigned int *)(a2 + 4) );
}
puts(";");
}
puts("INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, `Offset`, Is_DST, Abbreviation) VALUES");
if ( *(_DWORD *)(a2 + 8) )
{
v7 = 12LL;
v8 = 0LL;
do
{
v9 = ",";
if ( !v8 )
v9 = " ";
printf(
"%s(@time_zone_id, %u, %ld, %d, '%s')\n",
v9,
v8++,
*(_QWORD *)(*(_QWORD *)(a2 + 40) + v7 - 12),
*(_DWORD *)(*(_QWORD *)(a2 + 40) + v7 - 4),
(const char *)(*(_QWORD *)(a2 + 48) + *(unsigned int *)(*(_QWORD *)(a2 + 40) + v7)));
v7 += 16LL;
}
while ( v8 < *(unsigned int *)(a2 + 8) );
}
return puts(";");
}
| print_tz_as_sql:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
CMP dword ptr [RSI],0x0
LEA RAX,[0x162930]
LEA RSI,[0x16003d]
CMOVZ RSI,RAX
LEA RDI,[0x160004]
XOR EAX,EAX
CALL 0x00124060
LEA RDI,[0x160f8e]
CALL 0x00124550
LEA RDI,[0x16003f]
MOV RSI,R14
XOR EAX,EAX
CALL 0x00124060
CMP dword ptr [RBX + 0x4],0x0
JZ 0x00125ddc
LEA RDI,[0x160fb3]
CALL 0x00124550
CMP dword ptr [RBX + 0x4],0x0
JZ 0x00125dd0
LEA R15,[0x161f7d]
LEA R12,[0x1620ee]
LEA R14,[0x16008e]
XOR R13D,R13D
LAB_00125da0:
TEST R13,R13
MOV RSI,R12
CMOVZ RSI,R15
MOV RAX,qword ptr [RBX + 0x18]
MOV RCX,qword ptr [RBX + 0x20]
MOV RDX,qword ptr [RAX + R13*0x8]
MOVZX ECX,byte ptr [RCX + R13*0x1]
MOV RDI,R14
XOR EAX,EAX
CALL 0x00124060
INC R13
MOV EAX,dword ptr [RBX + 0x4]
CMP R13,RAX
JC 0x00125da0
LAB_00125dd0:
LEA RDI,[0x1611bc]
CALL 0x00124550
LAB_00125ddc:
LEA RDI,[0x16100f]
CALL 0x00124550
CMP dword ptr [RBX + 0x8],0x0
JZ 0x00125e48
MOV R12D,0xc
LEA R13,[0x1620ee]
LEA R14,[0x1600aa]
XOR R15D,R15D
LAB_00125e05:
TEST R15,R15
MOV RSI,R13
LEA RAX,[0x161f7d]
CMOVZ RSI,RAX
MOV RAX,qword ptr [RBX + 0x28]
MOV RCX,qword ptr [RAX + R12*0x1 + -0xc]
MOV R8D,dword ptr [RAX + R12*0x1 + -0x4]
MOV R9D,dword ptr [RAX + R12*0x1]
ADD R9,qword ptr [RBX + 0x30]
MOV RDI,R14
MOV EDX,R15D
XOR EAX,EAX
CALL 0x00124060
INC R15
MOV EAX,dword ptr [RBX + 0x8]
ADD R12,0x10
CMP R15,RAX
JC 0x00125e05
LAB_00125e48:
LEA RDI,[0x1611bc]
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00124550
|
/* print_tz_as_sql(char const*, st_time_zone_info const*) */
void print_tz_as_sql(char *param_1,st_time_zone_info *param_2)
{
long lVar1;
int *puVar2;
long lVar3;
ulong uVar4;
puVar2 = &DAT_0016003d;
if (*(int *)param_2 == 0) {
puVar2 = &DAT_00162930;
}
printf("INSERT INTO time_zone (Use_leap_seconds) VALUES (\'%s\');\n",puVar2);
puts("SET @time_zone_id= LAST_INSERT_ID();");
printf("INSERT INTO time_zone_name (Name, Time_zone_id) VALUES (\'%s\', @time_zone_id);\n",param_1
);
if (*(int *)(param_2 + 4) != 0) {
puts(
"INSERT INTO time_zone_transition (Time_zone_id, Transition_time, Transition_type_id) VALUES"
);
if (*(int *)(param_2 + 4) != 0) {
uVar4 = 0;
do {
puVar2 = &DAT_001620ee;
if (uVar4 == 0) {
puVar2 = &DAT_00161f7d;
}
printf("%s(@time_zone_id, %ld, %u)\n",puVar2,
*(int8 *)(*(long *)(param_2 + 0x18) + uVar4 * 8),
(ulong)*(byte *)(*(long *)(param_2 + 0x20) + uVar4));
uVar4 = uVar4 + 1;
} while (uVar4 < *(uint *)(param_2 + 4));
}
puts(";");
}
puts(
"INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, `Offset`, Is_DST, Abbreviation) VALUES"
);
if (*(int *)(param_2 + 8) != 0) {
lVar3 = 0xc;
uVar4 = 0;
do {
puVar2 = &DAT_001620ee;
if (uVar4 == 0) {
puVar2 = &DAT_00161f7d;
}
lVar1 = *(long *)(param_2 + 0x28);
printf("%s(@time_zone_id, %u, %ld, %d, \'%s\')\n",puVar2,uVar4 & 0xffffffff,
*(int8 *)(lVar1 + -0xc + lVar3),(ulong)*(uint *)(lVar1 + -4 + lVar3),
(ulong)*(uint *)(lVar1 + lVar3) + *(long *)(param_2 + 0x30));
uVar4 = uVar4 + 1;
lVar3 = lVar3 + 0x10;
} while (uVar4 < *(uint *)(param_2 + 8));
}
puts(";");
return;
}
| |
26,509 | js_std_file_close | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_std_file_close(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSRuntime *rt = JS_GetRuntime(ctx);
JSThreadState *ts = js_get_thread_state(rt);
JSSTDFile *s = JS_GetOpaque2(ctx, this_val, ts->std_file_class_id);
int err;
if (!s)
return JS_EXCEPTION;
if (!s->f)
return JS_ThrowTypeError(ctx, "invalid file handle");
if (is_stdio(s->f))
return JS_ThrowTypeError(ctx, "cannot close stdio");
#if !defined(__wasi__)
if (s->is_popen)
err = js_get_errno(pclose(s->f));
else
#endif
err = js_get_errno(fclose(s->f));
s->f = NULL;
return JS_NewInt32(ctx, err);
} | O0 | c | js_std_file_close:
subq $0x78, %rsp
movq %rsi, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movq %rdi, 0x30(%rsp)
movl %ecx, 0x2c(%rsp)
movq %r8, 0x20(%rsp)
movq 0x30(%rsp), %rdi
callq 0x26c40
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0x10310
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rdi
movq 0x10(%rsp), %rax
movl 0x78(%rax), %ecx
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
callq 0x370f0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x11699
movl $0x0, 0x48(%rsp)
movq $0x6, 0x50(%rsp)
jmp 0x1177c
movq 0x8(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x116c6
movq 0x30(%rsp), %rdi
leaq 0xf6de8(%rip), %rsi # 0x108498
movb $0x0, %al
callq 0x2c040
movq %rax, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
jmp 0x1177c
movq 0x8(%rsp), %rax
movq (%rax), %rdi
callq 0x115c0
cmpl $0x0, %eax
je 0x116fa
movq 0x30(%rsp), %rdi
leaq 0xf6dc8(%rip), %rsi # 0x1084ac
movb $0x0, %al
callq 0x2c040
movq %rax, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
jmp 0x1177c
movq 0x8(%rsp), %rax
cmpl $0x0, 0x8(%rax)
je 0x11720
movq 0x8(%rsp), %rax
movq (%rax), %rdi
callq 0xe2c0
movslq %eax, %rdi
callq 0x12790
movl %eax, 0x4(%rsp)
jmp 0x11739
movq 0x8(%rsp), %rax
movq (%rax), %rdi
callq 0xe220
movslq %eax, %rdi
callq 0x12790
movl %eax, 0x4(%rsp)
movq 0x8(%rsp), %rax
movq $0x0, (%rax)
movq 0x30(%rsp), %rcx
movl 0x4(%rsp), %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
movl 0x5c(%rsp), %eax
movl %eax, 0x68(%rsp)
movq $0x0, 0x70(%rsp)
movq 0x68(%rsp), %rcx
movq 0x70(%rsp), %rax
movq %rcx, 0x48(%rsp)
movq %rax, 0x50(%rsp)
movq 0x48(%rsp), %rax
movq 0x50(%rsp), %rdx
addq $0x78, %rsp
retq
nopl (%rax,%rax)
| js_std_file_close:
sub rsp, 78h
mov [rsp+78h+var_40], rsi
mov [rsp+78h+var_38], rdx
mov [rsp+78h+var_48], rdi
mov [rsp+78h+var_4C], ecx
mov [rsp+78h+var_58], r8
mov rdi, [rsp+78h+var_48]
call JS_GetRuntime
mov [rsp+78h+var_60], rax
mov rdi, [rsp+78h+var_60]
call js_get_thread_state
mov [rsp+78h+var_68], rax
mov rdi, [rsp+78h+var_48]
mov rax, [rsp+78h+var_68]
mov ecx, [rax+78h]
mov rsi, [rsp+78h+var_40]
mov rdx, [rsp+78h+var_38]
call JS_GetOpaque2
mov [rsp+78h+var_70], rax
cmp [rsp+78h+var_70], 0
jnz short loc_11699
mov dword ptr [rsp+78h+var_30], 0
mov [rsp+78h+var_28], 6
jmp loc_1177C
loc_11699:
mov rax, [rsp+78h+var_70]
cmp qword ptr [rax], 0
jnz short loc_116C6
mov rdi, [rsp+78h+var_48]
lea rsi, aInvalidFileHan; "invalid file handle"
mov al, 0
call JS_ThrowTypeError
mov [rsp+78h+var_30], rax
mov [rsp+78h+var_28], rdx
jmp loc_1177C
loc_116C6:
mov rax, [rsp+78h+var_70]
mov rdi, [rax]
call is_stdio
cmp eax, 0
jz short loc_116FA
mov rdi, [rsp+78h+var_48]
lea rsi, aCannotCloseStd; "cannot close stdio"
mov al, 0
call JS_ThrowTypeError
mov [rsp+78h+var_30], rax
mov [rsp+78h+var_28], rdx
jmp loc_1177C
loc_116FA:
mov rax, [rsp+78h+var_70]
cmp dword ptr [rax+8], 0
jz short loc_11720
mov rax, [rsp+78h+var_70]
mov rdi, [rax]
call _pclose
movsxd rdi, eax
call js_get_errno
mov [rsp+78h+var_74], eax
jmp short loc_11739
loc_11720:
mov rax, [rsp+78h+var_70]
mov rdi, [rax]
call _fclose
movsxd rdi, eax
call js_get_errno
mov [rsp+78h+var_74], eax
loc_11739:
mov rax, [rsp+78h+var_70]
mov qword ptr [rax], 0
mov rcx, [rsp+78h+var_48]
mov eax, [rsp+78h+var_74]
mov [rsp+78h+var_18], rcx
mov [rsp+78h+var_1C], eax
mov eax, [rsp+78h+var_1C]
mov dword ptr [rsp+78h+var_10], eax
mov [rsp+78h+var_8], 0
mov rcx, [rsp+78h+var_10]
mov rax, [rsp+78h+var_8]
mov [rsp+78h+var_30], rcx
mov [rsp+78h+var_28], rax
loc_1177C:
mov rax, [rsp+78h+var_30]
mov rdx, [rsp+78h+var_28]
add rsp, 78h
retn
| long long js_std_file_close(long long a1, long long a2, long long a3)
{
int v3; // edx
int v4; // ecx
int v5; // r8d
int v6; // r9d
int v7; // edx
int v8; // ecx
int v9; // r8d
int v10; // r9d
int v11; // edx
int v12; // ecx
int v13; // r8d
int v14; // r9d
int v15; // eax
int errno; // [rsp+4h] [rbp-74h]
long long *Opaque2; // [rsp+8h] [rbp-70h]
long long thread_state; // [rsp+10h] [rbp-68h]
int Runtime; // [rsp+18h] [rbp-60h]
long long v22; // [rsp+48h] [rbp-30h]
long long v23; // [rsp+68h] [rbp-10h]
Runtime = JS_GetRuntime(a1);
thread_state = js_get_thread_state(Runtime, a2, v3, v4, v5, v6);
Opaque2 = (long long *)JS_GetOpaque2(a1, a2, a3, *(unsigned int *)(thread_state + 120));
if ( Opaque2 )
{
if ( *Opaque2 )
{
if ( is_stdio(*Opaque2) )
{
return JS_ThrowTypeError(a1, (unsigned int)"cannot close stdio", v11, v12, v13, v14);
}
else
{
if ( *((_DWORD *)Opaque2 + 2) )
v15 = pclose(*Opaque2);
else
v15 = fclose(*Opaque2);
errno = js_get_errno(v15);
*Opaque2 = 0LL;
LODWORD(v23) = errno;
return v23;
}
}
else
{
return JS_ThrowTypeError(a1, (unsigned int)"invalid file handle", v7, v8, v9, v10);
}
}
else
{
LODWORD(v22) = 0;
}
return v22;
}
| js_std_file_close:
SUB RSP,0x78
MOV qword ptr [RSP + 0x38],RSI
MOV qword ptr [RSP + 0x40],RDX
MOV qword ptr [RSP + 0x30],RDI
MOV dword ptr [RSP + 0x2c],ECX
MOV qword ptr [RSP + 0x20],R8
MOV RDI,qword ptr [RSP + 0x30]
CALL 0x00126c40
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00110310
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RSP + 0x10]
MOV ECX,dword ptr [RAX + 0x78]
MOV RSI,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
CALL 0x001370f0
MOV qword ptr [RSP + 0x8],RAX
CMP qword ptr [RSP + 0x8],0x0
JNZ 0x00111699
MOV dword ptr [RSP + 0x48],0x0
MOV qword ptr [RSP + 0x50],0x6
JMP 0x0011177c
LAB_00111699:
MOV RAX,qword ptr [RSP + 0x8]
CMP qword ptr [RAX],0x0
JNZ 0x001116c6
MOV RDI,qword ptr [RSP + 0x30]
LEA RSI,[0x208498]
MOV AL,0x0
CALL 0x0012c040
MOV qword ptr [RSP + 0x48],RAX
MOV qword ptr [RSP + 0x50],RDX
JMP 0x0011177c
LAB_001116c6:
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX]
CALL 0x001115c0
CMP EAX,0x0
JZ 0x001116fa
MOV RDI,qword ptr [RSP + 0x30]
LEA RSI,[0x2084ac]
MOV AL,0x0
CALL 0x0012c040
MOV qword ptr [RSP + 0x48],RAX
MOV qword ptr [RSP + 0x50],RDX
JMP 0x0011177c
LAB_001116fa:
MOV RAX,qword ptr [RSP + 0x8]
CMP dword ptr [RAX + 0x8],0x0
JZ 0x00111720
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX]
CALL 0x0010e2c0
MOVSXD RDI,EAX
CALL 0x00112790
MOV dword ptr [RSP + 0x4],EAX
JMP 0x00111739
LAB_00111720:
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX]
CALL 0x0010e220
MOVSXD RDI,EAX
CALL 0x00112790
MOV dword ptr [RSP + 0x4],EAX
LAB_00111739:
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX],0x0
MOV RCX,qword ptr [RSP + 0x30]
MOV EAX,dword ptr [RSP + 0x4]
MOV qword ptr [RSP + 0x60],RCX
MOV dword ptr [RSP + 0x5c],EAX
MOV EAX,dword ptr [RSP + 0x5c]
MOV dword ptr [RSP + 0x68],EAX
MOV qword ptr [RSP + 0x70],0x0
MOV RCX,qword ptr [RSP + 0x68]
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x48],RCX
MOV qword ptr [RSP + 0x50],RAX
LAB_0011177c:
MOV RAX,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
ADD RSP,0x78
RET
|
int1 [16] js_std_file_close(int8 param_1,int8 param_2,int8 param_3)
{
int iVar1;
int8 uVar2;
long lVar3;
long *plVar4;
int1 auVar5 [16];
int4 local_74;
int4 local_30;
int4 uStack_2c;
int8 local_28;
int4 uStack_c;
uVar2 = JS_GetRuntime(param_1);
lVar3 = js_get_thread_state(uVar2);
plVar4 = (long *)JS_GetOpaque2(param_1,param_2,param_3,*(int4 *)(lVar3 + 0x78));
if (plVar4 == (long *)0x0) {
local_30 = 0;
local_28 = 6;
}
else if (*plVar4 == 0) {
auVar5 = JS_ThrowTypeError(param_1,"invalid file handle");
local_28 = auVar5._8_8_;
local_30 = auVar5._0_4_;
uStack_2c = auVar5._4_4_;
}
else {
iVar1 = is_stdio(*plVar4);
if (iVar1 == 0) {
if ((int)plVar4[1] == 0) {
iVar1 = fclose((FILE *)*plVar4);
local_74 = js_get_errno((long)iVar1);
}
else {
iVar1 = pclose((FILE *)*plVar4);
local_74 = js_get_errno((long)iVar1);
}
*plVar4 = 0;
local_30 = local_74;
uStack_2c = uStack_c;
local_28 = 0;
}
else {
auVar5 = JS_ThrowTypeError(param_1,"cannot close stdio");
local_28 = auVar5._8_8_;
local_30 = auVar5._0_4_;
uStack_2c = auVar5._4_4_;
}
}
auVar5._4_4_ = uStack_2c;
auVar5._0_4_ = local_30;
auVar5._8_8_ = local_28;
return auVar5;
}
| |
26,510 | js_std_file_close | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_std_file_close(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSRuntime *rt = JS_GetRuntime(ctx);
JSThreadState *ts = js_get_thread_state(rt);
JSSTDFile *s = JS_GetOpaque2(ctx, this_val, ts->std_file_class_id);
int err;
if (!s)
return JS_EXCEPTION;
if (!s->f)
return JS_ThrowTypeError(ctx, "invalid file handle");
if (is_stdio(s->f))
return JS_ThrowTypeError(ctx, "cannot close stdio");
#if !defined(__wasi__)
if (s->is_popen)
err = js_get_errno(pclose(s->f));
else
#endif
err = js_get_errno(fclose(s->f));
s->f = NULL;
return JS_NewInt32(ctx, err);
} | O3 | c | js_std_file_close:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r15
callq 0x1f8ad
xorl %r14d, %r14d
xorl %edi, %edi
movq %rax, %rsi
xorl %eax, %eax
callq 0x3af34
movl 0x78(%rax), %ecx
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x27095
testq %rax, %rax
je 0x15cda
movq %rax, %rbx
movq (%rax), %rdi
testq %rdi, %rdi
je 0x15ce3
movq 0xb8318(%rip), %rax # 0xcdfc8
cmpq %rdi, (%rax)
je 0x15cec
movq 0xb8304(%rip), %rax # 0xcdfc0
cmpq %rdi, (%rax)
je 0x15cec
movq 0xb8328(%rip), %rax # 0xcdff0
cmpq %rdi, (%rax)
je 0x15cec
cmpl $0x0, 0x8(%rbx)
je 0x15d0f
callq 0xe2c0
jmp 0x15d14
movl $0x6, %edx
xorl %ecx, %ecx
jmp 0x15d33
leaq 0x876c2(%rip), %rsi # 0x9d3ac
jmp 0x15cf3
leaq 0x876cd(%rip), %rsi # 0x9d3c0
movq %r15, %rdi
xorl %eax, %eax
callq 0x2214f
movq %rax, %r14
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
jmp 0x15d33
callq 0xe220
cmpl $-0x1, %eax
jne 0x15d25
callq 0xe0b0
movq %rax, %rcx
xorl %eax, %eax
subl (%rcx), %eax
movq $0x0, (%rbx)
movl %eax, %r14d
xorl %ecx, %ecx
xorl %edx, %edx
movl %r14d, %eax
orq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| js_std_file_close:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdx
mov r12, rsi
mov r15, rdi
call JS_GetRuntime
xor r14d, r14d
xor edi, edi
mov rsi, rax
xor eax, eax
call js_std_cmd
mov ecx, [rax+78h]
mov rdi, r15
mov rsi, r12
mov rdx, rbx
call JS_GetOpaque2
test rax, rax
jz short loc_15CDA
mov rbx, rax
mov rdi, [rax]
test rdi, rdi
jz short loc_15CE3
mov rax, cs:stdin_ptr
cmp [rax], rdi
jz short loc_15CEC
mov rax, cs:stdout_ptr
cmp [rax], rdi
jz short loc_15CEC
mov rax, cs:stderr_ptr
cmp [rax], rdi
jz short loc_15CEC
cmp dword ptr [rbx+8], 0
jz short loc_15D0F
call _pclose
jmp short loc_15D14
loc_15CDA:
mov edx, 6
xor ecx, ecx
jmp short loc_15D33
loc_15CE3:
lea rsi, aInvalidFileHan; "invalid file handle"
jmp short loc_15CF3
loc_15CEC:
lea rsi, aCannotCloseStd; "cannot close stdio"
loc_15CF3:
mov rdi, r15
xor eax, eax
call JS_ThrowTypeError
mov r14, rax
mov rcx, 0FFFFFFFF00000000h
and rcx, rax
jmp short loc_15D33
loc_15D0F:
call _fclose
loc_15D14:
cmp eax, 0FFFFFFFFh
jnz short loc_15D25
call ___errno_location
mov rcx, rax
xor eax, eax
sub eax, [rcx]
loc_15D25:
mov qword ptr [rbx], 0
mov r14d, eax
xor ecx, ecx
xor edx, edx
loc_15D33:
mov eax, r14d
or rax, rcx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| unsigned long long js_std_file_close(long long a1, long long a2, long long a3)
{
int v4; // r15d
int Runtime; // eax
unsigned int v6; // r14d
int v7; // edx
int v8; // ecx
int v9; // r8d
int v10; // r9d
long long v11; // rax
long long Opaque2; // rax
int v13; // edx
int v14; // ecx
int v15; // r8d
int v16; // r9d
_QWORD *v17; // rbx
long long v18; // rdi
int v19; // eax
unsigned long long v20; // rcx
const char *v21; // rsi
long long v22; // rax
v4 = a1;
Runtime = JS_GetRuntime(a1);
v6 = 0;
v11 = js_std_cmd(0, Runtime, v7, v8, v9, v10);
Opaque2 = JS_GetOpaque2(a1, a2, a3, *(unsigned int *)(v11 + 120));
if ( !Opaque2 )
{
v20 = 0LL;
return v20 | v6;
}
v17 = (_QWORD *)Opaque2;
v18 = *(_QWORD *)Opaque2;
if ( !*(_QWORD *)Opaque2 )
{
v21 = "invalid file handle";
LABEL_11:
v22 = JS_ThrowTypeError(v4, (_DWORD)v21, v13, v14, v15, v16);
v6 = v22;
v20 = v22 & 0xFFFFFFFF00000000LL;
return v20 | v6;
}
if ( stdin == v18 || stdout == v18 || stderr == v18 )
{
v21 = "cannot close stdio";
goto LABEL_11;
}
if ( *(_DWORD *)(Opaque2 + 8) )
v19 = pclose(v18);
else
v19 = fclose(v18);
if ( v19 == -1 )
v19 = -*(_DWORD *)__errno_location(v18);
*v17 = 0LL;
v6 = v19;
v20 = 0LL;
return v20 | v6;
}
| js_std_file_close:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R12,RSI
MOV R15,RDI
CALL 0x0011f8ad
XOR R14D,R14D
XOR EDI,EDI
MOV RSI,RAX
XOR EAX,EAX
CALL 0x0013af34
MOV ECX,dword ptr [RAX + 0x78]
MOV RDI,R15
MOV RSI,R12
MOV RDX,RBX
CALL 0x00127095
TEST RAX,RAX
JZ 0x00115cda
MOV RBX,RAX
MOV RDI,qword ptr [RAX]
TEST RDI,RDI
JZ 0x00115ce3
MOV RAX,qword ptr [0x001cdfc8]
CMP qword ptr [RAX],RDI
JZ 0x00115cec
MOV RAX,qword ptr [0x001cdfc0]
CMP qword ptr [RAX],RDI
JZ 0x00115cec
MOV RAX,qword ptr [0x001cdff0]
CMP qword ptr [RAX],RDI
JZ 0x00115cec
CMP dword ptr [RBX + 0x8],0x0
JZ 0x00115d0f
CALL 0x0010e2c0
JMP 0x00115d14
LAB_00115cda:
MOV EDX,0x6
XOR ECX,ECX
JMP 0x00115d33
LAB_00115ce3:
LEA RSI,[0x19d3ac]
JMP 0x00115cf3
LAB_00115cec:
LEA RSI,[0x19d3c0]
LAB_00115cf3:
MOV RDI,R15
XOR EAX,EAX
CALL 0x0012214f
MOV R14,RAX
MOV RCX,-0x100000000
AND RCX,RAX
JMP 0x00115d33
LAB_00115d0f:
CALL 0x0010e220
LAB_00115d14:
CMP EAX,-0x1
JNZ 0x00115d25
CALL 0x0010e0b0
MOV RCX,RAX
XOR EAX,EAX
SUB EAX,dword ptr [RCX]
LAB_00115d25:
MOV qword ptr [RBX],0x0
MOV R14D,EAX
XOR ECX,ECX
XOR EDX,EDX
LAB_00115d33:
MOV EAX,R14D
OR RAX,RCX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
ulong js_std_file_close(int8 param_1,int8 param_2,int8 param_3)
{
FILE *__stream;
uint uVar1;
int8 uVar2;
long lVar3;
int8 *puVar4;
ulong uVar5;
int *piVar6;
ulong uVar7;
char *pcVar8;
uVar2 = JS_GetRuntime();
uVar5 = 0;
lVar3 = js_std_cmd(0,uVar2);
puVar4 = (int8 *)JS_GetOpaque2(param_1,param_2,param_3,*(int4 *)(lVar3 + 0x78));
if (puVar4 == (int8 *)0x0) {
uVar7 = 0;
}
else {
__stream = (FILE *)*puVar4;
if (__stream == (FILE *)0x0) {
pcVar8 = "invalid file handle";
}
else {
if (((*(FILE **)PTR_stdin_001cdfc8 != __stream) && (*(FILE **)PTR_stdout_001cdfc0 != __stream)
) && (*(FILE **)PTR_stderr_001cdff0 != __stream)) {
if (*(int *)(puVar4 + 1) == 0) {
uVar1 = fclose(__stream);
}
else {
uVar1 = pclose(__stream);
}
if (uVar1 == 0xffffffff) {
piVar6 = __errno_location();
uVar1 = -*piVar6;
}
*puVar4 = 0;
uVar5 = (ulong)uVar1;
uVar7 = 0;
goto LAB_00115d33;
}
pcVar8 = "cannot close stdio";
}
uVar5 = JS_ThrowTypeError(param_1,pcVar8);
uVar7 = uVar5 & 0xffffffff00000000;
}
LAB_00115d33:
return uVar5 & 0xffffffff | uVar7;
}
| |
26,511 | testing::internal::XmlUnitTestResultPrinter::RemoveInvalidXmlCharacters(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest.cc | std::string XmlUnitTestResultPrinter::RemoveInvalidXmlCharacters(
const std::string& str) {
std::string output;
output.reserve(str.size());
for (std::string::const_iterator it = str.begin(); it != str.end(); ++it)
if (IsValidXmlCharacter(static_cast<unsigned char>(*it)))
output.push_back(*it);
return output;
} | O3 | cpp | testing::internal::XmlUnitTestResultPrinter::RemoveInvalidXmlCharacters(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq 0x8(%rsi), %rsi
callq 0x88b0
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x24e48
movq (%r14), %rcx
movl $0x2600, %ebp # imm = 0x2600
movq %rcx, %r12
movb (%r12), %dl
cmpb $0x1f, %dl
ja 0x24e2a
cmpb $0xd, %dl
ja 0x24e3c
movzbl %dl, %esi
btl %esi, %ebp
jae 0x24e3c
movsbl %dl, %esi
movq %rbx, %rdi
callq 0x8410
movq (%r14), %rcx
movq 0x8(%r14), %rax
incq %r12
leaq (%rcx,%rax), %rdx
cmpq %rdx, %r12
jne 0x24e14
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x24e56
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x24e6c
movq (%r15), %rsi
incq %rsi
callq 0x84e0
movq %r14, %rdi
callq 0x8990
| _ZN7testing8internal24XmlUnitTestResultPrinter26RemoveInvalidXmlCharactersERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r12
push rbx
mov r14, rsi
mov rbx, rdi
lea r15, [rdi+10h]
mov [rdi], r15
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rsi, [rsi+8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
mov rax, [r14+8]
test rax, rax
jz short loc_24E48
mov rcx, [r14]
mov ebp, 2600h
mov r12, rcx
loc_24E14:
mov dl, [r12]
cmp dl, 1Fh
ja short loc_24E2A
cmp dl, 0Dh
ja short loc_24E3C
movzx esi, dl
bt ebp, esi
jnb short loc_24E3C
loc_24E2A:
movsx esi, dl
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rcx, [r14]
mov rax, [r14+8]
loc_24E3C:
inc r12
lea rdx, [rcx+rax]
cmp r12, rdx
jnz short loc_24E14
loc_24E48:
mov rax, rbx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_24E56:
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, r15
jz short loc_24E6C
mov rsi, [r15]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_24E6C:
mov rdi, r14
call __Unwind_Resume
| long long testing::internal::XmlUnitTestResultPrinter::RemoveInvalidXmlCharacters(
long long a1,
unsigned __int8 **a2)
{
unsigned __int8 *v2; // rax
unsigned __int8 *v3; // rcx
int v4; // ebp
unsigned __int8 *v5; // r12
unsigned __int8 v6; // dl
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
std::string::reserve(a1, a2[1]);
v2 = a2[1];
if ( v2 )
{
v3 = *a2;
v4 = 9728;
v5 = *a2;
do
{
v6 = *v5;
if ( *v5 > 0x1Fu || v6 <= 0xDu && _bittest(&v4, v6) )
{
std::string::push_back(a1, (unsigned int)(char)v6);
v3 = *a2;
v2 = a2[1];
}
++v5;
}
while ( v5 != &v2[(_QWORD)v3] );
}
return a1;
}
| RemoveInvalidXmlCharacters:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R14,RSI
MOV RBX,RDI
LEA R15,[RDI + 0x10]
MOV qword ptr [RDI],R15
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
MOV RSI,qword ptr [RSI + 0x8]
LAB_00124dfb:
CALL 0x001088b0
MOV RAX,qword ptr [R14 + 0x8]
TEST RAX,RAX
JZ 0x00124e48
MOV RCX,qword ptr [R14]
MOV EBP,0x2600
MOV R12,RCX
LAB_00124e14:
MOV DL,byte ptr [R12]
CMP DL,0x1f
JA 0x00124e2a
CMP DL,0xd
JA 0x00124e3c
MOVZX ESI,DL
BT EBP,ESI
JNC 0x00124e3c
LAB_00124e2a:
MOVSX ESI,DL
MOV RDI,RBX
CALL 0x00108410
LAB_00124e35:
MOV RCX,qword ptr [R14]
MOV RAX,qword ptr [R14 + 0x8]
LAB_00124e3c:
INC R12
LEA RDX,[RCX + RAX*0x1]
CMP R12,RDX
JNZ 0x00124e14
LAB_00124e48:
MOV RAX,RBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* testing::internal::XmlUnitTestResultPrinter::RemoveInvalidXmlCharacters(std::__cxx11::string
const&) */
XmlUnitTestResultPrinter * __thiscall
testing::internal::XmlUnitTestResultPrinter::RemoveInvalidXmlCharacters
(XmlUnitTestResultPrinter *this,string *param_1)
{
byte bVar1;
long lVar2;
byte *pbVar3;
byte *pbVar4;
*(XmlUnitTestResultPrinter **)this = this + 0x10;
*(int8 *)(this + 8) = 0;
this[0x10] = (XmlUnitTestResultPrinter)0x0;
/* try { // try from 00124dfb to 00124dff has its CatchHandler @ 00124e54 */
std::__cxx11::string::reserve((ulong)this);
lVar2 = *(long *)(param_1 + 8);
if (lVar2 != 0) {
pbVar3 = *(byte **)param_1;
pbVar4 = pbVar3;
do {
bVar1 = *pbVar4;
if ((0x1f < bVar1) || ((bVar1 < 0xe && ((0x2600U >> (bVar1 & 0x1f) & 1) != 0)))) {
/* try { // try from 00124e2a to 00124e34 has its CatchHandler @ 00124e56 */
std::__cxx11::string::push_back((char)this);
pbVar3 = *(byte **)param_1;
lVar2 = *(long *)(param_1 + 8);
}
pbVar4 = pbVar4 + 1;
} while (pbVar4 != pbVar3 + lVar2);
}
return this;
}
| |
26,512 | js_os_kill | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_os_kill(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
int pid, sig, ret;
if (JS_ToInt32(ctx, &pid, argv[0]))
return JS_EXCEPTION;
if (JS_ToInt32(ctx, &sig, argv[1]))
return JS_EXCEPTION;
ret = js_get_errno(kill(pid, sig));
return JS_NewInt32(ctx, ret);
} | O0 | c | js_os_kill:
subq $0x68, %rsp
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rdi, 0x20(%rsp)
movl %ecx, 0x1c(%rsp)
movq %r8, 0x10(%rsp)
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rax
movq (%rax), %rdx
movq 0x8(%rax), %rcx
leaq 0xc(%rsp), %rsi
callq 0x37c60
cmpl $0x0, %eax
je 0x1b7b2
movl $0x0, 0x38(%rsp)
movq $0x6, 0x40(%rsp)
jmp 0x1b836
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdx
movq 0x18(%rax), %rcx
leaq 0x8(%rsp), %rsi
callq 0x37c60
cmpl $0x0, %eax
je 0x1b7e6
movl $0x0, 0x38(%rsp)
movq $0x6, 0x40(%rsp)
jmp 0x1b836
movl 0xc(%rsp), %edi
movl 0x8(%rsp), %esi
callq 0xe5d0
movslq %eax, %rdi
callq 0x12790
movl %eax, 0x4(%rsp)
movq 0x20(%rsp), %rcx
movl 0x4(%rsp), %eax
movq %rcx, 0x50(%rsp)
movl %eax, 0x4c(%rsp)
movl 0x4c(%rsp), %eax
movl %eax, 0x58(%rsp)
movq $0x0, 0x60(%rsp)
movq 0x58(%rsp), %rcx
movq 0x60(%rsp), %rax
movq %rcx, 0x38(%rsp)
movq %rax, 0x40(%rsp)
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rdx
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
| js_os_kill:
sub rsp, 68h
mov [rsp+68h+var_40], rsi
mov [rsp+68h+var_38], rdx
mov [rsp+68h+var_48], rdi
mov [rsp+68h+var_4C], ecx
mov [rsp+68h+var_58], r8
mov rdi, [rsp+68h+var_48]
mov rax, [rsp+68h+var_58]
mov rdx, [rax]
mov rcx, [rax+8]
lea rsi, [rsp+68h+var_5C]
call JS_ToInt32
cmp eax, 0
jz short loc_1B7B2
mov dword ptr [rsp+68h+var_30], 0
mov [rsp+68h+var_28], 6
jmp loc_1B836
loc_1B7B2:
mov rdi, [rsp+68h+var_48]
mov rax, [rsp+68h+var_58]
mov rdx, [rax+10h]
mov rcx, [rax+18h]
lea rsi, [rsp+68h+var_60]
call JS_ToInt32
cmp eax, 0
jz short loc_1B7E6
mov dword ptr [rsp+68h+var_30], 0
mov [rsp+68h+var_28], 6
jmp short loc_1B836
loc_1B7E6:
mov edi, [rsp+68h+var_5C]
mov esi, [rsp+68h+var_60]
call _kill
movsxd rdi, eax
call js_get_errno
mov [rsp+68h+var_64], eax
mov rcx, [rsp+68h+var_48]
mov eax, [rsp+68h+var_64]
mov [rsp+68h+var_18], rcx
mov [rsp+68h+var_1C], eax
mov eax, [rsp+68h+var_1C]
mov dword ptr [rsp+68h+var_10], eax
mov [rsp+68h+var_8], 0
mov rcx, [rsp+68h+var_10]
mov rax, [rsp+68h+var_8]
mov [rsp+68h+var_30], rcx
mov [rsp+68h+var_28], rax
loc_1B836:
mov rax, [rsp+68h+var_30]
mov rdx, [rsp+68h+var_28]
add rsp, 68h
retn
| long long js_os_kill(long long a1, long long a2, long long a3, int a4, _QWORD *a5)
{
int v5; // eax
int errno; // [rsp+4h] [rbp-64h]
unsigned int v8; // [rsp+8h] [rbp-60h] BYREF
unsigned int v9; // [rsp+Ch] [rbp-5Ch] BYREF
_QWORD *v10; // [rsp+10h] [rbp-58h]
int v11; // [rsp+1Ch] [rbp-4Ch]
long long v12; // [rsp+20h] [rbp-48h]
long long v13; // [rsp+28h] [rbp-40h]
long long v14; // [rsp+30h] [rbp-38h]
long long v15; // [rsp+38h] [rbp-30h]
long long v16; // [rsp+40h] [rbp-28h]
int v17; // [rsp+4Ch] [rbp-1Ch]
long long v18; // [rsp+50h] [rbp-18h]
long long v19; // [rsp+58h] [rbp-10h]
long long v20; // [rsp+60h] [rbp-8h]
v13 = a2;
v14 = a3;
v12 = a1;
v11 = a4;
v10 = a5;
if ( (unsigned int)JS_ToInt32(a1, &v9, *a5, a5[1]) )
{
LODWORD(v15) = 0;
v16 = 6LL;
}
else if ( (unsigned int)JS_ToInt32(v12, &v8, v10[2], v10[3]) )
{
LODWORD(v15) = 0;
v16 = 6LL;
}
else
{
v5 = kill(v9, v8);
errno = js_get_errno(v5);
v18 = v12;
v17 = errno;
LODWORD(v19) = errno;
v20 = 0LL;
v15 = v19;
v16 = 0LL;
}
return v15;
}
| js_os_kill:
SUB RSP,0x68
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RSP + 0x20],RDI
MOV dword ptr [RSP + 0x1c],ECX
MOV qword ptr [RSP + 0x10],R8
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0xc]
CALL 0x00137c60
CMP EAX,0x0
JZ 0x0011b7b2
MOV dword ptr [RSP + 0x38],0x0
MOV qword ptr [RSP + 0x40],0x6
JMP 0x0011b836
LAB_0011b7b2:
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RAX + 0x18]
LEA RSI,[RSP + 0x8]
CALL 0x00137c60
CMP EAX,0x0
JZ 0x0011b7e6
MOV dword ptr [RSP + 0x38],0x0
MOV qword ptr [RSP + 0x40],0x6
JMP 0x0011b836
LAB_0011b7e6:
MOV EDI,dword ptr [RSP + 0xc]
MOV ESI,dword ptr [RSP + 0x8]
CALL 0x0010e5d0
MOVSXD RDI,EAX
CALL 0x00112790
MOV dword ptr [RSP + 0x4],EAX
MOV RCX,qword ptr [RSP + 0x20]
MOV EAX,dword ptr [RSP + 0x4]
MOV qword ptr [RSP + 0x50],RCX
MOV dword ptr [RSP + 0x4c],EAX
MOV EAX,dword ptr [RSP + 0x4c]
MOV dword ptr [RSP + 0x58],EAX
MOV qword ptr [RSP + 0x60],0x0
MOV RCX,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x38],RCX
MOV qword ptr [RSP + 0x40],RAX
LAB_0011b836:
MOV RAX,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
ADD RSP,0x68
RET
|
int1 [16]
js_os_kill(int8 param_1,int8 param_2,int8 param_3,int4 param_4,
int8 *param_5)
{
int1 auVar1 [16];
int iVar2;
int local_60;
__pid_t local_5c;
int8 *local_58;
int4 local_4c;
int8 local_48;
int8 local_40;
int8 local_38;
int4 local_30;
int4 uStack_2c;
int8 local_28;
int4 uStack_c;
local_58 = param_5;
local_4c = param_4;
local_48 = param_1;
local_40 = param_2;
local_38 = param_3;
iVar2 = JS_ToInt32(param_1,&local_5c,*param_5,param_5[1]);
if (iVar2 == 0) {
iVar2 = JS_ToInt32(local_48,&local_60,local_58[2],local_58[3]);
if (iVar2 == 0) {
iVar2 = kill(local_5c,local_60);
local_30 = js_get_errno((long)iVar2);
uStack_2c = uStack_c;
local_28 = 0;
}
else {
local_30 = 0;
local_28 = 6;
}
}
else {
local_30 = 0;
local_28 = 6;
}
auVar1._4_4_ = uStack_2c;
auVar1._0_4_ = local_30;
auVar1._8_8_ = local_28;
return auVar1;
}
| |
26,513 | JS_FreeAtomStruct | bluesky950520[P]quickjs/quickjs.c | static void JS_FreeAtomStruct(JSRuntime *rt, JSAtomStruct *p)
{
uint32_t i = p->hash_next; /* atom_index */
if (p->atom_type != JS_ATOM_TYPE_SYMBOL) {
JSAtomStruct *p0, *p1;
uint32_t h0;
h0 = p->hash & (rt->atom_hash_size - 1);
i = rt->atom_hash[h0];
p1 = rt->atom_array[i];
if (p1 == p) {
rt->atom_hash[h0] = p1->hash_next;
} else {
for(;;) {
assert(i != 0);
p0 = p1;
i = p1->hash_next;
p1 = rt->atom_array[i];
if (p1 == p) {
p0->hash_next = p1->hash_next;
break;
}
}
}
}
/* insert in free atom list */
rt->atom_array[i] = atom_set_free(rt->atom_free_index);
rt->atom_free_index = i;
if (unlikely(p->first_weak_ref)) {
reset_weak_ref(rt, &p->first_weak_ref);
}
/* free the string structure */
#ifdef DUMP_LEAKS
list_del(&p->link);
#endif
js_free_rt(rt, p);
rt->atom_count--;
assert(rt->atom_count >= 0);
} | O0 | c | JS_FreeAtomStruct:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x28(%rsp), %rax
movl 0xc(%rax), %eax
movl %eax, 0x24(%rsp)
movq 0x28(%rsp), %rax
movq 0x4(%rax), %rax
shrq $0x3e, %rax
movzbl %al, %eax
cmpl $0x3, %eax
je 0x63039
movq 0x28(%rsp), %rax
movq 0x4(%rax), %rax
shrq $0x20, %rax
andq $0x3fffffff, %rax # imm = 0x3FFFFFFF
movq 0x30(%rsp), %rcx
movl 0x50(%rcx), %ecx
subl $0x1, %ecx
andl %ecx, %eax
movl %eax, 0xc(%rsp)
movq 0x30(%rsp), %rax
movq 0x60(%rax), %rax
movl 0xc(%rsp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, 0x24(%rsp)
movq 0x30(%rsp), %rax
movq 0x68(%rax), %rax
movl 0x24(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq 0x28(%rsp), %rax
jne 0x62fe7
movq 0x10(%rsp), %rax
movl 0xc(%rax), %edx
movq 0x30(%rsp), %rax
movq 0x60(%rax), %rax
movl 0xc(%rsp), %ecx
movl %edx, (%rax,%rcx,4)
jmp 0x63037
jmp 0x62fe9
movq 0x10(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x10(%rsp), %rax
movl 0xc(%rax), %eax
movl %eax, 0x24(%rsp)
movq 0x30(%rsp), %rax
movq 0x68(%rax), %rax
movl 0x24(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq 0x28(%rsp), %rax
jne 0x63033
movq 0x10(%rsp), %rax
movl 0xc(%rax), %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0xc(%rax)
jmp 0x63035
jmp 0x62fe9
jmp 0x63037
jmp 0x63039
movq 0x30(%rsp), %rax
movl 0x70(%rax), %edi
callq 0x630c0
movq %rax, %rdx
movq 0x30(%rsp), %rax
movq 0x68(%rax), %rax
movl 0x24(%rsp), %ecx
movq %rdx, (%rax,%rcx,8)
movl 0x24(%rsp), %ecx
movq 0x30(%rsp), %rax
movl %ecx, 0x70(%rax)
movq 0x28(%rsp), %rax
cmpq $0x0, 0x10(%rax)
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x63097
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
addq $0x10, %rsi
callq 0x630d0
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x27c50
movq 0x30(%rsp), %rax
movl 0x54(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x54(%rax)
addq $0x38, %rsp
retq
nopl (%rax)
| JS_FreeAtomStruct:
sub rsp, 38h
mov [rsp+38h+var_8], rdi
mov [rsp+38h+var_10], rsi
mov rax, [rsp+38h+var_10]
mov eax, [rax+0Ch]
mov [rsp+38h+var_14], eax
mov rax, [rsp+38h+var_10]
mov rax, [rax+4]
shr rax, 3Eh
movzx eax, al
cmp eax, 3
jz loc_63039
mov rax, [rsp+38h+var_10]
mov rax, [rax+4]
shr rax, 20h
and rax, 3FFFFFFFh
mov rcx, [rsp+38h+var_8]
mov ecx, [rcx+50h]
sub ecx, 1
and eax, ecx
mov [rsp+38h+var_2C], eax
mov rax, [rsp+38h+var_8]
mov rax, [rax+60h]
mov ecx, [rsp+38h+var_2C]
mov eax, [rax+rcx*4]
mov [rsp+38h+var_14], eax
mov rax, [rsp+38h+var_8]
mov rax, [rax+68h]
mov ecx, [rsp+38h+var_14]
mov rax, [rax+rcx*8]
mov [rsp+38h+var_28], rax
mov rax, [rsp+38h+var_28]
cmp rax, [rsp+38h+var_10]
jnz short loc_62FE7
mov rax, [rsp+38h+var_28]
mov edx, [rax+0Ch]
mov rax, [rsp+38h+var_8]
mov rax, [rax+60h]
mov ecx, [rsp+38h+var_2C]
mov [rax+rcx*4], edx
jmp short loc_63037
loc_62FE7:
jmp short $+2
loc_62FE9:
mov rax, [rsp+38h+var_28]
mov [rsp+38h+var_20], rax
mov rax, [rsp+38h+var_28]
mov eax, [rax+0Ch]
mov [rsp+38h+var_14], eax
mov rax, [rsp+38h+var_8]
mov rax, [rax+68h]
mov ecx, [rsp+38h+var_14]
mov rax, [rax+rcx*8]
mov [rsp+38h+var_28], rax
mov rax, [rsp+38h+var_28]
cmp rax, [rsp+38h+var_10]
jnz short loc_63033
mov rax, [rsp+38h+var_28]
mov ecx, [rax+0Ch]
mov rax, [rsp+38h+var_20]
mov [rax+0Ch], ecx
jmp short loc_63035
loc_63033:
jmp short loc_62FE9
loc_63035:
jmp short $+2
loc_63037:
jmp short $+2
loc_63039:
mov rax, [rsp+38h+var_8]
mov edi, [rax+70h]
call atom_set_free
mov rdx, rax
mov rax, [rsp+38h+var_8]
mov rax, [rax+68h]
mov ecx, [rsp+38h+var_14]
mov [rax+rcx*8], rdx
mov ecx, [rsp+38h+var_14]
mov rax, [rsp+38h+var_8]
mov [rax+70h], ecx
mov rax, [rsp+38h+var_10]
cmp qword ptr [rax+10h], 0
setnz al
xor al, 0FFh
xor al, 0FFh
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_63097
mov rdi, [rsp+38h+var_8]
mov rsi, [rsp+38h+var_10]
add rsi, 10h
call reset_weak_ref
loc_63097:
mov rdi, [rsp+38h+var_8]
mov rsi, [rsp+38h+var_10]
call js_free_rt
mov rax, [rsp+38h+var_8]
mov ecx, [rax+54h]
add ecx, 0FFFFFFFFh
mov [rax+54h], ecx
add rsp, 38h
retn
| long long JS_FreeAtomStruct(long long a1, long long a2)
{
long long result; // rax
unsigned int v3; // [rsp+Ch] [rbp-2Ch]
long long v4; // [rsp+10h] [rbp-28h]
long long v5; // [rsp+18h] [rbp-20h]
unsigned int v6; // [rsp+24h] [rbp-14h]
v6 = *(_DWORD *)(a2 + 12);
if ( *(_QWORD *)(a2 + 4) >> 62 != 3 )
{
v3 = (*(_DWORD *)(a1 + 80) - 1) & HIDWORD(*(_QWORD *)(a2 + 4)) & 0x3FFFFFFF;
v6 = *(_DWORD *)(*(_QWORD *)(a1 + 96) + 4LL * v3);
v4 = *(_QWORD *)(*(_QWORD *)(a1 + 104) + 8LL * v6);
if ( v4 == a2 )
{
*(_DWORD *)(*(_QWORD *)(a1 + 96) + 4LL * v3) = *(_DWORD *)(v4 + 12);
}
else
{
do
{
v5 = v4;
v6 = *(_DWORD *)(v4 + 12);
v4 = *(_QWORD *)(*(_QWORD *)(a1 + 104) + 8LL * v6);
}
while ( v4 != a2 );
*(_DWORD *)(v5 + 12) = *(_DWORD *)(v4 + 12);
}
}
*(_QWORD *)(*(_QWORD *)(a1 + 104) + 8LL * v6) = atom_set_free(*(unsigned int *)(a1 + 112));
*(_DWORD *)(a1 + 112) = v6;
if ( *(_QWORD *)(a2 + 16) )
reset_weak_ref(a1, a2 + 16);
js_free_rt(a1, a2);
result = a1;
--*(_DWORD *)(a1 + 84);
return result;
}
| JS_FreeAtomStruct:
SUB RSP,0x38
MOV qword ptr [RSP + 0x30],RDI
MOV qword ptr [RSP + 0x28],RSI
MOV RAX,qword ptr [RSP + 0x28]
MOV EAX,dword ptr [RAX + 0xc]
MOV dword ptr [RSP + 0x24],EAX
MOV RAX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX + 0x4]
SHR RAX,0x3e
MOVZX EAX,AL
CMP EAX,0x3
JZ 0x00163039
MOV RAX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RAX + 0x4]
SHR RAX,0x20
AND RAX,0x3fffffff
MOV RCX,qword ptr [RSP + 0x30]
MOV ECX,dword ptr [RCX + 0x50]
SUB ECX,0x1
AND EAX,ECX
MOV dword ptr [RSP + 0xc],EAX
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX + 0x60]
MOV ECX,dword ptr [RSP + 0xc]
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV dword ptr [RSP + 0x24],EAX
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX + 0x68]
MOV ECX,dword ptr [RSP + 0x24]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x10]
CMP RAX,qword ptr [RSP + 0x28]
JNZ 0x00162fe7
MOV RAX,qword ptr [RSP + 0x10]
MOV EDX,dword ptr [RAX + 0xc]
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX + 0x60]
MOV ECX,dword ptr [RSP + 0xc]
MOV dword ptr [RAX + RCX*0x4],EDX
JMP 0x00163037
LAB_00162fe7:
JMP 0x00162fe9
LAB_00162fe9:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RAX + 0xc]
MOV dword ptr [RSP + 0x24],EAX
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX + 0x68]
MOV ECX,dword ptr [RSP + 0x24]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x10]
CMP RAX,qword ptr [RSP + 0x28]
JNZ 0x00163033
MOV RAX,qword ptr [RSP + 0x10]
MOV ECX,dword ptr [RAX + 0xc]
MOV RAX,qword ptr [RSP + 0x18]
MOV dword ptr [RAX + 0xc],ECX
JMP 0x00163035
LAB_00163033:
JMP 0x00162fe9
LAB_00163035:
JMP 0x00163037
LAB_00163037:
JMP 0x00163039
LAB_00163039:
MOV RAX,qword ptr [RSP + 0x30]
MOV EDI,dword ptr [RAX + 0x70]
CALL 0x001630c0
MOV RDX,RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX + 0x68]
MOV ECX,dword ptr [RSP + 0x24]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV ECX,dword ptr [RSP + 0x24]
MOV RAX,qword ptr [RSP + 0x30]
MOV dword ptr [RAX + 0x70],ECX
MOV RAX,qword ptr [RSP + 0x28]
CMP qword ptr [RAX + 0x10],0x0
SETNZ AL
XOR AL,0xff
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00163097
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x28]
ADD RSI,0x10
CALL 0x001630d0
LAB_00163097:
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x00127c50
MOV RAX,qword ptr [RSP + 0x30]
MOV ECX,dword ptr [RAX + 0x54]
ADD ECX,-0x1
MOV dword ptr [RAX + 0x54],ECX
ADD RSP,0x38
RET
|
void JS_FreeAtomStruct(long param_1,long param_2)
{
long lVar1;
uint uVar2;
int8 uVar3;
long local_28;
uint local_14;
local_14 = *(uint *)(param_2 + 0xc);
if ((uint)((ulong)*(int8 *)(param_2 + 4) >> 0x3e) != 3) {
uVar2 = (uint)((ulong)*(int8 *)(param_2 + 4) >> 0x20) & 0x3fffffff &
*(int *)(param_1 + 0x50) - 1U;
local_14 = *(uint *)(*(long *)(param_1 + 0x60) + (ulong)uVar2 * 4);
lVar1 = *(long *)(*(long *)(param_1 + 0x68) + (ulong)local_14 * 8);
if (lVar1 == param_2) {
*(int4 *)(*(long *)(param_1 + 0x60) + (ulong)uVar2 * 4) = *(int4 *)(lVar1 + 0xc);
}
else {
do {
local_28 = lVar1;
local_14 = *(uint *)(local_28 + 0xc);
lVar1 = *(long *)(*(long *)(param_1 + 0x68) + (ulong)local_14 * 8);
} while (lVar1 != param_2);
*(int4 *)(local_28 + 0xc) = *(int4 *)(lVar1 + 0xc);
}
}
uVar3 = atom_set_free(*(int4 *)(param_1 + 0x70));
*(int8 *)(*(long *)(param_1 + 0x68) + (ulong)local_14 * 8) = uVar3;
*(uint *)(param_1 + 0x70) = local_14;
if (*(long *)(param_2 + 0x10) != 0) {
reset_weak_ref(param_1,param_2 + 0x10);
}
js_free_rt(param_1,param_2);
*(int *)(param_1 + 0x54) = *(int *)(param_1 + 0x54) + -1;
return;
}
| |
26,514 | JS_FreeAtomStruct | bluesky950520[P]quickjs/quickjs.c | static void JS_FreeAtomStruct(JSRuntime *rt, JSAtomStruct *p)
{
uint32_t i = p->hash_next; /* atom_index */
if (p->atom_type != JS_ATOM_TYPE_SYMBOL) {
JSAtomStruct *p0, *p1;
uint32_t h0;
h0 = p->hash & (rt->atom_hash_size - 1);
i = rt->atom_hash[h0];
p1 = rt->atom_array[i];
if (p1 == p) {
rt->atom_hash[h0] = p1->hash_next;
} else {
for(;;) {
assert(i != 0);
p0 = p1;
i = p1->hash_next;
p1 = rt->atom_array[i];
if (p1 == p) {
p0->hash_next = p1->hash_next;
break;
}
}
}
}
/* insert in free atom list */
rt->atom_array[i] = atom_set_free(rt->atom_free_index);
rt->atom_free_index = i;
if (unlikely(p->first_weak_ref)) {
reset_weak_ref(rt, &p->first_weak_ref);
}
/* free the string structure */
#ifdef DUMP_LEAKS
list_del(&p->link);
#endif
js_free_rt(rt, p);
rt->atom_count--;
assert(rt->atom_count >= 0);
} | O2 | c | JS_FreeAtomStruct:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x4(%rsi), %rax
movq %rax, %rcx
shrq $0x3e, %rcx
cmpl $0x3, %ecx
jb 0x382d4
movl 0xc(%r14), %ecx
movq 0x68(%rbx), %rax
jmp 0x3831d
shrq $0x20, %rax
movl 0x50(%rbx), %edx
decl %edx
andl %eax, %edx
movq 0x60(%rbx), %rdi
leal (,%rdx,4), %eax
movl (%rdi,%rax), %ecx
movq 0x68(%rbx), %rax
movq (%rax,%rcx,8), %rsi
cmpq %r14, %rsi
je 0x38311
movq %rsi, %rdx
movl 0xc(%rsi), %ecx
movq (%rax,%rcx,8), %rsi
cmpq %r14, %rsi
jne 0x382fa
movl 0xc(%rsi), %esi
movl %esi, 0xc(%rdx)
jmp 0x3831d
andl $0x3fffffff, %edx # imm = 0x3FFFFFFF
movl 0xc(%rsi), %esi
movl %esi, (%rdi,%rdx,4)
movl 0x70(%rbx), %edx
leaq 0x1(,%rdx,2), %rdx
movq %rdx, (%rax,%rcx,8)
movl %ecx, 0x70(%rbx)
cmpq $0x0, 0x10(%r14)
jne 0x3834c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1ac7b
decl 0x54(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x3835a
jmp 0x38336
| JS_FreeAtomStruct:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov rax, [rsi+4]
mov rcx, rax
shr rcx, 3Eh
cmp ecx, 3
jb short loc_382D4
mov ecx, [r14+0Ch]
mov rax, [rbx+68h]
jmp short loc_3831D
loc_382D4:
shr rax, 20h
mov edx, [rbx+50h]
dec edx
and edx, eax
mov rdi, [rbx+60h]
lea eax, ds:0[rdx*4]
mov ecx, [rdi+rax]
mov rax, [rbx+68h]
mov rsi, [rax+rcx*8]
cmp rsi, r14
jz short loc_38311
loc_382FA:
mov rdx, rsi
mov ecx, [rsi+0Ch]
mov rsi, [rax+rcx*8]
cmp rsi, r14
jnz short loc_382FA
mov esi, [rsi+0Ch]
mov [rdx+0Ch], esi
jmp short loc_3831D
loc_38311:
and edx, 3FFFFFFFh
mov esi, [rsi+0Ch]
mov [rdi+rdx*4], esi
loc_3831D:
mov edx, [rbx+70h]
lea rdx, ds:1[rdx*2]
mov [rax+rcx*8], rdx
mov [rbx+70h], ecx
cmp qword ptr [r14+10h], 0
jnz short loc_3834C
loc_38336:
mov rdi, rbx
mov rsi, r14
call js_free_rt
dec dword ptr [rbx+54h]
add rsp, 8
pop rbx
pop r14
retn
loc_3834C:
lea rsi, [r14+10h]
mov rdi, rbx
call reset_weak_ref
jmp short loc_38336
| long long JS_FreeAtomStruct(long long a1, long long a2)
{
unsigned long long v4; // rax
long long v5; // rcx
long long v6; // rax
int v7; // edx
long long v8; // rdi
long long v9; // rsi
long long v10; // rdx
long long result; // rax
v4 = *(_QWORD *)(a2 + 4);
if ( (unsigned int)(v4 >> 62) < 3 )
{
v7 = HIDWORD(v4) & (*(_DWORD *)(a1 + 80) - 1);
v8 = *(_QWORD *)(a1 + 96);
v5 = *(unsigned int *)(v8 + (unsigned int)(4 * v7));
v6 = *(_QWORD *)(a1 + 104);
v9 = *(_QWORD *)(v6 + 8 * v5);
if ( v9 == a2 )
{
*(_DWORD *)(v8 + 4LL * (v7 & 0x3FFFFFFF)) = *(_DWORD *)(v9 + 12);
}
else
{
do
{
v10 = v9;
v5 = *(unsigned int *)(v9 + 12);
v9 = *(_QWORD *)(v6 + 8 * v5);
}
while ( v9 != a2 );
*(_DWORD *)(v10 + 12) = *(_DWORD *)(v9 + 12);
}
}
else
{
v5 = *(unsigned int *)(a2 + 12);
v6 = *(_QWORD *)(a1 + 104);
}
*(_QWORD *)(v6 + 8 * v5) = 2LL * *(unsigned int *)(a1 + 112) + 1;
*(_DWORD *)(a1 + 112) = v5;
if ( *(_QWORD *)(a2 + 16) )
reset_weak_ref(a1, a2 + 16);
result = js_free_rt(a1, a2);
--*(_DWORD *)(a1 + 84);
return result;
}
| JS_FreeAtomStruct:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RSI + 0x4]
MOV RCX,RAX
SHR RCX,0x3e
CMP ECX,0x3
JC 0x001382d4
MOV ECX,dword ptr [R14 + 0xc]
MOV RAX,qword ptr [RBX + 0x68]
JMP 0x0013831d
LAB_001382d4:
SHR RAX,0x20
MOV EDX,dword ptr [RBX + 0x50]
DEC EDX
AND EDX,EAX
MOV RDI,qword ptr [RBX + 0x60]
LEA EAX,[RDX*0x4]
MOV ECX,dword ptr [RDI + RAX*0x1]
MOV RAX,qword ptr [RBX + 0x68]
MOV RSI,qword ptr [RAX + RCX*0x8]
CMP RSI,R14
JZ 0x00138311
LAB_001382fa:
MOV RDX,RSI
MOV ECX,dword ptr [RSI + 0xc]
MOV RSI,qword ptr [RAX + RCX*0x8]
CMP RSI,R14
JNZ 0x001382fa
MOV ESI,dword ptr [RSI + 0xc]
MOV dword ptr [RDX + 0xc],ESI
JMP 0x0013831d
LAB_00138311:
AND EDX,0x3fffffff
MOV ESI,dword ptr [RSI + 0xc]
MOV dword ptr [RDI + RDX*0x4],ESI
LAB_0013831d:
MOV EDX,dword ptr [RBX + 0x70]
LEA RDX,[0x1 + RDX*0x2]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV dword ptr [RBX + 0x70],ECX
CMP qword ptr [R14 + 0x10],0x0
JNZ 0x0013834c
LAB_00138336:
MOV RDI,RBX
MOV RSI,R14
CALL 0x0011ac7b
DEC dword ptr [RBX + 0x54]
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_0013834c:
LEA RSI,[R14 + 0x10]
MOV RDI,RBX
CALL 0x0013835a
JMP 0x00138336
|
void JS_FreeAtomStruct(long param_1,long param_2)
{
long lVar1;
long lVar2;
ulong uVar3;
uint uVar4;
long lVar5;
uVar4 = (uint)((ulong)*(int8 *)(param_2 + 4) >> 0x20);
if (uVar4 >> 0x1e < 3) {
uVar4 = *(int *)(param_1 + 0x50) - 1U & uVar4;
uVar3 = (ulong)*(uint *)(*(long *)(param_1 + 0x60) + (ulong)(uVar4 * 4));
lVar2 = *(long *)(param_1 + 0x68);
lVar1 = *(long *)(lVar2 + uVar3 * 8);
if (lVar1 == param_2) {
*(int4 *)(*(long *)(param_1 + 0x60) + (ulong)(uVar4 & 0x3fffffff) * 4) =
*(int4 *)(lVar1 + 0xc);
}
else {
do {
lVar5 = lVar1;
uVar3 = (ulong)*(uint *)(lVar5 + 0xc);
lVar1 = *(long *)(lVar2 + uVar3 * 8);
} while (lVar1 != param_2);
*(int4 *)(lVar5 + 0xc) = *(int4 *)(lVar1 + 0xc);
}
}
else {
uVar3 = (ulong)*(uint *)(param_2 + 0xc);
lVar2 = *(long *)(param_1 + 0x68);
}
*(ulong *)(lVar2 + uVar3 * 8) = (ulong)*(uint *)(param_1 + 0x70) * 2 + 1;
*(int *)(param_1 + 0x70) = (int)uVar3;
if (*(long *)(param_2 + 0x10) != 0) {
reset_weak_ref(param_1,param_2 + 0x10);
}
js_free_rt(param_1,param_2);
*(int *)(param_1 + 0x54) = *(int *)(param_1 + 0x54) + -1;
return;
}
| |
26,515 | ma_get_buffer_offset | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | static void *ma_get_buffer_offset(MYSQL_STMT *stmt, enum enum_field_types type,
void *buffer, unsigned long row_nr)
{
if (stmt->param_callback)
return buffer;
if (stmt->array_size)
{
int len;
if (stmt->row_size)
return (void *)((char *)buffer + stmt->row_size * row_nr);
len= mysql_ps_fetch_functions[type].pack_len;
if (len > 0)
return (void *)((char *)buffer + len * row_nr);
return ((void **)buffer)[row_nr];
}
return buffer;
} | O0 | c | ma_get_buffer_offset:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x390(%rax)
je 0x2715e
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x271e5
movq -0x10(%rbp), %rax
cmpl $0x0, 0x368(%rax)
je 0x271dd
movq -0x10(%rbp), %rax
cmpq $0x0, 0x370(%rax)
je 0x27196
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x370(%rcx), %rcx
imulq -0x28(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x271e5
movl -0x14(%rbp), %eax
movl %eax, %ecx
leaq 0x3931e(%rip), %rax # 0x604c0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jle 0x271cb
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
imulq -0x28(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x271e5
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x8(%rbp)
jmp 0x271e5
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
| ma_get_buffer_offset:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_10]
cmp qword ptr [rax+390h], 0
jz short loc_2715E
mov rax, [rbp+var_20]
mov [rbp+var_8], rax
jmp loc_271E5
loc_2715E:
mov rax, [rbp+var_10]
cmp dword ptr [rax+368h], 0
jz short loc_271DD
mov rax, [rbp+var_10]
cmp qword ptr [rax+370h], 0
jz short loc_27196
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
mov rcx, [rcx+370h]
imul rcx, [rbp+var_28]
add rax, rcx
mov [rbp+var_8], rax
jmp short loc_271E5
loc_27196:
mov eax, [rbp+var_14]
mov ecx, eax
lea rax, mysql_ps_fetch_functions
imul rcx, 18h
add rax, rcx
mov eax, [rax+8]
mov [rbp+var_2C], eax
cmp [rbp+var_2C], 0
jle short loc_271CB
mov rax, [rbp+var_20]
movsxd rcx, [rbp+var_2C]
imul rcx, [rbp+var_28]
add rax, rcx
mov [rbp+var_8], rax
jmp short loc_271E5
loc_271CB:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_28]
mov rax, [rax+rcx*8]
mov [rbp+var_8], rax
jmp short loc_271E5
loc_271DD:
mov rax, [rbp+var_20]
mov [rbp+var_8], rax
loc_271E5:
mov rax, [rbp+var_8]
pop rbp
retn
| long long ma_get_buffer_offset(long long a1, int a2, long long a3, long long a4)
{
int v5; // [rsp+0h] [rbp-2Ch]
if ( *(_QWORD *)(a1 + 912) )
return a3;
if ( !*(_DWORD *)(a1 + 872) )
return a3;
if ( *(_QWORD *)(a1 + 880) )
return a4 * *(_QWORD *)(a1 + 880) + a3;
v5 = mysql_ps_fetch_functions[6 * a2 + 2];
if ( v5 <= 0 )
return *(_QWORD *)(a3 + 8 * a4);
else
return a4 * v5 + a3;
}
| ma_get_buffer_offset:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x390],0x0
JZ 0x0012715e
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001271e5
LAB_0012715e:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x368],0x0
JZ 0x001271dd
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x370],0x0
JZ 0x00127196
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x370]
IMUL RCX,qword ptr [RBP + -0x28]
ADD RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001271e5
LAB_00127196:
MOV EAX,dword ptr [RBP + -0x14]
MOV ECX,EAX
LEA RAX,[0x1604c0]
IMUL RCX,RCX,0x18
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x2c],EAX
CMP dword ptr [RBP + -0x2c],0x0
JLE 0x001271cb
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,dword ptr [RBP + -0x2c]
IMUL RCX,qword ptr [RBP + -0x28]
ADD RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001271e5
LAB_001271cb:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001271e5
LAB_001271dd:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x8],RAX
LAB_001271e5:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
long ma_get_buffer_offset(long param_1,uint param_2,long param_3,long param_4)
{
long local_10;
local_10 = param_3;
if ((*(long *)(param_1 + 0x390) == 0) && (*(int *)(param_1 + 0x368) != 0)) {
if (*(long *)(param_1 + 0x370) == 0) {
if ((int)(&DAT_001604c8)[(ulong)param_2 * 6] < 1) {
local_10 = *(long *)(param_3 + param_4 * 8);
}
else {
local_10 = param_3 + (int)(&DAT_001604c8)[(ulong)param_2 * 6] * param_4;
}
}
else {
local_10 = param_3 + *(long *)(param_1 + 0x370) * param_4;
}
}
return local_10;
}
| |
26,516 | my_utf8mb3_uni | eloqsql/strings/ctype-utf8.c | static int my_utf8mb3_uni(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t * pwc, const uchar *s, const uchar *e)
{
return my_mb_wc_utf8mb3_quick(pwc, s, e);
} | O3 | c | my_utf8mb3_uni:
pushq %rbp
movq %rsp, %rbp
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0xd1889
movzbl (%rdx), %edi
testb %dil, %dil
js 0xd1881
movl %edi, %edi
movl $0x1, %eax
movq %rdi, (%rsi)
jmp 0xd1889
cmpb $-0x3e, %dil
jae 0xd188b
xorl %eax, %eax
popq %rbp
retq
cmpb $-0x21, %dil
ja 0xd18c2
leaq 0x2(%rdx), %r8
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %r8
ja 0xd1889
movzbl 0x1(%rdx), %ecx
xorl $0x80, %ecx
movl $0x0, %eax
cmpb $0x3f, %cl
ja 0xd1889
andl $0x1f, %edi
shll $0x6, %edi
orl %ecx, %edi
movl $0x2, %eax
jmp 0xd187c
cmpb $-0x11, %dil
ja 0xd1887
leaq 0x3(%rdx), %r8
movl $0xffffff99, %eax # imm = 0xFFFFFF99
cmpq %rcx, %r8
ja 0xd1889
movzbl 0x1(%rdx), %ecx
cmpb $-0x41, %cl
jg 0xd1887
movzbl 0x2(%rdx), %edx
cmpb $-0x41, %dl
jg 0xd1887
cmpl $0xe0, %edi
sete %r8b
cmpb $-0x60, %cl
setb %r9b
movl $0x0, %eax
testb %r9b, %r8b
jne 0xd1889
shll $0xc, %edi
movzwl %di, %eax
andl $0x3f, %ecx
shll $0x6, %ecx
orl %eax, %ecx
andl $0x3f, %edx
orq %rcx, %rdx
movl $0x3, %eax
movq %rdx, %rdi
jmp 0xd187c
| my_utf8mb3_uni:
push rbp
mov rbp, rsp
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short loc_D1889
movzx edi, byte ptr [rdx]
test dil, dil
js short loc_D1881
mov edi, edi
mov eax, 1
loc_D187C:
mov [rsi], rdi
jmp short loc_D1889
loc_D1881:
cmp dil, 0C2h
jnb short loc_D188B
loc_D1887:
xor eax, eax
loc_D1889:
pop rbp
retn
loc_D188B:
cmp dil, 0DFh
ja short loc_D18C2
lea r8, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp r8, rcx
ja short loc_D1889
movzx ecx, byte ptr [rdx+1]
xor ecx, 80h
mov eax, 0
cmp cl, 3Fh ; '?'
ja short loc_D1889
and edi, 1Fh
shl edi, 6
or edi, ecx
mov eax, 2
jmp short loc_D187C
loc_D18C2:
cmp dil, 0EFh
ja short loc_D1887
lea r8, [rdx+3]
mov eax, 0FFFFFF99h
cmp r8, rcx
ja short loc_D1889
movzx ecx, byte ptr [rdx+1]
cmp cl, 0BFh
jg short loc_D1887
movzx edx, byte ptr [rdx+2]
cmp dl, 0BFh
jg short loc_D1887
cmp edi, 0E0h
setz r8b
cmp cl, 0A0h
setb r9b
mov eax, 0
test r8b, r9b
jnz short loc_D1889
shl edi, 0Ch
movzx eax, di
and ecx, 3Fh
shl ecx, 6
or ecx, eax
and edx, 3Fh
or rdx, rcx
mov eax, 3
mov rdi, rdx
jmp loc_D187C
| long long my_utf8mb3_uni(long long a1, unsigned long long *a2, unsigned __int8 *a3, unsigned long long a4)
{
long long result; // rax
int v5; // edi
unsigned long long v6; // rdi
char v7; // cl
char v8; // dl
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
v5 = *a3;
if ( (v5 & 0x80u) == 0 )
{
v6 = *a3;
result = 1LL;
LABEL_4:
*a2 = v6;
return result;
}
if ( (unsigned __int8)v5 < 0xC2u )
return 0LL;
if ( (unsigned __int8)v5 > 0xDFu )
{
if ( (unsigned __int8)v5 > 0xEFu )
return 0LL;
result = 4294967193LL;
if ( (unsigned long long)(a3 + 3) > a4 )
return result;
v7 = a3[1];
if ( v7 > -65 )
return 0LL;
v8 = a3[2];
if ( v8 > -65 )
return 0LL;
result = 0LL;
if ( (unsigned __int8)v7 >= 0xA0u || v5 != 224 )
{
result = 3LL;
v6 = (unsigned __int16)((_WORD)v5 << 12) | ((unsigned __int8)(v7 & 0x3F) << 6) | (unsigned long long)(v8 & 0x3F);
goto LABEL_4;
}
}
else
{
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
result = 0LL;
if ( (a3[1] ^ 0x80u) <= 0x3F )
{
v6 = a3[1] ^ 0x80 | ((unsigned __int8)(v5 & 0x1F) << 6);
result = 2LL;
goto LABEL_4;
}
}
}
}
return result;
}
| my_utf8mb3_uni:
PUSH RBP
MOV RBP,RSP
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x001d1889
MOVZX EDI,byte ptr [RDX]
TEST DIL,DIL
JS 0x001d1881
MOV EDI,EDI
MOV EAX,0x1
LAB_001d187c:
MOV qword ptr [RSI],RDI
JMP 0x001d1889
LAB_001d1881:
CMP DIL,0xc2
JNC 0x001d188b
LAB_001d1887:
XOR EAX,EAX
LAB_001d1889:
POP RBP
RET
LAB_001d188b:
CMP DIL,0xdf
JA 0x001d18c2
LEA R8,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP R8,RCX
JA 0x001d1889
MOVZX ECX,byte ptr [RDX + 0x1]
XOR ECX,0x80
MOV EAX,0x0
CMP CL,0x3f
JA 0x001d1889
AND EDI,0x1f
SHL EDI,0x6
OR EDI,ECX
MOV EAX,0x2
JMP 0x001d187c
LAB_001d18c2:
CMP DIL,0xef
JA 0x001d1887
LEA R8,[RDX + 0x3]
MOV EAX,0xffffff99
CMP R8,RCX
JA 0x001d1889
MOVZX ECX,byte ptr [RDX + 0x1]
CMP CL,0xbf
JG 0x001d1887
MOVZX EDX,byte ptr [RDX + 0x2]
CMP DL,0xbf
JG 0x001d1887
CMP EDI,0xe0
SETZ R8B
CMP CL,0xa0
SETC R9B
MOV EAX,0x0
TEST R8B,R9B
JNZ 0x001d1889
SHL EDI,0xc
MOVZX EAX,DI
AND ECX,0x3f
SHL ECX,0x6
OR ECX,EAX
AND EDX,0x3f
OR RDX,RCX
MOV EAX,0x3
MOV RDI,RDX
JMP 0x001d187c
|
int8 my_utf8mb3_uni(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
byte bVar1;
byte bVar2;
int8 uVar3;
ulong uVar4;
uint uVar5;
if (param_4 <= param_3) {
return 0xffffff9b;
}
bVar1 = *param_3;
uVar5 = (uint)bVar1;
if ((char)bVar1 < '\0') {
if (0xc1 < bVar1) {
if (bVar1 < 0xe0) {
if (param_4 < param_3 + 2) {
return 0xffffff9a;
}
if (0x3f < (byte)(param_3[1] ^ 0x80)) {
return 0;
}
uVar4 = (ulong)((uVar5 & 0x1f) << 6 | param_3[1] ^ 0x80);
uVar3 = 2;
goto LAB_001d187c;
}
if (bVar1 < 0xf0) {
if (param_4 < param_3 + 3) {
return 0xffffff99;
}
bVar2 = param_3[1];
if (((char)bVar2 < -0x40) && ((char)param_3[2] < -0x40)) {
if (uVar5 == 0xe0 && bVar2 < 0xa0) {
return 0;
}
uVar4 = (ulong)(param_3[2] & 0x3f | (bVar2 & 0x3f) << 6 | (bVar1 & 0xf) << 0xc);
uVar3 = 3;
goto LAB_001d187c;
}
}
}
uVar3 = 0;
}
else {
uVar4 = (ulong)uVar5;
uVar3 = 1;
LAB_001d187c:
*param_2 = uVar4;
}
return uVar3;
}
| |
26,517 | my_uca_charcmp | eloqsql/strings/ctype-uca.c | static int my_uca_charcmp(CHARSET_INFO *cs, my_wc_t wc1, my_wc_t wc2)
{
uint num_level= cs->levels_for_order;
int ret;
uint i;
for (i= 0; i != num_level; i++)
{
ret= my_uca_charcmp_onelevel(cs, wc1, wc2, i);
if (ret) {
return ret;
}
}
return 0;
} | O0 | c | my_uca_charcmp:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movzbl 0xb2(%rax), %eax
movl %eax, -0x24(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x24(%rbp), %eax
je 0x56903
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x2c(%rbp), %ecx
callq 0x56920
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
je 0x568f6
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x5690a
jmp 0x568f8
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x568c9
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_uca_charcmp:
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_10]
movzx eax, byte ptr [rax+0B2h]
mov [rbp+var_24], eax
mov [rbp+var_2C], 0
loc_568C9:
mov eax, [rbp+var_2C]
cmp eax, [rbp+var_24]
jz short loc_56903
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov ecx, [rbp+var_2C]
call my_uca_charcmp_onelevel
mov [rbp+var_28], eax
cmp [rbp+var_28], 0
jz short loc_568F6
mov eax, [rbp+var_28]
mov [rbp+var_4], eax
jmp short loc_5690A
loc_568F6:
jmp short $+2
loc_568F8:
mov eax, [rbp+var_2C]
add eax, 1
mov [rbp+var_2C], eax
jmp short loc_568C9
loc_56903:
mov [rbp+var_4], 0
loc_5690A:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long my_uca_charcmp(long long a1, long long a2, long long a3)
{
unsigned int i; // [rsp+4h] [rbp-2Ch]
unsigned int v5; // [rsp+8h] [rbp-28h]
int v6; // [rsp+Ch] [rbp-24h]
v6 = *(unsigned __int8 *)(a1 + 178);
for ( i = 0; i != v6; ++i )
{
v5 = my_uca_charcmp_onelevel(a1, a2, a3, i);
if ( v5 )
return v5;
}
return 0;
}
| my_uca_charcmp:
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 + -0x10]
MOVZX EAX,byte ptr [RAX + 0xb2]
MOV dword ptr [RBP + -0x24],EAX
MOV dword ptr [RBP + -0x2c],0x0
LAB_001568c9:
MOV EAX,dword ptr [RBP + -0x2c]
CMP EAX,dword ptr [RBP + -0x24]
JZ 0x00156903
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x2c]
CALL 0x00156920
MOV dword ptr [RBP + -0x28],EAX
CMP dword ptr [RBP + -0x28],0x0
JZ 0x001568f6
MOV EAX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0015690a
LAB_001568f6:
JMP 0x001568f8
LAB_001568f8:
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x001568c9
LAB_00156903:
MOV dword ptr [RBP + -0x4],0x0
LAB_0015690a:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int my_uca_charcmp(long param_1,int8 param_2,int8 param_3)
{
byte bVar1;
int iVar2;
uint local_34;
bVar1 = *(byte *)(param_1 + 0xb2);
local_34 = 0;
while( true ) {
if (local_34 == bVar1) {
return 0;
}
iVar2 = my_uca_charcmp_onelevel(param_1,param_2,param_3,local_34);
if (iVar2 != 0) break;
local_34 = local_34 + 1;
}
return iVar2;
}
| |
26,518 | protocol::encode(protocol::ChunkVoxels const&, unsigned int) | untodesu[P]voxelius/game/shared/protocol.cc | ENetPacket *protocol::encode(const protocol::ChunkVoxels &packet, enet_uint32 flags)
{
write_buffer.reset();
write_buffer.write_UI16(protocol::ChunkVoxels::ID);
write_buffer.write_I32(packet.chunk.x);
write_buffer.write_I32(packet.chunk.y);
write_buffer.write_I32(packet.chunk.z);
packet.voxels.serialize(write_buffer);
return write_buffer.to_packet(flags);
} | O0 | cpp | protocol::encode(protocol::ChunkVoxels const&, unsigned int):
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
leaq 0x214b02(%rip), %rdi # 0x2d1998
callq 0xf28f0
leaq 0x214af6(%rip), %rdi # 0x2d1998
movl $0x5, %esi
callq 0xf2940
movq -0x8(%rbp), %rax
movl 0x10(%rax), %esi
leaq 0x214ade(%rip), %rdi # 0x2d1998
callq 0xbef30
movq -0x8(%rbp), %rax
movl 0x14(%rax), %esi
leaq 0x214acb(%rip), %rdi # 0x2d1998
callq 0xbef30
movq -0x8(%rbp), %rax
movl 0x18(%rax), %esi
leaq 0x214ab8(%rip), %rdi # 0x2d1998
callq 0xbef30
movq -0x8(%rbp), %rdi
addq $0x1c, %rdi
leaq 0x214aa4(%rip), %rsi # 0x2d1998
callq 0xecf60
movl -0xc(%rbp), %esi
leaq 0x214a95(%rip), %rdi # 0x2d1998
callq 0xf2d50
addq $0x10, %rsp
popq %rbp
retq
nop
| _ZN8protocol6encodeERKNS_11ChunkVoxelsEj:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
lea rdi, _ZL12write_buffer; this
call _ZN11WriteBuffer5resetEv; WriteBuffer::reset(void)
lea rdi, _ZL12write_buffer; this
mov esi, 5; unsigned __int16
call _ZN11WriteBuffer10write_UI16Et; WriteBuffer::write_UI16(ushort)
mov rax, [rbp+var_8]
mov esi, [rax+10h]; int
lea rdi, _ZL12write_buffer; this
call _ZN11WriteBuffer9write_I32Ei; WriteBuffer::write_I32(int)
mov rax, [rbp+var_8]
mov esi, [rax+14h]; int
lea rdi, _ZL12write_buffer; this
call _ZN11WriteBuffer9write_I32Ei; WriteBuffer::write_I32(int)
mov rax, [rbp+var_8]
mov esi, [rax+18h]; int
lea rdi, _ZL12write_buffer; this
call _ZN11WriteBuffer9write_I32Ei; WriteBuffer::write_I32(int)
mov rdi, [rbp+var_8]
add rdi, 1Ch; this
lea rsi, _ZL12write_buffer; WriteBuffer *
call _ZNK12VoxelStorage9serializeER11WriteBuffer; VoxelStorage::serialize(WriteBuffer &)
mov esi, [rbp+var_C]; unsigned int
lea rdi, _ZL12write_buffer; this
call _ZNK11WriteBuffer9to_packetEj; WriteBuffer::to_packet(uint)
add rsp, 10h
pop rbp
retn
| long long protocol::encode(protocol *this, const protocol::ChunkVoxels *a2)
{
WriteBuffer::reset((WriteBuffer *)&write_buffer);
WriteBuffer::write_UI16((WriteBuffer *)&write_buffer, 5u);
WriteBuffer::write_I32((WriteBuffer *)&write_buffer, *((_DWORD *)this + 4));
WriteBuffer::write_I32((WriteBuffer *)&write_buffer, *((_DWORD *)this + 5));
WriteBuffer::write_I32((WriteBuffer *)&write_buffer, *((_DWORD *)this + 6));
VoxelStorage::serialize((protocol *)((char *)this + 28), (WriteBuffer *)&write_buffer);
return WriteBuffer::to_packet((WriteBuffer *)&write_buffer, (unsigned int)a2);
}
| encode:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
LEA RDI,[0x3d1998]
CALL 0x001f28f0
LEA RDI,[0x3d1998]
MOV ESI,0x5
CALL 0x001f2940
MOV RAX,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RAX + 0x10]
LEA RDI,[0x3d1998]
CALL 0x001bef30
MOV RAX,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RAX + 0x14]
LEA RDI,[0x3d1998]
CALL 0x001bef30
MOV RAX,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RAX + 0x18]
LEA RDI,[0x3d1998]
CALL 0x001bef30
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x1c
LEA RSI,[0x3d1998]
CALL 0x001ecf60
MOV ESI,dword ptr [RBP + -0xc]
LEA RDI,[0x3d1998]
CALL 0x001f2d50
ADD RSP,0x10
POP RBP
RET
|
/* protocol::encode(protocol::ChunkVoxels const&, unsigned int) */
void protocol::encode(ChunkVoxels *param_1,uint param_2)
{
WriteBuffer::reset((WriteBuffer *)write_buffer);
WriteBuffer::write_UI16((WriteBuffer *)write_buffer,5);
WriteBuffer::write_I32((WriteBuffer *)write_buffer,*(int *)(param_1 + 0x10));
WriteBuffer::write_I32((WriteBuffer *)write_buffer,*(int *)(param_1 + 0x14));
WriteBuffer::write_I32((WriteBuffer *)write_buffer,*(int *)(param_1 + 0x18));
VoxelStorage::serialize((VoxelStorage *)(param_1 + 0x1c),(WriteBuffer *)write_buffer);
WriteBuffer::to_packet((WriteBuffer *)write_buffer,param_2);
return;
}
| |
26,519 | mi_reset | eloqsql/storage/myisam/mi_extra.c | int mi_reset(MI_INFO *info)
{
int error= 0;
MYISAM_SHARE *share=info->s;
DBUG_ENTER("mi_reset");
/*
Free buffers and reset the following flags:
EXTRA_CACHE, EXTRA_WRITE_CACHE, EXTRA_KEYREAD, EXTRA_QUICK
If the row buffer cache is large (for dynamic tables), reduce it
to save memory.
*/
if (info->opt_flag & (READ_CACHE_USED | WRITE_CACHE_USED))
{
info->opt_flag&= ~(READ_CACHE_USED | WRITE_CACHE_USED);
error= end_io_cache(&info->rec_cache);
}
if (share->base.blobs)
mi_alloc_rec_buff(info, -1, &info->rec_buff);
#if defined(HAVE_MMAP) && defined(HAVE_MADVISE)
if (info->opt_flag & MEMMAP_USED)
madvise((char*) share->file_map, share->state.state.data_file_length,
MADV_RANDOM);
#endif
info->opt_flag&= ~(KEY_READ_USED | REMEMBER_OLD_POS);
info->quick_mode=0;
info->lastinx= 0; /* Use first index as def */
info->last_search_keypage= info->lastpos= HA_OFFSET_ERROR;
info->page_changed= 1;
info->update= ((info->update & HA_STATE_CHANGED) | HA_STATE_NEXT_FOUND |
HA_STATE_PREV_FOUND);
DBUG_RETURN(error);
} | O3 | c | mi_reset:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r15
movl 0x1c8(%rdi), %eax
testb $0x12, %al
je 0x4b042
andl $-0x13, %eax
movl %eax, 0x1c8(%rbx)
leaq 0x220(%rbx), %rdi
callq 0x5187b
movl %eax, %r14d
jmp 0x4b045
xorl %r14d, %r14d
cmpl $0x0, 0x188(%r15)
je 0x4b065
leaq 0x120(%rbx), %rdx
movq %rbx, %rdi
movq $-0x1, %rsi
callq 0x37ae5
movl 0x1c8(%rbx), %eax
testb $0x20, %al
je 0x4b08a
movq 0x270(%r15), %rdi
movq 0x40(%r15), %rsi
movl $0x1, %edx
callq 0x28450
movl 0x1c8(%rbx), %eax
andl $-0x49, %eax
movl %eax, 0x1c8(%rbx)
movw $0x100, 0x33b(%rbx) # imm = 0x100
movl $0x0, 0x1d4(%rbx)
movq $-0x1, %rax
movq %rax, 0x170(%rbx)
movq %rax, 0x198(%rbx)
movl 0x1d0(%rbx), %eax
andl $0x1, %eax
orl $0x30, %eax
movl %eax, 0x1d0(%rbx)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| mi_reset:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov r15, [rdi]
mov eax, [rdi+1C8h]
test al, 12h
jz short loc_4B042
and eax, 0FFFFFFEDh
mov [rbx+1C8h], eax
lea rdi, [rbx+220h]
call end_io_cache
mov r14d, eax
jmp short loc_4B045
loc_4B042:
xor r14d, r14d
loc_4B045:
cmp dword ptr [r15+188h], 0
jz short loc_4B065
lea rdx, [rbx+120h]
mov rdi, rbx
mov rsi, 0FFFFFFFFFFFFFFFFh
call mi_alloc_rec_buff
loc_4B065:
mov eax, [rbx+1C8h]
test al, 20h
jz short loc_4B08A
mov rdi, [r15+270h]
mov rsi, [r15+40h]
mov edx, 1
call _madvise
mov eax, [rbx+1C8h]
loc_4B08A:
and eax, 0FFFFFFB7h
mov [rbx+1C8h], eax
mov word ptr [rbx+33Bh], 100h
mov dword ptr [rbx+1D4h], 0
mov rax, 0FFFFFFFFFFFFFFFFh
mov [rbx+170h], rax
mov [rbx+198h], rax
mov eax, [rbx+1D0h]
and eax, 1
or eax, 30h
mov [rbx+1D0h], eax
mov eax, r14d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long mi_reset(long long a1)
{
long long v1; // r15
int v2; // eax
unsigned int v3; // r14d
int v4; // eax
v1 = *(_QWORD *)a1;
v2 = *(_DWORD *)(a1 + 456);
if ( (v2 & 0x12) != 0 )
{
*(_DWORD *)(a1 + 456) = v2 & 0xFFFFFFED;
v3 = end_io_cache(a1 + 544);
}
else
{
v3 = 0;
}
if ( *(_DWORD *)(v1 + 392) )
mi_alloc_rec_buff((long long *)a1, 0xFFFFFFFFFFFFFFFFLL, (_QWORD *)(a1 + 288));
v4 = *(_DWORD *)(a1 + 456);
if ( (v4 & 0x20) != 0 )
{
madvise(*(_QWORD *)(v1 + 624), *(_QWORD *)(v1 + 64), 1LL);
v4 = *(_DWORD *)(a1 + 456);
}
*(_DWORD *)(a1 + 456) = v4 & 0xFFFFFFB7;
*(_WORD *)(a1 + 827) = 256;
*(_DWORD *)(a1 + 468) = 0;
*(_QWORD *)(a1 + 368) = -1LL;
*(_QWORD *)(a1 + 408) = -1LL;
*(_DWORD *)(a1 + 464) = *(_DWORD *)(a1 + 464) & 1 | 0x30;
return v3;
}
| mi_reset:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R15,qword ptr [RDI]
MOV EAX,dword ptr [RDI + 0x1c8]
TEST AL,0x12
JZ 0x0014b042
AND EAX,0xffffffed
MOV dword ptr [RBX + 0x1c8],EAX
LEA RDI,[RBX + 0x220]
CALL 0x0015187b
MOV R14D,EAX
JMP 0x0014b045
LAB_0014b042:
XOR R14D,R14D
LAB_0014b045:
CMP dword ptr [R15 + 0x188],0x0
JZ 0x0014b065
LEA RDX,[RBX + 0x120]
MOV RDI,RBX
MOV RSI,-0x1
CALL 0x00137ae5
LAB_0014b065:
MOV EAX,dword ptr [RBX + 0x1c8]
TEST AL,0x20
JZ 0x0014b08a
MOV RDI,qword ptr [R15 + 0x270]
MOV RSI,qword ptr [R15 + 0x40]
MOV EDX,0x1
CALL 0x00128450
MOV EAX,dword ptr [RBX + 0x1c8]
LAB_0014b08a:
AND EAX,0xffffffb7
MOV dword ptr [RBX + 0x1c8],EAX
MOV word ptr [RBX + 0x33b],0x100
MOV dword ptr [RBX + 0x1d4],0x0
MOV RAX,-0x1
MOV qword ptr [RBX + 0x170],RAX
MOV qword ptr [RBX + 0x198],RAX
MOV EAX,dword ptr [RBX + 0x1d0]
AND EAX,0x1
OR EAX,0x30
MOV dword ptr [RBX + 0x1d0],EAX
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int4 mi_reset(long *param_1)
{
long lVar1;
int4 uVar2;
uint uVar3;
lVar1 = *param_1;
if ((*(uint *)(param_1 + 0x39) & 0x12) == 0) {
uVar2 = 0;
}
else {
*(uint *)(param_1 + 0x39) = *(uint *)(param_1 + 0x39) & 0xffffffed;
uVar2 = end_io_cache(param_1 + 0x44);
}
if (*(int *)(lVar1 + 0x188) != 0) {
mi_alloc_rec_buff(param_1,0xffffffffffffffff,param_1 + 0x24);
}
uVar3 = *(uint *)(param_1 + 0x39);
if ((uVar3 & 0x20) != 0) {
madvise(*(void **)(lVar1 + 0x270),*(size_t *)(lVar1 + 0x40),1);
uVar3 = *(uint *)(param_1 + 0x39);
}
*(uint *)(param_1 + 0x39) = uVar3 & 0xffffffb7;
*(int2 *)((long)param_1 + 0x33b) = 0x100;
*(int4 *)((long)param_1 + 0x1d4) = 0;
param_1[0x2e] = -1;
param_1[0x33] = -1;
*(uint *)(param_1 + 0x3a) = *(uint *)(param_1 + 0x3a) & 1 | 0x30;
return uVar2;
}
| |
26,520 | inline_mysql_cond_signal | eloqsql/include/mysql/psi/mysql_thread.h | static inline int inline_mysql_cond_signal(
mysql_cond_t *that)
{
int result;
#ifdef HAVE_PSI_COND_INTERFACE
if (psi_likely(that->m_psi != NULL))
PSI_COND_CALL(signal_cond)(that->m_psi);
#endif
result= pthread_cond_signal(&that->m_cond);
return result;
} | O0 | c | inline_mysql_cond_signal:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x30(%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 0x48a1b
leaq 0x282ad9(%rip), %rax # 0x2cb4e0
movq (%rax), %rax
movq 0x170(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rdi
callq *%rax
movq -0x8(%rbp), %rdi
callq 0x2a5f0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
| inline_mysql_cond_signal_0:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
cmp qword ptr [rax+30h], 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_48A1B
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+170h]
mov rcx, [rbp+var_8]
mov rdi, [rcx+30h]
call rax
loc_48A1B:
mov rdi, [rbp+var_8]
call _pthread_cond_signal
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
add rsp, 10h
pop rbp
retn
| long long inline_mysql_cond_signal_0(long long a1)
{
if ( *(_QWORD *)(a1 + 48) )
((void ( *)(_QWORD))PSI_server[46])(*(_QWORD *)(a1 + 48));
return (unsigned int)pthread_cond_signal(a1);
}
| inline_mysql_cond_signal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x30],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00148a1b
LEA RAX,[0x3cb4e0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x170]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x30]
CALL RAX
LAB_00148a1b:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0012a5f0
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
ADD RSP,0x10
POP RBP
RET
|
int inline_mysql_cond_signal(pthread_cond_t *param_1)
{
int iVar1;
if (param_1[1].__align != 0) {
(**(code **)(PSI_server + 0x170))(param_1[1].__align);
}
iVar1 = pthread_cond_signal(param_1);
return iVar1;
}
| |
26,521 | qdevtools::MethodView::MethodView(QWidget*) | HuaiminNotSleepYet[P]QDevTools/qdevtools.cpp | MethodView::MethodView(QWidget* parent) : QWidget(parent), object_(nullptr)
{
auto layout = new QGridLayout;
layout->setContentsMargins(0, 0, 0, 0);
layout->setColumnStretch(4, 1);
setLayout(layout);
} | O0 | cpp | qdevtools::MethodView::MethodView(QWidget*):
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0x14(%rbp), %rdi
callq 0x1add0
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdi
movl -0x14(%rbp), %edx
callq 0xf760
movq -0x40(%rbp), %rax
leaq 0x3a62c(%rip), %rcx # 0x4fcb0
movq %rcx, %rdx
addq $0x10, %rdx
movq %rdx, (%rax)
addq $0x1c0, %rcx # imm = 0x1C0
movq %rcx, 0x10(%rax)
movq $0x0, 0x28(%rax)
movl $0x20, %edi
callq 0xf910
movq %rax, -0x38(%rbp)
jmp 0x156b1
movq -0x38(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xf030
jmp 0x156c0
movq -0x38(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
xorl %r8d, %r8d
movl %r8d, %esi
movl %r8d, %edx
movl %r8d, %ecx
callq 0xf850
jmp 0x156df
movq -0x20(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0xfc90
jmp 0x156f4
movq -0x40(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xf430
jmp 0x15703
addq $0x50, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x15731
movq -0x38(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
movl $0x20, %esi
callq 0xf0d0
movq -0x40(%rbp), %rdi
callq 0xf340
movq -0x28(%rbp), %rdi
callq 0xf410
nopw %cs:(%rax,%rax)
| _ZN9qdevtools10MethodViewC2EP7QWidget:
push rbp; Alternative name is 'qdevtools::MethodView::MethodView(QWidget *)'
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_40], rax
mov rax, [rbp+var_10]
mov [rbp+var_48], rax
lea rdi, [rbp+var_14]
call _ZN6QFlagsIN2Qt10WindowTypeEEC2Ev; QFlags<Qt::WindowType>::QFlags(void)
mov rsi, [rbp+var_48]
mov rdi, [rbp+var_40]
mov edx, [rbp+var_14]
call __ZN7QWidgetC2EPS_6QFlagsIN2Qt10WindowTypeEE; QWidget::QWidget(QWidget*,QFlags<Qt::WindowType>)
mov rax, [rbp+var_40]
lea rcx, _ZTVN9qdevtools10MethodViewE; `vtable for'qdevtools::MethodView
mov rdx, rcx
add rdx, 10h
mov [rax], rdx
add rcx, 1C0h
mov [rax+10h], rcx
mov qword ptr [rax+28h], 0
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
mov [rbp+var_38], rax
jmp short $+2
loc_156B1:
mov rdi, [rbp+var_38]; this
xor eax, eax
mov esi, eax; QWidget *
call __ZN11QGridLayoutC1EP7QWidget; QGridLayout::QGridLayout(QWidget *)
jmp short $+2
loc_156C0:
mov rax, [rbp+var_38]
mov [rbp+var_20], rax
mov rdi, [rbp+var_20]; this
xor r8d, r8d; int
mov esi, r8d; int
mov edx, r8d; int
mov ecx, r8d; int
call __ZN7QLayout18setContentsMarginsEiiii; QLayout::setContentsMargins(int,int,int,int)
jmp short $+2
loc_156DF:
mov rdi, [rbp+var_20]; this
mov esi, 4; int
mov edx, 1; int
call __ZN11QGridLayout16setColumnStretchEii; QGridLayout::setColumnStretch(int,int)
jmp short $+2
loc_156F4:
mov rdi, [rbp+var_40]; this
mov rsi, [rbp+var_20]; QLayout *
call __ZN7QWidget9setLayoutEP7QLayout; QWidget::setLayout(QLayout *)
jmp short $+2
loc_15703:
add rsp, 50h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_28], rcx
mov [rbp+var_2C], eax
jmp short loc_15731
mov rdi, [rbp+var_38]; void *
mov rcx, rax
mov eax, edx
mov [rbp+var_28], rcx
mov [rbp+var_2C], eax
mov esi, 20h ; ' '; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_15731:
mov rdi, [rbp+var_40]; this
call __ZN7QWidgetD2Ev; QWidget::~QWidget()
mov rdi, [rbp+var_28]
call __Unwind_Resume
| long long qdevtools::MethodView::MethodView(qdevtools::MethodView *this, QWidget *a2)
{
QGridLayout *v3; // [rsp+18h] [rbp-38h]
unsigned int v4; // [rsp+3Ch] [rbp-14h] BYREF
QWidget *v5; // [rsp+40h] [rbp-10h]
qdevtools::MethodView *v6; // [rsp+48h] [rbp-8h]
v6 = this;
v5 = a2;
QFlags<Qt::WindowType>::QFlags(&v4);
QWidget::QWidget(this, a2, v4);
*(_QWORD *)this = &`vtable for'qdevtools::MethodView + 2;
*((_QWORD *)this + 2) = &`vtable for'qdevtools::MethodView + 56;
*((_QWORD *)this + 5) = 0LL;
v3 = (QGridLayout *)operator new(0x20uLL);
QGridLayout::QGridLayout(v3, 0LL);
QLayout::setContentsMargins(v3, 0, 0, 0, 0);
QGridLayout::setColumnStretch(v3, 4, 1);
return QWidget::setLayout(this, v3);
}
| MethodView:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x48],RAX
LEA RDI,[RBP + -0x14]
CALL 0x0011add0
MOV RSI,qword ptr [RBP + -0x48]
MOV RDI,qword ptr [RBP + -0x40]
MOV EDX,dword ptr [RBP + -0x14]
CALL 0x0010f760
MOV RAX,qword ptr [RBP + -0x40]
LEA RCX,[0x14fcb0]
MOV RDX,RCX
ADD RDX,0x10
MOV qword ptr [RAX],RDX
ADD RCX,0x1c0
MOV qword ptr [RAX + 0x10],RCX
MOV qword ptr [RAX + 0x28],0x0
LAB_001156a1:
MOV EDI,0x20
CALL 0x0010f910
MOV qword ptr [RBP + -0x38],RAX
JMP 0x001156b1
LAB_001156b1:
MOV RDI,qword ptr [RBP + -0x38]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0010f030
JMP 0x001156c0
LAB_001156c0:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x20]
LAB_001156cc:
XOR R8D,R8D
MOV ESI,R8D
MOV EDX,R8D
MOV ECX,R8D
CALL 0x0010f850
JMP 0x001156df
LAB_001156df:
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,0x4
MOV EDX,0x1
CALL 0x0010fc90
JMP 0x001156f4
LAB_001156f4:
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x0010f430
LAB_00115701:
JMP 0x00115703
LAB_00115703:
ADD RSP,0x50
POP RBP
RET
|
/* qdevtools::MethodView::MethodView(QWidget*) */
void __thiscall qdevtools::MethodView::MethodView(MethodView *this,QWidget *param_1)
{
QGridLayout *this_00;
int4 local_1c;
QWidget *local_18;
MethodView *local_10;
local_18 = param_1;
local_10 = this;
QFlags<Qt::WindowType>::QFlags((QFlags<Qt::WindowType> *)&local_1c);
QWidget::QWidget((QWidget *)this,param_1,local_1c);
*(int ***)this = &PTR_metaObject_0014fcc0;
*(int ***)(this + 0x10) = &PTR__MethodView_0014fe70;
*(int8 *)(this + 0x28) = 0;
/* try { // try from 001156a1 to 001156aa has its CatchHandler @ 00115709 */
this_00 = (QGridLayout *)operator_new(0x20);
/* try { // try from 001156b1 to 001156bd has its CatchHandler @ 00115717 */
QGridLayout::QGridLayout(this_00,(QWidget *)0x0);
/* try { // try from 001156cc to 00115700 has its CatchHandler @ 00115709 */
QLayout::setContentsMargins((int)this_00,0,0,0);
QGridLayout::setColumnStretch((int)this_00,4);
QWidget::setLayout((QLayout *)this);
return;
}
| |
26,522 | qdevtools::MethodView::MethodView(QWidget*) | HuaiminNotSleepYet[P]QDevTools/qdevtools.cpp | MethodView::MethodView(QWidget* parent) : QWidget(parent), object_(nullptr)
{
auto layout = new QGridLayout;
layout->setContentsMargins(0, 0, 0, 0);
layout->setColumnStretch(4, 1);
setLayout(layout);
} | O1 | cpp | qdevtools::MethodView::MethodView(QWidget*):
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %edx, %edx
callq 0xf760
leaq 0x19c26(%rip), %rax # 0x2cce0
leaq 0x10(%rax), %rcx
movq %rcx, (%rbx)
addq $0x1c0, %rax # imm = 0x1C0
movq %rax, 0x10(%rbx)
movq $0x0, 0x28(%rbx)
movl $0x20, %edi
callq 0xf910
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
callq 0xf030
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xf850
movq %r14, %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0xfc70
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf430
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r15
movl $0x20, %esi
movq %r14, %rdi
callq 0xf0d0
jmp 0x13133
movq %rax, %r15
movq %rbx, %rdi
callq 0xf340
movq %r15, %rdi
callq 0xf410
nop
| _ZN9qdevtools10MethodViewC2EP7QWidget:
push r15; Alternative name is 'qdevtools::MethodView::MethodView(QWidget *)'
push r14
push rbx
mov rbx, rdi
xor edx, edx
call __ZN7QWidgetC2EPS_6QFlagsIN2Qt10WindowTypeEE; QWidget::QWidget(QWidget*,QFlags<Qt::WindowType>)
lea rax, _ZTVN9qdevtools10MethodViewE; `vtable for'qdevtools::MethodView
lea rcx, [rax+10h]
mov [rbx], rcx
add rax, 1C0h
mov [rbx+10h], rax
mov qword ptr [rbx+28h], 0
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
mov rdi, rax; this
xor esi, esi; QWidget *
call __ZN11QGridLayoutC1EP7QWidget; QGridLayout::QGridLayout(QWidget *)
mov rdi, r14; this
xor esi, esi; int
xor edx, edx; int
xor ecx, ecx; int
xor r8d, r8d; int
call __ZN7QLayout18setContentsMarginsEiiii; QLayout::setContentsMargins(int,int,int,int)
mov rdi, r14; this
mov esi, 4; int
mov edx, 1; int
call __ZN11QGridLayout16setColumnStretchEii; QGridLayout::setColumnStretch(int,int)
mov rdi, rbx; this
mov rsi, r14; QLayout *
call __ZN7QWidget9setLayoutEP7QLayout; QWidget::setLayout(QLayout *)
pop rbx
pop r14
pop r15
retn
mov r15, rax
mov esi, 20h ; ' '; unsigned __int64
mov rdi, r14; void *
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_13133
mov r15, rax
loc_13133:
mov rdi, rbx; this
call __ZN7QWidgetD2Ev; QWidget::~QWidget()
mov rdi, r15
call __Unwind_Resume
| long long qdevtools::MethodView::MethodView(qdevtools::MethodView *this, QWidget *a2)
{
QGridLayout *v2; // r14
QWidget::QWidget(this, a2, 0LL);
*(_QWORD *)this = &`vtable for'qdevtools::MethodView + 2;
*((_QWORD *)this + 2) = &`vtable for'qdevtools::MethodView + 56;
*((_QWORD *)this + 5) = 0LL;
v2 = (QGridLayout *)operator new(0x20uLL);
QGridLayout::QGridLayout(v2, 0LL);
QLayout::setContentsMargins(v2, 0, 0, 0, 0);
QGridLayout::setColumnStretch(v2, 4, 1);
return QWidget::setLayout(this, v2);
}
| MethodView:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
XOR EDX,EDX
CALL 0x0010f760
LEA RAX,[0x12cce0]
LEA RCX,[RAX + 0x10]
MOV qword ptr [RBX],RCX
ADD RAX,0x1c0
MOV qword ptr [RBX + 0x10],RAX
MOV qword ptr [RBX + 0x28],0x0
LAB_001130d3:
MOV EDI,0x20
CALL 0x0010f910
LAB_001130dd:
MOV R14,RAX
MOV RDI,RAX
XOR ESI,ESI
CALL 0x0010f030
LAB_001130ea:
MOV RDI,R14
XOR ESI,ESI
XOR EDX,EDX
XOR ECX,ECX
XOR R8D,R8D
CALL 0x0010f850
MOV RDI,R14
MOV ESI,0x4
MOV EDX,0x1
CALL 0x0010fc70
MOV RDI,RBX
MOV RSI,R14
CALL 0x0010f430
LAB_00113118:
POP RBX
POP R14
POP R15
RET
|
/* qdevtools::MethodView::MethodView(QWidget*) */
void __thiscall qdevtools::MethodView::MethodView(MethodView *this,QWidget *param_1)
{
QGridLayout *this_00;
QWidget::QWidget((QWidget *)this,param_1,0);
*(int ***)this = &PTR_metaObject_0012ccf0;
*(int ***)(this + 0x10) = &PTR__MethodView_0012cea0;
*(int8 *)(this + 0x28) = 0;
/* try { // try from 001130d3 to 001130dc has its CatchHandler @ 00113130 */
this_00 = (QGridLayout *)operator_new(0x20);
/* try { // try from 001130dd to 001130e9 has its CatchHandler @ 0011311e */
QGridLayout::QGridLayout(this_00,(QWidget *)0x0);
/* try { // try from 001130ea to 00113117 has its CatchHandler @ 00113130 */
QLayout::setContentsMargins((int)this_00,0,0,0);
QGridLayout::setColumnStretch((int)this_00,4);
QWidget::setLayout((QLayout *)this);
return;
}
| |
26,523 | qdevtools::MethodView::MethodView(QWidget*) | HuaiminNotSleepYet[P]QDevTools/qdevtools.cpp | MethodView::MethodView(QWidget* parent) : QWidget(parent), object_(nullptr)
{
auto layout = new QGridLayout;
layout->setContentsMargins(0, 0, 0, 0);
layout->setColumnStretch(4, 1);
setLayout(layout);
} | O2 | cpp | qdevtools::MethodView::MethodView(QWidget*):
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %edx, %edx
callq 0xf760
leaq 0x198b8(%rip), %rax # 0x2bce0
leaq 0x10(%rax), %rcx
movq %rcx, (%rbx)
addq $0x1c0, %rax # imm = 0x1C0
movq %rax, 0x10(%rbx)
andq $0x0, 0x28(%rbx)
pushq $0x20
popq %rdi
callq 0xf920
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
callq 0xf030
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xf850
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
movq %r14, %rdi
callq 0xfca0
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf430
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r15
pushq $0x20
popq %rsi
movq %r14, %rdi
callq 0xf0d0
jmp 0x12496
movq %rax, %r15
movq %rbx, %rdi
callq 0xf340
movq %r15, %rdi
callq 0xf410
| _ZN9qdevtools10MethodViewC2EP7QWidget:
push r15; Alternative name is 'qdevtools::MethodView::MethodView(QWidget *)'
push r14
push rbx
mov rbx, rdi
xor edx, edx
call __ZN7QWidgetC2EPS_6QFlagsIN2Qt10WindowTypeEE; QWidget::QWidget(QWidget*,QFlags<Qt::WindowType>)
lea rax, _ZTVN9qdevtools10MethodViewE; `vtable for'qdevtools::MethodView
lea rcx, [rax+10h]
mov [rbx], rcx
add rax, 1C0h
mov [rbx+10h], rax
and qword ptr [rbx+28h], 0
push 20h ; ' '
pop rdi; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
mov rdi, rax; this
xor esi, esi; QWidget *
call __ZN11QGridLayoutC1EP7QWidget; QGridLayout::QGridLayout(QWidget *)
mov rdi, r14; this
xor esi, esi; int
xor edx, edx; int
xor ecx, ecx; int
xor r8d, r8d; int
call __ZN7QLayout18setContentsMarginsEiiii; QLayout::setContentsMargins(int,int,int,int)
push 4
pop rsi; int
push 1
pop rdx; int
mov rdi, r14; this
call __ZN11QGridLayout16setColumnStretchEii; QGridLayout::setColumnStretch(int,int)
mov rdi, rbx; this
mov rsi, r14; QLayout *
call __ZN7QWidget9setLayoutEP7QLayout; QWidget::setLayout(QLayout *)
pop rbx
pop r14
pop r15
retn
mov r15, rax
push 20h ; ' '
pop rsi; unsigned __int64
mov rdi, r14; void *
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_12496
mov r15, rax
loc_12496:
mov rdi, rbx; this
call __ZN7QWidgetD2Ev; QWidget::~QWidget()
mov rdi, r15
call __Unwind_Resume
| long long qdevtools::MethodView::MethodView(qdevtools::MethodView *this, QWidget *a2)
{
QGridLayout *v2; // r14
QWidget::QWidget(this, a2, 0LL);
*(_QWORD *)this = &`vtable for'qdevtools::MethodView + 2;
*((_QWORD *)this + 2) = &`vtable for'qdevtools::MethodView + 56;
*((_QWORD *)this + 5) = 0LL;
v2 = (QGridLayout *)operator new(0x20uLL);
QGridLayout::QGridLayout(v2, 0LL);
QLayout::setContentsMargins(v2, 0, 0, 0, 0);
QGridLayout::setColumnStretch(v2, 4, 1);
return QWidget::setLayout(this, v2);
}
| MethodView:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
XOR EDX,EDX
CALL 0x0010f760
LEA RAX,[0x12bce0]
LEA RCX,[RAX + 0x10]
MOV qword ptr [RBX],RCX
ADD RAX,0x1c0
MOV qword ptr [RBX + 0x10],RAX
AND qword ptr [RBX + 0x28],0x0
LAB_0011243e:
PUSH 0x20
POP RDI
CALL 0x0010f920
LAB_00112446:
MOV R14,RAX
MOV RDI,RAX
XOR ESI,ESI
CALL 0x0010f030
LAB_00112453:
MOV RDI,R14
XOR ESI,ESI
XOR EDX,EDX
XOR ECX,ECX
XOR R8D,R8D
CALL 0x0010f850
PUSH 0x4
POP RSI
PUSH 0x1
POP RDX
MOV RDI,R14
CALL 0x0010fca0
MOV RDI,RBX
MOV RSI,R14
CALL 0x0010f430
LAB_0011247d:
POP RBX
POP R14
POP R15
RET
|
/* qdevtools::MethodView::MethodView(QWidget*) */
void __thiscall qdevtools::MethodView::MethodView(MethodView *this,QWidget *param_1)
{
QGridLayout *this_00;
QWidget::QWidget((QWidget *)this,param_1,0);
*(int ***)this = &PTR_metaObject_0012bcf0;
*(int ***)(this + 0x10) = &PTR__MethodView_0012bea0;
*(int8 *)(this + 0x28) = 0;
/* try { // try from 0011243e to 00112445 has its CatchHandler @ 00112493 */
this_00 = (QGridLayout *)operator_new(0x20);
/* try { // try from 00112446 to 00112452 has its CatchHandler @ 00112483 */
QGridLayout::QGridLayout(this_00,(QWidget *)0x0);
/* try { // try from 00112453 to 0011247c has its CatchHandler @ 00112493 */
QLayout::setContentsMargins((int)this_00,0,0,0);
QGridLayout::setColumnStretch((int)this_00,4);
QWidget::setLayout((QLayout *)this);
return;
}
| |
26,524 | move_to_next_bitmap | eloqsql/storage/maria/ma_bitmap.c | static my_bool move_to_next_bitmap(MARIA_HA *info, MARIA_FILE_BITMAP *bitmap)
{
pgcache_page_no_t page= bitmap->page;
MARIA_STATE_INFO *state= &info->s->state;
DBUG_ENTER("move_to_next_bitmap");
if (state->first_bitmap_with_space != ~(pgcache_page_no_t) 0 &&
state->first_bitmap_with_space != page)
{
page= state->first_bitmap_with_space;
state->first_bitmap_with_space= ~(pgcache_page_no_t) 0;
DBUG_ASSERT(page % bitmap->pages_covered == 0);
}
else
{
page+= bitmap->pages_covered;
DBUG_ASSERT(page % bitmap->pages_covered == 0);
}
DBUG_RETURN(_ma_change_bitmap_page(info, bitmap, page));
} | O0 | c | move_to_next_bitmap:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq $-0x1, 0xd0(%rax)
je 0x3e348
movq -0x20(%rbp), %rax
movq 0xd0(%rax), %rax
cmpq -0x18(%rbp), %rax
je 0x3e348
movq -0x20(%rbp), %rax
movq 0xd0(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
movq $-0x1, 0xd0(%rax)
jmp 0x3e346
jmp 0x3e35f
movq -0x10(%rbp), %rax
movq 0x138(%rax), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x3e35d
jmp 0x3e35f
jmp 0x3e361
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x3ca40
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nop
| move_to_next_bitmap:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov [rbp+var_18], rax
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
cmp qword ptr [rax+0D0h], 0FFFFFFFFFFFFFFFFh
jz short loc_3E348
mov rax, [rbp+var_20]
mov rax, [rax+0D0h]
cmp rax, [rbp+var_18]
jz short loc_3E348
mov rax, [rbp+var_20]
mov rax, [rax+0D0h]
mov [rbp+var_18], rax
mov rax, [rbp+var_20]
mov qword ptr [rax+0D0h], 0FFFFFFFFFFFFFFFFh
jmp short $+2
loc_3E346:
jmp short loc_3E35F
loc_3E348:
mov rax, [rbp+var_10]
mov rax, [rax+138h]
add rax, [rbp+var_18]
mov [rbp+var_18], rax
jmp short $+2
loc_3E35D:
jmp short $+2
loc_3E35F:
jmp short $+2
loc_3E361:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call _ma_change_bitmap_page
mov [rbp+var_21], al
mov al, [rbp+var_21]
add rsp, 30h
pop rbp
retn
| char move_to_next_bitmap(long long *a1, long long a2)
{
long long v3; // [rsp+10h] [rbp-20h]
long long v4; // [rsp+18h] [rbp-18h]
long long v5; // [rsp+18h] [rbp-18h]
v4 = *(_QWORD *)(a2 + 16);
v3 = *a1;
if ( *(_QWORD *)(*a1 + 208) == -1LL || *(_QWORD *)(v3 + 208) == v4 )
{
v5 = v4 + *(_QWORD *)(a2 + 312);
}
else
{
v5 = *(_QWORD *)(v3 + 208);
*(_QWORD *)(v3 + 208) = -1LL;
}
return ma_change_bitmap_page(a1, a2, v5);
}
| move_to_next_bitmap:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX + 0xd0],-0x1
JZ 0x0013e348
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0xd0]
CMP RAX,qword ptr [RBP + -0x18]
JZ 0x0013e348
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0xd0]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0xd0],-0x1
JMP 0x0013e346
LAB_0013e346:
JMP 0x0013e35f
LAB_0013e348:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x138]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0013e35d
LAB_0013e35d:
JMP 0x0013e35f
LAB_0013e35f:
JMP 0x0013e361
LAB_0013e361:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x0013ca40
MOV byte ptr [RBP + -0x21],AL
MOV AL,byte ptr [RBP + -0x21]
ADD RSP,0x30
POP RBP
RET
|
int8 move_to_next_bitmap(long *param_1,long param_2)
{
long lVar1;
int8 uVar2;
int8 local_20;
lVar1 = *param_1;
if ((*(long *)(lVar1 + 0xd0) == -1) || (*(long *)(lVar1 + 0xd0) == *(long *)(param_2 + 0x10))) {
local_20 = *(long *)(param_2 + 0x138) + *(long *)(param_2 + 0x10);
}
else {
local_20 = *(long *)(lVar1 + 0xd0);
*(int8 *)(lVar1 + 0xd0) = 0xffffffffffffffff;
}
uVar2 = _ma_change_bitmap_page(param_1,param_2,local_20);
return uVar2;
}
| |
26,525 | void nlohmann::json_abi_v3_11_3::detail::serializer<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>>::dump_integer<long, 0>(long) | monkey531[P]llama/common/json.hpp | void dump_integer(NumberType x)
{
static constexpr std::array<std::array<char, 2>, 100> digits_to_99
{
{
{{'0', '0'}}, {{'0', '1'}}, {{'0', '2'}}, {{'0', '3'}}, {{'0', '4'}}, {{'0', '5'}}, {{'0', '6'}}, {{'0', '7'}}, {{'0', '8'}}, {{'0', '9'}},
{{'1', '0'}}, {{'1', '1'}}, {{'1', '2'}}, {{'1', '3'}}, {{'1', '4'}}, {{'1', '5'}}, {{'1', '6'}}, {{'1', '7'}}, {{'1', '8'}}, {{'1', '9'}},
{{'2', '0'}}, {{'2', '1'}}, {{'2', '2'}}, {{'2', '3'}}, {{'2', '4'}}, {{'2', '5'}}, {{'2', '6'}}, {{'2', '7'}}, {{'2', '8'}}, {{'2', '9'}},
{{'3', '0'}}, {{'3', '1'}}, {{'3', '2'}}, {{'3', '3'}}, {{'3', '4'}}, {{'3', '5'}}, {{'3', '6'}}, {{'3', '7'}}, {{'3', '8'}}, {{'3', '9'}},
{{'4', '0'}}, {{'4', '1'}}, {{'4', '2'}}, {{'4', '3'}}, {{'4', '4'}}, {{'4', '5'}}, {{'4', '6'}}, {{'4', '7'}}, {{'4', '8'}}, {{'4', '9'}},
{{'5', '0'}}, {{'5', '1'}}, {{'5', '2'}}, {{'5', '3'}}, {{'5', '4'}}, {{'5', '5'}}, {{'5', '6'}}, {{'5', '7'}}, {{'5', '8'}}, {{'5', '9'}},
{{'6', '0'}}, {{'6', '1'}}, {{'6', '2'}}, {{'6', '3'}}, {{'6', '4'}}, {{'6', '5'}}, {{'6', '6'}}, {{'6', '7'}}, {{'6', '8'}}, {{'6', '9'}},
{{'7', '0'}}, {{'7', '1'}}, {{'7', '2'}}, {{'7', '3'}}, {{'7', '4'}}, {{'7', '5'}}, {{'7', '6'}}, {{'7', '7'}}, {{'7', '8'}}, {{'7', '9'}},
{{'8', '0'}}, {{'8', '1'}}, {{'8', '2'}}, {{'8', '3'}}, {{'8', '4'}}, {{'8', '5'}}, {{'8', '6'}}, {{'8', '7'}}, {{'8', '8'}}, {{'8', '9'}},
{{'9', '0'}}, {{'9', '1'}}, {{'9', '2'}}, {{'9', '3'}}, {{'9', '4'}}, {{'9', '5'}}, {{'9', '6'}}, {{'9', '7'}}, {{'9', '8'}}, {{'9', '9'}},
}
};
// special case for "0"
if (x == 0)
{
o->write_character('0');
return;
}
// use a pointer to fill the buffer
auto buffer_ptr = number_buffer.begin(); // NOLINT(llvm-qualified-auto,readability-qualified-auto,cppcoreguidelines-pro-type-vararg,hicpp-vararg)
number_unsigned_t abs_value;
unsigned int n_chars{};
if (is_negative_number(x))
{
*buffer_ptr = '-';
abs_value = remove_sign(static_cast<number_integer_t>(x));
// account one more byte for the minus sign
n_chars = 1 + count_digits(abs_value);
}
else
{
abs_value = static_cast<number_unsigned_t>(x);
n_chars = count_digits(abs_value);
}
// spare 1 byte for '\0'
JSON_ASSERT(n_chars < number_buffer.size() - 1);
// jump to the end to generate the string from backward,
// so we later avoid reversing the result
buffer_ptr += n_chars;
// Fast int2ascii implementation inspired by "Fastware" talk by Andrei Alexandrescu
// See: https://www.youtube.com/watch?v=o4-CwDo2zpg
while (abs_value >= 100)
{
const auto digits_index = static_cast<unsigned>((abs_value % 100));
abs_value /= 100;
*(--buffer_ptr) = digits_to_99[digits_index][1];
*(--buffer_ptr) = digits_to_99[digits_index][0];
}
if (abs_value >= 10)
{
const auto digits_index = static_cast<unsigned>(abs_value);
*(--buffer_ptr) = digits_to_99[digits_index][1];
*(--buffer_ptr) = digits_to_99[digits_index][0];
}
else
{
*(--buffer_ptr) = static_cast<char>('0' + abs_value);
}
o->write_characters(number_buffer.data(), n_chars);
} | O0 | cpp | void nlohmann::json_abi_v3_11_3::detail::serializer<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>>::dump_integer<long, 0>(long):
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x38(%rsp)
jne 0x18d76c
movq 0x10(%rsp), %rdi
callq 0x18c320
movq %rax, %rdi
movq (%rdi), %rax
movl $0x30, %esi
callq *(%rax)
jmp 0x18d9b6
movq 0x10(%rsp), %rdi
addq $0x10, %rdi
callq 0x18e1f0
movq 0x10(%rsp), %rdi
movq %rax, 0x30(%rsp)
movl $0x0, 0x24(%rsp)
movq 0x38(%rsp), %rsi
callq 0x18e4c0
testb $0x1, %al
jne 0x18d79c
jmp 0x18d7d0
movq 0x10(%rsp), %rdi
movq 0x30(%rsp), %rax
movb $0x2d, (%rax)
movq 0x38(%rsp), %rsi
callq 0x18e220
movq 0x10(%rsp), %rdi
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rsi
callq 0x18e2a0
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x18d7ed
movq 0x10(%rsp), %rdi
movq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rsi
callq 0x18e2a0
movl %eax, 0x24(%rsp)
movq 0x10(%rsp), %rdi
movl 0x24(%rsp), %eax
movq %rax, 0x8(%rsp)
addq $0x10, %rdi
callq 0x18e330
movq %rax, %rcx
movq 0x8(%rsp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
jb 0x18d836
leaq 0x7ec53(%rip), %rdi # 0x20c46f
movl $0x4952, %esi # imm = 0x4952
leaq 0x7ec91(%rip), %rdx # 0x20c4b9
leaq 0x8472a(%rip), %rcx # 0x211f59
movb $0x0, %al
callq 0x5aec0
movl 0x24(%rsp), %ecx
movq 0x30(%rsp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, 0x30(%rsp)
cmpq $0x64, 0x28(%rsp)
jb 0x18d8ec
movq 0x28(%rsp), %rax
movl $0x64, %ecx
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, 0x20(%rsp)
movq 0x28(%rsp), %rax
movl $0x64, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, 0x28(%rsp)
movl 0x20(%rsp), %eax
movl %eax, %esi
leaq 0x86cbf(%rip), %rdi # 0x21454a
callq 0x18e340
movq %rax, %rdi
movl $0x1, %esi
callq 0x18e370
movb (%rax), %cl
movq 0x30(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, 0x30(%rsp)
movb %cl, -0x1(%rax)
movl 0x20(%rsp), %eax
movl %eax, %esi
leaq 0x86c8a(%rip), %rdi # 0x21454a
callq 0x18e340
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x18e370
movb (%rax), %cl
movq 0x30(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, 0x30(%rsp)
movb %cl, -0x1(%rax)
jmp 0x18d849
cmpq $0xa, 0x28(%rsp)
jb 0x18d968
movq 0x28(%rsp), %rax
movl %eax, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
movl %eax, %esi
leaq 0x86c40(%rip), %rdi # 0x21454a
callq 0x18e340
movq %rax, %rdi
movl $0x1, %esi
callq 0x18e370
movb (%rax), %cl
movq 0x30(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, 0x30(%rsp)
movb %cl, -0x1(%rax)
movl 0x1c(%rsp), %eax
movl %eax, %esi
leaq 0x86c0b(%rip), %rdi # 0x21454a
callq 0x18e340
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x18e370
movb (%rax), %cl
movq 0x30(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, 0x30(%rsp)
movb %cl, -0x1(%rax)
jmp 0x18d987
movq 0x28(%rsp), %rax
addq $0x30, %rax
movb %al, %cl
movq 0x30(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, 0x30(%rsp)
movb %cl, -0x1(%rax)
movq 0x10(%rsp), %rdi
callq 0x18c320
movq 0x10(%rsp), %rdi
movq %rax, (%rsp)
addq $0x10, %rdi
callq 0x18e3a0
movq (%rsp), %rdi
movq %rax, %rsi
movl 0x24(%rsp), %eax
movl %eax, %edx
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x48, %rsp
retq
nopl (%rax,%rax)
| _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_10], rsi
mov rax, [rsp+48h+var_8]
mov [rsp+48h+var_38], rax
cmp [rsp+48h+var_10], 0
jnz short loc_18D76C
mov rdi, [rsp+48h+var_38]
call _ZNKSt19__shared_ptr_accessIN8nlohmann16json_abi_v3_11_36detail23output_adapter_protocolIcEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, rax
mov rax, [rdi]
mov esi, 30h ; '0'
call qword ptr [rax]
jmp loc_18D9B6
loc_18D76C:
mov rdi, [rsp+48h+var_38]
add rdi, 10h
call _ZNSt5arrayIcLm64EE5beginEv; std::array<char,64ul>::begin(void)
mov rdi, [rsp+48h+var_38]
mov [rsp+48h+var_18], rax
mov [rsp+48h+var_24], 0
mov rsi, [rsp+48h+var_10]
call _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE18is_negative_numberIlTnNSt9enable_ifIXsr3std9is_signedIT_EE5valueEiE4typeELi0EEEbSJ_
test al, 1
jnz short loc_18D79C
jmp short loc_18D7D0
loc_18D79C:
mov rdi, [rsp+48h+var_38]
mov rax, [rsp+48h+var_18]
mov byte ptr [rax], 2Dh ; '-'
mov rsi, [rsp+48h+var_10]
call _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE11remove_signEl; nlohmann::json_abi_v3_11_3::detail::serializer<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>>::remove_sign(long)
mov rdi, [rsp+48h+var_38]
mov [rsp+48h+var_20], rax
mov rsi, [rsp+48h+var_20]
call _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12count_digitsEm; nlohmann::json_abi_v3_11_3::detail::serializer<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>>::count_digits(ulong)
add eax, 1
mov [rsp+48h+var_24], eax
jmp short loc_18D7ED
loc_18D7D0:
mov rdi, [rsp+48h+var_38]
mov rax, [rsp+48h+var_10]
mov [rsp+48h+var_20], rax
mov rsi, [rsp+48h+var_20]
call _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12count_digitsEm; nlohmann::json_abi_v3_11_3::detail::serializer<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>>::count_digits(ulong)
mov [rsp+48h+var_24], eax
loc_18D7ED:
mov rdi, [rsp+48h+var_38]
mov eax, [rsp+48h+var_24]
mov [rsp+48h+var_40], rax
add rdi, 10h
call _ZNKSt5arrayIcLm64EE4sizeEv; std::array<char,64ul>::size(void)
mov rcx, rax
mov rax, [rsp+48h+var_40]
sub rcx, 1
cmp rax, rcx
jb short loc_18D836
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 4952h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNCharsNumberBu; "n_chars < number_buffer.size() - 1"
mov al, 0
call _ggml_abort
loc_18D836:
mov ecx, [rsp+48h+var_24]
mov rax, [rsp+48h+var_18]
mov ecx, ecx
add rax, rcx
mov [rsp+48h+var_18], rax
loc_18D849:
cmp [rsp+48h+var_20], 64h ; 'd'
jb loc_18D8EC
mov rax, [rsp+48h+var_20]
mov ecx, 64h ; 'd'
xor edx, edx
div rcx
mov eax, edx
mov [rsp+48h+var_28], eax
mov rax, [rsp+48h+var_20]
mov ecx, 64h ; 'd'
xor edx, edx
div rcx
mov [rsp+48h+var_20], rax
mov eax, [rsp+48h+var_28]
mov esi, eax
lea rdi, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99
call _ZNKSt5arrayIS_IcLm2EELm100EEixEm; std::array<std::array<char,2ul>,100ul>::operator[](ulong)
mov rdi, rax
mov esi, 1
call _ZNKSt5arrayIcLm2EEixEm; std::array<char,2ul>::operator[](ulong)
mov cl, [rax]
mov rax, [rsp+48h+var_18]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rsp+48h+var_18], rdx
mov [rax-1], cl
mov eax, [rsp+48h+var_28]
mov esi, eax
lea rdi, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99
call _ZNKSt5arrayIS_IcLm2EELm100EEixEm; std::array<std::array<char,2ul>,100ul>::operator[](ulong)
mov rdi, rax
xor eax, eax
mov esi, eax
call _ZNKSt5arrayIcLm2EEixEm; std::array<char,2ul>::operator[](ulong)
mov cl, [rax]
mov rax, [rsp+48h+var_18]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rsp+48h+var_18], rdx
mov [rax-1], cl
jmp loc_18D849
loc_18D8EC:
cmp [rsp+48h+var_20], 0Ah
jb short loc_18D968
mov rax, [rsp+48h+var_20]
mov [rsp+48h+var_2C], eax
mov eax, [rsp+48h+var_2C]
mov esi, eax
lea rdi, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99
call _ZNKSt5arrayIS_IcLm2EELm100EEixEm; std::array<std::array<char,2ul>,100ul>::operator[](ulong)
mov rdi, rax
mov esi, 1
call _ZNKSt5arrayIcLm2EEixEm; std::array<char,2ul>::operator[](ulong)
mov cl, [rax]
mov rax, [rsp+48h+var_18]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rsp+48h+var_18], rdx
mov [rax-1], cl
mov eax, [rsp+48h+var_2C]
mov esi, eax
lea rdi, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99
call _ZNKSt5arrayIS_IcLm2EELm100EEixEm; std::array<std::array<char,2ul>,100ul>::operator[](ulong)
mov rdi, rax
xor eax, eax
mov esi, eax
call _ZNKSt5arrayIcLm2EEixEm; std::array<char,2ul>::operator[](ulong)
mov cl, [rax]
mov rax, [rsp+48h+var_18]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rsp+48h+var_18], rdx
mov [rax-1], cl
jmp short loc_18D987
loc_18D968:
mov rax, [rsp+48h+var_20]
add rax, 30h ; '0'
mov cl, al
mov rax, [rsp+48h+var_18]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rsp+48h+var_18], rdx
mov [rax-1], cl
loc_18D987:
mov rdi, [rsp+48h+var_38]
call _ZNKSt19__shared_ptr_accessIN8nlohmann16json_abi_v3_11_36detail23output_adapter_protocolIcEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, [rsp+48h+var_38]
mov [rsp+48h+var_48], rax
add rdi, 10h
call _ZNSt5arrayIcLm64EE4dataEv; std::array<char,64ul>::data(void)
mov rdi, [rsp+48h+var_48]
mov rsi, rax
mov eax, [rsp+48h+var_24]
mov edx, eax
mov rax, [rdi]
call qword ptr [rax+8]
loc_18D9B6:
add rsp, 48h
retn
| long long ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_(
long long a1,
unsigned long long a2)
{
long long ( ***v2)(_QWORD, long long); // rax
long long v4; // rax
long long v5; // rax
long long v6; // rax
long long v7; // rax
long long v8; // rax
long long v9; // [rsp+0h] [rbp-48h]
unsigned int v10; // [rsp+20h] [rbp-28h]
unsigned int v11; // [rsp+24h] [rbp-24h]
unsigned long long v12; // [rsp+28h] [rbp-20h]
_BYTE *v13; // [rsp+30h] [rbp-18h]
_BYTE *v14; // [rsp+30h] [rbp-18h]
if ( a2 )
{
v13 = (_BYTE *)std::array<char,64ul>::begin(a1 + 16);
if ( (ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE18is_negative_numberIlTnNSt9enable_ifIXsr3std9is_signedIT_EE5valueEiE4typeELi0EEEbSJ_(
a1,
a2) & 1) != 0 )
{
*v13 = 45;
v12 = nlohmann::json_abi_v3_11_3::detail::serializer<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>>::remove_sign(
a1,
a2);
v11 = nlohmann::json_abi_v3_11_3::detail::serializer<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>>::count_digits(
a1,
v12)
+ 1;
}
else
{
v12 = a2;
v11 = nlohmann::json_abi_v3_11_3::detail::serializer<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>>::count_digits(
a1,
a2);
}
if ( v11 >= (unsigned long long)(std::array<char,64ul>::size(a1 + 16) - 1) )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
18770LL,
"GGML_ASSERT(%s) failed",
"n_chars < number_buffer.size() - 1");
v14 = &v13[v11];
while ( v12 >= 0x64 )
{
v10 = v12 % 0x64;
v12 /= 0x64uLL;
v4 = std::array<std::array<char,2ul>,100ul>::operator[](
&ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99,
v10);
*(v14 - 1) = *(_BYTE *)std::array<char,2ul>::operator[](v4, 1LL);
v5 = std::array<std::array<char,2ul>,100ul>::operator[](
&ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99,
v10);
v14 -= 2;
*v14 = *(_BYTE *)std::array<char,2ul>::operator[](v5, 0LL);
}
if ( v12 < 0xA )
{
*(v14 - 1) = v12 + 48;
}
else
{
v6 = std::array<std::array<char,2ul>,100ul>::operator[](
&ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99,
(unsigned int)v12);
*(v14 - 1) = *(_BYTE *)std::array<char,2ul>::operator[](v6, 1LL);
v7 = std::array<std::array<char,2ul>,100ul>::operator[](
&ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99,
(unsigned int)v12);
*(v14 - 2) = *(_BYTE *)std::array<char,2ul>::operator[](v7, 0LL);
}
v9 = std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a1);
v8 = std::array<char,64ul>::data(a1 + 16);
return (*(long long ( **)(long long, long long, _QWORD))(*(_QWORD *)v9 + 8LL))(v9, v8, v11);
}
else
{
v2 = (long long ( ***)(_QWORD, long long))std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a1);
return (**v2)(v2, 48LL);
}
}
| |||
26,526 | void nlohmann::json_abi_v3_11_3::detail::serializer<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>>::dump_integer<long, 0>(long) | monkey531[P]llama/common/json.hpp | void dump_integer(NumberType x)
{
static constexpr std::array<std::array<char, 2>, 100> digits_to_99
{
{
{{'0', '0'}}, {{'0', '1'}}, {{'0', '2'}}, {{'0', '3'}}, {{'0', '4'}}, {{'0', '5'}}, {{'0', '6'}}, {{'0', '7'}}, {{'0', '8'}}, {{'0', '9'}},
{{'1', '0'}}, {{'1', '1'}}, {{'1', '2'}}, {{'1', '3'}}, {{'1', '4'}}, {{'1', '5'}}, {{'1', '6'}}, {{'1', '7'}}, {{'1', '8'}}, {{'1', '9'}},
{{'2', '0'}}, {{'2', '1'}}, {{'2', '2'}}, {{'2', '3'}}, {{'2', '4'}}, {{'2', '5'}}, {{'2', '6'}}, {{'2', '7'}}, {{'2', '8'}}, {{'2', '9'}},
{{'3', '0'}}, {{'3', '1'}}, {{'3', '2'}}, {{'3', '3'}}, {{'3', '4'}}, {{'3', '5'}}, {{'3', '6'}}, {{'3', '7'}}, {{'3', '8'}}, {{'3', '9'}},
{{'4', '0'}}, {{'4', '1'}}, {{'4', '2'}}, {{'4', '3'}}, {{'4', '4'}}, {{'4', '5'}}, {{'4', '6'}}, {{'4', '7'}}, {{'4', '8'}}, {{'4', '9'}},
{{'5', '0'}}, {{'5', '1'}}, {{'5', '2'}}, {{'5', '3'}}, {{'5', '4'}}, {{'5', '5'}}, {{'5', '6'}}, {{'5', '7'}}, {{'5', '8'}}, {{'5', '9'}},
{{'6', '0'}}, {{'6', '1'}}, {{'6', '2'}}, {{'6', '3'}}, {{'6', '4'}}, {{'6', '5'}}, {{'6', '6'}}, {{'6', '7'}}, {{'6', '8'}}, {{'6', '9'}},
{{'7', '0'}}, {{'7', '1'}}, {{'7', '2'}}, {{'7', '3'}}, {{'7', '4'}}, {{'7', '5'}}, {{'7', '6'}}, {{'7', '7'}}, {{'7', '8'}}, {{'7', '9'}},
{{'8', '0'}}, {{'8', '1'}}, {{'8', '2'}}, {{'8', '3'}}, {{'8', '4'}}, {{'8', '5'}}, {{'8', '6'}}, {{'8', '7'}}, {{'8', '8'}}, {{'8', '9'}},
{{'9', '0'}}, {{'9', '1'}}, {{'9', '2'}}, {{'9', '3'}}, {{'9', '4'}}, {{'9', '5'}}, {{'9', '6'}}, {{'9', '7'}}, {{'9', '8'}}, {{'9', '9'}},
}
};
// special case for "0"
if (x == 0)
{
o->write_character('0');
return;
}
// use a pointer to fill the buffer
auto buffer_ptr = number_buffer.begin(); // NOLINT(llvm-qualified-auto,readability-qualified-auto,cppcoreguidelines-pro-type-vararg,hicpp-vararg)
number_unsigned_t abs_value;
unsigned int n_chars{};
if (is_negative_number(x))
{
*buffer_ptr = '-';
abs_value = remove_sign(static_cast<number_integer_t>(x));
// account one more byte for the minus sign
n_chars = 1 + count_digits(abs_value);
}
else
{
abs_value = static_cast<number_unsigned_t>(x);
n_chars = count_digits(abs_value);
}
// spare 1 byte for '\0'
JSON_ASSERT(n_chars < number_buffer.size() - 1);
// jump to the end to generate the string from backward,
// so we later avoid reversing the result
buffer_ptr += n_chars;
// Fast int2ascii implementation inspired by "Fastware" talk by Andrei Alexandrescu
// See: https://www.youtube.com/watch?v=o4-CwDo2zpg
while (abs_value >= 100)
{
const auto digits_index = static_cast<unsigned>((abs_value % 100));
abs_value /= 100;
*(--buffer_ptr) = digits_to_99[digits_index][1];
*(--buffer_ptr) = digits_to_99[digits_index][0];
}
if (abs_value >= 10)
{
const auto digits_index = static_cast<unsigned>(abs_value);
*(--buffer_ptr) = digits_to_99[digits_index][1];
*(--buffer_ptr) = digits_to_99[digits_index][0];
}
else
{
*(--buffer_ptr) = static_cast<char>('0' + abs_value);
}
o->write_characters(number_buffer.data(), n_chars);
} | O3 | cpp | void nlohmann::json_abi_v3_11_3::detail::serializer<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>>::dump_integer<long, 0>(long):
pushq %rbx
testq %rsi, %rsi
je 0xb6cae
movq %rsi, %rcx
leaq 0x10(%rdi), %rsi
cmpq $0xa, %rcx
jae 0xb6cbf
leaq 0x11(%rdi), %r9
movl $0x1, %r8d
jmp 0xb6d8a
movq (%rdi), %rdi
movq (%rdi), %rax
movq (%rax), %rax
movl $0x30, %esi
popq %rbx
jmpq *%rax
movl $0x4, %r9d
movabsq $0x346dc5d63886594b, %r10 # imm = 0x346DC5D63886594B
movq %rcx, %r8
cmpq $0x63, %r8
jbe 0xb6d0a
cmpq $0x3e7, %r8 # imm = 0x3E7
jbe 0xb6d10
cmpq $0x2710, %r8 # imm = 0x2710
jb 0xb6d13
movq %r8, %rax
mulq %r10
shrq $0xb, %rdx
addl $0x4, %r9d
cmpq $0x1869f, %r8 # imm = 0x1869F
movq %rdx, %r8
ja 0xb6cd2
addl $-0x3, %r9d
jmp 0xb6d13
addl $-0x2, %r9d
jmp 0xb6d13
decl %r9d
cmpl $0x3f, %r9d
jae 0xb6da1
movl %r9d, %r8d
leaq (%rsi,%r8), %r9
cmpq $0x64, %rcx
jb 0xb6d6c
movabsq $0x28f5c28f5c28f5c3, %r10 # imm = 0x28F5C28F5C28F5C3
leaq 0x3bd1a(%rip), %r11 # 0xf2a55
movq %rcx, %rax
shrq $0x2, %rax
mulq %r10
shrq $0x2, %rdx
imull $0x64, %edx, %eax
movl %ecx, %ebx
subl %eax, %ebx
movzwl (%r11,%rbx,2), %eax
movw %ax, -0x2(%r9)
addq $-0x2, %r9
cmpq $0x270f, %rcx # imm = 0x270F
movq %rdx, %rcx
ja 0xb6d3b
jmp 0xb6d6f
movq %rcx, %rdx
cmpq $0xa, %rdx
jb 0xb6d87
leaq 0x3bcd9(%rip), %rax # 0xf2a55
movzwl (%rax,%rdx,2), %eax
movw %ax, -0x2(%r9)
jmp 0xb6d91
movq %rdx, %rcx
orb $0x30, %cl
movb %cl, -0x1(%r9)
movq (%rdi), %rdi
movq (%rdi), %rax
movq 0x8(%rax), %rax
movq %r8, %rdx
popq %rbx
jmpq *%rax
leaq 0x340ab(%rip), %rdi # 0xeae53
leaq 0x2e50c(%rip), %rdx # 0xe52bb
leaq 0x396f8(%rip), %rcx # 0xf04ae
movl $0x4952, %esi # imm = 0x4952
xorl %eax, %eax
callq 0x1ae80
| _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerImTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_:
push rbx
test rsi, rsi
jz short loc_B6CAE
mov rcx, rsi
lea rsi, [rdi+10h]
cmp rcx, 0Ah
jnb short loc_B6CBF
lea r9, [rdi+11h]
mov r8d, 1
jmp loc_B6D8A
loc_B6CAE:
mov rdi, [rdi]
mov rax, [rdi]
mov rax, [rax]
mov esi, 30h ; '0'
pop rbx
jmp rax
loc_B6CBF:
mov r9d, 4
mov r10, 346DC5D63886594Bh
mov r8, rcx
loc_B6CD2:
cmp r8, 63h ; 'c'
jbe short loc_B6D0A
cmp r8, 3E7h
jbe short loc_B6D10
cmp r8, 2710h
jb short loc_B6D13
mov rax, r8
mul r10
shr rdx, 0Bh
add r9d, 4
cmp r8, 1869Fh
mov r8, rdx
ja short loc_B6CD2
add r9d, 0FFFFFFFDh
jmp short loc_B6D13
loc_B6D0A:
add r9d, 0FFFFFFFEh
jmp short loc_B6D13
loc_B6D10:
dec r9d
loc_B6D13:
cmp r9d, 3Fh ; '?'
jnb loc_B6DA1
mov r8d, r9d
lea r9, [rsi+r8]
cmp rcx, 64h ; 'd'
jb short loc_B6D6C
mov r10, 28F5C28F5C28F5C3h
lea r11, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerImTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99
loc_B6D3B:
mov rax, rcx
shr rax, 2
mul r10
shr rdx, 2
imul eax, edx, 64h ; 'd'
mov ebx, ecx
sub ebx, eax
movzx eax, word ptr [r11+rbx*2]
mov [r9-2], ax
add r9, 0FFFFFFFFFFFFFFFEh
cmp rcx, 270Fh
mov rcx, rdx
ja short loc_B6D3B
jmp short loc_B6D6F
loc_B6D6C:
mov rdx, rcx
loc_B6D6F:
cmp rdx, 0Ah
jb short loc_B6D87
lea rax, _ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerImTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99
movzx eax, word ptr [rax+rdx*2]
mov [r9-2], ax
jmp short loc_B6D91
loc_B6D87:
mov rcx, rdx
loc_B6D8A:
or cl, 30h
mov [r9-1], cl
loc_B6D91:
mov rdi, [rdi]
mov rax, [rdi]
mov rax, [rax+8]
mov rdx, r8
pop rbx
jmp rax
loc_B6DA1:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNCharsNumberBu; "n_chars < number_buffer.size() - 1"
mov esi, 4952h
xor eax, eax
call _ggml_abort
| long long ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerImTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_(
_QWORD *a1,
unsigned long long a2)
{
unsigned long long v2; // rcx
_QWORD *v3; // rsi
char *v4; // r9
long long v5; // r8
unsigned int v7; // r9d
unsigned long long v8; // r8
bool v9; // cc
unsigned long long v10; // rdx
if ( !a2 )
return (**(long long ( ***)(_QWORD, long long))*a1)(*a1, 48LL);
v2 = a2;
v3 = a1 + 2;
if ( v2 < 0xA )
{
v4 = (char *)a1 + 17;
v5 = 1LL;
goto LABEL_21;
}
v7 = 4;
v8 = v2;
while ( 1 )
{
if ( v8 <= 0x63 )
{
v7 -= 2;
goto LABEL_13;
}
if ( v8 <= 0x3E7 )
break;
if ( v8 < 0x2710 )
goto LABEL_13;
v7 += 4;
v9 = v8 <= 0x1869F;
v8 /= 0x2710uLL;
if ( v9 )
{
v7 -= 3;
goto LABEL_13;
}
}
--v7;
LABEL_13:
if ( v7 < 0x3F )
{
v5 = v7;
v4 = (char *)v3 + v7;
if ( v2 < 0x64 )
{
v10 = v2;
}
else
{
do
{
v10 = v2 / 0x64;
*((_WORD *)v4 - 1) = ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerImTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99[v2 % 0x64];
v4 -= 2;
v9 = v2 <= 0x270F;
v2 /= 0x64uLL;
}
while ( !v9 );
}
if ( v10 >= 0xA )
{
*((_WORD *)v4 - 1) = ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerImTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99[v10];
return (*(long long ( **)(_QWORD, _QWORD *, long long, unsigned long long))(*(_QWORD *)*a1 + 8LL))(
*a1,
v3,
v5,
v2);
}
v2 = v10;
LABEL_21:
LOBYTE(v2) = v2 | 0x30;
*(v4 - 1) = v2;
return (*(long long ( **)(_QWORD, _QWORD *, long long, unsigned long long))(*(_QWORD *)*a1 + 8LL))(
*a1,
v3,
v5,
v2);
}
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
18770LL,
"GGML_ASSERT(%s) failed",
"n_chars < number_buffer.size() - 1");
return ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerIlTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
18770LL);
}
| _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerImTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_:
PUSH RBX
TEST RSI,RSI
JZ 0x001b6cae
MOV RCX,RSI
LEA RSI,[RDI + 0x10]
CMP RCX,0xa
JNC 0x001b6cbf
LEA R9,[RDI + 0x11]
MOV R8D,0x1
JMP 0x001b6d8a
LAB_001b6cae:
MOV RDI,qword ptr [RDI]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX]
MOV ESI,0x30
POP RBX
JMP RAX
LAB_001b6cbf:
MOV R9D,0x4
MOV R10,0x346dc5d63886594b
MOV R8,RCX
LAB_001b6cd2:
CMP R8,0x63
JBE 0x001b6d0a
CMP R8,0x3e7
JBE 0x001b6d10
CMP R8,0x2710
JC 0x001b6d13
MOV RAX,R8
MUL R10
SHR RDX,0xb
ADD R9D,0x4
CMP R8,0x1869f
MOV R8,RDX
JA 0x001b6cd2
ADD R9D,-0x3
JMP 0x001b6d13
LAB_001b6d0a:
ADD R9D,-0x2
JMP 0x001b6d13
LAB_001b6d10:
DEC R9D
LAB_001b6d13:
CMP R9D,0x3f
JNC 0x001b6da1
MOV R8D,R9D
LEA R9,[RSI + R8*0x1]
CMP RCX,0x64
JC 0x001b6d6c
MOV R10,0x28f5c28f5c28f5c3
LEA R11,[0x1f2a55]
LAB_001b6d3b:
MOV RAX,RCX
SHR RAX,0x2
MUL R10
SHR RDX,0x2
IMUL EAX,EDX,0x64
MOV EBX,ECX
SUB EBX,EAX
MOVZX EAX,word ptr [R11 + RBX*0x2]
MOV word ptr [R9 + -0x2],AX
ADD R9,-0x2
CMP RCX,0x270f
MOV RCX,RDX
JA 0x001b6d3b
JMP 0x001b6d6f
LAB_001b6d6c:
MOV RDX,RCX
LAB_001b6d6f:
CMP RDX,0xa
JC 0x001b6d87
LEA RAX,[0x1f2a55]
MOVZX EAX,word ptr [RAX + RDX*0x2]
MOV word ptr [R9 + -0x2],AX
JMP 0x001b6d91
LAB_001b6d87:
MOV RCX,RDX
LAB_001b6d8a:
OR CL,0x30
MOV byte ptr [R9 + -0x1],CL
LAB_001b6d91:
MOV RDI,qword ptr [RDI]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x8]
MOV RDX,R8
POP RBX
JMP RAX
LAB_001b6da1:
LEA RDI,[0x1eae53]
LEA RDX,[0x1e52bb]
LEA RCX,[0x1f04ae]
MOV ESI,0x4952
XOR EAX,EAX
CALL 0x0011ae80
|
void _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerImTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_
(int8 *param_1,ulong param_2)
{
bool bVar1;
ulong uVar2;
ulong uVar3;
int iVar4;
long lVar5;
if (param_2 == 0) {
/* WARNING: Could not recover jumptable at 0x001b6cbd. Too many branches */
/* WARNING: Treating indirect jump as call */
(*(code *)**(int8 **)*param_1)((int8 *)*param_1,0x30);
return;
}
if (param_2 < 10) {
lVar5 = (long)param_1 + 0x11;
uVar3 = 1;
}
else {
uVar3 = 4;
uVar2 = param_2;
do {
iVar4 = (int)uVar3;
if (uVar2 < 100) {
uVar3 = (ulong)(iVar4 - 2);
goto LAB_001b6d13;
}
if (uVar2 < 1000) {
uVar3 = (ulong)(iVar4 - 1);
goto LAB_001b6d13;
}
if (uVar2 < 10000) goto LAB_001b6d13;
uVar3 = (ulong)(iVar4 + 4);
bVar1 = 99999 < uVar2;
uVar2 = uVar2 / 10000;
} while (bVar1);
uVar3 = (ulong)(iVar4 + 1);
LAB_001b6d13:
if (0x3e < (uint)uVar3) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x4952,
"GGML_ASSERT(%s) failed","n_chars < number_buffer.size() - 1");
}
lVar5 = (long)(param_1 + 2) + uVar3;
if (99 < param_2) {
do {
uVar2 = param_2 / 100;
*(int2 *)(lVar5 + -2) =
*(int2 *)
(
_ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerImTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99
+ (ulong)(uint)((int)param_2 + (int)uVar2 * -100) * 2);
lVar5 = lVar5 + -2;
bVar1 = 9999 < param_2;
param_2 = uVar2;
} while (bVar1);
}
if (9 < param_2) {
*(int2 *)(lVar5 + -2) =
*(int2 *)
(
_ZZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12dump_integerImTnNSt9enable_ifIXoooooosr3std11is_integralIT_EE5valuesr3std7is_sameISJ_mEE5valuesr3std7is_sameISJ_lEE5valuesr3std7is_sameISJ_hEE5valueEiE4typeELi0EEEvSJ_E12digits_to_99
+ param_2 * 2);
goto LAB_001b6d91;
}
}
*(byte *)(lVar5 + -1) = (byte)param_2 | 0x30;
LAB_001b6d91:
/* WARNING: Could not recover jumptable at 0x001b6d9f. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*(long *)*param_1 + 8))((long *)*param_1,param_1 + 2,uVar3);
return;
}
| |
26,527 | my_wc_mb_8bit | eloqsql/strings/ctype-simple.c | int my_wc_mb_8bit(CHARSET_INFO *cs,my_wc_t wc,
uchar *str,
uchar *end)
{
MY_UNI_IDX *idx;
if (str >= end)
return MY_CS_TOOSMALL;
for (idx=cs->tab_from_uni; idx->tab ; idx++)
{
if (idx->from <= wc && idx->to >= wc)
{
str[0]= idx->tab[wc - idx->from];
return (!str[0] && wc) ? MY_CS_ILUNI : 1;
}
}
return MY_CS_ILUNI;
} | O0 | c | my_wc_mb_8bit:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x5864a
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x586e3
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x586dc
movq -0x30(%rbp), %rax
movzwl (%rax), %eax
cmpq -0x18(%rbp), %rax
ja 0x586c9
movq -0x30(%rbp), %rax
movzwl 0x2(%rax), %eax
cmpq -0x18(%rbp), %rax
jb 0x586c9
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rdx
movzwl (%rdx), %edx
subq %rdx, %rcx
movb (%rax,%rcx), %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movq -0x20(%rbp), %rcx
xorl %eax, %eax
cmpb $0x0, (%rcx)
movb %al, -0x31(%rbp)
jne 0x586b4
cmpq $0x0, -0x18(%rbp)
setne %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %dl
movl $0x1, %eax
xorl %ecx, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x586e3
jmp 0x586cb
movq -0x30(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x30(%rbp)
jmp 0x58656
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
| my_wc_mb_8bit:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_5864A
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_586E3
loc_5864A:
mov rax, [rbp+var_10]
mov rax, [rax+70h]
mov [rbp+var_30], rax
loc_58656:
mov rax, [rbp+var_30]
cmp qword ptr [rax+8], 0
jz short loc_586DC
mov rax, [rbp+var_30]
movzx eax, word ptr [rax]
cmp rax, [rbp+var_18]
ja short loc_586C9
mov rax, [rbp+var_30]
movzx eax, word ptr [rax+2]
cmp rax, [rbp+var_18]
jb short loc_586C9
mov rax, [rbp+var_30]
mov rax, [rax+8]
mov rcx, [rbp+var_18]
mov rdx, [rbp+var_30]
movzx edx, word ptr [rdx]
sub rcx, rdx
mov cl, [rax+rcx]
mov rax, [rbp+var_20]
mov [rax], cl
mov rcx, [rbp+var_20]
xor eax, eax
cmp byte ptr [rcx], 0
mov [rbp+var_31], al
jnz short loc_586B4
cmp [rbp+var_18], 0
setnz al
mov [rbp+var_31], al
loc_586B4:
mov dl, [rbp+var_31]
mov eax, 1
xor ecx, ecx
test dl, 1
cmovnz eax, ecx
mov [rbp+var_4], eax
jmp short loc_586E3
loc_586C9:
jmp short $+2
loc_586CB:
mov rax, [rbp+var_30]
add rax, 10h
mov [rbp+var_30], rax
jmp loc_58656
loc_586DC:
mov [rbp+var_4], 0
loc_586E3:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_wc_mb_8bit(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
bool v5; // [rsp+1h] [rbp-31h]
unsigned __int16 *i; // [rsp+2h] [rbp-30h]
if ( (unsigned long long)a3 < a4 )
{
for ( i = *(unsigned __int16 **)(a1 + 112); ; i += 8 )
{
if ( !*((_QWORD *)i + 1) )
return 0;
if ( *i <= a2 && i[1] >= a2 )
break;
}
*a3 = *(_BYTE *)(*((_QWORD *)i + 1) + a2 - *i);
v5 = 0;
if ( !*a3 )
v5 = a2 != 0;
return !v5;
}
else
{
return (unsigned int)-101;
}
}
| my_wc_mb_8bit:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x0015864a
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x001586e3
LAB_0015864a:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x70]
MOV qword ptr [RBP + -0x30],RAX
LAB_00158656:
MOV RAX,qword ptr [RBP + -0x30]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x001586dc
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,word ptr [RAX]
CMP RAX,qword ptr [RBP + -0x18]
JA 0x001586c9
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,word ptr [RAX + 0x2]
CMP RAX,qword ptr [RBP + -0x18]
JC 0x001586c9
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x30]
MOVZX EDX,word ptr [RDX]
SUB RCX,RDX
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV RCX,qword ptr [RBP + -0x20]
XOR EAX,EAX
CMP byte ptr [RCX],0x0
MOV byte ptr [RBP + -0x31],AL
JNZ 0x001586b4
CMP qword ptr [RBP + -0x18],0x0
SETNZ AL
MOV byte ptr [RBP + -0x31],AL
LAB_001586b4:
MOV DL,byte ptr [RBP + -0x31]
MOV EAX,0x1
XOR ECX,ECX
TEST DL,0x1
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001586e3
LAB_001586c9:
JMP 0x001586cb
LAB_001586cb:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x10
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00158656
LAB_001586dc:
MOV dword ptr [RBP + -0x4],0x0
LAB_001586e3:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
uint my_wc_mb_8bit(long param_1,ulong param_2,char *param_3,char *param_4)
{
ushort *local_38;
uint local_c;
if (param_3 < param_4) {
for (local_38 = *(ushort **)(param_1 + 0x70); *(long *)(local_38 + 4) != 0;
local_38 = local_38 + 8) {
if ((*local_38 <= param_2) && (param_2 <= local_38[1])) {
*param_3 = *(char *)(*(long *)(local_38 + 4) + (param_2 - *local_38));
return (uint)(*param_3 != '\0' || param_2 == 0);
}
}
local_c = 0;
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
| |
26,528 | lf_alloc_new | eloqsql/mysys/lf_alloc-pin.c | void *lf_alloc_new(LF_PINS *pins)
{
LF_ALLOCATOR *allocator= (LF_ALLOCATOR *)(pins->pinbox->free_func_arg);
uchar *node;
for (;;)
{
do
{
node= allocator->top;
lf_pin(pins, 0, node);
} while (node != allocator->top && LF_BACKOFF());
if (!node)
{
node= (void *)my_malloc(key_memory_lf_node, allocator->element_size,
MYF(MY_WME));
if (allocator->constructor)
allocator->constructor(node);
#ifdef MY_LF_EXTRA_DEBUG
if (likely(node != 0))
my_atomic_add32(&allocator->mallocs, 1);
#endif
break;
}
if (my_atomic_casptr((void **)(char *)&allocator->top,
(void *)&node, anext_node(node)))
break;
}
lf_unpin(pins, 0);
return node;
} | O0 | c | lf_alloc_new:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x30(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x5bb9e
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x5bbac
jmp 0x5bbae
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
xchgq %rax, (%rcx)
jmp 0x5bbc3
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0x39(%rbp)
je 0x5bbe7
callq 0x5bcb0
cmpl $0x0, %eax
setne %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
testb $0x1, %al
jne 0x5bb9e
cmpq $0x0, -0x18(%rbp)
jne 0x5bc30
leaq 0x3b3044(%rip), %rax # 0x40ec40
movl (%rax), %edi
movq -0x10(%rbp), %rax
movl 0x50(%rax), %eax
movl %eax, %esi
movl $0x10, %edx
callq 0x58c40
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x5bc2e
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rax
movq -0x18(%rbp), %rdi
callq *%rax
jmp 0x5bc7f
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movl 0x38(%rcx), %edx
movq (%rax,%rdx), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rdx
lock
cmpxchgq %rdx, 0x48(%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x49(%rbp)
movq %rcx, -0x48(%rbp)
testb $0x1, %al
jne 0x5bc6a
movq -0x48(%rbp), %rax
movq %rax, -0x18(%rbp)
movb -0x49(%rbp), %al
andb $0x1, %al
movb %al, -0x29(%rbp)
testb $0x1, -0x29(%rbp)
je 0x5bc7a
jmp 0x5bc7f
jmp 0x5bb9c
jmp 0x5bc81
jmp 0x5bc83
jmp 0x5bc85
movq -0x8(%rbp), %rcx
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
xchgq %rax, (%rcx)
movq -0x18(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| lf_alloc_new:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov rax, [rax+20h]
mov rax, [rax+30h]
mov [rbp+var_10], rax
loc_5BB9C:
jmp short $+2
loc_5BB9E:
mov rax, [rbp+var_10]
mov rax, [rax+48h]
mov [rbp+var_18], rax
jmp short $+2
loc_5BBAC:
jmp short $+2
loc_5BBAE:
mov rcx, [rbp+var_8]
mov rax, [rbp+var_18]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
xchg rax, [rcx]
jmp short $+2
loc_5BBC3:
mov rcx, [rbp+var_18]
mov rax, [rbp+var_10]
mov rdx, [rax+48h]
xor eax, eax
cmp rcx, rdx
mov [rbp+var_39], al
jz short loc_5BBE7
call LF_BACKOFF
cmp eax, 0
setnz al
mov [rbp+var_39], al
loc_5BBE7:
mov al, [rbp+var_39]
test al, 1
jnz short loc_5BB9E
cmp [rbp+var_18], 0
jnz short loc_5BC30
lea rax, key_memory_lf_node
mov edi, [rax]
mov rax, [rbp+var_10]
mov eax, [rax+50h]
mov esi, eax
mov edx, 10h
call my_malloc
mov [rbp+var_18], rax
mov rax, [rbp+var_10]
cmp qword ptr [rax+58h], 0
jz short loc_5BC2E
mov rax, [rbp+var_10]
mov rax, [rax+58h]
mov rdi, [rbp+var_18]
call rax
loc_5BC2E:
jmp short loc_5BC7F
loc_5BC30:
mov rcx, [rbp+var_10]
mov rax, [rbp+var_18]
mov edx, [rcx+38h]
mov rax, [rax+rdx]
mov [rbp+var_28], rax
mov rax, [rbp+var_18]
mov rdx, [rbp+var_28]
lock cmpxchg [rcx+48h], rdx
mov rcx, rax
setz al
mov [rbp+var_49], al
mov [rbp+var_48], rcx
test al, 1
jnz short loc_5BC6A
mov rax, [rbp+var_48]
mov [rbp+var_18], rax
loc_5BC6A:
mov al, [rbp+var_49]
and al, 1
mov [rbp+var_29], al
test [rbp+var_29], 1
jz short loc_5BC7A
jmp short loc_5BC7F
loc_5BC7A:
jmp loc_5BB9C
loc_5BC7F:
jmp short $+2
loc_5BC81:
jmp short $+2
loc_5BC83:
jmp short $+2
loc_5BC85:
mov rcx, [rbp+var_8]
mov [rbp+var_38], 0
mov rax, [rbp+var_38]
xchg rax, [rcx]
mov rax, [rbp+var_18]
add rsp, 50h
pop rbp
retn
| long long lf_alloc_new(long long a1)
{
signed long long v1; // rcx
bool v3; // [rsp+7h] [rbp-49h]
bool v4; // [rsp+17h] [rbp-39h]
long long v5; // [rsp+38h] [rbp-18h]
long long v6; // [rsp+40h] [rbp-10h]
v6 = *(_QWORD *)(*(_QWORD *)(a1 + 32) + 48LL);
while ( 1 )
{
do
{
v5 = *(_QWORD *)(v6 + 72);
_InterlockedExchange64((volatile long long *)a1, v5);
v4 = 0;
if ( v5 != *(_QWORD *)(v6 + 72) )
v4 = (unsigned int)LF_BACKOFF() != 0;
}
while ( v4 );
if ( !v5 )
break;
v1 = _InterlockedCompareExchange64(
(volatile signed long long *)(v6 + 72),
*(_QWORD *)(v5 + *(unsigned int *)(v6 + 56)),
v5);
v3 = v5 == v1;
if ( v5 != v1 )
v5 = v1;
if ( v3 )
goto LABEL_12;
}
v5 = my_malloc(key_memory_lf_node, *(unsigned int *)(v6 + 80), 16);
if ( *(_QWORD *)(v6 + 88) )
(*(void ( **)(long long))(v6 + 88))(v5);
LABEL_12:
_InterlockedExchange64((volatile long long *)a1, 0LL);
return v5;
}
| lf_alloc_new:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RBP + -0x10],RAX
LAB_0015bb9c:
JMP 0x0015bb9e
LAB_0015bb9e:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x48]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0015bbac
LAB_0015bbac:
JMP 0x0015bbae
LAB_0015bbae:
MOV RCX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
XCHG qword ptr [RCX],RAX
JMP 0x0015bbc3
LAB_0015bbc3:
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x48]
XOR EAX,EAX
CMP RCX,RDX
MOV byte ptr [RBP + -0x39],AL
JZ 0x0015bbe7
CALL 0x0015bcb0
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x39],AL
LAB_0015bbe7:
MOV AL,byte ptr [RBP + -0x39]
TEST AL,0x1
JNZ 0x0015bb9e
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x0015bc30
LEA RAX,[0x50ec40]
MOV EDI,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x50]
MOV ESI,EAX
MOV EDX,0x10
CALL 0x00158c40
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x58],0x0
JZ 0x0015bc2e
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x58]
MOV RDI,qword ptr [RBP + -0x18]
CALL RAX
LAB_0015bc2e:
JMP 0x0015bc7f
LAB_0015bc30:
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RCX + 0x38]
MOV RAX,qword ptr [RAX + RDX*0x1]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x28]
CMPXCHG.LOCK qword ptr [RCX + 0x48],RDX
MOV RCX,RAX
SETZ AL
MOV byte ptr [RBP + -0x49],AL
MOV qword ptr [RBP + -0x48],RCX
TEST AL,0x1
JNZ 0x0015bc6a
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x18],RAX
LAB_0015bc6a:
MOV AL,byte ptr [RBP + -0x49]
AND AL,0x1
MOV byte ptr [RBP + -0x29],AL
TEST byte ptr [RBP + -0x29],0x1
JZ 0x0015bc7a
JMP 0x0015bc7f
LAB_0015bc7a:
JMP 0x0015bb9c
LAB_0015bc7f:
JMP 0x0015bc81
LAB_0015bc81:
JMP 0x0015bc83
LAB_0015bc83:
JMP 0x0015bc85
LAB_0015bc85:
MOV RCX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x38],0x0
MOV RAX,qword ptr [RBP + -0x38]
XCHG qword ptr [RCX],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RSP,0x50
POP RBP
RET
|
long lf_alloc_new(long *param_1)
{
long lVar1;
int iVar2;
bool bVar3;
long local_20;
lVar1 = *(long *)(param_1[4] + 0x30);
do {
do {
local_20 = *(long *)(lVar1 + 0x48);
LOCK();
*param_1 = local_20;
UNLOCK();
bVar3 = false;
if (local_20 != *(long *)(lVar1 + 0x48)) {
iVar2 = LF_BACKOFF();
bVar3 = iVar2 != 0;
}
} while (bVar3);
if (local_20 == 0) {
local_20 = my_malloc(key_memory_lf_node,*(int4 *)(lVar1 + 0x50),0x10);
if (*(long *)(lVar1 + 0x58) != 0) {
(**(code **)(lVar1 + 0x58))(local_20);
}
break;
}
LOCK();
bVar3 = local_20 == *(long *)(lVar1 + 0x48);
if (bVar3) {
*(long *)(lVar1 + 0x48) = *(long *)(local_20 + (ulong)*(uint *)(lVar1 + 0x38));
}
UNLOCK();
} while (!bVar3);
LOCK();
*param_1 = 0;
UNLOCK();
return local_20;
}
| |
26,529 | Item_str_func::make_empty_result(String*) | eloqsql/sql/item_strfunc.h | virtual String *make_empty_result(String *str)
{
/*
Reset string length to an empty string. We don't use str_value.set() as
we don't want to free and potentially have to reallocate the buffer
for each call.
*/
if (!str->is_alloced())
str->set("", 0, collation.collation); /* Avoid null ptrs */
else
{
str->length(0); /* Reuse allocated area */
str->set_charset(collation.collation);
}
return str;
} | O0 | c | Item_str_func::make_empty_result(String*):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0xb190
testb $0x1, %al
jne 0xda67
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
movq 0x10(%rax), %rcx
leaq 0x25de(%rip), %rsi # 0x1003a
xorl %eax, %eax
movl %eax, %edx
callq 0xb090
jmp 0xda89
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xb690
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rdi
movq 0x10(%rax), %rsi
callq 0xb720
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZN13Item_str_func17make_empty_resultEP6String:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
mov rdi, [rbp+var_10]
add rdi, 8; this
call __ZNK13Binary_string10is_allocedEv; Binary_string::is_alloced(void)
test al, 1
jnz short loc_DA67
mov rax, [rbp+var_18]
mov rdi, [rbp+var_10]
mov rcx, [rax+10h]
lea rsi, aFunctionSyscon+18h; ""
xor eax, eax
mov edx, eax
call __ZN6String3setEPKcmPK15charset_info_st; String::set(char const*,ulong,charset_info_st const*)
jmp short loc_DA89
loc_DA67:
mov rdi, [rbp+var_10]
add rdi, 8; this
xor eax, eax
mov esi, eax; unsigned __int64
call __ZN13Binary_string6lengthEm; Binary_string::length(ulong)
mov rax, [rbp+var_18]
mov rdi, [rbp+var_10]
mov rsi, [rax+10h]
call __ZN7Charset11set_charsetEPK15charset_info_st; Charset::set_charset(charset_info_st const*)
loc_DA89:
mov rax, [rbp+var_10]
add rsp, 20h
pop rbp
retn
| String * Item_str_func::make_empty_result(Item_str_func *this, String *a2)
{
if ( (Binary_string::is_alloced((String *)((char *)a2 + 8)) & 1) != 0 )
{
Binary_string::length((String *)((char *)a2 + 8), 0LL);
Charset::set_charset(a2, *((_QWORD *)this + 2));
}
else
{
String::set(a2, "", 0LL, *((_QWORD *)this + 2));
}
return a2;
}
| make_empty_result:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x8
CALL 0x0010b190
TEST AL,0x1
JNZ 0x0010da67
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x10]
LEA RSI,[0x11003a]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x0010b090
JMP 0x0010da89
LAB_0010da67:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x8
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0010b690
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x10]
CALL 0x0010b720
LAB_0010da89:
MOV RAX,qword ptr [RBP + -0x10]
ADD RSP,0x20
POP RBP
RET
|
/* Item_str_func::make_empty_result(String*) */
String * __thiscall Item_str_func::make_empty_result(Item_str_func *this,String *param_1)
{
ulong uVar1;
uVar1 = Binary_string::is_alloced((Binary_string *)(param_1 + 8));
if ((uVar1 & 1) == 0) {
String::set(param_1,"",0,*(charset_info_st **)(this + 0x10));
}
else {
Binary_string::length((Binary_string *)(param_1 + 8),0);
Charset::set_charset((Charset *)param_1,*(charset_info_st **)(this + 0x10));
}
return param_1;
}
| |
26,530 | spdlog::details::elapsed_formatter<spdlog::details::null_scoped_padder, std::chrono::duration<long, std::ratio<1l, 1000000000l>>>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&) | AlayaLite/build_O3/_deps/spdlog-src/include/spdlog/pattern_formatter-inl.h | void format(const details::log_msg &msg, const std::tm &, memory_buf_t &dest) override {
auto delta = (std::max)(msg.time - last_message_time_, log_clock::duration::zero());
auto delta_units = std::chrono::duration_cast<DurationUnits>(delta);
last_message_time_ = msg.time;
auto delta_count = static_cast<size_t>(delta_units.count());
auto n_digits = static_cast<size_t>(ScopedPadder::count_digits(delta_count));
ScopedPadder p(n_digits, padinfo_, dest);
fmt_helper::append_int(delta_count, dest);
} | O3 | c | spdlog::details::elapsed_formatter<spdlog::details::null_scoped_padder, std::chrono::duration<long, std::ratio<1l, 1000000000l>>>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&):
subq $0x28, %rsp
movq 0x18(%rsi), %rax
movq %rax, %r8
subq 0x18(%rdi), %r8
xorl %edx, %edx
testq %r8, %r8
cmovgq %r8, %rdx
movq %rax, 0x18(%rdi)
leaq 0x1d(%rsp), %rsi
leaq 0x47c48(%rip), %rdi # 0x81aa2
cmpq $0x64, %r8
jl 0x39e9b
movabsq $0x28f5c28f5c28f5c3, %r9 # imm = 0x28F5C28F5C28F5C3
movq %r8, %rax
shrq $0x2, %rax
mulq %r9
shrq $0x2, %rdx
imulq $0x64, %rdx, %rax
movq %r8, %r10
subq %rax, %r10
movzwl (%rdi,%r10,2), %eax
movw %ax, -0x2(%rsi)
addq $-0x2, %rsi
cmpq $0x270f, %r8 # imm = 0x270F
movq %rdx, %r8
ja 0x39e6a
cmpq $0x9, %rdx
ja 0x39eac
orb $0x30, %dl
movb %dl, -0x1(%rsi)
decq %rsi
jmp 0x39eb8
movzwl (%rdi,%rdx,2), %eax
movw %ax, -0x2(%rsi)
addq $-0x2, %rsi
leaq 0x1d(%rsp), %rdx
movq %rsi, 0x3(%rdx)
movq %rcx, %rdi
callq 0x2fac6
addq $0x28, %rsp
retq
| _ZN6spdlog7details17elapsed_formatterINS0_18null_scoped_padderENSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEEE6formatERKNS0_7log_msgERK2tmRN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE:
sub rsp, 28h
mov rax, [rsi+18h]
mov r8, rax
sub r8, [rdi+18h]
xor edx, edx
test r8, r8
cmovg rdx, r8
mov [rdi+18h], rax
lea rsi, [rsp+28h+var_B]
lea rdi, a00010203040506; "000102030405060708091011121314151617181"...
cmp r8, 64h ; 'd'
jl short loc_39E9B
mov r9, 28F5C28F5C28F5C3h
loc_39E6A:
mov rax, r8
shr rax, 2
mul r9
shr rdx, 2
imul rax, rdx, 64h ; 'd'
mov r10, r8
sub r10, rax
movzx eax, word ptr [rdi+r10*2]
mov [rsi-2], ax
add rsi, 0FFFFFFFFFFFFFFFEh
cmp r8, 270Fh
mov r8, rdx
ja short loc_39E6A
loc_39E9B:
cmp rdx, 9
ja short loc_39EAC
or dl, 30h
mov [rsi-1], dl
dec rsi
jmp short loc_39EB8
loc_39EAC:
movzx eax, word ptr [rdi+rdx*2]
mov [rsi-2], ax
add rsi, 0FFFFFFFFFFFFFFFEh
loc_39EB8:
lea rdx, [rsp+28h+var_B]
mov [rdx+3], rsi
mov rdi, rcx
call _ZN3fmt3v106detail6bufferIcE6appendIcEEvPKT_S7_; fmt::v10::detail::buffer<char>::append<char>(char const*,char const*)
add rsp, 28h
retn
| long long spdlog::details::elapsed_formatter<spdlog::details::null_scoped_padder,std::chrono::duration<long,std::ratio<1l,1000000000l>>>::format(
long long a1,
long long a2,
long long a3,
long long a4)
{
long long v4; // r8
unsigned long long v5; // rdx
_BYTE *v6; // rsi
bool v7; // cc
long long v8; // rsi
_BYTE v10[3]; // [rsp+1Dh] [rbp-Bh] BYREF
long long v11; // [rsp+20h] [rbp-8h]
v4 = *(_QWORD *)(a2 + 24) - *(_QWORD *)(a1 + 24);
v5 = 0LL;
if ( v4 > 0 )
v5 = *(_QWORD *)(a2 + 24) - *(_QWORD *)(a1 + 24);
*(_QWORD *)(a1 + 24) = *(_QWORD *)(a2 + 24);
v6 = v10;
if ( v4 >= 100 )
{
do
{
v5 = v4 / 0x64uLL;
*((_WORD *)v6 - 1) = *(_WORD *)&a00010203040506[2 * (v4 % 0x64uLL)];
v6 -= 2;
v7 = (unsigned long long)v4 <= 0x270F;
v4 /= 0x64uLL;
}
while ( !v7 );
}
if ( v5 > 9 )
{
*((_WORD *)v6 - 1) = *(_WORD *)&a00010203040506[2 * v5];
v8 = (long long)(v6 - 2);
}
else
{
*(v6 - 1) = v5 | 0x30;
v8 = (long long)(v6 - 1);
}
v11 = v8;
return fmt::v10::detail::buffer<char>::append<char>(a4, v8, (long long)v10);
}
| format:
SUB RSP,0x28
MOV RAX,qword ptr [RSI + 0x18]
MOV R8,RAX
SUB R8,qword ptr [RDI + 0x18]
XOR EDX,EDX
TEST R8,R8
CMOVG RDX,R8
MOV qword ptr [RDI + 0x18],RAX
LEA RSI,[RSP + 0x1d]
LEA RDI,[0x181aa2]
CMP R8,0x64
JL 0x00139e9b
MOV R9,0x28f5c28f5c28f5c3
LAB_00139e6a:
MOV RAX,R8
SHR RAX,0x2
MUL R9
SHR RDX,0x2
IMUL RAX,RDX,0x64
MOV R10,R8
SUB R10,RAX
MOVZX EAX,word ptr [RDI + R10*0x2]
MOV word ptr [RSI + -0x2],AX
ADD RSI,-0x2
CMP R8,0x270f
MOV R8,RDX
JA 0x00139e6a
LAB_00139e9b:
CMP RDX,0x9
JA 0x00139eac
OR DL,0x30
MOV byte ptr [RSI + -0x1],DL
DEC RSI
JMP 0x00139eb8
LAB_00139eac:
MOVZX EAX,word ptr [RDI + RDX*0x2]
MOV word ptr [RSI + -0x2],AX
ADD RSI,-0x2
LAB_00139eb8:
LEA RDX,[RSP + 0x1d]
MOV qword ptr [RDX + 0x3],RSI
MOV RDI,RCX
CALL 0x0012fac6
ADD RSP,0x28
RET
|
/* spdlog::details::elapsed_formatter<spdlog::details::null_scoped_padder,
std::chrono::duration<long, std::ratio<1l, 1000000000l> > >::format(spdlog::details::log_msg
const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char> >&) */
void __thiscall
spdlog::details::
elapsed_formatter<spdlog::details::null_scoped_padder,std::chrono::duration<long,std::ratio<1l,1000000000l>>>
::format(elapsed_formatter<spdlog::details::null_scoped_padder,std::chrono::duration<long,std::ratio<1l,1000000000l>>>
*this,log_msg *param_1,tm *param_2,basic_memory_buffer *param_3)
{
bool bVar1;
ulong uVar2;
char *pcVar3;
ulong uVar4;
byte abStack_12 [5];
int2 local_d;
char local_b [3];
char *local_8;
uVar4 = *(long *)(param_1 + 0x18) - *(long *)(this + 0x18);
uVar2 = 0;
if (0 < (long)uVar4) {
uVar2 = uVar4;
}
*(long *)(this + 0x18) = *(long *)(param_1 + 0x18);
pcVar3 = local_b;
if (99 < (long)uVar4) {
do {
uVar2 = uVar4 / 100;
*(int2 *)(pcVar3 + -2) = *(int2 *)(&DAT_00181aa2 + (uVar4 % 100) * 2);
pcVar3 = pcVar3 + -2;
bVar1 = 9999 < uVar4;
uVar4 = uVar2;
} while (bVar1);
}
if (uVar2 < 10) {
pcVar3[-1] = (byte)uVar2 | 0x30;
local_8 = pcVar3 + -1;
}
else {
*(int2 *)(pcVar3 + -2) = *(int2 *)(&DAT_00181aa2 + uVar2 * 2);
local_8 = pcVar3 + -2;
}
fmt::v10::detail::buffer<char>::append<char>((buffer<char> *)param_3,local_8,local_b);
return;
}
| |
26,531 | testing::internal::WriteToShardStatusFileIfNeeded() | giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest.cc | bool String::CaseInsensitiveCStringEquals(const char* lhs, const char* rhs) {
if (lhs == nullptr) return rhs == nullptr;
if (rhs == nullptr) return false;
return posix::StrCaseCmp(lhs, rhs) == 0;
} | O3 | cpp | testing::internal::WriteToShardStatusFileIfNeeded():
pushq %rbx
leaq 0x12894(%rip), %rdi # 0x40ed0
callq 0x8660
testq %rax, %rax
je 0x2e666
movq %rax, %rbx
leaq 0x153bc(%rip), %rsi # 0x43a0c
movq %rax, %rdi
callq 0x8610
testq %rax, %rax
je 0x2e668
movq %rax, %rdi
popq %rbx
jmp 0x84a0
popq %rbx
retq
leaq 0x1539f(%rip), %rsi # 0x43a0e
leaq 0x1285a(%rip), %rcx # 0x40ed0
movl $0x1, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x22129
movq 0x2a8f4(%rip), %rax # 0x58f80
movq (%rax), %rdi
callq 0x8600
movl $0x1, %edi
callq 0x8650
| _ZN7testing8internal30WriteToShardStatusFileIfNeededEv:
push rbx
lea rdi, _ZN7testingL20kTestShardStatusFileE; "GTEST_SHARD_STATUS_FILE"
call _getenv
test rax, rax
jz short loc_2E666
mov rbx, rax
lea rsi, aW; "w"
mov rdi, rax
call _fopen
test rax, rax
jz short loc_2E668
mov rdi, rax
pop rbx
jmp _fclose
loc_2E666:
pop rbx
retn
loc_2E668:
lea rsi, aCouldNotWriteT; "Could not write to the test shard statu"...
lea rcx, _ZN7testingL20kTestShardStatusFileE; "GTEST_SHARD_STATUS_FILE"
mov edi, 1
mov rdx, rbx
xor eax, eax
call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...)
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov edi, 1
call _exit
| long long testing::internal::WriteToShardStatusFileIfNeeded(
testing::internal *this,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
double a6,
double a7,
__m128 a8,
__m128 a9)
{
long long result; // rax
long long v10; // rbx
long long v11; // rax
long long v12; // r8
long long v13; // r9
__m128 v14; // xmm4
__m128 v15; // xmm5
char v16; // [rsp+0h] [rbp-8h]
result = getenv("GTEST_SHARD_STATUS_FILE");
if ( result )
{
v10 = result;
v11 = fopen(result, "w");
if ( !v11 )
{
testing::internal::ColoredPrintf(
1,
(long long)"Could not write to the test shard status file \"%s\" specified by the %s environment variable.\n",
v10,
(long long)"GTEST_SHARD_STATUS_FILE",
v12,
v13,
a2,
a3,
a4,
a5,
v14,
v15,
a8,
a9,
v16);
fflush(stdout);
exit(1LL);
}
return fclose(v11);
}
return result;
}
| WriteToShardStatusFileIfNeeded:
PUSH RBX
LEA RDI,[0x140ed0]
CALL 0x00108660
TEST RAX,RAX
JZ 0x0012e666
MOV RBX,RAX
LEA RSI,[0x143a0c]
MOV RDI,RAX
CALL 0x00108610
TEST RAX,RAX
JZ 0x0012e668
MOV RDI,RAX
POP RBX
JMP 0x001084a0
LAB_0012e666:
POP RBX
RET
LAB_0012e668:
LEA RSI,[0x143a0e]
LEA RCX,[0x140ed0]
MOV EDI,0x1
MOV RDX,RBX
XOR EAX,EAX
CALL 0x00122129
MOV RAX,qword ptr [0x00158f80]
MOV RDI,qword ptr [RAX]
CALL 0x00108600
MOV EDI,0x1
CALL 0x00108650
|
/* testing::internal::WriteToShardStatusFileIfNeeded() */
void testing::internal::WriteToShardStatusFileIfNeeded(void)
{
char *__filename;
FILE *__stream;
__filename = getenv("GTEST_SHARD_STATUS_FILE");
if (__filename == (char *)0x0) {
return;
}
__stream = fopen(__filename,"w");
if (__stream != (FILE *)0x0) {
fclose(__stream);
return;
}
ColoredPrintf(1,
"Could not write to the test shard status file \"%s\" specified by the %s environment variable.\n"
,__filename,"GTEST_SHARD_STATUS_FILE");
fflush(*(FILE **)PTR_stdout_00158f80);
/* WARNING: Subroutine does not return */
exit(1);
}
| |
26,532 | ma_scan_end_block_record | eloqsql/storage/maria/ma_blockrec.c | void _ma_scan_end_block_record(MARIA_HA *info)
{
DBUG_ENTER("_ma_scan_end_block_record");
my_free(info->scan.bitmap_buff);
info->scan.bitmap_buff= 0;
if (info->scan_save)
{
my_free(info->scan_save);
info->scan_save= 0;
}
DBUG_VOID_RETURN;
} | O0 | c | ma_scan_end_block_record:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x220(%rax), %rdi
callq 0xf3be0
movq -0x8(%rbp), %rax
movq $0x0, 0x220(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x280(%rax)
je 0x78b28
movq -0x8(%rbp), %rax
movq 0x280(%rax), %rdi
callq 0xf3be0
movq -0x8(%rbp), %rax
movq $0x0, 0x280(%rax)
jmp 0x78b2a
jmp 0x78b2c
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ma_scan_end_block_record:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov rdi, [rax+220h]
call my_free
mov rax, [rbp+var_8]
mov qword ptr [rax+220h], 0
mov rax, [rbp+var_8]
cmp qword ptr [rax+280h], 0
jz short loc_78B28
mov rax, [rbp+var_8]
mov rdi, [rax+280h]
call my_free
mov rax, [rbp+var_8]
mov qword ptr [rax+280h], 0
loc_78B28:
jmp short $+2
loc_78B2A:
jmp short $+2
loc_78B2C:
add rsp, 10h
pop rbp
retn
| long long ma_scan_end_block_record(long long a1)
{
long long result; // rax
my_free(*(_QWORD *)(a1 + 544));
*(_QWORD *)(a1 + 544) = 0LL;
result = a1;
if ( *(_QWORD *)(a1 + 640) )
{
my_free(*(_QWORD *)(a1 + 640));
result = a1;
*(_QWORD *)(a1 + 640) = 0LL;
}
return result;
}
| _ma_scan_end_block_record:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x220]
CALL 0x001f3be0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x220],0x0
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x280],0x0
JZ 0x00178b28
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x280]
CALL 0x001f3be0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x280],0x0
LAB_00178b28:
JMP 0x00178b2a
LAB_00178b2a:
JMP 0x00178b2c
LAB_00178b2c:
ADD RSP,0x10
POP RBP
RET
|
void _ma_scan_end_block_record(long param_1)
{
my_free(*(int8 *)(param_1 + 0x220));
*(int8 *)(param_1 + 0x220) = 0;
if (*(long *)(param_1 + 0x280) != 0) {
my_free(*(int8 *)(param_1 + 0x280));
*(int8 *)(param_1 + 0x280) = 0;
}
return;
}
| |
26,533 | ma_scan_end_block_record | eloqsql/storage/maria/ma_blockrec.c | void _ma_scan_end_block_record(MARIA_HA *info)
{
DBUG_ENTER("_ma_scan_end_block_record");
my_free(info->scan.bitmap_buff);
info->scan.bitmap_buff= 0;
if (info->scan_save)
{
my_free(info->scan_save);
info->scan_save= 0;
}
DBUG_VOID_RETURN;
} | O3 | c | ma_scan_end_block_record:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x220(%rdi), %rdi
callq 0x9ffde
movq $0x0, 0x220(%rbx)
movq 0x280(%rbx), %rdi
testq %rdi, %rdi
je 0x5e833
callq 0x9ffde
movq $0x0, 0x280(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| _ma_scan_end_block_record:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
mov rdi, [rdi+220h]
call my_free
mov qword ptr [rbx+220h], 0
mov rdi, [rbx+280h]
test rdi, rdi
jz short loc_5E833
call my_free
mov qword ptr [rbx+280h], 0
loc_5E833:
add rsp, 8
pop rbx
pop rbp
retn
| long long ma_scan_end_block_record(long long a1)
{
long long result; // rax
long long v3; // rdi
result = my_free(*(_QWORD *)(a1 + 544));
*(_QWORD *)(a1 + 544) = 0LL;
v3 = *(_QWORD *)(a1 + 640);
if ( v3 )
{
result = my_free(v3);
*(_QWORD *)(a1 + 640) = 0LL;
}
return result;
}
| _ma_scan_end_block_record:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x220]
CALL 0x0019ffde
MOV qword ptr [RBX + 0x220],0x0
MOV RDI,qword ptr [RBX + 0x280]
TEST RDI,RDI
JZ 0x0015e833
CALL 0x0019ffde
MOV qword ptr [RBX + 0x280],0x0
LAB_0015e833:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void _ma_scan_end_block_record(long param_1)
{
my_free(*(int8 *)(param_1 + 0x220));
*(int8 *)(param_1 + 0x220) = 0;
if (*(long *)(param_1 + 0x280) != 0) {
my_free();
*(int8 *)(param_1 + 0x280) = 0;
}
return;
}
| |
26,534 | my_casedn_str_mb | eloqsql/strings/ctype-mb.c | size_t my_casedn_str_mb(CHARSET_INFO * cs, char *str)
{
register uint32 l;
register const uchar *map= cs->to_lower;
char *str_orig= str;
while (*str)
{
/* Pointing after the '\0' is safe here. */
if ((l= my_ismbchar(cs, str, str + cs->mbmaxlen)))
str+= l;
else
{
*str= (char) map[(uchar)*str];
str++;
}
}
return (size_t) (str - str_orig);
} | O3 | c | my_casedn_str_mb:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
cmpb $0x0, (%rsi)
movq %rsi, %rax
je 0x36d28
movq %rdi, %r14
movq 0x48(%rdi), %r12
movq %rbx, %r15
movl 0x9c(%r14), %edx
addq %r15, %rdx
movq 0xb8(%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0xc0(%rax)
cmpl $0x2, %eax
jge 0x36d18
movzbl (%r15), %eax
movb (%r12,%rax), %al
movb %al, (%r15)
movl $0x1, %ecx
jmp 0x36d1a
movl %eax, %ecx
leaq (%r15,%rcx), %rax
cmpb $0x0, (%r15,%rcx)
movq %rax, %r15
jne 0x36ce4
subq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| my_casedn_str_mb:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rsi
cmp byte ptr [rsi], 0
mov rax, rsi
jz short loc_36D28
mov r14, rdi
mov r12, [rdi+48h]
mov r15, rbx
loc_36CE4:
mov edx, [r14+9Ch]
add rdx, r15
mov rax, [r14+0B8h]
mov rdi, r14
mov rsi, r15
call qword ptr [rax+0C0h]
cmp eax, 2
jge short loc_36D18
movzx eax, byte ptr [r15]
mov al, [r12+rax]
mov [r15], al
mov ecx, 1
jmp short loc_36D1A
loc_36D18:
mov ecx, eax
loc_36D1A:
lea rax, [r15+rcx]
cmp byte ptr [r15+rcx], 0
mov r15, rax
jnz short loc_36CE4
loc_36D28:
sub rax, rbx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long my_casedn_str_mb(long long a1, _BYTE *a2)
{
_BYTE *v2; // rax
long long v3; // r12
_BYTE *v4; // r15
int v5; // eax
long long v6; // rcx
bool v7; // zf
v2 = a2;
if ( *a2 )
{
v3 = *(_QWORD *)(a1 + 72);
v4 = a2;
do
{
v5 = (*(long long ( **)(long long, _BYTE *, _BYTE *))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
v4,
&v4[*(unsigned int *)(a1 + 156)]);
if ( v5 >= 2 )
{
v6 = (unsigned int)v5;
}
else
{
*v4 = *(_BYTE *)(v3 + (unsigned __int8)*v4);
v6 = 1LL;
}
v2 = &v4[v6];
v7 = v4[v6] == 0;
v4 += v6;
}
while ( !v7 );
}
return v2 - a2;
}
| my_casedn_str_mb:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RSI
CMP byte ptr [RSI],0x0
MOV RAX,RSI
JZ 0x00136d28
MOV R14,RDI
MOV R12,qword ptr [RDI + 0x48]
MOV R15,RBX
LAB_00136ce4:
MOV EDX,dword ptr [R14 + 0x9c]
ADD RDX,R15
MOV RAX,qword ptr [R14 + 0xb8]
MOV RDI,R14
MOV RSI,R15
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x2
JGE 0x00136d18
MOVZX EAX,byte ptr [R15]
MOV AL,byte ptr [R12 + RAX*0x1]
MOV byte ptr [R15],AL
MOV ECX,0x1
JMP 0x00136d1a
LAB_00136d18:
MOV ECX,EAX
LAB_00136d1a:
LEA RAX,[R15 + RCX*0x1]
CMP byte ptr [R15 + RCX*0x1],0x0
MOV R15,RAX
JNZ 0x00136ce4
LAB_00136d28:
SUB RAX,RBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
long my_casedn_str_mb(long param_1,byte *param_2)
{
byte *pbVar1;
long lVar2;
uint uVar3;
byte *pbVar4;
ulong uVar5;
byte *pbVar6;
pbVar4 = param_2;
if (*param_2 != 0) {
lVar2 = *(long *)(param_1 + 0x48);
pbVar6 = param_2;
do {
uVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))
(param_1,pbVar6,pbVar6 + *(uint *)(param_1 + 0x9c));
if ((int)uVar3 < 2) {
*pbVar6 = *(byte *)(lVar2 + (ulong)*pbVar6);
uVar5 = 1;
}
else {
uVar5 = (ulong)uVar3;
}
pbVar4 = pbVar6 + uVar5;
pbVar1 = pbVar6 + uVar5;
pbVar6 = pbVar4;
} while (*pbVar1 != 0);
}
return (long)pbVar4 - (long)param_2;
}
| |
26,535 | LefDefParser::defwFillPoints(int, double*, double*) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp | int
defwFillPoints(int num_points,
double *xl,
double *yl)
{
int i;
defwFunc = DEFW_FILL_RECT; // Current function of writer
if (!defwFile)
return DEFW_UNINITIALIZED;
// May be user already define layer
if (defwState != DEFW_FILL_VIA && defwState != DEFW_FILL_RECT &&
defwState != DEFW_FILL_OPC && defwState != DEFW_FILL_VIAMASK)
return DEFW_BAD_DATA;
if (defwState == DEFW_FILL_RECT)
fprintf(defwFile, "\n"); // set a newline for the previous rectangle
fprintf(defwFile, " ");
printPointsNum = 0;
for (i = 0; i < num_points; i++) {
if ((i == 0) || ((i % 5) != 0))
printPoints(defwFile, *xl++, *yl++, "", " ");
else {
printPoints(defwFile, *xl++, *yl++, "\n ", " ");
defwLines++;
}
}
defwLines++;
defwState = DEFW_FILL_RECT;
return DEFW_OK;
} | O3 | cpp | LefDefParser::defwFillPoints(int, double*, double*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0xb6ba(%rip), %rax # 0x1e178
movl $0x58, (%rax)
leaq 0xb69d(%rip), %rax # 0x1e168
movq (%rax), %rcx
testq %rcx, %rcx
je 0x12bcd
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %r15d
leaq 0xb68d(%rip), %rax # 0x1e174
movl (%rax), %edx
leal -0x56(%rdx), %eax
cmpl $0x2, %eax
jb 0x12b1b
cmpl $0x64, %edx
je 0x12b1b
movl $0x3, %eax
cmpl $0x58, %edx
jne 0x12bd2
movl $0xa, %edi
movq %rcx, %rsi
callq 0x10b0
leaq 0xb650(%rip), %rax # 0x1e168
movq (%rax), %rcx
leaq 0x3016(%rip), %rdi # 0x15b38
movl $0x5, %esi
movl $0x1, %edx
callq 0x1110
movl $0x0, 0xb669(%rip) # 0x1e1a4
testl %r15d, %r15d
jle 0x12bb3
movl %r15d, %r15d
xorl %r13d, %r13d
movl $0xcccccccd, %ebp # imm = 0xCCCCCCCD
leaq 0x2fea(%rip), %r12 # 0x15b3c
leaq 0xb60f(%rip), %rax # 0x1e168
movq (%rax), %rdi
movsd (%r14,%r13,8), %xmm0
movsd (%rbx,%r13,8), %xmm1
testl %r13d, %r13d
je 0x12b9c
movl %r13d, %eax
imulq %rbp, %rax
shrq $0x22, %rax
leal (%rax,%rax,4), %eax
movl %r13d, %ecx
subl %eax, %ecx
jne 0x12b9c
leaq 0x315e(%rip), %rsi # 0x15ce7
movq %r12, %rdx
callq 0x9104
leaq 0xb5d8(%rip), %rax # 0x1e170
incl (%rax)
jmp 0x12bab
leaq 0x2694(%rip), %rsi # 0x15237
movq %r12, %rdx
callq 0x9104
incq %r13
cmpl %r13d, %r15d
jne 0x12b52
leaq 0xb5b6(%rip), %rax # 0x1e170
incl (%rax)
leaq 0xb5b1(%rip), %rax # 0x1e174
movl $0x58, (%rax)
xorl %eax, %eax
jmp 0x12bd2
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN12LefDefParser14defwFillPointsEiPdS0_:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc
mov dword ptr [rax], 58h ; 'X'
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rcx, [rax]
test rcx, rcx
jz loc_12BCD
mov rbx, rdx
mov r14, rsi
mov r15d, edi
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
mov edx, [rax]
lea eax, [rdx-56h]
cmp eax, 2
jb short loc_12B1B
cmp edx, 64h ; 'd'
jz short loc_12B1B
mov eax, 3
cmp edx, 58h ; 'X'
jnz loc_12BD2
mov edi, 0Ah
mov rsi, rcx
call _fputc
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rcx, [rax]
loc_12B1B:
lea rdi, asc_15B37+1; " "
mov esi, 5
mov edx, 1
call _fwrite
mov cs:_ZN12LefDefParserL14printPointsNumE, 0; LefDefParser::printPointsNum
test r15d, r15d
jle short loc_12BB3
mov r15d, r15d
xor r13d, r13d
mov ebp, 0CCCCCCCDh
lea r12, asc_15B37+5; " "
loc_12B52:
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
movsd xmm0, qword ptr [r14+r13*8]
movsd xmm1, qword ptr [rbx+r13*8]
test r13d, r13d
jz short loc_12B9C
mov eax, r13d
imul rax, rbp
shr rax, 22h
lea eax, [rax+rax*4]
mov ecx, r13d
sub ecx, eax
jnz short loc_12B9C
lea rsi, asc_15CE7; "\n "
mov rdx, r12
call _ZN12LefDefParserL11printPointsEP8_IO_FILEddPKcS3_; LefDefParser::printPoints(_IO_FILE *,double,double,char const*,char const*)
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
inc dword ptr [rax]
jmp short loc_12BAB
loc_12B9C:
lea rsi, asc_15234+3; ""
mov rdx, r12
call _ZN12LefDefParserL11printPointsEP8_IO_FILEddPKcS3_; LefDefParser::printPoints(_IO_FILE *,double,double,char const*,char const*)
loc_12BAB:
inc r13
cmp r15d, r13d
jnz short loc_12B52
loc_12BB3:
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
inc dword ptr [rax]
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
mov dword ptr [rax], 58h ; 'X'
xor eax, eax
jmp short loc_12BD2
loc_12BCD:
mov eax, 1
loc_12BD2:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long LefDefParser::defwFillPoints(LefDefParser *this, long long a2, double *a3, double *a4)
{
long long v4; // rcx
long long result; // rax
long long v7; // r13
double v8; // xmm0_8
double v9; // xmm1_8
LefDefParser::defwFunc = 88;
v4 = LefDefParser::defwFile;
if ( !LefDefParser::defwFile )
return 1LL;
if ( (unsigned int)(LefDefParser::defwState - 86) >= 2 && LefDefParser::defwState != 100 )
{
result = 3LL;
if ( LefDefParser::defwState != 88 )
return result;
fputc(10LL);
v4 = LefDefParser::defwFile;
}
fwrite(" ", 5LL, 1LL, v4);
LefDefParser::printPointsNum = 0;
if ( (int)this > 0 )
{
v7 = 0LL;
do
{
v8 = *(double *)(a2 + 8 * v7);
v9 = a3[v7];
if ( (_DWORD)v7 && (_DWORD)v7 == 5 * ((unsigned int)v7 / 5) )
{
LefDefParser::printPoints(LefDefParser::defwFile, (long long)"\n ", (long long)" ", v8, v9);
++LefDefParser::defwLines;
}
else
{
LefDefParser::printPoints(LefDefParser::defwFile, (long long)"", (long long)" ", v8, v9);
}
++v7;
}
while ( (_DWORD)this != (_DWORD)v7 );
}
++LefDefParser::defwLines;
LefDefParser::defwState = 88;
return 0LL;
}
| defwFillPoints:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
LEA RAX,[0x11e178]
MOV dword ptr [RAX],0x58
LEA RAX,[0x11e168]
MOV RCX,qword ptr [RAX]
TEST RCX,RCX
JZ 0x00112bcd
MOV RBX,RDX
MOV R14,RSI
MOV R15D,EDI
LEA RAX,[0x11e174]
MOV EDX,dword ptr [RAX]
LEA EAX,[RDX + -0x56]
CMP EAX,0x2
JC 0x00112b1b
CMP EDX,0x64
JZ 0x00112b1b
MOV EAX,0x3
CMP EDX,0x58
JNZ 0x00112bd2
MOV EDI,0xa
MOV RSI,RCX
CALL 0x001010b0
LEA RAX,[0x11e168]
MOV RCX,qword ptr [RAX]
LAB_00112b1b:
LEA RDI,[0x115b38]
MOV ESI,0x5
MOV EDX,0x1
CALL 0x00101110
MOV dword ptr [0x0011e1a4],0x0
TEST R15D,R15D
JLE 0x00112bb3
MOV R15D,R15D
XOR R13D,R13D
MOV EBP,0xcccccccd
LEA R12,[0x115b3c]
LAB_00112b52:
LEA RAX,[0x11e168]
MOV RDI,qword ptr [RAX]
MOVSD XMM0,qword ptr [R14 + R13*0x8]
MOVSD XMM1,qword ptr [RBX + R13*0x8]
TEST R13D,R13D
JZ 0x00112b9c
MOV EAX,R13D
IMUL RAX,RBP
SHR RAX,0x22
LEA EAX,[RAX + RAX*0x4]
MOV ECX,R13D
SUB ECX,EAX
JNZ 0x00112b9c
LEA RSI,[0x115ce7]
MOV RDX,R12
CALL 0x00109104
LEA RAX,[0x11e170]
INC dword ptr [RAX]
JMP 0x00112bab
LAB_00112b9c:
LEA RSI,[0x115237]
MOV RDX,R12
CALL 0x00109104
LAB_00112bab:
INC R13
CMP R15D,R13D
JNZ 0x00112b52
LAB_00112bb3:
LEA RAX,[0x11e170]
INC dword ptr [RAX]
LEA RAX,[0x11e174]
MOV dword ptr [RAX],0x58
XOR EAX,EAX
JMP 0x00112bd2
LAB_00112bcd:
MOV EAX,0x1
LAB_00112bd2:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* LefDefParser::defwFillPoints(int, double*, double*) */
int8 LefDefParser::defwFillPoints(int param_1,double *param_2,double *param_3)
{
int8 uVar1;
ulong uVar2;
defwFunc = 0x58;
if (defwFile == (FILE *)0x0) {
uVar1 = 1;
}
else {
if ((1 < defwState - 0x56U) && (defwState != 100)) {
if (defwState != 0x58) {
defwFunc = 0x58;
return 3;
}
fputc(10,defwFile);
}
fwrite(&DAT_00115b38,5,1,defwFile);
printPointsNum = 0;
if (0 < param_1) {
uVar2 = 0;
do {
if (((int)uVar2 == 0) || ((int)uVar2 + (int)((uVar2 & 0xffffffff) / 5) * -5 != 0)) {
printPoints(defwFile,param_2[uVar2],param_3[uVar2],""," ");
}
else {
printPoints(defwFile,param_2[uVar2],param_3[uVar2],"\n "," ");
defwLines = defwLines + 1;
}
uVar2 = uVar2 + 1;
} while (param_1 != (int)uVar2);
}
defwLines = defwLines + 1;
defwState = 0x58;
uVar1 = 0;
}
return uVar1;
}
| |
26,536 | coro::shared_mutex<coro::thread_pool>::try_lock() | AlayaLite/build_O3/_deps/libcoro-src/include/coro/shared_mutex.hpp | auto try_lock() -> bool
{
// To acquire the exclusive lock the state must be unlocked.
std::unique_lock lk{m_mutex};
return try_lock_locked(lk);
} | O3 | cpp | coro::shared_mutex<coro::thread_pool>::try_lock():
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rsp, %r14
movq %rax, (%r14)
movb $0x0, 0x8(%r14)
movq %r14, %rdi
callq 0x3368
movb $0x1, 0x8(%r14)
movl 0x38(%rbx), %ebp
testl %ebp, %ebp
jne 0x32c9
movl $0x2, 0x38(%rbx)
movq %rsp, %rdi
callq 0x33a4
testl %ebp, %ebp
sete %bl
movq %rsp, %rdi
callq 0x3352
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x3352
movq %rbx, %rdi
callq 0x2250
| _ZN4coro12shared_mutexINS_11thread_poolEE8try_lockEv:
push rbp
push r14
push rbx
sub rsp, 10h
mov rbx, rdi
lea rax, [rdi+10h]
mov r14, rsp
mov [r14], rax
mov byte ptr [r14+8], 0
mov rdi, r14
call _ZNSt11unique_lockISt5mutexE4lockEv; std::unique_lock<std::mutex>::lock(void)
mov byte ptr [r14+8], 1
mov ebp, [rbx+38h]
test ebp, ebp
jnz short loc_32C9
mov dword ptr [rbx+38h], 2
mov rdi, rsp
call _ZNSt11unique_lockISt5mutexE6unlockEv; std::unique_lock<std::mutex>::unlock(void)
loc_32C9:
test ebp, ebp
setz bl
mov rdi, rsp
call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock()
mov eax, ebx
add rsp, 10h
pop rbx
pop r14
pop rbp
retn
mov rbx, rax
mov rdi, rsp
call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock()
mov rdi, rbx
call __Unwind_Resume
| long long coro::shared_mutex<coro::thread_pool>::try_lock(long long a1)
{
unsigned int v1; // ebx
int v2; // ebp
long long v4; // [rsp+0h] [rbp-28h] BYREF
char v5; // [rsp+8h] [rbp-20h]
v1 = a1;
v4 = a1 + 16;
v5 = 0;
std::unique_lock<std::mutex>::lock(&v4);
v5 = 1;
v2 = *(_DWORD *)(a1 + 56);
if ( !v2 )
{
*(_DWORD *)(a1 + 56) = 2;
std::unique_lock<std::mutex>::unlock(&v4);
}
LOBYTE(v1) = v2 == 0;
std::unique_lock<std::mutex>::~unique_lock(&v4);
return v1;
}
| try_lock:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV R14,RSP
MOV qword ptr [R14],RAX
MOV byte ptr [R14 + 0x8],0x0
MOV RDI,R14
CALL 0x00103368
MOV byte ptr [R14 + 0x8],0x1
MOV EBP,dword ptr [RBX + 0x38]
TEST EBP,EBP
JNZ 0x001032c9
MOV dword ptr [RBX + 0x38],0x2
LAB_001032c1:
MOV RDI,RSP
CALL 0x001033a4
LAB_001032c9:
TEST EBP,EBP
SETZ BL
MOV RDI,RSP
CALL 0x00103352
MOV EAX,EBX
ADD RSP,0x10
POP RBX
POP R14
POP RBP
RET
|
/* coro::shared_mutex<coro::thread_pool>::try_lock() */
ulong __thiscall
coro::shared_mutex<coro::thread_pool>::try_lock(shared_mutex<coro::thread_pool> *this)
{
int iVar1;
shared_mutex<coro::thread_pool> *local_28;
int1 local_20;
local_28 = this + 0x10;
local_20 = 0;
std::unique_lock<std::mutex>::lock();
local_20 = 1;
iVar1 = *(int *)(this + 0x38);
if (iVar1 == 0) {
*(int4 *)(this + 0x38) = 2;
/* try { // try from 001032c1 to 001032c8 has its CatchHandler @ 001032e1 */
std::unique_lock<std::mutex>::unlock();
}
std::unique_lock<std::mutex>::~unique_lock((unique_lock<std::mutex> *)&local_28);
return CONCAT71((int7)((ulong)this >> 8),iVar1 == 0) & 0xffffffff;
}
| |
26,537 | get_num_physical_cores | 7CodeWizard[P]stablediffusion/util.cpp | int32_t get_num_physical_cores() {
#ifdef __linux__
// enumerate the set of thread siblings, num entries is num cores
std::unordered_set<std::string> siblings;
for (uint32_t cpu = 0; cpu < UINT32_MAX; ++cpu) {
std::ifstream thread_siblings("/sys/devices/system/cpu" + std::to_string(cpu) + "/topology/thread_siblings");
if (!thread_siblings.is_open()) {
break; // no more cpus
}
std::string line;
if (std::getline(thread_siblings, line)) {
siblings.insert(line);
}
}
if (siblings.size() > 0) {
return static_cast<int32_t>(siblings.size());
}
#elif defined(__APPLE__) && defined(__MACH__)
int32_t num_physical_cores;
size_t len = sizeof(num_physical_cores);
int result = sysctlbyname("hw.perflevel0.physicalcpu", &num_physical_cores, &len, NULL, 0);
if (result == 0) {
return num_physical_cores;
}
result = sysctlbyname("hw.physicalcpu", &num_physical_cores, &len, NULL, 0);
if (result == 0) {
return num_physical_cores;
}
#elif defined(_WIN32)
// TODO: Implement
#endif
unsigned int n_threads = std::thread::hardware_concurrency();
return n_threads > 0 ? (n_threads <= 4 ? n_threads : n_threads / 2) : 4;
} | O1 | cpp | get_num_physical_cores:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2a8, %rsp # imm = 0x2A8
leaq 0x98(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
leaq 0x58(%rsp), %r13
leaq 0x38(%rsp), %r12
leaq 0x18(%rsp), %r15
xorl %r14d, %r14d
leaq 0x48(%rsp), %rbx
movl $0xd1b71759, %esi # imm = 0xD1B71759
movl $0x1, %eax
cmpl $0xa, %r14d
jb 0x79d62
movl $0x4, %eax
movl %r14d, %ecx
cmpl $0x63, %ecx
jbe 0x79d5b
cmpl $0x3e7, %ecx # imm = 0x3E7
jbe 0x79d60
cmpl $0x2710, %ecx # imm = 0x2710
jb 0x79d62
movl %ecx, %edx
imulq %rsi, %rdx
shrq $0x2d, %rdx
addl $0x4, %eax
cmpl $0x1869f, %ecx # imm = 0x1869F
movl %edx, %ecx
ja 0x79d2a
addl $-0x3, %eax
jmp 0x79d62
addl $-0x2, %eax
jmp 0x79d62
decl %eax
movl %eax, %esi
movq %r13, 0x48(%rsp)
movq %rbx, %rdi
xorl %edx, %edx
callq 0xa6d0
movq 0x48(%rsp), %rdi
movl 0x50(%rsp), %esi
movl %r14d, %edx
callq 0x2f871
movl $0x17, %r8d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x49718(%rip), %rcx # 0xc34b0
callq 0xa680
movq %r12, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x79dc0
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x79dc8
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x28(%rsp), %rdi
leaq 0x496dc(%rip), %rsi # 0xc34c8
callq 0xabf0
movq %r15, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x79e14
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x79e1b
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xa0(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movl $0x8, %edx
callq 0xa9f0
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x79e61
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa5e0
movq 0x28(%rsp), %rdi
movq %r12, %rbp
cmpq %r12, %rdi
je 0x79e7b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xa5e0
movq 0x48(%rsp), %rdi
movq %r13, %r12
cmpq %r13, %rdi
je 0x79e95
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xa5e0
leaq 0x118(%rsp), %rdi
callq 0xa100
testb %al, %al
je 0x79f61
movl %eax, %r13d
movq %r15, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
movq 0xa0(%rsp), %rax
movq -0x18(%rax), %rdi
leaq 0xa0(%rsp), %rax
addq %rax, %rdi
movl $0xa, %esi
callq 0xa5b0
movsbl %al, %edx
leaq 0xa0(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xab90
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x79f1d
leaq 0x68(%rsp), %rdi
movq %rdi, 0x28(%rsp)
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x7acfc
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x79f34
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa5e0
leaq 0xa0(%rsp), %rdi
callq 0xa110
incl %r14d
cmpl $-0x1, %r14d
setne %al
testb %al, %r13b
movq %r12, %r13
movq %rbp, %r12
movl $0xd1b71759, %esi # imm = 0xD1B71759
jne 0x79d17
jmp 0x79f6e
leaq 0xa0(%rsp), %rdi
callq 0xa110
movq 0x80(%rsp), %rbx
testq %rbx, %rbx
jne 0x79f94
callq 0xa830
cmpl $0x5, %eax
setae %cl
movl %eax, %edx
shrl %cl, %edx
testl %eax, %eax
movl $0x4, %ebx
cmovnel %edx, %ebx
leaq 0x68(%rsp), %rdi
callq 0x7ac5e
movl %ebx, %eax
addq $0x2a8, %rsp # imm = 0x2A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x79fd6
movq %rax, %rbx
jmp 0x7a032
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x79fd6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa5e0
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x79ff2
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xa5e0
jmp 0x79ff2
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x7a032
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xa5e0
jmp 0x7a032
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x7a025
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa5e0
leaq 0xa0(%rsp), %rdi
callq 0xa110
leaq 0x68(%rsp), %rdi
callq 0x7ac5e
movq %rbx, %rdi
callq 0xaae0
| get_num_physical_cores:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 2A8h
lea rax, [rsp+2D8h+var_240]
mov [rax-30h], rax
mov qword ptr [rax-28h], 1
xorps xmm0, xmm0
movups xmmword ptr [rax-20h], xmm0
mov dword ptr [rax-10h], 3F800000h
movups xmmword ptr [rax-8], xmm0
lea r13, [rsp+2D8h+var_280]
lea r12, [rsp+2D8h+var_2A0]
lea r15, [rsp+2D8h+var_2C0]
xor r14d, r14d
lea rbx, [rsp+2D8h+var_290]
mov esi, 0D1B71759h
loc_79D17:
mov eax, 1
cmp r14d, 0Ah
jb short loc_79D62
mov eax, 4
mov ecx, r14d
loc_79D2A:
cmp ecx, 63h ; 'c'
jbe short loc_79D5B
cmp ecx, 3E7h
jbe short loc_79D60
cmp ecx, 2710h
jb short loc_79D62
mov edx, ecx
imul rdx, rsi
shr rdx, 2Dh
add eax, 4
cmp ecx, 1869Fh
mov ecx, edx
ja short loc_79D2A
add eax, 0FFFFFFFDh
jmp short loc_79D62
loc_79D5B:
add eax, 0FFFFFFFEh
jmp short loc_79D62
loc_79D60:
dec eax
loc_79D62:
mov esi, eax
mov [rsp+2D8h+var_290], r13
mov rdi, rbx
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov rdi, [rsp+2D8h+var_290]
mov esi, [rsp+2D8h+var_288]
mov edx, r14d
call _ZNSt8__detail18__to_chars_10_implIjEEvPcjT_; std::__detail::__to_chars_10_impl<uint>(char *,uint,uint)
mov r8d, 17h
mov rdi, rbx
xor esi, esi
xor edx, edx
lea rcx, aSysDevicesSyst; "/sys/devices/system/cpu"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
mov [rsp+2D8h+var_2B0], r12
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_79DC0
mov [rsp+2D8h+var_2B0], rdx
mov rdx, [rcx]
mov [rsp+2D8h+var_2A0], rdx
jmp short loc_79DC8
loc_79DC0:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r12], xmm0
loc_79DC8:
mov rdx, [rax+8]
mov [rsp+2D8h+var_2A8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rdi, [rsp+2D8h+var_2B0]
lea rsi, aTopologyThread; "/topology/thread_siblings"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov [rsp+2D8h+var_2D0], r15
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_79E14
mov [rsp+2D8h+var_2D0], rdx
mov rdx, [rcx]
mov [rsp+2D8h+var_2C0], rdx
jmp short loc_79E1B
loc_79E14:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r15], xmm0
loc_79E1B:
mov rdx, [rax+8]
mov [rsp+2D8h+var_2C8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rdi, [rsp+2D8h+var_238]
lea rsi, [rsp+2D8h+var_2D0]
mov edx, 8
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode; std::ifstream::basic_ifstream(std::string const&,std::_Ios_Openmode)
mov rdi, [rsp+2D8h+var_2D0]; void *
cmp rdi, r15
jz short loc_79E61
mov rsi, [rsp+2D8h+var_2C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_79E61:
mov rdi, [rsp+2D8h+var_2B0]; void *
mov rbp, r12
cmp rdi, r12
jz short loc_79E7B
mov rsi, [rsp+2D8h+var_2A0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_79E7B:
mov rdi, [rsp+2D8h+var_290]; void *
mov r12, r13
cmp rdi, r13
jz short loc_79E95
mov rsi, [rsp+2D8h+var_280]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_79E95:
lea rdi, [rsp+2D8h+var_1C0]
call __ZNKSt12__basic_fileIcE7is_openEv; std::__basic_file<char>::is_open(void)
test al, al
jz loc_79F61
mov r13d, eax
mov [rsp+2D8h+var_2D0], r15
mov [rsp+2D8h+var_2C8], 0
mov byte ptr [rsp+2D8h+var_2C0], 0
mov rax, [rsp+2D8h+var_238]
mov rdi, [rax-18h]
lea rax, [rsp+2D8h+var_238]
add rdi, rax
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx edx, al
lea rdi, [rsp+2D8h+var_238]
lea rsi, [rsp+2D8h+var_2D0]
call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &,char)
mov rcx, [rax]
mov rcx, [rcx-18h]
test byte ptr [rax+rcx+20h], 5
jnz short loc_79F1D
lea rdi, [rsp+2D8h+var_270]
mov [rsp+2D8h+var_2B0], rdi
lea rsi, [rsp+2D8h+var_2D0]
lea rdx, [rsp+2D8h+var_2B0]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE9_M_insertIRKS5_NS7_10_AllocNodeISaINS7_10_Hash_nodeIS5_Lb1EEEEEEEESt4pairINS7_14_Node_iteratorIS5_Lb1ELb1EEEbEOT_RKT0_St17integral_constantIbLb1EE; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_insert<std::string const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::string,true>>>>(std::string const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::string,true>>> const&,std::integral_constant<bool,true>)
loc_79F1D:
mov rdi, [rsp+2D8h+var_2D0]; void *
cmp rdi, r15
jz short loc_79F34
mov rsi, [rsp+2D8h+var_2C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_79F34:
lea rdi, [rsp+2D8h+var_238]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
inc r14d
cmp r14d, 0FFFFFFFFh
setnz al
test r13b, al
mov r13, r12
mov r12, rbp
mov esi, 0D1B71759h
jnz loc_79D17
jmp short loc_79F6E
loc_79F61:
lea rdi, [rsp+2D8h+var_238]; this
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
loc_79F6E:
mov rbx, [rsp+2D8h+var_258]
test rbx, rbx
jnz short loc_79F94
call __ZNSt6thread20hardware_concurrencyEv; std::thread::hardware_concurrency(void)
cmp eax, 5
setnb cl
mov edx, eax
shr edx, cl
test eax, eax
mov ebx, 4
cmovnz ebx, edx
loc_79F94:
lea rdi, [rsp+2D8h+var_270]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable()
mov eax, ebx
add rsp, 2A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
jmp short loc_79FD6
mov rbx, rax
jmp short loc_7A032
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r15
jz short loc_79FD6
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_79FD6:
mov rdi, [rsp+arg_20]; void *
cmp rdi, r12
jz short loc_79FF2
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_79FF2
mov rbx, rax
loc_79FF2:
mov rdi, [rsp+arg_40]; void *
cmp rdi, r13
jz short loc_7A032
mov rsi, [rsp+arg_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_7A032
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r15
jz short loc_7A025
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7A025:
lea rdi, [rsp+arg_98]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
loc_7A032:
lea rdi, [rsp+arg_60]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable()
mov rdi, rbx
call __Unwind_Resume
| long long get_num_physical_cores()
{
long long *v0; // r13
long long *v1; // r12
unsigned int v2; // r14d
unsigned int v3; // eax
unsigned int v4; // ecx
bool v5; // cc
long long v6; // rax
_OWORD *v7; // rcx
long long v8; // rax
__int128 *v9; // rcx
long long v10; // rsi
long long *v11; // rbp
long long *v12; // r12
unsigned __int8 is_open; // al
unsigned __int8 v14; // r13
char v15; // al
_QWORD *v16; // rax
int v17; // r8d
int v18; // r9d
long long v19; // rcx
bool v20; // zf
unsigned int v21; // ebx
unsigned int v22; // eax
char v24; // [rsp+0h] [rbp-2D8h]
void *v25; // [rsp+8h] [rbp-2D0h] BYREF
long long v26; // [rsp+10h] [rbp-2C8h]
__int128 v27; // [rsp+18h] [rbp-2C0h] BYREF
void *v28[2]; // [rsp+28h] [rbp-2B0h] BYREF
long long v29; // [rsp+38h] [rbp-2A0h] BYREF
void *v30; // [rsp+48h] [rbp-290h] BYREF
int v31; // [rsp+50h] [rbp-288h]
long long v32; // [rsp+58h] [rbp-280h] BYREF
_QWORD v33[2]; // [rsp+68h] [rbp-270h] BYREF
__int128 v34; // [rsp+78h] [rbp-260h]
int v35; // [rsp+88h] [rbp-250h]
__int128 v36; // [rsp+90h] [rbp-248h] BYREF
_QWORD v37[15]; // [rsp+A0h] [rbp-238h] BYREF
_BYTE v38[448]; // [rsp+118h] [rbp-1C0h] BYREF
v33[0] = (char *)&v36 + 8;
v33[1] = 1LL;
v34 = 0LL;
v35 = 1065353216;
v36 = 0LL;
v0 = &v32;
v1 = &v29;
v2 = 0;
while ( 1 )
{
v3 = 1;
if ( v2 >= 0xA )
{
v3 = 4;
v4 = v2;
while ( 1 )
{
if ( v4 <= 0x63 )
{
v3 -= 2;
goto LABEL_11;
}
if ( v4 <= 0x3E7 )
break;
if ( v4 < 0x2710 )
goto LABEL_11;
v3 += 4;
v5 = v4 <= 0x1869F;
v4 /= 0x2710u;
if ( v5 )
{
v3 -= 3;
goto LABEL_11;
}
}
--v3;
}
LABEL_11:
v30 = v0;
std::string::_M_construct(&v30, v3, 0LL);
std::__detail::__to_chars_10_impl<unsigned int>((char *)v30, v31, v2);
v6 = std::string::replace(&v30, 0LL, 0LL, "/sys/devices/system/cpu", 23LL);
v28[0] = v1;
v7 = (_OWORD *)(v6 + 16);
if ( *(_QWORD *)v6 == v6 + 16 )
{
*(_OWORD *)v1 = *v7;
}
else
{
v28[0] = *(void **)v6;
v29 = *(_QWORD *)v7;
}
v28[1] = *(void **)(v6 + 8);
*(_QWORD *)v6 = v7;
*(_QWORD *)(v6 + 8) = 0LL;
*(_BYTE *)(v6 + 16) = 0;
v8 = std::string::append(v28, "/topology/thread_siblings");
v25 = &v27;
v9 = (__int128 *)(v8 + 16);
if ( *(_QWORD *)v8 == v8 + 16 )
{
v27 = *v9;
}
else
{
v25 = *(void **)v8;
*(_QWORD *)&v27 = *(_QWORD *)v9;
}
v26 = *(_QWORD *)(v8 + 8);
*(_QWORD *)v8 = v9;
*(_QWORD *)(v8 + 8) = 0LL;
*(_BYTE *)(v8 + 16) = 0;
v10 = (long long)&v25;
std::ifstream::basic_ifstream(v37, &v25, 8LL);
if ( v25 != &v27 )
{
v10 = v27 + 1;
operator delete(v25, v27 + 1);
}
v11 = v1;
if ( v28[0] != v1 )
{
v10 = v29 + 1;
operator delete(v28[0], v29 + 1);
}
v12 = v0;
if ( v30 != v0 )
{
v10 = v32 + 1;
operator delete(v30, v32 + 1);
}
is_open = std::__basic_file<char>::is_open(v38);
if ( !is_open )
break;
v14 = is_open;
v25 = &v27;
v26 = 0LL;
LOBYTE(v27) = 0;
v15 = std::ios::widen((char *)v37 + *(_QWORD *)(v37[0] - 24LL), 10LL);
v16 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(v37, &v25, (unsigned int)v15);
v19 = *(_QWORD *)(*v16 - 24LL);
if ( (*((_BYTE *)v16 + v19 + 32) & 5) == 0 )
{
v28[0] = v33;
std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_insert<std::string const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::string,true>>>>(
(unsigned int)v33,
(unsigned int)&v25,
(unsigned int)v28,
v19,
v17,
v18,
v24);
}
if ( v25 != &v27 )
operator delete(v25, v27 + 1);
std::ifstream::~ifstream(v37);
v20 = ((++v2 != -1) & v14) == 0;
v0 = v12;
v1 = v11;
v10 = 3518437209LL;
if ( v20 )
goto LABEL_31;
}
std::ifstream::~ifstream(v37);
LABEL_31:
v21 = DWORD2(v34);
if ( !*((_QWORD *)&v34 + 1) )
{
v22 = std::thread::hardware_concurrency((std::thread *)v37);
v21 = 4;
if ( v22 )
v21 = v22 >> (v22 >= 5);
}
std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable(
v33,
v10);
return v21;
}
| |||
26,538 | get_num_physical_cores | 7CodeWizard[P]stablediffusion/util.cpp | int32_t get_num_physical_cores() {
#ifdef __linux__
// enumerate the set of thread siblings, num entries is num cores
std::unordered_set<std::string> siblings;
for (uint32_t cpu = 0; cpu < UINT32_MAX; ++cpu) {
std::ifstream thread_siblings("/sys/devices/system/cpu" + std::to_string(cpu) + "/topology/thread_siblings");
if (!thread_siblings.is_open()) {
break; // no more cpus
}
std::string line;
if (std::getline(thread_siblings, line)) {
siblings.insert(line);
}
}
if (siblings.size() > 0) {
return static_cast<int32_t>(siblings.size());
}
#elif defined(__APPLE__) && defined(__MACH__)
int32_t num_physical_cores;
size_t len = sizeof(num_physical_cores);
int result = sysctlbyname("hw.perflevel0.physicalcpu", &num_physical_cores, &len, NULL, 0);
if (result == 0) {
return num_physical_cores;
}
result = sysctlbyname("hw.physicalcpu", &num_physical_cores, &len, NULL, 0);
if (result == 0) {
return num_physical_cores;
}
#elif defined(_WIN32)
// TODO: Implement
#endif
unsigned int n_threads = std::thread::hardware_concurrency();
return n_threads > 0 ? (n_threads <= 4 ? n_threads : n_threads / 2) : 4;
} | O2 | cpp | get_num_physical_cores:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2a8, %rsp # imm = 0x2A8
leaq 0x58(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
xorl %esi, %esi
leaq 0x60(%rsp), %r14
leaq 0x80(%rsp), %r12
leaq 0x8(%rsp), %rbp
leaq 0xa0(%rsp), %rbx
pushq $0x8
popq %r15
xorl %r13d, %r13d
incl %r13d
je 0x55bae
movq %r14, %rdi
callq 0x5641b
movq %r12, %rdi
leaq 0x498c3(%rip), %rsi # 0x9f3c0
movq %r14, %rdx
callq 0x1a061
movq %rbp, %rdi
movq %r12, %rsi
leaq 0x498c6(%rip), %rdx # 0x9f3d8
callq 0x19fcc
movq %rbx, %rdi
movq %rbp, %rsi
movl %r15d, %edx
callq 0xa9e0
movq %rbp, %rdi
callq 0xac60
movq %r12, %rdi
callq 0xac60
movq %r14, %rdi
callq 0xac60
leaq 0x118(%rsp), %rdi
callq 0xa100
testb %al, %al
je 0x55ba1
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
andq $0x0, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
movq %rbx, %rdi
movq %rbp, %rsi
callq 0xa0c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x55b89
leaq 0x28(%rsp), %rdi
movq %rbp, %rsi
callq 0x5661c
movq %rbp, %rdi
callq 0xac60
movq %rbx, %rdi
callq 0xa120
movl %r13d, %esi
jmp 0x55ae2
leaq 0xa0(%rsp), %rdi
callq 0xa120
movq 0x40(%rsp), %rbx
testq %rbx, %rbx
jne 0x55bcf
callq 0xa830
cmpl $0x5, %eax
setae %cl
movl %eax, %edx
shrl %cl, %edx
testl %eax, %eax
pushq $0x4
popq %rbx
cmovnel %edx, %ebx
leaq 0x28(%rsp), %rdi
callq 0x5650c
movl %ebx, %eax
addq $0x2a8, %rsp # imm = 0x2A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x55c3c
movq %rax, %rbx
jmp 0x55c09
movq %rax, %rbx
jmp 0x55c16
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xac60
leaq 0x80(%rsp), %rdi
callq 0xac60
leaq 0x60(%rsp), %rdi
callq 0xac60
jmp 0x55c3c
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xac60
leaq 0xa0(%rsp), %rdi
callq 0xa120
leaq 0x28(%rsp), %rdi
callq 0x5650c
movq %rbx, %rdi
callq 0xaab0
| get_num_physical_cores:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 2A8h
lea rax, [rsp+2D8h+var_280]
mov [rax-30h], rax
mov qword ptr [rax-28h], 1
xorps xmm0, xmm0
movups xmmword ptr [rax-20h], xmm0
mov dword ptr [rax-10h], 3F800000h
movups xmmword ptr [rax-8], xmm0
xor esi, esi; unsigned int
lea r14, [rsp+2D8h+var_278]
lea r12, [rsp+2D8h+var_258]
lea rbp, [rsp+2D8h+var_2D0]
lea rbx, [rsp+2D8h+var_238]
push 8
pop r15
xor r13d, r13d
loc_55AE2:
inc r13d
jz loc_55BAE
mov rdi, r14; this
call _ZNSt7__cxx119to_stringEj; std::to_string(uint)
mov rdi, r12
lea rsi, aSysDevicesSyst; "/sys/devices/system/cpu"
mov rdx, r14
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov rdi, rbp
mov rsi, r12
lea rdx, aTopologyThread; "/topology/thread_siblings"
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
mov rdi, rbx
mov rsi, rbp
mov edx, r15d
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode; std::ifstream::basic_ifstream(std::string const&,std::_Ios_Openmode)
mov rdi, rbp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r12; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r14; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+2D8h+var_1C0]
call __ZNKSt12__basic_fileIcE7is_openEv; std::__basic_file<char>::is_open(void)
test al, al
jz short loc_55BA1
lea rax, [rsp+2D8h+var_2C0]
mov [rsp+2D8h+var_2D0], rax
and [rsp+2D8h+var_2C8], 0
mov [rsp+2D8h+var_2C0], 0
mov rdi, rbx
mov rsi, rbp
call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &)
mov rcx, [rax]
mov rcx, [rcx-18h]
test byte ptr [rax+rcx+20h], 5
jnz short loc_55B89
lea rdi, [rsp+2D8h+var_2B0]
mov rsi, rbp
call _ZNSt8__detail12_Insert_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_SaIS6_ENS_9_IdentityESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb1ELb1EEEE6insertERKS6_; std::__detail::_Insert_base<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::insert(std::string const&)
loc_55B89:
mov rdi, rbp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
mov esi, r13d
jmp loc_55AE2
loc_55BA1:
lea rdi, [rsp+2D8h+var_238]; this
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
loc_55BAE:
mov rbx, [rsp+2D8h+var_298]
test rbx, rbx
jnz short loc_55BCF
call __ZNSt6thread20hardware_concurrencyEv; std::thread::hardware_concurrency(void)
cmp eax, 5
setnb cl
mov edx, eax
shr edx, cl
test eax, eax
push 4
pop rbx
cmovnz ebx, edx
loc_55BCF:
lea rdi, [rsp+2D8h+var_2B0]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable()
mov eax, ebx
add rsp, 2A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
jmp short loc_55C3C
mov rbx, rax
jmp short loc_55C09
mov rbx, rax
jmp short loc_55C16
mov rbx, rax
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_55C09:
lea rdi, [rsp+arg_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_55C16:
lea rdi, [rsp+arg_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_55C3C
mov rbx, rax
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+arg_98]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
loc_55C3C:
lea rdi, [rsp+arg_20]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable()
mov rdi, rbx
call __Unwind_Resume
| long long get_num_physical_cores(std::thread *a1)
{
unsigned long long v1; // rsi
unsigned int i; // r13d
_QWORD *v3; // rax
unsigned int v4; // ebx
unsigned int v5; // eax
_QWORD v7[2]; // [rsp+8h] [rbp-2D0h] BYREF
char v8; // [rsp+18h] [rbp-2C0h] BYREF
_QWORD v9[2]; // [rsp+28h] [rbp-2B0h] BYREF
__int128 v10; // [rsp+38h] [rbp-2A0h]
int v11; // [rsp+48h] [rbp-290h]
__int128 v12; // [rsp+50h] [rbp-288h] BYREF
_BYTE v13[32]; // [rsp+60h] [rbp-278h] BYREF
_BYTE v14[32]; // [rsp+80h] [rbp-258h] BYREF
_BYTE v15[120]; // [rsp+A0h] [rbp-238h] BYREF
_BYTE v16[448]; // [rsp+118h] [rbp-1C0h] BYREF
v9[0] = (char *)&v12 + 8;
v9[1] = 1LL;
v10 = 0LL;
v11 = 1065353216;
v12 = 0LL;
v1 = 0LL;
for ( i = 0; ++i; v1 = i )
{
std::to_string((std::__cxx11 *)v13, v1);
std::operator+<char>((long long)v14, (long long)"/sys/devices/system/cpu", (long long)v13);
std::operator+<char>((long long)v7, (long long)v14, (long long)"/topology/thread_siblings");
v1 = (unsigned long long)v7;
std::ifstream::basic_ifstream(v15, v7, 8LL);
std::string::~string(v7);
std::string::~string(v14);
std::string::~string(v13);
if ( !(unsigned __int8)std::__basic_file<char>::is_open(v16) )
{
a1 = (std::thread *)v15;
std::ifstream::~ifstream(v15);
break;
}
v7[0] = &v8;
v7[1] = 0LL;
v8 = 0;
v3 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(v15, v7);
if ( (*((_BYTE *)v3 + *(_QWORD *)(*v3 - 24LL) + 32) & 5) == 0 )
std::__detail::_Insert_base<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::insert(
v9,
v7);
std::string::~string(v7);
a1 = (std::thread *)v15;
std::ifstream::~ifstream(v15);
}
v4 = DWORD2(v10);
if ( !*((_QWORD *)&v10 + 1) )
{
v5 = std::thread::hardware_concurrency(a1);
v4 = 4;
if ( v5 )
v4 = v5 >> (v5 >= 5);
}
std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable(
v9,
v1);
return v4;
}
| get_num_physical_cores:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x2a8
LEA RAX,[RSP + 0x58]
MOV qword ptr [RAX + -0x30],RAX
MOV qword ptr [RAX + -0x28],0x1
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + -0x20],XMM0
MOV dword ptr [RAX + -0x10],0x3f800000
MOVUPS xmmword ptr [RAX + -0x8],XMM0
XOR ESI,ESI
LEA R14,[RSP + 0x60]
LEA R12,[RSP + 0x80]
LEA RBP,[RSP + 0x8]
LEA RBX,[RSP + 0xa0]
PUSH 0x8
POP R15
XOR R13D,R13D
LAB_00155ae2:
INC R13D
JZ 0x00155bae
LAB_00155aeb:
MOV RDI,R14
CALL 0x0015641b
LAB_00155af3:
MOV RDI,R12
LEA RSI,[0x19f3c0]
MOV RDX,R14
CALL 0x0011a061
LAB_00155b05:
MOV RDI,RBP
MOV RSI,R12
LEA RDX,[0x19f3d8]
CALL 0x00119fcc
LAB_00155b17:
MOV RDI,RBX
MOV RSI,RBP
MOV EDX,R15D
CALL 0x0010a9e0
MOV RDI,RBP
CALL 0x0010ac60
MOV RDI,R12
CALL 0x0010ac60
MOV RDI,R14
CALL 0x0010ac60
LEA RDI,[RSP + 0x118]
CALL 0x0010a100
TEST AL,AL
JZ 0x00155ba1
LEA RAX,[RSP + 0x18]
MOV qword ptr [RSP + 0x8],RAX
AND qword ptr [RSP + 0x10],0x0
MOV byte ptr [RSP + 0x18],0x0
LAB_00155b63:
MOV RDI,RBX
MOV RSI,RBP
CALL 0x0010a0c0
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5
JNZ 0x00155b89
LEA RDI,[RSP + 0x28]
MOV RSI,RBP
CALL 0x0015661c
LAB_00155b89:
MOV RDI,RBP
CALL 0x0010ac60
MOV RDI,RBX
CALL 0x0010a120
MOV ESI,R13D
JMP 0x00155ae2
LAB_00155ba1:
LEA RDI,[RSP + 0xa0]
CALL 0x0010a120
LAB_00155bae:
MOV RBX,qword ptr [RSP + 0x40]
TEST RBX,RBX
JNZ 0x00155bcf
CALL 0x0010a830
CMP EAX,0x5
SETNC CL
MOV EDX,EAX
SHR EDX,CL
TEST EAX,EAX
PUSH 0x4
POP RBX
CMOVNZ EBX,EDX
LAB_00155bcf:
LEA RDI,[RSP + 0x28]
CALL 0x0015650c
MOV EAX,EBX
ADD RSP,0x2a8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong get_num_physical_cores(void)
{
char cVar1;
uint uVar2;
istream *piVar3;
ulong uVar4;
int1 *local_2d0;
int8 local_2c8;
int1 local_2c0 [16];
int8 *local_2b0;
int8 local_2a8;
int8 local_2a0;
ulong uStack_298;
int4 local_290;
int8 local_288;
int8 uStack_280;
__cxx11 local_278 [32];
string local_258 [32];
istream local_238 [520];
local_2b0 = &uStack_280;
local_2a8 = 1;
local_2a0 = 0;
uStack_298 = 0;
local_290 = 0x3f800000;
local_288 = 0;
uStack_280 = 0;
uVar2 = 0;
do {
if (uVar2 + 1 == 0) {
LAB_00155bae:
uVar4 = uStack_298;
if (uStack_298 == 0) {
uVar2 = std::thread::hardware_concurrency();
uVar4 = 4;
if (uVar2 != 0) {
uVar4 = (ulong)(uVar2 >> (4 < uVar2));
}
}
std::
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
::~_Hashtable((_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
*)&local_2b0);
return uVar4 & 0xffffffff;
}
/* try { // try from 00155aeb to 00155af2 has its CatchHandler @ 00155bed */
std::__cxx11::to_string(local_278,uVar2);
/* try { // try from 00155af3 to 00155b04 has its CatchHandler @ 00155bf7 */
std::operator+((char *)local_258,(string *)0x19f3c0);
/* try { // try from 00155b05 to 00155b16 has its CatchHandler @ 00155bf2 */
std::operator+((string *)&local_2d0,(char *)local_258);
/* try { // try from 00155b17 to 00155b24 has its CatchHandler @ 00155bfc */
std::ifstream::ifstream((ifstream *)local_238,(string *)&local_2d0,8);
std::__cxx11::string::~string((string *)&local_2d0);
std::__cxx11::string::~string(local_258);
std::__cxx11::string::~string((string *)local_278);
cVar1 = std::__basic_file<char>::is_open();
if (cVar1 == '\0') {
std::ifstream::~ifstream((ifstream *)local_238);
goto LAB_00155bae;
}
local_2d0 = local_2c0;
local_2c8 = 0;
local_2c0[0] = 0;
/* try { // try from 00155b63 to 00155b88 has its CatchHandler @ 00155c22 */
piVar3 = std::getline<char,std::char_traits<char>,std::allocator<char>>
(local_238,(string *)&local_2d0);
if (((byte)piVar3[*(long *)(*(long *)piVar3 + -0x18) + 0x20] & 5) == 0) {
std::__detail::
_Insert_base<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
::insert((string *)&local_2b0);
}
std::__cxx11::string::~string((string *)&local_2d0);
std::ifstream::~ifstream((ifstream *)local_238);
uVar2 = uVar2 + 1;
} while( true );
}
| |
26,539 | get_num_physical_cores | 7CodeWizard[P]stablediffusion/util.cpp | int32_t get_num_physical_cores() {
#ifdef __linux__
// enumerate the set of thread siblings, num entries is num cores
std::unordered_set<std::string> siblings;
for (uint32_t cpu = 0; cpu < UINT32_MAX; ++cpu) {
std::ifstream thread_siblings("/sys/devices/system/cpu" + std::to_string(cpu) + "/topology/thread_siblings");
if (!thread_siblings.is_open()) {
break; // no more cpus
}
std::string line;
if (std::getline(thread_siblings, line)) {
siblings.insert(line);
}
}
if (siblings.size() > 0) {
return static_cast<int32_t>(siblings.size());
}
#elif defined(__APPLE__) && defined(__MACH__)
int32_t num_physical_cores;
size_t len = sizeof(num_physical_cores);
int result = sysctlbyname("hw.perflevel0.physicalcpu", &num_physical_cores, &len, NULL, 0);
if (result == 0) {
return num_physical_cores;
}
result = sysctlbyname("hw.physicalcpu", &num_physical_cores, &len, NULL, 0);
if (result == 0) {
return num_physical_cores;
}
#elif defined(_WIN32)
// TODO: Implement
#endif
unsigned int n_threads = std::thread::hardware_concurrency();
return n_threads > 0 ? (n_threads <= 4 ? n_threads : n_threads / 2) : 4;
} | O3 | cpp | get_num_physical_cores:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2a8, %rsp # imm = 0x2A8
leaq 0x98(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
leaq 0x38(%rsp), %rbp
leaq 0x18(%rsp), %r13
xorl %r14d, %r14d
leaq 0x48(%rsp), %r12
leaq 0xa0(%rsp), %rbx
movl $0xd1b71759, %esi # imm = 0xD1B71759
movl $0x1, %eax
cmpl $0xa, %r14d
jb 0x78d1b
movl $0x4, %eax
movl %r14d, %ecx
cmpl $0x63, %ecx
jbe 0x78d14
cmpl $0x3e7, %ecx # imm = 0x3E7
jbe 0x78d19
cmpl $0x2710, %ecx # imm = 0x2710
jb 0x78d1b
movl %ecx, %edx
imulq %rsi, %rdx
shrq $0x2d, %rdx
addl $0x4, %eax
cmpl $0x1869f, %ecx # imm = 0x1869F
movl %edx, %ecx
ja 0x78ce3
addl $-0x3, %eax
jmp 0x78d1b
addl $-0x2, %eax
jmp 0x78d1b
decl %eax
movq %rbp, %r15
movl %eax, %esi
leaq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
movq %r12, %rbp
movq %r12, %rdi
xorl %edx, %edx
callq 0xa6c0
movq 0x48(%rsp), %rdi
movl 0x50(%rsp), %esi
movl %r14d, %edx
callq 0x2eaa5
movl $0x17, %r8d
movq %rbp, %r12
movq %rbp, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x49761(%rip), %rcx # 0xc24c0
callq 0xa670
movq %r15, %rbp
movq %r15, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x78d8a
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x78d91
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x28(%rsp), %rdi
leaq 0x49723(%rip), %rsi # 0xc24d8
callq 0xabe0
movq %r13, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x78ddd
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x78de5
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
leaq 0x8(%rsp), %rsi
movl $0x8, %edx
callq 0xa9e0
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x78e26
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa5d0
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x78e3d
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xa5d0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x78e59
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xa5d0
leaq 0x118(%rsp), %rdi
callq 0xa100
testb %al, %al
je 0x78f04
movq %r13, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
movq 0xa0(%rsp), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xa5a0
movsbl %al, %edx
movq %rbx, %rdi
leaq 0x8(%rsp), %rsi
callq 0xab80
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x78ed1
leaq 0x68(%rsp), %rdi
movq %rdi, 0x28(%rsp)
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x79ca4
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x78ee8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa5d0
movq %rbx, %rdi
callq 0xa110
incl %r14d
cmpl $-0x1, %r14d
movl $0xd1b71759, %esi # imm = 0xD1B71759
jne 0x78cd0
jmp 0x78f11
leaq 0xa0(%rsp), %rdi
callq 0xa110
movq 0x80(%rsp), %rbx
testq %rbx, %rbx
jne 0x78f37
callq 0xa820
cmpl $0x5, %eax
setae %cl
movl %eax, %edx
shrl %cl, %edx
testl %eax, %eax
movl $0x4, %ebx
cmovnel %edx, %ebx
leaq 0x68(%rsp), %rdi
callq 0x79c06
movl %ebx, %eax
addq $0x2a8, %rsp # imm = 0x2A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x78f79
movq %rax, %rbx
jmp 0x78fda
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x78f79
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa5d0
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x78f95
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xa5d0
jmp 0x78f95
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x78fda
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xa5d0
jmp 0x78fda
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x78fcd
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa5d0
leaq 0xa0(%rsp), %rdi
callq 0xa110
leaq 0x68(%rsp), %rdi
callq 0x79c06
movq %rbx, %rdi
callq 0xaad0
| get_num_physical_cores:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 2A8h
lea rax, [rsp+2D8h+var_240]
mov [rax-30h], rax
mov qword ptr [rax-28h], 1
xorps xmm0, xmm0
movups xmmword ptr [rax-20h], xmm0
mov dword ptr [rax-10h], 3F800000h
movups xmmword ptr [rax-8], xmm0
lea rbp, [rsp+2D8h+var_2A0]
lea r13, [rsp+2D8h+var_2C0]
xor r14d, r14d
lea r12, [rsp+2D8h+var_290]
lea rbx, [rsp+2D8h+var_238]
mov esi, 0D1B71759h
loc_78CD0:
mov eax, 1
cmp r14d, 0Ah
jb short loc_78D1B
mov eax, 4
mov ecx, r14d
loc_78CE3:
cmp ecx, 63h ; 'c'
jbe short loc_78D14
cmp ecx, 3E7h
jbe short loc_78D19
cmp ecx, 2710h
jb short loc_78D1B
mov edx, ecx
imul rdx, rsi
shr rdx, 2Dh
add eax, 4
cmp ecx, 1869Fh
mov ecx, edx
ja short loc_78CE3
add eax, 0FFFFFFFDh
jmp short loc_78D1B
loc_78D14:
add eax, 0FFFFFFFEh
jmp short loc_78D1B
loc_78D19:
dec eax
loc_78D1B:
mov r15, rbp
mov esi, eax
lea rax, [rsp+2D8h+var_280]
mov [rsp+2D8h+var_290], rax
mov rbp, r12
mov rdi, r12
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov rdi, [rsp+2D8h+var_290]
mov esi, [rsp+2D8h+var_288]
mov edx, r14d
call _ZNSt8__detail18__to_chars_10_implIjEEvPcjT_; std::__detail::__to_chars_10_impl<uint>(char *,uint,uint)
mov r8d, 17h
mov r12, rbp
mov rdi, rbp
xor esi, esi
xor edx, edx
lea rcx, aSysDevicesSyst; "/sys/devices/system/cpu"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
mov rbp, r15
mov [rsp+2D8h+var_2B0], r15
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_78D8A
mov [rsp+2D8h+var_2B0], rdx
mov rdx, [rcx]
mov [rsp+2D8h+var_2A0], rdx
jmp short loc_78D91
loc_78D8A:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rbp+0], xmm0
loc_78D91:
mov rdx, [rax+8]
mov [rsp+2D8h+var_2A8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rdi, [rsp+2D8h+var_2B0]
lea rsi, aTopologyThread; "/topology/thread_siblings"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov [rsp+2D8h+var_2D0], r13
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_78DDD
mov [rsp+2D8h+var_2D0], rdx
mov rdx, [rcx]
mov [rsp+2D8h+var_2C0], rdx
jmp short loc_78DE5
loc_78DDD:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r13+0], xmm0
loc_78DE5:
mov rdx, [rax+8]
mov [rsp+2D8h+var_2C8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rdi, rbx
lea rsi, [rsp+2D8h+var_2D0]
mov edx, 8
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode; std::ifstream::basic_ifstream(std::string const&,std::_Ios_Openmode)
mov rdi, [rsp+2D8h+var_2D0]; void *
cmp rdi, r13
jz short loc_78E26
mov rsi, [rsp+2D8h+var_2C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_78E26:
mov rdi, [rsp+2D8h+var_2B0]; void *
cmp rdi, rbp
jz short loc_78E3D
mov rsi, [rsp+2D8h+var_2A0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_78E3D:
mov rdi, [rsp+2D8h+var_290]; void *
lea rax, [rsp+2D8h+var_280]
cmp rdi, rax
jz short loc_78E59
mov rsi, [rsp+2D8h+var_280]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_78E59:
lea rdi, [rsp+2D8h+var_1C0]
call __ZNKSt12__basic_fileIcE7is_openEv; std::__basic_file<char>::is_open(void)
test al, al
jz loc_78F04
mov [rsp+2D8h+var_2D0], r13
mov [rsp+2D8h+var_2C8], 0
mov byte ptr [rsp+2D8h+var_2C0], 0
mov rax, [rsp+2D8h+var_238]
mov rdi, [rax-18h]
add rdi, rbx
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx edx, al
mov rdi, rbx
lea rsi, [rsp+2D8h+var_2D0]
call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &,char)
mov rcx, [rax]
mov rcx, [rcx-18h]
test byte ptr [rax+rcx+20h], 5
jnz short loc_78ED1
lea rdi, [rsp+2D8h+var_270]
mov [rsp+2D8h+var_2B0], rdi
lea rsi, [rsp+2D8h+var_2D0]
lea rdx, [rsp+2D8h+var_2B0]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE9_M_insertIRKS5_NS7_10_AllocNodeISaINS7_10_Hash_nodeIS5_Lb1EEEEEEEESt4pairINS7_14_Node_iteratorIS5_Lb1ELb1EEEbEOT_RKT0_St17integral_constantIbLb1EE; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_insert<std::string const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::string,true>>>>(std::string const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::string,true>>> const&,std::integral_constant<bool,true>)
loc_78ED1:
mov rdi, [rsp+2D8h+var_2D0]; void *
cmp rdi, r13
jz short loc_78EE8
mov rsi, [rsp+2D8h+var_2C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_78EE8:
mov rdi, rbx
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
inc r14d
cmp r14d, 0FFFFFFFFh
mov esi, 0D1B71759h
jnz loc_78CD0
jmp short loc_78F11
loc_78F04:
lea rdi, [rsp+2D8h+var_238]; this
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
loc_78F11:
mov rbx, [rsp+2D8h+var_258]
test rbx, rbx
jnz short loc_78F37
call __ZNSt6thread20hardware_concurrencyEv; std::thread::hardware_concurrency(void)
cmp eax, 5
setnb cl
mov edx, eax
shr edx, cl
test eax, eax
mov ebx, 4
cmovnz ebx, edx
loc_78F37:
lea rdi, [rsp+2D8h+var_270]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable()
mov eax, ebx
add rsp, 2A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
jmp short loc_78F79
mov rbx, rax
jmp short loc_78FDA
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r13
jz short loc_78F79
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_78F79:
mov rdi, [rsp+arg_20]; void *
cmp rdi, r15
jz short loc_78F95
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_78F95
mov rbx, rax
loc_78F95:
mov rdi, [rsp+arg_40]; void *
lea rax, [rsp+arg_50]
cmp rdi, rax
jz short loc_78FDA
mov rsi, [rsp+arg_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_78FDA
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r13
jz short loc_78FCD
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_78FCD:
lea rdi, [rsp+arg_98]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
loc_78FDA:
lea rdi, [rsp+arg_60]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable()
mov rdi, rbx
call __Unwind_Resume
| long long get_num_physical_cores()
{
unsigned int v0; // r14d
unsigned int v1; // eax
unsigned int v2; // ecx
bool v3; // cc
long long v4; // rax
__int128 *v5; // rcx
long long v6; // rax
__int128 *v7; // rcx
long long v8; // rsi
char v9; // al
_QWORD *v10; // rax
int v11; // r8d
int v12; // r9d
long long v13; // rcx
unsigned int v14; // ebx
unsigned int v15; // eax
char v17; // [rsp+0h] [rbp-2D8h]
void *v18; // [rsp+8h] [rbp-2D0h] BYREF
long long v19; // [rsp+10h] [rbp-2C8h]
__int128 v20; // [rsp+18h] [rbp-2C0h] BYREF
void *v21[2]; // [rsp+28h] [rbp-2B0h] BYREF
__int128 v22; // [rsp+38h] [rbp-2A0h] BYREF
void *v23; // [rsp+48h] [rbp-290h] BYREF
int v24; // [rsp+50h] [rbp-288h]
_QWORD v25[2]; // [rsp+58h] [rbp-280h] BYREF
_QWORD v26[2]; // [rsp+68h] [rbp-270h] BYREF
__int128 v27; // [rsp+78h] [rbp-260h]
int v28; // [rsp+88h] [rbp-250h]
__int128 v29; // [rsp+90h] [rbp-248h] BYREF
_QWORD v30[15]; // [rsp+A0h] [rbp-238h] BYREF
_BYTE v31[448]; // [rsp+118h] [rbp-1C0h] BYREF
v26[0] = (char *)&v29 + 8;
v26[1] = 1LL;
v27 = 0LL;
v28 = 1065353216;
v29 = 0LL;
v0 = 0;
while ( 1 )
{
v1 = 1;
if ( v0 >= 0xA )
{
v1 = 4;
v2 = v0;
while ( 1 )
{
if ( v2 <= 0x63 )
{
v1 -= 2;
goto LABEL_11;
}
if ( v2 <= 0x3E7 )
break;
if ( v2 < 0x2710 )
goto LABEL_11;
v1 += 4;
v3 = v2 <= 0x1869F;
v2 /= 0x2710u;
if ( v3 )
{
v1 -= 3;
goto LABEL_11;
}
}
--v1;
}
LABEL_11:
v23 = v25;
std::string::_M_construct(&v23, v1, 0LL);
std::__detail::__to_chars_10_impl<unsigned int>((char *)v23, v24, v0);
v4 = std::string::replace(&v23, 0LL, 0LL, "/sys/devices/system/cpu", 23LL);
v21[0] = &v22;
v5 = (__int128 *)(v4 + 16);
if ( *(_QWORD *)v4 == v4 + 16 )
{
v22 = *v5;
}
else
{
v21[0] = *(void **)v4;
*(_QWORD *)&v22 = *(_QWORD *)v5;
}
v21[1] = *(void **)(v4 + 8);
*(_QWORD *)v4 = v5;
*(_QWORD *)(v4 + 8) = 0LL;
*(_BYTE *)(v4 + 16) = 0;
v6 = std::string::append(v21, "/topology/thread_siblings");
v18 = &v20;
v7 = (__int128 *)(v6 + 16);
if ( *(_QWORD *)v6 == v6 + 16 )
{
v20 = *v7;
}
else
{
v18 = *(void **)v6;
*(_QWORD *)&v20 = *(_QWORD *)v7;
}
v19 = *(_QWORD *)(v6 + 8);
*(_QWORD *)v6 = v7;
*(_QWORD *)(v6 + 8) = 0LL;
*(_BYTE *)(v6 + 16) = 0;
v8 = (long long)&v18;
std::ifstream::basic_ifstream(v30, &v18, 8LL);
if ( v18 != &v20 )
{
v8 = v20 + 1;
operator delete(v18, v20 + 1);
}
if ( v21[0] != &v22 )
{
v8 = v22 + 1;
operator delete(v21[0], v22 + 1);
}
if ( v23 != v25 )
{
v8 = v25[0] + 1LL;
operator delete(v23, v25[0] + 1LL);
}
if ( !(unsigned __int8)std::__basic_file<char>::is_open(v31) )
break;
v18 = &v20;
v19 = 0LL;
LOBYTE(v20) = 0;
v9 = std::ios::widen((char *)v30 + *(_QWORD *)(v30[0] - 24LL), 10LL);
v10 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(v30, &v18, (unsigned int)v9);
v13 = *(_QWORD *)(*v10 - 24LL);
if ( (*((_BYTE *)v10 + v13 + 32) & 5) == 0 )
{
v21[0] = v26;
std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_insert<std::string const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::string,true>>>>(
(unsigned int)v26,
(unsigned int)&v18,
(unsigned int)v21,
v13,
v11,
v12,
v17);
}
if ( v18 != &v20 )
operator delete(v18, v20 + 1);
std::ifstream::~ifstream(v30);
++v0;
v8 = 3518437209LL;
if ( v0 == -1 )
goto LABEL_31;
}
std::ifstream::~ifstream(v30);
LABEL_31:
v14 = DWORD2(v27);
if ( !*((_QWORD *)&v27 + 1) )
{
v15 = std::thread::hardware_concurrency((std::thread *)v30);
v14 = 4;
if ( v15 )
v14 = v15 >> (v15 >= 5);
}
std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable(
v26,
v8);
return v14;
}
| |||
26,540 | get_scale_shuffle_q3k | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu-quants.c | static inline __m256i get_scale_shuffle_q3k(int i) {
static const uint8_t k_shuffle[128] = {
0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3,
4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7,
8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 10,11,10,11,10,11,10,11,10,11,10,11,10,11,10,11,
12,13,12,13,12,13,12,13,12,13,12,13,12,13,12,13, 14,15,14,15,14,15,14,15,14,15,14,15,14,15,14,15,
};
return _mm256_loadu_si256((const __m256i*)k_shuffle + i);
} | O0 | c | get_scale_shuffle_q3k:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movslq -0xc(%rbp), %rcx
leaq 0x1db7e(%rip), %rax # 0x80d80
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
vmovdqu (%rax), %ymm0
popq %rbp
retq
nopw (%rax,%rax)
| get_scale_shuffle_q3k:
push rbp
mov rbp, rsp
mov [rbp+var_C], edi
movsxd rcx, [rbp+var_C]
lea rax, get_scale_shuffle_q3k_k_shuffle
shl rcx, 5
add rax, rcx
mov [rbp+var_8], rax
mov rax, [rbp+var_8]
vmovdqu ymm0, ymmword ptr [rax]
pop rbp
retn
| char * get_scale_shuffle_q3k(int a1)
{
char *result; // rax
result = (char *)&get_scale_shuffle_q3k_k_shuffle + 32 * a1;
__asm { vmovdqu ymm0, ymmword ptr [rax] }
return result;
}
| get_scale_shuffle_q3k:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0xc],EDI
MOVSXD RCX,dword ptr [RBP + -0xc]
LEA RAX,[0x180d80]
SHL RCX,0x5
ADD RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x8]
VMOVDQU YMM0,ymmword ptr [RAX]
POP RBP
RET
|
int8 get_scale_shuffle_q3k(int param_1)
{
return *(int8 *)(get_scale_shuffle_q3k_k_shuffle + (long)param_1 * 0x20);
}
| |
26,541 | minja::FilterNode::FilterNode(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::TemplateNode>&&) | monkey531[P]llama/common/minja.hpp | TemplateNode(const Location & location) : location_(location) {} | O3 | cpp | minja::FilterNode::FilterNode(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::TemplateNode>&&):
leaq 0x9146f(%rip), %rax # 0x154fb8
addq $0x10, %rax
movq %rax, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0xc3b7a
movq 0x92415(%rip), %r8 # 0x155f80
cmpb $0x0, (%r8)
je 0xc3b76
incl 0x8(%rax)
jmp 0xc3b7a
lock
incl 0x8(%rax)
movq 0x10(%rsi), %rax
movq %rax, 0x18(%rdi)
leaq 0x9195f(%rip), %rax # 0x1554e8
addq $0x10, %rax
movq %rax, (%rdi)
xorl %eax, %eax
movq %rax, 0x28(%rdi)
movups (%rdx), %xmm0
movq %rax, 0x8(%rdx)
movups %xmm0, 0x20(%rdi)
movq %rax, (%rdx)
movq %rax, 0x38(%rdi)
movups (%rcx), %xmm0
movq %rax, 0x8(%rcx)
movups %xmm0, 0x30(%rdi)
movq %rax, (%rcx)
retq
nop
| _ZN5minja10FilterNodeC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEEOS4_INS_12TemplateNodeEE:
lea rax, _ZTVN5minja12TemplateNodeE; `vtable for'minja::TemplateNode
add rax, 10h
mov [rdi], rax
mov rax, [rsi]
mov [rdi+8], rax
mov rax, [rsi+8]
mov [rdi+10h], rax
test rax, rax
jz short loc_C3B7A
mov r8, cs:__libc_single_threaded_ptr
cmp byte ptr [r8], 0
jz short loc_C3B76
inc dword ptr [rax+8]
jmp short loc_C3B7A
loc_C3B76:
lock inc dword ptr [rax+8]
loc_C3B7A:
mov rax, [rsi+10h]
mov [rdi+18h], rax
lea rax, _ZTVN5minja10FilterNodeE; `vtable for'minja::FilterNode
add rax, 10h
mov [rdi], rax
xor eax, eax
mov [rdi+28h], rax
movups xmm0, xmmword ptr [rdx]
mov [rdx+8], rax
movups xmmword ptr [rdi+20h], xmm0
mov [rdx], rax
mov [rdi+38h], rax
movups xmm0, xmmword ptr [rcx]
mov [rcx+8], rax
movups xmmword ptr [rdi+30h], xmm0
mov [rcx], rax
retn
| long long minja::FilterNode::FilterNode(long long a1, _QWORD *a2, __int128 *a3, __int128 *a4)
{
long long v4; // rax
long long result; // rax
__int128 v6; // xmm0
__int128 v7; // xmm0
*(_QWORD *)a1 = &`vtable for'minja::TemplateNode + 2;
*(_QWORD *)(a1 + 8) = *a2;
v4 = a2[1];
*(_QWORD *)(a1 + 16) = v4;
if ( v4 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v4 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v4 + 8));
}
*(_QWORD *)(a1 + 24) = a2[2];
*(_QWORD *)a1 = &`vtable for'minja::FilterNode + 2;
result = 0LL;
*(_QWORD *)(a1 + 40) = 0LL;
v6 = *a3;
*((_QWORD *)a3 + 1) = 0LL;
*(_OWORD *)(a1 + 32) = v6;
*(_QWORD *)a3 = 0LL;
*(_QWORD *)(a1 + 56) = 0LL;
v7 = *a4;
*((_QWORD *)a4 + 1) = 0LL;
*(_OWORD *)(a1 + 48) = v7;
*(_QWORD *)a4 = 0LL;
return result;
}
| FilterNode:
LEA RAX,[0x254fb8]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI + 0x8],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x10],RAX
TEST RAX,RAX
JZ 0x001c3b7a
MOV R8,qword ptr [0x00255f80]
CMP byte ptr [R8],0x0
JZ 0x001c3b76
INC dword ptr [RAX + 0x8]
JMP 0x001c3b7a
LAB_001c3b76:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001c3b7a:
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RDI + 0x18],RAX
LEA RAX,[0x2554e8]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x28],RAX
MOVUPS XMM0,xmmword ptr [RDX]
MOV qword ptr [RDX + 0x8],RAX
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOV qword ptr [RDX],RAX
MOV qword ptr [RDI + 0x38],RAX
MOVUPS XMM0,xmmword ptr [RCX]
MOV qword ptr [RCX + 0x8],RAX
MOVUPS xmmword ptr [RDI + 0x30],XMM0
MOV qword ptr [RCX],RAX
RET
|
/* minja::FilterNode::FilterNode(minja::Location const&, std::shared_ptr<minja::Expression>&&,
std::shared_ptr<minja::TemplateNode>&&) */
void __thiscall
minja::FilterNode::FilterNode
(FilterNode *this,Location *param_1,shared_ptr *param_2,shared_ptr *param_3)
{
long lVar1;
int8 uVar2;
*(int ***)this = &PTR___cxa_pure_virtual_00254fc8;
*(int8 *)(this + 8) = *(int8 *)param_1;
lVar1 = *(long *)(param_1 + 8);
*(long *)(this + 0x10) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_00255f80 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10);
*(int ***)this = &PTR_do_render_002554f8;
*(int8 *)(this + 0x28) = 0;
uVar2 = *(int8 *)(param_2 + 8);
*(int8 *)(param_2 + 8) = 0;
*(int8 *)(this + 0x20) = *(int8 *)param_2;
*(int8 *)(this + 0x28) = uVar2;
*(int8 *)param_2 = 0;
*(int8 *)(this + 0x38) = 0;
uVar2 = *(int8 *)(param_3 + 8);
*(int8 *)(param_3 + 8) = 0;
*(int8 *)(this + 0x30) = *(int8 *)param_3;
*(int8 *)(this + 0x38) = uVar2;
*(int8 *)param_3 = 0;
return;
}
| |
26,542 | LefDefParser::defiGeometries::startList(int, int) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiMisc.cpp | void defiGeometries::startList(int x, int y) {
if (pointsAllocated_ == 0) {
pointsAllocated_ = 16;
x_ = (int*)malloc(sizeof(int)*16);
y_ = (int*)malloc(sizeof(int)*16);
numPoints_ = 0;
} else // reset the numPoints to 0
numPoints_ = 0;
addToList(x, y);
} | O0 | cpp | LefDefParser::defiGeometries::startList(int, int):
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movl %edx, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
cmpl $0x0, 0x4(%rax)
jne 0x2a7ed
movq (%rsp), %rax
movl $0x10, 0x4(%rax)
movl $0x40, %edi
callq 0x72d0
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x8(%rax)
movl $0x40, %edi
callq 0x72d0
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x10(%rax)
movl $0x0, (%rax)
jmp 0x2a7f7
movq (%rsp), %rax
movl $0x0, (%rax)
movq (%rsp), %rdi
movl 0xc(%rsp), %esi
movl 0x8(%rsp), %edx
callq 0x2a810
addq $0x18, %rsp
retq
nopl (%rax)
| _ZN12LefDefParser14defiGeometries9startListEii:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov [rsp+18h+var_C], esi
mov [rsp+18h+var_10], edx
mov rax, [rsp+18h+var_8]
mov [rsp+18h+var_18], rax
cmp dword ptr [rax+4], 0
jnz short loc_2A7ED
mov rax, [rsp+18h+var_18]
mov dword ptr [rax+4], 10h
mov edi, 40h ; '@'
call _malloc
mov rcx, rax
mov rax, [rsp+18h+var_18]
mov [rax+8], rcx
mov edi, 40h ; '@'
call _malloc
mov rcx, rax
mov rax, [rsp+18h+var_18]
mov [rax+10h], rcx
mov dword ptr [rax], 0
jmp short loc_2A7F7
loc_2A7ED:
mov rax, [rsp+18h+var_18]
mov dword ptr [rax], 0
loc_2A7F7:
mov rdi, [rsp+18h+var_18]; this
mov esi, [rsp+18h+var_C]; int
mov edx, [rsp+18h+var_10]; int
call _ZN12LefDefParser14defiGeometries9addToListEii; LefDefParser::defiGeometries::addToList(int,int)
add rsp, 18h
retn
| long long LefDefParser::defiGeometries::startList(LefDefParser::defiGeometries *this, int a2, int a3)
{
if ( !*((_DWORD *)this + 1) )
{
*((_DWORD *)this + 1) = 16;
*((_QWORD *)this + 1) = malloc(64LL);
*((_QWORD *)this + 2) = malloc(64LL);
}
*(_DWORD *)this = 0;
return LefDefParser::defiGeometries::addToList(this, a2, a3);
}
| startList:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV dword ptr [RSP + 0xc],ESI
MOV dword ptr [RSP + 0x8],EDX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP],RAX
CMP dword ptr [RAX + 0x4],0x0
JNZ 0x0012a7ed
MOV RAX,qword ptr [RSP]
MOV dword ptr [RAX + 0x4],0x10
MOV EDI,0x40
CALL 0x001072d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RAX + 0x8],RCX
MOV EDI,0x40
CALL 0x001072d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RAX + 0x10],RCX
MOV dword ptr [RAX],0x0
JMP 0x0012a7f7
LAB_0012a7ed:
MOV RAX,qword ptr [RSP]
MOV dword ptr [RAX],0x0
LAB_0012a7f7:
MOV RDI,qword ptr [RSP]
MOV ESI,dword ptr [RSP + 0xc]
MOV EDX,dword ptr [RSP + 0x8]
CALL 0x0012a810
ADD RSP,0x18
RET
|
/* LefDefParser::defiGeometries::startList(int, int) */
void __thiscall
LefDefParser::defiGeometries::startList(defiGeometries *this,int param_1,int param_2)
{
void *pvVar1;
if (*(int *)(this + 4) == 0) {
*(int4 *)(this + 4) = 0x10;
pvVar1 = malloc(0x40);
*(void **)(this + 8) = pvVar1;
pvVar1 = malloc(0x40);
*(void **)(this + 0x10) = pvVar1;
*(int4 *)this = 0;
}
else {
*(int4 *)this = 0;
}
addToList(this,param_1,param_2);
return;
}
| |
26,543 | LefDefParser::defiGeometries::startList(int, int) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiMisc.cpp | void defiGeometries::startList(int x, int y) {
if (pointsAllocated_ == 0) {
pointsAllocated_ = 16;
x_ = (int*)malloc(sizeof(int)*16);
y_ = (int*)malloc(sizeof(int)*16);
numPoints_ = 0;
} else // reset the numPoints to 0
numPoints_ = 0;
addToList(x, y);
} | O3 | cpp | LefDefParser::defiGeometries::startList(int, int):
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
cmpl $0x0, 0x4(%rdi)
jne 0x1bbf3
movl $0x10, 0x4(%r14)
movl $0x40, %edi
callq 0x7270
movq %rax, 0x8(%r14)
movl $0x40, %edi
callq 0x7270
movq %rax, 0x10(%r14)
movl $0x0, (%r14)
movq %r14, %rdi
movl %ebp, %esi
movl %ebx, %edx
popq %rbx
popq %r14
popq %rbp
jmp 0x1bc0a
| _ZN12LefDefParser14defiGeometries9startListEii:
push rbp
push r14
push rbx
mov ebx, edx
mov ebp, esi
mov r14, rdi
cmp dword ptr [rdi+4], 0
jnz short loc_1BBF3
mov dword ptr [r14+4], 10h
mov edi, 40h ; '@'
call _malloc
mov [r14+8], rax
mov edi, 40h ; '@'
call _malloc
mov [r14+10h], rax
loc_1BBF3:
mov dword ptr [r14], 0
mov rdi, r14; this
mov esi, ebp; int
mov edx, ebx; int
pop rbx
pop r14
pop rbp
jmp $+5; LefDefParser::defiGeometries::addToList(int,int)
| long long LefDefParser::defiGeometries::startList(LefDefParser::defiGeometries *this, int a2, int a3)
{
if ( !*((_DWORD *)this + 1) )
{
*((_DWORD *)this + 1) = 16;
*((_QWORD *)this + 1) = malloc(0x40uLL);
*((_QWORD *)this + 2) = malloc(0x40uLL);
}
*(_DWORD *)this = 0;
return LefDefParser::defiGeometries::addToList(this, a2, a3);
}
| startList:
PUSH RBP
PUSH R14
PUSH RBX
MOV EBX,EDX
MOV EBP,ESI
MOV R14,RDI
CMP dword ptr [RDI + 0x4],0x0
JNZ 0x0011bbf3
MOV dword ptr [R14 + 0x4],0x10
MOV EDI,0x40
CALL 0x00107270
MOV qword ptr [R14 + 0x8],RAX
MOV EDI,0x40
CALL 0x00107270
MOV qword ptr [R14 + 0x10],RAX
LAB_0011bbf3:
MOV dword ptr [R14],0x0
MOV RDI,R14
MOV ESI,EBP
MOV EDX,EBX
POP RBX
POP R14
POP RBP
JMP 0x0011bc0a
|
/* LefDefParser::defiGeometries::startList(int, int) */
void __thiscall
LefDefParser::defiGeometries::startList(defiGeometries *this,int param_1,int param_2)
{
void *pvVar1;
if (*(int *)(this + 4) == 0) {
*(int4 *)(this + 4) = 0x10;
pvVar1 = malloc(0x40);
*(void **)(this + 8) = pvVar1;
pvVar1 = malloc(0x40);
*(void **)(this + 0x10) = pvVar1;
}
*(int4 *)this = 0;
addToList(this,param_1,param_2);
return;
}
| |
26,544 | inline_mysql_file_fopen | eloqsql/include/mysql/psi/mysql_file.h | static inline MYSQL_FILE*
inline_mysql_file_fopen(
#ifdef HAVE_PSI_FILE_INTERFACE
PSI_file_key key, const char *src_file, uint src_line,
#endif
const char *filename, int flags, myf myFlags)
{
MYSQL_FILE *that;
that= (MYSQL_FILE*) my_malloc(PSI_NOT_INSTRUMENTED,
sizeof(MYSQL_FILE), MYF(MY_WME));
if (likely(that != NULL))
{
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_STREAM_OPEN,
filename, that);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
that->m_file= my_fopen(filename, flags, myFlags);
that->m_psi= PSI_FILE_CALL(end_file_open_wait)(locker, that->m_file);
if (unlikely(that->m_file == NULL))
{
my_free(that);
return NULL;
}
return that;
}
#endif
that->m_psi= NULL;
that->m_file= my_fopen(filename, flags, myFlags);
if (unlikely(that->m_file == NULL))
{
my_free(that);
return NULL;
}
}
return that;
} | O0 | c | inline_mysql_file_fopen:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movq %r9, -0x38(%rbp)
xorl %edi, %edi
movl $0x10, %edx
movq %rdx, %rsi
callq 0xfc020
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0xe1a39
leaq 0x1e9bf1(%rip), %rax # 0x2cb4e0
movq (%rax), %rax
movq 0x148(%rax), %rax
movl -0xc(%rbp), %esi
movq -0x28(%rbp), %rcx
movq -0x40(%rbp), %r8
leaq -0x90(%rbp), %rdi
movl $0x3, %edx
callq *%rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0xe19db
leaq 0x1e9b9f(%rip), %rax # 0x2cb4e0
movq (%rax), %rax
movq 0x1f0(%rax), %rax
movq -0x48(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq *%rax
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq -0x38(%rbp), %rdx
callq 0xf4700
movq %rax, %rcx
movq -0x40(%rbp), %rax
movq %rcx, (%rax)
leaq 0x1e9b67(%rip), %rax # 0x2cb4e0
movq (%rax), %rax
movq 0x1f8(%rax), %rax
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rcx
movq (%rcx), %rsi
callq *%rax
movq %rax, %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x40(%rbp), %rax
cmpq $0x0, (%rax)
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0xe19d1
movq -0x40(%rbp), %rdi
callq 0xfc3a0
movq $0x0, -0x8(%rbp)
jmp 0xe1a41
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xe1a41
movq -0x40(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq -0x38(%rbp), %rdx
callq 0xf4700
movq %rax, %rcx
movq -0x40(%rbp), %rax
movq %rcx, (%rax)
movq -0x40(%rbp), %rax
cmpq $0x0, (%rax)
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0xe1a37
movq -0x40(%rbp), %rdi
callq 0xfc3a0
movq $0x0, -0x8(%rbp)
jmp 0xe1a41
jmp 0xe1a39
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nop
| inline_mysql_file_fopen:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_C], edi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov [rbp+var_28], rcx
mov [rbp+var_2C], r8d
mov [rbp+var_38], r9
xor edi, edi
mov edx, 10h
mov rsi, rdx
call my_malloc
mov [rbp+var_40], rax
cmp [rbp+var_40], 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 loc_E1A39
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+148h]
mov esi, [rbp+var_C]
mov rcx, [rbp+var_28]
mov r8, [rbp+var_40]
lea rdi, [rbp+var_90]
mov edx, 3
call rax
mov [rbp+var_48], rax
cmp [rbp+var_48], 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 loc_E19DB
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1F0h]
mov rdi, [rbp+var_48]
mov rsi, [rbp+var_18]
mov edx, [rbp+var_1C]
call rax
mov rdi, [rbp+var_28]
mov esi, [rbp+var_2C]
mov rdx, [rbp+var_38]
call my_fopen
mov rcx, rax
mov rax, [rbp+var_40]
mov [rax], rcx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1F8h]
mov rdi, [rbp+var_48]
mov rcx, [rbp+var_40]
mov rsi, [rcx]
call rax
mov rcx, rax
mov rax, [rbp+var_40]
mov [rax+8], rcx
mov rax, [rbp+var_40]
cmp qword ptr [rax], 0
setz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_E19D1
mov rdi, [rbp+var_40]
call my_free
mov [rbp+var_8], 0
jmp short loc_E1A41
loc_E19D1:
mov rax, [rbp+var_40]
mov [rbp+var_8], rax
jmp short loc_E1A41
loc_E19DB:
mov rax, [rbp+var_40]
mov qword ptr [rax+8], 0
mov rdi, [rbp+var_28]
mov esi, [rbp+var_2C]
mov rdx, [rbp+var_38]
call my_fopen
mov rcx, rax
mov rax, [rbp+var_40]
mov [rax], rcx
mov rax, [rbp+var_40]
cmp qword ptr [rax], 0
setz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_E1A37
mov rdi, [rbp+var_40]
call my_free
mov [rbp+var_8], 0
jmp short loc_E1A41
loc_E1A37:
jmp short $+2
loc_E1A39:
mov rax, [rbp+var_40]
mov [rbp+var_8], rax
loc_E1A41:
mov rax, [rbp+var_8]
add rsp, 90h
pop rbp
retn
| long long * inline_mysql_file_fopen(
unsigned int a1,
long long a2,
unsigned int a3,
long long a4,
unsigned int a5,
long long a6)
{
long long v6; // rax
long long v7; // rax
long long v8; // rax
_BYTE v10[72]; // [rsp+0h] [rbp-90h] BYREF
long long v11; // [rsp+48h] [rbp-48h]
long long *v12; // [rsp+50h] [rbp-40h]
long long v13; // [rsp+58h] [rbp-38h]
unsigned int v14; // [rsp+64h] [rbp-2Ch]
long long v15; // [rsp+68h] [rbp-28h]
unsigned int v16; // [rsp+74h] [rbp-1Ch]
long long v17; // [rsp+78h] [rbp-18h]
unsigned int v18; // [rsp+84h] [rbp-Ch]
v18 = a1;
v17 = a2;
v16 = a3;
v15 = a4;
v14 = a5;
v13 = a6;
v12 = (long long *)my_malloc(0LL, 16LL, 16LL);
if ( !v12 )
return v12;
v11 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, long long *))PSI_server[41])(v10, v18, 3LL, v15, v12);
if ( !v11 )
{
v12[1] = 0LL;
v8 = my_fopen(v15, v14, v13);
*v12 = v8;
if ( !*v12 )
goto LABEL_4;
return v12;
}
((void ( *)(long long, long long, _QWORD))PSI_server[62])(v11, v17, v16);
v6 = my_fopen(v15, v14, v13);
*v12 = v6;
v7 = ((long long ( *)(long long, long long))PSI_server[63])(v11, *v12);
v12[1] = v7;
if ( *v12 )
return v12;
LABEL_4:
my_free(v12);
return 0LL;
}
| inline_mysql_file_fopen:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV dword ptr [RBP + -0xc],EDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV qword ptr [RBP + -0x28],RCX
MOV dword ptr [RBP + -0x2c],R8D
MOV qword ptr [RBP + -0x38],R9
XOR EDI,EDI
MOV EDX,0x10
MOV RSI,RDX
CALL 0x001fc020
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RBP + -0x40],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 0x001e1a39
LEA RAX,[0x3cb4e0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x148]
MOV ESI,dword ptr [RBP + -0xc]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8,qword ptr [RBP + -0x40]
LEA RDI,[RBP + -0x90]
MOV EDX,0x3
CALL RAX
MOV qword ptr [RBP + -0x48],RAX
CMP qword ptr [RBP + -0x48],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 0x001e19db
LEA RAX,[0x3cb4e0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1f0]
MOV RDI,qword ptr [RBP + -0x48]
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RBP + -0x1c]
CALL RAX
MOV RDI,qword ptr [RBP + -0x28]
MOV ESI,dword ptr [RBP + -0x2c]
MOV RDX,qword ptr [RBP + -0x38]
CALL 0x001f4700
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX],RCX
LEA RAX,[0x3cb4e0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1f8]
MOV RDI,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RCX]
CALL RAX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x40]
CMP qword ptr [RAX],0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x001e19d1
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x001fc3a0
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001e1a41
LAB_001e19d1:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001e1a41
LAB_001e19db:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX + 0x8],0x0
MOV RDI,qword ptr [RBP + -0x28]
MOV ESI,dword ptr [RBP + -0x2c]
MOV RDX,qword ptr [RBP + -0x38]
CALL 0x001f4700
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x40]
CMP qword ptr [RAX],0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x001e1a37
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x001fc3a0
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001e1a41
LAB_001e1a37:
JMP 0x001e1a39
LAB_001e1a39:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x8],RAX
LAB_001e1a41:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x90
POP RBP
RET
|
long * inline_mysql_file_fopen
(int4 param_1,int8 param_2,int4 param_3,int8 param_4,
int4 param_5,int8 param_6)
{
long lVar1;
int1 local_98 [72];
long local_50;
long *local_48;
int8 local_40;
int4 local_34;
int8 local_30;
int4 local_24;
int8 local_20;
int4 local_14;
local_40 = param_6;
local_34 = param_5;
local_30 = param_4;
local_24 = param_3;
local_20 = param_2;
local_14 = param_1;
local_48 = (long *)my_malloc(0,0x10);
if (local_48 != (long *)0x0) {
local_50 = (**(code **)(PSI_server + 0x148))(local_98,local_14,3,local_30,local_48);
if (local_50 != 0) {
(**(code **)(PSI_server + 0x1f0))(local_50,local_20,local_24);
lVar1 = my_fopen(local_30,local_34,local_40);
*local_48 = lVar1;
lVar1 = (**(code **)(PSI_server + 0x1f8))(local_50,*local_48);
local_48[1] = lVar1;
if (*local_48 == 0) {
my_free(local_48);
return (long *)0x0;
}
return local_48;
}
local_48[1] = 0;
lVar1 = my_fopen(local_30,local_34,local_40);
*local_48 = lVar1;
if (*local_48 == 0) {
my_free(local_48);
return (long *)0x0;
}
}
return local_48;
}
| |
26,545 | rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::GenericValue(unsigned long) | mnn-tts/MNN/3rd_party/rapidjson/document.h | explicit GenericValue(uint64_t u64) RAPIDJSON_NOEXCEPT : data_() {
data_.n.u64 = u64;
data_.f.flags = kNumberUint64Flag;
if (!(u64 & RAPIDJSON_UINT64_C2(0x80000000, 0x00000000)))
data_.f.flags |= kInt64Flag;
if (!(u64 & RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0x00000000)))
data_.f.flags |= kUintFlag;
if (!(u64 & RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0x80000000)))
data_.f.flags |= kIntFlag;
} | O0 | c | rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::GenericValue(unsigned long):
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, (%rsp)
xorl %esi, %esi
movl $0x10, %edx
callq 0x3070
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rcx, (%rax)
movw $0x116, 0xe(%rax) # imm = 0x116
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
andq 0x8(%rsp), %rax
cmpq $0x0, %rax
jne 0xfd0c
movq (%rsp), %rax
movzwl 0xe(%rax), %ecx
orl $0x80, %ecx
movw %cx, 0xe(%rax)
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
andq 0x8(%rsp), %rax
cmpq $0x0, %rax
jne 0xfd30
movq (%rsp), %rax
movzwl 0xe(%rax), %ecx
orl $0x40, %ecx
movw %cx, 0xe(%rax)
movq 0x8(%rsp), %rax
andq $-0x80000000, %rax # imm = 0x80000000
cmpq $0x0, %rax
jne 0xfd50
movq (%rsp), %rax
movzwl 0xe(%rax), %ecx
orl $0x20, %ecx
movw %cx, 0xe(%rax)
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
nop
| _ZN9rapidjson12GenericValueINS_4UTF8IcEENS_19MemoryPoolAllocatorINS_12CrtAllocatorEEEEC2Em:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov [rsp+18h+var_10], rsi
mov rdi, [rsp+18h+var_8]
mov [rsp+18h+var_18], rdi
xor esi, esi
mov edx, 10h
call _memset
mov rax, [rsp+18h+var_18]
mov rcx, [rsp+18h+var_10]
mov [rax], rcx
mov word ptr [rax+0Eh], 116h
mov rax, 8000000000000000h
and rax, [rsp+18h+var_10]
cmp rax, 0
jnz short loc_FD0C
mov rax, [rsp+18h+var_18]
movzx ecx, word ptr [rax+0Eh]
or ecx, 80h
mov [rax+0Eh], cx
loc_FD0C:
mov rax, 0FFFFFFFF00000000h
and rax, [rsp+18h+var_10]
cmp rax, 0
jnz short loc_FD30
mov rax, [rsp+18h+var_18]
movzx ecx, word ptr [rax+0Eh]
or ecx, 40h
mov [rax+0Eh], cx
loc_FD30:
mov rax, [rsp+18h+var_10]
and rax, 0FFFFFFFF80000000h
cmp rax, 0
jnz short loc_FD50
mov rax, [rsp+18h+var_18]
movzx ecx, word ptr [rax+0Eh]
or ecx, 20h
mov [rax+0Eh], cx
loc_FD50:
add rsp, 18h
retn
| unsigned long long rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::GenericValue(
unsigned long long a1,
long long a2)
{
unsigned long long result; // rax
memset(a1, 0LL, 16LL);
*(_QWORD *)a1 = a2;
*(_WORD *)(a1 + 14) = 278;
if ( a2 >= 0 )
*(_WORD *)(a1 + 14) |= 0x80u;
if ( (a2 & 0xFFFFFFFF00000000LL) == 0 )
*(_WORD *)(a1 + 14) |= 0x40u;
result = a2 & 0xFFFFFFFF80000000LL;
if ( (a2 & 0xFFFFFFFF80000000LL) == 0 )
{
result = a1;
*(_WORD *)(a1 + 14) |= 0x20u;
}
return result;
}
| GenericValue:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x8],RSI
MOV RDI,qword ptr [RSP + 0x10]
MOV qword ptr [RSP],RDI
XOR ESI,ESI
MOV EDX,0x10
CALL 0x00103070
MOV RAX,qword ptr [RSP]
MOV RCX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX],RCX
MOV word ptr [RAX + 0xe],0x116
MOV RAX,-0x8000000000000000
AND RAX,qword ptr [RSP + 0x8]
CMP RAX,0x0
JNZ 0x0010fd0c
MOV RAX,qword ptr [RSP]
MOVZX ECX,word ptr [RAX + 0xe]
OR ECX,0x80
MOV word ptr [RAX + 0xe],CX
LAB_0010fd0c:
MOV RAX,-0x100000000
AND RAX,qword ptr [RSP + 0x8]
CMP RAX,0x0
JNZ 0x0010fd30
MOV RAX,qword ptr [RSP]
MOVZX ECX,word ptr [RAX + 0xe]
OR ECX,0x40
MOV word ptr [RAX + 0xe],CX
LAB_0010fd30:
MOV RAX,qword ptr [RSP + 0x8]
AND RAX,-0x80000000
CMP RAX,0x0
JNZ 0x0010fd50
MOV RAX,qword ptr [RSP]
MOVZX ECX,word ptr [RAX + 0xe]
OR ECX,0x20
MOV word ptr [RAX + 0xe],CX
LAB_0010fd50:
ADD RSP,0x18
RET
|
/* rapidjson::GenericValue<rapidjson::UTF8<char>,
rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> >::GenericValue(unsigned long) */
void __thiscall
rapidjson::
GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::
GenericValue(GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>
*this,ulong param_1)
{
memset(this,0,0x10);
*(ulong *)this = param_1;
*(int2 *)(this + 0xe) = 0x116;
if ((param_1 & 0x8000000000000000) == 0) {
*(ushort *)(this + 0xe) = *(ushort *)(this + 0xe) | 0x80;
}
if ((param_1 & 0xffffffff00000000) == 0) {
*(ushort *)(this + 0xe) = *(ushort *)(this + 0xe) | 0x40;
}
if ((param_1 & 0xffffffff80000000) == 0) {
*(ushort *)(this + 0xe) = *(ushort *)(this + 0xe) | 0x20;
}
return;
}
| |
26,546 | httplib::detail::SocketStream::get_local_ip_and_port(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, int&) const | hkr04[P]cpp-mcp/common/httplib.h | inline void SocketStream::get_local_ip_and_port(std::string &ip,
int &port) const {
return detail::get_local_ip_and_port(sock_, ip, port);
} | O1 | c | httplib::detail::SocketStream::get_local_ip_and_port(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, int&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x498, %rsp # imm = 0x498
movq %rdx, %r14
movq %rsi, %rbx
movl 0x8(%rdi), %edi
leaq 0xc(%rsp), %rdx
movl $0x80, (%rdx)
leaq 0x10(%rsp), %rsi
callq 0xa5d0
testl %eax, %eax
je 0x1ee8b
addq $0x498, %rsp # imm = 0x498
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movzwl 0x10(%rsp), %eax
orl $0x8, %eax
cmpl $0xa, %eax
jne 0x1ee7d
movl 0xc(%rsp), %ebp
leaq 0x10(%rsp), %r15
movzwl 0x2(%r15), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movl %eax, (%r14)
leaq 0x97(%rsp), %r14
movl $0x401, %edx # imm = 0x401
movq %r14, %rdi
xorl %esi, %esi
callq 0xa360
movl $0x1, (%rsp)
movq %r15, %rdi
movl %ebp, %esi
movq %r14, %rdx
movl $0x401, %ecx # imm = 0x401
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xa3c0
testl %eax, %eax
jne 0x1ee7d
movq 0x8(%rbx), %r14
leaq 0x97(%rsp), %r15
movq %r15, %rdi
callq 0xa2b0
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %r15, %rcx
movq %rax, %r8
callq 0xa900
jmp 0x1ee7d
| _ZNK7httplib6detail12SocketStream21get_local_ip_and_portERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERi:
push rbp
push r15
push r14
push rbx
sub rsp, 498h
mov r14, rdx
mov rbx, rsi
mov edi, [rdi+8]
lea rdx, [rsp+4B8h+var_4AC]
mov dword ptr [rdx], 80h
lea rsi, [rsp+4B8h+var_4A8]
call _getsockname
test eax, eax
jz short loc_1EE8B
loc_1EE7D:
add rsp, 498h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_1EE8B:
movzx eax, [rsp+4B8h+var_4A8]
or eax, 8
cmp eax, 0Ah
jnz short loc_1EE7D
mov ebp, [rsp+4B8h+var_4AC]
lea r15, [rsp+4B8h+var_4A8]
movzx eax, word ptr [r15+2]
rol ax, 8
movzx eax, ax
mov [r14], eax
lea r14, [rsp+4B8h+var_421]
mov edx, 401h
mov rdi, r14
xor esi, esi
call _memset
mov [rsp+4B8h+var_4B8], 1
mov rdi, r15
mov esi, ebp
mov rdx, r14
mov ecx, 401h
xor r8d, r8d
xor r9d, r9d
call _getnameinfo
test eax, eax
jnz short loc_1EE7D
mov r14, [rbx+8]
lea r15, [rsp+4B8h+var_421]
mov rdi, r15
call _strlen
mov rdi, rbx
xor esi, esi
mov rdx, r14
mov rcx, r15
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
jmp loc_1EE7D
| long long httplib::detail::SocketStream::get_local_ip_and_port(long long a1, long long a2, _DWORD *a3)
{
long long v4; // rdi
long long result; // rax
unsigned int v6; // ebp
long long v7; // r14
long long v8; // rax
int v9; // [rsp+Ch] [rbp-4ACh] BYREF
_WORD v10[67]; // [rsp+10h] [rbp-4A8h] BYREF
_BYTE v11[1057]; // [rsp+97h] [rbp-421h] BYREF
v4 = *(unsigned int *)(a1 + 8);
v9 = 128;
result = getsockname(v4, v10, &v9);
if ( !(_DWORD)result )
{
result = v10[0] | 8u;
if ( (_DWORD)result == 10 )
{
v6 = v9;
*a3 = (unsigned __int16)__ROL2__(v10[1], 8);
memset(v11, 0LL, 1025LL);
result = getnameinfo(v10, v6, v11, 1025LL, 0LL, 0LL, 1);
if ( !(_DWORD)result )
{
v7 = *(_QWORD *)(a2 + 8);
v8 = strlen(v11);
return std::string::_M_replace(a2, 0LL, v7, v11, v8);
}
}
}
return result;
}
| get_local_ip_and_port:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x498
MOV R14,RDX
MOV RBX,RSI
MOV EDI,dword ptr [RDI + 0x8]
LEA RDX,[RSP + 0xc]
MOV dword ptr [RDX],0x80
LEA RSI,[RSP + 0x10]
CALL 0x0010a5d0
TEST EAX,EAX
JZ 0x0011ee8b
LAB_0011ee7d:
ADD RSP,0x498
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0011ee8b:
MOVZX EAX,word ptr [RSP + 0x10]
OR EAX,0x8
CMP EAX,0xa
JNZ 0x0011ee7d
MOV EBP,dword ptr [RSP + 0xc]
LEA R15,[RSP + 0x10]
MOVZX EAX,word ptr [R15 + 0x2]
ROL AX,0x8
MOVZX EAX,AX
MOV dword ptr [R14],EAX
LEA R14,[RSP + 0x97]
MOV EDX,0x401
MOV RDI,R14
XOR ESI,ESI
CALL 0x0010a360
MOV dword ptr [RSP],0x1
MOV RDI,R15
MOV ESI,EBP
MOV RDX,R14
MOV ECX,0x401
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0010a3c0
TEST EAX,EAX
JNZ 0x0011ee7d
MOV R14,qword ptr [RBX + 0x8]
LEA R15,[RSP + 0x97]
MOV RDI,R15
CALL 0x0010a2b0
MOV RDI,RBX
XOR ESI,ESI
MOV RDX,R14
MOV RCX,R15
MOV R8,RAX
CALL 0x0010a900
JMP 0x0011ee7d
|
/* httplib::detail::SocketStream::get_local_ip_and_port(std::__cxx11::string&, int&) const */
void __thiscall
httplib::detail::SocketStream::get_local_ip_and_port
(SocketStream *this,string *param_1,int *param_2)
{
char *pcVar1;
socklen_t __salen;
int iVar2;
socklen_t local_4ac;
sockaddr local_4a8 [8];
char local_421 [1025];
local_4ac = 0x80;
iVar2 = getsockname(*(int *)(this + 8),local_4a8,&local_4ac);
__salen = local_4ac;
if ((iVar2 == 0) && ((local_4a8[0].sa_family | 8) == 10)) {
*param_2 = (uint)(ushort)(local_4a8[0].sa_data._0_2_ << 8 |
(ushort)local_4a8[0].sa_data._0_2_ >> 8);
memset(local_421,0,0x401);
iVar2 = getnameinfo(local_4a8,__salen,local_421,0x401,(char *)0x0,0,1);
if (iVar2 == 0) {
pcVar1 = *(char **)(param_1 + 8);
strlen(local_421);
std::__cxx11::string::_M_replace((ulong)param_1,0,pcVar1,(ulong)local_421);
}
}
return;
}
| |
26,547 | reinit_queue | eloqsql/mysys/queues.c | int reinit_queue(QUEUE *queue, uint max_elements, uint offset_to_key,
my_bool max_at_top, int (*compare) (void *, uchar *, uchar *),
void *first_cmp_arg, uint offset_to_queue_pos,
uint auto_extent)
{
DBUG_ENTER("reinit_queue");
queue->elements= 0;
queue->compare= compare;
queue->first_cmp_arg= first_cmp_arg;
queue->offset_to_key= offset_to_key;
queue->offset_to_queue_pos= offset_to_queue_pos;
queue->auto_extent= auto_extent;
queue_set_max_at_top(queue, max_at_top);
DBUG_RETURN(resize_queue(queue, max_elements));
} | O3 | c | reinit_queue:
pushq %rbp
movq %rsp, %rbp
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %r10d
movl $0x0, 0x10(%rdi)
movq %r8, 0x28(%rdi)
movq %r9, 0x8(%rdi)
movl %edx, 0x18(%rdi)
movl %r10d, 0x1c(%rdi)
movl %eax, 0x20(%rdi)
xorl %eax, %eax
negb %cl
sbbl %eax, %eax
orl $0x1, %eax
movl %eax, 0x24(%rdi)
popq %rbp
jmp 0xa2ff5
| reinit_queue:
push rbp
mov rbp, rsp
mov eax, [rbp+arg_8]
mov r10d, [rbp+arg_0]
mov dword ptr [rdi+10h], 0
mov [rdi+28h], r8
mov [rdi+8], r9
mov [rdi+18h], edx
mov [rdi+1Ch], r10d
mov [rdi+20h], eax
xor eax, eax
neg cl
sbb eax, eax
or eax, 1
mov [rdi+24h], eax
pop rbp
jmp $+5
| long long reinit_queue(long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, int a7, int a8)
{
*(_DWORD *)(a1 + 16) = 0;
*(_QWORD *)(a1 + 40) = a5;
*(_QWORD *)(a1 + 8) = a6;
*(_DWORD *)(a1 + 24) = a3;
*(_DWORD *)(a1 + 28) = a7;
*(_DWORD *)(a1 + 32) = a8;
LOBYTE(a4) = -(char)a4;
*(_DWORD *)(a1 + 36) = (_BYTE)a4 != 0 ? -1 : 1;
return resize_queue(a1, a2, a3, a4);
}
| reinit_queue:
PUSH RBP
MOV RBP,RSP
MOV EAX,dword ptr [RBP + 0x18]
MOV R10D,dword ptr [RBP + 0x10]
MOV dword ptr [RDI + 0x10],0x0
MOV qword ptr [RDI + 0x28],R8
MOV qword ptr [RDI + 0x8],R9
MOV dword ptr [RDI + 0x18],EDX
MOV dword ptr [RDI + 0x1c],R10D
MOV dword ptr [RDI + 0x20],EAX
XOR EAX,EAX
NEG CL
SBB EAX,EAX
OR EAX,0x1
MOV dword ptr [RDI + 0x24],EAX
POP RBP
JMP 0x001a2ff5
|
void reinit_queue(long param_1,int8 param_2,int4 param_3,char param_4,int8 param_5
,int8 param_6,int4 param_7,int4 param_8)
{
*(int4 *)(param_1 + 0x10) = 0;
*(int8 *)(param_1 + 0x28) = param_5;
*(int8 *)(param_1 + 8) = param_6;
*(int4 *)(param_1 + 0x18) = param_3;
*(int4 *)(param_1 + 0x1c) = param_7;
*(int4 *)(param_1 + 0x20) = param_8;
*(uint *)(param_1 + 0x24) = -(uint)(param_4 != '\0') | 1;
resize_queue();
return;
}
| |
26,548 | lock_control_file | eloqsql/storage/maria/ma_control_file.c | static int lock_control_file(const char *name, my_bool do_retry)
{
/*
On Windows, my_lock() uses locking() which is mandatory locking and so
prevents maria-recovery.test from copying the control file. And in case of
crash, it may take a while for Windows to unlock file, causing downtime.
*/
/**
@todo BUG We should explore my_sopen(_SH_DENYWRD) to open or create the
file under Windows.
*/
#ifndef _WIN32
uint retry= 0;
uint retry_count= do_retry ? MARIA_MAX_CONTROL_FILE_LOCK_RETRY : 0;
/*
We can't here use the automatic wait in my_lock() as the alarm thread
may not yet exists.
*/
while (my_lock(control_file_fd, F_WRLCK, 0L, F_TO_EOF,
MYF(MY_SEEK_NOT_DONE | MY_FORCE_LOCK | MY_NO_WAIT)))
{
if (retry == 0)
my_printf_error(HA_ERR_INITIALIZATION,
"Can't lock aria control file '%s' for exclusive use, "
"error: %d. Will retry for %d seconds", 0,
name, my_errno, retry_count);
if (++retry > retry_count)
return 1;
sleep(1);
}
#endif
return 0;
} | O0 | c | lock_control_file:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movl $0x0, -0x18(%rbp)
movsbl -0x11(%rbp), %edx
xorl %eax, %eax
movl $0x1e, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x1c(%rbp)
movl 0x29a22d(%rip), %edi # 0x2c84c0
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %ecx
movl $0x1a0, %r8d # imm = 0x1A0
movq %rcx, %rdx
callq 0xfbd60
cmpl $0x0, %eax
je 0x2e307
cmpl $0x0, -0x18(%rbp)
jne 0x2e2e4
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
callq 0xfe8f0
movq -0x28(%rbp), %rcx
movl (%rax), %r8d
movl -0x1c(%rbp), %r9d
movl $0xae, %edi
leaq 0x12cc2f(%rip), %rsi # 0x15af08
xorl %eax, %eax
movl %eax, %edx
movb $0x0, %al
callq 0xf4110
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
cmpl -0x1c(%rbp), %eax
jbe 0x2e2fb
movl $0x1, -0x4(%rbp)
jmp 0x2e30e
movl $0x1, %edi
callq 0x2a910
jmp 0x2e28d
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| lock_control_file:
push rbp
mov rbp, rsp
sub rsp, 30h
mov al, sil
mov [rbp+var_10], rdi
mov [rbp+var_11], al
mov [rbp+var_18], 0
movsx edx, [rbp+var_11]
xor eax, eax
mov ecx, 1Eh
cmp edx, 0
cmovnz eax, ecx
mov [rbp+var_1C], eax
loc_2E28D:
mov edi, cs:control_file_fd
mov esi, 1
xor eax, eax
mov ecx, eax
mov r8d, 1A0h
mov rdx, rcx
call my_lock
cmp eax, 0
jz short loc_2E307
cmp [rbp+var_18], 0
jnz short loc_2E2E4
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
call _my_thread_var
mov rcx, [rbp+var_28]
mov r8d, [rax]
mov r9d, [rbp+var_1C]
mov edi, 0AEh
lea rsi, aCanTLockAriaCo; "Can't lock aria control file '%s' for e"...
xor eax, eax
mov edx, eax
mov al, 0
call my_printf_error
loc_2E2E4:
mov eax, [rbp+var_18]
add eax, 1
mov [rbp+var_18], eax
cmp eax, [rbp+var_1C]
jbe short loc_2E2FB
mov [rbp+var_4], 1
jmp short loc_2E30E
loc_2E2FB:
mov edi, 1
call _sleep
jmp short loc_2E28D
loc_2E307:
mov [rbp+var_4], 0
loc_2E30E:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long lock_control_file(int a1, char a2)
{
int v2; // eax
_DWORD *v3; // rax
char v5; // [rsp+0h] [rbp-30h]
unsigned int v6; // [rsp+14h] [rbp-1Ch]
int v7; // [rsp+18h] [rbp-18h]
v7 = 0;
v2 = 0;
if ( a2 )
v2 = 30;
v6 = v2;
while ( (unsigned int)my_lock((unsigned int)control_file_fd, 1LL, 0LL, 0LL, 416LL) )
{
if ( !v7 )
{
v3 = (_DWORD *)my_thread_var();
my_printf_error(
174,
(unsigned int)"Can't lock aria control file '%s' for exclusive use, error: %d. Will retry for %d seconds",
0,
a1,
*v3,
v6,
v5);
}
if ( ++v7 > v6 )
return 1;
sleep(1LL);
}
return 0;
}
| lock_control_file:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV AL,SIL
MOV qword ptr [RBP + -0x10],RDI
MOV byte ptr [RBP + -0x11],AL
MOV dword ptr [RBP + -0x18],0x0
MOVSX EDX,byte ptr [RBP + -0x11]
XOR EAX,EAX
MOV ECX,0x1e
CMP EDX,0x0
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x1c],EAX
LAB_0012e28d:
MOV EDI,dword ptr [0x003c84c0]
MOV ESI,0x1
XOR EAX,EAX
MOV ECX,EAX
MOV R8D,0x1a0
MOV RDX,RCX
CALL 0x001fbd60
CMP EAX,0x0
JZ 0x0012e307
CMP dword ptr [RBP + -0x18],0x0
JNZ 0x0012e2e4
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
CALL 0x001fe8f0
MOV RCX,qword ptr [RBP + -0x28]
MOV R8D,dword ptr [RAX]
MOV R9D,dword ptr [RBP + -0x1c]
MOV EDI,0xae
LEA RSI,[0x25af08]
XOR EAX,EAX
MOV EDX,EAX
MOV AL,0x0
CALL 0x001f4110
LAB_0012e2e4:
MOV EAX,dword ptr [RBP + -0x18]
ADD EAX,0x1
MOV dword ptr [RBP + -0x18],EAX
CMP EAX,dword ptr [RBP + -0x1c]
JBE 0x0012e2fb
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0012e30e
LAB_0012e2fb:
MOV EDI,0x1
CALL 0x0012a910
JMP 0x0012e28d
LAB_0012e307:
MOV dword ptr [RBP + -0x4],0x0
LAB_0012e30e:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 lock_control_file(int8 param_1,char param_2)
{
uint uVar1;
int iVar2;
int4 *puVar3;
uint local_20;
local_20 = 0;
uVar1 = 0;
if (param_2 != '\0') {
uVar1 = 0x1e;
}
while( true ) {
iVar2 = my_lock(control_file_fd,1,0,0,0x1a0);
if (iVar2 == 0) {
return 0;
}
if (local_20 == 0) {
puVar3 = (int4 *)_my_thread_var();
my_printf_error(0xae,
"Can\'t lock aria control file \'%s\' for exclusive use, error: %d. Will retry for %d seconds"
,0,param_1,*puVar3,uVar1);
}
local_20 = local_20 + 1;
if (uVar1 < local_20) break;
sleep(1);
}
return 1;
}
| |
26,549 | fs_create_directory_with_parents(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | llama.cpp/common/common.cpp | bool fs_create_directory_with_parents(const std::string & path) {
#ifdef _WIN32
std::wstring_convert<std::codecvt_utf8<wchar_t>> converter;
std::wstring wpath = converter.from_bytes(path);
// if the path already exists, check whether it's a directory
const DWORD attributes = GetFileAttributesW(wpath.c_str());
if ((attributes != INVALID_FILE_ATTRIBUTES) && (attributes & FILE_ATTRIBUTE_DIRECTORY)) {
return true;
}
size_t pos_slash = 0;
// process path from front to back, procedurally creating directories
while ((pos_slash = path.find('\\', pos_slash)) != std::string::npos) {
const std::wstring subpath = wpath.substr(0, pos_slash);
const wchar_t * test = subpath.c_str();
const bool success = CreateDirectoryW(test, NULL);
if (!success) {
const DWORD error = GetLastError();
// if the path already exists, ensure that it's a directory
if (error == ERROR_ALREADY_EXISTS) {
const DWORD attributes = GetFileAttributesW(subpath.c_str());
if (attributes == INVALID_FILE_ATTRIBUTES || !(attributes & FILE_ATTRIBUTE_DIRECTORY)) {
return false;
}
} else {
return false;
}
}
pos_slash += 1;
}
return true;
#else
// if the path already exists, check whether it's a directory
struct stat info;
if (stat(path.c_str(), &info) == 0) {
return S_ISDIR(info.st_mode);
}
size_t pos_slash = 1; // skip leading slashes for directory creation
// process path from front to back, procedurally creating directories
while ((pos_slash = path.find('/', pos_slash)) != std::string::npos) {
const std::string subpath = path.substr(0, pos_slash);
struct stat info;
// if the path already exists, ensure that it's a directory
if (stat(subpath.c_str(), &info) == 0) {
if (!S_ISDIR(info.st_mode)) {
return false;
}
} else {
// create parent directories
const int ret = mkdir(subpath.c_str(), 0755);
if (ret != 0) {
return false;
}
}
pos_slash += 1;
}
return true;
#endif // _WIN32
} | O3 | cpp | fs_create_directory_with_parents(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp # imm = 0x148
movq %rdi, %rbx
movq (%rdi), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x1c0f0
testl %eax, %eax
je 0xae50f
movl $0x1, %r14d
leaq 0x8(%rsp), %r15
leaq 0x28(%rsp), %r12
movq %rbx, %rdi
movl $0x2f, %esi
movq %r14, %rdx
callq 0x1ccb0
cmpq $-0x1, %rax
sete %bpl
je 0xae524
movq %rax, %r14
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x1cbb0
movq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x1c0f0
testl %eax, %eax
je 0xae4d0
movq 0x8(%rsp), %rdi
movl $0x1ed, %esi # imm = 0x1ED
callq 0x1c2b0
testl %eax, %eax
je 0xae4e2
xorl %r13d, %r13d
jmp 0xae4e8
movl 0x40(%rsp), %eax
movl $0xf000, %ecx # imm = 0xF000
andl %ecx, %eax
cmpl $0x4000, %eax # imm = 0x4000
jne 0xae4cb
incq %r14
movb $0x1, %r13b
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xae504
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1c110
testb %r13b, %r13b
jne 0xae476
jmp 0xae524
movl $0xf000, %eax # imm = 0xF000
andl 0xd0(%rsp), %eax
cmpl $0x4000, %eax # imm = 0x4000
sete %bpl
movl %ebp, %eax
addq $0x148, %rsp # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _Z32fs_create_directory_with_parentsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 148h
mov rbx, rdi
mov rdi, [rdi]
lea rsi, [rsp+178h+var_C0]
call _stat
test eax, eax
jz loc_AE50F
mov r14d, 1
lea r15, [rsp+178h+var_170]
lea r12, [rsp+178h+var_150]
loc_AE476:
mov rdi, rbx
mov esi, 2Fh ; '/'
mov rdx, r14
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
setz bpl
jz loc_AE524
mov r14, rax
mov rdi, r15
mov rsi, rbx
xor edx, edx
mov rcx, rax
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
mov rdi, [rsp+178h+var_170]
mov rsi, r12
call _stat
test eax, eax
jz short loc_AE4D0
mov rdi, [rsp+178h+var_170]
mov esi, 1EDh
call _mkdir
test eax, eax
jz short loc_AE4E2
loc_AE4CB:
xor r13d, r13d
jmp short loc_AE4E8
loc_AE4D0:
mov eax, [rsp+178h+var_138]
mov ecx, 0F000h
and eax, ecx
cmp eax, 4000h
jnz short loc_AE4CB
loc_AE4E2:
inc r14
mov r13b, 1
loc_AE4E8:
mov rdi, [rsp+178h+var_170]; void *
lea rax, [rsp+178h+var_160]
cmp rdi, rax
jz short loc_AE504
mov rsi, [rsp+178h+var_160]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_AE504:
test r13b, r13b
jnz loc_AE476
jmp short loc_AE524
loc_AE50F:
mov eax, 0F000h
and eax, [rsp+178h+var_A8]
cmp eax, 4000h
setz bpl
loc_AE524:
mov eax, ebp
add rsp, 148h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long fs_create_directory_with_parents(_QWORD *a1)
{
unsigned int v1; // ebp
long long v2; // r14
long long v3; // rax
char v4; // r13
void *v6; // [rsp+8h] [rbp-170h] BYREF
long long v7; // [rsp+18h] [rbp-160h] BYREF
_BYTE v8[24]; // [rsp+28h] [rbp-150h] BYREF
int v9; // [rsp+40h] [rbp-138h]
_BYTE v10[24]; // [rsp+B8h] [rbp-C0h] BYREF
int v11; // [rsp+D0h] [rbp-A8h]
if ( (unsigned int)stat(*a1, v10) )
{
v2 = 1LL;
while ( 1 )
{
v3 = std::string::find(a1, 47LL, v2);
LOBYTE(v1) = v3 == -1;
if ( v3 == -1 )
return v1;
v2 = v3;
std::string::substr(&v6, a1, 0LL, v3);
if ( (unsigned int)stat(v6, v8) )
{
if ( !(unsigned int)mkdir(v6, 493LL) )
goto LABEL_8;
}
else if ( (v9 & 0xF000) == 0x4000 )
{
LABEL_8:
++v2;
v4 = 1;
goto LABEL_9;
}
v4 = 0;
LABEL_9:
if ( v6 != &v7 )
operator delete(v6, v7 + 1);
if ( !v4 )
return v1;
}
}
LOBYTE(v1) = (v11 & 0xF000) == 0x4000;
return v1;
}
| fs_create_directory_with_parents:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x148
MOV RBX,RDI
MOV RDI,qword ptr [RDI]
LEA RSI,[RSP + 0xb8]
CALL 0x0011c0f0
TEST EAX,EAX
JZ 0x001ae50f
MOV R14D,0x1
LEA R15,[RSP + 0x8]
LEA R12,[RSP + 0x28]
LAB_001ae476:
MOV RDI,RBX
MOV ESI,0x2f
MOV RDX,R14
CALL 0x0011ccb0
CMP RAX,-0x1
SETZ BPL
JZ 0x001ae524
MOV R14,RAX
MOV RDI,R15
MOV RSI,RBX
XOR EDX,EDX
MOV RCX,RAX
CALL 0x0011cbb0
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,R12
CALL 0x0011c0f0
TEST EAX,EAX
JZ 0x001ae4d0
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,0x1ed
CALL 0x0011c2b0
TEST EAX,EAX
JZ 0x001ae4e2
LAB_001ae4cb:
XOR R13D,R13D
JMP 0x001ae4e8
LAB_001ae4d0:
MOV EAX,dword ptr [RSP + 0x40]
MOV ECX,0xf000
AND EAX,ECX
CMP EAX,0x4000
JNZ 0x001ae4cb
LAB_001ae4e2:
INC R14
MOV R13B,0x1
LAB_001ae4e8:
MOV RDI,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x001ae504
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011c110
LAB_001ae504:
TEST R13B,R13B
JNZ 0x001ae476
JMP 0x001ae524
LAB_001ae50f:
MOV EAX,0xf000
AND EAX,dword ptr [RSP + 0xd0]
CMP EAX,0x4000
SETZ BPL
LAB_001ae524:
MOV EAX,EBP
ADD RSP,0x148
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* fs_create_directory_with_parents(std::__cxx11::string const&) */
ulong fs_create_directory_with_parents(string *param_1)
{
bool bVar1;
int iVar2;
long lVar3;
ulong unaff_RBP;
long *local_170 [2];
long local_160 [2];
stat local_150;
stat local_c0;
iVar2 = stat(*(char **)param_1,&local_c0);
if (iVar2 == 0) {
unaff_RBP = CONCAT71((int7)(unaff_RBP >> 8),(local_c0.st_mode & 0xf000) == 0x4000);
}
else {
do {
lVar3 = std::__cxx11::string::find((char)param_1,0x2f);
unaff_RBP = CONCAT71((int7)(unaff_RBP >> 8),lVar3 == -1);
if (lVar3 == -1) break;
std::__cxx11::string::substr((ulong)local_170,(ulong)param_1);
iVar2 = stat((char *)local_170[0],&local_150);
if (iVar2 == 0) {
if ((local_150.st_mode & 0xf000) != 0x4000) goto LAB_001ae4cb;
LAB_001ae4e2:
bVar1 = true;
}
else {
iVar2 = mkdir((char *)local_170[0],0x1ed);
if (iVar2 == 0) goto LAB_001ae4e2;
LAB_001ae4cb:
bVar1 = false;
}
if (local_170[0] != local_160) {
operator_delete(local_170[0],local_160[0] + 1);
}
} while (bVar1);
}
return unaff_RBP & 0xffffffff;
}
| |
26,550 | get_charset_number_internal | eloqsql/mysys/charset.c | static uint
get_charset_number_internal(const char *charset_name, uint cs_flags)
{
CHARSET_INFO **cs;
for (cs= all_charsets;
cs < all_charsets + array_elements(all_charsets);
cs++)
{
if ( cs[0] && cs[0]->cs_name.str && (cs[0]->state & cs_flags) &&
!my_strcasecmp(&my_charset_latin1, cs[0]->cs_name.str, charset_name))
return cs[0]->number;
}
return 0;
} | O0 | c | get_charset_number_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
leaq 0x35b09a(%rip), %rax # 0x384580
movq %rax, -0x20(%rbp)
leaq 0x35b08f(%rip), %rax # 0x384580
addq $0x4000, %rax # imm = 0x4000
cmpq %rax, -0x20(%rbp)
jae 0x29577
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
je 0x29564
movq -0x20(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x10(%rax)
je 0x29564
movq -0x20(%rbp), %rax
movq (%rax), %rax
movl 0xc(%rax), %eax
andl -0x14(%rbp), %eax
cmpl $0x0, %eax
je 0x29564
leaq 0x2492f2(%rip), %rax # 0x272820
movq 0xc0(%rax), %rax
movq 0x40(%rax), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
movq 0x10(%rcx), %rsi
movq -0x10(%rbp), %rdx
leaq 0x2492d1(%rip), %rdi # 0x272820
callq *%rax
cmpl $0x0, %eax
jne 0x29564
movq -0x20(%rbp), %rax
movq (%rax), %rax
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x2957e
jmp 0x29566
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
jmp 0x294ea
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| get_charset_number_internal:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
lea rax, all_charsets
mov [rbp+var_20], rax
loc_294EA:
lea rax, all_charsets
add rax, 4000h
cmp [rbp+var_20], rax
jnb short loc_29577
mov rax, [rbp+var_20]
cmp qword ptr [rax], 0
jz short loc_29564
mov rax, [rbp+var_20]
mov rax, [rax]
cmp qword ptr [rax+10h], 0
jz short loc_29564
mov rax, [rbp+var_20]
mov rax, [rax]
mov eax, [rax+0Ch]
and eax, [rbp+var_14]
cmp eax, 0
jz short loc_29564
lea rax, my_charset_latin1
mov rax, [rax+0C0h]
mov rax, [rax+40h]
mov rcx, [rbp+var_20]
mov rcx, [rcx]
mov rsi, [rcx+10h]
mov rdx, [rbp+var_10]
lea rdi, my_charset_latin1
call rax
cmp eax, 0
jnz short loc_29564
mov rax, [rbp+var_20]
mov rax, [rax]
mov eax, [rax]
mov [rbp+var_4], eax
jmp short loc_2957E
loc_29564:
jmp short $+2
loc_29566:
mov rax, [rbp+var_20]
add rax, 8
mov [rbp+var_20], rax
jmp loc_294EA
loc_29577:
mov [rbp+var_4], 0
loc_2957E:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long get_charset_number_internal(long long a1, int a2)
{
unsigned int **i; // [rsp+0h] [rbp-20h]
for ( i = (unsigned int **)all_charsets; i < &all_charsets[2048]; ++i )
{
if ( *i
&& *((_QWORD *)*i + 2)
&& (a2 & (*i)[3]) != 0
&& !(*(unsigned int ( **)(void *, _QWORD, long long))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
*((_QWORD *)*i + 2),
a1) )
{
return **i;
}
}
return 0;
}
| get_charset_number_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
LEA RAX,[0x484580]
MOV qword ptr [RBP + -0x20],RAX
LAB_001294ea:
LEA RAX,[0x484580]
ADD RAX,0x4000
CMP qword ptr [RBP + -0x20],RAX
JNC 0x00129577
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX],0x0
JZ 0x00129564
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
CMP qword ptr [RAX + 0x10],0x0
JZ 0x00129564
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0xc]
AND EAX,dword ptr [RBP + -0x14]
CMP EAX,0x0
JZ 0x00129564
LEA RAX,[0x372820]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX]
MOV RSI,qword ptr [RCX + 0x10]
MOV RDX,qword ptr [RBP + -0x10]
LEA RDI,[0x372820]
CALL RAX
CMP EAX,0x0
JNZ 0x00129564
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0012957e
LAB_00129564:
JMP 0x00129566
LAB_00129566:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x8
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001294ea
LAB_00129577:
MOV dword ptr [RBP + -0x4],0x0
LAB_0012957e:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 get_charset_number_internal(int8 param_1,uint param_2)
{
int iVar1;
long *local_28;
local_28 = &all_charsets;
while( true ) {
if ((long *)0x48857f < local_28) {
return 0;
}
if ((((*local_28 != 0) && (*(long *)(*local_28 + 0x10) != 0)) &&
((*(uint *)(*local_28 + 0xc) & param_2) != 0)) &&
(iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_003728e0 + 0x40))
(&my_charset_latin1,*(int8 *)(*local_28 + 0x10),param_1), iVar1 == 0
)) break;
local_28 = local_28 + 1;
}
return *(int4 *)*local_28;
}
| |
26,551 | mz_zip_writer_create_zip64_extra_data | 7CodeWizard[P]stablediffusion/thirdparty/miniz.h | static mz_uint32
mz_zip_writer_create_zip64_extra_data(mz_uint8 *pBuf, mz_uint64 *pUncomp_size,
mz_uint64 *pComp_size,
mz_uint64 *pLocal_header_ofs) {
mz_uint8 *pDst = pBuf;
mz_uint32 field_size = 0;
MZ_WRITE_LE16(pDst + 0, MZ_ZIP64_EXTENDED_INFORMATION_FIELD_HEADER_ID);
MZ_WRITE_LE16(pDst + 2, 0);
pDst += sizeof(mz_uint16) * 2;
if (pUncomp_size) {
MZ_WRITE_LE64(pDst, *pUncomp_size);
pDst += sizeof(mz_uint64);
field_size += sizeof(mz_uint64);
}
if (pComp_size) {
MZ_WRITE_LE64(pDst, *pComp_size);
pDst += sizeof(mz_uint64);
field_size += sizeof(mz_uint64);
}
if (pLocal_header_ofs) {
MZ_WRITE_LE64(pDst, *pLocal_header_ofs);
pDst += sizeof(mz_uint64);
field_size += sizeof(mz_uint64);
}
MZ_WRITE_LE16(pBuf + 2, field_size);
return (mz_uint32)(pDst - pBuf);
} | O1 | c | mz_zip_writer_create_zip64_extra_data:
movl $0x1, (%rdi)
testq %rsi, %rsi
je 0x87b97
movq (%rsi), %rax
movq %rax, 0x4(%rdi)
leaq 0xc(%rdi), %rax
movl $0x8, %esi
jmp 0x87b9d
leaq 0x4(%rdi), %rax
xorl %esi, %esi
testq %rdx, %rdx
je 0x87baf
movq (%rdx), %rdx
movq %rdx, (%rax)
addq $0x8, %rax
addl $0x8, %esi
testq %rcx, %rcx
je 0x87bc1
movq (%rcx), %rcx
movq %rcx, (%rax)
addq $0x8, %rax
addl $0x8, %esi
movb %sil, 0x2(%rdi)
movb $0x0, 0x3(%rdi)
subl %edi, %eax
retq
| mz_zip_writer_create_zip64_extra_data:
mov dword ptr [rdi], 1
test rsi, rsi
jz short loc_87B97
mov rax, [rsi]
mov [rdi+4], rax
lea rax, [rdi+0Ch]
mov esi, 8
jmp short loc_87B9D
loc_87B97:
lea rax, [rdi+4]
xor esi, esi
loc_87B9D:
test rdx, rdx
jz short loc_87BAF
mov rdx, [rdx]
mov [rax], rdx
add rax, 8
add esi, 8
loc_87BAF:
test rcx, rcx
jz short loc_87BC1
mov rcx, [rcx]
mov [rax], rcx
add rax, 8
add esi, 8
loc_87BC1:
mov [rdi+2], sil
mov byte ptr [rdi+3], 0
sub eax, edi
retn
| long long mz_zip_writer_create_zip64_extra_data(long long a1, _QWORD *a2, _QWORD *a3, _QWORD *a4)
{
_QWORD *v4; // rax
char v5; // si
*(_DWORD *)a1 = 1;
if ( a2 )
{
*(_QWORD *)(a1 + 4) = *a2;
v4 = (_QWORD *)(a1 + 12);
v5 = 8;
}
else
{
v4 = (_QWORD *)(a1 + 4);
v5 = 0;
}
if ( a3 )
{
*v4++ = *a3;
v5 += 8;
}
if ( a4 )
{
*v4 = *a4;
LODWORD(v4) = (_DWORD)v4 + 8;
v5 += 8;
}
*(_BYTE *)(a1 + 2) = v5;
*(_BYTE *)(a1 + 3) = 0;
return (unsigned int)((_DWORD)v4 - a1);
}
| |||
26,552 | mz_zip_writer_create_zip64_extra_data | 7CodeWizard[P]stablediffusion/thirdparty/miniz.h | static mz_uint32
mz_zip_writer_create_zip64_extra_data(mz_uint8 *pBuf, mz_uint64 *pUncomp_size,
mz_uint64 *pComp_size,
mz_uint64 *pLocal_header_ofs) {
mz_uint8 *pDst = pBuf;
mz_uint32 field_size = 0;
MZ_WRITE_LE16(pDst + 0, MZ_ZIP64_EXTENDED_INFORMATION_FIELD_HEADER_ID);
MZ_WRITE_LE16(pDst + 2, 0);
pDst += sizeof(mz_uint16) * 2;
if (pUncomp_size) {
MZ_WRITE_LE64(pDst, *pUncomp_size);
pDst += sizeof(mz_uint64);
field_size += sizeof(mz_uint64);
}
if (pComp_size) {
MZ_WRITE_LE64(pDst, *pComp_size);
pDst += sizeof(mz_uint64);
field_size += sizeof(mz_uint64);
}
if (pLocal_header_ofs) {
MZ_WRITE_LE64(pDst, *pLocal_header_ofs);
pDst += sizeof(mz_uint64);
field_size += sizeof(mz_uint64);
}
MZ_WRITE_LE16(pBuf + 2, field_size);
return (mz_uint32)(pDst - pBuf);
} | O2 | c | mz_zip_writer_create_zip64_extra_data:
movl $0x1, (%rdi)
testq %rsi, %rsi
je 0x6216f
movq (%rsi), %rax
movq %rax, 0x4(%rdi)
leaq 0xc(%rdi), %rax
pushq $0x8
popq %rsi
jmp 0x62175
leaq 0x4(%rdi), %rax
xorl %esi, %esi
testq %rdx, %rdx
je 0x62187
movq (%rdx), %rdx
movq %rdx, (%rax)
addq $0x8, %rax
addl $0x8, %esi
testq %rcx, %rcx
je 0x62199
movq (%rcx), %rcx
movq %rcx, (%rax)
addq $0x8, %rax
addl $0x8, %esi
movb %sil, 0x2(%rdi)
movb $0x0, 0x3(%rdi)
subl %edi, %eax
retq
| mz_zip_writer_create_zip64_extra_data:
mov dword ptr [rdi], 1
test rsi, rsi
jz short loc_6216F
mov rax, [rsi]
mov [rdi+4], rax
lea rax, [rdi+0Ch]
push 8
pop rsi
jmp short loc_62175
loc_6216F:
lea rax, [rdi+4]
xor esi, esi
loc_62175:
test rdx, rdx
jz short loc_62187
mov rdx, [rdx]
mov [rax], rdx
add rax, 8
add esi, 8
loc_62187:
test rcx, rcx
jz short loc_62199
mov rcx, [rcx]
mov [rax], rcx
add rax, 8
add esi, 8
loc_62199:
mov [rdi+2], sil
mov byte ptr [rdi+3], 0
sub eax, edi
retn
| long long mz_zip_writer_create_zip64_extra_data(long long a1, _QWORD *a2, _QWORD *a3, _QWORD *a4)
{
_QWORD *v4; // rax
char v5; // si
*(_DWORD *)a1 = 1;
if ( a2 )
{
*(_QWORD *)(a1 + 4) = *a2;
v4 = (_QWORD *)(a1 + 12);
v5 = 8;
}
else
{
v4 = (_QWORD *)(a1 + 4);
v5 = 0;
}
if ( a3 )
{
*v4++ = *a3;
v5 += 8;
}
if ( a4 )
{
*v4 = *a4;
LODWORD(v4) = (_DWORD)v4 + 8;
v5 += 8;
}
*(_BYTE *)(a1 + 2) = v5;
*(_BYTE *)(a1 + 3) = 0;
return (unsigned int)((_DWORD)v4 - a1);
}
| mz_zip_writer_create_zip64_extra_data:
MOV dword ptr [RDI],0x1
TEST RSI,RSI
JZ 0x0016216f
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI + 0x4],RAX
LEA RAX,[RDI + 0xc]
PUSH 0x8
POP RSI
JMP 0x00162175
LAB_0016216f:
LEA RAX,[RDI + 0x4]
XOR ESI,ESI
LAB_00162175:
TEST RDX,RDX
JZ 0x00162187
MOV RDX,qword ptr [RDX]
MOV qword ptr [RAX],RDX
ADD RAX,0x8
ADD ESI,0x8
LAB_00162187:
TEST RCX,RCX
JZ 0x00162199
MOV RCX,qword ptr [RCX]
MOV qword ptr [RAX],RCX
ADD RAX,0x8
ADD ESI,0x8
LAB_00162199:
MOV byte ptr [RDI + 0x2],SIL
MOV byte ptr [RDI + 0x3],0x0
SUB EAX,EDI
RET
|
int mz_zip_writer_create_zip64_extra_data
(int4 *param_1,int8 *param_2,int8 *param_3,int8 *param_4)
{
int8 *puVar1;
char cVar2;
*param_1 = 1;
if (param_2 == (int8 *)0x0) {
puVar1 = (int8 *)(param_1 + 1);
cVar2 = '\0';
}
else {
*(int8 *)(param_1 + 1) = *param_2;
puVar1 = (int8 *)(param_1 + 3);
cVar2 = '\b';
}
if (param_3 != (int8 *)0x0) {
*puVar1 = *param_3;
puVar1 = puVar1 + 1;
cVar2 = cVar2 + '\b';
}
if (param_4 != (int8 *)0x0) {
*puVar1 = *param_4;
puVar1 = puVar1 + 1;
cVar2 = cVar2 + '\b';
}
*(char *)((long)param_1 + 2) = cVar2;
*(int1 *)((long)param_1 + 3) = 0;
return (int)puVar1 - (int)param_1;
}
| |
26,553 | mz_zip_writer_create_zip64_extra_data | 7CodeWizard[P]stablediffusion/thirdparty/miniz.h | static mz_uint32
mz_zip_writer_create_zip64_extra_data(mz_uint8 *pBuf, mz_uint64 *pUncomp_size,
mz_uint64 *pComp_size,
mz_uint64 *pLocal_header_ofs) {
mz_uint8 *pDst = pBuf;
mz_uint32 field_size = 0;
MZ_WRITE_LE16(pDst + 0, MZ_ZIP64_EXTENDED_INFORMATION_FIELD_HEADER_ID);
MZ_WRITE_LE16(pDst + 2, 0);
pDst += sizeof(mz_uint16) * 2;
if (pUncomp_size) {
MZ_WRITE_LE64(pDst, *pUncomp_size);
pDst += sizeof(mz_uint64);
field_size += sizeof(mz_uint64);
}
if (pComp_size) {
MZ_WRITE_LE64(pDst, *pComp_size);
pDst += sizeof(mz_uint64);
field_size += sizeof(mz_uint64);
}
if (pLocal_header_ofs) {
MZ_WRITE_LE64(pDst, *pLocal_header_ofs);
pDst += sizeof(mz_uint64);
field_size += sizeof(mz_uint64);
}
MZ_WRITE_LE16(pBuf + 2, field_size);
return (mz_uint32)(pDst - pBuf);
} | O3 | c | mz_zip_writer_create_zip64_extra_data:
movl $0x1, (%rdi)
testq %rsi, %rsi
je 0x86b13
movq (%rsi), %rax
movq %rax, 0x4(%rdi)
leaq 0xc(%rdi), %rax
movl $0x8, %esi
jmp 0x86b19
leaq 0x4(%rdi), %rax
xorl %esi, %esi
testq %rdx, %rdx
je 0x86b2b
movq (%rdx), %rdx
movq %rdx, (%rax)
addq $0x8, %rax
addl $0x8, %esi
testq %rcx, %rcx
je 0x86b3d
movq (%rcx), %rcx
movq %rcx, (%rax)
addq $0x8, %rax
addl $0x8, %esi
movb %sil, 0x2(%rdi)
movb $0x0, 0x3(%rdi)
subl %edi, %eax
retq
| mz_zip_writer_create_zip64_extra_data:
mov dword ptr [rdi], 1
test rsi, rsi
jz short loc_86B13
mov rax, [rsi]
mov [rdi+4], rax
lea rax, [rdi+0Ch]
mov esi, 8
jmp short loc_86B19
loc_86B13:
lea rax, [rdi+4]
xor esi, esi
loc_86B19:
test rdx, rdx
jz short loc_86B2B
mov rdx, [rdx]
mov [rax], rdx
add rax, 8
add esi, 8
loc_86B2B:
test rcx, rcx
jz short loc_86B3D
mov rcx, [rcx]
mov [rax], rcx
add rax, 8
add esi, 8
loc_86B3D:
mov [rdi+2], sil
mov byte ptr [rdi+3], 0
sub eax, edi
retn
| long long mz_zip_writer_create_zip64_extra_data(long long a1, _QWORD *a2, _QWORD *a3, _QWORD *a4)
{
_QWORD *v4; // rax
char v5; // si
*(_DWORD *)a1 = 1;
if ( a2 )
{
*(_QWORD *)(a1 + 4) = *a2;
v4 = (_QWORD *)(a1 + 12);
v5 = 8;
}
else
{
v4 = (_QWORD *)(a1 + 4);
v5 = 0;
}
if ( a3 )
{
*v4++ = *a3;
v5 += 8;
}
if ( a4 )
{
*v4 = *a4;
LODWORD(v4) = (_DWORD)v4 + 8;
v5 += 8;
}
*(_BYTE *)(a1 + 2) = v5;
*(_BYTE *)(a1 + 3) = 0;
return (unsigned int)((_DWORD)v4 - a1);
}
| |||
26,554 | my_mb_wc_big5 | eloqsql/strings/ctype-big5.c | static int
my_mb_wc_big5(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc,const uchar *s,const uchar *e)
{
int hi;
if (s >= e)
return MY_CS_TOOSMALL;
if ((hi= s[0]) < 0x80)
{
pwc[0]=hi;
return 1;
}
if (s+2>e)
return MY_CS_TOOSMALL2;
if (!IS_MB2_CHAR(hi, s[1]))
return MY_CS_ILSEQ;
if (!(pwc[0]=func_big5_uni_onechar((hi<<8)+s[1])))
return -2;
return 2;
} | O3 | c | my_mb_wc_big5:
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0xb0b52
movsbq (%rdx), %rdi
testq %rdi, %rdi
js 0xb0b1c
movq %rdi, (%rsi)
movl $0x1, %eax
retq
leaq 0x2(%rdx), %r8
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %r8
ja 0xb0b52
leal 0x5f(%rdi), %ecx
xorl %eax, %eax
cmpb $0x58, %cl
ja 0xb0b52
movzbl 0x1(%rdx), %ecx
leal -0x7f(%rcx), %edx
cmpb $-0x3f, %dl
setb %dl
leal 0x1(%rcx), %r8d
cmpb $-0x5e, %r8b
setb %r8b
testb %r8b, %dl
je 0xb0b53
retq
pushq %rbp
movq %rsp, %rbp
movzbl %dil, %eax
shll $0x8, %eax
leal (%rax,%rcx), %edx
addl $0xffff5ec0, %edx # imm = 0xFFFF5EC0
cmpl $0x26bc, %edx # imm = 0x26BC
ja 0xb0b7a
movl %edx, %eax
leaq 0x4ed58(%rip), %rcx # 0xff8d0
jmp 0xb0b91
orl %ecx, %eax
addl $0xffff36c0, %eax # imm = 0xFFFF36C0
cmpl $0x309d, %eax # imm = 0x309D
jae 0xb0baa
movl %eax, %eax
leaq 0x53abf(%rip), %rcx # 0x104650
leaq (%rcx,%rax,2), %rax
movzwl (%rax), %eax
movzwl %ax, %ecx
movq %rcx, (%rsi)
movl $0x2, %eax
testw %cx, %cx
jne 0xb0bb6
jmp 0xb0bb1
movq $0x0, (%rsi)
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
popq %rbp
retq
| my_mb_wc_big5:
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short locret_B0B52
movsx rdi, byte ptr [rdx]
test rdi, rdi
js short loc_B0B1C
mov [rsi], rdi
mov eax, 1
retn
loc_B0B1C:
lea r8, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp r8, rcx
ja short locret_B0B52
lea ecx, [rdi+5Fh]
xor eax, eax
cmp cl, 58h ; 'X'
ja short locret_B0B52
movzx ecx, byte ptr [rdx+1]
lea edx, [rcx-7Fh]
cmp dl, 0C1h
setb dl
lea r8d, [rcx+1]
cmp r8b, 0A2h
setb r8b
test dl, r8b
jz short loc_B0B53
locret_B0B52:
retn
loc_B0B53:
push rbp
mov rbp, rsp
movzx eax, dil
shl eax, 8
lea edx, [rax+rcx]
add edx, 0FFFF5EC0h
cmp edx, 26BCh
ja short loc_B0B7A
mov eax, edx
lea rcx, tab_big5_uni0
jmp short loc_B0B91
loc_B0B7A:
or eax, ecx
add eax, 0FFFF36C0h
cmp eax, 309Dh
jnb short loc_B0BAA
mov eax, eax
lea rcx, tab_big5_uni1
loc_B0B91:
lea rax, [rcx+rax*2]
movzx eax, word ptr [rax]
movzx ecx, ax
mov [rsi], rcx
mov eax, 2
test cx, cx
jnz short loc_B0BB6
jmp short loc_B0BB1
loc_B0BAA:
mov qword ptr [rsi], 0
loc_B0BB1:
mov eax, 0FFFFFFFEh
loc_B0BB6:
pop rbp
retn
| long long my_mb_wc_big5(long long a1, long long *a2, char *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rdi
int v6; // ecx
int v7; // eax
unsigned int v8; // edx
long long v9; // rax
unsigned __int16 *v10; // rcx
long long v11; // rcx
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
v5 = *a3;
if ( v5 >= 0 )
{
*a2 = v5;
return 1LL;
}
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
result = 0LL;
if ( (unsigned __int8)(v5 + 95) <= 0x58u )
{
v6 = (unsigned __int8)a3[1];
if ( (unsigned __int8)(v6 + 1) >= 0xA2u || (unsigned __int8)(v6 - 127) >= 0xC1u )
{
v7 = (unsigned __int8)v5 << 8;
v8 = v7 + v6 - 41280;
if ( v8 > 0x26BC )
{
LODWORD(v9) = (v6 | v7) - 51520;
if ( (unsigned int)v9 >= 0x309D )
{
*a2 = 0LL;
return 4294967294LL;
}
v9 = (unsigned int)v9;
v10 = (unsigned __int16 *)&tab_big5_uni1;
}
else
{
v9 = v8;
v10 = (unsigned __int16 *)&tab_big5_uni0;
}
v11 = v10[v9];
*a2 = v11;
result = 2LL;
if ( (_WORD)v11 )
return result;
return 4294967294LL;
}
}
}
}
return result;
}
| my_mb_wc_big5:
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x001b0b52
MOVSX RDI,byte ptr [RDX]
TEST RDI,RDI
JS 0x001b0b1c
MOV qword ptr [RSI],RDI
MOV EAX,0x1
RET
LAB_001b0b1c:
LEA R8,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP R8,RCX
JA 0x001b0b52
LEA ECX,[RDI + 0x5f]
XOR EAX,EAX
CMP CL,0x58
JA 0x001b0b52
MOVZX ECX,byte ptr [RDX + 0x1]
LEA EDX,[RCX + -0x7f]
CMP DL,0xc1
SETC DL
LEA R8D,[RCX + 0x1]
CMP R8B,0xa2
SETC R8B
TEST DL,R8B
JZ 0x001b0b53
LAB_001b0b52:
RET
LAB_001b0b53:
PUSH RBP
MOV RBP,RSP
MOVZX EAX,DIL
SHL EAX,0x8
LEA EDX,[RAX + RCX*0x1]
ADD EDX,0xffff5ec0
CMP EDX,0x26bc
JA 0x001b0b7a
MOV EAX,EDX
LEA RCX,[0x1ff8d0]
JMP 0x001b0b91
LAB_001b0b7a:
OR EAX,ECX
ADD EAX,0xffff36c0
CMP EAX,0x309d
JNC 0x001b0baa
MOV EAX,EAX
LEA RCX,[0x204650]
LAB_001b0b91:
LEA RAX,[RCX + RAX*0x2]
MOVZX EAX,word ptr [RAX]
MOVZX ECX,AX
MOV qword ptr [RSI],RCX
MOV EAX,0x2
TEST CX,CX
JNZ 0x001b0bb6
JMP 0x001b0bb1
LAB_001b0baa:
MOV qword ptr [RSI],0x0
LAB_001b0bb1:
MOV EAX,0xfffffffe
LAB_001b0bb6:
POP RBP
RET
|
int8 my_mb_wc_big5(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
byte bVar1;
byte bVar2;
ushort uVar3;
int *puVar4;
uint uVar5;
if (param_4 <= param_3) {
return 0xffffff9b;
}
bVar1 = *param_3;
if (-1 < (long)(char)bVar1) {
*param_2 = (long)(char)bVar1;
return 1;
}
if (param_4 < param_3 + 2) {
return 0xffffff9a;
}
if ((byte)(bVar1 + 0x5f) < 0x59) {
bVar2 = param_3[1];
if ((byte)(bVar2 + 0x81) < 0xc1 && (byte)(bVar2 + 1) < 0xa2) {
return 0;
}
uVar5 = ((uint)bVar1 * 0x100 + (uint)bVar2) - 0xa140;
if (uVar5 < 0x26bd) {
puVar4 = &tab_big5_uni0;
}
else {
uVar5 = CONCAT11(bVar1,bVar2) - 0xc940;
if (0x309c < uVar5) {
*param_2 = 0;
return 0xfffffffe;
}
puVar4 = &tab_big5_uni1;
}
uVar3 = *(ushort *)(puVar4 + (ulong)uVar5 * 2);
*param_2 = (ulong)uVar3;
if (uVar3 == 0) {
return 0xfffffffe;
}
return 2;
}
return 0;
}
| |
26,555 | LefDefParser::lefwStartNoiseTable(int) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp | int
lefwStartNoiseTable(int num)
{
lefwObsoleteNum = LEFW_NOISETABLE_START;
if (!lefwFile)
return LEFW_UNINITIALIZED;
if (!lefwDidInit)
return LEFW_BAD_ORDER;
if (lefwState == LEFW_NOISETABLE_START ||
lefwState == LEFW_NOISETABLE)
return LEFW_BAD_ORDER;
if (lefwState != LEFW_INIT && lefwState < LEFW_END)
return LEFW_BAD_ORDER; // not of the ENDs
if (lefwSynArray[LEFW_NOISETABLE_START])
return LEFW_ALREADY_DEFINED;
if (versionNum >= 5.4)
return LEFW_OBSOLETE;
if (lefwWriteEncrypt)
encPrint(lefwFile, (char*) "NOISETABLE %d ;\n", num);
else
fprintf(lefwFile, "NOISETABLE %d ;\n", num);
lefwLines++;
lefwState = LEFW_NOISETABLE_START;
lefwIsNoiseTable = 1;
lefwIsEdgerate = 0;
lefwSynArray[LEFW_NOISETABLE_START] = 1;
return LEFW_OK;
} | O3 | cpp | LefDefParser::lefwStartNoiseTable(int):
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %edx
movl $0xa, 0x14492(%rip) # 0x24d48
leaq 0x14543(%rip), %rax # 0x24e00
movq (%rax), %rdi
testq %rdi, %rdi
je 0x1093e
leaq 0x14788(%rip), %rcx # 0x25054
movl $0x2, %eax
cmpl $0x0, (%rcx)
je 0x10943
leaq 0x14773(%rip), %rbx # 0x25050
movl (%rbx), %ecx
cmpl $0xa, %ecx
je 0x10943
cmpl $0x3e, %ecx
je 0x10943
cmpl $0x1, %ecx
setne %sil
cmpl $0x4f, %ecx
setl %cl
testb %cl, %sil
jne 0x10943
leaq 0x1450e(%rip), %r14 # 0x24e10
movl $0x4, %eax
cmpl $0x0, 0x28(%r14)
jne 0x10943
movsd 0x1442a(%rip), %xmm0 # 0x24d40
movl $0x7, %eax
ucomisd 0x87f5(%rip), %xmm0 # 0x19118
jae 0x10943
cmpb $0x1, 0x147c0(%rip) # 0x250ec
jne 0x1094b
leaq 0xac3d(%rip), %rsi # 0x1b572
xorl %eax, %eax
callq 0x18c35
jmp 0x10959
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0xac20(%rip), %rsi # 0x1b572
xorl %eax, %eax
callq 0x10f0
leaq 0x146ec(%rip), %rax # 0x2504c
incl (%rax)
movl $0xa, (%rbx)
leaq 0x14749(%rip), %rax # 0x250b8
movl $0x1, %ecx
movl %ecx, (%rax)
leaq 0x1470b(%rip), %rax # 0x25088
movl $0x0, (%rax)
movl %ecx, 0x28(%r14)
xorl %eax, %eax
jmp 0x10943
| _ZN12LefDefParser19lefwStartNoiseTableEi:
push r14
push rbx
push rax
mov edx, edi
mov cs:_ZN12LefDefParserL15lefwObsoleteNumE, 0Ah; LefDefParser::lefwObsoleteNum
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
test rdi, rdi
jz short loc_1093E
lea rcx, _ZN12LefDefParser11lefwDidInitE; LefDefParser::lefwDidInit
mov eax, 2
cmp dword ptr [rcx], 0
jz short loc_10943
lea rbx, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
mov ecx, [rbx]
cmp ecx, 0Ah
jz short loc_10943
cmp ecx, 3Eh ; '>'
jz short loc_10943
cmp ecx, 1
setnz sil
cmp ecx, 4Fh ; 'O'
setl cl
test sil, cl
jnz short loc_10943
lea r14, _ZN12LefDefParser12lefwSynArrayE; LefDefParser::lefwSynArray
mov eax, 4
cmp dword ptr [r14+28h], 0
jnz short loc_10943
movsd xmm0, cs:_ZN12LefDefParserL10versionNumE; LefDefParser::versionNum
mov eax, 7
ucomisd xmm0, cs:dbl_19118
jnb short loc_10943
cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt
jnz short loc_1094B
lea rsi, aNoisetableD; "NOISETABLE %d ;\n"
xor eax, eax
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
jmp short loc_10959
loc_1093E:
mov eax, 1
loc_10943:
add rsp, 8
pop rbx
pop r14
retn
loc_1094B:
lea rsi, aNoisetableD; "NOISETABLE %d ;\n"
xor eax, eax
call _fprintf
loc_10959:
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
inc dword ptr [rax]
mov dword ptr [rbx], 0Ah
lea rax, _ZN12LefDefParser16lefwIsNoiseTableE; LefDefParser::lefwIsNoiseTable
mov ecx, 1
mov [rax], ecx
lea rax, _ZN12LefDefParser14lefwIsEdgerateE; LefDefParser::lefwIsEdgerate
mov dword ptr [rax], 0
mov [r14+28h], ecx
xor eax, eax
jmp short loc_10943
| long long LefDefParser::lefwStartNoiseTable(
LefDefParser *this,
int a2,
long long a3,
long long a4,
int a5,
int a6)
{
long long result; // rax
unsigned int v7; // ecx
LefDefParser::lefwObsoleteNum = 10;
if ( !*(_QWORD *)&LefDefParser::lefwFile )
return 1LL;
result = 2LL;
if ( LefDefParser::lefwDidInit )
{
v7 = LefDefParser::lefwState;
if ( LefDefParser::lefwState != 10
&& LefDefParser::lefwState != 62
&& ((int)LefDefParser::lefwState >= 79 || LefDefParser::lefwState == 1) )
{
result = 4LL;
if ( !LefDefParser::lefwSynArray[10] )
{
result = 7LL;
if ( *(double *)&LefDefParser::versionNum < 5.4 )
{
if ( LefDefParser::lefwWriteEncrypt == 1 )
{
LOBYTE(v7) = (int)LefDefParser::lefwState < 79;
LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)"NOISETABLE %d ;\n", (_DWORD)this, v7, a5, a6);
}
else
{
fprintf(*(_QWORD *)&LefDefParser::lefwFile, "NOISETABLE %d ;\n", (_DWORD)this);
}
++LefDefParser::lefwLines;
LefDefParser::lefwState = 10;
LefDefParser::lefwIsNoiseTable = 1;
LefDefParser::lefwIsEdgerate = 0;
LefDefParser::lefwSynArray[10] = 1;
return 0LL;
}
}
}
}
return result;
}
| lefwStartNoiseTable:
PUSH R14
PUSH RBX
PUSH RAX
MOV EDX,EDI
MOV dword ptr [0x00124d48],0xa
LEA RAX,[0x124e00]
MOV RDI,qword ptr [RAX]
TEST RDI,RDI
JZ 0x0011093e
LEA RCX,[0x125054]
MOV EAX,0x2
CMP dword ptr [RCX],0x0
JZ 0x00110943
LEA RBX,[0x125050]
MOV ECX,dword ptr [RBX]
CMP ECX,0xa
JZ 0x00110943
CMP ECX,0x3e
JZ 0x00110943
CMP ECX,0x1
SETNZ SIL
CMP ECX,0x4f
SETL CL
TEST SIL,CL
JNZ 0x00110943
LEA R14,[0x124e10]
MOV EAX,0x4
CMP dword ptr [R14 + 0x28],0x0
JNZ 0x00110943
MOVSD XMM0,qword ptr [0x00124d40]
MOV EAX,0x7
UCOMISD XMM0,qword ptr [0x00119118]
JNC 0x00110943
CMP byte ptr [0x001250ec],0x1
JNZ 0x0011094b
LEA RSI,[0x11b572]
XOR EAX,EAX
CALL 0x00118c35
JMP 0x00110959
LAB_0011093e:
MOV EAX,0x1
LAB_00110943:
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_0011094b:
LEA RSI,[0x11b572]
XOR EAX,EAX
CALL 0x001010f0
LAB_00110959:
LEA RAX,[0x12504c]
INC dword ptr [RAX]
MOV dword ptr [RBX],0xa
LEA RAX,[0x1250b8]
MOV ECX,0x1
MOV dword ptr [RAX],ECX
LEA RAX,[0x125088]
MOV dword ptr [RAX],0x0
MOV dword ptr [R14 + 0x28],ECX
XOR EAX,EAX
JMP 0x00110943
|
/* LefDefParser::lefwStartNoiseTable(int) */
int8 LefDefParser::lefwStartNoiseTable(int param_1)
{
int8 uVar1;
lefwObsoleteNum = 10;
if (lefwFile == (_IO_FILE *)0x0) {
uVar1 = 1;
}
else {
uVar1 = 2;
if ((((lefwDidInit != 0) && (lefwState != 10)) && (lefwState != 0x3e)) &&
((lefwState == 1 || 0x4e < lefwState && (uVar1 = 4, lefwSynArray._40_4_ == 0)))) {
uVar1 = 7;
if (versionNum < DAT_00119118) {
if (lefwWriteEncrypt == '\x01') {
encPrint(lefwFile,"NOISETABLE %d ;\n");
}
else {
fprintf(lefwFile,"NOISETABLE %d ;\n",param_1);
}
lefwLines = lefwLines + 1;
lefwState = 10;
lefwIsNoiseTable = 1;
lefwIsEdgerate = 0;
lefwSynArray._40_4_ = 1;
uVar1 = 0;
}
}
}
return uVar1;
}
| |
26,556 | translog_set_file_size | eloqsql/storage/maria/ma_loghandler.c | void translog_set_file_size(uint32 size)
{
struct st_translog_buffer *old_buffer= NULL;
DBUG_ENTER("translog_set_file_size");
translog_lock();
DBUG_PRINT("enter", ("Size: %lu", (ulong) size));
DBUG_ASSERT(size % TRANSLOG_PAGE_SIZE == 0);
DBUG_ASSERT(size >= TRANSLOG_MIN_FILE_SIZE);
log_descriptor.log_file_max_size= size;
/* if current file longer then finish it*/
if (LSN_OFFSET(log_descriptor.horizon) >= log_descriptor.log_file_max_size)
{
old_buffer= log_descriptor.bc.buffer;
translog_buffer_next(&log_descriptor.horizon, &log_descriptor.bc, 1);
translog_buffer_unlock(old_buffer);
}
translog_unlock();
if (old_buffer)
{
translog_buffer_lock(old_buffer);
translog_buffer_flush(old_buffer);
translog_buffer_unlock(old_buffer);
}
DBUG_VOID_RETURN;
} | O3 | c | translog_set_file_size:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
callq 0x66013
movl %ebx, 0x3964c4(%rip) # 0x401510
cmpl %ebx, 0xb970f6(%rip) # 0xc02148
jae 0x6b058
xorl %ebx, %ebx
jmp 0x6b093
movq 0xb97119(%rip), %rbx # 0xc02178
leaq 0xb970e2(%rip), %rdi # 0xc02148
leaq 0xb970e3(%rip), %rsi # 0xc02150
movl $0x1, %edx
callq 0x6b127
movq 0x1000d0(%rbx), %rdi
testq %rdi, %rdi
jne 0x6b112
leaq 0x100090(%rbx), %rdi
callq 0x291a0
movq 0xb970de(%rip), %r14 # 0xc02178
movq 0x1000d0(%r14), %rdi
testq %rdi, %rdi
jne 0x6b0ee
addq $0x100090, %r14 # imm = 0x100090
movq %r14, %rdi
callq 0x291a0
testq %rbx, %rbx
je 0x6b0e9
movq %rbx, %rdi
callq 0x660b3
movq %rbx, %rdi
callq 0x69d81
movq 0x1000d0(%rbx), %rdi
testq %rdi, %rdi
jne 0x6b100
addq $0x100090, %rbx # imm = 0x100090
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x291a0
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x31df5b(%rip), %rax # 0x389050
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x6b0a6
leaq 0x31df49(%rip), %rax # 0x389050
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x6b0d6
leaq 0x31df37(%rip), %rax # 0x389050
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x6b087
| translog_set_file_size:
push rbp
mov rbp, rsp
push r14
push rbx
mov ebx, edi
call translog_lock
mov cs:dword_401510, ebx
cmp dword ptr cs:qword_C02148, ebx
jnb short loc_6B058
xor ebx, ebx
jmp short loc_6B093
loc_6B058:
mov rbx, qword ptr cs:xmmword_C02170+8
lea rdi, qword_C02148
lea rsi, xmmword_C02150
mov edx, 1
call translog_buffer_next
mov rdi, ds:qword_1000D0[rbx]
test rdi, rdi
jnz loc_6B112
loc_6B087:
lea rdi, unk_100090[rbx]
call _pthread_mutex_unlock
loc_6B093:
mov r14, qword ptr cs:xmmword_C02170+8
mov rdi, ds:qword_1000D0[r14]
test rdi, rdi
jnz short loc_6B0EE
loc_6B0A6:
add r14, 100090h
mov rdi, r14
call _pthread_mutex_unlock
test rbx, rbx
jz short loc_6B0E9
mov rdi, rbx
call translog_buffer_lock
mov rdi, rbx
call translog_buffer_flush
mov rdi, ds:qword_1000D0[rbx]
test rdi, rdi
jnz short loc_6B100
loc_6B0D6:
add rbx, 100090h
mov rdi, rbx
pop rbx
pop r14
pop rbp
jmp _pthread_mutex_unlock
loc_6B0E9:
pop rbx
pop r14
pop rbp
retn
loc_6B0EE:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_6B0A6
loc_6B100:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_6B0D6
loc_6B112:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_6B087
| long long translog_set_file_size(unsigned int a1)
{
long long v1; // rbx
long long v2; // r14
long long result; // rax
translog_lock();
dword_401510 = a1;
if ( (unsigned int)qword_C02148 >= a1 )
{
v1 = *((_QWORD *)&xmmword_C02170 + 1);
translog_buffer_next(&qword_C02148, &xmmword_C02150, 1LL);
if ( *(long long *)((char *)&qword_1000D0 + v1) )
PSI_server[44]();
pthread_mutex_unlock((char *)&unk_100090 + v1);
}
else
{
v1 = 0LL;
}
v2 = *((_QWORD *)&xmmword_C02170 + 1);
if ( *(long long *)((char *)&qword_1000D0 + *((_QWORD *)&xmmword_C02170 + 1)) )
PSI_server[44]();
result = pthread_mutex_unlock(v2 + 1048720);
if ( v1 )
{
translog_buffer_lock(v1);
translog_buffer_flush(v1);
if ( *(long long *)((char *)&qword_1000D0 + v1) )
PSI_server[44]();
return pthread_mutex_unlock(v1 + 1048720);
}
return result;
}
| translog_set_file_size:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV EBX,EDI
CALL 0x00166013
MOV dword ptr [0x00501510],EBX
CMP dword ptr [0x00d02148],EBX
JNC 0x0016b058
XOR EBX,EBX
JMP 0x0016b093
LAB_0016b058:
MOV RBX,qword ptr [0x00d02178]
LEA RDI,[0xd02148]
LEA RSI,[0xd02150]
MOV EDX,0x1
CALL 0x0016b127
MOV RDI,qword ptr [RBX + 0x1000d0]
TEST RDI,RDI
JNZ 0x0016b112
LAB_0016b087:
LEA RDI,[RBX + 0x100090]
CALL 0x001291a0
LAB_0016b093:
MOV R14,qword ptr [0x00d02178]
MOV RDI,qword ptr [R14 + 0x1000d0]
TEST RDI,RDI
JNZ 0x0016b0ee
LAB_0016b0a6:
ADD R14,0x100090
MOV RDI,R14
CALL 0x001291a0
TEST RBX,RBX
JZ 0x0016b0e9
MOV RDI,RBX
CALL 0x001660b3
MOV RDI,RBX
CALL 0x00169d81
MOV RDI,qword ptr [RBX + 0x1000d0]
TEST RDI,RDI
JNZ 0x0016b100
LAB_0016b0d6:
ADD RBX,0x100090
MOV RDI,RBX
POP RBX
POP R14
POP RBP
JMP 0x001291a0
LAB_0016b0e9:
POP RBX
POP R14
POP RBP
RET
LAB_0016b0ee:
LEA RAX,[0x489050]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0016b0a6
LAB_0016b100:
LEA RAX,[0x489050]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0016b0d6
LAB_0016b112:
LEA RAX,[0x489050]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0016b087
|
void translog_set_file_size(uint param_1)
{
long lVar1;
long lVar2;
translog_lock();
lVar2 = DAT_00d02178;
DAT_00501510 = param_1;
if ((uint)DAT_00d02148 < param_1) {
lVar2 = 0;
}
else {
translog_buffer_next(&DAT_00d02148,&DAT_00d02150,1);
if (*(long *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_filesz + lVar2) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_paddr + lVar2));
}
lVar1 = DAT_00d02178;
if (*(long *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_filesz + DAT_00d02178) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_paddr + lVar1));
if (lVar2 != 0) {
translog_buffer_lock(lVar2);
translog_buffer_flush(lVar2);
if (*(long *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_filesz + lVar2) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_paddr + lVar2));
return;
}
return;
}
| |
26,557 | ggml_compute_forward_concat_i8(ggml_compute_params const*, ggml_tensor*) | ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp | static void ggml_compute_forward_concat_i8(
const ggml_compute_params * params,
ggml_tensor * dst) {
const ggml_tensor * src0 = dst->src[0];
const ggml_tensor * src1 = dst->src[1];
GGML_ASSERT(ggml_type_size(src0->type) == sizeof(int8_t));
const int ith = params->ith;
const int nth = params->nth;
GGML_TENSOR_BINARY_OP_LOCALS
const int32_t dim = ggml_get_op_params_i32(dst, 0);
GGML_ASSERT(dim >= 0 && dim < 4);
int64_t o[4] = {0, 0, 0, 0};
o[dim] = src0->ne[dim];
const int8_t * x;
// TODO: smarter multi-theading
for (int i3 = 0; i3 < ne3; i3++) {
for (int i2 = ith; i2 < ne2; i2 += nth) {
for (int i1 = 0; i1 < ne1; i1++) {
for (int i0 = 0; i0 < ne0; i0++) {
if (i0 < ne00 && i1 < ne01 && i2 < ne02 && i3 < ne03) {
x = (const int8_t *) ((const char *)src0->data + (i0 )*nb00 + (i1 )*nb01 + (i2 )*nb02 + (i3 )*nb03);
} else {
x = (const int8_t *) ((const char *)src1->data + (i0 - o[0])*nb10 + (i1 - o[1])*nb11 + (i2 - o[2])*nb12 + (i3 - o[3])*nb13);
}
int8_t * y = (int8_t *)((char *)dst->data + i0*nb0 + i1*nb1 + i2*nb2 + i3*nb3);
*y = *x;
}
}
}
}
} | O0 | cpp | ggml_compute_forward_concat_i8(ggml_compute_params const*, ggml_tensor*):
subq $0x138, %rsp # imm = 0x138
movq %rdi, 0x130(%rsp)
movq %rsi, 0x128(%rsp)
movq 0x128(%rsp), %rax
movq 0x98(%rax), %rax
movq %rax, 0x120(%rsp)
movq 0x128(%rsp), %rax
movq 0xa0(%rax), %rax
movq %rax, 0x118(%rsp)
movq 0x120(%rsp), %rax
movl (%rax), %edi
callq 0xfcb0
cmpq $0x1, %rax
je 0x8dc1b
leaq 0x27a97(%rip), %rdi # 0xb5698
movl $0x995, %esi # imm = 0x995
leaq 0x1dd71(%rip), %rdx # 0xab97e
leaq 0x280e0(%rip), %rcx # 0xb5cf4
movb $0x0, %al
callq 0x10660
movq 0x130(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x114(%rsp)
movq 0x130(%rsp), %rax
movl 0x4(%rax), %eax
movl %eax, 0x110(%rsp)
movq 0x120(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x108(%rsp)
movq 0x120(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x100(%rsp)
movq 0x120(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0xf8(%rsp)
movq 0x120(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, 0xf0(%rsp)
movq 0x120(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0xe8(%rsp)
movq 0x120(%rsp), %rax
movq 0x38(%rax), %rax
movq %rax, 0xe0(%rsp)
movq 0x120(%rsp), %rax
movq 0x40(%rax), %rax
movq %rax, 0xd8(%rsp)
movq 0x120(%rsp), %rax
movq 0x48(%rax), %rax
movq %rax, 0xd0(%rsp)
movq 0x118(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0xc8(%rsp)
movq 0x118(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0xc0(%rsp)
movq 0x118(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0xb8(%rsp)
movq 0x118(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, 0xb0(%rsp)
movq 0x118(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0xa8(%rsp)
movq 0x118(%rsp), %rax
movq 0x38(%rax), %rax
movq %rax, 0xa0(%rsp)
movq 0x118(%rsp), %rax
movq 0x40(%rax), %rax
movq %rax, 0x98(%rsp)
movq 0x118(%rsp), %rax
movq 0x48(%rax), %rax
movq %rax, 0x90(%rsp)
movq 0x128(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x88(%rsp)
movq 0x128(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x80(%rsp)
movq 0x128(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x78(%rsp)
movq 0x128(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, 0x70(%rsp)
movq 0x128(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x68(%rsp)
movq 0x128(%rsp), %rax
movq 0x38(%rax), %rax
movq %rax, 0x60(%rsp)
movq 0x128(%rsp), %rax
movq 0x40(%rax), %rax
movq %rax, 0x58(%rsp)
movq 0x128(%rsp), %rax
movq 0x48(%rax), %rax
movq %rax, 0x50(%rsp)
movq 0x128(%rsp), %rdi
xorl %esi, %esi
callq 0x9bd30
movl %eax, 0x4c(%rsp)
cmpl $0x0, 0x4c(%rsp)
jl 0x8de2d
cmpl $0x4, 0x4c(%rsp)
jl 0x8de4e
leaq 0x27864(%rip), %rdi # 0xb5698
movl $0x99e, %esi # imm = 0x99E
leaq 0x1db3e(%rip), %rdx # 0xab97e
leaq 0x27e99(%rip), %rcx # 0xb5ce0
movb $0x0, %al
callq 0x10660
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0xf650
movq 0x120(%rsp), %rax
movslq 0x4c(%rsp), %rcx
movq 0x10(%rax,%rcx,8), %rcx
movslq 0x4c(%rsp), %rax
movq %rcx, 0x20(%rsp,%rax,8)
movl $0x0, 0x14(%rsp)
movslq 0x14(%rsp), %rax
cmpq 0x70(%rsp), %rax
jge 0x8e08c
movl 0x114(%rsp), %eax
movl %eax, 0x10(%rsp)
movslq 0x10(%rsp), %rax
cmpq 0x78(%rsp), %rax
jge 0x8e07a
movl $0x0, 0xc(%rsp)
movslq 0xc(%rsp), %rax
cmpq 0x80(%rsp), %rax
jge 0x8e064
movl $0x0, 0x8(%rsp)
movslq 0x8(%rsp), %rax
cmpq 0x88(%rsp), %rax
jge 0x8e052
movslq 0x8(%rsp), %rax
cmpq 0x108(%rsp), %rax
jge 0x8df7e
movslq 0xc(%rsp), %rax
cmpq 0x100(%rsp), %rax
jge 0x8df7e
movslq 0x10(%rsp), %rax
cmpq 0xf8(%rsp), %rax
jge 0x8df7e
movslq 0x14(%rsp), %rax
cmpq 0xf0(%rsp), %rax
jge 0x8df7e
movq 0x120(%rsp), %rax
movq 0xf8(%rax), %rax
movslq 0x8(%rsp), %rcx
imulq 0xe8(%rsp), %rcx
addq %rcx, %rax
movslq 0xc(%rsp), %rcx
imulq 0xe0(%rsp), %rcx
addq %rcx, %rax
movslq 0x10(%rsp), %rcx
imulq 0xd8(%rsp), %rcx
addq %rcx, %rax
movslq 0x14(%rsp), %rcx
imulq 0xd0(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x18(%rsp)
jmp 0x8dfea
movq 0x118(%rsp), %rax
movq 0xf8(%rax), %rax
movslq 0x8(%rsp), %rcx
subq 0x20(%rsp), %rcx
imulq 0xa8(%rsp), %rcx
addq %rcx, %rax
movslq 0xc(%rsp), %rcx
subq 0x28(%rsp), %rcx
imulq 0xa0(%rsp), %rcx
addq %rcx, %rax
movslq 0x10(%rsp), %rcx
subq 0x30(%rsp), %rcx
imulq 0x98(%rsp), %rcx
addq %rcx, %rax
movslq 0x14(%rsp), %rcx
subq 0x38(%rsp), %rcx
imulq 0x90(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x18(%rsp)
movq 0x128(%rsp), %rax
movq 0xf8(%rax), %rax
movslq 0x8(%rsp), %rcx
imulq 0x68(%rsp), %rcx
addq %rcx, %rax
movslq 0xc(%rsp), %rcx
imulq 0x60(%rsp), %rcx
addq %rcx, %rax
movslq 0x10(%rsp), %rcx
imulq 0x58(%rsp), %rcx
addq %rcx, %rax
movslq 0x14(%rsp), %rcx
imulq 0x50(%rsp), %rcx
addq %rcx, %rax
movq %rax, (%rsp)
movq 0x18(%rsp), %rax
movb (%rax), %cl
movq (%rsp), %rax
movb %cl, (%rax)
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x8ded1
jmp 0x8e054
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x8deb6
jmp 0x8e066
movl 0x110(%rsp), %eax
addl 0x10(%rsp), %eax
movl %eax, 0x10(%rsp)
jmp 0x8de9e
jmp 0x8e07c
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x8de83
addq $0x138, %rsp # imm = 0x138
retq
nopw %cs:(%rax,%rax)
| _ZL30ggml_compute_forward_concat_i8PK19ggml_compute_paramsP11ggml_tensor:
sub rsp, 138h
mov [rsp+138h+var_8], rdi
mov [rsp+138h+var_10], rsi
mov rax, [rsp+138h+var_10]
mov rax, [rax+98h]
mov [rsp+138h+var_18], rax
mov rax, [rsp+138h+var_10]
mov rax, [rax+0A0h]
mov [rsp+138h+var_20], rax
mov rax, [rsp+138h+var_18]
mov edi, [rax]
call _ggml_type_size
cmp rax, 1
jz short loc_8DC1B
lea rdi, aWorkspaceLlm4b_6; "/workspace/llm4binary/github/2025_star3"...
mov esi, 995h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlTypeSizeSr_0; "ggml_type_size(src0->type) == sizeof(in"...
mov al, 0
call _ggml_abort
loc_8DC1B:
mov rax, [rsp+138h+var_8]
mov eax, [rax]
mov [rsp+138h+var_24], eax
mov rax, [rsp+138h+var_8]
mov eax, [rax+4]
mov [rsp+138h+var_28], eax
mov rax, [rsp+138h+var_18]
mov rax, [rax+10h]
mov [rsp+138h+var_30], rax
mov rax, [rsp+138h+var_18]
mov rax, [rax+18h]
mov [rsp+138h+var_38], rax
mov rax, [rsp+138h+var_18]
mov rax, [rax+20h]
mov [rsp+138h+var_40], rax
mov rax, [rsp+138h+var_18]
mov rax, [rax+28h]
mov [rsp+138h+var_48], rax
mov rax, [rsp+138h+var_18]
mov rax, [rax+30h]
mov [rsp+138h+var_50], rax
mov rax, [rsp+138h+var_18]
mov rax, [rax+38h]
mov [rsp+138h+var_58], rax
mov rax, [rsp+138h+var_18]
mov rax, [rax+40h]
mov [rsp+138h+var_60], rax
mov rax, [rsp+138h+var_18]
mov rax, [rax+48h]
mov [rsp+138h+var_68], rax
mov rax, [rsp+138h+var_20]
mov rax, [rax+10h]
mov [rsp+138h+var_70], rax
mov rax, [rsp+138h+var_20]
mov rax, [rax+18h]
mov [rsp+138h+var_78], rax
mov rax, [rsp+138h+var_20]
mov rax, [rax+20h]
mov [rsp+138h+var_80], rax
mov rax, [rsp+138h+var_20]
mov rax, [rax+28h]
mov [rsp+138h+var_88], rax
mov rax, [rsp+138h+var_20]
mov rax, [rax+30h]
mov [rsp+138h+var_90], rax
mov rax, [rsp+138h+var_20]
mov rax, [rax+38h]
mov [rsp+138h+var_98], rax
mov rax, [rsp+138h+var_20]
mov rax, [rax+40h]
mov [rsp+138h+var_A0], rax
mov rax, [rsp+138h+var_20]
mov rax, [rax+48h]
mov [rsp+138h+var_A8], rax
mov rax, [rsp+138h+var_10]
mov rax, [rax+10h]
mov [rsp+138h+var_B0], rax
mov rax, [rsp+138h+var_10]
mov rax, [rax+18h]
mov [rsp+138h+var_B8], rax
mov rax, [rsp+138h+var_10]
mov rax, [rax+20h]
mov [rsp+138h+var_C0], rax
mov rax, [rsp+138h+var_10]
mov rax, [rax+28h]
mov [rsp+138h+var_C8], rax
mov rax, [rsp+138h+var_10]
mov rax, [rax+30h]
mov [rsp+138h+var_D0], rax
mov rax, [rsp+138h+var_10]
mov rax, [rax+38h]
mov [rsp+138h+var_D8], rax
mov rax, [rsp+138h+var_10]
mov rax, [rax+40h]
mov [rsp+138h+var_E0], rax
mov rax, [rsp+138h+var_10]
mov rax, [rax+48h]
mov [rsp+138h+var_E8], rax
mov rdi, [rsp+138h+var_10]
xor esi, esi
call _ZL22ggml_get_op_params_i32PK11ggml_tensorj; ggml_get_op_params_i32(ggml_tensor const*,uint)
mov [rsp+138h+var_EC], eax
cmp [rsp+138h+var_EC], 0
jl short loc_8DE2D
cmp [rsp+138h+var_EC], 4
jl short loc_8DE4E
loc_8DE2D:
lea rdi, aWorkspaceLlm4b_6; "/workspace/llm4binary/github/2025_star3"...
mov esi, 99Eh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aDim0Dim4; "dim >= 0 && dim < 4"
mov al, 0
call _ggml_abort
loc_8DE4E:
lea rdi, [rsp+138h+var_118]
xor esi, esi
mov edx, 20h ; ' '
call _memset
mov rax, [rsp+138h+var_18]
movsxd rcx, [rsp+138h+var_EC]
mov rcx, [rax+rcx*8+10h]
movsxd rax, [rsp+138h+var_EC]
mov [rsp+rax*8+138h+var_118], rcx
mov [rsp+138h+var_124], 0
loc_8DE83:
movsxd rax, [rsp+138h+var_124]
cmp rax, [rsp+138h+var_C8]
jge loc_8E08C
mov eax, [rsp+138h+var_24]
mov [rsp+138h+var_128], eax
loc_8DE9E:
movsxd rax, [rsp+138h+var_128]
cmp rax, [rsp+138h+var_C0]
jge loc_8E07A
mov [rsp+138h+var_12C], 0
loc_8DEB6:
movsxd rax, [rsp+138h+var_12C]
cmp rax, [rsp+138h+var_B8]
jge loc_8E064
mov [rsp+138h+var_130], 0
loc_8DED1:
movsxd rax, [rsp+138h+var_130]
cmp rax, [rsp+138h+var_B0]
jge loc_8E052
movsxd rax, [rsp+138h+var_130]
cmp rax, [rsp+138h+var_30]
jge loc_8DF7E
movsxd rax, [rsp+138h+var_12C]
cmp rax, [rsp+138h+var_38]
jge short loc_8DF7E
movsxd rax, [rsp+138h+var_128]
cmp rax, [rsp+138h+var_40]
jge short loc_8DF7E
movsxd rax, [rsp+138h+var_124]
cmp rax, [rsp+138h+var_48]
jge short loc_8DF7E
mov rax, [rsp+138h+var_18]
mov rax, [rax+0F8h]
movsxd rcx, [rsp+138h+var_130]
imul rcx, [rsp+138h+var_50]
add rax, rcx
movsxd rcx, [rsp+138h+var_12C]
imul rcx, [rsp+138h+var_58]
add rax, rcx
movsxd rcx, [rsp+138h+var_128]
imul rcx, [rsp+138h+var_60]
add rax, rcx
movsxd rcx, [rsp+138h+var_124]
imul rcx, [rsp+138h+var_68]
add rax, rcx
mov [rsp+138h+var_120], rax
jmp short loc_8DFEA
loc_8DF7E:
mov rax, [rsp+138h+var_20]
mov rax, [rax+0F8h]
movsxd rcx, [rsp+138h+var_130]
sub rcx, [rsp+138h+var_118]
imul rcx, [rsp+138h+var_90]
add rax, rcx
movsxd rcx, [rsp+138h+var_12C]
sub rcx, [rsp+138h+var_110]
imul rcx, [rsp+138h+var_98]
add rax, rcx
movsxd rcx, [rsp+138h+var_128]
sub rcx, [rsp+138h+var_108]
imul rcx, [rsp+138h+var_A0]
add rax, rcx
movsxd rcx, [rsp+138h+var_124]
sub rcx, [rsp+138h+var_100]
imul rcx, [rsp+138h+var_A8]
add rax, rcx
mov [rsp+138h+var_120], rax
loc_8DFEA:
mov rax, [rsp+138h+var_10]
mov rax, [rax+0F8h]
movsxd rcx, [rsp+138h+var_130]
imul rcx, [rsp+138h+var_D0]
add rax, rcx
movsxd rcx, [rsp+138h+var_12C]
imul rcx, [rsp+138h+var_D8]
add rax, rcx
movsxd rcx, [rsp+138h+var_128]
imul rcx, [rsp+138h+var_E0]
add rax, rcx
movsxd rcx, [rsp+138h+var_124]
imul rcx, [rsp+138h+var_E8]
add rax, rcx
mov [rsp+138h+var_138], rax
mov rax, [rsp+138h+var_120]
mov cl, [rax]
mov rax, [rsp+138h+var_138]
mov [rax], cl
mov eax, [rsp+138h+var_130]
add eax, 1
mov [rsp+138h+var_130], eax
jmp loc_8DED1
loc_8E052:
jmp short $+2
loc_8E054:
mov eax, [rsp+138h+var_12C]
add eax, 1
mov [rsp+138h+var_12C], eax
jmp loc_8DEB6
loc_8E064:
jmp short $+2
loc_8E066:
mov eax, [rsp+138h+var_28]
add eax, [rsp+138h+var_128]
mov [rsp+138h+var_128], eax
jmp loc_8DE9E
loc_8E07A:
jmp short $+2
loc_8E07C:
mov eax, [rsp+138h+var_124]
add eax, 1
mov [rsp+138h+var_124], eax
jmp loc_8DE83
loc_8E08C:
add rsp, 138h
retn
| long long ggml_compute_forward_concat_i8(int *a1, _QWORD *a2)
{
long long result; // rax
int m; // [rsp+8h] [rbp-130h]
int k; // [rsp+Ch] [rbp-12Ch]
int j; // [rsp+10h] [rbp-128h]
int i; // [rsp+14h] [rbp-124h]
_BYTE *v7; // [rsp+18h] [rbp-120h]
_QWORD v8[5]; // [rsp+20h] [rbp-118h] BYREF
unsigned int op_params_i32; // [rsp+4Ch] [rbp-ECh]
long long v10; // [rsp+50h] [rbp-E8h]
long long v11; // [rsp+58h] [rbp-E0h]
long long v12; // [rsp+60h] [rbp-D8h]
long long v13; // [rsp+68h] [rbp-D0h]
long long v14; // [rsp+70h] [rbp-C8h]
long long v15; // [rsp+78h] [rbp-C0h]
long long v16; // [rsp+80h] [rbp-B8h]
long long v17; // [rsp+88h] [rbp-B0h]
long long v18; // [rsp+90h] [rbp-A8h]
long long v19; // [rsp+98h] [rbp-A0h]
long long v20; // [rsp+A0h] [rbp-98h]
long long v21; // [rsp+A8h] [rbp-90h]
long long v22; // [rsp+B0h] [rbp-88h]
long long v23; // [rsp+B8h] [rbp-80h]
long long v24; // [rsp+C0h] [rbp-78h]
long long v25; // [rsp+C8h] [rbp-70h]
long long v26; // [rsp+D0h] [rbp-68h]
long long v27; // [rsp+D8h] [rbp-60h]
long long v28; // [rsp+E0h] [rbp-58h]
long long v29; // [rsp+E8h] [rbp-50h]
long long v30; // [rsp+F0h] [rbp-48h]
long long v31; // [rsp+F8h] [rbp-40h]
long long v32; // [rsp+100h] [rbp-38h]
long long v33; // [rsp+108h] [rbp-30h]
int v34; // [rsp+110h] [rbp-28h]
int v35; // [rsp+114h] [rbp-24h]
_QWORD *v36; // [rsp+118h] [rbp-20h]
_QWORD *v37; // [rsp+120h] [rbp-18h]
_QWORD *v38; // [rsp+128h] [rbp-10h]
int *v39; // [rsp+130h] [rbp-8h]
v39 = a1;
v38 = a2;
v37 = (_QWORD *)a2[19];
v36 = (_QWORD *)a2[20];
if ( ggml_type_size(*(unsigned int *)v37) != 1 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp",
2453LL,
"GGML_ASSERT(%s) failed",
"ggml_type_size(src0->type) == sizeof(int8_t)");
v35 = *v39;
v34 = v39[1];
v33 = v37[2];
v32 = v37[3];
v31 = v37[4];
v30 = v37[5];
v29 = v37[6];
v28 = v37[7];
v27 = v37[8];
v26 = v37[9];
v25 = v36[2];
v24 = v36[3];
v23 = v36[4];
v22 = v36[5];
v21 = v36[6];
v20 = v36[7];
v19 = v36[8];
v18 = v36[9];
v17 = v38[2];
v16 = v38[3];
v15 = v38[4];
v14 = v38[5];
v13 = v38[6];
v12 = v38[7];
v11 = v38[8];
v10 = v38[9];
op_params_i32 = ggml_get_op_params_i32(v38, 0LL);
if ( op_params_i32 >= 4 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp",
2462LL,
"GGML_ASSERT(%s) failed",
"dim >= 0 && dim < 4");
memset(v8, 0LL, 32LL);
v8[op_params_i32] = v37[(int)op_params_i32 + 2];
for ( i = 0; ; ++i )
{
result = i;
if ( i >= v14 )
break;
for ( j = v35; j < v15; j += v34 )
{
for ( k = 0; k < v16; ++k )
{
for ( m = 0; m < v17; ++m )
{
if ( m >= v33 || k >= v32 || j >= v31 || i >= v30 )
v7 = (_BYTE *)(v18 * (i - v8[3]) + v19 * (j - v8[2]) + v20 * (k - v8[1]) + v21 * (m - v8[0]) + v36[31]);
else
v7 = (_BYTE *)(v26 * i + v27 * j + v28 * k + v29 * m + v37[31]);
*(_BYTE *)(v10 * i + v11 * j + v12 * k + v13 * m + v38[31]) = *v7;
}
}
}
}
return result;
}
| ggml_compute_forward_concat_i8:
SUB RSP,0x138
MOV qword ptr [RSP + 0x130],RDI
MOV qword ptr [RSP + 0x128],RSI
MOV RAX,qword ptr [RSP + 0x128]
MOV RAX,qword ptr [RAX + 0x98]
MOV qword ptr [RSP + 0x120],RAX
MOV RAX,qword ptr [RSP + 0x128]
MOV RAX,qword ptr [RAX + 0xa0]
MOV qword ptr [RSP + 0x118],RAX
MOV RAX,qword ptr [RSP + 0x120]
MOV EDI,dword ptr [RAX]
CALL 0x0010fcb0
CMP RAX,0x1
JZ 0x0018dc1b
LEA RDI,[0x1b5698]
MOV ESI,0x995
LEA RDX,[0x1ab97e]
LEA RCX,[0x1b5cf4]
MOV AL,0x0
CALL 0x00110660
LAB_0018dc1b:
MOV RAX,qword ptr [RSP + 0x130]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x114],EAX
MOV RAX,qword ptr [RSP + 0x130]
MOV EAX,dword ptr [RAX + 0x4]
MOV dword ptr [RSP + 0x110],EAX
MOV RAX,qword ptr [RSP + 0x120]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x108],RAX
MOV RAX,qword ptr [RSP + 0x120]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x100],RAX
MOV RAX,qword ptr [RSP + 0x120]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RSP + 0xf8],RAX
MOV RAX,qword ptr [RSP + 0x120]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RSP + 0xf0],RAX
MOV RAX,qword ptr [RSP + 0x120]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP + 0xe8],RAX
MOV RAX,qword ptr [RSP + 0x120]
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RSP + 0xe0],RAX
MOV RAX,qword ptr [RSP + 0x120]
MOV RAX,qword ptr [RAX + 0x40]
MOV qword ptr [RSP + 0xd8],RAX
MOV RAX,qword ptr [RSP + 0x120]
MOV RAX,qword ptr [RAX + 0x48]
MOV qword ptr [RSP + 0xd0],RAX
MOV RAX,qword ptr [RSP + 0x118]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0xc8],RAX
MOV RAX,qword ptr [RSP + 0x118]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0xc0],RAX
MOV RAX,qword ptr [RSP + 0x118]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RSP + 0xb8],RAX
MOV RAX,qword ptr [RSP + 0x118]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RSP + 0xb0],RAX
MOV RAX,qword ptr [RSP + 0x118]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP + 0xa8],RAX
MOV RAX,qword ptr [RSP + 0x118]
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RSP + 0xa0],RAX
MOV RAX,qword ptr [RSP + 0x118]
MOV RAX,qword ptr [RAX + 0x40]
MOV qword ptr [RSP + 0x98],RAX
MOV RAX,qword ptr [RSP + 0x118]
MOV RAX,qword ptr [RAX + 0x48]
MOV qword ptr [RSP + 0x90],RAX
MOV RAX,qword ptr [RSP + 0x128]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x88],RAX
MOV RAX,qword ptr [RSP + 0x128]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x80],RAX
MOV RAX,qword ptr [RSP + 0x128]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RSP + 0x78],RAX
MOV RAX,qword ptr [RSP + 0x128]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RSP + 0x70],RAX
MOV RAX,qword ptr [RSP + 0x128]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP + 0x68],RAX
MOV RAX,qword ptr [RSP + 0x128]
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x128]
MOV RAX,qword ptr [RAX + 0x40]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x128]
MOV RAX,qword ptr [RAX + 0x48]
MOV qword ptr [RSP + 0x50],RAX
MOV RDI,qword ptr [RSP + 0x128]
XOR ESI,ESI
CALL 0x0019bd30
MOV dword ptr [RSP + 0x4c],EAX
CMP dword ptr [RSP + 0x4c],0x0
JL 0x0018de2d
CMP dword ptr [RSP + 0x4c],0x4
JL 0x0018de4e
LAB_0018de2d:
LEA RDI,[0x1b5698]
MOV ESI,0x99e
LEA RDX,[0x1ab97e]
LEA RCX,[0x1b5ce0]
MOV AL,0x0
CALL 0x00110660
LAB_0018de4e:
LEA RDI,[RSP + 0x20]
XOR ESI,ESI
MOV EDX,0x20
CALL 0x0010f650
MOV RAX,qword ptr [RSP + 0x120]
MOVSXD RCX,dword ptr [RSP + 0x4c]
MOV RCX,qword ptr [RAX + RCX*0x8 + 0x10]
MOVSXD RAX,dword ptr [RSP + 0x4c]
MOV qword ptr [RSP + RAX*0x8 + 0x20],RCX
MOV dword ptr [RSP + 0x14],0x0
LAB_0018de83:
MOVSXD RAX,dword ptr [RSP + 0x14]
CMP RAX,qword ptr [RSP + 0x70]
JGE 0x0018e08c
MOV EAX,dword ptr [RSP + 0x114]
MOV dword ptr [RSP + 0x10],EAX
LAB_0018de9e:
MOVSXD RAX,dword ptr [RSP + 0x10]
CMP RAX,qword ptr [RSP + 0x78]
JGE 0x0018e07a
MOV dword ptr [RSP + 0xc],0x0
LAB_0018deb6:
MOVSXD RAX,dword ptr [RSP + 0xc]
CMP RAX,qword ptr [RSP + 0x80]
JGE 0x0018e064
MOV dword ptr [RSP + 0x8],0x0
LAB_0018ded1:
MOVSXD RAX,dword ptr [RSP + 0x8]
CMP RAX,qword ptr [RSP + 0x88]
JGE 0x0018e052
MOVSXD RAX,dword ptr [RSP + 0x8]
CMP RAX,qword ptr [RSP + 0x108]
JGE 0x0018df7e
MOVSXD RAX,dword ptr [RSP + 0xc]
CMP RAX,qword ptr [RSP + 0x100]
JGE 0x0018df7e
MOVSXD RAX,dword ptr [RSP + 0x10]
CMP RAX,qword ptr [RSP + 0xf8]
JGE 0x0018df7e
MOVSXD RAX,dword ptr [RSP + 0x14]
CMP RAX,qword ptr [RSP + 0xf0]
JGE 0x0018df7e
MOV RAX,qword ptr [RSP + 0x120]
MOV RAX,qword ptr [RAX + 0xf8]
MOVSXD RCX,dword ptr [RSP + 0x8]
IMUL RCX,qword ptr [RSP + 0xe8]
ADD RAX,RCX
MOVSXD RCX,dword ptr [RSP + 0xc]
IMUL RCX,qword ptr [RSP + 0xe0]
ADD RAX,RCX
MOVSXD RCX,dword ptr [RSP + 0x10]
IMUL RCX,qword ptr [RSP + 0xd8]
ADD RAX,RCX
MOVSXD RCX,dword ptr [RSP + 0x14]
IMUL RCX,qword ptr [RSP + 0xd0]
ADD RAX,RCX
MOV qword ptr [RSP + 0x18],RAX
JMP 0x0018dfea
LAB_0018df7e:
MOV RAX,qword ptr [RSP + 0x118]
MOV RAX,qword ptr [RAX + 0xf8]
MOVSXD RCX,dword ptr [RSP + 0x8]
SUB RCX,qword ptr [RSP + 0x20]
IMUL RCX,qword ptr [RSP + 0xa8]
ADD RAX,RCX
MOVSXD RCX,dword ptr [RSP + 0xc]
SUB RCX,qword ptr [RSP + 0x28]
IMUL RCX,qword ptr [RSP + 0xa0]
ADD RAX,RCX
MOVSXD RCX,dword ptr [RSP + 0x10]
SUB RCX,qword ptr [RSP + 0x30]
IMUL RCX,qword ptr [RSP + 0x98]
ADD RAX,RCX
MOVSXD RCX,dword ptr [RSP + 0x14]
SUB RCX,qword ptr [RSP + 0x38]
IMUL RCX,qword ptr [RSP + 0x90]
ADD RAX,RCX
MOV qword ptr [RSP + 0x18],RAX
LAB_0018dfea:
MOV RAX,qword ptr [RSP + 0x128]
MOV RAX,qword ptr [RAX + 0xf8]
MOVSXD RCX,dword ptr [RSP + 0x8]
IMUL RCX,qword ptr [RSP + 0x68]
ADD RAX,RCX
MOVSXD RCX,dword ptr [RSP + 0xc]
IMUL RCX,qword ptr [RSP + 0x60]
ADD RAX,RCX
MOVSXD RCX,dword ptr [RSP + 0x10]
IMUL RCX,qword ptr [RSP + 0x58]
ADD RAX,RCX
MOVSXD RCX,dword ptr [RSP + 0x14]
IMUL RCX,qword ptr [RSP + 0x50]
ADD RAX,RCX
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP + 0x18]
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RSP]
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RSP + 0x8]
ADD EAX,0x1
MOV dword ptr [RSP + 0x8],EAX
JMP 0x0018ded1
LAB_0018e052:
JMP 0x0018e054
LAB_0018e054:
MOV EAX,dword ptr [RSP + 0xc]
ADD EAX,0x1
MOV dword ptr [RSP + 0xc],EAX
JMP 0x0018deb6
LAB_0018e064:
JMP 0x0018e066
LAB_0018e066:
MOV EAX,dword ptr [RSP + 0x110]
ADD EAX,dword ptr [RSP + 0x10]
MOV dword ptr [RSP + 0x10],EAX
JMP 0x0018de9e
LAB_0018e07a:
JMP 0x0018e07c
LAB_0018e07c:
MOV EAX,dword ptr [RSP + 0x14]
ADD EAX,0x1
MOV dword ptr [RSP + 0x14],EAX
JMP 0x0018de83
LAB_0018e08c:
ADD RSP,0x138
RET
|
/* ggml_compute_forward_concat_i8(ggml_compute_params const*, ggml_tensor*) */
void ggml_compute_forward_concat_i8(ggml_compute_params *param_1,ggml_tensor *param_2)
{
long lVar1;
int local_130;
int local_12c;
int local_128;
int local_124;
int1 *local_120;
long local_118 [5];
int local_ec;
long local_e8;
long local_e0;
long local_d8;
long local_d0;
long local_c8;
long local_c0;
long local_b8;
long local_b0;
long local_a8;
long local_a0;
long local_98;
long local_90;
int8 local_88;
int8 local_80;
int8 local_78;
int8 local_70;
long local_68;
long local_60;
long local_58;
long local_50;
long local_48;
long local_40;
long local_38;
long local_30;
int local_28;
int local_24;
long local_20;
int4 *local_18;
ggml_tensor *local_10;
ggml_compute_params *local_8;
local_18 = *(int4 **)(param_2 + 0x98);
local_20 = *(long *)(param_2 + 0xa0);
local_10 = param_2;
local_8 = param_1;
lVar1 = ggml_type_size(*local_18);
if (lVar1 != 1) {
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp"
,0x995,"GGML_ASSERT(%s) failed","ggml_type_size(src0->type) == sizeof(int8_t)");
}
local_24 = *(int *)local_8;
local_28 = *(int *)(local_8 + 4);
local_30 = *(long *)(local_18 + 4);
local_38 = *(long *)(local_18 + 6);
local_40 = *(long *)(local_18 + 8);
local_48 = *(long *)(local_18 + 10);
local_50 = *(long *)(local_18 + 0xc);
local_58 = *(long *)(local_18 + 0xe);
local_60 = *(long *)(local_18 + 0x10);
local_68 = *(long *)(local_18 + 0x12);
local_70 = *(int8 *)(local_20 + 0x10);
local_78 = *(int8 *)(local_20 + 0x18);
local_80 = *(int8 *)(local_20 + 0x20);
local_88 = *(int8 *)(local_20 + 0x28);
local_90 = *(long *)(local_20 + 0x30);
local_98 = *(long *)(local_20 + 0x38);
local_a0 = *(long *)(local_20 + 0x40);
local_a8 = *(long *)(local_20 + 0x48);
local_b0 = *(long *)(local_10 + 0x10);
local_b8 = *(long *)(local_10 + 0x18);
local_c0 = *(long *)(local_10 + 0x20);
local_c8 = *(long *)(local_10 + 0x28);
local_d0 = *(long *)(local_10 + 0x30);
local_d8 = *(long *)(local_10 + 0x38);
local_e0 = *(long *)(local_10 + 0x40);
local_e8 = *(long *)(local_10 + 0x48);
local_ec = ggml_get_op_params_i32(local_10,0);
if ((local_ec < 0) || (3 < local_ec)) {
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp"
,0x99e,"GGML_ASSERT(%s) failed","dim >= 0 && dim < 4");
}
memset(local_118,0,0x20);
local_118[local_ec] = *(long *)(local_18 + (long)local_ec * 2 + 4);
for (local_124 = 0; local_124 < local_c8; local_124 = local_124 + 1) {
for (local_128 = local_24; local_128 < local_c0; local_128 = local_28 + local_128) {
for (local_12c = 0; local_12c < local_b8; local_12c = local_12c + 1) {
for (local_130 = 0; local_130 < local_b0; local_130 = local_130 + 1) {
if ((((local_130 < local_30) && (local_12c < local_38)) && (local_128 < local_40)) &&
(local_124 < local_48)) {
local_120 = (int1 *)
(*(long *)(local_18 + 0x3e) + local_130 * local_50 + local_12c * local_58 +
local_128 * local_60 + local_124 * local_68);
}
else {
local_120 = (int1 *)
(*(long *)(local_20 + 0xf8) + (local_130 - local_118[0]) * local_90 +
(local_12c - local_118[1]) * local_98 +
(local_128 - local_118[2]) * local_a0 +
(local_124 - local_118[3]) * local_a8);
}
*(int1 *)
(*(long *)(local_10 + 0xf8) + local_130 * local_d0 + local_12c * local_d8 +
local_128 * local_e0 + local_124 * local_e8) = *local_120;
}
}
}
}
return;
}
| |
26,558 | bool StartTree::ClusterTree<float>::writeTreeToFile<ogzstream>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, ogzstream&) const | iqtree3/utils/bionj2.cpp | bool writeTreeToFile(const std::string &treeFilePath, F& out) const {
struct Place
{
//
//Used for keep of tracking where we're up to when
//we are writing out the description of a Cluster.
//
public:
size_t clusterIndex;
size_t linkNumber;
Place(size_t ix, size_t num) {
clusterIndex = ix;
linkNumber = num;
}
};
out.exceptions(std::ios::failbit | std::ios::badbit);
try {
out.open(treeFilePath.c_str(), std::ios_base::out);
out.precision(8);
std::vector<Place> stack;
bool failed = false; //Becomes true if clusters
//defines cycles (should never happen)
//Indicates a fatal logic error
size_t maxLoop = 3 * size();
//More than this, and there must be
//a cycle. Or something.
stack.emplace_back(size()-1, 0); //assumes: size is at least 1!
do {
--maxLoop;
if (maxLoop==0) {
failed = true;
break;
}
Place here = stack.back();
const Cluster<T>& cluster = at(here.clusterIndex);
stack.pop_back();
if (cluster.links.empty()) {
out << cluster.name;
continue;
}
if (here.linkNumber==0) {
out << "(";
stack.emplace_back(here.clusterIndex, 1);
stack.emplace_back(cluster.links[0].clusterIndex, 0);
continue;
}
size_t nextChildNum = here.linkNumber;
const Link<T> & linkPrev = cluster.links[nextChildNum-1];
out << ":" << linkPrev.linkDistance;
if (nextChildNum<cluster.links.size()) {
out << ",";
const Link<T> & linkNext = cluster.links[nextChildNum];
stack.emplace_back(here.clusterIndex, nextChildNum+1);
stack.emplace_back(linkNext.clusterIndex, 0);
} else {
out << ")";
}
} while (0 < stack.size());
out << ";" << std::endl;
out.close();
return true;
} catch (std::ios::failure &) {
std::cerr << "IO error"
<< " opening/writing file: " << treeFilePath << std::endl;
return false;
} catch (const char *str) {
std::cerr << "Writing newick file failed: " << str << std::endl;
return false;
} catch (std::string &str) {
std::cerr << "Writing newick file failed: " << str << std::endl;
return false;
}
} | O0 | cpp | bool StartTree::ClusterTree<float>::writeTreeToFile<ogzstream>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, ogzstream&) const:
subq $0x148, %rsp # imm = 0x148
movq %rdi, 0x138(%rsp)
movq %rsi, 0x130(%rsp)
movq %rdx, 0x128(%rsp)
movq 0x138(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x128(%rsp), %rax
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
addq %rcx, %rax
movq %rax, 0x70(%rsp)
movl $0x4, %edi
movl $0x1, %esi
callq 0x46e30
movq 0x70(%rsp), %rdi
movl %eax, %esi
callq 0x37170
movq 0x128(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x130(%rsp), %rdi
callq 0x371b0
movq 0x78(%rsp), %rdi
movq %rax, %rsi
movl $0x10, %edx
callq 0x373a0
jmp 0x47f6c
movq 0x128(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
movl $0x8, %esi
callq 0x39fe0
leaq 0x100(%rsp), %rdi
movq %rdi, 0x60(%rsp)
callq 0x4a030
movq 0x68(%rsp), %rdi
movb $0x0, 0xff(%rsp)
callq 0x42880
movq 0x68(%rsp), %rdi
leaq (%rax,%rax,2), %rax
movq %rax, 0xf0(%rsp)
callq 0x42880
movq 0x60(%rsp), %rdi
decq %rax
movq %rax, 0xe8(%rsp)
movl $0x0, 0xe4(%rsp)
leaq 0xe8(%rsp), %rsi
leaq 0xe4(%rsp), %rdx
callq 0x4a040
jmp 0x47ff4
jmp 0x47ff6
movq 0xf0(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0xf0(%rsp)
cmpq $0x0, 0xf0(%rsp)
jne 0x481f2
movb $0x1, 0xff(%rsp)
jmp 0x48477
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x120(%rsp)
movl %eax, 0x11c(%rsp)
jmp 0x4805d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x120(%rsp)
movl %eax, 0x11c(%rsp)
leaq 0x100(%rsp), %rdi
callq 0x4a300
movl 0x11c(%rsp), %eax
movl %eax, 0x5c(%rsp)
movl $0x3, %ecx
cmpl %ecx, %eax
jne 0x480fa
movq 0x120(%rsp), %rdi
callq 0x371a0
movq %rax, 0x80(%rsp)
movq 0x32f5f(%rip), %rdi # 0x7aff0
leaq 0x218d2(%rip), %rsi # 0x6996a
callq 0x373e0
movq %rax, 0x50(%rsp)
jmp 0x480a4
movq 0x50(%rsp), %rdi
leaq 0x21932(%rip), %rsi # 0x699e2
callq 0x373e0
movq %rax, 0x48(%rsp)
jmp 0x480bc
movq 0x48(%rsp), %rdi
movq 0x130(%rsp), %rsi
callq 0x37390
movq %rax, 0x40(%rsp)
jmp 0x480d5
movq 0x40(%rsp), %rdi
movq 0x32edf(%rip), %rsi # 0x7afc0
callq 0x37450
jmp 0x480e8
movb $0x0, 0x147(%rsp)
callq 0x37700
jmp 0x48522
movl 0x5c(%rsp), %eax
movl $0x2, %ecx
cmpl %ecx, %eax
jne 0x48174
movq 0x120(%rsp), %rdi
callq 0x371a0
movq %rax, 0x88(%rsp)
movq 0x32ecd(%rip), %rdi # 0x7aff0
leaq 0x2189b(%rip), %rsi # 0x699c5
callq 0x373e0
movq %rax, 0x38(%rsp)
jmp 0x48136
movq 0x38(%rsp), %rdi
movq 0x88(%rsp), %rsi
callq 0x373e0
movq %rax, 0x30(%rsp)
jmp 0x4814f
movq 0x30(%rsp), %rdi
movq 0x32e65(%rip), %rsi # 0x7afc0
callq 0x37450
jmp 0x48162
movb $0x0, 0x147(%rsp)
callq 0x37700
jmp 0x48522
movl 0x5c(%rsp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x48533
movq 0x120(%rsp), %rdi
callq 0x371a0
movq %rax, 0x90(%rsp)
movq 0x32e4f(%rip), %rdi # 0x7aff0
leaq 0x2181d(%rip), %rsi # 0x699c5
callq 0x373e0
movq %rax, 0x28(%rsp)
jmp 0x481b4
movq 0x28(%rsp), %rdi
movq 0x90(%rsp), %rsi
callq 0x37390
movq %rax, 0x20(%rsp)
jmp 0x481cd
movq 0x20(%rsp), %rdi
movq 0x32de7(%rip), %rsi # 0x7afc0
callq 0x37450
jmp 0x481e0
movb $0x0, 0x147(%rsp)
callq 0x37700
jmp 0x48522
leaq 0x100(%rsp), %rdi
callq 0x4a0d0
movq 0x68(%rsp), %rdi
movups (%rax), %xmm0
movaps %xmm0, 0xd0(%rsp)
movq 0xd0(%rsp), %rsi
callq 0x48710
movq %rax, 0x18(%rsp)
jmp 0x48223
movq 0x18(%rsp), %rax
movq %rax, 0xc8(%rsp)
leaq 0x100(%rsp), %rdi
callq 0x4a110
movq 0xc8(%rsp), %rdi
addq $0x28, %rdi
callq 0x48770
testb $0x1, %al
jne 0x48254
jmp 0x48278
movq 0x128(%rsp), %rdi
addq $0x10, %rdi
movq 0xc8(%rsp), %rsi
addq $0x8, %rsi
callq 0x37390
jmp 0x48273
jmp 0x4845c
cmpq $0x0, 0xd8(%rsp)
jne 0x4830a
movq 0x128(%rsp), %rdi
addq $0x10, %rdi
leaq 0x21163(%rip), %rsi # 0x693fd
callq 0x373e0
jmp 0x482a1
movl $0x1, 0xc4(%rsp)
leaq 0x100(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
leaq 0xc4(%rsp), %rdx
callq 0x4a130
jmp 0x482cb
movq 0xc8(%rsp), %rdi
addq $0x28, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x488e0
movq %rax, %rsi
movl $0x0, 0xc0(%rsp)
leaq 0x100(%rsp), %rdi
leaq 0xc0(%rsp), %rdx
callq 0x4a1c0
jmp 0x48305
jmp 0x4845c
movq 0xd8(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq 0xc8(%rsp), %rdi
addq $0x28, %rdi
movq 0xb8(%rsp), %rsi
decq %rsi
callq 0x488e0
movq %rax, 0xb0(%rsp)
movq 0x128(%rsp), %rdi
addq $0x10, %rdi
leaq 0x20fb2(%rip), %rsi # 0x69303
callq 0x373e0
movq %rax, 0x10(%rsp)
jmp 0x4835d
movq 0x10(%rsp), %rdi
movq 0xb0(%rsp), %rax
movss 0x8(%rax), %xmm0
callq 0x37300
jmp 0x48376
movq 0xb8(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0xc8(%rsp), %rdi
addq $0x28, %rdi
callq 0x43d20
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
jae 0x4843e
movq 0x128(%rsp), %rdi
addq $0x10, %rdi
leaq 0x212bb(%rip), %rsi # 0x69673
callq 0x373e0
jmp 0x483bf
movq 0xc8(%rsp), %rdi
addq $0x28, %rdi
movq 0xb8(%rsp), %rsi
callq 0x488e0
movq %rax, 0xa8(%rsp)
movq 0xb8(%rsp), %rax
incq %rax
movq %rax, 0xa0(%rsp)
leaq 0x100(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
leaq 0xa0(%rsp), %rdx
callq 0x4a250
jmp 0x48412
movq 0xa8(%rsp), %rsi
movl $0x0, 0x9c(%rsp)
leaq 0x100(%rsp), %rdi
leaq 0x9c(%rsp), %rdx
callq 0x4a1c0
jmp 0x4843c
jmp 0x4845a
movq 0x128(%rsp), %rdi
addq $0x10, %rdi
leaq 0x212c2(%rip), %rsi # 0x69713
callq 0x373e0
jmp 0x48458
jmp 0x4845a
jmp 0x4845c
leaq 0x100(%rsp), %rdi
callq 0x4a2e0
movq %rax, %rcx
xorl %eax, %eax
cmpq %rcx, %rax
jb 0x47ff6
movq 0x128(%rsp), %rdi
addq $0x10, %rdi
leaq 0x211ec(%rip), %rsi # 0x69676
callq 0x373e0
movq %rax, (%rsp)
jmp 0x48495
movq (%rsp), %rdi
movq 0x32b20(%rip), %rsi # 0x7afc0
callq 0x37450
jmp 0x484a7
movq 0x128(%rsp), %rdi
callq 0x37080
jmp 0x484b6
movb $0x1, 0x147(%rsp)
leaq 0x100(%rsp), %rdi
callq 0x4a300
jmp 0x48522
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x120(%rsp)
movl %eax, 0x11c(%rsp)
callq 0x37700
jmp 0x484e8
jmp 0x48533
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x120(%rsp)
movl %eax, 0x11c(%rsp)
callq 0x37700
jmp 0x48533
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x120(%rsp)
movl %eax, 0x11c(%rsp)
callq 0x37700
jmp 0x48520
jmp 0x48533
movb 0x147(%rsp), %al
andb $0x1, %al
addq $0x148, %rsp # imm = 0x148
retq
movq 0x120(%rsp), %rdi
callq 0x37770
movq %rax, %rdi
callq 0x38f30
nopl (%rax,%rax)
| _ZNK9StartTree11ClusterTreeIfE15writeTreeToFileISt13basic_fstreamIcSt11char_traitsIcEEEEbRKNSt7__cxx1112basic_stringIcS5_SaIcEEERT_:
sub rsp, 148h
mov [rsp+148h+var_10], rdi
mov [rsp+148h+var_18], rsi
mov [rsp+148h+var_20], rdx
mov rax, [rsp+148h+var_10]
mov [rsp+148h+var_E0], rax
mov rax, [rsp+148h+var_20]
mov rcx, [rax]
mov rcx, [rcx-18h]
add rax, rcx
mov [rsp+148h+var_D8], rax
mov edi, 4
mov esi, 1
call _ZStorSt12_Ios_IostateS_; std::operator|(std::_Ios_Iostate,std::_Ios_Iostate)
mov rdi, [rsp+148h+var_D8]
mov esi, eax
call __ZNSt9basic_iosIcSt11char_traitsIcEE10exceptionsESt12_Ios_Iostate; std::ios::exceptions(std::_Ios_Iostate)
mov rax, [rsp+148h+var_20]
mov [rsp+148h+var_D0], rax
mov rdi, [rsp+148h+var_18]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdi, [rsp+148h+var_D0]
mov rsi, rax
mov edx, 10h
call __ZNSt13basic_fstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode; std::fstream::open(char const*,std::_Ios_Openmode)
jmp short $+2
loc_47F6C:
mov rdi, [rsp+148h+var_20]
mov rax, [rdi]
mov rax, [rax-18h]
add rdi, rax; this
mov esi, 8; __int64
call _ZNSt8ios_base9precisionEl; std::ios_base::precision(long)
lea rdi, [rsp+148h+var_48]
mov [rsp+148h+var_E8], rdi
call _ZNSt6vectorIZNK9StartTree11ClusterTreeIfE15writeTreeToFileISt13basic_fstreamIcSt11char_traitsIcEEEEbRKNSt7__cxx1112basic_stringIcS6_SaIcEEERT_E5PlaceSaISG_EEC2Ev; std::vector<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place,std::allocator<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place>>::vector(void)
mov rdi, [rsp+148h+var_E0]
mov [rsp+148h+var_49], 0
call _ZNKSt6vectorIN9StartTree7ClusterIfEESaIS2_EE4sizeEv; std::vector<StartTree::Cluster<float>>::size(void)
mov rdi, [rsp+148h+var_E0]
lea rax, [rax+rax*2]
mov [rsp+148h+var_58], rax
call _ZNKSt6vectorIN9StartTree7ClusterIfEESaIS2_EE4sizeEv; std::vector<StartTree::Cluster<float>>::size(void)
mov rdi, [rsp+148h+var_E8]
dec rax
mov [rsp+148h+var_60], rax
mov [rsp+148h+var_64], 0
lea rsi, [rsp+148h+var_60]
lea rdx, [rsp+148h+var_64]
call _ZNSt6vectorIZNK9StartTree11ClusterTreeIfE15writeTreeToFileISt13basic_fstreamIcSt11char_traitsIcEEEEbRKNSt7__cxx1112basic_stringIcS6_SaIcEEERT_E5PlaceSaISG_EE12emplace_backIJmiEEERSG_DpOT_; std::vector<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place,std::allocator<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place>>::emplace_back<ulong,int>(ulong,int &&)
jmp short $+2
loc_47FF4:
jmp short $+2
loc_47FF6:
mov rax, [rsp+148h+var_58]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rsp+148h+var_58], rax
cmp [rsp+148h+var_58], 0
jnz loc_481F2
mov [rsp+148h+var_49], 1
jmp loc_48477
mov rcx, rax
mov eax, edx
mov [rsp+148h+var_28], rcx
mov [rsp+148h+var_2C], eax
jmp short loc_4805D
mov rcx, rax
mov eax, edx
mov [rsp+148h+var_28], rcx
mov [rsp+148h+var_2C], eax
lea rdi, [rsp+148h+var_48]
call _ZNSt6vectorIZNK9StartTree11ClusterTreeIfE15writeTreeToFileISt13basic_fstreamIcSt11char_traitsIcEEEEbRKNSt7__cxx1112basic_stringIcS6_SaIcEEERT_E5PlaceSaISG_EED2Ev; std::vector<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place,std::allocator<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place>>::~vector()
loc_4805D:
mov eax, [rsp+148h+var_2C]
mov [rsp+148h+var_EC], eax
mov ecx, 3
cmp eax, ecx
jnz loc_480FA
mov rdi, [rsp+148h+var_28]; void *
call ___cxa_begin_catch
mov [rsp+148h+var_C8], rax
mov rdi, cs:_ZSt4cerr_ptr
lea rsi, aLoadMatrixFail+14h; "IO error"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+148h+var_F8], rax
jmp short $+2
loc_480A4:
mov rdi, [rsp+148h+var_F8]
lea rsi, aOpeningWriting; " opening/writing file: "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+148h+var_100], rax
jmp short $+2
loc_480BC:
mov rdi, [rsp+148h+var_100]
mov rsi, [rsp+148h+var_18]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rsp+148h+var_108], rax
jmp short $+2
loc_480D5:
mov rdi, [rsp+148h+var_108]
mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr
call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &))
jmp short $+2
loc_480E8:
mov [rsp+148h+var_1], 0
call ___cxa_end_catch
jmp loc_48522
loc_480FA:
mov eax, [rsp+148h+var_EC]
mov ecx, 2
cmp eax, ecx
jnz short loc_48174
mov rdi, [rsp+148h+var_28]; void *
call ___cxa_begin_catch
mov [rsp+148h+var_C0], rax
mov rdi, cs:_ZSt4cerr_ptr
lea rsi, aWritingNewickF; "Writing newick file failed: "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+148h+var_110], rax
jmp short $+2
loc_48136:
mov rdi, [rsp+148h+var_110]
mov rsi, [rsp+148h+var_C0]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+148h+var_118], rax
jmp short $+2
loc_4814F:
mov rdi, [rsp+148h+var_118]
mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr
call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &))
jmp short $+2
loc_48162:
mov [rsp+148h+var_1], 0
call ___cxa_end_catch
jmp loc_48522
loc_48174:
mov eax, [rsp+148h+var_EC]
mov ecx, 1
cmp eax, ecx
jnz loc_48533
mov rdi, [rsp+148h+var_28]; void *
call ___cxa_begin_catch
mov [rsp+148h+var_B8], rax
mov rdi, cs:_ZSt4cerr_ptr
lea rsi, aWritingNewickF; "Writing newick file failed: "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+148h+var_120], rax
jmp short $+2
loc_481B4:
mov rdi, [rsp+148h+var_120]
mov rsi, [rsp+148h+var_B8]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rsp+148h+var_128], rax
jmp short $+2
loc_481CD:
mov rdi, [rsp+148h+var_128]
mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr
call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &))
jmp short $+2
loc_481E0:
mov [rsp+148h+var_1], 0
call ___cxa_end_catch
jmp loc_48522
loc_481F2:
lea rdi, [rsp+148h+var_48]
call _ZNSt6vectorIZNK9StartTree11ClusterTreeIfE15writeTreeToFileISt13basic_fstreamIcSt11char_traitsIcEEEEbRKNSt7__cxx1112basic_stringIcS6_SaIcEEERT_E5PlaceSaISG_EE4backEv; std::vector<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place,std::allocator<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place>>::back(void)
mov rdi, [rsp+148h+var_E0]
movups xmm0, xmmword ptr [rax]
movaps [rsp+148h+var_78], xmm0
mov rsi, qword ptr [rsp+148h+var_78]
call _ZNKSt6vectorIN9StartTree7ClusterIfEESaIS2_EE2atEm; std::vector<StartTree::Cluster<float>>::at(ulong)
mov [rsp+148h+var_130], rax
jmp short $+2
loc_48223:
mov rax, [rsp+148h+var_130]
mov [rsp+148h+var_80], rax
lea rdi, [rsp+148h+var_48]
call _ZNSt6vectorIZNK9StartTree11ClusterTreeIfE15writeTreeToFileISt13basic_fstreamIcSt11char_traitsIcEEEEbRKNSt7__cxx1112basic_stringIcS6_SaIcEEERT_E5PlaceSaISG_EE8pop_backEv; std::vector<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place,std::allocator<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place>>::pop_back(void)
mov rdi, [rsp+148h+var_80]
add rdi, 28h ; '('
call _ZNKSt6vectorIN9StartTree4LinkIfEESaIS2_EE5emptyEv; std::vector<StartTree::Link<float>>::empty(void)
test al, 1
jnz short loc_48254
jmp short loc_48278
loc_48254:
mov rdi, [rsp+148h+var_20]
add rdi, 10h
mov rsi, [rsp+148h+var_80]
add rsi, 8
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
jmp short $+2
loc_48273:
jmp loc_4845C
loc_48278:
cmp qword ptr [rsp+148h+var_78+8], 0
jnz loc_4830A
mov rdi, [rsp+148h+var_20]
add rdi, 10h
lea rsi, aInputFileAndOu+2Eh; "("
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_482A1:
mov [rsp+148h+var_84], 1
lea rdi, [rsp+148h+var_48]
lea rsi, [rsp+148h+var_78]
lea rdx, [rsp+148h+var_84]
call _ZNSt6vectorIZNK9StartTree11ClusterTreeIfE15writeTreeToFileISt13basic_fstreamIcSt11char_traitsIcEEEEbRKNSt7__cxx1112basic_stringIcS6_SaIcEEERT_E5PlaceSaISG_EE12emplace_backIJRmiEEERSG_DpOT_; std::vector<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place,std::allocator<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place>>::emplace_back<ulong &,int>(ulong &,int &&)
jmp short $+2
loc_482CB:
mov rdi, [rsp+148h+var_80]
add rdi, 28h ; '('
xor eax, eax
mov esi, eax
call _ZNKSt6vectorIN9StartTree4LinkIfEESaIS2_EEixEm; std::vector<StartTree::Link<float>>::operator[](ulong)
mov rsi, rax
mov [rsp+148h+var_88], 0
lea rdi, [rsp+148h+var_48]
lea rdx, [rsp+148h+var_88]
call _ZNSt6vectorIZNK9StartTree11ClusterTreeIfE15writeTreeToFileISt13basic_fstreamIcSt11char_traitsIcEEEEbRKNSt7__cxx1112basic_stringIcS6_SaIcEEERT_E5PlaceSaISG_EE12emplace_backIJRKmiEEERSG_DpOT_; std::vector<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place,std::allocator<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place>>::emplace_back<ulong const&,int>(ulong const&,int &&)
jmp short $+2
loc_48305:
jmp loc_4845C
loc_4830A:
mov rax, qword ptr [rsp+148h+var_78+8]
mov [rsp+148h+var_90], rax
mov rdi, [rsp+148h+var_80]
add rdi, 28h ; '('
mov rsi, [rsp+148h+var_90]
dec rsi
call _ZNKSt6vectorIN9StartTree4LinkIfEESaIS2_EEixEm; std::vector<StartTree::Link<float>>::operator[](ulong)
mov [rsp+148h+var_98], rax
mov rdi, [rsp+148h+var_20]
add rdi, 10h
lea rsi, aRecognizedDist+29h; ":"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+148h+var_138], rax
jmp short $+2
loc_4835D:
mov rdi, [rsp+148h+var_138]
mov rax, [rsp+148h+var_98]
movss xmm0, dword ptr [rax+8]
call __ZNSolsEf; std::ostream::operator<<(float)
jmp short $+2
loc_48376:
mov rax, [rsp+148h+var_90]
mov [rsp+148h+var_140], rax
mov rdi, [rsp+148h+var_80]
add rdi, 28h ; '('
call _ZNKSt6vectorIN9StartTree4LinkIfEESaIS2_EE4sizeEv; std::vector<StartTree::Link<float>>::size(void)
mov rcx, rax
mov rax, [rsp+148h+var_140]
cmp rax, rcx
jnb loc_4843E
mov rdi, [rsp+148h+var_20]
add rdi, 10h
lea rsi, a108f_0+6; ","
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_483BF:
mov rdi, [rsp+148h+var_80]
add rdi, 28h ; '('
mov rsi, [rsp+148h+var_90]
call _ZNKSt6vectorIN9StartTree4LinkIfEESaIS2_EEixEm; std::vector<StartTree::Link<float>>::operator[](ulong)
mov [rsp+148h+var_A0], rax
mov rax, [rsp+148h+var_90]
inc rax
mov [rsp+148h+var_A8], rax
lea rdi, [rsp+148h+var_48]
lea rsi, [rsp+148h+var_78]
lea rdx, [rsp+148h+var_A8]
call _ZNSt6vectorIZNK9StartTree11ClusterTreeIfE15writeTreeToFileISt13basic_fstreamIcSt11char_traitsIcEEEEbRKNSt7__cxx1112basic_stringIcS6_SaIcEEERT_E5PlaceSaISG_EE12emplace_backIJRmmEEERSG_DpOT_; std::vector<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place,std::allocator<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place>>::emplace_back<ulong &,ulong>(ulong &,ulong &&)
jmp short $+2
loc_48412:
mov rsi, [rsp+148h+var_A0]
mov [rsp+148h+var_AC], 0
lea rdi, [rsp+148h+var_48]
lea rdx, [rsp+148h+var_AC]
call _ZNSt6vectorIZNK9StartTree11ClusterTreeIfE15writeTreeToFileISt13basic_fstreamIcSt11char_traitsIcEEEEbRKNSt7__cxx1112basic_stringIcS6_SaIcEEERT_E5PlaceSaISG_EE12emplace_backIJRKmiEEERSG_DpOT_; std::vector<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place,std::allocator<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place>>::emplace_back<ulong const&,int>(ulong const&,int &&)
jmp short $+2
loc_4843C:
jmp short loc_4845A
loc_4843E:
mov rdi, [rsp+148h+var_20]
add rdi, 10h
lea rsi, aRapidNeighbour+3Bh; ")"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_48458:
jmp short $+2
loc_4845A:
jmp short $+2
loc_4845C:
lea rdi, [rsp+148h+var_48]
call _ZNKSt6vectorIZNK9StartTree11ClusterTreeIfE15writeTreeToFileISt13basic_fstreamIcSt11char_traitsIcEEEEbRKNSt7__cxx1112basic_stringIcS6_SaIcEEERT_E5PlaceSaISG_EE4sizeEv; std::vector<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place,std::allocator<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place>>::size(void)
mov rcx, rax
xor eax, eax
cmp rax, rcx
jb loc_47FF6
loc_48477:
mov rdi, [rsp+148h+var_20]
add rdi, 10h
lea rsi, asc_69675+1; ";"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+148h+var_148], rax
jmp short $+2
loc_48495:
mov rdi, [rsp+148h+var_148]
mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr
call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &))
jmp short $+2
loc_484A7:
mov rdi, [rsp+148h+var_20]
call __ZNSt13basic_fstreamIcSt11char_traitsIcEE5closeEv; std::fstream::close(void)
jmp short $+2
loc_484B6:
mov [rsp+148h+var_1], 1
lea rdi, [rsp+148h+var_48]
call _ZNSt6vectorIZNK9StartTree11ClusterTreeIfE15writeTreeToFileISt13basic_fstreamIcSt11char_traitsIcEEEEbRKNSt7__cxx1112basic_stringIcS6_SaIcEEERT_E5PlaceSaISG_EED2Ev; std::vector<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place,std::allocator<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place>>::~vector()
jmp short loc_48522
mov rcx, rax
mov eax, edx
mov [rsp+148h+var_28], rcx
mov [rsp+148h+var_2C], eax
call ___cxa_end_catch
jmp short $+2
loc_484E8:
jmp short loc_48533
mov rcx, rax
mov eax, edx
mov [rsp+148h+var_28], rcx
mov [rsp+148h+var_2C], eax
call ___cxa_end_catch
jmp short loc_48533
mov rcx, rax
mov eax, edx
mov [rsp+148h+var_28], rcx
mov [rsp+148h+var_2C], eax
call ___cxa_end_catch
jmp short $+2
loc_48520:
jmp short loc_48533
loc_48522:
mov al, [rsp+148h+var_1]
and al, 1
add rsp, 148h
retn
loc_48533:
mov rdi, [rsp+148h+var_28]
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
| char StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(_QWORD *a1, long long a2, _QWORD *a3)
{
unsigned int v3; // eax
long long v4; // rsi
long long v5; // rax
long long v7; // [rsp+0h] [rbp-148h]
unsigned long long v8; // [rsp+8h] [rbp-140h]
long long v9; // [rsp+10h] [rbp-138h]
char *v10; // [rsp+70h] [rbp-D8h]
int v11; // [rsp+9Ch] [rbp-ACh] BYREF
unsigned long long v12; // [rsp+A0h] [rbp-A8h] BYREF
long long v13; // [rsp+A8h] [rbp-A0h]
long long v14; // [rsp+B0h] [rbp-98h]
unsigned long long v15; // [rsp+B8h] [rbp-90h]
int v16; // [rsp+C0h] [rbp-88h] BYREF
int v17; // [rsp+C4h] [rbp-84h] BYREF
long long v18; // [rsp+C8h] [rbp-80h]
__int128 v19; // [rsp+D0h] [rbp-78h] BYREF
int v20; // [rsp+E4h] [rbp-64h] BYREF
long long v21; // [rsp+E8h] [rbp-60h] BYREF
long long v22; // [rsp+F0h] [rbp-58h]
char v23; // [rsp+FFh] [rbp-49h]
_BYTE v24[28]; // [rsp+100h] [rbp-48h] BYREF
_QWORD *v25; // [rsp+128h] [rbp-20h]
long long v26; // [rsp+130h] [rbp-18h]
_QWORD *v27; // [rsp+138h] [rbp-10h]
char v28; // [rsp+147h] [rbp-1h]
v27 = a1;
v26 = a2;
v25 = a3;
v10 = (char *)a3 + *(_QWORD *)(*a3 - 24LL);
v3 = std::operator|(4u, 1);
std::ios::exceptions(v10, v3);
v4 = std::string::c_str(a2);
std::fstream::open(v25, v4, 16LL);
std::ios_base::precision((std::ios_base *)((char *)v25 + *(_QWORD *)(*v25 - 24LL)), 8LL);
std::vector<bool StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place,std::allocator<bool StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place>>::vector();
v23 = 0;
v22 = 3 * std::vector<StartTree::Cluster<float>>::size(a1);
v21 = std::vector<StartTree::Cluster<float>>::size(a1) - 1;
v20 = 0;
std::vector<bool StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place,std::allocator<bool StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place>>::emplace_back<unsigned long,int>(
v24,
&v21,
&v20);
while ( --v22 )
{
v19 = *(_OWORD *)std::vector<bool StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place,std::allocator<bool StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place>>::back(v24);
v18 = std::vector<StartTree::Cluster<float>>::at(a1, v19);
std::vector<bool StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place,std::allocator<bool StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place>>::pop_back(v24);
if ( (std::vector<StartTree::Link<float>>::empty(v18 + 40) & 1) != 0 )
{
std::operator<<<char>(v25 + 2, v18 + 8);
}
else if ( *((_QWORD *)&v19 + 1) )
{
v15 = *((_QWORD *)&v19 + 1);
v14 = std::vector<StartTree::Link<float>>::operator[](v18 + 40, *((_QWORD *)&v19 + 1) - 1LL);
v9 = std::operator<<<std::char_traits<char>>(v25 + 2, ":");
std::ostream::operator<<(v9, *(float *)(v14 + 8));
v8 = v15;
if ( v8 >= std::vector<StartTree::Link<float>>::size((_QWORD *)(v18 + 40)) )
{
std::operator<<<std::char_traits<char>>(v25 + 2, ")");
}
else
{
std::operator<<<std::char_traits<char>>(v25 + 2, ",");
v13 = std::vector<StartTree::Link<float>>::operator[](v18 + 40, v15);
v12 = v15 + 1;
std::vector<bool StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place,std::allocator<bool StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place>>::emplace_back<unsigned long &,unsigned long>(
v24,
&v19,
&v12);
v11 = 0;
std::vector<bool StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place,std::allocator<bool StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place>>::emplace_back<unsigned long const&,int>(
v24,
v13,
&v11);
}
}
else
{
std::operator<<<std::char_traits<char>>(v25 + 2, "(");
v17 = 1;
std::vector<bool StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place,std::allocator<bool StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place>>::emplace_back<unsigned long &,int>(
v24,
&v19,
&v17);
v5 = std::vector<StartTree::Link<float>>::operator[](v18 + 40, 0LL);
v16 = 0;
std::vector<bool StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place,std::allocator<bool StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place>>::emplace_back<unsigned long const&,int>(
v24,
v5,
&v16);
}
if ( !std::vector<bool StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place,std::allocator<bool StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place>>::size(v24) )
goto LABEL_12;
}
v23 = 1;
LABEL_12:
v7 = std::operator<<<std::char_traits<char>>(v25 + 2, ";");
std::ostream::operator<<(v7, &std::endl<char,std::char_traits<char>>);
std::fstream::close(v25);
v28 = 1;
std::vector<bool StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place,std::allocator<bool StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::string const&,std::fstream &)::Place>>::~vector(v24);
return v28 & 1;
}
| writeTreeToFile<std::fstream>:
SUB RSP,0x148
MOV qword ptr [RSP + 0x138],RDI
MOV qword ptr [RSP + 0x130],RSI
MOV qword ptr [RSP + 0x128],RDX
MOV RAX,qword ptr [RSP + 0x138]
MOV qword ptr [RSP + 0x68],RAX
MOV RAX,qword ptr [RSP + 0x128]
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
ADD RAX,RCX
MOV qword ptr [RSP + 0x70],RAX
MOV EDI,0x4
MOV ESI,0x1
CALL 0x00146e30
MOV RDI,qword ptr [RSP + 0x70]
MOV ESI,EAX
CALL 0x00137170
MOV RAX,qword ptr [RSP + 0x128]
MOV qword ptr [RSP + 0x78],RAX
MOV RDI,qword ptr [RSP + 0x130]
CALL 0x001371b0
MOV RDI,qword ptr [RSP + 0x78]
MOV RSI,RAX
LAB_00147f60:
MOV EDX,0x10
CALL 0x001373a0
JMP 0x00147f6c
LAB_00147f6c:
MOV RDI,qword ptr [RSP + 0x128]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + -0x18]
ADD RDI,RAX
MOV ESI,0x8
CALL 0x00139fe0
LEA RDI,[RSP + 0x100]
MOV qword ptr [RSP + 0x60],RDI
CALL 0x0014a030
MOV RDI,qword ptr [RSP + 0x68]
MOV byte ptr [RSP + 0xff],0x0
CALL 0x00142880
MOV RDI,qword ptr [RSP + 0x68]
LEA RAX,[RAX + RAX*0x2]
MOV qword ptr [RSP + 0xf0],RAX
CALL 0x00142880
MOV RDI,qword ptr [RSP + 0x60]
DEC RAX
MOV qword ptr [RSP + 0xe8],RAX
MOV dword ptr [RSP + 0xe4],0x0
LAB_00147fdd:
LEA RSI,[RSP + 0xe8]
LEA RDX,[RSP + 0xe4]
CALL 0x0014a040
LAB_00147ff2:
JMP 0x00147ff4
LAB_00147ff4:
JMP 0x00147ff6
LAB_00147ff6:
MOV RAX,qword ptr [RSP + 0xf0]
ADD RAX,-0x1
MOV qword ptr [RSP + 0xf0],RAX
CMP qword ptr [RSP + 0xf0],0x0
JNZ 0x001481f2
MOV byte ptr [RSP + 0xff],0x1
JMP 0x00148477
LAB_001481f2:
LEA RDI,[RSP + 0x100]
CALL 0x0014a0d0
MOV RDI,qword ptr [RSP + 0x68]
MOVUPS XMM0,xmmword ptr [RAX]
MOVAPS xmmword ptr [RSP + 0xd0],XMM0
MOV RSI,qword ptr [RSP + 0xd0]
LAB_00148217:
CALL 0x00148710
MOV qword ptr [RSP + 0x18],RAX
JMP 0x00148223
LAB_00148223:
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0xc8],RAX
LEA RDI,[RSP + 0x100]
CALL 0x0014a110
MOV RDI,qword ptr [RSP + 0xc8]
ADD RDI,0x28
CALL 0x00148770
TEST AL,0x1
JNZ 0x00148254
JMP 0x00148278
LAB_00148254:
MOV RDI,qword ptr [RSP + 0x128]
ADD RDI,0x10
MOV RSI,qword ptr [RSP + 0xc8]
ADD RSI,0x8
CALL 0x00137390
JMP 0x00148273
LAB_00148273:
JMP 0x0014845c
LAB_00148278:
CMP qword ptr [RSP + 0xd8],0x0
JNZ 0x0014830a
MOV RDI,qword ptr [RSP + 0x128]
ADD RDI,0x10
LEA RSI,[0x1693fd]
CALL 0x001373e0
JMP 0x001482a1
LAB_001482a1:
MOV dword ptr [RSP + 0xc4],0x1
LEA RDI,[RSP + 0x100]
LEA RSI,[RSP + 0xd0]
LEA RDX,[RSP + 0xc4]
CALL 0x0014a130
JMP 0x001482cb
LAB_001482cb:
MOV RDI,qword ptr [RSP + 0xc8]
ADD RDI,0x28
XOR EAX,EAX
MOV ESI,EAX
CALL 0x001488e0
MOV RSI,RAX
MOV dword ptr [RSP + 0xc0],0x0
LEA RDI,[RSP + 0x100]
LEA RDX,[RSP + 0xc0]
CALL 0x0014a1c0
JMP 0x00148305
LAB_00148305:
JMP 0x0014845c
LAB_0014830a:
MOV RAX,qword ptr [RSP + 0xd8]
MOV qword ptr [RSP + 0xb8],RAX
MOV RDI,qword ptr [RSP + 0xc8]
ADD RDI,0x28
MOV RSI,qword ptr [RSP + 0xb8]
DEC RSI
CALL 0x001488e0
MOV qword ptr [RSP + 0xb0],RAX
MOV RDI,qword ptr [RSP + 0x128]
ADD RDI,0x10
LEA RSI,[0x169303]
CALL 0x001373e0
MOV qword ptr [RSP + 0x10],RAX
JMP 0x0014835d
LAB_0014835d:
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0xb0]
MOVSS XMM0,dword ptr [RAX + 0x8]
CALL 0x00137300
JMP 0x00148376
LAB_00148376:
MOV RAX,qword ptr [RSP + 0xb8]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0xc8]
ADD RDI,0x28
CALL 0x00143d20
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
CMP RAX,RCX
JNC 0x0014843e
MOV RDI,qword ptr [RSP + 0x128]
ADD RDI,0x10
LEA RSI,[0x169673]
CALL 0x001373e0
JMP 0x001483bf
LAB_001483bf:
MOV RDI,qword ptr [RSP + 0xc8]
ADD RDI,0x28
MOV RSI,qword ptr [RSP + 0xb8]
CALL 0x001488e0
MOV qword ptr [RSP + 0xa8],RAX
MOV RAX,qword ptr [RSP + 0xb8]
INC RAX
MOV qword ptr [RSP + 0xa0],RAX
LEA RDI,[RSP + 0x100]
LEA RSI,[RSP + 0xd0]
LEA RDX,[RSP + 0xa0]
CALL 0x0014a250
JMP 0x00148412
LAB_00148412:
MOV RSI,qword ptr [RSP + 0xa8]
MOV dword ptr [RSP + 0x9c],0x0
LEA RDI,[RSP + 0x100]
LEA RDX,[RSP + 0x9c]
CALL 0x0014a1c0
JMP 0x0014843c
LAB_0014843c:
JMP 0x0014845a
LAB_0014843e:
MOV RDI,qword ptr [RSP + 0x128]
ADD RDI,0x10
LEA RSI,[0x169713]
CALL 0x001373e0
JMP 0x00148458
LAB_00148458:
JMP 0x0014845a
LAB_0014845a:
JMP 0x0014845c
LAB_0014845c:
LEA RDI,[RSP + 0x100]
CALL 0x0014a2e0
MOV RCX,RAX
XOR EAX,EAX
CMP RAX,RCX
JC 0x00147ff6
LAB_00148477:
MOV RDI,qword ptr [RSP + 0x128]
ADD RDI,0x10
LEA RSI,[0x169676]
CALL 0x001373e0
MOV qword ptr [RSP],RAX
JMP 0x00148495
LAB_00148495:
MOV RDI,qword ptr [RSP]
MOV RSI,qword ptr [0x0017afc0]
CALL 0x00137450
JMP 0x001484a7
LAB_001484a7:
MOV RDI,qword ptr [RSP + 0x128]
CALL 0x00137080
JMP 0x001484b6
LAB_001484b6:
MOV byte ptr [RSP + 0x147],0x1
LEA RDI,[RSP + 0x100]
CALL 0x0014a300
JMP 0x00148522
LAB_00148522:
MOV AL,byte ptr [RSP + 0x147]
AND AL,0x1
ADD RSP,0x148
RET
|
/* bool StartTree::ClusterTree<float>::writeTreeToFile<std::fstream >(std::__cxx11::string const&,
std::fstream&) const */
bool __thiscall
StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>
(ClusterTree<float> *this,string *param_1,fstream *param_2)
{
fstream *pfVar1;
int4 uVar2;
int8 uVar3;
long lVar4;
ulong *puVar5;
ulong uVar6;
ulong uVar7;
ostream *poVar8;
int local_ac;
ulong local_a8;
ulong *local_a0;
long local_98;
ulong local_90;
int local_88 [2];
long local_80;
ulong local_78;
ulong uStack_70;
int local_64;
ulong local_60;
long local_58;
int1 local_49;
vector<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::__cxx11::string_const&,std::fstream&)const::Place,std::allocator<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::__cxx11::string_const&,std::fstream&)const::Place>>
local_48 [40];
fstream *local_20;
string *local_18;
ClusterTree<float> *local_10;
byte local_1;
lVar4 = *(long *)(*(long *)param_2 + -0x18);
local_20 = param_2;
local_18 = param_1;
local_10 = this;
uVar2 = std::operator|(4,1);
std::ios::exceptions(param_2 + lVar4,uVar2);
pfVar1 = local_20;
uVar3 = std::__cxx11::string::c_str();
/* try { // try from 00147f60 to 00147f69 has its CatchHandler @ 00148026 */
std::fstream::open(pfVar1,uVar3,0x10);
std::ios_base::precision((ios_base *)(local_20 + *(long *)(*(long *)local_20 + -0x18)),8);
std::
vector<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::__cxx11::string_const&,std::fstream&)const::Place,std::allocator<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::__cxx11::string_const&,std::fstream&)const::Place>>
::vector(local_48);
local_49 = 0;
local_58 = std::vector<StartTree::Cluster<float>,std::allocator<StartTree::Cluster<float>>>::size
((vector<StartTree::Cluster<float>,std::allocator<StartTree::Cluster<float>>>
*)this);
local_58 = local_58 * 3;
lVar4 = std::vector<StartTree::Cluster<float>,std::allocator<StartTree::Cluster<float>>>::size
((vector<StartTree::Cluster<float>,std::allocator<StartTree::Cluster<float>>> *)
this);
local_60 = lVar4 - 1;
local_64 = 0;
/* try { // try from 00147fdd to 00147ff1 has its CatchHandler @ 0014803c */
std::
vector<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::__cxx11::string_const&,std::fstream&)const::Place,std::allocator<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::__cxx11::string_const&,std::fstream&)const::Place>>
::emplace_back<unsigned_long,int>(local_48,&local_60,&local_64);
do {
local_58 = local_58 + -1;
if (local_58 == 0) {
local_49 = 1;
break;
}
puVar5 = (ulong *)std::
vector<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::__cxx11::string_const&,std::fstream&)const::Place,std::allocator<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::__cxx11::string_const&,std::fstream&)const::Place>>
::back(local_48);
local_78 = *puVar5;
uStack_70 = puVar5[1];
/* try { // try from 00148217 to 001484b3 has its CatchHandler @ 0014803c */
local_80 = std::vector<StartTree::Cluster<float>,std::allocator<StartTree::Cluster<float>>>::at
((vector<StartTree::Cluster<float>,std::allocator<StartTree::Cluster<float>>>
*)this,local_78);
std::
vector<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::__cxx11::string_const&,std::fstream&)const::Place,std::allocator<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::__cxx11::string_const&,std::fstream&)const::Place>>
::pop_back(local_48);
uVar6 = std::vector<StartTree::Link<float>,std::allocator<StartTree::Link<float>>>::empty
((vector<StartTree::Link<float>,std::allocator<StartTree::Link<float>>> *)
(local_80 + 0x28));
if ((uVar6 & 1) == 0) {
if (uStack_70 == 0) {
std::operator<<((ostream *)(local_20 + 0x10),"(");
local_88[1] = 1;
std::
vector<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::__cxx11::string_const&,std::fstream&)const::Place,std::allocator<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::__cxx11::string_const&,std::fstream&)const::Place>>
::emplace_back<unsigned_long&,int>(local_48,&local_78,local_88 + 1);
puVar5 = (ulong *)std::vector<StartTree::Link<float>,std::allocator<StartTree::Link<float>>>
::operator[]((vector<StartTree::Link<float>,std::allocator<StartTree::Link<float>>>
*)(local_80 + 0x28),0);
local_88[0] = 0;
std::
vector<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::__cxx11::string_const&,std::fstream&)const::Place,std::allocator<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::__cxx11::string_const&,std::fstream&)const::Place>>
::emplace_back<unsigned_long_const&,int>(local_48,puVar5,local_88);
}
else {
local_90 = uStack_70;
local_98 = std::vector<StartTree::Link<float>,std::allocator<StartTree::Link<float>>>::
operator[]((vector<StartTree::Link<float>,std::allocator<StartTree::Link<float>>>
*)(local_80 + 0x28),uStack_70 - 1);
poVar8 = std::operator<<((ostream *)(local_20 + 0x10),":");
std::ostream::operator<<(poVar8,*(float *)(local_98 + 8));
uVar6 = local_90;
uVar7 = std::vector<StartTree::Link<float>,std::allocator<StartTree::Link<float>>>::size
((vector<StartTree::Link<float>,std::allocator<StartTree::Link<float>>> *)
(local_80 + 0x28));
if (uVar6 < uVar7) {
std::operator<<((ostream *)(local_20 + 0x10),",");
local_a0 = (ulong *)std::
vector<StartTree::Link<float>,std::allocator<StartTree::Link<float>>>
::operator[]((vector<StartTree::Link<float>,std::allocator<StartTree::Link<float>>>
*)(local_80 + 0x28),local_90);
local_a8 = local_90 + 1;
std::
vector<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::__cxx11::string_const&,std::fstream&)const::Place,std::allocator<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::__cxx11::string_const&,std::fstream&)const::Place>>
::emplace_back<unsigned_long&,unsigned_long>(local_48,&local_78,&local_a8);
local_ac = 0;
std::
vector<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::__cxx11::string_const&,std::fstream&)const::Place,std::allocator<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::__cxx11::string_const&,std::fstream&)const::Place>>
::emplace_back<unsigned_long_const&,int>(local_48,local_a0,&local_ac);
}
else {
std::operator<<((ostream *)(local_20 + 0x10),")");
}
}
}
else {
std::operator<<((ostream *)(local_20 + 0x10),(string *)(local_80 + 8));
}
lVar4 = std::
vector<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::__cxx11::string_const&,std::fstream&)const::Place,std::allocator<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::__cxx11::string_const&,std::fstream&)const::Place>>
::size(local_48);
} while (lVar4 != 0);
poVar8 = std::operator<<((ostream *)(local_20 + 0x10),";");
std::ostream::operator<<
(poVar8,(_func_ostream_ptr_ostream_ptr *)PTR_endl<char,std_char_traits<char>>_0017afc0);
std::fstream::close();
local_1 = 1;
std::
vector<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::__cxx11::string_const&,std::fstream&)const::Place,std::allocator<StartTree::ClusterTree<float>::writeTreeToFile<std::fstream>(std::__cxx11::string_const&,std::fstream&)const::Place>>
::~vector(local_48);
return (bool)(local_1 & 1);
}
| |
26,559 | wqueue_release_one_locktype_from_queue | eloqsql/mysys/wqueue.c | void wqueue_release_one_locktype_from_queue(WQUEUE *wqueue)
{
struct st_my_thread_var *last= wqueue->last_thread;
struct st_my_thread_var *next= last->next;
struct st_my_thread_var *thread;
struct st_my_thread_var *new_list= NULL;
uint first_type= next->lock_type;
if (first_type == MY_PTHREAD_LOCK_WRITE)
{
/* release first waiting for write lock */
mysql_cond_signal(&next->suspend);
if (next == last)
wqueue->last_thread= NULL;
else
last->next= next->next;
next->next= NULL;
return;
}
do
{
thread= next;
next= thread->next;
if (thread->lock_type == MY_PTHREAD_LOCK_WRITE)
{
/* skip waiting for write lock */
if (new_list)
{
thread->next= new_list->next;
new_list= new_list->next= thread;
}
else
new_list= thread->next= thread;
}
else
{
/* release waiting for read lock */
mysql_cond_signal(&thread->suspend);
thread->next= NULL;
}
} while (thread != last);
wqueue->last_thread= new_list;
} | O3 | c | wqueue_release_one_locktype_from_queue:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
movq (%rdi), %r12
movq 0x88(%r12), %rbx
cmpl $0x1, 0xe4(%rbx)
jne 0xa6366
leaq 0x8(%rbx), %r14
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
jne 0xa6404
movq %r14, %rdi
callq 0x295c0
cmpq %r12, %rbx
je 0xa63e3
movq 0x88(%rbx), %rax
movq %rax, 0x88(%r12)
jmp 0xa63ea
movq %r15, %r14
xorl %r13d, %r13d
movq %rbx, %r15
movq 0x88(%rbx), %rbx
cmpl $0x1, 0xe4(%r15)
jne 0xa639c
testq %r13, %r13
je 0xa63bb
movq 0x88(%r13), %rax
movq %rax, 0x88(%r15)
movq %r15, 0x88(%r13)
jmp 0xa63c2
movq 0x38(%r15), %rdi
testq %rdi, %rdi
jne 0xa63cc
leaq 0x8(%r15), %rdi
callq 0x295c0
movq $0x0, 0x88(%r15)
jmp 0xa63c5
movq %r15, 0x88(%r15)
movq %r15, %r13
cmpq %r12, %r15
jne 0xa636c
jmp 0xa63de
leaq 0x2dfc3d(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x170(%rax)
jmp 0xa63a5
movq %r13, (%r14)
jmp 0xa63f5
movq $0x0, (%r15)
movq $0x0, 0x88(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2dfc05(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x170(%rax)
jmp 0xa6341
| wqueue_release_one_locktype_from_queue:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rdi
mov r12, [rdi]
mov rbx, [r12+88h]
cmp dword ptr [rbx+0E4h], 1
jnz short loc_A6366
lea r14, [rbx+8]
mov rdi, [rbx+38h]
test rdi, rdi
jnz loc_A6404
loc_A6341:
mov rdi, r14
call _pthread_cond_signal
cmp rbx, r12
jz loc_A63E3
mov rax, [rbx+88h]
mov [r12+88h], rax
jmp loc_A63EA
loc_A6366:
mov r14, r15
xor r13d, r13d
loc_A636C:
mov r15, rbx
mov rbx, [rbx+88h]
cmp dword ptr [r15+0E4h], 1
jnz short loc_A639C
test r13, r13
jz short loc_A63BB
mov rax, [r13+88h]
mov [r15+88h], rax
mov [r13+88h], r15
jmp short loc_A63C2
loc_A639C:
mov rdi, [r15+38h]
test rdi, rdi
jnz short loc_A63CC
loc_A63A5:
lea rdi, [r15+8]
call _pthread_cond_signal
mov qword ptr [r15+88h], 0
jmp short loc_A63C5
loc_A63BB:
mov [r15+88h], r15
loc_A63C2:
mov r13, r15
loc_A63C5:
cmp r15, r12
jnz short loc_A636C
jmp short loc_A63DE
loc_A63CC:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+170h]
jmp short loc_A63A5
loc_A63DE:
mov [r14], r13
jmp short loc_A63F5
loc_A63E3:
mov qword ptr [r15], 0
loc_A63EA:
mov qword ptr [rbx+88h], 0
loc_A63F5:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_A6404:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+170h]
jmp loc_A6341
| long long wqueue_release_one_locktype_from_queue(long long *a1)
{
long long v2; // r12
long long v3; // rbx
long long v4; // rdi
long long result; // rax
long long v7; // r13
long long v8; // r15
long long v9; // rdi
v2 = *a1;
v3 = *(_QWORD *)(*a1 + 136);
if ( *(_DWORD *)(v3 + 228) == 1 )
{
v4 = *(_QWORD *)(v3 + 56);
if ( v4 )
((void ( *)(long long))PSI_server[46])(v4);
result = pthread_cond_signal(v3 + 8);
if ( v3 == v2 )
{
*a1 = 0LL;
}
else
{
result = *(_QWORD *)(v3 + 136);
*(_QWORD *)(v2 + 136) = result;
}
*(_QWORD *)(v3 + 136) = 0LL;
}
else
{
v7 = 0LL;
do
{
v8 = v3;
v3 = *(_QWORD *)(v3 + 136);
if ( *(_DWORD *)(v8 + 228) == 1 )
{
if ( v7 )
{
result = *(_QWORD *)(v7 + 136);
*(_QWORD *)(v8 + 136) = result;
*(_QWORD *)(v7 + 136) = v8;
}
else
{
*(_QWORD *)(v8 + 136) = v8;
}
v7 = v8;
}
else
{
v9 = *(_QWORD *)(v8 + 56);
if ( v9 )
((void ( *)(long long))PSI_server[46])(v9);
result = pthread_cond_signal(v8 + 8);
*(_QWORD *)(v8 + 136) = 0LL;
}
}
while ( v8 != v2 );
*a1 = v7;
}
return result;
}
| wqueue_release_one_locktype_from_queue:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RDI
MOV R12,qword ptr [RDI]
MOV RBX,qword ptr [R12 + 0x88]
CMP dword ptr [RBX + 0xe4],0x1
JNZ 0x001a6366
LEA R14,[RBX + 0x8]
MOV RDI,qword ptr [RBX + 0x38]
TEST RDI,RDI
JNZ 0x001a6404
LAB_001a6341:
MOV RDI,R14
CALL 0x001295c0
CMP RBX,R12
JZ 0x001a63e3
MOV RAX,qword ptr [RBX + 0x88]
MOV qword ptr [R12 + 0x88],RAX
JMP 0x001a63ea
LAB_001a6366:
MOV R14,R15
XOR R13D,R13D
LAB_001a636c:
MOV R15,RBX
MOV RBX,qword ptr [RBX + 0x88]
CMP dword ptr [R15 + 0xe4],0x1
JNZ 0x001a639c
TEST R13,R13
JZ 0x001a63bb
MOV RAX,qword ptr [R13 + 0x88]
MOV qword ptr [R15 + 0x88],RAX
MOV qword ptr [R13 + 0x88],R15
JMP 0x001a63c2
LAB_001a639c:
MOV RDI,qword ptr [R15 + 0x38]
TEST RDI,RDI
JNZ 0x001a63cc
LAB_001a63a5:
LEA RDI,[R15 + 0x8]
CALL 0x001295c0
MOV qword ptr [R15 + 0x88],0x0
JMP 0x001a63c5
LAB_001a63bb:
MOV qword ptr [R15 + 0x88],R15
LAB_001a63c2:
MOV R13,R15
LAB_001a63c5:
CMP R15,R12
JNZ 0x001a636c
JMP 0x001a63de
LAB_001a63cc:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x170]
JMP 0x001a63a5
LAB_001a63de:
MOV qword ptr [R14],R13
JMP 0x001a63f5
LAB_001a63e3:
MOV qword ptr [R15],0x0
LAB_001a63ea:
MOV qword ptr [RBX + 0x88],0x0
LAB_001a63f5:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001a6404:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x170]
JMP 0x001a6341
|
void wqueue_release_one_locktype_from_queue(long *param_1)
{
long lVar1;
long lVar2;
long lVar3;
long lVar4;
bool bVar5;
lVar1 = *param_1;
lVar3 = *(long *)(lVar1 + 0x88);
if (*(int *)(lVar3 + 0xe4) == 1) {
if (*(long *)(lVar3 + 0x38) != 0) {
(**(code **)(PSI_server + 0x170))();
}
pthread_cond_signal((pthread_cond_t *)(lVar3 + 8));
if (lVar3 == lVar1) {
*param_1 = 0;
}
else {
*(int8 *)(lVar1 + 0x88) = *(int8 *)(lVar3 + 0x88);
}
*(int8 *)(lVar3 + 0x88) = 0;
}
else {
lVar4 = 0;
do {
lVar2 = *(long *)(lVar3 + 0x88);
if (*(int *)(lVar3 + 0xe4) == 1) {
if (lVar4 == 0) {
*(long *)(lVar3 + 0x88) = lVar3;
lVar4 = lVar3;
}
else {
*(int8 *)(lVar3 + 0x88) = *(int8 *)(lVar4 + 0x88);
*(long *)(lVar4 + 0x88) = lVar3;
lVar4 = lVar3;
}
}
else {
if (*(long *)(lVar3 + 0x38) != 0) {
(**(code **)(PSI_server + 0x170))();
}
pthread_cond_signal((pthread_cond_t *)(lVar3 + 8));
*(int8 *)(lVar3 + 0x88) = 0;
}
bVar5 = lVar3 != lVar1;
lVar3 = lVar2;
} while (bVar5);
*param_1 = lVar4;
}
return;
}
| |
26,560 | dirname_length | eloqsql/mysys/mf_dirname.c | size_t dirname_length(const char *name)
{
register char *pos, *gpos;
#ifdef BASKSLASH_MBTAIL
CHARSET_INFO *fs= fs_character_set();
#endif
#ifdef FN_DEVCHAR
if ((pos=(char*)strrchr(name,FN_DEVCHAR)) == 0)
#endif
pos=(char*) name-1;
gpos= pos++;
for ( ; *pos ; pos++) /* Find last FN_LIBCHAR */
{
#ifdef BASKSLASH_MBTAIL
uint l;
if (my_ci_use_mb(fs) && (l= my_ismbchar(fs, pos, pos + 3)))
{
pos+= l - 1;
continue;
}
#endif
if (*pos == FN_LIBCHAR || *pos == '/')
gpos=pos;
}
return (size_t) (gpos+1-(char*) name);
} | O0 | c | dirname_length:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x581b0
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
je 0x58198
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x581a0
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x581a2
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x58177
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| dirname_length:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov [rbp+var_18], rax
loc_58177:
mov rax, [rbp+var_10]
cmp byte ptr [rax], 0
jz short loc_581B0
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jz short loc_58198
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz short loc_581A0
loc_58198:
mov rax, [rbp+var_10]
mov [rbp+var_18], rax
loc_581A0:
jmp short $+2
loc_581A2:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_58177
loc_581B0:
mov rax, [rbp+var_18]
add rax, 1
mov rcx, [rbp+var_8]
sub rax, rcx
pop rbp
retn
| long long dirname_length(_BYTE *a1)
{
_BYTE *v2; // [rsp+0h] [rbp-18h]
_BYTE *v3; // [rsp+8h] [rbp-10h]
v3 = a1;
v2 = a1 - 1;
while ( *v3 )
{
if ( *v3 == 47 )
v2 = v3;
++v3;
}
return v2 + 1 - a1;
}
| dirname_length:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV qword ptr [RBP + -0x18],RAX
LAB_00158177:
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX],0x0
JZ 0x001581b0
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JZ 0x00158198
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x001581a0
LAB_00158198:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x18],RAX
LAB_001581a0:
JMP 0x001581a2
LAB_001581a2:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00158177
LAB_001581b0:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV RCX,qword ptr [RBP + -0x8]
SUB RAX,RCX
POP RBP
RET
|
char * dirname_length(char *param_1)
{
char *local_20;
char *local_18;
local_20 = param_1 + -1;
for (local_18 = param_1; *local_18 != '\0'; local_18 = local_18 + 1) {
if ((*local_18 == '/') || (*local_18 == '/')) {
local_20 = local_18;
}
}
return local_20 + (1 - (long)param_1);
}
| |
26,561 | LefDefParser::lefiVia::setForeign(char const*, int, double, double, int) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiVia.cpp | void
lefiVia::setForeign(const char *name,
int hasPnt,
double x,
double y,
int orient)
{
// orient=-1 means no orient was specified.
int len = strlen(name) + 1;
hasForeignPnt_ = hasPnt;
foreignOrient_ = orient;
foreignX_ = x;
foreignY_ = y;
foreign_ = (char*) lefMalloc(len);
strcpy(foreign_, CASE(name));
} | O0 | cpp | LefDefParser::lefiVia::setForeign(char const*, int, double, double, int):
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movl %edx, 0x34(%rsp)
movsd %xmm0, 0x28(%rsp)
movsd %xmm1, 0x20(%rsp)
movl %ecx, 0x1c(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rdi
callq 0x20d0
movq %rax, %rcx
movq 0x8(%rsp), %rax
addq $0x1, %rcx
movl %ecx, 0x18(%rsp)
movl 0x34(%rsp), %ecx
movl %ecx, 0x18(%rax)
movl 0x1c(%rsp), %ecx
movl %ecx, 0x78(%rax)
movsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x68(%rax)
movsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x70(%rax)
movslq 0x18(%rsp), %rdi
callq 0x359d0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x60(%rax)
movq 0x60(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rdi
callq 0x3f780
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x2250
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZN12LefDefParser7lefiVia10setForeignEPKciddi:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_10], rsi
mov [rsp+48h+var_14], edx
movsd [rsp+48h+var_20], xmm0
movsd [rsp+48h+var_28], xmm1
mov [rsp+48h+var_2C], ecx
mov rax, [rsp+48h+var_8]
mov [rsp+48h+var_40], rax
mov rdi, [rsp+48h+var_10]
call _strlen
mov rcx, rax
mov rax, [rsp+48h+var_40]
add rcx, 1
mov [rsp+48h+var_30], ecx
mov ecx, [rsp+48h+var_14]
mov [rax+18h], ecx
mov ecx, [rsp+48h+var_2C]
mov [rax+78h], ecx
movsd xmm0, [rsp+48h+var_20]
movsd qword ptr [rax+68h], xmm0
movsd xmm0, [rsp+48h+var_28]
movsd qword ptr [rax+70h], xmm0
movsxd rdi, [rsp+48h+var_30]; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov rcx, rax
mov rax, [rsp+48h+var_40]
mov [rax+60h], rcx
mov rax, [rax+60h]
mov [rsp+48h+var_38], rax
mov rdi, [rsp+48h+var_10]; this
call _ZN12LefDefParser4CASEEPKc; LefDefParser::CASE(char const*)
mov rdi, [rsp+48h+var_38]
mov rsi, rax
call _strcpy
add rsp, 48h
retn
| long long LefDefParser::lefiVia::setForeign(
LefDefParser::lefiVia *this,
LefDefParser *a2,
int a3,
double a4,
double a5,
int a6)
{
long long v6; // rax
long long v8; // [rsp+10h] [rbp-38h]
int v9; // [rsp+18h] [rbp-30h]
v9 = strlen(a2) + 1;
*((_DWORD *)this + 6) = a3;
*((_DWORD *)this + 30) = a6;
*((double *)this + 13) = a4;
*((double *)this + 14) = a5;
*((_QWORD *)this + 12) = LefDefParser::lefMalloc((LefDefParser *)v9, (unsigned long long)a2);
v8 = *((_QWORD *)this + 12);
v6 = LefDefParser::CASE(a2, (const char *)a2);
return strcpy(v8, v6);
}
| setForeign:
SUB RSP,0x48
MOV qword ptr [RSP + 0x40],RDI
MOV qword ptr [RSP + 0x38],RSI
MOV dword ptr [RSP + 0x34],EDX
MOVSD qword ptr [RSP + 0x28],XMM0
MOVSD qword ptr [RSP + 0x20],XMM1
MOV dword ptr [RSP + 0x1c],ECX
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x001020d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
ADD RCX,0x1
MOV dword ptr [RSP + 0x18],ECX
MOV ECX,dword ptr [RSP + 0x34]
MOV dword ptr [RAX + 0x18],ECX
MOV ECX,dword ptr [RSP + 0x1c]
MOV dword ptr [RAX + 0x78],ECX
MOVSD XMM0,qword ptr [RSP + 0x28]
MOVSD qword ptr [RAX + 0x68],XMM0
MOVSD XMM0,qword ptr [RSP + 0x20]
MOVSD qword ptr [RAX + 0x70],XMM0
MOVSXD RDI,dword ptr [RSP + 0x18]
CALL 0x001359d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX + 0x60],RCX
MOV RAX,qword ptr [RAX + 0x60]
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x0013f780
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,RAX
CALL 0x00102250
ADD RSP,0x48
RET
|
/* LefDefParser::lefiVia::setForeign(char const*, int, double, double, int) */
void __thiscall
LefDefParser::lefiVia::setForeign
(lefiVia *this,char *param_1,int param_2,double param_3,double param_4,int param_5)
{
char *__dest;
size_t sVar1;
int8 uVar2;
char *__src;
sVar1 = strlen(param_1);
*(int *)(this + 0x18) = param_2;
*(int *)(this + 0x78) = param_5;
*(double *)(this + 0x68) = param_3;
*(double *)(this + 0x70) = param_4;
uVar2 = lefMalloc((long)((int)sVar1 + 1));
*(int8 *)(this + 0x60) = uVar2;
__dest = *(char **)(this + 0x60);
__src = (char *)CASE(param_1);
strcpy(__dest,__src);
return;
}
| |
26,562 | LefDefParser::lefiVia::setForeign(char const*, int, double, double, int) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiVia.cpp | void
lefiVia::setForeign(const char *name,
int hasPnt,
double x,
double y,
int orient)
{
// orient=-1 means no orient was specified.
int len = strlen(name) + 1;
hasForeignPnt_ = hasPnt;
foreignOrient_ = orient;
foreignX_ = x;
foreignY_ = y;
foreign_ = (char*) lefMalloc(len);
strcpy(foreign_, CASE(name));
} | O3 | cpp | LefDefParser::lefiVia::setForeign(char const*, int, double, double, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebx
movsd %xmm1, 0x10(%rsp)
movsd %xmm0, 0x8(%rsp)
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
callq 0x20d0
movl %ebp, 0x18(%r15)
movl %ebx, 0x78(%r15)
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x68(%r15)
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x70(%r15)
incl %eax
movslq %eax, %rdi
callq 0x24985
movq %rax, %rbx
movq %rax, 0x60(%r15)
movq %r14, %rdi
callq 0x27c0a
movq %rbx, %rdi
movq %rax, %rsi
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x21b0
| _ZN12LefDefParser7lefiVia10setForeignEPKciddi:
push rbp
push r15
push r14
push rbx
sub rsp, 18h
mov ebx, ecx
movsd [rsp+38h+var_28], xmm1
movsd [rsp+38h+var_30], xmm0
mov ebp, edx
mov r14, rsi
mov r15, rdi
mov rdi, rsi
call _strlen
mov [r15+18h], ebp
mov [r15+78h], ebx
movsd xmm0, [rsp+38h+var_30]
movsd qword ptr [r15+68h], xmm0
movsd xmm0, [rsp+38h+var_28]
movsd qword ptr [r15+70h], xmm0
inc eax
movsxd rdi, eax; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov rbx, rax
mov [r15+60h], rax
mov rdi, r14; this
call _ZN12LefDefParser4CASEEPKc; LefDefParser::CASE(char const*)
mov rdi, rbx
mov rsi, rax
add rsp, 18h
pop rbx
pop r14
pop r15
pop rbp
jmp _strcpy
| long long LefDefParser::lefiVia::setForeign(
LefDefParser::lefiVia *this,
LefDefParser *a2,
int a3,
double a4,
double a5,
int a6)
{
int v8; // eax
long long v9; // rbx
long long v10; // rax
v8 = strlen(a2);
*((_DWORD *)this + 6) = a3;
*((_DWORD *)this + 30) = a6;
*((double *)this + 13) = a4;
*((double *)this + 14) = a5;
v9 = LefDefParser::lefMalloc((LefDefParser *)(v8 + 1), (unsigned long long)a2);
*((_QWORD *)this + 12) = v9;
v10 = LefDefParser::CASE(a2, (const char *)a2);
return strcpy(v9, v10);
}
| setForeign:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV EBX,ECX
MOVSD qword ptr [RSP + 0x10],XMM1
MOVSD qword ptr [RSP + 0x8],XMM0
MOV EBP,EDX
MOV R14,RSI
MOV R15,RDI
MOV RDI,RSI
CALL 0x001020d0
MOV dword ptr [R15 + 0x18],EBP
MOV dword ptr [R15 + 0x78],EBX
MOVSD XMM0,qword ptr [RSP + 0x8]
MOVSD qword ptr [R15 + 0x68],XMM0
MOVSD XMM0,qword ptr [RSP + 0x10]
MOVSD qword ptr [R15 + 0x70],XMM0
INC EAX
MOVSXD RDI,EAX
CALL 0x00124985
MOV RBX,RAX
MOV qword ptr [R15 + 0x60],RAX
MOV RDI,R14
CALL 0x00127c0a
MOV RDI,RBX
MOV RSI,RAX
ADD RSP,0x18
POP RBX
POP R14
POP R15
POP RBP
JMP 0x001021b0
|
/* LefDefParser::lefiVia::setForeign(char const*, int, double, double, int) */
void __thiscall
LefDefParser::lefiVia::setForeign
(lefiVia *this,char *param_1,int param_2,double param_3,double param_4,int param_5)
{
size_t sVar1;
char *pcVar2;
char *__src;
pcVar2 = param_1;
sVar1 = strlen(param_1);
*(int *)(this + 0x18) = param_2;
*(int *)(this + 0x78) = param_5;
*(double *)(this + 0x68) = param_3;
*(double *)(this + 0x70) = param_4;
pcVar2 = (char *)lefMalloc((LefDefParser *)(long)((int)sVar1 + 1),(ulong)pcVar2);
*(char **)(this + 0x60) = pcVar2;
__src = (char *)CASE(param_1);
strcpy(pcVar2,__src);
return;
}
| |
26,563 | glfwPlatformSetWindowPos | untodesu[P]riteg/build_O3/_deps/glfw-src/src/x11_window.c | void _glfwPlatformSetWindowPos(_GLFWwindow* window, int xpos, int ypos)
{
// HACK: Explicitly setting PPosition to any value causes some WMs, notably
// Compiz and Metacity, to honor the position of unmapped windows
if (!_glfwPlatformWindowVisible(window))
{
long supplied;
XSizeHints* hints = XAllocSizeHints();
if (XGetWMNormalHints(_glfw.x11.display, window->x11.handle, hints, &supplied))
{
hints->flags |= PPosition;
hints->x = hints->y = 0;
XSetWMNormalHints(_glfw.x11.display, window->x11.handle, hints);
}
XFree(hints);
}
XMoveWindow(_glfw.x11.display, window->x11.handle, xpos, ypos);
XFlush(_glfw.x11.display);
} | O3 | c | glfwPlatformSetWindowPos:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x90, %rsp
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
leaq 0x8598b(%rip), %r12 # 0xa8638
movq 0x1fec0(%r12), %rdi
movq 0x348(%r14), %rsi
leaq 0x8(%rsp), %r15
movq %r15, %rdx
callq 0xcf20
cmpl $0x2, 0x5c(%r15)
je 0x22d23
callq 0xc130
movq %rax, %r15
movq 0x1fec0(%r12), %rdi
movq 0x348(%r14), %rsi
leaq 0x8(%rsp), %rcx
movq %rax, %rdx
callq 0xc6a0
testl %eax, %eax
je 0x22d1b
orb $0x4, (%r15)
movq $0x0, 0x8(%r15)
movq 0x1fec0(%r12), %rdi
movq 0x348(%r14), %rsi
movq %r15, %rdx
callq 0xc3e0
movq %r15, %rdi
callq 0xcac0
movq 0x1fec0(%r12), %rdi
movq 0x348(%r14), %rsi
movl %ebp, %edx
movl %ebx, %ecx
callq 0xc6e0
movq 0x1fec0(%r12), %rdi
callq 0xcce0
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| _glfwPlatformSetWindowPos:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 90h
mov ebx, edx
mov ebp, esi
mov r14, rdi
lea r12, _glfw
mov rdi, [r12+1FEC0h]
mov rsi, [r14+348h]
lea r15, [rsp+0B8h+var_B0]
mov rdx, r15
call _XGetWindowAttributes
cmp dword ptr [r15+5Ch], 2
jz short loc_22D23
call _XAllocSizeHints
mov r15, rax
mov rdi, [r12+1FEC0h]
mov rsi, [r14+348h]
lea rcx, [rsp+0B8h+var_B0]
mov rdx, rax
call _XGetWMNormalHints
test eax, eax
jz short loc_22D1B
or byte ptr [r15], 4
mov qword ptr [r15+8], 0
mov rdi, [r12+1FEC0h]
mov rsi, [r14+348h]
mov rdx, r15
call _XSetWMNormalHints
loc_22D1B:
mov rdi, r15
call _XFree
loc_22D23:
mov rdi, [r12+1FEC0h]
mov rsi, [r14+348h]
mov edx, ebp
mov ecx, ebx
call _XMoveWindow
mov rdi, [r12+1FEC0h]
call _XFlush
add rsp, 90h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long glfwPlatformSetWindowPos(long long a1, unsigned int a2, unsigned int a3)
{
long long v4; // r15
_BYTE v6[92]; // [rsp+8h] [rbp-B0h] BYREF
int v7; // [rsp+64h] [rbp-54h]
XGetWindowAttributes(*(_QWORD *)&glfw[32688], *(_QWORD *)(a1 + 840), v6);
if ( v7 != 2 )
{
v4 = XAllocSizeHints();
if ( (unsigned int)XGetWMNormalHints(*(_QWORD *)&glfw[32688], *(_QWORD *)(a1 + 840), v4, v6) )
{
*(_BYTE *)v4 |= 4u;
*(_QWORD *)(v4 + 8) = 0LL;
XSetWMNormalHints(*(_QWORD *)&glfw[32688], *(_QWORD *)(a1 + 840), v4);
}
XFree(v4);
}
XMoveWindow(*(_QWORD *)&glfw[32688], *(_QWORD *)(a1 + 840), a2, a3);
return XFlush(*(_QWORD *)&glfw[32688]);
}
| _glfwPlatformSetWindowPos:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x90
MOV EBX,EDX
MOV EBP,ESI
MOV R14,RDI
LEA R12,[0x1a8638]
MOV RDI,qword ptr [R12 + 0x1fec0]
MOV RSI,qword ptr [R14 + 0x348]
LEA R15,[RSP + 0x8]
MOV RDX,R15
CALL 0x0010cf20
CMP dword ptr [R15 + 0x5c],0x2
JZ 0x00122d23
CALL 0x0010c130
MOV R15,RAX
MOV RDI,qword ptr [R12 + 0x1fec0]
MOV RSI,qword ptr [R14 + 0x348]
LEA RCX,[RSP + 0x8]
MOV RDX,RAX
CALL 0x0010c6a0
TEST EAX,EAX
JZ 0x00122d1b
OR byte ptr [R15],0x4
MOV qword ptr [R15 + 0x8],0x0
MOV RDI,qword ptr [R12 + 0x1fec0]
MOV RSI,qword ptr [R14 + 0x348]
MOV RDX,R15
CALL 0x0010c3e0
LAB_00122d1b:
MOV RDI,R15
CALL 0x0010cac0
LAB_00122d23:
MOV RDI,qword ptr [R12 + 0x1fec0]
MOV RSI,qword ptr [R14 + 0x348]
MOV EDX,EBP
MOV ECX,EBX
CALL 0x0010c6e0
MOV RDI,qword ptr [R12 + 0x1fec0]
CALL 0x0010cce0
ADD RSP,0x90
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
void _glfwPlatformSetWindowPos(long param_1,int4 param_2,int4 param_3)
{
int iVar1;
byte *pbVar2;
int1 local_b0 [92];
int local_54;
XGetWindowAttributes(DAT_001c84f8,*(int8 *)(param_1 + 0x348),local_b0);
if (local_54 != 2) {
pbVar2 = (byte *)XAllocSizeHints();
iVar1 = XGetWMNormalHints(DAT_001c84f8,*(int8 *)(param_1 + 0x348),pbVar2,local_b0);
if (iVar1 != 0) {
*pbVar2 = *pbVar2 | 4;
pbVar2[8] = 0;
pbVar2[9] = 0;
pbVar2[10] = 0;
pbVar2[0xb] = 0;
pbVar2[0xc] = 0;
pbVar2[0xd] = 0;
pbVar2[0xe] = 0;
pbVar2[0xf] = 0;
XSetWMNormalHints(DAT_001c84f8,*(int8 *)(param_1 + 0x348),pbVar2);
}
XFree(pbVar2);
}
XMoveWindow(DAT_001c84f8,*(int8 *)(param_1 + 0x348),param_2,param_3);
XFlush(DAT_001c84f8);
return;
}
| |
26,564 | my_caseup_8bit | eloqsql/strings/ctype-simple.c | size_t my_caseup_8bit(CHARSET_INFO * cs, const char *src, size_t srclen,
char *dst, size_t dstlen __attribute__((unused)))
{
const char *end= src + srclen;
register const uchar *map= cs->to_upper;
DBUG_ASSERT(srclen <= dstlen);
for ( ; src != end ; src++)
*dst++= (char) map[(uchar) *src];
return srclen;
} | O0 | c | my_caseup_8bit:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x49db2
jmp 0x49db4
movq -0x10(%rbp), %rax
cmpq -0x30(%rbp), %rax
je 0x49deb
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
movb (%rax,%rcx), %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x49db4
movq -0x18(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_caseup_8bit:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_30], rax
mov rax, [rbp+var_8]
mov rax, [rax+50h]
mov [rbp+var_38], rax
jmp short $+2
loc_49DB2:
jmp short $+2
loc_49DB4:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_30]
jz short loc_49DEB
mov rax, [rbp+var_38]
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx]
mov cl, [rax+rcx]
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_49DB4
loc_49DEB:
mov rax, [rbp+var_18]
pop rbp
retn
| long long my_caseup_8bit(long long a1, unsigned __int8 *a2, long long a3, _BYTE *a4)
{
_BYTE *v4; // rax
long long v6; // [rsp+0h] [rbp-38h]
unsigned __int8 *v8; // [rsp+28h] [rbp-10h]
v8 = a2;
v6 = *(_QWORD *)(a1 + 80);
while ( v8 != &a2[a3] )
{
v4 = a4++;
*v4 = *(_BYTE *)(v6 + *v8++);
}
return a3;
}
| my_caseup_8bit:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x50]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x00149db2
LAB_00149db2:
JMP 0x00149db4
LAB_00149db4:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x30]
JZ 0x00149deb
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RCX]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00149db4
LAB_00149deb:
MOV RAX,qword ptr [RBP + -0x18]
POP RBP
RET
|
long my_caseup_8bit(long param_1,byte *param_2,long param_3,int1 *param_4)
{
long lVar1;
int1 *local_28;
byte *local_18;
lVar1 = *(long *)(param_1 + 0x50);
local_28 = param_4;
for (local_18 = param_2; local_18 != param_2 + param_3; local_18 = local_18 + 1) {
*local_28 = *(int1 *)(lVar1 + (ulong)*local_18);
local_28 = local_28 + 1;
}
return param_3;
}
| |
26,565 | my_rw_unlock | eloqsql/mysys/thr_rwlock.c | int my_rw_unlock(my_rw_lock_t *rwp)
{
DBUG_PRINT("rw_unlock",
("state: %d waiters: %d", rwp->state, rwp->waiters));
pthread_mutex_lock(&rwp->lock);
DBUG_ASSERT(rwp->state != 0);
if (rwp->state == -1) /* writer releasing */
{
my_rw_lock_assert_write_owner(rwp);
rwp->state= 0; /* mark as available */
#ifdef SAFE_MUTEX
rwp->write_thread= 0;
#endif
if ( rwp->waiters ) /* writers queued */
pthread_cond_signal( &rwp->writers );
else
pthread_cond_broadcast( &rwp->readers );
}
else
{
if ( --rwp->state == 0 && /* no more readers */
rwp->waiters)
pthread_cond_signal( &rwp->writers );
}
pthread_mutex_unlock( &rwp->lock );
return(0);
} | O3 | c | my_rw_unlock:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x24450
movl 0x88(%rbx), %eax
cmpl $-0x1, %eax
je 0x26ce0
decl %eax
movl %eax, 0x88(%rbx)
jne 0x26d07
cmpl $0x0, 0x8c(%rbx)
jne 0x26cf3
jmp 0x26d07
movl $0x0, 0x88(%rbx)
cmpl $0x0, 0x8c(%rbx)
je 0x26cfe
leaq 0x58(%rbx), %rdi
callq 0x24040
jmp 0x26d07
leaq 0x28(%rbx), %rdi
callq 0x24100
movq %rbx, %rdi
callq 0x24210
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| my_rw_unlock:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
call _pthread_mutex_lock
mov eax, [rbx+88h]
cmp eax, 0FFFFFFFFh
jz short loc_26CE0
dec eax
mov [rbx+88h], eax
jnz short loc_26D07
cmp dword ptr [rbx+8Ch], 0
jnz short loc_26CF3
jmp short loc_26D07
loc_26CE0:
mov dword ptr [rbx+88h], 0
cmp dword ptr [rbx+8Ch], 0
jz short loc_26CFE
loc_26CF3:
lea rdi, [rbx+58h]
call _pthread_cond_signal
jmp short loc_26D07
loc_26CFE:
lea rdi, [rbx+28h]
call _pthread_cond_broadcast
loc_26D07:
mov rdi, rbx
call _pthread_mutex_unlock
xor eax, eax
add rsp, 8
pop rbx
pop rbp
retn
| long long my_rw_unlock(long long a1)
{
int v1; // eax
int v2; // eax
pthread_mutex_lock(a1);
v1 = *(_DWORD *)(a1 + 136);
if ( v1 == -1 )
{
*(_DWORD *)(a1 + 136) = 0;
if ( !*(_DWORD *)(a1 + 140) )
{
pthread_cond_broadcast(a1 + 40);
goto LABEL_8;
}
goto LABEL_6;
}
v2 = v1 - 1;
*(_DWORD *)(a1 + 136) = v2;
if ( !v2 && *(_DWORD *)(a1 + 140) )
LABEL_6:
pthread_cond_signal(a1 + 88);
LABEL_8:
pthread_mutex_unlock(a1);
return 0LL;
}
| my_rw_unlock:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
CALL 0x00124450
MOV EAX,dword ptr [RBX + 0x88]
CMP EAX,-0x1
JZ 0x00126ce0
DEC EAX
MOV dword ptr [RBX + 0x88],EAX
JNZ 0x00126d07
CMP dword ptr [RBX + 0x8c],0x0
JNZ 0x00126cf3
JMP 0x00126d07
LAB_00126ce0:
MOV dword ptr [RBX + 0x88],0x0
CMP dword ptr [RBX + 0x8c],0x0
JZ 0x00126cfe
LAB_00126cf3:
LEA RDI,[RBX + 0x58]
CALL 0x00124040
JMP 0x00126d07
LAB_00126cfe:
LEA RDI,[RBX + 0x28]
CALL 0x00124100
LAB_00126d07:
MOV RDI,RBX
CALL 0x00124210
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int8 my_rw_unlock(pthread_mutex_t *param_1)
{
int iVar1;
pthread_mutex_lock(param_1);
if (*(int *)((long)param_1 + 0x88) == -1) {
*(int4 *)((long)param_1 + 0x88) = 0;
if (*(int *)((long)param_1 + 0x8c) == 0) {
pthread_cond_broadcast((pthread_cond_t *)(param_1 + 1));
goto LAB_00126d07;
}
}
else {
iVar1 = *(int *)((long)param_1 + 0x88) + -1;
*(int *)((long)param_1 + 0x88) = iVar1;
if ((iVar1 != 0) || (*(int *)((long)param_1 + 0x8c) == 0)) goto LAB_00126d07;
}
pthread_cond_signal((pthread_cond_t *)((long)param_1 + 0x58));
LAB_00126d07:
pthread_mutex_unlock(param_1);
return 0;
}
| |
26,566 | google::protobuf::FileDescriptorProto::ByteSizeLong() const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc | size_t FileDescriptorProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.FileDescriptorProto)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated string dependency = 3;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.dependency_.size());
for (int i = 0, n = _impl_.dependency_.size(); i < n; i++) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
_impl_.dependency_.Get(i));
}
// repeated .google.protobuf.DescriptorProto message_type = 4;
total_size += 1UL * this->_internal_message_type_size();
for (const auto& msg : this->_impl_.message_type_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
total_size += 1UL * this->_internal_enum_type_size();
for (const auto& msg : this->_impl_.enum_type_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated .google.protobuf.ServiceDescriptorProto service = 6;
total_size += 1UL * this->_internal_service_size();
for (const auto& msg : this->_impl_.service_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated .google.protobuf.FieldDescriptorProto extension = 7;
total_size += 1UL * this->_internal_extension_size();
for (const auto& msg : this->_impl_.extension_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated int32 public_dependency = 10;
{
size_t data_size = ::_pbi::WireFormatLite::
Int32Size(this->_impl_.public_dependency_);
total_size += 1 *
::_pbi::FromIntSize(this->_internal_public_dependency_size());
total_size += data_size;
}
// repeated int32 weak_dependency = 11;
{
size_t data_size = ::_pbi::WireFormatLite::
Int32Size(this->_impl_.weak_dependency_);
total_size += 1 *
::_pbi::FromIntSize(this->_internal_weak_dependency_size());
total_size += data_size;
}
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x0000001fu) {
// optional string name = 1;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_name());
}
// optional string package = 2;
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_package());
}
// optional string syntax = 12;
if (cached_has_bits & 0x00000004u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_syntax());
}
// optional .google.protobuf.FileOptions options = 8;
if (cached_has_bits & 0x00000008u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.options_);
}
// optional .google.protobuf.SourceCodeInfo source_code_info = 9;
if (cached_has_bits & 0x00000010u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.source_code_info_);
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
} | O0 | cpp | google::protobuf::FileDescriptorProto::ByteSizeLong() const:
subq $0xc8, %rsp
movq %rdi, 0xb0(%rsp)
movq 0xb0(%rsp), %rdi
movq %rdi, (%rsp)
movq $0x0, 0xa8(%rsp)
movl $0x0, 0xa4(%rsp)
addq $0x10, %rdi
addq $0x8, %rdi
callq 0x192b00
movl %eax, %edi
callq 0x15d3c0
movq (%rsp), %rdi
shlq $0x0, %rax
addq 0xa8(%rsp), %rax
movq %rax, 0xa8(%rsp)
movl $0x0, 0xa0(%rsp)
addq $0x10, %rdi
addq $0x8, %rdi
callq 0x192b00
movl %eax, 0x9c(%rsp)
movl 0xa0(%rsp), %eax
cmpl 0x9c(%rsp), %eax
jge 0x2b4e70
movq (%rsp), %rdi
addq $0x10, %rdi
addq $0x8, %rdi
movl 0xa0(%rsp), %esi
callq 0x192b10
movq %rax, %rdi
callq 0x1587c0
addq 0xa8(%rsp), %rax
movq %rax, 0xa8(%rsp)
movl 0xa0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xa0(%rsp)
jmp 0x2b4e1d
movq (%rsp), %rdi
callq 0x28ced0
movl %eax, %ecx
movq (%rsp), %rax
movslq %ecx, %rcx
shlq $0x0, %rcx
addq 0xa8(%rsp), %rcx
movq %rcx, 0xa8(%rsp)
addq $0x10, %rax
addq $0x20, %rax
movq %rax, 0x90(%rsp)
movq 0x90(%rsp), %rdi
callq 0x290290
movq %rax, 0x88(%rsp)
movq 0x90(%rsp), %rdi
callq 0x2902d0
movq %rax, 0x80(%rsp)
leaq 0x88(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x290330
testb $0x1, %al
jne 0x2b4eeb
jmp 0x2b4f26
leaq 0x88(%rsp), %rdi
callq 0x290350
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rdi
callq 0x2de630
addq 0xa8(%rsp), %rax
movq %rax, 0xa8(%rsp)
leaq 0x88(%rsp), %rdi
callq 0x290430
jmp 0x2b4ed0
movq (%rsp), %rdi
callq 0x292310
movl %eax, %ecx
movq (%rsp), %rax
movslq %ecx, %rcx
shlq $0x0, %rcx
addq 0xa8(%rsp), %rcx
movq %rcx, 0xa8(%rsp)
addq $0x10, %rax
addq $0x38, %rax
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rdi
callq 0x290740
movq %rax, 0x68(%rsp)
movq 0x70(%rsp), %rdi
callq 0x290780
movq %rax, 0x60(%rsp)
leaq 0x68(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x2907e0
testb $0x1, %al
jne 0x2b4f8c
jmp 0x2b4fc1
leaq 0x68(%rsp), %rdi
callq 0x290800
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rdi
callq 0x2de650
addq 0xa8(%rsp), %rax
movq %rax, 0xa8(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x290840
jmp 0x2b4f77
movq (%rsp), %rdi
callq 0x292540
movl %eax, %ecx
movq (%rsp), %rax
movslq %ecx, %rcx
shlq $0x0, %rcx
addq 0xa8(%rsp), %rcx
movq %rcx, 0xa8(%rsp)
addq $0x10, %rax
addq $0x50, %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rdi
callq 0x28ffe0
movq %rax, 0x48(%rsp)
movq 0x50(%rsp), %rdi
callq 0x290020
movq %rax, 0x40(%rsp)
leaq 0x48(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x290080
testb $0x1, %al
jne 0x2b5027
jmp 0x2b505c
leaq 0x48(%rsp), %rdi
callq 0x2900a0
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rdi
callq 0x2de670
addq 0xa8(%rsp), %rax
movq %rax, 0xa8(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x2900e0
jmp 0x2b5012
movq (%rsp), %rdi
callq 0x28cf00
movl %eax, %ecx
movq (%rsp), %rax
movslq %ecx, %rcx
shlq $0x0, %rcx
addq 0xa8(%rsp), %rcx
movq %rcx, 0xa8(%rsp)
addq $0x10, %rax
addq $0x68, %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdi
callq 0x2909f0
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rdi
callq 0x290a30
movq %rax, 0x20(%rsp)
leaq 0x28(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x290a90
testb $0x1, %al
jne 0x2b50c2
jmp 0x2b50f7
leaq 0x28(%rsp), %rdi
callq 0x290ab0
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0x2de690
addq 0xa8(%rsp), %rax
movq %rax, 0xa8(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x290ad0
jmp 0x2b50ad
movq (%rsp), %rdi
addq $0x10, %rdi
addq $0x80, %rdi
callq 0x1ab390
movq (%rsp), %rdi
movq %rax, 0x10(%rsp)
callq 0x2920b0
movl %eax, %edi
callq 0x15d3c0
movq (%rsp), %rdi
shlq $0x0, %rax
addq 0xa8(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0x10(%rsp), %rax
addq 0xa8(%rsp), %rax
movq %rax, 0xa8(%rsp)
addq $0x10, %rdi
addq $0x90, %rdi
callq 0x1ab390
movq (%rsp), %rdi
movq %rax, 0x8(%rsp)
callq 0x292060
movl %eax, %edi
callq 0x15d3c0
movq %rax, %rcx
movq (%rsp), %rax
shlq $0x0, %rcx
addq 0xa8(%rsp), %rcx
movq %rcx, 0xa8(%rsp)
movq 0x8(%rsp), %rcx
addq 0xa8(%rsp), %rcx
movq %rcx, 0xa8(%rsp)
addq $0x10, %rax
movq %rax, 0xc0(%rsp)
movl $0x0, 0xbc(%rsp)
movq 0xc0(%rsp), %rax
movslq 0xbc(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0xa4(%rsp)
movl 0xa4(%rsp), %eax
andl $0x1f, %eax
cmpl $0x0, %eax
je 0x2b52ea
movl 0xa4(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x2b521a
movq (%rsp), %rdi
callq 0x28c960
movq %rax, %rdi
callq 0x1587c0
addq $0x1, %rax
addq 0xa8(%rsp), %rax
movq %rax, 0xa8(%rsp)
movl 0xa4(%rsp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x2b524e
movq (%rsp), %rdi
callq 0x28ff00
movq %rax, %rdi
callq 0x1587c0
addq $0x1, %rax
addq 0xa8(%rsp), %rax
movq %rax, 0xa8(%rsp)
movl 0xa4(%rsp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x2b5282
movq (%rsp), %rdi
callq 0x291f80
movq %rax, %rdi
callq 0x1587c0
addq $0x1, %rax
addq 0xa8(%rsp), %rax
movq %rax, 0xa8(%rsp)
movl 0xa4(%rsp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x2b52b5
movq (%rsp), %rax
movq 0xc8(%rax), %rdi
callq 0x2de6b0
addq $0x1, %rax
addq 0xa8(%rsp), %rax
movq %rax, 0xa8(%rsp)
movl 0xa4(%rsp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x2b52e8
movq (%rsp), %rax
movq 0xd0(%rax), %rdi
callq 0x2de6d0
addq $0x1, %rax
addq 0xa8(%rsp), %rax
movq %rax, 0xa8(%rsp)
jmp 0x2b52ea
movq (%rsp), %rdi
movq 0xa8(%rsp), %rsi
movq %rdi, %rdx
addq $0x10, %rdx
addq $0x4, %rdx
callq 0x1dbd10
addq $0xc8, %rsp
retq
nop
| _ZNK6google8protobuf19FileDescriptorProto12ByteSizeLongEv:
sub rsp, 0C8h
mov [rsp+0C8h+var_18], rdi
mov rdi, [rsp+0C8h+var_18]
mov [rsp+0C8h+var_C8], rdi
mov [rsp+0C8h+var_20], 0
mov [rsp+0C8h+var_24], 0
add rdi, 10h
add rdi, 8
call _ZNK6google8protobuf16RepeatedPtrFieldINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE4sizeEv; google::protobuf::RepeatedPtrField<std::string>::size(void)
mov edi, eax; this
call _ZN6google8protobuf8internal11FromIntSizeEi; google::protobuf::internal::FromIntSize(int)
mov rdi, [rsp+0C8h+var_C8]
shl rax, 0
add rax, [rsp+0C8h+var_20]
mov [rsp+0C8h+var_20], rax
mov [rsp+0C8h+var_28], 0
add rdi, 10h
add rdi, 8
call _ZNK6google8protobuf16RepeatedPtrFieldINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE4sizeEv; google::protobuf::RepeatedPtrField<std::string>::size(void)
mov [rsp+0C8h+var_2C], eax
loc_2B4E1D:
mov eax, [rsp+0C8h+var_28]
cmp eax, [rsp+0C8h+var_2C]
jge short loc_2B4E70
mov rdi, [rsp+0C8h+var_C8]
add rdi, 10h
add rdi, 8
mov esi, [rsp+0C8h+var_28]
call _ZNK6google8protobuf16RepeatedPtrFieldINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3GetEi; google::protobuf::RepeatedPtrField<std::string>::Get(int)
mov rdi, rax
call _ZN6google8protobuf8internal14WireFormatLite10StringSizeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::internal::WireFormatLite::StringSize(std::string const&)
add rax, [rsp+0C8h+var_20]
mov [rsp+0C8h+var_20], rax
mov eax, [rsp+0C8h+var_28]
add eax, 1
mov [rsp+0C8h+var_28], eax
jmp short loc_2B4E1D
loc_2B4E70:
mov rdi, [rsp+0C8h+var_C8]; this
call _ZNK6google8protobuf19FileDescriptorProto27_internal_message_type_sizeEv; google::protobuf::FileDescriptorProto::_internal_message_type_size(void)
mov ecx, eax
mov rax, [rsp+0C8h+var_C8]
movsxd rcx, ecx
shl rcx, 0
add rcx, [rsp+0C8h+var_20]
mov [rsp+0C8h+var_20], rcx
add rax, 10h
add rax, 20h ; ' '
mov [rsp+0C8h+var_38], rax
mov rdi, [rsp+0C8h+var_38]
call _ZNK6google8protobuf16RepeatedPtrFieldINS0_15DescriptorProtoEE5beginEv; google::protobuf::RepeatedPtrField<google::protobuf::DescriptorProto>::begin(void)
mov [rsp+0C8h+var_40], rax
mov rdi, [rsp+0C8h+var_38]
call _ZNK6google8protobuf16RepeatedPtrFieldINS0_15DescriptorProtoEE3endEv; google::protobuf::RepeatedPtrField<google::protobuf::DescriptorProto>::end(void)
mov [rsp+0C8h+var_48], rax
loc_2B4ED0:
lea rdi, [rsp+0C8h+var_40]
lea rsi, [rsp+0C8h+var_48]
call _ZN6google8protobuf8internalneERKNS1_19RepeatedPtrIteratorIKNS0_15DescriptorProtoEEES7_; google::protobuf::internal::operator!=(google::protobuf::internal::RepeatedPtrIterator<google::protobuf::DescriptorProto const> const&,google::protobuf::internal::RepeatedPtrIterator<google::protobuf::DescriptorProto const> const&)
test al, 1
jnz short loc_2B4EEB
jmp short loc_2B4F26
loc_2B4EEB:
lea rdi, [rsp+0C8h+var_40]
call _ZNK6google8protobuf8internal19RepeatedPtrIteratorIKNS0_15DescriptorProtoEEdeEv; google::protobuf::internal::RepeatedPtrIterator<google::protobuf::DescriptorProto const>::operator*(void)
mov [rsp+0C8h+var_50], rax
mov rdi, [rsp+0C8h+var_50]
call _ZN6google8protobuf8internal14WireFormatLite11MessageSizeINS0_15DescriptorProtoEEEmRKT_; google::protobuf::internal::WireFormatLite::MessageSize<google::protobuf::DescriptorProto>(google::protobuf::DescriptorProto const&)
add rax, [rsp+0C8h+var_20]
mov [rsp+0C8h+var_20], rax
lea rdi, [rsp+0C8h+var_40]
call _ZN6google8protobuf8internal19RepeatedPtrIteratorIKNS0_15DescriptorProtoEEppEv; google::protobuf::internal::RepeatedPtrIterator<google::protobuf::DescriptorProto const>::operator++(void)
jmp short loc_2B4ED0
loc_2B4F26:
mov rdi, [rsp+0C8h+var_C8]; this
call _ZNK6google8protobuf19FileDescriptorProto24_internal_enum_type_sizeEv; google::protobuf::FileDescriptorProto::_internal_enum_type_size(void)
mov ecx, eax
mov rax, [rsp+0C8h+var_C8]
movsxd rcx, ecx
shl rcx, 0
add rcx, [rsp+0C8h+var_20]
mov [rsp+0C8h+var_20], rcx
add rax, 10h
add rax, 38h ; '8'
mov [rsp+0C8h+var_58], rax
mov rdi, [rsp+0C8h+var_58]
call _ZNK6google8protobuf16RepeatedPtrFieldINS0_19EnumDescriptorProtoEE5beginEv; google::protobuf::RepeatedPtrField<google::protobuf::EnumDescriptorProto>::begin(void)
mov [rsp+0C8h+var_60], rax
mov rdi, [rsp+0C8h+var_58]
call _ZNK6google8protobuf16RepeatedPtrFieldINS0_19EnumDescriptorProtoEE3endEv; google::protobuf::RepeatedPtrField<google::protobuf::EnumDescriptorProto>::end(void)
mov [rsp+0C8h+var_68], rax
loc_2B4F77:
lea rdi, [rsp+0C8h+var_60]
lea rsi, [rsp+0C8h+var_68]
call _ZN6google8protobuf8internalneERKNS1_19RepeatedPtrIteratorIKNS0_19EnumDescriptorProtoEEES7_; google::protobuf::internal::operator!=(google::protobuf::internal::RepeatedPtrIterator<google::protobuf::EnumDescriptorProto const> const&,google::protobuf::internal::RepeatedPtrIterator<google::protobuf::EnumDescriptorProto const> const&)
test al, 1
jnz short loc_2B4F8C
jmp short loc_2B4FC1
loc_2B4F8C:
lea rdi, [rsp+0C8h+var_60]
call _ZNK6google8protobuf8internal19RepeatedPtrIteratorIKNS0_19EnumDescriptorProtoEEdeEv; google::protobuf::internal::RepeatedPtrIterator<google::protobuf::EnumDescriptorProto const>::operator*(void)
mov [rsp+0C8h+var_70], rax
mov rdi, [rsp+0C8h+var_70]
call _ZN6google8protobuf8internal14WireFormatLite11MessageSizeINS0_19EnumDescriptorProtoEEEmRKT_; google::protobuf::internal::WireFormatLite::MessageSize<google::protobuf::EnumDescriptorProto>(google::protobuf::EnumDescriptorProto const&)
add rax, [rsp+0C8h+var_20]
mov [rsp+0C8h+var_20], rax
lea rdi, [rsp+0C8h+var_60]
call _ZN6google8protobuf8internal19RepeatedPtrIteratorIKNS0_19EnumDescriptorProtoEEppEv; google::protobuf::internal::RepeatedPtrIterator<google::protobuf::EnumDescriptorProto const>::operator++(void)
jmp short loc_2B4F77
loc_2B4FC1:
mov rdi, [rsp+0C8h+var_C8]; this
call _ZNK6google8protobuf19FileDescriptorProto22_internal_service_sizeEv; google::protobuf::FileDescriptorProto::_internal_service_size(void)
mov ecx, eax
mov rax, [rsp+0C8h+var_C8]
movsxd rcx, ecx
shl rcx, 0
add rcx, [rsp+0C8h+var_20]
mov [rsp+0C8h+var_20], rcx
add rax, 10h
add rax, 50h ; 'P'
mov [rsp+0C8h+var_78], rax
mov rdi, [rsp+0C8h+var_78]
call _ZNK6google8protobuf16RepeatedPtrFieldINS0_22ServiceDescriptorProtoEE5beginEv; google::protobuf::RepeatedPtrField<google::protobuf::ServiceDescriptorProto>::begin(void)
mov [rsp+0C8h+var_80], rax
mov rdi, [rsp+0C8h+var_78]
call _ZNK6google8protobuf16RepeatedPtrFieldINS0_22ServiceDescriptorProtoEE3endEv; google::protobuf::RepeatedPtrField<google::protobuf::ServiceDescriptorProto>::end(void)
mov [rsp+0C8h+var_88], rax
loc_2B5012:
lea rdi, [rsp+0C8h+var_80]
lea rsi, [rsp+0C8h+var_88]
call _ZN6google8protobuf8internalneERKNS1_19RepeatedPtrIteratorIKNS0_22ServiceDescriptorProtoEEES7_; google::protobuf::internal::operator!=(google::protobuf::internal::RepeatedPtrIterator<google::protobuf::ServiceDescriptorProto const> const&,google::protobuf::internal::RepeatedPtrIterator<google::protobuf::ServiceDescriptorProto const> const&)
test al, 1
jnz short loc_2B5027
jmp short loc_2B505C
loc_2B5027:
lea rdi, [rsp+0C8h+var_80]
call _ZNK6google8protobuf8internal19RepeatedPtrIteratorIKNS0_22ServiceDescriptorProtoEEdeEv; google::protobuf::internal::RepeatedPtrIterator<google::protobuf::ServiceDescriptorProto const>::operator*(void)
mov [rsp+0C8h+var_90], rax
mov rdi, [rsp+0C8h+var_90]
call _ZN6google8protobuf8internal14WireFormatLite11MessageSizeINS0_22ServiceDescriptorProtoEEEmRKT_; google::protobuf::internal::WireFormatLite::MessageSize<google::protobuf::ServiceDescriptorProto>(google::protobuf::ServiceDescriptorProto const&)
add rax, [rsp+0C8h+var_20]
mov [rsp+0C8h+var_20], rax
lea rdi, [rsp+0C8h+var_80]
call _ZN6google8protobuf8internal19RepeatedPtrIteratorIKNS0_22ServiceDescriptorProtoEEppEv; google::protobuf::internal::RepeatedPtrIterator<google::protobuf::ServiceDescriptorProto const>::operator++(void)
jmp short loc_2B5012
loc_2B505C:
mov rdi, [rsp+0C8h+var_C8]; this
call _ZNK6google8protobuf19FileDescriptorProto24_internal_extension_sizeEv; google::protobuf::FileDescriptorProto::_internal_extension_size(void)
mov ecx, eax
mov rax, [rsp+0C8h+var_C8]
movsxd rcx, ecx
shl rcx, 0
add rcx, [rsp+0C8h+var_20]
mov [rsp+0C8h+var_20], rcx
add rax, 10h
add rax, 68h ; 'h'
mov [rsp+0C8h+var_98], rax
mov rdi, [rsp+0C8h+var_98]
call _ZNK6google8protobuf16RepeatedPtrFieldINS0_20FieldDescriptorProtoEE5beginEv; google::protobuf::RepeatedPtrField<google::protobuf::FieldDescriptorProto>::begin(void)
mov [rsp+0C8h+var_A0], rax
mov rdi, [rsp+0C8h+var_98]
call _ZNK6google8protobuf16RepeatedPtrFieldINS0_20FieldDescriptorProtoEE3endEv; google::protobuf::RepeatedPtrField<google::protobuf::FieldDescriptorProto>::end(void)
mov qword ptr [rsp+0C8h+var_A8], rax
loc_2B50AD:
lea rdi, [rsp+0C8h+var_A0]
lea rsi, [rsp+0C8h+var_A8]; int
call _ZN6google8protobuf8internalneERKNS1_19RepeatedPtrIteratorIKNS0_20FieldDescriptorProtoEEES7_; google::protobuf::internal::operator!=(google::protobuf::internal::RepeatedPtrIterator<google::protobuf::FieldDescriptorProto const> const&,google::protobuf::internal::RepeatedPtrIterator<google::protobuf::FieldDescriptorProto const> const&)
test al, 1
jnz short loc_2B50C2
jmp short loc_2B50F7
loc_2B50C2:
lea rdi, [rsp+0C8h+var_A0]
call _ZNK6google8protobuf8internal19RepeatedPtrIteratorIKNS0_20FieldDescriptorProtoEEdeEv; google::protobuf::internal::RepeatedPtrIterator<google::protobuf::FieldDescriptorProto const>::operator*(void)
mov [rsp+0C8h+var_B0], rax
mov rdi, [rsp+0C8h+var_B0]
call _ZN6google8protobuf8internal14WireFormatLite11MessageSizeINS0_20FieldDescriptorProtoEEEmRKT_; google::protobuf::internal::WireFormatLite::MessageSize<google::protobuf::FieldDescriptorProto>(google::protobuf::FieldDescriptorProto const&)
add rax, [rsp+0C8h+var_20]
mov [rsp+0C8h+var_20], rax
lea rdi, [rsp+0C8h+var_A0]
call _ZN6google8protobuf8internal19RepeatedPtrIteratorIKNS0_20FieldDescriptorProtoEEppEv; google::protobuf::internal::RepeatedPtrIterator<google::protobuf::FieldDescriptorProto const>::operator++(void)
jmp short loc_2B50AD
loc_2B50F7:
mov rdi, [rsp+0C8h+var_C8]
add rdi, 10h
add rdi, 80h
call _ZN6google8protobuf8internal14WireFormatLite9Int32SizeERKNS0_13RepeatedFieldIiEE; google::protobuf::internal::WireFormatLite::Int32Size(google::protobuf::RepeatedField<int> const&)
mov rdi, [rsp+0C8h+var_C8]; this
mov [rsp+0C8h+var_B8], rax
call _ZNK6google8protobuf19FileDescriptorProto32_internal_public_dependency_sizeEv; google::protobuf::FileDescriptorProto::_internal_public_dependency_size(void)
mov edi, eax; this
call _ZN6google8protobuf8internal11FromIntSizeEi; google::protobuf::internal::FromIntSize(int)
mov rdi, [rsp+0C8h+var_C8]
shl rax, 0
add rax, [rsp+0C8h+var_20]
mov [rsp+0C8h+var_20], rax
mov rax, [rsp+0C8h+var_B8]
add rax, [rsp+0C8h+var_20]
mov [rsp+0C8h+var_20], rax
add rdi, 10h
add rdi, 90h
call _ZN6google8protobuf8internal14WireFormatLite9Int32SizeERKNS0_13RepeatedFieldIiEE; google::protobuf::internal::WireFormatLite::Int32Size(google::protobuf::RepeatedField<int> const&)
mov rdi, [rsp+0C8h+var_C8]; this
mov [rsp+0C8h+var_C0], rax
call _ZNK6google8protobuf19FileDescriptorProto30_internal_weak_dependency_sizeEv; google::protobuf::FileDescriptorProto::_internal_weak_dependency_size(void)
mov edi, eax; this
call _ZN6google8protobuf8internal11FromIntSizeEi; google::protobuf::internal::FromIntSize(int)
mov rcx, rax
mov rax, [rsp+0C8h+var_C8]
shl rcx, 0
add rcx, [rsp+0C8h+var_20]
mov [rsp+0C8h+var_20], rcx
mov rcx, [rsp+0C8h+var_C0]
add rcx, [rsp+0C8h+var_20]
mov [rsp+0C8h+var_20], rcx
add rax, 10h
mov [rsp+0C8h+var_8], rax
mov [rsp+0C8h+var_C], 0
mov rax, [rsp+0C8h+var_8]
movsxd rcx, [rsp+0C8h+var_C]
mov eax, [rax+rcx*4]
mov [rsp+0C8h+var_24], eax
mov eax, [rsp+0C8h+var_24]
and eax, 1Fh
cmp eax, 0
jz loc_2B52EA
mov eax, [rsp+0C8h+var_24]
and eax, 1
cmp eax, 0
jz short loc_2B521A
mov rdi, [rsp+0C8h+var_C8]
call _ZNK6google8protobuf19FileDescriptorProto14_internal_nameB5cxx11Ev; google::protobuf::FileDescriptorProto::_internal_name(void)
mov rdi, rax
call _ZN6google8protobuf8internal14WireFormatLite10StringSizeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::internal::WireFormatLite::StringSize(std::string const&)
add rax, 1
add rax, [rsp+0C8h+var_20]
mov [rsp+0C8h+var_20], rax
loc_2B521A:
mov eax, [rsp+0C8h+var_24]
and eax, 2
cmp eax, 0
jz short loc_2B524E
mov rdi, [rsp+0C8h+var_C8]
call _ZNK6google8protobuf19FileDescriptorProto17_internal_packageB5cxx11Ev; google::protobuf::FileDescriptorProto::_internal_package(void)
mov rdi, rax
call _ZN6google8protobuf8internal14WireFormatLite10StringSizeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::internal::WireFormatLite::StringSize(std::string const&)
add rax, 1
add rax, [rsp+0C8h+var_20]
mov [rsp+0C8h+var_20], rax
loc_2B524E:
mov eax, [rsp+0C8h+var_24]
and eax, 4
cmp eax, 0
jz short loc_2B5282
mov rdi, [rsp+0C8h+var_C8]
call _ZNK6google8protobuf19FileDescriptorProto16_internal_syntaxB5cxx11Ev; google::protobuf::FileDescriptorProto::_internal_syntax(void)
mov rdi, rax
call _ZN6google8protobuf8internal14WireFormatLite10StringSizeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::internal::WireFormatLite::StringSize(std::string const&)
add rax, 1
add rax, [rsp+0C8h+var_20]
mov [rsp+0C8h+var_20], rax
loc_2B5282:
mov eax, [rsp+0C8h+var_24]
and eax, 8
cmp eax, 0
jz short loc_2B52B5
mov rax, [rsp+0C8h+var_C8]
mov rdi, [rax+0C8h]
call _ZN6google8protobuf8internal14WireFormatLite11MessageSizeINS0_11FileOptionsEEEmRKT_; google::protobuf::internal::WireFormatLite::MessageSize<google::protobuf::FileOptions>(google::protobuf::FileOptions const&)
add rax, 1
add rax, [rsp+0C8h+var_20]
mov [rsp+0C8h+var_20], rax
loc_2B52B5:
mov eax, [rsp+0C8h+var_24]
and eax, 10h
cmp eax, 0
jz short loc_2B52E8
mov rax, [rsp+0C8h+var_C8]
mov rdi, [rax+0D0h]
call _ZN6google8protobuf8internal14WireFormatLite11MessageSizeINS0_14SourceCodeInfoEEEmRKT_; google::protobuf::internal::WireFormatLite::MessageSize<google::protobuf::SourceCodeInfo>(google::protobuf::SourceCodeInfo const&)
add rax, 1
add rax, [rsp+0C8h+var_20]
mov [rsp+0C8h+var_20], rax
loc_2B52E8:
jmp short $+2
loc_2B52EA:
mov rdi, [rsp+0C8h+var_C8]; this
mov rsi, [rsp+0C8h+var_20]; unsigned __int64
mov rdx, rdi
add rdx, 10h
add rdx, 4; google::protobuf::internal::CachedSize *
call _ZNK6google8protobuf7Message29MaybeComputeUnknownFieldsSizeEmPNS0_8internal10CachedSizeE; google::protobuf::Message::MaybeComputeUnknownFieldsSize(ulong,google::protobuf::internal::CachedSize *)
add rsp, 0C8h
retn
| google::protobuf::internal * google::protobuf::FileDescriptorProto::ByteSizeLong(
google::protobuf::FileDescriptorProto *this)
{
unsigned int v1; // eax
long long v2; // rax
long long v3; // rax
int v4; // eax
long long v5; // rax
int v6; // eax
long long v7; // rax
int v8; // eax
long long v9; // rax
unsigned int v10; // eax
unsigned int v11; // eax
unsigned long long v12; // rax
long long v13; // rax
unsigned long long v14; // rax
long long v15; // rax
unsigned long long v16; // rax
long long v17; // rax
long long v18; // rax
long long v19; // rax
long long v21; // [rsp+8h] [rbp-C0h]
long long v22; // [rsp+10h] [rbp-B8h]
long long v23; // [rsp+18h] [rbp-B0h]
int v24[2]; // [rsp+20h] [rbp-A8h] BYREF
_QWORD v25[2]; // [rsp+28h] [rbp-A0h] BYREF
long long v26; // [rsp+38h] [rbp-90h]
long long v27; // [rsp+40h] [rbp-88h] BYREF
_QWORD v28[2]; // [rsp+48h] [rbp-80h] BYREF
long long v29; // [rsp+58h] [rbp-70h]
long long v30; // [rsp+60h] [rbp-68h] BYREF
_QWORD v31[2]; // [rsp+68h] [rbp-60h] BYREF
long long v32; // [rsp+78h] [rbp-50h]
long long v33; // [rsp+80h] [rbp-48h] BYREF
_QWORD v34[2]; // [rsp+88h] [rbp-40h] BYREF
signed int v35; // [rsp+9Ch] [rbp-2Ch]
signed int v36; // [rsp+A0h] [rbp-28h]
int v37; // [rsp+A4h] [rbp-24h]
unsigned long long v38; // [rsp+A8h] [rbp-20h]
google::protobuf::FileDescriptorProto *v39; // [rsp+B0h] [rbp-18h]
int v40; // [rsp+BCh] [rbp-Ch]
char *v41; // [rsp+C0h] [rbp-8h]
v39 = this;
v37 = 0;
v1 = google::protobuf::RepeatedPtrField<std::string>::size((google::protobuf::FileDescriptorProto *)((char *)this + 24));
v38 = google::protobuf::internal::FromIntSize((google::protobuf::internal *)v1);
v36 = 0;
v35 = google::protobuf::RepeatedPtrField<std::string>::size((google::protobuf::FileDescriptorProto *)((char *)this + 24));
while ( v36 < v35 )
{
v2 = google::protobuf::RepeatedPtrField<std::string>::Get((char *)this + 24, (unsigned int)v36);
v38 += google::protobuf::internal::WireFormatLite::StringSize(v2, v36++);
}
v38 += (int)google::protobuf::FileDescriptorProto::_internal_message_type_size(this);
v34[1] = (char *)this + 48;
v34[0] = google::protobuf::RepeatedPtrField<google::protobuf::DescriptorProto>::begin((google::protobuf::FileDescriptorProto *)((char *)this + 48));
v33 = google::protobuf::RepeatedPtrField<google::protobuf::DescriptorProto>::end((google::protobuf::FileDescriptorProto *)((char *)this + 48));
while ( google::protobuf::internal::operator!=(v34, &v33) )
{
v32 = google::protobuf::internal::RepeatedPtrIterator<google::protobuf::DescriptorProto const>::operator*((long long)v34);
v3 = google::protobuf::internal::WireFormatLite::MessageSize<google::protobuf::DescriptorProto>(v32);
v38 += v3;
google::protobuf::internal::RepeatedPtrIterator<google::protobuf::DescriptorProto const>::operator++(v34);
}
v4 = google::protobuf::FileDescriptorProto::_internal_enum_type_size(this);
v38 += v4;
v31[1] = (char *)this + 72;
v31[0] = google::protobuf::RepeatedPtrField<google::protobuf::EnumDescriptorProto>::begin((google::protobuf::FileDescriptorProto *)((char *)this + 72));
v30 = google::protobuf::RepeatedPtrField<google::protobuf::EnumDescriptorProto>::end((google::protobuf::FileDescriptorProto *)((char *)this + 72));
while ( google::protobuf::internal::operator!=(v31, &v30) )
{
v29 = google::protobuf::internal::RepeatedPtrIterator<google::protobuf::EnumDescriptorProto const>::operator*((long long)v31);
v5 = google::protobuf::internal::WireFormatLite::MessageSize<google::protobuf::EnumDescriptorProto>(v29);
v38 += v5;
google::protobuf::internal::RepeatedPtrIterator<google::protobuf::EnumDescriptorProto const>::operator++(v31);
}
v6 = google::protobuf::FileDescriptorProto::_internal_service_size(this);
v38 += v6;
v28[1] = (char *)this + 96;
v28[0] = google::protobuf::RepeatedPtrField<google::protobuf::ServiceDescriptorProto>::begin((google::protobuf::FileDescriptorProto *)((char *)this + 96));
v27 = google::protobuf::RepeatedPtrField<google::protobuf::ServiceDescriptorProto>::end((google::protobuf::FileDescriptorProto *)((char *)this + 96));
while ( google::protobuf::internal::operator!=(v28, &v27) )
{
v26 = google::protobuf::internal::RepeatedPtrIterator<google::protobuf::ServiceDescriptorProto const>::operator*((long long)v28);
v7 = google::protobuf::internal::WireFormatLite::MessageSize<google::protobuf::ServiceDescriptorProto>(v26);
v38 += v7;
google::protobuf::internal::RepeatedPtrIterator<google::protobuf::ServiceDescriptorProto const>::operator++(v28);
}
v8 = google::protobuf::FileDescriptorProto::_internal_extension_size(this);
v38 += v8;
v25[1] = (char *)this + 120;
v25[0] = google::protobuf::RepeatedPtrField<google::protobuf::FieldDescriptorProto>::begin((google::protobuf::FileDescriptorProto *)((char *)this + 120));
*(_QWORD *)v24 = google::protobuf::RepeatedPtrField<google::protobuf::FieldDescriptorProto>::end((google::protobuf::FileDescriptorProto *)((char *)this + 120));
while ( google::protobuf::internal::operator!=(v25, v24) )
{
v23 = google::protobuf::internal::RepeatedPtrIterator<google::protobuf::FieldDescriptorProto const>::operator*((long long)v25);
v9 = google::protobuf::internal::WireFormatLite::MessageSize<google::protobuf::FieldDescriptorProto>(v23);
v38 += v9;
google::protobuf::internal::RepeatedPtrIterator<google::protobuf::FieldDescriptorProto const>::operator++(v25);
}
v22 = google::protobuf::internal::WireFormatLite::Int32Size((unsigned int *)this + 36);
v10 = google::protobuf::FileDescriptorProto::_internal_public_dependency_size(this);
v38 += google::protobuf::internal::FromIntSize((google::protobuf::internal *)v10);
v38 += v22;
v21 = google::protobuf::internal::WireFormatLite::Int32Size((unsigned int *)this + 40);
v11 = google::protobuf::FileDescriptorProto::_internal_weak_dependency_size(this);
v38 += google::protobuf::internal::FromIntSize((google::protobuf::internal *)v11);
v38 += v21;
v41 = (char *)this + 16;
v40 = 0;
v37 = *((_DWORD *)this + 4);
if ( (v37 & 0x1F) != 0 )
{
if ( (v37 & 1) != 0 )
{
v12 = google::protobuf::FileDescriptorProto::_internal_name[abi:cxx11]((long long)this);
v13 = google::protobuf::internal::WireFormatLite::StringSize(v12, (unsigned int)v24);
v38 += v13 + 1;
}
if ( (v37 & 2) != 0 )
{
v14 = google::protobuf::FileDescriptorProto::_internal_package[abi:cxx11]((long long)this);
v15 = google::protobuf::internal::WireFormatLite::StringSize(v14, (unsigned int)v24);
v38 += v15 + 1;
}
if ( (v37 & 4) != 0 )
{
v16 = google::protobuf::FileDescriptorProto::_internal_syntax[abi:cxx11]((long long)this);
v17 = google::protobuf::internal::WireFormatLite::StringSize(v16, (unsigned int)v24);
v38 += v17 + 1;
}
if ( (v37 & 8) != 0 )
{
v18 = google::protobuf::internal::WireFormatLite::MessageSize<google::protobuf::FileOptions>(*((_QWORD *)this + 25));
v38 += v18 + 1;
}
if ( (v37 & 0x10) != 0 )
{
v19 = google::protobuf::internal::WireFormatLite::MessageSize<google::protobuf::SourceCodeInfo>(*((_QWORD *)this + 26));
v38 += v19 + 1;
}
}
return google::protobuf::Message::MaybeComputeUnknownFieldsSize(
this,
(const google::protobuf::UnknownFieldSet *)v38,
(google::protobuf::FileDescriptorProto *)((char *)this + 20));
}
| |||
26,567 | google::protobuf::FileDescriptorProto::ByteSizeLong() const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc | size_t FileDescriptorProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.FileDescriptorProto)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated string dependency = 3;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.dependency_.size());
for (int i = 0, n = _impl_.dependency_.size(); i < n; i++) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
_impl_.dependency_.Get(i));
}
// repeated .google.protobuf.DescriptorProto message_type = 4;
total_size += 1UL * this->_internal_message_type_size();
for (const auto& msg : this->_impl_.message_type_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
total_size += 1UL * this->_internal_enum_type_size();
for (const auto& msg : this->_impl_.enum_type_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated .google.protobuf.ServiceDescriptorProto service = 6;
total_size += 1UL * this->_internal_service_size();
for (const auto& msg : this->_impl_.service_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated .google.protobuf.FieldDescriptorProto extension = 7;
total_size += 1UL * this->_internal_extension_size();
for (const auto& msg : this->_impl_.extension_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated int32 public_dependency = 10;
{
size_t data_size = ::_pbi::WireFormatLite::
Int32Size(this->_impl_.public_dependency_);
total_size += 1 *
::_pbi::FromIntSize(this->_internal_public_dependency_size());
total_size += data_size;
}
// repeated int32 weak_dependency = 11;
{
size_t data_size = ::_pbi::WireFormatLite::
Int32Size(this->_impl_.weak_dependency_);
total_size += 1 *
::_pbi::FromIntSize(this->_internal_weak_dependency_size());
total_size += data_size;
}
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x0000001fu) {
// optional string name = 1;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_name());
}
// optional string package = 2;
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_package());
}
// optional string syntax = 12;
if (cached_has_bits & 0x00000004u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_syntax());
}
// optional .google.protobuf.FileOptions options = 8;
if (cached_has_bits & 0x00000008u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.options_);
}
// optional .google.protobuf.SourceCodeInfo source_code_info = 9;
if (cached_has_bits & 0x00000010u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.source_code_info_);
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
} | O3 | cpp | google::protobuf::FileDescriptorProto::ByteSizeLong() const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x20(%rdi), %eax
testl %eax, %eax
jle 0xeafa8
movq 0x28(%rbx), %rcx
xorl %edx, %edx
movq %rax, %r12
movq 0x8(%rcx,%rdx,8), %rsi
movq 0x8(%rsi), %rsi
addq %rsi, %r12
orl $0x1, %esi
bsrl %esi, %esi
leal (%rsi,%rsi,8), %esi
addl $0x49, %esi
shrl $0x6, %esi
addq %rsi, %r12
incq %rdx
cmpq %rdx, %rax
jne 0xeaf80
jmp 0xeafab
movq %rax, %r12
movslq 0x38(%rbx), %r14
addq %r14, %r12
movq 0x40(%rbx), %rax
leaq 0x8(%rax), %r15
testq %rax, %rax
cmoveq %rax, %r15
testq %r14, %r14
je 0xeaff4
shlq $0x3, %r14
xorl %r13d, %r13d
movq (%r15,%r13), %rdi
callq 0xed248
addq %rax, %r12
orl $0x1, %eax
bsrl %eax, %eax
leal (%rax,%rax,8), %eax
addl $0x49, %eax
shrl $0x6, %eax
addq %rax, %r12
addq $0x8, %r13
cmpq %r13, %r14
jne 0xeafcd
movslq 0x50(%rbx), %r14
addq %r14, %r12
movq 0x58(%rbx), %rax
leaq 0x8(%rax), %r15
testq %rax, %rax
cmoveq %rax, %r15
testq %r14, %r14
je 0xeb03d
shlq $0x3, %r14
xorl %r13d, %r13d
movq (%r15,%r13), %rdi
callq 0xf04e8
addq %rax, %r12
orl $0x1, %eax
bsrl %eax, %eax
leal (%rax,%rax,8), %eax
addl $0x49, %eax
shrl $0x6, %eax
addq %rax, %r12
addq $0x8, %r13
cmpq %r13, %r14
jne 0xeb016
movslq 0x68(%rbx), %r14
addq %r14, %r12
movq 0x70(%rbx), %rax
leaq 0x8(%rax), %r15
testq %rax, %rax
cmoveq %rax, %r15
testq %r14, %r14
je 0xeb086
shlq $0x3, %r14
xorl %r13d, %r13d
movq (%r15,%r13), %rdi
callq 0xf1650
addq %rax, %r12
orl $0x1, %eax
bsrl %eax, %eax
leal (%rax,%rax,8), %eax
addl $0x49, %eax
shrl $0x6, %eax
addq %rax, %r12
addq $0x8, %r13
cmpq %r13, %r14
jne 0xeb05f
movslq 0x80(%rbx), %r14
addq %r14, %r12
movq 0x88(%rbx), %rax
leaq 0x8(%rax), %r15
testq %rax, %rax
cmoveq %rax, %r15
testq %r14, %r14
je 0xeb0d5
shlq $0x3, %r14
xorl %r13d, %r13d
movq (%r15,%r13), %rdi
callq 0xeec80
addq %rax, %r12
orl $0x1, %eax
bsrl %eax, %eax
leal (%rax,%rax,8), %eax
addl $0x49, %eax
shrl $0x6, %eax
addq %rax, %r12
addq $0x8, %r13
cmpq %r13, %r14
jne 0xeb0ae
leaq 0x90(%rbx), %rdi
callq 0x8d220
movq %rax, %r15
movl 0x90(%rbx), %r14d
leaq 0xa0(%rbx), %rdi
callq 0x8d220
movl 0x10(%rbx), %ebp
movl 0xa0(%rbx), %ecx
addq %r15, %r14
addq %rax, %r14
addq %rcx, %r14
addq %r12, %r14
testb $0x1f, %bpl
je 0xeb1f1
testb $0x1, %bpl
je 0xeb143
movq 0xb0(%rbx), %rax
andq $-0x4, %rax
movq 0x8(%rax), %rax
addq %rax, %r14
orl $0x1, %eax
bsrl %eax, %eax
leal (%rax,%rax,8), %eax
addl $0x49, %eax
shrl $0x6, %eax
addq %rax, %r14
incq %r14
testb $0x2, %bpl
je 0xeb170
movq 0xb8(%rbx), %rax
andq $-0x4, %rax
movq 0x8(%rax), %rax
addq %rax, %r14
orl $0x1, %eax
bsrl %eax, %eax
leal (%rax,%rax,8), %eax
addl $0x49, %eax
shrl $0x6, %eax
addq %rax, %r14
incq %r14
testb $0x4, %bpl
je 0xeb19d
movq 0xc0(%rbx), %rax
andq $-0x4, %rax
movq 0x8(%rax), %rax
addq %rax, %r14
orl $0x1, %eax
bsrl %eax, %eax
leal (%rax,%rax,8), %eax
addl $0x49, %eax
shrl $0x6, %eax
addq %rax, %r14
incq %r14
testb $0x8, %bpl
je 0xeb1c7
movq 0xc8(%rbx), %rdi
callq 0xf3584
addq %rax, %r14
orl $0x1, %eax
bsrl %eax, %eax
leal (%rax,%rax,8), %eax
addl $0x49, %eax
shrl $0x6, %eax
addq %rax, %r14
incq %r14
testb $0x10, %bpl
je 0xeb1f1
movq 0xd0(%rbx), %rdi
callq 0xf9284
addq %rax, %r14
orl $0x1, %eax
bsrl %eax, %eax
leal (%rax,%rax,8), %eax
addl $0x49, %eax
shrl $0x6, %eax
addq %rax, %r14
incq %r14
leaq 0x14(%rbx), %rdx
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9f36e
| _ZNK6google8protobuf19FileDescriptorProto12ByteSizeLongEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
mov eax, [rdi+20h]
test eax, eax
jle short loc_EAFA8
mov rcx, [rbx+28h]
xor edx, edx
mov r12, rax
loc_EAF80:
mov rsi, [rcx+rdx*8+8]
mov rsi, [rsi+8]
add r12, rsi
or esi, 1
bsr esi, esi
lea esi, [rsi+rsi*8]
add esi, 49h ; 'I'
shr esi, 6
add r12, rsi
inc rdx
cmp rax, rdx
jnz short loc_EAF80
jmp short loc_EAFAB
loc_EAFA8:
mov r12, rax
loc_EAFAB:
movsxd r14, dword ptr [rbx+38h]
add r12, r14
mov rax, [rbx+40h]
lea r15, [rax+8]
test rax, rax
cmovz r15, rax
test r14, r14
jz short loc_EAFF4
shl r14, 3
xor r13d, r13d
loc_EAFCD:
mov rdi, [r15+r13]; this
call _ZNK6google8protobuf15DescriptorProto12ByteSizeLongEv; google::protobuf::DescriptorProto::ByteSizeLong(void)
add r12, rax
or eax, 1
bsr eax, eax
lea eax, [rax+rax*8]
add eax, 49h ; 'I'
shr eax, 6
add r12, rax
add r13, 8
cmp r14, r13
jnz short loc_EAFCD
loc_EAFF4:
movsxd r14, dword ptr [rbx+50h]
add r12, r14
mov rax, [rbx+58h]
lea r15, [rax+8]
test rax, rax
cmovz r15, rax
test r14, r14
jz short loc_EB03D
shl r14, 3
xor r13d, r13d
loc_EB016:
mov rdi, [r15+r13]; this
call _ZNK6google8protobuf19EnumDescriptorProto12ByteSizeLongEv; google::protobuf::EnumDescriptorProto::ByteSizeLong(void)
add r12, rax
or eax, 1
bsr eax, eax
lea eax, [rax+rax*8]
add eax, 49h ; 'I'
shr eax, 6
add r12, rax
add r13, 8
cmp r14, r13
jnz short loc_EB016
loc_EB03D:
movsxd r14, dword ptr [rbx+68h]
add r12, r14
mov rax, [rbx+70h]
lea r15, [rax+8]
test rax, rax
cmovz r15, rax
test r14, r14
jz short loc_EB086
shl r14, 3
xor r13d, r13d
loc_EB05F:
mov rdi, [r15+r13]; this
call _ZNK6google8protobuf22ServiceDescriptorProto12ByteSizeLongEv; google::protobuf::ServiceDescriptorProto::ByteSizeLong(void)
add r12, rax
or eax, 1
bsr eax, eax
lea eax, [rax+rax*8]
add eax, 49h ; 'I'
shr eax, 6
add r12, rax
add r13, 8
cmp r14, r13
jnz short loc_EB05F
loc_EB086:
movsxd r14, dword ptr [rbx+80h]
add r12, r14
mov rax, [rbx+88h]
lea r15, [rax+8]
test rax, rax
cmovz r15, rax
test r14, r14
jz short loc_EB0D5
shl r14, 3
xor r13d, r13d
loc_EB0AE:
mov rdi, [r15+r13]; this
call _ZNK6google8protobuf20FieldDescriptorProto12ByteSizeLongEv; google::protobuf::FieldDescriptorProto::ByteSizeLong(void)
add r12, rax
or eax, 1
bsr eax, eax
lea eax, [rax+rax*8]
add eax, 49h ; 'I'
shr eax, 6
add r12, rax
add r13, 8
cmp r14, r13
jnz short loc_EB0AE
loc_EB0D5:
lea rdi, [rbx+90h]
call _ZN6google8protobuf8internal14WireFormatLite9Int32SizeERKNS0_13RepeatedFieldIiEE; google::protobuf::internal::WireFormatLite::Int32Size(google::protobuf::RepeatedField<int> const&)
mov r15, rax
mov r14d, [rbx+90h]
lea rdi, [rbx+0A0h]
call _ZN6google8protobuf8internal14WireFormatLite9Int32SizeERKNS0_13RepeatedFieldIiEE; google::protobuf::internal::WireFormatLite::Int32Size(google::protobuf::RepeatedField<int> const&)
mov ebp, [rbx+10h]
mov ecx, [rbx+0A0h]
add r14, r15
add r14, rax
add r14, rcx
add r14, r12
test bpl, 1Fh
jz loc_EB1F1
test bpl, 1
jz short loc_EB143
mov rax, [rbx+0B0h]
and rax, 0FFFFFFFFFFFFFFFCh
mov rax, [rax+8]
add r14, rax
or eax, 1
bsr eax, eax
lea eax, [rax+rax*8]
add eax, 49h ; 'I'
shr eax, 6
add r14, rax
inc r14
loc_EB143:
test bpl, 2
jz short loc_EB170
mov rax, [rbx+0B8h]
and rax, 0FFFFFFFFFFFFFFFCh
mov rax, [rax+8]
add r14, rax
or eax, 1
bsr eax, eax
lea eax, [rax+rax*8]
add eax, 49h ; 'I'
shr eax, 6
add r14, rax
inc r14
loc_EB170:
test bpl, 4
jz short loc_EB19D
mov rax, [rbx+0C0h]
and rax, 0FFFFFFFFFFFFFFFCh
mov rax, [rax+8]
add r14, rax
or eax, 1
bsr eax, eax
lea eax, [rax+rax*8]
add eax, 49h ; 'I'
shr eax, 6
add r14, rax
inc r14
loc_EB19D:
test bpl, 8
jz short loc_EB1C7
mov rdi, [rbx+0C8h]; this
call _ZNK6google8protobuf11FileOptions12ByteSizeLongEv; google::protobuf::FileOptions::ByteSizeLong(void)
add r14, rax
or eax, 1
bsr eax, eax
lea eax, [rax+rax*8]
add eax, 49h ; 'I'
shr eax, 6
add r14, rax
inc r14
loc_EB1C7:
test bpl, 10h
jz short loc_EB1F1
mov rdi, [rbx+0D0h]; this
call _ZNK6google8protobuf14SourceCodeInfo12ByteSizeLongEv; google::protobuf::SourceCodeInfo::ByteSizeLong(void)
add r14, rax
or eax, 1
bsr eax, eax
lea eax, [rax+rax*8]
add eax, 49h ; 'I'
shr eax, 6
add r14, rax
inc r14
loc_EB1F1:
lea rdx, [rbx+14h]
mov rdi, rbx
mov rsi, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _ZNK6google8protobuf7Message29MaybeComputeUnknownFieldsSizeEmPNS0_8internal10CachedSizeE; google::protobuf::Message::MaybeComputeUnknownFieldsSize(ulong,google::protobuf::internal::CachedSize *)
| char * google::protobuf::FileDescriptorProto::ByteSizeLong(google::protobuf::FileDescriptorProto *this)
{
long long v1; // rax
long long v2; // rdx
long long v3; // r12
long long v4; // rsi
long long v5; // r12
long long v6; // r14
long long v7; // r12
long long v8; // rax
long long v9; // r15
long long v10; // r14
long long v11; // r13
long long v12; // rax
long long v13; // r12
long long v14; // r14
long long v15; // r12
long long v16; // rax
long long v17; // r15
long long v18; // r14
long long v19; // r13
long long v20; // rax
long long v21; // r12
long long v22; // r14
long long v23; // r12
long long v24; // rax
long long v25; // r15
long long v26; // r14
long long v27; // r13
long long v28; // rax
long long v29; // r12
long long v30; // r14
long long v31; // r12
long long v32; // rax
long long v33; // r15
long long v34; // r14
long long v35; // r13
long long v36; // rax
long long v37; // r12
long long v38; // r15
long long v39; // r14
long long v40; // rax
int v41; // ebp
const google::protobuf::UnknownFieldSet *v42; // r14
long long v43; // rax
char *v44; // r14
long long v45; // rax
char *v46; // r14
long long v47; // rax
char *v48; // r14
long long v49; // rax
char *v50; // r14
long long v51; // rax
char *v52; // r14
v1 = *((unsigned int *)this + 8);
if ( (int)v1 <= 0 )
{
v3 = *((unsigned int *)this + 8);
}
else
{
v2 = 0LL;
v3 = *((unsigned int *)this + 8);
do
{
v4 = *(_QWORD *)(*(_QWORD *)(*((_QWORD *)this + 5) + 8 * v2 + 8) + 8LL);
v5 = v4 + v3;
_BitScanReverse((unsigned int *)&v4, v4 | 1);
v3 = ((unsigned int)(9 * v4 + 73) >> 6) + v5;
++v2;
}
while ( v1 != v2 );
}
v6 = *((int *)this + 14);
v7 = v6 + v3;
v8 = *((_QWORD *)this + 8);
v9 = v8 + 8;
if ( !v8 )
v9 = 0LL;
if ( *((_DWORD *)this + 14) )
{
v10 = 8 * v6;
v11 = 0LL;
do
{
v12 = google::protobuf::DescriptorProto::ByteSizeLong(*(google::protobuf::DescriptorProto **)(v9 + v11));
v13 = v12 + v7;
_BitScanReverse((unsigned int *)&v12, v12 | 1);
v7 = ((unsigned int)(9 * v12 + 73) >> 6) + v13;
v11 += 8LL;
}
while ( v10 != v11 );
}
v14 = *((int *)this + 20);
v15 = v14 + v7;
v16 = *((_QWORD *)this + 11);
v17 = v16 + 8;
if ( !v16 )
v17 = 0LL;
if ( *((_DWORD *)this + 20) )
{
v18 = 8 * v14;
v19 = 0LL;
do
{
v20 = google::protobuf::EnumDescriptorProto::ByteSizeLong(*(google::protobuf::EnumDescriptorProto **)(v17 + v19));
v21 = v20 + v15;
_BitScanReverse((unsigned int *)&v20, v20 | 1);
v15 = ((unsigned int)(9 * v20 + 73) >> 6) + v21;
v19 += 8LL;
}
while ( v18 != v19 );
}
v22 = *((int *)this + 26);
v23 = v22 + v15;
v24 = *((_QWORD *)this + 14);
v25 = v24 + 8;
if ( !v24 )
v25 = 0LL;
if ( *((_DWORD *)this + 26) )
{
v26 = 8 * v22;
v27 = 0LL;
do
{
v28 = google::protobuf::ServiceDescriptorProto::ByteSizeLong(*(google::protobuf::ServiceDescriptorProto **)(v25 + v27));
v29 = v28 + v23;
_BitScanReverse((unsigned int *)&v28, v28 | 1);
v23 = ((unsigned int)(9 * v28 + 73) >> 6) + v29;
v27 += 8LL;
}
while ( v26 != v27 );
}
v30 = *((int *)this + 32);
v31 = v30 + v23;
v32 = *((_QWORD *)this + 17);
v33 = v32 + 8;
if ( !v32 )
v33 = 0LL;
if ( *((_DWORD *)this + 32) )
{
v34 = 8 * v30;
v35 = 0LL;
do
{
v36 = google::protobuf::FieldDescriptorProto::ByteSizeLong(*(google::protobuf::FieldDescriptorProto **)(v33 + v35));
v37 = v36 + v31;
_BitScanReverse((unsigned int *)&v36, v36 | 1);
v31 = ((unsigned int)(9 * v36 + 73) >> 6) + v37;
v35 += 8LL;
}
while ( v34 != v35 );
}
v38 = google::protobuf::internal::WireFormatLite::Int32Size((unsigned int *)this + 36);
v39 = *((unsigned int *)this + 36);
v40 = google::protobuf::internal::WireFormatLite::Int32Size((unsigned int *)this + 40);
v41 = *((_DWORD *)this + 4);
v42 = (const google::protobuf::UnknownFieldSet *)(v31 + *((unsigned int *)this + 40) + v40 + v38 + v39);
if ( (v41 & 0x1F) != 0 )
{
if ( (v41 & 1) != 0 )
{
v43 = *(_QWORD *)((*((_QWORD *)this + 22) & 0xFFFFFFFFFFFFFFFCLL) + 8);
v44 = (char *)v42 + v43;
_BitScanReverse((unsigned int *)&v43, v43 | 1);
v42 = (const google::protobuf::UnknownFieldSet *)&v44[((unsigned int)(9 * v43 + 73) >> 6) + 1];
}
if ( (v41 & 2) != 0 )
{
v45 = *(_QWORD *)((*((_QWORD *)this + 23) & 0xFFFFFFFFFFFFFFFCLL) + 8);
v46 = (char *)v42 + v45;
_BitScanReverse((unsigned int *)&v45, v45 | 1);
v42 = (const google::protobuf::UnknownFieldSet *)&v46[((unsigned int)(9 * v45 + 73) >> 6) + 1];
}
if ( (v41 & 4) != 0 )
{
v47 = *(_QWORD *)((*((_QWORD *)this + 24) & 0xFFFFFFFFFFFFFFFCLL) + 8);
v48 = (char *)v42 + v47;
_BitScanReverse((unsigned int *)&v47, v47 | 1);
v42 = (const google::protobuf::UnknownFieldSet *)&v48[((unsigned int)(9 * v47 + 73) >> 6) + 1];
}
if ( (v41 & 8) != 0 )
{
v49 = google::protobuf::FileOptions::ByteSizeLong(*((google::protobuf::FileOptions **)this + 25));
v50 = (char *)v42 + v49;
_BitScanReverse((unsigned int *)&v49, v49 | 1);
v42 = (const google::protobuf::UnknownFieldSet *)&v50[((unsigned int)(9 * v49 + 73) >> 6) + 1];
}
if ( (v41 & 0x10) != 0 )
{
v51 = google::protobuf::SourceCodeInfo::ByteSizeLong(*((google::protobuf::SourceCodeInfo **)this + 26));
v52 = (char *)v42 + v51;
_BitScanReverse((unsigned int *)&v51, v51 | 1);
v42 = (const google::protobuf::UnknownFieldSet *)&v52[((unsigned int)(9 * v51 + 73) >> 6) + 1];
}
}
return google::protobuf::Message::MaybeComputeUnknownFieldsSize((long long)this, v42, (_DWORD *)this + 5);
}
| ByteSizeLong:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV EAX,dword ptr [RDI + 0x20]
TEST EAX,EAX
JLE 0x001eafa8
MOV RCX,qword ptr [RBX + 0x28]
XOR EDX,EDX
MOV R12,RAX
LAB_001eaf80:
MOV RSI,qword ptr [RCX + RDX*0x8 + 0x8]
MOV RSI,qword ptr [RSI + 0x8]
ADD R12,RSI
OR ESI,0x1
BSR ESI,ESI
LEA ESI,[RSI + RSI*0x8]
ADD ESI,0x49
SHR ESI,0x6
ADD R12,RSI
INC RDX
CMP RAX,RDX
JNZ 0x001eaf80
JMP 0x001eafab
LAB_001eafa8:
MOV R12,RAX
LAB_001eafab:
MOVSXD R14,dword ptr [RBX + 0x38]
ADD R12,R14
MOV RAX,qword ptr [RBX + 0x40]
LEA R15,[RAX + 0x8]
TEST RAX,RAX
CMOVZ R15,RAX
TEST R14,R14
JZ 0x001eaff4
SHL R14,0x3
XOR R13D,R13D
LAB_001eafcd:
MOV RDI,qword ptr [R15 + R13*0x1]
CALL 0x001ed248
ADD R12,RAX
OR EAX,0x1
BSR EAX,EAX
LEA EAX,[RAX + RAX*0x8]
ADD EAX,0x49
SHR EAX,0x6
ADD R12,RAX
ADD R13,0x8
CMP R14,R13
JNZ 0x001eafcd
LAB_001eaff4:
MOVSXD R14,dword ptr [RBX + 0x50]
ADD R12,R14
MOV RAX,qword ptr [RBX + 0x58]
LEA R15,[RAX + 0x8]
TEST RAX,RAX
CMOVZ R15,RAX
TEST R14,R14
JZ 0x001eb03d
SHL R14,0x3
XOR R13D,R13D
LAB_001eb016:
MOV RDI,qword ptr [R15 + R13*0x1]
CALL 0x001f04e8
ADD R12,RAX
OR EAX,0x1
BSR EAX,EAX
LEA EAX,[RAX + RAX*0x8]
ADD EAX,0x49
SHR EAX,0x6
ADD R12,RAX
ADD R13,0x8
CMP R14,R13
JNZ 0x001eb016
LAB_001eb03d:
MOVSXD R14,dword ptr [RBX + 0x68]
ADD R12,R14
MOV RAX,qword ptr [RBX + 0x70]
LEA R15,[RAX + 0x8]
TEST RAX,RAX
CMOVZ R15,RAX
TEST R14,R14
JZ 0x001eb086
SHL R14,0x3
XOR R13D,R13D
LAB_001eb05f:
MOV RDI,qword ptr [R15 + R13*0x1]
CALL 0x001f1650
ADD R12,RAX
OR EAX,0x1
BSR EAX,EAX
LEA EAX,[RAX + RAX*0x8]
ADD EAX,0x49
SHR EAX,0x6
ADD R12,RAX
ADD R13,0x8
CMP R14,R13
JNZ 0x001eb05f
LAB_001eb086:
MOVSXD R14,dword ptr [RBX + 0x80]
ADD R12,R14
MOV RAX,qword ptr [RBX + 0x88]
LEA R15,[RAX + 0x8]
TEST RAX,RAX
CMOVZ R15,RAX
TEST R14,R14
JZ 0x001eb0d5
SHL R14,0x3
XOR R13D,R13D
LAB_001eb0ae:
MOV RDI,qword ptr [R15 + R13*0x1]
CALL 0x001eec80
ADD R12,RAX
OR EAX,0x1
BSR EAX,EAX
LEA EAX,[RAX + RAX*0x8]
ADD EAX,0x49
SHR EAX,0x6
ADD R12,RAX
ADD R13,0x8
CMP R14,R13
JNZ 0x001eb0ae
LAB_001eb0d5:
LEA RDI,[RBX + 0x90]
CALL 0x0018d220
MOV R15,RAX
MOV R14D,dword ptr [RBX + 0x90]
LEA RDI,[RBX + 0xa0]
CALL 0x0018d220
MOV EBP,dword ptr [RBX + 0x10]
MOV ECX,dword ptr [RBX + 0xa0]
ADD R14,R15
ADD R14,RAX
ADD R14,RCX
ADD R14,R12
TEST BPL,0x1f
JZ 0x001eb1f1
TEST BPL,0x1
JZ 0x001eb143
MOV RAX,qword ptr [RBX + 0xb0]
AND RAX,-0x4
MOV RAX,qword ptr [RAX + 0x8]
ADD R14,RAX
OR EAX,0x1
BSR EAX,EAX
LEA EAX,[RAX + RAX*0x8]
ADD EAX,0x49
SHR EAX,0x6
ADD R14,RAX
INC R14
LAB_001eb143:
TEST BPL,0x2
JZ 0x001eb170
MOV RAX,qword ptr [RBX + 0xb8]
AND RAX,-0x4
MOV RAX,qword ptr [RAX + 0x8]
ADD R14,RAX
OR EAX,0x1
BSR EAX,EAX
LEA EAX,[RAX + RAX*0x8]
ADD EAX,0x49
SHR EAX,0x6
ADD R14,RAX
INC R14
LAB_001eb170:
TEST BPL,0x4
JZ 0x001eb19d
MOV RAX,qword ptr [RBX + 0xc0]
AND RAX,-0x4
MOV RAX,qword ptr [RAX + 0x8]
ADD R14,RAX
OR EAX,0x1
BSR EAX,EAX
LEA EAX,[RAX + RAX*0x8]
ADD EAX,0x49
SHR EAX,0x6
ADD R14,RAX
INC R14
LAB_001eb19d:
TEST BPL,0x8
JZ 0x001eb1c7
MOV RDI,qword ptr [RBX + 0xc8]
CALL 0x001f3584
ADD R14,RAX
OR EAX,0x1
BSR EAX,EAX
LEA EAX,[RAX + RAX*0x8]
ADD EAX,0x49
SHR EAX,0x6
ADD R14,RAX
INC R14
LAB_001eb1c7:
TEST BPL,0x10
JZ 0x001eb1f1
MOV RDI,qword ptr [RBX + 0xd0]
CALL 0x001f9284
ADD R14,RAX
OR EAX,0x1
BSR EAX,EAX
LEA EAX,[RAX + RAX*0x8]
ADD EAX,0x49
SHR EAX,0x6
ADD R14,RAX
INC R14
LAB_001eb1f1:
LEA RDX,[RBX + 0x14]
MOV RDI,RBX
MOV RSI,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0019f36e
|
/* google::protobuf::FileDescriptorProto::ByteSizeLong() const */
void __thiscall google::protobuf::FileDescriptorProto::ByteSizeLong(FileDescriptorProto *this)
{
uint uVar1;
int iVar2;
ulong uVar3;
long lVar4;
long lVar5;
ulong uVar6;
uint uVar7;
ulong uVar8;
long lVar9;
long lVar10;
long lVar11;
uVar3 = (ulong)*(uint *)(this + 0x20);
uVar8 = uVar3;
if (0 < (int)*(uint *)(this + 0x20)) {
uVar6 = 0;
do {
lVar5 = *(long *)(*(long *)(*(long *)(this + 0x28) + 8 + uVar6 * 8) + 8);
uVar7 = (uint)lVar5 | 1;
iVar2 = 0x1f;
if (uVar7 != 0) {
for (; uVar7 >> iVar2 == 0; iVar2 = iVar2 + -1) {
}
}
uVar8 = uVar8 + lVar5 + (ulong)(iVar2 * 9 + 0x49U >> 6);
uVar6 = uVar6 + 1;
} while (uVar3 != uVar6);
}
lVar11 = (long)*(int *)(this + 0x38);
lVar9 = uVar8 + lVar11;
lVar5 = *(long *)(this + 0x40) + 8;
if (*(long *)(this + 0x40) == 0) {
lVar5 = 0;
}
if (lVar11 != 0) {
lVar10 = 0;
do {
lVar4 = DescriptorProto::ByteSizeLong(*(DescriptorProto **)(lVar5 + lVar10));
uVar7 = (uint)lVar4 | 1;
iVar2 = 0x1f;
if (uVar7 != 0) {
for (; uVar7 >> iVar2 == 0; iVar2 = iVar2 + -1) {
}
}
lVar9 = lVar9 + lVar4 + (ulong)(iVar2 * 9 + 0x49U >> 6);
lVar10 = lVar10 + 8;
} while (lVar11 * 8 != lVar10);
}
lVar11 = (long)*(int *)(this + 0x50);
lVar9 = lVar9 + lVar11;
lVar5 = *(long *)(this + 0x58) + 8;
if (*(long *)(this + 0x58) == 0) {
lVar5 = 0;
}
if (lVar11 != 0) {
lVar10 = 0;
do {
lVar4 = EnumDescriptorProto::ByteSizeLong(*(EnumDescriptorProto **)(lVar5 + lVar10));
uVar7 = (uint)lVar4 | 1;
iVar2 = 0x1f;
if (uVar7 != 0) {
for (; uVar7 >> iVar2 == 0; iVar2 = iVar2 + -1) {
}
}
lVar9 = lVar9 + lVar4 + (ulong)(iVar2 * 9 + 0x49U >> 6);
lVar10 = lVar10 + 8;
} while (lVar11 * 8 != lVar10);
}
lVar11 = (long)*(int *)(this + 0x68);
lVar9 = lVar9 + lVar11;
lVar5 = *(long *)(this + 0x70) + 8;
if (*(long *)(this + 0x70) == 0) {
lVar5 = 0;
}
if (lVar11 != 0) {
lVar10 = 0;
do {
lVar4 = ServiceDescriptorProto::ByteSizeLong(*(ServiceDescriptorProto **)(lVar5 + lVar10));
uVar7 = (uint)lVar4 | 1;
iVar2 = 0x1f;
if (uVar7 != 0) {
for (; uVar7 >> iVar2 == 0; iVar2 = iVar2 + -1) {
}
}
lVar9 = lVar9 + lVar4 + (ulong)(iVar2 * 9 + 0x49U >> 6);
lVar10 = lVar10 + 8;
} while (lVar11 * 8 != lVar10);
}
lVar11 = (long)*(int *)(this + 0x80);
lVar9 = lVar9 + lVar11;
lVar5 = *(long *)(this + 0x88) + 8;
if (*(long *)(this + 0x88) == 0) {
lVar5 = 0;
}
if (lVar11 != 0) {
lVar10 = 0;
do {
lVar4 = FieldDescriptorProto::ByteSizeLong(*(FieldDescriptorProto **)(lVar5 + lVar10));
uVar7 = (uint)lVar4 | 1;
iVar2 = 0x1f;
if (uVar7 != 0) {
for (; uVar7 >> iVar2 == 0; iVar2 = iVar2 + -1) {
}
}
lVar9 = lVar9 + lVar4 + (ulong)(iVar2 * 9 + 0x49U >> 6);
lVar10 = lVar10 + 8;
} while (lVar11 * 8 != lVar10);
}
lVar5 = internal::WireFormatLite::Int32Size((RepeatedField *)(this + 0x90));
uVar7 = *(uint *)(this + 0x90);
lVar11 = internal::WireFormatLite::Int32Size((RepeatedField *)(this + 0xa0));
uVar1 = *(uint *)(this + 0x10);
uVar8 = (ulong)uVar7 + lVar5 + lVar11 + (ulong)*(uint *)(this + 0xa0) + lVar9;
if ((uVar1 & 0x1f) != 0) {
if ((uVar1 & 1) != 0) {
lVar5 = *(long *)((*(ulong *)(this + 0xb0) & 0xfffffffffffffffc) + 8);
uVar7 = (uint)lVar5 | 1;
iVar2 = 0x1f;
if (uVar7 != 0) {
for (; uVar7 >> iVar2 == 0; iVar2 = iVar2 + -1) {
}
}
uVar8 = uVar8 + lVar5 + (ulong)(iVar2 * 9 + 0x49U >> 6) + 1;
}
if ((uVar1 & 2) != 0) {
lVar5 = *(long *)((*(ulong *)(this + 0xb8) & 0xfffffffffffffffc) + 8);
uVar7 = (uint)lVar5 | 1;
iVar2 = 0x1f;
if (uVar7 != 0) {
for (; uVar7 >> iVar2 == 0; iVar2 = iVar2 + -1) {
}
}
uVar8 = uVar8 + lVar5 + (ulong)(iVar2 * 9 + 0x49U >> 6) + 1;
}
if ((uVar1 & 4) != 0) {
lVar5 = *(long *)((*(ulong *)(this + 0xc0) & 0xfffffffffffffffc) + 8);
uVar7 = (uint)lVar5 | 1;
iVar2 = 0x1f;
if (uVar7 != 0) {
for (; uVar7 >> iVar2 == 0; iVar2 = iVar2 + -1) {
}
}
uVar8 = uVar8 + lVar5 + (ulong)(iVar2 * 9 + 0x49U >> 6) + 1;
}
if ((uVar1 & 8) != 0) {
lVar5 = FileOptions::ByteSizeLong();
uVar7 = (uint)lVar5 | 1;
iVar2 = 0x1f;
if (uVar7 != 0) {
for (; uVar7 >> iVar2 == 0; iVar2 = iVar2 + -1) {
}
}
uVar8 = uVar8 + lVar5 + (ulong)(iVar2 * 9 + 0x49U >> 6) + 1;
}
if ((uVar1 & 0x10) != 0) {
lVar5 = SourceCodeInfo::ByteSizeLong(*(SourceCodeInfo **)(this + 0xd0));
uVar7 = (uint)lVar5 | 1;
iVar2 = 0x1f;
if (uVar7 != 0) {
for (; uVar7 >> iVar2 == 0; iVar2 = iVar2 + -1) {
}
}
uVar8 = uVar8 + lVar5 + (ulong)(iVar2 * 9 + 0x49U >> 6) + 1;
}
}
Message::MaybeComputeUnknownFieldsSize((Message *)this,uVar8,(CachedSize *)(this + 0x14));
return;
}
| |
26,568 | ma_save_session_track_info | eloqsql/libmariadb/libmariadb/mariadb_lib.c | void ma_save_session_track_info(void *ptr, enum enum_mariadb_status_info type, ...)
{
MYSQL *mysql= (MYSQL *)ptr;
enum enum_session_state_type track_type;
va_list ap;
DBUG_ASSERT(mysql != NULL);
/* We only handle SESSION_TRACK_TYPE here */
if (type != SESSION_TRACK_TYPE)
return;
va_start(ap, type);
track_type= va_arg(ap, enum enum_session_state_type);
switch (track_type) {
case SESSION_TRACK_SCHEMA:
case SESSION_TRACK_STATE_CHANGE:
case SESSION_TRACK_TRANSACTION_CHARACTERISTICS:
case SESSION_TRACK_TRANSACTION_STATE:
case SESSION_TRACK_GTIDS:
case SESSION_TRACK_SYSTEM_VARIABLES:
{
LIST *session_item;
MYSQL_LEX_STRING *str;
char *tmp;
MARIADB_CONST_STRING *data1= va_arg(ap, MARIADB_CONST_STRING *);
if (!(session_item= ma_multi_malloc(0,
&session_item, sizeof(LIST),
&str, sizeof(MYSQL_LEX_STRING),
&tmp, data1->length,
NULL)))
goto mem_error;
str->str= tmp;
memcpy(str->str, data1->str, data1->length);
str->length= data1->length;
session_item->data= str;
mysql->extension->session_state[track_type].list= list_add(mysql->extension->session_state[track_type].list,
session_item);
if (track_type == SESSION_TRACK_SYSTEM_VARIABLES)
{
MARIADB_CONST_STRING *data2= va_arg(ap, MARIADB_CONST_STRING *);
if (!(session_item= ma_multi_malloc(0,
&session_item, sizeof(LIST),
&str, sizeof(MYSQL_LEX_STRING),
&tmp, data2->length,
NULL)))
goto mem_error;
str->str= tmp;
memcpy(str->str, data2->str, data2->length);
str->length= data2->length;
session_item->data= str;
mysql->extension->session_state[track_type].list= list_add(mysql->extension->session_state[track_type].list,
session_item);
}
}
break;
}
return;
mem_error:
SET_CLIENT_ERROR(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0);
return;
} | O0 | c | ma_save_session_track_info:
pushq %rbp
movq %rsp, %rbp
subq $0x180, %rsp # imm = 0x180
testb %al, %al
je 0x1e4b4
movaps %xmm0, -0xf0(%rbp)
movaps %xmm1, -0xe0(%rbp)
movaps %xmm2, -0xd0(%rbp)
movaps %xmm3, -0xc0(%rbp)
movaps %xmm4, -0xb0(%rbp)
movaps %xmm5, -0xa0(%rbp)
movaps %xmm6, -0x90(%rbp)
movaps %xmm7, -0x80(%rbp)
movq %r9, -0xf8(%rbp)
movq %r8, -0x100(%rbp)
movq %rcx, -0x108(%rbp)
movq %rdx, -0x110(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpl $0x1, -0xc(%rbp)
je 0x1e4ea
jmp 0x1e85b
leaq -0x40(%rbp), %rax
leaq -0x120(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
leaq -0x40(%rbp), %rax
movq %rax, -0x130(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x124(%rbp)
cmpl $0x28, %eax
ja 0x1e549
movq -0x130(%rbp), %rcx
movl -0x124(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x138(%rbp)
jmp 0x1e566
movq -0x130(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x138(%rbp)
movq -0x138(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
subl $0x5, %eax
ja 0x1e7f2
jmp 0x1e580
leaq -0x40(%rbp), %rax
movq %rax, -0x148(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x13c(%rbp)
cmpl $0x28, %eax
ja 0x1e5bb
movq -0x148(%rbp), %rcx
movl -0x13c(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x150(%rbp)
jmp 0x1e5d8
movq -0x148(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x150(%rbp)
movq -0x150(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq 0x8(%rax), %rax
xorl %edi, %edi
leaq -0x48(%rbp), %rsi
movl $0x18, %edx
leaq -0x50(%rbp), %rcx
movl $0x10, %r8d
leaq -0x58(%rbp), %r9
xorl %r10d, %r10d
movq %rax, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, %al
callq 0x24f60
movq %rax, -0x48(%rbp)
cmpq $0x0, %rax
jne 0x1e62d
jmp 0x1e7f4
movq -0x58(%rbp), %rcx
movq -0x50(%rbp), %rax
movq %rcx, (%rax)
movq -0x50(%rbp), %rax
movq (%rax), %rdi
movq -0x60(%rbp), %rax
movq (%rax), %rsi
movq -0x60(%rbp), %rax
movq 0x8(%rax), %rdx
callq 0x13360
movq -0x60(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x50(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq 0x4f0(%rax), %rax
addq $0x8, %rax
movl -0x1c(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq -0x48(%rbp), %rsi
callq 0x22eb0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq 0x4f0(%rax), %rax
addq $0x8, %rax
movl -0x1c(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
cmpl $0x0, -0x1c(%rbp)
jne 0x1e7f0
leaq -0x40(%rbp), %rax
movq %rax, -0x160(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x154(%rbp)
cmpl $0x28, %eax
ja 0x1e6f8
movq -0x160(%rbp), %rcx
movl -0x154(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x168(%rbp)
jmp 0x1e715
movq -0x160(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x168(%rbp)
movq -0x168(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rax
xorl %edi, %edi
leaq -0x48(%rbp), %rsi
movl $0x18, %edx
leaq -0x50(%rbp), %rcx
movl $0x10, %r8d
leaq -0x58(%rbp), %r9
xorl %r10d, %r10d
movq %rax, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, %al
callq 0x24f60
movq %rax, -0x48(%rbp)
cmpq $0x0, %rax
jne 0x1e76a
jmp 0x1e7f4
movq -0x58(%rbp), %rcx
movq -0x50(%rbp), %rax
movq %rcx, (%rax)
movq -0x50(%rbp), %rax
movq (%rax), %rdi
movq -0x68(%rbp), %rax
movq (%rax), %rsi
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rdx
callq 0x13360
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x50(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq 0x4f0(%rax), %rax
addq $0x8, %rax
movl -0x1c(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq -0x48(%rbp), %rsi
callq 0x22eb0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq 0x4f0(%rax), %rax
addq $0x8, %rax
movl -0x1c(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
jmp 0x1e7f2
jmp 0x1e85b
jmp 0x1e7f6
movq -0x18(%rbp), %rax
movl $0x7d8, 0x90(%rax) # imm = 0x7D8
movq -0x18(%rbp), %rdi
addq $0x297, %rdi # imm = 0x297
leaq 0x416ca(%rip), %rax # 0x5fee0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13210
movq -0x18(%rbp), %rax
movb $0x0, 0x29c(%rax)
movq -0x18(%rbp), %rdi
addq $0x97, %rdi
leaq 0x416b0(%rip), %rax # 0x5fef0
movq 0x40(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x13210
movq -0x18(%rbp), %rax
movb $0x0, 0x296(%rax)
jmp 0x1e85b
addq $0x180, %rsp # imm = 0x180
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_save_session_track_info:
push rbp
mov rbp, rsp
sub rsp, 180h
test al, al
jz short loc_1E4B4
movaps [rbp+var_F0], xmm0
movaps [rbp+var_E0], xmm1
movaps [rbp+var_D0], xmm2
movaps [rbp+var_C0], xmm3
movaps [rbp+var_B0], xmm4
movaps [rbp+var_A0], xmm5
movaps [rbp+var_90], xmm6
movaps [rbp+var_80], xmm7
loc_1E4B4:
mov [rbp+var_F8], r9
mov [rbp+var_100], r8
mov [rbp+var_108], rcx
mov [rbp+var_110], rdx
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
cmp [rbp+var_C], 1
jz short loc_1E4EA
jmp loc_1E85B
loc_1E4EA:
lea rax, [rbp+var_40]
lea rcx, [rbp+var_120]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 10h
lea rax, [rbp+var_40]
mov [rbp+var_130], rax
mov eax, [rbp+var_40]
mov [rbp+var_124], eax
cmp eax, 28h ; '('
ja short loc_1E549
mov rcx, [rbp+var_130]
mov edx, [rbp+var_124]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_138], rax
jmp short loc_1E566
loc_1E549:
mov rcx, [rbp+var_130]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_138], rax
loc_1E566:
mov rax, [rbp+var_138]
mov eax, [rax]
mov [rbp+var_1C], eax
mov eax, [rbp+var_1C]
sub eax, 5
ja loc_1E7F2
jmp short $+2
loc_1E580:
lea rax, [rbp+var_40]
mov [rbp+var_148], rax
mov eax, [rbp+var_40]
mov [rbp+var_13C], eax
cmp eax, 28h ; '('
ja short loc_1E5BB
mov rcx, [rbp+var_148]
mov edx, [rbp+var_13C]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_150], rax
jmp short loc_1E5D8
loc_1E5BB:
mov rcx, [rbp+var_148]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_150], rax
loc_1E5D8:
mov rax, [rbp+var_150]
mov rax, [rax]
mov [rbp+var_60], rax
mov rax, [rbp+var_60]
mov rax, [rax+8]
xor edi, edi
lea rsi, [rbp+var_48]
mov edx, 18h
lea rcx, [rbp+var_50]
mov r8d, 10h
lea r9, [rbp+var_58]
xor r10d, r10d
mov [rsp+180h+var_180], rax
mov [rsp+180h+var_178], 0
mov al, 0
call ma_multi_malloc
mov [rbp+var_48], rax
cmp rax, 0
jnz short loc_1E62D
jmp loc_1E7F4
loc_1E62D:
mov rcx, [rbp+var_58]
mov rax, [rbp+var_50]
mov [rax], rcx
mov rax, [rbp+var_50]
mov rdi, [rax]
mov rax, [rbp+var_60]
mov rsi, [rax]
mov rax, [rbp+var_60]
mov rdx, [rax+8]
call _memcpy
mov rax, [rbp+var_60]
mov rcx, [rax+8]
mov rax, [rbp+var_50]
mov [rax+8], rcx
mov rcx, [rbp+var_50]
mov rax, [rbp+var_48]
mov [rax+10h], rcx
mov rax, [rbp+var_18]
mov rax, [rax+4F0h]
add rax, 8
mov ecx, [rbp+var_1C]
shl rcx, 4
add rax, rcx
mov rdi, [rax]
mov rsi, [rbp+var_48]
call list_add
mov rcx, rax
mov rax, [rbp+var_18]
mov rax, [rax+4F0h]
add rax, 8
mov edx, [rbp+var_1C]
shl rdx, 4
add rax, rdx
mov [rax], rcx
cmp [rbp+var_1C], 0
jnz loc_1E7F0
lea rax, [rbp+var_40]
mov [rbp+var_160], rax
mov eax, [rbp+var_40]
mov [rbp+var_154], eax
cmp eax, 28h ; '('
ja short loc_1E6F8
mov rcx, [rbp+var_160]
mov edx, [rbp+var_154]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_168], rax
jmp short loc_1E715
loc_1E6F8:
mov rcx, [rbp+var_160]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_168], rax
loc_1E715:
mov rax, [rbp+var_168]
mov rax, [rax]
mov [rbp+var_68], rax
mov rax, [rbp+var_68]
mov rax, [rax+8]
xor edi, edi
lea rsi, [rbp+var_48]
mov edx, 18h
lea rcx, [rbp+var_50]
mov r8d, 10h
lea r9, [rbp+var_58]
xor r10d, r10d
mov [rsp+180h+var_180], rax
mov [rsp+180h+var_178], 0
mov al, 0
call ma_multi_malloc
mov [rbp+var_48], rax
cmp rax, 0
jnz short loc_1E76A
jmp loc_1E7F4
loc_1E76A:
mov rcx, [rbp+var_58]
mov rax, [rbp+var_50]
mov [rax], rcx
mov rax, [rbp+var_50]
mov rdi, [rax]
mov rax, [rbp+var_68]
mov rsi, [rax]
mov rax, [rbp+var_68]
mov rdx, [rax+8]
call _memcpy
mov rax, [rbp+var_68]
mov rcx, [rax+8]
mov rax, [rbp+var_50]
mov [rax+8], rcx
mov rcx, [rbp+var_50]
mov rax, [rbp+var_48]
mov [rax+10h], rcx
mov rax, [rbp+var_18]
mov rax, [rax+4F0h]
add rax, 8
mov ecx, [rbp+var_1C]
shl rcx, 4
add rax, rcx
mov rdi, [rax]
mov rsi, [rbp+var_48]
call list_add
mov rcx, rax
mov rax, [rbp+var_18]
mov rax, [rax+4F0h]
add rax, 8
mov edx, [rbp+var_1C]
shl rdx, 4
add rax, rdx
mov [rax], rcx
loc_1E7F0:
jmp short $+2
loc_1E7F2:
jmp short loc_1E85B
loc_1E7F4:
jmp short $+2
loc_1E7F6:
mov rax, [rbp+var_18]
mov dword ptr [rax+90h], 7D8h
mov rdi, [rbp+var_18]
add rdi, 297h
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_18]
mov byte ptr [rax+29Ch], 0
mov rdi, [rbp+var_18]
add rdi, 97h
lea rax, client_errors
mov rsi, [rax+40h]
mov edx, 1FFh
call _strncpy
mov rax, [rbp+var_18]
mov byte ptr [rax+296h], 0
jmp short $+2
loc_1E85B:
add rsp, 180h
pop rbp
retn
| long long ma_save_session_track_info(long long a1, int a2, unsigned int a3, ...)
{
long long result; // rax
char *v4; // rax
long long v5; // rcx
char *overflow_arg_area; // rax
long long v7; // rcx
_QWORD *v8; // [rsp+118h] [rbp-68h]
_QWORD *v9; // [rsp+120h] [rbp-60h]
long long v10; // [rsp+128h] [rbp-58h] BYREF
_QWORD *v11; // [rsp+130h] [rbp-50h] BYREF
long long v12; // [rsp+138h] [rbp-48h] BYREF
va_list va; // [rsp+140h] [rbp-40h] BYREF
unsigned int v14; // [rsp+164h] [rbp-1Ch]
long long v15; // [rsp+168h] [rbp-18h]
int v16; // [rsp+174h] [rbp-Ch]
long long v17; // [rsp+178h] [rbp-8h]
v17 = a1;
v16 = a2;
result = a1;
v15 = a1;
if ( a2 == 1 )
{
va_start(va, a3);
v14 = a3;
result = a3 - 5;
if ( a3 <= 5 )
{
v4 = (char *)va[0].reg_save_area + (int)va[0].gp_offset;
va[0].gp_offset += 8;
v9 = *(_QWORD **)v4;
v12 = ma_multi_malloc(
0,
(unsigned int)&v12,
24,
(unsigned int)&v11,
16,
(unsigned int)&v10,
*(_QWORD *)(*(_QWORD *)v4 + 8LL),
0LL);
if ( !v12 )
goto LABEL_11;
*v11 = v10;
memcpy(*v11, *v9, v9[1]);
v11[1] = v9[1];
*(_QWORD *)(v12 + 16) = v11;
v5 = list_add(*(_QWORD *)(16LL * v14 + *(_QWORD *)(v15 + 1264) + 8LL), v12);
result = 16LL * v14 + *(_QWORD *)(v15 + 1264) + 8LL;
*(_QWORD *)result = v5;
if ( v14 )
return result;
if ( va[0].gp_offset > 0x28 )
{
overflow_arg_area = (char *)va[0].overflow_arg_area;
va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8;
}
else
{
overflow_arg_area = (char *)va[0].reg_save_area + (int)va[0].gp_offset;
va[0].gp_offset += 8;
}
v8 = *(_QWORD **)overflow_arg_area;
v12 = ma_multi_malloc(
0,
(unsigned int)&v12,
24,
(unsigned int)&v11,
16,
(unsigned int)&v10,
*(_QWORD *)(*(_QWORD *)overflow_arg_area + 8LL),
0LL);
if ( !v12 )
{
LABEL_11:
*(_DWORD *)(v15 + 144) = 2008;
strncpy(v15 + 663, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(v15 + 668) = 0;
strncpy(v15 + 151, client_errors[8], 511LL);
result = v15;
*(_BYTE *)(v15 + 662) = 0;
return result;
}
*v11 = v10;
memcpy(*v11, *v8, v8[1]);
v11[1] = v8[1];
*(_QWORD *)(v12 + 16) = v11;
v7 = list_add(*(_QWORD *)(16LL * v14 + *(_QWORD *)(v15 + 1264) + 8LL), v12);
result = 16LL * v14 + *(_QWORD *)(v15 + 1264) + 8LL;
*(_QWORD *)result = v7;
}
}
return result;
}
| ma_save_session_track_info:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x180
TEST AL,AL
JZ 0x0011e4b4
MOVAPS xmmword ptr [RBP + -0xf0],XMM0
MOVAPS xmmword ptr [RBP + -0xe0],XMM1
MOVAPS xmmword ptr [RBP + -0xd0],XMM2
MOVAPS xmmword ptr [RBP + -0xc0],XMM3
MOVAPS xmmword ptr [RBP + -0xb0],XMM4
MOVAPS xmmword ptr [RBP + -0xa0],XMM5
MOVAPS xmmword ptr [RBP + -0x90],XMM6
MOVAPS xmmword ptr [RBP + -0x80],XMM7
LAB_0011e4b4:
MOV qword ptr [RBP + -0xf8],R9
MOV qword ptr [RBP + -0x100],R8
MOV qword ptr [RBP + -0x108],RCX
MOV qword ptr [RBP + -0x110],RDX
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
CMP dword ptr [RBP + -0xc],0x1
JZ 0x0011e4ea
JMP 0x0011e85b
LAB_0011e4ea:
LEA RAX,[RBP + -0x40]
LEA RCX,[RBP + -0x120]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RBP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RAX + 0x4],0x30
MOV dword ptr [RAX],0x10
LEA RAX,[RBP + -0x40]
MOV qword ptr [RBP + -0x130],RAX
MOV EAX,dword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x124],EAX
CMP EAX,0x28
JA 0x0011e549
MOV RCX,qword ptr [RBP + -0x130]
MOV EDX,dword ptr [RBP + -0x124]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x138],RAX
JMP 0x0011e566
LAB_0011e549:
MOV RCX,qword ptr [RBP + -0x130]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x138],RAX
LAB_0011e566:
MOV RAX,qword ptr [RBP + -0x138]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x1c],EAX
MOV EAX,dword ptr [RBP + -0x1c]
SUB EAX,0x5
JA 0x0011e7f2
JMP 0x0011e580
LAB_0011e580:
LEA RAX,[RBP + -0x40]
MOV qword ptr [RBP + -0x148],RAX
MOV EAX,dword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x13c],EAX
CMP EAX,0x28
JA 0x0011e5bb
MOV RCX,qword ptr [RBP + -0x148]
MOV EDX,dword ptr [RBP + -0x13c]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x150],RAX
JMP 0x0011e5d8
LAB_0011e5bb:
MOV RCX,qword ptr [RBP + -0x148]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x150],RAX
LAB_0011e5d8:
MOV RAX,qword ptr [RBP + -0x150]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RAX + 0x8]
XOR EDI,EDI
LEA RSI,[RBP + -0x48]
MOV EDX,0x18
LEA RCX,[RBP + -0x50]
MOV R8D,0x10
LEA R9,[RBP + -0x58]
XOR R10D,R10D
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],0x0
MOV AL,0x0
CALL 0x00124f60
MOV qword ptr [RBP + -0x48],RAX
CMP RAX,0x0
JNZ 0x0011e62d
JMP 0x0011e7f4
LAB_0011e62d:
MOV RCX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x50]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x60]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x60]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x00113360
MOV RAX,qword ptr [RBP + -0x60]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x4f0]
ADD RAX,0x8
MOV ECX,dword ptr [RBP + -0x1c]
SHL RCX,0x4
ADD RAX,RCX
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x48]
CALL 0x00122eb0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x4f0]
ADD RAX,0x8
MOV EDX,dword ptr [RBP + -0x1c]
SHL RDX,0x4
ADD RAX,RDX
MOV qword ptr [RAX],RCX
CMP dword ptr [RBP + -0x1c],0x0
JNZ 0x0011e7f0
LEA RAX,[RBP + -0x40]
MOV qword ptr [RBP + -0x160],RAX
MOV EAX,dword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x154],EAX
CMP EAX,0x28
JA 0x0011e6f8
MOV RCX,qword ptr [RBP + -0x160]
MOV EDX,dword ptr [RBP + -0x154]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x168],RAX
JMP 0x0011e715
LAB_0011e6f8:
MOV RCX,qword ptr [RBP + -0x160]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x168],RAX
LAB_0011e715:
MOV RAX,qword ptr [RBP + -0x168]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV RAX,qword ptr [RAX + 0x8]
XOR EDI,EDI
LEA RSI,[RBP + -0x48]
MOV EDX,0x18
LEA RCX,[RBP + -0x50]
MOV R8D,0x10
LEA R9,[RBP + -0x58]
XOR R10D,R10D
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],0x0
MOV AL,0x0
CALL 0x00124f60
MOV qword ptr [RBP + -0x48],RAX
CMP RAX,0x0
JNZ 0x0011e76a
JMP 0x0011e7f4
LAB_0011e76a:
MOV RCX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x50]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x68]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x68]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x00113360
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x4f0]
ADD RAX,0x8
MOV ECX,dword ptr [RBP + -0x1c]
SHL RCX,0x4
ADD RAX,RCX
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x48]
CALL 0x00122eb0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x4f0]
ADD RAX,0x8
MOV EDX,dword ptr [RBP + -0x1c]
SHL RDX,0x4
ADD RAX,RDX
MOV qword ptr [RAX],RCX
LAB_0011e7f0:
JMP 0x0011e7f2
LAB_0011e7f2:
JMP 0x0011e85b
LAB_0011e7f4:
JMP 0x0011e7f6
LAB_0011e7f6:
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x90],0x7d8
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x297
LEA RAX,[0x15fee0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x29c],0x0
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x97
LEA RAX,[0x15fef0]
MOV RSI,qword ptr [RAX + 0x40]
MOV EDX,0x1ff
CALL 0x00113210
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x296],0x0
JMP 0x0011e85b
LAB_0011e85b:
ADD RSP,0x180
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x0011e549) */
/* WARNING: Removing unreachable block (ram,0x0011e5bb) */
/* WARNING: Heritage AFTER dead removal. Example location: s0xfffffffffffffee8 : 0x0011e56d */
/* WARNING: Restarted to delay deadcode elimination for space: stack */
void ma_save_session_track_info
(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
long param_9,int param_10,int8 param_11,int8 param_12,int8 param_13
,int8 param_14)
{
int8 *puVar1;
char in_AL;
int8 uVar2;
long *local_170;
int1 local_128 [16];
int8 local_118;
int8 *local_110;
int8 local_108;
int8 local_100;
int8 local_f8;
int8 local_e8;
int8 local_d8;
int8 local_c8;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 *local_70;
int8 *local_68;
int8 local_60;
int8 *local_58;
long local_50;
uint local_48;
int4 local_44;
long *local_40;
int1 *local_38;
uint local_24;
long local_20;
int local_14;
long local_10;
if (in_AL != '\0') {
local_f8 = param_1;
local_e8 = param_2;
local_d8 = param_3;
local_c8 = param_4;
local_b8 = param_5;
local_a8 = param_6;
local_98 = param_7;
local_88 = param_8;
}
if (param_10 == 1) {
local_38 = local_128;
local_40 = (long *)&stack0x00000008;
local_44 = 0x30;
local_24 = (uint)local_118;
if ((uint)local_118 < 6) {
local_48 = 0x20;
local_68 = local_110;
puVar1 = local_110 + 1;
local_118 = param_11;
local_110 = (int8 *)param_12;
local_108 = param_13;
local_100 = param_14;
local_20 = param_9;
local_14 = param_10;
local_10 = param_9;
local_50 = ma_multi_malloc(0,&local_50,0x18,&local_58,0x10,&local_60,*puVar1,0);
if (local_50 != 0) {
*local_58 = local_60;
memcpy((void *)*local_58,(void *)*local_68,local_68[1]);
local_58[1] = local_68[1];
*(int8 **)(local_50 + 0x10) = local_58;
uVar2 = list_add(*(int8 *)(*(long *)(local_20 + 0x4f0) + 8 + (ulong)local_24 * 0x10),
local_50);
*(int8 *)(*(long *)(local_20 + 0x4f0) + 8 + (ulong)local_24 * 0x10) = uVar2;
if (local_24 != 0) {
return;
}
if (local_48 < 0x29) {
local_170 = (long *)(local_38 + (int)local_48);
local_48 = local_48 + 8;
}
else {
local_170 = local_40;
local_40 = local_40 + 1;
}
local_70 = (int8 *)*local_170;
local_50 = ma_multi_malloc(0,&local_50,0x18,&local_58,0x10,&local_60,local_70[1],0);
if (local_50 != 0) {
*local_58 = local_60;
memcpy((void *)*local_58,(void *)*local_70,local_70[1]);
local_58[1] = local_70[1];
*(int8 **)(local_50 + 0x10) = local_58;
uVar2 = list_add(*(int8 *)(*(long *)(local_20 + 0x4f0) + 8 + (ulong)local_24 * 0x10)
,local_50);
*(int8 *)(*(long *)(local_20 + 0x4f0) + 8 + (ulong)local_24 * 0x10) = uVar2;
return;
}
}
local_50 = 0;
*(int4 *)(local_20 + 0x90) = 0x7d8;
strncpy((char *)(local_20 + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)(local_20 + 0x29c) = 0;
strncpy((char *)(local_20 + 0x97),PTR_s_Client_run_out_of_memory_0015ff30,0x1ff);
*(int1 *)(local_20 + 0x296) = 0;
}
}
return;
}
| |
26,569 | OpenSubdiv::v3_6_0::Far::PatchTableBuilder::allocateVertexTables() | NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTableFactory.cpp | void
PatchTableBuilder::allocateVertexTables() {
int ncvs = 0, npatches = 0;
for (int i=0; i<_table->GetNumPatchArrays(); ++i) {
npatches += _table->GetNumPatches(i);
ncvs += _table->GetNumControlVertices(i);
}
if (ncvs==0 || npatches==0)
return;
_table->_patchVerts.resize( ncvs );
_table->_paramTable.resize( npatches );
if (_requiresVaryingPatches && !_buildUniformLinear) {
_table->allocateVaryingVertices(
PatchDescriptor(_patchBuilder->GetLinearPatchType()), npatches);
}
if (_requiresSharpnessArray) {
_table->_sharpnessIndices.resize( npatches, Vtr::INDEX_INVALID );
}
} | O3 | cpp | OpenSubdiv::v3_6_0::Far::PatchTableBuilder::allocateVertexTables():
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
callq 0x3a030
testl %eax, %eax
jle 0x6d946
xorl %r14d, %r14d
xorl %ebp, %ebp
xorl %r15d, %r15d
movq 0x30(%rbx), %rdi
movl %r14d, %esi
callq 0x386d0
addl %eax, %ebp
movq 0x30(%rbx), %rdi
movl %r14d, %esi
callq 0x3a830
addl %eax, %r15d
incl %r14d
movq 0x30(%rbx), %rdi
callq 0x3a030
cmpl %eax, %r14d
jl 0x6d8a1
testl %r15d, %r15d
sete %al
testl %ebp, %ebp
sete %cl
orb %al, %cl
jne 0x6d946
movq 0x30(%rbx), %rdi
addq $0x20, %rdi
movslq %r15d, %rsi
callq 0x39670
movq 0x30(%rbx), %rdi
addq $0x38, %rdi
movslq %ebp, %r14
movq %r14, %rsi
callq 0x397b0
movb 0x28(%rbx), %al
movl %eax, %ecx
andb $-0x60, %cl
cmpb $0x20, %cl
jne 0x6d92a
movq 0x30(%rbx), %rdi
movq 0x38(%rbx), %rax
movl 0x34(%rax), %eax
leaq 0x4(%rsp), %rsi
movl %eax, (%rsi)
movl %ebp, %edx
callq 0x38a10
movb 0x28(%rbx), %al
testb $0x8, %al
je 0x6d946
movl $0xe0, %edi
addq 0x30(%rbx), %rdi
leaq 0x4ece2(%rip), %rdx # 0xbc620
movq %r14, %rsi
callq 0x38f80
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN10OpenSubdiv6v3_6_03Far17PatchTableBuilder20allocateVertexTablesEv:
push rbp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov rdi, [rdi+30h]; this
call __ZNK10OpenSubdiv6v3_6_03Far10PatchTable17GetNumPatchArraysEv; OpenSubdiv::v3_6_0::Far::PatchTable::GetNumPatchArrays(void)
test eax, eax
jle loc_6D946
xor r14d, r14d
xor ebp, ebp
xor r15d, r15d
loc_6D8A1:
mov rdi, [rbx+30h]; this
mov esi, r14d; int
call __ZNK10OpenSubdiv6v3_6_03Far10PatchTable13GetNumPatchesEi; OpenSubdiv::v3_6_0::Far::PatchTable::GetNumPatches(int)
add ebp, eax
mov rdi, [rbx+30h]; this
mov esi, r14d; int
call __ZNK10OpenSubdiv6v3_6_03Far10PatchTable21GetNumControlVerticesEi; OpenSubdiv::v3_6_0::Far::PatchTable::GetNumControlVertices(int)
add r15d, eax
inc r14d
mov rdi, [rbx+30h]; this
call __ZNK10OpenSubdiv6v3_6_03Far10PatchTable17GetNumPatchArraysEv; OpenSubdiv::v3_6_0::Far::PatchTable::GetNumPatchArrays(void)
cmp r14d, eax
jl short loc_6D8A1
test r15d, r15d
setz al
test ebp, ebp
setz cl
or cl, al
jnz short loc_6D946
mov rdi, [rbx+30h]
add rdi, 20h ; ' '
movsxd rsi, r15d
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
mov rdi, [rbx+30h]
add rdi, 38h ; '8'
movsxd r14, ebp
mov rsi, r14
call __ZNSt6vectorIN10OpenSubdiv6v3_6_03Far10PatchParamESaIS3_EE6resizeEm; std::vector<OpenSubdiv::v3_6_0::Far::PatchParam>::resize(ulong)
mov al, [rbx+28h]
mov ecx, eax
and cl, 0A0h
cmp cl, 20h ; ' '
jnz short loc_6D92A
mov rdi, [rbx+30h]
mov rax, [rbx+38h]
mov eax, [rax+34h]
lea rsi, [rsp+28h+var_24]
mov [rsi], eax
mov edx, ebp
call __ZN10OpenSubdiv6v3_6_03Far10PatchTable23allocateVaryingVerticesENS1_15PatchDescriptorEi; OpenSubdiv::v3_6_0::Far::PatchTable::allocateVaryingVertices(OpenSubdiv::v3_6_0::Far::PatchDescriptor,int)
mov al, [rbx+28h]
loc_6D92A:
test al, 8
jz short loc_6D946
mov edi, 0E0h
add rdi, [rbx+30h]
lea rdx, _ZN10OpenSubdiv6v3_6_03VtrL13INDEX_INVALIDE; OpenSubdiv::v3_6_0::Vtr::INDEX_INVALID
mov rsi, r14
call __ZNSt6vectorIiSaIiEE6resizeEmRKi; std::vector<int>::resize(ulong,int const&)
loc_6D946:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| char OpenSubdiv::v3_6_0::Far::PatchTableBuilder::allocateVertexTables(
OpenSubdiv::v3_6_0::Far::PatchTable **this)
{
long long v1; // rax
int NumPatchArrays; // eax
int v4; // r14d
unsigned int v5; // ebp
int v6; // r15d
OpenSubdiv::v3_6_0::Far::PatchTable *v7; // rdi
_DWORD v9[9]; // [rsp+0h] [rbp-24h] BYREF
v9[0] = HIDWORD(v1);
NumPatchArrays = OpenSubdiv::v3_6_0::Far::PatchTable::GetNumPatchArrays(this[6]);
if ( NumPatchArrays > 0 )
{
v4 = 0;
v5 = 0;
v6 = 0;
do
{
v5 += OpenSubdiv::v3_6_0::Far::PatchTable::GetNumPatches(this[6], v4);
v6 += OpenSubdiv::v3_6_0::Far::PatchTable::GetNumControlVertices(this[6], v4++);
}
while ( v4 < (int)OpenSubdiv::v3_6_0::Far::PatchTable::GetNumPatchArrays(this[6]) );
LOBYTE(NumPatchArrays) = v6 == 0;
if ( v6 != 0 && v5 != 0 )
{
std::vector<int>::resize((char *)this[6] + 32, v6);
std::vector<OpenSubdiv::v3_6_0::Far::PatchParam>::resize((char *)this[6] + 56, (int)v5);
LOBYTE(NumPatchArrays) = *((_BYTE *)this + 40);
if ( (NumPatchArrays & 0xA0) == 0x20 )
{
v7 = this[6];
v9[0] = *((_DWORD *)this[7] + 13);
OpenSubdiv::v3_6_0::Far::PatchTable::allocateVaryingVertices(v7, v9, v5);
LOBYTE(NumPatchArrays) = *((_BYTE *)this + 40);
}
if ( (NumPatchArrays & 8) != 0 )
LOBYTE(NumPatchArrays) = std::vector<int>::resize(
(char *)this[6] + 224,
(int)v5,
&OpenSubdiv::v3_6_0::Vtr::INDEX_INVALID);
}
}
return NumPatchArrays;
}
| allocateVertexTables:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x30]
CALL 0x0013a030
TEST EAX,EAX
JLE 0x0016d946
XOR R14D,R14D
XOR EBP,EBP
XOR R15D,R15D
LAB_0016d8a1:
MOV RDI,qword ptr [RBX + 0x30]
MOV ESI,R14D
CALL 0x001386d0
ADD EBP,EAX
MOV RDI,qword ptr [RBX + 0x30]
MOV ESI,R14D
CALL 0x0013a830
ADD R15D,EAX
INC R14D
MOV RDI,qword ptr [RBX + 0x30]
CALL 0x0013a030
CMP R14D,EAX
JL 0x0016d8a1
TEST R15D,R15D
SETZ AL
TEST EBP,EBP
SETZ CL
OR CL,AL
JNZ 0x0016d946
MOV RDI,qword ptr [RBX + 0x30]
ADD RDI,0x20
MOVSXD RSI,R15D
CALL 0x00139670
MOV RDI,qword ptr [RBX + 0x30]
ADD RDI,0x38
MOVSXD R14,EBP
MOV RSI,R14
CALL 0x001397b0
MOV AL,byte ptr [RBX + 0x28]
MOV ECX,EAX
AND CL,0xa0
CMP CL,0x20
JNZ 0x0016d92a
MOV RDI,qword ptr [RBX + 0x30]
MOV RAX,qword ptr [RBX + 0x38]
MOV EAX,dword ptr [RAX + 0x34]
LEA RSI,[RSP + 0x4]
MOV dword ptr [RSI],EAX
MOV EDX,EBP
CALL 0x00138a10
MOV AL,byte ptr [RBX + 0x28]
LAB_0016d92a:
TEST AL,0x8
JZ 0x0016d946
MOV EDI,0xe0
ADD RDI,qword ptr [RBX + 0x30]
LEA RDX,[0x1bc620]
MOV RSI,R14
CALL 0x00138f80
LAB_0016d946:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Far::PatchTableBuilder::allocateVertexTables() */
void __thiscall
OpenSubdiv::v3_6_0::Far::PatchTableBuilder::allocateVertexTables(PatchTableBuilder *this)
{
PatchTableBuilder PVar1;
int iVar2;
int iVar3;
int8 in_RAX;
int iVar4;
int iVar5;
int8 uStack_28;
uStack_28 = in_RAX;
iVar2 = PatchTable::GetNumPatchArrays(*(PatchTable **)(this + 0x30));
if (0 < iVar2) {
iVar4 = 0;
iVar2 = 0;
iVar5 = 0;
do {
iVar3 = PatchTable::GetNumPatches(*(PatchTable **)(this + 0x30),iVar4);
iVar2 = iVar2 + iVar3;
iVar3 = PatchTable::GetNumControlVertices(*(PatchTable **)(this + 0x30),iVar4);
iVar5 = iVar5 + iVar3;
iVar4 = iVar4 + 1;
iVar3 = PatchTable::GetNumPatchArrays(*(PatchTable **)(this + 0x30));
} while (iVar4 < iVar3);
if (iVar2 != 0 && iVar5 != 0) {
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)(*(long *)(this + 0x30) + 0x20),(long)iVar5);
std::
vector<OpenSubdiv::v3_6_0::Far::PatchParam,std::allocator<OpenSubdiv::v3_6_0::Far::PatchParam>>
::resize((vector<OpenSubdiv::v3_6_0::Far::PatchParam,std::allocator<OpenSubdiv::v3_6_0::Far::PatchParam>>
*)(*(long *)(this + 0x30) + 0x38),(long)iVar2);
PVar1 = this[0x28];
if (((byte)PVar1 & 0xa0) == 0x20) {
uStack_28 = CONCAT44(*(int4 *)(*(long *)(this + 0x38) + 0x34),(int4)uStack_28);
PatchTable::allocateVaryingVertices
(*(PatchTable **)(this + 0x30),(long)&uStack_28 + 4,iVar2);
PVar1 = this[0x28];
}
if (((byte)PVar1 & 8) != 0) {
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)(*(long *)(this + 0x30) + 0xe0),(long)iVar2,
&Vtr::INDEX_INVALID);
}
}
}
return;
}
| |
26,570 | my_strdup | eloqsql/mysys/my_malloc.c | char *my_strdup(PSI_memory_key key, const char *from, myf my_flags)
{
char *ptr;
size_t length= strlen(from)+1;
DBUG_ENTER("my_strdup");
if ((ptr= (char*) my_malloc(key, length, my_flags)))
memcpy(ptr, from, length);
DBUG_RETURN(ptr);
} | O0 | c | my_strdup:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x273b0
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movl -0x4(%rbp), %edi
movq -0x28(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xbe600
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0xbeacf
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x270d0
jmp 0xbead1
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_strdup:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rdi, [rbp+var_10]
call _strlen
add rax, 1
mov [rbp+var_28], rax
mov edi, [rbp+var_4]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_18]
call my_malloc
mov [rbp+var_20], rax
cmp rax, 0
jz short loc_BEACF
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_28]
call _memcpy
loc_BEACF:
jmp short $+2
loc_BEAD1:
mov rax, [rbp+var_20]
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
add rsp, 30h
pop rbp
retn
| long long my_strdup(unsigned int a1, long long a2, int a3)
{
const char *v4; // [rsp+8h] [rbp-28h]
long long v5; // [rsp+10h] [rbp-20h]
v4 = (const char *)(strlen(a2) + 1);
v5 = my_malloc(a1, v4, a3);
if ( v5 )
memcpy(v5, a2, v4);
return v5;
}
| my_strdup:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001273b0
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x001be600
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JZ 0x001beacf
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x001270d0
LAB_001beacf:
JMP 0x001bead1
LAB_001bead1:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RSP,0x30
POP RBP
RET
|
void * my_strdup(int4 param_1,char *param_2,int8 param_3)
{
size_t sVar1;
void *__dest;
sVar1 = strlen(param_2);
__dest = (void *)my_malloc(param_1,sVar1 + 1,param_3);
if (__dest != (void *)0x0) {
memcpy(__dest,param_2,sVar1 + 1);
}
return __dest;
}
| |
26,571 | void nlohmann::json_abi_v3_11_3::detail::from_json<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>, int, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, int&) | monkey531[P]llama/common/json.hpp | inline void from_json(const BasicJsonType& j, ArithmeticType& val)
{
switch (static_cast<value_t>(j))
{
case value_t::number_unsigned:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>());
break;
}
case value_t::number_integer:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>());
break;
}
case value_t::number_float:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>());
break;
}
case value_t::boolean:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::boolean_t*>());
break;
}
case value_t::null:
case value_t::object:
case value_t::array:
case value_t::string:
case value_t::binary:
case value_t::discarded:
default:
JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j));
}
} | O3 | cpp | void nlohmann::json_abi_v3_11_3::detail::from_json<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>, int, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, int&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
movzbl (%rdi), %eax
addl $-0x4, %eax
cmpl $0x3, %eax
ja 0x9115f
leaq 0x5f66c(%rip), %rcx # 0xf07a4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x8(%r14), %eax
jmp 0x91154
movzbl 0x8(%r14), %eax
jmp 0x91154
cvttsd2si 0x8(%r14), %eax
movl %eax, (%rsi)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x1b440
movq %rax, %rbx
movq %r14, %rdi
callq 0x5f5fc
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x6095d(%rip), %rsi # 0xf1ae0
leaq 0x10(%rsp), %rdi
callq 0x86fb9
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x86dea
xorl %ebp, %ebp
leaq 0x9ad8a(%rip), %rsi # 0x12bf38
leaq -0x35983(%rip), %rdx # 0x5b832
movq %rbx, %rdi
callq 0x1bf00
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x911db
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1b8c0
testb %bpl, %bpl
jne 0x911e5
jmp 0x911ed
movq %rax, %r14
movq %rbx, %rdi
callq 0x1b660
movq %r14, %rdi
callq 0x1bf90
nop
| _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
movzx eax, byte ptr [rdi]
add eax, 0FFFFFFFCh; switch 4 cases
cmp eax, 3
ja short def_9113F; jumptable 000000000009113F default case
lea rcx, jpt_9113F
movsxd rax, ds:(jpt_9113F - 0F07A4h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_91141:
mov eax, [r14+8]; jumptable 000000000009113F cases 5,6
jmp short loc_91154
loc_91147:
movzx eax, byte ptr [r14+8]; jumptable 000000000009113F case 4
jmp short loc_91154
loc_9114E:
cvttsd2si eax, qword ptr [r14+8]; jumptable 000000000009113F case 7
loc_91154:
mov [rsi], eax
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
def_9113F:
mov edi, 20h ; ' '; jumptable 000000000009113F default case
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aTypeMustBeNumb; "type must be number, but is "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Eh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_911DB
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_911DB:
test bpl, bpl
jnz short loc_911E5
jmp short loc_911ED
mov r14, rax
loc_911E5:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_911ED:
mov rdi, r14
call __Unwind_Resume
| long long ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
unsigned __int8 *a1,
_DWORD *a2)
{
long long result; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
const char *v4; // [rsp+8h] [rbp-40h] BYREF
_QWORD v5[2]; // [rsp+10h] [rbp-38h] BYREF
switch ( *a1 )
{
case 4u:
result = a1[8];
break;
case 5u:
case 6u:
result = *((unsigned int *)a1 + 2);
break;
case 7u:
result = (unsigned int)(int)*((double *)a1 + 1);
break;
default:
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v4 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v5,
(long long)"type must be number, but is ",
&v4);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
302,
v5);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
*a2 = result;
return result;
}
| _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
ADD EAX,-0x4
CMP EAX,0x3
JA 0x0019115f
LEA RCX,[0x1f07a4]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_5:
MOV EAX,dword ptr [R14 + 0x8]
JMP 0x00191154
caseD_4:
MOVZX EAX,byte ptr [R14 + 0x8]
JMP 0x00191154
caseD_7:
CVTTSD2SI EAX,qword ptr [R14 + 0x8]
LAB_00191154:
MOV dword ptr [RSI],EAX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
default:
MOV EDI,0x20
CALL 0x0011b440
MOV RBX,RAX
MOV RDI,R14
CALL 0x0015f5fc
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_0019117c:
LEA RSI,[0x1f1ae0]
LEA RDI,[RSP + 0x10]
CALL 0x00186fb9
MOV BPL,0x1
LAB_00191190:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x00186dea
XOR EBP,EBP
LEA RSI,[0x22bf38]
LEA RDX,[0x15b832]
MOV RDI,RBX
CALL 0x0011bf00
|
void _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,uint *param_2)
{
uint uVar1;
int8 uVar2;
char *local_40;
detail local_38 [32];
switch(*param_1) {
case (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>
)0x4:
uVar1 = (uint)(byte)param_1[8];
break;
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x5:
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x6:
uVar1 = *(uint *)(param_1 + 8);
break;
case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x7:
uVar1 = (uint)*(double *)(param_1 + 8);
break;
default:
uVar2 = __cxa_allocate_exception(0x20);
local_40 = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 0019117c to 0019118c has its CatchHandler @ 001911e2 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"type must be number, but is ",&local_40);
/* try { // try from 00191190 to 001911bc has its CatchHandler @ 001911bd */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar2,0x12e,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
*param_2 = uVar1;
return;
}
| |
26,572 | ps_fetch_int16 | eloqsql/libmariadb/libmariadb/ma_stmt_codec.c | static
void ps_fetch_int16(MYSQL_BIND *r_param, const MYSQL_FIELD * const field,
unsigned char **row)
{
switch (r_param->buffer_type) {
case MYSQL_TYPE_YEAR:
case MYSQL_TYPE_SHORT:
ps_fetch_from_1_to_8_bytes(r_param, field, row, 2);
break;
default:
{
short sval= sint2korr(*row);
longlong lval= field->flags & UNSIGNED_FLAG ? (longlong)(ushort) sval : (longlong)sval;
convert_from_long(r_param, field, lval, field->flags & UNSIGNED_FLAG);
(*row) += 2;
}
break;
}
} | O3 | c | ps_fetch_int16:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl 0x60(%rdi), %eax
cmpl $0xd, %eax
je 0x2433c
cmpl $0x2, %eax
jne 0x2434f
movq %rbx, %rdx
movl $0x2, %ecx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2376c
movq (%rbx), %rax
movzwl (%rax), %eax
movl 0x64(%rsi), %ecx
andl $0x20, %ecx
movswq %ax, %rdx
cmovneq %rax, %rdx
callq 0x24e47
addq $0x2, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| ps_fetch_int16:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdx
mov eax, [rdi+60h]
cmp eax, 0Dh
jz short loc_2433C
cmp eax, 2
jnz short loc_2434F
loc_2433C:
mov rdx, rbx
mov ecx, 2
add rsp, 8
pop rbx
pop rbp
jmp ps_fetch_from_1_to_8_bytes
loc_2434F:
mov rax, [rbx]
movzx eax, word ptr [rax]
mov ecx, [rsi+64h]
and ecx, 20h
movsx rdx, ax
cmovnz rdx, rax
call convert_from_long
add qword ptr [rbx], 2
add rsp, 8
pop rbx
pop rbp
retn
| long long ps_fetch_int16(long long a1, long long a2, _BYTE **a3)
{
int v4; // eax
long long result; // rax
long long v6; // rdx
v4 = *(_DWORD *)(a1 + 96);
if ( v4 == 13 || v4 == 2 )
return ps_fetch_from_1_to_8_bytes(a1, a2, a3, 2u);
v6 = *(__int16 *)*a3;
if ( (*(_DWORD *)(a2 + 100) & 0x20) != 0 )
v6 = *(unsigned __int16 *)*a3;
result = convert_from_long(a1, a2, v6, *(_DWORD *)(a2 + 100) & 0x20);
*a3 += 2;
return result;
}
| ps_fetch_int16:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV EAX,dword ptr [RDI + 0x60]
CMP EAX,0xd
JZ 0x0012433c
CMP EAX,0x2
JNZ 0x0012434f
LAB_0012433c:
MOV RDX,RBX
MOV ECX,0x2
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x0012376c
LAB_0012434f:
MOV RAX,qword ptr [RBX]
MOVZX EAX,word ptr [RAX]
MOV ECX,dword ptr [RSI + 0x64]
AND ECX,0x20
MOVSX RDX,AX
CMOVNZ RDX,RAX
CALL 0x00124e47
ADD qword ptr [RBX],0x2
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void ps_fetch_int16(long param_1,long param_2,long *param_3)
{
ulong uVar1;
if ((*(int *)(param_1 + 0x60) != 0xd) && (*(int *)(param_1 + 0x60) != 2)) {
uVar1 = (long)(short)*(ushort *)*param_3;
if ((*(uint *)(param_2 + 100) & 0x20) != 0) {
uVar1 = (ulong)*(ushort *)*param_3;
}
convert_from_long(param_1,param_2,uVar1);
*param_3 = *param_3 + 2;
return;
}
ps_fetch_from_1_to_8_bytes(param_1,param_2,param_3,2);
return;
}
| |
26,573 | testing::internal::ReadEntireFile[abi:cxx11](_IO_FILE*) | AlayaLite/build_O3/_deps/googletest-src/googletest/src/gtest-port.cc | std::string ReadEntireFile(FILE* file) {
const size_t file_size = GetFileSize(file);
char* const buffer = new char[file_size];
size_t bytes_last_read = 0; // # of bytes read in the last fread()
size_t bytes_read = 0; // # of bytes read so far
fseek(file, 0, SEEK_SET);
// Keeps reading the file until we cannot read further or the
// pre-determined file size is reached.
do {
bytes_last_read =
fread(buffer + bytes_read, 1, file_size - bytes_read, file);
bytes_read += bytes_last_read;
} while (bytes_last_read > 0 && bytes_read < file_size);
const std::string content(buffer, bytes_read);
delete[] buffer;
return content;
} | O3 | cpp | testing::internal::ReadEntireFile[abi:cxx11](_IO_FILE*):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
xorl %r13d, %r13d
movq %rsi, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x11df0
movq %r14, %rdi
callq 0x11310
movq %rax, %r12
movq %rax, %rdi
callq 0x11580
movq %rax, %r15
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x11df0
leaq (%r15,%r13), %rdi
movq %r12, %rdx
subq %r13, %rdx
movl $0x1, %esi
movq %r14, %rcx
callq 0x11660
addq %rax, %r13
testq %rax, %rax
je 0x5867f
cmpq %r12, %r13
jb 0x5865b
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq %r15, %rdx
addq %r13, %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x19014
movq %r15, %rdi
callq 0x11460
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| _ZN7testing8internal14ReadEntireFileB5cxx11EP8_IO_FILE:
push r15
push r14
push r13
push r12
push rbx
mov r14, rsi
mov rbx, rdi
xor r13d, r13d
mov rdi, rsi
xor esi, esi
mov edx, 2
call _fseek
mov rdi, r14
call _ftell
mov r12, rax
mov rdi, rax; unsigned __int64
call __Znam; operator new[](ulong)
mov r15, rax
mov rdi, r14
xor esi, esi
xor edx, edx
call _fseek
loc_5865B:
lea rdi, [r15+r13]
mov rdx, r12
sub rdx, r13
mov esi, 1
mov rcx, r14
call _fread
add r13, rax
test rax, rax
jz short loc_5867F
cmp r13, r12
jb short loc_5865B
loc_5867F:
lea rax, [rbx+10h]
mov [rbx], rax
mov rdx, r15
add rdx, r13
mov rdi, rbx
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rdi, r15; void *
call __ZdaPv; operator delete[](void *)
mov rax, rbx
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| _QWORD * testing::internal::ReadEntireFile[abi:cxx11](_QWORD *a1, long long a2)
{
unsigned long long v2; // r13
unsigned long long v3; // r12
_BYTE *v4; // r15
long long v5; // rax
v2 = 0LL;
fseek(a2, 0LL, 2LL);
v3 = ftell(a2);
v4 = (_BYTE *)operator new[](v3);
fseek(a2, 0LL, 0LL);
do
{
v5 = fread(&v4[v2], 1LL, v3 - v2, a2);
v2 += v5;
}
while ( v5 && v2 < v3 );
*a1 = a1 + 2;
std::string::_M_construct<char const*>(a1, v4, (long long)&v4[v2]);
operator delete[](v4);
return a1;
}
| ReadEntireFile[abi:cxx11]:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R14,RSI
MOV RBX,RDI
XOR R13D,R13D
MOV RDI,RSI
XOR ESI,ESI
MOV EDX,0x2
CALL 0x00111df0
MOV RDI,R14
CALL 0x00111310
MOV R12,RAX
MOV RDI,RAX
CALL 0x00111580
MOV R15,RAX
MOV RDI,R14
XOR ESI,ESI
XOR EDX,EDX
CALL 0x00111df0
LAB_0015865b:
LEA RDI,[R15 + R13*0x1]
MOV RDX,R12
SUB RDX,R13
MOV ESI,0x1
MOV RCX,R14
CALL 0x00111660
ADD R13,RAX
TEST RAX,RAX
JZ 0x0015867f
CMP R13,R12
JC 0x0015865b
LAB_0015867f:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
MOV RDX,R15
ADD RDX,R13
MOV RDI,RBX
MOV RSI,R15
CALL 0x00119014
MOV RDI,R15
CALL 0x00111460
MOV RAX,RBX
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* testing::internal::ReadEntireFile[abi:cxx11](_IO_FILE*) */
internal * __thiscall testing::internal::ReadEntireFile_abi_cxx11_(internal *this,_IO_FILE *param_1)
{
ulong uVar1;
void *pvVar2;
size_t sVar3;
ulong uVar4;
uVar4 = 0;
fseek(param_1,0,2);
uVar1 = ftell(param_1);
pvVar2 = operator_new__(uVar1);
fseek(param_1,0,0);
do {
sVar3 = fread((void *)((long)pvVar2 + uVar4),1,uVar1 - uVar4,param_1);
uVar4 = uVar4 + sVar3;
if (sVar3 == 0) break;
} while (uVar4 < uVar1);
*(internal **)this = this + 0x10;
std::__cxx11::string::_M_construct<char_const*>(this,pvVar2,(long)pvVar2 + uVar4);
operator_delete__(pvVar2);
return this;
}
| |
26,574 | my_wildcmp_8bit_impl | eloqsql/strings/ctype-simple.c | static
int my_wildcmp_8bit_impl(CHARSET_INFO *cs,
const char *str,const char *str_end,
const char *wildstr,const char *wildend,
int escape, int w_one, int w_many, int recurse_level)
{
int result= -1; /* Not found, using wildcards */
if (my_string_stack_guard && my_string_stack_guard(recurse_level))
return 1;
while (wildstr != wildend)
{
while (*wildstr != w_many && *wildstr != w_one)
{
if (*wildstr == escape && wildstr+1 != wildend)
wildstr++;
if (str == str_end || likeconv(cs,*wildstr++) != likeconv(cs,*str++))
return(1); /* No match */
if (wildstr == wildend)
return(str != str_end); /* Match if both are at end */
result=1; /* Found an anchor char */
}
if (*wildstr == w_one)
{
do
{
if (str == str_end) /* Skip one char if possible */
return(result);
INC_PTR(cs,str,str_end);
} while (++wildstr < wildend && *wildstr == w_one);
if (wildstr == wildend)
break;
}
if (*wildstr == w_many)
{ /* Found w_many */
uchar cmp;
wildstr++;
/* Remove any '%' and '_' from the wild search string */
for (; wildstr != wildend ; wildstr++)
{
if (*wildstr == w_many)
continue;
if (*wildstr == w_one)
{
if (str == str_end)
return(-1);
INC_PTR(cs,str,str_end);
continue;
}
break; /* Not a wild character */
}
if (wildstr == wildend)
return(0); /* Ok if w_many is last */
if (str == str_end)
return(-1);
if ((cmp= *wildstr) == escape && wildstr+1 != wildend)
cmp= *++wildstr;
INC_PTR(cs,wildstr,wildend); /* This is compared trough cmp */
cmp=likeconv(cs,cmp);
do
{
/*
Find the next character in the subject string equal to 'cmp', then
check recursively my_wildcmp_8bit_impl() for the pattern remainder.
*/
while (str != str_end && (uchar) likeconv(cs,*str) != cmp)
str++;
if (str++ == str_end)
return(-1); /* 'cmp' was not found in the subject string */
{
int tmp=my_wildcmp_8bit_impl(cs,str,str_end,
wildstr,wildend,escape,w_one,
w_many, recurse_level+1);
if (tmp <= 0)
return(tmp);
}
/*
The recursion call did not match. But it returned 1, which means
the pattern remainder has some non-special characters.
Continue, there is a chance that we'll find another 'cmp'
at a different position in the subject string.
*/
} while (str != str_end);
return(-1);
}
}
return(str != str_end ? 1 : 0);
} | O3 | c | my_wildcmp_8bit_impl:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r12
movq %rcx, %r13
movq %rdx, %rbx
movq %rsi, %r14
movl 0x20(%rbp), %r10d
leaq 0xb560f9(%rip), %rax # 0xc16948
movq (%rax), %rax
testq %rax, %rax
je 0xc0882
movq %rbx, -0x30(%rbp)
movq %rdi, %rbx
movl %r10d, %edi
movl %r9d, %r15d
callq *%rax
movl 0x20(%rbp), %r10d
movq %rbx, %rdi
movq -0x30(%rbp), %rbx
movl %r15d, %r9d
movl $0x1, %r15d
testl %eax, %eax
jne 0xc09a8
movl 0x18(%rbp), %r11d
movl 0x10(%rbp), %r8d
movl $0xffffffff, %r15d # imm = 0xFFFFFFFF
cmpq %r12, %r13
je 0xc099e
movb (%r13), %al
movsbl %al, %ecx
cmpl %r11d, %ecx
sete %sil
cmpl %r8d, %ecx
sete %dl
orb %dl, %sil
je 0xc08ff
testb %dl, %dl
je 0xc08f5
incq %r13
movq %r13, %rax
cmpq %rbx, %r14
je 0xc09a8
movq %r14, %rcx
movq %rax, %r13
cmpq %r12, %rax
jae 0xc08e2
leaq 0x1(%rcx), %r14
movsbl (%r13), %edx
leaq 0x1(%r13), %rax
cmpl %r8d, %edx
je 0xc08bc
incq %rcx
cmpq %r12, %r13
je 0xc099b
movb (%r13), %al
movq %rcx, %r14
movsbl %al, %eax
cmpl %r11d, %eax
jne 0xc0890
jmp 0xc0960
movl $0x1, %r15d
cmpq %rbx, %r14
je 0xc09a8
leaq 0x1(%r13), %rax
cmpq %r12, %rax
cmoveq %r13, %rax
cmpl %r9d, %ecx
cmoveq %rax, %r13
movq 0x58(%rdi), %rax
movzbl (%r13), %ecx
movb (%rax,%rcx), %cl
movzbl (%r14), %edx
cmpb (%rax,%rdx), %cl
jne 0xc09a8
incq %r14
incq %r13
cmpq %r12, %r13
je 0xc099e
movb (%r13), %al
movsbl %al, %ecx
cmpl %r8d, %ecx
sete %dl
cmpl %r11d, %ecx
je 0xc08b2
cmpl %r8d, %ecx
jne 0xc08ff
jmp 0xc08b2
leaq 0x1(%r13), %rax
xorl %r15d, %r15d
cmpq %r12, %rax
je 0xc09a8
addq $0x2, %r13
movb -0x1(%r13), %al
movsbl %al, %ecx
cmpl %r11d, %ecx
je 0xc098d
cmpl %r8d, %ecx
jne 0xc09ba
cmpq %rbx, %r14
je 0xc0a65
incq %r14
leaq 0x1(%r13), %rax
cmpq %r12, %r13
movq %rax, %r13
jne 0xc0970
jmp 0xc09a8
movq %rcx, %r14
xorl %r15d, %r15d
cmpq %rbx, %r14
setne %r15b
movl %r15d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %r15d # imm = 0xFFFFFFFF
cmpq %rbx, %r14
je 0xc09a8
movzbl %al, %ecx
leaq -0x1(%r13), %rdx
cmpl %r9d, %ecx
jne 0xc09dd
cmpq %r12, %r13
je 0xc09dd
movb (%r13), %al
movq %r13, %rdx
incq %rdx
movq 0x58(%rdi), %rcx
movzbl %al, %eax
movb (%rcx,%rax), %r13b
incl %r10d
cmpq %rbx, %r14
je 0xc09a8
movq 0x58(%rdi), %rax
movzbl (%r14), %ecx
cmpb %r13b, (%rax,%rcx)
je 0xc0a0b
incq %r14
cmpq %rbx, %r14
jne 0xc09f7
jmp 0xc09a8
incq %r14
subq $0x8, %rsp
movq %rdi, -0x48(%rbp)
movq %r14, %rsi
movq %rdx, %rcx
movq %rbx, %rdx
movq %rcx, -0x38(%rbp)
movq %r8, %rax
movq %r12, %r8
movl %r9d, -0x30(%rbp)
movq %r10, -0x40(%rbp)
pushq %r10
pushq %r11
pushq %rax
callq 0xc0827
addq $0x20, %rsp
testl %eax, %eax
jle 0xc0a70
cmpq %rbx, %r14
movl -0x30(%rbp), %r9d
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %r10
movl 0x18(%rbp), %r11d
movl 0x10(%rbp), %r8d
movq -0x38(%rbp), %rdx
jne 0xc09ee
jmp 0xc09a8
movl $0xffffffff, %r15d # imm = 0xFFFFFFFF
jmp 0xc09a8
movl %eax, %r15d
jmp 0xc09a8
| my_wildcmp_8bit_impl:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r12, r8
mov r13, rcx
mov rbx, rdx
mov r14, rsi
mov r10d, [rbp+arg_10]
lea rax, my_string_stack_guard
mov rax, [rax]
test rax, rax
jz short loc_C0882
mov [rbp+var_30], rbx
mov rbx, rdi
mov edi, r10d
mov r15d, r9d
call rax
mov r10d, [rbp+arg_10]
mov rdi, rbx
mov rbx, [rbp+var_30]
mov r9d, r15d
mov r15d, 1
test eax, eax
jnz loc_C09A8
loc_C0882:
mov r11d, [rbp+arg_8]
mov r8d, [rbp+arg_0]
mov r15d, 0FFFFFFFFh
loc_C0890:
cmp r13, r12
jz loc_C099E
mov al, [r13+0]
movsx ecx, al
cmp ecx, r11d
setz sil
cmp ecx, r8d
setz dl
or sil, dl
jz short loc_C08FF
loc_C08B2:
test dl, dl
jz short loc_C08F5
inc r13
mov rax, r13
loc_C08BC:
cmp r14, rbx
jz loc_C09A8
mov rcx, r14
mov r13, rax
cmp rax, r12
jnb short loc_C08E2
lea r14, [rcx+1]
movsx edx, byte ptr [r13+0]
lea rax, [r13+1]
cmp edx, r8d
jz short loc_C08BC
loc_C08E2:
inc rcx
cmp r13, r12
jz loc_C099B
mov al, [r13+0]
mov r14, rcx
loc_C08F5:
movsx eax, al
cmp eax, r11d
jnz short loc_C0890
jmp short loc_C0960
loc_C08FF:
mov r15d, 1
cmp r14, rbx
jz loc_C09A8
lea rax, [r13+1]
cmp rax, r12
cmovz rax, r13
cmp ecx, r9d
cmovz r13, rax
mov rax, [rdi+58h]
movzx ecx, byte ptr [r13+0]
mov cl, [rax+rcx]
movzx edx, byte ptr [r14]
cmp cl, [rax+rdx]
jnz short loc_C09A8
inc r14
inc r13
cmp r13, r12
jz short loc_C099E
mov al, [r13+0]
movsx ecx, al
cmp ecx, r8d
setz dl
cmp ecx, r11d
jz loc_C08B2
cmp ecx, r8d
jnz short loc_C08FF
jmp loc_C08B2
loc_C0960:
lea rax, [r13+1]
xor r15d, r15d
cmp rax, r12
jz short loc_C09A8
add r13, 2
loc_C0970:
mov al, [r13-1]
movsx ecx, al
cmp ecx, r11d
jz short loc_C098D
cmp ecx, r8d
jnz short loc_C09BA
cmp r14, rbx
jz loc_C0A65
inc r14
loc_C098D:
lea rax, [r13+1]
cmp r13, r12
mov r13, rax
jnz short loc_C0970
jmp short loc_C09A8
loc_C099B:
mov r14, rcx
loc_C099E:
xor r15d, r15d
cmp r14, rbx
setnz r15b
loc_C09A8:
mov eax, r15d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_C09BA:
mov r15d, 0FFFFFFFFh
cmp r14, rbx
jz short loc_C09A8
movzx ecx, al
lea rdx, [r13-1]
cmp ecx, r9d
jnz short loc_C09DD
cmp r13, r12
jz short loc_C09DD
mov al, [r13+0]
mov rdx, r13
loc_C09DD:
inc rdx
mov rcx, [rdi+58h]
movzx eax, al
mov r13b, [rcx+rax]
inc r10d
loc_C09EE:
cmp r14, rbx
jz short loc_C09A8
mov rax, [rdi+58h]
loc_C09F7:
movzx ecx, byte ptr [r14]
cmp [rax+rcx], r13b
jz short loc_C0A0B
inc r14
cmp r14, rbx
jnz short loc_C09F7
jmp short loc_C09A8
loc_C0A0B:
inc r14
sub rsp, 8
mov [rbp+var_48], rdi
mov rsi, r14
mov rcx, rdx
mov rdx, rbx
mov [rbp+var_38], rcx
mov rax, r8
mov r8, r12
mov dword ptr [rbp+var_30], r9d
mov [rbp+var_40], r10
push r10
push r11
push rax
call my_wildcmp_8bit_impl
add rsp, 20h
test eax, eax
jle short loc_C0A70
cmp r14, rbx
mov r9d, dword ptr [rbp+var_30]
mov rdi, [rbp+var_48]
mov r10, [rbp+var_40]
mov r11d, [rbp+arg_8]
mov r8d, [rbp+arg_0]
mov rdx, [rbp+var_38]
jnz short loc_C09EE
jmp loc_C09A8
loc_C0A65:
mov r15d, 0FFFFFFFFh
jmp loc_C09A8
loc_C0A70:
mov r15d, eax
jmp loc_C09A8
| long long my_wildcmp_8bit_impl(
long long a1,
unsigned __int8 *a2,
unsigned __int8 *a3,
char *a4,
char *a5,
int a6,
int a7,
int a8,
unsigned int a9)
{
unsigned __int8 *v11; // rbx
unsigned int v13; // r10d
int v14; // r15d
int v15; // eax
unsigned int v16; // r15d
int v17; // r11d
int v18; // r8d
signed __int8 v19; // al
int v20; // ecx
bool v21; // dl
char *v22; // rax
unsigned __int8 *v23; // rcx
int v24; // edx
unsigned __int8 *v25; // rcx
char *v26; // rax
char *v27; // r13
unsigned __int8 v28; // al
char *v31; // rdx
_BYTE *v32; // rdx
char v33; // r13
long long v34; // r10
int v35; // eax
long long v36; // [rsp+10h] [rbp-40h]
_BYTE *v37; // [rsp+18h] [rbp-38h]
int v39; // [rsp+20h] [rbp-30h]
v11 = a3;
v13 = a9;
if ( my_string_stack_guard )
{
v14 = a6;
v15 = my_string_stack_guard(a9);
v13 = a9;
v11 = a3;
a6 = v14;
v16 = 1;
if ( v15 )
return v16;
}
v17 = a8;
v18 = a7;
v16 = -1;
do
{
if ( a4 == a5 )
return a2 != v11;
v19 = *a4;
v20 = *a4;
v21 = v20 == a7;
if ( v20 != a7 && v20 != a8 )
{
do
{
v16 = 1;
if ( a2 == v11 )
return v16;
v26 = a4 + 1;
if ( a4 + 1 == a5 )
v26 = a4;
if ( v20 == a6 )
a4 = v26;
if ( *(_BYTE *)(*(_QWORD *)(a1 + 88) + (unsigned __int8)*a4) != *(_BYTE *)(*(_QWORD *)(a1 + 88) + *a2) )
return v16;
++a2;
if ( ++a4 == a5 )
return a2 != v11;
v19 = *a4;
v20 = *a4;
v21 = v20 == a7;
}
while ( v20 != a8 && v20 != a7 );
}
if ( v21 )
{
v22 = a4 + 1;
do
{
if ( a2 == v11 )
return v16;
v23 = a2;
a4 = v22;
if ( v22 >= a5 )
break;
++a2;
v24 = *v22++;
}
while ( v24 == a7 );
v25 = v23 + 1;
if ( a4 == a5 )
{
a2 = v25;
return a2 != v11;
}
v19 = *a4;
a2 = v25;
}
}
while ( v19 != a8 );
v16 = 0;
if ( a4 + 1 == a5 )
return v16;
v27 = a4 + 2;
while ( 1 )
{
v28 = *(v27 - 1);
if ( (char)v28 == a8 )
goto LABEL_31;
if ( (char)v28 != a7 )
break;
if ( a2 == v11 )
return (unsigned int)-1;
++a2;
LABEL_31:
if ( v27++ == a5 )
return v16;
}
v16 = -1;
if ( a2 != v11 )
{
v31 = v27 - 1;
if ( v28 == a6 && v27 != a5 )
{
v28 = *v27;
v31 = v27;
}
v32 = v31 + 1;
v33 = *(_BYTE *)(*(_QWORD *)(a1 + 88) + v28);
v34 = v13 + 1;
while ( a2 != v11 )
{
while ( *(_BYTE *)(*(_QWORD *)(a1 + 88) + *a2) != v33 )
{
if ( ++a2 == v11 )
return v16;
}
++a2;
v37 = v32;
v39 = a6;
v36 = v34;
v35 = my_wildcmp_8bit_impl(a1, (_DWORD)a2, (_DWORD)v11, (_DWORD)v32, (_DWORD)a5, a6, v18, v17, v34);
if ( v35 <= 0 )
return (unsigned int)v35;
a6 = v39;
v34 = v36;
v17 = a8;
v18 = a7;
v32 = v37;
if ( a2 == v11 )
return v16;
}
}
return v16;
}
| my_wildcmp_8bit_impl:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R12,R8
MOV R13,RCX
MOV RBX,RDX
MOV R14,RSI
MOV R10D,dword ptr [RBP + 0x20]
LEA RAX,[0xd16948]
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JZ 0x001c0882
MOV qword ptr [RBP + -0x30],RBX
MOV RBX,RDI
MOV EDI,R10D
MOV R15D,R9D
CALL RAX
MOV R10D,dword ptr [RBP + 0x20]
MOV RDI,RBX
MOV RBX,qword ptr [RBP + -0x30]
MOV R9D,R15D
MOV R15D,0x1
TEST EAX,EAX
JNZ 0x001c09a8
LAB_001c0882:
MOV R11D,dword ptr [RBP + 0x18]
MOV R8D,dword ptr [RBP + 0x10]
MOV R15D,0xffffffff
LAB_001c0890:
CMP R13,R12
JZ 0x001c099e
MOV AL,byte ptr [R13]
MOVSX ECX,AL
CMP ECX,R11D
SETZ SIL
CMP ECX,R8D
SETZ DL
OR SIL,DL
JZ 0x001c08ff
LAB_001c08b2:
TEST DL,DL
JZ 0x001c08f5
INC R13
MOV RAX,R13
LAB_001c08bc:
CMP R14,RBX
JZ 0x001c09a8
MOV RCX,R14
MOV R13,RAX
CMP RAX,R12
JNC 0x001c08e2
LEA R14,[RCX + 0x1]
MOVSX EDX,byte ptr [R13]
LEA RAX,[R13 + 0x1]
CMP EDX,R8D
JZ 0x001c08bc
LAB_001c08e2:
INC RCX
CMP R13,R12
JZ 0x001c099b
MOV AL,byte ptr [R13]
MOV R14,RCX
LAB_001c08f5:
MOVSX EAX,AL
CMP EAX,R11D
JNZ 0x001c0890
JMP 0x001c0960
LAB_001c08ff:
MOV R15D,0x1
CMP R14,RBX
JZ 0x001c09a8
LEA RAX,[R13 + 0x1]
CMP RAX,R12
CMOVZ RAX,R13
CMP ECX,R9D
CMOVZ R13,RAX
MOV RAX,qword ptr [RDI + 0x58]
MOVZX ECX,byte ptr [R13]
MOV CL,byte ptr [RAX + RCX*0x1]
MOVZX EDX,byte ptr [R14]
CMP CL,byte ptr [RAX + RDX*0x1]
JNZ 0x001c09a8
INC R14
INC R13
CMP R13,R12
JZ 0x001c099e
MOV AL,byte ptr [R13]
MOVSX ECX,AL
CMP ECX,R8D
SETZ DL
CMP ECX,R11D
JZ 0x001c08b2
CMP ECX,R8D
JNZ 0x001c08ff
JMP 0x001c08b2
LAB_001c0960:
LEA RAX,[R13 + 0x1]
XOR R15D,R15D
CMP RAX,R12
JZ 0x001c09a8
ADD R13,0x2
LAB_001c0970:
MOV AL,byte ptr [R13 + -0x1]
MOVSX ECX,AL
CMP ECX,R11D
JZ 0x001c098d
CMP ECX,R8D
JNZ 0x001c09ba
CMP R14,RBX
JZ 0x001c0a65
INC R14
LAB_001c098d:
LEA RAX,[R13 + 0x1]
CMP R13,R12
MOV R13,RAX
JNZ 0x001c0970
JMP 0x001c09a8
LAB_001c099b:
MOV R14,RCX
LAB_001c099e:
XOR R15D,R15D
CMP R14,RBX
SETNZ R15B
LAB_001c09a8:
MOV EAX,R15D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001c09ba:
MOV R15D,0xffffffff
CMP R14,RBX
JZ 0x001c09a8
MOVZX ECX,AL
LEA RDX,[R13 + -0x1]
CMP ECX,R9D
JNZ 0x001c09dd
CMP R13,R12
JZ 0x001c09dd
MOV AL,byte ptr [R13]
MOV RDX,R13
LAB_001c09dd:
INC RDX
MOV RCX,qword ptr [RDI + 0x58]
MOVZX EAX,AL
MOV R13B,byte ptr [RCX + RAX*0x1]
INC R10D
LAB_001c09ee:
CMP R14,RBX
JZ 0x001c09a8
MOV RAX,qword ptr [RDI + 0x58]
LAB_001c09f7:
MOVZX ECX,byte ptr [R14]
CMP byte ptr [RAX + RCX*0x1],R13B
JZ 0x001c0a0b
INC R14
CMP R14,RBX
JNZ 0x001c09f7
JMP 0x001c09a8
LAB_001c0a0b:
INC R14
SUB RSP,0x8
MOV qword ptr [RBP + -0x48],RDI
MOV RSI,R14
MOV RCX,RDX
MOV RDX,RBX
MOV qword ptr [RBP + -0x38],RCX
MOV RAX,R8
MOV R8,R12
MOV dword ptr [RBP + -0x30],R9D
MOV qword ptr [RBP + -0x40],R10
PUSH R10
PUSH R11
PUSH RAX
CALL 0x001c0827
ADD RSP,0x20
TEST EAX,EAX
JLE 0x001c0a70
CMP R14,RBX
MOV R9D,dword ptr [RBP + -0x30]
MOV RDI,qword ptr [RBP + -0x48]
MOV R10,qword ptr [RBP + -0x40]
MOV R11D,dword ptr [RBP + 0x18]
MOV R8D,dword ptr [RBP + 0x10]
MOV RDX,qword ptr [RBP + -0x38]
JNZ 0x001c09ee
JMP 0x001c09a8
LAB_001c0a65:
MOV R15D,0xffffffff
JMP 0x001c09a8
LAB_001c0a70:
MOV R15D,EAX
JMP 0x001c09a8
|
uint my_wildcmp_8bit_impl
(long param_1,byte *param_2,byte *param_3,byte *param_4,byte *param_5,ulong param_6,
uint param_7,uint param_8,int param_9)
{
char cVar1;
byte bVar2;
int iVar3;
uint uVar4;
byte *pbVar5;
uint uVar6;
byte *pbVar7;
bool bVar8;
if (my_string_stack_guard != (code *)0x0) {
param_6 = param_6 & 0xffffffff;
iVar3 = (*my_string_stack_guard)(param_9);
if (iVar3 != 0) {
return 1;
}
}
uVar4 = 0xffffffff;
while (param_4 != param_5) {
bVar2 = *param_4;
uVar6 = (uint)(char)bVar2;
bVar8 = uVar6 == param_7;
if (uVar6 != param_8 && !bVar8) {
do {
uVar4 = 1;
if (param_2 == param_3) {
return 1;
}
pbVar5 = param_4 + 1;
if (param_4 + 1 == param_5) {
pbVar5 = param_4;
}
if (uVar6 == (uint)param_6) {
param_4 = pbVar5;
}
if (*(char *)(*(long *)(param_1 + 0x58) + (ulong)*param_4) !=
*(char *)(*(long *)(param_1 + 0x58) + (ulong)*param_2)) {
return 1;
}
param_2 = param_2 + 1;
param_4 = param_4 + 1;
if (param_4 == param_5) goto LAB_001c099e;
bVar2 = *param_4;
uVar6 = (uint)(char)bVar2;
bVar8 = uVar6 == param_7;
} while ((uVar6 != param_8) && (uVar6 != param_7));
}
if (bVar8) {
do {
pbVar5 = param_2;
param_4 = param_4 + 1;
if (pbVar5 == param_3) {
return uVar4;
}
} while ((param_4 < param_5) && (param_2 = pbVar5 + 1, (int)(char)*param_4 == param_7));
param_2 = pbVar5 + 1;
if (param_4 == param_5) break;
bVar2 = *param_4;
}
if ((int)(char)bVar2 == param_8) {
if (param_4 + 1 != param_5) {
pbVar5 = param_4 + 2;
do {
bVar2 = pbVar5[-1];
if ((int)(char)bVar2 != param_8) {
if ((int)(char)bVar2 != param_7) {
if (param_2 == param_3) {
return 0xffffffff;
}
pbVar7 = pbVar5 + -1;
if (((uint)bVar2 == (uint)param_6) && (pbVar5 != param_5)) {
bVar2 = *pbVar5;
pbVar7 = pbVar5;
}
cVar1 = *(char *)(*(long *)(param_1 + 0x58) + (ulong)bVar2);
while( true ) {
if (param_2 == param_3) {
return 0xffffffff;
}
while (*(char *)(*(long *)(param_1 + 0x58) + (ulong)*param_2) != cVar1) {
param_2 = param_2 + 1;
if (param_2 == param_3) {
return 0xffffffff;
}
}
param_2 = param_2 + 1;
uVar4 = my_wildcmp_8bit_impl
(param_1,param_2,param_3,pbVar7 + 1,param_5,param_6,param_7,
param_8,param_9 + 1);
if ((int)uVar4 < 1) break;
param_6 = param_6 & 0xffffffff;
if (param_2 == param_3) {
return 0xffffffff;
}
}
return uVar4;
}
if (param_2 == param_3) {
return 0xffffffff;
}
param_2 = param_2 + 1;
}
bVar8 = pbVar5 != param_5;
pbVar5 = pbVar5 + 1;
} while (bVar8);
}
return 0;
}
}
LAB_001c099e:
return (uint)(param_2 != param_3);
}
| |
26,575 | LoadImage | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c | Image LoadImage(const char *fileName)
{
Image image = { 0 };
#if defined(SUPPORT_FILEFORMAT_PNG) || \
defined(SUPPORT_FILEFORMAT_BMP) || \
defined(SUPPORT_FILEFORMAT_TGA) || \
defined(SUPPORT_FILEFORMAT_JPG) || \
defined(SUPPORT_FILEFORMAT_GIF) || \
defined(SUPPORT_FILEFORMAT_PIC) || \
defined(SUPPORT_FILEFORMAT_HDR) || \
defined(SUPPORT_FILEFORMAT_PNM) || \
defined(SUPPORT_FILEFORMAT_PSD)
#define STBI_REQUIRED
#endif
// Loading file to memory
int dataSize = 0;
unsigned char *fileData = LoadFileData(fileName, &dataSize);
// Loading image from memory data
if (fileData != NULL)
{
image = LoadImageFromMemory(GetFileExtension(fileName), fileData, dataSize);
UnloadFileData(fileData);
}
return image;
} | O2 | c | LoadImage:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
leaq 0xc(%rsp), %rsi
andl $0x0, (%rsi)
movq %r15, %rdi
callq 0xa1466
testq %rax, %rax
je 0x7dc18
movq %rax, %r14
movq %r15, %rdi
callq 0x636b4
movl 0xc(%rsp), %ecx
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x7dc25
movq %r14, %rdi
callq 0xa15d0
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
| LoadImage:
push r15
push r14
push rbx
sub rsp, 10h
mov r15, rsi
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
and qword ptr [rdi+10h], 0
lea rsi, [rsp+28h+var_1C]
and dword ptr [rsi], 0
mov rdi, r15
call LoadFileData
test rax, rax
jz short loc_7DC18
mov r14, rax
mov rdi, r15
call GetFileExtension
mov ecx, [rsp+28h+var_1C]
mov rdi, rbx
mov rsi, rax
mov rdx, r14
call LoadImageFromMemory
mov rdi, r14
call UnloadFileData
loc_7DC18:
mov rax, rbx
add rsp, 10h
pop rbx
pop r14
pop r15
retn
| long long LoadImage(long long a1, long long a2)
{
long long FileData; // rax
long long v3; // r14
long long FileExtension; // rax
_DWORD v6[7]; // [rsp+Ch] [rbp-1Ch] BYREF
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
v6[0] = 0;
FileData = LoadFileData(a2, v6);
if ( FileData )
{
v3 = FileData;
FileExtension = GetFileExtension(a2);
LoadImageFromMemory(a1, FileExtension, v3, v6[0]);
UnloadFileData(v3);
}
return a1;
}
| LoadImage:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV R15,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
AND qword ptr [RDI + 0x10],0x0
LEA RSI,[RSP + 0xc]
AND dword ptr [RSI],0x0
MOV RDI,R15
CALL 0x001a1466
TEST RAX,RAX
JZ 0x0017dc18
MOV R14,RAX
MOV RDI,R15
CALL 0x001636b4
MOV ECX,dword ptr [RSP + 0xc]
MOV RDI,RBX
MOV RSI,RAX
MOV RDX,R14
CALL 0x0017dc25
MOV RDI,R14
CALL 0x001a15d0
LAB_0017dc18:
MOV RAX,RBX
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
int8 * LoadImage(int8 *param_1,int8 param_2)
{
long lVar1;
int8 uVar2;
*param_1 = 0;
param_1[1] = 0;
param_1[2] = 0;
lVar1 = LoadFileData(param_2);
if (lVar1 != 0) {
uVar2 = GetFileExtension(param_2);
LoadImageFromMemory(param_1,uVar2,lVar1,0);
UnloadFileData(lVar1);
}
return param_1;
}
| |
26,576 | OpenSubdiv::v3_6_0::Vtr::internal::Level::gatherQuadRegularRingAroundVertex(int, int*, int) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/level.cpp | int
Level::gatherQuadRegularRingAroundVertex(
Index vIndex, int ringPoints[], int fvarChannel) const {
Level const& level = *this;
ConstIndexArray vEdges = level.getVertexEdges(vIndex);
ConstIndexArray vFaces = level.getVertexFaces(vIndex);
ConstLocalIndexArray vInFaces = level.getVertexFaceLocalIndices(vIndex);
bool isBoundary = (vEdges.size() > vFaces.size());
int ringIndex = 0;
for (int i = 0; i < vFaces.size(); ++i) {
//
// For every incident quad, we want the two vertices clockwise in each face, i.e.
// the vertex at the end of the leading edge and the vertex opposite this one:
//
ConstIndexArray fPoints = (fvarChannel < 0)
? level.getFaceVertices(vFaces[i])
: level.getFaceFVarValues(vFaces[i], fvarChannel);
assert(fPoints.size() == 4);
int vInThisFace = vInFaces[i];
ringPoints[ringIndex++] = fPoints[fastMod4(vInThisFace + 1)];
ringPoints[ringIndex++] = fPoints[fastMod4(vInThisFace + 2)];
if (isBoundary && (i == (vFaces.size() - 1))) {
ringPoints[ringIndex++] = fPoints[fastMod4(vInThisFace + 3)];
}
}
return ringIndex;
} | O0 | cpp | OpenSubdiv::v3_6_0::Vtr::internal::Level::gatherQuadRegularRingAroundVertex(int, int*, int) const:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xd31e0
movl %edx, -0x40(%rbp)
movq %rax, -0x48(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xd7810
movl %edx, -0x60(%rbp)
movq %rax, -0x68(%rbp)
movl -0x60(%rbp), %eax
movl %eax, -0x50(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xc7650
movl %edx, -0x80(%rbp)
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x78(%rbp)
movl -0x80(%rbp), %eax
movl %eax, -0x70(%rbp)
leaq -0x38(%rbp), %rdi
callq 0xcc250
movl %eax, -0xd0(%rbp)
leaq -0x58(%rbp), %rdi
callq 0xcc250
movl %eax, %ecx
movl -0xd0(%rbp), %eax
cmpl %ecx, %eax
setg %al
andb $0x1, %al
movb %al, -0x89(%rbp)
movl $0x0, -0x90(%rbp)
movl $0x0, -0x94(%rbp)
movl -0x94(%rbp), %eax
movl %eax, -0xd4(%rbp)
leaq -0x58(%rbp), %rdi
callq 0xcc250
movl %eax, %ecx
movl -0xd4(%rbp), %eax
cmpl %ecx, %eax
jge 0xec981
cmpl $0x0, -0x1c(%rbp)
jge 0xec7f7
movq -0x28(%rbp), %rax
movq %rax, -0xe0(%rbp)
movl -0x94(%rbp), %esi
leaq -0x58(%rbp), %rdi
callq 0xcabf0
movq -0xe0(%rbp), %rdi
movl (%rax), %esi
callq 0xce580
movl %edx, -0xb0(%rbp)
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rax
movq %rax, -0xa8(%rbp)
movl -0xb0(%rbp), %eax
movl %eax, -0xa0(%rbp)
jmp 0xec849
movq -0x28(%rbp), %rax
movq %rax, -0xe8(%rbp)
movl -0x94(%rbp), %esi
leaq -0x58(%rbp), %rdi
callq 0xcabf0
movq -0xe8(%rbp), %rdi
movl (%rax), %esi
movl -0x1c(%rbp), %edx
callq 0xd1780
movl %edx, -0xc0(%rbp)
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rax
movq %rax, -0xa8(%rbp)
movl -0xc0(%rbp), %eax
movl %eax, -0xa0(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0xcc250
cmpl $0x4, %eax
jne 0xec85c
jmp 0xec87b
leaq 0xfebc6(%rip), %rdi # 0x1eb429
leaq 0xfe2b3(%rip), %rsi # 0x1eab1d
movl $0x2db, %edx # imm = 0x2DB
leaq 0xfebc7(%rip), %rcx # 0x1eb43d
callq 0xc9440
movl -0x94(%rbp), %esi
leaq -0x78(%rbp), %rdi
callq 0xcafa0
movzwl (%rax), %eax
movl %eax, -0xcc(%rbp)
movl -0xcc(%rbp), %edi
addl $0x1, %edi
callq 0xec9f0
movl %eax, %esi
leaq -0xa8(%rbp), %rdi
callq 0xcabf0
movl (%rax), %edx
movq -0x18(%rbp), %rax
movl -0x90(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x90(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0xcc(%rbp), %edi
addl $0x2, %edi
callq 0xec9f0
movl %eax, %esi
leaq -0xa8(%rbp), %rdi
callq 0xcabf0
movl (%rax), %edx
movq -0x18(%rbp), %rax
movl -0x90(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x90(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
testb $0x1, -0x89(%rbp)
je 0xec96b
movl -0x94(%rbp), %eax
movl %eax, -0xec(%rbp)
leaq -0x58(%rbp), %rdi
callq 0xcc250
movl %eax, %ecx
movl -0xec(%rbp), %eax
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0xec96b
movl -0xcc(%rbp), %edi
addl $0x3, %edi
callq 0xec9f0
movl %eax, %esi
leaq -0xa8(%rbp), %rdi
callq 0xcabf0
movl (%rax), %edx
movq -0x18(%rbp), %rax
movl -0x90(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x90(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
jmp 0xec96d
movl -0x94(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x94(%rbp)
jmp 0xec77b
movl -0x90(%rbp), %eax
addq $0xf0, %rsp
popq %rbp
retq
| _ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level33gatherQuadRegularRingAroundVertexEiPii:
push rbp
mov rbp, rsp
sub rsp, 0F0h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov rax, [rbp+var_8]
mov [rbp+var_28], rax
mov rdi, [rbp+var_28]; this
mov esi, [rbp+var_C]; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level14getVertexEdgesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexEdges(int)
mov [rbp+var_40], edx
mov [rbp+var_48], rax
mov eax, [rbp+var_40]
mov [rbp+var_30], eax
mov rax, [rbp+var_48]
mov [rbp+var_38], rax
mov rdi, [rbp+var_28]; this
mov esi, [rbp+var_C]; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level14getVertexFacesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexFaces(int)
mov [rbp+var_60], edx
mov [rbp+var_68], rax
mov eax, [rbp+var_60]
mov [rbp+var_50], eax
mov rax, [rbp+var_68]
mov [rbp+var_58], rax
mov rdi, [rbp+var_28]; this
mov esi, [rbp+var_C]; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level25getVertexFaceLocalIndicesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexFaceLocalIndices(int)
mov [rbp+var_80], edx
mov [rbp+var_88], rax
mov rax, [rbp+var_88]
mov [rbp+var_78], rax
mov eax, [rbp+var_80]
mov [rbp+var_70], eax
lea rdi, [rbp+var_38]
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiE4sizeEv; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(void)
mov [rbp+var_D0], eax
lea rdi, [rbp+var_58]
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiE4sizeEv; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(void)
mov ecx, eax
mov eax, [rbp+var_D0]
cmp eax, ecx
setnle al
and al, 1
mov [rbp+var_89], al
mov [rbp+var_90], 0
mov [rbp+var_94], 0
loc_EC77B:
mov eax, [rbp+var_94]
mov [rbp+var_D4], eax
lea rdi, [rbp+var_58]
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiE4sizeEv; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(void)
mov ecx, eax
mov eax, [rbp+var_D4]
cmp eax, ecx
jge loc_EC981
cmp [rbp+var_1C], 0
jge short loc_EC7F7
mov rax, [rbp+var_28]
mov [rbp+var_E0], rax
mov esi, [rbp+var_94]
lea rdi, [rbp+var_58]
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](int)
mov rdi, [rbp+var_E0]; this
mov esi, [rax]; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level15getFaceVerticesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(int)
mov [rbp+var_B0], edx
mov [rbp+var_B8], rax
mov rax, [rbp+var_B8]
mov [rbp+var_A8], rax
mov eax, [rbp+var_B0]
mov [rbp+var_A0], eax
jmp short loc_EC849
loc_EC7F7:
mov rax, [rbp+var_28]
mov [rbp+var_E8], rax
mov esi, [rbp+var_94]
lea rdi, [rbp+var_58]
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](int)
mov rdi, [rbp+var_E8]; this
mov esi, [rax]; int
mov edx, [rbp+var_1C]; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level17getFaceFVarValuesEii; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceFVarValues(int,int)
mov [rbp+var_C0], edx
mov [rbp+var_C8], rax
mov rax, [rbp+var_C8]
mov [rbp+var_A8], rax
mov eax, [rbp+var_C0]
mov [rbp+var_A0], eax
loc_EC849:
lea rdi, [rbp+var_A8]
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiE4sizeEv; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(void)
cmp eax, 4
jnz short loc_EC85C
jmp short loc_EC87B
loc_EC85C:
lea rdi, aFpointsSize4; "fPoints.size() == 4"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov edx, 2DBh
lea rcx, aIntOpensubdivV_1; "int OpenSubdiv::v3_6_0::Vtr::internal::"...
call ___assert_fail
loc_EC87B:
mov esi, [rbp+var_94]
lea rdi, [rbp+var_78]
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayItEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<ushort>::operator[](int)
movzx eax, word ptr [rax]
mov [rbp+var_CC], eax
mov edi, [rbp+var_CC]
add edi, 1
call _ZN10OpenSubdiv6v3_6_03Vtr8internal12_GLOBAL__N_18fastMod4IiEET_S5_; OpenSubdiv::v3_6_0::Vtr::internal::`anonymous namespace'::fastMod4<int>(int)
mov esi, eax
lea rdi, [rbp+var_A8]
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](int)
mov edx, [rax]
mov rax, [rbp+var_18]
mov ecx, [rbp+var_90]
mov esi, ecx
add esi, 1
mov [rbp+var_90], esi
movsxd rcx, ecx
mov [rax+rcx*4], edx
mov edi, [rbp+var_CC]
add edi, 2
call _ZN10OpenSubdiv6v3_6_03Vtr8internal12_GLOBAL__N_18fastMod4IiEET_S5_; OpenSubdiv::v3_6_0::Vtr::internal::`anonymous namespace'::fastMod4<int>(int)
mov esi, eax
lea rdi, [rbp+var_A8]
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](int)
mov edx, [rax]
mov rax, [rbp+var_18]
mov ecx, [rbp+var_90]
mov esi, ecx
add esi, 1
mov [rbp+var_90], esi
movsxd rcx, ecx
mov [rax+rcx*4], edx
test [rbp+var_89], 1
jz short loc_EC96B
mov eax, [rbp+var_94]
mov [rbp+var_EC], eax
lea rdi, [rbp+var_58]
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiE4sizeEv; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(void)
mov ecx, eax
mov eax, [rbp+var_EC]
sub ecx, 1
cmp eax, ecx
jnz short loc_EC96B
mov edi, [rbp+var_CC]
add edi, 3
call _ZN10OpenSubdiv6v3_6_03Vtr8internal12_GLOBAL__N_18fastMod4IiEET_S5_; OpenSubdiv::v3_6_0::Vtr::internal::`anonymous namespace'::fastMod4<int>(int)
mov esi, eax
lea rdi, [rbp+var_A8]
call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](int)
mov edx, [rax]
mov rax, [rbp+var_18]
mov ecx, [rbp+var_90]
mov esi, ecx
add esi, 1
mov [rbp+var_90], esi
movsxd rcx, ecx
mov [rax+rcx*4], edx
loc_EC96B:
jmp short $+2
loc_EC96D:
mov eax, [rbp+var_94]
add eax, 1
mov [rbp+var_94], eax
jmp loc_EC77B
loc_EC981:
mov eax, [rbp+var_90]
add rsp, 0F0h
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Vtr::internal::Level::gatherQuadRegularRingAroundVertex(
OpenSubdiv::v3_6_0::Vtr::internal::Level *this,
int a2,
int *a3,
int a4)
{
long long VertexEdges; // rax
int v5; // edx
long long VertexFaces; // rax
int v7; // edx
long long VertexFaceLocalIndices; // rax
int v9; // edx
int *v10; // rax
long long FaceFVarValues; // rax
int v12; // edx
int *v13; // rax
unsigned int v14; // eax
int v15; // edx
int v16; // ecx
unsigned int v17; // eax
int v18; // edx
int v19; // ecx
unsigned int v20; // eax
int v21; // edx
int v22; // ecx
unsigned int v24; // [rsp+4h] [rbp-ECh]
OpenSubdiv::v3_6_0::Vtr::internal::Level *v25; // [rsp+8h] [rbp-E8h]
OpenSubdiv::v3_6_0::Vtr::internal::Level *v26; // [rsp+10h] [rbp-E0h]
int v27; // [rsp+1Ch] [rbp-D4h]
int v28; // [rsp+20h] [rbp-D0h]
int v29; // [rsp+24h] [rbp-CCh]
long long v30; // [rsp+48h] [rbp-A8h] BYREF
int v31; // [rsp+50h] [rbp-A0h]
unsigned int i; // [rsp+5Ch] [rbp-94h]
unsigned int v33; // [rsp+60h] [rbp-90h]
bool v34; // [rsp+67h] [rbp-89h]
long long v35; // [rsp+68h] [rbp-88h]
int v36; // [rsp+70h] [rbp-80h]
long long v37; // [rsp+78h] [rbp-78h] BYREF
int v38; // [rsp+80h] [rbp-70h]
long long v39; // [rsp+88h] [rbp-68h]
int v40; // [rsp+90h] [rbp-60h]
long long v41; // [rsp+98h] [rbp-58h] BYREF
int v42; // [rsp+A0h] [rbp-50h]
long long v43; // [rsp+A8h] [rbp-48h]
int v44; // [rsp+B0h] [rbp-40h]
long long v45; // [rsp+B8h] [rbp-38h] BYREF
int v46; // [rsp+C0h] [rbp-30h]
OpenSubdiv::v3_6_0::Vtr::internal::Level *v47; // [rsp+C8h] [rbp-28h]
int v48; // [rsp+D4h] [rbp-1Ch]
int *v49; // [rsp+D8h] [rbp-18h]
int v50; // [rsp+E4h] [rbp-Ch]
OpenSubdiv::v3_6_0::Vtr::internal::Level *v51; // [rsp+E8h] [rbp-8h]
v51 = this;
v50 = a2;
v49 = a3;
v48 = a4;
v47 = this;
VertexEdges = OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexEdges(this, a2);
v44 = v5;
v43 = VertexEdges;
v46 = v5;
v45 = VertexEdges;
VertexFaces = OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexFaces(this, a2);
v40 = v7;
v39 = VertexFaces;
v42 = v7;
v41 = VertexFaces;
VertexFaceLocalIndices = OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexFaceLocalIndices(this, a2);
v36 = v9;
v35 = VertexFaceLocalIndices;
v37 = VertexFaceLocalIndices;
v38 = v9;
v28 = OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(&v45);
v34 = v28 > (int)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(&v41);
v33 = 0;
for ( i = 0; ; ++i )
{
v27 = i;
if ( v27 >= (int)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(&v41) )
break;
if ( v48 >= 0 )
{
v25 = v47;
v13 = (int *)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](&v41, i);
FaceFVarValues = OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceFVarValues(v25, *v13, v48);
}
else
{
v26 = v47;
v10 = (int *)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](&v41, i);
FaceFVarValues = OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(v26, *v10);
}
v30 = FaceFVarValues;
v31 = v12;
if ( (unsigned int)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(&v30) != 4 )
__assert_fail(
"fPoints.size() == 4",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/level.cpp",
731LL,
"int OpenSubdiv::v3_6_0::Vtr::internal::Level::gatherQuadRegularRingAroundVertex(Index, int *, int) const");
v29 = *(unsigned __int16 *)OpenSubdiv::v3_6_0::Vtr::ConstArray<unsigned short>::operator[](&v37, i);
v14 = OpenSubdiv::v3_6_0::Vtr::internal::`anonymous namespace'::fastMod4<int>((unsigned int)(v29 + 1));
v15 = *(_DWORD *)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](&v30, v14);
v16 = v33++;
v49[v16] = v15;
v17 = OpenSubdiv::v3_6_0::Vtr::internal::`anonymous namespace'::fastMod4<int>((unsigned int)(v29 + 2));
v18 = *(_DWORD *)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](&v30, v17);
v19 = v33++;
v49[v19] = v18;
if ( v34 )
{
v24 = i;
if ( v24 == (unsigned int)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(&v41) - 1 )
{
v20 = OpenSubdiv::v3_6_0::Vtr::internal::`anonymous namespace'::fastMod4<int>((unsigned int)(v29 + 3));
v21 = *(_DWORD *)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](&v30, v20);
v22 = v33++;
v49[v22] = v21;
}
}
}
return v33;
}
| gatherQuadRegularRingAroundVertex:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xf0
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x28]
MOV ESI,dword ptr [RBP + -0xc]
CALL 0x001d31e0
MOV dword ptr [RBP + -0x40],EDX
MOV qword ptr [RBP + -0x48],RAX
MOV EAX,dword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x30],EAX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x28]
MOV ESI,dword ptr [RBP + -0xc]
CALL 0x001d7810
MOV dword ptr [RBP + -0x60],EDX
MOV qword ptr [RBP + -0x68],RAX
MOV EAX,dword ptr [RBP + -0x60]
MOV dword ptr [RBP + -0x50],EAX
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x58],RAX
MOV RDI,qword ptr [RBP + -0x28]
MOV ESI,dword ptr [RBP + -0xc]
CALL 0x001c7650
MOV dword ptr [RBP + -0x80],EDX
MOV qword ptr [RBP + -0x88],RAX
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RBP + -0x78],RAX
MOV EAX,dword ptr [RBP + -0x80]
MOV dword ptr [RBP + -0x70],EAX
LEA RDI,[RBP + -0x38]
CALL 0x001cc250
MOV dword ptr [RBP + -0xd0],EAX
LEA RDI,[RBP + -0x58]
CALL 0x001cc250
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0xd0]
CMP EAX,ECX
SETG AL
AND AL,0x1
MOV byte ptr [RBP + -0x89],AL
MOV dword ptr [RBP + -0x90],0x0
MOV dword ptr [RBP + -0x94],0x0
LAB_001ec77b:
MOV EAX,dword ptr [RBP + -0x94]
MOV dword ptr [RBP + -0xd4],EAX
LEA RDI,[RBP + -0x58]
CALL 0x001cc250
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0xd4]
CMP EAX,ECX
JGE 0x001ec981
CMP dword ptr [RBP + -0x1c],0x0
JGE 0x001ec7f7
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0xe0],RAX
MOV ESI,dword ptr [RBP + -0x94]
LEA RDI,[RBP + -0x58]
CALL 0x001cabf0
MOV RDI,qword ptr [RBP + -0xe0]
MOV ESI,dword ptr [RAX]
CALL 0x001ce580
MOV dword ptr [RBP + -0xb0],EDX
MOV qword ptr [RBP + -0xb8],RAX
MOV RAX,qword ptr [RBP + -0xb8]
MOV qword ptr [RBP + -0xa8],RAX
MOV EAX,dword ptr [RBP + -0xb0]
MOV dword ptr [RBP + -0xa0],EAX
JMP 0x001ec849
LAB_001ec7f7:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0xe8],RAX
MOV ESI,dword ptr [RBP + -0x94]
LEA RDI,[RBP + -0x58]
CALL 0x001cabf0
MOV RDI,qword ptr [RBP + -0xe8]
MOV ESI,dword ptr [RAX]
MOV EDX,dword ptr [RBP + -0x1c]
CALL 0x001d1780
MOV dword ptr [RBP + -0xc0],EDX
MOV qword ptr [RBP + -0xc8],RAX
MOV RAX,qword ptr [RBP + -0xc8]
MOV qword ptr [RBP + -0xa8],RAX
MOV EAX,dword ptr [RBP + -0xc0]
MOV dword ptr [RBP + -0xa0],EAX
LAB_001ec849:
LEA RDI,[RBP + -0xa8]
CALL 0x001cc250
CMP EAX,0x4
JNZ 0x001ec85c
JMP 0x001ec87b
LAB_001ec85c:
LEA RDI,[0x2eb429]
LEA RSI,[0x2eab1d]
MOV EDX,0x2db
LEA RCX,[0x2eb43d]
CALL 0x001c9440
LAB_001ec87b:
MOV ESI,dword ptr [RBP + -0x94]
LEA RDI,[RBP + -0x78]
CALL 0x001cafa0
MOVZX EAX,word ptr [RAX]
MOV dword ptr [RBP + -0xcc],EAX
MOV EDI,dword ptr [RBP + -0xcc]
ADD EDI,0x1
CALL 0x001ec9f0
MOV ESI,EAX
LEA RDI,[RBP + -0xa8]
CALL 0x001cabf0
MOV EDX,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x90]
MOV ESI,ECX
ADD ESI,0x1
MOV dword ptr [RBP + -0x90],ESI
MOVSXD RCX,ECX
MOV dword ptr [RAX + RCX*0x4],EDX
MOV EDI,dword ptr [RBP + -0xcc]
ADD EDI,0x2
CALL 0x001ec9f0
MOV ESI,EAX
LEA RDI,[RBP + -0xa8]
CALL 0x001cabf0
MOV EDX,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x90]
MOV ESI,ECX
ADD ESI,0x1
MOV dword ptr [RBP + -0x90],ESI
MOVSXD RCX,ECX
MOV dword ptr [RAX + RCX*0x4],EDX
TEST byte ptr [RBP + -0x89],0x1
JZ 0x001ec96b
MOV EAX,dword ptr [RBP + -0x94]
MOV dword ptr [RBP + -0xec],EAX
LEA RDI,[RBP + -0x58]
CALL 0x001cc250
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0xec]
SUB ECX,0x1
CMP EAX,ECX
JNZ 0x001ec96b
MOV EDI,dword ptr [RBP + -0xcc]
ADD EDI,0x3
CALL 0x001ec9f0
MOV ESI,EAX
LEA RDI,[RBP + -0xa8]
CALL 0x001cabf0
MOV EDX,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x90]
MOV ESI,ECX
ADD ESI,0x1
MOV dword ptr [RBP + -0x90],ESI
MOVSXD RCX,ECX
MOV dword ptr [RAX + RCX*0x4],EDX
LAB_001ec96b:
JMP 0x001ec96d
LAB_001ec96d:
MOV EAX,dword ptr [RBP + -0x94]
ADD EAX,0x1
MOV dword ptr [RBP + -0x94],EAX
JMP 0x001ec77b
LAB_001ec981:
MOV EAX,dword ptr [RBP + -0x90]
ADD RSP,0xf0
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::Level::gatherQuadRegularRingAroundVertex(int, int*, int) const
*/
int __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::Level::gatherQuadRegularRingAroundVertex
(Level *this,int param_1,int *param_2,int param_3)
{
Level *this_00;
int iVar1;
int iVar2;
uint uVar3;
int *piVar4;
ushort *puVar5;
int1 auVar6 [12];
int1 local_b0 [12];
int local_9c;
int local_98;
byte local_91;
int1 local_90 [12];
ConstArray<unsigned_short> local_80 [16];
int1 local_70 [12];
ConstArray<int> local_60 [16];
int1 local_50 [12];
ConstArray<int> local_40 [16];
Level *local_30;
int local_24;
int *local_20;
int local_14;
Level *local_10;
local_30 = this;
local_24 = param_3;
local_20 = param_2;
local_14 = param_1;
local_10 = this;
local_50 = getVertexEdges(this,param_1);
local_40._0_12_ = local_50;
local_70 = getVertexFaces(local_30,local_14);
local_60._0_12_ = local_70;
local_90 = getVertexFaceLocalIndices(local_30,local_14);
local_80._0_12_ = local_90;
iVar1 = ConstArray<int>::size(local_40);
iVar2 = ConstArray<int>::size(local_60);
local_91 = iVar2 < iVar1;
local_98 = 0;
local_9c = 0;
while( true ) {
iVar1 = local_9c;
iVar2 = ConstArray<int>::size(local_60);
this_00 = local_30;
if (iVar2 <= iVar1) {
return local_98;
}
if (local_24 < 0) {
piVar4 = (int *)ConstArray<int>::operator[](local_60,local_9c);
auVar6 = getFaceVertices(this_00,*piVar4);
}
else {
piVar4 = (int *)ConstArray<int>::operator[](local_60,local_9c);
auVar6 = getFaceFVarValues(this_00,*piVar4,local_24);
}
local_b0 = auVar6;
iVar1 = ConstArray<int>::size((ConstArray<int> *)local_b0);
if (iVar1 != 4) break;
puVar5 = (ushort *)ConstArray<unsigned_short>::operator[](local_80,local_9c);
uVar3 = (uint)*puVar5;
iVar1 = (anonymous_namespace)::fastMod4<int>(uVar3 + 1);
piVar4 = (int *)ConstArray<int>::operator[]((ConstArray<int> *)local_b0,iVar1);
local_20[local_98] = *piVar4;
local_98 = local_98 + 1;
iVar1 = (anonymous_namespace)::fastMod4<int>(uVar3 + 2);
piVar4 = (int *)ConstArray<int>::operator[]((ConstArray<int> *)local_b0,iVar1);
iVar1 = local_9c;
iVar2 = local_98 + 1;
local_20[local_98] = *piVar4;
local_98 = iVar2;
if ((local_91 & 1) != 0) {
iVar2 = ConstArray<int>::size(local_60);
if (iVar1 == iVar2 + -1) {
iVar1 = (anonymous_namespace)::fastMod4<int>(uVar3 + 3);
piVar4 = (int *)ConstArray<int>::operator[]((ConstArray<int> *)local_b0,iVar1);
local_20[local_98] = *piVar4;
local_98 = local_98 + 1;
}
}
local_9c = local_9c + 1;
}
/* WARNING: Subroutine does not return */
__assert_fail("fPoints.size() == 4",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/level.cpp"
,0x2db,
"int OpenSubdiv::v3_6_0::Vtr::internal::Level::gatherQuadRegularRingAroundVertex(Index, int *, int) const"
);
}
| |
26,577 | OpenSubdiv::v3_6_0::Vtr::internal::Level::gatherQuadRegularRingAroundVertex(int, int*, int) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/level.cpp | int
Level::gatherQuadRegularRingAroundVertex(
Index vIndex, int ringPoints[], int fvarChannel) const {
Level const& level = *this;
ConstIndexArray vEdges = level.getVertexEdges(vIndex);
ConstIndexArray vFaces = level.getVertexFaces(vIndex);
ConstLocalIndexArray vInFaces = level.getVertexFaceLocalIndices(vIndex);
bool isBoundary = (vEdges.size() > vFaces.size());
int ringIndex = 0;
for (int i = 0; i < vFaces.size(); ++i) {
//
// For every incident quad, we want the two vertices clockwise in each face, i.e.
// the vertex at the end of the leading edge and the vertex opposite this one:
//
ConstIndexArray fPoints = (fvarChannel < 0)
? level.getFaceVertices(vFaces[i])
: level.getFaceFVarValues(vFaces[i], fvarChannel);
assert(fPoints.size() == 4);
int vInThisFace = vInFaces[i];
ringPoints[ringIndex++] = fPoints[fastMod4(vInThisFace + 1)];
ringPoints[ringIndex++] = fPoints[fastMod4(vInThisFace + 2)];
if (isBoundary && (i == (vFaces.size() - 1))) {
ringPoints[ringIndex++] = fPoints[fastMod4(vInThisFace + 3)];
}
}
return ringIndex;
} | O2 | cpp | OpenSubdiv::v3_6_0::Vtr::internal::Level::gatherQuadRegularRingAroundVertex(int, int*, int) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %ebx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
callq 0x54550
movl %edx, 0x4(%rsp)
movq %r15, %rdi
movl %ebp, %esi
callq 0x55df0
movq %rax, 0x20(%rsp)
movl %edx, %r13d
movq %r15, 0x8(%rsp)
movq %r15, %rdi
movl %ebp, %esi
callq 0x507c0
movq %rax, 0x18(%rsp)
leal -0x1(%r13), %eax
movq %rax, 0x10(%rsp)
xorl %ebp, %ebp
testl %r13d, %r13d
movl $0x0, %r15d
cmovgl %r13d, %r15d
xorl %r12d, %r12d
cmpq %rbp, %r15
je 0x5bdc0
movq 0x20(%rsp), %rax
movl (%rax,%rbp,4), %esi
testl %ebx, %ebx
js 0x5bd49
movq 0x8(%rsp), %rdi
movl %ebx, %edx
callq 0x53d20
jmp 0x5bd53
movq 0x8(%rsp), %rdi
callq 0x52db0
cmpl $0x4, %edx
jne 0x5bdd2
cmpl %r13d, 0x4(%rsp)
setg %sil
movq 0x18(%rsp), %rcx
movzwl (%rcx,%rbp,2), %ecx
leal 0x1(%rcx), %edx
andl $0x3, %edx
movl (%rax,%rdx,4), %edx
movslq %r12d, %rdi
movl %edx, (%r14,%rdi,4)
movl %ecx, %edx
andl $0x3, %edx
xorl $0x2, %edx
movl (%rax,%rdx,4), %r8d
leal 0x2(%rdi), %edx
movl %r8d, 0x4(%r14,%rdi,4)
cmpq %rbp, 0x10(%rsp)
sete %dil
andb %sil, %dil
cmpb $0x1, %dil
jne 0x5bdb5
decl %ecx
andl $0x3, %ecx
movl (%rax,%rcx,4), %eax
addl $0x3, %r12d
movslq %edx, %rcx
movl %eax, (%r14,%rcx,4)
jmp 0x5bdb8
movl %edx, %r12d
incq %rbp
jmp 0x5bd26
movl %r12d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6146d(%rip), %rdi # 0xbd246
leaq 0x60c16(%rip), %rsi # 0xbc9f6
leaq 0x61473(%rip), %rcx # 0xbd25a
movl $0x2db, %edx # imm = 0x2DB
callq 0x512a0
nop
| _ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level33gatherQuadRegularRingAroundVertexEiPii:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebx, ecx
mov r14, rdx
mov ebp, esi
mov r15, rdi
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level14getVertexEdgesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexEdges(int)
mov [rsp+58h+var_54], edx
mov rdi, r15; this
mov esi, ebp; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level14getVertexFacesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexFaces(int)
mov [rsp+58h+var_38], rax
mov r13d, edx
mov [rsp+58h+var_50], r15
mov rdi, r15; this
mov esi, ebp; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level25getVertexFaceLocalIndicesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexFaceLocalIndices(int)
mov [rsp+58h+var_40], rax
lea eax, [r13-1]
mov [rsp+58h+var_48], rax
xor ebp, ebp
test r13d, r13d
mov r15d, 0
cmovg r15d, r13d
xor r12d, r12d
loc_5BD26:
cmp r15, rbp
jz loc_5BDC0
mov rax, [rsp+58h+var_38]
mov esi, [rax+rbp*4]; int
test ebx, ebx
js short loc_5BD49
mov rdi, [rsp+58h+var_50]; this
mov edx, ebx; int
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level17getFaceFVarValuesEii; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceFVarValues(int,int)
jmp short loc_5BD53
loc_5BD49:
mov rdi, [rsp+58h+var_50]; this
call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level15getFaceVerticesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(int)
loc_5BD53:
cmp edx, 4
jnz short loc_5BDD2
cmp [rsp+58h+var_54], r13d
setnle sil
mov rcx, [rsp+58h+var_40]
movzx ecx, word ptr [rcx+rbp*2]
lea edx, [rcx+1]
and edx, 3
mov edx, [rax+rdx*4]
movsxd rdi, r12d
mov [r14+rdi*4], edx
mov edx, ecx
and edx, 3
xor edx, 2
mov r8d, [rax+rdx*4]
lea edx, [rdi+2]
mov [r14+rdi*4+4], r8d
cmp [rsp+58h+var_48], rbp
setz dil
and dil, sil
cmp dil, 1
jnz short loc_5BDB5
dec ecx
and ecx, 3
mov eax, [rax+rcx*4]
add r12d, 3
movsxd rcx, edx
mov [r14+rcx*4], eax
jmp short loc_5BDB8
loc_5BDB5:
mov r12d, edx
loc_5BDB8:
inc rbp
jmp loc_5BD26
loc_5BDC0:
mov eax, r12d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5BDD2:
lea rdi, aFpointsSize4; "fPoints.size() == 4"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aIntOpensubdivV_1; "int OpenSubdiv::v3_6_0::Vtr::internal::"...
mov edx, 2DBh
call ___assert_fail
| long long OpenSubdiv::v3_6_0::Vtr::internal::Level::gatherQuadRegularRingAroundVertex(
OpenSubdiv::v3_6_0::Vtr::internal::Level *this,
int a2,
int *a3,
int a4)
{
int v6; // edx
int v7; // edx
int v8; // r13d
long long v9; // rbp
long long v10; // r15
unsigned int v11; // r12d
int v12; // esi
long long FaceVertices; // rax
int v14; // edx
__int16 v15; // cx
unsigned int v16; // edx
int v18; // [rsp+4h] [rbp-54h]
long long VertexFaceLocalIndices; // [rsp+18h] [rbp-40h]
long long VertexFaces; // [rsp+20h] [rbp-38h]
OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexEdges(this, a2);
v18 = v6;
VertexFaces = OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexFaces(this, a2);
v8 = v7;
VertexFaceLocalIndices = OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexFaceLocalIndices(this, a2);
v9 = 0LL;
v10 = 0LL;
if ( v8 > 0 )
v10 = (unsigned int)v8;
v11 = 0;
while ( v10 != v9 )
{
v12 = *(_DWORD *)(VertexFaces + 4 * v9);
if ( a4 < 0 )
FaceVertices = OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(this, v12);
else
FaceVertices = OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceFVarValues(this, v12, a4);
if ( v14 != 4 )
__assert_fail(
"fPoints.size() == 4",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/level.cpp",
731LL,
"int OpenSubdiv::v3_6_0::Vtr::internal::Level::gatherQuadRegularRingAroundVertex(Index, int *, int) const");
v15 = *(_WORD *)(VertexFaceLocalIndices + 2 * v9);
a3[v11] = *(_DWORD *)(FaceVertices + 4LL * (((_BYTE)v15 + 1) & 3));
v16 = v11 + 2;
a3[v11 + 1] = *(_DWORD *)(FaceVertices + 4LL * (v15 & 3 ^ 2u));
if ( v18 > v8 && v8 - 1 == v9 )
{
v11 += 3;
a3[v16] = *(_DWORD *)(FaceVertices + 4LL * (((_BYTE)v15 - 1) & 3));
}
else
{
v11 += 2;
}
++v9;
}
return v11;
}
| gatherQuadRegularRingAroundVertex:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBX,ECX
MOV R14,RDX
MOV EBP,ESI
MOV R15,RDI
CALL 0x00154550
MOV dword ptr [RSP + 0x4],EDX
MOV RDI,R15
MOV ESI,EBP
CALL 0x00155df0
MOV qword ptr [RSP + 0x20],RAX
MOV R13D,EDX
MOV qword ptr [RSP + 0x8],R15
MOV RDI,R15
MOV ESI,EBP
CALL 0x001507c0
MOV qword ptr [RSP + 0x18],RAX
LEA EAX,[R13 + -0x1]
MOV qword ptr [RSP + 0x10],RAX
XOR EBP,EBP
TEST R13D,R13D
MOV R15D,0x0
CMOVG R15D,R13D
XOR R12D,R12D
LAB_0015bd26:
CMP R15,RBP
JZ 0x0015bdc0
MOV RAX,qword ptr [RSP + 0x20]
MOV ESI,dword ptr [RAX + RBP*0x4]
TEST EBX,EBX
JS 0x0015bd49
MOV RDI,qword ptr [RSP + 0x8]
MOV EDX,EBX
CALL 0x00153d20
JMP 0x0015bd53
LAB_0015bd49:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00152db0
LAB_0015bd53:
CMP EDX,0x4
JNZ 0x0015bdd2
CMP dword ptr [RSP + 0x4],R13D
SETG SIL
MOV RCX,qword ptr [RSP + 0x18]
MOVZX ECX,word ptr [RCX + RBP*0x2]
LEA EDX,[RCX + 0x1]
AND EDX,0x3
MOV EDX,dword ptr [RAX + RDX*0x4]
MOVSXD RDI,R12D
MOV dword ptr [R14 + RDI*0x4],EDX
MOV EDX,ECX
AND EDX,0x3
XOR EDX,0x2
MOV R8D,dword ptr [RAX + RDX*0x4]
LEA EDX,[RDI + 0x2]
MOV dword ptr [R14 + RDI*0x4 + 0x4],R8D
CMP qword ptr [RSP + 0x10],RBP
SETZ DIL
AND DIL,SIL
CMP DIL,0x1
JNZ 0x0015bdb5
DEC ECX
AND ECX,0x3
MOV EAX,dword ptr [RAX + RCX*0x4]
ADD R12D,0x3
MOVSXD RCX,EDX
MOV dword ptr [R14 + RCX*0x4],EAX
JMP 0x0015bdb8
LAB_0015bdb5:
MOV R12D,EDX
LAB_0015bdb8:
INC RBP
JMP 0x0015bd26
LAB_0015bdc0:
MOV EAX,R12D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015bdd2:
LEA RDI,[0x1bd246]
LEA RSI,[0x1bc9f6]
LEA RCX,[0x1bd25a]
MOV EDX,0x2db
CALL 0x001512a0
|
/* OpenSubdiv::v3_6_0::Vtr::internal::Level::gatherQuadRegularRingAroundVertex(int, int*, int) const
*/
int __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::Level::gatherQuadRegularRingAroundVertex
(Level *this,int param_1,int *param_2,int param_3)
{
ushort uVar1;
long lVar2;
long lVar3;
int extraout_EDX;
uint uVar4;
int iVar5;
ulong uVar6;
int iVar7;
ulong uVar8;
int1 auVar9 [12];
int1 auVar10 [12];
getVertexEdges(this,param_1);
auVar9 = getVertexFaces(this,param_1);
uVar4 = auVar9._8_4_;
lVar2 = getVertexFaceLocalIndices(this,param_1);
uVar6 = 0;
uVar8 = 0;
if (0 < (int)uVar4) {
uVar8 = (ulong)uVar4;
}
iVar7 = 0;
while( true ) {
if (uVar8 == uVar6) {
return iVar7;
}
iVar5 = *(int *)(auVar9._0_8_ + uVar6 * 4);
if (param_3 < 0) {
auVar10 = getFaceVertices(this,iVar5);
}
else {
auVar10 = getFaceFVarValues(this,iVar5,param_3);
}
lVar3 = auVar10._0_8_;
if (auVar10._8_4_ != 4) break;
uVar1 = *(ushort *)(lVar2 + uVar6 * 2);
param_2[iVar7] = *(int *)(lVar3 + (ulong)(uVar1 + 1 & 3) * 4);
iVar5 = iVar7 + 2;
param_2[(long)iVar7 + 1] = *(int *)(lVar3 + (ulong)(uVar1 & 3 ^ 2) * 4);
if (uVar4 - 1 == uVar6 && (int)uVar4 < extraout_EDX) {
param_2[iVar5] = *(int *)(lVar3 + (ulong)(uVar1 - 1 & 3) * 4);
iVar5 = iVar7 + 3;
}
uVar6 = uVar6 + 1;
iVar7 = iVar5;
}
/* WARNING: Subroutine does not return */
__assert_fail("fPoints.size() == 4",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/level.cpp"
,0x2db,
"int OpenSubdiv::v3_6_0::Vtr::internal::Level::gatherQuadRegularRingAroundVertex(Index, int *, int) const"
);
}
| |
26,578 | OpenSubdiv::v3_6_0::Vtr::internal::Level::gatherQuadRegularRingAroundVertex(int, int*, int) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/level.cpp | int
Level::gatherQuadRegularRingAroundVertex(
Index vIndex, int ringPoints[], int fvarChannel) const {
Level const& level = *this;
ConstIndexArray vEdges = level.getVertexEdges(vIndex);
ConstIndexArray vFaces = level.getVertexFaces(vIndex);
ConstLocalIndexArray vInFaces = level.getVertexFaceLocalIndices(vIndex);
bool isBoundary = (vEdges.size() > vFaces.size());
int ringIndex = 0;
for (int i = 0; i < vFaces.size(); ++i) {
//
// For every incident quad, we want the two vertices clockwise in each face, i.e.
// the vertex at the end of the leading edge and the vertex opposite this one:
//
ConstIndexArray fPoints = (fvarChannel < 0)
? level.getFaceVertices(vFaces[i])
: level.getFaceFVarValues(vFaces[i], fvarChannel);
assert(fPoints.size() == 4);
int vInThisFace = vInFaces[i];
ringPoints[ringIndex++] = fPoints[fastMod4(vInThisFace + 1)];
ringPoints[ringIndex++] = fPoints[fastMod4(vInThisFace + 2)];
if (isBoundary && (i == (vFaces.size() - 1))) {
ringPoints[ringIndex++] = fPoints[fastMod4(vInThisFace + 3)];
}
}
return ringIndex;
} | O3 | cpp | OpenSubdiv::v3_6_0::Vtr::internal::Level::gatherQuadRegularRingAroundVertex(int, int*, int) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
leal (%rsi,%rsi), %eax
movq 0x108(%rdi), %r9
cltq
movslq (%r9,%rax,4), %r8
testq %r8, %r8
jle 0x449a5
leal 0x1(,%rsi,2), %esi
movslq %esi, %rsi
movslq (%r9,%rsi,4), %rsi
leaq (,%rsi,4), %r9
addq 0x120(%rdi), %r9
movq 0x150(%rdi), %r10
addq %rsi, %rsi
addq 0x138(%rdi), %rsi
movl (%r10,%rax,4), %r10d
movl %ecx, %eax
movq %rax, 0x20(%rsp)
movq 0x1c8(%rdi), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rdi), %rax
movq %rax, 0x10(%rsp)
movq 0x30(%rdi), %rax
movq %rax, 0x8(%rsp)
leal -0x1(%r8), %r15d
xorl %r12d, %r12d
xorl %ebp, %ebp
movslq (%r9,%r12,4), %rax
testl %ecx, %ecx
js 0x4491e
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %r11
movq (%r11,%rdi,8), %r11
movq (%r11), %rdi
leal (%rax,%rax), %r13d
movslq %r13d, %r13
movq 0x18(%rdi), %rbx
leaq (%rbx,%r13,4), %rdi
leal 0x1(,%rax,2), %eax
cltq
movslq (%rbx,%rax,4), %r13
shlq $0x2, %r13
addq 0x18(%r11), %r13
jmp 0x4493a
movq 0x10(%rsp), %r11
movslq 0x4(%r11,%rax,8), %rdi
addq %rax, %rax
movq 0x8(%rsp), %rbx
leaq (%rbx,%rdi,4), %r13
cltq
leaq (%r11,%rax,4), %rdi
cmpl $0x4, (%rdi)
jne 0x449b6
cmpl %r8d, %r10d
setg %r11b
movzwl (%rsi,%r12,2), %edi
leal 0x1(%rdi), %eax
andl $0x3, %eax
movl (%r13,%rax,4), %eax
movslq %ebp, %rbx
movl %eax, (%rdx,%rbx,4)
movl %edi, %eax
andl $0x3, %eax
xorl $0x2, %eax
movl (%r13,%rax,4), %r14d
leal 0x2(%rbx), %eax
movl %r14d, 0x4(%rdx,%rbx,4)
cmpq %r12, %r15
sete %bl
andb %r11b, %bl
cmpb $0x1, %bl
jne 0x44995
decl %edi
andl $0x3, %edi
movl (%r13,%rdi,4), %edi
addl $0x3, %ebp
cltq
movl %edi, (%rdx,%rax,4)
movl %ebp, %eax
jmp 0x44997
movl %eax, %ebp
incq %r12
cmpq %r12, %r8
jne 0x448df
jmp 0x449a7
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x718fd(%rip), %rdi # 0xb62ba
leaq 0x710a6(%rip), %rsi # 0xb5a6a
leaq 0x71903(%rip), %rcx # 0xb62ce
movl $0x2db, %edx # imm = 0x2DB
callq 0x39540
nop
| _ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level33gatherQuadRegularRingAroundVertexEiPii:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
lea eax, [rsi+rsi]
mov r9, [rdi+108h]
cdqe
movsxd r8, dword ptr [r9+rax*4]
test r8, r8
jle loc_449A5
lea esi, ds:1[rsi*2]
movsxd rsi, esi
movsxd rsi, dword ptr [r9+rsi*4]
lea r9, ds:0[rsi*4]
add r9, [rdi+120h]
mov r10, [rdi+150h]
add rsi, rsi
add rsi, [rdi+138h]
mov r10d, [r10+rax*4]
mov eax, ecx
mov [rsp+58h+var_38], rax
mov rax, [rdi+1C8h]
mov [rsp+58h+var_40], rax
mov rax, [rdi+18h]
mov [rsp+58h+var_48], rax
mov rax, [rdi+30h]
mov [rsp+58h+var_50], rax
lea r15d, [r8-1]
xor r12d, r12d
xor ebp, ebp
loc_448DF:
movsxd rax, dword ptr [r9+r12*4]
test ecx, ecx
js short loc_4491E
mov rdi, [rsp+58h+var_38]
mov r11, [rsp+58h+var_40]
mov r11, [r11+rdi*8]
mov rdi, [r11]
lea r13d, [rax+rax]
movsxd r13, r13d
mov rbx, [rdi+18h]
lea rdi, [rbx+r13*4]
lea eax, ds:1[rax*2]
cdqe
movsxd r13, dword ptr [rbx+rax*4]
shl r13, 2
add r13, [r11+18h]
jmp short loc_4493A
loc_4491E:
mov r11, [rsp+58h+var_48]
movsxd rdi, dword ptr [r11+rax*8+4]
add rax, rax
mov rbx, [rsp+58h+var_50]
lea r13, [rbx+rdi*4]
cdqe
lea rdi, [r11+rax*4]
loc_4493A:
cmp dword ptr [rdi], 4
jnz short loc_449B6
cmp r10d, r8d
setnle r11b
movzx edi, word ptr [rsi+r12*2]
lea eax, [rdi+1]
and eax, 3
mov eax, [r13+rax*4+0]
movsxd rbx, ebp
mov [rdx+rbx*4], eax
mov eax, edi
and eax, 3
xor eax, 2
mov r14d, [r13+rax*4+0]
lea eax, [rbx+2]
mov [rdx+rbx*4+4], r14d
cmp r15, r12
setz bl
and bl, r11b
cmp bl, 1
jnz short loc_44995
dec edi
and edi, 3
mov edi, [r13+rdi*4+0]
add ebp, 3
cdqe
mov [rdx+rax*4], edi
mov eax, ebp
jmp short loc_44997
loc_44995:
mov ebp, eax
loc_44997:
inc r12
cmp r8, r12
jnz loc_448DF
jmp short loc_449A7
loc_449A5:
xor eax, eax
loc_449A7:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_449B6:
lea rdi, aFpointsSize4; "fPoints.size() == 4"
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aIntOpensubdivV_1; "int OpenSubdiv::v3_6_0::Vtr::internal::"...
mov edx, 2DBh
call ___assert_fail
| long long OpenSubdiv::v3_6_0::Vtr::internal::Level::gatherQuadRegularRingAroundVertex(
OpenSubdiv::v3_6_0::Vtr::internal::Level *this,
int a2,
int *a3,
int a4)
{
long long v4; // r9
long long v5; // rax
long long v6; // r8
long long v7; // rsi
long long v8; // r9
long long v9; // rsi
int v10; // r10d
long long v11; // r12
unsigned int v12; // ebp
long long v13; // rax
_QWORD *v14; // r11
long long v15; // rbx
_DWORD *v16; // rdi
long long v17; // r13
__int16 v18; // di
long long result; // rax
long long v20; // [rsp+8h] [rbp-50h]
long long v21; // [rsp+10h] [rbp-48h]
long long v22; // [rsp+18h] [rbp-40h]
v4 = *((_QWORD *)this + 33);
v5 = 2 * a2;
v6 = *(int *)(v4 + 4 * v5);
if ( v6 <= 0 )
return 0LL;
v7 = *(int *)(v4 + 4LL * (2 * a2 + 1));
v8 = *((_QWORD *)this + 36) + 4 * v7;
v9 = *((_QWORD *)this + 39) + 2 * v7;
v10 = *(_DWORD *)(*((_QWORD *)this + 42) + 4 * v5);
v22 = *((_QWORD *)this + 57);
v21 = *((_QWORD *)this + 3);
v20 = *((_QWORD *)this + 6);
v11 = 0LL;
v12 = 0;
do
{
v13 = *(int *)(v8 + 4 * v11);
if ( a4 < 0 )
{
v17 = v20 + 4LL * *(int *)(v21 + 8 * v13 + 4);
v16 = (_DWORD *)(v21 + 8LL * (_DWORD)v13);
}
else
{
v14 = *(_QWORD **)(v22 + 8LL * (unsigned int)a4);
v15 = *(_QWORD *)(*v14 + 24LL);
v16 = (_DWORD *)(v15 + 8LL * (_DWORD)v13);
v17 = v14[3] + 4LL * *(int *)(v15 + 4LL * (2 * (int)v13 + 1));
}
if ( *v16 != 4 )
__assert_fail(
"fPoints.size() == 4",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/level.cpp",
731LL,
"int OpenSubdiv::v3_6_0::Vtr::internal::Level::gatherQuadRegularRingAroundVertex(Index, int *, int) const");
v18 = *(_WORD *)(v9 + 2 * v11);
a3[v12] = *(_DWORD *)(v17 + 4LL * (((_BYTE)v18 + 1) & 3));
result = v12 + 2;
a3[v12 + 1] = *(_DWORD *)(v17 + 4LL * (v18 & 3 ^ 2u));
if ( v10 > (int)v6 && (_DWORD)v6 - 1 == v11 )
{
v12 += 3;
a3[(int)result] = *(_DWORD *)(v17 + 4LL * (((_BYTE)v18 - 1) & 3));
result = v12;
}
else
{
v12 += 2;
}
++v11;
}
while ( v6 != v11 );
return result;
}
| gatherQuadRegularRingAroundVertex:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
LEA EAX,[RSI + RSI*0x1]
MOV R9,qword ptr [RDI + 0x108]
CDQE
MOVSXD R8,dword ptr [R9 + RAX*0x4]
TEST R8,R8
JLE 0x001449a5
LEA ESI,[0x1 + RSI*0x2]
MOVSXD RSI,ESI
MOVSXD RSI,dword ptr [R9 + RSI*0x4]
LEA R9,[RSI*0x4]
ADD R9,qword ptr [RDI + 0x120]
MOV R10,qword ptr [RDI + 0x150]
ADD RSI,RSI
ADD RSI,qword ptr [RDI + 0x138]
MOV R10D,dword ptr [R10 + RAX*0x4]
MOV EAX,ECX
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RDI + 0x1c8]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RDI + 0x18]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RDI + 0x30]
MOV qword ptr [RSP + 0x8],RAX
LEA R15D,[R8 + -0x1]
XOR R12D,R12D
XOR EBP,EBP
LAB_001448df:
MOVSXD RAX,dword ptr [R9 + R12*0x4]
TEST ECX,ECX
JS 0x0014491e
MOV RDI,qword ptr [RSP + 0x20]
MOV R11,qword ptr [RSP + 0x18]
MOV R11,qword ptr [R11 + RDI*0x8]
MOV RDI,qword ptr [R11]
LEA R13D,[RAX + RAX*0x1]
MOVSXD R13,R13D
MOV RBX,qword ptr [RDI + 0x18]
LEA RDI,[RBX + R13*0x4]
LEA EAX,[0x1 + RAX*0x2]
CDQE
MOVSXD R13,dword ptr [RBX + RAX*0x4]
SHL R13,0x2
ADD R13,qword ptr [R11 + 0x18]
JMP 0x0014493a
LAB_0014491e:
MOV R11,qword ptr [RSP + 0x10]
MOVSXD RDI,dword ptr [R11 + RAX*0x8 + 0x4]
ADD RAX,RAX
MOV RBX,qword ptr [RSP + 0x8]
LEA R13,[RBX + RDI*0x4]
CDQE
LEA RDI,[R11 + RAX*0x4]
LAB_0014493a:
CMP dword ptr [RDI],0x4
JNZ 0x001449b6
CMP R10D,R8D
SETG R11B
MOVZX EDI,word ptr [RSI + R12*0x2]
LEA EAX,[RDI + 0x1]
AND EAX,0x3
MOV EAX,dword ptr [R13 + RAX*0x4]
MOVSXD RBX,EBP
MOV dword ptr [RDX + RBX*0x4],EAX
MOV EAX,EDI
AND EAX,0x3
XOR EAX,0x2
MOV R14D,dword ptr [R13 + RAX*0x4]
LEA EAX,[RBX + 0x2]
MOV dword ptr [RDX + RBX*0x4 + 0x4],R14D
CMP R15,R12
SETZ BL
AND BL,R11B
CMP BL,0x1
JNZ 0x00144995
DEC EDI
AND EDI,0x3
MOV EDI,dword ptr [R13 + RDI*0x4]
ADD EBP,0x3
CDQE
MOV dword ptr [RDX + RAX*0x4],EDI
MOV EAX,EBP
JMP 0x00144997
LAB_00144995:
MOV EBP,EAX
LAB_00144997:
INC R12
CMP R8,R12
JNZ 0x001448df
JMP 0x001449a7
LAB_001449a5:
XOR EAX,EAX
LAB_001449a7:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001449b6:
LEA RDI,[0x1b62ba]
LEA RSI,[0x1b5a6a]
LEA RCX,[0x1b62ce]
MOV EDX,0x2db
CALL 0x00139540
|
/* OpenSubdiv::v3_6_0::Vtr::internal::Level::gatherQuadRegularRingAroundVertex(int, int*, int) const
*/
int __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::Level::gatherQuadRegularRingAroundVertex
(Level *this,int param_1,int *param_2,int param_3)
{
ushort uVar1;
int iVar2;
int iVar3;
int iVar4;
long lVar5;
long lVar6;
long lVar7;
long lVar8;
long lVar9;
long *plVar10;
int iVar11;
long lVar12;
int *piVar13;
ulong uVar14;
long lVar15;
iVar2 = *(int *)(*(long *)(this + 0x108) + (long)(param_1 * 2) * 4);
if ((long)iVar2 < 1) {
iVar11 = 0;
}
else {
lVar12 = (long)*(int *)(*(long *)(this + 0x108) + (long)(param_1 * 2 + 1) * 4);
lVar5 = *(long *)(this + 0x120);
lVar6 = *(long *)(this + 0x138);
iVar3 = *(int *)(*(long *)(this + 0x150) + (long)(param_1 * 2) * 4);
lVar7 = *(long *)(this + 0x1c8);
lVar8 = *(long *)(this + 0x18);
lVar9 = *(long *)(this + 0x30);
uVar14 = 0;
iVar11 = 0;
do {
iVar4 = *(int *)(lVar12 * 4 + lVar5 + uVar14 * 4);
if (param_3 < 0) {
lVar15 = lVar9 + (long)*(int *)(lVar8 + 4 + (long)iVar4 * 8) * 4;
piVar13 = (int *)(lVar8 + (long)(iVar4 * 2) * 4);
}
else {
plVar10 = *(long **)(lVar7 + (ulong)(uint)param_3 * 8);
lVar15 = *(long *)(*plVar10 + 0x18);
piVar13 = (int *)(lVar15 + (long)(iVar4 * 2) * 4);
lVar15 = (long)*(int *)(lVar15 + (long)(iVar4 * 2 + 1) * 4) * 4 + plVar10[3];
}
if (*piVar13 != 4) {
/* WARNING: Subroutine does not return */
__assert_fail("fPoints.size() == 4",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/level.cpp"
,0x2db,
"int OpenSubdiv::v3_6_0::Vtr::internal::Level::gatherQuadRegularRingAroundVertex(Index, int *, int) const"
);
}
uVar1 = *(ushort *)(lVar12 * 2 + lVar6 + uVar14 * 2);
param_2[iVar11] = *(int *)(lVar15 + (ulong)(uVar1 + 1 & 3) * 4);
param_2[(long)iVar11 + 1] = *(int *)(lVar15 + (ulong)(uVar1 & 3 ^ 2) * 4);
iVar4 = iVar11 + 2;
if (iVar2 - 1 == uVar14 && iVar2 < iVar3) {
param_2[iVar11 + 2] = *(int *)(lVar15 + (ulong)(uVar1 - 1 & 3) * 4);
iVar4 = iVar11 + 3;
}
iVar11 = iVar4;
uVar14 = uVar14 + 1;
} while ((long)iVar2 != uVar14);
}
return iVar11;
}
| |
26,579 | mbedtls_ecp_point_read_string | msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/ecp.c | int mbedtls_ecp_point_read_string(mbedtls_ecp_point *P, int radix,
const char *x, const char *y)
{
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
ECP_VALIDATE_RET(P != NULL);
ECP_VALIDATE_RET(x != NULL);
ECP_VALIDATE_RET(y != NULL);
MBEDTLS_MPI_CHK(mbedtls_mpi_read_string(&P->X, radix, x));
MBEDTLS_MPI_CHK(mbedtls_mpi_read_string(&P->Y, radix, y));
MBEDTLS_MPI_CHK(mbedtls_mpi_lset(&P->Z, 1));
cleanup:
return ret;
} | O3 | c | mbedtls_ecp_point_read_string:
pushq %rbp
pushq %r14
pushq %rbx
movq %rcx, %r14
movl %esi, %ebp
movq %rdi, %rbx
callq 0x7e33b
testl %eax, %eax
jne 0x8457b
leaq 0x18(%rbx), %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x7e33b
testl %eax, %eax
je 0x84580
popq %rbx
popq %r14
popq %rbp
retq
addq $0x30, %rbx
movl $0x1, %esi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x7e18c
| mbedtls_ecp_point_read_string:
push rbp
push r14
push rbx
mov r14, rcx
mov ebp, esi
mov rbx, rdi
call mbedtls_mpi_read_string
test eax, eax
jnz short loc_8457B
lea rdi, [rbx+18h]
mov esi, ebp
mov rdx, r14
call mbedtls_mpi_read_string
test eax, eax
jz short loc_84580
loc_8457B:
pop rbx
pop r14
pop rbp
retn
loc_84580:
add rbx, 30h ; '0'
mov esi, 1
mov rdi, rbx
pop rbx
pop r14
pop rbp
jmp mbedtls_mpi_lset
| long long mbedtls_ecp_point_read_string(long long a1, long long a2, char *a3, char *a4, long long a5, long long a6)
{
long long result; // rax
long long v8; // rcx
long long v9; // r8
long long v10; // r9
result = mbedtls_mpi_read_string(a1, a2, a3, (long long)a4, a5, a6);
if ( !(_DWORD)result )
{
result = mbedtls_mpi_read_string(a1 + 24, (unsigned int)a2, a4, v8, v9, v10);
if ( !(_DWORD)result )
return mbedtls_mpi_lset(a1 + 48, 1LL);
}
return result;
}
| mbedtls_ecp_point_read_string:
PUSH RBP
PUSH R14
PUSH RBX
MOV R14,RCX
MOV EBP,ESI
MOV RBX,RDI
CALL 0x0017e33b
TEST EAX,EAX
JNZ 0x0018457b
LEA RDI,[RBX + 0x18]
MOV ESI,EBP
MOV RDX,R14
CALL 0x0017e33b
TEST EAX,EAX
JZ 0x00184580
LAB_0018457b:
POP RBX
POP R14
POP RBP
RET
LAB_00184580:
ADD RBX,0x30
MOV ESI,0x1
MOV RDI,RBX
POP RBX
POP R14
POP RBP
JMP 0x0017e18c
|
void mbedtls_ecp_point_read_string
(long param_1,int4 param_2,int8 param_3,int8 param_4)
{
int iVar1;
iVar1 = mbedtls_mpi_read_string();
if (iVar1 == 0) {
iVar1 = mbedtls_mpi_read_string(param_1 + 0x18,param_2,param_4);
if (iVar1 == 0) {
mbedtls_mpi_lset(param_1 + 0x30,1);
return;
}
}
return;
}
| |
26,580 | flush_partitioned_key_cache_blocks | eloqsql/mysys/mf_keycache.c | static
int flush_partitioned_key_cache_blocks(PARTITIONED_KEY_CACHE_CB *keycache,
File file, void *file_extra,
enum flush_type type)
{
uint i;
uint partitions= keycache->partitions;
int err= 0;
ulonglong *dirty_part_map= (ulonglong *) file_extra;
DBUG_ENTER("partitioned_flush_key_blocks");
DBUG_PRINT("enter", ("keycache: %p", keycache));
for (i= 0; i < partitions; i++)
{
SIMPLE_KEY_CACHE_CB *partition= keycache->partition_array[i];
if ((type == FLUSH_KEEP || type == FLUSH_FORCE_WRITE) &&
!((*dirty_part_map) & ((ulonglong) 1 << i)))
continue;
err|= MY_TEST(flush_simple_key_cache_blocks(partition, file, 0, type));
}
*dirty_part_map= 0;
DBUG_RETURN(err);
} | O0 | c | flush_partitioned_key_cache_blocks:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0xe8411
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x24(%rbp), %eax
jae 0xe8492
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x20(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0xe843f
cmpl $0x3, -0x1c(%rbp)
jne 0xe845f
movq -0x30(%rbp), %rax
movq (%rax), %rax
movl -0x20(%rbp), %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0xe845f
jmp 0xe8487
movq -0x38(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x1c(%rbp), %ecx
xorl %eax, %eax
movl %eax, %edx
callq 0xe69d0
movl %eax, %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
orl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0xe8418
movq -0x30(%rbp), %rax
movq $0x0, (%rax)
movl -0x28(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
| flush_partitioned_key_cache_blocks:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov rax, [rbp+var_8]
mov eax, [rax+1Ch]
mov [rbp+var_24], eax
mov [rbp+var_28], 0
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
jmp short $+2
loc_E8411:
mov [rbp+var_20], 0
loc_E8418:
mov eax, [rbp+var_20]
cmp eax, [rbp+var_24]
jnb short loc_E8492
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov ecx, [rbp+var_20]
mov rax, [rax+rcx*8]
mov [rbp+var_38], rax
cmp [rbp+var_1C], 0
jz short loc_E843F
cmp [rbp+var_1C], 3
jnz short loc_E845F
loc_E843F:
mov rax, [rbp+var_30]
mov rax, [rax]
mov ecx, [rbp+var_20]
mov edx, 1
shl rdx, cl
mov rcx, rdx
and rax, rcx
cmp rax, 0
jnz short loc_E845F
jmp short loc_E8487
loc_E845F:
mov rdi, [rbp+var_38]
mov esi, [rbp+var_C]
mov ecx, [rbp+var_1C]
xor eax, eax
mov edx, eax
call flush_simple_key_cache_blocks
mov edx, eax
xor eax, eax
mov ecx, 1
cmp edx, 0
cmovnz eax, ecx
or eax, [rbp+var_28]
mov [rbp+var_28], eax
loc_E8487:
mov eax, [rbp+var_20]
add eax, 1
mov [rbp+var_20], eax
jmp short loc_E8418
loc_E8492:
mov rax, [rbp+var_30]
mov qword ptr [rax], 0
mov eax, [rbp+var_28]
mov [rbp+var_3C], eax
mov eax, [rbp+var_3C]
add rsp, 40h
pop rbp
retn
| long long flush_partitioned_key_cache_blocks(long long a1, unsigned int a2, _QWORD *a3, unsigned int a4)
{
unsigned int v6; // [rsp+18h] [rbp-28h]
unsigned int v7; // [rsp+1Ch] [rbp-24h]
unsigned int i; // [rsp+20h] [rbp-20h]
v7 = *(_DWORD *)(a1 + 28);
v6 = 0;
for ( i = 0; i < v7; ++i )
{
if ( a4 && a4 != 3 || ((1LL << i) & *a3) != 0 )
v6 |= (unsigned int)flush_simple_key_cache_blocks(*(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL * i), a2, 0LL, a4) != 0;
}
*a3 = 0LL;
return v6;
}
| flush_partitioned_key_cache_blocks:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x1c]
MOV dword ptr [RBP + -0x24],EAX
MOV dword ptr [RBP + -0x28],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001e8411
LAB_001e8411:
MOV dword ptr [RBP + -0x20],0x0
LAB_001e8418:
MOV EAX,dword ptr [RBP + -0x20]
CMP EAX,dword ptr [RBP + -0x24]
JNC 0x001e8492
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x38],RAX
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x001e843f
CMP dword ptr [RBP + -0x1c],0x3
JNZ 0x001e845f
LAB_001e843f:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x20]
MOV EDX,0x1
SHL RDX,CL
MOV RCX,RDX
AND RAX,RCX
CMP RAX,0x0
JNZ 0x001e845f
JMP 0x001e8487
LAB_001e845f:
MOV RDI,qword ptr [RBP + -0x38]
MOV ESI,dword ptr [RBP + -0xc]
MOV ECX,dword ptr [RBP + -0x1c]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x001e69d0
MOV EDX,EAX
XOR EAX,EAX
MOV ECX,0x1
CMP EDX,0x0
CMOVNZ EAX,ECX
OR EAX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x28],EAX
LAB_001e8487:
MOV EAX,dword ptr [RBP + -0x20]
ADD EAX,0x1
MOV dword ptr [RBP + -0x20],EAX
JMP 0x001e8418
LAB_001e8492:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],0x0
MOV EAX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x3c],EAX
MOV EAX,dword ptr [RBP + -0x3c]
ADD RSP,0x40
POP RBP
RET
|
byte flush_partitioned_key_cache_blocks(long param_1,int4 param_2,ulong *param_3,int param_4)
{
uint uVar1;
byte bVar2;
int iVar3;
uint local_28;
uVar1 = *(uint *)(param_1 + 0x1c);
bVar2 = 0;
for (local_28 = 0; local_28 < uVar1; local_28 = local_28 + 1) {
if (((param_4 != 0) && (param_4 != 3)) || ((*param_3 & 1L << ((byte)local_28 & 0x3f)) != 0)) {
iVar3 = flush_simple_key_cache_blocks
(*(int8 *)(*(long *)(param_1 + 8) + (ulong)local_28 * 8),param_2,0,
param_4);
bVar2 = iVar3 != 0 | bVar2;
}
}
*param_3 = 0;
return bVar2;
}
| |
26,581 | Catch::Totals::delta(Catch::Totals const&) const | AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp | Totals Totals::delta( Totals const& prevTotals ) const {
Totals diff = *this - prevTotals;
if( diff.assertions.failed > 0 )
++diff.testCases.failed;
else if( diff.assertions.failedButOk > 0 )
++diff.testCases.failedButOk;
else if ( diff.assertions.skipped > 0 )
++ diff.testCases.skipped;
else
++diff.testCases.passed;
return diff;
} | O3 | cpp | Catch::Totals::delta(Catch::Totals const&) const:
pushq %rbx
movq %rdi, %rbx
callq 0x5890a
movl $0x28, %eax
cmpq $0x0, 0x8(%rbx)
jne 0x589da
movl $0x30, %eax
cmpq $0x0, 0x10(%rbx)
jne 0x589da
cmpq $0x0, 0x18(%rbx)
movl $0x20, %ecx
movl $0x38, %eax
cmoveq %rcx, %rax
incq (%rbx,%rax)
movq %rbx, %rax
popq %rbx
retq
nop
| _ZNK5Catch6Totals5deltaERKS0_:
push rbx
mov rbx, rdi
call _ZNK5Catch6TotalsmiERKS0_; Catch::Totals::operator-(Catch::Totals const&)
mov eax, 28h ; '('
cmp qword ptr [rbx+8], 0
jnz short loc_589DA
mov eax, 30h ; '0'
cmp qword ptr [rbx+10h], 0
jnz short loc_589DA
cmp qword ptr [rbx+18h], 0
mov ecx, 20h ; ' '
mov eax, 38h ; '8'
cmovz rax, rcx
loc_589DA:
inc qword ptr [rbx+rax]
mov rax, rbx
pop rbx
retn
| __m128i * Catch::Totals::delta(__m128i *a1, const __m128i *a2, const __m128i *a3)
{
long long v3; // rax
Catch::Totals::operator-(a1, a2, a3);
v3 = 5LL;
if ( !a1->m128i_i64[1] )
{
v3 = 6LL;
if ( !a1[1].m128i_i64[0] )
{
v3 = 7LL;
if ( !a1[1].m128i_i64[1] )
v3 = 4LL;
}
}
++a1->m128i_i64[v3];
return a1;
}
| delta:
PUSH RBX
MOV RBX,RDI
CALL 0x0015890a
MOV EAX,0x28
CMP qword ptr [RBX + 0x8],0x0
JNZ 0x001589da
MOV EAX,0x30
CMP qword ptr [RBX + 0x10],0x0
JNZ 0x001589da
CMP qword ptr [RBX + 0x18],0x0
MOV ECX,0x20
MOV EAX,0x38
CMOVZ RAX,RCX
LAB_001589da:
INC qword ptr [RBX + RAX*0x1]
MOV RAX,RBX
POP RBX
RET
|
/* Catch::Totals::delta(Catch::Totals const&) const */
Totals * __thiscall Catch::Totals::delta(Totals *this,Totals *param_1)
{
long lVar1;
operator-(this,param_1);
lVar1 = 0x28;
if (((*(long *)(this + 8) == 0) && (lVar1 = 0x30, *(long *)(this + 0x10) == 0)) &&
(lVar1 = 0x38, *(long *)(this + 0x18) == 0)) {
lVar1 = 0x20;
}
*(long *)(this + lVar1) = *(long *)(this + lVar1) + 1;
return this;
}
| |
26,582 | ftparser_alloc_param | eloqsql/storage/myisam/ft_parser.c | MYSQL_FTPARSER_PARAM* ftparser_alloc_param(MI_INFO *info)
{
if (!info->ftparser_param)
{
/*
. info->ftparser_param can not be zero after the initialization,
because it always includes built-in fulltext parser. And built-in
parser can be called even if the table has no fulltext indexes and
no varchar/text fields.
ftb_find_relevance... parser (ftb_find_relevance_parse,
ftb_find_relevance_add_word) calls ftb_check_phrase... parser
(ftb_check_phrase_internal, ftb_phrase_add_word). Thus MAX_PARAM_NR=2.
*/
info->ftparser_param= (MYSQL_FTPARSER_PARAM *)
my_malloc(mi_key_memory_FTPARSER_PARAM,
MAX_PARAM_NR * sizeof(MYSQL_FTPARSER_PARAM) * info->s->ftkeys,
MYF(MY_WME | MY_ZEROFILL));
init_alloc_root(mi_key_memory_ft_memroot, &info->ft_memroot,
FTPARSER_MEMROOT_ALLOC_SIZE, 0, MYF(0));
}
return info->ftparser_param;
} | O3 | c | ftparser_alloc_param:
movq 0xd0(%rdi), %rax
testq %rax, %rax
je 0x8ed6c
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xb991a0(%rip), %rax # 0xc27f1c
movl (%rax), %edi
movq (%rbx), %rax
movl 0x34c(%rax), %esi
shlq $0x7, %rsi
movl $0x30, %edx
callq 0xbf321
movq %rax, 0xd0(%rbx)
leaq 0xb9917d(%rip), %rax # 0xc27f20
movl (%rax), %edi
leaq 0x90(%rbx), %rsi
movl $0x10000, %edx # imm = 0x10000
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xb96e8
movq 0xd0(%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| ftparser_alloc_param:
mov rax, [rdi+0D0h]
test rax, rax
jz short loc_8ED6C
retn
loc_8ED6C:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
lea rax, mi_key_memory_FTPARSER_PARAM
mov edi, [rax]
mov rax, [rbx]
mov esi, [rax+34Ch]
shl rsi, 7
mov edx, 30h ; '0'
call my_malloc
mov [rbx+0D0h], rax
lea rax, mi_key_memory_ft_memroot
mov edi, [rax]
lea rsi, [rbx+90h]
mov edx, 10000h
xor ecx, ecx
xor r8d, r8d
call init_alloc_root
mov rax, [rbx+0D0h]
add rsp, 8
pop rbx
pop rbp
retn
| long long ftparser_alloc_param(_QWORD *a1)
{
long long result; // rax
result = a1[26];
if ( !result )
{
a1[26] = my_malloc(mi_key_memory_FTPARSER_PARAM, (unsigned long long)*(unsigned int *)(*a1 + 844LL) << 7, 48LL);
init_alloc_root(mi_key_memory_ft_memroot, a1 + 18, 0x10000LL, 0LL, 0LL);
return a1[26];
}
return result;
}
| ftparser_alloc_param:
MOV RAX,qword ptr [RDI + 0xd0]
TEST RAX,RAX
JZ 0x0018ed6c
RET
LAB_0018ed6c:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA RAX,[0xd27f1c]
MOV EDI,dword ptr [RAX]
MOV RAX,qword ptr [RBX]
MOV ESI,dword ptr [RAX + 0x34c]
SHL RSI,0x7
MOV EDX,0x30
CALL 0x001bf321
MOV qword ptr [RBX + 0xd0],RAX
LEA RAX,[0xd27f20]
MOV EDI,dword ptr [RAX]
LEA RSI,[RBX + 0x90]
MOV EDX,0x10000
XOR ECX,ECX
XOR R8D,R8D
CALL 0x001b96e8
MOV RAX,qword ptr [RBX + 0xd0]
ADD RSP,0x8
POP RBX
POP RBP
RET
|
long ftparser_alloc_param(long *param_1)
{
long lVar1;
int8 in_R9;
long lVar2;
lVar2 = param_1[0x1a];
if (lVar2 != 0) {
return lVar2;
}
lVar1 = my_malloc(mi_key_memory_FTPARSER_PARAM,(ulong)*(uint *)(*param_1 + 0x34c) << 7,0x30);
param_1[0x1a] = lVar1;
init_alloc_root(mi_key_memory_ft_memroot,param_1 + 0x12,0x10000,0,0,in_R9,lVar2);
return param_1[0x1a];
}
| |
26,583 | join_same_trees | eloqsql/storage/myisam/myisampack.c | static uint join_same_trees(HUFF_COUNTS *huff_counts, uint trees)
{
uint k,tree_number;
HUFF_COUNTS count,*i,*j,*last_count;
last_count=huff_counts+trees;
for (tree_number=0, i=huff_counts ; i < last_count ; i++)
{
if (!i->tree->tree_number)
{
i->tree->tree_number= ++tree_number;
if (i->tree_buff)
continue; /* Don't join intervall */
for (j=i+1 ; j < last_count ; j++)
{
if (! j->tree->tree_number && ! j->tree_buff)
{
for (k=0 ; k < 256 ; k++)
count.counts[k]=i->counts[k]+j->counts[k];
if (calc_packed_length(&count,1) <=
i->tree->bytes_packed + j->tree->bytes_packed+
i->tree->tree_pack_length+j->tree->tree_pack_length+
ALLOWED_JOIN_DIFF)
{
memcpy(i->counts, count.counts,
sizeof(count.counts[0])*256);
my_free(j->tree->element_buffer);
j->tree->element_buffer=0;
j->tree=i->tree;
bmove((uchar*) i->counts,(uchar*) count.counts,
sizeof(count.counts[0])*256);
if (make_huff_tree(i->tree,i))
return (uint) -1;
}
}
}
}
}
DBUG_PRINT("info", ("Original trees: %d After join: %d",
trees, tree_number));
if (verbose)
printf("Original trees: %d After join: %d\n", trees, tree_number);
return tree_number; /* Return trees left */
} | O0 | c | join_same_trees:
pushq %rbp
movq %rsp, %rbp
subq $0xbc0, %rsp # imm = 0xBC0
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
imulq $0xb88, %rcx, %rcx # imm = 0xB88
addq %rcx, %rax
movq %rax, -0xbc0(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xbb0(%rbp)
movq -0xbb0(%rbp), %rax
cmpq -0xbc0(%rbp), %rax
jae 0x2c677
movq -0xbb0(%rbp), %rax
movq 0x30(%rax), %rax
cmpl $0x0, 0x18(%rax)
jne 0x2c65c
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x1c(%rbp)
movq -0xbb0(%rbp), %rax
movq 0x30(%rax), %rax
movl %ecx, 0x18(%rax)
movq -0xbb0(%rbp), %rax
cmpq $0x0, 0xb78(%rax)
je 0x2c4a2
jmp 0x2c65e
movq -0xbb0(%rbp), %rax
addq $0xb88, %rax # imm = 0xB88
movq %rax, -0xbb8(%rbp)
movq -0xbb8(%rbp), %rax
cmpq -0xbc0(%rbp), %rax
jae 0x2c65a
movq -0xbb8(%rbp), %rax
movq 0x30(%rax), %rax
cmpl $0x0, 0x18(%rax)
jne 0x2c63f
movq -0xbb8(%rbp), %rax
cmpq $0x0, 0xb78(%rax)
jne 0x2c63f
movl $0x0, -0x18(%rbp)
cmpl $0x100, -0x18(%rbp) # imm = 0x100
jae 0x2c538
movq -0xbb0(%rbp), %rax
movl -0x18(%rbp), %ecx
movq 0x38(%rax,%rcx,8), %rcx
movq -0xbb8(%rbp), %rax
movl -0x18(%rbp), %edx
addq 0x38(%rax,%rdx,8), %rcx
movl -0x18(%rbp), %eax
movq %rcx, -0xb70(%rbp,%rax,8)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x2c4fb
leaq -0xba8(%rbp), %rdi
movl $0x1, %esi
callq 0x2ecd0
movq -0xbb0(%rbp), %rcx
movq 0x30(%rcx), %rcx
movq 0x20(%rcx), %rcx
movq -0xbb8(%rbp), %rdx
movq 0x30(%rdx), %rdx
addq 0x20(%rdx), %rcx
movq -0xbb0(%rbp), %rdx
movq 0x30(%rdx), %rdx
movl 0x28(%rdx), %edx
addq %rdx, %rcx
movq -0xbb8(%rbp), %rdx
movq 0x30(%rdx), %rdx
movl 0x28(%rdx), %edx
addq %rdx, %rcx
addq $0x100, %rcx # imm = 0x100
cmpq %rcx, %rax
ja 0x2c63d
movq -0xbb0(%rbp), %rdi
addq $0x38, %rdi
leaq -0xba8(%rbp), %rsi
addq $0x38, %rsi
movl $0x800, %edx # imm = 0x800
callq 0x292d0
movq -0xbb8(%rbp), %rax
movq 0x30(%rax), %rax
movq 0x8(%rax), %rdi
callq 0x8acb0
movq -0xbb8(%rbp), %rax
movq 0x30(%rax), %rax
movq $0x0, 0x8(%rax)
movq -0xbb0(%rbp), %rax
movq 0x30(%rax), %rcx
movq -0xbb8(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0xbb0(%rbp), %rdi
addq $0x38, %rdi
leaq -0xba8(%rbp), %rsi
addq $0x38, %rsi
movl $0x800, %edx # imm = 0x800
callq 0x296b0
movq -0xbb0(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0xbb0(%rbp), %rsi
callq 0x2f160
cmpl $0x0, %eax
je 0x2c63b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2c69e
jmp 0x2c63d
jmp 0x2c63f
jmp 0x2c641
movq -0xbb8(%rbp), %rax
addq $0xb88, %rax # imm = 0xB88
movq %rax, -0xbb8(%rbp)
jmp 0x2c4b6
jmp 0x2c65c
jmp 0x2c65e
movq -0xbb0(%rbp), %rax
addq $0xb88, %rax # imm = 0xB88
movq %rax, -0xbb0(%rbp)
jmp 0x2c44c
jmp 0x2c679
jmp 0x2c67b
cmpl $0x0, 0x3d0e92(%rip) # 0x3fd514
je 0x2c698
movl -0x14(%rbp), %esi
movl -0x1c(%rbp), %edx
leaq 0xb736e(%rip), %rdi # 0xe39ff
movb $0x0, %al
callq 0x29050
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xbc0, %rsp # imm = 0xBC0
popq %rbp
retq
nopw (%rax,%rax)
| join_same_trees:
push rbp
mov rbp, rsp
sub rsp, 0BC0h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov rax, [rbp+var_10]
mov ecx, [rbp+var_14]
imul rcx, 0B88h
add rax, rcx
mov [rbp+var_BC0], rax
mov [rbp+var_1C], 0
mov rax, [rbp+var_10]
mov [rbp+var_BB0], rax
loc_2C44C:
mov rax, [rbp+var_BB0]
cmp rax, [rbp+var_BC0]
jnb loc_2C677
mov rax, [rbp+var_BB0]
mov rax, [rax+30h]
cmp dword ptr [rax+18h], 0
jnz loc_2C65C
mov ecx, [rbp+var_1C]
add ecx, 1
mov [rbp+var_1C], ecx
mov rax, [rbp+var_BB0]
mov rax, [rax+30h]
mov [rax+18h], ecx
mov rax, [rbp+var_BB0]
cmp qword ptr [rax+0B78h], 0
jz short loc_2C4A2
jmp loc_2C65E
loc_2C4A2:
mov rax, [rbp+var_BB0]
add rax, 0B88h
mov [rbp+var_BB8], rax
loc_2C4B6:
mov rax, [rbp+var_BB8]
cmp rax, [rbp+var_BC0]
jnb loc_2C65A
mov rax, [rbp+var_BB8]
mov rax, [rax+30h]
cmp dword ptr [rax+18h], 0
jnz loc_2C63F
mov rax, [rbp+var_BB8]
cmp qword ptr [rax+0B78h], 0
jnz loc_2C63F
mov [rbp+var_18], 0
loc_2C4FB:
cmp [rbp+var_18], 100h
jnb short loc_2C538
mov rax, [rbp+var_BB0]
mov ecx, [rbp+var_18]
mov rcx, [rax+rcx*8+38h]
mov rax, [rbp+var_BB8]
mov edx, [rbp+var_18]
add rcx, [rax+rdx*8+38h]
mov eax, [rbp+var_18]
mov [rbp+rax*8+var_B70], rcx
mov eax, [rbp+var_18]
add eax, 1
mov [rbp+var_18], eax
jmp short loc_2C4FB
loc_2C538:
lea rdi, [rbp+var_BA8]
mov esi, 1
call calc_packed_length
mov rcx, [rbp+var_BB0]
mov rcx, [rcx+30h]
mov rcx, [rcx+20h]
mov rdx, [rbp+var_BB8]
mov rdx, [rdx+30h]
add rcx, [rdx+20h]
mov rdx, [rbp+var_BB0]
mov rdx, [rdx+30h]
mov edx, [rdx+28h]
add rcx, rdx
mov rdx, [rbp+var_BB8]
mov rdx, [rdx+30h]
mov edx, [rdx+28h]
add rcx, rdx
add rcx, 100h
cmp rax, rcx
ja loc_2C63D
mov rdi, [rbp+var_BB0]
add rdi, 38h ; '8'
lea rsi, [rbp+var_BA8]
add rsi, 38h ; '8'
mov edx, 800h
call _memcpy
mov rax, [rbp+var_BB8]
mov rax, [rax+30h]
mov rdi, [rax+8]
call my_free
mov rax, [rbp+var_BB8]
mov rax, [rax+30h]
mov qword ptr [rax+8], 0
mov rax, [rbp+var_BB0]
mov rcx, [rax+30h]
mov rax, [rbp+var_BB8]
mov [rax+30h], rcx
mov rdi, [rbp+var_BB0]
add rdi, 38h ; '8'
lea rsi, [rbp+var_BA8]
add rsi, 38h ; '8'
mov edx, 800h
call _memmove
mov rax, [rbp+var_BB0]
mov rdi, [rax+30h]
mov rsi, [rbp+var_BB0]
call make_huff_tree
cmp eax, 0
jz short loc_2C63B
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_2C69E
loc_2C63B:
jmp short $+2
loc_2C63D:
jmp short $+2
loc_2C63F:
jmp short $+2
loc_2C641:
mov rax, [rbp+var_BB8]
add rax, 0B88h
mov [rbp+var_BB8], rax
jmp loc_2C4B6
loc_2C65A:
jmp short $+2
loc_2C65C:
jmp short $+2
loc_2C65E:
mov rax, [rbp+var_BB0]
add rax, 0B88h
mov [rbp+var_BB0], rax
jmp loc_2C44C
loc_2C677:
jmp short $+2
loc_2C679:
jmp short $+2
loc_2C67B:
cmp cs:verbose, 0
jz short loc_2C698
mov esi, [rbp+var_14]
mov edx, [rbp+var_1C]
lea rdi, aOriginalTreesD; "Original trees: %d After join: %d\n"
mov al, 0
call _printf
loc_2C698:
mov eax, [rbp+var_1C]
mov [rbp+var_4], eax
loc_2C69E:
mov eax, [rbp+var_4]
add rsp, 0BC0h
pop rbp
retn
| long long join_same_trees(unsigned long long a1, unsigned int a2)
{
unsigned long long v3; // [rsp+0h] [rbp-BC0h]
unsigned long long j; // [rsp+8h] [rbp-BB8h]
unsigned long long i; // [rsp+10h] [rbp-BB0h]
_BYTE v6[56]; // [rsp+18h] [rbp-BA8h] BYREF
_QWORD v7[362]; // [rsp+50h] [rbp-B70h] BYREF
unsigned int v8; // [rsp+BA4h] [rbp-1Ch]
unsigned int k; // [rsp+BA8h] [rbp-18h]
int v10; // [rsp+BACh] [rbp-14h]
unsigned long long v11; // [rsp+BB0h] [rbp-10h]
v11 = a1;
v10 = a2;
v3 = 2952LL * a2 + a1;
v8 = 0;
for ( i = a1; i < v3; i += 2952LL )
{
if ( !*(_DWORD *)(*(_QWORD *)(i + 48) + 24LL) )
{
*(_DWORD *)(*(_QWORD *)(i + 48) + 24LL) = ++v8;
if ( !*(_QWORD *)(i + 2936) )
{
for ( j = i + 2952; j < v3; j += 2952LL )
{
if ( !*(_DWORD *)(*(_QWORD *)(j + 48) + 24LL) && !*(_QWORD *)(j + 2936) )
{
for ( k = 0; k < 0x100; ++k )
v7[k] = *(_QWORD *)(j + 8LL * k + 56) + *(_QWORD *)(i + 8LL * k + 56);
if ( calc_packed_length(v6, 1LL) <= *(unsigned int *)(*(_QWORD *)(j + 48) + 40LL)
+ (unsigned long long)*(unsigned int *)(*(_QWORD *)(i + 48) + 40LL)
+ *(_QWORD *)(*(_QWORD *)(j + 48) + 32LL)
+ *(_QWORD *)(*(_QWORD *)(i + 48) + 32LL)
+ 256 )
{
memcpy(i + 56, v7, 2048LL);
my_free(*(_QWORD *)(*(_QWORD *)(j + 48) + 8LL));
*(_QWORD *)(*(_QWORD *)(j + 48) + 8LL) = 0LL;
*(_QWORD *)(j + 48) = *(_QWORD *)(i + 48);
memmove(i + 56, v7, 2048LL);
if ( (unsigned int)make_huff_tree(*(_QWORD *)(i + 48), i) )
return (unsigned int)-1;
}
}
}
}
}
}
if ( verbose )
printf("Original trees: %d After join: %d\n", v10, v8);
return v8;
}
| join_same_trees:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xbc0
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x14]
IMUL RCX,RCX,0xb88
ADD RAX,RCX
MOV qword ptr [RBP + -0xbc0],RAX
MOV dword ptr [RBP + -0x1c],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0xbb0],RAX
LAB_0012c44c:
MOV RAX,qword ptr [RBP + -0xbb0]
CMP RAX,qword ptr [RBP + -0xbc0]
JNC 0x0012c677
MOV RAX,qword ptr [RBP + -0xbb0]
MOV RAX,qword ptr [RAX + 0x30]
CMP dword ptr [RAX + 0x18],0x0
JNZ 0x0012c65c
MOV ECX,dword ptr [RBP + -0x1c]
ADD ECX,0x1
MOV dword ptr [RBP + -0x1c],ECX
MOV RAX,qword ptr [RBP + -0xbb0]
MOV RAX,qword ptr [RAX + 0x30]
MOV dword ptr [RAX + 0x18],ECX
MOV RAX,qword ptr [RBP + -0xbb0]
CMP qword ptr [RAX + 0xb78],0x0
JZ 0x0012c4a2
JMP 0x0012c65e
LAB_0012c4a2:
MOV RAX,qword ptr [RBP + -0xbb0]
ADD RAX,0xb88
MOV qword ptr [RBP + -0xbb8],RAX
LAB_0012c4b6:
MOV RAX,qword ptr [RBP + -0xbb8]
CMP RAX,qword ptr [RBP + -0xbc0]
JNC 0x0012c65a
MOV RAX,qword ptr [RBP + -0xbb8]
MOV RAX,qword ptr [RAX + 0x30]
CMP dword ptr [RAX + 0x18],0x0
JNZ 0x0012c63f
MOV RAX,qword ptr [RBP + -0xbb8]
CMP qword ptr [RAX + 0xb78],0x0
JNZ 0x0012c63f
MOV dword ptr [RBP + -0x18],0x0
LAB_0012c4fb:
CMP dword ptr [RBP + -0x18],0x100
JNC 0x0012c538
MOV RAX,qword ptr [RBP + -0xbb0]
MOV ECX,dword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX + RCX*0x8 + 0x38]
MOV RAX,qword ptr [RBP + -0xbb8]
MOV EDX,dword ptr [RBP + -0x18]
ADD RCX,qword ptr [RAX + RDX*0x8 + 0x38]
MOV EAX,dword ptr [RBP + -0x18]
MOV qword ptr [RBP + RAX*0x8 + -0xb70],RCX
MOV EAX,dword ptr [RBP + -0x18]
ADD EAX,0x1
MOV dword ptr [RBP + -0x18],EAX
JMP 0x0012c4fb
LAB_0012c538:
LEA RDI,[RBP + -0xba8]
MOV ESI,0x1
CALL 0x0012ecd0
MOV RCX,qword ptr [RBP + -0xbb0]
MOV RCX,qword ptr [RCX + 0x30]
MOV RCX,qword ptr [RCX + 0x20]
MOV RDX,qword ptr [RBP + -0xbb8]
MOV RDX,qword ptr [RDX + 0x30]
ADD RCX,qword ptr [RDX + 0x20]
MOV RDX,qword ptr [RBP + -0xbb0]
MOV RDX,qword ptr [RDX + 0x30]
MOV EDX,dword ptr [RDX + 0x28]
ADD RCX,RDX
MOV RDX,qword ptr [RBP + -0xbb8]
MOV RDX,qword ptr [RDX + 0x30]
MOV EDX,dword ptr [RDX + 0x28]
ADD RCX,RDX
ADD RCX,0x100
CMP RAX,RCX
JA 0x0012c63d
MOV RDI,qword ptr [RBP + -0xbb0]
ADD RDI,0x38
LEA RSI,[RBP + -0xba8]
ADD RSI,0x38
MOV EDX,0x800
CALL 0x001292d0
MOV RAX,qword ptr [RBP + -0xbb8]
MOV RAX,qword ptr [RAX + 0x30]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x0018acb0
MOV RAX,qword ptr [RBP + -0xbb8]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RAX + 0x8],0x0
MOV RAX,qword ptr [RBP + -0xbb0]
MOV RCX,qword ptr [RAX + 0x30]
MOV RAX,qword ptr [RBP + -0xbb8]
MOV qword ptr [RAX + 0x30],RCX
MOV RDI,qword ptr [RBP + -0xbb0]
ADD RDI,0x38
LEA RSI,[RBP + -0xba8]
ADD RSI,0x38
MOV EDX,0x800
CALL 0x001296b0
MOV RAX,qword ptr [RBP + -0xbb0]
MOV RDI,qword ptr [RAX + 0x30]
MOV RSI,qword ptr [RBP + -0xbb0]
CALL 0x0012f160
CMP EAX,0x0
JZ 0x0012c63b
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0012c69e
LAB_0012c63b:
JMP 0x0012c63d
LAB_0012c63d:
JMP 0x0012c63f
LAB_0012c63f:
JMP 0x0012c641
LAB_0012c641:
MOV RAX,qword ptr [RBP + -0xbb8]
ADD RAX,0xb88
MOV qword ptr [RBP + -0xbb8],RAX
JMP 0x0012c4b6
LAB_0012c65a:
JMP 0x0012c65c
LAB_0012c65c:
JMP 0x0012c65e
LAB_0012c65e:
MOV RAX,qword ptr [RBP + -0xbb0]
ADD RAX,0xb88
MOV qword ptr [RBP + -0xbb0],RAX
JMP 0x0012c44c
LAB_0012c677:
JMP 0x0012c679
LAB_0012c679:
JMP 0x0012c67b
LAB_0012c67b:
CMP dword ptr [0x004fd514],0x0
JZ 0x0012c698
MOV ESI,dword ptr [RBP + -0x14]
MOV EDX,dword ptr [RBP + -0x1c]
LEA RDI,[0x1e39ff]
MOV AL,0x0
CALL 0x00129050
LAB_0012c698:
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x4],EAX
LAB_0012c69e:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0xbc0
POP RBP
RET
|
uint join_same_trees(ulong param_1,uint param_2)
{
ulong uVar1;
ulong uVar2;
int iVar3;
ulong uVar4;
ulong uVar5;
ulong local_bc0;
ulong local_bb8;
int1 local_bb0 [56];
long alStack_b78 [362];
uint local_24;
uint local_20;
uint local_1c;
ulong local_18;
uVar4 = param_1 + (ulong)param_2 * 0xb88;
local_24 = 0;
local_bb8 = param_1;
local_1c = param_2;
local_18 = param_1;
do {
if (uVar4 <= local_bb8) {
if (verbose != 0) {
printf("Original trees: %d After join: %d\n",(ulong)local_1c,(ulong)local_24);
}
return local_24;
}
if (*(int *)(*(long *)(local_bb8 + 0x30) + 0x18) == 0) {
local_24 = local_24 + 1;
*(uint *)(*(long *)(local_bb8 + 0x30) + 0x18) = local_24;
uVar2 = local_bb8;
if (*(long *)(local_bb8 + 0xb78) == 0) {
while (uVar1 = uVar2, local_bc0 = uVar1 + 0xb88, local_bc0 < uVar4) {
uVar2 = local_bc0;
if ((*(int *)(*(long *)(uVar1 + 3000) + 0x18) == 0) &&
(uVar2 = local_bc0, *(long *)(uVar1 + 0x1700) == 0)) {
for (local_20 = 0; local_20 < 0x100; local_20 = local_20 + 1) {
alStack_b78[local_20] =
*(long *)(local_bb8 + 0x38 + (ulong)local_20 * 8) +
*(long *)(uVar1 + 0xbc0 + (ulong)local_20 * 8);
}
uVar5 = calc_packed_length(local_bb0,1);
uVar2 = local_bc0;
if (uVar5 <= *(long *)(*(long *)(local_bb8 + 0x30) + 0x20) +
*(long *)(*(long *)(uVar1 + 3000) + 0x20) +
(ulong)*(uint *)(*(long *)(local_bb8 + 0x30) + 0x28) +
(ulong)*(uint *)(*(long *)(uVar1 + 3000) + 0x28) + 0x100) {
memcpy((void *)(local_bb8 + 0x38),alStack_b78,0x800);
my_free(*(int8 *)(*(long *)(uVar1 + 3000) + 8));
*(int8 *)(*(long *)(uVar1 + 3000) + 8) = 0;
*(int8 *)(uVar1 + 3000) = *(int8 *)(local_bb8 + 0x30);
memmove((void *)(local_bb8 + 0x38),alStack_b78,0x800);
iVar3 = make_huff_tree(*(int8 *)(local_bb8 + 0x30),local_bb8);
uVar2 = local_bc0;
if (iVar3 != 0) {
return 0xffffffff;
}
}
}
}
}
}
local_bb8 = local_bb8 + 0xb88;
} while( true );
}
| |
26,584 | ma_duplicate_resultset_metadata | eloqsql/libmariadb/libmariadb/mariadb_lib.c | MYSQL_FIELD *ma_duplicate_resultset_metadata(MYSQL_FIELD *fields, size_t count,
MA_MEM_ROOT *memroot)
{
size_t i;
MYSQL_FIELD *result=
(MYSQL_FIELD *) ma_alloc_root(memroot, sizeof(MYSQL_FIELD) * count);
if (!result)
return NULL;
for (i= 0; i < count; i++)
{
if (ma_deep_copy_field(&fields[i], &result[i], memroot))
return NULL;
}
return result;
} | O3 | c | ma_duplicate_resultset_metadata:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
shlq $0x7, %rsi
movq %rdx, %rdi
callq 0x1db33
testq %rax, %rax
je 0x1af14
movq %rax, %rbx
testq %r15, %r15
je 0x1af16
xorl %r13d, %r13d
movq 0x28(%r12,%r13), %rsi
testq %rsi, %rsi
je 0x1ad66
movq %r14, %rdi
callq 0x1dcd6
movq %rax, 0x28(%rbx,%r13)
testq %rax, %rax
jne 0x1ad6f
jmp 0x1af14
movq $0x0, 0x28(%rbx,%r13)
movq 0x20(%r12,%r13), %rsi
testq %rsi, %rsi
je 0x1ad90
movq %r14, %rdi
callq 0x1dcd6
movq %rax, 0x20(%rbx,%r13)
testq %rax, %rax
jne 0x1ad99
jmp 0x1af14
movq $0x0, 0x20(%rbx,%r13)
movq 0x30(%r12,%r13), %rsi
testq %rsi, %rsi
je 0x1adba
movq %r14, %rdi
callq 0x1dcd6
movq %rax, 0x30(%rbx,%r13)
testq %rax, %rax
jne 0x1adc3
jmp 0x1af14
movq $0x0, 0x30(%rbx,%r13)
movq (%r12,%r13), %rsi
testq %rsi, %rsi
je 0x1ade2
movq %r14, %rdi
callq 0x1dcd6
movq %rax, (%rbx,%r13)
testq %rax, %rax
jne 0x1adea
jmp 0x1af14
movq $0x0, (%rbx,%r13)
movq 0x8(%r12,%r13), %rsi
testq %rsi, %rsi
je 0x1ae0b
movq %r14, %rdi
callq 0x1dcd6
movq %rax, 0x8(%rbx,%r13)
testq %rax, %rax
jne 0x1ae14
jmp 0x1af14
movq $0x0, 0x8(%rbx,%r13)
movq 0x18(%r12,%r13), %rsi
testq %rsi, %rsi
je 0x1ae35
movq %r14, %rdi
callq 0x1dcd6
movq %rax, 0x18(%rbx,%r13)
testq %rax, %rax
jne 0x1ae3e
jmp 0x1af14
movq $0x0, 0x18(%rbx,%r13)
movq 0x10(%r12,%r13), %rsi
testq %rsi, %rsi
je 0x1ae5f
movq %r14, %rdi
callq 0x1dcd6
movq %rax, 0x10(%rbx,%r13)
testq %rax, %rax
jne 0x1ae68
jmp 0x1af14
movq $0x0, 0x10(%rbx,%r13)
movl 0x5c(%r12,%r13), %eax
movl %eax, 0x5c(%rbx,%r13)
movl 0x6c(%r12,%r13), %eax
movl %eax, 0x6c(%rbx,%r13)
movl 0x58(%r12,%r13), %eax
movl %eax, 0x58(%rbx,%r13)
movl 0x68(%r12,%r13), %eax
movl %eax, 0x68(%rbx,%r13)
movl 0x60(%r12,%r13), %eax
movl %eax, 0x60(%rbx,%r13)
movq 0x78(%r12,%r13), %rsi
testq %rsi, %rsi
je 0x1aeae
movq %r14, %rdi
callq 0x177c5
jmp 0x1aeb0
xorl %eax, %eax
movq %rax, 0x78(%rbx,%r13)
movl 0x64(%r12,%r13), %eax
movl %eax, 0x64(%rbx,%r13)
movq 0x38(%r12,%r13), %rax
movq %rax, 0x38(%rbx,%r13)
movq 0x40(%r12,%r13), %rax
movq %rax, 0x40(%rbx,%r13)
movl 0x48(%r12,%r13), %eax
movl %eax, 0x48(%rbx,%r13)
movl 0x4c(%r12,%r13), %eax
movl %eax, 0x4c(%rbx,%r13)
movl 0x54(%r12,%r13), %eax
movl %eax, 0x54(%rbx,%r13)
movl 0x50(%r12,%r13), %eax
movl %eax, 0x50(%rbx,%r13)
movl 0x70(%r12,%r13), %eax
movl %eax, 0x70(%rbx,%r13)
subq $-0x80, %r13
decq %r15
jne 0x1ad45
jmp 0x1af16
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| ma_duplicate_resultset_metadata:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rdx
mov r15, rsi
mov r12, rdi
shl rsi, 7
mov rdi, rdx
call ma_alloc_root
test rax, rax
jz loc_1AF14
mov rbx, rax
test r15, r15
jz loc_1AF16
xor r13d, r13d
loc_1AD45:
mov rsi, [r12+r13+28h]
test rsi, rsi
jz short loc_1AD66
mov rdi, r14
call ma_strdup_root
mov [rbx+r13+28h], rax
test rax, rax
jnz short loc_1AD6F
jmp loc_1AF14
loc_1AD66:
mov qword ptr [rbx+r13+28h], 0
loc_1AD6F:
mov rsi, [r12+r13+20h]
test rsi, rsi
jz short loc_1AD90
mov rdi, r14
call ma_strdup_root
mov [rbx+r13+20h], rax
test rax, rax
jnz short loc_1AD99
jmp loc_1AF14
loc_1AD90:
mov qword ptr [rbx+r13+20h], 0
loc_1AD99:
mov rsi, [r12+r13+30h]
test rsi, rsi
jz short loc_1ADBA
mov rdi, r14
call ma_strdup_root
mov [rbx+r13+30h], rax
test rax, rax
jnz short loc_1ADC3
jmp loc_1AF14
loc_1ADBA:
mov qword ptr [rbx+r13+30h], 0
loc_1ADC3:
mov rsi, [r12+r13]
test rsi, rsi
jz short loc_1ADE2
mov rdi, r14
call ma_strdup_root
mov [rbx+r13], rax
test rax, rax
jnz short loc_1ADEA
jmp loc_1AF14
loc_1ADE2:
mov qword ptr [rbx+r13], 0
loc_1ADEA:
mov rsi, [r12+r13+8]
test rsi, rsi
jz short loc_1AE0B
mov rdi, r14
call ma_strdup_root
mov [rbx+r13+8], rax
test rax, rax
jnz short loc_1AE14
jmp loc_1AF14
loc_1AE0B:
mov qword ptr [rbx+r13+8], 0
loc_1AE14:
mov rsi, [r12+r13+18h]
test rsi, rsi
jz short loc_1AE35
mov rdi, r14
call ma_strdup_root
mov [rbx+r13+18h], rax
test rax, rax
jnz short loc_1AE3E
jmp loc_1AF14
loc_1AE35:
mov qword ptr [rbx+r13+18h], 0
loc_1AE3E:
mov rsi, [r12+r13+10h]
test rsi, rsi
jz short loc_1AE5F
mov rdi, r14
call ma_strdup_root
mov [rbx+r13+10h], rax
test rax, rax
jnz short loc_1AE68
jmp loc_1AF14
loc_1AE5F:
mov qword ptr [rbx+r13+10h], 0
loc_1AE68:
mov eax, [r12+r13+5Ch]
mov [rbx+r13+5Ch], eax
mov eax, [r12+r13+6Ch]
mov [rbx+r13+6Ch], eax
mov eax, [r12+r13+58h]
mov [rbx+r13+58h], eax
mov eax, [r12+r13+68h]
mov [rbx+r13+68h], eax
mov eax, [r12+r13+60h]
mov [rbx+r13+60h], eax
mov rsi, [r12+r13+78h]
test rsi, rsi
jz short loc_1AEAE
mov rdi, r14
call ma_field_extension_deep_dup
jmp short loc_1AEB0
loc_1AEAE:
xor eax, eax
loc_1AEB0:
mov [rbx+r13+78h], rax
mov eax, [r12+r13+64h]
mov [rbx+r13+64h], eax
mov rax, [r12+r13+38h]
mov [rbx+r13+38h], rax
mov rax, [r12+r13+40h]
mov [rbx+r13+40h], rax
mov eax, [r12+r13+48h]
mov [rbx+r13+48h], eax
mov eax, [r12+r13+4Ch]
mov [rbx+r13+4Ch], eax
mov eax, [r12+r13+54h]
mov [rbx+r13+54h], eax
mov eax, [r12+r13+50h]
mov [rbx+r13+50h], eax
mov eax, [r12+r13+70h]
mov [rbx+r13+70h], eax
sub r13, 0FFFFFFFFFFFFFF80h
dec r15
jnz loc_1AD45
jmp short loc_1AF16
loc_1AF14:
xor ebx, ebx
loc_1AF16:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ma_duplicate_resultset_metadata(long long a1, long long a2, long long a3)
{
long long v4; // r15
long long v5; // rax
long long v6; // rbx
long long v7; // r13
long long v8; // rax
long long v9; // rax
long long v10; // rax
long long v11; // rax
long long v12; // rax
long long v13; // rax
long long v14; // rax
long long *v15; // rsi
long long *v16; // rax
v4 = a2;
v5 = ma_alloc_root(a3, a2 << 7);
if ( !v5 )
return 0LL;
v6 = v5;
if ( a2 )
{
v7 = 0LL;
do
{
if ( *(_QWORD *)(a1 + v7 + 40) )
{
v8 = ma_strdup_root(a3);
*(_QWORD *)(v6 + v7 + 40) = v8;
if ( !v8 )
return 0LL;
}
else
{
*(_QWORD *)(v6 + v7 + 40) = 0LL;
}
if ( *(_QWORD *)(a1 + v7 + 32) )
{
v9 = ma_strdup_root(a3);
*(_QWORD *)(v6 + v7 + 32) = v9;
if ( !v9 )
return 0LL;
}
else
{
*(_QWORD *)(v6 + v7 + 32) = 0LL;
}
if ( *(_QWORD *)(a1 + v7 + 48) )
{
v10 = ma_strdup_root(a3);
*(_QWORD *)(v6 + v7 + 48) = v10;
if ( !v10 )
return 0LL;
}
else
{
*(_QWORD *)(v6 + v7 + 48) = 0LL;
}
if ( *(_QWORD *)(a1 + v7) )
{
v11 = ma_strdup_root(a3);
*(_QWORD *)(v6 + v7) = v11;
if ( !v11 )
return 0LL;
}
else
{
*(_QWORD *)(v6 + v7) = 0LL;
}
if ( *(_QWORD *)(a1 + v7 + 8) )
{
v12 = ma_strdup_root(a3);
*(_QWORD *)(v6 + v7 + 8) = v12;
if ( !v12 )
return 0LL;
}
else
{
*(_QWORD *)(v6 + v7 + 8) = 0LL;
}
if ( *(_QWORD *)(a1 + v7 + 24) )
{
v13 = ma_strdup_root(a3);
*(_QWORD *)(v6 + v7 + 24) = v13;
if ( !v13 )
return 0LL;
}
else
{
*(_QWORD *)(v6 + v7 + 24) = 0LL;
}
if ( *(_QWORD *)(a1 + v7 + 16) )
{
v14 = ma_strdup_root(a3);
*(_QWORD *)(v6 + v7 + 16) = v14;
if ( !v14 )
return 0LL;
}
else
{
*(_QWORD *)(v6 + v7 + 16) = 0LL;
}
*(_DWORD *)(v6 + v7 + 92) = *(_DWORD *)(a1 + v7 + 92);
*(_DWORD *)(v6 + v7 + 108) = *(_DWORD *)(a1 + v7 + 108);
*(_DWORD *)(v6 + v7 + 88) = *(_DWORD *)(a1 + v7 + 88);
*(_DWORD *)(v6 + v7 + 104) = *(_DWORD *)(a1 + v7 + 104);
*(_DWORD *)(v6 + v7 + 96) = *(_DWORD *)(a1 + v7 + 96);
v15 = *(long long **)(a1 + v7 + 120);
if ( v15 )
v16 = ma_field_extension_deep_dup(a3, v15);
else
v16 = 0LL;
*(_QWORD *)(v6 + v7 + 120) = v16;
*(_DWORD *)(v6 + v7 + 100) = *(_DWORD *)(a1 + v7 + 100);
*(_QWORD *)(v6 + v7 + 56) = *(_QWORD *)(a1 + v7 + 56);
*(_QWORD *)(v6 + v7 + 64) = *(_QWORD *)(a1 + v7 + 64);
*(_DWORD *)(v6 + v7 + 72) = *(_DWORD *)(a1 + v7 + 72);
*(_DWORD *)(v6 + v7 + 76) = *(_DWORD *)(a1 + v7 + 76);
*(_DWORD *)(v6 + v7 + 84) = *(_DWORD *)(a1 + v7 + 84);
*(_DWORD *)(v6 + v7 + 80) = *(_DWORD *)(a1 + v7 + 80);
*(_DWORD *)(v6 + v7 + 112) = *(_DWORD *)(a1 + v7 + 112);
v7 += 128LL;
--v4;
}
while ( v4 );
}
return v6;
}
| ma_duplicate_resultset_metadata:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDX
MOV R15,RSI
MOV R12,RDI
SHL RSI,0x7
MOV RDI,RDX
CALL 0x0011db33
TEST RAX,RAX
JZ 0x0011af14
MOV RBX,RAX
TEST R15,R15
JZ 0x0011af16
XOR R13D,R13D
LAB_0011ad45:
MOV RSI,qword ptr [R12 + R13*0x1 + 0x28]
TEST RSI,RSI
JZ 0x0011ad66
MOV RDI,R14
CALL 0x0011dcd6
MOV qword ptr [RBX + R13*0x1 + 0x28],RAX
TEST RAX,RAX
JNZ 0x0011ad6f
JMP 0x0011af14
LAB_0011ad66:
MOV qword ptr [RBX + R13*0x1 + 0x28],0x0
LAB_0011ad6f:
MOV RSI,qword ptr [R12 + R13*0x1 + 0x20]
TEST RSI,RSI
JZ 0x0011ad90
MOV RDI,R14
CALL 0x0011dcd6
MOV qword ptr [RBX + R13*0x1 + 0x20],RAX
TEST RAX,RAX
JNZ 0x0011ad99
JMP 0x0011af14
LAB_0011ad90:
MOV qword ptr [RBX + R13*0x1 + 0x20],0x0
LAB_0011ad99:
MOV RSI,qword ptr [R12 + R13*0x1 + 0x30]
TEST RSI,RSI
JZ 0x0011adba
MOV RDI,R14
CALL 0x0011dcd6
MOV qword ptr [RBX + R13*0x1 + 0x30],RAX
TEST RAX,RAX
JNZ 0x0011adc3
JMP 0x0011af14
LAB_0011adba:
MOV qword ptr [RBX + R13*0x1 + 0x30],0x0
LAB_0011adc3:
MOV RSI,qword ptr [R12 + R13*0x1]
TEST RSI,RSI
JZ 0x0011ade2
MOV RDI,R14
CALL 0x0011dcd6
MOV qword ptr [RBX + R13*0x1],RAX
TEST RAX,RAX
JNZ 0x0011adea
JMP 0x0011af14
LAB_0011ade2:
MOV qword ptr [RBX + R13*0x1],0x0
LAB_0011adea:
MOV RSI,qword ptr [R12 + R13*0x1 + 0x8]
TEST RSI,RSI
JZ 0x0011ae0b
MOV RDI,R14
CALL 0x0011dcd6
MOV qword ptr [RBX + R13*0x1 + 0x8],RAX
TEST RAX,RAX
JNZ 0x0011ae14
JMP 0x0011af14
LAB_0011ae0b:
MOV qword ptr [RBX + R13*0x1 + 0x8],0x0
LAB_0011ae14:
MOV RSI,qword ptr [R12 + R13*0x1 + 0x18]
TEST RSI,RSI
JZ 0x0011ae35
MOV RDI,R14
CALL 0x0011dcd6
MOV qword ptr [RBX + R13*0x1 + 0x18],RAX
TEST RAX,RAX
JNZ 0x0011ae3e
JMP 0x0011af14
LAB_0011ae35:
MOV qword ptr [RBX + R13*0x1 + 0x18],0x0
LAB_0011ae3e:
MOV RSI,qword ptr [R12 + R13*0x1 + 0x10]
TEST RSI,RSI
JZ 0x0011ae5f
MOV RDI,R14
CALL 0x0011dcd6
MOV qword ptr [RBX + R13*0x1 + 0x10],RAX
TEST RAX,RAX
JNZ 0x0011ae68
JMP 0x0011af14
LAB_0011ae5f:
MOV qword ptr [RBX + R13*0x1 + 0x10],0x0
LAB_0011ae68:
MOV EAX,dword ptr [R12 + R13*0x1 + 0x5c]
MOV dword ptr [RBX + R13*0x1 + 0x5c],EAX
MOV EAX,dword ptr [R12 + R13*0x1 + 0x6c]
MOV dword ptr [RBX + R13*0x1 + 0x6c],EAX
MOV EAX,dword ptr [R12 + R13*0x1 + 0x58]
MOV dword ptr [RBX + R13*0x1 + 0x58],EAX
MOV EAX,dword ptr [R12 + R13*0x1 + 0x68]
MOV dword ptr [RBX + R13*0x1 + 0x68],EAX
MOV EAX,dword ptr [R12 + R13*0x1 + 0x60]
MOV dword ptr [RBX + R13*0x1 + 0x60],EAX
MOV RSI,qword ptr [R12 + R13*0x1 + 0x78]
TEST RSI,RSI
JZ 0x0011aeae
MOV RDI,R14
CALL 0x001177c5
JMP 0x0011aeb0
LAB_0011aeae:
XOR EAX,EAX
LAB_0011aeb0:
MOV qword ptr [RBX + R13*0x1 + 0x78],RAX
MOV EAX,dword ptr [R12 + R13*0x1 + 0x64]
MOV dword ptr [RBX + R13*0x1 + 0x64],EAX
MOV RAX,qword ptr [R12 + R13*0x1 + 0x38]
MOV qword ptr [RBX + R13*0x1 + 0x38],RAX
MOV RAX,qword ptr [R12 + R13*0x1 + 0x40]
MOV qword ptr [RBX + R13*0x1 + 0x40],RAX
MOV EAX,dword ptr [R12 + R13*0x1 + 0x48]
MOV dword ptr [RBX + R13*0x1 + 0x48],EAX
MOV EAX,dword ptr [R12 + R13*0x1 + 0x4c]
MOV dword ptr [RBX + R13*0x1 + 0x4c],EAX
MOV EAX,dword ptr [R12 + R13*0x1 + 0x54]
MOV dword ptr [RBX + R13*0x1 + 0x54],EAX
MOV EAX,dword ptr [R12 + R13*0x1 + 0x50]
MOV dword ptr [RBX + R13*0x1 + 0x50],EAX
MOV EAX,dword ptr [R12 + R13*0x1 + 0x70]
MOV dword ptr [RBX + R13*0x1 + 0x70],EAX
SUB R13,-0x80
DEC R15
JNZ 0x0011ad45
JMP 0x0011af16
LAB_0011af14:
XOR EBX,EBX
LAB_0011af16:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long ma_duplicate_resultset_metadata(long param_1,long param_2,int8 param_3)
{
long lVar1;
long lVar2;
int8 uVar3;
long lVar4;
lVar1 = ma_alloc_root(param_3,param_2 << 7);
if (lVar1 == 0) {
LAB_0011af14:
lVar1 = 0;
}
else if (param_2 != 0) {
lVar4 = 0;
do {
if (*(long *)(param_1 + 0x28 + lVar4) == 0) {
*(int8 *)(lVar1 + 0x28 + lVar4) = 0;
}
else {
lVar2 = ma_strdup_root(param_3);
*(long *)(lVar1 + 0x28 + lVar4) = lVar2;
if (lVar2 == 0) goto LAB_0011af14;
}
if (*(long *)(param_1 + 0x20 + lVar4) == 0) {
*(int8 *)(lVar1 + 0x20 + lVar4) = 0;
}
else {
lVar2 = ma_strdup_root(param_3);
*(long *)(lVar1 + 0x20 + lVar4) = lVar2;
if (lVar2 == 0) goto LAB_0011af14;
}
if (*(long *)(param_1 + 0x30 + lVar4) == 0) {
*(int8 *)(lVar1 + 0x30 + lVar4) = 0;
}
else {
lVar2 = ma_strdup_root(param_3);
*(long *)(lVar1 + 0x30 + lVar4) = lVar2;
if (lVar2 == 0) goto LAB_0011af14;
}
if (*(long *)(param_1 + lVar4) == 0) {
*(int8 *)(lVar1 + lVar4) = 0;
}
else {
lVar2 = ma_strdup_root(param_3);
*(long *)(lVar1 + lVar4) = lVar2;
if (lVar2 == 0) goto LAB_0011af14;
}
if (*(long *)(param_1 + 8 + lVar4) == 0) {
*(int8 *)(lVar1 + 8 + lVar4) = 0;
}
else {
lVar2 = ma_strdup_root(param_3);
*(long *)(lVar1 + 8 + lVar4) = lVar2;
if (lVar2 == 0) goto LAB_0011af14;
}
if (*(long *)(param_1 + 0x18 + lVar4) == 0) {
*(int8 *)(lVar1 + 0x18 + lVar4) = 0;
}
else {
lVar2 = ma_strdup_root(param_3);
*(long *)(lVar1 + 0x18 + lVar4) = lVar2;
if (lVar2 == 0) goto LAB_0011af14;
}
if (*(long *)(param_1 + 0x10 + lVar4) == 0) {
*(int8 *)(lVar1 + 0x10 + lVar4) = 0;
}
else {
lVar2 = ma_strdup_root(param_3);
*(long *)(lVar1 + 0x10 + lVar4) = lVar2;
if (lVar2 == 0) goto LAB_0011af14;
}
*(int4 *)(lVar1 + 0x5c + lVar4) = *(int4 *)(param_1 + 0x5c + lVar4);
*(int4 *)(lVar1 + 0x6c + lVar4) = *(int4 *)(param_1 + 0x6c + lVar4);
*(int4 *)(lVar1 + 0x58 + lVar4) = *(int4 *)(param_1 + 0x58 + lVar4);
*(int4 *)(lVar1 + 0x68 + lVar4) = *(int4 *)(param_1 + 0x68 + lVar4);
*(int4 *)(lVar1 + 0x60 + lVar4) = *(int4 *)(param_1 + 0x60 + lVar4);
if (*(long *)(param_1 + 0x78 + lVar4) == 0) {
uVar3 = 0;
}
else {
uVar3 = ma_field_extension_deep_dup(param_3);
}
*(int8 *)(lVar1 + 0x78 + lVar4) = uVar3;
*(int4 *)(lVar1 + 100 + lVar4) = *(int4 *)(param_1 + 100 + lVar4);
*(int8 *)(lVar1 + 0x38 + lVar4) = *(int8 *)(param_1 + 0x38 + lVar4);
*(int8 *)(lVar1 + 0x40 + lVar4) = *(int8 *)(param_1 + 0x40 + lVar4);
*(int4 *)(lVar1 + 0x48 + lVar4) = *(int4 *)(param_1 + 0x48 + lVar4);
*(int4 *)(lVar1 + 0x4c + lVar4) = *(int4 *)(param_1 + 0x4c + lVar4);
*(int4 *)(lVar1 + 0x54 + lVar4) = *(int4 *)(param_1 + 0x54 + lVar4);
*(int4 *)(lVar1 + 0x50 + lVar4) = *(int4 *)(param_1 + 0x50 + lVar4);
*(int4 *)(lVar1 + 0x70 + lVar4) = *(int4 *)(param_1 + 0x70 + lVar4);
lVar4 = lVar4 + 0x80;
param_2 = param_2 + -1;
} while (param_2 != 0);
}
return lVar1;
}
| |
26,585 | LefDefParser::defiNonDefault::propIsString(int) const | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNonDefault.cpp | int defiNonDefault::propIsString(int index) const {
char msg[160];
if (index < 0 || index >= numProps_) {
sprintf (msg, "ERROR (DEFPARS-6091): The index number %d specified for the NONDEFAULT PROPERTY is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again.",
index, numProps_);
defiError(0, 6091, msg, defData);
return 0;
}
return dvalues_[index] ? 0 : 1;
} | O0 | cpp | LefDefParser::defiNonDefault::propIsString(int) const:
subq $0xc8, %rsp
movq %rdi, 0xb8(%rsp)
movl %esi, 0xb4(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpl $0x0, 0xb4(%rsp)
jl 0x497f1
movq 0x8(%rsp), %rcx
movl 0xb4(%rsp), %eax
cmpl 0x90(%rcx), %eax
jl 0x49840
movq 0x8(%rsp), %rax
leaq 0x10(%rsp), %rdi
movl 0xb4(%rsp), %edx
movl 0x90(%rax), %ecx
leaq 0x2c4d5(%rip), %rsi # 0x75ce4
movb $0x0, %al
callq 0x7060
movq 0x8(%rsp), %rax
leaq 0x10(%rsp), %rdx
movq 0xb8(%rax), %rcx
xorl %edi, %edi
movl $0x17cb, %esi # imm = 0x17CB
callq 0x2a600
movl $0x0, 0xc4(%rsp)
jmp 0x4987b
movq 0x8(%rsp), %rax
movq 0xa8(%rax), %rax
movslq 0xb4(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
xorps %xmm1, %xmm1
movl $0x1, %eax
xorl %ecx, %ecx
ucomisd %xmm1, %xmm0
setp %sil
setne %dl
orb %sil, %dl
cmovnel %ecx, %eax
movl %eax, 0xc4(%rsp)
movl 0xc4(%rsp), %eax
addq $0xc8, %rsp
retq
nopw (%rax,%rax)
| _ZNK12LefDefParser14defiNonDefault12propIsStringEi:
sub rsp, 0C8h
mov [rsp+0C8h+var_10], rdi
mov [rsp+0C8h+var_14], esi
mov rax, [rsp+0C8h+var_10]
mov [rsp+0C8h+var_C0], rax
cmp [rsp+0C8h+var_14], 0
jl short loc_497F1
mov rcx, [rsp+0C8h+var_C0]
mov eax, [rsp+0C8h+var_14]
cmp eax, [rcx+90h]
jl short loc_49840
loc_497F1:
mov rax, [rsp+0C8h+var_C0]
lea rdi, [rsp+0C8h+var_B8]
mov edx, [rsp+0C8h+var_14]
mov ecx, [rax+90h]
lea rsi, aErrorDefpars60_9; "ERROR (DEFPARS-6091): The index number "...
mov al, 0
call _sprintf
mov rax, [rsp+0C8h+var_C0]
lea rdx, [rsp+0C8h+var_B8]; int
mov rcx, [rax+0B8h]; char *
xor edi, edi; this
mov esi, 17CBh; int
call _ZN12LefDefParser9defiErrorEiiPKcPNS_8defrDataE; LefDefParser::defiError(int,int,char const*,LefDefParser::defrData *)
mov [rsp+0C8h+var_4], 0
jmp short loc_4987B
loc_49840:
mov rax, [rsp+0C8h+var_C0]
mov rax, [rax+0A8h]
movsxd rcx, [rsp+0C8h+var_14]
movsd xmm0, qword ptr [rax+rcx*8]
xorps xmm1, xmm1
mov eax, 1
xor ecx, ecx
ucomisd xmm0, xmm1
setp sil
setnz dl
or dl, sil
cmovnz eax, ecx
mov [rsp+0C8h+var_4], eax
loc_4987B:
mov eax, [rsp+0C8h+var_4]
add rsp, 0C8h
retn
| _BOOL8 LefDefParser::defiNonDefault::propIsString(LefDefParser::defrData **this, int a2)
{
LefDefParser::defrData *v2; // r8
char v4[164]; // [rsp+10h] [rbp-B8h] BYREF
int v5; // [rsp+B4h] [rbp-14h]
LefDefParser::defiNonDefault *v6; // [rsp+B8h] [rbp-10h]
v6 = (LefDefParser::defiNonDefault *)this;
v5 = a2;
if ( a2 >= 0 && v5 < *((_DWORD *)this + 36) )
{
return *((double *)this[21] + v5) == 0.0;
}
else
{
sprintf(
v4,
"ERROR (DEFPARS-6091): The index number %d specified for the NONDEFAULT PROPERTY is invalid.\n"
"Valid index is from 0 to %d. Specify a valid index number and then try again.",
v5,
*((_DWORD *)this + 36));
LefDefParser::defiError(0LL, 6091, v4, this[23], v2);
return 0;
}
}
| propIsString:
SUB RSP,0xc8
MOV qword ptr [RSP + 0xb8],RDI
MOV dword ptr [RSP + 0xb4],ESI
MOV RAX,qword ptr [RSP + 0xb8]
MOV qword ptr [RSP + 0x8],RAX
CMP dword ptr [RSP + 0xb4],0x0
JL 0x001497f1
MOV RCX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RSP + 0xb4]
CMP EAX,dword ptr [RCX + 0x90]
JL 0x00149840
LAB_001497f1:
MOV RAX,qword ptr [RSP + 0x8]
LEA RDI,[RSP + 0x10]
MOV EDX,dword ptr [RSP + 0xb4]
MOV ECX,dword ptr [RAX + 0x90]
LEA RSI,[0x175ce4]
MOV AL,0x0
CALL 0x00107060
MOV RAX,qword ptr [RSP + 0x8]
LEA RDX,[RSP + 0x10]
MOV RCX,qword ptr [RAX + 0xb8]
XOR EDI,EDI
MOV ESI,0x17cb
CALL 0x0012a600
MOV dword ptr [RSP + 0xc4],0x0
JMP 0x0014987b
LAB_00149840:
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0xa8]
MOVSXD RCX,dword ptr [RSP + 0xb4]
MOVSD XMM0,qword ptr [RAX + RCX*0x8]
XORPS XMM1,XMM1
MOV EAX,0x1
XOR ECX,ECX
UCOMISD XMM0,XMM1
SETP SIL
SETNZ DL
OR DL,SIL
CMOVNZ EAX,ECX
MOV dword ptr [RSP + 0xc4],EAX
LAB_0014987b:
MOV EAX,dword ptr [RSP + 0xc4]
ADD RSP,0xc8
RET
|
/* LefDefParser::defiNonDefault::propIsString(int) const */
bool __thiscall LefDefParser::defiNonDefault::propIsString(defiNonDefault *this,int param_1)
{
bool bVar1;
char local_b8 [164];
int local_14;
defiNonDefault *local_10;
if ((param_1 < 0) || (*(int *)(this + 0x90) <= param_1)) {
local_14 = param_1;
local_10 = this;
sprintf(local_b8,
"ERROR (DEFPARS-6091): The index number %d specified for the NONDEFAULT PROPERTY is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again."
,(ulong)(uint)param_1,(ulong)*(uint *)(this + 0x90));
defiError(0,0x17cb,local_b8,*(defrData **)(this + 0xb8));
bVar1 = false;
}
else {
bVar1 = *(double *)(*(long *)(this + 0xa8) + (long)param_1 * 8) == 0.0;
}
return bVar1;
}
| |
26,586 | LefDefParser::defiNonDefault::propIsString(int) const | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNonDefault.cpp | int defiNonDefault::propIsString(int index) const {
char msg[160];
if (index < 0 || index >= numProps_) {
sprintf (msg, "ERROR (DEFPARS-6091): The index number %d specified for the NONDEFAULT PROPERTY is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again.",
index, numProps_);
defiError(0, 6091, msg, defData);
return 0;
}
return dvalues_[index] ? 0 : 1;
} | O3 | cpp | LefDefParser::defiNonDefault::propIsString(int) const:
pushq %r15
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movl %esi, %edx
movq %rdi, %r14
testl %esi, %esi
setns %al
movl 0x90(%rdi), %ecx
cmpl %esi, %ecx
setg %sil
testb %sil, %al
je 0x2c956
movq 0xa8(%r14), %rax
movl %edx, %ecx
xorpd %xmm0, %xmm0
cmpeqsd (%rax,%rcx,8), %xmm0
movq %xmm0, %rbx
andl $0x1, %ebx
jmp 0x2c982
leaq 0x191b5(%rip), %rsi # 0x45b12
xorl %ebx, %ebx
movq %rsp, %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0x7060
movq 0xb8(%r14), %rcx
xorl %edi, %edi
movl $0x17cb, %esi # imm = 0x17CB
movq %r15, %rdx
callq 0x1bb18
movl %ebx, %eax
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %r15
retq
nopl (%rax)
| _ZNK12LefDefParser14defiNonDefault12propIsStringEi:
push r15
push r14
push rbx
sub rsp, 0A0h
mov edx, esi
mov r14, rdi
test esi, esi
setns al
mov ecx, [rdi+90h]
cmp ecx, esi
setnle sil
test al, sil
jz short loc_2C956
mov rax, [r14+0A8h]
mov ecx, edx
xorpd xmm0, xmm0
cmpeqsd xmm0, qword ptr [rax+rcx*8]
movq rbx, xmm0
and ebx, 1
jmp short loc_2C982
loc_2C956:
lea rsi, aErrorDefpars60_9; "ERROR (DEFPARS-6091): The index number "...
xor ebx, ebx
mov r15, rsp
mov rdi, r15
xor eax, eax
call _sprintf
mov rcx, [r14+0B8h]; LefDefParser::defrData *
xor edi, edi; this
mov esi, 17CBh; int
mov rdx, r15; char *
call _ZN12LefDefParser9defiErrorEiiPKcPNS_8defrDataE; LefDefParser::defiError(int,int,char const*,LefDefParser::defrData *)
loc_2C982:
mov eax, ebx
add rsp, 0A0h
pop rbx
pop r14
pop r15
retn
| long long LefDefParser::defiNonDefault::propIsString(LefDefParser::defiNonDefault *this, signed int a2)
{
int v2; // ecx
__m128d v3; // rt1
unsigned int v4; // ebx
LefDefParser::defrData *v5; // r8
char v7[184]; // [rsp+0h] [rbp-B8h] BYREF
v2 = *((_DWORD *)this + 36);
if ( v2 > a2 && a2 >= 0 )
{
v3.m128d_f64[0] = *(double *)(*((_QWORD *)this + 21) + 8LL * (unsigned int)a2);
return *(_OWORD *)&_mm_cmpeq_sd((__m128d)0LL, v3) & 1;
}
else
{
v4 = 0;
sprintf(
v7,
"ERROR (DEFPARS-6091): The index number %d specified for the NONDEFAULT PROPERTY is invalid.\n"
"Valid index is from 0 to %d. Specify a valid index number and then try again.",
a2,
v2);
LefDefParser::defiError(0LL, 6091, v7, *((LefDefParser::defrData **)this + 23), v5);
}
return v4;
}
| propIsString:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xa0
MOV EDX,ESI
MOV R14,RDI
TEST ESI,ESI
SETNS AL
MOV ECX,dword ptr [RDI + 0x90]
CMP ECX,ESI
SETG SIL
TEST AL,SIL
JZ 0x0012c956
MOV RAX,qword ptr [R14 + 0xa8]
MOV ECX,EDX
XORPD XMM0,XMM0
CMPEQSD XMM0,qword ptr [RAX + RCX*0x8]
MOVQ RBX,XMM0
AND EBX,0x1
JMP 0x0012c982
LAB_0012c956:
LEA RSI,[0x145b12]
XOR EBX,EBX
MOV R15,RSP
MOV RDI,R15
XOR EAX,EAX
CALL 0x00107060
MOV RCX,qword ptr [R14 + 0xb8]
XOR EDI,EDI
MOV ESI,0x17cb
MOV RDX,R15
CALL 0x0011bb18
LAB_0012c982:
MOV EAX,EBX
ADD RSP,0xa0
POP RBX
POP R14
POP R15
RET
|
/* LefDefParser::defiNonDefault::propIsString(int) const */
byte __thiscall LefDefParser::defiNonDefault::propIsString(defiNonDefault *this,int param_1)
{
byte bVar1;
char acStack_b8 [160];
if (param_1 < 0 || *(int *)(this + 0x90) <= param_1) {
bVar1 = 0;
sprintf(acStack_b8,
"ERROR (DEFPARS-6091): The index number %d specified for the NONDEFAULT PROPERTY is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again."
);
defiError(0,0x17cb,acStack_b8,*(defrData **)(this + 0xb8));
}
else {
bVar1 = -(*(double *)(*(long *)(this + 0xa8) + (ulong)(uint)param_1 * 8) == 0.0) & 1;
}
return bVar1;
}
| |
26,587 | (anonymous namespace)::DefaultLogDir() | ng-log[P]ng-log/src/flags.cc | static const char* DefaultLogDir() {
constexpr const char* const names[]{"NGLOG_DIR", "TEST_TMPDIR"};
for (const char* const name : names) {
const char* const env = std::getenv(name);
if (env != nullptr && env[0] != '\0') {
return env;
}
}
return "";
} | O0 | cpp | (anonymous namespace)::DefaultLogDir():
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq 0x63511(%rip), %rax # 0x76580
movq %rax, -0x20(%rbp)
movq 0x6350e(%rip), %rax # 0x76588
movq %rax, -0x18(%rbp)
leaq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
je 0x130e9
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0x9900
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x130d9
movq -0x48(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x130d9
movq -0x48(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x130f4
jmp 0x130db
movq -0x30(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x30(%rbp)
jmp 0x1309a
leaq 0x3ee57(%rip), %rax # 0x51f47
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nop
| _ZN12_GLOBAL__N_113DefaultLogDirEv:
push rbp
mov rbp, rsp
sub rsp, 50h
mov rax, cs:off_76580; "NGLOG_DIR"
mov [rbp+var_20], rax
mov rax, cs:off_76588; "TEST_TMPDIR"
mov [rbp+var_18], rax
lea rax, [rbp+var_20]
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov [rbp+var_30], rax
mov rax, [rbp+var_28]
add rax, 10h
mov [rbp+var_38], rax
loc_1309A:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jz short loc_130E9
mov rax, [rbp+var_30]
mov rax, [rax]
mov [rbp+var_40], rax
mov rdi, [rbp+var_40]
call _getenv
mov [rbp+var_48], rax
cmp [rbp+var_48], 0
jz short loc_130D9
mov rax, [rbp+var_48]
movsx eax, byte ptr [rax]
cmp eax, 0
jz short loc_130D9
mov rax, [rbp+var_48]
mov [rbp+var_8], rax
jmp short loc_130F4
loc_130D9:
jmp short $+2
loc_130DB:
mov rax, [rbp+var_30]
add rax, 8
mov [rbp+var_30], rax
jmp short loc_1309A
loc_130E9:
lea rax, asc_51F45+2; ""
mov [rbp+var_8], rax
loc_130F4:
mov rax, [rbp+var_8]
add rsp, 50h
pop rbp
retn
| char * `anonymous namespace'::DefaultLogDir(_anonymous_namespace_ *this)
{
_BYTE *v2; // [rsp+8h] [rbp-48h]
long long *i; // [rsp+20h] [rbp-30h]
_QWORD v4[2]; // [rsp+30h] [rbp-20h] BYREF
long long v5; // [rsp+40h] [rbp-10h] BYREF
v4[0] = "NGLOG_DIR";
v4[1] = "TEST_TMPDIR";
for ( i = v4; i != &v5; ++i )
{
v2 = (_BYTE *)getenv(*i);
if ( v2 && *v2 )
return v2;
}
return "";
}
| DefaultLogDir:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV RAX,qword ptr [0x00176580]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [0x00176588]
MOV qword ptr [RBP + -0x18],RAX
LEA RAX,[RBP + -0x20]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x10
MOV qword ptr [RBP + -0x38],RAX
LAB_0011309a:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JZ 0x001130e9
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x00109900
MOV qword ptr [RBP + -0x48],RAX
CMP qword ptr [RBP + -0x48],0x0
JZ 0x001130d9
MOV RAX,qword ptr [RBP + -0x48]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x001130d9
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001130f4
LAB_001130d9:
JMP 0x001130db
LAB_001130db:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x8
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0011309a
LAB_001130e9:
LEA RAX,[0x151f47]
MOV qword ptr [RBP + -0x8],RAX
LAB_001130f4:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x50
POP RBP
RET
|
/* (anonymous namespace)::DefaultLogDir() */
char * (anonymous_namespace)::DefaultLogDir(void)
{
char *pcVar1;
int **local_38;
int *local_28;
int *local_20;
int *puStack_18;
char *local_10;
local_28 = PTR_s_NGLOG_DIR_00176580;
local_20 = PTR_s_TEST_TMPDIR_00176588;
local_38 = &local_28;
while( true ) {
if (local_38 == &puStack_18) {
local_10 = "";
return local_10;
}
pcVar1 = getenv(*local_38);
if ((pcVar1 != (char *)0x0) && (*pcVar1 != '\0')) break;
local_38 = local_38 + 1;
}
return pcVar1;
}
| |
26,588 | spdlog::details::registry::apply_logger_env_levels(std::shared_ptr<spdlog::logger>) | AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/details/registry-inl.h | SPDLOG_INLINE void registry::apply_logger_env_levels(std::shared_ptr<logger> new_logger) {
std::lock_guard<std::mutex> lock(logger_map_mutex_);
auto it = log_levels_.find(new_logger->name());
auto new_level = it != log_levels_.end() ? it->second : global_log_level_;
new_logger->set_level(new_level);
} | O0 | c | spdlog::details::registry::apply_logger_env_levels(std::shared_ptr<spdlog::logger>):
subq $0x68, %rsp
movq %rsi, 0x18(%rsp)
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq 0x60(%rsp), %rsi
movq %rsi, 0x10(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x389f0
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rdi
addq $0xb0, %rax
movq %rax, 0x20(%rsp)
callq 0x39790
movq %rax, %rdi
callq 0x33af0
movq %rax, 0x28(%rsp)
jmp 0x34c60
movq 0x28(%rsp), %rsi
movq 0x20(%rsp), %rdi
callq 0x39880
movq %rax, 0x8(%rsp)
jmp 0x34c76
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rax
movq %rax, 0x48(%rsp)
addq $0xb0, %rdi
callq 0x398d0
movq %rax, 0x30(%rsp)
leaq 0x48(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x398b0
xorb $-0x1, %al
testb $0x1, %al
jne 0x34cad
jmp 0x34cc0
leaq 0x48(%rsp), %rdi
callq 0x39900
movl 0x20(%rax), %eax
movl %eax, 0x4(%rsp)
jmp 0x34ccf
movq 0x10(%rsp), %rax
movl 0xf0(%rax), %eax
movl %eax, 0x4(%rsp)
movq 0x18(%rsp), %rdi
movl 0x4(%rsp), %eax
movl %eax, 0x38(%rsp)
callq 0x39790
movq %rax, %rdi
movl 0x38(%rsp), %esi
callq 0x33b00
jmp 0x34cef
leaq 0x50(%rsp), %rdi
callq 0x38ab0
addq $0x68, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x38ab0
movq 0x40(%rsp), %rdi
callq 0x14c80
| _ZN6spdlog7details8registry23apply_logger_env_levelsESt10shared_ptrINS_6loggerEE:
sub rsp, 68h
mov [rsp+68h+var_50], rsi
mov [rsp+68h+var_8], rdi
mov [rsp+68h+var_10], rsi
mov rsi, [rsp+68h+var_8]
mov [rsp+68h+var_58], rsi
lea rdi, [rsp+68h+var_18]
call _ZNSt10lock_guardISt5mutexEC2ERS0_; std::lock_guard<std::mutex>::lock_guard(std::mutex&)
mov rax, [rsp+68h+var_58]
mov rdi, [rsp+68h+var_50]
add rax, 0B0h
mov [rsp+68h+var_48], rax
call _ZNKSt19__shared_ptr_accessIN6spdlog6loggerELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<spdlog::logger,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, rax
call _ZNK6spdlog6logger4nameB5cxx11Ev; spdlog::logger::name(void)
mov [rsp+68h+var_40], rax
jmp short $+2
loc_34C60:
mov rsi, [rsp+68h+var_40]
mov rdi, [rsp+68h+var_48]
call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN6spdlog5level10level_enumESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S8_EEE4findERSE_; std::unordered_map<std::string,spdlog::level::level_enum>::find(std::string const&)
mov [rsp+68h+var_60], rax
jmp short $+2
loc_34C76:
mov rdi, [rsp+68h+var_58]
mov rax, [rsp+68h+var_60]
mov [rsp+68h+var_20], rax
add rdi, 0B0h
call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN6spdlog5level10level_enumESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S8_EEE3endEv; std::unordered_map<std::string,spdlog::level::level_enum>::end(void)
mov [rsp+68h+var_38], rax
lea rdi, [rsp+68h+var_20]
lea rsi, [rsp+68h+var_38]
call _ZNSt8__detaileqERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN6spdlog5level10level_enumEELb1EEESF_; std::__detail::operator==(std::__detail::_Node_iterator_base<std::pair<std::string const,spdlog::level::level_enum>,true> const&,std::__detail::_Node_iterator_base<std::pair<std::string const,spdlog::level::level_enum>,true> const&)
xor al, 0FFh
test al, 1
jnz short loc_34CAD
jmp short loc_34CC0
loc_34CAD:
lea rdi, [rsp+68h+var_20]
call _ZNKSt8__detail14_Node_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN6spdlog5level10level_enumEELb0ELb1EEptEv; std::__detail::_Node_iterator<std::pair<std::string const,spdlog::level::level_enum>,false,true>::operator->(void)
mov eax, [rax+20h]
mov [rsp+68h+var_64], eax
jmp short loc_34CCF
loc_34CC0:
mov rax, [rsp+68h+var_58]
mov eax, [rax+0F0h]
mov [rsp+68h+var_64], eax
loc_34CCF:
mov rdi, [rsp+68h+var_50]
mov eax, [rsp+68h+var_64]
mov [rsp+68h+var_30], eax
call _ZNKSt19__shared_ptr_accessIN6spdlog6loggerELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<spdlog::logger,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void)
mov rdi, rax
mov esi, [rsp+68h+var_30]
call _ZN6spdlog6logger9set_levelENS_5level10level_enumE; spdlog::logger::set_level(spdlog::level::level_enum)
jmp short $+2
loc_34CEF:
lea rdi, [rsp+68h+var_18]
call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard()
add rsp, 68h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_38], rcx
mov [rsp+arg_34], eax
lea rdi, [rsp+arg_48]
call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard()
mov rdi, [rsp+arg_38]
call __Unwind_Resume
| long long spdlog::details::registry::apply_logger_env_levels(long long a1, long long a2)
{
long long v2; // rax
long long v3; // rax
__int32 v5; // [rsp+4h] [rbp-64h]
long long v6; // [rsp+28h] [rbp-40h]
long long v7; // [rsp+30h] [rbp-38h] BYREF
__int32 v8; // [rsp+38h] [rbp-30h]
long long v9; // [rsp+48h] [rbp-20h] BYREF
_BYTE v10[8]; // [rsp+50h] [rbp-18h] BYREF
long long v11; // [rsp+58h] [rbp-10h]
long long v12; // [rsp+60h] [rbp-8h]
v12 = a1;
v11 = a2;
std::lock_guard<std::mutex>::lock_guard(v10, a1);
v2 = std::__shared_ptr_access<spdlog::logger,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a2);
v6 = spdlog::logger::name[abi:cxx11](v2);
v9 = std::unordered_map<std::string,spdlog::level::level_enum>::find(a1 + 176, v6);
v7 = std::unordered_map<std::string,spdlog::level::level_enum>::end(a1 + 176);
if ( (std::__detail::operator==(&v9, &v7) & 1) != 0 )
v5 = *(_DWORD *)(a1 + 240);
else
v5 = *(_DWORD *)(std::__detail::_Node_iterator<std::pair<std::string const,spdlog::level::level_enum>,false,true>::operator->(&v9)
+ 32);
v8 = v5;
v3 = std::__shared_ptr_access<spdlog::logger,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a2);
spdlog::logger::set_level(v3, v8);
return std::lock_guard<std::mutex>::~lock_guard(v10);
}
| apply_logger_env_levels:
SUB RSP,0x68
MOV qword ptr [RSP + 0x18],RSI
MOV qword ptr [RSP + 0x60],RDI
MOV qword ptr [RSP + 0x58],RSI
MOV RSI,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x10],RSI
LEA RDI,[RSP + 0x50]
CALL 0x001389f0
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RSP + 0x18]
ADD RAX,0xb0
MOV qword ptr [RSP + 0x20],RAX
CALL 0x00139790
MOV RDI,RAX
LAB_00134c54:
CALL 0x00133af0
MOV qword ptr [RSP + 0x28],RAX
JMP 0x00134c60
LAB_00134c60:
MOV RSI,qword ptr [RSP + 0x28]
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x00139880
MOV qword ptr [RSP + 0x8],RAX
JMP 0x00134c76
LAB_00134c76:
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x48],RAX
ADD RDI,0xb0
CALL 0x001398d0
MOV qword ptr [RSP + 0x30],RAX
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0x30]
CALL 0x001398b0
XOR AL,0xff
TEST AL,0x1
JNZ 0x00134cad
JMP 0x00134cc0
LAB_00134cad:
LEA RDI,[RSP + 0x48]
CALL 0x00139900
MOV EAX,dword ptr [RAX + 0x20]
MOV dword ptr [RSP + 0x4],EAX
JMP 0x00134ccf
LAB_00134cc0:
MOV RAX,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RAX + 0xf0]
MOV dword ptr [RSP + 0x4],EAX
LAB_00134ccf:
MOV RDI,qword ptr [RSP + 0x18]
MOV EAX,dword ptr [RSP + 0x4]
MOV dword ptr [RSP + 0x38],EAX
CALL 0x00139790
MOV RDI,RAX
MOV ESI,dword ptr [RSP + 0x38]
CALL 0x00133b00
LAB_00134ced:
JMP 0x00134cef
LAB_00134cef:
LEA RDI,[RSP + 0x50]
CALL 0x00138ab0
ADD RSP,0x68
RET
|
/* spdlog::details::registry::apply_logger_env_levels(std::shared_ptr<spdlog::logger>) */
void __thiscall
spdlog::details::registry::apply_logger_env_levels
(registry *this,
__shared_ptr_access<spdlog::logger,(__gnu_cxx::_Lock_policy)2,false,false> *param_2)
{
byte bVar1;
logger *plVar2;
string *psVar3;
long lVar4;
int4 local_64;
int8 local_38;
int4 local_30;
int8 local_20;
lock_guard<std::mutex> local_18 [8];
__shared_ptr_access<spdlog::logger,(__gnu_cxx::_Lock_policy)2,false,false> *local_10;
registry *local_8;
local_10 = param_2;
local_8 = this;
std::lock_guard<std::mutex>::lock_guard(local_18,(mutex *)this);
plVar2 = (logger *)
std::__shared_ptr_access<spdlog::logger,(__gnu_cxx::_Lock_policy)2,false,false>::
operator->(param_2);
/* try { // try from 00134c54 to 00134cec has its CatchHandler @ 00134cfe */
psVar3 = (string *)logger::name_abi_cxx11_(plVar2);
local_20 = std::
unordered_map<std::__cxx11::string,spdlog::level::level_enum,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,spdlog::level::level_enum>>>
::find((unordered_map<std::__cxx11::string,spdlog::level::level_enum,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,spdlog::level::level_enum>>>
*)(this + 0xb0),psVar3);
local_38 = std::
unordered_map<std::__cxx11::string,spdlog::level::level_enum,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,spdlog::level::level_enum>>>
::end();
bVar1 = std::__detail::operator==
((_Node_iterator_base *)&local_20,(_Node_iterator_base *)&local_38);
if (((bVar1 ^ 0xff) & 1) == 0) {
local_64 = *(int4 *)(this + 0xf0);
}
else {
lVar4 = std::__detail::
_Node_iterator<std::pair<std::__cxx11::string_const,spdlog::level::level_enum>,false,true>
::operator->((_Node_iterator<std::pair<std::__cxx11::string_const,spdlog::level::level_enum>,false,true>
*)&local_20);
local_64 = *(int4 *)(lVar4 + 0x20);
}
local_30 = local_64;
plVar2 = (logger *)
std::__shared_ptr_access<spdlog::logger,(__gnu_cxx::_Lock_policy)2,false,false>::
operator->(param_2);
logger::set_level(plVar2,local_30);
std::lock_guard<std::mutex>::~lock_guard(local_18);
return;
}
| |
26,589 | cleanup_file_class() | eloqsql/storage/perfschema/pfs_instr_class.cc | void cleanup_file_class(void)
{
PFS_FREE_ARRAY(& builtin_memory_file_class,
file_class_max, sizeof(PFS_file_class),
file_class_array);
file_class_array= NULL;
file_class_dirty_count= file_class_allocated_count= 0;
file_class_max= 0;
} | O0 | cpp | cleanup_file_class():
pushq %rbp
movq %rsp, %rbp
movq 0x3ca435(%rip), %rsi # 0x40c5c0
movq 0x3cac76(%rip), %rcx # 0x40ce08
leaq 0x3c7867(%rip), %rdi # 0x409a00
movl $0x140, %edx # imm = 0x140
callq 0x29be0
movq $0x0, 0x3cac5a(%rip) # 0x40ce08
movl $0x0, 0x3cac9c(%rip) # 0x40ce54
movl $0x0, 0x3cac96(%rip) # 0x40ce58
movq $0x0, 0x3ca3f3(%rip) # 0x40c5c0
popq %rbp
retq
nop
| _Z18cleanup_file_classv:
push rbp
mov rbp, rsp
mov rsi, cs:file_class_max
mov rcx, cs:file_class_array
lea rdi, builtin_memory_file_class
mov edx, 140h
call _Z14pfs_free_arrayP24PFS_builtin_memory_classmmPv; pfs_free_array(PFS_builtin_memory_class *,ulong,ulong,void *)
mov cs:file_class_array, 0
mov cs:_ZL26file_class_allocated_count, 0; file_class_allocated_count
mov cs:_ZL22file_class_dirty_count, 0; file_class_dirty_count
mov cs:file_class_max, 0
pop rbp
retn
| long long cleanup_file_class(void)
{
long long result; // rax
result = pfs_free_array(
(PFS_builtin_memory_class *)&builtin_memory_file_class,
file_class_max,
320LL,
(void *)file_class_array);
file_class_array = 0LL;
file_class_allocated_count = 0;
file_class_dirty_count = 0;
file_class_max = 0LL;
return result;
}
| cleanup_file_class:
PUSH RBP
MOV RBP,RSP
MOV RSI,qword ptr [0x0050c5c0]
MOV RCX,qword ptr [0x0050ce08]
LEA RDI,[0x509a00]
MOV EDX,0x140
CALL 0x00129be0
MOV qword ptr [0x0050ce08],0x0
MOV dword ptr [0x0050ce54],0x0
MOV dword ptr [0x0050ce58],0x0
MOV qword ptr [0x0050c5c0],0x0
POP RBP
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* cleanup_file_class() */
void cleanup_file_class(void)
{
pfs_free_array((PFS_builtin_memory_class *)builtin_memory_file_class,file_class_max,0x140,
file_class_array);
file_class_array = (void *)0x0;
file_class_allocated_count = 0;
file_class_dirty_count = 0;
file_class_max = 0;
return;
}
| |
26,590 | common_params_handle_model_default(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/arg.cpp | static void common_params_handle_model_default(
std::string & model,
const std::string & model_url,
std::string & hf_repo,
std::string & hf_file,
const std::string & hf_token,
const std::string & model_default) {
if (!hf_repo.empty()) {
// short-hand to avoid specifying --hf-file -> default it to --model
if (hf_file.empty()) {
if (model.empty()) {
auto auto_detected = common_get_hf_file(hf_repo, hf_token);
if (auto_detected.first.empty() || auto_detected.second.empty()) {
exit(1); // built without CURL, error message already printed
}
hf_repo = auto_detected.first;
hf_file = auto_detected.second;
} else {
hf_file = model;
}
}
// make sure model path is present (for caching purposes)
if (model.empty()) {
// this is to avoid different repo having same file name, or same file name in different subdirs
std::string filename = hf_repo + "_" + hf_file;
// to make sure we don't have any slashes in the filename
string_replace_all(filename, "/", "_");
model = fs_get_cache_file(filename);
}
} else if (!model_url.empty()) {
if (model.empty()) {
auto f = string_split<std::string>(model_url, '#').front();
f = string_split<std::string>(f, '?').front();
model = fs_get_cache_file(string_split<std::string>(f, '/').back());
}
} else if (model.empty()) {
model = model_default;
}
} | O3 | cpp | common_params_handle_model_default(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdx)
je 0x4e27d
movq %rcx, %r14
movq %rdx, %r15
cmpq $0x0, 0x8(%rcx)
jne 0x4e3fb
cmpq $0x0, 0x8(%rbx)
je 0x4e380
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1b4a0
jmp 0x4e3fb
cmpq $0x0, 0x8(%rsi)
movq 0x8(%rbx), %rax
je 0x4e35e
testq %rax, %rax
jne 0x4e56d
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl $0x23, %edx
callq 0x4e633
movq (%r14), %rax
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x21bb4
leaq 0x8(%rsp), %rdi
callq 0x2171e
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movl $0x3f, %edx
callq 0x4e633
movq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x1b4a0
leaq 0x8(%rsp), %rdi
callq 0x2171e
leaq 0x68(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movl $0x2f, %edx
callq 0x4e633
movq 0x70(%rsp), %rsi
addq $-0x20, %rsi
leaq 0x8(%rsp), %rdi
callq 0x73dc7
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1ba70
movq (%r14), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4e34f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8b0
leaq 0x68(%rsp), %rdi
callq 0x2171e
jmp 0x4e556
testq %rax, %rax
jne 0x4e56d
movq %rbx, %rdi
movq %r9, %rsi
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1b4a0
leaq 0x28(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r8, %rdx
callq 0x753e1
cmpq $0x0, 0x8(%r12)
je 0x4e57c
cmpq $0x0, 0x50(%rsp)
je 0x4e57c
leaq 0x28(%rsp), %rsi
movq %r15, %rdi
callq 0x1b4a0
leaq 0x48(%rsp), %rsi
movq %r14, %rdi
callq 0x1b4a0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4e3e0
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x1b8b0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4e3fb
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1b8b0
cmpq $0x0, 0x8(%rbx)
jne 0x4e56d
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x21bb4
leaq 0xa31df(%rip), %rsi # 0xf160d
movq %r15, %rdi
callq 0x1c0d0
movq (%r14), %rsi
movq 0x8(%r14), %rdx
leaq 0x8(%rsp), %rdi
callq 0x1b260
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4e46e
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x4e475
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4e4a4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8b0
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0xa8521(%rip), %rsi # 0xf69d4
leaq 0xa851b(%rip), %rdx # 0xf69d5
callq 0x21ce4
leaq 0x78(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xa313e(%rip), %rsi # 0xf160d
leaq 0xa3138(%rip), %rdx # 0xf160e
leaq 0x68(%rsp), %rdi
callq 0x21ce4
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x68(%rsp), %rdx
callq 0x72069
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x4e50b
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x1b8b0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4e522
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8b0
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x73dc7
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1ba70
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x4e556
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8b0
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x4e56d
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1b8b0
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x1, %edi
callq 0x1ba40
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
jmp 0x4e59a
jmp 0x4e5fb
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2171e
jmp 0x4e5fe
jmp 0x4e5fb
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2171e
jmp 0x4e62b
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x55752
jmp 0x4e62b
jmp 0x4e5fb
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x4e5e2
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x1b8b0
jmp 0x4e5e2
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4e5fe
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8b0
jmp 0x4e5fe
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x4e62b
movq 0x38(%rsp), %rsi
jmp 0x4e623
jmp 0x4e611
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4e62b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8b0
movq %rbx, %rdi
callq 0x1bf70
| _ZL34common_params_handle_model_defaultRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS4_S5_S5_S7_S7_:
push r15
push r14
push r12
push rbx
sub rsp, 88h
mov rbx, rdi
cmp qword ptr [rdx+8], 0
jz short loc_4E27D
mov r14, rcx
mov r15, rdx
cmp qword ptr [rcx+8], 0
jnz loc_4E3FB
cmp qword ptr [rbx+8], 0
jz loc_4E380
mov rdi, r14
mov rsi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
jmp loc_4E3FB
loc_4E27D:
cmp qword ptr [rsi+8], 0
mov rax, [rbx+8]
jz loc_4E35E
test rax, rax
jnz loc_4E56D
lea r14, [rsp+0A8h+var_A0]
mov rdi, r14; int
mov edx, 23h ; '#'; int
call _ZL12string_splitINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorIT_SaIS7_EERKS5_c; string_split<std::string>(std::string const&,char)
mov rax, [r14]
lea r15, [rsp+0A8h+var_70]
mov [r15-10h], r15
mov rsi, [rax]
mov rdx, [rax+8]
add rdx, rsi
lea rdi, [rsp+0A8h+var_80]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rdi, [rsp+0A8h+var_A0]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rsp+0A8h+var_A0]; int
lea rsi, [rsp+0A8h+var_80]; int
mov edx, 3Fh ; '?'; int
call _ZL12string_splitINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorIT_SaIS7_EERKS5_c; string_split<std::string>(std::string const&,char)
mov rsi, [rsp+0A8h+var_A0]
lea rdi, [rsp+0A8h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
lea rdi, [rsp+0A8h+var_A0]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rsp+0A8h+var_40]; int
lea rsi, [rsp+0A8h+var_80]; int
mov edx, 2Fh ; '/'; int
call _ZL12string_splitINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorIT_SaIS7_EERKS5_c; string_split<std::string>(std::string const&,char)
mov rsi, [rsp+0A8h+var_38]
add rsi, 0FFFFFFFFFFFFFFE0h
lea rdi, [rsp+0A8h+var_A0]
call _Z17fs_get_cache_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; fs_get_cache_file(std::string const&)
lea r14, [rsp+0A8h+var_A0]
mov rdi, rbx
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r14]; void *
lea rax, [rsp+0A8h+var_90]
cmp rdi, rax
jz short loc_4E34F
mov rsi, [rsp+0A8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4E34F:
lea rdi, [rsp+0A8h+var_40]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
jmp loc_4E556
loc_4E35E:
test rax, rax
jnz loc_4E56D
mov rdi, rbx
mov rsi, r9
add rsp, 88h
pop rbx
pop r12
pop r14
pop r15
jmp __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
loc_4E380:
lea r12, [rsp+0A8h+var_80]
mov rdi, r12
mov rsi, r15
mov rdx, r8
call _Z18common_get_hf_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_; common_get_hf_file(std::string const&,std::string const&)
cmp qword ptr [r12+8], 0
jz loc_4E57C
cmp [rsp+0A8h+var_58], 0
jz loc_4E57C
lea rsi, [rsp+0A8h+var_80]
mov rdi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
lea rsi, [rsp+0A8h+var_60]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
lea rax, [rsp+0A8h+var_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_4E3E0
mov rsi, [rsp+0A8h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4E3E0:
lea rax, [rsp+0A8h+var_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_4E3FB
mov rsi, [rsp+0A8h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4E3FB:
cmp qword ptr [rbx+8], 0
jnz loc_4E56D
lea r12, [rsp+0A8h+var_90]
mov [r12-10h], r12
mov rsi, [r15]
mov rdx, [r15+8]
add rdx, rsi
lea r15, [rsp+0A8h+var_A0]
mov rdi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rsi, aCall911+8; "_"
mov rdi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [r14]
mov rdx, [r14+8]
lea rdi, [rsp+0A8h+var_A0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
lea r15, [rsp+0A8h+var_70]
mov [r15-10h], r15
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_4E46E
mov [rsp+0A8h+var_80], rdx
mov rdx, [rcx]
mov [rsp+0A8h+var_70], rdx
jmp short loc_4E475
loc_4E46E:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r15], xmm0
loc_4E475:
mov rdx, [rax+8]
mov [rsp+0A8h+var_78], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rdi, [rsp+0A8h+var_A0]; void *
cmp rdi, r12
jz short loc_4E4A4
mov rsi, [rsp+0A8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4E4A4:
lea rdi, [rsp+0A8h+var_A0]
mov [rdi], r12
lea rsi, asc_F69D3+1; "/"
lea rdx, asc_F69D3+2; ""
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 r14, [rsp+0A8h+var_30]
mov [r14-10h], r14
lea rsi, aCall911+8; "_"
lea rdx, aCall911+9; ""
lea rdi, [rsp+0A8h+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 rdi, [rsp+0A8h+var_80]; int
lea rsi, [rsp+0A8h+var_A0]; int
lea rdx, [rsp+0A8h+var_40]; int
call _Z18string_replace_allRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS4_S7_; string_replace_all(std::string &,std::string const&,std::string const&)
mov rdi, [rsp+0A8h+var_40]; void *
cmp rdi, r14
jz short loc_4E50B
mov rsi, [rsp+0A8h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4E50B:
mov rdi, [rsp+0A8h+var_A0]; void *
cmp rdi, r12
jz short loc_4E522
mov rsi, [rsp+0A8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4E522:
lea rdi, [rsp+0A8h+var_A0]
lea rsi, [rsp+0A8h+var_80]
call _Z17fs_get_cache_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; fs_get_cache_file(std::string const&)
lea r14, [rsp+0A8h+var_A0]
mov rdi, rbx
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r14]; void *
cmp rdi, r12
jz short loc_4E556
mov rsi, [rsp+0A8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4E556:
mov rdi, [rsp+0A8h+var_80]; void *
cmp rdi, r15
jz short loc_4E56D
mov rsi, [rsp+0A8h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4E56D:
add rsp, 88h
pop rbx
pop r12
pop r14
pop r15
retn
loc_4E57C:
mov edi, 1
call _exit
mov rbx, rax
lea rdi, [rsp+0A8h+var_40]
jmp short loc_4E59A
jmp short loc_4E5FB
mov rbx, rax
lea rdi, [rsp+0A8h+var_A0]
loc_4E59A:
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
jmp short loc_4E5FE
jmp short loc_4E5FB
mov rbx, rax
lea rdi, [rsp+0A8h+var_A0]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
jmp short loc_4E62B
mov rbx, rax
lea rdi, [rsp+0A8h+var_80]
call _ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ED2Ev; std::pair<std::string,std::string>::~pair()
jmp short loc_4E62B
jmp short loc_4E5FB
mov rbx, rax
mov rdi, [rsp+0A8h+var_40]; void *
cmp rdi, r14
jz short loc_4E5E2
mov rsi, [rsp+0A8h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_4E5E2
mov rbx, rax
loc_4E5E2:
mov rdi, [rsp+0A8h+var_A0]; void *
cmp rdi, r12
jz short loc_4E5FE
mov rsi, [rsp+0A8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_4E5FE
loc_4E5FB:
mov rbx, rax
loc_4E5FE:
mov rdi, [rsp+0A8h+var_80]
cmp rdi, r15
jz short loc_4E62B
mov rsi, [rsp+0A8h+var_70]
jmp short loc_4E623
jmp short $+2
loc_4E611:
mov rbx, rax
mov rdi, [rsp+0A8h+var_A0]; void *
cmp rdi, r12
jz short loc_4E62B
mov rsi, [rsp+0A8h+var_90]
loc_4E623:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4E62B:
mov rdi, rbx
call __Unwind_Resume
| void common_params_handle_model_default(
long long a1,
long long a2,
long long a3,
_QWORD *a4,
long long a5,
long long a6)
{
long long v8; // rax
int v9; // ecx
int v10; // r8d
int v11; // r9d
int v12; // ecx
int v13; // r8d
int v14; // r9d
long long v15; // rax
__int128 *v16; // rcx
int v17; // ecx
int v18; // r8d
int v19; // r9d
void *v20; // [rsp+0h] [rbp-A8h]
void *v21; // [rsp+0h] [rbp-A8h]
void *v22; // [rsp+0h] [rbp-A8h]
void *v23; // [rsp+8h] [rbp-A0h] BYREF
long long v24; // [rsp+10h] [rbp-98h]
_QWORD v25[2]; // [rsp+18h] [rbp-90h] BYREF
void *v26; // [rsp+28h] [rbp-80h] BYREF
long long v27; // [rsp+30h] [rbp-78h]
__int128 v28; // [rsp+38h] [rbp-70h] BYREF
void *v29[2]; // [rsp+48h] [rbp-60h] BYREF
long long v30; // [rsp+58h] [rbp-50h] BYREF
void *v31[2]; // [rsp+68h] [rbp-40h] BYREF
_QWORD v32[6]; // [rsp+78h] [rbp-30h] BYREF
if ( *(_QWORD *)(a3 + 8) )
{
if ( !a4[1] )
{
if ( *(_QWORD *)(a1 + 8) )
{
std::string::_M_assign(a4, a1);
}
else
{
common_get_hf_file(&v26, a3, a5);
if ( !v27 || !v29[1] )
exit(1LL);
std::string::_M_assign(a3, &v26);
std::string::_M_assign(a4, v29);
if ( v29[0] != &v30 )
operator delete(v29[0], v30 + 1);
if ( v26 != &v28 )
operator delete(v26, v28 + 1);
}
}
if ( !*(_QWORD *)(a1 + 8) )
{
v23 = v25;
std::string::_M_construct<char *>((long long)&v23, *(_BYTE **)a3, *(_QWORD *)a3 + *(_QWORD *)(a3 + 8));
std::string::append(&v23, "_");
v15 = std::string::_M_append(&v23, *a4, a4[1]);
v26 = &v28;
v16 = (__int128 *)(v15 + 16);
if ( *(_QWORD *)v15 == v15 + 16 )
{
v28 = *v16;
}
else
{
v26 = *(void **)v15;
*(_QWORD *)&v28 = *(_QWORD *)v16;
}
v27 = *(_QWORD *)(v15 + 8);
*(_QWORD *)v15 = v16;
*(_QWORD *)(v15 + 8) = 0LL;
*(_BYTE *)(v15 + 16) = 0;
if ( v23 != v25 )
operator delete(v23, v25[0] + 1LL);
v23 = v25;
std::string::_M_construct<char const*>((long long)&v23, "/", (long long)"");
v31[0] = v32;
std::string::_M_construct<char const*>((long long)v31, "_", (long long)"");
string_replace_all((int)&v26, (int)&v23, (int)v31, v17, v18, v19, v20, (int)v23, v24);
if ( v31[0] != v32 )
operator delete(v31[0], v32[0] + 1LL);
if ( v23 != v25 )
operator delete(v23, v25[0] + 1LL);
fs_get_cache_file(&v23, &v26);
std::string::operator=(a1, &v23);
if ( v23 != v25 )
operator delete(v23, v25[0] + 1LL);
LABEL_30:
if ( v26 != &v28 )
operator delete(v26, v28 + 1);
}
}
else
{
v8 = *(_QWORD *)(a1 + 8);
if ( *(_QWORD *)(a2 + 8) )
{
if ( v8 )
return;
string_split<std::string>((int)&v23, a2, 35, (int)a4, a5, a6, v20, (int)v23, v24);
v26 = &v28;
std::string::_M_construct<char *>((long long)&v26, *(_BYTE **)v23, *(_QWORD *)v23 + *((_QWORD *)v23 + 1));
std::vector<std::string>::~vector((long long)&v23);
string_split<std::string>((int)&v23, (int)&v26, 63, v9, v10, v11, v21, (int)v23, v24);
std::string::_M_assign(&v26, v23);
std::vector<std::string>::~vector((long long)&v23);
string_split<std::string>((int)v31, (int)&v26, 47, v12, v13, v14, v22, (int)v23, v24);
fs_get_cache_file(&v23, (char *)v31[1] - 32);
std::string::operator=(a1, &v23);
if ( v23 != v25 )
operator delete(v23, v25[0] + 1LL);
std::vector<std::string>::~vector((long long)v31);
goto LABEL_30;
}
if ( !v8 )
std::string::_M_assign(a1, a6);
}
}
| common_params_handle_model_default:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV RBX,RDI
CMP qword ptr [RDX + 0x8],0x0
JZ 0x0014e27d
MOV R14,RCX
MOV R15,RDX
CMP qword ptr [RCX + 0x8],0x0
JNZ 0x0014e3fb
CMP qword ptr [RBX + 0x8],0x0
JZ 0x0014e380
MOV RDI,R14
MOV RSI,RBX
CALL 0x0011b4a0
JMP 0x0014e3fb
LAB_0014e27d:
CMP qword ptr [RSI + 0x8],0x0
MOV RAX,qword ptr [RBX + 0x8]
JZ 0x0014e35e
TEST RAX,RAX
JNZ 0x0014e56d
LEA R14,[RSP + 0x8]
MOV RDI,R14
MOV EDX,0x23
CALL 0x0014e633
MOV RAX,qword ptr [R14]
LEA R15,[RSP + 0x38]
MOV qword ptr [R15 + -0x10],R15
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
ADD RDX,RSI
LAB_0014e2bd:
LEA RDI,[RSP + 0x28]
CALL 0x00121bb4
LEA RDI,[RSP + 0x8]
CALL 0x0012171e
LAB_0014e2d1:
LEA RDI,[RSP + 0x8]
LEA RSI,[RSP + 0x28]
MOV EDX,0x3f
CALL 0x0014e633
MOV RSI,qword ptr [RSP + 0x8]
LAB_0014e2ea:
LEA RDI,[RSP + 0x28]
CALL 0x0011b4a0
LEA RDI,[RSP + 0x8]
CALL 0x0012171e
LAB_0014e2fe:
LEA RDI,[RSP + 0x68]
LEA RSI,[RSP + 0x28]
MOV EDX,0x2f
CALL 0x0014e633
MOV RSI,qword ptr [RSP + 0x70]
ADD RSI,-0x20
LAB_0014e31b:
LEA RDI,[RSP + 0x8]
CALL 0x00173dc7
LAB_0014e325:
LEA R14,[RSP + 0x8]
MOV RDI,RBX
MOV RSI,R14
CALL 0x0011ba70
MOV RDI,qword ptr [R14]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x0014e34f
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011b8b0
LAB_0014e34f:
LEA RDI,[RSP + 0x68]
CALL 0x0012171e
JMP 0x0014e556
LAB_0014e35e:
TEST RAX,RAX
JNZ 0x0014e56d
MOV RDI,RBX
MOV RSI,R9
ADD RSP,0x88
POP RBX
POP R12
POP R14
POP R15
JMP 0x0011b4a0
LAB_0014e380:
LEA R12,[RSP + 0x28]
MOV RDI,R12
MOV RSI,R15
MOV RDX,R8
CALL 0x001753e1
CMP qword ptr [R12 + 0x8],0x0
JZ 0x0014e57c
CMP qword ptr [RSP + 0x50],0x0
JZ 0x0014e57c
LAB_0014e3ab:
LEA RSI,[RSP + 0x28]
MOV RDI,R15
CALL 0x0011b4a0
LEA RSI,[RSP + 0x48]
MOV RDI,R14
CALL 0x0011b4a0
LAB_0014e3c5:
LEA RAX,[RSP + 0x58]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0014e3e0
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x0011b8b0
LAB_0014e3e0:
LEA RAX,[RSP + 0x38]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0014e3fb
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x0011b8b0
LAB_0014e3fb:
CMP qword ptr [RBX + 0x8],0x0
JNZ 0x0014e56d
LEA R12,[RSP + 0x18]
MOV qword ptr [R12 + -0x10],R12
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
ADD RDX,RSI
LEA R15,[RSP + 0x8]
MOV RDI,R15
CALL 0x00121bb4
LAB_0014e427:
LEA RSI,[0x1f160d]
MOV RDI,R15
CALL 0x0011c0d0
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
LAB_0014e43d:
LEA RDI,[RSP + 0x8]
CALL 0x0011b260
LEA R15,[RSP + 0x38]
MOV qword ptr [R15 + -0x10],R15
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x0014e46e
MOV qword ptr [RSP + 0x28],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x38],RDX
JMP 0x0014e475
LAB_0014e46e:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R15],XMM0
LAB_0014e475:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x0014e4a4
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011b8b0
LAB_0014e4a4:
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],R12
LAB_0014e4ac:
LEA RSI,[0x1f69d4]
LEA RDX,[0x1f69d5]
CALL 0x00121ce4
LEA R14,[RSP + 0x78]
MOV qword ptr [R14 + -0x10],R14
LAB_0014e4c8:
LEA RSI,[0x1f160d]
LEA RDX,[0x1f160e]
LEA RDI,[RSP + 0x68]
CALL 0x00121ce4
LAB_0014e4e0:
LEA RDI,[RSP + 0x28]
LEA RSI,[RSP + 0x8]
LEA RDX,[RSP + 0x68]
CALL 0x00172069
MOV RDI,qword ptr [RSP + 0x68]
CMP RDI,R14
JZ 0x0014e50b
MOV RSI,qword ptr [RSP + 0x78]
INC RSI
CALL 0x0011b8b0
LAB_0014e50b:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x0014e522
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011b8b0
LAB_0014e522:
LEA RDI,[RSP + 0x8]
LEA RSI,[RSP + 0x28]
CALL 0x00173dc7
LAB_0014e531:
LEA R14,[RSP + 0x8]
MOV RDI,RBX
MOV RSI,R14
CALL 0x0011ba70
MOV RDI,qword ptr [R14]
CMP RDI,R12
JZ 0x0014e556
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011b8b0
LAB_0014e556:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R15
JZ 0x0014e56d
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x0011b8b0
LAB_0014e56d:
ADD RSP,0x88
POP RBX
POP R12
POP R14
POP R15
RET
LAB_0014e57c:
MOV EDI,0x1
CALL 0x0011ba40
|
/* common_params_handle_model_default(std::__cxx11::string&, std::__cxx11::string const&,
std::__cxx11::string&, std::__cxx11::string&, std::__cxx11::string const&, std::__cxx11::string
const&) */
void common_params_handle_model_default
(string *param_1,string *param_2,string *param_3,string *param_4,string *param_5,
string *param_6)
{
long *plVar1;
long *plVar2;
long *local_a0 [2];
long local_90 [2];
long *local_80;
long local_78;
long local_70;
long lStack_68;
long *local_60;
long local_58;
long local_50 [2];
long *local_40 [2];
long local_30 [2];
if (*(long *)(param_3 + 8) == 0) {
if (*(long *)(param_2 + 8) == 0) {
if (*(long *)(param_1 + 8) != 0) {
return;
}
std::__cxx11::string::_M_assign(param_1);
return;
}
if (*(long *)(param_1 + 8) != 0) {
return;
}
string_split<std::__cxx11::string>((string *)local_a0,(char)param_2);
local_80 = &local_70;
/* try { // try from 0014e2bd to 0014e2c6 has its CatchHandler @ 0014e5a3 */
std::__cxx11::string::_M_construct<char*>(&local_80,*local_a0[0],local_a0[0][1] + *local_a0[0]);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_a0);
/* try { // try from 0014e2d1 to 0014e2e4 has its CatchHandler @ 0014e5a1 */
string_split<std::__cxx11::string>((string *)local_a0,(char)&local_80);
/* try { // try from 0014e2ea to 0014e2f3 has its CatchHandler @ 0014e592 */
std::__cxx11::string::_M_assign((string *)&local_80);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_a0);
/* try { // try from 0014e2fe to 0014e311 has its CatchHandler @ 0014e590 */
string_split<std::__cxx11::string>((string *)local_40,(char)&local_80);
/* try { // try from 0014e31b to 0014e324 has its CatchHandler @ 0014e586 */
fs_get_cache_file((string *)local_a0);
std::__cxx11::string::operator=(param_1,(string *)local_a0);
if (local_a0[0] != local_90) {
operator_delete(local_a0[0],local_90[0] + 1);
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_40);
}
else {
if (*(long *)(param_4 + 8) == 0) {
if (*(long *)(param_1 + 8) == 0) {
common_get_hf_file((string *)&local_80,param_3);
if ((local_78 == 0) || (local_58 == 0)) {
/* WARNING: Subroutine does not return */
exit(1);
}
/* try { // try from 0014e3ab to 0014e3c4 has its CatchHandler @ 0014e5b2 */
std::__cxx11::string::_M_assign(param_3);
std::__cxx11::string::_M_assign(param_4);
if (local_60 != local_50) {
operator_delete(local_60,local_50[0] + 1);
}
if (local_80 != &local_70) {
operator_delete(local_80,local_70 + 1);
}
}
else {
std::__cxx11::string::_M_assign(param_4);
}
}
if (*(long *)(param_1 + 8) != 0) {
return;
}
local_a0[0] = local_90;
std::__cxx11::string::_M_construct<char*>
(local_a0,*(long *)param_3,*(long *)(param_3 + 8) + *(long *)param_3);
/* try { // try from 0014e427 to 0014e435 has its CatchHandler @ 0014e611 */
std::__cxx11::string::append((char *)local_a0);
/* try { // try from 0014e43d to 0014e446 has its CatchHandler @ 0014e60f */
plVar1 = (long *)std::__cxx11::string::_M_append((char *)local_a0,*(ulong *)param_4);
local_80 = &local_70;
plVar2 = plVar1 + 2;
if ((long *)*plVar1 == plVar2) {
local_70 = *plVar2;
lStack_68 = plVar1[3];
}
else {
local_70 = *plVar2;
local_80 = (long *)*plVar1;
}
local_78 = plVar1[1];
*plVar1 = (long)plVar2;
plVar1[1] = 0;
*(int1 *)(plVar1 + 2) = 0;
if (local_a0[0] != local_90) {
operator_delete(local_a0[0],local_90[0] + 1);
}
local_a0[0] = local_90;
/* try { // try from 0014e4ac to 0014e4be has its CatchHandler @ 0014e5fb */
std::__cxx11::string::_M_construct<char_const*>(local_a0,&DAT_001f69d4,&DAT_001f69d5);
/* try { // try from 0014e4c8 to 0014e4df has its CatchHandler @ 0014e5df */
local_40[0] = local_30;
std::__cxx11::string::_M_construct<char_const*>(local_40,&DAT_001f160d,&DAT_001f160e);
/* try { // try from 0014e4e0 to 0014e4f3 has its CatchHandler @ 0014e5c3 */
string_replace_all((string *)&local_80,(string *)local_a0,(string *)local_40);
if (local_40[0] != local_30) {
operator_delete(local_40[0],local_30[0] + 1);
}
if (local_a0[0] != local_90) {
operator_delete(local_a0[0],local_90[0] + 1);
}
/* try { // try from 0014e522 to 0014e530 has its CatchHandler @ 0014e5c1 */
fs_get_cache_file((string *)local_a0);
std::__cxx11::string::operator=(param_1,(string *)local_a0);
if (local_a0[0] != local_90) {
operator_delete(local_a0[0],local_90[0] + 1);
}
}
if (local_80 != &local_70) {
operator_delete(local_80,local_70 + 1);
}
return;
}
| |
26,591 | link_block | eloqsql/storage/maria/ma_pagecache.c | static void link_block(PAGECACHE *pagecache, PAGECACHE_BLOCK_LINK *block,
my_bool hot, my_bool at_end)
{
PAGECACHE_BLOCK_LINK *ins;
PAGECACHE_BLOCK_LINK **ptr_ins;
DBUG_ENTER("link_block");
PCBLOCK_INFO(block);
KEYCACHE_DBUG_ASSERT(! (block->hash_link && block->hash_link->requests));
if (!hot && pagecache->waiting_for_block.last_thread)
{
/* Signal that in the LRU warm sub-chain an available block has appeared */
struct st_my_thread_var *last_thread=
pagecache->waiting_for_block.last_thread;
struct st_my_thread_var *first_thread= last_thread->next;
struct st_my_thread_var *next_thread= first_thread;
PAGECACHE_HASH_LINK *hash_link=
(PAGECACHE_HASH_LINK *) first_thread->keycache_link;
struct st_my_thread_var *thread;
DBUG_ASSERT(block->requests + block->wlocks + block->rlocks +
block->pins == 0);
DBUG_ASSERT(block->next_used == NULL);
do
{
thread= next_thread;
next_thread= thread->next;
/*
We notify about the event all threads that ask
for the same page as the first thread in the queue
*/
if ((PAGECACHE_HASH_LINK *) thread->keycache_link == hash_link)
{
DBUG_PRINT("signal", ("thread: %s %ld", thread->name,
(ulong) thread->id));
pagecache_pthread_cond_signal(&thread->suspend);
wqueue_unlink_from_queue(&pagecache->waiting_for_block, thread);
block->requests++;
}
}
while (thread != last_thread);
DBUG_PRINT("hash", ("hash_link (link block): %p, hash_link: %p -> %p",
hash_link, hash_link->block, block));
hash_link->block= block;
/* Ensure that no other thread tries to use this block */
block->status|= PCBLOCK_REASSIGNED;
DBUG_PRINT("signal", ("after signal"));
#if defined(PAGECACHE_DEBUG)
KEYCACHE_DBUG_PRINT("link_block",
("linked,unlinked block: %u status: %x #requests: %u #available: %u",
PCBLOCK_NUMBER(pagecache, block), block->status,
block->requests, pagecache->blocks_available));
#endif
DBUG_VOID_RETURN;
}
ptr_ins= hot ? &pagecache->used_ins : &pagecache->used_last;
ins= *ptr_ins;
if (ins)
{
ins->next_used->prev_used= &block->next_used;
block->next_used= ins->next_used;
block->prev_used= &ins->next_used;
ins->next_used= block;
if (at_end)
*ptr_ins= block;
}
else
{
/* The LRU chain is empty */
pagecache->used_last= pagecache->used_ins= block->next_used= block;
block->prev_used= &block->next_used;
}
KEYCACHE_THREAD_TRACE("link_block");
#if defined(PAGECACHE_DEBUG)
pagecache->blocks_available++;
KEYCACHE_DBUG_PRINT("link_block",
("linked block: %u:%1u status: %x #requests: %u #available: %u",
PCBLOCK_NUMBER(pagecache, block), at_end, block->status,
block->requests, pagecache->blocks_available));
KEYCACHE_DBUG_ASSERT(pagecache->blocks_available <=
pagecache->blocks_used);
#endif
DBUG_VOID_RETURN;
} | O3 | c | link_block:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
testb %dl, %dl
je 0x3e4bd
leaq 0xc0(%rdi), %r9
leaq 0xb8(%rdi), %r10
xorl %r8d, %r8d
testb %dl, %dl
setne %r8b
movq %r9, %rax
cmoveq %r10, %rax
movq 0xb8(%rdi,%r8,8), %rdx
testq %rdx, %rdx
je 0x3e531
movq (%rdx), %rdi
movq %r14, 0x8(%rdi)
movq (%rdx), %rdi
movq %rdi, (%r14)
movq %rdx, 0x8(%r14)
movq %r14, (%rdx)
testb %cl, %cl
je 0x3e549
movq %r14, (%rax)
jmp 0x3e549
movq 0x120(%rdi), %r12
testq %r12, %r12
je 0x3e46a
addq $0x120, %rdi # imm = 0x120
movq %rdi, -0x30(%rbp)
movq 0x88(%r12), %r15
movq 0xa8(%r15), %r13
movq 0x88(%r15), %rbx
cmpq %r13, 0xa8(%r15)
jne 0x3e515
movq 0x38(%r15), %rdi
testq %rdi, %rdi
jne 0x3e51f
leaq 0x8(%r15), %rdi
callq 0x2a5b0
movq -0x30(%rbp), %rdi
movq %r15, %rsi
callq 0xab5b0
incl 0x60(%r14)
cmpq %r12, %r15
movq %rbx, %r15
jne 0x3e4e3
jmp 0x3e540
leaq 0x34dea2(%rip), %rax # 0x38c3c8
movq (%rax), %rax
callq *0x170(%rax)
jmp 0x3e4fc
movq %r14, (%r14)
movq %r14, (%r9)
movq %r14, (%r10)
movq %r14, 0x8(%r14)
jmp 0x3e549
movq %r14, 0x10(%r13)
orb $0x8, 0x74(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| link_block:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rsi
test dl, dl
jz short loc_3E4BD
loc_3E46A:
lea r9, [rdi+0C0h]
lea r10, [rdi+0B8h]
xor r8d, r8d
test dl, dl
setnz r8b
mov rax, r9
cmovz rax, r10
mov rdx, [rdi+r8*8+0B8h]
test rdx, rdx
jz loc_3E531
mov rdi, [rdx]
mov [rdi+8], r14
mov rdi, [rdx]
mov [r14], rdi
mov [r14+8], rdx
mov [rdx], r14
test cl, cl
jz loc_3E549
mov [rax], r14
jmp loc_3E549
loc_3E4BD:
mov r12, [rdi+120h]
test r12, r12
jz short loc_3E46A
add rdi, 120h
mov [rbp+var_30], rdi
mov r15, [r12+88h]
mov r13, [r15+0A8h]
loc_3E4E3:
mov rbx, [r15+88h]
cmp [r15+0A8h], r13
jnz short loc_3E515
mov rdi, [r15+38h]
test rdi, rdi
jnz short loc_3E51F
loc_3E4FC:
lea rdi, [r15+8]
call _pthread_cond_signal
mov rdi, [rbp+var_30]
mov rsi, r15
call wqueue_unlink_from_queue
inc dword ptr [r14+60h]
loc_3E515:
cmp r15, r12
mov r15, rbx
jnz short loc_3E4E3
jmp short loc_3E540
loc_3E51F:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+170h]
jmp short loc_3E4FC
loc_3E531:
mov [r14], r14
mov [r9], r14
mov [r10], r14
mov [r14+8], r14
jmp short loc_3E549
loc_3E540:
mov [r13+10h], r14
or byte ptr [r14+74h], 8
loc_3E549:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _QWORD * link_block(_QWORD *a1, long long a2, char a3, char a4)
{
_QWORD *result; // rax
long long v5; // rdx
_QWORD *v6; // r12
_QWORD *v7; // r15
long long v8; // r13
_QWORD *v9; // rbx
bool v10; // zf
if ( a3 || (v6 = (_QWORD *)a1[36]) == 0LL )
{
result = a1 + 24;
if ( !a3 )
result = a1 + 23;
v5 = a1[(a3 != 0) + 23];
if ( v5 )
{
*(_QWORD *)(*(_QWORD *)v5 + 8LL) = a2;
*(_QWORD *)a2 = *(_QWORD *)v5;
*(_QWORD *)(a2 + 8) = v5;
*(_QWORD *)v5 = a2;
if ( a4 )
*result = a2;
}
else
{
*(_QWORD *)a2 = a2;
a1[24] = a2;
a1[23] = a2;
*(_QWORD *)(a2 + 8) = a2;
}
}
else
{
v7 = (_QWORD *)v6[17];
v8 = v7[21];
do
{
v9 = (_QWORD *)v7[17];
if ( v7[21] == v8 )
{
if ( v7[7] )
PSI_server[46]();
pthread_cond_signal(v7 + 1);
result = (_QWORD *)wqueue_unlink_from_queue(a1 + 36, v7);
++*(_DWORD *)(a2 + 96);
}
v10 = v7 == v6;
v7 = v9;
}
while ( !v10 );
*(_QWORD *)(v8 + 16) = a2;
*(_BYTE *)(a2 + 116) |= 8u;
}
return result;
}
| link_block:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
TEST DL,DL
JZ 0x0013e4bd
LAB_0013e46a:
LEA R9,[RDI + 0xc0]
LEA R10,[RDI + 0xb8]
XOR R8D,R8D
TEST DL,DL
SETNZ R8B
MOV RAX,R9
CMOVZ RAX,R10
MOV RDX,qword ptr [RDI + R8*0x8 + 0xb8]
TEST RDX,RDX
JZ 0x0013e531
MOV RDI,qword ptr [RDX]
MOV qword ptr [RDI + 0x8],R14
MOV RDI,qword ptr [RDX]
MOV qword ptr [R14],RDI
MOV qword ptr [R14 + 0x8],RDX
MOV qword ptr [RDX],R14
TEST CL,CL
JZ 0x0013e549
MOV qword ptr [RAX],R14
JMP 0x0013e549
LAB_0013e4bd:
MOV R12,qword ptr [RDI + 0x120]
TEST R12,R12
JZ 0x0013e46a
ADD RDI,0x120
MOV qword ptr [RBP + -0x30],RDI
MOV R15,qword ptr [R12 + 0x88]
MOV R13,qword ptr [R15 + 0xa8]
LAB_0013e4e3:
MOV RBX,qword ptr [R15 + 0x88]
CMP qword ptr [R15 + 0xa8],R13
JNZ 0x0013e515
MOV RDI,qword ptr [R15 + 0x38]
TEST RDI,RDI
JNZ 0x0013e51f
LAB_0013e4fc:
LEA RDI,[R15 + 0x8]
CALL 0x0012a5b0
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,R15
CALL 0x001ab5b0
INC dword ptr [R14 + 0x60]
LAB_0013e515:
CMP R15,R12
MOV R15,RBX
JNZ 0x0013e4e3
JMP 0x0013e540
LAB_0013e51f:
LEA RAX,[0x48c3c8]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x170]
JMP 0x0013e4fc
LAB_0013e531:
MOV qword ptr [R14],R14
MOV qword ptr [R9],R14
MOV qword ptr [R10],R14
MOV qword ptr [R14 + 0x8],R14
JMP 0x0013e549
LAB_0013e540:
MOV qword ptr [R13 + 0x10],R14
OR byte ptr [R14 + 0x74],0x8
LAB_0013e549:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void link_block(long param_1,long *param_2,char param_3,char param_4)
{
long *plVar1;
long lVar2;
long lVar3;
long lVar4;
int8 *puVar5;
long lVar6;
bool bVar7;
if ((param_3 == '\0') && (lVar2 = *(long *)(param_1 + 0x120), lVar2 != 0)) {
lVar3 = *(long *)(*(long *)(lVar2 + 0x88) + 0xa8);
lVar6 = *(long *)(lVar2 + 0x88);
do {
lVar4 = *(long *)(lVar6 + 0x88);
if (*(long *)(lVar6 + 0xa8) == lVar3) {
if (*(long *)(lVar6 + 0x38) != 0) {
(**(code **)(PSI_server + 0x170))();
}
pthread_cond_signal((pthread_cond_t *)(lVar6 + 8));
wqueue_unlink_from_queue(param_1 + 0x120,lVar6);
*(int *)(param_2 + 0xc) = (int)param_2[0xc] + 1;
}
bVar7 = lVar6 != lVar2;
lVar6 = lVar4;
} while (bVar7);
*(long **)(lVar3 + 0x10) = param_2;
*(byte *)((long)param_2 + 0x74) = *(byte *)((long)param_2 + 0x74) | 8;
}
else {
puVar5 = (int8 *)(param_1 + 0xc0);
if (param_3 == '\0') {
puVar5 = (int8 *)(param_1 + 0xb8);
}
plVar1 = *(long **)(param_1 + 0xb8 + (ulong)(param_3 != '\0') * 8);
if (plVar1 == (long *)0x0) {
*param_2 = (long)param_2;
*(int8 *)(param_1 + 0xc0) = param_2;
*(int8 *)(param_1 + 0xb8) = param_2;
param_2[1] = (long)param_2;
}
else {
*(long **)(*plVar1 + 8) = param_2;
*param_2 = *plVar1;
param_2[1] = (long)plVar1;
*plVar1 = (long)param_2;
if (param_4 != '\0') {
*puVar5 = param_2;
}
}
}
return;
}
| |
26,592 | glfwJoystickIsGamepad | untodesu[P]riteg/build_O1/_deps/glfw-src/src/input.c | GLFWAPI int glfwJoystickIsGamepad(int jid)
{
_GLFWjoystick* js;
assert(jid >= GLFW_JOYSTICK_1);
assert(jid <= GLFW_JOYSTICK_LAST);
_GLFW_REQUIRE_INIT_OR_RETURN(GLFW_FALSE);
if (jid < 0 || jid > GLFW_JOYSTICK_LAST)
{
_glfwInputError(GLFW_INVALID_ENUM, "Invalid joystick ID %i", jid);
return GLFW_FALSE;
}
js = _glfw.joysticks + jid;
if (!js->present)
return GLFW_FALSE;
if (!_glfwPlatformPollJoystick(js, _GLFW_POLL_PRESENCE))
return GLFW_FALSE;
return js->mapping != NULL;
} | O1 | c | glfwJoystickIsGamepad:
pushq %r14
pushq %rbx
pushq %rax
testl %edi, %edi
js 0x1b32a
cmpl $0x10, %edi
jge 0x1b349
leaq 0x8936b(%rip), %rax # 0xa4638
cmpl $0x0, (%rax)
je 0x1b30c
movl %edi, %ecx
imulq $0x1fa0, %rcx, %rcx # imm = 0x1FA0
cmpl $0x0, 0x408(%rax,%rcx)
je 0x1b31e
leaq (%rax,%rcx), %r14
addq $0x408, %r14 # imm = 0x408
xorl %ebx, %ebx
movq %r14, %rdi
xorl %esi, %esi
callq 0x28fbe
testl %eax, %eax
je 0x1b320
xorl %ebx, %ebx
cmpq $0x0, 0x70(%r14)
setne %bl
jmp 0x1b320
xorl %ebx, %ebx
movl $0x10001, %edi # imm = 0x10001
xorl %esi, %esi
xorl %eax, %eax
callq 0x19081
jmp 0x1b320
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x63dbb(%rip), %rdi # 0x7f0ec
leaq 0x638e8(%rip), %rsi # 0x7ec20
leaq 0x63f7e(%rip), %rcx # 0x7f2bd
movl $0x499, %edx # imm = 0x499
callq 0xc540
leaq 0x63dd0(%rip), %rdi # 0x7f120
leaq 0x638c9(%rip), %rsi # 0x7ec20
leaq 0x63f5f(%rip), %rcx # 0x7f2bd
movl $0x49a, %edx # imm = 0x49A
callq 0xc540
| glfwJoystickIsGamepad:
push r14
push rbx
push rax
test edi, edi
js short loc_1B32A
cmp edi, 10h
jge loc_1B349
lea rax, _glfw
cmp dword ptr [rax], 0
jz short loc_1B30C
mov ecx, edi
imul rcx, 1FA0h
cmp dword ptr [rax+rcx+408h], 0
jz short loc_1B31E
lea r14, [rax+rcx]
add r14, 408h
xor ebx, ebx
mov rdi, r14
xor esi, esi
call _glfwPlatformPollJoystick
test eax, eax
jz short loc_1B320
xor ebx, ebx
cmp qword ptr [r14+70h], 0
setnz bl
jmp short loc_1B320
loc_1B30C:
xor ebx, ebx
mov edi, 10001h
xor esi, esi
xor eax, eax
call _glfwInputError
jmp short loc_1B320
loc_1B31E:
xor ebx, ebx
loc_1B320:
mov eax, ebx
add rsp, 8
pop rbx
pop r14
retn
loc_1B32A:
lea rdi, aJidGlfwJoystic; "jid >= GLFW_JOYSTICK_1"
lea rsi, aWorkspaceLlm4b_12; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aIntGlfwjoystic_0; "int glfwJoystickIsGamepad(int)"
mov edx, 499h
call ___assert_fail
loc_1B349:
lea rdi, aJidGlfwJoystic_0; "jid <= GLFW_JOYSTICK_LAST"
lea rsi, aWorkspaceLlm4b_12; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aIntGlfwjoystic_0; "int glfwJoystickIsGamepad(int)"
mov edx, 49Ah
call ___assert_fail
| long long glfwJoystickIsGamepad(int a1)
{
long long v1; // rcx
_DWORD *v2; // r14
unsigned int v3; // ebx
if ( a1 < 0 )
__assert_fail(
"jid >= GLFW_JOYSTICK_1",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O1/_deps/glfw-src/src/input.c",
1177LL,
"int glfwJoystickIsGamepad(int)");
if ( a1 >= 16 )
__assert_fail(
"jid <= GLFW_JOYSTICK_LAST",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O1/_deps/glfw-src/src/input.c",
1178LL,
"int glfwJoystickIsGamepad(int)");
if ( glfw[0] )
{
v1 = 2024LL * (unsigned int)a1;
if ( glfw[v1 + 258] )
{
v2 = &glfw[v1 + 258];
v3 = 0;
if ( (unsigned int)glfwPlatformPollJoystick(v2, 0LL) )
return *((_QWORD *)v2 + 14) != 0LL;
}
else
{
return 0;
}
}
else
{
v3 = 0;
glfwInputError(0x10001u, 0LL);
}
return v3;
}
| glfwJoystickIsGamepad:
PUSH R14
PUSH RBX
PUSH RAX
TEST EDI,EDI
JS 0x0011b32a
CMP EDI,0x10
JGE 0x0011b349
LEA RAX,[0x1a4638]
CMP dword ptr [RAX],0x0
JZ 0x0011b30c
MOV ECX,EDI
IMUL RCX,RCX,0x1fa0
CMP dword ptr [RAX + RCX*0x1 + 0x408],0x0
JZ 0x0011b31e
LEA R14,[RAX + RCX*0x1]
ADD R14,0x408
XOR EBX,EBX
MOV RDI,R14
XOR ESI,ESI
CALL 0x00128fbe
TEST EAX,EAX
JZ 0x0011b320
XOR EBX,EBX
CMP qword ptr [R14 + 0x70],0x0
SETNZ BL
JMP 0x0011b320
LAB_0011b30c:
XOR EBX,EBX
MOV EDI,0x10001
XOR ESI,ESI
XOR EAX,EAX
CALL 0x00119081
JMP 0x0011b320
LAB_0011b31e:
XOR EBX,EBX
LAB_0011b320:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_0011b32a:
LEA RDI,[0x17f0ec]
LEA RSI,[0x17ec20]
LEA RCX,[0x17f2bd]
MOV EDX,0x499
CALL 0x0010c540
LAB_0011b349:
LEA RDI,[0x17f120]
LEA RSI,[0x17ec20]
LEA RCX,[0x17f2bd]
MOV EDX,0x49a
CALL 0x0010c540
|
bool glfwJoystickIsGamepad(uint param_1)
{
int iVar1;
ulong uVar2;
bool bVar3;
if ((int)param_1 < 0) {
/* WARNING: Subroutine does not return */
__assert_fail("jid >= GLFW_JOYSTICK_1",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O1/_deps/glfw-src/src/input.c"
,0x499,"int glfwJoystickIsGamepad(int)");
}
if ((int)param_1 < 0x10) {
if (_glfw == 0) {
bVar3 = false;
_glfwInputError(0x10001,0);
}
else {
uVar2 = (ulong)param_1;
if ((&DAT_001a4a40)[uVar2 * 0x7e8] == 0) {
bVar3 = false;
}
else {
bVar3 = false;
iVar1 = _glfwPlatformPollJoystick(&DAT_001a4a40 + uVar2 * 0x7e8,0);
if (iVar1 != 0) {
bVar3 = (&DAT_001a4ab0)[uVar2 * 0x3f4] != 0;
}
}
}
return bVar3;
}
/* WARNING: Subroutine does not return */
__assert_fail("jid <= GLFW_JOYSTICK_LAST",
"/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O1/_deps/glfw-src/src/input.c"
,0x49a,"int glfwJoystickIsGamepad(int)");
}
| |
26,593 | foreach_function(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, std::function<void (nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)> const&) | monkey531[P]llama/common/chat.cpp | static void foreach_function(const json & tools, const std::function<void(const json &)> & fn) {
for (const auto & tool : tools) {
if (!tool.contains("type") || tool["type"] != "function" || !tool.contains("function")) {
LOG_INF("Skipping tool without function: %s", tool.dump(2).c_str());
continue;
}
fn(tool);
}
} | O0 | cpp | foreach_function(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, std::function<void (nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)> const&):
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x90(%rsp), %rsi
leaq 0x70(%rsp), %rdi
callq 0xc6390
movq 0x90(%rsp), %rsi
leaq 0x50(%rsp), %rdi
callq 0xc63f0
leaq 0x70(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0xc63c0
testb $0x1, %al
jne 0x1646c3
jmp 0x1647e1
leaq 0x70(%rsp), %rdi
callq 0xc6870
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rdi
leaq 0x5c7fc(%rip), %rsi # 0x1c0eda
callq 0x111a20
testb $0x1, %al
jne 0x1646e9
jmp 0x164726
movq 0x48(%rsp), %rdi
leaq 0x5c7e5(%rip), %rsi # 0x1c0eda
callq 0x1137d0
movq %rax, %rdi
leaq 0x52469(%rip), %rsi # 0x1b6b6d
callq 0x112f10
testb $0x1, %al
jne 0x164726
movq 0x48(%rsp), %rdi
leaq 0x52454(%rip), %rsi # 0x1b6b6d
callq 0x1883e0
testb $0x1, %al
jne 0x1647c0
jmp 0x164728
xorl %eax, %eax
leaq 0xd2a9f(%rip), %rcx # 0x2371d0
cmpl (%rcx), %eax
jg 0x1647bc
callq 0x152130
movq %rax, 0x8(%rsp)
movq 0x48(%rsp), %rsi
leaq 0x28(%rsp), %rdi
movq %rdi, (%rsp)
movl $0x2, %edx
movl %edx, 0x14(%rsp)
movl $0x20, %ecx
xorl %r9d, %r9d
movl %r9d, 0x18(%rsp)
movl %r9d, %r8d
callq 0x71390
movq (%rsp), %rdi
callq 0x4f190
movq 0x8(%rsp), %rdi
movl 0x14(%rsp), %esi
movq %rax, %rcx
movl 0x18(%rsp), %eax
leaq 0x5bc38(%rip), %rdx # 0x1c03c7
callq 0x152220
jmp 0x164796
leaq 0x28(%rsp), %rdi
callq 0x50100
jmp 0x1647bc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x50100
jmp 0x1647e9
jmp 0x1647be
jmp 0x1647d2
movq 0x98(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x188460
leaq 0x70(%rsp), %rdi
callq 0xc6720
jmp 0x1646ab
addq $0xa8, %rsp
retq
movq 0x20(%rsp), %rdi
callq 0x4f990
nopw %cs:(%rax,%rax)
| _ZL16foreach_functionRKN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEERKSt8functionIFvSF_EE:
sub rsp, 0A8h
mov [rsp+0A8h+var_8], rdi
mov [rsp+0A8h+var_10], rsi
mov rax, [rsp+0A8h+var_8]
mov [rsp+0A8h+var_18], rax
mov rsi, [rsp+0A8h+var_18]
lea rdi, [rsp+0A8h+var_38]
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5beginEv; 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>::begin(void)
mov rsi, [rsp+0A8h+var_18]
lea rdi, [rsp+0A8h+var_58]
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE3endEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::end(void)
loc_1646AB:
lea rdi, [rsp+0A8h+var_38]; int
lea rsi, [rsp+0A8h+var_58]; void *
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEneISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
test al, 1
jnz short loc_1646C3
jmp loc_1647E1
loc_1646C3:
lea rdi, [rsp+0A8h+var_38]; int
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEdeEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<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>::operator*(void)
mov qword ptr [rsp+0A8h+var_60], rax; char
mov rdi, qword ptr [rsp+0A8h+var_60]
lea rsi, aIsNotAPermitte+24h; "type"
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_
test al, 1
jnz short loc_1646E9
jmp short loc_164726
loc_1646E9:
mov rdi, qword ptr [rsp+0A8h+var_60]
lea rsi, aIsNotAPermitte+24h; "type"
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERKSD_PT_; 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[]<char const>(char const *)
mov rdi, rax
lea rsi, aFunction; "function"
call _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_
test al, 1
jnz short loc_164726
mov rdi, qword ptr [rsp+0A8h+var_60]
lea rsi, aFunction; "function"
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_
test al, 1
jnz loc_1647C0
loc_164726:
jmp short $+2
loc_164728:
xor eax, eax
lea rcx, common_log_verbosity_thold
cmp eax, [rcx]
jg loc_1647BC
call _Z15common_log_mainv; common_log_main(void)
mov qword ptr [rsp+0A8h+var_A0], rax; int
mov rsi, qword ptr [rsp+0A8h+var_60]; int
lea rdi, [rsp+0A8h+var_80]; int
mov qword ptr [rsp+0A8h+var_A8], rdi; int
mov edx, 2; int
mov [rsp+0A8h+var_94], edx
mov ecx, 20h ; ' '; int
xor r9d, r9d; int
mov [rsp+0A8h+var_90], r9d; int
mov r8d, r9d; int
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dumpEicbNS0_6detail15error_handler_tE; 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>::dump(int,char,bool,nlohmann::json_abi_v3_11_3::detail::error_handler_t)
mov rdi, qword ptr [rsp+0A8h+var_A8]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdi, qword ptr [rsp+0A8h+var_A0]
mov esi, [rsp+0A8h+var_94]
mov rcx, rax
mov eax, [rsp+0A8h+var_90]
lea rdx, aSkippingToolWi; "Skipping tool without function: %s"
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
jmp short $+2
loc_164796:
lea rdi, [rsp+0A8h+var_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_1647BC
mov rcx, rax
mov eax, edx
mov [rsp+arg_18], rcx
mov [rsp+arg_14], eax
lea rdi, [rsp+arg_20]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_1647E9
loc_1647BC:
jmp short $+2
loc_1647BE:
jmp short loc_1647D2
loc_1647C0:
mov rdi, [rsp+0A8h+var_10]
mov rsi, qword ptr [rsp+0A8h+var_60]
call _ZNKSt8functionIFvRKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEEclESG_; std::function<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)>::operator()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
loc_1647D2:
lea rdi, [rsp+0A8h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<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>::operator++(void)
jmp loc_1646AB
loc_1647E1:
add rsp, 0A8h
retn
loc_1647E9:
mov rdi, [rsp+arg_18]
call __Unwind_Resume
| long long foreach_function(
long long a1,
long long a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
long long result; // rax
long long v11; // rax
int v12; // edx
int v13; // ecx
int v14; // r8d
int v15; // r9d
int v16; // eax
int v17; // r8d
int v18; // r9d
__m128 v19; // xmm4
__m128 v20; // xmm5
void *v21; // [rsp+8h] [rbp-A0h]
int v22[8]; // [rsp+28h] [rbp-80h] BYREF
char v23[8]; // [rsp+48h] [rbp-60h]
_BYTE v24[32]; // [rsp+50h] [rbp-58h] BYREF
long long v25[4]; // [rsp+70h] [rbp-38h] BYREF
long long v26; // [rsp+90h] [rbp-18h]
long long v27; // [rsp+98h] [rbp-10h]
long long v28; // [rsp+A0h] [rbp-8h]
v28 = a1;
v27 = a2;
v26 = a1;
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>::begin(
(long long)v25,
a1);
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(
(long long)v24,
v26);
while ( 1 )
{
result = ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEneISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_(
(int)v25,
v24);
if ( (result & 1) == 0 )
break;
*(_QWORD *)v23 = nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::operator*(v25);
if ( ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_(
*(long long *)v23,
(long long)"type")
&& (v11 = 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[]<char const>(
*(long long *)v23,
(long long)"type"),
(ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_(
v11,
(long long)"function",
v12,
v13,
v14,
v15) & 1) == 0)
&& (ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_(
*(_QWORD *)v23,
"function") & 1) != 0 )
{
std::function<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&)>::operator()(
v27,
*(_QWORD *)v23);
}
else if ( common_log_verbosity_thold[0] >= 0 )
{
v21 = common_log_main();
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>::dump(
v22,
*(long long *)v23,
2,
32,
0,
0);
v16 = std::string::c_str(v22);
common_log_add(
(long long)v21,
2,
(long long)"Skipping tool without function: %s",
v16,
v17,
v18,
a3,
a4,
a5,
a6,
v19,
v20,
a9,
a10,
(char)v22);
std::string::~string(v22);
}
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::operator++(v25);
}
return result;
}
| |||
26,594 | foreach_function(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, std::function<void (nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)> const&) | monkey531[P]llama/common/chat.cpp | static void foreach_function(const json & tools, const std::function<void(const json &)> & fn) {
for (const auto & tool : tools) {
if (!tool.contains("type") || tool["type"] != "function" || !tool.contains("function")) {
LOG_INF("Skipping tool without function: %s", tool.dump(2).c_str());
continue;
}
fn(tool);
}
} | O3 | cpp | foreach_function(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, std::function<void (nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rdi, 0x20(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rsp)
movq %rax, 0x38(%rsp)
movzbl (%rdi), %ecx
testl %ecx, %ecx
movq %rsi, 0x40(%rsp)
je 0x889b2
cmpl $0x2, %ecx
je 0x88989
cmpl $0x1, %ecx
jne 0x889bd
movq 0x8(%rdi), %rcx
movq (%rcx), %rdx
movq %rdx, 0x28(%rsp)
movq %rdi, (%rsp)
movq $0x0, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movq 0x8(%rcx), %rax
movq %rax, 0x8(%rsp)
jmp 0x889d8
movq 0x8(%rdi), %rcx
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
movq %rdi, (%rsp)
movq $0x0, 0x8(%rsp)
movq %rax, 0x18(%rsp)
movq 0x8(%rcx), %rax
movq %rax, 0x10(%rsp)
jmp 0x889d8
movq $0x1, 0x38(%rsp)
jmp 0x889c6
movq $0x0, 0x38(%rsp)
movq %rdi, (%rsp)
movups %xmm0, 0x8(%rsp)
movq $0x1, 0x18(%rsp)
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0x4e0aa
testb %al, %al
jne 0x88b03
leaq 0x20(%rsp), %r14
leaq 0x2067e(%rip), %r15 # 0xa9077
leaq 0x555f0(%rip), %r12 # 0xddff0
movq %rsp, %r13
movq %r14, %rdi
callq 0x4dd3e
movq %rax, %rbp
movq %rax, %rdi
movq %r15, %rsi
callq 0x67c26
testb %al, %al
je 0x88a66
movq %rbp, %rdi
movq %r15, %rsi
callq 0x68fd2
movq %rax, %rdi
leaq 0x20659(%rip), %rsi # 0xa908b
callq 0x689d3
testb %al, %al
jne 0x88a66
movq %rbp, %rdi
leaq 0x20646(%rip), %rsi # 0xa908b
callq 0x94cde
testb %al, %al
je 0x88a66
movq 0x40(%rsp), %rdi
cmpq $0x0, 0x10(%rdi)
je 0x88b12
movq %rbp, %rsi
callq *0x18(%rdi)
jmp 0x88ac9
cmpl $0x0, (%r12)
js 0x88ac9
callq 0x7f1ef
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
movq %rbp, %rsi
movl $0x2, %edx
movl $0x20, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x2bd32
movq 0x48(%rsp), %rcx
movq %rbx, %rdi
movl $0x2, %esi
leaq 0x28640(%rip), %rdx # 0xb10e6
xorl %eax, %eax
callq 0x7f28c
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x88ac9
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x186a0
movq 0x20(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x2, %eax
je 0x88ae3
cmpl $0x1, %eax
jne 0x88aeb
addq $0x30, 0x28(%rsp)
jmp 0x88af0
addq $0x10, 0x30(%rsp)
jmp 0x88af0
incq 0x38(%rsp)
movq %r14, %rdi
movq %r13, %rsi
callq 0x4e0aa
testb %al, %al
je 0x88a03
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x18260
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x88b36
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x186a0
movq %rbx, %rdi
callq 0x18b90
| _ZL16foreach_functionRKN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEERKSt8functionIFvSF_EE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov rax, 8000000000000000h
mov [rsp+98h+var_78], rdi
xorps xmm0, xmm0
movups [rsp+98h+var_70], xmm0
mov [rsp+98h+var_60], rax
movzx ecx, byte ptr [rdi]
test ecx, ecx
mov [rsp+98h+var_58], rsi
jz short loc_889B2
cmp ecx, 2
jz short loc_88989
cmp ecx, 1
jnz short loc_889BD
mov rcx, [rdi+8]
mov rdx, [rcx]
mov qword ptr [rsp+98h+var_70], rdx
mov [rsp+98h+var_98], rdi
mov qword ptr [rsp+98h+var_90+8], 0
mov [rsp+98h+var_80], rax
mov rax, [rcx+8]
mov qword ptr [rsp+98h+var_90], rax
jmp short loc_889D8
loc_88989:
mov rcx, [rdi+8]
mov rdx, [rcx]
mov qword ptr [rsp+98h+var_70+8], rdx
mov [rsp+98h+var_98], rdi
mov qword ptr [rsp+98h+var_90], 0
mov [rsp+98h+var_80], rax
mov rax, [rcx+8]
mov qword ptr [rsp+98h+var_90+8], rax
jmp short loc_889D8
loc_889B2:
mov [rsp+98h+var_60], 1
jmp short loc_889C6
loc_889BD:
mov [rsp+98h+var_60], 0
loc_889C6:
mov [rsp+98h+var_98], rdi
movups [rsp+98h+var_90], xmm0
mov [rsp+98h+var_80], 1
loc_889D8:
lea rdi, [rsp+98h+var_78]
mov rsi, rsp
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
test al, al
jnz loc_88B03
lea r14, [rsp+98h+var_78]
lea r15, aType; "type"
lea r12, common_log_verbosity_thold
mov r13, rsp
loc_88A03:
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEdeEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<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>::operator*(void)
mov rbp, rax
mov rdi, rax
mov rsi, r15
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_
test al, al
jz short loc_88A66
mov rdi, rbp
mov rsi, r15
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERKSD_PT_; 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[]<char const>(char const *)
mov rdi, rax
lea rsi, aFunction; "function"
call _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_
test al, al
jnz short loc_88A66
mov rdi, rbp
lea rsi, aFunction; "function"
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_
test al, al
jz short loc_88A66
mov rdi, [rsp+98h+var_58]
cmp qword ptr [rdi+10h], 0
jz loc_88B12
mov rsi, rbp
call qword ptr [rdi+18h]
jmp short loc_88AC9
loc_88A66:
cmp dword ptr [r12], 0
js short loc_88AC9
call _Z15common_log_mainv; common_log_main(void)
mov rbx, rax
lea rdi, [rsp+98h+var_50]
mov rsi, rbp
mov edx, 2
mov ecx, 20h ; ' '
xor r8d, r8d
xor r9d, r9d
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dumpEicbNS0_6detail15error_handler_tE; 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>::dump(int,char,bool,nlohmann::json_abi_v3_11_3::detail::error_handler_t)
mov rcx, [rsp+98h+var_50]
mov rdi, rbx
mov esi, 2
lea rdx, aSkippingToolWi; "Skipping tool without function: %s"
xor eax, eax
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
mov rdi, [rsp+98h+var_50]; void *
lea rax, [rsp+98h+var_40]
cmp rdi, rax
jz short loc_88AC9
mov rsi, [rsp+98h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_88AC9:
mov rax, [rsp+98h+var_78]
movzx eax, byte ptr [rax]
cmp eax, 2
jz short loc_88AE3
cmp eax, 1
jnz short loc_88AEB
add qword ptr [rsp+98h+var_70], 30h ; '0'
jmp short loc_88AF0
loc_88AE3:
add qword ptr [rsp+98h+var_70+8], 10h
jmp short loc_88AF0
loc_88AEB:
inc [rsp+98h+var_60]
loc_88AF0:
mov rdi, r14
mov rsi, r13
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
test al, al
jz loc_88A03
loc_88B03:
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_88B12:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
mov rbx, rax
mov rdi, [rsp+98h+var_50]; void *
lea rax, [rsp+98h+var_40]
cmp rdi, rax
jz short loc_88B36
mov rsi, [rsp+98h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_88B36:
mov rdi, rbx
call __Unwind_Resume
| long long foreach_function(
unsigned __int8 *a1,
long long a2,
double a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
int v10; // ecx
_QWORD *v11; // rcx
_QWORD *v12; // rcx
long long result; // rax
long long v14; // rbp
long long v15; // rax
void *v16; // rbx
long long v17; // r8
long long v18; // r9
__m128 v19; // xmm4
__m128 v20; // xmm5
int v21; // eax
unsigned __int8 *v22; // [rsp+0h] [rbp-98h] BYREF
__int128 v23; // [rsp+8h] [rbp-90h]
long long v24; // [rsp+18h] [rbp-80h]
unsigned __int8 *v25; // [rsp+20h] [rbp-78h] BYREF
__int128 v26; // [rsp+28h] [rbp-70h]
long long v27; // [rsp+38h] [rbp-60h]
long long v28; // [rsp+40h] [rbp-58h]
void *v29; // [rsp+48h] [rbp-50h] BYREF
long long v30; // [rsp+58h] [rbp-40h] BYREF
v25 = a1;
v26 = 0LL;
v27 = 0x8000000000000000LL;
v10 = *a1;
v28 = a2;
if ( v10 )
{
if ( v10 == 2 )
{
v12 = (_QWORD *)*((_QWORD *)a1 + 1);
*((_QWORD *)&v26 + 1) = *v12;
v22 = a1;
*(_QWORD *)&v23 = 0LL;
v24 = 0x8000000000000000LL;
*((_QWORD *)&v23 + 1) = v12[1];
goto LABEL_9;
}
if ( v10 == 1 )
{
v11 = (_QWORD *)*((_QWORD *)a1 + 1);
*(_QWORD *)&v26 = *v11;
v22 = a1;
*((_QWORD *)&v23 + 1) = 0LL;
v24 = 0x8000000000000000LL;
*(_QWORD *)&v23 = v11[1];
goto LABEL_9;
}
v27 = 0LL;
}
else
{
v27 = 1LL;
}
v22 = a1;
v23 = 0LL;
v24 = 1LL;
LABEL_9:
for ( result = ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_(
&v25,
&v22);
!(_BYTE)result;
result = ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_(
&v25,
&v22) )
{
v14 = nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::operator*(&v25);
if ( ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_(
v14,
(long long)"type")
&& (v15 = 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[]<char const>(
v14,
(long long)"type"),
!(unsigned __int8)ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_(
v15,
(long long)"function"))
&& (unsigned __int8)ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_(
v14,
"function") )
{
if ( !*(_QWORD *)(v28 + 16) )
std::__throw_bad_function_call();
(*(void ( **)(long long, long long))(v28 + 24))(v28, v14);
}
else if ( common_log_verbosity_thold[0] >= 0 )
{
v16 = common_log_main();
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>::dump(
(long long)&v29,
v14,
2,
32,
0,
0);
common_log_add(
(long long)v16,
2LL,
(long long)"Skipping tool without function: %s",
(long long)v29,
v17,
v18,
(__m128)0LL,
a4,
a5,
a6,
v19,
v20,
a9,
a10,
(char)v22);
if ( v29 != &v30 )
operator delete(v29, v30 + 1);
}
v21 = *v25;
if ( v21 == 2 )
{
*((_QWORD *)&v26 + 1) += 16LL;
}
else if ( v21 == 1 )
{
*(_QWORD *)&v26 = v26 + 48;
}
else
{
++v27;
}
}
return result;
}
| foreach_function:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV RAX,-0x8000000000000000
MOV qword ptr [RSP + 0x20],RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP + 0x28],XMM0
MOV qword ptr [RSP + 0x38],RAX
MOVZX ECX,byte ptr [RDI]
TEST ECX,ECX
MOV qword ptr [RSP + 0x40],RSI
JZ 0x001889b2
CMP ECX,0x2
JZ 0x00188989
CMP ECX,0x1
JNZ 0x001889bd
MOV RCX,qword ptr [RDI + 0x8]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x28],RDX
MOV qword ptr [RSP],RDI
MOV qword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RCX + 0x8]
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001889d8
LAB_00188989:
MOV RCX,qword ptr [RDI + 0x8]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RSP],RDI
MOV qword ptr [RSP + 0x8],0x0
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RCX + 0x8]
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001889d8
LAB_001889b2:
MOV qword ptr [RSP + 0x38],0x1
JMP 0x001889c6
LAB_001889bd:
MOV qword ptr [RSP + 0x38],0x0
LAB_001889c6:
MOV qword ptr [RSP],RDI
MOVUPS xmmword ptr [RSP + 0x8],XMM0
MOV qword ptr [RSP + 0x18],0x1
LAB_001889d8:
LEA RDI,[RSP + 0x20]
MOV RSI,RSP
CALL 0x0014e0aa
TEST AL,AL
JNZ 0x00188b03
LEA R14,[RSP + 0x20]
LEA R15,[0x1a9077]
LEA R12,[0x1ddff0]
MOV R13,RSP
LAB_00188a03:
MOV RDI,R14
CALL 0x0014dd3e
MOV RBP,RAX
MOV RDI,RAX
MOV RSI,R15
CALL 0x00167c26
TEST AL,AL
JZ 0x00188a66
MOV RDI,RBP
MOV RSI,R15
CALL 0x00168fd2
MOV RDI,RAX
LEA RSI,[0x1a908b]
CALL 0x001689d3
TEST AL,AL
JNZ 0x00188a66
MOV RDI,RBP
LEA RSI,[0x1a908b]
CALL 0x00194cde
TEST AL,AL
JZ 0x00188a66
MOV RDI,qword ptr [RSP + 0x40]
CMP qword ptr [RDI + 0x10],0x0
JZ 0x00188b12
MOV RSI,RBP
CALL qword ptr [RDI + 0x18]
JMP 0x00188ac9
LAB_00188a66:
CMP dword ptr [R12],0x0
JS 0x00188ac9
CALL 0x0017f1ef
MOV RBX,RAX
LEA RDI,[RSP + 0x48]
MOV RSI,RBP
MOV EDX,0x2
MOV ECX,0x20
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0012bd32
MOV RCX,qword ptr [RSP + 0x48]
LAB_00188a97:
MOV RDI,RBX
MOV ESI,0x2
LEA RDX,[0x1b10e6]
XOR EAX,EAX
CALL 0x0017f28c
LAB_00188aad:
MOV RDI,qword ptr [RSP + 0x48]
LEA RAX,[RSP + 0x58]
CMP RDI,RAX
JZ 0x00188ac9
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x001186a0
LAB_00188ac9:
MOV RAX,qword ptr [RSP + 0x20]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x2
JZ 0x00188ae3
CMP EAX,0x1
JNZ 0x00188aeb
ADD qword ptr [RSP + 0x28],0x30
JMP 0x00188af0
LAB_00188ae3:
ADD qword ptr [RSP + 0x30],0x10
JMP 0x00188af0
LAB_00188aeb:
INC qword ptr [RSP + 0x38]
LAB_00188af0:
MOV RDI,R14
MOV RSI,R13
CALL 0x0014e0aa
TEST AL,AL
JZ 0x00188a03
LAB_00188b03:
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00188b12:
CALL 0x00118260
|
/* foreach_function(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&, std::function<void
(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&)> const&) */
void foreach_function(basic_json *param_1,function *param_2)
{
basic_json bVar1;
char cVar2;
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;
basic_json *pbVar3;
int8 uVar4;
basic_json *local_98;
long local_90;
long lStack_88;
int8 local_80;
basic_json *local_78;
long local_70;
long lStack_68;
long local_60;
function *local_58;
long *local_50 [2];
long local_40 [2];
local_70 = 0;
lStack_68 = 0;
local_60 = -0x8000000000000000;
bVar1 = *param_1;
if (bVar1 == (basic_json)0x0) {
local_60 = 1;
}
else {
if (bVar1 == (basic_json)0x2) {
lStack_68 = **(long **)(param_1 + 8);
local_90 = 0;
local_80 = 0x8000000000000000;
lStack_88 = (*(long **)(param_1 + 8))[1];
goto LAB_001889d8;
}
if (bVar1 == (basic_json)0x1) {
local_70 = **(long **)(param_1 + 8);
lStack_88 = 0;
local_80 = 0x8000000000000000;
local_90 = (*(long **)(param_1 + 8))[1];
goto LAB_001889d8;
}
local_60 = 0;
}
local_90 = 0;
lStack_88 = 0;
local_80 = 1;
LAB_001889d8:
local_98 = param_1;
local_78 = param_1;
local_58 = param_2;
cVar2 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
(&local_78,&local_98);
if (cVar2 == '\0') {
do {
this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*)nlohmann::json_abi_v3_11_3::detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
::operator*((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)&local_78);
cVar2 = _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_
(this,&DAT_001a9077);
if (cVar2 == '\0') {
LAB_00188a66:
if (-1 < common_log_verbosity_thold) {
uVar4 = common_log_main();
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>
::dump(local_50,this,2,0x20,0,0);
/* try { // try from 00188a97 to 00188aac has its CatchHandler @ 00188b17 */
common_log_add(uVar4,2,"Skipping tool without function: %s",local_50[0]);
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
}
}
else {
pbVar3 = 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[]<char_const>(this,"type");
cVar2 = _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_
(pbVar3,"function");
if (cVar2 != '\0') goto LAB_00188a66;
cVar2 = _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_
(this,"function");
if (cVar2 == '\0') goto LAB_00188a66;
if (*(long *)(local_58 + 0x10) == 0) {
/* WARNING: Subroutine does not return */
std::__throw_bad_function_call();
}
(**(code **)(local_58 + 0x18))(local_58,this);
}
if (*local_78 == (basic_json)0x2) {
lStack_68 = lStack_68 + 0x10;
}
else if (*local_78 == (basic_json)0x1) {
local_70 = local_70 + 0x30;
}
else {
local_60 = local_60 + 1;
}
cVar2 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const>
*)&local_78,&local_98);
} while (cVar2 == '\0');
}
return;
}
| |
26,595 | namelist_sort | bluesky950520[P]quickjs/run-test262.c | void namelist_sort(namelist_t *lp)
{
int i, count;
if (lp->count > 1) {
qsort(lp->array, lp->count, sizeof(*lp->array), namelist_cmp_indirect);
/* remove duplicates */
for (count = i = 1; i < lp->count; i++) {
if (namelist_cmp(lp->array[count - 1], lp->array[i]) == 0) {
free(lp->array[i]);
} else {
lp->array[count++] = lp->array[i];
}
}
lp->count = count;
}
} | O2 | c | namelist_sort:
movslq 0x8(%rdi), %rsi
cmpq $0x2, %rsi
jl 0xf122
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
leaq -0x2d(%rip), %rcx # 0xf09c
pushq $0x8
popq %rdx
callq 0xe190
pushq $0x1
popq %rbp
pushq $0x1
popq %r15
movslq 0x8(%rbx), %rax
cmpq %rax, %r15
jge 0xf111
movq (%rbx), %r12
movslq %ebp, %r13
movq -0x8(%r12,%r13,8), %rdi
movq (%r12,%r15,8), %r14
movq %r14, %rsi
callq 0xefe2
testl %eax, %eax
je 0xf104
incl %ebp
movq %r14, (%r12,%r13,8)
jmp 0xf10c
movq %r14, %rdi
callq 0xe060
incq %r15
jmp 0xf0d8
movl %ebp, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| namelist_sort:
movsxd rsi, dword ptr [rdi+8]
cmp rsi, 2
jl short locret_F122
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
mov rdi, [rdi]
lea rcx, namelist_cmp_indirect
push 8
pop rdx
call _qsort
push 1
pop rbp
push 1
pop r15
loc_F0D8:
movsxd rax, dword ptr [rbx+8]
cmp r15, rax
jge short loc_F111
mov r12, [rbx]
movsxd r13, ebp
mov rdi, [r12+r13*8-8]
mov r14, [r12+r15*8]
mov rsi, r14
call namelist_cmp
test eax, eax
jz short loc_F104
inc ebp
mov [r12+r13*8], r14
jmp short loc_F10C
loc_F104:
mov rdi, r14
call _free
loc_F10C:
inc r15
jmp short loc_F0D8
loc_F111:
mov [rbx+8], ebp
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
locret_F122:
retn
| long long namelist_sort(long long *a1)
{
long long v1; // rsi
int v2; // ebp
long long i; // r15
long long result; // rax
long long v5; // r12
long long v6; // r13
unsigned __int8 *v7; // r14
v1 = *((int *)a1 + 2);
if ( v1 >= 2 )
{
qsort(*a1, v1, 8LL, namelist_cmp_indirect);
v2 = 1;
for ( i = 1LL; ; ++i )
{
result = *((int *)a1 + 2);
if ( i >= result )
break;
v5 = *a1;
v6 = v2;
v7 = *(unsigned __int8 **)(*a1 + 8 * i);
if ( (unsigned int)namelist_cmp(*(unsigned __int8 **)(*a1 + 8LL * v2 - 8), v7) )
{
++v2;
*(_QWORD *)(v5 + 8 * v6) = v7;
}
else
{
free(v7);
}
}
*((_DWORD *)a1 + 2) = v2;
}
return result;
}
| namelist_sort:
MOVSXD RSI,dword ptr [RDI + 0x8]
CMP RSI,0x2
JL 0x0010f122
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RDI,qword ptr [RDI]
LEA RCX,[0x10f09c]
PUSH 0x8
POP RDX
CALL 0x0010e190
PUSH 0x1
POP RBP
PUSH 0x1
POP R15
LAB_0010f0d8:
MOVSXD RAX,dword ptr [RBX + 0x8]
CMP R15,RAX
JGE 0x0010f111
MOV R12,qword ptr [RBX]
MOVSXD R13,EBP
MOV RDI,qword ptr [R12 + R13*0x8 + -0x8]
MOV R14,qword ptr [R12 + R15*0x8]
MOV RSI,R14
CALL 0x0010efe2
TEST EAX,EAX
JZ 0x0010f104
INC EBP
MOV qword ptr [R12 + R13*0x8],R14
JMP 0x0010f10c
LAB_0010f104:
MOV RDI,R14
CALL 0x0010e060
LAB_0010f10c:
INC R15
JMP 0x0010f0d8
LAB_0010f111:
MOV dword ptr [RBX + 0x8],EBP
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
LAB_0010f122:
RET
|
void namelist_sort(long *param_1)
{
long lVar1;
void *__ptr;
int iVar2;
int iVar3;
long lVar4;
long lVar5;
if (1 < (long)(int)param_1[1]) {
qsort((void *)*param_1,(long)(int)param_1[1],8,namelist_cmp_indirect);
iVar3 = 1;
for (lVar5 = 1; lVar5 < (int)param_1[1]; lVar5 = lVar5 + 1) {
lVar1 = *param_1;
lVar4 = (long)iVar3;
__ptr = *(void **)(lVar1 + lVar5 * 8);
iVar2 = namelist_cmp(*(int8 *)(lVar1 + -8 + lVar4 * 8),__ptr);
if (iVar2 == 0) {
free(__ptr);
}
else {
iVar3 = iVar3 + 1;
*(void **)(lVar1 + lVar4 * 8) = __ptr;
}
}
*(int *)(param_1 + 1) = iVar3;
}
return;
}
| |
26,596 | mi_nommap_pread | eloqsql/storage/myisam/mi_dynrec.c | size_t mi_nommap_pread(MI_INFO *info, uchar *Buffer,
size_t Count, my_off_t offset, myf MyFlags)
{
return mysql_file_pread(info->dfile, Buffer, Count, offset, MyFlags);
} | O3 | c | mi_nommap_pread:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r8, -0x30(%rbp)
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %r13
movl 0x1c0(%rdi), %ebx
leaq 0x30ee9d(%rip), %rax # 0x389050
movq (%rax), %rax
leaq -0x78(%rbp), %rdi
movl %ebx, %esi
movl $0x6, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x7a1f5
movl %ebx, %edi
movq %r13, %rsi
movq %r14, %rdx
movq %r12, %rcx
movq -0x30(%rbp), %r8
callq 0xa34b4
movq %rax, %rbx
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
leaq 0x30ee51(%rip), %rax # 0x389050
movq (%rax), %rax
leaq 0x63b28(%rip), %rdx # 0xddd31
movq %r15, %rdi
movq %r14, %rsi
movl $0xca, %ecx
callq *0x210(%rax)
movl %ebx, %edi
movq %r13, %rsi
movq %r14, %rdx
movq %r12, %rcx
movq -0x30(%rbp), %r12
movq %r12, %r8
callq 0xa34b4
movq %rax, %rbx
xorl %esi, %esi
testq %rax, %rax
cmovneq %rsi, %r14
cmpq $-0x1, %rax
cmovneq %rax, %rsi
testb $0x6, %r12b
cmovneq %r14, %rsi
leaq 0x30edfc(%rip), %rax # 0x389050
movq (%rax), %rax
movq %r15, %rdi
callq *0x218(%rax)
jmp 0x7a1e3
| mi_nommap_pread:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov [rbp+var_30], r8
mov r12, rcx
mov r14, rdx
mov r13, rsi
mov ebx, [rdi+1C0h]
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_78]
mov esi, ebx
mov edx, 6
call qword ptr [rax+158h]
test rax, rax
jnz short loc_7A1F5
mov edi, ebx
mov rsi, r13
mov rdx, r14
mov rcx, r12
mov r8, [rbp+var_30]
call my_pread
mov rbx, rax
loc_7A1E3:
mov rax, rbx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7A1F5:
mov r15, rax
lea rax, PSI_server
mov rax, [rax]
lea rdx, aWorkspaceLlm4b_13; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, r15
mov rsi, r14
mov ecx, 0CAh
call qword ptr [rax+210h]
mov edi, ebx
mov rsi, r13
mov rdx, r14
mov rcx, r12
mov r12, [rbp+var_30]
mov r8, r12
call my_pread
mov rbx, rax
xor esi, esi
test rax, rax
cmovnz r14, rsi
cmp rax, 0FFFFFFFFFFFFFFFFh
cmovnz rsi, rax
test r12b, 6
cmovnz rsi, r14
lea rax, PSI_server
mov rax, [rax]
mov rdi, r15
call qword ptr [rax+218h]
jmp short loc_7A1E3
| long long mi_nommap_pread(long long a1, long long a2, long long a3, long long a4, long long a5)
{
unsigned int v7; // ebx
long long v8; // rax
long long v9; // rbx
long long v11; // r15
_BYTE v12[72]; // [rsp+8h] [rbp-78h] BYREF
long long v13; // [rsp+50h] [rbp-30h]
v13 = a5;
v7 = *(_DWORD *)(a1 + 448);
v8 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v12, v7, 6LL);
if ( !v8 )
return my_pread(v7, a2, a3, a4, v13);
v11 = v8;
((void ( *)(long long, long long, const char *, long long))PSI_server[66])(
v8,
a3,
"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c",
202LL);
v9 = my_pread(v7, a2, a3, a4, v13);
((void ( *)(long long))PSI_server[67])(v11);
return v9;
}
| mi_nommap_pread:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x30],R8
MOV R12,RCX
MOV R14,RDX
MOV R13,RSI
MOV EBX,dword ptr [RDI + 0x1c0]
LEA RAX,[0x489050]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x78]
MOV ESI,EBX
MOV EDX,0x6
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x0017a1f5
MOV EDI,EBX
MOV RSI,R13
MOV RDX,R14
MOV RCX,R12
MOV R8,qword ptr [RBP + -0x30]
CALL 0x001a34b4
MOV RBX,RAX
LAB_0017a1e3:
MOV RAX,RBX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0017a1f5:
MOV R15,RAX
LEA RAX,[0x489050]
MOV RAX,qword ptr [RAX]
LEA RDX,[0x1ddd31]
MOV RDI,R15
MOV RSI,R14
MOV ECX,0xca
CALL qword ptr [RAX + 0x210]
MOV EDI,EBX
MOV RSI,R13
MOV RDX,R14
MOV RCX,R12
MOV R12,qword ptr [RBP + -0x30]
MOV R8,R12
CALL 0x001a34b4
MOV RBX,RAX
XOR ESI,ESI
TEST RAX,RAX
CMOVNZ R14,RSI
CMP RAX,-0x1
CMOVNZ RSI,RAX
TEST R12B,0x6
CMOVNZ RSI,R14
LEA RAX,[0x489050]
MOV RAX,qword ptr [RAX]
MOV RDI,R15
CALL qword ptr [RAX + 0x218]
JMP 0x0017a1e3
|
long mi_nommap_pread(long param_1,int8 param_2,long param_3,int8 param_4,ulong param_5)
{
int4 uVar1;
ulong uVar2;
long lVar3;
long lVar4;
long lVar5;
int1 local_80 [72];
ulong local_38;
uVar1 = *(int4 *)(param_1 + 0x1c0);
local_38 = param_5;
lVar3 = (**(code **)(PSI_server + 0x158))(local_80,uVar1,6);
if (lVar3 == 0) {
lVar4 = my_pread(uVar1,param_2,param_3,param_4,local_38);
}
else {
(**(code **)(PSI_server + 0x210))
(lVar3,param_3,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c",
0xca);
uVar2 = local_38;
lVar4 = my_pread(uVar1,param_2,param_3,param_4,local_38);
if (lVar4 != 0) {
param_3 = 0;
}
lVar5 = 0;
if (lVar4 != -1) {
lVar5 = lVar4;
}
if ((uVar2 & 6) != 0) {
lVar5 = param_3;
}
(**(code **)(PSI_server + 0x218))(lVar3,lVar5);
}
return lVar4;
}
| |
26,597 | mariadb_compress | eloqsql/libmariadb/libmariadb/ma_compress.c | my_bool _mariadb_compress(NET *net, unsigned char *packet, size_t *len, size_t *complen)
{
if (*len < MIN_COMPRESS_LENGTH ||
!compression_plugin(net))
*complen=0;
else
{
unsigned char *compbuf=_mariadb_compress_alloc(net,packet,len,complen);
if (!compbuf)
return *complen ? 0 : 1;
memcpy(packet,compbuf,*len);
free(compbuf);
}
return 0;
} | O0 | c | mariadb_compress:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x96, (%rax)
jb 0x29df7
movq -0x10(%rbp), %rax
movq 0x2a0(%rax), %rax
cmpq $0x0, 0x10(%rax)
jne 0x29e04
movq -0x28(%rbp), %rax
movq $0x0, (%rax)
jmp 0x29e5b
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x29e70
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x29e3e
movq -0x28(%rbp), %rax
movq (%rax), %rdx
movl $0x1, %eax
xorl %ecx, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
movb %al, -0x1(%rbp)
jmp 0x29e5f
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rax
movq (%rax), %rdx
callq 0x13360
movq -0x30(%rbp), %rdi
callq 0x13520
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _mariadb_compress:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
cmp qword ptr [rax], 96h
jb short loc_29DF7
mov rax, [rbp+var_10]
mov rax, [rax+2A0h]
cmp qword ptr [rax+10h], 0
jnz short loc_29E04
loc_29DF7:
mov rax, [rbp+var_28]
mov qword ptr [rax], 0
jmp short loc_29E5B
loc_29E04:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
call _mariadb_compress_alloc
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
jnz short loc_29E3E
mov rax, [rbp+var_28]
mov rdx, [rax]
mov eax, 1
xor ecx, ecx
cmp rdx, 0
cmovnz eax, ecx
mov [rbp+var_1], al
jmp short loc_29E5F
loc_29E3E:
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_30]
mov rax, [rbp+var_20]
mov rdx, [rax]
call _memcpy
mov rdi, [rbp+var_30]
call _free
loc_29E5B:
mov [rbp+var_1], 0
loc_29E5F:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| bool mariadb_compress(long long a1, long long a2, _QWORD *a3, _QWORD *a4)
{
long long v5; // [rsp+0h] [rbp-30h]
if ( *a3 < 0x96uLL || !*(_QWORD *)(*(_QWORD *)(a1 + 672) + 16LL) )
{
*a4 = 0LL;
return 0;
}
v5 = mariadb_compress_alloc(a1, a2, a3, a4);
if ( v5 )
{
memcpy(a2, v5, *a3);
free(v5);
return 0;
}
return *a4 == 0LL;
}
| _mariadb_compress:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX],0x96
JC 0x00129df7
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x2a0]
CMP qword ptr [RAX + 0x10],0x0
JNZ 0x00129e04
LAB_00129df7:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],0x0
JMP 0x00129e5b
LAB_00129e04:
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 0x00129e70
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x00129e3e
MOV RAX,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RAX]
MOV EAX,0x1
XOR ECX,ECX
CMP RDX,0x0
CMOVNZ EAX,ECX
MOV byte ptr [RBP + -0x1],AL
JMP 0x00129e5f
LAB_00129e3e:
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RAX]
CALL 0x00113360
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x00113520
LAB_00129e5b:
MOV byte ptr [RBP + -0x1],0x0
LAB_00129e5f:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
bool _mariadb_compress(long param_1,void *param_2,size_t *param_3,long *param_4)
{
void *__src;
if ((*param_3 < 0x96) || (*(long *)(*(long *)(param_1 + 0x2a0) + 0x10) == 0)) {
*param_4 = 0;
}
else {
__src = (void *)_mariadb_compress_alloc(param_1,param_2,param_3);
if (__src == (void *)0x0) {
return *param_4 == 0;
}
memcpy(param_2,__src,*param_3);
free(__src);
}
return false;
}
| |
26,598 | minja::Value::operator*(minja::Value const&) const | monkey531[P]llama/common/minja.hpp | Value operator*(const Value& rhs) const {
if (is_string() && rhs.is_number_integer()) {
std::ostringstream out;
for (int64_t i = 0, n = rhs.get<int64_t>(); i < n; ++i) {
out << to_str();
}
return out.str();
}
else if (is_number_integer() && rhs.is_number_integer())
return get<int64_t>() * rhs.get<int64_t>();
else
return get<double>() * rhs.get<double>();
} | O1 | cpp | minja::Value::operator*(minja::Value const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp # imm = 0x1A8
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movb 0x40(%rsi), %al
cmpb $0x3, %al
jne 0xbc3b7
movb 0x40(%r15), %cl
addb $-0x5, %cl
cmpb $0x1, %cl
ja 0xbc3b7
leaq 0x30(%rsp), %rdi
callq 0x1e040
movq %r15, %rdi
callq 0xab27a
movq %rax, %r15
testq %rax, %rax
jle 0xbc35d
leaq 0x18(%rsp), %rbp
leaq 0x8(%rsp), %r12
leaq 0x30(%rsp), %r13
movq %r12, %rdi
movq %r14, %rsi
callq 0xbbd62
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r13, %rdi
callq 0x1de00
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0xbc358
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1dc40
decq %r15
jne 0xbc324
leaq 0x38(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x1e3b0
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xaf306
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbc394
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1dc40
movq 0x9cbd5(%rip), %rsi # 0x158f70
leaq 0x30(%rsp), %rdi
callq 0x1d630
leaq 0xa0(%rsp), %rdi
callq 0x1d380
jmp 0xbc459
addb $-0x5, %al
cmpb $0x1, %al
ja 0xbc40e
movb 0x40(%r15), %al
addb $-0x5, %al
cmpb $0x1, %al
ja 0xbc40e
movq %r14, %rdi
callq 0xab27a
movq %rax, %r14
movq %r15, %rdi
callq 0xab27a
imulq %rax, %r14
leaq 0x40(%rbx), %r15
xorpd %xmm0, %xmm0
movupd %xmm0, (%rbx)
movupd %xmm0, 0x10(%rbx)
movupd %xmm0, 0x20(%rbx)
movupd %xmm0, 0x30(%rbx)
movupd %xmm0, 0x40(%rbx)
movq %r15, %rdi
movq %r14, %rsi
callq 0x914e6
movq %r15, %rdi
jmp 0xbc44f
movq %r14, %rdi
callq 0xab3ac
movsd %xmm0, 0x28(%rsp)
movq %r15, %rdi
callq 0xab3ac
mulsd 0x28(%rsp), %xmm0
leaq 0x40(%rbx), %r14
xorps %xmm1, %xmm1
movups %xmm1, (%rbx)
movups %xmm1, 0x10(%rbx)
movups %xmm1, 0x20(%rbx)
movups %xmm1, 0x30(%rbx)
movups %xmm1, 0x40(%rbx)
movq %r14, %rdi
callq 0x90aa6
movq %r14, %rdi
movl $0x1, %esi
callq 0x8974c
movq %rbx, %rax
addq $0x1a8, %rsp # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0xbc497
jmp 0xbc4a4
jmp 0xbc485
jmp 0xbc485
movq %rax, %rbx
jmp 0xbc4a4
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0xbc4a4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1dc40
movq 0x9cac5(%rip), %rsi # 0x158f70
leaq 0x30(%rsp), %rdi
callq 0x1d630
leaq 0xa0(%rsp), %rdi
callq 0x1d380
movq %rbx, %rdi
callq 0x1e650
| _ZNK5minja5ValuemlERKS0_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1A8h
mov r15, rdx
mov r14, rsi
mov rbx, rdi
mov al, [rsi+40h]
cmp al, 3
jnz loc_BC3B7
mov cl, [r15+40h]
add cl, 0FBh
cmp cl, 1
ja loc_BC3B7
lea rdi, [rsp+1D8h+var_1A8]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
mov rdi, r15
call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void)
mov r15, rax
test rax, rax
jle short loc_BC35D
lea rbp, [rsp+1D8h+var_1C0]
lea r12, [rsp+1D8h+var_1D0]
lea r13, [rsp+1D8h+var_1A8]
loc_BC324:
mov rdi, r12
mov rsi, r14
call _ZNK5minja5Value6to_strB5cxx11Ev; minja::Value::to_str(void)
mov rsi, [rsp+1D8h+var_1D0]
mov rdx, [rsp+1D8h+var_1C8]
mov rdi, r13
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, [rsp+1D8h+var_1D0]; void *
cmp rdi, rbp
jz short loc_BC358
mov rsi, [rsp+1D8h+var_1C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_BC358:
dec r15
jnz short loc_BC324
loc_BC35D:
lea rsi, [rsp+1D8h+var_1A0]
lea rdi, [rsp+1D8h+var_1D0]
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
lea rsi, [rsp+1D8h+var_1D0]
mov rdi, rbx
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
lea rax, [rsp+1D8h+var_1C0]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_BC394
mov rsi, [rsp+1D8h+var_1C0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_BC394:
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+1D8h+var_1A8]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+1D8h+var_138]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
jmp loc_BC459
loc_BC3B7:
add al, 0FBh
cmp al, 1
ja short loc_BC40E
mov al, [r15+40h]
add al, 0FBh
cmp al, 1
ja short loc_BC40E
mov rdi, r14
call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void)
mov r14, rax
mov rdi, r15
call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void)
imul r14, rax
lea r15, [rbx+40h]
xorpd xmm0, xmm0
movupd xmmword ptr [rbx], xmm0
movupd xmmword ptr [rbx+10h], xmm0
movupd xmmword ptr [rbx+20h], xmm0
movupd xmmword ptr [rbx+30h], xmm0
movupd xmmword ptr [rbx+40h], xmm0
mov rdi, r15
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE5EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_16number_integer_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::number_integer_t)
mov rdi, r15
jmp short loc_BC44F
loc_BC40E:
mov rdi, r14
call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void)
movsd [rsp+1D8h+var_1B0], xmm0
mov rdi, r15
call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void)
mulsd xmm0, [rsp+1D8h+var_1B0]
lea r14, [rbx+40h]
xorps xmm1, xmm1
movups xmmword ptr [rbx], xmm1
movups xmmword ptr [rbx+10h], xmm1
movups xmmword ptr [rbx+20h], xmm1
movups xmmword ptr [rbx+30h], xmm1
movups xmmword ptr [rbx+40h], xmm1
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE7EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_14number_float_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::number_float_t)
mov rdi, r14
loc_BC44F:
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
loc_BC459:
mov rax, rbx
add rsp, 1A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]
cmp rdi, rax
jnz short loc_BC497
jmp short loc_BC4A4
jmp short loc_BC485
jmp short $+2
loc_BC485:
mov rbx, rax
jmp short loc_BC4A4
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, rbp
jz short loc_BC4A4
loc_BC497:
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_BC4A4:
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+arg_28]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+arg_98]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, rbx
call __Unwind_Resume
| long long minja::Value::operator*(
long long a1,
long long a2,
long long a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11)
{
char v13; // al
long long v14; // r15
double v15; // xmm4_8
double v16; // xmm5_8
long long v17; // r14
long long v18; // rax
char *v19; // rdi
double v20; // xmm0_8
void *v22[2]; // [rsp+8h] [rbp-1D0h] BYREF
_QWORD v23[2]; // [rsp+18h] [rbp-1C0h] BYREF
double v24; // [rsp+28h] [rbp-1B0h]
_BYTE v25[8]; // [rsp+30h] [rbp-1A8h] BYREF
_BYTE v26[104]; // [rsp+38h] [rbp-1A0h] BYREF
_BYTE v27[312]; // [rsp+A0h] [rbp-138h] BYREF
v13 = *(_BYTE *)(a2 + 64);
if ( v13 == 3 && (unsigned __int8)(*(_BYTE *)(a3 + 64) - 5) <= 1u )
{
std::ostringstream::basic_ostringstream(v25);
v14 = minja::Value::get<long>(a3);
if ( v14 > 0 )
{
do
{
minja::Value::to_str[abi:cxx11](v22, a2, a4, a5, a6, a7, v15, v16, a10, a11);
std::__ostream_insert<char,std::char_traits<char>>(v25, v22[0], v22[1]);
if ( v22[0] != v23 )
operator delete(v22[0], v23[0] + 1LL);
--v14;
}
while ( v14 );
}
std::stringbuf::str(v22, v26);
minja::Value::Value(a1, (long long)v22);
if ( v22[0] != v23 )
operator delete(v22[0], v23[0] + 1LL);
std::ostringstream::~ostringstream(v25, &`VTT for'std::ostringstream);
std::ios_base::~ios_base((std::ios_base *)v27);
}
else
{
if ( (unsigned __int8)(v13 - 5) > 1u || (unsigned __int8)(*(_BYTE *)(a3 + 64) - 5) > 1u )
{
v24 = minja::Value::get<double>(a2);
v20 = minja::Value::get<double>(a3) * v24;
*(_OWORD *)a1 = 0LL;
*(_OWORD *)(a1 + 16) = 0LL;
*(_OWORD *)(a1 + 32) = 0LL;
*(_OWORD *)(a1 + 48) = 0LL;
*(_OWORD *)(a1 + 64) = 0LL;
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
(unsigned __int8 *)(a1 + 64),
v20);
v19 = (char *)(a1 + 64);
}
else
{
v17 = minja::Value::get<long>(a2);
v18 = minja::Value::get<long>(a3);
*(_OWORD *)a1 = 0LL;
*(_OWORD *)(a1 + 16) = 0LL;
*(_OWORD *)(a1 + 32) = 0LL;
*(_OWORD *)(a1 + 48) = 0LL;
*(_OWORD *)(a1 + 64) = 0LL;
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
(unsigned __int8 *)(a1 + 64),
v18 * v17);
v19 = (char *)(a1 + 64);
}
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v19);
}
return a1;
}
| operator*:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1a8
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
MOV AL,byte ptr [RSI + 0x40]
CMP AL,0x3
JNZ 0x001bc3b7
MOV CL,byte ptr [R15 + 0x40]
ADD CL,0xfb
CMP CL,0x1
JA 0x001bc3b7
LEA RDI,[RSP + 0x30]
CALL 0x0011e040
LAB_001bc305:
MOV RDI,R15
CALL 0x001ab27a
MOV R15,RAX
TEST RAX,RAX
JLE 0x001bc35d
LEA RBP,[RSP + 0x18]
LEA R12,[RSP + 0x8]
LEA R13,[RSP + 0x30]
LAB_001bc324:
MOV RDI,R12
MOV RSI,R14
CALL 0x001bbd62
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_001bc339:
MOV RDI,R13
CALL 0x0011de00
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,RBP
JZ 0x001bc358
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011dc40
LAB_001bc358:
DEC R15
JNZ 0x001bc324
LAB_001bc35d:
LEA RSI,[RSP + 0x38]
LAB_001bc362:
LEA RDI,[RSP + 0x8]
CALL 0x0011e3b0
LAB_001bc36c:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x001af306
LAB_001bc379:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001bc394
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011dc40
LAB_001bc394:
MOV RSI,qword ptr [0x00258f70]
LEA RDI,[RSP + 0x30]
CALL 0x0011d630
LEA RDI,[RSP + 0xa0]
CALL 0x0011d380
JMP 0x001bc459
LAB_001bc3b7:
ADD AL,0xfb
CMP AL,0x1
JA 0x001bc40e
MOV AL,byte ptr [R15 + 0x40]
ADD AL,0xfb
CMP AL,0x1
JA 0x001bc40e
MOV RDI,R14
CALL 0x001ab27a
MOV R14,RAX
MOV RDI,R15
CALL 0x001ab27a
IMUL R14,RAX
LEA R15,[RBX + 0x40]
XORPD XMM0,XMM0
MOVUPD xmmword ptr [RBX],XMM0
MOVUPD xmmword ptr [RBX + 0x10],XMM0
MOVUPD xmmword ptr [RBX + 0x20],XMM0
MOVUPD xmmword ptr [RBX + 0x30],XMM0
MOVUPD xmmword ptr [RBX + 0x40],XMM0
MOV RDI,R15
MOV RSI,R14
CALL 0x001914e6
MOV RDI,R15
JMP 0x001bc44f
LAB_001bc40e:
MOV RDI,R14
CALL 0x001ab3ac
MOVSD qword ptr [RSP + 0x28],XMM0
MOV RDI,R15
CALL 0x001ab3ac
MULSD XMM0,qword ptr [RSP + 0x28]
LEA R14,[RBX + 0x40]
XORPS XMM1,XMM1
MOVUPS xmmword ptr [RBX],XMM1
MOVUPS xmmword ptr [RBX + 0x10],XMM1
MOVUPS xmmword ptr [RBX + 0x20],XMM1
MOVUPS xmmword ptr [RBX + 0x30],XMM1
MOVUPS xmmword ptr [RBX + 0x40],XMM1
MOV RDI,R14
CALL 0x00190aa6
MOV RDI,R14
LAB_001bc44f:
MOV ESI,0x1
CALL 0x0018974c
LAB_001bc459:
MOV RAX,RBX
ADD RSP,0x1a8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* minja::Value::TEMPNAMEPLACEHOLDERVALUE(minja::Value const&) const */
Value * __thiscall minja::Value::operator*(Value *this,Value *param_1)
{
long lVar1;
long lVar2;
Value *in_RDX;
double dVar3;
long *local_1d0;
long local_1c8;
long local_1c0 [2];
double local_1b0;
ostringstream local_1a8 [112];
ios_base local_138 [264];
if ((param_1[0x40] == (Value)0x3) && ((byte)((char)in_RDX[0x40] - 5U) < 2)) {
std::__cxx11::ostringstream::ostringstream(local_1a8);
/* try { // try from 001bc305 to 001bc30c has its CatchHandler @ 001bc483 */
lVar1 = get<long>(in_RDX);
if (0 < lVar1) {
do {
/* try { // try from 001bc324 to 001bc32e has its CatchHandler @ 001bc485 */
to_str_abi_cxx11_();
/* try { // try from 001bc339 to 001bc340 has its CatchHandler @ 001bc48a */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)local_1a8,(char *)local_1d0,local_1c8);
if (local_1d0 != local_1c0) {
operator_delete(local_1d0,local_1c0[0] + 1);
}
lVar1 = lVar1 + -1;
} while (lVar1 != 0);
}
/* try { // try from 001bc362 to 001bc36b has its CatchHandler @ 001bc481 */
std::__cxx11::stringbuf::str();
/* try { // try from 001bc36c to 001bc378 has its CatchHandler @ 001bc46e */
Value(this,(string *)&local_1d0);
if (local_1d0 != local_1c0) {
operator_delete(local_1d0,local_1c0[0] + 1);
}
std::__cxx11::ostringstream::~ostringstream(local_1a8);
std::ios_base::~ios_base(local_138);
}
else {
if (((byte)((char)param_1[0x40] - 5U) < 2) && ((byte)((char)in_RDX[0x40] - 5U) < 2)) {
lVar1 = get<long>(param_1);
lVar2 = get<long>(in_RDX);
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
nlohmann::json_abi_v3_11_3::detail::
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::
construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(this + 0x40,lVar1 * lVar2);
}
else {
local_1b0 = get<double>(param_1);
dVar3 = get<double>(in_RDX);
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
nlohmann::json_abi_v3_11_3::detail::
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::
construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(dVar3 * local_1b0,this + 0x40);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant((bool)((char)this + '@'));
}
return this;
}
| |
26,599 | my_mb_wc_sjis | eloqsql/strings/ctype-sjis.c | static int
my_mb_wc_sjis(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e){
int hi;
if (s >= e)
return MY_CS_TOOSMALL;
if ((hi= s[0]) < 0x80) /* ASCII: [00..7F] -> [U+0000..U+007F] */
{
*pwc= hi;
return 1;
}
/* JIS-X-0201 Half width Katakana: [A1..DF] -> [U+FF61..U+FF9F] */
if (hi >= 0xA1 && hi <= 0xDF)
{
*pwc= sjis_to_unicode[hi];
return 1;
}
if (s + 2 > e)
return MY_CS_TOOSMALL2;
/* JIS-X-0208 [81..9F,E0..FC][40..7E,80..FC] */
if (!(pwc[0]= sjis_to_unicode[(hi << 8) + s[1]]))
return (issjishead(hi) && issjistail(s[1])) ? -2 : MY_CS_ILSEQ;
return 2;
} | O0 | c | my_mb_wc_sjis:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x56f7a
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x570d8
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x80, %eax
jge 0x56fa2
movslq -0x2c(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x570d8
cmpl $0xa1, -0x2c(%rbp)
jl 0x56fd8
cmpl $0xdf, -0x2c(%rbp)
jg 0x56fd8
movslq -0x2c(%rbp), %rcx
leaq 0x236dd1(%rip), %rax # 0x28dd90
movzwl (%rax,%rcx,2), %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x570d8
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x56ff2
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x570d8
movl -0x2c(%rbp), %eax
shll $0x8, %eax
movq -0x20(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
addl %ecx, %eax
movslq %eax, %rcx
leaq 0x236d84(%rip), %rax # 0x28dd90
movzwl (%rax,%rcx,2), %eax
movq -0x18(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0x570d1
movl -0x2c(%rbp), %eax
movzbl %al, %ecx
movl $0x81, %eax
cmpl %ecx, %eax
jg 0x5703d
movl -0x2c(%rbp), %eax
movzbl %al, %eax
cmpl $0x9f, %eax
jle 0x57064
movl -0x2c(%rbp), %eax
movzbl %al, %edx
xorl %eax, %eax
movl $0xe0, %ecx
cmpl %edx, %ecx
movb %al, -0x2d(%rbp)
jg 0x570bc
movl -0x2c(%rbp), %eax
movzbl %al, %ecx
xorl %eax, %eax
cmpl $0xfc, %ecx
movb %al, -0x2d(%rbp)
jg 0x570bc
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %ecx
movl $0x40, %eax
cmpl %ecx, %eax
jg 0x57087
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %ecx
movb $0x1, %al
cmpl $0x7e, %ecx
movb %al, -0x2e(%rbp)
jle 0x570b6
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %edx
xorl %eax, %eax
movl $0x80, %ecx
cmpl %edx, %ecx
movb %al, -0x2f(%rbp)
jg 0x570b0
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xfc, %eax
setle %al
movb %al, -0x2f(%rbp)
movb -0x2f(%rbp), %al
movb %al, -0x2e(%rbp)
movb -0x2e(%rbp), %al
movb %al, -0x2d(%rbp)
movb -0x2d(%rbp), %dl
xorl %eax, %eax
movl $0xfffffffe, %ecx # imm = 0xFFFFFFFE
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x570d8
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
| my_mb_wc_sjis:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_56F7A
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_570D8
loc_56F7A:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
mov [rbp+var_2C], eax
cmp eax, 80h
jge short loc_56FA2
movsxd rcx, [rbp+var_2C]
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 1
jmp loc_570D8
loc_56FA2:
cmp [rbp+var_2C], 0A1h
jl short loc_56FD8
cmp [rbp+var_2C], 0DFh
jg short loc_56FD8
movsxd rcx, [rbp+var_2C]
lea rax, sjis_to_unicode
movzx eax, word ptr [rax+rcx*2]
mov ecx, eax
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 1
jmp loc_570D8
loc_56FD8:
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_56FF2
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_570D8
loc_56FF2:
mov eax, [rbp+var_2C]
shl eax, 8
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+1]
add eax, ecx
movsxd rcx, eax
lea rax, sjis_to_unicode
movzx eax, word ptr [rax+rcx*2]
mov rcx, [rbp+var_18]
mov [rcx], rax
cmp rax, 0
jnz loc_570D1
mov eax, [rbp+var_2C]
movzx ecx, al
mov eax, 81h
cmp eax, ecx
jg short loc_5703D
mov eax, [rbp+var_2C]
movzx eax, al
cmp eax, 9Fh
jle short loc_57064
loc_5703D:
mov eax, [rbp+var_2C]
movzx edx, al
xor eax, eax
mov ecx, 0E0h
cmp ecx, edx
mov [rbp+var_2D], al
jg short loc_570BC
mov eax, [rbp+var_2C]
movzx ecx, al
xor eax, eax
cmp ecx, 0FCh
mov [rbp+var_2D], al
jg short loc_570BC
loc_57064:
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+1]
mov eax, 40h ; '@'
cmp eax, ecx
jg short loc_57087
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+1]
mov al, 1
cmp ecx, 7Eh ; '~'
mov [rbp+var_2E], al
jle short loc_570B6
loc_57087:
mov rax, [rbp+var_20]
movzx edx, byte ptr [rax+1]
xor eax, eax
mov ecx, 80h
cmp ecx, edx
mov [rbp+var_2F], al
jg short loc_570B0
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 0FCh
setle al
mov [rbp+var_2F], al
loc_570B0:
mov al, [rbp+var_2F]
mov [rbp+var_2E], al
loc_570B6:
mov al, [rbp+var_2E]
mov [rbp+var_2D], al
loc_570BC:
mov dl, [rbp+var_2D]
xor eax, eax
mov ecx, 0FFFFFFFEh
test dl, 1
cmovnz eax, ecx
mov [rbp+var_4], eax
jmp short loc_570D8
loc_570D1:
mov [rbp+var_4], 2
loc_570D8:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_mb_wc_sjis(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4)
{
long long v4; // rax
unsigned int v5; // eax
bool v7; // [rsp+1h] [rbp-2Fh]
char v8; // [rsp+2h] [rbp-2Eh]
char v9; // [rsp+3h] [rbp-2Dh]
unsigned int v10; // [rsp+4h] [rbp-2Ch]
if ( (unsigned long long)a3 < a4 )
{
v10 = *a3;
if ( v10 >= 0x80 )
{
if ( *a3 < 0xA1u || *a3 > 0xDFu )
{
if ( (unsigned long long)(a3 + 2) <= a4 )
{
v4 = sjis_to_unicode[a3[1] + (v10 << 8)];
*a2 = v4;
if ( v4 )
{
return 2;
}
else
{
if ( (unsigned __int8)v10 >= 0x81u && (unsigned __int8)v10 <= 0x9Fu
|| (v9 = 0, (unsigned __int8)v10 >= 0xE0u) && (v9 = 0, (unsigned __int8)v10 <= 0xFCu) )
{
if ( a3[1] < 0x40u || (v8 = 1, a3[1] > 0x7Eu) )
{
v7 = 0;
if ( a3[1] >= 0x80u )
v7 = a3[1] <= 0xFCu;
v8 = v7;
}
v9 = v8;
}
v5 = 0;
if ( (v9 & 1) != 0 )
return (unsigned int)-2;
return v5;
}
}
else
{
return (unsigned int)-102;
}
}
else
{
*a2 = sjis_to_unicode[*a3];
return 1;
}
}
else
{
*a2 = *a3;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
| my_mb_wc_sjis:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x00156f7a
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x001570d8
LAB_00156f7a:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x80
JGE 0x00156fa2
MOVSXD RCX,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001570d8
LAB_00156fa2:
CMP dword ptr [RBP + -0x2c],0xa1
JL 0x00156fd8
CMP dword ptr [RBP + -0x2c],0xdf
JG 0x00156fd8
MOVSXD RCX,dword ptr [RBP + -0x2c]
LEA RAX,[0x38dd90]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001570d8
LAB_00156fd8:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x00156ff2
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x001570d8
LAB_00156ff2:
MOV EAX,dword ptr [RBP + -0x2c]
SHL EAX,0x8
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0x1]
ADD EAX,ECX
MOVSXD RCX,EAX
LEA RAX,[0x38dd90]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JNZ 0x001570d1
MOV EAX,dword ptr [RBP + -0x2c]
MOVZX ECX,AL
MOV EAX,0x81
CMP EAX,ECX
JG 0x0015703d
MOV EAX,dword ptr [RBP + -0x2c]
MOVZX EAX,AL
CMP EAX,0x9f
JLE 0x00157064
LAB_0015703d:
MOV EAX,dword ptr [RBP + -0x2c]
MOVZX EDX,AL
XOR EAX,EAX
MOV ECX,0xe0
CMP ECX,EDX
MOV byte ptr [RBP + -0x2d],AL
JG 0x001570bc
MOV EAX,dword ptr [RBP + -0x2c]
MOVZX ECX,AL
XOR EAX,EAX
CMP ECX,0xfc
MOV byte ptr [RBP + -0x2d],AL
JG 0x001570bc
LAB_00157064:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0x1]
MOV EAX,0x40
CMP EAX,ECX
JG 0x00157087
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0x1]
MOV AL,0x1
CMP ECX,0x7e
MOV byte ptr [RBP + -0x2e],AL
JLE 0x001570b6
LAB_00157087:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EDX,byte ptr [RAX + 0x1]
XOR EAX,EAX
MOV ECX,0x80
CMP ECX,EDX
MOV byte ptr [RBP + -0x2f],AL
JG 0x001570b0
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xfc
SETLE AL
MOV byte ptr [RBP + -0x2f],AL
LAB_001570b0:
MOV AL,byte ptr [RBP + -0x2f]
MOV byte ptr [RBP + -0x2e],AL
LAB_001570b6:
MOV AL,byte ptr [RBP + -0x2e]
MOV byte ptr [RBP + -0x2d],AL
LAB_001570bc:
MOV DL,byte ptr [RBP + -0x2d]
XOR EAX,EAX
MOV ECX,0xfffffffe
TEST DL,0x1
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001570d8
LAB_001570d1:
MOV dword ptr [RBP + -0x4],0x2
LAB_001570d8:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_mb_wc_sjis(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
ushort uVar1;
bool bVar2;
uint uVar3;
int4 local_c;
if (param_3 < param_4) {
uVar3 = (uint)*param_3;
if (uVar3 < 0x80) {
*param_2 = (long)(int)uVar3;
local_c = 1;
}
else if ((uVar3 < 0xa1) || (0xdf < uVar3)) {
if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
uVar1 = *(ushort *)(sjis_to_unicode + (long)(int)(uVar3 * 0x100 + (uint)param_3[1]) * 2);
*param_2 = (ulong)uVar1;
if ((ulong)uVar1 == 0) {
if ((((0x80 < uVar3) && (uVar3 < 0xa0)) ||
((bVar2 = false, 0xdf < uVar3 && (bVar2 = false, uVar3 < 0xfd)))) &&
(((param_3[1] < 0x40 || (bVar2 = true, 0x7e < param_3[1])) &&
(bVar2 = false, 0x7f < param_3[1])))) {
bVar2 = param_3[1] < 0xfd;
}
local_c = 0;
if (bVar2) {
local_c = 0xfffffffe;
}
}
else {
local_c = 2;
}
}
}
else {
*param_2 = (ulong)*(ushort *)(sjis_to_unicode + (long)(int)uVar3 * 2);
local_c = 1;
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
|
Subsets and Splits
C++ Functions Using STL
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ STL Function Queries
Filters C++ code examples that use standard library containers and algorithms, helping identify common programming patterns and library usage in code generation tasks.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.