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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
43,200 | minja::Value::set(minja::Value const&, minja::Value const&) | monkey531[P]llama/common/minja.hpp | void set(const Value& key, const Value& value) {
if (!object_) throw std::runtime_error("Value is not an object: " + dump());
if (!key.is_hashable()) throw std::runtime_error("Unashable type: " + dump());
(*object_)[key.primitive_] = value;
} | O2 | cpp | minja::Value::set(minja::Value const&, minja::Value const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r14
cmpq $0x0, 0x20(%rdi)
je 0x50bb7
movq %rdx, %rbx
movq %rsi, %r15
movq %rsi, %rdi
callq 0x41b22
testb %al, %al
je 0x50c14
movq 0x20(%r14), %rdi
addq $0x40, %r15
movq %r15, %rsi
callq 0x50cdc
movq %rax, %rdi
movq %rbx, %rsi
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x50d34
pushq $0x10
popq %rdi
callq 0x223c0
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
pushq $-0x1
popq %rdx
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x41b32
leaq 0x4524d(%rip), %rsi # 0x95e28
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x278ae
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x22c20
xorl %ebp, %ebp
movq 0x863ed(%rip), %rsi # 0xd6ff0
movq 0x86366(%rip), %rdx # 0xd6f70
movq %rbx, %rdi
callq 0x22cd0
jmp 0x50c6f
pushq $0x10
popq %rdi
callq 0x223c0
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
pushq $-0x1
popq %rdx
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x41b32
leaq 0x45209(%rip), %rsi # 0x95e41
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x278ae
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x22c20
xorl %ebp, %ebp
movq 0x86390(%rip), %rsi # 0xd6ff0
movq 0x86309(%rip), %rdx # 0xd6f70
movq %rbx, %rdi
callq 0x22cd0
jmp 0x50c73
jmp 0x50c82
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x22f48
jmp 0x50c88
movq %rax, %r14
movb $0x1, %bpl
leaq 0x8(%rsp), %rdi
callq 0x22f48
testb %bpl, %bpl
jne 0x50c9e
jmp 0x50ca6
jmp 0x50c9b
movq %rax, %r14
movq %rbx, %rdi
callq 0x22550
movq %r14, %rdi
callq 0x22d30
| _ZN5minja5Value3setERKS0_S2_:
push rbp
push r15
push r14
push rbx
sub rsp, 48h
mov r14, rdi
cmp qword ptr [rdi+20h], 0
jz short loc_50BB7
mov rbx, rdx
mov r15, rsi
mov rdi, rsi; this
call _ZNK5minja5Value12is_primitiveEv; minja::Value::is_primitive(void)
test al, al
jz loc_50C14
mov rdi, [r14+20h]
add r15, 40h ; '@'
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixERSJ_; nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::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&)
mov rdi, rax
mov rsi, rbx
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
jmp _ZN5minja5ValueaSERKS0_; minja::Value::operator=(minja::Value const&)
loc_50BB7:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_60]
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rsi, r14
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aValueIsNotAnOb; "Value is not an object: "
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_60]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_40]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_50C6F
loc_50C14:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_60]
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rsi, r14
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aUnashableType; "Unashable type: "
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_60]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_40]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_50C6F:
jmp short loc_50C73
jmp short loc_50C82
loc_50C73:
mov r14, rax
lea rdi, [rsp+68h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_50C88
loc_50C82:
mov r14, rax
mov bpl, 1
loc_50C88:
lea rdi, [rsp+68h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_50C9E
jmp short loc_50CA6
jmp short $+2
loc_50C9B:
mov r14, rax
loc_50C9E:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_50CA6:
mov rdi, r14
call __Unwind_Resume
| long long minja::Value::set(minja::Value *this, const minja::Value *a2, const minja::Value *a3)
{
long long v4; // rax
void *exception; // rbx
void *v7; // rbx
_BYTE v8[32]; // [rsp+8h] [rbp-60h] BYREF
_BYTE v9[64]; // [rsp+28h] [rbp-40h] BYREF
if ( !*((_QWORD *)this + 4) )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v8, (long long)this, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v9, (long long)"Value is not an object: ", (long long)v8);
std::runtime_error::runtime_error(exception, v9);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( !minja::Value::is_primitive(a2) )
{
v7 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v8, (long long)this, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v9, (long long)"Unashable type: ", (long long)v8);
std::runtime_error::runtime_error(v7, v9);
__cxa_throw(
v7,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v4 = nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::operator[](
*((_QWORD *)this + 4),
(char *)a2 + 64);
return minja::Value::operator=(v4, a3);
}
| set:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R14,RDI
CMP qword ptr [RDI + 0x20],0x0
JZ 0x00150bb7
MOV RBX,RDX
MOV R15,RSI
MOV RDI,RSI
CALL 0x00141b22
TEST AL,AL
JZ 0x00150c14
MOV RDI,qword ptr [R14 + 0x20]
ADD R15,0x40
MOV RSI,R15
CALL 0x00150cdc
MOV RDI,RAX
MOV RSI,RBX
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
JMP 0x00150d34
LAB_00150bb7:
PUSH 0x10
POP RDI
CALL 0x001223c0
MOV RBX,RAX
LAB_00150bc2:
LEA RDI,[RSP + 0x8]
PUSH -0x1
POP RDX
MOV RSI,R14
XOR ECX,ECX
CALL 0x00141b32
LAB_00150bd4:
LEA RSI,[0x195e28]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x001278ae
MOV BPL,0x1
LAB_00150bed:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x00122c20
XOR EBP,EBP
MOV RSI,qword ptr [0x001d6ff0]
MOV RDX,qword ptr [0x001d6f70]
MOV RDI,RBX
CALL 0x00122cd0
LAB_00150c14:
PUSH 0x10
POP RDI
CALL 0x001223c0
MOV RBX,RAX
LAB_00150c1f:
LEA RDI,[RSP + 0x8]
PUSH -0x1
POP RDX
MOV RSI,R14
XOR ECX,ECX
CALL 0x00141b32
LAB_00150c31:
LEA RSI,[0x195e41]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x001278ae
MOV BPL,0x1
LAB_00150c4a:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x00122c20
XOR EBP,EBP
MOV RSI,qword ptr [0x001d6ff0]
MOV RDX,qword ptr [0x001d6f70]
MOV RDI,RBX
CALL 0x00122cd0
|
/* minja::Value::set(minja::Value const&, minja::Value const&) */
void __thiscall minja::Value::set(Value *this,Value *param_1,Value *param_2)
{
Value *this_00;
runtime_error *prVar1;
char cVar2;
int1 local_60 [32];
string local_40 [32];
if (*(long *)(this + 0x20) == 0) {
prVar1 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00150bc2 to 00150bd3 has its CatchHandler @ 00150c9b */
dump_abi_cxx11_((int)local_60,SUB81(this,0));
/* try { // try from 00150bd4 to 00150be9 has its CatchHandler @ 00150c82 */
std::operator+((char *)local_40,(string *)"Value is not an object: ");
/* try { // try from 00150bed to 00150c11 has its CatchHandler @ 00150c73 */
std::runtime_error::runtime_error(prVar1,local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar1,PTR_typeinfo_001d6ff0,PTR__runtime_error_001d6f70);
}
cVar2 = is_primitive(param_1);
if (cVar2 != '\0') {
this_00 = (Value *)nlohmann::json_abi_v3_11_3::
ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::operator[](*(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
**)(this + 0x20),param_1 + 0x40);
operator=(this_00,param_2);
return;
}
prVar1 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00150c1f to 00150c30 has its CatchHandler @ 00150c99 */
dump_abi_cxx11_((int)local_60,SUB81(this,0));
/* try { // try from 00150c31 to 00150c46 has its CatchHandler @ 00150c71 */
std::operator+((char *)local_40,(string *)"Unashable type: ");
/* try { // try from 00150c4a to 00150c6e has its CatchHandler @ 00150c6f */
std::runtime_error::runtime_error(prVar1,local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar1,PTR_typeinfo_001d6ff0,PTR__runtime_error_001d6f70);
}
| |
43,201 | append_to_chain_store(PycRef<ASTNode> const&, PycRef<ASTNode>, FastStack&, PycRef<ASTBlock> const&) | Pyarmor-Static-Unpack-1shot/ASTree.cpp | static void append_to_chain_store(const PycRef<ASTNode> &chainStore,
PycRef<ASTNode> item, FastStack& stack, const PycRef<ASTBlock>& curblock)
{
stack.pop(); // ignore identical source object.
chainStore.cast<ASTChainStore>()->append(item);
if (stack.top().type() == PycObject::TYPE_NULL) {
curblock->append(chainStore);
} else {
stack.push(chainStore);
}
} | O3 | cpp | append_to_chain_store(PycRef<ASTNode> const&, PycRef<ASTNode>, FastStack&, PycRef<ASTBlock> const&):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r15
movq %rdx, %rdi
callq 0x2882e
leaq -0x38(%rbp), %rdi
movq %r15, %rsi
callq 0x2a2c2
movq (%r12), %r12
testq %r12, %r12
je 0x21ea8
incl 0x8(%r12)
movq -0x38(%rbp), %r13
movl $0x18, %edi
callq 0x7220
leaq 0x18(%r13), %rsi
movq %r12, 0x10(%rax)
movq %rax, %rdi
callq 0x7050
incq 0x28(%r13)
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x21ede
decl 0x8(%rdi)
jne 0x21ede
movq (%rdi), %rax
callq *0x8(%rax)
movslq 0x18(%rbx), %rax
testq %rax, %rax
js 0x21f09
movq (%rbx), %rcx
movq (%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x21f09
movl 0xc(%rdi), %r12d
cmpl $0x0, 0x8(%rdi)
jne 0x21f03
movq (%rdi), %rax
callq *0x8(%rax)
cmpl $0x30, %r12d
jne 0x21f45
movq (%r14), %rbx
movq (%r15), %r14
testq %r14, %r14
je 0x21f18
incl 0x8(%r14)
movl $0x18, %edi
callq 0x7220
leaq 0x20(%rbx), %rsi
movq %r14, 0x10(%rax)
movq %rax, %rdi
callq 0x7050
incq 0x30(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r15), %rax
movq %rax, -0x30(%rbp)
testq %rax, %rax
je 0x21f54
incl 0x8(%rax)
leaq -0x30(%rbp), %rsi
movq %rbx, %rdi
callq 0x28868
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x21f36
decl 0x8(%rdi)
jne 0x21f36
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x21f36
movq %rax, %rbx
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x21fbe
decl 0x8(%rdi)
jne 0x21fbe
movq (%rdi), %rax
jmp 0x21fa0
movq %rax, %rbx
testq %r14, %r14
je 0x21fbe
decl 0x8(%r14)
jne 0x21fbe
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
jmp 0x21fbe
movq %rax, %rbx
testq %r12, %r12
je 0x21fb5
movq %r12, %rdi
callq 0x8997
leaq -0x38(%rbp), %rdi
callq 0x897d
movq %rbx, %rdi
callq 0x7450
| _ZL21append_to_chain_storeRK6PycRefI7ASTNodeES1_R9FastStackRKS_I8ASTBlockE:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14, rcx
mov rbx, rdx
mov r12, rsi
mov r15, rdi
mov rdi, rdx; this
call _ZN9FastStack3popEv; FastStack::pop(void)
lea rdi, [rbp+var_38]
mov rsi, r15
call _ZNK6PycRefI7ASTNodeE4castI13ASTChainStoreEES_IT_Ev; PycRef<ASTNode>::cast<ASTChainStore>(void)
mov r12, [r12]
test r12, r12
jz short loc_21EA8
inc dword ptr [r12+8]
loc_21EA8:
mov r13, [rbp+var_38]
mov edi, 18h; unsigned __int64
call __Znwm; operator new(ulong)
lea rsi, [r13+18h]; std::__detail::_List_node_base *
mov [rax+10h], r12
mov rdi, rax; this
call __ZNSt8__detail15_List_node_base7_M_hookEPS0_; std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)
inc qword ptr [r13+28h]
mov rdi, [rbp+var_38]
test rdi, rdi
jz short loc_21EDE
dec dword ptr [rdi+8]
jnz short loc_21EDE
mov rax, [rdi]
call qword ptr [rax+8]
loc_21EDE:
movsxd rax, dword ptr [rbx+18h]
test rax, rax
js short loc_21F09
mov rcx, [rbx]
mov rdi, [rcx+rax*8]
test rdi, rdi
jz short loc_21F09
mov r12d, [rdi+0Ch]
cmp dword ptr [rdi+8], 0
jnz short loc_21F03
mov rax, [rdi]
call qword ptr [rax+8]
loc_21F03:
cmp r12d, 30h ; '0'
jnz short loc_21F45
loc_21F09:
mov rbx, [r14]
mov r14, [r15]
test r14, r14
jz short loc_21F18
inc dword ptr [r14+8]
loc_21F18:
mov edi, 18h; unsigned __int64
call __Znwm; operator new(ulong)
lea rsi, [rbx+20h]; std::__detail::_List_node_base *
mov [rax+10h], r14
mov rdi, rax; this
call __ZNSt8__detail15_List_node_base7_M_hookEPS0_; std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)
inc qword ptr [rbx+30h]
loc_21F36:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_21F45:
mov rax, [r15]
mov [rbp+var_30], rax
test rax, rax
jz short loc_21F54
inc dword ptr [rax+8]
loc_21F54:
lea rsi, [rbp+var_30]
mov rdi, rbx
call _ZN9FastStack4pushE6PycRefI7ASTNodeE; FastStack::push(PycRef<ASTNode>)
mov rdi, [rbp+var_30]
test rdi, rdi
jz short loc_21F36
dec dword ptr [rdi+8]
jnz short loc_21F36
mov rax, [rdi]
call qword ptr [rax+8]
jmp short loc_21F36
mov rbx, rax
mov rdi, [rbp+var_30]
test rdi, rdi
jz short loc_21FBE
dec dword ptr [rdi+8]
jnz short loc_21FBE
mov rax, [rdi]
jmp short loc_21FA0
mov rbx, rax
test r14, r14
jz short loc_21FBE
dec dword ptr [r14+8]
jnz short loc_21FBE
mov rax, [r14]
mov rdi, r14
loc_21FA0:
call qword ptr [rax+8]
jmp short loc_21FBE
mov rbx, rax
test r12, r12
jz short loc_21FB5
mov rdi, r12
call _ZL21append_to_chain_storeRK6PycRefI7ASTNodeES1_R9FastStackRKS_I8ASTBlockE_cold_2; append_to_chain_store(PycRef<ASTNode> const&,PycRef<ASTNode>,FastStack &,PycRef const&<ASTBlock>) [clone]
loc_21FB5:
lea rdi, [rbp+var_38]
call _ZL21append_to_chain_storeRK6PycRefI7ASTNodeES1_R9FastStackRKS_I8ASTBlockE_cold_1; append_to_chain_store(PycRef<ASTNode> const&,PycRef<ASTNode>,FastStack &,PycRef const&<ASTBlock>) [clone]
loc_21FBE:
mov rdi, rbx
call __Unwind_Resume
| long long append_to_chain_store(long long *a1, long long *a2, int *a3, long long *a4)
{
long long v7; // r12
long long v8; // r13
std::__detail::_List_node_base *v9; // rax
long long v10; // rdi
bool v11; // zf
long long v12; // rax
_DWORD *v13; // rdi
int v14; // r12d
long long v15; // rbx
long long v16; // r14
std::__detail::_List_node_base *v17; // rax
long long result; // rax
long long v19; // rax
long long v20; // rdi
long long v21; // [rsp+8h] [rbp-38h] BYREF
_QWORD v22[6]; // [rsp+10h] [rbp-30h] BYREF
FastStack::pop((FastStack *)a3);
PycRef<ASTNode>::cast<ASTChainStore>(&v21, a1);
v7 = *a2;
if ( *a2 )
++*(_DWORD *)(v7 + 8);
v8 = v21;
v9 = (std::__detail::_List_node_base *)operator new(0x18uLL);
*((_QWORD *)v9 + 2) = v7;
std::__detail::_List_node_base::_M_hook(v9, (std::__detail::_List_node_base *)(v8 + 24));
++*(_QWORD *)(v8 + 40);
v10 = v21;
if ( v21 )
{
v11 = (*(_DWORD *)(v21 + 8))-- == 1;
if ( v11 )
(*(void ( **)(long long))(*(_QWORD *)v10 + 8LL))(v10);
}
v12 = a3[6];
if ( v12 < 0 )
goto LABEL_11;
v13 = *(_DWORD **)(*(_QWORD *)a3 + 8 * v12);
if ( !v13 )
goto LABEL_11;
v14 = v13[3];
if ( !v13[2] )
(*(void ( **)(_DWORD *))(*(_QWORD *)v13 + 8LL))(v13);
if ( v14 != 48 )
{
v19 = *a1;
v22[0] = v19;
if ( v19 )
++*(_DWORD *)(v19 + 8);
result = FastStack::push(a3);
v20 = v22[0];
if ( v22[0] )
{
v11 = (*(_DWORD *)(v22[0] + 8LL))-- == 1;
if ( v11 )
return (*(long long ( **)(long long, _QWORD *))(*(_QWORD *)v20 + 8LL))(v20, v22);
}
}
else
{
LABEL_11:
v15 = *a4;
v16 = *a1;
if ( *a1 )
++*(_DWORD *)(v16 + 8);
v17 = (std::__detail::_List_node_base *)operator new(0x18uLL);
*((_QWORD *)v17 + 2) = v16;
result = std::__detail::_List_node_base::_M_hook(v17, (std::__detail::_List_node_base *)(v15 + 32));
++*(_QWORD *)(v15 + 48);
}
return result;
}
| append_to_chain_store:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,RCX
MOV RBX,RDX
MOV R12,RSI
MOV R15,RDI
MOV RDI,RDX
CALL 0x0012882e
LEA RDI,[RBP + -0x38]
MOV RSI,R15
CALL 0x0012a2c2
MOV R12,qword ptr [R12]
TEST R12,R12
JZ 0x00121ea8
INC dword ptr [R12 + 0x8]
LAB_00121ea8:
MOV R13,qword ptr [RBP + -0x38]
LAB_00121eac:
MOV EDI,0x18
CALL 0x00107220
LAB_00121eb6:
LEA RSI,[R13 + 0x18]
MOV qword ptr [RAX + 0x10],R12
MOV RDI,RAX
CALL 0x00107050
INC qword ptr [R13 + 0x28]
MOV RDI,qword ptr [RBP + -0x38]
TEST RDI,RDI
JZ 0x00121ede
DEC dword ptr [RDI + 0x8]
JNZ 0x00121ede
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_00121ede:
MOVSXD RAX,dword ptr [RBX + 0x18]
TEST RAX,RAX
JS 0x00121f09
MOV RCX,qword ptr [RBX]
MOV RDI,qword ptr [RCX + RAX*0x8]
TEST RDI,RDI
JZ 0x00121f09
MOV R12D,dword ptr [RDI + 0xc]
CMP dword ptr [RDI + 0x8],0x0
JNZ 0x00121f03
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_00121f03:
CMP R12D,0x30
JNZ 0x00121f45
LAB_00121f09:
MOV RBX,qword ptr [R14]
MOV R14,qword ptr [R15]
TEST R14,R14
JZ 0x00121f18
INC dword ptr [R14 + 0x8]
LAB_00121f18:
MOV EDI,0x18
CALL 0x00107220
LEA RSI,[RBX + 0x20]
MOV qword ptr [RAX + 0x10],R14
MOV RDI,RAX
CALL 0x00107050
INC qword ptr [RBX + 0x30]
LAB_00121f36:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00121f45:
MOV RAX,qword ptr [R15]
MOV qword ptr [RBP + -0x30],RAX
TEST RAX,RAX
JZ 0x00121f54
INC dword ptr [RAX + 0x8]
LAB_00121f54:
LEA RSI,[RBP + -0x30]
MOV RDI,RBX
CALL 0x00128868
LAB_00121f60:
MOV RDI,qword ptr [RBP + -0x30]
TEST RDI,RDI
JZ 0x00121f36
DEC dword ptr [RDI + 0x8]
JNZ 0x00121f36
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
JMP 0x00121f36
|
/* append_to_chain_store(PycRef<ASTNode> const&, PycRef<ASTNode>, FastStack&, PycRef<ASTBlock>
const&) */
void append_to_chain_store(long *param_1,long *param_2,FastStack *param_3,long *param_4)
{
int iVar1;
long lVar2;
long *plVar3;
long lVar4;
_List_node_base *p_Var5;
long *local_40;
long *local_38;
FastStack::pop(param_3);
PycRef<ASTNode>::cast<ASTChainStore>();
lVar2 = *param_2;
if (lVar2 != 0) {
*(int *)(lVar2 + 8) = *(int *)(lVar2 + 8) + 1;
}
/* try { // try from 00121eac to 00121eb5 has its CatchHandler @ 00121fa5 */
p_Var5 = (_List_node_base *)operator_new(0x18);
*(long *)(p_Var5 + 0x10) = lVar2;
std::__detail::_List_node_base::_M_hook(p_Var5);
local_40[5] = local_40[5] + 1;
if (local_40 != (long *)0x0) {
plVar3 = local_40 + 1;
*(int *)plVar3 = (int)*plVar3 + -1;
if ((int)*plVar3 == 0) {
(**(code **)(*local_40 + 8))();
}
}
if ((-1 < (long)*(int *)(param_3 + 0x18)) &&
(plVar3 = *(long **)(*(long *)param_3 + (long)*(int *)(param_3 + 0x18) * 8),
plVar3 != (long *)0x0)) {
iVar1 = *(int *)((long)plVar3 + 0xc);
if ((int)plVar3[1] == 0) {
(**(code **)(*plVar3 + 8))();
}
if (iVar1 != 0x30) {
local_38 = (long *)*param_1;
if (local_38 != (long *)0x0) {
*(int *)(local_38 + 1) = (int)local_38[1] + 1;
}
/* try { // try from 00121f54 to 00121f5f has its CatchHandler @ 00121f76 */
FastStack::push(param_3,&local_38);
if (local_38 == (long *)0x0) {
return;
}
plVar3 = local_38 + 1;
*(int *)plVar3 = (int)*plVar3 + -1;
if ((int)*plVar3 != 0) {
return;
}
(**(code **)(*local_38 + 8))();
return;
}
}
lVar2 = *param_4;
lVar4 = *param_1;
if (lVar4 != 0) {
*(int *)(lVar4 + 8) = *(int *)(lVar4 + 8) + 1;
}
/* try { // try from 00121f18 to 00121f21 has its CatchHandler @ 00121f8c */
p_Var5 = (_List_node_base *)operator_new(0x18);
*(long *)(p_Var5 + 0x10) = lVar4;
std::__detail::_List_node_base::_M_hook(p_Var5);
*(long *)(lVar2 + 0x30) = *(long *)(lVar2 + 0x30) + 1;
return;
}
| |
43,202 | my_convert | eloqsql/strings/ctype.c | uint32
my_convert(char *to, uint32 to_length, CHARSET_INFO *to_cs,
const char *from, uint32 from_length,
CHARSET_INFO *from_cs, uint *errors)
{
uint32 length, length2;
/*
If any of the character sets is not ASCII compatible,
immediately switch to slow mb_wc->wc_mb method.
*/
if ((to_cs->state | from_cs->state) & MY_CS_NONASCII)
return my_convert_using_func(to, to_length,
to_cs, to_cs->cset->wc_mb,
from, from_length,
from_cs, from_cs->cset->mb_wc,
errors);
length= length2= MY_MIN(to_length, from_length);
#if defined(__i386__) || defined(__x86_64__)
/*
Special loop for i386, it allows to refer to a
non-aligned memory block as UINT32, which makes
it possible to copy four bytes at once. This
gives about 10% performance improvement comparing
to byte-by-byte loop.
*/
for ( ; length >= 4; length-= 4, from+= 4, to+= 4)
{
if ((*(uint32*)from) & 0x80808080)
break;
*((uint32*) to)= *((const uint32*) from);
}
#endif /* __i386__ */
for (; ; *to++= *from++, length--)
{
if (!length)
{
*errors= 0;
return length2;
}
if (*((unsigned char*) from) > 0x7F) /* A non-ASCII character */
{
uint32 copied_length= length2 - length;
to_length-= copied_length;
from_length-= copied_length;
return copied_length + my_convert_using_func(to, to_length, to_cs,
to_cs->cset->wc_mb,
from, from_length, from_cs,
from_cs->cset->mb_wc,
errors);
}
}
DBUG_ASSERT(FALSE); // Should never get to here
return 0; // Make compiler happy
} | O0 | c | my_convert:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movq %r9, -0x38(%rbp)
movq -0x20(%rbp), %rax
movl 0xc(%rax), %eax
movq -0x38(%rbp), %rcx
orl 0xc(%rcx), %eax
andl $0x2000, %eax # imm = 0x2000
cmpl $0x0, %eax
je 0x760b3
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
movq -0x20(%rbp), %rdx
movq -0x20(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x30(%rax), %rcx
movq -0x28(%rbp), %r8
movl -0x2c(%rbp), %eax
movl %eax, %r9d
movq -0x38(%rbp), %r11
movq -0x38(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %r10
movq 0x10(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x75ea0
movl %eax, -0x4(%rbp)
jmp 0x761f9
movl -0x14(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jae 0x760c3
movl -0x14(%rbp), %eax
movl %eax, -0x48(%rbp)
jmp 0x760c9
movl -0x2c(%rbp), %eax
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %eax
movl %eax, -0x40(%rbp)
movl %eax, -0x3c(%rbp)
cmpl $0x4, -0x3c(%rbp)
jb 0x76119
movq -0x28(%rbp), %rax
movl (%rax), %eax
andl $0x80808080, %eax # imm = 0x80808080
cmpl $0x0, %eax
je 0x760ea
jmp 0x76119
movq -0x28(%rbp), %rax
movl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl -0x3c(%rbp), %eax
subl $0x4, %eax
movl %eax, -0x3c(%rbp)
movq -0x28(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x10(%rbp)
jmp 0x760d2
jmp 0x7611b
cmpl $0x0, -0x3c(%rbp)
jne 0x76136
movq 0x10(%rbp), %rax
movl $0x0, (%rax)
movl -0x40(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x761f9
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x7f, %eax
jle 0x761c7
movl -0x40(%rbp), %eax
subl -0x3c(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %ecx
movl -0x14(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x14(%rbp)
movl -0x44(%rbp), %ecx
movl -0x2c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x2c(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x4c(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
movq -0x20(%rbp), %rdx
movq -0x20(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x30(%rax), %rcx
movq -0x28(%rbp), %r8
movl -0x2c(%rbp), %eax
movl %eax, %r9d
movq -0x38(%rbp), %r11
movq -0x38(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %r10
movq 0x10(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x75ea0
movl %eax, %ecx
movl -0x4c(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x761f9
jmp 0x761c9
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb (%rax), %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movl -0x3c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x7611b
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_convert:
push rbp
mov rbp, rsp
sub rsp, 70h
mov rax, [rbp+arg_0]
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_2C], r8d
mov [rbp+var_38], r9
mov rax, [rbp+var_20]
mov eax, [rax+0Ch]
mov rcx, [rbp+var_38]
or eax, [rcx+0Ch]
and eax, 2000h
cmp eax, 0
jz short loc_760B3
mov rdi, [rbp+var_10]
mov eax, [rbp+var_14]
mov esi, eax
mov rdx, [rbp+var_20]
mov rax, [rbp+var_20]
mov rax, [rax+0B8h]
mov rcx, [rax+30h]
mov r8, [rbp+var_28]
mov eax, [rbp+var_2C]
mov r9d, eax
mov r11, [rbp+var_38]
mov rax, [rbp+var_38]
mov rax, [rax+0B8h]
mov r10, [rax+28h]
mov rax, [rbp+arg_0]
mov [rsp+70h+var_70], r11
mov [rsp+70h+var_68], r10
mov [rsp+70h+var_60], rax
call my_convert_using_func
mov [rbp+var_4], eax
jmp loc_761F9
loc_760B3:
mov eax, [rbp+var_14]
cmp eax, [rbp+var_2C]
jnb short loc_760C3
mov eax, [rbp+var_14]
mov [rbp+var_48], eax
jmp short loc_760C9
loc_760C3:
mov eax, [rbp+var_2C]
mov [rbp+var_48], eax
loc_760C9:
mov eax, [rbp+var_48]
mov [rbp+var_40], eax
mov [rbp+var_3C], eax
loc_760D2:
cmp [rbp+var_3C], 4
jb short loc_76119
mov rax, [rbp+var_28]
mov eax, [rax]
and eax, 80808080h
cmp eax, 0
jz short loc_760EA
jmp short loc_76119
loc_760EA:
mov rax, [rbp+var_28]
mov ecx, [rax]
mov rax, [rbp+var_10]
mov [rax], ecx
mov eax, [rbp+var_3C]
sub eax, 4
mov [rbp+var_3C], eax
mov rax, [rbp+var_28]
add rax, 4
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
add rax, 4
mov [rbp+var_10], rax
jmp short loc_760D2
loc_76119:
jmp short $+2
loc_7611B:
cmp [rbp+var_3C], 0
jnz short loc_76136
mov rax, [rbp+arg_0]
mov dword ptr [rax], 0
mov eax, [rbp+var_40]
mov [rbp+var_4], eax
jmp loc_761F9
loc_76136:
mov rax, [rbp+var_28]
movzx eax, byte ptr [rax]
cmp eax, 7Fh
jle loc_761C7
mov eax, [rbp+var_40]
sub eax, [rbp+var_3C]
mov [rbp+var_44], eax
mov ecx, [rbp+var_44]
mov eax, [rbp+var_14]
sub eax, ecx
mov [rbp+var_14], eax
mov ecx, [rbp+var_44]
mov eax, [rbp+var_2C]
sub eax, ecx
mov [rbp+var_2C], eax
mov eax, [rbp+var_44]
mov [rbp+var_4C], eax
mov rdi, [rbp+var_10]
mov eax, [rbp+var_14]
mov esi, eax
mov rdx, [rbp+var_20]
mov rax, [rbp+var_20]
mov rax, [rax+0B8h]
mov rcx, [rax+30h]
mov r8, [rbp+var_28]
mov eax, [rbp+var_2C]
mov r9d, eax
mov r11, [rbp+var_38]
mov rax, [rbp+var_38]
mov rax, [rax+0B8h]
mov r10, [rax+28h]
mov rax, [rbp+arg_0]
mov [rsp+70h+var_70], r11
mov [rsp+70h+var_68], r10
mov [rsp+70h+var_60], rax
call my_convert_using_func
mov ecx, eax
mov eax, [rbp+var_4C]
add eax, ecx
mov [rbp+var_4], eax
jmp short loc_761F9
loc_761C7:
jmp short $+2
loc_761C9:
mov rax, [rbp+var_28]
mov rcx, rax
add rcx, 1
mov [rbp+var_28], rcx
mov cl, [rax]
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 1
mov [rbp+var_10], rdx
mov [rax], cl
mov eax, [rbp+var_3C]
add eax, 0FFFFFFFFh
mov [rbp+var_3C], eax
jmp loc_7611B
loc_761F9:
mov eax, [rbp+var_4]
add rsp, 70h
pop rbp
retn
| long long my_convert(
long long a1,
unsigned int a2,
long long a3,
unsigned long long a4,
unsigned int a5,
long long a6,
_DWORD *a7)
{
char *v7; // rax
char v8; // cl
_BYTE *v9; // rax
unsigned int v11; // [rsp+28h] [rbp-48h]
unsigned int i; // [rsp+34h] [rbp-3Ch]
_DWORD *v13; // [rsp+48h] [rbp-28h]
_DWORD *v14; // [rsp+60h] [rbp-10h]
v14 = (_DWORD *)a1;
v13 = (_DWORD *)a4;
if ( ((*(_DWORD *)(a6 + 12) | *(_DWORD *)(a3 + 12)) & 0x2000) != 0 )
{
return (unsigned int)my_convert_using_func(
a1,
a2,
a3,
*(long long ( **)(long long, long long, long long, long long))(*(_QWORD *)(a3 + 184) + 48LL),
a4,
a5,
a6,
*(long long ( **)(long long, long long *, unsigned long long, unsigned long long))(*(_QWORD *)(a6 + 184) + 40LL),
a7);
}
else
{
if ( a2 >= a5 )
v11 = a5;
else
v11 = a2;
for ( i = v11; i >= 4 && (*v13 & 0x80808080) == 0; i -= 4 )
*v14++ = *v13++;
while ( 1 )
{
if ( !i )
{
*a7 = 0;
return v11;
}
if ( *(unsigned __int8 *)v13 > 0x7Fu )
break;
v7 = (char *)v13;
v13 = (_DWORD *)((char *)v13 + 1);
v8 = *v7;
v9 = v14;
v14 = (_DWORD *)((char *)v14 + 1);
*v9 = v8;
--i;
}
return (unsigned int)(my_convert_using_func(
(long long)v14,
a2 - (v11 - i),
a3,
*(long long ( **)(long long, long long, long long, long long))(*(_QWORD *)(a3 + 184) + 48LL),
(unsigned long long)v13,
a5 - (v11 - i),
a6,
*(long long ( **)(long long, long long *, unsigned long long, unsigned long long))(*(_QWORD *)(a6 + 184) + 40LL),
a7)
+ v11
- i);
}
}
| my_convert:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV RAX,qword ptr [RBP + 0x10]
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 dword ptr [RBP + -0x2c],R8D
MOV qword ptr [RBP + -0x38],R9
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0xc]
MOV RCX,qword ptr [RBP + -0x38]
OR EAX,dword ptr [RCX + 0xc]
AND EAX,0x2000
CMP EAX,0x0
JZ 0x001760b3
MOV RDI,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x14]
MOV ESI,EAX
MOV RDX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RCX,qword ptr [RAX + 0x30]
MOV R8,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RBP + -0x2c]
MOV R9D,EAX
MOV R11,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0xb8]
MOV R10,qword ptr [RAX + 0x28]
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RSP],R11
MOV qword ptr [RSP + 0x8],R10
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00175ea0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001761f9
LAB_001760b3:
MOV EAX,dword ptr [RBP + -0x14]
CMP EAX,dword ptr [RBP + -0x2c]
JNC 0x001760c3
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x48],EAX
JMP 0x001760c9
LAB_001760c3:
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x48],EAX
LAB_001760c9:
MOV EAX,dword ptr [RBP + -0x48]
MOV dword ptr [RBP + -0x40],EAX
MOV dword ptr [RBP + -0x3c],EAX
LAB_001760d2:
CMP dword ptr [RBP + -0x3c],0x4
JC 0x00176119
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX]
AND EAX,0x80808080
CMP EAX,0x0
JZ 0x001760ea
JMP 0x00176119
LAB_001760ea:
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],ECX
MOV EAX,dword ptr [RBP + -0x3c]
SUB EAX,0x4
MOV dword ptr [RBP + -0x3c],EAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x4
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x4
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001760d2
LAB_00176119:
JMP 0x0017611b
LAB_0017611b:
CMP dword ptr [RBP + -0x3c],0x0
JNZ 0x00176136
MOV RAX,qword ptr [RBP + 0x10]
MOV dword ptr [RAX],0x0
MOV EAX,dword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001761f9
LAB_00176136:
MOV RAX,qword ptr [RBP + -0x28]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x7f
JLE 0x001761c7
MOV EAX,dword ptr [RBP + -0x40]
SUB EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x44],EAX
MOV ECX,dword ptr [RBP + -0x44]
MOV EAX,dword ptr [RBP + -0x14]
SUB EAX,ECX
MOV dword ptr [RBP + -0x14],EAX
MOV ECX,dword ptr [RBP + -0x44]
MOV EAX,dword ptr [RBP + -0x2c]
SUB EAX,ECX
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,dword ptr [RBP + -0x44]
MOV dword ptr [RBP + -0x4c],EAX
MOV RDI,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x14]
MOV ESI,EAX
MOV RDX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RCX,qword ptr [RAX + 0x30]
MOV R8,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RBP + -0x2c]
MOV R9D,EAX
MOV R11,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0xb8]
MOV R10,qword ptr [RAX + 0x28]
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RSP],R11
MOV qword ptr [RSP + 0x8],R10
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00175ea0
MOV ECX,EAX
MOV EAX,dword ptr [RBP + -0x4c]
ADD EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001761f9
LAB_001761c7:
JMP 0x001761c9
LAB_001761c9:
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x28],RCX
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x3c]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x0017611b
LAB_001761f9:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x70
POP RBP
RET
|
uint my_convert(uint *param_1,uint param_2,long param_3,uint *param_4,uint param_5,long param_6,
int4 *param_7)
{
int iVar1;
int iVar2;
uint local_50;
uint local_44;
uint *local_30;
uint *local_18;
uint local_c;
if (((*(uint *)(param_3 + 0xc) | *(uint *)(param_6 + 0xc)) & 0x2000) == 0) {
local_50 = param_5;
if (param_2 < param_5) {
local_50 = param_2;
}
local_44 = local_50;
local_18 = param_1;
for (local_30 = param_4; (3 < local_44 && ((*local_30 & 0x80808080) == 0));
local_30 = local_30 + 1) {
*local_18 = *local_30;
local_44 = local_44 - 4;
local_18 = local_18 + 1;
}
for (; local_44 != 0; local_44 = local_44 - 1) {
if (0x7f < (byte)*local_30) {
iVar1 = local_50 - local_44;
iVar2 = my_convert_using_func
(local_18,param_2 - iVar1,param_3,
*(int8 *)(*(long *)(param_3 + 0xb8) + 0x30),local_30,
param_5 - iVar1,param_6,*(int8 *)(*(long *)(param_6 + 0xb8) + 0x28)
,param_7);
return iVar1 + iVar2;
}
*(byte *)local_18 = (byte)*local_30;
local_30 = (uint *)((long)local_30 + 1);
local_18 = (uint *)((long)local_18 + 1);
}
*param_7 = 0;
local_c = local_50;
}
else {
local_c = my_convert_using_func
(param_1,param_2,param_3,*(int8 *)(*(long *)(param_3 + 0xb8) + 0x30),
param_4,param_5,param_6,*(int8 *)(*(long *)(param_6 + 0xb8) + 0x28),
param_7);
}
return local_c;
}
| |
43,203 | minja::error_location_suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)::$_0::operator()[abi:cxx11](unsigned long) const | monkey531[P]llama/common/minja.hpp | static std::string error_location_suffix(const std::string & source, size_t pos) {
auto get_line = [&](size_t line) {
auto start = source.begin();
for (size_t i = 1; i < line; ++i) {
start = std::find(start, source.end(), '\n') + 1;
}
auto end = std::find(start, source.end(), '\n');
return std::string(start, end);
};
auto start = source.begin();
auto end = source.end();
auto it = start + pos;
auto line = std::count(start, it, '\n') + 1;
auto max_line = std::count(start, end, '\n') + 1;
auto col = pos - std::string(start, it).rfind('\n');
std::ostringstream out;
out << " at row " << line << ", column " << col << ":\n";
if (line > 1) out << get_line(line - 1) << "\n";
out << get_line(line) << "\n";
out << std::string(col - 1, ' ') << "^\n";
if (line < max_line) out << get_line(line + 1) << "\n";
return out.str();
} | O0 | cpp | minja::error_location_suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)::$_0::operator()[abi:cxx11](unsigned long) const:
subq $0xb8, %rsp
movq %rdi, 0x8(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xa0(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x18(%rsp)
movq (%rax), %rdi
callq 0x56310
movq %rax, 0x98(%rsp)
movq $0x1, 0x90(%rsp)
movq 0x90(%rsp), %rax
cmpq 0xa0(%rsp), %rax
jae 0x193b1e
movq 0x18(%rsp), %rax
movq 0x98(%rsp), %rcx
movq %rcx, 0x78(%rsp)
movq (%rax), %rdi
callq 0x57050
movq %rax, 0x70(%rsp)
movb $0xa, 0x6f(%rsp)
movq 0x78(%rsp), %rdi
movq 0x70(%rsp), %rsi
leaq 0x6f(%rsp), %rdx
callq 0x1281e0
movq %rax, 0x80(%rsp)
leaq 0x80(%rsp), %rdi
movl $0x1, %esi
callq 0xd8820
movq %rax, 0x88(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x90(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x90(%rsp)
jmp 0x193a85
movq 0x18(%rsp), %rax
movq 0x98(%rsp), %rcx
movq %rcx, 0x58(%rsp)
movq (%rax), %rdi
callq 0x57050
movq %rax, 0x50(%rsp)
movb $0xa, 0x4f(%rsp)
movq 0x58(%rsp), %rdi
movq 0x50(%rsp), %rsi
leaq 0x4f(%rsp), %rdx
callq 0x1281e0
movq %rax, 0x60(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x38(%rsp)
leaq 0x37(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x56f00
movq 0x8(%rsp), %rdi
movq (%rsp), %rcx
movq 0x40(%rsp), %rsi
movq 0x38(%rsp), %rdx
callq 0x9fb30
jmp 0x193b9a
leaq 0x37(%rsp), %rdi
callq 0x572b0
movq 0x10(%rsp), %rax
addq $0xb8, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
leaq 0x37(%rsp), %rdi
callq 0x572b0
movq 0x28(%rsp), %rdi
callq 0x56a10
nopw %cs:(%rax,%rax)
| _ZZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmENK3$_0clB5cxx11Em_0:
sub rsp, 0B8h
mov [rsp+0B8h+var_B0], rdi
mov rax, rdi
mov [rsp+0B8h+var_A8], rax
mov [rsp+0B8h+var_8], rdi
mov [rsp+0B8h+var_10], rsi
mov [rsp+0B8h+var_18], rdx
mov rax, [rsp+0B8h+var_10]
mov [rsp+0B8h+var_A0], rax
mov rdi, [rax]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv; std::string::begin(void)
mov [rsp+0B8h+var_20], rax
mov [rsp+0B8h+var_28], 1
loc_193A85:
mov rax, [rsp+0B8h+var_28]
cmp rax, [rsp+0B8h+var_18]
jnb loc_193B1E
mov rax, [rsp+0B8h+var_A0]
mov rcx, [rsp+0B8h+var_20]
mov [rsp+0B8h+var_40], rcx
mov rdi, [rax]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv; std::string::end(void)
mov [rsp+0B8h+var_48], rax
mov [rsp+0B8h+var_49], 0Ah
mov rdi, [rsp+0B8h+var_40]
mov rsi, [rsp+0B8h+var_48]
lea rdx, [rsp+0B8h+var_49]
call _ZSt4findIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEcET_SB_SB_RKT0_; std::find<__gnu_cxx::__normal_iterator<char const*,std::string>,char>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,char const&)
mov [rsp+0B8h+var_38], rax
lea rdi, [rsp+0B8h+var_38]
mov esi, 1
call _ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEplEl; __gnu_cxx::__normal_iterator<char const*,std::string>::operator+(long)
mov [rsp+0B8h+var_30], rax
mov rax, [rsp+0B8h+var_30]
mov [rsp+0B8h+var_20], rax
mov rax, [rsp+0B8h+var_28]
add rax, 1
mov [rsp+0B8h+var_28], rax
jmp loc_193A85
loc_193B1E:
mov rax, [rsp+0B8h+var_A0]
mov rcx, [rsp+0B8h+var_20]
mov [rsp+0B8h+var_60], rcx
mov rdi, [rax]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv; std::string::end(void)
mov [rsp+0B8h+var_68], rax
mov [rsp+0B8h+var_69], 0Ah
mov rdi, [rsp+0B8h+var_60]
mov rsi, [rsp+0B8h+var_68]
lea rdx, [rsp+0B8h+var_69]
call _ZSt4findIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEcET_SB_SB_RKT0_; std::find<__gnu_cxx::__normal_iterator<char const*,std::string>,char>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,char const&)
mov [rsp+0B8h+var_58], rax
mov rax, [rsp+0B8h+var_20]
mov [rsp+0B8h+var_78], rax
mov rax, [rsp+0B8h+var_58]
mov [rsp+0B8h+var_80], rax
lea rdi, [rsp+0B8h+var_81]
mov [rsp+0B8h+var_B8], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdi, [rsp+0B8h+var_B0]
mov rcx, [rsp+0B8h+var_B8]
mov rsi, [rsp+0B8h+var_78]
mov rdx, [rsp+0B8h+var_80]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IN9__gnu_cxx17__normal_iteratorIPKcS4_EEvEET_SB_RKS3_; std::string::basic_string<__gnu_cxx::__normal_iterator<char const*,std::string>,void>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<char> const&)
jmp short $+2
loc_193B9A:
lea rdi, [rsp+0B8h+var_81]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rax, [rsp+0B8h+var_A8]
add rsp, 0B8h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_20], rcx
mov [rsp+arg_1C], eax
lea rdi, [rsp+arg_2F]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rdi, [rsp+arg_20]
call __Unwind_Resume
| long long minja::error_location_suffix(std::string const&,unsigned long)::$_0::operator()[abi:cxx11](
long long a1,
_QWORD *a2,
unsigned long long a3)
{
long long v3; // rsi
char v5; // [rsp+37h] [rbp-81h] BYREF
long long v6; // [rsp+38h] [rbp-80h]
long long v7; // [rsp+40h] [rbp-78h]
char v8; // [rsp+4Fh] [rbp-69h] BYREF
long long v9; // [rsp+50h] [rbp-68h]
long long v10; // [rsp+58h] [rbp-60h]
long long v11; // [rsp+60h] [rbp-58h]
char v12; // [rsp+6Fh] [rbp-49h] BYREF
long long v13; // [rsp+70h] [rbp-48h]
long long v14; // [rsp+78h] [rbp-40h]
long long v15; // [rsp+80h] [rbp-38h] BYREF
long long v16; // [rsp+88h] [rbp-30h]
unsigned long long i; // [rsp+90h] [rbp-28h]
long long v18; // [rsp+98h] [rbp-20h]
unsigned long long v19; // [rsp+A0h] [rbp-18h]
_QWORD *v20; // [rsp+A8h] [rbp-10h]
long long v21; // [rsp+B0h] [rbp-8h]
v21 = a1;
v20 = a2;
v19 = a3;
v18 = std::string::begin(*a2);
for ( i = 1LL; i < v19; ++i )
{
v14 = v18;
v13 = std::string::end(*a2);
v12 = 10;
v15 = std::find<__gnu_cxx::__normal_iterator<char const*,std::string>,char>(v14, v13, (long long)&v12);
v16 = __gnu_cxx::__normal_iterator<char const*,std::string>::operator+(&v15, 1LL);
v18 = v16;
}
v10 = v18;
v9 = std::string::end(*a2);
v8 = 10;
v3 = v9;
v11 = std::find<__gnu_cxx::__normal_iterator<char const*,std::string>,char>(v10, v9, (long long)&v8);
v7 = v18;
v6 = v11;
std::allocator<char>::allocator(&v5, v3);
std::string::basic_string<__gnu_cxx::__normal_iterator<char const*,std::string>,void>(a1, v7, v6, (long long)&v5);
std::allocator<char>::~allocator(&v5);
return a1;
}
| |||
43,204 | minja::error_location_suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)::$_0::operator()[abi:cxx11](unsigned long) const | monkey531[P]llama/common/minja.hpp | static std::string error_location_suffix(const std::string & source, size_t pos) {
auto get_line = [&](size_t line) {
auto start = source.begin();
for (size_t i = 1; i < line; ++i) {
start = std::find(start, source.end(), '\n') + 1;
}
auto end = std::find(start, source.end(), '\n');
return std::string(start, end);
};
auto start = source.begin();
auto end = source.end();
auto it = start + pos;
auto line = std::count(start, it, '\n') + 1;
auto max_line = std::count(start, end, '\n') + 1;
auto col = pos - std::string(start, it).rfind('\n');
std::ostringstream out;
out << " at row " << line << ", column " << col << ":\n";
if (line > 1) out << get_line(line - 1) << "\n";
out << get_line(line) << "\n";
out << std::string(col - 1, ' ') << "^\n";
if (line < max_line) out << get_line(line + 1) << "\n";
return out.str();
} | O2 | cpp | minja::error_location_suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)::$_0::operator()[abi:cxx11](unsigned long) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq (%rsi), %rax
movq (%rax), %r14
pushq $0x1
popq %rbp
leaq 0x6(%rsp), %r13
movq (%r12), %rax
movq (%rax), %rsi
addq 0x8(%rax), %rsi
cmpq %r15, %rbp
jae 0x84d53
movb $0xa, 0x6(%rsp)
movq %r14, %rdi
movq %r13, %rdx
callq 0x64b36
movq %rax, %r14
incq %r14
incq %rbp
jmp 0x84d28
leaq 0x7(%rsp), %rdx
movb $0xa, (%rdx)
movq %r14, %rdi
callq 0x64b36
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x381f2
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmENK3$_0clB5cxx11Em_0:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rdx
mov r12, rsi
mov rbx, rdi
mov rax, [rsi]
mov r14, [rax]
push 1
pop rbp
lea r13, [rsp+38h+var_32]
loc_84D28:
mov rax, [r12]
mov rsi, [rax]
add rsi, [rax+8]
cmp rbp, r15
jnb short loc_84D53
mov [rsp+38h+var_32], 0Ah
mov rdi, r14
mov rdx, r13
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag)
mov r14, rax
inc r14
inc rbp
jmp short loc_84D28
loc_84D53:
lea rdx, [rsp+38h+var_31]
mov byte ptr [rdx], 0Ah
mov rdi, r14
call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag)
lea rcx, [rbx+10h]
mov [rbx], rcx
mov rdi, rbx
mov rsi, r14
mov rdx, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag)
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _QWORD * minja::error_location_suffix(std::string const&,unsigned long)::$_0::operator()[abi:cxx11](
_QWORD *a1,
_BYTE ***a2,
unsigned long long a3)
{
long long v3; // rax
_BYTE *v6; // r14
unsigned long long i; // rbp
long long v8; // rsi
_BYTE *v9; // rax
_WORD v11[25]; // [rsp+0h] [rbp-32h] BYREF
v11[0] = HIWORD(v3);
v6 = **a2;
for ( i = 1LL; ; ++i )
{
v8 = (long long)&(**a2)[(_QWORD)(*a2)[1]];
if ( i >= a3 )
break;
LOBYTE(v11[0]) = 10;
v6 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(
(long long)v6,
v8,
(char *)v11)
+ 1;
}
HIBYTE(v11[0]) = 10;
v9 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(
(long long)v6,
v8,
(char *)v11 + 1);
*a1 = a1 + 2;
std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>((long long)a1, v6, (long long)v9);
return a1;
}
| operator()[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RSI]
MOV R14,qword ptr [RAX]
PUSH 0x1
POP RBP
LEA R13,[RSP + 0x6]
LAB_00184d28:
MOV RAX,qword ptr [R12]
MOV RSI,qword ptr [RAX]
ADD RSI,qword ptr [RAX + 0x8]
CMP RBP,R15
JNC 0x00184d53
MOV byte ptr [RSP + 0x6],0xa
MOV RDI,R14
MOV RDX,R13
CALL 0x00164b36
MOV R14,RAX
INC R14
INC RBP
JMP 0x00184d28
LAB_00184d53:
LEA RDX,[RSP + 0x7]
MOV byte ptr [RDX],0xa
MOV RDI,R14
CALL 0x00164b36
LEA RCX,[RBX + 0x10]
MOV qword ptr [RBX],RCX
MOV RDI,RBX
MOV RSI,R14
MOV RDX,RAX
CALL 0x001381f2
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* operator()[abi:cxx11](unsigned long) const */
ulong minja::error_location_suffix(std::__cxx11::string_const&,unsigned_long)::$_0::
operator()[abi_cxx11_(ulong param_1)
{
int8 in_RAX;
long lVar1;
int8 uVar2;
ulong in_RDX;
ulong uVar3;
long *in_RSI;
long lVar4;
int8 uStack_38;
lVar1 = *(long *)*in_RSI;
uStack_38 = in_RAX;
for (uVar3 = 1; lVar4 = *(long *)*in_RSI + ((long *)*in_RSI)[1], uVar3 < in_RDX; uVar3 = uVar3 + 1
) {
uStack_38._0_7_ = CONCAT16(10,(int6)uStack_38);
lVar1 = std::
__find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>>
(lVar1,lVar4,(long)&uStack_38 + 6);
lVar1 = lVar1 + 1;
}
uStack_38 = CONCAT17(10,(int7)uStack_38);
uVar2 = std::
__find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>>
(lVar1,lVar4);
*(ulong *)param_1 = param_1 + 0x10;
std::__cxx11::string::_M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>
(param_1,lVar1,uVar2);
return param_1;
}
| |
43,205 | mi_mark_file_changed | eloqsql/storage/myisam/mi_locking.c | int _mi_mark_file_changed(MI_INFO *info)
{
uchar buff[3];
register MYISAM_SHARE *share=info->s;
DBUG_ENTER("_mi_mark_file_changed");
if (!(share->state.changed & STATE_CHANGED) || ! share->global_changed)
{
share->state.changed|=(STATE_CHANGED | STATE_NOT_ANALYZED |
STATE_NOT_OPTIMIZED_KEYS);
if (!share->global_changed)
{
share->global_changed=1;
share->state.open_count++;
}
if (!share->temporary)
{
mi_int2store(buff,share->state.open_count);
buff[2]=1; /* Mark that it's changed */
DBUG_RETURN((int)mysql_file_pwrite(share->kfile, buff, sizeof(buff),
sizeof(share->state.header),
MYF(MY_NABP)));
}
}
DBUG_RETURN(0);
} | O0 | c | mi_mark_file_changed:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movzbl 0xf0(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xb09bb
movq -0x20(%rbp), %rax
cmpb $0x0, 0x380(%rax)
jne 0xb0a61
movq -0x20(%rbp), %rax
movzbl 0xf0(%rax), %ecx
orl $0x19, %ecx
movb %cl, 0xf0(%rax)
movq -0x20(%rbp), %rax
cmpb $0x0, 0x380(%rax)
jne 0xb09fa
movq -0x20(%rbp), %rax
movb $0x1, 0x380(%rax)
movq -0x20(%rbp), %rax
movl 0xec(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xec(%rax)
movq -0x20(%rbp), %rax
cmpb $0x0, 0x382(%rax)
jne 0xb0a5f
movq -0x20(%rbp), %rax
movl 0xec(%rax), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movb %al, -0x12(%rbp)
movl -0x24(%rbp), %eax
shrl $0x8, %eax
movb %al, -0x13(%rbp)
movb $0x1, -0x11(%rbp)
movq -0x20(%rbp), %rax
movl 0x350(%rax), %edx
leaq -0x13(%rbp), %rcx
leaq 0xa1f49(%rip), %rdi # 0x152985
movl $0x26f, %esi # imm = 0x26F
movl $0x3, %r8d
movl $0x18, %r9d
movq $0x4, (%rsp)
callq 0xb0a80
movl %eax, -0x4(%rbp)
jmp 0xb0a6a
jmp 0xb0a61
jmp 0xb0a63
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _mi_mark_file_changed:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+0F0h]
and eax, 1
cmp eax, 0
jz short loc_B09BB
mov rax, [rbp+var_20]
cmp byte ptr [rax+380h], 0
jnz loc_B0A61
loc_B09BB:
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+0F0h]
or ecx, 19h
mov [rax+0F0h], cl
mov rax, [rbp+var_20]
cmp byte ptr [rax+380h], 0
jnz short loc_B09FA
mov rax, [rbp+var_20]
mov byte ptr [rax+380h], 1
mov rax, [rbp+var_20]
mov ecx, [rax+0ECh]
add ecx, 1
mov [rax+0ECh], ecx
loc_B09FA:
mov rax, [rbp+var_20]
cmp byte ptr [rax+382h], 0
jnz short loc_B0A5F
mov rax, [rbp+var_20]
mov eax, [rax+0ECh]
mov [rbp+var_24], eax
mov eax, [rbp+var_24]
mov [rbp+var_12], al
mov eax, [rbp+var_24]
shr eax, 8
mov [rbp+var_13], al
mov [rbp+var_11], 1
mov rax, [rbp+var_20]
mov edx, [rax+350h]
lea rcx, [rbp+var_13]
lea rdi, aWorkspaceLlm4b_27; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 26Fh
mov r8d, 3
mov r9d, 18h
mov [rsp+30h+var_30], 4
call inline_mysql_file_pwrite_1
mov [rbp+var_4], eax
jmp short loc_B0A6A
loc_B0A5F:
jmp short $+2
loc_B0A61:
jmp short $+2
loc_B0A63:
mov [rbp+var_4], 0
loc_B0A6A:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long mi_mark_file_changed(long long *a1)
{
__int16 v1; // kr00_2
long long v3; // [rsp+10h] [rbp-20h]
_BYTE v4[3]; // [rsp+1Dh] [rbp-13h] BYREF
long long *v5; // [rsp+20h] [rbp-10h]
v5 = a1;
v3 = *a1;
if ( (*(_BYTE *)(*a1 + 240) & 1) != 0 && *(_BYTE *)(v3 + 896) )
return 0;
*(_BYTE *)(v3 + 240) |= 0x19u;
if ( !*(_BYTE *)(v3 + 896) )
{
*(_BYTE *)(v3 + 896) = 1;
++*(_DWORD *)(v3 + 236);
}
if ( *(_BYTE *)(v3 + 898) )
{
return 0;
}
else
{
v1 = *(_DWORD *)(v3 + 236);
v4[0] = HIBYTE(v1);
v4[1] = v1;
v4[2] = 1;
return (unsigned int)inline_mysql_file_pwrite_1(
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_locking.c",
623,
*(_DWORD *)(v3 + 848),
(unsigned int)v4,
3,
24,
4LL);
}
}
| _mi_mark_file_changed:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0xf0]
AND EAX,0x1
CMP EAX,0x0
JZ 0x001b09bb
MOV RAX,qword ptr [RBP + -0x20]
CMP byte ptr [RAX + 0x380],0x0
JNZ 0x001b0a61
LAB_001b09bb:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0xf0]
OR ECX,0x19
MOV byte ptr [RAX + 0xf0],CL
MOV RAX,qword ptr [RBP + -0x20]
CMP byte ptr [RAX + 0x380],0x0
JNZ 0x001b09fa
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x380],0x1
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0xec]
ADD ECX,0x1
MOV dword ptr [RAX + 0xec],ECX
LAB_001b09fa:
MOV RAX,qword ptr [RBP + -0x20]
CMP byte ptr [RAX + 0x382],0x0
JNZ 0x001b0a5f
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0xec]
MOV dword ptr [RBP + -0x24],EAX
MOV EAX,dword ptr [RBP + -0x24]
MOV byte ptr [RBP + -0x12],AL
MOV EAX,dword ptr [RBP + -0x24]
SHR EAX,0x8
MOV byte ptr [RBP + -0x13],AL
MOV byte ptr [RBP + -0x11],0x1
MOV RAX,qword ptr [RBP + -0x20]
MOV EDX,dword ptr [RAX + 0x350]
LEA RCX,[RBP + -0x13]
LEA RDI,[0x252985]
MOV ESI,0x26f
MOV R8D,0x3
MOV R9D,0x18
MOV qword ptr [RSP],0x4
CALL 0x001b0a80
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001b0a6a
LAB_001b0a5f:
JMP 0x001b0a61
LAB_001b0a61:
JMP 0x001b0a63
LAB_001b0a63:
MOV dword ptr [RBP + -0x4],0x0
LAB_001b0a6a:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 _mi_mark_file_changed(long *param_1)
{
long lVar1;
int4 uVar2;
int1 local_1b;
int1 local_1a;
int1 local_19;
long *local_18;
lVar1 = *param_1;
if (((*(byte *)(lVar1 + 0xf0) & 1) == 0) || (*(char *)(lVar1 + 0x380) == '\0')) {
*(byte *)(lVar1 + 0xf0) = *(byte *)(lVar1 + 0xf0) | 0x19;
if (*(char *)(lVar1 + 0x380) == '\0') {
*(int1 *)(lVar1 + 0x380) = 1;
*(int *)(lVar1 + 0xec) = *(int *)(lVar1 + 0xec) + 1;
}
if (*(char *)(lVar1 + 0x382) == '\0') {
local_1a = (int1)*(int4 *)(lVar1 + 0xec);
local_1b = (int1)((uint)*(int4 *)(lVar1 + 0xec) >> 8);
local_19 = 1;
local_18 = param_1;
uVar2 = inline_mysql_file_pwrite
("/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_locking.c",
0x26f,*(int4 *)(lVar1 + 0x350),&local_1b,3,0x18,4);
return uVar2;
}
}
return 0;
}
| |
43,206 | mi_mark_file_changed | eloqsql/storage/myisam/mi_locking.c | int _mi_mark_file_changed(MI_INFO *info)
{
uchar buff[3];
register MYISAM_SHARE *share=info->s;
DBUG_ENTER("_mi_mark_file_changed");
if (!(share->state.changed & STATE_CHANGED) || ! share->global_changed)
{
share->state.changed|=(STATE_CHANGED | STATE_NOT_ANALYZED |
STATE_NOT_OPTIMIZED_KEYS);
if (!share->global_changed)
{
share->global_changed=1;
share->state.open_count++;
}
if (!share->temporary)
{
mi_int2store(buff,share->state.open_count);
buff[2]=1; /* Mark that it's changed */
DBUG_RETURN((int)mysql_file_pwrite(share->kfile, buff, sizeof(buff),
sizeof(share->state.header),
MYF(MY_NABP)));
}
}
DBUG_RETURN(0);
} | O3 | c | mi_mark_file_changed:
movq (%rdi), %rax
movb 0xf0(%rax), %cl
movb 0x380(%rax), %dl
testb $0x1, %cl
jne 0x7c355
orb $0x19, %cl
movb %cl, 0xf0(%rax)
testb %dl, %dl
jne 0x7c36f
jmp 0x7c362
testb %dl, %dl
jne 0x7c378
orb $0x19, %cl
movb %cl, 0xf0(%rax)
movb $0x1, 0x380(%rax)
incl 0xec(%rax)
cmpb $0x0, 0x382(%rax)
je 0x7c37b
xorl %eax, %eax
retq
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x60, %rsp
movl 0xec(%rax), %ecx
movb %cl, -0x12(%rbp)
movb %ch, -0x13(%rbp)
movb $0x1, -0x11(%rbp)
movl 0x350(%rax), %ebx
leaq 0x308c6d(%rip), %rax # 0x385010
movq (%rax), %rax
leaq -0x68(%rbp), %rdi
movl %ebx, %esi
movl $0x7, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x7c3e0
leaq -0x13(%rbp), %rsi
movl $0x3, %edx
movl $0x18, %ecx
movl $0x4, %r8d
movl %ebx, %edi
callq 0xa00b2
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq -0x13(%rbp), %rdx
leaq -0x20(%rbp), %r14
movq %rax, %rdi
movl %ebx, %esi
movq %r14, %rcx
callq 0x2da39
movq (%r14), %rax
jmp 0x7c3d7
| _mi_mark_file_changed:
mov rax, [rdi]
mov cl, [rax+0F0h]
mov dl, [rax+380h]
test cl, 1
jnz short loc_7C355
or cl, 19h
mov [rax+0F0h], cl
test dl, dl
jnz short loc_7C36F
jmp short loc_7C362
loc_7C355:
test dl, dl
jnz short loc_7C378
or cl, 19h
mov [rax+0F0h], cl
loc_7C362:
mov byte ptr [rax+380h], 1
inc dword ptr [rax+0ECh]
loc_7C36F:
cmp byte ptr [rax+382h], 0
jz short loc_7C37B
loc_7C378:
xor eax, eax
retn
loc_7C37B:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 60h
mov ecx, [rax+0ECh]
mov [rbp-12h], cl
mov [rbp-13h], ch
mov byte ptr [rbp-11h], 1
mov ebx, [rax+350h]
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp-68h]
mov esi, ebx
mov edx, 7
call qword ptr [rax+158h]
test rax, rax
jnz short loc_7C3E0
lea rsi, [rbp-13h]
mov edx, 3
mov ecx, 18h
mov r8d, 4
mov edi, ebx
call my_pwrite
loc_7C3D7:
add rsp, 60h
pop rbx
pop r14
pop rbp
retn
loc_7C3E0:
lea rdx, [rbp-13h]
lea r14, [rbp-20h]
mov rdi, rax
mov esi, ebx
mov rcx, r14
call _mi_mark_file_changed_cold_1
mov rax, [r14]
jmp short loc_7C3D7
| long long mi_mark_file_changed(long long *a1)
{
long long v1; // rax
char v2; // cl
char v3; // dl
__int16 v5; // kr00_2
unsigned int v6; // ebx
long long v7; // rax
long long v8; // [rsp-70h] [rbp-70h] BYREF
long long v9; // [rsp-28h] [rbp-28h] BYREF
_BYTE v10[27]; // [rsp-1Bh] [rbp-1Bh] BYREF
v1 = *a1;
v2 = *(_BYTE *)(*a1 + 240);
v3 = *(_BYTE *)(*a1 + 896);
if ( (v2 & 1) != 0 )
{
if ( v3 )
return 0LL;
*(_BYTE *)(v1 + 240) = v2 | 0x19;
}
else
{
*(_BYTE *)(v1 + 240) = v2 | 0x19;
if ( v3 )
goto LABEL_7;
}
*(_BYTE *)(v1 + 896) = 1;
++*(_DWORD *)(v1 + 236);
LABEL_7:
if ( *(_BYTE *)(v1 + 898) )
return 0LL;
v5 = *(_DWORD *)(v1 + 236);
v10[0] = HIBYTE(v5);
v10[1] = v5;
v10[2] = 1;
v6 = *(_DWORD *)(v1 + 848);
v7 = ((long long ( *)(long long *, _QWORD, long long))PSI_server[43])(&v8, v6, 7LL);
if ( !v7 )
return my_pwrite(v6, v10, 3LL, 24LL, 4LL);
mi_mark_file_changed_cold_1(v7, v6, (long long)v10, &v9);
return v9;
}
| _mi_mark_file_changed:
MOV RAX,qword ptr [RDI]
MOV CL,byte ptr [RAX + 0xf0]
MOV DL,byte ptr [RAX + 0x380]
TEST CL,0x1
JNZ 0x0017c355
OR CL,0x19
MOV byte ptr [RAX + 0xf0],CL
TEST DL,DL
JNZ 0x0017c36f
JMP 0x0017c362
LAB_0017c355:
TEST DL,DL
JNZ 0x0017c378
OR CL,0x19
MOV byte ptr [RAX + 0xf0],CL
LAB_0017c362:
MOV byte ptr [RAX + 0x380],0x1
INC dword ptr [RAX + 0xec]
LAB_0017c36f:
CMP byte ptr [RAX + 0x382],0x0
JZ 0x0017c37b
LAB_0017c378:
XOR EAX,EAX
RET
LAB_0017c37b:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x60
MOV ECX,dword ptr [RAX + 0xec]
MOV byte ptr [RBP + -0x12],CL
MOV byte ptr [RBP + -0x13],CH
MOV byte ptr [RBP + -0x11],0x1
MOV EBX,dword ptr [RAX + 0x350]
LEA RAX,[0x485010]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x68]
MOV ESI,EBX
MOV EDX,0x7
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x0017c3e0
LEA RSI,[RBP + -0x13]
MOV EDX,0x3
MOV ECX,0x18
MOV R8D,0x4
MOV EDI,EBX
CALL 0x001a00b2
LAB_0017c3d7:
ADD RSP,0x60
POP RBX
POP R14
POP RBP
RET
LAB_0017c3e0:
LEA RDX,[RBP + -0x13]
LEA R14,[RBP + -0x20]
MOV RDI,RAX
MOV ESI,EBX
MOV RCX,R14
CALL 0x0012da39
MOV RAX,qword ptr [R14]
JMP 0x0017c3d7
|
int8 _mi_mark_file_changed(long *param_1)
{
byte bVar1;
int4 uVar2;
long lVar3;
int1 local_70 [72];
int8 local_28;
int1 local_1b;
int1 local_1a;
int1 local_19;
lVar3 = *param_1;
bVar1 = *(byte *)(lVar3 + 0xf0);
if ((bVar1 & 1) == 0) {
*(byte *)(lVar3 + 0xf0) = bVar1 | 0x19;
if (*(char *)(lVar3 + 0x380) != '\0') goto LAB_0017c36f;
}
else {
if (*(char *)(lVar3 + 0x380) != '\0') {
return 0;
}
*(byte *)(lVar3 + 0xf0) = bVar1 | 0x19;
}
*(int1 *)(lVar3 + 0x380) = 1;
*(int *)(lVar3 + 0xec) = *(int *)(lVar3 + 0xec) + 1;
LAB_0017c36f:
if (*(char *)(lVar3 + 0x382) != '\0') {
return 0;
}
local_1a = (int1)*(int4 *)(lVar3 + 0xec);
local_1b = (int1)((uint)*(int4 *)(lVar3 + 0xec) >> 8);
local_19 = 1;
uVar2 = *(int4 *)(lVar3 + 0x350);
lVar3 = (**(code **)(PSI_server + 0x158))(local_70,uVar2,7);
if (lVar3 == 0) {
local_28 = my_pwrite(uVar2,&local_1b,3,0x18,4);
}
else {
_mi_mark_file_changed_cold_1(lVar3,uVar2,&local_1b,&local_28);
}
return local_28;
}
| |
43,207 | void spdlog::logger::log_<unsigned int&>(spdlog::source_loc, spdlog::level::level_enum, fmt::v8::basic_string_view<char>, unsigned int&) | aimrt_mujoco_sim/_deps/spdlog_lib-src/include/spdlog/logger.h | void log_(source_loc loc, level::level_enum lvl, string_view_t fmt, Args &&...args)
{
bool log_enabled = should_log(lvl);
bool traceback_enabled = tracer_.enabled();
if (!log_enabled && !traceback_enabled)
{
return;
}
SPDLOG_TRY
{
memory_buf_t buf;
fmt::detail::vformat_to(buf, fmt, fmt::make_format_args(args...));
details::log_msg log_msg(loc, name_, lvl, string_view_t(buf.data(), buf.size()));
log_it_(log_msg, log_enabled, traceback_enabled);
} | O0 | c | void spdlog::logger::log_<unsigned int&>(spdlog::source_loc, spdlog::level::level_enum, fmt::v8::basic_string_view<char>, unsigned int&):
subq $0x338, %rsp # imm = 0x338
leaq 0x340(%rsp), %rax
movq %rax, 0x68(%rsp)
movq %rdx, 0x2f8(%rsp)
movq %rcx, 0x300(%rsp)
movq %rdi, 0x2f0(%rsp)
movl %esi, 0x2ec(%rsp)
movq %r8, 0x2e0(%rsp)
movq 0x2f0(%rsp), %rdi
movq %rdi, 0x70(%rsp)
movl 0x2ec(%rsp), %esi
callq 0x98610
movq 0x70(%rsp), %rdi
andb $0x1, %al
movb %al, 0x2df(%rsp)
addq $0x68, %rdi
callq 0xcb310
andb $0x1, %al
movb %al, 0x2de(%rsp)
testb $0x1, 0x2df(%rsp)
jne 0xc4a2d
testb $0x1, 0x2de(%rsp)
jne 0xc4a2d
jmp 0xc4d3b
leaq 0x1b7(%rsp), %rdi
movq %rdi, 0x60(%rsp)
callq 0x19dd0
movq 0x60(%rsp), %rsi
leaq 0x1b8(%rsp), %rdi
callq 0x986c0
jmp 0xc4a53
leaq 0x1b7(%rsp), %rdi
callq 0x19de0
movups 0x2f8(%rsp), %xmm0
movaps %xmm0, 0x190(%rsp)
movq 0x2e0(%rsp), %rdi
callq 0xc4e80
movq %rdx, 0x50(%rsp)
movq %rax, 0x58(%rsp)
jmp 0xc4a89
movq 0x50(%rsp), %rax
movq 0x58(%rsp), %rcx
movq %rcx, 0x170(%rsp)
movq %rax, 0x178(%rsp)
leaq 0x180(%rsp), %rax
movq %rax, 0x310(%rsp)
leaq 0x170(%rsp), %rax
movq %rax, 0x308(%rsp)
movq 0x310(%rsp), %rcx
movq 0x308(%rsp), %rax
movq %rax, 0x318(%rsp)
movq 0x318(%rsp), %rax
movq %rcx, 0x330(%rsp)
movq $0x4, 0x328(%rsp)
movq %rax, 0x320(%rsp)
movq 0x330(%rsp), %rax
movq 0x328(%rsp), %rcx
movq %rcx, (%rax)
movq 0x320(%rsp), %rcx
movq %rcx, 0x8(%rax)
leaq 0x168(%rsp), %rdi
callq 0x99090
jmp 0xc4b2d
movq 0x190(%rsp), %rsi
movq 0x198(%rsp), %rdx
movq 0x180(%rsp), %rcx
movq 0x188(%rsp), %r8
movq 0x168(%rsp), %r9
leaq 0x1b8(%rsp), %rdi
callq 0x98730
jmp 0xc4b64
movq 0x70(%rsp), %rsi
movq 0x68(%rsp), %rax
movq 0x10(%rax), %rcx
movq %rcx, 0x100(%rsp)
movups (%rax), %xmm0
movaps %xmm0, 0xf0(%rsp)
addq $0x8, %rsi
leaq 0xe0(%rsp), %rdi
callq 0x990b0
movl 0x2ec(%rsp), %eax
movl %eax, 0x4c(%rsp)
leaq 0x1b8(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x99100
movq 0x38(%rsp), %rdi
movq %rax, 0x40(%rsp)
callq 0x99110
movq 0x40(%rsp), %rsi
movq %rax, %rdx
leaq 0xd0(%rsp), %rdi
callq 0x99120
movl 0x4c(%rsp), %ecx
movq 0xe0(%rsp), %rsi
movq 0xe8(%rsp), %rdx
movq 0xd0(%rsp), %r8
movq 0xd8(%rsp), %r9
movq 0x100(%rsp), %rdi
movq %rsp, %rax
movq %rdi, 0x10(%rax)
movaps 0xf0(%rsp), %xmm0
movups %xmm0, (%rax)
leaq 0x108(%rsp), %rdi
callq 0xd21d0
jmp 0xc4c24
movq 0x70(%rsp), %rdi
movzbl 0x2de(%rsp), %ecx
movzbl 0x2df(%rsp), %edx
andl $0x1, %edx
andl $0x1, %ecx
leaq 0x108(%rsp), %rsi
callq 0xd2dc0
jmp 0xc4c4e
leaq 0x1b8(%rsp), %rdi
callq 0x99150
jmp 0xc4d3b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a8(%rsp)
movl %eax, 0x1a4(%rsp)
leaq 0x1b7(%rsp), %rdi
callq 0x19de0
jmp 0xc4ca4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a8(%rsp)
movl %eax, 0x1a4(%rsp)
leaq 0x1b8(%rsp), %rdi
callq 0x99150
movl 0x1a4(%rsp), %eax
movl $0x2, %ecx
cmpl %ecx, %eax
jne 0xc4d43
movq 0x1a8(%rsp), %rdi
callq 0x1a020
movq %rax, 0xa0(%rsp)
movq 0xa0(%rsp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq %rax, 0x28(%rsp)
leaq 0x7f(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x19dd0
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
leaq 0x80(%rsp), %rdi
callq 0x1c7d0
jmp 0xc4d0b
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0xd3190
jmp 0xc4d1f
leaq 0x80(%rsp), %rdi
callq 0x19e70
leaq 0x7f(%rsp), %rdi
callq 0x19de0
callq 0x1a050
addq $0x338, %rsp # imm = 0x338
retq
movq 0x1a8(%rsp), %rdi
callq 0x1a020
leaq 0xaf(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x19dd0
movq 0x20(%rsp), %rdx
leaq 0x4db53(%rip), %rsi # 0x1128c1
leaq 0xb0(%rsp), %rdi
callq 0x1c7d0
jmp 0xc4d7d
movq 0x70(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0xd3190
jmp 0xc4d91
leaq 0xb0(%rsp), %rdi
callq 0x19e70
leaq 0xaf(%rsp), %rdi
callq 0x19de0
callq 0x1a040
jmp 0xc4e77
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a8(%rsp)
movl %eax, 0x1a4(%rsp)
jmp 0xc4dec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a8(%rsp)
movl %eax, 0x1a4(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x19e70
leaq 0xaf(%rsp), %rdi
callq 0x19de0
jmp 0xc4e0f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a8(%rsp)
movl %eax, 0x1a4(%rsp)
callq 0x1a050
jmp 0xc4e16
jmp 0xc4e62
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a8(%rsp)
movl %eax, 0x1a4(%rsp)
jmp 0xc4e4f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1a8(%rsp)
movl %eax, 0x1a4(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x19e70
leaq 0x7f(%rsp), %rdi
callq 0x19de0
callq 0x1a050
jmp 0xc4e60
jmp 0xc4e62
movq 0x1a8(%rsp), %rdi
callq 0x19e80
movq %rax, %rdi
callq 0x1d880
nopw (%rax,%rax)
| _ZN6spdlog6logger4log_IJmEEEvNS_10source_locENS_5level10level_enumEN3fmt2v817basic_string_viewIcEEDpOT_:
sub rsp, 338h
lea rax, [rsp+338h+arg_0]
mov [rsp+338h+var_2D0], rax
mov qword ptr [rsp+338h+var_40], rdx
mov qword ptr [rsp+338h+var_40+8], rcx
mov [rsp+338h+var_48], rdi
mov [rsp+338h+var_4C], esi
mov [rsp+338h+var_58], r8
mov rdi, [rsp+338h+var_48]
mov [rsp+338h+var_2C8], rdi
mov esi, [rsp+338h+var_4C]
call _ZNK6spdlog6logger10should_logENS_5level10level_enumE; spdlog::logger::should_log(spdlog::level::level_enum)
mov rdi, [rsp+338h+var_2C8]
and al, 1
mov [rsp+338h+var_59], al
add rdi, 68h ; 'h'; this
call _ZNK6spdlog7details10backtracer7enabledEv; spdlog::details::backtracer::enabled(void)
and al, 1
mov [rsp+338h+var_5A], al
test [rsp+338h+var_59], 1
jnz short loc_C4A2D
test [rsp+338h+var_5A], 1
jnz short loc_C4A2D
jmp loc_C4D3B
loc_C4A2D:
lea rdi, [rsp+338h+var_181]
mov [rsp+338h+var_2D8], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, [rsp+338h+var_2D8]
lea rdi, [rsp+338h+var_180]
call _ZN3fmt2v819basic_memory_bufferIcLm250ESaIcEEC2ERKS2_; fmt::v8::basic_memory_buffer<char,250ul,std::allocator<char>>::basic_memory_buffer(std::allocator<char> const&)
jmp short $+2
loc_C4A53:
lea rdi, [rsp+338h+var_181]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
movups xmm0, [rsp+338h+var_40]
movaps [rsp+338h+var_1A8], xmm0
mov rdi, [rsp+338h+var_58]
call _ZN3fmt2v816make_format_argsINS0_20basic_format_contextINS0_8appenderEcEEJmEEENS0_16format_arg_storeIT_JDpT0_EEEDpRKS7_; fmt::v8::make_format_args<fmt::v8::basic_format_context<fmt::v8::appender,char>,ulong>(ulong const&)
mov [rsp+338h+var_2E8], rdx
mov [rsp+338h+var_2E0], rax
jmp short $+2
loc_C4A89:
mov rax, [rsp+338h+var_2E8]
mov rcx, [rsp+338h+var_2E0]
mov [rsp+338h+var_1C8], rcx
mov [rsp+338h+var_1C0], rax
lea rax, [rsp+338h+var_1B8]
mov [rsp+338h+var_28], rax
lea rax, [rsp+338h+var_1C8]
mov [rsp+338h+var_30], rax
mov rcx, [rsp+338h+var_28]
mov rax, [rsp+338h+var_30]
mov [rsp+338h+var_20], rax
mov rax, [rsp+338h+var_20]
mov [rsp+338h+var_8], rcx
mov [rsp+338h+var_10], 4
mov [rsp+338h+var_18], rax
mov rax, [rsp+338h+var_8]
mov rcx, [rsp+338h+var_10]
mov [rax], rcx
mov rcx, [rsp+338h+var_18]
mov [rax+8], rcx
lea rdi, [rsp+338h+var_1D0]; this
call _ZN3fmt2v86detail10locale_refC2Ev; fmt::v8::detail::locale_ref::locale_ref(void)
jmp short $+2
loc_C4B2D:
mov rsi, qword ptr [rsp+338h+var_1A8]
mov rdx, qword ptr [rsp+338h+var_1A8+8]
mov rcx, [rsp+338h+var_1B8]
mov r8, [rsp+338h+var_1B0]
mov r9, [rsp+338h+var_1D0]
lea rdi, [rsp+338h+var_180]
call _ZN3fmt2v86detail10vformat_toIcEEvRNS1_6bufferIT_EENS0_17basic_string_viewIS4_EENS0_17basic_format_argsINS0_20basic_format_contextINSt11conditionalIXsr3std7is_sameINS0_13type_identityIS4_E4typeEcEE5valueENS0_8appenderESt20back_insert_iteratorINS3_ISE_EEEE4typeESE_EEEENS1_10locale_refE
jmp short $+2
loc_C4B64:
mov rsi, [rsp+338h+var_2C8]
mov rax, [rsp+338h+var_2D0]
mov rcx, [rax+10h]
mov [rsp+338h+var_238], rcx
movups xmm0, xmmword ptr [rax]
movaps [rsp+338h+var_248], xmm0
add rsi, 8
lea rdi, [rsp+338h+var_258]
call _ZN3fmt2v817basic_string_viewIcEC2ISt11char_traitsIcESaIcEEERKNSt7__cxx1112basic_stringIcT_T0_EE; fmt::v8::basic_string_view<char>::basic_string_view<std::char_traits<char>,std::allocator<char>>(std::string const&)
mov eax, [rsp+338h+var_4C]
mov [rsp+338h+var_2EC], eax
lea rdi, [rsp+338h+var_180]
mov [rsp+338h+var_300], rdi
call _ZN3fmt2v86detail6bufferIcE4dataEv; fmt::v8::detail::buffer<char>::data(void)
mov rdi, [rsp+338h+var_300]
mov [rsp+338h+var_2F8], rax
call _ZNK3fmt2v86detail6bufferIcE4sizeEv; fmt::v8::detail::buffer<char>::size(void)
mov rsi, [rsp+338h+var_2F8]
mov rdx, rax
lea rdi, [rsp+338h+var_268]
call _ZN3fmt2v817basic_string_viewIcEC2EPKcm; fmt::v8::basic_string_view<char>::basic_string_view(char const*,ulong)
mov ecx, [rsp+338h+var_2EC]
mov rsi, [rsp+338h+var_258]
mov rdx, [rsp+338h+var_250]
mov r8, [rsp+338h+var_268]
mov r9, [rsp+338h+var_260]
mov rdi, [rsp+338h+var_238]
mov rax, rsp
mov [rax+10h], rdi
movaps xmm0, [rsp+338h+var_248]
movups xmmword ptr [rax], xmm0
lea rdi, [rsp+338h+var_230]
call _ZN6spdlog7details7log_msgC2ENS_10source_locEN3fmt2v817basic_string_viewIcEENS_5level10level_enumES6_; spdlog::details::log_msg::log_msg(spdlog::source_loc,fmt::v8::basic_string_view<char>,spdlog::level::level_enum,fmt::v8::basic_string_view<char>)
jmp short $+2
loc_C4C24:
mov rdi, [rsp+338h+var_2C8]
movzx ecx, [rsp+338h+var_5A]
movzx edx, [rsp+338h+var_59]
and edx, 1
and ecx, 1
lea rsi, [rsp+338h+var_230]
call _ZN6spdlog6logger7log_it_ERKNS_7details7log_msgEbb; spdlog::logger::log_it_(spdlog::details::log_msg const&,bool,bool)
jmp short $+2
loc_C4C4E:
lea rdi, [rsp+338h+var_180]
call _ZN3fmt2v819basic_memory_bufferIcLm250ESaIcEED2Ev; fmt::v8::basic_memory_buffer<char,250ul,std::allocator<char>>::~basic_memory_buffer()
jmp loc_C4D3B
mov rcx, rax
mov eax, edx
mov [rsp+338h+var_190], rcx
mov [rsp+338h+var_194], eax
lea rdi, [rsp+338h+var_181]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_C4CA4
mov rcx, rax
mov eax, edx
mov [rsp+338h+var_190], rcx
mov [rsp+338h+var_194], eax
lea rdi, [rsp+338h+var_180]
call _ZN3fmt2v819basic_memory_bufferIcLm250ESaIcEED2Ev; fmt::v8::basic_memory_buffer<char,250ul,std::allocator<char>>::~basic_memory_buffer()
loc_C4CA4:
mov eax, [rsp+338h+var_194]
mov ecx, 2
cmp eax, ecx
jnz loc_C4D43
mov rdi, [rsp+338h+var_190]; void *
call ___cxa_begin_catch
mov [rsp+338h+var_298], rax
mov rdi, [rsp+338h+var_298]
mov rax, [rdi]
mov rax, [rax+10h]
call rax
mov [rsp+338h+var_310], rax
lea rdi, [rsp+338h+var_2B9]
mov [rsp+338h+var_308], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, [rsp+338h+var_310]
mov rdx, [rsp+338h+var_308]
lea rdi, [rsp+338h+var_2B8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_C4D0B:
mov rdi, [rsp+338h+var_2C8]
lea rsi, [rsp+338h+var_2B8]
call _ZN6spdlog6logger12err_handler_ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; spdlog::logger::err_handler_(std::string const&)
jmp short $+2
loc_C4D1F:
lea rdi, [rsp+338h+var_2B8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+338h+var_2B9]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
call ___cxa_end_catch
loc_C4D3B:
add rsp, 338h
retn
loc_C4D43:
mov rdi, [rsp+338h+var_190]; void *
call ___cxa_begin_catch
lea rdi, [rsp+338h+var_289]
mov [rsp+338h+var_318], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rsp+338h+var_318]
lea rsi, aRethrowingUnkn; "Rethrowing unknown exception in logger"
lea rdi, [rsp+338h+var_288]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_C4D7D:
mov rdi, [rsp+338h+var_2C8]
lea rsi, [rsp+338h+var_288]
call _ZN6spdlog6logger12err_handler_ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; spdlog::logger::err_handler_(std::string const&)
jmp short $+2
loc_C4D91:
lea rdi, [rsp+338h+var_288]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+338h+var_289]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
call ___cxa_rethrow
| char spdlog::logger::log_<unsigned long>(
long long a1,
int a2,
unsigned long long a3,
unsigned long long a4,
long long a5,
long long a6,
__int128 a7,
long long a8)
{
char result; // al
long long v9; // rdx
long long v10; // rax
long long v11; // [rsp+40h] [rbp-2F8h]
int v12; // [rsp+4Ch] [rbp-2ECh]
long long v13; // [rsp+D0h] [rbp-268h] BYREF
long long v14; // [rsp+D8h] [rbp-260h]
long long v15; // [rsp+E0h] [rbp-258h] BYREF
long long v16; // [rsp+E8h] [rbp-250h]
__int128 v17; // [rsp+F0h] [rbp-248h]
long long v18; // [rsp+100h] [rbp-238h]
_BYTE v19[96]; // [rsp+108h] [rbp-230h] BYREF
long long v20; // [rsp+168h] [rbp-1D0h] BYREF
_QWORD v21[2]; // [rsp+170h] [rbp-1C8h] BYREF
long long v22; // [rsp+180h] [rbp-1B8h] BYREF
_QWORD *v23; // [rsp+188h] [rbp-1B0h]
unsigned __int128 v24; // [rsp+190h] [rbp-1A8h]
char v25; // [rsp+1B7h] [rbp-181h] BYREF
_QWORD v26[36]; // [rsp+1B8h] [rbp-180h] BYREF
char v27; // [rsp+2DEh] [rbp-5Ah]
bool should_log; // [rsp+2DFh] [rbp-59h]
long long v29; // [rsp+2E0h] [rbp-58h]
int v30; // [rsp+2ECh] [rbp-4Ch]
long long v31; // [rsp+2F0h] [rbp-48h]
unsigned __int128 v32; // [rsp+2F8h] [rbp-40h]
_QWORD *v33; // [rsp+308h] [rbp-30h]
long long *v34; // [rsp+310h] [rbp-28h]
_QWORD *v35; // [rsp+318h] [rbp-20h]
_QWORD *v36; // [rsp+320h] [rbp-18h]
long long v37; // [rsp+328h] [rbp-10h]
long long *v38; // [rsp+330h] [rbp-8h]
v32 = __PAIR128__(a4, a3);
v31 = a1;
v30 = a2;
v29 = a5;
should_log = spdlog::logger::should_log(a1, a2);
result = spdlog::details::backtracer::enabled((spdlog::details::backtracer *)(a1 + 104)) & 1;
v27 = result;
if ( should_log || (v27 & 1) != 0 )
{
std::allocator<char>::allocator();
fmt::v8::basic_memory_buffer<char,250ul,std::allocator<char>>::basic_memory_buffer(v26, (long long)&v25);
std::allocator<char>::~allocator(&v25);
v24 = v32;
v21[0] = fmt::v8::make_format_args<fmt::v8::basic_format_context<fmt::v8::appender,char>,unsigned long>(v29);
v21[1] = v9;
v34 = &v22;
v33 = v21;
v35 = v21;
v38 = &v22;
v37 = 4LL;
v36 = v21;
v22 = 4LL;
v23 = v21;
fmt::v8::detail::locale_ref::locale_ref((fmt::v8::detail::locale_ref *)&v20);
fmt::v8::detail::vformat_to<char>((long long)v26, v24, *((long long *)&v24 + 1), v22, (long long)v23, v20);
v18 = a8;
v17 = a7;
fmt::v8::basic_string_view<char>::basic_string_view<std::char_traits<char>,std::allocator<char>>(&v15, a1 + 8);
v12 = v30;
v11 = fmt::v8::detail::buffer<char>::data((long long)v26);
v10 = fmt::v8::detail::buffer<char>::size((long long)v26);
fmt::v8::basic_string_view<char>::basic_string_view(&v13, v11, v10);
spdlog::details::log_msg::log_msg((unsigned int)v19, v15, v16, v12, v13, v14, v17, v18);
spdlog::logger::log_it_(a1, v19, should_log, v27 & 1);
return fmt::v8::basic_memory_buffer<char,250ul,std::allocator<char>>::~basic_memory_buffer((long long)v26);
}
return result;
}
| log_<unsigned_long>:
SUB RSP,0x338
LEA RAX,[RSP + 0x340]
MOV qword ptr [RSP + 0x68],RAX
MOV qword ptr [RSP + 0x2f8],RDX
MOV qword ptr [RSP + 0x300],RCX
MOV qword ptr [RSP + 0x2f0],RDI
MOV dword ptr [RSP + 0x2ec],ESI
MOV qword ptr [RSP + 0x2e0],R8
MOV RDI,qword ptr [RSP + 0x2f0]
MOV qword ptr [RSP + 0x70],RDI
MOV ESI,dword ptr [RSP + 0x2ec]
CALL 0x00198610
MOV RDI,qword ptr [RSP + 0x70]
AND AL,0x1
MOV byte ptr [RSP + 0x2df],AL
ADD RDI,0x68
CALL 0x001cb310
AND AL,0x1
MOV byte ptr [RSP + 0x2de],AL
TEST byte ptr [RSP + 0x2df],0x1
JNZ 0x001c4a2d
TEST byte ptr [RSP + 0x2de],0x1
JNZ 0x001c4a2d
JMP 0x001c4d3b
LAB_001c4a2d:
LEA RDI,[RSP + 0x1b7]
MOV qword ptr [RSP + 0x60],RDI
CALL 0x00119dd0
MOV RSI,qword ptr [RSP + 0x60]
LAB_001c4a44:
LEA RDI,[RSP + 0x1b8]
CALL 0x001986c0
JMP 0x001c4a53
LAB_001c4a53:
LEA RDI,[RSP + 0x1b7]
CALL 0x00119de0
MOVUPS XMM0,xmmword ptr [RSP + 0x2f8]
MOVAPS xmmword ptr [RSP + 0x190],XMM0
MOV RDI,qword ptr [RSP + 0x2e0]
LAB_001c4a78:
CALL 0x001c4e80
MOV qword ptr [RSP + 0x50],RDX
MOV qword ptr [RSP + 0x58],RAX
JMP 0x001c4a89
LAB_001c4a89:
MOV RAX,qword ptr [RSP + 0x50]
MOV RCX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x170],RCX
MOV qword ptr [RSP + 0x178],RAX
LEA RAX,[RSP + 0x180]
MOV qword ptr [RSP + 0x310],RAX
LEA RAX,[RSP + 0x170]
MOV qword ptr [RSP + 0x308],RAX
MOV RCX,qword ptr [RSP + 0x310]
MOV RAX,qword ptr [RSP + 0x308]
MOV qword ptr [RSP + 0x318],RAX
MOV RAX,qword ptr [RSP + 0x318]
MOV qword ptr [RSP + 0x330],RCX
MOV qword ptr [RSP + 0x328],0x4
MOV qword ptr [RSP + 0x320],RAX
MOV RAX,qword ptr [RSP + 0x330]
MOV RCX,qword ptr [RSP + 0x328]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + 0x320]
MOV qword ptr [RAX + 0x8],RCX
LEA RDI,[RSP + 0x168]
CALL 0x00199090
JMP 0x001c4b2d
LAB_001c4b2d:
MOV RSI,qword ptr [RSP + 0x190]
MOV RDX,qword ptr [RSP + 0x198]
MOV RCX,qword ptr [RSP + 0x180]
MOV R8,qword ptr [RSP + 0x188]
MOV R9,qword ptr [RSP + 0x168]
LEA RDI,[RSP + 0x1b8]
CALL 0x00198730
JMP 0x001c4b64
LAB_001c4b64:
MOV RSI,qword ptr [RSP + 0x70]
MOV RAX,qword ptr [RSP + 0x68]
MOV RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x100],RCX
MOVUPS XMM0,xmmword ptr [RAX]
MOVAPS xmmword ptr [RSP + 0xf0],XMM0
ADD RSI,0x8
LEA RDI,[RSP + 0xe0]
CALL 0x001990b0
MOV EAX,dword ptr [RSP + 0x2ec]
MOV dword ptr [RSP + 0x4c],EAX
LEA RDI,[RSP + 0x1b8]
MOV qword ptr [RSP + 0x38],RDI
CALL 0x00199100
MOV RDI,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x40],RAX
CALL 0x00199110
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,RAX
LEA RDI,[RSP + 0xd0]
CALL 0x00199120
MOV ECX,dword ptr [RSP + 0x4c]
MOV RSI,qword ptr [RSP + 0xe0]
MOV RDX,qword ptr [RSP + 0xe8]
MOV R8,qword ptr [RSP + 0xd0]
MOV R9,qword ptr [RSP + 0xd8]
MOV RDI,qword ptr [RSP + 0x100]
MOV RAX,RSP
MOV qword ptr [RAX + 0x10],RDI
MOVAPS XMM0,xmmword ptr [RSP + 0xf0]
MOVUPS xmmword ptr [RAX],XMM0
LEA RDI,[RSP + 0x108]
CALL 0x001d21d0
JMP 0x001c4c24
LAB_001c4c24:
MOV RDI,qword ptr [RSP + 0x70]
MOVZX ECX,byte ptr [RSP + 0x2de]
MOVZX EDX,byte ptr [RSP + 0x2df]
AND EDX,0x1
AND ECX,0x1
LEA RSI,[RSP + 0x108]
CALL 0x001d2dc0
LAB_001c4c4c:
JMP 0x001c4c4e
LAB_001c4c4e:
LEA RDI,[RSP + 0x1b8]
CALL 0x00199150
JMP 0x001c4d3b
LAB_001c4d3b:
ADD RSP,0x338
RET
|
/* void spdlog::logger::log_<unsigned long>(spdlog::source_loc, spdlog::level::level_enum,
fmt::v8::basic_string_view<char>, unsigned long&&) */
void spdlog::logger::log_<unsigned_long>
(logger *param_1,int4 param_2,int8 param_3,int8 param_4,
ulong *param_5,int8 param_6,int8 param_7,int8 param_8,
int8 param_9)
{
int4 uVar1;
char *pcVar2;
ulong uVar3;
int8 local_268;
int8 local_260;
int8 local_258;
int8 local_250;
int8 local_248;
int8 uStack_240;
int8 local_238;
log_msg local_230 [96];
int8 local_1d0;
int1 local_1c8 [16];
int8 local_1b8;
int1 *local_1b0;
int8 local_1a8;
int8 uStack_1a0;
allocator<char> local_181;
allocator local_180 [294];
byte local_5a;
byte local_59;
ulong *local_58;
int4 local_4c;
logger *local_48;
int8 local_40;
int8 uStack_38;
int1 *local_30;
int8 *local_28;
int1 *local_20;
int1 *local_18;
int8 local_10;
int8 *local_8;
local_58 = param_5;
local_4c = param_2;
local_48 = param_1;
local_40 = param_3;
uStack_38 = param_4;
local_59 = should_log(param_1,param_2);
local_59 = local_59 & 1;
local_5a = details::backtracer::enabled((backtracer *)(param_1 + 0x68));
local_5a = local_5a & 1;
if (((local_59 & 1) != 0) || (local_5a != 0)) {
std::allocator<char>::allocator();
/* try { // try from 001c4a44 to 001c4a50 has its CatchHandler @ 001c4c60 */
fmt::v8::basic_memory_buffer<char,250ul,std::allocator<char>>::basic_memory_buffer(local_180);
std::allocator<char>::~allocator(&local_181);
local_1a8 = local_40;
uStack_1a0 = uStack_38;
/* try { // try from 001c4a78 to 001c4c4b has its CatchHandler @ 001c4c83 */
local_1c8 = fmt::v8::
make_format_args<fmt::v8::basic_format_context<fmt::v8::appender,char>,unsigned_long>
(local_58);
local_28 = &local_1b8;
local_1b0 = local_1c8;
local_10 = 4;
local_1b8 = 4;
local_30 = local_1b0;
local_20 = local_1b0;
local_18 = local_1b0;
local_8 = local_28;
fmt::v8::detail::locale_ref::locale_ref((locale_ref *)&local_1d0);
fmt::v8::detail::vformat_to<char>(local_180,local_1a8,uStack_1a0,local_1b8,local_1b0,local_1d0);
local_238 = param_9;
local_248 = param_7;
uStack_240 = param_8;
fmt::v8::basic_string_view<char>::basic_string_view<std::char_traits<char>,std::allocator<char>>
((string *)&local_258);
uVar1 = local_4c;
pcVar2 = (char *)fmt::v8::detail::buffer<char>::data((buffer<char> *)local_180);
uVar3 = fmt::v8::detail::buffer<char>::size((buffer<char> *)local_180);
fmt::v8::basic_string_view<char>::basic_string_view
((basic_string_view<char> *)&local_268,pcVar2,uVar3);
details::log_msg::log_msg
(local_230,local_258,local_250,uVar1,local_268,local_260,(int4)local_248,
(int4)uStack_240,local_238);
log_it_(param_1,local_230,(bool)(local_59 & 1),(bool)(local_5a & 1));
fmt::v8::basic_memory_buffer<char,250ul,std::allocator<char>>::~basic_memory_buffer
((basic_memory_buffer<char,250ul,std::allocator<char>> *)local_180);
}
return;
}
| |
43,208 | testing::internal::GoogleTestFailureException::GoogleTestFailureException(testing::TestPartResult const&) | giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc | GoogleTestFailureException::GoogleTestFailureException(
const TestPartResult& failure)
: ::std::runtime_error(PrintTestPartResultToString(failure).c_str()) {} | O1 | cpp | testing::internal::GoogleTestFailureException::GoogleTestFailureException(testing::TestPartResult const&):
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x209f1
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x8a40
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x209b9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x84e0
leaq 0x37f38(%rip), %rax # 0x588f8
movq %rax, (%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x209e9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x84e0
movq %rbx, %rdi
callq 0x8990
| _ZN7testing8internal26GoogleTestFailureExceptionC2ERKNS_14TestPartResultE:
push r14
push rbx
sub rsp, 28h
mov rbx, rdi
lea r14, [rsp+38h+var_30]
mov rdi, r14
call _ZN7testing8internalL27PrintTestPartResultToStringB5cxx11ERKNS_14TestPartResultE; testing::internal::PrintTestPartResultToString(testing::TestPartResult const&)
mov rsi, [r14]; char *
mov rdi, rbx; this
call __ZNSt13runtime_errorC2EPKc; std::runtime_error::runtime_error(char const*)
lea rax, [rsp+38h+var_20]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_209B9
mov rsi, [rsp+38h+var_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_209B9:
lea rax, off_588F8
mov [rbx], rax
add rsp, 28h
pop rbx
pop r14
retn
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_209E9
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_209E9:
mov rdi, rbx
call __Unwind_Resume
| void (** testing::internal::GoogleTestFailureException::GoogleTestFailureException(
testing::internal::GoogleTestFailureException *this,
const testing::TestPartResult *a2))(std::runtime_error *__hidden this)
{
void (**result)(std::runtime_error *__hidden); // rax
char *v3; // [rsp+8h] [rbp-30h] BYREF
long long v4; // [rsp+18h] [rbp-20h] BYREF
testing::internal::PrintTestPartResultToString[abi:cxx11](&v3, a2);
std::runtime_error::runtime_error(this, v3);
if ( v3 != (char *)&v4 )
operator delete(v3, v4 + 1);
result = off_588F8;
*(_QWORD *)this = off_588F8;
return result;
}
| GoogleTestFailureException:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
LEA R14,[RSP + 0x8]
MOV RDI,R14
CALL 0x001209f1
MOV RSI,qword ptr [R14]
LAB_00120996:
MOV RDI,RBX
CALL 0x00108a40
LAB_0012099e:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001209b9
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001084e0
LAB_001209b9:
LEA RAX,[0x1588f8]
MOV qword ptr [RBX],RAX
ADD RSP,0x28
POP RBX
POP R14
RET
|
/* testing::internal::GoogleTestFailureException::GoogleTestFailureException(testing::TestPartResult
const&) */
void __thiscall
testing::internal::GoogleTestFailureException::GoogleTestFailureException
(GoogleTestFailureException *this,TestPartResult *param_1)
{
long *local_30 [2];
long local_20 [2];
PrintTestPartResultToString_abi_cxx11_((internal *)local_30,param_1);
/* try { // try from 00120996 to 0012099d has its CatchHandler @ 001209cb */
std::runtime_error::runtime_error((runtime_error *)this,(char *)local_30[0]);
if (local_30[0] != local_20) {
operator_delete(local_30[0],local_20[0] + 1);
}
*(int ***)this = &PTR__runtime_error_001588f8;
return;
}
| |
43,209 | nglog::tools::GetStackTrace(void**, int, int) | ng-log[P]ng-log/src/stacktrace_generic-inl.h | int GetStackTrace(void** result, int max_depth, int skip_count) {
static const int kStackLength = 64;
void* stack[kStackLength];
int size;
size = backtrace(stack, kStackLength);
skip_count++; // we want to skip the current frame as well
int result_count = size - skip_count;
if (result_count < 0) {
result_count = 0;
}
if (result_count > max_depth) {
result_count = max_depth;
}
for (int i = 0; i < result_count; i++) {
result[i] = stack[i + skip_count];
}
return result_count;
} | O0 | c | nglog::tools::GetStackTrace(void**, int, int):
pushq %rbp
movq %rsp, %rbp
subq $0x220, %rsp # imm = 0x220
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
leaq -0x210(%rbp), %rdi
movl $0x40, %esi
callq 0x9b10
movl %eax, -0x214(%rbp)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
movl -0x214(%rbp), %eax
subl -0x10(%rbp), %eax
movl %eax, -0x218(%rbp)
cmpl $0x0, -0x218(%rbp)
jge 0x4b2a7
movl $0x0, -0x218(%rbp)
movl -0x218(%rbp), %eax
cmpl -0xc(%rbp), %eax
jle 0x4b2bb
movl -0xc(%rbp), %eax
movl %eax, -0x218(%rbp)
movl $0x0, -0x21c(%rbp)
movl -0x21c(%rbp), %eax
cmpl -0x218(%rbp), %eax
jge 0x4b306
movl -0x21c(%rbp), %eax
addl -0x10(%rbp), %eax
cltq
movq -0x210(%rbp,%rax,8), %rdx
movq -0x8(%rbp), %rax
movslq -0x21c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x21c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x21c(%rbp)
jmp 0x4b2c5
movl -0x218(%rbp), %eax
addq $0x220, %rsp # imm = 0x220
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
| _ZN5nglog5tools13GetStackTraceEPPvii:
push rbp
mov rbp, rsp
sub rsp, 220h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], edx
lea rdi, [rbp+var_210]
mov esi, 40h ; '@'
call _backtrace
mov [rbp+var_214], eax
mov eax, [rbp+var_10]
add eax, 1
mov [rbp+var_10], eax
mov eax, [rbp+var_214]
sub eax, [rbp+var_10]
mov [rbp+var_218], eax
cmp [rbp+var_218], 0
jge short loc_4B2A7
mov [rbp+var_218], 0
loc_4B2A7:
mov eax, [rbp+var_218]
cmp eax, [rbp+var_C]
jle short loc_4B2BB
mov eax, [rbp+var_C]
mov [rbp+var_218], eax
loc_4B2BB:
mov [rbp+var_21C], 0
loc_4B2C5:
mov eax, [rbp+var_21C]
cmp eax, [rbp+var_218]
jge short loc_4B306
mov eax, [rbp+var_21C]
add eax, [rbp+var_10]
cdqe
mov rdx, [rbp+rax*8+var_210]
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_21C]
mov [rax+rcx*8], rdx
mov eax, [rbp+var_21C]
add eax, 1
mov [rbp+var_21C], eax
jmp short loc_4B2C5
loc_4B306:
mov eax, [rbp+var_218]
add rsp, 220h
pop rbp
retn
| long long nglog::tools::GetStackTrace(nglog::tools *this, void **a2, int a3)
{
int i; // [rsp+4h] [rbp-21Ch]
signed int v5; // [rsp+8h] [rbp-218h]
int v6; // [rsp+Ch] [rbp-214h]
_QWORD v7[64]; // [rsp+10h] [rbp-210h] BYREF
int v8; // [rsp+210h] [rbp-10h]
int v9; // [rsp+214h] [rbp-Ch]
nglog::tools *v10; // [rsp+218h] [rbp-8h]
v10 = this;
v9 = (int)a2;
v8 = a3;
v6 = backtrace(v7, 64LL);
++v8;
v5 = v6 - v8;
if ( v6 - v8 < 0 )
v5 = 0;
if ( v5 > v9 )
v5 = v9;
for ( i = 0; i < v5; ++i )
*((_QWORD *)v10 + i) = v7[v8 + i];
return (unsigned int)v5;
}
| GetStackTrace:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x220
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],EDX
LEA RDI,[RBP + -0x210]
MOV ESI,0x40
CALL 0x00109b10
MOV dword ptr [RBP + -0x214],EAX
MOV EAX,dword ptr [RBP + -0x10]
ADD EAX,0x1
MOV dword ptr [RBP + -0x10],EAX
MOV EAX,dword ptr [RBP + -0x214]
SUB EAX,dword ptr [RBP + -0x10]
MOV dword ptr [RBP + -0x218],EAX
CMP dword ptr [RBP + -0x218],0x0
JGE 0x0014b2a7
MOV dword ptr [RBP + -0x218],0x0
LAB_0014b2a7:
MOV EAX,dword ptr [RBP + -0x218]
CMP EAX,dword ptr [RBP + -0xc]
JLE 0x0014b2bb
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x218],EAX
LAB_0014b2bb:
MOV dword ptr [RBP + -0x21c],0x0
LAB_0014b2c5:
MOV EAX,dword ptr [RBP + -0x21c]
CMP EAX,dword ptr [RBP + -0x218]
JGE 0x0014b306
MOV EAX,dword ptr [RBP + -0x21c]
ADD EAX,dword ptr [RBP + -0x10]
CDQE
MOV RDX,qword ptr [RBP + RAX*0x8 + -0x210]
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0x21c]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV EAX,dword ptr [RBP + -0x21c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x21c],EAX
JMP 0x0014b2c5
LAB_0014b306:
MOV EAX,dword ptr [RBP + -0x218]
ADD RSP,0x220
POP RBP
RET
|
/* nglog::tools::GetStackTrace(void**, int, int) */
int nglog::tools::GetStackTrace(void **param_1,int param_2,int param_3)
{
int local_224;
int local_220;
int8 local_218 [64];
int local_18;
int local_14;
void **local_10;
local_18 = param_3;
local_14 = param_2;
local_10 = param_1;
local_220 = backtrace(local_218,0x40);
local_18 = local_18 + 1;
local_220 = local_220 - local_18;
if (local_220 < 0) {
local_220 = 0;
}
if (local_14 < local_220) {
local_220 = local_14;
}
for (local_224 = 0; local_224 < local_220; local_224 = local_224 + 1) {
local_10[local_224] = (void *)local_218[local_224 + local_18];
}
return local_220;
}
| |
43,210 | nglog::tools::GetStackTrace(void**, int, int) | ng-log[P]ng-log/src/stacktrace_generic-inl.h | int GetStackTrace(void** result, int max_depth, int skip_count) {
static const int kStackLength = 64;
void* stack[kStackLength];
int size;
size = backtrace(stack, kStackLength);
skip_count++; // we want to skip the current frame as well
int result_count = size - skip_count;
if (result_count < 0) {
result_count = 0;
}
if (result_count > max_depth) {
result_count = max_depth;
}
for (int i = 0; i < result_count; i++) {
result[i] = stack[i + skip_count];
}
return result_count;
} | O1 | c | nglog::tools::GetStackTrace(void**, int, int):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x200, %rsp # imm = 0x200
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
movq %rsp, %rdi
movl $0x40, %esi
callq 0x7800
movl %eax, %ecx
incl %ebp
subl %ebp, %ecx
xorl %eax, %eax
testl %ecx, %ecx
cmovgl %ecx, %eax
cmpl %r14d, %eax
cmovgel %r14d, %eax
testl %eax, %eax
jle 0x212f7
movslq %ebp, %rdx
movl %eax, %ecx
leaq (%rsp,%rdx,8), %rdx
xorl %esi, %esi
movq (%rdx,%rsi,8), %rdi
movq %rdi, (%rbx,%rsi,8)
incq %rsi
cmpq %rsi, %rcx
jne 0x212e7
addq $0x200, %rsp # imm = 0x200
popq %rbx
popq %r14
popq %rbp
retq
nop
| _ZN5nglog5tools13GetStackTraceEPPvii:
push rbp
push r14
push rbx
sub rsp, 200h
mov ebp, edx
mov r14d, esi
mov rbx, rdi
mov rdi, rsp
mov esi, 40h ; '@'
call _backtrace
mov ecx, eax
inc ebp
sub ecx, ebp
xor eax, eax
test ecx, ecx
cmovg eax, ecx
cmp eax, r14d
cmovge eax, r14d
test eax, eax
jle short loc_212F7
movsxd rdx, ebp
mov ecx, eax
lea rdx, [rsp+rdx*8+218h+var_218]
xor esi, esi
loc_212E7:
mov rdi, [rdx+rsi*8]
mov [rbx+rsi*8], rdi
inc rsi
cmp rcx, rsi
jnz short loc_212E7
loc_212F7:
add rsp, 200h
pop rbx
pop r14
pop rbp
retn
| long long nglog::tools::GetStackTrace(nglog::tools *this, void **a2, int a3)
{
int v3; // ebp
int v4; // ecx
long long result; // rax
long long v6; // rsi
_QWORD v7[67]; // [rsp+0h] [rbp-218h] BYREF
v3 = a3 + 1;
v4 = backtrace(v7, 64LL) - (a3 + 1);
result = 0LL;
if ( v4 > 0 )
result = (unsigned int)v4;
if ( (int)result >= (int)a2 )
result = (unsigned int)a2;
if ( (int)result > 0 )
{
v6 = 0LL;
do
{
*((_QWORD *)this + v6) = v7[v3 + v6];
++v6;
}
while ( (unsigned int)result != v6 );
}
return result;
}
| GetStackTrace:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x200
MOV EBP,EDX
MOV R14D,ESI
MOV RBX,RDI
MOV RDI,RSP
MOV ESI,0x40
CALL 0x00107800
MOV ECX,EAX
INC EBP
SUB ECX,EBP
XOR EAX,EAX
TEST ECX,ECX
CMOVG EAX,ECX
CMP EAX,R14D
CMOVGE EAX,R14D
TEST EAX,EAX
JLE 0x001212f7
MOVSXD RDX,EBP
MOV ECX,EAX
LEA RDX,[RSP + RDX*0x8]
XOR ESI,ESI
LAB_001212e7:
MOV RDI,qword ptr [RDX + RSI*0x8]
MOV qword ptr [RBX + RSI*0x8],RDI
INC RSI
CMP RCX,RSI
JNZ 0x001212e7
LAB_001212f7:
ADD RSP,0x200
POP RBX
POP R14
POP RBP
RET
|
/* nglog::tools::GetStackTrace(void**, int, int) */
void nglog::tools::GetStackTrace(void **param_1,int param_2,int param_3)
{
int iVar1;
uint uVar2;
uint uVar3;
ulong uVar4;
int8 auStack_218 [64];
iVar1 = backtrace(auStack_218);
uVar3 = iVar1 - (param_3 + 1);
uVar2 = 0;
if (0 < (int)uVar3) {
uVar2 = uVar3;
}
if (param_2 <= (int)uVar2) {
uVar2 = param_2;
}
if (0 < (int)uVar2) {
uVar4 = 0;
do {
param_1[uVar4] = (void *)auStack_218[(long)(param_3 + 1) + uVar4];
uVar4 = uVar4 + 1;
} while (uVar2 != uVar4);
}
return;
}
| |
43,211 | nglog::tools::GetStackTrace(void**, int, int) | ng-log[P]ng-log/src/stacktrace_generic-inl.h | int GetStackTrace(void** result, int max_depth, int skip_count) {
static const int kStackLength = 64;
void* stack[kStackLength];
int size;
size = backtrace(stack, kStackLength);
skip_count++; // we want to skip the current frame as well
int result_count = size - skip_count;
if (result_count < 0) {
result_count = 0;
}
if (result_count > max_depth) {
result_count = max_depth;
}
for (int i = 0; i < result_count; i++) {
result[i] = stack[i + skip_count];
}
return result_count;
} | O3 | c | nglog::tools::GetStackTrace(void**, int, int):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x200, %rsp # imm = 0x200
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
movq %rsp, %rdi
movl $0x40, %esi
callq 0x7800
movl %eax, %ecx
incl %ebp
subl %ebp, %ecx
xorl %eax, %eax
testl %ecx, %ecx
cmovgl %ecx, %eax
cmpl %r14d, %eax
cmovgel %r14d, %eax
testl %eax, %eax
jle 0x2106b
movslq %ebp, %rdx
movl %eax, %ecx
leaq (%rsp,%rdx,8), %rdx
xorl %esi, %esi
movq (%rdx,%rsi,8), %rdi
movq %rdi, (%rbx,%rsi,8)
incq %rsi
cmpq %rsi, %rcx
jne 0x2105b
addq $0x200, %rsp # imm = 0x200
popq %rbx
popq %r14
popq %rbp
retq
nop
| _ZN5nglog5tools13GetStackTraceEPPvii:
push rbp
push r14
push rbx
sub rsp, 200h
mov ebp, edx
mov r14d, esi
mov rbx, rdi
mov rdi, rsp
mov esi, 40h ; '@'
call _backtrace
mov ecx, eax
inc ebp
sub ecx, ebp
xor eax, eax
test ecx, ecx
cmovg eax, ecx
cmp eax, r14d
cmovge eax, r14d
test eax, eax
jle short loc_2106B
movsxd rdx, ebp
mov ecx, eax
lea rdx, [rsp+rdx*8+218h+var_218]
xor esi, esi
loc_2105B:
mov rdi, [rdx+rsi*8]
mov [rbx+rsi*8], rdi
inc rsi
cmp rcx, rsi
jnz short loc_2105B
loc_2106B:
add rsp, 200h
pop rbx
pop r14
pop rbp
retn
| long long nglog::tools::GetStackTrace(nglog::tools *this, void **a2, int a3)
{
int v3; // ebp
int v4; // ecx
long long result; // rax
long long v6; // rsi
_QWORD v7[67]; // [rsp+0h] [rbp-218h] BYREF
v3 = a3 + 1;
v4 = backtrace(v7, 64LL) - (a3 + 1);
result = 0LL;
if ( v4 > 0 )
result = (unsigned int)v4;
if ( (int)result >= (int)a2 )
result = (unsigned int)a2;
if ( (int)result > 0 )
{
v6 = 0LL;
do
{
*((_QWORD *)this + v6) = v7[v3 + v6];
++v6;
}
while ( (unsigned int)result != v6 );
}
return result;
}
| GetStackTrace:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x200
MOV EBP,EDX
MOV R14D,ESI
MOV RBX,RDI
MOV RDI,RSP
MOV ESI,0x40
CALL 0x00107800
MOV ECX,EAX
INC EBP
SUB ECX,EBP
XOR EAX,EAX
TEST ECX,ECX
CMOVG EAX,ECX
CMP EAX,R14D
CMOVGE EAX,R14D
TEST EAX,EAX
JLE 0x0012106b
MOVSXD RDX,EBP
MOV ECX,EAX
LEA RDX,[RSP + RDX*0x8]
XOR ESI,ESI
LAB_0012105b:
MOV RDI,qword ptr [RDX + RSI*0x8]
MOV qword ptr [RBX + RSI*0x8],RDI
INC RSI
CMP RCX,RSI
JNZ 0x0012105b
LAB_0012106b:
ADD RSP,0x200
POP RBX
POP R14
POP RBP
RET
|
/* nglog::tools::GetStackTrace(void**, int, int) */
void nglog::tools::GetStackTrace(void **param_1,int param_2,int param_3)
{
int iVar1;
uint uVar2;
uint uVar3;
ulong uVar4;
int8 auStack_218 [64];
iVar1 = backtrace(auStack_218);
uVar3 = iVar1 - (param_3 + 1);
uVar2 = 0;
if (0 < (int)uVar3) {
uVar2 = uVar3;
}
if (param_2 <= (int)uVar2) {
uVar2 = param_2;
}
if (0 < (int)uVar2) {
uVar4 = 0;
do {
param_1[uVar4] = (void *)auStack_218[(long)(param_3 + 1) + uVar4];
uVar4 = uVar4 + 1;
} while (uVar2 != uVar4);
}
return;
}
| |
43,212 | stbi__grow_buffer_unsafe(stbi__jpeg*) | monkey531[P]llama/examples/llava/../../common/stb_image.h | static void stbi__grow_buffer_unsafe(stbi__jpeg *j)
{
do {
unsigned int b = j->nomore ? 0 : stbi__get8(j->s);
if (b == 0xff) {
int c = stbi__get8(j->s);
while (c == 0xff) c = stbi__get8(j->s); // consume fill bytes
if (c != 0) {
j->marker = (unsigned char) c;
j->nomore = 1;
return;
}
}
j->code_buffer |= b << (24 - j->code_bits);
j->code_bits += 8;
} while (j->code_bits <= 24);
} | O0 | c | stbi__grow_buffer_unsafe(stbi__jpeg*):
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpl $0x0, 0x482c(%rax)
je 0xb027f
xorl %eax, %eax
movl %eax, 0x4(%rsp)
jmp 0xb0293
movq 0x10(%rsp), %rax
movq (%rax), %rdi
callq 0x9f080
movzbl %al, %eax
movl %eax, 0x4(%rsp)
movl 0x4(%rsp), %eax
movl %eax, 0xc(%rsp)
cmpl $0xff, 0xc(%rsp)
jne 0xb0304
movq 0x10(%rsp), %rax
movq (%rax), %rdi
callq 0x9f080
movzbl %al, %eax
movl %eax, 0x8(%rsp)
cmpl $0xff, 0x8(%rsp)
jne 0xb02d9
movq 0x10(%rsp), %rax
movq (%rax), %rdi
callq 0x9f080
movzbl %al, %eax
movl %eax, 0x8(%rsp)
jmp 0xb02b9
cmpl $0x0, 0x8(%rsp)
je 0xb0302
movl 0x8(%rsp), %eax
movb %al, %cl
movq 0x10(%rsp), %rax
movb %cl, 0x4828(%rax)
movq 0x10(%rsp), %rax
movl $0x1, 0x482c(%rax)
jmp 0xb0353
jmp 0xb0304
movl 0xc(%rsp), %eax
movq 0x10(%rsp), %rdx
movl $0x18, %ecx
subl 0x4824(%rdx), %ecx
shll %cl, %eax
movl %eax, %ecx
movq 0x10(%rsp), %rax
orl 0x4820(%rax), %ecx
movl %ecx, 0x4820(%rax)
movq 0x10(%rsp), %rax
movl 0x4824(%rax), %ecx
addl $0x8, %ecx
movl %ecx, 0x4824(%rax)
movq 0x10(%rsp), %rax
cmpl $0x18, 0x4824(%rax)
jle 0xb0269
addq $0x18, %rsp
retq
nopl (%rax,%rax)
| _ZL24stbi__grow_buffer_unsafeP10stbi__jpeg:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
loc_B0269:
mov rax, [rsp+18h+var_8]
cmp dword ptr [rax+482Ch], 0
jz short loc_B027F
xor eax, eax
mov [rsp+18h+var_14], eax
jmp short loc_B0293
loc_B027F:
mov rax, [rsp+18h+var_8]
mov rdi, [rax]
call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *)
movzx eax, al
mov [rsp+18h+var_14], eax
loc_B0293:
mov eax, [rsp+18h+var_14]
mov [rsp+18h+var_C], eax
cmp [rsp+18h+var_C], 0FFh
jnz short loc_B0304
mov rax, [rsp+18h+var_8]
mov rdi, [rax]
call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *)
movzx eax, al
mov [rsp+18h+var_10], eax
loc_B02B9:
cmp [rsp+18h+var_10], 0FFh
jnz short loc_B02D9
mov rax, [rsp+18h+var_8]
mov rdi, [rax]
call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *)
movzx eax, al
mov [rsp+18h+var_10], eax
jmp short loc_B02B9
loc_B02D9:
cmp [rsp+18h+var_10], 0
jz short loc_B0302
mov eax, [rsp+18h+var_10]
mov cl, al
mov rax, [rsp+18h+var_8]
mov [rax+4828h], cl
mov rax, [rsp+18h+var_8]
mov dword ptr [rax+482Ch], 1
jmp short loc_B0353
loc_B0302:
jmp short $+2
loc_B0304:
mov eax, [rsp+18h+var_C]
mov rdx, [rsp+18h+var_8]
mov ecx, 18h
sub ecx, [rdx+4824h]
shl eax, cl
mov ecx, eax
mov rax, [rsp+18h+var_8]
or ecx, [rax+4820h]
mov [rax+4820h], ecx
mov rax, [rsp+18h+var_8]
mov ecx, [rax+4824h]
add ecx, 8
mov [rax+4824h], ecx
mov rax, [rsp+18h+var_8]
cmp dword ptr [rax+4824h], 18h
jle loc_B0269
loc_B0353:
add rsp, 18h
retn
| long long stbi__grow_buffer_unsafe(long long a1)
{
long long result; // rax
int v2; // [rsp+4h] [rbp-14h]
int v3; // [rsp+8h] [rbp-10h]
while ( 1 )
{
v2 = *(_DWORD *)(a1 + 18476) ? 0 : (unsigned __int8)stbi__get8(*(_QWORD *)a1);
if ( v2 == 255 )
{
do
v3 = (unsigned __int8)stbi__get8(*(_QWORD *)a1);
while ( v3 == 255 );
if ( v3 )
break;
}
*(_DWORD *)(a1 + 18464) |= v2 << (24 - *(_BYTE *)(a1 + 18468));
*(_DWORD *)(a1 + 18468) += 8;
result = a1;
if ( *(int *)(a1 + 18468) > 24 )
return result;
}
*(_BYTE *)(a1 + 18472) = v3;
result = a1;
*(_DWORD *)(a1 + 18476) = 1;
return result;
}
| stbi__grow_buffer_unsafe:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
LAB_001b0269:
MOV RAX,qword ptr [RSP + 0x10]
CMP dword ptr [RAX + 0x482c],0x0
JZ 0x001b027f
XOR EAX,EAX
MOV dword ptr [RSP + 0x4],EAX
JMP 0x001b0293
LAB_001b027f:
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX]
CALL 0x0019f080
MOVZX EAX,AL
MOV dword ptr [RSP + 0x4],EAX
LAB_001b0293:
MOV EAX,dword ptr [RSP + 0x4]
MOV dword ptr [RSP + 0xc],EAX
CMP dword ptr [RSP + 0xc],0xff
JNZ 0x001b0304
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX]
CALL 0x0019f080
MOVZX EAX,AL
MOV dword ptr [RSP + 0x8],EAX
LAB_001b02b9:
CMP dword ptr [RSP + 0x8],0xff
JNZ 0x001b02d9
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX]
CALL 0x0019f080
MOVZX EAX,AL
MOV dword ptr [RSP + 0x8],EAX
JMP 0x001b02b9
LAB_001b02d9:
CMP dword ptr [RSP + 0x8],0x0
JZ 0x001b0302
MOV EAX,dword ptr [RSP + 0x8]
MOV CL,AL
MOV RAX,qword ptr [RSP + 0x10]
MOV byte ptr [RAX + 0x4828],CL
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RAX + 0x482c],0x1
JMP 0x001b0353
LAB_001b0302:
JMP 0x001b0304
LAB_001b0304:
MOV EAX,dword ptr [RSP + 0xc]
MOV RDX,qword ptr [RSP + 0x10]
MOV ECX,0x18
SUB ECX,dword ptr [RDX + 0x4824]
SHL EAX,CL
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x10]
OR ECX,dword ptr [RAX + 0x4820]
MOV dword ptr [RAX + 0x4820],ECX
MOV RAX,qword ptr [RSP + 0x10]
MOV ECX,dword ptr [RAX + 0x4824]
ADD ECX,0x8
MOV dword ptr [RAX + 0x4824],ECX
MOV RAX,qword ptr [RSP + 0x10]
CMP dword ptr [RAX + 0x4824],0x18
JLE 0x001b0269
LAB_001b0353:
ADD RSP,0x18
RET
|
/* stbi__grow_buffer_unsafe(stbi__jpeg*) */
void stbi__grow_buffer_unsafe(stbi__jpeg *param_1)
{
byte bVar1;
stbi__jpeg sVar2;
uint local_14;
do {
if (*(int *)(param_1 + 0x482c) == 0) {
bVar1 = stbi__get8(*(stbi__context **)param_1);
local_14 = (uint)bVar1;
}
else {
local_14 = 0;
}
if (local_14 == 0xff) {
sVar2 = (stbi__jpeg)stbi__get8(*(stbi__context **)param_1);
while (sVar2 == (stbi__jpeg)0xff) {
sVar2 = (stbi__jpeg)stbi__get8(*(stbi__context **)param_1);
}
if (sVar2 != (stbi__jpeg)0x0) {
param_1[0x4828] = sVar2;
*(int4 *)(param_1 + 0x482c) = 1;
return;
}
}
*(uint *)(param_1 + 0x4820) =
local_14 << (0x18U - (char)*(int4 *)(param_1 + 0x4824) & 0x1f) |
*(uint *)(param_1 + 0x4820);
*(int *)(param_1 + 0x4824) = *(int *)(param_1 + 0x4824) + 8;
if (0x18 < *(int *)(param_1 + 0x4824)) {
return;
}
} while( true );
}
| |
43,213 | mthd_my_read_query_result | eloqsql/libmariadb/libmariadb/mariadb_lib.c | int mthd_my_read_query_result(MYSQL *mysql)
{
uchar *pos;
ulong field_count;
MYSQL_DATA *fields;
ulong length;
const uchar *end;
uchar has_metadata;
my_bool can_local_infile= (mysql->options.extension) && (mysql->extension->auto_local_infile != WAIT_FOR_QUERY);
if (mysql->options.extension && mysql->extension->auto_local_infile == ACCEPT_FILE_REQUEST)
mysql->extension->auto_local_infile= WAIT_FOR_QUERY;
if ((length = ma_net_safe_read(mysql)) == packet_error)
{
return(1);
}
free_old_query(mysql); /* Free old result */
get_info:
pos=(uchar*) mysql->net.read_pos;
end= pos + length;
if ((field_count= net_field_length(&pos)) == 0)
return ma_read_ok_packet(mysql, pos, length);
if (field_count == NULL_LENGTH) /* LOAD DATA LOCAL INFILE */
{
int error=mysql_handle_local_infile(mysql, (char *)pos, can_local_infile);
if ((length=ma_net_safe_read(mysql)) == packet_error || error)
return(-1);
goto get_info; /* Get info packet */
}
has_metadata= 1;
if (ma_supports_cache_metadata(mysql))
{
assert(mysql->fields == NULL);
if (pos < end)
{
has_metadata= *pos;
pos++;
}
}
if (!(mysql->server_status & SERVER_STATUS_AUTOCOMMIT))
mysql->server_status|= SERVER_STATUS_IN_TRANS;
if (has_metadata)
{
if (!(fields= mysql->methods->db_read_rows(mysql, (MYSQL_FIELD *) 0,
ma_result_set_rows(mysql))))
return (-1);
if (!(mysql->fields= unpack_fields(mysql, fields, &mysql->field_alloc,
(uint) field_count, 1)))
return (-1);
}
else
{
/* Read EOF, to get the status and warning count. */
if ((length= ma_net_safe_read(mysql)) == packet_error)
{
return -1;
}
pos= (uchar *) mysql->net.read_pos;
if (length != 5 || pos[0] != 0xfe)
{
return -1;
}
mysql->warning_count= uint2korr(pos + 1);
mysql->server_status= uint2korr(pos + 3);
}
mysql->status=MYSQL_STATUS_GET_RESULT;
mysql->field_count=field_count;
return(0);
} | O0 | c | mthd_my_read_query_result:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq $0x0, 0x480(%rcx)
movb %al, -0x41(%rbp)
je 0x39bd7
movq -0x10(%rbp), %rax
movq 0x4f0(%rax), %rax
movsbl 0x78(%rax), %eax
cmpl $0x1, %eax
setne %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x3a(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x480(%rax)
je 0x39c13
movq -0x10(%rbp), %rax
movq 0x4f0(%rax), %rax
movsbl 0x78(%rax), %eax
cmpl $0x2, %eax
jne 0x39c13
movq -0x10(%rbp), %rax
movq 0x4f0(%rax), %rax
movb $0x1, 0x78(%rax)
movq -0x10(%rbp), %rdi
callq 0x304c0
movq %rax, -0x30(%rbp)
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
cmpq %rcx, %rax
jne 0x39c36
movl $0x1, -0x4(%rbp)
jmp 0x39e82
movq -0x10(%rbp), %rdi
callq 0x38970
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x30ae0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x39c83
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x38ef0
movl %eax, -0x4(%rbp)
jmp 0x39e82
cmpq $-0x1, -0x20(%rbp)
jne 0x39ccf
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movsbl -0x3a(%rbp), %edx
callq 0x47f50
movsbl %al, %eax
movl %eax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
callq 0x304c0
movq %rax, -0x30(%rbp)
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
cmpq %rcx, %rax
je 0x39cbe
cmpl $0x0, -0x40(%rbp)
je 0x39cca
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x39e82
jmp 0x39c3f
movb $0x1, -0x39(%rbp)
movq -0x10(%rbp), %rdi
callq 0x39e90
cmpb $0x0, %al
je 0x39d01
movq -0x18(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x39cff
movq -0x18(%rbp), %rax
movb (%rax), %al
movb %al, -0x39(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x39d01
movq -0x10(%rbp), %rax
movl 0x380(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x39d26
movq -0x10(%rbp), %rax
movl 0x380(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0x380(%rax)
cmpb $0x0, -0x39(%rbp)
je 0x39dc0
movq -0x10(%rbp), %rax
movq 0x4d0(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rdi
callq 0x39ec0
movq -0x58(%rbp), %rdi
movl %eax, %edx
movq -0x50(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %esi
callq *%rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x39d7a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x39e82
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq $0x300, %rdx # imm = 0x300
movq -0x20(%rbp), %rax
movl %eax, %ecx
movl $0x1, %r8d
callq 0x34510
movq -0x10(%rbp), %rcx
movq %rax, 0x2f8(%rcx)
cmpq $0x0, %rax
jne 0x39dbb
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x39e82
jmp 0x39e5d
movq -0x10(%rbp), %rdi
callq 0x304c0
movq %rax, -0x30(%rbp)
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
cmpq %rcx, %rax
jne 0x39de3
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x39e82
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x5, -0x30(%rbp)
jne 0x39e04
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xfe, %eax
je 0x39e0d
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x39e82
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
movzwl %ax, %eax
movq -0x18(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
addl %ecx, %eax
movzwl %ax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x388(%rax)
movq -0x18(%rbp), %rax
movzbl 0x3(%rax), %eax
movzwl %ax, %eax
movq -0x18(%rbp), %rcx
movzbl 0x4(%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
addl %ecx, %eax
movzwl %ax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x380(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0x488(%rax)
movq -0x20(%rbp), %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x37c(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| mthd_my_read_query_result:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov rcx, [rbp+var_10]
xor eax, eax
cmp qword ptr [rcx+480h], 0
mov [rbp+var_41], al
jz short loc_39BD7
mov rax, [rbp+var_10]
mov rax, [rax+4F0h]
movsx eax, byte ptr [rax+78h]
cmp eax, 1
setnz al
mov [rbp+var_41], al
loc_39BD7:
mov al, [rbp+var_41]
and al, 1
movzx eax, al
mov [rbp+var_3A], al
mov rax, [rbp+var_10]
cmp qword ptr [rax+480h], 0
jz short loc_39C13
mov rax, [rbp+var_10]
mov rax, [rax+4F0h]
movsx eax, byte ptr [rax+78h]
cmp eax, 2
jnz short loc_39C13
mov rax, [rbp+var_10]
mov rax, [rax+4F0h]
mov byte ptr [rax+78h], 1
loc_39C13:
mov rdi, [rbp+var_10]
call ma_net_safe_read
mov [rbp+var_30], rax
mov ecx, 0FFFFFFFFh
cmp rax, rcx
jnz short loc_39C36
mov [rbp+var_4], 1
jmp loc_39E82
loc_39C36:
mov rdi, [rbp+var_10]
call free_old_query
loc_39C3F:
mov rax, [rbp+var_10]
mov rax, [rax+20h]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
add rax, [rbp+var_30]
mov [rbp+var_38], rax
lea rdi, [rbp+var_18]
call net_field_length
mov [rbp+var_20], rax
cmp rax, 0
jnz short loc_39C83
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_30]
call ma_read_ok_packet
mov [rbp+var_4], eax
jmp loc_39E82
loc_39C83:
cmp [rbp+var_20], 0FFFFFFFFFFFFFFFFh
jnz short loc_39CCF
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
movsx edx, [rbp+var_3A]
call mysql_handle_local_infile
movsx eax, al
mov [rbp+var_40], eax
mov rdi, [rbp+var_10]
call ma_net_safe_read
mov [rbp+var_30], rax
mov ecx, 0FFFFFFFFh
cmp rax, rcx
jz short loc_39CBE
cmp [rbp+var_40], 0
jz short loc_39CCA
loc_39CBE:
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_39E82
loc_39CCA:
jmp loc_39C3F
loc_39CCF:
mov [rbp+var_39], 1
mov rdi, [rbp+var_10]
call ma_supports_cache_metadata
cmp al, 0
jz short loc_39D01
mov rax, [rbp+var_18]
cmp rax, [rbp+var_38]
jnb short loc_39CFF
mov rax, [rbp+var_18]
mov al, [rax]
mov [rbp+var_39], al
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
loc_39CFF:
jmp short $+2
loc_39D01:
mov rax, [rbp+var_10]
mov eax, [rax+380h]
and eax, 2
cmp eax, 0
jnz short loc_39D26
mov rax, [rbp+var_10]
mov ecx, [rax+380h]
or ecx, 1
mov [rax+380h], ecx
loc_39D26:
cmp [rbp+var_39], 0
jz loc_39DC0
mov rax, [rbp+var_10]
mov rax, [rax+4D0h]
mov rax, [rax+28h]
mov [rbp+var_50], rax
mov rax, [rbp+var_10]
mov [rbp+var_58], rax
mov rdi, [rbp+var_10]
call ma_result_set_rows
mov rdi, [rbp+var_58]
mov edx, eax
mov rax, [rbp+var_50]
xor ecx, ecx
mov esi, ecx
call rax
mov [rbp+var_28], rax
cmp rax, 0
jnz short loc_39D7A
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_39E82
loc_39D7A:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_10]
add rdx, 300h
mov rax, [rbp+var_20]
mov ecx, eax
mov r8d, 1
call unpack_fields
mov rcx, [rbp+var_10]
mov [rcx+2F8h], rax
cmp rax, 0
jnz short loc_39DBB
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_39E82
loc_39DBB:
jmp loc_39E5D
loc_39DC0:
mov rdi, [rbp+var_10]
call ma_net_safe_read
mov [rbp+var_30], rax
mov ecx, 0FFFFFFFFh
cmp rax, rcx
jnz short loc_39DE3
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_39E82
loc_39DE3:
mov rax, [rbp+var_10]
mov rax, [rax+20h]
mov [rbp+var_18], rax
cmp [rbp+var_30], 5
jnz short loc_39E04
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
cmp eax, 0FEh
jz short loc_39E0D
loc_39E04:
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_39E82
loc_39E0D:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+1]
movzx eax, ax
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+2]
movzx ecx, cx
shl ecx, 8
add eax, ecx
movzx ecx, ax
mov rax, [rbp+var_10]
mov [rax+388h], ecx
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax+3]
movzx eax, ax
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+4]
movzx ecx, cx
shl ecx, 8
add eax, ecx
movzx ecx, ax
mov rax, [rbp+var_10]
mov [rax+380h], ecx
loc_39E5D:
mov rax, [rbp+var_10]
mov dword ptr [rax+488h], 1
mov rax, [rbp+var_20]
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax+37Ch], ecx
mov [rbp+var_4], 0
loc_39E82:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
| long long mthd_my_read_query_result(long long a1, unsigned __int8 *a2, long long a3, long long a4, int a5, int a6)
{
long long v6; // rdx
long long v7; // rcx
int v8; // r8d
int v9; // r9d
long long v10; // rdx
long long v11; // rcx
int v12; // r8d
int v13; // r9d
unsigned int v14; // eax
long long v15; // rax
long long v17; // [rsp+8h] [rbp-58h]
long long ( *v18)(long long, _QWORD, _QWORD); // [rsp+10h] [rbp-50h]
bool v19; // [rsp+1Fh] [rbp-41h]
int v20; // [rsp+20h] [rbp-40h]
char v21; // [rsp+27h] [rbp-39h]
unsigned __int8 *v22; // [rsp+28h] [rbp-38h]
long long v23; // [rsp+30h] [rbp-30h]
long long v24; // [rsp+30h] [rbp-30h]
_QWORD *v25; // [rsp+38h] [rbp-28h]
long long v26; // [rsp+40h] [rbp-20h]
unsigned __int8 *v27; // [rsp+48h] [rbp-18h] BYREF
long long v28; // [rsp+50h] [rbp-10h]
v28 = a1;
v19 = 0;
if ( *(_QWORD *)(a1 + 1152) )
v19 = *(_BYTE *)(*(_QWORD *)(v28 + 1264) + 120LL) != 1;
if ( *(_QWORD *)(v28 + 1152) && *(_BYTE *)(*(_QWORD *)(v28 + 1264) + 120LL) == 2 )
*(_BYTE *)(*(_QWORD *)(v28 + 1264) + 120LL) = 1;
v23 = ma_net_safe_read(v28, (long long)a2, a3, a1, a5, a6);
if ( v23 != 0xFFFFFFFFLL )
{
free_old_query(v28);
while ( 1 )
{
v27 = *(unsigned __int8 **)(v28 + 32);
v22 = &v27[v23];
v26 = net_field_length(&v27);
if ( !v26 )
return (unsigned int)ma_read_ok_packet(v28, v27, v23);
if ( v26 != -1 )
break;
a2 = v27;
v20 = (char)mysql_handle_local_infile(v28, v27, v19);
v23 = ma_net_safe_read(v28, (long long)a2, v6, v7, v8, v9);
if ( v23 == 0xFFFFFFFFLL || v20 )
return (unsigned int)-1;
}
v21 = 1;
if ( (unsigned __int8)ma_supports_cache_metadata(v28) && v27 < v22 )
v21 = *v27++;
if ( (*(_DWORD *)(v28 + 896) & 2) == 0 )
{
v11 = *(_DWORD *)(v28 + 896) | 1u;
*(_DWORD *)(v28 + 896) = v11;
}
if ( v21 )
{
v18 = *(long long ( **)(long long, _QWORD, _QWORD))(*(_QWORD *)(v28 + 1232) + 40LL);
v17 = v28;
v14 = ma_result_set_rows(v28);
v25 = (_QWORD *)v18(v17, 0LL, v14);
if ( !v25 )
return (unsigned int)-1;
v15 = unpack_fields(v28, v25, v28 + 768, v26, 1);
*(_QWORD *)(v28 + 760) = v15;
if ( !v15 )
return (unsigned int)-1;
}
else
{
v24 = ma_net_safe_read(v28, (long long)a2, v10, v11, v12, v13);
if ( v24 == 0xFFFFFFFFLL )
return (unsigned int)-1;
v27 = *(unsigned __int8 **)(v28 + 32);
if ( v24 != 5 || *v27 != 254 )
return (unsigned int)-1;
*(_DWORD *)(v28 + 904) = (unsigned __int16)((v27[2] << 8) + v27[1]);
*(_DWORD *)(v28 + 896) = (unsigned __int16)((v27[4] << 8) + v27[3]);
}
*(_DWORD *)(v28 + 1160) = 1;
*(_DWORD *)(v28 + 892) = v26;
return 0;
}
return 1;
}
| mthd_my_read_query_result:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV RCX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP qword ptr [RCX + 0x480],0x0
MOV byte ptr [RBP + -0x41],AL
JZ 0x00139bd7
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x4f0]
MOVSX EAX,byte ptr [RAX + 0x78]
CMP EAX,0x1
SETNZ AL
MOV byte ptr [RBP + -0x41],AL
LAB_00139bd7:
MOV AL,byte ptr [RBP + -0x41]
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x3a],AL
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x00139c13
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x4f0]
MOVSX EAX,byte ptr [RAX + 0x78]
CMP EAX,0x2
JNZ 0x00139c13
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x4f0]
MOV byte ptr [RAX + 0x78],0x1
LAB_00139c13:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001304c0
MOV qword ptr [RBP + -0x30],RAX
MOV ECX,0xffffffff
CMP RAX,RCX
JNZ 0x00139c36
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00139e82
LAB_00139c36:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00138970
LAB_00139c3f:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x38],RAX
LEA RDI,[RBP + -0x18]
CALL 0x00130ae0
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JNZ 0x00139c83
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x00138ef0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00139e82
LAB_00139c83:
CMP qword ptr [RBP + -0x20],-0x1
JNZ 0x00139ccf
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOVSX EDX,byte ptr [RBP + -0x3a]
CALL 0x00147f50
MOVSX EAX,AL
MOV dword ptr [RBP + -0x40],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001304c0
MOV qword ptr [RBP + -0x30],RAX
MOV ECX,0xffffffff
CMP RAX,RCX
JZ 0x00139cbe
CMP dword ptr [RBP + -0x40],0x0
JZ 0x00139cca
LAB_00139cbe:
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00139e82
LAB_00139cca:
JMP 0x00139c3f
LAB_00139ccf:
MOV byte ptr [RBP + -0x39],0x1
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00139e90
CMP AL,0x0
JZ 0x00139d01
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x00139cff
MOV RAX,qword ptr [RBP + -0x18]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x39],AL
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
LAB_00139cff:
JMP 0x00139d01
LAB_00139d01:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x380]
AND EAX,0x2
CMP EAX,0x0
JNZ 0x00139d26
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x380]
OR ECX,0x1
MOV dword ptr [RAX + 0x380],ECX
LAB_00139d26:
CMP byte ptr [RBP + -0x39],0x0
JZ 0x00139dc0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x4d0]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x58],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00139ec0
MOV RDI,qword ptr [RBP + -0x58]
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x50]
XOR ECX,ECX
MOV ESI,ECX
CALL RAX
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,0x0
JNZ 0x00139d7a
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00139e82
LAB_00139d7a:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,0x300
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,EAX
MOV R8D,0x1
CALL 0x00134510
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x2f8],RAX
CMP RAX,0x0
JNZ 0x00139dbb
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00139e82
LAB_00139dbb:
JMP 0x00139e5d
LAB_00139dc0:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001304c0
MOV qword ptr [RBP + -0x30],RAX
MOV ECX,0xffffffff
CMP RAX,RCX
JNZ 0x00139de3
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00139e82
LAB_00139de3:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x30],0x5
JNZ 0x00139e04
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xfe
JZ 0x00139e0d
LAB_00139e04:
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00139e82
LAB_00139e0d:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x1]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x2]
MOVZX ECX,CX
SHL ECX,0x8
ADD EAX,ECX
MOVZX ECX,AX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x388],ECX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + 0x3]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x4]
MOVZX ECX,CX
SHL ECX,0x8
ADD EAX,ECX
MOVZX ECX,AX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x380],ECX
LAB_00139e5d:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x488],0x1
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x37c],ECX
MOV dword ptr [RBP + -0x4],0x0
LAB_00139e82:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
int4 mthd_my_read_query_result(long param_1)
{
code *pcVar1;
char cVar2;
int4 uVar3;
char *pcVar4;
ulong uVar5;
long lVar6;
bool local_49;
char local_41;
long local_38;
char *local_20;
long local_18;
int4 local_c;
local_49 = false;
if (*(long *)(param_1 + 0x480) != 0) {
local_49 = *(char *)(*(long *)(param_1 + 0x4f0) + 0x78) != '\x01';
}
if ((*(long *)(param_1 + 0x480) != 0) && (*(char *)(*(long *)(param_1 + 0x4f0) + 0x78) == '\x02'))
{
*(int1 *)(*(long *)(param_1 + 0x4f0) + 0x78) = 1;
}
local_18 = param_1;
local_38 = ma_net_safe_read(param_1);
if (local_38 == 0xffffffff) {
local_c = 1;
}
else {
free_old_query(local_18);
do {
local_20 = *(char **)(local_18 + 0x20);
pcVar4 = local_20 + local_38;
uVar5 = net_field_length(&local_20);
if (uVar5 == 0) {
uVar3 = ma_read_ok_packet(local_18,local_20,local_38);
return uVar3;
}
if (uVar5 != 0xffffffffffffffff) {
local_41 = '\x01';
cVar2 = ma_supports_cache_metadata(local_18);
lVar6 = local_18;
if ((cVar2 != '\0') && (local_20 < pcVar4)) {
local_41 = *local_20;
local_20 = local_20 + 1;
}
if ((*(uint *)(local_18 + 0x380) & 2) == 0) {
*(uint *)(local_18 + 0x380) = *(uint *)(local_18 + 0x380) | 1;
}
if (local_41 == '\0') {
lVar6 = ma_net_safe_read(local_18);
if (lVar6 == 0xffffffff) {
return 0xffffffff;
}
pcVar4 = *(char **)(local_18 + 0x20);
if ((lVar6 != 5) || (*pcVar4 != -2)) {
return 0xffffffff;
}
*(uint *)(local_18 + 0x388) =
(uint)(byte)pcVar4[1] + (uint)(byte)pcVar4[2] * 0x100 & 0xffff;
*(uint *)(local_18 + 0x380) =
(uint)(byte)pcVar4[3] + (uint)(byte)pcVar4[4] * 0x100 & 0xffff;
}
else {
pcVar1 = *(code **)(*(long *)(local_18 + 0x4d0) + 0x28);
uVar3 = ma_result_set_rows(local_18);
lVar6 = (*pcVar1)(lVar6,0,uVar3);
if (lVar6 == 0) {
return 0xffffffff;
}
lVar6 = unpack_fields(local_18,lVar6,local_18 + 0x300,uVar5 & 0xffffffff,1);
*(long *)(local_18 + 0x2f8) = lVar6;
if (lVar6 == 0) {
return 0xffffffff;
}
}
*(int4 *)(local_18 + 0x488) = 1;
*(int *)(local_18 + 0x37c) = (int)uVar5;
return 0;
}
cVar2 = mysql_handle_local_infile(local_18,local_20,local_49);
local_38 = ma_net_safe_read(local_18);
} while ((local_38 != 0xffffffff) && (cVar2 == '\0'));
local_c = 0xffffffff;
}
return local_c;
}
| |
43,214 | mthd_my_read_query_result | eloqsql/libmariadb/libmariadb/mariadb_lib.c | int mthd_my_read_query_result(MYSQL *mysql)
{
uchar *pos;
ulong field_count;
MYSQL_DATA *fields;
ulong length;
const uchar *end;
uchar has_metadata;
my_bool can_local_infile= (mysql->options.extension) && (mysql->extension->auto_local_infile != WAIT_FOR_QUERY);
if (mysql->options.extension && mysql->extension->auto_local_infile == ACCEPT_FILE_REQUEST)
mysql->extension->auto_local_infile= WAIT_FOR_QUERY;
if ((length = ma_net_safe_read(mysql)) == packet_error)
{
return(1);
}
free_old_query(mysql); /* Free old result */
get_info:
pos=(uchar*) mysql->net.read_pos;
end= pos + length;
if ((field_count= net_field_length(&pos)) == 0)
return ma_read_ok_packet(mysql, pos, length);
if (field_count == NULL_LENGTH) /* LOAD DATA LOCAL INFILE */
{
int error=mysql_handle_local_infile(mysql, (char *)pos, can_local_infile);
if ((length=ma_net_safe_read(mysql)) == packet_error || error)
return(-1);
goto get_info; /* Get info packet */
}
has_metadata= 1;
if (ma_supports_cache_metadata(mysql))
{
assert(mysql->fields == NULL);
if (pos < end)
{
has_metadata= *pos;
pos++;
}
}
if (!(mysql->server_status & SERVER_STATUS_AUTOCOMMIT))
mysql->server_status|= SERVER_STATUS_IN_TRANS;
if (has_metadata)
{
if (!(fields= mysql->methods->db_read_rows(mysql, (MYSQL_FIELD *) 0,
ma_result_set_rows(mysql))))
return (-1);
if (!(mysql->fields= unpack_fields(mysql, fields, &mysql->field_alloc,
(uint) field_count, 1)))
return (-1);
}
else
{
/* Read EOF, to get the status and warning count. */
if ((length= ma_net_safe_read(mysql)) == packet_error)
{
return -1;
}
pos= (uchar *) mysql->net.read_pos;
if (length != 5 || pos[0] != 0xfe)
{
return -1;
}
mysql->warning_count= uint2korr(pos + 1);
mysql->server_status= uint2korr(pos + 3);
}
mysql->status=MYSQL_STATUS_GET_RESULT;
mysql->field_count=field_count;
return(0);
} | O3 | c | mthd_my_read_query_result:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x480(%rdi)
je 0x2c852
movq 0x4f0(%rbx), %rax
movb 0x78(%rax), %cl
cmpb $0x1, %cl
setne %r14b
cmpb $0x2, %cl
jne 0x2c855
movb $0x1, 0x78(%rax)
movb $0x1, %r14b
jmp 0x2c855
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x26beb
movq %rax, %r15
movl $0x1, %r12d
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpq %rax, %r15
jne 0x2c882
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x2bb42
movzbl %r14b, %r13d
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
movq 0x20(%rbx), %rsi
movzbl (%rsi), %r14d
cmpq $0xfa, %r14
jbe 0x2c903
cmpq $0xfb, %r14
jne 0x2c8db
incq %rsi
movq %rbx, %rdi
movl %r13d, %edx
callq 0x34237
movl %eax, %r14d
movq %rbx, %rdi
callq 0x26beb
movq %rax, %r15
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpq %rax, %r15
je 0x2c870
testb %r14b, %r14b
je 0x2c894
jmp 0x2c870
cmpl $0xfc, %r14d
je 0x2c909
cmpl $0xfd, %r14d
jne 0x2c914
leaq 0x4(%rsi), %rax
movzwl 0x1(%rsi), %ecx
movzbl 0x3(%rsi), %r14d
shll $0x10, %r14d
orq %rcx, %r14
jmp 0x2c91c
leaq 0x1(%rsi), %rax
jmp 0x2c91c
leaq 0x3(%rsi), %rax
movzwl 0x1(%rsi), %r14d
jmp 0x2c91c
leaq 0x9(%rsi), %rax
movl 0x1(%rsi), %r14d
testq %r14, %r14
je 0x2c99e
movq 0x4f0(%rbx), %rcx
xorl %edx, %edx
testb $0x10, 0x70(%rcx)
je 0x2c93e
addq %r15, %rsi
cmpq %rsi, %rax
jae 0x2c93e
cmpb $0x0, (%rax)
sete %dl
movl 0x380(%rbx), %eax
testb $0x2, %al
jne 0x2c951
orl $0x1, %eax
movl %eax, 0x380(%rbx)
testb %dl, %dl
je 0x2c9ba
movq %rbx, %rdi
callq 0x26beb
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
cmpq %rcx, %rax
je 0x2c870
cmpq $0x5, %rax
jne 0x2c870
movq 0x20(%rbx), %rax
cmpb $-0x2, (%rax)
jne 0x2c870
movzwl 0x1(%rax), %ecx
movl %ecx, 0x388(%rbx)
movzwl 0x3(%rax), %eax
movl %eax, 0x380(%rbx)
jmp 0x2ca16
movq %rbx, %rdi
movq %rax, %rsi
movq %r15, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2bed2
movq 0x4d0(%rbx), %rax
movq 0x70(%rcx), %rcx
andl $0x8, %ecx
cmpq $0x1, %rcx
movl $0x9, %edx
sbbl $0x0, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq *0x28(%rax)
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x2c870
leaq 0x300(%rbx), %rdx
movq %rbx, %rdi
movq %rax, %rsi
movl %r14d, %ecx
movl $0x1, %r8d
callq 0x29114
movq %rax, 0x2f8(%rbx)
testq %rax, %rax
je 0x2c870
movl $0x1, 0x488(%rbx)
movl %r14d, 0x37c(%rbx)
xorl %r12d, %r12d
jmp 0x2c870
| mthd_my_read_query_result:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
cmp qword ptr [rdi+480h], 0
jz short loc_2C852
mov rax, [rbx+4F0h]
mov cl, [rax+78h]
cmp cl, 1
setnz r14b
cmp cl, 2
jnz short loc_2C855
mov byte ptr [rax+78h], 1
mov r14b, 1
jmp short loc_2C855
loc_2C852:
xor r14d, r14d
loc_2C855:
mov rdi, rbx
call ma_net_safe_read
mov r15, rax
mov r12d, 1
mov eax, 0FFFFFFFFh
cmp r15, rax
jnz short loc_2C882
loc_2C870:
mov eax, r12d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2C882:
mov rdi, rbx
call free_old_query
movzx r13d, r14b
mov r12d, 0FFFFFFFFh
loc_2C894:
mov rsi, [rbx+20h]
movzx r14d, byte ptr [rsi]
cmp r14, 0FAh
jbe short loc_2C903
cmp r14, 0FBh
jnz short loc_2C8DB
inc rsi
mov rdi, rbx
mov edx, r13d
call mysql_handle_local_infile
mov r14d, eax
mov rdi, rbx
call ma_net_safe_read
mov r15, rax
mov eax, 0FFFFFFFFh
cmp r15, rax
jz short loc_2C870
test r14b, r14b
jz short loc_2C894
jmp short loc_2C870
loc_2C8DB:
cmp r14d, 0FCh
jz short loc_2C909
cmp r14d, 0FDh
jnz short loc_2C914
lea rax, [rsi+4]
movzx ecx, word ptr [rsi+1]
movzx r14d, byte ptr [rsi+3]
shl r14d, 10h
or r14, rcx
jmp short loc_2C91C
loc_2C903:
lea rax, [rsi+1]
jmp short loc_2C91C
loc_2C909:
lea rax, [rsi+3]
movzx r14d, word ptr [rsi+1]
jmp short loc_2C91C
loc_2C914:
lea rax, [rsi+9]
mov r14d, [rsi+1]
loc_2C91C:
test r14, r14
jz short loc_2C99E
mov rcx, [rbx+4F0h]
xor edx, edx
test byte ptr [rcx+70h], 10h
jz short loc_2C93E
add rsi, r15
cmp rax, rsi
jnb short loc_2C93E
cmp byte ptr [rax], 0
setz dl
loc_2C93E:
mov eax, [rbx+380h]
test al, 2
jnz short loc_2C951
or eax, 1
mov [rbx+380h], eax
loc_2C951:
test dl, dl
jz short loc_2C9BA
mov rdi, rbx
call ma_net_safe_read
mov r12d, 0FFFFFFFFh
mov ecx, 0FFFFFFFFh
cmp rax, rcx
jz loc_2C870
cmp rax, 5
jnz loc_2C870
mov rax, [rbx+20h]
cmp byte ptr [rax], 0FEh
jnz loc_2C870
movzx ecx, word ptr [rax+1]
mov [rbx+388h], ecx
movzx eax, word ptr [rax+3]
mov [rbx+380h], eax
jmp short loc_2CA16
loc_2C99E:
mov rdi, rbx
mov rsi, rax
mov rdx, r15
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp ma_read_ok_packet
loc_2C9BA:
mov rax, [rbx+4D0h]
mov rcx, [rcx+70h]
and ecx, 8
cmp rcx, 1
mov edx, 9
sbb edx, 0
mov rdi, rbx
xor esi, esi
call qword ptr [rax+28h]
mov r12d, 0FFFFFFFFh
test rax, rax
jz loc_2C870
lea rdx, [rbx+300h]
mov rdi, rbx
mov rsi, rax
mov ecx, r14d
mov r8d, 1
call unpack_fields
mov [rbx+2F8h], rax
test rax, rax
jz loc_2C870
loc_2CA16:
mov dword ptr [rbx+488h], 1
mov [rbx+37Ch], r14d
xor r12d, r12d
jmp loc_2C870
| long long mthd_my_read_query_result(
long long a1,
long long a2,
long long a3,
long long a4,
unsigned long long a5,
int a6)
{
long long v6; // rax
bool v7; // r14
unsigned long long v8; // r15
unsigned int v9; // r12d
unsigned long long v11; // r8
int v12; // r9d
BOOL v13; // r13d
unsigned __int8 *v14; // rsi
unsigned long long v15; // r14
long long v16; // rsi
char v17; // r14
long long v18; // rdx
long long v19; // rcx
unsigned long long v20; // r8
int v21; // r9d
unsigned __int8 *v22; // rax
long long v23; // rcx
long long v24; // rdx
int v25; // eax
long long v26; // rax
_QWORD *v27; // rax
long long v28; // rax
if ( *(_QWORD *)(a1 + 1152) )
{
v6 = *(_QWORD *)(a1 + 1264);
LOBYTE(a4) = *(_BYTE *)(v6 + 120);
v7 = (_BYTE)a4 != 1;
if ( (_BYTE)a4 == 2 )
{
*(_BYTE *)(v6 + 120) = 1;
v7 = 1;
}
}
else
{
v7 = 0;
}
v8 = ma_net_safe_read(a1, a2, a3, a4, a5, a6);
v9 = 1;
if ( v8 == 0xFFFFFFFF )
return v9;
free_old_query(a1);
v13 = v7;
v9 = -1;
while ( 1 )
{
v14 = *(unsigned __int8 **)(a1 + 32);
v15 = *v14;
if ( v15 <= 0xFA )
{
v22 = v14 + 1;
goto LABEL_19;
}
if ( v15 != 251 )
break;
v16 = (long long)(v14 + 1);
v17 = mysql_handle_local_infile(a1, v16, v13);
v8 = ma_net_safe_read(a1, v16, v18, v19, v20, v21);
if ( v8 == 0xFFFFFFFF || v17 )
return v9;
}
if ( (_DWORD)v15 == 252 )
{
v22 = v14 + 3;
v15 = *(unsigned __int16 *)(v14 + 1);
}
else if ( (_DWORD)v15 == 253 )
{
v22 = v14 + 4;
v15 = *(unsigned __int16 *)(v14 + 1) | (unsigned long long)(v14[3] << 16);
}
else
{
v22 = v14 + 9;
v15 = *(unsigned int *)(v14 + 1);
}
LABEL_19:
if ( v15 )
{
v23 = *(_QWORD *)(a1 + 1264);
v24 = 0LL;
if ( (*(_BYTE *)(v23 + 112) & 0x10) != 0 )
{
v14 += v8;
if ( v22 < v14 )
LOBYTE(v24) = *v22 == 0;
}
v25 = *(_DWORD *)(a1 + 896);
if ( (v25 & 2) == 0 )
*(_DWORD *)(a1 + 896) = v25 | 1;
if ( (_BYTE)v24 )
{
v9 = -1;
if ( ma_net_safe_read(a1, (long long)v14, v24, v23, v11, v12) != 5 )
return v9;
v26 = *(_QWORD *)(a1 + 32);
if ( *(_BYTE *)v26 != 0xFE )
return v9;
*(_DWORD *)(a1 + 904) = *(unsigned __int16 *)(v26 + 1);
*(_DWORD *)(a1 + 896) = *(unsigned __int16 *)(v26 + 3);
}
else
{
v27 = (_QWORD *)(*(long long ( **)(long long, _QWORD, _QWORD))(*(_QWORD *)(a1 + 1232) + 40LL))(
a1,
0LL,
9 - (unsigned int)((*(_QWORD *)(v23 + 112) & 8LL) == 0));
v9 = -1;
if ( !v27 )
return v9;
v28 = unpack_fields(a1, v27, a1 + 768, v15, 1);
*(_QWORD *)(a1 + 760) = v28;
if ( !v28 )
return v9;
}
*(_DWORD *)(a1 + 1160) = 1;
*(_DWORD *)(a1 + 892) = v15;
return 0;
}
return ma_read_ok_packet(a1, v22, v8);
}
| mthd_my_read_query_result:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
CMP qword ptr [RDI + 0x480],0x0
JZ 0x0012c852
MOV RAX,qword ptr [RBX + 0x4f0]
MOV CL,byte ptr [RAX + 0x78]
CMP CL,0x1
SETNZ R14B
CMP CL,0x2
JNZ 0x0012c855
MOV byte ptr [RAX + 0x78],0x1
MOV R14B,0x1
JMP 0x0012c855
LAB_0012c852:
XOR R14D,R14D
LAB_0012c855:
MOV RDI,RBX
CALL 0x00126beb
MOV R15,RAX
MOV R12D,0x1
MOV EAX,0xffffffff
CMP R15,RAX
JNZ 0x0012c882
LAB_0012c870:
MOV EAX,R12D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012c882:
MOV RDI,RBX
CALL 0x0012bb42
MOVZX R13D,R14B
MOV R12D,0xffffffff
LAB_0012c894:
MOV RSI,qword ptr [RBX + 0x20]
MOVZX R14D,byte ptr [RSI]
CMP R14,0xfa
JBE 0x0012c903
CMP R14,0xfb
JNZ 0x0012c8db
INC RSI
MOV RDI,RBX
MOV EDX,R13D
CALL 0x00134237
MOV R14D,EAX
MOV RDI,RBX
CALL 0x00126beb
MOV R15,RAX
MOV EAX,0xffffffff
CMP R15,RAX
JZ 0x0012c870
TEST R14B,R14B
JZ 0x0012c894
JMP 0x0012c870
LAB_0012c8db:
CMP R14D,0xfc
JZ 0x0012c909
CMP R14D,0xfd
JNZ 0x0012c914
LEA RAX,[RSI + 0x4]
MOVZX ECX,word ptr [RSI + 0x1]
MOVZX R14D,byte ptr [RSI + 0x3]
SHL R14D,0x10
OR R14,RCX
JMP 0x0012c91c
LAB_0012c903:
LEA RAX,[RSI + 0x1]
JMP 0x0012c91c
LAB_0012c909:
LEA RAX,[RSI + 0x3]
MOVZX R14D,word ptr [RSI + 0x1]
JMP 0x0012c91c
LAB_0012c914:
LEA RAX,[RSI + 0x9]
MOV R14D,dword ptr [RSI + 0x1]
LAB_0012c91c:
TEST R14,R14
JZ 0x0012c99e
MOV RCX,qword ptr [RBX + 0x4f0]
XOR EDX,EDX
TEST byte ptr [RCX + 0x70],0x10
JZ 0x0012c93e
ADD RSI,R15
CMP RAX,RSI
JNC 0x0012c93e
CMP byte ptr [RAX],0x0
SETZ DL
LAB_0012c93e:
MOV EAX,dword ptr [RBX + 0x380]
TEST AL,0x2
JNZ 0x0012c951
OR EAX,0x1
MOV dword ptr [RBX + 0x380],EAX
LAB_0012c951:
TEST DL,DL
JZ 0x0012c9ba
MOV RDI,RBX
CALL 0x00126beb
MOV R12D,0xffffffff
MOV ECX,0xffffffff
CMP RAX,RCX
JZ 0x0012c870
CMP RAX,0x5
JNZ 0x0012c870
MOV RAX,qword ptr [RBX + 0x20]
CMP byte ptr [RAX],0xfe
JNZ 0x0012c870
MOVZX ECX,word ptr [RAX + 0x1]
MOV dword ptr [RBX + 0x388],ECX
MOVZX EAX,word ptr [RAX + 0x3]
MOV dword ptr [RBX + 0x380],EAX
JMP 0x0012ca16
LAB_0012c99e:
MOV RDI,RBX
MOV RSI,RAX
MOV RDX,R15
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0012bed2
LAB_0012c9ba:
MOV RAX,qword ptr [RBX + 0x4d0]
MOV RCX,qword ptr [RCX + 0x70]
AND ECX,0x8
CMP RCX,0x1
MOV EDX,0x9
SBB EDX,0x0
MOV RDI,RBX
XOR ESI,ESI
CALL qword ptr [RAX + 0x28]
MOV R12D,0xffffffff
TEST RAX,RAX
JZ 0x0012c870
LEA RDX,[RBX + 0x300]
MOV RDI,RBX
MOV RSI,RAX
MOV ECX,R14D
MOV R8D,0x1
CALL 0x00129114
MOV qword ptr [RBX + 0x2f8],RAX
TEST RAX,RAX
JZ 0x0012c870
LAB_0012ca16:
MOV dword ptr [RBX + 0x488],0x1
MOV dword ptr [RBX + 0x37c],R14D
XOR R12D,R12D
JMP 0x0012c870
|
int8 mthd_my_read_query_result(long param_1)
{
byte bVar1;
byte *pbVar2;
char *pcVar3;
char cVar4;
long lVar5;
byte *pbVar6;
int8 uVar7;
uint uVar8;
bool bVar9;
if (*(long *)(param_1 + 0x480) == 0) {
bVar9 = false;
}
else {
cVar4 = *(char *)(*(long *)(param_1 + 0x4f0) + 0x78);
bVar9 = cVar4 != '\x01';
if (cVar4 == '\x02') {
*(int1 *)(*(long *)(param_1 + 0x4f0) + 0x78) = 1;
bVar9 = true;
}
}
lVar5 = ma_net_safe_read(param_1);
if (lVar5 == 0xffffffff) {
return 1;
}
free_old_query(param_1);
do {
pbVar2 = *(byte **)(param_1 + 0x20);
bVar1 = *pbVar2;
uVar8 = (uint)bVar1;
if (uVar8 < 0xfb) {
pbVar6 = pbVar2 + 1;
LAB_0012c91c:
if (uVar8 == 0) {
uVar7 = ma_read_ok_packet(param_1,pbVar6,lVar5);
return uVar7;
}
bVar9 = false;
if (((*(byte *)(*(long *)(param_1 + 0x4f0) + 0x70) & 0x10) != 0) && (pbVar6 < pbVar2 + lVar5))
{
bVar9 = *pbVar6 == 0;
}
if ((*(uint *)(param_1 + 0x380) & 2) == 0) {
*(uint *)(param_1 + 0x380) = *(uint *)(param_1 + 0x380) | 1;
}
if (bVar9) {
lVar5 = ma_net_safe_read(param_1);
if (lVar5 == 0xffffffff) {
return 0xffffffff;
}
if (lVar5 != 5) {
return 0xffffffff;
}
pcVar3 = *(char **)(param_1 + 0x20);
if (*pcVar3 != -2) {
return 0xffffffff;
}
*(uint *)(param_1 + 0x388) = (uint)*(ushort *)(pcVar3 + 1);
*(uint *)(param_1 + 0x380) = (uint)*(ushort *)(pcVar3 + 3);
}
else {
lVar5 = (**(code **)(*(long *)(param_1 + 0x4d0) + 0x28))
(param_1,0,
9 - (uint)((*(ulong *)(*(long *)(param_1 + 0x4f0) + 0x70) & 8) == 0));
if (lVar5 == 0) {
return 0xffffffff;
}
lVar5 = unpack_fields(param_1,lVar5,param_1 + 0x300,uVar8,1);
*(long *)(param_1 + 0x2f8) = lVar5;
if (lVar5 == 0) {
return 0xffffffff;
}
}
*(int4 *)(param_1 + 0x488) = 1;
*(uint *)(param_1 + 0x37c) = uVar8;
return 0;
}
if (uVar8 != 0xfb) {
if (bVar1 == 0xfc) {
pbVar6 = pbVar2 + 3;
uVar8 = (uint)*(ushort *)(pbVar2 + 1);
}
else if (bVar1 == 0xfd) {
pbVar6 = pbVar2 + 4;
uVar8 = (uint)*(uint3 *)(pbVar2 + 1);
}
else {
pbVar6 = pbVar2 + 9;
uVar8 = *(uint *)(pbVar2 + 1);
}
goto LAB_0012c91c;
}
cVar4 = mysql_handle_local_infile(param_1,pbVar2 + 1,bVar9);
lVar5 = ma_net_safe_read(param_1);
if (lVar5 == 0xffffffff) {
return 0xffffffff;
}
if (cVar4 != '\0') {
return 0xffffffff;
}
} while( true );
}
| |
43,215 | net_get_error | eloqsql/libmariadb/libmariadb/mariadb_lib.c | void net_get_error(char *buf, size_t buf_len,
char *error, size_t error_len,
unsigned int *error_no,
char *sqlstate)
{
char *p= buf;
size_t error_msg_len= 0;
if (buf_len > 2)
{
*error_no= uint2korr(p);
p+= 2;
/* since 4.1 sqlstate is following */
if (*p == '#')
{
memcpy(sqlstate, ++p, SQLSTATE_LENGTH);
p+= SQLSTATE_LENGTH;
}
error_msg_len= buf_len - (p - buf);
error_msg_len= MIN(error_msg_len, error_len - 1);
memcpy(error, p, error_msg_len);
}
else
{
*error_no= CR_UNKNOWN_ERROR;
memcpy(sqlstate, SQLSTATE_UNKNOWN, SQLSTATE_LENGTH);
}
} | O0 | c | net_get_error:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
cmpq $0x2, -0x10(%rbp)
jbe 0x3cb58
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
movzwl %ax, %eax
movq -0x38(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
addl %ecx, %eax
movzwl %ax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x38(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x23, %eax
jne 0x3cb00
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x38(%rbp)
movl 0x1(%rcx), %edx
movl %edx, (%rax)
movb 0x5(%rcx), %cl
movb %cl, 0x4(%rax)
movq -0x38(%rbp), %rax
addq $0x5, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
movq -0x8(%rbp), %rdx
subq %rdx, %rcx
subq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x20(%rbp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x3cb31
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x3cb3d
movq -0x20(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x370c0
jmp 0x3cb7a
movq -0x28(%rbp), %rax
movl $0x7d0, (%rax) # imm = 0x7D0
movq -0x30(%rbp), %rax
leaq 0x1fabe3(%rip), %rcx # 0x237750
movq (%rcx), %rcx
movl (%rcx), %edx
movl %edx, (%rax)
movb 0x4(%rcx), %cl
movb %cl, 0x4(%rax)
addq $0x50, %rsp
popq %rbp
retq
| net_get_error:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+var_8]
mov [rbp+var_38], rax
mov [rbp+var_40], 0
cmp [rbp+var_10], 2
jbe loc_3CB58
mov rax, [rbp+var_38]
movzx eax, byte ptr [rax]
movzx eax, ax
mov rcx, [rbp+var_38]
movzx ecx, byte ptr [rcx+1]
movzx ecx, cx
shl ecx, 8
add eax, ecx
movzx ecx, ax
mov rax, [rbp+var_28]
mov [rax], ecx
mov rax, [rbp+var_38]
add rax, 2
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
movsx eax, byte ptr [rax]
cmp eax, 23h ; '#'
jnz short loc_3CB00
mov rax, [rbp+var_30]
mov rcx, [rbp+var_38]
mov rdx, rcx
add rdx, 1
mov [rbp+var_38], rdx
mov edx, [rcx+1]
mov [rax], edx
mov cl, [rcx+5]
mov [rax+4], cl
mov rax, [rbp+var_38]
add rax, 5
mov [rbp+var_38], rax
loc_3CB00:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_38]
mov rdx, [rbp+var_8]
sub rcx, rdx
sub rax, rcx
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
mov rcx, [rbp+var_20]
sub rcx, 1
cmp rax, rcx
jnb short loc_3CB31
mov rax, [rbp+var_40]
mov [rbp+var_48], rax
jmp short loc_3CB3D
loc_3CB31:
mov rax, [rbp+var_20]
sub rax, 1
mov [rbp+var_48], rax
loc_3CB3D:
mov rax, [rbp+var_48]
mov [rbp+var_40], rax
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_38]
mov rdx, [rbp+var_40]
call _memcpy
jmp short loc_3CB7A
loc_3CB58:
mov rax, [rbp+var_28]
mov dword ptr [rax], 7D0h
mov rax, [rbp+var_30]
lea rcx, SQLSTATE_UNKNOWN
mov rcx, [rcx]
mov edx, [rcx]
mov [rax], edx
mov cl, [rcx+4]
mov [rax+4], cl
loc_3CB7A:
add rsp, 50h
pop rbp
retn
| long long net_get_error(
unsigned __int8 *a1,
unsigned long long a2,
long long a3,
long long a4,
_DWORD *a5,
long long a6)
{
long long result; // rax
char *v7; // rcx
unsigned long long v8; // [rsp+8h] [rbp-48h]
unsigned __int8 *v9; // [rsp+18h] [rbp-38h]
if ( a2 <= 2 )
{
*a5 = 2000;
result = a6;
v7 = SQLSTATE_UNKNOWN;
*(_DWORD *)a6 = *(_DWORD *)SQLSTATE_UNKNOWN;
*(_BYTE *)(a6 + 4) = v7[4];
}
else
{
*a5 = (unsigned __int16)((a1[1] << 8) + *a1);
v9 = a1 + 2;
if ( a1[2] == 35 )
{
*(_DWORD *)a6 = *(_DWORD *)(a1 + 3);
*(_BYTE *)(a6 + 4) = a1[7];
v9 = a1 + 8;
}
if ( a2 - (v9 - a1) >= a4 - 1 )
v8 = a4 - 1;
else
v8 = a2 - (v9 - a1);
return memcpy(a3, v9, v8);
}
return result;
}
| net_get_error:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x38],RAX
MOV qword ptr [RBP + -0x40],0x0
CMP qword ptr [RBP + -0x10],0x2
JBE 0x0013cb58
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EAX,byte ptr [RAX]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x38]
MOVZX ECX,byte ptr [RCX + 0x1]
MOVZX ECX,CX
SHL ECX,0x8
ADD EAX,ECX
MOVZX ECX,AX
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x2
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x23
JNZ 0x0013cb00
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x38]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x38],RDX
MOV EDX,dword ptr [RCX + 0x1]
MOV dword ptr [RAX],EDX
MOV CL,byte ptr [RCX + 0x5]
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x5
MOV qword ptr [RBP + -0x38],RAX
LAB_0013cb00:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x8]
SUB RCX,RDX
SUB RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x20]
SUB RCX,0x1
CMP RAX,RCX
JNC 0x0013cb31
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0013cb3d
LAB_0013cb31:
MOV RAX,qword ptr [RBP + -0x20]
SUB RAX,0x1
MOV qword ptr [RBP + -0x48],RAX
LAB_0013cb3d:
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x40]
CALL 0x001370c0
JMP 0x0013cb7a
LAB_0013cb58:
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX],0x7d0
MOV RAX,qword ptr [RBP + -0x30]
LEA RCX,[0x337750]
MOV RCX,qword ptr [RCX]
MOV EDX,dword ptr [RCX]
MOV dword ptr [RAX],EDX
MOV CL,byte ptr [RCX + 0x4]
MOV byte ptr [RAX + 0x4],CL
LAB_0013cb7a:
ADD RSP,0x50
POP RBP
RET
|
void net_get_error(byte *param_1,ulong param_2,void *param_3,long param_4,uint *param_5,
int4 *param_6)
{
int *puVar1;
size_t local_50;
byte *local_40;
if (param_2 < 3) {
*param_5 = 2000;
puVar1 = SQLSTATE_UNKNOWN;
*param_6 = *(int4 *)SQLSTATE_UNKNOWN;
*(int *)(param_6 + 1) = puVar1[4];
}
else {
*param_5 = (uint)*param_1 + (uint)param_1[1] * 0x100 & 0xffff;
local_40 = param_1 + 2;
if (*local_40 == 0x23) {
*param_6 = *(int4 *)(param_1 + 3);
*(byte *)(param_6 + 1) = param_1[7];
local_40 = param_1 + 8;
}
local_50 = param_2 - ((long)local_40 - (long)param_1);
if (param_4 - 1U <= local_50) {
local_50 = param_4 - 1;
}
memcpy(param_3,local_40,local_50);
}
return;
}
| |
43,216 | is_escape_char(char, char) | eloqsql/client/mysqltest.cc | static inline bool is_escape_char(char c, char in_string)
{
if (c != '\\' || in_string == '`') return false;
if (!cur_con) return true;
uint server_status= cur_con->mysql->server_status;
if (server_status & SERVER_STATUS_NO_BACKSLASH_ESCAPES) return false;
return !(server_status & SERVER_STATUS_ANSI_QUOTES && in_string == '"');
} | O0 | cpp | is_escape_char(char, char):
pushq %rbp
movq %rsp, %rbp
movb %sil, %al
movb %dil, %cl
movb %cl, -0x2(%rbp)
movb %al, -0x3(%rbp)
movsbl -0x2(%rbp), %eax
cmpl $0x5c, %eax
jne 0x6d1c2
movsbl -0x3(%rbp), %eax
cmpl $0x60, %eax
jne 0x6d1c8
movb $0x0, -0x1(%rbp)
jmp 0x6d228
cmpq $0x0, 0x44c3d8(%rip) # 0x4b95a8
jne 0x6d1d8
movb $0x1, -0x1(%rbp)
jmp 0x6d228
movq 0x44c3c9(%rip), %rax # 0x4b95a8
movq (%rax), %rax
movl 0x380(%rax), %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
andl $0x200, %eax # imm = 0x200
cmpl $0x0, %eax
je 0x6d1fe
movb $0x0, -0x1(%rbp)
jmp 0x6d228
movl -0x8(%rbp), %ecx
andl $0x8000, %ecx # imm = 0x8000
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x9(%rbp)
je 0x6d21e
movsbl -0x3(%rbp), %eax
cmpl $0x22, %eax
sete %al
movb %al, -0x9(%rbp)
movb -0x9(%rbp), %al
xorb $-0x1, %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nop
| _ZL14is_escape_charcc:
push rbp
mov rbp, rsp
mov al, sil
mov cl, dil
mov [rbp+var_2], cl
mov [rbp+var_3], al
movsx eax, [rbp+var_2]
cmp eax, 5Ch ; '\'
jnz short loc_6D1C2
movsx eax, [rbp+var_3]
cmp eax, 60h ; '`'
jnz short loc_6D1C8
loc_6D1C2:
mov [rbp+var_1], 0
jmp short loc_6D228
loc_6D1C8:
cmp cs:cur_con, 0
jnz short loc_6D1D8
mov [rbp+var_1], 1
jmp short loc_6D228
loc_6D1D8:
mov rax, cs:cur_con
mov rax, [rax]
mov eax, [rax+380h]
mov [rbp+var_8], eax
mov eax, [rbp+var_8]
and eax, 200h
cmp eax, 0
jz short loc_6D1FE
mov [rbp+var_1], 0
jmp short loc_6D228
loc_6D1FE:
mov ecx, [rbp+var_8]
and ecx, 8000h
xor eax, eax
cmp ecx, 0
mov [rbp+var_9], al
jz short loc_6D21E
movsx eax, [rbp+var_3]
cmp eax, 22h ; '"'
setz al
mov [rbp+var_9], al
loc_6D21E:
mov al, [rbp+var_9]
xor al, 0FFh
and al, 1
mov [rbp+var_1], al
loc_6D228:
mov al, [rbp+var_1]
and al, 1
pop rbp
retn
| bool is_escape_char(char a1, char a2)
{
bool v3; // [rsp+1h] [rbp-9h]
int v4; // [rsp+2h] [rbp-8h]
if ( a1 == 92 && a2 != 96 )
{
if ( cur_con )
{
v4 = *(_DWORD *)(*(_QWORD *)cur_con + 896LL);
if ( (v4 & 0x200) != 0 )
{
return 0;
}
else
{
v3 = 0;
if ( (v4 & 0x8000) != 0 )
v3 = a2 == 34;
return !v3;
}
}
else
{
return 1;
}
}
else
{
return 0;
}
}
| is_escape_char:
PUSH RBP
MOV RBP,RSP
MOV AL,SIL
MOV CL,DIL
MOV byte ptr [RBP + -0x2],CL
MOV byte ptr [RBP + -0x3],AL
MOVSX EAX,byte ptr [RBP + -0x2]
CMP EAX,0x5c
JNZ 0x0016d1c2
MOVSX EAX,byte ptr [RBP + -0x3]
CMP EAX,0x60
JNZ 0x0016d1c8
LAB_0016d1c2:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0016d228
LAB_0016d1c8:
CMP qword ptr [0x005b95a8],0x0
JNZ 0x0016d1d8
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0016d228
LAB_0016d1d8:
MOV RAX,qword ptr [0x005b95a8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x380]
MOV dword ptr [RBP + -0x8],EAX
MOV EAX,dword ptr [RBP + -0x8]
AND EAX,0x200
CMP EAX,0x0
JZ 0x0016d1fe
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0016d228
LAB_0016d1fe:
MOV ECX,dword ptr [RBP + -0x8]
AND ECX,0x8000
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x9],AL
JZ 0x0016d21e
MOVSX EAX,byte ptr [RBP + -0x3]
CMP EAX,0x22
SETZ AL
MOV byte ptr [RBP + -0x9],AL
LAB_0016d21e:
MOV AL,byte ptr [RBP + -0x9]
XOR AL,0xff
AND AL,0x1
MOV byte ptr [RBP + -0x1],AL
LAB_0016d228:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
POP RBP
RET
|
/* is_escape_char(char, char) */
int8 is_escape_char(char param_1,char param_2)
{
uint uVar1;
int3 iVar3;
ulong uVar2;
int1 local_11;
int1 local_9;
uVar2 = (ulong)(uint)(int)param_1;
if (((int)param_1 == 0x5c) && (uVar2 = (ulong)(uint)(int)param_2, (int)param_2 != 0x60)) {
if (cur_con == (long *)0x0) {
local_9 = 1;
}
else {
uVar1 = *(uint *)(*cur_con + 0x380) & 0x200;
uVar2 = (ulong)uVar1;
if (uVar1 == 0) {
iVar3 = 0;
local_11 = (*(uint *)(*cur_con + 0x380) & 0x8000) != 0;
if (local_11) {
iVar3 = (int3)(param_2 >> 7);
}
local_11 = local_11 && param_2 == '\"';
uVar2 = (ulong)(CONCAT31(iVar3,local_11) ^ 0xff) & 0xffffffffffffff01;
local_9 = (int1)uVar2;
}
else {
local_9 = 0;
}
}
}
else {
local_9 = 0;
}
return CONCAT71((int7)(uVar2 >> 8),local_9);
}
| |
43,217 | testing::internal::PrettyUnitTestResultPrinter::OnTestIterationStart(testing::UnitTest const&, int) | AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc | void PrettyUnitTestResultPrinter::OnTestIterationStart(
const UnitTest& unit_test, int iteration) {
if (GTEST_FLAG_GET(repeat) != 1)
printf("\nRepeating all tests (iteration %d) . . .\n\n", iteration + 1);
std::string f = GTEST_FLAG_GET(filter);
const char* const filter = f.c_str();
// Prints the filter if it's not *. This reminds the user that some
// tests may be skipped.
if (!String::CStringEquals(filter, kUniversalFilter)) {
ColoredPrintf(GTestColor::kYellow, "Note: %s filter = %s\n", GTEST_NAME_,
filter);
}
if (internal::ShouldShard(kTestTotalShards, kTestShardIndex, false)) {
const int32_t shard_index = Int32FromEnvOrDie(kTestShardIndex, -1);
ColoredPrintf(GTestColor::kYellow, "Note: This is test shard %d of %s.\n",
static_cast<int>(shard_index) + 1,
internal::posix::GetEnv(kTestTotalShards));
}
if (GTEST_FLAG_GET(shuffle)) {
ColoredPrintf(GTestColor::kYellow,
"Note: Randomizing tests' orders with a seed of %d .\n",
unit_test.random_seed());
}
ColoredPrintf(GTestColor::kGreen, "[==========] ");
printf("Running %s from %s.\n",
FormatTestCount(unit_test.test_to_run_count()).c_str(),
FormatTestSuiteCount(unit_test.test_suite_to_run_count()).c_str());
fflush(stdout);
} | O0 | cpp | testing::internal::PrettyUnitTestResultPrinter::OnTestIterationStart(testing::UnitTest const&, int):
subq $0xb8, %rsp
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movl %edx, 0xa4(%rsp)
leaq 0x71cf3(%rip), %rax # 0x9c6a8
cmpl $0x1, (%rax)
je 0x2a9d2
movl 0xa4(%rsp), %esi
addl $0x1, %esi
leaq 0x4a6d4(%rip), %rdi # 0x7509f
movb $0x0, %al
callq 0xb060
leaq 0x80(%rsp), %rdi
leaq 0x71c77(%rip), %rsi # 0x9c658
callq 0x44e70
leaq 0x80(%rsp), %rdi
callq 0xf200
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rdi
leaq 0x4839c(%rip), %rsi # 0x72da0
callq 0x22de0
testb $0x1, %al
jne 0x2aa43
movq 0x78(%rsp), %rcx
leaq 0x4a6b2(%rip), %rsi # 0x750cb
leaq 0x4a6c1(%rip), %rdx # 0x750e1
xorl %eax, %eax
movl $0x3, %edi
callq 0x2ac10
jmp 0x2aa2e
jmp 0x2aa43
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
jmp 0x2abf4
leaq 0x48366(%rip), %rdi # 0x72db0
leaq 0x4837f(%rip), %rsi # 0x72dd0
xorl %edx, %edx
callq 0x2ade0
movb %al, 0x27(%rsp)
jmp 0x2aa5e
movb 0x27(%rsp), %al
testb $0x1, %al
jne 0x2aa68
jmp 0x2aac4
leaq 0x48361(%rip), %rdi # 0x72dd0
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
callq 0x2b4f0
movl %eax, 0x20(%rsp)
jmp 0x2aa7f
movl 0x20(%rsp), %eax
movl %eax, 0x68(%rsp)
movl 0x68(%rsp), %eax
incl %eax
movl %eax, 0x14(%rsp)
leaq 0x48318(%rip), %rdi # 0x72db0
callq 0x47350
movq %rax, 0x18(%rsp)
jmp 0x2aaa4
movq 0x18(%rsp), %rcx
movl 0x14(%rsp), %edx
leaq 0x4a639(%rip), %rsi # 0x750ed
xorl %eax, %eax
movl $0x3, %edi
callq 0x2ac10
jmp 0x2aac2
jmp 0x2aac4
leaq 0x71be3(%rip), %rax # 0x9c6ae
testb $0x1, (%rax)
je 0x2aafe
movq 0xa8(%rsp), %rdi
callq 0x2b5e0
movl %eax, 0x10(%rsp)
jmp 0x2aae3
movl 0x10(%rsp), %edx
leaq 0x4a623(%rip), %rsi # 0x75111
xorl %eax, %eax
movl $0x3, %edi
callq 0x2ac10
jmp 0x2aafc
jmp 0x2aafe
leaq 0x4a641(%rip), %rsi # 0x75146
xorl %eax, %eax
movl $0x2, %edi
callq 0x2ac10
jmp 0x2ab13
movq 0xa8(%rsp), %rdi
callq 0x2b640
movl %eax, 0xc(%rsp)
jmp 0x2ab26
movl 0xc(%rsp), %esi
leaq 0x48(%rsp), %rdi
callq 0x2b600
jmp 0x2ab36
leaq 0x48(%rsp), %rdi
callq 0xf200
movq %rax, (%rsp)
movq 0xa8(%rsp), %rdi
callq 0x2b6a0
movl %eax, 0x8(%rsp)
jmp 0x2ab57
movl 0x8(%rsp), %esi
leaq 0x28(%rsp), %rdi
callq 0x2b660
jmp 0x2ab67
leaq 0x28(%rsp), %rdi
callq 0xf200
movq (%rsp), %rsi
movq %rax, %rdx
leaq 0x4a5d5(%rip), %rdi # 0x75154
xorl %eax, %eax
callq 0xb060
jmp 0x2ab88
leaq 0x28(%rsp), %rdi
callq 0xec60
leaq 0x48(%rsp), %rdi
callq 0xec60
movq 0x713ed(%rip), %rax # 0x9bf90
movq (%rax), %rdi
callq 0xb5c0
jmp 0x2abad
leaq 0x80(%rsp), %rdi
callq 0xec60
addq $0xb8, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
jmp 0x2abea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
leaq 0x28(%rsp), %rdi
callq 0xec60
leaq 0x48(%rsp), %rdi
callq 0xec60
leaq 0x80(%rsp), %rdi
callq 0xec60
movq 0x70(%rsp), %rdi
callq 0xb910
nopl (%rax,%rax)
| _ZN7testing8internal27PrettyUnitTestResultPrinter20OnTestIterationStartERKNS_8UnitTestEi:
sub rsp, 0B8h
mov [rsp+0B8h+var_8], rdi
mov [rsp+0B8h+var_10], rsi
mov [rsp+0B8h+var_14], edx
lea rax, _ZN7testing18FLAGS_gtest_repeatE; testing::FLAGS_gtest_repeat
cmp dword ptr [rax], 1
jz short loc_2A9D2
mov esi, [rsp+0B8h+var_14]
add esi, 1
lea rdi, aRepeatingAllTe; "\nRepeating all tests (iteration %d) . "...
mov al, 0
call _printf
loc_2A9D2:
lea rdi, [rsp+0B8h+var_38]
lea rsi, _ZN7testing18FLAGS_gtest_filterB5cxx11E; testing::FLAGS_gtest_filter
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
lea rdi, [rsp+0B8h+var_38]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov [rsp+0B8h+var_40], rax
mov rdi, [rsp+0B8h+var_40]; this
lea rsi, _ZN7testingL16kUniversalFilterE; "*"
call _ZN7testing8internal6String13CStringEqualsEPKcS3_; testing::internal::String::CStringEquals(char const*,char const*)
test al, 1
jnz short loc_2AA43
mov rcx, [rsp+0B8h+var_40]
lea rsi, aNoteSFilterS; "Note: %s filter = %s\n"
lea rdx, aGoogleTest; "Google Test"
xor eax, eax
mov edi, 3
call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...)
jmp short $+2
loc_2AA2E:
jmp short loc_2AA43
mov rcx, rax
mov eax, edx
mov [rsp+arg_68], rcx
mov [rsp+arg_64], eax
jmp loc_2ABF4
loc_2AA43:
lea rdi, _ZN7testingL16kTestTotalShardsE; "GTEST_TOTAL_SHARDS"
lea rsi, _ZN7testingL15kTestShardIndexE; "GTEST_SHARD_INDEX"
xor edx, edx; char *
call _ZN7testing8internal11ShouldShardEPKcS2_b; testing::internal::ShouldShard(char const*,char const*,bool)
mov [rsp+0B8h+var_91], al
jmp short $+2
loc_2AA5E:
mov al, [rsp+0B8h+var_91]
test al, 1
jnz short loc_2AA68
jmp short loc_2AAC4
loc_2AA68:
lea rdi, _ZN7testingL15kTestShardIndexE; "GTEST_SHARD_INDEX"
mov esi, 0FFFFFFFFh; char *
call _ZN7testing8internal17Int32FromEnvOrDieEPKci; testing::internal::Int32FromEnvOrDie(char const*,int)
mov [rsp+0B8h+var_98], eax
jmp short $+2
loc_2AA7F:
mov eax, [rsp+0B8h+var_98]
mov [rsp+0B8h+var_50], eax
mov eax, [rsp+0B8h+var_50]
inc eax
mov [rsp+0B8h+var_A4], eax
lea rdi, _ZN7testingL16kTestTotalShardsE; "GTEST_TOTAL_SHARDS"
call _ZN7testing8internal5posix6GetEnvEPKc; testing::internal::posix::GetEnv(char const*)
mov [rsp+0B8h+var_A0], rax
jmp short $+2
loc_2AAA4:
mov rcx, [rsp+0B8h+var_A0]
mov edx, [rsp+0B8h+var_A4]
lea rsi, aNoteThisIsTest; "Note: This is test shard %d of %s.\n"
xor eax, eax
mov edi, 3
call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...)
jmp short $+2
loc_2AAC2:
jmp short $+2
loc_2AAC4:
lea rax, _ZN7testing19FLAGS_gtest_shuffleE; testing::FLAGS_gtest_shuffle
test byte ptr [rax], 1
jz short loc_2AAFE
mov rdi, [rsp+0B8h+var_10]; this
call _ZNK7testing8UnitTest11random_seedEv; testing::UnitTest::random_seed(void)
mov [rsp+0B8h+var_A8], eax
jmp short $+2
loc_2AAE3:
mov edx, [rsp+0B8h+var_A8]
lea rsi, aNoteRandomizin; "Note: Randomizing tests' orders with a "...
xor eax, eax
mov edi, 3
call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...)
jmp short $+2
loc_2AAFC:
jmp short $+2
loc_2AAFE:
lea rsi, asc_75146; "[==========] "
xor eax, eax
mov edi, 2
call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...)
jmp short $+2
loc_2AB13:
mov rdi, [rsp+0B8h+var_10]; this
call _ZNK7testing8UnitTest17test_to_run_countEv; testing::UnitTest::test_to_run_count(void)
mov [rsp+0B8h+var_AC], eax
jmp short $+2
loc_2AB26:
mov esi, [rsp+0B8h+var_AC]
lea rdi, [rsp+0B8h+var_70]
call _ZN7testingL15FormatTestCountB5cxx11Ei; testing::FormatTestCount(int)
jmp short $+2
loc_2AB36:
lea rdi, [rsp+0B8h+var_70]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov [rsp+0B8h+var_B8], rax
mov rdi, [rsp+0B8h+var_10]; this
call _ZNK7testing8UnitTest23test_suite_to_run_countEv; testing::UnitTest::test_suite_to_run_count(void)
mov [rsp+0B8h+var_B0], eax
jmp short $+2
loc_2AB57:
mov esi, [rsp+0B8h+var_B0]
lea rdi, [rsp+0B8h+var_90]
call _ZN7testingL20FormatTestSuiteCountB5cxx11Ei; testing::FormatTestSuiteCount(int)
jmp short $+2
loc_2AB67:
lea rdi, [rsp+0B8h+var_90]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rsi, [rsp+0B8h+var_B8]
mov rdx, rax
lea rdi, aRunningSFromS; "Running %s from %s.\n"
xor eax, eax
call _printf
jmp short $+2
loc_2AB88:
lea rdi, [rsp+0B8h+var_90]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0B8h+var_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
jmp short $+2
loc_2ABAD:
lea rdi, [rsp+0B8h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
add rsp, 0B8h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_68], rcx
mov [rsp+arg_64], eax
jmp short loc_2ABEA
mov rcx, rax
mov eax, edx
mov [rsp+arg_68], rcx
mov [rsp+arg_64], eax
lea rdi, [rsp+arg_20]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_2ABEA:
lea rdi, [rsp+arg_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_2ABF4:
lea rdi, [rsp+arg_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, [rsp+arg_68]
call __Unwind_Resume
| OnTestIterationStart:
SUB RSP,0xb8
MOV qword ptr [RSP + 0xb0],RDI
MOV qword ptr [RSP + 0xa8],RSI
MOV dword ptr [RSP + 0xa4],EDX
LEA RAX,[0x19c6a8]
CMP dword ptr [RAX],0x1
JZ 0x0012a9d2
MOV ESI,dword ptr [RSP + 0xa4]
ADD ESI,0x1
LEA RDI,[0x17509f]
MOV AL,0x0
CALL 0x0010b060
LAB_0012a9d2:
LEA RDI,[RSP + 0x80]
LEA RSI,[0x19c658]
CALL 0x00144e70
LEA RDI,[RSP + 0x80]
CALL 0x0010f200
MOV qword ptr [RSP + 0x78],RAX
MOV RDI,qword ptr [RSP + 0x78]
LEA RSI,[0x172da0]
CALL 0x00122de0
TEST AL,0x1
JNZ 0x0012aa43
MOV RCX,qword ptr [RSP + 0x78]
LAB_0012aa12:
LEA RSI,[0x1750cb]
LEA RDX,[0x1750e1]
XOR EAX,EAX
MOV EDI,0x3
CALL 0x0012ac10
JMP 0x0012aa2e
LAB_0012aa2e:
JMP 0x0012aa43
LAB_0012aa43:
LEA RDI,[0x172db0]
LEA RSI,[0x172dd0]
XOR EDX,EDX
CALL 0x0012ade0
MOV byte ptr [RSP + 0x27],AL
JMP 0x0012aa5e
LAB_0012aa5e:
MOV AL,byte ptr [RSP + 0x27]
TEST AL,0x1
JNZ 0x0012aa68
JMP 0x0012aac4
LAB_0012aa68:
LEA RDI,[0x172dd0]
MOV ESI,0xffffffff
CALL 0x0012b4f0
MOV dword ptr [RSP + 0x20],EAX
JMP 0x0012aa7f
LAB_0012aa7f:
MOV EAX,dword ptr [RSP + 0x20]
MOV dword ptr [RSP + 0x68],EAX
MOV EAX,dword ptr [RSP + 0x68]
INC EAX
MOV dword ptr [RSP + 0x14],EAX
LEA RDI,[0x172db0]
CALL 0x00147350
MOV qword ptr [RSP + 0x18],RAX
JMP 0x0012aaa4
LAB_0012aaa4:
MOV RCX,qword ptr [RSP + 0x18]
MOV EDX,dword ptr [RSP + 0x14]
LEA RSI,[0x1750ed]
XOR EAX,EAX
MOV EDI,0x3
CALL 0x0012ac10
JMP 0x0012aac2
LAB_0012aac2:
JMP 0x0012aac4
LAB_0012aac4:
LEA RAX,[0x19c6ae]
TEST byte ptr [RAX],0x1
JZ 0x0012aafe
MOV RDI,qword ptr [RSP + 0xa8]
CALL 0x0012b5e0
MOV dword ptr [RSP + 0x10],EAX
JMP 0x0012aae3
LAB_0012aae3:
MOV EDX,dword ptr [RSP + 0x10]
LEA RSI,[0x175111]
XOR EAX,EAX
MOV EDI,0x3
CALL 0x0012ac10
JMP 0x0012aafc
LAB_0012aafc:
JMP 0x0012aafe
LAB_0012aafe:
LEA RSI,[0x175146]
XOR EAX,EAX
MOV EDI,0x2
CALL 0x0012ac10
JMP 0x0012ab13
LAB_0012ab13:
MOV RDI,qword ptr [RSP + 0xa8]
CALL 0x0012b640
MOV dword ptr [RSP + 0xc],EAX
JMP 0x0012ab26
LAB_0012ab26:
MOV ESI,dword ptr [RSP + 0xc]
LEA RDI,[RSP + 0x48]
CALL 0x0012b600
JMP 0x0012ab36
LAB_0012ab36:
LEA RDI,[RSP + 0x48]
CALL 0x0010f200
MOV qword ptr [RSP],RAX
MOV RDI,qword ptr [RSP + 0xa8]
LAB_0012ab4c:
CALL 0x0012b6a0
MOV dword ptr [RSP + 0x8],EAX
JMP 0x0012ab57
LAB_0012ab57:
MOV ESI,dword ptr [RSP + 0x8]
LEA RDI,[RSP + 0x28]
CALL 0x0012b660
JMP 0x0012ab67
LAB_0012ab67:
LEA RDI,[RSP + 0x28]
CALL 0x0010f200
MOV RSI,qword ptr [RSP]
MOV RDX,RAX
LAB_0012ab78:
LEA RDI,[0x175154]
XOR EAX,EAX
CALL 0x0010b060
JMP 0x0012ab88
LAB_0012ab88:
LEA RDI,[RSP + 0x28]
CALL 0x0010ec60
LEA RDI,[RSP + 0x48]
CALL 0x0010ec60
MOV RAX,qword ptr [0x0019bf90]
MOV RDI,qword ptr [RAX]
LAB_0012aba6:
CALL 0x0010b5c0
LAB_0012abab:
JMP 0x0012abad
LAB_0012abad:
LEA RDI,[RSP + 0x80]
CALL 0x0010ec60
ADD RSP,0xb8
RET
|
/* testing::internal::PrettyUnitTestResultPrinter::OnTestIterationStart(testing::UnitTest const&,
int) */
void __thiscall
testing::internal::PrettyUnitTestResultPrinter::OnTestIterationStart
(PrettyUnitTestResultPrinter *this,UnitTest *param_1,int param_2)
{
byte bVar1;
int4 uVar2;
int iVar3;
ulong uVar4;
int8 uVar5;
int8 uVar6;
testing local_90 [32];
testing local_70 [32];
int local_50;
char *local_40;
string local_38 [36];
int local_14;
UnitTest *local_10;
PrettyUnitTestResultPrinter *local_8;
local_14 = param_2;
local_10 = param_1;
local_8 = this;
if (FLAGS_gtest_repeat != 1) {
printf("\nRepeating all tests (iteration %d) . . .\n\n",(ulong)(param_2 + 1));
}
std::__cxx11::string::string(local_38,(string *)FLAGS_gtest_filter_abi_cxx11_);
local_40 = (char *)std::__cxx11::string::c_str(local_38);
uVar4 = String::CStringEquals(local_40,"*");
if ((uVar4 & 1) == 0) {
/* try { // try from 0012aa12 to 0012ab33 has its CatchHandler @ 0012aa30 */
ColoredPrintf(3,"Note: %s filter = %s\n","Google Test",local_40);
}
bVar1 = ShouldShard("GTEST_TOTAL_SHARDS","GTEST_SHARD_INDEX",false);
if ((bVar1 & 1) != 0) {
local_50 = Int32FromEnvOrDie("GTEST_SHARD_INDEX",-1);
iVar3 = local_50 + 1;
uVar5 = posix::GetEnv("GTEST_TOTAL_SHARDS");
ColoredPrintf(3,"Note: This is test shard %d of %s.\n",iVar3,uVar5);
}
if ((FLAGS_gtest_shuffle & 1) != 0) {
uVar2 = UnitTest::random_seed(local_10);
ColoredPrintf(3,"Note: Randomizing tests\' orders with a seed of %d .\n",uVar2);
}
ColoredPrintf(2,"[==========] ");
iVar3 = UnitTest::test_to_run_count(local_10);
FormatTestCount_abi_cxx11_(local_70,iVar3);
uVar5 = std::__cxx11::string::c_str((string *)local_70);
/* try { // try from 0012ab4c to 0012ab64 has its CatchHandler @ 0012abc2 */
iVar3 = UnitTest::test_suite_to_run_count(local_10);
FormatTestSuiteCount_abi_cxx11_(local_90,iVar3);
uVar6 = std::__cxx11::string::c_str((string *)local_90);
/* try { // try from 0012ab78 to 0012ab85 has its CatchHandler @ 0012abd2 */
printf("Running %s from %s.\n",uVar5,uVar6);
std::__cxx11::string::~string((string *)local_90);
std::__cxx11::string::~string((string *)local_70);
/* try { // try from 0012aba6 to 0012abaa has its CatchHandler @ 0012aa30 */
fflush(*(FILE **)PTR_stdout_0019bf90);
std::__cxx11::string::~string(local_38);
return;
}
| ||
43,218 | my_mb_wc_utf8mb4_no_range | eloqsql/strings/ctype-utf8.c | static int
my_mb_wc_utf8mb4_no_range(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s)
{
uchar c;
c= s[0];
if (c < 0x80)
{
*pwc = c;
return 1;
}
if (c < 0xc2)
return MY_CS_ILSEQ;
if (c < 0xe0)
{
if (!IS_CONTINUATION_BYTE(s[1]))
return MY_CS_ILSEQ;
*pwc= UTF8MB2_CODE(c, s[1]);
return 2;
}
if (c < 0xf0)
{
if (!IS_UTF8MB3_STEP2(c, s[1], s[2]))
return MY_CS_ILSEQ;
*pwc= UTF8MB3_CODE(c, s[1], s[2]);
return 3;
}
else if (c < 0xf5)
{
if (!IS_UTF8MB4_STEP2(c, s[1], s[2], s[3]))
return MY_CS_ILSEQ;
*pwc= UTF8MB4_CODE(c, s[1], s[2], s[3]);
return 4;
}
return MY_CS_ILSEQ;
} | O0 | c | my_mb_wc_utf8mb4_no_range:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movb (%rax), %al
movb %al, -0x21(%rbp)
movzbl -0x21(%rbp), %eax
cmpl $0x80, %eax
jge 0x67c1d
movzbl -0x21(%rbp), %eax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x67e19
movzbl -0x21(%rbp), %eax
cmpl $0xc2, %eax
jge 0x67c34
movl $0x0, -0x4(%rbp)
jmp 0x67e19
movzbl -0x21(%rbp), %eax
cmpl $0xe0, %eax
jge 0x67c90
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jl 0x67c5d
movl $0x0, -0x4(%rbp)
jmp 0x67e19
movzbl -0x21(%rbp), %eax
andl $0x1f, %eax
movslq %eax, %rcx
shlq $0x6, %rcx
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cltq
orq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0x67e19
movzbl -0x21(%rbp), %eax
cmpl $0xf0, %eax
jge 0x67d32
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x67cdd
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x67cdd
movzbl -0x21(%rbp), %eax
cmpl $0xe1, %eax
jge 0x67ce9
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xa0, %eax
jge 0x67ce9
movl $0x0, -0x4(%rbp)
jmp 0x67e19
movzbl -0x21(%rbp), %eax
andl $0xf, %eax
movslq %eax, %rcx
shlq $0xc, %rcx
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cltq
shlq $0x6, %rax
orq %rax, %rcx
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cltq
orq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x3, -0x4(%rbp)
jmp 0x67e19
movzbl -0x21(%rbp), %eax
cmpl $0xf5, %eax
jge 0x67e10
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x67dab
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x67dab
movq -0x20(%rbp), %rax
movzbl 0x3(%rax), %eax
xorl $0x80, %eax
cmpl $0x40, %eax
jge 0x67dab
movzbl -0x21(%rbp), %eax
cmpl $0xf1, %eax
jge 0x67d91
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x90, %eax
jl 0x67dab
movzbl -0x21(%rbp), %eax
cmpl $0xf3, %eax
jle 0x67db4
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x8f, %eax
jle 0x67db4
movl $0x0, -0x4(%rbp)
jmp 0x67e19
movzbl -0x21(%rbp), %eax
andl $0x7, %eax
movslq %eax, %rcx
shlq $0x12, %rcx
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
xorl $0x80, %eax
cltq
shlq $0xc, %rax
orq %rax, %rcx
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %eax
xorl $0x80, %eax
cltq
shlq $0x6, %rax
orq %rax, %rcx
movq -0x20(%rbp), %rax
movzbl 0x3(%rax), %eax
xorl $0x80, %eax
cltq
orq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x4, -0x4(%rbp)
jmp 0x67e19
jmp 0x67e12
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
| my_mb_wc_utf8mb4_no_range:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_20]
mov al, [rax]
mov [rbp+var_21], al
movzx eax, [rbp+var_21]
cmp eax, 80h
jge short loc_67C1D
movzx eax, [rbp+var_21]
mov ecx, eax
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 1
jmp loc_67E19
loc_67C1D:
movzx eax, [rbp+var_21]
cmp eax, 0C2h
jge short loc_67C34
mov [rbp+var_4], 0
jmp loc_67E19
loc_67C34:
movzx eax, [rbp+var_21]
cmp eax, 0E0h
jge short loc_67C90
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jl short loc_67C5D
mov [rbp+var_4], 0
jmp loc_67E19
loc_67C5D:
movzx eax, [rbp+var_21]
and eax, 1Fh
movsxd rcx, eax
shl rcx, 6
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cdqe
or rcx, rax
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 2
jmp loc_67E19
loc_67C90:
movzx eax, [rbp+var_21]
cmp eax, 0F0h
jge loc_67D32
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_67CDD
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_67CDD
movzx eax, [rbp+var_21]
cmp eax, 0E1h
jge short loc_67CE9
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 0A0h
jge short loc_67CE9
loc_67CDD:
mov [rbp+var_4], 0
jmp loc_67E19
loc_67CE9:
movzx eax, [rbp+var_21]
and eax, 0Fh
movsxd rcx, eax
shl rcx, 0Ch
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cdqe
shl rax, 6
or rcx, rax
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cdqe
or rcx, rax
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 3
jmp loc_67E19
loc_67D32:
movzx eax, [rbp+var_21]
cmp eax, 0F5h
jge loc_67E10
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_67DAB
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_67DAB
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+3]
xor eax, 80h
cmp eax, 40h ; '@'
jge short loc_67DAB
movzx eax, [rbp+var_21]
cmp eax, 0F1h
jge short loc_67D91
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 90h
jl short loc_67DAB
loc_67D91:
movzx eax, [rbp+var_21]
cmp eax, 0F3h
jle short loc_67DB4
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 8Fh
jle short loc_67DB4
loc_67DAB:
mov [rbp+var_4], 0
jmp short loc_67E19
loc_67DB4:
movzx eax, [rbp+var_21]
and eax, 7
movsxd rcx, eax
shl rcx, 12h
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
xor eax, 80h
cdqe
shl rax, 0Ch
or rcx, rax
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+2]
xor eax, 80h
cdqe
shl rax, 6
or rcx, rax
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+3]
xor eax, 80h
cdqe
or rcx, rax
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 4
jmp short loc_67E19
loc_67E10:
jmp short $+2
loc_67E12:
mov [rbp+var_4], 0
loc_67E19:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_mb_wc_utf8mb4_no_range(long long a1, unsigned long long *a2, unsigned __int8 *a3)
{
unsigned __int8 v4; // [rsp+1h] [rbp-21h]
v4 = *a3;
if ( *a3 >= 0x80u )
{
if ( v4 >= 0xC2u )
{
if ( v4 >= 0xE0u )
{
if ( v4 >= 0xF0u )
{
if ( v4 >= 0xF5u )
{
return 0;
}
else if ( (a3[1] ^ 0x80) < 64
&& (a3[2] ^ 0x80) < 64
&& (a3[3] ^ 0x80) < 64
&& (v4 >= 0xF1u || a3[1] >= 0x90u)
&& (v4 <= 0xF3u || a3[1] <= 0x8Fu) )
{
*a2 = a3[3] ^ 0x80u | ((long long)(a3[2] ^ 0x80u) << 6) | ((long long)(a3[1] ^ 0x80u) << 12) | ((unsigned long long)(v4 & 7) << 18);
return 4;
}
else
{
return 0;
}
}
else if ( (a3[1] ^ 0x80) < 64 && (a3[2] ^ 0x80) < 64 && (v4 >= 0xE1u || a3[1] >= 0xA0u) )
{
*a2 = a3[2] ^ 0x80u | ((long long)(a3[1] ^ 0x80u) << 6) | ((unsigned long long)(v4 & 0xF) << 12);
return 3;
}
else
{
return 0;
}
}
else if ( (a3[1] ^ 0x80) < 64 )
{
*a2 = a3[1] ^ 0x80u | ((unsigned long long)(v4 & 0x1F) << 6);
return 2;
}
else
{
return 0;
}
}
else
{
return 0;
}
}
else
{
*a2 = v4;
return 1;
}
}
| my_mb_wc_utf8mb4_no_range:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x20]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x21],AL
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0x80
JGE 0x00167c1d
MOVZX EAX,byte ptr [RBP + -0x21]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00167e19
LAB_00167c1d:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xc2
JGE 0x00167c34
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00167e19
LAB_00167c34:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xe0
JGE 0x00167c90
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CMP EAX,0x40
JL 0x00167c5d
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00167e19
LAB_00167c5d:
MOVZX EAX,byte ptr [RBP + -0x21]
AND EAX,0x1f
MOVSXD RCX,EAX
SHL RCX,0x6
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CDQE
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x2
JMP 0x00167e19
LAB_00167c90:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xf0
JGE 0x00167d32
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x00167cdd
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x00167cdd
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xe1
JGE 0x00167ce9
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xa0
JGE 0x00167ce9
LAB_00167cdd:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00167e19
LAB_00167ce9:
MOVZX EAX,byte ptr [RBP + -0x21]
AND EAX,0xf
MOVSXD RCX,EAX
SHL RCX,0xc
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CDQE
SHL RAX,0x6
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CDQE
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x3
JMP 0x00167e19
LAB_00167d32:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xf5
JGE 0x00167e10
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x00167dab
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x00167dab
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x3]
XOR EAX,0x80
CMP EAX,0x40
JGE 0x00167dab
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xf1
JGE 0x00167d91
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x90
JL 0x00167dab
LAB_00167d91:
MOVZX EAX,byte ptr [RBP + -0x21]
CMP EAX,0xf3
JLE 0x00167db4
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x8f
JLE 0x00167db4
LAB_00167dab:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00167e19
LAB_00167db4:
MOVZX EAX,byte ptr [RBP + -0x21]
AND EAX,0x7
MOVSXD RCX,EAX
SHL RCX,0x12
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
XOR EAX,0x80
CDQE
SHL RAX,0xc
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x2]
XOR EAX,0x80
CDQE
SHL RAX,0x6
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x3]
XOR EAX,0x80
CDQE
OR RCX,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x4
JMP 0x00167e19
LAB_00167e10:
JMP 0x00167e12
LAB_00167e12:
MOV dword ptr [RBP + -0x4],0x0
LAB_00167e19:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_mb_wc_utf8mb4_no_range(int8 param_1,ulong *param_2,byte *param_3)
{
byte bVar1;
int4 local_c;
bVar1 = *param_3;
if (bVar1 < 0x80) {
*param_2 = (ulong)bVar1;
local_c = 1;
}
else if (bVar1 < 0xc2) {
local_c = 0;
}
else if (bVar1 < 0xe0) {
if ((param_3[1] ^ 0x80) < 0x40) {
*param_2 = (long)(int)(bVar1 & 0x1f) << 6 | (long)(int)(param_3[1] ^ 0x80);
local_c = 2;
}
else {
local_c = 0;
}
}
else if (bVar1 < 0xf0) {
if ((((param_3[1] ^ 0x80) < 0x40) && ((param_3[2] ^ 0x80) < 0x40)) &&
((0xe0 < bVar1 || (0x9f < param_3[1])))) {
*param_2 = (long)(int)(bVar1 & 0xf) << 0xc | (long)(int)(param_3[1] ^ 0x80) << 6 |
(long)(int)(param_3[2] ^ 0x80);
local_c = 3;
}
else {
local_c = 0;
}
}
else if (bVar1 < 0xf5) {
if ((((((param_3[1] ^ 0x80) < 0x40) && ((param_3[2] ^ 0x80) < 0x40)) &&
((param_3[3] ^ 0x80) < 0x40)) && ((0xf0 < bVar1 || (0x8f < param_3[1])))) &&
((bVar1 < 0xf4 || (param_3[1] < 0x90)))) {
*param_2 = (long)(int)(bVar1 & 7) << 0x12 | (long)(int)(param_3[1] ^ 0x80) << 0xc |
(long)(int)(param_3[2] ^ 0x80) << 6 | (long)(int)(param_3[3] ^ 0x80);
local_c = 4;
}
else {
local_c = 0;
}
}
else {
local_c = 0;
}
return local_c;
}
| |
43,219 | my_mb_wc_utf8mb4_no_range | eloqsql/strings/ctype-utf8.c | static int
my_mb_wc_utf8mb4_no_range(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s)
{
uchar c;
c= s[0];
if (c < 0x80)
{
*pwc = c;
return 1;
}
if (c < 0xc2)
return MY_CS_ILSEQ;
if (c < 0xe0)
{
if (!IS_CONTINUATION_BYTE(s[1]))
return MY_CS_ILSEQ;
*pwc= UTF8MB2_CODE(c, s[1]);
return 2;
}
if (c < 0xf0)
{
if (!IS_UTF8MB3_STEP2(c, s[1], s[2]))
return MY_CS_ILSEQ;
*pwc= UTF8MB3_CODE(c, s[1], s[2]);
return 3;
}
else if (c < 0xf5)
{
if (!IS_UTF8MB4_STEP2(c, s[1], s[2], s[3]))
return MY_CS_ILSEQ;
*pwc= UTF8MB4_CODE(c, s[1], s[2], s[3]);
return 4;
}
return MY_CS_ILSEQ;
} | O3 | c | my_mb_wc_utf8mb4_no_range:
pushq %rbp
movq %rsp, %rbp
movzbl (%rsi), %ecx
testb %cl, %cl
js 0x51304
movl $0x1, %eax
movq %rcx, (%rdi)
jmp 0x5130b
xorl %eax, %eax
cmpb $-0x3e, %cl
jae 0x5130d
popq %rbp
retq
cmpb $-0x21, %cl
ja 0x51330
movzbl 0x1(%rsi), %edx
xorl $0x80, %edx
cmpb $0x3f, %dl
ja 0x5130b
andl $0x1f, %ecx
shll $0x6, %ecx
orl %edx, %ecx
movl $0x2, %eax
jmp 0x512ff
cmpb $-0x11, %cl
ja 0x5137c
movzbl 0x1(%rsi), %edx
cmpb $-0x41, %dl
jg 0x5130b
movzbl 0x2(%rsi), %esi
cmpb $-0x41, %sil
jg 0x5130b
cmpl $0xe0, %ecx
sete %r8b
cmpb $-0x60, %dl
setb %r9b
testb %r9b, %r8b
jne 0x5130b
shll $0xc, %ecx
movzwl %cx, %eax
andl $0x3f, %edx
shll $0x6, %edx
orl %eax, %edx
andl $0x3f, %esi
orq %rdx, %rsi
movl $0x3, %eax
movq %rsi, %rcx
jmp 0x512ff
cmpb $-0xc, %cl
ja 0x5130b
movzbl 0x1(%rsi), %r8d
cmpb $-0x41, %r8b
jg 0x5130b
movzbl 0x2(%rsi), %edx
cmpb $-0x41, %dl
jg 0x5130b
movzbl 0x3(%rsi), %esi
cmpb $-0x41, %sil
jg 0x5130b
cmpl $0xf0, %ecx
sete %r9b
cmpb $-0x70, %r8b
setb %r10b
testb %r10b, %r9b
jne 0x5130b
cmpl $0xf4, %ecx
sete %r9b
cmpb $-0x70, %r8b
setae %r10b
testb %r10b, %r9b
jne 0x5130b
andl $0x7, %ecx
shll $0x12, %ecx
andl $0x3f, %r8d
shll $0xc, %r8d
orl %ecx, %r8d
andl $0x3f, %edx
shll $0x6, %edx
orl %r8d, %edx
andl $0x3f, %esi
orq %rdx, %rsi
movl $0x4, %eax
jmp 0x51377
| my_mb_wc_utf8mb4_no_range:
push rbp
mov rbp, rsp
movzx ecx, byte ptr [rsi]
test cl, cl
js short loc_51304
mov eax, 1
loc_512FF:
mov [rdi], rcx
jmp short loc_5130B
loc_51304:
xor eax, eax
cmp cl, 0C2h
jnb short loc_5130D
loc_5130B:
pop rbp
retn
loc_5130D:
cmp cl, 0DFh
ja short loc_51330
movzx edx, byte ptr [rsi+1]
xor edx, 80h
cmp dl, 3Fh ; '?'
ja short loc_5130B
and ecx, 1Fh
shl ecx, 6
or ecx, edx
mov eax, 2
jmp short loc_512FF
loc_51330:
cmp cl, 0EFh
ja short loc_5137C
movzx edx, byte ptr [rsi+1]
cmp dl, 0BFh
jg short loc_5130B
movzx esi, byte ptr [rsi+2]
cmp sil, 0BFh
jg short loc_5130B
cmp ecx, 0E0h
setz r8b
cmp dl, 0A0h
setb r9b
test r8b, r9b
jnz short loc_5130B
shl ecx, 0Ch
movzx eax, cx
and edx, 3Fh
shl edx, 6
or edx, eax
and esi, 3Fh
or rsi, rdx
mov eax, 3
loc_51377:
mov rcx, rsi
jmp short loc_512FF
loc_5137C:
cmp cl, 0F4h
ja short loc_5130B
movzx r8d, byte ptr [rsi+1]
cmp r8b, 0BFh
jg loc_5130B
movzx edx, byte ptr [rsi+2]
cmp dl, 0BFh
jg loc_5130B
movzx esi, byte ptr [rsi+3]
cmp sil, 0BFh
jg loc_5130B
cmp ecx, 0F0h
setz r9b
cmp r8b, 90h
setb r10b
test r9b, r10b
jnz loc_5130B
cmp ecx, 0F4h
setz r9b
cmp r8b, 90h
setnb r10b
test r9b, r10b
jnz loc_5130B
and ecx, 7
shl ecx, 12h
and r8d, 3Fh
shl r8d, 0Ch
or r8d, ecx
and edx, 3Fh
shl edx, 6
or edx, r8d
and esi, 3Fh
or rsi, rdx
mov eax, 4
jmp loc_51377
| long long my_mb_wc_utf8mb4_no_range(unsigned long long *a1, unsigned __int8 *a2)
{
unsigned long long v2; // rcx
long long result; // rax
char v4; // dl
char v5; // si
unsigned long long v6; // rsi
char v7; // r8
char v8; // dl
char v9; // si
v2 = *a2;
if ( (v2 & 0x80u) == 0LL )
{
result = 1LL;
LABEL_3:
*a1 = v2;
return result;
}
result = 0LL;
if ( (unsigned __int8)v2 >= 0xC2u )
{
if ( (unsigned __int8)v2 > 0xDFu )
{
if ( (unsigned __int8)v2 > 0xEFu )
{
if ( (unsigned __int8)v2 > 0xF4u )
return result;
v7 = a2[1];
if ( v7 > -65 )
return result;
v8 = a2[2];
if ( v8 > -65 )
return result;
v9 = a2[3];
if ( v9 > -65
|| (unsigned __int8)v7 < 0x90u && (_DWORD)v2 == 240
|| (unsigned __int8)v7 >= 0x90u && (_DWORD)v2 == 244 )
{
return result;
}
v6 = ((v2 & 7) << 18) | ((unsigned __int8)(v7 & 0x3F) << 12) | ((unsigned __int8)(v8 & 0x3F) << 6) | v9 & 0x3F;
result = 4LL;
}
else
{
v4 = a2[1];
if ( v4 > -65 )
return result;
v5 = a2[2];
if ( v5 > -65 || (unsigned __int8)v4 < 0xA0u && (_DWORD)v2 == 224 )
return result;
v6 = (unsigned __int16)((_WORD)v2 << 12) | ((unsigned __int8)(v4 & 0x3F) << 6) | (unsigned long long)(v5 & 0x3F);
result = 3LL;
}
v2 = v6;
goto LABEL_3;
}
if ( (a2[1] ^ 0x80u) <= 0x3F )
{
v2 = a2[1] ^ 0x80 | ((unsigned __int8)(v2 & 0x1F) << 6);
result = 2LL;
goto LABEL_3;
}
}
return result;
}
| my_mb_wc_utf8mb4_no_range:
PUSH RBP
MOV RBP,RSP
MOVZX ECX,byte ptr [RSI]
TEST CL,CL
JS 0x00151304
MOV EAX,0x1
LAB_001512ff:
MOV qword ptr [RDI],RCX
JMP 0x0015130b
LAB_00151304:
XOR EAX,EAX
CMP CL,0xc2
JNC 0x0015130d
LAB_0015130b:
POP RBP
RET
LAB_0015130d:
CMP CL,0xdf
JA 0x00151330
MOVZX EDX,byte ptr [RSI + 0x1]
XOR EDX,0x80
CMP DL,0x3f
JA 0x0015130b
AND ECX,0x1f
SHL ECX,0x6
OR ECX,EDX
MOV EAX,0x2
JMP 0x001512ff
LAB_00151330:
CMP CL,0xef
JA 0x0015137c
MOVZX EDX,byte ptr [RSI + 0x1]
CMP DL,0xbf
JG 0x0015130b
MOVZX ESI,byte ptr [RSI + 0x2]
CMP SIL,0xbf
JG 0x0015130b
CMP ECX,0xe0
SETZ R8B
CMP DL,0xa0
SETC R9B
TEST R8B,R9B
JNZ 0x0015130b
SHL ECX,0xc
MOVZX EAX,CX
AND EDX,0x3f
SHL EDX,0x6
OR EDX,EAX
AND ESI,0x3f
OR RSI,RDX
MOV EAX,0x3
LAB_00151377:
MOV RCX,RSI
JMP 0x001512ff
LAB_0015137c:
CMP CL,0xf4
JA 0x0015130b
MOVZX R8D,byte ptr [RSI + 0x1]
CMP R8B,0xbf
JG 0x0015130b
MOVZX EDX,byte ptr [RSI + 0x2]
CMP DL,0xbf
JG 0x0015130b
MOVZX ESI,byte ptr [RSI + 0x3]
CMP SIL,0xbf
JG 0x0015130b
CMP ECX,0xf0
SETZ R9B
CMP R8B,0x90
SETC R10B
TEST R9B,R10B
JNZ 0x0015130b
CMP ECX,0xf4
SETZ R9B
CMP R8B,0x90
SETNC R10B
TEST R9B,R10B
JNZ 0x0015130b
AND ECX,0x7
SHL ECX,0x12
AND R8D,0x3f
SHL R8D,0xc
OR R8D,ECX
AND EDX,0x3f
SHL EDX,0x6
OR EDX,R8D
AND ESI,0x3f
OR RSI,RDX
MOV EAX,0x4
JMP 0x00151377
|
int8 my_mb_wc_utf8mb4_no_range(ulong *param_1,byte *param_2)
{
byte bVar1;
byte bVar2;
int8 uVar3;
uint uVar4;
ulong uVar5;
bVar1 = *param_2;
uVar5 = (ulong)bVar1;
if ((char)bVar1 < '\0') {
if (bVar1 < 0xc2) {
return 0;
}
uVar4 = (uint)bVar1;
if (bVar1 < 0xe0) {
if (0x3f < (byte)(param_2[1] ^ 0x80)) {
return 0;
}
uVar5 = (ulong)((uVar4 & 0x1f) << 6 | param_2[1] ^ 0x80);
uVar3 = 2;
}
else {
if (bVar1 < 0xf0) {
bVar2 = param_2[1];
if (-0x41 < (char)bVar2) {
return 0;
}
if (-0x41 < (char)param_2[2]) {
return 0;
}
if (uVar4 == 0xe0 && bVar2 < 0xa0) {
return 0;
}
uVar4 = param_2[2] & 0x3f | (bVar2 & 0x3f) << 6 | (bVar1 & 0xf) << 0xc;
uVar3 = 3;
}
else {
if (0xf4 < bVar1) {
return 0;
}
bVar1 = param_2[1];
if (-0x41 < (char)bVar1) {
return 0;
}
if (-0x41 < (char)param_2[2]) {
return 0;
}
if (-0x41 < (char)param_2[3]) {
return 0;
}
if (uVar4 == 0xf0 && bVar1 < 0x90) {
return 0;
}
if (uVar4 == 0xf4 && 0x8f < bVar1) {
return 0;
}
uVar4 = param_2[3] & 0x3f |
(param_2[2] & 0x3f) << 6 | (bVar1 & 0x3f) << 0xc | (uVar4 & 7) << 0x12;
uVar3 = 4;
}
uVar5 = (ulong)uVar4;
}
}
else {
uVar3 = 1;
}
*param_1 = uVar5;
return uVar3;
}
| |
43,220 | my_strnxfrm_simple_nopad | eloqsql/strings/ctype-simple.c | size_t my_strnxfrm_simple_nopad(CHARSET_INFO * cs,
uchar *dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags)
{
uchar *d0= dst;
dst= d0 + my_strnxfrm_simple_internal(cs, dst, dstlen, &nweights,
src, srclen);
return my_strxfrm_pad_desc_and_reverse_nopad(cs, d0, dst, d0 + dstlen,
nweights, flags, 0);
} | O0 | c | my_strnxfrm_simple_nopad:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x28(%rbp), %r8
movq -0x30(%rbp), %r9
leaq -0x1c(%rbp), %rcx
callq 0x50bf0
movq %rax, %rcx
movq -0x40(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x38(%rbp), %rcx
addq -0x18(%rbp), %rcx
movl -0x1c(%rbp), %r8d
movl 0x10(%rbp), %r9d
xorl %eax, %eax
movl $0x0, (%rsp)
callq 0x50f50
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
| my_strnxfrm_simple_nopad:
push rbp
mov rbp, rsp
sub rsp, 50h
mov eax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+var_10]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov [rbp+var_40], rax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov r8, [rbp+var_28]
mov r9, [rbp+var_30]
lea rcx, [rbp+var_1C]
call my_strnxfrm_simple_internal
mov rcx, rax
mov rax, [rbp+var_40]
add rax, rcx
mov [rbp+var_10], rax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_38]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_38]
add rcx, [rbp+var_18]
mov r8d, [rbp+var_1C]
mov r9d, [rbp+arg_0]
xor eax, eax
mov [rsp+50h+var_50], 0
call my_strxfrm_pad_desc_and_reverse_nopad
add rsp, 50h
pop rbp
retn
| long long my_strnxfrm_simple_nopad(
long long a1,
unsigned __int8 *a2,
unsigned long long a3,
unsigned int a4,
unsigned __int8 *a5,
unsigned long long a6,
int a7)
{
_BYTE *v7; // rax
unsigned int v9; // [rsp+34h] [rbp-1Ch] BYREF
unsigned long long v10; // [rsp+38h] [rbp-18h]
unsigned __int8 *v11; // [rsp+40h] [rbp-10h]
long long v12; // [rsp+48h] [rbp-8h]
v12 = a1;
v11 = a2;
v10 = a3;
v9 = a4;
v7 = my_strnxfrm_simple_internal(a1, a2, a3, &v9, a5, a6);
v11 = &a2[(_QWORD)v7];
return my_strxfrm_pad_desc_and_reverse_nopad(v12, (_DWORD)a2, (int)v7 + (int)a2, (int)v10 + (int)a2, v9, a7, 0);
}
| my_strnxfrm_simple_nopad:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV EAX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV R8,qword ptr [RBP + -0x28]
MOV R9,qword ptr [RBP + -0x30]
LEA RCX,[RBP + -0x1c]
CALL 0x00150bf0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x38]
ADD RCX,qword ptr [RBP + -0x18]
MOV R8D,dword ptr [RBP + -0x1c]
MOV R9D,dword ptr [RBP + 0x10]
XOR EAX,EAX
MOV dword ptr [RSP],0x0
CALL 0x00150f50
ADD RSP,0x50
POP RBP
RET
|
void my_strnxfrm_simple_nopad
(int8 param_1,long param_2,long param_3,int4 param_4,int8 param_5,
int8 param_6,int4 param_7)
{
int4 local_24;
long local_20;
long local_18;
int8 local_10;
local_24 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
local_18 = my_strnxfrm_simple_internal(param_1,param_2,param_3,&local_24,param_5,param_6);
local_18 = param_2 + local_18;
my_strxfrm_pad_desc_and_reverse_nopad
(local_10,param_2,local_18,param_2 + local_20,local_24,param_7,0);
return;
}
| |
43,221 | JS_ToPrimitiveFree | bluesky950520[P]quickjs/quickjs.c | static JSValue JS_ToPrimitiveFree(JSContext *ctx, JSValue val, int hint)
{
int i;
BOOL force_ordinary;
JSAtom method_name;
JSValue method, ret;
if (JS_VALUE_GET_TAG(val) != JS_TAG_OBJECT)
return val;
force_ordinary = hint & HINT_FORCE_ORDINARY;
hint &= ~HINT_FORCE_ORDINARY;
if (!force_ordinary) {
method = JS_GetProperty(ctx, val, JS_ATOM_Symbol_toPrimitive);
if (JS_IsException(method))
goto exception;
/* ECMA says *If exoticToPrim is not undefined* but tests in
test262 use null as a non callable converter */
if (!JS_IsUndefined(method) && !JS_IsNull(method)) {
JSAtom atom;
JSValue arg;
switch(hint) {
case HINT_STRING:
atom = JS_ATOM_string;
break;
case HINT_NUMBER:
atom = JS_ATOM_number;
break;
default:
case HINT_NONE:
atom = JS_ATOM_default;
break;
}
arg = JS_AtomToString(ctx, atom);
ret = JS_CallFree(ctx, method, val, 1, &arg);
JS_FreeValue(ctx, arg);
if (JS_IsException(ret))
goto exception;
JS_FreeValue(ctx, val);
if (JS_VALUE_GET_TAG(ret) != JS_TAG_OBJECT)
return ret;
JS_FreeValue(ctx, ret);
return JS_ThrowTypeError(ctx, "toPrimitive");
}
}
if (hint != HINT_STRING)
hint = HINT_NUMBER;
for(i = 0; i < 2; i++) {
if ((i ^ hint) == 0) {
method_name = JS_ATOM_toString;
} else {
method_name = JS_ATOM_valueOf;
}
method = JS_GetProperty(ctx, val, method_name);
if (JS_IsException(method))
goto exception;
if (JS_IsFunction(ctx, method)) {
ret = JS_CallFree(ctx, method, val, 0, NULL);
if (JS_IsException(ret))
goto exception;
if (JS_VALUE_GET_TAG(ret) != JS_TAG_OBJECT) {
JS_FreeValue(ctx, val);
return ret;
}
JS_FreeValue(ctx, ret);
} else {
JS_FreeValue(ctx, method);
}
}
JS_ThrowTypeError(ctx, "toPrimitive");
exception:
JS_FreeValue(ctx, val);
return JS_EXCEPTION;
} | O1 | c | JS_ToPrimitiveFree:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r13
movq %rsi, %rbp
cmpl $-0x1, %r13d
jne 0x3e14a
movq %rdi, %r14
movl %ecx, %ebx
andl $-0x11, %ebx
testb $0x10, %cl
movq %r13, 0x20(%rsp)
movq %rbp, 0x28(%rsp)
jne 0x3e041
movl $0x0, 0x8(%rsp)
movq $0x0, (%rsp)
movq %r14, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movl $0xd3, %ecx
movq %rbp, %r8
movq %r13, %r9
callq 0x22fa3
leal -0x2(%rdx), %ecx
cmpl $0x2, %ecx
jae 0x3e182
xorl %eax, %eax
testl %ebx, %ebx
setne %al
movl %eax, 0x34(%rsp)
xorl %ebx, %ebx
movq %r14, %r15
xorl %eax, %eax
cmpl %ebx, 0x34(%rsp)
setne %al
leal 0x38(%rax,%rax), %ecx
movl $0x0, 0x8(%rsp)
movq $0x0, (%rsp)
movq %r15, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movq %rbp, %r8
movq %r13, %r9
callq 0x22fa3
movq %rdx, %rbp
cmpl $0x6, %ebp
je 0x3e263
movq %rax, %r14
movq %r15, %rdi
movq %rax, %rsi
movq %rbp, %rdx
callq 0x22dbe
testl %eax, %eax
je 0x3e110
movl $0x0, 0x38(%rsp)
movq $0x3, 0x40(%rsp)
movups 0x38(%rsp), %xmm0
movups %xmm0, (%rsp)
movl $0x2, 0x18(%rsp)
movq $0x0, 0x10(%rsp)
movq %r15, %rdi
movq %r14, %rsi
movq %rbp, %rdx
movq 0x28(%rsp), %rcx
movq 0x20(%rsp), %r8
xorl %r9d, %r9d
callq 0x284ca
movq %rax, %r12
movq %rdx, %r13
movq 0x18(%r15), %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0x1d8c6
cmpl $-0x1, %r13d
jne 0x3e159
movq 0x18(%r15), %rdi
movq %r12, %rsi
movq %r13, %rdx
jmp 0x3e11a
movq 0x18(%r15), %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0x1d8c6
incl %ebx
cmpl $0x1, %ebx
movq 0x20(%rsp), %r13
movq 0x28(%rsp), %rbp
je 0x3e051
leaq 0x61078(%rip), %rsi # 0x9f1b3
movq %r15, %rdi
xorl %eax, %eax
callq 0x22567
jmp 0x3e263
movq %rbp, %rcx
shrq $0x20, %rcx
movq %rbp, %r12
jmp 0x3e285
cmpl $0x6, %r13d
je 0x3e263
movq 0x18(%r15), %rdi
movq 0x28(%rsp), %rsi
movq 0x20(%rsp), %rdx
callq 0x1d8c6
movq %r12, %rcx
shrq $0x20, %rcx
jmp 0x3e285
movq %rdx, %r12
cmpl $0x6, %r12d
movq %r14, %r15
je 0x3e263
cmpl $0x1, %ebx
movl $0x47, %edx
movl $0x16, %ecx
cmovel %edx, %ecx
testl %ebx, %ebx
movq %rax, %r13
movl $0x49, %esi
cmovnel %ecx, %esi
movq %r15, %rdi
movl $0x1, %edx
callq 0x2075a
leaq 0x38(%rsp), %rbx
movq %rax, (%rbx)
movq %rdx, 0x8(%rbx)
movq %rbx, (%rsp)
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq 0x28(%rsp), %rbp
movq %rbp, %rcx
movq 0x20(%rsp), %r8
movl $0x1, %r9d
callq 0x22c9d
movq %rax, %r12
movq %rdx, %r13
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq 0x18(%r15), %rdi
callq 0x1d8c6
movl %r13d, %ebx
cmpq $0x6, %rbx
jne 0x3e211
xorl %r12d, %r12d
jmp 0x3e25b
movq 0x18(%r15), %rdi
movq %rbp, %rsi
movq 0x20(%rsp), %rdx
callq 0x1d8c6
cmpl $-0x1, %ebx
jne 0x3e254
movq 0x18(%r15), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x1d8c6
leaq 0x60f76(%rip), %rsi # 0x9f1b3
xorl %r12d, %r12d
movq %r15, %rdi
xorl %eax, %eax
callq 0x22567
movl $0x6, %r13d
xorl %ecx, %ecx
jmp 0x3e25b
movq %r12, %rcx
shrq $0x20, %rcx
cmpl $0x6, %ebx
movq %r14, %r15
jne 0x3e285
movq 0x18(%r15), %rdi
movq 0x28(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq %rcx, %rbx
callq 0x1d8c6
movq %rbx, %rcx
movl $0x6, %r13d
xorl %r12d, %r12d
shlq $0x20, %rcx
movl %r12d, %eax
orq %rcx, %rax
movq %r13, %rdx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| JS_ToPrimitiveFree:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r13, rdx
mov rbp, rsi
cmp r13d, 0FFFFFFFFh
jnz loc_3E14A
mov r14, rdi
mov ebx, ecx
and ebx, 0FFFFFFEFh
test cl, 10h
mov [rsp+78h+var_58], r13
mov [rsp+78h+var_50], rbp
jnz short loc_3E041
mov dword ptr [rsp+78h+var_78+8], 0
mov qword ptr [rsp+78h+var_78], 0
mov rdi, r14
mov rsi, rbp
mov rdx, r13
mov ecx, 0D3h
mov r8, rbp
mov r9, r13
call JS_GetPropertyInternal2
lea ecx, [rdx-2]
cmp ecx, 2
jnb loc_3E182
loc_3E041:
xor eax, eax
test ebx, ebx
setnz al
mov [rsp+78h+var_44], eax
xor ebx, ebx
mov r15, r14
loc_3E051:
xor eax, eax
cmp [rsp+78h+var_44], ebx
setnz al
lea ecx, [rax+rax+38h]
mov dword ptr [rsp+78h+var_78+8], 0
mov qword ptr [rsp+78h+var_78], 0
mov rdi, r15
mov rsi, rbp
mov rdx, r13
mov r8, rbp
mov r9, r13
call JS_GetPropertyInternal2
mov rbp, rdx
cmp ebp, 6
jz loc_3E263
mov r14, rax
mov rdi, r15
mov rsi, rax
mov rdx, rbp
call JS_IsFunction
test eax, eax
jz short loc_3E110
mov dword ptr [rsp+78h+var_40], 0
mov qword ptr [rsp+78h+var_40+8], 3
movups xmm0, [rsp+78h+var_40]
movups [rsp+78h+var_78], xmm0
mov [rsp+78h+var_60], 2
mov [rsp+78h+var_68], 0
mov rdi, r15
mov rsi, r14
mov rdx, rbp
mov rcx, [rsp+78h+var_50]
mov r8, [rsp+78h+var_58]
xor r9d, r9d
call JS_CallInternal
mov r12, rax
mov r13, rdx
mov rdi, [r15+18h]
mov rsi, r14
mov rdx, rbp
call JS_FreeValueRT
cmp r13d, 0FFFFFFFFh
jnz short loc_3E159
mov rdi, [r15+18h]
mov rsi, r12
mov rdx, r13
jmp short loc_3E11A
loc_3E110:
mov rdi, [r15+18h]
mov rsi, r14
mov rdx, rbp
loc_3E11A:
call JS_FreeValueRT
inc ebx
cmp ebx, 1
mov r13, [rsp+78h+var_58]
mov rbp, [rsp+78h+var_50]
jz loc_3E051
lea rsi, aToprimitive; "toPrimitive"
mov rdi, r15
xor eax, eax
call JS_ThrowTypeError
jmp loc_3E263
loc_3E14A:
mov rcx, rbp
shr rcx, 20h
mov r12, rbp
jmp loc_3E285
loc_3E159:
cmp r13d, 6
jz loc_3E263
mov rdi, [r15+18h]
mov rsi, [rsp+78h+var_50]
mov rdx, [rsp+78h+var_58]
call JS_FreeValueRT
mov rcx, r12
shr rcx, 20h
jmp loc_3E285
loc_3E182:
mov r12, rdx
cmp r12d, 6
mov r15, r14
jz loc_3E263
cmp ebx, 1
mov edx, 47h ; 'G'
mov ecx, 16h
cmovz ecx, edx
test ebx, ebx
mov r13, rax
mov esi, 49h ; 'I'
cmovnz esi, ecx
mov rdi, r15
mov edx, 1
call __JS_AtomToValue
lea rbx, [rsp+78h+var_40]
mov [rbx], rax
mov [rbx+8], rdx
mov qword ptr [rsp+78h+var_78], rbx
mov rdi, r15
mov rsi, r13
mov rdx, r12
mov rbp, [rsp+78h+var_50]
mov rcx, rbp
mov r8, [rsp+78h+var_58]
mov r9d, 1
call JS_CallFree
mov r12, rax
mov r13, rdx
mov rsi, [rbx]
mov rdx, [rbx+8]
mov rdi, [r15+18h]
call JS_FreeValueRT
mov ebx, r13d
cmp rbx, 6
jnz short loc_3E211
xor r12d, r12d
jmp short loc_3E25B
loc_3E211:
mov rdi, [r15+18h]
mov rsi, rbp
mov rdx, [rsp+78h+var_58]
call JS_FreeValueRT
cmp ebx, 0FFFFFFFFh
jnz short loc_3E254
mov rdi, [r15+18h]
mov rsi, r12
mov rdx, r13
call JS_FreeValueRT
lea rsi, aToprimitive; "toPrimitive"
xor r12d, r12d
mov rdi, r15
xor eax, eax
call JS_ThrowTypeError
mov r13d, 6
xor ecx, ecx
jmp short loc_3E25B
loc_3E254:
mov rcx, r12
shr rcx, 20h
loc_3E25B:
cmp ebx, 6
mov r15, r14
jnz short loc_3E285
loc_3E263:
mov rdi, [r15+18h]
mov rsi, [rsp+78h+var_50]
mov rdx, [rsp+78h+var_58]
mov rbx, rcx
call JS_FreeValueRT
mov rcx, rbx
mov r13d, 6
xor r12d, r12d
loc_3E285:
shl rcx, 20h
mov eax, r12d
or rax, rcx
mov rdx, r13
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| unsigned long long JS_ToPrimitiveFree(
long long a1,
unsigned long long a2,
long long a3,
int a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
long long v12; // r13
long long v13; // rbp
unsigned int v14; // ebx
unsigned long long v15; // rax
long long v16; // rdx
unsigned long long v17; // rcx
int v18; // ebx
long long v19; // r15
unsigned long long PropertyInternal2; // rax
long long v21; // rdx
long long v22; // rbp
_DWORD *v23; // r14
__m128 v24; // xmm4
__m128 v25; // xmm5
unsigned long long v26; // r12
long long v27; // rdx
long long v28; // r13
long long v29; // rdi
_DWORD *v30; // rsi
long long v31; // rdx
long long v32; // rdx
long long v33; // rcx
long long v34; // r8
long long v35; // r9
__m128 v36; // xmm4
__m128 v37; // xmm5
long long v38; // r12
int v39; // ecx
_DWORD *v40; // r13
int v41; // esi
__m128 v42; // rax
long long v43; // rdx
long long v44; // r13
long long v45; // rdx
long long v46; // rcx
long long v47; // r8
long long v48; // r9
__m128 v49; // xmm4
__m128 v50; // xmm5
unsigned long long v51; // rbx
char v53; // [rsp+0h] [rbp-78h]
char v54; // [rsp+0h] [rbp-78h]
int v57; // [rsp+34h] [rbp-44h]
__m128 v58; // [rsp+38h] [rbp-40h] BYREF
v12 = a3;
v13 = a2;
if ( (_DWORD)a3 == -1 )
{
v14 = a4 & 0xFFFFFFEF;
if ( (a4 & 0x10) != 0
|| (v15 = JS_GetPropertyInternal2(a1, a2, a3, 0xD3u, a2, a3, 0LL, 0),
v17 = (unsigned int)(v16 - 2),
(unsigned int)v17 < 2) )
{
v57 = v14 != 0;
v18 = 0;
v19 = a1;
while ( 1 )
{
PropertyInternal2 = JS_GetPropertyInternal2(
v19,
v13,
v12,
2 * (unsigned int)(v57 != v18) + 56,
v13,
v12,
0LL,
0);
v22 = v21;
if ( (_DWORD)v21 == 6 )
goto LABEL_26;
v23 = (_DWORD *)PropertyInternal2;
if ( (unsigned int)JS_IsFunction(v19, PropertyInternal2, v21) )
{
v58.m128_i32[0] = 0;
v58.m128_u64[1] = 3LL;
a5 = v58;
v26 = JS_CallInternal(v19, (long long)v23, v22, a2, a3, 0LL, v58, a6, a7, a8, v24, v25, a11, a12, 0, 3, 0LL, 2u);
v28 = v27;
JS_FreeValueRT(*(_QWORD *)(v19 + 24), v23, v22);
if ( (_DWORD)v28 != -1 )
{
if ( (_DWORD)v28 == 6 )
goto LABEL_26;
JS_FreeValueRT(*(_QWORD *)(v19 + 24), (_DWORD *)a2, a3);
v17 = HIDWORD(v26);
return (v17 << 32) | (unsigned int)v26;
}
v29 = *(_QWORD *)(v19 + 24);
v30 = (_DWORD *)v26;
v31 = v28;
}
else
{
v29 = *(_QWORD *)(v19 + 24);
v30 = v23;
v31 = v22;
}
JS_FreeValueRT(v29, v30, v31);
++v18;
v12 = a3;
v13 = a2;
if ( v18 != 1 )
{
JS_ThrowTypeError(v19, (long long)"toPrimitive", v32, v33, v34, v35, a5, a6, a7, a8, v36, v37, a11, a12, v53);
goto LABEL_26;
}
}
}
v38 = v16;
v19 = a1;
if ( (_DWORD)v16 == 6 )
goto LABEL_26;
v39 = 22;
if ( v14 == 1 )
v39 = 71;
v40 = (_DWORD *)v15;
v41 = 73;
if ( v14 )
v41 = v39;
v42.m128_u64[0] = _JS_AtomToValue(a1, v41, 1);
v58 = v42;
v26 = JS_CallFree(a1, v40, v38, a2, a3, 1, (long long)&v58);
v44 = v43;
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v58.m128_u64[0], v58.m128_i64[1]);
if ( (unsigned int)v44 == 6LL )
{
LODWORD(v26) = 0;
}
else
{
JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)a2, a3);
if ( (_DWORD)v44 == -1 )
{
JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v26, v44);
LODWORD(v26) = 0;
JS_ThrowTypeError(a1, (long long)"toPrimitive", v45, v46, v47, v48, a5, a6, a7, a8, v49, v50, a11, a12, v54);
v17 = 0LL;
}
else
{
v17 = HIDWORD(v26);
}
}
v19 = a1;
if ( (_DWORD)v44 == 6 )
{
LABEL_26:
v51 = v17;
JS_FreeValueRT(*(_QWORD *)(v19 + 24), (_DWORD *)a2, a3);
v17 = v51;
LODWORD(v26) = 0;
}
}
else
{
v17 = HIDWORD(a2);
LODWORD(v26) = a2;
}
return (v17 << 32) | (unsigned int)v26;
}
| JS_ToPrimitiveFree:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R13,RDX
MOV RBP,RSI
CMP R13D,-0x1
JNZ 0x0013e14a
MOV R14,RDI
MOV EBX,ECX
AND EBX,0xffffffef
TEST CL,0x10
MOV qword ptr [RSP + 0x20],R13
MOV qword ptr [RSP + 0x28],RBP
JNZ 0x0013e041
MOV dword ptr [RSP + 0x8],0x0
MOV qword ptr [RSP],0x0
MOV RDI,R14
MOV RSI,RBP
MOV RDX,R13
MOV ECX,0xd3
MOV R8,RBP
MOV R9,R13
CALL 0x00122fa3
LEA ECX,[RDX + -0x2]
CMP ECX,0x2
JNC 0x0013e182
LAB_0013e041:
XOR EAX,EAX
TEST EBX,EBX
SETNZ AL
MOV dword ptr [RSP + 0x34],EAX
XOR EBX,EBX
MOV R15,R14
LAB_0013e051:
XOR EAX,EAX
CMP dword ptr [RSP + 0x34],EBX
SETNZ AL
LEA ECX,[RAX + RAX*0x1 + 0x38]
MOV dword ptr [RSP + 0x8],0x0
MOV qword ptr [RSP],0x0
MOV RDI,R15
MOV RSI,RBP
MOV RDX,R13
MOV R8,RBP
MOV R9,R13
CALL 0x00122fa3
MOV RBP,RDX
CMP EBP,0x6
JZ 0x0013e263
MOV R14,RAX
MOV RDI,R15
MOV RSI,RAX
MOV RDX,RBP
CALL 0x00122dbe
TEST EAX,EAX
JZ 0x0013e110
MOV dword ptr [RSP + 0x38],0x0
MOV qword ptr [RSP + 0x40],0x3
MOVUPS XMM0,xmmword ptr [RSP + 0x38]
MOVUPS xmmword ptr [RSP],XMM0
MOV dword ptr [RSP + 0x18],0x2
MOV qword ptr [RSP + 0x10],0x0
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBP
MOV RCX,qword ptr [RSP + 0x28]
MOV R8,qword ptr [RSP + 0x20]
XOR R9D,R9D
CALL 0x001284ca
MOV R12,RAX
MOV R13,RDX
MOV RDI,qword ptr [R15 + 0x18]
MOV RSI,R14
MOV RDX,RBP
CALL 0x0011d8c6
CMP R13D,-0x1
JNZ 0x0013e159
MOV RDI,qword ptr [R15 + 0x18]
MOV RSI,R12
MOV RDX,R13
JMP 0x0013e11a
LAB_0013e110:
MOV RDI,qword ptr [R15 + 0x18]
MOV RSI,R14
MOV RDX,RBP
LAB_0013e11a:
CALL 0x0011d8c6
INC EBX
CMP EBX,0x1
MOV R13,qword ptr [RSP + 0x20]
MOV RBP,qword ptr [RSP + 0x28]
JZ 0x0013e051
LEA RSI,[0x19f1b3]
MOV RDI,R15
XOR EAX,EAX
CALL 0x00122567
JMP 0x0013e263
LAB_0013e14a:
MOV RCX,RBP
SHR RCX,0x20
MOV R12,RBP
JMP 0x0013e285
LAB_0013e159:
CMP R13D,0x6
JZ 0x0013e263
MOV RDI,qword ptr [R15 + 0x18]
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x20]
CALL 0x0011d8c6
MOV RCX,R12
SHR RCX,0x20
JMP 0x0013e285
LAB_0013e182:
MOV R12,RDX
CMP R12D,0x6
MOV R15,R14
JZ 0x0013e263
CMP EBX,0x1
MOV EDX,0x47
MOV ECX,0x16
CMOVZ ECX,EDX
TEST EBX,EBX
MOV R13,RAX
MOV ESI,0x49
CMOVNZ ESI,ECX
MOV RDI,R15
MOV EDX,0x1
CALL 0x0012075a
LEA RBX,[RSP + 0x38]
MOV qword ptr [RBX],RAX
MOV qword ptr [RBX + 0x8],RDX
MOV qword ptr [RSP],RBX
MOV RDI,R15
MOV RSI,R13
MOV RDX,R12
MOV RBP,qword ptr [RSP + 0x28]
MOV RCX,RBP
MOV R8,qword ptr [RSP + 0x20]
MOV R9D,0x1
CALL 0x00122c9d
MOV R12,RAX
MOV R13,RDX
MOV RSI,qword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x8]
MOV RDI,qword ptr [R15 + 0x18]
CALL 0x0011d8c6
MOV EBX,R13D
CMP RBX,0x6
JNZ 0x0013e211
XOR R12D,R12D
JMP 0x0013e25b
LAB_0013e211:
MOV RDI,qword ptr [R15 + 0x18]
MOV RSI,RBP
MOV RDX,qword ptr [RSP + 0x20]
CALL 0x0011d8c6
CMP EBX,-0x1
JNZ 0x0013e254
MOV RDI,qword ptr [R15 + 0x18]
MOV RSI,R12
MOV RDX,R13
CALL 0x0011d8c6
LEA RSI,[0x19f1b3]
XOR R12D,R12D
MOV RDI,R15
XOR EAX,EAX
CALL 0x00122567
MOV R13D,0x6
XOR ECX,ECX
JMP 0x0013e25b
LAB_0013e254:
MOV RCX,R12
SHR RCX,0x20
LAB_0013e25b:
CMP EBX,0x6
MOV R15,R14
JNZ 0x0013e285
LAB_0013e263:
MOV RDI,qword ptr [R15 + 0x18]
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x20]
MOV RBX,RCX
CALL 0x0011d8c6
MOV RCX,RBX
MOV R13D,0x6
XOR R12D,R12D
LAB_0013e285:
SHL RCX,0x20
MOV EAX,R12D
OR RAX,RCX
MOV RDX,R13
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16] JS_ToPrimitiveFree(long param_1,ulong param_2,int8 param_3,uint param_4)
{
int8 uVar1;
int iVar2;
uint uVar3;
ulong uVar4;
int8 uVar5;
uint uVar6;
int8 uVar7;
ulong uVar8;
ulong uVar9;
bool bVar10;
int1 auVar11 [16];
int1 auVar12 [16];
int1 local_40 [16];
auVar11._8_8_ = param_3;
auVar11._0_8_ = param_2;
if ((int)param_3 != -1) {
uVar4 = param_2 >> 0x20;
goto LAB_0013e285;
}
uVar6 = param_4 & 0xffffffef;
if ((param_4 & 0x10) == 0) {
auVar11 = JS_GetPropertyInternal2(param_1,param_2,param_3,0xd3,param_2,param_3,0,0);
uVar3 = auVar11._8_4_ - 2;
uVar4 = (ulong)uVar3;
if (uVar3 < 2) goto LAB_0013e041;
if (auVar11._8_4_ != 6) {
uVar5 = 0x16;
if (uVar6 == 1) {
uVar5 = 0x47;
}
uVar7 = 0x49;
if (uVar6 != 0) {
uVar7 = uVar5;
}
local_40 = __JS_AtomToValue(param_1,uVar7,1);
uVar4 = param_2;
auVar12 = JS_CallFree(param_1,auVar11._0_8_,auVar11._8_8_,param_2,param_3,1,local_40);
uVar9 = auVar12._8_8_;
uVar8 = auVar12._0_8_;
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_40._0_8_,local_40._8_8_);
if ((uVar9 & 0xffffffff) == 6) {
uVar8 = 0;
}
else {
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),param_2,param_3);
if (auVar12._8_4_ == -1) {
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar8,uVar9);
uVar8 = 0;
JS_ThrowTypeError(param_1,"toPrimitive");
uVar9 = 6;
uVar4 = 0;
}
else {
uVar4 = uVar8 >> 0x20;
}
}
auVar11._8_8_ = uVar9;
auVar11._0_8_ = uVar8;
if (auVar12._8_4_ != 6) goto LAB_0013e285;
}
}
else {
LAB_0013e041:
uVar3 = 0;
do {
bVar10 = (uVar6 != 0) != uVar3;
uVar4 = (ulong)(bVar10 + 0x38 + (uint)bVar10);
auVar11 = JS_GetPropertyInternal2(param_1,param_2,param_3,uVar4,param_2,param_3,0,0);
uVar7 = auVar11._8_8_;
uVar5 = auVar11._0_8_;
if (auVar11._8_4_ == 6) goto LAB_0013e263;
iVar2 = JS_IsFunction(param_1,uVar5,uVar7);
uVar1 = local_40._0_8_;
if (iVar2 == 0) {
uVar5 = *(int8 *)(param_1 + 0x18);
}
else {
local_40._0_8_ = local_40._0_8_ & 0xffffffff00000000;
local_40._8_8_ = 3;
uVar4 = param_2;
auVar11 = JS_CallInternal(param_1,uVar5,uVar7,param_2,param_3,0,uVar1 & 0xffffffff00000000,3
,0,2);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar5,uVar7);
if (auVar11._8_4_ != -1) {
if (auVar11._8_4_ == 6) goto LAB_0013e263;
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),param_2,param_3);
uVar4 = auVar11._0_8_ >> 0x20;
goto LAB_0013e285;
}
uVar5 = *(int8 *)(param_1 + 0x18);
}
JS_FreeValueRT(uVar5,auVar11._0_8_,auVar11._8_8_);
uVar3 = uVar3 + 1;
} while (uVar3 == 1);
JS_ThrowTypeError(param_1,"toPrimitive");
}
LAB_0013e263:
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),param_2,param_3);
auVar11 = ZEXT816(6) << 0x40;
LAB_0013e285:
auVar12._0_8_ = auVar11._0_8_ & 0xffffffff | uVar4 << 0x20;
auVar12._8_8_ = auVar11._8_8_;
return auVar12;
}
| |
43,222 | JS_ToPrimitiveFree | bluesky950520[P]quickjs/quickjs.c | static JSValue JS_ToPrimitiveFree(JSContext *ctx, JSValue val, int hint)
{
int i;
BOOL force_ordinary;
JSAtom method_name;
JSValue method, ret;
if (JS_VALUE_GET_TAG(val) != JS_TAG_OBJECT)
return val;
force_ordinary = hint & HINT_FORCE_ORDINARY;
hint &= ~HINT_FORCE_ORDINARY;
if (!force_ordinary) {
method = JS_GetProperty(ctx, val, JS_ATOM_Symbol_toPrimitive);
if (JS_IsException(method))
goto exception;
/* ECMA says *If exoticToPrim is not undefined* but tests in
test262 use null as a non callable converter */
if (!JS_IsUndefined(method) && !JS_IsNull(method)) {
JSAtom atom;
JSValue arg;
switch(hint) {
case HINT_STRING:
atom = JS_ATOM_string;
break;
case HINT_NUMBER:
atom = JS_ATOM_number;
break;
default:
case HINT_NONE:
atom = JS_ATOM_default;
break;
}
arg = JS_AtomToString(ctx, atom);
ret = JS_CallFree(ctx, method, val, 1, &arg);
JS_FreeValue(ctx, arg);
if (JS_IsException(ret))
goto exception;
JS_FreeValue(ctx, val);
if (JS_VALUE_GET_TAG(ret) != JS_TAG_OBJECT)
return ret;
JS_FreeValue(ctx, ret);
return JS_ThrowTypeError(ctx, "toPrimitive");
}
}
if (hint != HINT_STRING)
hint = HINT_NUMBER;
for(i = 0; i < 2; i++) {
if ((i ^ hint) == 0) {
method_name = JS_ATOM_toString;
} else {
method_name = JS_ATOM_valueOf;
}
method = JS_GetProperty(ctx, val, method_name);
if (JS_IsException(method))
goto exception;
if (JS_IsFunction(ctx, method)) {
ret = JS_CallFree(ctx, method, val, 0, NULL);
if (JS_IsException(ret))
goto exception;
if (JS_VALUE_GET_TAG(ret) != JS_TAG_OBJECT) {
JS_FreeValue(ctx, val);
return ret;
}
JS_FreeValue(ctx, ret);
} else {
JS_FreeValue(ctx, method);
}
}
JS_ThrowTypeError(ctx, "toPrimitive");
exception:
JS_FreeValue(ctx, val);
return JS_EXCEPTION;
} | O3 | c | JS_ToPrimitiveFree:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, 0x28(%rsp)
cmpl $-0x1, %ebx
jne 0x3f82c
movl %ecx, %ebp
andl $-0x11, %ebp
testb $0x10, %cl
jne 0x3f68b
movl $0x0, 0x8(%rsp)
movq $0x0, (%rsp)
movq 0x28(%rsp), %rdi
movq %r15, %rsi
movq %rbx, %rdx
movl $0xd3, %ecx
movq %r15, %r8
movq %rbx, %r9
callq 0x2384b
movq %rax, %r12
leal -0x2(%rdx), %eax
cmpl $0x2, %eax
jae 0x3f844
xorl %r13d, %r13d
testl %ebp, %ebp
setne %r13b
xorl %eax, %eax
movb $0x1, %r14b
movl %r13d, 0x34(%rsp)
xorl %ecx, %ecx
cmpl %r13d, %eax
setne %cl
leal 0x38(,%rcx,2), %ecx
movl $0x0, 0x8(%rsp)
movq $0x0, (%rsp)
movq 0x28(%rsp), %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r15, %r8
movq %rbx, %r9
callq 0x2384b
movq %rax, %r12
movq %rdx, %rbp
movl %ebp, %eax
cmpq $0x6, %rax
je 0x3f968
cmpl $-0x1, %eax
jne 0x3f7d6
movzwl 0x6(%r12), %eax
cmpl $0xd, %eax
je 0x3f730
cmpl $0x30, %eax
jne 0x3f709
movq 0x30(%r12), %rax
movzbl 0x20(%rax), %eax
jmp 0x3f728
movq 0x28(%rsp), %rcx
movq 0x18(%rcx), %rcx
movq 0x80(%rcx), %rcx
leaq (%rax,%rax,4), %rdx
xorl %eax, %eax
cmpq $0x0, 0x18(%rcx,%rdx,8)
setne %al
testl %eax, %eax
je 0x3f7d6
movq %rbx, %r8
movq %r15, %rcx
movl $0x0, 0x38(%rsp)
movq $0x3, 0x40(%rsp)
movups 0x38(%rsp), %xmm0
movups %xmm0, (%rsp)
movl $0x2, 0x18(%rsp)
movq $0x0, 0x10(%rsp)
movq 0x28(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
movq %rbp, %rdx
xorl %r9d, %r9d
callq 0x28b06
movq %rax, %r9
movq %rdx, %r8
movq 0x18(%r13), %rdi
movl (%r12), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r12)
cmpl $0x1, %eax
jg 0x3f7a8
movq %r12, %rsi
movq %rbp, %rdx
movq %r8, %r12
movq %r9, %r13
callq 0x219cc
movq %r13, %r9
movq %r12, %r8
cmpl $-0x1, %r8d
jne 0x3f962
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rdi
movl (%r9), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r9)
cmpl $0x1, %eax
movl 0x34(%rsp), %r13d
jg 0x3f7ff
movq %r9, %rsi
movq %r8, %rdx
jmp 0x3f7fa
cmpl $-0x9, %ebp
jb 0x3f7ff
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rdi
movl (%r12), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r12)
cmpl $0x1, %eax
jg 0x3f7ff
movq %r12, %rsi
movq %rbp, %rdx
callq 0x219cc
movl $0x1, %eax
testb $0x1, %r14b
movl $0x0, %r14d
jne 0x3f69e
leaq 0x62958(%rip), %rsi # 0xa2173
movq 0x28(%rsp), %rdi
xorl %eax, %eax
callq 0x22d8b
jmp 0x3f968
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %r15, %rcx
movq %r15, %r9
movq %rbx, %r8
jmp 0x3f99b
movq %rdx, %r13
cmpl $0x6, %r13d
je 0x3f968
cmpl $0x1, %ebp
movl $0x47, %eax
movl $0x16, %ecx
cmovel %eax, %ecx
testl %ebp, %ebp
movl $0x49, %esi
cmovnel %ecx, %esi
movq 0x28(%rsp), %rbp
movq %rbp, %rdi
movl $0x1, %edx
callq 0x20eb3
leaq 0x38(%rsp), %r14
movq %rax, (%r14)
movq %rdx, 0x8(%r14)
movq %r14, (%rsp)
movq %rbp, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r15, %rcx
movq %rbx, %r8
movl $0x1, %r9d
callq 0x234e7
movq %rax, %r9
movq %rdx, %r8
movq 0x8(%r14), %rdx
cmpl $-0x9, %edx
jb 0x3f8e1
movq 0x38(%rsp), %rsi
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rdi
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jg 0x3f8e1
movq %r8, %r14
movq %r9, %r12
callq 0x219cc
movq %r12, %r9
movq %r14, %r8
movl %r8d, %r14d
cmpq $0x6, %r14
je 0x3f968
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rdi
movl (%r15), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r15)
cmpl $0x1, %eax
jg 0x3f918
movq %r15, %rsi
movq %rbx, %rdx
movq %r8, %rbx
movq %r9, %r15
callq 0x219cc
movq %r15, %r9
movq %rbx, %r8
cmpl $-0x1, %r14d
jne 0x3f9e1
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rdi
movl (%r9), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r9)
cmpl $0x1, %eax
jg 0x3f944
movq %r9, %rsi
movq %r8, %rdx
callq 0x219cc
leaq 0x62828(%rip), %rsi # 0xa2173
movq 0x28(%rsp), %rdi
xorl %eax, %eax
callq 0x22d8b
xorl %r9d, %r9d
movl $0x6, %r8d
jmp 0x3f999
cmpl $0x6, %r8d
jne 0x3f9b3
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rdi
movl (%r15), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r15)
movl $0x6, %r8d
cmpl $0x1, %eax
jg 0x3f996
movq %r15, %rsi
movq %rbx, %rdx
callq 0x219cc
movl $0x6, %r8d
xorl %r9d, %r9d
xorl %ecx, %ecx
movl %r9d, %eax
orq %rcx, %rax
movq %r8, %rdx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x28(%rsp), %rax
movq 0x18(%rax), %rdi
movl (%r15), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r15)
cmpl $0x1, %eax
jg 0x3f9e1
movq %r15, %rsi
movq %rbx, %rdx
movq %r8, %rbx
movq %r9, %r14
callq 0x219cc
movq %r14, %r9
movq %rbx, %r8
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r9, %rcx
andq %rax, %rcx
jmp 0x3f99b
| JS_ToPrimitiveFree:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rbx, rdx
mov r15, rsi
mov [rsp+78h+var_50], rdi
cmp ebx, 0FFFFFFFFh
jnz loc_3F82C
mov ebp, ecx
and ebp, 0FFFFFFEFh
test cl, 10h
jnz short loc_3F68B
mov dword ptr [rsp+78h+var_78+8], 0
mov qword ptr [rsp+78h+var_78], 0
mov rdi, [rsp+78h+var_50]
mov rsi, r15
mov rdx, rbx
mov ecx, 0D3h
mov r8, r15
mov r9, rbx
call JS_GetPropertyInternal2
mov r12, rax
lea eax, [rdx-2]
cmp eax, 2
jnb loc_3F844
loc_3F68B:
xor r13d, r13d
test ebp, ebp
setnz r13b
xor eax, eax
mov r14b, 1
mov [rsp+78h+var_44], r13d
loc_3F69E:
xor ecx, ecx
cmp eax, r13d
setnz cl
lea ecx, ds:38h[rcx*2]
mov dword ptr [rsp+78h+var_78+8], 0
mov qword ptr [rsp+78h+var_78], 0
mov rdi, [rsp+78h+var_50]
mov rsi, r15
mov rdx, rbx
mov r8, r15
mov r9, rbx
call JS_GetPropertyInternal2
mov r12, rax
mov rbp, rdx
mov eax, ebp
cmp rax, 6
jz loc_3F968
cmp eax, 0FFFFFFFFh
jnz loc_3F7D6
movzx eax, word ptr [r12+6]
cmp eax, 0Dh
jz short loc_3F730
cmp eax, 30h ; '0'
jnz short loc_3F709
mov rax, [r12+30h]
movzx eax, byte ptr [rax+20h]
jmp short loc_3F728
loc_3F709:
mov rcx, [rsp+78h+var_50]
mov rcx, [rcx+18h]
mov rcx, [rcx+80h]
lea rdx, [rax+rax*4]
xor eax, eax
cmp qword ptr [rcx+rdx*8+18h], 0
setnz al
loc_3F728:
test eax, eax
jz loc_3F7D6
loc_3F730:
mov r8, rbx
mov rcx, r15
mov dword ptr [rsp+78h+var_40], 0
mov qword ptr [rsp+78h+var_40+8], 3
movups xmm0, [rsp+78h+var_40]
movups [rsp+78h+var_78], xmm0
mov [rsp+78h+var_60], 2
mov [rsp+78h+var_68], 0
mov r13, [rsp+78h+var_50]
mov rdi, r13
mov rsi, r12
mov rdx, rbp
xor r9d, r9d
call JS_CallInternal
mov r9, rax
mov r8, rdx
mov rdi, [r13+18h]
mov eax, [r12]
lea ecx, [rax-1]
mov [r12], ecx
cmp eax, 1
jg short loc_3F7A8
mov rsi, r12
mov rdx, rbp
mov r12, r8
mov r13, r9
call js_free_value_rt
mov r9, r13
mov r8, r12
loc_3F7A8:
cmp r8d, 0FFFFFFFFh
jnz loc_3F962
mov rax, [rsp+78h+var_50]
mov rdi, [rax+18h]
mov eax, [r9]
lea ecx, [rax-1]
mov [r9], ecx
cmp eax, 1
mov r13d, [rsp+78h+var_44]
jg short loc_3F7FF
mov rsi, r9
mov rdx, r8
jmp short loc_3F7FA
loc_3F7D6:
cmp ebp, 0FFFFFFF7h
jb short loc_3F7FF
mov rax, [rsp+78h+var_50]
mov rdi, [rax+18h]
mov eax, [r12]
lea ecx, [rax-1]
mov [r12], ecx
cmp eax, 1
jg short loc_3F7FF
mov rsi, r12
mov rdx, rbp
loc_3F7FA:
call js_free_value_rt
loc_3F7FF:
mov eax, 1
test r14b, 1
mov r14d, 0
jnz loc_3F69E
lea rsi, aToprimitive; "toPrimitive"
mov rdi, [rsp+78h+var_50]
xor eax, eax
call JS_ThrowTypeError
jmp loc_3F968
loc_3F82C:
mov rcx, 0FFFFFFFF00000000h
and rcx, r15
mov r9, r15
mov r8, rbx
jmp loc_3F99B
loc_3F844:
mov r13, rdx
cmp r13d, 6
jz loc_3F968
cmp ebp, 1
mov eax, 47h ; 'G'
mov ecx, 16h
cmovz ecx, eax
test ebp, ebp
mov esi, 49h ; 'I'
cmovnz esi, ecx
mov rbp, [rsp+78h+var_50]
mov rdi, rbp
mov edx, 1
call __JS_AtomToValue
lea r14, [rsp+78h+var_40]
mov [r14], rax
mov [r14+8], rdx
mov qword ptr [rsp+78h+var_78], r14
mov rdi, rbp
mov rsi, r12
mov rdx, r13
mov rcx, r15
mov r8, rbx
mov r9d, 1
call JS_CallFree
mov r9, rax
mov r8, rdx
mov rdx, [r14+8]
cmp edx, 0FFFFFFF7h
jb short loc_3F8E1
mov rsi, qword ptr [rsp+78h+var_40]
mov rax, [rsp+78h+var_50]
mov rdi, [rax+18h]
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jg short loc_3F8E1
mov r14, r8
mov r12, r9
call js_free_value_rt
mov r9, r12
mov r8, r14
loc_3F8E1:
mov r14d, r8d
cmp r14, 6
jz short loc_3F968
mov rax, [rsp+78h+var_50]
mov rdi, [rax+18h]
mov eax, [r15]
lea ecx, [rax-1]
mov [r15], ecx
cmp eax, 1
jg short loc_3F918
mov rsi, r15
mov rdx, rbx
mov rbx, r8
mov r15, r9
call js_free_value_rt
mov r9, r15
mov r8, rbx
loc_3F918:
cmp r14d, 0FFFFFFFFh
jnz loc_3F9E1
mov rax, [rsp+78h+var_50]
mov rdi, [rax+18h]
mov eax, [r9]
lea ecx, [rax-1]
mov [r9], ecx
cmp eax, 1
jg short loc_3F944
mov rsi, r9
mov rdx, r8
call js_free_value_rt
loc_3F944:
lea rsi, aToprimitive; "toPrimitive"
mov rdi, [rsp+78h+var_50]
xor eax, eax
call JS_ThrowTypeError
xor r9d, r9d
mov r8d, 6
jmp short loc_3F999
loc_3F962:
cmp r8d, 6
jnz short loc_3F9B3
loc_3F968:
mov rax, [rsp+78h+var_50]
mov rdi, [rax+18h]
mov eax, [r15]
lea ecx, [rax-1]
mov [r15], ecx
mov r8d, 6
cmp eax, 1
jg short loc_3F996
mov rsi, r15
mov rdx, rbx
call js_free_value_rt
mov r8d, 6
loc_3F996:
xor r9d, r9d
loc_3F999:
xor ecx, ecx
loc_3F99B:
mov eax, r9d
or rax, rcx
mov rdx, r8
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3F9B3:
mov rax, [rsp+78h+var_50]
mov rdi, [rax+18h]
mov eax, [r15]
lea ecx, [rax-1]
mov [r15], ecx
cmp eax, 1
jg short loc_3F9E1
mov rsi, r15
mov rdx, rbx
mov rbx, r8
mov r14, r9
call js_free_value_rt
mov r9, r14
mov r8, rbx
loc_3F9E1:
mov rax, 0FFFFFFFF00000000h
mov rcx, r9
and rcx, rax
jmp short loc_3F99B
| unsigned long long JS_ToPrimitiveFree(
long long a1,
long long a2,
long long a3,
int a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
unsigned int v14; // ebp
unsigned int v15; // edx
_QWORD *v16; // r12
int v17; // r13d
int v18; // eax
char v19; // r14
long long v20; // rdx
long long v21; // rcx
long long v22; // r8
long long v23; // r9
unsigned long long PropertyInternal2; // r12
__m128 v25; // xmm4
__m128 v26; // xmm5
long long v27; // rbp
long long v28; // rax
int v29; // eax
long long v30; // rdi
int v31; // eax
_QWORD *v32; // rsi
long long v33; // r12
long long v34; // r13
long long v35; // rdi
int v36; // eax
_QWORD *v37; // rsi
int v38; // edx
int v39; // eax
bool v40; // zf
unsigned long long v41; // rcx
unsigned int v42; // r13d
int v43; // ecx
int v44; // esi
__m128i v45; // rax
__m128 v46; // xmm4
__m128 v47; // xmm5
long long v48; // rdx
long long v49; // r8
long long v50; // rdx
_QWORD *v51; // rsi
long long v52; // rdi
int v53; // eax
long long v54; // r14
long long v55; // r12
int v56; // r14d
long long v57; // rdi
int v58; // eax
_QWORD *v59; // rsi
int v60; // edx
long long v61; // rbx
long long v62; // r15
long long v63; // rdi
int v64; // eax
long long v65; // rcx
long long v66; // rdi
int v67; // eax
long long v69; // rdi
int v70; // eax
long long v71; // r14
char v72; // [rsp+0h] [rbp-78h]
char v73; // [rsp+0h] [rbp-78h]
int v75; // [rsp+34h] [rbp-44h]
__m128 v76; // [rsp+38h] [rbp-40h] BYREF
if ( (_DWORD)a3 == -1 )
{
v14 = a4 & 0xFFFFFFEF;
if ( (a4 & 0x10) != 0 || (v16 = (_QWORD *)JS_GetPropertyInternal2(a1, a2, -1, 0xD3u, a2, a3, 0LL, 0), v15 - 2 < 2) )
{
v17 = v14 != 0;
v18 = 0;
v19 = 1;
v75 = v17;
while ( 1 )
{
PropertyInternal2 = JS_GetPropertyInternal2(a1, a2, a3, 2 * (unsigned int)(v18 != v17) + 56, a2, a3, 0LL, 0);
v27 = v20;
if ( (unsigned int)v20 == 6LL )
goto LABEL_40;
if ( (_DWORD)v20 != -1 )
break;
v28 = *(unsigned __int16 *)(PropertyInternal2 + 6);
if ( (_DWORD)v28 != 13 )
{
if ( (_DWORD)v28 == 48 )
{
v29 = *(unsigned __int8 *)(*(_QWORD *)(PropertyInternal2 + 48) + 32LL);
}
else
{
v21 = *(_QWORD *)(*(_QWORD *)(a1 + 24) + 128LL);
v20 = 5 * v28;
v29 = *(_QWORD *)(v21 + 40 * v28 + 24) != 0LL;
}
if ( !v29 )
break;
}
v76.m128_i32[0] = 0;
v76.m128_u64[1] = 3LL;
a5 = v76;
v23 = JS_CallInternal(
a1,
PropertyInternal2,
v27,
a2,
a3,
0LL,
(__m128i)v76,
a6,
a7,
a8,
v25,
v26,
a11,
a12,
0,
3,
0LL,
2u);
v22 = v20;
v30 = *(_QWORD *)(a1 + 24);
v31 = (*(_DWORD *)PropertyInternal2)--;
if ( v31 <= 1 )
{
v32 = (_QWORD *)PropertyInternal2;
v33 = v20;
v34 = v23;
js_free_value_rt(v30, v32, v27);
v23 = v34;
v22 = v33;
}
if ( (_DWORD)v22 != -1 )
{
if ( (_DWORD)v22 == 6 )
goto LABEL_40;
v69 = *(_QWORD *)(a1 + 24);
v70 = (*(_DWORD *)a2)--;
if ( v70 <= 1 )
{
v71 = v23;
js_free_value_rt(v69, (_QWORD *)a2, a3);
v23 = v71;
}
goto LABEL_47;
}
v35 = *(_QWORD *)(a1 + 24);
v36 = *(_DWORD *)v23;
v21 = (unsigned int)(*(_DWORD *)v23 - 1);
*(_DWORD *)v23 = v21;
v17 = v75;
if ( v36 <= 1 )
{
v37 = (_QWORD *)v23;
v38 = -1;
LABEL_20:
js_free_value_rt(v35, v37, v38);
}
LABEL_21:
v18 = 1;
v40 = (v19 & 1) == 0;
v19 = 0;
if ( v40 )
{
JS_ThrowTypeError(a1, (long long)"toPrimitive", v20, v21, v22, v23, a5, a6, a7, a8, v25, v26, a11, a12, v72);
goto LABEL_40;
}
}
if ( (unsigned int)v27 < 0xFFFFFFF7 )
goto LABEL_21;
v35 = *(_QWORD *)(a1 + 24);
v39 = *(_DWORD *)PropertyInternal2;
v21 = (unsigned int)(*(_DWORD *)PropertyInternal2 - 1);
*(_DWORD *)PropertyInternal2 = v21;
if ( v39 > 1 )
goto LABEL_21;
v37 = (_QWORD *)PropertyInternal2;
v38 = v27;
goto LABEL_20;
}
v42 = v15;
if ( v15 == 6 )
goto LABEL_40;
v43 = 22;
if ( v14 == 1 )
v43 = 71;
v44 = 73;
if ( v14 )
v44 = v43;
v45.m128i_i64[0] = _JS_AtomToValue(a1, v44, 1);
v76 = (__m128)v45;
v23 = JS_CallFree(a1, v16, v42, a2, a3, 1, (long long)&v76);
v49 = v48;
v50 = v76.m128_i64[1];
if ( v76.m128_i32[2] >= 0xFFFFFFF7 )
{
v51 = (_QWORD *)v76.m128_u64[0];
v52 = *(_QWORD *)(a1 + 24);
v53 = (*(_DWORD *)v76.m128_u64[0])--;
if ( v53 <= 1 )
{
v54 = v49;
v55 = v23;
js_free_value_rt(v52, v51, v50);
v23 = v55;
v49 = v54;
}
}
v56 = v49;
if ( (unsigned int)v49 == 6LL )
{
LABEL_40:
v66 = *(_QWORD *)(a1 + 24);
v67 = (*(_DWORD *)a2)--;
if ( v67 <= 1 )
js_free_value_rt(v66, (_QWORD *)a2, a3);
LODWORD(v23) = 0;
}
else
{
v57 = *(_QWORD *)(a1 + 24);
v58 = (*(_DWORD *)a2)--;
if ( v58 <= 1 )
{
v59 = (_QWORD *)a2;
v60 = a3;
v61 = v49;
v62 = v23;
js_free_value_rt(v57, v59, v60);
v23 = v62;
v49 = v61;
}
if ( v56 != -1 )
{
LABEL_47:
v41 = v23 & 0xFFFFFFFF00000000LL;
return v41 | (unsigned int)v23;
}
v63 = *(_QWORD *)(a1 + 24);
v64 = *(_DWORD *)v23;
v65 = (unsigned int)(*(_DWORD *)v23 - 1);
*(_DWORD *)v23 = v65;
if ( v64 <= 1 )
js_free_value_rt(v63, (_QWORD *)v23, v49);
JS_ThrowTypeError(a1, (long long)"toPrimitive", v50, v65, v49, v23, a5, a6, a7, a8, v46, v47, a11, a12, v73);
LODWORD(v23) = 0;
}
v41 = 0LL;
}
else
{
v41 = a2 & 0xFFFFFFFF00000000LL;
LODWORD(v23) = a2;
}
return v41 | (unsigned int)v23;
}
| JS_ToPrimitiveFree:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RBX,RDX
MOV R15,RSI
MOV qword ptr [RSP + 0x28],RDI
CMP EBX,-0x1
JNZ 0x0013f82c
MOV EBP,ECX
AND EBP,0xffffffef
TEST CL,0x10
JNZ 0x0013f68b
MOV dword ptr [RSP + 0x8],0x0
MOV qword ptr [RSP],0x0
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,R15
MOV RDX,RBX
MOV ECX,0xd3
MOV R8,R15
MOV R9,RBX
CALL 0x0012384b
MOV R12,RAX
LEA EAX,[RDX + -0x2]
CMP EAX,0x2
JNC 0x0013f844
LAB_0013f68b:
XOR R13D,R13D
TEST EBP,EBP
SETNZ R13B
XOR EAX,EAX
MOV R14B,0x1
MOV dword ptr [RSP + 0x34],R13D
LAB_0013f69e:
XOR ECX,ECX
CMP EAX,R13D
SETNZ CL
LEA ECX,[0x38 + RCX*0x2]
MOV dword ptr [RSP + 0x8],0x0
MOV qword ptr [RSP],0x0
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,R15
MOV RDX,RBX
MOV R8,R15
MOV R9,RBX
CALL 0x0012384b
MOV R12,RAX
MOV RBP,RDX
MOV EAX,EBP
CMP RAX,0x6
JZ 0x0013f968
CMP EAX,-0x1
JNZ 0x0013f7d6
MOVZX EAX,word ptr [R12 + 0x6]
CMP EAX,0xd
JZ 0x0013f730
CMP EAX,0x30
JNZ 0x0013f709
MOV RAX,qword ptr [R12 + 0x30]
MOVZX EAX,byte ptr [RAX + 0x20]
JMP 0x0013f728
LAB_0013f709:
MOV RCX,qword ptr [RSP + 0x28]
MOV RCX,qword ptr [RCX + 0x18]
MOV RCX,qword ptr [RCX + 0x80]
LEA RDX,[RAX + RAX*0x4]
XOR EAX,EAX
CMP qword ptr [RCX + RDX*0x8 + 0x18],0x0
SETNZ AL
LAB_0013f728:
TEST EAX,EAX
JZ 0x0013f7d6
LAB_0013f730:
MOV R8,RBX
MOV RCX,R15
MOV dword ptr [RSP + 0x38],0x0
MOV qword ptr [RSP + 0x40],0x3
MOVUPS XMM0,xmmword ptr [RSP + 0x38]
MOVUPS xmmword ptr [RSP],XMM0
MOV dword ptr [RSP + 0x18],0x2
MOV qword ptr [RSP + 0x10],0x0
MOV R13,qword ptr [RSP + 0x28]
MOV RDI,R13
MOV RSI,R12
MOV RDX,RBP
XOR R9D,R9D
CALL 0x00128b06
MOV R9,RAX
MOV R8,RDX
MOV RDI,qword ptr [R13 + 0x18]
MOV EAX,dword ptr [R12]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R12],ECX
CMP EAX,0x1
JG 0x0013f7a8
MOV RSI,R12
MOV RDX,RBP
MOV R12,R8
MOV R13,R9
CALL 0x001219cc
MOV R9,R13
MOV R8,R12
LAB_0013f7a8:
CMP R8D,-0x1
JNZ 0x0013f962
MOV RAX,qword ptr [RSP + 0x28]
MOV RDI,qword ptr [RAX + 0x18]
MOV EAX,dword ptr [R9]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R9],ECX
CMP EAX,0x1
MOV R13D,dword ptr [RSP + 0x34]
JG 0x0013f7ff
MOV RSI,R9
MOV RDX,R8
JMP 0x0013f7fa
LAB_0013f7d6:
CMP EBP,-0x9
JC 0x0013f7ff
MOV RAX,qword ptr [RSP + 0x28]
MOV RDI,qword ptr [RAX + 0x18]
MOV EAX,dword ptr [R12]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R12],ECX
CMP EAX,0x1
JG 0x0013f7ff
MOV RSI,R12
MOV RDX,RBP
LAB_0013f7fa:
CALL 0x001219cc
LAB_0013f7ff:
MOV EAX,0x1
TEST R14B,0x1
MOV R14D,0x0
JNZ 0x0013f69e
LEA RSI,[0x1a2173]
MOV RDI,qword ptr [RSP + 0x28]
XOR EAX,EAX
CALL 0x00122d8b
JMP 0x0013f968
LAB_0013f82c:
MOV RCX,-0x100000000
AND RCX,R15
MOV R9,R15
MOV R8,RBX
JMP 0x0013f99b
LAB_0013f844:
MOV R13,RDX
CMP R13D,0x6
JZ 0x0013f968
CMP EBP,0x1
MOV EAX,0x47
MOV ECX,0x16
CMOVZ ECX,EAX
TEST EBP,EBP
MOV ESI,0x49
CMOVNZ ESI,ECX
MOV RBP,qword ptr [RSP + 0x28]
MOV RDI,RBP
MOV EDX,0x1
CALL 0x00120eb3
LEA R14,[RSP + 0x38]
MOV qword ptr [R14],RAX
MOV qword ptr [R14 + 0x8],RDX
MOV qword ptr [RSP],R14
MOV RDI,RBP
MOV RSI,R12
MOV RDX,R13
MOV RCX,R15
MOV R8,RBX
MOV R9D,0x1
CALL 0x001234e7
MOV R9,RAX
MOV R8,RDX
MOV RDX,qword ptr [R14 + 0x8]
CMP EDX,-0x9
JC 0x0013f8e1
MOV RSI,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RSP + 0x28]
MOV RDI,qword ptr [RAX + 0x18]
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JG 0x0013f8e1
MOV R14,R8
MOV R12,R9
CALL 0x001219cc
MOV R9,R12
MOV R8,R14
LAB_0013f8e1:
MOV R14D,R8D
CMP R14,0x6
JZ 0x0013f968
MOV RAX,qword ptr [RSP + 0x28]
MOV RDI,qword ptr [RAX + 0x18]
MOV EAX,dword ptr [R15]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R15],ECX
CMP EAX,0x1
JG 0x0013f918
MOV RSI,R15
MOV RDX,RBX
MOV RBX,R8
MOV R15,R9
CALL 0x001219cc
MOV R9,R15
MOV R8,RBX
LAB_0013f918:
CMP R14D,-0x1
JNZ 0x0013f9e1
MOV RAX,qword ptr [RSP + 0x28]
MOV RDI,qword ptr [RAX + 0x18]
MOV EAX,dword ptr [R9]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R9],ECX
CMP EAX,0x1
JG 0x0013f944
MOV RSI,R9
MOV RDX,R8
CALL 0x001219cc
LAB_0013f944:
LEA RSI,[0x1a2173]
MOV RDI,qword ptr [RSP + 0x28]
XOR EAX,EAX
CALL 0x00122d8b
XOR R9D,R9D
MOV R8D,0x6
JMP 0x0013f999
LAB_0013f962:
CMP R8D,0x6
JNZ 0x0013f9b3
LAB_0013f968:
MOV RAX,qword ptr [RSP + 0x28]
MOV RDI,qword ptr [RAX + 0x18]
MOV EAX,dword ptr [R15]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R15],ECX
MOV R8D,0x6
CMP EAX,0x1
JG 0x0013f996
MOV RSI,R15
MOV RDX,RBX
CALL 0x001219cc
MOV R8D,0x6
LAB_0013f996:
XOR R9D,R9D
LAB_0013f999:
XOR ECX,ECX
LAB_0013f99b:
MOV EAX,R9D
OR RAX,RCX
MOV RDX,R8
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013f9b3:
MOV RAX,qword ptr [RSP + 0x28]
MOV RDI,qword ptr [RAX + 0x18]
MOV EAX,dword ptr [R15]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R15],ECX
CMP EAX,0x1
JG 0x0013f9e1
MOV RSI,R15
MOV RDX,RBX
MOV RBX,R8
MOV R14,R9
CALL 0x001219cc
MOV R9,R14
MOV R8,RBX
LAB_0013f9e1:
MOV RAX,-0x100000000
MOV RCX,R9
AND RCX,RAX
JMP 0x0013f99b
|
int1 [16] JS_ToPrimitiveFree(long param_1,int *param_2,int8 param_3,uint param_4)
{
ushort uVar1;
int iVar2;
bool bVar3;
bool bVar4;
int *piVar5;
int8 uVar6;
ulong uVar7;
int8 uVar8;
bool bVar9;
char cVar10;
int1 auVar11 [16];
int1 auVar12 [16];
int1 local_40 [16];
auVar11._8_8_ = param_3;
auVar11._0_8_ = param_2;
if ((int)param_3 != -1) {
uVar7 = (ulong)param_2 & 0xffffffff00000000;
goto LAB_0013f99b;
}
if ((param_4 & 0x10) == 0) {
auVar11 = JS_GetPropertyInternal2(param_1,param_2,param_3,0xd3,param_2,param_3,0,0);
if (auVar11._8_4_ - 2U < 2) goto LAB_0013f68b;
if (auVar11._8_4_ == 6) goto LAB_0013f968;
uVar6 = 0x16;
if ((param_4 & 0xffffffef) == 1) {
uVar6 = 0x47;
}
uVar8 = 0x49;
if ((param_4 & 0xffffffef) != 0) {
uVar8 = uVar6;
}
local_40 = __JS_AtomToValue(param_1,uVar8,1);
auVar11 = JS_CallFree(param_1,auVar11._0_8_,auVar11._8_8_,param_2,param_3,1,local_40);
piVar5 = auVar11._0_8_;
if (0xfffffff6 < local_40._8_4_) {
uVar6 = *(int8 *)(param_1 + 0x18);
iVar2 = *(int *)local_40._0_8_;
*(int *)local_40._0_8_ = iVar2 + -1;
if (iVar2 < 2) {
js_free_value_rt(uVar6);
}
}
if ((auVar11._8_8_ & 0xffffffff) == 6) goto LAB_0013f968;
uVar6 = *(int8 *)(param_1 + 0x18);
iVar2 = *param_2;
*param_2 = iVar2 + -1;
if (iVar2 < 2) {
js_free_value_rt(uVar6,param_2,param_3);
}
if (auVar11._8_4_ != -1) {
LAB_0013f9e1:
uVar7 = auVar11._0_8_ & 0xffffffff00000000;
goto LAB_0013f99b;
}
uVar6 = *(int8 *)(param_1 + 0x18);
iVar2 = *piVar5;
*piVar5 = iVar2 + -1;
if (iVar2 < 2) {
js_free_value_rt(uVar6,piVar5,auVar11._8_8_);
}
JS_ThrowTypeError(param_1,"toPrimitive");
}
else {
LAB_0013f68b:
bVar4 = false;
bVar3 = true;
do {
bVar9 = bVar3;
auVar11 = JS_GetPropertyInternal2
(param_1,param_2,param_3,
(bVar4 != ((param_4 & 0xffffffef) != 0)) * '\x02' + '8',param_2,param_3,0
,0);
uVar6 = local_40._0_8_;
uVar7 = auVar11._8_8_;
piVar5 = auVar11._0_8_;
if ((uVar7 & 0xffffffff) == 6) goto LAB_0013f968;
if (auVar11._8_4_ == 0xffffffff) {
uVar1 = *(ushort *)((long)piVar5 + 6);
if (uVar1 != 0xd) {
if (uVar1 == 0x30) {
cVar10 = *(char *)(*(long *)(piVar5 + 0xc) + 0x20);
}
else {
cVar10 = *(long *)(*(long *)(*(long *)(param_1 + 0x18) + 0x80) + 0x18 +
(ulong)uVar1 * 0x28) != 0;
}
if (cVar10 == '\0') goto LAB_0013f7d6;
}
local_40._0_8_ = local_40._0_8_ & 0xffffffff00000000;
local_40._8_8_ = 3;
auVar11 = JS_CallInternal(param_1,piVar5,uVar7,param_2,param_3,0,uVar6 & 0xffffffff00000000,
3,0,2);
uVar6 = *(int8 *)(param_1 + 0x18);
iVar2 = *piVar5;
*piVar5 = iVar2 + -1;
if (iVar2 < 2) {
js_free_value_rt(uVar6,piVar5,uVar7);
}
if (auVar11._8_4_ != -1) {
if (auVar11._8_4_ == 6) goto LAB_0013f968;
uVar6 = *(int8 *)(param_1 + 0x18);
iVar2 = *param_2;
*param_2 = iVar2 + -1;
if (iVar2 < 2) {
js_free_value_rt(uVar6,param_2,param_3);
}
goto LAB_0013f9e1;
}
uVar6 = *(int8 *)(param_1 + 0x18);
iVar2 = *auVar11._0_8_;
*auVar11._0_8_ = iVar2 + -1;
joined_r0x0013f7f2:
if (iVar2 < 2) {
js_free_value_rt(uVar6,auVar11._0_8_,auVar11._8_8_);
}
}
else {
LAB_0013f7d6:
if (0xfffffff6 < auVar11._8_4_) {
uVar6 = *(int8 *)(param_1 + 0x18);
iVar2 = *piVar5;
*piVar5 = iVar2 + -1;
goto joined_r0x0013f7f2;
}
}
bVar4 = true;
bVar3 = false;
} while (bVar9);
JS_ThrowTypeError(param_1,"toPrimitive");
LAB_0013f968:
uVar6 = *(int8 *)(param_1 + 0x18);
iVar2 = *param_2;
*param_2 = iVar2 + -1;
if (iVar2 < 2) {
js_free_value_rt(uVar6,param_2,param_3);
}
}
auVar11 = ZEXT816(6) << 0x40;
uVar7 = 0;
LAB_0013f99b:
auVar12._0_8_ = auVar11._0_8_ & 0xffffffff | uVar7;
auVar12._8_8_ = auVar11._8_8_;
return auVar12;
}
| |
43,223 | my_wc_mb_euc_kr | eloqsql/strings/ctype-euc_kr.c | static int
my_wc_mb_euc_kr(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int code;
if (s >= e)
return MY_CS_TOOSMALL;
if ((uint) wc < 0x80)
{
s[0]= (uchar) wc;
return 1;
}
if (!(code=func_uni_ksc5601_onechar(wc)))
return MY_CS_ILUNI;
if (s+2>e)
return MY_CS_TOOSMALL2;
s[0]=code>>8;
s[1]=code&0xFF;
return 2;
} | O3 | c | my_wc_mb_euc_kr:
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x321b6
cmpl $0x7f, %esi
ja 0x321b7
movb %sil, (%rdx)
movl $0x1, %eax
retq
leal -0xa1(%rsi), %eax
cmpl $0xc6, %eax
ja 0x321d2
movl %eax, %eax
leaq 0x95ce3(%rip), %rsi # 0xc7eb0
jmp 0x322ca
leal -0x2c7(%rsi), %eax
cmpl $0x18a, %eax # imm = 0x18A
ja 0x321ed
movl %eax, %eax
leaq 0x95e58(%rip), %rsi # 0xc8040
jmp 0x322ca
leal -0x2015(%rsi), %eax
cmpl $0x2fd, %eax # imm = 0x2FD
ja 0x32208
movl %eax, %eax
leaq 0x9615d(%rip), %rsi # 0xc8360
jmp 0x322ca
leal -0x2460(%rsi), %eax
cmpl $0x20d, %eax # imm = 0x20D
ja 0x32223
movl %eax, %eax
leaq 0x96742(%rip), %rsi # 0xc8960
jmp 0x322ca
leal -0x3000(%rsi), %eax
cmpl $0x27f, %eax # imm = 0x27F
ja 0x3223e
movl %eax, %eax
leaq 0x96b47(%rip), %rsi # 0xc8d80
jmp 0x322ca
leal -0x3380(%rsi), %eax
cmpl $0x5d, %eax
ja 0x32254
movl %eax, %eax
leaq 0x9702e(%rip), %rsi # 0xc9280
jmp 0x322ca
leal -0x4e00(%rsi), %eax
cmpl $0x467f, %eax # imm = 0x467F
ja 0x3226c
movl %eax, %eax
leaq 0x970d6(%rip), %rsi # 0xc9340
jmp 0x322ca
leal -0x9577(%rsi), %eax
cmpl $0xa25, %eax # imm = 0xA25
ja 0x32284
movl %eax, %eax
leaq 0x9fdbe(%rip), %rsi # 0xd2040
jmp 0x322ca
leal -0xac00(%rsi), %eax
cmpl $0x2ba3, %eax # imm = 0x2BA3
ja 0x3229c
movl %eax, %eax
leaq 0xa11f6(%rip), %rsi # 0xd3490
jmp 0x322ca
leal -0xf900(%rsi), %eax
cmpl $0x10b, %eax # imm = 0x10B
ja 0x322b4
movl %eax, %eax
leaq 0xa692e(%rip), %rsi # 0xd8be0
jmp 0x322ca
leal -0xff01(%rsi), %eax
cmpl $0xe5, %eax
ja 0x322fa
movl %eax, %eax
leaq 0xa6b36(%rip), %rsi # 0xd8e00
leaq (%rsi,%rax,2), %rax
pushq %rbp
movq %rsp, %rbp
movzwl (%rax), %esi
testw %si, %si
je 0x322f6
leaq 0x2(%rdx), %rdi
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %rdi
ja 0x322f8
rolw $0x8, %si
movw %si, (%rdx)
movl $0x2, %eax
jmp 0x322f8
xorl %eax, %eax
popq %rbp
retq
xorl %eax, %eax
retq
| my_wc_mb_euc_kr:
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short locret_321B6
cmp esi, 7Fh
ja short loc_321B7
mov [rdx], sil
mov eax, 1
locret_321B6:
retn
loc_321B7:
lea eax, [rsi-0A1h]
cmp eax, 0C6h
ja short loc_321D2
mov eax, eax
lea rsi, tab_uni_ksc56010
jmp loc_322CA
loc_321D2:
lea eax, [rsi-2C7h]
cmp eax, 18Ah
ja short loc_321ED
mov eax, eax
lea rsi, tab_uni_ksc56011
jmp loc_322CA
loc_321ED:
lea eax, [rsi-2015h]
cmp eax, 2FDh
ja short loc_32208
mov eax, eax
lea rsi, tab_uni_ksc56012
jmp loc_322CA
loc_32208:
lea eax, [rsi-2460h]
cmp eax, 20Dh
ja short loc_32223
mov eax, eax
lea rsi, tab_uni_ksc56013
jmp loc_322CA
loc_32223:
lea eax, [rsi-3000h]
cmp eax, 27Fh
ja short loc_3223E
mov eax, eax
lea rsi, tab_uni_ksc56014
jmp loc_322CA
loc_3223E:
lea eax, [rsi-3380h]
cmp eax, 5Dh ; ']'
ja short loc_32254
mov eax, eax
lea rsi, tab_uni_ksc56015
jmp short loc_322CA
loc_32254:
lea eax, [rsi-4E00h]
cmp eax, 467Fh
ja short loc_3226C
mov eax, eax
lea rsi, tab_uni_ksc56016
jmp short loc_322CA
loc_3226C:
lea eax, [rsi-9577h]
cmp eax, 0A25h
ja short loc_32284
mov eax, eax
lea rsi, tab_uni_ksc56017
jmp short loc_322CA
loc_32284:
lea eax, [rsi-0AC00h]
cmp eax, 2BA3h
ja short loc_3229C
mov eax, eax
lea rsi, tab_uni_ksc56018
jmp short loc_322CA
loc_3229C:
lea eax, [rsi-0F900h]
cmp eax, 10Bh
ja short loc_322B4
mov eax, eax
lea rsi, tab_uni_ksc56019
jmp short loc_322CA
loc_322B4:
lea eax, [rsi-0FF01h]
cmp eax, 0E5h
ja short loc_322FA
mov eax, eax
lea rsi, tab_uni_ksc560110
loc_322CA:
lea rax, [rsi+rax*2]
push rbp
mov rbp, rsp
movzx esi, word ptr [rax]
test si, si
jz short loc_322F6
lea rdi, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp rdi, rcx
ja short loc_322F8
rol si, 8
mov [rdx], si
mov eax, 2
jmp short loc_322F8
loc_322F6:
xor eax, eax
loc_322F8:
pop rbp
retn
loc_322FA:
xor eax, eax
retn
| long long my_wc_mb_euc_kr(long long a1, unsigned int a2, _WORD *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rax
_WORD *v6; // rsi
__int16 v7; // si
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
if ( a2 > 0x7F )
{
LODWORD(v5) = a2 - 161;
if ( a2 - 161 > 0xC6 )
{
LODWORD(v5) = a2 - 711;
if ( a2 - 711 > 0x18A )
{
LODWORD(v5) = a2 - 8213;
if ( a2 - 8213 > 0x2FD )
{
LODWORD(v5) = a2 - 9312;
if ( a2 - 9312 > 0x20D )
{
LODWORD(v5) = a2 - 12288;
if ( a2 - 12288 > 0x27F )
{
LODWORD(v5) = a2 - 13184;
if ( a2 - 13184 > 0x5D )
{
LODWORD(v5) = a2 - 19968;
if ( a2 - 19968 > 0x467F )
{
LODWORD(v5) = a2 - 38263;
if ( a2 - 38263 > 0xA25 )
{
LODWORD(v5) = a2 - 44032;
if ( a2 - 44032 > 0x2BA3 )
{
LODWORD(v5) = a2 - 63744;
if ( a2 - 63744 > 0x10B )
{
LODWORD(v5) = a2 - 65281;
if ( a2 - 65281 > 0xE5 )
return 0LL;
v5 = (unsigned int)v5;
v6 = &tab_uni_ksc560110;
}
else
{
v5 = (unsigned int)v5;
v6 = &tab_uni_ksc56019;
}
}
else
{
v5 = (unsigned int)v5;
v6 = &tab_uni_ksc56018;
}
}
else
{
v5 = (unsigned int)v5;
v6 = &tab_uni_ksc56017;
}
}
else
{
v5 = (unsigned int)v5;
v6 = &tab_uni_ksc56016;
}
}
else
{
v5 = (unsigned int)v5;
v6 = &tab_uni_ksc56015;
}
}
else
{
v5 = (unsigned int)v5;
v6 = &tab_uni_ksc56014;
}
}
else
{
v5 = (unsigned int)v5;
v6 = &tab_uni_ksc56013;
}
}
else
{
v5 = (unsigned int)v5;
v6 = &tab_uni_ksc56012;
}
}
else
{
v5 = (unsigned int)v5;
v6 = &tab_uni_ksc56011;
}
}
else
{
v5 = (unsigned int)v5;
v6 = &tab_uni_ksc56010;
}
v7 = v6[v5];
if ( v7 )
{
result = 4294967194LL;
if ( (unsigned long long)(a3 + 1) <= a4 )
{
*a3 = __ROL2__(v7, 8);
return 2LL;
}
}
else
{
return 0LL;
}
}
else
{
*(_BYTE *)a3 = a2;
return 1LL;
}
}
return result;
}
| my_wc_mb_euc_kr:
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x001321b6
CMP ESI,0x7f
JA 0x001321b7
MOV byte ptr [RDX],SIL
MOV EAX,0x1
LAB_001321b6:
RET
LAB_001321b7:
LEA EAX,[RSI + -0xa1]
CMP EAX,0xc6
JA 0x001321d2
MOV EAX,EAX
LEA RSI,[0x1c7eb0]
JMP 0x001322ca
LAB_001321d2:
LEA EAX,[RSI + -0x2c7]
CMP EAX,0x18a
JA 0x001321ed
MOV EAX,EAX
LEA RSI,[0x1c8040]
JMP 0x001322ca
LAB_001321ed:
LEA EAX,[RSI + -0x2015]
CMP EAX,0x2fd
JA 0x00132208
MOV EAX,EAX
LEA RSI,[0x1c8360]
JMP 0x001322ca
LAB_00132208:
LEA EAX,[RSI + -0x2460]
CMP EAX,0x20d
JA 0x00132223
MOV EAX,EAX
LEA RSI,[0x1c8960]
JMP 0x001322ca
LAB_00132223:
LEA EAX,[RSI + -0x3000]
CMP EAX,0x27f
JA 0x0013223e
MOV EAX,EAX
LEA RSI,[0x1c8d80]
JMP 0x001322ca
LAB_0013223e:
LEA EAX,[RSI + -0x3380]
CMP EAX,0x5d
JA 0x00132254
MOV EAX,EAX
LEA RSI,[0x1c9280]
JMP 0x001322ca
LAB_00132254:
LEA EAX,[RSI + -0x4e00]
CMP EAX,0x467f
JA 0x0013226c
MOV EAX,EAX
LEA RSI,[0x1c9340]
JMP 0x001322ca
LAB_0013226c:
LEA EAX,[RSI + -0x9577]
CMP EAX,0xa25
JA 0x00132284
MOV EAX,EAX
LEA RSI,[0x1d2040]
JMP 0x001322ca
LAB_00132284:
LEA EAX,[RSI + -0xac00]
CMP EAX,0x2ba3
JA 0x0013229c
MOV EAX,EAX
LEA RSI,[0x1d3490]
JMP 0x001322ca
LAB_0013229c:
LEA EAX,[RSI + -0xf900]
CMP EAX,0x10b
JA 0x001322b4
MOV EAX,EAX
LEA RSI,[0x1d8be0]
JMP 0x001322ca
LAB_001322b4:
LEA EAX,[RSI + -0xff01]
CMP EAX,0xe5
JA 0x001322fa
MOV EAX,EAX
LEA RSI,[0x1d8e00]
LAB_001322ca:
LEA RAX,[RSI + RAX*0x2]
PUSH RBP
MOV RBP,RSP
MOVZX ESI,word ptr [RAX]
TEST SI,SI
JZ 0x001322f6
LEA RDI,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP RDI,RCX
JA 0x001322f8
ROL SI,0x8
MOV word ptr [RDX],SI
MOV EAX,0x2
JMP 0x001322f8
LAB_001322f6:
XOR EAX,EAX
LAB_001322f8:
POP RBP
RET
LAB_001322fa:
XOR EAX,EAX
RET
|
int8 my_wc_mb_euc_kr(int8 param_1,uint param_2,ushort *param_3,ushort *param_4)
{
ushort uVar1;
int8 uVar2;
ulong uVar3;
int1 *puVar4;
uVar2 = 0xffffff9b;
if (param_3 < param_4) {
if (0x7f < param_2) {
if (param_2 - 0xa1 < 199) {
uVar3 = (ulong)(param_2 - 0xa1);
puVar4 = tab_uni_ksc56010;
}
else if (param_2 - 0x2c7 < 0x18b) {
uVar3 = (ulong)(param_2 - 0x2c7);
puVar4 = tab_uni_ksc56011;
}
else if (param_2 - 0x2015 < 0x2fe) {
uVar3 = (ulong)(param_2 - 0x2015);
puVar4 = tab_uni_ksc56012;
}
else if (param_2 - 0x2460 < 0x20e) {
uVar3 = (ulong)(param_2 - 0x2460);
puVar4 = tab_uni_ksc56013;
}
else if (param_2 - 0x3000 < 0x280) {
uVar3 = (ulong)(param_2 - 0x3000);
puVar4 = tab_uni_ksc56014;
}
else if (param_2 - 0x3380 < 0x5e) {
uVar3 = (ulong)(param_2 - 0x3380);
puVar4 = tab_uni_ksc56015;
}
else if (param_2 - 0x4e00 < 0x4680) {
uVar3 = (ulong)(param_2 - 0x4e00);
puVar4 = tab_uni_ksc56016;
}
else if (param_2 - 0x9577 < 0xa26) {
uVar3 = (ulong)(param_2 - 0x9577);
puVar4 = tab_uni_ksc56017;
}
else if (param_2 - 0xac00 < 0x2ba4) {
uVar3 = (ulong)(param_2 - 0xac00);
puVar4 = tab_uni_ksc56018;
}
else if (param_2 - 0xf900 < 0x10c) {
uVar3 = (ulong)(param_2 - 0xf900);
puVar4 = tab_uni_ksc56019;
}
else {
uVar3 = (ulong)(param_2 - 0xff01);
if (0xe5 < param_2 - 0xff01) {
return 0;
}
puVar4 = tab_uni_ksc560110;
}
uVar1 = *(ushort *)(puVar4 + uVar3 * 2);
if (uVar1 == 0) {
uVar2 = 0;
}
else {
uVar2 = 0xffffff9a;
if (param_3 + 1 <= param_4) {
*param_3 = uVar1 << 8 | uVar1 >> 8;
uVar2 = 2;
}
}
return uVar2;
}
*(char *)param_3 = (char)param_2;
uVar2 = 1;
}
return uVar2;
}
| |
43,224 | ggml_hash_size | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c | size_t ggml_hash_size(size_t min_sz) {
// next primes after powers of two
static const size_t primes[] = {
2, 3, 5, 11, 17, 37, 67, 131, 257, 521, 1031,
2053, 4099, 8209, 16411, 32771, 65537, 131101,
262147, 524309, 1048583, 2097169, 4194319, 8388617,
16777259, 33554467, 67108879, 134217757, 268435459,
536870923, 1073741827, 2147483659
};
static const size_t n_primes = sizeof(primes)/sizeof(primes[0]);
// find the smallest prime that is larger or equal than min_sz
size_t l = 0;
size_t r = n_primes;
while (l < r) {
size_t m = (l + r)/2;
if (primes[m] < min_sz) {
l = m + 1;
} else {
r = m;
}
}
size_t sz = l < n_primes ? primes[l] : min_sz | 1;
return sz;
} | O1 | c | ggml_hash_size:
movq %rdi, %rax
movl $0x20, %esi
xorl %edx, %edx
leaq 0x2a965(%rip), %rcx # 0x4c2e0
leaq (%rdx,%rsi), %rdi
shrq %rdi
cmpq %rax, (%rcx,%rdi,8)
jb 0x2198d
movq %rdi, %rsi
jmp 0x21993
incq %rdi
movq %rdi, %rdx
cmpq %rsi, %rdx
jb 0x2197b
cmpq $0x1f, %rdx
ja 0x219a3
movq (%rcx,%rdx,8), %rax
retq
orq $0x1, %rax
retq
| ggml_hash_size:
mov rax, rdi
mov esi, 20h ; ' '
xor edx, edx
lea rcx, ggml_hash_size_primes
loc_2197B:
lea rdi, [rdx+rsi]
shr rdi, 1
cmp [rcx+rdi*8], rax
jb short loc_2198D
mov rsi, rdi
jmp short loc_21993
loc_2198D:
inc rdi
mov rdx, rdi
loc_21993:
cmp rdx, rsi
jb short loc_2197B
cmp rdx, 1Fh
ja short loc_219A3
mov rax, [rcx+rdx*8]
retn
loc_219A3:
or rax, 1
retn
| long long ggml_hash_size(unsigned long long a1)
{
unsigned long long v2; // rsi
unsigned long long v3; // rdx
unsigned long long v4; // rdi
v2 = 32LL;
v3 = 0LL;
do
{
v4 = (v3 + v2) >> 1;
if ( ggml_hash_size_primes[v4] < a1 )
v3 = v4 + 1;
else
v2 = (v3 + v2) >> 1;
}
while ( v3 < v2 );
if ( v3 > 0x1F )
return a1 | 1;
else
return ggml_hash_size_primes[v3];
}
| ggml_hash_size:
MOV RAX,RDI
MOV ESI,0x20
XOR EDX,EDX
LEA RCX,[0x14c2e0]
LAB_0012197b:
LEA RDI,[RDX + RSI*0x1]
SHR RDI,0x1
CMP qword ptr [RCX + RDI*0x8],RAX
JC 0x0012198d
MOV RSI,RDI
JMP 0x00121993
LAB_0012198d:
INC RDI
MOV RDX,RDI
LAB_00121993:
CMP RDX,RSI
JC 0x0012197b
CMP RDX,0x1f
JA 0x001219a3
MOV RAX,qword ptr [RCX + RDX*0x8]
RET
LAB_001219a3:
OR RAX,0x1
RET
|
ulong ggml_hash_size(ulong param_1)
{
ulong uVar1;
ulong uVar2;
ulong uVar3;
uVar3 = 0;
uVar1 = 0x20;
do {
uVar2 = uVar3 + uVar1 >> 1;
if ((ulong)(&ggml_hash_size_primes)[uVar2] < param_1) {
uVar3 = uVar2 + 1;
uVar2 = uVar1;
}
uVar1 = uVar2;
} while (uVar3 < uVar2);
if (0x1f < uVar3) {
return param_1 | 1;
}
return (&ggml_hash_size_primes)[uVar3];
}
| |
43,225 | ggml_hash_size | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c | size_t ggml_hash_size(size_t min_sz) {
// next primes after powers of two
static const size_t primes[] = {
2, 3, 5, 11, 17, 37, 67, 131, 257, 521, 1031,
2053, 4099, 8209, 16411, 32771, 65537, 131101,
262147, 524309, 1048583, 2097169, 4194319, 8388617,
16777259, 33554467, 67108879, 134217757, 268435459,
536870923, 1073741827, 2147483659
};
static const size_t n_primes = sizeof(primes)/sizeof(primes[0]);
// find the smallest prime that is larger or equal than min_sz
size_t l = 0;
size_t r = n_primes;
while (l < r) {
size_t m = (l + r)/2;
if (primes[m] < min_sz) {
l = m + 1;
} else {
r = m;
}
}
size_t sz = l < n_primes ? primes[l] : min_sz | 1;
return sz;
} | O3 | c | ggml_hash_size:
movq %rdi, %rax
movl $0x20, %esi
xorl %edx, %edx
leaq 0x2bd2d(%rip), %rcx # 0x4c320
leaq (%rdx,%rsi), %rdi
shrq %rdi
cmpq %rax, (%rcx,%rdi,8)
jb 0x20605
movq %rdi, %rsi
jmp 0x2060b
incq %rdi
movq %rdi, %rdx
cmpq %rsi, %rdx
jb 0x205f3
cmpq $0x1f, %rdx
ja 0x2061b
movq (%rcx,%rdx,8), %rax
retq
orq $0x1, %rax
retq
| ggml_hash_size:
mov rax, rdi
mov esi, 20h ; ' '
xor edx, edx
lea rcx, ggml_hash_size_primes
loc_205F3:
lea rdi, [rdx+rsi]
shr rdi, 1
cmp [rcx+rdi*8], rax
jb short loc_20605
mov rsi, rdi
jmp short loc_2060B
loc_20605:
inc rdi
mov rdx, rdi
loc_2060B:
cmp rdx, rsi
jb short loc_205F3
cmp rdx, 1Fh
ja short loc_2061B
mov rax, [rcx+rdx*8]
retn
loc_2061B:
or rax, 1
retn
| long long ggml_hash_size(unsigned long long a1)
{
unsigned long long v2; // rsi
unsigned long long v3; // rdx
unsigned long long v4; // rdi
v2 = 32LL;
v3 = 0LL;
do
{
v4 = (v3 + v2) >> 1;
if ( ggml_hash_size_primes[v4] < a1 )
v3 = v4 + 1;
else
v2 = (v3 + v2) >> 1;
}
while ( v3 < v2 );
if ( v3 > 0x1F )
return a1 | 1;
else
return ggml_hash_size_primes[v3];
}
| ggml_hash_size:
MOV RAX,RDI
MOV ESI,0x20
XOR EDX,EDX
LEA RCX,[0x14c320]
LAB_001205f3:
LEA RDI,[RDX + RSI*0x1]
SHR RDI,0x1
CMP qword ptr [RCX + RDI*0x8],RAX
JC 0x00120605
MOV RSI,RDI
JMP 0x0012060b
LAB_00120605:
INC RDI
MOV RDX,RDI
LAB_0012060b:
CMP RDX,RSI
JC 0x001205f3
CMP RDX,0x1f
JA 0x0012061b
MOV RAX,qword ptr [RCX + RDX*0x8]
RET
LAB_0012061b:
OR RAX,0x1
RET
|
ulong ggml_hash_size(ulong param_1)
{
ulong uVar1;
ulong uVar2;
ulong uVar3;
uVar3 = 0;
uVar1 = 0x20;
do {
uVar2 = uVar3 + uVar1 >> 1;
if ((ulong)(&ggml_hash_size_primes)[uVar2] < param_1) {
uVar3 = uVar2 + 1;
uVar2 = uVar1;
}
uVar1 = uVar2;
} while (uVar3 < uVar2);
if (0x1f < uVar3) {
return param_1 | 1;
}
return (&ggml_hash_size_primes)[uVar3];
}
| |
43,226 | ma_tls_set_error | eloqsql/libmariadb/libmariadb/secure/openssl.c | static void ma_tls_set_error(MYSQL *mysql)
{
ulong ssl_errno= ERR_get_error();
char ssl_error[MAX_SSL_ERR_LEN];
const char *ssl_error_reason;
MARIADB_PVIO *pvio= mysql->net.pvio;
int save_errno= errno;
if (ssl_errno && (ssl_error_reason= ERR_reason_error_string(ssl_errno)))
{
pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN,
0, ssl_error_reason);
return;
}
strerror_r(save_errno, ssl_error, MAX_SSL_ERR_LEN);
pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, "TLS/SSL error: %s (%d)",
ssl_error, save_errno);
return;
} | O3 | c | ma_tls_set_error:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x28(%rbp)
callq 0x135f0
movq %rax, %r15
movq (%rbx), %r12
callq 0x13060
movl (%rax), %r14d
testq %r15, %r15
je 0x29ebc
movq %r15, %rdi
callq 0x13800
testq %rax, %rax
je 0x29ebc
movq 0x50(%r12), %r9
leaq 0x21c34(%rip), %rcx # 0x4bac0
movq (%rcx), %rdx
movq %fs:0x28, %rcx
cmpq -0x28(%rbp), %rcx
jne 0x29f15
movq %rbx, %rdi
movl $0x7ea, %esi # imm = 0x7EA
xorl %ecx, %ecx
movq %rax, %r8
xorl %eax, %eax
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmpq *%r9
leaq -0x90(%rbp), %r15
movl $0x64, %edx
movl %r14d, %edi
movq %r15, %rsi
callq 0x131e0
leaq 0x21be6(%rip), %rax # 0x4bac0
movq (%rax), %rdx
leaq 0xd28b(%rip), %rcx # 0x3716f
movq %rbx, %rdi
movl $0x7ea, %esi # imm = 0x7EA
movq %r15, %r8
movl %r14d, %r9d
xorl %eax, %eax
callq *0x50(%r12)
movq %fs:0x28, %rax
cmpq -0x28(%rbp), %rax
jne 0x29f15
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x13500
| ma_tls_set_error:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 70h
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_28], rax
call _ERR_get_error
mov r15, rax
mov r12, [rbx]
call ___errno_location
mov r14d, [rax]
test r15, r15
jz short loc_29EBC
mov rdi, r15
call _ERR_reason_error_string
test rax, rax
jz short loc_29EBC
mov r9, [r12+50h]
lea rcx, SQLSTATE_UNKNOWN
mov rdx, [rcx]
mov rcx, fs:28h
cmp rcx, [rbp+var_28]
jnz short loc_29F15
mov rdi, rbx
mov esi, 7EAh
xor ecx, ecx
mov r8, rax
xor eax, eax
add rsp, 70h
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp r9
loc_29EBC:
lea r15, [rbp+var_90]
mov edx, 64h ; 'd'
mov edi, r14d
mov rsi, r15
call ___xpg_strerror_r
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
lea rcx, aTlsSslErrorSD; "TLS/SSL error: %s (%d)"
mov rdi, rbx
mov esi, 7EAh
mov r8, r15
mov r9d, r14d
xor eax, eax
call qword ptr [r12+50h]
mov rax, fs:28h
cmp rax, [rbp+var_28]
jnz short loc_29F15
add rsp, 70h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_29F15:
call ___stack_chk_fail
| long long ma_tls_set_error(long long *a1)
{
long long error; // r15
long long v2; // r12
unsigned int v3; // r14d
long long v4; // rax
char v6[104]; // [rsp+0h] [rbp-90h] BYREF
unsigned long long v7; // [rsp+68h] [rbp-28h]
v7 = __readfsqword(0x28u);
error = ERR_get_error();
v2 = *a1;
v3 = *(_DWORD *)__errno_location(a1);
if ( error )
{
v4 = ERR_reason_error_string(error);
if ( v4 )
return (*(long long ( **)(long long *, long long, char *, _QWORD, long long))(v2 + 80))(
a1,
2026LL,
SQLSTATE_UNKNOWN,
0LL,
v4);
}
__xpg_strerror_r(v3, v6, 100LL);
(*(void (**)(long long *, long long, char *, const char *, ...))(v2 + 80))(
a1,
2026LL,
SQLSTATE_UNKNOWN,
"TLS/SSL error: %s (%d)",
v6,
v3);
return __readfsqword(0x28u);
}
| ma_tls_set_error:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x70
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x28],RAX
CALL 0x001135f0
MOV R15,RAX
MOV R12,qword ptr [RBX]
CALL 0x00113060
MOV R14D,dword ptr [RAX]
TEST R15,R15
JZ 0x00129ebc
MOV RDI,R15
CALL 0x00113800
TEST RAX,RAX
JZ 0x00129ebc
MOV R9,qword ptr [R12 + 0x50]
LEA RCX,[0x14bac0]
MOV RDX,qword ptr [RCX]
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x28]
JNZ 0x00129f15
MOV RDI,RBX
MOV ESI,0x7ea
XOR ECX,ECX
MOV R8,RAX
XOR EAX,EAX
ADD RSP,0x70
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP R9
LAB_00129ebc:
LEA R15,[RBP + -0x90]
MOV EDX,0x64
MOV EDI,R14D
MOV RSI,R15
CALL 0x001131e0
LEA RAX,[0x14bac0]
MOV RDX,qword ptr [RAX]
LEA RCX,[0x13716f]
MOV RDI,RBX
MOV ESI,0x7ea
MOV R8,R15
MOV R9D,R14D
XOR EAX,EAX
CALL qword ptr [R12 + 0x50]
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x28]
JNZ 0x00129f15
ADD RSP,0x70
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00129f15:
CALL 0x00113500
|
void ma_tls_set_error(long *param_1)
{
int iVar1;
long lVar2;
code *UNRECOVERED_JUMPTABLE;
ulong e;
int *piVar3;
char *pcVar4;
long in_FS_OFFSET;
int1 local_98 [104];
long local_30;
local_30 = *(long *)(in_FS_OFFSET + 0x28);
e = ERR_get_error();
lVar2 = *param_1;
piVar3 = __errno_location();
iVar1 = *piVar3;
if (e != 0) {
pcVar4 = ERR_reason_error_string(e);
if (pcVar4 != (char *)0x0) {
UNRECOVERED_JUMPTABLE = *(code **)(lVar2 + 0x50);
if (*(long *)(in_FS_OFFSET + 0x28) == local_30) {
/* WARNING: Could not recover jumptable at 0x00129eb9. Too many branches */
/* WARNING: Treating indirect jump as call */
(*UNRECOVERED_JUMPTABLE)(param_1,0x7ea,SQLSTATE_UNKNOWN,0,pcVar4,UNRECOVERED_JUMPTABLE);
return;
}
goto LAB_00129f15;
}
}
__xpg_strerror_r(iVar1,local_98,100);
(**(code **)(lVar2 + 0x50))
(param_1,0x7ea,SQLSTATE_UNKNOWN,"TLS/SSL error: %s (%d)",local_98,iVar1);
if (*(long *)(in_FS_OFFSET + 0x28) == local_30) {
return;
}
LAB_00129f15:
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
43,227 | ma_reset_state | eloqsql/storage/maria/ma_state.c | void _ma_reset_state(MARIA_HA *info)
{
MARIA_SHARE *share= info->s;
MARIA_STATE_HISTORY *history= share->state_history;
DBUG_ENTER("_ma_reset_state");
/* Always true if share->now_transactional is set */
if (history && share->have_versioning)
{
MARIA_STATE_HISTORY *next;
DBUG_PRINT("info", ("resetting history"));
/* Set the current history to current state */
share->state_history->state= share->state.state;
/* Set current table handler to point to new history state */
info->state= info->state_start= &share->state_history->state;
for (history= history->next ; history ; history= next)
{
next= history->next;
my_free(history);
}
share->state_history->next= 0;
share->state_history->trid= 0; /* Visible for all */
}
DBUG_VOID_RETURN;
} | O0 | c | ma_reset_state:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x450(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x4988e
movq -0x10(%rbp), %rax
movsbl 0x7e8(%rax), %eax
cmpl $0x0, %eax
je 0x4988e
jmp 0x497f7
jmp 0x497f9
movq -0x10(%rbp), %rax
movq 0x450(%rax), %rdi
addq $0x10, %rdi
movq -0x10(%rbp), %rsi
addq $0x18, %rsi
movl $0x38, %edx
callq 0x2a090
movq -0x10(%rbp), %rax
movq 0x450(%rax), %rcx
addq $0x10, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x49869
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0xf3ba0
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x49844
movq -0x10(%rbp), %rax
movq 0x450(%rax), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rax
movq 0x450(%rax), %rax
movq $0x0, 0x8(%rax)
jmp 0x49890
jmp 0x49892
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _ma_reset_state:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rax, [rax+450h]
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jz loc_4988E
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax+7E8h]
cmp eax, 0
jz loc_4988E
jmp short $+2
loc_497F7:
jmp short $+2
loc_497F9:
mov rax, [rbp+var_10]
mov rdi, [rax+450h]
add rdi, 10h
mov rsi, [rbp+var_10]
add rsi, 18h
mov edx, 38h ; '8'
call _memcpy
mov rax, [rbp+var_10]
mov rcx, [rax+450h]
add rcx, 10h
mov rax, [rbp+var_8]
mov [rax+60h], rcx
mov rax, [rbp+var_8]
mov [rax+20h], rcx
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_18], rax
loc_49844:
cmp [rbp+var_18], 0
jz short loc_49869
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_20], rax
mov rdi, [rbp+var_18]
call my_free
mov rax, [rbp+var_20]
mov [rbp+var_18], rax
jmp short loc_49844
loc_49869:
mov rax, [rbp+var_10]
mov rax, [rax+450h]
mov qword ptr [rax], 0
mov rax, [rbp+var_10]
mov rax, [rax+450h]
mov qword ptr [rax+8], 0
loc_4988E:
jmp short $+2
loc_49890:
jmp short $+2
loc_49892:
add rsp, 20h
pop rbp
retn
| unsigned long long ma_reset_state(_QWORD *a1)
{
unsigned long long result; // rax
long long v2; // rcx
_QWORD *v3; // [rsp+0h] [rbp-20h]
_QWORD *v4; // [rsp+8h] [rbp-18h]
_QWORD *i; // [rsp+8h] [rbp-18h]
long long v6; // [rsp+10h] [rbp-10h]
v6 = *a1;
result = *(_QWORD *)(*a1 + 1104LL);
v4 = (_QWORD *)result;
if ( result )
{
result = (unsigned int)*(char *)(v6 + 2024);
if ( *(_BYTE *)(v6 + 2024) )
{
memcpy(*(_QWORD *)(v6 + 1104) + 16LL, v6 + 24, 56LL);
v2 = *(_QWORD *)(v6 + 1104) + 16LL;
a1[12] = v2;
a1[4] = v2;
for ( i = (_QWORD *)*v4; i; i = v3 )
{
v3 = (_QWORD *)*i;
my_free(i);
}
**(_QWORD **)(v6 + 1104) = 0LL;
result = *(_QWORD *)(v6 + 1104);
*(_QWORD *)(result + 8) = 0LL;
}
}
return result;
}
| _ma_reset_state:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x450]
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0014988e
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX + 0x7e8]
CMP EAX,0x0
JZ 0x0014988e
JMP 0x001497f7
LAB_001497f7:
JMP 0x001497f9
LAB_001497f9:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x450]
ADD RDI,0x10
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x18
MOV EDX,0x38
CALL 0x0012a090
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x450]
ADD RCX,0x10
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x60],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x20],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
LAB_00149844:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00149869
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001f3ba0
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00149844
LAB_00149869:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x450]
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x450]
MOV qword ptr [RAX + 0x8],0x0
LAB_0014988e:
JMP 0x00149890
LAB_00149890:
JMP 0x00149892
LAB_00149892:
ADD RSP,0x20
POP RBP
RET
|
void _ma_reset_state(long *param_1)
{
long lVar1;
int8 *puVar2;
long lVar3;
int8 *local_20;
lVar1 = *param_1;
puVar2 = *(int8 **)(lVar1 + 0x450);
if ((puVar2 != (int8 *)0x0) && (*(char *)(lVar1 + 0x7e8) != '\0')) {
memcpy((void *)(*(long *)(lVar1 + 0x450) + 0x10),(void *)(lVar1 + 0x18),0x38);
lVar3 = *(long *)(lVar1 + 0x450) + 0x10;
param_1[0xc] = lVar3;
param_1[4] = lVar3;
local_20 = (int8 *)*puVar2;
while (local_20 != (int8 *)0x0) {
puVar2 = (int8 *)*local_20;
my_free(local_20);
local_20 = puVar2;
}
**(int8 **)(lVar1 + 0x450) = 0;
*(int8 *)(*(long *)(lVar1 + 0x450) + 8) = 0;
}
return;
}
| |
43,228 | init_default_directories | eloqsql/mysys/my_default.c | static const char **init_default_directories(MEM_ROOT *alloc)
{
const char **dirs;
char *env;
int errors= 0;
DBUG_ENTER("init_default_directories");
dirs= (const char **)alloc_root(alloc, DEFAULT_DIRS_SIZE * sizeof(char *));
if (dirs == NULL)
DBUG_RETURN(NULL);
bzero((char *) dirs, DEFAULT_DIRS_SIZE * sizeof(char *));
#ifdef _WIN32
{
char fname_buffer[FN_REFLEN];
if (GetSystemWindowsDirectory(fname_buffer, sizeof(fname_buffer)))
errors += add_directory(alloc, fname_buffer, dirs);
if (GetWindowsDirectory(fname_buffer, sizeof(fname_buffer)))
errors += add_directory(alloc, fname_buffer, dirs);
errors += add_directory(alloc, "C:/", dirs);
if (my_get_module_parent(fname_buffer, sizeof(fname_buffer)) != NULL)
{
errors += add_directory(alloc, fname_buffer, dirs);
strcat_s(fname_buffer, sizeof(fname_buffer), "/data");
errors += add_directory(alloc, fname_buffer, dirs);
}
}
#else
#if defined(DEFAULT_SYSCONFDIR)
if (DEFAULT_SYSCONFDIR[0])
errors += add_directory(alloc, DEFAULT_SYSCONFDIR, dirs);
#else
errors += add_directory(alloc, "/etc/", dirs);
errors += add_directory(alloc, "/etc/mysql/", dirs);
#endif /* DEFAULT_SYSCONFDIR */
#endif
/*
If value of $MARIADB_HOME environment variable name is NULL, check
for $MYSQL_HOME
*/
if ((env= getenv("MARIADB_HOME")))
errors += add_directory(alloc, env, dirs);
else
{
if ((env= getenv("MYSQL_HOME")))
errors += add_directory(alloc, env, dirs);
}
/* Placeholder for --defaults-extra-file=<path> */
errors += add_directory(alloc, "", dirs);
#if !defined(_WIN32)
errors += add_directory(alloc, "~/", dirs);
#endif
DBUG_RETURN(errors > 0 ? NULL : dirs);
} | O0 | c | init_default_directories:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movl $0x40, %esi
callq 0x816c0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x700ab
jmp 0x7009e
movq $0x0, -0x8(%rbp)
jmp 0x7019f
movq -0x18(%rbp), %rdi
xorl %esi, %esi
movl $0x40, %edx
callq 0x291f0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x7586e(%rip), %rsi # 0xe5938
callq 0x71db0
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x7585a(%rip), %rsi # 0xe593e
callq 0x71db0
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
leaq 0x75854(%rip), %rdi # 0xe594a
callq 0x294e0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x7011e
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x71db0
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x7014d
leaq 0x75832(%rip), %rdi # 0xe5957
callq 0x294e0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x7014b
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x71db0
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x7014d
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x799a4(%rip), %rsi # 0xe9b00
callq 0x71db0
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0x757ec(%rip), %rsi # 0xe5962
callq 0x71db0
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jle 0x7018f
xorl %eax, %eax
movq %rax, -0x30(%rbp)
jmp 0x70197
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| init_default_directories:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_24], 0
mov rdi, [rbp+var_10]
mov esi, 40h ; '@'
call alloc_root
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jnz short loc_700AB
jmp short $+2
loc_7009E:
mov [rbp+var_8], 0
jmp loc_7019F
loc_700AB:
mov rdi, [rbp+var_18]
xor esi, esi
mov edx, 40h ; '@'
call _memset
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
lea rsi, aEtc; "/etc/"
call add_directory
add eax, [rbp+var_24]
mov [rbp+var_24], eax
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
lea rsi, aEtcMysql; "/etc/mysql/"
call add_directory
add eax, [rbp+var_24]
mov [rbp+var_24], eax
lea rdi, aMariadbHome; "MARIADB_HOME"
call _getenv
mov [rbp+var_20], rax
cmp rax, 0
jz short loc_7011E
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_18]
call add_directory
add eax, [rbp+var_24]
mov [rbp+var_24], eax
jmp short loc_7014D
loc_7011E:
lea rdi, aMysqlHome; "MYSQL_HOME"
call _getenv
mov [rbp+var_20], rax
cmp rax, 0
jz short loc_7014B
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_18]
call add_directory
add eax, [rbp+var_24]
mov [rbp+var_24], eax
loc_7014B:
jmp short $+2
loc_7014D:
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
lea rsi, asc_E9AFC+4; ""
call add_directory
add eax, [rbp+var_24]
mov [rbp+var_24], eax
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
lea rsi, asc_E5962; "~/"
call add_directory
add eax, [rbp+var_24]
mov [rbp+var_24], eax
cmp [rbp+var_24], 0
jle short loc_7018F
xor eax, eax
mov [rbp+var_30], rax
jmp short loc_70197
loc_7018F:
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
loc_70197:
mov rax, [rbp+var_30]
mov [rbp+var_8], rax
loc_7019F:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| long long init_default_directories(long long a1)
{
int v3; // [rsp+Ch] [rbp-24h]
int v4; // [rsp+Ch] [rbp-24h]
int v5; // [rsp+Ch] [rbp-24h]
long long v6; // [rsp+10h] [rbp-20h]
long long v7; // [rsp+18h] [rbp-18h]
v7 = alloc_root(a1, 64LL);
if ( !v7 )
return 0LL;
memset(v7, 0LL, 64LL);
v3 = add_directory(a1, "/etc/", v7);
v4 = v3 + add_directory(a1, "/etc/mysql/", v7);
v6 = getenv("MARIADB_HOME");
if ( v6 || (v6 = getenv("MYSQL_HOME")) != 0 )
v4 += add_directory(a1, v6, v7);
v5 = v4 + add_directory(a1, "", v7);
if ( (int)(v5 + add_directory(a1, "~/", v7)) <= 0 )
return v7;
else
return 0LL;
}
| init_default_directories:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x24],0x0
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x40
CALL 0x001816c0
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x001700ab
JMP 0x0017009e
LAB_0017009e:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0017019f
LAB_001700ab:
MOV RDI,qword ptr [RBP + -0x18]
XOR ESI,ESI
MOV EDX,0x40
CALL 0x001291f0
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
LEA RSI,[0x1e5938]
CALL 0x00171db0
ADD EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x24],EAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
LEA RSI,[0x1e593e]
CALL 0x00171db0
ADD EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x24],EAX
LEA RDI,[0x1e594a]
CALL 0x001294e0
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JZ 0x0017011e
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x00171db0
ADD EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x24],EAX
JMP 0x0017014d
LAB_0017011e:
LEA RDI,[0x1e5957]
CALL 0x001294e0
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,0x0
JZ 0x0017014b
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x00171db0
ADD EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x24],EAX
LAB_0017014b:
JMP 0x0017014d
LAB_0017014d:
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
LEA RSI,[0x1e9b00]
CALL 0x00171db0
ADD EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x24],EAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
LEA RSI,[0x1e5962]
CALL 0x00171db0
ADD EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x24],EAX
CMP dword ptr [RBP + -0x24],0x0
JLE 0x0017018f
XOR EAX,EAX
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00170197
LAB_0017018f:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
LAB_00170197:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x8],RAX
LAB_0017019f:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
void * init_default_directories(int8 param_1)
{
int iVar1;
int iVar2;
char *pcVar3;
void *local_38;
int local_2c;
void *local_10;
local_38 = (void *)alloc_root(param_1);
if (local_38 == (void *)0x0) {
local_10 = (void *)0x0;
}
else {
memset(local_38,0,0x40);
iVar1 = add_directory(param_1,"/etc/",local_38);
local_2c = add_directory(param_1,"/etc/mysql/",local_38);
local_2c = local_2c + iVar1;
pcVar3 = getenv("MARIADB_HOME");
if (pcVar3 == (char *)0x0) {
pcVar3 = getenv("MYSQL_HOME");
if (pcVar3 != (char *)0x0) {
iVar1 = add_directory(param_1,pcVar3,local_38);
local_2c = iVar1 + local_2c;
}
}
else {
iVar1 = add_directory(param_1,pcVar3,local_38);
local_2c = iVar1 + local_2c;
}
iVar1 = add_directory(param_1,&DAT_001e9b00,local_38);
iVar2 = add_directory(param_1,&DAT_001e5962,local_38);
if (0 < iVar2 + iVar1 + local_2c) {
local_38 = (void *)0x0;
}
local_10 = local_38;
}
return local_10;
}
| |
43,229 | list_free | eloqsql/libmariadb/libmariadb/ma_list.c | void list_free(LIST *root, unsigned int free_data)
{
LIST *next;
while (root)
{
next=root->next;
if (free_data)
free(root->data);
free(root);
root=next;
}
} | O3 | c | list_free:
testq %rdi, %rdi
je 0x4bd56
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movq 0x8(%r14), %r15
testl %ebx, %ebx
je 0x4bd3c
movq 0x10(%r14), %rdi
callq 0x37190
movq %r14, %rdi
callq 0x37190
movq %r15, %r14
testq %r15, %r15
jne 0x4bd2b
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| list_free:
test rdi, rdi
jz short locret_4BD56
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov ebx, esi
mov r14, rdi
loc_4BD2B:
mov r15, [r14+8]
test ebx, ebx
jz short loc_4BD3C
mov rdi, [r14+10h]
call _free
loc_4BD3C:
mov rdi, r14
call _free
mov r14, r15
test r15, r15
jnz short loc_4BD2B
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
locret_4BD56:
retn
| long long list_free(long long a1, int a2)
{
long long v2; // r14
long long v3; // r15
long long result; // rax
if ( a1 )
{
v2 = a1;
do
{
v3 = *(_QWORD *)(v2 + 8);
if ( a2 )
free(*(_QWORD *)(v2 + 16));
result = free(v2);
v2 = v3;
}
while ( v3 );
}
return result;
}
| list_free:
TEST RDI,RDI
JZ 0x0014bd56
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV R14,RDI
LAB_0014bd2b:
MOV R15,qword ptr [R14 + 0x8]
TEST EBX,EBX
JZ 0x0014bd3c
MOV RDI,qword ptr [R14 + 0x10]
CALL 0x00137190
LAB_0014bd3c:
MOV RDI,R14
CALL 0x00137190
MOV R14,R15
TEST R15,R15
JNZ 0x0014bd2b
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
LAB_0014bd56:
RET
|
void list_free(void *param_1,int param_2)
{
void *pvVar1;
if (param_1 != (void *)0x0) {
do {
pvVar1 = *(void **)((long)param_1 + 8);
if (param_2 != 0) {
free(*(void **)((long)param_1 + 0x10));
}
free(param_1);
param_1 = pvVar1;
} while (pvVar1 != (void *)0x0);
}
return;
}
| |
43,230 | my_wc_mb_utf8mb4_no_range | eloqsql/strings/ctype-utf8.c | static int
my_wc_mb_utf8mb4_no_range(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *r)
{
int count;
if (wc < 0x80)
count= 1;
else if (wc < 0x800)
count= 2;
else if (wc < 0x10000)
count= 3;
else if (wc < 0x200000)
count= 4;
else
return MY_CS_ILUNI;
switch (count)
{
case 4: r[3]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0x10000;
/* fall through */
case 3: r[2]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0x800;
/* fall through */
case 2: r[1]= (uchar) (0x80 | (wc & 0x3f)); wc= wc >> 6; wc |= 0xc0;
/* fall through */
case 1: r[0]= (uchar) wc;
}
return count;
} | O0 | c | my_wc_mb_utf8mb4_no_range:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x80, -0x18(%rbp)
jae 0x68be3
movl $0x1, -0x24(%rbp)
jmp 0x68c2e
cmpq $0x800, -0x18(%rbp) # imm = 0x800
jae 0x68bf6
movl $0x2, -0x24(%rbp)
jmp 0x68c2c
cmpq $0x10000, -0x18(%rbp) # imm = 0x10000
jae 0x68c09
movl $0x3, -0x24(%rbp)
jmp 0x68c2a
cmpq $0x200000, -0x18(%rbp) # imm = 0x200000
jae 0x68c1c
movl $0x4, -0x24(%rbp)
jmp 0x68c28
movl $0x0, -0x4(%rbp)
jmp 0x68cfb
jmp 0x68c2a
jmp 0x68c2c
jmp 0x68c2e
movl -0x24(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x30(%rbp)
subl $0x3, %eax
ja 0x68cf5
movq -0x30(%rbp), %rax
leaq 0x147213(%rip), %rcx # 0x1afe60
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
andq $0x3f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x18(%rbp), %rax
shrq $0x6, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
orq $0x10000, %rax # imm = 0x10000
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
andq $0x3f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x18(%rbp), %rax
shrq $0x6, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
orq $0x800, %rax # imm = 0x800
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
andq $0x3f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x18(%rbp), %rax
shrq $0x6, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
orq $0xc0, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
| my_wc_mb_utf8mb4_no_range:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
cmp [rbp+var_18], 80h
jnb short loc_68BE3
mov [rbp+var_24], 1
jmp short loc_68C2E
loc_68BE3:
cmp [rbp+var_18], 800h
jnb short loc_68BF6
mov [rbp+var_24], 2
jmp short loc_68C2C
loc_68BF6:
cmp [rbp+var_18], 10000h
jnb short loc_68C09
mov [rbp+var_24], 3
jmp short loc_68C2A
loc_68C09:
cmp [rbp+var_18], offset unk_200000
jnb short loc_68C1C
mov [rbp+var_24], 4
jmp short loc_68C28
loc_68C1C:
mov [rbp+var_4], 0
jmp loc_68CFB
loc_68C28:
jmp short $+2
loc_68C2A:
jmp short $+2
loc_68C2C:
jmp short $+2
loc_68C2E:
mov eax, [rbp+var_24]
dec eax; switch 4 cases
mov ecx, eax
mov [rbp+var_30], rcx
sub eax, 3
ja def_68C54; jumptable 0000000000068C54 default case
mov rax, [rbp+var_30]
lea rcx, jpt_68C54
movsxd rax, ds:(jpt_68C54 - 1AFE60h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_68C56:
mov rax, [rbp+var_18]; jumptable 0000000000068C54 case 4
and rax, 3Fh
or rax, 80h
mov cl, al
mov rax, [rbp+var_20]
mov [rax+3], cl
mov rax, [rbp+var_18]
shr rax, 6
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
or rax, 10000h
mov [rbp+var_18], rax
loc_68C87:
mov rax, [rbp+var_18]; jumptable 0000000000068C54 case 3
and rax, 3Fh
or rax, 80h
mov cl, al
mov rax, [rbp+var_20]
mov [rax+2], cl
mov rax, [rbp+var_18]
shr rax, 6
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
or rax, 800h
mov [rbp+var_18], rax
loc_68CB8:
mov rax, [rbp+var_18]; jumptable 0000000000068C54 case 2
and rax, 3Fh
or rax, 80h
mov cl, al
mov rax, [rbp+var_20]
mov [rax+1], cl
mov rax, [rbp+var_18]
shr rax, 6
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
or rax, 0C0h
mov [rbp+var_18], rax
loc_68CE9:
mov rax, [rbp+var_18]; jumptable 0000000000068C54 case 1
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
def_68C54:
mov eax, [rbp+var_24]; jumptable 0000000000068C54 default case
mov [rbp+var_4], eax
loc_68CFB:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_wc_mb_utf8mb4_no_range(long long a1, unsigned long long a2, _BYTE *a3)
{
unsigned int v4; // [rsp+Ch] [rbp-24h]
unsigned long long v5; // [rsp+18h] [rbp-18h]
v5 = a2;
if ( a2 >= 0x80 )
{
if ( a2 >= 0x800 )
{
if ( a2 >= 0x10000 )
{
if ( a2 >= (unsigned long long)&unk_200000 )
return 0;
v4 = 4;
}
else
{
v4 = 3;
}
}
else
{
v4 = 2;
}
}
else
{
v4 = 1;
}
switch ( v4 )
{
case 1u:
goto LABEL_14;
case 2u:
goto LABEL_13;
case 3u:
goto LABEL_12;
case 4u:
a3[3] = a2 & 0x3F | 0x80;
v5 = (a2 >> 6) | 0x10000;
LABEL_12:
a3[2] = v5 & 0x3F | 0x80;
v5 = (v5 >> 6) | 0x800;
LABEL_13:
a3[1] = v5 & 0x3F | 0x80;
v5 = (v5 >> 6) | 0xC0;
LABEL_14:
*a3 = v5;
break;
default:
break;
}
return v4;
}
| my_wc_mb_utf8mb4_no_range:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
CMP qword ptr [RBP + -0x18],0x80
JNC 0x00168be3
MOV dword ptr [RBP + -0x24],0x1
JMP 0x00168c2e
LAB_00168be3:
CMP qword ptr [RBP + -0x18],0x800
JNC 0x00168bf6
MOV dword ptr [RBP + -0x24],0x2
JMP 0x00168c2c
LAB_00168bf6:
CMP qword ptr [RBP + -0x18],0x10000
JNC 0x00168c09
MOV dword ptr [RBP + -0x24],0x3
JMP 0x00168c2a
LAB_00168c09:
CMP qword ptr [RBP + -0x18],0x200000
JNC 0x00168c1c
MOV dword ptr [RBP + -0x24],0x4
JMP 0x00168c28
LAB_00168c1c:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00168cfb
LAB_00168c28:
JMP 0x00168c2a
LAB_00168c2a:
JMP 0x00168c2c
LAB_00168c2c:
JMP 0x00168c2e
LAB_00168c2e:
MOV EAX,dword ptr [RBP + -0x24]
DEC EAX
MOV ECX,EAX
MOV qword ptr [RBP + -0x30],RCX
SUB EAX,0x3
JA 0x00168cf5
MOV RAX,qword ptr [RBP + -0x30]
LEA RCX,[0x2afe60]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_4:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x3f
OR RAX,0x80
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x3],CL
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x6
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
OR RAX,0x10000
MOV qword ptr [RBP + -0x18],RAX
caseD_3:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x3f
OR RAX,0x80
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x6
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
OR RAX,0x800
MOV qword ptr [RBP + -0x18],RAX
caseD_2:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x3f
OR RAX,0x80
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x6
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
OR RAX,0xc0
MOV qword ptr [RBP + -0x18],RAX
caseD_1:
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
default:
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
LAB_00168cfb:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_wc_mb_utf8mb4_no_range(int8 param_1,ulong param_2,int1 *param_3)
{
int4 local_2c;
ulong local_20;
if (param_2 < 0x80) {
local_2c = 1;
}
else if (param_2 < 0x800) {
local_2c = 2;
}
else if (param_2 < 0x10000) {
local_2c = 3;
}
else {
if (0x1fffff < param_2) {
return 0;
}
local_2c = 4;
}
local_20 = param_2;
switch(local_2c) {
case 4:
param_3[3] = (byte)param_2 & 0x3f | 0x80;
local_20 = param_2 >> 6 | 0x10000;
case 3:
param_3[2] = (byte)local_20 & 0x3f | 0x80;
local_20 = local_20 >> 6 | 0x800;
case 2:
param_3[1] = (byte)local_20 & 0x3f | 0x80;
local_20 = local_20 >> 6 | 0xc0;
case 1:
*param_3 = (char)local_20;
return local_2c;
default:
return local_2c;
}
}
| |
43,231 | dump_page | eloqsql/storage/maria/ma_loghandler.c | void dump_page(uchar *buffer, File handler)
{
if (strncmp((char*)maria_trans_file_magic, (char*)buffer,
sizeof(maria_trans_file_magic)) == 0)
{
dump_header_page(buffer);
return;
}
dump_datapage(buffer, handler);
} | O0 | c | dump_page:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rsi
leaq 0x287e3e(%rip), %rdi # 0x2bdf28
movl $0xc, %edx
callq 0x2a1c0
cmpl $0x0, %eax
jne 0x36104
movq -0x8(%rbp), %rdi
callq 0x36120
jmp 0x36110
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x36290
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| dump_page:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov rsi, [rbp+var_8]
lea rdi, maria_trans_file_magic
mov edx, 0Ch
call _strncmp
cmp eax, 0
jnz short loc_36104
mov rdi, [rbp+var_8]
call dump_header_page
jmp short loc_36110
loc_36104:
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
call dump_datapage
loc_36110:
add rsp, 10h
pop rbp
retn
| long long dump_page(long long a1, unsigned int a2)
{
if ( !(unsigned int)strncmp(&maria_trans_file_magic, a1, 12LL) )
return dump_header_page(a1);
else
return dump_datapage(a1, a2);
}
| dump_page:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV RSI,qword ptr [RBP + -0x8]
LEA RDI,[0x3bdf28]
MOV EDX,0xc
CALL 0x0012a1c0
CMP EAX,0x0
JNZ 0x00136104
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00136120
JMP 0x00136110
LAB_00136104:
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
CALL 0x00136290
LAB_00136110:
ADD RSP,0x10
POP RBP
RET
|
void dump_page(char *param_1,int4 param_2)
{
int iVar1;
iVar1 = strncmp((char *)&maria_trans_file_magic,param_1,0xc);
if (iVar1 == 0) {
dump_header_page(param_1);
}
else {
dump_datapage(param_1,param_2);
}
return;
}
| |
43,232 | lf_alloc_init | eloqsql/mysys/lf_alloc-pin.c | void lf_alloc_init(LF_ALLOCATOR *allocator, uint size, uint free_ptr_offset)
{
lf_pinbox_init(&allocator->pinbox, free_ptr_offset,
(lf_pinbox_free_func *)alloc_free, allocator);
allocator->top= 0;
allocator->mallocs= 0;
allocator->element_size= size;
allocator->constructor= 0;
allocator->destructor= 0;
DBUG_ASSERT(size >= sizeof(void*) + free_ptr_offset);
} | O0 | c | lf_alloc_init:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %esi
movq -0x8(%rbp), %rcx
leaq 0x4c(%rip), %rdx # 0xfc200
callq 0xfbaf0
movq -0x8(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x54(%rax)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x50(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x58(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x60(%rax)
jmp 0xfc1f4
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| lf_alloc_init:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], edx
mov rdi, [rbp+var_8]
mov esi, [rbp+var_10]
mov rcx, [rbp+var_8]
lea rdx, alloc_free
call lf_pinbox_init
mov rax, [rbp+var_8]
mov qword ptr [rax+48h], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+54h], 0
mov ecx, [rbp+var_C]
mov rax, [rbp+var_8]
mov [rax+50h], ecx
mov rax, [rbp+var_8]
mov qword ptr [rax+58h], 0
mov rax, [rbp+var_8]
mov qword ptr [rax+60h], 0
jmp short $+2
loc_FC1F4:
add rsp, 10h
pop rbp
retn
| long long lf_alloc_init(long long a1, int a2, int a3)
{
long long result; // rax
lf_pinbox_init(a1, a3, (long long)alloc_free, a1);
*(_QWORD *)(a1 + 72) = 0LL;
*(_DWORD *)(a1 + 84) = 0;
*(_DWORD *)(a1 + 80) = a2;
*(_QWORD *)(a1 + 88) = 0LL;
result = a1;
*(_QWORD *)(a1 + 96) = 0LL;
return result;
}
| lf_alloc_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],EDX
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x8]
LEA RDX,[0x1fc200]
CALL 0x001fbaf0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x48],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x54],0x0
MOV ECX,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x50],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x58],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x60],0x0
JMP 0x001fc1f4
LAB_001fc1f4:
ADD RSP,0x10
POP RBP
RET
|
void lf_alloc_init(long param_1,int4 param_2,int4 param_3)
{
lf_pinbox_init(param_1,param_3,alloc_free,param_1);
*(int8 *)(param_1 + 0x48) = 0;
*(int4 *)(param_1 + 0x54) = 0;
*(int4 *)(param_1 + 0x50) = param_2;
*(int8 *)(param_1 + 0x58) = 0;
*(int8 *)(param_1 + 0x60) = 0;
return;
}
| |
43,233 | 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::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::erase<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::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>>, 0>(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::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>) | monkey531[P]llama/common/json.hpp | IteratorType erase(IteratorType pos)
{
// make sure iterator fits the current value
if (JSON_HEDLEY_UNLIKELY(this != pos.m_object))
{
JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value", this));
}
IteratorType result = end();
switch (m_data.m_type)
{
case value_t::boolean:
case value_t::number_float:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::string:
case value_t::binary:
{
if (JSON_HEDLEY_UNLIKELY(!pos.m_it.primitive_iterator.is_begin()))
{
JSON_THROW(invalid_iterator::create(205, "iterator out of range", this));
}
if (is_string())
{
AllocatorType<string_t> alloc;
std::allocator_traits<decltype(alloc)>::destroy(alloc, m_data.m_value.string);
std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_data.m_value.string, 1);
m_data.m_value.string = nullptr;
}
else if (is_binary())
{
AllocatorType<binary_t> alloc;
std::allocator_traits<decltype(alloc)>::destroy(alloc, m_data.m_value.binary);
std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_data.m_value.binary, 1);
m_data.m_value.binary = nullptr;
}
m_data.m_type = value_t::null;
assert_invariant();
break;
}
case value_t::object:
{
result.m_it.object_iterator = m_data.m_value.object->erase(pos.m_it.object_iterator);
break;
}
case value_t::array:
{
result.m_it.array_iterator = m_data.m_value.array->erase(pos.m_it.array_iterator);
break;
}
case value_t::null:
case value_t::discarded:
default:
JSON_THROW(type_error::create(307, detail::concat("cannot use erase() with ", type_name()), this));
}
return result;
} | O1 | cpp | 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::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::erase<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::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>>, 0>(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::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
cmpq %rsi, (%rdx)
jne 0x49ddc
movq %rdx, %r15
movq %rdi, %rbx
movq %r14, %rsi
callq 0x49b42
movzbl (%r14), %eax
leal -0x3(%rax), %ecx
cmpl $0x6, %ecx
jae 0x49d4d
cmpq $0x0, 0x18(%r15)
jne 0x49e3f
cmpl $0x8, %eax
je 0x49d6e
cmpl $0x3, %eax
jne 0x49da4
leaq 0x8(%r14), %r12
movq 0x8(%r14), %rax
movq (%rax), %rdi
addq $0x10, %rax
movl $0x20, %r15d
cmpq %rax, %rdi
je 0x49d90
movq (%rax), %rsi
incq %rsi
jmp 0x49d8b
cmpl $0x1, %eax
je 0x49dc5
cmpl $0x2, %eax
jne 0x49e9f
movq 0x8(%r14), %rdi
movq 0x10(%r15), %rsi
callq 0x4aa9e
movq %rax, 0x10(%rbx)
jmp 0x49db5
leaq 0x8(%r14), %r12
movq 0x8(%r14), %rax
movq (%rax), %rdi
movl $0x28, %r15d
testq %rdi, %rdi
je 0x49d90
movq 0x10(%rax), %rsi
subq %rdi, %rsi
callq 0x186a0
movq (%r12), %rdi
movq %r15, %rsi
callq 0x186a0
movq $0x0, (%r12)
movb $0x0, (%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x3dcd2
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%r14), %rdi
movq 0x8(%r15), %rsi
leaq 0x30(%rsi), %rdx
callq 0x4a5da
movq %rax, 0x8(%rbx)
jmp 0x49db5
movl $0x20, %edi
callq 0x18350
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x63f02(%rip), %rsi # 0xadcfb
leaq 0x63f1e(%rip), %rdx # 0xadd1e
leaq 0x8(%rsp), %rdi
callq 0x1ca8a
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0xca, %esi
movq %r14, %rcx
callq 0x4a11a
xorl %ebp, %ebp
leaq 0x935c5(%rip), %rsi # 0xdd3f0
leaq 0x2bd2(%rip), %rdx # 0x4ca04
movq %rbx, %rdi
callq 0x18b30
jmp 0x49efd
movl $0x20, %edi
callq 0x18350
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x63ec3(%rip), %rsi # 0xadd1f
leaq 0x63ed1(%rip), %rdx # 0xadd34
leaq 0x8(%rsp), %rdi
callq 0x1ca8a
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0xcd, %esi
movq %r14, %rcx
callq 0x4a11a
xorl %ebp, %ebp
leaq 0x93562(%rip), %rsi # 0xdd3f0
leaq 0x2b6f(%rip), %rdx # 0x4ca04
movq %rbx, %rdi
callq 0x18b30
jmp 0x49efd
movl $0x20, %edi
callq 0x18350
movq %rax, %rbx
movq %r14, %rdi
callq 0x3e39c
leaq 0x28(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x63e72(%rip), %rsi # 0xadd35
leaq 0x8(%rsp), %rdi
callq 0x4a551
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x133, %esi # imm = 0x133
movq %r14, %rcx
callq 0x4a382
xorl %ebp, %ebp
leaq 0x933da(%rip), %rsi # 0xdd2c8
leaq 0x2b0f(%rip), %rdx # 0x4ca04
movq %rbx, %rdi
callq 0x18b30
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x49f23
jmp 0x49f38
jmp 0x49f32
jmp 0x49f16
jmp 0x49f32
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x49f38
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0x49f38
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x49f45
movq %rbx, %rdi
callq 0x184f0
movq %r14, %rdi
callq 0x18bb0
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_:
push rbp; int
push r15; int
push r14; char
push r12; int
push rbx; __int64
sub rsp, 30h
mov r14, rsi
cmp [rdx], rsi
jnz loc_49DDC
mov r15, rdx
mov rbx, rdi
mov rsi, r14
call _ZN8nlohmann16json_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)
movzx eax, byte ptr [r14]
lea ecx, [rax-3]
cmp ecx, 6
jnb short loc_49D4D
cmp qword ptr [r15+18h], 0
jnz loc_49E3F
cmp eax, 8
jz short loc_49D6E
cmp eax, 3
jnz short loc_49DA4
lea r12, [r14+8]
mov rax, [r14+8]
mov rdi, [rax]
add rax, 10h
mov r15d, 20h ; ' '
cmp rdi, rax
jz short loc_49D90
mov rsi, [rax]
inc rsi
jmp short loc_49D8B
loc_49D4D:
cmp eax, 1
jz short loc_49DC5
cmp eax, 2
jnz loc_49E9F
mov rdi, [r14+8]
mov rsi, [r15+10h]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE8_M_eraseEN9__gnu_cxx17__normal_iteratorIPSD_SF_EE; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::_M_erase(__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>*,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>)
mov [rbx+10h], rax
jmp short loc_49DB5
loc_49D6E:
lea r12, [r14+8]
mov rax, [r14+8]
mov rdi, [rax]; void *
mov r15d, 28h ; '('
test rdi, rdi
jz short loc_49D90
mov rsi, [rax+10h]
sub rsi, rdi; unsigned __int64
loc_49D8B:
call __ZdlPvm; operator delete(void *,ulong)
loc_49D90:
mov rdi, [r12]; void *
mov rsi, r15; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
mov qword ptr [r12], 0
loc_49DA4:
mov byte ptr [r14], 0
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
loc_49DB5:
mov rax, rbx
add rsp, 30h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_49DC5:
mov rdi, [r14+8]
mov rsi, [r15+8]
lea rdx, [rsi+30h]
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEESP_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::erase(__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>*,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>,__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>*,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>)
mov [rbx+8], rax
jmp short loc_49DB5
loc_49DDC:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r15, [rsp+58h+var_40]
mov [r15-10h], r15
lea rsi, aIteratorDoesNo; "iterator does not fit current value"
lea rdx, aIteratorDoesNo+23h; ""
lea rdi, [rsp+58h+var_50]
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 bpl, 1
lea rdx, [rsp+58h+var_50]
mov rdi, rbx; this
mov esi, 0CAh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp loc_49EFD
loc_49E3F:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r15, [rsp+58h+var_40]
mov [r15-10h], r15
lea rsi, aIteratorOutOfR; "iterator out of range"
lea rdx, aIteratorOutOfR+15h; ""
lea rdi, [rsp+58h+var_50]
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 bpl, 1
lea rdx, [rsp+58h+var_50]
mov rdi, rbx; this
mov esi, 0CDh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_49EFD
loc_49E9F:
mov edi, 20h ; ' '; thrown_size
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+58h+var_30]
mov [rdx], rax
lea rsi, aCannotUseErase; "cannot use erase() with "
lea rdi, [rsp+58h+var_50]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA25_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[25],char const*>(char const(&)[25],char const* &&)
mov bpl, 1
lea rdx, [rsp+58h+var_50]
mov rdi, rbx; this
mov esi, 133h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
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
loc_49EFD:
mov r14, rax
lea rax, [rsp+58h+var_40]
mov rdi, [rax-10h]
cmp rdi, rax
jnz short loc_49F23
jmp short loc_49F38
jmp short loc_49F32
jmp short loc_49F16
jmp short loc_49F32
loc_49F16:
mov r14, rax
mov rdi, [rsp+58h+var_50]; void *
cmp rdi, r15
jz short loc_49F38
loc_49F23:
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_49F38
loc_49F32:
mov r14, rax
mov bpl, 1
loc_49F38:
test bpl, bpl
jz short loc_49F45
mov rdi, rbx; void *
call ___cxa_free_exception
loc_49F45:
mov rdi, r14
call __Unwind_Resume
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x30
MOV R14,RSI
CMP qword ptr [RDX],RSI
JNZ 0x00149ddc
MOV R15,RDX
MOV RBX,RDI
MOV RSI,R14
CALL 0x00149b42
MOVZX EAX,byte ptr [R14]
LEA ECX,[RAX + -0x3]
CMP ECX,0x6
JNC 0x00149d4d
CMP qword ptr [R15 + 0x18],0x0
JNZ 0x00149e3f
CMP EAX,0x8
JZ 0x00149d6e
CMP EAX,0x3
JNZ 0x00149da4
LEA R12,[R14 + 0x8]
MOV RAX,qword ptr [R14 + 0x8]
MOV RDI,qword ptr [RAX]
ADD RAX,0x10
MOV R15D,0x20
CMP RDI,RAX
JZ 0x00149d90
MOV RSI,qword ptr [RAX]
INC RSI
JMP 0x00149d8b
LAB_00149d4d:
CMP EAX,0x1
JZ 0x00149dc5
CMP EAX,0x2
JNZ 0x00149e9f
MOV RDI,qword ptr [R14 + 0x8]
MOV RSI,qword ptr [R15 + 0x10]
CALL 0x0014aa9e
MOV qword ptr [RBX + 0x10],RAX
JMP 0x00149db5
LAB_00149d6e:
LEA R12,[R14 + 0x8]
MOV RAX,qword ptr [R14 + 0x8]
MOV RDI,qword ptr [RAX]
MOV R15D,0x28
TEST RDI,RDI
JZ 0x00149d90
MOV RSI,qword ptr [RAX + 0x10]
SUB RSI,RDI
LAB_00149d8b:
CALL 0x001186a0
LAB_00149d90:
MOV RDI,qword ptr [R12]
MOV RSI,R15
CALL 0x001186a0
MOV qword ptr [R12],0x0
LAB_00149da4:
MOV byte ptr [R14],0x0
MOV RDI,R14
MOV ESI,0x1
CALL 0x0013dcd2
LAB_00149db5:
MOV RAX,RBX
ADD RSP,0x30
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00149dc5:
MOV RDI,qword ptr [R14 + 0x8]
MOV RSI,qword ptr [R15 + 0x8]
LEA RDX,[RSI + 0x30]
CALL 0x0014a5da
MOV qword ptr [RBX + 0x8],RAX
JMP 0x00149db5
LAB_00149ddc:
MOV EDI,0x20
CALL 0x00118350
MOV RBX,RAX
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x10],R15
LAB_00149df2:
LEA RSI,[0x1adcfb]
LEA RDX,[0x1add1e]
LEA RDI,[RSP + 0x8]
CALL 0x0011ca8a
MOV BPL,0x1
LAB_00149e0d:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0xca
MOV RCX,R14
CALL 0x0014a11a
XOR EBP,EBP
LEA RSI,[0x1dd3f0]
LEA RDX,[0x14ca04]
MOV RDI,RBX
CALL 0x00118b30
LAB_00149e3f:
MOV EDI,0x20
CALL 0x00118350
MOV RBX,RAX
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x10],R15
LAB_00149e55:
LEA RSI,[0x1add1f]
LEA RDX,[0x1add34]
LEA RDI,[RSP + 0x8]
CALL 0x0011ca8a
MOV BPL,0x1
LAB_00149e70:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0xcd
MOV RCX,R14
CALL 0x0014a11a
XOR EBP,EBP
LEA RSI,[0x1dd3f0]
LEA RDX,[0x14ca04]
MOV RDI,RBX
CALL 0x00118b30
LAB_00149e9f:
MOV EDI,0x20
CALL 0x00118350
MOV RBX,RAX
MOV RDI,R14
CALL 0x0013e39c
LEA RDX,[RSP + 0x28]
MOV qword ptr [RDX],RAX
LAB_00149ebc:
LEA RSI,[0x1add35]
LEA RDI,[RSP + 0x8]
CALL 0x0014a551
MOV BPL,0x1
LAB_00149ed0:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0x133
MOV RCX,R14
CALL 0x0014a382
XOR EBP,EBP
LEA RSI,[0x1dd2c8]
LEA RDX,[0x14ca04]
MOV RDI,RBX
CALL 0x00118b30
|
long _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_
(long param_1,
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_2,long *param_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>
bVar1;
long *plVar2;
int8 uVar3;
ulong uVar4;
long *plVar5;
ulong uVar6;
int1 *local_50 [2];
int1 local_40 [16];
char *local_30;
if ((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_3 != param_2) {
uVar3 = __cxa_allocate_exception(0x20);
local_50[0] = local_40;
/* try { // try from 00149df2 to 00149e09 has its CatchHandler @ 00149f32 */
std::__cxx11::string::_M_construct<char_const*>
(local_50,"iterator does not fit current value","");
/* try { // try from 00149e0d to 00149e39 has its CatchHandler @ 00149f16 */
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar3,0xca,local_50,param_2);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar3,&nlohmann::json_abi_v3_11_3::detail::invalid_iterator::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::end();
bVar1 = *param_2;
if (5 < (byte)bVar1 - 3) {
if (bVar1 == (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>
)0x1) {
uVar3 = nlohmann::json_abi_v3_11_3::
ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::erase(*(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
**)(param_2 + 8),param_3[1],param_3[1] + 0x30);
*(int8 *)(param_1 + 8) = uVar3;
return param_1;
}
if (bVar1 == (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>
)0x2) {
uVar3 = std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::_M_erase(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(param_2 + 8),param_3[2]);
*(int8 *)(param_1 + 0x10) = uVar3;
return param_1;
}
uVar3 = __cxa_allocate_exception(0x20);
local_30 = (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_2);
/* try { // try from 00149ebc to 00149ecc has its CatchHandler @ 00149f10 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[25],char_const*>
((detail *)local_50,"cannot use erase() with ",&local_30);
/* try { // try from 00149ed0 to 00149efc has its CatchHandler @ 00149efd */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar3,0x133,local_50,param_2);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar3,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
if (param_3[3] != 0) {
uVar3 = __cxa_allocate_exception(0x20);
local_50[0] = local_40;
/* try { // try from 00149e55 to 00149e6c has its CatchHandler @ 00149f14 */
std::__cxx11::string::_M_construct<char_const*>(local_50,"iterator out of range","");
/* try { // try from 00149e70 to 00149e9c has its CatchHandler @ 00149f12 */
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar3,0xcd,local_50,param_2);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar3,&nlohmann::json_abi_v3_11_3::detail::invalid_iterator::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
if (bVar1 == (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>
)0x8) {
plVar5 = (long *)**(long **)(param_2 + 8);
uVar6 = 0x28;
if (plVar5 != (long *)0x0) {
uVar4 = (*(long **)(param_2 + 8))[2] - (long)plVar5;
LAB_00149d8b:
operator_delete(plVar5,uVar4);
}
}
else {
if (bVar1 != (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>
)0x3) goto LAB_00149da4;
plVar5 = (long *)**(long **)(param_2 + 8);
plVar2 = *(long **)(param_2 + 8) + 2;
uVar6 = 0x20;
if (plVar5 != plVar2) {
uVar4 = *plVar2 + 1;
goto LAB_00149d8b;
}
}
operator_delete(*(void **)(param_2 + 8),uVar6);
*(int8 *)(param_2 + 8) = 0;
LAB_00149da4:
*param_2 = (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>
)0x0;
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(SUB81(param_2,0));
return param_1;
}
| ||
43,234 | my_filename | eloqsql/mysys/my_div.c | char * my_filename(File fd)
{
DBUG_ENTER("my_filename");
if ((uint) fd >= (uint) my_file_limit || !my_file_info[fd].name)
DBUG_RETURN((char*) "UNKNOWN");
if (fd >= 0 && my_file_info[fd].type != UNOPEN)
{
DBUG_RETURN(my_file_info[fd].name);
}
else
DBUG_RETURN((char*) "UNOPENED"); /* Debug message */
} | O0 | c | my_filename:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %eax
leaq 0x1a00cf(%rip), %rcx # 0x1d65f0
cmpl (%rcx), %eax
jae 0x36540
leaq 0x1a00cc(%rip), %rax # 0x1d65f8
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
jne 0x3654f
jmp 0x36542
leaq 0x4ba80(%rip), %rax # 0x81fc9
movq %rax, -0x8(%rbp)
jmp 0x3659d
cmpl $0x0, -0xc(%rbp)
jl 0x36590
leaq 0x1a009c(%rip), %rax # 0x1d65f8
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x0, 0x8(%rax)
je 0x36590
jmp 0x36572
leaq 0x1a007f(%rip), %rax # 0x1d65f8
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x3659d
jmp 0x36592
leaq 0x4ba38(%rip), %rax # 0x81fd1
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| my_filename:
push rbp
mov rbp, rsp
mov [rbp+var_C], edi
mov eax, [rbp+var_C]
lea rcx, my_file_limit
cmp eax, [rcx]
jnb short loc_36540
lea rax, my_file_info
mov rax, [rax]
movsxd rcx, [rbp+var_C]
shl rcx, 4
add rax, rcx
cmp qword ptr [rax], 0
jnz short loc_3654F
loc_36540:
jmp short $+2
loc_36542:
lea rax, aUnknown_0; "UNKNOWN"
mov [rbp+var_8], rax
jmp short loc_3659D
loc_3654F:
cmp [rbp+var_C], 0
jl short loc_36590
lea rax, my_file_info
mov rax, [rax]
movsxd rcx, [rbp+var_C]
shl rcx, 4
add rax, rcx
cmp dword ptr [rax+8], 0
jz short loc_36590
jmp short $+2
loc_36572:
lea rax, my_file_info
mov rax, [rax]
movsxd rcx, [rbp+var_C]
shl rcx, 4
add rax, rcx
mov rax, [rax]
mov [rbp+var_8], rax
jmp short loc_3659D
loc_36590:
jmp short $+2
loc_36592:
lea rax, aUnopened; "UNOPENED"
mov [rbp+var_8], rax
loc_3659D:
mov rax, [rbp+var_8]
pop rbp
retn
| const char * my_filename(int a1)
{
if ( (unsigned int)a1 >= my_file_limit || !*((_QWORD *)my_file_info + 2 * a1) )
return "UNKNOWN";
if ( a1 >= 0 && *((_DWORD *)my_file_info + 4 * a1 + 2) )
return (const char *)*((_QWORD *)my_file_info + 2 * a1);
return "UNOPENED";
}
| my_filename:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0xc],EDI
MOV EAX,dword ptr [RBP + -0xc]
LEA RCX,[0x2d65f0]
CMP EAX,dword ptr [RCX]
JNC 0x00136540
LEA RAX,[0x2d65f8]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RBP + -0xc]
SHL RCX,0x4
ADD RAX,RCX
CMP qword ptr [RAX],0x0
JNZ 0x0013654f
LAB_00136540:
JMP 0x00136542
LAB_00136542:
LEA RAX,[0x181fc9]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0013659d
LAB_0013654f:
CMP dword ptr [RBP + -0xc],0x0
JL 0x00136590
LEA RAX,[0x2d65f8]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RBP + -0xc]
SHL RCX,0x4
ADD RAX,RCX
CMP dword ptr [RAX + 0x8],0x0
JZ 0x00136590
JMP 0x00136572
LAB_00136572:
LEA RAX,[0x2d65f8]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RBP + -0xc]
SHL RCX,0x4
ADD RAX,RCX
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0013659d
LAB_00136590:
JMP 0x00136592
LAB_00136592:
LEA RAX,[0x181fd1]
MOV qword ptr [RBP + -0x8],RAX
LAB_0013659d:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
char * my_filename(uint param_1)
{
char *local_10;
if ((param_1 < my_file_limit) && (*(long *)(my_file_info + (long)(int)param_1 * 0x10) != 0)) {
if (((int)param_1 < 0) || (*(int *)(my_file_info + (long)(int)param_1 * 0x10 + 8) == 0)) {
local_10 = "UNOPENED";
}
else {
local_10 = *(char **)(my_file_info + (long)(int)param_1 * 0x10);
}
}
else {
local_10 = "UNKNOWN";
}
return local_10;
}
| |
43,235 | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::get_ref_impl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&) | monkey531[P]llama/common/json.hpp | static ReferenceType get_ref_impl(ThisType& obj)
{
// delegate the call to get_ptr<>()
auto* ptr = obj.template get_ptr<typename std::add_pointer<ReferenceType>::type>();
if (JSON_HEDLEY_LIKELY(ptr != nullptr))
{
return *ptr;
}
JSON_THROW(type_error::create(303, detail::concat("incompatible ReferenceType for get_ref, actual type is ", obj.type_name()), &obj));
} | O2 | cpp | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::get_ref_impl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
cmpb $0x3, (%rdi)
jne 0x88f7a
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x88f7a
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x23470
movq %rax, %rbx
movq %r14, %rdi
callq 0x43488
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x2c958(%rip), %rsi # 0xb58f4
leaq 0x10(%rsp), %rdi
callq 0x8319f
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12f, %esi # imm = 0x12F
movq %r14, %rcx
callq 0x4333c
xorl %ebp, %ebp
leaq 0x72f81(%rip), %rsi # 0xfbf48
leaq -0x48fb6(%rip), %rdx # 0x40018
movq %rbx, %rdi
callq 0x23f30
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x241e8
testb %bpl, %bpl
jne 0x88fed
jmp 0x88ff5
movq %rax, %r14
movq %rbx, %rdi
callq 0x236b0
movq %r14, %rdi
callq 0x23fb0
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE12get_ref_implIRS9_SD_EET_RT0_:
push rbp; char
push r14; int
push rbx; int
sub rsp, 30h
mov r14, rdi
cmp byte ptr [rdi], 3
jnz short loc_88F7A
mov rax, [r14+8]
test rax, rax
jz short loc_88F7A
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_88F7A:
push 20h ; ' '
pop rdi; thrown_size
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, aIncompatibleRe; "incompatible ReferenceType for get_ref,"...
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA56_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[56],char const*>(char const(&)[56],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Fh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
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 rdi, [rsp+48h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_88FED
jmp short loc_88FF5
mov r14, rax
loc_88FED:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_88FF5:
mov rdi, r14
call __Unwind_Resume
| long long 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>::get_ref_impl<std::string&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
long long a1)
{
long long result; // rax
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx
const char *v3; // [rsp+8h] [rbp-40h] BYREF
_BYTE v4[56]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 3 || (result = *(_QWORD *)(a1 + 8)) == 0 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
v3 = 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((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[56],char const*>(
(long long)v4,
(long long)"incompatible ReferenceType for get_ref, actual type is ",
&v3);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
303,
(long long)v4);
__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);
}
return result;
}
| get_ref_impl<std::__cxx11::string&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
CMP byte ptr [RDI],0x3
JNZ 0x00188f7a
MOV RAX,qword ptr [R14 + 0x8]
TEST RAX,RAX
JZ 0x00188f7a
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_00188f7a:
PUSH 0x20
POP RDI
CALL 0x00123470
MOV RBX,RAX
MOV RDI,R14
CALL 0x00143488
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_00188f95:
LEA RSI,[0x1b58f4]
LEA RDI,[RSP + 0x10]
CALL 0x0018319f
MOV BPL,0x1
LAB_00188fa9:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12f
MOV RCX,R14
CALL 0x0014333c
XOR EBP,EBP
LEA RSI,[0x1fbf48]
LEA RDX,[0x140018]
MOV RDI,RBX
CALL 0x00123f30
|
/* std::__cxx11::string&
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::get_ref_impl<std::__cxx11::string&,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >(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>&) */
string * nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::
get_ref_impl<std::__cxx11::string&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(basic_json *param_1)
{
int8 uVar1;
char *local_40;
detail local_38 [32];
if ((*param_1 == '\x03') && (*(string **)(param_1 + 8) != (string *)0x0)) {
return *(string **)(param_1 + 8);
}
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name((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);
/* try { // try from 00188f95 to 00188fa5 has its CatchHandler @ 00188fea */
detail::concat<std::__cxx11::string,char_const(&)[56],char_const*>
(local_38,"incompatible ReferenceType for get_ref, actual type is ",&local_40);
/* try { // try from 00188fa9 to 00188fd5 has its CatchHandler @ 00188fd6 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar1,0x12f,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception);
}
| |
43,236 | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::get_impl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 0>(nlohmann::json_abi_v3_11_3::detail::priority_tag<0u>) const | monkey531[P]llama/common/json.hpp | const noexcept(noexcept(
JSONSerializer<ValueType>::from_json(std::declval<const basic_json_t&>(), std::declval<ValueType&>())))
{
auto ret = ValueType();
JSONSerializer<ValueType>::from_json(*this, ret);
return ret;
} | O1 | cpp | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::get_impl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 0>(nlohmann::json_abi_v3_11_3::detail::priority_tag<0u>) const:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %rsi, %rdi
movq %rbx, %rsi
callq 0x4c72d
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x4c725
movq (%r15), %rsi
incq %rsi
callq 0x196b0
movq %r14, %rdi
callq 0x19be0
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE:
push r15
push r14
push rbx
mov rbx, rdi
lea r15, [rdi+10h]
mov [rdi], r15
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rdi, rsi
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_8string_tE; 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::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> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::string_t &)
mov rax, rbx
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, r15
jz short loc_4C725
mov rsi, [r15]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4C725:
mov rdi, r14
call __Unwind_Resume
| long long ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE(
long long a1,
long long a2)
{
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
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::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
a2,
a1);
return a1;
}
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
LEA R15,[RDI + 0x10]
MOV qword ptr [RDI],R15
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
LAB_0014c6fb:
MOV RDI,RSI
MOV RSI,RBX
CALL 0x0014c72d
LAB_0014c706:
MOV RAX,RBX
POP RBX
POP R14
POP R15
RET
|
string_t *
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
(string_t *param_1,basic_json *param_2)
{
*(string_t **)param_1 = param_1 + 0x10;
*(int8 *)(param_1 + 8) = 0;
param_1[0x10] = (string_t)0x0;
/* try { // try from 0014c6fb to 0014c705 has its CatchHandler @ 0014c70f */
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::string,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_2,param_1);
return param_1;
}
| |
43,237 | my_8bit_charset_flags_from_data | eloqsql/strings/ctype-simple.c | uint my_8bit_charset_flags_from_data(CHARSET_INFO *cs)
{
uint flags= 0;
if (my_charset_is_8bit_pure_ascii(cs))
flags|= MY_CS_PUREASCII;
if (!my_charset_is_ascii_compatible(cs))
flags|= MY_CS_NONASCII;
return flags;
} | O3 | c | my_8bit_charset_flags_from_data:
movq 0x68(%rdi), %rcx
testq %rcx, %rcx
je 0x420dc
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
xorl %edx, %edx
cmpw $0x80, (%rcx,%rdx,2)
jae 0x420c3
incq %rdx
cmpq $0x100, %rdx # imm = 0x100
jne 0x420aa
movl $0x1000, %eax # imm = 0x1000
xorl %edx, %edx
movzwl (%rcx,%rdx,2), %esi
cmpq %rsi, %rdx
jne 0x420df
incq %rdx
cmpq $0x80, %rdx
jne 0x420c5
jmp 0x420e4
xorl %eax, %eax
retq
orl $0x2000, %eax # imm = 0x2000
popq %rbp
retq
| my_8bit_charset_flags_from_data:
mov rcx, [rdi+68h]
test rcx, rcx
jz short loc_420DC
push rbp
mov rbp, rsp
xor eax, eax
xor edx, edx
loc_420AA:
cmp word ptr [rcx+rdx*2], 80h
jnb short loc_420C3
inc rdx
cmp rdx, 100h
jnz short loc_420AA
mov eax, 1000h
loc_420C3:
xor edx, edx
loc_420C5:
movzx esi, word ptr [rcx+rdx*2]
cmp rdx, rsi
jnz short loc_420DF
inc rdx
cmp rdx, 80h
jnz short loc_420C5
jmp short loc_420E4
loc_420DC:
xor eax, eax
retn
loc_420DF:
or eax, 2000h
loc_420E4:
pop rbp
retn
| long long my_8bit_charset_flags_from_data(long long a1)
{
long long v1; // rcx
long long result; // rax
long long v3; // rdx
long long v4; // rdx
v1 = *(_QWORD *)(a1 + 104);
if ( !v1 )
return 0LL;
result = 0LL;
v3 = 0LL;
while ( *(_WORD *)(v1 + 2 * v3) < 0x80u )
{
if ( ++v3 == 256 )
{
result = 4096LL;
break;
}
}
v4 = 0LL;
while ( v4 == *(unsigned __int16 *)(v1 + 2 * v4) )
{
if ( ++v4 == 128 )
return result;
}
return (unsigned int)result | 0x2000;
}
| my_8bit_charset_flags_from_data:
MOV RCX,qword ptr [RDI + 0x68]
TEST RCX,RCX
JZ 0x001420dc
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
XOR EDX,EDX
LAB_001420aa:
CMP word ptr [RCX + RDX*0x2],0x80
JNC 0x001420c3
INC RDX
CMP RDX,0x100
JNZ 0x001420aa
MOV EAX,0x1000
LAB_001420c3:
XOR EDX,EDX
LAB_001420c5:
MOVZX ESI,word ptr [RCX + RDX*0x2]
CMP RDX,RSI
JNZ 0x001420df
INC RDX
CMP RDX,0x80
JNZ 0x001420c5
JMP 0x001420e4
LAB_001420dc:
XOR EAX,EAX
RET
LAB_001420df:
OR EAX,0x2000
LAB_001420e4:
POP RBP
RET
|
uint my_8bit_charset_flags_from_data(long param_1)
{
long lVar1;
uint uVar2;
long lVar3;
ulong uVar4;
lVar1 = *(long *)(param_1 + 0x68);
if (lVar1 == 0) {
return 0;
}
uVar2 = 0;
lVar3 = 0;
do {
if (0x7f < *(ushort *)(lVar1 + lVar3 * 2)) goto LAB_001420c3;
lVar3 = lVar3 + 1;
} while (lVar3 != 0x100);
uVar2 = 0x1000;
LAB_001420c3:
uVar4 = 0;
do {
if (uVar4 != *(ushort *)(lVar1 + uVar4 * 2)) {
return uVar2 | 0x2000;
}
uVar4 = uVar4 + 1;
} while (uVar4 != 0x80);
return uVar2;
}
| |
43,238 | inline_mysql_file_read | eloqsql/include/mysql/psi/mysql_file.h | static inline size_t
inline_mysql_file_read(
#ifdef HAVE_PSI_FILE_INTERFACE
const char *src_file, uint src_line,
#endif
File file, uchar *buffer, size_t count, myf flags)
{
size_t result;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
size_t bytes_read;
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_READ);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line);
result= my_read(file, buffer, count, flags);
if (flags & (MY_NABP | MY_FNABP))
bytes_read= (result == 0) ? count : 0;
else
bytes_read= (result != MY_FILE_ERROR) ? result : 0;
PSI_FILE_CALL(end_file_wait)(locker, bytes_read);
return result;
}
#endif
result= my_read(file, buffer, count, flags);
return result;
} | O0 | c | inline_mysql_file_read:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
leaq 0x1a2bf8(%rip), %rax # 0x1cc810
movq (%rax), %rax
movq 0x158(%rax), %rax
movl -0x18(%rbp), %esi
leaq -0x88(%rbp), %rdi
movl $0x6, %edx
callq *%rax
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 0x29d27
leaq 0x1a2bae(%rip), %rax # 0x1cc810
movq (%rax), %rax
movq 0x210(%rax), %rax
movq -0x40(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %ecx
callq *%rax
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
callq 0x2e250
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
andq $0x6, %rax
cmpq $0x0, %rax
je 0x29cd2
cmpq $0x0, -0x38(%rbp)
jne 0x29cb7
movq -0x28(%rbp), %rax
movq %rax, -0x98(%rbp)
jmp 0x29cc2
xorl %eax, %eax
movq %rax, -0x98(%rbp)
jmp 0x29cc2
movq -0x98(%rbp), %rax
movq %rax, -0x90(%rbp)
jmp 0x29cff
cmpq $-0x1, -0x38(%rbp)
je 0x29ce6
movq -0x38(%rbp), %rax
movq %rax, -0xa0(%rbp)
jmp 0x29cf1
xorl %eax, %eax
movq %rax, -0xa0(%rbp)
jmp 0x29cf1
movq -0xa0(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq 0x1a2b0a(%rip), %rax # 0x1cc810
movq (%rax), %rax
movq 0x218(%rax), %rax
movq -0x40(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq *%rax
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x29d47
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
callq 0x2e250
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| inline_mysql_file_read:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+158h]
mov esi, [rbp+var_18]
lea rdi, [rbp+var_88]
mov edx, 6
call rax
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_29D27
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+210h]
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_10]
mov ecx, [rbp+var_14]
call rax
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
call my_read
mov [rbp+var_38], rax
mov rax, [rbp+var_30]
and rax, 6
cmp rax, 0
jz short loc_29CD2
cmp [rbp+var_38], 0
jnz short loc_29CB7
mov rax, [rbp+var_28]
mov [rbp+var_98], rax
jmp short loc_29CC2
loc_29CB7:
xor eax, eax
mov [rbp+var_98], rax
jmp short $+2
loc_29CC2:
mov rax, [rbp+var_98]
mov [rbp+var_90], rax
jmp short loc_29CFF
loc_29CD2:
cmp [rbp+var_38], 0FFFFFFFFFFFFFFFFh
jz short loc_29CE6
mov rax, [rbp+var_38]
mov [rbp+var_A0], rax
jmp short loc_29CF1
loc_29CE6:
xor eax, eax
mov [rbp+var_A0], rax
jmp short $+2
loc_29CF1:
mov rax, [rbp+var_A0]
mov [rbp+var_90], rax
loc_29CFF:
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+218h]
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_90]
call rax
mov rax, [rbp+var_38]
mov [rbp+var_8], rax
jmp short loc_29D47
loc_29D27:
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
call my_read
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov [rbp+var_8], rax
loc_29D47:
mov rax, [rbp+var_8]
add rsp, 0A0h
pop rbp
retn
| long long inline_mysql_file_read(
long long a1,
unsigned int a2,
unsigned int a3,
long long a4,
long long a5,
long long a6)
{
long long v7; // [rsp+0h] [rbp-A0h]
long long v8; // [rsp+8h] [rbp-98h]
_BYTE v9[72]; // [rsp+18h] [rbp-88h] BYREF
long long v10; // [rsp+60h] [rbp-40h]
long long v11; // [rsp+68h] [rbp-38h]
long long v12; // [rsp+70h] [rbp-30h]
long long v13; // [rsp+78h] [rbp-28h]
long long v14; // [rsp+80h] [rbp-20h]
unsigned int v15; // [rsp+88h] [rbp-18h]
unsigned int v16; // [rsp+8Ch] [rbp-14h]
long long v17; // [rsp+90h] [rbp-10h]
v17 = a1;
v16 = a2;
v15 = a3;
v14 = a4;
v13 = a5;
v12 = a6;
v10 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server[0] + 43))(v9, a3, 6LL);
if ( v10 )
{
(*((void ( **)(long long, long long, long long, _QWORD))PSI_server[0] + 66))(v10, v13, v17, v16);
v11 = my_read(v15, v14, v13, v12);
if ( (v12 & 6) != 0 )
{
if ( v11 )
v8 = 0LL;
else
v8 = v13;
(*((void ( **)(long long, long long))PSI_server[0] + 67))(v10, v8);
}
else
{
if ( v11 == -1 )
v7 = 0LL;
else
v7 = v11;
(*((void ( **)(long long, long long))PSI_server[0] + 67))(v10, v7);
}
return v11;
}
else
{
return my_read(v15, v14, v13, v12);
}
}
| inline_mysql_file_read:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
LEA RAX,[0x2cc810]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x158]
MOV ESI,dword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x88]
MOV EDX,0x6
CALL RAX
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 0x00129d27
LEA RAX,[0x2cc810]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x210]
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x14]
CALL RAX
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x0012e250
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x30]
AND RAX,0x6
CMP RAX,0x0
JZ 0x00129cd2
CMP qword ptr [RBP + -0x38],0x0
JNZ 0x00129cb7
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x98],RAX
JMP 0x00129cc2
LAB_00129cb7:
XOR EAX,EAX
MOV qword ptr [RBP + -0x98],RAX
JMP 0x00129cc2
LAB_00129cc2:
MOV RAX,qword ptr [RBP + -0x98]
MOV qword ptr [RBP + -0x90],RAX
JMP 0x00129cff
LAB_00129cd2:
CMP qword ptr [RBP + -0x38],-0x1
JZ 0x00129ce6
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0xa0],RAX
JMP 0x00129cf1
LAB_00129ce6:
XOR EAX,EAX
MOV qword ptr [RBP + -0xa0],RAX
JMP 0x00129cf1
LAB_00129cf1:
MOV RAX,qword ptr [RBP + -0xa0]
MOV qword ptr [RBP + -0x90],RAX
LAB_00129cff:
LEA RAX,[0x2cc810]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x218]
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x90]
CALL RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00129d47
LAB_00129d27:
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x0012e250
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
LAB_00129d47:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0xa0
POP RBP
RET
|
long inline_mysql_file_read
(int8 param_1,int4 param_2,int4 param_3,int8 param_4,
long param_5,ulong param_6)
{
long local_a8;
long local_a0;
long local_98;
int1 local_90 [72];
long local_48;
long local_40;
ulong local_38;
long local_30;
int8 local_28;
int4 local_20;
int4 local_1c;
int8 local_18;
long local_10;
local_38 = param_6;
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_1c = param_2;
local_18 = param_1;
local_48 = (**(code **)(PSI_server + 0x158))(local_90,param_3,6);
if (local_48 == 0) {
local_10 = my_read(local_20,local_28,local_30,local_38);
}
else {
(**(code **)(PSI_server + 0x210))(local_48,local_30,local_18,local_1c);
local_40 = my_read(local_20,local_28,local_30,local_38);
if ((local_38 & 6) == 0) {
local_a8 = local_40;
if (local_40 == -1) {
local_a8 = 0;
}
local_98 = local_a8;
}
else {
if (local_40 == 0) {
local_a0 = local_30;
}
else {
local_a0 = 0;
}
local_98 = local_a0;
}
(**(code **)(PSI_server + 0x218))(local_48,local_98);
local_10 = local_40;
}
return local_10;
}
| |
43,239 | testing::internal::JsonUnitTestResultPrinter::OnTestIterationEnd(testing::UnitTest const&, int) | giladroyz[P]FindPeaks/build_O0/_deps/googletest-src/googletest/src/gtest.cc | void JsonUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test,
int /*iteration*/) {
FILE* jsonout = OpenFileForWriting(output_file_);
std::stringstream stream;
PrintJsonUnitTest(&stream, unit_test);
fprintf(jsonout, "%s", StringStreamToString(&stream).c_str());
fclose(jsonout);
} | O0 | cpp | testing::internal::JsonUnitTestResultPrinter::OnTestIterationEnd(testing::UnitTest const&, int):
pushq %rbp
movq %rsp, %rbp
subq $0x1f0, %rsp # imm = 0x1F0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
callq 0x2fe10
movq %rax, -0x20(%rbp)
leaq -0x1a8(%rbp), %rdi
callq 0xa420
xorl %eax, %eax
leaq -0x1a8(%rbp), %rcx
cmpq $0x0, %rcx
movq %rax, -0x1e0(%rbp)
je 0x35beb
leaq -0x1a8(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x1e0(%rbp)
movq -0x1e0(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x35ca0
jmp 0x35bfd
movq -0x20(%rbp), %rax
movq %rax, -0x1e8(%rbp)
leaq -0x1d8(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
callq 0x262a0
jmp 0x35c1d
leaq -0x1d8(%rbp), %rdi
movq %rdi, -0x1f0(%rbp)
callq 0xa260
movq -0x1e8(%rbp), %rdi
movq %rax, %rdx
leaq 0x464d5(%rip), %rsi # 0x7c116
xorl %eax, %eax
callq 0xaa20
movq -0x1f0(%rbp), %rdi
callq 0xad98
movq -0x20(%rbp), %rdi
callq 0xa610
jmp 0x35c5f
leaq -0x1a8(%rbp), %rdi
callq 0xa490
addq $0x1f0, %rsp # imm = 0x1F0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1b0(%rbp)
movl %eax, -0x1b4(%rbp)
leaq -0x1a8(%rbp), %rdi
callq 0xa490
movq -0x1b0(%rbp), %rdi
callq 0xac00
nop
| _ZN7testing8internal25JsonUnitTestResultPrinter18OnTestIterationEndERKNS_8UnitTestEi:
push rbp
mov rbp, rsp
sub rsp, 1F0h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov rdi, [rbp+var_8]
add rdi, 8
call _ZN7testing8internalL18OpenFileForWritingERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::OpenFileForWriting(std::string const&)
mov [rbp+var_20], rax
lea rdi, [rbp+var_1A8]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
xor eax, eax
lea rcx, [rbp+var_1A8]
cmp rcx, 0
mov [rbp+var_1E0], rax
jz short loc_35BEB
lea rax, [rbp+var_1A8]
add rax, 10h
mov [rbp+var_1E0], rax
loc_35BEB:
mov rdi, [rbp+var_1E0]; this
mov rsi, [rbp+var_10]; std::ostream *
call _ZN7testing8internal25JsonUnitTestResultPrinter17PrintJsonUnitTestEPSoRKNS_8UnitTestE; testing::internal::JsonUnitTestResultPrinter::PrintJsonUnitTest(std::ostream *,testing::UnitTest const&)
jmp short $+2
loc_35BFD:
mov rax, [rbp+var_20]
mov [rbp+var_1E8], rax
lea rdi, [rbp+var_1D8]
lea rsi, [rbp+var_1A8]
call _ZN7testing8internal20StringStreamToStringEPNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE; testing::internal::StringStreamToString(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> *)
jmp short $+2
loc_35C1D:
lea rdi, [rbp+var_1D8]
mov [rbp+var_1F0], rdi
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdi, [rbp+var_1E8]
mov rdx, rax
lea rsi, aS_2+2; "%s"
xor eax, eax
call _fprintf
mov rdi, [rbp+var_1F0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rbp+var_20]
call _fclose
jmp short $+2
loc_35C5F:
lea rdi, [rbp+var_1A8]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
add rsp, 1F0h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_1B0], rcx
mov [rbp+var_1B4], eax
lea rdi, [rbp+var_1A8]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
mov rdi, [rbp+var_1B0]
call __Unwind_Resume
| long long testing::internal::JsonUnitTestResultPrinter::OnTestIterationEnd(
testing::internal::JsonUnitTestResultPrinter *this,
const testing::UnitTest *a2,
int a3)
{
const testing::UnitTest *v3; // rdx
const char *v4; // rax
long long v6; // [rsp+8h] [rbp-1E8h]
testing::internal::JsonUnitTestResultPrinter *v7; // [rsp+10h] [rbp-1E0h]
_BYTE v8[36]; // [rsp+18h] [rbp-1D8h] BYREF
_BYTE v9[16]; // [rsp+48h] [rbp-1A8h] BYREF
long long v10; // [rsp+58h] [rbp-198h] BYREF
long long v11; // [rsp+1D0h] [rbp-20h]
int v12; // [rsp+1DCh] [rbp-14h]
std::ostream *v13; // [rsp+1E0h] [rbp-10h]
testing::internal::JsonUnitTestResultPrinter *v14; // [rsp+1E8h] [rbp-8h]
v14 = this;
v13 = a2;
v12 = a3;
v11 = testing::internal::OpenFileForWriting((long long)this + 8);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v9);
v7 = 0LL;
if ( v9 )
v7 = (testing::internal::JsonUnitTestResultPrinter *)&v10;
testing::internal::JsonUnitTestResultPrinter::PrintJsonUnitTest(v7, v13, v3);
v6 = v11;
testing::internal::StringStreamToString((long long)v8, (long long)v9);
v4 = (const char *)std::string::c_str(v8);
fprintf(v6, "%s", v4);
std::string::~string(v8);
fclose(v11);
return std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v9);
}
| OnTestIterationEnd:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x1f0
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x8
CALL 0x0012fe10
MOV qword ptr [RBP + -0x20],RAX
LEA RDI,[RBP + -0x1a8]
CALL 0x0010a420
XOR EAX,EAX
LEA RCX,[RBP + -0x1a8]
CMP RCX,0x0
MOV qword ptr [RBP + -0x1e0],RAX
JZ 0x00135beb
LEA RAX,[RBP + -0x1a8]
ADD RAX,0x10
MOV qword ptr [RBP + -0x1e0],RAX
LAB_00135beb:
MOV RDI,qword ptr [RBP + -0x1e0]
MOV RSI,qword ptr [RBP + -0x10]
LAB_00135bf6:
CALL 0x00135ca0
JMP 0x00135bfd
LAB_00135bfd:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x1e8],RAX
LEA RDI,[RBP + -0x1d8]
LEA RSI,[RBP + -0x1a8]
CALL 0x001262a0
JMP 0x00135c1d
LAB_00135c1d:
LEA RDI,[RBP + -0x1d8]
MOV qword ptr [RBP + -0x1f0],RDI
CALL 0x0010a260
MOV RDI,qword ptr [RBP + -0x1e8]
MOV RDX,RAX
LEA RSI,[0x17c116]
XOR EAX,EAX
CALL 0x0010aa20
MOV RDI,qword ptr [RBP + -0x1f0]
CALL 0x0010ad98
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x0010a610
LAB_00135c5d:
JMP 0x00135c5f
LAB_00135c5f:
LEA RDI,[RBP + -0x1a8]
CALL 0x0010a490
ADD RSP,0x1f0
POP RBP
RET
|
/* testing::internal::JsonUnitTestResultPrinter::OnTestIterationEnd(testing::UnitTest const&, int)
*/
void __thiscall
testing::internal::JsonUnitTestResultPrinter::OnTestIterationEnd
(JsonUnitTestResultPrinter *this,UnitTest *param_1,int param_2)
{
FILE *__stream;
int8 uVar1;
ostream *local_1e8;
internal local_1e0 [48];
stringstream local_1b0 [16];
ostream aoStack_1a0 [376];
FILE *local_28;
int local_1c;
UnitTest *local_18;
JsonUnitTestResultPrinter *local_10;
local_1c = param_2;
local_18 = param_1;
local_10 = this;
local_28 = (FILE *)OpenFileForWriting((string *)(this + 8));
std::__cxx11::stringstream::stringstream(local_1b0);
local_1e8 = (ostream *)0x0;
if (&stack0x00000000 != (int1 *)0x1b0) {
local_1e8 = aoStack_1a0;
}
/* try { // try from 00135bf6 to 00135c5c has its CatchHandler @ 00135c74 */
PrintJsonUnitTest(local_1e8,local_18);
__stream = local_28;
StringStreamToString(local_1e0,local_1b0);
uVar1 = std::__cxx11::string::c_str();
fprintf(__stream,"%s",uVar1);
std::__cxx11::string::~string((string *)local_1e0);
fclose(local_28);
std::__cxx11::stringstream::~stringstream(local_1b0);
return;
}
| |
43,240 | list_walk | eloqsql/mysys/list.c | int list_walk(LIST *list, list_walk_action action, uchar* argument)
{
int error=0;
while (list)
{
if ((error = (*action)(list->data,argument)))
return error;
list=list_rest(list);
}
return 0;
} | O3 | c | list_walk:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorl %ebx, %ebx
testq %rdi, %rdi
je 0x996e8
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq 0x10(%r12), %rdi
movq %r14, %rsi
callq *%r15
testl %eax, %eax
jne 0x996e6
movq 0x8(%r12), %r12
testq %r12, %r12
jne 0x996cb
jmp 0x996e8
movl %eax, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
| list_walk:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
xor ebx, ebx
test rdi, rdi
jz short loc_996E8
mov r14, rdx
mov r15, rsi
mov r12, rdi
loc_996CB:
mov rdi, [r12+10h]
mov rsi, r14
call r15
test eax, eax
jnz short loc_996E6
mov r12, [r12+8]
test r12, r12
jnz short loc_996CB
jmp short loc_996E8
loc_996E6:
mov ebx, eax
loc_996E8:
mov eax, ebx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long list_walk(long long a1, long long ( *a2)(_QWORD, long long), long long a3)
{
unsigned int v3; // ebx
long long v5; // r12
unsigned int v6; // eax
v3 = 0;
if ( a1 )
{
v5 = a1;
while ( 1 )
{
v6 = a2(*(_QWORD *)(v5 + 16), a3);
if ( v6 )
break;
v5 = *(_QWORD *)(v5 + 8);
if ( !v5 )
return v3;
}
return v6;
}
return v3;
}
| list_walk:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
XOR EBX,EBX
TEST RDI,RDI
JZ 0x001996e8
MOV R14,RDX
MOV R15,RSI
MOV R12,RDI
LAB_001996cb:
MOV RDI,qword ptr [R12 + 0x10]
MOV RSI,R14
CALL R15
TEST EAX,EAX
JNZ 0x001996e6
MOV R12,qword ptr [R12 + 0x8]
TEST R12,R12
JNZ 0x001996cb
JMP 0x001996e8
LAB_001996e6:
MOV EBX,EAX
LAB_001996e8:
MOV EAX,EBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int list_walk(long param_1,code *param_2,int8 param_3)
{
int iVar1;
if (param_1 != 0) {
do {
iVar1 = (*param_2)(*(int8 *)(param_1 + 0x10),param_3);
if (iVar1 != 0) {
return iVar1;
}
param_1 = *(long *)(param_1 + 8);
} while (param_1 != 0);
}
return 0;
}
| |
43,241 | create_changed_account | corpus-core[P]colibri-stateless/src/chains/eth/verifier/call_ctx.h | static changed_account_t* create_changed_account(evmone_context_t* ctx, const address_t address, bool* created) {
*created = false;
for (changed_account_t* acc = ctx->changed_accounts; acc != NULL; acc = acc->next) {
if (memcmp(acc->address, address, 20) == 0)
return acc;
}
changed_account_t* parent_acc = ctx->parent ? get_changed_account(ctx->parent, address) : NULL;
*created = parent_acc == NULL;
ssz_ob_t old_account = get_src_account(ctx, address, true);
changed_account_t* acc = safe_calloc(1, sizeof(changed_account_t));
memcpy(acc->address, address, 20);
acc->next = ctx->changed_accounts;
ctx->changed_accounts = acc;
if (parent_acc) {
memcpy(acc->balance, parent_acc->balance, 32);
acc->code = parent_acc->code;
changed_storage_t** storage_ptr = &acc->storage;
for (changed_storage_t* s = parent_acc->storage; s != NULL; s = s->next) {
*storage_ptr = safe_calloc(1, sizeof(changed_storage_t));
memcpy((*storage_ptr)->key, s->key, 32);
memcpy((*storage_ptr)->value, s->value, 32);
(*storage_ptr)->next = NULL;
storage_ptr = &(*storage_ptr)->next;
}
}
else if (old_account.def) {
ssz_ob_t code = ssz_get(&old_account, "code");
if (code.def && code.def->type == SSZ_TYPE_LIST && code.bytes.len > 0) acc->code = code.bytes;
eth_get_account_value(old_account, ETH_ACCOUNT_BALANCE, acc->balance);
}
return acc;
} | O0 | c | create_changed_account:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x2c1f5
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x14, %edx
callq 0x23100
cmpl $0x0, %eax
jne 0x2c1e5
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x2c42a
jmp 0x2c1e7
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x2c1ba
movq -0x10(%rbp), %rax
cmpq $0x0, 0x90(%rax)
je 0x2c21d
movq -0x10(%rbp), %rax
movq 0x90(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x2b090
movq %rax, -0x80(%rbp)
jmp 0x2c225
xorl %eax, %eax
movq %rax, -0x80(%rbp)
jmp 0x2c225
movq -0x80(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
sete %cl
movq -0x20(%rbp), %rax
andb $0x1, %cl
movb %cl, (%rax)
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x48(%rbp), %rdi
movl $0x1, %ecx
callq 0x2b120
movl $0x1, %edi
movl $0x60, %esi
callq 0x9c480
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movl 0x10(%rcx), %ecx
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x50(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x50(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
cmpq $0x0, -0x30(%rbp)
je 0x2c3ab
movq -0x50(%rbp), %rax
movq -0x30(%rbp), %rcx
movq 0x14(%rcx), %rdx
movq %rdx, 0x14(%rax)
movq 0x1c(%rcx), %rdx
movq %rdx, 0x1c(%rax)
movq 0x24(%rcx), %rdx
movq %rdx, 0x24(%rax)
movq 0x2c(%rcx), %rcx
movq %rcx, 0x2c(%rax)
movq -0x50(%rbp), %rax
movq -0x30(%rbp), %rcx
movq 0x38(%rcx), %rdx
movq %rdx, 0x38(%rax)
movq 0x40(%rcx), %rcx
movq %rcx, 0x40(%rax)
movq -0x50(%rbp), %rax
addq $0x50, %rax
movq %rax, -0x58(%rbp)
movq -0x30(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
je 0x2c3a9
movl $0x1, %edi
movl $0x48, %esi
callq 0x9c480
movq %rax, %rcx
movq -0x58(%rbp), %rax
movq %rcx, (%rax)
movq -0x58(%rbp), %rax
movq (%rax), %rax
movq -0x60(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movq 0x18(%rcx), %rcx
movq %rcx, 0x18(%rax)
movq -0x58(%rbp), %rax
movq (%rax), %rax
movq -0x60(%rbp), %rcx
movq 0x20(%rcx), %rdx
movq %rdx, 0x20(%rax)
movq 0x28(%rcx), %rdx
movq %rdx, 0x28(%rax)
movq 0x30(%rcx), %rdx
movq %rdx, 0x30(%rax)
movq 0x38(%rcx), %rcx
movq %rcx, 0x38(%rax)
movq -0x58(%rbp), %rax
movq (%rax), %rax
movq $0x0, 0x40(%rax)
movq -0x58(%rbp), %rax
movq (%rax), %rax
addq $0x40, %rax
movq %rax, -0x58(%rbp)
movq -0x60(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x60(%rbp)
jmp 0x2c302
jmp 0x2c422
cmpq $0x0, -0x38(%rbp)
je 0x2c420
leaq -0x78(%rbp), %rdi
leaq -0x48(%rbp), %rsi
leaq 0xb7a1d(%rip), %rdx # 0xe3dde
callq 0xa05c0
cmpq $0x0, -0x68(%rbp)
je 0x2c3f1
movq -0x68(%rbp), %rax
cmpl $0x4, 0x8(%rax)
jne 0x2c3f1
cmpl $0x0, -0x78(%rbp)
jbe 0x2c3f1
movq -0x50(%rbp), %rax
movq -0x78(%rbp), %rcx
movq %rcx, 0x38(%rax)
movq -0x70(%rbp), %rcx
movq %rcx, 0x40(%rax)
movq -0x50(%rbp), %rsi
addq $0x14, %rsi
leaq -0x48(%rbp), %rax
movl $0x2, %edi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x32160
jmp 0x2c422
movq -0x50(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| create_changed_account:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_20]
mov byte ptr [rax], 0
mov rax, [rbp+var_10]
mov rax, [rax+28h]
mov [rbp+var_28], rax
loc_2C1BA:
cmp [rbp+var_28], 0
jz short loc_2C1F5
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_18]
mov edx, 14h
call _memcmp
cmp eax, 0
jnz short loc_2C1E5
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
jmp loc_2C42A
loc_2C1E5:
jmp short $+2
loc_2C1E7:
mov rax, [rbp+var_28]
mov rax, [rax+48h]
mov [rbp+var_28], rax
jmp short loc_2C1BA
loc_2C1F5:
mov rax, [rbp+var_10]
cmp qword ptr [rax+90h], 0
jz short loc_2C21D
mov rax, [rbp+var_10]
mov rdi, [rax+90h]
mov rsi, [rbp+var_18]
call get_changed_account
mov [rbp+var_80], rax
jmp short loc_2C225
loc_2C21D:
xor eax, eax
mov [rbp+var_80], rax
jmp short $+2
loc_2C225:
mov rax, [rbp+var_80]
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
setz cl
mov rax, [rbp+var_20]
and cl, 1
mov [rax], cl
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
lea rdi, [rbp+var_48]
mov ecx, 1
call get_src_account
mov edi, 1
mov esi, 60h ; '`'
call safe_calloc
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
mov rcx, [rbp+var_18]
mov rdx, [rcx]
mov [rax], rdx
mov rdx, [rcx+8]
mov [rax+8], rdx
mov ecx, [rcx+10h]
mov [rax+10h], ecx
mov rax, [rbp+var_10]
mov rcx, [rax+28h]
mov rax, [rbp+var_50]
mov [rax+48h], rcx
mov rcx, [rbp+var_50]
mov rax, [rbp+var_10]
mov [rax+28h], rcx
cmp [rbp+var_30], 0
jz loc_2C3AB
mov rax, [rbp+var_50]
mov rcx, [rbp+var_30]
mov rdx, [rcx+14h]
mov [rax+14h], rdx
mov rdx, [rcx+1Ch]
mov [rax+1Ch], rdx
mov rdx, [rcx+24h]
mov [rax+24h], rdx
mov rcx, [rcx+2Ch]
mov [rax+2Ch], rcx
mov rax, [rbp+var_50]
mov rcx, [rbp+var_30]
mov rdx, [rcx+38h]
mov [rax+38h], rdx
mov rcx, [rcx+40h]
mov [rax+40h], rcx
mov rax, [rbp+var_50]
add rax, 50h ; 'P'
mov [rbp+var_58], rax
mov rax, [rbp+var_30]
mov rax, [rax+50h]
mov [rbp+var_60], rax
loc_2C302:
cmp [rbp+var_60], 0
jz loc_2C3A9
mov edi, 1
mov esi, 48h ; 'H'
call safe_calloc
mov rcx, rax
mov rax, [rbp+var_58]
mov [rax], rcx
mov rax, [rbp+var_58]
mov rax, [rax]
mov rcx, [rbp+var_60]
mov rdx, [rcx]
mov [rax], rdx
mov rdx, [rcx+8]
mov [rax+8], rdx
mov rdx, [rcx+10h]
mov [rax+10h], rdx
mov rcx, [rcx+18h]
mov [rax+18h], rcx
mov rax, [rbp+var_58]
mov rax, [rax]
mov rcx, [rbp+var_60]
mov rdx, [rcx+20h]
mov [rax+20h], rdx
mov rdx, [rcx+28h]
mov [rax+28h], rdx
mov rdx, [rcx+30h]
mov [rax+30h], rdx
mov rcx, [rcx+38h]
mov [rax+38h], rcx
mov rax, [rbp+var_58]
mov rax, [rax]
mov qword ptr [rax+40h], 0
mov rax, [rbp+var_58]
mov rax, [rax]
add rax, 40h ; '@'
mov [rbp+var_58], rax
mov rax, [rbp+var_60]
mov rax, [rax+40h]
mov [rbp+var_60], rax
jmp loc_2C302
loc_2C3A9:
jmp short loc_2C422
loc_2C3AB:
cmp [rbp+var_38], 0
jz short loc_2C420
lea rdi, [rbp+var_78]
lea rsi, [rbp+var_48]
lea rdx, aSubcontainerKi+36h; "code"
call ssz_get
cmp [rbp+var_68], 0
jz short loc_2C3F1
mov rax, [rbp+var_68]
cmp dword ptr [rax+8], 4
jnz short loc_2C3F1
cmp dword ptr [rbp+var_78], 0
jbe short loc_2C3F1
mov rax, [rbp+var_50]
mov rcx, [rbp+var_78]
mov [rax+38h], rcx
mov rcx, [rbp+var_70]
mov [rax+40h], rcx
loc_2C3F1:
mov rsi, [rbp+var_50]
add rsi, 14h
lea rax, [rbp+var_48]
mov edi, 2
mov rcx, [rax]
mov [rsp+0A0h+var_A0], rcx
mov rcx, [rax+8]
mov [rsp+0A0h+var_98], rcx
mov rax, [rax+10h]
mov [rsp+0A0h+var_90], rax
call eth_get_account_value
loc_2C420:
jmp short $+2
loc_2C422:
mov rax, [rbp+var_50]
mov [rbp+var_8], rax
loc_2C42A:
mov rax, [rbp+var_8]
add rsp, 0A0h
pop rbp
retn
| _QWORD * create_changed_account(_QWORD *a1, _QWORD *a2, bool *a3, long long a4, int a5, int a6)
{
long long v6; // rax
_QWORD *v7; // rcx
_QWORD *v8; // rax
_QWORD *v9; // rcx
_QWORD *v10; // rax
_QWORD *v11; // rcx
_QWORD *v12; // rax
_QWORD *v13; // rcx
_QWORD *v14; // rax
_QWORD *v15; // rcx
int v16; // edx
int v17; // r8d
int v18; // r9d
_QWORD *v19; // rax
long long changed_account; // [rsp+20h] [rbp-80h]
_QWORD v22[2]; // [rsp+28h] [rbp-78h] BYREF
long long v23; // [rsp+38h] [rbp-68h]
_QWORD *j; // [rsp+40h] [rbp-60h]
long long v25; // [rsp+48h] [rbp-58h]
_QWORD *v26; // [rsp+50h] [rbp-50h]
long long v27; // [rsp+58h] [rbp-48h] BYREF
long long v28; // [rsp+60h] [rbp-40h]
long long v29; // [rsp+68h] [rbp-38h]
_QWORD *v30; // [rsp+70h] [rbp-30h]
long long i; // [rsp+78h] [rbp-28h]
bool *v32; // [rsp+80h] [rbp-20h]
_QWORD *v33; // [rsp+88h] [rbp-18h]
_QWORD *v34; // [rsp+90h] [rbp-10h]
v34 = a1;
v33 = a2;
v32 = a3;
*a3 = 0;
for ( i = v34[5]; i; i = *(_QWORD *)(i + 72) )
{
if ( !(unsigned int)memcmp(i, v33, 20LL) )
return (_QWORD *)i;
}
if ( v34[18] )
changed_account = get_changed_account(v34[18], (long long)v33);
else
changed_account = 0LL;
v30 = (_QWORD *)changed_account;
*v32 = changed_account == 0;
get_src_account((long long)&v27, v34, (long long)v33, 1, a5, a6);
v6 = safe_calloc(1LL, 96LL);
v26 = (_QWORD *)v6;
v7 = v33;
*(_QWORD *)v6 = *v33;
*(_QWORD *)(v6 + 8) = v7[1];
*(_DWORD *)(v6 + 16) = *((_DWORD *)v7 + 4);
v26[9] = v34[5];
v34[5] = v26;
if ( v30 )
{
v8 = v26;
v9 = v30;
*(_QWORD *)((char *)v26 + 20) = *(_QWORD *)((char *)v30 + 20);
*(_QWORD *)((char *)v8 + 28) = *(_QWORD *)((char *)v9 + 28);
*(_QWORD *)((char *)v8 + 36) = *(_QWORD *)((char *)v9 + 36);
*(_QWORD *)((char *)v8 + 44) = *(_QWORD *)((char *)v9 + 44);
v10 = v26;
v11 = v30;
v26[7] = v30[7];
v10[8] = v11[8];
v25 = (long long)(v26 + 10);
for ( j = (_QWORD *)v30[10]; j; j = (_QWORD *)j[8] )
{
*(_QWORD *)v25 = safe_calloc(1LL, 72LL);
v12 = *(_QWORD **)v25;
v13 = j;
*v12 = *j;
v12[1] = v13[1];
v12[2] = v13[2];
v12[3] = v13[3];
v14 = *(_QWORD **)v25;
v15 = j;
v14[4] = j[4];
v14[5] = v15[5];
v14[6] = v15[6];
v14[7] = v15[7];
*(_QWORD *)(*(_QWORD *)v25 + 64LL) = 0LL;
v25 = *(_QWORD *)v25 + 64LL;
}
}
else if ( v29 )
{
ssz_get(v22, &v27, "code");
if ( v23 && *(_DWORD *)(v23 + 8) == 4 && LODWORD(v22[0]) )
{
v19 = v26;
v26[7] = v22[0];
v19[8] = v22[1];
}
eth_get_account_value(2, (_DWORD)v26 + 20, v16, v28, v17, v18, v27, v28, v29);
}
return v26;
}
| create_changed_account:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x28],RAX
LAB_0012c1ba:
CMP qword ptr [RBP + -0x28],0x0
JZ 0x0012c1f5
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,0x14
CALL 0x00123100
CMP EAX,0x0
JNZ 0x0012c1e5
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0012c42a
LAB_0012c1e5:
JMP 0x0012c1e7
LAB_0012c1e7:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x48]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0012c1ba
LAB_0012c1f5:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x90],0x0
JZ 0x0012c21d
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x90]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0012b090
MOV qword ptr [RBP + -0x80],RAX
JMP 0x0012c225
LAB_0012c21d:
XOR EAX,EAX
MOV qword ptr [RBP + -0x80],RAX
JMP 0x0012c225
LAB_0012c225:
MOV RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x30],0x0
SETZ CL
MOV RAX,qword ptr [RBP + -0x20]
AND CL,0x1
MOV byte ptr [RAX],CL
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x48]
MOV ECX,0x1
CALL 0x0012b120
MOV EDI,0x1
MOV ESI,0x60
CALL 0x0019c480
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RDX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RDX
MOV ECX,dword ptr [RCX + 0x10]
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x28]
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RAX + 0x48],RCX
MOV RCX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x28],RCX
CMP qword ptr [RBP + -0x30],0x0
JZ 0x0012c3ab
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RCX + 0x14]
MOV qword ptr [RAX + 0x14],RDX
MOV RDX,qword ptr [RCX + 0x1c]
MOV qword ptr [RAX + 0x1c],RDX
MOV RDX,qword ptr [RCX + 0x24]
MOV qword ptr [RAX + 0x24],RDX
MOV RCX,qword ptr [RCX + 0x2c]
MOV qword ptr [RAX + 0x2c],RCX
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RCX + 0x38]
MOV qword ptr [RAX + 0x38],RDX
MOV RCX,qword ptr [RCX + 0x40]
MOV qword ptr [RAX + 0x40],RCX
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x50
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x50]
MOV qword ptr [RBP + -0x60],RAX
LAB_0012c302:
CMP qword ptr [RBP + -0x60],0x0
JZ 0x0012c3a9
MOV EDI,0x1
MOV ESI,0x48
CALL 0x0019c480
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x60]
MOV RDX,qword ptr [RCX]
MOV qword ptr [RAX],RDX
MOV RDX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX + 0x8],RDX
MOV RDX,qword ptr [RCX + 0x10]
MOV qword ptr [RAX + 0x10],RDX
MOV RCX,qword ptr [RCX + 0x18]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x60]
MOV RDX,qword ptr [RCX + 0x20]
MOV qword ptr [RAX + 0x20],RDX
MOV RDX,qword ptr [RCX + 0x28]
MOV qword ptr [RAX + 0x28],RDX
MOV RDX,qword ptr [RCX + 0x30]
MOV qword ptr [RAX + 0x30],RDX
MOV RCX,qword ptr [RCX + 0x38]
MOV qword ptr [RAX + 0x38],RCX
MOV RAX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX + 0x40],0x0
MOV RAX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RAX]
ADD RAX,0x40
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RAX + 0x40]
MOV qword ptr [RBP + -0x60],RAX
JMP 0x0012c302
LAB_0012c3a9:
JMP 0x0012c422
LAB_0012c3ab:
CMP qword ptr [RBP + -0x38],0x0
JZ 0x0012c420
LEA RDI,[RBP + -0x78]
LEA RSI,[RBP + -0x48]
LEA RDX,[0x1e3dde]
CALL 0x001a05c0
CMP qword ptr [RBP + -0x68],0x0
JZ 0x0012c3f1
MOV RAX,qword ptr [RBP + -0x68]
CMP dword ptr [RAX + 0x8],0x4
JNZ 0x0012c3f1
CMP dword ptr [RBP + -0x78],0x0
JBE 0x0012c3f1
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x78]
MOV qword ptr [RAX + 0x38],RCX
MOV RCX,qword ptr [RBP + -0x70]
MOV qword ptr [RAX + 0x40],RCX
LAB_0012c3f1:
MOV RSI,qword ptr [RBP + -0x50]
ADD RSI,0x14
LEA RAX,[RBP + -0x48]
MOV EDI,0x2
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00132160
LAB_0012c420:
JMP 0x0012c422
LAB_0012c422:
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x8],RAX
LAB_0012c42a:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0xa0
POP RBP
RET
|
int8 * create_changed_account(long param_1,int8 *param_2,int1 *param_3)
{
int8 *puVar1;
int iVar2;
long lVar3;
long local_88;
int local_80;
int4 uStack_7c;
int8 local_78;
long local_70;
int8 *local_68;
long *local_60;
int8 *local_58;
int1 local_50 [16];
long local_40;
long local_38;
int8 *local_30;
int1 *local_28;
int8 *local_20;
long local_18;
*param_3 = 0;
local_30 = *(int8 **)(param_1 + 0x28);
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
while( true ) {
if (local_30 == (int8 *)0x0) {
if (*(long *)(local_18 + 0x90) == 0) {
local_88 = 0;
}
else {
local_88 = get_changed_account(*(int8 *)(local_18 + 0x90),local_20);
}
local_38 = local_88;
*local_28 = local_88 == 0;
get_src_account(local_50,local_18,local_20,1);
local_58 = (int8 *)safe_calloc(1,0x60);
*local_58 = *local_20;
local_58[1] = local_20[1];
*(int4 *)(local_58 + 2) = *(int4 *)(local_20 + 2);
local_58[9] = *(int8 *)(local_18 + 0x28);
*(int8 **)(local_18 + 0x28) = local_58;
if (local_38 == 0) {
if (local_40 != 0) {
ssz_get(&local_80,local_50,"code");
if (((local_70 != 0) && (*(int *)(local_70 + 8) == 4)) && (local_80 != 0)) {
local_58[7] = CONCAT44(uStack_7c,local_80);
local_58[8] = local_78;
}
eth_get_account_value(2,(long)local_58 + 0x14);
}
}
else {
*(int8 *)((long)local_58 + 0x14) = *(int8 *)(local_38 + 0x14);
*(int8 *)((long)local_58 + 0x1c) = *(int8 *)(local_38 + 0x1c);
*(int8 *)((long)local_58 + 0x24) = *(int8 *)(local_38 + 0x24);
*(int8 *)((long)local_58 + 0x2c) = *(int8 *)(local_38 + 0x2c);
local_58[7] = *(int8 *)(local_38 + 0x38);
local_58[8] = *(int8 *)(local_38 + 0x40);
local_60 = local_58 + 10;
for (local_68 = *(int8 **)(local_38 + 0x50); local_68 != (int8 *)0x0;
local_68 = (int8 *)local_68[8]) {
lVar3 = safe_calloc(1,0x48);
*local_60 = lVar3;
puVar1 = (int8 *)*local_60;
*puVar1 = *local_68;
puVar1[1] = local_68[1];
puVar1[2] = local_68[2];
puVar1[3] = local_68[3];
lVar3 = *local_60;
*(int8 *)(lVar3 + 0x20) = local_68[4];
*(int8 *)(lVar3 + 0x28) = local_68[5];
*(int8 *)(lVar3 + 0x30) = local_68[6];
*(int8 *)(lVar3 + 0x38) = local_68[7];
*(int8 *)(*local_60 + 0x40) = 0;
local_60 = (long *)(*local_60 + 0x40);
}
}
return local_58;
}
iVar2 = memcmp(local_30,local_20,0x14);
if (iVar2 == 0) break;
local_30 = (int8 *)local_30[9];
}
return local_30;
}
| |
43,242 | translog_write_fixed_record | eloqsql/storage/maria/ma_loghandler.c | static my_bool translog_write_fixed_record(LSN *lsn,
enum translog_record_type type,
MARIA_HA *tbl_info,
SHORT_TRANSACTION_ID short_trid,
struct st_translog_parts *parts,
TRN *trn, void *hook_arg)
{
struct st_translog_buffer *buffer_to_flush= NULL;
uchar chunk1_header[1 + 2];
/* Max number of such LSNs per record is 2 */
uchar compressed_LSNs[MAX_NUMBER_OF_LSNS_PER_RECORD *
COMPRESSED_LSN_MAX_STORE_SIZE];
LEX_CUSTRING *part;
int rc= 1;
DBUG_ENTER("translog_write_fixed_record");
DBUG_ASSERT((log_record_type_descriptor[type].rclass ==
LOGRECTYPE_FIXEDLENGTH &&
parts->record_length ==
log_record_type_descriptor[type].fixed_length) ||
(log_record_type_descriptor[type].rclass ==
LOGRECTYPE_PSEUDOFIXEDLENGTH &&
parts->record_length ==
log_record_type_descriptor[type].fixed_length));
translog_lock();
DBUG_PRINT("info", ("horizon: " LSN_FMT,
LSN_IN_PARTS(log_descriptor.horizon)));
DBUG_ASSERT(log_descriptor.bc.current_page_fill <= TRANSLOG_PAGE_SIZE);
DBUG_PRINT("info",
("Page size: %u record: %u next cond: %d",
log_descriptor.bc.current_page_fill,
(parts->record_length +
log_record_type_descriptor[type].compressed_LSN * 2 + 3),
((((uint) log_descriptor.bc.current_page_fill) +
(parts->record_length +
log_record_type_descriptor[type].compressed_LSN * 2 + 3)) >
TRANSLOG_PAGE_SIZE)));
/*
check that there is enough place on current page.
NOTE: compressing may increase page LSN size on two bytes for every LSN
*/
if ((((uint) log_descriptor.bc.current_page_fill) +
(parts->record_length +
log_record_type_descriptor[type].compressed_LSN * 2 + 3)) >
TRANSLOG_PAGE_SIZE)
{
DBUG_PRINT("info", ("Next page"));
if (translog_page_next(&log_descriptor.horizon, &log_descriptor.bc,
&buffer_to_flush))
goto err; /* rc == 1 */
if (buffer_to_flush)
translog_buffer_lock_assert_owner(buffer_to_flush);
}
set_lsn(lsn, log_descriptor.horizon);
if (translog_set_lsn_for_files(LSN_FILE_NO(*lsn), LSN_FILE_NO(*lsn),
*lsn, TRUE) ||
(log_record_type_descriptor[type].inwrite_hook &&
(*log_record_type_descriptor[type].inwrite_hook)(type, trn, tbl_info,
lsn, hook_arg)))
goto err;
/* compress LSNs */
if (log_record_type_descriptor[type].rclass ==
LOGRECTYPE_PSEUDOFIXEDLENGTH)
{
DBUG_ASSERT(log_record_type_descriptor[type].compressed_LSN > 0);
translog_relative_LSN_encode(parts, *lsn,
log_record_type_descriptor[type].
compressed_LSN, compressed_LSNs);
}
/*
Write the whole record at once (we know that there is enough place on
the destination page)
*/
DBUG_ASSERT(parts->current != 0); /* first part is left for header */
part= parts->parts + (--parts->current);
parts->total_record_length+= (translog_size_t) (part->length= 1 + 2);
part->str= chunk1_header;
*chunk1_header= (uchar) (type | TRANSLOG_CHUNK_FIXED);
int2store(chunk1_header + 1, short_trid);
rc= translog_write_parts_on_page(&log_descriptor.horizon,
&log_descriptor.bc,
parts->total_record_length, parts);
log_descriptor.bc.buffer->last_lsn= *lsn;
DBUG_PRINT("info", ("last_lsn set to " LSN_FMT " buffer: %p",
LSN_IN_PARTS(log_descriptor.bc.buffer->last_lsn),
log_descriptor.bc.buffer));
err:
translog_unlock();
/*
check if we switched buffer and need process it (current buffer is
unlocked already => we will not delay other threads
*/
if (buffer_to_flush != NULL)
{
if (!rc)
rc= translog_buffer_flush(buffer_to_flush);
translog_buffer_unlock(buffer_to_flush);
}
DBUG_RETURN(rc);
} | O0 | c | translog_write_fixed_record:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movw %cx, %ax
movq 0x10(%rbp), %rcx
movq %fs:0x28, %rcx
movq %rcx, -0x8(%rbp)
movq %rdi, -0x28(%rbp)
movl %esi, -0x2c(%rbp)
movq %rdx, -0x38(%rbp)
movw %ax, -0x3a(%rbp)
movq %r8, -0x48(%rbp)
movq %r9, -0x50(%rbp)
movq $0x0, -0x58(%rbp)
movl $0x1, -0x6c(%rbp)
jmp 0x91d67
callq 0x8d500
jmp 0x91d6e
jmp 0x91d70
jmp 0x91d72
jmp 0x91d74
jmp 0x91d76
movzwl 0xbfa8e3(%rip), %eax # 0xc8c660
movq -0x48(%rbp), %rcx
movl (%rcx), %ecx
movl -0x2c(%rbp), %edx
movl %edx, %esi
leaq 0x3f8a51(%rip), %rdx # 0x48a7e0
imulq $0x48, %rsi, %rsi
addq %rsi, %rdx
movswl 0x20(%rdx), %edx
shll %edx
addl %edx, %ecx
addl $0x3, %ecx
addl %ecx, %eax
cmpl $0x2000, %eax # imm = 0x2000
jbe 0x91de3
jmp 0x91dac
jmp 0x91dae
leaq 0x3f9c2b(%rip), %rsi # 0x48b9e0
movq %rsi, %rdi
addq $0x800c48, %rdi # imm = 0x800C48
addq $0x800c50, %rsi # imm = 0x800C50
leaq -0x58(%rbp), %rdx
callq 0x96e70
cmpb $0x0, %al
je 0x91dd8
jmp 0x91f71
cmpq $0x0, -0x58(%rbp)
je 0x91de1
jmp 0x91de1
jmp 0x91de3
movq -0x28(%rbp), %rdi
movq 0xbfa83a(%rip), %rsi # 0xc8c628
callq 0x98800
movq -0x28(%rbp), %rax
movq (%rax), %rax
sarq $0x20, %rax
movl %eax, %edi
movq -0x28(%rbp), %rax
movq (%rax), %rax
sarq $0x20, %rax
movl %eax, %esi
movq -0x28(%rbp), %rax
movq (%rax), %rdx
movl $0x1, %ecx
callq 0x98830
movsbl %al, %eax
cmpl $0x0, %eax
jne 0x91e74
movl -0x2c(%rbp), %eax
movl %eax, %ecx
leaq 0x3f89ae(%rip), %rax # 0x48a7e0
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x10(%rax)
je 0x91e79
movl -0x2c(%rbp), %eax
movl %eax, %ecx
leaq 0x3f8994(%rip), %rax # 0x48a7e0
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movl -0x2c(%rbp), %edi
movq -0x50(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq 0x10(%rbp), %r8
callq *%rax
movsbl %al, %eax
cmpl $0x0, %eax
je 0x91e79
jmp 0x91f71
movl -0x2c(%rbp), %eax
movl %eax, %ecx
leaq 0x3f895b(%rip), %rax # 0x48a7e0
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
cmpl $0x2, (%rax)
jne 0x91ec0
jmp 0x91e93
jmp 0x91e95
movq -0x48(%rbp), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rsi
movl -0x2c(%rbp), %eax
movl %eax, %ecx
leaq 0x3f8934(%rip), %rax # 0x48a7e0
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movswl 0x20(%rax), %edx
leaq -0x20(%rbp), %rcx
callq 0x96f70
jmp 0x91ec2
jmp 0x91ec4
movq -0x48(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x48(%rbp), %rdx
movl 0x8(%rdx), %ecx
addl $-0x1, %ecx
movl %ecx, 0x8(%rdx)
movl %ecx, %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq $0x3, 0x8(%rax)
movq -0x48(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x3, %ecx
movl %ecx, 0x4(%rax)
leaq -0x5b(%rbp), %rcx
movq -0x68(%rbp), %rax
movq %rcx, (%rax)
movl -0x2c(%rbp), %eax
orl $0x40, %eax
movb %al, -0x5b(%rbp)
leaq -0x5b(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
movw -0x3a(%rbp), %cx
movq -0x78(%rbp), %rax
movw %cx, (%rax)
movq -0x48(%rbp), %rax
movl 0x4(%rax), %edx
movq -0x48(%rbp), %rcx
leaq 0x3f9aa4(%rip), %rsi # 0x48b9e0
movq %rsi, %rdi
addq $0x800c48, %rdi # imm = 0x800C48
addq $0x800c50, %rsi # imm = 0x800C50
callq 0x989d0
movsbl %al, %eax
movl %eax, -0x6c(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rcx
movq 0xbfa6f2(%rip), %rax # 0xc8c658
movq %rcx, 0x100000(%rax)
jmp 0x91f6f
jmp 0x91f71
callq 0x8d5f0
cmpq $0x0, -0x58(%rbp)
je 0x91f9b
cmpl $0x0, -0x6c(%rbp)
jne 0x91f92
movq -0x58(%rbp), %rdi
callq 0x937b0
movsbl %al, %eax
movl %eax, -0x6c(%rbp)
movq -0x58(%rbp), %rdi
callq 0x8d5c0
jmp 0x91f9d
movl -0x6c(%rbp), %eax
movb %al, -0x79(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x91fc1
movb -0x79(%rbp), %al
addq $0x80, %rsp
popq %rbp
retq
callq 0x2a260
nopw %cs:(%rax,%rax)
| translog_write_fixed_record:
push rbp
mov rbp, rsp
sub rsp, 80h
mov ax, cx
mov rcx, [rbp+arg_0]
mov rcx, fs:28h
mov [rbp+var_8], rcx
mov [rbp+var_28], rdi
mov [rbp+var_2C], esi
mov [rbp+var_38], rdx
mov [rbp+var_3A], ax
mov [rbp+var_48], r8
mov [rbp+var_50], r9
mov [rbp+var_58], 0
mov [rbp+var_6C], 1
jmp short $+2
loc_91D67:
call translog_lock
jmp short $+2
loc_91D6E:
jmp short $+2
loc_91D70:
jmp short $+2
loc_91D72:
jmp short $+2
loc_91D74:
jmp short $+2
loc_91D76:
movzx eax, cs:word_C8C660
mov rcx, [rbp+var_48]
mov ecx, [rcx]
mov edx, [rbp+var_2C]
mov esi, edx
lea rdx, log_record_type_descriptor
imul rsi, 48h ; 'H'
add rdx, rsi
movsx edx, word ptr [rdx+20h]
shl edx, 1
add ecx, edx
add ecx, 3
add eax, ecx
cmp eax, 2000h
jbe short loc_91DE3
jmp short $+2
loc_91DAC:
jmp short $+2
loc_91DAE:
lea rsi, log_descriptor
mov rdi, rsi
add rdi, 800C48h
add rsi, 800C50h
lea rdx, [rbp+var_58]
call translog_page_next
cmp al, 0
jz short loc_91DD8
jmp loc_91F71
loc_91DD8:
cmp [rbp+var_58], 0
jz short loc_91DE1
jmp short $+2
loc_91DE1:
jmp short $+2
loc_91DE3:
mov rdi, [rbp+var_28]
mov rsi, cs:qword_C8C628
call set_lsn
mov rax, [rbp+var_28]
mov rax, [rax]
sar rax, 20h
mov edi, eax
mov rax, [rbp+var_28]
mov rax, [rax]
sar rax, 20h
mov esi, eax
mov rax, [rbp+var_28]
mov rdx, [rax]
mov ecx, 1
call translog_set_lsn_for_files
movsx eax, al
cmp eax, 0
jnz short loc_91E74
mov eax, [rbp+var_2C]
mov ecx, eax
lea rax, log_record_type_descriptor
imul rcx, 48h ; 'H'
add rax, rcx
cmp qword ptr [rax+10h], 0
jz short loc_91E79
mov eax, [rbp+var_2C]
mov ecx, eax
lea rax, log_record_type_descriptor
imul rcx, 48h ; 'H'
add rax, rcx
mov rax, [rax+10h]
mov edi, [rbp+var_2C]
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_38]
mov rcx, [rbp+var_28]
mov r8, [rbp+arg_0]
call rax
movsx eax, al
cmp eax, 0
jz short loc_91E79
loc_91E74:
jmp loc_91F71
loc_91E79:
mov eax, [rbp+var_2C]
mov ecx, eax
lea rax, log_record_type_descriptor
imul rcx, 48h ; 'H'
add rax, rcx
cmp dword ptr [rax], 2
jnz short loc_91EC0
jmp short $+2
loc_91E93:
jmp short $+2
loc_91E95:
mov rdi, [rbp+var_48]
mov rax, [rbp+var_28]
mov rsi, [rax]
mov eax, [rbp+var_2C]
mov ecx, eax
lea rax, log_record_type_descriptor
imul rcx, 48h ; 'H'
add rax, rcx
movsx edx, word ptr [rax+20h]
lea rcx, [rbp+var_20]
call translog_relative_LSN_encode
loc_91EC0:
jmp short $+2
loc_91EC2:
jmp short $+2
loc_91EC4:
mov rax, [rbp+var_48]
mov rax, [rax+10h]
mov rdx, [rbp+var_48]
mov ecx, [rdx+8]
add ecx, 0FFFFFFFFh
mov [rdx+8], ecx
mov ecx, ecx
shl rcx, 4
add rax, rcx
mov [rbp+var_68], rax
mov rax, [rbp+var_68]
mov qword ptr [rax+8], 3
mov rax, [rbp+var_48]
mov ecx, [rax+4]
add ecx, 3
mov [rax+4], ecx
lea rcx, [rbp+var_5B]
mov rax, [rbp+var_68]
mov [rax], rcx
mov eax, [rbp+var_2C]
or eax, 40h
mov [rbp+var_5B], al
lea rax, [rbp+var_5B]
add rax, 1
mov [rbp+var_78], rax
mov cx, [rbp+var_3A]
mov rax, [rbp+var_78]
mov [rax], cx
mov rax, [rbp+var_48]
mov edx, [rax+4]
mov rcx, [rbp+var_48]
lea rsi, log_descriptor
mov rdi, rsi
add rdi, 800C48h
add rsi, 800C50h
call translog_write_parts_on_page
movsx eax, al
mov [rbp+var_6C], eax
mov rax, [rbp+var_28]
mov rcx, [rax]
mov rax, cs:qword_C8C658
mov [rax+100000h], rcx
jmp short $+2
loc_91F6F:
jmp short $+2
loc_91F71:
call translog_unlock
cmp [rbp+var_58], 0
jz short loc_91F9B
cmp [rbp+var_6C], 0
jnz short loc_91F92
mov rdi, [rbp+var_58]
call translog_buffer_flush
movsx eax, al
mov [rbp+var_6C], eax
loc_91F92:
mov rdi, [rbp+var_58]
call translog_buffer_unlock
loc_91F9B:
jmp short $+2
loc_91F9D:
mov eax, [rbp+var_6C]
mov [rbp+var_79], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_91FC1
mov al, [rbp+var_79]
add rsp, 80h
pop rbp
retn
loc_91FC1:
call ___stack_chk_fail
| char translog_write_fixed_record(
_QWORD *a1,
unsigned int a2,
long long a3,
__int16 a4,
long long a5,
long long a6,
long long a7)
{
long long v7; // rax
unsigned int v8; // ecx
int v10; // [rsp+14h] [rbp-6Ch]
char v11; // [rsp+25h] [rbp-5Bh] BYREF
__int16 v12; // [rsp+26h] [rbp-5Ah]
long long v13; // [rsp+28h] [rbp-58h] BYREF
long long v14; // [rsp+30h] [rbp-50h]
long long v15; // [rsp+38h] [rbp-48h]
__int16 v16; // [rsp+46h] [rbp-3Ah]
long long v17; // [rsp+48h] [rbp-38h]
unsigned int v18; // [rsp+54h] [rbp-2Ch]
_QWORD *v19; // [rsp+58h] [rbp-28h]
_BYTE v20[24]; // [rsp+60h] [rbp-20h] BYREF
unsigned long long v21; // [rsp+78h] [rbp-8h]
v21 = __readfsqword(0x28u);
v19 = a1;
v18 = a2;
v17 = a3;
v16 = a4;
v15 = a5;
v14 = a6;
v13 = 0LL;
v10 = 1;
translog_lock();
if ( 2 * SLOWORD(log_record_type_descriptor[18 * a2 + 8])
+ *(_DWORD *)v15
+ 3
+ (unsigned int)(unsigned __int16)word_C8C660 <= 0x2000
|| !(unsigned __int8)translog_page_next(&log_descriptor[1048969], &log_descriptor[1048970], &v13) )
{
set_lsn(v19, qword_C8C628);
if ( !(unsigned __int8)translog_set_lsn_for_files(
(unsigned int)HIDWORD(*v19),
(unsigned int)HIDWORD(*v19),
*v19,
1LL)
&& (!*(_QWORD *)&log_record_type_descriptor[18 * v18 + 4]
|| !(*(unsigned __int8 ( **)(_QWORD, long long, long long, _QWORD *, long long))&log_record_type_descriptor[18 * v18 + 4])(
v18,
v14,
v17,
v19,
a7)) )
{
if ( log_record_type_descriptor[18 * v18] == 2 )
translog_relative_LSN_encode(v15, *v19, (unsigned int)SLOWORD(log_record_type_descriptor[18 * v18 + 8]), v20);
v7 = *(_QWORD *)(v15 + 16);
v8 = *(_DWORD *)(v15 + 8) - 1;
*(_DWORD *)(v15 + 8) = v8;
*(_QWORD *)(16LL * v8 + v7 + 8) = 3LL;
*(_DWORD *)(v15 + 4) += 3;
*(_QWORD *)(16LL * v8 + v7) = &v11;
v11 = v18 | 0x40;
v12 = v16;
v10 = (char)translog_write_parts_on_page(
&log_descriptor[1048969],
&log_descriptor[1048970],
*(unsigned int *)(v15 + 4),
v15);
*(_QWORD *)(qword_C8C658 + 0x100000) = *v19;
}
}
translog_unlock();
if ( v13 )
{
if ( !v10 )
v10 = (unsigned __int8)translog_buffer_flush(v13);
translog_buffer_unlock(v13);
}
return v10;
}
| translog_write_fixed_record:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV AX,CX
MOV RCX,qword ptr [RBP + 0x10]
MOV RCX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RCX
MOV qword ptr [RBP + -0x28],RDI
MOV dword ptr [RBP + -0x2c],ESI
MOV qword ptr [RBP + -0x38],RDX
MOV word ptr [RBP + -0x3a],AX
MOV qword ptr [RBP + -0x48],R8
MOV qword ptr [RBP + -0x50],R9
MOV qword ptr [RBP + -0x58],0x0
MOV dword ptr [RBP + -0x6c],0x1
JMP 0x00191d67
LAB_00191d67:
CALL 0x0018d500
JMP 0x00191d6e
LAB_00191d6e:
JMP 0x00191d70
LAB_00191d70:
JMP 0x00191d72
LAB_00191d72:
JMP 0x00191d74
LAB_00191d74:
JMP 0x00191d76
LAB_00191d76:
MOVZX EAX,word ptr [0x00d8c660]
MOV RCX,qword ptr [RBP + -0x48]
MOV ECX,dword ptr [RCX]
MOV EDX,dword ptr [RBP + -0x2c]
MOV ESI,EDX
LEA RDX,[0x58a7e0]
IMUL RSI,RSI,0x48
ADD RDX,RSI
MOVSX EDX,word ptr [RDX + 0x20]
SHL EDX,0x1
ADD ECX,EDX
ADD ECX,0x3
ADD EAX,ECX
CMP EAX,0x2000
JBE 0x00191de3
JMP 0x00191dac
LAB_00191dac:
JMP 0x00191dae
LAB_00191dae:
LEA RSI,[0x58b9e0]
MOV RDI,RSI
ADD RDI,0x800c48
ADD RSI,0x800c50
LEA RDX,[RBP + -0x58]
CALL 0x00196e70
CMP AL,0x0
JZ 0x00191dd8
JMP 0x00191f71
LAB_00191dd8:
CMP qword ptr [RBP + -0x58],0x0
JZ 0x00191de1
JMP 0x00191de1
LAB_00191de1:
JMP 0x00191de3
LAB_00191de3:
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [0x00d8c628]
CALL 0x00198800
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
SAR RAX,0x20
MOV EDI,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
SAR RAX,0x20
MOV ESI,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RAX]
MOV ECX,0x1
CALL 0x00198830
MOVSX EAX,AL
CMP EAX,0x0
JNZ 0x00191e74
MOV EAX,dword ptr [RBP + -0x2c]
MOV ECX,EAX
LEA RAX,[0x58a7e0]
IMUL RCX,RCX,0x48
ADD RAX,RCX
CMP qword ptr [RAX + 0x10],0x0
JZ 0x00191e79
MOV EAX,dword ptr [RBP + -0x2c]
MOV ECX,EAX
LEA RAX,[0x58a7e0]
IMUL RCX,RCX,0x48
ADD RAX,RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV EDI,dword ptr [RBP + -0x2c]
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8,qword ptr [RBP + 0x10]
CALL RAX
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x00191e79
LAB_00191e74:
JMP 0x00191f71
LAB_00191e79:
MOV EAX,dword ptr [RBP + -0x2c]
MOV ECX,EAX
LEA RAX,[0x58a7e0]
IMUL RCX,RCX,0x48
ADD RAX,RCX
CMP dword ptr [RAX],0x2
JNZ 0x00191ec0
JMP 0x00191e93
LAB_00191e93:
JMP 0x00191e95
LAB_00191e95:
MOV RDI,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RAX]
MOV EAX,dword ptr [RBP + -0x2c]
MOV ECX,EAX
LEA RAX,[0x58a7e0]
IMUL RCX,RCX,0x48
ADD RAX,RCX
MOVSX EDX,word ptr [RAX + 0x20]
LEA RCX,[RBP + -0x20]
CALL 0x00196f70
LAB_00191ec0:
JMP 0x00191ec2
LAB_00191ec2:
JMP 0x00191ec4
LAB_00191ec4:
MOV RAX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RAX + 0x10]
MOV RDX,qword ptr [RBP + -0x48]
MOV ECX,dword ptr [RDX + 0x8]
ADD ECX,-0x1
MOV dword ptr [RDX + 0x8],ECX
MOV ECX,ECX
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RAX + 0x8],0x3
MOV RAX,qword ptr [RBP + -0x48]
MOV ECX,dword ptr [RAX + 0x4]
ADD ECX,0x3
MOV dword ptr [RAX + 0x4],ECX
LEA RCX,[RBP + -0x5b]
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RAX],RCX
MOV EAX,dword ptr [RBP + -0x2c]
OR EAX,0x40
MOV byte ptr [RBP + -0x5b],AL
LEA RAX,[RBP + -0x5b]
ADD RAX,0x1
MOV qword ptr [RBP + -0x78],RAX
MOV CX,word ptr [RBP + -0x3a]
MOV RAX,qword ptr [RBP + -0x78]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x48]
MOV EDX,dword ptr [RAX + 0x4]
MOV RCX,qword ptr [RBP + -0x48]
LEA RSI,[0x58b9e0]
MOV RDI,RSI
ADD RDI,0x800c48
ADD RSI,0x800c50
CALL 0x001989d0
MOVSX EAX,AL
MOV dword ptr [RBP + -0x6c],EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [0x00d8c658]
MOV qword ptr [RAX + 0x100000],RCX
JMP 0x00191f6f
LAB_00191f6f:
JMP 0x00191f71
LAB_00191f71:
CALL 0x0018d5f0
CMP qword ptr [RBP + -0x58],0x0
JZ 0x00191f9b
CMP dword ptr [RBP + -0x6c],0x0
JNZ 0x00191f92
MOV RDI,qword ptr [RBP + -0x58]
CALL 0x001937b0
MOVSX EAX,AL
MOV dword ptr [RBP + -0x6c],EAX
LAB_00191f92:
MOV RDI,qword ptr [RBP + -0x58]
CALL 0x0018d5c0
LAB_00191f9b:
JMP 0x00191f9d
LAB_00191f9d:
MOV EAX,dword ptr [RBP + -0x6c]
MOV byte ptr [RBP + -0x79],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00191fc1
MOV AL,byte ptr [RBP + -0x79]
ADD RSP,0x80
POP RBP
RET
LAB_00191fc1:
CALL 0x0012a260
|
int8
translog_write_fixed_record
(long *param_1,uint param_2,int8 param_3,int2 param_4,int *param_5,
int8 param_6,int8 param_7)
{
int iVar1;
char cVar2;
char cVar3;
long *plVar4;
long in_FS_OFFSET;
byte local_63;
int2 local_62;
long local_60;
int8 local_58;
int *local_50;
int2 local_42;
int8 local_40;
uint local_34;
long *local_30;
int1 local_28 [24];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_60 = 0;
cVar3 = '\x01';
local_58 = param_6;
local_50 = param_5;
local_42 = param_4;
local_40 = param_3;
local_34 = param_2;
local_30 = param_1;
translog_lock();
if (((uint)DAT_00d8c660 +
*local_50 + *(short *)(log_record_type_descriptor + (ulong)local_34 * 0x48 + 0x20) * 2 + 3 <
0x2001) || (cVar2 = translog_page_next(&DAT_00d8c628,&DAT_00d8c630,&local_60), cVar2 == '\0')
) {
set_lsn(local_30,DAT_00d8c628);
cVar2 = translog_set_lsn_for_files
(*local_30 >> 0x20 & 0xffffffff,*local_30 >> 0x20 & 0xffffffff,*local_30,1);
if ((cVar2 == '\0') &&
((*(long *)(log_record_type_descriptor + (ulong)local_34 * 0x48 + 0x10) == 0 ||
(cVar2 = (**(code **)(log_record_type_descriptor + (ulong)local_34 * 0x48 + 0x10))
(local_34,local_58,local_40,local_30,param_7), cVar2 == '\0')))) {
if (*(int *)(log_record_type_descriptor + (ulong)local_34 * 0x48) == 2) {
translog_relative_LSN_encode
(local_50,*local_30,
(int)*(short *)(log_record_type_descriptor + (ulong)local_34 * 0x48 + 0x20),
local_28);
}
iVar1 = local_50[2];
local_50[2] = iVar1 - 1U;
plVar4 = (long *)(*(long *)(local_50 + 4) + (ulong)(iVar1 - 1U) * 0x10);
plVar4[1] = 3;
local_50[1] = local_50[1] + 3;
*plVar4 = (long)&local_63;
local_63 = (byte)local_34 | 0x40;
local_62 = local_42;
cVar3 = translog_write_parts_on_page(&DAT_00d8c628,&DAT_00d8c630,local_50[1],local_50);
*(long *)(DAT_00d8c658 + 0x100000) = *local_30;
}
}
translog_unlock();
if (local_60 != 0) {
if (cVar3 == '\0') {
cVar3 = translog_buffer_flush(local_60);
}
translog_buffer_unlock(local_60);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),cVar3);
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
43,243 | my_strnncoll_8bit_bin | eloqsql/strings/ctype-bin.c | static int my_strnncoll_8bit_bin(CHARSET_INFO * cs __attribute__((unused)),
const uchar *s, size_t slen,
const uchar *t, size_t tlen,
my_bool t_is_prefix)
{
size_t len=MY_MIN(slen,tlen);
int cmp= memcmp(s,t,len);
return cmp ? cmp : (int)((t_is_prefix ? len : slen) - tlen);
} | O0 | c | my_strnncoll_8bit_bin:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movb %r9b, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movb %al, -0x29(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x36d96
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x36d9e
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x24160
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
je 0x36dc8
movl -0x3c(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x36dee
movsbl -0x29(%rbp), %eax
cmpl $0x0, %eax
je 0x36ddb
movq -0x38(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x36de3
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
subq -0x28(%rbp), %rax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| my_strnncoll_8bit_bin:
push rbp
mov rbp, rsp
sub rsp, 60h
mov al, r9b
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_29], al
mov rax, [rbp+var_18]
cmp rax, [rbp+var_28]
jnb short loc_36D96
mov rax, [rbp+var_18]
mov [rbp+var_48], rax
jmp short loc_36D9E
loc_36D96:
mov rax, [rbp+var_28]
mov [rbp+var_48], rax
loc_36D9E:
mov rax, [rbp+var_48]
mov [rbp+var_38], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_38]
call _memcmp
mov [rbp+var_3C], eax
cmp [rbp+var_3C], 0
jz short loc_36DC8
mov eax, [rbp+var_3C]
mov [rbp+var_4C], eax
jmp short loc_36DEE
loc_36DC8:
movsx eax, [rbp+var_29]
cmp eax, 0
jz short loc_36DDB
mov rax, [rbp+var_38]
mov [rbp+var_58], rax
jmp short loc_36DE3
loc_36DDB:
mov rax, [rbp+var_18]
mov [rbp+var_58], rax
loc_36DE3:
mov rax, [rbp+var_58]
sub rax, [rbp+var_28]
mov [rbp+var_4C], eax
loc_36DEE:
mov eax, [rbp+var_4C]
add rsp, 60h
pop rbp
retn
| long long my_strnncoll_8bit_bin(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
char a6)
{
int v7; // [rsp+8h] [rbp-58h]
unsigned long long v9; // [rsp+18h] [rbp-48h]
unsigned int v10; // [rsp+24h] [rbp-3Ch]
int v12; // [rsp+38h] [rbp-28h]
int v13; // [rsp+48h] [rbp-18h]
v13 = a3;
v12 = a5;
if ( a3 >= a5 )
v9 = a5;
else
v9 = a3;
v10 = memcmp(a2, a4, v9);
if ( v10 )
{
return v10;
}
else
{
if ( a6 )
v7 = v9;
else
v7 = v13;
return (unsigned int)(v7 - v12);
}
}
| my_strnncoll_8bit_bin:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV AL,R9B
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 byte ptr [RBP + -0x29],AL
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x28]
JNC 0x00136d96
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x00136d9e
LAB_00136d96:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x48],RAX
LAB_00136d9e:
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x38]
CALL 0x00124160
MOV dword ptr [RBP + -0x3c],EAX
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x00136dc8
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x4c],EAX
JMP 0x00136dee
LAB_00136dc8:
MOVSX EAX,byte ptr [RBP + -0x29]
CMP EAX,0x0
JZ 0x00136ddb
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x00136de3
LAB_00136ddb:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x58],RAX
LAB_00136de3:
MOV RAX,qword ptr [RBP + -0x58]
SUB RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x4c],EAX
LAB_00136dee:
MOV EAX,dword ptr [RBP + -0x4c]
ADD RSP,0x60
POP RBP
RET
|
int my_strnncoll_8bit_bin
(int8 param_1,void *param_2,ulong param_3,void *param_4,ulong param_5,
char param_6)
{
ulong local_60;
int local_54;
size_t local_50;
local_50 = param_5;
if (param_3 < param_5) {
local_50 = param_3;
}
local_54 = memcmp(param_2,param_4,local_50);
if (local_54 == 0) {
local_60 = param_3;
if (param_6 != '\0') {
local_60 = local_50;
}
local_54 = (int)local_60 - (int)param_5;
}
return local_54;
}
| |
43,244 | add_cfg_dir | eloqsql/libmariadb/libmariadb/ma_default.c | static int add_cfg_dir(char **cfg_dirs, const char *directory)
{
int i;
for (i = 0; i < MAX_CONFIG_DIRS && cfg_dirs[i]; i++)
if (!strcmp(cfg_dirs[i], directory)) /* already present */
return 0;
if (i < MAX_CONFIG_DIRS) {
cfg_dirs[i]= strdup(directory);
return 0;
}
return 1;
} | O0 | c | add_cfg_dir:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
xorl %eax, %eax
cmpl $0x6, -0x1c(%rbp)
movb %al, -0x1d(%rbp)
jge 0x4ef05
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
setne %al
movb %al, -0x1d(%rbp)
movb -0x1d(%rbp), %al
testb $0x1, %al
jne 0x4ef0e
jmp 0x4ef3e
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x18(%rbp), %rsi
callq 0x135f0
cmpl $0x0, %eax
jne 0x4ef31
movl $0x0, -0x4(%rbp)
jmp 0x4ef6c
jmp 0x4ef33
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x4eee7
cmpl $0x6, -0x1c(%rbp)
jge 0x4ef65
movq -0x18(%rbp), %rdi
callq 0x137a0
movq %rax, %rdx
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl $0x0, -0x4(%rbp)
jmp 0x4ef6c
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| add_cfg_dir:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], 0
loc_4EEE7:
xor eax, eax
cmp [rbp+var_1C], 6
mov [rbp+var_1D], al
jge short loc_4EF05
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_1C]
cmp qword ptr [rax+rcx*8], 0
setnz al
mov [rbp+var_1D], al
loc_4EF05:
mov al, [rbp+var_1D]
test al, 1
jnz short loc_4EF0E
jmp short loc_4EF3E
loc_4EF0E:
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_1C]
mov rdi, [rax+rcx*8]
mov rsi, [rbp+var_18]
call _strcmp
cmp eax, 0
jnz short loc_4EF31
mov [rbp+var_4], 0
jmp short loc_4EF6C
loc_4EF31:
jmp short $+2
loc_4EF33:
mov eax, [rbp+var_1C]
add eax, 1
mov [rbp+var_1C], eax
jmp short loc_4EEE7
loc_4EF3E:
cmp [rbp+var_1C], 6
jge short loc_4EF65
mov rdi, [rbp+var_18]
call _strdup
mov rdx, rax
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_1C]
mov [rax+rcx*8], rdx
mov [rbp+var_4], 0
jmp short loc_4EF6C
loc_4EF65:
mov [rbp+var_4], 1
loc_4EF6C:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long add_cfg_dir(long long a1, long long a2)
{
bool v3; // [rsp+3h] [rbp-1Dh]
int i; // [rsp+4h] [rbp-1Ch]
for ( i = 0; ; ++i )
{
v3 = 0;
if ( i < 6 )
v3 = *(_QWORD *)(a1 + 8LL * i) != 0LL;
if ( !v3 )
break;
if ( !(unsigned int)strcmp(*(_QWORD *)(a1 + 8LL * i), a2) )
return 0;
}
if ( i >= 6 )
{
return 1;
}
else
{
*(_QWORD *)(a1 + 8LL * i) = strdup(a2);
return 0;
}
}
| add_cfg_dir:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],0x0
LAB_0014eee7:
XOR EAX,EAX
CMP dword ptr [RBP + -0x1c],0x6
MOV byte ptr [RBP + -0x1d],AL
JGE 0x0014ef05
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x1c]
CMP qword ptr [RAX + RCX*0x8],0x0
SETNZ AL
MOV byte ptr [RBP + -0x1d],AL
LAB_0014ef05:
MOV AL,byte ptr [RBP + -0x1d]
TEST AL,0x1
JNZ 0x0014ef0e
JMP 0x0014ef3e
LAB_0014ef0e:
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x1c]
MOV RDI,qword ptr [RAX + RCX*0x8]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001135f0
CMP EAX,0x0
JNZ 0x0014ef31
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0014ef6c
LAB_0014ef31:
JMP 0x0014ef33
LAB_0014ef33:
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x0014eee7
LAB_0014ef3e:
CMP dword ptr [RBP + -0x1c],0x6
JGE 0x0014ef65
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001137a0
MOV RDX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x1c]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0014ef6c
LAB_0014ef65:
MOV dword ptr [RBP + -0x4],0x1
LAB_0014ef6c:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 add_cfg_dir(long param_1,char *param_2)
{
int iVar1;
char *pcVar2;
bool bVar3;
int local_24;
local_24 = 0;
while( true ) {
bVar3 = false;
if (local_24 < 6) {
bVar3 = *(long *)(param_1 + (long)local_24 * 8) != 0;
}
if (!bVar3) break;
iVar1 = strcmp(*(char **)(param_1 + (long)local_24 * 8),param_2);
if (iVar1 == 0) {
return 0;
}
local_24 = local_24 + 1;
}
if (local_24 < 6) {
pcVar2 = strdup(param_2);
*(char **)(param_1 + (long)local_24 * 8) = pcVar2;
return 0;
}
return 1;
}
| |
43,245 | evmone::StackSpace::StackSpace(evmone::StackSpace&&) | corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/execution_state.hpp | static uint256* allocate() noexcept
{
static constexpr auto alignment = sizeof(uint256);
static constexpr auto size = limit * sizeof(uint256);
#ifdef _MSC_VER
// MSVC doesn't support aligned_alloc() but _aligned_malloc() can be used instead.
const auto p = _aligned_malloc(size, alignment);
#else
const auto p = evmone_compat::aligned_alloc(alignment, size);
#endif
return static_cast<uint256*>(p);
} | O0 | cpp | evmone::StackSpace::StackSpace(evmone::StackSpace&&):
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x3b310
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZN6evmone10StackSpaceC2EOS0_:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call _ZNSt10unique_ptrIN4intx4uintILj256EEEN6evmone10StackSpace7DeleterEEC2EOS6_; std::unique_ptr<intx::uint<256u>,evmone::StackSpace::Deleter>::unique_ptr(std::unique_ptr<intx::uint<256u>,evmone::StackSpace::Deleter>&&)
add rsp, 10h
pop rbp
retn
| long long evmone::StackSpace::StackSpace(long long a1, long long a2)
{
return std::unique_ptr<intx::uint<256u>,evmone::StackSpace::Deleter>::unique_ptr(a1, a2);
}
| StackSpace:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x0013b310
ADD RSP,0x10
POP RBP
RET
|
/* evmone::StackSpace::StackSpace(evmone::StackSpace&&) */
void __thiscall evmone::StackSpace::StackSpace(StackSpace *this,StackSpace *param_1)
{
std::unique_ptr<intx::uint<256u>,evmone::StackSpace::Deleter>::unique_ptr
((unique_ptr<intx::uint<256u>,evmone::StackSpace::Deleter> *)this,param_1);
return;
}
| |
43,246 | rw_pr_rdlock | eloqsql/mysys/thr_rwlock.c | int rw_pr_rdlock(rw_pr_lock_t *rwlock)
{
pthread_mutex_lock(&rwlock->lock);
/*
The fact that we were able to acquire 'lock' mutex means
that there are no active writers and we can acquire rd-lock.
Increment active readers counter to prevent requests for
wr-lock from succeeding and unlock mutex.
*/
rwlock->active_readers++;
pthread_mutex_unlock(&rwlock->lock);
return 0;
} | O0 | c | rw_pr_rdlock:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x602d0
movq -0x8(%rbp), %rax
movl 0x58(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x58(%rax)
movq -0x8(%rbp), %rdi
callq 0x60290
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| rw_pr_rdlock:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
call _pthread_mutex_lock
mov rax, [rbp+var_8]
mov ecx, [rax+58h]
add ecx, 1
mov [rax+58h], ecx
mov rdi, [rbp+var_8]
call _pthread_mutex_unlock
xor eax, eax
add rsp, 10h
pop rbp
retn
| long long rw_pr_rdlock(long long a1)
{
pthread_mutex_lock(a1);
++*(_DWORD *)(a1 + 88);
pthread_mutex_unlock(a1);
return 0LL;
}
| rw_pr_rdlock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001602d0
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x58]
ADD ECX,0x1
MOV dword ptr [RAX + 0x58],ECX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00160290
XOR EAX,EAX
ADD RSP,0x10
POP RBP
RET
|
int8 rw_pr_rdlock(pthread_mutex_t *param_1)
{
pthread_mutex_lock(param_1);
*(int *)((long)param_1 + 0x58) = *(int *)((long)param_1 + 0x58) + 1;
pthread_mutex_unlock(param_1);
return 0;
}
| |
43,247 | my_caseup_utf8mb4 | eloqsql/strings/ctype-utf8.c | static size_t
my_caseup_utf8mb4(CHARSET_INFO *cs, const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
int srcres, dstres;
const char *srcend= src + srclen;
char *dstend= dst + dstlen, *dst0= dst;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(src != dst || cs->caseup_multiply == 1);
while ((src < srcend) &&
(srcres= my_mb_wc_utf8mb4(cs, &wc,
(uchar *) src, (uchar*) srcend)) > 0)
{
my_toupper_utf8mb4(uni_plane, &wc);
if ((dstres= my_wc_mb_utf8mb4(cs, wc, (uchar*) dst, (uchar*) dstend)) <= 0)
break;
src+= srcres;
dst+= dstres;
}
return (size_t) (dst - dst0);
} | O3 | c | my_caseup_utf8mb4:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, -0x38(%rbp)
movq %rcx, %r13
movq %rcx, -0x30(%rbp)
testq %rdx, %rdx
jle 0xcca6d
movq %rdx, %r15
movq %rsi, %r12
addq %rsi, %r15
movq -0x30(%rbp), %r13
addq %r13, -0x38(%rbp)
movq 0x78(%rdi), %r14
leaq -0x40(%rbp), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0xcfafe
testl %eax, %eax
jle 0xcca6d
movl %eax, %ebx
movq -0x40(%rbp), %rsi
cmpq (%r14), %rsi
ja 0xcca4e
movq 0x8(%r14), %rax
movq %rsi, %rcx
shrq $0x8, %rcx
movq (%rax,%rcx,8), %rax
testq %rax, %rax
je 0xcca4e
movzbl %sil, %ecx
leaq (%rcx,%rcx,2), %rcx
movl (%rax,%rcx,4), %esi
movq %rsi, -0x40(%rbp)
movq %r13, %rdx
movq -0x38(%rbp), %rcx
callq 0xcc7ed
testl %eax, %eax
jle 0xcca6d
movl %ebx, %ecx
addq %rcx, %r12
movl %eax, %eax
addq %rax, %r13
cmpq %r15, %r12
jb 0xcca0d
subq -0x30(%rbp), %r13
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_caseup_utf8mb4:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_38], r8
mov r13, rcx
mov [rbp+var_30], rcx
test rdx, rdx
jle short loc_CCA6D
mov r15, rdx
mov r12, rsi
add r15, rsi
mov r13, [rbp+var_30]
add [rbp+var_38], r13
mov r14, [rdi+78h]
loc_CCA0D:
lea rdi, [rbp+var_40]
mov rsi, r12
mov rdx, r15
call my_mb_wc_utf8mb4_quick_0
test eax, eax
jle short loc_CCA6D
mov ebx, eax
mov rsi, [rbp+var_40]
cmp rsi, [r14]
ja short loc_CCA4E
mov rax, [r14+8]
mov rcx, rsi
shr rcx, 8
mov rax, [rax+rcx*8]
test rax, rax
jz short loc_CCA4E
movzx ecx, sil
lea rcx, [rcx+rcx*2]
mov esi, [rax+rcx*4]
mov [rbp+var_40], rsi
loc_CCA4E:
mov rdx, r13
mov rcx, [rbp+var_38]
call my_wc_mb_utf8mb4
test eax, eax
jle short loc_CCA6D
mov ecx, ebx
add r12, rcx
mov eax, eax
add r13, rax
cmp r12, r15
jb short loc_CCA0D
loc_CCA6D:
sub r13, [rbp+var_30]
mov rax, r13
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _BYTE * my_caseup_utf8mb4(long long a1, unsigned long long a2, long long a3, _BYTE *a4, unsigned long long a5)
{
_BYTE *v5; // r13
unsigned long long v6; // r12
unsigned long long v7; // r15
unsigned long long *v8; // r14
int v9; // eax
unsigned int v10; // ebx
unsigned long long v11; // rsi
long long v12; // rax
int v13; // eax
unsigned long long v15; // [rsp+0h] [rbp-40h] BYREF
unsigned long long v16; // [rsp+8h] [rbp-38h]
_BYTE *v17; // [rsp+10h] [rbp-30h]
v16 = a5;
v5 = a4;
v17 = a4;
if ( a3 > 0 )
{
v6 = a2;
v7 = a2 + a3;
v5 = v17;
v16 += (unsigned long long)v17;
v8 = *(unsigned long long **)(a1 + 120);
do
{
v9 = my_mb_wc_utf8mb4_quick_0(&v15, v6, v7);
if ( v9 <= 0 )
break;
v10 = v9;
v11 = v15;
if ( v15 <= *v8 )
{
v12 = *(_QWORD *)(v8[1] + 8 * (v15 >> 8));
if ( v12 )
{
v11 = *(unsigned int *)(v12 + 12LL * (unsigned __int8)v15);
v15 = v11;
}
}
v13 = my_wc_mb_utf8mb4((long long)&v15, v11, v5, v16);
if ( v13 <= 0 )
break;
v6 += v10;
v5 += (unsigned int)v13;
}
while ( v6 < v7 );
}
return (_BYTE *)(v5 - v17);
}
| my_caseup_utf8mb4:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RBP + -0x38],R8
MOV R13,RCX
MOV qword ptr [RBP + -0x30],RCX
TEST RDX,RDX
JLE 0x001cca6d
MOV R15,RDX
MOV R12,RSI
ADD R15,RSI
MOV R13,qword ptr [RBP + -0x30]
ADD qword ptr [RBP + -0x38],R13
MOV R14,qword ptr [RDI + 0x78]
LAB_001cca0d:
LEA RDI,[RBP + -0x40]
MOV RSI,R12
MOV RDX,R15
CALL 0x001cfafe
TEST EAX,EAX
JLE 0x001cca6d
MOV EBX,EAX
MOV RSI,qword ptr [RBP + -0x40]
CMP RSI,qword ptr [R14]
JA 0x001cca4e
MOV RAX,qword ptr [R14 + 0x8]
MOV RCX,RSI
SHR RCX,0x8
MOV RAX,qword ptr [RAX + RCX*0x8]
TEST RAX,RAX
JZ 0x001cca4e
MOVZX ECX,SIL
LEA RCX,[RCX + RCX*0x2]
MOV ESI,dword ptr [RAX + RCX*0x4]
MOV qword ptr [RBP + -0x40],RSI
LAB_001cca4e:
MOV RDX,R13
MOV RCX,qword ptr [RBP + -0x38]
CALL 0x001cc7ed
TEST EAX,EAX
JLE 0x001cca6d
MOV ECX,EBX
ADD R12,RCX
MOV EAX,EAX
ADD R13,RAX
CMP R12,R15
JC 0x001cca0d
LAB_001cca6d:
SUB R13,qword ptr [RBP + -0x30]
MOV RAX,R13
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_caseup_utf8mb4(long param_1,ulong param_2,long param_3,long param_4,long param_5)
{
ulong *puVar1;
long lVar2;
uint uVar3;
uint uVar4;
ulong uVar5;
ulong local_48;
long local_40;
long local_38;
local_38 = param_4;
if (0 < param_3) {
uVar5 = param_3 + param_2;
local_40 = param_5 + param_4;
puVar1 = *(ulong **)(param_1 + 0x78);
do {
uVar3 = my_mb_wc_utf8mb4_quick(&local_48,param_2,uVar5);
if ((int)uVar3 < 1) break;
if ((local_48 <= *puVar1) && (lVar2 = *(long *)(puVar1[1] + (local_48 >> 8) * 8), lVar2 != 0))
{
local_48 = (ulong)*(uint *)(lVar2 + (local_48 & 0xff) * 0xc);
}
uVar4 = my_wc_mb_utf8mb4();
if ((int)uVar4 < 1) break;
param_2 = param_2 + uVar3;
param_4 = param_4 + (ulong)uVar4;
} while (param_2 < uVar5);
}
return param_4 - local_38;
}
| |
43,248 | my_hash_init2 | eloqsql/mysys/hash.c | my_bool
my_hash_init2(PSI_memory_key psi_key, HASH *hash, uint growth_size,
CHARSET_INFO *charset, ulong size, size_t key_offset,
size_t key_length, my_hash_get_key get_key,
my_hash_function hash_function,
void (*free_element)(void*), uint flags)
{
my_bool res;
DBUG_ENTER("my_hash_init2");
DBUG_PRINT("enter",("hash:%p size: %u", hash, (uint) size));
hash->records=0;
hash->key_offset=key_offset;
hash->key_length=key_length;
hash->blength=1;
hash->get_key=get_key;
hash->hash_function= hash_function ? hash_function : my_hash_sort;
hash->free=free_element;
hash->flags=flags;
hash->charset=charset;
res= init_dynamic_array2(psi_key, &hash->array, sizeof(HASH_LINK), NULL, size,
growth_size, MYF((flags & HASH_THREAD_SPECIFIC ?
MY_THREAD_SPECIFIC : 0)));
DBUG_RETURN(res);
} | O0 | c | my_hash_init2:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl 0x30(%rbp), %eax
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
jmp 0x6b9d3
movq -0x10(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq 0x10(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq $0x1, 0x10(%rax)
movq 0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x50(%rax)
cmpq $0x0, 0x20(%rbp)
je 0x6ba1f
movq 0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0x6ba2c
leaq -0x126(%rip), %rax # 0x6b900
movq %rax, -0x40(%rbp)
jmp 0x6ba2c
movq -0x40(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x58(%rax)
movq 0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x60(%rax)
movl 0x30(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x68(%rax)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
addq $0x28, %rsi
movq -0x28(%rbp), %rax
movl %eax, %r8d
movl -0x14(%rbp), %r9d
movl 0x30(%rbp), %edx
andl $0x2, %edx
xorl %eax, %eax
movl $0x10000, %ecx # imm = 0x10000
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, %eax
movl $0x10, %edx
xorl %ecx, %ecx
movq %rax, (%rsp)
callq 0x68340
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| my_hash_init2:
push rbp
mov rbp, rsp
sub rsp, 50h
mov eax, [rbp+arg_20]
mov rax, [rbp+arg_18]
mov rax, [rbp+arg_10]
mov rax, [rbp+arg_8]
mov rax, [rbp+arg_0]
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
jmp short $+2
loc_6B9D3:
mov rax, [rbp+var_10]
mov qword ptr [rax+18h], 0
mov rcx, [rbp+var_30]
mov rax, [rbp+var_10]
mov [rax], rcx
mov rcx, [rbp+arg_0]
mov rax, [rbp+var_10]
mov [rax+8], rcx
mov rax, [rbp+var_10]
mov qword ptr [rax+10h], 1
mov rcx, [rbp+arg_8]
mov rax, [rbp+var_10]
mov [rax+50h], rcx
cmp [rbp+arg_10], 0
jz short loc_6BA1F
mov rax, [rbp+arg_10]
mov [rbp+var_40], rax
jmp short loc_6BA2C
loc_6BA1F:
lea rax, my_hash_sort
mov [rbp+var_40], rax
jmp short $+2
loc_6BA2C:
mov rcx, [rbp+var_40]
mov rax, [rbp+var_10]
mov [rax+58h], rcx
mov rcx, [rbp+arg_18]
mov rax, [rbp+var_10]
mov [rax+60h], rcx
mov ecx, [rbp+arg_20]
mov rax, [rbp+var_10]
mov [rax+20h], ecx
mov rcx, [rbp+var_20]
mov rax, [rbp+var_10]
mov [rax+68h], rcx
mov edi, [rbp+var_4]
mov rsi, [rbp+var_10]
add rsi, 28h ; '('
mov rax, [rbp+var_28]
mov r8d, eax
mov r9d, [rbp+var_14]
mov edx, [rbp+arg_20]
and edx, 2
xor eax, eax
mov ecx, 10000h
cmp edx, 0
cmovnz eax, ecx
mov eax, eax
mov edx, 10h
xor ecx, ecx
mov [rsp+50h+var_50], rax
call init_dynamic_array2
mov [rbp+var_31], al
mov al, [rbp+var_31]
mov [rbp+var_41], al
mov al, [rbp+var_41]
add rsp, 50h
pop rbp
retn
| char my_hash_init2(
unsigned int a1,
long long a2,
int a3,
long long a4,
unsigned int a5,
long long a6,
long long a7,
long long a8,
long long ( *a9)(long long a1, long long a2, long long a3),
long long a10,
int a11)
{
long long v11; // rsi
unsigned int v12; // eax
long long ( *v14)(long long, long long, long long); // [rsp+10h] [rbp-40h]
*(_QWORD *)(a2 + 24) = 0LL;
*(_QWORD *)a2 = a6;
*(_QWORD *)(a2 + 8) = a7;
*(_QWORD *)(a2 + 16) = 1LL;
*(_QWORD *)(a2 + 80) = a8;
if ( a9 )
v14 = a9;
else
v14 = my_hash_sort;
*(_QWORD *)(a2 + 88) = v14;
*(_QWORD *)(a2 + 96) = a10;
*(_DWORD *)(a2 + 32) = a11;
*(_QWORD *)(a2 + 104) = a4;
v11 = a2 + 40;
v12 = 0;
if ( (a11 & 2) != 0 )
v12 = 0x10000;
return init_dynamic_array2(a1, v11, 0x10u, 0LL, a5, a3, v12);
}
| my_hash_init2:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV EAX,dword ptr [RBP + 0x30]
MOV RAX,qword ptr [RBP + 0x28]
MOV RAX,qword ptr [RBP + 0x20]
MOV RAX,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + 0x10]
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
JMP 0x0016b9d3
LAB_0016b9d3:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x18],0x0
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],0x1
MOV RCX,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x50],RCX
CMP qword ptr [RBP + 0x20],0x0
JZ 0x0016ba1f
MOV RAX,qword ptr [RBP + 0x20]
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0016ba2c
LAB_0016ba1f:
LEA RAX,[0x16b900]
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0016ba2c
LAB_0016ba2c:
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x58],RCX
MOV RCX,qword ptr [RBP + 0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x60],RCX
MOV ECX,dword ptr [RBP + 0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x20],ECX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x68],RCX
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x28
MOV RAX,qword ptr [RBP + -0x28]
MOV R8D,EAX
MOV R9D,dword ptr [RBP + -0x14]
MOV EDX,dword ptr [RBP + 0x30]
AND EDX,0x2
XOR EAX,EAX
MOV ECX,0x10000
CMP EDX,0x0
CMOVNZ EAX,ECX
MOV EAX,EAX
MOV EDX,0x10
XOR ECX,ECX
MOV qword ptr [RSP],RAX
CALL 0x00168340
MOV byte ptr [RBP + -0x31],AL
MOV AL,byte ptr [RBP + -0x31]
MOV byte ptr [RBP + -0x41],AL
MOV AL,byte ptr [RBP + -0x41]
ADD RSP,0x50
POP RBP
RET
|
int8
my_hash_init2(int4 param_1,int8 *param_2,int4 param_3,int8 param_4,
int4 param_5,int8 param_6,int8 param_7,int8 param_8,
code *param_9,int8 param_10,uint param_11)
{
int4 uVar1;
int8 uVar2;
code *local_48;
param_2[3] = 0;
*param_2 = param_6;
param_2[1] = param_7;
param_2[2] = 1;
param_2[10] = param_8;
if (param_9 == (code *)0x0) {
local_48 = my_hash_sort;
}
else {
local_48 = param_9;
}
param_2[0xb] = local_48;
param_2[0xc] = param_10;
*(uint *)(param_2 + 4) = param_11;
param_2[0xd] = param_4;
uVar1 = 0;
if ((param_11 & 2) != 0) {
uVar1 = 0x10000;
}
uVar2 = init_dynamic_array2(param_1,param_2 + 5,0x10,0,param_5,param_3,uVar1);
return uVar2;
}
| |
43,249 | bytes_remove_leading_zeros | corpus-core[P]colibri-stateless/src/util/bytes.c | bytes_t bytes_remove_leading_zeros(bytes_t data) {
while (data.len > 1 && data.data[0] == 0) {
data.len--;
data.data++;
}
return data;
} | O1 | c | bytes_remove_leading_zeros:
movl %edi, %eax
cmpl $0x2, %edi
jb 0x13573
leal -0x2(%rax), %ecx
leaq (%rsi,%rcx), %rdx
incq %rdx
cmpb $0x0, (%rsi)
jne 0x13573
decl %eax
incq %rsi
cmpl $0x1, %eax
ja 0x1355e
movl $0x1, %eax
retq
movq %rsi, %rdx
retq
| bytes_remove_leading_zeros:
mov eax, edi
cmp edi, 2
jb short loc_13573
lea ecx, [rax-2]
lea rdx, [rsi+rcx]
inc rdx
loc_1355E:
cmp byte ptr [rsi], 0
jnz short loc_13573
dec eax
inc rsi
cmp eax, 1
ja short loc_1355E
mov eax, 1
retn
loc_13573:
mov rdx, rsi
retn
| long long bytes_remove_leading_zeros(unsigned int a1, _BYTE *a2)
{
long long result; // rax
result = a1;
if ( a1 >= 2 )
{
while ( !*a2 )
{
result = (unsigned int)(result - 1);
++a2;
if ( (unsigned int)result <= 1 )
return 1LL;
}
}
return result;
}
| bytes_remove_leading_zeros:
MOV EAX,EDI
CMP EDI,0x2
JC 0x00113573
LEA ECX,[RAX + -0x2]
LEA RDX,[RSI + RCX*0x1]
INC RDX
LAB_0011355e:
CMP byte ptr [RSI],0x0
JNZ 0x00113573
DEC EAX
INC RSI
CMP EAX,0x1
JA 0x0011355e
MOV EAX,0x1
RET
LAB_00113573:
MOV RDX,RSI
RET
|
int1 [16] bytes_remove_leading_zeros(uint param_1,char *param_2)
{
uint uVar1;
ulong uVar2;
int1 auVar3 [16];
int1 auVar4 [16];
uVar2 = (ulong)param_1;
if (1 < param_1) {
auVar3._8_8_ = param_2 + (ulong)(param_1 - 2) + 1;
while (*param_2 == '\0') {
uVar1 = (int)uVar2 - 1;
uVar2 = (ulong)uVar1;
param_2 = param_2 + 1;
if (uVar1 < 2) {
auVar3._0_8_ = 1;
return auVar3;
}
}
}
auVar4._8_8_ = param_2;
auVar4._0_8_ = uVar2;
return auVar4;
}
| |
43,250 | ImPlot::SetupAxisLinks(int, double*, double*) | zkingston[P]unknot/build_O1/_deps/implot-src/implot.cpp | void SetupAxisLinks(ImAxis idx, double* min_lnk, double* max_lnk) {
ImPlotContext& gp = *GImPlot;
IM_ASSERT_USER_ERROR(gp.CurrentPlot != nullptr && !gp.CurrentPlot->SetupLocked,
"Setup needs to be called after BeginPlot and before any setup locking functions (e.g. PlotX)!");
ImPlotPlot& plot = *gp.CurrentPlot;
ImPlotAxis& axis = plot.Axes[idx];
IM_ASSERT_USER_ERROR(axis.Enabled, "Axis is not enabled! Did you forget to call SetupAxis()?");
axis.LinkedMin = min_lnk;
axis.LinkedMax = max_lnk;
axis.PullLinks();
} | O1 | cpp | ImPlot::SetupAxisLinks(int, double*, double*):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
movq 0x27e63e(%rip), %r15 # 0x336ca0
movq 0x50(%r15), %rax
testq %rax, %rax
je 0xb8674
cmpb $0x1, 0x9de(%rax)
jne 0xb8680
leaq 0x1dc8c9(%rip), %rdi # 0x294f44
callq 0x2161f4
movq 0x50(%r15), %rax
movslq %ebp, %rcx
imulq $0x178, %rcx, %rcx # imm = 0x178
leaq (%rax,%rcx), %r15
addq $0x18, %r15
cmpb $0x0, 0x16c(%r15)
jne 0xb86ac
leaq 0x1e1f4c(%rip), %rdi # 0x29a5f3
callq 0x2161f4
movq %r14, 0xc0(%r15)
movq %rbx, 0xc8(%r15)
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xc873e
| _ZN6ImPlot14SetupAxisLinksEiPdS0_:
push rbp
push r15
push r14
push rbx
push rax
mov rbx, rdx
mov r14, rsi
mov ebp, edi
mov r15, cs:GImPlot
mov rax, [r15+50h]
test rax, rax
jz short loc_B8674
cmp byte ptr [rax+9DEh], 1
jnz short loc_B8680
loc_B8674:
lea rdi, aSetupNeedsToBe; "Setup needs to be called after BeginPlo"...
call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*)
loc_B8680:
mov rax, [r15+50h]
movsxd rcx, ebp
imul rcx, 178h
lea r15, [rax+rcx]
add r15, 18h
cmp byte ptr [r15+16Ch], 0
jnz short loc_B86AC
lea rdi, aAxisIsNotEnabl; "Axis is not enabled! Did you forget to "...
call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*)
loc_B86AC:
mov [r15+0C0h], r14
mov [r15+0C8h], rbx
mov rdi, r15; this
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp _ZN10ImPlotAxis9PullLinksEv; ImPlotAxis::PullLinks(void)
| long long ImPlot::SetupAxisLinks(ImPlot *this, const char *a2, double *a3, double *a4)
{
ImGui *v5; // r15
long long v6; // rax
long long v7; // rax
long long v8; // rcx
ImPlotAxis *v9; // r15
v5 = GImPlot;
v6 = *((_QWORD *)GImPlot + 10);
if ( !v6 || *(_BYTE *)(v6 + 2526) == 1 )
ImGui::ErrorLog(
(ImGui *)"Setup needs to be called after BeginPlot and before any setup locking functions (e.g. PlotX)!",
a2);
v7 = *((_QWORD *)v5 + 10);
v8 = 376LL * (int)this;
v9 = (ImPlotAxis *)(v7 + v8 + 24);
if ( !*(_BYTE *)(v7 + v8 + 388) )
ImGui::ErrorLog((ImGui *)"Axis is not enabled! Did you forget to call SetupAxis()?", a2);
*((_QWORD *)v9 + 24) = a2;
*((_QWORD *)v9 + 25) = a3;
return ImPlotAxis::PullLinks(v9);
}
| SetupAxisLinks:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RSI
MOV EBP,EDI
MOV R15,qword ptr [0x00436ca0]
MOV RAX,qword ptr [R15 + 0x50]
TEST RAX,RAX
JZ 0x001b8674
CMP byte ptr [RAX + 0x9de],0x1
JNZ 0x001b8680
LAB_001b8674:
LEA RDI,[0x394f44]
CALL 0x003161f4
LAB_001b8680:
MOV RAX,qword ptr [R15 + 0x50]
MOVSXD RCX,EBP
IMUL RCX,RCX,0x178
LEA R15,[RAX + RCX*0x1]
ADD R15,0x18
CMP byte ptr [R15 + 0x16c],0x0
JNZ 0x001b86ac
LEA RDI,[0x39a5f3]
CALL 0x003161f4
LAB_001b86ac:
MOV qword ptr [R15 + 0xc0],R14
MOV qword ptr [R15 + 0xc8],RBX
MOV RDI,R15
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x001c873e
|
/* ImPlot::SetupAxisLinks(int, double*, double*) */
void ImPlot::SetupAxisLinks(int param_1,double *param_2,double *param_3)
{
long lVar1;
lVar1 = GImPlot;
if ((*(long *)(GImPlot + 0x50) == 0) || (*(char *)(*(long *)(GImPlot + 0x50) + 0x9de) == '\x01'))
{
ImGui::ErrorLog(
"Setup needs to be called after BeginPlot and before any setup locking functions (e.g. PlotX)!"
);
}
lVar1 = *(long *)(lVar1 + 0x50) + (long)param_1 * 0x178;
if (*(char *)(lVar1 + 0x184) == '\0') {
ImGui::ErrorLog("Axis is not enabled! Did you forget to call SetupAxis()?");
}
*(double **)(lVar1 + 0xd8) = param_2;
*(double **)(lVar1 + 0xe0) = param_3;
ImPlotAxis::PullLinks((ImPlotAxis *)(lVar1 + 0x18));
return;
}
| |
43,251 | google::protobuf::EnumDescriptorProto* google::protobuf::Arena::CreateMaybeMessage<google::protobuf::EnumDescriptorProto>(google::protobuf::Arena*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc | PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto*
Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto >(Arena* arena) {
return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::EnumDescriptorProto >(arena);
} | O0 | cpp | google::protobuf::EnumDescriptorProto* google::protobuf::Arena::CreateMaybeMessage<google::protobuf::EnumDescriptorProto>(google::protobuf::Arena*):
subq $0xb8, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
jne 0xd17af
movl $0x70, %edi
callq 0x13450
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x10(%rsp)
xorl %edx, %edx
movl %edx, %esi
callq 0xb6770
jmp 0xd17a0
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
callq 0x13400
movq 0x38(%rsp), %rdi
callq 0x13750
movq 0x10(%rsp), %rax
movq %rax, 0x28(%rsp)
jmp 0xd1963
movq 0x20(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq %rax, (%rsp)
movq %rax, 0x98(%rsp)
movq $0x70, 0x90(%rsp)
movq $0x8, 0x88(%rsp)
movq $0x0, 0x80(%rsp)
leaq 0x1a795b(%rip), %rax # 0x279150
movq %rax, 0x78(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x80(%rsp)
jne 0xd183e
movq 0x8(%rsp), %rdi
movq 0x90(%rsp), %rsi
movq 0x88(%rsp), %rdx
movq 0x78(%rsp), %rcx
callq 0xdf5f0
movq %rax, 0xa0(%rsp)
jmp 0xd1943
cmpq $0x8, 0x88(%rsp)
ja 0xd18a2
movq 0x90(%rsp), %rdi
callq 0xdf6a0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq 0x78(%rsp), %rdx
callq 0x1816c0
movq %rax, 0x68(%rsp)
movq %rdx, 0x70(%rsp)
movq 0x68(%rsp), %rcx
movq 0x70(%rsp), %rax
movq %rcx, (%rax)
movq 0x80(%rsp), %rcx
movq 0x70(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x68(%rsp), %rax
movq %rax, 0xa0(%rsp)
jmp 0xd1943
movq 0x8(%rsp), %rdi
movq 0x90(%rsp), %rsi
addq 0x88(%rsp), %rsi
subq $0x8, %rsi
movq 0x78(%rsp), %rdx
callq 0x1816c0
movq %rax, 0x58(%rsp)
movq %rdx, 0x60(%rsp)
movq 0x58(%rsp), %rcx
movq 0x88(%rsp), %rax
movq %rcx, 0xb0(%rsp)
movq %rax, 0xa8(%rsp)
movq 0xb0(%rsp), %rax
addq 0xa8(%rsp), %rax
subq $0x1, %rax
movq 0xa8(%rsp), %rcx
xorq $-0x1, %rcx
addq $0x1, %rcx
andq %rcx, %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rcx
movq 0x60(%rsp), %rax
movq %rcx, (%rax)
movq 0x80(%rsp), %rcx
movq 0x60(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x50(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq (%rsp), %rax
movq 0xa0(%rsp), %rdi
movq %rax, 0x40(%rsp)
leaq 0x40(%rsp), %rsi
callq 0xe3c90
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
addq $0xb8, %rsp
retq
| _ZN6google8protobuf5Arena18CreateMaybeMessageINS0_19EnumDescriptorProtoEJEEEPT_PS1_DpOT0_:
sub rsp, 0B8h
mov [rsp+0B8h+var_A0], rdi
mov rax, [rsp+0B8h+var_A0]
mov [rsp+0B8h+var_98], rax
cmp [rsp+0B8h+var_98], 0
jnz short loc_D17AF
mov edi, 70h ; 'p'; unsigned __int64
call __Znwm; operator new(ulong)
mov rdi, rax; this
mov rax, rdi
mov [rsp+0B8h+var_A8], rax
xor edx, edx; bool
mov esi, edx; google::protobuf::Arena *
call _ZN6google8protobuf19EnumDescriptorProtoC2EPNS0_5ArenaEb; google::protobuf::EnumDescriptorProto::EnumDescriptorProto(google::protobuf::Arena *,bool)
jmp short loc_D17A0
mov rdi, [rsp+arg_8]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_30], rcx
mov [rsp+arg_2C], eax
call __ZdlPv; operator delete(void *)
mov rdi, [rsp+arg_30]
call __Unwind_Resume
loc_D17A0:
mov rax, [rsp+0B8h+var_A8]
mov [rsp+0B8h+var_90], rax
jmp loc_D1963
loc_D17AF:
mov rax, [rsp+0B8h+var_98]
mov [rsp+0B8h+var_70], rax
mov rax, [rsp+0B8h+var_70]
mov [rsp+0B8h+var_B8], rax
mov [rsp+0B8h+var_20], rax
mov [rsp+0B8h+var_28], 70h ; 'p'
mov [rsp+0B8h+var_30], 8
mov [rsp+0B8h+var_38], 0
lea rax, _ZTIN6google8protobuf19EnumDescriptorProtoE; `typeinfo for'google::protobuf::EnumDescriptorProto
mov [rsp+0B8h+var_40], rax
mov rax, [rsp+0B8h+var_20]
mov [rsp+0B8h+var_B0], rax
cmp [rsp+0B8h+var_38], 0
jnz short loc_D183E
mov rdi, [rsp+0B8h+var_B0]; this
mov rsi, [rsp+0B8h+var_28]; unsigned __int64
mov rdx, [rsp+0B8h+var_30]; unsigned __int64
mov rcx, [rsp+0B8h+var_40]; type_info *
call _ZN6google8protobuf5Arena23AllocateAlignedWithHookEmmPKSt9type_info; google::protobuf::Arena::AllocateAlignedWithHook(ulong,ulong,std::type_info const*)
mov [rsp+0B8h+var_18], rax
jmp loc_D1943
loc_D183E:
cmp [rsp+0B8h+var_30], 8
ja short loc_D18A2
mov rdi, [rsp+0B8h+var_28]; this
call _ZN6google8protobuf8internal10AlignUpTo8Em; google::protobuf::internal::AlignUpTo8(ulong)
mov rdi, [rsp+0B8h+var_B0]; this
mov rsi, rax; unsigned __int64
mov rdx, [rsp+0B8h+var_40]; type_info *
call _ZN6google8protobuf5Arena26AllocateAlignedWithCleanupEmPKSt9type_info; google::protobuf::Arena::AllocateAlignedWithCleanup(ulong,std::type_info const*)
mov [rsp+0B8h+var_50], rax
mov [rsp+0B8h+var_48], rdx
mov rcx, [rsp+0B8h+var_50]
mov rax, [rsp+0B8h+var_48]
mov [rax], rcx
mov rcx, [rsp+0B8h+var_38]
mov rax, [rsp+0B8h+var_48]
mov [rax+8], rcx
mov rax, [rsp+0B8h+var_50]
mov [rsp+0B8h+var_18], rax
jmp loc_D1943
loc_D18A2:
mov rdi, [rsp+0B8h+var_B0]; this
mov rsi, [rsp+0B8h+var_28]
add rsi, [rsp+0B8h+var_30]
sub rsi, 8; unsigned __int64
mov rdx, [rsp+0B8h+var_40]; type_info *
call _ZN6google8protobuf5Arena26AllocateAlignedWithCleanupEmPKSt9type_info; google::protobuf::Arena::AllocateAlignedWithCleanup(ulong,std::type_info const*)
mov [rsp+0B8h+var_60], rax
mov [rsp+0B8h+var_58], rdx
mov rcx, [rsp+0B8h+var_60]
mov rax, [rsp+0B8h+var_30]
mov [rsp+0B8h+var_8], rcx
mov [rsp+0B8h+var_10], rax
mov rax, [rsp+0B8h+var_8]
add rax, [rsp+0B8h+var_10]
sub rax, 1
mov rcx, [rsp+0B8h+var_10]
xor rcx, 0FFFFFFFFFFFFFFFFh
add rcx, 1
and rax, rcx
mov [rsp+0B8h+var_68], rax
mov rcx, [rsp+0B8h+var_68]
mov rax, [rsp+0B8h+var_58]
mov [rax], rcx
mov rcx, [rsp+0B8h+var_38]
mov rax, [rsp+0B8h+var_58]
mov [rax+8], rcx
mov rax, [rsp+0B8h+var_68]
mov [rsp+0B8h+var_18], rax
loc_D1943:
mov rax, [rsp+0B8h+var_B8]
mov rdi, [rsp+0B8h+var_18]
mov [rsp+0B8h+var_78], rax
lea rsi, [rsp+0B8h+var_78]
call _ZN6google8protobuf5Arena14InternalHelperINS0_19EnumDescriptorProtoEE9ConstructIJPS1_EEEPS3_PvDpOT_; google::protobuf::Arena::InternalHelper<google::protobuf::EnumDescriptorProto>::Construct<google::protobuf::Arena*>(void *,google::protobuf::Arena* &&)
mov [rsp+0B8h+var_90], rax
loc_D1963:
mov rax, [rsp+0B8h+var_90]
add rsp, 0B8h
retn
| google::protobuf::EnumDescriptorProto * google::protobuf::Arena::CreateMaybeMessage<google::protobuf::EnumDescriptorProto>(
google::protobuf::Arena *a1)
{
google::protobuf::EnumDescriptorProto *v2; // [rsp+10h] [rbp-A8h]
_QWORD v4[12]; // [rsp+40h] [rbp-78h] BYREF
long long AlignedWithHook; // [rsp+A0h] [rbp-18h]
if ( a1 )
{
v4[1] = a1;
v4[11] = a1;
v4[10] = 112LL;
v4[9] = 8LL;
v4[8] = 0LL;
v4[7] = &`typeinfo for'google::protobuf::EnumDescriptorProto;
AlignedWithHook = google::protobuf::Arena::AllocateAlignedWithHook(
a1,
0x70uLL,
8uLL,
(const type_info *)&`typeinfo for'google::protobuf::EnumDescriptorProto);
v4[0] = a1;
return (google::protobuf::EnumDescriptorProto *)google::protobuf::Arena::InternalHelper<google::protobuf::EnumDescriptorProto>::Construct<google::protobuf::Arena*>(
AlignedWithHook,
v4);
}
else
{
v2 = (google::protobuf::EnumDescriptorProto *)operator new(0x70uLL);
google::protobuf::EnumDescriptorProto::EnumDescriptorProto(v2, 0LL, 0);
return v2;
}
}
| CreateMaybeMessage<google::protobuf::EnumDescriptorProto>:
SUB RSP,0xb8
MOV qword ptr [RSP + 0x18],RDI
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x20],RAX
CMP qword ptr [RSP + 0x20],0x0
JNZ 0x001d17af
MOV EDI,0x70
CALL 0x00113450
MOV RDI,RAX
MOV RAX,RDI
MOV qword ptr [RSP + 0x10],RAX
LAB_001d1773:
XOR EDX,EDX
MOV ESI,EDX
CALL 0x001b6770
LAB_001d177c:
JMP 0x001d17a0
LAB_001d17a0:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x28],RAX
JMP 0x001d1963
LAB_001d17af:
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x48],RAX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x98],RAX
MOV qword ptr [RSP + 0x90],0x70
MOV qword ptr [RSP + 0x88],0x8
MOV qword ptr [RSP + 0x80],0x0
LEA RAX,[0x379150]
MOV qword ptr [RSP + 0x78],RAX
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x8],RAX
CMP qword ptr [RSP + 0x80],0x0
JNZ 0x001d183e
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x90]
MOV RDX,qword ptr [RSP + 0x88]
MOV RCX,qword ptr [RSP + 0x78]
CALL 0x001df5f0
MOV qword ptr [RSP + 0xa0],RAX
JMP 0x001d1943
LAB_001d183e:
CMP qword ptr [RSP + 0x88],0x8
JA 0x001d18a2
MOV RDI,qword ptr [RSP + 0x90]
CALL 0x001df6a0
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,RAX
MOV RDX,qword ptr [RSP + 0x78]
CALL 0x002816c0
MOV qword ptr [RSP + 0x68],RAX
MOV qword ptr [RSP + 0x70],RDX
MOV RCX,qword ptr [RSP + 0x68]
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + 0x80]
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0xa0],RAX
JMP 0x001d1943
LAB_001d18a2:
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x90]
ADD RSI,qword ptr [RSP + 0x88]
SUB RSI,0x8
MOV RDX,qword ptr [RSP + 0x78]
CALL 0x002816c0
MOV qword ptr [RSP + 0x58],RAX
MOV qword ptr [RSP + 0x60],RDX
MOV RCX,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RSP + 0x88]
MOV qword ptr [RSP + 0xb0],RCX
MOV qword ptr [RSP + 0xa8],RAX
MOV RAX,qword ptr [RSP + 0xb0]
ADD RAX,qword ptr [RSP + 0xa8]
SUB RAX,0x1
MOV RCX,qword ptr [RSP + 0xa8]
XOR RCX,-0x1
ADD RCX,0x1
AND RAX,RCX
MOV qword ptr [RSP + 0x50],RAX
MOV RCX,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RSP + 0x80]
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0xa0],RAX
LAB_001d1943:
MOV RAX,qword ptr [RSP]
MOV RDI,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x40],RAX
LEA RSI,[RSP + 0x40]
CALL 0x001e3c90
MOV qword ptr [RSP + 0x28],RAX
LAB_001d1963:
MOV RAX,qword ptr [RSP + 0x28]
ADD RSP,0xb8
RET
|
/* WARNING: Removing unreachable block (ram,0x001d183e) */
/* WARNING: Removing unreachable block (ram,0x001d1849) */
/* WARNING: Removing unreachable block (ram,0x001d18a2) */
/* google::protobuf::EnumDescriptorProto*
google::protobuf::Arena::CreateMaybeMessage<google::protobuf::EnumDescriptorProto>(google::protobuf::Arena*)
*/
EnumDescriptorProto *
google::protobuf::Arena::CreateMaybeMessage<google::protobuf::EnumDescriptorProto>(Arena *param_1)
{
EnumDescriptorProto *local_90;
Arena *local_78;
Arena *local_70;
pointer_____offset_0x10___ *local_40;
int8 local_38;
int8 local_30;
int8 local_28;
Arena *local_20;
void *local_18;
if (param_1 == (Arena *)0x0) {
local_90 = (EnumDescriptorProto *)operator_new(0x70);
/* try { // try from 001d1773 to 001d177b has its CatchHandler @ 001d177e */
EnumDescriptorProto::EnumDescriptorProto(local_90,(Arena *)0x0,false);
}
else {
local_28 = 0x70;
local_30 = 8;
local_38 = 0;
local_40 = &EnumDescriptorProto::typeinfo;
local_70 = param_1;
local_20 = param_1;
local_18 = (void *)AllocateAlignedWithHook
(param_1,0x70,8,(type_info *)&EnumDescriptorProto::typeinfo);
local_78 = param_1;
local_90 = InternalHelper<google::protobuf::EnumDescriptorProto>::
Construct<google::protobuf::Arena*>(local_18,&local_78);
}
return local_90;
}
| |
43,252 | YAML::detail::node_iterator_base<YAML::detail::node>::operator++() | aimrt_mujoco_sim/_deps/yaml-cpp-src/include/yaml-cpp/node/detail/node_iterator.h | node_iterator_base<V>& operator++() {
switch (m_type) {
case iterator_type::NoneType:
break;
case iterator_type::Sequence:
++m_seqIt;
break;
case iterator_type::Map:
++m_mapIt;
m_mapIt = increment_until_defined(m_mapIt);
break;
}
return *this;
} | O3 | c | YAML::detail::node_iterator_base<YAML::detail::node>::operator++():
movq %rdi, %rax
movl (%rdi), %ecx
cmpl $0x2, %ecx
je 0x37397
cmpl $0x1, %ecx
jne 0x37396
addq $0x8, 0x8(%rax)
retq
movq 0x10(%rax), %rcx
movq 0x18(%rax), %rdx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x373ce
movq (%rcx), %rsi
movq (%rsi), %rsi
movq (%rsi), %rsi
cmpb $0x1, (%rsi)
jne 0x373c5
movq 0x8(%rcx), %rsi
movq (%rsi), %rsi
movq (%rsi), %rsi
cmpb $0x0, (%rsi)
jne 0x373ce
addq $0x10, %rcx
cmpq %rdx, %rcx
jne 0x373a8
movq %rcx, 0x10(%rax)
retq
nop
| _ZN4YAML6detail18node_iterator_baseINS0_4nodeEEppEv:
mov rax, rdi
mov ecx, [rdi]
cmp ecx, 2
jz short loc_37397
cmp ecx, 1
jnz short locret_37396
add qword ptr [rax+8], 8
locret_37396:
retn
loc_37397:
mov rcx, [rax+10h]
mov rdx, [rax+18h]
add rcx, 10h
cmp rdx, rcx
jz short loc_373CE
loc_373A8:
mov rsi, [rcx]
mov rsi, [rsi]
mov rsi, [rsi]
cmp byte ptr [rsi], 1
jnz short loc_373C5
mov rsi, [rcx+8]
mov rsi, [rsi]
mov rsi, [rsi]
cmp byte ptr [rsi], 0
jnz short loc_373CE
loc_373C5:
add rcx, 10h
cmp rcx, rdx
jnz short loc_373A8
loc_373CE:
mov [rax+10h], rcx
retn
| long long YAML::detail::node_iterator_base<YAML::detail::node>::operator++(long long a1)
{
long long result; // rax
_BYTE ****v2; // rdx
_BYTE ****i; // rcx
result = a1;
if ( *(_DWORD *)a1 == 2 )
{
v2 = *(_BYTE *****)(a1 + 24);
for ( i = (_BYTE ****)(*(_QWORD *)(a1 + 16) + 16LL); i != v2; i += 2 )
{
if ( ****i == 1 && ***i[1] )
break;
}
*(_QWORD *)(a1 + 16) = i;
}
else if ( *(_DWORD *)a1 == 1 )
{
*(_QWORD *)(a1 + 8) += 8LL;
}
return result;
}
| operator++:
MOV RAX,RDI
MOV ECX,dword ptr [RDI]
CMP ECX,0x2
JZ 0x00137397
CMP ECX,0x1
JNZ 0x00137396
ADD qword ptr [RAX + 0x8],0x8
LAB_00137396:
RET
LAB_00137397:
MOV RCX,qword ptr [RAX + 0x10]
MOV RDX,qword ptr [RAX + 0x18]
ADD RCX,0x10
CMP RDX,RCX
JZ 0x001373ce
LAB_001373a8:
MOV RSI,qword ptr [RCX]
MOV RSI,qword ptr [RSI]
MOV RSI,qword ptr [RSI]
CMP byte ptr [RSI],0x1
JNZ 0x001373c5
MOV RSI,qword ptr [RCX + 0x8]
MOV RSI,qword ptr [RSI]
MOV RSI,qword ptr [RSI]
CMP byte ptr [RSI],0x0
JNZ 0x001373ce
LAB_001373c5:
ADD RCX,0x10
CMP RCX,RDX
JNZ 0x001373a8
LAB_001373ce:
MOV qword ptr [RAX + 0x10],RCX
RET
|
/* YAML::detail::node_iterator_base<YAML::detail::node>::TEMPNAMEPLACEHOLDERVALUE() */
void __thiscall
YAML::detail::node_iterator_base<YAML::detail::node>::operator++
(node_iterator_base<YAML::detail::node> *this)
{
int8 *puVar1;
int8 *puVar2;
if (*(int *)this != 2) {
if (*(int *)this == 1) {
*(long *)(this + 8) = *(long *)(this + 8) + 8;
}
return;
}
puVar2 = *(int8 **)(this + 0x10);
do {
puVar1 = puVar2;
puVar2 = puVar1 + 2;
if (*(int8 **)(this + 0x18) == puVar2) break;
} while ((*(char *)**(int8 **)*puVar2 != '\x01') ||
(*(char *)**(int8 **)puVar1[3] == '\0'));
*(int8 **)(this + 0x10) = puVar2;
return;
}
| |
43,253 | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2(char*, int&, int&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp) | monkey531[P]llama/common/json.hpp | inline void grisu2(char* buf, int& len, int& decimal_exponent,
diyfp m_minus, diyfp v, diyfp m_plus)
{
JSON_ASSERT(m_plus.e == m_minus.e);
JSON_ASSERT(m_plus.e == v.e);
// --------(-----------------------+-----------------------)-------- (A)
// m- v m+
//
// --------------------(-----------+-----------------------)-------- (B)
// m- v m+
//
// First scale v (and m- and m+) such that the exponent is in the range
// [alpha, gamma].
const cached_power cached = get_cached_power_for_binary_exponent(m_plus.e);
const diyfp c_minus_k(cached.f, cached.e); // = c ~= 10^-k
// The exponent of the products is = v.e + c_minus_k.e + q and is in the range [alpha,gamma]
const diyfp w = diyfp::mul(v, c_minus_k);
const diyfp w_minus = diyfp::mul(m_minus, c_minus_k);
const diyfp w_plus = diyfp::mul(m_plus, c_minus_k);
// ----(---+---)---------------(---+---)---------------(---+---)----
// w- w w+
// = c*m- = c*v = c*m+
//
// diyfp::mul rounds its result and c_minus_k is approximated too. w, w- and
// w+ are now off by a small amount.
// In fact:
//
// w - v * 10^k < 1 ulp
//
// To account for this inaccuracy, add resp. subtract 1 ulp.
//
// --------+---[---------------(---+---)---------------]---+--------
// w- M- w M+ w+
//
// Now any number in [M-, M+] (bounds included) will round to w when input,
// regardless of how the input rounding algorithm breaks ties.
//
// And digit_gen generates the shortest possible such number in [M-, M+].
// Note that this does not mean that Grisu2 always generates the shortest
// possible number in the interval (m-, m+).
const diyfp M_minus(w_minus.f + 1, w_minus.e);
const diyfp M_plus (w_plus.f - 1, w_plus.e );
decimal_exponent = -cached.k; // = -(-k) = k
grisu2_digit_gen(buf, len, decimal_exponent, M_minus, w, M_plus);
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2(char*, int&, int&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rcx, 0x58(%rsp)
movl %r8d, 0x60(%rsp)
cmpl %r8d, 0xc8(%rsp)
jne 0x89150
movq %rdi, 0x20(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
leaq 0xb0(%rsp), %r13
cmpl %r8d, 0x8(%r13)
jne 0x8916c
movl %r8d, %edi
callq 0x89225
movq %rdx, %r12
leaq 0x68(%rsp), %r14
movq %rax, (%r14)
movl %r12d, 0x8(%r14)
movq %r13, %rdi
movq %r14, %rsi
callq 0x8935a
movq %rax, %r15
movl %edx, %ebx
leaq 0x58(%rsp), %rdi
movq %r14, %rsi
callq 0x8935a
movq %rax, %r13
movl %edx, %ebp
leaq 0xc0(%rsp), %rdi
movq %r14, %rsi
callq 0x8935a
incq %r13
decq %rax
shrq $0x20, %r12
negl %r12d
movq 0x30(%rsp), %rcx
movl %r12d, (%rcx)
movq %r15, 0x48(%rsp)
movl %ebx, 0x50(%rsp)
movq %rax, 0x38(%rsp)
movl %edx, 0x40(%rsp)
movups 0x38(%rsp), %xmm0
movups %xmm0, 0x10(%rsp)
movups 0x48(%rsp), %xmm0
movups %xmm0, (%rsp)
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq %rcx, %rdx
movq %r13, %rcx
movl %ebp, %r8d
callq 0x893b6
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x27da5(%rip), %rdi # 0xb0efc
leaq 0x220d6(%rip), %rdx # 0xab234
leaq 0x2d5a0(%rip), %rcx # 0xb6705
movl $0x454b, %esi # imm = 0x454B
jmp 0x89186
leaq 0x27d89(%rip), %rdi # 0xb0efc
leaq 0x220ba(%rip), %rdx # 0xab234
leaq 0x2d59a(%rip), %rcx # 0xb671b
movl $0x454c, %esi # imm = 0x454C
xorl %eax, %eax
callq 0x23eb0
nop
| _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl6grisu2EPcRiS4_NS2_5diyfpES5_S5_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov [rsp+0A8h+var_50], rcx
mov [rsp+0A8h+var_48], r8d
cmp [rsp+0A8h+arg_18], r8d
jnz loc_89150
mov [rsp+0A8h+var_88], rdi
mov [rsp+0A8h+var_80], rsi
mov [rsp+0A8h+var_78], rdx
lea r13, [rsp+0A8h+arg_0]
cmp [r13+8], r8d
jnz loc_8916C
mov edi, r8d; this
call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl36get_cached_power_for_binary_exponentEi; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)
mov r12, rdx
lea r14, [rsp+0A8h+var_40]
mov [r14], rax
mov [r14+8], r12d
mov rdi, r13
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3mulERKS3_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&)
mov r15, rax
mov ebx, edx
lea rdi, [rsp+0A8h+var_50]
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3mulERKS3_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&)
mov r13, rax
mov ebp, edx
lea rdi, [rsp+0A8h+arg_10]
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3mulERKS3_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&)
inc r13
dec rax
shr r12, 20h
neg r12d
mov rcx, [rsp+0A8h+var_78]
mov [rcx], r12d
mov qword ptr [rsp+0A8h+var_60], r15
mov dword ptr [rsp+0A8h+var_60+8], ebx
mov qword ptr [rsp+0A8h+var_70], rax
mov dword ptr [rsp+0A8h+var_70+8], edx
movups xmm0, [rsp+0A8h+var_70]
movups [rsp+0A8h+var_98], xmm0
movups xmm0, [rsp+0A8h+var_60]
movups [rsp+0A8h+var_A8], xmm0
mov rdi, [rsp+0A8h+var_88]
mov rsi, [rsp+0A8h+var_80]
mov rdx, rcx
mov rcx, r13
mov r8d, ebp
call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl16grisu2_digit_genEPcRiS4_NS2_5diyfpES5_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen(char *,int &,int &,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp)
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_89150:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMPlusEMMinusE; "m_plus.e == m_minus.e"
mov esi, 454Bh
jmp short loc_89186
loc_8916C:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMPlusEVE; "m_plus.e == v.e"
mov esi, 454Ch
loc_89186:
xor eax, eax
call _ggml_abort
nop
| long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2(
int a1,
int a2,
_DWORD *a3,
long long a4,
unsigned int a5,
long long a6,
char a7,
int a8,
char a9,
int a10)
{
long long cached_power_for_binary_exponent; // rax
int v11; // rdx^4
int v12; // r12^4
int v13; // edx
char v14; // r15
int v15; // edx
int v16; // ebx
int v17; // r13d
int v18; // edx
int v19; // ebp
char v20; // al
int v21; // edx
int v22; // r9d
long long v25; // [rsp+58h] [rbp-50h] BYREF
unsigned int v26; // [rsp+60h] [rbp-48h]
long long v27; // [rsp+68h] [rbp-40h] BYREF
int v28; // [rsp+70h] [rbp-38h]
v25 = a4;
v26 = a5;
if ( a10 == a5 )
{
if ( a8 == a5 )
{
cached_power_for_binary_exponent = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(
(nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)a5,
a2);
v12 = v11;
v27 = cached_power_for_binary_exponent;
v28 = v13;
v14 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(&a7, &v27);
v16 = v15;
v17 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(&v25, &v27);
v19 = v18;
v20 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(&a9, &v27);
*a3 = -v12;
return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen(
a1,
a2,
(_DWORD)a3,
v17 + 1,
v19,
v22,
v14,
v16,
v20 - 1,
v21);
}
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17740LL,
"GGML_ASSERT(%s) failed",
"m_plus.e == v.e");
}
else
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17739LL,
"GGML_ASSERT(%s) failed",
"m_plus.e == m_minus.e");
}
return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp");
}
| grisu2:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV qword ptr [RSP + 0x58],RCX
MOV dword ptr [RSP + 0x60],R8D
CMP dword ptr [RSP + 0xc8],R8D
JNZ 0x00189150
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x30],RDX
LEA R13,[RSP + 0xb0]
CMP dword ptr [R13 + 0x8],R8D
JNZ 0x0018916c
MOV EDI,R8D
CALL 0x00189225
MOV R12,RDX
LEA R14,[RSP + 0x68]
MOV qword ptr [R14],RAX
MOV dword ptr [R14 + 0x8],R12D
MOV RDI,R13
MOV RSI,R14
CALL 0x0018935a
MOV R15,RAX
MOV EBX,EDX
LEA RDI,[RSP + 0x58]
MOV RSI,R14
CALL 0x0018935a
MOV R13,RAX
MOV EBP,EDX
LEA RDI,[RSP + 0xc0]
MOV RSI,R14
CALL 0x0018935a
INC R13
DEC RAX
SHR R12,0x20
NEG R12D
MOV RCX,qword ptr [RSP + 0x30]
MOV dword ptr [RCX],R12D
MOV qword ptr [RSP + 0x48],R15
MOV dword ptr [RSP + 0x50],EBX
MOV qword ptr [RSP + 0x38],RAX
MOV dword ptr [RSP + 0x40],EDX
MOVUPS XMM0,xmmword ptr [RSP + 0x38]
MOVUPS xmmword ptr [RSP + 0x10],XMM0
MOVUPS XMM0,xmmword ptr [RSP + 0x48]
MOVUPS xmmword ptr [RSP],XMM0
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,RCX
MOV RCX,R13
MOV R8D,EBP
CALL 0x001893b6
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00189150:
LEA RDI,[0x1b0efc]
LEA RDX,[0x1ab234]
LEA RCX,[0x1b6705]
MOV ESI,0x454b
JMP 0x00189186
LAB_0018916c:
LEA RDI,[0x1b0efc]
LEA RDX,[0x1ab234]
LEA RCX,[0x1b671b]
MOV ESI,0x454c
LAB_00189186:
XOR EAX,EAX
CALL 0x00123eb0
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2(char*, int&, int&,
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp,
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp,
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp) */
void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2
(int8 param_1,int8 param_2,int *param_3,int8 param_4,int param_5,
int8 param_6,int8 param_7,int param_8,int8 param_9,int param_10)
{
int4 uVar1;
char *pcVar2;
int4 extraout_EDX;
int8 uVar3;
int1 auVar4 [16];
int1 auVar5 [12];
int1 auVar6 [12];
int4 uStack_64;
int8 local_50;
int local_48;
int8 local_40;
int4 local_38;
local_50 = param_4;
local_48 = param_5;
if (param_10 == param_5) {
if (param_8 == param_5) {
auVar4 = get_cached_power_for_binary_exponent(param_5);
local_40 = auVar4._0_8_;
local_38 = auVar4._8_4_;
uVar1 = diyfp::mul((diyfp *)¶m_7,(diyfp *)&local_40);
auVar5 = diyfp::mul((diyfp *)&local_50,(diyfp *)&local_40);
auVar6 = diyfp::mul((diyfp *)¶m_9,(diyfp *)&local_40);
*param_3 = -auVar4._12_4_;
grisu2_digit_gen(param_1,param_2,param_3,auVar5._0_8_ + 1,auVar5._8_4_,param_6,uVar1,
extraout_EDX,auVar6._0_8_ + -1,CONCAT44(uStack_64,auVar6._8_4_));
return;
}
pcVar2 = "m_plus.e == v.e";
uVar3 = 0x454c;
}
else {
pcVar2 = "m_plus.e == m_minus.e";
uVar3 = 0x454b;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar3,
"GGML_ASSERT(%s) failed",pcVar2);
}
| |
43,254 | ggml_compute_forward_leaky_relu | llama.cpp/ggml/src/ggml-cpu/ops.cpp | void ggml_compute_forward_leaky_relu(
const ggml_compute_params * params,
ggml_tensor * dst) {
const ggml_tensor * src0 = dst->src[0];
switch (src0->type) {
case GGML_TYPE_F32:
{
ggml_compute_forward_leaky_relu_f32(params, dst);
} break;
case GGML_TYPE_F16:
{
ggml_compute_forward_leaky_relu_f16(params, dst);
} break;
default:
{
GGML_ABORT("fatal error");
}
}
} | O3 | cpp | ggml_compute_forward_leaky_relu:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq 0x98(%rsi), %rbx
movl (%rbx), %eax
cmpl $0x1, %eax
je 0x380ba
testl %eax, %eax
jne 0x38155
cmpl $0x0, (%rdi)
jne 0x3814d
movq %rbx, %rdi
callq 0xaa40
testl %eax, %eax
jle 0x3814d
vmovss 0x54(%r14), %xmm0
movq 0x10(%rbx), %rcx
movq 0x38(%rbx), %rdx
movq 0x38(%r14), %rsi
movq 0xf8(%r14), %rdi
movq 0xf8(%rbx), %r8
movl $0x7fffffff, %r10d # imm = 0x7FFFFFFF
movq %rcx, %r9
andq %r10, %r9
andq %r10, %rax
xorl %r10d, %r10d
vxorps %xmm1, %xmm1, %xmm1
testl %ecx, %ecx
jle 0x380a7
xorl %r11d, %r11d
vmovss (%r8,%r11,4), %xmm2
vmaxss %xmm1, %xmm2, %xmm3
vminss %xmm1, %xmm2, %xmm2
vfmadd213ss %xmm3, %xmm0, %xmm2 # xmm2 = (xmm0 * xmm2) + xmm3
vmovss %xmm2, (%rdi,%r11,4)
incq %r11
cmpq %r11, %r9
jne 0x38086
incq %r10
addq %rsi, %rdi
addq %rdx, %r8
cmpq %rax, %r10
jne 0x3807f
jmp 0x3814d
cmpl $0x0, (%rdi)
jne 0x3814d
movq %rbx, %rdi
callq 0xaa40
testl %eax, %eax
jle 0x3814d
vmovss 0x54(%r14), %xmm0
movq 0x10(%rbx), %rcx
movq 0x38(%rbx), %rdx
movq 0x38(%r14), %rsi
movq 0xf8(%r14), %rdi
movq 0xf8(%rbx), %r8
movl $0x7fffffff, %r10d # imm = 0x7FFFFFFF
movq %rcx, %r9
andq %r10, %r9
andq %r10, %rax
xorl %r10d, %r10d
movq 0x44e58(%rip), %r11 # 0x7cf60
vxorps %xmm1, %xmm1, %xmm1
testl %ecx, %ecx
jle 0x3813f
xorl %ebx, %ebx
movzwl (%r8,%rbx,2), %r14d
vmovss (%r11,%r14,4), %xmm2
vmaxss %xmm1, %xmm2, %xmm3
vminss %xmm1, %xmm2, %xmm2
vfmadd213ss %xmm3, %xmm0, %xmm2 # xmm2 = (xmm0 * xmm2) + xmm3
vcvtps2ph $0x0, %xmm2, %xmm2
vpextrw $0x0, %xmm2, (%rdi,%rbx,2)
incq %rbx
cmpq %rbx, %r9
jne 0x38112
incq %r10
addq %rsi, %rdi
addq %rdx, %r8
cmpq %rax, %r10
jne 0x3810c
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x3a884(%rip), %rdi # 0x729e0
leaq 0x304fd(%rip), %rdx # 0x68660
movl $0xbaf, %esi # imm = 0xBAF
xorl %eax, %eax
callq 0xaf60
| ggml_compute_forward_leaky_relu:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, [rsi+98h]
mov eax, [rbx]
cmp eax, 1
jz loc_380BA
test eax, eax
jnz loc_38155
cmp dword ptr [rdi], 0
jnz loc_3814D
mov rdi, rbx
call _ggml_nrows
test eax, eax
jle loc_3814D
vmovss xmm0, dword ptr [r14+54h]
mov rcx, [rbx+10h]
mov rdx, [rbx+38h]
mov rsi, [r14+38h]
mov rdi, [r14+0F8h]
mov r8, [rbx+0F8h]
mov r10d, 7FFFFFFFh
mov r9, rcx
and r9, r10
and rax, r10
xor r10d, r10d
vxorps xmm1, xmm1, xmm1
loc_3807F:
test ecx, ecx
jle short loc_380A7
xor r11d, r11d
loc_38086:
vmovss xmm2, dword ptr [r8+r11*4]
vmaxss xmm3, xmm2, xmm1
vminss xmm2, xmm2, xmm1
vfmadd213ss xmm2, xmm0, xmm3
vmovss dword ptr [rdi+r11*4], xmm2
inc r11
cmp r9, r11
jnz short loc_38086
loc_380A7:
inc r10
add rdi, rsi
add r8, rdx
cmp r10, rax
jnz short loc_3807F
jmp loc_3814D
loc_380BA:
cmp dword ptr [rdi], 0
jnz loc_3814D
mov rdi, rbx
call _ggml_nrows
test eax, eax
jle short loc_3814D
vmovss xmm0, dword ptr [r14+54h]
mov rcx, [rbx+10h]
mov rdx, [rbx+38h]
mov rsi, [r14+38h]
mov rdi, [r14+0F8h]
mov r8, [rbx+0F8h]
mov r10d, 7FFFFFFFh
mov r9, rcx
and r9, r10
and rax, r10
xor r10d, r10d
mov r11, cs:ggml_table_f32_f16_ptr
vxorps xmm1, xmm1, xmm1
loc_3810C:
test ecx, ecx
jle short loc_3813F
xor ebx, ebx
loc_38112:
movzx r14d, word ptr [r8+rbx*2]
vmovss xmm2, dword ptr [r11+r14*4]
vmaxss xmm3, xmm2, xmm1
vminss xmm2, xmm2, xmm1
vfmadd213ss xmm2, xmm0, xmm3
vcvtps2ph xmm2, xmm2, 0
vpextrw word ptr [rdi+rbx*2], xmm2, 0
inc rbx
cmp r9, rbx
jnz short loc_38112
loc_3813F:
inc r10
add rdi, rsi
add r8, rdx
cmp r10, rax
jnz short loc_3810C
loc_3814D:
add rsp, 8
pop rbx
pop r14
retn
loc_38155:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github2025/llama."...
lea rdx, aFatalError; "fatal error"
mov esi, 0BAFh
xor eax, eax
call _ggml_abort
| long long ggml_compute_forward_leaky_relu(_DWORD *a1, long long a2, double a3, __m128 _XMM1)
{
_QWORD *v5; // rbx
long long result; // rax
long long v8; // rcx
long long v9; // rdx
long long v10; // rsi
long long v13; // r10
long long v21; // rcx
long long v22; // rdx
long long v23; // rsi
long long v25; // r8
long long v26; // r10
_R14 = a2;
v5 = *(_QWORD **)(a2 + 152);
result = *(unsigned int *)v5;
if ( (_DWORD)result == 1 )
{
if ( !*a1 )
{
result = ggml_nrows(*(_QWORD *)(a2 + 152));
if ( (int)result > 0 )
{
__asm { vmovss xmm0, dword ptr [r14+54h] }
v21 = v5[2];
v22 = v5[7];
v23 = *(_QWORD *)(a2 + 56);
_RDI = *(_QWORD *)(_R14 + 248);
v25 = v5[31];
result &= 0x7FFFFFFFu;
v26 = 0LL;
_R11 = &ggml_table_f32_f16;
__asm { vxorps xmm1, xmm1, xmm1 }
do
{
if ( (int)v21 > 0 )
{
_RBX = 0LL;
do
{
_R14 = *(unsigned __int16 *)(v25 + 2 * _RBX);
__asm
{
vmovss xmm2, dword ptr [r11+r14*4]
vmaxss xmm3, xmm2, xmm1
vminss xmm2, xmm2, xmm1
vfmadd213ss xmm2, xmm0, xmm3
vcvtps2ph xmm2, xmm2, 0
vpextrw word ptr [rdi+rbx*2], xmm2, 0
}
++_RBX;
}
while ( (v21 & 0x7FFFFFFF) != _RBX );
}
++v26;
_RDI += v23;
v25 += v22;
}
while ( v26 != result );
}
}
}
else if ( (_DWORD)result )
{
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml-cpu/ops.cpp", 2991LL, "fatal error");
return ggml_compute_forward_silu_back();
}
else if ( !*a1 )
{
result = ggml_nrows(*(_QWORD *)(a2 + 152));
if ( (int)result > 0 )
{
__asm { vmovss xmm0, dword ptr [r14+54h] }
v8 = v5[2];
v9 = v5[7];
v10 = *(_QWORD *)(a2 + 56);
_RDI = *(_QWORD *)(_R14 + 248);
_R8 = v5[31];
result &= 0x7FFFFFFFu;
v13 = 0LL;
__asm { vxorps xmm1, xmm1, xmm1 }
do
{
if ( (int)v8 > 0 )
{
_R11 = 0LL;
do
{
__asm
{
vmovss xmm2, dword ptr [r8+r11*4]
vmaxss xmm3, xmm2, xmm1
vminss xmm2, xmm2, xmm1
vfmadd213ss xmm2, xmm0, xmm3
vmovss dword ptr [rdi+r11*4], xmm2
}
++_R11;
}
while ( (v8 & 0x7FFFFFFF) != _R11 );
}
++v13;
_RDI += v10;
_R8 += v9;
}
while ( v13 != result );
}
}
return result;
}
| ggml_compute_forward_leaky_relu:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,qword ptr [RSI + 0x98]
MOV EAX,dword ptr [RBX]
CMP EAX,0x1
JZ 0x001380ba
TEST EAX,EAX
JNZ 0x00138155
CMP dword ptr [RDI],0x0
JNZ 0x0013814d
MOV RDI,RBX
CALL 0x0010aa40
TEST EAX,EAX
JLE 0x0013814d
VMOVSS XMM0,dword ptr [R14 + 0x54]
MOV RCX,qword ptr [RBX + 0x10]
MOV RDX,qword ptr [RBX + 0x38]
MOV RSI,qword ptr [R14 + 0x38]
MOV RDI,qword ptr [R14 + 0xf8]
MOV R8,qword ptr [RBX + 0xf8]
MOV R10D,0x7fffffff
MOV R9,RCX
AND R9,R10
AND RAX,R10
XOR R10D,R10D
VXORPS XMM1,XMM1,XMM1
LAB_0013807f:
TEST ECX,ECX
JLE 0x001380a7
XOR R11D,R11D
LAB_00138086:
VMOVSS XMM2,dword ptr [R8 + R11*0x4]
VMAXSS XMM3,XMM2,XMM1
VMINSS XMM2,XMM2,XMM1
VFMADD213SS XMM2,XMM0,XMM3
VMOVSS dword ptr [RDI + R11*0x4],XMM2
INC R11
CMP R9,R11
JNZ 0x00138086
LAB_001380a7:
INC R10
ADD RDI,RSI
ADD R8,RDX
CMP R10,RAX
JNZ 0x0013807f
JMP 0x0013814d
LAB_001380ba:
CMP dword ptr [RDI],0x0
JNZ 0x0013814d
MOV RDI,RBX
CALL 0x0010aa40
TEST EAX,EAX
JLE 0x0013814d
VMOVSS XMM0,dword ptr [R14 + 0x54]
MOV RCX,qword ptr [RBX + 0x10]
MOV RDX,qword ptr [RBX + 0x38]
MOV RSI,qword ptr [R14 + 0x38]
MOV RDI,qword ptr [R14 + 0xf8]
MOV R8,qword ptr [RBX + 0xf8]
MOV R10D,0x7fffffff
MOV R9,RCX
AND R9,R10
AND RAX,R10
XOR R10D,R10D
MOV R11,qword ptr [0x0017cf60]
VXORPS XMM1,XMM1,XMM1
LAB_0013810c:
TEST ECX,ECX
JLE 0x0013813f
XOR EBX,EBX
LAB_00138112:
MOVZX R14D,word ptr [R8 + RBX*0x2]
VMOVSS XMM2,dword ptr [R11 + R14*0x4]
VMAXSS XMM3,XMM2,XMM1
VMINSS XMM2,XMM2,XMM1
VFMADD213SS XMM2,XMM0,XMM3
VCVTPS2PH XMM2,XMM2,0x0
VPEXTRW word ptr [RDI + RBX*0x2],XMM2,0x0
INC RBX
CMP R9,RBX
JNZ 0x00138112
LAB_0013813f:
INC R10
ADD RDI,RSI
ADD R8,RDX
CMP R10,RAX
JNZ 0x0013810c
LAB_0013814d:
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_00138155:
LEA RDI,[0x1729e0]
LEA RDX,[0x168660]
MOV ESI,0xbaf
XOR EAX,EAX
CALL 0x0010af60
|
void ggml_compute_forward_leaky_relu(int *param_1,long param_2)
{
uint uVar1;
int *piVar2;
long lVar3;
ulong uVar4;
long lVar5;
long lVar6;
long lVar7;
ulong uVar8;
ulong uVar9;
ulong uVar10;
int1 auVar11 [16];
int1 auVar12 [16];
piVar2 = *(int **)(param_2 + 0x98);
if (*piVar2 == 1) {
if ((*param_1 == 0) && (uVar4 = ggml_nrows(piVar2), 0 < (int)uVar4)) {
lVar7 = *(long *)(piVar2 + 0x3e);
uVar9 = 0;
do {
if (0 < (int)*(ulong *)(piVar2 + 4)) {
uVar8 = 0;
do {
auVar12 = vmaxss_avx(ZEXT416(*(uint *)(PTR_ggml_table_f32_f16_0017cf60 +
(ulong)*(ushort *)(lVar7 + uVar8 * 2) * 4)),
ZEXT816(0) << 0x40);
auVar11 = vminss_avx(ZEXT416(*(uint *)(PTR_ggml_table_f32_f16_0017cf60 +
(ulong)*(ushort *)(lVar7 + uVar8 * 2) * 4)),
ZEXT816(0) << 0x40);
auVar12 = vfmadd213ss_fma(auVar11,ZEXT416(*(uint *)(param_2 + 0x54)),auVar12);
auVar12 = vcvtps2ph_f16c(auVar12,0);
vpextrw_avx(auVar12,0);
uVar8 = uVar8 + 1;
} while ((*(ulong *)(piVar2 + 4) & 0x7fffffff) != uVar8);
}
uVar9 = uVar9 + 1;
lVar7 = lVar7 + *(long *)(piVar2 + 0xe);
} while (uVar9 != (uVar4 & 0x7fffffff));
}
}
else {
if (*piVar2 != 0) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml-cpu/ops.cpp",0xbaf,
"fatal error");
}
if ((*param_1 == 0) && (uVar4 = ggml_nrows(piVar2), 0 < (int)uVar4)) {
uVar1 = *(uint *)(param_2 + 0x54);
uVar9 = *(ulong *)(piVar2 + 4);
lVar7 = *(long *)(piVar2 + 0xe);
lVar3 = *(long *)(param_2 + 0x38);
lVar5 = *(long *)(param_2 + 0xf8);
lVar6 = *(long *)(piVar2 + 0x3e);
uVar8 = 0;
do {
if (0 < (int)uVar9) {
uVar10 = 0;
do {
auVar11 = ZEXT416(*(uint *)(lVar6 + uVar10 * 4));
auVar12 = vmaxss_avx(auVar11,ZEXT816(0) << 0x40);
auVar11 = vminss_avx(auVar11,ZEXT816(0) << 0x40);
auVar12 = vfmadd213ss_fma(auVar11,ZEXT416(uVar1),auVar12);
*(int *)(lVar5 + uVar10 * 4) = auVar12._0_4_;
uVar10 = uVar10 + 1;
} while ((uVar9 & 0x7fffffff) != uVar10);
}
uVar8 = uVar8 + 1;
lVar5 = lVar5 + lVar3;
lVar6 = lVar6 + lVar7;
} while (uVar8 != (uVar4 & 0x7fffffff));
}
}
return;
}
| |
43,255 | blst_p1_compress | corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/e1.c | void blst_p1_compress(unsigned char out[48], const POINTonE1 *in)
{
if (vec_is_zero(in->Z, sizeof(in->Z))) {
bytes_zero(out, 48);
out[0] = 0xc0; /* compressed and infinity bits */
} else {
limb_t sign = POINTonE1_Compress_BE(out, in);
out[0] |= (unsigned char)(0x80 | ((sign & 2) << 4));
}
} | O3 | c | blst_p1_compress:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x98, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x60(%rsi), %r15
movl $0x30, %esi
movq %r15, %rdi
callq 0x70940
testq %rax, %rax
je 0x599e7
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x11(%rbx)
movups %xmm0, 0x1(%rbx)
movb $-0x40, %al
jmp 0x59a29
leaq 0x332ea(%rip), %rsi # 0x8ccd8
movl $0x30, %edx
movq %r15, %rdi
callq 0x70980
testq %rax, %rax
jne 0x59a15
leaq -0xa8(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x59422
movq %r15, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x59929
shlb $0x4, %al
andb $0x20, %al
orb (%rbx), %al
orb $-0x80, %al
movb %al, (%rbx)
addq $0x98, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| blst_p1_compress:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 98h
mov r14, rsi
mov rbx, rdi
lea r15, [rsi+60h]
mov esi, 30h ; '0'
mov rdi, r15
call vec_is_zero_16x
test rax, rax
jz short loc_599E7
xorps xmm0, xmm0
movups xmmword ptr [rbx+20h], xmm0
movups xmmword ptr [rbx+11h], xmm0
movups xmmword ptr [rbx+1], xmm0
mov al, 0C0h
jmp short loc_59A29
loc_599E7:
lea rsi, BLS12_381_Rx
mov edx, 30h ; '0'
mov rdi, r15
call vec_is_equal_16x
test rax, rax
jnz short loc_59A15
lea r15, [rbp+var_A8]
mov rdi, r15
mov rsi, r14
call POINTonE1_from_Jacobian
mov r14, r15
loc_59A15:
mov rdi, rbx
mov rsi, r14
call POINTonE1_affine_Compress_BE
shl al, 4
and al, 20h
or al, [rbx]
or al, 80h
loc_59A29:
mov [rbx], al
add rsp, 98h
pop rbx
pop r14
pop r15
pop rbp
retn
| char blst_p1_compress(long long a1, long long a2)
{
_BYTE *v2; // r14
char result; // al
_BYTE v4[168]; // [rsp+8h] [rbp-A8h] BYREF
v2 = (_BYTE *)a2;
if ( vec_is_zero_16x(a2 + 96, 48LL) )
{
*(_OWORD *)(a1 + 32) = 0LL;
*(_OWORD *)(a1 + 17) = 0LL;
*(_OWORD *)(a1 + 1) = 0LL;
result = -64;
}
else
{
if ( !vec_is_equal_16x(a2 + 96, &BLS12_381_Rx, 48LL) )
{
POINTonE1_from_Jacobian((long long)v4, a2);
v2 = v4;
}
result = *(_BYTE *)a1 | (16 * POINTonE1_affine_Compress_BE((_BYTE *)a1, (long long)v2)) & 0x20 | 0x80;
}
*(_BYTE *)a1 = result;
return result;
}
| blst_p1_compress:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x98
MOV R14,RSI
MOV RBX,RDI
LEA R15,[RSI + 0x60]
MOV ESI,0x30
MOV RDI,R15
CALL 0x00170940
TEST RAX,RAX
JZ 0x001599e7
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x20],XMM0
MOVUPS xmmword ptr [RBX + 0x11],XMM0
MOVUPS xmmword ptr [RBX + 0x1],XMM0
MOV AL,0xc0
JMP 0x00159a29
LAB_001599e7:
LEA RSI,[0x18ccd8]
MOV EDX,0x30
MOV RDI,R15
CALL 0x00170980
TEST RAX,RAX
JNZ 0x00159a15
LEA R15,[RBP + -0xa8]
MOV RDI,R15
MOV RSI,R14
CALL 0x00159422
MOV R14,R15
LAB_00159a15:
MOV RDI,RBX
MOV RSI,R14
CALL 0x00159929
SHL AL,0x4
AND AL,0x20
OR AL,byte ptr [RBX]
OR AL,0x80
LAB_00159a29:
MOV byte ptr [RBX],AL
ADD RSP,0x98
POP RBX
POP R14
POP R15
POP RBP
RET
|
void blst_p1_compress(byte *param_1,int1 *param_2)
{
long lVar1;
byte bVar2;
int1 *puVar3;
int1 local_b0 [144];
lVar1 = vec_is_zero_16x(param_2 + 0x60,0x30);
if (lVar1 == 0) {
lVar1 = vec_is_equal_16x(param_2 + 0x60,&BLS12_381_Rx,0x30);
puVar3 = param_2;
if (lVar1 == 0) {
puVar3 = local_b0;
POINTonE1_from_Jacobian(puVar3,param_2);
}
bVar2 = POINTonE1_affine_Compress_BE(param_1,puVar3);
bVar2 = (bVar2 & 2) << 4 | *param_1 | 0x80;
}
else {
param_1[0x20] = 0;
param_1[0x21] = 0;
param_1[0x22] = 0;
param_1[0x23] = 0;
param_1[0x24] = 0;
param_1[0x25] = 0;
param_1[0x26] = 0;
param_1[0x27] = 0;
param_1[0x28] = 0;
param_1[0x29] = 0;
param_1[0x2a] = 0;
param_1[0x2b] = 0;
param_1[0x2c] = 0;
param_1[0x2d] = 0;
param_1[0x2e] = 0;
param_1[0x2f] = 0;
param_1[0x11] = 0;
param_1[0x12] = 0;
param_1[0x13] = 0;
param_1[0x14] = 0;
param_1[0x15] = 0;
param_1[0x16] = 0;
param_1[0x17] = 0;
param_1[0x18] = 0;
param_1[0x19] = 0;
param_1[0x1a] = 0;
param_1[0x1b] = 0;
param_1[0x1c] = 0;
param_1[0x1d] = 0;
param_1[0x1e] = 0;
param_1[0x1f] = 0;
param_1[0x20] = 0;
param_1[1] = 0;
param_1[2] = 0;
param_1[3] = 0;
param_1[4] = 0;
param_1[5] = 0;
param_1[6] = 0;
param_1[7] = 0;
param_1[8] = 0;
param_1[9] = 0;
param_1[10] = 0;
param_1[0xb] = 0;
param_1[0xc] = 0;
param_1[0xd] = 0;
param_1[0xe] = 0;
param_1[0xf] = 0;
param_1[0x10] = 0;
bVar2 = 0xc0;
}
*param_1 = bVar2;
return;
}
| |
43,256 | my_create_with_symlink | eloqsql/mysys/my_symlink2.c | File my_create_with_symlink(const char *linkname, const char *filename,
int createflags, int access_flags, myf MyFlags)
{
File file;
int tmp_errno;
/* Test if we should create a link */
int create_link;
char abs_linkname[FN_REFLEN];
DBUG_ENTER("my_create_with_symlink");
DBUG_PRINT("enter", ("linkname: %s filename: %s",
linkname ? linkname : "(NULL)",
filename ? filename : "(NULL)"));
if (my_disable_symlinks)
{
DBUG_PRINT("info", ("Symlinks disabled"));
/* Create only the file, not the link and file */
create_link= 0;
if (linkname)
filename= linkname;
}
else
{
if (linkname)
my_realpath(abs_linkname, linkname, MYF(0));
create_link= (linkname && strcmp(abs_linkname,filename));
}
if (!(MyFlags & MY_DELETE_OLD))
{
if (!access(filename,F_OK))
{
my_errno= errno= EEXIST;
my_error(EE_CANTCREATEFILE, MYF(0), filename, EEXIST);
DBUG_RETURN(-1);
}
if (create_link && !access(linkname,F_OK))
{
my_errno= errno= EEXIST;
my_error(EE_CANTCREATEFILE, MYF(0), linkname, EEXIST);
DBUG_RETURN(-1);
}
}
if ((file=my_create(filename, createflags, access_flags, MyFlags)) >= 0)
{
if (create_link)
{
/* Delete old link/file */
if (MyFlags & MY_DELETE_OLD)
my_delete(linkname, MYF(0));
/* Create link */
if (my_symlink(filename, linkname, MyFlags))
{
/* Fail, remove everything we have done */
tmp_errno=my_errno;
my_close(file,MYF(0));
my_delete(filename, MYF(0));
file= -1;
my_errno=tmp_errno;
}
}
}
DBUG_RETURN(file);
} | O3 | c | my_create_with_symlink:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp # imm = 0x218
movq %r8, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
leaq 0x3588a7(%rip), %rax # 0x3b6b6c
cmpb $0x0, (%rax)
je 0x5e2d6
testq %r14, %r14
cmovneq %r14, %rbx
xorl %r13d, %r13d
jmp 0x5e310
testq %r14, %r14
je 0x5e2d1
leaq -0x230(%rbp), %rdi
movq %r14, %rsi
movl %edx, %r13d
xorl %edx, %edx
movl %ecx, %r12d
callq 0x5e061
leaq -0x230(%rbp), %rdi
movq %rbx, %rsi
callq 0x28560
movl %r13d, %edx
movl %r12d, %ecx
xorl %r13d, %r13d
testl %eax, %eax
setne %r13b
btl $0x8, %r15d
jb 0x5e35b
movl %edx, -0x234(%rbp)
movl %ecx, %r12d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x28700
testl %eax, %eax
je 0x5e3c7
testl %r13d, %r13d
movl %r12d, %ecx
movl -0x234(%rbp), %edx
je 0x5e35b
movq %r14, %rdi
xorl %esi, %esi
callq 0x28700
movl -0x234(%rbp), %edx
movl %r12d, %ecx
testl %eax, %eax
je 0x5e3e9
movq %rbx, %rdi
movl %edx, %esi
movl %ecx, %edx
movq %r15, %rcx
callq 0x58e94
movl %eax, %r12d
testl %eax, %eax
js 0x5e418
testl %r13d, %r13d
je 0x5e418
btl $0x8, %r15d
jae 0x5e38f
movq %r14, %rdi
xorl %esi, %esi
callq 0x58f1c
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x5df9d
testl %eax, %eax
je 0x5e418
callq 0x5ed5e
movl (%rax), %r14d
movl %r12d, %edi
xorl %esi, %esi
callq 0x5d805
movq %rbx, %rdi
xorl %esi, %esi
callq 0x58f1c
callq 0x5ed5e
movl %r14d, (%rax)
jmp 0x5e412
callq 0x28050
movl $0x11, %r14d
movl %r14d, (%rax)
callq 0x5ed5e
movl %r14d, (%rax)
movl $0x1, %edi
xorl %esi, %esi
movq %rbx, %rdx
jmp 0x5e406
callq 0x28050
movl $0x11, %ebx
movl %ebx, (%rax)
callq 0x5ed5e
movl %ebx, (%rax)
movl $0x1, %edi
xorl %esi, %esi
movq %r14, %rdx
movl $0x11, %ecx
xorl %eax, %eax
callq 0x59193
movl $0xffffffff, %r12d # imm = 0xFFFFFFFF
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x5e43c
movl %r12d, %eax
addq $0x218, %rsp # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x28430
| my_create_with_symlink:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 218h
mov r15, r8
mov rbx, rsi
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
lea rax, my_disable_symlinks
cmp byte ptr [rax], 0
jz short loc_5E2D6
test r14, r14
cmovnz rbx, r14
loc_5E2D1:
xor r13d, r13d
jmp short loc_5E310
loc_5E2D6:
test r14, r14
jz short loc_5E2D1
lea rdi, [rbp+var_230]
mov rsi, r14
mov r13d, edx
xor edx, edx
mov r12d, ecx
call my_realpath
lea rdi, [rbp+var_230]
mov rsi, rbx
call _strcmp
mov edx, r13d
mov ecx, r12d
xor r13d, r13d
test eax, eax
setnz r13b
loc_5E310:
bt r15d, 8
jb short loc_5E35B
mov [rbp+var_234], edx
mov r12d, ecx
mov rdi, rbx
xor esi, esi
call _access
test eax, eax
jz loc_5E3C7
test r13d, r13d
mov ecx, r12d
mov edx, [rbp+var_234]
jz short loc_5E35B
mov rdi, r14
xor esi, esi
call _access
mov edx, [rbp+var_234]
mov ecx, r12d
test eax, eax
jz loc_5E3E9
loc_5E35B:
mov rdi, rbx
mov esi, edx
mov edx, ecx
mov rcx, r15
call my_create
mov r12d, eax
test eax, eax
js loc_5E418
test r13d, r13d
jz loc_5E418
bt r15d, 8
jnb short loc_5E38F
mov rdi, r14
xor esi, esi
call my_delete
loc_5E38F:
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call my_symlink
test eax, eax
jz short loc_5E418
call _my_thread_var
mov r14d, [rax]
mov edi, r12d
xor esi, esi
call my_close
mov rdi, rbx
xor esi, esi
call my_delete
call _my_thread_var
mov [rax], r14d
jmp short loc_5E412
loc_5E3C7:
call ___errno_location
mov r14d, 11h
mov [rax], r14d
call _my_thread_var
mov [rax], r14d
mov edi, 1
xor esi, esi
mov rdx, rbx
jmp short loc_5E406
loc_5E3E9:
call ___errno_location
mov ebx, 11h
mov [rax], ebx
call _my_thread_var
mov [rax], ebx
mov edi, 1
xor esi, esi
mov rdx, r14
loc_5E406:
mov ecx, 11h
xor eax, eax
call my_error
loc_5E412:
mov r12d, 0FFFFFFFFh
loc_5E418:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_5E43C
mov eax, r12d
add rsp, 218h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5E43C:
call ___stack_chk_fail
| long long my_create_with_symlink(const char *a1, long long a2, unsigned int a3, int a4, long long a5)
{
long long v6; // rbx
BOOL v7; // r13d
unsigned int v8; // r13d
int v9; // r12d
int v10; // eax
int v11; // r12d
int v12; // eax
int v13; // r12d
int v14; // r14d
unsigned int v16; // [rsp+Ch] [rbp-234h]
_BYTE v17[512]; // [rsp+10h] [rbp-230h] BYREF
unsigned long long v18; // [rsp+210h] [rbp-30h]
v6 = a2;
v18 = __readfsqword(0x28u);
if ( my_disable_symlinks )
{
if ( a1 )
v6 = (long long)a1;
goto LABEL_4;
}
if ( !a1 )
{
LABEL_4:
v7 = 0;
goto LABEL_7;
}
v8 = a3;
v9 = a4;
my_realpath((long long)v17, a1, 0);
v10 = strcmp(v17, a2);
a3 = v8;
a4 = v9;
v7 = v10 != 0;
LABEL_7:
if ( (a5 & 0x100) == 0 )
{
v16 = a3;
v11 = a4;
if ( !(unsigned int)access(v6, 0LL) )
{
*(_DWORD *)__errno_location(v6) = 17;
*(_DWORD *)my_thread_var(v6, 0LL) = 17;
my_error(1u, 0LL, v6, 17LL);
return (unsigned int)-1;
}
a4 = v11;
a3 = v16;
if ( v7 )
{
v12 = access(a1, 0LL);
a3 = v16;
a4 = v11;
if ( !v12 )
{
*(_DWORD *)__errno_location(a1) = 17;
*(_DWORD *)my_thread_var(a1, 0LL) = 17;
my_error(1u, 0LL, a1, 17LL);
return (unsigned int)-1;
}
}
}
v13 = my_create(v6, a3, a4, a5);
if ( v13 >= 0 && v7 )
{
if ( (a5 & 0x100) != 0 )
my_delete((long long)a1, 0LL);
if ( (unsigned int)my_symlink(v6, a1, a5) )
{
v14 = *(_DWORD *)my_thread_var(v6, a1);
my_close((unsigned int)v13, 0LL);
my_delete(v6, 0LL);
*(_DWORD *)my_thread_var(v6, 0LL) = v14;
return (unsigned int)-1;
}
}
return (unsigned int)v13;
}
| my_create_with_symlink:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x218
MOV R15,R8
MOV RBX,RSI
MOV R14,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
LEA RAX,[0x4b6b6c]
CMP byte ptr [RAX],0x0
JZ 0x0015e2d6
TEST R14,R14
CMOVNZ RBX,R14
LAB_0015e2d1:
XOR R13D,R13D
JMP 0x0015e310
LAB_0015e2d6:
TEST R14,R14
JZ 0x0015e2d1
LEA RDI,[RBP + -0x230]
MOV RSI,R14
MOV R13D,EDX
XOR EDX,EDX
MOV R12D,ECX
CALL 0x0015e061
LEA RDI,[RBP + -0x230]
MOV RSI,RBX
CALL 0x00128560
MOV EDX,R13D
MOV ECX,R12D
XOR R13D,R13D
TEST EAX,EAX
SETNZ R13B
LAB_0015e310:
BT R15D,0x8
JC 0x0015e35b
MOV dword ptr [RBP + -0x234],EDX
MOV R12D,ECX
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00128700
TEST EAX,EAX
JZ 0x0015e3c7
TEST R13D,R13D
MOV ECX,R12D
MOV EDX,dword ptr [RBP + -0x234]
JZ 0x0015e35b
MOV RDI,R14
XOR ESI,ESI
CALL 0x00128700
MOV EDX,dword ptr [RBP + -0x234]
MOV ECX,R12D
TEST EAX,EAX
JZ 0x0015e3e9
LAB_0015e35b:
MOV RDI,RBX
MOV ESI,EDX
MOV EDX,ECX
MOV RCX,R15
CALL 0x00158e94
MOV R12D,EAX
TEST EAX,EAX
JS 0x0015e418
TEST R13D,R13D
JZ 0x0015e418
BT R15D,0x8
JNC 0x0015e38f
MOV RDI,R14
XOR ESI,ESI
CALL 0x00158f1c
LAB_0015e38f:
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL 0x0015df9d
TEST EAX,EAX
JZ 0x0015e418
CALL 0x0015ed5e
MOV R14D,dword ptr [RAX]
MOV EDI,R12D
XOR ESI,ESI
CALL 0x0015d805
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00158f1c
CALL 0x0015ed5e
MOV dword ptr [RAX],R14D
JMP 0x0015e412
LAB_0015e3c7:
CALL 0x00128050
MOV R14D,0x11
MOV dword ptr [RAX],R14D
CALL 0x0015ed5e
MOV dword ptr [RAX],R14D
MOV EDI,0x1
XOR ESI,ESI
MOV RDX,RBX
JMP 0x0015e406
LAB_0015e3e9:
CALL 0x00128050
MOV EBX,0x11
MOV dword ptr [RAX],EBX
CALL 0x0015ed5e
MOV dword ptr [RAX],EBX
MOV EDI,0x1
XOR ESI,ESI
MOV RDX,R14
LAB_0015e406:
MOV ECX,0x11
XOR EAX,EAX
CALL 0x00159193
LAB_0015e412:
MOV R12D,0xffffffff
LAB_0015e418:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0015e43c
MOV EAX,R12D
ADD RSP,0x218
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015e43c:
CALL 0x00128430
|
int my_create_with_symlink
(char *param_1,char *param_2,int4 param_3,int4 param_4,int8 param_5)
{
int4 uVar1;
int iVar2;
int iVar3;
int4 *puVar4;
int *piVar5;
long in_FS_OFFSET;
bool bVar6;
char local_238 [512];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
if (my_disable_symlinks == '\0') {
if (param_1 == (char *)0x0) goto LAB_0015e2d1;
my_realpath(local_238,param_1,0);
iVar2 = strcmp(local_238,param_2);
bVar6 = iVar2 != 0;
}
else {
if (param_1 != (char *)0x0) {
param_2 = param_1;
}
LAB_0015e2d1:
bVar6 = false;
}
if (((uint)param_5 >> 8 & 1) == 0) {
iVar2 = access(param_2,0);
if (iVar2 != 0) {
if (bVar6) {
iVar2 = access(param_1,0);
if (iVar2 == 0) {
piVar5 = __errno_location();
*piVar5 = 0x11;
puVar4 = (int4 *)_my_thread_var();
*puVar4 = 0x11;
param_2 = param_1;
goto LAB_0015e406;
}
}
goto LAB_0015e35b;
}
piVar5 = __errno_location();
*piVar5 = 0x11;
puVar4 = (int4 *)_my_thread_var();
*puVar4 = 0x11;
LAB_0015e406:
my_error(1,0,param_2,0x11);
}
else {
LAB_0015e35b:
iVar2 = my_create(param_2,param_3,param_4,param_5);
if ((iVar2 < 0) || (!bVar6)) goto LAB_0015e418;
if (((uint)param_5 >> 8 & 1) != 0) {
my_delete(param_1,0);
}
iVar3 = my_symlink(param_2,param_1,param_5);
if (iVar3 == 0) goto LAB_0015e418;
puVar4 = (int4 *)_my_thread_var();
uVar1 = *puVar4;
my_close(iVar2,0);
my_delete(param_2,0);
puVar4 = (int4 *)_my_thread_var();
*puVar4 = uVar1;
}
iVar2 = -1;
LAB_0015e418:
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return iVar2;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
43,257 | 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 0x6682e
movsbq (%rdx), %rdi
testq %rdi, %rdi
js 0x667f8
movq %rdi, (%rsi)
movl $0x1, %eax
retq
leaq 0x2(%rdx), %r8
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %r8
ja 0x6682e
leal 0x5f(%rdi), %ecx
xorl %eax, %eax
cmpb $0x58, %cl
ja 0x6682e
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 0x6682f
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 0x66856
movl %edx, %eax
leaq 0x3703c(%rip), %rcx # 0x9d890
jmp 0x6686d
orl %ecx, %eax
addl $0xffff36c0, %eax # imm = 0xFFFF36C0
cmpl $0x309d, %eax # imm = 0x309D
jae 0x66886
movl %eax, %eax
leaq 0x3bda3(%rip), %rcx # 0xa2610
leaq (%rcx,%rax,2), %rax
movzwl (%rax), %eax
movzwl %ax, %ecx
movq %rcx, (%rsi)
movl $0x2, %eax
testw %cx, %cx
jne 0x66892
jmp 0x6688d
movq $0x0, (%rsi)
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
popq %rbp
retq
| my_mb_wc_big5:
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short locret_6682E
movsx rdi, byte ptr [rdx]
test rdi, rdi
js short loc_667F8
mov [rsi], rdi
mov eax, 1
retn
loc_667F8:
lea r8, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp r8, rcx
ja short locret_6682E
lea ecx, [rdi+5Fh]
xor eax, eax
cmp cl, 58h ; 'X'
ja short locret_6682E
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_6682F
locret_6682E:
retn
loc_6682F:
push rbp
mov rbp, rsp
movzx eax, dil
shl eax, 8
lea edx, [rax+rcx]
add edx, 0FFFF5EC0h
cmp edx, 26BCh
ja short loc_66856
mov eax, edx
lea rcx, tab_big5_uni0
jmp short loc_6686D
loc_66856:
or eax, ecx
add eax, 0FFFF36C0h
cmp eax, 309Dh
jnb short loc_66886
mov eax, eax
lea rcx, tab_big5_uni1
loc_6686D:
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_66892
jmp short loc_6688D
loc_66886:
mov qword ptr [rsi], 0
loc_6688D:
mov eax, 0FFFFFFFEh
loc_66892:
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 0x0016682e
MOVSX RDI,byte ptr [RDX]
TEST RDI,RDI
JS 0x001667f8
MOV qword ptr [RSI],RDI
MOV EAX,0x1
RET
LAB_001667f8:
LEA R8,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP R8,RCX
JA 0x0016682e
LEA ECX,[RDI + 0x5f]
XOR EAX,EAX
CMP CL,0x58
JA 0x0016682e
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 0x0016682f
LAB_0016682e:
RET
LAB_0016682f:
PUSH RBP
MOV RBP,RSP
MOVZX EAX,DIL
SHL EAX,0x8
LEA EDX,[RAX + RCX*0x1]
ADD EDX,0xffff5ec0
CMP EDX,0x26bc
JA 0x00166856
MOV EAX,EDX
LEA RCX,[0x19d890]
JMP 0x0016686d
LAB_00166856:
OR EAX,ECX
ADD EAX,0xffff36c0
CMP EAX,0x309d
JNC 0x00166886
MOV EAX,EAX
LEA RCX,[0x1a2610]
LAB_0016686d:
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 0x00166892
JMP 0x0016688d
LAB_00166886:
MOV qword ptr [RSI],0x0
LAB_0016688d:
MOV EAX,0xfffffffe
LAB_00166892:
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;
}
| |
43,258 | wait_on_queue | eloqsql/mysys/mf_keycache.c | static void wait_on_queue(KEYCACHE_WQUEUE *wqueue,
mysql_mutex_t *mutex)
{
struct st_my_thread_var *last;
struct st_my_thread_var *thread= my_thread_var;
DBUG_ASSERT(!thread->next);
DBUG_ASSERT(!thread->prev); /* Not required, but must be true anyway. */
mysql_mutex_assert_owner(mutex);
/* Add to queue. */
if (! (last= wqueue->last_thread))
thread->next= thread;
else
{
thread->next= last->next;
last->next= thread;
}
wqueue->last_thread= thread;
/*
Wait until thread is removed from queue by the signaling thread.
The loop protects against stray signals.
*/
do
{
KEYCACHE_DBUG_PRINT("wait", ("suspend thread %ld", (ulong) thread->id));
keycache_pthread_cond_wait(&thread->suspend, mutex);
}
while (thread->next);
} | O3 | c | wait_on_queue:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
callq 0xa1ab2
movq %rax, %r14
movq %rax, %r12
movq (%r15), %rax
testq %rax, %rax
je 0x9752b
movq 0x88(%rax), %rcx
addq $0x88, %rax
movq %rcx, 0x88(%r12)
jmp 0x97532
leaq 0x88(%r14), %rax
movq %r12, (%rax)
movq %r12, (%r15)
addq $0x8, %r14
leaq 0x44acd(%rip), %r15 # 0xdc010
cmpq $0x0, 0x38(%r12)
jne 0x97563
movq %r14, %rdi
movq %rbx, %rsi
callq 0x29420
cmpq $0x0, 0x88(%r12)
jne 0x97543
jmp 0x97578
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movl $0x477, %ecx # imm = 0x477
callq 0x2ee80
jmp 0x97556
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| wait_on_queue:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rsi
mov r15, rdi
call _my_thread_var
mov r14, rax
mov r12, rax
mov rax, [r15]
test rax, rax
jz short loc_9752B
mov rcx, [rax+88h]
add rax, 88h
mov [r12+88h], rcx
jmp short loc_97532
loc_9752B:
lea rax, [r14+88h]
loc_97532:
mov [rax], r12
mov [r15], r12
add r14, 8
lea r15, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"...
loc_97543:
cmp qword ptr [r12+38h], 0
jnz short loc_97563
mov rdi, r14
mov rsi, rbx
call _pthread_cond_wait
loc_97556:
cmp qword ptr [r12+88h], 0
jnz short loc_97543
jmp short loc_97578
loc_97563:
mov rdi, r14
mov rsi, rbx
mov rdx, r15
mov ecx, 477h
call psi_cond_wait
jmp short loc_97556
loc_97578:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long wait_on_queue(long long *a1, long long a2)
{
long long v2; // r14
long long v3; // r12
long long v4; // rax
long long v5; // rcx
long long *v6; // rax
long long v7; // r14
long long result; // rax
v2 = my_thread_var(a1);
v3 = v2;
v4 = *a1;
if ( *a1 )
{
v5 = *(_QWORD *)(v4 + 136);
v6 = (long long *)(v4 + 136);
*(_QWORD *)(v2 + 136) = v5;
}
else
{
v6 = (long long *)(v2 + 136);
}
*v6 = v2;
*a1 = v2;
v7 = v2 + 8;
do
{
if ( *(_QWORD *)(v3 + 56) )
result = psi_cond_wait(v7, a2, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0x477u);
else
result = pthread_cond_wait(v7, a2);
}
while ( *(_QWORD *)(v3 + 136) );
return result;
}
| wait_on_queue:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RSI
MOV R15,RDI
CALL 0x001a1ab2
MOV R14,RAX
MOV R12,RAX
MOV RAX,qword ptr [R15]
TEST RAX,RAX
JZ 0x0019752b
MOV RCX,qword ptr [RAX + 0x88]
ADD RAX,0x88
MOV qword ptr [R12 + 0x88],RCX
JMP 0x00197532
LAB_0019752b:
LEA RAX,[R14 + 0x88]
LAB_00197532:
MOV qword ptr [RAX],R12
MOV qword ptr [R15],R12
ADD R14,0x8
LEA R15,[0x1dc010]
LAB_00197543:
CMP qword ptr [R12 + 0x38],0x0
JNZ 0x00197563
MOV RDI,R14
MOV RSI,RBX
CALL 0x00129420
LAB_00197556:
CMP qword ptr [R12 + 0x88],0x0
JNZ 0x00197543
JMP 0x00197578
LAB_00197563:
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R15
MOV ECX,0x477
CALL 0x0012ee80
JMP 0x00197556
LAB_00197578:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
void wait_on_queue(long *param_1,pthread_mutex_t *param_2)
{
long lVar1;
long lVar2;
long lVar3;
lVar3 = _my_thread_var();
lVar1 = *param_1;
lVar2 = lVar3;
if (lVar1 != 0) {
*(int8 *)(lVar3 + 0x88) = *(int8 *)(lVar1 + 0x88);
lVar2 = lVar1;
}
*(long *)(lVar2 + 0x88) = lVar3;
*param_1 = lVar3;
do {
if (*(long *)(lVar3 + 0x38) == 0) {
pthread_cond_wait((pthread_cond_t *)(lVar3 + 8),param_2);
}
else {
psi_cond_wait((pthread_cond_t *)(lVar3 + 8),param_2,
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0x477);
}
} while (*(long *)(lVar3 + 0x88) != 0);
return;
}
| |
43,259 | ma_write_init_block_record | eloqsql/storage/maria/ma_blockrec.c | MARIA_RECORD_POS _ma_write_init_block_record(MARIA_HA *info,
const uchar *record)
{
DBUG_ENTER("_ma_write_init_block_record");
calc_record_size(info, record, &info->cur_row);
if (allocate_and_write_block_record(info, record,
&info->cur_row, LSN_ERROR))
DBUG_RETURN(HA_OFFSET_ERROR);
DBUG_RETURN(info->cur_row.lastpos);
} | O3 | c | ma_write_init_block_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x80(%rdi), %r14
movq %r14, %rdx
callq 0x5c61f
movq %rbx, %rdi
movl $0x1, %esi
callq 0x416ed
movq %rbx, %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0x404d1
testb %al, %al
jne 0x5c5c3
movq (%rbx), %rax
movq 0x80(%rbx), %rsi
movq 0x378(%rbx), %rdx
movl 0x138(%rbx), %edi
movq 0x3b8(%rax), %rcx
cmpq %rdi, %rcx
cmovbl %edi, %ecx
leaq -0x48(%rbp), %r12
movq %rbx, %rdi
movl $0x1, %r8d
movq %r12, %r9
callq 0x62e94
testb %al, %al
jne 0x5c5c3
movq (%rbx), %rcx
movq 0x80(%rbx), %rax
movq (%rax), %rdx
movl -0x2c(%rbp), %esi
shlq $0x8, %rdx
orq %rsi, %rdx
movq %rdx, 0x98(%rbx)
movq 0x6a8(%rcx), %rcx
testq %rcx, %rcx
je 0x5c593
movq %rbx, %rdi
movq %r15, %rsi
callq *%rcx
movl %eax, 0xb0(%rbx)
movq 0x80(%rbx), %rax
xorl %r9d, %r9d
cmpb $0x0, 0x15(%rax)
setne %r9b
subq $0x8, %rsp
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
movq %r14, %r8
pushq $0x0
pushq $0x1
pushq %r12
callq 0x612a2
addq $0x20, %rsp
testb %al, %al
je 0x5c616
callq 0xa1b22
movl (%rax), %r14d
cmpl $0x0, 0x644(%rbx)
je 0x5c5e1
movq %rbx, %rdi
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
callq 0x416ed
movq %rbx, %rdi
xorl %esi, %esi
callq 0x597f8
movq 0x8(%rbx), %rax
movq $0x0, 0x90(%rax)
callq 0xa1b22
movl %r14d, (%rax)
movq $-0x1, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x98(%rbx), %rax
jmp 0x5c609
| _ma_write_init_block_record:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 30h
mov r15, rsi
mov rbx, rdi
lea r14, [rdi+80h]
mov rdx, r14
call calc_record_size
mov rdi, rbx
mov esi, 1
call _ma_bitmap_flushable
mov rdi, rbx
mov rsi, r14
mov rdx, r14
call _ma_bitmap_find_place
test al, al
jnz loc_5C5C3
mov rax, [rbx]
mov rsi, [rbx+80h]
mov rdx, [rbx+378h]
mov edi, [rbx+138h]
mov rcx, [rax+3B8h]
cmp rcx, rdi
cmovb ecx, edi
lea r12, [rbp+var_48]
mov rdi, rbx
mov r8d, 1
mov r9, r12
call get_head_or_tail_page
test al, al
jnz short loc_5C5C3
mov rcx, [rbx]
mov rax, [rbx+80h]
mov rdx, [rax]
mov esi, [rbp+var_2C]
shl rdx, 8
or rdx, rsi
mov [rbx+98h], rdx
mov rcx, [rcx+6A8h]
test rcx, rcx
jz short loc_5C593
mov rdi, rbx
mov rsi, r15
call rcx
mov [rbx+0B0h], eax
mov rax, [rbx+80h]
loc_5C593:
xor r9d, r9d
cmp byte ptr [rax+15h], 0
setnz r9b
sub rsp, 8
mov rdi, rbx
xor esi, esi
mov rdx, r15
mov rcx, r14
mov r8, r14
push 0
push 1
push r12
call write_block_record
add rsp, 20h
test al, al
jz short loc_5C616
loc_5C5C3:
call _my_thread_var
mov r14d, [rax]
cmp dword ptr [rbx+644h], 0
jz short loc_5C5E1
mov rdi, rbx
mov esi, 0FFFFFFFFh
call _ma_bitmap_flushable
loc_5C5E1:
mov rdi, rbx
xor esi, esi
call _ma_unpin_all_pages
mov rax, [rbx+8]
mov qword ptr [rax+90h], 0
call _my_thread_var
mov [rax], r14d
mov rax, 0FFFFFFFFFFFFFFFFh
loc_5C609:
add rsp, 30h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_5C616:
mov rax, [rbx+98h]
jmp short loc_5C609
| long long ma_write_init_block_record(long long a1, long long a2)
{
long long v3; // rbx
long long v4; // r14
const char *v5; // rsi
unsigned long long v6; // rdi
unsigned long long v7; // rcx
long long v8; // rcx
long long v9; // rax
long long ( *v10)(long long, long long); // rcx
int v11; // r14d
_BYTE v13[28]; // [rsp+8h] [rbp-48h] BYREF
unsigned int v14; // [rsp+24h] [rbp-2Ch]
v3 = a1;
v4 = a1 + 128;
calc_record_size(a1, a2, a1 + 128);
ma_bitmap_flushable((_DWORD *)a1, 1);
v5 = (const char *)v4;
if ( !(unsigned __int8)ma_bitmap_find_place((long long *)a1, v4, v4) )
{
v5 = *(const char **)(a1 + 128);
v6 = *(unsigned int *)(a1 + 312);
v7 = *(_QWORD *)(*(_QWORD *)v3 + 952LL);
if ( v7 < v6 )
v7 = (unsigned int)v6;
a1 = v3;
if ( !(unsigned __int8)get_head_or_tail_page(v3, v5, *(_QWORD *)(v3 + 888), v7, 1LL, v13) )
{
v8 = *(_QWORD *)v3;
v9 = *(_QWORD *)(v3 + 128);
*(_QWORD *)(v3 + 152) = v14 | (*(_QWORD *)v9 << 8);
v10 = *(long long ( **)(long long, long long))(v8 + 1704);
if ( v10 )
{
*(_DWORD *)(v3 + 176) = v10(v3, a2);
v9 = *(_QWORD *)(v3 + 128);
}
a1 = v3;
v5 = 0LL;
if ( !(unsigned __int8)write_block_record(v3, 0, a2, v4, v4, *(_BYTE *)(v9 + 21) != 0, (long long)v13, 1LL, 0) )
return *(_QWORD *)(v3 + 152);
}
}
v11 = *(_DWORD *)my_thread_var(a1, v5);
if ( *(_DWORD *)(v3 + 1604) )
ma_bitmap_flushable((_DWORD *)v3, -1);
ma_unpin_all_pages(v3, 0LL);
*(_QWORD *)(*(_QWORD *)(v3 + 8) + 144LL) = 0LL;
*(_DWORD *)my_thread_var(v3, 0LL) = v11;
return -1LL;
}
| _ma_write_init_block_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x30
MOV R15,RSI
MOV RBX,RDI
LEA R14,[RDI + 0x80]
MOV RDX,R14
CALL 0x0015c61f
MOV RDI,RBX
MOV ESI,0x1
CALL 0x001416ed
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R14
CALL 0x001404d1
TEST AL,AL
JNZ 0x0015c5c3
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RBX + 0x80]
MOV RDX,qword ptr [RBX + 0x378]
MOV EDI,dword ptr [RBX + 0x138]
MOV RCX,qword ptr [RAX + 0x3b8]
CMP RCX,RDI
CMOVC ECX,EDI
LEA R12,[RBP + -0x48]
MOV RDI,RBX
MOV R8D,0x1
MOV R9,R12
CALL 0x00162e94
TEST AL,AL
JNZ 0x0015c5c3
MOV RCX,qword ptr [RBX]
MOV RAX,qword ptr [RBX + 0x80]
MOV RDX,qword ptr [RAX]
MOV ESI,dword ptr [RBP + -0x2c]
SHL RDX,0x8
OR RDX,RSI
MOV qword ptr [RBX + 0x98],RDX
MOV RCX,qword ptr [RCX + 0x6a8]
TEST RCX,RCX
JZ 0x0015c593
MOV RDI,RBX
MOV RSI,R15
CALL RCX
MOV dword ptr [RBX + 0xb0],EAX
MOV RAX,qword ptr [RBX + 0x80]
LAB_0015c593:
XOR R9D,R9D
CMP byte ptr [RAX + 0x15],0x0
SETNZ R9B
SUB RSP,0x8
MOV RDI,RBX
XOR ESI,ESI
MOV RDX,R15
MOV RCX,R14
MOV R8,R14
PUSH 0x0
PUSH 0x1
PUSH R12
CALL 0x001612a2
ADD RSP,0x20
TEST AL,AL
JZ 0x0015c616
LAB_0015c5c3:
CALL 0x001a1b22
MOV R14D,dword ptr [RAX]
CMP dword ptr [RBX + 0x644],0x0
JZ 0x0015c5e1
MOV RDI,RBX
MOV ESI,0xffffffff
CALL 0x001416ed
LAB_0015c5e1:
MOV RDI,RBX
XOR ESI,ESI
CALL 0x001597f8
MOV RAX,qword ptr [RBX + 0x8]
MOV qword ptr [RAX + 0x90],0x0
CALL 0x001a1b22
MOV dword ptr [RAX],R14D
MOV RAX,-0x1
LAB_0015c609:
ADD RSP,0x30
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0015c616:
MOV RAX,qword ptr [RBX + 0x98]
JMP 0x0015c609
|
long _ma_write_init_block_record(long *param_1,int8 param_2)
{
long *plVar1;
char cVar2;
int4 uVar3;
long *plVar4;
int4 *puVar5;
ulong uVar6;
int1 local_50 [28];
uint local_34;
plVar1 = param_1 + 0x10;
calc_record_size(param_1,param_2,plVar1);
_ma_bitmap_flushable(param_1,1);
cVar2 = _ma_bitmap_find_place(param_1,plVar1,plVar1);
if (cVar2 == '\0') {
uVar6 = *(ulong *)(*param_1 + 0x3b8) & 0xffffffff;
if (*(ulong *)(*param_1 + 0x3b8) < (ulong)*(uint *)(param_1 + 0x27)) {
uVar6 = (ulong)*(uint *)(param_1 + 0x27);
}
cVar2 = get_head_or_tail_page(param_1,param_1[0x10],param_1[0x6f],uVar6,1,local_50);
if (cVar2 == '\0') {
plVar4 = (long *)param_1[0x10];
param_1[0x13] = *plVar4 << 8 | (ulong)local_34;
if (*(code **)(*param_1 + 0x6a8) != (code *)0x0) {
uVar3 = (**(code **)(*param_1 + 0x6a8))(param_1,param_2);
*(int4 *)(param_1 + 0x16) = uVar3;
plVar4 = (long *)param_1[0x10];
}
cVar2 = write_block_record(param_1,0,param_2,plVar1,plVar1,
*(char *)((long)plVar4 + 0x15) != '\0',local_50,1,0);
if (cVar2 == '\0') {
return param_1[0x13];
}
}
}
puVar5 = (int4 *)_my_thread_var();
uVar3 = *puVar5;
if (*(int *)((long)param_1 + 0x644) != 0) {
_ma_bitmap_flushable(param_1,0xffffffff);
}
_ma_unpin_all_pages(param_1,0);
*(int8 *)(param_1[1] + 0x90) = 0;
puVar5 = (int4 *)_my_thread_var();
*puVar5 = uVar3;
return -1;
}
| |
43,260 | string_parse_kv_override(char const*, std::vector<llama_model_kv_override, std::allocator<llama_model_kv_override>>&) | llama.cpp/common/common.cpp | bool string_parse_kv_override(const char * data, std::vector<llama_model_kv_override> & overrides) {
const char * sep = strchr(data, '=');
if (sep == nullptr || sep - data >= 128) {
LOG_ERR("%s: malformed KV override '%s'\n", __func__, data);
return false;
}
llama_model_kv_override kvo;
std::strncpy(kvo.key, data, sep - data);
kvo.key[sep - data] = 0;
sep++;
if (strncmp(sep, "int:", 4) == 0) {
sep += 4;
kvo.tag = LLAMA_KV_OVERRIDE_TYPE_INT;
kvo.val_i64 = std::atol(sep);
} else if (strncmp(sep, "float:", 6) == 0) {
sep += 6;
kvo.tag = LLAMA_KV_OVERRIDE_TYPE_FLOAT;
kvo.val_f64 = std::atof(sep);
} else if (strncmp(sep, "bool:", 5) == 0) {
sep += 5;
kvo.tag = LLAMA_KV_OVERRIDE_TYPE_BOOL;
if (std::strcmp(sep, "true") == 0) {
kvo.val_bool = true;
} else if (std::strcmp(sep, "false") == 0) {
kvo.val_bool = false;
} else {
LOG_ERR("%s: invalid boolean value for KV override '%s'\n", __func__, data);
return false;
}
} else if (strncmp(sep, "str:", 4) == 0) {
sep += 4;
kvo.tag = LLAMA_KV_OVERRIDE_TYPE_STR;
if (strlen(sep) > 127) {
LOG_ERR("%s: malformed KV override '%s', value cannot exceed 127 chars\n", __func__, data);
return false;
}
strncpy(kvo.val_str, sep, 127);
kvo.val_str[127] = '\0';
} else {
LOG_ERR("%s: invalid type for KV override '%s'\n", __func__, data);
return false;
}
overrides.emplace_back(std::move(kvo));
return true;
} | O3 | cpp | string_parse_kv_override(char const*, std::vector<llama_model_kv_override, std::allocator<llama_model_kv_override>>&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x110, %rsp # imm = 0x110
movq %rsi, %r14
movq %rdi, %rbx
movl $0x3d, %esi
callq 0x218e0
testq %rax, %rax
je 0xf79c8
movq %rax, %r15
movq %rax, %r12
subq %rbx, %r12
cmpq $0x80, %r12
jl 0xf7a04
leaq 0x6ef01(%rip), %rax # 0x1668d0
cmpl $0x0, (%rax)
js 0xf7bb0
callq 0x10ca47
leaq 0x2e77f(%rip), %rdx # 0x126163
leaq 0x2e798(%rip), %rcx # 0x126183
xorl %ebp, %ebp
movq %rax, %rdi
movl $0x4, %esi
movq %rbx, %r8
xorl %eax, %eax
callq 0x10cae4
jmp 0xf7bb2
leaq 0xc(%rsp), %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x211f0
movb $0x0, 0xc(%rsp,%r12)
leaq 0x1(%r15), %r12
leaq 0x2e777(%rip), %rsi # 0x12619c
movl $0x4, %edx
movq %r12, %rdi
callq 0x21380
testl %eax, %eax
je 0xf7aa7
leaq 0x2e764(%rip), %rsi # 0x1261a1
movl $0x6, %edx
movq %r12, %rdi
callq 0x21380
testl %eax, %eax
je 0xf7ac5
leaq 0x2e753(%rip), %rsi # 0x1261a8
movl $0x5, %edx
movq %r12, %rdi
callq 0x21380
testl %eax, %eax
je 0xf7b20
leaq 0x2e76d(%rip), %rsi # 0x1261de
movl $0x4, %edx
movq %r12, %rdi
callq 0x21380
testl %eax, %eax
je 0xf7b77
leaq 0x6ee43(%rip), %rax # 0x1668d0
cmpl $0x0, (%rax)
js 0xf7bb0
callq 0x10ca47
leaq 0x2e780(%rip), %rdx # 0x126222
jmp 0xf79e4
addq $0x5, %r15
movl $0x0, 0x8(%rsp)
movq %r15, %rdi
callq 0x21a10
movq %rax, 0x90(%rsp)
jmp 0xf7ae2
addq $0x7, %r15
movl $0x1, 0x8(%rsp)
movq %r15, %rdi
callq 0x21e30
movsd %xmm0, 0x90(%rsp)
movq 0x8(%r14), %rax
cmpq 0x10(%r14), %rax
je 0xf7b08
leaq 0x8(%rsp), %rsi
movl $0x108, %edx # imm = 0x108
movq %rax, %rdi
callq 0x210e0
addq $0x108, 0x8(%r14) # imm = 0x108
jmp 0xf7b18
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0xfad5a
movb $0x1, %bpl
jmp 0xf7bb2
addq $0x6, %r15
movl $0x2, 0x8(%rsp)
leaq 0x1d410(%rip), %rsi # 0x114f43
movq %r15, %rdi
callq 0x21e40
testl %eax, %eax
je 0xf7bc4
leaq 0x20326(%rip), %rsi # 0x117e70
movq %r15, %rdi
callq 0x21e40
testl %eax, %eax
je 0xf7bf2
leaq 0x6ed6f(%rip), %rax # 0x1668d0
cmpl $0x0, (%rax)
js 0xf7bb0
callq 0x10ca47
leaq 0x2e63c(%rip), %rdx # 0x1261ae
jmp 0xf79e4
addq $0x5, %r15
movl $0x3, 0x8(%rsp)
movq %r15, %rdi
callq 0x21660
cmpq $0x80, %rax
jb 0xf7bd1
leaq 0x6ed36(%rip), %rax # 0x1668d0
cmpl $0x0, (%rax)
js 0xf7bb0
callq 0x10ca47
leaq 0x2e638(%rip), %rdx # 0x1261e3
jmp 0xf79e4
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x110, %rsp # imm = 0x110
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, 0x90(%rsp)
jmp 0xf7ae2
leaq 0x90(%rsp), %rbx
movl $0x7f, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x211f0
movb $0x0, 0x7f(%rbx)
jmp 0xf7ae2
movb $0x0, 0x90(%rsp)
jmp 0xf7ae2
| _Z24string_parse_kv_overridePKcRSt6vectorI23llama_model_kv_overrideSaIS2_EE:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 110h
mov r14, rsi
mov rbx, rdi
mov esi, 3Dh ; '='
call _strchr
test rax, rax
jz short loc_F79C8
mov r15, rax
mov r12, rax
sub r12, rbx
cmp r12, 80h
jl short loc_F7A04
loc_F79C8:
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js loc_F7BB0
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aSMalformedKvOv; "%s: malformed KV override '%s'\n"
loc_F79E4:
lea rcx, aStringParseKvO; "string_parse_kv_override"
xor ebp, ebp
mov rdi, rax
mov esi, 4
mov r8, rbx
xor eax, eax
call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...)
jmp loc_F7BB2
loc_F7A04:
lea rdi, [rsp+138h+var_12C]
mov rsi, rbx
mov rdx, r12
call _strncpy
mov [rsp+r12+138h+var_12C], 0
lea r12, [r15+1]
lea rsi, aInt; "int:"
mov edx, 4
mov rdi, r12
call _strncmp
test eax, eax
jz short loc_F7AA7
lea rsi, aFloat_0; "float:"
mov edx, 6
mov rdi, r12
call _strncmp
test eax, eax
jz short loc_F7AC5
lea rsi, aBool; "bool:"
mov edx, 5
mov rdi, r12
call _strncmp
test eax, eax
jz loc_F7B20
lea rsi, aStr; "str:"
mov edx, 4
mov rdi, r12
call _strncmp
test eax, eax
jz loc_F7B77
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js loc_F7BB0
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aSInvalidTypeFo; "%s: invalid type for KV override '%s'\n"
jmp loc_F79E4
loc_F7AA7:
add r15, 5
mov [rsp+138h+var_130], 0
mov rdi, r15
call _atol
mov [rsp+138h+var_A8], rax
jmp short loc_F7AE2
loc_F7AC5:
add r15, 7
mov [rsp+138h+var_130], 1
mov rdi, r15
call _atof
movsd [rsp+138h+var_A8], xmm0
loc_F7AE2:
mov rax, [r14+8]
cmp rax, [r14+10h]
jz short loc_F7B08
lea rsi, [rsp+138h+var_130]
mov edx, 108h
mov rdi, rax
call _memcpy
add qword ptr [r14+8], 108h
jmp short loc_F7B18
loc_F7B08:
lea rdx, [rsp+138h+var_130]
mov rdi, r14
mov rsi, rax
call _ZNSt6vectorI23llama_model_kv_overrideSaIS0_EE17_M_realloc_insertIJS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_; std::vector<llama_model_kv_override>::_M_realloc_insert<llama_model_kv_override>(__gnu_cxx::__normal_iterator<llama_model_kv_override*,std::vector<llama_model_kv_override>>,llama_model_kv_override &&)
loc_F7B18:
mov bpl, 1
jmp loc_F7BB2
loc_F7B20:
add r15, 6
mov [rsp+138h+var_130], 2
lea rsi, aTrue; "true"
mov rdi, r15
call _strcmp
test eax, eax
jz loc_F7BC4
lea rsi, aAdvancedOption+0ABh; "false"
mov rdi, r15
call _strcmp
test eax, eax
jz loc_F7BF2
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js short loc_F7BB0
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aSInvalidBoolea; "%s: invalid boolean value for KV overri"...
jmp loc_F79E4
loc_F7B77:
add r15, 5
mov [rsp+138h+var_130], 3
mov rdi, r15
call _strlen
cmp rax, 80h
jb short loc_F7BD1
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 0
js short loc_F7BB0
call _Z15common_log_mainv; common_log_main(void)
lea rdx, aSMalformedKvOv_0; "%s: malformed KV override '%s', value c"...
jmp loc_F79E4
loc_F7BB0:
xor ebp, ebp
loc_F7BB2:
mov eax, ebp
add rsp, 110h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_F7BC4:
mov byte ptr [rsp+138h+var_A8], 1
jmp loc_F7AE2
loc_F7BD1:
lea rbx, [rsp+138h+var_A8]
mov edx, 7Fh
mov rdi, rbx
mov rsi, r15
call _strncpy
mov byte ptr [rbx+7Fh], 0
jmp loc_F7AE2
loc_F7BF2:
mov byte ptr [rsp+138h+var_A8], 0
jmp loc_F7AE2
| long long string_parse_kv_override(long long a1, long long a2)
{
unsigned int v2; // ebp
long long v3; // rax
long long v4; // r15
long long v5; // r12
int v6; // eax
int v7; // r9d
const char *v8; // rdx
long long v9; // r15
long long v10; // r15
int v12; // [rsp+8h] [rbp-130h] BYREF
_BYTE v13[132]; // [rsp+Ch] [rbp-12Ch] BYREF
long long v14[15]; // [rsp+90h] [rbp-A8h] BYREF
char v15; // [rsp+10Fh] [rbp-29h]
v3 = strchr(a1, 61LL);
if ( !v3 || (v4 = v3, v5 = v3 - a1, v3 - a1 >= 128) )
{
if ( common_log_verbosity_thold >= 0 )
{
v6 = common_log_main();
v8 = "%s: malformed KV override '%s'\n";
LABEL_5:
v2 = 0;
common_log_add(v6, 4, (_DWORD)v8, (unsigned int)"string_parse_kv_override", a1, v7);
return v2;
}
return 0;
}
strncpy(v13, a1, v3 - a1);
v13[v5] = 0;
if ( !(unsigned int)strncmp(v4 + 1, "int:", 4LL) )
{
v12 = 0;
v14[0] = atol(v4 + 5);
}
else if ( !(unsigned int)strncmp(v4 + 1, "float:", 6LL) )
{
v12 = 1;
v14[0] = atof(v4 + 7);
}
else if ( !(unsigned int)strncmp(v4 + 1, "bool:", 5LL) )
{
v9 = v4 + 6;
v12 = 2;
if ( !(unsigned int)strcmp(v9, "true") )
{
LOBYTE(v14[0]) = 1;
}
else
{
if ( (unsigned int)strcmp(v9, "false") )
{
if ( common_log_verbosity_thold >= 0 )
{
v6 = common_log_main();
v8 = "%s: invalid boolean value for KV override '%s'\n";
goto LABEL_5;
}
return 0;
}
LOBYTE(v14[0]) = 0;
}
}
else
{
if ( (unsigned int)strncmp(v4 + 1, "str:", 4LL) )
{
if ( common_log_verbosity_thold >= 0 )
{
v6 = common_log_main();
v8 = "%s: invalid type for KV override '%s'\n";
goto LABEL_5;
}
return 0;
}
v10 = v4 + 5;
v12 = 3;
if ( (unsigned long long)strlen(v10) >= 0x80 )
{
if ( common_log_verbosity_thold >= 0 )
{
v6 = common_log_main();
v8 = "%s: malformed KV override '%s', value cannot exceed 127 chars\n";
goto LABEL_5;
}
return 0;
}
strncpy(v14, v10, 127LL);
v15 = 0;
}
if ( *(_QWORD *)(a2 + 8) == *(_QWORD *)(a2 + 16) )
{
std::vector<llama_model_kv_override>::_M_realloc_insert<llama_model_kv_override>(a2, *(_QWORD *)(a2 + 8), &v12);
}
else
{
memcpy(*(_QWORD *)(a2 + 8), &v12, 264LL);
*(_QWORD *)(a2 + 8) += 264LL;
}
LOBYTE(v2) = 1;
return v2;
}
| string_parse_kv_override:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x110
MOV R14,RSI
MOV RBX,RDI
MOV ESI,0x3d
CALL 0x001218e0
TEST RAX,RAX
JZ 0x001f79c8
MOV R15,RAX
MOV R12,RAX
SUB R12,RBX
CMP R12,0x80
JL 0x001f7a04
LAB_001f79c8:
LEA RAX,[0x2668d0]
CMP dword ptr [RAX],0x0
JS 0x001f7bb0
CALL 0x0020ca47
LEA RDX,[0x226163]
LAB_001f79e4:
LEA RCX,[0x226183]
XOR EBP,EBP
MOV RDI,RAX
MOV ESI,0x4
MOV R8,RBX
XOR EAX,EAX
CALL 0x0020cae4
JMP 0x001f7bb2
LAB_001f7a04:
LEA RDI,[RSP + 0xc]
MOV RSI,RBX
MOV RDX,R12
CALL 0x001211f0
MOV byte ptr [RSP + R12*0x1 + 0xc],0x0
LEA R12,[R15 + 0x1]
LEA RSI,[0x22619c]
MOV EDX,0x4
MOV RDI,R12
CALL 0x00121380
TEST EAX,EAX
JZ 0x001f7aa7
LEA RSI,[0x2261a1]
MOV EDX,0x6
MOV RDI,R12
CALL 0x00121380
TEST EAX,EAX
JZ 0x001f7ac5
LEA RSI,[0x2261a8]
MOV EDX,0x5
MOV RDI,R12
CALL 0x00121380
TEST EAX,EAX
JZ 0x001f7b20
LEA RSI,[0x2261de]
MOV EDX,0x4
MOV RDI,R12
CALL 0x00121380
TEST EAX,EAX
JZ 0x001f7b77
LEA RAX,[0x2668d0]
CMP dword ptr [RAX],0x0
JS 0x001f7bb0
CALL 0x0020ca47
LEA RDX,[0x226222]
JMP 0x001f79e4
LAB_001f7aa7:
ADD R15,0x5
MOV dword ptr [RSP + 0x8],0x0
MOV RDI,R15
CALL 0x00121a10
MOV qword ptr [RSP + 0x90],RAX
JMP 0x001f7ae2
LAB_001f7ac5:
ADD R15,0x7
MOV dword ptr [RSP + 0x8],0x1
MOV RDI,R15
CALL 0x00121e30
MOVSD qword ptr [RSP + 0x90],XMM0
LAB_001f7ae2:
MOV RAX,qword ptr [R14 + 0x8]
CMP RAX,qword ptr [R14 + 0x10]
JZ 0x001f7b08
LEA RSI,[RSP + 0x8]
MOV EDX,0x108
MOV RDI,RAX
CALL 0x001210e0
ADD qword ptr [R14 + 0x8],0x108
JMP 0x001f7b18
LAB_001f7b08:
LEA RDX,[RSP + 0x8]
MOV RDI,R14
MOV RSI,RAX
CALL 0x001fad5a
LAB_001f7b18:
MOV BPL,0x1
JMP 0x001f7bb2
LAB_001f7b20:
ADD R15,0x6
MOV dword ptr [RSP + 0x8],0x2
LEA RSI,[0x214f43]
MOV RDI,R15
CALL 0x00121e40
TEST EAX,EAX
JZ 0x001f7bc4
LEA RSI,[0x217e70]
MOV RDI,R15
CALL 0x00121e40
TEST EAX,EAX
JZ 0x001f7bf2
LEA RAX,[0x2668d0]
CMP dword ptr [RAX],0x0
JS 0x001f7bb0
CALL 0x0020ca47
LEA RDX,[0x2261ae]
JMP 0x001f79e4
LAB_001f7b77:
ADD R15,0x5
MOV dword ptr [RSP + 0x8],0x3
MOV RDI,R15
CALL 0x00121660
CMP RAX,0x80
JC 0x001f7bd1
LEA RAX,[0x2668d0]
CMP dword ptr [RAX],0x0
JS 0x001f7bb0
CALL 0x0020ca47
LEA RDX,[0x2261e3]
JMP 0x001f79e4
LAB_001f7bb0:
XOR EBP,EBP
LAB_001f7bb2:
MOV EAX,EBP
ADD RSP,0x110
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001f7bc4:
MOV byte ptr [RSP + 0x90],0x1
JMP 0x001f7ae2
LAB_001f7bd1:
LEA RBX,[RSP + 0x90]
MOV EDX,0x7f
MOV RDI,RBX
MOV RSI,R15
CALL 0x001211f0
MOV byte ptr [RBX + 0x7f],0x0
JMP 0x001f7ae2
LAB_001f7bf2:
MOV byte ptr [RSP + 0x90],0x0
JMP 0x001f7ae2
|
/* string_parse_kv_override(char const*, std::vector<llama_model_kv_override,
std::allocator<llama_model_kv_override> >&) */
ulong string_parse_kv_override(char *param_1,vector *param_2)
{
char *__s1;
void *__dest;
int iVar1;
char *pcVar2;
int8 uVar3;
int8 unaff_RBP;
ulong uVar4;
size_t sVar5;
int4 local_130;
char local_12c [132];
double local_a8 [15];
int1 local_29;
pcVar2 = strchr(param_1,0x3d);
if ((pcVar2 == (char *)0x0) || (sVar5 = (long)pcVar2 - (long)param_1, 0x7f < (long)sVar5)) {
if (common_log_verbosity_thold < 0) goto LAB_001f7bb0;
uVar3 = common_log_main();
pcVar2 = "%s: malformed KV override \'%s\'\n";
goto LAB_001f79e4;
}
strncpy(local_12c,param_1,sVar5);
local_12c[sVar5] = '\0';
__s1 = pcVar2 + 1;
iVar1 = strncmp(__s1,"int:",4);
if (iVar1 == 0) {
local_130 = 0;
local_a8[0] = (double)atol(pcVar2 + 5);
}
else {
iVar1 = strncmp(__s1,"float:",6);
if (iVar1 == 0) {
local_130 = 1;
local_a8[0] = atof(pcVar2 + 7);
}
else {
iVar1 = strncmp(__s1,"bool:",5);
if (iVar1 != 0) {
iVar1 = strncmp(__s1,"str:",4);
if (iVar1 == 0) {
local_130 = 3;
sVar5 = strlen(pcVar2 + 5);
if (sVar5 < 0x80) {
strncpy((char *)local_a8,pcVar2 + 5,0x7f);
local_29 = 0;
goto LAB_001f7ae2;
}
if (common_log_verbosity_thold < 0) goto LAB_001f7bb0;
uVar3 = common_log_main();
pcVar2 = "%s: malformed KV override \'%s\', value cannot exceed 127 chars\n";
}
else {
if (common_log_verbosity_thold < 0) {
LAB_001f7bb0:
uVar4 = 0;
goto LAB_001f7bb2;
}
uVar3 = common_log_main();
pcVar2 = "%s: invalid type for KV override \'%s\'\n";
}
LAB_001f79e4:
uVar4 = 0;
common_log_add(uVar3,4,pcVar2,"string_parse_kv_override",param_1);
goto LAB_001f7bb2;
}
local_130 = 2;
iVar1 = strcmp(pcVar2 + 6,"true");
if (iVar1 == 0) {
local_a8[0] = (double)CONCAT71(local_a8[0]._1_7_,1);
}
else {
iVar1 = strcmp(pcVar2 + 6,"false");
if (iVar1 != 0) {
if (common_log_verbosity_thold < 0) goto LAB_001f7bb0;
uVar3 = common_log_main();
pcVar2 = "%s: invalid boolean value for KV override \'%s\'\n";
goto LAB_001f79e4;
}
local_a8[0] = (double)((ulong)local_a8[0] & 0xffffffffffffff00);
}
}
}
LAB_001f7ae2:
__dest = *(void **)(param_2 + 8);
if (__dest == *(void **)(param_2 + 0x10)) {
std::vector<llama_model_kv_override,std::allocator<llama_model_kv_override>>::
_M_realloc_insert<llama_model_kv_override>
((vector<llama_model_kv_override,std::allocator<llama_model_kv_override>> *)param_2,
__dest,&local_130);
}
else {
memcpy(__dest,&local_130,0x108);
*(long *)(param_2 + 8) = *(long *)(param_2 + 8) + 0x108;
}
uVar4 = CONCAT71((int7)((ulong)unaff_RBP >> 8),1);
LAB_001f7bb2:
return uVar4 & 0xffffffff;
}
| |
43,261 | 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;
} | O0 | c | ftparser_alloc_param:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0xd0(%rax)
jne 0xa25c4
leaq 0xbd7cd3(%rip), %rax # 0xc7a244
movl (%rax), %edi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0x34c(%rax), %eax
movl %eax, %esi
shlq $0x7, %rsi
movl $0x30, %edx
callq 0xf3800
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xd0(%rax)
leaq 0xbd7ca3(%rip), %rax # 0xc7a248
movl (%rax), %edi
movq -0x8(%rbp), %rsi
addq $0x90, %rsi
movl $0x10000, %edx # imm = 0x10000
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rcx
callq 0xecec0
movq -0x8(%rbp), %rax
movq 0xd0(%rax), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ftparser_alloc_param:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
cmp qword ptr [rax+0D0h], 0
jnz short loc_A25C4
lea rax, mi_key_memory_FTPARSER_PARAM
mov edi, [rax]
mov rax, [rbp+var_8]
mov rax, [rax]
mov eax, [rax+34Ch]
mov esi, eax
shl rsi, 7
mov edx, 30h ; '0'
call my_malloc
mov rcx, rax
mov rax, [rbp+var_8]
mov [rax+0D0h], rcx
lea rax, mi_key_memory_ft_memroot
mov edi, [rax]
mov rsi, [rbp+var_8]
add rsi, 90h
mov edx, 10000h
xor eax, eax
mov r8d, eax
mov rcx, r8
call init_alloc_root
loc_A25C4:
mov rax, [rbp+var_8]
mov rax, [rax+0D0h]
add rsp, 10h
pop rbp
retn
| long long ftparser_alloc_param(_QWORD *a1)
{
if ( !a1[26] )
{
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);
}
return a1[26];
}
| ftparser_alloc_param:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0xd0],0x0
JNZ 0x001a25c4
LEA RAX,[0xd7a244]
MOV EDI,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x34c]
MOV ESI,EAX
SHL RSI,0x7
MOV EDX,0x30
CALL 0x001f3800
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0xd0],RCX
LEA RAX,[0xd7a248]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x90
MOV EDX,0x10000
XOR EAX,EAX
MOV R8D,EAX
MOV RCX,R8
CALL 0x001ecec0
LAB_001a25c4:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0xd0]
ADD RSP,0x10
POP RBP
RET
|
long ftparser_alloc_param(long *param_1)
{
long lVar1;
if (param_1[0x1a] == 0) {
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);
}
return param_1[0x1a];
}
| |
43,262 | my_uca_generate_pages | eloqsql/strings/ctype-uca.c | static my_bool
my_uca_generate_pages(MY_CHARSET_LOADER *loader,
MY_UCA_WEIGHT_LEVEL *dst,
const MY_UCA_WEIGHT_LEVEL *src,
uint npages)
{
uint page;
for (page= 0; page < npages; page++)
{
if (dst->weights[page])
{
/* A page with explicit weights with no special rules */
continue;
}
if (!dst->lengths[page])
{
/*
A page with implicit weights with no special rules.
Keep dst->weights[page]==NULL and dst->lengths[page]==0.
Weights for this page will be generated at run time algorithmically,
using my_uca_scanner_next_implicit().
*/
continue;
}
/* Found a page with some special rules. */
if (my_uca_generate_page(loader, dst, src, page))
return TRUE;
}
return FALSE;
} | O0 | c | my_uca_generate_pages:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jae 0x9fb68
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x28(%rbp), %ecx
cmpq $0x0, (%rax,%rcx,8)
je 0x9fb2a
jmp 0x9fb5d
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x28(%rbp), %ecx
cmpb $0x0, (%rax,%rcx)
jne 0x9fb3d
jmp 0x9fb5d
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x28(%rbp), %ecx
callq 0x9fed0
cmpb $0x0, %al
je 0x9fb5b
movb $0x1, -0x1(%rbp)
jmp 0x9fb6c
jmp 0x9fb5d
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x9fb0e
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_uca_generate_pages:
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_24], ecx
mov [rbp+var_28], 0
loc_9FB0E:
mov eax, [rbp+var_28]
cmp eax, [rbp+var_24]
jnb short loc_9FB68
mov rax, [rbp+var_18]
mov rax, [rax+10h]
mov ecx, [rbp+var_28]
cmp qword ptr [rax+rcx*8], 0
jz short loc_9FB2A
jmp short loc_9FB5D
loc_9FB2A:
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov ecx, [rbp+var_28]
cmp byte ptr [rax+rcx], 0
jnz short loc_9FB3D
jmp short loc_9FB5D
loc_9FB3D:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov ecx, [rbp+var_28]
call my_uca_generate_page
cmp al, 0
jz short loc_9FB5B
mov [rbp+var_1], 1
jmp short loc_9FB6C
loc_9FB5B:
jmp short $+2
loc_9FB5D:
mov eax, [rbp+var_28]
add eax, 1
mov [rbp+var_28], eax
jmp short loc_9FB0E
loc_9FB68:
mov [rbp+var_1], 0
loc_9FB6C:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char my_uca_generate_pages(long long a1, long long a2, long long a3, unsigned int a4)
{
unsigned int i; // [rsp+8h] [rbp-28h]
for ( i = 0; i < a4; ++i )
{
if ( !*(_QWORD *)(*(_QWORD *)(a2 + 16) + 8LL * i)
&& *(_BYTE *)(*(_QWORD *)(a2 + 8) + i)
&& (unsigned __int8)my_uca_generate_page(a1, a2, a3, i) )
{
return 1;
}
}
return 0;
}
| my_uca_generate_pages:
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 dword ptr [RBP + -0x24],ECX
MOV dword ptr [RBP + -0x28],0x0
LAB_0019fb0e:
MOV EAX,dword ptr [RBP + -0x28]
CMP EAX,dword ptr [RBP + -0x24]
JNC 0x0019fb68
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOV ECX,dword ptr [RBP + -0x28]
CMP qword ptr [RAX + RCX*0x8],0x0
JZ 0x0019fb2a
JMP 0x0019fb5d
LAB_0019fb2a:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x28]
CMP byte ptr [RAX + RCX*0x1],0x0
JNZ 0x0019fb3d
JMP 0x0019fb5d
LAB_0019fb3d:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x28]
CALL 0x0019fed0
CMP AL,0x0
JZ 0x0019fb5b
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0019fb6c
LAB_0019fb5b:
JMP 0x0019fb5d
LAB_0019fb5d:
MOV EAX,dword ptr [RBP + -0x28]
ADD EAX,0x1
MOV dword ptr [RBP + -0x28],EAX
JMP 0x0019fb0e
LAB_0019fb68:
MOV byte ptr [RBP + -0x1],0x0
LAB_0019fb6c:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 my_uca_generate_pages(int8 param_1,long param_2,int8 param_3,uint param_4)
{
char cVar1;
uint local_30;
local_30 = 0;
while( true ) {
if (param_4 <= local_30) {
return 0;
}
if (((*(long *)(*(long *)(param_2 + 0x10) + (ulong)local_30 * 8) == 0) &&
(*(char *)(*(long *)(param_2 + 8) + (ulong)local_30) != '\0')) &&
(cVar1 = my_uca_generate_page(param_1,param_2,param_3,local_30), cVar1 != '\0')) break;
local_30 = local_30 + 1;
}
return 1;
}
| |
43,263 | PFS_table_share::destroy_lock_stat() | eloqsql/storage/perfschema/pfs_instr_class.cc | void PFS_table_share::destroy_lock_stat()
{
void *addr= & this->m_race_lock_stat;
void * volatile * typed_addr= static_cast<void * volatile *>(addr);
void *new_ptr= NULL;
void *old_ptr;
old_ptr= my_atomic_fasptr(typed_addr, new_ptr);
if (old_ptr != NULL)
{
PFS_table_share_lock *pfs;
pfs= static_cast<PFS_table_share_lock *>(old_ptr);
release_table_share_lock_stat(pfs);
}
} | O3 | cpp | PFS_table_share::destroy_lock_stat():
xorl %eax, %eax
xchgq %rax, 0x1c0(%rdi)
testq %rax, %rax
je 0x35016
pushq %rbp
movq %rsp, %rbp
movq $0x0, 0x168(%rax)
movq 0x170(%rax), %rcx
movl (%rax), %edx
andl $-0x4, %edx
xchgl %edx, (%rax)
xorl %eax, %eax
movb %al, (%rcx)
leaq 0x384c86(%rip), %rcx # 0x3b9c98
movb %al, 0x9(%rcx)
popq %rbp
retq
nop
| _ZN15PFS_table_share17destroy_lock_statEv:
xor eax, eax
xchg rax, [rdi+1C0h]
test rax, rax
jz short locret_35016
push rbp
mov rbp, rsp
mov qword ptr [rax+168h], 0
mov rcx, [rax+170h]
mov edx, [rax]
and edx, 0FFFFFFFCh
xchg edx, [rax]
xor eax, eax
mov [rcx], al
lea rcx, global_table_share_lock_container
mov [rcx+9], al
pop rbp
locret_35016:
retn
| long long PFS_table_share::destroy_lock_stat(PFS_table_share *this)
{
long long result; // rax
_BYTE *v2; // rcx
result = _InterlockedExchange64((volatile long long *)this + 56, 0LL);
if ( result )
{
*(_QWORD *)(result + 360) = 0LL;
v2 = *(_BYTE **)(result + 368);
_InterlockedExchange((volatile __int32 *)result, *(_DWORD *)result & 0xFFFFFFFC);
result = 0LL;
*v2 = 0;
*((_BYTE *)&global_table_share_lock_container + 9) = 0;
}
return result;
}
| destroy_lock_stat:
XOR EAX,EAX
XCHG qword ptr [RDI + 0x1c0],RAX
TEST RAX,RAX
JZ 0x00135016
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RAX + 0x168],0x0
MOV RCX,qword ptr [RAX + 0x170]
MOV EDX,dword ptr [RAX]
AND EDX,0xfffffffc
XCHG dword ptr [RAX],EDX
XOR EAX,EAX
MOV byte ptr [RCX],AL
LEA RCX,[0x4b9c98]
MOV byte ptr [RCX + 0x9],AL
POP RBP
LAB_00135016:
RET
|
/* PFS_table_share::destroy_lock_stat() */
void __thiscall PFS_table_share::destroy_lock_stat(PFS_table_share *this)
{
uint *puVar1;
LOCK();
puVar1 = *(uint **)(this + 0x1c0);
*(long *)(this + 0x1c0) = 0;
UNLOCK();
if (puVar1 != (uint *)0x0) {
puVar1[0x5a] = 0;
puVar1[0x5b] = 0;
LOCK();
*puVar1 = *puVar1 & 0xfffffffc;
UNLOCK();
**(int1 **)(puVar1 + 0x5c) = 0;
global_table_share_lock_container[9] = 0;
}
return;
}
| |
43,264 | JS_HasProperty | bluesky950520[P]quickjs/quickjs.c | int JS_HasProperty(JSContext *ctx, JSValue obj, JSAtom prop)
{
JSObject *p;
int ret;
JSValue obj1;
if (unlikely(JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT))
return FALSE;
p = JS_VALUE_GET_OBJ(obj);
for(;;) {
if (p->is_exotic) {
const JSClassExoticMethods *em = ctx->rt->class_array[p->class_id].exotic;
if (em && em->has_property) {
/* has_property can free the prototype */
obj1 = js_dup(JS_MKPTR(JS_TAG_OBJECT, p));
ret = em->has_property(ctx, obj1, prop);
JS_FreeValue(ctx, obj1);
return ret;
}
}
/* JS_GetOwnPropertyInternal can free the prototype */
js_dup(JS_MKPTR(JS_TAG_OBJECT, p));
ret = JS_GetOwnPropertyInternal(ctx, NULL, p, prop);
JS_FreeValue(ctx, JS_MKPTR(JS_TAG_OBJECT, p));
if (ret != 0)
return ret;
if (p->class_id >= JS_CLASS_UINT8C_ARRAY &&
p->class_id <= JS_CLASS_FLOAT64_ARRAY) {
ret = JS_AtomIsNumericIndex(ctx, prop);
if (ret != 0) {
if (ret < 0)
return -1;
return FALSE;
}
}
p = p->shape->proto;
if (!p)
break;
}
return FALSE;
} | O1 | c | JS_HasProperty:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, (%rsp)
cmpl $-0x1, %edx
jne 0xf842
movl %ecx, %ebx
movq %rdi, %r14
movq (%rsp), %r15
pushq $-0x1
popq %r12
testb $0x4, 0x5(%r15)
je 0xf7de
movq 0x18(%r14), %rax
movq 0x80(%rax), %rax
movzwl 0x6(%r15), %ecx
imulq $0x28, %rcx, %rcx
movq 0x20(%rax,%rcx), %rcx
movb $0x1, %al
testq %rcx, %rcx
je 0xf7da
movq 0x20(%rcx), %r8
testq %r8, %r8
je 0xf7da
incl (%r15)
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movl %ebx, %ecx
callq *%r8
movl %eax, %ebp
movq 0x18(%r14), %rdi
movl (%r15), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r15)
cmpl $0x1, %eax
jg 0xf7d8
movq %r15, %rsi
movq %r12, %rdx
callq 0x21266
xorl %eax, %eax
testb %al, %al
je 0xf850
incl (%r15)
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
movl %ebx, %ecx
callq 0x23bd9
movl %eax, %r13d
movq 0x18(%r14), %rdi
movl (%r15), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r15)
cmpl $0x1, %eax
jg 0xf810
movq %r15, %rsi
movq %r12, %rdx
callq 0x21266
testl %r13d, %r13d
jne 0xf846
movzwl 0x6(%r15), %eax
addl $-0x15, %eax
cmpw $0xb, %ax
ja 0xf831
movq %r14, %rdi
movl %ebx, %esi
callq 0x24060
testl %eax, %eax
jne 0xf84b
movq 0x18(%r15), %rax
movq 0x38(%rax), %r15
testq %r15, %r15
jne 0xf778
xorl %ebp, %ebp
jmp 0xf850
movl %r13d, %ebp
jmp 0xf850
sarl $0x1f, %eax
movl %eax, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| JS_HasProperty:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov [rsp+38h+var_38], rsi
cmp edx, 0FFFFFFFFh
jnz loc_F842
mov ebx, ecx
mov r14, rdi
mov r15, [rsp+38h+var_38]
push 0FFFFFFFFFFFFFFFFh
pop r12
loc_F778:
test byte ptr [r15+5], 4
jz short loc_F7DE
mov rax, [r14+18h]
mov rax, [rax+80h]
movzx ecx, word ptr [r15+6]
imul rcx, 28h ; '('
mov rcx, [rax+rcx+20h]
mov al, 1
test rcx, rcx
jz short loc_F7DA
mov r8, [rcx+20h]
test r8, r8
jz short loc_F7DA
inc dword ptr [r15]
mov rdi, r14
mov rsi, r15
mov rdx, r12
mov ecx, ebx
call r8
mov ebp, eax
mov rdi, [r14+18h]
mov eax, [r15]
lea ecx, [rax-1]
mov [r15], ecx
cmp eax, 1
jg short loc_F7D8
mov rsi, r15
mov rdx, r12
call js_free_value_rt
loc_F7D8:
xor eax, eax
loc_F7DA:
test al, al
jz short loc_F850
loc_F7DE:
inc dword ptr [r15]
mov rdi, r14
xor esi, esi
mov rdx, r15
mov ecx, ebx
call JS_GetOwnPropertyInternal
mov r13d, eax
mov rdi, [r14+18h]
mov eax, [r15]
lea ecx, [rax-1]
mov [r15], ecx
cmp eax, 1
jg short loc_F810
mov rsi, r15
mov rdx, r12
call js_free_value_rt
loc_F810:
test r13d, r13d
jnz short loc_F846
movzx eax, word ptr [r15+6]
add eax, 0FFFFFFEBh
cmp ax, 0Bh
ja short loc_F831
mov rdi, r14
mov esi, ebx
call JS_AtomIsNumericIndex
test eax, eax
jnz short loc_F84B
loc_F831:
mov rax, [r15+18h]
mov r15, [rax+38h]
test r15, r15
jnz loc_F778
loc_F842:
xor ebp, ebp
jmp short loc_F850
loc_F846:
mov ebp, r13d
jmp short loc_F850
loc_F84B:
sar eax, 1Fh
mov ebp, eax
loc_F850:
mov eax, ebp
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long JS_HasProperty(long long a1, long long a2, int a3, unsigned int a4)
{
unsigned int v4; // ebp
long long v8; // rcx
char v9; // al
long long ( *v10)(long long, long long, long long, _QWORD); // r8
long long v11; // rdi
int v12; // eax
unsigned int OwnPropertyInternal; // r13d
long long v14; // rdi
int v15; // eax
int IsNumericIndex; // eax
if ( a3 == -1 )
{
while ( 1 )
{
if ( (*(_BYTE *)(a2 + 5) & 4) != 0 )
{
v8 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 128LL) + 40LL * *(unsigned __int16 *)(a2 + 6) + 32);
v9 = 1;
if ( v8 )
{
v10 = *(long long ( **)(long long, long long, long long, _QWORD))(v8 + 32);
if ( v10 )
{
++*(_DWORD *)a2;
v4 = v10(a1, a2, -1LL, a4);
v11 = *(_QWORD *)(a1 + 24);
v12 = (*(_DWORD *)a2)--;
if ( v12 <= 1 )
js_free_value_rt(v11, a2, -1LL);
v9 = 0;
}
}
if ( !v9 )
break;
}
++*(_DWORD *)a2;
OwnPropertyInternal = JS_GetOwnPropertyInternal(a1, 0LL, a2, a4);
v14 = *(_QWORD *)(a1 + 24);
v15 = (*(_DWORD *)a2)--;
if ( v15 <= 1 )
js_free_value_rt(v14, a2, -1LL);
if ( OwnPropertyInternal )
return OwnPropertyInternal;
if ( (unsigned __int16)(*(_WORD *)(a2 + 6) - 21) <= 0xBu )
{
IsNumericIndex = JS_AtomIsNumericIndex(a1, a4);
if ( IsNumericIndex )
return (unsigned int)(IsNumericIndex >> 31);
}
a2 = *(_QWORD *)(*(_QWORD *)(a2 + 24) + 56LL);
if ( !a2 )
return 0;
}
}
else
{
return 0;
}
return v4;
}
| |||
43,265 | JS_HasProperty | bluesky950520[P]quickjs/quickjs.c | int JS_HasProperty(JSContext *ctx, JSValue obj, JSAtom prop)
{
JSObject *p;
int ret;
JSValue obj1;
if (unlikely(JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT))
return FALSE;
p = JS_VALUE_GET_OBJ(obj);
for(;;) {
if (p->is_exotic) {
const JSClassExoticMethods *em = ctx->rt->class_array[p->class_id].exotic;
if (em && em->has_property) {
/* has_property can free the prototype */
obj1 = js_dup(JS_MKPTR(JS_TAG_OBJECT, p));
ret = em->has_property(ctx, obj1, prop);
JS_FreeValue(ctx, obj1);
return ret;
}
}
/* JS_GetOwnPropertyInternal can free the prototype */
js_dup(JS_MKPTR(JS_TAG_OBJECT, p));
ret = JS_GetOwnPropertyInternal(ctx, NULL, p, prop);
JS_FreeValue(ctx, JS_MKPTR(JS_TAG_OBJECT, p));
if (ret != 0)
return ret;
if (p->class_id >= JS_CLASS_UINT8C_ARRAY &&
p->class_id <= JS_CLASS_FLOAT64_ARRAY) {
ret = JS_AtomIsNumericIndex(ctx, prop);
if (ret != 0) {
if (ret < 0)
return -1;
return FALSE;
}
}
p = p->shape->proto;
if (!p)
break;
}
return FALSE;
} | O2 | c | JS_HasProperty:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
cmpl $-0x1, %edx
jne 0x1e050
movl %ecx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
pushq $-0x1
popq %r15
testb $0x4, 0x5(%rbx)
je 0x1e001
movq 0x18(%r14), %rax
movq 0x80(%rax), %rax
movzwl 0x6(%rbx), %ecx
imulq $0x28, %rcx, %rcx
movq 0x20(%rax,%rcx), %rax
testq %rax, %rax
je 0x1e001
movq 0x20(%rax), %rax
testq %rax, %rax
jne 0x1e068
incl (%rbx)
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
movl %ebp, %ecx
callq 0x1db80
movl %eax, %r12d
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1801e
testl %r12d, %r12d
jne 0x1e05c
movzwl 0x6(%rbx), %eax
addl $-0x15, %eax
cmpw $0xb, %ax
ja 0x1e043
movq %r14, %rdi
movl %ebp, %esi
callq 0x1e08f
testl %eax, %eax
jne 0x1e055
movq 0x18(%rbx), %rax
movq 0x38(%rax), %rbx
testq %rbx, %rbx
jne 0x1dfd5
xorl %r12d, %r12d
jmp 0x1e05c
movl %eax, %r12d
sarl $0x1f, %r12d
movl %r12d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
incl (%rbx)
pushq $-0x1
popq %r15
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movl %ebp, %ecx
callq *%rax
movl %eax, %ebp
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1801e
movl %ebp, %eax
jmp 0x1e05f
| JS_HasProperty:
push rbp
push r15
push r14
push r12
push rbx
cmp edx, 0FFFFFFFFh
jnz loc_1E050
mov ebp, ecx
mov rbx, rsi
mov r14, rdi
push 0FFFFFFFFFFFFFFFFh
pop r15
loc_1DFD5:
test byte ptr [rbx+5], 4
jz short loc_1E001
mov rax, [r14+18h]
mov rax, [rax+80h]
movzx ecx, word ptr [rbx+6]
imul rcx, 28h ; '('
mov rax, [rax+rcx+20h]
test rax, rax
jz short loc_1E001
mov rax, [rax+20h]
test rax, rax
jnz short loc_1E068
loc_1E001:
inc dword ptr [rbx]
mov rdi, r14
xor esi, esi
mov rdx, rbx
mov ecx, ebp
call JS_GetOwnPropertyInternal
mov r12d, eax
mov rdi, r14
mov rsi, rbx
mov rdx, r15
call JS_FreeValue
test r12d, r12d
jnz short loc_1E05C
movzx eax, word ptr [rbx+6]
add eax, 0FFFFFFEBh
cmp ax, 0Bh
ja short loc_1E043
mov rdi, r14
mov esi, ebp
call JS_AtomIsNumericIndex
test eax, eax
jnz short loc_1E055
loc_1E043:
mov rax, [rbx+18h]
mov rbx, [rax+38h]
test rbx, rbx
jnz short loc_1DFD5
loc_1E050:
xor r12d, r12d
jmp short loc_1E05C
loc_1E055:
mov r12d, eax
sar r12d, 1Fh
loc_1E05C:
mov eax, r12d
loc_1E05F:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_1E068:
inc dword ptr [rbx]
push 0FFFFFFFFFFFFFFFFh
pop r15
mov rdi, r14
mov rsi, rbx
mov rdx, r15
mov ecx, ebp
call rax
mov ebp, eax
mov rdi, r14
mov rsi, rbx
mov rdx, r15
call JS_FreeValue
mov eax, ebp
jmp short loc_1E05F
| long long JS_HasProperty(long long a1, long long a2, int a3, unsigned int a4, unsigned int *a5)
{
long long v7; // rax
long long ( *v8)(long long, long long, long long, _QWORD); // rax
unsigned int v9; // eax
unsigned int v10; // r12d
long long v11; // rdx
long long v12; // rcx
long long v13; // r9
int IsNumericIndex; // eax
unsigned int v16; // ebp
if ( a3 == -1 )
{
while ( 1 )
{
if ( (*(_BYTE *)(a2 + 5) & 4) != 0 )
{
v7 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 128LL) + 40LL * *(unsigned __int16 *)(a2 + 6) + 32);
if ( v7 )
{
v8 = *(long long ( **)(long long, long long, long long, _QWORD))(v7 + 32);
if ( v8 )
break;
}
}
++*(_DWORD *)a2;
LOBYTE(v9) = JS_GetOwnPropertyInternal(a1, 0LL, a2, a4, a5);
v10 = v9;
JS_FreeValue(a1, a2, -1LL);
if ( v10 )
return v10;
if ( (unsigned __int16)(*(_WORD *)(a2 + 6) - 21) <= 0xBu )
{
IsNumericIndex = JS_AtomIsNumericIndex(a1, a4, v11, v12, a5, v13);
if ( IsNumericIndex )
return (unsigned int)(IsNumericIndex >> 31);
}
a2 = *(_QWORD *)(*(_QWORD *)(a2 + 24) + 56LL);
if ( !a2 )
return 0;
}
++*(_DWORD *)a2;
v16 = v8(a1, a2, -1LL, a4);
JS_FreeValue(a1, a2, -1LL);
return v16;
}
else
{
return 0;
}
}
| JS_HasProperty:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
CMP EDX,-0x1
JNZ 0x0011e050
MOV EBP,ECX
MOV RBX,RSI
MOV R14,RDI
PUSH -0x1
POP R15
LAB_0011dfd5:
TEST byte ptr [RBX + 0x5],0x4
JZ 0x0011e001
MOV RAX,qword ptr [R14 + 0x18]
MOV RAX,qword ptr [RAX + 0x80]
MOVZX ECX,word ptr [RBX + 0x6]
IMUL RCX,RCX,0x28
MOV RAX,qword ptr [RAX + RCX*0x1 + 0x20]
TEST RAX,RAX
JZ 0x0011e001
MOV RAX,qword ptr [RAX + 0x20]
TEST RAX,RAX
JNZ 0x0011e068
LAB_0011e001:
INC dword ptr [RBX]
MOV RDI,R14
XOR ESI,ESI
MOV RDX,RBX
MOV ECX,EBP
CALL 0x0011db80
MOV R12D,EAX
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R15
CALL 0x0011801e
TEST R12D,R12D
JNZ 0x0011e05c
MOVZX EAX,word ptr [RBX + 0x6]
ADD EAX,-0x15
CMP AX,0xb
JA 0x0011e043
MOV RDI,R14
MOV ESI,EBP
CALL 0x0011e08f
TEST EAX,EAX
JNZ 0x0011e055
LAB_0011e043:
MOV RAX,qword ptr [RBX + 0x18]
MOV RBX,qword ptr [RAX + 0x38]
TEST RBX,RBX
JNZ 0x0011dfd5
LAB_0011e050:
XOR R12D,R12D
JMP 0x0011e05c
LAB_0011e055:
MOV R12D,EAX
SAR R12D,0x1f
LAB_0011e05c:
MOV EAX,R12D
LAB_0011e05f:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0011e068:
INC dword ptr [RBX]
PUSH -0x1
POP R15
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R15
MOV ECX,EBP
CALL RAX
MOV EBP,EAX
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R15
CALL 0x0011801e
MOV EAX,EBP
JMP 0x0011e05f
|
int JS_HasProperty(long param_1,int *param_2,int param_3,int4 param_4)
{
long lVar1;
code *pcVar2;
int iVar3;
if (param_3 == -1) {
do {
if ((((*(byte *)((long)param_2 + 5) & 4) != 0) &&
(lVar1 = *(long *)(*(long *)(*(long *)(param_1 + 0x18) + 0x80) + 0x20 +
(ulong)*(ushort *)((long)param_2 + 6) * 0x28), lVar1 != 0)) &&
(pcVar2 = *(code **)(lVar1 + 0x20), pcVar2 != (code *)0x0)) {
*param_2 = *param_2 + 1;
iVar3 = (*pcVar2)(param_1,param_2,0xffffffffffffffff,param_4);
JS_FreeValue(param_1,param_2,0xffffffffffffffff);
return iVar3;
}
*param_2 = *param_2 + 1;
iVar3 = JS_GetOwnPropertyInternal(param_1,0,param_2,param_4);
JS_FreeValue(param_1,param_2,0xffffffffffffffff);
if (iVar3 != 0) {
return iVar3;
}
if (((ushort)(*(short *)((long)param_2 + 6) - 0x15U) < 0xc) &&
(iVar3 = JS_AtomIsNumericIndex(param_1), iVar3 != 0)) {
return iVar3 >> 0x1f;
}
param_2 = *(int **)(*(long *)(param_2 + 6) + 0x38);
} while (param_2 != (int *)0x0);
}
return 0;
}
| |
43,266 | OpenSubdiv::v3_6_0::Bfr::FaceVertex::findConnectedSubsetExtent(OpenSubdiv::v3_6_0::Bfr::FaceVertexSubset*) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/../bfr/faceVertex.h | VertexTag GetTag() const { return _tag; } | O1 | c | OpenSubdiv::v3_6_0::Bfr::FaceVertex::findConnectedSubsetExtent(OpenSubdiv::v3_6_0::Bfr::FaceVertexSubset*) const:
movzwl 0x98(%rdi), %eax
xorl %ecx, %ecx
movl %ecx, 0x2(%rsi)
movw $0x1, 0x6(%rsi)
movl %ecx, 0x8(%rsi)
movl %eax, %ecx
andl $0xfdff, %ecx # imm = 0xFDFF
movw %cx, (%rsi)
movswl 0x9a(%rdi), %ecx
movslq %ecx, %rdx
movswl 0x98(%rdi), %r8d
btl $0x8, %r8d
jb 0x8728e
movswl 0x2(%rdi), %r9d
decl %r9d
cmpl %ecx, %r9d
jle 0x8729d
leal 0x1(%rcx), %r8d
jmp 0x872a4
movq 0xa8(%rdi), %r8
movswl 0x2(%r8,%rdx,4), %r8d
jmp 0x872a4
andl $0x1, %r8d
negl %r8d
movl %r8d, %r11d
shrl $0x1f, %r11d
testl %r8d, %r8d
js 0x87319
cmpl %ecx, %r8d
je 0x8730b
movq 0xa8(%rdi), %r9
movswl 0x2(%rdi), %r10d
decl %r10d
incw 0x4(%rsi)
incw 0x6(%rsi)
movswl 0x98(%rdi), %r11d
btl $0x8, %r11d
jb 0x872e5
cmpl %r8d, %r10d
jle 0x872f0
incl %r8d
jmp 0x872fa
movl %r8d, %r8d
movswl 0x2(%r9,%r8,4), %r8d
jmp 0x872fa
andl $0x1, %r11d
negl %r11d
movl %r11d, %r8d
movl %r8d, %r11d
shrl $0x1f, %r11d
testl %r8d, %r8d
js 0x87319
cmpl %ecx, %r8d
jne 0x872c4
andl $0xfdfe, %eax # imm = 0xFDFE
movw %ax, (%rsi)
movswl 0x6(%rsi), %eax
jmp 0x87319
testb %r11b, %r11b
je 0x873a8
movl 0x98(%rdi), %eax
btl $0x8, %eax
jb 0x87337
testw %cx, %cx
je 0x87344
decl %ecx
jmp 0x87356
movq 0xa8(%rdi), %rax
movswl (%rax,%rdx,4), %ecx
jmp 0x87356
andl $0x1, %eax
movswl 0x2(%rdi), %edx
decl %edx
xorl %ecx, %ecx
negw %ax
sbbl %ecx, %ecx
orl %edx, %ecx
testl %ecx, %ecx
js 0x873a1
movq 0xa8(%rdi), %rax
incw 0x2(%rsi)
incw 0x6(%rsi)
movl 0x98(%rdi), %edx
btl $0x8, %edx
jb 0x8737d
testl %ecx, %ecx
je 0x87385
decl %ecx
jmp 0x8739d
addl %ecx, %ecx
movswl (%rax,%rcx,2), %ecx
jmp 0x8739d
andl $0x1, %edx
movswl 0x2(%rdi), %r8d
decl %r8d
negw %dx
movl $0x0, %ecx
sbbl %ecx, %ecx
orl %r8d, %ecx
testl %ecx, %ecx
jns 0x87361
orb $0x1, (%rsi)
movswl 0x6(%rsi), %eax
retq
nop
| _ZNK10OpenSubdiv6v3_6_03Bfr10FaceVertex25findConnectedSubsetExtentEPNS1_16FaceVertexSubsetE:
movzx eax, word ptr [rdi+98h]
xor ecx, ecx
mov [rsi+2], ecx
mov word ptr [rsi+6], 1
mov [rsi+8], ecx
mov ecx, eax
and ecx, 0FDFFh
mov [rsi], cx
movsx ecx, word ptr [rdi+9Ah]
movsxd rdx, ecx
movsx r8d, word ptr [rdi+98h]
bt r8d, 8
jb short loc_8728E
movsx r9d, word ptr [rdi+2]
dec r9d
cmp r9d, ecx
jle short loc_8729D
lea r8d, [rcx+1]
jmp short loc_872A4
loc_8728E:
mov r8, [rdi+0A8h]
movsx r8d, word ptr [r8+rdx*4+2]
jmp short loc_872A4
loc_8729D:
and r8d, 1
neg r8d
loc_872A4:
mov r11d, r8d
shr r11d, 1Fh
test r8d, r8d
js short loc_87319
cmp r8d, ecx
jz short loc_8730B
mov r9, [rdi+0A8h]
movsx r10d, word ptr [rdi+2]
dec r10d
loc_872C4:
inc word ptr [rsi+4]
inc word ptr [rsi+6]
movsx r11d, word ptr [rdi+98h]
bt r11d, 8
jb short loc_872E5
cmp r10d, r8d
jle short loc_872F0
inc r8d
jmp short loc_872FA
loc_872E5:
mov r8d, r8d
movsx r8d, word ptr [r9+r8*4+2]
jmp short loc_872FA
loc_872F0:
and r11d, 1
neg r11d
mov r8d, r11d
loc_872FA:
mov r11d, r8d
shr r11d, 1Fh
test r8d, r8d
js short loc_87319
cmp r8d, ecx
jnz short loc_872C4
loc_8730B:
and eax, 0FDFEh
mov [rsi], ax
movsx eax, word ptr [rsi+6]
jmp short $+2
loc_87319:
test r11b, r11b
jz locret_873A8
mov eax, [rdi+98h]
bt eax, 8
jb short loc_87337
test cx, cx
jz short loc_87344
dec ecx
jmp short loc_87356
loc_87337:
mov rax, [rdi+0A8h]
movsx ecx, word ptr [rax+rdx*4]
jmp short loc_87356
loc_87344:
and eax, 1
movsx edx, word ptr [rdi+2]
dec edx
xor ecx, ecx
neg ax
sbb ecx, ecx
or ecx, edx
loc_87356:
test ecx, ecx
js short loc_873A1
mov rax, [rdi+0A8h]
loc_87361:
inc word ptr [rsi+2]
inc word ptr [rsi+6]
mov edx, [rdi+98h]
bt edx, 8
jb short loc_8737D
test ecx, ecx
jz short loc_87385
dec ecx
jmp short loc_8739D
loc_8737D:
add ecx, ecx
movsx ecx, word ptr [rax+rcx*2]
jmp short loc_8739D
loc_87385:
and edx, 1
movsx r8d, word ptr [rdi+2]
dec r8d
neg dx
mov ecx, 0
sbb ecx, ecx
or ecx, r8d
loc_8739D:
test ecx, ecx
jns short loc_87361
loc_873A1:
or byte ptr [rsi], 1
movsx eax, word ptr [rsi+6]
locret_873A8:
retn
| long long OpenSubdiv::v3_6_0::Bfr::FaceVertex::findConnectedSubsetExtent(long long a1, long long a2)
{
long long result; // rax
int v3; // ecx
long long v4; // rdx
__int16 v5; // r8
int v6; // r8d
unsigned int v7; // r11d
long long v8; // r9
int v9; // r10d
__int16 v10; // r11
int v11; // eax
int v12; // ecx
long long v13; // rax
int v14; // edx
result = *(unsigned __int16 *)(a1 + 152);
*(_DWORD *)(a2 + 2) = 0;
*(_WORD *)(a2 + 6) = 1;
*(_DWORD *)(a2 + 8) = 0;
*(_WORD *)a2 = result & 0xFDFF;
v3 = *(__int16 *)(a1 + 154);
v4 = *(__int16 *)(a1 + 154);
v5 = *(_WORD *)(a1 + 152);
if ( (v5 & 0x100) != 0 )
{
v6 = *(__int16 *)(*(_QWORD *)(a1 + 168) + 4 * v4 + 2);
}
else if ( *(__int16 *)(a1 + 2) - 1 <= v3 )
{
v6 = -(v5 & 1);
}
else
{
v6 = v3 + 1;
}
v7 = (unsigned int)v6 >> 31;
if ( v6 >= 0 )
{
if ( v6 == v3 )
{
LABEL_16:
*(_WORD *)a2 = result & 0xFDFE;
result = (unsigned int)*(__int16 *)(a2 + 6);
}
else
{
v8 = *(_QWORD *)(a1 + 168);
v9 = *(__int16 *)(a1 + 2) - 1;
while ( 1 )
{
++*(_WORD *)(a2 + 4);
++*(_WORD *)(a2 + 6);
v10 = *(_WORD *)(a1 + 152);
if ( (v10 & 0x100) != 0 )
{
v6 = *(__int16 *)(v8 + 4LL * (unsigned int)v6 + 2);
}
else if ( v9 <= v6 )
{
v6 = -(v10 & 1);
}
else
{
++v6;
}
v7 = (unsigned int)v6 >> 31;
if ( v6 < 0 )
break;
if ( v6 == v3 )
goto LABEL_16;
}
}
}
if ( (_BYTE)v7 )
{
v11 = *(_DWORD *)(a1 + 152);
if ( (v11 & 0x100) != 0 )
{
v12 = *(__int16 *)(*(_QWORD *)(a1 + 168) + 4 * v4);
}
else if ( (_WORD)v3 )
{
v12 = v3 - 1;
}
else
{
v12 = (v11 & 1) != 0 ? -1 : *(__int16 *)(a1 + 2) - 1;
}
if ( v12 >= 0 )
{
v13 = *(_QWORD *)(a1 + 168);
do
{
++*(_WORD *)(a2 + 2);
++*(_WORD *)(a2 + 6);
v14 = *(_DWORD *)(a1 + 152);
if ( (v14 & 0x100) != 0 )
{
v12 = *(__int16 *)(v13 + 2LL * (unsigned int)(2 * v12));
}
else if ( v12 )
{
--v12;
}
else
{
v12 = (v14 & 1) != 0 ? -1 : *(__int16 *)(a1 + 2) - 1;
}
}
while ( v12 >= 0 );
}
*(_BYTE *)a2 |= 1u;
return (unsigned int)*(__int16 *)(a2 + 6);
}
return result;
}
| findConnectedSubsetExtent:
MOVZX EAX,word ptr [RDI + 0x98]
XOR ECX,ECX
MOV dword ptr [RSI + 0x2],ECX
MOV word ptr [RSI + 0x6],0x1
MOV dword ptr [RSI + 0x8],ECX
MOV ECX,EAX
AND ECX,0xfdff
MOV word ptr [RSI],CX
MOVSX ECX,word ptr [RDI + 0x9a]
MOVSXD RDX,ECX
MOVSX R8D,word ptr [RDI + 0x98]
BT R8D,0x8
JC 0x0018728e
MOVSX R9D,word ptr [RDI + 0x2]
DEC R9D
CMP R9D,ECX
JLE 0x0018729d
LEA R8D,[RCX + 0x1]
JMP 0x001872a4
LAB_0018728e:
MOV R8,qword ptr [RDI + 0xa8]
MOVSX R8D,word ptr [R8 + RDX*0x4 + 0x2]
JMP 0x001872a4
LAB_0018729d:
AND R8D,0x1
NEG R8D
LAB_001872a4:
MOV R11D,R8D
SHR R11D,0x1f
TEST R8D,R8D
JS 0x00187319
CMP R8D,ECX
JZ 0x0018730b
MOV R9,qword ptr [RDI + 0xa8]
MOVSX R10D,word ptr [RDI + 0x2]
DEC R10D
LAB_001872c4:
INC word ptr [RSI + 0x4]
INC word ptr [RSI + 0x6]
MOVSX R11D,word ptr [RDI + 0x98]
BT R11D,0x8
JC 0x001872e5
CMP R10D,R8D
JLE 0x001872f0
INC R8D
JMP 0x001872fa
LAB_001872e5:
MOV R8D,R8D
MOVSX R8D,word ptr [R9 + R8*0x4 + 0x2]
JMP 0x001872fa
LAB_001872f0:
AND R11D,0x1
NEG R11D
MOV R8D,R11D
LAB_001872fa:
MOV R11D,R8D
SHR R11D,0x1f
TEST R8D,R8D
JS 0x00187319
CMP R8D,ECX
JNZ 0x001872c4
LAB_0018730b:
AND EAX,0xfdfe
MOV word ptr [RSI],AX
MOVSX EAX,word ptr [RSI + 0x6]
JMP 0x00187319
LAB_00187319:
TEST R11B,R11B
JZ 0x001873a8
MOV EAX,dword ptr [RDI + 0x98]
BT EAX,0x8
JC 0x00187337
TEST CX,CX
JZ 0x00187344
DEC ECX
JMP 0x00187356
LAB_00187337:
MOV RAX,qword ptr [RDI + 0xa8]
MOVSX ECX,word ptr [RAX + RDX*0x4]
JMP 0x00187356
LAB_00187344:
AND EAX,0x1
MOVSX EDX,word ptr [RDI + 0x2]
DEC EDX
XOR ECX,ECX
NEG AX
SBB ECX,ECX
OR ECX,EDX
LAB_00187356:
TEST ECX,ECX
JS 0x001873a1
MOV RAX,qword ptr [RDI + 0xa8]
LAB_00187361:
INC word ptr [RSI + 0x2]
INC word ptr [RSI + 0x6]
MOV EDX,dword ptr [RDI + 0x98]
BT EDX,0x8
JC 0x0018737d
TEST ECX,ECX
JZ 0x00187385
DEC ECX
JMP 0x0018739d
LAB_0018737d:
ADD ECX,ECX
MOVSX ECX,word ptr [RAX + RCX*0x2]
JMP 0x0018739d
LAB_00187385:
AND EDX,0x1
MOVSX R8D,word ptr [RDI + 0x2]
DEC R8D
NEG DX
MOV ECX,0x0
SBB ECX,ECX
OR ECX,R8D
LAB_0018739d:
TEST ECX,ECX
JNS 0x00187361
LAB_001873a1:
OR byte ptr [RSI],0x1
MOVSX EAX,word ptr [RSI + 0x6]
LAB_001873a8:
RET
|
/* OpenSubdiv::v3_6_0::Bfr::FaceVertex::findConnectedSubsetExtent(OpenSubdiv::v3_6_0::Bfr::FaceVertexSubset*)
const */
int1 [16] __thiscall
OpenSubdiv::v3_6_0::Bfr::FaceVertex::findConnectedSubsetExtent
(FaceVertex *this,FaceVertexSubset *param_1)
{
ushort uVar1;
short sVar2;
short sVar3;
uint uVar4;
long lVar5;
ulong uVar6;
int iVar7;
uint uVar8;
ulong uVar9;
ulong uVar10;
char cVar11;
int1 auVar12 [16];
uVar1 = *(ushort *)(this + 0x98);
uVar6 = (ulong)uVar1;
*(int4 *)(param_1 + 2) = 0;
*(int2 *)(param_1 + 6) = 1;
*(int4 *)(param_1 + 8) = 0;
*(ushort *)param_1 = uVar1 & 0xfdff;
sVar2 = *(short *)(this + 0x9a);
iVar7 = (int)sVar2;
uVar9 = (ulong)iVar7;
if (((uint)(int)*(short *)(this + 0x98) >> 8 & 1) == 0) {
if (iVar7 < *(short *)(this + 2) + -1) {
uVar10 = (ulong)(iVar7 + 1);
}
else {
uVar10 = (ulong)-((int)*(short *)(this + 0x98) & 1U);
}
}
else {
uVar10 = (ulong)(uint)(int)*(short *)(*(long *)(this + 0xa8) + 2 + uVar9 * 4);
}
cVar11 = (char)(uVar10 >> 0x1f);
if (-1 < (int)uVar10) {
if ((int)uVar10 != iVar7) {
lVar5 = *(long *)(this + 0xa8);
sVar3 = *(short *)(this + 2);
do {
*(short *)(param_1 + 4) = *(short *)(param_1 + 4) + 1;
*(short *)(param_1 + 6) = *(short *)(param_1 + 6) + 1;
if (((uint)(int)*(short *)(this + 0x98) >> 8 & 1) == 0) {
if ((int)uVar10 < sVar3 + -1) {
uVar10 = (ulong)((int)uVar10 + 1);
}
else {
uVar10 = (ulong)-((int)*(short *)(this + 0x98) & 1U);
}
}
else {
uVar10 = (ulong)(uint)(int)*(short *)(lVar5 + 2 + uVar10 * 4);
}
cVar11 = (char)(uVar10 >> 0x1f);
if ((int)uVar10 < 0) goto LAB_00187319;
} while ((int)uVar10 != iVar7);
}
*(ushort *)param_1 = uVar1 & 0xfdfe;
uVar6 = (ulong)(uint)(int)*(short *)(param_1 + 6);
}
LAB_00187319:
if (cVar11 != '\0') {
if ((*(uint *)(this + 0x98) >> 8 & 1) == 0) {
if (sVar2 == 0) {
uVar9 = (ulong)((int)*(short *)(this + 2) - 1U);
uVar8 = -(uint)((*(uint *)(this + 0x98) & 1) != 0) | (int)*(short *)(this + 2) - 1U;
}
else {
uVar8 = iVar7 - 1;
}
}
else {
uVar8 = (uint)*(short *)(*(long *)(this + 0xa8) + uVar9 * 4);
}
if (-1 < (int)uVar8) {
lVar5 = *(long *)(this + 0xa8);
do {
*(short *)(param_1 + 2) = *(short *)(param_1 + 2) + 1;
*(short *)(param_1 + 6) = *(short *)(param_1 + 6) + 1;
uVar4 = *(uint *)(this + 0x98);
uVar9 = (ulong)uVar4;
if ((uVar4 >> 8 & 1) == 0) {
if (uVar8 == 0) {
uVar9 = (ulong)(ushort)-((ushort)uVar4 & 1);
uVar8 = -(uint)((uVar4 & 1) != 0) | (int)*(short *)(this + 2) - 1U;
}
else {
uVar8 = uVar8 - 1;
}
}
else {
uVar8 = (uint)*(short *)(lVar5 + (ulong)(uVar8 * 2) * 2);
}
} while (-1 < (int)uVar8);
}
*param_1 = (FaceVertexSubset)((byte)*param_1 | 1);
uVar6 = (ulong)(uint)(int)*(short *)(param_1 + 6);
}
auVar12._8_8_ = uVar9;
auVar12._0_8_ = uVar6;
return auVar12;
}
| |
43,267 | my_charset_is_ascii_compatible | eloqsql/strings/ctype-simple.c | static my_bool
my_charset_is_ascii_compatible(CHARSET_INFO *cs)
{
uint i;
if (!cs->tab_to_uni)
return 1;
for (i= 0; i < 128; i++)
{
if (cs->tab_to_uni[i] != i)
return 0;
}
return 1;
} | O0 | c | my_charset_is_ascii_compatible:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x68(%rax)
jne 0x94f69
movb $0x1, -0x1(%rbp)
jmp 0x94fa4
movl $0x0, -0x14(%rbp)
cmpl $0x80, -0x14(%rbp)
jae 0x94fa0
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movl -0x14(%rbp), %ecx
movzwl (%rax,%rcx,2), %eax
cmpl -0x14(%rbp), %eax
je 0x94f93
movb $0x0, -0x1(%rbp)
jmp 0x94fa4
jmp 0x94f95
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x94f70
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopl (%rax)
| my_charset_is_ascii_compatible:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
cmp qword ptr [rax+68h], 0
jnz short loc_94F69
mov [rbp+var_1], 1
jmp short loc_94FA4
loc_94F69:
mov [rbp+var_14], 0
loc_94F70:
cmp [rbp+var_14], 80h
jnb short loc_94FA0
mov rax, [rbp+var_10]
mov rax, [rax+68h]
mov ecx, [rbp+var_14]
movzx eax, word ptr [rax+rcx*2]
cmp eax, [rbp+var_14]
jz short loc_94F93
mov [rbp+var_1], 0
jmp short loc_94FA4
loc_94F93:
jmp short $+2
loc_94F95:
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_14], eax
jmp short loc_94F70
loc_94FA0:
mov [rbp+var_1], 1
loc_94FA4:
mov al, [rbp+var_1]
pop rbp
retn
| char my_charset_is_ascii_compatible(long long a1)
{
unsigned int i; // [rsp+0h] [rbp-14h]
if ( !*(_QWORD *)(a1 + 104) )
return 1;
for ( i = 0; i < 0x80; ++i )
{
if ( *(unsigned __int16 *)(*(_QWORD *)(a1 + 104) + 2LL * i) != i )
return 0;
}
return 1;
}
| my_charset_is_ascii_compatible:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x68],0x0
JNZ 0x00194f69
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00194fa4
LAB_00194f69:
MOV dword ptr [RBP + -0x14],0x0
LAB_00194f70:
CMP dword ptr [RBP + -0x14],0x80
JNC 0x00194fa0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x68]
MOV ECX,dword ptr [RBP + -0x14]
MOVZX EAX,word ptr [RAX + RCX*0x2]
CMP EAX,dword ptr [RBP + -0x14]
JZ 0x00194f93
MOV byte ptr [RBP + -0x1],0x0
JMP 0x00194fa4
LAB_00194f93:
JMP 0x00194f95
LAB_00194f95:
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x00194f70
LAB_00194fa0:
MOV byte ptr [RBP + -0x1],0x1
LAB_00194fa4:
MOV AL,byte ptr [RBP + -0x1]
POP RBP
RET
|
int1 my_charset_is_ascii_compatible(long param_1)
{
uint local_1c;
if (*(long *)(param_1 + 0x68) != 0) {
for (local_1c = 0; local_1c < 0x80; local_1c = local_1c + 1) {
if (*(ushort *)(*(long *)(param_1 + 0x68) + (ulong)local_1c * 2) != local_1c) {
return 0;
}
}
}
return 1;
}
| |
43,268 | lex2str | eloqsql/strings/xml.c | static const char *lex2str(int lex)
{
switch(lex)
{
case MY_XML_EOF: return "END-OF-INPUT";
case MY_XML_STRING: return "STRING";
case MY_XML_IDENT: return "IDENT";
case MY_XML_CDATA: return "CDATA";
case MY_XML_EQ: return "'='";
case MY_XML_LT: return "'<'";
case MY_XML_GT: return "'>'";
case MY_XML_SLASH: return "'/'";
case MY_XML_COMMENT: return "COMMENT";
case MY_XML_TEXT: return "TEXT";
case MY_XML_QUESTION: return "'?'";
case MY_XML_EXCLAM: return "'!'";
}
return "unknown token";
} | O3 | c | lex2str:
pushq %rbp
movq %rsp, %rbp
leal -0x3c(%rdi), %eax
cmpl $0x18, %eax
ja 0x63a63
leaq 0x27e7cf(%rip), %rcx # 0x2e2220
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x5e5d(%rip), %rax # 0x698be
jmp 0x63ad7
cmpl $0x21, %edi
je 0x63ad0
cmpl $0x2f, %edi
jne 0x63a76
leaq 0x5e52(%rip), %rax # 0x698c6
jmp 0x63ad7
leaq 0x5e62(%rip), %rax # 0x698df
jmp 0x63ad7
leaq 0x5e28(%rip), %rax # 0x698ae
jmp 0x63ad7
leaq 0x5e18(%rip), %rax # 0x698a7
jmp 0x63ad7
leaq 0x5e3f(%rip), %rax # 0x698d7
jmp 0x63ad7
leaq 0x5e19(%rip), %rax # 0x698ba
jmp 0x63ad7
leaq 0x5e18(%rip), %rax # 0x698c2
jmp 0x63ad7
leaq 0x5e17(%rip), %rax # 0x698ca
jmp 0x63ad7
leaq 0x5dc4(%rip), %rax # 0x69880
jmp 0x63ad7
leaq 0x5def(%rip), %rax # 0x698b4
jmp 0x63ad7
leaq 0x5e04(%rip), %rax # 0x698d2
jmp 0x63ad7
leaq 0x5e04(%rip), %rax # 0x698db
popq %rbp
retq
| lex2str:
push rbp
mov rbp, rsp
lea eax, [rdi-3Ch]; switch 25 cases
cmp eax, 18h
ja short def_63A58; jumptable 0000000000063A58 default case
lea rcx, jpt_63A58
movsxd rax, ds:(jpt_63A58 - 2E2220h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_63A5A:
lea rax, asc_698BE; jumptable 0000000000063A58 case 60
jmp short loc_63AD7
def_63A58:
cmp edi, 21h ; '!'; jumptable 0000000000063A58 default case
jz short loc_63AD0
cmp edi, 2Fh ; '/'
jnz short loc_63A76; jumptable 0000000000063A58 cases 64-66,70-72,74-82
lea rax, asc_698C6; "'/'"
jmp short loc_63AD7
loc_63A76:
lea rax, aUnknownToken; jumptable 0000000000063A58 cases 64-66,70-72,74-82
jmp short loc_63AD7
loc_63A7F:
lea rax, aIdent; jumptable 0000000000063A58 case 73
jmp short loc_63AD7
loc_63A88:
lea rax, aString; jumptable 0000000000063A58 case 83
jmp short loc_63AD7
loc_63A91:
lea rax, asc_698D7; jumptable 0000000000063A58 case 63
jmp short loc_63AD7
loc_63A9A:
lea rax, asc_698BA; jumptable 0000000000063A58 case 61
jmp short loc_63AD7
loc_63AA3:
lea rax, asc_698C2; jumptable 0000000000063A58 case 62
jmp short loc_63AD7
loc_63AAC:
lea rax, aComment; jumptable 0000000000063A58 case 67
jmp short loc_63AD7
loc_63AB5:
lea rax, aUnexpectedEndO+0Bh; jumptable 0000000000063A58 case 69
jmp short loc_63AD7
loc_63ABE:
lea rax, aCdata; jumptable 0000000000063A58 case 68
jmp short loc_63AD7
loc_63AC7:
lea rax, aText; jumptable 0000000000063A58 case 84
jmp short loc_63AD7
loc_63AD0:
lea rax, asc_698DB; "'!'"
loc_63AD7:
pop rbp
retn
| char * lex2str(int a1)
{
char *result; // rax
switch ( a1 )
{
case '<':
result = "'<'";
break;
case '=':
result = "'='";
break;
case '>':
result = "'>'";
break;
case '?':
result = "'?'";
break;
case '@':
case 'A':
case 'B':
case 'F':
case 'G':
case 'H':
case 'J':
case 'K':
case 'L':
case 'M':
case 'N':
case 'O':
case 'P':
case 'Q':
case 'R':
goto LABEL_6;
case 'C':
result = "COMMENT";
break;
case 'D':
result = "CDATA";
break;
case 'E':
result = "END-OF-INPUT";
break;
case 'I':
result = "IDENT";
break;
case 'S':
result = "STRING";
break;
case 'T':
result = "TEXT";
break;
default:
if ( a1 == 33 )
{
result = "'!'";
}
else if ( a1 == 47 )
{
result = "'/'";
}
else
{
LABEL_6:
result = "unknown token";
}
break;
}
return result;
}
| lex2str:
PUSH RBP
MOV RBP,RSP
LEA EAX,[RDI + -0x3c]
CMP EAX,0x18
JA 0x00163a63
LEA RCX,[0x3e2220]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_3c:
LEA RAX,[0x1698be]
JMP 0x00163ad7
default:
CMP EDI,0x21
JZ 0x00163ad0
CMP EDI,0x2f
JNZ 0x00163a76
LEA RAX,[0x1698c6]
JMP 0x00163ad7
caseD_40:
LEA RAX,[0x1698df]
JMP 0x00163ad7
caseD_49:
LEA RAX,[0x1698ae]
JMP 0x00163ad7
caseD_53:
LEA RAX,[0x1698a7]
JMP 0x00163ad7
caseD_3f:
LEA RAX,[0x1698d7]
JMP 0x00163ad7
caseD_3d:
LEA RAX,[0x1698ba]
JMP 0x00163ad7
caseD_3e:
LEA RAX,[0x1698c2]
JMP 0x00163ad7
caseD_43:
LEA RAX,[0x1698ca]
JMP 0x00163ad7
caseD_45:
LEA RAX,[0x169880]
JMP 0x00163ad7
caseD_44:
LEA RAX,[0x1698b4]
JMP 0x00163ad7
caseD_54:
LEA RAX,[0x1698d2]
JMP 0x00163ad7
LAB_00163ad0:
LEA RAX,[0x1698db]
LAB_00163ad7:
POP RBP
RET
|
char * lex2str(int param_1)
{
char *pcVar1;
switch(param_1) {
case 0x3c:
pcVar1 = "\'<\'";
break;
case 0x3d:
pcVar1 = "\'=\'";
break;
case 0x3e:
pcVar1 = "\'>\'";
break;
case 0x3f:
pcVar1 = "\'?\'";
break;
case 0x43:
pcVar1 = "COMMENT";
break;
case 0x44:
pcVar1 = "CDATA";
break;
case 0x45:
pcVar1 = "END-OF-INPUT";
break;
case 0x49:
pcVar1 = "IDENT";
break;
case 0x53:
pcVar1 = "STRING";
break;
case 0x54:
pcVar1 = "TEXT";
break;
default:
if (param_1 == 0x21) {
return "\'!\'";
}
if (param_1 == 0x2f) {
return "\'/\'";
}
case 0x40:
case 0x41:
case 0x42:
case 0x46:
case 0x47:
case 0x48:
case 0x4a:
case 0x4b:
case 0x4c:
case 0x4d:
case 0x4e:
case 0x4f:
case 0x50:
case 0x51:
case 0x52:
pcVar1 = "unknown token";
}
return pcVar1;
}
| |
43,269 | ma_keylength | eloqsql/storage/maria/ma_search.c | uint _ma_keylength(MARIA_KEYDEF *keyinfo, const uchar *key)
{
reg1 HA_KEYSEG *keyseg;
const uchar *start;
if (! (keyinfo->flag & (HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY)))
return (keyinfo->keylength);
start= key;
for (keyseg=keyinfo->seg ; keyseg->type ; keyseg++)
{
if (keyseg->flag & HA_NULL_PART)
if (!*key++)
continue;
if (keyseg->flag & (HA_SPACE_PACK | HA_BLOB_PART | HA_VAR_LENGTH_PART))
{
uint length;
get_key_length(length,key);
key+=length;
}
else
key+= keyseg->length;
}
return((uint) (key-start)+keyseg->length);
} | O3 | c | ma_keylength:
testb $0x28, 0xa2(%rdi)
je 0x6e08a
pushq %rbp
movq %rsp, %rbp
movq 0xc0(%rdi), %rax
cmpb $0x0, 0x18(%rax)
je 0x6e092
movq %rsi, %rcx
movzwl 0x12(%rax), %edx
testb $0x10, %dl
je 0x6e047
cmpb $0x0, (%rcx)
leaq 0x1(%rcx), %rcx
je 0x6e07b
testb $0x29, %dl
je 0x6e05f
movzbl (%rcx), %edx
cmpq $0xff, %rdx
je 0x6e065
movl $0x1, %edi
jmp 0x6e075
movzwl 0x14(%rax), %edx
jmp 0x6e078
movzwl 0x1(%rcx), %edx
rolw $0x8, %dx
movzwl %dx, %edx
movl $0x3, %edi
addq %rdi, %rcx
addq %rdx, %rcx
leaq 0x20(%rax), %rdx
cmpb $0x0, 0x38(%rax)
movq %rdx, %rax
jne 0x6e035
jmp 0x6e098
movzwl 0xaa(%rdi), %eax
retq
movq %rsi, %rcx
movq %rax, %rdx
subl %esi, %ecx
movzwl 0x14(%rdx), %eax
addl %ecx, %eax
popq %rbp
retq
| _ma_keylength:
test byte ptr [rdi+0A2h], 28h
jz short loc_6E08A
push rbp
mov rbp, rsp
mov rax, [rdi+0C0h]
cmp byte ptr [rax+18h], 0
jz short loc_6E092
mov rcx, rsi
loc_6E035:
movzx edx, word ptr [rax+12h]
test dl, 10h
jz short loc_6E047
cmp byte ptr [rcx], 0
lea rcx, [rcx+1]
jz short loc_6E07B
loc_6E047:
test dl, 29h
jz short loc_6E05F
movzx edx, byte ptr [rcx]
cmp rdx, 0FFh
jz short loc_6E065
mov edi, 1
jmp short loc_6E075
loc_6E05F:
movzx edx, word ptr [rax+14h]
jmp short loc_6E078
loc_6E065:
movzx edx, word ptr [rcx+1]
rol dx, 8
movzx edx, dx
mov edi, 3
loc_6E075:
add rcx, rdi
loc_6E078:
add rcx, rdx
loc_6E07B:
lea rdx, [rax+20h]
cmp byte ptr [rax+38h], 0
mov rax, rdx
jnz short loc_6E035
jmp short loc_6E098
loc_6E08A:
movzx eax, word ptr [rdi+0AAh]
retn
loc_6E092:
mov rcx, rsi
mov rdx, rax
loc_6E098:
sub ecx, esi
movzx eax, word ptr [rdx+14h]
add eax, ecx
pop rbp
retn
| long long ma_keylength(long long a1, unsigned __int8 *a2)
{
long long v2; // rax
unsigned __int8 *v3; // rcx
__int16 v4; // dx
bool v5; // zf
long long v6; // rdx
long long v7; // rdi
long long v8; // rdx
if ( (*(_BYTE *)(a1 + 162) & 0x28) == 0 )
return *(unsigned __int16 *)(a1 + 170);
v2 = *(_QWORD *)(a1 + 192);
if ( *(_BYTE *)(v2 + 24) )
{
v3 = a2;
do
{
v4 = *(_WORD *)(v2 + 18);
if ( (v4 & 0x10) == 0 || (v5 = *v3 == 0, ++v3, !v5) )
{
if ( (v4 & 0x29) != 0 )
{
v6 = *v3;
if ( v6 == 255 )
{
v6 = (unsigned __int16)__ROL2__(*(_WORD *)(v3 + 1), 8);
v7 = 3LL;
}
else
{
v7 = 1LL;
}
v3 += v7;
}
else
{
v6 = *(unsigned __int16 *)(v2 + 20);
}
v3 += v6;
}
v8 = v2 + 32;
v5 = *(_BYTE *)(v2 + 56) == 0;
v2 += 32LL;
}
while ( !v5 );
}
else
{
LODWORD(v3) = (_DWORD)a2;
v8 = *(_QWORD *)(a1 + 192);
}
return (_DWORD)v3 - (_DWORD)a2 + (unsigned int)*(unsigned __int16 *)(v8 + 20);
}
| _ma_keylength:
TEST byte ptr [RDI + 0xa2],0x28
JZ 0x0016e08a
PUSH RBP
MOV RBP,RSP
MOV RAX,qword ptr [RDI + 0xc0]
CMP byte ptr [RAX + 0x18],0x0
JZ 0x0016e092
MOV RCX,RSI
LAB_0016e035:
MOVZX EDX,word ptr [RAX + 0x12]
TEST DL,0x10
JZ 0x0016e047
CMP byte ptr [RCX],0x0
LEA RCX,[RCX + 0x1]
JZ 0x0016e07b
LAB_0016e047:
TEST DL,0x29
JZ 0x0016e05f
MOVZX EDX,byte ptr [RCX]
CMP RDX,0xff
JZ 0x0016e065
MOV EDI,0x1
JMP 0x0016e075
LAB_0016e05f:
MOVZX EDX,word ptr [RAX + 0x14]
JMP 0x0016e078
LAB_0016e065:
MOVZX EDX,word ptr [RCX + 0x1]
ROL DX,0x8
MOVZX EDX,DX
MOV EDI,0x3
LAB_0016e075:
ADD RCX,RDI
LAB_0016e078:
ADD RCX,RDX
LAB_0016e07b:
LEA RDX,[RAX + 0x20]
CMP byte ptr [RAX + 0x38],0x0
MOV RAX,RDX
JNZ 0x0016e035
JMP 0x0016e098
LAB_0016e08a:
MOVZX EAX,word ptr [RDI + 0xaa]
RET
LAB_0016e092:
MOV RCX,RSI
MOV RDX,RAX
LAB_0016e098:
SUB ECX,ESI
MOVZX EAX,word ptr [RDX + 0x14]
ADD EAX,ECX
POP RBP
RET
|
uint _ma_keylength(long param_1,byte *param_2)
{
char cVar1;
byte bVar2;
long lVar3;
ulong uVar4;
int iVar5;
long lVar6;
iVar5 = (int)param_2;
if ((*(byte *)(param_1 + 0xa2) & 0x28) == 0) {
return (uint)*(ushort *)(param_1 + 0xaa);
}
cVar1 = *(char *)(*(long *)(param_1 + 0xc0) + 0x18);
lVar3 = *(long *)(param_1 + 0xc0);
while (cVar1 != '\0') {
if (((*(ushort *)(lVar3 + 0x12) & 0x10) == 0) ||
(bVar2 = *param_2, param_2 = param_2 + 1, bVar2 != 0)) {
if ((*(ushort *)(lVar3 + 0x12) & 0x29) == 0) {
uVar4 = (ulong)*(ushort *)(lVar3 + 0x14);
}
else {
uVar4 = (ulong)*param_2;
if (uVar4 == 0xff) {
uVar4 = (ulong)(ushort)(*(ushort *)(param_2 + 1) << 8 | *(ushort *)(param_2 + 1) >> 8);
lVar6 = 3;
}
else {
lVar6 = 1;
}
param_2 = param_2 + lVar6;
}
param_2 = param_2 + uVar4;
}
cVar1 = *(char *)(lVar3 + 0x38);
lVar3 = lVar3 + 0x20;
}
return (uint)*(ushort *)(lVar3 + 0x14) + ((int)param_2 - iVar5);
}
| |
43,270 | run_sql_fix_privilege_tables | eloqsql/client/mysql_upgrade.c | static int run_sql_fix_privilege_tables(void)
{
int found_real_errors= 0;
const char **query_ptr;
DYNAMIC_STRING ds_script;
DYNAMIC_STRING ds_result;
DBUG_ENTER("run_sql_fix_privilege_tables");
if (init_dynamic_string(&ds_script, "", 65536, 1024))
die("Out of memory");
if (init_dynamic_string(&ds_result, "", 512, 512))
die("Out of memory");
verbose("Phase %d/%d: Running 'mysql_fix_privilege_tables'",
++phase, phases_total);
/*
Individual queries can not be executed independently by invoking
a forked mysql client, because the script uses session variables
and prepared statements.
*/
for ( query_ptr= &mysql_fix_privilege_tables[0];
*query_ptr != NULL;
query_ptr++
)
{
if (strcasecmp(*query_ptr, "flush privileges;\n"))
dynstr_append(&ds_script, *query_ptr);
}
run_query(ds_script.str,
&ds_result, /* Collect result */
TRUE);
{
/*
Scan each line of the result for real errors
and ignore the expected one(s) like "Duplicate column name",
"Unknown column" and "Duplicate key name" since they just
indicate the system tables are already up to date
*/
char *line= ds_result.str;
do
{
if (!is_expected_error(line))
{
/* Something unexpected failed, dump error line to screen */
found_real_errors++;
print_line(line);
}
else if (strncmp(line, "WARNING", 7) == 0)
{
print_line(line);
}
} while ((line= get_line(line)) && *line);
}
dynstr_free(&ds_result);
dynstr_free(&ds_script);
DBUG_RETURN(found_real_errors);
} | O0 | c | run_sql_fix_privilege_tables:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl $0x0, -0x4(%rbp)
leaq -0x30(%rbp), %rdi
leaq 0xc772e(%rip), %rsi # 0xf2468
movl $0x10000, %edx # imm = 0x10000
movl $0x400, %ecx # imm = 0x400
callq 0x39be0
cmpb $0x0, %al
je 0x2ad5b
leaq 0xc14a9(%rip), %rdi # 0xec1fd
movb $0x0, %al
callq 0x29c50
leaq -0x50(%rbp), %rdi
leaq 0xc7702(%rip), %rsi # 0xf2468
movl $0x200, %ecx # imm = 0x200
movq %rcx, %rdx
callq 0x39be0
cmpb $0x0, %al
je 0x2ad85
leaq 0xc147f(%rip), %rdi # 0xec1fd
movb $0x0, %al
callq 0x29c50
movl 0x3d38a1(%rip), %esi # 0x3fe62c
addl $0x1, %esi
movl %esi, 0x3d3898(%rip) # 0x3fe62c
leaq 0xc2aa7(%rip), %rdi # 0xed842
movl $0x7, %edx
movb $0x0, %al
callq 0x2b2e0
leaq 0x219262(%rip), %rax # 0x244010
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x2adf4
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0x64ed4(%rip), %rsi # 0x8fc9e
callq 0x29370
cmpl $0x0, %eax
je 0x2ade4
movq -0x10(%rbp), %rax
movq (%rax), %rsi
leaq -0x30(%rbp), %rdi
callq 0x39eb0
jmp 0x2ade6
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x10(%rbp)
jmp 0x2adb2
movq -0x30(%rbp), %rdi
leaq -0x50(%rbp), %rsi
movl $0x1, %edx
callq 0x2b3c0
movq -0x50(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
callq 0x2c270
cmpb $0x0, %al
jne 0x2ae2f
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
movq -0x58(%rbp), %rdi
callq 0x2c300
jmp 0x2ae54
movq -0x58(%rbp), %rdi
leaq 0xc2a3a(%rip), %rsi # 0xed874
movl $0x7, %edx
callq 0x29190
cmpl $0x0, %eax
jne 0x2ae52
movq -0x58(%rbp), %rdi
callq 0x2c300
jmp 0x2ae54
jmp 0x2ae56
movq -0x58(%rbp), %rdi
callq 0x2c130
movq %rax, %rcx
movq %rcx, -0x58(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, -0x59(%rbp)
je 0x2ae81
movq -0x58(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x59(%rbp)
movb -0x59(%rbp), %al
testb $0x1, %al
jne 0x2ae0e
leaq -0x50(%rbp), %rdi
callq 0x3a3c0
leaq -0x30(%rbp), %rdi
callq 0x3a3c0
movl -0x4(%rbp), %eax
movl %eax, -0x60(%rbp)
movl -0x60(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
| run_sql_fix_privilege_tables:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_4], 0
lea rdi, [rbp+var_30]
lea rsi, asc_F2464+4; ""
mov edx, 10000h
mov ecx, 400h
call init_dynamic_string
cmp al, 0
jz short loc_2AD5B
lea rdi, aOutOfMemory; "Out of memory"
mov al, 0
call die
loc_2AD5B:
lea rdi, [rbp+var_50]
lea rsi, asc_F2464+4; ""
mov ecx, 200h
mov rdx, rcx
call init_dynamic_string
cmp al, 0
jz short loc_2AD85
lea rdi, aOutOfMemory; "Out of memory"
mov al, 0
call die
loc_2AD85:
mov esi, cs:phase
add esi, 1
mov cs:phase, esi
lea rdi, aPhaseDDRunning_0; "Phase %d/%d: Running 'mysql_fix_privile"...
mov edx, 7
mov al, 0
call verbose
lea rax, mysql_fix_privilege_tables
mov [rbp+var_10], rax
loc_2ADB2:
mov rax, [rbp+var_10]
cmp qword ptr [rax], 0
jz short loc_2ADF4
mov rax, [rbp+var_10]
mov rdi, [rax]
lea rsi, aFlushPrivilege_0; "flush privileges;\n"
call _strcasecmp
cmp eax, 0
jz short loc_2ADE4
mov rax, [rbp+var_10]
mov rsi, [rax]
lea rdi, [rbp+var_30]
call dynstr_append
loc_2ADE4:
jmp short $+2
loc_2ADE6:
mov rax, [rbp+var_10]
add rax, 8
mov [rbp+var_10], rax
jmp short loc_2ADB2
loc_2ADF4:
mov rdi, [rbp+var_30]
lea rsi, [rbp+var_50]
mov edx, 1
call run_query
mov rax, [rbp+var_50]
mov [rbp+var_58], rax
loc_2AE0E:
mov rdi, [rbp+var_58]
call is_expected_error
cmp al, 0
jnz short loc_2AE2F
mov eax, [rbp+var_4]
add eax, 1
mov [rbp+var_4], eax
mov rdi, [rbp+var_58]
call print_line
jmp short loc_2AE54
loc_2AE2F:
mov rdi, [rbp+var_58]
lea rsi, aWarning; "WARNING"
mov edx, 7
call _strncmp
cmp eax, 0
jnz short loc_2AE52
mov rdi, [rbp+var_58]
call print_line
loc_2AE52:
jmp short $+2
loc_2AE54:
jmp short $+2
loc_2AE56:
mov rdi, [rbp+var_58]
call get_line
mov rcx, rax
mov [rbp+var_58], rcx
xor eax, eax
cmp rcx, 0
mov [rbp+var_59], al
jz short loc_2AE81
mov rax, [rbp+var_58]
movsx eax, byte ptr [rax]
cmp eax, 0
setnz al
mov [rbp+var_59], al
loc_2AE81:
mov al, [rbp+var_59]
test al, 1
jnz short loc_2AE0E
lea rdi, [rbp+var_50]
call dynstr_free
lea rdi, [rbp+var_30]
call dynstr_free
mov eax, [rbp+var_4]
mov [rbp+var_60], eax
mov eax, [rbp+var_60]
add rsp, 60h
pop rbp
retn
| long long run_sql_fix_privilege_tables(
__m128 a1,
__m128 a2,
__m128 a3,
__m128 a4,
double a5,
double a6,
__m128 a7,
__m128 a8)
{
long long v8; // rdx
long long v9; // rcx
long long v10; // r8
long long v11; // r9
__m128 v12; // xmm4
__m128 v13; // xmm5
long long v14; // rdx
long long v15; // rcx
long long v16; // r8
long long v17; // r9
__m128 v18; // xmm4
__m128 v19; // xmm5
char v21; // [rsp+0h] [rbp-60h]
bool v22; // [rsp+7h] [rbp-59h]
_BYTE *line; // [rsp+8h] [rbp-58h]
_QWORD v24[4]; // [rsp+10h] [rbp-50h] BYREF
const char *v25[4]; // [rsp+30h] [rbp-30h] BYREF
char **i; // [rsp+50h] [rbp-10h]
unsigned int v27; // [rsp+5Ch] [rbp-4h]
v27 = 0;
if ( (unsigned __int8)init_dynamic_string(v25, "", 0x10000LL, 1024LL) )
die((long long)"Out of memory", (long long)"", v8, v9, v10, v11, a1, a2, a3, a4, v12, v13, a7, a8, v21);
if ( (unsigned __int8)init_dynamic_string(v24, "", 512LL, 512LL) )
die((long long)"Out of memory", (long long)"", v14, v15, v16, v17, a1, a2, a3, a4, v18, v19, a7, a8, v21);
verbose((unsigned int)"Phase %d/%d: Running 'mysql_fix_privilege_tables'", ++phase, 7, v15, v16, v17);
for ( i = mysql_fix_privilege_tables; *i; ++i )
{
if ( (unsigned int)strcasecmp(*i, "flush privileges;\n") )
dynstr_append(v25, *i);
}
run_query(v25[0], v24, 1LL);
line = (_BYTE *)v24[0];
do
{
if ( (unsigned __int8)is_expected_error(line) )
{
if ( !(unsigned int)strncmp(line, "WARNING", 7LL) )
print_line(line);
}
else
{
++v27;
print_line(line);
}
line = (_BYTE *)get_line(line);
v22 = 0;
if ( line )
v22 = *line != 0;
}
while ( v22 );
dynstr_free(v24);
dynstr_free(v25);
return v27;
}
| run_sql_fix_privilege_tables:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV dword ptr [RBP + -0x4],0x0
LEA RDI,[RBP + -0x30]
LEA RSI,[0x1f2468]
MOV EDX,0x10000
MOV ECX,0x400
CALL 0x00139be0
CMP AL,0x0
JZ 0x0012ad5b
LEA RDI,[0x1ec1fd]
MOV AL,0x0
CALL 0x00129c50
LAB_0012ad5b:
LEA RDI,[RBP + -0x50]
LEA RSI,[0x1f2468]
MOV ECX,0x200
MOV RDX,RCX
CALL 0x00139be0
CMP AL,0x0
JZ 0x0012ad85
LEA RDI,[0x1ec1fd]
MOV AL,0x0
CALL 0x00129c50
LAB_0012ad85:
MOV ESI,dword ptr [0x004fe62c]
ADD ESI,0x1
MOV dword ptr [0x004fe62c],ESI
LEA RDI,[0x1ed842]
MOV EDX,0x7
MOV AL,0x0
CALL 0x0012b2e0
LEA RAX,[0x344010]
MOV qword ptr [RBP + -0x10],RAX
LAB_0012adb2:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX],0x0
JZ 0x0012adf4
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x18fc9e]
CALL 0x00129370
CMP EAX,0x0
JZ 0x0012ade4
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX]
LEA RDI,[RBP + -0x30]
CALL 0x00139eb0
LAB_0012ade4:
JMP 0x0012ade6
LAB_0012ade6:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x8
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0012adb2
LAB_0012adf4:
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[RBP + -0x50]
MOV EDX,0x1
CALL 0x0012b3c0
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x58],RAX
LAB_0012ae0e:
MOV RDI,qword ptr [RBP + -0x58]
CALL 0x0012c270
CMP AL,0x0
JNZ 0x0012ae2f
MOV EAX,dword ptr [RBP + -0x4]
ADD EAX,0x1
MOV dword ptr [RBP + -0x4],EAX
MOV RDI,qword ptr [RBP + -0x58]
CALL 0x0012c300
JMP 0x0012ae54
LAB_0012ae2f:
MOV RDI,qword ptr [RBP + -0x58]
LEA RSI,[0x1ed874]
MOV EDX,0x7
CALL 0x00129190
CMP EAX,0x0
JNZ 0x0012ae52
MOV RDI,qword ptr [RBP + -0x58]
CALL 0x0012c300
LAB_0012ae52:
JMP 0x0012ae54
LAB_0012ae54:
JMP 0x0012ae56
LAB_0012ae56:
MOV RDI,qword ptr [RBP + -0x58]
CALL 0x0012c130
MOV RCX,RAX
MOV qword ptr [RBP + -0x58],RCX
XOR EAX,EAX
CMP RCX,0x0
MOV byte ptr [RBP + -0x59],AL
JZ 0x0012ae81
MOV RAX,qword ptr [RBP + -0x58]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x59],AL
LAB_0012ae81:
MOV AL,byte ptr [RBP + -0x59]
TEST AL,0x1
JNZ 0x0012ae0e
LEA RDI,[RBP + -0x50]
CALL 0x0013a3c0
LEA RDI,[RBP + -0x30]
CALL 0x0013a3c0
MOV EAX,dword ptr [RBP + -0x4]
MOV dword ptr [RBP + -0x60],EAX
MOV EAX,dword ptr [RBP + -0x60]
ADD RSP,0x60
POP RBP
RET
|
int run_sql_fix_privilege_tables(void)
{
char cVar1;
int iVar2;
bool bVar3;
char *local_60;
char *local_58 [4];
int8 local_38 [4];
int **local_18;
int local_c;
local_c = 0;
cVar1 = init_dynamic_string(local_38,&DAT_001f2468,0x10000,0x400);
if (cVar1 != '\0') {
die("Out of memory");
}
cVar1 = init_dynamic_string(local_58,&DAT_001f2468,0x200);
if (cVar1 != '\0') {
die("Out of memory");
}
phase = phase + 1;
verbose("Phase %d/%d: Running \'mysql_fix_privilege_tables\'",phase,7);
for (local_18 = &mysql_fix_privilege_tables; *local_18 != (int *)0x0;
local_18 = local_18 + 1) {
iVar2 = strcasecmp(*local_18,"flush privileges;\n");
if (iVar2 != 0) {
dynstr_append(local_38,*local_18);
}
}
run_query(local_38[0],local_58,1);
local_60 = local_58[0];
do {
cVar1 = is_expected_error(local_60);
if (cVar1 == '\0') {
local_c = local_c + 1;
print_line(local_60);
}
else {
iVar2 = strncmp(local_60,"WARNING",7);
if (iVar2 == 0) {
print_line(local_60);
}
}
local_60 = (char *)get_line(local_60);
bVar3 = false;
if (local_60 != (char *)0x0) {
bVar3 = *local_60 != '\0';
}
} while (bVar3);
dynstr_free(local_58);
dynstr_free(local_38);
return local_c;
}
| |
43,271 | my_service_thread_sleep | eloqsql/storage/maria/ma_servicethread.c | my_bool my_service_thread_sleep(MA_SERVICE_THREAD_CONTROL *control,
ulonglong sleep_time)
{
struct timespec abstime;
my_bool res= FALSE;
DBUG_ENTER("my_service_thread_sleep");
DBUG_PRINT("init", ("control %p", control));
mysql_mutex_lock(control->LOCK_control);
if (control->killed)
{
mysql_mutex_unlock(control->LOCK_control);
DBUG_RETURN(TRUE);
}
#if 0 /* good for testing, to do a lot of checkpoints, finds a lot of bugs */
mysql_mutex_unlock(&control->LOCK_control);
my_sleep(100000); /* a tenth of a second */
mysql_mutex_lock(&control->LOCK_control);
#else
/* To have a killable sleep, we use timedwait like our SQL GET_LOCK() */
DBUG_PRINT("info", ("sleeping %llu nano seconds", sleep_time));
if (sleep_time)
{
set_timespec_nsec(abstime, sleep_time);
mysql_cond_timedwait(control->COND_control,
control->LOCK_control, &abstime);
}
#endif
if (control->killed)
res= TRUE;
mysql_mutex_unlock(control->LOCK_control);
DBUG_RETURN(res);
} | O0 | c | my_service_thread_sleep:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movb $0x0, -0x29(%rbp)
jmp 0x41f26
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x1102f3(%rip), %rsi # 0x152228
movl $0x63, %edx
callq 0x41d20
movq -0x10(%rbp), %rax
cmpb $0x0, 0x8(%rax)
je 0x41f5f
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x41df0
movb $0x1, -0x1(%rbp)
jmp 0x41ff0
jmp 0x41f61
jmp 0x41f63
cmpq $0x0, -0x18(%rbp)
je 0x41fcf
jmp 0x41f6c
callq 0xf0220
movq %rax, -0x40(%rbp)
imulq $0x3e8, -0x40(%rbp), %rax # imm = 0x3E8
addq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00
xorl %edx, %edx
divq %rcx
movq %rax, -0x28(%rbp)
movq -0x38(%rbp), %rax
movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00
xorl %edx, %edx
divq %rcx
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
leaq -0x28(%rbp), %rdx
leaq 0x110264(%rip), %rcx # 0x152228
movl $0x74, %r8d
callq 0x42000
movq -0x10(%rbp), %rax
cmpb $0x0, 0x8(%rax)
je 0x41fdd
movb $0x1, -0x29(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x41df0
movb -0x29(%rbp), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
| my_service_thread_sleep:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_29], 0
jmp short $+2
loc_41F26:
mov rax, [rbp+var_10]
mov rdi, [rax+10h]
lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 63h ; 'c'
call inline_mysql_mutex_lock_1
mov rax, [rbp+var_10]
cmp byte ptr [rax+8], 0
jz short loc_41F5F
mov rax, [rbp+var_10]
mov rdi, [rax+10h]
call inline_mysql_mutex_unlock_1
mov [rbp+var_1], 1
jmp loc_41FF0
loc_41F5F:
jmp short $+2
loc_41F61:
jmp short $+2
loc_41F63:
cmp [rbp+var_18], 0
jz short loc_41FCF
jmp short $+2
loc_41F6C:
call my_hrtime
mov [rbp+var_40], rax
imul rax, [rbp+var_40], 3E8h
add rax, [rbp+var_18]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov ecx, 3B9ACA00h
xor edx, edx
div rcx
mov [rbp+var_28], rax
mov rax, [rbp+var_38]
mov ecx, 3B9ACA00h
xor edx, edx
div rcx
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rdi, [rax+18h]
mov rax, [rbp+var_10]
mov rsi, [rax+10h]
lea rdx, [rbp+var_28]
lea rcx, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/eloqsq"...
mov r8d, 74h ; 't'
call inline_mysql_cond_timedwait_0
loc_41FCF:
mov rax, [rbp+var_10]
cmp byte ptr [rax+8], 0
jz short loc_41FDD
mov [rbp+var_29], 1
loc_41FDD:
mov rax, [rbp+var_10]
mov rdi, [rax+10h]
call inline_mysql_mutex_unlock_1
mov al, [rbp+var_29]
mov [rbp+var_1], al
loc_41FF0:
mov al, [rbp+var_1]
add rsp, 40h
pop rbp
retn
| char my_service_thread_sleep(long long a1, long long a2)
{
long long v2; // rdi
long long v3; // rdx
long long v4; // rax
long long v5; // r9
char v7; // [rsp+17h] [rbp-29h]
_QWORD v8[2]; // [rsp+18h] [rbp-28h] BYREF
long long v9; // [rsp+28h] [rbp-18h]
long long v10; // [rsp+30h] [rbp-10h]
v10 = a1;
v9 = a2;
v7 = 0;
v2 = *(_QWORD *)(a1 + 16);
inline_mysql_mutex_lock_1(
v2,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_servicethread.c",
0x63u);
if ( *(_BYTE *)(v10 + 8) )
{
inline_mysql_mutex_unlock_1(*(_QWORD *)(v10 + 16));
return 1;
}
else
{
if ( v9 )
{
v4 = my_hrtime(v2, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_servicethread.c", v3);
v8[0] = (v9 + 1000 * v4) / 0x3B9ACA00uLL;
v8[1] = (v9 + 1000 * v4) % 0x3B9ACA00uLL;
inline_mysql_cond_timedwait_0(
*(_QWORD *)(v10 + 24),
*(_QWORD *)(v10 + 16),
v8,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_servicethread.c",
116LL,
v5,
v4,
v9 + 1000 * v4);
}
if ( *(_BYTE *)(v10 + 8) )
v7 = 1;
inline_mysql_mutex_unlock_1(*(_QWORD *)(v10 + 16));
return v7;
}
}
| my_service_thread_sleep:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV byte ptr [RBP + -0x29],0x0
JMP 0x00141f26
LAB_00141f26:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x10]
LEA RSI,[0x252228]
MOV EDX,0x63
CALL 0x00141d20
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX + 0x8],0x0
JZ 0x00141f5f
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x00141df0
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00141ff0
LAB_00141f5f:
JMP 0x00141f61
LAB_00141f61:
JMP 0x00141f63
LAB_00141f63:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00141fcf
JMP 0x00141f6c
LAB_00141f6c:
CALL 0x001f0220
MOV qword ptr [RBP + -0x40],RAX
IMUL RAX,qword ptr [RBP + -0x40],0x3e8
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,0x3b9aca00
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,0x3b9aca00
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x10]
LEA RDX,[RBP + -0x28]
LEA RCX,[0x252228]
MOV R8D,0x74
CALL 0x00142000
LAB_00141fcf:
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX + 0x8],0x0
JZ 0x00141fdd
MOV byte ptr [RBP + -0x29],0x1
LAB_00141fdd:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x00141df0
MOV AL,byte ptr [RBP + -0x29]
MOV byte ptr [RBP + -0x1],AL
LAB_00141ff0:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x40
POP RBP
RET
|
int8 my_service_thread_sleep(long param_1,long param_2)
{
char cVar1;
int7 extraout_var;
long lVar2;
int8 uVar3;
int7 uVar4;
ulong local_30;
ulong local_28;
long local_20;
long local_18;
bool local_9;
local_20 = param_2;
local_18 = param_1;
inline_mysql_mutex_lock
(*(int8 *)(param_1 + 0x10),
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_servicethread.c",99);
if (*(char *)(local_18 + 8) == '\0') {
if (local_20 != 0) {
lVar2 = my_hrtime();
local_28 = lVar2 * 1000 + local_20;
local_30 = local_28 / 1000000000;
local_28 = local_28 % 1000000000;
inline_mysql_cond_timedwait
(*(int8 *)(local_18 + 0x18),*(int8 *)(local_18 + 0x10),&local_30,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_servicethread.c",0x74);
}
cVar1 = *(char *)(local_18 + 8);
uVar3 = inline_mysql_mutex_unlock(*(int8 *)(local_18 + 0x10));
uVar4 = (int7)((ulong)uVar3 >> 8);
local_9 = cVar1 != '\0';
}
else {
inline_mysql_mutex_unlock(*(int8 *)(local_18 + 0x10));
local_9 = true;
uVar4 = extraout_var;
}
return CONCAT71(uVar4,local_9);
}
| |
43,272 | ma_log_change | eloqsql/storage/maria/ma_write.c | my_bool _ma_log_change(MARIA_PAGE *ma_page, const uchar *key_pos, uint length,
enum en_key_debug debug_marker __attribute__((unused)))
{
LSN lsn;
uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE + 2 + 6 + 7], *log_pos;
LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 4];
uint offset= (uint) (key_pos - ma_page->buff), translog_parts;
MARIA_HA *info= ma_page->info;
my_off_t page= ma_page->pos / info->s->block_size;
DBUG_ENTER("_ma_log_change");
DBUG_PRINT("enter", ("page: %lu length: %u", (ulong) page, length));
DBUG_ASSERT(info->s->now_transactional);
DBUG_ASSERT(offset + length <= ma_page->size);
DBUG_ASSERT(ma_page->org_size == ma_page->size);
/* Store address of new root page */
page= ma_page->pos / info->s->block_size;
page_store(log_data + FILEID_STORE_SIZE, page);
log_pos= log_data+ FILEID_STORE_SIZE + PAGE_STORE_SIZE;
#ifdef EXTRA_DEBUG_KEY_CHANGES
(*log_pos++)= KEY_OP_DEBUG;
(*log_pos++)= debug_marker;
#endif
log_pos[0]= KEY_OP_OFFSET;
int2store(log_pos+1, offset);
log_pos[3]= KEY_OP_CHANGE;
int2store(log_pos+4, length);
log_pos+= 6;
log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data;
log_array[TRANSLOG_INTERNAL_PARTS + 0].length= (log_pos - log_data);
log_array[TRANSLOG_INTERNAL_PARTS + 1].str= key_pos;
log_array[TRANSLOG_INTERNAL_PARTS + 1].length= length;
translog_parts= 2;
_ma_log_key_changes(ma_page,
log_array + TRANSLOG_INTERNAL_PARTS + translog_parts,
log_pos, &length, &translog_parts);
if (translog_write_record(&lsn, LOGREC_REDO_INDEX,
info->trn, info,
(translog_size_t) (log_pos - log_data) + length,
TRANSLOG_INTERNAL_PARTS + translog_parts,
log_array, log_data, NULL))
DBUG_RETURN(1);
DBUG_RETURN(0);
} | O0 | c | ma_log_change:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp # imm = 0x100
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x30(%rbp)
movq %rsi, -0x38(%rbp)
movl %edx, -0x3c(%rbp)
movl %ecx, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
movq 0x10(%rcx), %rcx
subq %rcx, %rax
movl %eax, -0xb4(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xc0(%rbp)
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq -0xc0(%rbp), %rcx
movq (%rcx), %rcx
movl 0x7bc(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0xc8(%rbp)
jmp 0x87acf
jmp 0x87ad1
jmp 0x87ad3
jmp 0x87ad5
jmp 0x87ad7
jmp 0x87ad9
jmp 0x87adb
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq -0xc0(%rbp), %rcx
movq (%rcx), %rcx
movl 0x7bc(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0xc8(%rbp)
leaq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0xd0(%rbp)
movq -0xc8(%rbp), %rax
movl %eax, %ecx
movq -0xd0(%rbp), %rax
movl %ecx, (%rax)
movq -0xc8(%rbp), %rax
shrq $0x20, %rax
movb %al, %cl
movq -0xd0(%rbp), %rax
movb %cl, 0x4(%rax)
leaq -0x20(%rbp), %rax
addq $0x2, %rax
addq $0x5, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movb $0x1, (%rax)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xd8(%rbp)
movl -0xb4(%rbp), %eax
movw %ax, %cx
movq -0xd8(%rbp), %rax
movw %cx, (%rax)
movq -0x50(%rbp), %rax
movb $0x3, 0x3(%rax)
movq -0x50(%rbp), %rax
addq $0x4, %rax
movq %rax, -0xe0(%rbp)
movl -0x3c(%rbp), %eax
movw %ax, %cx
movq -0xe0(%rbp), %rax
movw %cx, (%rax)
movq -0x50(%rbp), %rax
addq $0x6, %rax
movq %rax, -0x50(%rbp)
leaq -0x20(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x50(%rbp), %rax
leaq -0x20(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x88(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x80(%rbp)
movl -0x3c(%rbp), %eax
movq %rax, -0x78(%rbp)
movl $0x2, -0xb8(%rbp)
movq -0xc0(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0xc0(%rbp), %rcx
movq -0x50(%rbp), %rax
leaq -0x20(%rbp), %rsi
subq %rsi, %rax
movl %eax, %r8d
addl -0x3c(%rbp), %r8d
movl -0xb8(%rbp), %r9d
addl $0x2, %r9d
leaq -0xb0(%rbp), %r10
leaq -0x20(%rbp), %rax
leaq -0x48(%rbp), %rdi
movl $0xc, %esi
xorl %r11d, %r11d
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
callq 0x55370
cmpb $0x0, %al
je 0x87c42
jmp 0x87c3c
movb $0x1, -0x21(%rbp)
jmp 0x87c48
jmp 0x87c44
movb $0x0, -0x21(%rbp)
movb -0x21(%rbp), %al
movb %al, -0xe1(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x87c72
movb -0xe1(%rbp), %al
addq $0x100, %rsp # imm = 0x100
popq %rbp
retq
callq 0x2a270
nopw (%rax,%rax)
| _ma_log_change:
push rbp
mov rbp, rsp
sub rsp, 100h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_30], rdi
mov [rbp+var_38], rsi
mov [rbp+var_3C], edx
mov [rbp+var_40], ecx
mov rax, [rbp+var_38]
mov rcx, [rbp+var_30]
mov rcx, [rcx+10h]
sub rax, rcx
mov [rbp+var_B4], eax
mov rax, [rbp+var_30]
mov rax, [rax]
mov [rbp+var_C0], rax
mov rax, [rbp+var_30]
mov rax, [rax+18h]
mov rcx, [rbp+var_C0]
mov rcx, [rcx]
mov ecx, [rcx+7BCh]
xor edx, edx
div rcx
mov [rbp+var_C8], rax
jmp short $+2
loc_87ACF:
jmp short $+2
loc_87AD1:
jmp short $+2
loc_87AD3:
jmp short $+2
loc_87AD5:
jmp short $+2
loc_87AD7:
jmp short $+2
loc_87AD9:
jmp short $+2
loc_87ADB:
mov rax, [rbp+var_30]
mov rax, [rax+18h]
mov rcx, [rbp+var_C0]
mov rcx, [rcx]
mov ecx, [rcx+7BCh]
xor edx, edx
div rcx
mov [rbp+var_C8], rax
lea rax, [rbp+var_20]
add rax, 2
mov [rbp+var_D0], rax
mov rax, [rbp+var_C8]
mov ecx, eax
mov rax, [rbp+var_D0]
mov [rax], ecx
mov rax, [rbp+var_C8]
shr rax, 20h
mov cl, al
mov rax, [rbp+var_D0]
mov [rax+4], cl
lea rax, [rbp+var_20]
add rax, 2
add rax, 5
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
mov byte ptr [rax], 1
mov rax, [rbp+var_50]
add rax, 1
mov [rbp+var_D8], rax
mov eax, [rbp+var_B4]
mov cx, ax
mov rax, [rbp+var_D8]
mov [rax], cx
mov rax, [rbp+var_50]
mov byte ptr [rax+3], 3
mov rax, [rbp+var_50]
add rax, 4
mov [rbp+var_E0], rax
mov eax, [rbp+var_3C]
mov cx, ax
mov rax, [rbp+var_E0]
mov [rax], cx
mov rax, [rbp+var_50]
add rax, 6
mov [rbp+var_50], rax
lea rax, [rbp+var_20]
mov [rbp+var_90], rax
mov rax, [rbp+var_50]
lea rcx, [rbp+var_20]
sub rax, rcx
mov [rbp+var_88], rax
mov rax, [rbp+var_38]
mov [rbp+var_80], rax
mov eax, [rbp+var_3C]
mov [rbp+var_78], rax
mov [rbp+var_B8], 2
mov rax, [rbp+var_C0]
mov rdx, [rax+8]
mov rcx, [rbp+var_C0]
mov rax, [rbp+var_50]
lea rsi, [rbp+var_20]
sub rax, rsi
mov r8d, eax
add r8d, [rbp+var_3C]
mov r9d, [rbp+var_B8]
add r9d, 2
lea r10, [rbp+var_B0]
lea rax, [rbp+var_20]
lea rdi, [rbp+var_48]
mov esi, 0Ch
xor r11d, r11d
mov [rsp+100h+var_100], r10
mov [rsp+100h+var_F8], rax
mov [rsp+100h+var_F0], 0
call translog_write_record
cmp al, 0
jz short loc_87C42
jmp short $+2
loc_87C3C:
mov [rbp+var_21], 1
jmp short loc_87C48
loc_87C42:
jmp short $+2
loc_87C44:
mov [rbp+var_21], 0
loc_87C48:
mov al, [rbp+var_21]
mov [rbp+var_E1], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_87C72
mov al, [rbp+var_E1]
add rsp, 100h
pop rbp
retn
loc_87C72:
call ___stack_chk_fail
| bool ma_log_change(long long **a1, long long a2, unsigned int a3, int a4)
{
unsigned long long v5; // [rsp+38h] [rbp-C8h]
long long *v6; // [rsp+40h] [rbp-C0h]
__int16 v7; // [rsp+4Ch] [rbp-B4h]
_QWORD v8[13]; // [rsp+50h] [rbp-B0h] BYREF
_BYTE v9[8]; // [rsp+B8h] [rbp-48h] BYREF
int v10; // [rsp+C0h] [rbp-40h]
unsigned int v11; // [rsp+C4h] [rbp-3Ch]
long long v12; // [rsp+C8h] [rbp-38h]
long long **v13; // [rsp+D0h] [rbp-30h]
__int16 v14; // [rsp+E0h] [rbp-20h] BYREF
int v15; // [rsp+E2h] [rbp-1Eh]
char v16; // [rsp+E6h] [rbp-1Ah]
char v17; // [rsp+E7h] [rbp-19h]
__int16 v18; // [rsp+E8h] [rbp-18h]
char v19; // [rsp+EAh] [rbp-16h]
__int16 v20; // [rsp+EBh] [rbp-15h]
_BYTE v21[19]; // [rsp+EDh] [rbp-13h] BYREF
long long savedregs; // [rsp+100h] [rbp+0h] BYREF
*(_QWORD *)&v21[11] = __readfsqword(0x28u);
v13 = a1;
v12 = a2;
v11 = a3;
v10 = a4;
v7 = a2 - (unsigned __int16)a1[2];
v6 = *a1;
v5 = (unsigned long long)a1[3] / *(unsigned int *)(**a1 + 1980);
v15 = v5;
v16 = BYTE4(v5);
v17 = 1;
v18 = v7;
v19 = 3;
v20 = a3;
v8[12] = v21;
v8[4] = &v14;
v8[5] = 13LL;
v8[6] = a2;
v8[7] = a3;
return translog_write_record(
(long long)v9,
0xCu,
v6[1],
v6,
a3 + (unsigned int)v21 - ((unsigned int)&savedregs - 32),
4u,
v8,
&v14,
0LL) != 0;
}
| _ma_log_change:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x100
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x30],RDI
MOV qword ptr [RBP + -0x38],RSI
MOV dword ptr [RBP + -0x3c],EDX
MOV dword ptr [RBP + -0x40],ECX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RCX + 0x10]
SUB RAX,RCX
MOV dword ptr [RBP + -0xb4],EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0xc0],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RBP + -0xc0]
MOV RCX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0x7bc]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0xc8],RAX
JMP 0x00187acf
LAB_00187acf:
JMP 0x00187ad1
LAB_00187ad1:
JMP 0x00187ad3
LAB_00187ad3:
JMP 0x00187ad5
LAB_00187ad5:
JMP 0x00187ad7
LAB_00187ad7:
JMP 0x00187ad9
LAB_00187ad9:
JMP 0x00187adb
LAB_00187adb:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RBP + -0xc0]
MOV RCX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0x7bc]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0xc8],RAX
LEA RAX,[RBP + -0x20]
ADD RAX,0x2
MOV qword ptr [RBP + -0xd0],RAX
MOV RAX,qword ptr [RBP + -0xc8]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0xd0]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0xc8]
SHR RAX,0x20
MOV CL,AL
MOV RAX,qword ptr [RBP + -0xd0]
MOV byte ptr [RAX + 0x4],CL
LEA RAX,[RBP + -0x20]
ADD RAX,0x2
ADD RAX,0x5
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV byte ptr [RAX],0x1
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x1
MOV qword ptr [RBP + -0xd8],RAX
MOV EAX,dword ptr [RBP + -0xb4]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0xd8]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x50]
MOV byte ptr [RAX + 0x3],0x3
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x4
MOV qword ptr [RBP + -0xe0],RAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0xe0]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x6
MOV qword ptr [RBP + -0x50],RAX
LEA RAX,[RBP + -0x20]
MOV qword ptr [RBP + -0x90],RAX
MOV RAX,qword ptr [RBP + -0x50]
LEA RCX,[RBP + -0x20]
SUB RAX,RCX
MOV qword ptr [RBP + -0x88],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x80],RAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV qword ptr [RBP + -0x78],RAX
MOV dword ptr [RBP + -0xb8],0x2
MOV RAX,qword ptr [RBP + -0xc0]
MOV RDX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0xc0]
MOV RAX,qword ptr [RBP + -0x50]
LEA RSI,[RBP + -0x20]
SUB RAX,RSI
MOV R8D,EAX
ADD R8D,dword ptr [RBP + -0x3c]
MOV R9D,dword ptr [RBP + -0xb8]
ADD R9D,0x2
LEA R10,[RBP + -0xb0]
LEA RAX,[RBP + -0x20]
LEA RDI,[RBP + -0x48]
MOV ESI,0xc
XOR R11D,R11D
MOV qword ptr [RSP],R10
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],0x0
CALL 0x00155370
CMP AL,0x0
JZ 0x00187c42
JMP 0x00187c3c
LAB_00187c3c:
MOV byte ptr [RBP + -0x21],0x1
JMP 0x00187c48
LAB_00187c42:
JMP 0x00187c44
LAB_00187c44:
MOV byte ptr [RBP + -0x21],0x0
LAB_00187c48:
MOV AL,byte ptr [RBP + -0x21]
MOV byte ptr [RBP + -0xe1],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00187c72
MOV AL,byte ptr [RBP + -0xe1]
ADD RSP,0x100
POP RBP
RET
LAB_00187c72:
CALL 0x0012a270
|
int8 _ma_log_change(long *param_1,int8 param_2,uint param_3,int4 param_4)
{
long *plVar1;
char cVar2;
ulong uVar3;
long in_FS_OFFSET;
int1 local_b8 [32];
int1 *local_98;
long local_90;
int8 local_88;
ulong local_80;
int1 *local_58;
int1 local_50 [8];
int4 local_48;
uint local_44;
int8 local_40;
long *local_38;
int1 local_29;
int1 local_28 [2];
int4 local_26;
int1 local_22;
int1 local_21;
short local_20;
int1 local_1e;
int2 local_1d;
int1 auStack_1b [11];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_20 = (short)param_2 - (short)param_1[2];
plVar1 = (long *)*param_1;
uVar3 = (ulong)param_1[3] / (ulong)*(uint *)(*plVar1 + 0x7bc);
local_26 = (int4)uVar3;
local_22 = (int1)(uVar3 >> 0x20);
local_21 = 1;
local_1e = 3;
local_1d = (int2)param_3;
local_58 = auStack_1b;
local_98 = local_28;
local_90 = (long)local_58 - (long)local_28;
local_80 = (ulong)param_3;
local_88 = param_2;
local_48 = param_4;
local_44 = param_3;
local_40 = param_2;
local_38 = param_1;
cVar2 = translog_write_record
(local_50,0xc,plVar1[1],plVar1,((int)local_58 - (int)local_28) + param_3,4,
local_b8,local_28,0);
local_29 = cVar2 != '\0';
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_29);
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
43,273 | void nlohmann::json_abi_v3_11_3::detail::get_arithmetic_value<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>, long, 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&, long&) | monkey531[P]llama/common/./json.hpp | void get_arithmetic_value(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::null:
case value_t::object:
case value_t::array:
case value_t::string:
case value_t::boolean:
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::get_arithmetic_value<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>, long, 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&, long&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
movzbl (%rdi), %eax
cmpl $0x5, %eax
je 0x402ce
cmpl $0x7, %eax
je 0x402d4
cmpl $0x6, %eax
jne 0x402e6
movq 0x8(%r14), %rax
jmp 0x402da
cvttsd2si 0x8(%r14), %rax
movq %rax, (%rsi)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x193b0
movq %rax, %rbx
movq %r14, %rdi
callq 0x298a8
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x71243(%rip), %rsi # 0xb154d
leaq 0x10(%rsp), %rdi
callq 0x25e99
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x29654
xorl %ebp, %ebp
leaq 0xa5bab(%rip), %rsi # 0xe5ee0
leaq -0x1c594(%rip), %rdx # 0x23da8
movq %rbx, %rdi
callq 0x19da0
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x40362
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x197b0
testb %bpl, %bpl
jne 0x4036c
jmp 0x40374
movq %rax, %r14
movq %rbx, %rdi
callq 0x19570
movq %r14, %rdi
callq 0x19e10
| _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEElTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
movzx eax, byte ptr [rdi]
cmp eax, 5
jz short loc_402CE
cmp eax, 7
jz short loc_402D4
cmp eax, 6
jnz short loc_402E6
loc_402CE:
mov rax, [r14+8]
jmp short loc_402DA
loc_402D4:
cvttsd2si rax, qword ptr [r14+8]
loc_402DA:
mov [rsi], rax
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_402E6:
mov edi, 20h ; ' '; thrown_size
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_40362
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_40362:
test bpl, bpl
jnz short loc_4036C
jmp short loc_40374
mov r14, rax
loc_4036C:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_40374:
mov rdi, r14
call __Unwind_Resume
| long long ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEElTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
double *a1,
_QWORD *a2)
{
int v2; // eax
long long result; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
const char *v5; // [rsp+8h] [rbp-40h] BYREF
_QWORD v6[2]; // [rsp+10h] [rbp-38h] BYREF
v2 = *(unsigned __int8 *)a1;
if ( v2 != 5 )
{
if ( v2 == 7 )
{
result = (unsigned int)(int)a1[1];
goto LABEL_6;
}
if ( v2 != 6 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v5 = 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((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v6,
(long long)"type must be number, but is ",
&v5);
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,
v6);
__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);
}
}
result = *((_QWORD *)a1 + 1);
LABEL_6:
*a2 = result;
return result;
}
| _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEElTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
CMP EAX,0x5
JZ 0x001402ce
CMP EAX,0x7
JZ 0x001402d4
CMP EAX,0x6
JNZ 0x001402e6
LAB_001402ce:
MOV RAX,qword ptr [R14 + 0x8]
JMP 0x001402da
LAB_001402d4:
CVTTSD2SI RAX,qword ptr [R14 + 0x8]
LAB_001402da:
MOV qword ptr [RSI],RAX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_001402e6:
MOV EDI,0x20
CALL 0x001193b0
MOV RBX,RAX
MOV RDI,R14
CALL 0x001298a8
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_00140303:
LEA RSI,[0x1b154d]
LEA RDI,[RSP + 0x10]
CALL 0x00125e99
MOV BPL,0x1
LAB_00140317:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x00129654
XOR EBP,EBP
LEA RSI,[0x1e5ee0]
LEA RDX,[0x123da8]
MOV RDI,RBX
CALL 0x00119da0
|
void _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEElTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_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,long *param_2)
{
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>
bVar1;
long lVar2;
int8 uVar3;
char *local_40;
detail local_38 [32];
bVar1 = *param_1;
if (bVar1 != (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) {
if (bVar1 == (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) {
lVar2 = (long)*(double *)(param_1 + 8);
goto LAB_001402da;
}
if (bVar1 != (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) {
uVar3 = __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 00140303 to 00140313 has its CatchHandler @ 00140369 */
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 00140317 to 00140343 has its CatchHandler @ 00140344 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar3,0x12e,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar3,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
}
lVar2 = *(long *)(param_1 + 8);
LAB_001402da:
*param_2 = lVar2;
return;
}
| |
43,274 | minja::LiteralExpr::LiteralExpr(minja::Location const&, minja::Value const&) | monkey531[P]llama/common/minja.hpp | LiteralExpr(const Location & location, const Value& v)
: Expression(location), value(v) {} | O3 | cpp | minja::LiteralExpr::LiteralExpr(minja::Location const&, minja::Value const&):
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x9b8a9(%rip), %r15 # 0x12c3a8
addq $0x10, %r15
movq %r15, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0x90b2f
movq 0x9d45f(%rip), %rcx # 0x12df80
cmpb $0x0, (%rcx)
je 0x90b2b
incl 0x8(%rax)
jmp 0x90b2f
lock
incl 0x8(%rax)
movq 0x10(%rsi), %rax
movq %rax, 0x18(%rbx)
leaq 0x9b9ea(%rip), %rax # 0x12c528
addq $0x10, %rax
movq %rax, (%rbx)
leaq 0x20(%rbx), %rdi
movq %rdx, %rsi
callq 0x90558
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %r15, (%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x90b6b
callq 0x70324
movq %r14, %rdi
callq 0x1c1e0
nop
| _ZN5minja11LiteralExprC2ERKNS_8LocationERKNS_5ValueE:
push r15
push r14
push rbx
mov rbx, rdi
lea r15, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression
add r15, 10h
mov [rdi], r15
mov rax, [rsi]
mov [rdi+8], rax
mov rax, [rsi+8]
mov [rdi+10h], rax
test rax, rax
jz short loc_90B2F
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_90B2B
inc dword ptr [rax+8]
jmp short loc_90B2F
loc_90B2B:
lock inc dword ptr [rax+8]
loc_90B2F:
mov rax, [rsi+10h]
mov [rbx+18h], rax
lea rax, _ZTVN5minja11LiteralExprE; `vtable for'minja::LiteralExpr
add rax, 10h
mov [rbx], rax
lea rdi, [rbx+20h]; this
mov rsi, rdx; minja::Value *
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov [rbx], r15
mov rdi, [rbx+10h]
test rdi, rdi
jz short loc_90B6B
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_90B6B:
mov rdi, r14
call __Unwind_Resume
| long long minja::LiteralExpr::LiteralExpr(_QWORD *a1, _QWORD *a2, const minja::Value *a3)
{
long long v3; // rax
*a1 = &`vtable for'minja::Expression + 2;
a1[1] = *a2;
v3 = a2[1];
a1[2] = v3;
if ( v3 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v3 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v3 + 8));
}
a1[3] = a2[2];
*a1 = &`vtable for'minja::LiteralExpr + 2;
return minja::Value::Value((minja::Value *)(a1 + 4), a3);
}
| LiteralExpr:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
LEA R15,[0x22c3a8]
ADD R15,0x10
MOV qword ptr [RDI],R15
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 0x00190b2f
MOV RCX,qword ptr [0x0022df80]
CMP byte ptr [RCX],0x0
JZ 0x00190b2b
INC dword ptr [RAX + 0x8]
JMP 0x00190b2f
LAB_00190b2b:
INC.LOCK dword ptr [RAX + 0x8]
LAB_00190b2f:
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RBX + 0x18],RAX
LEA RAX,[0x22c528]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
LEA RDI,[RBX + 0x20]
LAB_00190b49:
MOV RSI,RDX
CALL 0x00190558
LAB_00190b51:
POP RBX
POP R14
POP R15
RET
|
/* minja::LiteralExpr::LiteralExpr(minja::Location const&, minja::Value const&) */
void __thiscall minja::LiteralExpr::LiteralExpr(LiteralExpr *this,Location *param_1,Value *param_2)
{
long lVar1;
*(int ***)this = &PTR___cxa_pure_virtual_0022c3b8;
*(int8 *)(this + 8) = *(int8 *)param_1;
lVar1 = *(long *)(param_1 + 8);
*(long *)(this + 0x10) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_0022df80 == '\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_evaluate_0022c538;
/* try { // try from 00190b49 to 00190b50 has its CatchHandler @ 00190b57 */
Value::Value((Value *)(this + 0x20),param_2);
return;
}
| |
43,275 | minja::Value::callable(std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&)> const&) | monkey531[P]llama/common/minja.hpp | static Value callable(const CallableType & callable) {
return Value(std::make_shared<CallableType>(callable));
} | O3 | cpp | minja::Value::callable(std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&)> const&):
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rcx
movq %rdi, %rbx
leaq 0x10(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x8(%rsp), %r14
leaq 0x7(%rsp), %rdx
movq %r14, %rsi
callq 0x9a008
movq %rbx, %rdi
movq %r14, %rsi
callq 0x99f34
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x99884
callq 0x7140a
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x998a1
callq 0x7140a
movq %rbx, %rdi
callq 0x1c250
nop
| _ZN5minja5Value8callableERKSt8functionIFS0_RKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueEEE:
push r14
push rbx
sub rsp, 18h
mov rcx, rsi
mov rbx, rdi
lea rdi, [rsp+28h+var_18]
mov qword ptr [rdi-8], 0
lea r14, [rsp+28h+var_20]
lea rdx, [rsp+28h+var_21]
mov rsi, r14
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2ISt8functionIFN5minja5ValueERKSt10shared_ptrINS5_7ContextEERNS5_14ArgumentsValueEEESaISF_EJRKSF_EEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>,std::allocator<std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>>,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&>(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> *&,std::_Sp_alloc_shared_tag<std::allocator<std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>>>,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&)
mov rdi, rbx
mov rsi, r14
call _ZN5minja5ValueC2ERKSt10shared_ptrISt8functionIFS0_RKS1_INS_7ContextEERNS_14ArgumentsValueEEEE; minja::Value::Value(std::shared_ptr<std::function<minja::Value ()(std::shared_ptr const&<minja::Context>,minja::ArgumentsValue &)>> const&)
mov rdi, [rsp+28h+var_18]
test rdi, rdi
jz short loc_99884
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_99884:
mov rax, rbx
add rsp, 18h
pop rbx
pop r14
retn
mov rbx, rax
mov rdi, [rsp+arg_8]
test rdi, rdi
jz short loc_998A1
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_998A1:
mov rdi, rbx
call __Unwind_Resume
| long long minja::Value::callable(long long a1, long long a2)
{
char v3; // [rsp+7h] [rbp-21h] BYREF
long long v4; // [rsp+8h] [rbp-20h] BYREF
volatile signed __int32 *v5; // [rsp+10h] [rbp-18h] BYREF
v4 = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>,std::allocator<std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>>,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&>(
&v5,
&v4,
&v3,
a2);
minja::Value::Value(a1, &v4);
if ( v5 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v5);
return a1;
}
| callable:
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RCX,RSI
MOV RBX,RDI
LEA RDI,[RSP + 0x10]
MOV qword ptr [RDI + -0x8],0x0
LEA R14,[RSP + 0x8]
LEA RDX,[RSP + 0x7]
MOV RSI,R14
CALL 0x0019a008
LAB_0019986a:
MOV RDI,RBX
MOV RSI,R14
CALL 0x00199f34
LAB_00199875:
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x00199884
CALL 0x0017140a
LAB_00199884:
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R14
RET
|
/* minja::Value::callable(std::function<minja::Value (std::shared_ptr<minja::Context> const&,
minja::ArgumentsValue&)> const&) */
Value * __thiscall minja::Value::callable(Value *this,function *param_1)
{
int1 local_21;
int8 local_20;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_18;
local_20 = 0;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::
__shared_count<std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>,std::allocator<std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>>,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>const&>
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_18,(shared_ptr *)&local_20,
&local_21,param_1);
/* try { // try from 0019986a to 00199874 has its CatchHandler @ 0019988f */
Value(this,(shared_ptr *)&local_20);
if (local_18 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_18);
}
return this;
}
| |
43,276 | pvio_socket_wait_io_or_timeout | eloqsql/libmariadb/plugins/pvio/pvio_socket.c | int pvio_socket_wait_io_or_timeout(MARIADB_PVIO *pvio, my_bool is_read, int timeout)
{
int rc;
struct st_pvio_socket *csock= NULL;
#ifndef _WIN32
struct pollfd p_fd;
#else
struct timeval tv= {0,0};
fd_set fds, exc_fds;
#endif
if (!pvio || !pvio->data)
return 0;
if (pvio->mysql->options.extension &&
pvio->mysql->options.extension->io_wait != NULL) {
my_socket handle;
if (pvio_socket_get_handle(pvio, &handle))
return 0;
return pvio->mysql->options.extension->io_wait(handle, is_read, timeout);
}
csock= (struct st_pvio_socket *)pvio->data;
{
#ifndef _WIN32
memset(&p_fd, 0, sizeof(p_fd));
p_fd.fd= csock->socket;
p_fd.events= (is_read) ? POLLIN : POLLOUT;
if (!timeout)
timeout= -1;
do {
rc= poll(&p_fd, 1, timeout);
} while (rc == -1 && errno == EINTR);
if (rc == 0)
errno= ETIMEDOUT;
#else
FD_ZERO(&fds);
FD_ZERO(&exc_fds);
FD_SET(csock->socket, &fds);
FD_SET(csock->socket, &exc_fds);
if (timeout >= 0)
{
tv.tv_sec= timeout / 1000;
tv.tv_usec= (timeout % 1000) * 1000;
}
rc= select(0, (is_read) ? &fds : NULL,
(is_read) ? NULL : &fds,
&exc_fds,
(timeout >= 0) ? &tv : NULL);
if (rc == SOCKET_ERROR)
{
errno= WSAGetLastError();
}
else if (rc == 0)
{
rc= SOCKET_ERROR;
WSASetLastError(WSAETIMEDOUT);
errno= ETIMEDOUT;
}
else if (FD_ISSET(csock->socket, &exc_fds))
{
int err;
int len = sizeof(int);
if (getsockopt(csock->socket, SOL_SOCKET, SO_ERROR, (char *)&err, &len) != SOCKET_ERROR)
{
WSASetLastError(err);
errno= err;
}
rc= SOCKET_ERROR;
}
#endif
}
return rc;
} | O3 | c | pvio_socket_wait_io_or_timeout:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
xorl %eax, %eax
testq %rdi, %rdi
je 0x2f51d
movq (%rdi), %rcx
testq %rcx, %rcx
je 0x2f51d
movq 0x40(%rdi), %rax
movq 0x480(%rax), %rax
testq %rax, %rax
je 0x2f4ba
movq 0x140(%rax), %rax
testq %rax, %rax
je 0x2f4ba
movl (%rcx), %edi
movsbl %sil, %esi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmpq *%rax
leaq -0x18(%rbp), %rbx
movq $0x0, (%rbx)
movl (%rcx), %eax
movl %eax, (%rbx)
xorl %eax, %eax
testb %sil, %sil
sete %al
leal (%rax,%rax,2), %eax
incl %eax
movw %ax, 0x4(%rbx)
xorl %r14d, %r14d
cmpl $0x1, %edx
sbbl %r14d, %r14d
orl %edx, %r14d
movl $0x1, %esi
movq %rbx, %rdi
movl %r14d, %edx
callq 0x136d0
cmpl $-0x1, %eax
jne 0x2f50c
callq 0x13060
cmpl $0x4, (%rax)
je 0x2f4e6
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x2f51d
testl %eax, %eax
jne 0x2f51d
callq 0x13060
movl $0x6e, (%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
| pvio_socket_wait_io_or_timeout:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 10h
xor eax, eax
test rdi, rdi
jz loc_2F51D
mov rcx, [rdi]
test rcx, rcx
jz loc_2F51D
mov rax, [rdi+40h]
mov rax, [rax+480h]
test rax, rax
jz short loc_2F4BA
mov rax, [rax+140h]
test rax, rax
jz short loc_2F4BA
mov edi, [rcx]
movsx esi, sil
add rsp, 10h
pop rbx
pop r14
pop rbp
jmp rax
loc_2F4BA:
lea rbx, [rbp+var_18]
mov qword ptr [rbx], 0
mov eax, [rcx]
mov [rbx], eax
xor eax, eax
test sil, sil
setz al
lea eax, [rax+rax*2]
inc eax
mov [rbx+4], ax
xor r14d, r14d
cmp edx, 1
sbb r14d, r14d
or r14d, edx
loc_2F4E6:
mov esi, 1
mov rdi, rbx
mov edx, r14d
call _poll
cmp eax, 0FFFFFFFFh
jnz short loc_2F50C
call ___errno_location
cmp dword ptr [rax], 4
jz short loc_2F4E6
mov eax, 0FFFFFFFFh
jmp short loc_2F51D
loc_2F50C:
test eax, eax
jnz short loc_2F51D
call ___errno_location
mov dword ptr [rax], 6Eh ; 'n'
xor eax, eax
loc_2F51D:
add rsp, 10h
pop rbx
pop r14
pop rbp
retn
| long long pvio_socket_wait_io_or_timeout(long long a1, char a2, int a3)
{
long long result; // rax
_DWORD *v4; // rcx
long long v5; // rax
long long ( *v6)(_QWORD, _QWORD); // rax
unsigned int v7; // r14d
_QWORD v8[3]; // [rsp+8h] [rbp-18h] BYREF
result = 0LL;
if ( a1 )
{
v4 = *(_DWORD **)a1;
if ( *(_QWORD *)a1 )
{
v5 = *(_QWORD *)(*(_QWORD *)(a1 + 64) + 1152LL);
if ( v5 && (v6 = *(long long ( **)(_QWORD, _QWORD))(v5 + 320)) != 0LL )
{
return v6((unsigned int)*v4, (unsigned int)a2);
}
else
{
v8[0] = 0LL;
LODWORD(v8[0]) = *v4;
HIDWORD(v8[0]) = (unsigned __int16)(3 * (a2 == 0) + 1);
v7 = a3 == 0 ? -1 : a3;
while ( 1 )
{
result = poll(v8, 1LL, v7);
if ( (_DWORD)result != -1 )
break;
if ( *(_DWORD *)__errno_location(v8) != 4 )
return 0xFFFFFFFFLL;
}
if ( !(_DWORD)result )
{
*(_DWORD *)__errno_location(v8) = 110;
return 0LL;
}
}
}
}
return result;
}
| pvio_socket_wait_io_or_timeout:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x10
XOR EAX,EAX
TEST RDI,RDI
JZ 0x0012f51d
MOV RCX,qword ptr [RDI]
TEST RCX,RCX
JZ 0x0012f51d
MOV RAX,qword ptr [RDI + 0x40]
MOV RAX,qword ptr [RAX + 0x480]
TEST RAX,RAX
JZ 0x0012f4ba
MOV RAX,qword ptr [RAX + 0x140]
TEST RAX,RAX
JZ 0x0012f4ba
MOV EDI,dword ptr [RCX]
MOVSX ESI,SIL
ADD RSP,0x10
POP RBX
POP R14
POP RBP
JMP RAX
LAB_0012f4ba:
LEA RBX,[RBP + -0x18]
MOV qword ptr [RBX],0x0
MOV EAX,dword ptr [RCX]
MOV dword ptr [RBX],EAX
XOR EAX,EAX
TEST SIL,SIL
SETZ AL
LEA EAX,[RAX + RAX*0x2]
INC EAX
MOV word ptr [RBX + 0x4],AX
XOR R14D,R14D
CMP EDX,0x1
SBB R14D,R14D
OR R14D,EDX
LAB_0012f4e6:
MOV ESI,0x1
MOV RDI,RBX
MOV EDX,R14D
CALL 0x001136d0
CMP EAX,-0x1
JNZ 0x0012f50c
CALL 0x00113060
CMP dword ptr [RAX],0x4
JZ 0x0012f4e6
MOV EAX,0xffffffff
JMP 0x0012f51d
LAB_0012f50c:
TEST EAX,EAX
JNZ 0x0012f51d
CALL 0x00113060
MOV dword ptr [RAX],0x6e
XOR EAX,EAX
LAB_0012f51d:
ADD RSP,0x10
POP RBX
POP R14
POP RBP
RET
|
int pvio_socket_wait_io_or_timeout(int8 *param_1,char param_2,uint param_3)
{
int4 *puVar1;
code *UNRECOVERED_JUMPTABLE;
int iVar2;
int *piVar3;
pollfd local_20;
iVar2 = 0;
if ((param_1 != (int8 *)0x0) &&
(puVar1 = (int4 *)*param_1, puVar1 != (int4 *)0x0)) {
if ((*(long *)(param_1[8] + 0x480) != 0) &&
(UNRECOVERED_JUMPTABLE = *(code **)(*(long *)(param_1[8] + 0x480) + 0x140),
UNRECOVERED_JUMPTABLE != (code *)0x0)) {
/* WARNING: Could not recover jumptable at 0x0012f4b8. Too many branches */
/* WARNING: Treating indirect jump as call */
iVar2 = (*UNRECOVERED_JUMPTABLE)(*puVar1,(int)param_2);
return iVar2;
}
local_20.events = (ushort)(param_2 == '\0') * 3 + 1;
local_20.fd = *puVar1;
local_20.revents = 0;
do {
iVar2 = poll(&local_20,1,-(uint)(param_3 == 0) | param_3);
if (iVar2 != -1) {
if (iVar2 != 0) {
return iVar2;
}
piVar3 = __errno_location();
*piVar3 = 0x6e;
return 0;
}
piVar3 = __errno_location();
} while (*piVar3 == 4);
iVar2 = -1;
}
return iVar2;
}
| |
43,277 | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::key(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) | monkey531[P]llama/common/json.hpp | bool key(string_t& val)
{
BasicJsonType k = BasicJsonType(val);
// check callback for key
const bool keep = callback(static_cast<int>(ref_stack.size()), parse_event_t::key, k);
key_keep_stack.push_back(keep);
// add discarded value at given key and store the reference for later
if (keep && ref_stack.back())
{
object_element = &(ref_stack.back()->m_data.m_value.object->operator[](val) = discarded);
}
return true;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::key(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rsp), %rdi
callq 0x5ef50
movq 0x10(%rbx), %rax
subq 0x8(%rbx), %rax
shrq $0x3, %rax
movl %eax, 0xc(%rsp)
movb $0x4, 0xb(%rsp)
cmpq $0x0, 0x90(%rbx)
je 0x5c40e
leaq 0x80(%rbx), %rdi
leaq 0xc(%rsp), %rsi
leaq 0xb(%rsp), %rdx
leaq 0x10(%rsp), %rcx
callq *0x98(%rbx)
movl %eax, %ebp
leaq 0x48(%rbx), %rdi
movzbl %al, %esi
callq 0x5bb10
testb %bpl, %bpl
je 0x5c3ec
movq 0x10(%rbx), %rax
cmpq $0x0, -0x8(%rax)
je 0x5c3ec
leaq 0xa8(%rbx), %rsi
leaq 0x20(%rsp), %rdi
callq 0x5d4a6
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rax
movq 0x8(%rax), %rdi
movq %r14, %rsi
callq 0x5ef8a
leaq 0x20(%rsp), %r14
movq %rax, %rdi
movq %r14, %rsi
callq 0x5ac26
movq %rax, 0x70(%rbx)
movq %r14, %rdi
xorl %esi, %esi
callq 0x58484
movq %r14, %rdi
callq 0x5d972
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x58484
movq %rbx, %rdi
callq 0x5d972
movb $0x1, %al
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x1a330
movq %rax, %rbx
leaq 0x20(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x58484
movq %r14, %rdi
callq 0x5d972
jmp 0x5c432
movq %rax, %rbx
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x58484
movq %r14, %rdi
callq 0x5d972
movq %rbx, %rdi
callq 0x1afd0
nop
| _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyERSB_:
push rbp
push r14
push rbx
sub rsp, 30h
mov r14, rsi
mov rbx, rdi
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_
mov rax, [rbx+10h]
sub rax, [rbx+8]
shr rax, 3
mov [rsp+48h+var_3C], eax
mov [rsp+48h+var_3D], 4
cmp qword ptr [rbx+90h], 0
jz loc_5C40E
lea rdi, [rbx+80h]
lea rsi, [rsp+48h+var_3C]
lea rdx, [rsp+48h+var_3D]
lea rcx, [rsp+48h+var_38]
call qword ptr [rbx+98h]
mov ebp, eax
lea rdi, [rbx+48h]
movzx esi, al
call _ZNSt6vectorIbSaIbEE9push_backEb; std::vector<bool>::push_back(bool)
test bpl, bpl
jz short loc_5C3EC
mov rax, [rbx+10h]
cmp qword ptr [rax-8], 0
jz short loc_5C3EC
lea rsi, [rbx+0A8h]
lea rdi, [rsp+48h+var_28]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
mov rax, [rbx+10h]
mov rax, [rax-8]
mov rdi, [rax+8]
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEEixERSH_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::operator[](std::string const&)
lea r14, [rsp+48h+var_28]
mov rdi, rax
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov [rbx+70h], rax
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
loc_5C3EC:
lea rbx, [rsp+48h+var_38]
mov rdi, rbx
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov al, 1
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_5C40E:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
mov rbx, rax
lea r14, [rsp+48h+var_28]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
jmp short loc_5C432
mov rbx, rax
loc_5C432:
lea r14, [rsp+48h+var_38]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, rbx
call __Unwind_Resume
| char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::key(
long long a1,
long long a2)
{
unsigned __int8 v2; // bp
long long v3; // rax
char v5; // [rsp+Bh] [rbp-3Dh] BYREF
int v6; // [rsp+Ch] [rbp-3Ch] BYREF
char v7[16]; // [rsp+10h] [rbp-38h] BYREF
char v8[40]; // [rsp+20h] [rbp-28h] BYREF
ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_(v7);
v6 = (*(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 8)) >> 3;
v5 = 4;
if ( !*(_QWORD *)(a1 + 144) )
std::__throw_bad_function_call();
v2 = (*(long long ( **)(long long, int *, char *, char *))(a1 + 152))(a1 + 128, &v6, &v5, v7);
std::vector<bool>::push_back(a1 + 72, v2);
if ( v2 && *(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL) )
{
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
v8,
a1 + 168);
v3 = nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator[](
*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL) + 8LL),
a2);
*(_QWORD *)(a1 + 112) = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
v3,
(long long)v8);
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(v8);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v8);
}
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(v7);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v7);
return 1;
}
| key:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RSI
MOV RBX,RDI
LEA RDI,[RSP + 0x10]
CALL 0x0015ef50
MOV RAX,qword ptr [RBX + 0x10]
SUB RAX,qword ptr [RBX + 0x8]
SHR RAX,0x3
MOV dword ptr [RSP + 0xc],EAX
MOV byte ptr [RSP + 0xb],0x4
CMP qword ptr [RBX + 0x90],0x0
JZ 0x0015c40e
LEA RDI,[RBX + 0x80]
LAB_0015c36e:
LEA RSI,[RSP + 0xc]
LEA RDX,[RSP + 0xb]
LEA RCX,[RSP + 0x10]
CALL qword ptr [RBX + 0x98]
MOV EBP,EAX
LEA RDI,[RBX + 0x48]
MOVZX ESI,AL
CALL 0x0015bb10
TEST BPL,BPL
JZ 0x0015c3ec
MOV RAX,qword ptr [RBX + 0x10]
CMP qword ptr [RAX + -0x8],0x0
JZ 0x0015c3ec
LEA RSI,[RBX + 0xa8]
LEA RDI,[RSP + 0x20]
CALL 0x0015d4a6
MOV RAX,qword ptr [RBX + 0x10]
MOV RAX,qword ptr [RAX + -0x8]
MOV RDI,qword ptr [RAX + 0x8]
LAB_0015c3be:
MOV RSI,R14
CALL 0x0015ef8a
LEA R14,[RSP + 0x20]
MOV RDI,RAX
MOV RSI,R14
CALL 0x0015ac26
MOV qword ptr [RBX + 0x70],RAX
MOV RDI,R14
XOR ESI,ESI
CALL 0x00158484
MOV RDI,R14
CALL 0x0015d972
LAB_0015c3ec:
LEA RBX,[RSP + 0x10]
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00158484
MOV RDI,RBX
CALL 0x0015d972
MOV AL,0x1
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_0015c40e:
CALL 0x0011a330
|
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::key(std::__cxx11::string&) */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::key(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,string *param_1)
{
bool bVar1;
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>
*pbVar2;
int8 uVar3;
int1 local_3d;
int4 local_3c;
data local_38 [16];
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_28 [16];
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_
(local_38);
local_3c = (int4)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3);
local_3d = 4;
if (*(long *)(this + 0x90) != 0) {
/* try { // try from 0015c36e to 0015c3b1 has its CatchHandler @ 0015c42f */
bVar1 = (bool)(**(code **)(this + 0x98))(this + 0x80,&local_3c,&local_3d,local_38);
std::vector<bool,std::allocator<bool>>::push_back
((vector<bool,std::allocator<bool>> *)(this + 0x48),bVar1);
if ((bVar1 != false) && (*(long *)(*(long *)(this + 0x10) + -8) != 0)) {
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_28,(basic_json *)(this + 0xa8));
/* try { // try from 0015c3be to 0015c3c5 has its CatchHandler @ 0015c413 */
pbVar2 = (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>
*)ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::operator[](*(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
**)(*(long *)(*(long *)(this + 0x10) + -8) + 8),param_1);
uVar3 = 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=(pbVar2,(data *)local_28);
*(int8 *)(this + 0x70) = uVar3;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81((data *)local_28,0));
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)local_28);
}
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_38,0));
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_38);
return 1;
}
/* WARNING: Subroutine does not return */
/* try { // try from 0015c40e to 0015c412 has its CatchHandler @ 0015c42f */
std::__throw_bad_function_call();
}
| |
43,278 | testing::internal::UniversalPrinter<YGDirection>::Print(YGDirection const&, std::ostream*) | yoga-mod/tests/build_O0/_deps/googletest-src/googletest/include/gtest/gtest-printers.h | static void Print(const T& value, ::std::ostream* os) {
// By default, ::testing::internal::PrintTo() is used for printing
// the value.
//
// Thanks to Koenig look-up, if T is a class and has its own
// PrintTo() function defined in its namespace, that function will
// be visible here. Since it is more specific than the generic ones
// in ::testing::internal, it will be picked by the compiler in the
// following statement - exactly what we want.
PrintTo(value, os);
} | O0 | c | testing::internal::UniversalPrinter<YGDirection>::Print(YGDirection const&, std::ostream*):
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xf1c40
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZN7testing8internal16UniversalPrinterI11YGDirectionE5PrintERKS2_PSo:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call _ZN7testing8internal7PrintToI11YGDirectionEEvRKT_PSo; testing::internal::PrintTo<YGDirection>(YGDirection const&,std::ostream *)
add rsp, 10h
pop rbp
retn
| long long testing::internal::UniversalPrinter<YGDirection>::Print(long long a1, long long a2)
{
return testing::internal::PrintTo<YGDirection>(a1, a2);
}
| Print:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x001f1c40
ADD RSP,0x10
POP RBP
RET
|
/* testing::internal::UniversalPrinter<YGDirection>::Print(YGDirection const&, std::ostream*) */
void testing::internal::UniversalPrinter<YGDirection>::Print(YGDirection *param_1,ostream *param_2)
{
PrintTo<YGDirection>(param_1,param_2);
return;
}
| |
43,279 | Acore::Crypto::SRP6::~SRP6() | SylCore-WoTLK/src/common/Cryptography/Authentication/SRP6.h | class AC_COMMON_API SRP6
{
public:
static constexpr std::size_t SALT_LENGTH = 32;
using Salt = std::array<uint8, SALT_LENGTH>;
static constexpr std::size_t VERIFIER_LENGTH = 32;
using Verifier = std::array<uint8, VERIFIER_LENGTH>;
static constexpr std::size_t EPHEMERAL_KEY_LENGTH = 32;
using EphemeralKey = std::array<uint8, EPHEMERAL_KEY_LENGTH>;
static std::array<uint8, 1> const g;
static std::array<uint8, 32> const N;
// username + password must be passed through Utf8ToUpperOnlyLatin FIRST!
static std::pair<Salt, Verifier> MakeRegistrationData(std::string const& username, std::string const& password);
// username + password must be passed through Utf8ToUpperOnlyLatin FIRST!
static bool CheckLogin(std::string const& username, std::string const& password, Salt const& salt, Verifier const& verifier)
{
return (verifier == CalculateVerifier(username, password, salt));
}
static SHA1::Digest GetSessionVerifier(EphemeralKey const& A, SHA1::Digest const& clientM, SessionKey const& K)
{
return SHA1::GetDigestOf(A, clientM, K);
}
SRP6(std::string const& username, Salt const& salt, Verifier const& verifier);
std::optional<SessionKey> VerifyChallengeResponse(EphemeralKey const& A, SHA1::Digest const& clientM);
private:
bool _used = false; // a single instance can only be used to verify once
static Verifier CalculateVerifier(std::string const& username, std::string const& password, Salt const& salt);
static SessionKey SHA1Interleave(EphemeralKey const& S);
/* global algorithm parameters */
static BigNumber const _g; // a [g]enerator for the ring of integers mod N, algorithm parameter
static BigNumber const _N; // the modulus, an algorithm parameter; all operations are mod this
static EphemeralKey _B(BigNumber const& b, BigNumber const& v) { return ((_g.ModExp(b, _N) + (v * 3)) % N).ToByteArray<EPHEMERAL_KEY_LENGTH>(); }
/* per-instantiation parameters, set on construction */
SHA1::Digest const _I; // H(I) - the username, all uppercase
BigNumber const _b; // b - randomly chosen by the server, 19 bytes, never given out
BigNumber const _v; // v - the user's password verifier, derived from s + H(USERNAME || ":" || PASSWORD)
public:
Salt const s; // s - the user's password salt, random, used to calculate v on registration
EphemeralKey const B; // B = 3v + g^b
} | O0 | c | Acore::Crypto::SRP6::~SRP6():
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, 0x8(%rsp)
addq $0x20, %rdi
callq 0x1a9960
movq 0x8(%rsp), %rdi
addq $0x18, %rdi
callq 0x1a9960
addq $0x18, %rsp
retq
nop
| _ZN5Acore6Crypto4SRP6D2Ev:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov rdi, [rsp+18h+var_8]
mov [rsp+18h+var_10], rdi
add rdi, 20h ; ' '; void *
call _ZN9BigNumberD2Ev; BigNumber::~BigNumber()
mov rdi, [rsp+18h+var_10]
add rdi, 18h; void *
call _ZN9BigNumberD2Ev; BigNumber::~BigNumber()
add rsp, 18h
retn
| void Acore::Crypto::SRP6::~SRP6(Acore::Crypto::SRP6 *this)
{
BigNumber::~BigNumber((char *)this + 32);
BigNumber::~BigNumber((char *)this + 24);
}
| ~SRP6:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV RDI,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x8],RDI
ADD RDI,0x20
CALL 0x002a9960
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x18
CALL 0x002a9960
ADD RSP,0x18
RET
|
/* Acore::Crypto::SRP6::~SRP6() */
void __thiscall Acore::Crypto::SRP6::~SRP6(SRP6 *this)
{
BigNumber::~BigNumber((BigNumber *)(this + 0x20));
BigNumber::~BigNumber((BigNumber *)(this + 0x18));
return;
}
| |
43,280 | my_strnxfrm_unicode_full_bin | eloqsql/strings/ctype-utf8.c | size_t
my_strnxfrm_unicode_full_bin(CHARSET_INFO *cs,
uchar *dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags)
{
uchar *dst0= dst;
uchar *de= dst + dstlen;
dst+= my_strnxfrm_unicode_full_bin_internal(cs, dst, de, &nweights,
src, src + srclen);
DBUG_ASSERT(dst <= de); /* Safety */
if (flags & MY_STRXFRM_PAD_WITH_SPACE)
{
for ( ; dst < de && nweights; nweights--)
{
*dst++= 0x00;
if (dst < de)
{
*dst++= 0x00;
if (dst < de)
*dst++= 0x20;
}
}
}
my_strxfrm_desc_and_reverse(dst0, dst, flags, 0);
if (flags & MY_STRXFRM_PAD_TO_MAXLEN)
{
while (dst < de)
{
*dst++= 0x00;
if (dst < de)
{
*dst++= 0x00;
if (dst < de)
*dst++= 0x20;
}
}
}
return dst - dst0;
} | O3 | c | my_strnxfrm_unicode_full_bin:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r12
movq %rsi, %rbx
movl 0x10(%rbp), %r15d
leaq -0x24(%rbp), %rax
movl %ecx, (%rax)
leaq (%rsi,%rdx), %r14
addq %r8, %r9
movq %r14, %rdx
movq %rax, %rcx
callq 0x71833
leaq (%rbx,%rax), %rcx
testb $0x40, %r15b
jne 0x7197c
movq %rcx, %r12
movq %rbx, %rdi
movq %r12, %rsi
movl %r15d, %edx
xorl %ecx, %ecx
callq 0x5c7da
testb %r15b, %r15b
setns %al
cmpq %r14, %r12
setae %cl
orb %al, %cl
jne 0x719c8
leaq 0x1(%r12), %rax
movb $0x0, (%r12)
cmpq %r14, %rax
jae 0x71972
leaq 0x2(%r12), %rax
movb $0x0, 0x1(%r12)
cmpq %r14, %rax
jae 0x71972
movb $0x20, 0x2(%r12)
addq $0x3, %r12
movq %r12, %rax
movq %rax, %r12
cmpq %r14, %rax
jb 0x71946
jmp 0x719cb
cmpq %r12, %rax
jge 0x7191f
cmpl $0x0, -0x24(%rbp)
je 0x7191f
leaq 0x1(%rcx), %r12
movb $0x0, (%rcx)
cmpq %r14, %r12
jae 0x719ab
leaq 0x2(%rcx), %r12
movb $0x0, 0x1(%rcx)
cmpq %r14, %r12
jae 0x719ab
movb $0x20, 0x2(%rcx)
addq $0x3, %rcx
movq %rcx, %r12
movl -0x24(%rbp), %eax
decl %eax
movl %eax, -0x24(%rbp)
cmpq %r14, %r12
jae 0x71922
movq %r12, %rcx
testl %eax, %eax
jne 0x71987
jmp 0x71922
movq %r12, %rax
subq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| my_strnxfrm_unicode_full_bin:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov r12, rdx
mov rbx, rsi
mov r15d, [rbp+arg_0]
lea rax, [rbp+var_24]
mov [rax], ecx
lea r14, [rsi+rdx]
add r9, r8
mov rdx, r14
mov rcx, rax
call my_strnxfrm_unicode_full_bin_internal
lea rcx, [rbx+rax]
test r15b, 40h
jnz short loc_7197C
loc_7191F:
mov r12, rcx
loc_71922:
mov rdi, rbx
mov rsi, r12
mov edx, r15d
xor ecx, ecx
call my_strxfrm_desc_and_reverse
test r15b, r15b
setns al
cmp r12, r14
setnb cl
or cl, al
jnz loc_719C8
loc_71946:
lea rax, [r12+1]
mov byte ptr [r12], 0
cmp rax, r14
jnb short loc_71972
lea rax, [r12+2]
mov byte ptr [r12+1], 0
cmp rax, r14
jnb short loc_71972
mov byte ptr [r12+2], 20h ; ' '
add r12, 3
mov rax, r12
loc_71972:
mov r12, rax
cmp rax, r14
jb short loc_71946
jmp short loc_719CB
loc_7197C:
cmp rax, r12
jge short loc_7191F
cmp [rbp+var_24], 0
jz short loc_7191F
loc_71987:
lea r12, [rcx+1]
mov byte ptr [rcx], 0
cmp r12, r14
jnb short loc_719AB
lea r12, [rcx+2]
mov byte ptr [rcx+1], 0
cmp r12, r14
jnb short loc_719AB
mov byte ptr [rcx+2], 20h ; ' '
add rcx, 3
mov r12, rcx
loc_719AB:
mov eax, [rbp+var_24]
dec eax
mov [rbp+var_24], eax
cmp r12, r14
jnb loc_71922
mov rcx, r12
test eax, eax
jnz short loc_71987
jmp loc_71922
loc_719C8:
mov rax, r12
loc_719CB:
sub rax, rbx
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long my_strnxfrm_unicode_full_bin(
long long a1,
_BYTE *a2,
long long a3,
int a4,
long long a5,
long long a6,
unsigned int a7)
{
unsigned long long v8; // r14
long long v9; // rax
_BYTE *v10; // rcx
_BYTE *v11; // r12
_BYTE *v12; // rax
int v13; // eax
int v15[9]; // [rsp+Ch] [rbp-24h] BYREF
v15[0] = a4;
v8 = (unsigned long long)&a2[a3];
v9 = my_strnxfrm_unicode_full_bin_internal(a1, a2, (unsigned long long)&a2[a3], v15, a5, a5 + a6);
v10 = &a2[v9];
if ( (a7 & 0x40) != 0 && v9 < a3 && v15[0] )
{
do
{
v11 = v10 + 1;
*v10 = 0;
if ( (unsigned long long)(v10 + 1) < v8 )
{
v11 = v10 + 2;
v10[1] = 0;
if ( (unsigned long long)(v10 + 2) < v8 )
{
v10[2] = 32;
v11 = v10 + 3;
}
}
v13 = --v15[0];
if ( (unsigned long long)v11 >= v8 )
break;
v10 = v11;
}
while ( v13 );
}
else
{
v11 = &a2[v9];
}
my_strxfrm_desc_and_reverse(a2, v11, a7, 0);
if ( (a7 & 0x80u) == 0 || (unsigned long long)v11 >= v8 )
{
v12 = v11;
}
else
{
do
{
v12 = v11 + 1;
*v11 = 0;
if ( (unsigned long long)(v11 + 1) < v8 )
{
v12 = v11 + 2;
v11[1] = 0;
if ( (unsigned long long)(v11 + 2) < v8 )
{
v11[2] = 32;
v12 = v11 + 3;
}
}
v11 = v12;
}
while ( (unsigned long long)v12 < v8 );
}
return v12 - a2;
}
| my_strnxfrm_unicode_full_bin:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R12,RDX
MOV RBX,RSI
MOV R15D,dword ptr [RBP + 0x10]
LEA RAX,[RBP + -0x24]
MOV dword ptr [RAX],ECX
LEA R14,[RSI + RDX*0x1]
ADD R9,R8
MOV RDX,R14
MOV RCX,RAX
CALL 0x00171833
LEA RCX,[RBX + RAX*0x1]
TEST R15B,0x40
JNZ 0x0017197c
LAB_0017191f:
MOV R12,RCX
LAB_00171922:
MOV RDI,RBX
MOV RSI,R12
MOV EDX,R15D
XOR ECX,ECX
CALL 0x0015c7da
TEST R15B,R15B
SETNS AL
CMP R12,R14
SETNC CL
OR CL,AL
JNZ 0x001719c8
LAB_00171946:
LEA RAX,[R12 + 0x1]
MOV byte ptr [R12],0x0
CMP RAX,R14
JNC 0x00171972
LEA RAX,[R12 + 0x2]
MOV byte ptr [R12 + 0x1],0x0
CMP RAX,R14
JNC 0x00171972
MOV byte ptr [R12 + 0x2],0x20
ADD R12,0x3
MOV RAX,R12
LAB_00171972:
MOV R12,RAX
CMP RAX,R14
JC 0x00171946
JMP 0x001719cb
LAB_0017197c:
CMP RAX,R12
JGE 0x0017191f
CMP dword ptr [RBP + -0x24],0x0
JZ 0x0017191f
LAB_00171987:
LEA R12,[RCX + 0x1]
MOV byte ptr [RCX],0x0
CMP R12,R14
JNC 0x001719ab
LEA R12,[RCX + 0x2]
MOV byte ptr [RCX + 0x1],0x0
CMP R12,R14
JNC 0x001719ab
MOV byte ptr [RCX + 0x2],0x20
ADD RCX,0x3
MOV R12,RCX
LAB_001719ab:
MOV EAX,dword ptr [RBP + -0x24]
DEC EAX
MOV dword ptr [RBP + -0x24],EAX
CMP R12,R14
JNC 0x00171922
MOV RCX,R12
TEST EAX,EAX
JNZ 0x00171987
JMP 0x00171922
LAB_001719c8:
MOV RAX,R12
LAB_001719cb:
SUB RAX,RBX
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
long my_strnxfrm_unicode_full_bin
(int8 param_1,long param_2,long param_3,int param_4,long param_5,long param_6,
uint param_7)
{
int1 *puVar1;
long lVar2;
int1 *puVar3;
int1 *puVar4;
int local_2c;
puVar1 = (int1 *)(param_2 + param_3);
local_2c = param_4;
lVar2 = my_strnxfrm_unicode_full_bin_internal
(param_1,param_2,puVar1,&local_2c,param_5,param_6 + param_5);
puVar4 = (int1 *)(param_2 + lVar2);
if (((param_7 & 0x40) != 0) && (lVar2 < param_3)) {
do {
if (local_2c == 0) break;
puVar3 = puVar4 + 1;
*puVar4 = 0;
if (puVar3 < puVar1) {
puVar3 = puVar4 + 2;
puVar4[1] = 0;
if (puVar3 < puVar1) {
puVar4[2] = 0x20;
puVar3 = puVar4 + 3;
}
}
local_2c = local_2c + -1;
puVar4 = puVar3;
} while (puVar3 < puVar1);
}
my_strxfrm_desc_and_reverse(param_2,puVar4,param_7,0);
puVar3 = puVar4;
if (puVar4 < puVar1 && (char)param_7 < '\0') {
do {
puVar4 = puVar3 + 1;
*puVar3 = 0;
if (puVar4 < puVar1) {
puVar4 = puVar3 + 2;
puVar3[1] = 0;
if (puVar4 < puVar1) {
puVar3[2] = 0x20;
puVar4 = puVar3 + 3;
}
}
puVar3 = puVar4;
} while (puVar4 < puVar1);
}
return (long)puVar4 - param_2;
}
| |
43,281 | uf_space_prespace | eloqsql/storage/maria/ma_packrec.c | static void uf_space_prespace(MARIA_COLUMNDEF *rec, MARIA_BIT_BUFF *bit_buff,
uchar *to, uchar *end)
{
uint spaces;
if (get_bit(bit_buff))
bfill(to, (end-to), ' ');
else
{
if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end)
{
bit_buff->error=1;
return;
}
bfill(to, spaces, ' ');
if (to+spaces != end)
decode_bytes(rec,bit_buff,to+spaces,end);
}
} | O3 | c | uf_space_prespace:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r13
movl 0x4(%rsi), %eax
testl %eax, %eax
je 0x47016
movl (%r14), %r15d
decl %eax
movl %eax, 0x4(%r14)
btl %eax, %r15d
jae 0x47033
subq %r12, %rbx
movq %r12, %rdi
movl $0x20, %esi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x292a0
movq %r14, %rdi
callq 0x465cc
movl $0x1f, 0x4(%r14)
movl (%r14), %r15d
movl $0x1f, %eax
testl %r15d, %r15d
js 0x46ff5
movq %r13, %rdx
movl 0x24(%r13), %r13d
movl %eax, %ecx
subl %r13d, %ecx
movq %rdx, -0x30(%rbp)
jae 0x4707f
subl %eax, %r13d
movl %eax, %eax
leaq 0x9b79f(%rip), %rcx # 0xe27f0
andl (%rcx,%rax,4), %r15d
movl %r13d, %ecx
shll %cl, %r15d
movq %r14, %rdi
callq 0x465cc
movl $0x20, %eax
subl %r13d, %eax
movl %eax, 0x4(%r14)
movl (%r14), %eax
negl %r13d
movl %r13d, %ecx
shrl %cl, %eax
addl %eax, %r15d
jmp 0x47094
movl %ecx, 0x4(%r14)
shrl %cl, %r15d
movl 0x24(%rdx), %eax
leaq 0x9b760(%rip), %rcx # 0xe27f0
andl (%rcx,%rax,4), %r15d
movl %r15d, %edx
leaq (%r12,%rdx), %r13
cmpq %rbx, %r13
jbe 0x470aa
movl $0x1, 0x28(%r14)
jmp 0x470dc
movq %r12, %rdi
movl $0x20, %esi
callq 0x292a0
cmpq %rbx, %r13
je 0x470dc
movq -0x30(%rbp), %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x46789
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| uf_space_prespace:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rcx
mov r12, rdx
mov r14, rsi
mov r13, rdi
mov eax, [rsi+4]
test eax, eax
jz short loc_47016
mov r15d, [r14]
dec eax
mov [r14+4], eax
bt r15d, eax
jnb short loc_47033
loc_46FF5:
sub rbx, r12
mov rdi, r12
mov esi, 20h ; ' '
mov rdx, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _memset
loc_47016:
mov rdi, r14
call fill_buffer
mov dword ptr [r14+4], 1Fh
mov r15d, [r14]
mov eax, 1Fh
test r15d, r15d
js short loc_46FF5
loc_47033:
mov rdx, r13
mov r13d, [r13+24h]
mov ecx, eax
sub ecx, r13d
mov [rbp+var_30], rdx
jnb short loc_4707F
sub r13d, eax
mov eax, eax
lea rcx, mask
and r15d, [rcx+rax*4]
mov ecx, r13d
shl r15d, cl
mov rdi, r14
call fill_buffer
mov eax, 20h ; ' '
sub eax, r13d
mov [r14+4], eax
mov eax, [r14]
neg r13d
mov ecx, r13d
shr eax, cl
add r15d, eax
jmp short loc_47094
loc_4707F:
mov [r14+4], ecx
shr r15d, cl
mov eax, [rdx+24h]
lea rcx, mask
and r15d, [rcx+rax*4]
loc_47094:
mov edx, r15d
lea r13, [r12+rdx]
cmp r13, rbx
jbe short loc_470AA
mov dword ptr [r14+28h], 1
jmp short loc_470DC
loc_470AA:
mov rdi, r12
mov esi, 20h ; ' '
call _memset
cmp r13, rbx
jz short loc_470DC
mov rdi, [rbp+var_30]
mov rsi, r14
mov rdx, r13
mov rcx, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp decode_bytes
loc_470DC:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long uf_space_prespace(long long a1, unsigned int *a2, long long a3, _BYTE *a4)
{
unsigned int v6; // eax
unsigned int v7; // r15d
unsigned int v8; // eax
long long result; // rax
unsigned int v10; // r13d
unsigned int v11; // ecx
int v12; // r13d
int v13; // r15d
unsigned int v14; // r15d
_BYTE *v15; // r13
v6 = a2[1];
if ( v6 )
{
v7 = *a2;
v8 = v6 - 1;
a2[1] = v8;
if ( _bittest((const int *)&v7, v8) )
return memset(a3, 32LL, &a4[-a3]);
}
else
{
fill_buffer((long long)a2);
a2[1] = 31;
v7 = *a2;
v8 = 31;
if ( (*a2 & 0x80000000) != 0 )
return memset(a3, 32LL, &a4[-a3]);
}
v10 = *(_DWORD *)(a1 + 36);
v11 = v8 - v10;
if ( v8 >= v10 )
{
a2[1] = v11;
result = *(unsigned int *)(a1 + 36);
v14 = mask[result] & (v7 >> v11);
}
else
{
v12 = v10 - v8;
v13 = (mask[v8] & v7) << v12;
fill_buffer((long long)a2);
a2[1] = 32 - v12;
result = *a2 >> -(char)v12;
v14 = result + v13;
}
v15 = (_BYTE *)(a3 + v14);
if ( v15 <= a4 )
{
result = memset(a3, 32LL, v14);
if ( v15 != a4 )
return (long long)decode_bytes(a1, (long long)a2, (_BYTE *)(a3 + v14), a4);
}
else
{
a2[10] = 1;
}
return result;
}
| uf_space_prespace:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RCX
MOV R12,RDX
MOV R14,RSI
MOV R13,RDI
MOV EAX,dword ptr [RSI + 0x4]
TEST EAX,EAX
JZ 0x00147016
MOV R15D,dword ptr [R14]
DEC EAX
MOV dword ptr [R14 + 0x4],EAX
BT R15D,EAX
JNC 0x00147033
LAB_00146ff5:
SUB RBX,R12
MOV RDI,R12
MOV ESI,0x20
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001292a0
LAB_00147016:
MOV RDI,R14
CALL 0x001465cc
MOV dword ptr [R14 + 0x4],0x1f
MOV R15D,dword ptr [R14]
MOV EAX,0x1f
TEST R15D,R15D
JS 0x00146ff5
LAB_00147033:
MOV RDX,R13
MOV R13D,dword ptr [R13 + 0x24]
MOV ECX,EAX
SUB ECX,R13D
MOV qword ptr [RBP + -0x30],RDX
JNC 0x0014707f
SUB R13D,EAX
MOV EAX,EAX
LEA RCX,[0x1e27f0]
AND R15D,dword ptr [RCX + RAX*0x4]
MOV ECX,R13D
SHL R15D,CL
MOV RDI,R14
CALL 0x001465cc
MOV EAX,0x20
SUB EAX,R13D
MOV dword ptr [R14 + 0x4],EAX
MOV EAX,dword ptr [R14]
NEG R13D
MOV ECX,R13D
SHR EAX,CL
ADD R15D,EAX
JMP 0x00147094
LAB_0014707f:
MOV dword ptr [R14 + 0x4],ECX
SHR R15D,CL
MOV EAX,dword ptr [RDX + 0x24]
LEA RCX,[0x1e27f0]
AND R15D,dword ptr [RCX + RAX*0x4]
LAB_00147094:
MOV EDX,R15D
LEA R13,[R12 + RDX*0x1]
CMP R13,RBX
JBE 0x001470aa
MOV dword ptr [R14 + 0x28],0x1
JMP 0x001470dc
LAB_001470aa:
MOV RDI,R12
MOV ESI,0x20
CALL 0x001292a0
CMP R13,RBX
JZ 0x001470dc
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,R14
MOV RDX,R13
MOV RCX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00146789
LAB_001470dc:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void uf_space_prespace(long param_1,uint *param_2,void *param_3,ulong param_4)
{
ulong uVar1;
uint uVar2;
uint uVar3;
uint uVar4;
byte bVar5;
uint uVar6;
if (param_2[1] == 0) {
fill_buffer(param_2);
param_2[1] = 0x1f;
uVar6 = *param_2;
uVar4 = 0x1f;
if (-1 < (int)uVar6) goto LAB_00147033;
}
else {
uVar6 = *param_2;
uVar4 = param_2[1] - 1;
param_2[1] = uVar4;
if ((uVar6 >> (uVar4 & 0x1f) & 1) == 0) {
LAB_00147033:
uVar2 = *(uint *)(param_1 + 0x24);
if (uVar4 < uVar2) {
uVar3 = (&mask)[uVar4];
bVar5 = (byte)(uVar2 - uVar4);
fill_buffer(param_2);
param_2[1] = 0x20 - (uVar2 - uVar4);
uVar6 = ((uVar6 & uVar3) << (bVar5 & 0x1f)) + (*param_2 >> (-bVar5 & 0x1f));
}
else {
param_2[1] = uVar4 - uVar2;
uVar6 = uVar6 >> ((byte)(uVar4 - uVar2) & 0x1f) & (&mask)[*(uint *)(param_1 + 0x24)];
}
uVar1 = (long)param_3 + (ulong)uVar6;
if (param_4 < uVar1) {
param_2[10] = 1;
}
else {
memset(param_3,0x20,(ulong)uVar6);
if (uVar1 != param_4) {
decode_bytes(param_1,param_2,uVar1,param_4);
return;
}
}
return;
}
}
memset(param_3,0x20,param_4 - (long)param_3);
return;
}
| |
43,282 | 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);
} | O3 | c | dirname_length:
pushq %rbp
movq %rsp, %rbp
leaq -0x1(%rdi), %rax
movq %rdi, %rcx
movzbl (%rcx), %edx
cmpl $0x2f, %edx
je 0x2a27d
testl %edx, %edx
jne 0x2a280
jmp 0x2a285
movq %rcx, %rax
incq %rcx
jmp 0x2a26f
subq %rdi, %rax
incq %rax
popq %rbp
retq
| dirname_length:
push rbp
mov rbp, rsp
lea rax, [rdi-1]
mov rcx, rdi
loc_2A26F:
movzx edx, byte ptr [rcx]
cmp edx, 2Fh ; '/'
jz short loc_2A27D
test edx, edx
jnz short loc_2A280
jmp short loc_2A285
loc_2A27D:
mov rax, rcx
loc_2A280:
inc rcx
jmp short loc_2A26F
loc_2A285:
sub rax, rdi
inc rax
pop rbp
retn
| long long dirname_length(_BYTE *a1)
{
_BYTE *v1; // rax
_BYTE *i; // rcx
v1 = a1 - 1;
for ( i = a1; *i == 47; ++i )
{
v1 = i;
LABEL_6:
;
}
if ( *i )
goto LABEL_6;
return v1 - a1 + 1;
}
| dirname_length:
PUSH RBP
MOV RBP,RSP
LEA RAX,[RDI + -0x1]
MOV RCX,RDI
LAB_0012a26f:
MOVZX EDX,byte ptr [RCX]
CMP EDX,0x2f
JZ 0x0012a27d
TEST EDX,EDX
JNZ 0x0012a280
JMP 0x0012a285
LAB_0012a27d:
MOV RAX,RCX
LAB_0012a280:
INC RCX
JMP 0x0012a26f
LAB_0012a285:
SUB RAX,RDI
INC RAX
POP RBP
RET
|
char * dirname_length(char *param_1)
{
char *pcVar1;
char *pcVar2;
char *pcVar3;
pcVar1 = param_1 + -1;
for (pcVar3 = param_1; (pcVar2 = pcVar3, *pcVar3 == '/' || (pcVar2 = pcVar1, *pcVar3 != '\0'));
pcVar3 = pcVar3 + 1) {
pcVar1 = pcVar2;
}
return pcVar1 + (1 - (long)param_1);
}
| |
43,283 | my_coll_rules_realloc | eloqsql/strings/ctype-uca.c | static int
my_coll_rules_realloc(MY_COLL_RULES *rules, size_t n)
{
if (rules->nrules < rules->mrules ||
(rules->rule= rules->loader->realloc(rules->rule,
sizeof(MY_COLL_RULE) *
(rules->mrules= n + 128))))
return 0;
return -1;
} | O0 | c | my_coll_rules_realloc:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x18(%rcx), %rax
jb 0x56073
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x90(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x20(%rcx), %rdi
movq -0x18(%rbp), %rcx
addq $0x80, %rcx
movq -0x10(%rbp), %rdx
movq %rcx, 0x18(%rdx)
imulq $0xa0, %rcx, %rsi
callq *%rax
movq -0x10(%rbp), %rcx
movq %rax, 0x20(%rcx)
cmpq $0x0, %rax
je 0x5607c
movl $0x0, -0x4(%rbp)
jmp 0x56083
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| my_coll_rules_realloc:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov rcx, [rbp+var_10]
cmp rax, [rcx+18h]
jb short loc_56073
mov rax, [rbp+var_10]
mov rax, [rax+28h]
mov rax, [rax+90h]
mov rcx, [rbp+var_10]
mov rdi, [rcx+20h]
mov rcx, [rbp+var_18]
add rcx, 80h
mov rdx, [rbp+var_10]
mov [rdx+18h], rcx
imul rsi, rcx, 0A0h
call rax
mov rcx, [rbp+var_10]
mov [rcx+20h], rax
cmp rax, 0
jz short loc_5607C
loc_56073:
mov [rbp+var_4], 0
jmp short loc_56083
loc_5607C:
mov [rbp+var_4], 0FFFFFFFFh
loc_56083:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long my_coll_rules_realloc(_QWORD *a1, long long a2)
{
long long ( *v2)(long long, long long); // rax
long long v3; // rdi
long long v4; // rax
if ( a1[2] < a1[3] )
return 0;
v2 = *(long long ( **)(long long, long long))(a1[5] + 144LL);
v3 = a1[4];
a1[3] = a2 + 128;
v4 = v2(v3, 160 * (a2 + 128));
if ( (a1[4] = v4) != 0LL )
return 0;
else
return (unsigned int)-1;
}
| my_coll_rules_realloc:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x18]
JC 0x00156073
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x28]
MOV RAX,qword ptr [RAX + 0x90]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RCX + 0x20]
MOV RCX,qword ptr [RBP + -0x18]
ADD RCX,0x80
MOV RDX,qword ptr [RBP + -0x10]
MOV qword ptr [RDX + 0x18],RCX
IMUL RSI,RCX,0xa0
CALL RAX
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x20],RAX
CMP RAX,0x0
JZ 0x0015607c
LAB_00156073:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00156083
LAB_0015607c:
MOV dword ptr [RBP + -0x4],0xffffffff
LAB_00156083:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 my_coll_rules_realloc(long param_1,long param_2)
{
code *pcVar1;
long lVar2;
if (*(ulong *)(param_1 + 0x18) <= *(ulong *)(param_1 + 0x10)) {
pcVar1 = *(code **)(*(long *)(param_1 + 0x28) + 0x90);
*(long *)(param_1 + 0x18) = param_2 + 0x80;
lVar2 = (*pcVar1)(*(int8 *)(param_1 + 0x20),(param_2 + 0x80) * 0xa0);
*(long *)(param_1 + 0x20) = lVar2;
if (lVar2 == 0) {
return 0xffffffff;
}
}
return 0;
}
| |
43,284 | safe_lexcstrdup_root | eloqsql/mysys/my_alloc.c | LEX_CSTRING safe_lexcstrdup_root(MEM_ROOT *root, const LEX_CSTRING str)
{
LEX_CSTRING res;
if (str.length)
res.str= strmake_root(root, str.str, str.length);
else
res.str= (const char *)"";
res.length= str.length;
return res;
} | O0 | c | safe_lexcstrdup_root:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rsi, -0x20(%rbp)
movq %rdx, -0x18(%rbp)
movq %rdi, -0x28(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xeddf2
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xedd10
movq %rax, -0x10(%rbp)
jmp 0xeddfd
leaq 0x69eb4(%rip), %rax # 0x157cad
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| safe_lexcstrdup_root:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_20], rsi
mov [rbp+var_18], rdx
mov [rbp+var_28], rdi
cmp [rbp+var_18], 0
jz short loc_EDDF2
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_18]
call strmake_root
mov [rbp+var_10], rax
jmp short loc_EDDFD
loc_EDDF2:
lea rax, asc_157CA9+4; ""
mov [rbp+var_10], rax
loc_EDDFD:
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
mov rax, [rbp+var_10]
mov rdx, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| char * safe_lexcstrdup_root(_QWORD **a1, long long a2, long long a3)
{
if ( a3 )
return strmake_root(a1, a2, a3);
else
return "";
}
| safe_lexcstrdup_root:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x20],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x28],RDI
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001eddf2
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x001edd10
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001eddfd
LAB_001eddf2:
LEA RAX,[0x257cad]
MOV qword ptr [RBP + -0x10],RAX
LAB_001eddfd:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
int1 [16] safe_lexcstrdup_root(int8 param_1,int8 param_2,long param_3)
{
int1 auVar1 [16];
int *local_18;
if (param_3 == 0) {
local_18 = &DAT_00257cad;
}
else {
local_18 = (int *)strmake_root(param_1,param_2,param_3);
}
auVar1._8_8_ = param_3;
auVar1._0_8_ = local_18;
return auVar1;
}
| |
43,285 | safe_lexcstrdup_root | eloqsql/mysys/my_alloc.c | LEX_CSTRING safe_lexcstrdup_root(MEM_ROOT *root, const LEX_CSTRING str)
{
LEX_CSTRING res;
if (str.length)
res.str= strmake_root(root, str.str, str.length);
else
res.str= (const char *)"";
res.length= str.length;
return res;
} | O3 | c | safe_lexcstrdup_root:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdx, %rbx
testq %rdx, %rdx
je 0x9d0f8
movq %rbx, %rdx
callq 0x9d05d
jmp 0x9d0ff
leaq 0x42d1a(%rip), %rax # 0xdfe19
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nopl (%rax)
| safe_lexcstrdup_root:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdx
test rdx, rdx
jz short loc_9D0F8
mov rdx, rbx
call strmake_root
jmp short loc_9D0FF
loc_9D0F8:
lea rax, asc_DFE15+4; ""
loc_9D0FF:
mov rdx, rbx
add rsp, 8
pop rbx
pop rbp
retn
| char * safe_lexcstrdup_root(long long a1, long long a2, long long a3)
{
if ( a3 )
return strmake_root(a1, a2, a3);
else
return "";
}
| safe_lexcstrdup_root:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDX
TEST RDX,RDX
JZ 0x0019d0f8
MOV RDX,RBX
CALL 0x0019d05d
JMP 0x0019d0ff
LAB_0019d0f8:
LEA RAX,[0x1dfe19]
LAB_0019d0ff:
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int1 [16] safe_lexcstrdup_root(int8 param_1,int8 param_2,long param_3)
{
int *puVar1;
int1 auVar2 [16];
if (param_3 == 0) {
puVar1 = &DAT_001dfe19;
}
else {
puVar1 = (int *)strmake_root(param_1,param_2,param_3);
}
auVar2._8_8_ = param_3;
auVar2._0_8_ = puVar1;
return auVar2;
}
| |
43,286 | init_dynamic_string | eloqsql/mysys/string.c | my_bool init_dynamic_string(DYNAMIC_STRING *str, const char *init_str,
size_t init_alloc, size_t alloc_increment)
{
size_t length;
DBUG_ENTER("init_dynamic_string");
if (!alloc_increment)
alloc_increment=128;
length=1;
if (init_str && (length= strlen(init_str)+1) < init_alloc)
init_alloc=((length+alloc_increment-1)/alloc_increment)*alloc_increment;
if (!init_alloc)
init_alloc=alloc_increment;
if (!(str->str=(char*) my_malloc(key_memory_DYNAMIC_STRING,
init_alloc, MYF(MY_WME))))
DBUG_RETURN(TRUE);
str->length=length-1;
if (init_str)
memcpy(str->str,init_str,length);
str->max_length=init_alloc;
str->alloc_increment=alloc_increment;
DBUG_RETURN(FALSE);
} | O0 | c | init_dynamic_string:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x7e167
movq $0x80, -0x28(%rbp)
movq $0x1, -0x30(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x7e1aa
movq -0x18(%rbp), %rdi
callq 0x36400
addq $0x1, %rax
movq %rax, -0x30(%rbp)
cmpq -0x20(%rbp), %rax
jae 0x7e1aa
movq -0x30(%rbp), %rax
addq -0x28(%rbp), %rax
subq $0x1, %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x28(%rbp)
imulq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x7e1b9
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0x3756a0(%rip), %rax # 0x3f3860
movl (%rax), %edi
movq -0x20(%rbp), %rsi
movl $0x10, %edx
callq 0x7b980
movq -0x10(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0x7e1e5
jmp 0x7e1df
movb $0x1, -0x1(%rbp)
jmp 0x7e22c
movq -0x30(%rbp), %rcx
subq $0x1, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
cmpq $0x0, -0x18(%rbp)
je 0x7e210
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x360b0
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| init_dynamic_string:
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
cmp [rbp+var_28], 0
jnz short loc_7E167
mov [rbp+var_28], 80h
loc_7E167:
mov [rbp+var_30], 1
cmp [rbp+var_18], 0
jz short loc_7E1AA
mov rdi, [rbp+var_18]
call _strlen
add rax, 1
mov [rbp+var_30], rax
cmp rax, [rbp+var_20]
jnb short loc_7E1AA
mov rax, [rbp+var_30]
add rax, [rbp+var_28]
sub rax, 1
xor ecx, ecx
mov edx, ecx
div [rbp+var_28]
imul rax, [rbp+var_28]
mov [rbp+var_20], rax
loc_7E1AA:
cmp [rbp+var_20], 0
jnz short loc_7E1B9
mov rax, [rbp+var_28]
mov [rbp+var_20], rax
loc_7E1B9:
lea rax, key_memory_DYNAMIC_STRING
mov edi, [rax]
mov rsi, [rbp+var_20]
mov edx, 10h
call my_malloc
mov rcx, [rbp+var_10]
mov [rcx], rax
cmp rax, 0
jnz short loc_7E1E5
jmp short $+2
loc_7E1DF:
mov [rbp+var_1], 1
jmp short loc_7E22C
loc_7E1E5:
mov rcx, [rbp+var_30]
sub rcx, 1
mov rax, [rbp+var_10]
mov [rax+8], rcx
cmp [rbp+var_18], 0
jz short loc_7E210
mov rax, [rbp+var_10]
mov rdi, [rax]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_30]
call _memcpy
loc_7E210:
mov rcx, [rbp+var_20]
mov rax, [rbp+var_10]
mov [rax+10h], rcx
mov rcx, [rbp+var_28]
mov rax, [rbp+var_10]
mov [rax+18h], rcx
mov [rbp+var_1], 0
loc_7E22C:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char init_dynamic_string(long long *a1, long long a2, unsigned long long a3, unsigned long long a4)
{
long long v4; // rax
unsigned long long v6; // [rsp+0h] [rbp-30h]
unsigned long long v7; // [rsp+8h] [rbp-28h]
v7 = a4;
if ( !a4 )
v7 = 128LL;
v6 = 1LL;
if ( a2 )
{
v6 = strlen(a2) + 1;
if ( v6 < a3 )
a3 = v7 * ((v7 + v6 - 1) / v7);
}
if ( !a3 )
a3 = v7;
v4 = my_malloc(key_memory_DYNAMIC_STRING, a3, 16);
*a1 = v4;
if ( !v4 )
return 1;
a1[1] = v6 - 1;
if ( a2 )
memcpy(*a1, a2, v6);
a1[2] = a3;
a1[3] = v7;
return 0;
}
| init_dynamic_string:
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
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x0017e167
MOV qword ptr [RBP + -0x28],0x80
LAB_0017e167:
MOV qword ptr [RBP + -0x30],0x1
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0017e1aa
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00136400
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x0017e1aa
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,qword ptr [RBP + -0x28]
SUB RAX,0x1
XOR ECX,ECX
MOV EDX,ECX
DIV qword ptr [RBP + -0x28]
IMUL RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x20],RAX
LAB_0017e1aa:
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x0017e1b9
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x20],RAX
LAB_0017e1b9:
LEA RAX,[0x4f3860]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x20]
MOV EDX,0x10
CALL 0x0017b980
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JNZ 0x0017e1e5
JMP 0x0017e1df
LAB_0017e1df:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0017e22c
LAB_0017e1e5:
MOV RCX,qword ptr [RBP + -0x30]
SUB RCX,0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0017e210
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x001360b0
LAB_0017e210:
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],RCX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x18],RCX
MOV byte ptr [RBP + -0x1],0x0
LAB_0017e22c:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 init_dynamic_string(long *param_1,char *param_2,ulong param_3,ulong param_4)
{
size_t sVar1;
long lVar2;
size_t local_38;
ulong local_30;
ulong local_28;
int1 local_9;
local_30 = param_4;
if (param_4 == 0) {
local_30 = 0x80;
}
local_38 = 1;
local_28 = param_3;
if (param_2 != (char *)0x0) {
sVar1 = strlen(param_2);
local_38 = sVar1 + 1;
if (local_38 < param_3) {
local_28 = (((local_38 + local_30) - 1) / local_30) * local_30;
}
}
if (local_28 == 0) {
local_28 = local_30;
}
lVar2 = my_malloc(key_memory_DYNAMIC_STRING,local_28,0x10);
*param_1 = lVar2;
if (lVar2 == 0) {
local_9 = 1;
}
else {
param_1[1] = local_38 - 1;
if (param_2 != (char *)0x0) {
memcpy((void *)*param_1,param_2,local_38);
}
param_1[2] = local_28;
param_1[3] = local_30;
local_9 = 0;
}
return local_9;
}
| |
43,287 | mi_decrement_open_count | eloqsql/storage/myisam/mi_locking.c | int _mi_decrement_open_count(MI_INFO *info)
{
uchar buff[2];
register MYISAM_SHARE *share=info->s;
int lock_error=0,write_error=0;
if (share->global_changed)
{
uint old_lock=info->lock_type;
share->global_changed=0;
lock_error= my_disable_locking ? 0 : mi_lock_database(info,F_WRLCK);
/* Its not fatal even if we couldn't get the lock ! */
if (share->state.open_count > 0)
{
share->state.open_count--;
mi_int2store(buff,share->state.open_count);
write_error= (mysql_file_pwrite(share->kfile, buff, sizeof(buff),
sizeof(share->state.header),
MYF(MY_NABP)) != 0);
}
if (!lock_error && !my_disable_locking)
lock_error=mi_lock_database(info,old_lock);
}
return MY_TEST(lock_error || write_error);
} | O3 | c | mi_decrement_open_count:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq (%rdi), %r12
cmpb $0x0, 0x380(%r12)
je 0x81e4f
movq %rdi, %rbx
movl 0x1f4(%rdi), %r14d
movb $0x0, 0x380(%r12)
leaq 0xb90d1d(%rip), %r13 # 0xc12ae8
xorl %r15d, %r15d
cmpb $0x0, (%r13)
jne 0x81de5
movq %rbx, %rdi
movl $0x1, %esi
callq 0x810c0
movl %eax, %r15d
movl 0xec(%r12), %eax
testl %eax, %eax
je 0x81e53
decl %eax
movl %eax, 0xec(%r12)
movb %al, -0x29(%rbp)
movb %ah, -0x2a(%rbp)
movl 0x350(%r12), %r12d
leaq 0x30ed08(%rip), %rax # 0x390b18
movq (%rax), %rax
leaq -0x80(%rbp), %rdi
movl %r12d, %esi
movl $0x7, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x81e8e
leaq -0x2a(%rbp), %rsi
movl $0x2, %edx
movl $0x18, %ecx
movl $0x4, %r8d
movl %r12d, %edi
callq 0xa7a52
testq %rax, %rax
setne %r12b
jmp 0x81e56
xorl %eax, %eax
jmp 0x81e7f
xorl %r12d, %r12d
testl %r15d, %r15d
jne 0x81e70
cmpb $0x0, (%r13)
jne 0x81e70
movq %rbx, %rdi
movl %r14d, %esi
callq 0x810c0
movl %eax, %r15d
testl %r15d, %r15d
setne %al
orb %r12b, %al
movzbl %al, %eax
andl $0x1, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x2a(%rbp), %rdx
leaq -0x38(%rbp), %rcx
movq %rax, %rdi
movl %r12d, %esi
movq %rcx, %r12
callq 0x2ed2a
movq (%r12), %rax
jmp 0x81e46
| _mi_decrement_open_count:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r12, [rdi]
cmp byte ptr [r12+380h], 0
jz loc_81E4F
mov rbx, rdi
mov r14d, [rdi+1F4h]
mov byte ptr [r12+380h], 0
lea r13, my_disable_locking
xor r15d, r15d
cmp byte ptr [r13+0], 0
jnz short loc_81DE5
mov rdi, rbx
mov esi, 1
call mi_lock_database
mov r15d, eax
loc_81DE5:
mov eax, [r12+0ECh]
test eax, eax
jz short loc_81E53
dec eax
mov [r12+0ECh], eax
mov [rbp+var_29], al
mov [rbp+var_2A], ah
mov r12d, [r12+350h]
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_80]
mov esi, r12d
mov edx, 7
call qword ptr [rax+158h]
test rax, rax
jnz short loc_81E8E
lea rsi, [rbp+var_2A]
mov edx, 2
mov ecx, 18h
mov r8d, 4
mov edi, r12d
call my_pwrite
loc_81E46:
test rax, rax
setnz r12b
jmp short loc_81E56
loc_81E4F:
xor eax, eax
jmp short loc_81E7F
loc_81E53:
xor r12d, r12d
loc_81E56:
test r15d, r15d
jnz short loc_81E70
cmp byte ptr [r13+0], 0
jnz short loc_81E70
mov rdi, rbx
mov esi, r14d
call mi_lock_database
mov r15d, eax
loc_81E70:
test r15d, r15d
setnz al
or al, r12b
movzx eax, al
and eax, 1
loc_81E7F:
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_81E8E:
lea rdx, [rbp+var_2A]
lea rcx, [rbp+var_38]
mov rdi, rax
mov esi, r12d
mov r12, rcx
call _mi_decrement_open_count_cold_1
mov rax, [r12]
jmp short loc_81E46
| long long mi_decrement_open_count(_DWORD *a1, double a2, double a3)
{
long long v3; // r12
int v4; // r14d
int v5; // r15d
int v6; // eax
int v7; // eax
unsigned int v8; // r12d
long long v9; // rax
long long v10; // rax
bool v11; // r12
_BYTE v13[72]; // [rsp+0h] [rbp-80h] BYREF
long long v14; // [rsp+48h] [rbp-38h] BYREF
_BYTE v15[42]; // [rsp+56h] [rbp-2Ah] BYREF
v3 = *(_QWORD *)a1;
if ( !*(_BYTE *)(*(_QWORD *)a1 + 896LL) )
return 0LL;
v4 = a1[125];
*(_BYTE *)(v3 + 896) = 0;
v5 = 0;
if ( !my_disable_locking )
v5 = mi_lock_database(a1, 1, a2, a3);
v6 = *(_DWORD *)(v3 + 236);
if ( v6 )
{
v7 = v6 - 1;
*(_DWORD *)(v3 + 236) = v7;
v15[0] = BYTE1(v7);
v15[1] = v7;
v8 = *(_DWORD *)(v3 + 848);
v9 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v13, v8, 7LL);
if ( v9 )
{
mi_decrement_open_count_cold_1(v9, v8, (long long)v15, &v14);
v10 = v14;
}
else
{
v10 = my_pwrite(v8, v15, 2LL, 24LL, 4LL);
}
v11 = v10 != 0;
}
else
{
v11 = 0;
}
if ( !v5 && !my_disable_locking )
v5 = mi_lock_database(a1, v4, a2, a3);
return v11 | (unsigned __int8)(v5 != 0);
}
| _mi_decrement_open_count:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R12,qword ptr [RDI]
CMP byte ptr [R12 + 0x380],0x0
JZ 0x00181e4f
MOV RBX,RDI
MOV R14D,dword ptr [RDI + 0x1f4]
MOV byte ptr [R12 + 0x380],0x0
LEA R13,[0xd12ae8]
XOR R15D,R15D
CMP byte ptr [R13],0x0
JNZ 0x00181de5
MOV RDI,RBX
MOV ESI,0x1
CALL 0x001810c0
MOV R15D,EAX
LAB_00181de5:
MOV EAX,dword ptr [R12 + 0xec]
TEST EAX,EAX
JZ 0x00181e53
DEC EAX
MOV dword ptr [R12 + 0xec],EAX
MOV byte ptr [RBP + -0x29],AL
MOV byte ptr [RBP + -0x2a],AH
MOV R12D,dword ptr [R12 + 0x350]
LEA RAX,[0x490b18]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x80]
MOV ESI,R12D
MOV EDX,0x7
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x00181e8e
LEA RSI,[RBP + -0x2a]
MOV EDX,0x2
MOV ECX,0x18
MOV R8D,0x4
MOV EDI,R12D
CALL 0x001a7a52
LAB_00181e46:
TEST RAX,RAX
SETNZ R12B
JMP 0x00181e56
LAB_00181e4f:
XOR EAX,EAX
JMP 0x00181e7f
LAB_00181e53:
XOR R12D,R12D
LAB_00181e56:
TEST R15D,R15D
JNZ 0x00181e70
CMP byte ptr [R13],0x0
JNZ 0x00181e70
MOV RDI,RBX
MOV ESI,R14D
CALL 0x001810c0
MOV R15D,EAX
LAB_00181e70:
TEST R15D,R15D
SETNZ AL
OR AL,R12B
MOVZX EAX,AL
AND EAX,0x1
LAB_00181e7f:
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00181e8e:
LEA RDX,[RBP + -0x2a]
LEA RCX,[RBP + -0x38]
MOV RDI,RAX
MOV ESI,R12D
MOV R12,RCX
CALL 0x0012ed2a
MOV RAX,qword ptr [R12]
JMP 0x00181e46
|
byte _mi_decrement_open_count(long *param_1)
{
int4 uVar1;
int4 uVar2;
byte bVar3;
int iVar4;
int iVar5;
long lVar6;
bool bVar7;
int1 local_88 [72];
long local_40;
int1 local_32;
int1 local_31;
lVar6 = *param_1;
if (*(char *)(lVar6 + 0x380) == '\0') {
bVar3 = 0;
}
else {
uVar1 = *(int4 *)((long)param_1 + 500);
*(int1 *)(lVar6 + 0x380) = 0;
iVar4 = 0;
if (my_disable_locking == '\0') {
iVar4 = mi_lock_database(param_1,1);
}
if (*(int *)(lVar6 + 0xec) == 0) {
bVar7 = false;
}
else {
iVar5 = *(int *)(lVar6 + 0xec) + -1;
*(int *)(lVar6 + 0xec) = iVar5;
local_31 = (int1)iVar5;
local_32 = (int1)((uint)iVar5 >> 8);
uVar2 = *(int4 *)(lVar6 + 0x350);
lVar6 = (**(code **)(PSI_server + 0x158))(local_88,uVar2,7);
if (lVar6 == 0) {
local_40 = my_pwrite(uVar2,&local_32,2,0x18,4);
}
else {
_mi_decrement_open_count_cold_1(lVar6,uVar2,&local_32);
}
bVar7 = local_40 != 0;
}
if ((iVar4 == 0) && (my_disable_locking == '\0')) {
iVar4 = mi_lock_database(param_1,uVar1);
}
bVar3 = iVar4 != 0 | bVar7;
}
return bVar3;
}
| |
43,288 | Config::Layer::Layer(Config::LayerType) | Dolphin-anty/Source/Core/Common/Config/Layer.cpp | Layer::Layer(LayerType type) : m_layer(type)
{
} | O3 | cpp | Config::Layer::Layer(Config::LayerType):
leaq 0x3938f(%rip), %rax # 0x52a58
movq %rax, (%rdi)
movb $0x0, 0x8(%rdi)
leaq 0x18(%rdi), %rax
movl $0x0, 0x18(%rdi)
xorl %ecx, %ecx
movq %rcx, 0x20(%rdi)
movq %rax, 0x28(%rdi)
movq %rax, 0x30(%rdi)
movq %rcx, 0x38(%rdi)
movl %esi, 0x40(%rdi)
movq %rcx, 0x48(%rdi)
retq
nop
| _ZN6Config5LayerC2ENS_9LayerTypeE:
lea rax, off_52A58
mov [rdi], rax
mov byte ptr [rdi+8], 0
lea rax, [rdi+18h]
mov dword ptr [rdi+18h], 0
xor ecx, ecx
mov [rdi+20h], rcx
mov [rdi+28h], rax
mov [rdi+30h], rax
mov [rdi+38h], rcx
mov [rdi+40h], esi
mov [rdi+48h], rcx
retn
| long long Config::Layer::Layer(long long a1, int a2)
{
long long result; // rax
*(_QWORD *)a1 = off_52A58;
*(_BYTE *)(a1 + 8) = 0;
result = a1 + 24;
*(_DWORD *)(a1 + 24) = 0;
*(_QWORD *)(a1 + 32) = 0LL;
*(_QWORD *)(a1 + 40) = a1 + 24;
*(_QWORD *)(a1 + 48) = a1 + 24;
*(_QWORD *)(a1 + 56) = 0LL;
*(_DWORD *)(a1 + 64) = a2;
*(_QWORD *)(a1 + 72) = 0LL;
return result;
}
| Layer:
LEA RAX,[0x152a58]
MOV qword ptr [RDI],RAX
MOV byte ptr [RDI + 0x8],0x0
LEA RAX,[RDI + 0x18]
MOV dword ptr [RDI + 0x18],0x0
XOR ECX,ECX
MOV qword ptr [RDI + 0x20],RCX
MOV qword ptr [RDI + 0x28],RAX
MOV qword ptr [RDI + 0x30],RAX
MOV qword ptr [RDI + 0x38],RCX
MOV dword ptr [RDI + 0x40],ESI
MOV qword ptr [RDI + 0x48],RCX
RET
|
/* Config::Layer::Layer(Config::LayerType) */
void __thiscall Config::Layer::Layer(Layer *this,int4 param_2)
{
*(int ***)this = &PTR__Layer_00152a58;
this[8] = (Layer)0x0;
*(int4 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(Layer **)(this + 0x28) = this + 0x18;
*(Layer **)(this + 0x30) = this + 0x18;
*(int8 *)(this + 0x38) = 0;
*(int4 *)(this + 0x40) = param_2;
*(int8 *)(this + 0x48) = 0;
return;
}
| |
43,289 | moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::rewind_block_index_tail() | angrymouse[P]emittra/include/concurrentqueue.h | inline void rewind_block_index_tail()
{
auto localBlockIndex = blockIndex.load(std::memory_order_relaxed);
localBlockIndex->tail.store((localBlockIndex->tail.load(std::memory_order_relaxed) - 1) & (localBlockIndex->capacity - 1), std::memory_order_relaxed);
} | O0 | c | moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent, moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::rewind_block_index_tail():
subq $0x78, %rsp
movq %rdi, 0x38(%rsp)
movq 0x38(%rsp), %rdi
addq $0x60, %rdi
xorl %esi, %esi
callq 0x17d90
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x18(%rsp)
movq %rax, 0x70(%rsp)
movl $0x0, 0x6c(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x20(%rsp)
movl 0x6c(%rsp), %edi
movl $0xffff, %esi # imm = 0xFFFF
callq 0x6420
movl %eax, 0x68(%rsp)
movl 0x6c(%rsp), %eax
movl %eax, 0x2c(%rsp)
decl %eax
subl $0x2, %eax
jb 0x18790
jmp 0x18776
movl 0x2c(%rsp), %eax
subl $0x5, %eax
je 0x1879f
jmp 0x18781
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x60(%rsp)
jmp 0x187ac
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x60(%rsp)
jmp 0x187ac
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x60(%rsp)
movq 0x18(%rsp), %rcx
movq 0x60(%rsp), %rax
decq %rax
movq 0x30(%rsp), %rdx
movq (%rdx), %rdx
decq %rdx
andq %rdx, %rax
movq %rcx, 0x58(%rsp)
movq %rax, 0x50(%rsp)
movl $0x0, 0x4c(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x4c(%rsp), %edi
movl $0xffff, %esi # imm = 0xFFFF
callq 0x6420
movl %eax, 0x48(%rsp)
movl 0x4c(%rsp), %eax
movl %eax, 0x14(%rsp)
movq 0x50(%rsp), %rcx
movq %rcx, 0x40(%rsp)
subl $0x3, %eax
je 0x18828
jmp 0x1880e
movl 0x14(%rsp), %eax
subl $0x5, %eax
je 0x18837
jmp 0x18819
movq 0x8(%rsp), %rax
movq 0x40(%rsp), %rcx
movq %rcx, (%rax)
jmp 0x18844
movq 0x8(%rsp), %rax
movq 0x40(%rsp), %rcx
movq %rcx, (%rax)
jmp 0x18844
movq 0x8(%rsp), %rcx
movq 0x40(%rsp), %rax
xchgq %rax, (%rcx)
addq $0x78, %rsp
retq
nopl (%rax)
| _ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE16ImplicitProducer23rewind_block_index_tailEv:
sub rsp, 78h
mov [rsp+78h+var_40], rdi
mov rdi, [rsp+78h+var_40]
add rdi, 60h ; '`'
xor esi, esi
call _ZNKSt6atomicIPN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS0_28ConcurrentQueueDefaultTraitsEE16ImplicitProducer16BlockIndexHeaderEE4loadESt12memory_order; std::atomic<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::BlockIndexHeader *>::load(std::memory_order)
mov [rsp+78h+var_48], rax
mov rax, [rsp+78h+var_48]
add rax, 8
mov [rsp+78h+var_60], rax
mov [rsp+78h+var_8], rax
mov [rsp+78h+var_C], 0
mov rax, [rsp+78h+var_8]
mov [rsp+78h+var_58], rax
mov edi, [rsp+78h+var_C]
mov esi, 0FFFFh
call _ZStanSt12memory_orderSt23__memory_order_modifier; std::operator&(std::memory_order,std::__memory_order_modifier)
mov [rsp+78h+var_10], eax
mov eax, [rsp+78h+var_C]
mov [rsp+78h+var_4C], eax
dec eax
sub eax, 2
jb short loc_18790
jmp short $+2
loc_18776:
mov eax, [rsp+78h+var_4C]
sub eax, 5
jz short loc_1879F
jmp short $+2
loc_18781:
mov rax, [rsp+78h+var_58]
mov rax, [rax]
mov [rsp+78h+var_18], rax
jmp short loc_187AC
loc_18790:
mov rax, [rsp+78h+var_58]
mov rax, [rax]
mov [rsp+78h+var_18], rax
jmp short loc_187AC
loc_1879F:
mov rax, [rsp+78h+var_58]
mov rax, [rax]
mov [rsp+78h+var_18], rax
loc_187AC:
mov rcx, [rsp+78h+var_60]
mov rax, [rsp+78h+var_18]
dec rax
mov rdx, [rsp+78h+var_48]
mov rdx, [rdx]
dec rdx
and rax, rdx
mov [rsp+78h+var_20], rcx
mov [rsp+78h+var_28], rax
mov [rsp+78h+var_2C], 0
mov rax, [rsp+78h+var_20]
mov [rsp+78h+var_70], rax
mov edi, [rsp+78h+var_2C]
mov esi, 0FFFFh
call _ZStanSt12memory_orderSt23__memory_order_modifier; std::operator&(std::memory_order,std::__memory_order_modifier)
mov [rsp+78h+var_30], eax
mov eax, [rsp+78h+var_2C]
mov [rsp+78h+var_64], eax
mov rcx, [rsp+78h+var_28]
mov [rsp+78h+var_38], rcx
sub eax, 3
jz short loc_18828
jmp short $+2
loc_1880E:
mov eax, [rsp+78h+var_64]
sub eax, 5
jz short loc_18837
jmp short $+2
loc_18819:
mov rax, [rsp+78h+var_70]
mov rcx, [rsp+78h+var_38]
mov [rax], rcx
jmp short loc_18844
loc_18828:
mov rax, [rsp+78h+var_70]
mov rcx, [rsp+78h+var_38]
mov [rax], rcx
jmp short loc_18844
loc_18837:
mov rcx, [rsp+78h+var_70]
mov rax, [rsp+78h+var_38]
xchg rax, [rcx]
loc_18844:
add rsp, 78h
retn
| _QWORD * moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::rewind_block_index_tail(
long long a1)
{
_QWORD *result; // rax
_QWORD *v2; // [rsp+30h] [rbp-48h]
long long v3; // [rsp+50h] [rbp-28h]
v2 = (_QWORD *)std::atomic<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::BlockIndexHeader *>::load(
a1 + 96,
0);
std::operator&(0, 0xFFFF);
v3 = (*v2 - 1LL) & (v2[1] - 1LL);
std::operator&(0, 0xFFFF);
result = v2 + 1;
v2[1] = v3;
return result;
}
| rewind_block_index_tail:
SUB RSP,0x78
MOV qword ptr [RSP + 0x38],RDI
MOV RDI,qword ptr [RSP + 0x38]
ADD RDI,0x60
XOR ESI,ESI
CALL 0x00117d90
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0x30]
ADD RAX,0x8
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x70],RAX
MOV dword ptr [RSP + 0x6c],0x0
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x20],RAX
MOV EDI,dword ptr [RSP + 0x6c]
MOV ESI,0xffff
CALL 0x00106420
MOV dword ptr [RSP + 0x68],EAX
MOV EAX,dword ptr [RSP + 0x6c]
MOV dword ptr [RSP + 0x2c],EAX
DEC EAX
SUB EAX,0x2
JC 0x00118790
JMP 0x00118776
LAB_00118776:
MOV EAX,dword ptr [RSP + 0x2c]
SUB EAX,0x5
JZ 0x0011879f
JMP 0x00118781
LAB_00118781:
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x60],RAX
JMP 0x001187ac
LAB_00118790:
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x60],RAX
JMP 0x001187ac
LAB_0011879f:
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x60],RAX
LAB_001187ac:
MOV RCX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSP + 0x60]
DEC RAX
MOV RDX,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RDX]
DEC RDX
AND RAX,RDX
MOV qword ptr [RSP + 0x58],RCX
MOV qword ptr [RSP + 0x50],RAX
MOV dword ptr [RSP + 0x4c],0x0
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x8],RAX
MOV EDI,dword ptr [RSP + 0x4c]
MOV ESI,0xffff
CALL 0x00106420
MOV dword ptr [RSP + 0x48],EAX
MOV EAX,dword ptr [RSP + 0x4c]
MOV dword ptr [RSP + 0x14],EAX
MOV RCX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x40],RCX
SUB EAX,0x3
JZ 0x00118828
JMP 0x0011880e
LAB_0011880e:
MOV EAX,dword ptr [RSP + 0x14]
SUB EAX,0x5
JZ 0x00118837
JMP 0x00118819
LAB_00118819:
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RSP + 0x40]
MOV qword ptr [RAX],RCX
JMP 0x00118844
LAB_00118828:
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RSP + 0x40]
MOV qword ptr [RAX],RCX
JMP 0x00118844
LAB_00118837:
MOV RCX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x40]
XCHG qword ptr [RCX],RAX
LAB_00118844:
ADD RSP,0x78
RET
|
/* WARNING: Removing unreachable block (ram,0x00118837) */
/* WARNING: Removing unreachable block (ram,0x0011879f) */
/* WARNING: Removing unreachable block (ram,0x00118790) */
/* WARNING: Removing unreachable block (ram,0x00118828) */
/* moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,
moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::rewind_block_index_tail() */
ulong * __thiscall
moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>
::ImplicitProducer::rewind_block_index_tail(ImplicitProducer *this)
{
ulong uVar1;
long lVar2;
long *plVar3;
ulong *puVar4;
plVar3 = (long *)std::
atomic<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::BlockIndexHeader*>
::load((atomic<moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::BlockIndexHeader*>
*)(this + 0x60),0);
puVar4 = (ulong *)(plVar3 + 1);
std::operator&(0,0xffff);
uVar1 = *puVar4;
lVar2 = *plVar3;
std::operator&(0,0xffff);
*puVar4 = uVar1 - 1 & lVar2 - 1U;
return puVar4;
}
| |
43,290 | ma_tls_connect | eloqsql/libmariadb/libmariadb/secure/openssl.c | my_bool ma_tls_connect(MARIADB_TLS *ctls)
{
SSL *ssl = (SSL *)ctls->ssl;
my_bool blocking, try_connect= 1;
MYSQL *mysql;
MARIADB_PVIO *pvio;
int rc;
#ifdef OPENSSL_USE_BIOMETHOD
BIO_METHOD *bio_method= NULL;
BIO *bio;
#endif
mysql= (MYSQL *)SSL_get_app_data(ssl);
pvio= mysql->net.pvio;
/* Set socket to non blocking if not already set */
if (!(blocking= pvio->methods->is_blocking(pvio)))
pvio->methods->blocking(pvio, FALSE, 0);
SSL_clear(ssl);
#ifdef OPENSSL_USE_BIOMETHOD
bio= BIO_new(&ma_BIO_method);
bio->ptr= pvio;
SSL_set_bio(ssl, bio, bio);
BIO_set_fd(bio, mysql_get_socket(mysql), BIO_NOCLOSE);
#else
SSL_set_fd(ssl, (int)mysql_get_socket(mysql));
#endif
while (try_connect && (rc= SSL_connect(ssl)) == -1)
{
switch((SSL_get_error(ssl, rc))) {
case SSL_ERROR_WANT_READ:
if (pvio->methods->wait_io_or_timeout(pvio, TRUE, mysql->options.connect_timeout) < 1)
try_connect= 0;
break;
case SSL_ERROR_WANT_WRITE:
if (pvio->methods->wait_io_or_timeout(pvio, TRUE, mysql->options.connect_timeout) < 1)
try_connect= 0;
break;
default:
try_connect= 0;
}
}
/* In case handshake failed or if a root certificate (ca) was specified,
we need to check the result code of X509 verification. A detailed check
of the peer certificate (hostname checking will follow later) */
if (rc != 1 ||
(mysql->client_flag & CLIENT_SSL_VERIFY_SERVER_CERT) ||
(mysql->options.ssl_ca || mysql->options.ssl_capath))
{
long x509_err= SSL_get_verify_result(ssl);
if (x509_err != X509_V_OK)
{
my_set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN,
ER(CR_SSL_CONNECTION_ERROR), X509_verify_cert_error_string(x509_err));
/* restore blocking mode */
if (!blocking)
pvio->methods->blocking(pvio, FALSE, 0);
return 1;
} else if (rc != 1) {
ma_tls_set_error(mysql);
return 1;
}
}
pvio->ctls->ssl= ctls->ssl= (void *)ssl;
return 0;
} | O0 | c | ma_tls_connect:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movb $0x1, -0x1a(%rbp)
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x13150
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x68(%rax), %rax
movq -0x30(%rbp), %rdi
callq *%rax
movb %al, -0x19(%rbp)
cmpb $0x0, %al
jne 0x370e7
movq -0x30(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x38(%rax), %rax
movq -0x30(%rbp), %rdi
xorl %esi, %esi
xorl %ecx, %ecx
movl %ecx, %edx
callq *%rax
movq -0x18(%rbp), %rdi
callq 0x130a0
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rdi
callq 0x22230
movq -0x48(%rbp), %rdi
movl %eax, %esi
callq 0x13290
movsbl -0x1a(%rbp), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x49(%rbp)
je 0x3712f
movq -0x18(%rbp), %rdi
callq 0x13610
movl %eax, -0x34(%rbp)
cmpl $-0x1, %eax
sete %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
testb $0x1, %al
jne 0x3713b
jmp 0x371be
movq -0x18(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x13040
movl %eax, %ecx
movl %ecx, -0x50(%rbp)
subl $0x2, %eax
je 0x3715d
jmp 0x37153
movl -0x50(%rbp), %eax
subl $0x3, %eax
je 0x37189
jmp 0x371b5
movq -0x30(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x30(%rax), %rax
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rcx
movl 0x390(%rcx), %edx
movl $0x1, %esi
callq *%rax
cmpl $0x1, %eax
jge 0x37187
movb $0x0, -0x1a(%rbp)
jmp 0x371b9
movq -0x30(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x30(%rax), %rax
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rcx
movl 0x390(%rcx), %edx
movl $0x1, %esi
callq *%rax
cmpl $0x1, %eax
jge 0x371b3
movb $0x0, -0x1a(%rbp)
jmp 0x371b9
movb $0x0, -0x1a(%rbp)
jmp 0x3710c
cmpl $0x1, -0x34(%rbp)
jne 0x371fb
movq -0x28(%rbp), %rax
movq 0x368(%rax), %rax
andq $0x40000000, %rax # imm = 0x40000000
cmpq $0x0, %rax
jne 0x371fb
movq -0x28(%rbp), %rax
cmpq $0x0, 0x410(%rax)
jne 0x371fb
movq -0x28(%rbp), %rax
cmpq $0x0, 0x418(%rax)
je 0x37298
movq -0x18(%rbp), %rdi
callq 0x13180
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x3727f
movq -0x28(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq 0x28cf2(%rip), %rax # 0x5ff10
movq (%rax), %rax
movq %rax, -0x60(%rbp)
leaq 0x28cf4(%rip), %rax # 0x5ff20
movq 0xd0(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x40(%rbp), %rdi
callq 0x132d0
movq -0x68(%rbp), %rdi
movq -0x60(%rbp), %rdx
movq -0x58(%rbp), %rcx
movq %rax, %r8
movl $0x7ea, %esi # imm = 0x7EA
movb $0x0, %al
callq 0x160f0
cmpb $0x0, -0x19(%rbp)
jne 0x37279
movq -0x30(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x38(%rax), %rax
movq -0x30(%rbp), %rdi
xorl %esi, %esi
xorl %ecx, %ecx
movl %ecx, %edx
callq *%rax
movb $0x1, -0x1(%rbp)
jmp 0x372b4
cmpl $0x1, -0x34(%rbp)
je 0x37294
movq -0x28(%rbp), %rdi
callq 0x372c0
movb $0x1, -0x1(%rbp)
jmp 0x372b4
jmp 0x37296
jmp 0x37298
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rax
movq 0x38(%rax), %rax
movq %rcx, 0x10(%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
| ma_tls_connect:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov [rbp+var_18], rax
mov [rbp+var_1A], 1
mov rdi, [rbp+var_18]
xor esi, esi
call _SSL_get_ex_data
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov rax, [rax+48h]
mov rax, [rax+68h]
mov rdi, [rbp+var_30]
call rax
mov [rbp+var_19], al
cmp al, 0
jnz short loc_370E7
mov rax, [rbp+var_30]
mov rax, [rax+48h]
mov rax, [rax+38h]
mov rdi, [rbp+var_30]
xor esi, esi
xor ecx, ecx
mov edx, ecx
call rax
loc_370E7:
mov rdi, [rbp+var_18]
call _SSL_clear
mov rax, [rbp+var_18]
mov [rbp+var_48], rax
mov rdi, [rbp+var_28]
call mysql_get_socket
mov rdi, [rbp+var_48]
mov esi, eax
call _SSL_set_fd
loc_3710C:
movsx ecx, [rbp+var_1A]
xor eax, eax
cmp ecx, 0
mov [rbp+var_49], al
jz short loc_3712F
mov rdi, [rbp+var_18]
call _SSL_connect
mov [rbp+var_34], eax
cmp eax, 0FFFFFFFFh
setz al
mov [rbp+var_49], al
loc_3712F:
mov al, [rbp+var_49]
test al, 1
jnz short loc_3713B
jmp loc_371BE
loc_3713B:
mov rdi, [rbp+var_18]
mov esi, [rbp+var_34]
call _SSL_get_error
mov ecx, eax
mov [rbp+var_50], ecx
sub eax, 2
jz short loc_3715D
jmp short $+2
loc_37153:
mov eax, [rbp+var_50]
sub eax, 3
jz short loc_37189
jmp short loc_371B5
loc_3715D:
mov rax, [rbp+var_30]
mov rax, [rax+48h]
mov rax, [rax+30h]
mov rdi, [rbp+var_30]
mov rcx, [rbp+var_28]
mov edx, [rcx+390h]
mov esi, 1
call rax
cmp eax, 1
jge short loc_37187
mov [rbp+var_1A], 0
loc_37187:
jmp short loc_371B9
loc_37189:
mov rax, [rbp+var_30]
mov rax, [rax+48h]
mov rax, [rax+30h]
mov rdi, [rbp+var_30]
mov rcx, [rbp+var_28]
mov edx, [rcx+390h]
mov esi, 1
call rax
cmp eax, 1
jge short loc_371B3
mov [rbp+var_1A], 0
loc_371B3:
jmp short loc_371B9
loc_371B5:
mov [rbp+var_1A], 0
loc_371B9:
jmp loc_3710C
loc_371BE:
cmp [rbp+var_34], 1
jnz short loc_371FB
mov rax, [rbp+var_28]
mov rax, [rax+368h]
and rax, 40000000h
cmp rax, 0
jnz short loc_371FB
mov rax, [rbp+var_28]
cmp qword ptr [rax+410h], 0
jnz short loc_371FB
mov rax, [rbp+var_28]
cmp qword ptr [rax+418h], 0
jz loc_37298
loc_371FB:
mov rdi, [rbp+var_18]
call _SSL_get_verify_result
mov [rbp+var_40], rax
cmp [rbp+var_40], 0
jz short loc_3727F
mov rax, [rbp+var_28]
mov [rbp+var_68], rax
lea rax, SQLSTATE_UNKNOWN
mov rax, [rax]
mov [rbp+var_60], rax
lea rax, client_errors
mov rax, [rax+0D0h]
mov [rbp+var_58], rax
mov rdi, [rbp+var_40]
call _X509_verify_cert_error_string
mov rdi, [rbp+var_68]
mov rdx, [rbp+var_60]
mov rcx, [rbp+var_58]
mov r8, rax
mov esi, 7EAh
mov al, 0
call my_set_error
cmp [rbp+var_19], 0
jnz short loc_37279
mov rax, [rbp+var_30]
mov rax, [rax+48h]
mov rax, [rax+38h]
mov rdi, [rbp+var_30]
xor esi, esi
xor ecx, ecx
mov edx, ecx
call rax
loc_37279:
mov [rbp+var_1], 1
jmp short loc_372B4
loc_3727F:
cmp [rbp+var_34], 1
jz short loc_37294
mov rdi, [rbp+var_28]
call ma_tls_set_error
mov [rbp+var_1], 1
jmp short loc_372B4
loc_37294:
jmp short $+2
loc_37296:
jmp short $+2
loc_37298:
mov rcx, [rbp+var_18]
mov rax, [rbp+var_10]
mov [rax+10h], rcx
mov rax, [rbp+var_30]
mov rax, [rax+38h]
mov [rax+10h], rcx
mov [rbp+var_1], 0
loc_372B4:
mov al, [rbp+var_1]
add rsp, 70h
pop rbp
retn
| char ma_tls_connect(long long a1)
{
unsigned int socket; // eax
long long v2; // rax
char *v4; // [rsp+10h] [rbp-60h]
char *v5; // [rsp+18h] [rbp-58h]
int error; // [rsp+20h] [rbp-50h]
bool v7; // [rsp+27h] [rbp-49h]
long long verify_result; // [rsp+30h] [rbp-40h]
unsigned int v9; // [rsp+3Ch] [rbp-34h]
long long v10; // [rsp+40h] [rbp-30h]
_QWORD *v11; // [rsp+48h] [rbp-28h]
char v12; // [rsp+56h] [rbp-1Ah]
char v13; // [rsp+57h] [rbp-19h]
long long v14; // [rsp+58h] [rbp-18h]
v14 = *(_QWORD *)(a1 + 16);
v12 = 1;
v11 = (_QWORD *)SSL_get_ex_data(v14, 0LL);
v10 = *v11;
v13 = (*(long long ( **)(_QWORD))(*(_QWORD *)(*v11 + 72LL) + 104LL))(*v11);
if ( !v13 )
(*(void ( **)(long long, _QWORD, _QWORD))(*(_QWORD *)(v10 + 72) + 56LL))(v10, 0LL, 0LL);
SSL_clear(v14);
socket = mysql_get_socket((long long)v11);
SSL_set_fd(v14, socket);
while ( 1 )
{
v7 = 0;
if ( v12 )
{
v9 = SSL_connect(v14);
v7 = v9 == -1;
}
if ( !v7 )
break;
error = SSL_get_error(v14, v9);
if ( error == 2 )
{
if ( (*(int ( **)(long long, long long, _QWORD))(*(_QWORD *)(v10 + 72) + 48LL))(
v10,
1LL,
*((unsigned int *)v11 + 228)) < 1 )
v12 = 0;
}
else if ( error == 3 )
{
if ( (*(int ( **)(long long, long long, _QWORD))(*(_QWORD *)(v10 + 72) + 48LL))(
v10,
1LL,
*((unsigned int *)v11 + 228)) < 1 )
v12 = 0;
}
else
{
v12 = 0;
}
}
if ( v9 == 1 && (v11[109] & 0x40000000LL) == 0 && !v11[130] && !v11[131] )
goto LABEL_26;
verify_result = SSL_get_verify_result(v14);
if ( !verify_result )
{
if ( v9 != 1 )
{
ma_tls_set_error(v11);
return 1;
}
LABEL_26:
*(_QWORD *)(a1 + 16) = v14;
*(_QWORD *)(*(_QWORD *)(v10 + 56) + 16LL) = v14;
return 0;
}
v4 = SQLSTATE_UNKNOWN;
v5 = client_errors[26];
v2 = X509_verify_cert_error_string(verify_result);
my_set_error((long long)v11, 0x7EAu, (long long)v4, (long long)v5, v2);
if ( !v13 )
(*(void ( **)(long long, _QWORD, _QWORD))(*(_QWORD *)(v10 + 72) + 56LL))(v10, 0LL, 0LL);
return 1;
}
| ma_tls_connect:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x18],RAX
MOV byte ptr [RBP + -0x1a],0x1
MOV RDI,qword ptr [RBP + -0x18]
XOR ESI,ESI
CALL 0x00113150
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x48]
MOV RAX,qword ptr [RAX + 0x68]
MOV RDI,qword ptr [RBP + -0x30]
CALL RAX
MOV byte ptr [RBP + -0x19],AL
CMP AL,0x0
JNZ 0x001370e7
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x48]
MOV RAX,qword ptr [RAX + 0x38]
MOV RDI,qword ptr [RBP + -0x30]
XOR ESI,ESI
XOR ECX,ECX
MOV EDX,ECX
CALL RAX
LAB_001370e7:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001130a0
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x00122230
MOV RDI,qword ptr [RBP + -0x48]
MOV ESI,EAX
CALL 0x00113290
LAB_0013710c:
MOVSX ECX,byte ptr [RBP + -0x1a]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x49],AL
JZ 0x0013712f
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00113610
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,-0x1
SETZ AL
MOV byte ptr [RBP + -0x49],AL
LAB_0013712f:
MOV AL,byte ptr [RBP + -0x49]
TEST AL,0x1
JNZ 0x0013713b
JMP 0x001371be
LAB_0013713b:
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0x34]
CALL 0x00113040
MOV ECX,EAX
MOV dword ptr [RBP + -0x50],ECX
SUB EAX,0x2
JZ 0x0013715d
JMP 0x00137153
LAB_00137153:
MOV EAX,dword ptr [RBP + -0x50]
SUB EAX,0x3
JZ 0x00137189
JMP 0x001371b5
LAB_0013715d:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x48]
MOV RAX,qword ptr [RAX + 0x30]
MOV RDI,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x28]
MOV EDX,dword ptr [RCX + 0x390]
MOV ESI,0x1
CALL RAX
CMP EAX,0x1
JGE 0x00137187
MOV byte ptr [RBP + -0x1a],0x0
LAB_00137187:
JMP 0x001371b9
LAB_00137189:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x48]
MOV RAX,qword ptr [RAX + 0x30]
MOV RDI,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x28]
MOV EDX,dword ptr [RCX + 0x390]
MOV ESI,0x1
CALL RAX
CMP EAX,0x1
JGE 0x001371b3
MOV byte ptr [RBP + -0x1a],0x0
LAB_001371b3:
JMP 0x001371b9
LAB_001371b5:
MOV byte ptr [RBP + -0x1a],0x0
LAB_001371b9:
JMP 0x0013710c
LAB_001371be:
CMP dword ptr [RBP + -0x34],0x1
JNZ 0x001371fb
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x368]
AND RAX,0x40000000
CMP RAX,0x0
JNZ 0x001371fb
MOV RAX,qword ptr [RBP + -0x28]
CMP qword ptr [RAX + 0x410],0x0
JNZ 0x001371fb
MOV RAX,qword ptr [RBP + -0x28]
CMP qword ptr [RAX + 0x418],0x0
JZ 0x00137298
LAB_001371fb:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00113180
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RBP + -0x40],0x0
JZ 0x0013727f
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x68],RAX
LEA RAX,[0x15ff10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x60],RAX
LEA RAX,[0x15ff20]
MOV RAX,qword ptr [RAX + 0xd0]
MOV qword ptr [RBP + -0x58],RAX
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x001132d0
MOV RDI,qword ptr [RBP + -0x68]
MOV RDX,qword ptr [RBP + -0x60]
MOV RCX,qword ptr [RBP + -0x58]
MOV R8,RAX
MOV ESI,0x7ea
MOV AL,0x0
CALL 0x001160f0
CMP byte ptr [RBP + -0x19],0x0
JNZ 0x00137279
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x48]
MOV RAX,qword ptr [RAX + 0x38]
MOV RDI,qword ptr [RBP + -0x30]
XOR ESI,ESI
XOR ECX,ECX
MOV EDX,ECX
CALL RAX
LAB_00137279:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001372b4
LAB_0013727f:
CMP dword ptr [RBP + -0x34],0x1
JZ 0x00137294
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001372c0
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001372b4
LAB_00137294:
JMP 0x00137296
LAB_00137296:
JMP 0x00137298
LAB_00137298:
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RAX + 0x10],RCX
MOV byte ptr [RBP + -0x1],0x0
LAB_001372b4:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x70
POP RBP
RET
|
int1 ma_tls_connect(long param_1)
{
SSL *ssl;
long lVar1;
bool bVar2;
int *puVar3;
int *puVar4;
char cVar5;
int iVar6;
long *plVar7;
long n;
char *pcVar8;
bool bVar9;
int local_3c;
ssl = *(SSL **)(param_1 + 0x10);
bVar2 = true;
plVar7 = (long *)SSL_get_ex_data(ssl,0);
lVar1 = *plVar7;
cVar5 = (**(code **)(*(long *)(lVar1 + 0x48) + 0x68))(lVar1);
if (cVar5 == '\0') {
(**(code **)(*(long *)(lVar1 + 0x48) + 0x38))(lVar1,0,0);
}
SSL_clear(ssl);
iVar6 = mysql_get_socket(plVar7);
SSL_set_fd(ssl,iVar6);
while( true ) {
bVar9 = false;
if (bVar2) {
local_3c = SSL_connect(ssl);
bVar9 = local_3c == -1;
}
if (!bVar9) break;
iVar6 = SSL_get_error(ssl,local_3c);
if (iVar6 == 2) {
iVar6 = (**(code **)(*(long *)(lVar1 + 0x48) + 0x30))(lVar1,1,(int)plVar7[0x72]);
if (iVar6 < 1) {
bVar2 = false;
}
}
else if (iVar6 == 3) {
iVar6 = (**(code **)(*(long *)(lVar1 + 0x48) + 0x30))(lVar1,1,(int)plVar7[0x72]);
if (iVar6 < 1) {
bVar2 = false;
}
}
else {
bVar2 = false;
}
}
if ((((local_3c != 1) || ((plVar7[0x6d] & 0x40000000U) != 0)) || (plVar7[0x82] != 0)) ||
(plVar7[0x83] != 0)) {
n = SSL_get_verify_result(ssl);
puVar4 = PTR_s_TLS_SSL_error_____100s_0015fff0;
puVar3 = SQLSTATE_UNKNOWN;
if (n != 0) {
pcVar8 = X509_verify_cert_error_string(n);
my_set_error(plVar7,0x7ea,puVar3,puVar4,pcVar8);
if (cVar5 == '\0') {
(**(code **)(*(long *)(lVar1 + 0x48) + 0x38))(lVar1,0,0);
}
return 1;
}
if (local_3c != 1) {
ma_tls_set_error(plVar7);
return 1;
}
}
*(SSL **)(param_1 + 0x10) = ssl;
*(SSL **)(*(long *)(lVar1 + 0x38) + 0x10) = ssl;
return 0;
}
| |
43,291 | fmt::v10::basic_memory_buffer<int, 500ul, std::allocator<int>>::grow(unsigned long) | aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h | FMT_CONSTEXPR20 void grow(size_t size) override {
detail::abort_fuzzing_if(size > 5000);
const size_t max_size = std::allocator_traits<Allocator>::max_size(alloc_);
size_t old_capacity = this->capacity();
size_t new_capacity = old_capacity + old_capacity / 2;
if (size > new_capacity)
new_capacity = size;
else if (new_capacity > max_size)
new_capacity = size > max_size ? size : max_size;
T* old_data = this->data();
T* new_data =
std::allocator_traits<Allocator>::allocate(alloc_, new_capacity);
// Suppress a bogus -Wstringop-overflow in gcc 13.1 (#3481).
detail::assume(this->size() <= new_capacity);
// The following code doesn't throw, so the raw pointer above doesn't leak.
std::uninitialized_copy_n(old_data, this->size(), new_data);
this->set(new_data, new_capacity);
// deallocate must not throw according to the standard, but even if it does,
// the buffer already uses the new storage and will deallocate it in
// destructor.
if (old_data != store_) alloc_.deallocate(old_data, old_capacity);
} | O0 | c | fmt::v10::basic_memory_buffer<int, 500ul, std::allocator<int>>::grow(unsigned long):
subq $0x78, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpq $0x1388, 0x48(%rsp) # imm = 0x1388
seta %al
movzbl %al, %edi
andl $0x1, %edi
callq 0x9ef90
movq 0x18(%rsp), %rdi
callq 0x91440
movq 0x18(%rsp), %rdi
movq %rax, 0x40(%rsp)
callq 0xb5d70
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq 0x38(%rsp), %rcx
shrq %rcx
addq %rcx, %rax
movq %rax, 0x30(%rsp)
movq 0x48(%rsp), %rax
cmpq 0x30(%rsp), %rax
jbe 0xb5c4a
movq 0x48(%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0xb5c84
movq 0x30(%rsp), %rax
cmpq 0x40(%rsp), %rax
jbe 0xb5c82
movq 0x48(%rsp), %rax
cmpq 0x40(%rsp), %rax
jbe 0xb5c6e
movq 0x48(%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0xb5c78
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0xb5c84
movq 0x18(%rsp), %rdi
callq 0xb5d80
movq 0x18(%rsp), %rdi
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rsi
callq 0x94270
movq 0x18(%rsp), %rdi
movq %rax, 0x20(%rsp)
callq 0xb5dd0
movq 0x18(%rsp), %rdi
cmpq 0x30(%rsp), %rax
setbe %al
andb $0x1, %al
movb %al, 0x5f(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
callq 0xb5dd0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq 0x20(%rsp), %rdx
callq 0x8e5a0
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0xb5ba0
movq 0x18(%rsp), %rcx
movq 0x28(%rsp), %rax
addq $0x20, %rcx
cmpq %rcx, %rax
je 0xb5d3e
movq 0x18(%rsp), %rdx
movq 0x28(%rsp), %rcx
movq 0x38(%rsp), %rax
movq %rdx, 0x70(%rsp)
movq %rcx, 0x68(%rsp)
movq %rax, 0x60(%rsp)
movq 0x70(%rsp), %rdi
movq 0x68(%rsp), %rsi
movq 0x60(%rsp), %rdx
callq 0x94d80
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZN3fmt3v1019basic_memory_bufferIjLm32ESaIjEE4growEm:
sub rsp, 78h
mov [rsp+78h+var_28], rdi
mov [rsp+78h+var_30], rsi
mov rax, [rsp+78h+var_28]
mov [rsp+78h+var_60], rax
cmp [rsp+78h+var_30], 1388h
setnbe al
movzx edi, al
and edi, 1; this
call _ZN3fmt3v106detail16abort_fuzzing_ifEb; fmt::v10::detail::abort_fuzzing_if(bool)
mov rdi, [rsp+78h+var_60]
call __ZNSt16allocator_traitsISaIjEE8max_sizeERKS0_; std::allocator_traits<std::allocator<uint>>::max_size(std::allocator<uint> const&)
mov rdi, [rsp+78h+var_60]
mov [rsp+78h+var_38], rax
call _ZNK3fmt3v106detail6bufferIjE8capacityEv; fmt::v10::detail::buffer<uint>::capacity(void)
mov [rsp+78h+var_40], rax
mov rax, [rsp+78h+var_40]
mov rcx, [rsp+78h+var_40]
shr rcx, 1
add rax, rcx
mov [rsp+78h+var_48], rax
mov rax, [rsp+78h+var_30]
cmp rax, [rsp+78h+var_48]
jbe short loc_B5C4A
mov rax, [rsp+78h+var_30]
mov [rsp+78h+var_48], rax
jmp short loc_B5C84
loc_B5C4A:
mov rax, [rsp+78h+var_48]
cmp rax, [rsp+78h+var_38]
jbe short loc_B5C82
mov rax, [rsp+78h+var_30]
cmp rax, [rsp+78h+var_38]
jbe short loc_B5C6E
mov rax, [rsp+78h+var_30]
mov [rsp+78h+var_68], rax
jmp short loc_B5C78
loc_B5C6E:
mov rax, [rsp+78h+var_38]
mov [rsp+78h+var_68], rax
loc_B5C78:
mov rax, [rsp+78h+var_68]
mov [rsp+78h+var_48], rax
loc_B5C82:
jmp short $+2
loc_B5C84:
mov rdi, [rsp+78h+var_60]
call _ZN3fmt3v106detail6bufferIjE4dataEv; fmt::v10::detail::buffer<uint>::data(void)
mov rdi, [rsp+78h+var_60]
mov [rsp+78h+var_50], rax
mov rsi, [rsp+78h+var_48]
call __ZNSt16allocator_traitsISaIjEE8allocateERS0_m; std::allocator_traits<std::allocator<uint>>::allocate(std::allocator<uint>&,ulong)
mov rdi, [rsp+78h+var_60]
mov [rsp+78h+var_58], rax
call _ZNK3fmt3v106detail6bufferIjE4sizeEv; fmt::v10::detail::buffer<uint>::size(void)
mov rdi, [rsp+78h+var_60]
cmp rax, [rsp+78h+var_48]
setbe al
and al, 1
mov [rsp+78h+var_19], al
mov rax, [rsp+78h+var_50]
mov [rsp+78h+var_70], rax
call _ZNK3fmt3v106detail6bufferIjE4sizeEv; fmt::v10::detail::buffer<uint>::size(void)
mov rdi, [rsp+78h+var_70]
mov rsi, rax
mov rdx, [rsp+78h+var_58]
call __ZSt20uninitialized_copy_nIPjmS0_ET1_T_T0_S1_; std::uninitialized_copy_n<uint *,ulong,uint *>(uint *,ulong,uint *)
mov rdi, [rsp+78h+var_60]
mov rsi, [rsp+78h+var_58]
mov rdx, [rsp+78h+var_48]
call _ZN3fmt3v106detail6bufferIjE3setEPjm; fmt::v10::detail::buffer<uint>::set(uint *,ulong)
mov rcx, [rsp+78h+var_60]
mov rax, [rsp+78h+var_50]
add rcx, 20h ; ' '
cmp rax, rcx
jz short loc_B5D3E
mov rdx, [rsp+78h+var_60]
mov rcx, [rsp+78h+var_50]
mov rax, [rsp+78h+var_40]
mov [rsp+78h+var_8], rdx
mov [rsp+78h+var_10], rcx
mov [rsp+78h+var_18], rax
mov rdi, [rsp+78h+var_8]
mov rsi, [rsp+78h+var_10]
mov rdx, [rsp+78h+var_18]
call __ZN9__gnu_cxx13new_allocatorIjE10deallocateEPjm; __gnu_cxx::new_allocator<uint>::deallocate(uint *,ulong)
loc_B5D3E:
add rsp, 78h
retn
| long long fmt::v10::basic_memory_buffer<unsigned int,32ul,std::allocator<unsigned int>>::grow(
long long a1,
unsigned long long a2)
{
long long v2; // rax
long long result; // rax
unsigned long long v4; // [rsp+10h] [rbp-68h]
long long v5; // [rsp+20h] [rbp-58h]
long long v6; // [rsp+28h] [rbp-50h]
unsigned long long v7; // [rsp+30h] [rbp-48h]
unsigned long long v8; // [rsp+38h] [rbp-40h]
unsigned long long v9; // [rsp+40h] [rbp-38h]
fmt::v10::detail::abort_fuzzing_if((fmt::v10::detail *)(a2 > 0x1388));
v9 = std::allocator_traits<std::allocator<unsigned int>>::max_size(a1);
v8 = fmt::v10::detail::buffer<unsigned int>::capacity(a1);
v7 = (v8 >> 1) + v8;
if ( a2 <= v7 )
{
if ( v7 > v9 )
{
if ( a2 <= v9 )
v4 = v9;
else
v4 = a2;
v7 = v4;
}
}
else
{
v7 = a2;
}
v6 = fmt::v10::detail::buffer<unsigned int>::data(a1);
v5 = std::allocator_traits<std::allocator<unsigned int>>::allocate(a1, v7);
fmt::v10::detail::buffer<unsigned int>::size(a1, v7);
v2 = fmt::v10::detail::buffer<unsigned int>::size(a1, v7);
std::uninitialized_copy_n<unsigned int *,unsigned long,unsigned int *>(v6, v2, v5);
fmt::v10::detail::buffer<unsigned int>::set(a1, v5, v7);
result = v6;
if ( v6 != a1 + 32 )
return __gnu_cxx::new_allocator<unsigned int>::deallocate(a1, v6, v8);
return result;
}
| grow:
SUB RSP,0x78
MOV qword ptr [RSP + 0x50],RDI
MOV qword ptr [RSP + 0x48],RSI
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x18],RAX
CMP qword ptr [RSP + 0x48],0x1388
SETA AL
MOVZX EDI,AL
AND EDI,0x1
CALL 0x0019ef90
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x00191440
MOV RDI,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x40],RAX
CALL 0x001b5d70
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV RCX,qword ptr [RSP + 0x38]
SHR RCX,0x1
ADD RAX,RCX
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0x48]
CMP RAX,qword ptr [RSP + 0x30]
JBE 0x001b5c4a
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x30],RAX
JMP 0x001b5c84
LAB_001b5c4a:
MOV RAX,qword ptr [RSP + 0x30]
CMP RAX,qword ptr [RSP + 0x40]
JBE 0x001b5c82
MOV RAX,qword ptr [RSP + 0x48]
CMP RAX,qword ptr [RSP + 0x40]
JBE 0x001b5c6e
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001b5c78
LAB_001b5c6e:
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x10],RAX
LAB_001b5c78:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x30],RAX
LAB_001b5c82:
JMP 0x001b5c84
LAB_001b5c84:
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x001b5d80
MOV RDI,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x28],RAX
MOV RSI,qword ptr [RSP + 0x30]
CALL 0x00194270
MOV RDI,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x20],RAX
CALL 0x001b5dd0
MOV RDI,qword ptr [RSP + 0x18]
CMP RAX,qword ptr [RSP + 0x30]
SETBE AL
AND AL,0x1
MOV byte ptr [RSP + 0x5f],AL
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x8],RAX
CALL 0x001b5dd0
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,RAX
MOV RDX,qword ptr [RSP + 0x20]
CALL 0x0018e5a0
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x30]
CALL 0x001b5ba0
MOV RCX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSP + 0x28]
ADD RCX,0x20
CMP RAX,RCX
JZ 0x001b5d3e
MOV RDX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x70],RDX
MOV qword ptr [RSP + 0x68],RCX
MOV qword ptr [RSP + 0x60],RAX
MOV RDI,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x60]
CALL 0x00194d80
LAB_001b5d3e:
ADD RSP,0x78
RET
|
/* fmt::v10::basic_memory_buffer<unsigned int, 32ul, std::allocator<unsigned int> >::grow(unsigned
long) */
void __thiscall
fmt::v10::basic_memory_buffer<unsigned_int,32ul,std::allocator<unsigned_int>>::grow
(basic_memory_buffer<unsigned_int,32ul,std::allocator<unsigned_int>> *this,ulong param_1)
{
ulong uVar1;
ulong uVar2;
basic_memory_buffer<unsigned_int,32ul,std::allocator<unsigned_int>> *pbVar3;
uint *puVar4;
ulong local_68;
ulong local_48;
v10::detail::abort_fuzzing_if(5000 < param_1);
local_68 = std::allocator_traits<std::allocator<unsigned_int>>::max_size((allocator *)this);
uVar1 = v10::detail::buffer<unsigned_int>::capacity((buffer<unsigned_int> *)this);
uVar2 = uVar1 + (uVar1 >> 1);
local_48 = param_1;
if ((param_1 <= uVar2) && (local_48 = uVar2, local_68 < uVar2)) {
if (local_68 < param_1) {
local_68 = param_1;
}
local_48 = local_68;
}
pbVar3 = (basic_memory_buffer<unsigned_int,32ul,std::allocator<unsigned_int>> *)
v10::detail::buffer<unsigned_int>::data((buffer<unsigned_int> *)this);
puVar4 = (uint *)std::allocator_traits<std::allocator<unsigned_int>>::allocate
((allocator *)this,local_48);
v10::detail::buffer<unsigned_int>::size((buffer<unsigned_int> *)this);
uVar2 = v10::detail::buffer<unsigned_int>::size((buffer<unsigned_int> *)this);
std::uninitialized_copy_n<unsigned_int*,unsigned_long,unsigned_int*>((uint *)pbVar3,uVar2,puVar4);
v10::detail::buffer<unsigned_int>::set((buffer<unsigned_int> *)this,puVar4,local_48);
if (pbVar3 != this + 0x20) {
__gnu_cxx::new_allocator<unsigned_int>::deallocate
((new_allocator<unsigned_int> *)this,(uint *)pbVar3,uVar1);
}
return;
}
| |
43,292 | test_bug11037 | eloqsql/tests/mysql_client_test.c | static void test_bug11037()
{
MYSQL_STMT *stmt;
int rc;
const char *stmt_text;
myheader("test_bug11037");
mysql_query(mysql, "drop table if exists t1");
rc= mysql_query(mysql, "create table t1 (id int not null)");
myquery(rc);
rc= mysql_query(mysql, "insert into t1 values (1)");
myquery(rc);
stmt_text= "select id FROM t1";
stmt= mysql_stmt_init(mysql);
rc= mysql_stmt_prepare(stmt, stmt_text, strlen(stmt_text));
/* expected error */
rc = mysql_stmt_fetch(stmt);
DIE_UNLESS(rc==1);
if (!opt_silent)
fprintf(stdout, "Got error, as expected:\n [%d] %s\n",
mysql_stmt_errno(stmt), mysql_stmt_error(stmt));
rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc);
rc= mysql_stmt_fetch(stmt);
DIE_UNLESS(rc==0);
rc= mysql_stmt_fetch(stmt);
DIE_UNLESS(rc==MYSQL_NO_DATA);
rc= mysql_stmt_fetch(stmt);
DIE_UNLESS(rc==MYSQL_NO_DATA);
mysql_stmt_close(stmt);
rc= mysql_query(mysql, "drop table t1");
myquery(rc);
} | O0 | c | test_bug11037:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
jmp 0x78bda
movsbl 0x3f18f0(%rip), %eax # 0x46a4d1
cmpl $0x2, %eax
jge 0x78c62
movq 0x2363eb(%rip), %rax # 0x2aefd8
movq (%rax), %rdi
leaq 0xb572d(%rip), %rsi # 0x12e324
movb $0x0, %al
callq 0x3a1c0
movq 0x2363d3(%rip), %rax # 0x2aefd8
movq (%rax), %rdi
movl 0x3f1b0e(%rip), %edx # 0x46a71c
movl %edx, %eax
addl $0x1, %eax
movl %eax, 0x3f1b03(%rip) # 0x46a71c
movl 0x3f1af9(%rip), %ecx # 0x46a718
movl 0x3f18d6(%rip), %r8d # 0x46a4fc
leaq 0xb69ff(%rip), %rsi # 0x12f62c
leaq 0xb63b1(%rip), %r9 # 0x12efe5
movb $0x0, %al
callq 0x3a1c0
movq 0x236396(%rip), %rax # 0x2aefd8
movq (%rax), %rdi
leaq 0xb5710(%rip), %rsi # 0x12e35c
movb $0x0, %al
callq 0x3a1c0
movq 0x23637e(%rip), %rax # 0x2aefd8
movq (%rax), %rdi
callq 0x3a4a0
movq 0x3f186f(%rip), %rdi # 0x46a4d8
leaq 0xb70bd(%rip), %rsi # 0x12fd2d
callq 0x3b3d0
movq 0x3f185c(%rip), %rdi # 0x46a4d8
leaq 0xc538d(%rip), %rsi # 0x13e010
callq 0x3b3d0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x78ca0
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpl $0x0, -0x1c(%rbp)
jne 0x78ca8
jmp 0x78cc0
leaq 0xb4f5d(%rip), %rdi # 0x12dc0c
movl $0x3860, %esi # imm = 0x3860
leaq 0xcb2b4(%rip), %rdx # 0x143f6f
callq 0x3c010
movq 0x3f1811(%rip), %rdi # 0x46a4d8
leaq 0xc04dc(%rip), %rsi # 0x1391aa
callq 0x3b3d0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
je 0x78ceb
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpl $0x0, -0x20(%rbp)
jne 0x78cf3
jmp 0x78d0b
leaq 0xb4f12(%rip), %rdi # 0x12dc0c
movl $0x3863, %esi # imm = 0x3863
leaq 0xcb269(%rip), %rdx # 0x143f6f
callq 0x3c010
leaq 0xc5320(%rip), %rax # 0x13e032
movq %rax, -0x18(%rbp)
movq 0x3f17bb(%rip), %rdi # 0x46a4d8
callq 0xb2790
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3a400
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq %rax, %rdx
callq 0x3b810
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0x3b910
movl %eax, -0xc(%rbp)
cmpl $0x1, -0xc(%rbp)
jne 0x78d66
jmp 0x78d7e
leaq 0xb4e9f(%rip), %rdi # 0x12dc0c
movl $0x386b, %esi # imm = 0x386B
leaq 0xc52cb(%rip), %rdx # 0x13e044
callq 0x3c010
cmpb $0x0, 0x3f174c(%rip) # 0x46a4d1
jne 0x78dc2
movq 0x23624a(%rip), %rax # 0x2aefd8
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
callq 0xb1df0
movl %eax, -0x3c(%rbp)
movq -0x8(%rbp), %rdi
callq 0xb1e10
movq -0x48(%rbp), %rdi
movl -0x3c(%rbp), %edx
movq %rax, %rcx
leaq 0xc4d95(%rip), %rsi # 0x13db50
movb $0x0, %al
callq 0x3a1c0
movq -0x8(%rbp), %rdi
callq 0x3b8a0
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x78de1
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3c0b0
cmpl $0x0, -0xc(%rbp)
jne 0x78de9
jmp 0x78e01
leaq 0xb4e1c(%rip), %rdi # 0x12dc0c
movl $0x3871, %esi # imm = 0x3871
leaq 0xc0a10(%rip), %rdx # 0x13980c
callq 0x3c010
movq -0x8(%rbp), %rdi
callq 0x3b910
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x78e15
jmp 0x78e2d
leaq 0xb4df0(%rip), %rdi # 0x12dc0c
movl $0x3874, %esi # imm = 0x3874
leaq 0xc5222(%rip), %rdx # 0x13e04a
callq 0x3c010
movq -0x8(%rbp), %rdi
callq 0x3b910
movl %eax, -0xc(%rbp)
cmpl $0x64, -0xc(%rbp)
jne 0x78e41
jmp 0x78e59
leaq 0xb4dc4(%rip), %rdi # 0x12dc0c
movl $0x3877, %esi # imm = 0x3877
leaq 0xc51fc(%rip), %rdx # 0x13e050
callq 0x3c010
movq -0x8(%rbp), %rdi
callq 0x3b910
movl %eax, -0xc(%rbp)
cmpl $0x64, -0xc(%rbp)
jne 0x78e6d
jmp 0x78e85
leaq 0xb4d98(%rip), %rdi # 0x12dc0c
movl $0x387a, %esi # imm = 0x387A
leaq 0xc51d0(%rip), %rdx # 0x13e050
callq 0x3c010
movq -0x8(%rbp), %rdi
callq 0x3b9f0
movq 0x3f1643(%rip), %rdi # 0x46a4d8
leaq 0xb6cdc(%rip), %rsi # 0x12fb78
callq 0x3b3d0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x78eb9
xorl %eax, %eax
movl %eax, %edi
callq 0x3bf10
cmpl $0x0, -0x24(%rbp)
jne 0x78ec1
jmp 0x78ed9
leaq 0xb4d44(%rip), %rdi # 0x12dc0c
movl $0x387e, %esi # imm = 0x387E
leaq 0xcb09b(%rip), %rdx # 0x143f6f
callq 0x3c010
addq $0x50, %rsp
popq %rbp
retq
nop
| test_bug11037:
push rbp
mov rbp, rsp
sub rsp, 50h
jmp short $+2
loc_78BDA:
movsx eax, cs:opt_silent
cmp eax, 2
jge short loc_78C62
mov rax, cs:stdout_ptr
mov rdi, [rax]
lea rsi, asc_12E324; "\n\n###################################"...
mov al, 0
call _fprintf
mov rax, cs:stdout_ptr
mov rdi, [rax]
mov edx, cs:test_count
mov eax, edx
add eax, 1
mov cs:test_count, eax
mov ecx, cs:iter_count
mov r8d, cs:opt_count
lea rsi, aUOfUUS; "%u of (%u/%u): %s"
lea r9, aTestBug11037; "test_bug11037"
mov al, 0
call _fprintf
mov rax, cs:stdout_ptr
mov rdi, [rax]
lea rsi, asc_12E35C; " \n###################################"...
mov al, 0
call _fprintf
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
loc_78C62:
mov rdi, cs:mysql
lea rsi, aDropTableIfExi_2; "drop table if exists t1"
call wrap_mysql_query
mov rdi, cs:mysql
lea rsi, aCreateTableT1I_14; "create table t1 (id int not null)"
call wrap_mysql_query
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jz short loc_78CA0
xor eax, eax
mov edi, eax
call print_error
loc_78CA0:
cmp [rbp+var_1C], 0
jnz short loc_78CA8
jmp short loc_78CC0
loc_78CA8:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 3860h
lea rdx, aTmIYear0+9; "r == 0"
call die
loc_78CC0:
mov rdi, cs:mysql
lea rsi, aInsertIntoT1Va_14; "insert into t1 values (1)"
call wrap_mysql_query
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
mov [rbp+var_20], eax
cmp [rbp+var_20], 0
jz short loc_78CEB
xor eax, eax
mov edi, eax
call print_error
loc_78CEB:
cmp [rbp+var_20], 0
jnz short loc_78CF3
jmp short loc_78D0B
loc_78CF3:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 3863h
lea rdx, aTmIYear0+9; "r == 0"
call die
loc_78D0B:
lea rax, aSelectIdFromT1; "select id FROM t1"
mov [rbp+var_18], rax
mov rdi, cs:mysql
call mysql_stmt_init
mov [rbp+var_8], rax
mov rax, [rbp+var_8]
mov [rbp+var_38], rax
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
mov rdi, [rbp+var_18]
call _strlen
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_30]
mov rdx, rax
call wrap_mysql_stmt_prepare
mov [rbp+var_C], eax
mov rdi, [rbp+var_8]
call wrap_mysql_stmt_fetch
mov [rbp+var_C], eax
cmp [rbp+var_C], 1
jnz short loc_78D66
jmp short loc_78D7E
loc_78D66:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 386Bh
lea rdx, aRc1_1; "rc==1"
call die
loc_78D7E:
cmp cs:opt_silent, 0
jnz short loc_78DC2
mov rax, cs:stdout_ptr
mov rax, [rax]
mov [rbp+var_48], rax
mov rdi, [rbp+var_8]
call mysql_stmt_errno
mov [rbp+var_3C], eax
mov rdi, [rbp+var_8]
call mysql_stmt_error
mov rdi, [rbp+var_48]
mov edx, [rbp+var_3C]
mov rcx, rax
lea rsi, aGotErrorAsExpe_2; "Got error, as expected:\n [%d] %s\n"
mov al, 0
call _fprintf
loc_78DC2:
mov rdi, [rbp+var_8]
call wrap_mysql_stmt_execute
mov [rbp+var_C], eax
cmp [rbp+var_C], 0
jz short loc_78DE1
mov rdi, [rbp+var_8]
xor eax, eax
mov esi, eax
call print_st_error
loc_78DE1:
cmp [rbp+var_C], 0
jnz short loc_78DE9
jmp short loc_78E01
loc_78DE9:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 3871h
lea rdx, aRcMysqlDataTru+1Eh; "rc == 0"
call die
loc_78E01:
mov rdi, [rbp+var_8]
call wrap_mysql_stmt_fetch
mov [rbp+var_C], eax
cmp [rbp+var_C], 0
jnz short loc_78E15
jmp short loc_78E2D
loc_78E15:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 3874h
lea rdx, aRc0; "rc==0"
call die
loc_78E2D:
mov rdi, [rbp+var_8]
call wrap_mysql_stmt_fetch
mov [rbp+var_C], eax
cmp [rbp+var_C], 64h ; 'd'
jnz short loc_78E41
jmp short loc_78E59
loc_78E41:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 3877h
lea rdx, aRcMysqlNoData_0; "rc==MYSQL_NO_DATA"
call die
loc_78E59:
mov rdi, [rbp+var_8]
call wrap_mysql_stmt_fetch
mov [rbp+var_C], eax
cmp [rbp+var_C], 64h ; 'd'
jnz short loc_78E6D
jmp short loc_78E85
loc_78E6D:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 387Ah
lea rdx, aRcMysqlNoData_0; "rc==MYSQL_NO_DATA"
call die
loc_78E85:
mov rdi, [rbp+var_8]
call wrap_mysql_stmt_close
mov rdi, cs:mysql
lea rsi, aDropTableT1_0; "drop table t1"
call wrap_mysql_query
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
mov [rbp+var_24], eax
cmp [rbp+var_24], 0
jz short loc_78EB9
xor eax, eax
mov edi, eax
call print_error
loc_78EB9:
cmp [rbp+var_24], 0
jnz short loc_78EC1
jmp short loc_78ED9
loc_78EC1:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 387Eh
lea rdx, aTmIYear0+9; "r == 0"
call die
loc_78ED9:
add rsp, 50h
pop rbp
retn
| void test_bug11037()
{
int v0; // edx
long long v1; // rax
const char *v2; // rax
long long v3; // [rsp+8h] [rbp-48h]
int v4; // [rsp+14h] [rbp-3Ch]
long long v5; // [rsp+48h] [rbp-8h]
if ( opt_silent < 2 )
{
fprintf(stdout, "\n\n#####################################\n");
v0 = test_count++;
fprintf(stdout, "%u of (%u/%u): %s", v0, iter_count, opt_count, "test_bug11037");
fprintf(stdout, " \n#####################################\n");
fflush(stdout);
}
wrap_mysql_query(mysql, (long long)"drop table if exists t1");
if ( (unsigned int)wrap_mysql_query(mysql, (long long)"create table t1 (id int not null)") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 14432, "r == 0");
}
if ( (unsigned int)wrap_mysql_query(mysql, (long long)"insert into t1 values (1)") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 14435, "r == 0");
}
v5 = mysql_stmt_init(mysql);
v1 = strlen("select id FROM t1");
wrap_mysql_stmt_prepare(v5, (long long)"select id FROM t1", v1);
if ( (unsigned int)wrap_mysql_stmt_fetch(v5) != 1 )
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 14443, "rc==1");
if ( !opt_silent )
{
v3 = stdout;
v4 = mysql_stmt_errno(v5);
v2 = (const char *)mysql_stmt_error(v5);
fprintf(v3, "Got error, as expected:\n [%d] %s\n", v4, v2);
}
if ( (unsigned int)wrap_mysql_stmt_execute(v5) )
{
print_st_error(v5, 0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 14449, "rc == 0");
}
if ( (unsigned int)wrap_mysql_stmt_fetch(v5) )
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 14452, "rc==0");
if ( (unsigned int)wrap_mysql_stmt_fetch(v5) != 100 )
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 14455, "rc==MYSQL_NO_DATA");
if ( (unsigned int)wrap_mysql_stmt_fetch(v5) != 100 )
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 14458, "rc==MYSQL_NO_DATA");
wrap_mysql_stmt_close(v5);
if ( (unsigned int)wrap_mysql_query(mysql, (long long)"drop table t1") )
{
print_error(0LL);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c", 14462, "r == 0");
}
}
| test_bug11037:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
JMP 0x00178bda
LAB_00178bda:
MOVSX EAX,byte ptr [0x0056a4d1]
CMP EAX,0x2
JGE 0x00178c62
MOV RAX,qword ptr [0x003aefd8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x22e324]
MOV AL,0x0
CALL 0x0013a1c0
MOV RAX,qword ptr [0x003aefd8]
MOV RDI,qword ptr [RAX]
MOV EDX,dword ptr [0x0056a71c]
MOV EAX,EDX
ADD EAX,0x1
MOV dword ptr [0x0056a71c],EAX
MOV ECX,dword ptr [0x0056a718]
MOV R8D,dword ptr [0x0056a4fc]
LEA RSI,[0x22f62c]
LEA R9,[0x22efe5]
MOV AL,0x0
CALL 0x0013a1c0
MOV RAX,qword ptr [0x003aefd8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x22e35c]
MOV AL,0x0
CALL 0x0013a1c0
MOV RAX,qword ptr [0x003aefd8]
MOV RDI,qword ptr [RAX]
CALL 0x0013a4a0
LAB_00178c62:
MOV RDI,qword ptr [0x0056a4d8]
LEA RSI,[0x22fd2d]
CALL 0x0013b3d0
MOV RDI,qword ptr [0x0056a4d8]
LEA RSI,[0x23e010]
CALL 0x0013b3d0
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x00178ca0
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_00178ca0:
CMP dword ptr [RBP + -0x1c],0x0
JNZ 0x00178ca8
JMP 0x00178cc0
LAB_00178ca8:
LEA RDI,[0x22dc0c]
MOV ESI,0x3860
LEA RDX,[0x243f6f]
CALL 0x0013c010
LAB_00178cc0:
MOV RDI,qword ptr [0x0056a4d8]
LEA RSI,[0x2391aa]
CALL 0x0013b3d0
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x20],EAX
CMP dword ptr [RBP + -0x20],0x0
JZ 0x00178ceb
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_00178ceb:
CMP dword ptr [RBP + -0x20],0x0
JNZ 0x00178cf3
JMP 0x00178d0b
LAB_00178cf3:
LEA RDI,[0x22dc0c]
MOV ESI,0x3863
LEA RDX,[0x243f6f]
CALL 0x0013c010
LAB_00178d0b:
LEA RAX,[0x23e032]
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [0x0056a4d8]
CALL 0x001b2790
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x0013a400
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,RAX
CALL 0x0013b810
MOV dword ptr [RBP + -0xc],EAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0013b910
MOV dword ptr [RBP + -0xc],EAX
CMP dword ptr [RBP + -0xc],0x1
JNZ 0x00178d66
JMP 0x00178d7e
LAB_00178d66:
LEA RDI,[0x22dc0c]
MOV ESI,0x386b
LEA RDX,[0x23e044]
CALL 0x0013c010
LAB_00178d7e:
CMP byte ptr [0x0056a4d1],0x0
JNZ 0x00178dc2
MOV RAX,qword ptr [0x003aefd8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001b1df0
MOV dword ptr [RBP + -0x3c],EAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001b1e10
MOV RDI,qword ptr [RBP + -0x48]
MOV EDX,dword ptr [RBP + -0x3c]
MOV RCX,RAX
LEA RSI,[0x23db50]
MOV AL,0x0
CALL 0x0013a1c0
LAB_00178dc2:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0013b8a0
MOV dword ptr [RBP + -0xc],EAX
CMP dword ptr [RBP + -0xc],0x0
JZ 0x00178de1
MOV RDI,qword ptr [RBP + -0x8]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0013c0b0
LAB_00178de1:
CMP dword ptr [RBP + -0xc],0x0
JNZ 0x00178de9
JMP 0x00178e01
LAB_00178de9:
LEA RDI,[0x22dc0c]
MOV ESI,0x3871
LEA RDX,[0x23980c]
CALL 0x0013c010
LAB_00178e01:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0013b910
MOV dword ptr [RBP + -0xc],EAX
CMP dword ptr [RBP + -0xc],0x0
JNZ 0x00178e15
JMP 0x00178e2d
LAB_00178e15:
LEA RDI,[0x22dc0c]
MOV ESI,0x3874
LEA RDX,[0x23e04a]
CALL 0x0013c010
LAB_00178e2d:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0013b910
MOV dword ptr [RBP + -0xc],EAX
CMP dword ptr [RBP + -0xc],0x64
JNZ 0x00178e41
JMP 0x00178e59
LAB_00178e41:
LEA RDI,[0x22dc0c]
MOV ESI,0x3877
LEA RDX,[0x23e050]
CALL 0x0013c010
LAB_00178e59:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0013b910
MOV dword ptr [RBP + -0xc],EAX
CMP dword ptr [RBP + -0xc],0x64
JNZ 0x00178e6d
JMP 0x00178e85
LAB_00178e6d:
LEA RDI,[0x22dc0c]
MOV ESI,0x387a
LEA RDX,[0x23e050]
CALL 0x0013c010
LAB_00178e85:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0013b9f0
MOV RDI,qword ptr [0x0056a4d8]
LEA RSI,[0x22fb78]
CALL 0x0013b3d0
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x24],EAX
CMP dword ptr [RBP + -0x24],0x0
JZ 0x00178eb9
XOR EAX,EAX
MOV EDI,EAX
CALL 0x0013bf10
LAB_00178eb9:
CMP dword ptr [RBP + -0x24],0x0
JNZ 0x00178ec1
JMP 0x00178ed9
LAB_00178ec1:
LEA RDI,[0x22dc0c]
MOV ESI,0x387e
LEA RDX,[0x243f6f]
CALL 0x0013c010
LAB_00178ed9:
ADD RSP,0x50
POP RBP
RET
|
void test_bug11037(void)
{
FILE *__stream;
int iVar1;
uint uVar2;
int8 uVar3;
size_t sVar4;
int8 uVar5;
ulong uVar6;
if (opt_silent < '\x02') {
fprintf(*(FILE **)PTR_stdout_003aefd8,"\n\n#####################################\n");
uVar6 = (ulong)test_count;
test_count = test_count + 1;
fprintf(*(FILE **)PTR_stdout_003aefd8,"%u of (%u/%u): %s",uVar6,(ulong)iter_count,
(ulong)opt_count,"test_bug11037");
fprintf(*(FILE **)PTR_stdout_003aefd8," \n#####################################\n");
fflush(*(FILE **)PTR_stdout_003aefd8);
}
wrap_mysql_query(mysql,"drop table if exists t1");
iVar1 = wrap_mysql_query(mysql,"create table t1 (id int not null)");
if (iVar1 != 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3860,"r == 0");
}
iVar1 = wrap_mysql_query(mysql,"insert into t1 values (1)");
if (iVar1 != 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3863,"r == 0");
}
uVar3 = mysql_stmt_init(mysql);
sVar4 = strlen("select id FROM t1");
wrap_mysql_stmt_prepare(uVar3,"select id FROM t1",sVar4);
iVar1 = wrap_mysql_stmt_fetch(uVar3);
if (iVar1 != 1) {
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x386b,"rc==1");
}
if (opt_silent == '\0') {
__stream = *(FILE **)PTR_stdout_003aefd8;
uVar2 = mysql_stmt_errno(uVar3);
uVar5 = mysql_stmt_error(uVar3);
fprintf(__stream,"Got error, as expected:\n [%d] %s\n",(ulong)uVar2,uVar5);
}
iVar1 = wrap_mysql_stmt_execute(uVar3);
if (iVar1 != 0) {
print_st_error(uVar3,0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3871,"rc == 0");
}
iVar1 = wrap_mysql_stmt_fetch(uVar3);
if (iVar1 != 0) {
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3874,"rc==0");
}
iVar1 = wrap_mysql_stmt_fetch(uVar3);
if (iVar1 != 100) {
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x3877,
"rc==MYSQL_NO_DATA");
}
iVar1 = wrap_mysql_stmt_fetch(uVar3);
if (iVar1 != 100) {
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x387a,
"rc==MYSQL_NO_DATA");
}
wrap_mysql_stmt_close(uVar3);
iVar1 = wrap_mysql_query(mysql,"drop table t1");
if (iVar1 != 0) {
print_error(0);
die("/workspace/llm4binary/github2025/eloqsql/tests/mysql_client_test.c",0x387e,"r == 0");
}
return;
}
| |
43,293 | translog_fill_overhead_table | eloqsql/storage/maria/ma_loghandler.c | void translog_fill_overhead_table()
{
uint i;
for (i= 0; i < TRANSLOG_FLAGS_NUM; i++)
{
page_overhead[i]= 7;
if (i & TRANSLOG_PAGE_CRC)
page_overhead[i]+= CRC_SIZE;
if (i & TRANSLOG_SECTOR_PROTECTION)
page_overhead[i]+= TRANSLOG_PAGE_SIZE /
DISK_DRIVE_SECTOR_SIZE;
}
} | O3 | c | translog_fill_overhead_table:
pushq %rbp
movq %rsp, %rbp
movaps 0xa652d(%rip), %xmm0 # 0xda0d0
movaps %xmm0, 0xbcd236(%rip) # 0xc00de0
movaps %xmm0, 0xbcd23f(%rip) # 0xc00df0
popq %rbp
retq
| translog_fill_overhead_table:
push rbp
mov rbp, rsp
movaps xmm0, cs:xmmword_DA0D0
movaps cs:page_overhead, xmm0
movaps cs:xmmword_C00DF0, xmm0
pop rbp
retn
| void translog_fill_overhead_table()
{
page_overhead = xmmword_DA0D0;
xmmword_C00DF0 = xmmword_DA0D0;
}
| translog_fill_overhead_table:
PUSH RBP
MOV RBP,RSP
MOVAPS XMM0,xmmword ptr [0x001da0d0]
MOVAPS xmmword ptr [0x00d00de0],XMM0
MOVAPS xmmword ptr [0x00d00df0],XMM0
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void translog_fill_overhead_table(void)
{
page_overhead._0_8_ = _DAT_001da0d0;
page_overhead._8_8_ = _UNK_001da0d8;
page_overhead._16_8_ = _DAT_001da0d0;
page_overhead._24_8_ = _UNK_001da0d8;
return;
}
| |
43,294 | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int) | monkey531[P]llama/common/json.hpp | inline cached_power get_cached_power_for_binary_exponent(int e)
{
// Now
//
// alpha <= e_c + e + q <= gamma (1)
// ==> f_c * 2^alpha <= c * 2^e * 2^q
//
// and since the c's are normalized, 2^(q-1) <= f_c,
//
// ==> 2^(q - 1 + alpha) <= c * 2^(e + q)
// ==> 2^(alpha - e - 1) <= c
//
// If c were an exact power of ten, i.e. c = 10^k, one may determine k as
//
// k = ceil( log_10( 2^(alpha - e - 1) ) )
// = ceil( (alpha - e - 1) * log_10(2) )
//
// From the paper:
// "In theory the result of the procedure could be wrong since c is rounded,
// and the computation itself is approximated [...]. In practice, however,
// this simple function is sufficient."
//
// For IEEE double precision floating-point numbers converted into
// normalized diyfp's w = f * 2^e, with q = 64,
//
// e >= -1022 (min IEEE exponent)
// -52 (p - 1)
// -52 (p - 1, possibly normalize denormal IEEE numbers)
// -11 (normalize the diyfp)
// = -1137
//
// and
//
// e <= +1023 (max IEEE exponent)
// -52 (p - 1)
// -11 (normalize the diyfp)
// = 960
//
// This binary exponent range [-1137,960] results in a decimal exponent
// range [-307,324]. One does not need to store a cached power for each
// k in this range. For each such k it suffices to find a cached power
// such that the exponent of the product lies in [alpha,gamma].
// This implies that the difference of the decimal exponents of adjacent
// table entries must be less than or equal to
//
// floor( (gamma - alpha) * log_10(2) ) = 8.
//
// (A smaller distance gamma-alpha would require a larger table.)
// NB:
// Actually this function returns c, such that -60 <= e_c + e + 64 <= -34.
constexpr int kCachedPowersMinDecExp = -300;
constexpr int kCachedPowersDecStep = 8;
static constexpr std::array<cached_power, 79> kCachedPowers =
{
{
{ 0xAB70FE17C79AC6CA, -1060, -300 },
{ 0xFF77B1FCBEBCDC4F, -1034, -292 },
{ 0xBE5691EF416BD60C, -1007, -284 },
{ 0x8DD01FAD907FFC3C, -980, -276 },
{ 0xD3515C2831559A83, -954, -268 },
{ 0x9D71AC8FADA6C9B5, -927, -260 },
{ 0xEA9C227723EE8BCB, -901, -252 },
{ 0xAECC49914078536D, -874, -244 },
{ 0x823C12795DB6CE57, -847, -236 },
{ 0xC21094364DFB5637, -821, -228 },
{ 0x9096EA6F3848984F, -794, -220 },
{ 0xD77485CB25823AC7, -768, -212 },
{ 0xA086CFCD97BF97F4, -741, -204 },
{ 0xEF340A98172AACE5, -715, -196 },
{ 0xB23867FB2A35B28E, -688, -188 },
{ 0x84C8D4DFD2C63F3B, -661, -180 },
{ 0xC5DD44271AD3CDBA, -635, -172 },
{ 0x936B9FCEBB25C996, -608, -164 },
{ 0xDBAC6C247D62A584, -582, -156 },
{ 0xA3AB66580D5FDAF6, -555, -148 },
{ 0xF3E2F893DEC3F126, -529, -140 },
{ 0xB5B5ADA8AAFF80B8, -502, -132 },
{ 0x87625F056C7C4A8B, -475, -124 },
{ 0xC9BCFF6034C13053, -449, -116 },
{ 0x964E858C91BA2655, -422, -108 },
{ 0xDFF9772470297EBD, -396, -100 },
{ 0xA6DFBD9FB8E5B88F, -369, -92 },
{ 0xF8A95FCF88747D94, -343, -84 },
{ 0xB94470938FA89BCF, -316, -76 },
{ 0x8A08F0F8BF0F156B, -289, -68 },
{ 0xCDB02555653131B6, -263, -60 },
{ 0x993FE2C6D07B7FAC, -236, -52 },
{ 0xE45C10C42A2B3B06, -210, -44 },
{ 0xAA242499697392D3, -183, -36 },
{ 0xFD87B5F28300CA0E, -157, -28 },
{ 0xBCE5086492111AEB, -130, -20 },
{ 0x8CBCCC096F5088CC, -103, -12 },
{ 0xD1B71758E219652C, -77, -4 },
{ 0x9C40000000000000, -50, 4 },
{ 0xE8D4A51000000000, -24, 12 },
{ 0xAD78EBC5AC620000, 3, 20 },
{ 0x813F3978F8940984, 30, 28 },
{ 0xC097CE7BC90715B3, 56, 36 },
{ 0x8F7E32CE7BEA5C70, 83, 44 },
{ 0xD5D238A4ABE98068, 109, 52 },
{ 0x9F4F2726179A2245, 136, 60 },
{ 0xED63A231D4C4FB27, 162, 68 },
{ 0xB0DE65388CC8ADA8, 189, 76 },
{ 0x83C7088E1AAB65DB, 216, 84 },
{ 0xC45D1DF942711D9A, 242, 92 },
{ 0x924D692CA61BE758, 269, 100 },
{ 0xDA01EE641A708DEA, 295, 108 },
{ 0xA26DA3999AEF774A, 322, 116 },
{ 0xF209787BB47D6B85, 348, 124 },
{ 0xB454E4A179DD1877, 375, 132 },
{ 0x865B86925B9BC5C2, 402, 140 },
{ 0xC83553C5C8965D3D, 428, 148 },
{ 0x952AB45CFA97A0B3, 455, 156 },
{ 0xDE469FBD99A05FE3, 481, 164 },
{ 0xA59BC234DB398C25, 508, 172 },
{ 0xF6C69A72A3989F5C, 534, 180 },
{ 0xB7DCBF5354E9BECE, 561, 188 },
{ 0x88FCF317F22241E2, 588, 196 },
{ 0xCC20CE9BD35C78A5, 614, 204 },
{ 0x98165AF37B2153DF, 641, 212 },
{ 0xE2A0B5DC971F303A, 667, 220 },
{ 0xA8D9D1535CE3B396, 694, 228 },
{ 0xFB9B7CD9A4A7443C, 720, 236 },
{ 0xBB764C4CA7A44410, 747, 244 },
{ 0x8BAB8EEFB6409C1A, 774, 252 },
{ 0xD01FEF10A657842C, 800, 260 },
{ 0x9B10A4E5E9913129, 827, 268 },
{ 0xE7109BFBA19C0C9D, 853, 276 },
{ 0xAC2820D9623BF429, 880, 284 },
{ 0x80444B5E7AA7CF85, 907, 292 },
{ 0xBF21E44003ACDD2D, 933, 300 },
{ 0x8E679C2F5E44FF8F, 960, 308 },
{ 0xD433179D9C8CB841, 986, 316 },
{ 0x9E19DB92B4E31BA9, 1013, 324 },
}
};
// This computation gives exactly the same results for k as
// k = ceil((kAlpha - e - 1) * 0.30102999566398114)
// for |e| <= 1500, but doesn't require floating-point operations.
// NB: log_10(2) ~= 78913 / 2^18
JSON_ASSERT(e >= -1500);
JSON_ASSERT(e <= 1500);
const int f = kAlpha - e - 1;
const int k = (f * 78913) / (1 << 18) + static_cast<int>(f > 0);
const int index = (-kCachedPowersMinDecExp + k + (kCachedPowersDecStep - 1)) / kCachedPowersDecStep;
JSON_ASSERT(index >= 0);
JSON_ASSERT(static_cast<std::size_t>(index) < kCachedPowers.size());
const cached_power cached = kCachedPowers[static_cast<std::size_t>(index)];
JSON_ASSERT(kAlpha <= cached.e + e + 64);
JSON_ASSERT(kGamma >= cached.e + e + 64);
return cached;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int):
pushq %rax
cmpl $0xfffffa23, %edi # imm = 0xFFFFFA23
jle 0xbcbe2
cmpl $0x5dd, %edi # imm = 0x5DD
jge 0xbcc01
xorl %eax, %eax
movl %edi, %ecx
subl $-0x3d, %ecx
setl %al
negl %ecx
imull $0x13441, %ecx, %ecx # imm = 0x13441
leal 0x3ffff(%rcx), %edx
testl %ecx, %ecx
cmovnsl %ecx, %edx
sarl $0x12, %edx
addl %edx, %eax
cmpl $0xfffffec5, %eax # imm = 0xFFFFFEC5
jle 0xbcc1d
leal 0x133(%rax), %ecx
addl $0x13a, %eax # imm = 0x13A
testw %cx, %cx
cmovnsl %ecx, %eax
cwtl
shrl $0x3, %eax
cmpw $0x4f, %ax
jae 0xbcc39
movzwl %ax, %eax
shll $0x4, %eax
leaq 0x3b4c5(%rip), %rcx # 0xf8088
movq 0x8(%rcx,%rax), %rdx
addl %edx, %edi
cmpl $-0x7d, %edi
jle 0xbcc55
cmpl $-0x5f, %edi
jge 0xbcc71
movq (%rcx,%rax), %rax
popq %rcx
retq
leaq 0x33860(%rip), %rdi # 0xf0449
leaq 0x2d5ca(%rip), %rdx # 0xea1ba
leaq 0x38f0e(%rip), %rcx # 0xf5b05
movl $0x43e4, %esi # imm = 0x43E4
jmp 0xbcc8b
leaq 0x33841(%rip), %rdi # 0xf0449
leaq 0x2d5ab(%rip), %rdx # 0xea1ba
leaq 0x38efa(%rip), %rcx # 0xf5b10
movl $0x43e5, %esi # imm = 0x43E5
jmp 0xbcc8b
leaq 0x33825(%rip), %rdi # 0xf0449
leaq 0x2d58f(%rip), %rdx # 0xea1ba
leaq 0x38ee8(%rip), %rcx # 0xf5b1a
movl $0x43ea, %esi # imm = 0x43EA
jmp 0xbcc8b
leaq 0x33809(%rip), %rdi # 0xf0449
leaq 0x2d573(%rip), %rdx # 0xea1ba
leaq 0x38ed7(%rip), %rcx # 0xf5b25
movl $0x43eb, %esi # imm = 0x43EB
jmp 0xbcc8b
leaq 0x337ed(%rip), %rdi # 0xf0449
leaq 0x2d557(%rip), %rdx # 0xea1ba
leaq 0x38ef2(%rip), %rcx # 0xf5b5c
movl $0x43ee, %esi # imm = 0x43EE
jmp 0xbcc8b
leaq 0x337d1(%rip), %rdi # 0xf0449
leaq 0x2d53b(%rip), %rdx # 0xea1ba
leaq 0x38ef2(%rip), %rcx # 0xf5b78
movl $0x43ef, %esi # imm = 0x43EF
xorl %eax, %eax
callq 0x1bf40
| _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl36get_cached_power_for_binary_exponentEi:
push rax
cmp edi, 0FFFFFA23h
jle loc_BCBE2
cmp edi, 5DDh
jge loc_BCC01
xor eax, eax
mov ecx, edi
sub ecx, 0FFFFFFC3h
setl al
neg ecx
imul ecx, 13441h
lea edx, [rcx+3FFFFh]
test ecx, ecx
cmovns edx, ecx
sar edx, 12h
add eax, edx
cmp eax, 0FFFFFEC5h
jle loc_BCC1D
lea ecx, [rax+133h]
add eax, 13Ah
test cx, cx
cmovns eax, ecx
cwde
shr eax, 3
cmp ax, 4Fh ; 'O'
jnb loc_BCC39
movzx eax, ax
shl eax, 4
lea rcx, _ZZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl36get_cached_power_for_binary_exponentEiE13kCachedPowers; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)::kCachedPowers
mov rdx, [rcx+rax+8]
add edi, edx
cmp edi, 0FFFFFF83h
jle loc_BCC55
cmp edi, 0FFFFFFA1h
jge loc_BCC71
mov rax, [rcx+rax]
pop rcx
retn
loc_BCBE2:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aE1500; "e >= -1500"
mov esi, 43E4h
jmp loc_BCC8B
loc_BCC01:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aE1500_0; "e <= 1500"
mov esi, 43E5h
jmp short loc_BCC8B
loc_BCC1D:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aIndex0; "index >= 0"
mov esi, 43EAh
jmp short loc_BCC8B
loc_BCC39:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aStaticCastStdS; "static_cast<std::size_t>(index) < kCach"...
mov esi, 43EBh
jmp short loc_BCC8B
loc_BCC55:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKalphaCachedEE; "kAlpha <= cached.e + e + 64"
mov esi, 43EEh
jmp short loc_BCC8B
loc_BCC71:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKgammaCachedEE; "kGamma >= cached.e + e + 64"
mov esi, 43EFh
loc_BCC8B:
xor eax, eax
call _ggml_abort
| long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(
nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this)
{
int v1; // eax
__int16 v2; // cx
__int16 v3; // ax
unsigned int v4; // eax
long long v5; // rax
int v6; // edi
long long v8; // rsi
if ( (int)this <= -1501 )
{
v8 = 17380LL;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17380LL,
"GGML_ASSERT(%s) failed",
"e >= -1500");
}
else if ( (int)this >= 1501 )
{
v8 = 17381LL;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17381LL,
"GGML_ASSERT(%s) failed",
"e <= 1500");
}
else
{
v1 = -78913 * ((int)this + 61) / 0x40000 + ((int)this < -61);
if ( v1 <= -315 )
{
v8 = 17386LL;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17386LL,
"GGML_ASSERT(%s) failed",
"index >= 0");
}
else
{
v2 = v1 + 307;
v3 = v1 + 314;
if ( v2 >= 0 )
v3 = v2;
v4 = (unsigned int)v3 >> 3;
if ( (unsigned __int16)v4 >= 0x4Fu )
{
v8 = 17387LL;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17387LL,
"GGML_ASSERT(%s) failed",
"static_cast<std::size_t>(index) < kCachedPowers.size()");
}
else
{
v5 = 16 * (unsigned int)(unsigned __int16)v4;
v6 = *(_QWORD *)((char *)&nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)::kCachedPowers
+ v5
+ 8)
+ (_DWORD)this;
if ( v6 <= -125 )
{
v8 = 17390LL;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17390LL,
"GGML_ASSERT(%s) failed",
"kAlpha <= cached.e + e + 64");
}
else
{
if ( v6 < -95 )
return *(_QWORD *)((char *)&nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int)::kCachedPowers
+ v5);
v8 = 17391LL;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
17391LL,
"GGML_ASSERT(%s) failed",
"kGamma >= cached.e + e + 64");
}
}
}
}
return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
v8);
}
| get_cached_power_for_binary_exponent:
PUSH RAX
CMP EDI,0xfffffa23
JLE 0x001bcbe2
CMP EDI,0x5dd
JGE 0x001bcc01
XOR EAX,EAX
MOV ECX,EDI
SUB ECX,-0x3d
SETL AL
NEG ECX
IMUL ECX,ECX,0x13441
LEA EDX,[RCX + 0x3ffff]
TEST ECX,ECX
CMOVNS EDX,ECX
SAR EDX,0x12
ADD EAX,EDX
CMP EAX,0xfffffec5
JLE 0x001bcc1d
LEA ECX,[RAX + 0x133]
ADD EAX,0x13a
TEST CX,CX
CMOVNS EAX,ECX
CWDE
SHR EAX,0x3
CMP AX,0x4f
JNC 0x001bcc39
MOVZX EAX,AX
SHL EAX,0x4
LEA RCX,[0x1f8088]
MOV RDX,qword ptr [RCX + RAX*0x1 + 0x8]
ADD EDI,EDX
CMP EDI,-0x7d
JLE 0x001bcc55
CMP EDI,-0x5f
JGE 0x001bcc71
MOV RAX,qword ptr [RCX + RAX*0x1]
POP RCX
RET
LAB_001bcbe2:
LEA RDI,[0x1f0449]
LEA RDX,[0x1ea1ba]
LEA RCX,[0x1f5b05]
MOV ESI,0x43e4
JMP 0x001bcc8b
LAB_001bcc01:
LEA RDI,[0x1f0449]
LEA RDX,[0x1ea1ba]
LEA RCX,[0x1f5b10]
MOV ESI,0x43e5
JMP 0x001bcc8b
LAB_001bcc1d:
LEA RDI,[0x1f0449]
LEA RDX,[0x1ea1ba]
LEA RCX,[0x1f5b1a]
MOV ESI,0x43ea
JMP 0x001bcc8b
LAB_001bcc39:
LEA RDI,[0x1f0449]
LEA RDX,[0x1ea1ba]
LEA RCX,[0x1f5b25]
MOV ESI,0x43eb
JMP 0x001bcc8b
LAB_001bcc55:
LEA RDI,[0x1f0449]
LEA RDX,[0x1ea1ba]
LEA RCX,[0x1f5b5c]
MOV ESI,0x43ee
JMP 0x001bcc8b
LAB_001bcc71:
LEA RDI,[0x1f0449]
LEA RDX,[0x1ea1ba]
LEA RCX,[0x1f5b78]
MOV ESI,0x43ef
LAB_001bcc8b:
XOR EAX,EAX
CALL 0x0011bf40
|
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int) */
int8
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int param_1)
{
short sVar1;
int iVar2;
ulong uVar3;
short sVar4;
int iVar5;
char *pcVar6;
int8 uVar7;
if (param_1 < -0x5dc) {
pcVar6 = "e >= -1500";
uVar7 = 0x43e4;
}
else if (param_1 < 0x5dd) {
iVar5 = (param_1 + 0x3d) * -0x13441;
iVar2 = iVar5 + 0x3ffff;
if (-1 < iVar5) {
iVar2 = iVar5;
}
iVar2 = (uint)(param_1 < -0x3d) + (iVar2 >> 0x12);
if (iVar2 < -0x13a) {
pcVar6 = "index >= 0";
uVar7 = 0x43ea;
}
else {
sVar1 = (short)iVar2;
sVar4 = sVar1 + 0x133;
sVar1 = sVar1 + 0x13a;
if (-1 < sVar4) {
sVar1 = sVar4;
}
if ((ushort)((uint)(int)sVar1 >> 3) < 0x4f) {
uVar3 = (ulong)(((uint)(int)sVar1 >> 3 & 0xffff) << 4);
iVar2 = param_1 + (int)*(int8 *)
(get_cached_power_for_binary_exponent(int)::kCachedPowers +
uVar3 + 8);
if (iVar2 < -0x7c) {
pcVar6 = "kAlpha <= cached.e + e + 64";
uVar7 = 0x43ee;
}
else {
if (iVar2 < -0x5f) {
return *(int8 *)(get_cached_power_for_binary_exponent(int)::kCachedPowers + uVar3)
;
}
pcVar6 = "kGamma >= cached.e + e + 64";
uVar7 = 0x43ef;
}
}
else {
pcVar6 = "static_cast<std::size_t>(index) < kCachedPowers.size()";
uVar7 = 0x43eb;
}
}
}
else {
pcVar6 = "e <= 1500";
uVar7 = 0x43e5;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar7,
"GGML_ASSERT(%s) failed",pcVar6);
}
| |
43,295 | client_game::deinit() | untodesu[P]voxelius/game/client/game.cc | void client_game::deinit(void)
{
voxel_sounds::deinit();
experiments::deinit();
session::deinit();
if(globals::sound_ctx) {
sound::deinit();
}
hotbar::deinit();
main_menu::deinit();
play_menu::deinit();
bother::deinit();
client_chat::deinit();
background::deinit();
crosshair::deinit();
delete globals::dimension;
globals::player = entt::null;
globals::dimension = nullptr;
item_registry::purge();
voxel_registry::purge();
voxel_atlas::destroy();
glDeleteRenderbuffers(1, &globals::world_fbo_depth);
glDeleteTextures(1, &globals::world_fbo_color);
glDeleteFramebuffers(1, &globals::world_fbo);
outline::deinit();
chunk_renderer::deinit();
chunk_mesher::deinit();
enet_host_destroy(globals::client_host);
bin_unscii8 = nullptr;
bin_unscii16 = nullptr;
} | O0 | cpp | client_game::deinit():
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
callq 0x13e640
callq 0x8c980
callq 0x11bc00
leaq 0x467062(%rip), %rax # 0x50e280
cmpq $0x0, (%rax)
je 0xa7229
callq 0x133380
callq 0xc9d10
callq 0xde5a0
callq 0xe9560
callq 0x31a70
callq 0x58130
callq 0x30f70
callq 0x89030
leaq 0x466fdd(%rip), %rax # 0x50e230
movq (%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0xa726a
movq -0x28(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x2c4ad2(%rip), %rdi # 0x36bd43
callq 0x44b70
movl %eax, %ecx
leaq 0x466fb9(%rip), %rax # 0x50e238
movl %ecx, (%rax)
leaq 0x466fa8(%rip), %rax # 0x50e230
movq $0x0, (%rax)
callq 0x15ac90
callq 0x17c690
callq 0x139630
movl $0x1, %edi
leaq 0x466f6a(%rip), %rsi # 0x50e214
leaq 0x46a61f(%rip), %rax # 0x5118d0
callq *(%rax)
movl $0x1, %edi
leaq 0x466f51(%rip), %rsi # 0x50e210
leaq 0x46a62a(%rip), %rax # 0x5118f0
callq *(%rax)
movl $0x1, %edi
leaq 0x466f38(%rip), %rsi # 0x50e20c
leaq 0x46a5dd(%rip), %rax # 0x5118b8
callq *(%rax)
callq 0xe86a0
callq 0x80050
callq 0x622e0
leaq 0x466f35(%rip), %rax # 0x50e228
movq (%rax), %rdi
callq 0x33d430
leaq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xa9000
leaq 0x466ce1(%rip), %rdi # 0x50dff0
leaq -0x10(%rbp), %rsi
callq 0xa8bc0
leaq -0x10(%rbp), %rdi
callq 0xa8ba0
leaq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xa9000
leaq 0x466cab(%rip), %rdi # 0x50dfe0
leaq -0x20(%rbp), %rsi
callq 0xa8bc0
leaq -0x20(%rbp), %rdi
callq 0xa8ba0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| _ZN11client_game6deinitEv:
push rbp
mov rbp, rsp
sub rsp, 30h
call _ZN12voxel_sounds6deinitEv; voxel_sounds::deinit(void)
call _ZN11experiments6deinitEv; experiments::deinit(void)
call _ZN7session6deinitEv; session::deinit(void)
lea rax, _ZN7globals9sound_ctxE; globals::sound_ctx
cmp qword ptr [rax], 0
jz short loc_A7229
call _ZN5sound6deinitEv; sound::deinit(void)
loc_A7229:
call _ZN6hotbar6deinitEv; hotbar::deinit(void)
call _ZN9main_menu6deinitEv; main_menu::deinit(void)
call _ZN9play_menu6deinitEv; play_menu::deinit(void)
call _ZN6bother6deinitEv; bother::deinit(void)
call _ZN11client_chat6deinitEv; client_chat::deinit(void)
call _ZN10background6deinitEv; background::deinit(void)
call _ZN9crosshair6deinitEv; crosshair::deinit(void)
lea rax, _ZN7globals9dimensionE; globals::dimension
mov rax, [rax]
mov [rbp+var_28], rax
cmp rax, 0
jz short loc_A726A
mov rdi, [rbp+var_28]
mov rax, [rdi]
call qword ptr [rax+8]
loc_A726A:
lea rdi, _ZN4entt4nullE; this
call _ZNK4entt6null_tcvT_INS_6entityEEEv; entt::null_t::operator entt::entity<entt::entity>(void)
mov ecx, eax
lea rax, _ZN7globals6playerE; globals::player
mov [rax], ecx
lea rax, _ZN7globals9dimensionE; globals::dimension
mov qword ptr [rax], 0
call _ZN13item_registry5purgeEv; item_registry::purge(void)
call _ZN14voxel_registry5purgeEv; voxel_registry::purge(void)
call _ZN11voxel_atlas7destroyEv; voxel_atlas::destroy(void)
mov edi, 1
lea rsi, _ZN7globals15world_fbo_depthE; globals::world_fbo_depth
lea rax, glad_glDeleteRenderbuffers
call qword ptr [rax]
mov edi, 1
lea rsi, _ZN7globals15world_fbo_colorE; globals::world_fbo_color
lea rax, glad_glDeleteTextures
call qword ptr [rax]
mov edi, (offset dword_0+1); this
lea rsi, _ZN7globals9world_fboE; globals::world_fbo
lea rax, glad_glDeleteFramebuffers
call qword ptr [rax]
call _ZN7outline6deinitEv; outline::deinit(void)
call _ZN14chunk_renderer6deinitEv; chunk_renderer::deinit(void)
call _ZN12chunk_mesher6deinitEv; chunk_mesher::deinit(void)
lea rax, _ZN7globals11client_hostE; globals::client_host
mov rdi, [rax]
call enet_host_destroy
lea rdi, [rbp+var_10]
xor eax, eax
mov esi, eax
call _ZNSt10shared_ptrIK7BinFileEC2EDn; std::shared_ptr<BinFile const>::shared_ptr(decltype(nullptr))
lea rdi, _ZL11bin_unscii8; bin_unscii8
lea rsi, [rbp+var_10]
call _ZNSt10shared_ptrIK7BinFileEaSEOS2_; std::shared_ptr<BinFile const>::operator=(std::shared_ptr<BinFile const>&&)
lea rdi, [rbp+var_10]; void *
call _ZNSt10shared_ptrIK7BinFileED2Ev; std::shared_ptr<BinFile const>::~shared_ptr()
lea rdi, [rbp+var_20]
xor eax, eax
mov esi, eax
call _ZNSt10shared_ptrIK7BinFileEC2EDn; std::shared_ptr<BinFile const>::shared_ptr(decltype(nullptr))
lea rdi, _ZL12bin_unscii16; bin_unscii16
lea rsi, [rbp+var_20]
call _ZNSt10shared_ptrIK7BinFileEaSEOS2_; std::shared_ptr<BinFile const>::operator=(std::shared_ptr<BinFile const>&&)
lea rdi, [rbp+var_20]; void *
call _ZNSt10shared_ptrIK7BinFileED2Ev; std::shared_ptr<BinFile const>::~shared_ptr()
add rsp, 30h
pop rbp
retn
| void client_game::deinit(client_game *this)
{
_BYTE v1[16]; // [rsp+10h] [rbp-20h] BYREF
_BYTE v2[16]; // [rsp+20h] [rbp-10h] BYREF
voxel_sounds::deinit(this);
experiments::deinit(this);
session::deinit(this);
if ( globals::sound_ctx[0] )
sound::deinit(this);
hotbar::deinit(this);
main_menu::deinit(this);
play_menu::deinit(this);
bother::deinit(this);
client_chat::deinit(this);
background::deinit(this);
crosshair::deinit(this);
if ( globals::dimension )
(*(void ( **)(_QWORD))(*(_QWORD *)globals::dimension + 8LL))(globals::dimension);
globals::player = entt::null_t::operator entt::entity<entt::entity>();
globals::dimension = 0LL;
item_registry::purge((item_registry *)&entt::null);
voxel_registry::purge((voxel_registry *)&entt::null);
voxel_atlas::destroy((voxel_atlas *)&entt::null);
glad_glDeleteRenderbuffers(1LL, &globals::world_fbo_depth);
glad_glDeleteTextures(1LL, &globals::world_fbo_color);
glad_glDeleteFramebuffers((char *)&dword_0 + 1, &globals::world_fbo);
outline::deinit((outline *)((char *)&dword_0 + 1));
chunk_renderer::deinit((chunk_renderer *)((char *)&dword_0 + 1));
chunk_mesher::deinit((chunk_mesher *)((char *)&dword_0 + 1));
enet_host_destroy(globals::client_host);
std::shared_ptr<BinFile const>::shared_ptr(v2, 0LL);
std::shared_ptr<BinFile const>::operator=(&bin_unscii8, v2);
std::shared_ptr<BinFile const>::~shared_ptr(v2);
std::shared_ptr<BinFile const>::shared_ptr(v1, 0LL);
std::shared_ptr<BinFile const>::operator=(&bin_unscii16, v1);
std::shared_ptr<BinFile const>::~shared_ptr(v1);
}
| deinit:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
CALL 0x0023e640
CALL 0x0018c980
CALL 0x0021bc00
LEA RAX,[0x60e280]
CMP qword ptr [RAX],0x0
JZ 0x001a7229
CALL 0x00233380
LAB_001a7229:
CALL 0x001c9d10
CALL 0x001de5a0
CALL 0x001e9560
CALL 0x00131a70
CALL 0x00158130
CALL 0x00130f70
CALL 0x00189030
LEA RAX,[0x60e230]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,0x0
JZ 0x001a726a
MOV RDI,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_001a726a:
LEA RDI,[0x46bd43]
CALL 0x00144b70
MOV ECX,EAX
LEA RAX,[0x60e238]
MOV dword ptr [RAX],ECX
LEA RAX,[0x60e230]
MOV qword ptr [RAX],0x0
CALL 0x0025ac90
CALL 0x0027c690
CALL 0x00239630
MOV EDI,0x1
LEA RSI,[0x60e214]
LEA RAX,[0x6118d0]
CALL qword ptr [RAX]
MOV EDI,0x1
LEA RSI,[0x60e210]
LEA RAX,[0x6118f0]
CALL qword ptr [RAX]
MOV EDI,0x1
LEA RSI,[0x60e20c]
LEA RAX,[0x6118b8]
CALL qword ptr [RAX]
CALL 0x001e86a0
CALL 0x00180050
CALL 0x001622e0
LEA RAX,[0x60e228]
MOV RDI,qword ptr [RAX]
CALL 0x0043d430
LEA RDI,[RBP + -0x10]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x001a9000
LEA RDI,[0x60dff0]
LEA RSI,[RBP + -0x10]
CALL 0x001a8bc0
LEA RDI,[RBP + -0x10]
CALL 0x001a8ba0
LEA RDI,[RBP + -0x20]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x001a9000
LEA RDI,[0x60dfe0]
LEA RSI,[RBP + -0x20]
CALL 0x001a8bc0
LEA RDI,[RBP + -0x20]
CALL 0x001a8ba0
ADD RSP,0x30
POP RBP
RET
|
/* client_game::deinit() */
void client_game::deinit(void)
{
shared_ptr local_28 [16];
shared_ptr local_18 [16];
voxel_sounds::deinit();
experiments::deinit();
session::deinit();
if (globals::sound_ctx != 0) {
sound::deinit();
}
hotbar::deinit();
main_menu::deinit();
play_menu::deinit();
bother::deinit();
client_chat::deinit();
background::deinit();
crosshair::deinit();
if (globals::dimension != (long *)0x0) {
(**(code **)(*globals::dimension + 8))();
}
globals::player = entt::null_t::operator_cast_to_entity((null_t *)&entt::null);
globals::dimension = (long *)0x0;
item_registry::purge();
voxel_registry::purge();
voxel_atlas::destroy();
(*glad_glDeleteRenderbuffers)(1,&globals::world_fbo_depth);
(*glad_glDeleteTextures)(1,&globals::world_fbo_color);
(*glad_glDeleteFramebuffers)(1,&globals::world_fbo);
outline::deinit();
chunk_renderer::deinit();
chunk_mesher::deinit();
enet_host_destroy(globals::client_host);
std::shared_ptr<BinFile_const>::shared_ptr((_func_decltype_nullptr *)local_18);
std::shared_ptr<BinFile_const>::operator=((shared_ptr<BinFile_const> *)bin_unscii8,local_18);
std::shared_ptr<BinFile_const>::~shared_ptr((shared_ptr<BinFile_const> *)local_18);
std::shared_ptr<BinFile_const>::shared_ptr((_func_decltype_nullptr *)local_28);
std::shared_ptr<BinFile_const>::operator=((shared_ptr<BinFile_const> *)bin_unscii16,local_28);
std::shared_ptr<BinFile_const>::~shared_ptr((shared_ptr<BinFile_const> *)local_28);
return;
}
| |
43,296 | process_tool_call(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&) | llama.cpp/common/chat.cpp | static common_chat_tool_call process_tool_call(const json & tool_call) {
const auto & arguments = tool_call.at("arguments");
return {
/* .name = */ tool_call.at("name"),
/* .arguments = */ arguments.is_string() ? arguments.get<std::string>() : arguments.dump(),
/* .id = */ tool_call.contains("id") ? tool_call.at("id") : "",
};
} | O3 | cpp | process_tool_call(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&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x74c5b(%rip), %rsi # 0x11fabc
movq %r14, %rdi
callq 0xafc1c
movq %rax, %r15
leaq 0x7700f(%rip), %rsi # 0x121e82
movq %r14, %rdi
callq 0xaf274
movq %rbx, %rdi
movq %rax, %rsi
callq 0xbe912
leaq 0x20(%rbx), %rdi
cmpb $0x3, (%r15)
jne 0xaae9a
movq %r15, %rsi
callq 0xbe912
jmp 0xaaeb2
movq %r15, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
movl $0x20, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xaee5a
leaq 0x73d40(%rip), %rsi # 0x11ebf9
movq %r14, %rdi
callq 0xafde0
testb %al, %al
je 0xaaee1
leaq 0x73d2d(%rip), %rsi # 0x11ebf9
movq %r14, %rdi
callq 0xafe42
movq %rsp, %rdi
movq %rax, %rsi
callq 0x888f8
jmp 0xaaef0
leaq 0x6748a(%rip), %rsi # 0x112372
movq %rsp, %rdi
callq 0xce5c2
leaq 0x40(%rbx), %rdi
movq %rsp, %rsi
callq 0xbe912
movq %rsp, %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x846aa
movq %rbx, %rdi
callq 0x88dc4
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rsp, %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x846aa
movq %r15, %rdi
callq 0x88dc4
jmp 0xaaf3d
movq %rax, %r14
jmp 0xaaf55
movq %rax, %r14
movq 0x20(%rbx), %rdi
leaq 0x30(%rbx), %rax
cmpq %rax, %rdi
je 0xaaf55
movq (%rax), %rsi
incq %rsi
callq 0x20170
movq (%rbx), %rdi
addq $0x10, %rbx
cmpq %rbx, %rdi
je 0xaaf6c
movq (%rbx), %rsi
incq %rsi
callq 0x20170
movq %r14, %rdi
callq 0x20ae0
| _ZL17process_tool_callRKN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEE:
push r15
push r14
push rbx
sub rsp, 10h
mov r14, rsi
mov rbx, rdi
lea rsi, aKeywordArgumen+9; "arguments"
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_
mov r15, rax
lea rsi, aNamespacedSetO+2Fh; "name"
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_
mov rdi, rbx
mov rsi, rax
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
lea rdi, [rbx+20h]
cmp byte ptr [r15], 3
jnz short loc_AAE9A
mov rsi, r15
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
jmp short loc_AAEB2
loc_AAE9A:
mov rsi, r15
mov edx, 0FFFFFFFFh
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)
loc_AAEB2:
lea rsi, aToolCallId+0Ah; "id"
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_
test al, al
jz short loc_AAEE1
lea rsi, aToolCallId+0Ah; "id"
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_
mov rdi, rsp
mov rsi, rax
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
jmp short loc_AAEF0
loc_AAEE1:
lea rsi, aTarget+9; ""
mov rdi, rsp
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRA1_KcA1_cTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SK_EE5valueEiE4typeELi0EEEOT_
loc_AAEF0:
lea rdi, [rbx+40h]
mov rsi, rsp
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
mov rbx, rsp
mov rdi, rbx
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
add rsp, 10h
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov r15, rsp
mov rdi, r15
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
jmp short loc_AAF3D
mov r14, rax
jmp short loc_AAF55
mov r14, rax
loc_AAF3D:
mov rdi, [rbx+20h]; void *
lea rax, [rbx+30h]
cmp rdi, rax
jz short loc_AAF55
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_AAF55:
mov rdi, [rbx]; void *
add rbx, 10h
cmp rdi, rbx
jz short loc_AAF6C
mov rsi, [rbx]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_AAF6C:
mov rdi, r14
call __Unwind_Resume
| long long process_tool_call(long long a1, long long a2)
{
_BYTE *v3; // r15
long long v4; // rax
long long v5; // rdi
unsigned __int8 *v6; // rax
unsigned __int8 v8[40]; // [rsp+0h] [rbp-28h] BYREF
v3 = (_BYTE *)ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_(
a2,
"arguments");
v4 = ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_(
a2,
"name");
ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE(
a1,
v4);
v5 = a1 + 32;
if ( *v3 == 3 )
ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE(
v5,
v3);
else
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::dump(
v5,
(_DWORD)v3,
-1,
32,
0,
0);
if ( (unsigned __int8)ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_(
a2,
"id") )
{
v6 = (unsigned __int8 *)ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_(
a2,
"id");
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
v8,
v6);
}
else
{
ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRA1_KcA1_cTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SK_EE5valueEiE4typeELi0EEEOT_(
v8,
"");
}
ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE(
a1 + 64,
v8);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v8);
return nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v8);
}
| process_tool_call:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV R14,RSI
MOV RBX,RDI
LEA RSI,[0x21fabc]
MOV RDI,R14
CALL 0x001afc1c
MOV R15,RAX
LEA RSI,[0x221e82]
MOV RDI,R14
CALL 0x001af274
MOV RDI,RBX
MOV RSI,RAX
CALL 0x001be912
LEA RDI,[RBX + 0x20]
CMP byte ptr [R15],0x3
JNZ 0x001aae9a
LAB_001aae90:
MOV RSI,R15
CALL 0x001be912
JMP 0x001aaeb2
LAB_001aae9a:
MOV RSI,R15
MOV EDX,0xffffffff
MOV ECX,0x20
XOR R8D,R8D
XOR R9D,R9D
CALL 0x001aee5a
LAB_001aaeb2:
LEA RSI,[0x21ebf9]
MOV RDI,R14
CALL 0x001afde0
TEST AL,AL
JZ 0x001aaee1
LEA RSI,[0x21ebf9]
MOV RDI,R14
CALL 0x001afe42
MOV RDI,RSP
MOV RSI,RAX
CALL 0x001888f8
JMP 0x001aaef0
LAB_001aaee1:
LEA RSI,[0x212372]
MOV RDI,RSP
CALL 0x001ce5c2
LAB_001aaef0:
LEA RDI,[RBX + 0x40]
LAB_001aaef4:
MOV RSI,RSP
CALL 0x001be912
LAB_001aaefc:
MOV RBX,RSP
MOV RDI,RBX
XOR ESI,ESI
CALL 0x001846aa
MOV RDI,RBX
CALL 0x00188dc4
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
/* process_tool_call(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&) */
void process_tool_call(basic_json *param_1)
{
char *pcVar1;
int8 uVar2;
basic_json *pbVar3;
char cVar4;
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>
abStack_28 [16];
pcVar1 = (char *)_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_
();
uVar2 = _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_
();
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
(param_1,uVar2);
if (*pcVar1 == '\x03') {
/* try { // try from 001aae90 to 001aaeb1 has its CatchHandler @ 001aaf35 */
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
(param_1 + 0x20,pcVar1);
}
else {
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(param_1 + 0x20,pcVar1,0xffffffff,0x20,0,0);
}
/* try { // try from 001aaeb2 to 001aaeef has its CatchHandler @ 001aaf3a */
cVar4 = _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_
();
if (cVar4 == '\0') {
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRA1_KcA1_cTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SK_EE5valueEiE4typeELi0EEEOT_
(abStack_28,"");
}
else {
pbVar3 = (basic_json *)
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_
();
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>
::basic_json(abStack_28,pbVar3);
}
/* try { // try from 001aaef4 to 001aaefb has its CatchHandler @ 001aaf1b */
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
(param_1 + 0x40,abStack_28);
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(SUB81(abStack_28,0));
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>
::data::~data((data *)abStack_28);
return;
}
| |
43,297 | common_arg::get_value_from_env(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) | monkey531[P]llama/common/arg.cpp | bool common_arg::get_value_from_env(std::string & output) {
if (env == nullptr) return false;
char * value = std::getenv(env);
if (value) {
output = value;
return true;
}
return false;
} | O1 | cpp | common_arg::get_value_from_env(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&):
movq 0x88(%rdi), %rdi
testq %rdi, %rdi
je 0x5432b
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
callq 0x1deb0
movq %rax, %r14
testq %rax, %rax
setne %al
je 0x54325
movq 0x8(%rbx), %r15
movq %r14, %rdi
callq 0x1d4f0
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x1e310
movb $0x1, %al
popq %rbx
popq %r14
popq %r15
retq
xorl %eax, %eax
retq
| _ZN10common_arg18get_value_from_envERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
mov rdi, [rdi+88h]
test rdi, rdi
jz short loc_5432B
push r15
push r14
push rbx
mov rbx, rsi
call _getenv
mov r14, rax
test rax, rax
setnz al
jz short loc_54325
mov r15, [rbx+8]
mov rdi, r14
call _strlen
mov rdi, rbx
xor esi, esi
mov rdx, r15
mov rcx, r14
mov r8, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
mov al, 1
loc_54325:
pop rbx
pop r14
pop r15
retn
loc_5432B:
xor eax, eax
retn
| bool common_arg::get_value_from_env(long long a1, long long a2)
{
long long v2; // r14
bool result; // al
long long v4; // r15
long long v5; // rax
if ( !*(_QWORD *)(a1 + 136) )
return 0;
v2 = getenv();
result = v2 != 0;
if ( v2 )
{
v4 = *(_QWORD *)(a2 + 8);
v5 = strlen(v2);
std::string::_M_replace(a2, 0LL, v4, v2, v5);
return 1;
}
return result;
}
| get_value_from_env:
MOV RDI,qword ptr [RDI + 0x88]
TEST RDI,RDI
JZ 0x0015432b
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RSI
CALL 0x0011deb0
MOV R14,RAX
TEST RAX,RAX
SETNZ AL
JZ 0x00154325
MOV R15,qword ptr [RBX + 0x8]
MOV RDI,R14
CALL 0x0011d4f0
MOV RDI,RBX
XOR ESI,ESI
MOV RDX,R15
MOV RCX,R14
MOV R8,RAX
CALL 0x0011e310
MOV AL,0x1
LAB_00154325:
POP RBX
POP R14
POP R15
RET
LAB_0015432b:
XOR EAX,EAX
RET
|
/* common_arg::get_value_from_env(std::__cxx11::string&) */
bool __thiscall common_arg::get_value_from_env(common_arg *this,string *param_1)
{
char *pcVar1;
char *__s;
if (*(char **)(this + 0x88) != (char *)0x0) {
__s = getenv(*(char **)(this + 0x88));
if (__s != (char *)0x0) {
pcVar1 = *(char **)(param_1 + 8);
strlen(__s);
std::__cxx11::string::_M_replace((ulong)param_1,0,pcVar1,(ulong)__s);
}
return __s != (char *)0x0;
}
return false;
}
| |
43,298 | common_log_entry::print(_IO_FILE*) const | monkey531[P]llama/common/log.cpp | void print(FILE * file = nullptr) const {
FILE * fcur = file;
if (!fcur) {
// stderr displays DBG messages only when their verbosity level is not higher than the threshold
// these messages will still be logged to a file
if (level == GGML_LOG_LEVEL_DEBUG && common_log_verbosity_thold < LOG_DEFAULT_DEBUG) {
return;
}
fcur = stdout;
if (level != GGML_LOG_LEVEL_NONE) {
fcur = stderr;
}
}
if (level != GGML_LOG_LEVEL_NONE && level != GGML_LOG_LEVEL_CONT && prefix) {
if (timestamp) {
// [M.s.ms.us]
fprintf(fcur, "%s%d.%02d.%03d.%03d%s ",
g_col[COMMON_LOG_COL_BLUE],
(int) (timestamp / 1000000 / 60),
(int) (timestamp / 1000000 % 60),
(int) (timestamp / 1000 % 1000),
(int) (timestamp % 1000),
g_col[COMMON_LOG_COL_DEFAULT]);
}
switch (level) {
case GGML_LOG_LEVEL_INFO: fprintf(fcur, "%sI %s", g_col[COMMON_LOG_COL_GREEN], g_col[COMMON_LOG_COL_DEFAULT]); break;
case GGML_LOG_LEVEL_WARN: fprintf(fcur, "%sW %s", g_col[COMMON_LOG_COL_MAGENTA], "" ); break;
case GGML_LOG_LEVEL_ERROR: fprintf(fcur, "%sE %s", g_col[COMMON_LOG_COL_RED], "" ); break;
case GGML_LOG_LEVEL_DEBUG: fprintf(fcur, "%sD %s", g_col[COMMON_LOG_COL_YELLOW], "" ); break;
default:
break;
}
}
fprintf(fcur, "%s", msg.data());
if (level == GGML_LOG_LEVEL_WARN || level == GGML_LOG_LEVEL_ERROR || level == GGML_LOG_LEVEL_DEBUG) {
fprintf(fcur, "%s", g_col[COMMON_LOG_COL_DEFAULT]);
}
fflush(fcur);
} | O0 | cpp | common_log_entry::print(_IO_FILE*) const:
subq $0x98, %rsp
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x80(%rsp)
cmpq $0x0, 0x80(%rsp)
jne 0x1be8ba
movq 0x78(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x1be88a
leaq 0xe2d38(%rip), %rax # 0x2a15b8
cmpl $0x1, (%rax)
jge 0x1be88a
jmp 0x1bebb6
movq 0x78(%rsp), %rax
movq 0xe16a2(%rip), %rcx # 0x29ff38
movq (%rcx), %rcx
movq %rcx, 0x80(%rsp)
cmpl $0x0, (%rax)
je 0x1be8b8
movq 0xe1693(%rip), %rax # 0x29ff40
movq (%rax), %rax
movq %rax, 0x80(%rsp)
jmp 0x1be8ba
movq 0x78(%rsp), %rax
cmpl $0x0, (%rax)
je 0x1beb27
movq 0x78(%rsp), %rax
cmpl $0x5, (%rax)
je 0x1beb27
movq 0x78(%rsp), %rax
testb $0x1, 0x4(%rax)
je 0x1beb27
movq 0x78(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1be9e8
movq 0x80(%rsp), %rax
movq %rax, 0x58(%rsp)
leaq 0xe2cb7(%rip), %rdi # 0x2a15c0
movl $0x5, %esi
callq 0x1bf1e0
movq %rax, %rcx
movq 0x78(%rsp), %rax
movq (%rcx), %rcx
movq %rcx, 0x60(%rsp)
movq 0x8(%rax), %rax
movl $0xf4240, %ecx # imm = 0xF4240
cqto
idivq %rcx
movl $0x3c, %ecx
cqto
idivq %rcx
movq %rax, %rcx
movq 0x78(%rsp), %rax
movl %ecx, 0x68(%rsp)
movq 0x8(%rax), %rax
movl $0xf4240, %ecx # imm = 0xF4240
cqto
idivq %rcx
movl $0x3c, %ecx
cqto
idivq %rcx
movq 0x78(%rsp), %rax
movl %edx, %ecx
movl %ecx, 0x6c(%rsp)
movq 0x8(%rax), %rax
movl $0x3e8, %ecx # imm = 0x3E8
cqto
idivq %rcx
movl $0x3e8, %ecx # imm = 0x3E8
cqto
idivq %rcx
movq 0x78(%rsp), %rax
movl %edx, %ecx
movl %ecx, 0x70(%rsp)
movq 0x8(%rax), %rax
movl $0x3e8, %ecx # imm = 0x3E8
cqto
idivq %rcx
movl %edx, %eax
movl %eax, 0x74(%rsp)
leaq 0xe2c18(%rip), %rdi # 0x2a15c0
xorl %eax, %eax
movl %eax, %esi
callq 0x1bf1e0
movq 0x58(%rsp), %rdi
movq 0x60(%rsp), %rdx
movl 0x68(%rsp), %ecx
movl 0x6c(%rsp), %r8d
movl 0x70(%rsp), %r9d
movl 0x74(%rsp), %r10d
movq (%rax), %rax
leaq 0x54df4(%rip), %rsi # 0x2137cc
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x59320
movq 0x78(%rsp), %rax
movl (%rax), %eax
decl %eax
movl %eax, %ecx
movq %rcx, 0x50(%rsp)
subl $0x3, %eax
ja 0x1beb23
movq 0x50(%rsp), %rax
leaq 0x54daf(%rip), %rcx # 0x2137bc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x80(%rsp), %rax
movq %rax, 0x40(%rsp)
leaq 0xe2b96(%rip), %rdi # 0x2a15c0
movl $0x3, %esi
callq 0x1bf1e0
movq (%rax), %rax
movq %rax, 0x48(%rsp)
leaq 0xe2b7d(%rip), %rdi # 0x2a15c0
xorl %eax, %eax
movl %eax, %esi
callq 0x1bf1e0
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rdx
movq (%rax), %rcx
leaq 0x54d83(%rip), %rsi # 0x2137e3
movb $0x0, %al
callq 0x59320
jmp 0x1beb25
movq 0x80(%rsp), %rax
movq %rax, 0x38(%rsp)
leaq 0xe2b40(%rip), %rdi # 0x2a15c0
movl $0x6, %esi
callq 0x1bf1e0
movq 0x38(%rsp), %rdi
movq (%rax), %rdx
leaq 0x54d51(%rip), %rsi # 0x2137ea
leaq 0x455e1(%rip), %rcx # 0x204081
movb $0x0, %al
callq 0x59320
jmp 0x1beb25
movq 0x80(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq 0xe2b03(%rip), %rdi # 0x2a15c0
movl $0x2, %esi
callq 0x1bf1e0
movq 0x30(%rsp), %rdi
movq (%rax), %rdx
leaq 0x54d1b(%rip), %rsi # 0x2137f1
leaq 0x455a4(%rip), %rcx # 0x204081
movb $0x0, %al
callq 0x59320
jmp 0x1beb25
movq 0x80(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0xe2ac6(%rip), %rdi # 0x2a15c0
movl $0x4, %esi
callq 0x1bf1e0
movq 0x28(%rsp), %rdi
movq (%rax), %rdx
leaq 0x54ce5(%rip), %rsi # 0x2137f8
leaq 0x45567(%rip), %rcx # 0x204081
movb $0x0, %al
callq 0x59320
jmp 0x1beb25
jmp 0x1beb25
jmp 0x1beb27
movq 0x78(%rsp), %rdi
movq 0x80(%rsp), %rax
movq %rax, 0x20(%rsp)
addq $0x10, %rdi
callq 0x1bf200
movq 0x20(%rsp), %rdi
movq %rax, %rdx
leaq 0x4a48f(%rip), %rsi # 0x208fe0
movb $0x0, %al
callq 0x59320
movq 0x78(%rsp), %rax
cmpl $0x3, (%rax)
je 0x1beb76
movq 0x78(%rsp), %rax
cmpl $0x4, (%rax)
je 0x1beb76
movq 0x78(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x1beba9
movq 0x80(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0xe2a36(%rip), %rdi # 0x2a15c0
xorl %eax, %eax
movl %eax, %esi
callq 0x1bf1e0
movq 0x18(%rsp), %rdi
movq (%rax), %rdx
leaq 0x4a43e(%rip), %rsi # 0x208fe0
movb $0x0, %al
callq 0x59320
movq 0x80(%rsp), %rdi
callq 0x59890
addq $0x98, %rsp
retq
nop
| _ZNK16common_log_entry5printEP8_IO_FILE:
sub rsp, 98h
mov [rsp+98h+var_8], rdi
mov [rsp+98h+var_10], rsi
mov rax, [rsp+98h+var_8]
mov [rsp+98h+var_20], rax
mov rax, [rsp+98h+var_10]
mov [rsp+98h+var_18], rax
cmp [rsp+98h+var_18], 0
jnz short loc_1BE8BA
mov rax, [rsp+98h+var_20]
cmp dword ptr [rax], 1
jnz short loc_1BE88A
lea rax, common_log_verbosity_thold
cmp dword ptr [rax], 1
jge short loc_1BE88A
jmp loc_1BEBB6
loc_1BE88A:
mov rax, [rsp+98h+var_20]
mov rcx, cs:stdout_ptr
mov rcx, [rcx]
mov [rsp+98h+var_18], rcx
cmp dword ptr [rax], 0
jz short loc_1BE8B8
mov rax, cs:stderr_ptr
mov rax, [rax]
mov [rsp+98h+var_18], rax
loc_1BE8B8:
jmp short $+2
loc_1BE8BA:
mov rax, [rsp+98h+var_20]
cmp dword ptr [rax], 0
jz loc_1BEB27
mov rax, [rsp+98h+var_20]
cmp dword ptr [rax], 5
jz loc_1BEB27
mov rax, [rsp+98h+var_20]
test byte ptr [rax+4], 1
jz loc_1BEB27
mov rax, [rsp+98h+var_20]
cmp qword ptr [rax+8], 0
jz loc_1BE9E8
mov rax, [rsp+98h+var_18]
mov [rsp+98h+var_40], rax
lea rdi, _ZL5g_col; g_col
mov esi, 5
call _ZNSt6vectorIPKcSaIS1_EEixEm; std::vector<char const*>::operator[](ulong)
mov rcx, rax
mov rax, [rsp+98h+var_20]
mov rcx, [rcx]
mov [rsp+98h+var_38], rcx
mov rax, [rax+8]
mov ecx, 0F4240h
cqo
idiv rcx
mov ecx, 3Ch ; '<'
cqo
idiv rcx
mov rcx, rax
mov rax, [rsp+98h+var_20]
mov [rsp+98h+var_30], ecx
mov rax, [rax+8]
mov ecx, 0F4240h
cqo
idiv rcx
mov ecx, 3Ch ; '<'
cqo
idiv rcx
mov rax, [rsp+98h+var_20]
mov ecx, edx
mov [rsp+98h+var_2C], ecx
mov rax, [rax+8]
mov ecx, 3E8h
cqo
idiv rcx
mov ecx, 3E8h
cqo
idiv rcx
mov rax, [rsp+98h+var_20]
mov ecx, edx
mov [rsp+98h+var_28], ecx
mov rax, [rax+8]
mov ecx, 3E8h
cqo
idiv rcx
mov eax, edx
mov [rsp+98h+var_24], eax
lea rdi, _ZL5g_col; g_col
xor eax, eax
mov esi, eax
call _ZNSt6vectorIPKcSaIS1_EEixEm; std::vector<char const*>::operator[](ulong)
mov rdi, [rsp+98h+var_40]
mov rdx, [rsp+98h+var_38]
mov ecx, [rsp+98h+var_30]
mov r8d, [rsp+98h+var_2C]
mov r9d, [rsp+98h+var_28]
mov r10d, [rsp+98h+var_24]
mov rax, [rax]
lea rsi, aSD02d03d03dS; "%s%d.%02d.%03d.%03d%s "
mov [rsp+98h+var_98], r10d
mov [rsp+98h+var_90], rax
mov al, 0
call _fprintf
loc_1BE9E8:
mov rax, [rsp+98h+var_20]
mov eax, [rax]
dec eax; switch 4 cases
mov ecx, eax
mov [rsp+98h+var_48], rcx
sub eax, 3
ja def_1BEA14; jumptable 00000000001BEA14 default case
mov rax, [rsp+98h+var_48]
lea rcx, jpt_1BEA14
movsxd rax, ds:(jpt_1BEA14 - 2137BCh)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_1BEA16:
mov rax, [rsp+98h+var_18]; jumptable 00000000001BEA14 case 2
mov [rsp+98h+var_58], rax
lea rdi, _ZL5g_col; g_col
mov esi, 3
call _ZNSt6vectorIPKcSaIS1_EEixEm; std::vector<char const*>::operator[](ulong)
mov rax, [rax]
mov [rsp+98h+var_50], rax
lea rdi, _ZL5g_col; g_col
xor eax, eax
mov esi, eax
call _ZNSt6vectorIPKcSaIS1_EEixEm; std::vector<char const*>::operator[](ulong)
mov rdi, [rsp+98h+var_58]
mov rdx, [rsp+98h+var_50]
mov rcx, [rax]
lea rsi, aSiS; "%sI %s"
mov al, 0
call _fprintf
jmp loc_1BEB25
loc_1BEA6C:
mov rax, [rsp+98h+var_18]; jumptable 00000000001BEA14 case 3
mov [rsp+98h+var_60], rax
lea rdi, _ZL5g_col; g_col
mov esi, 6
call _ZNSt6vectorIPKcSaIS1_EEixEm; std::vector<char const*>::operator[](ulong)
mov rdi, [rsp+98h+var_60]
mov rdx, [rax]
lea rsi, aSwS; "%sW %s"
lea rcx, aExampleSpecifi+1Fh; ""
mov al, 0
call _fprintf
jmp short loc_1BEB25
loc_1BEAA9:
mov rax, [rsp+98h+var_18]; jumptable 00000000001BEA14 case 4
mov [rsp+98h+var_68], rax
lea rdi, _ZL5g_col; g_col
mov esi, 2
call _ZNSt6vectorIPKcSaIS1_EEixEm; std::vector<char const*>::operator[](ulong)
mov rdi, [rsp+98h+var_68]
mov rdx, [rax]
lea rsi, aSeS; "%sE %s"
lea rcx, aExampleSpecifi+1Fh; ""
mov al, 0
call _fprintf
jmp short loc_1BEB25
loc_1BEAE6:
mov rax, [rsp+98h+var_18]; jumptable 00000000001BEA14 case 1
mov [rsp+98h+var_70], rax
lea rdi, _ZL5g_col; g_col
mov esi, 4
call _ZNSt6vectorIPKcSaIS1_EEixEm; std::vector<char const*>::operator[](ulong)
mov rdi, [rsp+98h+var_70]
mov rdx, [rax]
lea rsi, aSdS; "%sD %s"
lea rcx, aExampleSpecifi+1Fh; ""
mov al, 0
call _fprintf
jmp short loc_1BEB25
def_1BEA14:
jmp short $+2; jumptable 00000000001BEA14 default case
loc_1BEB25:
jmp short $+2
loc_1BEB27:
mov rdi, [rsp+98h+var_20]
mov rax, [rsp+98h+var_18]
mov [rsp+98h+var_78], rax
add rdi, 10h
call _ZNKSt6vectorIcSaIcEE4dataEv; std::vector<char>::data(void)
mov rdi, [rsp+98h+var_78]
mov rdx, rax
lea rsi, aSetCustomJinja_0+0FEh; "%s"
mov al, 0
call _fprintf
mov rax, [rsp+98h+var_20]
cmp dword ptr [rax], 3
jz short loc_1BEB76
mov rax, [rsp+98h+var_20]
cmp dword ptr [rax], 4
jz short loc_1BEB76
mov rax, [rsp+98h+var_20]
cmp dword ptr [rax], 1
jnz short loc_1BEBA9
loc_1BEB76:
mov rax, [rsp+98h+var_18]
mov [rsp+98h+var_80], rax
lea rdi, _ZL5g_col; g_col
xor eax, eax
mov esi, eax
call _ZNSt6vectorIPKcSaIS1_EEixEm; std::vector<char const*>::operator[](ulong)
mov rdi, [rsp+98h+var_80]
mov rdx, [rax]
lea rsi, aSetCustomJinja_0+0FEh; "%s"
mov al, 0
call _fprintf
loc_1BEBA9:
mov rdi, [rsp+98h+var_18]
call _fflush
loc_1BEBB6:
add rsp, 98h
retn
| _DWORD * common_log_entry::print(long long a1, long long a2)
{
_DWORD *result; // rax
const char **v3; // rax
const char **v4; // rax
const char **v5; // rax
const char **v6; // rax
const char **v7; // rax
const char *v8; // rax
const char **v9; // rax
const char *v10; // [rsp+48h] [rbp-50h]
const char *v11; // [rsp+60h] [rbp-38h]
int v12; // [rsp+68h] [rbp-30h]
int v13; // [rsp+6Ch] [rbp-2Ch]
int v14; // [rsp+70h] [rbp-28h]
int v15; // [rsp+74h] [rbp-24h]
long long v16; // [rsp+80h] [rbp-18h]
v16 = a2;
if ( !a2 )
{
if ( *(_DWORD *)a1 == 1 )
{
result = common_log_verbosity_thold;
if ( common_log_verbosity_thold[0] < 1 )
return result;
}
v16 = stdout;
if ( *(_DWORD *)a1 )
v16 = stderr;
}
if ( *(_DWORD *)a1 && *(_DWORD *)a1 != 5 && (*(_BYTE *)(a1 + 4) & 1) != 0 )
{
if ( *(_QWORD *)(a1 + 8) )
{
v11 = *(const char **)std::vector<char const*>::operator[](g_col, 5LL);
v12 = *(_QWORD *)(a1 + 8) / 1000000LL / 60;
v13 = *(_QWORD *)(a1 + 8) / 1000000LL % 60;
v14 = *(_QWORD *)(a1 + 8) / 1000LL % 1000;
v15 = *(_QWORD *)(a1 + 8) % 1000LL;
v3 = (const char **)std::vector<char const*>::operator[](g_col, 0LL);
fprintf(v16, "%s%d.%02d.%03d.%03d%s ", v11, v12, v13, v14, v15, *v3);
}
switch ( *(_DWORD *)a1 )
{
case 1:
v7 = (const char **)std::vector<char const*>::operator[](g_col, 4LL);
fprintf(v16, "%sD %s", *v7, "");
break;
case 2:
v10 = *(const char **)std::vector<char const*>::operator[](g_col, 3LL);
v4 = (const char **)std::vector<char const*>::operator[](g_col, 0LL);
fprintf(v16, "%sI %s", v10, *v4);
break;
case 3:
v5 = (const char **)std::vector<char const*>::operator[](g_col, 6LL);
fprintf(v16, "%sW %s", *v5, "");
break;
case 4:
v6 = (const char **)std::vector<char const*>::operator[](g_col, 2LL);
fprintf(v16, "%sE %s", *v6, "");
break;
default:
break;
}
}
v8 = (const char *)std::vector<char>::data(a1 + 16);
fprintf(v16, "%s", v8);
if ( *(_DWORD *)a1 == 3 || *(_DWORD *)a1 == 4 || *(_DWORD *)a1 == 1 )
{
v9 = (const char **)std::vector<char const*>::operator[](g_col, 0LL);
fprintf(v16, "%s", *v9);
}
return (_DWORD *)fflush(v16);
}
| |||
43,299 | common_log_entry::print(_IO_FILE*) const | monkey531[P]llama/common/log.cpp | void print(FILE * file = nullptr) const {
FILE * fcur = file;
if (!fcur) {
// stderr displays DBG messages only when their verbosity level is not higher than the threshold
// these messages will still be logged to a file
if (level == GGML_LOG_LEVEL_DEBUG && common_log_verbosity_thold < LOG_DEFAULT_DEBUG) {
return;
}
fcur = stdout;
if (level != GGML_LOG_LEVEL_NONE) {
fcur = stderr;
}
}
if (level != GGML_LOG_LEVEL_NONE && level != GGML_LOG_LEVEL_CONT && prefix) {
if (timestamp) {
// [M.s.ms.us]
fprintf(fcur, "%s%d.%02d.%03d.%03d%s ",
g_col[COMMON_LOG_COL_BLUE],
(int) (timestamp / 1000000 / 60),
(int) (timestamp / 1000000 % 60),
(int) (timestamp / 1000 % 1000),
(int) (timestamp % 1000),
g_col[COMMON_LOG_COL_DEFAULT]);
}
switch (level) {
case GGML_LOG_LEVEL_INFO: fprintf(fcur, "%sI %s", g_col[COMMON_LOG_COL_GREEN], g_col[COMMON_LOG_COL_DEFAULT]); break;
case GGML_LOG_LEVEL_WARN: fprintf(fcur, "%sW %s", g_col[COMMON_LOG_COL_MAGENTA], "" ); break;
case GGML_LOG_LEVEL_ERROR: fprintf(fcur, "%sE %s", g_col[COMMON_LOG_COL_RED], "" ); break;
case GGML_LOG_LEVEL_DEBUG: fprintf(fcur, "%sD %s", g_col[COMMON_LOG_COL_YELLOW], "" ); break;
default:
break;
}
}
fprintf(fcur, "%s", msg.data());
if (level == GGML_LOG_LEVEL_WARN || level == GGML_LOG_LEVEL_ERROR || level == GGML_LOG_LEVEL_DEBUG) {
fprintf(fcur, "%s", g_col[COMMON_LOG_COL_DEFAULT]);
}
fflush(fcur);
} | O3 | cpp | common_log_entry::print(_IO_FILE*) const:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl (%rdi), %eax
testq %rsi, %rsi
jne 0xcbc96
cmpl $0x1, %eax
jne 0xcbc7f
leaq 0x5f774(%rip), %rcx # 0x12b3e8
cmpl $0x0, (%rcx)
jg 0xcbc7f
popq %rbx
popq %r14
popq %r15
retq
testl %eax, %eax
jne 0xcbc8c
movq 0x5e27e(%rip), %rcx # 0x129f08
jmp 0xcbc93
movq 0x5e2f5(%rip), %rcx # 0x129f88
movq (%rcx), %r14
testl %eax, %eax
je 0xcbe13
cmpl $0x5, %eax
je 0xcbe13
cmpb $0x1, 0x4(%rbx)
jne 0xcbe13
movq 0x8(%rbx), %r10
testq %r10, %r10
je 0xcbd9a
movq 0x5f72b(%rip), %r15 # 0x12b3f0
movq 0x28(%r15), %r9
movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB
movq %r10, %rax
imulq %rcx
movq %rdx, %rcx
movq %rdx, %r8
shrq $0x3f, %r8
sarq $0x12, %rcx
movabsq $-0x70d59cc6bc5928d7, %rdx # imm = 0x8F2A633943A6D729
movq %r10, %rax
imulq %rdx
addq %rcx, %r8
leaq (%rdx,%r10), %rcx
movq %rcx, %rax
shrq $0x3f, %rax
shrq $0x19, %rcx
addl %eax, %ecx
movabsq $-0x7777777777777777, %rdx # imm = 0x8888888888888889
movq %r8, %rax
imulq %rdx
addq %r8, %rdx
movq %rdx, %rax
shrq $0x3f, %rax
shrq $0x5, %rdx
addl %eax, %edx
imull $0x3c, %edx, %eax
subl %eax, %r8d
movabsq $0x20c49ba5e353f7cf, %rsi # imm = 0x20C49BA5E353F7CF
movq %r10, %rax
imulq %rsi
movq %rdx, %r11
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %r11
addq %rax, %r11
movq %r11, %rax
imulq %rsi
movq %rdx, %rax
shrq $0x3f, %rax
shrq $0x7, %rdx
addl %eax, %edx
imull $0x3e8, %edx, %eax # imm = 0x3E8
imull $0x3e8, %r11d, %edx # imm = 0x3E8
subl %eax, %r11d
subl %edx, %r10d
leaq 0x2807d(%rip), %rsi # 0xf3dfc
movq %r14, %rdi
movq %r9, %rdx
movl %r11d, %r9d
xorl %eax, %eax
pushq (%r15)
pushq %r10
callq 0x1ac30
addq $0x10, %rsp
movl (%rbx), %eax
decl %eax
cmpl $0x3, %eax
ja 0xcbe13
leaq 0x28044(%rip), %rcx # 0xf3dec
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x5f638(%rip), %rax # 0x12b3f0
movq 0x20(%rax), %rdx
leaq 0x28065(%rip), %rsi # 0xf3e28
jmp 0xcbdeb
movq 0x5f624(%rip), %rax # 0x12b3f0
movq 0x30(%rax), %rdx
leaq 0x28043(%rip), %rsi # 0xf3e1a
jmp 0xcbdeb
movq 0x5f610(%rip), %rax # 0x12b3f0
movq 0x10(%rax), %rdx
leaq 0x28036(%rip), %rsi # 0xf3e21
leaq 0x1935f(%rip), %rcx # 0xe5151
jmp 0xcbe09
movq 0x5f5f5(%rip), %rax # 0x12b3f0
movq (%rax), %rcx
movq 0x18(%rax), %rdx
leaq 0x2800a(%rip), %rsi # 0xf3e13
movq %r14, %rdi
xorl %eax, %eax
callq 0x1ac30
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x1a970
movl (%rbx), %eax
cmpl $0x4, %eax
ja 0xcbe42
movl $0x1a, %ecx
btl %eax, %ecx
jae 0xcbe42
movq 0x5f5b9(%rip), %rax # 0x12b3f0
movq (%rax), %rdi
movq %r14, %rsi
callq 0x1a970
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1a9e0
nop
| _ZNK16common_log_entry5printEP8_IO_FILE:
push r15
push r14
push rbx
mov r14, rsi
mov rbx, rdi
mov eax, [rdi]
test rsi, rsi
jnz short loc_CBC96
cmp eax, 1
jnz short loc_CBC7F
lea rcx, common_log_verbosity_thold
cmp dword ptr [rcx], 0
jg short loc_CBC7F
pop rbx
pop r14
pop r15
retn
loc_CBC7F:
test eax, eax
jnz short loc_CBC8C
mov rcx, cs:stdout_ptr
jmp short loc_CBC93
loc_CBC8C:
mov rcx, cs:stderr_ptr
loc_CBC93:
mov r14, [rcx]
loc_CBC96:
test eax, eax
jz def_CBDAF; jumptable 00000000000CBDAF default case
cmp eax, 5
jz def_CBDAF; jumptable 00000000000CBDAF default case
cmp byte ptr [rbx+4], 1
jnz def_CBDAF; jumptable 00000000000CBDAF default case
mov r10, [rbx+8]
test r10, r10
jz loc_CBD9A
mov r15, cs:_ZL5g_col; g_col
mov r9, [r15+28h]
mov rcx, 431BDE82D7B634DBh
mov rax, r10
imul rcx
mov rcx, rdx
mov r8, rdx
shr r8, 3Fh
sar rcx, 12h
mov rdx, 8F2A633943A6D729h
mov rax, r10
imul rdx
add r8, rcx
lea rcx, [rdx+r10]
mov rax, rcx
shr rax, 3Fh
shr rcx, 19h
add ecx, eax
mov rdx, 8888888888888889h
mov rax, r8
imul rdx
add rdx, r8
mov rax, rdx
shr rax, 3Fh
shr rdx, 5
add edx, eax
imul eax, edx, 3Ch ; '<'
sub r8d, eax
mov rsi, 20C49BA5E353F7CFh
mov rax, r10
imul rsi
mov r11, rdx
mov rax, rdx
shr rax, 3Fh
sar r11, 7
add r11, rax
mov rax, r11
imul rsi
mov rax, rdx
shr rax, 3Fh
shr rdx, 7
add edx, eax
imul eax, edx, 3E8h
imul edx, r11d, 3E8h
sub r11d, eax
sub r10d, edx
lea rsi, aSD02d03d03dS; "%s%d.%02d.%03d.%03d%s "
mov rdi, r14
mov rdx, r9
mov r9d, r11d
xor eax, eax
push qword ptr [r15]
push r10
call _fprintf
add rsp, 10h
mov eax, [rbx]
loc_CBD9A:
dec eax; switch 4 cases
cmp eax, 3
ja short def_CBDAF; jumptable 00000000000CBDAF default case
lea rcx, jpt_CBDAF
movsxd rax, ds:(jpt_CBDAF - 0F3DECh)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_CBDB1:
mov rax, cs:_ZL5g_col; jumptable 00000000000CBDAF case 1
mov rdx, [rax+20h]
lea rsi, aSdS; "%sD %s"
jmp short loc_CBDEB
loc_CBDC5:
mov rax, cs:_ZL5g_col; jumptable 00000000000CBDAF case 3
mov rdx, [rax+30h]
lea rsi, aSwS; "%sW %s"
jmp short loc_CBDEB
loc_CBDD9:
mov rax, cs:_ZL5g_col; jumptable 00000000000CBDAF case 4
mov rdx, [rax+10h]
lea rsi, aSeS; "%sE %s"
loc_CBDEB:
lea rcx, aExampleSpecifi+1Fh; ""
jmp short loc_CBE09
loc_CBDF4:
mov rax, cs:_ZL5g_col; jumptable 00000000000CBDAF case 2
mov rcx, [rax]
mov rdx, [rax+18h]
lea rsi, aSiS; "%sI %s"
loc_CBE09:
mov rdi, r14
xor eax, eax
call _fprintf
def_CBDAF:
mov rdi, [rbx+10h]; jumptable 00000000000CBDAF default case
mov rsi, r14
call _fputs
mov eax, [rbx]
cmp eax, 4
ja short loc_CBE42
mov ecx, 1Ah
bt ecx, eax
jnb short loc_CBE42
mov rax, cs:_ZL5g_col; g_col
mov rdi, [rax]
mov rsi, r14
call _fputs
loc_CBE42:
mov rdi, r14
pop rbx
pop r14
pop r15
jmp _fflush
| long long common_log_entry::print(unsigned int *a1, long long a2)
{
long long v2; // r14
long long result; // rax
long long *v4; // rcx
long long v5; // r10
long long v6; // rdx
const char *v7; // rsi
char *v8; // rcx
int v9; // ecx
v2 = a2;
result = *a1;
if ( !a2 )
{
if ( (_DWORD)result == 1 && common_log_verbosity_thold[0] <= 0 )
return result;
if ( (_DWORD)result )
v4 = (long long *)&stderr;
else
v4 = (long long *)&stdout;
v2 = *v4;
}
if ( (_DWORD)result && (_DWORD)result != 5 && *((_BYTE *)a1 + 4) == 1 )
{
v5 = *((_QWORD *)a1 + 1);
if ( v5 )
{
fprintf(
v2,
"%s%d.%02d.%03d.%03d%s ",
*(const char **)(g_col + 40),
(int)v5 / 60000000,
(int)(v5 / 1000000) % 60,
(int)(v5 / 1000) % 1000,
v5 % 1000,
*(const char **)g_col);
LODWORD(result) = *a1;
}
switch ( (int)result )
{
case 1:
v6 = *(_QWORD *)(g_col + 32);
v7 = "%sD %s";
goto LABEL_17;
case 2:
v8 = *(char **)g_col;
v6 = *(_QWORD *)(g_col + 24);
v7 = "%sI %s";
goto LABEL_19;
case 3:
v6 = *(_QWORD *)(g_col + 48);
v7 = "%sW %s";
goto LABEL_17;
case 4:
v6 = *(_QWORD *)(g_col + 16);
v7 = "%sE %s";
LABEL_17:
v8 = "";
LABEL_19:
fprintf(v2, v7, v6, v8);
break;
default:
break;
}
}
fputs(*((_QWORD *)a1 + 2), v2);
if ( *a1 <= 4 )
{
v9 = 26;
if ( _bittest(&v9, *a1) )
fputs(*(_QWORD *)g_col, v2);
}
return fflush(v2);
}
| print:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RSI
MOV RBX,RDI
MOV EAX,dword ptr [RDI]
TEST RSI,RSI
JNZ 0x001cbc96
CMP EAX,0x1
JNZ 0x001cbc7f
LEA RCX,[0x22b3e8]
CMP dword ptr [RCX],0x0
JG 0x001cbc7f
POP RBX
POP R14
POP R15
RET
LAB_001cbc7f:
TEST EAX,EAX
JNZ 0x001cbc8c
MOV RCX,qword ptr [0x00229f08]
JMP 0x001cbc93
LAB_001cbc8c:
MOV RCX,qword ptr [0x00229f88]
LAB_001cbc93:
MOV R14,qword ptr [RCX]
LAB_001cbc96:
TEST EAX,EAX
JZ 0x001cbe13
CMP EAX,0x5
JZ 0x001cbe13
CMP byte ptr [RBX + 0x4],0x1
JNZ 0x001cbe13
MOV R10,qword ptr [RBX + 0x8]
TEST R10,R10
JZ 0x001cbd9a
MOV R15,qword ptr [0x0022b3f0]
MOV R9,qword ptr [R15 + 0x28]
MOV RCX,0x431bde82d7b634db
MOV RAX,R10
IMUL RCX
MOV RCX,RDX
MOV R8,RDX
SHR R8,0x3f
SAR RCX,0x12
MOV RDX,-0x70d59cc6bc5928d7
MOV RAX,R10
IMUL RDX
ADD R8,RCX
LEA RCX,[RDX + R10*0x1]
MOV RAX,RCX
SHR RAX,0x3f
SHR RCX,0x19
ADD ECX,EAX
MOV RDX,-0x7777777777777777
MOV RAX,R8
IMUL RDX
ADD RDX,R8
MOV RAX,RDX
SHR RAX,0x3f
SHR RDX,0x5
ADD EDX,EAX
IMUL EAX,EDX,0x3c
SUB R8D,EAX
MOV RSI,0x20c49ba5e353f7cf
MOV RAX,R10
IMUL RSI
MOV R11,RDX
MOV RAX,RDX
SHR RAX,0x3f
SAR R11,0x7
ADD R11,RAX
MOV RAX,R11
IMUL RSI
MOV RAX,RDX
SHR RAX,0x3f
SHR RDX,0x7
ADD EDX,EAX
IMUL EAX,EDX,0x3e8
IMUL EDX,R11D,0x3e8
SUB R11D,EAX
SUB R10D,EDX
LEA RSI,[0x1f3dfc]
MOV RDI,R14
MOV RDX,R9
MOV R9D,R11D
XOR EAX,EAX
PUSH qword ptr [R15]
PUSH R10
CALL 0x0011ac30
ADD RSP,0x10
MOV EAX,dword ptr [RBX]
LAB_001cbd9a:
DEC EAX
CMP EAX,0x3
JA 0x001cbe13
LEA RCX,[0x1f3dec]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV RAX,qword ptr [0x0022b3f0]
MOV RDX,qword ptr [RAX + 0x20]
LEA RSI,[0x1f3e28]
JMP 0x001cbdeb
caseD_3:
MOV RAX,qword ptr [0x0022b3f0]
MOV RDX,qword ptr [RAX + 0x30]
LEA RSI,[0x1f3e1a]
JMP 0x001cbdeb
caseD_4:
MOV RAX,qword ptr [0x0022b3f0]
MOV RDX,qword ptr [RAX + 0x10]
LEA RSI,[0x1f3e21]
LAB_001cbdeb:
LEA RCX,[0x1e5151]
JMP 0x001cbe09
caseD_2:
MOV RAX,qword ptr [0x0022b3f0]
MOV RCX,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x18]
LEA RSI,[0x1f3e13]
LAB_001cbe09:
MOV RDI,R14
XOR EAX,EAX
CALL 0x0011ac30
default:
MOV RDI,qword ptr [RBX + 0x10]
MOV RSI,R14
CALL 0x0011a970
MOV EAX,dword ptr [RBX]
CMP EAX,0x4
JA 0x001cbe42
MOV ECX,0x1a
BT ECX,EAX
JNC 0x001cbe42
MOV RAX,qword ptr [0x0022b3f0]
MOV RDI,qword ptr [RAX]
MOV RSI,R14
CALL 0x0011a970
LAB_001cbe42:
MOV RDI,R14
POP RBX
POP R14
POP R15
JMP 0x0011a9e0
|
/* common_log_entry::print(_IO_FILE*) const */
void __thiscall common_log_entry::print(common_log_entry *this,_IO_FILE *param_1)
{
long lVar1;
int1 auVar2 [16];
int1 auVar3 [16];
int8 *puVar4;
char *pcVar5;
int8 uVar6;
char *__format;
int iVar7;
iVar7 = *(int *)this;
if (param_1 == (_IO_FILE *)0x0) {
if ((iVar7 == 1) && (common_log_verbosity_thold < 1)) {
return;
}
puVar4 = (int8 *)PTR_stderr_00229f88;
if (iVar7 == 0) {
puVar4 = (int8 *)PTR_stdout_00229f08;
}
param_1 = (_IO_FILE *)*puVar4;
}
if (((iVar7 == 0) || (iVar7 == 5)) || (this[4] != (common_log_entry)0x1))
goto switchD_001cbdaf_default;
lVar1 = *(long *)(this + 8);
if (lVar1 != 0) {
auVar3 = SEXT816(lVar1 / 1000000) * ZEXT816(0x8888888888888889);
auVar2 = SEXT816(lVar1 / 1000) * SEXT816(0x20c49ba5e353f7cf);
iVar7 = (int)(lVar1 / 1000);
fprintf(param_1,"%s%d.%02d.%03d.%03d%s ",g_col[5],
(ulong)(uint)((int)(SUB168(SEXT816(lVar1) * ZEXT816(0x8f2a633943a6d729),8) >> 0x19) -
(SUB164(SEXT816(lVar1) * ZEXT816(0x8f2a633943a6d729),0xc) >> 0x1f)),
(ulong)(uint)((int)(lVar1 / 1000000) +
((int)(auVar3._8_8_ >> 5) - (auVar3._12_4_ >> 0x1f)) * -0x3c),
(ulong)(uint)(iVar7 + ((int)(auVar2._8_8_ >> 7) - (auVar2._12_4_ >> 0x1f)) * -1000),
(ulong)(uint)((int)lVar1 + iVar7 * -1000),*g_col);
iVar7 = *(int *)this;
}
switch(iVar7) {
case 1:
uVar6 = g_col[4];
__format = "%sD %s";
break;
case 2:
pcVar5 = (char *)*g_col;
uVar6 = g_col[3];
__format = "%sI %s";
goto LAB_001cbe09;
case 3:
uVar6 = g_col[6];
__format = "%sW %s";
break;
case 4:
uVar6 = g_col[2];
__format = "%sE %s";
break;
default:
goto switchD_001cbdaf_default;
}
pcVar5 = "";
LAB_001cbe09:
fprintf(param_1,__format,uVar6,pcVar5);
switchD_001cbdaf_default:
fputs(*(char **)(this + 0x10),param_1);
if ((*(uint *)this < 5) && ((0x1aU >> (*(uint *)this & 0x1f) & 1) != 0)) {
fputs((char *)*g_col,param_1);
}
fflush(param_1);
return;
}
|
Subsets and Splits
C++ Functions With Standard Library Dependencies
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ Standard Library Function Analysis
Filters C++ code examples that use standard library containers and types, providing useful insights into common programming patterns and data structures in the dataset.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.