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
|
---|---|---|---|---|---|---|---|---|---|---|---|
6,100 | SchemaConverter::_not_strings(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&) | monkey531[P]llama/common/json-schema-to-grammar.cpp | std::string _not_strings(const std::vector<std::string> & strings) {
struct TrieNode {
std::map<char, TrieNode> children;
bool is_end_of_string;
TrieNode() : is_end_of_string(false) {}
void insert(const std::string & string) {
auto node = this;
for (char c : string) {
node = &node->children[c];
}
node->is_end_of_string = true;
}
};
TrieNode trie;
for (const auto & s : strings) {
trie.insert(s);
}
std::string char_rule = _add_primitive("char", PRIMITIVE_RULES.at("char"));
std::ostringstream out;
out << "[\"] ( ";
std::function<void(const TrieNode &)> visit = [&](const TrieNode & node) {
std::ostringstream rejects;
auto first = true;
for (const auto & kv : node.children) {
rejects << kv.first;
if (first) {
first = false;
} else {
out << " | ";
}
out << "[" << kv.first << "]";
if (!kv.second.children.empty()) {
out << " (";
visit(kv.second);
out << ")";
} else if (kv.second.is_end_of_string) {
out << " " << char_rule << "+";
}
}
if (!node.children.empty()) {
if (!first) {
out << " | ";
}
out << "[^\"" << rejects.str() << "] " << char_rule << "*";
}
};
visit(trie);
out << " )";
if (!trie.is_end_of_string) {
out << "?";
}
out << " [\"] space";
return out.str();
} | O2 | cpp | SchemaConverter::_not_strings(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x210, %rsp # imm = 0x210
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x30(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
movb $0x0, 0x28(%rax)
movq (%rdx), %r15
movq 0x8(%rdx), %r13
leaq 0x28(%rsp), %r12
cmpq %r13, %r15
je 0x96996
movq %r12, %rdi
movq %r15, %rsi
callq 0x97046
addq $0x20, %r15
jmp 0x96980
leaq 0x26deb(%rip), %rsi # 0xbd788
leaq 0x98(%rsp), %rdi
leaq 0x80(%rsp), %rdx
callq 0x2a75e
leaq 0x26dcf(%rip), %rsi # 0xbd788
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x2a75e
leaq 0x6e979(%rip), %rdi # 0x105348
leaq 0x8(%rsp), %rsi
callq 0x99c1c
leaq 0x60(%rsp), %r15
leaq 0x98(%rsp), %rdx
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rcx
callq 0x9595e
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x25258
leaq 0x98(%rsp), %rdi
callq 0x25258
leaq 0x98(%rsp), %rdi
callq 0x24be0
leaq 0x2710d(%rip), %rsi # 0xbdb2f
leaq 0x98(%rsp), %r12
movq %r12, %rdi
callq 0x248e0
leaq 0x80(%rsp), %rsi
movq %r12, (%rsi)
movq %r14, 0x8(%rsi)
movq %r15, 0x10(%rsi)
movq %r14, %rdi
callq 0x9708a
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x970d2
leaq 0x26ddf(%rip), %rsi # 0xbd842
leaq 0x98(%rsp), %rdi
callq 0x248e0
cmpb $0x0, 0x58(%rsp)
jne 0x96a8b
leaq 0x26ef5(%rip), %rsi # 0xbd973
leaq 0x98(%rsp), %rdi
callq 0x248e0
leaq 0x270a4(%rip), %rsi # 0xbdb36
leaq 0x98(%rsp), %rdi
callq 0x248e0
leaq 0xa0(%rsp), %rsi
movq %rbx, %rdi
callq 0x24e00
leaq 0x8(%rsp), %rdi
callq 0x2f504
leaq 0x98(%rsp), %rdi
callq 0x241f0
leaq 0x60(%rsp), %rdi
callq 0x25258
leaq 0x28(%rsp), %rdi
callq 0x9767e
movq %rbx, %rax
addq $0x210, %rsp # imm = 0x210
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x96af0
movq %rax, %rbx
jmp 0x96b25
movq %rax, %rbx
jmp 0x96b32
movq %rax, %rbx
jmp 0x96b0e
jmp 0x96b3e
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x25258
leaq 0x98(%rsp), %rdi
jmp 0x96b37
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2f504
leaq 0x98(%rsp), %rdi
callq 0x241f0
leaq 0x60(%rsp), %rdi
callq 0x25258
jmp 0x96b41
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x9767e
movq %rbx, %rdi
callq 0x24fe0
nop
| _ZN15SchemaConverter12_not_stringsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EE:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 210h
mov r14, rsi
mov rbx, rdi
lea rax, [rsp+238h+var_208]
and dword ptr [rax], 0
and qword ptr [rax+8], 0
mov [rax+10h], rax
mov [rax+18h], rax
and qword ptr [rax+20h], 0
mov byte ptr [rax+28h], 0
mov r15, [rdx]
mov r13, [rdx+8]
lea r12, [rsp+238h+var_210]
loc_96980:
cmp r15, r13
jz short loc_96996
mov rdi, r12
mov rsi, r15
call _ZZN15SchemaConverter12_not_stringsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EEEN8TrieNode6insertERKS6_; SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode::insert(std::string const&)
add r15, 20h ; ' '
jmp short loc_96980
loc_96996:
lea rsi, aChar; "char"
lea rdi, [rsp+238h+var_1A0]
lea rdx, [rsp+238h+var_1B8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rsi, aChar; "char"
lea rdi, [rsp+238h+var_230]
lea rdx, [rsp+238h+var_231]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdi, _Z15PRIMITIVE_RULESB5cxx11; PRIMITIVE_RULES
lea rsi, [rsp+238h+var_230]
call _ZNSt8__detail9_Map_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS6_11BuiltinRuleESaISA_ENS_10_Select1stESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb0ELb1EEELb1EE2atERS8_; std::__detail::_Map_base<std::string,std::pair<std::string const,BuiltinRule>,std::allocator<std::pair<std::string const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true>::at(std::string const&)
lea r15, [rsp+238h+var_1D8]
lea rdx, [rsp+238h+var_1A0]
mov rdi, r15
mov rsi, r14
mov rcx, rax
call _ZN15SchemaConverter14_add_primitiveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK11BuiltinRule; SchemaConverter::_add_primitive(std::string const&,BuiltinRule const&)
lea r14, [rsp+238h+var_230]
mov rdi, r14; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+238h+var_1A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+238h+var_1A0]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
lea rsi, asc_BDB2F; "[\"] ( "
lea r12, [rsp+238h+var_1A0]
mov rdi, r12
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
lea rsi, [rsp+238h+var_1B8]
mov [rsi], r12
mov [rsi+8], r14
mov [rsi+10h], r15
mov rdi, r14
call _ZNSt8functionIFvRKZN15SchemaConverter12_not_stringsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EEE8TrieNodeEEC2IZNS0_12_not_stringsESB_EUlSE_E_vEEOT_; std::function<void ()(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&)>::function<SchemaConverter::_not_strings(std::vector<std::string> const&)::{lambda(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&)#1},void>(SchemaConverter::_not_strings(std::vector<std::string> const&)::{lambda(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&)#1} &&)
lea rdi, [rsp+238h+var_230]
lea rsi, [rsp+238h+var_210]
call _ZNKSt8functionIFvRKZN15SchemaConverter12_not_stringsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EEE8TrieNodeEEclESE_; std::function<void ()(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&)>::operator()(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&)
lea rsi, a09401910201912+50h; " )"
lea rdi, [rsp+238h+var_1A0]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
cmp [rsp+238h+var_1E0], 0
jnz short loc_96A8B
lea rsi, asc_BD970+3; "?"
lea rdi, [rsp+238h+var_1A0]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
loc_96A8B:
lea rsi, aSpace_5; " [\"] space"
lea rdi, [rsp+238h+var_1A0]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
lea rsi, [rsp+238h+var_198]
mov rdi, rbx
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
lea rdi, [rsp+238h+var_230]; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
lea rdi, [rsp+238h+var_1A0]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+238h+var_1D8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+238h+var_210]
call _ZNSt8_Rb_treeIcSt4pairIKcZN15SchemaConverter12_not_stringsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EEE8TrieNodeESt10_Select1stISF_ESt4lessIcESaISF_EED2Ev; std::_Rb_tree<char,std::pair<char const,SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode>,std::_Select1st<std::pair<char const,SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode>>,std::less<char>,std::allocator<std::pair<char const,SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode>>>::~_Rb_tree()
mov rax, rbx
add rsp, 210h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
jmp short $+2
loc_96AF0:
mov rbx, rax
jmp short loc_96B25
mov rbx, rax
jmp short loc_96B32
mov rbx, rax
jmp short loc_96B0E
jmp short loc_96B3E
mov rbx, rax
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_96B0E:
lea rdi, [rsp+arg_90]
jmp short loc_96B37
mov rbx, rax
lea rdi, [rsp+arg_0]; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
loc_96B25:
lea rdi, [rsp+arg_90]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream()
loc_96B32:
lea rdi, [rsp+arg_58]; void *
loc_96B37:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_96B41
loc_96B3E:
mov rbx, rax
loc_96B41:
lea rdi, [rsp+arg_20]
call _ZNSt8_Rb_treeIcSt4pairIKcZN15SchemaConverter12_not_stringsERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS9_EEE8TrieNodeESt10_Select1stISF_ESt4lessIcESaISF_EED2Ev; std::_Rb_tree<char,std::pair<char const,SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode>,std::_Select1st<std::pair<char const,SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode>>,std::less<char>,std::allocator<std::pair<char const,SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode>>>::~_Rb_tree()
mov rdi, rbx
call __Unwind_Resume
| long long SchemaConverter::_not_strings(long long a1, long long a2, long long *a3)
{
long long v3; // r15
long long v4; // r13
long long *v5; // rax
_QWORD v7[4]; // [rsp+8h] [rbp-230h] BYREF
_BYTE v8[8]; // [rsp+28h] [rbp-210h] BYREF
int v9; // [rsp+30h] [rbp-208h] BYREF
long long v10; // [rsp+38h] [rbp-200h]
int *v11; // [rsp+40h] [rbp-1F8h]
int *v12; // [rsp+48h] [rbp-1F0h]
long long v13; // [rsp+50h] [rbp-1E8h]
char v14; // [rsp+58h] [rbp-1E0h]
_BYTE v15[32]; // [rsp+60h] [rbp-1D8h] BYREF
long long *v16; // [rsp+80h] [rbp-1B8h]
_QWORD *v17; // [rsp+88h] [rbp-1B0h]
_BYTE *v18; // [rsp+90h] [rbp-1A8h]
long long v19; // [rsp+98h] [rbp-1A0h] BYREF
_BYTE v20[408]; // [rsp+A0h] [rbp-198h] BYREF
v9 = 0;
v10 = 0LL;
v11 = &v9;
v12 = &v9;
v13 = 0LL;
v14 = 0;
v3 = *a3;
v4 = a3[1];
while ( v3 != v4 )
{
SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode::insert(v8, v3);
v3 += 32LL;
}
std::string::basic_string<std::allocator<char>>(&v19, (long long)"char");
std::string::basic_string<std::allocator<char>>(v7, (long long)"char");
v5 = (long long *)std::__detail::_Map_base<std::string,std::pair<std::string const,BuiltinRule>,std::allocator<std::pair<std::string const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true>::at(
&PRIMITIVE_RULES[abi:cxx11],
v7);
SchemaConverter::_add_primitive((long long)v15, a2, &v19, v5);
std::string::~string(v7);
std::string::~string(&v19);
std::ostringstream::basic_ostringstream(&v19);
std::operator<<<std::char_traits<char>>(&v19, "[\"] ( ");
v16 = &v19;
v17 = v7;
v18 = v15;
std::function<void ()(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&)>::function<SchemaConverter::_not_strings(std::vector<std::string> const&)::{lambda(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&)#1},void>(v7);
std::function<void ()(SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode const&)>::operator()(
v7,
v8);
std::operator<<<std::char_traits<char>>(&v19, " )");
if ( !v14 )
std::operator<<<std::char_traits<char>>(&v19, "?");
std::operator<<<std::char_traits<char>>(&v19, " [\"] space");
std::stringbuf::str(a1, v20);
std::_Function_base::~_Function_base((std::_Function_base *)v7);
std::ostringstream::~ostringstream(&v19);
std::string::~string(v15);
std::_Rb_tree<char,std::pair<char const,SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode>,std::_Select1st<std::pair<char const,SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode>>,std::less<char>,std::allocator<std::pair<char const,SchemaConverter::_not_strings(std::vector<std::string> const&)::TrieNode>>>::~_Rb_tree(v8);
return a1;
}
| _not_strings:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x210
MOV R14,RSI
MOV RBX,RDI
LEA RAX,[RSP + 0x30]
AND dword ptr [RAX],0x0
AND qword ptr [RAX + 0x8],0x0
MOV qword ptr [RAX + 0x10],RAX
MOV qword ptr [RAX + 0x18],RAX
AND qword ptr [RAX + 0x20],0x0
MOV byte ptr [RAX + 0x28],0x0
MOV R15,qword ptr [RDX]
MOV R13,qword ptr [RDX + 0x8]
LEA R12,[RSP + 0x28]
LAB_00196980:
CMP R15,R13
JZ 0x00196996
LAB_00196985:
MOV RDI,R12
MOV RSI,R15
CALL 0x00197046
ADD R15,0x20
JMP 0x00196980
LAB_00196996:
LEA RSI,[0x1bd788]
LEA RDI,[RSP + 0x98]
LEA RDX,[RSP + 0x80]
CALL 0x0012a75e
LAB_001969b2:
LEA RSI,[0x1bd788]
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x7]
CALL 0x0012a75e
LAB_001969c8:
LEA RDI,[0x205348]
LEA RSI,[RSP + 0x8]
CALL 0x00199c1c
LEA R15,[RSP + 0x60]
LEA RDX,[RSP + 0x98]
MOV RDI,R15
MOV RSI,R14
MOV RCX,RAX
CALL 0x0019595e
LEA R14,[RSP + 0x8]
MOV RDI,R14
CALL 0x00125258
LEA RDI,[RSP + 0x98]
CALL 0x00125258
LAB_00196a0e:
LEA RDI,[RSP + 0x98]
CALL 0x00124be0
LAB_00196a1b:
LEA RSI,[0x1bdb2f]
LEA R12,[RSP + 0x98]
MOV RDI,R12
CALL 0x001248e0
LEA RSI,[RSP + 0x80]
MOV qword ptr [RSI],R12
MOV qword ptr [RSI + 0x8],R14
MOV qword ptr [RSI + 0x10],R15
LAB_00196a45:
MOV RDI,R14
CALL 0x0019708a
LAB_00196a4d:
LEA RDI,[RSP + 0x8]
LEA RSI,[RSP + 0x28]
CALL 0x001970d2
LEA RSI,[0x1bd842]
LEA RDI,[RSP + 0x98]
CALL 0x001248e0
CMP byte ptr [RSP + 0x58],0x0
JNZ 0x00196a8b
LEA RSI,[0x1bd973]
LEA RDI,[RSP + 0x98]
CALL 0x001248e0
LAB_00196a8b:
LEA RSI,[0x1bdb36]
LEA RDI,[RSP + 0x98]
CALL 0x001248e0
LEA RSI,[RSP + 0xa0]
MOV RDI,RBX
CALL 0x00124e00
LAB_00196aaf:
LEA RDI,[RSP + 0x8]
CALL 0x0012f504
LEA RDI,[RSP + 0x98]
CALL 0x001241f0
LEA RDI,[RSP + 0x60]
CALL 0x00125258
LEA RDI,[RSP + 0x28]
CALL 0x0019767e
MOV RAX,RBX
ADD RSP,0x210
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* SchemaConverter::_not_strings(std::vector<std::__cxx11::string,
std::allocator<std::__cxx11::string > > const&) */
vector * SchemaConverter::_not_strings(vector *param_1)
{
long lVar1;
long *in_RDX;
BuiltinRule *in_RSI;
long lVar2;
allocator local_231;
string local_230 [32];
TrieNode local_210 [8];
int4 local_208 [2];
int8 local_200;
int4 *local_1f8;
int4 *local_1f0;
int8 local_1e8;
char local_1e0;
string local_1d8 [32];
ostream *local_1b8;
string *local_1b0;
string *local_1a8;
string local_1a0 [376];
local_1f8 = local_208;
local_208[0] = 0;
local_200 = 0;
local_1e8 = 0;
local_1e0 = '\0';
lVar1 = in_RDX[1];
local_1f0 = local_1f8;
for (lVar2 = *in_RDX; lVar2 != lVar1; lVar2 = lVar2 + 0x20) {
/* try { // try from 00196985 to 0019698f has its CatchHandler @ 00196b3e */
_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::
TrieNode::insert(std::__cxx11::string_const__(local_210,lVar2);
}
/* try { // try from 00196996 to 001969b1 has its CatchHandler @ 00196aff */
std::__cxx11::string::string<std::allocator<char>>(local_1a0,"char",(allocator *)&local_1b8);
/* try { // try from 001969b2 to 001969c7 has its CatchHandler @ 00196afa */
std::__cxx11::string::string<std::allocator<char>>(local_230,"char",&local_231);
/* try { // try from 001969c8 to 001969f3 has its CatchHandler @ 00196b01 */
std::__detail::
_Map_base<std::__cxx11::string,std::pair<std::__cxx11::string_const,BuiltinRule>,std::allocator<std::pair<std::__cxx11::string_const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true>
::at((_Map_base<std::__cxx11::string,std::pair<std::__cxx11::string_const,BuiltinRule>,std::allocator<std::pair<std::__cxx11::string_const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true>
*)PRIMITIVE_RULES_abi_cxx11_,local_230);
_add_primitive(local_1d8,in_RSI);
std::__cxx11::string::~string(local_230);
std::__cxx11::string::~string(local_1a0);
/* try { // try from 00196a0e to 00196a1a has its CatchHandler @ 00196af5 */
std::__cxx11::ostringstream::ostringstream((ostringstream *)local_1a0);
/* try { // try from 00196a1b to 00196a31 has its CatchHandler @ 00196af0 */
std::operator<<((ostream *)local_1a0,"[\"] ( ");
local_1b8 = (ostream *)local_1a0;
local_1b0 = local_230;
local_1a8 = local_1d8;
/* try { // try from 00196a45 to 00196a4c has its CatchHandler @ 00196aee */
std::
function<void(SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode_const&)>
::
function<SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::_lambda(SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode_const&)_1_,void>
((_lambda_SchemaConverter___not_strings_std__vector<std::__cxx11::string,std::allocator<std::__cxx11::string_>_>_const____TrieNode_const___1_
*)local_230);
/* try { // try from 00196a4d to 00196aae has its CatchHandler @ 00196b18 */
std::
function<void(SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode_const&)>
::operator()((function<void(SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode_const&)>
*)local_230,local_210);
std::operator<<((ostream *)local_1a0," )");
if (local_1e0 == '\0') {
std::operator<<((ostream *)local_1a0,"?");
}
std::operator<<((ostream *)local_1a0," [\"] space");
std::__cxx11::stringbuf::str();
std::_Function_base::~_Function_base((_Function_base *)local_230);
std::__cxx11::ostringstream::~ostringstream((ostringstream *)local_1a0);
std::__cxx11::string::~string(local_1d8);
std::
_Rb_tree<char,std::pair<char_const,SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode>,std::_Select1st<std::pair<char_const,SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode>>,std::less<char>,std::allocator<std::pair<char_const,SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode>>>
::~_Rb_tree((_Rb_tree<char,std::pair<char_const,SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode>,std::_Select1st<std::pair<char_const,SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode>>,std::less<char>,std::allocator<std::pair<char_const,SchemaConverter::_not_strings(std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&)::TrieNode>>>
*)local_210);
return param_1;
}
|
|
6,101 | mi_dpointer | eloqsql/storage/myisam/mi_search.c | void _mi_dpointer(MI_INFO *info, uchar *buff, my_off_t pos)
{
if (!(info->s->options &
(HA_OPTION_PACK_RECORD | HA_OPTION_COMPRESS_RECORD)) &&
pos != HA_OFFSET_ERROR)
pos/=info->s->base.pack_reclength;
switch (info->s->rec_reflength) {
#if SIZEOF_OFF_T > 4
case 8: mi_int8store(buff,pos); break;
case 7: mi_int7store(buff,pos); break;
case 6: mi_int6store(buff,pos); break;
case 5: mi_int5store(buff,pos); break;
#else
case 8: *buff++=0;
/* fall through */
case 7: *buff++=0;
/* fall through */
case 6: *buff++=0;
/* fall through */
case 5: *buff++=0;
/* fall through */
#endif
case 4: mi_int4store(buff,pos); break;
case 3: mi_int3store(buff,pos); break;
case 2: mi_int2store(buff,(uint) pos); break;
default: abort(); /* Impossible */
}
} | O0 | c | mi_dpointer:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x318(%rax), %rax
andq $0x5, %rax
cmpq $0x0, %rax
jne 0xc2941
cmpq $-0x1, -0x18(%rbp)
je 0xc2941
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x148(%rax), %rcx
movq -0x18(%rbp), %rax
xorl %edx, %edx
divq %rcx
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0x338(%rax), %eax
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, -0x88(%rbp)
subl $0x6, %eax
ja 0xc2c28
movq -0x88(%rbp), %rax
leaq 0xa0f9f(%rip), %rcx # 0x163910
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
shrq $0x20, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x30(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x30(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x30(%rbp), %rax
shrq $0x18, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x7(%rax)
movq -0x38(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x6(%rax)
movq -0x38(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x5(%rax)
movq -0x38(%rbp), %rax
shrq $0x18, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x4(%rax)
jmp 0xc2c2d
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
shrq $0x20, %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x6(%rax)
movq -0x40(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x5(%rax)
movq -0x40(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x4(%rax)
movq -0x40(%rbp), %rax
shrq $0x18, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x48(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x48(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x48(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0xc2c2d
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rax
shrq $0x20, %rax
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x5(%rax)
movq -0x50(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x4(%rax)
movq -0x50(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x50(%rbp), %rax
shrq $0x18, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x58(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x58(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0xc2c2d
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rax
shrq $0x20, %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x4(%rax)
movq -0x60(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x60(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x60(%rbp), %rax
shrq $0x18, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x68(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0xc2c2d
movq -0x18(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x70(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x70(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x70(%rbp), %rax
shrq $0x18, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0xc2c2d
movq -0x18(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x78(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x78(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0xc2c2d
movq -0x18(%rbp), %rax
movl %eax, -0x7c(%rbp)
movl -0x7c(%rbp), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x7c(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0xc2c2d
callq 0x2a640
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _mi_dpointer:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov rax, [rax]
mov rax, [rax+318h]
and rax, 5
cmp rax, 0
jnz short loc_C2941
cmp [rbp+var_18], 0FFFFFFFFFFFFFFFFh
jz short loc_C2941
mov rax, [rbp+var_8]
mov rax, [rax]
mov rcx, [rax+148h]
mov rax, [rbp+var_18]
xor edx, edx
div rcx
mov [rbp+var_18], rax
loc_C2941:
mov rax, [rbp+var_8]
mov rax, [rax]
mov eax, [rax+338h]
add eax, 0FFFFFFFEh; switch 7 cases
mov ecx, eax
mov [rbp+var_88], rcx
sub eax, 6
ja def_C2978; jumptable 00000000000C2978 default case
mov rax, [rbp+var_88]
lea rcx, jpt_C2978
movsxd rax, ds:(jpt_C2978 - 163910h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_C297A:
mov rax, [rbp+var_18]; jumptable 00000000000C2978 case 8
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
shr rax, 20h
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+3], cl
mov rax, [rbp+var_30]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov rax, [rbp+var_30]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_30]
shr rax, 18h
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
mov rax, [rbp+var_20]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+7], cl
mov rax, [rbp+var_38]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+6], cl
mov rax, [rbp+var_38]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+5], cl
mov rax, [rbp+var_38]
shr rax, 18h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+4], cl
jmp loc_C2C2D
loc_C2A22:
mov rax, [rbp+var_18]; jumptable 00000000000C2978 case 7
mov [rbp+var_40], rax
mov rax, [rbp+var_18]
shr rax, 20h
mov [rbp+var_48], rax
mov rax, [rbp+var_40]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+6], cl
mov rax, [rbp+var_40]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+5], cl
mov rax, [rbp+var_40]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+4], cl
mov rax, [rbp+var_40]
shr rax, 18h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+3], cl
mov rax, [rbp+var_48]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov rax, [rbp+var_48]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_48]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp loc_C2C2D
loc_C2AA9:
mov rax, [rbp+var_18]; jumptable 00000000000C2978 case 6
mov [rbp+var_50], rax
mov rax, [rbp+var_18]
shr rax, 20h
mov [rbp+var_58], rax
mov rax, [rbp+var_50]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+5], cl
mov rax, [rbp+var_50]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+4], cl
mov rax, [rbp+var_50]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+3], cl
mov rax, [rbp+var_50]
shr rax, 18h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov rax, [rbp+var_58]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_58]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp loc_C2C2D
loc_C2B1F:
mov rax, [rbp+var_18]; jumptable 00000000000C2978 case 5
mov [rbp+var_60], rax
mov rax, [rbp+var_18]
shr rax, 20h
mov [rbp+var_68], rax
mov rax, [rbp+var_60]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+4], cl
mov rax, [rbp+var_60]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+3], cl
mov rax, [rbp+var_60]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov rax, [rbp+var_60]
shr rax, 18h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_68]
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp loc_C2C2D
loc_C2B84:
mov rax, [rbp+var_18]; jumptable 00000000000C2978 case 4
mov [rbp+var_70], rax
mov rax, [rbp+var_70]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+3], cl
mov rax, [rbp+var_70]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov rax, [rbp+var_70]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_70]
shr rax, 18h
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp short loc_C2C2D
loc_C2BCD:
mov rax, [rbp+var_18]; jumptable 00000000000C2978 case 3
mov [rbp+var_78], rax
mov rax, [rbp+var_78]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov rax, [rbp+var_78]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_78]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp short loc_C2C2D
loc_C2C05:
mov rax, [rbp+var_18]; jumptable 00000000000C2978 case 2
mov [rbp+var_7C], eax
mov eax, [rbp+var_7C]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov eax, [rbp+var_7C]
shr eax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp short loc_C2C2D
def_C2978:
call _abort; jumptable 00000000000C2978 default case
loc_C2C2D:
add rsp, 90h
pop rbp
retn
| _BYTE * mi_dpointer(long long a1, _BYTE *a2, unsigned long long a3)
{
unsigned long long v3; // rcx
_BYTE *result; // rax
unsigned long long v5; // [rsp+78h] [rbp-18h]
v5 = a3;
if ( (*(_QWORD *)(*(_QWORD *)a1 + 792LL) & 5LL) == 0 && a3 != -1LL )
{
v3 = *(_QWORD *)(*(_QWORD *)a1 + 328LL);
a3 %= v3;
v5 /= v3;
}
switch ( *(_DWORD *)(*(_QWORD *)a1 + 824LL) )
{
case 2:
a2[1] = v5;
result = a2;
*a2 = BYTE1(v5);
break;
case 3:
a2[2] = v5;
a2[1] = BYTE1(v5);
result = a2;
*a2 = BYTE2(v5);
break;
case 4:
a2[3] = v5;
a2[2] = BYTE1(v5);
a2[1] = BYTE2(v5);
result = a2;
*a2 = BYTE3(v5);
break;
case 5:
a2[4] = v5;
a2[3] = BYTE1(v5);
a2[2] = BYTE2(v5);
a2[1] = BYTE3(v5);
result = a2;
*a2 = BYTE4(v5);
break;
case 6:
a2[5] = v5;
a2[4] = BYTE1(v5);
a2[3] = BYTE2(v5);
a2[2] = BYTE3(v5);
a2[1] = BYTE4(v5);
result = a2;
*a2 = BYTE5(v5);
break;
case 7:
a2[6] = v5;
a2[5] = BYTE1(v5);
a2[4] = BYTE2(v5);
a2[3] = BYTE3(v5);
a2[2] = BYTE4(v5);
a2[1] = BYTE5(v5);
result = a2;
*a2 = BYTE6(v5);
break;
case 8:
a2[3] = BYTE4(v5);
a2[2] = BYTE5(v5);
a2[1] = BYTE6(v5);
*a2 = HIBYTE(v5);
a2[7] = v5;
a2[6] = BYTE1(v5);
a2[5] = BYTE2(v5);
result = a2;
a2[4] = BYTE3(v5);
break;
default:
abort(a1, a2, a3);
}
return result;
}
| _mi_dpointer:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x318]
AND RAX,0x5
CMP RAX,0x0
JNZ 0x001c2941
CMP qword ptr [RBP + -0x18],-0x1
JZ 0x001c2941
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x148]
MOV RAX,qword ptr [RBP + -0x18]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x18],RAX
LAB_001c2941:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x338]
ADD EAX,-0x2
MOV ECX,EAX
MOV qword ptr [RBP + -0x88],RCX
SUB EAX,0x6
JA 0x001c2c28
MOV RAX,qword ptr [RBP + -0x88]
LEA RCX,[0x263910]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_8:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x20
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x3],CL
MOV RAX,qword ptr [RBP + -0x30]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x30]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x30]
SHR RAX,0x18
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x7],CL
MOV RAX,qword ptr [RBP + -0x38]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x6],CL
MOV RAX,qword ptr [RBP + -0x38]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x5],CL
MOV RAX,qword ptr [RBP + -0x38]
SHR RAX,0x18
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x4],CL
JMP 0x001c2c2d
caseD_7:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x20
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x6],CL
MOV RAX,qword ptr [RBP + -0x40]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x5],CL
MOV RAX,qword ptr [RBP + -0x40]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RBP + -0x40]
SHR RAX,0x18
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x3],CL
MOV RAX,qword ptr [RBP + -0x48]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x48]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x48]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x001c2c2d
caseD_6:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x20
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x5],CL
MOV RAX,qword ptr [RBP + -0x50]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RBP + -0x50]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x3],CL
MOV RAX,qword ptr [RBP + -0x50]
SHR RAX,0x18
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x58]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x58]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x001c2c2d
caseD_5:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x20
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x60]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RBP + -0x60]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x3],CL
MOV RAX,qword ptr [RBP + -0x60]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x60]
SHR RAX,0x18
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x68]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x001c2c2d
caseD_4:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x70]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x3],CL
MOV RAX,qword ptr [RBP + -0x70]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x70]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x70]
SHR RAX,0x18
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x001c2c2d
caseD_3:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x78]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x78]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x78]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x001c2c2d
caseD_2:
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x7c],EAX
MOV EAX,dword ptr [RBP + -0x7c]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV EAX,dword ptr [RBP + -0x7c]
SHR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x001c2c2d
default:
CALL 0x0012a640
LAB_001c2c2d:
ADD RSP,0x90
POP RBP
RET
|
void _mi_dpointer(long *param_1,int1 *param_2,ulong param_3)
{
int1 uVar1;
int1 uVar2;
int1 uVar3;
int1 uVar4;
int1 uVar5;
int1 uVar6;
int1 uVar7;
ulong local_20;
local_20 = param_3;
if (((*(ulong *)(*param_1 + 0x318) & 5) == 0) && (param_3 != 0xffffffffffffffff)) {
local_20 = param_3 / *(ulong *)(*param_1 + 0x148);
}
uVar4 = (int1)local_20;
uVar5 = (int1)(local_20 >> 8);
uVar6 = (int1)(local_20 >> 0x10);
uVar7 = (int1)(local_20 >> 0x18);
uVar1 = (int1)(local_20 >> 0x20);
uVar2 = (int1)(local_20 >> 0x28);
uVar3 = (int1)(local_20 >> 0x30);
switch(*(int4 *)(*param_1 + 0x338)) {
case 2:
param_2[1] = uVar4;
*param_2 = uVar5;
break;
case 3:
param_2[2] = uVar4;
param_2[1] = uVar5;
*param_2 = uVar6;
break;
case 4:
param_2[3] = uVar4;
param_2[2] = uVar5;
param_2[1] = uVar6;
*param_2 = uVar7;
break;
case 5:
param_2[4] = uVar4;
param_2[3] = uVar5;
param_2[2] = uVar6;
param_2[1] = uVar7;
*param_2 = uVar1;
break;
case 6:
param_2[5] = uVar4;
param_2[4] = uVar5;
param_2[3] = uVar6;
param_2[2] = uVar7;
param_2[1] = uVar1;
*param_2 = uVar2;
break;
case 7:
param_2[6] = uVar4;
param_2[5] = uVar5;
param_2[4] = uVar6;
param_2[3] = uVar7;
param_2[2] = uVar1;
param_2[1] = uVar2;
*param_2 = uVar3;
break;
case 8:
param_2[3] = uVar1;
param_2[2] = uVar2;
param_2[1] = uVar3;
*param_2 = (char)(local_20 >> 0x38);
param_2[7] = uVar4;
param_2[6] = uVar5;
param_2[5] = uVar6;
param_2[4] = uVar7;
break;
default:
/* WARNING: Subroutine does not return */
abort();
}
return;
}
|
|
6,102 | rw_pr_unlock | eloqsql/mysys/thr_rwlock.c | int rw_pr_unlock(rw_pr_lock_t *rwlock)
{
if (rwlock->active_writer)
{
/* We are unlocking wr-lock. */
#ifdef SAFE_MUTEX
rwlock->writer_thread= 0;
#endif
rwlock->active_writer= FALSE;
if (rwlock->writers_waiting_readers)
{
/*
Avoid expensive cond signal in case when there is no contention
or it is wr-only.
Note that from view point of performance it would be better to
signal on the condition variable after unlocking mutex (as it
reduces number of contex switches).
Unfortunately this would mean that such rwlock can't be safely
used by MDL subsystem, which relies on the fact that it is OK
to destroy rwlock once it is in unlocked state.
*/
pthread_cond_signal(&rwlock->no_active_readers);
}
pthread_mutex_unlock(&rwlock->lock);
}
else
{
/* We are unlocking rd-lock. */
pthread_mutex_lock(&rwlock->lock);
rwlock->active_readers--;
if (rwlock->active_readers == 0 &&
rwlock->writers_waiting_readers)
{
/*
If we are last reader and there are waiting
writers wake them up.
*/
pthread_cond_signal(&rwlock->no_active_readers);
}
pthread_mutex_unlock(&rwlock->lock);
}
return 0;
} | O3 | c | rw_pr_unlock:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x0, 0x60(%rdi)
je 0x29528
movb $0x0, 0x60(%rbx)
cmpl $0x0, 0x5c(%rbx)
je 0x29535
leaq 0x28(%rbx), %rdi
callq 0x24040
jmp 0x29535
movq %rbx, %rdi
callq 0x244c0
decl 0x58(%rbx)
je 0x29517
movq %rbx, %rdi
callq 0x24210
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
| rw_pr_unlock:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
cmp byte ptr [rdi+60h], 0
jz short loc_29528
mov byte ptr [rbx+60h], 0
loc_29517:
cmp dword ptr [rbx+5Ch], 0
jz short loc_29535
lea rdi, [rbx+28h]
call _pthread_cond_signal
jmp short loc_29535
loc_29528:
mov rdi, rbx
call _pthread_mutex_lock
dec dword ptr [rbx+58h]
jz short loc_29517
loc_29535:
mov rdi, rbx
call _pthread_mutex_unlock
xor eax, eax
add rsp, 8
pop rbx
pop rbp
retn
| long long rw_pr_unlock(long long a1)
{
if ( *(_BYTE *)(a1 + 96) )
{
*(_BYTE *)(a1 + 96) = 0;
}
else
{
pthread_mutex_lock(a1);
if ( (*(_DWORD *)(a1 + 88))-- != 1 )
goto LABEL_6;
}
if ( *(_DWORD *)(a1 + 92) )
pthread_cond_signal(a1 + 40);
LABEL_6:
pthread_mutex_unlock(a1);
return 0LL;
}
| rw_pr_unlock:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
CMP byte ptr [RDI + 0x60],0x0
JZ 0x00129528
MOV byte ptr [RBX + 0x60],0x0
LAB_00129517:
CMP dword ptr [RBX + 0x5c],0x0
JZ 0x00129535
LEA RDI,[RBX + 0x28]
CALL 0x00124040
JMP 0x00129535
LAB_00129528:
MOV RDI,RBX
CALL 0x001244c0
DEC dword ptr [RBX + 0x58]
JZ 0x00129517
LAB_00129535:
MOV RDI,RBX
CALL 0x00124210
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int8 rw_pr_unlock(pthread_mutex_t *param_1)
{
int *piVar1;
if (*(char *)((long)param_1 + 0x60) == '\0') {
pthread_mutex_lock(param_1);
piVar1 = (int *)((long)param_1 + 0x58);
*piVar1 = *piVar1 + -1;
if (*piVar1 != 0) goto LAB_00129535;
}
else {
*(int1 *)((long)param_1 + 0x60) = 0;
}
if (*(int *)((long)param_1 + 0x5c) != 0) {
pthread_cond_signal((pthread_cond_t *)(param_1 + 1));
}
LAB_00129535:
pthread_mutex_unlock(param_1);
return 0;
}
|
|
6,103 | google::protobuf::internal::SerialArena::Memory google::protobuf::internal::SerialArena::Free<google::protobuf::internal::GetDeallocator>(google::protobuf::internal::GetDeallocator) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/arena.cc | SerialArena::Memory SerialArena::Free(Deallocator deallocator) {
Block* b = head_;
Memory mem = {b, b->size};
while (b->next) {
b = b->next; // We must first advance before deleting this block
deallocator(mem);
mem = {b, b->size};
}
return mem;
} | O0 | cpp | google::protobuf::internal::SerialArena::Memory google::protobuf::internal::SerialArena::Free<google::protobuf::internal::GetDeallocator>(google::protobuf::internal::GetDeallocator):
subq $0x58, %rsp
movq %rsi, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x50(%rsp)
movq 0x28(%rsp), %rax
cmpq $0x0, (%rax)
je 0x168ea7
movq 0x28(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
leaq 0x38(%rsp), %rdi
callq 0x167ce0
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x50(%rsp)
jmp 0x168e39
movq 0x48(%rsp), %rax
movq 0x50(%rsp), %rdx
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZN6google8protobuf8internal11SerialArena4FreeINS1_14GetDeallocatorEEENS2_6MemoryET_:
sub rsp, 58h
mov [rsp+58h+var_20], rsi
mov [rsp+58h+var_18], rdx
mov [rsp+58h+var_28], rdi
mov rax, [rsp+58h+var_28]
mov rax, [rax+8]
mov [rsp+58h+var_30], rax
mov rax, [rsp+58h+var_30]
mov [rsp+58h+var_10], rax
mov rax, [rsp+58h+var_30]
mov rax, [rax+8]
mov [rsp+58h+var_8], rax
loc_168E39:
mov rax, [rsp+58h+var_30]
cmp qword ptr [rax], 0
jz short loc_168EA7
mov rax, [rsp+58h+var_30]
mov rax, [rax]
mov [rsp+58h+var_30], rax
mov rax, [rsp+58h+var_10]
mov [rsp+58h+var_40], rax
mov rax, [rsp+58h+var_8]
mov [rsp+58h+var_38], rax
mov rsi, [rsp+58h+var_40]
mov rdx, [rsp+58h+var_38]
lea rdi, [rsp+58h+var_20]
call _ZNK6google8protobuf8internal14GetDeallocatorclENS1_11SerialArena6MemoryE; google::protobuf::internal::GetDeallocator::operator()(google::protobuf::internal::SerialArena::Memory)
mov rax, [rsp+58h+var_30]
mov [rsp+58h+var_50], rax
mov rax, [rsp+58h+var_30]
mov rax, [rax+8]
mov [rsp+58h+var_48], rax
mov rax, [rsp+58h+var_50]
mov [rsp+58h+var_10], rax
mov rax, [rsp+58h+var_48]
mov [rsp+58h+var_8], rax
jmp short loc_168E39
loc_168EA7:
mov rax, [rsp+58h+var_10]
mov rdx, [rsp+58h+var_8]
add rsp, 58h
retn
| google::protobuf::internal * google::protobuf::internal::SerialArena::Free<google::protobuf::internal::GetDeallocator>(
long long a1,
long long a2,
long long a3)
{
unsigned long long v4; // [rsp+10h] [rbp-48h]
google::protobuf::internal *v5; // [rsp+28h] [rbp-30h]
_QWORD v6[2]; // [rsp+38h] [rbp-20h] BYREF
google::protobuf::internal *v7; // [rsp+48h] [rbp-10h]
unsigned long long v8; // [rsp+50h] [rbp-8h]
v6[0] = a2;
v6[1] = a3;
v5 = *(google::protobuf::internal **)(a1 + 8);
v7 = v5;
v8 = *((_QWORD *)v5 + 1);
while ( *(_QWORD *)v5 )
{
v5 = *(google::protobuf::internal **)v5;
google::protobuf::internal::GetDeallocator::operator()((long long)v6, v7, v8);
v4 = *((_QWORD *)v5 + 1);
v7 = v5;
v8 = v4;
}
return v7;
}
| |||
6,104 | google::protobuf::internal::SerialArena::Memory google::protobuf::internal::SerialArena::Free<google::protobuf::internal::GetDeallocator>(google::protobuf::internal::GetDeallocator) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/arena.cc | SerialArena::Memory SerialArena::Free(Deallocator deallocator) {
Block* b = head_;
Memory mem = {b, b->size};
while (b->next) {
b = b->next; // We must first advance before deleting this block
deallocator(mem);
mem = {b, b->size};
}
return mem;
} | O3 | cpp | google::protobuf::internal::SerialArena::Memory google::protobuf::internal::SerialArena::Free<google::protobuf::internal::GetDeallocator>(google::protobuf::internal::GetDeallocator):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x8(%rdi), %rdi
movq (%rdi), %rax
movq 0x8(%rdi), %rbx
testq %rax, %rax
je 0x7860b
movq %rdx, %r14
movq %rsi, %r15
movq %rax, %r12
testq %r15, %r15
je 0x785f0
movq %rbx, %rsi
callq *%r15
jmp 0x785f5
callq 0x2d160
addq %rbx, (%r14)
movq (%r12), %rax
movq 0x8(%r12), %rbx
movq %r12, %rdi
testq %rax, %rax
jne 0x785e0
jmp 0x7860e
movq %rdi, %r12
movq %r12, %rax
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| _ZN6google8protobuf8internal11SerialArena4FreeINS1_14GetDeallocatorEEENS2_6MemoryET_:
push r15
push r14
push r12
push rbx
push rax
mov rdi, [rdi+8]; void *
mov rax, [rdi]
mov rbx, [rdi+8]
test rax, rax
jz short loc_7860B
mov r14, rdx
mov r15, rsi
loc_785E0:
mov r12, rax
test r15, r15
jz short loc_785F0
mov rsi, rbx
call r15
jmp short loc_785F5
loc_785F0:
call __ZdlPv; operator delete(void *)
loc_785F5:
add [r14], rbx
mov rax, [r12]
mov rbx, [r12+8]
mov rdi, r12
test rax, rax
jnz short loc_785E0
jmp short loc_7860E
loc_7860B:
mov r12, rdi
loc_7860E:
mov rax, r12
mov rdx, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| _QWORD * google::protobuf::internal::SerialArena::Free<google::protobuf::internal::GetDeallocator>(
long long a1,
void ( *a2)(_QWORD *, long long),
_QWORD *a3)
{
_QWORD *v3; // rdi
_QWORD *v4; // rax
long long v5; // rbx
_QWORD *v7; // r12
v3 = *(_QWORD **)(a1 + 8);
v4 = (_QWORD *)*v3;
v5 = v3[1];
if ( !*v3 )
return v3;
do
{
v7 = v4;
if ( a2 )
a2(v3, v5);
else
operator delete(v3);
*a3 += v5;
v4 = (_QWORD *)*v7;
v5 = v7[1];
v3 = v7;
}
while ( *v7 );
return v7;
}
| Free<google::protobuf::internal::GetDeallocator>:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RDI,qword ptr [RDI + 0x8]
MOV RAX,qword ptr [RDI]
MOV RBX,qword ptr [RDI + 0x8]
TEST RAX,RAX
JZ 0x0017860b
MOV R14,RDX
MOV R15,RSI
LAB_001785e0:
MOV R12,RAX
TEST R15,R15
JZ 0x001785f0
MOV RSI,RBX
CALL R15
JMP 0x001785f5
LAB_001785f0:
CALL 0x0012d160
LAB_001785f5:
ADD qword ptr [R14],RBX
MOV RAX,qword ptr [R12]
MOV RBX,qword ptr [R12 + 0x8]
MOV RDI,R12
TEST RAX,RAX
JNZ 0x001785e0
JMP 0x0017860e
LAB_0017860b:
MOV R12,RDI
LAB_0017860e:
MOV RAX,R12
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* google::protobuf::internal::SerialArena::Memory
google::protobuf::internal::SerialArena::Free<google::protobuf::internal::GetDeallocator>(google::protobuf::internal::GetDeallocator)
*/
int1 [16]
google::protobuf::internal::SerialArena::Free<google::protobuf::internal::GetDeallocator>
(long param_1,code *param_2,long *param_3)
{
int8 *puVar1;
long lVar2;
int8 *puVar3;
int1 auVar4 [16];
puVar1 = *(int8 **)(param_1 + 8);
lVar2 = puVar1[1];
for (puVar3 = (int8 *)*puVar1; puVar3 != (int8 *)0x0; puVar3 = (int8 *)*puVar3)
{
if (param_2 == (code *)0x0) {
operator_delete(puVar1);
}
else {
(*param_2)(puVar1,lVar2);
}
*param_3 = *param_3 + lVar2;
lVar2 = puVar3[1];
puVar1 = puVar3;
}
auVar4._8_8_ = lVar2;
auVar4._0_8_ = puVar1;
return auVar4;
}
|
|
6,105 | add_directory | eloqsql/mysys/my_default.c | static int add_directory(MEM_ROOT *alloc, const char *dir, const char **dirs)
{
char buf[FN_REFLEN];
size_t len;
char *p;
my_bool err __attribute__((unused));
len= normalize_dirname(buf, dir);
if (!(p= strmake_root(alloc, buf, len)))
return 1; /* Failure */
/* Should never fail if DEFAULT_DIRS_SIZE is correct size */
err= array_append_string_unique(p, dirs, DEFAULT_DIRS_SIZE);
DBUG_ASSERT(err == FALSE);
return 0;
} | O0 | c | add_directory:
pushq %rbp
movq %rsp, %rbp
subq $0x250, %rsp # imm = 0x250
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x220(%rbp)
movq %rsi, -0x228(%rbp)
movq %rdx, -0x230(%rbp)
leaq -0x210(%rbp), %rdi
movq -0x228(%rbp), %rsi
callq 0x83fd0
movq %rax, -0x238(%rbp)
movq -0x220(%rbp), %rdi
leaq -0x210(%rbp), %rsi
movq -0x238(%rbp), %rdx
callq 0x85130
movq %rax, -0x240(%rbp)
cmpq $0x0, %rax
jne 0x8145a
movl $0x1, -0x214(%rbp)
jmp 0x81484
movq -0x240(%rbp), %rdi
movq -0x230(%rbp), %rsi
movl $0x8, %edx
callq 0x844f0
movb %al, -0x241(%rbp)
jmp 0x8147a
movl $0x0, -0x214(%rbp)
movl -0x214(%rbp), %eax
movl %eax, -0x248(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x814b1
movl -0x248(%rbp), %eax
addq $0x250, %rsp # imm = 0x250
popq %rbp
retq
callq 0x382c0
nopw %cs:(%rax,%rax)
| add_directory:
push rbp
mov rbp, rsp
sub rsp, 250h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_220], rdi
mov [rbp+var_228], rsi
mov [rbp+var_230], rdx
lea rdi, [rbp+var_210]
mov rsi, [rbp+var_228]
call normalize_dirname
mov [rbp+var_238], rax
mov rdi, [rbp+var_220]
lea rsi, [rbp+var_210]
mov rdx, [rbp+var_238]
call strmake_root
mov [rbp+var_240], rax
cmp rax, 0
jnz short loc_8145A
mov [rbp+var_214], 1
jmp short loc_81484
loc_8145A:
mov rdi, [rbp+var_240]
mov rsi, [rbp+var_230]
mov edx, 8
call array_append_string_unique
mov [rbp+var_241], al
jmp short $+2
loc_8147A:
mov [rbp+var_214], 0
loc_81484:
mov eax, [rbp+var_214]
mov [rbp+var_248], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_814B1
mov eax, [rbp+var_248]
add rsp, 250h
pop rbp
retn
loc_814B1:
call ___stack_chk_fail
| long long add_directory(long long a1, long long a2, long long a3)
{
long long v4; // [rsp+10h] [rbp-240h]
long long v5; // [rsp+18h] [rbp-238h]
_BYTE v8[520]; // [rsp+40h] [rbp-210h] BYREF
unsigned long long v9; // [rsp+248h] [rbp-8h]
v9 = __readfsqword(0x28u);
v5 = normalize_dirname(v8, a2);
v4 = strmake_root(a1, v8, v5);
if ( v4 )
{
array_append_string_unique(v4, a3, 8LL);
return 0;
}
else
{
return 1;
}
}
| add_directory:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x250
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x220],RDI
MOV qword ptr [RBP + -0x228],RSI
MOV qword ptr [RBP + -0x230],RDX
LEA RDI,[RBP + -0x210]
MOV RSI,qword ptr [RBP + -0x228]
CALL 0x00183fd0
MOV qword ptr [RBP + -0x238],RAX
MOV RDI,qword ptr [RBP + -0x220]
LEA RSI,[RBP + -0x210]
MOV RDX,qword ptr [RBP + -0x238]
CALL 0x00185130
MOV qword ptr [RBP + -0x240],RAX
CMP RAX,0x0
JNZ 0x0018145a
MOV dword ptr [RBP + -0x214],0x1
JMP 0x00181484
LAB_0018145a:
MOV RDI,qword ptr [RBP + -0x240]
MOV RSI,qword ptr [RBP + -0x230]
MOV EDX,0x8
CALL 0x001844f0
MOV byte ptr [RBP + -0x241],AL
JMP 0x0018147a
LAB_0018147a:
MOV dword ptr [RBP + -0x214],0x0
LAB_00181484:
MOV EAX,dword ptr [RBP + -0x214]
MOV dword ptr [RBP + -0x248],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001814b1
MOV EAX,dword ptr [RBP + -0x248]
ADD RSP,0x250
POP RBP
RET
LAB_001814b1:
CALL 0x001382c0
|
bool add_directory(int8 param_1,int8 param_2,int8 param_3)
{
int8 uVar1;
long lVar2;
long in_FS_OFFSET;
int1 local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
uVar1 = normalize_dirname(local_218,param_2);
lVar2 = strmake_root(param_1,local_218,uVar1);
if (lVar2 != 0) {
array_append_string_unique(lVar2,param_3,8);
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return lVar2 == 0;
}
|
|
6,106 | add_directory | eloqsql/mysys/my_default.c | static int add_directory(MEM_ROOT *alloc, const char *dir, const char **dirs)
{
char buf[FN_REFLEN];
size_t len;
char *p;
my_bool err __attribute__((unused));
len= normalize_dirname(buf, dir);
if (!(p= strmake_root(alloc, buf, len)))
return 1; /* Failure */
/* Should never fail if DEFAULT_DIRS_SIZE is correct size */
err= array_append_string_unique(p, dirs, DEFAULT_DIRS_SIZE);
DBUG_ASSERT(err == FALSE);
return 0;
} | O3 | c | add_directory:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x208, %rsp # imm = 0x208
movq %rdx, %rbx
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x20(%rbp)
leaq -0x220(%rbp), %r15
movq %r15, %rdi
callq 0x35247
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x36501
testq %rax, %rax
je 0x34667
movl $0x8, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x35d48
xorl %eax, %eax
jmp 0x3466c
movl $0x1, %eax
movq %fs:0x28, %rcx
cmpq -0x20(%rbp), %rcx
jne 0x34689
addq $0x208, %rsp # imm = 0x208
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x243e0
nop
| add_directory:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 208h
mov rbx, rdx
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_20], rax
lea r15, [rbp+var_220]
mov rdi, r15
call normalize_dirname
mov rdi, r14
mov rsi, r15
mov rdx, rax
call strmake_root
test rax, rax
jz short loc_34667
mov edx, 8
mov rdi, rax
mov rsi, rbx
call array_append_string_unique
xor eax, eax
jmp short loc_3466C
loc_34667:
mov eax, 1
loc_3466C:
mov rcx, fs:28h
cmp rcx, [rbp+var_20]
jnz short loc_34689
add rsp, 208h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_34689:
call ___stack_chk_fail
| long long add_directory(long long a1, long long a2, long long a3)
{
long long v4; // rax
long long v5; // rax
_BYTE v7[512]; // [rsp+0h] [rbp-220h] BYREF
unsigned long long v8; // [rsp+200h] [rbp-20h]
v8 = __readfsqword(0x28u);
v4 = normalize_dirname(v7);
v5 = strmake_root(a1, v7, v4);
if ( !v5 )
return 1LL;
array_append_string_unique(v5, a3, 8LL);
return 0LL;
}
| add_directory:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x208
MOV RBX,RDX
MOV R14,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x20],RAX
LEA R15,[RBP + -0x220]
MOV RDI,R15
CALL 0x00135247
MOV RDI,R14
MOV RSI,R15
MOV RDX,RAX
CALL 0x00136501
TEST RAX,RAX
JZ 0x00134667
MOV EDX,0x8
MOV RDI,RAX
MOV RSI,RBX
CALL 0x00135d48
XOR EAX,EAX
JMP 0x0013466c
LAB_00134667:
MOV EAX,0x1
LAB_0013466c:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x20]
JNZ 0x00134689
ADD RSP,0x208
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00134689:
CALL 0x001243e0
|
bool add_directory(int8 param_1,int8 param_2,int8 param_3)
{
int8 uVar1;
long lVar2;
long in_FS_OFFSET;
int1 local_228 [512];
long local_28;
local_28 = *(long *)(in_FS_OFFSET + 0x28);
uVar1 = normalize_dirname(local_228);
lVar2 = strmake_root(param_1,local_228,uVar1);
if (lVar2 != 0) {
array_append_string_unique(lVar2,param_3,8);
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_28) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return lVar2 == 0;
}
|
|
6,107 | 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& 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>::at<char const (&) [9], 0>(char const (&) [9]) const | monkey531[P]llama/common/json.hpp | const_reference at(KeyType && key) const
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return it->second;
} | O1 | cpp | 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& 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>::at<char const (&) [9], 0>(char const (&) [9]) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0x89b7c
movq %rsi, %r15
movq 0x8(%r14), %r12
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0x89b61
movq %rbx, %rdi
movq %r15, %rsi
callq 0x19190
testl %eax, %eax
je 0x89b5e
addq $0x30, %rbx
jmp 0x89b3f
movq %rbx, %rax
movq 0x8(%r14), %rcx
cmpq 0x8(%rcx), %rax
je 0x89bd8
addq $0x20, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x19370
movq %rax, %rbx
movq %r14, %rdi
callq 0x2f7ce
leaq 0x20(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x35551(%rip), %rsi # 0xbf0f1
movq %rsp, %rdi
callq 0x8f2f6
movb $0x1, %bpl
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x4c488
xorl %ebp, %ebp
leaq 0x63359(%rip), %rsi # 0xecf20
leaq -0x5e280(%rip), %rdx # 0x2b94e
movq %rbx, %rdi
callq 0x19b70
jmp 0x89c51
movl $0x20, %edi
callq 0x19370
movq %rax, %rbx
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x19310
leaq (%rax,%r15), %rdx
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x32ea4
leaq 0x35512(%rip), %rsi # 0xbf121
leaq 0x35511(%rip), %rcx # 0xbf127
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0x8f7ec
movb $0x1, %bpl
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0x8f892
xorl %ebp, %ebp
leaq 0x6325e(%rip), %rsi # 0xecea0
leaq -0x5e2fb(%rip), %rdx # 0x2b94e
movq %rbx, %rdi
callq 0x19b70
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x89c77
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x196b0
jmp 0x89c77
movq %rax, %r14
movb $0x1, %bpl
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x89cb0
movq 0x30(%rsp), %rsi
jmp 0x89ca0
jmp 0x89caa
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x89cb0
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x196b0
jmp 0x89cb0
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x89cbd
movq %rbx, %rdi
callq 0x19510
movq %r14, %rdi
callq 0x19be0
nop
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
push rbp; char
push r15; int
push r14; int
push r12; int
push rbx; char
sub rsp, 40h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_89B7C
mov r15, rsi
mov r12, [r14+8]
mov rbx, [r12]
loc_89B3F:
mov rax, [r12+8]
cmp rbx, rax
jz short loc_89B61
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_89B5E
add rbx, 30h ; '0'
jmp short loc_89B3F
loc_89B5E:
mov rax, rbx
loc_89B61:
mov rcx, [r14+8]
cmp rax, [rcx+8]
jz short loc_89BD8
add rax, 20h ; ' '
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_89B7C:
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+68h+var_48]
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
mov rdi, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
mov rdx, rsp
mov rdi, rbx; this
mov esi, 130h; 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
jmp short loc_89C51
loc_89BD8:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r12, [rsp+68h+var_38]
mov [r12-10h], r12
mov rdi, r15
call _strlen
lea rdx, [rax+r15]
lea rdi, [rsp+68h+var_48]
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
mov rdi, rsp
lea rdx, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
mov rdx, rsp
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_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_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_89C51:
mov r14, rax
lea rax, [rsp+68h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_89C77
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_89C77
mov r14, rax
mov bpl, 1
loc_89C77:
mov rdi, [rsp+68h+var_48]
cmp rdi, r12
jz short loc_89CB0
mov rsi, [rsp+68h+var_38]
jmp short loc_89CA0
jmp short loc_89CAA
mov r14, rax
lea rax, [rsp+68h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_89CB0
mov rsi, [rsp+68h+var_58]
loc_89CA0:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_89CB0
loc_89CAA:
mov r14, rax
mov bpl, 1
loc_89CB0:
test bpl, bpl
jz short loc_89CBD
mov rdi, rbx; void *
call ___cxa_free_exception
loc_89CBD:
mov rdi, r14
call __Unwind_Resume
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x00189b7c
MOV R15,RSI
MOV R12,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [R12]
LAB_00189b3f:
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JZ 0x00189b61
MOV RDI,RBX
MOV RSI,R15
CALL 0x00119190
TEST EAX,EAX
JZ 0x00189b5e
ADD RBX,0x30
JMP 0x00189b3f
LAB_00189b5e:
MOV RAX,RBX
LAB_00189b61:
MOV RCX,qword ptr [R14 + 0x8]
CMP RAX,qword ptr [RCX + 0x8]
JZ 0x00189bd8
ADD RAX,0x20
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00189b7c:
MOV EDI,0x20
CALL 0x00119370
MOV RBX,RAX
MOV RDI,R14
CALL 0x0012f7ce
LEA RDX,[RSP + 0x20]
MOV qword ptr [RDX],RAX
LAB_00189b99:
LEA RSI,[0x1bf0f1]
MOV RDI,RSP
CALL 0x0018f2f6
MOV BPL,0x1
LAB_00189bab:
MOV RDX,RSP
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x0014c488
XOR EBP,EBP
LEA RSI,[0x1ecf20]
LEA RDX,[0x12b94e]
MOV RDI,RBX
CALL 0x00119b70
LAB_00189bd8:
MOV EDI,0x20
CALL 0x00119370
MOV RBX,RAX
LEA R12,[RSP + 0x30]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,R15
CALL 0x00119310
LEA RDX,[RAX + R15*0x1]
LAB_00189bfb:
LEA RDI,[RSP + 0x20]
MOV RSI,R15
CALL 0x00132ea4
LAB_00189c08:
LEA RSI,[0x1bf121]
LEA RCX,[0x1bf127]
MOV RDI,RSP
LEA RDX,[RSP + 0x20]
CALL 0x0018f7ec
MOV BPL,0x1
LAB_00189c26:
MOV RDX,RSP
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x0018f892
XOR EBP,EBP
LEA RSI,[0x1ecea0]
LEA RDX,[0x12b94e]
MOV RDI,RBX
CALL 0x00119b70
|
char * _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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,char *param_2)
{
int8 *puVar1;
int iVar2;
char *pcVar3;
int8 uVar4;
size_t sVar5;
char *pcVar6;
detail adStack_68 [32];
char *local_48 [2];
char local_38 [16];
if (*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>
)0x1) {
uVar4 = __cxa_allocate_exception(0x20);
local_48[0] = (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 00189b99 to 00189ba7 has its CatchHandler @ 00189caa */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(adStack_68,"cannot use at() with ",local_48);
/* try { // try from 00189bab to 00189bd5 has its CatchHandler @ 00189c8a */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar4,0x130,adStack_68,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
puVar1 = *(int8 **)(param_1 + 8);
pcVar6 = (char *)*puVar1;
while ((pcVar3 = (char *)puVar1[1], pcVar6 != pcVar3 &&
(iVar2 = std::__cxx11::string::compare(pcVar6), pcVar3 = pcVar6, iVar2 != 0))) {
pcVar6 = pcVar6 + 0x30;
}
if (pcVar3 == *(char **)(*(long *)(param_1 + 8) + 8)) {
uVar4 = __cxa_allocate_exception(0x20);
local_48[0] = local_38;
sVar5 = strlen(param_2);
/* try { // try from 00189bfb to 00189c07 has its CatchHandler @ 00189c88 */
std::__cxx11::string::_M_construct<char_const*>(local_48,param_2,param_2 + sVar5);
/* try { // try from 00189c08 to 00189c22 has its CatchHandler @ 00189c71 */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(adStack_68,"key \'",(string *)local_48,"\' not found");
/* try { // try from 00189c26 to 00189c50 has its CatchHandler @ 00189c51 */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar4,0x193,adStack_68,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return pcVar3 + 0x20;
}
|
||
6,108 | 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& 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>::at<char const (&) [9], 0>(char const (&) [9]) const | monkey531[P]llama/common/json.hpp | const_reference at(KeyType && key) const
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return it->second;
} | O2 | cpp | 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& 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>::at<char const (&) [9], 0>(char const (&) [9]) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0x76461
movq %rsi, %r15
movq 0x8(%r14), %rdi
callq 0x4cfd2
movq 0x8(%r14), %rcx
cmpq 0x8(%rcx), %rax
je 0x764bf
addq $0x20, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x213a0
movq %rax, %rbx
movq %r14, %rdi
callq 0x30c70
leaq 0x28(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x27cae(%rip), %rsi # 0x9e131
leaq 0x8(%rsp), %rdi
callq 0x78d11
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x4749e
xorl %ebp, %ebp
leaq 0x63aa2(%rip), %rsi # 0xd9f50
leaq -0x48ca9(%rip), %rdx # 0x2d80c
movq %rbx, %rdi
callq 0x21b70
jmp 0x76529
pushq $0x20
popq %rdi
callq 0x213a0
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %r15, %rsi
callq 0x2a484
leaq 0x27c7e(%rip), %rsi # 0x9e161
leaq 0x27c7d(%rip), %rcx # 0x9e167
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x791a8
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0x79298
xorl %ebp, %ebp
leaq 0x639b6(%rip), %rsi # 0xd9ed0
leaq -0x48d15(%rip), %rdx # 0x2d80c
movq %rbx, %rdi
callq 0x21b70
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x21dc8
jmp 0x7653e
movq %rax, %r14
movb $0x1, %bpl
leaq 0x28(%rsp), %rdi
jmp 0x7654f
jmp 0x7655b
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x21dc8
testb %bpl, %bpl
jne 0x7655e
jmp 0x76566
movq %rax, %r14
movq %rbx, %rdi
callq 0x21530
movq %r14, %rdi
callq 0x21be0
| _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_:
push rbp; char
push r15; int
push r14; int
push rbx; int
sub rsp, 48h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_76461
mov r15, rsi
mov rdi, [r14+8]
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA10_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_
mov rcx, [r14+8]
cmp rax, [rcx+8]
jz short loc_764BF
add rax, 20h ; ' '
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_76461:
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+68h+var_40]
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
lea rdi, [rsp+68h+var_60]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
lea rdx, [rsp+68h+var_60]
mov rdi, rbx; this
mov esi, 130h; 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
jmp short loc_76529
loc_764BF:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_61]
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
lea rdi, [rsp+68h+var_60]
lea rdx, [rsp+68h+var_40]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
lea rdx, [rsp+68h+var_60]
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_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_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_76529:
mov r14, rax
lea rdi, [rsp+68h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_7653E
mov r14, rax
mov bpl, 1
loc_7653E:
lea rdi, [rsp+68h+var_40]
jmp short loc_7654F
jmp short loc_7655B
mov r14, rax
lea rdi, [rsp+68h+var_60]; void *
loc_7654F:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_7655E
jmp short loc_76566
loc_7655B:
mov r14, rax
loc_7655E:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_76566:
mov rdi, r14
call __Unwind_Resume
| long long 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_(
long long a1,
long long a2)
{
long long v2; // rax
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx
nlohmann::json_abi_v3_11_3::detail::out_of_range *v5; // rbx
char v6; // [rsp+0h] [rbp-68h]
int v7[6]; // [rsp+8h] [rbp-60h] BYREF
char v8; // [rsp+20h] [rbp-48h]
const char *v9; // [rsp+28h] [rbp-40h] BYREF
int v10; // [rsp+30h] [rbp-38h]
int v11; // [rsp+38h] [rbp-30h]
char v12; // [rsp+40h] [rbp-28h]
int v13; // [rsp+48h] [rbp-20h]
int v14; // [rsp+50h] [rbp-18h]
int v15; // [rsp+58h] [rbp-10h]
char v16; // [rsp+60h] [rbp-8h]
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
v9 = 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(&)[22],char const*>(v7, "cannot use at() with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
304,
(long long)v7);
__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);
}
v2 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA10_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_(*(long long **)(a1 + 8));
if ( v2 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) )
{
v5 = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL);
std::string::basic_string<std::allocator<char>>(&v9, a2);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
v7,
"key '",
&v9,
"' not found");
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
v5,
403,
v6,
v7[0],
v7[2],
v7[4],
v8,
(int)v9,
v10,
v11,
v12,
v13,
v14,
v15,
v16);
__cxa_throw(
v5,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return v2 + 32;
}
| _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_:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x00176461
MOV R15,RSI
MOV RDI,qword ptr [R14 + 0x8]
CALL 0x0014cfd2
MOV RCX,qword ptr [R14 + 0x8]
CMP RAX,qword ptr [RCX + 0x8]
JZ 0x001764bf
ADD RAX,0x20
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00176461:
PUSH 0x20
POP RDI
CALL 0x001213a0
MOV RBX,RAX
MOV RDI,R14
CALL 0x00130c70
LEA RDX,[RSP + 0x28]
MOV qword ptr [RDX],RAX
LAB_0017647c:
LEA RSI,[0x19e131]
LEA RDI,[RSP + 0x8]
CALL 0x00178d11
MOV BPL,0x1
LAB_00176490:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x0014749e
XOR EBP,EBP
LEA RSI,[0x1d9f50]
LEA RDX,[0x12d80c]
MOV RDI,RBX
CALL 0x00121b70
LAB_001764bf:
PUSH 0x20
POP RDI
CALL 0x001213a0
MOV RBX,RAX
LAB_001764ca:
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x7]
MOV RSI,R15
CALL 0x0012a484
LAB_001764dc:
LEA RSI,[0x19e161]
LEA RCX,[0x19e167]
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x28]
CALL 0x001791a8
MOV BPL,0x1
LAB_001764fc:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x00179298
XOR EBP,EBP
LEA RSI,[0x1d9ed0]
LEA RDX,[0x12d80c]
MOV RDI,RBX
CALL 0x00121b70
|
long _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_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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,char *param_2)
{
long lVar1;
int8 uVar2;
allocator local_61;
detail local_60 [32];
char *local_40 [4];
if (*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>
)0x1) {
uVar2 = __cxa_allocate_exception(0x20);
local_40[0] = (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 0017647c to 0017648c has its CatchHandler @ 0017655b */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(local_60,"cannot use at() with ",local_40);
/* try { // try from 00176490 to 001764bc has its CatchHandler @ 00176547 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar2,0x130,local_60,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
lVar1 = _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA10_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_
(*(int8 *)(param_1 + 8));
if (lVar1 != *(long *)(*(long *)(param_1 + 8) + 8)) {
return lVar1 + 0x20;
}
uVar2 = __cxa_allocate_exception(0x20);
/* try { // try from 001764ca to 001764db has its CatchHandler @ 00176545 */
std::__cxx11::string::string<std::allocator<char>>((string *)local_40,param_2,&local_61);
/* try { // try from 001764dc to 001764f8 has its CatchHandler @ 00176538 */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(local_60,"key \'",(string *)local_40,"\' not found");
/* try { // try from 001764fc to 00176528 has its CatchHandler @ 00176529 */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar2,0x193,local_60,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
|
|
6,109 | 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& 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>::at<char const (&) [9], 0>(char const (&) [9]) const | monkey531[P]llama/common/json.hpp | const_reference at(KeyType && key) const
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return it->second;
} | O3 | cpp | 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& 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>::at<char const (&) [9], 0>(char const (&) [9]) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0x87c4b
movq %rsi, %r15
movq 0x8(%r14), %r12
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0x87c35
movq %rbx, %rdi
movq %r15, %rsi
callq 0x19190
testl %eax, %eax
je 0x87c2a
addq $0x30, %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
jne 0x87c0b
jmp 0x87c2d
movq %rbx, %rax
movq 0x8(%r14), %rcx
movq 0x8(%rcx), %rbx
cmpq %rbx, %rax
je 0x87ca9
addq $0x20, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x19370
movq %rax, %rbx
movq %r14, %rdi
callq 0x2e9dc
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0x34474(%rip), %rsi # 0xbc0e1
leaq 0x20(%rsp), %rdi
callq 0x8d27e
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x4b610
xorl %ebp, %ebp
leaq 0x622b8(%rip), %rsi # 0xe9f50
leaq -0x5d04f(%rip), %rdx # 0x2ac50
movq %rbx, %rdi
callq 0x19b70
jmp 0x87d22
movl $0x20, %edi
callq 0x19370
movq %rax, %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x19310
leaq (%rax,%r15), %rdx
movq %rsp, %rdi
movq %r15, %rsi
callq 0x320e8
leaq 0x34433(%rip), %rsi # 0xbc111
leaq 0x34432(%rip), %rcx # 0xbc117
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x8d748
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0x8d7ee
xorl %ebp, %ebp
leaq 0x621bd(%rip), %rsi # 0xe9ed0
leaq -0x5d0ca(%rip), %rdx # 0x2ac50
movq %rbx, %rdi
callq 0x19b70
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x87d40
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x196b0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x87d8b
movq 0x10(%rsp), %rsi
jmp 0x87d83
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x87d95
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x196b0
jmp 0x87d95
jmp 0x87d92
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x87d8b
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x196b0
testb %bpl, %bpl
jne 0x87d95
jmp 0x87d9d
movq %rax, %r14
movq %rbx, %rdi
callq 0x19510
movq %r14, %rdi
callq 0x19be0
nop
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
push rbp; char
push r15; int
push r14; int
push r12; int
push rbx; char
sub rsp, 40h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_87C4B
mov r15, rsi
mov r12, [r14+8]
mov rbx, [r12]
mov rax, [r12+8]
cmp rbx, rax
jz short loc_87C35
loc_87C0B:
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_87C2A
add rbx, 30h ; '0'
mov rax, [r12+8]
cmp rbx, rax
jnz short loc_87C0B
jmp short loc_87C2D
loc_87C2A:
mov rax, rbx
loc_87C2D:
mov rcx, [r14+8]
mov rbx, [rcx+8]
loc_87C35:
cmp rax, rbx
jz short loc_87CA9
add rax, 20h ; ' '
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_87C4B:
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)
mov rdx, rsp
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
lea rdi, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 130h; 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
jmp short loc_87D22
loc_87CA9:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r12, [rsp+68h+var_58]
mov [r12-10h], r12
mov rdi, r15
call _strlen
lea rdx, [rax+r15]
mov rdi, rsp
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_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_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_87D22:
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_87D40
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_87D40:
mov rdi, [rsp+68h+var_68]
cmp rdi, r12
jz short loc_87D8B
mov rsi, [rsp+68h+var_58]
jmp short loc_87D83
mov r14, rax
mov rdi, [rsp+68h+var_68]; void *
cmp rdi, r12
jz short loc_87D95
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_87D95
jmp short loc_87D92
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_87D8B
mov rsi, [rsp+68h+var_38]
loc_87D83:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_87D8B:
test bpl, bpl
jnz short loc_87D95
jmp short loc_87D9D
loc_87D92:
mov r14, rax
loc_87D95:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_87D9D:
mov rdi, r14
call __Unwind_Resume
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x00187c4b
MOV R15,RSI
MOV R12,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [R12]
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JZ 0x00187c35
LAB_00187c0b:
MOV RDI,RBX
MOV RSI,R15
CALL 0x00119190
TEST EAX,EAX
JZ 0x00187c2a
ADD RBX,0x30
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JNZ 0x00187c0b
JMP 0x00187c2d
LAB_00187c2a:
MOV RAX,RBX
LAB_00187c2d:
MOV RCX,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [RCX + 0x8]
LAB_00187c35:
CMP RAX,RBX
JZ 0x00187ca9
ADD RAX,0x20
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00187c4b:
MOV EDI,0x20
CALL 0x00119370
MOV RBX,RAX
MOV RDI,R14
CALL 0x0012e9dc
MOV RDX,RSP
MOV qword ptr [RDX],RAX
LAB_00187c66:
LEA RSI,[0x1bc0e1]
LEA RDI,[RSP + 0x20]
CALL 0x0018d27e
MOV BPL,0x1
LAB_00187c7a:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x0014b610
XOR EBP,EBP
LEA RSI,[0x1e9f50]
LEA RDX,[0x12ac50]
MOV RDI,RBX
CALL 0x00119b70
LAB_00187ca9:
MOV EDI,0x20
CALL 0x00119370
MOV RBX,RAX
LEA R12,[RSP + 0x10]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,R15
CALL 0x00119310
LEA RDX,[RAX + R15*0x1]
LAB_00187ccc:
MOV RDI,RSP
MOV RSI,R15
CALL 0x001320e8
LAB_00187cd7:
LEA RSI,[0x1bc111]
LEA RCX,[0x1bc117]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x0018d748
MOV BPL,0x1
LAB_00187cf5:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x0018d7ee
XOR EBP,EBP
LEA RSI,[0x1e9ed0]
LEA RDX,[0x12ac50]
MOV RDI,RBX
CALL 0x00119b70
|
char * _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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,char *param_2)
{
long *plVar1;
int iVar2;
char *pcVar3;
int8 uVar4;
size_t sVar5;
char *pcVar6;
char *local_68 [2];
char local_58 [16];
detail local_48 [32];
if (*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>
)0x1) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = (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 00187c66 to 00187c76 has its CatchHandler @ 00187d92 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(local_48,"cannot use at() with ",local_68);
/* try { // try from 00187c7a to 00187ca6 has its CatchHandler @ 00187d6d */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar4,0x130,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
plVar1 = *(long **)(param_1 + 8);
pcVar6 = (char *)*plVar1;
pcVar3 = (char *)plVar1[1];
if (pcVar6 != pcVar3) {
do {
pcVar3 = pcVar6;
iVar2 = std::__cxx11::string::compare(pcVar3);
if (iVar2 == 0) break;
pcVar6 = pcVar3 + 0x30;
pcVar3 = (char *)plVar1[1];
} while (pcVar6 != pcVar3);
pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8);
}
if (pcVar3 == pcVar6) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = local_58;
sVar5 = strlen(param_2);
/* try { // try from 00187ccc to 00187cd6 has its CatchHandler @ 00187d6b */
std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5);
/* try { // try from 00187cd7 to 00187cf1 has its CatchHandler @ 00187d50 */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(local_48,"key \'",(string *)local_68,"\' not found");
/* try { // try from 00187cf5 to 00187d21 has its CatchHandler @ 00187d22 */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar4,0x193,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return pcVar3 + 0x20;
}
|
||
6,110 | stbi__get_marker | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image.h | static stbi_uc stbi__get_marker(stbi__jpeg *j)
{
stbi_uc x;
if (j->marker != STBI__MARKER_none) { x = j->marker; j->marker = STBI__MARKER_none; return x; }
x = stbi__get8(j->s);
if (x != 0xff) return STBI__MARKER_none;
while (x == 0xff)
x = stbi__get8(j->s); // consume repeated 0xff fill bytes
return x;
} | O1 | c | stbi__get_marker:
pushq %rbx
movq %rdi, %rbx
movb 0x4828(%rdi), %al
cmpb $-0x1, %al
je 0x37f03
movb $-0x1, 0x4828(%rbx)
jmp 0x37f20
movq (%rbx), %rdi
callq 0x35662
movl %eax, %ecx
movb $-0x1, %al
cmpb $-0x1, %cl
jne 0x37f20
movq (%rbx), %rdi
callq 0x35662
cmpb $-0x1, %al
je 0x37f14
popq %rbx
retq
| stbi__get_marker:
push rbx
mov rbx, rdi
mov al, [rdi+4828h]
cmp al, 0FFh
jz short loc_37F03
mov byte ptr [rbx+4828h], 0FFh
jmp short loc_37F20
loc_37F03:
mov rdi, [rbx]
call stbi__get8
mov ecx, eax
mov al, 0FFh
cmp cl, 0FFh
jnz short loc_37F20
loc_37F14:
mov rdi, [rbx]
call stbi__get8
cmp al, 0FFh
jz short loc_37F14
loc_37F20:
pop rbx
retn
| char stbi__get_marker(long long a1)
{
char result; // al
char v2; // cl
result = *(_BYTE *)(a1 + 18472);
if ( result == -1 )
{
v2 = stbi__get8(*(_QWORD *)a1);
result = -1;
if ( v2 == -1 )
{
do
result = stbi__get8(*(_QWORD *)a1);
while ( result == -1 );
}
}
else
{
*(_BYTE *)(a1 + 18472) = -1;
}
return result;
}
| stbi__get_marker:
PUSH RBX
MOV RBX,RDI
MOV AL,byte ptr [RDI + 0x4828]
CMP AL,0xff
JZ 0x00137f03
MOV byte ptr [RBX + 0x4828],0xff
JMP 0x00137f20
LAB_00137f03:
MOV RDI,qword ptr [RBX]
CALL 0x00135662
MOV ECX,EAX
MOV AL,0xff
CMP CL,0xff
JNZ 0x00137f20
LAB_00137f14:
MOV RDI,qword ptr [RBX]
CALL 0x00135662
CMP AL,0xff
JZ 0x00137f14
LAB_00137f20:
POP RBX
RET
|
char stbi__get_marker(int8 *param_1)
{
char cVar1;
char cVar2;
cVar2 = *(char *)(param_1 + 0x905);
if (cVar2 == -1) {
cVar1 = stbi__get8(*param_1);
cVar2 = -1;
while (cVar1 == -1) {
cVar1 = stbi__get8(*param_1);
cVar2 = cVar1;
}
}
else {
*(int1 *)(param_1 + 0x905) = 0xff;
}
return cVar2;
}
|
|
6,111 | my_round_up_to_next_power | eloqsql/include/my_bit.h | static inline uint32 my_round_up_to_next_power(uint32 v)
{
v--; /* 01100000000000000000000000001010 */
v|= v >> 1; /* 01110000000000000000000000001111 */
v|= v >> 2; /* 01111100000000000000000000001111 */
v|= v >> 4; /* 01111111110000000000000000001111 */
v|= v >> 8; /* 01111111111111111100000000001111 */
v|= v >> 16; /* 01111111111111111111111111111111 */
return v+1; /* 10000000000000000000000000000000 */
} | O0 | c | my_round_up_to_next_power:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
shrl %eax
orl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
shrl $0x2, %eax
orl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
shrl $0x4, %eax
orl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
shrl $0x8, %eax
orl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
shrl $0x10, %eax
orl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addl $0x1, %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_round_up_to_next_power_1:
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov eax, [rbp+var_4]
add eax, 0FFFFFFFFh
mov [rbp+var_4], eax
mov eax, [rbp+var_4]
shr eax, 1
or eax, [rbp+var_4]
mov [rbp+var_4], eax
mov eax, [rbp+var_4]
shr eax, 2
or eax, [rbp+var_4]
mov [rbp+var_4], eax
mov eax, [rbp+var_4]
shr eax, 4
or eax, [rbp+var_4]
mov [rbp+var_4], eax
mov eax, [rbp+var_4]
shr eax, 8
or eax, [rbp+var_4]
mov [rbp+var_4], eax
mov eax, [rbp+var_4]
shr eax, 10h
or eax, [rbp+var_4]
mov [rbp+var_4], eax
mov eax, [rbp+var_4]
add eax, 1
pop rbp
retn
| long long my_round_up_to_next_power_1(int a1)
{
unsigned int v2; // [rsp+0h] [rbp-4h]
unsigned int v3; // [rsp+0h] [rbp-4h]
v2 = (a1 - 1) | ((unsigned int)(a1 - 1) >> 1) | (((a1 - 1) | ((unsigned int)(a1 - 1) >> 1)) >> 2);
v3 = v2 | (v2 >> 4) | ((v2 | (v2 >> 4)) >> 8);
return (v3 | HIWORD(v3)) + 1;
}
| my_round_up_to_next_power:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV EAX,dword ptr [RBP + -0x4]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x4],EAX
MOV EAX,dword ptr [RBP + -0x4]
SHR EAX,0x1
OR EAX,dword ptr [RBP + -0x4]
MOV dword ptr [RBP + -0x4],EAX
MOV EAX,dword ptr [RBP + -0x4]
SHR EAX,0x2
OR EAX,dword ptr [RBP + -0x4]
MOV dword ptr [RBP + -0x4],EAX
MOV EAX,dword ptr [RBP + -0x4]
SHR EAX,0x4
OR EAX,dword ptr [RBP + -0x4]
MOV dword ptr [RBP + -0x4],EAX
MOV EAX,dword ptr [RBP + -0x4]
SHR EAX,0x8
OR EAX,dword ptr [RBP + -0x4]
MOV dword ptr [RBP + -0x4],EAX
MOV EAX,dword ptr [RBP + -0x4]
SHR EAX,0x10
OR EAX,dword ptr [RBP + -0x4]
MOV dword ptr [RBP + -0x4],EAX
MOV EAX,dword ptr [RBP + -0x4]
ADD EAX,0x1
POP RBP
RET
|
int my_round_up_to_next_power(int param_1)
{
uint uVar1;
uVar1 = param_1 - 1U >> 1 | param_1 - 1U;
uVar1 = uVar1 >> 2 | uVar1;
uVar1 = uVar1 >> 4 | uVar1;
uVar1 = uVar1 >> 8 | uVar1;
return (uVar1 >> 0x10 | uVar1) + 1;
}
|
|
6,112 | ma_net_write | eloqsql/libmariadb/libmariadb/ma_net.c | int ma_net_write(NET *net, const uchar *packet, size_t len)
{
uchar buff[NET_HEADER_SIZE];
while (len >= MAX_PACKET_LENGTH)
{
const ulong max_len= MAX_PACKET_LENGTH;
int3store(buff,max_len);
buff[3]= (uchar)net->pkt_nr++;
if (ma_net_write_buff(net,(char*) buff,NET_HEADER_SIZE) ||
ma_net_write_buff(net, (char *)packet, max_len))
return 1;
packet+= max_len;
len-= max_len;
}
/* write last remaining packet, size can be zero */
int3store(buff, len);
buff[3]= (uchar)net->pkt_nr++;
if (ma_net_write_buff(net,(char*) buff,NET_HEADER_SIZE) ||
ma_net_write_buff(net, (char *)packet, len))
return 1;
return 0;
} | O3 | c | ma_net_write:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
cmpq $0xffffff, %rdx # imm = 0xFFFFFF
jb 0x365d8
leaq -0x34(%rbp), %r12
movl $0x1, %r13d
movw $0xffff, -0x34(%rbp) # imm = 0xFFFF
movb $-0x1, -0x32(%rbp)
movl 0x60(%r15), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x60(%r15)
movb %al, -0x31(%rbp)
movl $0x4, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x36645
testl %eax, %eax
jne 0x3661f
movl $0xffffff, %edx # imm = 0xFFFFFF
movq %r15, %rdi
movq %r14, %rsi
callq 0x36645
testl %eax, %eax
jne 0x3661f
addq $0xffffff, %r14 # imm = 0xFFFFFF
addq $-0xffffff, %rbx # imm = 0xFF000001
cmpq $0xfffffe, %rbx # imm = 0xFFFFFE
ja 0x36581
leaq -0x34(%rbp), %rsi
movb %bl, (%rsi)
movb %bh, -0x33(%rbp)
movl %ebx, %eax
shrl $0x10, %eax
movb %al, 0x2(%rsi)
movl 0x60(%r15), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x60(%r15)
movb %al, 0x3(%rsi)
movl $0x4, %edx
movq %r15, %rdi
callq 0x36645
movl $0x1, %r13d
testl %eax, %eax
jne 0x3661f
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x36645
movl %eax, %r13d
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x36640
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x13500
| ma_net_write:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdx
mov r14, rsi
mov r15, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
cmp rdx, 0FFFFFFh
jb short loc_365D8
lea r12, [rbp+var_34]
mov r13d, 1
loc_36581:
mov [rbp+var_34], 0FFFFh
mov [rbp+var_32], 0FFh
mov eax, [r15+60h]
lea ecx, [rax+1]
mov [r15+60h], ecx
mov [rbp+var_31], al
mov edx, 4
mov rdi, r15
mov rsi, r12
call ma_net_write_buff
test eax, eax
jnz short loc_3661F
mov edx, 0FFFFFFh
mov rdi, r15
mov rsi, r14
call ma_net_write_buff
test eax, eax
jnz short loc_3661F
add r14, 0FFFFFFh
add rbx, 0FFFFFFFFFF000001h
cmp rbx, 0FFFFFEh
ja short loc_36581
loc_365D8:
lea rsi, [rbp+var_34]
mov [rsi], bl
mov byte ptr [rbp+var_34+1], bh
mov eax, ebx
shr eax, 10h
mov [rsi+2], al
mov eax, [r15+60h]
lea ecx, [rax+1]
mov [r15+60h], ecx
mov [rsi+3], al
mov edx, 4
mov rdi, r15
call ma_net_write_buff
mov r13d, 1
test eax, eax
jnz short loc_3661F
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call ma_net_write_buff
mov r13d, eax
loc_3661F:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_36640
mov eax, r13d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_36640:
call ___stack_chk_fail
| long long ma_net_write(long long a1, long long a2, unsigned long long a3)
{
unsigned long long v3; // rbx
unsigned int v5; // r13d
int v6; // eax
int v7; // eax
__int16 v9; // [rsp+Ch] [rbp-34h] BYREF
char v10; // [rsp+Eh] [rbp-32h]
char v11; // [rsp+Fh] [rbp-31h]
unsigned long long v12; // [rsp+10h] [rbp-30h]
v3 = a3;
v12 = __readfsqword(0x28u);
if ( a3 < 0xFFFFFF )
{
LABEL_6:
v9 = v3;
v10 = BYTE2(v3);
v7 = *(_DWORD *)(a1 + 96);
*(_DWORD *)(a1 + 96) = v7 + 1;
v11 = v7;
v5 = 1;
if ( !(unsigned int)ma_net_write_buff(a1, &v9, 4LL) )
return (unsigned int)ma_net_write_buff(a1, a2, v3);
}
else
{
v5 = 1;
while ( 1 )
{
v9 = -1;
v10 = -1;
v6 = *(_DWORD *)(a1 + 96);
*(_DWORD *)(a1 + 96) = v6 + 1;
v11 = v6;
if ( (unsigned int)ma_net_write_buff(a1, &v9, 4LL) || (unsigned int)ma_net_write_buff(a1, a2, 0xFFFFFFLL) )
break;
a2 += 0xFFFFFFLL;
v3 -= 0xFFFFFFLL;
if ( v3 <= 0xFFFFFE )
goto LABEL_6;
}
}
return v5;
}
| ma_net_write:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
CMP RDX,0xffffff
JC 0x001365d8
LEA R12,[RBP + -0x34]
MOV R13D,0x1
LAB_00136581:
MOV word ptr [RBP + -0x34],0xffff
MOV byte ptr [RBP + -0x32],0xff
MOV EAX,dword ptr [R15 + 0x60]
LEA ECX,[RAX + 0x1]
MOV dword ptr [R15 + 0x60],ECX
MOV byte ptr [RBP + -0x31],AL
MOV EDX,0x4
MOV RDI,R15
MOV RSI,R12
CALL 0x00136645
TEST EAX,EAX
JNZ 0x0013661f
MOV EDX,0xffffff
MOV RDI,R15
MOV RSI,R14
CALL 0x00136645
TEST EAX,EAX
JNZ 0x0013661f
ADD R14,0xffffff
ADD RBX,-0xffffff
CMP RBX,0xfffffe
JA 0x00136581
LAB_001365d8:
LEA RSI,[RBP + -0x34]
MOV byte ptr [RSI],BL
MOV byte ptr [RBP + -0x33],BH
MOV EAX,EBX
SHR EAX,0x10
MOV byte ptr [RSI + 0x2],AL
MOV EAX,dword ptr [R15 + 0x60]
LEA ECX,[RAX + 0x1]
MOV dword ptr [R15 + 0x60],ECX
MOV byte ptr [RSI + 0x3],AL
MOV EDX,0x4
MOV RDI,R15
CALL 0x00136645
MOV R13D,0x1
TEST EAX,EAX
JNZ 0x0013661f
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x00136645
MOV R13D,EAX
LAB_0013661f:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00136640
MOV EAX,R13D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00136640:
CALL 0x00113500
|
int4 ma_net_write(long param_1,long param_2,ulong param_3)
{
int iVar1;
int4 uVar2;
long in_FS_OFFSET;
int2 local_3c;
int1 local_3a;
int1 local_39;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
if (0xfffffe < param_3) {
uVar2 = 1;
do {
local_3c = 0xffff;
local_3a = 0xff;
iVar1 = *(int *)(param_1 + 0x60);
*(int *)(param_1 + 0x60) = iVar1 + 1;
local_39 = (int1)iVar1;
iVar1 = ma_net_write_buff(param_1,&local_3c,4);
if (iVar1 != 0) goto LAB_0013661f;
iVar1 = ma_net_write_buff(param_1,param_2,0xffffff);
if (iVar1 != 0) goto LAB_0013661f;
param_2 = param_2 + 0xffffff;
param_3 = param_3 - 0xffffff;
} while (0xfffffe < param_3);
}
local_3c = (int2)param_3;
local_3a = (int1)(param_3 >> 0x10);
iVar1 = *(int *)(param_1 + 0x60);
*(int *)(param_1 + 0x60) = iVar1 + 1;
local_39 = (int1)iVar1;
iVar1 = ma_net_write_buff(param_1,&local_3c,4);
uVar2 = 1;
if (iVar1 == 0) {
uVar2 = ma_net_write_buff(param_1,param_2,param_3);
}
LAB_0013661f:
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return uVar2;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
6,113 | pre_ec_mul | corpus-core[P]colibri-stateless/src/chains/eth/precompiles/precompiles_ec.c | pre_result_t pre_ec_mul(bytes_t input, buffer_t* output, uint64_t* gas_used) {
*gas_used = 40000; // Gas cost of EC multiplication
// Implementation similar to pre_ec_add but using scalar multiplication
// For a complete implementation, would implement scalar multiplication algorithm
output->data.len = 0;
buffer_grow(output, 64);
memset(output->data.data, 0, 64);
return PRE_ERROR; // Indicating that the implementation is incomplete
} | O0 | c | pre_ec_mul:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x10(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq $0x9c40, (%rax) # imm = 0x9C40
movq -0x18(%rbp), %rax
movl $0x0, (%rax)
movq -0x18(%rbp), %rdi
movl $0x40, %esi
callq 0x9dfa0
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
movl $0x40, %edx
callq 0x231c0
movl $0x1, %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| pre_ec_mul:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], edi
mov [rbp+var_8], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rax, [rbp+var_20]
mov qword ptr [rax], 9C40h
mov rax, [rbp+var_18]
mov dword ptr [rax], 0
mov rdi, [rbp+var_18]
mov esi, 40h ; '@'
call buffer_grow
mov rax, [rbp+var_18]
mov rdi, [rax+8]
xor esi, esi
mov edx, 40h ; '@'
call _memset
mov eax, 1
add rsp, 20h
pop rbp
retn
| long long pre_ec_mul(long long a1, long long a2, long long a3, _QWORD *a4)
{
*a4 = 40000LL;
*(_DWORD *)a3 = 0;
buffer_grow(a3, 64LL);
memset(*(_QWORD *)(a3 + 8), 0LL, 64LL);
return 1LL;
}
| pre_ec_mul:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x10],EDI
MOV qword ptr [RBP + -0x8],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],0x9c40
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX],0x0
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,0x40
CALL 0x0019dfa0
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x8]
XOR ESI,ESI
MOV EDX,0x40
CALL 0x001231c0
MOV EAX,0x1
ADD RSP,0x20
POP RBP
RET
|
int8 pre_ec_mul(int8 param_1,int8 param_2,int4 *param_3,int8 *param_4)
{
*param_4 = 40000;
*param_3 = 0;
buffer_grow(param_3);
memset(*(void **)(param_3 + 2),0,0x40);
return 1;
}
|
|
6,114 | pre_ec_mul | corpus-core[P]colibri-stateless/src/chains/eth/precompiles/precompiles_ec.c | pre_result_t pre_ec_mul(bytes_t input, buffer_t* output, uint64_t* gas_used) {
*gas_used = 40000; // Gas cost of EC multiplication
// Implementation similar to pre_ec_add but using scalar multiplication
// For a complete implementation, would implement scalar multiplication algorithm
output->data.len = 0;
buffer_grow(output, 64);
memset(output->data.data, 0, 64);
return PRE_ERROR; // Indicating that the implementation is incomplete
} | O3 | c | pre_ec_mul:
pushq %rbx
movq %rdx, %rbx
movq $0x9c40, (%rcx) # imm = 0x9C40
movl $0x0, (%rdx)
movl $0x40, %esi
movq %rdx, %rdi
callq 0x52fbd
movq 0x8(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movl $0x1, %eax
popq %rbx
retq
| pre_ec_mul:
push rbx
mov rbx, rdx
mov qword ptr [rcx], 9C40h
mov dword ptr [rdx], 0
mov esi, 40h ; '@'
mov rdi, rdx
call buffer_grow
mov rax, [rbx+8]
xorps xmm0, xmm0
movups xmmword ptr [rax+30h], xmm0
movups xmmword ptr [rax+20h], xmm0
movups xmmword ptr [rax+10h], xmm0
movups xmmword ptr [rax], xmm0
mov eax, 1
pop rbx
retn
| long long pre_ec_mul(long long a1, long long a2, long long a3, _QWORD *a4)
{
_OWORD *v5; // rax
*a4 = 40000LL;
*(_DWORD *)a3 = 0;
buffer_grow(a3, 64LL);
v5 = *(_OWORD **)(a3 + 8);
v5[3] = 0LL;
v5[2] = 0LL;
v5[1] = 0LL;
*v5 = 0LL;
return 1LL;
}
| pre_ec_mul:
PUSH RBX
MOV RBX,RDX
MOV qword ptr [RCX],0x9c40
MOV dword ptr [RDX],0x0
MOV ESI,0x40
MOV RDI,RDX
CALL 0x00152fbd
MOV RAX,qword ptr [RBX + 0x8]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + 0x30],XMM0
MOVUPS xmmword ptr [RAX + 0x20],XMM0
MOVUPS xmmword ptr [RAX + 0x10],XMM0
MOVUPS xmmword ptr [RAX],XMM0
MOV EAX,0x1
POP RBX
RET
|
int8 pre_ec_mul(int8 param_1,int8 param_2,int4 *param_3,int8 *param_4)
{
int8 *puVar1;
*param_4 = 40000;
*param_3 = 0;
buffer_grow(param_3,0x40);
puVar1 = *(int8 **)(param_3 + 2);
puVar1[6] = 0;
puVar1[7] = 0;
puVar1[4] = 0;
puVar1[5] = 0;
puVar1[2] = 0;
puVar1[3] = 0;
*puVar1 = 0;
puVar1[1] = 0;
return 1;
}
|
|
6,115 | cleanup_dirname | eloqsql/mysys/mf_pack.c | size_t cleanup_dirname(register char *to, const char *from)
{
reg5 size_t length;
reg2 char * pos;
reg3 char * from_ptr;
reg4 char * start;
char parent[5], /* for "FN_PARENTDIR" */
buff[FN_REFLEN + 1],*end_parentdir;
#ifdef BACKSLASH_MBTAIL
CHARSET_INFO *fs= fs_character_set();
#endif
DBUG_ENTER("cleanup_dirname");
DBUG_PRINT("enter",("from: '%s'",from));
start=buff;
from_ptr=(char *) from;
#ifdef FN_DEVCHAR
if ((pos=strrchr(from_ptr,FN_DEVCHAR)) != 0)
{ /* Skip device part */
length=(size_t) (pos-from_ptr)+1;
start=strnmov(buff,from_ptr,length); from_ptr+=length;
}
#endif
parent[0]=FN_LIBCHAR;
length=(size_t) (strmov(parent+1,FN_PARENTDIR)-parent);
for (pos=start ; (*pos= *from_ptr++) != 0 ; pos++)
{
#ifdef BACKSLASH_MBTAIL
uint l;
if (my_ci_use_mb(fs) && (l= my_ismbchar(fs, from_ptr - 1, from_ptr + 2)))
{
for (l-- ; l ; *++pos= *from_ptr++, l--);
start= pos + 1; /* Don't look inside multi-byte char */
continue;
}
#endif
if (*pos == '/')
*pos = FN_LIBCHAR;
if (*pos == FN_LIBCHAR)
{
if ((size_t) (pos-start) > length && memcmp(pos-length,parent,length) == 0)
{ /* If .../../; skip prev */
pos-=length;
if (pos != start)
{ /* not /../ */
pos--;
if (*pos == FN_HOMELIB && (pos == start || pos[-1] == FN_LIBCHAR))
{
if (!home_dir)
{
pos+=length+1; /* Don't unpack ~/.. */
continue;
}
pos=strmov(buff,home_dir)-1; /* Unpacks ~/.. */
if (*pos == FN_LIBCHAR)
pos--; /* home ended with '/' */
}
if (*pos == FN_CURLIB && (pos == start || pos[-1] == FN_LIBCHAR))
{
if (my_getwd(curr_dir,FN_REFLEN,MYF(0)))
{
pos+=length+1; /* Don't unpack ./.. */
continue;
}
pos=strmov(buff,curr_dir)-1; /* Unpacks ./.. */
if (*pos == FN_LIBCHAR)
pos--; /* home ended with '/' */
}
end_parentdir=pos;
while (pos >= start && *pos != FN_LIBCHAR) /* remove prev dir */
pos--;
if (pos[1] == FN_HOMELIB ||
(pos >= start && memcmp(pos, parent, length) == 0))
{ /* Don't remove ~user/ */
pos=strmov(end_parentdir+1,parent);
*pos=FN_LIBCHAR;
continue;
}
}
}
else if ((size_t) (pos-start) == length-1 &&
!memcmp(start,parent+1,length-1))
start=pos; /* Starts with "../" */
else if (pos-start > 0 && pos[-1] == FN_LIBCHAR)
{
#ifdef FN_NETWORK_DRIVES
if (pos-start != 1)
#endif
pos--; /* Remove dupplicate '/' */
}
else if (pos-start > 1 && pos[-1] == FN_CURLIB && pos[-2] == FN_LIBCHAR)
pos-=2; /* Skip /./ */
}
}
(void) strmov(to,buff);
DBUG_PRINT("exit",("to: '%s'",to));
DBUG_RETURN((size_t) (pos-buff));
} | O0 | c | cleanup_dirname:
pushq %rbp
movq %rsp, %rbp
subq $0x260, %rsp # imm = 0x260
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x218(%rbp)
movq %rsi, -0x220(%rbp)
jmp 0xed108
leaq -0x210(%rbp), %rax
movq %rax, -0x240(%rbp)
movq -0x220(%rbp), %rax
movq %rax, -0x238(%rbp)
movb $0x2f, -0xd(%rbp)
leaq -0xd(%rbp), %rdi
addq $0x1, %rdi
leaq 0x70d50(%rip), %rsi # 0x15de87
callq 0x2a7a0
leaq -0xd(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x228(%rbp)
movq -0x240(%rbp), %rax
movq %rax, -0x230(%rbp)
movq -0x238(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x238(%rbp)
movb (%rax), %al
movq -0x230(%rbp), %rcx
movb %al, (%rcx)
movsbl %al, %eax
cmpl $0x0, %eax
je 0xed551
movq -0x230(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0xed19d
movq -0x230(%rbp), %rax
movb $0x2f, (%rax)
movq -0x230(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0xed538
movq -0x230(%rbp), %rax
movq -0x240(%rbp), %rcx
subq %rcx, %rax
cmpq -0x228(%rbp), %rax
jbe 0xed454
movq -0x230(%rbp), %rdi
xorl %eax, %eax
subq -0x228(%rbp), %rax
addq %rax, %rdi
leaq -0xd(%rbp), %rsi
movq -0x228(%rbp), %rdx
callq 0x2a8c0
cmpl $0x0, %eax
jne 0xed454
movq -0x228(%rbp), %rdx
movq -0x230(%rbp), %rax
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rax
cmpq -0x240(%rbp), %rax
je 0xed44f
movq -0x230(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x7e, %eax
jne 0xed2df
movq -0x230(%rbp), %rax
cmpq -0x240(%rbp), %rax
je 0xed270
movq -0x230(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x2f, %eax
jne 0xed2df
leaq 0xba0b01(%rip), %rax # 0xc8dd78
cmpq $0x0, (%rax)
jne 0xed29b
movq -0x228(%rbp), %rax
addq $0x1, %rax
addq -0x230(%rbp), %rax
movq %rax, -0x230(%rbp)
jmp 0xed53a
leaq -0x210(%rbp), %rdi
leaq 0xba0acf(%rip), %rax # 0xc8dd78
movq (%rax), %rsi
callq 0x2a7a0
addq $-0x1, %rax
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0xed2dd
movq -0x230(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x230(%rbp)
jmp 0xed2df
movq -0x230(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0xed38b
movq -0x230(%rbp), %rax
cmpq -0x240(%rbp), %rax
je 0xed312
movq -0x230(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x2f, %eax
jne 0xed38b
leaq 0xba0a77(%rip), %rdi # 0xc8dd90
movl $0x200, %esi # imm = 0x200
xorl %eax, %eax
movl %eax, %edx
callq 0xf8950
cmpl $0x0, %eax
je 0xed34a
movq -0x228(%rbp), %rax
addq $0x1, %rax
addq -0x230(%rbp), %rax
movq %rax, -0x230(%rbp)
jmp 0xed53a
leaq -0x210(%rbp), %rdi
leaq 0xba0a38(%rip), %rsi # 0xc8dd90
callq 0x2a7a0
addq $-0x1, %rax
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0xed389
movq -0x230(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x230(%rbp)
jmp 0xed38b
movq -0x230(%rbp), %rax
movq %rax, -0x248(%rbp)
movq -0x230(%rbp), %rcx
xorl %eax, %eax
cmpq -0x240(%rbp), %rcx
movb %al, -0x249(%rbp)
jb 0xed3c7
movq -0x230(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
setne %al
movb %al, -0x249(%rbp)
movb -0x249(%rbp), %al
testb $0x1, %al
jne 0xed3d3
jmp 0xed3e7
movq -0x230(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x230(%rbp)
jmp 0xed399
movq -0x230(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x7e, %eax
je 0xed423
movq -0x230(%rbp), %rax
cmpq -0x240(%rbp), %rax
jb 0xed44d
movq -0x230(%rbp), %rdi
leaq -0xd(%rbp), %rsi
movq -0x228(%rbp), %rdx
callq 0x2a8c0
cmpl $0x0, %eax
jne 0xed44d
movq -0x248(%rbp), %rdi
addq $0x1, %rdi
leaq -0xd(%rbp), %rsi
callq 0x2a7a0
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rax
movb $0x2f, (%rax)
jmp 0xed53a
jmp 0xed44f
jmp 0xed536
movq -0x230(%rbp), %rax
movq -0x240(%rbp), %rcx
subq %rcx, %rax
movq -0x228(%rbp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jne 0xed4ac
movq -0x240(%rbp), %rdi
leaq -0xd(%rbp), %rsi
addq $0x1, %rsi
movq -0x228(%rbp), %rdx
subq $0x1, %rdx
callq 0x2a8c0
cmpl $0x0, %eax
jne 0xed4ac
movq -0x230(%rbp), %rax
movq %rax, -0x240(%rbp)
jmp 0xed534
movq -0x230(%rbp), %rax
movq -0x240(%rbp), %rcx
subq %rcx, %rax
cmpq $0x0, %rax
jle 0xed4e7
movq -0x230(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x2f, %eax
jne 0xed4e7
movq -0x230(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x230(%rbp)
jmp 0xed532
movq -0x230(%rbp), %rax
movq -0x240(%rbp), %rcx
subq %rcx, %rax
cmpq $0x1, %rax
jle 0xed530
movq -0x230(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x2e, %eax
jne 0xed530
movq -0x230(%rbp), %rax
movsbl -0x2(%rax), %eax
cmpl $0x2f, %eax
jne 0xed530
movq -0x230(%rbp), %rax
addq $-0x2, %rax
movq %rax, -0x230(%rbp)
jmp 0xed532
jmp 0xed534
jmp 0xed536
jmp 0xed538
jmp 0xed53a
movq -0x230(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x230(%rbp)
jmp 0xed158
movq -0x218(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x2a7a0
jmp 0xed566
jmp 0xed568
movq -0x230(%rbp), %rax
leaq -0x210(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x258(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xed5a2
movq -0x258(%rbp), %rax
addq $0x260, %rsp # imm = 0x260
popq %rbp
retq
callq 0x2a270
nopw (%rax,%rax)
| cleanup_dirname:
push rbp
mov rbp, rsp
sub rsp, 260h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_218], rdi
mov [rbp+var_220], rsi
jmp short $+2
loc_ED108:
lea rax, [rbp+var_210]
mov [rbp+var_240], rax
mov rax, [rbp+var_220]
mov [rbp+var_238], rax
mov [rbp+var_D], 2Fh ; '/'
lea rdi, [rbp+var_D]
add rdi, 1
lea rsi, asc_15DE87; ".."
call _stpcpy
lea rcx, [rbp+var_D]
sub rax, rcx
mov [rbp+var_228], rax
mov rax, [rbp+var_240]
mov [rbp+var_230], rax
loc_ED158:
mov rax, [rbp+var_238]
mov rcx, rax
add rcx, 1
mov [rbp+var_238], rcx
mov al, [rax]
mov rcx, [rbp+var_230]
mov [rcx], al
movsx eax, al
cmp eax, 0
jz loc_ED551
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz short loc_ED19D
mov rax, [rbp+var_230]
mov byte ptr [rax], 2Fh ; '/'
loc_ED19D:
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz loc_ED538
mov rax, [rbp+var_230]
mov rcx, [rbp+var_240]
sub rax, rcx
cmp rax, [rbp+var_228]
jbe loc_ED454
mov rdi, [rbp+var_230]
xor eax, eax
sub rax, [rbp+var_228]
add rdi, rax
lea rsi, [rbp+var_D]
mov rdx, [rbp+var_228]
call _memcmp
cmp eax, 0
jnz loc_ED454
mov rdx, [rbp+var_228]
mov rax, [rbp+var_230]
xor ecx, ecx
sub rcx, rdx
add rax, rcx
mov [rbp+var_230], rax
mov rax, [rbp+var_230]
cmp rax, [rbp+var_240]
jz loc_ED44F
mov rax, [rbp+var_230]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_230], rax
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax]
cmp eax, 7Eh ; '~'
jnz loc_ED2DF
mov rax, [rbp+var_230]
cmp rax, [rbp+var_240]
jz short loc_ED270
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax-1]
cmp eax, 2Fh ; '/'
jnz short loc_ED2DF
loc_ED270:
lea rax, home_dir
cmp qword ptr [rax], 0
jnz short loc_ED29B
mov rax, [rbp+var_228]
add rax, 1
add rax, [rbp+var_230]
mov [rbp+var_230], rax
jmp loc_ED53A
loc_ED29B:
lea rdi, [rbp+var_210]
lea rax, home_dir
mov rsi, [rax]
call _stpcpy
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_230], rax
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz short loc_ED2DD
mov rax, [rbp+var_230]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_230], rax
loc_ED2DD:
jmp short $+2
loc_ED2DF:
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax]
cmp eax, 2Eh ; '.'
jnz loc_ED38B
mov rax, [rbp+var_230]
cmp rax, [rbp+var_240]
jz short loc_ED312
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax-1]
cmp eax, 2Fh ; '/'
jnz short loc_ED38B
loc_ED312:
lea rdi, curr_dir
mov esi, 200h
xor eax, eax
mov edx, eax
call my_getwd
cmp eax, 0
jz short loc_ED34A
mov rax, [rbp+var_228]
add rax, 1
add rax, [rbp+var_230]
mov [rbp+var_230], rax
jmp loc_ED53A
loc_ED34A:
lea rdi, [rbp+var_210]
lea rsi, curr_dir
call _stpcpy
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_230], rax
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz short loc_ED389
mov rax, [rbp+var_230]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_230], rax
loc_ED389:
jmp short $+2
loc_ED38B:
mov rax, [rbp+var_230]
mov [rbp+var_248], rax
loc_ED399:
mov rcx, [rbp+var_230]
xor eax, eax
cmp rcx, [rbp+var_240]
mov [rbp+var_249], al
jb short loc_ED3C7
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
setnz al
mov [rbp+var_249], al
loc_ED3C7:
mov al, [rbp+var_249]
test al, 1
jnz short loc_ED3D3
jmp short loc_ED3E7
loc_ED3D3:
mov rax, [rbp+var_230]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_230], rax
jmp short loc_ED399
loc_ED3E7:
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax+1]
cmp eax, 7Eh ; '~'
jz short loc_ED423
mov rax, [rbp+var_230]
cmp rax, [rbp+var_240]
jb short loc_ED44D
mov rdi, [rbp+var_230]
lea rsi, [rbp+var_D]
mov rdx, [rbp+var_228]
call _memcmp
cmp eax, 0
jnz short loc_ED44D
loc_ED423:
mov rdi, [rbp+var_248]
add rdi, 1
lea rsi, [rbp+var_D]
call _stpcpy
mov [rbp+var_230], rax
mov rax, [rbp+var_230]
mov byte ptr [rax], 2Fh ; '/'
jmp loc_ED53A
loc_ED44D:
jmp short $+2
loc_ED44F:
jmp loc_ED536
loc_ED454:
mov rax, [rbp+var_230]
mov rcx, [rbp+var_240]
sub rax, rcx
mov rcx, [rbp+var_228]
sub rcx, 1
cmp rax, rcx
jnz short loc_ED4AC
mov rdi, [rbp+var_240]
lea rsi, [rbp+var_D]
add rsi, 1
mov rdx, [rbp+var_228]
sub rdx, 1
call _memcmp
cmp eax, 0
jnz short loc_ED4AC
mov rax, [rbp+var_230]
mov [rbp+var_240], rax
jmp loc_ED534
loc_ED4AC:
mov rax, [rbp+var_230]
mov rcx, [rbp+var_240]
sub rax, rcx
cmp rax, 0
jle short loc_ED4E7
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax-1]
cmp eax, 2Fh ; '/'
jnz short loc_ED4E7
mov rax, [rbp+var_230]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_230], rax
jmp short loc_ED532
loc_ED4E7:
mov rax, [rbp+var_230]
mov rcx, [rbp+var_240]
sub rax, rcx
cmp rax, 1
jle short loc_ED530
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax-1]
cmp eax, 2Eh ; '.'
jnz short loc_ED530
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax-2]
cmp eax, 2Fh ; '/'
jnz short loc_ED530
mov rax, [rbp+var_230]
add rax, 0FFFFFFFFFFFFFFFEh
mov [rbp+var_230], rax
loc_ED530:
jmp short $+2
loc_ED532:
jmp short $+2
loc_ED534:
jmp short $+2
loc_ED536:
jmp short $+2
loc_ED538:
jmp short $+2
loc_ED53A:
mov rax, [rbp+var_230]
add rax, 1
mov [rbp+var_230], rax
jmp loc_ED158
loc_ED551:
mov rdi, [rbp+var_218]
lea rsi, [rbp+var_210]
call _stpcpy
jmp short $+2
loc_ED566:
jmp short $+2
loc_ED568:
mov rax, [rbp+var_230]
lea rcx, [rbp+var_210]
sub rax, rcx
mov [rbp+var_258], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_ED5A2
mov rax, [rbp+var_258]
add rsp, 260h
pop rbp
retn
loc_ED5A2:
call ___stack_chk_fail
| long long cleanup_dirname(long long a1, _BYTE *a2)
{
_BYTE *v2; // rax
bool v4; // [rsp+17h] [rbp-249h]
_BYTE *v5; // [rsp+18h] [rbp-248h]
_BYTE *v6; // [rsp+20h] [rbp-240h]
_BYTE *i; // [rsp+30h] [rbp-230h]
unsigned long long v9; // [rsp+38h] [rbp-228h]
long long v10; // [rsp+48h] [rbp-218h]
_BYTE v11[515]; // [rsp+50h] [rbp-210h] BYREF
char v12; // [rsp+253h] [rbp-Dh] BYREF
_BYTE v13[12]; // [rsp+254h] [rbp-Ch] BYREF
*(_QWORD *)&v13[4] = __readfsqword(0x28u);
v10 = a1;
v6 = v11;
v12 = 47;
v9 = stpcpy(v13, "..") - (_QWORD)&v12;
for ( i = v11; ; ++i )
{
v2 = a2++;
LOBYTE(v2) = *v2;
*i = (_BYTE)v2;
if ( !(_BYTE)v2 )
break;
if ( *i == 47 )
*i = 47;
if ( *i == 47 )
{
if ( i - v6 > v9 && !(unsigned int)memcmp(&i[-v9], &v12, v9) )
{
i -= v9;
if ( i != v6 )
{
if ( *--i == 126 && (i == v6 || *(i - 1) == 47) )
{
if ( !home_dir )
{
i += v9 + 1;
continue;
}
i = (_BYTE *)(stpcpy(v11, home_dir) - 1);
if ( *i == 47 )
--i;
}
if ( *i == 46 && (i == v6 || *(i - 1) == 47) )
{
if ( (unsigned int)my_getwd(&curr_dir, 512LL, 0LL) )
{
i += v9 + 1;
continue;
}
i = (_BYTE *)(stpcpy(v11, &curr_dir) - 1);
if ( *i == 47 )
--i;
}
v5 = i;
while ( 1 )
{
v4 = 0;
if ( i >= v6 )
v4 = *i != 47;
if ( !v4 )
break;
--i;
}
if ( i[1] == 126 || i >= v6 && !(unsigned int)memcmp(i, &v12, v9) )
{
i = (_BYTE *)stpcpy(v5 + 1, &v12);
*i = 47;
}
}
}
else if ( i - v6 == v9 - 1 && !(unsigned int)memcmp(v6, v13, v9 - 1) )
{
v6 = i;
}
else if ( i - v6 > 0 && *(i - 1) == 47 )
{
--i;
}
else if ( i - v6 > 1 && *(i - 1) == 46 && *(i - 2) == 47 )
{
i -= 2;
}
}
}
stpcpy(v10, v11);
return i - v11;
}
| cleanup_dirname:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x260
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x218],RDI
MOV qword ptr [RBP + -0x220],RSI
JMP 0x001ed108
LAB_001ed108:
LEA RAX,[RBP + -0x210]
MOV qword ptr [RBP + -0x240],RAX
MOV RAX,qword ptr [RBP + -0x220]
MOV qword ptr [RBP + -0x238],RAX
MOV byte ptr [RBP + -0xd],0x2f
LEA RDI,[RBP + -0xd]
ADD RDI,0x1
LEA RSI,[0x25de87]
CALL 0x0012a7a0
LEA RCX,[RBP + -0xd]
SUB RAX,RCX
MOV qword ptr [RBP + -0x228],RAX
MOV RAX,qword ptr [RBP + -0x240]
MOV qword ptr [RBP + -0x230],RAX
LAB_001ed158:
MOV RAX,qword ptr [RBP + -0x238]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x238],RCX
MOV AL,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x230]
MOV byte ptr [RCX],AL
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x001ed551
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x001ed19d
MOV RAX,qword ptr [RBP + -0x230]
MOV byte ptr [RAX],0x2f
LAB_001ed19d:
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x001ed538
MOV RAX,qword ptr [RBP + -0x230]
MOV RCX,qword ptr [RBP + -0x240]
SUB RAX,RCX
CMP RAX,qword ptr [RBP + -0x228]
JBE 0x001ed454
MOV RDI,qword ptr [RBP + -0x230]
XOR EAX,EAX
SUB RAX,qword ptr [RBP + -0x228]
ADD RDI,RAX
LEA RSI,[RBP + -0xd]
MOV RDX,qword ptr [RBP + -0x228]
CALL 0x0012a8c0
CMP EAX,0x0
JNZ 0x001ed454
MOV RDX,qword ptr [RBP + -0x228]
MOV RAX,qword ptr [RBP + -0x230]
XOR ECX,ECX
SUB RCX,RDX
ADD RAX,RCX
MOV qword ptr [RBP + -0x230],RAX
MOV RAX,qword ptr [RBP + -0x230]
CMP RAX,qword ptr [RBP + -0x240]
JZ 0x001ed44f
MOV RAX,qword ptr [RBP + -0x230]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x230],RAX
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x7e
JNZ 0x001ed2df
MOV RAX,qword ptr [RBP + -0x230]
CMP RAX,qword ptr [RBP + -0x240]
JZ 0x001ed270
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x2f
JNZ 0x001ed2df
LAB_001ed270:
LEA RAX,[0xd8dd78]
CMP qword ptr [RAX],0x0
JNZ 0x001ed29b
MOV RAX,qword ptr [RBP + -0x228]
ADD RAX,0x1
ADD RAX,qword ptr [RBP + -0x230]
MOV qword ptr [RBP + -0x230],RAX
JMP 0x001ed53a
LAB_001ed29b:
LEA RDI,[RBP + -0x210]
LEA RAX,[0xd8dd78]
MOV RSI,qword ptr [RAX]
CALL 0x0012a7a0
ADD RAX,-0x1
MOV qword ptr [RBP + -0x230],RAX
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x001ed2dd
MOV RAX,qword ptr [RBP + -0x230]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x230],RAX
LAB_001ed2dd:
JMP 0x001ed2df
LAB_001ed2df:
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2e
JNZ 0x001ed38b
MOV RAX,qword ptr [RBP + -0x230]
CMP RAX,qword ptr [RBP + -0x240]
JZ 0x001ed312
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x2f
JNZ 0x001ed38b
LAB_001ed312:
LEA RDI,[0xd8dd90]
MOV ESI,0x200
XOR EAX,EAX
MOV EDX,EAX
CALL 0x001f8950
CMP EAX,0x0
JZ 0x001ed34a
MOV RAX,qword ptr [RBP + -0x228]
ADD RAX,0x1
ADD RAX,qword ptr [RBP + -0x230]
MOV qword ptr [RBP + -0x230],RAX
JMP 0x001ed53a
LAB_001ed34a:
LEA RDI,[RBP + -0x210]
LEA RSI,[0xd8dd90]
CALL 0x0012a7a0
ADD RAX,-0x1
MOV qword ptr [RBP + -0x230],RAX
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x001ed389
MOV RAX,qword ptr [RBP + -0x230]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x230],RAX
LAB_001ed389:
JMP 0x001ed38b
LAB_001ed38b:
MOV RAX,qword ptr [RBP + -0x230]
MOV qword ptr [RBP + -0x248],RAX
LAB_001ed399:
MOV RCX,qword ptr [RBP + -0x230]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x240]
MOV byte ptr [RBP + -0x249],AL
JC 0x001ed3c7
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
SETNZ AL
MOV byte ptr [RBP + -0x249],AL
LAB_001ed3c7:
MOV AL,byte ptr [RBP + -0x249]
TEST AL,0x1
JNZ 0x001ed3d3
JMP 0x001ed3e7
LAB_001ed3d3:
MOV RAX,qword ptr [RBP + -0x230]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x230],RAX
JMP 0x001ed399
LAB_001ed3e7:
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x7e
JZ 0x001ed423
MOV RAX,qword ptr [RBP + -0x230]
CMP RAX,qword ptr [RBP + -0x240]
JC 0x001ed44d
MOV RDI,qword ptr [RBP + -0x230]
LEA RSI,[RBP + -0xd]
MOV RDX,qword ptr [RBP + -0x228]
CALL 0x0012a8c0
CMP EAX,0x0
JNZ 0x001ed44d
LAB_001ed423:
MOV RDI,qword ptr [RBP + -0x248]
ADD RDI,0x1
LEA RSI,[RBP + -0xd]
CALL 0x0012a7a0
MOV qword ptr [RBP + -0x230],RAX
MOV RAX,qword ptr [RBP + -0x230]
MOV byte ptr [RAX],0x2f
JMP 0x001ed53a
LAB_001ed44d:
JMP 0x001ed44f
LAB_001ed44f:
JMP 0x001ed536
LAB_001ed454:
MOV RAX,qword ptr [RBP + -0x230]
MOV RCX,qword ptr [RBP + -0x240]
SUB RAX,RCX
MOV RCX,qword ptr [RBP + -0x228]
SUB RCX,0x1
CMP RAX,RCX
JNZ 0x001ed4ac
MOV RDI,qword ptr [RBP + -0x240]
LEA RSI,[RBP + -0xd]
ADD RSI,0x1
MOV RDX,qword ptr [RBP + -0x228]
SUB RDX,0x1
CALL 0x0012a8c0
CMP EAX,0x0
JNZ 0x001ed4ac
MOV RAX,qword ptr [RBP + -0x230]
MOV qword ptr [RBP + -0x240],RAX
JMP 0x001ed534
LAB_001ed4ac:
MOV RAX,qword ptr [RBP + -0x230]
MOV RCX,qword ptr [RBP + -0x240]
SUB RAX,RCX
CMP RAX,0x0
JLE 0x001ed4e7
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x2f
JNZ 0x001ed4e7
MOV RAX,qword ptr [RBP + -0x230]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x230],RAX
JMP 0x001ed532
LAB_001ed4e7:
MOV RAX,qword ptr [RBP + -0x230]
MOV RCX,qword ptr [RBP + -0x240]
SUB RAX,RCX
CMP RAX,0x1
JLE 0x001ed530
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x2e
JNZ 0x001ed530
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX + -0x2]
CMP EAX,0x2f
JNZ 0x001ed530
MOV RAX,qword ptr [RBP + -0x230]
ADD RAX,-0x2
MOV qword ptr [RBP + -0x230],RAX
LAB_001ed530:
JMP 0x001ed532
LAB_001ed532:
JMP 0x001ed534
LAB_001ed534:
JMP 0x001ed536
LAB_001ed536:
JMP 0x001ed538
LAB_001ed538:
JMP 0x001ed53a
LAB_001ed53a:
MOV RAX,qword ptr [RBP + -0x230]
ADD RAX,0x1
MOV qword ptr [RBP + -0x230],RAX
JMP 0x001ed158
LAB_001ed551:
MOV RDI,qword ptr [RBP + -0x218]
LEA RSI,[RBP + -0x210]
CALL 0x0012a7a0
JMP 0x001ed566
LAB_001ed566:
JMP 0x001ed568
LAB_001ed568:
MOV RAX,qword ptr [RBP + -0x230]
LEA RCX,[RBP + -0x210]
SUB RAX,RCX
MOV qword ptr [RBP + -0x258],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001ed5a2
MOV RAX,qword ptr [RBP + -0x258]
ADD RSP,0x260
POP RBP
RET
LAB_001ed5a2:
CALL 0x0012a270
|
long cleanup_dirname(char *param_1,char *param_2)
{
char cVar1;
int iVar2;
char *pcVar3;
ulong __n;
char *pcVar4;
long in_FS_OFFSET;
bool bVar5;
char *local_248;
char *local_240;
char *local_238;
char local_218 [515];
char local_15;
char acStack_14 [4];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_248 = local_218;
local_15 = '/';
pcVar3 = stpcpy(acStack_14,"..");
__n = (long)pcVar3 - (long)&local_15;
local_240 = param_2;
local_238 = local_248;
do {
cVar1 = *local_240;
*local_238 = cVar1;
if (cVar1 == '\0') {
stpcpy(param_1,local_218);
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return (long)local_238 - (long)local_218;
}
if (*local_238 == '/') {
*local_238 = '/';
}
if (*local_238 == '/') {
if ((__n < (ulong)((long)local_238 - (long)local_248)) &&
(iVar2 = memcmp(local_238 + -__n,&local_15,__n), iVar2 == 0)) {
local_238 = local_238 + -__n;
if (local_238 != local_248) {
pcVar3 = local_238 + -1;
if ((*pcVar3 == '~') && ((pcVar3 == local_248 || (local_238[-2] == '/')))) {
if (home_dir == (char *)0x0) {
local_238 = pcVar3 + __n + 1;
goto LAB_001ed53a;
}
pcVar4 = stpcpy(local_218,home_dir);
pcVar3 = pcVar4 + -1;
if (pcVar4[-1] == '/') {
pcVar3 = pcVar4 + -2;
}
}
local_238 = pcVar3;
pcVar3 = local_238;
if ((*local_238 == '.') && ((local_238 == local_248 || (local_238[-1] == '/')))) {
iVar2 = my_getwd(&curr_dir,0x200,0);
if (iVar2 != 0) {
local_238 = local_238 + __n + 1;
goto LAB_001ed53a;
}
pcVar4 = stpcpy(local_218,&curr_dir);
local_238 = pcVar4 + -1;
pcVar3 = local_238;
if (*local_238 == '/') {
local_238 = pcVar4 + -2;
pcVar3 = local_238;
}
}
while( true ) {
bVar5 = false;
if (local_248 <= local_238) {
bVar5 = *local_238 != '/';
}
if (!bVar5) break;
local_238 = local_238 + -1;
}
if ((local_238[1] == '~') ||
((local_248 <= local_238 && (iVar2 = memcmp(local_238,&local_15,__n), iVar2 == 0)))) {
local_238 = stpcpy(pcVar3 + 1,&local_15);
*local_238 = '/';
}
}
}
else if (((long)local_238 - (long)local_248 == __n - 1) &&
(iVar2 = memcmp(local_248,acStack_14,__n - 1), iVar2 == 0)) {
local_248 = local_238;
}
else if (((long)local_238 - (long)local_248 < 1) || (local_238[-1] != '/')) {
if ((1 < (long)local_238 - (long)local_248) &&
((local_238[-1] == '.' && (local_238[-2] == '/')))) {
local_238 = local_238 + -2;
}
}
else {
local_238 = local_238 + -1;
}
}
LAB_001ed53a:
local_238 = local_238 + 1;
local_240 = local_240 + 1;
} while( true );
}
|
|
6,116 | ma_crypt_read | eloqsql/storage/maria/ma_crypt.c | uchar*
ma_crypt_read(MARIA_SHARE* share, uchar *buff)
{
uchar type= buff[0];
uchar iv_length= buff[1];
/* currently only supported type */
if (type != CRYPT_SCHEME_1 ||
iv_length != sizeof(((MARIA_CRYPT_DATA*)1)->scheme.iv) + 4)
{
my_printf_error(HA_ERR_UNSUPPORTED,
"Unsupported crypt scheme! type: %d iv_length: %d\n",
MYF(ME_FATAL|ME_ERROR_LOG),
type, iv_length);
return 0;
}
if (share->crypt_data == NULL)
{
/* opening a table */
MARIA_CRYPT_DATA *crypt_data=
(MARIA_CRYPT_DATA*)my_malloc(PSI_INSTRUMENT_ME, sizeof(MARIA_CRYPT_DATA), MYF(MY_ZEROFILL));
crypt_data->scheme.type= type;
mysql_mutex_init(key_CRYPT_DATA_lock, &crypt_data->lock,
MY_MUTEX_INIT_FAST);
crypt_data->scheme.locker= crypt_data_scheme_locker;
crypt_data->scheme.key_id= get_encryption_key_id(share);
crypt_data->space= uint4korr(buff + 2);
memcpy(crypt_data->scheme.iv, buff + 6, sizeof(crypt_data->scheme.iv));
share->crypt_data= crypt_data;
}
share->crypt_page_header_space= CRYPT_SCHEME_1_KEY_VERSION_SIZE;
return buff + 2 + iv_length;
} | O3 | c | ma_crypt_read:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movzbl (%rsi), %ecx
movb 0x1(%rsi), %al
movl %ecx, %edx
xorb $0x1, %dl
movl %eax, %esi
xorb $0x14, %sil
orb %dl, %sil
je 0x7561c
movzbl %al, %r8d
leaq 0x6d8b4(%rip), %rsi # 0xe2eb8
xorl %ebx, %ebx
movl $0x1040, %edx # imm = 0x1040
movl $0x8a, %edi
xorl %eax, %eax
callq 0xa31cd
jmp 0x756e7
movq %rdi, %r14
cmpq $0x0, 0xc20(%rdi)
jne 0x756d8
movl $0xb0, %esi
movl $0x20, %edx
xorl %edi, %edi
callq 0xa7081
movq %rax, %r15
movl $0x1, 0x54(%rax)
movl 0xb947b6(%rip), %edi # 0xc09e04
leaq 0x68(%rax), %r12
leaq 0x31b4bf(%rip), %rax # 0x390b18
movq (%rax), %rax
movq %r12, %rsi
callq *0x40(%rax)
movq %rax, 0xa8(%r15)
movq %r12, 0xa0(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x90(%r15)
leaq 0xb9d7ee(%rip), %rsi # 0xc12e70
movq %r12, %rdi
callq 0x2a310
leaq -0x244(%rip), %rax # 0x7544d
movq %rax, 0x58(%r15)
testb $0x10, 0x720(%r14)
je 0x756b8
leaq 0x31896a(%rip), %rax # 0x38e010
movl $0x2, %r12d
movl $0x2, %edi
callq *(%rax)
cmpl $-0x1, %eax
jne 0x756be
movl $0x1, %r12d
movl %r12d, 0x50(%r15)
movl 0x2(%rbx), %eax
movl %eax, 0x60(%r15)
movups 0x6(%rbx), %xmm0
movups %xmm0, (%r15)
movq %r15, 0xc20(%r14)
movl $0x4, 0xc18(%r14)
addq $0x16, %rbx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| ma_crypt_read:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rsi
movzx ecx, byte ptr [rsi]
mov al, [rsi+1]
mov edx, ecx
xor dl, 1
mov esi, eax
xor sil, 14h
or sil, dl
jz short loc_7561C
movzx r8d, al
lea rsi, aUnsupportedCry; "Unsupported crypt scheme! type: %d iv_l"...
xor ebx, ebx
mov edx, 1040h
mov edi, 8Ah
xor eax, eax
call my_printf_error
jmp loc_756E7
loc_7561C:
mov r14, rdi
cmp qword ptr [rdi+0C20h], 0
jnz loc_756D8
mov esi, 0B0h
mov edx, 20h ; ' '
xor edi, edi
call my_malloc
mov r15, rax
mov dword ptr [rax+54h], 1
mov edi, cs:key_CRYPT_DATA_lock
lea r12, [rax+68h]
lea rax, PSI_server
mov rax, [rax]
mov rsi, r12
call qword ptr [rax+40h]
mov [r15+0A8h], rax
mov [r15+0A0h], r12
xorps xmm0, xmm0
movups xmmword ptr [r15+90h], xmm0
lea rsi, my_fast_mutexattr
mov rdi, r12
call _pthread_mutex_init
lea rax, crypt_data_scheme_locker
mov [r15+58h], rax
test byte ptr [r14+720h], 10h
jz short loc_756B8
lea rax, encryption_handler
mov r12d, 2
mov edi, 2
call qword ptr [rax]
cmp eax, 0FFFFFFFFh
jnz short loc_756BE
loc_756B8:
mov r12d, 1
loc_756BE:
mov [r15+50h], r12d
mov eax, [rbx+2]
mov [r15+60h], eax
movups xmm0, xmmword ptr [rbx+6]
movups xmmword ptr [r15], xmm0
mov [r14+0C20h], r15
loc_756D8:
mov dword ptr [r14+0C18h], 4
add rbx, 16h
loc_756E7:
mov rax, rbx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| unsigned __int8 * ma_crypt_read(long long a1, unsigned __int8 *a2, long long a3, long long a4, long long a5, int a6)
{
unsigned __int8 v6; // al
long long v7; // rbx
long long v8; // r15
int v9; // r12d
v6 = a2[1];
if ( *a2 ^ 1 | v6 ^ 0x14 )
{
v7 = 0LL;
my_printf_error(138, (unsigned int)"Unsupported crypt scheme! type: %d iv_length: %d\n", 4160, *a2, v6, a6);
}
else
{
if ( !*(_QWORD *)(a1 + 3104) )
{
v8 = my_malloc(0LL, 176LL, 32LL);
*(_DWORD *)(v8 + 84) = 1;
*(_QWORD *)(v8 + 168) = ((long long ( *)(_QWORD, long long))PSI_server[8])(
(unsigned int)key_CRYPT_DATA_lock,
v8 + 104);
*(_QWORD *)(v8 + 160) = v8 + 104;
*(_OWORD *)(v8 + 144) = 0LL;
pthread_mutex_init(v8 + 104, &my_fast_mutexattr);
*(_QWORD *)(v8 + 88) = crypt_data_scheme_locker;
if ( (*(_BYTE *)(a1 + 1824) & 0x10) == 0 || (v9 = 2, (unsigned int)encryption_handler() == -1) )
v9 = 1;
*(_DWORD *)(v8 + 80) = v9;
*(_DWORD *)(v8 + 96) = *(_DWORD *)(a2 + 2);
*(_OWORD *)v8 = *(_OWORD *)(a2 + 6);
*(_QWORD *)(a1 + 3104) = v8;
}
*(_DWORD *)(a1 + 3096) = 4;
return a2 + 22;
}
return (unsigned __int8 *)v7;
}
| ma_crypt_read:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RSI
MOVZX ECX,byte ptr [RSI]
MOV AL,byte ptr [RSI + 0x1]
MOV EDX,ECX
XOR DL,0x1
MOV ESI,EAX
XOR SIL,0x14
OR SIL,DL
JZ 0x0017561c
MOVZX R8D,AL
LEA RSI,[0x1e2eb8]
XOR EBX,EBX
MOV EDX,0x1040
MOV EDI,0x8a
XOR EAX,EAX
CALL 0x001a31cd
JMP 0x001756e7
LAB_0017561c:
MOV R14,RDI
CMP qword ptr [RDI + 0xc20],0x0
JNZ 0x001756d8
MOV ESI,0xb0
MOV EDX,0x20
XOR EDI,EDI
CALL 0x001a7081
MOV R15,RAX
MOV dword ptr [RAX + 0x54],0x1
MOV EDI,dword ptr [0x00d09e04]
LEA R12,[RAX + 0x68]
LEA RAX,[0x490b18]
MOV RAX,qword ptr [RAX]
MOV RSI,R12
CALL qword ptr [RAX + 0x40]
MOV qword ptr [R15 + 0xa8],RAX
MOV qword ptr [R15 + 0xa0],R12
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R15 + 0x90],XMM0
LEA RSI,[0xd12e70]
MOV RDI,R12
CALL 0x0012a310
LEA RAX,[0x17544d]
MOV qword ptr [R15 + 0x58],RAX
TEST byte ptr [R14 + 0x720],0x10
JZ 0x001756b8
LEA RAX,[0x48e010]
MOV R12D,0x2
MOV EDI,0x2
CALL qword ptr [RAX]
CMP EAX,-0x1
JNZ 0x001756be
LAB_001756b8:
MOV R12D,0x1
LAB_001756be:
MOV dword ptr [R15 + 0x50],R12D
MOV EAX,dword ptr [RBX + 0x2]
MOV dword ptr [R15 + 0x60],EAX
MOVUPS XMM0,xmmword ptr [RBX + 0x6]
MOVUPS xmmword ptr [R15],XMM0
MOV qword ptr [R14 + 0xc20],R15
LAB_001756d8:
MOV dword ptr [R14 + 0xc18],0x4
ADD RBX,0x16
LAB_001756e7:
MOV RAX,RBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
char * ma_crypt_read(long param_1,char *param_2)
{
pthread_mutex_t *__mutex;
int iVar1;
int8 *puVar2;
int8 uVar3;
int4 uVar4;
if (param_2[1] != '\x14' || *param_2 != '\x01') {
my_printf_error(0x8a,"Unsupported crypt scheme! type: %d iv_length: %d\n",0x1040,*param_2,
param_2[1]);
return (char *)0x0;
}
if (*(long *)(param_1 + 0xc20) != 0) goto LAB_001756d8;
puVar2 = (int8 *)my_malloc(0,0xb0,0x20);
*(int4 *)((long)puVar2 + 0x54) = 1;
__mutex = (pthread_mutex_t *)(puVar2 + 0xd);
uVar3 = (**(code **)(PSI_server + 0x40))(key_CRYPT_DATA_lock,__mutex);
puVar2[0x15] = uVar3;
puVar2[0x14] = __mutex;
puVar2[0x12] = 0;
puVar2[0x13] = 0;
pthread_mutex_init(__mutex,(pthread_mutexattr_t *)&my_fast_mutexattr);
puVar2[0xb] = crypt_data_scheme_locker;
if ((*(byte *)(param_1 + 0x720) & 0x10) == 0) {
LAB_001756b8:
uVar4 = 1;
}
else {
uVar4 = 2;
iVar1 = (*(code *)encryption_handler)(2);
if (iVar1 == -1) goto LAB_001756b8;
}
*(int4 *)(puVar2 + 10) = uVar4;
*(int4 *)(puVar2 + 0xc) = *(int4 *)(param_2 + 2);
uVar3 = *(int8 *)(param_2 + 0xe);
*puVar2 = *(int8 *)(param_2 + 6);
puVar2[1] = uVar3;
*(int8 **)(param_1 + 0xc20) = puVar2;
LAB_001756d8:
*(int4 *)(param_1 + 0xc18) = 4;
return param_2 + 0x16;
}
|
|
6,117 | LefDefParser::defiNet::topMaskNum(int) const | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNet.cpp | const int defiNet::topMaskNum(int index) const {
char errMsg[128];
if (index < 0 || index > numPts_) {
sprintf (errMsg, "ERROR (DEFPARS-6085): The index number %d specified for the NET POLYGON is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again.",
index, numPts_);
defiError(0, 6085, errMsg, defData);
return 0;
}
return viaMasks_[index] / 100;
} | O0 | cpp | LefDefParser::defiNet::topMaskNum(int) const:
subq $0xa8, %rsp
movq %rdi, 0x98(%rsp)
movl %esi, 0x94(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpl $0x0, 0x94(%rsp)
jl 0x3d381
movq 0x8(%rsp), %rcx
movl 0x94(%rsp), %eax
cmpl 0x210(%rcx), %eax
jle 0x3d3d0
movq 0x8(%rsp), %rax
leaq 0x10(%rsp), %rdi
movl 0x94(%rsp), %edx
movl 0x210(%rax), %ecx
leaq 0x3495a(%rip), %rsi # 0x71cf9
movb $0x0, %al
callq 0x7060
movq 0x8(%rsp), %rax
leaq 0x10(%rsp), %rdx
movq 0x240(%rax), %rcx
xorl %edi, %edi
movl $0x17c5, %esi # imm = 0x17C5
callq 0x277e0
movl $0x0, 0xa4(%rsp)
jmp 0x3d3f6
movq 0x8(%rsp), %rax
movq 0x220(%rax), %rax
movslq 0x94(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl $0x64, %ecx
cltd
idivl %ecx
movl %eax, 0xa4(%rsp)
movl 0xa4(%rsp), %eax
addq $0xa8, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZNK12LefDefParser7defiNet10topMaskNumEi:
sub rsp, 0A8h
mov [rsp+0A8h+var_10], rdi
mov [rsp+0A8h+var_14], esi
mov rax, [rsp+0A8h+var_10]
mov [rsp+0A8h+var_A0], rax
cmp [rsp+0A8h+var_14], 0
jl short loc_3D381
mov rcx, [rsp+0A8h+var_A0]
mov eax, [rsp+0A8h+var_14]
cmp eax, [rcx+210h]
jle short loc_3D3D0
loc_3D381:
mov rax, [rsp+0A8h+var_A0]
lea rdi, [rsp+0A8h+var_98]
mov edx, [rsp+0A8h+var_14]
mov ecx, [rax+210h]
lea rsi, aErrorDefpars60_6; "ERROR (DEFPARS-6085): The index number "...
mov al, 0
call _sprintf
mov rax, [rsp+0A8h+var_A0]
lea rdx, [rsp+0A8h+var_98]; int
mov rcx, [rax+240h]; char *
xor edi, edi; this
mov esi, 17C5h; int
call _ZN12LefDefParser9defiErrorEiiPKcPNS_8defrDataE; LefDefParser::defiError(int,int,char const*,LefDefParser::defrData *)
mov [rsp+0A8h+var_4], 0
jmp short loc_3D3F6
loc_3D3D0:
mov rax, [rsp+0A8h+var_A0]
mov rax, [rax+220h]
movsxd rcx, [rsp+0A8h+var_14]
mov eax, [rax+rcx*4]
mov ecx, 64h ; 'd'
cdq
idiv ecx
mov [rsp+0A8h+var_4], eax
loc_3D3F6:
mov eax, [rsp+0A8h+var_4]
add rsp, 0A8h
retn
| long long LefDefParser::defiNet::topMaskNum(LefDefParser::defrData **this, int a2)
{
LefDefParser::defrData *v2; // r8
char v4[132]; // [rsp+10h] [rbp-98h] BYREF
int v5; // [rsp+94h] [rbp-14h]
LefDefParser::defiNet *v6; // [rsp+98h] [rbp-10h]
v6 = (LefDefParser::defiNet *)this;
v5 = a2;
if ( a2 >= 0 && v5 <= *((_DWORD *)this + 132) )
{
return (unsigned int)(*((_DWORD *)this[68] + v5) / 100);
}
else
{
sprintf(
v4,
"ERROR (DEFPARS-6085): The index number %d specified for the NET POLYGON is invalid.\n"
"Valid index is from 0 to %d. Specify a valid index number and then try again.",
v5,
*((_DWORD *)this + 132));
LefDefParser::defiError(0LL, 6085, v4, this[72], v2);
return 0;
}
}
| topMaskNum:
SUB RSP,0xa8
MOV qword ptr [RSP + 0x98],RDI
MOV dword ptr [RSP + 0x94],ESI
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x8],RAX
CMP dword ptr [RSP + 0x94],0x0
JL 0x0013d381
MOV RCX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RSP + 0x94]
CMP EAX,dword ptr [RCX + 0x210]
JLE 0x0013d3d0
LAB_0013d381:
MOV RAX,qword ptr [RSP + 0x8]
LEA RDI,[RSP + 0x10]
MOV EDX,dword ptr [RSP + 0x94]
MOV ECX,dword ptr [RAX + 0x210]
LEA RSI,[0x171cf9]
MOV AL,0x0
CALL 0x00107060
MOV RAX,qword ptr [RSP + 0x8]
LEA RDX,[RSP + 0x10]
MOV RCX,qword ptr [RAX + 0x240]
XOR EDI,EDI
MOV ESI,0x17c5
CALL 0x001277e0
MOV dword ptr [RSP + 0xa4],0x0
JMP 0x0013d3f6
LAB_0013d3d0:
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x220]
MOVSXD RCX,dword ptr [RSP + 0x94]
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV ECX,0x64
CDQ
IDIV ECX
MOV dword ptr [RSP + 0xa4],EAX
LAB_0013d3f6:
MOV EAX,dword ptr [RSP + 0xa4]
ADD RSP,0xa8
RET
|
/* LefDefParser::defiNet::topMaskNum(int) const */
int __thiscall LefDefParser::defiNet::topMaskNum(defiNet *this,int param_1)
{
char local_98 [132];
int local_14;
defiNet *local_10;
int local_4;
if ((param_1 < 0) || (*(int *)(this + 0x210) < param_1)) {
local_14 = param_1;
local_10 = this;
sprintf(local_98,
"ERROR (DEFPARS-6085): The index number %d specified for the NET POLYGON is invalid.\nValid index is from 0 to %d. Specify a valid index number and then try again."
,(ulong)(uint)param_1,(ulong)*(uint *)(this + 0x210));
defiError(0,0x17c5,local_98,*(defrData **)(this + 0x240));
local_4 = 0;
}
else {
local_4 = *(int *)(*(long *)(this + 0x220) + (long)param_1 * 4) / 100;
}
return local_4;
}
|
|
6,118 | js_module_loader_so | bluesky950520[P]quickjs/quickjs-libc.c | static JSModuleDef *js_module_loader_so(JSContext *ctx,
const char *module_name)
{
JSModuleDef *m;
void *hd;
JSInitModuleFunc *init;
char *filename;
if (!strchr(module_name, '/')) {
/* must add a '/' so that the DLL is not searched in the
system library paths */
filename = js_malloc(ctx, strlen(module_name) + 2 + 1);
if (!filename)
return NULL;
strcpy(filename, "./");
strcpy(filename + 2, module_name);
} else {
filename = (char *)module_name;
}
/* C module */
hd = dlopen(filename, RTLD_NOW | RTLD_LOCAL);
if (filename != module_name)
js_free(ctx, filename);
if (!hd) {
JS_ThrowReferenceError(ctx, "could not load module filename '%s' as shared library: %s",
module_name, dlerror());
goto fail;
}
*(void **) (&init) = dlsym(hd, "js_init_module");
if (!init) {
JS_ThrowReferenceError(ctx, "could not load module filename '%s': js_init_module not found",
module_name);
goto fail;
}
m = init(ctx, module_name);
if (!m) {
JS_ThrowReferenceError(ctx, "could not load module filename '%s': initialization error",
module_name);
fail:
if (hd)
dlclose(hd);
return NULL;
}
return m;
} | O0 | c | js_module_loader_so:
subq $0x88, %rsp
movq %rdi, 0x78(%rsp)
movq %rsi, 0x70(%rsp)
movq 0x70(%rsp), %rdi
movl $0x2f, %esi
callq 0xe270
cmpq $0x0, %rax
jne 0xf333
movq 0x78(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x70(%rsp), %rdi
callq 0xe240
movq 0x18(%rsp), %rdi
movq %rax, %rsi
addq $0x2, %rsi
addq $0x1, %rsi
callq 0x209f0
movq %rax, 0x50(%rsp)
cmpq $0x0, 0x50(%rsp)
jne 0xf30d
movq $0x0, 0x80(%rsp)
jmp 0xf466
movq 0x50(%rsp), %rdi
leaq 0xf9056(%rip), %rsi # 0x10836f
callq 0xe100
movq 0x50(%rsp), %rdi
addq $0x2, %rdi
movq 0x70(%rsp), %rsi
callq 0xe100
jmp 0xf33d
movq 0x70(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rdi
movl $0x2, %esi
callq 0xe520
movq %rax, 0x60(%rsp)
movq 0x50(%rsp), %rax
cmpq 0x70(%rsp), %rax
je 0xf36c
movq 0x78(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0x20af0
cmpq $0x0, 0x60(%rsp)
jne 0xf3b7
movq 0x78(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x10(%rsp)
callq 0xe050
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rdx
movq %rax, %rcx
leaq 0xf8fd1(%rip), %rsi # 0x108372
movb $0x0, %al
callq 0x2c130
movq %rax, 0x40(%rsp)
movq %rdx, 0x48(%rsp)
jmp 0xf439
movq 0x60(%rsp), %rdi
leaq 0xf8fe9(%rip), %rsi # 0x1083ac
callq 0xe800
movq %rax, 0x58(%rsp)
cmpq $0x0, 0x58(%rsp)
jne 0xf3f9
movq 0x78(%rsp), %rdi
movq 0x70(%rsp), %rdx
leaq 0xf8fd5(%rip), %rsi # 0x1083bb
movb $0x0, %al
callq 0x2c130
movq %rax, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
jmp 0xf439
movq 0x58(%rsp), %rax
movq 0x78(%rsp), %rdi
movq 0x70(%rsp), %rsi
callq *%rax
movq %rax, 0x68(%rsp)
cmpq $0x0, 0x68(%rsp)
jne 0xf459
movq 0x78(%rsp), %rdi
movq 0x70(%rsp), %rdx
leaq 0xf8fd1(%rip), %rsi # 0x1083f9
movb $0x0, %al
callq 0x2c130
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
cmpq $0x0, 0x60(%rsp)
je 0xf44b
movq 0x60(%rsp), %rdi
callq 0xe900
movq $0x0, 0x80(%rsp)
jmp 0xf466
movq 0x68(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rax
addq $0x88, %rsp
retq
nopw %cs:(%rax,%rax)
| js_module_loader_so:
sub rsp, 88h
mov [rsp+88h+var_10], rdi
mov [rsp+88h+var_18], rsi
mov rdi, [rsp+88h+var_18]
mov esi, 2Fh ; '/'
call _strchr
cmp rax, 0
jnz short loc_F333
mov rax, [rsp+88h+var_10]
mov [rsp+88h+var_70], rax
mov rdi, [rsp+88h+var_18]
call _strlen
mov rdi, [rsp+88h+var_70]
mov rsi, rax
add rsi, 2
add rsi, 1
call js_malloc
mov [rsp+88h+var_38], rax
cmp [rsp+88h+var_38], 0
jnz short loc_F30D
mov [rsp+88h+var_8], 0
jmp loc_F466
loc_F30D:
mov rdi, [rsp+88h+var_38]
lea rsi, asc_10836F; "./"
call _strcpy
mov rdi, [rsp+88h+var_38]
add rdi, 2
mov rsi, [rsp+88h+var_18]
call _strcpy
jmp short loc_F33D
loc_F333:
mov rax, [rsp+88h+var_18]
mov [rsp+88h+var_38], rax
loc_F33D:
mov rdi, [rsp+88h+var_38]
mov esi, 2
call _dlopen
mov [rsp+88h+var_28], rax
mov rax, [rsp+88h+var_38]
cmp rax, [rsp+88h+var_18]
jz short loc_F36C
mov rdi, [rsp+88h+var_10]
mov rsi, [rsp+88h+var_38]
call js_free
loc_F36C:
cmp [rsp+88h+var_28], 0
jnz short loc_F3B7
mov rax, [rsp+88h+var_10]
mov [rsp+88h+var_80], rax
mov rax, [rsp+88h+var_18]
mov [rsp+88h+var_78], rax
call _dlerror
mov rdi, [rsp+88h+var_80]
mov rdx, [rsp+88h+var_78]
mov rcx, rax
lea rsi, aCouldNotLoadMo_0; "could not load module filename '%s' as "...
mov al, 0
call JS_ThrowReferenceError
mov [rsp+88h+var_48], rax
mov [rsp+88h+var_40], rdx
jmp loc_F439
loc_F3B7:
mov rdi, [rsp+88h+var_28]
lea rsi, aJsInitModule; "js_init_module"
call _dlsym
mov [rsp+88h+var_30], rax
cmp [rsp+88h+var_30], 0
jnz short loc_F3F9
mov rdi, [rsp+88h+var_10]
mov rdx, [rsp+88h+var_18]
lea rsi, aCouldNotLoadMo_1; "could not load module filename '%s': js"...
mov al, 0
call JS_ThrowReferenceError
mov [rsp+88h+var_58], rax
mov [rsp+88h+var_50], rdx
jmp short loc_F439
loc_F3F9:
mov rax, [rsp+88h+var_30]
mov rdi, [rsp+88h+var_10]
mov rsi, [rsp+88h+var_18]
call rax
mov [rsp+88h+var_20], rax
cmp [rsp+88h+var_20], 0
jnz short loc_F459
mov rdi, [rsp+88h+var_10]
mov rdx, [rsp+88h+var_18]
lea rsi, aCouldNotLoadMo_2; "could not load module filename '%s': in"...
mov al, 0
call JS_ThrowReferenceError
mov [rsp+88h+var_68], rax
mov [rsp+88h+var_60], rdx
loc_F439:
cmp [rsp+88h+var_28], 0
jz short loc_F44B
mov rdi, [rsp+88h+var_28]
call _dlclose
loc_F44B:
mov [rsp+88h+var_8], 0
jmp short loc_F466
loc_F459:
mov rax, [rsp+88h+var_20]
mov [rsp+88h+var_8], rax
loc_F466:
mov rax, [rsp+88h+var_8]
add rsp, 88h
retn
| long long js_module_loader_so(long long a1, long long a2)
{
long long v2; // rax
int v3; // eax
int v4; // r8d
int v5; // r9d
int v6; // ecx
int v7; // r8d
int v8; // r9d
int v9; // ecx
int v10; // r8d
int v11; // r9d
long long v13; // [rsp+50h] [rbp-38h]
long long ( *v14)(long long, long long); // [rsp+58h] [rbp-30h]
long long v15; // [rsp+60h] [rbp-28h]
long long v16; // [rsp+68h] [rbp-20h]
if ( strchr(a2, 47LL) )
{
v13 = a2;
}
else
{
v2 = strlen(a2);
v13 = js_malloc(a1, v2 + 3);
if ( !v13 )
return 0LL;
strcpy(v13, "./");
strcpy(v13 + 2, a2);
}
v15 = dlopen(v13, 2LL);
if ( v13 != a2 )
js_free(a1, v13);
if ( v15 )
{
v14 = (long long ( *)(long long, long long))dlsym(v15, "js_init_module");
if ( v14 )
{
v16 = v14(a1, a2);
if ( v16 )
return v16;
JS_ThrowReferenceError(
a1,
(unsigned int)"could not load module filename '%s': initialization error",
a2,
v9,
v10,
v11);
}
else
{
JS_ThrowReferenceError(
a1,
(unsigned int)"could not load module filename '%s': js_init_module not found",
a2,
v6,
v7,
v8);
}
}
else
{
v3 = dlerror();
JS_ThrowReferenceError(
a1,
(unsigned int)"could not load module filename '%s' as shared library: %s",
a2,
v3,
v4,
v5);
}
if ( v15 )
dlclose(v15);
return 0LL;
}
| js_module_loader_so:
SUB RSP,0x88
MOV qword ptr [RSP + 0x78],RDI
MOV qword ptr [RSP + 0x70],RSI
MOV RDI,qword ptr [RSP + 0x70]
MOV ESI,0x2f
CALL 0x0010e270
CMP RAX,0x0
JNZ 0x0010f333
MOV RAX,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0x70]
CALL 0x0010e240
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,RAX
ADD RSI,0x2
ADD RSI,0x1
CALL 0x001209f0
MOV qword ptr [RSP + 0x50],RAX
CMP qword ptr [RSP + 0x50],0x0
JNZ 0x0010f30d
MOV qword ptr [RSP + 0x80],0x0
JMP 0x0010f466
LAB_0010f30d:
MOV RDI,qword ptr [RSP + 0x50]
LEA RSI,[0x20836f]
CALL 0x0010e100
MOV RDI,qword ptr [RSP + 0x50]
ADD RDI,0x2
MOV RSI,qword ptr [RSP + 0x70]
CALL 0x0010e100
JMP 0x0010f33d
LAB_0010f333:
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x50],RAX
LAB_0010f33d:
MOV RDI,qword ptr [RSP + 0x50]
MOV ESI,0x2
CALL 0x0010e520
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x50]
CMP RAX,qword ptr [RSP + 0x70]
JZ 0x0010f36c
MOV RDI,qword ptr [RSP + 0x78]
MOV RSI,qword ptr [RSP + 0x50]
CALL 0x00120af0
LAB_0010f36c:
CMP qword ptr [RSP + 0x60],0x0
JNZ 0x0010f3b7
MOV RAX,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x0010e050
MOV RDI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
MOV RCX,RAX
LEA RSI,[0x208372]
MOV AL,0x0
CALL 0x0012c130
MOV qword ptr [RSP + 0x40],RAX
MOV qword ptr [RSP + 0x48],RDX
JMP 0x0010f439
LAB_0010f3b7:
MOV RDI,qword ptr [RSP + 0x60]
LEA RSI,[0x2083ac]
CALL 0x0010e800
MOV qword ptr [RSP + 0x58],RAX
CMP qword ptr [RSP + 0x58],0x0
JNZ 0x0010f3f9
MOV RDI,qword ptr [RSP + 0x78]
MOV RDX,qword ptr [RSP + 0x70]
LEA RSI,[0x2083bb]
MOV AL,0x0
CALL 0x0012c130
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x38],RDX
JMP 0x0010f439
LAB_0010f3f9:
MOV RAX,qword ptr [RSP + 0x58]
MOV RDI,qword ptr [RSP + 0x78]
MOV RSI,qword ptr [RSP + 0x70]
CALL RAX
MOV qword ptr [RSP + 0x68],RAX
CMP qword ptr [RSP + 0x68],0x0
JNZ 0x0010f459
MOV RDI,qword ptr [RSP + 0x78]
MOV RDX,qword ptr [RSP + 0x70]
LEA RSI,[0x2083f9]
MOV AL,0x0
CALL 0x0012c130
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],RDX
LAB_0010f439:
CMP qword ptr [RSP + 0x60],0x0
JZ 0x0010f44b
MOV RDI,qword ptr [RSP + 0x60]
CALL 0x0010e900
LAB_0010f44b:
MOV qword ptr [RSP + 0x80],0x0
JMP 0x0010f466
LAB_0010f459:
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x80],RAX
LAB_0010f466:
MOV RAX,qword ptr [RSP + 0x80]
ADD RSP,0x88
RET
|
long js_module_loader_so(int8 param_1,char *param_2)
{
char *pcVar1;
size_t sVar2;
long lVar3;
int8 uVar4;
code *pcVar5;
long lVar6;
char *local_38;
pcVar1 = strchr(param_2,0x2f);
local_38 = param_2;
if (pcVar1 == (char *)0x0) {
sVar2 = strlen(param_2);
local_38 = (char *)js_malloc(param_1,sVar2 + 3);
if (local_38 == (char *)0x0) {
return 0;
}
strcpy(local_38,"./");
strcpy(local_38 + 2,param_2);
}
lVar3 = dlopen(local_38,2);
if (local_38 != param_2) {
js_free(param_1,local_38);
}
if (lVar3 == 0) {
uVar4 = dlerror();
JS_ThrowReferenceError
(param_1,"could not load module filename \'%s\' as shared library: %s",param_2,uVar4);
}
else {
pcVar5 = (code *)dlsym(lVar3,"js_init_module");
if (pcVar5 == (code *)0x0) {
JS_ThrowReferenceError
(param_1,"could not load module filename \'%s\': js_init_module not found",param_2);
}
else {
lVar6 = (*pcVar5)(param_1,param_2);
if (lVar6 != 0) {
return lVar6;
}
JS_ThrowReferenceError
(param_1,"could not load module filename \'%s\': initialization error",param_2);
}
}
if (lVar3 != 0) {
dlclose(lVar3);
}
return 0;
}
|
|
6,119 | 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 */
} | O3 | c | my_filename:
pushq %rbp
movq %rsp, %rbp
leaq 0x2e7241(%rip), %rcx # 0x36fad0
leaq 0x313d8(%rip), %rax # 0xb9c6e
cmpl %edi, (%rcx)
jbe 0x888cb
leaq 0x2e7237(%rip), %rcx # 0x36fad8
movq (%rcx), %rcx
movslq %edi, %rdx
shlq $0x4, %rdx
movq (%rcx,%rdx), %rsi
testq %rsi, %rsi
je 0x888cb
testl %edi, %edi
js 0x888c4
addq %rdx, %rcx
cmpl $0x0, 0x8(%rcx)
movq %rsi, %rax
jne 0x888cb
leaq 0x3918a(%rip), %rax # 0xc1a55
popq %rbp
retq
nopl (%rax)
| my_filename:
push rbp
mov rbp, rsp
lea rcx, my_file_limit
lea rax, aUnknown_0; "UNKNOWN"
cmp [rcx], edi
jbe short loc_888CB
lea rcx, my_file_info
mov rcx, [rcx]
movsxd rdx, edi
shl rdx, 4
mov rsi, [rcx+rdx]
test rsi, rsi
jz short loc_888CB
test edi, edi
js short loc_888C4
add rcx, rdx
cmp dword ptr [rcx+8], 0
mov rax, rsi
jnz short loc_888CB
loc_888C4:
lea rax, aUnopened; "UNOPENED"
loc_888CB:
pop rbp
retn
| const char * my_filename(int a1)
{
const char *result; // rax
long long v2; // rdx
result = "UNKNOWN";
if ( my_file_limit[0] > (unsigned int)a1 )
{
v2 = 16LL * a1;
if ( *(_QWORD *)((char *)my_file_info + v2) )
{
if ( a1 < 0 )
return "UNOPENED";
result = (const char *)*((_QWORD *)my_file_info + 2 * a1);
if ( !*(_DWORD *)((char *)my_file_info + v2 + 8) )
return "UNOPENED";
}
}
return result;
}
| my_filename:
PUSH RBP
MOV RBP,RSP
LEA RCX,[0x46fad0]
LEA RAX,[0x1b9c6e]
CMP dword ptr [RCX],EDI
JBE 0x001888cb
LEA RCX,[0x46fad8]
MOV RCX,qword ptr [RCX]
MOVSXD RDX,EDI
SHL RDX,0x4
MOV RSI,qword ptr [RCX + RDX*0x1]
TEST RSI,RSI
JZ 0x001888cb
TEST EDI,EDI
JS 0x001888c4
ADD RCX,RDX
CMP dword ptr [RCX + 0x8],0x0
MOV RAX,RSI
JNZ 0x001888cb
LAB_001888c4:
LEA RAX,[0x1c1a55]
LAB_001888cb:
POP RBP
RET
|
char * my_filename(uint param_1)
{
char *pcVar1;
pcVar1 = "UNKNOWN";
if (param_1 < my_file_limit) {
if ((*(char **)(my_file_info + (long)(int)param_1 * 0x10) != (char *)0x0) &&
(((int)param_1 < 0 ||
(pcVar1 = *(char **)(my_file_info + (long)(int)param_1 * 0x10),
*(int *)(my_file_info + (long)(int)param_1 * 0x10 + 8) == 0)))) {
pcVar1 = "UNOPENED";
}
}
return pcVar1;
}
|
|
6,120 | int2str | eloqsql/strings/int2str.c | char *
int2str(register long int val, register char *dst, register int radix,
int upcase)
{
char buffer[65];
register char *p;
long int new_val;
const char *dig_vec= upcase ? _dig_vec_upper : _dig_vec_lower;
ulong uval= (ulong) val;
if (radix < 0)
{
if (radix < -36 || radix > -2)
return NullS;
if (val < 0)
{
*dst++ = '-';
/* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */
uval = (ulong)0 - uval;
}
radix = -radix;
}
else if (radix > 36 || radix < 2)
return NullS;
/*
The slightly contorted code which follows is due to the fact that
few machines directly support unsigned long / and %. Certainly
the VAX C compiler generates a subroutine call. In the interests
of efficiency (hollow laugh) I let this happen for the first digit
only; after that "val" will be in range so that signed integer
division will do. Sorry 'bout that. CHECK THE CODE PRODUCED BY
YOUR C COMPILER. The first % and / should be unsigned, the second
% and / signed, but C compilers tend to be extraordinarily
sensitive to minor details of style. This works on a VAX, that's
all I claim for it.
*/
p = &buffer[sizeof(buffer)-1];
*p = '\0';
new_val= uval / (ulong) radix;
*--p = dig_vec[(uchar) (uval- (ulong) new_val*(ulong) radix)];
val = new_val;
#ifdef HAVE_LDIV
while (val != 0)
{
ldiv_t res;
res=ldiv(val,radix);
*--p = dig_vec[res.rem];
val= res.quot;
}
#else
while (val != 0)
{
new_val=val/radix;
*--p = dig_vec[(uchar) (val-new_val*radix)];
val= new_val;
}
#endif
while ((*dst++ = *p++) != 0) ;
return dst-1;
} | O0 | c | int2str:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x60(%rbp)
movq %rsi, -0x68(%rbp)
movl %edx, -0x6c(%rbp)
movl %ecx, -0x70(%rbp)
movl -0x70(%rbp), %edx
leaq 0x144560(%rip), %rax # 0x1ec650
leaq 0x144529(%rip), %rcx # 0x1ec620
cmpl $0x0, %edx
cmovneq %rcx, %rax
movq %rax, -0x88(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x90(%rbp)
cmpl $0x0, -0x6c(%rbp)
jge 0xa8162
cmpl $-0x24, -0x6c(%rbp)
jl 0xa8122
cmpl $-0x2, -0x6c(%rbp)
jle 0xa812f
movq $0x0, -0x58(%rbp)
jmp 0xa8289
cmpq $0x0, -0x60(%rbp)
jge 0xa8158
movq -0x68(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x68(%rbp)
movb $0x2d, (%rax)
xorl %eax, %eax
subq -0x90(%rbp), %rax
movq %rax, -0x90(%rbp)
xorl %eax, %eax
subl -0x6c(%rbp), %eax
movl %eax, -0x6c(%rbp)
jmp 0xa817d
cmpl $0x24, -0x6c(%rbp)
jg 0xa816e
cmpl $0x2, -0x6c(%rbp)
jge 0xa817b
movq $0x0, -0x58(%rbp)
jmp 0xa8289
jmp 0xa817d
leaq -0x50(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movb $0x0, (%rax)
movq -0x90(%rbp), %rax
movslq -0x6c(%rbp), %rcx
xorl %edx, %edx
divq %rcx
movq %rax, -0x80(%rbp)
movq -0x88(%rbp), %rax
movq -0x90(%rbp), %rcx
movq -0x80(%rbp), %rdx
movslq -0x6c(%rbp), %rsi
imulq %rsi, %rdx
subq %rdx, %rcx
movzbl %cl, %ecx
movb (%rax,%rcx), %cl
movq -0x78(%rbp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x78(%rbp)
movb %cl, -0x1(%rax)
movq -0x80(%rbp), %rax
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
je 0xa824f
movq -0x60(%rbp), %rdi
movslq -0x6c(%rbp), %rsi
callq 0x26140
movq %rax, -0xb0(%rbp)
movq %rdx, -0xa8(%rbp)
movq -0xb0(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x88(%rbp), %rax
movq -0x98(%rbp), %rcx
movb (%rax,%rcx), %cl
movq -0x78(%rbp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x78(%rbp)
movb %cl, -0x1(%rax)
movq -0xa0(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0xa81e1
jmp 0xa8251
movq -0x78(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x78(%rbp)
movb (%rax), %al
movq -0x68(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x68(%rbp)
movb %al, (%rcx)
movsbl %al, %eax
cmpl $0x0, %eax
je 0xa827d
jmp 0xa8251
movq -0x68(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xa82b6
movq -0xb8(%rbp), %rax
addq $0xc0, %rsp
popq %rbp
retq
callq 0x26360
nopl (%rax,%rax)
| int2str:
push rbp
mov rbp, rsp
sub rsp, 0C0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_60], rdi
mov [rbp+var_68], rsi
mov [rbp+var_6C], edx
mov [rbp+var_70], ecx
mov edx, [rbp+var_70]
lea rax, _dig_vec_lower; "0123456789abcdefghijklmnopqrstuvwxyz"
lea rcx, _dig_vec_upper; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
cmp edx, 0
cmovnz rax, rcx
mov [rbp+var_88], rax
mov rax, [rbp+var_60]
mov [rbp+var_90], rax
cmp [rbp+var_6C], 0
jge short loc_A8162
cmp [rbp+var_6C], 0FFFFFFDCh
jl short loc_A8122
cmp [rbp+var_6C], 0FFFFFFFEh
jle short loc_A812F
loc_A8122:
mov [rbp+var_58], 0
jmp loc_A8289
loc_A812F:
cmp [rbp+var_60], 0
jge short loc_A8158
mov rax, [rbp+var_68]
mov rcx, rax
add rcx, 1
mov [rbp+var_68], rcx
mov byte ptr [rax], 2Dh ; '-'
xor eax, eax
sub rax, [rbp+var_90]
mov [rbp+var_90], rax
loc_A8158:
xor eax, eax
sub eax, [rbp+var_6C]
mov [rbp+var_6C], eax
jmp short loc_A817D
loc_A8162:
cmp [rbp+var_6C], 24h ; '$'
jg short loc_A816E
cmp [rbp+var_6C], 2
jge short loc_A817B
loc_A816E:
mov [rbp+var_58], 0
jmp loc_A8289
loc_A817B:
jmp short $+2
loc_A817D:
lea rax, [rbp+var_50]
add rax, 40h ; '@'
mov [rbp+var_78], rax
mov rax, [rbp+var_78]
mov byte ptr [rax], 0
mov rax, [rbp+var_90]
movsxd rcx, [rbp+var_6C]
xor edx, edx
div rcx
mov [rbp+var_80], rax
mov rax, [rbp+var_88]
mov rcx, [rbp+var_90]
mov rdx, [rbp+var_80]
movsxd rsi, [rbp+var_6C]
imul rdx, rsi
sub rcx, rdx
movzx ecx, cl
mov cl, [rax+rcx]
mov rax, [rbp+var_78]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_78], rdx
mov [rax-1], cl
mov rax, [rbp+var_80]
mov [rbp+var_60], rax
loc_A81E1:
cmp [rbp+var_60], 0
jz short loc_A824F
mov rdi, [rbp+var_60]
movsxd rsi, [rbp+var_6C]
call _ldiv
mov [rbp+var_B0], rax
mov [rbp+var_A8], rdx
mov rax, [rbp+var_B0]
mov [rbp+var_A0], rax
mov rax, [rbp+var_A8]
mov [rbp+var_98], rax
mov rax, [rbp+var_88]
mov rcx, [rbp+var_98]
mov cl, [rax+rcx]
mov rax, [rbp+var_78]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_78], rdx
mov [rax-1], cl
mov rax, [rbp+var_A0]
mov [rbp+var_60], rax
jmp short loc_A81E1
loc_A824F:
jmp short $+2
loc_A8251:
mov rax, [rbp+var_78]
mov rcx, rax
add rcx, 1
mov [rbp+var_78], rcx
mov al, [rax]
mov rcx, [rbp+var_68]
mov rdx, rcx
add rdx, 1
mov [rbp+var_68], rdx
mov [rcx], al
movsx eax, al
cmp eax, 0
jz short loc_A827D
jmp short loc_A8251
loc_A827D:
mov rax, [rbp+var_68]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_58], rax
loc_A8289:
mov rax, [rbp+var_58]
mov [rbp+var_B8], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_A82B6
mov rax, [rbp+var_B8]
add rsp, 0C0h
pop rbp
retn
loc_A82B6:
call ___stack_chk_fail
| _BYTE * int2str(long long a1, _BYTE *a2, int a3, int a4)
{
const char *v4; // rax
long long v5; // rdx
_BYTE *v6; // rax
_BYTE *v7; // rax
_BYTE *v8; // rcx
long long v10; // [rsp+10h] [rbp-B0h]
unsigned long long v11; // [rsp+30h] [rbp-90h]
const char *v12; // [rsp+38h] [rbp-88h]
_BYTE *v13; // [rsp+48h] [rbp-78h]
int v14; // [rsp+54h] [rbp-6Ch]
_BYTE *v15; // [rsp+58h] [rbp-68h]
unsigned long long i; // [rsp+60h] [rbp-60h]
_BYTE v18[9]; // [rsp+AFh] [rbp-11h] BYREF
unsigned long long v19; // [rsp+B8h] [rbp-8h]
v19 = __readfsqword(0x28u);
v15 = a2;
v14 = a3;
v4 = "0123456789abcdefghijklmnopqrstuvwxyz";
if ( a4 )
v4 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
v12 = v4;
v11 = a1;
if ( a3 >= 0 )
{
if ( a3 > 36 || a3 < 2 )
return 0LL;
}
else
{
if ( a3 < -36 || a3 > -2 )
return 0LL;
if ( a1 < 0 )
{
v15 = a2 + 1;
*a2 = 45;
v11 = -a1;
}
v14 = -a3;
}
v18[1] = 0;
v13 = v18;
v18[0] = v4[(unsigned __int8)(v11 % v14)];
for ( i = v11 / v14; i; i = v10 )
{
v10 = ldiv(i, v14);
v6 = v13--;
*(v6 - 1) = v12[v5];
}
do
{
v7 = v13++;
LOBYTE(v7) = *v7;
v8 = v15++;
*v8 = (_BYTE)v7;
}
while ( (_BYTE)v7 );
return v15 - 1;
}
| int2str:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x60],RDI
MOV qword ptr [RBP + -0x68],RSI
MOV dword ptr [RBP + -0x6c],EDX
MOV dword ptr [RBP + -0x70],ECX
MOV EDX,dword ptr [RBP + -0x70]
LEA RAX,[0x2ec650]
LEA RCX,[0x2ec620]
CMP EDX,0x0
CMOVNZ RAX,RCX
MOV qword ptr [RBP + -0x88],RAX
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x90],RAX
CMP dword ptr [RBP + -0x6c],0x0
JGE 0x001a8162
CMP dword ptr [RBP + -0x6c],-0x24
JL 0x001a8122
CMP dword ptr [RBP + -0x6c],-0x2
JLE 0x001a812f
LAB_001a8122:
MOV qword ptr [RBP + -0x58],0x0
JMP 0x001a8289
LAB_001a812f:
CMP qword ptr [RBP + -0x60],0x0
JGE 0x001a8158
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x68],RCX
MOV byte ptr [RAX],0x2d
XOR EAX,EAX
SUB RAX,qword ptr [RBP + -0x90]
MOV qword ptr [RBP + -0x90],RAX
LAB_001a8158:
XOR EAX,EAX
SUB EAX,dword ptr [RBP + -0x6c]
MOV dword ptr [RBP + -0x6c],EAX
JMP 0x001a817d
LAB_001a8162:
CMP dword ptr [RBP + -0x6c],0x24
JG 0x001a816e
CMP dword ptr [RBP + -0x6c],0x2
JGE 0x001a817b
LAB_001a816e:
MOV qword ptr [RBP + -0x58],0x0
JMP 0x001a8289
LAB_001a817b:
JMP 0x001a817d
LAB_001a817d:
LEA RAX,[RBP + -0x50]
ADD RAX,0x40
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x78]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x90]
MOVSXD RCX,dword ptr [RBP + -0x6c]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x80],RAX
MOV RAX,qword ptr [RBP + -0x88]
MOV RCX,qword ptr [RBP + -0x90]
MOV RDX,qword ptr [RBP + -0x80]
MOVSXD RSI,dword ptr [RBP + -0x6c]
IMUL RDX,RSI
SUB RCX,RDX
MOVZX ECX,CL
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x78]
MOV RDX,RAX
ADD RDX,-0x1
MOV qword ptr [RBP + -0x78],RDX
MOV byte ptr [RAX + -0x1],CL
MOV RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RBP + -0x60],RAX
LAB_001a81e1:
CMP qword ptr [RBP + -0x60],0x0
JZ 0x001a824f
MOV RDI,qword ptr [RBP + -0x60]
MOVSXD RSI,dword ptr [RBP + -0x6c]
CALL 0x00126140
MOV qword ptr [RBP + -0xb0],RAX
MOV qword ptr [RBP + -0xa8],RDX
MOV RAX,qword ptr [RBP + -0xb0]
MOV qword ptr [RBP + -0xa0],RAX
MOV RAX,qword ptr [RBP + -0xa8]
MOV qword ptr [RBP + -0x98],RAX
MOV RAX,qword ptr [RBP + -0x88]
MOV RCX,qword ptr [RBP + -0x98]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x78]
MOV RDX,RAX
ADD RDX,-0x1
MOV qword ptr [RBP + -0x78],RDX
MOV byte ptr [RAX + -0x1],CL
MOV RAX,qword ptr [RBP + -0xa0]
MOV qword ptr [RBP + -0x60],RAX
JMP 0x001a81e1
LAB_001a824f:
JMP 0x001a8251
LAB_001a8251:
MOV RAX,qword ptr [RBP + -0x78]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x78],RCX
MOV AL,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x68]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x68],RDX
MOV byte ptr [RCX],AL
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x001a827d
JMP 0x001a8251
LAB_001a827d:
MOV RAX,qword ptr [RBP + -0x68]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x58],RAX
LAB_001a8289:
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0xb8],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001a82b6
MOV RAX,qword ptr [RBP + -0xb8]
ADD RSP,0xc0
POP RBP
RET
LAB_001a82b6:
CALL 0x00126360
|
char * int2str(ulong param_1,char *param_2,int param_3,int param_4)
{
char cVar1;
char *pcVar2;
char *pcVar3;
long in_FS_OFFSET;
ldiv_t lVar4;
ulong local_b8;
long local_b0;
ulong local_98;
char *local_80;
int local_74;
char *local_70;
ulong local_68;
char *local_60;
char local_19 [9];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
pcVar3 = "0123456789abcdefghijklmnopqrstuvwxyz";
if (param_4 != 0) {
pcVar3 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
}
local_98 = param_1;
local_70 = param_2;
if (param_3 < 0) {
if ((param_3 < -0x24) || (-2 < param_3)) {
local_60 = (char *)0x0;
goto LAB_001a8289;
}
if ((long)param_1 < 0) {
local_70 = param_2 + 1;
*param_2 = '-';
local_98 = -param_1;
}
local_74 = -param_3;
}
else if ((0x24 < param_3) || (local_74 = param_3, param_3 < 2)) {
local_60 = (char *)0x0;
goto LAB_001a8289;
}
local_19[1] = 0;
local_68 = local_98 / (ulong)(long)local_74;
local_19[0] = pcVar3[(byte)((char)local_98 - (char)local_68 * (char)local_74)];
local_80 = local_19;
while (pcVar2 = local_70, local_68 != 0) {
lVar4 = ldiv(local_68,(long)local_74);
local_b8 = lVar4.quot;
local_b0 = lVar4.rem;
local_80[-1] = pcVar3[local_b0];
local_80 = local_80 + -1;
local_68 = local_b8;
}
do {
local_70 = pcVar2;
cVar1 = *local_80;
*local_70 = cVar1;
local_80 = local_80 + 1;
pcVar2 = local_70 + 1;
} while (cVar1 != '\0');
local_60 = local_70;
LAB_001a8289:
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_60;
}
|
|
6,121 | inline_mysql_file_create | eloqsql/include/mysql/psi/mysql_file.h | static inline File
inline_mysql_file_create(
#ifdef HAVE_PSI_FILE_INTERFACE
PSI_file_key key, const char *src_file, uint src_line,
#endif
const char *filename, int create_flags, int access_flags, myf myFlags)
{
File file;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_CREATE, filename,
&locker);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
file= my_create(filename, create_flags, access_flags, myFlags);
PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file);
return file;
}
#endif
file= my_create(filename, create_flags, access_flags, myFlags);
return file;
} | O0 | c | inline_mysql_file_create:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq 0x10(%rbp), %rax
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movl %r9d, -0x28(%rbp)
leaq 0x20edfc(%rip), %rax # 0x2c8038
movq (%rax), %rax
movq 0x148(%rax), %rax
movl -0x8(%rbp), %esi
movq -0x20(%rbp), %rcx
leaq -0x80(%rbp), %rdi
xorl %edx, %edx
leaq -0x38(%rbp), %r8
callq *%rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%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 0xb92d3
leaq 0x20edb4(%rip), %rax # 0x2c8038
movq (%rax), %rax
movq 0x1f0(%rax), %rax
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq *%rax
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %esi
movl -0x28(%rbp), %edx
movq 0x10(%rbp), %rcx
callq 0xf71e0
movl %eax, -0x2c(%rbp)
leaq 0x20ed80(%rip), %rax # 0x2c8038
movq (%rax), %rax
movq 0x200(%rax), %rax
movq -0x38(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq *%rax
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xb92ef
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %esi
movl -0x28(%rbp), %edx
movq 0x10(%rbp), %rcx
callq 0xf71e0
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| inline_mysql_file_create_1:
push rbp
mov rbp, rsp
sub rsp, 80h
mov rax, [rbp+arg_0]
mov [rbp+var_8], edi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_20], rcx
mov [rbp+var_24], r8d
mov [rbp+var_28], r9d
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+148h]
mov esi, [rbp+var_8]
mov rcx, [rbp+var_20]
lea rdi, [rbp+var_80]
xor edx, edx
lea r8, [rbp+var_38]
call rax
mov [rbp+var_38], rax
cmp [rbp+var_38], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_B92D3
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1F0h]
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_10]
mov edx, [rbp+var_14]
call rax
mov rdi, [rbp+var_20]
mov esi, [rbp+var_24]
mov edx, [rbp+var_28]
mov rcx, [rbp+arg_0]
call my_create
mov [rbp+var_2C], eax
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+200h]
mov rdi, [rbp+var_38]
mov esi, [rbp+var_2C]
call rax
mov eax, [rbp+var_2C]
mov [rbp+var_4], eax
jmp short loc_B92EF
loc_B92D3:
mov rdi, [rbp+var_20]
mov esi, [rbp+var_24]
mov edx, [rbp+var_28]
mov rcx, [rbp+arg_0]
call my_create
mov [rbp+var_2C], eax
mov eax, [rbp+var_2C]
mov [rbp+var_4], eax
loc_B92EF:
mov eax, [rbp+var_4]
add rsp, 80h
pop rbp
retn
| long long inline_mysql_file_create_1(
unsigned int a1,
long long a2,
unsigned int a3,
long long a4,
unsigned int a5,
unsigned int a6,
long long a7)
{
_BYTE v8[72]; // [rsp+0h] [rbp-80h] BYREF
long long v9; // [rsp+48h] [rbp-38h] BYREF
unsigned int v10; // [rsp+54h] [rbp-2Ch]
unsigned int v11; // [rsp+58h] [rbp-28h]
unsigned int v12; // [rsp+5Ch] [rbp-24h]
long long v13; // [rsp+60h] [rbp-20h]
unsigned int v14; // [rsp+6Ch] [rbp-14h]
long long v15; // [rsp+70h] [rbp-10h]
unsigned int v16; // [rsp+78h] [rbp-8h]
v16 = a1;
v15 = a2;
v14 = a3;
v13 = a4;
v12 = a5;
v11 = a6;
v9 = ((long long ( *)(_BYTE *, _QWORD, _QWORD, long long, long long *))PSI_server[41])(v8, a1, 0LL, a4, &v9);
if ( v9 )
{
((void ( *)(long long, long long, _QWORD))PSI_server[62])(v9, v15, v14);
v10 = my_create(v13, v12, v11, a7);
((void ( *)(long long, _QWORD))PSI_server[64])(v9, v10);
}
else
{
return (unsigned int)my_create(v13, v12, v11, a7);
}
return v10;
}
| inline_mysql_file_create:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV RAX,qword ptr [RBP + 0x10]
MOV dword ptr [RBP + -0x8],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV dword ptr [RBP + -0x24],R8D
MOV dword ptr [RBP + -0x28],R9D
LEA RAX,[0x3c8038]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x148]
MOV ESI,dword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x20]
LEA RDI,[RBP + -0x80]
XOR EDX,EDX
LEA R8,[RBP + -0x38]
CALL RAX
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x38],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 0x001b92d3
LEA RAX,[0x3c8038]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1f0]
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x14]
CALL RAX
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,dword ptr [RBP + -0x24]
MOV EDX,dword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + 0x10]
CALL 0x001f71e0
MOV dword ptr [RBP + -0x2c],EAX
LEA RAX,[0x3c8038]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x200]
MOV RDI,qword ptr [RBP + -0x38]
MOV ESI,dword ptr [RBP + -0x2c]
CALL RAX
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001b92ef
LAB_001b92d3:
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,dword ptr [RBP + -0x24]
MOV EDX,dword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + 0x10]
CALL 0x001f71e0
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x4],EAX
LAB_001b92ef:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x80
POP RBP
RET
|
int4
inline_mysql_file_create
(int4 param_1,int8 param_2,int4 param_3,int8 param_4,
int4 param_5,int4 param_6,int8 param_7)
{
int1 local_88 [72];
long local_40;
int4 local_34;
int4 local_30;
int4 local_2c;
int8 local_28;
int4 local_1c;
int8 local_18;
int4 local_10;
int4 local_c;
local_30 = param_6;
local_2c = param_5;
local_28 = param_4;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
local_40 = (**(code **)(PSI_server + 0x148))(local_88,param_1,0,param_4,&local_40);
if (local_40 == 0) {
local_c = my_create(local_28,local_2c,local_30,param_7);
}
else {
(**(code **)(PSI_server + 0x1f0))(local_40,local_18,local_1c);
local_34 = my_create(local_28,local_2c,local_30,param_7);
(**(code **)(PSI_server + 0x200))(local_40,local_34);
local_c = local_34;
}
return local_c;
}
|
|
6,122 | mi_mmap_pread | eloqsql/storage/myisam/mi_dynrec.c | size_t mi_mmap_pread(MI_INFO *info, uchar *Buffer,
size_t Count, my_off_t offset, myf MyFlags)
{
DBUG_PRINT("info", ("mi_read with mmap %d\n", info->dfile));
if (info->s->concurrent_insert)
mysql_rwlock_rdlock(&info->s->mmap_lock);
/*
The following test may fail in the following cases:
- We failed to remap a memory area (fragmented memory?)
- This thread has done some writes, but not yet extended the
memory mapped area.
*/
if (info->s->mmaped_length >= offset + Count)
{
memcpy(Buffer, info->s->file_map + offset, Count);
if (info->s->concurrent_insert)
mysql_rwlock_unlock(&info->s->mmap_lock);
return 0;
}
else
{
if (info->s->concurrent_insert)
mysql_rwlock_unlock(&info->s->mmap_lock);
return mysql_file_pread(info->dfile, Buffer, Count, offset, MyFlags);
}
} | O3 | c | mi_mmap_pread:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r8, -0x30(%rbp)
movq %rcx, %r15
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r13
movq (%rdi), %rax
cmpb $0x0, 0x384(%rax)
je 0x7bde0
leaq 0x4e0(%rax), %rdi
cmpq $0x0, 0x570(%rax)
jne 0x7beb6
callq 0xab758
movq (%r13), %r14
leaq (%r15,%rbx), %rax
cmpq %rax, 0x4d0(%r14)
jae 0x7be60
cmpb $0x0, 0x384(%r14)
je 0x7be1a
movq 0x570(%r14), %rdi
addq $0x4e0, %r14 # imm = 0x4E0
testq %rdi, %rdi
jne 0x7bf3d
movq %r14, %rdi
callq 0xab886
movl 0x1c0(%r13), %r14d
leaq 0x314cf0(%rip), %rax # 0x390b18
movq (%rax), %rax
leaq -0x78(%rbp), %rdi
movl %r14d, %esi
movl $0x6, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x7becc
movl %r14d, %edi
movq %r12, %rsi
movq %rbx, %rdx
movq %r15, %rcx
movq -0x30(%rbp), %r8
callq 0xa78c4
movq %rax, %r15
jmp 0x7bea4
addq 0x270(%r14), %r15
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2a0a0
movq (%r13), %rbx
cmpb $0x0, 0x384(%rbx)
je 0x7bea1
movq 0x570(%rbx), %rdi
addq $0x4e0, %rbx # imm = 0x4E0
testq %rdi, %rdi
jne 0x7bf52
movq %rbx, %rdi
callq 0xab886
xorl %r15d, %r15d
movq %r15, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6800c(%rip), %rsi # 0xe3ec9
movl $0xac, %edx
callq 0x2fff0
jmp 0x7bde0
movq %rax, %r13
leaq 0x314c42(%rip), %rax # 0x390b18
movq (%rax), %rax
leaq 0x67fe9(%rip), %rdx # 0xe3ec9
movq %r13, %rdi
movq %rbx, %rsi
movl $0xc0, %ecx
callq *0x210(%rax)
movl %r14d, %edi
movq %r12, %rsi
movq %rbx, %rdx
movq %r15, %rcx
movq -0x30(%rbp), %r14
movq %r14, %r8
callq 0xa78c4
movq %rax, %r15
xorl %esi, %esi
testq %rax, %rax
cmovneq %rsi, %rbx
cmpq $-0x1, %rax
cmovneq %rax, %rsi
testb $0x6, %r14b
cmovneq %rbx, %rsi
leaq 0x314bec(%rip), %rax # 0x390b18
movq (%rax), %rax
movq %r13, %rdi
callq *0x218(%rax)
jmp 0x7bea4
leaq 0x314bd4(%rip), %rax # 0x390b18
movq (%rax), %rax
callq *0x168(%rax)
jmp 0x7be12
leaq 0x314bbf(%rip), %rax # 0x390b18
movq (%rax), %rax
callq *0x168(%rax)
jmp 0x7be99
| mi_mmap_pread:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov [rbp+var_30], r8
mov r15, rcx
mov rbx, rdx
mov r12, rsi
mov r13, rdi
mov rax, [rdi]
cmp byte ptr [rax+384h], 0
jz short loc_7BDE0
lea rdi, [rax+4E0h]
cmp qword ptr [rax+570h], 0
jnz loc_7BEB6
call my_rw_rdlock
loc_7BDE0:
mov r14, [r13+0]
lea rax, [r15+rbx]
cmp [r14+4D0h], rax
jnb short loc_7BE60
cmp byte ptr [r14+384h], 0
jz short loc_7BE1A
mov rdi, [r14+570h]
add r14, 4E0h
test rdi, rdi
jnz loc_7BF3D
loc_7BE12:
mov rdi, r14
call my_rw_unlock
loc_7BE1A:
mov r14d, [r13+1C0h]
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_78]
mov esi, r14d
mov edx, 6
call qword ptr [rax+158h]
test rax, rax
jnz loc_7BECC
mov edi, r14d
mov rsi, r12
mov rdx, rbx
mov rcx, r15
mov r8, [rbp+var_30]
call my_pread
mov r15, rax
jmp short loc_7BEA4
loc_7BE60:
add r15, [r14+270h]
mov rdi, r12
mov rsi, r15
mov rdx, rbx
call _memcpy
mov rbx, [r13+0]
cmp byte ptr [rbx+384h], 0
jz short loc_7BEA1
mov rdi, [rbx+570h]
add rbx, 4E0h
test rdi, rdi
jnz loc_7BF52
loc_7BE99:
mov rdi, rbx
call my_rw_unlock
loc_7BEA1:
xor r15d, r15d
loc_7BEA4:
mov rax, r15
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7BEB6:
lea rsi, aWorkspaceLlm4b_13; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0ACh
call psi_rwlock_rdlock
jmp loc_7BDE0
loc_7BECC:
mov r13, rax
lea rax, PSI_server
mov rax, [rax]
lea rdx, aWorkspaceLlm4b_13; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, r13
mov rsi, rbx
mov ecx, 0C0h
call qword ptr [rax+210h]
mov edi, r14d
mov rsi, r12
mov rdx, rbx
mov rcx, r15
mov r14, [rbp+var_30]
mov r8, r14
call my_pread
mov r15, rax
xor esi, esi
test rax, rax
cmovnz rbx, rsi
cmp rax, 0FFFFFFFFFFFFFFFFh
cmovnz rsi, rax
test r14b, 6
cmovnz rsi, rbx
lea rax, PSI_server
mov rax, [rax]
mov rdi, r13
call qword ptr [rax+218h]
jmp loc_7BEA4
loc_7BF3D:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+168h]
jmp loc_7BE12
loc_7BF52:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+168h]
jmp loc_7BE99
| long long mi_mmap_pread(_DWORD *a1, long long a2, long long a3, long long a4, long long a5)
{
long long v8; // rax
long long v9; // rdi
long long v10; // r14
long long v11; // rdi
long long v12; // r14
unsigned int v13; // r14d
long long v14; // rax
long long v15; // r15
long long v16; // rbx
long long v17; // rdi
long long v18; // rbx
long long v20; // r13
_BYTE v21[72]; // [rsp+8h] [rbp-78h] BYREF
long long v22; // [rsp+50h] [rbp-30h]
v22 = a5;
v8 = *(_QWORD *)a1;
if ( *(_BYTE *)(*(_QWORD *)a1 + 900LL) )
{
v9 = v8 + 1248;
if ( *(_QWORD *)(v8 + 1392) )
psi_rwlock_rdlock(v9, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c", 0xACu);
else
my_rw_rdlock(v9);
}
v10 = *(_QWORD *)a1;
if ( *(_QWORD *)(*(_QWORD *)a1 + 1232LL) >= (unsigned long long)(a4 + a3) )
{
memcpy(a2, *(_QWORD *)(v10 + 624) + a4, a3);
v16 = *(_QWORD *)a1;
if ( *(_BYTE *)(*(_QWORD *)a1 + 900LL) )
{
v17 = *(_QWORD *)(v16 + 1392);
v18 = v16 + 1248;
if ( v17 )
PSI_server[45]();
my_rw_unlock(v18);
}
return 0LL;
}
else
{
if ( *(_BYTE *)(v10 + 900) )
{
v11 = *(_QWORD *)(v10 + 1392);
v12 = v10 + 1248;
if ( v11 )
PSI_server[45]();
my_rw_unlock(v12);
}
v13 = a1[112];
v14 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v21, v13, 6LL);
if ( v14 )
{
v20 = v14;
((void ( *)(long long, long long, const char *, long long))PSI_server[66])(
v14,
a3,
"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c",
192LL);
v15 = my_pread(v13, a2, a3, a4, v22);
((void ( *)(long long))PSI_server[67])(v20);
}
else
{
return my_pread(v13, a2, a3, a4, v22);
}
}
return v15;
}
| mi_mmap_pread:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x30],R8
MOV R15,RCX
MOV RBX,RDX
MOV R12,RSI
MOV R13,RDI
MOV RAX,qword ptr [RDI]
CMP byte ptr [RAX + 0x384],0x0
JZ 0x0017bde0
LEA RDI,[RAX + 0x4e0]
CMP qword ptr [RAX + 0x570],0x0
JNZ 0x0017beb6
CALL 0x001ab758
LAB_0017bde0:
MOV R14,qword ptr [R13]
LEA RAX,[R15 + RBX*0x1]
CMP qword ptr [R14 + 0x4d0],RAX
JNC 0x0017be60
CMP byte ptr [R14 + 0x384],0x0
JZ 0x0017be1a
MOV RDI,qword ptr [R14 + 0x570]
ADD R14,0x4e0
TEST RDI,RDI
JNZ 0x0017bf3d
LAB_0017be12:
MOV RDI,R14
CALL 0x001ab886
LAB_0017be1a:
MOV R14D,dword ptr [R13 + 0x1c0]
LEA RAX,[0x490b18]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x78]
MOV ESI,R14D
MOV EDX,0x6
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x0017becc
MOV EDI,R14D
MOV RSI,R12
MOV RDX,RBX
MOV RCX,R15
MOV R8,qword ptr [RBP + -0x30]
CALL 0x001a78c4
MOV R15,RAX
JMP 0x0017bea4
LAB_0017be60:
ADD R15,qword ptr [R14 + 0x270]
MOV RDI,R12
MOV RSI,R15
MOV RDX,RBX
CALL 0x0012a0a0
MOV RBX,qword ptr [R13]
CMP byte ptr [RBX + 0x384],0x0
JZ 0x0017bea1
MOV RDI,qword ptr [RBX + 0x570]
ADD RBX,0x4e0
TEST RDI,RDI
JNZ 0x0017bf52
LAB_0017be99:
MOV RDI,RBX
CALL 0x001ab886
LAB_0017bea1:
XOR R15D,R15D
LAB_0017bea4:
MOV RAX,R15
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0017beb6:
LEA RSI,[0x1e3ec9]
MOV EDX,0xac
CALL 0x0012fff0
JMP 0x0017bde0
LAB_0017becc:
MOV R13,RAX
LEA RAX,[0x490b18]
MOV RAX,qword ptr [RAX]
LEA RDX,[0x1e3ec9]
MOV RDI,R13
MOV RSI,RBX
MOV ECX,0xc0
CALL qword ptr [RAX + 0x210]
MOV EDI,R14D
MOV RSI,R12
MOV RDX,RBX
MOV RCX,R15
MOV R14,qword ptr [RBP + -0x30]
MOV R8,R14
CALL 0x001a78c4
MOV R15,RAX
XOR ESI,ESI
TEST RAX,RAX
CMOVNZ RBX,RSI
CMP RAX,-0x1
CMOVNZ RSI,RAX
TEST R14B,0x6
CMOVNZ RSI,RBX
LEA RAX,[0x490b18]
MOV RAX,qword ptr [RAX]
MOV RDI,R13
CALL qword ptr [RAX + 0x218]
JMP 0x0017bea4
LAB_0017bf3d:
LEA RAX,[0x490b18]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x168]
JMP 0x0017be12
LAB_0017bf52:
LEA RAX,[0x490b18]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x168]
JMP 0x0017be99
|
size_t mi_mmap_pread(long *param_1,void *param_2,size_t param_3,long param_4,ulong param_5)
{
int4 uVar1;
ulong uVar2;
long lVar3;
size_t sVar4;
size_t sVar5;
int1 local_80 [72];
ulong local_38;
lVar3 = *param_1;
local_38 = param_5;
if (*(char *)(lVar3 + 900) != '\0') {
if (*(long *)(lVar3 + 0x570) == 0) {
my_rw_rdlock();
}
else {
psi_rwlock_rdlock(lVar3 + 0x4e0,
"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c",0xac);
}
}
lVar3 = *param_1;
if (*(ulong *)(lVar3 + 0x4d0) < param_4 + param_3) {
if (*(char *)(lVar3 + 900) != '\0') {
if (*(long *)(lVar3 + 0x570) != 0) {
(**(code **)(PSI_server + 0x168))();
}
my_rw_unlock(lVar3 + 0x4e0);
}
uVar1 = (int4)param_1[0x38];
lVar3 = (**(code **)(PSI_server + 0x158))(local_80,uVar1,6);
if (lVar3 == 0) {
sVar4 = my_pread(uVar1,param_2,param_3,param_4,local_38);
}
else {
(**(code **)(PSI_server + 0x210))
(lVar3,param_3,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c"
,0xc0);
uVar2 = local_38;
sVar4 = my_pread(uVar1,param_2,param_3,param_4,local_38);
if (sVar4 != 0) {
param_3 = 0;
}
sVar5 = 0;
if (sVar4 != 0xffffffffffffffff) {
sVar5 = sVar4;
}
if ((uVar2 & 6) != 0) {
sVar5 = param_3;
}
(**(code **)(PSI_server + 0x218))(lVar3,sVar5);
}
}
else {
memcpy(param_2,(void *)(param_4 + *(long *)(lVar3 + 0x270)),param_3);
lVar3 = *param_1;
if (*(char *)(lVar3 + 900) != '\0') {
if (*(long *)(lVar3 + 0x570) != 0) {
(**(code **)(PSI_server + 0x168))();
}
my_rw_unlock(lVar3 + 0x4e0);
}
sVar4 = 0;
}
return sVar4;
}
|
|
6,123 | testing::internal::CaptureStream(int, char const*, testing::internal::CapturedStream**) | giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest-port.cc | static void CaptureStream(int fd, const char* stream_name,
CapturedStream** stream) {
if (*stream != nullptr) {
GTEST_LOG_(FATAL) << "Only one " << stream_name
<< " capturer can exist at a time.";
}
*stream = new CapturedStream(fd);
} | O1 | cpp | testing::internal::CaptureStream(int, char const*, testing::internal::CapturedStream**):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %edi, %ebp
cmpq $0x0, (%rdx)
je 0x170c9
movq %rsi, %r14
leaq 0x2b37a(%rip), %rdx # 0x423b9
leaq 0x4(%rsp), %rdi
movl $0x3, %esi
movl $0x4ab, %ecx # imm = 0x4AB
callq 0x16e72
movq 0x41f8e(%rip), %r15 # 0x58fe8
leaq 0x2cdc5(%rip), %rsi # 0x43e26
movl $0x9, %edx
movq %r15, %rdi
callq 0x85b0
testq %r14, %r14
je 0x1708f
movq %r14, %rdi
callq 0x8200
movq 0x41f66(%rip), %rdi # 0x58fe8
movq %r14, %rsi
movq %rax, %rdx
callq 0x85b0
jmp 0x170a7
movq (%r15), %rax
movq -0x18(%rax), %rax
leaq (%r15,%rax), %rdi
movl 0x20(%r15,%rax), %esi
orl $0x1, %esi
callq 0x8930
movq 0x41f3a(%rip), %rdi # 0x58fe8
leaq 0x2cd7b(%rip), %rsi # 0x43e30
movl $0x1e, %edx
callq 0x85b0
leaq 0x4(%rsp), %rdi
callq 0x16fb4
movl $0x28, %edi
callq 0x84b0
movq %rax, %r14
movq %rax, %rdi
movl %ebp, %esi
callq 0x362c0
movq %r14, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x28, %esi
movq %r14, %rdi
callq 0x84e0
jmp 0x1710d
movq %rax, %rbx
leaq 0x4(%rsp), %rdi
callq 0x16fb4
movq %rbx, %rdi
callq 0x8990
| _ZN7testing8internalL13CaptureStreamEiPKcPPNS0_14CapturedStreamE:
push rbp
push r15
push r14
push rbx
push rax
mov rbx, rdx
mov ebp, edi
cmp qword ptr [rdx], 0
jz loc_170C9
mov r14, rsi
lea rdx, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdi, [rsp+28h+var_24]
mov esi, 3
mov ecx, 4ABh
call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int)
mov r15, cs:_ZSt4cerr_ptr
lea rsi, aOnlyOne; "Only one "
mov edx, 9
mov rdi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
test r14, r14
jz short loc_1708F
mov rdi, r14
call _strlen
mov rdi, cs:_ZSt4cerr_ptr
mov rsi, r14
mov rdx, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
jmp short loc_170A7
loc_1708F:
mov rax, [r15]
mov rax, [rax-18h]
lea rdi, [r15+rax]
mov esi, [r15+rax+20h]
or esi, 1
call __ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate; std::ios::clear(std::_Ios_Iostate)
loc_170A7:
mov rdi, cs:_ZSt4cerr_ptr
lea rsi, aCapturerCanExi; " capturer can exist at a time."
mov edx, 1Eh
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rdi, [rsp+28h+var_24]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
loc_170C9:
mov edi, 28h ; '('; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
mov rdi, rax; this
mov esi, ebp; int
call _ZN7testing8internal14CapturedStreamC2Ei; testing::internal::CapturedStream::CapturedStream(int)
mov [rbx], r14
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov esi, 28h ; '('; unsigned __int64
mov rdi, r14; void *
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1710D
mov rbx, rax
lea rdi, [rsp+4]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
loc_1710D:
mov rdi, rbx
call __Unwind_Resume
| long long testing::internal::CaptureStream(
testing::internal *this,
long long a2,
char *a3,
testing::internal::CapturedStream **a4)
{
long long v4; // rax
long long v6; // rax
long long v7; // rdx
long long v8; // rcx
testing::internal::CapturedStream *v9; // r14
long long result; // rax
_DWORD v11[9]; // [rsp+0h] [rbp-24h] BYREF
v11[0] = HIDWORD(v4);
if ( *(_QWORD *)a3 )
{
testing::internal::GTestLog::GTestLog(
v11,
3,
"/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest-port.cc",
1195);
std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, "Only one ", 9LL);
if ( a2 )
{
v6 = strlen(a2);
std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, a2, v6);
}
else
{
std::ios::clear(
(char *)&std::cerr + *(_QWORD *)(std::cerr - 24LL),
*(_DWORD *)((char *)&std::cerr + *(_QWORD *)(std::cerr - 24LL) + 32) | 1u);
}
std::__ostream_insert<char,std::char_traits<char>>(&std::cerr, " capturer can exist at a time.", 30LL);
testing::internal::GTestLog::~GTestLog(
(testing::internal::GTestLog *)v11,
(long long)" capturer can exist at a time.",
v7,
v8);
}
v9 = (testing::internal::CapturedStream *)operator new(0x28uLL);
result = testing::internal::CapturedStream::CapturedStream(v9, (int)this);
*(_QWORD *)a3 = v9;
return result;
}
| CaptureStream:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV EBP,EDI
CMP qword ptr [RDX],0x0
JZ 0x001170c9
MOV R14,RSI
LEA RDX,[0x1423b9]
LEA RDI,[RSP + 0x4]
MOV ESI,0x3
MOV ECX,0x4ab
CALL 0x00116e72
LAB_00117053:
MOV R15,qword ptr [0x00158fe8]
LEA RSI,[0x143e26]
MOV EDX,0x9
MOV RDI,R15
CALL 0x001085b0
TEST R14,R14
JZ 0x0011708f
MOV RDI,R14
CALL 0x00108200
MOV RDI,qword ptr [0x00158fe8]
MOV RSI,R14
MOV RDX,RAX
CALL 0x001085b0
JMP 0x001170a7
LAB_0011708f:
MOV RAX,qword ptr [R15]
MOV RAX,qword ptr [RAX + -0x18]
LEA RDI,[R15 + RAX*0x1]
MOV ESI,dword ptr [R15 + RAX*0x1 + 0x20]
OR ESI,0x1
CALL 0x00108930
LAB_001170a7:
MOV RDI,qword ptr [0x00158fe8]
LEA RSI,[0x143e30]
MOV EDX,0x1e
CALL 0x001085b0
LAB_001170bf:
LEA RDI,[RSP + 0x4]
CALL 0x00116fb4
LAB_001170c9:
MOV EDI,0x28
CALL 0x001084b0
MOV R14,RAX
LAB_001170d6:
MOV RDI,RAX
MOV ESI,EBP
CALL 0x001362c0
LAB_001170e0:
MOV qword ptr [RBX],R14
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* testing::internal::CaptureStream(int, char const*, testing::internal::CapturedStream**) */
void testing::internal::CaptureStream(int param_1,char *param_2,CapturedStream **param_3)
{
int *puVar1;
size_t sVar2;
CapturedStream *this;
GTestLog local_24 [4];
if (*param_3 != (CapturedStream *)0x0) {
GTestLog::GTestLog(local_24,3,
"/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest-port.cc"
,0x4ab);
puVar1 = PTR_cerr_00158fe8;
/* try { // try from 00117053 to 001170be has its CatchHandler @ 00117100 */
std::__ostream_insert<char,std::char_traits<char>>((ostream *)PTR_cerr_00158fe8,"Only one ",9);
if (param_2 == (char *)0x0) {
std::ios::clear(puVar1 + *(long *)(*(long *)puVar1 + -0x18),
*(uint *)(puVar1 + *(long *)(*(long *)puVar1 + -0x18) + 0x20) | 1);
}
else {
sVar2 = strlen(param_2);
std::__ostream_insert<char,std::char_traits<char>>((ostream *)PTR_cerr_00158fe8,param_2,sVar2)
;
}
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)PTR_cerr_00158fe8," capturer can exist at a time.",0x1e);
GTestLog::~GTestLog(local_24);
}
this = (CapturedStream *)operator_new(0x28);
/* try { // try from 001170d6 to 001170df has its CatchHandler @ 001170ee */
CapturedStream::CapturedStream(this,param_1);
*param_3 = this;
return;
}
|
|
6,124 | QUICK_ROR_INTERSECT_SELECT::get_next() | eloqsql/sql/opt_range.cc | int QUICK_ROR_INTERSECT_SELECT::get_next()
{
List_iterator_fast<QUICK_SELECT_WITH_RECORD> quick_it(quick_selects);
QUICK_SELECT_WITH_RECORD *qr;
QUICK_RANGE_SELECT* quick;
/* quick that reads the given rowid first. This is needed in order
to be able to unlock the row using the same handler object that locked
it */
QUICK_RANGE_SELECT* quick_with_last_rowid;
int error, cmp;
uint last_rowid_count=0;
DBUG_ENTER("QUICK_ROR_INTERSECT_SELECT::get_next");
/* Get a rowid for first quick and save it as a 'candidate' */
qr= quick_it++;
quick= qr->quick;
error= quick->get_next();
if (cpk_quick)
{
while (!error && !cpk_quick->row_in_ranges())
{
quick->file->unlock_row(); /* row not in range; unlock */
error= quick->get_next();
}
}
if (unlikely(error))
DBUG_RETURN(error);
/* Save the read key tuple */
key_copy(qr->key_tuple, record, head->key_info + quick->index,
quick->max_used_key_length);
quick->file->position(quick->record);
memcpy(last_rowid, quick->file->ref, head->file->ref_length);
last_rowid_count= 1;
quick_with_last_rowid= quick;
while (last_rowid_count < quick_selects.elements)
{
if (!(qr= quick_it++))
{
quick_it.rewind();
qr= quick_it++;
}
quick= qr->quick;
do
{
DBUG_EXECUTE_IF("innodb_quick_report_deadlock",
DBUG_SET("+d,innodb_report_deadlock"););
if (unlikely((error= quick->get_next())))
{
/* On certain errors like deadlock, trx might be rolled back.*/
if (!thd->transaction_rollback_request)
quick_with_last_rowid->file->unlock_row();
DBUG_RETURN(error);
}
quick->file->position(quick->record);
cmp= head->file->cmp_ref(quick->file->ref, last_rowid);
if (cmp < 0)
{
/* This row is being skipped. Release lock on it. */
quick->file->unlock_row();
}
} while (cmp < 0);
key_copy(qr->key_tuple, record, head->key_info + quick->index,
quick->max_used_key_length);
/* Ok, current select 'caught up' and returned ref >= cur_ref */
if (cmp > 0)
{
/* Found a row with ref > cur_ref. Make it a new 'candidate' */
if (cpk_quick)
{
while (!cpk_quick->row_in_ranges())
{
quick->file->unlock_row(); /* row not in range; unlock */
if (unlikely((error= quick->get_next())))
{
/* On certain errors like deadlock, trx might be rolled back.*/
if (!thd->transaction_rollback_request)
quick_with_last_rowid->file->unlock_row();
DBUG_RETURN(error);
}
}
quick->file->position(quick->record);
}
memcpy(last_rowid, quick->file->ref, head->file->ref_length);
quick_with_last_rowid->file->unlock_row();
last_rowid_count= 1;
quick_with_last_rowid= quick;
//save the fields here
key_copy(qr->key_tuple, record, head->key_info + quick->index,
quick->max_used_key_length);
}
else
{
/* current 'candidate' row confirmed by this select */
last_rowid_count++;
}
}
/* We get here if we got the same row ref in all scans. */
if (need_to_fetch_row)
error= head->file->ha_rnd_pos(head->record[0], last_rowid);
if (!need_to_fetch_row)
{
/* Restore the columns we've read/saved with other quick selects */
quick_it.rewind();
while ((qr= quick_it++))
{
if (qr->quick != quick)
{
key_restore(record, qr->key_tuple, head->key_info + qr->quick->index,
qr->quick->max_used_key_length);
}
}
}
DBUG_RETURN(error);
} | O0 | cpp | QUICK_ROR_INTERSECT_SELECT::get_next():
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rsi
movq %rsi, -0x60(%rbp)
addq $0x40, %rsi
leaq -0x30(%rbp), %rdi
callq 0xa5c430
movl $0x0, -0x54(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
callq 0xa5c460
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movl %eax, %ecx
movq -0x60(%rbp), %rax
movl %ecx, -0x4c(%rbp)
cmpq $0x0, 0x58(%rax)
je 0xa50576
jmp 0xa5052e
xorl %eax, %eax
cmpl $0x0, -0x4c(%rbp)
movb %al, -0x61(%rbp)
jne 0xa5054b
movq -0x60(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0xa50130
xorb $-0x1, %al
movb %al, -0x61(%rbp)
movb -0x61(%rbp), %al
testb $0x1, %al
jne 0xa50554
jmp 0xa50574
movq -0x40(%rbp), %rax
movq 0x58(%rax), %rdi
movq (%rdi), %rax
callq *0x2c0(%rax)
movq -0x40(%rbp), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movl %eax, -0x4c(%rbp)
jmp 0xa5052e
jmp 0xa50576
cmpl $0x0, -0x4c(%rbp)
je 0xa50589
jmp 0xa5057e
movl -0x4c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xa50927
movq -0x60(%rbp), %rax
movq -0x38(%rbp), %rcx
movq 0x8(%rcx), %rdi
movq 0x38(%rax), %rsi
movq 0x18(%rax), %rax
movq 0xa8(%rax), %rdx
movq -0x40(%rbp), %rax
movl 0x20(%rax), %eax
imulq $0xc0, %rax, %rax
addq %rax, %rdx
movq -0x40(%rbp), %rax
movl 0x24(%rax), %ecx
xorl %r8d, %r8d
callq 0x9e9e30
movq -0x40(%rbp), %rax
movq 0x58(%rax), %rdi
movq -0x40(%rbp), %rax
movq 0x38(%rax), %rsi
movq (%rdi), %rax
callq *0x268(%rax)
movq -0x60(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x40(%rbp), %rcx
movq 0x58(%rcx), %rcx
movq 0x38(%rcx), %rsi
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movl 0x1a4(%rax), %eax
movl %eax, %edx
callq 0x4331a0
movl $0x1, -0x54(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x60(%rbp), %rcx
movl -0x54(%rbp), %eax
cmpl 0x50(%rcx), %eax
jae 0xa50878
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
callq 0xa5c460
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
jne 0xa50652
leaq -0x30(%rbp), %rdi
callq 0xa5d440
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
callq 0xa5c460
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0xa5065f
jmp 0xa50661
movq -0x40(%rbp), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movl %eax, -0x4c(%rbp)
cmpl $0x0, %eax
je 0xa506a5
movq -0x60(%rbp), %rax
movq 0xa0(%rax), %rax
testb $0x1, 0x3fb6(%rax)
jne 0xa50698
movq -0x48(%rbp), %rax
movq 0x58(%rax), %rdi
movq (%rdi), %rax
callq *0x2c0(%rax)
jmp 0xa5069a
movl -0x4c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xa50927
movq -0x40(%rbp), %rax
movq 0x58(%rax), %rdi
movq -0x40(%rbp), %rax
movq 0x38(%rax), %rsi
movq (%rdi), %rax
callq *0x268(%rax)
movq -0x60(%rbp), %rax
movq 0x18(%rax), %rcx
movq 0x8(%rcx), %rdi
movq -0x40(%rbp), %rcx
movq 0x58(%rcx), %rcx
movq 0x38(%rcx), %rsi
movq 0x30(%rax), %rdx
movq (%rdi), %rax
callq *0x420(%rax)
movl %eax, -0x50(%rbp)
cmpl $0x0, -0x50(%rbp)
jge 0xa506fd
movq -0x40(%rbp), %rax
movq 0x58(%rax), %rdi
movq (%rdi), %rax
callq *0x2c0(%rax)
jmp 0xa506ff
cmpl $0x0, -0x50(%rbp)
jl 0xa5065d
movq -0x60(%rbp), %rax
movq -0x38(%rbp), %rcx
movq 0x8(%rcx), %rdi
movq 0x38(%rax), %rsi
movq 0x18(%rax), %rax
movq 0xa8(%rax), %rdx
movq -0x40(%rbp), %rax
movl 0x20(%rax), %eax
imulq $0xc0, %rax, %rax
addq %rax, %rdx
movq -0x40(%rbp), %rax
movl 0x24(%rax), %ecx
xorl %r8d, %r8d
callq 0x9e9e30
cmpl $0x0, -0x50(%rbp)
jle 0xa5086a
movq -0x60(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0xa507e4
jmp 0xa5075f
movq -0x60(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0xa50130
xorb $-0x1, %al
testb $0x1, %al
jne 0xa50774
jmp 0xa507cb
movq -0x40(%rbp), %rax
movq 0x58(%rax), %rdi
movq (%rdi), %rax
callq *0x2c0(%rax)
movq -0x40(%rbp), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movl %eax, -0x4c(%rbp)
cmpl $0x0, %eax
je 0xa507c9
movq -0x60(%rbp), %rax
movq 0xa0(%rax), %rax
testb $0x1, 0x3fb6(%rax)
jne 0xa507bc
movq -0x48(%rbp), %rax
movq 0x58(%rax), %rdi
movq (%rdi), %rax
callq *0x2c0(%rax)
jmp 0xa507be
movl -0x4c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xa50927
jmp 0xa5075f
movq -0x40(%rbp), %rax
movq 0x58(%rax), %rdi
movq -0x40(%rbp), %rax
movq 0x38(%rax), %rsi
movq (%rdi), %rax
callq *0x268(%rax)
movq -0x60(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x40(%rbp), %rcx
movq 0x58(%rcx), %rcx
movq 0x38(%rcx), %rsi
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movl 0x1a4(%rax), %eax
movl %eax, %edx
callq 0x4331a0
movq -0x48(%rbp), %rax
movq 0x58(%rax), %rdi
movq (%rdi), %rax
callq *0x2c0(%rax)
movq -0x60(%rbp), %rax
movl $0x1, -0x54(%rbp)
movq -0x40(%rbp), %rcx
movq %rcx, -0x48(%rbp)
movq -0x38(%rbp), %rcx
movq 0x8(%rcx), %rdi
movq 0x38(%rax), %rsi
movq 0x18(%rax), %rax
movq 0xa8(%rax), %rdx
movq -0x40(%rbp), %rax
movl 0x20(%rax), %eax
imulq $0xc0, %rax, %rax
addq %rax, %rdx
movq -0x40(%rbp), %rax
movl 0x24(%rax), %ecx
xorl %r8d, %r8d
callq 0x9e9e30
jmp 0xa50873
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0xa50615
movq -0x60(%rbp), %rax
testb $0x1, 0xa8(%rax)
je 0xa508a5
movq -0x60(%rbp), %rax
movq 0x18(%rax), %rcx
movq 0x8(%rcx), %rdi
movq 0x18(%rax), %rcx
movq 0x50(%rcx), %rsi
movq 0x30(%rax), %rdx
callq 0x8e2170
movl %eax, -0x4c(%rbp)
movq -0x60(%rbp), %rax
testb $0x1, 0xa8(%rax)
jne 0xa5091f
leaq -0x30(%rbp), %rdi
callq 0xa5d440
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
callq 0xa5c460
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0xa5091d
movq -0x38(%rbp), %rax
movq (%rax), %rax
cmpq -0x40(%rbp), %rax
je 0xa5091b
movq -0x60(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x38(%rbp), %rcx
movq 0x8(%rcx), %rsi
movq 0x18(%rax), %rax
movq 0xa8(%rax), %rdx
movq -0x38(%rbp), %rax
movq (%rax), %rax
movl 0x20(%rax), %eax
imulq $0xc0, %rax, %rax
addq %rax, %rdx
movq -0x38(%rbp), %rax
movq (%rax), %rax
movl 0x24(%rax), %ecx
callq 0x9ea0c0
jmp 0xa508bb
jmp 0xa5091f
jmp 0xa50921
movl -0x4c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
| _ZN26QUICK_ROR_INTERSECT_SELECT8get_nextEv:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_10], rdi
mov rsi, [rbp+var_10]
mov [rbp+var_60], rsi
add rsi, 40h ; '@'
lea rdi, [rbp+var_30]
call _ZN18List_iterator_fastIN26QUICK_ROR_INTERSECT_SELECT24QUICK_SELECT_WITH_RECORDEEC2ER4ListIS1_E; List_iterator_fast<QUICK_ROR_INTERSECT_SELECT::QUICK_SELECT_WITH_RECORD>::List_iterator_fast(List<QUICK_ROR_INTERSECT_SELECT::QUICK_SELECT_WITH_RECORD> &)
mov [rbp+var_54], 0
lea rdi, [rbp+var_30]
xor esi, esi
call _ZN18List_iterator_fastIN26QUICK_ROR_INTERSECT_SELECT24QUICK_SELECT_WITH_RECORDEEppEi; List_iterator_fast<QUICK_ROR_INTERSECT_SELECT::QUICK_SELECT_WITH_RECORD>::operator++(int)
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov rax, [rax]
mov [rbp+var_40], rax
mov rdi, [rbp+var_40]
mov rax, [rdi]
call qword ptr [rax+20h]
mov ecx, eax
mov rax, [rbp+var_60]
mov [rbp+var_4C], ecx
cmp qword ptr [rax+58h], 0
jz short loc_A50576
jmp short $+2
loc_A5052E:
xor eax, eax
cmp [rbp+var_4C], 0
mov [rbp+var_61], al
jnz short loc_A5054B
mov rax, [rbp+var_60]
mov rdi, [rax+58h]; this
call _ZN18QUICK_RANGE_SELECT13row_in_rangesEv; QUICK_RANGE_SELECT::row_in_ranges(void)
xor al, 0FFh
mov [rbp+var_61], al
loc_A5054B:
mov al, [rbp+var_61]
test al, 1
jnz short loc_A50554
jmp short loc_A50574
loc_A50554:
mov rax, [rbp+var_40]
mov rdi, [rax+58h]
mov rax, [rdi]
call qword ptr [rax+2C0h]
mov rdi, [rbp+var_40]
mov rax, [rdi]
call qword ptr [rax+20h]
mov [rbp+var_4C], eax
jmp short loc_A5052E
loc_A50574:
jmp short $+2
loc_A50576:
cmp [rbp+var_4C], 0
jz short loc_A50589
jmp short $+2
loc_A5057E:
mov eax, [rbp+var_4C]
mov [rbp+var_4], eax
jmp loc_A50927
loc_A50589:
mov rax, [rbp+var_60]
mov rcx, [rbp+var_38]
mov rdi, [rcx+8]; unsigned __int8 *
mov rsi, [rax+38h]; unsigned __int8 *
mov rax, [rax+18h]
mov rdx, [rax+0A8h]
mov rax, [rbp+var_40]
mov eax, [rax+20h]
imul rax, 0C0h
add rdx, rax; st_key *
mov rax, [rbp+var_40]
mov ecx, [rax+24h]; unsigned int
xor r8d, r8d; bool
call _Z8key_copyPhPKhPK6st_keyjb; key_copy(uchar *,uchar const*,st_key const*,uint,bool)
mov rax, [rbp+var_40]
mov rdi, [rax+58h]
mov rax, [rbp+var_40]
mov rsi, [rax+38h]
mov rax, [rdi]
call qword ptr [rax+268h]
mov rax, [rbp+var_60]
mov rdi, [rax+30h]
mov rcx, [rbp+var_40]
mov rcx, [rcx+58h]
mov rsi, [rcx+38h]
mov rax, [rax+18h]
mov rax, [rax+8]
mov eax, [rax+1A4h]
mov edx, eax
call _memcpy
mov [rbp+var_54], 1
mov rax, [rbp+var_40]
mov [rbp+var_48], rax
loc_A50615:
mov rcx, [rbp+var_60]
mov eax, [rbp+var_54]
cmp eax, [rcx+50h]
jnb loc_A50878
lea rdi, [rbp+var_30]
xor esi, esi
call _ZN18List_iterator_fastIN26QUICK_ROR_INTERSECT_SELECT24QUICK_SELECT_WITH_RECORDEEppEi; List_iterator_fast<QUICK_ROR_INTERSECT_SELECT::QUICK_SELECT_WITH_RECORD>::operator++(int)
mov [rbp+var_38], rax
cmp rax, 0
jnz short loc_A50652
lea rdi, [rbp+var_30]
call _ZN18List_iterator_fastIN26QUICK_ROR_INTERSECT_SELECT24QUICK_SELECT_WITH_RECORDEE6rewindEv; List_iterator_fast<QUICK_ROR_INTERSECT_SELECT::QUICK_SELECT_WITH_RECORD>::rewind(void)
lea rdi, [rbp+var_30]
xor esi, esi
call _ZN18List_iterator_fastIN26QUICK_ROR_INTERSECT_SELECT24QUICK_SELECT_WITH_RECORDEEppEi; List_iterator_fast<QUICK_ROR_INTERSECT_SELECT::QUICK_SELECT_WITH_RECORD>::operator++(int)
mov [rbp+var_38], rax
loc_A50652:
mov rax, [rbp+var_38]
mov rax, [rax]
mov [rbp+var_40], rax
loc_A5065D:
jmp short $+2
loc_A5065F:
jmp short $+2
loc_A50661:
mov rdi, [rbp+var_40]
mov rax, [rdi]
call qword ptr [rax+20h]
mov [rbp+var_4C], eax
cmp eax, 0
jz short loc_A506A5
mov rax, [rbp+var_60]
mov rax, [rax+0A0h]
test byte ptr [rax+3FB6h], 1
jnz short loc_A50698
mov rax, [rbp+var_48]
mov rdi, [rax+58h]
mov rax, [rdi]
call qword ptr [rax+2C0h]
loc_A50698:
jmp short $+2
loc_A5069A:
mov eax, [rbp+var_4C]
mov [rbp+var_4], eax
jmp loc_A50927
loc_A506A5:
mov rax, [rbp+var_40]
mov rdi, [rax+58h]
mov rax, [rbp+var_40]
mov rsi, [rax+38h]
mov rax, [rdi]
call qword ptr [rax+268h]
mov rax, [rbp+var_60]
mov rcx, [rax+18h]
mov rdi, [rcx+8]
mov rcx, [rbp+var_40]
mov rcx, [rcx+58h]
mov rsi, [rcx+38h]
mov rdx, [rax+30h]
mov rax, [rdi]
call qword ptr [rax+420h]
mov [rbp+var_50], eax
cmp [rbp+var_50], 0
jge short loc_A506FD
mov rax, [rbp+var_40]
mov rdi, [rax+58h]
mov rax, [rdi]
call qword ptr [rax+2C0h]
loc_A506FD:
jmp short $+2
loc_A506FF:
cmp [rbp+var_50], 0
jl loc_A5065D
mov rax, [rbp+var_60]
mov rcx, [rbp+var_38]
mov rdi, [rcx+8]; unsigned __int8 *
mov rsi, [rax+38h]; unsigned __int8 *
mov rax, [rax+18h]
mov rdx, [rax+0A8h]
mov rax, [rbp+var_40]
mov eax, [rax+20h]
imul rax, 0C0h
add rdx, rax; st_key *
mov rax, [rbp+var_40]
mov ecx, [rax+24h]; unsigned int
xor r8d, r8d; bool
call _Z8key_copyPhPKhPK6st_keyjb; key_copy(uchar *,uchar const*,st_key const*,uint,bool)
cmp [rbp+var_50], 0
jle loc_A5086A
mov rax, [rbp+var_60]
cmp qword ptr [rax+58h], 0
jz loc_A507E4
jmp short $+2
loc_A5075F:
mov rax, [rbp+var_60]
mov rdi, [rax+58h]; this
call _ZN18QUICK_RANGE_SELECT13row_in_rangesEv; QUICK_RANGE_SELECT::row_in_ranges(void)
xor al, 0FFh
test al, 1
jnz short loc_A50774
jmp short loc_A507CB
loc_A50774:
mov rax, [rbp+var_40]
mov rdi, [rax+58h]
mov rax, [rdi]
call qword ptr [rax+2C0h]
mov rdi, [rbp+var_40]
mov rax, [rdi]
call qword ptr [rax+20h]
mov [rbp+var_4C], eax
cmp eax, 0
jz short loc_A507C9
mov rax, [rbp+var_60]
mov rax, [rax+0A0h]
test byte ptr [rax+3FB6h], 1
jnz short loc_A507BC
mov rax, [rbp+var_48]
mov rdi, [rax+58h]
mov rax, [rdi]
call qword ptr [rax+2C0h]
loc_A507BC:
jmp short $+2
loc_A507BE:
mov eax, [rbp+var_4C]
mov [rbp+var_4], eax
jmp loc_A50927
loc_A507C9:
jmp short loc_A5075F
loc_A507CB:
mov rax, [rbp+var_40]
mov rdi, [rax+58h]
mov rax, [rbp+var_40]
mov rsi, [rax+38h]
mov rax, [rdi]
call qword ptr [rax+268h]
loc_A507E4:
mov rax, [rbp+var_60]
mov rdi, [rax+30h]
mov rcx, [rbp+var_40]
mov rcx, [rcx+58h]
mov rsi, [rcx+38h]
mov rax, [rax+18h]
mov rax, [rax+8]
mov eax, [rax+1A4h]
mov edx, eax
call _memcpy
mov rax, [rbp+var_48]
mov rdi, [rax+58h]
mov rax, [rdi]
call qword ptr [rax+2C0h]
mov rax, [rbp+var_60]
mov [rbp+var_54], 1
mov rcx, [rbp+var_40]
mov [rbp+var_48], rcx
mov rcx, [rbp+var_38]
mov rdi, [rcx+8]; unsigned __int8 *
mov rsi, [rax+38h]; unsigned __int8 *
mov rax, [rax+18h]
mov rdx, [rax+0A8h]
mov rax, [rbp+var_40]
mov eax, [rax+20h]
imul rax, 0C0h
add rdx, rax; st_key *
mov rax, [rbp+var_40]
mov ecx, [rax+24h]; unsigned int
xor r8d, r8d; bool
call _Z8key_copyPhPKhPK6st_keyjb; key_copy(uchar *,uchar const*,st_key const*,uint,bool)
jmp short loc_A50873
loc_A5086A:
mov eax, [rbp+var_54]
add eax, 1
mov [rbp+var_54], eax
loc_A50873:
jmp loc_A50615
loc_A50878:
mov rax, [rbp+var_60]
test byte ptr [rax+0A8h], 1
jz short loc_A508A5
mov rax, [rbp+var_60]
mov rcx, [rax+18h]
mov rdi, [rcx+8]; this
mov rcx, [rax+18h]
mov rsi, [rcx+50h]; unsigned __int8 *
mov rdx, [rax+30h]; unsigned __int8 *
call _ZN7handler10ha_rnd_posEPhS0_; handler::ha_rnd_pos(uchar *,uchar *)
mov [rbp+var_4C], eax
loc_A508A5:
mov rax, [rbp+var_60]
test byte ptr [rax+0A8h], 1
jnz short loc_A5091F
lea rdi, [rbp+var_30]
call _ZN18List_iterator_fastIN26QUICK_ROR_INTERSECT_SELECT24QUICK_SELECT_WITH_RECORDEE6rewindEv; List_iterator_fast<QUICK_ROR_INTERSECT_SELECT::QUICK_SELECT_WITH_RECORD>::rewind(void)
loc_A508BB:
lea rdi, [rbp+var_30]
xor esi, esi
call _ZN18List_iterator_fastIN26QUICK_ROR_INTERSECT_SELECT24QUICK_SELECT_WITH_RECORDEEppEi; List_iterator_fast<QUICK_ROR_INTERSECT_SELECT::QUICK_SELECT_WITH_RECORD>::operator++(int)
mov [rbp+var_38], rax
cmp rax, 0
jz short loc_A5091D
mov rax, [rbp+var_38]
mov rax, [rax]
cmp rax, [rbp+var_40]
jz short loc_A5091B
mov rax, [rbp+var_60]
mov rdi, [rax+38h]; unsigned __int8 *
mov rcx, [rbp+var_38]
mov rsi, [rcx+8]; unsigned __int8 *
mov rax, [rax+18h]
mov rdx, [rax+0A8h]
mov rax, [rbp+var_38]
mov rax, [rax]
mov eax, [rax+20h]
imul rax, 0C0h
add rdx, rax; st_key *
mov rax, [rbp+var_38]
mov rax, [rax]
mov ecx, [rax+24h]; unsigned int
call _Z11key_restorePhPKhP6st_keyj; key_restore(uchar *,uchar const*,st_key *,uint)
loc_A5091B:
jmp short loc_A508BB
loc_A5091D:
jmp short $+2
loc_A5091F:
jmp short $+2
loc_A50921:
mov eax, [rbp+var_4C]
mov [rbp+var_4], eax
loc_A50927:
mov eax, [rbp+var_4]
add rsp, 70h
pop rbp
retn
| long long QUICK_ROR_INTERSECT_SELECT::get_next(QUICK_ROR_INTERSECT_SELECT *this)
{
char v2; // [rsp+Fh] [rbp-61h]
unsigned int v3; // [rsp+1Ch] [rbp-54h]
int v4; // [rsp+20h] [rbp-50h]
unsigned int v5; // [rsp+24h] [rbp-4Ch]
unsigned __int8 *v6; // [rsp+28h] [rbp-48h]
unsigned __int8 *i; // [rsp+30h] [rbp-40h]
unsigned __int8 **v8; // [rsp+38h] [rbp-38h]
long long v9; // [rsp+38h] [rbp-38h]
const unsigned __int8 **v10; // [rsp+38h] [rbp-38h]
_BYTE v11[32]; // [rsp+40h] [rbp-30h] BYREF
QUICK_ROR_INTERSECT_SELECT *v12; // [rsp+60h] [rbp-10h]
v12 = this;
List_iterator_fast<QUICK_ROR_INTERSECT_SELECT::QUICK_SELECT_WITH_RECORD>::List_iterator_fast(v11, (char *)this + 64);
v8 = (unsigned __int8 **)List_iterator_fast<QUICK_ROR_INTERSECT_SELECT::QUICK_SELECT_WITH_RECORD>::operator++(
v11,
0LL);
i = *v8;
v5 = (*(long long (**)(void))(*(_QWORD *)*v8 + 32LL))();
if ( *((_QWORD *)this + 11) )
{
while ( 1 )
{
v2 = 0;
if ( !v5 )
v2 = ~QUICK_RANGE_SELECT::row_in_ranges(*((QUICK_RANGE_SELECT **)this + 11));
if ( (v2 & 1) == 0 )
break;
(*(void ( **)(_QWORD))(**((_QWORD **)i + 11) + 704LL))(*((_QWORD *)i + 11));
v5 = (*(long long ( **)(unsigned __int8 *))(*(_QWORD *)i + 32LL))(i);
}
}
if ( v5 )
{
return v5;
}
else
{
key_copy(
v8[1],
*((const unsigned __int8 **)this + 7),
(const st_key *)(192LL * *((unsigned int *)i + 8) + *(_QWORD *)(*((_QWORD *)this + 3) + 168LL)),
*((_DWORD *)i + 9),
0);
(*(void ( **)(_QWORD, _QWORD))(**((_QWORD **)i + 11) + 616LL))(*((_QWORD *)i + 11), *((_QWORD *)i + 7));
memcpy(
*((_QWORD *)this + 6),
*(_QWORD *)(*((_QWORD *)i + 11) + 56LL),
*(unsigned int *)(*(_QWORD *)(*((_QWORD *)this + 3) + 8LL) + 420LL));
v3 = 1;
v6 = i;
while ( 2 )
{
if ( v3 >= *((_DWORD *)this + 20) )
{
if ( (*((_BYTE *)this + 168) & 1) != 0 )
v5 = handler::ha_rnd_pos(
*(handler **)(*((_QWORD *)this + 3) + 8LL),
*(unsigned __int8 **)(*((_QWORD *)this + 3) + 80LL),
*((unsigned __int8 **)this + 6));
if ( (*((_BYTE *)this + 168) & 1) == 0 )
{
List_iterator_fast<QUICK_ROR_INTERSECT_SELECT::QUICK_SELECT_WITH_RECORD>::rewind(v11);
while ( 1 )
{
v10 = (const unsigned __int8 **)List_iterator_fast<QUICK_ROR_INTERSECT_SELECT::QUICK_SELECT_WITH_RECORD>::operator++(
v11,
0LL);
if ( !v10 )
break;
if ( *v10 != i )
key_restore(
*((unsigned __int8 **)this + 7),
v10[1],
(st_key *)(192LL * *((unsigned int *)*v10 + 8) + *(_QWORD *)(*((_QWORD *)this + 3) + 168LL)),
*((_DWORD *)*v10 + 9));
}
}
return v5;
}
else
{
v9 = List_iterator_fast<QUICK_ROR_INTERSECT_SELECT::QUICK_SELECT_WITH_RECORD>::operator++(v11, 0LL);
if ( !v9 )
{
List_iterator_fast<QUICK_ROR_INTERSECT_SELECT::QUICK_SELECT_WITH_RECORD>::rewind(v11);
v9 = List_iterator_fast<QUICK_ROR_INTERSECT_SELECT::QUICK_SELECT_WITH_RECORD>::operator++(v11, 0LL);
}
for ( i = *(unsigned __int8 **)v9;
;
(*(void ( **)(_QWORD))(**((_QWORD **)i + 11) + 704LL))(*((_QWORD *)i + 11)) )
{
v5 = (*(long long ( **)(unsigned __int8 *))(*(_QWORD *)i + 32LL))(i);
if ( v5 )
{
if ( (*(_BYTE *)(*((_QWORD *)this + 20) + 16310LL) & 1) == 0 )
(*(void ( **)(_QWORD))(**((_QWORD **)v6 + 11) + 704LL))(*((_QWORD *)v6 + 11));
return v5;
}
(*(void ( **)(_QWORD, _QWORD))(**((_QWORD **)i + 11) + 616LL))(
*((_QWORD *)i + 11),
*((_QWORD *)i + 7));
v4 = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(**(_QWORD **)(*((_QWORD *)this + 3) + 8LL) + 1056LL))(
*(_QWORD *)(*((_QWORD *)this + 3) + 8LL),
*(_QWORD *)(*((_QWORD *)i + 11) + 56LL),
*((_QWORD *)this + 6));
if ( v4 >= 0 )
break;
}
key_copy(
*(unsigned __int8 **)(v9 + 8),
*((const unsigned __int8 **)this + 7),
(const st_key *)(192LL * *((unsigned int *)i + 8) + *(_QWORD *)(*((_QWORD *)this + 3) + 168LL)),
*((_DWORD *)i + 9),
0);
if ( v4 <= 0 )
{
++v3;
continue;
}
if ( !*((_QWORD *)this + 11) )
{
LABEL_28:
memcpy(
*((_QWORD *)this + 6),
*(_QWORD *)(*((_QWORD *)i + 11) + 56LL),
*(unsigned int *)(*(_QWORD *)(*((_QWORD *)this + 3) + 8LL) + 420LL));
(*(void ( **)(_QWORD))(**((_QWORD **)v6 + 11) + 704LL))(*((_QWORD *)v6 + 11));
v3 = 1;
v6 = i;
key_copy(
*(unsigned __int8 **)(v9 + 8),
*((const unsigned __int8 **)this + 7),
(const st_key *)(192LL * *((unsigned int *)i + 8) + *(_QWORD *)(*((_QWORD *)this + 3) + 168LL)),
*((_DWORD *)i + 9),
0);
continue;
}
do
{
if ( (QUICK_RANGE_SELECT::row_in_ranges(*((QUICK_RANGE_SELECT **)this + 11)) & 1) != 0 )
{
(*(void ( **)(_QWORD, _QWORD))(**((_QWORD **)i + 11) + 616LL))(
*((_QWORD *)i + 11),
*((_QWORD *)i + 7));
goto LABEL_28;
}
(*(void ( **)(_QWORD))(**((_QWORD **)i + 11) + 704LL))(*((_QWORD *)i + 11));
v5 = (*(long long ( **)(unsigned __int8 *))(*(_QWORD *)i + 32LL))(i);
}
while ( !v5 );
if ( (*(_BYTE *)(*((_QWORD *)this + 20) + 16310LL) & 1) == 0 )
(*(void ( **)(_QWORD))(**((_QWORD **)v6 + 11) + 704LL))(*((_QWORD *)v6 + 11));
return v5;
}
}
}
}
| ~Create_func_json_merge_patch:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RDI
CALL 0x00a4ae00
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x8
CALL 0x00533290
ADD RSP,0x10
POP RBP
RET
|
/* Create_func_json_merge_patch::~Create_func_json_merge_patch() */
void __thiscall
Create_func_json_merge_patch::~Create_func_json_merge_patch(Create_func_json_merge_patch *this)
{
~Create_func_json_merge_patch(this);
::operator_delete(this,8);
return;
}
|
|
6,125 | QUICK_ROR_INTERSECT_SELECT::get_next() | eloqsql/sql/opt_range.cc | int QUICK_ROR_INTERSECT_SELECT::get_next()
{
List_iterator_fast<QUICK_SELECT_WITH_RECORD> quick_it(quick_selects);
QUICK_SELECT_WITH_RECORD *qr;
QUICK_RANGE_SELECT* quick;
/* quick that reads the given rowid first. This is needed in order
to be able to unlock the row using the same handler object that locked
it */
QUICK_RANGE_SELECT* quick_with_last_rowid;
int error, cmp;
uint last_rowid_count=0;
DBUG_ENTER("QUICK_ROR_INTERSECT_SELECT::get_next");
/* Get a rowid for first quick and save it as a 'candidate' */
qr= quick_it++;
quick= qr->quick;
error= quick->get_next();
if (cpk_quick)
{
while (!error && !cpk_quick->row_in_ranges())
{
quick->file->unlock_row(); /* row not in range; unlock */
error= quick->get_next();
}
}
if (unlikely(error))
DBUG_RETURN(error);
/* Save the read key tuple */
key_copy(qr->key_tuple, record, head->key_info + quick->index,
quick->max_used_key_length);
quick->file->position(quick->record);
memcpy(last_rowid, quick->file->ref, head->file->ref_length);
last_rowid_count= 1;
quick_with_last_rowid= quick;
while (last_rowid_count < quick_selects.elements)
{
if (!(qr= quick_it++))
{
quick_it.rewind();
qr= quick_it++;
}
quick= qr->quick;
do
{
DBUG_EXECUTE_IF("innodb_quick_report_deadlock",
DBUG_SET("+d,innodb_report_deadlock"););
if (unlikely((error= quick->get_next())))
{
/* On certain errors like deadlock, trx might be rolled back.*/
if (!thd->transaction_rollback_request)
quick_with_last_rowid->file->unlock_row();
DBUG_RETURN(error);
}
quick->file->position(quick->record);
cmp= head->file->cmp_ref(quick->file->ref, last_rowid);
if (cmp < 0)
{
/* This row is being skipped. Release lock on it. */
quick->file->unlock_row();
}
} while (cmp < 0);
key_copy(qr->key_tuple, record, head->key_info + quick->index,
quick->max_used_key_length);
/* Ok, current select 'caught up' and returned ref >= cur_ref */
if (cmp > 0)
{
/* Found a row with ref > cur_ref. Make it a new 'candidate' */
if (cpk_quick)
{
while (!cpk_quick->row_in_ranges())
{
quick->file->unlock_row(); /* row not in range; unlock */
if (unlikely((error= quick->get_next())))
{
/* On certain errors like deadlock, trx might be rolled back.*/
if (!thd->transaction_rollback_request)
quick_with_last_rowid->file->unlock_row();
DBUG_RETURN(error);
}
}
quick->file->position(quick->record);
}
memcpy(last_rowid, quick->file->ref, head->file->ref_length);
quick_with_last_rowid->file->unlock_row();
last_rowid_count= 1;
quick_with_last_rowid= quick;
//save the fields here
key_copy(qr->key_tuple, record, head->key_info + quick->index,
quick->max_used_key_length);
}
else
{
/* current 'candidate' row confirmed by this select */
last_rowid_count++;
}
}
/* We get here if we got the same row ref in all scans. */
if (need_to_fetch_row)
error= head->file->ha_rnd_pos(head->record[0], last_rowid);
if (!need_to_fetch_row)
{
/* Restore the columns we've read/saved with other quick selects */
quick_it.rewind();
while ((qr= quick_it++))
{
if (qr->quick != quick)
{
key_restore(record, qr->key_tuple, head->key_info + qr->quick->index,
qr->quick->max_used_key_length);
}
}
}
DBUG_RETURN(error);
} | O3 | cpp | QUICK_ROR_INTERSECT_SELECT::get_next():
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x40(%rdi), %r13
movq 0x8(%r13), %r14
movq (%r14), %r15
movq (%r15), %rax
movq %r15, %rdi
callq *0x20(%rax)
movl %eax, %r12d
testl %eax, %eax
jne 0x430e27
cmpq $0x0, 0x58(%rbx)
je 0x430e27
movq 0x58(%rbx), %rdi
callq 0x796c76
testb %al, %al
jne 0x430e30
movq 0x58(%r15), %rdi
movq (%rdi), %rax
callq *0x2c0(%rax)
movq (%r15), %rax
movq %r15, %rdi
callq *0x20(%rax)
testl %eax, %eax
je 0x430df8
movl %eax, %r12d
jmp 0x431044
testl %r12d, %r12d
jne 0x431044
movq 0x8(%r14), %rdi
movq 0x18(%rbx), %rax
movq 0x38(%rbx), %rsi
movl 0x20(%r15), %edx
movl 0x24(%r15), %ecx
imulq $0xc0, %rdx, %rdx
addq 0xa8(%rax), %rdx
movl $0x0, -0x2c(%rbp)
xorl %r8d, %r8d
callq 0x7593e0
movq 0x38(%r15), %rsi
movq 0x58(%r15), %rdi
movq (%rdi), %rax
callq *0x268(%rax)
movq 0x18(%rbx), %rax
movq 0x30(%rbx), %rdi
movq 0x58(%r15), %rcx
movq 0x38(%rcx), %rsi
movq 0x8(%rax), %rax
movl 0x1a4(%rax), %edx
callq 0x400150
cmpl $0x2, 0x50(%rbx)
jb 0x431011
pushq $0x1
popq %rax
movl %eax, -0x3c(%rbp)
movq %r15, -0x38(%rbp)
movq (%r13), %r13
movq 0x8(%r13), %r14
testq %r14, %r14
jne 0x430eba
movq 0x40(%rbx), %r13
movq 0x8(%r13), %r14
movq %r13, %r15
movq (%r14), %r12
movq (%r12), %rax
movq %r12, %rdi
callq *0x20(%rax)
testl %eax, %eax
jne 0x431095
movq 0x38(%r12), %rsi
movq 0x58(%r12), %rdi
movq (%rdi), %rax
callq *0x268(%rax)
movq 0x18(%rbx), %rax
movq 0x30(%rbx), %rdx
movq 0x8(%rax), %rdi
movq 0x58(%r12), %rax
movq 0x38(%rax), %rsi
movq (%rdi), %rax
callq *0x420(%rax)
testl %eax, %eax
jns 0x430f17
movq 0x58(%r12), %rdi
movq (%rdi), %rax
callq *0x2c0(%rax)
jmp 0x430ec0
movl %eax, %r13d
movq 0x8(%r14), %rdi
movq 0x18(%rbx), %rax
movq 0x38(%rbx), %rsi
movl 0x20(%r12), %edx
movl 0x24(%r12), %ecx
imulq $0xc0, %rdx, %rdx
addq 0xa8(%rax), %rdx
xorl %r8d, %r8d
callq 0x7593e0
testl %r13d, %r13d
je 0x430ffa
cmpq $0x0, 0x58(%rbx)
movq %r15, %r13
movq -0x38(%rbp), %r15
je 0x430f99
movq 0x58(%rbx), %rdi
callq 0x796c76
movq 0x58(%r12), %rdi
testb %al, %al
jne 0x430f8b
movq (%rdi), %rax
callq *0x2c0(%rax)
movq (%r12), %rax
movq %r12, %rdi
callq *0x20(%rax)
testl %eax, %eax
je 0x430f5d
jmp 0x4310ae
movq 0x38(%r12), %rsi
movq (%rdi), %rax
callq *0x268(%rax)
movq 0x18(%rbx), %rax
movq 0x30(%rbx), %rdi
movq 0x58(%r12), %rcx
movq 0x38(%rcx), %rsi
movq 0x8(%rax), %rax
movl 0x1a4(%rax), %edx
callq 0x400150
movq 0x58(%r15), %rdi
movq (%rdi), %rax
callq *0x2c0(%rax)
movq 0x8(%r14), %rdi
movq 0x18(%rbx), %rax
movq 0x38(%rbx), %rsi
movl 0x20(%r12), %edx
movl 0x24(%r12), %ecx
imulq $0xc0, %rdx, %rdx
addq 0xa8(%rax), %rdx
xorl %r8d, %r8d
callq 0x7593e0
movq %r12, %r15
pushq $0x1
popq %rax
jmp 0x431006
movl -0x3c(%rbp), %eax
incl %eax
movq %r15, %r13
movq -0x38(%rbp), %r15
cmpl 0x50(%rbx), %eax
jb 0x430e9e
jmp 0x431014
movq %r15, %r12
movb 0xa8(%rbx), %al
cmpb $0x1, %al
jne 0x43103c
movq 0x18(%rbx), %rax
movq 0x30(%rbx), %rdx
movq 0x8(%rax), %rdi
movq 0x50(%rax), %rsi
callq 0x6b9842
movl %eax, -0x2c(%rbp)
movb 0xa8(%rbx), %al
testb $0x1, %al
je 0x431056
movl -0x2c(%rbp), %r12d
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x40(%rbx), %r14
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x431040
movq (%rax), %rcx
cmpq %r12, %rcx
je 0x431090
movq 0x18(%rbx), %r8
movq 0x38(%rbx), %rdi
movq 0x8(%rax), %rsi
movl 0x20(%rcx), %eax
movl 0x24(%rcx), %ecx
imulq $0xc0, %rax, %rdx
addq 0xa8(%r8), %rdx
callq 0x759566
movq (%r14), %r14
jmp 0x43105a
movl %eax, %r12d
movq 0xa0(%rbx), %rax
cmpb $0x0, 0x3fb6(%rax)
movq -0x38(%rbp), %r15
jne 0x431044
jmp 0x4310c1
movq 0xa0(%rbx), %rcx
cmpb $0x0, 0x3fb6(%rcx)
movl %eax, %r12d
jne 0x431044
movq 0x58(%r15), %rdi
movq (%rdi), %rax
callq *0x2c0(%rax)
jmp 0x431044
nop
| _ZN26QUICK_ROR_INTERSECT_SELECT8get_nextEv:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
mov r13, [rdi+40h]
mov r14, [r13+8]
mov r15, [r14]
mov rax, [r15]
mov rdi, r15
call qword ptr [rax+20h]
mov r12d, eax
test eax, eax
jnz short loc_430E27
cmp qword ptr [rbx+58h], 0
jz short loc_430E27
loc_430DF8:
mov rdi, [rbx+58h]; this
call _ZN18QUICK_RANGE_SELECT13row_in_rangesEv; QUICK_RANGE_SELECT::row_in_ranges(void)
test al, al
jnz short loc_430E30
mov rdi, [r15+58h]
mov rax, [rdi]
call qword ptr [rax+2C0h]
mov rax, [r15]
mov rdi, r15
call qword ptr [rax+20h]
test eax, eax
jz short loc_430DF8
mov r12d, eax
jmp loc_431044
loc_430E27:
test r12d, r12d
jnz loc_431044
loc_430E30:
mov rdi, [r14+8]; unsigned __int8 *
mov rax, [rbx+18h]
mov rsi, [rbx+38h]; unsigned __int8 *
mov edx, [r15+20h]
mov ecx, [r15+24h]; unsigned int
imul rdx, 0C0h
add rdx, [rax+0A8h]; st_key *
mov [rbp+var_2C], 0
xor r8d, r8d; bool
call _Z8key_copyPhPKhPK6st_keyjb; key_copy(uchar *,uchar const*,st_key const*,uint,bool)
mov rsi, [r15+38h]
mov rdi, [r15+58h]
mov rax, [rdi]
call qword ptr [rax+268h]
mov rax, [rbx+18h]
mov rdi, [rbx+30h]
mov rcx, [r15+58h]
mov rsi, [rcx+38h]
mov rax, [rax+8]
mov edx, [rax+1A4h]
call _memcpy
cmp dword ptr [rbx+50h], 2
jb loc_431011
push 1
pop rax
loc_430E9E:
mov [rbp+var_3C], eax
mov [rbp+var_38], r15
mov r13, [r13+0]
mov r14, [r13+8]
test r14, r14
jnz short loc_430EBA
mov r13, [rbx+40h]
mov r14, [r13+8]
loc_430EBA:
mov r15, r13
mov r12, [r14]
loc_430EC0:
mov rax, [r12]
mov rdi, r12
call qword ptr [rax+20h]
test eax, eax
jnz loc_431095
mov rsi, [r12+38h]
mov rdi, [r12+58h]
mov rax, [rdi]
call qword ptr [rax+268h]
mov rax, [rbx+18h]
mov rdx, [rbx+30h]
mov rdi, [rax+8]
mov rax, [r12+58h]
mov rsi, [rax+38h]
mov rax, [rdi]
call qword ptr [rax+420h]
test eax, eax
jns short loc_430F17
mov rdi, [r12+58h]
mov rax, [rdi]
call qword ptr [rax+2C0h]
jmp short loc_430EC0
loc_430F17:
mov r13d, eax
mov rdi, [r14+8]; unsigned __int8 *
mov rax, [rbx+18h]
mov rsi, [rbx+38h]; unsigned __int8 *
mov edx, [r12+20h]
mov ecx, [r12+24h]; unsigned int
imul rdx, 0C0h
add rdx, [rax+0A8h]; st_key *
xor r8d, r8d; bool
call _Z8key_copyPhPKhPK6st_keyjb; key_copy(uchar *,uchar const*,st_key const*,uint,bool)
test r13d, r13d
jz loc_430FFA
cmp qword ptr [rbx+58h], 0
mov r13, r15
mov r15, [rbp+var_38]
jz short loc_430F99
loc_430F5D:
mov rdi, [rbx+58h]; this
call _ZN18QUICK_RANGE_SELECT13row_in_rangesEv; QUICK_RANGE_SELECT::row_in_ranges(void)
mov rdi, [r12+58h]
test al, al
jnz short loc_430F8B
mov rax, [rdi]
call qword ptr [rax+2C0h]
mov rax, [r12]
mov rdi, r12
call qword ptr [rax+20h]
test eax, eax
jz short loc_430F5D
jmp loc_4310AE
loc_430F8B:
mov rsi, [r12+38h]
mov rax, [rdi]
call qword ptr [rax+268h]
loc_430F99:
mov rax, [rbx+18h]
mov rdi, [rbx+30h]
mov rcx, [r12+58h]
mov rsi, [rcx+38h]
mov rax, [rax+8]
mov edx, [rax+1A4h]
call _memcpy
mov rdi, [r15+58h]
mov rax, [rdi]
call qword ptr [rax+2C0h]
mov rdi, [r14+8]; unsigned __int8 *
mov rax, [rbx+18h]
mov rsi, [rbx+38h]; unsigned __int8 *
mov edx, [r12+20h]
mov ecx, [r12+24h]; unsigned int
imul rdx, 0C0h
add rdx, [rax+0A8h]; st_key *
xor r8d, r8d; bool
call _Z8key_copyPhPKhPK6st_keyjb; key_copy(uchar *,uchar const*,st_key const*,uint,bool)
mov r15, r12
push 1
pop rax
jmp short loc_431006
loc_430FFA:
mov eax, [rbp+var_3C]
inc eax
mov r13, r15
mov r15, [rbp+var_38]
loc_431006:
cmp eax, [rbx+50h]
jb loc_430E9E
jmp short loc_431014
loc_431011:
mov r12, r15
loc_431014:
mov al, [rbx+0A8h]
cmp al, 1
jnz short loc_43103C
mov rax, [rbx+18h]
mov rdx, [rbx+30h]; unsigned __int8 *
mov rdi, [rax+8]; this
mov rsi, [rax+50h]; unsigned __int8 *
call _ZN7handler10ha_rnd_posEPhS0_; handler::ha_rnd_pos(uchar *,uchar *)
mov [rbp+var_2C], eax
mov al, [rbx+0A8h]
loc_43103C:
test al, 1
jz short loc_431056
loc_431040:
mov r12d, [rbp+var_2C]
loc_431044:
mov eax, r12d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_431056:
mov r14, [rbx+40h]
loc_43105A:
mov rax, [r14+8]
test rax, rax
jz short loc_431040
mov rcx, [rax]
cmp rcx, r12
jz short loc_431090
mov r8, [rbx+18h]
mov rdi, [rbx+38h]; unsigned __int8 *
mov rsi, [rax+8]; unsigned __int8 *
mov eax, [rcx+20h]
mov ecx, [rcx+24h]; unsigned int
imul rdx, rax, 0C0h
add rdx, [r8+0A8h]; st_key *
call _Z11key_restorePhPKhP6st_keyj; key_restore(uchar *,uchar const*,st_key *,uint)
loc_431090:
mov r14, [r14]
jmp short loc_43105A
loc_431095:
mov r12d, eax
mov rax, [rbx+0A0h]
cmp byte ptr [rax+3FB6h], 0
mov r15, [rbp+var_38]
jnz short loc_431044
jmp short loc_4310C1
loc_4310AE:
mov rcx, [rbx+0A0h]
cmp byte ptr [rcx+3FB6h], 0
mov r12d, eax
jnz short loc_431044
loc_4310C1:
mov rdi, [r15+58h]
mov rax, [rdi]
call qword ptr [rax+2C0h]
jmp loc_431044
| long long QUICK_ROR_INTERSECT_SELECT::get_next(QUICK_ROR_INTERSECT_SELECT *this)
{
_QWORD *v2; // r13
unsigned __int8 **v3; // r14
unsigned __int8 *v4; // r15
unsigned int v5; // r12d
unsigned int v6; // eax
unsigned int v7; // eax
_QWORD *v8; // r13
unsigned __int8 **v9; // r14
_QWORD *v10; // r15
unsigned __int8 *j; // r12
unsigned int v12; // eax
int v13; // eax
int v14; // r13d
unsigned __int8 *v15; // r15
char v16; // al
long long v17; // rdi
unsigned int v18; // eax
char v19; // al
_QWORD *i; // r14
const unsigned __int8 **v22; // rax
unsigned int v23; // [rsp+4h] [rbp-3Ch]
unsigned __int8 *v24; // [rsp+8h] [rbp-38h]
unsigned int v25; // [rsp+14h] [rbp-2Ch]
v2 = (_QWORD *)*((_QWORD *)this + 8);
v3 = (unsigned __int8 **)v2[1];
v4 = *v3;
v5 = (*(long long ( **)(unsigned __int8 *))(*(_QWORD *)*v3 + 32LL))(*v3);
if ( v5 || !*((_QWORD *)this + 11) )
{
if ( v5 )
return v5;
}
else
{
while ( !(unsigned __int8)QUICK_RANGE_SELECT::row_in_ranges(*((QUICK_RANGE_SELECT **)this + 11)) )
{
(*(void ( **)(_QWORD))(**((_QWORD **)v4 + 11) + 704LL))(*((_QWORD *)v4 + 11));
v6 = (*(long long ( **)(unsigned __int8 *))(*(_QWORD *)v4 + 32LL))(v4);
if ( v6 )
return v6;
}
}
v25 = 0;
key_copy(
v3[1],
*((const unsigned __int8 **)this + 7),
(const st_key *)(*(_QWORD *)(*((_QWORD *)this + 3) + 168LL) + 192LL * *((unsigned int *)v4 + 8)),
*((_DWORD *)v4 + 9),
0);
(*(void ( **)(_QWORD, _QWORD))(**((_QWORD **)v4 + 11) + 616LL))(*((_QWORD *)v4 + 11), *((_QWORD *)v4 + 7));
memcpy(*((_QWORD *)this + 6), *(_QWORD *)(*((_QWORD *)v4 + 11) + 56LL));
if ( *((_DWORD *)this + 20) < 2u )
{
j = v4;
LABEL_26:
v19 = *((_BYTE *)this + 168);
if ( v19 == 1 )
{
v25 = handler::ha_rnd_pos(
*(handler **)(*((_QWORD *)this + 3) + 8LL),
*(unsigned __int8 **)(*((_QWORD *)this + 3) + 80LL),
*((unsigned __int8 **)this + 6));
v19 = *((_BYTE *)this + 168);
}
if ( (v19 & 1) == 0 )
{
for ( i = (_QWORD *)*((_QWORD *)this + 8); ; i = (_QWORD *)*i )
{
v22 = (const unsigned __int8 **)i[1];
if ( !v22 )
break;
if ( *v22 != j )
key_restore(
*((unsigned __int8 **)this + 7),
v22[1],
(st_key *)(*(_QWORD *)(*((_QWORD *)this + 3) + 168LL) + 192LL * *((unsigned int *)*v22 + 8)),
*((_DWORD *)*v22 + 9));
}
}
return v25;
}
v7 = 1;
while ( 2 )
{
v23 = v7;
v24 = v4;
v8 = (_QWORD *)*v2;
v9 = (unsigned __int8 **)v8[1];
if ( !v9 )
{
v8 = (_QWORD *)*((_QWORD *)this + 8);
v9 = (unsigned __int8 **)v8[1];
}
v10 = v8;
for ( j = *v9; ; (*(void ( **)(_QWORD))(**((_QWORD **)j + 11) + 704LL))(*((_QWORD *)j + 11)) )
{
v12 = (*(long long ( **)(unsigned __int8 *))(*(_QWORD *)j + 32LL))(j);
if ( v12 )
{
v5 = v12;
v15 = v24;
if ( *(_BYTE *)(*((_QWORD *)this + 20) + 16310LL) )
return v5;
goto LABEL_39;
}
(*(void ( **)(_QWORD, _QWORD))(**((_QWORD **)j + 11) + 616LL))(*((_QWORD *)j + 11), *((_QWORD *)j + 7));
v13 = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(**(_QWORD **)(*((_QWORD *)this + 3) + 8LL) + 1056LL))(
*(_QWORD *)(*((_QWORD *)this + 3) + 8LL),
*(_QWORD *)(*((_QWORD *)j + 11) + 56LL),
*((_QWORD *)this + 6));
if ( v13 >= 0 )
break;
}
v14 = v13;
key_copy(
v9[1],
*((const unsigned __int8 **)this + 7),
(const st_key *)(*(_QWORD *)(*((_QWORD *)this + 3) + 168LL) + 192LL * *((unsigned int *)j + 8)),
*((_DWORD *)j + 9),
0);
if ( !v14 )
{
v7 = v23 + 1;
v2 = v10;
v4 = v24;
LABEL_23:
if ( v7 < *((_DWORD *)this + 20) )
continue;
goto LABEL_26;
}
break;
}
v2 = v10;
v15 = v24;
if ( !*((_QWORD *)this + 11) )
{
LABEL_21:
memcpy(*((_QWORD *)this + 6), *(_QWORD *)(*((_QWORD *)j + 11) + 56LL));
(*(void ( **)(_QWORD))(**((_QWORD **)v24 + 11) + 704LL))(*((_QWORD *)v24 + 11));
key_copy(
v9[1],
*((const unsigned __int8 **)this + 7),
(const st_key *)(*(_QWORD *)(*((_QWORD *)this + 3) + 168LL) + 192LL * *((unsigned int *)j + 8)),
*((_DWORD *)j + 9),
0);
v4 = j;
v7 = 1;
goto LABEL_23;
}
do
{
v16 = QUICK_RANGE_SELECT::row_in_ranges(*((QUICK_RANGE_SELECT **)this + 11));
v17 = *((_QWORD *)j + 11);
if ( v16 )
{
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v17 + 616LL))(v17, *((_QWORD *)j + 7));
goto LABEL_21;
}
(*(void ( **)(long long))(*(_QWORD *)v17 + 704LL))(v17);
v18 = (*(long long ( **)(unsigned __int8 *))(*(_QWORD *)j + 32LL))(j);
}
while ( !v18 );
v5 = v18;
if ( !*(_BYTE *)(*((_QWORD *)this + 20) + 16310LL) )
LABEL_39:
(*(void ( **)(_QWORD))(**((_QWORD **)v15 + 11) + 704LL))(*((_QWORD *)v15 + 11));
return v5;
}
| |||
6,126 | mysql_stmt_store_result_start | eloqsql/libmariadb/libmariadb/mariadb_async.c | int STDCALL
mysql_stmt_store_result_start(int *ret, MYSQL_STMT *stmt)
{
MK_ASYNC_START_BODY(
mysql_stmt_store_result,
stmt->mysql,
{
WIN_SET_NONBLOCKING(stmt->mysql)
parms.stmt= stmt;
},
1,
r_int,
/* If stmt->mysql==NULL then we will not block so can call directly. */
if (!stmt->mysql)
{
*ret= mysql_stmt_store_result(stmt);
return 0;
})
} | O3 | c | mysql_stmt_store_result_start:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x38(%rsi), %rax
testq %rax, %rax
je 0x2ddcb
movq 0x480(%rax), %rax
movq 0x28(%rax), %r15
leaq -0x20(%rbp), %rdx
movq %r14, (%rdx)
movb $0x1, 0x14(%r15)
leaq 0x38(%r15), %rdi
leaq 0xa2(%rip), %rsi # 0x2de53
callq 0x2f2d4
movw $0x0, 0x14(%r15)
testl %eax, %eax
jle 0x2ddd5
movb $0x1, 0x15(%r15)
movl (%r15), %eax
jmp 0x2de48
movq %r14, %rdi
callq 0x21b82
jmp 0x2de44
js 0x2dddd
movl 0x8(%r15), %eax
jmp 0x2de44
movq 0x38(%r14), %rax
movl $0x7d8, 0x90(%rax) # imm = 0x7D8
movl $0x297, %edi # imm = 0x297
addq 0x38(%r14), %rdi
leaq 0x1dcc5(%rip), %rax # 0x4bac0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
movq 0x38(%r14), %rax
xorl %r15d, %r15d
movb %r15b, 0x29c(%rax)
movl $0x97, %edi
addq 0x38(%r14), %rdi
leaq 0x1dcaa(%rip), %rax # 0x4bad0
movq 0x40(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x13220
movq 0x38(%r14), %rax
movb %r15b, 0x296(%rax)
movl $0x1, %eax
movl %eax, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| mysql_stmt_store_result_start:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov rax, [rsi+38h]
test rax, rax
jz short loc_2DDCB
mov rax, [rax+480h]
mov r15, [rax+28h]
lea rdx, [rbp+var_20]
mov [rdx], r14
mov byte ptr [r15+14h], 1
lea rdi, [r15+38h]
lea rsi, mysql_stmt_store_result_start_internal
call my_context_spawn
mov word ptr [r15+14h], 0
test eax, eax
jle short loc_2DDD5
mov byte ptr [r15+15h], 1
mov eax, [r15]
jmp short loc_2DE48
loc_2DDCB:
mov rdi, r14
call mysql_stmt_store_result
jmp short loc_2DE44
loc_2DDD5:
js short loc_2DDDD
mov eax, [r15+8]
jmp short loc_2DE44
loc_2DDDD:
mov rax, [r14+38h]
mov dword ptr [rax+90h], 7D8h
mov edi, 297h
add rdi, [r14+38h]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [r14+38h]
xor r15d, r15d
mov [rax+29Ch], r15b
mov edi, 97h
add rdi, [r14+38h]
lea rax, client_errors
mov rsi, [rax+40h]
mov edx, 1FFh
call _strncpy
mov rax, [r14+38h]
mov [rax+296h], r15b
mov eax, 1
loc_2DE44:
mov [rbx], eax
xor eax, eax
loc_2DE48:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long mysql_stmt_store_result_start(int *a1, long long a2)
{
long long v2; // rax
long long v3; // rax
unsigned int *v4; // r15
int v5; // eax
int v7; // eax
long long v8[4]; // [rsp+0h] [rbp-20h] BYREF
v8[0] = v2;
v3 = *(_QWORD *)(a2 + 56);
if ( v3 )
{
v4 = *(unsigned int **)(*(_QWORD *)(v3 + 1152) + 40LL);
v8[0] = a2;
*((_BYTE *)v4 + 20) = 1;
v5 = my_context_spawn(v4 + 14, mysql_stmt_store_result_start_internal, v8);
*((_WORD *)v4 + 10) = 0;
if ( v5 > 0 )
{
*((_BYTE *)v4 + 21) = 1;
return *v4;
}
if ( v5 < 0 )
{
*(_DWORD *)(*(_QWORD *)(a2 + 56) + 144LL) = 2008;
strncpy(*(_QWORD *)(a2 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(*(_QWORD *)(a2 + 56) + 668LL) = 0;
strncpy(*(_QWORD *)(a2 + 56) + 151LL, client_errors[8], 511LL);
*(_BYTE *)(*(_QWORD *)(a2 + 56) + 662LL) = 0;
v7 = 1;
}
else
{
v7 = v4[2];
}
}
else
{
v7 = mysql_stmt_store_result(a2);
}
*a1 = v7;
return 0LL;
}
| mysql_stmt_store_result_start:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RSI + 0x38]
TEST RAX,RAX
JZ 0x0012ddcb
MOV RAX,qword ptr [RAX + 0x480]
MOV R15,qword ptr [RAX + 0x28]
LEA RDX,[RBP + -0x20]
MOV qword ptr [RDX],R14
MOV byte ptr [R15 + 0x14],0x1
LEA RDI,[R15 + 0x38]
LEA RSI,[0x12de53]
CALL 0x0012f2d4
MOV word ptr [R15 + 0x14],0x0
TEST EAX,EAX
JLE 0x0012ddd5
MOV byte ptr [R15 + 0x15],0x1
MOV EAX,dword ptr [R15]
JMP 0x0012de48
LAB_0012ddcb:
MOV RDI,R14
CALL 0x00121b82
JMP 0x0012de44
LAB_0012ddd5:
JS 0x0012dddd
MOV EAX,dword ptr [R15 + 0x8]
JMP 0x0012de44
LAB_0012dddd:
MOV RAX,qword ptr [R14 + 0x38]
MOV dword ptr [RAX + 0x90],0x7d8
MOV EDI,0x297
ADD RDI,qword ptr [R14 + 0x38]
LEA RAX,[0x14bac0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
MOV RAX,qword ptr [R14 + 0x38]
XOR R15D,R15D
MOV byte ptr [RAX + 0x29c],R15B
MOV EDI,0x97
ADD RDI,qword ptr [R14 + 0x38]
LEA RAX,[0x14bad0]
MOV RSI,qword ptr [RAX + 0x40]
MOV EDX,0x1ff
CALL 0x00113220
MOV RAX,qword ptr [R14 + 0x38]
MOV byte ptr [RAX + 0x296],R15B
MOV EAX,0x1
LAB_0012de44:
MOV dword ptr [RBX],EAX
XOR EAX,EAX
LAB_0012de48:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int4 mysql_stmt_store_result_start(int4 *param_1,long param_2)
{
int4 *puVar1;
int iVar2;
int4 uVar3;
if (*(long *)(param_2 + 0x38) == 0) {
uVar3 = mysql_stmt_store_result(param_2);
}
else {
puVar1 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28);
*(int1 *)(puVar1 + 5) = 1;
iVar2 = my_context_spawn(puVar1 + 0xe,mysql_stmt_store_result_start_internal);
*(int2 *)(puVar1 + 5) = 0;
if (0 < iVar2) {
*(int1 *)((long)puVar1 + 0x15) = 1;
return *puVar1;
}
if (iVar2 < 0) {
*(int4 *)(*(long *)(param_2 + 0x38) + 0x90) = 0x7d8;
strncpy((char *)(*(long *)(param_2 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)(*(long *)(param_2 + 0x38) + 0x29c) = 0;
strncpy((char *)(*(long *)(param_2 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_0014bb10,
0x1ff);
*(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0;
uVar3 = 1;
}
else {
uVar3 = puVar1[2];
}
}
*param_1 = uVar3;
return 0;
}
|
|
6,127 | mariadb_compression_algorithm_str | eloqsql/libmariadb/libmariadb/ma_compress.c | const char *_mariadb_compression_algorithm_str(enum enum_ma_compression_algorithm algorithm)
{
switch(algorithm) {
case COMPRESSION_NONE:
case COMPRESSION_ZLIB:
case COMPRESSION_ZSTD:
return compression_algorithms[algorithm] ;
default:
return compression_algorithms[COMPRESSION_UNKNOWN];
}
} | O3 | c | mariadb_compression_algorithm_str:
pushq %rbp
movq %rsp, %rbp
movl %edi, %eax
shlq $0x3, %rax
cmpl $0x3, %edi
leaq 0x29914(%rip), %rcx # 0x47bc0
movl $0x18, %edx
cmovbq %rax, %rdx
movq (%rcx,%rdx), %rax
popq %rbp
retq
| _mariadb_compression_algorithm_str:
push rbp
mov rbp, rsp
mov eax, edi
shl rax, 3
cmp edi, 3
lea rcx, compression_algorithms
mov edx, 18h
cmovb rdx, rax
mov rax, [rcx+rdx]
pop rbp
retn
| char * mariadb_compression_algorithm_str(unsigned int a1)
{
long long v1; // rdx
v1 = 3LL;
if ( a1 < 3 )
v1 = a1;
return compression_algorithms[v1];
}
| _mariadb_compression_algorithm_str:
PUSH RBP
MOV RBP,RSP
MOV EAX,EDI
SHL RAX,0x3
CMP EDI,0x3
LEA RCX,[0x147bc0]
MOV EDX,0x18
CMOVC RDX,RAX
MOV RAX,qword ptr [RCX + RDX*0x1]
POP RBP
RET
|
int8 _mariadb_compression_algorithm_str(uint param_1)
{
long lVar1;
lVar1 = 0x18;
if (param_1 < 3) {
lVar1 = (ulong)param_1 << 3;
}
return *(int8 *)(compression_algorithms + lVar1);
}
|
|
6,128 | ma_set_fatal_error_with_share | eloqsql/storage/maria/ma_info.c | void _ma_set_fatal_error_with_share(MARIA_SHARE *share, int error)
{
DBUG_PRINT("error", ("error: %d", error));
if (!(share->state.changed & STATE_CRASHED_PRINTED))
{
_ma_report_error(error,
(share->index_file_name.length ?
&share->index_file_name :
&share->unique_file_name),
MYF(ME_WARNING | ME_ERROR_LOG));
}
maria_mark_crashed_share(share);
share->state.changed|= STATE_CRASHED_PRINTED;
DBUG_ASSERT(!maria_assert_if_crashed_table);
} | O0 | c | ma_set_fatal_error_with_share:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
jmp 0x43e11
movq -0x8(%rbp), %rax
movl 0x170(%rax), %eax
andl $0x800, %eax # imm = 0x800
cmpl $0x0, %eax
jne 0x43e68
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x5d8(%rax)
je 0x43e49
movq -0x8(%rbp), %rax
addq $0x5d0, %rax # imm = 0x5D0
movq %rax, -0x18(%rbp)
jmp 0x43e57
movq -0x8(%rbp), %rax
addq $0x5b0, %rax # imm = 0x5B0
movq %rax, -0x18(%rbp)
movl -0x10(%rbp), %edi
movq -0x18(%rbp), %rsi
movl $0x840, %edx # imm = 0x840
callq 0x43c20
jmp 0x43e6a
movq -0x8(%rbp), %rax
movl 0x170(%rax), %ecx
orl $0x2, %ecx
movl %ecx, 0x170(%rax)
jmp 0x43e7f
jmp 0x43e81
movq -0x8(%rbp), %rax
movl 0x170(%rax), %ecx
orl $0x800, %ecx # imm = 0x800
movl %ecx, 0x170(%rax)
jmp 0x43e99
addq $0x20, %rsp
popq %rbp
retq
nop
| _ma_set_fatal_error_with_share:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
jmp short $+2
loc_43E11:
mov rax, [rbp+var_8]
mov eax, [rax+170h]
and eax, 800h
cmp eax, 0
jnz short loc_43E68
mov eax, [rbp+var_C]
mov [rbp+var_10], eax
mov rax, [rbp+var_8]
cmp qword ptr [rax+5D8h], 0
jz short loc_43E49
mov rax, [rbp+var_8]
add rax, 5D0h
mov [rbp+var_18], rax
jmp short loc_43E57
loc_43E49:
mov rax, [rbp+var_8]
add rax, 5B0h
mov [rbp+var_18], rax
loc_43E57:
mov edi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov edx, 840h
call _ma_report_error
loc_43E68:
jmp short $+2
loc_43E6A:
mov rax, [rbp+var_8]
mov ecx, [rax+170h]
or ecx, 2
mov [rax+170h], ecx
jmp short $+2
loc_43E7F:
jmp short $+2
loc_43E81:
mov rax, [rbp+var_8]
mov ecx, [rax+170h]
or ecx, 800h
mov [rax+170h], ecx
jmp short $+2
loc_43E99:
add rsp, 20h
pop rbp
retn
| long long ma_set_fatal_error_with_share(long long a1, int a2, long long a3, long long a4, long long a5, int a6)
{
long long result; // rax
if ( (*(_DWORD *)(a1 + 368) & 0x800) == 0 )
{
if ( *(_QWORD *)(a1 + 1496) )
ma_report_error(a2, (long long *)(a1 + 1488), 2112, a4, a5, a6);
else
ma_report_error(a2, (long long *)(a1 + 1456), 2112, a4, a5, a6);
}
*(_DWORD *)(a1 + 368) |= 2u;
result = a1;
*(_DWORD *)(a1 + 368) |= 0x800u;
return result;
}
| _ma_set_fatal_error_with_share:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
JMP 0x00143e11
LAB_00143e11:
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x170]
AND EAX,0x800
CMP EAX,0x0
JNZ 0x00143e68
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x10],EAX
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x5d8],0x0
JZ 0x00143e49
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x5d0
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00143e57
LAB_00143e49:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x5b0
MOV qword ptr [RBP + -0x18],RAX
LAB_00143e57:
MOV EDI,dword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,0x840
CALL 0x00143c20
LAB_00143e68:
JMP 0x00143e6a
LAB_00143e6a:
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x170]
OR ECX,0x2
MOV dword ptr [RAX + 0x170],ECX
JMP 0x00143e7f
LAB_00143e7f:
JMP 0x00143e81
LAB_00143e81:
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x170]
OR ECX,0x800
MOV dword ptr [RAX + 0x170],ECX
JMP 0x00143e99
LAB_00143e99:
ADD RSP,0x20
POP RBP
RET
|
void _ma_set_fatal_error_with_share(long param_1,int4 param_2)
{
int8 local_20;
if ((*(uint *)(param_1 + 0x170) & 0x800) == 0) {
if (*(long *)(param_1 + 0x5d8) == 0) {
local_20 = param_1 + 0x5b0;
}
else {
local_20 = param_1 + 0x5d0;
}
_ma_report_error(param_2,local_20,0x840);
}
*(uint *)(param_1 + 0x170) = *(uint *)(param_1 + 0x170) | 2;
*(uint *)(param_1 + 0x170) = *(uint *)(param_1 + 0x170) | 0x800;
return;
}
|
|
6,129 | convert_to_format_v1(char*) | eloqsql/client/mysqltest.cc | void convert_to_format_v1(char* query)
{
int last_c_was_quote= 0;
char *p= query, *to= query;
char *end= strend(query);
char last_c;
while (p <= end)
{
if (*p == '\n' && !last_c_was_quote)
{
*to++ = *p++; /* Save the newline */
/* Skip any spaces on next line */
while (*p && my_isspace(charset_info, *p))
p++;
last_c_was_quote= 0;
}
else if (*p == '\'' || *p == '"' || *p == '`')
{
last_c= *p;
*to++ = *p++;
/* Copy anything until the next quote of same type */
while (*p && *p != last_c)
*to++ = *p++;
*to++ = *p++;
last_c_was_quote= 1;
}
else
{
*to++ = *p++;
last_c_was_quote= 0;
}
}
} | O0 | cpp | convert_to_format_v1(char*):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0x148aa0
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
ja 0x6d3f2
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0xa, %eax
jne 0x6d2f6
cmpl $0x0, -0xc(%rbp)
jne 0x6d2f6
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb (%rax), %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpb $0x0, (%rcx)
movb %al, -0x2a(%rbp)
je 0x6d2d3
movq 0x2890d1(%rip), %rax # 0x2f6388
movq 0x40(%rax), %rax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x2a(%rbp)
movb -0x2a(%rbp), %al
testb $0x1, %al
jne 0x6d2dc
jmp 0x6d2ea
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x6d2a2
movl $0x0, -0xc(%rbp)
jmp 0x6d3ed
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x27, %eax
je 0x6d31e
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
je 0x6d31e
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x60, %eax
jne 0x6d3c2
movq -0x18(%rbp), %rax
movb (%rax), %al
movb %al, -0x29(%rbp)
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb (%rax), %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpb $0x0, (%rcx)
movb %al, -0x2b(%rbp)
je 0x6d36a
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
movsbl -0x29(%rbp), %ecx
cmpl %ecx, %eax
setne %al
movb %al, -0x2b(%rbp)
movb -0x2b(%rbp), %al
testb $0x1, %al
jne 0x6d373
jmp 0x6d397
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb (%rax), %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
jmp 0x6d349
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb (%rax), %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movl $0x1, -0xc(%rbp)
jmp 0x6d3eb
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb (%rax), %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movl $0x0, -0xc(%rbp)
jmp 0x6d3ed
jmp 0x6d260
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _Z20convert_to_format_v1Pc:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_C], 0
mov rax, [rbp+var_8]
mov [rbp+var_18], rax
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
mov rdi, [rbp+var_8]
call strend
mov [rbp+var_28], rax
loc_6D260:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_28]
ja loc_6D3F2
mov rax, [rbp+var_18]
movsx eax, byte ptr [rax]
cmp eax, 0Ah
jnz short loc_6D2F6
cmp [rbp+var_C], 0
jnz short loc_6D2F6
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 1
mov [rbp+var_18], rcx
mov cl, [rax]
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
loc_6D2A2:
mov rcx, [rbp+var_18]
xor eax, eax
cmp byte ptr [rcx], 0
mov [rbp+var_2A], al
jz short loc_6D2D3
mov rax, cs:_ZL12charset_info; charset_info
mov rax, [rax+40h]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx+1]
and eax, 8
cmp eax, 0
setnz al
mov [rbp+var_2A], al
loc_6D2D3:
mov al, [rbp+var_2A]
test al, 1
jnz short loc_6D2DC
jmp short loc_6D2EA
loc_6D2DC:
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
jmp short loc_6D2A2
loc_6D2EA:
mov [rbp+var_C], 0
jmp loc_6D3ED
loc_6D2F6:
mov rax, [rbp+var_18]
movsx eax, byte ptr [rax]
cmp eax, 27h ; '''
jz short loc_6D31E
mov rax, [rbp+var_18]
movsx eax, byte ptr [rax]
cmp eax, 22h ; '"'
jz short loc_6D31E
mov rax, [rbp+var_18]
movsx eax, byte ptr [rax]
cmp eax, 60h ; '`'
jnz loc_6D3C2
loc_6D31E:
mov rax, [rbp+var_18]
mov al, [rax]
mov [rbp+var_29], al
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 1
mov [rbp+var_18], rcx
mov cl, [rax]
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
loc_6D349:
mov rcx, [rbp+var_18]
xor eax, eax
cmp byte ptr [rcx], 0
mov [rbp+var_2B], al
jz short loc_6D36A
mov rax, [rbp+var_18]
movsx eax, byte ptr [rax]
movsx ecx, [rbp+var_29]
cmp eax, ecx
setnz al
mov [rbp+var_2B], al
loc_6D36A:
mov al, [rbp+var_2B]
test al, 1
jnz short loc_6D373
jmp short loc_6D397
loc_6D373:
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 1
mov [rbp+var_18], rcx
mov cl, [rax]
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
jmp short loc_6D349
loc_6D397:
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 1
mov [rbp+var_18], rcx
mov cl, [rax]
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov [rbp+var_C], 1
jmp short loc_6D3EB
loc_6D3C2:
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 1
mov [rbp+var_18], rcx
mov cl, [rax]
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov [rbp+var_C], 0
loc_6D3EB:
jmp short $+2
loc_6D3ED:
jmp loc_6D260
loc_6D3F2:
add rsp, 30h
pop rbp
retn
| char * convert_to_format_v1(char *a1)
{
char *result; // rax
char *v2; // rax
char v3; // cl
char *v4; // rax
char *v5; // rax
char v6; // cl
char *v7; // rax
char *v8; // rax
char v9; // cl
char *v10; // rax
char *v11; // rax
char v12; // cl
char *v13; // rax
char *v14; // rax
char v15; // cl
char *v16; // rax
bool v17; // [rsp+5h] [rbp-2Bh]
bool v18; // [rsp+6h] [rbp-2Ah]
char v19; // [rsp+7h] [rbp-29h]
unsigned long long v20; // [rsp+8h] [rbp-28h]
char *v21; // [rsp+10h] [rbp-20h]
char *v22; // [rsp+10h] [rbp-20h]
char *v23; // [rsp+18h] [rbp-18h]
char *v24; // [rsp+18h] [rbp-18h]
int v25; // [rsp+24h] [rbp-Ch]
v25 = 0;
v23 = a1;
v21 = a1;
v20 = strend(a1);
while ( 1 )
{
result = v23;
if ( (unsigned long long)v23 > v20 )
break;
if ( *v23 != 10 || v25 )
{
if ( *v23 == 39 || *v23 == 34 || *v23 == 96 )
{
v19 = *v23;
v5 = v23;
v24 = v23 + 1;
v6 = *v5;
v7 = v21;
v22 = v21 + 1;
*v7 = v6;
while ( 1 )
{
v17 = 0;
if ( *v24 )
v17 = *v24 != v19;
if ( !v17 )
break;
v8 = v24++;
v9 = *v8;
v10 = v22++;
*v10 = v9;
}
v11 = v24;
v23 = v24 + 1;
v12 = *v11;
v13 = v22;
v21 = v22 + 1;
*v13 = v12;
v25 = 1;
}
else
{
v14 = v23++;
v15 = *v14;
v16 = v21++;
*v16 = v15;
v25 = 0;
}
}
else
{
v2 = v23++;
v3 = *v2;
v4 = v21++;
*v4 = v3;
while ( 1 )
{
v18 = 0;
if ( *v23 )
v18 = (*(_BYTE *)(*((_QWORD *)charset_info + 8) + (unsigned __int8)*v23 + 1LL) & 8) != 0;
if ( !v18 )
break;
++v23;
}
v25 = 0;
}
}
return result;
}
| convert_to_format_v1:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00248aa0
MOV qword ptr [RBP + -0x28],RAX
LAB_0016d260:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x28]
JA 0x0016d3f2
MOV RAX,qword ptr [RBP + -0x18]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0xa
JNZ 0x0016d2f6
CMP dword ptr [RBP + -0xc],0x0
JNZ 0x0016d2f6
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x18],RCX
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
LAB_0016d2a2:
MOV RCX,qword ptr [RBP + -0x18]
XOR EAX,EAX
CMP byte ptr [RCX],0x0
MOV byte ptr [RBP + -0x2a],AL
JZ 0x0016d2d3
MOV RAX,qword ptr [0x003f6388]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x8
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x2a],AL
LAB_0016d2d3:
MOV AL,byte ptr [RBP + -0x2a]
TEST AL,0x1
JNZ 0x0016d2dc
JMP 0x0016d2ea
LAB_0016d2dc:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0016d2a2
LAB_0016d2ea:
MOV dword ptr [RBP + -0xc],0x0
JMP 0x0016d3ed
LAB_0016d2f6:
MOV RAX,qword ptr [RBP + -0x18]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x27
JZ 0x0016d31e
MOV RAX,qword ptr [RBP + -0x18]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x22
JZ 0x0016d31e
MOV RAX,qword ptr [RBP + -0x18]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x60
JNZ 0x0016d3c2
LAB_0016d31e:
MOV RAX,qword ptr [RBP + -0x18]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x29],AL
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x18],RCX
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
LAB_0016d349:
MOV RCX,qword ptr [RBP + -0x18]
XOR EAX,EAX
CMP byte ptr [RCX],0x0
MOV byte ptr [RBP + -0x2b],AL
JZ 0x0016d36a
MOV RAX,qword ptr [RBP + -0x18]
MOVSX EAX,byte ptr [RAX]
MOVSX ECX,byte ptr [RBP + -0x29]
CMP EAX,ECX
SETNZ AL
MOV byte ptr [RBP + -0x2b],AL
LAB_0016d36a:
MOV AL,byte ptr [RBP + -0x2b]
TEST AL,0x1
JNZ 0x0016d373
JMP 0x0016d397
LAB_0016d373:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x18],RCX
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
JMP 0x0016d349
LAB_0016d397:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x18],RCX
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0xc],0x1
JMP 0x0016d3eb
LAB_0016d3c2:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x18],RCX
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0xc],0x0
LAB_0016d3eb:
JMP 0x0016d3ed
LAB_0016d3ed:
JMP 0x0016d260
LAB_0016d3f2:
ADD RSP,0x30
POP RBP
RET
|
/* convert_to_format_v1(char*) */
void convert_to_format_v1(char *param_1)
{
byte bVar1;
byte *pbVar2;
byte *pbVar3;
byte *pbVar4;
bool bVar5;
byte *local_28;
byte *local_20;
bVar5 = false;
pbVar4 = (byte *)strend(param_1);
local_28 = (byte *)param_1;
local_20 = (byte *)param_1;
while (local_20 <= pbVar4) {
if ((*local_20 != 10) || (bVar5)) {
if ((*local_20 == 0x27) || ((*local_20 == 0x22 || (*local_20 == 0x60)))) {
bVar1 = *local_20;
*local_28 = *local_20;
pbVar2 = local_28;
pbVar3 = local_20;
while( true ) {
local_20 = pbVar3 + 1;
local_28 = pbVar2 + 1;
bVar5 = false;
if (*local_20 != 0) {
bVar5 = *local_20 != bVar1;
}
if (!bVar5) break;
*local_28 = *local_20;
pbVar2 = local_28;
pbVar3 = local_20;
}
*local_28 = *local_20;
bVar5 = true;
local_28 = pbVar2 + 2;
local_20 = pbVar3 + 2;
}
else {
*local_28 = *local_20;
bVar5 = false;
local_28 = local_28 + 1;
local_20 = local_20 + 1;
}
}
else {
*local_28 = *local_20;
do {
local_20 = local_20 + 1;
bVar5 = false;
if (*local_20 != 0) {
bVar5 = (*(byte *)(*(long *)(charset_info + 0x40) + 1 + (ulong)*local_20) & 8) != 0;
}
} while (bVar5);
bVar5 = false;
local_28 = local_28 + 1;
}
}
return;
}
|
|
6,130 | js_string_localeCompare | bluesky950520[P]quickjs/quickjs.c | static JSValue js_string_localeCompare(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
int i, n, an, bn, cmp;
uint32_t *as, *bs, *ts;
JSValue a, b, ret;
ret = JS_EXCEPTION;
as = NULL;
bs = NULL;
a = JS_ToStringCheckObject(ctx, this_val);
if (JS_IsException(a))
return JS_EXCEPTION;
b = JS_ToString(ctx, argv[0]);
if (JS_IsException(b))
goto exception;
an = to_utf32_buf(ctx, JS_VALUE_GET_STRING(a), &as);
if (an == -1)
goto exception;
bn = to_utf32_buf(ctx, JS_VALUE_GET_STRING(b), &bs);
if (bn == -1)
goto exception;
// TODO(bnoordhuis) skip normalization when input is latin1
an = unicode_normalize(&ts, as, an, UNICODE_NFC, ctx,
(DynBufReallocFunc *)js_realloc);
if (an == -1)
goto exception;
js_free(ctx, as);
as = ts;
// TODO(bnoordhuis) skip normalization when input is latin1
bn = unicode_normalize(&ts, bs, bn, UNICODE_NFC, ctx,
(DynBufReallocFunc *)js_realloc);
if (bn == -1)
goto exception;
js_free(ctx, bs);
bs = ts;
n = min_int(an, bn);
for (i = 0; i < n; i++)
if (as[i] != bs[i])
break;
if (i < n)
cmp = compare_u32(as[i], bs[i]);
else
cmp = compare_u32(an, bn);
ret = js_int32(cmp);
exception:
JS_FreeValue(ctx, a);
JS_FreeValue(ctx, b);
js_free(ctx, as);
js_free(ctx, bs);
return ret;
} | O3 | c | js_string_localeCompare:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %r15
movq %rdi, %rbx
xorl %r14d, %r14d
movq %r14, 0x10(%rsp)
movq %r14, 0x8(%rsp)
callq 0x4350b
movq %rdx, %r13
movl $0x6, %ebp
cmpl $0x6, %r13d
je 0x7ee2d
movq %rax, %r12
movq (%r15), %rsi
movq 0x8(%r15), %rdx
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x27518
movq %rdx, %r15
movl $0x6, %ebp
cmpl $0x6, %r15d
jne 0x7ee42
movq 0x18(%rbx), %rdi
cmpl $-0x9, %r13d
jb 0x7edf6
movl (%r12), %edx
leal -0x1(%rdx), %ecx
movl %ecx, (%r12)
cmpl $0x1, %edx
jg 0x7edf6
movq %r12, %rsi
movq %r15, %r12
movq %rax, %r15
movq %r13, %rdx
callq 0x20d90
movq %r15, %rax
movq %r12, %r15
movq 0x18(%rbx), %rdi
cmpl $-0x9, %r15d
jb 0x7ee13
movl (%rax), %edx
leal -0x1(%rdx), %ecx
movl %ecx, (%rax)
cmpl $0x1, %edx
jg 0x7ee13
movq %rax, %rsi
movq %r15, %rdx
callq 0x20d90
movq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x1c845
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x1c845
movq %r14, %rax
movq %rbp, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, (%rsp)
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x12def
cmpl $-0x1, %eax
jne 0x7ee67
xorl %r14d, %r14d
movq (%rsp), %rax
jmp 0x7edc1
movl %eax, %r14d
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movq (%rsp), %rsi
callq 0x12def
cmpl $-0x1, %eax
je 0x7ee5b
movl %eax, 0x24(%rsp)
movq 0x10(%rsp), %rsi
leaq -0x6260c(%rip), %r9 # 0x1c884
leaq 0x28(%rsp), %rdi
movl %r14d, %edx
xorl %r14d, %r14d
movq %rsi, 0x18(%rsp)
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x9a695
cmpl $-0x1, %eax
je 0x7ee5e
movl %eax, 0x20(%rsp)
movq %rbx, %rdi
movq 0x18(%rsp), %rsi
callq 0x1c845
leaq 0x28(%rsp), %rdi
movq (%rdi), %rax
movq %rax, 0x18(%rsp)
movq %rax, 0x10(%rsp)
movq 0x8(%rsp), %rsi
leaq -0x6265a(%rip), %r9 # 0x1c884
xorl %r14d, %r14d
movq %rsi, 0x30(%rsp)
movl 0x24(%rsp), %edx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0x9a695
cmpl $-0x1, %eax
je 0x7ee5e
movq %rbx, %rdi
movq 0x30(%rsp), %rsi
movl %eax, %ebp
callq 0x1c845
movl %ebp, %r10d
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x20(%rsp), %r8d
cmpl %ebp, %r8d
movl %ebp, %ecx
cmovll %r8d, %ecx
testl %ecx, %ecx
movq 0x18(%rsp), %r9
jle 0x7ef47
movl %ecx, %ecx
xorl %edx, %edx
movl (%r9,%rdx,4), %esi
movl (%rax,%rdx,4), %edi
cmpl %edi, %esi
jne 0x7ef4a
incq %rdx
cmpq %rdx, %rcx
jne 0x7ef34
cmpl %r10d, %r8d
setb %al
seta %cl
movzbl %al, %eax
movzbl %cl, %r14d
subl %eax, %r14d
xorl %ebp, %ebp
jmp 0x7ee5e
| js_string_localeCompare:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r15, r8
mov rbx, rdi
xor r14d, r14d
mov [rsp+68h+var_58], r14
mov [rsp+68h+var_60], r14
call JS_ToStringCheckObject
mov r13, rdx
mov ebp, 6
cmp r13d, 6
jz loc_7EE2D
mov r12, rax
mov rsi, [r15]
mov rdx, [r15+8]
xor r14d, r14d
mov rdi, rbx
xor ecx, ecx
call JS_ToStringInternal
mov r15, rdx
mov ebp, 6
cmp r15d, 6
jnz loc_7EE42
loc_7EDC1:
mov rdi, [rbx+18h]
cmp r13d, 0FFFFFFF7h
jb short loc_7EDF6
mov edx, [r12]
lea ecx, [rdx-1]
mov [r12], ecx
cmp edx, 1
jg short loc_7EDF6
mov rsi, r12
mov r12, r15
mov r15, rax
mov rdx, r13
call js_free_value_rt
mov rax, r15
mov r15, r12
mov rdi, [rbx+18h]
loc_7EDF6:
cmp r15d, 0FFFFFFF7h
jb short loc_7EE13
mov edx, [rax]
lea ecx, [rdx-1]
mov [rax], ecx
cmp edx, 1
jg short loc_7EE13
mov rsi, rax
mov rdx, r15
call js_free_value_rt
loc_7EE13:
mov rsi, [rsp+68h+var_58]
mov rdi, rbx
call js_free
mov rsi, [rsp+68h+var_60]
mov rdi, rbx
call js_free
loc_7EE2D:
mov rax, r14
mov rdx, rbp
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_7EE42:
mov [rsp+68h+var_68], rax
lea rdx, [rsp+68h+var_58]
mov rdi, rbx
mov rsi, r12
call to_utf32_buf
cmp eax, 0FFFFFFFFh
jnz short loc_7EE67
loc_7EE5B:
xor r14d, r14d
loc_7EE5E:
mov rax, [rsp+68h+var_68]
jmp loc_7EDC1
loc_7EE67:
mov r14d, eax
lea rdx, [rsp+68h+var_60]
mov rdi, rbx
mov rsi, [rsp+68h+var_68]
call to_utf32_buf
cmp eax, 0FFFFFFFFh
jz short loc_7EE5B
mov [rsp+68h+var_44], eax
mov rsi, [rsp+68h+var_58]
lea r9, js_realloc
lea rdi, [rsp+68h+var_40]
mov edx, r14d
xor r14d, r14d
mov [rsp+68h+var_50], rsi
xor ecx, ecx
mov r8, rbx
call unicode_normalize
cmp eax, 0FFFFFFFFh
jz short loc_7EE5E
mov [rsp+68h+var_48], eax
mov rdi, rbx
mov rsi, [rsp+68h+var_50]
call js_free
lea rdi, [rsp+68h+var_40]
mov rax, [rdi]
mov [rsp+68h+var_50], rax
mov [rsp+68h+var_58], rax
mov rsi, [rsp+68h+var_60]
lea r9, js_realloc
xor r14d, r14d
mov [rsp+68h+var_38], rsi
mov edx, [rsp+68h+var_44]
xor ecx, ecx
mov r8, rbx
call unicode_normalize
cmp eax, 0FFFFFFFFh
jz loc_7EE5E
mov rdi, rbx
mov rsi, [rsp+68h+var_38]
mov ebp, eax
call js_free
mov r10d, ebp
mov rax, [rsp+68h+var_40]
mov [rsp+68h+var_60], rax
mov r8d, [rsp+68h+var_48]
cmp r8d, ebp
mov ecx, ebp
cmovl ecx, r8d
test ecx, ecx
mov r9, [rsp+68h+var_50]
jle short loc_7EF47
mov ecx, ecx
xor edx, edx
loc_7EF34:
mov esi, [r9+rdx*4]
mov edi, [rax+rdx*4]
cmp esi, edi
jnz short loc_7EF4A
inc rdx
cmp rcx, rdx
jnz short loc_7EF34
loc_7EF47:
cmp r8d, r10d
loc_7EF4A:
setb al
setnbe cl
movzx eax, al
movzx r14d, cl
sub r14d, eax
xor ebp, ebp
jmp loc_7EE5E
| long long js_string_localeCompare(
long long a1,
_DWORD *a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v16; // r14
unsigned long long v17; // rax
long long v18; // r8
long long v19; // r9
__m128 v20; // xmm4
__m128 v21; // xmm5
long long v22; // rdx
long long v23; // r13
int *v24; // r12
_QWORD *v25; // rax
long long v26; // r8
long long v27; // r9
long long v28; // rdx
long long v29; // r15
long long v30; // rdi
int v31; // edx
long long v32; // rcx
int *v33; // rsi
long long v34; // r12
_QWORD *v35; // r15
int v36; // edx
long long v37; // rcx
unsigned int v39; // eax
unsigned int v40; // r14d
unsigned int v41; // eax
long long v42; // rdx
unsigned int v43; // eax
int v44; // eax
int v45; // ebp
int v46; // ecx
long long v47; // rdx
unsigned int v48; // esi
unsigned int v49; // edi
bool v50; // cf
bool v51; // zf
long long v52; // [rsp+0h] [rbp-68h]
long long v53; // [rsp+8h] [rbp-60h] BYREF
long long v54; // [rsp+10h] [rbp-58h] BYREF
long long v55; // [rsp+18h] [rbp-50h]
unsigned int v56; // [rsp+20h] [rbp-48h]
unsigned int v57; // [rsp+24h] [rbp-44h]
long long v58; // [rsp+28h] [rbp-40h] BYREF
long long v59; // [rsp+30h] [rbp-38h]
v16 = 0LL;
v54 = 0LL;
v53 = 0LL;
v17 = JS_ToStringCheckObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v23 = v22;
if ( (_DWORD)v22 != 6 )
{
v24 = (int *)v17;
v16 = 0LL;
v25 = (_QWORD *)JS_ToStringInternal(
a1,
*(_DWORD **)a5,
*(_QWORD *)(a5 + 8),
0LL,
v18,
v19,
a7,
a8,
a9,
a10,
v20,
v21,
a13,
a14);
v29 = v28;
if ( (_DWORD)v28 != 6 )
{
v52 = (long long)v25;
v39 = to_utf32_buf(a1, (long long)v24, &v54);
if ( v39 == -1 || (v40 = v39, v41 = to_utf32_buf(a1, v52, &v53), v41 == -1) )
{
v16 = 0LL;
}
else
{
v57 = v41;
v42 = v40;
v16 = 0LL;
v55 = v54;
v43 = unicode_normalize(&v58, v54, v42, 0LL, a1, js_realloc);
if ( v43 != -1 )
{
v56 = v43;
js_free(a1, v55);
v55 = v58;
v54 = v58;
v16 = 0LL;
v59 = v53;
v44 = unicode_normalize(&v58, v53, v57, 0LL, a1, js_realloc);
if ( v44 != -1 )
{
v45 = v44;
js_free(a1, v59);
v53 = v58;
v26 = v56;
v46 = v45;
if ( (int)v56 < v45 )
v46 = v56;
v27 = v55;
if ( v46 <= 0 )
{
LABEL_23:
v50 = v56 < v45;
v51 = v56 == v45;
}
else
{
v47 = 0LL;
while ( 1 )
{
v48 = *(_DWORD *)(v55 + 4 * v47);
v49 = *(_DWORD *)(v58 + 4 * v47);
v50 = v48 < v49;
v51 = v48 == v49;
if ( v48 != v49 )
break;
if ( v46 == ++v47 )
goto LABEL_23;
}
}
v16 = (!v50 && !v51) - (unsigned int)v50;
}
}
}
v25 = (_QWORD *)v52;
}
v30 = *(_QWORD *)(a1 + 24);
if ( (unsigned int)v23 >= 0xFFFFFFF7 )
{
v31 = *v24;
v32 = (unsigned int)(*v24 - 1);
*v24 = v32;
if ( v31 <= 1 )
{
v33 = v24;
v34 = v29;
v35 = v25;
js_free_value_rt(v30, v33, v23, v32, v26, v27);
v25 = v35;
v29 = v34;
v30 = *(_QWORD *)(a1 + 24);
}
}
if ( (unsigned int)v29 >= 0xFFFFFFF7 )
{
v36 = *(_DWORD *)v25;
v37 = (unsigned int)(*(_DWORD *)v25 - 1);
*(_DWORD *)v25 = v37;
if ( v36 <= 1 )
js_free_value_rt(v30, v25, v29, v37, v26, v27);
}
js_free(a1, v54);
js_free(a1, v53);
}
return v16;
}
| js_string_localeCompare:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R15,R8
MOV RBX,RDI
XOR R14D,R14D
MOV qword ptr [RSP + 0x10],R14
MOV qword ptr [RSP + 0x8],R14
CALL 0x0014350b
MOV R13,RDX
MOV EBP,0x6
CMP R13D,0x6
JZ 0x0017ee2d
MOV R12,RAX
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
XOR R14D,R14D
MOV RDI,RBX
XOR ECX,ECX
CALL 0x00127518
MOV R15,RDX
MOV EBP,0x6
CMP R15D,0x6
JNZ 0x0017ee42
LAB_0017edc1:
MOV RDI,qword ptr [RBX + 0x18]
CMP R13D,-0x9
JC 0x0017edf6
MOV EDX,dword ptr [R12]
LEA ECX,[RDX + -0x1]
MOV dword ptr [R12],ECX
CMP EDX,0x1
JG 0x0017edf6
MOV RSI,R12
MOV R12,R15
MOV R15,RAX
MOV RDX,R13
CALL 0x00120d90
MOV RAX,R15
MOV R15,R12
MOV RDI,qword ptr [RBX + 0x18]
LAB_0017edf6:
CMP R15D,-0x9
JC 0x0017ee13
MOV EDX,dword ptr [RAX]
LEA ECX,[RDX + -0x1]
MOV dword ptr [RAX],ECX
CMP EDX,0x1
JG 0x0017ee13
MOV RSI,RAX
MOV RDX,R15
CALL 0x00120d90
LAB_0017ee13:
MOV RSI,qword ptr [RSP + 0x10]
MOV RDI,RBX
CALL 0x0011c845
MOV RSI,qword ptr [RSP + 0x8]
MOV RDI,RBX
CALL 0x0011c845
LAB_0017ee2d:
MOV RAX,R14
MOV RDX,RBP
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0017ee42:
MOV qword ptr [RSP],RAX
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV RSI,R12
CALL 0x00112def
CMP EAX,-0x1
JNZ 0x0017ee67
LAB_0017ee5b:
XOR R14D,R14D
LAB_0017ee5e:
MOV RAX,qword ptr [RSP]
JMP 0x0017edc1
LAB_0017ee67:
MOV R14D,EAX
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV RSI,qword ptr [RSP]
CALL 0x00112def
CMP EAX,-0x1
JZ 0x0017ee5b
MOV dword ptr [RSP + 0x24],EAX
MOV RSI,qword ptr [RSP + 0x10]
LEA R9,[0x11c884]
LEA RDI,[RSP + 0x28]
MOV EDX,R14D
XOR R14D,R14D
MOV qword ptr [RSP + 0x18],RSI
XOR ECX,ECX
MOV R8,RBX
CALL 0x0019a695
CMP EAX,-0x1
JZ 0x0017ee5e
MOV dword ptr [RSP + 0x20],EAX
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x0011c845
LEA RDI,[RSP + 0x28]
MOV RAX,qword ptr [RDI]
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x10],RAX
MOV RSI,qword ptr [RSP + 0x8]
LEA R9,[0x11c884]
XOR R14D,R14D
MOV qword ptr [RSP + 0x30],RSI
MOV EDX,dword ptr [RSP + 0x24]
XOR ECX,ECX
MOV R8,RBX
CALL 0x0019a695
CMP EAX,-0x1
JZ 0x0017ee5e
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x30]
MOV EBP,EAX
CALL 0x0011c845
MOV R10D,EBP
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x8],RAX
MOV R8D,dword ptr [RSP + 0x20]
CMP R8D,EBP
MOV ECX,EBP
CMOVL ECX,R8D
TEST ECX,ECX
MOV R9,qword ptr [RSP + 0x18]
JLE 0x0017ef47
MOV ECX,ECX
XOR EDX,EDX
LAB_0017ef34:
MOV ESI,dword ptr [R9 + RDX*0x4]
MOV EDI,dword ptr [RAX + RDX*0x4]
CMP ESI,EDI
JNZ 0x0017ef4a
INC RDX
CMP RCX,RDX
JNZ 0x0017ef34
LAB_0017ef47:
CMP R8D,R10D
LAB_0017ef4a:
SETC AL
SETA CL
MOVZX EAX,AL
MOVZX R14D,CL
SUB R14D,EAX
XOR EBP,EBP
JMP 0x0017ee5e
|
int js_string_localeCompare(long param_1)
{
uint uVar1;
uint uVar2;
int iVar3;
int iVar4;
uint uVar5;
int *piVar6;
int *piVar7;
uint uVar8;
ulong uVar9;
int8 uVar10;
int8 *in_R8;
int iVar11;
bool bVar12;
bool bVar13;
int1 auVar14 [16];
int1 auVar15 [16];
long local_60;
long local_58;
long local_50;
uint local_48;
int local_44;
long local_40;
long local_38;
iVar11 = 0;
local_58 = 0;
local_60 = 0;
auVar14 = JS_ToStringCheckObject();
piVar6 = auVar14._0_8_;
if (auVar14._8_4_ != 6) {
iVar11 = 0;
auVar15 = JS_ToStringInternal(param_1,*in_R8,in_R8[1],0);
piVar7 = auVar15._0_8_;
if (auVar15._8_4_ != 6) {
iVar3 = to_utf32_buf(param_1,piVar6,&local_58);
if ((iVar3 == -1) || (iVar4 = to_utf32_buf(param_1,piVar7,&local_60), iVar4 == -1)) {
iVar11 = 0;
}
else {
iVar11 = 0;
local_50 = local_58;
local_44 = iVar4;
uVar5 = unicode_normalize(&local_40,local_58,iVar3,0,param_1,js_realloc);
if (uVar5 != 0xffffffff) {
local_48 = uVar5;
js_free(param_1,local_50);
local_50 = local_40;
local_58 = local_40;
iVar11 = 0;
local_38 = local_60;
uVar5 = unicode_normalize(&local_40,local_60,local_44,0,param_1,js_realloc);
if (uVar5 != 0xffffffff) {
js_free(param_1,local_38);
local_60 = local_40;
uVar8 = uVar5;
if ((int)local_48 < (int)uVar5) {
uVar8 = local_48;
}
if (0 < (int)uVar8) {
uVar9 = 0;
do {
uVar1 = *(uint *)(local_50 + uVar9 * 4);
uVar2 = *(uint *)(local_40 + uVar9 * 4);
bVar12 = uVar1 < uVar2;
bVar13 = uVar1 == uVar2;
if (!bVar13) goto LAB_0017ef4a;
uVar9 = uVar9 + 1;
} while (uVar8 != uVar9);
}
bVar12 = local_48 < uVar5;
bVar13 = local_48 == uVar5;
LAB_0017ef4a:
iVar11 = (uint)(!bVar12 && !bVar13) - (uint)bVar12;
}
}
}
}
uVar10 = *(int8 *)(param_1 + 0x18);
if ((0xfffffff6 < auVar14._8_4_) && (iVar3 = *piVar6, *piVar6 = iVar3 + -1, iVar3 < 2)) {
js_free_value_rt(uVar10,piVar6,auVar14._8_8_);
uVar10 = *(int8 *)(param_1 + 0x18);
}
if ((0xfffffff6 < auVar15._8_4_) && (iVar3 = *piVar7, *piVar7 = iVar3 + -1, iVar3 < 2)) {
js_free_value_rt(uVar10,piVar7,auVar15._8_8_);
}
js_free(param_1,local_58);
js_free(param_1,local_60);
}
return iVar11;
}
|
|
6,131 | mi_test_if_changed | eloqsql/storage/myisam/mi_locking.c | int _mi_test_if_changed(register MI_INFO *info)
{
MYISAM_SHARE *share=info->s;
if (share->state.process != share->last_process ||
share->state.unique != info->last_unique ||
share->state.update_count != info->last_loop)
{ /* Keyfile has changed */
DBUG_PRINT("info",("index file changed"));
if (share->state.process != share->this_process)
(void) flush_key_blocks(share->key_cache, share->kfile,
&share->dirty_part_map, FLUSH_RELEASE);
share->last_process=share->state.process;
info->last_unique= share->state.unique;
info->last_loop= share->state.update_count;
info->update|= HA_STATE_WRITTEN; /* Must use file on next */
info->data_changed= 1; /* For mi_is_changed */
return 1;
}
return (!(info->update & HA_STATE_AKTIV) ||
(info->update & (HA_STATE_WRITTEN | HA_STATE_DELETED |
HA_STATE_KEY_CHANGED)));
} | O0 | c | mi_test_if_changed:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x68(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x308(%rcx), %rax
jne 0xb0cca
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x158(%rcx), %rax
jne 0xb0cca
movq -0x18(%rbp), %rax
movq 0x78(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x168(%rcx), %rax
je 0xb0d70
jmp 0xb0ccc
jmp 0xb0cce
movq -0x18(%rbp), %rax
movq 0x68(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x300(%rcx), %rax
je 0xb0d0d
movq -0x18(%rbp), %rax
movq 0x278(%rax), %rdi
movq -0x18(%rbp), %rax
movl 0x350(%rax), %esi
movq -0x18(%rbp), %rdx
addq $0x280, %rdx # imm = 0x280
movl $0x1, %ecx
callq 0xe4ce0
movq -0x18(%rbp), %rax
movq 0x68(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x308(%rax)
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x158(%rax)
movq -0x18(%rbp), %rax
movq 0x78(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x168(%rax)
movq -0x10(%rbp), %rax
movl 0x1d0(%rax), %ecx
orl $0x4, %ecx
movl %ecx, 0x1d0(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0x1fc(%rax)
movl $0x1, -0x4(%rbp)
jmp 0xb0daa
movq -0x10(%rbp), %rax
movl 0x1d0(%rax), %ecx
andl $0x2, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x19(%rbp)
je 0xb0d9f
movq -0x10(%rbp), %rax
movl 0x1d0(%rax), %eax
andl $0x8c, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _mi_test_if_changed:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov rax, [rax+68h]
mov rcx, [rbp+var_18]
cmp rax, [rcx+308h]
jnz short loc_B0CCA
mov rax, [rbp+var_18]
mov rax, [rax+70h]
mov rcx, [rbp+var_10]
cmp rax, [rcx+158h]
jnz short loc_B0CCA
mov rax, [rbp+var_18]
mov rax, [rax+78h]
mov rcx, [rbp+var_10]
cmp rax, [rcx+168h]
jz loc_B0D70
loc_B0CCA:
jmp short $+2
loc_B0CCC:
jmp short $+2
loc_B0CCE:
mov rax, [rbp+var_18]
mov rax, [rax+68h]
mov rcx, [rbp+var_18]
cmp rax, [rcx+300h]
jz short loc_B0D0D
mov rax, [rbp+var_18]
mov rdi, [rax+278h]
mov rax, [rbp+var_18]
mov esi, [rax+350h]
mov rdx, [rbp+var_18]
add rdx, 280h
mov ecx, 1
call flush_key_blocks
loc_B0D0D:
mov rax, [rbp+var_18]
mov rcx, [rax+68h]
mov rax, [rbp+var_18]
mov [rax+308h], rcx
mov rax, [rbp+var_18]
mov rcx, [rax+70h]
mov rax, [rbp+var_10]
mov [rax+158h], rcx
mov rax, [rbp+var_18]
mov rcx, [rax+78h]
mov rax, [rbp+var_10]
mov [rax+168h], rcx
mov rax, [rbp+var_10]
mov ecx, [rax+1D0h]
or ecx, 4
mov [rax+1D0h], ecx
mov rax, [rbp+var_10]
mov dword ptr [rax+1FCh], 1
mov [rbp+var_4], 1
jmp short loc_B0DAA
loc_B0D70:
mov rax, [rbp+var_10]
mov ecx, [rax+1D0h]
and ecx, 2
mov al, 1
cmp ecx, 0
mov [rbp+var_19], al
jz short loc_B0D9F
mov rax, [rbp+var_10]
mov eax, [rax+1D0h]
and eax, 8Ch
cmp eax, 0
setnz al
mov [rbp+var_19], al
loc_B0D9F:
mov al, [rbp+var_19]
and al, 1
movzx eax, al
mov [rbp+var_4], eax
loc_B0DAA:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| _BOOL8 mi_test_if_changed(long long *a1)
{
bool v2; // [rsp+7h] [rbp-19h]
long long v3; // [rsp+8h] [rbp-18h]
v3 = *a1;
if ( *(_QWORD *)(*a1 + 104) == *(_QWORD *)(*a1 + 776)
&& *(_QWORD *)(v3 + 112) == a1[43]
&& *(_QWORD *)(v3 + 120) == a1[45] )
{
v2 = 1;
if ( (a1[58] & 2) != 0 )
return (a1[58] & 0x8C) != 0;
return v2;
}
else
{
if ( *(_QWORD *)(v3 + 104) != *(_QWORD *)(v3 + 768) )
flush_key_blocks(*(_QWORD *)(v3 + 632), *(unsigned int *)(v3 + 848), v3 + 640, 1LL);
*(_QWORD *)(v3 + 776) = *(_QWORD *)(v3 + 104);
a1[43] = *(_QWORD *)(v3 + 112);
a1[45] = *(_QWORD *)(v3 + 120);
*((_DWORD *)a1 + 116) |= 4u;
*((_DWORD *)a1 + 127) = 1;
return 1;
}
}
| _mi_test_if_changed:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x68]
MOV RCX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RCX + 0x308]
JNZ 0x001b0cca
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x70]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x158]
JNZ 0x001b0cca
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x78]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x168]
JZ 0x001b0d70
LAB_001b0cca:
JMP 0x001b0ccc
LAB_001b0ccc:
JMP 0x001b0cce
LAB_001b0cce:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x68]
MOV RCX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RCX + 0x300]
JZ 0x001b0d0d
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x278]
MOV RAX,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RAX + 0x350]
MOV RDX,qword ptr [RBP + -0x18]
ADD RDX,0x280
MOV ECX,0x1
CALL 0x001e4ce0
LAB_001b0d0d:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX + 0x68]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x308],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX + 0x70]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x158],RCX
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX + 0x78]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x168],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x1d0]
OR ECX,0x4
MOV dword ptr [RAX + 0x1d0],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x1fc],0x1
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001b0daa
LAB_001b0d70:
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x1d0]
AND ECX,0x2
MOV AL,0x1
CMP ECX,0x0
MOV byte ptr [RBP + -0x19],AL
JZ 0x001b0d9f
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x1d0]
AND EAX,0x8c
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x19],AL
LAB_001b0d9f:
MOV AL,byte ptr [RBP + -0x19]
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x4],EAX
LAB_001b0daa:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
bool _mi_test_if_changed(long *param_1)
{
long lVar1;
bool local_21;
lVar1 = *param_1;
if (((*(long *)(lVar1 + 0x68) == *(long *)(lVar1 + 0x308)) &&
(*(long *)(lVar1 + 0x70) == param_1[0x2b])) && (*(long *)(lVar1 + 0x78) == param_1[0x2d])) {
local_21 = true;
if ((*(uint *)(param_1 + 0x3a) & 2) != 0) {
local_21 = (*(uint *)(param_1 + 0x3a) & 0x8c) != 0;
}
}
else {
if (*(long *)(lVar1 + 0x68) != *(long *)(lVar1 + 0x300)) {
flush_key_blocks(*(int8 *)(lVar1 + 0x278),*(int4 *)(lVar1 + 0x350),lVar1 + 0x280,1
);
}
*(int8 *)(lVar1 + 0x308) = *(int8 *)(lVar1 + 0x68);
param_1[0x2b] = *(long *)(lVar1 + 0x70);
param_1[0x2d] = *(long *)(lVar1 + 0x78);
*(uint *)(param_1 + 0x3a) = *(uint *)(param_1 + 0x3a) | 4;
*(int4 *)((long)param_1 + 0x1fc) = 1;
local_21 = true;
}
return local_21;
}
|
|
6,132 | mi_test_if_changed | eloqsql/storage/myisam/mi_locking.c | int _mi_test_if_changed(register MI_INFO *info)
{
MYISAM_SHARE *share=info->s;
if (share->state.process != share->last_process ||
share->state.unique != info->last_unique ||
share->state.update_count != info->last_loop)
{ /* Keyfile has changed */
DBUG_PRINT("info",("index file changed"));
if (share->state.process != share->this_process)
(void) flush_key_blocks(share->key_cache, share->kfile,
&share->dirty_part_map, FLUSH_RELEASE);
share->last_process=share->state.process;
info->last_unique= share->state.unique;
info->last_loop= share->state.update_count;
info->update|= HA_STATE_WRITTEN; /* Must use file on next */
info->data_changed= 1; /* For mi_is_changed */
return 1;
}
return (!(info->update & HA_STATE_AKTIV) ||
(info->update & (HA_STATE_WRITTEN | HA_STATE_DELETED |
HA_STATE_KEY_CHANGED)));
} | O3 | c | mi_test_if_changed:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %r14
movq 0x68(%r14), %rax
cmpq 0x308(%r14), %rax
jne 0x7c667
movq 0x70(%r14), %rcx
cmpq 0x158(%rbx), %rcx
jne 0x7c667
movq 0x78(%r14), %rcx
cmpq 0x168(%rbx), %rcx
jne 0x7c667
movl $0x8e, %ecx
andl 0x1d0(%rbx), %ecx
xorl %eax, %eax
cmpl $0x2, %ecx
setne %al
jmp 0x7c6c6
cmpq 0x300(%r14), %rax
je 0x7c693
movq 0x278(%r14), %rdi
movl 0x350(%r14), %esi
leaq 0x280(%r14), %rdx
movl $0x1, %ecx
callq 0x98709
movq 0x68(%r14), %rax
movq %rax, 0x308(%r14)
movq 0x70(%r14), %rax
movq %rax, 0x158(%rbx)
movq 0x78(%r14), %rax
movq %rax, 0x168(%rbx)
orb $0x4, 0x1d0(%rbx)
movl $0x1, 0x1fc(%rbx)
movl $0x1, %eax
popq %rbx
popq %r14
popq %rbp
retq
| _mi_test_if_changed:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
mov r14, [rdi]
mov rax, [r14+68h]
cmp rax, [r14+308h]
jnz short loc_7C667
mov rcx, [r14+70h]
cmp rcx, [rbx+158h]
jnz short loc_7C667
mov rcx, [r14+78h]
cmp rcx, [rbx+168h]
jnz short loc_7C667
mov ecx, 8Eh
and ecx, [rbx+1D0h]
xor eax, eax
cmp ecx, 2
setnz al
jmp short loc_7C6C6
loc_7C667:
cmp rax, [r14+300h]
jz short loc_7C693
mov rdi, [r14+278h]
mov esi, [r14+350h]
lea rdx, [r14+280h]
mov ecx, 1
call flush_key_blocks
mov rax, [r14+68h]
loc_7C693:
mov [r14+308h], rax
mov rax, [r14+70h]
mov [rbx+158h], rax
mov rax, [r14+78h]
mov [rbx+168h], rax
or byte ptr [rbx+1D0h], 4
mov dword ptr [rbx+1FCh], 1
mov eax, 1
loc_7C6C6:
pop rbx
pop r14
pop rbp
retn
| _BOOL8 mi_test_if_changed(long long *a1)
{
long long v1; // r14
long long v2; // rax
v1 = *a1;
v2 = *(_QWORD *)(*a1 + 104);
if ( v2 == *(_QWORD *)(*a1 + 776) && *(_QWORD *)(v1 + 112) == a1[43] && *(_QWORD *)(v1 + 120) == a1[45] )
return (a1[58] & 0x8E) != 2;
if ( v2 != *(_QWORD *)(v1 + 768) )
{
flush_key_blocks(*(_QWORD *)(v1 + 632), *(unsigned int *)(v1 + 848), v1 + 640, 1LL);
v2 = *(_QWORD *)(v1 + 104);
}
*(_QWORD *)(v1 + 776) = v2;
a1[43] = *(_QWORD *)(v1 + 112);
a1[45] = *(_QWORD *)(v1 + 120);
*((_BYTE *)a1 + 464) |= 4u;
*((_DWORD *)a1 + 127) = 1;
return 1LL;
}
| _mi_test_if_changed:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV R14,qword ptr [RDI]
MOV RAX,qword ptr [R14 + 0x68]
CMP RAX,qword ptr [R14 + 0x308]
JNZ 0x0017c667
MOV RCX,qword ptr [R14 + 0x70]
CMP RCX,qword ptr [RBX + 0x158]
JNZ 0x0017c667
MOV RCX,qword ptr [R14 + 0x78]
CMP RCX,qword ptr [RBX + 0x168]
JNZ 0x0017c667
MOV ECX,0x8e
AND ECX,dword ptr [RBX + 0x1d0]
XOR EAX,EAX
CMP ECX,0x2
SETNZ AL
JMP 0x0017c6c6
LAB_0017c667:
CMP RAX,qword ptr [R14 + 0x300]
JZ 0x0017c693
MOV RDI,qword ptr [R14 + 0x278]
MOV ESI,dword ptr [R14 + 0x350]
LEA RDX,[R14 + 0x280]
MOV ECX,0x1
CALL 0x00198709
MOV RAX,qword ptr [R14 + 0x68]
LAB_0017c693:
MOV qword ptr [R14 + 0x308],RAX
MOV RAX,qword ptr [R14 + 0x70]
MOV qword ptr [RBX + 0x158],RAX
MOV RAX,qword ptr [R14 + 0x78]
MOV qword ptr [RBX + 0x168],RAX
OR byte ptr [RBX + 0x1d0],0x4
MOV dword ptr [RBX + 0x1fc],0x1
MOV EAX,0x1
LAB_0017c6c6:
POP RBX
POP R14
POP RBP
RET
|
bool _mi_test_if_changed(long *param_1)
{
long lVar1;
long lVar2;
bool bVar3;
lVar1 = *param_1;
lVar2 = *(long *)(lVar1 + 0x68);
if (((lVar2 == *(long *)(lVar1 + 0x308)) && (*(long *)(lVar1 + 0x70) == param_1[0x2b])) &&
(*(long *)(lVar1 + 0x78) == param_1[0x2d])) {
bVar3 = (*(uint *)(param_1 + 0x3a) & 0x8e) != 2;
}
else {
if (lVar2 != *(long *)(lVar1 + 0x300)) {
flush_key_blocks(*(int8 *)(lVar1 + 0x278),*(int4 *)(lVar1 + 0x350),lVar1 + 0x280,1
);
lVar2 = *(long *)(lVar1 + 0x68);
}
*(long *)(lVar1 + 0x308) = lVar2;
param_1[0x2b] = *(long *)(lVar1 + 0x70);
param_1[0x2d] = *(long *)(lVar1 + 0x78);
*(byte *)(param_1 + 0x3a) = *(byte *)(param_1 + 0x3a) | 4;
*(int4 *)((long)param_1 + 0x1fc) = 1;
bVar3 = true;
}
return bVar3;
}
|
|
6,133 | my_uca_coll_init_utf8mb4 | eloqsql/strings/ctype-uca.c | static my_bool
my_uca_coll_init_utf8mb4(struct charset_info_st *cs, MY_CHARSET_LOADER *loader)
{
if (my_coll_init_uca(cs, loader))
return TRUE;
if (my_uca_collation_can_optimize_no_contractions(cs))
my_uca_handler_map(cs, &my_uca_package_utf8mb4,
&my_uca_package_no_contractions_utf8mb4);
return FALSE;
} | O3 | c | my_uca_coll_init_utf8mb4:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x5d014
movl %eax, %ecx
movb $0x1, %al
testb %cl, %cl
jne 0x5fd25
movzbl 0xb2(%rbx), %ecx
testq %rcx, %rcx
je 0x5fcd4
movq 0x60(%rbx), %rax
imulq $0x38, %rcx, %rcx
xorl %edx, %edx
cmpq $0x0, 0x18(%rax,%rdx)
jne 0x5fd23
addq $0x38, %rdx
cmpq %rdx, %rcx
jne 0x5fcc3
movq 0xc0(%rbx), %rcx
leaq 0x2ed7ae(%rip), %rdx # 0x34d490
cmpq (%rdx), %rcx
je 0x5fd06
leaq 0x2ed7c2(%rip), %rax # 0x34d4b0
cmpq 0x8(%rdx), %rcx
je 0x5fd0f
cmpq 0x10(%rdx), %rcx
je 0x5fd15
cmpq 0x18(%rdx), %rcx
jne 0x5fd23
addq $0x18, %rax
jmp 0x5fd19
leaq 0x2ed7a3(%rip), %rax # 0x34d4b0
jmp 0x5fd19
addq $0x8, %rax
jmp 0x5fd19
addq $0x10, %rax
movq (%rax), %rax
movq %rax, 0xc0(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| my_uca_coll_init_utf8mb4:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
call my_coll_init_uca
mov ecx, eax
mov al, 1
test cl, cl
jnz short loc_5FD25
movzx ecx, byte ptr [rbx+0B2h]
test rcx, rcx
jz short loc_5FCD4
mov rax, [rbx+60h]
imul rcx, 38h ; '8'
xor edx, edx
loc_5FCC3:
cmp qword ptr [rax+rdx+18h], 0
jnz short loc_5FD23
add rdx, 38h ; '8'
cmp rcx, rdx
jnz short loc_5FCC3
loc_5FCD4:
mov rcx, [rbx+0C0h]
lea rdx, my_uca_package_utf8mb4
cmp rcx, [rdx]
jz short loc_5FD06
lea rax, my_uca_package_no_contractions_utf8mb4
cmp rcx, [rdx+8]
jz short loc_5FD0F
cmp rcx, [rdx+10h]
jz short loc_5FD15
cmp rcx, [rdx+18h]
jnz short loc_5FD23
add rax, 18h
jmp short loc_5FD19
loc_5FD06:
lea rax, my_uca_package_no_contractions_utf8mb4
jmp short loc_5FD19
loc_5FD0F:
add rax, 8
jmp short loc_5FD19
loc_5FD15:
add rax, 10h
loc_5FD19:
mov rax, [rax]
mov [rbx+0C0h], rax
loc_5FD23:
xor eax, eax
loc_5FD25:
add rsp, 8
pop rbx
pop rbp
retn
| char my_uca_coll_init_utf8mb4(
long long a1,
long long ( **a2)(unsigned long long, unsigned long long, const char *))
{
char inited; // cl
char result; // al
long long v4; // rdx
long long ( **v5)(); // rcx
long long ( ***v6)(); // rax
inited = my_coll_init_uca(a1, a2);
result = 1;
if ( !inited )
{
if ( *(_BYTE *)(a1 + 178) )
{
v4 = 0LL;
while ( !*(_QWORD *)(*(_QWORD *)(a1 + 96) + v4 + 24) )
{
v4 += 56LL;
if ( 56LL * *(unsigned __int8 *)(a1 + 178) == v4 )
goto LABEL_6;
}
return 0;
}
LABEL_6:
v5 = *(long long ( ***)())(a1 + 192);
if ( v5 == my_uca_package_utf8mb4[0] )
{
v6 = my_uca_package_no_contractions_utf8mb4;
}
else if ( v5 == my_uca_package_utf8mb4[1] )
{
v6 = &my_uca_package_no_contractions_utf8mb4[1];
}
else if ( v5 == my_uca_package_utf8mb4[2] )
{
v6 = &my_uca_package_no_contractions_utf8mb4[2];
}
else
{
if ( v5 != my_uca_package_utf8mb4[3] )
return 0;
v6 = &my_uca_package_no_contractions_utf8mb4[3];
}
*(_QWORD *)(a1 + 192) = *v6;
return 0;
}
return result;
}
| my_uca_coll_init_utf8mb4:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
CALL 0x0015d014
MOV ECX,EAX
MOV AL,0x1
TEST CL,CL
JNZ 0x0015fd25
MOVZX ECX,byte ptr [RBX + 0xb2]
TEST RCX,RCX
JZ 0x0015fcd4
MOV RAX,qword ptr [RBX + 0x60]
IMUL RCX,RCX,0x38
XOR EDX,EDX
LAB_0015fcc3:
CMP qword ptr [RAX + RDX*0x1 + 0x18],0x0
JNZ 0x0015fd23
ADD RDX,0x38
CMP RCX,RDX
JNZ 0x0015fcc3
LAB_0015fcd4:
MOV RCX,qword ptr [RBX + 0xc0]
LEA RDX,[0x44d490]
CMP RCX,qword ptr [RDX]
JZ 0x0015fd06
LEA RAX,[0x44d4b0]
CMP RCX,qword ptr [RDX + 0x8]
JZ 0x0015fd0f
CMP RCX,qword ptr [RDX + 0x10]
JZ 0x0015fd15
CMP RCX,qword ptr [RDX + 0x18]
JNZ 0x0015fd23
ADD RAX,0x18
JMP 0x0015fd19
LAB_0015fd06:
LEA RAX,[0x44d4b0]
JMP 0x0015fd19
LAB_0015fd0f:
ADD RAX,0x8
JMP 0x0015fd19
LAB_0015fd15:
ADD RAX,0x10
LAB_0015fd19:
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBX + 0xc0],RAX
LAB_0015fd23:
XOR EAX,EAX
LAB_0015fd25:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int8 my_uca_coll_init_utf8mb4(long param_1)
{
int *puVar1;
char cVar2;
int **ppuVar3;
long lVar4;
cVar2 = my_coll_init_uca();
if (cVar2 != '\0') {
return 1;
}
if ((ulong)*(byte *)(param_1 + 0xb2) != 0) {
lVar4 = 0;
do {
if (*(long *)(*(long *)(param_1 + 0x60) + 0x18 + lVar4) != 0) {
return 0;
}
lVar4 = lVar4 + 0x38;
} while ((ulong)*(byte *)(param_1 + 0xb2) * 0x38 - lVar4 != 0);
}
puVar1 = *(int **)(param_1 + 0xc0);
if (puVar1 == my_uca_package_utf8mb4) {
ppuVar3 = &my_uca_package_no_contractions_utf8mb4;
}
else if (puVar1 == PTR_my_uca_collation_handler_nopad_utf8mb4_0044d498) {
ppuVar3 = &PTR_my_uca_collation_handler_nopad_no_contractions_utf8mb4_0044d4b8;
}
else if (puVar1 == PTR_my_uca_collation_handler_multilevel_utf8mb4_0044d4a0) {
ppuVar3 = &PTR_my_uca_collation_handler_multilevel_no_contractions_utf8mb4_0044d4c0;
}
else {
if (puVar1 != PTR_my_uca_collation_handler_nopad_multilevel_utf8mb4_0044d4a8) {
return 0;
}
ppuVar3 = &PTR_my_uca_collation_handler_nopad_multilevel_no_contractions_utf8mb4_0044d4c8;
}
*(int **)(param_1 + 0xc0) = *ppuVar3;
return 0;
}
|
|
6,134 | minja::Value::Value(char const*) | monkey531[P]llama/common/minja.hpp | Value(const char * v) : primitive_(std::string(v)) {} | O3 | cpp | minja::Value::Value(char const*):
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x215d2
leaq 0x40(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x80856
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9d010
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a890
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9d03b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a890
jmp 0x9d03b
movq %rax, %r14
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x9d049
callq 0x6e4bc
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x9d057
callq 0x6e4bc
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x9d065
callq 0x6e4bc
movq %rbx, %rdi
callq 0x88502
movq %r14, %rdi
callq 0x1af20
nop
| _ZN5minja5ValueC2EPKc:
push r14
push rbx
sub rsp, 28h
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi+30h], xmm0
movups xmmword ptr [rdi+20h], xmm0
movups xmmword ptr [rdi+10h], xmm0
movups xmmword ptr [rdi], xmm0
lea rdi, [rsp+38h+var_30]
lea rdx, [rsp+38h+var_31]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdi, [rbx+40h]
lea rsi, [rsp+38h+var_30]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_
lea rax, [rsp+38h+var_20]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9D010
mov rsi, [rsp+38h+var_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9D010:
add rsp, 28h
pop rbx
pop r14
retn
mov r14, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9D03B
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_9D03B
mov r14, rax
loc_9D03B:
mov rdi, [rbx+38h]
test rdi, rdi
jz short loc_9D049
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9D049:
mov rdi, [rbx+28h]
test rdi, rdi
jz short loc_9D057
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9D057:
mov rdi, [rbx+18h]
test rdi, rdi
jz short loc_9D065
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9D065:
mov rdi, rbx
call _ZNSt23enable_shared_from_thisIN5minja5ValueEED2Ev; std::enable_shared_from_this<minja::Value>::~enable_shared_from_this()
mov rdi, r14
call __Unwind_Resume
| void minja::Value::Value(minja::Value *this, const char *a2)
{
long long *v2; // [rsp+8h] [rbp-30h] BYREF
long long v3; // [rsp+18h] [rbp-20h] BYREF
*((_OWORD *)this + 3) = 0LL;
*((_OWORD *)this + 2) = 0LL;
*((_OWORD *)this + 1) = 0LL;
*(_OWORD *)this = 0LL;
std::string::basic_string<std::allocator<char>>(&v2, (long long)a2);
ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_((char *)this + 64);
if ( v2 != &v3 )
operator delete(v2, v3 + 1);
}
| Value:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x30],XMM0
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
MOVUPS xmmword ptr [RDI],XMM0
LAB_0019cfd8:
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x7]
CALL 0x001215d2
LEA RDI,[RBX + 0x40]
LAB_0019cfeb:
LEA RSI,[RSP + 0x8]
CALL 0x00180856
LAB_0019cff5:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0019d010
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011a890
LAB_0019d010:
ADD RSP,0x28
POP RBX
POP R14
RET
|
/* minja::Value::Value(char const*) */
void __thiscall minja::Value::Value(Value *this,char *param_1)
{
allocator local_31;
long *local_30 [2];
long local_20 [2];
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
/* try { // try from 0019cfd8 to 0019cfe6 has its CatchHandler @ 0019d038 */
std::__cxx11::string::string<std::allocator<char>>((string *)local_30,param_1,&local_31);
/* try { // try from 0019cfeb to 0019cff4 has its CatchHandler @ 0019d018 */
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_
(this + 0x40,local_30);
if (local_30[0] != local_20) {
operator_delete(local_30[0],local_20[0] + 1);
}
return;
}
|
|
6,135 | google::protobuf::UninterpretedOption::IsInitialized() const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/repeated_ptr_field.h | int size() const { return current_size_; } | O3 | c | google::protobuf::UninterpretedOption::IsInitialized() const:
movl 0x20(%rdi), %eax
movq 0x28(%rdi), %rcx
movl %eax, %edx
testl %eax, %eax
jle 0xf8327
movq (%rcx,%rax,8), %rsi
decq %rax
movl 0x10(%rsi), %esi
notl %esi
testb $0x3, %sil
je 0xf830f
testl %edx, %edx
setle %al
retq
nop
| _ZNK6google8protobuf19UninterpretedOption13IsInitializedEv:
mov eax, [rdi+20h]
mov rcx, [rdi+28h]
loc_F830F:
mov edx, eax
test eax, eax
jle short loc_F8327
mov rsi, [rcx+rax*8]
dec rax
mov esi, [rsi+10h]
not esi
test sil, 3
jz short loc_F830F
loc_F8327:
test edx, edx
setle al
retn
| bool google::protobuf::UninterpretedOption::IsInitialized(google::protobuf::UninterpretedOption *this)
{
long long v1; // rax
int v2; // edx
long long v3; // rsi
v1 = *((unsigned int *)this + 8);
do
{
v2 = v1;
if ( (int)v1 <= 0 )
break;
v3 = *(_QWORD *)(*((_QWORD *)this + 5) + 8 * v1--);
}
while ( (~*(_BYTE *)(v3 + 16) & 3) == 0 );
return v2 <= 0;
}
| IsInitialized:
MOV EAX,dword ptr [RDI + 0x20]
MOV RCX,qword ptr [RDI + 0x28]
LAB_001f830f:
MOV EDX,EAX
TEST EAX,EAX
JLE 0x001f8327
MOV RSI,qword ptr [RCX + RAX*0x8]
DEC RAX
MOV ESI,dword ptr [RSI + 0x10]
NOT ESI
TEST SIL,0x3
JZ 0x001f830f
LAB_001f8327:
TEST EDX,EDX
SETLE AL
RET
|
/* google::protobuf::UninterpretedOption::IsInitialized() const */
int8 __thiscall
google::protobuf::UninterpretedOption::IsInitialized(UninterpretedOption *this)
{
long lVar1;
int iVar2;
ulong uVar3;
uVar3 = (ulong)*(uint *)(this + 0x20);
do {
iVar2 = (int)uVar3;
if (iVar2 < 1) break;
lVar1 = uVar3 * 8;
uVar3 = uVar3 - 1;
} while ((~*(uint *)(*(long *)(*(long *)(this + 0x28) + lVar1) + 0x10) & 3) == 0);
return CONCAT71((int7)(uVar3 >> 8),iVar2 < 1);
}
|
|
6,136 | update_dynamic_record | eloqsql/storage/maria/ma_dynrec.c | static my_bool update_dynamic_record(MARIA_HA *info, MARIA_RECORD_POS filepos,
uchar *record, ulong reclength)
{
int flag;
uint error;
ulong length;
MARIA_BLOCK_INFO block_info;
DBUG_ENTER("update_dynamic_record");
flag=block_info.second_read=0;
/*
Check if we have enough room for the record.
First we do simplified check to make usual case faster.
Then we do more precise check for the space left.
Though it still is not absolutely precise, as
we always use MARIA_MAX_DYN_BLOCK_HEADER while it can be
less in the most of the cases.
*/
/*
compare with just the reclength as we're going
to get some space from the old replaced record
*/
if (unlikely(info->s->base.max_data_file_length -
info->state->data_file_length < reclength))
{
/* If new record isn't longer, we can go on safely */
if (info->cur_row.total_length < reclength)
{
if (info->s->base.max_data_file_length - info->state->data_file_length +
info->state->empty - info->state->del * MARIA_MAX_DYN_BLOCK_HEADER <
reclength - info->cur_row.total_length + MARIA_MAX_DYN_BLOCK_HEADER)
{
my_errno=HA_ERR_RECORD_FILE_FULL;
goto err;
}
}
}
/* Remember length for updated row if it's updated again */
info->cur_row.total_length= reclength;
while (reclength > 0)
{
if (filepos != info->s->state.dellink)
{
block_info.next_filepos= HA_OFFSET_ERROR;
if ((error= _ma_get_block_info(info, &block_info, info->dfile.file,
filepos))
& (BLOCK_DELETED | BLOCK_ERROR | BLOCK_SYNC_ERROR |
BLOCK_FATAL_ERROR))
{
DBUG_PRINT("error",("Got wrong block info"));
if (!(error & BLOCK_FATAL_ERROR))
_ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD);
goto err;
}
length=(ulong) (block_info.filepos-filepos) + block_info.block_len;
if (length < reclength)
{
uint tmp=MY_ALIGN(reclength - length + 3 +
MY_TEST(reclength >= 65520L), MARIA_DYN_ALIGN_SIZE);
/* Don't create a block bigger than MARIA_MAX_BLOCK_LENGTH */
tmp= MY_MIN(length+tmp, MARIA_MAX_BLOCK_LENGTH)-length;
/* Check if we can extend this block */
if (block_info.filepos + block_info.block_len ==
info->state->data_file_length &&
info->state->data_file_length <
info->s->base.max_data_file_length-tmp)
{
/* extend file */
DBUG_PRINT("info",("Extending file with %d bytes",tmp));
if (info->cur_row.nextpos == info->state->data_file_length)
info->cur_row.nextpos+= tmp;
info->state->data_file_length+= tmp;
info->update|= HA_STATE_WRITE_AT_END | HA_STATE_EXTEND_BLOCK;
length+=tmp;
}
else if (length < MARIA_MAX_BLOCK_LENGTH - MARIA_MIN_BLOCK_LENGTH)
{
/*
Check if next block is a deleted block
Above we have MARIA_MIN_BLOCK_LENGTH to avoid the problem where
the next block is so small it can't be splited which could
casue problems
*/
MARIA_BLOCK_INFO del_block;
del_block.second_read=0;
if (_ma_get_block_info(info, &del_block, info->dfile.file,
block_info.filepos + block_info.block_len) &
BLOCK_DELETED)
{
/* Use; Unlink it and extend the current block */
DBUG_PRINT("info",("Extending current block"));
if (unlink_deleted_block(info,&del_block))
goto err;
if ((length+=del_block.block_len) > MARIA_MAX_BLOCK_LENGTH)
{
/*
New block was too big, link overflow part back to
delete list
*/
my_off_t next_pos;
ulong rest_length= length-MARIA_MAX_BLOCK_LENGTH;
set_if_bigger(rest_length, MARIA_MIN_BLOCK_LENGTH);
next_pos= del_block.filepos+ del_block.block_len - rest_length;
if (update_backward_delete_link(info, info->s->state.dellink,
next_pos))
DBUG_RETURN(1);
/* create delete link for data that didn't fit into the page */
del_block.header[0]=0;
mi_int3store(del_block.header+1, rest_length);
mi_sizestore(del_block.header+4,info->s->state.dellink);
bfill(del_block.header+12,8,255);
if (info->s->file_write(info, del_block.header, 20,
next_pos, MYF(MY_NABP)))
DBUG_RETURN(1);
info->s->state.dellink= next_pos;
info->s->state.split++;
info->state->del++;
info->state->empty+= rest_length;
length-= rest_length;
}
}
}
}
}
else
{
if (_ma_find_writepos(info,reclength,&filepos,&length))
goto err;
}
if (_ma_write_part_record(info,filepos,length,block_info.next_filepos,
&record,&reclength,&flag))
goto err;
if ((filepos=block_info.next_filepos) == HA_OFFSET_ERROR)
{
/* Start writing data on deleted blocks */
filepos=info->s->state.dellink;
}
}
if (block_info.next_filepos != HA_OFFSET_ERROR)
if (delete_dynamic_record(info,block_info.next_filepos,1))
goto err;
DBUG_RETURN(0);
err:
DBUG_RETURN(1);
} | O3 | c | update_dynamic_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rcx, %r13
movq %rsi, %r14
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq %rsi, -0xf0(%rbp)
movq %rdx, -0x110(%rbp)
movq %rcx, -0x108(%rbp)
xorl %eax, %eax
movl %eax, -0x38(%rbp)
movl %eax, -0xf4(%rbp)
movq (%rdi), %rax
movq 0x20(%rdi), %rcx
movq 0x368(%rax), %rax
subq 0x28(%rcx), %rax
cmpq %r13, %rax
jb 0x3ea75
movq %r13, 0x110(%rbx)
leaq -0x108(%rbp), %r15
movq (%rbx), %rax
cmpq 0xc8(%rax), %r14
jne 0x3e779
movq %rbx, %rdi
movq %r13, %rsi
leaq -0xf0(%rbp), %rdx
leaq -0xe8(%rbp), %rcx
callq 0x411f5
testl %eax, %eax
jne 0x3ea52
movq -0xf0(%rbp), %r14
movq -0xe8(%rbp), %r12
jmp 0x3e9ca
movq $-0x1, -0x48(%rbp)
movl 0x480(%rbx), %edx
movq %rbx, %rdi
leaq -0x88(%rbp), %rsi
movq %r14, %rcx
callq 0x3f65c
cmpl $0x4, %eax
jae 0x3ea45
movq -0x60(%rbp), %rcx
movq -0x50(%rbp), %rax
movq %rax, %r12
subq %r14, %r12
addq %rcx, %r12
movq %r12, -0xe8(%rbp)
cmpq %r13, %r12
jae 0x3e9ca
addq %rax, %rcx
movq 0x20(%rbx), %rax
cmpq 0x28(%rax), %rcx
leaq -0xe0(%rbp), %rsi
jne 0x3e83e
cmpq $0xfff0, %r13 # imm = 0xFFF0
sbbl $-0x1, %r13d
subl %r12d, %r13d
addl $0x6, %r13d
andl $-0x4, %r13d
addq %r12, %r13
movl $0xfffffc, %edx # imm = 0xFFFFFC
cmpq %rdx, %r13
cmovaeq %rdx, %r13
subl %r12d, %r13d
movq (%rbx), %rdx
movq 0x368(%rdx), %rdx
subq %r13, %rdx
cmpq %rdx, %rcx
jae 0x3e83e
cmpq %rcx, 0xa0(%rbx)
jne 0x3e828
addq %r13, %rcx
movq %rcx, 0xa0(%rbx)
movq 0x28(%rax), %rcx
addq %r13, %rcx
movq %rcx, 0x28(%rax)
orb $0x9, 0x625(%rbx)
addq %r13, %r12
jmp 0x3e9c3
cmpq $0xffffe7, %r12 # imm = 0xFFFFE7
ja 0x3e9ca
movl $0x0, -0x90(%rbp)
movl 0x480(%rbx), %edx
movq %rbx, %rdi
movq %rsi, %r13
callq 0x3f65c
testb $0x4, %al
je 0x3e9ca
movq %rbx, %rdi
movq %r13, %rsi
callq 0x3fa6b
testb %al, %al
jne 0x3ea52
movq -0xb8(%rbp), %r13
addq %r13, %r12
movq %r12, -0xe8(%rbp)
cmpq $0xfffffd, %r12 # imm = 0xFFFFFD
jb 0x3e9ca
leaq -0xfffffc(%r12), %rcx
cmpq $0x15, %rcx
movl $0x14, %eax
cmovbq %rax, %rcx
movq %rcx, -0x100(%rbp)
subq %rcx, %r13
addq -0xa8(%rbp), %r13
movq (%rbx), %rax
movq 0xc8(%rax), %rsi
movq %rbx, %rdi
movq %r13, %rdx
callq 0x3fbab
testb %al, %al
jne 0x3ea52
movb $0x0, -0xe0(%rbp)
movq -0x100(%rbp), %rax
movb %al, -0xdd(%rbp)
movb %ah, -0xde(%rbp)
shrl $0x10, %eax
movb %al, -0xdf(%rbp)
movq (%rbx), %rax
movq 0xc8(%rax), %rcx
movq %rcx, %rdx
shrq $0x20, %rdx
movb %dl, -0xd9(%rbp)
movq %rcx, %rdx
shrq $0x28, %rdx
movb %dl, -0xda(%rbp)
movq %rcx, %rdx
shrq $0x30, %rdx
movb %dl, -0xdb(%rbp)
movq %rcx, %rdx
shrq $0x38, %rdx
movb %dl, -0xdc(%rbp)
movb %cl, -0xd5(%rbp)
movb %ch, -0xd6(%rbp)
movl %ecx, %edx
shrl $0x10, %edx
movb %dl, -0xd7(%rbp)
shrl $0x18, %ecx
movb %cl, -0xd8(%rbp)
movq $-0x1, -0xd4(%rbp)
movl $0x14, %edx
movl $0x4, %r8d
movq %rbx, %rdi
leaq -0xe0(%rbp), %rsi
movq %r13, %rcx
callq *0x6e8(%rax)
testq %rax, %rax
jne 0x3ea52
movq (%rbx), %rax
movq %r13, 0xc8(%rax)
movq (%rbx), %rax
incq 0xc0(%rax)
movq 0x20(%rbx), %rax
incq 0x8(%rax)
movq 0x20(%rbx), %rax
movq -0x100(%rbp), %rcx
addq %rcx, 0x10(%rax)
subq %rcx, %r12
movq %r12, -0xe8(%rbp)
movq -0x48(%rbp), %rcx
leaq -0xf4(%rbp), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
leaq -0x110(%rbp), %r8
movq %r15, %r9
callq 0x3ef5a
testl %eax, %eax
jne 0x3ea52
movq -0x48(%rbp), %rsi
movq %rsi, -0xf0(%rbp)
movq %rsi, %r14
cmpq $-0x1, %rsi
jne 0x3ea1a
movq (%rbx), %rax
movq 0xc8(%rax), %r14
movq %r14, -0xf0(%rbp)
movq -0x108(%rbp), %r13
testq %r13, %r13
jne 0x3e739
cmpq $-0x1, %rsi
je 0x3ea41
movq %rbx, %rdi
movl $0x1, %edx
callq 0x3ed6d
testb %al, %al
jne 0x3ea52
xorl %eax, %eax
jmp 0x3ea54
movq %rbx, %rdi
movl $0x7f, %esi
callq 0x38698
movb $0x1, %al
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x3eab8
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x110(%rbx), %rdx
cmpq %r13, %rdx
jae 0x3e72b
addq 0x10(%rcx), %rax
movq 0x8(%rcx), %rcx
shlq $0x2, %rcx
leaq (%rcx,%rcx,4), %rcx
subq %rcx, %rax
movq %r13, %rcx
subq %rdx, %rcx
addq $0x14, %rcx
cmpq %rcx, %rax
jae 0x3e72b
callq 0x85b0e
movl $0x87, (%rax)
jmp 0x3ea52
callq 0x272c0
| update_dynamic_record:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0F8h
mov r13, rcx
mov r14, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov [rbp+var_F0], rsi
mov [rbp+var_110], rdx
mov [rbp+var_108], rcx
xor eax, eax
mov [rbp+var_38], eax
mov [rbp+var_F4], eax
mov rax, [rdi]
mov rcx, [rdi+20h]
mov rax, [rax+368h]
sub rax, [rcx+28h]
cmp rax, r13
jb loc_3EA75
loc_3E72B:
mov [rbx+110h], r13
lea r15, [rbp+var_108]
loc_3E739:
mov rax, [rbx]
cmp r14, [rax+0C8h]
jnz short loc_3E779
mov rdi, rbx
mov rsi, r13
lea rdx, [rbp+var_F0]
lea rcx, [rbp+var_E8]
call _ma_find_writepos
test eax, eax
jnz loc_3EA52
mov r14, [rbp+var_F0]
mov r12, [rbp+var_E8]
jmp loc_3E9CA
loc_3E779:
mov [rbp+var_48], 0FFFFFFFFFFFFFFFFh
mov edx, [rbx+480h]
mov rdi, rbx
lea rsi, [rbp+var_88]
mov rcx, r14
call _ma_get_block_info
cmp eax, 4
jnb loc_3EA45
mov rcx, [rbp+var_60]
mov rax, [rbp+var_50]
mov r12, rax
sub r12, r14
add r12, rcx
mov [rbp+var_E8], r12
cmp r12, r13
jnb loc_3E9CA
add rcx, rax
mov rax, [rbx+20h]
cmp rcx, [rax+28h]
lea rsi, [rbp+var_E0]
jnz short loc_3E83E
cmp r13, 0FFF0h
sbb r13d, 0FFFFFFFFh
sub r13d, r12d
add r13d, 6
and r13d, 0FFFFFFFCh
add r13, r12
mov edx, 0FFFFFCh
cmp r13, rdx
cmovnb r13, rdx
sub r13d, r12d
mov rdx, [rbx]
mov rdx, [rdx+368h]
sub rdx, r13
cmp rcx, rdx
jnb short loc_3E83E
cmp [rbx+0A0h], rcx
jnz short loc_3E828
add rcx, r13
mov [rbx+0A0h], rcx
mov rcx, [rax+28h]
loc_3E828:
add rcx, r13
mov [rax+28h], rcx
or byte ptr [rbx+625h], 9
add r12, r13
jmp loc_3E9C3
loc_3E83E:
cmp r12, 0FFFFE7h
ja loc_3E9CA
mov [rbp+var_90], 0
mov edx, [rbx+480h]
mov rdi, rbx
mov r13, rsi
call _ma_get_block_info
test al, 4
jz loc_3E9CA
mov rdi, rbx
mov rsi, r13
call unlink_deleted_block
test al, al
jnz loc_3EA52
mov r13, [rbp+var_B8]
add r12, r13
mov [rbp+var_E8], r12
cmp r12, 0FFFFFDh
jb loc_3E9CA
lea rcx, [r12-0FFFFFCh]
cmp rcx, 15h
mov eax, 14h
cmovb rcx, rax
mov [rbp+var_100], rcx
sub r13, rcx
add r13, [rbp+var_A8]
mov rax, [rbx]
mov rsi, [rax+0C8h]
mov rdi, rbx
mov rdx, r13
call update_backward_delete_link
test al, al
jnz loc_3EA52
mov [rbp+var_E0], 0
mov rax, [rbp+var_100]
mov [rbp+var_DD], al
mov [rbp+var_DE], ah
shr eax, 10h
mov [rbp+var_DF], al
mov rax, [rbx]
mov rcx, [rax+0C8h]
mov rdx, rcx
shr rdx, 20h
mov [rbp+var_D9], dl
mov rdx, rcx
shr rdx, 28h
mov [rbp+var_DA], dl
mov rdx, rcx
shr rdx, 30h
mov [rbp+var_DB], dl
mov rdx, rcx
shr rdx, 38h
mov [rbp+var_DC], dl
mov [rbp+var_D5], cl
mov [rbp+var_D6], ch
mov edx, ecx
shr edx, 10h
mov [rbp+var_D7], dl
shr ecx, 18h
mov [rbp+var_D8], cl
mov [rbp+var_D4], 0FFFFFFFFFFFFFFFFh
mov edx, 14h
mov r8d, 4
mov rdi, rbx
lea rsi, [rbp+var_E0]
mov rcx, r13
call qword ptr [rax+6E8h]
test rax, rax
jnz loc_3EA52
mov rax, [rbx]
mov [rax+0C8h], r13
mov rax, [rbx]
inc qword ptr [rax+0C0h]
mov rax, [rbx+20h]
inc qword ptr [rax+8]
mov rax, [rbx+20h]
mov rcx, [rbp+var_100]
add [rax+10h], rcx
sub r12, rcx
loc_3E9C3:
mov [rbp+var_E8], r12
loc_3E9CA:
mov rcx, [rbp+var_48]
lea rax, [rbp+var_F4]
mov [rsp+120h+var_120], rax
mov rdi, rbx
mov rsi, r14
mov rdx, r12
lea r8, [rbp+var_110]
mov r9, r15
call _ma_write_part_record
test eax, eax
jnz short loc_3EA52
mov rsi, [rbp+var_48]
mov [rbp+var_F0], rsi
mov r14, rsi
cmp rsi, 0FFFFFFFFFFFFFFFFh
jnz short loc_3EA1A
mov rax, [rbx]
mov r14, [rax+0C8h]
mov [rbp+var_F0], r14
loc_3EA1A:
mov r13, [rbp+var_108]
test r13, r13
jnz loc_3E739
cmp rsi, 0FFFFFFFFFFFFFFFFh
jz short loc_3EA41
mov rdi, rbx
mov edx, 1
call delete_dynamic_record
test al, al
jnz short loc_3EA52
loc_3EA41:
xor eax, eax
jmp short loc_3EA54
loc_3EA45:
mov rdi, rbx
mov esi, 7Fh
call _ma_set_fatal_error
loc_3EA52:
mov al, 1
loc_3EA54:
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz short loc_3EAB8
add rsp, 0F8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3EA75:
mov rdx, [rbx+110h]
cmp rdx, r13
jnb loc_3E72B
add rax, [rcx+10h]
mov rcx, [rcx+8]
shl rcx, 2
lea rcx, [rcx+rcx*4]
sub rax, rcx
mov rcx, r13
sub rcx, rdx
add rcx, 14h
cmp rax, rcx
jnb loc_3E72B
call _my_thread_var
mov dword ptr [rax], 87h
jmp short loc_3EA52
loc_3EAB8:
call ___stack_chk_fail
| bool update_dynamic_record(_QWORD *a1, long long a2, long long a3, unsigned long long a4)
{
unsigned long long v4; // r13
long long v5; // r14
_QWORD *v6; // rcx
unsigned long long v7; // rax
unsigned long long v8; // r12
long long v9; // rdx
long long v10; // rcx
long long v11; // r8
int v12; // r9d
unsigned long long v13; // rcx
long long v14; // rax
unsigned long long v15; // r13
long long v16; // r13
long long v17; // rcx
long long v18; // r13
long long v19; // rax
long long v20; // rcx
long long v21; // rcx
unsigned long long v23; // rdx
long long v24; // [rsp+10h] [rbp-110h] BYREF
unsigned long long v25; // [rsp+18h] [rbp-108h] BYREF
long long v26; // [rsp+20h] [rbp-100h]
int v27; // [rsp+2Ch] [rbp-F4h] BYREF
long long v28; // [rsp+30h] [rbp-F0h] BYREF
unsigned long long v29; // [rsp+38h] [rbp-E8h] BYREF
_BYTE v30[12]; // [rsp+40h] [rbp-E0h] BYREF
long long v31; // [rsp+4Ch] [rbp-D4h]
long long v32; // [rsp+68h] [rbp-B8h]
long long v33; // [rsp+78h] [rbp-A8h]
int v34; // [rsp+90h] [rbp-90h]
char v35[40]; // [rsp+98h] [rbp-88h] BYREF
long long v36; // [rsp+C0h] [rbp-60h]
long long v37; // [rsp+D0h] [rbp-50h]
long long v38; // [rsp+D8h] [rbp-48h]
int v39; // [rsp+E8h] [rbp-38h]
unsigned long long v40; // [rsp+F0h] [rbp-30h]
v4 = a4;
v5 = a2;
v40 = __readfsqword(0x28u);
v28 = a2;
v24 = a3;
v25 = a4;
v39 = 0;
v27 = 0;
v6 = (_QWORD *)a1[4];
v7 = *(_QWORD *)(*a1 + 872LL) - v6[5];
if ( v7 < v4 )
{
v23 = a1[34];
if ( v23 < v4 && v6[2] + v7 - 20LL * v6[1] < v4 - v23 + 20 )
{
*(_DWORD *)my_thread_var(a1) = 135;
return 1;
}
}
a1[34] = v4;
do
{
if ( v5 == *(_QWORD *)(*a1 + 200LL) )
{
if ( (unsigned int)ma_find_writepos(a1, v4, &v28, &v29) )
return 1;
LODWORD(v5) = v28;
LODWORD(v8) = v29;
goto LABEL_25;
}
v38 = -1LL;
if ( (unsigned int)ma_get_block_info(a1, v35, *((unsigned int *)a1 + 288), v5) >= 4 )
{
ma_set_fatal_error(a1, 127, v9, v10, v11, v12);
return 1;
}
v8 = v36 + v37 - v5;
v29 = v8;
if ( v8 < v4 )
{
v13 = v37 + v36;
v14 = a1[4];
if ( v37 + v36 == *(_QWORD *)(v14 + 40) )
{
v15 = v8 + (((_DWORD)v4 - ((v4 < 0xFFF0) - 1) - (_DWORD)v8 + 6) & 0xFFFFFFFC);
if ( v15 >= 0xFFFFFC )
LODWORD(v15) = 16777212;
v16 = (unsigned int)(v15 - v8);
if ( v13 < *(_QWORD *)(*a1 + 872LL) - v16 )
{
if ( a1[20] == v13 )
{
a1[20] = v16 + v13;
v13 = *(_QWORD *)(v14 + 40);
}
*(_QWORD *)(v14 + 40) = v16 + v13;
*((_BYTE *)a1 + 1573) |= 9u;
v8 += v16;
LABEL_24:
v29 = v8;
goto LABEL_25;
}
}
if ( v8 <= 0xFFFFE7 )
{
v34 = 0;
if ( (ma_get_block_info(a1, v30, *((unsigned int *)a1 + 288), v13) & 4) != 0 )
{
if ( (unsigned __int8)unlink_deleted_block(a1, v30) )
return 1;
v8 += v32;
v29 = v8;
if ( v8 >= 0xFFFFFD )
{
v17 = v8 - 16777212;
if ( v8 - 16777212 < 0x15 )
v17 = 20LL;
v26 = v17;
v18 = v33 + v32 - v17;
if ( (unsigned __int8)update_backward_delete_link(a1, *(_QWORD *)(*a1 + 200LL), v18) )
return 1;
v30[0] = 0;
v30[2] = BYTE1(v26);
v30[3] = v26;
v30[1] = BYTE2(v26);
v19 = *a1;
v20 = *(_QWORD *)(*a1 + 200LL);
v30[7] = BYTE4(v20);
v30[6] = BYTE5(v20);
v30[5] = BYTE6(v20);
v30[4] = HIBYTE(v20);
v30[10] = BYTE1(v20);
v30[11] = v20;
v30[9] = BYTE2(v20);
v30[8] = BYTE3(v20);
v31 = -1LL;
if ( (*(long long ( **)(_QWORD *, _BYTE *, long long, long long, long long))(v19 + 1768))(
a1,
v30,
20LL,
v18,
4LL) )
{
return 1;
}
*(_QWORD *)(*a1 + 200LL) = v18;
++*(_QWORD *)(*a1 + 192LL);
++*(_QWORD *)(a1[4] + 8LL);
v21 = v26;
*(_QWORD *)(a1[4] + 16LL) += v26;
v8 -= v21;
goto LABEL_24;
}
}
}
}
LABEL_25:
if ( (unsigned int)ma_write_part_record(
(_DWORD)a1,
v5,
v8,
v38,
(unsigned int)&v24,
(unsigned int)&v25,
(long long)&v27) )
return 1;
v28 = v38;
v5 = v38;
if ( v38 == -1 )
{
v5 = *(_QWORD *)(*a1 + 200LL);
v28 = v5;
}
v4 = v25;
}
while ( v25 );
return v38 != -1 && (unsigned __int8)delete_dynamic_record(a1, v38, 1LL);
}
| update_dynamic_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xf8
MOV R13,RCX
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV qword ptr [RBP + -0xf0],RSI
MOV qword ptr [RBP + -0x110],RDX
MOV qword ptr [RBP + -0x108],RCX
XOR EAX,EAX
MOV dword ptr [RBP + -0x38],EAX
MOV dword ptr [RBP + -0xf4],EAX
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x20]
MOV RAX,qword ptr [RAX + 0x368]
SUB RAX,qword ptr [RCX + 0x28]
CMP RAX,R13
JC 0x0013ea75
LAB_0013e72b:
MOV qword ptr [RBX + 0x110],R13
LEA R15,[RBP + -0x108]
LAB_0013e739:
MOV RAX,qword ptr [RBX]
CMP R14,qword ptr [RAX + 0xc8]
JNZ 0x0013e779
MOV RDI,RBX
MOV RSI,R13
LEA RDX,[RBP + -0xf0]
LEA RCX,[RBP + -0xe8]
CALL 0x001411f5
TEST EAX,EAX
JNZ 0x0013ea52
MOV R14,qword ptr [RBP + -0xf0]
MOV R12,qword ptr [RBP + -0xe8]
JMP 0x0013e9ca
LAB_0013e779:
MOV qword ptr [RBP + -0x48],-0x1
MOV EDX,dword ptr [RBX + 0x480]
MOV RDI,RBX
LEA RSI,[RBP + -0x88]
MOV RCX,R14
CALL 0x0013f65c
CMP EAX,0x4
JNC 0x0013ea45
MOV RCX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x50]
MOV R12,RAX
SUB R12,R14
ADD R12,RCX
MOV qword ptr [RBP + -0xe8],R12
CMP R12,R13
JNC 0x0013e9ca
ADD RCX,RAX
MOV RAX,qword ptr [RBX + 0x20]
CMP RCX,qword ptr [RAX + 0x28]
LEA RSI,[RBP + -0xe0]
JNZ 0x0013e83e
CMP R13,0xfff0
SBB R13D,-0x1
SUB R13D,R12D
ADD R13D,0x6
AND R13D,0xfffffffc
ADD R13,R12
MOV EDX,0xfffffc
CMP R13,RDX
CMOVNC R13,RDX
SUB R13D,R12D
MOV RDX,qword ptr [RBX]
MOV RDX,qword ptr [RDX + 0x368]
SUB RDX,R13
CMP RCX,RDX
JNC 0x0013e83e
CMP qword ptr [RBX + 0xa0],RCX
JNZ 0x0013e828
ADD RCX,R13
MOV qword ptr [RBX + 0xa0],RCX
MOV RCX,qword ptr [RAX + 0x28]
LAB_0013e828:
ADD RCX,R13
MOV qword ptr [RAX + 0x28],RCX
OR byte ptr [RBX + 0x625],0x9
ADD R12,R13
JMP 0x0013e9c3
LAB_0013e83e:
CMP R12,0xffffe7
JA 0x0013e9ca
MOV dword ptr [RBP + -0x90],0x0
MOV EDX,dword ptr [RBX + 0x480]
MOV RDI,RBX
MOV R13,RSI
CALL 0x0013f65c
TEST AL,0x4
JZ 0x0013e9ca
MOV RDI,RBX
MOV RSI,R13
CALL 0x0013fa6b
TEST AL,AL
JNZ 0x0013ea52
MOV R13,qword ptr [RBP + -0xb8]
ADD R12,R13
MOV qword ptr [RBP + -0xe8],R12
CMP R12,0xfffffd
JC 0x0013e9ca
LEA RCX,[R12 + -0xfffffc]
CMP RCX,0x15
MOV EAX,0x14
CMOVC RCX,RAX
MOV qword ptr [RBP + -0x100],RCX
SUB R13,RCX
ADD R13,qword ptr [RBP + -0xa8]
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [RAX + 0xc8]
MOV RDI,RBX
MOV RDX,R13
CALL 0x0013fbab
TEST AL,AL
JNZ 0x0013ea52
MOV byte ptr [RBP + -0xe0],0x0
MOV RAX,qword ptr [RBP + -0x100]
MOV byte ptr [RBP + -0xdd],AL
MOV byte ptr [RBP + -0xde],AH
SHR EAX,0x10
MOV byte ptr [RBP + -0xdf],AL
MOV RAX,qword ptr [RBX]
MOV RCX,qword ptr [RAX + 0xc8]
MOV RDX,RCX
SHR RDX,0x20
MOV byte ptr [RBP + -0xd9],DL
MOV RDX,RCX
SHR RDX,0x28
MOV byte ptr [RBP + -0xda],DL
MOV RDX,RCX
SHR RDX,0x30
MOV byte ptr [RBP + -0xdb],DL
MOV RDX,RCX
SHR RDX,0x38
MOV byte ptr [RBP + -0xdc],DL
MOV byte ptr [RBP + -0xd5],CL
MOV byte ptr [RBP + -0xd6],CH
MOV EDX,ECX
SHR EDX,0x10
MOV byte ptr [RBP + -0xd7],DL
SHR ECX,0x18
MOV byte ptr [RBP + -0xd8],CL
MOV qword ptr [RBP + -0xd4],-0x1
MOV EDX,0x14
MOV R8D,0x4
MOV RDI,RBX
LEA RSI,[RBP + -0xe0]
MOV RCX,R13
CALL qword ptr [RAX + 0x6e8]
TEST RAX,RAX
JNZ 0x0013ea52
MOV RAX,qword ptr [RBX]
MOV qword ptr [RAX + 0xc8],R13
MOV RAX,qword ptr [RBX]
INC qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RBX + 0x20]
INC qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBX + 0x20]
MOV RCX,qword ptr [RBP + -0x100]
ADD qword ptr [RAX + 0x10],RCX
SUB R12,RCX
LAB_0013e9c3:
MOV qword ptr [RBP + -0xe8],R12
LAB_0013e9ca:
MOV RCX,qword ptr [RBP + -0x48]
LEA RAX,[RBP + -0xf4]
MOV qword ptr [RSP],RAX
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R12
LEA R8,[RBP + -0x110]
MOV R9,R15
CALL 0x0013ef5a
TEST EAX,EAX
JNZ 0x0013ea52
MOV RSI,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0xf0],RSI
MOV R14,RSI
CMP RSI,-0x1
JNZ 0x0013ea1a
MOV RAX,qword ptr [RBX]
MOV R14,qword ptr [RAX + 0xc8]
MOV qword ptr [RBP + -0xf0],R14
LAB_0013ea1a:
MOV R13,qword ptr [RBP + -0x108]
TEST R13,R13
JNZ 0x0013e739
CMP RSI,-0x1
JZ 0x0013ea41
MOV RDI,RBX
MOV EDX,0x1
CALL 0x0013ed6d
TEST AL,AL
JNZ 0x0013ea52
LAB_0013ea41:
XOR EAX,EAX
JMP 0x0013ea54
LAB_0013ea45:
MOV RDI,RBX
MOV ESI,0x7f
CALL 0x00138698
LAB_0013ea52:
MOV AL,0x1
LAB_0013ea54:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x0013eab8
ADD RSP,0xf8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013ea75:
MOV RDX,qword ptr [RBX + 0x110]
CMP RDX,R13
JNC 0x0013e72b
ADD RAX,qword ptr [RCX + 0x10]
MOV RCX,qword ptr [RCX + 0x8]
SHL RCX,0x2
LEA RCX,[RCX + RCX*0x4]
SUB RAX,RCX
MOV RCX,R13
SUB RCX,RDX
ADD RCX,0x14
CMP RAX,RCX
JNC 0x0013e72b
CALL 0x00185b0e
MOV dword ptr [RAX],0x87
JMP 0x0013ea52
LAB_0013eab8:
CALL 0x001272c0
|
int8 update_dynamic_record(long *param_1,long param_2,int8 param_3,ulong param_4)
{
char cVar1;
int iVar2;
uint uVar3;
ulong uVar4;
long lVar5;
int8 uVar6;
int4 *puVar7;
ulong uVar8;
ulong uVar9;
long lVar10;
long lVar11;
long in_FS_OFFSET;
int8 local_118;
ulong local_110;
ulong local_108;
int4 local_fc;
long local_f8;
ulong local_f0;
int1 local_e8;
int1 local_e7;
int1 local_e6;
int1 local_e5;
int1 local_e4;
int1 local_e3;
int1 local_e2;
int1 local_e1;
int1 local_e0;
int1 local_df;
int1 local_de;
int1 local_dd;
int8 local_dc;
long local_c0;
long local_b0;
int4 local_98;
int1 local_90 [40];
long local_68;
long local_58;
long local_50;
int4 local_40;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
local_40 = 0;
local_fc = 0;
lVar11 = param_1[4];
uVar4 = *(long *)(*param_1 + 0x368) - *(long *)(lVar11 + 0x28);
local_f8 = param_2;
local_118 = param_3;
local_110 = param_4;
if (((uVar4 < param_4) && ((ulong)param_1[0x22] < param_4)) &&
(uVar4 + *(long *)(lVar11 + 0x10) + *(long *)(lVar11 + 8) * -0x14 <
(param_4 - param_1[0x22]) + 0x14)) {
puVar7 = (int4 *)_my_thread_var();
*puVar7 = 0x87;
}
else {
param_1[0x22] = param_4;
do {
lVar11 = local_f8;
uVar4 = local_110;
if (local_f8 == *(long *)(*param_1 + 200)) {
iVar2 = _ma_find_writepos(param_1,local_110,&local_f8,&local_f0);
uVar9 = local_f0;
lVar11 = local_f8;
if (iVar2 != 0) goto LAB_0013ea52;
}
else {
local_50 = -1;
uVar3 = _ma_get_block_info(param_1,local_90,(int)param_1[0x90],local_f8);
if (3 < uVar3) {
_ma_set_fatal_error(param_1,0x7f);
goto LAB_0013ea52;
}
uVar9 = (local_58 - lVar11) + local_68;
local_f0 = uVar9;
if (uVar9 < uVar4) {
uVar8 = local_68 + local_58;
lVar10 = param_1[4];
if (uVar8 == *(ulong *)(lVar10 + 0x28)) {
uVar4 = ((((int)uVar4 - (uint)(uVar4 < 0xfff0)) - (int)uVar9) + 7 & 0xfffffffc) + uVar9;
if (0xfffffb < uVar4) {
uVar4 = 0xfffffc;
}
uVar4 = (ulong)(uint)((int)uVar4 - (int)uVar9);
if (uVar8 < *(long *)(*param_1 + 0x368) - uVar4) {
if (param_1[0x14] == uVar8) {
param_1[0x14] = uVar8 + uVar4;
uVar8 = *(ulong *)(lVar10 + 0x28);
}
*(ulong *)(lVar10 + 0x28) = uVar8 + uVar4;
*(byte *)((long)param_1 + 0x625) = *(byte *)((long)param_1 + 0x625) | 9;
local_f0 = uVar9 + uVar4;
uVar9 = local_f0;
goto LAB_0013e9ca;
}
}
if (uVar9 < 0xffffe8) {
local_98 = 0;
uVar4 = _ma_get_block_info(param_1,&local_e8,(int)param_1[0x90]);
if ((uVar4 & 4) != 0) {
cVar1 = unlink_deleted_block(param_1,&local_e8);
if (cVar1 != '\0') goto LAB_0013ea52;
uVar9 = uVar9 + local_c0;
local_f0 = uVar9;
if (0xfffffc < uVar9) {
local_108 = uVar9 - 0xfffffc;
if (local_108 < 0x15) {
local_108 = 0x14;
}
lVar10 = (local_c0 - local_108) + local_b0;
cVar1 = update_backward_delete_link(param_1,*(int8 *)(*param_1 + 200),lVar10);
if (cVar1 != '\0') goto LAB_0013ea52;
local_e8 = 0;
local_e5 = (int1)local_108;
local_e6 = (int1)(local_108 >> 8);
local_e7 = (int1)(local_108 >> 0x10);
uVar6 = *(int8 *)(*param_1 + 200);
local_e1 = (int1)((ulong)uVar6 >> 0x20);
local_e2 = (int1)((ulong)uVar6 >> 0x28);
local_e3 = (int1)((ulong)uVar6 >> 0x30);
local_e4 = (int1)((ulong)uVar6 >> 0x38);
local_dd = (int1)uVar6;
local_de = (int1)((ulong)uVar6 >> 8);
local_df = (int1)((ulong)uVar6 >> 0x10);
local_e0 = (int1)((ulong)uVar6 >> 0x18);
local_dc = 0xffffffffffffffff;
lVar5 = (**(code **)(*param_1 + 0x6e8))(param_1,&local_e8,0x14,lVar10,4);
if (lVar5 != 0) goto LAB_0013ea52;
*(long *)(*param_1 + 200) = lVar10;
*(long *)(*param_1 + 0xc0) = *(long *)(*param_1 + 0xc0) + 1;
*(long *)(param_1[4] + 8) = *(long *)(param_1[4] + 8) + 1;
*(long *)(param_1[4] + 0x10) = *(long *)(param_1[4] + 0x10) + local_108;
local_f0 = uVar9 - local_108;
uVar9 = local_f0;
}
}
}
}
}
LAB_0013e9ca:
iVar2 = _ma_write_part_record(param_1,lVar11,uVar9,local_50,&local_118,&local_110,&local_fc);
if (iVar2 != 0) goto LAB_0013ea52;
local_f8 = local_50;
if (local_50 == -1) {
local_f8 = *(long *)(*param_1 + 200);
}
} while (local_110 != 0);
if ((local_50 == -1) || (cVar1 = delete_dynamic_record(param_1,local_50,1), cVar1 == '\0')) {
uVar6 = 0;
goto LAB_0013ea54;
}
}
LAB_0013ea52:
uVar6 = 1;
LAB_0013ea54:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar6;
}
|
|
6,137 | my_printv_error | eloqsql/mysys/my_error.c | void my_printv_error(uint error, const char *format, myf MyFlags, va_list ap)
{
char ebuff[ERRMSGSIZE];
DBUG_ENTER("my_printv_error");
DBUG_PRINT("my", ("nr: %d MyFlags: %lu errno: %d format: %s",
error, MyFlags, errno, format));
(void) my_vsnprintf(ebuff, sizeof(ebuff), format, ap);
(*error_handler_hook)(error, ebuff, MyFlags);
DBUG_VOID_RETURN;
} | O3 | c | my_printv_error:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x208, %rsp # imm = 0x208
movq %rdx, %rbx
movq %rsi, %rdx
movl %edi, %r14d
movq %fs:0x28, %rax
movq %rax, -0x20(%rbp)
leaq -0x220(%rbp), %r15
movl $0x200, %esi # imm = 0x200
movq %r15, %rdi
callq 0xd6f59
leaq 0x2e775b(%rip), %rax # 0x385b40
movl %r14d, %edi
movq %r15, %rsi
movq %rbx, %rdx
callq *(%rax)
movq %fs:0x28, %rax
cmpq -0x20(%rbp), %rax
jne 0x9e40d
addq $0x208, %rsp # imm = 0x208
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x29260
| my_printv_error:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 208h
mov rbx, rdx
mov rdx, rsi
mov r14d, edi
mov rax, fs:28h
mov [rbp+var_20], rax
lea r15, [rbp+var_220]
mov esi, 200h
mov rdi, r15
call my_vsnprintf
lea rax, error_handler_hook
mov edi, r14d
mov rsi, r15
mov rdx, rbx
call qword ptr [rax]
mov rax, fs:28h
cmp rax, [rbp+var_20]
jnz short loc_9E40D
add rsp, 208h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_9E40D:
call ___stack_chk_fail
| unsigned long long my_printv_error(long long a1, long long a2)
{
_BYTE v3[512]; // [rsp+0h] [rbp-220h] BYREF
unsigned long long v4; // [rsp+200h] [rbp-20h]
v4 = __readfsqword(0x28u);
my_vsnprintf(v3, 512LL, a2);
error_handler_hook();
return __readfsqword(0x28u);
}
| my_printv_error:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x208
MOV RBX,RDX
MOV RDX,RSI
MOV R14D,EDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x20],RAX
LEA R15,[RBP + -0x220]
MOV ESI,0x200
MOV RDI,R15
CALL 0x001d6f59
LEA RAX,[0x485b40]
MOV EDI,R14D
MOV RSI,R15
MOV RDX,RBX
CALL qword ptr [RAX]
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x0019e40d
ADD RSP,0x208
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0019e40d:
CALL 0x00129260
|
void my_printv_error(int4 param_1,int8 param_2,int8 param_3)
{
long in_FS_OFFSET;
int1 local_228 [512];
long local_28;
local_28 = *(long *)(in_FS_OFFSET + 0x28);
my_vsnprintf(local_228,0x200,param_2);
(*(code *)error_handler_hook)(param_1,local_228,param_3);
if (*(long *)(in_FS_OFFSET + 0x28) == local_28) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
6,138 | plutovg_font_face_get_metrics | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-truetype.h | STBTT_DEF float stbtt_ScaleForMappingEmToPixels(const stbtt_fontinfo *info, float pixels)
{
int unitsPerEm = ttUSHORT(info->data + info->head + 18);
return pixels / unitsPerEm;
} | O1 | c | plutovg_font_face_get_metrics:
movq 0x28(%rdi), %rax
movslq 0x3c(%rdi), %r9
movzwl 0x12(%rax,%r9), %eax
rolw $0x8, %ax
movzwl %ax, %eax
cvtsi2ss %eax, %xmm1
divss %xmm1, %xmm0
testq %rsi, %rsi
je 0x5066
xorps %xmm1, %xmm1
cvtsi2ssl 0x4(%rdi), %xmm1
mulss %xmm0, %xmm1
movss %xmm1, (%rsi)
testq %rdx, %rdx
je 0x507b
xorps %xmm1, %xmm1
cvtsi2ssl 0x8(%rdi), %xmm1
mulss %xmm0, %xmm1
movss %xmm1, (%rdx)
testq %rcx, %rcx
je 0x5090
xorps %xmm1, %xmm1
cvtsi2ssl 0xc(%rdi), %xmm1
mulss %xmm0, %xmm1
movss %xmm1, (%rcx)
testq %r8, %r8
je 0x50f2
movl 0x10(%rdi), %eax
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
mulss %xmm0, %xmm1
movss %xmm1, (%r8)
movl 0x1c(%rdi), %ecx
xorps %xmm1, %xmm1
cvtsi2ss %ecx, %xmm1
movaps 0x1e1c7(%rip), %xmm2 # 0x23280
xorps %xmm0, %xmm2
mulss %xmm2, %xmm1
movss %xmm1, 0x4(%r8)
movl 0x18(%rdi), %edx
subl %eax, %edx
xorps %xmm1, %xmm1
cvtsi2ss %edx, %xmm1
mulss %xmm0, %xmm1
movss %xmm1, 0x8(%r8)
movl 0x14(%rdi), %eax
subl %ecx, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
mulss %xmm2, %xmm0
movss %xmm0, 0xc(%r8)
retq
| plutovg_font_face_get_metrics:
mov rax, [rdi+28h]
movsxd r9, dword ptr [rdi+3Ch]
movzx eax, word ptr [rax+r9+12h]
rol ax, 8
movzx eax, ax
cvtsi2ss xmm1, eax
divss xmm0, xmm1
test rsi, rsi
jz short loc_5066
xorps xmm1, xmm1
cvtsi2ss xmm1, dword ptr [rdi+4]
mulss xmm1, xmm0
movss dword ptr [rsi], xmm1
loc_5066:
test rdx, rdx
jz short loc_507B
xorps xmm1, xmm1
cvtsi2ss xmm1, dword ptr [rdi+8]
mulss xmm1, xmm0
movss dword ptr [rdx], xmm1
loc_507B:
test rcx, rcx
jz short loc_5090
xorps xmm1, xmm1
cvtsi2ss xmm1, dword ptr [rdi+0Ch]
mulss xmm1, xmm0
movss dword ptr [rcx], xmm1
loc_5090:
test r8, r8
jz short locret_50F2
mov eax, [rdi+10h]
xorps xmm1, xmm1
cvtsi2ss xmm1, eax
mulss xmm1, xmm0
movss dword ptr [r8], xmm1
mov ecx, [rdi+1Ch]
xorps xmm1, xmm1
cvtsi2ss xmm1, ecx
movaps xmm2, cs:xmmword_23280
xorps xmm2, xmm0
mulss xmm1, xmm2
movss dword ptr [r8+4], xmm1
mov edx, [rdi+18h]
sub edx, eax
xorps xmm1, xmm1
cvtsi2ss xmm1, edx
mulss xmm1, xmm0
movss dword ptr [r8+8], xmm1
mov eax, [rdi+14h]
sub eax, ecx
xorps xmm0, xmm0
cvtsi2ss xmm0, eax
mulss xmm0, xmm2
movss dword ptr [r8+0Ch], xmm0
locret_50F2:
retn
| long long plutovg_font_face_get_metrics(long long a1, float *a2, float *a3, float *a4, float *a5, float a6)
{
long long result; // rax
float v7; // xmm0_4
int v8; // eax
int v9; // ecx
result = (unsigned __int16)__ROL2__(*(_WORD *)(*(_QWORD *)(a1 + 40) + *(int *)(a1 + 60) + 18LL), 8);
v7 = a6 / (float)(unsigned __int16)result;
if ( a2 )
*a2 = (float)*(int *)(a1 + 4) * v7;
if ( a3 )
*a3 = (float)*(int *)(a1 + 8) * v7;
if ( a4 )
*a4 = (float)*(int *)(a1 + 12) * v7;
if ( a5 )
{
v8 = *(_DWORD *)(a1 + 16);
*a5 = (float)v8 * v7;
v9 = *(_DWORD *)(a1 + 28);
a5[1] = (float)v9 * (float)-v7;
a5[2] = (float)(*(_DWORD *)(a1 + 24) - v8) * v7;
result = (unsigned int)(*(_DWORD *)(a1 + 20) - v9);
a5[3] = (float)(int)result * (float)-v7;
}
return result;
}
| plutovg_font_face_get_metrics:
MOV RAX,qword ptr [RDI + 0x28]
MOVSXD R9,dword ptr [RDI + 0x3c]
MOVZX EAX,word ptr [RAX + R9*0x1 + 0x12]
ROL AX,0x8
MOVZX EAX,AX
CVTSI2SS XMM1,EAX
DIVSS XMM0,XMM1
TEST RSI,RSI
JZ 0x00105066
XORPS XMM1,XMM1
CVTSI2SS XMM1,dword ptr [RDI + 0x4]
MULSS XMM1,XMM0
MOVSS dword ptr [RSI],XMM1
LAB_00105066:
TEST RDX,RDX
JZ 0x0010507b
XORPS XMM1,XMM1
CVTSI2SS XMM1,dword ptr [RDI + 0x8]
MULSS XMM1,XMM0
MOVSS dword ptr [RDX],XMM1
LAB_0010507b:
TEST RCX,RCX
JZ 0x00105090
XORPS XMM1,XMM1
CVTSI2SS XMM1,dword ptr [RDI + 0xc]
MULSS XMM1,XMM0
MOVSS dword ptr [RCX],XMM1
LAB_00105090:
TEST R8,R8
JZ 0x001050f2
MOV EAX,dword ptr [RDI + 0x10]
XORPS XMM1,XMM1
CVTSI2SS XMM1,EAX
MULSS XMM1,XMM0
MOVSS dword ptr [R8],XMM1
MOV ECX,dword ptr [RDI + 0x1c]
XORPS XMM1,XMM1
CVTSI2SS XMM1,ECX
MOVAPS XMM2,xmmword ptr [0x00123280]
XORPS XMM2,XMM0
MULSS XMM1,XMM2
MOVSS dword ptr [R8 + 0x4],XMM1
MOV EDX,dword ptr [RDI + 0x18]
SUB EDX,EAX
XORPS XMM1,XMM1
CVTSI2SS XMM1,EDX
MULSS XMM1,XMM0
MOVSS dword ptr [R8 + 0x8],XMM1
MOV EAX,dword ptr [RDI + 0x14]
SUB EAX,ECX
XORPS XMM0,XMM0
CVTSI2SS XMM0,EAX
MULSS XMM0,XMM2
MOVSS dword ptr [R8 + 0xc],XMM0
LAB_001050f2:
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void plutovg_font_face_get_metrics
(float param_1,long param_2,float *param_3,float *param_4,float *param_5,
float *param_6)
{
ushort uVar1;
int iVar2;
int iVar3;
float fVar4;
uVar1 = *(ushort *)(*(long *)(param_2 + 0x28) + 0x12 + (long)*(int *)(param_2 + 0x3c));
param_1 = param_1 / (float)(ushort)(uVar1 << 8 | uVar1 >> 8);
if (param_3 != (float *)0x0) {
*param_3 = (float)*(int *)(param_2 + 4) * param_1;
}
if (param_4 != (float *)0x0) {
*param_4 = (float)*(int *)(param_2 + 8) * param_1;
}
if (param_5 != (float *)0x0) {
*param_5 = (float)*(int *)(param_2 + 0xc) * param_1;
}
if (param_6 != (float *)0x0) {
iVar2 = *(int *)(param_2 + 0x10);
*param_6 = (float)iVar2 * param_1;
iVar3 = *(int *)(param_2 + 0x1c);
fVar4 = (float)(_DAT_00123280 ^ (uint)param_1);
param_6[1] = (float)iVar3 * fVar4;
param_6[2] = (float)(*(int *)(param_2 + 0x18) - iVar2) * param_1;
param_6[3] = (float)(*(int *)(param_2 + 0x14) - iVar3) * fVar4;
}
return;
}
|
|
6,139 | to_printable_8bit | eloqsql/strings/ctype.c | static uint to_printable_8bit(uchar *dst, my_wc_t wc, uint bs)
{
/*
This function is used only in context of error messages for now.
All non-BMP characters are currently replaced to question marks
when a message is put into diagnostics area.
*/
DBUG_ASSERT(wc < 0x10000);
*dst++= (char) bs;
*dst++= _dig_vec_upper[(wc >> 12) & 0x0F];
*dst++= _dig_vec_upper[(wc >> 8) & 0x0F];
*dst++= _dig_vec_upper[(wc >> 4) & 0x0F];
*dst++= _dig_vec_upper[wc & 0x0F];
return MY_CS_PRINTABLE_CHAR_LENGTH;
} | O0 | c | to_printable_8bit:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
jmp 0x7f1e1
movl -0x14(%rbp), %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, (%rax)
movq -0x10(%rbp), %rcx
shrq $0xc, %rcx
andq $0xf, %rcx
leaq 0x14c076(%rip), %rax # 0x1cb280
movb (%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, (%rax)
movq -0x10(%rbp), %rcx
shrq $0x8, %rcx
andq $0xf, %rcx
leaq 0x14c04f(%rip), %rax # 0x1cb280
movb (%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, (%rax)
movq -0x10(%rbp), %rcx
shrq $0x4, %rcx
andq $0xf, %rcx
leaq 0x14c028(%rip), %rax # 0x1cb280
movb (%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, (%rax)
movq -0x10(%rbp), %rcx
andq $0xf, %rcx
leaq 0x14c005(%rip), %rax # 0x1cb280
movb (%rax,%rcx), %cl
movq -0x8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %cl, (%rax)
movl $0x5, %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| to_printable_8bit:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
jmp short $+2
loc_7F1E1:
mov eax, [rbp+var_14]
mov cl, al
mov rax, [rbp+var_8]
mov rdx, rax
add rdx, 1
mov [rbp+var_8], rdx
mov [rax], cl
mov rcx, [rbp+var_10]
shr rcx, 0Ch
and rcx, 0Fh
lea rax, _dig_vec_upper; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
mov cl, [rax+rcx]
mov rax, [rbp+var_8]
mov rdx, rax
add rdx, 1
mov [rbp+var_8], rdx
mov [rax], cl
mov rcx, [rbp+var_10]
shr rcx, 8
and rcx, 0Fh
lea rax, _dig_vec_upper; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
mov cl, [rax+rcx]
mov rax, [rbp+var_8]
mov rdx, rax
add rdx, 1
mov [rbp+var_8], rdx
mov [rax], cl
mov rcx, [rbp+var_10]
shr rcx, 4
and rcx, 0Fh
lea rax, _dig_vec_upper; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
mov cl, [rax+rcx]
mov rax, [rbp+var_8]
mov rdx, rax
add rdx, 1
mov [rbp+var_8], rdx
mov [rax], cl
mov rcx, [rbp+var_10]
and rcx, 0Fh
lea rax, _dig_vec_upper; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
mov cl, [rax+rcx]
mov rax, [rbp+var_8]
mov rdx, rax
add rdx, 1
mov [rbp+var_8], rdx
mov [rax], cl
mov eax, 5
pop rbp
retn
| long long to_printable_8bit(_BYTE *a1, unsigned long long a2, char a3)
{
*a1 = a3;
a1[1] = dig_vec_upper[(unsigned __int16)a2 >> 12];
a1[2] = dig_vec_upper[(a2 >> 8) & 0xF];
a1[3] = dig_vec_upper[(unsigned __int8)a2 >> 4];
a1[4] = dig_vec_upper[a2 & 0xF];
return 5LL;
}
| to_printable_8bit:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
JMP 0x0017f1e1
LAB_0017f1e1:
MOV EAX,dword ptr [RBP + -0x14]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x8]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x8],RDX
MOV byte ptr [RAX],CL
MOV RCX,qword ptr [RBP + -0x10]
SHR RCX,0xc
AND RCX,0xf
LEA RAX,[0x2cb280]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x8]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x8],RDX
MOV byte ptr [RAX],CL
MOV RCX,qword ptr [RBP + -0x10]
SHR RCX,0x8
AND RCX,0xf
LEA RAX,[0x2cb280]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x8]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x8],RDX
MOV byte ptr [RAX],CL
MOV RCX,qword ptr [RBP + -0x10]
SHR RCX,0x4
AND RCX,0xf
LEA RAX,[0x2cb280]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x8]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x8],RDX
MOV byte ptr [RAX],CL
MOV RCX,qword ptr [RBP + -0x10]
AND RCX,0xf
LEA RAX,[0x2cb280]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x8]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x8],RDX
MOV byte ptr [RAX],CL
MOV EAX,0x5
POP RBP
RET
|
int8 to_printable_8bit(int1 *param_1,ulong param_2,int1 param_3)
{
*param_1 = param_3;
param_1[1] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[param_2 >> 0xc & 0xf];
param_1[2] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[param_2 >> 8 & 0xf];
param_1[3] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[param_2 >> 4 & 0xf];
param_1[4] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[param_2 & 0xf];
return 5;
}
|
|
6,140 | common_kv_cache_dump_view_seqs(llama_kv_cache_view const&, int) | monkey531[P]llama/common/common.cpp | void common_kv_cache_dump_view_seqs(const llama_kv_cache_view & view, int row_size) {
static const char slot_chars[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d\n",
view.n_cells, view.n_seq_max, view.used_cells, view.token_count, view.max_contiguous, view.max_contiguous_idx);
std::unordered_map<llama_seq_id, size_t> seqs;
llama_kv_cache_view_cell * c_curr = view.cells;
llama_seq_id * cs_curr = view.cells_sequences;
for (int i = 0; i < view.n_cells; i++, c_curr++, cs_curr += view.n_seq_max) {
for (int j = 0; j < view.n_seq_max; j++) {
if (cs_curr[j] < 0) { continue; }
if (seqs.find(cs_curr[j]) == seqs.end()) {
if (seqs.size() + 1 >= sizeof(slot_chars)) { break; }
const size_t sz = seqs.size();
seqs[cs_curr[j]] = sz;
}
}
if (seqs.size() + 1 >= sizeof(slot_chars)) { break; }
}
printf("=== Sequence legend: ");
for (const auto & it : seqs) {
printf("%zu=%d, ", it.second, it.first);
}
printf("'+'=other sequence ids");
c_curr = view.cells;
cs_curr = view.cells_sequences;
for (int i = 0; i < view.n_cells; i++, c_curr++, cs_curr += view.n_seq_max) {
if (i % row_size == 0) {
printf("\n%5d: ", i);
}
for (int j = 0; j < view.n_seq_max; j++) {
if (cs_curr[j] >= 0) {
const auto & it = seqs.find(cs_curr[j]);
putchar(it != seqs.end() ? int(slot_chars[it->second]) : '+');
} else {
putchar('.');
}
}
putchar(' ');
}
printf("\n=== Done dumping\n");
} | O1 | cpp | common_kv_cache_dump_view_seqs(llama_kv_cache_view const&, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %esi, 0xc(%rsp)
movq %rdi, %r14
movl (%rdi), %esi
movl 0x4(%rdi), %edx
movl 0xc(%rdi), %ecx
movl 0x8(%rdi), %r8d
movl 0x10(%rdi), %r9d
movl 0x14(%rdi), %eax
movl %eax, (%rsp)
leaq 0x7a818(%rip), %rdi # 0xf6330
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x1b070
leaq 0x40(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
cmpl $0x0, (%r14)
jle 0x7bc33
movq 0x20(%r14), %r13
leaq 0x10(%rsp), %r15
movl 0x4(%r14), %r8d
testl %r8d, %r8d
jle 0x7bc10
xorl %ebp, %ebp
movslq (%r13,%rbp,4), %rcx
testq %rcx, %rcx
js 0x7bc00
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %r9
movq %rcx, %rax
xorl %edx, %edx
divq %r9
movq %rdx, %rsi
movq (%rdi,%rdx,8), %rdx
movl $0x0, %eax
testq %rdx, %rdx
je 0x7bbd0
movq (%rdx), %r10
movq %rdx, %rax
cmpl 0x8(%r10), %ecx
je 0x7bbd0
movq %r10, %r11
movq (%r10), %r10
testq %r10, %r10
je 0x7bbce
movslq 0x8(%r10), %rdi
movq %rdi, %rax
xorl %edx, %edx
divq %r9
movl $0x0, %eax
cmpq %rsi, %rdx
jne 0x7bbd0
movq %r11, %rax
cmpl %edi, %ecx
jne 0x7bba4
jmp 0x7bbd0
xorl %eax, %eax
testq %rax, %rax
je 0x7bbdb
cmpq $0x0, (%rax)
jne 0x7bc00
movq 0x28(%rsp), %rbx
leaq -0x3e(%rbx), %rax
cmpq $-0x3f, %rax
jb 0x7bc10
leaq (,%rbp,4), %rsi
addq %r13, %rsi
movq %r15, %rdi
callq 0xbf6c8
movq %rbx, (%rax)
incq %rbp
movslq 0x4(%r14), %r8
cmpq %r8, %rbp
jl 0x7bb67
movq 0x28(%rsp), %rax
addq $-0x3e, %rax
cmpq $-0x3f, %rax
jb 0x7bc33
incl %r12d
movslq %r8d, %rax
leaq (%r13,%rax,4), %r13
cmpl (%r14), %r12d
jl 0x7bb58
leaq 0x7a781(%rip), %rdi # 0xf63bb
xorl %eax, %eax
callq 0x1b070
movq 0x20(%rsp), %r12
testq %r12, %r12
je 0x7bc6f
leaq 0x7a77f(%rip), %r15 # 0xf63d1
movq 0x10(%r12), %rsi
movl 0x8(%r12), %edx
movq %r15, %rdi
xorl %eax, %eax
callq 0x1b070
movq (%r12), %r12
testq %r12, %r12
jne 0x7bc52
leaq 0x7a764(%rip), %rdi # 0xf63da
xorl %eax, %eax
callq 0x1b070
cmpl $0x0, (%r14)
movl 0xc(%rsp), %ebx
jle 0x7bd7d
movq 0x20(%r14), %r12
leaq 0x7cbaa(%rip), %r13 # 0xf8840
xorl %ebp, %ebp
movl %ebp, %eax
cltd
idivl %ebx
testl %edx, %edx
jne 0x7bcb1
leaq 0x7a681(%rip), %rdi # 0xf6329
movl %ebp, %esi
xorl %eax, %eax
callq 0x1b070
cmpl $0x0, 0x4(%r14)
jle 0x7bd60
xorl %r15d, %r15d
movslq (%r12,%r15,4), %rcx
testq %rcx, %rcx
js 0x7bd21
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %r8
movq %rcx, %rax
xorl %edx, %edx
divq %r8
movq %rdx, %rsi
movq (%rdi,%rdx,8), %rdx
movl $0x0, %eax
testq %rdx, %rdx
je 0x7bd2a
movq (%rdx), %r9
movq %rdx, %rax
cmpl 0x8(%r9), %ecx
je 0x7bd2a
movq %r9, %r10
movq (%r9), %r9
testq %r9, %r9
je 0x7bd28
movslq 0x8(%r9), %rdi
movq %rdi, %rax
xorl %edx, %edx
divq %r8
movl $0x0, %eax
cmpq %rsi, %rdx
jne 0x7bd2a
movq %r10, %rax
cmpl %edi, %ecx
jne 0x7bcf7
jmp 0x7bd2a
movl $0x2e, %edi
jmp 0x7bd4b
xorl %eax, %eax
testq %rax, %rax
je 0x7bd34
movq (%rax), %rax
jmp 0x7bd36
xorl %eax, %eax
testq %rax, %rax
je 0x7bd46
movq 0x10(%rax), %rax
movsbl (%rax,%r13), %edi
jmp 0x7bd4b
movl $0x2b, %edi
callq 0x1bce0
incq %r15
movslq 0x4(%r14), %rax
cmpq %rax, %r15
jl 0x7bcbf
movl $0x20, %edi
callq 0x1bce0
incl %ebp
movslq 0x4(%r14), %rax
leaq (%r12,%rax,4), %r12
cmpl (%r14), %ebp
jl 0x7bc98
leaq 0x7ca5c(%rip), %rdi # 0xf87e0
callq 0x1be50
leaq 0x10(%rsp), %rdi
callq 0xbd85a
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xbd85a
movq %rbx, %rdi
callq 0x1c0d0
| _Z30common_kv_cache_dump_view_seqsRK19llama_kv_cache_viewi:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rsp+78h+var_6C], esi
mov r14, rdi
mov esi, [rdi]
mov edx, [rdi+4]
mov ecx, [rdi+0Ch]
mov r8d, [rdi+8]
mov r9d, [rdi+10h]
mov eax, [rdi+14h]
mov [rsp+78h+var_78], eax
lea rdi, aDumpingKvCache_0; "=== Dumping KV cache. total cells %d, m"...
xor r12d, r12d
xor eax, eax
call _printf
lea rax, [rsp+78h+var_38]
mov [rax-30h], rax
mov qword ptr [rax-28h], 1
xorps xmm0, xmm0
movups xmmword ptr [rax-20h], xmm0
mov dword ptr [rax-10h], 3F800000h
movups xmmword ptr [rax-8], xmm0
cmp dword ptr [r14], 0
jle loc_7BC33
mov r13, [r14+20h]
lea r15, [rsp+78h+var_68]
loc_7BB58:
mov r8d, [r14+4]
test r8d, r8d
jle loc_7BC10
xor ebp, ebp
loc_7BB67:
movsxd rcx, dword ptr [r13+rbp*4+0]
test rcx, rcx
js loc_7BC00
mov rdi, [rsp+78h+var_68]
mov r9, [rsp+78h+var_60]
mov rax, rcx
xor edx, edx
div r9
mov rsi, rdx
mov rdx, [rdi+rdx*8]
mov eax, 0
test rdx, rdx
jz short loc_7BBD0
mov r10, [rdx]
mov rax, rdx
cmp ecx, [r10+8]
jz short loc_7BBD0
loc_7BBA4:
mov r11, r10
mov r10, [r10]
test r10, r10
jz short loc_7BBCE
movsxd rdi, dword ptr [r10+8]
mov rax, rdi
xor edx, edx
div r9
mov eax, 0
cmp rdx, rsi
jnz short loc_7BBD0
mov rax, r11
cmp ecx, edi
jnz short loc_7BBA4
jmp short loc_7BBD0
loc_7BBCE:
xor eax, eax
loc_7BBD0:
test rax, rax
jz short loc_7BBDB
cmp qword ptr [rax], 0
jnz short loc_7BC00
loc_7BBDB:
mov rbx, [rsp+78h+var_50]
lea rax, [rbx-3Eh]
cmp rax, 0FFFFFFFFFFFFFFC1h
jb short loc_7BC10
lea rsi, ds:0[rbp*4]
add rsi, r13
mov rdi, r15
call _ZNSt8__detail9_Map_baseIiSt4pairIKimESaIS3_ENS_10_Select1stESt8equal_toIiESt4hashIiENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb0ELb0ELb1EEELb1EEixERS2_; std::__detail::_Map_base<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](int const&)
mov [rax], rbx
loc_7BC00:
inc rbp
movsxd r8, dword ptr [r14+4]
cmp rbp, r8
jl loc_7BB67
loc_7BC10:
mov rax, [rsp+78h+var_50]
add rax, 0FFFFFFFFFFFFFFC2h
cmp rax, 0FFFFFFFFFFFFFFC1h
jb short loc_7BC33
inc r12d
movsxd rax, r8d
lea r13, [r13+rax*4+0]
cmp r12d, [r14]
jl loc_7BB58
loc_7BC33:
lea rdi, aSequenceLegend; "=== Sequence legend: "
xor eax, eax
call _printf
mov r12, [rsp+78h+var_58]
test r12, r12
jz short loc_7BC6F
lea r15, aZuD; "%zu=%d, "
loc_7BC52:
mov rsi, [r12+10h]
mov edx, [r12+8]
mov rdi, r15
xor eax, eax
call _printf
mov r12, [r12]
test r12, r12
jnz short loc_7BC52
loc_7BC6F:
lea rdi, aOtherSequenceI; "'+'=other sequence ids"
xor eax, eax
call _printf
cmp dword ptr [r14], 0
mov ebx, [rsp+78h+var_6C]
jle loc_7BD7D
mov r12, [r14+20h]
lea r13, _ZZ30common_kv_cache_dump_view_seqsRK19llama_kv_cache_viewiE10slot_chars; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabc"...
xor ebp, ebp
loc_7BC98:
mov eax, ebp
cdq
idiv ebx
test edx, edx
jnz short loc_7BCB1
lea rdi, a5d; "\n%5d: "
mov esi, ebp
xor eax, eax
call _printf
loc_7BCB1:
cmp dword ptr [r14+4], 0
jle loc_7BD60
xor r15d, r15d
loc_7BCBF:
movsxd rcx, dword ptr [r12+r15*4]
test rcx, rcx
js short loc_7BD21
mov rdi, [rsp+78h+var_68]
mov r8, [rsp+78h+var_60]
mov rax, rcx
xor edx, edx
div r8
mov rsi, rdx
mov rdx, [rdi+rdx*8]
mov eax, 0
test rdx, rdx
jz short loc_7BD2A
mov r9, [rdx]
mov rax, rdx
cmp ecx, [r9+8]
jz short loc_7BD2A
loc_7BCF7:
mov r10, r9
mov r9, [r9]
test r9, r9
jz short loc_7BD28
movsxd rdi, dword ptr [r9+8]
mov rax, rdi
xor edx, edx
div r8
mov eax, 0
cmp rdx, rsi
jnz short loc_7BD2A
mov rax, r10
cmp ecx, edi
jnz short loc_7BCF7
jmp short loc_7BD2A
loc_7BD21:
mov edi, 2Eh ; '.'
jmp short loc_7BD4B
loc_7BD28:
xor eax, eax
loc_7BD2A:
test rax, rax
jz short loc_7BD34
mov rax, [rax]
jmp short loc_7BD36
loc_7BD34:
xor eax, eax
loc_7BD36:
test rax, rax
jz short loc_7BD46
mov rax, [rax+10h]
movsx edi, byte ptr [rax+r13]
jmp short loc_7BD4B
loc_7BD46:
mov edi, 2Bh ; '+'
loc_7BD4B:
call _putchar
inc r15
movsxd rax, dword ptr [r14+4]
cmp r15, rax
jl loc_7BCBF
loc_7BD60:
mov edi, 20h ; ' '
call _putchar
inc ebp
movsxd rax, dword ptr [r14+4]
lea r12, [r12+rax*4]
cmp ebp, [r14]
jl loc_7BC98
loc_7BD7D:
lea rdi, aDoneDumping; "\n=== Done dumping"
call _puts
lea rdi, [rsp+78h+var_68]
call _ZNSt10_HashtableIiSt4pairIKimESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable()
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_8]
call _ZNSt10_HashtableIiSt4pairIKimESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,ulong>,std::allocator<std::pair<int const,ulong>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable()
mov rdi, rbx
call __Unwind_Resume
| long long common_kv_cache_dump_view_seqs(long long a1, int a2)
{
int v3; // r12d
long long v4; // r13
long long v5; // r8
long long v6; // rbp
unsigned long long v7; // rcx
long long **v8; // rdx
_QWORD *v9; // rax
long long *v10; // r10
_QWORD *v11; // r11
long long v12; // rbx
long long *i; // r12
long long v14; // r12
int v15; // ebp
long long v16; // r15
unsigned long long v17; // rcx
long long **v18; // rdx
long long *v19; // rax
long long *v20; // r9
long long *v21; // r10
long long v22; // rdi
long long v23; // rax
char *v25; // [rsp+10h] [rbp-68h] BYREF
unsigned long long v26; // [rsp+18h] [rbp-60h]
__int128 v27; // [rsp+20h] [rbp-58h]
int v28; // [rsp+30h] [rbp-48h]
__int128 v29; // [rsp+38h] [rbp-40h] BYREF
v3 = 0;
printf(
"=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, large"
"st empty slot=%d @ %d\n",
*(_DWORD *)a1,
*(_DWORD *)(a1 + 4),
*(_DWORD *)(a1 + 12),
*(_DWORD *)(a1 + 8),
*(_DWORD *)(a1 + 16),
*(_DWORD *)(a1 + 20));
v25 = (char *)&v29 + 8;
v26 = 1LL;
v27 = 0LL;
v28 = 1065353216;
v29 = 0LL;
if ( *(int *)a1 > 0 )
{
v4 = *(_QWORD *)(a1 + 32);
do
{
LODWORD(v5) = *(_DWORD *)(a1 + 4);
if ( (int)v5 > 0 )
{
v6 = 0LL;
do
{
v7 = *(int *)(v4 + 4 * v6);
if ( (v7 & 0x8000000000000000LL) == 0LL )
{
v8 = *(long long ***)&v25[8 * (v7 % v26)];
v9 = 0LL;
if ( v8 )
{
v10 = *v8;
v9 = *(_QWORD **)&v25[8 * (v7 % v26)];
if ( (_DWORD)v7 != *((_DWORD *)*v8 + 2) )
{
while ( 1 )
{
v11 = v10;
v10 = (long long *)*v10;
if ( !v10 )
break;
v9 = 0LL;
if ( *((int *)v10 + 2) % v26 == v7 % v26 )
{
v9 = v11;
if ( (_DWORD)v7 != *((_DWORD *)v10 + 2) )
continue;
}
goto LABEL_13;
}
v9 = 0LL;
}
}
LABEL_13:
if ( !v9 || !*v9 )
{
v12 = *((_QWORD *)&v27 + 1);
if ( (unsigned long long)(*((_QWORD *)&v27 + 1) - 62LL) < 0xFFFFFFFFFFFFFFC1LL )
break;
*(_QWORD *)std::__detail::_Map_base<int,std::pair<int const,unsigned long>,std::allocator<std::pair<int const,unsigned long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](
&v25,
v4 + 4 * v6) = v12;
}
}
++v6;
v5 = *(int *)(a1 + 4);
}
while ( v6 < v5 );
}
if ( (unsigned long long)(*((_QWORD *)&v27 + 1) - 62LL) < 0xFFFFFFFFFFFFFFC1LL )
break;
++v3;
v4 += 4LL * (int)v5;
}
while ( v3 < *(_DWORD *)a1 );
}
printf("=== Sequence legend: ");
for ( i = (long long *)v27; i; i = (long long *)*i )
printf("%zu=%d, ", i[2], *((_DWORD *)i + 2));
printf("'+'=other sequence ids");
if ( *(int *)a1 > 0 )
{
v14 = *(_QWORD *)(a1 + 32);
v15 = 0;
do
{
if ( !(v15 % a2) )
printf("\n%5d: ", v15);
if ( *(int *)(a1 + 4) > 0 )
{
v16 = 0LL;
do
{
v17 = *(int *)(v14 + 4 * v16);
if ( (v17 & 0x8000000000000000LL) != 0LL )
{
v22 = 46LL;
}
else
{
v18 = *(long long ***)&v25[8 * (v17 % v26)];
v19 = 0LL;
if ( v18 )
{
v20 = *v18;
v19 = *(long long **)&v25[8 * (v17 % v26)];
if ( (_DWORD)v17 != *((_DWORD *)*v18 + 2) )
{
while ( 1 )
{
v21 = v20;
v20 = (long long *)*v20;
if ( !v20 )
break;
v19 = 0LL;
if ( *((int *)v20 + 2) % v26 == v17 % v26 )
{
v19 = v21;
if ( (_DWORD)v17 != *((_DWORD *)v20 + 2) )
continue;
}
goto LABEL_37;
}
v19 = 0LL;
}
}
LABEL_37:
if ( v19 )
v23 = *v19;
else
v23 = 0LL;
if ( v23 )
v22 = (unsigned int)common_kv_cache_dump_view_seqs(llama_kv_cache_view const&,int)::slot_chars[*(_QWORD *)(v23 + 16)];
else
v22 = 43LL;
}
putchar(v22);
++v16;
}
while ( v16 < *(int *)(a1 + 4) );
}
putchar(32LL);
++v15;
v14 += 4LL * *(int *)(a1 + 4);
}
while ( v15 < *(_DWORD *)a1 );
}
puts("\n=== Done dumping");
return std::_Hashtable<int,std::pair<int const,unsigned long>,std::allocator<std::pair<int const,unsigned long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable(&v25);
}
| common_kv_cache_dump_view_seqs:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV dword ptr [RSP + 0xc],ESI
MOV R14,RDI
MOV ESI,dword ptr [RDI]
MOV EDX,dword ptr [RDI + 0x4]
MOV ECX,dword ptr [RDI + 0xc]
MOV R8D,dword ptr [RDI + 0x8]
MOV R9D,dword ptr [RDI + 0x10]
MOV EAX,dword ptr [RDI + 0x14]
MOV dword ptr [RSP],EAX
LEA RDI,[0x1f6330]
XOR R12D,R12D
XOR EAX,EAX
CALL 0x0011b070
LEA RAX,[RSP + 0x40]
MOV qword ptr [RAX + -0x30],RAX
MOV qword ptr [RAX + -0x28],0x1
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + -0x20],XMM0
MOV dword ptr [RAX + -0x10],0x3f800000
MOVUPS xmmword ptr [RAX + -0x8],XMM0
CMP dword ptr [R14],0x0
JLE 0x0017bc33
MOV R13,qword ptr [R14 + 0x20]
LEA R15,[RSP + 0x10]
LAB_0017bb58:
MOV R8D,dword ptr [R14 + 0x4]
TEST R8D,R8D
JLE 0x0017bc10
XOR EBP,EBP
LAB_0017bb67:
MOVSXD RCX,dword ptr [R13 + RBP*0x4]
TEST RCX,RCX
JS 0x0017bc00
MOV RDI,qword ptr [RSP + 0x10]
MOV R9,qword ptr [RSP + 0x18]
MOV RAX,RCX
XOR EDX,EDX
DIV R9
MOV RSI,RDX
MOV RDX,qword ptr [RDI + RDX*0x8]
MOV EAX,0x0
TEST RDX,RDX
JZ 0x0017bbd0
MOV R10,qword ptr [RDX]
MOV RAX,RDX
CMP ECX,dword ptr [R10 + 0x8]
JZ 0x0017bbd0
LAB_0017bba4:
MOV R11,R10
MOV R10,qword ptr [R10]
TEST R10,R10
JZ 0x0017bbce
MOVSXD RDI,dword ptr [R10 + 0x8]
MOV RAX,RDI
XOR EDX,EDX
DIV R9
MOV EAX,0x0
CMP RDX,RSI
JNZ 0x0017bbd0
MOV RAX,R11
CMP ECX,EDI
JNZ 0x0017bba4
JMP 0x0017bbd0
LAB_0017bbce:
XOR EAX,EAX
LAB_0017bbd0:
TEST RAX,RAX
JZ 0x0017bbdb
CMP qword ptr [RAX],0x0
JNZ 0x0017bc00
LAB_0017bbdb:
MOV RBX,qword ptr [RSP + 0x28]
LEA RAX,[RBX + -0x3e]
CMP RAX,-0x3f
JC 0x0017bc10
LEA RSI,[RBP*0x4]
ADD RSI,R13
LAB_0017bbf5:
MOV RDI,R15
CALL 0x001bf6c8
LAB_0017bbfd:
MOV qword ptr [RAX],RBX
LAB_0017bc00:
INC RBP
MOVSXD R8,dword ptr [R14 + 0x4]
CMP RBP,R8
JL 0x0017bb67
LAB_0017bc10:
MOV RAX,qword ptr [RSP + 0x28]
ADD RAX,-0x3e
CMP RAX,-0x3f
JC 0x0017bc33
INC R12D
MOVSXD RAX,R8D
LEA R13,[R13 + RAX*0x4]
CMP R12D,dword ptr [R14]
JL 0x0017bb58
LAB_0017bc33:
LEA RDI,[0x1f63bb]
XOR EAX,EAX
CALL 0x0011b070
MOV R12,qword ptr [RSP + 0x20]
TEST R12,R12
JZ 0x0017bc6f
LEA R15,[0x1f63d1]
LAB_0017bc52:
MOV RSI,qword ptr [R12 + 0x10]
MOV EDX,dword ptr [R12 + 0x8]
MOV RDI,R15
XOR EAX,EAX
CALL 0x0011b070
MOV R12,qword ptr [R12]
TEST R12,R12
JNZ 0x0017bc52
LAB_0017bc6f:
LEA RDI,[0x1f63da]
XOR EAX,EAX
CALL 0x0011b070
CMP dword ptr [R14],0x0
MOV EBX,dword ptr [RSP + 0xc]
JLE 0x0017bd7d
MOV R12,qword ptr [R14 + 0x20]
LEA R13,[0x1f8840]
XOR EBP,EBP
LAB_0017bc98:
MOV EAX,EBP
CDQ
IDIV EBX
TEST EDX,EDX
JNZ 0x0017bcb1
LEA RDI,[0x1f6329]
MOV ESI,EBP
XOR EAX,EAX
CALL 0x0011b070
LAB_0017bcb1:
CMP dword ptr [R14 + 0x4],0x0
JLE 0x0017bd60
XOR R15D,R15D
LAB_0017bcbf:
MOVSXD RCX,dword ptr [R12 + R15*0x4]
TEST RCX,RCX
JS 0x0017bd21
MOV RDI,qword ptr [RSP + 0x10]
MOV R8,qword ptr [RSP + 0x18]
MOV RAX,RCX
XOR EDX,EDX
DIV R8
MOV RSI,RDX
MOV RDX,qword ptr [RDI + RDX*0x8]
MOV EAX,0x0
TEST RDX,RDX
JZ 0x0017bd2a
MOV R9,qword ptr [RDX]
MOV RAX,RDX
CMP ECX,dword ptr [R9 + 0x8]
JZ 0x0017bd2a
LAB_0017bcf7:
MOV R10,R9
MOV R9,qword ptr [R9]
TEST R9,R9
JZ 0x0017bd28
MOVSXD RDI,dword ptr [R9 + 0x8]
MOV RAX,RDI
XOR EDX,EDX
DIV R8
MOV EAX,0x0
CMP RDX,RSI
JNZ 0x0017bd2a
MOV RAX,R10
CMP ECX,EDI
JNZ 0x0017bcf7
JMP 0x0017bd2a
LAB_0017bd21:
MOV EDI,0x2e
JMP 0x0017bd4b
LAB_0017bd28:
XOR EAX,EAX
LAB_0017bd2a:
TEST RAX,RAX
JZ 0x0017bd34
MOV RAX,qword ptr [RAX]
JMP 0x0017bd36
LAB_0017bd34:
XOR EAX,EAX
LAB_0017bd36:
TEST RAX,RAX
JZ 0x0017bd46
MOV RAX,qword ptr [RAX + 0x10]
MOVSX EDI,byte ptr [RAX + R13*0x1]
JMP 0x0017bd4b
LAB_0017bd46:
MOV EDI,0x2b
LAB_0017bd4b:
CALL 0x0011bce0
INC R15
MOVSXD RAX,dword ptr [R14 + 0x4]
CMP R15,RAX
JL 0x0017bcbf
LAB_0017bd60:
MOV EDI,0x20
CALL 0x0011bce0
INC EBP
MOVSXD RAX,dword ptr [R14 + 0x4]
LEA R12,[R12 + RAX*0x4]
CMP EBP,dword ptr [R14]
JL 0x0017bc98
LAB_0017bd7d:
LEA RDI,[0x1f87e0]
CALL 0x0011be50
LEA RDI,[RSP + 0x10]
CALL 0x001bd85a
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_kv_cache_dump_view_seqs(llama_kv_cache_view const&, int) */
void common_kv_cache_dump_view_seqs(llama_kv_cache_view *param_1,int param_2)
{
int iVar1;
int8 *puVar2;
long *plVar3;
long *plVar4;
long lVar5;
ulong uVar6;
uint uVar7;
long lVar8;
long *plVar9;
int iVar10;
long lVar11;
int8 *local_68;
ulong local_60;
int8 *local_58;
long lStack_50;
int4 local_48;
int8 local_40;
int8 uStack_38;
iVar10 = 0;
printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d\n"
,(ulong)*(uint *)param_1,(ulong)*(uint *)(param_1 + 4),(ulong)*(uint *)(param_1 + 0xc),
(ulong)*(uint *)(param_1 + 8),(ulong)*(uint *)(param_1 + 0x10),
*(int4 *)(param_1 + 0x14));
local_68 = &uStack_38;
local_60 = 1;
local_58 = (int8 *)0x0;
lStack_50 = 0;
local_48 = 0x3f800000;
local_40 = 0;
uStack_38 = 0;
if (0 < *(int *)param_1) {
lVar11 = *(long *)(param_1 + 0x20);
do {
uVar7 = *(uint *)(param_1 + 4);
uVar6 = (ulong)uVar7;
if (0 < (int)uVar7) {
lVar8 = 0;
do {
lVar5 = lStack_50;
uVar7 = (uint)uVar6;
iVar1 = *(int *)(lVar11 + lVar8 * 4);
if (-1 < (long)iVar1) {
uVar6 = (ulong)(long)iVar1 % local_60;
plVar3 = (long *)local_68[uVar6];
plVar4 = (long *)0x0;
if ((plVar3 != (long *)0x0) &&
(plVar4 = plVar3, plVar9 = (long *)*plVar3, iVar1 != *(int *)((long *)*plVar3 + 1)))
{
while (plVar3 = (long *)*plVar9, plVar3 != (long *)0x0) {
plVar4 = (long *)0x0;
if (((ulong)(long)(int)plVar3[1] % local_60 != uVar6) ||
(plVar4 = plVar9, plVar9 = plVar3, iVar1 == (int)plVar3[1])) goto LAB_0017bbd0;
}
plVar4 = (long *)0x0;
}
LAB_0017bbd0:
if ((plVar4 == (long *)0x0) || (*plVar4 == 0)) {
if (lStack_50 - 0x3eU < 0xffffffffffffffc1) break;
/* try { // try from 0017bbf5 to 0017bbfc has its CatchHandler @ 0017bda2 */
plVar3 = (long *)std::__detail::
_Map_base<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
::operator[]((_Map_base<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>
*)&local_68,(int *)(lVar8 * 4 + lVar11));
*plVar3 = lVar5;
}
}
lVar8 = lVar8 + 1;
uVar7 = *(uint *)(param_1 + 4);
uVar6 = (ulong)(int)uVar7;
} while (lVar8 < (long)uVar6);
}
if (lStack_50 - 0x3eU < 0xffffffffffffffc1) break;
iVar10 = iVar10 + 1;
lVar11 = lVar11 + (long)(int)uVar7 * 4;
} while (iVar10 < *(int *)param_1);
}
printf("=== Sequence legend: ");
for (puVar2 = local_58; puVar2 != (int8 *)0x0; puVar2 = (int8 *)*puVar2) {
printf("%zu=%d, ",puVar2[2],(ulong)*(uint *)(puVar2 + 1));
}
printf("\'+\'=other sequence ids");
if (0 < *(int *)param_1) {
lVar11 = *(long *)(param_1 + 0x20);
uVar7 = 0;
do {
if ((int)uVar7 % param_2 == 0) {
printf("\n%5d: ",(ulong)uVar7);
}
if (0 < *(int *)(param_1 + 4)) {
lVar8 = 0;
do {
iVar10 = *(int *)(lVar11 + lVar8 * 4);
if ((long)iVar10 < 0) {
iVar10 = 0x2e;
}
else {
uVar6 = (ulong)(long)iVar10 % local_60;
plVar3 = (long *)local_68[uVar6];
plVar4 = (long *)0x0;
if ((plVar3 != (long *)0x0) &&
(plVar4 = plVar3, plVar9 = (long *)*plVar3, iVar10 != *(int *)((long *)*plVar3 + 1)))
{
while (plVar3 = (long *)*plVar9, plVar3 != (long *)0x0) {
plVar4 = (long *)0x0;
if (((ulong)(long)(int)plVar3[1] % local_60 != uVar6) ||
(plVar4 = plVar9, plVar9 = plVar3, iVar10 == (int)plVar3[1])) goto LAB_0017bd2a;
}
plVar4 = (long *)0x0;
}
LAB_0017bd2a:
if (plVar4 == (long *)0x0) {
lVar5 = 0;
}
else {
lVar5 = *plVar4;
}
if (lVar5 == 0) {
iVar10 = 0x2b;
}
else {
iVar10 = (int)"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
[*(long *)(lVar5 + 0x10)];
}
}
putchar(iVar10);
lVar8 = lVar8 + 1;
} while (lVar8 < *(int *)(param_1 + 4));
}
putchar(0x20);
uVar7 = uVar7 + 1;
lVar11 = lVar11 + (long)*(int *)(param_1 + 4) * 4;
} while ((int)uVar7 < *(int *)param_1);
}
puts("\n=== Done dumping");
std::
_Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
::~_Hashtable((_Hashtable<int,std::pair<int_const,unsigned_long>,std::allocator<std::pair<int_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
*)&local_68);
return;
}
|
|
6,141 | fs_get_cache_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/common.cpp | std::string fs_get_cache_file(const std::string & filename) {
GGML_ASSERT(filename.find(DIRECTORY_SEPARATOR) == std::string::npos);
std::string cache_directory = fs_get_cache_directory();
const bool success = fs_create_directory_with_parents(cache_directory);
if (!success) {
throw std::runtime_error("failed to create cache directory: " + cache_directory);
}
return cache_directory + filename;
} | O1 | cpp | fs_get_cache_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movl $0x2f, %esi
xorl %edx, %edx
callq 0x19890
cmpq $-0x1, %rax
jne 0x59b11
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x59723
movq %r15, %rdi
callq 0x59628
testb %al, %al
je 0x59b32
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x56aa0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x59b03
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x196b0
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x63399(%rip), %rdi # 0xbceb1
leaq 0x5c2ab(%rip), %rdx # 0xb5dca
leaq 0x63567(%rip), %rcx # 0xbd08d
movl $0x378, %esi # imm = 0x378
xorl %eax, %eax
callq 0x19b10
movl $0x10, %edi
callq 0x19370
movq %rax, %rbx
leaq 0x6357f(%rip), %rsi # 0xbd0c5
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x4d8d1
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x19ac0
xorl %ebp, %ebp
movq 0x9547a(%rip), %rsi # 0xeefe8
movq 0x953f3(%rip), %rdx # 0xeef68
movq %rbx, %rdi
callq 0x19b70
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x59ba3
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x196b0
jmp 0x59ba3
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x59bb5
movq %rbx, %rdi
callq 0x19510
jmp 0x59bb5
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x59bd0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x196b0
movq %r14, %rdi
callq 0x19be0
| _Z17fs_get_cache_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp; int
push r15; int
push r14; int
push rbx; __int64
sub rsp, 48h
mov r14, rsi
mov rbx, rdi
mov rdi, rsi
mov esi, 2Fh ; '/'
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_59B11
lea r15, [rsp+68h+var_60]
mov rdi, r15; int
call _Z22fs_get_cache_directoryB5cxx11v; fs_get_cache_directory(void)
mov rdi, r15
call _Z32fs_create_directory_with_parentsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; fs_create_directory_with_parents(std::string const&)
test al, al
jz short loc_59B32
lea rsi, [rsp+68h+var_60]
mov rdi, rbx
mov rdx, r14
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_SA_; std::operator+<char>(std::string const&,std::string const&)
lea rax, [rsp+68h+var_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_59B03
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_59B03:
mov rax, rbx
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_59B11:
lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aFilenameFindDi; "filename.find(DIRECTORY_SEPARATOR) == s"...
mov esi, 378h
xor eax, eax
call _ggml_abort
loc_59B32:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aFailedToCreate; "failed to create cache directory: "
lea rdi, [rsp+68h+var_40]
lea rdx, [rsp+68h+var_60]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
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:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+68h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_59BA3
mov rsi, [rsp+68h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_59BA3
mov r14, rax
mov bpl, 1
loc_59BA3:
test bpl, bpl
jz short loc_59BB5
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_59BB5
mov r14, rax
loc_59BB5:
lea rax, [rsp+68h+var_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_59BD0
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_59BD0:
mov rdi, r14
call __Unwind_Resume
| _QWORD * fs_get_cache_file(_QWORD *a1, _QWORD *a2)
{
void *exception; // rbx
int v4[4]; // [rsp+8h] [rbp-60h] BYREF
long long v5; // [rsp+18h] [rbp-50h] BYREF
_BYTE v6[16]; // [rsp+28h] [rbp-40h] BYREF
if ( std::string::find(a2, 47LL, 0LL) != -1 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",
888LL,
"GGML_ASSERT(%s) failed",
"filename.find(DIRECTORY_SEPARATOR) == std::string::npos");
LABEL_7:
exception = __cxa_allocate_exception(0x10uLL);
std::operator+<char>((long long)v6, (long long)"failed to create cache directory: ", v4);
std::runtime_error::runtime_error(exception, v6);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
fs_get_cache_directory[abi:cxx11]((long long)v4);
if ( !fs_create_directory_with_parents(v4) )
goto LABEL_7;
std::operator+<char>(a1, (long long)v4, a2);
if ( *(long long **)v4 != &v5 )
operator delete(*(void **)v4, v5 + 1);
return a1;
}
| fs_get_cache_file:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
MOV RBX,RDI
MOV RDI,RSI
MOV ESI,0x2f
XOR EDX,EDX
CALL 0x00119890
CMP RAX,-0x1
JNZ 0x00159b11
LEA R15,[RSP + 0x8]
MOV RDI,R15
CALL 0x00159723
LAB_00159acc:
MOV RDI,R15
CALL 0x00159628
TEST AL,AL
JZ 0x00159b32
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
MOV RDX,R14
CALL 0x00156aa0
LAB_00159ae8:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00159b03
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001196b0
LAB_00159b03:
MOV RAX,RBX
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00159b11:
LEA RDI,[0x1bceb1]
LEA RDX,[0x1b5dca]
LEA RCX,[0x1bd08d]
MOV ESI,0x378
XOR EAX,EAX
CALL 0x00119b10
LAB_00159b32:
MOV EDI,0x10
CALL 0x00119370
MOV RBX,RAX
LAB_00159b3f:
LEA RSI,[0x1bd0c5]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x0014d8d1
MOV BPL,0x1
LAB_00159b58:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x00119ac0
XOR EBP,EBP
MOV RSI,qword ptr [0x001eefe8]
MOV RDX,qword ptr [0x001eef68]
MOV RDI,RBX
CALL 0x00119b70
|
/* fs_get_cache_file(std::__cxx11::string const&) */
string * fs_get_cache_file(string *param_1)
{
char cVar1;
long lVar2;
runtime_error *this;
char in_SIL;
long *local_60 [2];
long local_50 [2];
string local_40 [32];
lVar2 = std::__cxx11::string::find(in_SIL,0x2f);
if (lVar2 != -1) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x378,
"GGML_ASSERT(%s) failed","filename.find(DIRECTORY_SEPARATOR) == std::string::npos");
}
fs_get_cache_directory_abi_cxx11_();
/* try { // try from 00159acc to 00159ae7 has its CatchHandler @ 00159bb2 */
cVar1 = fs_create_directory_with_parents((string *)local_60);
if (cVar1 != '\0') {
std::operator+(param_1,(string *)local_60);
if (local_60[0] != local_50) {
operator_delete(local_60[0],local_50[0] + 1);
}
return param_1;
}
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00159b3f to 00159b54 has its CatchHandler @ 00159b9d */
std::operator+((char *)local_40,(string *)"failed to create cache directory: ");
/* try { // try from 00159b58 to 00159b7c has its CatchHandler @ 00159b7d */
std::runtime_error::runtime_error(this,local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_001eefe8,PTR__runtime_error_001eef68);
}
|
|
6,142 | ma_close | eloqsql/libmariadb/libmariadb/ma_io.c | int ma_close(MA_FILE *file)
{
int rc;
if (!file)
return -1;
switch (file->type) {
case MA_FILE_LOCAL:
rc= fclose((FILE *)file->ptr);
free(file);
break;
#ifdef HAVE_REMOTEIO
case MA_FILE_REMOTE:
rc= rio_plugin->methods->mclose(file);
break;
#endif
default:
return -1;
}
return rc;
} | O0 | c | ma_close:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x681fc
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6825d
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x18(%rbp)
subl $0x1, %eax
je 0x68216
jmp 0x6820c
movl -0x18(%rbp), %eax
subl $0x2, %eax
je 0x68231
jmp 0x6824e
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x38450
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rdi
callq 0x381b0
jmp 0x68257
leaq 0x39c158(%rip), %rax # 0x404390
movq (%rax), %rax
movq 0x58(%rax), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rdi
callq *%rax
movl %eax, -0x14(%rbp)
jmp 0x68257
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x6825d
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_close:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
cmp [rbp+var_10], 0
jnz short loc_681FC
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_6825D
loc_681FC:
mov rax, [rbp+var_10]
mov eax, [rax]
mov [rbp+var_18], eax
sub eax, 1
jz short loc_68216
jmp short $+2
loc_6820C:
mov eax, [rbp+var_18]
sub eax, 2
jz short loc_68231
jmp short loc_6824E
loc_68216:
mov rax, [rbp+var_10]
mov rdi, [rax+8]
call _fclose
mov [rbp+var_14], eax
mov rdi, [rbp+var_10]
call _free
jmp short loc_68257
loc_68231:
lea rax, rio_plugin
mov rax, [rax]
mov rax, [rax+58h]
mov rax, [rax+8]
mov rdi, [rbp+var_10]
call rax
mov [rbp+var_14], eax
jmp short loc_68257
loc_6824E:
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_6825D
loc_68257:
mov eax, [rbp+var_14]
mov [rbp+var_4], eax
loc_6825D:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long ma_close(long long a1)
{
unsigned int v2; // [rsp+Ch] [rbp-14h]
if ( a1 )
{
if ( *(_DWORD *)a1 == 1 )
{
v2 = fclose(*(_QWORD *)(a1 + 8));
free(a1);
}
else
{
if ( *(_DWORD *)a1 != 2 )
return (unsigned int)-1;
return (unsigned int)(*(long long ( **)(long long))(*(_QWORD *)(rio_plugin + 88LL) + 8LL))(a1);
}
return v2;
}
return (unsigned int)-1;
}
| ma_close:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x001681fc
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0016825d
LAB_001681fc:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x18],EAX
SUB EAX,0x1
JZ 0x00168216
JMP 0x0016820c
LAB_0016820c:
MOV EAX,dword ptr [RBP + -0x18]
SUB EAX,0x2
JZ 0x00168231
JMP 0x0016824e
LAB_00168216:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x00138450
MOV dword ptr [RBP + -0x14],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001381b0
JMP 0x00168257
LAB_00168231:
LEA RAX,[0x504390]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x58]
MOV RAX,qword ptr [RAX + 0x8]
MOV RDI,qword ptr [RBP + -0x10]
CALL RAX
MOV dword ptr [RBP + -0x14],EAX
JMP 0x00168257
LAB_0016824e:
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0016825d
LAB_00168257:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x4],EAX
LAB_0016825d:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int ma_close(int *param_1)
{
int local_1c;
int local_c;
if (param_1 == (int *)0x0) {
local_c = -1;
}
else {
if (*param_1 == 1) {
local_1c = fclose(*(FILE **)(param_1 + 2));
free(param_1);
}
else {
if (*param_1 != 2) {
return -1;
}
local_1c = (**(code **)(*(long *)(rio_plugin + 0x58) + 8))(param_1);
}
local_c = local_1c;
}
return local_c;
}
|
|
6,143 | blst_p2_on_curve | corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/e2.c | int blst_p2_on_curve(const POINTonE2 *p)
{ return (int)POINTonE2_on_curve(p); } | O3 | c | blst_p2_on_curve:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp # imm = 0x128
movq %rdi, %r14
leaq 0xc0(%rdi), %r13
movl $0x60, %esi
movq %r13, %rdi
callq 0x2ff40
movq %rax, -0x30(%rbp)
leaq 0x24069(%rip), %r15 # 0x3fb10
leaq -0xf0(%rbp), %rbx
movabsq $-0x760c000300030003, %r12 # imm = 0x89F3FFFCFFFCFFFD
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x332e0
movq %rbx, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movq %r15, %rcx
movq %r12, %r8
callq 0x331a0
leaq -0x90(%rbp), %r13
movq %r13, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x332e0
leaq -0x60(%rbp), %rdx
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rcx
callq 0x2f3a0
leaq -0xc0(%rbp), %r12
movq %r12, %rdi
movq %r13, %rsi
leaq -0x60(%rbp), %rdx
movq %r15, %rcx
callq 0x2ec40
movl $0x2, %edx
movq %rbx, %rdi
movq %rbx, %rsi
movq %r15, %rcx
callq 0x2ef40
movl $0x2, %edx
movq %r12, %rdi
movq %r12, %rsi
movq %r15, %rcx
callq 0x2ef40
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
movabsq $-0x760c000300030003, %r12 # imm = 0x89F3FFFCFFFCFFFD
movq %r12, %rcx
callq 0x332e0
movq %r13, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %r15, %rcx
movq %r12, %r8
callq 0x331a0
movq %r13, %rdi
movq %r13, %rsi
movq %rbx, %rdx
movq %r15, %rcx
callq 0x2ed20
addq $0x60, %r14
leaq -0x150(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x332e0
movl $0x60, %edx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x2ff80
orl -0x30(%rbp), %eax
addq $0x128, %rsp # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| blst_p2_on_curve:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 128h
mov r14, rdi
lea r13, [rdi+0C0h]
mov esi, 60h ; '`'
mov rdi, r13
call vec_is_zero_16x
mov [rbp+var_30], rax
lea r15, BLS12_381_P
lea rbx, [rbp+var_F0]
mov r12, 89F3FFFCFFFCFFFDh
mov rdi, rbx
mov rsi, r13
mov rdx, r15
mov rcx, r12
call sqr_mont_384x
mov rdi, rbx
mov rsi, rbx
mov rdx, r13
mov rcx, r15
mov r8, r12
call mul_mont_384x
lea r13, [rbp+var_90]
mov rdi, r13
mov rsi, rbx
mov rdx, r15
mov rcx, r12
call sqr_mont_384x
lea rdx, [rbp+var_60]
mov rdi, rbx
mov rsi, r13
mov rcx, r15
call _sub_mod_384
lea r12, [rbp+var_C0]
mov rdi, r12
mov rsi, r13
lea rdx, [rbp+var_60]
mov rcx, r15
call add_mod_384
mov edx, 2
mov rdi, rbx
mov rsi, rbx
mov rcx, r15
call lshift_mod_384
mov edx, 2
mov rdi, r12
mov rsi, r12
mov rcx, r15
call lshift_mod_384
mov rdi, r13
mov rsi, r14
mov rdx, r15
mov r12, 89F3FFFCFFFCFFFDh
mov rcx, r12
call sqr_mont_384x
mov rdi, r13
mov rsi, r13
mov rdx, r14
mov rcx, r15
mov r8, r12
call mul_mont_384x
mov rdi, r13
mov rsi, r13
mov rdx, rbx
mov rcx, r15
call add_mod_384x
add r14, 60h ; '`'
lea rbx, [rbp+var_150]
mov rdi, rbx
mov rsi, r14
mov rdx, r15
mov rcx, r12
call sqr_mont_384x
mov edx, 60h ; '`'
mov rdi, r13
mov rsi, rbx
call vec_is_equal_16x
or eax, dword ptr [rbp+var_30]
add rsp, 128h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long blst_p2_on_curve(long long a1)
{
int is_equal_16x; // eax
_BYTE v3[96]; // [rsp+0h] [rbp-150h] BYREF
_BYTE v4[48]; // [rsp+60h] [rbp-F0h] BYREF
_BYTE v5[48]; // [rsp+90h] [rbp-C0h] BYREF
_BYTE v6[48]; // [rsp+C0h] [rbp-90h] BYREF
_BYTE v7[48]; // [rsp+F0h] [rbp-60h] BYREF
long long is_zero_16x; // [rsp+120h] [rbp-30h]
is_zero_16x = vec_is_zero_16x(a1 + 192, 96LL);
sqr_mont_384x(v4, a1 + 192, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384x(v4, v4, a1 + 192, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
sqr_mont_384x(v6, v4, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
sub_mod_384(v4, v6, v7, &BLS12_381_P);
add_mod_384(v5, v6, v7, &BLS12_381_P);
lshift_mod_384(v4, v4, 2LL, &BLS12_381_P);
lshift_mod_384(v5, v5, 2LL, &BLS12_381_P);
sqr_mont_384x(v6, a1, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384x(v6, v6, a1, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
add_mod_384x(v6, v6, v4, &BLS12_381_P);
sqr_mont_384x(v3, a1 + 96, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
is_equal_16x = vec_is_equal_16x(v6, v3, 96LL);
return (unsigned int)is_zero_16x | is_equal_16x;
}
| blst_p2_on_curve:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x128
MOV R14,RDI
LEA R13,[RDI + 0xc0]
MOV ESI,0x60
MOV RDI,R13
CALL 0x0012ff40
MOV qword ptr [RBP + -0x30],RAX
LEA R15,[0x13fb10]
LEA RBX,[RBP + -0xf0]
MOV R12,-0x760c000300030003
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R15
MOV RCX,R12
CALL 0x001332e0
MOV RDI,RBX
MOV RSI,RBX
MOV RDX,R13
MOV RCX,R15
MOV R8,R12
CALL 0x001331a0
LEA R13,[RBP + -0x90]
MOV RDI,R13
MOV RSI,RBX
MOV RDX,R15
MOV RCX,R12
CALL 0x001332e0
LEA RDX,[RBP + -0x60]
MOV RDI,RBX
MOV RSI,R13
MOV RCX,R15
CALL 0x0012f3a0
LEA R12,[RBP + -0xc0]
MOV RDI,R12
MOV RSI,R13
LEA RDX,[RBP + -0x60]
MOV RCX,R15
CALL 0x0012ec40
MOV EDX,0x2
MOV RDI,RBX
MOV RSI,RBX
MOV RCX,R15
CALL 0x0012ef40
MOV EDX,0x2
MOV RDI,R12
MOV RSI,R12
MOV RCX,R15
CALL 0x0012ef40
MOV RDI,R13
MOV RSI,R14
MOV RDX,R15
MOV R12,-0x760c000300030003
MOV RCX,R12
CALL 0x001332e0
MOV RDI,R13
MOV RSI,R13
MOV RDX,R14
MOV RCX,R15
MOV R8,R12
CALL 0x001331a0
MOV RDI,R13
MOV RSI,R13
MOV RDX,RBX
MOV RCX,R15
CALL 0x0012ed20
ADD R14,0x60
LEA RBX,[RBP + -0x150]
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
MOV RCX,R12
CALL 0x001332e0
MOV EDX,0x60
MOV RDI,R13
MOV RSI,RBX
CALL 0x0012ff80
OR EAX,dword ptr [RBP + -0x30]
ADD RSP,0x128
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
uint blst_p2_on_curve(long param_1)
{
long lVar1;
uint uVar2;
int1 local_158 [96];
int1 local_f8 [48];
int1 local_c8 [48];
int1 local_98 [48];
int1 local_68 [48];
int8 local_38;
lVar1 = param_1 + 0xc0;
local_38 = vec_is_zero_16x(lVar1,0x60);
sqr_mont_384x(local_f8,lVar1,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384x(local_f8,local_f8,lVar1,BLS12_381_P,0x89f3fffcfffcfffd);
sqr_mont_384x(local_98,local_f8,BLS12_381_P,0x89f3fffcfffcfffd);
sub_mod_384(local_f8,local_98,local_68,BLS12_381_P);
add_mod_384(local_c8,local_98,local_68,BLS12_381_P);
lshift_mod_384(local_f8,local_f8,2,BLS12_381_P);
lshift_mod_384(local_c8,local_c8,2,BLS12_381_P);
sqr_mont_384x(local_98,param_1,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384x(local_98,local_98,param_1,BLS12_381_P,0x89f3fffcfffcfffd);
add_mod_384x(local_98,local_98,local_f8,BLS12_381_P);
sqr_mont_384x(local_158,param_1 + 0x60,BLS12_381_P,0x89f3fffcfffcfffd);
uVar2 = vec_is_equal_16x(local_98,local_158,0x60);
return uVar2 | (uint)local_38;
}
|
|
6,144 | ma_once_init_block_record | eloqsql/storage/maria/ma_blockrec.c | my_bool _ma_once_init_block_record(MARIA_SHARE *share, File data_file)
{
my_bool res;
pgcache_page_no_t last_page;
/*
First calculate the max file length with can have with a pointer of size
rec_reflength.
The 'rec_reflength - 1' is because one byte is used for row
position withing the page.
The /2 comes from _ma_transaction_recpos_to_keypos() where we use
the lowest bit to mark if there is a transid following the rownr.
*/
last_page= ((ulonglong) 1 << ((share->base.rec_reflength-1)*8))/2;
if (!last_page) /* Overflow; set max size */
last_page= ~(pgcache_page_no_t) 0;
res= _ma_bitmap_init(share, data_file, &last_page);
share->base.max_data_file_length= _ma_safe_mul(last_page + 1,
share->block_size);
#if SIZEOF_OFF_T == 4
set_if_smaller(share->base.max_data_file_length, INT_MAX32);
#endif
return res;
} | O0 | c | ma_once_init_block_record:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl 0x3e0(%rax), %eax
subl $0x1, %eax
shll $0x3, %eax
movl %eax, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
shrq %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x7e841
movq $-0x1, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
leaq -0x18(%rbp), %rdx
callq 0x465e0
movb %al, -0xd(%rbp)
movq -0x18(%rbp), %rdi
addq $0x1, %rdi
movq -0x8(%rbp), %rax
movl 0x7bc(%rax), %eax
movl %eax, %esi
callq 0x6e180
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x368(%rax)
movb -0xd(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ma_once_init_block_record:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov rax, [rbp+var_8]
mov eax, [rax+3E0h]
sub eax, 1
shl eax, 3
mov eax, eax
mov ecx, eax
mov eax, 1
shl rax, cl
shr rax, 1
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jnz short loc_7E841
mov [rbp+var_18], 0FFFFFFFFFFFFFFFFh
loc_7E841:
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
lea rdx, [rbp+var_18]
call _ma_bitmap_init
mov [rbp+var_D], al
mov rdi, [rbp+var_18]
add rdi, 1
mov rax, [rbp+var_8]
mov eax, [rax+7BCh]
mov esi, eax
call _ma_safe_mul
mov rcx, rax
mov rax, [rbp+var_8]
mov [rax+368h], rcx
mov al, [rbp+var_D]
add rsp, 20h
pop rbp
retn
| char ma_once_init_block_record(long long a1, int a2)
{
long long v2; // rcx
unsigned long long v4; // [rsp+8h] [rbp-18h] BYREF
char v5; // [rsp+13h] [rbp-Dh]
int v6; // [rsp+14h] [rbp-Ch]
long long v7; // [rsp+18h] [rbp-8h]
v7 = a1;
v6 = a2;
v4 = (unsigned long long)(1LL << (8 * (*(_BYTE *)(a1 + 992) - 1))) >> 1;
if ( !v4 )
v4 = -1LL;
v5 = ma_bitmap_init(v7, v6, &v4);
v2 = ma_safe_mul(v4 + 1, *(unsigned int *)(v7 + 1980));
*(_QWORD *)(v7 + 872) = v2;
return v5;
}
| _ma_once_init_block_record:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x3e0]
SUB EAX,0x1
SHL EAX,0x3
MOV EAX,EAX
MOV ECX,EAX
MOV EAX,0x1
SHL RAX,CL
SHR RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x0017e841
MOV qword ptr [RBP + -0x18],-0x1
LAB_0017e841:
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
LEA RDX,[RBP + -0x18]
CALL 0x001465e0
MOV byte ptr [RBP + -0xd],AL
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x1
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x7bc]
MOV ESI,EAX
CALL 0x0016e180
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x368],RCX
MOV AL,byte ptr [RBP + -0xd]
ADD RSP,0x20
POP RBP
RET
|
int1 _ma_once_init_block_record(long param_1,int4 param_2)
{
int8 uVar1;
ulong local_20;
int1 local_15;
int4 local_14;
long local_10;
local_20 = (ulong)(1L << (((char)*(int4 *)(param_1 + 0x3e0) + -1) * '\b' & 0x3fU)) >> 1;
if (local_20 == 0) {
local_20 = 0xffffffffffffffff;
}
local_14 = param_2;
local_10 = param_1;
local_15 = _ma_bitmap_init(param_1,param_2,&local_20);
uVar1 = _ma_safe_mul(local_20 + 1,*(int4 *)(local_10 + 0x7bc));
*(int8 *)(local_10 + 0x368) = uVar1;
return local_15;
}
|
|
6,145 | parseDotCloud(SEMANTICANALYZER::DotCloud&) | 11AgReS1SoR11[P]Graph/Common/Translator/src/Translator.cpp | Shape* parseDotCloud(SEMANTICANALYZER::DotCloud& dot_cloud){
DotCloud* _dtcld = new DotCloud();
_dtcld->id = dot_cloud.id;
parseCommonProperty(dot_cloud.externalProperties, _dtcld, {});
for(auto& _prop : dot_cloud.externalProperties){
if(_prop.key == "grid"){
if(_prop.value == "true") {_dtcld->grid = true;}
else if(_prop.value == "false") {_dtcld->grid = false;}
}
}
std::vector<Circle*> dots;
for(auto& dot : dot_cloud.dots){
Circle* _circle = new Circle();
_circle->id = "dot_" + std::to_string(nextDotId++);
parseCommonProperty(dot.internalProperties, _circle, _dtcld->style);
//for all circles set dot_cloud's style
dots.push_back(_circle);
}
_dtcld->dots = std::move(dots);
return _dtcld;
} | O0 | cpp | parseDotCloud(SEMANTICANALYZER::DotCloud&):
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x8(%rbp)
movl $0x80, %edi
callq 0x1b490
movq %rax, %rdi
movq %rdi, -0xd8(%rbp)
xorl %esi, %esi
movl $0x80, %edx
callq 0x1aad0
movq -0xd8(%rbp), %rdi
callq 0x1c110
movq -0xd8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x1a0c0
movq -0x8(%rbp), %rdi
addq $0x20, %rdi
movq -0x10(%rbp), %rsi
movw $0x0, -0x1c(%rbp)
movl $0x1, -0x18(%rbp)
movl $0xa, -0x14(%rbp)
leaq -0x1c(%rbp), %rdx
callq 0x1ba30
movq -0x8(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x1a660
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x1b3d0
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x1bd10
testb $0x1, %al
jne 0x1fe09
jmp 0x1fe86
leaq -0x30(%rbp), %rdi
callq 0x1c5a0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
leaq 0xa273(%rip), %rsi # 0x2a094
callq 0x1ca90
testb $0x1, %al
jne 0x1fe2c
jmp 0x1fe76
movq -0x40(%rbp), %rdi
addq $0x20, %rdi
leaq 0xa2ca(%rip), %rsi # 0x2a105
callq 0x1ca90
testb $0x1, %al
jne 0x1fe46
jmp 0x1fe50
movq -0x10(%rbp), %rax
movb $0x1, 0x78(%rax)
jmp 0x1fe74
movq -0x40(%rbp), %rdi
addq $0x20, %rdi
leaq 0xa2ab(%rip), %rsi # 0x2a10a
callq 0x1ca90
testb $0x1, %al
jne 0x1fe6a
jmp 0x1fe72
movq -0x10(%rbp), %rax
movb $0x0, 0x78(%rax)
jmp 0x1fe74
jmp 0x1fe76
jmp 0x1fe78
leaq -0x30(%rbp), %rdi
callq 0x1c480
jmp 0x1fdf6
leaq -0x58(%rbp), %rdi
callq 0x1b580
movq -0x8(%rbp), %rax
addq $0x38, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdi
callq 0x1a5c0
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rdi
callq 0x1bff0
movq %rax, -0x70(%rbp)
leaq -0x68(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x1bb70
testb $0x1, %al
jne 0x1fecb
jmp 0x1fff7
leaq -0x68(%rbp), %rdi
callq 0x1ae30
movq %rax, -0x78(%rbp)
movl $0x60, %edi
callq 0x1b490
movq %rax, -0xe0(%rbp)
jmp 0x1feeb
movq -0xe0(%rbp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rdi)
movaps %xmm0, 0x40(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
callq 0x1b4d0
movq -0xe0(%rbp), %rax
movq %rax, -0x80(%rbp)
movq 0x14645(%rip), %rsi # 0x34568
movq %rsi, %rax
incq %rax
movq %rax, 0x14638(%rip) # 0x34568
leaq -0xd0(%rbp), %rdi
callq 0x1a6b0
jmp 0x1ff3e
leaq 0xa1cb(%rip), %rsi # 0x2a110
leaq -0xb0(%rbp), %rdi
leaq -0xd0(%rbp), %rdx
callq 0x1c470
jmp 0x1ff5a
movq -0x80(%rbp), %rdi
addq $0x8, %rdi
leaq -0xb0(%rbp), %rsi
movq %rsi, -0xe8(%rbp)
callq 0x1b950
movq -0xe8(%rbp), %rdi
callq 0x1acd0
leaq -0xd0(%rbp), %rdi
callq 0x1acd0
movq -0x78(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq $0x48, %rdx
callq 0x1ba30
jmp 0x1ffa4
leaq -0x58(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x1a1b0
jmp 0x1ffb3
jmp 0x1ffb5
leaq -0x68(%rbp), %rdi
callq 0x1c390
jmp 0x1feb5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x2002c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x1acd0
jmp 0x2002c
movq -0x10(%rbp), %rdi
addq $0x60, %rdi
leaq -0x58(%rbp), %rsi
callq 0x1ad80
movq -0x10(%rbp), %rax
movq %rax, -0xf0(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x1b100
movq -0xf0(%rbp), %rax
addq $0xf0, %rsp
popq %rbp
retq
leaq -0x58(%rbp), %rdi
callq 0x1b100
movq -0x88(%rbp), %rdi
callq 0x1c610
nopw %cs:(%rax,%rax)
| _Z13parseDotCloudRN16SEMANTICANALYZER8DotCloudE:
push rbp
mov rbp, rsp
sub rsp, 0F0h
mov [rbp+var_8], rdi
mov edi, 80h; unsigned __int64
call __Znwm; operator new(ulong)
mov rdi, rax
mov [rbp+var_D8], rdi
xor esi, esi
mov edx, 80h
call _memset
mov rdi, [rbp+var_D8]; this
call __ZN8DotCloudC2Ev; DotCloud::DotCloud(void)
mov rax, [rbp+var_D8]
mov [rbp+var_10], rax
mov rsi, [rbp+var_8]
mov rdi, [rbp+var_10]
add rdi, 8
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&)
mov rdi, [rbp+var_8]
add rdi, 20h ; ' '
mov rsi, [rbp+var_10]
mov [rbp+var_1C], 0
mov [rbp+var_18], 1
mov [rbp+var_14], 0Ah
lea rdx, [rbp+var_1C]
call __Z19parseCommonPropertyRSt6vectorIN16SEMANTICANALYZER8PropertyESaIS1_EEP5ShapeRK5Style; parseCommonProperty(std::vector<SEMANTICANALYZER::Property> &,Shape *,Style const&)
mov rax, [rbp+var_8]
add rax, 20h ; ' '
mov [rbp+var_28], rax
mov rdi, [rbp+var_28]
call __ZNSt6vectorIN16SEMANTICANALYZER8PropertyESaIS1_EE5beginEv; std::vector<SEMANTICANALYZER::Property>::begin(void)
mov [rbp+var_30], rax
mov rdi, [rbp+var_28]
call __ZNSt6vectorIN16SEMANTICANALYZER8PropertyESaIS1_EE3endEv; std::vector<SEMANTICANALYZER::Property>::end(void)
mov [rbp+var_38], rax
loc_1FDF6:
lea rdi, [rbp+var_30]
lea rsi, [rbp+var_38]
call __ZN9__gnu_cxxneIPN16SEMANTICANALYZER8PropertyESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_; __gnu_cxx::operator!=<SEMANTICANALYZER::Property *,std::vector<SEMANTICANALYZER::Property>>(__gnu_cxx::__normal_iterator<SEMANTICANALYZER::Property *,std::vector<SEMANTICANALYZER::Property>> const&,__gnu_cxx::__normal_iterator<SEMANTICANALYZER::Property *,std::vector<SEMANTICANALYZER::Property>> const&)
test al, 1
jnz short loc_1FE09
jmp short loc_1FE86
loc_1FE09:
lea rdi, [rbp+var_30]
call __ZNK9__gnu_cxx17__normal_iteratorIPN16SEMANTICANALYZER8PropertyESt6vectorIS2_SaIS2_EEEdeEv; __gnu_cxx::__normal_iterator<SEMANTICANALYZER::Property *,std::vector<SEMANTICANALYZER::Property>>::operator*(void)
mov [rbp+var_40], rax
mov rdi, [rbp+var_40]
lea rsi, aGrid; "grid"
call __ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, 1
jnz short loc_1FE2C
jmp short loc_1FE76
loc_1FE2C:
mov rdi, [rbp+var_40]
add rdi, 20h ; ' '
lea rsi, aTrue; "true"
call __ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, 1
jnz short loc_1FE46
jmp short loc_1FE50
loc_1FE46:
mov rax, [rbp+var_10]
mov byte ptr [rax+78h], 1
jmp short loc_1FE74
loc_1FE50:
mov rdi, [rbp+var_40]
add rdi, 20h ; ' '
lea rsi, aFalse; "false"
call __ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, 1
jnz short loc_1FE6A
jmp short loc_1FE72
loc_1FE6A:
mov rax, [rbp+var_10]
mov byte ptr [rax+78h], 0
loc_1FE72:
jmp short $+2
loc_1FE74:
jmp short $+2
loc_1FE76:
jmp short $+2
loc_1FE78:
lea rdi, [rbp+var_30]
call __ZN9__gnu_cxx17__normal_iteratorIPN16SEMANTICANALYZER8PropertyESt6vectorIS2_SaIS2_EEEppEv; __gnu_cxx::__normal_iterator<SEMANTICANALYZER::Property *,std::vector<SEMANTICANALYZER::Property>>::operator++(void)
jmp loc_1FDF6
loc_1FE86:
lea rdi, [rbp+var_58]
call __ZNSt6vectorIP6CircleSaIS1_EEC2Ev; std::vector<Circle *>::vector(void)
mov rax, [rbp+var_8]
add rax, 38h ; '8'
mov [rbp+var_60], rax
mov rdi, [rbp+var_60]
call __ZNSt6vectorIN16SEMANTICANALYZER3DotESaIS1_EE5beginEv; std::vector<SEMANTICANALYZER::Dot>::begin(void)
mov [rbp+var_68], rax
mov rdi, [rbp+var_60]
call __ZNSt6vectorIN16SEMANTICANALYZER3DotESaIS1_EE3endEv; std::vector<SEMANTICANALYZER::Dot>::end(void)
mov [rbp+var_70], rax
loc_1FEB5:
lea rdi, [rbp+var_68]
lea rsi, [rbp+var_70]
call __ZN9__gnu_cxxneIPN16SEMANTICANALYZER3DotESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_; __gnu_cxx::operator!=<SEMANTICANALYZER::Dot *,std::vector<SEMANTICANALYZER::Dot>>(__gnu_cxx::__normal_iterator<SEMANTICANALYZER::Dot *,std::vector<SEMANTICANALYZER::Dot>> const&,__gnu_cxx::__normal_iterator<SEMANTICANALYZER::Dot *,std::vector<SEMANTICANALYZER::Dot>> const&)
test al, 1
jnz short loc_1FECB
jmp loc_1FFF7
loc_1FECB:
lea rdi, [rbp+var_68]
call __ZNK9__gnu_cxx17__normal_iteratorIPN16SEMANTICANALYZER3DotESt6vectorIS2_SaIS2_EEEdeEv; __gnu_cxx::__normal_iterator<SEMANTICANALYZER::Dot *,std::vector<SEMANTICANALYZER::Dot>>::operator*(void)
mov [rbp+var_78], rax
mov edi, 60h ; '`'; unsigned __int64
call __Znwm; operator new(ulong)
mov [rbp+var_E0], rax
jmp short $+2
loc_1FEEB:
mov rdi, [rbp+var_E0]; this
xorps xmm0, xmm0
movaps xmmword ptr [rdi+50h], xmm0
movaps xmmword ptr [rdi+40h], xmm0
movaps xmmword ptr [rdi+30h], xmm0
movaps xmmword ptr [rdi+20h], xmm0
movaps xmmword ptr [rdi+10h], xmm0
movaps xmmword ptr [rdi], xmm0
call __ZN6CircleC2Ev; Circle::Circle(void)
mov rax, [rbp+var_E0]
mov [rbp+var_80], rax
mov rsi, cs:_ZL9nextDotId; unsigned __int64
mov rax, rsi
inc rax
mov cs:_ZL9nextDotId, rax; nextDotId
lea rdi, [rbp+var_D0]; this
call __ZNSt7__cxx119to_stringEm; std::to_string(ulong)
jmp short $+2
loc_1FF3E:
lea rsi, aDot; "dot_"
lea rdi, [rbp+var_B0]
lea rdx, [rbp+var_D0]
call __ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
jmp short $+2
loc_1FF5A:
mov rdi, [rbp+var_80]
add rdi, 8
lea rsi, [rbp+var_B0]
mov [rbp+var_E8], rsi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [rbp+var_E8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_D0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rbp+var_78]
mov rsi, [rbp+var_80]
mov rdx, [rbp+var_10]
add rdx, 48h ; 'H'
call __Z19parseCommonPropertyRSt6vectorIN16SEMANTICANALYZER8PropertyESaIS1_EEP5ShapeRK5Style; parseCommonProperty(std::vector<SEMANTICANALYZER::Property> &,Shape *,Style const&)
jmp short $+2
loc_1FFA4:
lea rdi, [rbp+var_58]
lea rsi, [rbp+var_80]
call __ZNSt6vectorIP6CircleSaIS1_EE9push_backERKS1_; std::vector<Circle *>::push_back(Circle * const&)
jmp short $+2
loc_1FFB3:
jmp short $+2
loc_1FFB5:
lea rdi, [rbp+var_68]
call __ZN9__gnu_cxx17__normal_iteratorIPN16SEMANTICANALYZER3DotESt6vectorIS2_SaIS2_EEEppEv; __gnu_cxx::__normal_iterator<SEMANTICANALYZER::Dot *,std::vector<SEMANTICANALYZER::Dot>>::operator++(void)
jmp loc_1FEB5
mov rcx, rax
mov eax, edx
mov [rbp+var_88], rcx
mov [rbp+var_8C], eax
jmp short loc_2002C
mov rcx, rax
mov eax, edx
mov [rbp+var_88], rcx
mov [rbp+var_8C], eax
lea rdi, [rbp+var_D0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_2002C
loc_1FFF7:
mov rdi, [rbp+var_10]
add rdi, 60h ; '`'
lea rsi, [rbp+var_58]
call __ZNSt6vectorIP6CircleSaIS1_EEaSEOS3_; std::vector<Circle *>::operator=(std::vector<Circle *>&&)
mov rax, [rbp+var_10]
mov [rbp+var_F0], rax
lea rdi, [rbp+var_58]
call __ZNSt6vectorIP6CircleSaIS1_EED2Ev; std::vector<Circle *>::~vector()
mov rax, [rbp+var_F0]
add rsp, 0F0h
pop rbp
retn
loc_2002C:
lea rdi, [rbp+var_58]
call __ZNSt6vectorIP6CircleSaIS1_EED2Ev; std::vector<Circle *>::~vector()
mov rdi, [rbp+var_88]
call __Unwind_Resume
| DotCloud * parseDotCloud(DotCloud *a1)
{
unsigned long long v1; // rsi
DotCloud *v3; // [rsp+0h] [rbp-F0h]
Circle *v4; // [rsp+10h] [rbp-E0h]
DotCloud *v5; // [rsp+18h] [rbp-D8h]
_BYTE v6[32]; // [rsp+20h] [rbp-D0h] BYREF
_BYTE v7[36]; // [rsp+40h] [rbp-B0h] BYREF
Circle *v8; // [rsp+70h] [rbp-80h] BYREF
long long v9; // [rsp+78h] [rbp-78h]
long long v10; // [rsp+80h] [rbp-70h] BYREF
long long v11; // [rsp+88h] [rbp-68h] BYREF
char *v12; // [rsp+90h] [rbp-60h]
_BYTE v13[24]; // [rsp+98h] [rbp-58h] BYREF
long long v14; // [rsp+B0h] [rbp-40h]
long long v15; // [rsp+B8h] [rbp-38h] BYREF
long long v16; // [rsp+C0h] [rbp-30h] BYREF
char *v17; // [rsp+C8h] [rbp-28h]
long long v18; // [rsp+D4h] [rbp-1Ch] BYREF
int v19; // [rsp+DCh] [rbp-14h]
DotCloud *v20; // [rsp+E0h] [rbp-10h]
DotCloud *v21; // [rsp+E8h] [rbp-8h]
v21 = a1;
v5 = (DotCloud *)operator new(0x80uLL);
memset(v5, 0LL, 128LL);
DotCloud::DotCloud(v5);
v20 = v5;
std::string::operator=((char *)v5 + 8, a1);
LOWORD(v18) = 0;
HIDWORD(v18) = 1;
v19 = 10;
parseCommonProperty((long long)a1 + 32, (long long)v5, &v18);
v17 = (char *)v21 + 32;
v16 = std::vector<SEMANTICANALYZER::Property>::begin((char *)v21 + 32);
v15 = std::vector<SEMANTICANALYZER::Property>::end(v17);
while ( (__gnu_cxx::operator!=<SEMANTICANALYZER::Property *,std::vector<SEMANTICANALYZER::Property>>(&v16, &v15) & 1) != 0 )
{
v14 = __gnu_cxx::__normal_iterator<SEMANTICANALYZER::Property *,std::vector<SEMANTICANALYZER::Property>>::operator*(&v16);
if ( (std::operator==<char>(v14, "grid") & 1) != 0 )
{
if ( (std::operator==<char>(v14 + 32, "true") & 1) != 0 )
{
*((_BYTE *)v20 + 120) = 1;
}
else if ( (std::operator==<char>(v14 + 32, "false") & 1) != 0 )
{
*((_BYTE *)v20 + 120) = 0;
}
}
__gnu_cxx::__normal_iterator<SEMANTICANALYZER::Property *,std::vector<SEMANTICANALYZER::Property>>::operator++(&v16);
}
std::vector<Circle *>::vector(v13);
v12 = (char *)v21 + 56;
v11 = std::vector<SEMANTICANALYZER::Dot>::begin((char *)v21 + 56);
v10 = std::vector<SEMANTICANALYZER::Dot>::end(v12);
while ( (__gnu_cxx::operator!=<SEMANTICANALYZER::Dot *,std::vector<SEMANTICANALYZER::Dot>>(&v11, &v10) & 1) != 0 )
{
v9 = __gnu_cxx::__normal_iterator<SEMANTICANALYZER::Dot *,std::vector<SEMANTICANALYZER::Dot>>::operator*(&v11);
v4 = (Circle *)operator new(0x60uLL);
*((_OWORD *)v4 + 5) = 0LL;
*((_OWORD *)v4 + 4) = 0LL;
*((_OWORD *)v4 + 3) = 0LL;
*((_OWORD *)v4 + 2) = 0LL;
*((_OWORD *)v4 + 1) = 0LL;
*(_OWORD *)v4 = 0LL;
Circle::Circle(v4);
v8 = v4;
v1 = nextDotId++;
std::to_string((std::__cxx11 *)v6, v1);
std::operator+<char>(v7, "dot_", v6);
std::string::operator=((char *)v8 + 8);
std::string::~string(v7);
std::string::~string(v6);
parseCommonProperty(v9, (long long)v8, (long long *)v20 + 9);
std::vector<Circle *>::push_back(v13, &v8);
__gnu_cxx::__normal_iterator<SEMANTICANALYZER::Dot *,std::vector<SEMANTICANALYZER::Dot>>::operator++(&v11);
}
std::vector<Circle *>::operator=((char *)v20 + 96, v13);
v3 = v20;
std::vector<Circle *>::~vector(v13);
return v3;
}
| parseDotCloud:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xf0
MOV qword ptr [RBP + -0x8],RDI
MOV EDI,0x80
CALL 0x0011b490
MOV RDI,RAX
MOV qword ptr [RBP + -0xd8],RDI
XOR ESI,ESI
MOV EDX,0x80
CALL 0x0011aad0
MOV RDI,qword ptr [RBP + -0xd8]
CALL 0x0011c110
MOV RAX,qword ptr [RBP + -0xd8]
MOV qword ptr [RBP + -0x10],RAX
MOV RSI,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x8
CALL 0x0011a0c0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x20
MOV RSI,qword ptr [RBP + -0x10]
MOV word ptr [RBP + -0x1c],0x0
MOV dword ptr [RBP + -0x18],0x1
MOV dword ptr [RBP + -0x14],0xa
LEA RDX,[RBP + -0x1c]
CALL 0x0011ba30
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x20
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0011a660
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0011b3d0
MOV qword ptr [RBP + -0x38],RAX
LAB_0011fdf6:
LEA RDI,[RBP + -0x30]
LEA RSI,[RBP + -0x38]
CALL 0x0011bd10
TEST AL,0x1
JNZ 0x0011fe09
JMP 0x0011fe86
LAB_0011fe09:
LEA RDI,[RBP + -0x30]
CALL 0x0011c5a0
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x40]
LEA RSI,[0x12a094]
CALL 0x0011ca90
TEST AL,0x1
JNZ 0x0011fe2c
JMP 0x0011fe76
LAB_0011fe2c:
MOV RDI,qword ptr [RBP + -0x40]
ADD RDI,0x20
LEA RSI,[0x12a105]
CALL 0x0011ca90
TEST AL,0x1
JNZ 0x0011fe46
JMP 0x0011fe50
LAB_0011fe46:
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x78],0x1
JMP 0x0011fe74
LAB_0011fe50:
MOV RDI,qword ptr [RBP + -0x40]
ADD RDI,0x20
LEA RSI,[0x12a10a]
CALL 0x0011ca90
TEST AL,0x1
JNZ 0x0011fe6a
JMP 0x0011fe72
LAB_0011fe6a:
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x78],0x0
LAB_0011fe72:
JMP 0x0011fe74
LAB_0011fe74:
JMP 0x0011fe76
LAB_0011fe76:
JMP 0x0011fe78
LAB_0011fe78:
LEA RDI,[RBP + -0x30]
CALL 0x0011c480
JMP 0x0011fdf6
LAB_0011fe86:
LEA RDI,[RBP + -0x58]
CALL 0x0011b580
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x38
MOV qword ptr [RBP + -0x60],RAX
MOV RDI,qword ptr [RBP + -0x60]
CALL 0x0011a5c0
MOV qword ptr [RBP + -0x68],RAX
MOV RDI,qword ptr [RBP + -0x60]
CALL 0x0011bff0
MOV qword ptr [RBP + -0x70],RAX
LAB_0011feb5:
LEA RDI,[RBP + -0x68]
LEA RSI,[RBP + -0x70]
CALL 0x0011bb70
TEST AL,0x1
JNZ 0x0011fecb
JMP 0x0011fff7
LAB_0011fecb:
LEA RDI,[RBP + -0x68]
CALL 0x0011ae30
MOV qword ptr [RBP + -0x78],RAX
LAB_0011fed8:
MOV EDI,0x60
CALL 0x0011b490
MOV qword ptr [RBP + -0xe0],RAX
JMP 0x0011feeb
LAB_0011feeb:
MOV RDI,qword ptr [RBP + -0xe0]
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RDI + 0x50],XMM0
MOVAPS xmmword ptr [RDI + 0x40],XMM0
MOVAPS xmmword ptr [RDI + 0x30],XMM0
MOVAPS xmmword ptr [RDI + 0x20],XMM0
MOVAPS xmmword ptr [RDI + 0x10],XMM0
MOVAPS xmmword ptr [RDI],XMM0
CALL 0x0011b4d0
MOV RAX,qword ptr [RBP + -0xe0]
MOV qword ptr [RBP + -0x80],RAX
MOV RSI,qword ptr [0x00134568]
MOV RAX,RSI
INC RAX
MOV qword ptr [0x00134568],RAX
LEA RDI,[RBP + -0xd0]
CALL 0x0011a6b0
JMP 0x0011ff3e
LAB_0011ff3e:
LEA RSI,[0x12a110]
LEA RDI,[RBP + -0xb0]
LEA RDX,[RBP + -0xd0]
CALL 0x0011c470
JMP 0x0011ff5a
LAB_0011ff5a:
MOV RDI,qword ptr [RBP + -0x80]
ADD RDI,0x8
LEA RSI,[RBP + -0xb0]
MOV qword ptr [RBP + -0xe8],RSI
CALL 0x0011b950
MOV RDI,qword ptr [RBP + -0xe8]
CALL 0x0011acd0
LEA RDI,[RBP + -0xd0]
CALL 0x0011acd0
MOV RDI,qword ptr [RBP + -0x78]
MOV RSI,qword ptr [RBP + -0x80]
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,0x48
LAB_0011ff9d:
CALL 0x0011ba30
JMP 0x0011ffa4
LAB_0011ffa4:
LEA RDI,[RBP + -0x58]
LEA RSI,[RBP + -0x80]
CALL 0x0011a1b0
LAB_0011ffb1:
JMP 0x0011ffb3
LAB_0011ffb3:
JMP 0x0011ffb5
LAB_0011ffb5:
LEA RDI,[RBP + -0x68]
CALL 0x0011c390
JMP 0x0011feb5
LAB_0011fff7:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x60
LEA RSI,[RBP + -0x58]
CALL 0x0011ad80
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0xf0],RAX
LEA RDI,[RBP + -0x58]
CALL 0x0011b100
MOV RAX,qword ptr [RBP + -0xf0]
ADD RSP,0xf0
POP RBP
RET
|
/* parseDotCloud(SEMANTICANALYZER::DotCloud&) */
Shape * parseDotCloud(DotCloud *param_1)
{
ulong uVar1;
Shape *pSVar2;
bool bVar3;
DotCloud *this;
Circle *this_00;
__cxx11 local_d8 [32];
string local_b8 [48];
Circle *local_88;
vector *local_80;
int8 local_78;
int8 local_70;
vector<SEMANTICANALYZER::Dot,std::allocator<SEMANTICANALYZER::Dot>> *local_68;
vector<Circle*,std::allocator<Circle*>> local_60 [24];
string *local_48;
int8 local_40;
int8 local_38;
vector<SEMANTICANALYZER::Property,std::allocator<SEMANTICANALYZER::Property>> *local_30;
int2 local_24 [2];
int4 local_20;
int4 local_1c;
Shape *local_18;
DotCloud *local_10;
local_10 = param_1;
this = (DotCloud *)operator_new(0x80);
memset(this,0,0x80);
DotCloud::DotCloud(this);
local_18 = (Shape *)this;
std::__cxx11::string::operator=((string *)(this + 8),(string *)local_10);
local_24[0] = 0;
local_20 = 1;
local_1c = 10;
parseCommonProperty((vector *)(local_10 + 0x20),local_18,(Style *)local_24);
local_30 = (vector<SEMANTICANALYZER::Property,std::allocator<SEMANTICANALYZER::Property>> *)
(local_10 + 0x20);
local_38 = std::vector<SEMANTICANALYZER::Property,std::allocator<SEMANTICANALYZER::Property>>::
begin(local_30);
local_40 = std::vector<SEMANTICANALYZER::Property,std::allocator<SEMANTICANALYZER::Property>>::end
(local_30);
while (bVar3 = __gnu_cxx::operator!=
((__normal_iterator *)&local_38,(__normal_iterator *)&local_40), bVar3) {
local_48 = (string *)
__gnu_cxx::
__normal_iterator<SEMANTICANALYZER::Property*,std::vector<SEMANTICANALYZER::Property,std::allocator<SEMANTICANALYZER::Property>>>
::operator*((__normal_iterator<SEMANTICANALYZER::Property*,std::vector<SEMANTICANALYZER::Property,std::allocator<SEMANTICANALYZER::Property>>>
*)&local_38);
bVar3 = std::operator==(local_48,"grid");
if (bVar3) {
bVar3 = std::operator==(local_48 + 0x20,"true");
if (bVar3) {
local_18[0x78] = (Shape)0x1;
}
else {
bVar3 = std::operator==(local_48 + 0x20,"false");
if (bVar3) {
local_18[0x78] = (Shape)0x0;
}
}
}
__gnu_cxx::
__normal_iterator<SEMANTICANALYZER::Property*,std::vector<SEMANTICANALYZER::Property,std::allocator<SEMANTICANALYZER::Property>>>
::operator++((__normal_iterator<SEMANTICANALYZER::Property*,std::vector<SEMANTICANALYZER::Property,std::allocator<SEMANTICANALYZER::Property>>>
*)&local_38);
}
std::vector<Circle*,std::allocator<Circle*>>::vector(local_60);
local_68 = (vector<SEMANTICANALYZER::Dot,std::allocator<SEMANTICANALYZER::Dot>> *)
(local_10 + 0x38);
local_70 = std::vector<SEMANTICANALYZER::Dot,std::allocator<SEMANTICANALYZER::Dot>>::begin
(local_68);
local_78 = std::vector<SEMANTICANALYZER::Dot,std::allocator<SEMANTICANALYZER::Dot>>::end(local_68)
;
while (bVar3 = __gnu_cxx::operator!=
((__normal_iterator *)&local_70,(__normal_iterator *)&local_78), bVar3) {
local_80 = (vector *)
__gnu_cxx::
__normal_iterator<SEMANTICANALYZER::Dot*,std::vector<SEMANTICANALYZER::Dot,std::allocator<SEMANTICANALYZER::Dot>>>
::operator*((__normal_iterator<SEMANTICANALYZER::Dot*,std::vector<SEMANTICANALYZER::Dot,std::allocator<SEMANTICANALYZER::Dot>>>
*)&local_70);
/* try { // try from 0011fed8 to 0011ff3b has its CatchHandler @ 0011ffc3 */
this_00 = (Circle *)operator_new(0x60);
*(int8 *)(this_00 + 0x50) = 0;
*(int8 *)(this_00 + 0x58) = 0;
*(int8 *)(this_00 + 0x40) = 0;
*(int8 *)(this_00 + 0x48) = 0;
*(int8 *)(this_00 + 0x30) = 0;
*(int8 *)(this_00 + 0x38) = 0;
*(int8 *)(this_00 + 0x20) = 0;
*(int8 *)(this_00 + 0x28) = 0;
*(int8 *)(this_00 + 0x10) = 0;
*(int8 *)(this_00 + 0x18) = 0;
*(int8 *)this_00 = 0;
*(int8 *)(this_00 + 8) = 0;
Circle::Circle(this_00);
uVar1 = nextDotId;
nextDotId = nextDotId + 1;
local_88 = this_00;
std::__cxx11::to_string(local_d8,uVar1);
/* try { // try from 0011ff3e to 0011ff57 has its CatchHandler @ 0011ffd7 */
std::operator+((char *)local_b8,(string *)&DAT_0012a110);
std::__cxx11::string::operator=((string *)(local_88 + 8),local_b8);
std::__cxx11::string::~string(local_b8);
std::__cxx11::string::~string((string *)local_d8);
/* try { // try from 0011ff9d to 0011ffb0 has its CatchHandler @ 0011ffc3 */
parseCommonProperty(local_80,(Shape *)local_88,(Style *)(local_18 + 0x48));
std::vector<Circle*,std::allocator<Circle*>>::push_back(local_60,&local_88);
__gnu_cxx::
__normal_iterator<SEMANTICANALYZER::Dot*,std::vector<SEMANTICANALYZER::Dot,std::allocator<SEMANTICANALYZER::Dot>>>
::operator++((__normal_iterator<SEMANTICANALYZER::Dot*,std::vector<SEMANTICANALYZER::Dot,std::allocator<SEMANTICANALYZER::Dot>>>
*)&local_70);
}
std::vector<Circle*,std::allocator<Circle*>>::operator=
((vector<Circle*,std::allocator<Circle*>> *)(local_18 + 0x60),(vector *)local_60);
pSVar2 = local_18;
std::vector<Circle*,std::allocator<Circle*>>::~vector(local_60);
return pSVar2;
}
|
|
6,146 | parseDotCloud(SEMANTICANALYZER::DotCloud&) | 11AgReS1SoR11[P]Graph/Common/Translator/src/Translator.cpp | Shape* parseDotCloud(SEMANTICANALYZER::DotCloud& dot_cloud){
DotCloud* _dtcld = new DotCloud();
_dtcld->id = dot_cloud.id;
parseCommonProperty(dot_cloud.externalProperties, _dtcld, {});
for(auto& _prop : dot_cloud.externalProperties){
if(_prop.key == "grid"){
if(_prop.value == "true") {_dtcld->grid = true;}
else if(_prop.value == "false") {_dtcld->grid = false;}
}
}
std::vector<Circle*> dots;
for(auto& dot : dot_cloud.dots){
Circle* _circle = new Circle();
_circle->id = "dot_" + std::to_string(nextDotId++);
parseCommonProperty(dot.internalProperties, _circle, _dtcld->style);
//for all circles set dot_cloud's style
dots.push_back(_circle);
}
_dtcld->dots = std::move(dots);
return _dtcld;
} | O3 | cpp | parseDotCloud(SEMANTICANALYZER::DotCloud&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %r15
movl $0x80, %edi
callq 0x6390
movq %rax, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rax)
movaps %xmm0, 0x20(%rax)
movaps %xmm0, 0x30(%rax)
movaps %xmm0, 0x40(%rax)
movaps %xmm0, 0x50(%rax)
movaps %xmm0, 0x70(%rax)
movaps %xmm0, 0x60(%rax)
leaq 0x8(%rax), %rdi
addq $0x18, %rax
movq %rax, 0x8(%rbx)
xorl %eax, %eax
movb %al, 0x18(%rbx)
leaq 0x38(%rbx), %rcx
movq %rcx, 0x28(%rbx)
movb %al, 0x38(%rbx)
movl $0x1, 0x4c(%rbx)
movl $0xa, 0x50(%rbx)
movl $0x0, 0x58(%rbx)
movq 0x6727(%rip), %rax # 0xef38
addq $0x10, %rax
movq %rax, (%rbx)
movups %xmm0, 0x69(%rbx)
movq %r15, %rsi
callq 0x61d0
leaq 0x20(%r15), %rdi
leaq 0x48(%rsp), %rdx
movw $0x0, (%rdx)
movabsq $0xa00000001, %rax # imm = 0xA00000001
movq %rax, 0x4(%rdx)
movq %rbx, (%rsp)
movq %rbx, %rsi
callq 0x64a0
movq 0x20(%r15), %r14
movq 0x28(%r15), %rbx
cmpq %rbx, %r14
je 0x88b2
leaq 0x28a8(%rip), %r12 # 0xb108
leaq 0x290d(%rip), %r13 # 0xb174
movq %r14, %rdi
movq %r12, %rsi
callq 0x60f0
testl %eax, %eax
jne 0x88a9
leaq 0x20(%r14), %rbp
movq %rbp, %rdi
movq %r13, %rsi
callq 0x60f0
testl %eax, %eax
je 0x88a0
movq %rbp, %rdi
leaq 0x28e6(%rip), %rsi # 0xb179
callq 0x60f0
testl %eax, %eax
jne 0x88a9
xorl %eax, %eax
jmp 0x88a2
movb $0x1, %al
movq (%rsp), %rcx
movb %al, 0x78(%rcx)
addq $0x40, %r14
cmpq %rbx, %r14
jne 0x8867
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x38(%r15), %r14
movq 0x40(%r15), %rax
movq %rax, 0x70(%rsp)
cmpq %rax, %r14
je 0x8ad9
movq (%rsp), %rax
addq $0x48, %rax
movq %rax, 0x68(%rsp)
leaq 0x58(%rsp), %rbx
movq 0x669e(%rip), %r12 # 0xef90
addq $0x10, %r12
leaq 0x28(%rsp), %r15
movabsq $0x346dc5d63886594b, %rbp # imm = 0x346DC5D63886594B
movl $0x60, %edi
callq 0x6390
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rax)
movaps %xmm0, 0x20(%rax)
movaps %xmm0, 0x30(%rax)
movaps %xmm0, 0x40(%rax)
leaq 0x18(%rax), %rcx
movq %rcx, 0x8(%rax)
xorl %edx, %edx
movb %dl, 0x18(%rax)
movq %rax, %rcx
addq $0x38, %rcx
movq %rcx, 0x28(%rax)
movb %dl, 0x38(%rax)
movsd 0x26bb(%rip), %xmm0 # 0xb000
movups %xmm0, 0x4c(%rax)
movq %r12, (%rax)
movl $0x1, 0x5c(%rax)
movq %rax, 0x8(%rsp)
movq 0x6a61(%rip), %r13 # 0xf3c0
leaq 0x1(%r13), %rax
movq %rax, 0x6a56(%rip) # 0xf3c0
movl $0x1, %esi
cmpq $0xa, %r13
jb 0x89ba
movl $0x4, %esi
movq %r13, %rcx
cmpq $0x63, %rcx
jbe 0x89b3
cmpq $0x3e7, %rcx # imm = 0x3E7
jbe 0x89b8
cmpq $0x2710, %rcx # imm = 0x2710
jb 0x89ba
movq %rcx, %rax
mulq %rbp
shrq $0xb, %rdx
addl $0x4, %esi
cmpq $0x1869f, %rcx # imm = 0x1869F
movq %rdx, %rcx
ja 0x897d
addl $-0x3, %esi
jmp 0x89ba
addl $-0x2, %esi
jmp 0x89ba
decl %esi
movl %esi, %esi
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq %r15, %rdi
xorl %edx, %edx
callq 0x6460
movq 0x28(%rsp), %rdi
movl 0x30(%rsp), %esi
movq %r13, %rdx
callq 0x6350
movl $0x4, %r8d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x278a(%rip), %rcx # 0xb17f
callq 0x6400
movq %rbx, 0x48(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8a1d
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
jmp 0x8a23
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
movq %rdx, 0x50(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rdi
addq $0x8, %rdi
leaq 0x48(%rsp), %rsi
callq 0x6470
movq 0x48(%rsp), %rdi
cmpq %rbx, %rdi
je 0x8a65
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x63b0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x8a81
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x63b0
movq 0x8(%rsp), %rsi
movq %r14, %rdi
movq 0x68(%rsp), %rdx
callq 0x64a0
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x8aaf
movq 0x8(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x18(%rsp)
jmp 0x8abe
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x6670
addq $0x18, %r14
cmpq 0x70(%rsp), %r14
jne 0x8905
movaps 0x10(%rsp), %xmm0
movq 0x20(%rsp), %rax
jmp 0x8adb
xorl %eax, %eax
movq (%rsp), %rcx
movq 0x60(%rcx), %rdi
movq 0x70(%rcx), %rsi
movups %xmm0, 0x60(%rcx)
movq %rax, 0x70(%rcx)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
testq %rdi, %rdi
je 0x8b24
subq %rdi, %rsi
callq 0x63b0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x8b24
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x63b0
movq (%rsp), %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8b5a
movq %rax, %r14
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x8b5d
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x63b0
jmp 0x8b5d
movq %rax, %r14
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x8b74
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x63b0
movq %r14, %rdi
callq 0x66c0
| _Z13parseDotCloudRN16SEMANTICANALYZER8DotCloudE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov r15, rdi
mov edi, 80h; unsigned __int64
call __Znwm; operator new(ulong)
mov rbx, rax
xorps xmm0, xmm0
movaps xmmword ptr [rax+10h], xmm0
movaps xmmword ptr [rax+20h], xmm0
movaps xmmword ptr [rax+30h], xmm0
movaps xmmword ptr [rax+40h], xmm0
movaps xmmword ptr [rax+50h], xmm0
movaps xmmword ptr [rax+70h], xmm0
movaps xmmword ptr [rax+60h], xmm0
lea rdi, [rax+8]
add rax, 18h
mov [rbx+8], rax
xor eax, eax
mov [rbx+18h], al
lea rcx, [rbx+38h]
mov [rbx+28h], rcx
mov [rbx+38h], al
mov dword ptr [rbx+4Ch], 1
mov dword ptr [rbx+50h], 0Ah
mov dword ptr [rbx+58h], 0
mov rax, cs:_ZTIN16SEMANTICANALYZER5GraphE_0; `typeinfo for'SEMANTICANALYZER::Graph
add rax, 10h
mov [rbx], rax
movups xmmword ptr [rbx+69h], xmm0
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
lea rdi, [r15+20h]
lea rdx, [rsp+0A8h+var_60]
mov word ptr [rdx], 0
mov rax, 0A00000001h
mov [rdx+4], rax
mov [rsp+0A8h+var_A8], rbx
mov rsi, rbx
call __Z19parseCommonPropertyRSt6vectorIN16SEMANTICANALYZER8PropertyESaIS1_EEP5ShapeRK5Style; parseCommonProperty(std::vector<SEMANTICANALYZER::Property> &,Shape *,Style const&)
mov r14, [r15+20h]
mov rbx, [r15+28h]
cmp r14, rbx
jz short loc_88B2
lea r12, aGrid; "grid"
lea r13, aTrue; "true"
loc_8867:
mov rdi, r14
mov rsi, r12
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jnz short loc_88A9
lea rbp, [r14+20h]
mov rdi, rbp
mov rsi, r13
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_88A0
mov rdi, rbp
lea rsi, aFalse; "false"
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jnz short loc_88A9
xor eax, eax
jmp short loc_88A2
loc_88A0:
mov al, 1
loc_88A2:
mov rcx, [rsp+0A8h+var_A8]
mov [rcx+78h], al
loc_88A9:
add r14, 40h ; '@'
cmp r14, rbx
jnz short loc_8867
loc_88B2:
xorps xmm0, xmm0
movaps xmmword ptr [rsp+0A8h+var_98], xmm0
mov [rsp+0A8h+var_88], 0
mov r14, [r15+38h]
mov rax, [r15+40h]
mov [rsp+0A8h+var_38], rax
cmp r14, rax
jz loc_8AD9
mov rax, [rsp+0A8h+var_A8]
add rax, 48h ; 'H'
mov [rsp+0A8h+var_40], rax
lea rbx, [rsp+0A8h+var_50]
mov r12, cs:_ZTV6Circle_ptr
add r12, 10h
lea r15, [rsp+0A8h+var_80]
mov rbp, 346DC5D63886594Bh
loc_8905:
mov edi, 60h ; '`'; unsigned __int64
call __Znwm; operator new(ulong)
xorps xmm0, xmm0
movaps xmmword ptr [rax+10h], xmm0
movaps xmmword ptr [rax+20h], xmm0
movaps xmmword ptr [rax+30h], xmm0
movaps xmmword ptr [rax+40h], xmm0
lea rcx, [rax+18h]
mov [rax+8], rcx
xor edx, edx
mov [rax+18h], dl
mov rcx, rax
add rcx, 38h ; '8'
mov [rax+28h], rcx
mov [rax+38h], dl
movsd xmm0, cs:qword_B000
movups xmmword ptr [rax+4Ch], xmm0
mov [rax], r12
mov dword ptr [rax+5Ch], 1
mov [rsp+0A8h+var_A0], rax
mov r13, cs:_ZL9nextDotId; nextDotId
lea rax, [r13+1]
mov cs:_ZL9nextDotId, rax; nextDotId
mov esi, 1
cmp r13, 0Ah
jb short loc_89BA
mov esi, 4
mov rcx, r13
loc_897D:
cmp rcx, 63h ; 'c'
jbe short loc_89B3
cmp rcx, 3E7h
jbe short loc_89B8
cmp rcx, 2710h
jb short loc_89BA
mov rax, rcx
mul rbp
shr rdx, 0Bh
add esi, 4
cmp rcx, 1869Fh
mov rcx, rdx
ja short loc_897D
add esi, 0FFFFFFFDh
jmp short loc_89BA
loc_89B3:
add esi, 0FFFFFFFEh
jmp short loc_89BA
loc_89B8:
dec esi
loc_89BA:
mov esi, esi
lea rax, [rsp+0A8h+var_70]
mov [rsp+0A8h+var_80], rax
mov rdi, r15
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov rdi, [rsp+0A8h+var_80]
mov esi, [rsp+0A8h+var_78]
mov rdx, r13
call __ZNSt8__detail18__to_chars_10_implImEEvPcjT_; std::__detail::__to_chars_10_impl<ulong>(char *,uint,ulong)
mov r8d, 4
mov rdi, r15
xor esi, esi
xor edx, edx
lea rcx, aDot; "dot_"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
mov [rsp+0A8h+var_60], rbx
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_8A1D
mov [rsp+0A8h+var_60], rdx
mov rdx, [rcx]
mov [rsp+0A8h+var_50], rdx
jmp short loc_8A23
loc_8A1D:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rbx], xmm0
loc_8A23:
mov rdx, [rax+8]
mov [rsp+0A8h+var_58], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rdi, [rsp+0A8h+var_A0]
add rdi, 8
lea rsi, [rsp+0A8h+var_60]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [rsp+0A8h+var_60]; void *
cmp rdi, rbx
jz short loc_8A65
mov rsi, [rsp+0A8h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8A65:
mov rdi, [rsp+0A8h+var_80]; void *
lea rax, [rsp+0A8h+var_70]
cmp rdi, rax
jz short loc_8A81
mov rsi, [rsp+0A8h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8A81:
mov rsi, [rsp+0A8h+var_A0]
mov rdi, r14
mov rdx, [rsp+0A8h+var_40]
call __Z19parseCommonPropertyRSt6vectorIN16SEMANTICANALYZER8PropertyESaIS1_EEP5ShapeRK5Style; parseCommonProperty(std::vector<SEMANTICANALYZER::Property> &,Shape *,Style const&)
mov rsi, [rsp+0A8h+var_98+8]
cmp rsi, [rsp+0A8h+var_88]
jz short loc_8AAF
mov rax, [rsp+0A8h+var_A0]
mov [rsi], rax
add [rsp+0A8h+var_98+8], 8
jmp short loc_8ABE
loc_8AAF:
lea rdi, [rsp+0A8h+var_98]
lea rdx, [rsp+0A8h+var_A0]
call __ZNSt6vectorIP6CircleSaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_; std::vector<Circle *>::_M_realloc_insert<Circle * const&>(__gnu_cxx::__normal_iterator<Circle **,std::vector<Circle *>>,Circle * const&)
loc_8ABE:
add r14, 18h
cmp r14, [rsp+0A8h+var_38]
jnz loc_8905
movaps xmm0, xmmword ptr [rsp+0A8h+var_98]
mov rax, [rsp+0A8h+var_88]
jmp short loc_8ADB
loc_8AD9:
xor eax, eax
loc_8ADB:
mov rcx, [rsp+0A8h+var_A8]
mov rdi, [rcx+60h]; void *
mov rsi, [rcx+70h]
movups xmmword ptr [rcx+60h], xmm0
mov [rcx+70h], rax
xorps xmm0, xmm0
movaps xmmword ptr [rsp+0A8h+var_98], xmm0
mov [rsp+0A8h+var_88], 0
test rdi, rdi
jz short loc_8B24
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
mov rdi, [rsp+0A8h+var_98]; void *
test rdi, rdi
jz short loc_8B24
mov rsi, [rsp+0A8h+var_88]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8B24:
mov rax, [rsp+0A8h+var_A8]
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_8B5A
mov r14, rax
mov rdi, [rsp+arg_20]; void *
lea rax, [rsp+arg_30]
cmp rdi, rax
jz short loc_8B5D
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_8B5D
loc_8B5A:
mov r14, rax
loc_8B5D:
mov rdi, [rsp+arg_8]; void *
test rdi, rdi
jz short loc_8B74
mov rsi, [rsp+arg_18]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8B74:
mov rdi, r14
call __Unwind_Resume
| long long parseDotCloud(long long *a1)
{
long long v1; // rbx
long long v2; // r14
long long i; // rbx
char v4; // al
__int128 v5; // xmm0
long long *v6; // r14
long long v7; // rax
__int128 v8; // xmm0
unsigned long long v9; // r13
unsigned int v10; // esi
unsigned long long v11; // rcx
bool v12; // cc
long long v13; // rax
__int128 *v14; // rcx
void *v15; // rax
void *v16; // rdi
long long v17; // rsi
long long v19; // [rsp+0h] [rbp-A8h]
long long v20; // [rsp+8h] [rbp-A0h] BYREF
void *v21[2]; // [rsp+10h] [rbp-98h] BYREF
void *v22; // [rsp+20h] [rbp-88h]
void *v23; // [rsp+28h] [rbp-80h] BYREF
unsigned int v24; // [rsp+30h] [rbp-78h]
_QWORD v25[2]; // [rsp+38h] [rbp-70h] BYREF
__int128 v26; // [rsp+48h] [rbp-60h] BYREF
__int128 v27; // [rsp+58h] [rbp-50h] BYREF
long long *v28; // [rsp+68h] [rbp-40h]
long long *v29; // [rsp+70h] [rbp-38h]
v1 = operator new(0x80uLL);
*(_OWORD *)(v1 + 16) = 0LL;
*(_OWORD *)(v1 + 32) = 0LL;
*(_OWORD *)(v1 + 48) = 0LL;
*(_OWORD *)(v1 + 64) = 0LL;
*(_OWORD *)(v1 + 80) = 0LL;
*(_OWORD *)(v1 + 112) = 0LL;
*(_OWORD *)(v1 + 96) = 0LL;
*(_QWORD *)(v1 + 8) = v1 + 24;
*(_BYTE *)(v1 + 24) = 0;
*(_QWORD *)(v1 + 40) = v1 + 56;
*(_BYTE *)(v1 + 56) = 0;
*(_DWORD *)(v1 + 76) = 1;
*(_DWORD *)(v1 + 80) = 10;
*(_DWORD *)(v1 + 88) = 0;
*(_QWORD *)v1 = (char *)&`vtable for'DotCloud + 16;
*(_OWORD *)(v1 + 105) = 0LL;
std::string::_M_assign(v1 + 8, a1);
LOWORD(v26) = 0;
*(_QWORD *)((char *)&v26 + 4) = 0xA00000001LL;
v19 = v1;
parseCommonProperty(a1 + 4, v1, (long long *)&v26, 0.0);
v2 = a1[4];
for ( i = a1[5]; v2 != i; v2 += 64LL )
{
if ( !(unsigned int)std::string::compare(v2, "grid") )
{
if ( !(unsigned int)std::string::compare(v2 + 32, "true") )
{
v4 = 1;
goto LABEL_7;
}
if ( !(unsigned int)std::string::compare(v2 + 32, "false") )
{
v4 = 0;
LABEL_7:
*(_BYTE *)(v19 + 120) = v4;
}
}
}
v5 = 0LL;
*(_OWORD *)v21 = 0LL;
v22 = 0LL;
v6 = (long long *)a1[7];
v29 = (long long *)a1[8];
if ( v6 == v29 )
{
v15 = 0LL;
}
else
{
v28 = (long long *)(v19 + 72);
do
{
v7 = operator new(0x60uLL);
*(_OWORD *)(v7 + 16) = 0LL;
*(_OWORD *)(v7 + 32) = 0LL;
*(_OWORD *)(v7 + 48) = 0LL;
*(_OWORD *)(v7 + 64) = 0LL;
*(_QWORD *)(v7 + 8) = v7 + 24;
*(_BYTE *)(v7 + 24) = 0;
*(_QWORD *)(v7 + 40) = v7 + 56;
*(_BYTE *)(v7 + 56) = 0;
*(_QWORD *)&v8 = 0xA00000001LL;
*(_OWORD *)(v7 + 76) = 0xA00000001uLL;
*(_QWORD *)v7 = (char *)&`vtable for'Circle + 16;
*(_DWORD *)(v7 + 92) = 1;
v20 = v7;
v9 = nextDotId++;
v10 = 1;
if ( v9 >= 0xA )
{
v10 = 4;
v11 = v9;
while ( 1 )
{
if ( v11 <= 0x63 )
{
v10 -= 2;
goto LABEL_20;
}
if ( v11 <= 0x3E7 )
break;
if ( v11 < 0x2710 )
goto LABEL_20;
v10 += 4;
v12 = v11 <= 0x1869F;
v11 /= 0x2710uLL;
if ( v12 )
{
v10 -= 3;
goto LABEL_20;
}
}
--v10;
}
LABEL_20:
v23 = v25;
std::string::_M_construct(&v23, v10, 0LL);
std::__detail::__to_chars_10_impl<unsigned long>(v23, v24, v9);
v13 = std::string::replace(&v23, 0LL, 0LL, "dot_", 4LL);
*(_QWORD *)&v26 = &v27;
v14 = (__int128 *)(v13 + 16);
if ( *(_QWORD *)v13 == v13 + 16 )
{
v8 = *v14;
v27 = *v14;
}
else
{
*(_QWORD *)&v26 = *(_QWORD *)v13;
*(_QWORD *)&v27 = *(_QWORD *)v14;
}
*((_QWORD *)&v26 + 1) = *(_QWORD *)(v13 + 8);
*(_QWORD *)v13 = v14;
*(_QWORD *)(v13 + 8) = 0LL;
*(_BYTE *)(v13 + 16) = 0;
std::string::operator=(v20 + 8, &v26);
if ( (__int128 *)v26 != &v27 )
operator delete((void *)v26, v27 + 1);
if ( v23 != v25 )
operator delete(v23, v25[0] + 1LL);
parseCommonProperty(v6, v20, v28, *(double *)&v8);
if ( v21[1] == v22 )
{
std::vector<Circle *>::_M_realloc_insert<Circle * const&>(v21, v21[1], &v20);
}
else
{
*(_QWORD *)v21[1] = v20;
v21[1] = (char *)v21[1] + 8;
}
v6 += 3;
}
while ( v6 != v29 );
v5 = *(_OWORD *)v21;
v15 = v22;
}
v16 = *(void **)(v19 + 96);
v17 = *(_QWORD *)(v19 + 112);
*(_OWORD *)(v19 + 96) = v5;
*(_QWORD *)(v19 + 112) = v15;
*(_OWORD *)v21 = 0LL;
v22 = 0LL;
if ( v16 )
{
operator delete(v16, v17 - (_QWORD)v16);
if ( v21[0] )
operator delete(v21[0], (unsigned long long)v22 - (unsigned long long)v21[0]);
}
return v19;
}
| parseDotCloud:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV R15,RDI
MOV EDI,0x80
CALL 0x00106390
MOV RBX,RAX
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RAX + 0x10],XMM0
MOVAPS xmmword ptr [RAX + 0x20],XMM0
MOVAPS xmmword ptr [RAX + 0x30],XMM0
MOVAPS xmmword ptr [RAX + 0x40],XMM0
MOVAPS xmmword ptr [RAX + 0x50],XMM0
MOVAPS xmmword ptr [RAX + 0x70],XMM0
MOVAPS xmmword ptr [RAX + 0x60],XMM0
LEA RDI,[RAX + 0x8]
ADD RAX,0x18
MOV qword ptr [RBX + 0x8],RAX
XOR EAX,EAX
MOV byte ptr [RBX + 0x18],AL
LEA RCX,[RBX + 0x38]
MOV qword ptr [RBX + 0x28],RCX
MOV byte ptr [RBX + 0x38],AL
MOV dword ptr [RBX + 0x4c],0x1
MOV dword ptr [RBX + 0x50],0xa
MOV dword ptr [RBX + 0x58],0x0
MOV RAX,qword ptr [0x0010ef38]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOVUPS xmmword ptr [RBX + 0x69],XMM0
MOV RSI,R15
CALL 0x001061d0
LEA RDI,[R15 + 0x20]
LEA RDX,[RSP + 0x48]
MOV word ptr [RDX],0x0
MOV RAX,0xa00000001
MOV qword ptr [RDX + 0x4],RAX
MOV qword ptr [RSP],RBX
MOV RSI,RBX
CALL 0x001064a0
MOV R14,qword ptr [R15 + 0x20]
MOV RBX,qword ptr [R15 + 0x28]
CMP R14,RBX
JZ 0x001088b2
LEA R12,[0x10b108]
LEA R13,[0x10b174]
LAB_00108867:
MOV RDI,R14
MOV RSI,R12
CALL 0x001060f0
TEST EAX,EAX
JNZ 0x001088a9
LEA RBP,[R14 + 0x20]
MOV RDI,RBP
MOV RSI,R13
CALL 0x001060f0
TEST EAX,EAX
JZ 0x001088a0
MOV RDI,RBP
LEA RSI,[0x10b179]
CALL 0x001060f0
TEST EAX,EAX
JNZ 0x001088a9
XOR EAX,EAX
JMP 0x001088a2
LAB_001088a0:
MOV AL,0x1
LAB_001088a2:
MOV RCX,qword ptr [RSP]
MOV byte ptr [RCX + 0x78],AL
LAB_001088a9:
ADD R14,0x40
CMP R14,RBX
JNZ 0x00108867
LAB_001088b2:
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOV qword ptr [RSP + 0x20],0x0
MOV R14,qword ptr [R15 + 0x38]
MOV RAX,qword ptr [R15 + 0x40]
MOV qword ptr [RSP + 0x70],RAX
CMP R14,RAX
JZ 0x00108ad9
MOV RAX,qword ptr [RSP]
ADD RAX,0x48
MOV qword ptr [RSP + 0x68],RAX
LEA RBX,[RSP + 0x58]
MOV R12,qword ptr [0x0010ef90]
ADD R12,0x10
LEA R15,[RSP + 0x28]
MOV RBP,0x346dc5d63886594b
LAB_00108905:
MOV EDI,0x60
CALL 0x00106390
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RAX + 0x10],XMM0
MOVAPS xmmword ptr [RAX + 0x20],XMM0
MOVAPS xmmword ptr [RAX + 0x30],XMM0
MOVAPS xmmword ptr [RAX + 0x40],XMM0
LEA RCX,[RAX + 0x18]
MOV qword ptr [RAX + 0x8],RCX
XOR EDX,EDX
MOV byte ptr [RAX + 0x18],DL
MOV RCX,RAX
ADD RCX,0x38
MOV qword ptr [RAX + 0x28],RCX
MOV byte ptr [RAX + 0x38],DL
MOVSD XMM0,qword ptr [0x0010b000]
MOVUPS xmmword ptr [RAX + 0x4c],XMM0
MOV qword ptr [RAX],R12
MOV dword ptr [RAX + 0x5c],0x1
MOV qword ptr [RSP + 0x8],RAX
MOV R13,qword ptr [0x0010f3c0]
LEA RAX,[R13 + 0x1]
MOV qword ptr [0x0010f3c0],RAX
MOV ESI,0x1
CMP R13,0xa
JC 0x001089ba
MOV ESI,0x4
MOV RCX,R13
LAB_0010897d:
CMP RCX,0x63
JBE 0x001089b3
CMP RCX,0x3e7
JBE 0x001089b8
CMP RCX,0x2710
JC 0x001089ba
MOV RAX,RCX
MUL RBP
SHR RDX,0xb
ADD ESI,0x4
CMP RCX,0x1869f
MOV RCX,RDX
JA 0x0010897d
ADD ESI,-0x3
JMP 0x001089ba
LAB_001089b3:
ADD ESI,-0x2
JMP 0x001089ba
LAB_001089b8:
DEC ESI
LAB_001089ba:
MOV ESI,ESI
LEA RAX,[RSP + 0x38]
MOV qword ptr [RSP + 0x28],RAX
LAB_001089c6:
MOV RDI,R15
XOR EDX,EDX
CALL 0x00106460
MOV RDI,qword ptr [RSP + 0x28]
MOV ESI,dword ptr [RSP + 0x30]
MOV RDX,R13
CALL 0x00106350
LAB_001089e1:
MOV R8D,0x4
MOV RDI,R15
XOR ESI,ESI
XOR EDX,EDX
LEA RCX,[0x10b17f]
CALL 0x00106400
MOV qword ptr [RSP + 0x48],RBX
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x00108a1d
MOV qword ptr [RSP + 0x48],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x58],RDX
JMP 0x00108a23
LAB_00108a1d:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RBX],XMM0
LAB_00108a23:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x50],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV RDI,qword ptr [RSP + 0x8]
ADD RDI,0x8
LEA RSI,[RSP + 0x48]
CALL 0x00106470
MOV RDI,qword ptr [RSP + 0x48]
CMP RDI,RBX
JZ 0x00108a65
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x001063b0
LAB_00108a65:
MOV RDI,qword ptr [RSP + 0x28]
LEA RAX,[RSP + 0x38]
CMP RDI,RAX
JZ 0x00108a81
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x001063b0
LAB_00108a81:
MOV RSI,qword ptr [RSP + 0x8]
LAB_00108a86:
MOV RDI,R14
MOV RDX,qword ptr [RSP + 0x68]
CALL 0x001064a0
MOV RSI,qword ptr [RSP + 0x18]
CMP RSI,qword ptr [RSP + 0x20]
JZ 0x00108aaf
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSI],RAX
ADD qword ptr [RSP + 0x18],0x8
JMP 0x00108abe
LAB_00108aaf:
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0x8]
CALL 0x00106670
LAB_00108abe:
ADD R14,0x18
CMP R14,qword ptr [RSP + 0x70]
JNZ 0x00108905
MOVAPS XMM0,xmmword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x20]
JMP 0x00108adb
LAB_00108ad9:
XOR EAX,EAX
LAB_00108adb:
MOV RCX,qword ptr [RSP]
MOV RDI,qword ptr [RCX + 0x60]
MOV RSI,qword ptr [RCX + 0x70]
MOVUPS xmmword ptr [RCX + 0x60],XMM0
MOV qword ptr [RCX + 0x70],RAX
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOV qword ptr [RSP + 0x20],0x0
TEST RDI,RDI
JZ 0x00108b24
SUB RSI,RDI
CALL 0x001063b0
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x00108b24
MOV RSI,qword ptr [RSP + 0x20]
SUB RSI,RDI
CALL 0x001063b0
LAB_00108b24:
MOV RAX,qword ptr [RSP]
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* parseDotCloud(SEMANTICANALYZER::DotCloud&) */
Shape * parseDotCloud(DotCloud *param_1)
{
char *pcVar1;
long *plVar2;
void *pvVar3;
long lVar4;
bool bVar5;
ulong uVar6;
char cVar7;
Shape SVar8;
int iVar9;
Shape *pSVar10;
long *plVar11;
ulong uVar12;
long *plVar13;
char cVar14;
int *puVar15;
char *pcVar16;
vector *pvVar17;
Shape *local_a0;
int8 local_98;
int8 uStack_90;
int8 *local_88;
long *local_80;
uint local_78;
long local_70 [2];
int2 local_60;
int2 uStack_5e;
int4 uStack_5c;
int4 uStack_58;
int4 uStack_54;
long local_50;
long lStack_48;
Shape *local_40;
vector *local_38;
pSVar10 = (Shape *)operator_new(0x80);
*(int8 *)(pSVar10 + 0x10) = 0;
*(int8 *)(pSVar10 + 0x18) = 0;
*(int8 *)(pSVar10 + 0x20) = 0;
*(int8 *)(pSVar10 + 0x28) = 0;
*(int8 *)(pSVar10 + 0x30) = 0;
*(int8 *)(pSVar10 + 0x38) = 0;
*(int8 *)(pSVar10 + 0x40) = 0;
*(int8 *)(pSVar10 + 0x48) = 0;
*(int8 *)(pSVar10 + 0x50) = 0;
*(int8 *)(pSVar10 + 0x58) = 0;
*(int8 *)(pSVar10 + 0x70) = 0;
*(int8 *)(pSVar10 + 0x78) = 0;
*(int8 *)(pSVar10 + 0x60) = 0;
*(int8 *)(pSVar10 + 0x68) = 0;
*(Shape **)(pSVar10 + 8) = pSVar10 + 0x18;
pSVar10[0x18] = (Shape)0x0;
*(Shape **)(pSVar10 + 0x28) = pSVar10 + 0x38;
pSVar10[0x38] = (Shape)0x0;
*(int4 *)(pSVar10 + 0x4c) = 1;
*(int4 *)(pSVar10 + 0x50) = 10;
*(int4 *)(pSVar10 + 0x58) = 0;
*(int **)pSVar10 = PTR_vtable_0010ef38 + 0x10;
*(int8 *)(pSVar10 + 0x69) = 0;
*(int8 *)(pSVar10 + 0x71) = 0;
std::__cxx11::string::_M_assign((string *)(pSVar10 + 8));
local_60 = 0;
uStack_5c = 1;
uStack_58 = 10;
parseCommonProperty((vector *)(param_1 + 0x20),pSVar10,(Style *)&local_60);
pcVar16 = *(char **)(param_1 + 0x20);
pcVar1 = *(char **)(param_1 + 0x28);
do {
if (pcVar16 == pcVar1) {
local_98._0_4_ = 0;
local_98._4_4_ = 0;
uStack_90._0_4_ = 0;
uStack_90._4_4_ = 0;
local_98 = (void *)0x0;
uStack_90 = (int8 *)0x0;
local_88 = (int8 *)0x0;
pvVar17 = *(vector **)(param_1 + 0x38);
local_38 = *(vector **)(param_1 + 0x40);
if (pvVar17 == local_38) {
local_88 = (int8 *)0x0;
}
else {
local_40 = pSVar10 + 0x48;
puVar15 = PTR_vtable_0010ef90 + 0x10;
do {
/* try { // try from 00108905 to 0010890e has its CatchHandler @ 00108b5a */
local_a0 = (Shape *)operator_new(0x60);
*(int8 *)(local_a0 + 0x10) = 0;
*(int8 *)(local_a0 + 0x18) = 0;
*(int8 *)(local_a0 + 0x20) = 0;
*(int8 *)(local_a0 + 0x28) = 0;
*(int8 *)(local_a0 + 0x30) = 0;
*(int8 *)(local_a0 + 0x38) = 0;
*(int8 *)(local_a0 + 0x40) = 0;
*(int8 *)(local_a0 + 0x48) = 0;
*(Shape **)(local_a0 + 8) = local_a0 + 0x18;
local_a0[0x18] = (Shape)0x0;
*(Shape **)(local_a0 + 0x28) = local_a0 + 0x38;
local_a0[0x38] = (Shape)0x0;
*(int8 *)(local_a0 + 0x4c) = DAT_0010b000;
*(int8 *)(local_a0 + 0x54) = 0;
*(int **)local_a0 = puVar15;
*(int4 *)(local_a0 + 0x5c) = 1;
uVar6 = nextDotId;
cVar14 = '\x01';
if (9 < nextDotId) {
uVar12 = nextDotId;
cVar7 = '\x04';
do {
cVar14 = cVar7;
if (uVar12 < 100) {
cVar14 = cVar14 + -2;
goto LAB_001089ba;
}
if (uVar12 < 1000) {
cVar14 = cVar14 + -1;
goto LAB_001089ba;
}
if (uVar12 < 10000) goto LAB_001089ba;
bVar5 = 99999 < uVar12;
uVar12 = uVar12 / 10000;
cVar7 = cVar14 + '\x04';
} while (bVar5);
cVar14 = cVar14 + '\x01';
}
LAB_001089ba:
local_80 = local_70;
nextDotId = nextDotId + 1;
/* try { // try from 001089c6 to 001089cf has its CatchHandler @ 00108b37 */
std::__cxx11::string::_M_construct((ulong)&local_80,cVar14);
std::__detail::__to_chars_10_impl<unsigned_long>((char *)local_80,local_78,uVar6);
/* try { // try from 001089e1 to 001089f9 has its CatchHandler @ 00108b39 */
plVar11 = (long *)std::__cxx11::string::replace((ulong)&local_80,0,(char *)0x0,0x10b17f);
local_60 = SUB82(&local_50,0);
uStack_5e = (int2)((ulong)&local_50 >> 0x10);
uStack_5c = (int4)((ulong)&local_50 >> 0x20);
plVar2 = (long *)*plVar11;
plVar13 = plVar11 + 2;
if (plVar2 == plVar13) {
local_50 = *plVar13;
lStack_48 = plVar11[3];
}
else {
local_60 = SUB82(plVar2,0);
uStack_5e = (int2)((ulong)plVar2 >> 0x10);
uStack_5c = (int4)((ulong)plVar2 >> 0x20);
local_50 = *plVar13;
}
uStack_58 = (int4)plVar11[1];
uStack_54 = (int4)((ulong)plVar11[1] >> 0x20);
*plVar11 = (long)plVar13;
plVar11[1] = 0;
*(int1 *)(plVar11 + 2) = 0;
std::__cxx11::string::operator=((string *)(local_a0 + 8),(string *)&local_60);
plVar2 = (long *)CONCAT44(uStack_5c,CONCAT22(uStack_5e,local_60));
if (plVar2 != &local_50) {
operator_delete(plVar2,local_50 + 1);
}
if (local_80 != local_70) {
operator_delete(local_80,local_70[0] + 1);
}
/* try { // try from 00108a86 to 00108abd has its CatchHandler @ 00108b5a */
parseCommonProperty(pvVar17,local_a0,(Style *)local_40);
if (uStack_90 == local_88) {
std::vector<Circle*,std::allocator<Circle*>>::_M_realloc_insert<Circle*const&>
((vector<Circle*,std::allocator<Circle*>> *)&local_98,uStack_90,&local_a0);
}
else {
*uStack_90 = local_a0;
uStack_90 = uStack_90 + 1;
}
pvVar17 = pvVar17 + 0x18;
} while (pvVar17 != local_38);
}
pvVar3 = *(void **)(pSVar10 + 0x60);
lVar4 = *(long *)(pSVar10 + 0x70);
*(int4 *)(pSVar10 + 0x60) = (int4)local_98;
*(int4 *)(pSVar10 + 100) = local_98._4_4_;
*(int4 *)(pSVar10 + 0x68) = (int4)uStack_90;
*(int4 *)(pSVar10 + 0x6c) = uStack_90._4_4_;
*(int8 **)(pSVar10 + 0x70) = local_88;
local_98 = (void *)0x0;
uStack_90 = (int8 *)0x0;
local_88 = (int8 *)0x0;
if ((pvVar3 != (void *)0x0) &&
(operator_delete(pvVar3,lVar4 - (long)pvVar3), local_98 != (void *)0x0)) {
operator_delete(local_98,(long)local_88 - (long)local_98);
}
return pSVar10;
}
iVar9 = std::__cxx11::string::compare(pcVar16);
if (iVar9 == 0) {
iVar9 = std::__cxx11::string::compare(pcVar16 + 0x20);
if (iVar9 == 0) {
SVar8 = (Shape)0x1;
}
else {
iVar9 = std::__cxx11::string::compare(pcVar16 + 0x20);
if (iVar9 != 0) goto LAB_001088a9;
SVar8 = (Shape)0x0;
}
pSVar10[0x78] = SVar8;
}
LAB_001088a9:
pcVar16 = pcVar16 + 0x40;
} while( true );
}
|
|
6,147 | js_map_groupBy | bluesky950520[P]quickjs/quickjs.c | static JSValue js_map_groupBy(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue cb, res, iter, next, groups, k, v, prop;
JSValue args[2];
int64_t idx;
BOOL done;
// "is function?" check must be observed before argv[0] is accessed
cb = argv[1];
if (check_function(ctx, cb))
return JS_EXCEPTION;
iter = JS_GetIterator(ctx, argv[0], /*is_async*/FALSE);
if (JS_IsException(iter))
return JS_EXCEPTION;
k = JS_UNDEFINED;
v = JS_UNDEFINED;
prop = JS_UNDEFINED;
groups = JS_UNDEFINED;
next = JS_GetProperty(ctx, iter, JS_ATOM_next);
if (JS_IsException(next))
goto exception;
groups = js_map_constructor(ctx, JS_UNDEFINED, 0, NULL, 0);
if (JS_IsException(groups))
goto exception;
for (idx = 0; ; idx++) {
v = JS_IteratorNext(ctx, iter, next, 0, NULL, &done);
if (JS_IsException(v))
goto exception;
if (done)
break; // v is JS_UNDEFINED
args[0] = v;
args[1] = js_int64(idx);
k = JS_Call(ctx, cb, ctx->global_obj, 2, args);
if (JS_IsException(k))
goto exception;
prop = js_map_get(ctx, groups, 1, &k, 0);
if (JS_IsException(prop))
goto exception;
if (JS_IsUndefined(prop)) {
prop = JS_NewArray(ctx);
if (JS_IsException(prop))
goto exception;
args[0] = k;
args[1] = prop;
res = js_map_set(ctx, groups, 2, args, 0);
if (JS_IsException(res))
goto exception;
JS_FreeValue(ctx, res);
}
res = js_array_push(ctx, prop, 1, &v, /*unshift*/0);
if (JS_IsException(res))
goto exception;
// res is an int64
JS_FreeValue(ctx, prop);
JS_FreeValue(ctx, k);
JS_FreeValue(ctx, v);
prop = JS_UNDEFINED;
k = JS_UNDEFINED;
v = JS_UNDEFINED;
}
JS_FreeValue(ctx, iter);
JS_FreeValue(ctx, next);
return groups;
exception:
JS_FreeValue(ctx, prop);
JS_FreeValue(ctx, k);
JS_FreeValue(ctx, v);
JS_FreeValue(ctx, groups);
JS_FreeValue(ctx, iter);
JS_FreeValue(ctx, next);
return JS_EXCEPTION;
} | O1 | c | js_map_groupBy:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %r8, %rbx
movq %rdi, %r14
movq 0x10(%r8), %rbp
movq 0x18(%r8), %r12
movq %rbp, %rsi
movq %r12, %rdx
callq 0x4560d
movl $0x6, %r15d
testl %eax, %eax
jne 0x56681
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
xorl %ebx, %ebx
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x45867
movq %rdx, 0x10(%rsp)
cmpl $0x6, %edx
je 0x56683
movq %rax, %r13
movq %r12, 0xc0(%rsp)
movl %ebx, 0x48(%rsp)
movl $0x3, %r12d
movq %r12, 0x50(%rsp)
movl %ebx, 0x18(%rsp)
movq %r12, 0x20(%rsp)
movq %r14, %rdi
movq %rax, %rsi
movq 0x10(%rsp), %rdx
movl $0x6b, %ecx
movq %rax, %r8
movq %rdx, %r9
pushq %rbx
pushq $0x0
callq 0x26fff
addq $0x10, %rsp
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
cmpl $0x6, %edx
movq %r13, 0x58(%rsp)
jne 0x5629d
xorl %r13d, %r13d
movl $0x3, %eax
movq %rax, 0x30(%rsp)
movq $0x0, 0x8(%rsp)
xorl %ebp, %ebp
jmp 0x5660a
movq %rbp, 0xa8(%rsp)
xorl %ebx, %ebx
movl $0x3, %r12d
movl $0x3, %edx
movq %r14, %rdi
xorl %esi, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x39b68
movq %rax, %rbp
movq %rax, 0x8(%rsp)
shrq $0x20, %rbp
movq %rdx, 0x30(%rsp)
cmpl $0x6, %edx
je 0x56314
leaq 0x2c(%rsp), %rax
xorl %ebx, %ebx
movq %r14, %rdi
movq %r13, %rsi
movq 0x10(%rsp), %rdx
movq 0x38(%rsp), %rcx
movq 0x40(%rsp), %r8
xorl %r9d, %r9d
pushq %rax
pushq $0x0
callq 0x45b58
addq $0x10, %rsp
movq %rax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
cmpl $0x6, %edx
jne 0x5631c
xorl %r13d, %r13d
jmp 0x5660a
movq %rdx, 0x68(%rsp)
movq %rax, 0x70(%rsp)
movq $0x0, 0x78(%rsp)
movq %rbp, 0x60(%rsp)
cmpl $0x0, 0x2c(%rsp)
jne 0x565a8
movups 0x18(%rsp), %xmm0
movaps %xmm0, 0x80(%rsp)
movq 0x78(%rsp), %rcx
movq %rcx, %rax
shrq $0x1f, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rcx, %xmm0
movl %ecx, %ecx
movq %xmm0, %rdx
cmoveq %rcx, %rdx
movl $0x7, %ecx
cmovneq %rcx, %rax
movq %rdx, 0x90(%rsp)
movq %rax, 0x98(%rsp)
movq 0x1a0(%r14), %rcx
movq 0x1a8(%r14), %r8
movl $0x0, 0xc8(%rsp)
movq $0x3, 0xd0(%rsp)
subq $0x20, %rsp
movups 0xe8(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0xa0(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x2, 0x18(%rsp)
movq %r14, %rdi
movq 0xc8(%rsp), %rsi
movq 0xe0(%rsp), %rdx
movl $0x2, %r9d
callq 0x2c526
addq $0x20, %rsp
movq %rax, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
cmpl $0x6, %edx
movq 0x30(%rsp), %r15
movq 0x8(%rsp), %rsi
je 0x565ef
movq %rdx, 0xb0(%rsp)
movq %rax, 0xb8(%rsp)
movq %r14, %rdi
movq %r15, %rdx
leaq 0x48(%rsp), %r8
xorl %r9d, %r9d
callq 0x53b91
movq %rdx, %r12
cmpl $0x3, %r12d
je 0x56530
movq %rax, %rbx
movq %rax, %r13
shrq $0x20, %r13
cmpl $0x6, %r12d
je 0x565fe
movq 0x10(%rsp), %r15
movq %r13, %rax
shlq $0x20, %rax
movl %ebx, %ebp
orq %rax, %rbp
movq %r14, %rdi
movq %rbp, %rsi
movq %r12, %rdx
movl $0x1, %ecx
leaq 0x18(%rsp), %r8
xorl %r9d, %r9d
callq 0x50eb1
cmpl $0x6, %edx
je 0x565f9
movq 0x18(%r14), %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0x21922
movq 0x18(%r14), %rdi
movq 0xb8(%rsp), %rsi
movq 0xb0(%rsp), %rdx
callq 0x21922
movq 0x18(%r14), %rdi
movq 0x70(%rsp), %rsi
movq 0x68(%rsp), %rdx
callq 0x21922
xorl %ebx, %ebx
movl %ebx, 0x48(%rsp)
movl $0x3, %r12d
movq %r12, 0x50(%rsp)
movl %ebx, 0x18(%rsp)
movq %r12, 0x20(%rsp)
incq 0x78(%rsp)
movq %r14, %rdi
movq 0x58(%rsp), %rsi
movq %r15, %rdx
movq 0x38(%rsp), %rcx
movq 0x40(%rsp), %r8
xorl %r9d, %r9d
leaq 0x2c(%rsp), %rax
pushq %rax
pushq $0x0
callq 0x45b58
addq $0x10, %rsp
movq %rax, 0x70(%rsp)
movq %rax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq %rdx, 0x68(%rsp)
cmpl $0x6, %edx
movq 0x60(%rsp), %rbp
jne 0x56334
jmp 0x565fe
movq 0x38(%r14), %rsi
incl (%rsi)
movq %r14, %rdi
movl $0x2, %edx
callq 0xf7b2
movq %rax, %rbx
movq %rdx, %r12
movq %rax, %r13
shrq $0x20, %r13
cmpl $0x6, %r12d
je 0x565fe
movups 0x48(%rsp), %xmm0
movaps %xmm0, 0x80(%rsp)
movq %rbx, 0x90(%rsp)
movq %r12, 0x98(%rsp)
movq %r14, %rdi
movq 0x8(%rsp), %rsi
movq %r15, %rdx
leaq 0x80(%rsp), %r8
xorl %r9d, %r9d
callq 0x4b317
cmpl $0x6, %edx
je 0x565fe
movq 0x18(%r14), %rdi
movq %rax, %rsi
callq 0x21922
jmp 0x56451
movq 0x18(%r14), %rdi
movq 0x58(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x21922
movq 0x18(%r14), %rdi
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
callq 0x21922
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
movq 0x8(%rsp), %rdx
movq %rdx, %rax
andq %rcx, %rax
movl %edx, %ebx
movq 0x30(%rsp), %r15
jmp 0x56685
xorl %ebx, %ebx
movl $0x3, %r12d
jmp 0x565fe
movq 0x60(%rsp), %rbp
shlq $0x20, %r13
movl %ebx, %ebx
movl $0x6, %r15d
orq %r13, %rbx
movq 0x18(%r14), %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x21922
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq 0x18(%r14), %rdi
callq 0x21922
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq 0x18(%r14), %rdi
callq 0x21922
shlq $0x20, %rbp
movl 0x8(%rsp), %esi
orq %rbp, %rsi
movq 0x18(%r14), %rdi
movq 0x30(%rsp), %rdx
callq 0x21922
movq 0x18(%r14), %rdi
movq 0x58(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x21922
movq 0x18(%r14), %rdi
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
callq 0x21922
xorl %ebx, %ebx
xorl %eax, %eax
orq %rax, %rbx
movq %rbx, %rax
movq %r15, %rdx
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_map_groupBy:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0D8h
mov rbx, r8
mov r14, rdi
mov rbp, [r8+10h]
mov r12, [r8+18h]
mov rsi, rbp
mov rdx, r12
call check_function
mov r15d, 6
test eax, eax
jnz loc_56681
mov rsi, [rbx]
mov rdx, [rbx+8]
xor ebx, ebx
mov rdi, r14
xor ecx, ecx
call JS_GetIterator
mov [rsp+108h+var_F8], rdx
cmp edx, 6
jz loc_56683
mov r13, rax
mov [rsp+108h+var_48], r12
mov dword ptr [rsp+108h+var_C0], ebx
mov r12d, 3
mov qword ptr [rsp+108h+var_C0+8], r12
mov dword ptr [rsp+108h+var_F0], ebx
mov qword ptr [rsp+108h+var_F0+8], r12
mov rdi, r14
mov rsi, rax
mov rdx, [rsp+108h+var_F8]
mov ecx, 6Bh ; 'k'
mov r8, rax
mov r9, rdx
push rbx
push 0
call JS_GetPropertyInternal2
add rsp, 10h
mov [rsp+108h+var_D0], rax
mov [rsp+108h+var_C8], rdx
cmp edx, 6
mov [rsp+108h+var_B0], r13
jnz short loc_5629D
xor r13d, r13d
mov eax, 3
mov [rsp+108h+var_D8], rax
mov [rsp+108h+var_100], 0
xor ebp, ebp
jmp loc_5660A
loc_5629D:
mov [rsp+108h+var_60], rbp
xor ebx, ebx
mov r12d, 3
mov edx, 3
mov rdi, r14
xor esi, esi
xor ecx, ecx
xor r8d, r8d
xor r9d, r9d
call js_map_constructor
mov rbp, rax
mov [rsp+108h+var_100], rax
shr rbp, 20h
mov [rsp+108h+var_D8], rdx
cmp edx, 6
jz short loc_56314
lea rax, [rsp+108h+var_DC]
xor ebx, ebx
mov rdi, r14
mov rsi, r13
mov rdx, [rsp+108h+var_F8]
mov rcx, [rsp+108h+var_D0]
mov r8, [rsp+108h+var_C8]
xor r9d, r9d
push rax
push 0
call JS_IteratorNext
add rsp, 10h
mov qword ptr [rsp+108h+var_F0], rax
mov qword ptr [rsp+108h+var_F0+8], rdx
cmp edx, 6
jnz short loc_5631C
loc_56314:
xor r13d, r13d
jmp loc_5660A
loc_5631C:
mov [rsp+108h+var_A0], rdx
mov [rsp+108h+var_98], rax
mov [rsp+108h+var_90], 0
mov [rsp+108h+var_A8], rbp
loc_56334:
cmp [rsp+108h+var_DC], 0
jnz loc_565A8
movups xmm0, [rsp+108h+var_F0]
movaps [rsp+108h+var_88], xmm0
mov rcx, [rsp+108h+var_90]
mov rax, rcx
shr rax, 1Fh
xorps xmm0, xmm0
cvtsi2sd xmm0, rcx
mov ecx, ecx
movq rdx, xmm0
cmovz rdx, rcx
mov ecx, 7
cmovnz rax, rcx
mov [rsp+108h+var_78], rdx
mov [rsp+108h+var_70], rax
mov rcx, [r14+1A0h]
mov r8, [r14+1A8h]
mov dword ptr [rsp+108h+var_40], 0
mov qword ptr [rsp+108h+var_40+8], 3
sub rsp, 20h
movups xmm0, [rsp+128h+var_40]
movups [rsp+128h+var_128], xmm0
lea rax, [rsp+128h+var_88]
mov [rsp+128h+var_118], rax
mov [rsp+128h+var_110], 2
mov rdi, r14
mov rsi, [rsp+128h+var_60]
mov rdx, [rsp+128h+var_48]
mov r9d, 2
call JS_CallInternal
add rsp, 20h
mov qword ptr [rsp+108h+var_C0], rax
mov qword ptr [rsp+108h+var_C0+8], rdx
cmp edx, 6
mov r15, [rsp+108h+var_D8]
mov rsi, [rsp+108h+var_100]
jz loc_565EF
mov [rsp+108h+var_58], rdx
mov [rsp+108h+var_50], rax
mov rdi, r14
mov rdx, r15
lea r8, [rsp+108h+var_C0]
xor r9d, r9d
call js_map_get
mov r12, rdx
cmp r12d, 3
jz loc_56530
mov rbx, rax
mov r13, rax
shr r13, 20h
cmp r12d, 6
jz loc_565FE
loc_56451:
mov r15, [rsp+108h+var_F8]
mov rax, r13
shl rax, 20h
mov ebp, ebx
or rbp, rax
mov rdi, r14
mov rsi, rbp
mov rdx, r12
mov ecx, 1
lea r8, [rsp+108h+var_F0]
xor r9d, r9d
call js_array_push
cmp edx, 6
jz loc_565F9
mov rdi, [r14+18h]
mov rsi, rbp
mov rdx, r12
call JS_FreeValueRT
mov rdi, [r14+18h]
mov rsi, [rsp+108h+var_50]
mov rdx, [rsp+108h+var_58]
call JS_FreeValueRT
mov rdi, [r14+18h]
mov rsi, [rsp+108h+var_98]
mov rdx, [rsp+108h+var_A0]
call JS_FreeValueRT
xor ebx, ebx
mov dword ptr [rsp+108h+var_C0], ebx
mov r12d, 3
mov qword ptr [rsp+108h+var_C0+8], r12
mov dword ptr [rsp+108h+var_F0], ebx
mov qword ptr [rsp+108h+var_F0+8], r12
inc [rsp+108h+var_90]
mov rdi, r14
mov rsi, [rsp+108h+var_B0]
mov rdx, r15
mov rcx, [rsp+108h+var_D0]
mov r8, [rsp+108h+var_C8]
xor r9d, r9d
lea rax, [rsp+108h+var_DC]
push rax
push 0
call JS_IteratorNext
add rsp, 10h
mov [rsp+108h+var_98], rax
mov qword ptr [rsp+108h+var_F0], rax
mov qword ptr [rsp+108h+var_F0+8], rdx
mov [rsp+108h+var_A0], rdx
cmp edx, 6
mov rbp, [rsp+108h+var_A8]
jnz loc_56334
jmp loc_565FE
loc_56530:
mov rsi, [r14+38h]
inc dword ptr [rsi]
mov rdi, r14
mov edx, 2
call JS_NewObjectFromShape
mov rbx, rax
mov r12, rdx
mov r13, rax
shr r13, 20h
cmp r12d, 6
jz loc_565FE
movups xmm0, [rsp+108h+var_C0]
movaps [rsp+108h+var_88], xmm0
mov [rsp+108h+var_78], rbx
mov [rsp+108h+var_70], r12
mov rdi, r14
mov rsi, [rsp+108h+var_100]
mov rdx, r15
lea r8, [rsp+108h+var_88]
xor r9d, r9d
call js_map_set
cmp edx, 6
jz short loc_565FE
mov rdi, [r14+18h]
mov rsi, rax
call JS_FreeValueRT
jmp loc_56451
loc_565A8:
mov rdi, [r14+18h]
mov rsi, [rsp+108h+var_B0]
mov rdx, [rsp+108h+var_F8]
call JS_FreeValueRT
mov rdi, [r14+18h]
mov rsi, [rsp+108h+var_D0]
mov rdx, [rsp+108h+var_C8]
call JS_FreeValueRT
mov rcx, 0FFFFFFFF00000000h
mov rdx, [rsp+108h+var_100]
mov rax, rdx
and rax, rcx
mov ebx, edx
mov r15, [rsp+108h+var_D8]
jmp loc_56685
loc_565EF:
xor ebx, ebx
mov r12d, 3
jmp short loc_565FE
loc_565F9:
mov rbp, [rsp+108h+var_A8]
loc_565FE:
shl r13, 20h
mov ebx, ebx
mov r15d, 6
loc_5660A:
or rbx, r13
mov rdi, [r14+18h]
mov rsi, rbx
mov rdx, r12
call JS_FreeValueRT
mov rsi, qword ptr [rsp+108h+var_C0]
mov rdx, qword ptr [rsp+108h+var_C0+8]
mov rdi, [r14+18h]
call JS_FreeValueRT
mov rsi, qword ptr [rsp+108h+var_F0]
mov rdx, qword ptr [rsp+108h+var_F0+8]
mov rdi, [r14+18h]
call JS_FreeValueRT
shl rbp, 20h
mov esi, dword ptr [rsp+108h+var_100]
or rsi, rbp
mov rdi, [r14+18h]
mov rdx, [rsp+108h+var_D8]
call JS_FreeValueRT
mov rdi, [r14+18h]
mov rsi, [rsp+108h+var_B0]
mov rdx, [rsp+108h+var_F8]
call JS_FreeValueRT
mov rdi, [r14+18h]
mov rsi, [rsp+108h+var_D0]
mov rdx, [rsp+108h+var_C8]
call JS_FreeValueRT
loc_56681:
xor ebx, ebx
loc_56683:
xor eax, eax
loc_56685:
or rbx, rax
mov rax, rbx
mov rdx, r15
add rsp, 0D8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| unsigned long long js_map_groupBy(
long long *a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
double a6,
double a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
long long *a13)
{
long long v14; // rbp
long long v15; // r12
double v16; // xmm4_8
double v17; // xmm5_8
long long v18; // rsi
long long v19; // rdx
long long v20; // rbx
_DWORD *Iterator; // rax
long long v22; // rdx
unsigned long long v23; // r13
long long v24; // r12
double v25; // xmm4_8
double v26; // xmm5_8
long long v27; // rdx
unsigned long long v28; // r13
unsigned long long v29; // rbp
long long v30; // rdx
__m128 v31; // rax
__m128 v32; // xmm4
__m128 v33; // xmm5
long long v34; // rax
double v35; // rdx
long long v36; // rcx
long long v37; // r8
__m128 v38; // xmm0
__m128 v39; // rax
long long v40; // rcx
int v41; // r15d
unsigned long long v42; // rax
long long v43; // rdx
__m128 v44; // xmm4
__m128 v45; // xmm5
int v46; // edx
__m128 v47; // rax
_DWORD *v48; // rsi
unsigned long long v49; // rax
long long v50; // rdx
long long v51; // rcx
double v52; // xmm4_8
double v53; // xmm5_8
_DWORD *v54; // rax
long long v55; // rdx
unsigned long long v56; // rax
unsigned long long v58; // [rsp+28h] [rbp-100h]
long long v59; // [rsp+30h] [rbp-F8h]
__m128 v60; // [rsp+38h] [rbp-F0h] BYREF
int v61; // [rsp+4Ch] [rbp-DCh] BYREF
long long v62; // [rsp+50h] [rbp-D8h]
_DWORD *PropertyInternal2; // [rsp+58h] [rbp-D0h]
long long v64; // [rsp+60h] [rbp-C8h]
__m128 v65; // [rsp+68h] [rbp-C0h] BYREF
_DWORD *v66; // [rsp+78h] [rbp-B0h]
unsigned long long v67; // [rsp+80h] [rbp-A8h]
long long v68; // [rsp+88h] [rbp-A0h]
_DWORD *v69; // [rsp+90h] [rbp-98h]
unsigned long long v70; // [rsp+98h] [rbp-90h]
__m128 v71; // [rsp+A0h] [rbp-88h] BYREF
double v72; // [rsp+B0h] [rbp-78h]
long long v73; // [rsp+B8h] [rbp-70h]
long long v74; // [rsp+C8h] [rbp-60h]
long long v75; // [rsp+D0h] [rbp-58h]
_DWORD *v76; // [rsp+D8h] [rbp-50h]
long long v77; // [rsp+E0h] [rbp-48h]
__m128 v78; // [rsp+E8h] [rbp-40h]
v14 = a13[2];
v15 = a13[3];
if ( (unsigned int)check_function((long long)a1, v14, v15, a2, a3, a4, a5, a6, a7, a8, a9) )
{
LABEL_27:
v20 = 0LL;
goto LABEL_28;
}
v18 = *a13;
v19 = a13[1];
v20 = 0LL;
Iterator = JS_GetIterator((long long)a1, v18, v19, 0, a2, a3, a4, a5, v16, v17, a8, a9);
v59 = v22;
if ( (_DWORD)v22 != 6 )
{
v23 = (unsigned long long)Iterator;
v77 = v15;
v65.m128_i32[0] = 0;
v24 = 3LL;
v65.m128_u64[1] = 3LL;
v60.m128_i32[0] = 0;
v60.m128_u64[1] = 3LL;
PropertyInternal2 = (_DWORD *)JS_GetPropertyInternal2(
(long long)a1,
(long long)Iterator,
v22,
0x6Bu,
(long long)Iterator,
v22,
0LL,
0);
v64 = v27;
v66 = (_DWORD *)v23;
if ( (_DWORD)v27 == 6 )
{
v28 = 0LL;
v62 = 3LL;
LODWORD(v58) = 0;
v29 = 0LL;
}
else
{
v74 = v14;
v20 = 0LL;
v24 = 3LL;
v58 = js_map_constructor((long long)a1, 0LL, 3LL, 0, 0LL, 0, a2, a3, a4, a5, v25, v26, a8, a9);
v29 = HIDWORD(v58);
v62 = v30;
if ( (_DWORD)v30 == 6
|| (v20 = 0LL,
v31.m128_u64[0] = JS_IteratorNext((long long)a1, v23, v59, (int)PropertyInternal2, v64, 0, 0LL, &v61),
v60 = v31,
v31.m128_i32[2] == 6) )
{
v28 = 0LL;
}
else
{
v68 = v31.m128_i64[1];
v69 = (_DWORD *)v31.m128_u64[0];
v70 = 0LL;
v67 = HIDWORD(v58);
while ( 1 )
{
if ( v61 )
{
JS_FreeValueRT(a1[3], v66, v59);
JS_FreeValueRT(a1[3], PropertyInternal2, v64);
v56 = v58 & 0xFFFFFFFF00000000LL;
v20 = (unsigned int)v58;
return v56 | v20;
}
v71 = v60;
v34 = v70 >> 31;
v35 = (double)(int)v70;
if ( v70 >> 31 )
v34 = 7LL;
else
*(_QWORD *)&v35 = (unsigned int)v70;
v72 = v35;
v73 = v34;
v36 = a1[52];
v37 = a1[53];
v78.m128_i32[0] = 0;
v78.m128_u64[1] = 3LL;
v38 = v78;
v39.m128_u64[0] = JS_CallInternal(
(long long)a1,
v74,
v77,
v36,
v37,
2LL,
v78,
a3,
a4,
a5,
v32,
v33,
a8,
a9,
0,
3,
(long long)&v71,
2u);
v65 = v39;
v41 = v62;
if ( v39.m128_i32[2] == 6 )
{
LODWORD(v20) = 0;
v24 = 3LL;
goto LABEL_25;
}
v75 = v39.m128_i64[1];
v76 = (_DWORD *)v39.m128_u64[0];
v42 = js_map_get((long long)a1, v58, v62, *(double *)v38.m128_u64, (__m128d)a3, v40, (long long)&v65, 0);
v24 = v43;
if ( (_DWORD)v43 == 3 )
{
v48 = (_DWORD *)a1[7];
++*v48;
v49 = JS_NewObjectFromShape((long long)a1, v48, 2u);
LODWORD(v20) = v49;
v24 = v50;
v23 = HIDWORD(v49);
if ( (_DWORD)v50 == 6 )
goto LABEL_25;
v38 = v65;
v71 = v65;
v72 = *(double *)&v49;
v73 = v50;
v54 = (_DWORD *)js_map_set(
(long long)a1,
v58,
v41,
v65,
a3,
a4,
a5,
v52,
v53,
a8,
a9,
v51,
(long long *)&v71,
0);
if ( (_DWORD)v55 == 6 )
goto LABEL_25;
JS_FreeValueRT(a1[3], v54, v55);
}
else
{
LODWORD(v20) = v42;
v23 = HIDWORD(v42);
if ( (_DWORD)v43 == 6 )
goto LABEL_25;
}
js_array_push(
(long long)a1,
(v23 << 32) | (unsigned int)v20,
v24,
1LL,
(long long)&v60,
0LL,
v38,
a3,
a4,
a5,
v44,
v45,
a8,
a9);
if ( v46 == 6 )
break;
JS_FreeValueRT(a1[3], (_DWORD *)((v23 << 32) | (unsigned int)v20), v24);
JS_FreeValueRT(a1[3], v76, v75);
JS_FreeValueRT(a1[3], v69, v68);
LODWORD(v20) = 0;
v65.m128_i32[0] = 0;
v24 = 3LL;
v65.m128_u64[1] = 3LL;
v60.m128_i32[0] = 0;
v60.m128_u64[1] = 3LL;
++v70;
v47.m128_u64[0] = JS_IteratorNext((long long)a1, (int)v66, v59, (int)PropertyInternal2, v64, 0, 0LL, &v61);
v69 = (_DWORD *)v47.m128_u64[0];
v60 = v47;
v68 = v47.m128_i64[1];
v29 = v67;
if ( v47.m128_i32[2] == 6 )
goto LABEL_25;
}
v29 = v67;
LABEL_25:
v28 = v23 << 32;
v20 = (unsigned int)v20;
}
}
JS_FreeValueRT(a1[3], (_DWORD *)(v28 | v20), v24);
JS_FreeValueRT(a1[3], v65.m128_u64[0], v65.m128_i64[1]);
JS_FreeValueRT(a1[3], v60.m128_u64[0], v60.m128_i64[1]);
JS_FreeValueRT(a1[3], (_DWORD *)((v29 << 32) | (unsigned int)v58), v62);
JS_FreeValueRT(a1[3], v66, v59);
JS_FreeValueRT(a1[3], PropertyInternal2, v64);
goto LABEL_27;
}
LABEL_28:
v56 = 0LL;
return v56 | v20;
}
| js_map_groupBy:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xd8
MOV RBX,R8
MOV R14,RDI
MOV RBP,qword ptr [R8 + 0x10]
MOV R12,qword ptr [R8 + 0x18]
MOV RSI,RBP
MOV RDX,R12
CALL 0x0014560d
MOV R15D,0x6
TEST EAX,EAX
JNZ 0x00156681
MOV RSI,qword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x8]
XOR EBX,EBX
MOV RDI,R14
XOR ECX,ECX
CALL 0x00145867
MOV qword ptr [RSP + 0x10],RDX
CMP EDX,0x6
JZ 0x00156683
MOV R13,RAX
MOV qword ptr [RSP + 0xc0],R12
MOV dword ptr [RSP + 0x48],EBX
MOV R12D,0x3
MOV qword ptr [RSP + 0x50],R12
MOV dword ptr [RSP + 0x18],EBX
MOV qword ptr [RSP + 0x20],R12
MOV RDI,R14
MOV RSI,RAX
MOV RDX,qword ptr [RSP + 0x10]
MOV ECX,0x6b
MOV R8,RAX
MOV R9,RDX
PUSH RBX
PUSH 0x0
CALL 0x00126fff
ADD RSP,0x10
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RDX
CMP EDX,0x6
MOV qword ptr [RSP + 0x58],R13
JNZ 0x0015629d
XOR R13D,R13D
MOV EAX,0x3
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x8],0x0
XOR EBP,EBP
JMP 0x0015660a
LAB_0015629d:
MOV qword ptr [RSP + 0xa8],RBP
XOR EBX,EBX
MOV R12D,0x3
MOV EDX,0x3
MOV RDI,R14
XOR ESI,ESI
XOR ECX,ECX
XOR R8D,R8D
XOR R9D,R9D
CALL 0x00139b68
MOV RBP,RAX
MOV qword ptr [RSP + 0x8],RAX
SHR RBP,0x20
MOV qword ptr [RSP + 0x30],RDX
CMP EDX,0x6
JZ 0x00156314
LEA RAX,[RSP + 0x2c]
XOR EBX,EBX
MOV RDI,R14
MOV RSI,R13
MOV RDX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x38]
MOV R8,qword ptr [RSP + 0x40]
XOR R9D,R9D
PUSH RAX
PUSH 0x0
CALL 0x00145b58
ADD RSP,0x10
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x20],RDX
CMP EDX,0x6
JNZ 0x0015631c
LAB_00156314:
XOR R13D,R13D
JMP 0x0015660a
LAB_0015631c:
MOV qword ptr [RSP + 0x68],RDX
MOV qword ptr [RSP + 0x70],RAX
MOV qword ptr [RSP + 0x78],0x0
MOV qword ptr [RSP + 0x60],RBP
LAB_00156334:
CMP dword ptr [RSP + 0x2c],0x0
JNZ 0x001565a8
MOVUPS XMM0,xmmword ptr [RSP + 0x18]
MOVAPS xmmword ptr [RSP + 0x80],XMM0
MOV RCX,qword ptr [RSP + 0x78]
MOV RAX,RCX
SHR RAX,0x1f
XORPS XMM0,XMM0
CVTSI2SD XMM0,RCX
MOV ECX,ECX
MOVQ RDX,XMM0
CMOVZ RDX,RCX
MOV ECX,0x7
CMOVNZ RAX,RCX
MOV qword ptr [RSP + 0x90],RDX
MOV qword ptr [RSP + 0x98],RAX
MOV RCX,qword ptr [R14 + 0x1a0]
MOV R8,qword ptr [R14 + 0x1a8]
MOV dword ptr [RSP + 0xc8],0x0
MOV qword ptr [RSP + 0xd0],0x3
SUB RSP,0x20
MOVUPS XMM0,xmmword ptr [RSP + 0xe8]
MOVUPS xmmword ptr [RSP],XMM0
LEA RAX,[RSP + 0xa0]
MOV qword ptr [RSP + 0x10],RAX
MOV dword ptr [RSP + 0x18],0x2
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0xc8]
MOV RDX,qword ptr [RSP + 0xe0]
MOV R9D,0x2
CALL 0x0012c526
ADD RSP,0x20
MOV qword ptr [RSP + 0x48],RAX
MOV qword ptr [RSP + 0x50],RDX
CMP EDX,0x6
MOV R15,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x8]
JZ 0x001565ef
MOV qword ptr [RSP + 0xb0],RDX
MOV qword ptr [RSP + 0xb8],RAX
MOV RDI,R14
MOV RDX,R15
LEA R8,[RSP + 0x48]
XOR R9D,R9D
CALL 0x00153b91
MOV R12,RDX
CMP R12D,0x3
JZ 0x00156530
MOV RBX,RAX
MOV R13,RAX
SHR R13,0x20
CMP R12D,0x6
JZ 0x001565fe
LAB_00156451:
MOV R15,qword ptr [RSP + 0x10]
MOV RAX,R13
SHL RAX,0x20
MOV EBP,EBX
OR RBP,RAX
MOV RDI,R14
MOV RSI,RBP
MOV RDX,R12
MOV ECX,0x1
LEA R8,[RSP + 0x18]
XOR R9D,R9D
CALL 0x00150eb1
CMP EDX,0x6
JZ 0x001565f9
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,RBP
MOV RDX,R12
CALL 0x00121922
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,qword ptr [RSP + 0xb8]
MOV RDX,qword ptr [RSP + 0xb0]
CALL 0x00121922
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,qword ptr [RSP + 0x70]
MOV RDX,qword ptr [RSP + 0x68]
CALL 0x00121922
XOR EBX,EBX
MOV dword ptr [RSP + 0x48],EBX
MOV R12D,0x3
MOV qword ptr [RSP + 0x50],R12
MOV dword ptr [RSP + 0x18],EBX
MOV qword ptr [RSP + 0x20],R12
INC qword ptr [RSP + 0x78]
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,R15
MOV RCX,qword ptr [RSP + 0x38]
MOV R8,qword ptr [RSP + 0x40]
XOR R9D,R9D
LEA RAX,[RSP + 0x2c]
PUSH RAX
PUSH 0x0
CALL 0x00145b58
ADD RSP,0x10
MOV qword ptr [RSP + 0x70],RAX
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x20],RDX
MOV qword ptr [RSP + 0x68],RDX
CMP EDX,0x6
MOV RBP,qword ptr [RSP + 0x60]
JNZ 0x00156334
JMP 0x001565fe
LAB_00156530:
MOV RSI,qword ptr [R14 + 0x38]
INC dword ptr [RSI]
MOV RDI,R14
MOV EDX,0x2
CALL 0x0010f7b2
MOV RBX,RAX
MOV R12,RDX
MOV R13,RAX
SHR R13,0x20
CMP R12D,0x6
JZ 0x001565fe
MOVUPS XMM0,xmmword ptr [RSP + 0x48]
MOVAPS xmmword ptr [RSP + 0x80],XMM0
MOV qword ptr [RSP + 0x90],RBX
MOV qword ptr [RSP + 0x98],R12
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,R15
LEA R8,[RSP + 0x80]
XOR R9D,R9D
CALL 0x0014b317
CMP EDX,0x6
JZ 0x001565fe
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,RAX
CALL 0x00121922
JMP 0x00156451
LAB_001565a8:
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x10]
CALL 0x00121922
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
CALL 0x00121922
MOV RCX,-0x100000000
MOV RDX,qword ptr [RSP + 0x8]
MOV RAX,RDX
AND RAX,RCX
MOV EBX,EDX
MOV R15,qword ptr [RSP + 0x30]
JMP 0x00156685
LAB_001565ef:
XOR EBX,EBX
MOV R12D,0x3
JMP 0x001565fe
LAB_001565f9:
MOV RBP,qword ptr [RSP + 0x60]
LAB_001565fe:
SHL R13,0x20
MOV EBX,EBX
MOV R15D,0x6
LAB_0015660a:
OR RBX,R13
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,RBX
MOV RDX,R12
CALL 0x00121922
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
MOV RDI,qword ptr [R14 + 0x18]
CALL 0x00121922
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
MOV RDI,qword ptr [R14 + 0x18]
CALL 0x00121922
SHL RBP,0x20
MOV ESI,dword ptr [RSP + 0x8]
OR RSI,RBP
MOV RDI,qword ptr [R14 + 0x18]
MOV RDX,qword ptr [RSP + 0x30]
CALL 0x00121922
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x10]
CALL 0x00121922
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,qword ptr [RSP + 0x38]
MOV RDX,qword ptr [RSP + 0x40]
CALL 0x00121922
LAB_00156681:
XOR EBX,EBX
LAB_00156683:
XOR EAX,EAX
LAB_00156685:
OR RBX,RAX
MOV RAX,RBX
MOV RDX,R15
ADD RSP,0xd8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16] js_map_groupBy(long param_1)
{
int8 uVar1;
int8 uVar2;
int *piVar3;
int iVar4;
int extraout_EDX;
ulong uVar6;
ulong uVar7;
int8 *in_R8;
int8 uVar8;
ulong uVar9;
int1 auVar10 [12];
int1 auVar11 [16];
int1 auVar12 [16];
ulong local_100;
int1 local_f0 [16];
int local_dc;
int8 local_d8;
int1 local_d0 [16];
int1 local_c0 [16];
ulong local_b0;
ulong local_a8;
int8 local_a0;
ulong local_98;
ulong local_90;
int1 local_88 [16];
int1 local_78 [16];
int8 local_60;
int8 local_58;
int8 local_50;
int8 local_48;
int4 local_40;
int8 uStack_38;
int8 uVar5;
uVar1 = in_R8[2];
uVar2 = in_R8[3];
iVar4 = check_function(param_1,uVar1,uVar2);
if (iVar4 != 0) goto LAB_00156683;
uVar7 = 0;
auVar11 = JS_GetIterator(param_1,*in_R8,in_R8[1],0);
uVar5 = auVar11._8_8_;
uVar9 = auVar11._0_8_;
if (auVar11._8_4_ == 6) goto LAB_00156683;
local_c0._0_8_ = (ulong)(uint)local_c0._4_4_ << 0x20;
uVar8 = 3;
local_c0._8_8_ = 3;
local_f0._0_8_ = (ulong)(uint)local_f0._4_4_ << 0x20;
local_f0._8_8_ = 3;
local_48 = uVar2;
local_d0 = JS_GetPropertyInternal2(param_1,uVar9,uVar5,0x6b,uVar9,uVar5,0,0);
auVar11._8_8_ = local_a0;
auVar11._0_8_ = local_98;
local_b0 = uVar9;
if (local_d0._8_4_ == 6) {
uVar9 = 0;
local_d8 = 3;
local_100 = 0;
uVar6 = 0;
}
else {
uVar8 = 3;
local_60 = uVar1;
auVar11 = js_map_constructor(param_1,0,3,0,0,0);
local_d8 = auVar11._8_8_;
local_100 = auVar11._0_8_;
uVar6 = local_100 >> 0x20;
if (auVar11._8_4_ != 6) {
local_f0 = JS_IteratorNext(param_1,uVar9,uVar5,local_d0._0_8_,local_d0._8_8_,0,0,&local_dc);
if (local_f0._8_4_ != 6) {
local_90 = 0;
local_a8 = uVar6;
do {
uVar6 = local_a8;
local_a0 = local_f0._8_8_;
local_98 = local_f0._0_8_;
local_f0._0_8_ = local_98;
local_f0._8_8_ = local_a0;
if (local_dc != 0) {
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_b0,uVar5);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_d0._0_8_,local_d0._8_8_);
uVar9 = local_100 & 0xffffffff00000000;
local_100 = local_100 & 0xffffffff;
goto LAB_00156685;
}
local_78._0_8_ = (int8)(long)local_90;
if (local_90 >> 0x1f == 0) {
local_78._8_8_ = 0;
local_78._0_8_ = local_90 & 0xffffffff;
}
else {
local_78._8_8_ = 7;
}
local_40 = 0;
uStack_38 = 3;
local_88 = local_f0;
local_c0 = JS_CallInternal(param_1,local_60,local_48,*(int8 *)(param_1 + 0x1a0),
*(int8 *)(param_1 + 0x1a8),2,0,3,local_88,2);
uVar1 = local_d8;
auVar11._8_8_ = local_a0;
auVar11._0_8_ = local_98;
if (local_c0._8_4_ == 6) {
auVar12 = ZEXT816(3) << 0x40;
break;
}
local_58 = local_c0._8_8_;
local_50 = local_c0._0_8_;
auVar12 = js_map_get(param_1,local_100,local_d8);
auVar11._8_8_ = local_a0;
auVar11._0_8_ = local_98;
if (auVar12._8_4_ == 3) {
piVar3 = *(int **)(param_1 + 0x38);
*piVar3 = *piVar3 + 1;
auVar12 = JS_NewObjectFromShape(param_1,piVar3,2);
auVar11._8_8_ = local_a0;
auVar11._0_8_ = local_98;
uVar9 = auVar12._0_8_ >> 0x20;
if (auVar12._8_4_ == 6) break;
local_78 = auVar12;
local_88 = local_c0;
auVar10 = js_map_set(param_1,local_100,uVar1);
auVar11._8_8_ = local_a0;
auVar11._0_8_ = local_98;
if (auVar10._8_4_ == 6) break;
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar10._0_8_);
}
else {
uVar9 = auVar12._0_8_ >> 0x20;
if (auVar12._8_4_ == 6) break;
}
uVar7 = auVar12._0_8_ & 0xffffffff | uVar9 << 0x20;
js_array_push(param_1,uVar7,auVar12._8_8_,1,local_f0,0);
auVar11._8_8_ = local_a0;
auVar11._0_8_ = local_98;
uVar6 = local_a8;
if (extraout_EDX == 6) break;
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar7,auVar12._8_8_);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_50,local_58);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_98,local_a0);
local_c0._0_8_ = local_c0._0_8_ & 0xffffffff00000000;
auVar12 = ZEXT816(3) << 0x40;
local_c0._8_8_ = 3;
local_f0._0_8_ = local_f0._0_8_ & 0xffffffff00000000;
local_f0._8_8_ = 3;
local_90 = local_90 + 1;
local_f0 = JS_IteratorNext(param_1,local_b0,uVar5,local_d0._0_8_,local_d0._8_8_,0,0,
&local_dc);
uVar6 = local_a8;
auVar11 = local_f0;
} while (local_f0._8_4_ != 6);
uVar8 = auVar12._8_8_;
uVar9 = uVar9 << 0x20;
uVar7 = auVar12._0_8_ & 0xffffffff;
goto LAB_0015660a;
}
}
auVar11._8_8_ = local_a0;
auVar11._0_8_ = local_98;
uVar7 = 0;
uVar9 = 0;
}
LAB_0015660a:
local_a0 = auVar11._8_8_;
local_98 = auVar11._0_8_;
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar7 | uVar9,uVar8);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_c0._0_8_,local_c0._8_8_);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_f0._0_8_,local_f0._8_8_);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_100 & 0xffffffff | uVar6 << 0x20,local_d8);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_b0,uVar5);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_d0._0_8_,local_d0._8_8_);
LAB_00156683:
local_100 = 0;
local_d8 = 6;
uVar9 = 0;
LAB_00156685:
auVar12._8_8_ = local_d8;
auVar12._0_8_ = local_100 | uVar9;
return auVar12;
}
|
|
6,148 | std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<std::nullptr_t>(std::nullptr_t&&, bool) | hkr04[P]cpp-mcp/common/json.hpp | std::pair<bool, BasicJsonType*> handle_value(Value&& v, const bool skip_callback = false)
{
JSON_ASSERT(!keep_stack.empty());
// do not handle this value if we know it would be added to a discarded
// container
if (!keep_stack.back())
{
return {false, nullptr};
}
// create value
auto value = BasicJsonType(std::forward<Value>(v));
// check callback
const bool keep = skip_callback || callback(static_cast<int>(ref_stack.size()), parse_event_t::value, value);
// do not handle this value if we just learnt it shall be discarded
if (!keep)
{
return {false, nullptr};
}
if (ref_stack.empty())
{
root = std::move(value);
return {true, & root};
}
// skip this value if we already decided to skip the parent
// (https://github.com/nlohmann/json/issues/971#issuecomment-413678360)
if (!ref_stack.back())
{
return {false, nullptr};
}
// we now only expect arrays and objects
JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object());
// array
if (ref_stack.back()->is_array())
{
ref_stack.back()->m_data.m_value.array->emplace_back(std::move(value));
return {true, & (ref_stack.back()->m_data.m_value.array->back())};
}
// object
JSON_ASSERT(ref_stack.back()->is_object());
// check if we should store an element for the current key
JSON_ASSERT(!key_keep_stack.empty());
const bool store_element = key_keep_stack.back();
key_keep_stack.pop_back();
if (!store_element)
{
return {false, nullptr};
}
JSON_ASSERT(object_element);
*object_element = std::move(value);
return {true, object_element};
} | O1 | cpp | std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<std::nullptr_t>(std::nullptr_t&&, bool):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movl %edx, %ebp
movq %rdi, %rbx
movabsq $-0x8000000000000000, %r14 # imm = 0x8000000000000000
movl 0x38(%rdi), %eax
leaq -0x1(%rax), %rcx
addq $0x3e, %rax
testq %rcx, %rcx
cmovnsq %rcx, %rax
sarq $0x6, %rax
shlq $0x3, %rax
addq 0x30(%rdi), %rax
leaq 0x3f(%r14), %rdx
andq %rcx, %rdx
xorl %edi, %edi
cmpq %r14, %rdx
setbe %dil
movq -0x8(%rax,%rdi,8), %rax
btq %rcx, %rax
jae 0x1a2d8
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
movaps %xmm0, (%rdi)
movq (%rsi), %rsi
callq 0x10aec
testb %bpl, %bpl
jne 0x1a295
movq 0x10(%rbx), %rax
subq 0x8(%rbx), %rax
shrq $0x3, %rax
movl %eax, 0x2c(%rsp)
movb $0x5, 0xf(%rsp)
cmpq $0x0, 0x90(%rbx)
je 0x1a3e1
leaq 0x80(%rbx), %rdi
leaq 0x2c(%rsp), %rsi
leaq 0xf(%rsp), %rdx
leaq 0x10(%rsp), %rcx
callq *0x98(%rbx)
testb %al, %al
je 0x1a3c4
movq 0x10(%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x1a2e2
movq -0x8(%rax), %rax
testq %rax, %rax
je 0x1a3c4
cmpb $0x2, (%rax)
jne 0x1a325
movq 0x8(%rax), %rdi
leaq 0x10(%rsp), %rsi
callq 0x7e48
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %r14
addq $-0x10, %r14
jmp 0x1a3c0
xorl %ebx, %ebx
xorl %r14d, %r14d
jmp 0x1a3d3
movaps 0x10(%rsp), %xmm0
leaq 0x40(%rsp), %rdi
movaps %xmm0, (%rdi)
movb $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movq (%rbx), %rax
movb (%rax), %cl
movb (%rdi), %dl
movb %dl, (%rax)
movb %cl, (%rdi)
movq 0x8(%rax), %rcx
movq 0x8(%rdi), %rdx
movq %rdx, 0x8(%rax)
movq %rcx, 0x8(%rdi)
callq 0x7a32
movq (%rbx), %r14
jmp 0x1a3c0
movq 0x58(%rbx), %rax
movl 0x60(%rbx), %esi
leaq -0x1(%rsi), %rcx
movq %rsi, %rdx
addq $0x3e, %rdx
testq %rcx, %rcx
cmovnsq %rcx, %rdx
sarq $0x6, %rdx
leaq (%rax,%rdx,8), %rdi
leaq 0x3f(%r14), %rdx
andq %rcx, %rdx
xorl %r8d, %r8d
cmpq %r14, %rdx
setbe %r8b
movl $0x1, %edx
shlq %cl, %rdx
andq -0x8(%rdi,%r8,8), %rdx
subl $0x1, %esi
movl %esi, 0x60(%rbx)
jae 0x1a37b
movl $0x3f, 0x60(%rbx)
addq $-0x8, %rax
movq %rax, 0x58(%rbx)
testq %rdx, %rdx
je 0x1a3c4
movaps 0x10(%rsp), %xmm0
leaq 0x30(%rsp), %rdi
movaps %xmm0, (%rdi)
movb $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movq 0x70(%rbx), %rax
movb (%rax), %cl
movb (%rdi), %dl
movb %dl, (%rax)
movb %cl, (%rdi)
movq 0x8(%rax), %rcx
movq 0x8(%rdi), %rdx
movq %rdx, 0x8(%rax)
movq %rcx, 0x8(%rdi)
callq 0x7a32
movq 0x70(%rbx), %r14
movb $0x1, %bl
jmp 0x1a3c9
xorl %ebx, %ebx
xorl %r14d, %r14d
leaq 0x10(%rsp), %rdi
callq 0x7a32
movl %ebx, %eax
movq %r14, %rdx
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x5170
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x7a32
movq %rbx, %rdi
callq 0x5740
nop
| _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueIRlEESt4pairIbPSF_EOT_b:
push rbp
push r14
push rbx
sub rsp, 50h
mov ebp, edx
mov rbx, rdi
mov r14, 8000000000000000h
mov eax, [rdi+38h]
lea rcx, [rax-1]
add rax, 3Eh ; '>'
test rcx, rcx
cmovns rax, rcx
sar rax, 6
shl rax, 3
add rax, [rdi+30h]
lea rdx, [r14+3Fh]
and rdx, rcx
xor edi, edi
cmp rdx, r14
setbe dil
mov rax, [rax+rdi*8-8]
bt rax, rcx
jnb loc_1A2D8
xorps xmm0, xmm0
lea rdi, [rsp+68h+var_58]
movaps xmmword ptr [rdi], xmm0
mov rsi, [rsi]
call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE5EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_16number_integer_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::number_integer_t)
test bpl, bpl
jnz short loc_1A295
mov rax, [rbx+10h]
sub rax, [rbx+8]
shr rax, 3
mov [rsp+68h+var_3C], eax
mov [rsp+68h+var_59], 5
cmp qword ptr [rbx+90h], 0
jz loc_1A3E1
lea rdi, [rbx+80h]
lea rsi, [rsp+68h+var_3C]
lea rdx, [rsp+68h+var_59]
lea rcx, [rsp+68h+var_58]
call qword ptr [rbx+98h]
test al, al
jz loc_1A3C4
loc_1A295:
mov rax, [rbx+10h]
cmp [rbx+8], rax
jz short loc_1A2E2
mov rax, [rax-8]
test rax, rax
jz loc_1A3C4
cmp byte ptr [rax], 2
jnz short loc_1A325
mov rdi, [rax+8]
lea rsi, [rsp+68h+var_58]
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&)
mov rax, [rbx+10h]
mov rax, [rax-8]
mov rax, [rax+8]
mov r14, [rax+8]
add r14, 0FFFFFFFFFFFFFFF0h
jmp loc_1A3C0
loc_1A2D8:
xor ebx, ebx
xor r14d, r14d
jmp loc_1A3D3
loc_1A2E2:
movaps xmm0, [rsp+68h+var_58]
lea rdi, [rsp+68h+var_28]
movaps xmmword ptr [rdi], xmm0
mov byte ptr [rsp+68h+var_58], 0
mov qword ptr [rsp+68h+var_58+8], 0
mov rax, [rbx]
mov cl, [rax]
mov dl, [rdi]
mov [rax], dl
mov [rdi], cl
mov rcx, [rax+8]
mov rdx, [rdi+8]
mov [rax+8], rdx
mov [rdi+8], rcx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov r14, [rbx]
jmp loc_1A3C0
loc_1A325:
mov rax, [rbx+58h]
mov esi, [rbx+60h]
lea rcx, [rsi-1]
mov rdx, rsi
add rdx, 3Eh ; '>'
test rcx, rcx
cmovns rdx, rcx
sar rdx, 6
lea rdi, [rax+rdx*8]
lea rdx, [r14+3Fh]
and rdx, rcx
xor r8d, r8d
cmp rdx, r14
setbe r8b
mov edx, 1
shl rdx, cl
and rdx, [rdi+r8*8-8]
sub esi, 1
mov [rbx+60h], esi
jnb short loc_1A37B
mov dword ptr [rbx+60h], 3Fh ; '?'
add rax, 0FFFFFFFFFFFFFFF8h
mov [rbx+58h], rax
loc_1A37B:
test rdx, rdx
jz short loc_1A3C4
movaps xmm0, [rsp+68h+var_58]
lea rdi, [rsp+68h+var_38]
movaps xmmword ptr [rdi], xmm0
mov byte ptr [rsp+68h+var_58], 0
mov qword ptr [rsp+68h+var_58+8], 0
mov rax, [rbx+70h]
mov cl, [rax]
mov dl, [rdi]
mov [rax], dl
mov [rdi], cl
mov rcx, [rax+8]
mov rdx, [rdi+8]
mov [rax+8], rdx
mov [rdi+8], rcx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov r14, [rbx+70h]
loc_1A3C0:
mov bl, 1
jmp short loc_1A3C9
loc_1A3C4:
xor ebx, ebx
xor r14d, r14d
loc_1A3C9:
lea rdi, [rsp+68h+var_58]
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_1A3D3:
mov eax, ebx
mov rdx, r14
add rsp, 50h
pop rbx
pop r14
pop rbp
retn
loc_1A3E1:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
mov rbx, rax
lea rdi, [rsp+68h+var_58]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, rbx
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::handle_value<long &>(
char **a1,
long long *a2,
char a3)
{
unsigned int v4; // ebx
long long v5; // rax
signed long long v6; // rcx
long long v7; // rax
long long v8; // rax
char *v9; // rax
long long v10; // rax
char *v11; // rax
char v12; // cl
long long v13; // rcx
char *v14; // rax
long long v15; // rsi
long long v16; // rdx
long long v17; // rdx
char *v18; // rax
char v19; // cl
long long v20; // rcx
char v22; // [rsp+Fh] [rbp-59h] BYREF
__int128 v23; // [rsp+10h] [rbp-58h] BYREF
int v24; // [rsp+2Ch] [rbp-3Ch] BYREF
__int128 v25; // [rsp+30h] [rbp-38h] BYREF
__int128 v26; // [rsp+40h] [rbp-28h] BYREF
v4 = (unsigned int)a1;
v5 = *((unsigned int *)a1 + 14);
v6 = v5 - 1;
v7 = v5 + 62;
if ( v6 >= 0 )
v7 = v6;
v8 = *(_QWORD *)&a1[6][8 * (v7 >> 6) - 8 + 8 * ((v6 & 0x800000000000003FLL) <= 0x8000000000000000LL)];
if ( _bittest64(&v8, v6) )
{
v23 = 0LL;
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
(unsigned __int8 *)&v23,
*a2);
if ( a3 )
goto LABEL_7;
v24 = (unsigned long long)(a1[2] - a1[1]) >> 3;
v22 = 5;
if ( !a1[18] )
std::__throw_bad_function_call();
if ( ((unsigned __int8 ( *)(char **, int *, char *, __int128 *))a1[19])(a1 + 16, &v24, &v22, &v23) )
{
LABEL_7:
v9 = a1[2];
if ( a1[1] == v9 )
{
v26 = v23;
LOBYTE(v23) = 0;
*((_QWORD *)&v23 + 1) = 0LL;
v11 = *a1;
v12 = **a1;
*v11 = v26;
LOBYTE(v26) = v12;
v13 = *((_QWORD *)v11 + 1);
*((_QWORD *)v11 + 1) = *((_QWORD *)&v26 + 1);
*((_QWORD *)&v26 + 1) = v13;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v26);
goto LABEL_19;
}
v10 = *((_QWORD *)v9 - 1);
if ( v10 )
{
if ( *(_BYTE *)v10 == 2 )
{
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
*(_QWORD *)(v10 + 8),
(long long)&v23);
LABEL_19:
LOBYTE(v4) = 1;
LABEL_21:
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(&v23);
return v4;
}
v14 = a1[11];
v15 = *((unsigned int *)a1 + 24);
v16 = v15 + 62;
if ( v15 - 1 >= 0 )
v16 = v15 - 1;
v17 = *(_QWORD *)&v14[8 * (v16 >> 6) - 8 + 8 * (((v15 - 1) & 0x800000000000003FLL) <= 0x8000000000000000LL)] & (1LL << ((unsigned __int8)v15 - 1));
*((_DWORD *)a1 + 24) = v15 - 1;
if ( !(_DWORD)v15 )
{
*((_DWORD *)a1 + 24) = 63;
a1[11] = v14 - 8;
}
if ( v17 )
{
v25 = v23;
LOBYTE(v23) = 0;
*((_QWORD *)&v23 + 1) = 0LL;
v18 = a1[14];
v19 = *v18;
*v18 = v25;
LOBYTE(v25) = v19;
v20 = *((_QWORD *)v18 + 1);
*((_QWORD *)v18 + 1) = *((_QWORD *)&v25 + 1);
*((_QWORD *)&v25 + 1) = v20;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v25);
goto LABEL_19;
}
}
}
v4 = 0;
goto LABEL_21;
}
return 0;
}
| handle_value<long&>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV EBP,EDX
MOV RBX,RDI
MOV R14,-0x8000000000000000
MOV EAX,dword ptr [RDI + 0x38]
LEA RCX,[RAX + -0x1]
ADD RAX,0x3e
TEST RCX,RCX
CMOVNS RAX,RCX
SAR RAX,0x6
SHL RAX,0x3
ADD RAX,qword ptr [RDI + 0x30]
LEA RDX,[R14 + 0x3f]
AND RDX,RCX
XOR EDI,EDI
CMP RDX,R14
SETBE DIL
MOV RAX,qword ptr [RAX + RDI*0x8 + -0x8]
BT RAX,RCX
JNC 0x0011a2d8
XORPS XMM0,XMM0
LEA RDI,[RSP + 0x10]
MOVAPS xmmword ptr [RDI],XMM0
MOV RSI,qword ptr [RSI]
CALL 0x00110aec
TEST BPL,BPL
JNZ 0x0011a295
MOV RAX,qword ptr [RBX + 0x10]
SUB RAX,qword ptr [RBX + 0x8]
SHR RAX,0x3
MOV dword ptr [RSP + 0x2c],EAX
MOV byte ptr [RSP + 0xf],0x5
CMP qword ptr [RBX + 0x90],0x0
JZ 0x0011a3e1
LEA RDI,[RBX + 0x80]
LAB_0011a278:
LEA RSI,[RSP + 0x2c]
LEA RDX,[RSP + 0xf]
LEA RCX,[RSP + 0x10]
CALL qword ptr [RBX + 0x98]
TEST AL,AL
JZ 0x0011a3c4
LAB_0011a295:
MOV RAX,qword ptr [RBX + 0x10]
CMP qword ptr [RBX + 0x8],RAX
JZ 0x0011a2e2
MOV RAX,qword ptr [RAX + -0x8]
TEST RAX,RAX
JZ 0x0011a3c4
CMP byte ptr [RAX],0x2
JNZ 0x0011a325
MOV RDI,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0x10]
CALL 0x00107e48
MOV RAX,qword ptr [RBX + 0x10]
MOV RAX,qword ptr [RAX + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV R14,qword ptr [RAX + 0x8]
ADD R14,-0x10
JMP 0x0011a3c0
LAB_0011a2d8:
XOR EBX,EBX
XOR R14D,R14D
JMP 0x0011a3d3
LAB_0011a2e2:
MOVAPS XMM0,xmmword ptr [RSP + 0x10]
LEA RDI,[RSP + 0x40]
MOVAPS xmmword ptr [RDI],XMM0
MOV byte ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],0x0
MOV RAX,qword ptr [RBX]
MOV CL,byte ptr [RAX]
MOV DL,byte ptr [RDI]
MOV byte ptr [RAX],DL
MOV byte ptr [RDI],CL
MOV RCX,qword ptr [RAX + 0x8]
MOV RDX,qword ptr [RDI + 0x8]
MOV qword ptr [RAX + 0x8],RDX
MOV qword ptr [RDI + 0x8],RCX
CALL 0x00107a32
MOV R14,qword ptr [RBX]
JMP 0x0011a3c0
LAB_0011a325:
MOV RAX,qword ptr [RBX + 0x58]
MOV ESI,dword ptr [RBX + 0x60]
LEA RCX,[RSI + -0x1]
MOV RDX,RSI
ADD RDX,0x3e
TEST RCX,RCX
CMOVNS RDX,RCX
SAR RDX,0x6
LEA RDI,[RAX + RDX*0x8]
LEA RDX,[R14 + 0x3f]
AND RDX,RCX
XOR R8D,R8D
CMP RDX,R14
SETBE R8B
MOV EDX,0x1
SHL RDX,CL
AND RDX,qword ptr [RDI + R8*0x8 + -0x8]
SUB ESI,0x1
MOV dword ptr [RBX + 0x60],ESI
JNC 0x0011a37b
MOV dword ptr [RBX + 0x60],0x3f
ADD RAX,-0x8
MOV qword ptr [RBX + 0x58],RAX
LAB_0011a37b:
TEST RDX,RDX
JZ 0x0011a3c4
MOVAPS XMM0,xmmword ptr [RSP + 0x10]
LEA RDI,[RSP + 0x30]
MOVAPS xmmword ptr [RDI],XMM0
MOV byte ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],0x0
MOV RAX,qword ptr [RBX + 0x70]
MOV CL,byte ptr [RAX]
MOV DL,byte ptr [RDI]
MOV byte ptr [RAX],DL
MOV byte ptr [RDI],CL
MOV RCX,qword ptr [RAX + 0x8]
MOV RDX,qword ptr [RDI + 0x8]
MOV qword ptr [RAX + 0x8],RDX
MOV qword ptr [RDI + 0x8],RCX
CALL 0x00107a32
MOV R14,qword ptr [RBX + 0x70]
LAB_0011a3c0:
MOV BL,0x1
JMP 0x0011a3c9
LAB_0011a3c4:
XOR EBX,EBX
XOR R14D,R14D
LAB_0011a3c9:
LEA RDI,[RSP + 0x10]
CALL 0x00107a32
LAB_0011a3d3:
MOV EAX,EBX
MOV RDX,R14
ADD RSP,0x50
POP RBX
POP R14
POP RBP
RET
LAB_0011a3e1:
CALL 0x00105170
LAB_0011a3e6:
MOV RBX,RAX
LEA RDI,[RSP + 0x10]
CALL 0x00107a32
MOV RDI,RBX
CALL 0x00105740
|
/* std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>*>
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::handle_value<long&>(long&, bool) */
int1 [16] __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::handle_value<long&>
(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,long *param_1,bool param_2)
{
data dVar1;
uint uVar2;
char *pcVar3;
data *pdVar4;
uint7 uVar5;
int8 uVar6;
char cVar7;
ulong uVar8;
int8 uVar9;
ulong uVar10;
long lVar11;
int1 auVar12 [16];
int1 local_59;
long local_58;
int8 uStack_50;
int4 local_3c;
data local_38;
uint7 uStack_37;
int8 uStack_30;
data local_28;
uint7 uStack_27;
int8 uStack_20;
uVar10 = (ulong)*(uint *)(this + 0x38) - 1;
uVar8 = (ulong)*(uint *)(this + 0x38) + 0x3e;
if (-1 < (long)uVar10) {
uVar8 = uVar10;
}
if ((*(ulong *)(((long)uVar8 >> 6) * 8 + *(long *)(this + 0x30) + -8 +
(ulong)((uVar10 & 0x800000000000003f) < 0x8000000000000001) * 8) >> (uVar10 & 0x3f)
& 1) == 0) {
uVar10 = 0;
lVar11 = 0;
goto LAB_0011a3d3;
}
local_58 = 0;
uStack_50 = 0;
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::
construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(&local_58,*param_1);
if (param_2) {
LAB_0011a295:
uVar9 = _local_28;
uVar6 = uStack_50;
uVar5 = local_58._1_7_;
local_28 = SUB81(local_58,0);
if (*(long *)(this + 8) == *(long *)(this + 0x10)) {
local_58 = (ulong)local_58._1_7_ << 8;
uStack_50 = 0;
pdVar4 = *(data **)this;
dVar1 = *pdVar4;
*pdVar4 = local_28;
_local_28 = CONCAT71(uVar5,dVar1);
uStack_20 = *(int8 *)(pdVar4 + 8);
*(int8 *)(pdVar4 + 8) = uVar6;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_28);
lVar11 = *(long *)this;
}
else {
pcVar3 = *(char **)(*(long *)(this + 0x10) + -8);
if (pcVar3 == (char *)0x0) goto LAB_0011a3c4;
_local_28 = uVar9;
if (*pcVar3 == '\x02') {
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(pcVar3 + 8),(basic_json *)&local_58);
lVar11 = *(long *)(*(long *)(*(long *)(*(long *)(this + 0x10) + -8) + 8) + 8) + -0x10;
}
else {
uVar2 = *(uint *)(this + 0x60);
uVar10 = (ulong)uVar2 - 1;
uVar8 = (ulong)uVar2 + 0x3e;
if (-1 < (long)uVar10) {
uVar8 = uVar10;
}
uVar8 = *(ulong *)(*(long *)(this + 0x58) + ((long)uVar8 >> 6) * 8 + -8 +
(ulong)((uVar10 & 0x800000000000003f) < 0x8000000000000001) * 8);
*(uint *)(this + 0x60) = uVar2 - 1;
if (uVar2 == 0) {
*(int4 *)(this + 0x60) = 0x3f;
*(long *)(this + 0x58) = *(long *)(this + 0x58) + -8;
}
if ((1L << ((byte)uVar10 & 0x3f) & uVar8) == 0) goto LAB_0011a3c4;
local_58 = (ulong)local_58._1_7_ << 8;
uStack_50 = 0;
pdVar4 = *(data **)(this + 0x70);
dVar1 = *pdVar4;
*pdVar4 = local_28;
_local_38 = CONCAT71(uVar5,dVar1);
uStack_30 = *(int8 *)(pdVar4 + 8);
*(int8 *)(pdVar4 + 8) = uVar6;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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);
lVar11 = *(long *)(this + 0x70);
}
}
uVar10 = CONCAT71((int7)((ulong)this >> 8),1);
}
else {
local_3c = (int4)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3);
local_59 = 5;
if (*(long *)(this + 0x90) == 0) {
uVar9 = std::__throw_bad_function_call();
/* catch() { ... } // from try @ 0011a278 with catch @ 0011a3e6 */
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_58);
/* WARNING: Subroutine does not return */
_Unwind_Resume(uVar9);
}
/* try { // try from 0011a278 to 0011a3e5 has its CatchHandler @ 0011a3e6 */
cVar7 = (**(code **)(this + 0x98))(this + 0x80,&local_3c,&local_59,&local_58);
uVar9 = _local_28;
if (cVar7 != '\0') goto LAB_0011a295;
LAB_0011a3c4:
_local_28 = uVar9;
uVar10 = 0;
lVar11 = 0;
}
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_58);
LAB_0011a3d3:
auVar12._0_8_ = uVar10 & 0xffffffff;
auVar12._8_8_ = lVar11;
return auVar12;
}
|
|
6,149 | std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<std::nullptr_t>(std::nullptr_t&&, bool) | hkr04[P]cpp-mcp/common/json.hpp | std::pair<bool, BasicJsonType*> handle_value(Value&& v, const bool skip_callback = false)
{
JSON_ASSERT(!keep_stack.empty());
// do not handle this value if we know it would be added to a discarded
// container
if (!keep_stack.back())
{
return {false, nullptr};
}
// create value
auto value = BasicJsonType(std::forward<Value>(v));
// check callback
const bool keep = skip_callback || callback(static_cast<int>(ref_stack.size()), parse_event_t::value, value);
// do not handle this value if we just learnt it shall be discarded
if (!keep)
{
return {false, nullptr};
}
if (ref_stack.empty())
{
root = std::move(value);
return {true, & root};
}
// skip this value if we already decided to skip the parent
// (https://github.com/nlohmann/json/issues/971#issuecomment-413678360)
if (!ref_stack.back())
{
return {false, nullptr};
}
// we now only expect arrays and objects
JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object());
// array
if (ref_stack.back()->is_array())
{
ref_stack.back()->m_data.m_value.array->emplace_back(std::move(value));
return {true, & (ref_stack.back()->m_data.m_value.array->back())};
}
// object
JSON_ASSERT(ref_stack.back()->is_object());
// check if we should store an element for the current key
JSON_ASSERT(!key_keep_stack.empty());
const bool store_element = key_keep_stack.back();
key_keep_stack.pop_back();
if (!store_element)
{
return {false, nullptr};
}
JSON_ASSERT(object_element);
*object_element = std::move(value);
return {true, object_element};
} | O2 | cpp | std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<std::nullptr_t>(std::nullptr_t&&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
addq $0x20, %rdi
callq 0x15486
testq %rdx, (%rax)
je 0x166b3
movq %rsp, %rdi
movq %r14, %rsi
callq 0x16786
testb %bpl, %bpl
jne 0x16672
leaq 0x80(%rbx), %rdi
movq 0x10(%rbx), %rsi
subq 0x8(%rbx), %rsi
shrq $0x3, %rsi
pushq $0x5
popq %rdx
movq %rsp, %rcx
callq 0x154b4
testb %al, %al
je 0x16754
movq 0x10(%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x166bd
movq -0x8(%rax), %rax
testq %rax, %rax
je 0x16754
cmpb $0x2, (%rax)
jne 0x166f8
movq 0x8(%rax), %rdi
movq %rsp, %rsi
callq 0x6da8
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %r14
addq $-0x10, %r14
jmp 0x16750
xorl %ebx, %ebx
xorl %r14d, %r14d
jmp 0x16761
movups (%rsp), %xmm0
leaq 0x20(%rsp), %rdi
movaps %xmm0, (%rdi)
movb $0x0, (%rsp)
andq $0x0, 0x8(%rsp)
movq (%rbx), %rax
movb (%rax), %cl
movb (%rdi), %dl
movb %dl, (%rax)
movb %cl, (%rdi)
movq 0x8(%rax), %rcx
movq 0x8(%rdi), %rdx
movq %rdx, 0x8(%rax)
movq %rcx, 0x8(%rdi)
callq 0x69d6
movq (%rbx), %r14
jmp 0x16750
leaq 0x48(%rbx), %rdi
callq 0x15486
movq %rdx, %r14
movq (%rax), %r15
leaq 0x58(%rbx), %rdi
callq 0x14b42
testq %r14, %r15
je 0x16754
movups (%rsp), %xmm0
leaq 0x10(%rsp), %rdi
movaps %xmm0, (%rdi)
movb $0x0, (%rsp)
andq $0x0, 0x8(%rsp)
movq 0x70(%rbx), %rax
movb (%rax), %cl
movb (%rdi), %dl
movb %dl, (%rax)
movb %cl, (%rdi)
movq 0x8(%rax), %rcx
movq 0x8(%rdi), %rdx
movq %rdx, 0x8(%rax)
movq %rcx, 0x8(%rdi)
callq 0x69d6
movq 0x70(%rbx), %r14
movb $0x1, %bl
jmp 0x16759
xorl %ebx, %ebx
xorl %r14d, %r14d
movq %rsp, %rdi
callq 0x69d6
movl %ebx, %eax
movq %r14, %rdx
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x16773
movq %rax, %rbx
movq %rsp, %rdi
callq 0x69d6
movq %rbx, %rdi
callq 0x5750
| _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueIRlEESt4pairIbPSF_EOT_b:
push rbp
push r15
push r14
push rbx
sub rsp, 38h
mov ebp, edx
mov r14, rsi
mov rbx, rdi
add rdi, 20h ; ' '
call _ZNSt6vectorIbSaIbEE4backEv; std::vector<bool>::back(void)
test [rax], rdx
jz short loc_166B3
mov rdi, rsp
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRllTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_
test bpl, bpl
jnz short loc_16672
lea rdi, [rbx+80h]
mov rsi, [rbx+10h]
sub rsi, [rbx+8]
shr rsi, 3
push 5
pop rdx
mov rcx, rsp
call _ZNKSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEclEiS3_SH_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::operator()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)
test al, al
jz loc_16754
loc_16672:
mov rax, [rbx+10h]
cmp [rbx+8], rax
jz short loc_166BD
mov rax, [rax-8]
test rax, rax
jz loc_16754
cmp byte ptr [rax], 2
jnz short loc_166F8
mov rdi, [rax+8]
mov rsi, rsp
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&)
mov rax, [rbx+10h]
mov rax, [rax-8]
mov rax, [rax+8]
mov r14, [rax+8]
add r14, 0FFFFFFFFFFFFFFF0h
jmp loc_16750
loc_166B3:
xor ebx, ebx
xor r14d, r14d
jmp loc_16761
loc_166BD:
movups xmm0, [rsp+58h+var_58]
lea rdi, [rsp+58h+var_38]
movaps xmmword ptr [rdi], xmm0
mov byte ptr [rsp+58h+var_58], 0
and qword ptr [rsp+58h+var_58+8], 0
mov rax, [rbx]
mov cl, [rax]
mov dl, [rdi]
mov [rax], dl
mov [rdi], cl
mov rcx, [rax+8]
mov rdx, [rdi+8]
mov [rax+8], rdx
mov [rdi+8], rcx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov r14, [rbx]
jmp short loc_16750
loc_166F8:
lea rdi, [rbx+48h]
call _ZNSt6vectorIbSaIbEE4backEv; std::vector<bool>::back(void)
mov r14, rdx
mov r15, [rax]
lea rdi, [rbx+58h]; this
call _ZNSt18_Bit_iterator_base12_M_bump_downEv; std::_Bit_iterator_base::_M_bump_down(void)
test r15, r14
jz short loc_16754
movups xmm0, [rsp+58h+var_58]
lea rdi, [rsp+58h+var_48]
movaps xmmword ptr [rdi], xmm0
mov byte ptr [rsp+58h+var_58], 0
and qword ptr [rsp+58h+var_58+8], 0
mov rax, [rbx+70h]
mov cl, [rax]
mov dl, [rdi]
mov [rax], dl
mov [rdi], cl
mov rcx, [rax+8]
mov rdx, [rdi+8]
mov [rax+8], rdx
mov [rdi+8], rcx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov r14, [rbx+70h]
loc_16750:
mov bl, 1
jmp short loc_16759
loc_16754:
xor ebx, ebx
xor r14d, r14d
loc_16759:
mov rdi, rsp
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_16761:
mov eax, ebx
mov rdx, r14
add rsp, 38h
pop rbx
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_16773:
mov rbx, rax
mov rdi, rsp
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, rbx
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::handle_value<long &>(
char **a1,
long long a2,
char a3)
{
unsigned int v4; // ebx
_QWORD *v5; // rax
long long v6; // rdx
char *v7; // rax
long long v8; // rax
char *v9; // rax
char v10; // cl
long long v11; // rcx
long long *v12; // rax
long long v13; // rdx
long long v14; // r14
long long v15; // r15
char *v16; // rax
char v17; // cl
long long v18; // rcx
__int128 v20; // [rsp+0h] [rbp-58h] BYREF
__int128 v21; // [rsp+10h] [rbp-48h] BYREF
__int128 v22; // [rsp+20h] [rbp-38h] BYREF
v4 = (unsigned int)a1;
v5 = (_QWORD *)std::vector<bool>::back((long long)(a1 + 4));
if ( (v6 & *v5) != 0 )
{
ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRllTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_(
&v20,
a2);
if ( a3
|| (unsigned __int8)std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::operator()(
(long long)(a1 + 16),
(unsigned long long)(a1[2] - a1[1]) >> 3,
5) )
{
v7 = a1[2];
if ( a1[1] == v7 )
{
v22 = v20;
LOBYTE(v20) = 0;
*((_QWORD *)&v20 + 1) = 0LL;
v9 = *a1;
v10 = **a1;
*v9 = v22;
LOBYTE(v22) = v10;
v11 = *((_QWORD *)v9 + 1);
*((_QWORD *)v9 + 1) = *((_QWORD *)&v22 + 1);
*((_QWORD *)&v22 + 1) = v11;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v22);
goto LABEL_12;
}
v8 = *((_QWORD *)v7 - 1);
if ( v8 )
{
if ( *(_BYTE *)v8 == 2 )
{
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
*(_QWORD *)(v8 + 8),
(long long)&v20);
LABEL_12:
LOBYTE(v4) = 1;
LABEL_14:
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(&v20);
return v4;
}
v12 = (long long *)std::vector<bool>::back((long long)(a1 + 9));
v14 = v13;
v15 = *v12;
std::_Bit_iterator_base::_M_bump_down((std::_Bit_iterator_base *)(a1 + 11));
if ( (v14 & v15) != 0 )
{
v21 = v20;
LOBYTE(v20) = 0;
*((_QWORD *)&v20 + 1) = 0LL;
v16 = a1[14];
v17 = *v16;
*v16 = v21;
LOBYTE(v21) = v17;
v18 = *((_QWORD *)v16 + 1);
*((_QWORD *)v16 + 1) = *((_QWORD *)&v21 + 1);
*((_QWORD *)&v21 + 1) = v18;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v21);
goto LABEL_12;
}
}
}
v4 = 0;
goto LABEL_14;
}
return 0;
}
| handle_value<long&>:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV EBP,EDX
MOV R14,RSI
MOV RBX,RDI
ADD RDI,0x20
CALL 0x00115486
TEST qword ptr [RAX],RDX
JZ 0x001166b3
MOV RDI,RSP
MOV RSI,R14
CALL 0x00116786
TEST BPL,BPL
JNZ 0x00116672
LEA RDI,[RBX + 0x80]
MOV RSI,qword ptr [RBX + 0x10]
SUB RSI,qword ptr [RBX + 0x8]
SHR RSI,0x3
LAB_0011665f:
PUSH 0x5
POP RDX
MOV RCX,RSP
CALL 0x001154b4
TEST AL,AL
JZ 0x00116754
LAB_00116672:
MOV RAX,qword ptr [RBX + 0x10]
CMP qword ptr [RBX + 0x8],RAX
JZ 0x001166bd
MOV RAX,qword ptr [RAX + -0x8]
TEST RAX,RAX
JZ 0x00116754
CMP byte ptr [RAX],0x2
JNZ 0x001166f8
MOV RDI,qword ptr [RAX + 0x8]
MOV RSI,RSP
CALL 0x00106da8
MOV RAX,qword ptr [RBX + 0x10]
MOV RAX,qword ptr [RAX + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV R14,qword ptr [RAX + 0x8]
ADD R14,-0x10
JMP 0x00116750
LAB_001166b3:
XOR EBX,EBX
XOR R14D,R14D
JMP 0x00116761
LAB_001166bd:
MOVUPS XMM0,xmmword ptr [RSP]
LEA RDI,[RSP + 0x20]
MOVAPS xmmword ptr [RDI],XMM0
MOV byte ptr [RSP],0x0
AND qword ptr [RSP + 0x8],0x0
MOV RAX,qword ptr [RBX]
MOV CL,byte ptr [RAX]
MOV DL,byte ptr [RDI]
MOV byte ptr [RAX],DL
MOV byte ptr [RDI],CL
MOV RCX,qword ptr [RAX + 0x8]
MOV RDX,qword ptr [RDI + 0x8]
MOV qword ptr [RAX + 0x8],RDX
MOV qword ptr [RDI + 0x8],RCX
CALL 0x001069d6
MOV R14,qword ptr [RBX]
JMP 0x00116750
LAB_001166f8:
LEA RDI,[RBX + 0x48]
LAB_001166fc:
CALL 0x00115486
LAB_00116701:
MOV R14,RDX
MOV R15,qword ptr [RAX]
LEA RDI,[RBX + 0x58]
CALL 0x00114b42
TEST R15,R14
JZ 0x00116754
MOVUPS XMM0,xmmword ptr [RSP]
LEA RDI,[RSP + 0x10]
MOVAPS xmmword ptr [RDI],XMM0
MOV byte ptr [RSP],0x0
AND qword ptr [RSP + 0x8],0x0
MOV RAX,qword ptr [RBX + 0x70]
MOV CL,byte ptr [RAX]
MOV DL,byte ptr [RDI]
MOV byte ptr [RAX],DL
MOV byte ptr [RDI],CL
MOV RCX,qword ptr [RAX + 0x8]
MOV RDX,qword ptr [RDI + 0x8]
MOV qword ptr [RAX + 0x8],RDX
MOV qword ptr [RDI + 0x8],RCX
CALL 0x001069d6
MOV R14,qword ptr [RBX + 0x70]
LAB_00116750:
MOV BL,0x1
JMP 0x00116759
LAB_00116754:
XOR EBX,EBX
XOR R14D,R14D
LAB_00116759:
MOV RDI,RSP
CALL 0x001069d6
LAB_00116761:
MOV EAX,EBX
MOV RDX,R14
ADD RSP,0x38
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>*>
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::handle_value<long&>(long&, bool) */
int1 [16] __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::handle_value<long&>
(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this,long *param_1,bool param_2)
{
basic_json bVar1;
char *pcVar2;
basic_json *pbVar3;
basic_json bVar4;
int8 uVar5;
char cVar6;
ulong uVar7;
long lVar8;
int1 auVar9 [16];
basic_json local_58;
int7 uStack_57;
int8 uStack_50;
basic_json local_48;
int7 uStack_47;
int8 uStack_40;
basic_json local_38;
int7 uStack_37;
int8 uStack_30;
auVar9 = std::vector<bool,std::allocator<bool>>::back
((vector<bool,std::allocator<bool>> *)(this + 0x20));
if ((*auVar9._0_8_ & auVar9._8_8_) == 0) {
uVar7 = 0;
lVar8 = 0;
goto LAB_00116761;
}
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRllTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SH_EE5valueEiE4typeELi0EEEOT_
(&local_58,param_1);
if (param_2) {
LAB_00116672:
uVar5 = uStack_50;
bVar4 = local_58;
if (*(long *)(this + 8) == *(long *)(this + 0x10)) {
local_58 = (basic_json)0x0;
uStack_50 = 0;
pbVar3 = *(basic_json **)this;
bVar1 = *pbVar3;
*pbVar3 = bVar4;
_local_38 = CONCAT71(uStack_57,bVar1);
uStack_30 = *(int8 *)(pbVar3 + 8);
*(int8 *)(pbVar3 + 8) = uVar5;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_38);
lVar8 = *(long *)this;
}
else {
pcVar2 = *(char **)(*(long *)(this + 0x10) + -8);
if (pcVar2 == (char *)0x0) goto LAB_00116754;
if (*pcVar2 == '\x02') {
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(pcVar2 + 8),&local_58);
lVar8 = *(long *)(*(long *)(*(long *)(*(long *)(this + 0x10) + -8) + 8) + 8) + -0x10;
}
else {
/* try { // try from 001166fc to 00116700 has its CatchHandler @ 00116771 */
auVar9 = std::vector<bool,std::allocator<bool>>::back
((vector<bool,std::allocator<bool>> *)(this + 0x48));
uVar7 = *auVar9._0_8_;
std::_Bit_iterator_base::_M_bump_down((_Bit_iterator_base *)(this + 0x58));
uVar5 = uStack_50;
bVar4 = local_58;
if ((uVar7 & auVar9._8_8_) == 0) goto LAB_00116754;
local_58 = (basic_json)0x0;
uStack_50 = 0;
pbVar3 = *(basic_json **)(this + 0x70);
bVar1 = *pbVar3;
*pbVar3 = bVar4;
_local_48 = CONCAT71(uStack_57,bVar1);
uStack_40 = *(int8 *)(pbVar3 + 8);
*(int8 *)(pbVar3 + 8) = uVar5;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_48);
lVar8 = *(long *)(this + 0x70);
}
}
uVar7 = CONCAT71((int7)((ulong)this >> 8),1);
}
else {
/* try { // try from 0011665f to 00116699 has its CatchHandler @ 00116773 */
cVar6 = std::
function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
::operator()(this + 0x80,(ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3,5,
&local_58);
if (cVar6 != '\0') goto LAB_00116672;
LAB_00116754:
uVar7 = 0;
lVar8 = 0;
}
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_58);
LAB_00116761:
auVar9._0_8_ = uVar7 & 0xffffffff;
auVar9._8_8_ = lVar8;
return auVar9;
}
|
|
6,150 | nglog::ErrnoLogMessage::~ErrnoLogMessage() | ng-log[P]ng-log/src/logging.cc | ErrnoLogMessage::~ErrnoLogMessage() {
// Don't access errno directly because it may have been altered
// while streaming the message.
stream() << ": " << StrError(preserved_errno()) << " [" << preserved_errno()
<< "]";
} | O0 | cpp | nglog::ErrnoLogMessage::~ErrnoLogMessage():
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x48(%rbp)
callq 0x10b40
movq %rax, %rdi
leaq 0x3cba1(%rip), %rsi # 0x4eb44
callq 0x96e0
movq %rax, -0x40(%rbp)
jmp 0x11fae
movq -0x48(%rbp), %rdi
callq 0x11620
movl %eax, %esi
leaq -0x38(%rbp), %rdi
callq 0x12080
jmp 0x11fc4
movq -0x40(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x9600
movq %rax, -0x50(%rbp)
jmp 0x11fd7
movq -0x50(%rbp), %rdi
leaq 0x3c85b(%rip), %rsi # 0x4e83d
callq 0x96e0
movq %rax, -0x58(%rbp)
jmp 0x11fed
movq -0x48(%rbp), %rdi
callq 0x11620
movq -0x58(%rbp), %rdi
movl %eax, %esi
callq 0x9c90
movq %rax, -0x60(%rbp)
jmp 0x12007
movq -0x60(%rbp), %rdi
leaq 0x3cb4b(%rip), %rsi # 0x4eb5d
callq 0x96e0
jmp 0x12019
leaq -0x38(%rbp), %rdi
callq 0x9e68
movq -0x48(%rbp), %rdi
callq 0x112f0
addq $0x60, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0x12054
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x9e68
movq -0x48(%rbp), %rdi
callq 0x112f0
jmp 0x1205f
jmp 0x12061
movq -0x10(%rbp), %rdi
callq 0x9cc0
movq %rax, %rdi
callq 0xc110
nopw %cs:(%rax,%rax)
| _ZN5nglog15ErrnoLogMessageD2Ev:
push rbp; Alternative name is 'nglog::ErrnoLogMessage::~ErrnoLogMessage()'
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]; this
mov [rbp+var_48], rdi
call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void)
mov rdi, rax
lea rsi, aRunningDuratio+1Ah; ": "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_40], rax
jmp short $+2
loc_11FAE:
mov rdi, [rbp+var_48]; this
call _ZNK5nglog10LogMessage15preserved_errnoEv; nglog::LogMessage::preserved_errno(void)
mov esi, eax
lea rdi, [rbp+var_38]
call _ZN5nglog8StrErrorB5cxx11Ei; nglog::StrError(int)
jmp short $+2
loc_11FC4:
mov rdi, [rbp+var_40]
lea rsi, [rbp+var_38]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rbp+var_50], rax
jmp short $+2
loc_11FD7:
mov rdi, [rbp+var_50]
lea rsi, asc_4E83D; " ["
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rbp+var_58], rax
jmp short $+2
loc_11FED:
mov rdi, [rbp+var_48]; this
call _ZNK5nglog10LogMessage15preserved_errnoEv; nglog::LogMessage::preserved_errno(void)
mov rdi, [rbp+var_58]
mov esi, eax
call __ZNSolsEi; std::ostream::operator<<(int)
mov [rbp+var_60], rax
jmp short $+2
loc_12007:
mov rdi, [rbp+var_60]
lea rsi, aLogLineFormatI+16h; "]"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_12019:
lea rdi, [rbp+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rbp+var_48]; this
call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage()
add rsp, 60h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_10], rcx
mov [rbp+var_14], eax
jmp short loc_12054
mov rcx, rax
mov eax, edx
mov [rbp+var_10], rcx
mov [rbp+var_14], eax
lea rdi, [rbp+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_12054:
mov rdi, [rbp+var_48]; this
call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage()
jmp short $+2
loc_1205F:
jmp short $+2
loc_12061:
mov rdi, [rbp+var_10]
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
| void nglog::ErrnoLogMessage::~ErrnoLogMessage(nglog::ErrnoLogMessage *this)
{
long long v1; // rax
unsigned int v2; // eax
unsigned int v3; // eax
long long v4; // [rsp+0h] [rbp-60h]
long long v5; // [rsp+8h] [rbp-58h]
long long v6; // [rsp+10h] [rbp-50h]
long long v7; // [rsp+20h] [rbp-40h]
_BYTE v8[36]; // [rsp+28h] [rbp-38h] BYREF
nglog::LogMessage *v9; // [rsp+58h] [rbp-8h]
v9 = this;
v1 = nglog::LogMessage::stream(this);
v7 = std::operator<<<std::char_traits<char>>(v1, ": ");
v2 = nglog::LogMessage::preserved_errno(this);
nglog::StrError[abi:cxx11](v8, v2);
v6 = std::operator<<<char>(v7, v8);
v5 = std::operator<<<std::char_traits<char>>(v6, " [");
v3 = nglog::LogMessage::preserved_errno(this);
v4 = std::ostream::operator<<(v5, v3);
std::operator<<<std::char_traits<char>>(v4, "]");
std::string::~string(v8);
nglog::LogMessage::~LogMessage(this);
}
| ~ErrnoLogMessage:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x48],RDI
CALL 0x00110b40
MOV RDI,RAX
LAB_00111f9c:
LEA RSI,[0x14eb44]
CALL 0x001096e0
MOV qword ptr [RBP + -0x40],RAX
JMP 0x00111fae
LAB_00111fae:
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x00111620
MOV ESI,EAX
LEA RDI,[RBP + -0x38]
CALL 0x00112080
JMP 0x00111fc4
LAB_00111fc4:
MOV RDI,qword ptr [RBP + -0x40]
LEA RSI,[RBP + -0x38]
CALL 0x00109600
MOV qword ptr [RBP + -0x50],RAX
JMP 0x00111fd7
LAB_00111fd7:
MOV RDI,qword ptr [RBP + -0x50]
LEA RSI,[0x14e83d]
CALL 0x001096e0
MOV qword ptr [RBP + -0x58],RAX
JMP 0x00111fed
LAB_00111fed:
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x00111620
MOV RDI,qword ptr [RBP + -0x58]
MOV ESI,EAX
CALL 0x00109c90
MOV qword ptr [RBP + -0x60],RAX
JMP 0x00112007
LAB_00112007:
MOV RDI,qword ptr [RBP + -0x60]
LEA RSI,[0x14eb5d]
CALL 0x001096e0
LAB_00112017:
JMP 0x00112019
LAB_00112019:
LEA RDI,[RBP + -0x38]
CALL 0x00109e68
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x001112f0
ADD RSP,0x60
POP RBP
RET
|
/* nglog::ErrnoLogMessage::~ErrnoLogMessage() */
void __thiscall nglog::ErrnoLogMessage::~ErrnoLogMessage(ErrnoLogMessage *this)
{
int iVar1;
ostream *poVar2;
nglog local_40 [48];
ErrnoLogMessage *local_10;
local_10 = this;
poVar2 = (ostream *)LogMessage::stream((LogMessage *)this);
/* try { // try from 00111f9c to 00111fc1 has its CatchHandler @ 00112031 */
poVar2 = std::operator<<(poVar2,": ");
iVar1 = LogMessage::preserved_errno((LogMessage *)this);
StrError_abi_cxx11_(local_40,iVar1);
/* try { // try from 00111fc4 to 00112016 has its CatchHandler @ 0011203f */
poVar2 = std::operator<<(poVar2,(string *)local_40);
poVar2 = std::operator<<(poVar2," [");
iVar1 = LogMessage::preserved_errno((LogMessage *)this);
poVar2 = (ostream *)std::ostream::operator<<(poVar2,iVar1);
std::operator<<(poVar2,"]");
std::__cxx11::string::~string((string *)local_40);
LogMessage::~LogMessage((LogMessage *)this);
return;
}
|
|
6,151 | nglog::ErrnoLogMessage::~ErrnoLogMessage() | ng-log[P]ng-log/src/logging.cc | ErrnoLogMessage::~ErrnoLogMessage() {
// Don't access errno directly because it may have been altered
// while streaming the message.
stream() << ": " << StrError(preserved_errno()) << " [" << preserved_errno()
<< "]";
} | O1 | cpp | nglog::ErrnoLogMessage::~ErrnoLogMessage():
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movl $0x7538, %r14d # imm = 0x7538
addq 0x8(%rdi), %r14
leaq 0x17455(%rip), %rsi # 0x22a2c
movl $0x2, %edx
movq %r14, %rdi
callq 0x75d0
movq 0x8(%rbx), %rax
movl (%rax), %esi
leaq 0x8(%rsp), %rdi
callq 0xb6a7
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r14, %rdi
callq 0x75d0
movq %rax, %r14
leaq 0x17115(%rip), %rsi # 0x22725
movl $0x2, %edx
movq %rax, %rdi
callq 0x75d0
movq 0x8(%rbx), %rax
movl (%rax), %esi
movq %r14, %rdi
callq 0x7910
leaq 0x17413(%rip), %rsi # 0x22a45
movl $0x1, %edx
movq %rax, %rdi
callq 0x75d0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb65a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8fcc
movq %rbx, %rdi
callq 0xad98
addq $0x28, %rsp
popq %rbx
popq %r14
retq
jmp 0xb66c
movq %rax, %r14
jmp 0xb68f
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb68f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x8fcc
movq %rbx, %rdi
callq 0xad98
movq %r14, %rdi
callq 0x7930
movq %rax, %rdi
callq 0x9275
| _ZN5nglog15ErrnoLogMessageD2Ev:
push r14; Alternative name is 'nglog::ErrnoLogMessage::~ErrnoLogMessage()'
push rbx
sub rsp, 28h
mov rbx, rdi
mov r14d, 7538h
add r14, [rdi+8]
lea rsi, aRunningDuratio+1Ah; ": "
mov edx, 2
mov rdi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [rbx+8]
mov esi, [rax]
lea rdi, [rsp+38h+var_30]
call _ZN5nglog8StrErrorB5cxx11Ei; nglog::StrError(int)
mov rsi, [rsp+38h+var_30]
mov rdx, [rsp+38h+var_28]
mov rdi, r14
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r14, rax
lea rsi, asc_22725; " ["
mov edx, 2
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [rbx+8]
mov esi, [rax]
mov rdi, r14
call __ZNSolsEi; std::ostream::operator<<(int)
lea rsi, aLogLineFormatI+16h; "]"
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rax, [rsp+38h+var_20]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_B65A
mov rsi, [rsp+38h+var_20]
inc rsi; unsigned __int64
call _ZdlPvm; operator delete(void *,ulong)
loc_B65A:
mov rdi, rbx; this
call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage()
add rsp, 28h
pop rbx
pop r14
retn
jmp short $+2
loc_B66C:
mov r14, rax
jmp short loc_B68F
mov r14, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_B68F
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call _ZdlPvm; operator delete(void *,ulong)
loc_B68F:
mov rdi, rbx; this
call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage()
mov rdi, r14
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
| void nglog::ErrnoLogMessage::~ErrnoLogMessage(nglog::ErrnoLogMessage *this)
{
long long v1; // r14
long long v2; // r14
long long v3; // rax
void *v4[2]; // [rsp+8h] [rbp-30h] BYREF
long long v5; // [rsp+18h] [rbp-20h] BYREF
v1 = *((_QWORD *)this + 1) + 30008LL;
std::__ostream_insert<char,std::char_traits<char>>(v1, ": ", 2LL);
nglog::StrError[abi:cxx11](v4, **((unsigned int **)this + 1));
v2 = std::__ostream_insert<char,std::char_traits<char>>(v1, v4[0], v4[1]);
std::__ostream_insert<char,std::char_traits<char>>(v2, " [", 2LL);
v3 = std::ostream::operator<<(v2, **((unsigned int **)this + 1));
std::__ostream_insert<char,std::char_traits<char>>(v3, "]", 1LL);
if ( v4[0] != &v5 )
operator delete(v4[0]);
nglog::LogMessage::~LogMessage(this);
}
| ~ErrnoLogMessage:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
MOV R14D,0x7538
ADD R14,qword ptr [RDI + 0x8]
LAB_0010b5d0:
LEA RSI,[0x122a2c]
MOV EDX,0x2
MOV RDI,R14
CALL 0x001075d0
MOV RAX,qword ptr [RBX + 0x8]
MOV ESI,dword ptr [RAX]
LAB_0010b5ea:
LEA RDI,[RSP + 0x8]
CALL 0x0010b6a7
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_0010b5fe:
MOV RDI,R14
CALL 0x001075d0
MOV R14,RAX
LEA RSI,[0x122725]
MOV EDX,0x2
MOV RDI,RAX
CALL 0x001075d0
MOV RAX,qword ptr [RBX + 0x8]
MOV ESI,dword ptr [RAX]
MOV RDI,R14
CALL 0x00107910
LEA RSI,[0x122a45]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x001075d0
LAB_0010b63f:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0010b65a
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00108fcc
LAB_0010b65a:
MOV RDI,RBX
CALL 0x0010ad98
ADD RSP,0x28
POP RBX
POP R14
RET
|
/* nglog::ErrnoLogMessage::~ErrnoLogMessage() */
void __thiscall nglog::ErrnoLogMessage::~ErrnoLogMessage(ErrnoLogMessage *this)
{
long lVar1;
ostream *poVar2;
long *local_30;
long local_28;
long local_20 [2];
lVar1 = *(long *)(this + 8);
/* try { // try from 0010b5d0 to 0010b5e3 has its CatchHandler @ 0010b66c */
std::__ostream_insert<char,std::char_traits<char>>((ostream *)(lVar1 + 0x7538),": ",2);
/* try { // try from 0010b5ea to 0010b5f3 has its CatchHandler @ 0010b66a */
StrError_abi_cxx11_((nglog *)&local_30,**(int **)(this + 8));
/* try { // try from 0010b5fe to 0010b63e has its CatchHandler @ 0010b671 */
poVar2 = std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(lVar1 + 0x7538),(char *)local_30,local_28);
std::__ostream_insert<char,std::char_traits<char>>(poVar2," [",2);
poVar2 = (ostream *)std::ostream::operator<<(poVar2,**(int **)(this + 8));
std::__ostream_insert<char,std::char_traits<char>>(poVar2,"]",1);
if (local_30 != local_20) {
operator_delete(local_30,local_20[0] + 1);
}
LogMessage::~LogMessage((LogMessage *)this);
return;
}
|
|
6,152 | nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::insert(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&) | monkey531[P]llama/common/./json.hpp | std::pair<iterator, bool> insert( const value_type& value )
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, value.first))
{
return {it, false};
}
}
Container::push_back(value);
return {--this->end(), true};
} | O2 | cpp | nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::insert(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&):
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %rbx
cmpq 0x8(%r14), %rbx
je 0x54b23
movq %rbx, %rdi
movq %r15, %rsi
callq 0x41a74
testb %al, %al
jne 0x54b3a
addq $0x30, %rbx
jmp 0x54b08
movq %r14, %rdi
movq %r15, %rsi
callq 0x54b66
movq 0x8(%r14), %rbx
addq $-0x30, %rbx
movb $0x1, %dl
jmp 0x54b3c
xorl %edx, %edx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE6insertERKSI_:
push r15
push r14
push rbx
mov r15, rsi
mov r14, rdi
mov rbx, [rdi]
loc_54B08:
cmp rbx, [r14+8]
jz short loc_54B23
mov rdi, rbx
mov rsi, r15
call _ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_
test al, al
jnz short loc_54B3A
add rbx, 30h ; '0'
jmp short loc_54B08
loc_54B23:
mov rdi, r14
mov rsi, r15
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE9push_backERKSG_; 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>>>::push_back(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>> const&)
mov rbx, [r14+8]
add rbx, 0FFFFFFFFFFFFFFD0h
mov dl, 1
jmp short loc_54B3C
loc_54B3A:
xor edx, edx
loc_54B3C:
mov rax, rbx
pop rbx
pop r14
pop r15
retn
| long long nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::insert(
_QWORD **a1,
_QWORD *a2)
{
_QWORD *i; // rbx
for ( i = *a1; i != a1[1]; i += 6 )
{
if ( std::operator==<char>(i, a2) )
return (long long)i;
}
std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::push_back(
a1,
a2);
return (long long)(a1[1] - 6);
}
| insert:
PUSH R15
PUSH R14
PUSH RBX
MOV R15,RSI
MOV R14,RDI
MOV RBX,qword ptr [RDI]
LAB_00154b08:
CMP RBX,qword ptr [R14 + 0x8]
JZ 0x00154b23
MOV RDI,RBX
MOV RSI,R15
CALL 0x00141a74
TEST AL,AL
JNZ 0x00154b3a
ADD RBX,0x30
JMP 0x00154b08
LAB_00154b23:
MOV RDI,R14
MOV RSI,R15
CALL 0x00154b66
MOV RBX,qword ptr [R14 + 0x8]
ADD RBX,-0x30
MOV DL,0x1
JMP 0x00154b3c
LAB_00154b3a:
XOR EDX,EDX
LAB_00154b3c:
MOV RAX,RBX
POP RBX
POP R14
POP R15
RET
|
/* nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::string const,
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > > >::insert(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> > const&) */
int1 [16] __thiscall
nlohmann::json_abi_v3_11_3::
ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::insert(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*this,pair *param_1)
{
char cVar1;
int8 extraout_RDX;
int8 uVar2;
string *psVar3;
int1 auVar4 [16];
psVar3 = *(string **)this;
do {
if (psVar3 == *(string **)(this + 8)) {
std::
vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::push_back((vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*)this,param_1);
psVar3 = (string *)(*(long *)(this + 8) + -0x30);
uVar2 = CONCAT71((int7)((ulong)extraout_RDX >> 8),1);
LAB_00154b3c:
auVar4._8_8_ = uVar2;
auVar4._0_8_ = psVar3;
return auVar4;
}
cVar1 = std::operator==(psVar3,(string *)param_1);
if (cVar1 != '\0') {
uVar2 = 0;
goto LAB_00154b3c;
}
psVar3 = psVar3 + 0x30;
} while( true );
}
|
|
6,153 | nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::insert(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&) | monkey531[P]llama/common/./json.hpp | std::pair<iterator, bool> insert( const value_type& value )
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, value.first))
{
return {it, false};
}
}
Container::push_back(value);
return {--this->end(), true};
} | O3 | cpp | nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::insert(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %rbx
movq 0x8(%rdi), %rbp
cmpq %rbp, %rbx
je 0x5db56
movq (%r15), %r12
movq 0x8(%r15), %r13
cmpq %r13, 0x8(%rbx)
jne 0x5db4d
testq %r13, %r13
je 0x5db6d
movq (%rbx), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x1fb40
testl %eax, %eax
je 0x5db6d
addq $0x30, %rbx
cmpq %rbp, %rbx
jne 0x5db30
movq %r14, %rdi
movq %r15, %rsi
callq 0x5db82
movq 0x8(%r14), %rbx
addq $-0x30, %rbx
movb $0x1, %dl
jmp 0x5db6f
xorl %edx, %edx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE6insertERKSI_:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rsi
mov r14, rdi
mov rbx, [rdi]
mov rbp, [rdi+8]
cmp rbx, rbp
jz short loc_5DB56
mov r12, [r15]
mov r13, [r15+8]
loc_5DB30:
cmp [rbx+8], r13
jnz short loc_5DB4D
test r13, r13
jz short loc_5DB6D
mov rdi, [rbx]
mov rsi, r12
mov rdx, r13
call _bcmp
test eax, eax
jz short loc_5DB6D
loc_5DB4D:
add rbx, 30h ; '0'
cmp rbx, rbp
jnz short loc_5DB30
loc_5DB56:
mov rdi, r14
mov rsi, r15
call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE9push_backERKSG_; 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>>>::push_back(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>> const&)
mov rbx, [r14+8]
add rbx, 0FFFFFFFFFFFFFFD0h
mov dl, 1
jmp short loc_5DB6F
loc_5DB6D:
xor edx, edx
loc_5DB6F:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long nlohmann::json_abi_v3_11_3::ordered_map<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>>>>::insert(
_QWORD *a1,
long long *a2)
{
_QWORD *v2; // rbx
_QWORD *v3; // rbp
long long v4; // r12
long long v5; // r13
v2 = (_QWORD *)*a1;
v3 = (_QWORD *)a1[1];
if ( (_QWORD *)*a1 == v3 )
{
LABEL_7:
std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::push_back(
a1,
a2);
return a1[1] - 48LL;
}
else
{
v4 = *a2;
v5 = a2[1];
while ( v2[1] != v5 || v5 && (unsigned int)bcmp(*v2, v4) )
{
v2 += 6;
if ( v2 == v3 )
goto LABEL_7;
}
}
return (long long)v2;
}
| insert:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RSI
MOV R14,RDI
MOV RBX,qword ptr [RDI]
MOV RBP,qword ptr [RDI + 0x8]
CMP RBX,RBP
JZ 0x0015db56
MOV R12,qword ptr [R15]
MOV R13,qword ptr [R15 + 0x8]
LAB_0015db30:
CMP qword ptr [RBX + 0x8],R13
JNZ 0x0015db4d
TEST R13,R13
JZ 0x0015db6d
MOV RDI,qword ptr [RBX]
MOV RSI,R12
MOV RDX,R13
CALL 0x0011fb40
TEST EAX,EAX
JZ 0x0015db6d
LAB_0015db4d:
ADD RBX,0x30
CMP RBX,RBP
JNZ 0x0015db30
LAB_0015db56:
MOV RDI,R14
MOV RSI,R15
CALL 0x0015db82
MOV RBX,qword ptr [R14 + 0x8]
ADD RBX,-0x30
MOV DL,0x1
JMP 0x0015db6f
LAB_0015db6d:
XOR EDX,EDX
LAB_0015db6f:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::ordered_map<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> > > >::insert(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> > const&) */
int1 [16] __thiscall
nlohmann::json_abi_v3_11_3::
ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::insert(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*this,pair *param_1)
{
int8 *puVar1;
void *__s2;
size_t __n;
int iVar2;
int8 extraout_RDX;
int8 uVar3;
int8 *puVar4;
int1 auVar5 [16];
puVar4 = *(int8 **)this;
puVar1 = *(int8 **)(this + 8);
if (puVar4 != puVar1) {
__s2 = *(void **)param_1;
__n = *(size_t *)(param_1 + 8);
do {
if (puVar4[1] == __n) {
if (__n != 0) {
iVar2 = bcmp((void *)*puVar4,__s2,__n);
if (iVar2 != 0) goto LAB_0015db4d;
}
uVar3 = 0;
goto LAB_0015db6f;
}
LAB_0015db4d:
puVar4 = puVar4 + 6;
} while (puVar4 != puVar1);
}
std::
vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::push_back((vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*)this,param_1);
puVar4 = (int8 *)(*(long *)(this + 8) + -0x30);
uVar3 = CONCAT71((int7)((ulong)extraout_RDX >> 8),1);
LAB_0015db6f:
auVar5._8_8_ = uVar3;
auVar5._0_8_ = puVar4;
return auVar5;
}
|
|
6,154 | get_dataview | bluesky950520[P]quickjs/quickjs.c | static JSObject *get_dataview(JSContext *ctx, JSValue this_val)
{
JSObject *p;
if (JS_VALUE_GET_TAG(this_val) != JS_TAG_OBJECT)
goto fail;
p = JS_VALUE_GET_OBJ(this_val);
if (p->class_id != JS_CLASS_DATAVIEW) {
fail:
JS_ThrowTypeError(ctx, "not a DataView");
return NULL;
}
return p;
} | O2 | c | get_dataview:
pushq %rbx
cmpl $-0x1, %edx
jne 0x6ecfa
movq %rsi, %rbx
cmpw $0x21, 0x6(%rsi)
je 0x6ed0a
leaq 0x1a982(%rip), %rsi # 0x89683
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x1c64d
movq %rbx, %rax
popq %rbx
retq
| get_dataview:
push rbx
cmp edx, 0FFFFFFFFh
jnz short loc_6ECFA
mov rbx, rsi
cmp word ptr [rsi+6], 21h ; '!'
jz short loc_6ED0A
loc_6ECFA:
lea rsi, aNotADataview; "not a DataView"
xor ebx, ebx
xor eax, eax
call JS_ThrowTypeError
loc_6ED0A:
mov rax, rbx
pop rbx
retn
| long long get_dataview(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v14; // rbx
char v16; // [rsp+0h] [rbp-8h]
if ( (_DWORD)a3 != -1 || (v14 = a2, *(_WORD *)(a2 + 6) != 33) )
{
v14 = 0LL;
JS_ThrowTypeError(a1, (long long)"not a DataView", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v16);
}
return v14;
}
| get_dataview:
PUSH RBX
CMP EDX,-0x1
JNZ 0x0016ecfa
MOV RBX,RSI
CMP word ptr [RSI + 0x6],0x21
JZ 0x0016ed0a
LAB_0016ecfa:
LEA RSI,[0x189683]
XOR EBX,EBX
XOR EAX,EAX
CALL 0x0011c64d
LAB_0016ed0a:
MOV RAX,RBX
POP RBX
RET
|
long get_dataview(int8 param_1,long param_2,int param_3)
{
if ((param_3 != -1) || (*(short *)(param_2 + 6) != 0x21)) {
param_2 = 0;
JS_ThrowTypeError(param_1,"not a DataView");
}
return param_2;
}
|
|
6,155 | int fmt::v8::detail::get_dynamic_spec<fmt::v8::detail::width_checker, fmt::v8::basic_format_arg<fmt::v8::basic_format_context<fmt::v8::appender, char>>, fmt::v8::detail::error_handler>(fmt::v8::basic_format_arg<fmt::v8::basic_format_context<fmt::v8::appender, char>>, fmt::v8::detail::error_handler) | aimrt_mujoco_sim/_deps/spdlog_lib-src/include/spdlog/fmt/bundled/format.h | FMT_CONSTEXPR auto get_dynamic_spec(FormatArg arg, ErrorHandler eh) -> int {
unsigned long long value = visit_format_arg(Handler<ErrorHandler>(eh), arg);
if (value > to_unsigned(max_value<int>())) eh.on_error("number is too big");
return static_cast<int>(value);
} | O3 | c | int fmt::v8::detail::get_dynamic_spec<fmt::v8::detail::width_checker, fmt::v8::basic_format_arg<fmt::v8::basic_format_context<fmt::v8::appender, char>>, fmt::v8::detail::error_handler>(fmt::v8::basic_format_arg<fmt::v8::basic_format_context<fmt::v8::appender, char>>, fmt::v8::detail::error_handler):
pushq %rax
movl 0x20(%rsp), %ecx
decl %ecx
cmpl $0xe, %ecx
ja 0x30947
leaq 0x10(%rsp), %rax
leaq 0x1b3fa(%rip), %rdx # 0x4bd04
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movslq (%rax), %rax
testq %rax, %rax
jns 0x30945
jmp 0x30931
cmpq $0x0, 0x8(%rax)
js 0x30931
movq (%rax), %rax
jmp 0x3093c
movq (%rax), %rax
testq %rax, %rax
jns 0x3093c
leaq 0x1a568(%rip), %rsi # 0x4aea0
jmp 0x30957
movl (%rax), %eax
movq %rax, %rcx
shrq $0x1f, %rcx
jne 0x30950
popq %rcx
retq
leaq 0x1a561(%rip), %rsi # 0x4aeaf
jmp 0x30957
leaq 0x1a3c6(%rip), %rsi # 0x4ad1d
leaq 0x7(%rsp), %rdi
callq 0x449b6
nop
| _ZN3fmt2v86detail16get_dynamic_specINS1_13width_checkerENS0_16basic_format_argINS0_20basic_format_contextINS0_8appenderEcEEEENS1_13error_handlerEEEiT0_T1_:
push rax
mov ecx, [rsp+8+arg_10]
dec ecx; switch 15 cases
cmp ecx, 0Eh
ja short def_30911; jumptable 0000000000030911 default case, cases 7-15
lea rax, [rsp+8+arg_0]
lea rdx, jpt_30911
movsxd rcx, ds:(jpt_30911 - 4BD04h)[rdx+rcx*4]
add rcx, rdx
jmp rcx; switch jump
loc_30913:
movsxd rax, dword ptr [rax]; jumptable 0000000000030911 case 1
test rax, rax
jns short loc_30945
jmp short loc_30931
loc_3091D:
cmp qword ptr [rax+8], 0; jumptable 0000000000030911 case 5
js short loc_30931
loc_30924:
mov rax, [rax]; jumptable 0000000000030911 cases 4,6
jmp short loc_3093C
loc_30929:
mov rax, [rax]; jumptable 0000000000030911 case 3
test rax, rax
jns short loc_3093C
loc_30931:
lea rsi, aNegativeWidth; "negative width"
jmp short loc_30957
loc_3093A:
mov eax, [rax]; jumptable 0000000000030911 case 2
loc_3093C:
mov rcx, rax
shr rcx, 1Fh
jnz short loc_30950
loc_30945:
pop rcx
retn
def_30911:
lea rsi, aWidthIsNotInte; jumptable 0000000000030911 default case, cases 7-15
jmp short loc_30957
loc_30950:
lea rsi, aNumberIsTooBig; "number is too big"
loc_30957:
lea rdi, [rsp+8+var_1]; this
call _ZN3fmt2v86detail13error_handler8on_errorEPKc; fmt::v8::detail::error_handler::on_error(char const*)
| unsigned long long fmt::v8::detail::get_dynamic_spec<fmt::v8::detail::width_checker,fmt::v8::basic_format_arg<fmt::v8::basic_format_context<fmt::v8::appender,char>>,fmt::v8::detail::error_handler>(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long a7,
long long a8,
int a9)
{
long long v9; // rax
unsigned long long result; // rax
const char *v11; // rsi
char v12; // [rsp+1h] [rbp-1h] BYREF
v12 = HIBYTE(v9);
switch ( a9 )
{
case 1:
result = (int)a7;
if ( (int)a7 < 0LL )
goto LABEL_7;
return result;
case 2:
result = (unsigned int)a7;
goto LABEL_9;
case 3:
result = a7;
if ( a7 < 0 )
goto LABEL_7;
goto LABEL_9;
case 4:
case 6:
goto LABEL_5;
case 5:
if ( a8 < 0 )
{
LABEL_7:
v11 = "negative width";
goto LABEL_13;
}
LABEL_5:
result = a7;
LABEL_9:
if ( result >> 31 )
{
v11 = "number is too big";
LABEL_13:
fmt::v8::detail::error_handler::on_error((fmt::v8::detail::error_handler *)&v12, v11);
}
return result;
default:
v11 = "width is not integer";
goto LABEL_13;
}
}
| get_dynamic_spec<fmt::v8::detail::width_checker,fmt::v8::basic_format_arg<fmt::v8::basic_format_context<fmt::v8::appender,char>>,fmt::v8::detail::error_handler>:
PUSH RAX
MOV ECX,dword ptr [RSP + 0x20]
DEC ECX
CMP ECX,0xe
JA 0x00130947
LEA RAX,[RSP + 0x10]
LEA RDX,[0x14bd04]
MOVSXD RCX,dword ptr [RDX + RCX*0x4]
ADD RCX,RDX
switchD:
JMP RCX
caseD_1:
MOVSXD RAX,dword ptr [RAX]
TEST RAX,RAX
JNS 0x00130945
JMP 0x00130931
caseD_5:
CMP qword ptr [RAX + 0x8],0x0
JS 0x00130931
caseD_4:
MOV RAX,qword ptr [RAX]
JMP 0x0013093c
caseD_3:
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JNS 0x0013093c
LAB_00130931:
LEA RSI,[0x14aea0]
JMP 0x00130957
caseD_2:
MOV EAX,dword ptr [RAX]
LAB_0013093c:
MOV RCX,RAX
SHR RCX,0x1f
JNZ 0x00130950
LAB_00130945:
POP RCX
RET
caseD_7:
LEA RSI,[0x14aeaf]
JMP 0x00130957
LAB_00130950:
LEA RSI,[0x14ad1d]
LAB_00130957:
LEA RDI,[RSP + 0x7]
CALL 0x001449b6
|
/* int fmt::v8::detail::get_dynamic_spec<fmt::v8::detail::width_checker,
fmt::v8::basic_format_arg<fmt::v8::basic_format_context<fmt::v8::appender, char> >,
fmt::v8::detail::error_handler>(fmt::v8::basic_format_arg<fmt::v8::basic_format_context<fmt::v8::appender,
char> >, fmt::v8::detail::error_handler) */
int fmt::v8::detail::
get_dynamic_spec<fmt::v8::detail::width_checker,fmt::v8::basic_format_arg<fmt::v8::basic_format_context<fmt::v8::appender,char>>,fmt::v8::detail::error_handler>
(void)
{
char *pcVar1;
int iStack0000000000000008;
long in_stack_00000010;
int4 in_stack_00000018;
error_handler local_1;
switch(in_stack_00000018) {
case 1:
_iStack0000000000000008 = (ulong)iStack0000000000000008;
if (-1 < (long)_iStack0000000000000008) goto LAB_00130945;
break;
case 2:
_iStack0000000000000008 = _iStack0000000000000008 & 0xffffffff;
goto LAB_0013093c;
case 3:
if (-1 < (long)_iStack0000000000000008) goto LAB_0013093c;
break;
case 4:
case 6:
switchD_00130911_caseD_4:
LAB_0013093c:
if (_iStack0000000000000008 >> 0x1f == 0) {
LAB_00130945:
return (int)_iStack0000000000000008;
}
pcVar1 = "number is too big";
goto LAB_00130957;
case 5:
if (-1 < in_stack_00000010) goto switchD_00130911_caseD_4;
break;
default:
pcVar1 = "width is not integer";
goto LAB_00130957;
}
pcVar1 = "negative width";
LAB_00130957:
/* WARNING: Subroutine does not return */
error_handler::on_error(&local_1,pcVar1);
}
|
|
6,156 | trim(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | mihussein[P]Hlemon/src/functions.cpp | std::string trim(const std::string &str) {
size_t start = str.find_first_not_of(" \t\n\r");
size_t end = str.find_last_not_of(" \t\n\r");
return (start == std::string::npos) ? "" : str.substr(start, end - start + 1);
} | O0 | cpp | trim(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x48(%rbp)
movq %rdi, %rax
movq %rax, -0x40(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x6702(%rip), %rsi # 0x11378
xorl %eax, %eax
movl %eax, %edx
callq 0x52b0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x66ea(%rip), %rsi # 0x11378
movq $-0x1, %rdx
callq 0x5830
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movb $0x0, -0x22(%rbp)
cmpq $-0x1, %rax
jne 0xacd5
leaq -0x21(%rbp), %rdi
movq %rdi, -0x50(%rbp)
callq 0x57f0
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rdx
movb $0x1, -0x22(%rbp)
leaq 0x673e(%rip), %rsi # 0x1140a
callq 0x9c60
jmp 0xacd3
jmp 0xacf4
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
subq %rdx, %rcx
incq %rcx
callq 0x5480
jmp 0xacf2
jmp 0xacf4
testb $0x1, -0x22(%rbp)
jne 0xacfc
jmp 0xad05
leaq -0x21(%rbp), %rdi
callq 0x54c0
movq -0x40(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
testb $0x1, -0x22(%rbp)
jne 0xad23
jmp 0xad2c
leaq -0x21(%rbp), %rdi
callq 0x54c0
jmp 0xad2e
movq -0x30(%rbp), %rdi
callq 0x57e0
nopw (%rax,%rax)
| _Z4trimRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_48], rdi
mov rax, rdi
mov [rbp+var_40], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_10]
lea rsi, asc_11378; " \t\n\r"
xor eax, eax
mov edx, eax
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE17find_first_not_ofEPKcm; std::string::find_first_not_of(char const*,ulong)
mov [rbp+var_18], rax
mov rdi, [rbp+var_10]
lea rsi, asc_11378; " \t\n\r"
mov rdx, 0FFFFFFFFFFFFFFFFh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE16find_last_not_ofEPKcm; std::string::find_last_not_of(char const*,ulong)
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
mov [rbp+var_22], 0
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_ACD5
lea rdi, [rbp+var_21]
mov [rbp+var_50], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdi, [rbp+var_48]
mov rdx, [rbp+var_50]
mov [rbp+var_22], 1
lea rsi, aErrorInitializ+1Ch; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_ACD3:
jmp short loc_ACF4
loc_ACD5:
mov rdi, [rbp+var_48]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
sub rcx, rdx
inc rcx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
jmp short $+2
loc_ACF2:
jmp short $+2
loc_ACF4:
test [rbp+var_22], 1
jnz short loc_ACFC
jmp short loc_AD05
loc_ACFC:
lea rdi, [rbp+var_21]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
loc_AD05:
mov rax, [rbp+var_40]
add rsp, 50h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_30], rcx
mov [rbp+var_34], eax
test [rbp+var_22], 1
jnz short loc_AD23
jmp short loc_AD2C
loc_AD23:
lea rdi, [rbp+var_21]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
loc_AD2C:
jmp short $+2
loc_AD2E:
mov rdi, [rbp+var_30]
call __Unwind_Resume
| long long trim(long long a1, long long a2)
{
char v3; // [rsp+2Eh] [rbp-22h]
char v4; // [rsp+2Fh] [rbp-21h] BYREF
long long last_not_of; // [rsp+30h] [rbp-20h]
long long first_not_of; // [rsp+38h] [rbp-18h]
long long v7; // [rsp+40h] [rbp-10h]
long long v8; // [rsp+48h] [rbp-8h]
v8 = a1;
v7 = a2;
first_not_of = std::string::find_first_not_of(a2, " \t\n\r", 0LL);
last_not_of = std::string::find_last_not_of(a2, " \t\n\r", -1LL);
v3 = 0;
if ( first_not_of == -1 )
{
std::allocator<char>::allocator();
v3 = 1;
std::string::basic_string<std::allocator<char>>(a1, (long long)"", (long long)&v4);
}
else
{
std::string::substr(a1, v7, first_not_of, last_not_of - first_not_of + 1);
}
if ( (v3 & 1) != 0 )
std::allocator<char>::~allocator(&v4);
return a1;
}
| trim:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x48],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x40],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x111378]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x001052b0
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x111378]
MOV RDX,-0x1
CALL 0x00105830
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RBP + -0x22],0x0
CMP RAX,-0x1
JNZ 0x0010acd5
LEA RDI,[RBP + -0x21]
MOV qword ptr [RBP + -0x50],RDI
CALL 0x001057f0
MOV RDI,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x50]
MOV byte ptr [RBP + -0x22],0x1
LAB_0010acc5:
LEA RSI,[0x11140a]
CALL 0x00109c60
JMP 0x0010acd3
LAB_0010acd3:
JMP 0x0010acf4
LAB_0010acd5:
MOV RDI,qword ptr [RBP + -0x48]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
SUB RCX,RDX
INC RCX
CALL 0x00105480
LAB_0010acf0:
JMP 0x0010acf2
LAB_0010acf2:
JMP 0x0010acf4
LAB_0010acf4:
TEST byte ptr [RBP + -0x22],0x1
JNZ 0x0010acfc
JMP 0x0010ad05
LAB_0010acfc:
LEA RDI,[RBP + -0x21]
CALL 0x001054c0
LAB_0010ad05:
MOV RAX,qword ptr [RBP + -0x40]
ADD RSP,0x50
POP RBP
RET
|
/* trim(std::__cxx11::string const&) */
string * trim(string *param_1)
{
char *in_RSI;
allocator local_29;
int8 local_28;
long local_20;
char *local_18;
string *local_10;
local_18 = in_RSI;
local_10 = param_1;
local_20 = std::__cxx11::string::find_first_not_of(in_RSI,0x111378);
local_28 = std::__cxx11::string::find_last_not_of(local_18,0x111378);
if (local_20 == -1) {
std::allocator<char>::allocator();
/* try { // try from 0010acc5 to 0010acef has its CatchHandler @ 0010ad0f */
std::__cxx11::string::string<std::allocator<char>>(param_1,"",&local_29);
std::allocator<char>::~allocator((allocator<char> *)&local_29);
}
else {
std::__cxx11::string::substr((ulong)param_1,(ulong)local_18);
}
return param_1;
}
|
|
6,157 | js_get_fast_array | bluesky950520[P]quickjs/quickjs.c | static BOOL js_get_fast_array(JSContext *ctx, JSValue obj,
JSValue **arrpp, uint32_t *countp)
{
/* Try and handle fast arrays explicitly */
if (JS_VALUE_GET_TAG(obj) == JS_TAG_OBJECT) {
JSObject *p = JS_VALUE_GET_OBJ(obj);
if (p->class_id == JS_CLASS_ARRAY && p->fast_array) {
*countp = p->u.array.count;
*arrpp = p->u.array.u.values;
return TRUE;
}
}
return FALSE;
} | O0 | c | js_get_fast_array:
movq %rsi, -0x18(%rsp)
movq %rdx, -0x10(%rsp)
movq %rdi, -0x20(%rsp)
movq %rcx, -0x28(%rsp)
movq %r8, -0x30(%rsp)
movq -0x10(%rsp), %rax
cmpl $-0x1, %eax
jne 0x76aac
movq -0x18(%rsp), %rax
movq %rax, -0x38(%rsp)
movq -0x38(%rsp), %rax
movzwl 0x6(%rax), %eax
cmpl $0x2, %eax
jne 0x76aaa
movq -0x38(%rsp), %rax
movb 0x5(%rax), %al
shrb $0x3, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x76aaa
movq -0x38(%rsp), %rax
movl 0x40(%rax), %ecx
movq -0x30(%rsp), %rax
movl %ecx, (%rax)
movq -0x38(%rsp), %rax
movq 0x38(%rax), %rcx
movq -0x28(%rsp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rsp)
jmp 0x76ab4
jmp 0x76aac
movl $0x0, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nopl (%rax)
| js_get_fast_array:
mov [rsp+var_18], rsi
mov [rsp+var_10], rdx
mov [rsp+var_20], rdi
mov [rsp+var_28], rcx
mov [rsp+var_30], r8
mov rax, [rsp+var_10]
cmp eax, 0FFFFFFFFh
jnz short loc_76AAC
mov rax, [rsp+var_18]
mov [rsp+var_38], rax
mov rax, [rsp+var_38]
movzx eax, word ptr [rax+6]
cmp eax, 2
jnz short loc_76AAA
mov rax, [rsp+var_38]
mov al, [rax+5]
shr al, 3
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_76AAA
mov rax, [rsp+var_38]
mov ecx, [rax+40h]
mov rax, [rsp+var_30]
mov [rax], ecx
mov rax, [rsp+var_38]
mov rcx, [rax+38h]
mov rax, [rsp+var_28]
mov [rax], rcx
mov [rsp+var_4], 1
jmp short loc_76AB4
loc_76AAA:
jmp short $+2
loc_76AAC:
mov [rsp+var_4], 0
loc_76AB4:
mov eax, [rsp+var_4]
retn
| long long js_get_fast_array(long long a1, long long a2, int a3, _QWORD *a4, _DWORD *a5)
{
if ( a3 == -1 && *(_WORD *)(a2 + 6) == 2 && (*(_BYTE *)(a2 + 5) & 8) != 0 )
{
*a5 = *(_DWORD *)(a2 + 64);
*a4 = *(_QWORD *)(a2 + 56);
return 1;
}
else
{
return 0;
}
}
| js_get_fast_array:
MOV qword ptr [RSP + -0x18],RSI
MOV qword ptr [RSP + -0x10],RDX
MOV qword ptr [RSP + -0x20],RDI
MOV qword ptr [RSP + -0x28],RCX
MOV qword ptr [RSP + -0x30],R8
MOV RAX,qword ptr [RSP + -0x10]
CMP EAX,-0x1
JNZ 0x00176aac
MOV RAX,qword ptr [RSP + -0x18]
MOV qword ptr [RSP + -0x38],RAX
MOV RAX,qword ptr [RSP + -0x38]
MOVZX EAX,word ptr [RAX + 0x6]
CMP EAX,0x2
JNZ 0x00176aaa
MOV RAX,qword ptr [RSP + -0x38]
MOV AL,byte ptr [RAX + 0x5]
SHR AL,0x3
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x00176aaa
MOV RAX,qword ptr [RSP + -0x38]
MOV ECX,dword ptr [RAX + 0x40]
MOV RAX,qword ptr [RSP + -0x30]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RSP + -0x38]
MOV RCX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RSP + -0x28]
MOV qword ptr [RAX],RCX
MOV dword ptr [RSP + -0x4],0x1
JMP 0x00176ab4
LAB_00176aaa:
JMP 0x00176aac
LAB_00176aac:
MOV dword ptr [RSP + -0x4],0x0
LAB_00176ab4:
MOV EAX,dword ptr [RSP + -0x4]
RET
|
int4
js_get_fast_array(int8 param_1,long param_2,int param_3,int8 *param_4,
int4 *param_5)
{
int4 local_4;
if (((param_3 == -1) && (*(short *)(param_2 + 6) == 2)) &&
((*(byte *)(param_2 + 5) >> 3 & 1) != 0)) {
*param_5 = *(int4 *)(param_2 + 0x40);
*param_4 = *(int8 *)(param_2 + 0x38);
local_4 = 1;
}
else {
local_4 = 0;
}
return local_4;
}
|
|
6,158 | js_get_fast_array | bluesky950520[P]quickjs/quickjs.c | static BOOL js_get_fast_array(JSContext *ctx, JSValue obj,
JSValue **arrpp, uint32_t *countp)
{
/* Try and handle fast arrays explicitly */
if (JS_VALUE_GET_TAG(obj) == JS_TAG_OBJECT) {
JSObject *p = JS_VALUE_GET_OBJ(obj);
if (p->class_id == JS_CLASS_ARRAY && p->fast_array) {
*countp = p->u.array.count;
*arrpp = p->u.array.u.values;
return TRUE;
}
}
return FALSE;
} | O2 | c | js_get_fast_array:
xorl %eax, %eax
cmpl $-0x1, %esi
jne 0x3de3f
cmpw $0x2, 0x6(%rdi)
jne 0x3de3f
testb $0x8, 0x5(%rdi)
je 0x3de3f
movl 0x40(%rdi), %eax
movl %eax, (%rcx)
movq 0x38(%rdi), %rax
movq %rax, (%rdx)
pushq $0x1
popq %rax
retq
| js_get_fast_array:
xor eax, eax
cmp esi, 0FFFFFFFFh
jnz short locret_3DE3F
cmp word ptr [rdi+6], 2
jnz short locret_3DE3F
test byte ptr [rdi+5], 8
jz short locret_3DE3F
mov eax, [rdi+40h]
mov [rcx], eax
mov rax, [rdi+38h]
mov [rdx], rax
push 1
pop rax
locret_3DE3F:
retn
| long long js_get_fast_array(long long a1, int a2, _QWORD *a3, _DWORD *a4)
{
long long result; // rax
result = 0LL;
if ( a2 == -1 && *(_WORD *)(a1 + 6) == 2 && (*(_BYTE *)(a1 + 5) & 8) != 0 )
{
*a4 = *(_DWORD *)(a1 + 64);
*a3 = *(_QWORD *)(a1 + 56);
return 1LL;
}
return result;
}
| js_get_fast_array:
XOR EAX,EAX
CMP ESI,-0x1
JNZ 0x0013de3f
CMP word ptr [RDI + 0x6],0x2
JNZ 0x0013de3f
TEST byte ptr [RDI + 0x5],0x8
JZ 0x0013de3f
MOV EAX,dword ptr [RDI + 0x40]
MOV dword ptr [RCX],EAX
MOV RAX,qword ptr [RDI + 0x38]
MOV qword ptr [RDX],RAX
PUSH 0x1
POP RAX
LAB_0013de3f:
RET
|
int8 js_get_fast_array(long param_1,int param_2,int8 *param_3,int4 *param_4)
{
int8 uVar1;
uVar1 = 0;
if (((param_2 == -1) && (*(short *)(param_1 + 6) == 2)) && ((*(byte *)(param_1 + 5) & 8) != 0)) {
*param_4 = *(int4 *)(param_1 + 0x40);
*param_3 = *(int8 *)(param_1 + 0x38);
uVar1 = 1;
}
return uVar1;
}
|
|
6,159 | BYTE_MUL | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-blend.c | static inline uint32_t BYTE_MUL(uint32_t x, uint32_t a)
{
uint32_t t = (x & 0xff00ff) * a;
t = (t + ((t >> 8) & 0xff00ff) + 0x800080) >> 8;
t &= 0xff00ff;
x = ((x >> 8) & 0xff00ff) * a;
x = (x + ((x >> 8) & 0xff00ff) + 0x800080);
x &= 0xff00ff00;
x |= t;
return x;
} | O2 | c | BYTE_MUL:
movl $0xff00ff, %edx # imm = 0xFF00FF
movl %edi, %ecx
andl %edx, %ecx
imull %esi, %ecx
movl %ecx, %r8d
shrl $0x8, %r8d
andl %edx, %r8d
movl $0x800080, %eax # imm = 0x800080
addl %eax, %ecx
addl %r8d, %ecx
shrl $0x8, %ecx
andl %edx, %ecx
shrl $0x8, %edi
andl %edx, %edi
imull %esi, %edi
addl %edi, %eax
shrl $0x8, %edi
andl %edx, %edi
addl %edi, %eax
andl $0xff00ff00, %eax # imm = 0xFF00FF00
orl %ecx, %eax
retq
| BYTE_MUL:
mov edx, 0FF00FFh
mov ecx, edi
and ecx, edx
imul ecx, esi
mov r8d, ecx
shr r8d, 8
and r8d, edx
mov eax, 800080h
add ecx, eax
add ecx, r8d
shr ecx, 8
and ecx, edx
shr edi, 8
and edi, edx
imul edi, esi
add eax, edi
shr edi, 8
and edi, edx
add eax, edi
and eax, 0FF00FF00h
or eax, ecx
retn
| long long BYTE_MUL(unsigned int a1, int a2)
{
return (((((a2 * (a1 & 0xFF00FF)) >> 8) & 0xFF00FF) + a2 * (a1 & 0xFF00FF) + 8388736) >> 8) & 0xFF00FF | ((((a2 * ((a1 >> 8) & 0xFF00FF)) >> 8) & 0xFF00FF) + a2 * ((a1 >> 8) & 0xFF00FF) + 8388736) & 0xFF00FF00;
}
| BYTE_MUL:
MOV EDX,0xff00ff
MOV ECX,EDI
AND ECX,EDX
IMUL ECX,ESI
MOV R8D,ECX
SHR R8D,0x8
AND R8D,EDX
MOV EAX,0x800080
ADD ECX,EAX
ADD ECX,R8D
SHR ECX,0x8
AND ECX,EDX
SHR EDI,0x8
AND EDI,EDX
IMUL EDI,ESI
ADD EAX,EDI
SHR EDI,0x8
AND EDI,EDX
ADD EAX,EDI
AND EAX,0xff00ff00
OR EAX,ECX
RET
|
uint BYTE_MUL(uint param_1,int param_2)
{
uint uVar1;
uint uVar2;
uVar1 = (param_1 & 0xff00ff) * param_2;
uVar2 = (param_1 >> 8 & 0xff00ff) * param_2;
return uVar2 + 0x800080 + (uVar2 >> 8 & 0xff00ff) & 0xff00ff00 |
uVar1 + 0x800080 + (uVar1 >> 8 & 0xff00ff) >> 8 & 0xff00ff;
}
|
|
6,160 | inline_mysql_cond_init | eloqsql/include/mysql/psi/mysql_thread.h | static inline int inline_mysql_cond_init(
#ifdef HAVE_PSI_COND_INTERFACE
PSI_cond_key key,
#endif
mysql_cond_t *that,
const pthread_condattr_t *attr)
{
#ifdef HAVE_PSI_COND_INTERFACE
that->m_psi= PSI_COND_CALL(init_cond)(key, &that->m_cond);
#else
that->m_psi= NULL;
#endif
return pthread_cond_init(&that->m_cond, attr);
} | O0 | c | inline_mysql_cond_init:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq 0x1e80f6(%rip), %rax # 0x2ceb20
movq (%rax), %rax
movq 0x60(%rax), %rax
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
callq *%rax
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2a350
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| inline_mysql_cond_init_3:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+60h]
mov edi, [rbp+var_4]
mov rsi, [rbp+var_10]
call rax
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+30h], rcx
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call _pthread_cond_init
add rsp, 20h
pop rbp
retn
| long long inline_mysql_cond_init_3(unsigned int a1, long long a2, long long a3)
{
*(_QWORD *)(a2 + 48) = ((long long ( *)(_QWORD, long long))PSI_server[12])(a1, a2);
return pthread_cond_init(a2, a3);
}
| inline_mysql_cond_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
LEA RAX,[0x3ceb20]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x60]
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x10]
CALL RAX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x30],RCX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0012a350
ADD RSP,0x20
POP RBP
RET
|
void inline_mysql_cond_init(int4 param_1,pthread_cond_t *param_2,pthread_condattr_t *param_3)
{
longlong lVar1;
lVar1 = (**(code **)(PSI_server + 0x60))(param_1,param_2);
param_2[1].__align = lVar1;
pthread_cond_init(param_2,param_3);
return;
}
|
|
6,161 | MainWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) | The-SGR[P]silly-clicker/build_O0/SillyClicker_autogen/EWIEGA46WW/moc_mainwindow.cpp | void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
auto *_t = static_cast<MainWindow *>(_o);
(void)_t;
switch (_id) {
case 0: _t->on_pushButton_clicked(); break;
case 1: _t->on_extBtn_clicked(); break;
case 2: _t->on_gitBtn_clicked(); break;
case 3: _t->on_pushButton_2_clicked(); break;
case 4: _t->on_pushButton_3_clicked(); break;
default: ;
}
}
(void)_a;
} | O0 | cpp | MainWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x47f0
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x10(%rbp), %eax
movq %rax, -0x28(%rbp)
subq $0x4, %rax
ja 0x47ec
movq -0x28(%rbp), %rax
leaq 0x4864(%rip), %rcx # 0x9010
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x20(%rbp), %rdi
callq 0x54e0
jmp 0x47ee
movq -0x20(%rbp), %rdi
callq 0x56f0
jmp 0x47ee
movq -0x20(%rbp), %rdi
callq 0x5940
jmp 0x47ee
movq -0x20(%rbp), %rdi
callq 0x59d0
jmp 0x47ee
movq -0x20(%rbp), %rdi
callq 0x5d80
jmp 0x47ee
jmp 0x47ee
jmp 0x47f0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZN10MainWindow18qt_static_metacallEP7QObjectN11QMetaObject4CallEiPPv:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], edx
mov [rbp+var_18], rcx
cmp [rbp+var_C], 0
jnz short loc_47F0
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
mov eax, [rbp+var_10]
mov [rbp+var_28], rax
sub rax, 4; switch 5 cases
ja short def_47B3; jumptable 00000000000047B3 default case
mov rax, [rbp+var_28]
lea rcx, jpt_47B3
movsxd rax, ds:(jpt_47B3 - 9010h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_47B5:
mov rdi, [rbp+var_20]; jumptable 00000000000047B3 case 0
call _ZN10MainWindow21on_pushButton_clickedEv; MainWindow::on_pushButton_clicked(void)
jmp short loc_47EE
loc_47C0:
mov rdi, [rbp+var_20]; jumptable 00000000000047B3 case 1
call _ZN10MainWindow17on_extBtn_clickedEv; MainWindow::on_extBtn_clicked(void)
jmp short loc_47EE
loc_47CB:
mov rdi, [rbp+var_20]; jumptable 00000000000047B3 case 2
call _ZN10MainWindow17on_gitBtn_clickedEv; MainWindow::on_gitBtn_clicked(void)
jmp short loc_47EE
loc_47D6:
mov rdi, [rbp+var_20]; jumptable 00000000000047B3 case 3
call _ZN10MainWindow23on_pushButton_2_clickedEv; MainWindow::on_pushButton_2_clicked(void)
jmp short loc_47EE
loc_47E1:
mov rdi, [rbp+var_20]; jumptable 00000000000047B3 case 4
call _ZN10MainWindow23on_pushButton_3_clickedEv; MainWindow::on_pushButton_3_clicked(void)
jmp short loc_47EE
def_47B3:
jmp short $+2; jumptable 00000000000047B3 default case
loc_47EE:
jmp short $+2
loc_47F0:
add rsp, 30h
pop rbp
retn
| long long MainWindow::qt_static_metacall(MainWindow *a1, int a2, unsigned int a3)
{
long long result; // rax
if ( !a2 )
{
result = a3;
switch ( a3 )
{
case 0u:
result = MainWindow::on_pushButton_clicked(a1);
break;
case 1u:
result = MainWindow::on_extBtn_clicked(a1);
break;
case 2u:
result = MainWindow::on_gitBtn_clicked(a1);
break;
case 3u:
result = MainWindow::on_pushButton_2_clicked(a1);
break;
case 4u:
result = MainWindow::on_pushButton_3_clicked(a1);
break;
default:
return result;
}
}
return result;
}
| qt_static_metacall:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],EDX
MOV qword ptr [RBP + -0x18],RCX
CMP dword ptr [RBP + -0xc],0x0
JNZ 0x001047f0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RAX
MOV EAX,dword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
SUB RAX,0x4
JA 0x001047ec
MOV RAX,qword ptr [RBP + -0x28]
LEA RCX,[0x109010]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x001054e0
JMP 0x001047ee
caseD_1:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x001056f0
JMP 0x001047ee
caseD_2:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00105940
JMP 0x001047ee
caseD_3:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x001059d0
JMP 0x001047ee
caseD_4:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00105d80
JMP 0x001047ee
LAB_001047ec:
JMP 0x001047ee
LAB_001047ee:
JMP 0x001047f0
default:
ADD RSP,0x30
POP RBP
RET
|
/* MainWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) */
void MainWindow::qt_static_metacall(MainWindow *param_1,int param_2,int4 param_3)
{
if (param_2 == 0) {
switch(param_3) {
case 0:
on_pushButton_clicked(param_1);
break;
case 1:
on_extBtn_clicked(param_1);
break;
case 2:
on_gitBtn_clicked(param_1);
break;
case 3:
on_pushButton_2_clicked(param_1);
break;
case 4:
on_pushButton_3_clicked(param_1);
}
}
return;
}
|
|
6,162 | stbi__gif_header(stbi__context*, stbi__gif*, int*, int) | 7CodeWizard[P]stablediffusion/thirdparty/stb_image.h | static int stbi__gif_header(stbi__context *s, stbi__gif *g, int *comp, int is_info)
{
stbi_uc version;
if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8')
return stbi__err("not GIF", "Corrupt GIF");
version = stbi__get8(s);
if (version != '7' && version != '9') return stbi__err("not GIF", "Corrupt GIF");
if (stbi__get8(s) != 'a') return stbi__err("not GIF", "Corrupt GIF");
stbi__g_failure_reason = "";
g->w = stbi__get16le(s);
g->h = stbi__get16le(s);
g->flags = stbi__get8(s);
g->bgindex = stbi__get8(s);
g->ratio = stbi__get8(s);
g->transparent = -1;
if (g->w > STBI_MAX_DIMENSIONS) return stbi__err("too large","Very large image (corrupt?)");
if (g->h > STBI_MAX_DIMENSIONS) return stbi__err("too large","Very large image (corrupt?)");
if (comp != 0) *comp = 4; // can't actually tell whether it's 3 or 4 until we parse the comments
if (is_info) return 1;
if (g->flags & 0x80)
stbi__gif_parse_colortable(s,g->pal, 2 << (g->flags & 7), -1);
return 1;
} | O1 | c | stbi__gif_header(stbi__context*, stbi__gif*, int*, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq 0xc0(%rdi), %rax
cmpq 0xc8(%rdi), %rax
jb 0x2a29e
cmpl $0x0, 0x30(%r14)
je 0x2a4ed
movq %r14, %rdi
callq 0x2696c
movq 0xc0(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xc0(%r14)
cmpb $0x47, (%rax)
jne 0x2a4ed
movq 0xc0(%r14), %rax
cmpq 0xc8(%r14), %rax
jb 0x2a2dc
cmpl $0x0, 0x30(%r14)
je 0x2a4ed
movq %r14, %rdi
callq 0x2696c
movq 0xc0(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xc0(%r14)
cmpb $0x49, (%rax)
jne 0x2a4ed
movq 0xc0(%r14), %rax
cmpq 0xc8(%r14), %rax
jb 0x2a31a
cmpl $0x0, 0x30(%r14)
je 0x2a4ed
movq %r14, %rdi
callq 0x2696c
movq 0xc0(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xc0(%r14)
cmpb $0x46, (%rax)
jne 0x2a4ed
movq 0xc0(%r14), %rax
cmpq 0xc8(%r14), %rax
jb 0x2a358
cmpl $0x0, 0x30(%r14)
je 0x2a4ed
movq %r14, %rdi
callq 0x2696c
movq 0xc0(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xc0(%r14)
cmpb $0x38, (%rax)
jne 0x2a4ed
movq 0xc0(%r14), %rax
cmpq 0xc8(%r14), %rax
jb 0x2a396
cmpl $0x0, 0x30(%r14)
je 0x2a50e
movq %r14, %rdi
callq 0x2696c
movq 0xc0(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xc0(%r14)
movb (%rax), %al
cmpb $0x37, %al
je 0x2a3b3
movzbl %al, %eax
cmpl $0x39, %eax
jne 0x2a4ed
movq 0xc0(%r14), %rax
cmpq 0xc8(%r14), %rax
jb 0x2a3dd
cmpl $0x0, 0x30(%r14)
je 0x2a515
movq %r14, %rdi
callq 0x2696c
movq 0xc0(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xc0(%r14)
cmpb $0x61, (%rax)
sete %al
testb %al, %al
je 0x2a4ed
leaq 0x9aa31(%rip), %rax # 0xc4e2e
movq %rax, %fs:-0x20
movq %r14, %rdi
callq 0x2934f
movl %eax, (%rbx)
movq %r14, %rdi
callq 0x2934f
movl %eax, 0x4(%rbx)
movq 0xc0(%r14), %rax
cmpq 0xc8(%r14), %rax
jb 0x2a445
cmpl $0x0, 0x30(%r14)
je 0x2a559
movq %r14, %rdi
callq 0x2696c
movq 0xc0(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xc0(%r14)
movzbl (%rax), %eax
movl %eax, 0x20(%rbx)
movq 0xc0(%r14), %rax
cmpq 0xc8(%r14), %rax
jb 0x2a480
cmpl $0x0, 0x30(%r14)
je 0x2a560
movq %r14, %rdi
callq 0x2696c
movq 0xc0(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xc0(%r14)
movzbl (%rax), %eax
movl %eax, 0x24(%rbx)
movq 0xc0(%r14), %rax
cmpq 0xc8(%r14), %rax
jb 0x2a4bb
cmpl $0x0, 0x30(%r14)
je 0x2a567
movq %r14, %rdi
callq 0x2696c
movq 0xc0(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xc0(%r14)
movzbl (%rax), %eax
movl %eax, 0x28(%rbx)
movl $0xffffffff, 0x2c(%rbx) # imm = 0xFFFFFFFF
cmpl $0x1000001, (%rbx) # imm = 0x1000001
jge 0x2a4e4
cmpl $0x1000001, 0x4(%rbx) # imm = 0x1000001
jl 0x2a51c
leaq 0x9a981(%rip), %rax # 0xc4e6c
jmp 0x2a4f4
leaq 0x923e0(%rip), %rax # 0xbc8d4
movq %rax, %fs:-0x20
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
jmp 0x2a3a3
xorl %eax, %eax
jmp 0x2a3ee
testq %r15, %r15
je 0x2a528
movl $0x4, (%r15)
movl $0x1, %r15d
testl %ebp, %ebp
jne 0x2a500
movl 0x20(%rbx), %ecx
testb %cl, %cl
jns 0x2a500
addq $0x34, %rbx
andb $0x7, %cl
movl $0x2, %edx
shll %cl, %edx
movq %r14, %rdi
movq %rbx, %rsi
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
callq 0x2a56e
jmp 0x2a500
xorl %eax, %eax
jmp 0x2a453
xorl %eax, %eax
jmp 0x2a48e
xorl %eax, %eax
jmp 0x2a4c9
| _ZL16stbi__gif_headerP13stbi__contextP9stbi__gifPii:
push rbp
push r15
push r14
push rbx
push rax
mov ebp, ecx
mov r15, rdx
mov rbx, rsi
mov r14, rdi
mov rax, [rdi+0C0h]
cmp rax, [rdi+0C8h]
jb short loc_2A29E
cmp dword ptr [r14+30h], 0
jz loc_2A4ED
mov rdi, r14
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rax, [r14+0C0h]
loc_2A29E:
lea rcx, [rax+1]
mov [r14+0C0h], rcx
cmp byte ptr [rax], 47h ; 'G'
jnz loc_2A4ED
mov rax, [r14+0C0h]
cmp rax, [r14+0C8h]
jb short loc_2A2DC
cmp dword ptr [r14+30h], 0
jz loc_2A4ED
mov rdi, r14
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rax, [r14+0C0h]
loc_2A2DC:
lea rcx, [rax+1]
mov [r14+0C0h], rcx
cmp byte ptr [rax], 49h ; 'I'
jnz loc_2A4ED
mov rax, [r14+0C0h]
cmp rax, [r14+0C8h]
jb short loc_2A31A
cmp dword ptr [r14+30h], 0
jz loc_2A4ED
mov rdi, r14
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rax, [r14+0C0h]
loc_2A31A:
lea rcx, [rax+1]
mov [r14+0C0h], rcx
cmp byte ptr [rax], 46h ; 'F'
jnz loc_2A4ED
mov rax, [r14+0C0h]
cmp rax, [r14+0C8h]
jb short loc_2A358
cmp dword ptr [r14+30h], 0
jz loc_2A4ED
mov rdi, r14
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rax, [r14+0C0h]
loc_2A358:
lea rcx, [rax+1]
mov [r14+0C0h], rcx
cmp byte ptr [rax], 38h ; '8'
jnz loc_2A4ED
mov rax, [r14+0C0h]
cmp rax, [r14+0C8h]
jb short loc_2A396
cmp dword ptr [r14+30h], 0
jz loc_2A50E
mov rdi, r14
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rax, [r14+0C0h]
loc_2A396:
lea rcx, [rax+1]
mov [r14+0C0h], rcx
mov al, [rax]
loc_2A3A3:
cmp al, 37h ; '7'
jz short loc_2A3B3
movzx eax, al
cmp eax, 39h ; '9'
jnz loc_2A4ED
loc_2A3B3:
mov rax, [r14+0C0h]
cmp rax, [r14+0C8h]
jb short loc_2A3DD
cmp dword ptr [r14+30h], 0
jz loc_2A515
mov rdi, r14
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rax, [r14+0C0h]
loc_2A3DD:
lea rcx, [rax+1]
mov [r14+0C0h], rcx
cmp byte ptr [rax], 61h ; 'a'
setz al
loc_2A3EE:
test al, al
jz loc_2A4ED
lea rax, unk_C4E2E
mov fs:0FFFFFFFFFFFFFFE0h, rax
mov rdi, r14
call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *)
mov [rbx], eax
mov rdi, r14
call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *)
mov [rbx+4], eax
mov rax, [r14+0C0h]
cmp rax, [r14+0C8h]
jb short loc_2A445
cmp dword ptr [r14+30h], 0
jz loc_2A559
mov rdi, r14
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rax, [r14+0C0h]
loc_2A445:
lea rcx, [rax+1]
mov [r14+0C0h], rcx
movzx eax, byte ptr [rax]
loc_2A453:
mov [rbx+20h], eax
mov rax, [r14+0C0h]
cmp rax, [r14+0C8h]
jb short loc_2A480
cmp dword ptr [r14+30h], 0
jz loc_2A560
mov rdi, r14
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rax, [r14+0C0h]
loc_2A480:
lea rcx, [rax+1]
mov [r14+0C0h], rcx
movzx eax, byte ptr [rax]
loc_2A48E:
mov [rbx+24h], eax
mov rax, [r14+0C0h]
cmp rax, [r14+0C8h]
jb short loc_2A4BB
cmp dword ptr [r14+30h], 0
jz loc_2A567
mov rdi, r14
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rax, [r14+0C0h]
loc_2A4BB:
lea rcx, [rax+1]
mov [r14+0C0h], rcx
movzx eax, byte ptr [rax]
loc_2A4C9:
mov [rbx+28h], eax
mov dword ptr [rbx+2Ch], 0FFFFFFFFh
cmp dword ptr [rbx], 1000001h
jge short loc_2A4E4
cmp dword ptr [rbx+4], 1000001h
jl short loc_2A51C
loc_2A4E4:
lea rax, aTooLarge; "too large"
jmp short loc_2A4F4
loc_2A4ED:
lea rax, aNotGif; "not GIF"
loc_2A4F4:
mov fs:0FFFFFFFFFFFFFFE0h, rax
xor r15d, r15d
loc_2A500:
mov eax, r15d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_2A50E:
xor eax, eax
jmp loc_2A3A3
loc_2A515:
xor eax, eax
jmp loc_2A3EE
loc_2A51C:
test r15, r15
jz short loc_2A528
mov dword ptr [r15], 4
loc_2A528:
mov r15d, 1
test ebp, ebp
jnz short loc_2A500
mov ecx, [rbx+20h]
test cl, cl
jns short loc_2A500
add rbx, 34h ; '4'
and cl, 7
mov edx, 2
shl edx, cl
mov rdi, r14
mov rsi, rbx
mov ecx, 0FFFFFFFFh
call _ZL26stbi__gif_parse_colortableP13stbi__contextPA4_hii; stbi__gif_parse_colortable(stbi__context *,uchar (*)[4],int,int)
jmp short loc_2A500
loc_2A559:
xor eax, eax
jmp loc_2A453
loc_2A560:
xor eax, eax
jmp loc_2A48E
loc_2A567:
xor eax, eax
jmp loc_2A4C9
| long long stbi__gif_header(long long a1, int *a2, _DWORD *a3, int a4)
{
_BYTE *v6; // rax
_BYTE *v7; // rax
_BYTE *v8; // rax
_BYTE *v9; // rax
char *v10; // rax
char v11; // al
_BYTE *v12; // rax
bool v13; // al
unsigned __int8 *v14; // rax
int v15; // eax
unsigned __int8 *v16; // rax
int v17; // eax
unsigned __int8 *v18; // rax
int v19; // eax
const char *v20; // rax
unsigned int v21; // r15d
int v23; // ecx
v6 = *(_BYTE **)(a1 + 192);
if ( (unsigned long long)v6 >= *(_QWORD *)(a1 + 200) )
{
if ( !*(_DWORD *)(a1 + 48) )
goto LABEL_43;
stbi__refill_buffer(a1);
v6 = *(_BYTE **)(a1 + 192);
}
*(_QWORD *)(a1 + 192) = v6 + 1;
if ( *v6 != 71 )
goto LABEL_43;
v7 = *(_BYTE **)(a1 + 192);
if ( (unsigned long long)v7 >= *(_QWORD *)(a1 + 200) )
{
if ( !*(_DWORD *)(a1 + 48) )
goto LABEL_43;
stbi__refill_buffer(a1);
v7 = *(_BYTE **)(a1 + 192);
}
*(_QWORD *)(a1 + 192) = v7 + 1;
if ( *v7 != 73 )
goto LABEL_43;
v8 = *(_BYTE **)(a1 + 192);
if ( (unsigned long long)v8 >= *(_QWORD *)(a1 + 200) )
{
if ( !*(_DWORD *)(a1 + 48) )
goto LABEL_43;
stbi__refill_buffer(a1);
v8 = *(_BYTE **)(a1 + 192);
}
*(_QWORD *)(a1 + 192) = v8 + 1;
if ( *v8 != 70 )
goto LABEL_43;
v9 = *(_BYTE **)(a1 + 192);
if ( (unsigned long long)v9 < *(_QWORD *)(a1 + 200) )
goto LABEL_16;
if ( !*(_DWORD *)(a1 + 48) )
{
LABEL_43:
v20 = "not GIF";
goto LABEL_44;
}
stbi__refill_buffer(a1);
v9 = *(_BYTE **)(a1 + 192);
LABEL_16:
*(_QWORD *)(a1 + 192) = v9 + 1;
if ( *v9 != 56 )
goto LABEL_43;
v10 = *(char **)(a1 + 192);
if ( (unsigned long long)v10 >= *(_QWORD *)(a1 + 200) )
{
if ( !*(_DWORD *)(a1 + 48) )
{
v11 = 0;
goto LABEL_21;
}
stbi__refill_buffer(a1);
v10 = *(char **)(a1 + 192);
}
*(_QWORD *)(a1 + 192) = v10 + 1;
v11 = *v10;
LABEL_21:
if ( v11 != 55 && v11 != 57 )
goto LABEL_43;
v12 = *(_BYTE **)(a1 + 192);
if ( (unsigned long long)v12 < *(_QWORD *)(a1 + 200) )
goto LABEL_26;
if ( *(_DWORD *)(a1 + 48) )
{
stbi__refill_buffer(a1);
v12 = *(_BYTE **)(a1 + 192);
LABEL_26:
*(_QWORD *)(a1 + 192) = v12 + 1;
v13 = *v12 == 97;
goto LABEL_27;
}
v13 = 0;
LABEL_27:
if ( !v13 )
goto LABEL_43;
__writefsqword(0xFFFFFFE0, (unsigned long long)&unk_C4E2E);
*a2 = stbi__get16le(a1);
a2[1] = stbi__get16le(a1);
v14 = *(unsigned __int8 **)(a1 + 192);
if ( (unsigned long long)v14 < *(_QWORD *)(a1 + 200) )
{
LABEL_31:
*(_QWORD *)(a1 + 192) = v14 + 1;
v15 = *v14;
goto LABEL_32;
}
if ( *(_DWORD *)(a1 + 48) )
{
stbi__refill_buffer(a1);
v14 = *(unsigned __int8 **)(a1 + 192);
goto LABEL_31;
}
v15 = 0;
LABEL_32:
a2[8] = v15;
v16 = *(unsigned __int8 **)(a1 + 192);
if ( (unsigned long long)v16 < *(_QWORD *)(a1 + 200) )
{
LABEL_35:
*(_QWORD *)(a1 + 192) = v16 + 1;
v17 = *v16;
goto LABEL_36;
}
if ( *(_DWORD *)(a1 + 48) )
{
stbi__refill_buffer(a1);
v16 = *(unsigned __int8 **)(a1 + 192);
goto LABEL_35;
}
v17 = 0;
LABEL_36:
a2[9] = v17;
v18 = *(unsigned __int8 **)(a1 + 192);
if ( (unsigned long long)v18 >= *(_QWORD *)(a1 + 200) )
{
if ( !*(_DWORD *)(a1 + 48) )
{
v19 = 0;
goto LABEL_40;
}
stbi__refill_buffer(a1);
v18 = *(unsigned __int8 **)(a1 + 192);
}
*(_QWORD *)(a1 + 192) = v18 + 1;
v19 = *v18;
LABEL_40:
a2[10] = v19;
a2[11] = -1;
if ( *a2 >= 16777217 || a2[1] >= 16777217 )
{
v20 = "too large";
LABEL_44:
__writefsqword(0xFFFFFFE0, (unsigned long long)v20);
return 0;
}
if ( a3 )
*a3 = 4;
v21 = 1;
if ( !a4 )
{
v23 = a2[8];
if ( (v23 & 0x80u) != 0 )
stbi__gif_parse_colortable(a1, a2 + 13, (unsigned int)(2 << (v23 & 7)), 0xFFFFFFFFLL);
}
return v21;
}
| |||
6,163 | stbi__gif_header(stbi__context*, stbi__gif*, int*, int) | 7CodeWizard[P]stablediffusion/thirdparty/stb_image.h | static int stbi__gif_header(stbi__context *s, stbi__gif *g, int *comp, int is_info)
{
stbi_uc version;
if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8')
return stbi__err("not GIF", "Corrupt GIF");
version = stbi__get8(s);
if (version != '7' && version != '9') return stbi__err("not GIF", "Corrupt GIF");
if (stbi__get8(s) != 'a') return stbi__err("not GIF", "Corrupt GIF");
stbi__g_failure_reason = "";
g->w = stbi__get16le(s);
g->h = stbi__get16le(s);
g->flags = stbi__get8(s);
g->bgindex = stbi__get8(s);
g->ratio = stbi__get8(s);
g->transparent = -1;
if (g->w > STBI_MAX_DIMENSIONS) return stbi__err("too large","Very large image (corrupt?)");
if (g->h > STBI_MAX_DIMENSIONS) return stbi__err("too large","Very large image (corrupt?)");
if (comp != 0) *comp = 4; // can't actually tell whether it's 3 or 4 until we parse the comments
if (is_info) return 1;
if (g->flags & 0x80)
stbi__gif_parse_colortable(s,g->pal, 2 << (g->flags & 7), -1);
return 1;
} | O2 | c | stbi__gif_header(stbi__context*, stbi__gif*, int*, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
callq 0x14342
cmpb $0x47, %al
jne 0x1708c
movq %r14, %rdi
callq 0x14342
cmpb $0x49, %al
jne 0x1708c
movq %r14, %rdi
callq 0x14342
cmpb $0x46, %al
jne 0x1708c
movq %r14, %rdi
callq 0x14342
cmpb $0x38, %al
jne 0x1708c
movq %r14, %rdi
callq 0x14342
cmpb $0x37, %al
je 0x17013
movzbl %al, %eax
cmpl $0x39, %eax
jne 0x1708c
movq %r14, %rdi
callq 0x14342
cmpb $0x61, %al
jne 0x1708c
leaq 0x89d18(%rip), %rax # 0xa0d3e
movq %rax, %fs:-0x20
movq %r14, %rdi
callq 0x1657e
movl %eax, (%rbx)
movq %r14, %rdi
callq 0x1657e
movl %eax, 0x4(%rbx)
movq %r14, %rdi
callq 0x14342
movzbl %al, %eax
movl %eax, 0x20(%rbx)
movq %r14, %rdi
callq 0x14342
movzbl %al, %eax
movl %eax, 0x24(%rbx)
movq %r14, %rdi
callq 0x14342
movzbl %al, %eax
movl %eax, 0x28(%rbx)
orl $-0x1, 0x2c(%rbx)
cmpl $0x1000001, (%rbx) # imm = 0x1000001
jge 0x17083
cmpl $0x1000001, 0x4(%rbx) # imm = 0x1000001
jl 0x170ad
leaq 0x89cf2(%rip), %rax # 0xa0d7c
jmp 0x17093
leaq 0x81781(%rip), %rax # 0x98814
movq %rax, %fs:-0x20
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
testq %r15, %r15
je 0x170b9
movl $0x4, (%r15)
pushq $0x1
popq %r15
testl %ebp, %ebp
jne 0x1709f
movl 0x20(%rbx), %ecx
testb %cl, %cl
jns 0x1709f
addq $0x34, %rbx
andb $0x7, %cl
pushq $0x2
popq %rdx
shll %cl, %edx
pushq $-0x1
popq %rcx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x170e4
jmp 0x1709f
| _ZL16stbi__gif_headerP13stbi__contextP9stbi__gifPii:
push rbp
push r15
push r14
push rbx
push rax
mov ebp, ecx
mov r15, rdx
mov rbx, rsi
mov r14, rdi
call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *)
cmp al, 47h ; 'G'
jnz loc_1708C
mov rdi, r14
call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *)
cmp al, 49h ; 'I'
jnz loc_1708C
mov rdi, r14
call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *)
cmp al, 46h ; 'F'
jnz loc_1708C
mov rdi, r14
call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *)
cmp al, 38h ; '8'
jnz loc_1708C
mov rdi, r14
call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *)
cmp al, 37h ; '7'
jz short loc_17013
movzx eax, al
cmp eax, 39h ; '9'
jnz short loc_1708C
loc_17013:
mov rdi, r14
call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *)
cmp al, 61h ; 'a'
jnz short loc_1708C
lea rax, unk_A0D3E
mov fs:0FFFFFFFFFFFFFFE0h, rax
mov rdi, r14
call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *)
mov [rbx], eax
mov rdi, r14
call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *)
mov [rbx+4], eax
mov rdi, r14
call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *)
movzx eax, al
mov [rbx+20h], eax
mov rdi, r14
call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *)
movzx eax, al
mov [rbx+24h], eax
mov rdi, r14
call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *)
movzx eax, al
mov [rbx+28h], eax
or dword ptr [rbx+2Ch], 0FFFFFFFFh
cmp dword ptr [rbx], 1000001h
jge short loc_17083
cmp dword ptr [rbx+4], 1000001h
jl short loc_170AD
loc_17083:
lea rax, aTooLarge; "too large"
jmp short loc_17093
loc_1708C:
lea rax, aNotGif; "not GIF"
loc_17093:
mov fs:0FFFFFFFFFFFFFFE0h, rax
xor r15d, r15d
loc_1709F:
mov eax, r15d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_170AD:
test r15, r15
jz short loc_170B9
mov dword ptr [r15], 4
loc_170B9:
push 1
pop r15
test ebp, ebp
jnz short loc_1709F
mov ecx, [rbx+20h]
test cl, cl
jns short loc_1709F
add rbx, 34h ; '4'
and cl, 7
push 2
pop rdx
shl edx, cl
push 0FFFFFFFFFFFFFFFFh
pop rcx
mov rdi, r14
mov rsi, rbx
call _ZL26stbi__gif_parse_colortableP13stbi__contextPA4_hii; stbi__gif_parse_colortable(stbi__context *,uchar (*)[4],int,int)
jmp short loc_1709F
| long long stbi__gif_header(long long a1, int *a2, _DWORD *a3, int a4)
{
char v6; // al
const char *v7; // rax
unsigned int v8; // r15d
int v10; // ecx
if ( stbi__get8(a1) != 71
|| stbi__get8(a1) != 73
|| stbi__get8(a1) != 70
|| stbi__get8(a1) != 56
|| (v6 = stbi__get8(a1), v6 != 55) && v6 != 57
|| stbi__get8(a1) != 97 )
{
v7 = "not GIF";
goto LABEL_12;
}
__writefsqword(0xFFFFFFE0, (unsigned long long)&unk_A0D3E);
*a2 = stbi__get16le(a1);
a2[1] = stbi__get16le(a1);
a2[8] = (unsigned __int8)stbi__get8(a1);
a2[9] = (unsigned __int8)stbi__get8(a1);
a2[10] = (unsigned __int8)stbi__get8(a1);
a2[11] = -1;
if ( *a2 >= 16777217 || a2[1] >= 16777217 )
{
v7 = "too large";
LABEL_12:
__writefsqword(0xFFFFFFE0, (unsigned long long)v7);
return 0;
}
if ( a3 )
*a3 = 4;
v8 = 1;
if ( !a4 )
{
v10 = a2[8];
if ( (v10 & 0x80u) != 0 )
stbi__gif_parse_colortable(a1, a2 + 13, (unsigned int)(2 << (v10 & 7)), -1LL);
}
return v8;
}
| stbi__gif_header:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBP,ECX
MOV R15,RDX
MOV RBX,RSI
MOV R14,RDI
CALL 0x00114342
CMP AL,0x47
JNZ 0x0011708c
MOV RDI,R14
CALL 0x00114342
CMP AL,0x49
JNZ 0x0011708c
MOV RDI,R14
CALL 0x00114342
CMP AL,0x46
JNZ 0x0011708c
MOV RDI,R14
CALL 0x00114342
CMP AL,0x38
JNZ 0x0011708c
MOV RDI,R14
CALL 0x00114342
CMP AL,0x37
JZ 0x00117013
MOVZX EAX,AL
CMP EAX,0x39
JNZ 0x0011708c
LAB_00117013:
MOV RDI,R14
CALL 0x00114342
CMP AL,0x61
JNZ 0x0011708c
LEA RAX,[0x1a0d3e]
MOV qword ptr FS:[-0x20],RAX
MOV RDI,R14
CALL 0x0011657e
MOV dword ptr [RBX],EAX
MOV RDI,R14
CALL 0x0011657e
MOV dword ptr [RBX + 0x4],EAX
MOV RDI,R14
CALL 0x00114342
MOVZX EAX,AL
MOV dword ptr [RBX + 0x20],EAX
MOV RDI,R14
CALL 0x00114342
MOVZX EAX,AL
MOV dword ptr [RBX + 0x24],EAX
MOV RDI,R14
CALL 0x00114342
MOVZX EAX,AL
MOV dword ptr [RBX + 0x28],EAX
OR dword ptr [RBX + 0x2c],0xffffffff
CMP dword ptr [RBX],0x1000001
JGE 0x00117083
CMP dword ptr [RBX + 0x4],0x1000001
JL 0x001170ad
LAB_00117083:
LEA RAX,[0x1a0d7c]
JMP 0x00117093
LAB_0011708c:
LEA RAX,[0x198814]
LAB_00117093:
MOV qword ptr FS:[-0x20],RAX
XOR R15D,R15D
LAB_0011709f:
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001170ad:
TEST R15,R15
JZ 0x001170b9
MOV dword ptr [R15],0x4
LAB_001170b9:
PUSH 0x1
POP R15
TEST EBP,EBP
JNZ 0x0011709f
MOV ECX,dword ptr [RBX + 0x20]
TEST CL,CL
JNS 0x0011709f
ADD RBX,0x34
AND CL,0x7
PUSH 0x2
POP RDX
SHL EDX,CL
PUSH -0x1
POP RCX
MOV RDI,R14
MOV RSI,RBX
CALL 0x001170e4
JMP 0x0011709f
|
/* stbi__gif_header(stbi__context*, stbi__gif*, int*, int) */
int8 stbi__gif_header(stbi__context *param_1,stbi__gif *param_2,int *param_3,int param_4)
{
char cVar1;
byte bVar2;
int4 uVar3;
char *pcVar4;
long in_FS_OFFSET;
cVar1 = stbi__get8(param_1);
if (((((cVar1 == 'G') && (cVar1 = stbi__get8(param_1), cVar1 == 'I')) &&
(cVar1 = stbi__get8(param_1), cVar1 == 'F')) && (cVar1 = stbi__get8(param_1), cVar1 == '8'))
&& (((cVar1 = stbi__get8(param_1), cVar1 == '7' || (cVar1 == '9')) &&
(cVar1 = stbi__get8(param_1), cVar1 == 'a')))) {
*(int **)(in_FS_OFFSET + -0x20) = &DAT_001a0d3e;
uVar3 = stbi__get16le(param_1);
*(int4 *)param_2 = uVar3;
uVar3 = stbi__get16le(param_1);
*(int4 *)(param_2 + 4) = uVar3;
bVar2 = stbi__get8(param_1);
*(uint *)(param_2 + 0x20) = (uint)bVar2;
bVar2 = stbi__get8(param_1);
*(uint *)(param_2 + 0x24) = (uint)bVar2;
bVar2 = stbi__get8(param_1);
*(uint *)(param_2 + 0x28) = (uint)bVar2;
*(int4 *)(param_2 + 0x2c) = 0xffffffff;
if ((*(int *)param_2 < 0x1000001) && (*(int *)(param_2 + 4) < 0x1000001)) {
if (param_3 != (int *)0x0) {
*param_3 = 4;
}
if (param_4 != 0) {
return 1;
}
if (-1 < (char)(byte)*(int4 *)(param_2 + 0x20)) {
return 1;
}
stbi__gif_parse_colortable
(param_1,(unsigned_char *)(param_2 + 0x34),
2 << ((byte)*(int4 *)(param_2 + 0x20) & 7),-1);
return 1;
}
pcVar4 = "too large";
}
else {
pcVar4 = "not GIF";
}
*(char **)(in_FS_OFFSET + -0x20) = pcVar4;
return 0;
}
|
|
6,164 | stbi__gif_header(stbi__context*, stbi__gif*, int*, int) | 7CodeWizard[P]stablediffusion/thirdparty/stb_image.h | static int stbi__gif_header(stbi__context *s, stbi__gif *g, int *comp, int is_info)
{
stbi_uc version;
if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8')
return stbi__err("not GIF", "Corrupt GIF");
version = stbi__get8(s);
if (version != '7' && version != '9') return stbi__err("not GIF", "Corrupt GIF");
if (stbi__get8(s) != 'a') return stbi__err("not GIF", "Corrupt GIF");
stbi__g_failure_reason = "";
g->w = stbi__get16le(s);
g->h = stbi__get16le(s);
g->flags = stbi__get8(s);
g->bgindex = stbi__get8(s);
g->ratio = stbi__get8(s);
g->transparent = -1;
if (g->w > STBI_MAX_DIMENSIONS) return stbi__err("too large","Very large image (corrupt?)");
if (g->h > STBI_MAX_DIMENSIONS) return stbi__err("too large","Very large image (corrupt?)");
if (comp != 0) *comp = 4; // can't actually tell whether it's 3 or 4 until we parse the comments
if (is_info) return 1;
if (g->flags & 0x80)
stbi__gif_parse_colortable(s,g->pal, 2 << (g->flags & 7), -1);
return 1;
} | O3 | c | stbi__gif_header(stbi__context*, stbi__gif*, int*, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq 0xc0(%rdi), %rcx
cmpq 0xc8(%rdi), %rcx
jb 0x29708
cmpl $0x0, 0x30(%r14)
je 0x2992f
movq %r14, %rdi
callq 0x2620e
movq 0xc0(%r14), %rcx
leaq 0x1(%rcx), %rax
movq %rax, 0xc0(%r14)
cmpb $0x47, (%rcx)
jne 0x2992f
cmpq 0xc8(%r14), %rax
jb 0x2973f
cmpl $0x0, 0x30(%r14)
je 0x2992f
movq %r14, %rdi
callq 0x2620e
movq 0xc0(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xc0(%r14)
cmpb $0x49, (%rax)
jne 0x2992f
cmpq 0xc8(%r14), %rcx
jb 0x29776
cmpl $0x0, 0x30(%r14)
je 0x2992f
movq %r14, %rdi
callq 0x2620e
movq 0xc0(%r14), %rcx
leaq 0x1(%rcx), %rax
movq %rax, 0xc0(%r14)
cmpb $0x46, (%rcx)
jne 0x2992f
cmpq 0xc8(%r14), %rax
jb 0x297ad
cmpl $0x0, 0x30(%r14)
je 0x2992f
movq %r14, %rdi
callq 0x2620e
movq 0xc0(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xc0(%r14)
cmpb $0x38, (%rax)
jne 0x2992f
cmpq 0xc8(%r14), %rcx
jb 0x297e4
cmpl $0x0, 0x30(%r14)
je 0x2992f
movq %r14, %rdi
callq 0x2620e
movq 0xc0(%r14), %rcx
leaq 0x1(%rcx), %rax
movq %rax, 0xc0(%r14)
movzbl (%rcx), %ecx
cmpl $0x37, %ecx
je 0x29800
cmpl $0x39, %ecx
jne 0x2992f
cmpq 0xc8(%r14), %rax
jb 0x29823
cmpl $0x0, 0x30(%r14)
je 0x2992f
movq %r14, %rdi
callq 0x2620e
movq 0xc0(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xc0(%r14)
cmpb $0x61, (%rax)
jne 0x2992f
leaq 0x9a600(%rip), %rax # 0xc3e3e
movq %rax, %fs:-0x20
movq %r14, %rdi
callq 0x288c8
movl %eax, (%rbx)
movq %r14, %rdi
callq 0x288c8
movl %eax, 0x4(%rbx)
movq 0xc0(%r14), %rax
movq 0xc8(%r14), %rcx
cmpq %rcx, %rax
jb 0x29890
cmpl $0x0, 0x30(%r14)
je 0x2998d
movq %r14, %rdi
callq 0x2620e
movq 0xc0(%r14), %rax
movq 0xc8(%r14), %rcx
leaq 0x1(%rax), %rsi
movq %rsi, 0xc0(%r14)
movzbl (%rax), %edx
movq %rsi, %rax
movl %edx, 0x20(%rbx)
cmpq %rcx, %rax
jb 0x298ca
cmpl $0x0, 0x30(%r14)
je 0x29994
movq %r14, %rdi
callq 0x2620e
movq 0xc0(%r14), %rax
movq 0xc8(%r14), %rcx
leaq 0x1(%rax), %rsi
movq %rsi, 0xc0(%r14)
movzbl (%rax), %edx
movq %rsi, %rax
movl %edx, 0x24(%rbx)
cmpq %rcx, %rax
jb 0x298fd
cmpl $0x0, 0x30(%r14)
je 0x2999b
movq %r14, %rdi
callq 0x2620e
movq 0xc0(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xc0(%r14)
movzbl (%rax), %eax
movl %eax, 0x28(%rbx)
movl $0xffffffff, 0x2c(%rbx) # imm = 0xFFFFFFFF
cmpl $0x1000001, (%rbx) # imm = 0x1000001
jge 0x29926
cmpl $0x1000001, 0x4(%rbx) # imm = 0x1000001
jl 0x29950
leaq 0x9a54f(%rip), %rax # 0xc3e7c
jmp 0x29936
leaq 0x91fae(%rip), %rax # 0xbb8e4
movq %rax, %fs:-0x20
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
testq %r15, %r15
je 0x2995c
movl $0x4, (%r15)
movl $0x1, %r15d
testl %ebp, %ebp
jne 0x29942
movl 0x20(%rbx), %ecx
testb %cl, %cl
jns 0x29942
addq $0x34, %rbx
andb $0x7, %cl
movl $0x2, %edx
shll %cl, %edx
movq %r14, %rdi
movq %rbx, %rsi
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
callq 0x299a2
jmp 0x29942
xorl %edx, %edx
jmp 0x298a1
xorl %edx, %edx
jmp 0x298db
xorl %eax, %eax
jmp 0x2990b
| _ZL16stbi__gif_headerP13stbi__contextP9stbi__gifPii:
push rbp
push r15
push r14
push rbx
push rax
mov ebp, ecx
mov r15, rdx
mov rbx, rsi
mov r14, rdi
mov rcx, [rdi+0C0h]
cmp rcx, [rdi+0C8h]
jb short loc_29708
cmp dword ptr [r14+30h], 0
jz loc_2992F
mov rdi, r14
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rcx, [r14+0C0h]
loc_29708:
lea rax, [rcx+1]
mov [r14+0C0h], rax
cmp byte ptr [rcx], 47h ; 'G'
jnz loc_2992F
cmp rax, [r14+0C8h]
jb short loc_2973F
cmp dword ptr [r14+30h], 0
jz loc_2992F
mov rdi, r14
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rax, [r14+0C0h]
loc_2973F:
lea rcx, [rax+1]
mov [r14+0C0h], rcx
cmp byte ptr [rax], 49h ; 'I'
jnz loc_2992F
cmp rcx, [r14+0C8h]
jb short loc_29776
cmp dword ptr [r14+30h], 0
jz loc_2992F
mov rdi, r14
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rcx, [r14+0C0h]
loc_29776:
lea rax, [rcx+1]
mov [r14+0C0h], rax
cmp byte ptr [rcx], 46h ; 'F'
jnz loc_2992F
cmp rax, [r14+0C8h]
jb short loc_297AD
cmp dword ptr [r14+30h], 0
jz loc_2992F
mov rdi, r14
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rax, [r14+0C0h]
loc_297AD:
lea rcx, [rax+1]
mov [r14+0C0h], rcx
cmp byte ptr [rax], 38h ; '8'
jnz loc_2992F
cmp rcx, [r14+0C8h]
jb short loc_297E4
cmp dword ptr [r14+30h], 0
jz loc_2992F
mov rdi, r14
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rcx, [r14+0C0h]
loc_297E4:
lea rax, [rcx+1]
mov [r14+0C0h], rax
movzx ecx, byte ptr [rcx]
cmp ecx, 37h ; '7'
jz short loc_29800
cmp ecx, 39h ; '9'
jnz loc_2992F
loc_29800:
cmp rax, [r14+0C8h]
jb short loc_29823
cmp dword ptr [r14+30h], 0
jz loc_2992F
mov rdi, r14
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rax, [r14+0C0h]
loc_29823:
lea rcx, [rax+1]
mov [r14+0C0h], rcx
cmp byte ptr [rax], 61h ; 'a'
jnz loc_2992F
lea rax, unk_C3E3E
mov fs:0FFFFFFFFFFFFFFE0h, rax
mov rdi, r14
call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *)
mov [rbx], eax
mov rdi, r14
call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *)
mov [rbx+4], eax
mov rax, [r14+0C0h]
mov rcx, [r14+0C8h]
cmp rax, rcx
jb short loc_29890
cmp dword ptr [r14+30h], 0
jz loc_2998D
mov rdi, r14
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rax, [r14+0C0h]
mov rcx, [r14+0C8h]
loc_29890:
lea rsi, [rax+1]
mov [r14+0C0h], rsi
movzx edx, byte ptr [rax]
mov rax, rsi
loc_298A1:
mov [rbx+20h], edx
cmp rax, rcx
jb short loc_298CA
cmp dword ptr [r14+30h], 0
jz loc_29994
mov rdi, r14
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rax, [r14+0C0h]
mov rcx, [r14+0C8h]
loc_298CA:
lea rsi, [rax+1]
mov [r14+0C0h], rsi
movzx edx, byte ptr [rax]
mov rax, rsi
loc_298DB:
mov [rbx+24h], edx
cmp rax, rcx
jb short loc_298FD
cmp dword ptr [r14+30h], 0
jz loc_2999B
mov rdi, r14
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rax, [r14+0C0h]
loc_298FD:
lea rcx, [rax+1]
mov [r14+0C0h], rcx
movzx eax, byte ptr [rax]
loc_2990B:
mov [rbx+28h], eax
mov dword ptr [rbx+2Ch], 0FFFFFFFFh
cmp dword ptr [rbx], 1000001h
jge short loc_29926
cmp dword ptr [rbx+4], 1000001h
jl short loc_29950
loc_29926:
lea rax, aTooLarge; "too large"
jmp short loc_29936
loc_2992F:
lea rax, aNotGif; "not GIF"
loc_29936:
mov fs:0FFFFFFFFFFFFFFE0h, rax
xor r15d, r15d
loc_29942:
mov eax, r15d
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_29950:
test r15, r15
jz short loc_2995C
mov dword ptr [r15], 4
loc_2995C:
mov r15d, 1
test ebp, ebp
jnz short loc_29942
mov ecx, [rbx+20h]
test cl, cl
jns short loc_29942
add rbx, 34h ; '4'
and cl, 7
mov edx, 2
shl edx, cl
mov rdi, r14
mov rsi, rbx
mov ecx, 0FFFFFFFFh
call _ZL26stbi__gif_parse_colortableP13stbi__contextPA4_hii; stbi__gif_parse_colortable(stbi__context *,uchar (*)[4],int,int)
jmp short loc_29942
loc_2998D:
xor edx, edx
jmp loc_298A1
loc_29994:
xor edx, edx
jmp loc_298DB
loc_2999B:
xor eax, eax
jmp loc_2990B
| long long stbi__gif_header(long long a1, int *a2, _DWORD *a3, int a4)
{
_BYTE *v6; // rcx
_BYTE *v7; // rax
_BYTE *v8; // rcx
_BYTE *v9; // rax
unsigned __int8 *v10; // rcx
_BYTE *v11; // rax
int v12; // ecx
unsigned __int8 *v13; // rax
unsigned long long v14; // rcx
int v15; // edx
int v16; // edx
int v17; // eax
const char *v18; // rax
unsigned int v19; // r15d
int v21; // ecx
v6 = *(_BYTE **)(a1 + 192);
if ( (unsigned long long)v6 >= *(_QWORD *)(a1 + 200) )
{
if ( !*(_DWORD *)(a1 + 48) )
goto LABEL_41;
stbi__refill_buffer(a1);
v6 = *(_BYTE **)(a1 + 192);
}
v7 = v6 + 1;
*(_QWORD *)(a1 + 192) = v6 + 1;
if ( *v6 != 71 )
goto LABEL_41;
if ( (unsigned long long)v7 >= *(_QWORD *)(a1 + 200) )
{
if ( !*(_DWORD *)(a1 + 48) )
goto LABEL_41;
stbi__refill_buffer(a1);
v7 = *(_BYTE **)(a1 + 192);
}
v8 = v7 + 1;
*(_QWORD *)(a1 + 192) = v7 + 1;
if ( *v7 != 73 )
goto LABEL_41;
if ( (unsigned long long)v8 >= *(_QWORD *)(a1 + 200) )
{
if ( !*(_DWORD *)(a1 + 48) )
goto LABEL_41;
stbi__refill_buffer(a1);
v8 = *(_BYTE **)(a1 + 192);
}
v9 = v8 + 1;
*(_QWORD *)(a1 + 192) = v8 + 1;
if ( *v8 != 70 )
goto LABEL_41;
if ( (unsigned long long)v9 >= *(_QWORD *)(a1 + 200) )
{
if ( !*(_DWORD *)(a1 + 48) )
goto LABEL_41;
stbi__refill_buffer(a1);
v9 = *(_BYTE **)(a1 + 192);
}
v10 = v9 + 1;
*(_QWORD *)(a1 + 192) = v9 + 1;
if ( *v9 != 56 )
goto LABEL_41;
if ( (unsigned long long)v10 >= *(_QWORD *)(a1 + 200) )
{
if ( !*(_DWORD *)(a1 + 48) )
goto LABEL_41;
stbi__refill_buffer(a1);
v10 = *(unsigned __int8 **)(a1 + 192);
}
v11 = v10 + 1;
*(_QWORD *)(a1 + 192) = v10 + 1;
v12 = *v10;
if ( v12 != 55 && v12 != 57 )
goto LABEL_41;
if ( (unsigned long long)v11 >= *(_QWORD *)(a1 + 200) )
{
if ( *(_DWORD *)(a1 + 48) )
{
stbi__refill_buffer(a1);
v11 = *(_BYTE **)(a1 + 192);
goto LABEL_25;
}
LABEL_41:
v18 = "not GIF";
goto LABEL_42;
}
LABEL_25:
*(_QWORD *)(a1 + 192) = v11 + 1;
if ( *v11 != 97 )
goto LABEL_41;
__writefsqword(0xFFFFFFE0, (unsigned long long)&unk_C3E3E);
*a2 = stbi__get16le(a1);
a2[1] = stbi__get16le(a1);
v13 = *(unsigned __int8 **)(a1 + 192);
v14 = *(_QWORD *)(a1 + 200);
if ( (unsigned long long)v13 < v14 )
{
LABEL_29:
*(_QWORD *)(a1 + 192) = v13 + 1;
v15 = *v13++;
goto LABEL_30;
}
if ( *(_DWORD *)(a1 + 48) )
{
stbi__refill_buffer(a1);
v13 = *(unsigned __int8 **)(a1 + 192);
v14 = *(_QWORD *)(a1 + 200);
goto LABEL_29;
}
v15 = 0;
LABEL_30:
a2[8] = v15;
if ( (unsigned long long)v13 < v14 )
{
LABEL_33:
*(_QWORD *)(a1 + 192) = v13 + 1;
v16 = *v13++;
goto LABEL_34;
}
if ( *(_DWORD *)(a1 + 48) )
{
stbi__refill_buffer(a1);
v13 = *(unsigned __int8 **)(a1 + 192);
v14 = *(_QWORD *)(a1 + 200);
goto LABEL_33;
}
v16 = 0;
LABEL_34:
a2[9] = v16;
if ( (unsigned long long)v13 >= v14 )
{
if ( !*(_DWORD *)(a1 + 48) )
{
v17 = 0;
goto LABEL_38;
}
stbi__refill_buffer(a1);
v13 = *(unsigned __int8 **)(a1 + 192);
}
*(_QWORD *)(a1 + 192) = v13 + 1;
v17 = *v13;
LABEL_38:
a2[10] = v17;
a2[11] = -1;
if ( *a2 >= 16777217 || a2[1] >= 16777217 )
{
v18 = "too large";
LABEL_42:
__writefsqword(0xFFFFFFE0, (unsigned long long)v18);
return 0;
}
if ( a3 )
*a3 = 4;
v19 = 1;
if ( !a4 )
{
v21 = a2[8];
if ( (v21 & 0x80u) != 0 )
stbi__gif_parse_colortable(a1, a2 + 13, (unsigned int)(2 << (v21 & 7)), 0xFFFFFFFFLL);
}
return v19;
}
| |||
6,165 | ma_read_static_record | eloqsql/storage/maria/ma_statrec.c | int _ma_read_static_record(register MARIA_HA *info, register uchar *record,
MARIA_RECORD_POS pos)
{
int error;
DBUG_ENTER("_ma_read_static_record");
if (pos != HA_OFFSET_ERROR)
{
if (info->opt_flag & WRITE_CACHE_USED &&
info->rec_cache.pos_in_file <= pos &&
flush_io_cache(&info->rec_cache))
DBUG_RETURN(my_errno);
info->rec_cache.seek_not_done=1; /* We have done a seek */
error= (int) info->s->file_read(info, record,info->s->base.reclength,
pos, MYF(MY_NABP));
if (! error)
{
fast_ma_writeinfo(info);
if (!*record)
{
/* Record is deleted */
DBUG_PRINT("warning", ("Record is deleted"));
DBUG_RETURN((my_errno=HA_ERR_RECORD_DELETED));
}
info->update|= HA_STATE_AKTIV; /* Record is read */
DBUG_RETURN(0);
}
}
fast_ma_writeinfo(info); /* No such record */
DBUG_RETURN(my_errno);
} | O0 | c | ma_read_static_record:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $-0x1, -0x20(%rbp)
je 0x739c0
movq -0x10(%rbp), %rax
movl 0x61c(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x7391d
movq -0x10(%rbp), %rax
movq 0x4b8(%rax), %rax
cmpq -0x20(%rbp), %rax
ja 0x7391d
movq -0x10(%rbp), %rdi
addq $0x4b8, %rdi # imm = 0x4B8
movl $0x1, %esi
callq 0xe0bb0
cmpl $0x0, %eax
je 0x7391d
jmp 0x7390e
callq 0xf6090
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x739e7
movq -0x10(%rbp), %rax
movl $0x1, 0x598(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x6e0(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movq 0x398(%rcx), %rdx
movq -0x20(%rbp), %rcx
movl $0x4, %r8d
callq *%rax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0x739be
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x7b8(%rax)
jne 0x7397f
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x35c40
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x739a2
jmp 0x7398a
jmp 0x7398c
jmp 0x7398e
callq 0xf6090
movl $0x86, (%rax)
movl $0x86, -0x4(%rbp)
jmp 0x739e7
movq -0x10(%rbp), %rax
movl 0x624(%rax), %ecx
orl $0x2, %ecx
movl %ecx, 0x624(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x739e7
jmp 0x739c0
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x7b8(%rax)
jne 0x739db
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x35c40
jmp 0x739dd
callq 0xf6090
movl (%rax), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
| _ma_read_static_record:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
cmp [rbp+var_20], 0FFFFFFFFFFFFFFFFh
jz loc_739C0
mov rax, [rbp+var_10]
mov eax, [rax+61Ch]
and eax, 10h
cmp eax, 0
jz short loc_7391D
mov rax, [rbp+var_10]
mov rax, [rax+4B8h]
cmp rax, [rbp+var_20]
ja short loc_7391D
mov rdi, [rbp+var_10]
add rdi, 4B8h
mov esi, 1
call my_b_flush_io_cache
cmp eax, 0
jz short loc_7391D
jmp short $+2
loc_7390E:
call _my_thread_var
mov eax, [rax]
mov [rbp+var_4], eax
jmp loc_739E7
loc_7391D:
mov rax, [rbp+var_10]
mov dword ptr [rax+598h], 1
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+6E0h]
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
mov rdx, [rcx+398h]
mov rcx, [rbp+var_20]
mov r8d, 4
call rax
mov [rbp+var_24], eax
cmp [rbp+var_24], 0
jnz short loc_739BE
mov rax, [rbp+var_10]
mov rax, [rax]
cmp dword ptr [rax+7B8h], 0
jnz short loc_7397F
mov rdi, [rbp+var_10]
xor esi, esi
call _ma_writeinfo
loc_7397F:
mov rax, [rbp+var_18]
cmp byte ptr [rax], 0
jnz short loc_739A2
jmp short $+2
loc_7398A:
jmp short $+2
loc_7398C:
jmp short $+2
loc_7398E:
call _my_thread_var
mov dword ptr [rax], 86h
mov [rbp+var_4], 86h
jmp short loc_739E7
loc_739A2:
mov rax, [rbp+var_10]
mov ecx, [rax+624h]
or ecx, 2
mov [rax+624h], ecx
mov [rbp+var_4], 0
jmp short loc_739E7
loc_739BE:
jmp short $+2
loc_739C0:
mov rax, [rbp+var_10]
mov rax, [rax]
cmp dword ptr [rax+7B8h], 0
jnz short loc_739DB
mov rdi, [rbp+var_10]
xor esi, esi
call _ma_writeinfo
loc_739DB:
jmp short $+2
loc_739DD:
call _my_thread_var
mov eax, [rax]
mov [rbp+var_4], eax
loc_739E7:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long ma_read_static_record(long long a1, const char *a2, unsigned long long a3)
{
char *v5; // [rsp+18h] [rbp-18h]
long long v6; // [rsp+20h] [rbp-10h]
v6 = a1;
v5 = (char *)a2;
if ( a3 == -1LL )
goto LABEL_17;
if ( (*(_DWORD *)(a1 + 1564) & 0x10) != 0 && *(_QWORD *)(a1 + 1208) <= a3 )
{
a1 += 1208LL;
a2 = (_BYTE *)(&dword_0 + 1);
if ( (unsigned int)my_b_flush_io_cache(v6 + 1208, 1LL) )
return *(unsigned int *)my_thread_var(a1, a2);
}
*(_DWORD *)(v6 + 1432) = 1;
a1 = v6;
a2 = v5;
if ( (*(unsigned int ( **)(long long, char *, _QWORD, unsigned long long, long long))(*(_QWORD *)v6 + 1760LL))(
v6,
v5,
*(_QWORD *)(*(_QWORD *)v6 + 920LL),
a3,
4LL) )
{
LABEL_17:
if ( !*(_DWORD *)(*(_QWORD *)v6 + 1976LL) )
{
a1 = v6;
a2 = 0LL;
ma_writeinfo((long long *)v6, 0);
}
return *(unsigned int *)my_thread_var(a1, a2);
}
if ( !*(_DWORD *)(*(_QWORD *)v6 + 1976LL) )
{
a1 = v6;
a2 = 0LL;
ma_writeinfo((long long *)v6, 0);
}
if ( *v5 )
{
*(_DWORD *)(v6 + 1572) |= 2u;
return 0;
}
else
{
*(_DWORD *)my_thread_var(a1, a2) = 134;
return 134;
}
}
| _ma_read_static_record:
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
CMP qword ptr [RBP + -0x20],-0x1
JZ 0x001739c0
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x61c]
AND EAX,0x10
CMP EAX,0x0
JZ 0x0017391d
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x4b8]
CMP RAX,qword ptr [RBP + -0x20]
JA 0x0017391d
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x4b8
MOV ESI,0x1
CALL 0x001e0bb0
CMP EAX,0x0
JZ 0x0017391d
JMP 0x0017390e
LAB_0017390e:
CALL 0x001f6090
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001739e7
LAB_0017391d:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x598],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x6e0]
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
MOV RDX,qword ptr [RCX + 0x398]
MOV RCX,qword ptr [RBP + -0x20]
MOV R8D,0x4
CALL RAX
MOV dword ptr [RBP + -0x24],EAX
CMP dword ptr [RBP + -0x24],0x0
JNZ 0x001739be
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX + 0x7b8],0x0
JNZ 0x0017397f
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
CALL 0x00135c40
LAB_0017397f:
MOV RAX,qword ptr [RBP + -0x18]
CMP byte ptr [RAX],0x0
JNZ 0x001739a2
JMP 0x0017398a
LAB_0017398a:
JMP 0x0017398c
LAB_0017398c:
JMP 0x0017398e
LAB_0017398e:
CALL 0x001f6090
MOV dword ptr [RAX],0x86
MOV dword ptr [RBP + -0x4],0x86
JMP 0x001739e7
LAB_001739a2:
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x624]
OR ECX,0x2
MOV dword ptr [RAX + 0x624],ECX
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001739e7
LAB_001739be:
JMP 0x001739c0
LAB_001739c0:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX + 0x7b8],0x0
JNZ 0x001739db
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
CALL 0x00135c40
LAB_001739db:
JMP 0x001739dd
LAB_001739dd:
CALL 0x001f6090
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x4],EAX
LAB_001739e7:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 _ma_read_static_record(long *param_1,char *param_2,ulong param_3)
{
int iVar1;
int4 *puVar2;
if (param_3 != 0xffffffffffffffff) {
if ((((*(uint *)((long)param_1 + 0x61c) & 0x10) != 0) && ((ulong)param_1[0x97] <= param_3)) &&
(iVar1 = my_b_flush_io_cache(param_1 + 0x97,1), iVar1 != 0)) {
puVar2 = (int4 *)_my_thread_var();
return *puVar2;
}
*(int4 *)(param_1 + 0xb3) = 1;
iVar1 = (**(code **)(*param_1 + 0x6e0))
(param_1,param_2,*(int8 *)(*param_1 + 0x398),param_3,4);
if (iVar1 == 0) {
if (*(int *)(*param_1 + 0x7b8) == 0) {
_ma_writeinfo(param_1,0);
}
if (*param_2 == '\0') {
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x86;
return 0x86;
}
*(uint *)((long)param_1 + 0x624) = *(uint *)((long)param_1 + 0x624) | 2;
return 0;
}
}
if (*(int *)(*param_1 + 0x7b8) == 0) {
_ma_writeinfo(param_1,0);
}
puVar2 = (int4 *)_my_thread_var();
return *puVar2;
}
|
|
6,166 | minja::Context::get(minja::Value const&) | llama.cpp/common/minja/minja.hpp | virtual Value get(const Value & key) {
if (values_.contains(key)) return values_.at(key);
if (parent_) return parent_->get(key);
return Value();
} | O3 | cpp | minja::Context::get(minja::Value const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x18(%rsi), %r12
movq %r12, %rdi
movq %rdx, %rsi
callq 0xc39da
testb %al, %al
je 0xc3806
movq %r12, %rdi
movq %r14, %rsi
callq 0xc3c26
movq %rbx, %rdi
movq %rax, %rsi
callq 0xc1568
jmp 0xc3859
movq 0x68(%r15), %rsi
testq %rsi, %rsi
je 0xc381d
movq (%rsi), %rax
movq %rbx, %rdi
movq %r14, %rdx
callq *0x10(%rax)
jmp 0xc3859
leaq 0x40(%rbx), %r14
movq $0x0, 0x48(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x30(%rbx)
movb $0x0, 0x40(%rbx)
movq %r14, %rdi
movl $0x1, %esi
callq 0x88a76
movq %r14, %rdi
movl $0x1, %esi
callq 0x88a76
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| _ZN5minja7Context3getERKNS_5ValueE:
push r15
push r14
push r12
push rbx
push rax
mov r14, rdx
mov r15, rsi
mov rbx, rdi
lea r12, [rsi+18h]
mov rdi, r12; this
mov rsi, rdx; minja::Value *
call _ZNK5minja5Value8containsERKS0_; minja::Value::contains(minja::Value const&)
test al, al
jz short loc_C3806
mov rdi, r12; this
mov rsi, r14; minja::Value *
call _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&)
mov rdi, rbx; this
mov rsi, rax; minja::Value *
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
jmp short loc_C3859
loc_C3806:
mov rsi, [r15+68h]
test rsi, rsi
jz short loc_C381D
mov rax, [rsi]
mov rdi, rbx
mov rdx, r14
call qword ptr [rax+10h]
jmp short loc_C3859
loc_C381D:
lea r14, [rbx+40h]
mov qword ptr [rbx+48h], 0
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
movups xmmword ptr [rbx+10h], xmm0
movups xmmword ptr [rbx+20h], xmm0
movups xmmword ptr [rbx+30h], xmm0
mov byte ptr [rbx+40h], 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)
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_C3859:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| minja::Context * minja::Context::get(minja::Context *this, const minja::Value *a2, const minja::Value *a3)
{
const minja::Value *v4; // rax
long long v5; // rsi
if ( (unsigned __int8)minja::Value::contains((const minja::Value *)((char *)a2 + 24), a3) )
{
v4 = (const minja::Value *)minja::Value::at((const minja::Value *)((char *)a2 + 24), a3);
minja::Value::Value(this, v4);
}
else
{
v5 = *((_QWORD *)a2 + 13);
if ( v5 )
{
(*(void ( **)(minja::Context *, long long, const minja::Value *))(*(_QWORD *)v5 + 16LL))(this, v5, a3);
}
else
{
*((_QWORD *)this + 9) = 0LL;
*(_OWORD *)this = 0LL;
*((_OWORD *)this + 1) = 0LL;
*((_OWORD *)this + 2) = 0LL;
*((_OWORD *)this + 3) = 0LL;
*((_BYTE *)this + 64) = 0;
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 *)this + 64);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)this + 64);
}
}
return this;
}
| get:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
LEA R12,[RSI + 0x18]
MOV RDI,R12
MOV RSI,RDX
CALL 0x001c39da
TEST AL,AL
JZ 0x001c3806
MOV RDI,R12
MOV RSI,R14
CALL 0x001c3c26
MOV RDI,RBX
MOV RSI,RAX
CALL 0x001c1568
JMP 0x001c3859
LAB_001c3806:
MOV RSI,qword ptr [R15 + 0x68]
TEST RSI,RSI
JZ 0x001c381d
MOV RAX,qword ptr [RSI]
MOV RDI,RBX
MOV RDX,R14
CALL qword ptr [RAX + 0x10]
JMP 0x001c3859
LAB_001c381d:
LEA R14,[RBX + 0x40]
MOV qword ptr [RBX + 0x48],0x0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
MOVUPS xmmword ptr [RBX + 0x10],XMM0
MOVUPS xmmword ptr [RBX + 0x20],XMM0
MOVUPS xmmword ptr [RBX + 0x30],XMM0
MOV byte ptr [RBX + 0x40],0x0
MOV RDI,R14
MOV ESI,0x1
CALL 0x00188a76
MOV RDI,R14
MOV ESI,0x1
CALL 0x00188a76
LAB_001c3859:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* minja::Context::get(minja::Value const&) */
Value * minja::Context::get(Value *param_1)
{
char cVar1;
Value *pVVar2;
Value *in_RDX;
long in_RSI;
bool bVar3;
cVar1 = Value::contains((Value *)(in_RSI + 0x18),in_RDX);
if (cVar1 == '\0') {
if (*(long **)(in_RSI + 0x68) == (long *)0x0) {
bVar3 = (bool)((char)param_1 + '@');
*(int8 *)(param_1 + 0x48) = 0;
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
*(int8 *)(param_1 + 0x18) = 0;
*(int8 *)(param_1 + 0x20) = 0;
*(int8 *)(param_1 + 0x28) = 0;
*(int8 *)(param_1 + 0x30) = 0;
*(int8 *)(param_1 + 0x38) = 0;
param_1[0x40] = (Value)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(bVar3);
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(bVar3);
}
else {
(**(code **)(**(long **)(in_RSI + 0x68) + 0x10))(param_1);
}
}
else {
pVVar2 = (Value *)Value::at((Value *)(in_RSI + 0x18),in_RDX);
Value::Value(param_1,pVVar2);
}
return param_1;
}
|
|
6,167 | my_fill_ucs2 | eloqsql/strings/ctype-ucs2.c | static void
my_fill_ucs2(CHARSET_INFO *cs __attribute__((unused)),
char *s, size_t l, int fill)
{
DBUG_ASSERT(fill <= 0xFFFF);
#ifdef WAITING_FOR_GCC_VECTORIZATION_BUG_TO_BE_FIXED
/*
This code with int2store() is known to be faster on some processors,
but crashes on other processors due to a possible bug in GCC's
-ftree-vectorization (which is enabled in -O3) in case of
a non-aligned memory. See here for details:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58039
*/
char *last= s + l - 2;
uint16 tmp= (fill >> 8) + ((fill & 0xFF) << 8); /* swap bytes */
DBUG_ASSERT(fill <= 0xFFFF);
for ( ; s <= last; s+= 2)
int2store(s, tmp); /* store little-endian */
#else
for ( ; l >= 2; s[0]= (fill >> 8), s[1]= (fill & 0xFF), s+= 2, l-= 2);
#endif
} | O0 | c | my_fill_ucs2:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
jmp 0x624c5
jmp 0x624c7
cmpq $0x2, -0x18(%rbp)
jb 0x62509
jmp 0x624d0
movl -0x1c(%rbp), %eax
sarl $0x8, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movl -0x1c(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x10(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
subq $0x2, %rax
movq %rax, -0x18(%rbp)
jmp 0x624c7
popq %rbp
retq
nopl (%rax,%rax)
| my_fill_ucs2:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
jmp short $+2
loc_624C5:
jmp short $+2
loc_624C7:
cmp [rbp+var_18], 2
jb short loc_62509
jmp short $+2
loc_624D0:
mov eax, [rbp+var_1C]
sar eax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
mov eax, [rbp+var_1C]
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_10]
add rax, 2
mov [rbp+var_10], rax
mov rax, [rbp+var_18]
sub rax, 2
mov [rbp+var_18], rax
jmp short loc_624C7
loc_62509:
pop rbp
retn
| unsigned long long my_fill_ucs2(long long a1, _BYTE *a2, unsigned long long a3, __int16 a4)
{
unsigned long long result; // rax
while ( a3 >= 2 )
{
*a2 = HIBYTE(a4);
a2[1] = a4;
a2 += 2;
result = a3 - 2;
a3 -= 2LL;
}
return result;
}
| my_fill_ucs2:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
JMP 0x001624c5
LAB_001624c5:
JMP 0x001624c7
LAB_001624c7:
CMP qword ptr [RBP + -0x18],0x2
JC 0x00162509
JMP 0x001624d0
LAB_001624d0:
MOV EAX,dword ptr [RBP + -0x1c]
SAR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x1c]
AND EAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x2
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,0x2
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001624c7
LAB_00162509:
POP RBP
RET
|
void my_fill_ucs2(int8 param_1,int1 *param_2,ulong param_3,int4 param_4)
{
ulong local_20;
int1 *local_18;
local_18 = param_2;
for (local_20 = param_3; 1 < local_20; local_20 = local_20 - 2) {
*local_18 = (char)((uint)param_4 >> 8);
local_18[1] = (char)param_4;
local_18 = local_18 + 2;
}
return;
}
|
|
6,168 | google::protobuf::RepeatedField<int>::operator=(google::protobuf::RepeatedField<int>&&) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/repeated_field.h | inline RepeatedField<Element>& RepeatedField<Element>::operator=(
RepeatedField&& other) noexcept {
// We don't just call Swap(&other) here because it would perform 3 copies if
// the two fields are on different arenas.
if (this != &other) {
if (GetOwningArena() != other.GetOwningArena()
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|| GetOwningArena() == nullptr
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
) {
CopyFrom(other);
} else {
InternalSwap(&other);
}
}
return *this;
} | O0 | c | google::protobuf::RepeatedField<int>::operator=(google::protobuf::RepeatedField<int>&&):
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpq 0x18(%rsp), %rax
je 0x190b36
movq 0x10(%rsp), %rdi
callq 0x190990
movq %rax, 0x8(%rsp)
jmp 0x190af0
movq 0x18(%rsp), %rdi
callq 0x190990
movq %rax, (%rsp)
jmp 0x190b00
movq 0x8(%rsp), %rax
movq (%rsp), %rcx
cmpq %rcx, %rax
je 0x190b21
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x1908e0
jmp 0x190b1f
jmp 0x190b34
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x1909e0
jmp 0x190b32
jmp 0x190b34
jmp 0x190b36
movq 0x10(%rsp), %rax
addq $0x28, %rsp
retq
movq %rax, %rdi
callq 0x9cf00
nopl (%rax,%rax)
| |||||
6,169 | google::protobuf::RepeatedField<int>::operator=(google::protobuf::RepeatedField<int>&&) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/repeated_field.h | inline RepeatedField<Element>& RepeatedField<Element>::operator=(
RepeatedField&& other) noexcept {
// We don't just call Swap(&other) here because it would perform 3 copies if
// the two fields are on different arenas.
if (this != &other) {
if (GetOwningArena() != other.GetOwningArena()
#ifdef PROTOBUF_FORCE_COPY_IN_MOVE
|| GetOwningArena() == nullptr
#endif // !PROTOBUF_FORCE_COPY_IN_MOVE
) {
CopyFrom(other);
} else {
InternalSwap(&other);
}
}
return *this;
} | O3 | c | google::protobuf::RepeatedField<int>::operator=(google::protobuf::RepeatedField<int>&&):
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq %rsi, %rdi
je 0x8192b
movq %rsi, %r14
leaq 0x8(%rbx), %rax
movq 0x8(%rbx), %rcx
addq $-0x8, %rcx
cmpl $0x0, 0x4(%rbx)
cmoveq %rax, %rcx
movq (%rcx), %rax
leaq 0x8(%rsi), %rcx
movq 0x8(%rsi), %rdx
addq $-0x8, %rdx
cmpl $0x0, 0x4(%rsi)
cmoveq %rcx, %rdx
cmpq (%rdx), %rax
je 0x8191d
movl $0x0, (%rbx)
movl (%r14), %esi
testl %esi, %esi
je 0x8192b
movq %rbx, %rdi
callq 0x816ce
movl (%r14), %eax
movq 0x8(%rbx), %rdi
addl %eax, (%rbx)
movq 0x8(%r14), %rsi
movslq (%r14), %rdx
shlq $0x3, %rdx
callq 0x2ceb0
jmp 0x8192b
movups (%rbx), %xmm0
movups (%r14), %xmm1
movups %xmm1, (%rbx)
movups %xmm0, (%r14)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rdi
callq 0x33bfc
| _ZN6google8protobuf13RepeatedFieldImEaSEOS2_:
push r14
push rbx
push rax
mov rbx, rdi
cmp rdi, rsi
jz short loc_8192B
mov r14, rsi
lea rax, [rbx+8]
mov rcx, [rbx+8]
add rcx, 0FFFFFFFFFFFFFFF8h
cmp dword ptr [rbx+4], 0
cmovz rcx, rax
mov rax, [rcx]
lea rcx, [rsi+8]
mov rdx, [rsi+8]
add rdx, 0FFFFFFFFFFFFFFF8h
cmp dword ptr [rsi+4], 0
cmovz rdx, rcx
cmp rax, [rdx]
jz short loc_8191D
mov dword ptr [rbx], 0
mov esi, [r14]
test esi, esi
jz short loc_8192B
mov rdi, rbx
call _ZN6google8protobuf13RepeatedFieldImE7ReserveEi; google::protobuf::RepeatedField<ulong>::Reserve(int)
mov eax, [r14]
mov rdi, [rbx+8]
add [rbx], eax
mov rsi, [r14+8]
movsxd rdx, dword ptr [r14]
shl rdx, 3
call _memcpy
jmp short loc_8192B
loc_8191D:
movups xmm0, xmmword ptr [rbx]
movups xmm1, xmmword ptr [r14]
movups xmmword ptr [rbx], xmm1
movups xmmword ptr [r14], xmm0
loc_8192B:
mov rax, rbx
add rsp, 8
pop rbx
pop r14
retn
mov rdi, rax
call __clang_call_terminate
| __int128 * google::protobuf::RepeatedField<unsigned long>::operator=(__int128 *a1, __int128 *a2)
{
_QWORD *v4; // rcx
_QWORD *v5; // rdx
int v6; // esi
long long v7; // rdi
__int128 v8; // xmm0
if ( a1 != a2 )
{
v4 = (_QWORD *)(*((_QWORD *)a1 + 1) - 8LL);
if ( !*((_DWORD *)a1 + 1) )
v4 = (_QWORD *)a1 + 1;
v5 = (_QWORD *)(*((_QWORD *)a2 + 1) - 8LL);
if ( !*((_DWORD *)a2 + 1) )
v5 = (_QWORD *)a2 + 1;
if ( *v4 == *v5 )
{
v8 = *a1;
*a1 = *a2;
*a2 = v8;
}
else
{
*(_DWORD *)a1 = 0;
v6 = *(_DWORD *)a2;
if ( v6 )
{
google::protobuf::RepeatedField<unsigned long>::Reserve((int *)a1, v6);
v7 = *((_QWORD *)a1 + 1);
*(_DWORD *)a1 += *(_DWORD *)a2;
memcpy(v7);
}
}
}
return a1;
}
| operator=:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
CMP RDI,RSI
JZ 0x0018192b
MOV R14,RSI
LEA RAX,[RBX + 0x8]
MOV RCX,qword ptr [RBX + 0x8]
ADD RCX,-0x8
CMP dword ptr [RBX + 0x4],0x0
CMOVZ RCX,RAX
MOV RAX,qword ptr [RCX]
LEA RCX,[RSI + 0x8]
MOV RDX,qword ptr [RSI + 0x8]
ADD RDX,-0x8
CMP dword ptr [RSI + 0x4],0x0
CMOVZ RDX,RCX
CMP RAX,qword ptr [RDX]
JZ 0x0018191d
MOV dword ptr [RBX],0x0
MOV ESI,dword ptr [R14]
TEST ESI,ESI
JZ 0x0018192b
LAB_001818fa:
MOV RDI,RBX
CALL 0x001816ce
LAB_00181902:
MOV EAX,dword ptr [R14]
MOV RDI,qword ptr [RBX + 0x8]
ADD dword ptr [RBX],EAX
MOV RSI,qword ptr [R14 + 0x8]
MOVSXD RDX,dword ptr [R14]
SHL RDX,0x3
CALL 0x0012ceb0
JMP 0x0018192b
LAB_0018191d:
MOVUPS XMM0,xmmword ptr [RBX]
MOVUPS XMM1,xmmword ptr [R14]
MOVUPS xmmword ptr [RBX],XMM1
MOVUPS xmmword ptr [R14],XMM0
LAB_0018192b:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* google::protobuf::RepeatedField<unsigned
long>::TEMPNAMEPLACEHOLDERVALUE(google::protobuf::RepeatedField<unsigned long>&&) */
RepeatedField<unsigned_long> * __thiscall
google::protobuf::RepeatedField<unsigned_long>::operator=
(RepeatedField<unsigned_long> *this,RepeatedField *param_1)
{
int8 uVar1;
int8 uVar2;
int8 uVar3;
RepeatedField<unsigned_long> *pRVar4;
RepeatedField *pRVar5;
if (this != (RepeatedField<unsigned_long> *)param_1) {
pRVar4 = (RepeatedField<unsigned_long> *)(*(long *)(this + 8) + -8);
if (*(int *)(this + 4) == 0) {
pRVar4 = this + 8;
}
pRVar5 = (RepeatedField *)(*(long *)(param_1 + 8) + -8);
if (*(int *)(param_1 + 4) == 0) {
pRVar5 = param_1 + 8;
}
if (*(long *)pRVar4 == *(long *)pRVar5) {
uVar1 = *(int8 *)this;
uVar2 = *(int8 *)(this + 8);
uVar3 = *(int8 *)(param_1 + 8);
*(int8 *)this = *(int8 *)param_1;
*(int8 *)(this + 8) = uVar3;
*(int8 *)param_1 = uVar1;
*(int8 *)(param_1 + 8) = uVar2;
}
else {
*(int4 *)this = 0;
if (*(int *)param_1 != 0) {
/* try { // try from 001818fa to 00181901 has its CatchHandler @ 00181936 */
Reserve(this,*(int *)param_1);
*(int *)this = *(int *)this + *(int *)param_1;
memcpy(*(void **)(this + 8),*(void **)(param_1 + 8),(long)*(int *)param_1 << 3);
}
}
}
return this;
}
|
|
6,170 | StableDiffusionGGML::compute_first_stage(ggml_context*, ggml_tensor*, bool) | 7CodeWizard[P]stablediffusion/stable-diffusion.cpp | ggml_tensor* compute_first_stage(ggml_context* work_ctx, ggml_tensor* x, bool decode) {
int64_t W = x->ne[0];
int64_t H = x->ne[1];
ggml_tensor* result = ggml_new_tensor_3d(work_ctx, GGML_TYPE_F32,
decode ? (W * 8) : (W / 8), // width
decode ? (H * 8) : (H / 8), // height
decode ? 3 : (use_tiny_autoencoder ? 4 : 8)); // channels
int64_t t0 = ggml_time_ms();
if (!use_tiny_autoencoder) {
if (decode) {
ggml_tensor_scale(x, 1.0f / scale_factor);
} else {
ggml_tensor_scale_input(x);
}
if (vae_tiling && decode) { // TODO: support tiling vae encode
// split latent in 32x32 tiles and compute in several steps
auto on_tiling = [&](ggml_tensor* in, ggml_tensor* out, bool init) {
if (init) {
first_stage_model.alloc_compute_buffer(in, decode);
} else {
first_stage_model.compute(out, n_threads, in, decode);
}
};
sd_tiling(x, result, 8, 32, 0.5f, on_tiling);
} else {
first_stage_model.alloc_compute_buffer(x, decode);
first_stage_model.compute(result, n_threads, x, decode);
}
first_stage_model.free_compute_buffer();
if (decode) {
ggml_tensor_scale_output(result);
}
} else {
if (vae_tiling && decode) { // TODO: support tiling vae encode
// split latent in 64x64 tiles and compute in several steps
auto on_tiling = [&](ggml_tensor* in, ggml_tensor* out, bool init) {
if (init) {
tae_first_stage.alloc_compute_buffer(in, decode);
} else {
tae_first_stage.compute(out, n_threads, in, decode);
}
};
sd_tiling(x, result, 8, 64, 0.5f, on_tiling);
} else {
tae_first_stage.alloc_compute_buffer(x, decode);
tae_first_stage.compute(result, n_threads, x, decode);
}
tae_first_stage.free_compute_buffer();
}
int64_t t1 = ggml_time_ms();
LOG_DEBUG("computing vae [mode: %s] graph completed, taking %.2fs", decode ? "DECODE" : "ENCODE", (t1 - t0) * 1.0f / 1000);
if (decode) {
ggml_tensor_clamp(result, 0.0f, 1.0f);
}
return result;
} | O0 | cpp | StableDiffusionGGML::compute_first_stage(ggml_context*, ggml_tensor*, bool):
subq $0x128, %rsp # imm = 0x128
movb %cl, %al
movq %rdi, 0x120(%rsp)
movq %rsi, 0x118(%rsp)
movq %rdx, 0x110(%rsp)
andb $0x1, %al
movb %al, 0x10f(%rsp)
movq 0x120(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x110(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x100(%rsp)
movq 0x110(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0xf8(%rsp)
movq 0x118(%rsp), %rax
movq %rax, 0x68(%rsp)
testb $0x1, 0x10f(%rsp)
je 0x84489
movq 0x100(%rsp), %rax
shlq $0x3, %rax
movq %rax, 0x58(%rsp)
jmp 0x844a0
movq 0x100(%rsp), %rax
movl $0x8, %ecx
cqto
idivq %rcx
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x50(%rsp)
testb $0x1, 0x10f(%rsp)
je 0x844c7
movq 0xf8(%rsp), %rax
shlq $0x3, %rax
movq %rax, 0x48(%rsp)
jmp 0x844de
movq 0xf8(%rsp), %rax
movl $0x8, %ecx
cqto
idivq %rcx
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x40(%rsp)
testb $0x1, 0x10f(%rsp)
je 0x844fd
movl $0x3, %eax
movl %eax, 0x3c(%rsp)
jmp 0x8451c
movq 0x60(%rsp), %rax
movb 0x1ec0(%rax), %dl
movl $0x8, %eax
movl $0x4, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, 0x3c(%rsp)
movq 0x40(%rsp), %rcx
movq 0x50(%rsp), %rdx
movq 0x68(%rsp), %rdi
movl 0x3c(%rsp), %eax
movslq %eax, %r8
xorl %esi, %esi
callq 0x11c900
movq %rax, 0xf0(%rsp)
callq 0x11a8c0
movq %rax, %rcx
movq 0x60(%rsp), %rax
movq %rcx, 0xe8(%rsp)
testb $0x1, 0x1ec0(%rax)
jne 0x846ef
testb $0x1, 0x10f(%rsp)
je 0x8458e
movq 0x60(%rsp), %rax
movq 0x110(%rsp), %rdi
movss 0xf8a82(%rip), %xmm0 # 0x17d004
divss 0x1c(%rax), %xmm0
callq 0x36650
jmp 0x8459b
movq 0x110(%rsp), %rdi
callq 0x36980
movq 0x60(%rsp), %rax
testb $0x1, 0x1ec1(%rax)
je 0x84669
testb $0x1, 0x10f(%rsp)
je 0x84669
movq 0x60(%rsp), %rax
movq %rax, 0xd8(%rsp)
leaq 0x10f(%rsp), %rax
movq %rax, 0xe0(%rsp)
movq 0x110(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0xf0(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0xb8(%rsp), %rdi
movq %rdi, 0x30(%rsp)
leaq 0xd8(%rsp), %rsi
callq 0x848e0
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %r8
movl $0x8, %edx
movl $0x20, %ecx
movss 0xf89eb(%rip), %xmm0 # 0x17d018
callq 0x36a10
jmp 0x84634
leaq 0xb8(%rsp), %rdi
callq 0x84970
jmp 0x846c2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x84970
jmp 0x848cc
movq 0x60(%rsp), %rdi
addq $0x13c0, %rdi # imm = 0x13C0
movq 0x110(%rsp), %rsi
movb 0x10f(%rsp), %al
andb $0x1, %al
movzbl %al, %edx
callq 0x84980
movq 0x60(%rsp), %rax
movq %rax, %rdi
addq $0x13c0, %rdi # imm = 0x13C0
movq 0xf0(%rsp), %rsi
movl 0x18(%rax), %edx
movq 0x110(%rsp), %rcx
movb 0x10f(%rsp), %al
andb $0x1, %al
movzbl %al, %r8d
callq 0x84a10
movq 0x60(%rsp), %rdi
addq $0x13c0, %rdi # imm = 0x13C0
callq 0x65fd0
testb $0x1, 0x10f(%rsp)
je 0x846ea
movq 0xf0(%rsp), %rdi
callq 0x36ff0
jmp 0x8481e
movq 0x60(%rsp), %rax
testb $0x1, 0x1ec1(%rax)
je 0x847b4
testb $0x1, 0x10f(%rsp)
je 0x847b4
movq 0x60(%rsp), %rax
movq %rax, 0x98(%rsp)
leaq 0x10f(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0x110(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0xf0(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x78(%rsp), %rdi
movq %rdi, 0x18(%rsp)
leaq 0x98(%rsp), %rsi
callq 0x84ac0
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %r8
movl $0x8, %edx
movl $0x40, %ecx
movss 0xf889a(%rip), %xmm0 # 0x17d018
callq 0x36a10
jmp 0x84785
leaq 0x78(%rsp), %rdi
callq 0x84970
jmp 0x8480d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
leaq 0x78(%rsp), %rdi
callq 0x84970
jmp 0x848cc
movq 0x60(%rsp), %rdi
addq $0x1fa0, %rdi # imm = 0x1FA0
movq 0x110(%rsp), %rsi
movb 0x10f(%rsp), %al
andb $0x1, %al
movzbl %al, %edx
callq 0x84b50
movq 0x60(%rsp), %rax
movq %rax, %rdi
addq $0x1fa0, %rdi # imm = 0x1FA0
movq 0xf0(%rsp), %rsi
movl 0x18(%rax), %edx
movq 0x110(%rsp), %rcx
movb 0x10f(%rsp), %al
andb $0x1, %al
movzbl %al, %r8d
callq 0x84be0
movq 0x60(%rsp), %rdi
addq $0x1fa0, %rdi # imm = 0x1FA0
callq 0x65fd0
callq 0x11a8c0
movq %rax, 0x70(%rsp)
testb $0x1, 0x10f(%rsp)
je 0x8483f
leaq 0xfc1e6(%rip), %rax # 0x180a1f
movq %rax, (%rsp)
jmp 0x8484c
leaq 0xfc1e0(%rip), %rax # 0x180a26
movq %rax, (%rsp)
jmp 0x8484c
movq (%rsp), %r8
movq 0x70(%rsp), %rax
subq 0xe8(%rsp), %rax
cvtsi2ss %rax, %xmm0
movss 0xf879a(%rip), %xmm1 # 0x17d004
mulss %xmm1, %xmm0
movss 0xfa96e(%rip), %xmm1 # 0x17f1e4
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
xorl %edi, %edi
leaq 0xfad8a(%rip), %rsi # 0x17f611
movl $0x434, %edx # imm = 0x434
leaq 0xfc155(%rip), %rcx # 0x1809e8
movb $0x1, %al
callq 0xeb5e0
testb $0x1, 0x10f(%rsp)
je 0x848bc
movq 0xf0(%rsp), %rdi
xorps %xmm0, %xmm0
movss 0xf874d(%rip), %xmm1 # 0x17d004
callq 0x37080
movq 0xf0(%rsp), %rax
addq $0x128, %rsp # imm = 0x128
retq
movq 0xb0(%rsp), %rdi
callq 0xbd30
nopl (%rax)
| _ZN19StableDiffusionGGML19compute_first_stageEP12ggml_contextP11ggml_tensorb:
sub rsp, 128h
mov al, cl
mov [rsp+128h+var_8], rdi
mov [rsp+128h+var_10], rsi
mov [rsp+128h+var_18], rdx
and al, 1
mov [rsp+128h+var_19], al
mov rax, [rsp+128h+var_8]
mov [rsp+128h+var_C8], rax
mov rax, [rsp+128h+var_18]
mov rax, [rax+10h]
mov [rsp+128h+var_28], rax
mov rax, [rsp+128h+var_18]
mov rax, [rax+18h]
mov [rsp+128h+var_30], rax
mov rax, [rsp+128h+var_10]
mov [rsp+128h+var_C0], rax
test [rsp+128h+var_19], 1
jz short loc_84489
mov rax, [rsp+128h+var_28]
shl rax, 3
mov [rsp+128h+var_D0], rax
jmp short loc_844A0
loc_84489:
mov rax, [rsp+128h+var_28]
mov ecx, 8
cqo
idiv rcx
mov [rsp+128h+var_D0], rax
loc_844A0:
mov rax, [rsp+128h+var_D0]
mov [rsp+128h+var_D8], rax
test [rsp+128h+var_19], 1
jz short loc_844C7
mov rax, [rsp+128h+var_30]
shl rax, 3
mov [rsp+128h+var_E0], rax
jmp short loc_844DE
loc_844C7:
mov rax, [rsp+128h+var_30]
mov ecx, 8
cqo
idiv rcx
mov [rsp+128h+var_E0], rax
loc_844DE:
mov rax, [rsp+128h+var_E0]
mov [rsp+128h+var_E8], rax
test [rsp+128h+var_19], 1
jz short loc_844FD
mov eax, 3
mov [rsp+128h+var_EC], eax
jmp short loc_8451C
loc_844FD:
mov rax, [rsp+128h+var_C8]
mov dl, [rax+1EC0h]
mov eax, 8
mov ecx, 4
test dl, 1
cmovnz eax, ecx
mov [rsp+128h+var_EC], eax
loc_8451C:
mov rcx, [rsp+128h+var_E8]
mov rdx, [rsp+128h+var_D8]
mov rdi, [rsp+128h+var_C0]
mov eax, [rsp+128h+var_EC]
movsxd r8, eax
xor esi, esi
call ggml_new_tensor_3d
mov [rsp+128h+var_38], rax
call ggml_time_ms
mov rcx, rax
mov rax, [rsp+128h+var_C8]
mov [rsp+128h+var_40], rcx
test byte ptr [rax+1EC0h], 1
jnz loc_846EF
test [rsp+128h+var_19], 1
jz short loc_8458E
mov rax, [rsp+128h+var_C8]
mov rdi, [rsp+128h+var_18]
movss xmm0, cs:flt_17D004
divss xmm0, dword ptr [rax+1Ch]
call _ZL17ggml_tensor_scaleP11ggml_tensorf; ggml_tensor_scale(ggml_tensor *,float)
jmp short loc_8459B
loc_8458E:
mov rdi, [rsp+128h+var_18]
call _ZL23ggml_tensor_scale_inputP11ggml_tensor; ggml_tensor_scale_input(ggml_tensor *)
loc_8459B:
mov rax, [rsp+128h+var_C8]
test byte ptr [rax+1EC1h], 1
jz loc_84669
test [rsp+128h+var_19], 1
jz loc_84669
mov rax, [rsp+128h+var_C8]
mov [rsp+128h+var_50], rax
lea rax, [rsp+128h+var_19]
mov [rsp+128h+var_48], rax
mov rax, [rsp+128h+var_18]
mov [rsp+128h+var_108], rax
mov rax, [rsp+128h+var_38]
mov [rsp+128h+var_100], rax
lea rdi, [rsp+128h+var_70]
mov [rsp+128h+var_F8], rdi
lea rsi, [rsp+128h+var_50]
call _ZNSt8functionIFvP11ggml_tensorS1_bEEC2IRZN19StableDiffusionGGML19compute_first_stageEP12ggml_contextS1_bEUlS1_S1_bE_vEEOT_; std::function<void ()(ggml_tensor *,ggml_tensor *,bool)>::function<StableDiffusionGGML::compute_first_stage(ggml_context *,ggml_tensor *,bool)::{lambda(ggml_tensor *,ggml_tensor *,bool)#1} &,void>(StableDiffusionGGML::compute_first_stage(ggml_context *,ggml_tensor *,bool)::{lambda(ggml_tensor *,ggml_tensor *,bool)#1} &)
mov rdi, [rsp+128h+var_108]
mov rsi, [rsp+128h+var_100]
mov r8, [rsp+128h+var_F8]
mov edx, 8
mov ecx, 20h ; ' '
movss xmm0, cs:dword_17D018
call _ZL9sd_tilingP11ggml_tensorS0_iifSt8functionIFvS0_S0_bEE; sd_tiling(ggml_tensor *,ggml_tensor *,int,int,float,std::function<void ()(ggml_tensor *,ggml_tensor *,bool)>)
jmp short $+2
loc_84634:
lea rdi, [rsp+128h+var_70]
call _ZNSt8functionIFvP11ggml_tensorS1_bEED2Ev; std::function<void ()(ggml_tensor *,ggml_tensor *,bool)>::~function()
jmp short loc_846C2
mov rcx, rax
mov eax, edx
mov [rsp+arg_A8], rcx
mov [rsp+arg_A4], eax
lea rdi, [rsp+arg_B0]
call _ZNSt8functionIFvP11ggml_tensorS1_bEED2Ev; std::function<void ()(ggml_tensor *,ggml_tensor *,bool)>::~function()
jmp loc_848CC
loc_84669:
mov rdi, [rsp+128h+var_C8]
add rdi, 13C0h
mov rsi, [rsp+128h+var_18]
mov al, [rsp+128h+var_19]
and al, 1
movzx edx, al
call _ZN13AutoEncoderKL20alloc_compute_bufferEP11ggml_tensorb; AutoEncoderKL::alloc_compute_buffer(ggml_tensor *,bool)
mov rax, [rsp+128h+var_C8]
mov rdi, rax
add rdi, 13C0h
mov rsi, [rsp+128h+var_38]
mov edx, [rax+18h]
mov rcx, [rsp+128h+var_18]
mov al, [rsp+128h+var_19]
and al, 1
movzx r8d, al
call _ZN13AutoEncoderKL7computeEP11ggml_tensoriS1_b; AutoEncoderKL::compute(ggml_tensor *,int,ggml_tensor *,bool)
loc_846C2:
mov rdi, [rsp+128h+var_C8]
add rdi, 13C0h; this
call _ZN10GGMLModule19free_compute_bufferEv; GGMLModule::free_compute_buffer(void)
test [rsp+128h+var_19], 1
jz short loc_846EA
mov rdi, [rsp+128h+var_38]
call _ZL24ggml_tensor_scale_outputP11ggml_tensor; ggml_tensor_scale_output(ggml_tensor *)
loc_846EA:
jmp loc_8481E
loc_846EF:
mov rax, [rsp+128h+var_C8]
test byte ptr [rax+1EC1h], 1
jz loc_847B4
test [rsp+128h+var_19], 1
jz loc_847B4
mov rax, [rsp+128h+var_C8]
mov [rsp+128h+var_90], rax
lea rax, [rsp+128h+var_19]
mov [rsp+128h+var_88], rax
mov rax, [rsp+128h+var_18]
mov [rsp+128h+var_120], rax
mov rax, [rsp+128h+var_38]
mov [rsp+128h+var_118], rax
lea rdi, [rsp+128h+var_B0]
mov [rsp+128h+var_110], rdi
lea rsi, [rsp+128h+var_90]
call _ZNSt8functionIFvP11ggml_tensorS1_bEEC2IRZN19StableDiffusionGGML19compute_first_stageEP12ggml_contextS1_bEUlS1_S1_bE0_vEEOT_; std::function<void ()(ggml_tensor *,ggml_tensor *,bool)>::function<StableDiffusionGGML::compute_first_stage(ggml_context *,ggml_tensor *,bool)::{lambda(ggml_tensor *,ggml_tensor *,bool)#2} &,void>(StableDiffusionGGML::compute_first_stage(ggml_context *,ggml_tensor *,bool)::{lambda(ggml_tensor *,ggml_tensor *,bool)#2} &)
mov rdi, [rsp+128h+var_120]
mov rsi, [rsp+128h+var_118]
mov r8, [rsp+128h+var_110]
mov edx, 8
mov ecx, 40h ; '@'
movss xmm0, cs:dword_17D018
call _ZL9sd_tilingP11ggml_tensorS0_iifSt8functionIFvS0_S0_bEE; sd_tiling(ggml_tensor *,ggml_tensor *,int,int,float,std::function<void ()(ggml_tensor *,ggml_tensor *,bool)>)
jmp short $+2
loc_84785:
lea rdi, [rsp+128h+var_B0]
call _ZNSt8functionIFvP11ggml_tensorS1_bEED2Ev; std::function<void ()(ggml_tensor *,ggml_tensor *,bool)>::~function()
jmp short loc_8480D
mov rcx, rax
mov eax, edx
mov [rsp+arg_A8], rcx
mov [rsp+arg_A4], eax
lea rdi, [rsp+arg_70]
call _ZNSt8functionIFvP11ggml_tensorS1_bEED2Ev; std::function<void ()(ggml_tensor *,ggml_tensor *,bool)>::~function()
jmp loc_848CC
loc_847B4:
mov rdi, [rsp+128h+var_C8]
add rdi, 1FA0h
mov rsi, [rsp+128h+var_18]
mov al, [rsp+128h+var_19]
and al, 1
movzx edx, al
call _ZN15TinyAutoEncoder20alloc_compute_bufferEP11ggml_tensorb; TinyAutoEncoder::alloc_compute_buffer(ggml_tensor *,bool)
mov rax, [rsp+128h+var_C8]
mov rdi, rax
add rdi, 1FA0h
mov rsi, [rsp+128h+var_38]
mov edx, [rax+18h]
mov rcx, [rsp+128h+var_18]
mov al, [rsp+128h+var_19]
and al, 1
movzx r8d, al
call _ZN15TinyAutoEncoder7computeEP11ggml_tensoriS1_b; TinyAutoEncoder::compute(ggml_tensor *,int,ggml_tensor *,bool)
loc_8480D:
mov rdi, [rsp+128h+var_C8]
add rdi, 1FA0h; this
call _ZN10GGMLModule19free_compute_bufferEv; GGMLModule::free_compute_buffer(void)
loc_8481E:
call ggml_time_ms
mov [rsp+128h+var_B8], rax
test [rsp+128h+var_19], 1
jz short loc_8483F
lea rax, aDecode; "DECODE"
mov [rsp+128h+var_128], rax
jmp short loc_8484C
loc_8483F:
lea rax, aEncode; "ENCODE"
mov [rsp+128h+var_128], rax
jmp short $+2
loc_8484C:
mov r8, [rsp+128h+var_128]
mov rax, [rsp+128h+var_B8]
sub rax, [rsp+128h+var_40]
cvtsi2ss xmm0, rax
movss xmm1, cs:flt_17D004
mulss xmm0, xmm1
movss xmm1, cs:dword_17F1E4
divss xmm0, xmm1
cvtss2sd xmm0, xmm0
xor edi, edi
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov edx, 434h
lea rcx, aComputingVaeMo; "computing vae [mode: %s] graph complete"...
mov al, 1
call _Z10log_printf14sd_log_level_tPKciS1_z; log_printf(sd_log_level_t,char const*,int,char const*,...)
test [rsp+128h+var_19], 1
jz short loc_848BC
mov rdi, [rsp+128h+var_38]
xorps xmm0, xmm0
movss xmm1, cs:flt_17D004
call _ZL17ggml_tensor_clampP11ggml_tensorff; ggml_tensor_clamp(ggml_tensor *,float,float)
loc_848BC:
mov rax, [rsp+128h+var_38]
add rsp, 128h
retn
loc_848CC:
mov rdi, [rsp+arg_A8]
call __Unwind_Resume
| long long StableDiffusionGGML::compute_first_stage(long long a1, long long a2, long long a3, char a4, double a5)
{
int v5; // eax
long long v6; // rcx
int v7; // r8d
int v8; // r9d
int v9; // ecx
int v10; // r8d
int v11; // r9d
int v12; // r9d
int v13; // r9d
int v14; // r9d
const char *v16; // [rsp+0h] [rbp-128h]
_QWORD *v17; // [rsp+8h] [rbp-120h]
_QWORD *v18; // [rsp+10h] [rbp-118h]
_QWORD *v19; // [rsp+20h] [rbp-108h]
_QWORD *v20; // [rsp+28h] [rbp-100h]
int v21; // [rsp+3Ch] [rbp-ECh]
long long v22; // [rsp+48h] [rbp-E0h]
long long v23; // [rsp+58h] [rbp-D0h]
_BYTE v24[32]; // [rsp+78h] [rbp-B0h] BYREF
_QWORD v25[4]; // [rsp+98h] [rbp-90h] BYREF
_BYTE v26[32]; // [rsp+B8h] [rbp-70h] BYREF
_QWORD v27[3]; // [rsp+D8h] [rbp-50h] BYREF
_QWORD *v28; // [rsp+F0h] [rbp-38h]
long long v29; // [rsp+F8h] [rbp-30h]
long long v30; // [rsp+100h] [rbp-28h]
char v31; // [rsp+10Fh] [rbp-19h] BYREF
_QWORD *v32; // [rsp+110h] [rbp-18h]
long long v33; // [rsp+118h] [rbp-10h]
long long v34; // [rsp+120h] [rbp-8h]
v34 = a1;
v33 = a2;
v32 = (_QWORD *)a3;
v31 = a4 & 1;
v30 = *(_QWORD *)(a3 + 16);
v29 = *(_QWORD *)(a3 + 24);
if ( (a4 & 1) != 0 )
v23 = 8 * v30;
else
v23 = v30 / 8;
if ( (v31 & 1) != 0 )
v22 = 8 * v29;
else
v22 = v29 / 8;
if ( (v31 & 1) != 0 )
{
v21 = 3;
}
else
{
v5 = 8;
if ( (*(_BYTE *)(a1 + 7872) & 1) != 0 )
v5 = 4;
v21 = v5;
}
v28 = (_QWORD *)ggml_new_tensor_3d(a2, 0LL, v23, v22, v21);
v6 = ggml_time_ms(a5);
v27[2] = v6;
if ( (*(_BYTE *)(a1 + 7872) & 1) != 0 )
{
if ( (*(_BYTE *)(a1 + 7873) & 1) != 0 && (v31 & 1) != 0 )
{
v25[0] = a1;
v25[1] = &v31;
v17 = v32;
v18 = v28;
std::function<void ()(ggml_tensor *,ggml_tensor *,bool)>::function<StableDiffusionGGML::compute_first_stage(ggml_context *,ggml_tensor *,bool)::{lambda(ggml_tensor *,ggml_tensor *,bool)#2} &,void>(
v24,
v25);
*(_QWORD *)&a5 = 1056964608LL;
sd_tiling(v17, v18, 8, 64, (long long)v24, 0.5);
std::function<void ()(ggml_tensor *,ggml_tensor *,bool)>::~function(v24);
}
else
{
TinyAutoEncoder::alloc_compute_buffer(a1 + 8096, (_DWORD)v32, v31 & 1, v6, v7, v8);
TinyAutoEncoder::compute(a1 + 8096, (_DWORD)v28, *(_DWORD *)(a1 + 24), (_DWORD)v32, v31 & 1, v13);
}
GGMLModule::free_compute_buffer((GGMLModule *)(a1 + 8096));
}
else
{
if ( (v31 & 1) != 0 )
{
HIDWORD(a5) = 0;
*(float *)&a5 = 1.0 / *(float *)(a1 + 28);
ggml_tensor_scale((long long)v32, *(float *)&a5);
}
else
{
ggml_tensor_scale_input((long long)v32);
}
if ( (*(_BYTE *)(a1 + 7873) & 1) != 0 && (v31 & 1) != 0 )
{
v27[0] = a1;
v27[1] = &v31;
v19 = v32;
v20 = v28;
std::function<void ()(ggml_tensor *,ggml_tensor *,bool)>::function<StableDiffusionGGML::compute_first_stage(ggml_context *,ggml_tensor *,bool)::{lambda(ggml_tensor *,ggml_tensor *,bool)#1} &,void>(
v26,
v27);
*(_QWORD *)&a5 = 1056964608LL;
sd_tiling(v19, v20, 8, 32, (long long)v26, 0.5);
std::function<void ()(ggml_tensor *,ggml_tensor *,bool)>::~function(v26);
}
else
{
AutoEncoderKL::alloc_compute_buffer(a1 + 5056, (_DWORD)v32, v31 & 1, v9, v10, v11);
AutoEncoderKL::compute(a1 + 5056, (_DWORD)v28, *(_DWORD *)(a1 + 24), (_DWORD)v32, v31 & 1, v12);
}
GGMLModule::free_compute_buffer((GGMLModule *)(a1 + 5056));
if ( (v31 & 1) != 0 )
ggml_tensor_scale_output((long long)v28);
}
ggml_time_ms(a5);
if ( (v31 & 1) != 0 )
v16 = "DECODE";
else
v16 = "ENCODE";
log_printf(
0,
(unsigned int)"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/stable-diffusion.cpp",
1076,
(unsigned int)"computing vae [mode: %s] graph completed, taking %.2fs",
(_DWORD)v16,
v14);
if ( (v31 & 1) != 0 )
ggml_tensor_clamp((long long)v28, 0.0, 1.0);
return (long long)v28;
}
| compute_first_stage:
SUB RSP,0x128
MOV AL,CL
MOV qword ptr [RSP + 0x120],RDI
MOV qword ptr [RSP + 0x118],RSI
MOV qword ptr [RSP + 0x110],RDX
AND AL,0x1
MOV byte ptr [RSP + 0x10f],AL
MOV RAX,qword ptr [RSP + 0x120]
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x110]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x100],RAX
MOV RAX,qword ptr [RSP + 0x110]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0xf8],RAX
MOV RAX,qword ptr [RSP + 0x118]
MOV qword ptr [RSP + 0x68],RAX
TEST byte ptr [RSP + 0x10f],0x1
JZ 0x00184489
MOV RAX,qword ptr [RSP + 0x100]
SHL RAX,0x3
MOV qword ptr [RSP + 0x58],RAX
JMP 0x001844a0
LAB_00184489:
MOV RAX,qword ptr [RSP + 0x100]
MOV ECX,0x8
CQO
IDIV RCX
MOV qword ptr [RSP + 0x58],RAX
LAB_001844a0:
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x50],RAX
TEST byte ptr [RSP + 0x10f],0x1
JZ 0x001844c7
MOV RAX,qword ptr [RSP + 0xf8]
SHL RAX,0x3
MOV qword ptr [RSP + 0x48],RAX
JMP 0x001844de
LAB_001844c7:
MOV RAX,qword ptr [RSP + 0xf8]
MOV ECX,0x8
CQO
IDIV RCX
MOV qword ptr [RSP + 0x48],RAX
LAB_001844de:
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x40],RAX
TEST byte ptr [RSP + 0x10f],0x1
JZ 0x001844fd
MOV EAX,0x3
MOV dword ptr [RSP + 0x3c],EAX
JMP 0x0018451c
LAB_001844fd:
MOV RAX,qword ptr [RSP + 0x60]
MOV DL,byte ptr [RAX + 0x1ec0]
MOV EAX,0x8
MOV ECX,0x4
TEST DL,0x1
CMOVNZ EAX,ECX
MOV dword ptr [RSP + 0x3c],EAX
LAB_0018451c:
MOV RCX,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x50]
MOV RDI,qword ptr [RSP + 0x68]
MOV EAX,dword ptr [RSP + 0x3c]
MOVSXD R8,EAX
XOR ESI,ESI
CALL 0x0021c900
MOV qword ptr [RSP + 0xf0],RAX
CALL 0x0021a8c0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0xe8],RCX
TEST byte ptr [RAX + 0x1ec0],0x1
JNZ 0x001846ef
TEST byte ptr [RSP + 0x10f],0x1
JZ 0x0018458e
MOV RAX,qword ptr [RSP + 0x60]
MOV RDI,qword ptr [RSP + 0x110]
MOVSS XMM0,dword ptr [0x0027d004]
DIVSS XMM0,dword ptr [RAX + 0x1c]
CALL 0x00136650
JMP 0x0018459b
LAB_0018458e:
MOV RDI,qword ptr [RSP + 0x110]
CALL 0x00136980
LAB_0018459b:
MOV RAX,qword ptr [RSP + 0x60]
TEST byte ptr [RAX + 0x1ec1],0x1
JZ 0x00184669
TEST byte ptr [RSP + 0x10f],0x1
JZ 0x00184669
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0xd8],RAX
LEA RAX,[RSP + 0x10f]
MOV qword ptr [RSP + 0xe0],RAX
MOV RAX,qword ptr [RSP + 0x110]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0xf0]
MOV qword ptr [RSP + 0x28],RAX
LEA RDI,[RSP + 0xb8]
MOV qword ptr [RSP + 0x30],RDI
LEA RSI,[RSP + 0xd8]
CALL 0x001848e0
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x28]
MOV R8,qword ptr [RSP + 0x30]
LAB_0018461b:
MOV EDX,0x8
MOV ECX,0x20
MOVSS XMM0,dword ptr [0x0027d018]
CALL 0x00136a10
LAB_00184632:
JMP 0x00184634
LAB_00184634:
LEA RDI,[RSP + 0xb8]
CALL 0x00184970
JMP 0x001846c2
LAB_00184669:
MOV RDI,qword ptr [RSP + 0x60]
ADD RDI,0x13c0
MOV RSI,qword ptr [RSP + 0x110]
MOV AL,byte ptr [RSP + 0x10f]
AND AL,0x1
MOVZX EDX,AL
CALL 0x00184980
MOV RAX,qword ptr [RSP + 0x60]
MOV RDI,RAX
ADD RDI,0x13c0
MOV RSI,qword ptr [RSP + 0xf0]
MOV EDX,dword ptr [RAX + 0x18]
MOV RCX,qword ptr [RSP + 0x110]
MOV AL,byte ptr [RSP + 0x10f]
AND AL,0x1
MOVZX R8D,AL
CALL 0x00184a10
LAB_001846c2:
MOV RDI,qword ptr [RSP + 0x60]
ADD RDI,0x13c0
CALL 0x00165fd0
TEST byte ptr [RSP + 0x10f],0x1
JZ 0x001846ea
MOV RDI,qword ptr [RSP + 0xf0]
CALL 0x00136ff0
LAB_001846ea:
JMP 0x0018481e
LAB_001846ef:
MOV RAX,qword ptr [RSP + 0x60]
TEST byte ptr [RAX + 0x1ec1],0x1
JZ 0x001847b4
TEST byte ptr [RSP + 0x10f],0x1
JZ 0x001847b4
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x98],RAX
LEA RAX,[RSP + 0x10f]
MOV qword ptr [RSP + 0xa0],RAX
MOV RAX,qword ptr [RSP + 0x110]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0xf0]
MOV qword ptr [RSP + 0x10],RAX
LEA RDI,[RSP + 0x78]
MOV qword ptr [RSP + 0x18],RDI
LEA RSI,[RSP + 0x98]
CALL 0x00184ac0
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x10]
MOV R8,qword ptr [RSP + 0x18]
LAB_0018476c:
MOV EDX,0x8
MOV ECX,0x40
MOVSS XMM0,dword ptr [0x0027d018]
CALL 0x00136a10
LAB_00184783:
JMP 0x00184785
LAB_00184785:
LEA RDI,[RSP + 0x78]
CALL 0x00184970
JMP 0x0018480d
LAB_001847b4:
MOV RDI,qword ptr [RSP + 0x60]
ADD RDI,0x1fa0
MOV RSI,qword ptr [RSP + 0x110]
MOV AL,byte ptr [RSP + 0x10f]
AND AL,0x1
MOVZX EDX,AL
CALL 0x00184b50
MOV RAX,qword ptr [RSP + 0x60]
MOV RDI,RAX
ADD RDI,0x1fa0
MOV RSI,qword ptr [RSP + 0xf0]
MOV EDX,dword ptr [RAX + 0x18]
MOV RCX,qword ptr [RSP + 0x110]
MOV AL,byte ptr [RSP + 0x10f]
AND AL,0x1
MOVZX R8D,AL
CALL 0x00184be0
LAB_0018480d:
MOV RDI,qword ptr [RSP + 0x60]
ADD RDI,0x1fa0
CALL 0x00165fd0
LAB_0018481e:
CALL 0x0021a8c0
MOV qword ptr [RSP + 0x70],RAX
TEST byte ptr [RSP + 0x10f],0x1
JZ 0x0018483f
LEA RAX,[0x280a1f]
MOV qword ptr [RSP],RAX
JMP 0x0018484c
LAB_0018483f:
LEA RAX,[0x280a26]
MOV qword ptr [RSP],RAX
JMP 0x0018484c
LAB_0018484c:
MOV R8,qword ptr [RSP]
MOV RAX,qword ptr [RSP + 0x70]
SUB RAX,qword ptr [RSP + 0xe8]
CVTSI2SS XMM0,RAX
MOVSS XMM1,dword ptr [0x0027d004]
MULSS XMM0,XMM1
MOVSS XMM1,dword ptr [0x0027f1e4]
DIVSS XMM0,XMM1
CVTSS2SD XMM0,XMM0
XOR EDI,EDI
LEA RSI,[0x27f611]
MOV EDX,0x434
LEA RCX,[0x2809e8]
MOV AL,0x1
CALL 0x001eb5e0
TEST byte ptr [RSP + 0x10f],0x1
JZ 0x001848bc
MOV RDI,qword ptr [RSP + 0xf0]
XORPS XMM0,XMM0
MOVSS XMM1,dword ptr [0x0027d004]
CALL 0x00137080
LAB_001848bc:
MOV RAX,qword ptr [RSP + 0xf0]
ADD RSP,0x128
RET
|
/* StableDiffusionGGML::compute_first_stage(ggml_context*, ggml_tensor*, bool) */
ggml_tensor * __thiscall
StableDiffusionGGML::compute_first_stage
(StableDiffusionGGML *this,ggml_context *param_1,ggml_tensor *param_2,bool param_3)
{
ggml_tensor *pgVar1;
ggml_tensor *pgVar2;
long lVar3;
long lVar4;
char *local_128;
int4 local_ec;
function<void(ggml_tensor*,ggml_tensor*,bool)> local_b0 [32];
StableDiffusionGGML *local_90;
byte *local_88;
function<void(ggml_tensor*,ggml_tensor*,bool)> local_70 [32];
StableDiffusionGGML *local_50;
byte *local_48;
long local_40;
ggml_tensor *local_38;
long local_30;
long local_28;
byte local_19;
ggml_tensor *local_18;
ggml_context *local_10;
StableDiffusionGGML *local_8;
local_28 = *(long *)(param_2 + 0x10);
local_30 = *(long *)(param_2 + 0x18);
if (param_3) {
lVar3 = local_28 << 3;
lVar4 = local_30 << 3;
local_ec = 3;
}
else {
lVar3 = local_28 / 8;
lVar4 = local_30 / 8;
local_ec = 8;
if (((byte)this[0x1ec0] & 1) != 0) {
local_ec = 4;
}
}
local_19 = param_3;
local_18 = param_2;
local_10 = param_1;
local_8 = this;
local_38 = (ggml_tensor *)ggml_new_tensor_3d(param_1,0,lVar3,lVar4,local_ec);
local_40 = ggml_time_ms();
pgVar2 = local_18;
pgVar1 = local_38;
if (((byte)this[0x1ec0] & 1) == 0) {
if ((local_19 & 1) == 0) {
ggml_tensor_scale_input(local_18);
}
else {
ggml_tensor_scale(local_18,DAT_0027d004 / *(float *)(this + 0x1c));
}
pgVar2 = local_18;
pgVar1 = local_38;
if ((((byte)this[0x1ec1] & 1) == 0) || ((local_19 & 1) == 0)) {
AutoEncoderKL::alloc_compute_buffer
((AutoEncoderKL *)(this + 0x13c0),local_18,(bool)(local_19 & 1));
AutoEncoderKL::compute
((AutoEncoderKL *)(this + 0x13c0),local_38,*(int *)(this + 0x18),local_18,
(bool)(local_19 & 1));
}
else {
local_48 = &local_19;
local_50 = this;
std::function<void(ggml_tensor*,ggml_tensor*,bool)>::
function<StableDiffusionGGML::compute_first_stage(ggml_context*,ggml_tensor*,bool)::_lambda(ggml_tensor*,ggml_tensor*,bool)_1_&,void>
(local_70,(_lambda_ggml_tensor__ggml_tensor__bool__1_ *)&local_50);
/* try { // try from 0018461b to 00184631 has its CatchHandler @ 00184643 */
sd_tiling(DAT_0027d018,pgVar2,pgVar1,8,0x20,local_70);
std::function<void(ggml_tensor*,ggml_tensor*,bool)>::~function(local_70);
}
GGMLModule::free_compute_buffer((GGMLModule *)(this + 0x13c0));
if ((local_19 & 1) != 0) {
ggml_tensor_scale_output(local_38);
}
}
else {
if ((((byte)this[0x1ec1] & 1) == 0) || ((local_19 & 1) == 0)) {
TinyAutoEncoder::alloc_compute_buffer
((TinyAutoEncoder *)(this + 0x1fa0),local_18,(bool)(local_19 & 1));
TinyAutoEncoder::compute
((TinyAutoEncoder *)(this + 0x1fa0),local_38,*(int *)(this + 0x18),local_18,
(bool)(local_19 & 1));
}
else {
local_88 = &local_19;
local_90 = this;
std::function<void(ggml_tensor*,ggml_tensor*,bool)>::
function<StableDiffusionGGML::compute_first_stage(ggml_context*,ggml_tensor*,bool)::_lambda(ggml_tensor*,ggml_tensor*,bool)_2_&,void>
(local_b0,(_lambda_ggml_tensor__ggml_tensor__bool__2_ *)&local_90);
/* try { // try from 0018476c to 00184782 has its CatchHandler @ 00184791 */
sd_tiling(DAT_0027d018,pgVar2,pgVar1,8,0x40,local_b0);
std::function<void(ggml_tensor*,ggml_tensor*,bool)>::~function(local_b0);
}
GGMLModule::free_compute_buffer((GGMLModule *)(this + 0x1fa0));
}
lVar3 = ggml_time_ms();
if ((local_19 & 1) == 0) {
local_128 = "ENCODE";
}
else {
local_128 = "DECODE";
}
log_printf((double)(((float)(lVar3 - local_40) * DAT_0027d004) / DAT_0027f1e4),0,
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/stable-diffusion.cpp"
,0x434,"computing vae [mode: %s] graph completed, taking %.2fs",local_128);
if ((local_19 & 1) != 0) {
ggml_tensor_clamp(local_38,0.0,DAT_0027d004);
}
return local_38;
}
|
|
6,171 | StableDiffusionGGML::compute_first_stage(ggml_context*, ggml_tensor*, bool) | 7CodeWizard[P]stablediffusion/stable-diffusion.cpp | ggml_tensor* compute_first_stage(ggml_context* work_ctx, ggml_tensor* x, bool decode) {
int64_t W = x->ne[0];
int64_t H = x->ne[1];
ggml_tensor* result = ggml_new_tensor_3d(work_ctx, GGML_TYPE_F32,
decode ? (W * 8) : (W / 8), // width
decode ? (H * 8) : (H / 8), // height
decode ? 3 : (use_tiny_autoencoder ? 4 : 8)); // channels
int64_t t0 = ggml_time_ms();
if (!use_tiny_autoencoder) {
if (decode) {
ggml_tensor_scale(x, 1.0f / scale_factor);
} else {
ggml_tensor_scale_input(x);
}
if (vae_tiling && decode) { // TODO: support tiling vae encode
// split latent in 32x32 tiles and compute in several steps
auto on_tiling = [&](ggml_tensor* in, ggml_tensor* out, bool init) {
if (init) {
first_stage_model.alloc_compute_buffer(in, decode);
} else {
first_stage_model.compute(out, n_threads, in, decode);
}
};
sd_tiling(x, result, 8, 32, 0.5f, on_tiling);
} else {
first_stage_model.alloc_compute_buffer(x, decode);
first_stage_model.compute(result, n_threads, x, decode);
}
first_stage_model.free_compute_buffer();
if (decode) {
ggml_tensor_scale_output(result);
}
} else {
if (vae_tiling && decode) { // TODO: support tiling vae encode
// split latent in 64x64 tiles and compute in several steps
auto on_tiling = [&](ggml_tensor* in, ggml_tensor* out, bool init) {
if (init) {
tae_first_stage.alloc_compute_buffer(in, decode);
} else {
tae_first_stage.compute(out, n_threads, in, decode);
}
};
sd_tiling(x, result, 8, 64, 0.5f, on_tiling);
} else {
tae_first_stage.alloc_compute_buffer(x, decode);
tae_first_stage.compute(result, n_threads, x, decode);
}
tae_first_stage.free_compute_buffer();
}
int64_t t1 = ggml_time_ms();
LOG_DEBUG("computing vae [mode: %s] graph completed, taking %.2fs", decode ? "DECODE" : "ENCODE", (t1 - t0) * 1.0f / 1000);
if (decode) {
ggml_tensor_clamp(result, 0.0f, 1.0f);
}
return result;
} | O1 | cpp | StableDiffusionGGML::compute_first_stage(ggml_context*, ggml_tensor*, bool):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdx, %r12
movq %rdi, %r14
movb %cl, 0xb(%rsp)
movq 0x10(%rdx), %rdx
testl %ecx, %ecx
je 0x53a1b
shlq $0x3, %rdx
jmp 0x53a2d
leaq 0x7(%rdx), %rax
testq %rdx, %rdx
cmovnsq %rdx, %rax
sarq $0x3, %rax
movq %rax, %rdx
movq 0x18(%r12), %rax
testb %cl, %cl
je 0x53a3c
shlq $0x3, %rax
jmp 0x53a4e
leaq 0x7(%rax), %rdi
testq %rax, %rax
cmovnsq %rax, %rdi
sarq $0x3, %rdi
movq %rdi, %rax
movb 0x1ec0(%r14), %dil
notb %dil
movzbl %dil, %edi
andl $0x1, %edi
leaq 0x4(,%rdi,4), %rdi
testb %cl, %cl
movl $0x3, %r8d
cmoveq %rdi, %r8
movq %rsi, %rdi
xorl %esi, %esi
movq %rax, %rcx
callq 0x8ec7b
movq %rax, %rbx
callq 0x8dc98
movq %rax, %r15
cmpb $0x0, 0x1ec0(%r14)
je 0x53b11
cmpb $0x1, 0x1ec1(%r14)
jne 0x53b6c
cmpb $0x1, 0xb(%rsp)
jne 0x53b6c
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rcx
movaps %xmm0, (%rcx)
movaps %xmm0, 0x10(%rcx)
movq %r14, (%rcx)
leaq 0xb(%rsp), %rax
movq %rax, 0x8(%rcx)
leaq 0x1700(%rip), %rax # 0x551d0
movq %rax, 0x18(%rcx)
leaq 0x16fb(%rip), %rax # 0x551d6
movq %rax, 0x10(%rcx)
movq %r12, %rdi
movq %rbx, %rsi
movl $0x40, %edx
callq 0x32b62
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x53b9b
leaq 0x10(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x53b9b
cmpb $0x1, 0xb(%rsp)
jne 0x53bc8
movss 0x674e4(%rip), %xmm0 # 0xbb008
divss 0x1c(%r14), %xmm0
movss %xmm0, 0xc(%rsp)
movq %r12, %rdi
callq 0x8e043
movss 0xc(%rsp), %xmm1
testq %rax, %rax
jle 0x53c01
movq 0x118(%r12), %rcx
xorl %edx, %edx
movss (%rcx,%rdx,4), %xmm0
mulss %xmm1, %xmm0
movss %xmm0, (%rcx,%rdx,4)
incq %rdx
cmpq %rdx, %rax
jne 0x53b51
jmp 0x53c01
leaq 0x1fa0(%r14), %r13
movzbl 0xb(%rsp), %edx
movq %r13, %rdi
movq %r12, %rsi
callq 0x53f94
movl 0x18(%r14), %edx
movzbl 0xb(%rsp), %r8d
movq %r13, %rdi
movq %rbx, %rsi
movq %r12, %rcx
callq 0x54050
movq 0x1ff0(%r14), %rdi
callq 0xb377b
movq 0x1fe8(%r14), %rdi
callq 0xb3e3c
xorl %eax, %eax
movq %rax, 0x1ff0(%r14)
movq %rax, 0x1fd8(%r14)
jmp 0x53d0c
movq %r12, %rdi
callq 0x8e043
testq %rax, %rax
jle 0x53c01
movq 0x118(%r12), %rcx
xorl %edx, %edx
movss 0x69d11(%rip), %xmm0 # 0xbd8f8
movss (%rcx,%rdx,4), %xmm1
addss %xmm1, %xmm1
addss %xmm0, %xmm1
movss %xmm1, (%rcx,%rdx,4)
incq %rdx
cmpq %rdx, %rax
jne 0x53be7
cmpb $0x1, 0x1ec1(%r14)
jne 0x53c6e
cmpb $0x1, 0xb(%rsp)
jne 0x53c6e
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rcx
movaps %xmm0, (%rcx)
movaps %xmm0, 0x10(%rcx)
movq %r14, (%rcx)
leaq 0xb(%rsp), %rax
movq %rax, 0x8(%rcx)
leaq 0x524(%rip), %rax # 0x54158
movq %rax, 0x18(%rcx)
leaq 0x51f(%rip), %rax # 0x5415e
movq %rax, 0x10(%rcx)
movq %r12, %rdi
movq %rbx, %rsi
movl $0x20, %edx
callq 0x32b62
movq 0x40(%rsp), %rax
testq %rax, %rax
je 0x53c9d
leaq 0x30(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x53c9d
leaq 0x13c0(%r14), %r13
movzbl 0xb(%rsp), %edx
movq %r13, %rdi
movq %r12, %rsi
callq 0x53e06
movl 0x18(%r14), %edx
movzbl 0xb(%rsp), %r8d
movq %r13, %rdi
movq %rbx, %rsi
movq %r12, %rcx
callq 0x53ec2
movq 0x1410(%r14), %rdi
callq 0xb377b
movq 0x1408(%r14), %rdi
callq 0xb3e3c
xorl %eax, %eax
movq %rax, 0x1410(%r14)
movq %rax, 0x13f8(%r14)
cmpb $0x1, 0xb(%rsp)
jne 0x53d0c
movq %rbx, %rdi
callq 0x8e043
testq %rax, %rax
jle 0x53d0c
movq 0x118(%rbx), %rcx
xorl %edx, %edx
movss 0x6731e(%rip), %xmm0 # 0xbb008
movss 0x6731e(%rip), %xmm1 # 0xbb010
movss (%rcx,%rdx,4), %xmm2
addss %xmm0, %xmm2
mulss %xmm1, %xmm2
movss %xmm2, (%rcx,%rdx,4)
incq %rdx
cmpq %rdx, %rax
jne 0x53cf2
callq 0x8dc98
leaq 0x6b3db(%rip), %rcx # 0xbf0f3
leaq 0x6b3db(%rip), %r8 # 0xbf0fa
cmpb $0x0, 0xb(%rsp)
cmovneq %rcx, %r8
subq %r15, %rax
xorps %xmm0, %xmm0
cvtsi2ss %rax, %xmm0
divss 0x69ba9(%rip), %xmm0 # 0xbd8e4
cvtss2sd %xmm0, %xmm0
leaq 0x69f9f(%rip), %rsi # 0xbdce5
leaq 0x6b36f(%rip), %rcx # 0xbf0bc
xorl %edi, %edi
movl $0x434, %edx # imm = 0x434
movb $0x1, %al
callq 0x7a4d6
cmpb $0x1, 0xb(%rsp)
jne 0x53da4
movq %rbx, %rdi
callq 0x8e043
testq %rax, %rax
jle 0x53da4
movq 0x118(%rbx), %rcx
xorl %edx, %edx
movss 0x67288(%rip), %xmm0 # 0xbb008
xorps %xmm1, %xmm1
movss (%rcx,%rdx,4), %xmm2
movaps %xmm0, %xmm3
minss %xmm2, %xmm3
cmpltss %xmm1, %xmm2
andnps %xmm3, %xmm2
movss %xmm2, (%rcx,%rdx,4)
incq %rdx
cmpq %rdx, %rax
jne 0x53d83
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x53dfd
jmp 0x53dfd
movq %rax, %rbx
movq 0x40(%rsp), %rax
testq %rax, %rax
je 0x53df5
leaq 0x30(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x53df5
jmp 0x53dfd
movq %rax, %rbx
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x53df5
leaq 0x10(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0xaae0
movq %rax, %rdi
callq 0x37049
nop
| _ZN19StableDiffusionGGML19compute_first_stageEP12ggml_contextP11ggml_tensorb:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 50h
mov r12, rdx
mov r14, rdi
mov [rsp+78h+var_6D], cl
mov rdx, [rdx+10h]
test ecx, ecx
jz short loc_53A1B
shl rdx, 3
jmp short loc_53A2D
loc_53A1B:
lea rax, [rdx+7]
test rdx, rdx
cmovns rax, rdx
sar rax, 3
mov rdx, rax
loc_53A2D:
mov rax, [r12+18h]
test cl, cl
jz short loc_53A3C
shl rax, 3
jmp short loc_53A4E
loc_53A3C:
lea rdi, [rax+7]
test rax, rax
cmovns rdi, rax
sar rdi, 3
mov rax, rdi
loc_53A4E:
mov dil, [r14+1EC0h]
not dil
movzx edi, dil
and edi, 1
lea rdi, ds:4[rdi*4]
test cl, cl
mov r8d, 3
cmovz r8, rdi
mov rdi, rsi
xor esi, esi
mov rcx, rax
call ggml_new_tensor_3d
mov rbx, rax
call ggml_time_ms
mov r15, rax
cmp byte ptr [r14+1EC0h], 0
jz short loc_53B11
cmp byte ptr [r14+1EC1h], 1
jnz loc_53B6C
cmp [rsp+78h+var_6D], 1
jnz loc_53B6C
xorps xmm0, xmm0
lea rcx, [rsp+78h+var_68]
movaps xmmword ptr [rcx], xmm0
movaps xmmword ptr [rcx+10h], xmm0
mov [rcx], r14
lea rax, [rsp+78h+var_6D]
mov [rcx+8], rax
lea rax, _ZNSt17_Function_handlerIFvP11ggml_tensorS1_bEZN19StableDiffusionGGML19compute_first_stageEP12ggml_contextS1_bEUlS1_S1_bE0_E9_M_invokeERKSt9_Any_dataOS1_SB_Ob; std::_Function_handler<void ()(ggml_tensor *,ggml_tensor *,bool),StableDiffusionGGML::compute_first_stage(ggml_context *,ggml_tensor *,bool)::{lambda(ggml_tensor *,ggml_tensor *,bool)#2}>::_M_invoke(std::_Any_data const&,ggml_tensor *&&,ggml_tensor *&,bool &&)
mov [rcx+18h], rax
lea rax, _ZNSt17_Function_handlerIFvP11ggml_tensorS1_bEZN19StableDiffusionGGML19compute_first_stageEP12ggml_contextS1_bEUlS1_S1_bE0_E10_M_managerERSt9_Any_dataRKS8_St18_Manager_operation; std::_Function_handler<void ()(ggml_tensor *,ggml_tensor *,bool),StableDiffusionGGML::compute_first_stage(ggml_context *,ggml_tensor *,bool)::{lambda(ggml_tensor *,ggml_tensor *,bool)#2}>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rcx+10h], rax
mov rdi, r12
mov rsi, rbx
mov edx, 40h ; '@'
call _ZL9sd_tilingP11ggml_tensorS0_iifSt8functionIFvS0_S0_bEE; sd_tiling(ggml_tensor *,ggml_tensor *,int,int,float,std::function<void ()(ggml_tensor *,ggml_tensor *,bool)>)
mov rax, [rsp+78h+var_58]
test rax, rax
jz loc_53B9B
lea rdi, [rsp+78h+var_68]
mov rsi, rdi
mov edx, 3
call rax
jmp loc_53B9B
loc_53B11:
cmp [rsp+78h+var_6D], 1
jnz loc_53BC8
movss xmm0, cs:dword_BB008
divss xmm0, dword ptr [r14+1Ch]
movss [rsp+78h+var_6C], xmm0
mov rdi, r12
call ggml_nelements
movss xmm1, [rsp+78h+var_6C]
test rax, rax
jle loc_53C01
mov rcx, [r12+118h]
xor edx, edx
loc_53B51:
movss xmm0, dword ptr [rcx+rdx*4]
mulss xmm0, xmm1
movss dword ptr [rcx+rdx*4], xmm0
inc rdx
cmp rax, rdx
jnz short loc_53B51
jmp loc_53C01
loc_53B6C:
lea r13, [r14+1FA0h]
movzx edx, [rsp+78h+var_6D]
mov rdi, r13
mov rsi, r12
call _ZN15TinyAutoEncoder20alloc_compute_bufferEP11ggml_tensorb; TinyAutoEncoder::alloc_compute_buffer(ggml_tensor *,bool)
mov edx, [r14+18h]
movzx r8d, [rsp+78h+var_6D]
mov rdi, r13
mov rsi, rbx
mov rcx, r12
call _ZN15TinyAutoEncoder7computeEP11ggml_tensoriS1_b; TinyAutoEncoder::compute(ggml_tensor *,int,ggml_tensor *,bool)
loc_53B9B:
mov rdi, [r14+1FF0h]
call ggml_allocr_free
mov rdi, [r14+1FE8h]
call ggml_backend_buffer_free
xor eax, eax
mov [r14+1FF0h], rax
mov [r14+1FD8h], rax
jmp loc_53D0C
loc_53BC8:
mov rdi, r12
call ggml_nelements
test rax, rax
jle short loc_53C01
mov rcx, [r12+118h]
xor edx, edx
movss xmm0, cs:dword_BD8F8
loc_53BE7:
movss xmm1, dword ptr [rcx+rdx*4]
addss xmm1, xmm1
addss xmm1, xmm0
movss dword ptr [rcx+rdx*4], xmm1
inc rdx
cmp rax, rdx
jnz short loc_53BE7
loc_53C01:
cmp byte ptr [r14+1EC1h], 1
jnz short loc_53C6E
cmp [rsp+78h+var_6D], 1
jnz short loc_53C6E
xorps xmm0, xmm0
lea rcx, [rsp+78h+var_48]
movaps xmmword ptr [rcx], xmm0
movaps xmmword ptr [rcx+10h], xmm0
mov [rcx], r14
lea rax, [rsp+78h+var_6D]
mov [rcx+8], rax
lea rax, _ZNSt17_Function_handlerIFvP11ggml_tensorS1_bEZN19StableDiffusionGGML19compute_first_stageEP12ggml_contextS1_bEUlS1_S1_bE_E9_M_invokeERKSt9_Any_dataOS1_SB_Ob; std::_Function_handler<void ()(ggml_tensor *,ggml_tensor *,bool),StableDiffusionGGML::compute_first_stage(ggml_context *,ggml_tensor *,bool)::{lambda(ggml_tensor *,ggml_tensor *,bool)#1}>::_M_invoke(std::_Any_data const&,ggml_tensor *&&,ggml_tensor *&,bool &&)
mov [rcx+18h], rax
lea rax, _ZNSt17_Function_handlerIFvP11ggml_tensorS1_bEZN19StableDiffusionGGML19compute_first_stageEP12ggml_contextS1_bEUlS1_S1_bE_E10_M_managerERSt9_Any_dataRKS8_St18_Manager_operation; std::_Function_handler<void ()(ggml_tensor *,ggml_tensor *,bool),StableDiffusionGGML::compute_first_stage(ggml_context *,ggml_tensor *,bool)::{lambda(ggml_tensor *,ggml_tensor *,bool)#1}>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rcx+10h], rax
mov rdi, r12
mov rsi, rbx
mov edx, 20h ; ' '
call _ZL9sd_tilingP11ggml_tensorS0_iifSt8functionIFvS0_S0_bEE; sd_tiling(ggml_tensor *,ggml_tensor *,int,int,float,std::function<void ()(ggml_tensor *,ggml_tensor *,bool)>)
mov rax, [rsp+78h+var_38]
test rax, rax
jz short loc_53C9D
lea rdi, [rsp+78h+var_48]
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_53C9D
loc_53C6E:
lea r13, [r14+13C0h]
movzx edx, [rsp+78h+var_6D]
mov rdi, r13
mov rsi, r12
call _ZN13AutoEncoderKL20alloc_compute_bufferEP11ggml_tensorb; AutoEncoderKL::alloc_compute_buffer(ggml_tensor *,bool)
mov edx, [r14+18h]
movzx r8d, [rsp+78h+var_6D]
mov rdi, r13
mov rsi, rbx
mov rcx, r12
call _ZN13AutoEncoderKL7computeEP11ggml_tensoriS1_b; AutoEncoderKL::compute(ggml_tensor *,int,ggml_tensor *,bool)
loc_53C9D:
mov rdi, [r14+1410h]
call ggml_allocr_free
mov rdi, [r14+1408h]
call ggml_backend_buffer_free
xor eax, eax
mov [r14+1410h], rax
mov [r14+13F8h], rax
cmp [rsp+78h+var_6D], 1
jnz short loc_53D0C
mov rdi, rbx
call ggml_nelements
test rax, rax
jle short loc_53D0C
mov rcx, [rbx+118h]
xor edx, edx
movss xmm0, cs:dword_BB008
movss xmm1, cs:dword_BB010
loc_53CF2:
movss xmm2, dword ptr [rcx+rdx*4]
addss xmm2, xmm0
mulss xmm2, xmm1
movss dword ptr [rcx+rdx*4], xmm2
inc rdx
cmp rax, rdx
jnz short loc_53CF2
loc_53D0C:
call ggml_time_ms
lea rcx, aDecode; "DECODE"
lea r8, aEncode; "ENCODE"
cmp [rsp+78h+var_6D], 0
cmovnz r8, rcx
sub rax, r15
xorps xmm0, xmm0
cvtsi2ss xmm0, rax
divss xmm0, cs:dword_BD8E4
cvtss2sd xmm0, xmm0
lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aComputingVaeMo; "computing vae [mode: %s] graph complete"...
xor edi, edi
mov edx, 434h
mov al, 1
call _Z10log_printf14sd_log_level_tPKciS1_z; log_printf(sd_log_level_t,char const*,int,char const*,...)
cmp [rsp+78h+var_6D], 1
jnz short loc_53DA4
mov rdi, rbx
call ggml_nelements
test rax, rax
jle short loc_53DA4
mov rcx, [rbx+118h]
xor edx, edx
movss xmm0, cs:dword_BB008
xorps xmm1, xmm1
loc_53D83:
movss xmm2, dword ptr [rcx+rdx*4]
movaps xmm3, xmm0
minss xmm3, xmm2
cmpltss xmm2, xmm1
andnps xmm2, xmm3
movss dword ptr [rcx+rdx*4], xmm2
inc rdx
cmp rax, rdx
jnz short loc_53D83
loc_53DA4:
mov rax, rbx
add rsp, 50h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
jmp short loc_53DFD
jmp short loc_53DFD
mov rbx, rax
mov rax, [rsp+78h+var_38]
test rax, rax
jz short loc_53DF5
lea rdi, [rsp+78h+var_48]
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_53DF5
jmp short loc_53DFD
mov rbx, rax
mov rax, [rsp+78h+var_58]
test rax, rax
jz short loc_53DF5
lea rdi, [rsp+78h+var_68]
mov rsi, rdi
mov edx, 3
call rax
loc_53DF5:
mov rdi, rbx
call __Unwind_Resume
loc_53DFD:
mov rdi, rax
call __clang_call_terminate
| long long StableDiffusionGGML::compute_first_stage(
long long a1,
long long a2,
_QWORD *a3,
int a4,
double a5,
double a6)
{
long long v8; // rdx
long long v9; // rdx
long long v10; // rax
long long v11; // rax
long long v12; // rdi
long long v13; // r8
long long v14; // rbx
_QWORD *v15; // rsi
long long v16; // rax
long long v17; // rcx
long long i; // rdx
long long v19; // rdi
long long v20; // rax
long long v21; // rcx
long long v22; // rdx
long long v23; // rax
long long v24; // rcx
long long j; // rdx
int v26; // r9d
const char *v27; // r8
long long v28; // rax
long long v29; // rcx
long long v30; // rdx
__m128 v31; // xmm1
__m128 v32; // xmm2
__m128 v33; // xmm3
unsigned __int8 v35; // [rsp+Bh] [rbp-6Dh] BYREF
float v36; // [rsp+Ch] [rbp-6Ch]
_QWORD v37[2]; // [rsp+10h] [rbp-68h] BYREF
long long ( *v38)(); // [rsp+20h] [rbp-58h]
long long ( *v39)(); // [rsp+28h] [rbp-50h]
_QWORD v40[2]; // [rsp+30h] [rbp-48h] BYREF
long long ( *v41)(); // [rsp+40h] [rbp-38h]
long long ( *v42)(); // [rsp+48h] [rbp-30h]
v35 = a4;
v8 = a3[2];
if ( a4 )
v9 = 8 * v8;
else
v9 = v8 / 8;
v10 = a3[3];
if ( (_BYTE)a4 )
{
v11 = 8 * v10;
}
else
{
v12 = v10 + 7;
if ( v10 >= 0 )
v12 = a3[3];
v11 = v12 >> 3;
}
v13 = 3LL;
if ( !(_BYTE)a4 )
v13 = 4LL * ((*(_BYTE *)(a1 + 7872) & 1) == 0) + 4;
v14 = ggml_new_tensor_3d(a2, 0LL, v9, v11, v13);
ggml_time_ms(a2, 0LL);
if ( *(_BYTE *)(a1 + 7872) )
{
if ( *(_BYTE *)(a1 + 7873) == 1 && v35 == 1 )
{
v37[0] = a1;
v37[1] = &v35;
v39 = std::_Function_handler<void ()(ggml_tensor *,ggml_tensor *,bool),StableDiffusionGGML::compute_first_stage(ggml_context *,ggml_tensor *,bool)::{lambda(ggml_tensor *,ggml_tensor *,bool)#2}>::_M_invoke;
v38 = std::_Function_handler<void ()(ggml_tensor *,ggml_tensor *,bool),StableDiffusionGGML::compute_first_stage(ggml_context *,ggml_tensor *,bool)::{lambda(ggml_tensor *,ggml_tensor *,bool)#2}>::_M_manager;
v15 = (_QWORD *)v14;
sd_tiling((long long)a3, v14, 0x40u, (long long)v37);
if ( v38 )
{
v15 = v37;
((void ( *)(_QWORD *, _QWORD *, long long))v38)(v37, v37, 3LL);
}
}
else
{
TinyAutoEncoder::alloc_compute_buffer(a1 + 8096, a3, v35);
v15 = (_QWORD *)v14;
TinyAutoEncoder::compute(a1 + 8096, v14, *(unsigned int *)(a1 + 24), a3, v35);
}
ggml_allocr_free(*(_QWORD *)(a1 + 8176));
v19 = *(_QWORD *)(a1 + 8168);
ggml_backend_buffer_free(v19);
*(_QWORD *)(a1 + 8176) = 0LL;
*(_QWORD *)(a1 + 8152) = 0LL;
}
else
{
if ( v35 == 1 )
{
HIDWORD(a5) = 0;
*(float *)&a5 = 1.0 / *(float *)(a1 + 28);
v36 = *(float *)&a5;
v16 = ggml_nelements(a3);
*(_QWORD *)&a6 = LODWORD(a5);
if ( v16 > 0 )
{
v17 = a3[35];
for ( i = 0LL; i != v16; ++i )
{
*(_QWORD *)&a5 = *(unsigned int *)(v17 + 4 * i);
*(float *)&a5 = *(float *)&a5 * *(float *)&a6;
*(_DWORD *)(v17 + 4 * i) = LODWORD(a5);
}
}
}
else
{
v20 = ggml_nelements(a3);
if ( v20 > 0 )
{
v21 = a3[35];
v22 = 0LL;
*(_QWORD *)&a5 = 3212836864LL;
do
{
*(_QWORD *)&a6 = *(unsigned int *)(v21 + 4 * v22);
*(float *)&a6 = (float)(*(float *)&a6 + *(float *)&a6) + -1.0;
*(_DWORD *)(v21 + 4 * v22++) = LODWORD(a6);
}
while ( v20 != v22 );
}
}
if ( *(_BYTE *)(a1 + 7873) == 1 && v35 == 1 )
{
v40[0] = a1;
v40[1] = &v35;
v42 = std::_Function_handler<void ()(ggml_tensor *,ggml_tensor *,bool),StableDiffusionGGML::compute_first_stage(ggml_context *,ggml_tensor *,bool)::{lambda(ggml_tensor *,ggml_tensor *,bool)#1}>::_M_invoke;
v41 = std::_Function_handler<void ()(ggml_tensor *,ggml_tensor *,bool),StableDiffusionGGML::compute_first_stage(ggml_context *,ggml_tensor *,bool)::{lambda(ggml_tensor *,ggml_tensor *,bool)#1}>::_M_manager;
v15 = (_QWORD *)v14;
sd_tiling((long long)a3, v14, 0x20u, (long long)v40);
if ( v41 )
{
v15 = v40;
((void ( *)(_QWORD *, _QWORD *, long long, double, double))v41)(v40, v40, 3LL, 0.0, a6);
}
}
else
{
AutoEncoderKL::alloc_compute_buffer(a1 + 5056, a3, v35, a5, a6);
v15 = (_QWORD *)v14;
AutoEncoderKL::compute(a1 + 5056, v14, *(unsigned int *)(a1 + 24), a3, v35);
}
ggml_allocr_free(*(_QWORD *)(a1 + 5136));
v19 = *(_QWORD *)(a1 + 5128);
ggml_backend_buffer_free(v19);
*(_QWORD *)(a1 + 5136) = 0LL;
*(_QWORD *)(a1 + 5112) = 0LL;
if ( v35 == 1 )
{
v19 = v14;
v23 = ggml_nelements(v14);
if ( v23 > 0 )
{
v24 = *(_QWORD *)(v14 + 280);
for ( j = 0LL; j != v23; ++j )
*(float *)(v24 + 4 * j) = (float)(*(float *)(v24 + 4 * j) + 1.0) * 0.5;
}
}
}
ggml_time_ms(v19, v15);
v27 = "ENCODE";
if ( v35 )
v27 = "DECODE";
log_printf(
0,
(unsigned int)"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/stable-diffusion.cpp",
1076,
(unsigned int)"computing vae [mode: %s] graph completed, taking %.2fs",
(_DWORD)v27,
v26);
if ( v35 == 1 )
{
v28 = ggml_nelements(v14);
if ( v28 > 0 )
{
v29 = *(_QWORD *)(v14 + 280);
v30 = 0LL;
v31.m128_i32[0] = 0;
do
{
v32 = (__m128)*(unsigned int *)(v29 + 4 * v30);
v33 = (__m128)0x3F800000u;
v33.m128_f32[0] = fminf(1.0, v32.m128_f32[0]);
*(_DWORD *)(v29 + 4 * v30++) = _mm_andnot_ps(_mm_cmplt_ss(v32, v31), v33).m128_u32[0];
}
while ( v28 != v30 );
}
}
return v14;
}
| |||
6,172 | StableDiffusionGGML::compute_first_stage(ggml_context*, ggml_tensor*, bool) | 7CodeWizard[P]stablediffusion/stable-diffusion.cpp | ggml_tensor* compute_first_stage(ggml_context* work_ctx, ggml_tensor* x, bool decode) {
int64_t W = x->ne[0];
int64_t H = x->ne[1];
ggml_tensor* result = ggml_new_tensor_3d(work_ctx, GGML_TYPE_F32,
decode ? (W * 8) : (W / 8), // width
decode ? (H * 8) : (H / 8), // height
decode ? 3 : (use_tiny_autoencoder ? 4 : 8)); // channels
int64_t t0 = ggml_time_ms();
if (!use_tiny_autoencoder) {
if (decode) {
ggml_tensor_scale(x, 1.0f / scale_factor);
} else {
ggml_tensor_scale_input(x);
}
if (vae_tiling && decode) { // TODO: support tiling vae encode
// split latent in 32x32 tiles and compute in several steps
auto on_tiling = [&](ggml_tensor* in, ggml_tensor* out, bool init) {
if (init) {
first_stage_model.alloc_compute_buffer(in, decode);
} else {
first_stage_model.compute(out, n_threads, in, decode);
}
};
sd_tiling(x, result, 8, 32, 0.5f, on_tiling);
} else {
first_stage_model.alloc_compute_buffer(x, decode);
first_stage_model.compute(result, n_threads, x, decode);
}
first_stage_model.free_compute_buffer();
if (decode) {
ggml_tensor_scale_output(result);
}
} else {
if (vae_tiling && decode) { // TODO: support tiling vae encode
// split latent in 64x64 tiles and compute in several steps
auto on_tiling = [&](ggml_tensor* in, ggml_tensor* out, bool init) {
if (init) {
tae_first_stage.alloc_compute_buffer(in, decode);
} else {
tae_first_stage.compute(out, n_threads, in, decode);
}
};
sd_tiling(x, result, 8, 64, 0.5f, on_tiling);
} else {
tae_first_stage.alloc_compute_buffer(x, decode);
tae_first_stage.compute(result, n_threads, x, decode);
}
tae_first_stage.free_compute_buffer();
}
int64_t t1 = ggml_time_ms();
LOG_DEBUG("computing vae [mode: %s] graph completed, taking %.2fs", decode ? "DECODE" : "ENCODE", (t1 - t0) * 1.0f / 1000);
if (decode) {
ggml_tensor_clamp(result, 0.0f, 1.0f);
}
return result;
} | O2 | cpp | StableDiffusionGGML::compute_first_stage(ggml_context*, ggml_tensor*, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %ecx, %ebp
movq %rdx, %r12
movq %rdi, %r14
movb %bpl, 0x7(%rsp)
movq 0x10(%rdx), %rcx
movq 0x18(%rdx), %r9
testl %ebp, %ebp
je 0x36325
shlq $0x3, %rcx
shlq $0x3, %r9
jmp 0x3633e
pushq $0x8
popq %rdi
movq %rcx, %rax
cqto
idivq %rdi
movq %rax, %rcx
movq %r9, %rax
cqto
idivq %rdi
movq %rax, %r9
movb 0x1ec0(%r14), %al
notb %al
movzbl %al, %eax
andl $0x1, %eax
leaq 0x4(,%rax,4), %rax
testb %bpl, %bpl
pushq $0x3
popq %r8
cmoveq %rax, %r8
movq %rsi, %rdi
xorl %esi, %esi
movq %rcx, %rdx
movq %r9, %rcx
callq 0x68645
movq %rax, %rbx
callq 0x67697
movq %rax, %r15
cmpb $0x0, 0x1ec0(%r14)
je 0x363df
movb 0x1ec1(%r14), %al
andb %bpl, %al
cmpb $0x1, %al
jne 0x3643e
leaq 0x8(%rsp), %r13
movq %r14, (%r13)
leaq 0x7(%rsp), %rax
movq %rax, 0x8(%r13)
leaq 0xfb4(%rip), %rax # 0x37364
movq %rax, 0x18(%r13)
leaq 0xfaf(%rip), %rax # 0x3736a
movq %rax, 0x10(%r13)
pushq $0x40
popq %rdx
movq %r12, %rdi
movq %rbx, %rsi
movq %r13, %rcx
callq 0x1d265
leaq 0x8(%rsp), %rdi
callq 0x3937c
jmp 0x3646b
testb %bpl, %bpl
je 0x3647f
movss 0x60c18(%rip), %xmm0 # 0x97008
divss 0x1c(%r14), %xmm0
movq %r12, %rdi
callq 0x1d11c
cmpb $0x1, 0x1ec1(%r14)
je 0x364c9
leaq 0x13c0(%r14), %r13
movzbl %bpl, %ebp
movq %r13, %rdi
movq %r12, %rsi
movl %ebp, %edx
callq 0x36626
movl 0x18(%r14), %edx
movq %r13, %rdi
movq %rbx, %rsi
movq %r12, %rcx
movl %ebp, %r8d
callq 0x3668e
jmp 0x3650c
leaq 0x1fa0(%r14), %r13
movzbl %bpl, %ebp
movq %r13, %rdi
movq %r12, %rsi
movl %ebp, %edx
callq 0x3670a
movl 0x18(%r14), %edx
movq %r13, %rdi
movq %rbx, %rsi
movq %r12, %rcx
movl %ebp, %r8d
callq 0x36772
addq $0x1fa0, %r14 # imm = 0x1FA0
movq %r14, %rdi
callq 0x2d2d6
jmp 0x36566
movq %r12, %rdi
callq 0x67ada
movq 0x118(%r12), %rcx
xorl %edx, %edx
testq %rax, %rax
cmovleq %rdx, %rax
movss 0x63394(%rip), %xmm0 # 0x99834
cmpq %rdx, %rax
je 0x364bc
movss (%rcx,%rdx,4), %xmm1
addss %xmm1, %xmm1
addss %xmm0, %xmm1
movss %xmm1, (%rcx,%rdx,4)
incq %rdx
jmp 0x364a0
testb %bpl, 0x1ec1(%r14)
je 0x3640c
leaq 0x28(%rsp), %r13
movq %r14, (%r13)
leaq 0x7(%rsp), %rax
movq %rax, 0x8(%r13)
leaq 0x342(%rip), %rax # 0x36824
movq %rax, 0x18(%r13)
leaq 0x33d(%rip), %rax # 0x3682a
movq %rax, 0x10(%r13)
pushq $0x20
popq %rdx
movq %r12, %rdi
movq %rbx, %rsi
movq %r13, %rcx
callq 0x1d265
leaq 0x28(%rsp), %rdi
callq 0x3937c
addq $0x13c0, %r14 # imm = 0x13C0
movq %r14, %rdi
callq 0x2d2d6
cmpb $0x1, 0x7(%rsp)
jne 0x36566
movq %rbx, %rdi
callq 0x67ada
movq 0x118(%rbx), %rcx
xorl %edx, %edx
testq %rax, %rax
cmovleq %rdx, %rax
movss 0x60ac6(%rip), %xmm0 # 0x97008
movss 0x60ac2(%rip), %xmm1 # 0x9700c
cmpq %rdx, %rax
je 0x36566
movss (%rcx,%rdx,4), %xmm2
addss %xmm0, %xmm2
mulss %xmm1, %xmm2
movss %xmm2, (%rcx,%rdx,4)
incq %rdx
jmp 0x3654a
callq 0x67697
leaq 0x64ab1(%rip), %rcx # 0x9b023
leaq 0x64ab1(%rip), %r8 # 0x9b02a
cmpb $0x0, 0x7(%rsp)
cmovneq %rcx, %r8
subq %r15, %rax
cvtsi2ss %rax, %xmm0
divss 0x6328e(%rip), %xmm0 # 0x99820
cvtss2sd %xmm0, %xmm0
leaq 0x63678(%rip), %rsi # 0x99c15
leaq 0x64a48(%rip), %rcx # 0x9afec
xorl %edi, %edi
movl $0x434, %edx # imm = 0x434
movb $0x1, %al
callq 0x55f59
cmpb $0x1, 0x7(%rsp)
jne 0x365ff
movq %rbx, %rdi
callq 0x67ada
movq 0x118(%rbx), %rcx
xorl %edx, %edx
testq %rax, %rax
cmovleq %rdx, %rax
movss 0x60a2f(%rip), %xmm0 # 0x97008
xorps %xmm1, %xmm1
cmpq %rdx, %rax
je 0x365ff
movss (%rcx,%rdx,4), %xmm2
movaps %xmm0, %xmm3
minss %xmm2, %xmm3
cmpltss %xmm1, %xmm2
andnps %xmm3, %xmm2
movss %xmm2, (%rcx,%rdx,4)
incq %rdx
jmp 0x365dc
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x36613
movq %rax, %rbx
movq %r13, %rdi
callq 0x3937c
movq %rbx, %rdi
callq 0xaab0
| _ZN19StableDiffusionGGML19compute_first_stageEP12ggml_contextP11ggml_tensorb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov ebp, ecx
mov r12, rdx
mov r14, rdi
mov [rsp+78h+var_71], bpl
mov rcx, [rdx+10h]
mov r9, [rdx+18h]
test ebp, ebp
jz short loc_36325
shl rcx, 3
shl r9, 3
jmp short loc_3633E
loc_36325:
push 8
pop rdi
mov rax, rcx
cqo
idiv rdi
mov rcx, rax
mov rax, r9
cqo
idiv rdi
mov r9, rax
loc_3633E:
mov al, [r14+1EC0h]
not al
movzx eax, al
and eax, 1
lea rax, ds:4[rax*4]
test bpl, bpl
push 3
pop r8
cmovz r8, rax
mov rdi, rsi
xor esi, esi
mov rdx, rcx
mov rcx, r9
call ggml_new_tensor_3d
mov rbx, rax
call ggml_time_ms
mov r15, rax
cmp byte ptr [r14+1EC0h], 0
jz short loc_363DF
mov al, [r14+1EC1h]
and al, bpl
cmp al, 1
jnz loc_3643E
lea r13, [rsp+78h+var_70]
mov [r13+0], r14
lea rax, [rsp+78h+var_71]
mov [r13+8], rax
lea rax, _ZNSt17_Function_handlerIFvP11ggml_tensorS1_bEZN19StableDiffusionGGML19compute_first_stageEP12ggml_contextS1_bEUlS1_S1_bE0_E9_M_invokeERKSt9_Any_dataOS1_SB_Ob; std::_Function_handler<void ()(ggml_tensor *,ggml_tensor *,bool),StableDiffusionGGML::compute_first_stage(ggml_context *,ggml_tensor *,bool)::{lambda(ggml_tensor *,ggml_tensor *,bool)#2}>::_M_invoke(std::_Any_data const&,ggml_tensor *&&,ggml_tensor *&,bool &&)
mov [r13+18h], rax
lea rax, _ZNSt17_Function_handlerIFvP11ggml_tensorS1_bEZN19StableDiffusionGGML19compute_first_stageEP12ggml_contextS1_bEUlS1_S1_bE0_E10_M_managerERSt9_Any_dataRKS8_St18_Manager_operation; std::_Function_handler<void ()(ggml_tensor *,ggml_tensor *,bool),StableDiffusionGGML::compute_first_stage(ggml_context *,ggml_tensor *,bool)::{lambda(ggml_tensor *,ggml_tensor *,bool)#2}>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [r13+10h], rax
push 40h ; '@'
pop rdx
mov rdi, r12
mov rsi, rbx
mov rcx, r13
call _ZL9sd_tilingP11ggml_tensorS0_iifSt8functionIFvS0_S0_bEE; sd_tiling(ggml_tensor *,ggml_tensor *,int,int,float,std::function<void ()(ggml_tensor *,ggml_tensor *,bool)>)
lea rdi, [rsp+78h+var_70]; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
jmp loc_3646B
loc_363DF:
test bpl, bpl
jz loc_3647F
movss xmm0, cs:dword_97008
divss xmm0, dword ptr [r14+1Ch]
mov rdi, r12
call _ZL17ggml_tensor_scaleP11ggml_tensorf; ggml_tensor_scale(ggml_tensor *,float)
cmp byte ptr [r14+1EC1h], 1
jz loc_364C9
loc_3640C:
lea r13, [r14+13C0h]
movzx ebp, bpl
mov rdi, r13
mov rsi, r12
mov edx, ebp
call _ZN13AutoEncoderKL20alloc_compute_bufferEP11ggml_tensorb; AutoEncoderKL::alloc_compute_buffer(ggml_tensor *,bool)
mov edx, [r14+18h]
mov rdi, r13
mov rsi, rbx
mov rcx, r12
mov r8d, ebp
call _ZN13AutoEncoderKL7computeEP11ggml_tensoriS1_b; AutoEncoderKL::compute(ggml_tensor *,int,ggml_tensor *,bool)
jmp loc_3650C
loc_3643E:
lea r13, [r14+1FA0h]
movzx ebp, bpl
mov rdi, r13
mov rsi, r12
mov edx, ebp
call _ZN15TinyAutoEncoder20alloc_compute_bufferEP11ggml_tensorb; TinyAutoEncoder::alloc_compute_buffer(ggml_tensor *,bool)
mov edx, [r14+18h]
mov rdi, r13
mov rsi, rbx
mov rcx, r12
mov r8d, ebp
call _ZN15TinyAutoEncoder7computeEP11ggml_tensoriS1_b; TinyAutoEncoder::compute(ggml_tensor *,int,ggml_tensor *,bool)
loc_3646B:
add r14, 1FA0h
mov rdi, r14; this
call _ZN10GGMLModule19free_compute_bufferEv; GGMLModule::free_compute_buffer(void)
jmp loc_36566
loc_3647F:
mov rdi, r12
call ggml_nelements
mov rcx, [r12+118h]
xor edx, edx
test rax, rax
cmovle rax, rdx
movss xmm0, cs:dword_99834
loc_364A0:
cmp rax, rdx
jz short loc_364BC
movss xmm1, dword ptr [rcx+rdx*4]
addss xmm1, xmm1
addss xmm1, xmm0
movss dword ptr [rcx+rdx*4], xmm1
inc rdx
jmp short loc_364A0
loc_364BC:
test [r14+1EC1h], bpl
jz loc_3640C
loc_364C9:
lea r13, [rsp+78h+var_50]
mov [r13+0], r14
lea rax, [rsp+78h+var_71]
mov [r13+8], rax
lea rax, _ZNSt17_Function_handlerIFvP11ggml_tensorS1_bEZN19StableDiffusionGGML19compute_first_stageEP12ggml_contextS1_bEUlS1_S1_bE_E9_M_invokeERKSt9_Any_dataOS1_SB_Ob; std::_Function_handler<void ()(ggml_tensor *,ggml_tensor *,bool),StableDiffusionGGML::compute_first_stage(ggml_context *,ggml_tensor *,bool)::{lambda(ggml_tensor *,ggml_tensor *,bool)#1}>::_M_invoke(std::_Any_data const&,ggml_tensor *&&,ggml_tensor *&,bool &&)
mov [r13+18h], rax
lea rax, _ZNSt17_Function_handlerIFvP11ggml_tensorS1_bEZN19StableDiffusionGGML19compute_first_stageEP12ggml_contextS1_bEUlS1_S1_bE_E10_M_managerERSt9_Any_dataRKS8_St18_Manager_operation; std::_Function_handler<void ()(ggml_tensor *,ggml_tensor *,bool),StableDiffusionGGML::compute_first_stage(ggml_context *,ggml_tensor *,bool)::{lambda(ggml_tensor *,ggml_tensor *,bool)#1}>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [r13+10h], rax
push 20h ; ' '
pop rdx
mov rdi, r12
mov rsi, rbx
mov rcx, r13
call _ZL9sd_tilingP11ggml_tensorS0_iifSt8functionIFvS0_S0_bEE; sd_tiling(ggml_tensor *,ggml_tensor *,int,int,float,std::function<void ()(ggml_tensor *,ggml_tensor *,bool)>)
lea rdi, [rsp+78h+var_50]; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
loc_3650C:
add r14, 13C0h
mov rdi, r14; this
call _ZN10GGMLModule19free_compute_bufferEv; GGMLModule::free_compute_buffer(void)
cmp [rsp+78h+var_71], 1
jnz short loc_36566
mov rdi, rbx
call ggml_nelements
mov rcx, [rbx+118h]
xor edx, edx
test rax, rax
cmovle rax, rdx
movss xmm0, cs:dword_97008
movss xmm1, cs:dword_9700C
loc_3654A:
cmp rax, rdx
jz short loc_36566
movss xmm2, dword ptr [rcx+rdx*4]
addss xmm2, xmm0
mulss xmm2, xmm1
movss dword ptr [rcx+rdx*4], xmm2
inc rdx
jmp short loc_3654A
loc_36566:
call ggml_time_ms
lea rcx, aDecode; "DECODE"
lea r8, aEncode; "ENCODE"
cmp [rsp+78h+var_71], 0
cmovnz r8, rcx
sub rax, r15
cvtsi2ss xmm0, rax
divss xmm0, cs:dword_99820
cvtss2sd xmm0, xmm0
lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aComputingVaeMo; "computing vae [mode: %s] graph complete"...
xor edi, edi
mov edx, 434h
mov al, 1
call _Z10log_printf14sd_log_level_tPKciS1_z; log_printf(sd_log_level_t,char const*,int,char const*,...)
cmp [rsp+78h+var_71], 1
jnz short loc_365FF
mov rdi, rbx
call ggml_nelements
mov rcx, [rbx+118h]
xor edx, edx
test rax, rax
cmovle rax, rdx
movss xmm0, cs:dword_97008
xorps xmm1, xmm1
loc_365DC:
cmp rax, rdx
jz short loc_365FF
movss xmm2, dword ptr [rcx+rdx*4]
movaps xmm3, xmm0
minss xmm3, xmm2
cmpltss xmm2, xmm1
andnps xmm2, xmm3
movss dword ptr [rcx+rdx*4], xmm2
inc rdx
jmp short loc_365DC
loc_365FF:
mov rax, rbx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_36613:
mov rbx, rax
mov rdi, r13; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
mov rdi, rbx
call __Unwind_Resume
| _QWORD * StableDiffusionGGML::compute_first_stage(long long a1, long long a2, _QWORD *a3, int a4)
{
long long v7; // rcx
long long v8; // r9
long long v9; // rcx
long long v10; // r9
long long v11; // r8
_QWORD *v12; // rbx
long long v13; // rdx
int v14; // ecx
int v15; // r8d
int v16; // r9d
_QWORD *v17; // rsi
long long v18; // rcx
int v19; // r8d
int v20; // r9d
int v21; // r9d
int v22; // r9d
_QWORD *v23; // rdi
long long v24; // rdx
long long v25; // rax
long long v26; // rdx
long long v27; // rax
long long v28; // rcx
int v29; // r9d
const char *v30; // r8
long long v31; // rax
long long v32; // rcx
long long v33; // rdx
__m128 v34; // xmm1
__m128 v35; // xmm2
__m128 v36; // xmm3
char v38; // [rsp+7h] [rbp-71h] BYREF
_QWORD v39[4]; // [rsp+8h] [rbp-70h] BYREF
_QWORD v40[10]; // [rsp+28h] [rbp-50h] BYREF
v38 = a4;
v7 = a3[2];
v8 = a3[3];
if ( a4 )
{
v9 = 8 * v7;
v10 = 8 * v8;
}
else
{
v9 = v7 / 8;
v10 = v8 / 8;
}
v11 = 3LL;
if ( !(_BYTE)a4 )
v11 = 4LL * ((*(_BYTE *)(a1 + 7872) & 1) == 0) + 4;
v12 = (_QWORD *)ggml_new_tensor_3d(a2, 0LL, v9, v10, v11);
ggml_time_ms(a2, 0LL, v13);
if ( *(_BYTE *)(a1 + 7872) )
{
if ( ((unsigned __int8)a4 & *(_BYTE *)(a1 + 7873)) == 1 )
{
v39[0] = a1;
v39[1] = &v38;
v39[3] = std::_Function_handler<void ()(ggml_tensor *,ggml_tensor *,bool),StableDiffusionGGML::compute_first_stage(ggml_context *,ggml_tensor *,bool)::{lambda(ggml_tensor *,ggml_tensor *,bool)#2}>::_M_invoke;
v39[2] = std::_Function_handler<void ()(ggml_tensor *,ggml_tensor *,bool),StableDiffusionGGML::compute_first_stage(ggml_context *,ggml_tensor *,bool)::{lambda(ggml_tensor *,ggml_tensor *,bool)#2}>::_M_manager;
v17 = v12;
sd_tiling((long long)a3, v12, 0x40u, v39);
std::_Function_base::~_Function_base((std::_Function_base *)v39);
}
else
{
TinyAutoEncoder::alloc_compute_buffer(a1 + 8096, (_DWORD)a3, (unsigned __int8)a4, v14, v15, v16);
v17 = v12;
TinyAutoEncoder::compute(a1 + 8096, (_DWORD)v12, *(_DWORD *)(a1 + 24), (_DWORD)a3, (unsigned __int8)a4, v22);
}
v23 = (_QWORD *)(a1 + 8096);
GGMLModule::free_compute_buffer((GGMLModule *)(a1 + 8096));
goto LABEL_25;
}
if ( !(_BYTE)a4 )
{
v25 = ggml_nelements(a3);
v18 = a3[35];
v26 = 0LL;
if ( v25 <= 0 )
v25 = 0LL;
while ( v25 != v26 )
{
*(float *)(v18 + 4 * v26) = (float)(*(float *)(v18 + 4 * v26) + *(float *)(v18 + 4 * v26)) + -1.0;
++v26;
}
goto LABEL_11;
}
ggml_tensor_scale((long long)a3, 1.0 / *(float *)(a1 + 28));
if ( *(_BYTE *)(a1 + 7873) != 1 )
{
LABEL_11:
AutoEncoderKL::alloc_compute_buffer(a1 + 5056, (_DWORD)a3, (unsigned __int8)a4, v18, v19, v20);
v17 = v12;
AutoEncoderKL::compute(a1 + 5056, (_DWORD)v12, *(_DWORD *)(a1 + 24), (_DWORD)a3, (unsigned __int8)a4, v21);
goto LABEL_20;
}
v40[0] = a1;
v40[1] = &v38;
v40[3] = std::_Function_handler<void ()(ggml_tensor *,ggml_tensor *,bool),StableDiffusionGGML::compute_first_stage(ggml_context *,ggml_tensor *,bool)::{lambda(ggml_tensor *,ggml_tensor *,bool)#1}>::_M_invoke;
v40[2] = std::_Function_handler<void ()(ggml_tensor *,ggml_tensor *,bool),StableDiffusionGGML::compute_first_stage(ggml_context *,ggml_tensor *,bool)::{lambda(ggml_tensor *,ggml_tensor *,bool)#1}>::_M_manager;
v17 = v12;
sd_tiling((long long)a3, v12, 0x20u, v40);
std::_Function_base::~_Function_base((std::_Function_base *)v40);
LABEL_20:
v23 = (_QWORD *)(a1 + 5056);
GGMLModule::free_compute_buffer((GGMLModule *)(a1 + 5056));
if ( v38 == 1 )
{
v23 = v12;
v27 = ggml_nelements(v12);
v28 = v12[35];
v24 = 0LL;
if ( v27 <= 0 )
v27 = 0LL;
while ( v27 != v24 )
{
*(float *)(v28 + 4 * v24) = (float)(*(float *)(v28 + 4 * v24) + 1.0) * 0.5;
++v24;
}
}
LABEL_25:
ggml_time_ms(v23, v17, v24);
v30 = "ENCODE";
if ( v38 )
v30 = "DECODE";
log_printf(
0,
(unsigned int)"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/stable-diffusion.cpp",
1076,
(unsigned int)"computing vae [mode: %s] graph completed, taking %.2fs",
(_DWORD)v30,
v29);
if ( v38 == 1 )
{
v31 = ggml_nelements(v12);
v32 = v12[35];
v33 = 0LL;
if ( v31 <= 0 )
v31 = 0LL;
v34.m128_i32[0] = 0;
while ( v31 != v33 )
{
v35 = (__m128)*(unsigned int *)(v32 + 4 * v33);
v36 = (__m128)0x3F800000u;
v36.m128_f32[0] = fminf(1.0, v35.m128_f32[0]);
*(_DWORD *)(v32 + 4 * v33++) = _mm_andnot_ps(_mm_cmplt_ss(v35, v34), v36).m128_u32[0];
}
}
return v12;
}
| compute_first_stage:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV EBP,ECX
MOV R12,RDX
MOV R14,RDI
MOV byte ptr [RSP + 0x7],BPL
MOV RCX,qword ptr [RDX + 0x10]
MOV R9,qword ptr [RDX + 0x18]
TEST EBP,EBP
JZ 0x00136325
SHL RCX,0x3
SHL R9,0x3
JMP 0x0013633e
LAB_00136325:
PUSH 0x8
POP RDI
MOV RAX,RCX
CQO
IDIV RDI
MOV RCX,RAX
MOV RAX,R9
CQO
IDIV RDI
MOV R9,RAX
LAB_0013633e:
MOV AL,byte ptr [R14 + 0x1ec0]
NOT AL
MOVZX EAX,AL
AND EAX,0x1
LEA RAX,[0x4 + RAX*0x4]
TEST BPL,BPL
PUSH 0x3
POP R8
CMOVZ R8,RAX
MOV RDI,RSI
XOR ESI,ESI
MOV RDX,RCX
MOV RCX,R9
CALL 0x00168645
MOV RBX,RAX
CALL 0x00167697
MOV R15,RAX
CMP byte ptr [R14 + 0x1ec0],0x0
JZ 0x001363df
MOV AL,byte ptr [R14 + 0x1ec1]
AND AL,BPL
CMP AL,0x1
JNZ 0x0013643e
LEA R13,[RSP + 0x8]
MOV qword ptr [R13],R14
LEA RAX,[RSP + 0x7]
MOV qword ptr [R13 + 0x8],RAX
LEA RAX,[0x137364]
MOV qword ptr [R13 + 0x18],RAX
LEA RAX,[0x13736a]
MOV qword ptr [R13 + 0x10],RAX
LAB_001363bf:
PUSH 0x40
POP RDX
MOV RDI,R12
MOV RSI,RBX
MOV RCX,R13
CALL 0x0011d265
LAB_001363d0:
LEA RDI,[RSP + 0x8]
CALL 0x0013937c
JMP 0x0013646b
LAB_001363df:
TEST BPL,BPL
JZ 0x0013647f
MOVSS XMM0,dword ptr [0x00197008]
DIVSS XMM0,dword ptr [R14 + 0x1c]
MOV RDI,R12
CALL 0x0011d11c
CMP byte ptr [R14 + 0x1ec1],0x1
JZ 0x001364c9
LAB_0013640c:
LEA R13,[R14 + 0x13c0]
MOVZX EBP,BPL
MOV RDI,R13
MOV RSI,R12
MOV EDX,EBP
CALL 0x00136626
MOV EDX,dword ptr [R14 + 0x18]
MOV RDI,R13
MOV RSI,RBX
MOV RCX,R12
MOV R8D,EBP
CALL 0x0013668e
JMP 0x0013650c
LAB_0013643e:
LEA R13,[R14 + 0x1fa0]
MOVZX EBP,BPL
MOV RDI,R13
MOV RSI,R12
MOV EDX,EBP
CALL 0x0013670a
MOV EDX,dword ptr [R14 + 0x18]
MOV RDI,R13
MOV RSI,RBX
MOV RCX,R12
MOV R8D,EBP
CALL 0x00136772
LAB_0013646b:
ADD R14,0x1fa0
MOV RDI,R14
CALL 0x0012d2d6
JMP 0x00136566
LAB_0013647f:
MOV RDI,R12
CALL 0x00167ada
MOV RCX,qword ptr [R12 + 0x118]
XOR EDX,EDX
TEST RAX,RAX
CMOVLE RAX,RDX
MOVSS XMM0,dword ptr [0x00199834]
LAB_001364a0:
CMP RAX,RDX
JZ 0x001364bc
MOVSS XMM1,dword ptr [RCX + RDX*0x4]
ADDSS XMM1,XMM1
ADDSS XMM1,XMM0
MOVSS dword ptr [RCX + RDX*0x4],XMM1
INC RDX
JMP 0x001364a0
LAB_001364bc:
TEST byte ptr [R14 + 0x1ec1],BPL
JZ 0x0013640c
LAB_001364c9:
LEA R13,[RSP + 0x28]
MOV qword ptr [R13],R14
LEA RAX,[RSP + 0x7]
MOV qword ptr [R13 + 0x8],RAX
LEA RAX,[0x136824]
MOV qword ptr [R13 + 0x18],RAX
LEA RAX,[0x13682a]
MOV qword ptr [R13 + 0x10],RAX
LAB_001364f1:
PUSH 0x20
POP RDX
MOV RDI,R12
MOV RSI,RBX
MOV RCX,R13
CALL 0x0011d265
LAB_00136502:
LEA RDI,[RSP + 0x28]
CALL 0x0013937c
LAB_0013650c:
ADD R14,0x13c0
MOV RDI,R14
CALL 0x0012d2d6
CMP byte ptr [RSP + 0x7],0x1
JNZ 0x00136566
MOV RDI,RBX
CALL 0x00167ada
MOV RCX,qword ptr [RBX + 0x118]
XOR EDX,EDX
TEST RAX,RAX
CMOVLE RAX,RDX
MOVSS XMM0,dword ptr [0x00197008]
MOVSS XMM1,dword ptr [0x0019700c]
LAB_0013654a:
CMP RAX,RDX
JZ 0x00136566
MOVSS XMM2,dword ptr [RCX + RDX*0x4]
ADDSS XMM2,XMM0
MULSS XMM2,XMM1
MOVSS dword ptr [RCX + RDX*0x4],XMM2
INC RDX
JMP 0x0013654a
LAB_00136566:
CALL 0x00167697
LEA RCX,[0x19b023]
LEA R8,[0x19b02a]
CMP byte ptr [RSP + 0x7],0x0
CMOVNZ R8,RCX
SUB RAX,R15
CVTSI2SS XMM0,RAX
DIVSS XMM0,dword ptr [0x00199820]
CVTSS2SD XMM0,XMM0
LEA RSI,[0x199c15]
LEA RCX,[0x19afec]
XOR EDI,EDI
MOV EDX,0x434
MOV AL,0x1
CALL 0x00155f59
CMP byte ptr [RSP + 0x7],0x1
JNZ 0x001365ff
MOV RDI,RBX
CALL 0x00167ada
MOV RCX,qword ptr [RBX + 0x118]
XOR EDX,EDX
TEST RAX,RAX
CMOVLE RAX,RDX
MOVSS XMM0,dword ptr [0x00197008]
XORPS XMM1,XMM1
LAB_001365dc:
CMP RAX,RDX
JZ 0x001365ff
MOVSS XMM2,dword ptr [RCX + RDX*0x4]
MOVAPS XMM3,XMM0
MINSS XMM3,XMM2
CMPLTSS XMM2,XMM1
ANDNPS XMM2,XMM3
MOVSS dword ptr [RCX + RDX*0x4],XMM2
INC RDX
JMP 0x001365dc
LAB_001365ff:
MOV RAX,RBX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* StableDiffusionGGML::compute_first_stage(ggml_context*, ggml_tensor*, bool) */
ggml_tensor * __thiscall
StableDiffusionGGML::compute_first_stage
(StableDiffusionGGML *this,ggml_context *param_1,ggml_tensor *param_2,bool param_3)
{
float fVar1;
float fVar2;
ggml_tensor *pgVar3;
int7 in_register_00000009;
long lVar4;
long lVar5;
long lVar6;
char cVar7;
char *pcVar8;
long lVar9;
float fVar10;
char local_71;
StableDiffusionGGML *local_70;
char *local_68;
code *local_60;
code *local_58;
StableDiffusionGGML *local_50;
char *local_48;
code *local_40;
code *local_38;
if ((int)CONCAT71(in_register_00000009,param_3) == 0) {
lVar4 = *(long *)(param_2 + 0x10) / 8;
lVar9 = *(long *)(param_2 + 0x18) / 8;
}
else {
lVar4 = *(long *)(param_2 + 0x10) << 3;
lVar9 = *(long *)(param_2 + 0x18) << 3;
}
cVar7 = '\x03';
if (!param_3) {
cVar7 = (~(byte)this[0x1ec0] & 1) * '\x04' + '\x04';
}
local_71 = param_3;
pgVar3 = (ggml_tensor *)ggml_new_tensor_3d(param_1,0,lVar4,lVar9,cVar7);
lVar4 = ggml_time_ms();
if (this[0x1ec0] != (StableDiffusionGGML)0x0) {
if (((byte)this[0x1ec1] & param_3) == 1) {
local_68 = &local_71;
local_58 = std::
_Function_handler<void(ggml_tensor*,ggml_tensor*,bool),StableDiffusionGGML::compute_first_stage(ggml_context*,ggml_tensor*,bool)::{lambda(ggml_tensor*,ggml_tensor*,bool)#2}>
::_M_invoke;
local_60 = std::
_Function_handler<void(ggml_tensor*,ggml_tensor*,bool),StableDiffusionGGML::compute_first_stage(ggml_context*,ggml_tensor*,bool)::{lambda(ggml_tensor*,ggml_tensor*,bool)#2}>
::_M_manager;
local_70 = this;
/* try { // try from 001363bf to 001363cf has its CatchHandler @ 00136613 */
sd_tiling(param_2,pgVar3,0x40,&local_70);
std::_Function_base::~_Function_base((_Function_base *)&local_70);
}
else {
TinyAutoEncoder::alloc_compute_buffer((TinyAutoEncoder *)(this + 0x1fa0),param_2,param_3);
TinyAutoEncoder::compute
((TinyAutoEncoder *)(this + 0x1fa0),pgVar3,*(int *)(this + 0x18),param_2,param_3);
}
GGMLModule::free_compute_buffer((GGMLModule *)(this + 0x1fa0));
goto LAB_00136566;
}
if (param_3) {
ggml_tensor_scale(param_2,DAT_00197008 / *(float *)(this + 0x1c));
if (this[0x1ec1] == (StableDiffusionGGML)0x1) goto LAB_001364c9;
LAB_0013640c:
AutoEncoderKL::alloc_compute_buffer((AutoEncoderKL *)(this + 0x13c0),param_2,param_3);
AutoEncoderKL::compute
((AutoEncoderKL *)(this + 0x13c0),pgVar3,*(int *)(this + 0x18),param_2,param_3);
}
else {
lVar6 = ggml_nelements(param_2);
fVar2 = DAT_00199834;
lVar9 = *(long *)(param_2 + 0x118);
lVar5 = 0;
if (lVar6 < 1) {
lVar6 = lVar5;
}
for (; lVar6 != lVar5; lVar5 = lVar5 + 1) {
fVar1 = *(float *)(lVar9 + lVar5 * 4);
*(float *)(lVar9 + lVar5 * 4) = fVar1 + fVar1 + fVar2;
}
if (((byte)this[0x1ec1] & param_3) == 0) goto LAB_0013640c;
LAB_001364c9:
local_48 = &local_71;
local_38 = std::
_Function_handler<void(ggml_tensor*,ggml_tensor*,bool),StableDiffusionGGML::compute_first_stage(ggml_context*,ggml_tensor*,bool)::{lambda(ggml_tensor*,ggml_tensor*,bool)#1}>
::_M_invoke;
local_40 = std::
_Function_handler<void(ggml_tensor*,ggml_tensor*,bool),StableDiffusionGGML::compute_first_stage(ggml_context*,ggml_tensor*,bool)::{lambda(ggml_tensor*,ggml_tensor*,bool)#1}>
::_M_manager;
local_50 = this;
/* try { // try from 001364f1 to 00136501 has its CatchHandler @ 00136611 */
sd_tiling(param_2,pgVar3,0x20,&local_50);
std::_Function_base::~_Function_base((_Function_base *)&local_50);
}
GGMLModule::free_compute_buffer((GGMLModule *)(this + 0x13c0));
if (local_71 == '\x01') {
lVar6 = ggml_nelements(pgVar3);
fVar1 = DAT_0019700c;
fVar2 = DAT_00197008;
lVar9 = *(long *)(pgVar3 + 0x118);
lVar5 = 0;
if (lVar6 < 1) {
lVar6 = lVar5;
}
for (; lVar6 != lVar5; lVar5 = lVar5 + 1) {
*(float *)(lVar9 + lVar5 * 4) = (*(float *)(lVar9 + lVar5 * 4) + fVar2) * fVar1;
}
}
LAB_00136566:
lVar9 = ggml_time_ms();
pcVar8 = "ENCODE";
if (local_71 != '\0') {
pcVar8 = "DECODE";
}
log_printf((double)((float)(lVar9 - lVar4) / _DAT_00199820),0,
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/stable-diffusion.cpp"
,0x434,"computing vae [mode: %s] graph completed, taking %.2fs",pcVar8);
if (local_71 == '\x01') {
lVar9 = ggml_nelements(pgVar3);
fVar2 = DAT_00197008;
lVar4 = *(long *)(pgVar3 + 0x118);
lVar6 = 0;
if (lVar9 < 1) {
lVar9 = lVar6;
}
for (; lVar9 != lVar6; lVar6 = lVar6 + 1) {
fVar1 = *(float *)(lVar4 + lVar6 * 4);
fVar10 = fVar2;
if (fVar1 <= fVar2) {
fVar10 = fVar1;
}
*(uint *)(lVar4 + lVar6 * 4) = ~-(uint)(fVar1 < 0.0) & (uint)fVar10;
}
}
return pgVar3;
}
|
|
6,173 | minja::Value::pop(minja::Value const&) | monkey531[P]llama/common/minja.hpp | Value pop(const Value& index) {
if (is_array()) {
if (array_->empty())
throw std::runtime_error("pop from empty list");
if (index.is_null()) {
auto ret = array_->back();
array_->pop_back();
return ret;
} else if (!index.is_number_integer()) {
throw std::runtime_error("pop index must be an integer: " + index.dump());
} else {
auto i = index.get<int>();
if (i < 0 || i >= static_cast<int>(array_->size()))
throw std::runtime_error("pop index out of range: " + index.dump());
auto it = array_->begin() + (i < 0 ? array_->size() + i : i);
auto ret = *it;
array_->erase(it);
return ret;
}
} else if (is_object()) {
if (!index.is_hashable())
throw std::runtime_error("Unashable type: " + index.dump());
auto it = object_->find(index.primitive_);
if (it == object_->end())
throw std::runtime_error("Key not found: " + index.dump());
auto ret = it->second;
object_->erase(it);
return ret;
} else {
throw std::runtime_error("Value is not an array or object: " + dump());
}
} | O2 | cpp | minja::Value::pop(minja::Value const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x10(%rsi), %rax
testq %rax, %rax
je 0x6cac1
movq (%rax), %rcx
cmpq 0x8(%rax), %rcx
je 0x6cb7c
movq %rbx, %rdi
callq 0x633f6
testb %al, %al
je 0x6cb17
movq 0x10(%r15), %rax
movq 0x8(%rax), %rsi
addq $-0x50, %rsi
movq %r14, %rdi
callq 0x685f4
movq 0x10(%r15), %rdi
callq 0x6db16
jmp 0x6cb6c
cmpq $0x0, 0x20(%r15)
je 0x6cc08
movq %rbx, %rdi
callq 0x62dfc
testb %al, %al
je 0x6cc64
movq 0x20(%r15), %rdi
leaq 0x40(%rbx), %rsi
callq 0x6b0bc
movq %rax, %r12
movq 0x20(%r15), %rax
cmpq 0x8(%rax), %r12
je 0x6ccc0
movq %r12, %rsi
addq $0x10, %rsi
movq %r14, %rdi
callq 0x685f4
movq 0x20(%r15), %rdi
movq %r12, %rsi
callq 0x6db30
jmp 0x6cb6c
movb 0x40(%rbx), %al
addb $-0x5, %al
cmpb $0x2, %al
jae 0x6cd19
movq %rbx, %rdi
callq 0x6b006
testl %eax, %eax
js 0x6cbac
movl %eax, %ecx
movq 0x10(%r15), %rax
movq (%rax), %r12
movq 0x8(%rax), %rax
subq %r12, %rax
pushq $0x50
popq %rsi
cqto
idivq %rsi
cmpl %eax, %ecx
jge 0x6cbac
movl %ecx, %eax
imulq $0x50, %rax, %rax
addq %rax, %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x685f4
movq 0x10(%r15), %rdi
movq %r12, %rsi
callq 0x6db2a
movq %r14, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x23450
movq %rax, %r14
leaq 0x46c04(%rip), %rsi # 0xb3792
movq %rax, %rdi
callq 0x23310
movq 0x8f453(%rip), %rsi # 0xfbff0
movq 0x8f3b4(%rip), %rdx # 0xfbf58
movq %r14, %rdi
callq 0x23ef0
pushq $0x10
popq %rdi
callq 0x23450
movq %rax, %r14
movq %rsp, %rdi
pushq $-0x1
popq %rdx
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x62e0c
leaq 0x46bf7(%rip), %rsi # 0xb37c5
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x58436
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x23e20
xorl %ebp, %ebp
movq 0x8f3fc(%rip), %rsi # 0xfbff0
movq 0x8f35d(%rip), %rdx # 0xfbf58
movq %r14, %rdi
callq 0x23ef0
jmp 0x6cd70
pushq $0x10
popq %rdi
callq 0x23450
movq %rax, %r14
movq %rsp, %rdi
pushq $-0x1
popq %rdx
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x62e0c
leaq 0x46860(%rip), %rsi # 0xb348a
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x58436
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x23e20
xorl %ebp, %ebp
movq 0x8f3a0(%rip), %rsi # 0xfbff0
movq 0x8f301(%rip), %rdx # 0xfbf58
movq %r14, %rdi
callq 0x23ef0
jmp 0x6cd70
pushq $0x10
popq %rdi
callq 0x23450
movq %rax, %r14
movq %rsp, %rdi
pushq $-0x1
popq %rdx
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x62e0c
leaq 0x466b8(%rip), %rsi # 0xb333e
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x58436
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x23e20
xorl %ebp, %ebp
movq 0x8f344(%rip), %rsi # 0xfbff0
movq 0x8f2a5(%rip), %rdx # 0xfbf58
movq %r14, %rdi
callq 0x23ef0
jmp 0x6cd70
pushq $0x10
popq %rdi
callq 0x23450
movq %rax, %r14
movq %rsp, %rdi
pushq $-0x1
popq %rdx
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x62e0c
leaq 0x46afc(%rip), %rsi # 0xb37de
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x58436
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x23e20
xorl %ebp, %ebp
movq 0x8f2e8(%rip), %rsi # 0xfbff0
movq 0x8f249(%rip), %rdx # 0xfbf58
movq %r14, %rdi
callq 0x23ef0
jmp 0x6cd70
pushq $0x10
popq %rdi
callq 0x23450
movq %rax, %r14
movq %rsp, %rdi
pushq $-0x1
popq %rdx
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x62e0c
leaq 0x46a6b(%rip), %rsi # 0xb37a6
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x58436
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x23e20
xorl %ebp, %ebp
movq 0x8f28f(%rip), %rsi # 0xfbff0
movq 0x8f1f0(%rip), %rdx # 0xfbf58
movq %r14, %rdi
callq 0x23ef0
jmp 0x6cd80
jmp 0x6cd8f
jmp 0x6cd80
jmp 0x6cd8f
jmp 0x6cd80
jmp 0x6cd8f
jmp 0x6cd80
jmp 0x6cd8f
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x241b8
jmp 0x6cd95
movq %rax, %rbx
movb $0x1, %bpl
movq %rsp, %rdi
callq 0x241b8
testb %bpl, %bpl
jne 0x6cdb3
jmp 0x6cdc8
jmp 0x6cdb0
jmp 0x6cdb0
jmp 0x6cdb0
jmp 0x6cdb0
jmp 0x6cdbd
jmp 0x6cdb0
movq %rax, %rbx
movq %r14, %rdi
callq 0x23680
jmp 0x6cdc8
movq %rax, %rbx
movq %r14, %rdi
callq 0x62c1e
movq %rbx, %rdi
callq 0x23f80
| _ZN5minja5Value3popERKS0_:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 40h
mov rbx, rdx
mov r15, rsi
mov r14, rdi
mov rax, [rsi+10h]
test rax, rax
jz short loc_6CAC1
mov rcx, [rax]
cmp rcx, [rax+8]
jz loc_6CB7C
mov rdi, rbx; this
call _ZNK5minja5Value7is_nullEv; minja::Value::is_null(void)
test al, al
jz short loc_6CB17
mov rax, [r15+10h]
mov rsi, [rax+8]
add rsi, 0FFFFFFFFFFFFFFB0h; minja::Value *
mov rdi, r14; this
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
mov rdi, [r15+10h]
call _ZNSt6vectorIN5minja5ValueESaIS1_EE8pop_backEv; std::vector<minja::Value>::pop_back(void)
jmp loc_6CB6C
loc_6CAC1:
cmp qword ptr [r15+20h], 0
jz loc_6CC08
mov rdi, rbx; this
call _ZNK5minja5Value12is_primitiveEv; minja::Value::is_primitive(void)
test al, al
jz loc_6CC64
mov rdi, [r15+20h]
lea rsi, [rbx+40h]
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE4findERSJ_; 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>>>::find(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 r12, rax
mov rax, [r15+20h]
cmp r12, [rax+8]
jz loc_6CCC0
mov rsi, r12
add rsi, 10h; minja::Value *
mov rdi, r14; this
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
mov rdi, [r15+20h]
mov rsi, r12
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEE; 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>>>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>*,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>)
jmp short loc_6CB6C
loc_6CB17:
mov al, [rbx+40h]
add al, 0FBh
cmp al, 2
jnb loc_6CD19
mov rdi, rbx
call _ZNK5minja5Value3getIiEET_v; minja::Value::get<int>(void)
test eax, eax
js short loc_6CBAC
mov ecx, eax
mov rax, [r15+10h]
mov r12, [rax]
mov rax, [rax+8]
sub rax, r12
push 50h ; 'P'
pop rsi
cqo
idiv rsi
cmp ecx, eax
jge short loc_6CBAC
mov eax, ecx
imul rax, 50h ; 'P'
add r12, rax
mov rdi, r14; this
mov rsi, r12; minja::Value *
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
mov rdi, [r15+10h]
mov rsi, r12
call _ZNSt6vectorIN5minja5ValueESaIS1_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EE; std::vector<minja::Value>::erase(__gnu_cxx::__normal_iterator<minja::Value const*,std::vector<minja::Value>>)
loc_6CB6C:
mov rax, r14
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_6CB7C:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aPopFromEmptyLi; "pop from empty list"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_6CBAC:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rsi, rbx
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aPopIndexOutOfR; "pop index out of range: "
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_48]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp loc_6CD70
loc_6CC08:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rsi, r15
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aValueIsNotAnAr_0; "Value is not an array or object: "
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_48]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp loc_6CD70
loc_6CC64:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rsi, rbx
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aUnashableType; "Unashable type: "
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_48]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp loc_6CD70
loc_6CCC0:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rsi, rbx
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aKeyNotFound_0; "Key not found: "
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_48]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short loc_6CD70
loc_6CD19:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rsi, rbx
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aPopIndexMustBe; "pop index must be an integer: "
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_48]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_6CD70:
jmp short loc_6CD80
jmp short loc_6CD8F
jmp short loc_6CD80
jmp short loc_6CD8F
jmp short loc_6CD80
jmp short loc_6CD8F
jmp short loc_6CD80
jmp short loc_6CD8F
loc_6CD80:
mov rbx, rax
lea rdi, [rsp+68h+var_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_6CD95
loc_6CD8F:
mov rbx, rax
mov bpl, 1
loc_6CD95:
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_6CDB3
jmp short loc_6CDC8
jmp short loc_6CDB0
jmp short loc_6CDB0
jmp short loc_6CDB0
jmp short loc_6CDB0
jmp short loc_6CDBD
jmp short $+2
loc_6CDB0:
mov rbx, rax
loc_6CDB3:
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_6CDC8
loc_6CDBD:
mov rbx, rax
mov rdi, r14; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_6CDC8:
mov rdi, rbx
call __Unwind_Resume
| minja::Value * minja::Value::pop(minja::Value *this, const minja::Value *a2, unsigned __int8 *a3, __m128d a4)
{
_QWORD *v5; // rax
unsigned __int8 *v6; // r12
int v7; // eax
int v8; // ecx
_QWORD *v9; // rax
const minja::Value *v10; // r12
std::runtime_error *exception; // r14
void *v13; // r14
void *v14; // r14
void *v15; // r14
void *v16; // r14
void *v17; // r14
_BYTE v18[32]; // [rsp+0h] [rbp-68h] BYREF
_BYTE v19[72]; // [rsp+20h] [rbp-48h] BYREF
v5 = (_QWORD *)*((_QWORD *)a2 + 2);
if ( v5 )
{
if ( *v5 == v5[1] )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "pop from empty list");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( minja::Value::is_null((minja::Value *)a3) )
{
minja::Value::Value(this, (const minja::Value *)(*(_QWORD *)(*((_QWORD *)a2 + 2) + 8LL) - 80LL));
std::vector<minja::Value>::pop_back(*((_QWORD *)a2 + 2));
}
else
{
if ( (unsigned __int8)(a3[64] - 5) >= 2u )
{
v17 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v18, (long long)a3, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v19, (long long)"pop index must be an integer: ", (long long)v18);
std::runtime_error::runtime_error(v17, v19);
__cxa_throw(
v17,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v7 = minja::Value::get<int>((minja::Value *)a3);
if ( v7 < 0 || (v8 = v7, v9 = (_QWORD *)*((_QWORD *)a2 + 2), v8 >= (int)((v9[1] - *v9) / 80LL)) )
{
v13 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v18, (long long)a3, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v19, (long long)"pop index out of range: ", (long long)v18);
std::runtime_error::runtime_error(v13, v19);
__cxa_throw(
v13,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v10 = (const minja::Value *)(80LL * (unsigned int)v8 + *v9);
minja::Value::Value(this, v10);
std::vector<minja::Value>::erase(*((_QWORD *)a2 + 2), v10);
}
}
else
{
if ( !*((_QWORD *)a2 + 4) )
{
v14 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v18, (long long)a2, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v19, (long long)"Value is not an array or object: ", (long long)v18);
std::runtime_error::runtime_error(v14, v19);
__cxa_throw(
v14,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( !minja::Value::is_primitive((minja::Value *)a3) )
{
v15 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v18, (long long)a3, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v19, (long long)"Unashable type: ", (long long)v18);
std::runtime_error::runtime_error(v15, v19);
__cxa_throw(
v15,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v6 = 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>>>::find(
*((unsigned __int8 ***)a2 + 4),
a3 + 64,
a4);
if ( v6 == *(unsigned __int8 **)(*((_QWORD *)a2 + 4) + 8LL) )
{
v16 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v18, (long long)a3, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v19, (long long)"Key not found: ", (long long)v18);
std::runtime_error::runtime_error(v16, v19);
__cxa_throw(
v16,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Value::Value(this, (const minja::Value *)(v6 + 16));
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::erase(
*((_QWORD *)a2 + 4),
v6);
}
return this;
}
| pop:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV RBX,RDX
MOV R15,RSI
MOV R14,RDI
MOV RAX,qword ptr [RSI + 0x10]
TEST RAX,RAX
JZ 0x0016cac1
MOV RCX,qword ptr [RAX]
CMP RCX,qword ptr [RAX + 0x8]
JZ 0x0016cb7c
MOV RDI,RBX
CALL 0x001633f6
TEST AL,AL
JZ 0x0016cb17
MOV RAX,qword ptr [R15 + 0x10]
MOV RSI,qword ptr [RAX + 0x8]
ADD RSI,-0x50
MOV RDI,R14
CALL 0x001685f4
MOV RDI,qword ptr [R15 + 0x10]
CALL 0x0016db16
JMP 0x0016cb6c
LAB_0016cac1:
CMP qword ptr [R15 + 0x20],0x0
JZ 0x0016cc08
MOV RDI,RBX
CALL 0x00162dfc
TEST AL,AL
JZ 0x0016cc64
MOV RDI,qword ptr [R15 + 0x20]
LEA RSI,[RBX + 0x40]
CALL 0x0016b0bc
MOV R12,RAX
MOV RAX,qword ptr [R15 + 0x20]
CMP R12,qword ptr [RAX + 0x8]
JZ 0x0016ccc0
MOV RSI,R12
ADD RSI,0x10
MOV RDI,R14
CALL 0x001685f4
MOV RDI,qword ptr [R15 + 0x20]
LAB_0016cb0d:
MOV RSI,R12
CALL 0x0016db30
LAB_0016cb15:
JMP 0x0016cb6c
LAB_0016cb17:
MOV AL,byte ptr [RBX + 0x40]
ADD AL,0xfb
CMP AL,0x2
JNC 0x0016cd19
MOV RDI,RBX
CALL 0x0016b006
TEST EAX,EAX
JS 0x0016cbac
MOV ECX,EAX
MOV RAX,qword ptr [R15 + 0x10]
MOV R12,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x8]
SUB RAX,R12
PUSH 0x50
POP RSI
CQO
IDIV RSI
CMP ECX,EAX
JGE 0x0016cbac
MOV EAX,ECX
IMUL RAX,RAX,0x50
ADD R12,RAX
MOV RDI,R14
MOV RSI,R12
CALL 0x001685f4
MOV RDI,qword ptr [R15 + 0x10]
LAB_0016cb64:
MOV RSI,R12
CALL 0x0016db2a
LAB_0016cb6c:
MOV RAX,R14
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0016cb7c:
PUSH 0x10
POP RDI
CALL 0x00123450
MOV R14,RAX
LAB_0016cb87:
LEA RSI,[0x1b3792]
MOV RDI,RAX
CALL 0x00123310
LAB_0016cb96:
MOV RSI,qword ptr [0x001fbff0]
MOV RDX,qword ptr [0x001fbf58]
MOV RDI,R14
CALL 0x00123ef0
LAB_0016cbac:
PUSH 0x10
POP RDI
CALL 0x00123450
MOV R14,RAX
LAB_0016cbb7:
MOV RDI,RSP
PUSH -0x1
POP RDX
MOV RSI,RBX
XOR ECX,ECX
CALL 0x00162e0c
LAB_0016cbc7:
LEA RSI,[0x1b37c5]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x00158436
MOV BPL,0x1
LAB_0016cbde:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x00123e20
XOR EBP,EBP
MOV RSI,qword ptr [0x001fbff0]
MOV RDX,qword ptr [0x001fbf58]
MOV RDI,R14
CALL 0x00123ef0
LAB_0016cc08:
PUSH 0x10
POP RDI
CALL 0x00123450
MOV R14,RAX
LAB_0016cc13:
MOV RDI,RSP
PUSH -0x1
POP RDX
MOV RSI,R15
XOR ECX,ECX
CALL 0x00162e0c
LAB_0016cc23:
LEA RSI,[0x1b348a]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x00158436
MOV BPL,0x1
LAB_0016cc3a:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x00123e20
XOR EBP,EBP
MOV RSI,qword ptr [0x001fbff0]
MOV RDX,qword ptr [0x001fbf58]
MOV RDI,R14
CALL 0x00123ef0
LAB_0016cc64:
PUSH 0x10
POP RDI
CALL 0x00123450
MOV R14,RAX
LAB_0016cc6f:
MOV RDI,RSP
PUSH -0x1
POP RDX
MOV RSI,RBX
XOR ECX,ECX
CALL 0x00162e0c
LAB_0016cc7f:
LEA RSI,[0x1b333e]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x00158436
MOV BPL,0x1
LAB_0016cc96:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x00123e20
XOR EBP,EBP
MOV RSI,qword ptr [0x001fbff0]
MOV RDX,qword ptr [0x001fbf58]
MOV RDI,R14
CALL 0x00123ef0
LAB_0016ccc0:
PUSH 0x10
POP RDI
CALL 0x00123450
MOV R14,RAX
LAB_0016cccb:
MOV RDI,RSP
PUSH -0x1
POP RDX
MOV RSI,RBX
XOR ECX,ECX
CALL 0x00162e0c
LAB_0016ccdb:
LEA RSI,[0x1b37de]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x00158436
MOV BPL,0x1
LAB_0016ccf2:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x00123e20
XOR EBP,EBP
MOV RSI,qword ptr [0x001fbff0]
MOV RDX,qword ptr [0x001fbf58]
MOV RDI,R14
CALL 0x00123ef0
LAB_0016cd19:
PUSH 0x10
POP RDI
CALL 0x00123450
MOV R14,RAX
LAB_0016cd24:
MOV RDI,RSP
PUSH -0x1
POP RDX
MOV RSI,RBX
XOR ECX,ECX
CALL 0x00162e0c
LAB_0016cd34:
LEA RSI,[0x1b37a6]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x00158436
MOV BPL,0x1
LAB_0016cd4b:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x00123e20
XOR EBP,EBP
MOV RSI,qword ptr [0x001fbff0]
MOV RDX,qword ptr [0x001fbf58]
MOV RDI,R14
CALL 0x00123ef0
|
/* minja::Value::pop(minja::Value const&) */
Value * minja::Value::pop(Value *param_1)
{
long *plVar1;
char cVar2;
uint uVar3;
long lVar4;
runtime_error *prVar5;
Value *in_RDX;
bool bVar6;
long in_RSI;
int iVar7;
Value *pVVar8;
int1 auStack_68 [32];
string local_48 [32];
plVar1 = *(long **)(in_RSI + 0x10);
bVar6 = SUB81(in_RDX,0);
iVar7 = (int)auStack_68;
if (plVar1 == (long *)0x0) {
if (*(long *)(in_RSI + 0x20) == 0) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016cc13 to 0016cc22 has its CatchHandler @ 0016cdaa */
dump_abi_cxx11_(iVar7,SUB81(in_RSI,0));
/* try { // try from 0016cc23 to 0016cc36 has its CatchHandler @ 0016cd7e */
std::operator+((char *)local_48,(string *)"Value is not an array or object: ");
/* try { // try from 0016cc3a to 0016cc5e has its CatchHandler @ 0016cd7c */
std::runtime_error::runtime_error(prVar5,local_48);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_001fbff0,PTR__runtime_error_001fbf58);
}
cVar2 = is_primitive(in_RDX);
if (cVar2 == '\0') {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016cc6f to 0016cc7e has its CatchHandler @ 0016cda8 */
dump_abi_cxx11_(iVar7,bVar6);
/* try { // try from 0016cc7f to 0016cc92 has its CatchHandler @ 0016cd7a */
std::operator+((char *)local_48,(string *)"Unashable type: ");
/* try { // try from 0016cc96 to 0016ccba has its CatchHandler @ 0016cd78 */
std::runtime_error::runtime_error(prVar5,local_48);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_001fbff0,PTR__runtime_error_001fbf58);
}
lVar4 = 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>>>
::find(*(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>>>
**)(in_RSI + 0x20),in_RDX + 0x40);
if (lVar4 == *(long *)(*(long *)(in_RSI + 0x20) + 8)) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016cccb to 0016ccda has its CatchHandler @ 0016cda6 */
dump_abi_cxx11_(iVar7,bVar6);
/* try { // try from 0016ccdb to 0016ccee has its CatchHandler @ 0016cd76 */
std::operator+((char *)local_48,(string *)"Key not found: ");
/* try { // try from 0016ccf2 to 0016cd16 has its CatchHandler @ 0016cd74 */
std::runtime_error::runtime_error(prVar5,local_48);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_001fbff0,PTR__runtime_error_001fbf58);
}
Value(param_1,(Value *)(lVar4 + 0x10));
/* try { // try from 0016cb0d to 0016cb14 has its CatchHandler @ 0016cdbd */
nlohmann::json_abi_v3_11_3::
ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::erase(*(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
**)(in_RSI + 0x20),lVar4);
}
else {
if (*plVar1 == plVar1[1]) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016cb87 to 0016cb95 has its CatchHandler @ 0016cdb0 */
std::runtime_error::runtime_error(prVar5,"pop from empty list");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_001fbff0,PTR__runtime_error_001fbf58);
}
cVar2 = is_null(in_RDX);
if (cVar2 == '\0') {
if (1 < (byte)((char)in_RDX[0x40] - 5U)) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016cd24 to 0016cd33 has its CatchHandler @ 0016cda4 */
dump_abi_cxx11_(iVar7,bVar6);
/* try { // try from 0016cd34 to 0016cd47 has its CatchHandler @ 0016cd72 */
std::operator+((char *)local_48,(string *)"pop index must be an integer: ");
/* try { // try from 0016cd4b to 0016cd6f has its CatchHandler @ 0016cd70 */
std::runtime_error::runtime_error(prVar5,local_48);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_001fbff0,PTR__runtime_error_001fbf58);
}
uVar3 = get<int>(in_RDX);
if ((-1 < (int)uVar3) &&
(lVar4 = **(long **)(in_RSI + 0x10),
(int)uVar3 < (int)(((*(long **)(in_RSI + 0x10))[1] - lVar4) / 0x50))) {
pVVar8 = (Value *)(lVar4 + (ulong)uVar3 * 0x50);
Value(param_1,pVVar8);
/* try { // try from 0016cb64 to 0016cb6b has its CatchHandler @ 0016cdac */
std::vector<minja::Value,std::allocator<minja::Value>>::erase
(*(vector<minja::Value,std::allocator<minja::Value>> **)(in_RSI + 0x10),pVVar8);
return param_1;
}
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016cbb7 to 0016cbc6 has its CatchHandler @ 0016cdae */
dump_abi_cxx11_(iVar7,bVar6);
/* try { // try from 0016cbc7 to 0016cbda has its CatchHandler @ 0016cd8f */
std::operator+((char *)local_48,(string *)"pop index out of range: ");
/* try { // try from 0016cbde to 0016cc02 has its CatchHandler @ 0016cd80 */
std::runtime_error::runtime_error(prVar5,local_48);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_001fbff0,PTR__runtime_error_001fbf58);
}
Value(param_1,(Value *)(*(long *)(*(long *)(in_RSI + 0x10) + 8) + -0x50));
std::vector<minja::Value,std::allocator<minja::Value>>::pop_back
(*(vector<minja::Value,std::allocator<minja::Value>> **)(in_RSI + 0x10));
}
return param_1;
}
|
|
6,174 | minja::Value::pop(minja::Value const&) | monkey531[P]llama/common/minja.hpp | Value pop(const Value& index) {
if (is_array()) {
if (array_->empty())
throw std::runtime_error("pop from empty list");
if (index.is_null()) {
auto ret = array_->back();
array_->pop_back();
return ret;
} else if (!index.is_number_integer()) {
throw std::runtime_error("pop index must be an integer: " + index.dump());
} else {
auto i = index.get<int>();
if (i < 0 || i >= static_cast<int>(array_->size()))
throw std::runtime_error("pop index out of range: " + index.dump());
auto it = array_->begin() + (i < 0 ? array_->size() + i : i);
auto ret = *it;
array_->erase(it);
return ret;
}
} else if (is_object()) {
if (!index.is_hashable())
throw std::runtime_error("Unashable type: " + index.dump());
auto it = object_->find(index.primitive_);
if (it == object_->end())
throw std::runtime_error("Key not found: " + index.dump());
auto ret = it->second;
object_->erase(it);
return ret;
} else {
throw std::runtime_error("Value is not an array or object: " + dump());
}
} | O3 | cpp | minja::Value::pop(minja::Value const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %rbp
movq 0x10(%rsi), %rax
testq %rax, %rax
je 0x927b7
movq 0x8(%rax), %rsi
cmpq %rsi, (%rax)
je 0x928c5
cmpq $0x0, 0x20(%rbx)
movb 0x40(%rbx), %al
jne 0x9281c
cmpq $0x0, 0x10(%rbx)
jne 0x9281c
testb %al, %al
jne 0x9281c
cmpq $0x0, 0x30(%rbx)
jne 0x9281c
addq $-0x50, %rsi
movq %rbp, %rdi
callq 0x8d494
movq 0x10(%r15), %rdi
movq 0x8(%rdi), %rsi
addq $-0x50, %rsi
movq %rsi, 0x8(%rdi)
callq 0x8ba02
jmp 0x928b3
movq 0x20(%r15), %r14
testq %r14, %r14
je 0x92957
cmpq $0x0, 0x10(%rbx)
jne 0x929b7
cmpq $0x0, 0x20(%rbx)
jne 0x929b7
cmpq $0x0, 0x30(%rbx)
jne 0x929b7
movq (%r14), %r13
movq 0x8(%r14), %r12
cmpq %r12, %r13
je 0x9288c
movq %rbp, 0x40(%rsp)
leaq 0x40(%rbx), %rbp
movq %r13, %rdi
movq %rbp, %rsi
callq 0x8cdd6
testb %al, %al
jne 0x9287c
addq $0x60, %r13
movq 0x8(%r14), %r12
cmpq %r12, %r13
jne 0x927fe
jmp 0x9287f
addb $-0x5, %al
cmpb $0x2, %al
jae 0x92a74
movq %rbx, %rdi
callq 0x9048e
testl %eax, %eax
js 0x928f7
movq 0x10(%r15), %rcx
movq (%rcx), %r12
movq 0x8(%rcx), %rcx
subq %r12, %rcx
shrq $0x4, %rcx
imull $0xcccccccd, %ecx, %ecx # imm = 0xCCCCCCCD
cmpl %ecx, %eax
jge 0x928f7
movl %eax, %eax
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
addq %rax, %r12
movq %rbp, %rdi
movq %r12, %rsi
callq 0x8d494
movq 0x10(%r15), %rdi
movq %r12, %rsi
callq 0x93e44
jmp 0x928b3
movq %r13, %r12
movq 0x20(%r15), %rax
movq 0x8(%rax), %r13
movq 0x40(%rsp), %rbp
cmpq %r13, %r12
je 0x92a17
leaq 0x10(%r12), %rsi
movq %rbp, %rdi
callq 0x8d494
movq 0x20(%r15), %rdi
leaq 0x60(%r12), %rdx
movq %r12, %rsi
callq 0x93ec0
movq %rbp, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x1a430
movq %rax, %r14
leaq 0x5ced9(%rip), %rsi # 0xef7b2
movq %rax, %rdi
callq 0x1a310
movq 0x98708(%rip), %rsi # 0x12aff0
movq 0x98671(%rip), %rdx # 0x12af60
movq %r14, %rdi
callq 0x1aef0
movl $0x10, %edi
callq 0x1a430
movq %rax, %r14
movq %rsp, %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x8610a
leaq 0x5cec8(%rip), %rsi # 0xef7e5
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x787d1
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x1ae00
xorl %ebp, %ebp
movq 0x986ad(%rip), %rsi # 0x12aff0
movq 0x98616(%rip), %rdx # 0x12af60
movq %r14, %rdi
callq 0x1aef0
jmp 0x92acf
movl $0x10, %edi
callq 0x1a430
movq %rax, %r14
movq %rsp, %rdi
movq %r15, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x8610a
leaq 0x5cb2d(%rip), %rsi # 0xef4aa
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x787d1
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x1ae00
xorl %ebp, %ebp
movq 0x9864d(%rip), %rsi # 0x12aff0
movq 0x985b6(%rip), %rdx # 0x12af60
movq %r14, %rdi
callq 0x1aef0
jmp 0x92acf
movl $0x10, %edi
callq 0x1a430
movq %rax, %r14
movq %rsp, %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x8610a
leaq 0x5c981(%rip), %rsi # 0xef35e
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x787d1
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x1ae00
xorl %ebp, %ebp
movq 0x985ed(%rip), %rsi # 0x12aff0
movq 0x98556(%rip), %rdx # 0x12af60
movq %r14, %rdi
callq 0x1aef0
jmp 0x92acf
movl $0x10, %edi
callq 0x1a430
movq %rax, %r14
movq %rsp, %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x8610a
leaq 0x5cdc1(%rip), %rsi # 0xef7fe
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x787d1
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x1ae00
xorl %ebp, %ebp
movq 0x9858d(%rip), %rsi # 0x12aff0
movq 0x984f6(%rip), %rdx # 0x12af60
movq %r14, %rdi
callq 0x1aef0
jmp 0x92acf
movl $0x10, %edi
callq 0x1a430
movq %rax, %r14
movq %rsp, %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x8610a
leaq 0x5cd2c(%rip), %rsi # 0xef7c6
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x787d1
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x1ae00
xorl %ebp, %ebp
movq 0x98530(%rip), %rsi # 0x12aff0
movq 0x98499(%rip), %rdx # 0x12af60
movq %r14, %rdi
callq 0x1aef0
jmp 0x92adf
jmp 0x92b1f
jmp 0x92adf
jmp 0x92b1f
jmp 0x92adf
jmp 0x92b1f
jmp 0x92adf
jmp 0x92b1f
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x92afd
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a8c0
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x92b18
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a8c0
testb %bpl, %bpl
jne 0x92b4e
jmp 0x92b63
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x92b4e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a8c0
jmp 0x92b4e
jmp 0x92b4b
jmp 0x92b4b
jmp 0x92b4b
jmp 0x92b4b
jmp 0x92b58
jmp 0x92b4b
movq %rax, %rbx
movq %r14, %rdi
callq 0x1a660
jmp 0x92b63
movq %rax, %rbx
movq %rbp, %rdi
callq 0x85de8
movq %rbx, %rdi
callq 0x1af80
nop
| _ZN5minja5Value3popERKS0_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rbx, rdx
mov r15, rsi
mov rbp, rdi
mov rax, [rsi+10h]
test rax, rax
jz short loc_927B7
mov rsi, [rax+8]
cmp [rax], rsi
jz loc_928C5
cmp qword ptr [rbx+20h], 0
mov al, [rbx+40h]
jnz loc_9281C
cmp qword ptr [rbx+10h], 0
jnz loc_9281C
test al, al
jnz loc_9281C
cmp qword ptr [rbx+30h], 0
jnz loc_9281C
add rsi, 0FFFFFFFFFFFFFFB0h; minja::Value *
mov rdi, rbp; this
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
mov rdi, [r15+10h]
mov rsi, [rdi+8]
add rsi, 0FFFFFFFFFFFFFFB0h
mov [rdi+8], rsi
call _ZN9__gnu_cxx13new_allocatorIN5minja5ValueEE7destroyIS2_EEvPT_; __gnu_cxx::new_allocator<minja::Value>::destroy<minja::Value>(minja::Value *)
jmp loc_928B3
loc_927B7:
mov r14, [r15+20h]
test r14, r14
jz loc_92957
cmp qword ptr [rbx+10h], 0
jnz loc_929B7
cmp qword ptr [rbx+20h], 0
jnz loc_929B7
cmp qword ptr [rbx+30h], 0
jnz loc_929B7
mov r13, [r14]
mov r12, [r14+8]
cmp r13, r12
jz loc_9288C
mov [rsp+78h+var_38], rbp
lea rbp, [rbx+40h]
loc_927FE:
mov rdi, r13
mov rsi, rbp
call _ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::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&,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&)
test al, al
jnz short loc_9287C
add r13, 60h ; '`'
mov r12, [r14+8]
cmp r13, r12
jnz short loc_927FE
jmp short loc_9287F
loc_9281C:
add al, 0FBh
cmp al, 2
jnb loc_92A74
mov rdi, rbx
call _ZNK5minja5Value3getIiEET_v; minja::Value::get<int>(void)
test eax, eax
js loc_928F7
mov rcx, [r15+10h]
mov r12, [rcx]
mov rcx, [rcx+8]
sub rcx, r12
shr rcx, 4
imul ecx, 0CCCCCCCDh
cmp eax, ecx
jge loc_928F7
mov eax, eax
lea rax, [rax+rax*4]
shl rax, 4
add r12, rax
mov rdi, rbp; this
mov rsi, r12; minja::Value *
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
mov rdi, [r15+10h]
mov rsi, r12
call _ZNSt6vectorIN5minja5ValueESaIS1_EE8_M_eraseEN9__gnu_cxx17__normal_iteratorIPS1_S3_EE; std::vector<minja::Value>::_M_erase(__gnu_cxx::__normal_iterator<minja::Value*,std::vector<minja::Value>>)
jmp short loc_928B3
loc_9287C:
mov r12, r13
loc_9287F:
mov rax, [r15+20h]
mov r13, [rax+8]
mov rbp, [rsp+78h+var_38]
loc_9288C:
cmp r12, r13
jz loc_92A17
lea rsi, [r12+10h]; minja::Value *
mov rdi, rbp; this
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
mov rdi, [r15+20h]
lea rdx, [r12+60h]
mov rsi, r12
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEESR_; 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>>>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>*,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>,__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>*,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>)
loc_928B3:
mov rax, rbp
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_928C5:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aPopFromEmptyLi; "pop from empty list"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_928F7:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
mov rsi, rbx
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aPopIndexOutOfR; "pop index out of range: "
lea rdi, [rsp+78h+var_58]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+78h+var_58]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp loc_92ACF
loc_92957:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
mov rsi, r15
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aValueIsNotAnAr_0; "Value is not an array or object: "
lea rdi, [rsp+78h+var_58]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+78h+var_58]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp loc_92ACF
loc_929B7:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
mov rsi, rbx
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aUnashableType; "Unashable type: "
lea rdi, [rsp+78h+var_58]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+78h+var_58]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp loc_92ACF
loc_92A17:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
mov rsi, rbx
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aKeyNotFound_0; "Key not found: "
lea rdi, [rsp+78h+var_58]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+78h+var_58]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short loc_92ACF
loc_92A74:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
mov rsi, rbx
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aPopIndexMustBe; "pop index must be an integer: "
lea rdi, [rsp+78h+var_58]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+78h+var_58]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_92ACF:
jmp short loc_92ADF
jmp short loc_92B1F
jmp short loc_92ADF
jmp short loc_92B1F
jmp short loc_92ADF
jmp short loc_92B1F
jmp short loc_92ADF
jmp short loc_92B1F
loc_92ADF:
mov rbx, rax
lea rax, [rsp+78h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_92AFD
mov rsi, [rsp+78h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_92AFD:
lea rax, [rsp+78h+var_68]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_92B18
mov rsi, [rsp+78h+var_68]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_92B18:
test bpl, bpl
jnz short loc_92B4E
jmp short loc_92B63
loc_92B1F:
mov rbx, rax
lea rax, [rsp+78h+var_68]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_92B4E
mov rsi, [rsp+78h+var_68]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_92B4E
jmp short loc_92B4B
jmp short loc_92B4B
jmp short loc_92B4B
jmp short loc_92B4B
jmp short loc_92B58
jmp short $+2
loc_92B4B:
mov rbx, rax
loc_92B4E:
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_92B63
loc_92B58:
mov rbx, rax
mov rdi, rbp; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_92B63:
mov rdi, rbx
call __Unwind_Resume
| minja::Value * minja::Value::pop(minja::Value *this, const minja::Value *a2, long long a3, __m128d a4)
{
minja::Value *v6; // rbp
_QWORD *v7; // rax
long long v8; // rsi
char v9; // al
long long v10; // rdi
long long v11; // rsi
unsigned __int8 **v12; // r14
unsigned __int8 *v13; // r13
unsigned __int8 *v14; // r12
int v15; // eax
_QWORD *v16; // rcx
const minja::Value *v17; // r12
std::runtime_error *exception; // r14
void *v20; // r14
void *v21; // r14
void *v22; // r14
void *v23; // r14
void *v24; // r14
_BYTE v25[16]; // [rsp+0h] [rbp-78h] BYREF
_BYTE v26[16]; // [rsp+20h] [rbp-58h] BYREF
minja::Value *v27; // [rsp+40h] [rbp-38h]
v6 = this;
v7 = (_QWORD *)*((_QWORD *)a2 + 2);
if ( v7 )
{
v8 = v7[1];
if ( *v7 == v8 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "pop from empty list");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v9 = *(_BYTE *)(a3 + 64);
if ( *(_QWORD *)(a3 + 32) || *(_QWORD *)(a3 + 16) || v9 || *(_QWORD *)(a3 + 48) )
{
if ( (unsigned __int8)(v9 - 5) >= 2u )
{
v24 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v25, a3, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v26, (long long)"pop index must be an integer: ", (long long)v25);
std::runtime_error::runtime_error(v24, v26);
__cxa_throw(
v24,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v15 = minja::Value::get<int>((_QWORD *)a3);
if ( v15 < 0 || (v16 = (_QWORD *)*((_QWORD *)a2 + 2), v15 >= (int)(-858993459 * ((v16[1] - *v16) >> 4))) )
{
v20 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v25, a3, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v26, (long long)"pop index out of range: ", (long long)v25);
std::runtime_error::runtime_error(v20, v26);
__cxa_throw(
v20,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v17 = (const minja::Value *)(80LL * (unsigned int)v15 + *v16);
minja::Value::Value(this, v17);
std::vector<minja::Value>::_M_erase(*((_QWORD *)a2 + 2), v17);
}
else
{
minja::Value::Value(this, (const minja::Value *)(v8 - 80));
v10 = *((_QWORD *)a2 + 2);
v11 = *(_QWORD *)(v10 + 8) - 80LL;
*(_QWORD *)(v10 + 8) = v11;
__gnu_cxx::new_allocator<minja::Value>::destroy<minja::Value>(v10, v11);
}
}
else
{
v12 = (unsigned __int8 **)*((_QWORD *)a2 + 4);
if ( !v12 )
{
v21 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v25, (long long)a2, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v26, (long long)"Value is not an array or object: ", (long long)v25);
std::runtime_error::runtime_error(v21, v26);
__cxa_throw(
v21,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( *(_QWORD *)(a3 + 16) || *(_QWORD *)(a3 + 32) || *(_QWORD *)(a3 + 48) )
{
v22 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v25, a3, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v26, (long long)"Unashable type: ", (long long)v25);
std::runtime_error::runtime_error(v22, v26);
__cxa_throw(
v22,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v13 = *v12;
v14 = v12[1];
if ( *v12 != v14 )
{
v27 = this;
while ( !(unsigned __int8)nlohmann::json_abi_v3_11_3::operator==(v13, (unsigned __int8 *)(a3 + 64), a4) )
{
v13 += 96;
v14 = v12[1];
if ( v13 == v14 )
goto LABEL_22;
}
v14 = v13;
LABEL_22:
v13 = *(unsigned __int8 **)(*((_QWORD *)a2 + 4) + 8LL);
v6 = v27;
}
if ( v14 == v13 )
{
v23 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v25, a3, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v26, (long long)"Key not found: ", (long long)v25);
std::runtime_error::runtime_error(v23, v26);
__cxa_throw(
v23,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Value::Value(v6, (const minja::Value *)(v14 + 16));
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::erase(
*((_QWORD *)a2 + 4),
v14,
v14 + 96);
}
return v6;
}
| pop:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RBX,RDX
MOV R15,RSI
MOV RBP,RDI
MOV RAX,qword ptr [RSI + 0x10]
TEST RAX,RAX
JZ 0x001927b7
MOV RSI,qword ptr [RAX + 0x8]
CMP qword ptr [RAX],RSI
JZ 0x001928c5
CMP qword ptr [RBX + 0x20],0x0
MOV AL,byte ptr [RBX + 0x40]
JNZ 0x0019281c
CMP qword ptr [RBX + 0x10],0x0
JNZ 0x0019281c
TEST AL,AL
JNZ 0x0019281c
CMP qword ptr [RBX + 0x30],0x0
JNZ 0x0019281c
ADD RSI,-0x50
MOV RDI,RBP
CALL 0x0018d494
MOV RDI,qword ptr [R15 + 0x10]
MOV RSI,qword ptr [RDI + 0x8]
ADD RSI,-0x50
MOV qword ptr [RDI + 0x8],RSI
CALL 0x0018ba02
JMP 0x001928b3
LAB_001927b7:
MOV R14,qword ptr [R15 + 0x20]
TEST R14,R14
JZ 0x00192957
CMP qword ptr [RBX + 0x10],0x0
JNZ 0x001929b7
CMP qword ptr [RBX + 0x20],0x0
JNZ 0x001929b7
CMP qword ptr [RBX + 0x30],0x0
JNZ 0x001929b7
MOV R13,qword ptr [R14]
MOV R12,qword ptr [R14 + 0x8]
CMP R13,R12
JZ 0x0019288c
MOV qword ptr [RSP + 0x40],RBP
LEA RBP,[RBX + 0x40]
LAB_001927fe:
MOV RDI,R13
MOV RSI,RBP
CALL 0x0018cdd6
TEST AL,AL
JNZ 0x0019287c
ADD R13,0x60
MOV R12,qword ptr [R14 + 0x8]
CMP R13,R12
JNZ 0x001927fe
JMP 0x0019287f
LAB_0019281c:
ADD AL,0xfb
CMP AL,0x2
JNC 0x00192a74
MOV RDI,RBX
CALL 0x0019048e
TEST EAX,EAX
JS 0x001928f7
MOV RCX,qword ptr [R15 + 0x10]
MOV R12,qword ptr [RCX]
MOV RCX,qword ptr [RCX + 0x8]
SUB RCX,R12
SHR RCX,0x4
IMUL ECX,ECX,-0x33333333
CMP EAX,ECX
JGE 0x001928f7
MOV EAX,EAX
LEA RAX,[RAX + RAX*0x4]
SHL RAX,0x4
ADD R12,RAX
MOV RDI,RBP
MOV RSI,R12
CALL 0x0018d494
MOV RDI,qword ptr [R15 + 0x10]
LAB_00192872:
MOV RSI,R12
CALL 0x00193e44
LAB_0019287a:
JMP 0x001928b3
LAB_0019287c:
MOV R12,R13
LAB_0019287f:
MOV RAX,qword ptr [R15 + 0x20]
MOV R13,qword ptr [RAX + 0x8]
MOV RBP,qword ptr [RSP + 0x40]
LAB_0019288c:
CMP R12,R13
JZ 0x00192a17
LEA RSI,[R12 + 0x10]
MOV RDI,RBP
CALL 0x0018d494
MOV RDI,qword ptr [R15 + 0x20]
LEA RDX,[R12 + 0x60]
LAB_001928ab:
MOV RSI,R12
CALL 0x00193ec0
LAB_001928b3:
MOV RAX,RBP
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001928c5:
MOV EDI,0x10
CALL 0x0011a430
MOV R14,RAX
LAB_001928d2:
LEA RSI,[0x1ef7b2]
MOV RDI,RAX
CALL 0x0011a310
LAB_001928e1:
MOV RSI,qword ptr [0x0022aff0]
MOV RDX,qword ptr [0x0022af60]
MOV RDI,R14
CALL 0x0011aef0
LAB_001928f7:
MOV EDI,0x10
CALL 0x0011a430
MOV R14,RAX
LAB_00192904:
MOV RDI,RSP
MOV RSI,RBX
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0018610a
LAB_00192916:
LEA RSI,[0x1ef7e5]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001787d1
MOV BPL,0x1
LAB_0019292d:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x0011ae00
XOR EBP,EBP
MOV RSI,qword ptr [0x0022aff0]
MOV RDX,qword ptr [0x0022af60]
MOV RDI,R14
CALL 0x0011aef0
LAB_00192957:
MOV EDI,0x10
CALL 0x0011a430
MOV R14,RAX
LAB_00192964:
MOV RDI,RSP
MOV RSI,R15
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0018610a
LAB_00192976:
LEA RSI,[0x1ef4aa]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001787d1
MOV BPL,0x1
LAB_0019298d:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x0011ae00
XOR EBP,EBP
MOV RSI,qword ptr [0x0022aff0]
MOV RDX,qword ptr [0x0022af60]
MOV RDI,R14
CALL 0x0011aef0
LAB_001929b7:
MOV EDI,0x10
CALL 0x0011a430
MOV R14,RAX
LAB_001929c4:
MOV RDI,RSP
MOV RSI,RBX
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0018610a
LAB_001929d6:
LEA RSI,[0x1ef35e]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001787d1
MOV BPL,0x1
LAB_001929ed:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x0011ae00
XOR EBP,EBP
MOV RSI,qword ptr [0x0022aff0]
MOV RDX,qword ptr [0x0022af60]
MOV RDI,R14
CALL 0x0011aef0
LAB_00192a17:
MOV EDI,0x10
CALL 0x0011a430
MOV R14,RAX
LAB_00192a24:
MOV RDI,RSP
MOV RSI,RBX
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0018610a
LAB_00192a36:
LEA RSI,[0x1ef7fe]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001787d1
MOV BPL,0x1
LAB_00192a4d:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x0011ae00
XOR EBP,EBP
MOV RSI,qword ptr [0x0022aff0]
MOV RDX,qword ptr [0x0022af60]
MOV RDI,R14
CALL 0x0011aef0
LAB_00192a74:
MOV EDI,0x10
CALL 0x0011a430
MOV R14,RAX
LAB_00192a81:
MOV RDI,RSP
MOV RSI,RBX
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0018610a
LAB_00192a93:
LEA RSI,[0x1ef7c6]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001787d1
MOV BPL,0x1
LAB_00192aaa:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x0011ae00
XOR EBP,EBP
MOV RSI,qword ptr [0x0022aff0]
MOV RDX,qword ptr [0x0022af60]
MOV RDI,R14
CALL 0x0011aef0
|
/* minja::Value::pop(minja::Value const&) */
Value * minja::Value::pop(Value *param_1)
{
long *plVar1;
new_allocator<minja::Value> *this;
long lVar2;
char cVar3;
uint uVar4;
runtime_error *prVar5;
int iVar6;
Value *in_RDX;
bool bVar7;
long in_RSI;
int iVar8;
Value *pVVar9;
basic_json *pbVar10;
basic_json *pbVar11;
int1 auStack_78 [32];
string local_58 [32];
Value *local_38;
plVar1 = *(long **)(in_RSI + 0x10);
bVar7 = SUB81(in_RDX,0);
iVar8 = (int)auStack_78;
if (plVar1 == (long *)0x0) {
plVar1 = *(long **)(in_RSI + 0x20);
if (plVar1 == (long *)0x0) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00192964 to 00192975 has its CatchHandler @ 00192b45 */
dump_abi_cxx11_(iVar8,SUB81(in_RSI,0));
/* try { // try from 00192976 to 00192989 has its CatchHandler @ 00192add */
std::operator+((char *)local_58,(string *)"Value is not an array or object: ");
/* try { // try from 0019298d to 001929b1 has its CatchHandler @ 00192adb */
std::runtime_error::runtime_error(prVar5,local_58);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_0022aff0,PTR__runtime_error_0022af60);
}
if (((*(long *)(in_RDX + 0x10) != 0) || (*(long *)(in_RDX + 0x20) != 0)) ||
(*(long *)(in_RDX + 0x30) != 0)) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001929c4 to 001929d5 has its CatchHandler @ 00192b43 */
dump_abi_cxx11_(iVar8,bVar7);
/* try { // try from 001929d6 to 001929e9 has its CatchHandler @ 00192ad9 */
std::operator+((char *)local_58,(string *)"Unashable type: ");
/* try { // try from 001929ed to 00192a11 has its CatchHandler @ 00192ad7 */
std::runtime_error::runtime_error(prVar5,local_58);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_0022aff0,PTR__runtime_error_0022af60);
}
pbVar11 = (basic_json *)*plVar1;
pbVar10 = (basic_json *)plVar1[1];
if (pbVar11 != pbVar10) {
local_38 = param_1;
do {
pbVar10 = pbVar11;
cVar3 = nlohmann::json_abi_v3_11_3::operator==(pbVar10,(basic_json *)(in_RDX + 0x40));
if (cVar3 != '\0') break;
pbVar11 = pbVar10 + 0x60;
pbVar10 = (basic_json *)plVar1[1];
} while (pbVar11 != pbVar10);
pbVar11 = *(basic_json **)(*(long *)(in_RSI + 0x20) + 8);
param_1 = local_38;
}
if (pbVar10 == pbVar11) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00192a24 to 00192a35 has its CatchHandler @ 00192b41 */
dump_abi_cxx11_(iVar8,bVar7);
/* try { // try from 00192a36 to 00192a49 has its CatchHandler @ 00192ad5 */
std::operator+((char *)local_58,(string *)"Key not found: ");
/* try { // try from 00192a4d to 00192a71 has its CatchHandler @ 00192ad3 */
std::runtime_error::runtime_error(prVar5,local_58);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_0022aff0,PTR__runtime_error_0022af60);
}
Value(param_1,(Value *)(pbVar10 + 0x10));
/* try { // try from 001928ab to 001928b2 has its CatchHandler @ 00192b58 */
nlohmann::json_abi_v3_11_3::
ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::erase(*(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
**)(in_RSI + 0x20),pbVar10,pbVar10 + 0x60);
}
else {
if (*plVar1 == plVar1[1]) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001928d2 to 001928e0 has its CatchHandler @ 00192b4b */
std::runtime_error::runtime_error(prVar5,"pop from empty list");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_0022aff0,PTR__runtime_error_0022af60);
}
if (((*(long *)(in_RDX + 0x20) == 0) && (*(long *)(in_RDX + 0x10) == 0)) &&
((in_RDX[0x40] == (Value)0x0 && (*(long *)(in_RDX + 0x30) == 0)))) {
Value(param_1,(Value *)(plVar1[1] + -0x50));
this = *(new_allocator<minja::Value> **)(in_RSI + 0x10);
lVar2 = *(long *)(this + 8);
*(Value **)(this + 8) = (Value *)(lVar2 + -0x50);
__gnu_cxx::new_allocator<minja::Value>::destroy<minja::Value>(this,(Value *)(lVar2 + -0x50));
}
else {
if (1 < (byte)((char)in_RDX[0x40] - 5U)) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00192a81 to 00192a92 has its CatchHandler @ 00192b3f */
dump_abi_cxx11_(iVar8,bVar7);
/* try { // try from 00192a93 to 00192aa6 has its CatchHandler @ 00192ad1 */
std::operator+((char *)local_58,(string *)"pop index must be an integer: ");
/* try { // try from 00192aaa to 00192ace has its CatchHandler @ 00192acf */
std::runtime_error::runtime_error(prVar5,local_58);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_0022aff0,PTR__runtime_error_0022af60);
}
uVar4 = get<int>(in_RDX);
if (((int)uVar4 < 0) ||
(lVar2 = **(long **)(in_RSI + 0x10),
iVar6 = (int)((ulong)((*(long **)(in_RSI + 0x10))[1] - lVar2) >> 4),
SBORROW4(uVar4,iVar6 * -0x33333333) == (int)(uVar4 + iVar6 * 0x33333333) < 0)) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00192904 to 00192915 has its CatchHandler @ 00192b49 */
dump_abi_cxx11_(iVar8,bVar7);
/* try { // try from 00192916 to 00192929 has its CatchHandler @ 00192b1f */
std::operator+((char *)local_58,(string *)"pop index out of range: ");
/* try { // try from 0019292d to 00192951 has its CatchHandler @ 00192adf */
std::runtime_error::runtime_error(prVar5,local_58);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_0022aff0,PTR__runtime_error_0022af60);
}
pVVar9 = (Value *)(lVar2 + (ulong)uVar4 * 0x50);
Value(param_1,pVVar9);
/* try { // try from 00192872 to 00192879 has its CatchHandler @ 00192b47 */
std::vector<minja::Value,std::allocator<minja::Value>>::_M_erase
(*(vector<minja::Value,std::allocator<minja::Value>> **)(in_RSI + 0x10),pVVar9);
}
}
return param_1;
}
|
|
6,175 | allocate_blobs | eloqsql/storage/maria/ma_bitmap.c | static my_bool allocate_blobs(MARIA_HA *info, MARIA_ROW *row)
{
ulong *length, *end;
uint elements;
/*
Reserve size for:
head block
one extent
tail block
*/
elements= info->bitmap_blocks.elements;
for (length= row->blob_lengths, end= length + info->s->base.blobs;
length < end; length++)
{
if (*length && find_blob(info, *length))
return 1;
}
row->extents_count= (info->bitmap_blocks.elements - elements);
return 0;
} | O0 | c | allocate_blobs:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x2c8(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movl 0x3f0(%rcx), %ecx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x65667
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
je 0x65657
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rsi
callq 0x67620
movsbl %al, %eax
cmpl $0x0, %eax
je 0x65657
movb $0x1, -0x1(%rbp)
jmp 0x65682
jmp 0x65659
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
jmp 0x65625
movq -0x10(%rbp), %rax
movl 0x2c8(%rax), %ecx
subl -0x2c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0xac(%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| allocate_blobs:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov eax, [rax+2C8h]
mov [rbp+var_2C], eax
mov rax, [rbp+var_18]
mov rax, [rax+60h]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
mov ecx, [rcx+3F0h]
shl rcx, 3
add rax, rcx
mov [rbp+var_28], rax
loc_65625:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jnb short loc_65667
mov rax, [rbp+var_20]
cmp qword ptr [rax], 0
jz short loc_65657
mov rdi, [rbp+var_10]
mov rax, [rbp+var_20]
mov rsi, [rax]
call find_blob
movsx eax, al
cmp eax, 0
jz short loc_65657
mov [rbp+var_1], 1
jmp short loc_65682
loc_65657:
jmp short $+2
loc_65659:
mov rax, [rbp+var_20]
add rax, 8
mov [rbp+var_20], rax
jmp short loc_65625
loc_65667:
mov rax, [rbp+var_10]
mov ecx, [rax+2C8h]
sub ecx, [rbp+var_2C]
mov rax, [rbp+var_18]
mov [rax+0ACh], ecx
mov [rbp+var_1], 0
loc_65682:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char allocate_blobs(_DWORD *a1, long long a2)
{
int v3; // [rsp+4h] [rbp-2Ch]
_QWORD *v4; // [rsp+8h] [rbp-28h]
_QWORD *v5; // [rsp+10h] [rbp-20h]
v3 = a1[178];
v5 = *(_QWORD **)(a2 + 96);
v4 = &v5[*(unsigned int *)(*(_QWORD *)a1 + 1008LL)];
while ( v5 < v4 )
{
if ( *v5 && (unsigned __int8)find_blob(a1, *v5) )
return 1;
++v5;
}
*(_DWORD *)(a2 + 172) = a1[178] - v3;
return 0;
}
| allocate_blobs:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x2c8]
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x60]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0x3f0]
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
LAB_00165625:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JNC 0x00165667
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX],0x0
JZ 0x00165657
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RAX]
CALL 0x00167620
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x00165657
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00165682
LAB_00165657:
JMP 0x00165659
LAB_00165659:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x8
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00165625
LAB_00165667:
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x2c8]
SUB ECX,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0xac],ECX
MOV byte ptr [RBP + -0x1],0x0
LAB_00165682:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 allocate_blobs(long *param_1,long param_2)
{
long lVar1;
char cVar2;
long *plVar3;
long *local_28;
lVar1 = param_1[0x59];
local_28 = *(long **)(param_2 + 0x60);
plVar3 = local_28 + *(uint *)(*param_1 + 0x3f0);
while( true ) {
if (plVar3 <= local_28) {
*(int *)(param_2 + 0xac) = (int)param_1[0x59] - (int)lVar1;
return 0;
}
if ((*local_28 != 0) && (cVar2 = find_blob(param_1,*local_28), cVar2 != '\0')) break;
local_28 = local_28 + 1;
}
return 1;
}
|
|
6,176 | ConfigGamepadButton::ConfigGamepadButton(int) | untodesu[P]voxelius/game/client/gamepad_button.cc | ConfigGamepadButton::ConfigGamepadButton(int button)
{
m_gamepad_button = button;
m_name = get_button_name(button);
} | O1 | cpp | ConfigGamepadButton::ConfigGamepadButton(int):
leaq 0x205bdf(%rip), %rax # 0x253820
movq %rax, (%rdi)
movl %esi, 0x8(%rdi)
movl $0x8, %ecx
leaq 0x205bed(%rip), %r8 # 0x253840
leaq 0x14c62d(%rip), %rdx # 0x19a287
movl -0x8(%rcx,%r8), %r9d
cmpl %esi, %r9d
jne 0x4dc68
movq (%rcx,%r8), %rax
cmpl %esi, %r9d
je 0x4dc7d
addq $0x10, %rcx
cmpq $0xf8, %rcx
jne 0x4dc5a
movq %rdx, %rax
movq %rax, 0x10(%rdi)
retq
| _ZN19ConfigGamepadButtonC2Ei:
lea rax, off_253820; Alternative name is 'ConfigGamepadButton::ConfigGamepadButton(int)'
mov [rdi], rax
mov [rdi+8], esi
mov ecx, 8
lea r8, _ZL12button_names; button_names
lea rdx, aUnknown; "UNKNOWN"
loc_4DC5A:
mov r9d, [rcx+r8-8]
cmp r9d, esi
jnz short loc_4DC68
mov rax, [rcx+r8]
loc_4DC68:
cmp r9d, esi
jz short loc_4DC7D
add rcx, 10h
cmp rcx, 0F8h
jnz short loc_4DC5A
mov rax, rdx
loc_4DC7D:
mov [rdi+10h], rax
retn
| void ConfigGamepadButton::ConfigGamepadButton(ConfigGamepadButton *this, int a2)
{
long long i; // rcx
const char *v3; // rax
*(_QWORD *)this = off_253820;
*((_DWORD *)this + 2) = a2;
for ( i = 8LL; i != 248; i += 16LL )
{
if ( *(_DWORD *)((char *)&button_names + i - 8) == a2 )
{
v3 = *(const char **)((char *)&button_names + i);
goto LABEL_6;
}
}
v3 = "UNKNOWN";
LABEL_6:
*((_QWORD *)this + 2) = v3;
}
| ConfigGamepadButton:
LEA RAX,[0x353820]
MOV qword ptr [RDI],RAX
MOV dword ptr [RDI + 0x8],ESI
MOV ECX,0x8
LEA R8,[0x353840]
LEA RDX,[0x29a287]
LAB_0014dc5a:
MOV R9D,dword ptr [RCX + R8*0x1 + -0x8]
CMP R9D,ESI
JNZ 0x0014dc68
MOV RAX,qword ptr [RCX + R8*0x1]
LAB_0014dc68:
CMP R9D,ESI
JZ 0x0014dc7d
ADD RCX,0x10
CMP RCX,0xf8
JNZ 0x0014dc5a
MOV RAX,RDX
LAB_0014dc7d:
MOV qword ptr [RDI + 0x10],RAX
RET
|
/* ConfigGamepadButton::ConfigGamepadButton(int) */
void __thiscall ConfigGamepadButton::ConfigGamepadButton(ConfigGamepadButton *this,int param_1)
{
char *pcVar1;
long lVar2;
*(int ***)this = &PTR__IConfigValue_00353820;
*(int *)(this + 8) = param_1;
lVar2 = 8;
do {
if (*(int *)((long)&PTR_get_00353838 + lVar2) == param_1) {
pcVar1 = *(char **)((long)&button_names + lVar2);
goto LAB_0014dc7d;
}
lVar2 = lVar2 + 0x10;
} while (lVar2 != 0xf8);
pcVar1 = "UNKNOWN";
LAB_0014dc7d:
*(char **)(this + 0x10) = pcVar1;
return;
}
|
|
6,177 | nglog::posix_strerror_r(int, char*, unsigned long) | ng-log[P]ng-log/src/logging.cc | NGLOG_NO_EXPORT
int posix_strerror_r(int err, char* buf, size_t len) {
// Sanity check input parameters
if (buf == nullptr || len <= 0) {
errno = EINVAL;
return -1;
}
// Reset buf and errno, and try calling whatever version of strerror_r()
// is implemented by glibc
buf[0] = '\000';
int old_errno = errno;
errno = 0;
char* rc = reinterpret_cast<char*>(strerror_r(err, buf, len));
// Both versions set errno on failure
if (errno) {
// Should already be there, but better safe than sorry
buf[0] = '\000';
return -1;
}
errno = old_errno;
// POSIX is vague about whether the string will be terminated, although
// is indirectly implies that typically ERANGE will be returned, instead
// of truncating the string. This is different from the GNU implementation.
// We play it safe by always terminating the string explicitly.
buf[len - 1] = '\000';
// If the function succeeded, we can use its exit code to determine the
// semantics implemented by glibc
if (!rc) {
return 0;
} else {
// GNU semantics detected
if (rc == buf) {
return 0;
} else {
buf[0] = '\000';
#if defined(NGLOG_OS_MACOSX) || defined(NGLOG_OS_FREEBSD) || \
defined(NGLOG_OS_OPENBSD)
if (reinterpret_cast<intptr_t>(rc) < sys_nerr) {
// This means an error on MacOSX or FreeBSD.
return -1;
}
#endif
strncat(buf, rc, len - 1);
return 0;
}
}
} | O1 | cpp | nglog::posix_strerror_r(int, char*, unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rsi, %rsi
setne %al
testq %rdx, %rdx
setne %cl
testb %cl, %al
jne 0xef86
callq 0x7050
movl $0x16, (%rax)
jmp 0xefb9
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
movb $0x0, (%rsi)
callq 0x7050
movq %rax, %r15
movl (%rax), %r12d
movl $0x0, (%rax)
movl %ebp, %edi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x70e0
cmpl $0x0, (%r15)
je 0xefc9
movb $0x0, (%r14)
movl $0xffffffff, %ebp # imm = 0xFFFFFFFF
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl %r12d, (%r15)
movb $0x0, -0x1(%r14,%rbx)
testq %rax, %rax
sete %cl
cmpq %r14, %rax
sete %dl
xorl %ebp, %ebp
orb %cl, %dl
jne 0xefbe
decq %rbx
movb $0x0, (%r14)
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x7340
jmp 0xefbe
nop
| _ZN5nglog16posix_strerror_rEiPcm:
push rbp
push r15
push r14
push r12
push rbx
test rsi, rsi
setnz al
test rdx, rdx
setnz cl
test al, cl
jnz short loc_EF86
call ___errno_location
mov dword ptr [rax], 16h
jmp short loc_EFB9
loc_EF86:
mov rbx, rdx
mov r14, rsi
mov ebp, edi
mov byte ptr [rsi], 0
call ___errno_location
mov r15, rax
mov r12d, [rax]
mov dword ptr [rax], 0
mov edi, ebp
mov rsi, r14
mov rdx, rbx
call _strerror_r
cmp dword ptr [r15], 0
jz short loc_EFC9
mov byte ptr [r14], 0
loc_EFB9:
mov ebp, 0FFFFFFFFh
loc_EFBE:
mov eax, ebp
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_EFC9:
mov [r15], r12d
mov byte ptr [r14+rbx-1], 0
test rax, rax
setz cl
cmp rax, r14
setz dl
xor ebp, ebp
or dl, cl
jnz short loc_EFBE
dec rbx
mov byte ptr [r14], 0
mov rdi, r14
mov rsi, rax
mov rdx, rbx
call _strncat
jmp short loc_EFBE
| long long nglog::posix_strerror_r(nglog *this, _BYTE *a2, char *a3)
{
int *v4; // r15
int v5; // r12d
long long v6; // rax
unsigned int v7; // ebp
if ( a3 == 0LL || a2 == 0LL )
{
*(_DWORD *)__errno_location(this) = 22;
return (unsigned int)-1;
}
*a2 = 0;
v4 = (int *)((long long (*)(void))__errno_location)();
v5 = *v4;
*v4 = 0;
v6 = strerror_r((unsigned int)this, a2, a3);
if ( *v4 )
{
*a2 = 0;
return (unsigned int)-1;
}
*v4 = v5;
a3[(_QWORD)a2 - 1] = 0;
v7 = 0;
if ( v6 != 0 && v6 != (_QWORD)a2 )
{
*a2 = 0;
strncat(a2, v6, a3 - 1);
}
return v7;
}
| posix_strerror_r:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
TEST RSI,RSI
SETNZ AL
TEST RDX,RDX
SETNZ CL
TEST AL,CL
JNZ 0x0010ef86
CALL 0x00107050
MOV dword ptr [RAX],0x16
JMP 0x0010efb9
LAB_0010ef86:
MOV RBX,RDX
MOV R14,RSI
MOV EBP,EDI
MOV byte ptr [RSI],0x0
CALL 0x00107050
MOV R15,RAX
MOV R12D,dword ptr [RAX]
MOV dword ptr [RAX],0x0
MOV EDI,EBP
MOV RSI,R14
MOV RDX,RBX
CALL 0x001070e0
CMP dword ptr [R15],0x0
JZ 0x0010efc9
MOV byte ptr [R14],0x0
LAB_0010efb9:
MOV EBP,0xffffffff
LAB_0010efbe:
MOV EAX,EBP
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0010efc9:
MOV dword ptr [R15],R12D
MOV byte ptr [R14 + RBX*0x1 + -0x1],0x0
TEST RAX,RAX
SETZ CL
CMP RAX,R14
SETZ DL
XOR EBP,EBP
OR DL,CL
JNZ 0x0010efbe
DEC RBX
MOV byte ptr [R14],0x0
MOV RDI,R14
MOV RSI,RAX
MOV RDX,RBX
CALL 0x00107340
JMP 0x0010efbe
|
/* nglog::posix_strerror_r(int, char*, unsigned long) */
int8 nglog::posix_strerror_r(int param_1,char *param_2,ulong param_3)
{
int iVar1;
int *piVar2;
char *__src;
if (param_2 == (char *)0x0 || param_3 == 0) {
piVar2 = __errno_location();
*piVar2 = 0x16;
}
else {
*param_2 = '\0';
piVar2 = __errno_location();
iVar1 = *piVar2;
*piVar2 = 0;
__src = strerror_r(param_1,param_2,param_3);
if (*piVar2 == 0) {
*piVar2 = iVar1;
param_2[param_3 - 1] = '\0';
if (__src == param_2 || __src == (char *)0x0) {
return 0;
}
*param_2 = '\0';
strncat(param_2,__src,param_3 - 1);
return 0;
}
*param_2 = '\0';
}
return 0xffffffff;
}
|
|
6,178 | strxmov | eloqsql/strings/strxmov.c | char *strxmov(char *dst,const char *src, ...)
{
va_list pvar;
va_start(pvar,src);
while (src != NullS) {
while ((*dst++ = *src++)) ;
dst--;
src = va_arg(pvar, char *);
}
va_end(pvar);
*dst = 0; /* there might have been no sources! */
return dst;
} | O0 | c | strxmov:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
testb %al, %al
je 0x86558
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
movq %r9, -0xb8(%rbp)
movq %r8, -0xc0(%rbp)
movq %rcx, -0xc8(%rbp)
movq %rdx, -0xd0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x30(%rbp), %rax
leaq -0xe0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
cmpq $0x0, -0x10(%rbp)
je 0x8664c
jmp 0x865ad
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb (%rax), %al
movq -0x8(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %al, (%rcx)
cmpb $0x0, %al
je 0x865d5
jmp 0x865ad
movq -0x8(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x8(%rbp)
leaq -0x30(%rbp), %rax
movq %rax, -0xf0(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0xe4(%rbp)
cmpl $0x28, %eax
ja 0x8661c
movq -0xf0(%rbp), %rcx
movl -0xe4(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0xf8(%rbp)
jmp 0x86639
movq -0xf0(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x865a0
movq -0x8(%rbp), %rax
movb $0x0, (%rax)
movq -0x8(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
| strxmov:
push rbp
mov rbp, rsp
sub rsp, 80h
test al, al
jz short loc_86558
movaps [rbp+var_B0], xmm0
movaps [rbp+var_A0], xmm1
movaps [rbp+var_90], xmm2
movaps [rbp+var_80], xmm3
movaps [rbp+var_70], xmm4
movaps [rbp+var_60], xmm5
movaps [rbp+var_50], xmm6
movaps [rbp+var_40], xmm7
loc_86558:
mov [rbp+var_B8], r9
mov [rbp+var_C0], r8
mov [rbp+var_C8], rcx
mov [rbp+var_D0], rdx
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
lea rax, [rbp+var_30]
lea rcx, [rbp+var_E0]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 10h
loc_865A0:
cmp [rbp+var_10], 0
jz loc_8664C
jmp short $+2
loc_865AD:
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov al, [rax]
mov rcx, [rbp+var_8]
mov rdx, rcx
add rdx, 1
mov [rbp+var_8], rdx
mov [rcx], al
cmp al, 0
jz short loc_865D5
jmp short loc_865AD
loc_865D5:
mov rax, [rbp+var_8]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_8], rax
lea rax, [rbp+var_30]
mov [rbp+var_F0], rax
mov eax, [rbp+var_30]
mov [rbp+var_E4], eax
cmp eax, 28h ; '('
ja short loc_8661C
mov rcx, [rbp+var_F0]
mov edx, [rbp+var_E4]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_F8], rax
jmp short loc_86639
loc_8661C:
mov rcx, [rbp+var_F0]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_F8], rax
loc_86639:
mov rax, [rbp+var_F8]
mov rax, [rax]
mov [rbp+var_10], rax
jmp loc_865A0
loc_8664C:
mov rax, [rbp+var_8]
mov byte ptr [rax], 0
mov rax, [rbp+var_8]
add rsp, 80h
pop rbp
retn
| _BYTE * strxmov(
_BYTE *a1,
_BYTE *a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
_BYTE *v15; // rax
_BYTE *v16; // rcx
char *v17; // rax
char v19; // [rsp+18h] [rbp-E0h] BYREF
long long v20; // [rsp+28h] [rbp-D0h]
long long v21; // [rsp+30h] [rbp-C8h]
long long v22; // [rsp+38h] [rbp-C0h]
long long v23; // [rsp+40h] [rbp-B8h]
__m128 v24; // [rsp+48h] [rbp-B0h]
__m128 v25; // [rsp+58h] [rbp-A0h]
__m128 v26; // [rsp+68h] [rbp-90h]
__m128 v27; // [rsp+78h] [rbp-80h]
__m128 v28; // [rsp+88h] [rbp-70h]
__m128 v29; // [rsp+98h] [rbp-60h]
__m128 v30; // [rsp+A8h] [rbp-50h]
__m128 v31; // [rsp+B8h] [rbp-40h]
int v32; // [rsp+C8h] [rbp-30h]
int v33; // [rsp+CCh] [rbp-2Ch]
char *v34; // [rsp+D0h] [rbp-28h]
char *v35; // [rsp+D8h] [rbp-20h]
_BYTE *v36; // [rsp+E8h] [rbp-10h]
_BYTE *v37; // [rsp+F0h] [rbp-8h]
v24 = a7;
v25 = a8;
v26 = a9;
v27 = a10;
v28 = a11;
v29 = a12;
v30 = a13;
v31 = a14;
v23 = a6;
v22 = a5;
v21 = a4;
v20 = a3;
v37 = a1;
v36 = a2;
v35 = &v19;
v34 = &a15;
v33 = 48;
v32 = 16;
while ( v36 )
{
do
{
v15 = v36++;
LOBYTE(v15) = *v15;
v16 = v37++;
*v16 = (_BYTE)v15;
}
while ( (_BYTE)v15 );
--v37;
if ( (unsigned int)v32 > 0x28 )
{
v17 = v34;
v34 += 8;
}
else
{
v17 = &v35[v32];
v32 += 8;
}
v36 = *(_BYTE **)v17;
}
*v37 = 0;
return v37;
}
| strxmov:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
TEST AL,AL
JZ 0x00186558
MOVAPS xmmword ptr [RBP + -0xb0],XMM0
MOVAPS xmmword ptr [RBP + -0xa0],XMM1
MOVAPS xmmword ptr [RBP + -0x90],XMM2
MOVAPS xmmword ptr [RBP + -0x80],XMM3
MOVAPS xmmword ptr [RBP + -0x70],XMM4
MOVAPS xmmword ptr [RBP + -0x60],XMM5
MOVAPS xmmword ptr [RBP + -0x50],XMM6
MOVAPS xmmword ptr [RBP + -0x40],XMM7
LAB_00186558:
MOV qword ptr [RBP + -0xb8],R9
MOV qword ptr [RBP + -0xc0],R8
MOV qword ptr [RBP + -0xc8],RCX
MOV qword ptr [RBP + -0xd0],RDX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
LEA RAX,[RBP + -0x30]
LEA RCX,[RBP + -0xe0]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RBP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RAX + 0x4],0x30
MOV dword ptr [RAX],0x10
LAB_001865a0:
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0018664c
JMP 0x001865ad
LAB_001865ad:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV AL,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x8],RDX
MOV byte ptr [RCX],AL
CMP AL,0x0
JZ 0x001865d5
JMP 0x001865ad
LAB_001865d5:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x8],RAX
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0xf0],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0xe4],EAX
CMP EAX,0x28
JA 0x0018661c
MOV RCX,qword ptr [RBP + -0xf0]
MOV EDX,dword ptr [RBP + -0xe4]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0xf8],RAX
JMP 0x00186639
LAB_0018661c:
MOV RCX,qword ptr [RBP + -0xf0]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0xf8],RAX
LAB_00186639:
MOV RAX,qword ptr [RBP + -0xf8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001865a0
LAB_0018664c:
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x80
POP RBP
RET
|
/* WARNING: Restarted to delay deadcode elimination for space: stack */
char * strxmov(char *param_1,char *param_2)
{
char cVar1;
char *pcVar2;
int8 *local_100;
int8 local_e8 [22];
uint local_38;
int8 *local_30;
char *local_18;
char *local_10;
local_30 = (int8 *)&stack0x00000008;
local_38 = 0x10;
local_18 = param_2;
local_10 = param_1;
while (pcVar2 = local_10, local_18 != (char *)0x0) {
do {
local_10 = pcVar2;
cVar1 = *local_18;
*local_10 = cVar1;
local_18 = local_18 + 1;
pcVar2 = local_10 + 1;
} while (cVar1 != '\0');
if (local_38 < 0x29) {
local_100 = (int8 *)((long)local_e8 + (long)(int)local_38);
local_38 = local_38 + 8;
}
else {
local_100 = local_30;
local_30 = local_30 + 1;
}
local_18 = (char *)*local_100;
}
*local_10 = '\0';
return local_10;
}
|
|
6,179 | blst_p2_on_curve | corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/e2.c | int blst_p2_on_curve(const POINTonE2 *p)
{ return (int)POINTonE2_on_curve(p); } | O3 | c | blst_p2_on_curve:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp # imm = 0x128
movq %rdi, %r14
leaq 0xc0(%rdi), %r13
movl $0x60, %esi
movq %r13, %rdi
callq 0x70940
movq %rax, -0x30(%rbp)
leaq 0x30821(%rip), %r15 # 0x8cca0
leaq -0xf0(%rbp), %rbx
movabsq $-0x760c000300030003, %r12 # imm = 0x89F3FFFCFFFCFFFD
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x73ce0
movq %rbx, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movq %r15, %rcx
movq %r12, %r8
callq 0x73ba0
leaq -0x90(%rbp), %r13
movq %r13, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x73ce0
leaq -0x60(%rbp), %rdx
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rcx
callq 0x6fda0
leaq -0xc0(%rbp), %r12
movq %r12, %rdi
movq %r13, %rsi
leaq -0x60(%rbp), %rdx
movq %r15, %rcx
callq 0x6f640
movl $0x2, %edx
movq %rbx, %rdi
movq %rbx, %rsi
movq %r15, %rcx
callq 0x6f940
movl $0x2, %edx
movq %r12, %rdi
movq %r12, %rsi
movq %r15, %rcx
callq 0x6f940
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
movabsq $-0x760c000300030003, %r12 # imm = 0x89F3FFFCFFFCFFFD
movq %r12, %rcx
callq 0x73ce0
movq %r13, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %r15, %rcx
movq %r12, %r8
callq 0x73ba0
movq %r13, %rdi
movq %r13, %rsi
movq %rbx, %rdx
movq %r15, %rcx
callq 0x6f720
addq $0x60, %r14
leaq -0x150(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x73ce0
movl $0x60, %edx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x70980
orl -0x30(%rbp), %eax
addq $0x128, %rsp # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| blst_p2_on_curve:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 128h
mov r14, rdi
lea r13, [rdi+0C0h]
mov esi, 60h ; '`'
mov rdi, r13
call vec_is_zero_16x
mov [rbp+var_30], rax
lea r15, BLS12_381_P
lea rbx, [rbp+var_F0]
mov r12, 89F3FFFCFFFCFFFDh
mov rdi, rbx
mov rsi, r13
mov rdx, r15
mov rcx, r12
call sqr_mont_384x
mov rdi, rbx
mov rsi, rbx
mov rdx, r13
mov rcx, r15
mov r8, r12
call mul_mont_384x
lea r13, [rbp+var_90]
mov rdi, r13
mov rsi, rbx
mov rdx, r15
mov rcx, r12
call sqr_mont_384x
lea rdx, [rbp+var_60]
mov rdi, rbx
mov rsi, r13
mov rcx, r15
call _sub_mod_384
lea r12, [rbp+var_C0]
mov rdi, r12
mov rsi, r13
lea rdx, [rbp+var_60]
mov rcx, r15
call add_mod_384
mov edx, 2
mov rdi, rbx
mov rsi, rbx
mov rcx, r15
call lshift_mod_384
mov edx, 2
mov rdi, r12
mov rsi, r12
mov rcx, r15
call lshift_mod_384
mov rdi, r13
mov rsi, r14
mov rdx, r15
mov r12, 89F3FFFCFFFCFFFDh
mov rcx, r12
call sqr_mont_384x
mov rdi, r13
mov rsi, r13
mov rdx, r14
mov rcx, r15
mov r8, r12
call mul_mont_384x
mov rdi, r13
mov rsi, r13
mov rdx, rbx
mov rcx, r15
call add_mod_384x
add r14, 60h ; '`'
lea rbx, [rbp+var_150]
mov rdi, rbx
mov rsi, r14
mov rdx, r15
mov rcx, r12
call sqr_mont_384x
mov edx, 60h ; '`'
mov rdi, r13
mov rsi, rbx
call vec_is_equal_16x
or eax, dword ptr [rbp+var_30]
add rsp, 128h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long blst_p2_on_curve(long long a1)
{
int is_equal_16x; // eax
_BYTE v3[96]; // [rsp+0h] [rbp-150h] BYREF
_BYTE v4[48]; // [rsp+60h] [rbp-F0h] BYREF
_BYTE v5[48]; // [rsp+90h] [rbp-C0h] BYREF
_BYTE v6[48]; // [rsp+C0h] [rbp-90h] BYREF
_BYTE v7[48]; // [rsp+F0h] [rbp-60h] BYREF
long long is_zero_16x; // [rsp+120h] [rbp-30h]
is_zero_16x = vec_is_zero_16x(a1 + 192, 96LL);
sqr_mont_384x(v4, a1 + 192, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384x(v4, v4, a1 + 192, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
sqr_mont_384x(v6, v4, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
sub_mod_384(v4, v6, v7, &BLS12_381_P);
add_mod_384(v5, v6, v7, &BLS12_381_P);
lshift_mod_384(v4, v4, 2LL, &BLS12_381_P);
lshift_mod_384(v5, v5, 2LL, &BLS12_381_P);
sqr_mont_384x(v6, a1, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
mul_mont_384x(v6, v6, a1, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
add_mod_384x(v6, v6, v4, &BLS12_381_P);
sqr_mont_384x(v3, a1 + 96, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
is_equal_16x = vec_is_equal_16x(v6, v3, 96LL);
return (unsigned int)is_zero_16x | is_equal_16x;
}
| blst_p2_on_curve:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x128
MOV R14,RDI
LEA R13,[RDI + 0xc0]
MOV ESI,0x60
MOV RDI,R13
CALL 0x00170940
MOV qword ptr [RBP + -0x30],RAX
LEA R15,[0x18cca0]
LEA RBX,[RBP + -0xf0]
MOV R12,-0x760c000300030003
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R15
MOV RCX,R12
CALL 0x00173ce0
MOV RDI,RBX
MOV RSI,RBX
MOV RDX,R13
MOV RCX,R15
MOV R8,R12
CALL 0x00173ba0
LEA R13,[RBP + -0x90]
MOV RDI,R13
MOV RSI,RBX
MOV RDX,R15
MOV RCX,R12
CALL 0x00173ce0
LEA RDX,[RBP + -0x60]
MOV RDI,RBX
MOV RSI,R13
MOV RCX,R15
CALL 0x0016fda0
LEA R12,[RBP + -0xc0]
MOV RDI,R12
MOV RSI,R13
LEA RDX,[RBP + -0x60]
MOV RCX,R15
CALL 0x0016f640
MOV EDX,0x2
MOV RDI,RBX
MOV RSI,RBX
MOV RCX,R15
CALL 0x0016f940
MOV EDX,0x2
MOV RDI,R12
MOV RSI,R12
MOV RCX,R15
CALL 0x0016f940
MOV RDI,R13
MOV RSI,R14
MOV RDX,R15
MOV R12,-0x760c000300030003
MOV RCX,R12
CALL 0x00173ce0
MOV RDI,R13
MOV RSI,R13
MOV RDX,R14
MOV RCX,R15
MOV R8,R12
CALL 0x00173ba0
MOV RDI,R13
MOV RSI,R13
MOV RDX,RBX
MOV RCX,R15
CALL 0x0016f720
ADD R14,0x60
LEA RBX,[RBP + -0x150]
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
MOV RCX,R12
CALL 0x00173ce0
MOV EDX,0x60
MOV RDI,R13
MOV RSI,RBX
CALL 0x00170980
OR EAX,dword ptr [RBP + -0x30]
ADD RSP,0x128
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
uint blst_p2_on_curve(long param_1)
{
long lVar1;
uint uVar2;
int1 local_158 [96];
int1 local_f8 [48];
int1 local_c8 [48];
int1 local_98 [48];
int1 local_68 [48];
int8 local_38;
lVar1 = param_1 + 0xc0;
local_38 = vec_is_zero_16x(lVar1,0x60);
sqr_mont_384x(local_f8,lVar1,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384x(local_f8,local_f8,lVar1,BLS12_381_P,0x89f3fffcfffcfffd);
sqr_mont_384x(local_98,local_f8,BLS12_381_P,0x89f3fffcfffcfffd);
sub_mod_384(local_f8,local_98,local_68,BLS12_381_P);
add_mod_384(local_c8,local_98,local_68,BLS12_381_P);
lshift_mod_384(local_f8,local_f8,2,BLS12_381_P);
lshift_mod_384(local_c8,local_c8,2,BLS12_381_P);
sqr_mont_384x(local_98,param_1,BLS12_381_P,0x89f3fffcfffcfffd);
mul_mont_384x(local_98,local_98,param_1,BLS12_381_P,0x89f3fffcfffcfffd);
add_mod_384x(local_98,local_98,local_f8,BLS12_381_P);
sqr_mont_384x(local_158,param_1 + 0x60,BLS12_381_P,0x89f3fffcfffcfffd);
uVar2 = vec_is_equal_16x(local_98,local_158,0x60);
return uVar2 | (uint)local_38;
}
|
|
6,180 | ma_lock_key_del | eloqsql/storage/maria/ma_key_recover.c | my_bool _ma_lock_key_del(MARIA_HA *info, my_bool insert_at_end)
{
MARIA_SHARE *share= info->s;
/*
info->key_del_used is 0 initially.
If the caller needs a block (_ma_new()), we look at the free list:
- looks empty? then caller will create a new block at end of file and
remember (through info->key_del_used==2) that it will not change
state.key_del and does not need to wake up waiters as nobody will wait for
it.
- non-empty? then we wait for other users of the state.key_del list to
have finished, then we lock this list (through share->key_del_used==1)
because we need to prevent some other thread to also read state.key_del
and use the same page as ours. We remember through info->key_del_used==1
that we will have to set state.key_del at unlock time and wake up
waiters.
If the caller wants to free a block (_ma_dispose()), "empty" and
"non-empty" are treated as "non-empty" is treated above.
When we are ready to unlock, we copy share->key_del_current into
state.key_del. Unlocking happens when writing the UNDO log record, that
can make a long lock time.
Why we wrote "*looks* empty": because we are looking at state.key_del
which may be slightly old (share->key_del_current may be more recent and
exact): when we want a new page, we tolerate to treat "there was no free
page 1 millisecond ago" as "there is no free page". It's ok to non-pop
(_ma_new(), page will be found later anyway) but it's not ok to non-push
(_ma_dispose(), page would be lost).
When we leave this function, info->key_del_used is always 1 or 2.
*/
if (info->key_del_used != 1)
{
mysql_mutex_lock(&share->key_del_lock);
if (share->state.key_del == HA_OFFSET_ERROR && insert_at_end)
{
mysql_mutex_unlock(&share->key_del_lock);
info->key_del_used= 2; /* insert-with-append */
return 1;
}
while (share->key_del_used)
mysql_cond_wait(&share->key_del_cond, &share->key_del_lock);
info->key_del_used= 1;
share->key_del_used= 1;
share->key_del_current= share->state.key_del;
mysql_mutex_unlock(&share->key_del_lock);
}
return share->key_del_current == HA_OFFSET_ERROR;
} | O0 | c | ma_lock_key_del:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x67e(%rax), %eax
cmpl $0x1, %eax
je 0x7291c
movq -0x20(%rbp), %rdi
addq $0x938, %rdi # imm = 0x938
leaq 0xe015f(%rip), %rsi # 0x1529c2
movl $0x57a, %edx # imm = 0x57A
callq 0x70300
movq -0x20(%rbp), %rax
cmpq $-0x1, 0x120(%rax)
jne 0x728a8
movsbl -0x11(%rbp), %eax
cmpl $0x0, %eax
je 0x728a8
movq -0x20(%rbp), %rdi
addq $0x938, %rdi # imm = 0x938
callq 0x70370
movq -0x10(%rbp), %rax
movb $0x2, 0x67e(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x72933
jmp 0x728aa
movq -0x20(%rbp), %rax
cmpb $0x0, 0x7e9(%rax)
je 0x728e0
movq -0x20(%rbp), %rdi
addq $0x980, %rdi # imm = 0x980
movq -0x20(%rbp), %rsi
addq $0x938, %rsi # imm = 0x938
leaq 0xe00ee(%rip), %rdx # 0x1529c2
movl $0x582, %ecx # imm = 0x582
callq 0x72940
jmp 0x728aa
movq -0x10(%rbp), %rax
movb $0x1, 0x67e(%rax)
movq -0x20(%rbp), %rax
movb $0x1, 0x7e9(%rax)
movq -0x20(%rbp), %rax
movq 0x120(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x700(%rax)
movq -0x20(%rbp), %rdi
addq $0x938, %rdi # imm = 0x938
callq 0x70370
movq -0x20(%rbp), %rax
cmpq $-0x1, 0x700(%rax)
sete %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| _ma_lock_key_del:
push rbp
mov rbp, rsp
sub rsp, 20h
mov al, sil
mov [rbp+var_10], rdi
mov [rbp+var_11], al
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax+67Eh]
cmp eax, 1
jz loc_7291C
mov rdi, [rbp+var_20]
add rdi, 938h
lea rsi, aWorkspaceLlm4b_16; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 57Ah
call inline_mysql_mutex_lock_13
mov rax, [rbp+var_20]
cmp qword ptr [rax+120h], 0FFFFFFFFFFFFFFFFh
jnz short loc_728A8
movsx eax, [rbp+var_11]
cmp eax, 0
jz short loc_728A8
mov rdi, [rbp+var_20]
add rdi, 938h
call inline_mysql_mutex_unlock_13
mov rax, [rbp+var_10]
mov byte ptr [rax+67Eh], 2
mov [rbp+var_1], 1
jmp loc_72933
loc_728A8:
jmp short $+2
loc_728AA:
mov rax, [rbp+var_20]
cmp byte ptr [rax+7E9h], 0
jz short loc_728E0
mov rdi, [rbp+var_20]
add rdi, 980h
mov rsi, [rbp+var_20]
add rsi, 938h
lea rdx, aWorkspaceLlm4b_16; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 582h
call inline_mysql_cond_wait_2
jmp short loc_728AA
loc_728E0:
mov rax, [rbp+var_10]
mov byte ptr [rax+67Eh], 1
mov rax, [rbp+var_20]
mov byte ptr [rax+7E9h], 1
mov rax, [rbp+var_20]
mov rcx, [rax+120h]
mov rax, [rbp+var_20]
mov [rax+700h], rcx
mov rdi, [rbp+var_20]
add rdi, 938h
call inline_mysql_mutex_unlock_13
loc_7291C:
mov rax, [rbp+var_20]
cmp qword ptr [rax+700h], 0FFFFFFFFFFFFFFFFh
setz al
and al, 1
movzx eax, al
mov [rbp+var_1], al
loc_72933:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
| char ma_lock_key_del(long long *a1, char a2)
{
long long v3; // [rsp+0h] [rbp-20h]
v3 = *a1;
if ( *((_BYTE *)a1 + 1662) == 1 )
return *(_QWORD *)(v3 + 1792) == -1LL;
inline_mysql_mutex_lock_13(
v3 + 2360,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_key_recover.c",
0x57Au);
if ( *(_QWORD *)(v3 + 288) != -1LL || !a2 )
{
while ( *(_BYTE *)(v3 + 2025) )
inline_mysql_cond_wait_2(
v3 + 2432,
v3 + 2360,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_key_recover.c",
1410LL);
*((_BYTE *)a1 + 1662) = 1;
*(_BYTE *)(v3 + 2025) = 1;
*(_QWORD *)(v3 + 1792) = *(_QWORD *)(v3 + 288);
inline_mysql_mutex_unlock_13(v3 + 2360);
return *(_QWORD *)(v3 + 1792) == -1LL;
}
inline_mysql_mutex_unlock_13(v3 + 2360);
*((_BYTE *)a1 + 1662) = 2;
return 1;
}
| _ma_lock_key_del:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV AL,SIL
MOV qword ptr [RBP + -0x10],RDI
MOV byte ptr [RBP + -0x11],AL
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX + 0x67e]
CMP EAX,0x1
JZ 0x0017291c
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x938
LEA RSI,[0x2529c2]
MOV EDX,0x57a
CALL 0x00170300
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX + 0x120],-0x1
JNZ 0x001728a8
MOVSX EAX,byte ptr [RBP + -0x11]
CMP EAX,0x0
JZ 0x001728a8
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x938
CALL 0x00170370
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x67e],0x2
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00172933
LAB_001728a8:
JMP 0x001728aa
LAB_001728aa:
MOV RAX,qword ptr [RBP + -0x20]
CMP byte ptr [RAX + 0x7e9],0x0
JZ 0x001728e0
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x980
MOV RSI,qword ptr [RBP + -0x20]
ADD RSI,0x938
LEA RDX,[0x2529c2]
MOV ECX,0x582
CALL 0x00172940
JMP 0x001728aa
LAB_001728e0:
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x67e],0x1
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x7e9],0x1
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX + 0x120]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x700],RCX
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x938
CALL 0x00170370
LAB_0017291c:
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX + 0x700],-0x1
SETZ AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x1],AL
LAB_00172933:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
bool _ma_lock_key_del(long *param_1,char param_2)
{
long lVar1;
lVar1 = *param_1;
if (*(char *)((long)param_1 + 0x67e) != '\x01') {
inline_mysql_mutex_lock
(lVar1 + 0x938,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_key_recover.c",0x57a);
if ((*(long *)(lVar1 + 0x120) == -1) && (param_2 != '\0')) {
inline_mysql_mutex_unlock(lVar1 + 0x938);
*(int1 *)((long)param_1 + 0x67e) = 2;
return true;
}
while (*(char *)(lVar1 + 0x7e9) != '\0') {
inline_mysql_cond_wait
(lVar1 + 0x980,lVar1 + 0x938,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_key_recover.c",0x582);
}
*(int1 *)((long)param_1 + 0x67e) = 1;
*(int1 *)(lVar1 + 0x7e9) = 1;
*(int8 *)(lVar1 + 0x700) = *(int8 *)(lVar1 + 0x120);
inline_mysql_mutex_unlock(lVar1 + 0x938);
}
return *(long *)(lVar1 + 0x700) == -1;
}
|
|
6,181 | psi_rwlock_rdlock | eloqsql/mysys/my_thr_init.c | ATTRIBUTE_COLD
int psi_rwlock_rdlock(mysql_rwlock_t *that, const char *file, uint line)
{
PSI_rwlock_locker_state state;
PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_rdwait)
(&state, that->m_psi, PSI_RWLOCK_READLOCK, file, line);
int result= rw_rdlock(&that->m_rwlock);
if (locker)
PSI_RWLOCK_CALL(end_rwlock_rdwait)(locker, result);
return result;
} | O3 | c | psi_rwlock_rdlock:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %edx, %r8d
movq %rsi, %rcx
movq %rdi, %r14
leaq 0x30362b(%rip), %r15 # 0x33adb8
movq (%r15), %rax
movq 0x90(%rdi), %rsi
leaq -0x48(%rbp), %rdi
xorl %edx, %edx
callq *0x1a0(%rax)
movq %rax, %rbx
movq %r14, %rdi
callq 0x62790
movl %eax, %r14d
testq %rbx, %rbx
je 0x377c5
movq (%r15), %rax
movq %rbx, %rdi
movl %r14d, %esi
callq *0x1a8(%rax)
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| psi_rwlock_rdlock:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 38h
mov r8d, edx
mov rcx, rsi
mov r14, rdi
lea r15, PSI_server
mov rax, [r15]
mov rsi, [rdi+90h]
lea rdi, [rbp+var_48]
xor edx, edx
call qword ptr [rax+1A0h]
mov rbx, rax
mov rdi, r14
call my_rw_rdlock
mov r14d, eax
test rbx, rbx
jz short loc_377C5
mov rax, [r15]
mov rdi, rbx
mov esi, r14d
call qword ptr [rax+1A8h]
loc_377C5:
mov eax, r14d
add rsp, 38h
pop rbx
pop r14
pop r15
pop rbp
retn
| long long psi_rwlock_rdlock(long long a1, long long a2, unsigned int a3)
{
long long v3; // rbx
unsigned int v4; // r14d
_BYTE v6[72]; // [rsp+8h] [rbp-48h] BYREF
v3 = (*((long long ( **)(_BYTE *, _QWORD, _QWORD, long long, _QWORD))PSI_server + 52))(
v6,
*(_QWORD *)(a1 + 144),
0LL,
a2,
a3);
v4 = my_rw_rdlock(a1);
if ( v3 )
(*((void ( **)(long long, _QWORD))PSI_server + 53))(v3, v4);
return v4;
}
| psi_rwlock_rdlock:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV R8D,EDX
MOV RCX,RSI
MOV R14,RDI
LEA R15,[0x43adb8]
MOV RAX,qword ptr [R15]
MOV RSI,qword ptr [RDI + 0x90]
LEA RDI,[RBP + -0x48]
XOR EDX,EDX
CALL qword ptr [RAX + 0x1a0]
MOV RBX,RAX
MOV RDI,R14
CALL 0x00162790
MOV R14D,EAX
TEST RBX,RBX
JZ 0x001377c5
MOV RAX,qword ptr [R15]
MOV RDI,RBX
MOV ESI,R14D
CALL qword ptr [RAX + 0x1a8]
LAB_001377c5:
MOV EAX,R14D
ADD RSP,0x38
POP RBX
POP R14
POP R15
POP RBP
RET
|
int4 psi_rwlock_rdlock(long param_1,int8 param_2,int4 param_3)
{
int4 uVar1;
long lVar2;
int1 local_50 [48];
lVar2 = (**(code **)(PSI_server + 0x1a0))
(local_50,*(int8 *)(param_1 + 0x90),0,param_2,param_3);
uVar1 = my_rw_rdlock(param_1);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x1a8))(lVar2,uVar1);
}
return uVar1;
}
|
|
6,182 | mariadb_get_socket | eloqsql/libmariadb/libmariadb/mariadb_lib.c | static my_socket mariadb_get_socket(MYSQL *mysql)
{
my_socket sock= INVALID_SOCKET;
if (mysql->net.pvio)
{
ma_pvio_get_handle(mysql->net.pvio, &sock);
}
/* if an asynchronous connect is in progress, we need to obtain
pvio handle from async_context until the connection was
successfully established.
*/
else if (mysql->options.extension && mysql->options.extension->async_context &&
mysql->options.extension->async_context->pvio)
{
ma_pvio_get_handle(mysql->options.extension->async_context->pvio, &sock);
}
return sock;
} | O0 | c | mariadb_get_socket:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0xffffffff, -0xc(%rbp) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x2215f
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq -0xc(%rbp), %rsi
callq 0x23c00
jmp 0x221b3
movq -0x8(%rbp), %rax
cmpq $0x0, 0x480(%rax)
je 0x221b1
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0x221b1
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
cmpq $0x0, 0x18(%rax)
je 0x221b1
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq 0x18(%rax), %rdi
leaq -0xc(%rbp), %rsi
callq 0x23c00
jmp 0x221b3
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| mariadb_get_socket:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_C], 0FFFFFFFFh
mov rax, [rbp+var_8]
cmp qword ptr [rax], 0
jz short loc_2215F
mov rax, [rbp+var_8]
mov rdi, [rax]
lea rsi, [rbp+var_C]
call ma_pvio_get_handle
jmp short loc_221B3
loc_2215F:
mov rax, [rbp+var_8]
cmp qword ptr [rax+480h], 0
jz short loc_221B1
mov rax, [rbp+var_8]
mov rax, [rax+480h]
cmp qword ptr [rax+28h], 0
jz short loc_221B1
mov rax, [rbp+var_8]
mov rax, [rax+480h]
mov rax, [rax+28h]
cmp qword ptr [rax+18h], 0
jz short loc_221B1
mov rax, [rbp+var_8]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov rdi, [rax+18h]
lea rsi, [rbp+var_C]
call ma_pvio_get_handle
loc_221B1:
jmp short $+2
loc_221B3:
mov eax, [rbp+var_C]
add rsp, 10h
pop rbp
retn
| long long mariadb_get_socket(_QWORD *a1)
{
unsigned int v2; // [rsp+4h] [rbp-Ch] BYREF
_QWORD *v3; // [rsp+8h] [rbp-8h]
v3 = a1;
v2 = -1;
if ( *a1 )
{
ma_pvio_get_handle(*v3, &v2);
}
else if ( v3[144] && *(_QWORD *)(v3[144] + 40LL) && *(_QWORD *)(*(_QWORD *)(v3[144] + 40LL) + 24LL) )
{
ma_pvio_get_handle(*(_QWORD *)(*(_QWORD *)(v3[144] + 40LL) + 24LL), &v2);
}
return v2;
}
| mariadb_get_socket:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],0xffffffff
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX],0x0
JZ 0x0012215f
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX]
LEA RSI,[RBP + -0xc]
CALL 0x00123c00
JMP 0x001221b3
LAB_0012215f:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x001221b1
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
CMP qword ptr [RAX + 0x28],0x0
JZ 0x001221b1
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
CMP qword ptr [RAX + 0x18],0x0
JZ 0x001221b1
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV RDI,qword ptr [RAX + 0x18]
LEA RSI,[RBP + -0xc]
CALL 0x00123c00
LAB_001221b1:
JMP 0x001221b3
LAB_001221b3:
MOV EAX,dword ptr [RBP + -0xc]
ADD RSP,0x10
POP RBP
RET
|
int4 mariadb_get_socket(long *param_1)
{
int4 local_14;
long *local_10;
local_14 = 0xffffffff;
local_10 = param_1;
if (*param_1 == 0) {
if (((param_1[0x90] != 0) && (*(long *)(param_1[0x90] + 0x28) != 0)) &&
(*(long *)(*(long *)(param_1[0x90] + 0x28) + 0x18) != 0)) {
ma_pvio_get_handle(*(int8 *)(*(long *)(param_1[0x90] + 0x28) + 0x18),&local_14);
}
}
else {
ma_pvio_get_handle(*param_1,&local_14);
}
return local_14;
}
|
|
6,183 | MemoryManager::setShort(unsigned int, unsigned short, unsigned int*) | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/MemoryManager.cpp | bool MemoryManager::setShort(uint32_t addr, uint16_t val, uint32_t *cycles) {
if (!this->isAddrExist(addr)) {
dbgprintf("Short write to invalid addr 0x%x!\n", addr);
return false;
}
this->setByte(addr, val & 0xFF, cycles);
this->setByte(addr + 1, (val >> 8) & 0xFF);
return true;
} | O0 | cpp | MemoryManager::setShort(unsigned int, unsigned short, unsigned int*):
subq $0x28, %rsp
movw %dx, %ax
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
movw %ax, 0x12(%rsp)
movq %rcx, 0x8(%rsp)
movq 0x18(%rsp), %rdi
movq %rdi, (%rsp)
movl 0x14(%rsp), %esi
callq 0x1e830
testb $0x1, %al
jne 0x1ea99
movl 0x14(%rsp), %esi
leaq 0xaabc(%rip), %rdi # 0x29547
movb $0x0, %al
callq 0x167d0
movb $0x0, 0x27(%rsp)
jmp 0x1eadf
movq (%rsp), %rdi
movl 0x14(%rsp), %esi
movzwl 0x12(%rsp), %eax
andl $0xff, %eax
movq 0x8(%rsp), %rcx
movzbl %al, %edx
callq 0x1e850
movq (%rsp), %rdi
movl 0x14(%rsp), %esi
addl $0x1, %esi
movzwl 0x12(%rsp), %eax
sarl $0x8, %eax
andl $0xff, %eax
xorl %ecx, %ecx
movzbl %al, %edx
callq 0x1e850
movb $0x1, 0x27(%rsp)
movb 0x27(%rsp), %al
andb $0x1, %al
addq $0x28, %rsp
retq
nopw (%rax,%rax)
| _ZN13MemoryManager8setShortEjtPj:
sub rsp, 28h
mov ax, dx
mov [rsp+28h+var_10], rdi
mov [rsp+28h+var_14], esi
mov [rsp+28h+var_16], ax
mov [rsp+28h+var_20], rcx
mov rdi, [rsp+28h+var_10]; this
mov [rsp+28h+var_28], rdi
mov esi, [rsp+28h+var_14]; unsigned int
call _ZN13MemoryManager11isAddrExistEj; MemoryManager::isAddrExist(uint)
test al, 1
jnz short loc_1EA99
mov esi, [rsp+28h+var_14]
lea rdi, aShortWriteToIn; "Short write to invalid addr 0x%x!\n"
mov al, 0
call _Z9dbgprintfPKcz; dbgprintf(char const*,...)
mov [rsp+28h+var_1], 0
jmp short loc_1EADF
loc_1EA99:
mov rdi, [rsp+28h+var_28]; this
mov esi, [rsp+28h+var_14]; unsigned int
movzx eax, [rsp+28h+var_16]
and eax, 0FFh
mov rcx, [rsp+28h+var_20]; unsigned int *
movzx edx, al; unsigned __int8
call _ZN13MemoryManager7setByteEjhPj; MemoryManager::setByte(uint,uchar,uint *)
mov rdi, [rsp+28h+var_28]; this
mov esi, [rsp+28h+var_14]
add esi, 1; unsigned int
movzx eax, [rsp+28h+var_16]
sar eax, 8
and eax, 0FFh
xor ecx, ecx; unsigned int *
movzx edx, al; unsigned __int8
call _ZN13MemoryManager7setByteEjhPj; MemoryManager::setByte(uint,uchar,uint *)
mov [rsp+28h+var_1], 1
loc_1EADF:
mov al, [rsp+28h+var_1]
and al, 1
add rsp, 28h
retn
| char MemoryManager::setShort(
Cache **this,
unsigned int a2,
__int16 a3,
unsigned int *a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
long long v12; // rdx
long long v13; // rcx
long long v14; // r8
long long v15; // r9
__m128 v16; // xmm4
__m128 v17; // xmm5
double v18; // xmm4_8
double v19; // xmm5_8
if ( MemoryManager::isAddrExist((MemoryManager *)this, a2) )
{
MemoryManager::setByte(this, a2, a3, a4, a5, a6, a7, a8, *(double *)v16.m128_u64, *(double *)v17.m128_u64, a11, a12);
MemoryManager::setByte(this, a2 + 1, HIBYTE(a3), 0LL, a5, a6, a7, a8, v18, v19, a11, a12);
return 1;
}
else
{
dbgprintf(
"Short write to invalid addr 0x%x!\n",
a2,
v12,
v13,
v14,
v15,
a5,
a6,
a7,
a8,
v16,
v17,
a11,
a12,
(char)this);
return 0;
}
}
| setShort:
SUB RSP,0x28
MOV AX,DX
MOV qword ptr [RSP + 0x18],RDI
MOV dword ptr [RSP + 0x14],ESI
MOV word ptr [RSP + 0x12],AX
MOV qword ptr [RSP + 0x8],RCX
MOV RDI,qword ptr [RSP + 0x18]
MOV qword ptr [RSP],RDI
MOV ESI,dword ptr [RSP + 0x14]
CALL 0x0011e830
TEST AL,0x1
JNZ 0x0011ea99
MOV ESI,dword ptr [RSP + 0x14]
LEA RDI,[0x129547]
MOV AL,0x0
CALL 0x001167d0
MOV byte ptr [RSP + 0x27],0x0
JMP 0x0011eadf
LAB_0011ea99:
MOV RDI,qword ptr [RSP]
MOV ESI,dword ptr [RSP + 0x14]
MOVZX EAX,word ptr [RSP + 0x12]
AND EAX,0xff
MOV RCX,qword ptr [RSP + 0x8]
MOVZX EDX,AL
CALL 0x0011e850
MOV RDI,qword ptr [RSP]
MOV ESI,dword ptr [RSP + 0x14]
ADD ESI,0x1
MOVZX EAX,word ptr [RSP + 0x12]
SAR EAX,0x8
AND EAX,0xff
XOR ECX,ECX
MOVZX EDX,AL
CALL 0x0011e850
MOV byte ptr [RSP + 0x27],0x1
LAB_0011eadf:
MOV AL,byte ptr [RSP + 0x27]
AND AL,0x1
ADD RSP,0x28
RET
|
/* MemoryManager::setShort(unsigned int, unsigned short, unsigned int*) */
bool __thiscall
MemoryManager::setShort(MemoryManager *this,uint param_1,ushort param_2,uint *param_3)
{
ulong uVar1;
bool bVar2;
uVar1 = isAddrExist(this,param_1);
bVar2 = (uVar1 & 1) != 0;
if (bVar2) {
setByte(this,param_1,(uchar)param_2,param_3);
setByte(this,param_1 + 1,(uchar)(param_2 >> 8),(uint *)0x0);
}
else {
dbgprintf("Short write to invalid addr 0x%x!\n",(ulong)param_1);
}
return bVar2;
}
|
|
6,184 | MemoryManager::setShort(unsigned int, unsigned short, unsigned int*) | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/MemoryManager.cpp | bool MemoryManager::setShort(uint32_t addr, uint16_t val, uint32_t *cycles) {
if (!this->isAddrExist(addr)) {
dbgprintf("Short write to invalid addr 0x%x!\n", addr);
return false;
}
this->setByte(addr, val & 0xFF, cycles);
this->setByte(addr + 1, (val >> 8) & 0xFF);
return true;
} | O1 | cpp | MemoryManager::setShort(unsigned int, unsigned short, unsigned int*):
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
cmpl $-0x1, %esi
je 0xecd7
movq %rdi, %r14
movzwl %dx, %ebp
movzbl %bpl, %edx
movl %ebx, %esi
callq 0xebd8
leal 0x1(%rbx), %esi
shrl $0x8, %ebp
movq %r14, %rdi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0xebd8
cmpl $-0x1, %ebx
setne %al
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x683c(%rip), %rdi # 0x1551a
movl %ebx, %esi
xorl %eax, %eax
callq 0xb3b0
jmp 0xeccc
nop
| _ZN13MemoryManager8setShortEjtPj:
push rbp
push r14
push rbx
mov ebx, esi
cmp esi, 0FFFFFFFFh
jz short loc_ECD7
mov r14, rdi
movzx ebp, dx
movzx edx, bpl; unsigned __int8
mov esi, ebx; unsigned int
call _ZN13MemoryManager7setByteEjhPj; MemoryManager::setByte(uint,uchar,uint *)
lea esi, [rbx+1]; unsigned int
shr ebp, 8
mov rdi, r14; this
mov edx, ebp; unsigned __int8
xor ecx, ecx; unsigned int *
call _ZN13MemoryManager7setByteEjhPj; MemoryManager::setByte(uint,uchar,uint *)
loc_ECCC:
cmp ebx, 0FFFFFFFFh
setnz al
pop rbx
pop r14
pop rbp
retn
loc_ECD7:
lea rdi, aShortWriteToIn; "Short write to invalid addr 0x%x!\n"
mov esi, ebx
xor eax, eax
call _Z9dbgprintfPKcz; dbgprintf(char const*,...)
jmp short loc_ECCC
| bool MemoryManager::setShort(
Cache **this,
unsigned int a2,
long long a3,
unsigned int *a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
unsigned int v14; // ebp
long long v15; // r8
long long v16; // r9
__m128 v17; // xmm4
__m128 v18; // xmm5
char v20; // [rsp+0h] [rbp-18h]
if ( a2 == -1 )
{
dbgprintf(
"Short write to invalid addr 0x%x!\n",
0xFFFFFFFFLL,
a3,
(long long)a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v20);
}
else
{
v14 = (unsigned __int16)a3;
MemoryManager::setByte(this, a2, (unsigned __int8)a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
MemoryManager::setByte(this, a2 + 1, v14 >> 8, 0LL, v15, v16, a7, a8, a9, a10, v17, v18, a13, a14);
}
return a2 != -1;
}
| setShort:
PUSH RBP
PUSH R14
PUSH RBX
MOV EBX,ESI
CMP ESI,-0x1
JZ 0x0010ecd7
MOV R14,RDI
MOVZX EBP,DX
MOVZX EDX,BPL
MOV ESI,EBX
CALL 0x0010ebd8
LEA ESI,[RBX + 0x1]
SHR EBP,0x8
MOV RDI,R14
MOV EDX,EBP
XOR ECX,ECX
CALL 0x0010ebd8
LAB_0010eccc:
CMP EBX,-0x1
SETNZ AL
POP RBX
POP R14
POP RBP
RET
LAB_0010ecd7:
LEA RDI,[0x11551a]
MOV ESI,EBX
XOR EAX,EAX
CALL 0x0010b3b0
JMP 0x0010eccc
|
/* MemoryManager::setShort(unsigned int, unsigned short, unsigned int*) */
bool MemoryManager::setShort(uint param_1,ushort param_2,uint *param_3)
{
ulong uVar1;
int iVar2;
int6 in_register_00000032;
iVar2 = (int)CONCAT62(in_register_00000032,param_2);
uVar1 = CONCAT62(in_register_00000032,param_2) & 0xffffffff;
if (iVar2 == -1) {
dbgprintf("Short write to invalid addr 0x%x!\n",uVar1);
}
else {
setByte(param_1,(uchar)uVar1,(uint *)((ulong)param_3 & 0xff));
setByte(param_1,(char)param_2 + '\x01',(uint *)(((ulong)param_3 & 0xffff) >> 8));
}
return iVar2 != -1;
}
|
|
6,185 | MemoryManager::setShort(unsigned int, unsigned short, unsigned int*) | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/MemoryManager.cpp | bool MemoryManager::setShort(uint32_t addr, uint16_t val, uint32_t *cycles) {
if (!this->isAddrExist(addr)) {
dbgprintf("Short write to invalid addr 0x%x!\n", addr);
return false;
}
this->setByte(addr, val & 0xFF, cycles);
this->setByte(addr + 1, (val >> 8) & 0xFF);
return true;
} | O3 | cpp | MemoryManager::setShort(unsigned int, unsigned short, unsigned int*):
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
cmpl $-0x1, %esi
je 0xec67
movq %rdi, %r14
movzwl %dx, %ebp
movzbl %bpl, %edx
movl %ebx, %esi
callq 0xeb54
leal 0x1(%rbx), %esi
shrl $0x8, %ebp
movq %r14, %rdi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0xeb54
cmpl $-0x1, %ebx
setne %al
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x68ac(%rip), %rdi # 0x1551a
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
xorl %eax, %eax
callq 0xb3b0
jmp 0xec5c
| _ZN13MemoryManager8setShortEjtPj:
push rbp
push r14
push rbx
mov ebx, esi
cmp esi, 0FFFFFFFFh
jz short loc_EC67
mov r14, rdi
movzx ebp, dx
movzx edx, bpl; unsigned __int8
mov esi, ebx; unsigned int
call _ZN13MemoryManager7setByteEjhPj; MemoryManager::setByte(uint,uchar,uint *)
lea esi, [rbx+1]; unsigned int
shr ebp, 8
mov rdi, r14; this
mov edx, ebp; unsigned __int8
xor ecx, ecx; unsigned int *
call _ZN13MemoryManager7setByteEjhPj; MemoryManager::setByte(uint,uchar,uint *)
loc_EC5C:
cmp ebx, 0FFFFFFFFh
setnz al
pop rbx
pop r14
pop rbp
retn
loc_EC67:
lea rdi, aShortWriteToIn; "Short write to invalid addr 0x%x!\n"
mov esi, 0FFFFFFFFh
xor eax, eax
call _Z9dbgprintfPKcz; dbgprintf(char const*,...)
jmp short loc_EC5C
| bool MemoryManager::setShort(
Cache **this,
unsigned int a2,
long long a3,
unsigned int *a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
unsigned int v14; // ebp
long long v15; // r8
long long v16; // r9
__m128 v17; // xmm4
__m128 v18; // xmm5
char v20; // [rsp+0h] [rbp-18h]
if ( a2 == -1 )
{
dbgprintf(
"Short write to invalid addr 0x%x!\n",
0xFFFFFFFFLL,
a3,
(long long)a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v20);
}
else
{
v14 = (unsigned __int16)a3;
MemoryManager::setByte(this, a2, (unsigned __int8)a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
MemoryManager::setByte(this, a2 + 1, v14 >> 8, 0LL, v15, v16, a7, a8, a9, a10, v17, v18, a13, a14);
}
return a2 != -1;
}
| setShort:
PUSH RBP
PUSH R14
PUSH RBX
MOV EBX,ESI
CMP ESI,-0x1
JZ 0x0010ec67
MOV R14,RDI
MOVZX EBP,DX
MOVZX EDX,BPL
MOV ESI,EBX
CALL 0x0010eb54
LEA ESI,[RBX + 0x1]
SHR EBP,0x8
MOV RDI,R14
MOV EDX,EBP
XOR ECX,ECX
CALL 0x0010eb54
LAB_0010ec5c:
CMP EBX,-0x1
SETNZ AL
POP RBX
POP R14
POP RBP
RET
LAB_0010ec67:
LEA RDI,[0x11551a]
MOV ESI,0xffffffff
XOR EAX,EAX
CALL 0x0010b3b0
JMP 0x0010ec5c
|
/* MemoryManager::setShort(unsigned int, unsigned short, unsigned int*) */
bool MemoryManager::setShort(uint param_1,ushort param_2,uint *param_3)
{
int iVar1;
int6 in_register_00000032;
iVar1 = (int)CONCAT62(in_register_00000032,param_2);
if (iVar1 == -1) {
dbgprintf("Short write to invalid addr 0x%x!\n",0xffffffff);
}
else {
setByte(param_1,(uchar)param_2,(uint *)((ulong)param_3 & 0xff));
setByte(param_1,(uchar)param_2 + '\x01',(uint *)(((ulong)param_3 & 0xffff) >> 8));
}
return iVar1 != -1;
}
|
|
6,186 | my_getwd | eloqsql/mysys/my_getwd.c | int my_getwd(char * buf, size_t size, myf MyFlags)
{
char * pos;
DBUG_ENTER("my_getwd");
DBUG_PRINT("my",("buf:%p size: %u MyFlags %lu",
buf, (uint) size, MyFlags));
if (size < 1)
DBUG_RETURN(-1);
if (curr_dir[0]) /* Current pos is saved here */
(void) strmake(buf,&curr_dir[0],size-1);
else
{
#if defined(HAVE_GETCWD)
if (size < 2)
DBUG_RETURN(-1);
if (!getcwd(buf,(uint) (size-2)) && MyFlags & MY_WME)
{
my_errno=errno;
my_error(EE_GETWD,MYF(ME_BELL),errno);
DBUG_RETURN(-1);
}
#elif defined(HAVE_GETWD)
{
char pathname[MAXPATHLEN];
getwd(pathname);
strmake(buf,pathname,size-1);
}
#else
#error "No way to get current directory"
#endif
if (*((pos=strend(buf))-1) != FN_LIBCHAR) /* End with FN_LIBCHAR */
{
pos[0]= FN_LIBCHAR;
pos[1]=0;
}
(void) strmake(&curr_dir[0],buf, (size_t) (FN_REFLEN-1));
}
DBUG_RETURN(0);
} | O3 | c | my_getwd:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
testq %rsi, %rsi
je 0x9dfd5
movq %rdx, %r15
movq %rsi, %rdx
movq %rdi, %r14
leaq 0xb687ec(%rip), %rax # 0xc06760
cmpb $0x0, (%rax)
je 0x9df8f
decq %rdx
leaq 0xb687dd(%rip), %rsi # 0xc06760
movq %r14, %rdi
callq 0xd6a30
xorl %ebx, %ebx
jmp 0x9dfd5
cmpq $0x1, %rdx
je 0x9dfd5
addl $-0x2, %edx
movq %r14, %rdi
movq %rdx, %rsi
callq 0x29320
testb $0x10, %r15b
je 0x9dfe2
testq %rax, %rax
jne 0x9dfe2
callq 0x29790
movq %rax, %r14
movl (%rax), %r15d
callq 0xa13e6
movl %r15d, (%rax)
movl (%r14), %edx
movl $0x4, %esi
movl $0x10, %edi
xorl %eax, %eax
callq 0x9db07
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0xd69e8
cmpb $0x2f, -0x1(%rax)
je 0x9dff5
movw $0x2f, (%rax)
leaq 0xb68764(%rip), %rdi # 0xc06760
movl $0x1ff, %edx # imm = 0x1FF
movq %r14, %rsi
jmp 0x9df86
| my_getwd:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov ebx, 0FFFFFFFFh
test rsi, rsi
jz short loc_9DFD5
mov r15, rdx
mov rdx, rsi
mov r14, rdi
lea rax, curr_dir
cmp byte ptr [rax], 0
jz short loc_9DF8F
dec rdx
lea rsi, curr_dir
mov rdi, r14
loc_9DF86:
call strmake
xor ebx, ebx
jmp short loc_9DFD5
loc_9DF8F:
cmp rdx, 1
jz short loc_9DFD5
add edx, 0FFFFFFFEh
mov rdi, r14
mov rsi, rdx
call _getcwd
test r15b, 10h
jz short loc_9DFE2
test rax, rax
jnz short loc_9DFE2
call ___errno_location
mov r14, rax
mov r15d, [rax]
call _my_thread_var
mov [rax], r15d
mov edx, [r14]
mov esi, 4
mov edi, 10h
xor eax, eax
call my_error
loc_9DFD5:
mov eax, ebx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_9DFE2:
mov rdi, r14
call strend
cmp byte ptr [rax-1], 2Fh ; '/'
jz short loc_9DFF5
mov word ptr [rax], 2Fh ; '/'
loc_9DFF5:
lea rdi, curr_dir
mov edx, 1FFh
mov rsi, r14
jmp short loc_9DF86
| long long my_getwd(_BYTE *a1, long long a2, char a3)
{
unsigned int v3; // ebx
_BYTE *v5; // r14
long long v6; // rdx
_BYTE *v7; // rsi
long long v8; // rax
unsigned int *v9; // r14
unsigned int v10; // r15d
_WORD *v12; // rax
v3 = -1;
if ( a2 )
{
v5 = a1;
if ( curr_dir[0] )
{
v6 = a2 - 1;
v7 = curr_dir;
}
else
{
if ( a2 == 1 )
return v3;
v8 = getcwd(a1, (unsigned int)(a2 - 2));
if ( (a3 & 0x10) != 0 && !v8 )
{
v9 = (unsigned int *)__errno_location(a1);
v10 = *v9;
*(_DWORD *)my_thread_var(a1) = v10;
my_error(0x10u, 4LL, *v9);
return v3;
}
v12 = (_WORD *)strend(a1);
if ( *((_BYTE *)v12 - 1) != 47 )
*v12 = 47;
a1 = curr_dir;
v6 = 511LL;
v7 = v5;
}
strmake(a1, v7, v6);
return 0;
}
return v3;
}
| my_getwd:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,0xffffffff
TEST RSI,RSI
JZ 0x0019dfd5
MOV R15,RDX
MOV RDX,RSI
MOV R14,RDI
LEA RAX,[0xd06760]
CMP byte ptr [RAX],0x0
JZ 0x0019df8f
DEC RDX
LEA RSI,[0xd06760]
MOV RDI,R14
LAB_0019df86:
CALL 0x001d6a30
XOR EBX,EBX
JMP 0x0019dfd5
LAB_0019df8f:
CMP RDX,0x1
JZ 0x0019dfd5
ADD EDX,-0x2
MOV RDI,R14
MOV RSI,RDX
CALL 0x00129320
TEST R15B,0x10
JZ 0x0019dfe2
TEST RAX,RAX
JNZ 0x0019dfe2
CALL 0x00129790
MOV R14,RAX
MOV R15D,dword ptr [RAX]
CALL 0x001a13e6
MOV dword ptr [RAX],R15D
MOV EDX,dword ptr [R14]
MOV ESI,0x4
MOV EDI,0x10
XOR EAX,EAX
CALL 0x0019db07
LAB_0019dfd5:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0019dfe2:
MOV RDI,R14
CALL 0x001d69e8
CMP byte ptr [RAX + -0x1],0x2f
JZ 0x0019dff5
MOV word ptr [RAX],0x2f
LAB_0019dff5:
LEA RDI,[0xd06760]
MOV EDX,0x1ff
MOV RSI,R14
JMP 0x0019df86
|
int8 my_getwd(char *param_1,long param_2,ulong param_3)
{
int iVar1;
char *pcVar2;
int *piVar3;
int *piVar4;
int2 *puVar5;
char *pcVar6;
if (param_2 == 0) {
return 0xffffffff;
}
if (curr_dir == '\0') {
if (param_2 == 1) {
return 0xffffffff;
}
pcVar2 = getcwd(param_1,(ulong)((int)param_2 - 2));
if (((param_3 & 0x10) != 0) && (pcVar2 == (char *)0x0)) {
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar4 = (int *)_my_thread_var();
*piVar4 = iVar1;
my_error(0x10,4,*piVar3);
return 0xffffffff;
}
puVar5 = (int2 *)strend(param_1);
if (*(char *)((long)puVar5 + -1) != '/') {
*puVar5 = 0x2f;
}
pcVar6 = &curr_dir;
param_2 = 0x1ff;
pcVar2 = param_1;
}
else {
param_2 = param_2 + -1;
pcVar2 = &curr_dir;
pcVar6 = param_1;
}
strmake(pcVar6,pcVar2,param_2);
return 0;
}
|
|
6,187 | testing::internal::OutputFlagAlsoCheckEnvVar[abi:cxx11]() | seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/src/gtest-port.cc | std::string OutputFlagAlsoCheckEnvVar() {
std::string default_value_for_output_flag = "";
const char* xml_output_file_env = posix::GetEnv("XML_OUTPUT_FILE");
if (nullptr != xml_output_file_env) {
default_value_for_output_flag = std::string("xml:") + xml_output_file_env;
}
return default_value_for_output_flag;
} | O1 | cpp | testing::internal::OutputFlagAlsoCheckEnvVar[abi:cxx11]():
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
leaq 0x27a56(%rip), %rdx # 0x435f0
movq %rdx, %rsi
callq 0xfdfe
leaq 0x26c59(%rip), %rdi # 0x42802
callq 0x9660
testq %rax, %rax
je 0x1bc6a
movq %rax, %r14
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x26c47(%rip), %rsi # 0x42812
leaq 0x26c44(%rip), %rdx # 0x42816
leaq 0x8(%rsp), %rdi
callq 0xfdfe
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x9a70
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1bc10
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x1bc17
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %r14
movq %rdx, 0x8(%r14)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9670
movq (%r14), %rdi
cmpq %r15, %rdi
je 0x1bc53
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x94c0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1bc6a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x94c0
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1bc98
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x94c0
jmp 0x1bc98
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x1bcab
movq (%r15), %rsi
incq %rsi
callq 0x94c0
movq %r14, %rdi
callq 0x99a0
| _ZN7testing8internal25OutputFlagAlsoCheckEnvVarB5cxx11Ev:
push r15
push r14
push r12
push rbx
sub rsp, 48h
mov rbx, rdi
lea r15, [rdi+10h]
mov [rdi], r15
lea rdx, aSFromSSMsTotal+1Ah; ""
mov rsi, rdx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdi, aXmlOutputFile; "XML_OUTPUT_FILE"
call _getenv
test rax, rax
jz loc_1BC6A
mov r14, rax
lea r12, [rsp+68h+var_50]
mov [r12-10h], r12
lea rsi, aXml; "xml:"
lea rdx, aXml+4; ""
lea rdi, [rsp+68h+var_60]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdi, [rsp+68h+var_60]
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea r15, [rsp+68h+var_30]
mov [r15-10h], r15
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_1BC10
mov [rsp+68h+var_40], rdx
mov rdx, [rcx]
mov [rsp+68h+var_30], rdx
jmp short loc_1BC17
loc_1BC10:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r15], xmm0
loc_1BC17:
mov rdx, [rax+8]
lea r14, [rsp+68h+var_40]
mov [r14+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rdi, rbx
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r14]; void *
cmp rdi, r15
jz short loc_1BC53
mov rsi, [rsp+68h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1BC53:
mov rdi, [rsp+68h+var_60]; void *
cmp rdi, r12
jz short loc_1BC6A
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1BC6A:
mov rax, rbx
add rsp, 48h
pop rbx
pop r12
pop r14
pop r15
retn
mov r14, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r12
jz short loc_1BC98
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1BC98
mov r14, rax
loc_1BC98:
mov rdi, [rbx]; void *
cmp rdi, r15
jz short loc_1BCAB
mov rsi, [r15]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1BCAB:
mov rdi, r14
call __Unwind_Resume
| _QWORD * testing::internal::OutputFlagAlsoCheckEnvVar[abi:cxx11](_QWORD *a1)
{
long long v1; // rax
const char *v2; // r14
long long v3; // rax
_OWORD *v4; // rcx
void *v6[2]; // [rsp+8h] [rbp-60h] BYREF
_QWORD v7[2]; // [rsp+18h] [rbp-50h] BYREF
void *v8[2]; // [rsp+28h] [rbp-40h] BYREF
_OWORD v9[3]; // [rsp+38h] [rbp-30h] BYREF
*a1 = a1 + 2;
std::string::_M_construct<char const*>(a1, "", (long long)"");
v1 = getenv("XML_OUTPUT_FILE");
if ( v1 )
{
v2 = (const char *)v1;
v6[0] = v7;
std::string::_M_construct<char const*>(v6, "xml:", (long long)"");
v3 = std::string::append(v6, v2);
v8[0] = v9;
v4 = (_OWORD *)(v3 + 16);
if ( *(_QWORD *)v3 == v3 + 16 )
{
v9[0] = *v4;
}
else
{
v8[0] = *(void **)v3;
*(_QWORD *)&v9[0] = *(_QWORD *)v4;
}
v8[1] = *(void **)(v3 + 8);
*(_QWORD *)v3 = v4;
*(_QWORD *)(v3 + 8) = 0LL;
*(_BYTE *)(v3 + 16) = 0;
std::string::operator=(a1, v8);
if ( v8[0] != v9 )
operator delete(v8[0], *(_QWORD *)&v9[0] + 1LL);
if ( v6[0] != v7 )
operator delete(v6[0], v7[0] + 1LL);
}
return a1;
}
| OutputFlagAlsoCheckEnvVar[abi:cxx11]:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RBX,RDI
LEA R15,[RDI + 0x10]
MOV qword ptr [RDI],R15
LEA RDX,[0x1435f0]
MOV RSI,RDX
CALL 0x0010fdfe
LEA RDI,[0x142802]
CALL 0x00109660
TEST RAX,RAX
JZ 0x0011bc6a
MOV R14,RAX
LEA R12,[RSP + 0x18]
MOV qword ptr [R12 + -0x10],R12
LAB_0011bbc4:
LEA RSI,[0x142812]
LEA RDX,[0x142816]
LEA RDI,[RSP + 0x8]
CALL 0x0010fdfe
LAB_0011bbdc:
LEA RDI,[RSP + 0x8]
MOV RSI,R14
CALL 0x00109a70
LAB_0011bbe9:
LEA R15,[RSP + 0x38]
MOV qword ptr [R15 + -0x10],R15
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x0011bc10
MOV qword ptr [RSP + 0x28],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x38],RDX
JMP 0x0011bc17
LAB_0011bc10:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R15],XMM0
LAB_0011bc17:
MOV RDX,qword ptr [RAX + 0x8]
LEA R14,[RSP + 0x28]
MOV qword ptr [R14 + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV RDI,RBX
MOV RSI,R14
CALL 0x00109670
MOV RDI,qword ptr [R14]
CMP RDI,R15
JZ 0x0011bc53
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x001094c0
LAB_0011bc53:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x0011bc6a
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001094c0
LAB_0011bc6a:
MOV RAX,RBX
ADD RSP,0x48
POP RBX
POP R12
POP R14
POP R15
RET
|
/* testing::internal::OutputFlagAlsoCheckEnvVar[abi:cxx11]() */
internal * __thiscall testing::internal::OutputFlagAlsoCheckEnvVar_abi_cxx11_(internal *this)
{
char *pcVar1;
long *plVar2;
long *plVar3;
long *local_60 [2];
long local_50 [2];
long *local_40;
long local_38;
long local_30;
long lStack_28;
*(internal **)this = this + 0x10;
std::__cxx11::string::_M_construct<char_const*>(this,"");
pcVar1 = getenv("XML_OUTPUT_FILE");
if (pcVar1 != (char *)0x0) {
/* try { // try from 0011bbc4 to 0011bbdb has its CatchHandler @ 0011bc95 */
local_60[0] = local_50;
std::__cxx11::string::_M_construct<char_const*>(local_60,&DAT_00142812,&DAT_00142816);
/* try { // try from 0011bbdc to 0011bbe8 has its CatchHandler @ 0011bc79 */
plVar2 = (long *)std::__cxx11::string::append((char *)local_60);
plVar3 = plVar2 + 2;
if ((long *)*plVar2 == plVar3) {
local_30 = *plVar3;
lStack_28 = plVar2[3];
local_40 = &local_30;
}
else {
local_30 = *plVar3;
local_40 = (long *)*plVar2;
}
local_38 = plVar2[1];
*plVar2 = (long)plVar3;
plVar2[1] = 0;
*(int1 *)(plVar2 + 2) = 0;
std::__cxx11::string::operator=((string *)this,(string *)&local_40);
if (local_40 != &local_30) {
operator_delete(local_40,local_30 + 1);
}
if (local_60[0] != local_50) {
operator_delete(local_60[0],local_50[0] + 1);
}
}
return this;
}
|
|
6,188 | init_tree | eloqsql/mysys/tree.c | void init_tree(TREE *tree, size_t default_alloc_size, size_t memory_limit,
int size, qsort_cmp2 compare,
tree_element_free free_element, void *custom_arg,
myf my_flags)
{
DBUG_ENTER("init_tree");
DBUG_PRINT("enter",("tree: %p size: %d", tree, size));
if (default_alloc_size < DEFAULT_ALLOC_SIZE)
default_alloc_size= DEFAULT_ALLOC_SIZE;
default_alloc_size= MY_ALIGN(default_alloc_size, DEFAULT_ALIGN_SIZE);
tree->root= &null_element;
tree->compare=compare;
tree->size_of_element= size > 0 ? (uint) size : 0;
tree->memory_limit=memory_limit;
tree->free=free_element;
tree->allocated=0;
tree->elements_in_tree=0;
tree->custom_arg = custom_arg;
tree->my_flags= my_flags;
tree->flag= 0;
if (!free_element && size >= 0 &&
((uint) size <= sizeof(void*) || ((uint) size & (sizeof(void*)-1))))
{
/*
We know that the data doesn't have to be aligned (like if the key
contains a double), so we can store the data combined with the
TREE_ELEMENT.
*/
tree->offset_to_key=sizeof(TREE_ELEMENT); /* Put key after element */
/* Fix allocation size so that we don't lose any memory */
default_alloc_size/=(sizeof(TREE_ELEMENT)+size);
if (!default_alloc_size)
default_alloc_size=1;
default_alloc_size*=(sizeof(TREE_ELEMENT)+size);
}
else
{
tree->offset_to_key=0; /* use key through pointer */
tree->size_of_element+=sizeof(void*);
}
if (!(tree->with_delete= MY_TEST(my_flags & MY_TREE_WITH_DELETE)))
{
init_alloc_root(key_memory_TREE, &tree->mem_root, default_alloc_size, 0,
MYF(my_flags));
tree->mem_root.min_malloc= sizeof(TREE_ELEMENT)+tree->size_of_element;
}
DBUG_VOID_RETURN;
} | O0 | c | init_tree:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
jmp 0xfa3e9
cmpq $0x2000, -0x10(%rbp) # imm = 0x2000
jae 0xfa3fb
movq $0x2000, -0x10(%rbp) # imm = 0x2000
movq -0x10(%rbp), %rax
addq $0x2000, %rax # imm = 0x2000
subq $0x1, %rax
andq $-0x2000, %rax # imm = 0xE000
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
leaq 0x1c5842(%rip), %rcx # 0x2bfc60
movq %rcx, (%rax)
movq -0x28(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x228(%rax)
cmpl $0x0, -0x1c(%rbp)
jle 0xfa43e
movl -0x1c(%rbp), %eax
movl %eax, -0x34(%rbp)
jmp 0xfa445
xorl %eax, %eax
movl %eax, -0x34(%rbp)
jmp 0xfa445
movl -0x34(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x210(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x218(%rax)
movq -0x30(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x280(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x220(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x20c(%rax)
movq 0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x230(%rax)
movq 0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x288(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x290(%rax)
cmpq $0x0, -0x30(%rbp)
jne 0xfa521
cmpl $0x0, -0x1c(%rbp)
jl 0xfa521
movl -0x1c(%rbp), %eax
cmpq $0x8, %rax
jbe 0xfa4dc
movl -0x1c(%rbp), %eax
andq $0x7, %rax
cmpq $0x0, %rax
je 0xfa521
movq -0x8(%rbp), %rax
movl $0x18, 0x208(%rax)
movslq -0x1c(%rbp), %rcx
addq $0x18, %rcx
movq -0x10(%rbp), %rax
xorl %edx, %edx
divq %rcx
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xfa50e
movq $0x1, -0x10(%rbp)
movslq -0x1c(%rbp), %rax
addq $0x18, %rax
imulq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0xfa543
movq -0x8(%rbp), %rax
movl $0x0, 0x208(%rax)
movq -0x8(%rbp), %rax
movl 0x210(%rax), %ecx
addq $0x8, %rcx
movl %ecx, 0x210(%rax)
movq 0x18(%rbp), %rdx
andq $0x40000, %rdx # imm = 0x40000
xorl %eax, %eax
movl $0x1, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
movq -0x8(%rbp), %rcx
movb %al, 0x278(%rcx)
cmpb $0x0, %al
jne 0xfa5aa
leaq 0xb88d6b(%rip), %rax # 0xc832dc
movl (%rax), %edi
movq -0x8(%rbp), %rsi
addq $0x238, %rsi # imm = 0x238
movq -0x10(%rbp), %rdx
movq 0x18(%rbp), %r8
xorl %eax, %eax
movl %eax, %ecx
callq 0xed1a0
movq -0x8(%rbp), %rax
movl 0x210(%rax), %eax
movl %eax, %ecx
addq $0x18, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x250(%rax)
jmp 0xfa5ac
jmp 0xfa5ae
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| init_tree:
push rbp
mov rbp, rsp
sub rsp, 40h
mov rax, [rbp+arg_8]
mov rax, [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
jmp short $+2
loc_FA3E9:
cmp [rbp+var_10], 2000h
jnb short loc_FA3FB
mov [rbp+var_10], 2000h
loc_FA3FB:
mov rax, [rbp+var_10]
add rax, 2000h
sub rax, 1
and rax, 0FFFFFFFFFFFFE000h
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
lea rcx, null_element
mov [rax], rcx
mov rcx, [rbp+var_28]
mov rax, [rbp+var_8]
mov [rax+228h], rcx
cmp [rbp+var_1C], 0
jle short loc_FA43E
mov eax, [rbp+var_1C]
mov [rbp+var_34], eax
jmp short loc_FA445
loc_FA43E:
xor eax, eax
mov [rbp+var_34], eax
jmp short $+2
loc_FA445:
mov ecx, [rbp+var_34]
mov rax, [rbp+var_8]
mov [rax+210h], ecx
mov rcx, [rbp+var_18]
mov rax, [rbp+var_8]
mov [rax+218h], rcx
mov rcx, [rbp+var_30]
mov rax, [rbp+var_8]
mov [rax+280h], rcx
mov rax, [rbp+var_8]
mov qword ptr [rax+220h], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+20Ch], 0
mov rcx, [rbp+arg_0]
mov rax, [rbp+var_8]
mov [rax+230h], rcx
mov rcx, [rbp+arg_8]
mov rax, [rbp+var_8]
mov [rax+288h], rcx
mov rax, [rbp+var_8]
mov dword ptr [rax+290h], 0
cmp [rbp+var_30], 0
jnz short loc_FA521
cmp [rbp+var_1C], 0
jl short loc_FA521
mov eax, [rbp+var_1C]
cmp rax, 8
jbe short loc_FA4DC
mov eax, [rbp+var_1C]
and rax, 7
cmp rax, 0
jz short loc_FA521
loc_FA4DC:
mov rax, [rbp+var_8]
mov dword ptr [rax+208h], 18h
movsxd rcx, [rbp+var_1C]
add rcx, 18h
mov rax, [rbp+var_10]
xor edx, edx
div rcx
mov [rbp+var_10], rax
cmp [rbp+var_10], 0
jnz short loc_FA50E
mov [rbp+var_10], 1
loc_FA50E:
movsxd rax, [rbp+var_1C]
add rax, 18h
imul rax, [rbp+var_10]
mov [rbp+var_10], rax
jmp short loc_FA543
loc_FA521:
mov rax, [rbp+var_8]
mov dword ptr [rax+208h], 0
mov rax, [rbp+var_8]
mov ecx, [rax+210h]
add rcx, 8
mov [rax+210h], ecx
loc_FA543:
mov rdx, [rbp+arg_8]
and rdx, 40000h
xor eax, eax
mov ecx, 1
cmp rdx, 0
cmovnz eax, ecx
mov rcx, [rbp+var_8]
mov [rcx+278h], al
cmp al, 0
jnz short loc_FA5AA
lea rax, key_memory_TREE
mov edi, [rax]
mov rsi, [rbp+var_8]
add rsi, 238h
mov rdx, [rbp+var_10]
mov r8, [rbp+arg_8]
xor eax, eax
mov ecx, eax
call init_alloc_root
mov rax, [rbp+var_8]
mov eax, [rax+210h]
mov ecx, eax
add rcx, 18h
mov rax, [rbp+var_8]
mov [rax+250h], rcx
loc_FA5AA:
jmp short $+2
loc_FA5AC:
jmp short $+2
loc_FA5AE:
add rsp, 40h
pop rbp
retn
| _BOOL8 init_tree(
long long a1,
unsigned long long a2,
long long a3,
int a4,
long long a5,
long long a6,
long long a7,
long long a8)
{
_BOOL8 result; // rax
int v9; // [rsp+Ch] [rbp-34h]
long long v10; // [rsp+30h] [rbp-10h]
unsigned long long v11; // [rsp+30h] [rbp-10h]
unsigned long long v12; // [rsp+30h] [rbp-10h]
v10 = a2;
if ( a2 < 0x2000 )
v10 = 0x2000LL;
v11 = (v10 + 0x1FFF) & 0xFFFFFFFFFFFFE000LL;
*(_QWORD *)a1 = &null_element;
*(_QWORD *)(a1 + 552) = a5;
if ( a4 <= 0 )
v9 = 0;
else
v9 = a4;
*(_DWORD *)(a1 + 528) = v9;
*(_QWORD *)(a1 + 536) = a3;
*(_QWORD *)(a1 + 640) = a6;
*(_QWORD *)(a1 + 544) = 0LL;
*(_DWORD *)(a1 + 524) = 0;
*(_QWORD *)(a1 + 560) = a7;
*(_QWORD *)(a1 + 648) = a8;
*(_DWORD *)(a1 + 656) = 0;
if ( a6 || a4 < 0 || (unsigned int)a4 > 8uLL && (a4 & 7) == 0 )
{
*(_DWORD *)(a1 + 520) = 0;
*(_DWORD *)(a1 + 528) += 8;
}
else
{
*(_DWORD *)(a1 + 520) = 24;
v12 = v11 / (a4 + 24LL);
if ( !v12 )
v12 = 1LL;
v11 = v12 * (a4 + 24LL);
}
result = (a8 & 0x40000) != 0;
*(_BYTE *)(a1 + 632) = result;
if ( (a8 & 0x40000) == 0 )
{
init_alloc_root(key_memory_TREE, (long long *)(a1 + 568), v11, 0LL, a8);
result = a1;
*(_QWORD *)(a1 + 592) = *(unsigned int *)(a1 + 528) + 24LL;
}
return result;
}
| init_tree:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV RAX,qword ptr [RBP + 0x18]
MOV RAX,qword 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
JMP 0x001fa3e9
LAB_001fa3e9:
CMP qword ptr [RBP + -0x10],0x2000
JNC 0x001fa3fb
MOV qword ptr [RBP + -0x10],0x2000
LAB_001fa3fb:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x2000
SUB RAX,0x1
AND RAX,-0x2000
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x8]
LEA RCX,[0x3bfc60]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x228],RCX
CMP dword ptr [RBP + -0x1c],0x0
JLE 0x001fa43e
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x34],EAX
JMP 0x001fa445
LAB_001fa43e:
XOR EAX,EAX
MOV dword ptr [RBP + -0x34],EAX
JMP 0x001fa445
LAB_001fa445:
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x210],ECX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x218],RCX
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x280],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x220],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x20c],0x0
MOV RCX,qword ptr [RBP + 0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x230],RCX
MOV RCX,qword ptr [RBP + 0x18]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x288],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x290],0x0
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x001fa521
CMP dword ptr [RBP + -0x1c],0x0
JL 0x001fa521
MOV EAX,dword ptr [RBP + -0x1c]
CMP RAX,0x8
JBE 0x001fa4dc
MOV EAX,dword ptr [RBP + -0x1c]
AND RAX,0x7
CMP RAX,0x0
JZ 0x001fa521
LAB_001fa4dc:
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x208],0x18
MOVSXD RCX,dword ptr [RBP + -0x1c]
ADD RCX,0x18
MOV RAX,qword ptr [RBP + -0x10]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x10],RAX
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x001fa50e
MOV qword ptr [RBP + -0x10],0x1
LAB_001fa50e:
MOVSXD RAX,dword ptr [RBP + -0x1c]
ADD RAX,0x18
IMUL RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001fa543
LAB_001fa521:
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x208],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x210]
ADD RCX,0x8
MOV dword ptr [RAX + 0x210],ECX
LAB_001fa543:
MOV RDX,qword ptr [RBP + 0x18]
AND RDX,0x40000
XOR EAX,EAX
MOV ECX,0x1
CMP RDX,0x0
CMOVNZ EAX,ECX
MOV RCX,qword ptr [RBP + -0x8]
MOV byte ptr [RCX + 0x278],AL
CMP AL,0x0
JNZ 0x001fa5aa
LEA RAX,[0xd832dc]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x238
MOV RDX,qword ptr [RBP + -0x10]
MOV R8,qword ptr [RBP + 0x18]
XOR EAX,EAX
MOV ECX,EAX
CALL 0x001ed1a0
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x210]
MOV ECX,EAX
ADD RCX,0x18
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x250],RCX
LAB_001fa5aa:
JMP 0x001fa5ac
LAB_001fa5ac:
JMP 0x001fa5ae
LAB_001fa5ae:
ADD RSP,0x40
POP RBP
RET
|
void init_tree(int8 *param_1,ulong param_2,int8 param_3,uint param_4,int8 param_5,
long param_6,int8 param_7,ulong param_8)
{
bool bVar1;
uint local_3c;
ulong local_18;
local_18 = param_2;
if (param_2 < 0x2000) {
local_18 = 0x2000;
}
local_18 = local_18 + 0x1fff & 0xffffffffffffe000;
*param_1 = null_element;
param_1[0x45] = param_5;
local_3c = param_4;
if ((int)param_4 < 1) {
local_3c = 0;
}
*(uint *)(param_1 + 0x42) = local_3c;
param_1[0x43] = param_3;
param_1[0x50] = param_6;
param_1[0x44] = 0;
*(int4 *)((long)param_1 + 0x20c) = 0;
param_1[0x46] = param_7;
param_1[0x51] = param_8;
*(int4 *)(param_1 + 0x52) = 0;
if (((param_6 == 0) && (-1 < (int)param_4)) && ((param_4 < 9 || ((param_4 & 7) != 0)))) {
*(int4 *)(param_1 + 0x41) = 0x18;
local_18 = local_18 / ((long)(int)param_4 + 0x18U);
if (local_18 == 0) {
local_18 = 1;
}
local_18 = ((long)(int)param_4 + 0x18) * local_18;
}
else {
*(int4 *)(param_1 + 0x41) = 0;
*(int *)(param_1 + 0x42) = *(int *)(param_1 + 0x42) + 8;
}
bVar1 = (param_8 & 0x40000) != 0;
*(bool *)(param_1 + 0x4f) = bVar1;
if (!bVar1) {
init_alloc_root(key_memory_TREE,param_1 + 0x47,local_18,0,param_8);
param_1[0x4a] = (ulong)*(uint *)(param_1 + 0x42) + 0x18;
}
return;
}
|
|
6,189 | init_tree | eloqsql/mysys/tree.c | void init_tree(TREE *tree, size_t default_alloc_size, size_t memory_limit,
int size, qsort_cmp2 compare,
tree_element_free free_element, void *custom_arg,
myf my_flags)
{
DBUG_ENTER("init_tree");
DBUG_PRINT("enter",("tree: %p size: %d", tree, size));
if (default_alloc_size < DEFAULT_ALLOC_SIZE)
default_alloc_size= DEFAULT_ALLOC_SIZE;
default_alloc_size= MY_ALIGN(default_alloc_size, DEFAULT_ALIGN_SIZE);
tree->root= &null_element;
tree->compare=compare;
tree->size_of_element= size > 0 ? (uint) size : 0;
tree->memory_limit=memory_limit;
tree->free=free_element;
tree->allocated=0;
tree->elements_in_tree=0;
tree->custom_arg = custom_arg;
tree->my_flags= my_flags;
tree->flag= 0;
if (!free_element && size >= 0 &&
((uint) size <= sizeof(void*) || ((uint) size & (sizeof(void*)-1))))
{
/*
We know that the data doesn't have to be aligned (like if the key
contains a double), so we can store the data combined with the
TREE_ELEMENT.
*/
tree->offset_to_key=sizeof(TREE_ELEMENT); /* Put key after element */
/* Fix allocation size so that we don't lose any memory */
default_alloc_size/=(sizeof(TREE_ELEMENT)+size);
if (!default_alloc_size)
default_alloc_size=1;
default_alloc_size*=(sizeof(TREE_ELEMENT)+size);
}
else
{
tree->offset_to_key=0; /* use key through pointer */
tree->size_of_element+=sizeof(void*);
}
if (!(tree->with_delete= MY_TEST(my_flags & MY_TREE_WITH_DELETE)))
{
init_alloc_root(key_memory_TREE, &tree->mem_root, default_alloc_size, 0,
MYF(my_flags));
tree->mem_root.min_malloc= sizeof(TREE_ELEMENT)+tree->size_of_element;
}
DBUG_VOID_RETURN;
} | O3 | c | init_tree:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %r8, %rax
movq %rdi, %rbx
movq 0x18(%rbp), %r8
movq 0x10(%rbp), %rdi
cmpq $0x2001, %rsi # imm = 0x2001
movl $0x2000, %r10d # imm = 0x2000
cmovaeq %rsi, %r10
addq $0x1fff, %r10 # imm = 0x1FFF
andq $-0x2000, %r10 # imm = 0xE000
leaq 0x2e1546(%rip), %rsi # 0x385bc0
movq %rsi, (%rbx)
movq %rax, 0x228(%rbx)
testq %r9, %r9
setne %sil
xorl %r11d, %r11d
testl %ecx, %ecx
movl $0x0, %eax
cmovgl %ecx, %eax
movl %eax, 0x210(%rbx)
movq %rdx, 0x218(%rbx)
movq %r9, 0x280(%rbx)
movq $0x0, 0x220(%rbx)
movl %r11d, 0x20c(%rbx)
movq %rdi, 0x230(%rbx)
movq %r8, 0x288(%rbx)
movl %r11d, 0x290(%rbx)
sets %dl
orb %sil, %dl
jne 0xa46ed
cmpl $0x9, %ecx
setae %dl
testb $0x7, %cl
sete %sil
testb %sil, %dl
je 0xa4702
movl $0x0, 0x208(%rbx)
addl $0x8, %eax
movl %eax, 0x210(%rbx)
jmp 0xa4728
movl $0x18, 0x208(%rbx)
addl $0x18, %ecx
movq %r10, %rax
xorl %edx, %edx
divq %rcx
cmpq %rcx, %r10
movl $0x1, %r10d
cmovaeq %rax, %r10
imulq %rcx, %r10
movl %r8d, %eax
shrl $0x12, %eax
andb $0x1, %al
movb %al, 0x278(%rbx)
jne 0xa4763
leaq 0xb63f9d(%rip), %rax # 0xc086dc
movl (%rax), %edi
leaq 0x238(%rbx), %rsi
movq %r10, %rdx
xorl %ecx, %ecx
callq 0x9cb44
movl 0x210(%rbx), %eax
addq $0x18, %rax
movq %rax, 0x250(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| init_tree:
push rbp
mov rbp, rsp
push rbx
push rax
mov rax, r8
mov rbx, rdi
mov r8, [rbp+arg_8]
mov rdi, [rbp+arg_0]
cmp rsi, 2001h
mov r10d, 2000h
cmovnb r10, rsi
add r10, 1FFFh
and r10, 0FFFFFFFFFFFFE000h
lea rsi, null_element
mov [rbx], rsi
mov [rbx+228h], rax
test r9, r9
setnz sil
xor r11d, r11d
test ecx, ecx
mov eax, 0
cmovg eax, ecx
mov [rbx+210h], eax
mov [rbx+218h], rdx
mov [rbx+280h], r9
mov qword ptr [rbx+220h], 0
mov [rbx+20Ch], r11d
mov [rbx+230h], rdi
mov [rbx+288h], r8
mov [rbx+290h], r11d
sets dl
or dl, sil
jnz short loc_A46ED
cmp ecx, 9
setnb dl
test cl, 7
setz sil
test dl, sil
jz short loc_A4702
loc_A46ED:
mov dword ptr [rbx+208h], 0
add eax, 8
mov [rbx+210h], eax
jmp short loc_A4728
loc_A4702:
mov dword ptr [rbx+208h], 18h
add ecx, 18h
mov rax, r10
xor edx, edx
div rcx
cmp r10, rcx
mov r10d, 1
cmovnb r10, rax
imul r10, rcx
loc_A4728:
mov eax, r8d
shr eax, 12h
and al, 1
mov [rbx+278h], al
jnz short loc_A4763
lea rax, key_memory_TREE
mov edi, [rax]
lea rsi, [rbx+238h]
mov rdx, r10
xor ecx, ecx
call init_alloc_root
mov eax, [rbx+210h]
add rax, 18h
mov [rbx+250h], rax
loc_A4763:
add rsp, 8
pop rbx
pop rbp
retn
| char init_tree(
long long a1,
unsigned long long a2,
long long a3,
int a4,
long long a5,
long long a6,
long long a7,
long long a8)
{
long long v8; // r10
unsigned long long v9; // r10
int v10; // eax
unsigned long long v11; // rcx
unsigned long long v12; // rax
bool v13; // cf
long long v14; // r10
long long v15; // rax
v8 = 0x2000LL;
if ( a2 >= 0x2001 )
v8 = a2;
v9 = (v8 + 0x1FFF) & 0xFFFFFFFFFFFFE000LL;
*(_QWORD *)a1 = &null_element;
*(_QWORD *)(a1 + 552) = a5;
v10 = 0;
if ( a4 > 0 )
v10 = a4;
*(_DWORD *)(a1 + 528) = v10;
*(_QWORD *)(a1 + 536) = a3;
*(_QWORD *)(a1 + 640) = a6;
*(_QWORD *)(a1 + 544) = 0LL;
*(_DWORD *)(a1 + 524) = 0;
*(_QWORD *)(a1 + 560) = a7;
*(_QWORD *)(a1 + 648) = a8;
*(_DWORD *)(a1 + 656) = 0;
if ( a6 != 0 || a4 < 0 || (a4 & 7) == 0 && (unsigned int)a4 >= 9 )
{
*(_DWORD *)(a1 + 520) = 0;
*(_DWORD *)(a1 + 528) = v10 + 8;
}
else
{
*(_DWORD *)(a1 + 520) = 24;
v11 = (unsigned int)(a4 + 24);
v12 = v9 / v11;
v13 = v9 < v11;
v14 = 1LL;
if ( !v13 )
v14 = v12;
v9 = v11 * v14;
}
LOBYTE(v15) = (a8 & 0x40000) != 0;
*(_BYTE *)(a1 + 632) = v15;
if ( (a8 & 0x40000) == 0 )
{
init_alloc_root(key_memory_TREE, (long long *)(a1 + 568), v9, 0LL, a8);
v15 = *(unsigned int *)(a1 + 528) + 24LL;
*(_QWORD *)(a1 + 592) = v15;
}
return v15;
}
| init_tree:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RAX,R8
MOV RBX,RDI
MOV R8,qword ptr [RBP + 0x18]
MOV RDI,qword ptr [RBP + 0x10]
CMP RSI,0x2001
MOV R10D,0x2000
CMOVNC R10,RSI
ADD R10,0x1fff
AND R10,-0x2000
LEA RSI,[0x485bc0]
MOV qword ptr [RBX],RSI
MOV qword ptr [RBX + 0x228],RAX
TEST R9,R9
SETNZ SIL
XOR R11D,R11D
TEST ECX,ECX
MOV EAX,0x0
CMOVG EAX,ECX
MOV dword ptr [RBX + 0x210],EAX
MOV qword ptr [RBX + 0x218],RDX
MOV qword ptr [RBX + 0x280],R9
MOV qword ptr [RBX + 0x220],0x0
MOV dword ptr [RBX + 0x20c],R11D
MOV qword ptr [RBX + 0x230],RDI
MOV qword ptr [RBX + 0x288],R8
MOV dword ptr [RBX + 0x290],R11D
SETS DL
OR DL,SIL
JNZ 0x001a46ed
CMP ECX,0x9
SETNC DL
TEST CL,0x7
SETZ SIL
TEST DL,SIL
JZ 0x001a4702
LAB_001a46ed:
MOV dword ptr [RBX + 0x208],0x0
ADD EAX,0x8
MOV dword ptr [RBX + 0x210],EAX
JMP 0x001a4728
LAB_001a4702:
MOV dword ptr [RBX + 0x208],0x18
ADD ECX,0x18
MOV RAX,R10
XOR EDX,EDX
DIV RCX
CMP R10,RCX
MOV R10D,0x1
CMOVNC R10,RAX
IMUL R10,RCX
LAB_001a4728:
MOV EAX,R8D
SHR EAX,0x12
AND AL,0x1
MOV byte ptr [RBX + 0x278],AL
JNZ 0x001a4763
LEA RAX,[0xd086dc]
MOV EDI,dword ptr [RAX]
LEA RSI,[RBX + 0x238]
MOV RDX,R10
XOR ECX,ECX
CALL 0x0019cb44
MOV EAX,dword ptr [RBX + 0x210]
ADD RAX,0x18
MOV qword ptr [RBX + 0x250],RAX
LAB_001a4763:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void init_tree(int8 *param_1,ulong param_2,int8 param_3,uint param_4,int8 param_5,
long param_6,int8 param_7,ulong param_8)
{
uint uVar1;
ulong uVar2;
ulong uVar3;
ulong uVar4;
uVar3 = 0x2000;
if (0x2000 < param_2) {
uVar3 = param_2;
}
uVar3 = uVar3 + 0x1fff & 0xffffffffffffe000;
*param_1 = null_element;
param_1[0x45] = param_5;
uVar1 = 0;
if (0 < (int)param_4) {
uVar1 = param_4;
}
*(uint *)(param_1 + 0x42) = uVar1;
param_1[0x43] = param_3;
param_1[0x50] = param_6;
param_1[0x44] = 0;
*(int4 *)((long)param_1 + 0x20c) = 0;
param_1[0x46] = param_7;
param_1[0x51] = param_8;
*(int4 *)(param_1 + 0x52) = 0;
if (((int)param_4 < 0 || param_6 != 0) || (8 < param_4 && (param_4 & 7) == 0)) {
*(int4 *)(param_1 + 0x41) = 0;
*(uint *)(param_1 + 0x42) = uVar1 + 8;
}
else {
*(int4 *)(param_1 + 0x41) = 0x18;
uVar2 = (ulong)(param_4 + 0x18);
uVar4 = 1;
if (uVar2 <= uVar3) {
uVar4 = uVar3 / uVar2;
}
uVar3 = uVar4 * uVar2;
}
*(byte *)(param_1 + 0x4f) = (byte)(param_8 >> 0x12) & 1;
if ((param_8 >> 0x12 & 1) == 0) {
init_alloc_root(key_memory_TREE,param_1 + 0x47,uVar3,0);
param_1[0x4a] = (ulong)*(uint *)(param_1 + 0x42) + 0x18;
}
return;
}
|
|
6,190 | common_chat_format_example[abi:cxx11](common_chat_templates const*, bool) | llama.cpp/common/chat.cpp | std::string common_chat_format_example(const struct common_chat_templates * tmpls, bool use_jinja) {
common_chat_templates_inputs inputs;
inputs.use_jinja = use_jinja;
auto add_simple_msg = [&](auto role, auto content) {
common_chat_msg msg;
msg.role = role;
msg.content = content;
inputs.messages.push_back(msg);
};
add_simple_msg("system", "You are a helpful assistant");
add_simple_msg("user", "Hello");
add_simple_msg("assistant", "Hi there");
add_simple_msg("user", "How are you?");
return common_chat_templates_apply(tmpls, inputs).prompt;
} | O3 | cpp | common_chat_format_example[abi:cxx11](common_chat_templates const*, bool):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x130, %rsp # imm = 0x130
movq %rsi, %r14
movq %rdi, %rbx
xorl %eax, %eax
leaq 0x38(%rsp), %r12
movq %rax, -0x18(%r12)
xorps %xmm0, %xmm0
movaps %xmm0, -0x28(%r12)
movq %r12, -0x10(%r12)
movq %rax, -0x8(%r12)
movb %al, (%r12)
leaq 0x58(%rsp), %r13
movq %r13, -0x10(%r13)
movq %rax, -0x8(%r13)
movb %al, (%r13)
movb $0x1, %al
movb %al, 0x10(%r13)
movaps %xmm0, 0x18(%r13)
movups %xmm0, 0x25(%r13)
movb %al, 0x35(%r13)
movb %dl, 0x11(%r13)
leaq 0x10(%rsp), %rax
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x88c84(%rip), %rsi # 0x11f50a
leaq 0x88c84(%rip), %rdx # 0x11f511
callq 0x96a20
leaq 0x88c2e(%rip), %rsi # 0x11f4c7
leaq 0x88c8d(%rip), %rdx # 0x11f52d
leaq 0x8(%rsp), %rdi
callq 0x96a20
leaq 0x88c72(%rip), %rsi # 0x11f523
leaq 0x88c7b(%rip), %rdx # 0x11f533
leaq 0x8(%rsp), %rdi
callq 0x96a20
leaq 0x88bfe(%rip), %rsi # 0x11f4c7
leaq 0x88c6c(%rip), %rdx # 0x11f53c
leaq 0x8(%rsp), %rdi
callq 0x96a20
leaq 0x98(%rsp), %rdi
leaq 0x10(%rsp), %rdx
movq %r14, %rsi
callq 0x93fcb
leaq 0x10(%rbx), %rdi
movq %rdi, (%rbx)
leaq 0xb0(%rsp), %r14
movq -0x10(%r14), %rax
cmpq %r14, %rax
je 0x96920
movq %rax, (%rbx)
movq 0xb0(%rsp), %rax
movq %rax, 0x10(%rbx)
movq 0xa8(%rsp), %r15
jmp 0x96934
movq 0xa8(%rsp), %r15
leaq 0x1(%r15), %rdx
movq %r14, %rsi
callq 0x200f0
movq %r15, 0x8(%rbx)
leaq 0x118(%rsp), %rdi
movq %r14, -0x78(%rdi)
movq $0x0, -0x70(%rdi)
movb $0x0, -0x68(%rdi)
callq 0x26d26
leaq 0x100(%rsp), %rdi
callq 0x26d26
leaq 0xe8(%rsp), %r15
movq %r15, %rdi
callq 0x289c4
movq -0x28(%r15), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x96993
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x20180
leaq 0x70(%rsp), %r15
movq 0xa0(%rsp), %rdi
cmpq %r14, %rdi
je 0x969b5
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x20180
movq %r15, %rdi
callq 0xb1b84
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x969d4
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x20180
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x969eb
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x20180
leaq 0x10(%rsp), %rdi
callq 0xb1456
movq %rbx, %rax
addq $0x130, %rsp # imm = 0x130
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x96a0b
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xb1dac
movq %rbx, %rdi
callq 0x20af0
| _Z26common_chat_format_exampleB5cxx11PK21common_chat_templatesb:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 130h
mov r14, rsi
mov rbx, rdi
xor eax, eax
lea r12, [rsp+158h+var_120]
mov [r12-18h], rax
xorps xmm0, xmm0
movaps xmmword ptr [r12-28h], xmm0
mov [r12-10h], r12
mov [r12-8], rax
mov [r12], al
lea r13, [rsp+158h+var_100]
mov [r13-10h], r13
mov [r13-8], rax
mov [r13+0], al
mov al, 1
mov [r13+10h], al
movaps xmmword ptr [r13+18h], xmm0
movups xmmword ptr [r13+25h], xmm0
mov [r13+35h], al
mov [r13+11h], dl
lea rax, [rsp+158h+var_148]
lea rdi, [rsp+158h+var_150]
mov [rdi], rax
lea rsi, aSystem; "system"
lea rdx, aYouAreAHelpful; "You are a helpful assistant"
call _ZZ26common_chat_format_exampleB5cxx11PK21common_chat_templatesbENK3$_0clIPKcS5_EEDaT_T0_
lea rsi, aUser; "user"
lea rdx, aHello; "Hello"
lea rdi, [rsp+158h+var_150]
call _ZZ26common_chat_format_exampleB5cxx11PK21common_chat_templatesbENK3$_0clIPKcS5_EEDaT_T0_
lea rsi, aYouAreAHelpful+12h; "assistant"
lea rdx, aHiThere; "Hi there"
lea rdi, [rsp+158h+var_150]
call _ZZ26common_chat_format_exampleB5cxx11PK21common_chat_templatesbENK3$_0clIPKcS5_EEDaT_T0_
lea rsi, aUser; "user"
lea rdx, aHowAreYou; "How are you?"
lea rdi, [rsp+158h+var_150]
call _ZZ26common_chat_format_exampleB5cxx11PK21common_chat_templatesbENK3$_0clIPKcS5_EEDaT_T0_
lea rdi, [rsp+158h+var_C0]
lea rdx, [rsp+158h+var_148]
mov rsi, r14
call _Z27common_chat_templates_applyPK21common_chat_templatesRK28common_chat_templates_inputs; common_chat_templates_apply(common_chat_templates const*,common_chat_templates_inputs const&)
lea rdi, [rbx+10h]
mov [rbx], rdi
lea r14, [rsp+158h+var_A8]
mov rax, [r14-10h]
cmp rax, r14
jz short loc_96920
mov [rbx], rax
mov rax, [rsp+158h+var_A8]
mov [rbx+10h], rax
mov r15, [rsp+158h+var_B0]
jmp short loc_96934
loc_96920:
mov r15, [rsp+158h+var_B0]
lea rdx, [r15+1]
mov rsi, r14
call _memcpy
loc_96934:
mov [rbx+8], r15
lea rdi, [rsp+158h+var_40]; void *
mov [rdi-78h], r14
mov qword ptr [rdi-70h], 0
mov byte ptr [rdi-68h], 0
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rsp+158h+var_58]; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea r15, [rsp+158h+var_70]
mov rdi, r15
call _ZNSt6vectorI22common_grammar_triggerSaIS0_EED2Ev; std::vector<common_grammar_trigger>::~vector()
mov rdi, [r15-28h]; void *
lea rax, [rsp+158h+var_88]
cmp rdi, rax
jz short loc_96993
mov rsi, [rsp+158h+var_88]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_96993:
lea r15, [rsp+158h+var_E8]
mov rdi, [rsp+158h+var_B8]; void *
cmp rdi, r14
jz short loc_969B5
mov rsi, [rsp+158h+var_A8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_969B5:
mov rdi, r15
call _ZNSt6vectorI16common_chat_toolSaIS0_EED2Ev; std::vector<common_chat_tool>::~vector()
mov rdi, [rsp+158h+var_110]; void *
cmp rdi, r13
jz short loc_969D4
mov rsi, [rsp+158h+var_100]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_969D4:
mov rdi, [rsp+158h+var_130]; void *
cmp rdi, r12
jz short loc_969EB
mov rsi, [rsp+158h+var_120]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_969EB:
lea rdi, [rsp+158h+var_148]
call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector()
mov rax, rbx
add rsp, 130h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
jmp short $+2
loc_96A0B:
mov rbx, rax
lea rdi, [rsp+arg_8]; this
call _ZN28common_chat_templates_inputsD2Ev; common_chat_templates_inputs::~common_chat_templates_inputs()
mov rdi, rbx
call __Unwind_Resume
| void ** common_chat_format_example[abi:cxx11](void **a1, long long a2, char a3, int a4, int a5, int a6)
{
int v7; // ecx
int v8; // r8d
int v9; // r9d
int v10; // ecx
int v11; // r8d
int v12; // r9d
int v13; // ecx
int v14; // r8d
int v15; // r9d
_QWORD *v16; // rdi
void *v17; // r15
__int128 *v19; // [rsp+8h] [rbp-150h] BYREF
__int128 v20; // [rsp+10h] [rbp-148h] BYREF
long long v21; // [rsp+20h] [rbp-138h]
void *v22; // [rsp+28h] [rbp-130h]
long long v23; // [rsp+30h] [rbp-128h]
_QWORD v24[2]; // [rsp+38h] [rbp-120h] BYREF
void *v25; // [rsp+48h] [rbp-110h]
long long v26; // [rsp+50h] [rbp-108h]
_QWORD v27[2]; // [rsp+58h] [rbp-100h] BYREF
char v28; // [rsp+68h] [rbp-F0h]
char v29; // [rsp+69h] [rbp-EFh]
_BYTE v30[40]; // [rsp+70h] [rbp-E8h] BYREF
char v31[8]; // [rsp+98h] [rbp-C0h] BYREF
void *v32; // [rsp+A0h] [rbp-B8h]
char *v33; // [rsp+A8h] [rbp-B0h]
_QWORD v34[2]; // [rsp+B0h] [rbp-A8h] BYREF
long long *v35; // [rsp+C0h] [rbp-98h]
long long v36; // [rsp+D0h] [rbp-88h] BYREF
char v37[24]; // [rsp+E8h] [rbp-70h] BYREF
long long v38[3]; // [rsp+100h] [rbp-58h] BYREF
long long v39[8]; // [rsp+118h] [rbp-40h] BYREF
v21 = 0LL;
v20 = 0LL;
v22 = v24;
v23 = 0LL;
LOBYTE(v24[0]) = 0;
v25 = v27;
v26 = 0LL;
LOBYTE(v27[0]) = 0;
v28 = 1;
memset(v30, 0, 29);
v30[29] = 1;
v29 = a3;
v19 = &v20;
common_chat_format_example[abi:cxx11](common_chat_templates const*,bool)::$_0::operator()<char const*,char const*>(
(unsigned int)&v19,
(unsigned int)"system",
(unsigned int)"You are a helpful assistant",
a4,
a5,
a6);
common_chat_format_example[abi:cxx11](common_chat_templates const*,bool)::$_0::operator()<char const*,char const*>(
(unsigned int)&v19,
(unsigned int)"user",
(unsigned int)"Hello",
v7,
v8,
v9);
common_chat_format_example[abi:cxx11](common_chat_templates const*,bool)::$_0::operator()<char const*,char const*>(
(unsigned int)&v19,
(unsigned int)"assistant",
(unsigned int)"Hi there",
v10,
v11,
v12);
common_chat_format_example[abi:cxx11](common_chat_templates const*,bool)::$_0::operator()<char const*,char const*>(
(unsigned int)&v19,
(unsigned int)"user",
(unsigned int)"How are you?",
v13,
v14,
v15);
common_chat_templates_apply((long long)v31, a2, (long long *)&v20);
v16 = a1 + 2;
*a1 = a1 + 2;
if ( v32 == v34 )
{
v17 = v33;
memcpy(v16, v34, v33 + 1);
}
else
{
*a1 = v32;
a1[2] = (void *)v34[0];
v17 = v33;
}
a1[1] = v17;
v32 = v34;
v33 = 0LL;
LOBYTE(v34[0]) = 0;
std::vector<std::string>::~vector(v39);
std::vector<std::string>::~vector(v38);
std::vector<common_grammar_trigger>::~vector((long long)v37);
if ( v35 != &v36 )
operator delete(v35, v36 + 1);
if ( v32 != v34 )
operator delete(v32, v34[0] + 1LL);
std::vector<common_chat_tool>::~vector(v30);
if ( v25 != v27 )
operator delete(v25, v27[0] + 1LL);
if ( v22 != v24 )
operator delete(v22, v24[0] + 1LL);
std::vector<common_chat_msg>::~vector(&v20);
return a1;
}
| common_chat_format_example[abi:cxx11]:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x130
MOV R14,RSI
MOV RBX,RDI
XOR EAX,EAX
LEA R12,[RSP + 0x38]
MOV qword ptr [R12 + -0x18],RAX
XORPS XMM0,XMM0
MOVAPS xmmword ptr [R12 + -0x28],XMM0
MOV qword ptr [R12 + -0x10],R12
MOV qword ptr [R12 + -0x8],RAX
MOV byte ptr [R12],AL
LEA R13,[RSP + 0x58]
MOV qword ptr [R13 + -0x10],R13
MOV qword ptr [R13 + -0x8],RAX
MOV byte ptr [R13],AL
MOV AL,0x1
MOV byte ptr [R13 + 0x10],AL
MOVAPS xmmword ptr [R13 + 0x18],XMM0
MOVUPS xmmword ptr [R13 + 0x25],XMM0
MOV byte ptr [R13 + 0x35],AL
MOV byte ptr [R13 + 0x11],DL
LEA RAX,[RSP + 0x10]
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],RAX
LAB_0019687f:
LEA RSI,[0x21f50a]
LEA RDX,[0x21f511]
CALL 0x00196a20
LEA RSI,[0x21f4c7]
LEA RDX,[0x21f52d]
LEA RDI,[RSP + 0x8]
CALL 0x00196a20
LEA RSI,[0x21f523]
LEA RDX,[0x21f533]
LEA RDI,[RSP + 0x8]
CALL 0x00196a20
LEA RSI,[0x21f4c7]
LEA RDX,[0x21f53c]
LEA RDI,[RSP + 0x8]
CALL 0x00196a20
LAB_001968da:
LEA RDI,[RSP + 0x98]
LEA RDX,[RSP + 0x10]
MOV RSI,R14
CALL 0x00193fcb
LAB_001968ef:
LEA RDI,[RBX + 0x10]
MOV qword ptr [RBX],RDI
LEA R14,[RSP + 0xb0]
MOV RAX,qword ptr [R14 + -0x10]
CMP RAX,R14
JZ 0x00196920
MOV qword ptr [RBX],RAX
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RBX + 0x10],RAX
MOV R15,qword ptr [RSP + 0xa8]
JMP 0x00196934
LAB_00196920:
MOV R15,qword ptr [RSP + 0xa8]
LEA RDX,[R15 + 0x1]
MOV RSI,R14
CALL 0x001200f0
LAB_00196934:
MOV qword ptr [RBX + 0x8],R15
LEA RDI,[RSP + 0x118]
MOV qword ptr [RDI + -0x78],R14
MOV qword ptr [RDI + -0x70],0x0
MOV byte ptr [RDI + -0x68],0x0
CALL 0x00126d26
LEA RDI,[RSP + 0x100]
CALL 0x00126d26
LEA R15,[RSP + 0xe8]
MOV RDI,R15
CALL 0x001289c4
MOV RDI,qword ptr [R15 + -0x28]
LEA RAX,[RSP + 0xd0]
CMP RDI,RAX
JZ 0x00196993
MOV RSI,qword ptr [RSP + 0xd0]
INC RSI
CALL 0x00120180
LAB_00196993:
LEA R15,[RSP + 0x70]
MOV RDI,qword ptr [RSP + 0xa0]
CMP RDI,R14
JZ 0x001969b5
MOV RSI,qword ptr [RSP + 0xb0]
INC RSI
CALL 0x00120180
LAB_001969b5:
MOV RDI,R15
CALL 0x001b1b84
MOV RDI,qword ptr [RSP + 0x48]
CMP RDI,R13
JZ 0x001969d4
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x00120180
LAB_001969d4:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R12
JZ 0x001969eb
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x00120180
LAB_001969eb:
LEA RDI,[RSP + 0x10]
CALL 0x001b1456
MOV RAX,RBX
ADD RSP,0x130
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* common_chat_format_example[abi:cxx11](common_chat_templates const*, bool) */
common_chat_templates *
common_chat_format_example_abi_cxx11_(common_chat_templates *param_1,bool param_2)
{
int7 in_register_00000031;
int8 *local_150;
int8 local_148;
int8 uStack_140;
int8 local_138;
int1 *local_130;
int8 local_128;
int1 local_120;
int7 uStack_11f;
int1 *local_110;
int8 local_108;
int1 local_100;
int7 uStack_ff;
int1 local_f0;
int8 local_e8;
int5 uStack_e0;
int3 uStack_db;
int5 uStack_d8;
int8 uStack_d3;
int1 local_cb;
common_chat_templates local_c0 [8];
int1 *local_b8;
long local_b0;
int1 local_a8;
int7 uStack_a7;
long *local_98;
long local_88 [3];
vector<common_grammar_trigger,std::allocator<common_grammar_trigger>> local_70 [24];
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_58 [24];
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_40 [24];
local_138 = 0;
local_148 = 0;
uStack_140 = 0;
local_128 = 0;
local_120 = 0;
local_108 = 0;
local_100 = 0;
local_f0 = 1;
local_e8 = 0;
uStack_e0 = 0;
uStack_db = 0;
uStack_d8 = 0;
uStack_d3 = 0;
local_cb = 1;
local_150 = &local_148;
local_130 = &local_120;
local_110 = &local_100;
/* try { // try from 0019687f to 001968d9 has its CatchHandler @ 00196a0b */
common_chat_format_example[abi:cxx11](common_chat_templates_const*,bool)::$_0::operator()
((__0 *)&local_150,"system","You are a helpful assistant");
common_chat_format_example[abi:cxx11](common_chat_templates_const*,bool)::$_0::operator()
((__0 *)&local_150,"user","Hello");
common_chat_format_example[abi:cxx11](common_chat_templates_const*,bool)::$_0::operator()
((__0 *)&local_150,"assistant","Hi there");
common_chat_format_example[abi:cxx11](common_chat_templates_const*,bool)::$_0::operator()
((__0 *)&local_150,"user","How are you?");
/* try { // try from 001968da to 001968ee has its CatchHandler @ 00196a09 */
common_chat_templates_apply
(local_c0,(common_chat_templates_inputs *)CONCAT71(in_register_00000031,param_2));
*(common_chat_templates **)param_1 = param_1 + 0x10;
if (local_b8 == &local_a8) {
memcpy(param_1 + 0x10,&local_a8,local_b0 + 1);
}
else {
*(int1 **)param_1 = local_b8;
*(ulong *)(param_1 + 0x10) = CONCAT71(uStack_a7,local_a8);
}
*(long *)(param_1 + 8) = local_b0;
local_b0 = 0;
local_a8 = 0;
local_b8 = &local_a8;
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_40);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_58);
std::vector<common_grammar_trigger,std::allocator<common_grammar_trigger>>::~vector(local_70);
if (local_98 != local_88) {
operator_delete(local_98,local_88[0] + 1);
}
if (local_b8 != &local_a8) {
operator_delete(local_b8,CONCAT71(uStack_a7,local_a8) + 1);
}
std::vector<common_chat_tool,std::allocator<common_chat_tool>>::~vector
((vector<common_chat_tool,std::allocator<common_chat_tool>> *)&local_e8);
if (local_110 != &local_100) {
operator_delete(local_110,CONCAT71(uStack_ff,local_100) + 1);
}
if (local_130 != &local_120) {
operator_delete(local_130,CONCAT71(uStack_11f,local_120) + 1);
}
std::vector<common_chat_msg,std::allocator<common_chat_msg>>::~vector
((vector<common_chat_msg,std::allocator<common_chat_msg>> *)&local_148);
return param_1;
}
|
|
6,191 | CustomAllocTest_ReallocStressTest_Test::~CustomAllocTest_ReallocStressTest_Test() | seiftnesse[P]memoryallocator/tests/test_allocator.cpp | TEST_F(CustomAllocTest, ReallocStressTest) {
// Use a struct to track blocks and their patterns
struct Block {
void *ptr;
size_t size;
uint8_t pattern;
};
std::vector<Block> blocks;
// Initial allocations
for (int i = 0; i < REALLOC_ITERATIONS; i++) {
size_t size = randomSize(TINY_SIZE, MEDIUM_SIZE);
void *ptr = _malloc(size);
ASSERT_NE(ptr, nullptr);
// Fill with recognizable pattern (fixed value for reliability)
uint8_t pattern = 0xAA;
fillMemory(ptr, size, pattern);
blocks.push_back({ptr, size, pattern});
}
std::cout << "Created " << blocks.size() << " initial blocks" << std::endl;
// Perform various realloc operations
int successfulReallocs = 0;
for (int i = 0; i < REALLOC_ITERATIONS / 5; i++) {
// Reduce number of iterations for stability
// Select a random block
int index = randomSize(0, blocks.size() - 1);
Block &block = blocks[index];
// Keep track of original stats
size_t originalSize = block.size;
uint8_t originalPattern = block.pattern;
// Randomly grow or shrink with more controlled ratios
bool grow = (randomSize(0, 1) == 1);
size_t newSize;
if (grow) {
// More moderate growth
newSize = block.size + randomSize(8, 128);
} else {
// Ensure we don't shrink too small
if (block.size <= TINY_SIZE * 2) {
newSize = block.size; // Keep same size if already small
} else {
newSize = std::max(TINY_SIZE, block.size - randomSize(8, 64));
}
}
// Perform reallocation
void *newPtr = _realloc(block.ptr, newSize);
// Skip if reallocation failed
if (!newPtr) {
std::cout << "Realloc failed for size " << newSize << std::endl;
continue;
}
successfulReallocs++;
// Verify old content is preserved (up to min of old and new size)
size_t verifySize = std::min(originalSize, newSize);
if (verifySize > 0) {
// For debugging - print first few bytes before/after realloc
std::cout << "Verifying " << verifySize << " bytes, pattern: "
<< static_cast<int>(originalPattern) << std::endl;
if (!verifyPattern(newPtr, verifySize, originalPattern)) {
// If pattern verification fails, print detailed debug info
std::cout << "Pattern verification failed!" << std::endl;
std::cout << "Original size: " << originalSize << ", new size: " << newSize << std::endl;
std::cout << "First few bytes at new location: ";
for (size_t j = 0; j < std::min(verifySize, size_t(16)); j++) {
std::cout << std::hex << static_cast<int>(static_cast<uint8_t *>(newPtr)[j]) << " ";
}
std::cout << std::dec << std::endl;
}
}
// Update with new pattern
uint8_t newPattern = 0xBB; // Use a consistent new pattern
fillMemory(newPtr, newSize, newPattern);
// Update the block info
blocks[index] = {newPtr, newSize, newPattern};
}
std::cout << "Completed " << successfulReallocs << " successful reallocs" << std::endl;
// Free all blocks
for (auto &block: blocks) {
_free(block.ptr);
}
} | O0 | cpp | CustomAllocTest_ReallocStressTest_Test::~CustomAllocTest_ReallocStressTest_Test():
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
callq 0x15f80
movq -0x10(%rbp), %rdi
movl $0x10, %esi
callq 0xb690
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| _ZN38CustomAllocTest_ReallocStressTest_TestD0Ev:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]; this
mov [rbp+var_10], rdi
call _ZN38CustomAllocTest_ReallocStressTest_TestD2Ev; CustomAllocTest_ReallocStressTest_Test::~CustomAllocTest_ReallocStressTest_Test()
mov rdi, [rbp+var_10]; void *
mov esi, 10h; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
add rsp, 10h
pop rbp
retn
| void CustomAllocTest_ReallocStressTest_Test::~CustomAllocTest_ReallocStressTest_Test(
CustomAllocTest_ReallocStressTest_Test *this)
{
CustomAllocTest_ReallocStressTest_Test::~CustomAllocTest_ReallocStressTest_Test(this);
operator delete(this, 0x10uLL);
}
| ~CustomAllocTest_ReallocStressTest_Test:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RDI
CALL 0x00115f80
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x10
CALL 0x0010b690
ADD RSP,0x10
POP RBP
RET
|
/* CustomAllocTest_ReallocStressTest_Test::~CustomAllocTest_ReallocStressTest_Test() */
void __thiscall
CustomAllocTest_ReallocStressTest_Test::~CustomAllocTest_ReallocStressTest_Test
(CustomAllocTest_ReallocStressTest_Test *this)
{
~CustomAllocTest_ReallocStressTest_Test(this);
operator_delete(this,0x10);
return;
}
|
|
6,192 | CustomAllocTest_ReallocStressTest_Test::~CustomAllocTest_ReallocStressTest_Test() | seiftnesse[P]memoryallocator/tests/test_allocator.cpp | TEST_F(CustomAllocTest, ReallocStressTest) {
// Use a struct to track blocks and their patterns
struct Block {
void *ptr;
size_t size;
uint8_t pattern;
};
std::vector<Block> blocks;
// Initial allocations
for (int i = 0; i < REALLOC_ITERATIONS; i++) {
size_t size = randomSize(TINY_SIZE, MEDIUM_SIZE);
void *ptr = _malloc(size);
ASSERT_NE(ptr, nullptr);
// Fill with recognizable pattern (fixed value for reliability)
uint8_t pattern = 0xAA;
fillMemory(ptr, size, pattern);
blocks.push_back({ptr, size, pattern});
}
std::cout << "Created " << blocks.size() << " initial blocks" << std::endl;
// Perform various realloc operations
int successfulReallocs = 0;
for (int i = 0; i < REALLOC_ITERATIONS / 5; i++) {
// Reduce number of iterations for stability
// Select a random block
int index = randomSize(0, blocks.size() - 1);
Block &block = blocks[index];
// Keep track of original stats
size_t originalSize = block.size;
uint8_t originalPattern = block.pattern;
// Randomly grow or shrink with more controlled ratios
bool grow = (randomSize(0, 1) == 1);
size_t newSize;
if (grow) {
// More moderate growth
newSize = block.size + randomSize(8, 128);
} else {
// Ensure we don't shrink too small
if (block.size <= TINY_SIZE * 2) {
newSize = block.size; // Keep same size if already small
} else {
newSize = std::max(TINY_SIZE, block.size - randomSize(8, 64));
}
}
// Perform reallocation
void *newPtr = _realloc(block.ptr, newSize);
// Skip if reallocation failed
if (!newPtr) {
std::cout << "Realloc failed for size " << newSize << std::endl;
continue;
}
successfulReallocs++;
// Verify old content is preserved (up to min of old and new size)
size_t verifySize = std::min(originalSize, newSize);
if (verifySize > 0) {
// For debugging - print first few bytes before/after realloc
std::cout << "Verifying " << verifySize << " bytes, pattern: "
<< static_cast<int>(originalPattern) << std::endl;
if (!verifyPattern(newPtr, verifySize, originalPattern)) {
// If pattern verification fails, print detailed debug info
std::cout << "Pattern verification failed!" << std::endl;
std::cout << "Original size: " << originalSize << ", new size: " << newSize << std::endl;
std::cout << "First few bytes at new location: ";
for (size_t j = 0; j < std::min(verifySize, size_t(16)); j++) {
std::cout << std::hex << static_cast<int>(static_cast<uint8_t *>(newPtr)[j]) << " ";
}
std::cout << std::dec << std::endl;
}
}
// Update with new pattern
uint8_t newPattern = 0xBB; // Use a consistent new pattern
fillMemory(newPtr, newSize, newPattern);
// Update the block info
blocks[index] = {newPtr, newSize, newPattern};
}
std::cout << "Completed " << successfulReallocs << " successful reallocs" << std::endl;
// Free all blocks
for (auto &block: blocks) {
_free(block.ptr);
}
} | O1 | cpp | CustomAllocTest_ReallocStressTest_Test::~CustomAllocTest_ReallocStressTest_Test():
pushq %rbx
movq %rdi, %rbx
callq 0x242c6
movl $0x10, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x94c0
nop
| _ZN38CustomAllocTest_ReallocStressTest_TestD0Ev:
push rbx
mov rbx, rdi
call _ZN7testing4TestD2Ev; testing::Test::~Test()
mov esi, 10h; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
| void CustomAllocTest_ReallocStressTest_Test::~CustomAllocTest_ReallocStressTest_Test(
CustomAllocTest_ReallocStressTest_Test *this)
{
testing::Test::~Test(this);
operator delete(this, 0x10uLL);
}
| ~CustomAllocTest_ReallocStressTest_Test:
PUSH RBX
MOV RBX,RDI
CALL 0x001242c6
MOV ESI,0x10
MOV RDI,RBX
POP RBX
JMP 0x001094c0
|
/* CustomAllocTest_ReallocStressTest_Test::~CustomAllocTest_ReallocStressTest_Test() */
void __thiscall
CustomAllocTest_ReallocStressTest_Test::~CustomAllocTest_ReallocStressTest_Test
(CustomAllocTest_ReallocStressTest_Test *this)
{
testing::Test::~Test((Test *)this);
operator_delete(this,0x10);
return;
}
|
|
6,193 | JS_ValueToAtom | bluesky950520[P]quickjs/quickjs.c | JSAtom JS_ValueToAtom(JSContext *ctx, JSValue val)
{
JSAtom atom;
uint32_t tag;
tag = JS_VALUE_GET_TAG(val);
if (tag == JS_TAG_INT &&
(uint32_t)JS_VALUE_GET_INT(val) <= JS_ATOM_MAX_INT) {
/* fast path for integer values */
atom = __JS_AtomFromUInt32(JS_VALUE_GET_INT(val));
} else if (tag == JS_TAG_SYMBOL) {
JSAtomStruct *p = JS_VALUE_GET_PTR(val);
atom = JS_DupAtom(ctx, js_get_atom_index(ctx->rt, p));
} else {
JSValue str;
str = JS_ToPropertyKey(ctx, val);
if (JS_IsException(str))
return JS_ATOM_NULL;
if (JS_VALUE_GET_TAG(str) == JS_TAG_SYMBOL) {
atom = js_symbol_to_atom(ctx, str);
} else {
atom = JS_NewAtomStr(ctx, JS_VALUE_GET_STRING(str));
}
}
return atom;
} | O0 | c | JS_ValueToAtom:
subq $0x58, %rsp
movq %rsi, 0x40(%rsp)
movq %rdx, 0x48(%rsp)
movq %rdi, 0x38(%rsp)
movq 0x48(%rsp), %rax
movl %eax, 0x30(%rsp)
cmpl $0x0, 0x30(%rsp)
jne 0x3123f
cmpl $0x7fffffff, 0x40(%rsp) # imm = 0x7FFFFFFF
ja 0x3123f
movl 0x40(%rsp), %edi
callq 0x285b0
movl %eax, 0x34(%rsp)
jmp 0x3130b
cmpl $-0x8, 0x30(%rsp)
jne 0x31280
movq 0x40(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x38(%rsp), %rax
movq %rax, (%rsp)
movq 0x38(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x28(%rsp), %rsi
callq 0x31320
movq (%rsp), %rdi
movl %eax, %esi
callq 0x27fa0
movl %eax, 0x34(%rsp)
jmp 0x31309
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
callq 0x313d0
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
je 0x312d0
movl $0x0, 0x54(%rsp)
jmp 0x31313
movq 0x20(%rsp), %rax
cmpl $-0x8, %eax
jne 0x312f4
movq 0x38(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
callq 0x31420
movl %eax, 0x34(%rsp)
jmp 0x31307
movq 0x38(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x28440
movl %eax, 0x34(%rsp)
jmp 0x31309
jmp 0x3130b
movl 0x34(%rsp), %eax
movl %eax, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopl (%rax)
| JS_ValueToAtom:
sub rsp, 58h
mov [rsp+58h+var_18], rsi
mov [rsp+58h+var_10], rdx
mov [rsp+58h+var_20], rdi
mov rax, [rsp+58h+var_10]
mov [rsp+58h+var_28], eax
cmp [rsp+58h+var_28], 0
jnz short loc_3123F
cmp dword ptr [rsp+58h+var_18], 7FFFFFFFh
ja short loc_3123F
mov edi, dword ptr [rsp+58h+var_18]
call __JS_AtomFromUInt32
mov [rsp+58h+var_24], eax
jmp loc_3130B
loc_3123F:
cmp [rsp+58h+var_28], 0FFFFFFF8h
jnz short loc_31280
mov rax, [rsp+58h+var_18]
mov [rsp+58h+var_30], rax
mov rax, [rsp+58h+var_20]
mov [rsp+58h+var_58], rax
mov rax, [rsp+58h+var_20]
mov rdi, [rax+18h]
mov rsi, [rsp+58h+var_30]
call js_get_atom_index
mov rdi, [rsp+58h+var_58]
mov esi, eax
call JS_DupAtom
mov [rsp+58h+var_24], eax
jmp loc_31309
loc_31280:
mov rdi, [rsp+58h+var_20]
mov rsi, [rsp+58h+var_18]
mov rdx, [rsp+58h+var_10]
call JS_ToPropertyKey
mov [rsp+58h+var_50], rax
mov [rsp+58h+var_48], rdx
mov rax, [rsp+58h+var_50]
mov [rsp+58h+var_40], rax
mov rax, [rsp+58h+var_48]
mov [rsp+58h+var_38], rax
mov rdi, [rsp+58h+var_40]
mov rsi, [rsp+58h+var_38]
call JS_IsException_1
cmp eax, 0
jz short loc_312D0
mov [rsp+58h+var_4], 0
jmp short loc_31313
loc_312D0:
mov rax, [rsp+58h+var_38]
cmp eax, 0FFFFFFF8h
jnz short loc_312F4
mov rdi, [rsp+58h+var_20]
mov rsi, [rsp+58h+var_40]
mov rdx, [rsp+58h+var_38]
call js_symbol_to_atom
mov [rsp+58h+var_24], eax
jmp short loc_31307
loc_312F4:
mov rdi, [rsp+58h+var_20]
mov rsi, [rsp+58h+var_40]
call JS_NewAtomStr
mov [rsp+58h+var_24], eax
loc_31307:
jmp short $+2
loc_31309:
jmp short $+2
loc_3130B:
mov eax, [rsp+58h+var_24]
mov [rsp+58h+var_4], eax
loc_31313:
mov eax, [rsp+58h+var_4]
add rsp, 58h
retn
| long long JS_ValueToAtom(long long a1, long long a2, long long a3)
{
unsigned int atom_index; // eax
long long v4; // rdx
long long v6; // [rsp+8h] [rbp-50h]
long long v7; // [rsp+20h] [rbp-38h]
if ( !(_DWORD)a3 && (unsigned int)a2 <= 0x7FFFFFFF )
return (unsigned int)_JS_AtomFromUInt32(a2);
if ( (_DWORD)a3 == -8 )
{
atom_index = js_get_atom_index(*(_QWORD *)(a1 + 24), a2);
return (unsigned int)JS_DupAtom(a1, atom_index);
}
v6 = JS_ToPropertyKey(a1, a2, a3);
v7 = v4;
if ( !JS_IsException_1(v6, v4) )
{
if ( (_DWORD)v7 == -8 )
return (unsigned int)js_symbol_to_atom(a1, v6, v7);
else
return (unsigned int)JS_NewAtomStr(a1, v6);
}
return 0;
}
| JS_ValueToAtom:
SUB RSP,0x58
MOV qword ptr [RSP + 0x40],RSI
MOV qword ptr [RSP + 0x48],RDX
MOV qword ptr [RSP + 0x38],RDI
MOV RAX,qword ptr [RSP + 0x48]
MOV dword ptr [RSP + 0x30],EAX
CMP dword ptr [RSP + 0x30],0x0
JNZ 0x0013123f
CMP dword ptr [RSP + 0x40],0x7fffffff
JA 0x0013123f
MOV EDI,dword ptr [RSP + 0x40]
CALL 0x001285b0
MOV dword ptr [RSP + 0x34],EAX
JMP 0x0013130b
LAB_0013123f:
CMP dword ptr [RSP + 0x30],-0x8
JNZ 0x00131280
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV RDI,qword ptr [RAX + 0x18]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x00131320
MOV RDI,qword ptr [RSP]
MOV ESI,EAX
CALL 0x00127fa0
MOV dword ptr [RSP + 0x34],EAX
JMP 0x00131309
LAB_00131280:
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x48]
CALL 0x001313d0
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],RDX
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x00123cc0
CMP EAX,0x0
JZ 0x001312d0
MOV dword ptr [RSP + 0x54],0x0
JMP 0x00131313
LAB_001312d0:
MOV RAX,qword ptr [RSP + 0x20]
CMP EAX,-0x8
JNZ 0x001312f4
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x20]
CALL 0x00131420
MOV dword ptr [RSP + 0x34],EAX
JMP 0x00131307
LAB_001312f4:
MOV RDI,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x00128440
MOV dword ptr [RSP + 0x34],EAX
LAB_00131307:
JMP 0x00131309
LAB_00131309:
JMP 0x0013130b
LAB_0013130b:
MOV EAX,dword ptr [RSP + 0x34]
MOV dword ptr [RSP + 0x54],EAX
LAB_00131313:
MOV EAX,dword ptr [RSP + 0x54]
ADD RSP,0x58
RET
|
int4 JS_ValueToAtom(long param_1,ulong param_2,int8 param_3)
{
int4 uVar1;
int iVar2;
int8 uVar3;
int1 auVar4 [16];
int4 local_24;
uint local_18;
if (((int)param_3 == 0) && (local_18 = (uint)param_2, local_18 < 0x80000000)) {
local_24 = __JS_AtomFromUInt32(param_2 & 0xffffffff);
}
else if ((int)param_3 == -8) {
uVar1 = js_get_atom_index(*(int8 *)(param_1 + 0x18),param_2);
local_24 = JS_DupAtom(param_1,uVar1);
}
else {
auVar4 = JS_ToPropertyKey(param_1,param_2,param_3);
uVar3 = auVar4._0_8_;
iVar2 = JS_IsException(uVar3,auVar4._8_8_);
if (iVar2 != 0) {
return 0;
}
if (auVar4._8_4_ == -8) {
local_24 = js_symbol_to_atom(param_1,uVar3,auVar4._8_8_);
}
else {
local_24 = JS_NewAtomStr(param_1,uVar3);
}
}
return local_24;
}
|
|
6,194 | JS_ValueToAtom | bluesky950520[P]quickjs/quickjs.c | JSAtom JS_ValueToAtom(JSContext *ctx, JSValue val)
{
JSAtom atom;
uint32_t tag;
tag = JS_VALUE_GET_TAG(val);
if (tag == JS_TAG_INT &&
(uint32_t)JS_VALUE_GET_INT(val) <= JS_ATOM_MAX_INT) {
/* fast path for integer values */
atom = __JS_AtomFromUInt32(JS_VALUE_GET_INT(val));
} else if (tag == JS_TAG_SYMBOL) {
JSAtomStruct *p = JS_VALUE_GET_PTR(val);
atom = JS_DupAtom(ctx, js_get_atom_index(ctx->rt, p));
} else {
JSValue str;
str = JS_ToPropertyKey(ctx, val);
if (JS_IsException(str))
return JS_ATOM_NULL;
if (JS_VALUE_GET_TAG(str) == JS_TAG_SYMBOL) {
atom = js_symbol_to_atom(ctx, str);
} else {
atom = JS_NewAtomStr(ctx, JS_VALUE_GET_STRING(str));
}
}
return atom;
} | O1 | c | JS_ValueToAtom:
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rax
movq %rsi, (%rsp)
testl %edx, %edx
sete %cl
testl %eax, %eax
setns %sil
andb %cl, %sil
cmpb $0x1, %sil
jne 0x240be
orl $0x80000000, %eax # imm = 0x80000000
addq $0x10, %rsp
popq %rbx
retq
movq %rdi, %rbx
cmpl $-0x8, %edx
jne 0x240e3
movq (%rsp), %rdx
movq 0x18(%rbx), %rcx
movq 0x4(%rdx), %rax
movq %rax, %rsi
shrq $0x3e, %rsi
cmpl $0x2, %esi
jbe 0x2411b
movl 0xc(%rdx), %eax
jmp 0x24140
movq (%rsp), %rsi
movq %rbx, %rdi
movl $0x1, %ecx
callq 0x27add
movq %rax, 0x8(%rsp)
cmpl $0x6, %edx
je 0x2415c
cmpl $-0x8, %edx
jne 0x24163
movq %rax, %rcx
movq 0x4(%rax), %rax
movq %rax, %rdx
shrq $0x3e, %rdx
cmpl $0x2, %edx
jbe 0x24175
movl 0xc(%rcx), %eax
jmp 0x240b8
shrq $0x20, %rax
movl 0x50(%rcx), %esi
decl %esi
andl %eax, %esi
shll $0x2, %esi
addq 0x60(%rcx), %rsi
movq 0x68(%rcx), %rdi
movl (%rsi), %eax
movq (%rdi,%rax,8), %r8
leaq 0xc(%r8), %rsi
cmpq %rdx, %r8
jne 0x24131
cmpl $0xe0, %eax
jl 0x240b8
movq 0x68(%rcx), %rcx
movl %eax, %edx
movq (%rcx,%rdx,8), %rcx
incl (%rcx)
jmp 0x240b8
xorl %eax, %eax
jmp 0x240b8
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x20038
jmp 0x240b8
movq 0x18(%rbx), %rsi
shrq $0x20, %rax
movl 0x50(%rsi), %edx
decl %edx
andl %eax, %edx
shll $0x2, %edx
addq 0x60(%rsi), %rdx
movq 0x68(%rsi), %rsi
movl (%rdx), %eax
movq (%rsi,%rax,8), %rdi
leaq 0xc(%rdi), %rdx
cmpq %rcx, %rdi
jne 0x2418f
jmp 0x240b8
| JS_ValueToAtom:
push rbx
sub rsp, 10h
mov rax, rsi
mov [rsp+18h+var_18], rsi
test edx, edx
setz cl
test eax, eax
setns sil
and sil, cl
cmp sil, 1
jnz short loc_240BE
or eax, 80000000h
loc_240B8:
add rsp, 10h
pop rbx
retn
loc_240BE:
mov rbx, rdi
cmp edx, 0FFFFFFF8h
jnz short loc_240E3
mov rdx, [rsp+18h+var_18]
mov rcx, [rbx+18h]
mov rax, [rdx+4]
mov rsi, rax
shr rsi, 3Eh
cmp esi, 2
jbe short loc_2411B
mov eax, [rdx+0Ch]
jmp short loc_24140
loc_240E3:
mov rsi, [rsp+18h+var_18]
mov rdi, rbx
mov ecx, 1
call JS_ToStringInternal
mov [rsp+18h+var_10], rax
cmp edx, 6
jz short loc_2415C
cmp edx, 0FFFFFFF8h
jnz short loc_24163
mov rcx, rax
mov rax, [rax+4]
mov rdx, rax
shr rdx, 3Eh
cmp edx, 2
jbe short loc_24175
mov eax, [rcx+0Ch]
jmp short loc_240B8
loc_2411B:
shr rax, 20h
mov esi, [rcx+50h]
dec esi
and esi, eax
shl esi, 2
add rsi, [rcx+60h]
mov rdi, [rcx+68h]
loc_24131:
mov eax, [rsi]
mov r8, [rdi+rax*8]
lea rsi, [r8+0Ch]
cmp r8, rdx
jnz short loc_24131
loc_24140:
cmp eax, 0E0h
jl loc_240B8
mov rcx, [rcx+68h]
mov edx, eax
mov rcx, [rcx+rdx*8]
inc dword ptr [rcx]
jmp loc_240B8
loc_2415C:
xor eax, eax
jmp loc_240B8
loc_24163:
mov rsi, [rsp+18h+var_10]
mov rdi, rbx
call JS_NewAtomStr
jmp loc_240B8
loc_24175:
mov rsi, [rbx+18h]
shr rax, 20h
mov edx, [rsi+50h]
dec edx
and edx, eax
shl edx, 2
add rdx, [rsi+60h]
mov rsi, [rsi+68h]
loc_2418F:
mov eax, [rdx]
mov rdi, [rsi+rax*8]
lea rdx, [rdi+0Ch]
cmp rdi, rcx
jnz short loc_2418F
jmp loc_240B8
| long long JS_ValueToAtom(long long a1, long long a2, long long a3)
{
long long result; // rax
long long v4; // rcx
unsigned long long v5; // rax
long long v6; // rax
int v7; // edx
long long v8; // rcx
unsigned long long v9; // rax
unsigned int *v10; // rsi
long long v11; // r8
_DWORD *v12; // rcx
long long v13; // rsi
unsigned int *v14; // rdx
long long v15; // rsi
long long v16; // rdi
if ( (_DWORD)a3 == 0 && (int)a2 >= 0 )
return (unsigned int)a2 | 0x80000000;
if ( (_DWORD)a3 == -8 )
{
v4 = *(_QWORD *)(a1 + 24);
v5 = *(_QWORD *)(a2 + 4);
if ( (unsigned int)(v5 >> 62) <= 2 )
{
v10 = (unsigned int *)(*(_QWORD *)(v4 + 96) + 4 * (HIDWORD(v5) & (unsigned int)(*(_DWORD *)(v4 + 80) - 1)));
do
{
result = *v10;
v11 = *(_QWORD *)(*(_QWORD *)(v4 + 104) + 8 * result);
v10 = (unsigned int *)(v11 + 12);
}
while ( v11 != a2 );
}
else
{
result = *(unsigned int *)(a2 + 12);
}
if ( (int)result >= 224 )
{
v12 = *(_DWORD **)(*(_QWORD *)(v4 + 104) + 8LL * (unsigned int)result);
++*v12;
}
}
else
{
v6 = JS_ToStringInternal(a1, a2, a3, 1LL);
if ( v7 == 6 )
{
return 0LL;
}
else if ( v7 == -8 )
{
v8 = v6;
v9 = *(_QWORD *)(v6 + 4);
if ( (unsigned int)(v9 >> 62) <= 2 )
{
v13 = *(_QWORD *)(a1 + 24);
v14 = (unsigned int *)(*(_QWORD *)(v13 + 96) + 4 * (HIDWORD(v9) & (unsigned int)(*(_DWORD *)(v13 + 80) - 1)));
v15 = *(_QWORD *)(v13 + 104);
do
{
result = *v14;
v16 = *(_QWORD *)(v15 + 8 * result);
v14 = (unsigned int *)(v16 + 12);
}
while ( v16 != v8 );
}
else
{
return *(unsigned int *)(v8 + 12);
}
}
else
{
return JS_NewAtomStr(a1, v6);
}
}
return result;
}
| |||
6,195 | JS_ValueToAtom | bluesky950520[P]quickjs/quickjs.c | JSAtom JS_ValueToAtom(JSContext *ctx, JSValue val)
{
JSAtom atom;
uint32_t tag;
tag = JS_VALUE_GET_TAG(val);
if (tag == JS_TAG_INT &&
(uint32_t)JS_VALUE_GET_INT(val) <= JS_ATOM_MAX_INT) {
/* fast path for integer values */
atom = __JS_AtomFromUInt32(JS_VALUE_GET_INT(val));
} else if (tag == JS_TAG_SYMBOL) {
JSAtomStruct *p = JS_VALUE_GET_PTR(val);
atom = JS_DupAtom(ctx, js_get_atom_index(ctx->rt, p));
} else {
JSValue str;
str = JS_ToPropertyKey(ctx, val);
if (JS_IsException(str))
return JS_ATOM_NULL;
if (JS_VALUE_GET_TAG(str) == JS_TAG_SYMBOL) {
atom = js_symbol_to_atom(ctx, str);
} else {
atom = JS_NewAtomStr(ctx, JS_VALUE_GET_STRING(str));
}
}
return atom;
} | O2 | c | JS_ValueToAtom:
pushq %rbx
testl %edx, %edx
sete %al
testl %esi, %esi
setns %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x1e0d8
orl $0x80000000, %esi # imm = 0x80000000
movl %esi, %eax
popq %rbx
retq
movq %rdi, %rbx
cmpl $-0x8, %edx
jne 0x1e103
movq 0x18(%rbx), %rbx
movq %rbx, %rdi
callq 0x1e12f
movl %eax, %esi
cmpl $0xe0, %eax
jl 0x1e0d4
movq 0x68(%rbx), %rax
movl %esi, %ecx
movq (%rax,%rcx,8), %rax
incl (%rax)
jmp 0x1e0d4
movq %rbx, %rdi
callq 0x1e169
cmpl $0x6, %edx
je 0x1e11f
cmpl $-0x8, %edx
jne 0x1e123
movq 0x18(%rbx), %rdi
movq %rax, %rsi
popq %rbx
jmp 0x1e12f
xorl %esi, %esi
jmp 0x1e0d4
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
jmp 0x1a40c
| JS_ValueToAtom:
push rbx
test edx, edx
setz al
test esi, esi
setns cl
and cl, al
cmp cl, 1
jnz short loc_1E0D8
or esi, 80000000h
loc_1E0D4:
mov eax, esi
pop rbx
retn
loc_1E0D8:
mov rbx, rdi
cmp edx, 0FFFFFFF8h
jnz short loc_1E103
mov rbx, [rbx+18h]
mov rdi, rbx
call js_get_atom_index
mov esi, eax
cmp eax, 0E0h
jl short loc_1E0D4
mov rax, [rbx+68h]
mov ecx, esi
mov rax, [rax+rcx*8]
inc dword ptr [rax]
jmp short loc_1E0D4
loc_1E103:
mov rdi, rbx
call JS_ToPropertyKey
cmp edx, 6
jz short loc_1E11F
cmp edx, 0FFFFFFF8h
jnz short loc_1E123
mov rdi, [rbx+18h]
mov rsi, rax
pop rbx
jmp short js_get_atom_index
loc_1E11F:
xor esi, esi
jmp short loc_1E0D4
loc_1E123:
mov rdi, rbx
mov rsi, rax
pop rbx
jmp JS_NewAtomStr
| long long JS_ValueToAtom(long long a1, long long a2, int a3)
{
int atom_index; // esi
long long v5; // rbx
_DWORD *v6; // rax
long long v7; // rax
int v8; // edx
if ( a3 == 0 && (int)a2 >= 0 )
return (unsigned int)(a2 | 0x80000000);
if ( a3 == -8 )
{
v5 = *(_QWORD *)(a1 + 24);
atom_index = js_get_atom_index(v5, a2);
if ( atom_index >= 224 )
{
v6 = *(_DWORD **)(*(_QWORD *)(v5 + 104) + 8LL * (unsigned int)atom_index);
++*v6;
}
return (unsigned int)atom_index;
}
v7 = JS_ToPropertyKey(a1);
if ( v8 == 6 )
return 0;
if ( v8 == -8 )
return js_get_atom_index(*(_QWORD *)(a1 + 24), v7);
else
return JS_NewAtomStr(a1, v7);
}
| JS_ValueToAtom:
PUSH RBX
TEST EDX,EDX
SETZ AL
TEST ESI,ESI
SETNS CL
AND CL,AL
CMP CL,0x1
JNZ 0x0011e0d8
OR ESI,0x80000000
LAB_0011e0d4:
MOV EAX,ESI
POP RBX
RET
LAB_0011e0d8:
MOV RBX,RDI
CMP EDX,-0x8
JNZ 0x0011e103
MOV RBX,qword ptr [RBX + 0x18]
MOV RDI,RBX
CALL 0x0011e12f
MOV ESI,EAX
CMP EAX,0xe0
JL 0x0011e0d4
MOV RAX,qword ptr [RBX + 0x68]
MOV ECX,ESI
MOV RAX,qword ptr [RAX + RCX*0x8]
INC dword ptr [RAX]
JMP 0x0011e0d4
LAB_0011e103:
MOV RDI,RBX
CALL 0x0011e169
CMP EDX,0x6
JZ 0x0011e11f
CMP EDX,-0x8
JNZ 0x0011e123
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,RAX
POP RBX
JMP 0x0011e12f
LAB_0011e11f:
XOR ESI,ESI
JMP 0x0011e0d4
LAB_0011e123:
MOV RDI,RBX
MOV RSI,RAX
POP RBX
JMP 0x0011a40c
|
ulong JS_ValueToAtom(long param_1,uint param_2,int param_3)
{
long lVar1;
int *piVar2;
ulong uVar3;
int1 auVar4 [12];
if ((int)param_2 < 0 || param_3 != 0) {
if (param_3 == -8) {
lVar1 = *(long *)(param_1 + 0x18);
param_2 = js_get_atom_index(lVar1);
if (0xdf < (int)param_2) {
piVar2 = *(int **)(*(long *)(lVar1 + 0x68) + (ulong)param_2 * 8);
*piVar2 = *piVar2 + 1;
}
}
else {
auVar4 = JS_ToPropertyKey(param_1);
if (auVar4._8_4_ != 6) {
if (auVar4._8_4_ == -8) {
uVar3 = js_get_atom_index(*(int8 *)(param_1 + 0x18),auVar4._0_8_);
return uVar3;
}
uVar3 = JS_NewAtomStr(param_1,auVar4._0_8_);
return uVar3;
}
param_2 = 0;
}
}
else {
param_2 = param_2 | 0x80000000;
}
return (ulong)param_2;
}
|
|
6,196 | allocate_blobs | eloqsql/storage/maria/ma_bitmap.c | static my_bool allocate_blobs(MARIA_HA *info, MARIA_ROW *row)
{
ulong *length, *end;
uint elements;
/*
Reserve size for:
head block
one extent
tail block
*/
elements= info->bitmap_blocks.elements;
for (length= row->blob_lengths, end= length + info->s->base.blobs;
length < end; length++)
{
if (*length && find_blob(info, *length))
return 1;
}
row->extents_count= (info->bitmap_blocks.elements - elements);
return 0;
} | O0 | c | allocate_blobs:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x2c8(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movl 0x3f0(%rcx), %ecx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x3c577
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
je 0x3c567
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rsi
callq 0x3e530
movsbl %al, %eax
cmpl $0x0, %eax
je 0x3c567
movb $0x1, -0x1(%rbp)
jmp 0x3c592
jmp 0x3c569
movq -0x20(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
jmp 0x3c535
movq -0x10(%rbp), %rax
movl 0x2c8(%rax), %ecx
subl -0x2c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0xac(%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| allocate_blobs:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov eax, [rax+2C8h]
mov [rbp+var_2C], eax
mov rax, [rbp+var_18]
mov rax, [rax+60h]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
mov ecx, [rcx+3F0h]
shl rcx, 3
add rax, rcx
mov [rbp+var_28], rax
loc_3C535:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jnb short loc_3C577
mov rax, [rbp+var_20]
cmp qword ptr [rax], 0
jz short loc_3C567
mov rdi, [rbp+var_10]
mov rax, [rbp+var_20]
mov rsi, [rax]
call find_blob
movsx eax, al
cmp eax, 0
jz short loc_3C567
mov [rbp+var_1], 1
jmp short loc_3C592
loc_3C567:
jmp short $+2
loc_3C569:
mov rax, [rbp+var_20]
add rax, 8
mov [rbp+var_20], rax
jmp short loc_3C535
loc_3C577:
mov rax, [rbp+var_10]
mov ecx, [rax+2C8h]
sub ecx, [rbp+var_2C]
mov rax, [rbp+var_18]
mov [rax+0ACh], ecx
mov [rbp+var_1], 0
loc_3C592:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char allocate_blobs(_DWORD *a1, long long a2)
{
int v3; // [rsp+4h] [rbp-2Ch]
_QWORD *v4; // [rsp+8h] [rbp-28h]
_QWORD *v5; // [rsp+10h] [rbp-20h]
v3 = a1[178];
v5 = *(_QWORD **)(a2 + 96);
v4 = &v5[*(unsigned int *)(*(_QWORD *)a1 + 1008LL)];
while ( v5 < v4 )
{
if ( *v5 && (unsigned __int8)find_blob(a1, *v5) )
return 1;
++v5;
}
*(_DWORD *)(a2 + 172) = a1[178] - v3;
return 0;
}
| allocate_blobs:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x2c8]
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x60]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0x3f0]
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
LAB_0013c535:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JNC 0x0013c577
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX],0x0
JZ 0x0013c567
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RAX]
CALL 0x0013e530
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x0013c567
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0013c592
LAB_0013c567:
JMP 0x0013c569
LAB_0013c569:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x8
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0013c535
LAB_0013c577:
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x2c8]
SUB ECX,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0xac],ECX
MOV byte ptr [RBP + -0x1],0x0
LAB_0013c592:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 allocate_blobs(long *param_1,long param_2)
{
long lVar1;
char cVar2;
long *plVar3;
long *local_28;
lVar1 = param_1[0x59];
local_28 = *(long **)(param_2 + 0x60);
plVar3 = local_28 + *(uint *)(*param_1 + 0x3f0);
while( true ) {
if (plVar3 <= local_28) {
*(int *)(param_2 + 0xac) = (int)param_1[0x59] - (int)lVar1;
return 0;
}
if ((*local_28 != 0) && (cVar2 = find_blob(param_1,*local_28), cVar2 != '\0')) break;
local_28 = local_28 + 1;
}
return 1;
}
|
|
6,197 | Node_hasBaselineFunc_initial_Test::TestBody() | yoga-mod/tests/YGNodeCallbackTest.cpp | TEST(Node, hasBaselineFunc_initial) {
auto n = Node{};
ASSERT_FALSE(n.hasBaselineFunc());
} | O3 | cpp | Node_hasBaselineFunc_initial_Test::TestBody():
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x290, %rsp # imm = 0x290
leaq -0x298(%rbp), %rbx
movq %rbx, %rdi
callq 0x371522
cmpq $0x0, 0x18(%rbx)
sete -0x30(%rbp)
movq $0x0, -0x28(%rbp)
je 0xaccf8
leaq -0x20(%rbp), %rdi
callq 0x37f68a
leaq -0x28(%rbp), %rbx
leaq 0x2f0eb9(%rip), %rdx # 0x39db29
leaq 0x2ecdd3(%rip), %rcx # 0x399a4a
leaq 0x2ecdc6(%rip), %r8 # 0x399a44
leaq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x37bad6
movq -0x50(%rbp), %r8
leaq 0x2f0d81(%rip), %rdx # 0x39da17
leaq -0x18(%rbp), %rdi
movl $0x2, %esi
movl $0x3a, %ecx
callq 0x37cfa4
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x37bc92
leaq -0x18(%rbp), %rdi
callq 0x37d01c
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xaccd8
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x32440
movq -0x20(%rbp), %rdi
testq %rdi, %rdi
je 0xacce7
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x28(%rbp), %rsi
testq %rsi, %rsi
je 0xaccf8
movq %rbx, %rdi
callq 0x6fd1c
movq -0x80(%rbp), %rdi
testq %rdi, %rdi
je 0xacd0d
movq -0x70(%rbp), %rsi
subq %rdi, %rsi
callq 0x32440
movq -0x1e8(%rbp), %rsi
testq %rsi, %rsi
je 0xacd25
leaq -0x1e8(%rbp), %rdi
callq 0x7777e
addq $0x290, %rsp # imm = 0x290
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
leaq -0x18(%rbp), %rdi
callq 0x37d01c
jmp 0xacd42
movq %rax, %r14
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xacd60
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x32440
jmp 0xacd60
movq %rax, %r14
movq -0x20(%rbp), %rdi
testq %rdi, %rdi
je 0xacd6f
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x28(%rbp), %rsi
testq %rsi, %rsi
je 0xacd85
movq %rbx, %rdi
callq 0x6fd1c
jmp 0xacd85
movq %rax, %r14
leaq -0x298(%rbp), %rdi
callq 0x911d4
movq %r14, %rdi
callq 0x32840
nop
| _ZN33Node_hasBaselineFunc_initial_Test8TestBodyEv:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 290h
lea rbx, [rbp+var_298]
mov rdi, rbx; this
call _ZN8facebook4yoga4NodeC2Ev; facebook::yoga::Node::Node(void)
cmp qword ptr [rbx+18h], 0
setz [rbp+var_30]
mov [rbp+var_28], 0
jz loc_ACCF8
lea rdi, [rbp+var_20]; this
call _ZN7testing7MessageC2Ev; testing::Message::Message(void)
lea rbx, [rbp+var_28]
lea rdx, aNHasbaselinefu; "n.hasBaselineFunc()"
lea rcx, aTrue; "true"
lea r8, aFalse; "false"
lea rdi, [rbp+var_50]
lea rsi, [rbp+var_30]
call _ZN7testing8internal30GetBoolAssertionFailureMessageB5cxx11ERKNS_15AssertionResultEPKcS5_S5_; testing::internal::GetBoolAssertionFailureMessage(testing::AssertionResult const&,char const*,char const*,char const*)
mov r8, [rbp+var_50]
lea rdx, aWorkspaceLlm4b_16; "/workspace/llm4binary/github2025/yoga-m"...
lea rdi, [rbp+var_18]
mov esi, 2
mov ecx, 3Ah ; ':'
call _ZN7testing8internal12AssertHelperC2ENS_14TestPartResult4TypeEPKciS5_; testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type,char const*,int,char const*)
lea rdi, [rbp+var_18]
lea rsi, [rbp+var_20]
call _ZNK7testing8internal12AssertHelperaSERKNS_7MessageE; testing::internal::AssertHelper::operator=(testing::Message const&)
lea rdi, [rbp+var_18]; this
call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper()
lea rax, [rbp+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_ACCD8
mov rsi, [rbp+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_ACCD8:
mov rdi, [rbp+var_20]
test rdi, rdi
jz short loc_ACCE7
mov rax, [rdi]
call qword ptr [rax+8]
loc_ACCE7:
mov rsi, [rbp+var_28]
test rsi, rsi
jz short loc_ACCF8
mov rdi, rbx
call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*)
loc_ACCF8:
mov rdi, [rbp+var_80]; void *
test rdi, rdi
jz short loc_ACD0D
mov rsi, [rbp+var_70]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_ACD0D:
mov rsi, [rbp+var_1E8]
test rsi, rsi
jz short loc_ACD25
lea rdi, [rbp+var_1E8]
call _ZNKSt14default_deleteIN8facebook4yoga16SmallValueBufferILm4EE8OverflowEEclEPS4_; std::default_delete<facebook::yoga::SmallValueBuffer<4ul>::Overflow>::operator()(facebook::yoga::SmallValueBuffer<4ul>::Overflow*)
loc_ACD25:
add rsp, 290h
pop rbx
pop r14
pop rbp
retn
mov r14, rax
lea rdi, [rbp+var_18]; this
call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper()
jmp short loc_ACD42
mov r14, rax
loc_ACD42:
lea rax, [rbp+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_ACD60
mov rsi, [rbp+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_ACD60
mov r14, rax
loc_ACD60:
mov rdi, [rbp+var_20]
test rdi, rdi
jz short loc_ACD6F
mov rax, [rdi]
call qword ptr [rax+8]
loc_ACD6F:
mov rsi, [rbp+var_28]
test rsi, rsi
jz short loc_ACD85
mov rdi, rbx
call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*)
jmp short loc_ACD85
mov r14, rax
loc_ACD85:
lea rdi, [rbp+var_298]; void *
call _ZN8facebook4yoga4NodeD2Ev; facebook::yoga::Node::~Node()
mov rdi, r14
call __Unwind_Resume
| void Node_hasBaselineFunc_initial_Test::TestBody(Node_hasBaselineFunc_initial_Test *this)
{
double v1; // xmm0_8
_BYTE v2[24]; // [rsp+8h] [rbp-298h] BYREF
long long v3; // [rsp+20h] [rbp-280h]
long long v4[45]; // [rsp+B8h] [rbp-1E8h] BYREF
void *v5; // [rsp+220h] [rbp-80h]
long long v6; // [rsp+230h] [rbp-70h]
long long *v7; // [rsp+250h] [rbp-50h] BYREF
long long v8; // [rsp+260h] [rbp-40h] BYREF
bool v9[8]; // [rsp+270h] [rbp-30h] BYREF
long long v10; // [rsp+278h] [rbp-28h] BYREF
long long v11; // [rsp+280h] [rbp-20h] BYREF
_BYTE v12[24]; // [rsp+288h] [rbp-18h] BYREF
facebook::yoga::Node::Node((facebook::yoga::Node *)v2);
v9[0] = v3 == 0;
v10 = 0LL;
if ( v3 )
{
testing::Message::Message((testing::Message *)&v11);
testing::internal::GetBoolAssertionFailureMessage[abi:cxx11](&v7, v9, "n.hasBaselineFunc()", "true", "false");
testing::internal::AssertHelper::AssertHelper(
v12,
2LL,
"/workspace/llm4binary/github2025/yoga-mod/tests/YGNodeCallbackTest.cpp",
58LL,
v7);
v1 = testing::internal::AssertHelper::operator=(v12, &v11);
testing::internal::AssertHelper::~AssertHelper((testing::internal::AssertHelper *)v12);
if ( v7 != &v8 )
operator delete(v7, v8 + 1);
if ( v11 )
(*(void ( **)(long long, double))(*(_QWORD *)v11 + 8LL))(v11, v1);
if ( v10 )
std::default_delete<std::string>::operator()((long long)&v10, v10);
}
if ( v5 )
operator delete(v5, v6 - (_QWORD)v5);
if ( v4[0] )
std::default_delete<facebook::yoga::SmallValueBuffer<4ul>::Overflow>::operator()((long long)v4, v4[0]);
}
| TestBody:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x290
LEA RBX,[RBP + -0x298]
MOV RDI,RBX
CALL 0x00471522
CMP qword ptr [RBX + 0x18],0x0
SETZ byte ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x28],0x0
JZ 0x001accf8
LAB_001acc5c:
LEA RDI,[RBP + -0x20]
CALL 0x0047f68a
LAB_001acc65:
LEA RBX,[RBP + -0x28]
LEA RDX,[0x49db29]
LEA RCX,[0x499a4a]
LEA R8,[0x499a44]
LEA RDI,[RBP + -0x50]
LEA RSI,[RBP + -0x30]
CALL 0x0047bad6
MOV R8,qword ptr [RBP + -0x50]
LAB_001acc8f:
LEA RDX,[0x49da17]
LEA RDI,[RBP + -0x18]
MOV ESI,0x2
MOV ECX,0x3a
CALL 0x0047cfa4
LAB_001acca9:
LEA RDI,[RBP + -0x18]
LEA RSI,[RBP + -0x20]
CALL 0x0047bc92
LAB_001accb6:
LEA RDI,[RBP + -0x18]
CALL 0x0047d01c
LEA RAX,[RBP + -0x40]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001accd8
MOV RSI,qword ptr [RBP + -0x40]
INC RSI
CALL 0x00132440
LAB_001accd8:
MOV RDI,qword ptr [RBP + -0x20]
TEST RDI,RDI
JZ 0x001acce7
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_001acce7:
MOV RSI,qword ptr [RBP + -0x28]
TEST RSI,RSI
JZ 0x001accf8
MOV RDI,RBX
CALL 0x0016fd1c
LAB_001accf8:
MOV RDI,qword ptr [RBP + -0x80]
TEST RDI,RDI
JZ 0x001acd0d
MOV RSI,qword ptr [RBP + -0x70]
SUB RSI,RDI
CALL 0x00132440
LAB_001acd0d:
MOV RSI,qword ptr [RBP + -0x1e8]
TEST RSI,RSI
JZ 0x001acd25
LEA RDI,[RBP + -0x1e8]
CALL 0x0017777e
LAB_001acd25:
ADD RSP,0x290
POP RBX
POP R14
POP RBP
RET
|
/* Node_hasBaselineFunc_initial_Test::TestBody() */
void Node_hasBaselineFunc_initial_Test::TestBody(void)
{
Node local_2a0 [24];
long local_288;
Overflow *local_1f0 [45];
void *local_88;
long local_78;
long *local_58 [2];
long local_48 [2];
AssertionResult local_38 [8];
string *local_30;
long *local_28;
AssertHelper local_20 [8];
facebook::yoga::Node::Node(local_2a0);
local_38[0] = (AssertionResult)(local_288 == 0);
local_30 = (string *)0x0;
if (!(bool)local_38[0]) {
/* try { // try from 001acc5c to 001acc64 has its CatchHandler @ 001acd82 */
testing::Message::Message((Message *)&local_28);
/* try { // try from 001acc65 to 001acc8a has its CatchHandler @ 001acd5d */
testing::internal::GetBoolAssertionFailureMessage_abi_cxx11_
((internal *)local_58,local_38,"n.hasBaselineFunc()","true","false");
/* try { // try from 001acc8f to 001acca8 has its CatchHandler @ 001acd3f */
testing::internal::AssertHelper::AssertHelper
(local_20,2,"/workspace/llm4binary/github2025/yoga-mod/tests/YGNodeCallbackTest.cpp",
0x3a,local_58[0]);
/* try { // try from 001acca9 to 001accb5 has its CatchHandler @ 001acd31 */
testing::internal::AssertHelper::operator=(local_20,(Message *)&local_28);
testing::internal::AssertHelper::~AssertHelper(local_20);
if (local_58[0] != local_48) {
operator_delete(local_58[0],local_48[0] + 1);
}
if (local_28 != (long *)0x0) {
(**(code **)(*local_28 + 8))();
}
if (local_30 != (string *)0x0) {
std::default_delete<std::__cxx11::string>::operator()
((default_delete<std::__cxx11::string> *)&local_30,local_30);
}
}
if (local_88 != (void *)0x0) {
operator_delete(local_88,local_78 - (long)local_88);
}
if (local_1f0[0] != (Overflow *)0x0) {
std::default_delete<facebook::yoga::SmallValueBuffer<4ul>::Overflow>::operator()
((default_delete<facebook::yoga::SmallValueBuffer<4ul>::Overflow> *)local_1f0,
local_1f0[0]);
}
return;
}
|
|
6,198 | compare_columns | eloqsql/storage/maria/ma_create.c | static int compare_columns(MARIA_COLUMNDEF **a_ptr, MARIA_COLUMNDEF **b_ptr)
{
MARIA_COLUMNDEF *a= *a_ptr, *b= *b_ptr;
enum en_fieldtype a_type, b_type;
a_type= (a->type == FIELD_CHECK) ? FIELD_NORMAL : a->type;
b_type= (b->type == FIELD_CHECK) ? FIELD_NORMAL : b->type;
if (a_type == FIELD_NORMAL && !a->null_bit)
{
if (b_type != FIELD_NORMAL || b->null_bit)
return -1;
return sign((long) a->offset - (long) b->offset);
}
if (b_type == FIELD_NORMAL && !b->null_bit)
return 1;
if (a_type == b_type)
return sign((long) a->offset - (long) b->offset);
if (a_type == FIELD_NORMAL)
return -1;
if (b_type == FIELD_NORMAL)
return 1;
if (a_type == FIELD_SKIP_ZERO)
return -1;
if (b_type == FIELD_SKIP_ZERO)
return 1;
if (a->type != FIELD_BLOB && b->type != FIELD_BLOB)
if (a->length != b->length)
return sign((long) a->length - (long) b->length);
if (a_type == FIELD_BLOB)
return 1;
if (b_type == FIELD_BLOB)
return -1;
return sign((long) a->offset - (long) b->offset);
} | O3 | c | compare_columns:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rdx
movq (%rsi), %rcx
movl (%rdx), %r8d
xorl %esi, %esi
cmpl $0x9, %r8d
movl %r8d, %edi
cmovel %esi, %edi
movl (%rcx), %r9d
cmpl $0x9, %r9d
cmovnel %r9d, %esi
testl %edi, %edi
jne 0x45a28
cmpb $0x0, 0x12(%rdx)
je 0x45ab9
testl %esi, %esi
jne 0x45a36
cmpb $0x0, 0x12(%rcx)
je 0x45acd
cmpl %esi, %edi
jne 0x45a52
movl 0x4(%rdx), %eax
xorl %edx, %edx
cmpl 0x4(%rcx), %eax
setne %dl
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmovael %edx, %eax
jmp 0x45ad2
testl %esi, %esi
sete %r11b
xorl %eax, %eax
testl %edi, %edi
sete %r10b
orb %r10b, %r11b
je 0x45a6f
movb %r10b, %al
negl %eax
orl $0x1, %eax
jmp 0x45ad2
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpl $0x3, %edi
je 0x45ad2
movl $0x1, %eax
cmpl $0x3, %esi
je 0x45ad2
cmpl $0x4, %r8d
sete %r8b
cmpl $0x4, %r9d
sete %r9b
orb %r8b, %r9b
jne 0x45aa8
movzwl 0x8(%rdx), %r8d
movzwl 0x8(%rcx), %r9d
cmpw %r9w, %r8w
jne 0x45ad4
cmpl $0x4, %edi
je 0x45ad2
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpl $0x4, %esi
jne 0x45a3a
jmp 0x45ad2
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
testl %esi, %esi
jne 0x45ad2
cmpb $0x0, 0x12(%rcx)
jne 0x45ad2
jmp 0x45a3a
movl $0x1, %eax
popq %rbp
retq
xorl %eax, %eax
cmpw %r9w, %r8w
sbbl %eax, %eax
jmp 0x45a6a
| compare_columns:
push rbp
mov rbp, rsp
mov rdx, [rdi]
mov rcx, [rsi]
mov r8d, [rdx]
xor esi, esi
cmp r8d, 9
mov edi, r8d
cmovz edi, esi
mov r9d, [rcx]
cmp r9d, 9
cmovnz esi, r9d
test edi, edi
jnz short loc_45A28
cmp byte ptr [rdx+12h], 0
jz loc_45AB9
loc_45A28:
test esi, esi
jnz short loc_45A36
cmp byte ptr [rcx+12h], 0
jz loc_45ACD
loc_45A36:
cmp edi, esi
jnz short loc_45A52
loc_45A3A:
mov eax, [rdx+4]
xor edx, edx
cmp eax, [rcx+4]
setnz dl
mov eax, 0FFFFFFFFh
cmovnb eax, edx
jmp loc_45AD2
loc_45A52:
test esi, esi
setz r11b
xor eax, eax
test edi, edi
setz r10b
or r11b, r10b
jz short loc_45A6F
mov al, r10b
neg eax
loc_45A6A:
or eax, 1
jmp short loc_45AD2
loc_45A6F:
mov eax, 0FFFFFFFFh
cmp edi, 3
jz short loc_45AD2
mov eax, 1
cmp esi, 3
jz short loc_45AD2
cmp r8d, 4
setz r8b
cmp r9d, 4
setz r9b
or r9b, r8b
jnz short loc_45AA8
movzx r8d, word ptr [rdx+8]
movzx r9d, word ptr [rcx+8]
cmp r8w, r9w
jnz short loc_45AD4
loc_45AA8:
cmp edi, 4
jz short loc_45AD2
mov eax, 0FFFFFFFFh
cmp esi, 4
jnz short loc_45A3A
jmp short loc_45AD2
loc_45AB9:
mov eax, 0FFFFFFFFh
test esi, esi
jnz short loc_45AD2
cmp byte ptr [rcx+12h], 0
jnz short loc_45AD2
jmp loc_45A3A
loc_45ACD:
mov eax, 1
loc_45AD2:
pop rbp
retn
loc_45AD4:
xor eax, eax
cmp r8w, r9w
sbb eax, eax
jmp short loc_45A6A
| long long compare_columns(int **a1, int **a2)
{
int *v2; // rdx
int *v3; // rcx
int v4; // r8d
int v5; // esi
int v6; // edi
unsigned int v7; // eax
bool v8; // cf
BOOL v9; // edx
long long result; // rax
int v11; // eax
int v12; // eax
unsigned __int16 v13; // r8
unsigned __int16 v14; // r9
v2 = *a1;
v3 = *a2;
v5 = 0;
v6 = **a1;
v4 = v6;
if ( v6 == 9 )
v6 = 0;
if ( *v3 != 9 )
v5 = *v3;
if ( !v6 && !*((_BYTE *)v2 + 18) )
{
result = 0xFFFFFFFFLL;
if ( v5 || *((_BYTE *)v3 + 18) )
return result;
LABEL_10:
v7 = v2[1];
v8 = v7 < v3[1];
v9 = v7 != v3[1];
result = 0xFFFFFFFFLL;
if ( !v8 )
return v9;
return result;
}
if ( !v5 && !*((_BYTE *)v3 + 18) )
return 1LL;
if ( v6 == v5 )
goto LABEL_10;
v11 = 0;
if ( v6 == 0 || v5 == 0 )
{
LOBYTE(v11) = v6 == 0;
v12 = -v11;
return v12 | 1u;
}
result = 0xFFFFFFFFLL;
if ( v6 != 3 )
{
result = 1LL;
if ( v5 != 3 )
{
if ( v4 != 4 && *v3 != 4 )
{
v13 = *((_WORD *)v2 + 4);
v14 = *((_WORD *)v3 + 4);
if ( v13 != v14 )
{
v12 = -(v13 < v14);
return v12 | 1u;
}
}
if ( v6 != 4 )
{
result = 0xFFFFFFFFLL;
if ( v5 != 4 )
goto LABEL_10;
}
}
}
return result;
}
| compare_columns:
PUSH RBP
MOV RBP,RSP
MOV RDX,qword ptr [RDI]
MOV RCX,qword ptr [RSI]
MOV R8D,dword ptr [RDX]
XOR ESI,ESI
CMP R8D,0x9
MOV EDI,R8D
CMOVZ EDI,ESI
MOV R9D,dword ptr [RCX]
CMP R9D,0x9
CMOVNZ ESI,R9D
TEST EDI,EDI
JNZ 0x00145a28
CMP byte ptr [RDX + 0x12],0x0
JZ 0x00145ab9
LAB_00145a28:
TEST ESI,ESI
JNZ 0x00145a36
CMP byte ptr [RCX + 0x12],0x0
JZ 0x00145acd
LAB_00145a36:
CMP EDI,ESI
JNZ 0x00145a52
LAB_00145a3a:
MOV EAX,dword ptr [RDX + 0x4]
XOR EDX,EDX
CMP EAX,dword ptr [RCX + 0x4]
SETNZ DL
MOV EAX,0xffffffff
CMOVNC EAX,EDX
JMP 0x00145ad2
LAB_00145a52:
TEST ESI,ESI
SETZ R11B
XOR EAX,EAX
TEST EDI,EDI
SETZ R10B
OR R11B,R10B
JZ 0x00145a6f
MOV AL,R10B
NEG EAX
LAB_00145a6a:
OR EAX,0x1
JMP 0x00145ad2
LAB_00145a6f:
MOV EAX,0xffffffff
CMP EDI,0x3
JZ 0x00145ad2
MOV EAX,0x1
CMP ESI,0x3
JZ 0x00145ad2
CMP R8D,0x4
SETZ R8B
CMP R9D,0x4
SETZ R9B
OR R9B,R8B
JNZ 0x00145aa8
MOVZX R8D,word ptr [RDX + 0x8]
MOVZX R9D,word ptr [RCX + 0x8]
CMP R8W,R9W
JNZ 0x00145ad4
LAB_00145aa8:
CMP EDI,0x4
JZ 0x00145ad2
MOV EAX,0xffffffff
CMP ESI,0x4
JNZ 0x00145a3a
JMP 0x00145ad2
LAB_00145ab9:
MOV EAX,0xffffffff
TEST ESI,ESI
JNZ 0x00145ad2
CMP byte ptr [RCX + 0x12],0x0
JNZ 0x00145ad2
JMP 0x00145a3a
LAB_00145acd:
MOV EAX,0x1
LAB_00145ad2:
POP RBP
RET
LAB_00145ad4:
XOR EAX,EAX
CMP R8W,R9W
SBB EAX,EAX
JMP 0x00145a6a
|
uint compare_columns(int8 *param_1,int8 *param_2)
{
int iVar1;
int iVar2;
int *piVar3;
int *piVar4;
uint uVar5;
int iVar6;
int iVar7;
bool bVar8;
piVar3 = (int *)*param_1;
piVar4 = (int *)*param_2;
iVar1 = *piVar3;
iVar7 = iVar1;
if (iVar1 == 9) {
iVar7 = 0;
}
iVar2 = *piVar4;
iVar6 = 0;
if (iVar2 != 9) {
iVar6 = iVar2;
}
if ((iVar7 == 0) && (*(char *)((long)piVar3 + 0x12) == '\0')) {
if (iVar6 != 0) {
return 0xffffffff;
}
if (*(char *)((long)piVar4 + 0x12) != '\0') {
return 0xffffffff;
}
}
else {
if ((iVar6 == 0) && (*(char *)((long)piVar4 + 0x12) == '\0')) {
return 1;
}
if (iVar7 != iVar6) {
bVar8 = iVar7 == 0;
if (iVar6 == 0 || bVar8) {
LAB_00145a6a:
return -(uint)bVar8 | 1;
}
if (iVar7 == 3) {
return 0xffffffff;
}
if (iVar6 == 3) {
return 1;
}
if (iVar2 != 4 && iVar1 != 4) {
if (*(ushort *)(piVar3 + 2) != *(ushort *)(piVar4 + 2)) {
bVar8 = *(ushort *)(piVar3 + 2) < *(ushort *)(piVar4 + 2);
goto LAB_00145a6a;
}
}
if (iVar7 == 4) {
return 1;
}
if (iVar6 == 4) {
return 0xffffffff;
}
}
}
uVar5 = 0xffffffff;
if ((uint)piVar4[1] <= (uint)piVar3[1]) {
uVar5 = (uint)(piVar3[1] != piVar4[1]);
}
return uVar5;
}
|
|
6,199 | find_jump_target | bluesky950520[P]quickjs/quickjs.c | static int find_jump_target(JSFunctionDef *s, int label, int *pop)
{
int i, pos, op;
update_label(s, label, -1);
for (i = 0; i < 10; i++) {
assert(label >= 0 && label < s->label_count);
pos = s->label_slots[label].pos2;
for (;;) {
switch(op = s->byte_code.buf[pos]) {
case OP_source_loc:
case OP_label:
pos += opcode_info[op].size;
continue;
case OP_goto:
label = get_u32(s->byte_code.buf + pos + 1);
break;
case OP_drop:
/* ignore drop opcodes if followed by OP_return_undef */
while (s->byte_code.buf[++pos] == OP_drop)
continue;
if (s->byte_code.buf[pos] == OP_return_undef)
op = OP_return_undef;
/* fall thru */
default:
goto done;
}
break;
}
}
/* cycle detected, could issue a warning */
done:
*pop = op;
update_label(s, label, +1);
return label;
} | O1 | c | find_jump_target:
pushq %rbx
movq 0x170(%rdi), %rcx
movslq %esi, %rax
leaq (%rax,%rax,2), %rax
decl (%rcx,%rax,8)
movq 0x138(%rdi), %rdi
xorl %r8d, %r8d
leaq 0x2e04a(%rip), %r9 # 0x9ca30
movslq %esi, %rax
leaq (%rax,%rax,2), %rax
movl 0x8(%rcx,%rax,8), %r10d
movslq %r10d, %r11
movb (%rdi,%r11), %al
movzbl %al, %ebx
cmpl $0xc3, %ebx
jg 0x6ea0e
cmpl $0xb5, %ebx
je 0x6ea16
jmp 0x6ea20
cmpl $0xc4, %ebx
jne 0x6ea56
movzbl (%r9,%rbx,4), %eax
addl %eax, %r10d
jmp 0x6e9f2
cmpl $0xe, %ebx
je 0x6ea3c
cmpl $0x6b, %ebx
jne 0x6ea56
movl 0x1(%rdi,%r11), %esi
incl %r8d
cmpl $0xa, %r8d
jne 0x6e9e6
movb $0x6b, %al
jmp 0x6ea56
leaq (%rdi,%r11), %r8
incq %r8
movzbl (%r8), %edi
incq %r8
cmpl $0xe, %edi
je 0x6ea43
cmpl $0x29, %edi
jne 0x6ea56
movl %edi, %eax
movzbl %al, %eax
movl %eax, (%rdx)
movslq %esi, %rax
leaq (%rax,%rax,2), %rdx
incl (%rcx,%rdx,8)
popq %rbx
retq
| find_jump_target:
push rbx
mov rcx, [rdi+170h]
movsxd rax, esi
lea rax, [rax+rax*2]
dec dword ptr [rcx+rax*8]
mov rdi, [rdi+138h]
xor r8d, r8d
lea r9, opcode_info
loc_6E9E6:
movsxd rax, esi
lea rax, [rax+rax*2]
mov r10d, [rcx+rax*8+8]
loc_6E9F2:
movsxd r11, r10d
mov al, [rdi+r11]
movzx ebx, al
cmp ebx, 0C3h
jg short loc_6EA0E
cmp ebx, 0B5h
jz short loc_6EA16
jmp short loc_6EA20
loc_6EA0E:
cmp ebx, 0C4h
jnz short loc_6EA56
loc_6EA16:
movzx eax, byte ptr [r9+rbx*4]
add r10d, eax
jmp short loc_6E9F2
loc_6EA20:
cmp ebx, 0Eh
jz short loc_6EA3C
cmp ebx, 6Bh ; 'k'
jnz short loc_6EA56
mov esi, [rdi+r11+1]
inc r8d
cmp r8d, 0Ah
jnz short loc_6E9E6
mov al, 6Bh ; 'k'
jmp short loc_6EA56
loc_6EA3C:
lea r8, [rdi+r11]
inc r8
loc_6EA43:
movzx edi, byte ptr [r8]
inc r8
cmp edi, 0Eh
jz short loc_6EA43
cmp edi, 29h ; ')'
jnz short loc_6EA56
mov eax, edi
loc_6EA56:
movzx eax, al
mov [rdx], eax
movsxd rax, esi
lea rdx, [rax+rax*2]
inc dword ptr [rcx+rdx*8]
pop rbx
retn
| long long find_jump_target(long long a1, int a2, _DWORD *a3)
{
long long v3; // rcx
long long v4; // rdi
int v5; // r8d
int i; // r10d
unsigned __int8 v7; // al
unsigned __int8 *v8; // r8
int v9; // edi
long long result; // rax
v3 = *(_QWORD *)(a1 + 368);
--*(_DWORD *)(v3 + 24LL * a2);
v4 = *(_QWORD *)(a1 + 312);
v5 = 0;
while ( 2 )
{
for ( i = *(_DWORD *)(v3 + 24LL * a2 + 8); ; i += opcode_info[4 * v7] )
{
v7 = *(_BYTE *)(v4 + i);
if ( v7 <= 0xC3u )
break;
if ( v7 != 196 )
goto LABEL_16;
LABEL_7:
;
}
switch ( v7 )
{
case 0xB5u:
goto LABEL_7;
case 0xEu:
v8 = (unsigned __int8 *)(v4 + i + 1);
do
v9 = *v8++;
while ( v9 == 14 );
if ( v9 == 41 )
v7 = 41;
break;
case 0x6Bu:
a2 = *(_DWORD *)(v4 + i + 1);
if ( ++v5 == 10 )
{
v7 = 107;
break;
}
continue;
}
break;
}
LABEL_16:
*a3 = v7;
result = a2;
++*(_DWORD *)(v3 + 24LL * a2);
return result;
}
| find_jump_target:
PUSH RBX
MOV RCX,qword ptr [RDI + 0x170]
MOVSXD RAX,ESI
LEA RAX,[RAX + RAX*0x2]
DEC dword ptr [RCX + RAX*0x8]
MOV RDI,qword ptr [RDI + 0x138]
XOR R8D,R8D
LEA R9,[0x19ca30]
LAB_0016e9e6:
MOVSXD RAX,ESI
LEA RAX,[RAX + RAX*0x2]
MOV R10D,dword ptr [RCX + RAX*0x8 + 0x8]
LAB_0016e9f2:
MOVSXD R11,R10D
MOV AL,byte ptr [RDI + R11*0x1]
MOVZX EBX,AL
CMP EBX,0xc3
JG 0x0016ea0e
CMP EBX,0xb5
JZ 0x0016ea16
JMP 0x0016ea20
LAB_0016ea0e:
CMP EBX,0xc4
JNZ 0x0016ea56
LAB_0016ea16:
MOVZX EAX,byte ptr [R9 + RBX*0x4]
ADD R10D,EAX
JMP 0x0016e9f2
LAB_0016ea20:
CMP EBX,0xe
JZ 0x0016ea3c
CMP EBX,0x6b
JNZ 0x0016ea56
MOV ESI,dword ptr [RDI + R11*0x1 + 0x1]
INC R8D
CMP R8D,0xa
JNZ 0x0016e9e6
MOV AL,0x6b
JMP 0x0016ea56
LAB_0016ea3c:
LEA R8,[RDI + R11*0x1]
INC R8
LAB_0016ea43:
MOVZX EDI,byte ptr [R8]
INC R8
CMP EDI,0xe
JZ 0x0016ea43
CMP EDI,0x29
JNZ 0x0016ea56
MOV EAX,EDI
LAB_0016ea56:
MOVZX EAX,AL
MOV dword ptr [RDX],EAX
MOVSXD RAX,ESI
LEA RDX,[RAX + RAX*0x2]
INC dword ptr [RCX + RDX*0x8]
POP RBX
RET
|
void find_jump_target(long param_1,int param_2,uint *param_3)
{
int *piVar1;
long lVar2;
long lVar3;
byte bVar4;
int iVar5;
char *pcVar6;
int iVar7;
long lVar8;
lVar2 = *(long *)(param_1 + 0x170);
piVar1 = (int *)(lVar2 + (long)param_2 * 0x18);
*piVar1 = *piVar1 + -1;
lVar3 = *(long *)(param_1 + 0x138);
iVar5 = 0;
LAB_0016e9e6:
iVar7 = *(int *)(lVar2 + 8 + (long)param_2 * 0x18);
do {
lVar8 = (long)iVar7;
bVar4 = *(byte *)(lVar3 + lVar8);
if (bVar4 < 0xc4) {
if (bVar4 != 0xb5) goto LAB_0016ea20;
}
else if (bVar4 != 0xc4) goto LAB_0016ea56;
iVar7 = iVar7 + (uint)(byte)opcode_info[(ulong)bVar4 * 4];
} while( true );
code_r0x0016ea38:
bVar4 = 0x6b;
goto LAB_0016ea56;
LAB_0016ea20:
if (bVar4 != 0xe) {
if (bVar4 != 0x6b) goto LAB_0016ea56;
param_2 = *(int *)(lVar3 + 1 + lVar8);
iVar5 = iVar5 + 1;
if (iVar5 == 10) goto code_r0x0016ea38;
goto LAB_0016e9e6;
}
pcVar6 = (char *)(lVar3 + lVar8);
do {
pcVar6 = pcVar6 + 1;
} while (*pcVar6 == '\x0e');
if (*pcVar6 == ')') {
bVar4 = 0x29;
}
LAB_0016ea56:
*param_3 = (uint)bVar4;
piVar1 = (int *)(lVar2 + (long)param_2 * 0x18);
*piVar1 = *piVar1 + 1;
return;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.