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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
27,300 | SchemaConverter::_visit_pattern(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/json-schema-to-grammar.cpp | std::string _visit_pattern(const std::string & pattern, const std::string & name) {
if (!(pattern.front() == '^' && pattern.back() == '$')) {
_errors.push_back("Pattern must start with '^' and end with '$'");
return "";
}
std::string sub_pattern = pattern.substr(1, pattern.length() - 2);
std::unordered_map<std::string, std::string> sub_rule_ids;
size_t i = 0;
size_t length = sub_pattern.length();
using literal_or_rule = std::pair<std::string, bool>;
auto to_rule = [&](const literal_or_rule & ls) {
auto is_literal = ls.second;
auto s = ls.first;
return is_literal ? "\"" + s + "\"" : s;
};
std::function<literal_or_rule()> transform = [&]() -> literal_or_rule {
size_t start = i;
std::vector<literal_or_rule> seq;
auto get_dot = [&]() {
std::string rule;
if (_dotall) {
rule = "[\\U00000000-\\U0010FFFF]";
} else {
rule = "[^\\x0A\\x0D]";
}
return _add_rule("dot", rule);
};
// Joins the sequence, merging consecutive literals together.
auto join_seq = [&]() {
std::vector<literal_or_rule> ret;
std::string literal;
auto flush_literal = [&]() {
if (literal.empty()) {
return false;
}
ret.emplace_back(literal, true);
literal.clear();
return true;
};
for (const auto & item : seq) {
auto is_literal = item.second;
if (is_literal) {
literal += item.first;
} else {
flush_literal();
ret.push_back(item);
}
}
flush_literal();
std::vector<std::string> results;
for (const auto & item : ret) {
results.push_back(to_rule(item));
}
return std::make_pair(string_join(results, " "), false);
};
while (i < length) {
char c = sub_pattern[i];
if (c == '.') {
seq.emplace_back(get_dot(), false);
i++;
} else if (c == '(') {
i++;
if (i < length) {
if (sub_pattern[i] == '?') {
_warnings.push_back("Unsupported pattern syntax");
}
}
seq.emplace_back("(" + to_rule(transform()) + ")", false);
} else if (c == ')') {
i++;
if (start > 0 && sub_pattern[start - 1] != '(') {
_errors.push_back("Unbalanced parentheses");
}
return join_seq();
} else if (c == '[') {
std::string square_brackets = std::string(1, c);
i++;
while (i < length && sub_pattern[i] != ']') {
if (sub_pattern[i] == '\\') {
square_brackets += sub_pattern.substr(i, 2);
i += 2;
} else {
square_brackets += sub_pattern[i];
i++;
}
}
if (i >= length) {
_errors.push_back("Unbalanced square brackets");
}
square_brackets += ']';
i++;
seq.emplace_back(square_brackets, false);
} else if (c == '|') {
seq.emplace_back("|", false);
i++;
} else if (c == '*' || c == '+' || c == '?') {
seq.back() = std::make_pair(to_rule(seq.back()) + c, false);
i++;
} else if (c == '{') {
std::string curly_brackets = std::string(1, c);
i++;
while (i < length && sub_pattern[i] != '}') {
curly_brackets += sub_pattern[i];
i++;
}
if (i >= length) {
_errors.push_back("Unbalanced curly brackets");
}
curly_brackets += '}';
i++;
auto nums = string_split(curly_brackets.substr(1, curly_brackets.length() - 2), ",");
int min_times = 0;
int max_times = std::numeric_limits<int>::max();
try {
if (nums.size() == 1) {
min_times = max_times = std::stoi(nums[0]);
} else if (nums.size() != 2) {
_errors.push_back("Wrong number of values in curly brackets");
} else {
if (!nums[0].empty()) {
min_times = std::stoi(nums[0]);
}
if (!nums[1].empty()) {
max_times = std::stoi(nums[1]);
}
}
} catch (const std::invalid_argument & e) {
_errors.push_back("Invalid number in curly brackets");
return std::make_pair("", false);
}
auto &last = seq.back();
auto &sub = last.first;
auto sub_is_literal = last.second;
if (!sub_is_literal) {
std::string & sub_id = sub_rule_ids[sub];
if (sub_id.empty()) {
sub_id = _add_rule(name + "-" + std::to_string(sub_rule_ids.size()), sub);
}
sub = sub_id;
}
seq.back().first = build_repetition(
sub_is_literal ? "\"" + sub + "\"" : sub,
min_times,
max_times,
""
);
seq.back().second = false;
} else {
std::string literal;
auto is_non_literal = [&](char c) {
return NON_LITERAL_SET.find(c) != NON_LITERAL_SET.end();
};
while (i < length) {
if (sub_pattern[i] == '\\' && i < length - 1) {
char next = sub_pattern[i + 1];
if (ESCAPED_IN_REGEXPS_BUT_NOT_IN_LITERALS.find(next) != ESCAPED_IN_REGEXPS_BUT_NOT_IN_LITERALS.end()) {
i++;
literal += sub_pattern[i];
i++;
} else {
literal += sub_pattern.substr(i, 2);
i += 2;
}
} else if (sub_pattern[i] == '"') {
literal += "\\\"";
i++;
} else if (!is_non_literal(sub_pattern[i]) &&
(i == length - 1 || literal.empty() || sub_pattern[i + 1] == '.' || !is_non_literal(sub_pattern[i + 1]))) {
literal += sub_pattern[i];
i++;
} else {
break;
}
}
if (!literal.empty()) {
seq.emplace_back(literal, true);
}
}
}
return join_seq();
};
return _add_rule(name, "\"\\\"\" (" + to_rule(transform()) + ") \"\\\"\" space");
} | O3 | cpp | SchemaConverter::_visit_pattern(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x120, %rsp # imm = 0x120
movq %rdx, %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdx), %rdx
cmpb $0x5e, (%rdx)
jne 0xa660e
movq %rcx, %r15
movq 0x8(%rax), %rcx
cmpb $0x24, -0x1(%rdx,%rcx)
jne 0xa660e
addq $-0x2, %rcx
leaq 0x100(%rsp), %r12
movl $0x1, %edx
movq %r12, %rdi
movq %rax, %rsi
callq 0x186f0
leaq 0xb8(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
xorl %eax, %eax
movq %rax, 0x58(%rsp)
movq 0x8(%r12), %rcx
movq %rcx, 0x50(%rsp)
movq %rax, 0xe8(%rsp)
movl $0x40, %edi
callq 0x18690
leaq 0x58(%rsp), %rcx
movq %rcx, (%rax)
movq %r14, 0x8(%rax)
leaq 0xf(%rsp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x50(%rsp), %rcx
movq %rcx, 0x18(%rax)
movq %r12, 0x20(%rax)
leaq 0xe0(%rsp), %rcx
movq %rcx, 0x28(%rax)
leaq 0x88(%rsp), %rdx
movq %rdx, 0x30(%rax)
movq %r15, 0x38(%rax)
movq %rax, (%rcx)
leaq 0x362e(%rip), %rdx # 0xa9bbc
movq %rdx, 0x18(%rcx)
leaq 0x3635(%rip), %rdx # 0xa9bce
movq %rdx, 0x10(%rcx)
leaq 0x60(%rsp), %rdi
movq %rax, %rsi
callq 0xa9bf6
leaq 0xc0(%rsp), %rdi
leaq 0xf(%rsp), %rsi
leaq 0x60(%rsp), %rdx
callq 0xa9a8a
leaq 0x1d689(%rip), %rcx # 0xc3c51
leaq 0xc0(%rsp), %rdi
movl $0x6, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x18750
leaq 0x20(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xa66c4
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0xa66cc
leaq 0x98(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x60(%rsp), %rsi
movq $0x2c, (%rsi)
leaq 0x88(%rsp), %rdi
xorl %edx, %edx
callq 0x18bc0
leaq 0x88(%rsp), %rsi
movq %rax, (%rsi)
movq 0x60(%rsp), %rcx
movq %rcx, 0x10(%rsi)
movups 0x1d5f0(%rip), %xmm0 # 0xc3c40
movups %xmm0, 0x1c(%rax)
movups 0x1d5d9(%rip), %xmm0 # 0xc3c34
movups %xmm0, 0x10(%rax)
movups 0x1d5be(%rip), %xmm0 # 0xc3c24
movups %xmm0, (%rax)
movq %rcx, 0x8(%rsi)
movb $0x0, (%rax,%rcx)
addq $0xc8, %r14
movq %r14, %rdi
callq 0x3bcfa
movq 0x88(%rsp), %rdi
cmpq %r15, %rdi
je 0xa669d
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x186a0
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movq %rbx, %rax
addq $0x120, %rsp # imm = 0x120
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x10(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x1d569(%rip), %rsi # 0xc3c58
callq 0x18cb0
leaq 0x40(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rcx
movq %rax, %rdx
addq $0x10, %rdx
cmpq %rdx, %rcx
je 0xa671b
movq %rcx, 0x30(%rsp)
movq (%rdx), %rcx
movq %rcx, 0x40(%rsp)
jmp 0xa6723
movups (%rdx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rsi
leaq 0x30(%rsp), %rcx
movq %rsi, 0x8(%rcx)
movq %rdx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xa1724
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0xa6764
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x186a0
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0xa677b
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x186a0
leaq 0xd0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa679c
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x186a0
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa67b7
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x186a0
movq 0xf0(%rsp), %rax
testq %rax, %rax
je 0xa67d6
leaq 0xe0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x88(%rsp), %rdi
callq 0xa9592
leaq 0x110(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa66b0
movq 0x110(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0xa66b0
jmp 0xa68df
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0xa6831
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0xa6831
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0xa684d
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0xa684d
movq %rax, %rbx
leaq 0xd0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa6873
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0xa6873
movq %rax, %rbx
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa6893
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0xa6893
movq %rax, %rbx
movq 0xf0(%rsp), %rax
testq %rax, %rax
je 0xa68b7
leaq 0xe0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0xa68b7
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0xa9592
leaq 0x110(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa690c
movq 0x110(%rsp), %rsi
jmp 0xa68ff
movq %rax, %rdi
callq 0x2ad73
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r15, %rdi
je 0xa690c
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x186a0
jmp 0xa690c
movq %rax, %rbx
movq %rbx, %rdi
callq 0x18b90
| _ZN15SchemaConverter14_visit_patternERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 120h
mov rax, rdx
mov r14, rsi
mov rbx, rdi
mov rdx, [rdx]
cmp byte ptr [rdx], 5Eh ; '^'
jnz loc_A660E
mov r15, rcx
mov rcx, [rax+8]
cmp byte ptr [rdx+rcx-1], 24h ; '$'
jnz loc_A660E
add rcx, 0FFFFFFFFFFFFFFFEh
lea r12, [rsp+148h+var_48]
mov edx, 1
mov rdi, r12
mov rsi, rax
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
lea rax, [rsp+148h+var_90]
mov [rax-30h], rax
mov qword ptr [rax-28h], 1
xorps xmm0, xmm0
movups xmmword ptr [rax-20h], xmm0
mov dword ptr [rax-10h], 3F800000h
movups xmmword ptr [rax-8], xmm0
xor eax, eax
mov [rsp+148h+var_F0], rax; __int64
mov rcx, [r12+8]
mov qword ptr [rsp+148h+var_F8], rcx; int
mov [rsp+148h+var_60], rax
mov edi, 40h ; '@'; unsigned __int64
call __Znwm; operator new(ulong)
lea rcx, [rsp+148h+var_F0]
mov [rax], rcx
mov [rax+8], r14
lea rcx, [rsp+148h+var_139]
mov [rax+10h], rcx
lea rcx, [rsp+148h+var_F8]
mov [rax+18h], rcx
mov [rax+20h], r12
lea rcx, [rsp+148h+var_68]
mov [rax+28h], rcx
lea rdx, [rsp+148h+var_C0]
mov [rax+30h], rdx
mov [rax+38h], r15
mov [rcx], rax
lea rdx, _ZNSt17_Function_handlerIFSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbEvEZN15SchemaConverter14_visit_patternERKS6_SB_EUlvE_E9_M_invokeERKSt9_Any_data; std::_Function_handler<std::pair<std::string,bool> ()(void),SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(void)#1}>::_M_invoke(std::_Any_data const&)
mov [rcx+18h], rdx
lea rdx, _ZNSt17_Function_handlerIFSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbEvEZN15SchemaConverter14_visit_patternERKS6_SB_EUlvE_E10_M_managerERSt9_Any_dataRKSE_St18_Manager_operation; std::_Function_handler<std::pair<std::string,bool> ()(void),SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(void)#1}>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rcx+10h], rdx
lea rdi, [rsp+148h+var_E8]; int
mov rsi, rax
call _ZZN15SchemaConverter14_visit_patternERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_ENKUlvE_clB5cxx11Ev; SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(void)#1}::operator()(void)
lea rdi, [rsp+148h+var_88]
lea rsi, [rsp+148h+var_139]
lea rdx, [rsp+148h+var_E8]
call _ZZN15SchemaConverter14_visit_patternERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_ENKUlRKSt4pairIS5_bEE_clB5cxx11ESB_; SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(std::pair<std::string,bool> const&)#1}::operator()(std::pair<std::string,bool> const&)
lea rcx, asc_C3C51; "\"\\\"\" ("
lea rdi, [rsp+148h+var_88]
mov r8d, 6
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
lea r12, [rsp+148h+var_128]
mov [r12-10h], r12
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz loc_A66C4
mov [rsp+148h+var_138], rdx
mov rdx, [rcx]
mov [rsp+148h+var_128], rdx
jmp loc_A66CC
loc_A660E:
lea r15, [rsp+148h+var_B0]
mov [r15-10h], r15
lea rsi, [rsp+148h+var_E8]
mov qword ptr [rsi], 2Ch ; ','
lea rdi, [rsp+148h+var_C0]
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm; std::string::_M_create(ulong &,ulong)
lea rsi, [rsp+148h+var_C0]
mov [rsi], rax
mov rcx, qword ptr [rsp+148h+var_E8]
mov [rsi+10h], rcx
movups xmm0, cs:xmmword_C3C34+0Ch
movups xmmword ptr [rax+1Ch], xmm0
movups xmm0, cs:xmmword_C3C34
movups xmmword ptr [rax+10h], xmm0
movups xmm0, cs:xmmword_C3C24
movups xmmword ptr [rax], xmm0
mov [rsi+8], rcx
mov byte ptr [rax+rcx], 0
add r14, 0C8h
mov rdi, r14
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
mov rdi, [rsp+148h+var_C0]; void *
cmp rdi, r15
jz short loc_A669D
mov rsi, [rsp+148h+var_B0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A669D:
lea rax, [rbx+10h]
mov [rbx], rax
mov qword ptr [rbx+8], 0
mov byte ptr [rbx+10h], 0
loc_A66B0:
mov rax, rbx
add rsp, 120h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_A66C4:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r12], xmm0
loc_A66CC:
mov rdx, [rax+8]
lea rdi, [rsp+148h+var_138]
mov [rdi+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rsi, aSpace; ") \"\\\"\" space"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea r13, [rsp+148h+var_108]
mov [r13-10h], r13
mov rcx, [rax]
mov rdx, rax
add rdx, 10h
cmp rcx, rdx
jz short loc_A671B
mov [rsp+148h+var_118], rcx
mov rcx, [rdx]
mov [rsp+148h+var_108], rcx
jmp short loc_A6723
loc_A671B:
movups xmm0, xmmword ptr [rdx]
movups xmmword ptr [r13+0], xmm0
loc_A6723:
mov rsi, [rax+8]
lea rcx, [rsp+148h+var_118]; int
mov [rcx+8], rsi
mov [rax], rdx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rdi, rbx; int
mov rsi, r14; int
mov rdx, r15; int
call _ZN15SchemaConverter9_add_ruleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_; SchemaConverter::_add_rule(std::string const&,std::string const&)
mov rdi, [rsp+148h+var_118]; void *
cmp rdi, r13
jz short loc_A6764
mov rsi, [rsp+148h+var_108]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A6764:
mov rdi, [rsp+148h+var_138]; void *
cmp rdi, r12
jz short loc_A677B
mov rsi, [rsp+148h+var_128]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A677B:
lea rax, [rsp+148h+var_78]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A679C
mov rsi, [rsp+148h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A679C:
lea rax, [rsp+148h+var_D8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A67B7
mov rsi, [rsp+148h+var_D8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A67B7:
mov rax, [rsp+148h+var_58]
test rax, rax
jz short loc_A67D6
lea rdi, [rsp+148h+var_68]
mov rsi, rdi
mov edx, 3
call rax
loc_A67D6:
lea rdi, [rsp+148h+var_C0]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,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>>::~_Hashtable()
lea rax, [rsp+148h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz loc_A66B0
mov rsi, [rsp+148h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp loc_A66B0
jmp loc_A68DF
mov rbx, rax
mov rdi, [rsp+148h+var_118]; void *
cmp rdi, r13
jz short loc_A6831
mov rsi, [rsp+148h+var_108]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A6831
mov rbx, rax
loc_A6831:
mov rdi, [rsp+148h+var_138]; void *
cmp rdi, r12
jz short loc_A684D
mov rsi, [rsp+148h+var_128]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A684D
mov rbx, rax
loc_A684D:
lea rax, [rsp+148h+var_78]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A6873
mov rsi, [rsp+148h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A6873
mov rbx, rax
loc_A6873:
lea rax, [rsp+148h+var_D8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A6893
mov rsi, [rsp+148h+var_D8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A6893
mov rbx, rax
loc_A6893:
mov rax, [rsp+148h+var_58]
test rax, rax
jz short loc_A68B7
lea rdi, [rsp+148h+var_68]
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_A68B7
mov rbx, rax
loc_A68B7:
lea rdi, [rsp+148h+var_C0]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,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>>::~_Hashtable()
lea rax, [rsp+148h+var_38]
mov rdi, [rax-10h]
cmp rdi, rax
jz short loc_A690C
mov rsi, [rsp+148h+var_38]
jmp short loc_A68FF
loc_A68DF:
mov rdi, rax
call __clang_call_terminate
mov rbx, rax
mov rdi, [rsp+148h+var_C0]; void *
cmp rdi, r15
jz short loc_A690C
mov rsi, [rsp+148h+var_B0]
loc_A68FF:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A690C
mov rbx, rax
loc_A690C:
mov rdi, rbx
call __Unwind_Resume
| long long SchemaConverter::_visit_pattern(long long a1, long long a2, long long a3, long long a4)
{
_BYTE *v5; // rdx
long long v7; // rcx
long long **v8; // rax
int v9; // ecx
int v10; // r8d
int v11; // r9d
long long v12; // rax
__int128 *v13; // rcx
long long v14; // rax
_BYTE *v15; // rcx
long long v17; // rax
__int128 *v18; // rdx
char v19; // [rsp+Fh] [rbp-139h] BYREF
void *v20[2]; // [rsp+10h] [rbp-138h] BYREF
__int128 v21; // [rsp+20h] [rbp-128h] BYREF
void *v22[2]; // [rsp+30h] [rbp-118h] BYREF
__int128 v23; // [rsp+40h] [rbp-108h] BYREF
int v24[2]; // [rsp+50h] [rbp-F8h] BYREF
long long v25; // [rsp+58h] [rbp-F0h] BYREF
int v26[2]; // [rsp+60h] [rbp-E8h] BYREF
long long v27; // [rsp+70h] [rbp-D8h] BYREF
void *v28; // [rsp+88h] [rbp-C0h] BYREF
long long v29; // [rsp+90h] [rbp-B8h]
__int128 v30; // [rsp+98h] [rbp-B0h] BYREF
int v31; // [rsp+A8h] [rbp-A0h]
__int128 v32; // [rsp+B0h] [rbp-98h] BYREF
void *v33[2]; // [rsp+C0h] [rbp-88h] BYREF
long long v34; // [rsp+D0h] [rbp-78h] BYREF
_QWORD v35[2]; // [rsp+E0h] [rbp-68h] BYREF
long long ( *v36)(); // [rsp+F0h] [rbp-58h]
long long ( *v37)(); // [rsp+F8h] [rbp-50h]
void *v38[2]; // [rsp+100h] [rbp-48h] BYREF
long long v39; // [rsp+110h] [rbp-38h] BYREF
v5 = *(_BYTE **)a3;
if ( *v5 == 94 && (v7 = *(_QWORD *)(a3 + 8), v5[v7 - 1] == 36) )
{
std::string::substr(v38, a3, 1LL, v7 - 2);
v28 = (char *)&v32 + 8;
v29 = 1LL;
v30 = 0LL;
v31 = 1065353216;
v32 = 0LL;
v25 = 0LL;
*(void **)v24 = v38[1];
v35[1] = 0LL;
v8 = (long long **)operator new(0x40uLL);
*v8 = &v25;
v8[1] = (long long *)a2;
v8[2] = (long long *)&v19;
v8[3] = (long long *)v24;
v8[4] = (long long *)v38;
v8[5] = v35;
v8[6] = (long long *)&v28;
v8[7] = (long long *)a4;
v35[0] = v8;
v37 = std::_Function_handler<std::pair<std::string,bool> ()(void),SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(void)#1}>::_M_invoke;
v36 = std::_Function_handler<std::pair<std::string,bool> ()(void),SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(void)#1}>::_M_manager;
SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(void)#1}::operator()[abi:cxx11]((int)v26);
SchemaConverter::_visit_pattern(std::string const&,std::string const&)::{lambda(std::pair<std::string,bool> const&)#1}::operator()[abi:cxx11](
(unsigned int)v33,
(unsigned int)&v19,
(unsigned int)v26,
v9,
v10,
v11);
v12 = std::string::replace(v33, 0LL, 0LL, "\"\\\"\" (", 6LL);
v20[0] = &v21;
v13 = (__int128 *)(v12 + 16);
if ( *(_QWORD *)v12 == v12 + 16 )
{
v21 = *v13;
}
else
{
v20[0] = *(void **)v12;
*(_QWORD *)&v21 = *(_QWORD *)v13;
}
v20[1] = *(void **)(v12 + 8);
*(_QWORD *)v12 = v13;
*(_QWORD *)(v12 + 8) = 0LL;
*(_BYTE *)(v12 + 16) = 0;
v17 = std::string::append(v20, ") \"\\\"\" space");
v22[0] = &v23;
v18 = (__int128 *)(v17 + 16);
if ( *(_QWORD *)v17 == v17 + 16 )
{
v23 = *v18;
}
else
{
v22[0] = *(void **)v17;
*(_QWORD *)&v23 = *(_QWORD *)v18;
}
v22[1] = *(void **)(v17 + 8);
*(_QWORD *)v17 = v18;
*(_QWORD *)(v17 + 8) = 0LL;
*(_BYTE *)(v17 + 16) = 0;
SchemaConverter::_add_rule(a1, a2, a4, v22);
if ( v22[0] != &v23 )
operator delete(v22[0], v23 + 1);
if ( v20[0] != &v21 )
operator delete(v20[0], v21 + 1);
if ( v33[0] != &v34 )
operator delete(v33[0], v34 + 1);
if ( *(long long **)v26 != &v27 )
operator delete(*(void **)v26, v27 + 1);
if ( v36 )
((void ( *)(_QWORD *, _QWORD *, long long))v36)(v35, v35, 3LL);
std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,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>>::~_Hashtable(&v28);
if ( v38[0] != &v39 )
operator delete(v38[0], v39 + 1);
}
else
{
v28 = &v30;
*(_QWORD *)v26 = 44LL;
v14 = std::string::_M_create(&v28, v26, 0LL);
v28 = (void *)v14;
v15 = *(_BYTE **)v26;
*(_QWORD *)&v30 = *(_QWORD *)v26;
qmemcpy((void *)v14, "Pattern must start with '^' and end with '$'", 44);
v29 = (long long)v15;
v15[v14] = 0;
std::vector<std::string>::emplace_back<std::string>(a2 + 200, (long long)&v28);
if ( v28 != &v30 )
operator delete(v28, v30 + 1);
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
}
return a1;
}
| _visit_pattern:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x120
MOV RAX,RDX
MOV R14,RSI
MOV RBX,RDI
MOV RDX,qword ptr [RDX]
CMP byte ptr [RDX],0x5e
JNZ 0x001a660e
MOV R15,RCX
MOV RCX,qword ptr [RAX + 0x8]
CMP byte ptr [RDX + RCX*0x1 + -0x1],0x24
JNZ 0x001a660e
ADD RCX,-0x2
LEA R12,[RSP + 0x100]
MOV EDX,0x1
MOV RDI,R12
MOV RSI,RAX
CALL 0x001186f0
LEA RAX,[RSP + 0xb8]
MOV qword ptr [RAX + -0x30],RAX
MOV qword ptr [RAX + -0x28],0x1
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + -0x20],XMM0
MOV dword ptr [RAX + -0x10],0x3f800000
MOVUPS xmmword ptr [RAX + -0x8],XMM0
XOR EAX,EAX
MOV qword ptr [RSP + 0x58],RAX
MOV RCX,qword ptr [R12 + 0x8]
MOV qword ptr [RSP + 0x50],RCX
MOV qword ptr [RSP + 0xe8],RAX
LAB_001a653c:
MOV EDI,0x40
CALL 0x00118690
LEA RCX,[RSP + 0x58]
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],R14
LEA RCX,[RSP + 0xf]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RSP + 0x50]
MOV qword ptr [RAX + 0x18],RCX
MOV qword ptr [RAX + 0x20],R12
LEA RCX,[RSP + 0xe0]
MOV qword ptr [RAX + 0x28],RCX
LEA RDX,[RSP + 0x88]
MOV qword ptr [RAX + 0x30],RDX
MOV qword ptr [RAX + 0x38],R15
MOV qword ptr [RCX],RAX
LEA RDX,[0x1a9bbc]
MOV qword ptr [RCX + 0x18],RDX
LEA RDX,[0x1a9bce]
MOV qword ptr [RCX + 0x10],RDX
LAB_001a659d:
LEA RDI,[RSP + 0x60]
MOV RSI,RAX
CALL 0x001a9bf6
LAB_001a65aa:
LEA RDI,[RSP + 0xc0]
LEA RSI,[RSP + 0xf]
LEA RDX,[RSP + 0x60]
CALL 0x001a9a8a
LAB_001a65c1:
LEA RCX,[0x1c3c51]
LEA RDI,[RSP + 0xc0]
MOV R8D,0x6
XOR ESI,ESI
XOR EDX,EDX
CALL 0x00118750
LEA R12,[RSP + 0x20]
MOV qword ptr [R12 + -0x10],R12
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x001a66c4
MOV qword ptr [RSP + 0x10],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x20],RDX
JMP 0x001a66cc
LAB_001a660e:
LEA R15,[RSP + 0x98]
MOV qword ptr [R15 + -0x10],R15
LEA RSI,[RSP + 0x60]
MOV qword ptr [RSI],0x2c
LAB_001a6626:
LEA RDI,[RSP + 0x88]
XOR EDX,EDX
CALL 0x00118bc0
LEA RSI,[RSP + 0x88]
MOV qword ptr [RSI],RAX
MOV RCX,qword ptr [RSP + 0x60]
MOV qword ptr [RSI + 0x10],RCX
MOVUPS XMM0,xmmword ptr [0x001c3c40]
MOVUPS xmmword ptr [RAX + 0x1c],XMM0
MOVUPS XMM0,xmmword ptr [0x001c3c34]
MOVUPS xmmword ptr [RAX + 0x10],XMM0
MOVUPS XMM0,xmmword ptr [0x001c3c24]
MOVUPS xmmword ptr [RAX],XMM0
MOV qword ptr [RSI + 0x8],RCX
MOV byte ptr [RAX + RCX*0x1],0x0
ADD R14,0xc8
LAB_001a6678:
MOV RDI,R14
CALL 0x0013bcfa
MOV RDI,qword ptr [RSP + 0x88]
CMP RDI,R15
JZ 0x001a669d
MOV RSI,qword ptr [RSP + 0x98]
INC RSI
CALL 0x001186a0
LAB_001a669d:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
MOV qword ptr [RBX + 0x8],0x0
MOV byte ptr [RBX + 0x10],0x0
LAB_001a66b0:
MOV RAX,RBX
ADD RSP,0x120
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_001a66c4:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R12],XMM0
LAB_001a66cc:
MOV RDX,qword ptr [RAX + 0x8]
LEA RDI,[RSP + 0x10]
MOV qword ptr [RDI + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LAB_001a66e8:
LEA RSI,[0x1c3c58]
CALL 0x00118cb0
LEA R13,[RSP + 0x40]
MOV qword ptr [R13 + -0x10],R13
MOV RCX,qword ptr [RAX]
MOV RDX,RAX
ADD RDX,0x10
CMP RCX,RDX
JZ 0x001a671b
MOV qword ptr [RSP + 0x30],RCX
MOV RCX,qword ptr [RDX]
MOV qword ptr [RSP + 0x40],RCX
JMP 0x001a6723
LAB_001a671b:
MOVUPS XMM0,xmmword ptr [RDX]
MOVUPS xmmword ptr [R13],XMM0
LAB_001a6723:
MOV RSI,qword ptr [RAX + 0x8]
LEA RCX,[RSP + 0x30]
MOV qword ptr [RCX + 0x8],RSI
MOV qword ptr [RAX],RDX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LAB_001a673f:
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL 0x001a1724
MOV RDI,qword ptr [RSP + 0x30]
CMP RDI,R13
JZ 0x001a6764
MOV RSI,qword ptr [RSP + 0x40]
INC RSI
CALL 0x001186a0
LAB_001a6764:
MOV RDI,qword ptr [RSP + 0x10]
CMP RDI,R12
JZ 0x001a677b
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x001186a0
LAB_001a677b:
LEA RAX,[RSP + 0xd0]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001a679c
MOV RSI,qword ptr [RSP + 0xd0]
INC RSI
CALL 0x001186a0
LAB_001a679c:
LEA RAX,[RSP + 0x70]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001a67b7
MOV RSI,qword ptr [RSP + 0x70]
INC RSI
CALL 0x001186a0
LAB_001a67b7:
MOV RAX,qword ptr [RSP + 0xf0]
TEST RAX,RAX
JZ 0x001a67d6
LAB_001a67c4:
LEA RDI,[RSP + 0xe0]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001a67d6:
LEA RDI,[RSP + 0x88]
CALL 0x001a9592
LEA RAX,[RSP + 0x110]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001a66b0
MOV RSI,qword ptr [RSP + 0x110]
INC RSI
CALL 0x001186a0
JMP 0x001a66b0
|
/* SchemaConverter::_visit_pattern(std::__cxx11::string const&, std::__cxx11::string const&) */
string * SchemaConverter::_visit_pattern(string *param_1,string *param_2)
{
int8 uVar1;
long *plVar2;
long in_RCX;
long *plVar3;
int8 *in_RDX;
int1 local_139;
long *local_138;
long local_130;
long local_128;
long lStack_120;
long *local_118;
long local_110;
long local_108;
long lStack_100;
int8 local_f8;
int8 local_f0;
long *local_e8 [2];
long local_d8 [3];
int8 **local_c0;
long *local_b8;
long *local_b0;
int8 uStack_a8;
int4 local_a0;
int8 local_98;
long lStack_90;
long *local_88 [2];
long local_78 [2];
long *local_68;
int8 local_60;
code *local_58;
code *local_50;
long *local_48;
int8 local_40;
long local_38 [2];
if ((*(char *)*in_RDX == '^') && (((char *)*in_RDX)[in_RDX[1] + -1] == '$')) {
std::__cxx11::string::substr((ulong)&local_48,(ulong)in_RDX);
local_c0 = (int8 **)&lStack_90;
local_b8 = (long *)0x1;
local_b0 = (long *)0x0;
uStack_a8 = 0;
local_a0 = 0x3f800000;
local_98 = 0;
lStack_90 = 0;
local_f0 = 0;
local_f8 = local_40;
local_60 = 0;
/* try { // try from 001a653c to 001a6545 has its CatchHandler @ 001a68b4 */
local_68 = (long *)operator_new(0x40);
*local_68 = (long)&local_f0;
local_68[1] = (long)param_2;
local_68[2] = (long)&local_139;
local_68[3] = (long)&local_f8;
local_68[4] = (long)&local_48;
local_68[5] = (long)&local_68;
local_68[6] = (long)&local_c0;
local_68[7] = in_RCX;
local_50 = std::
_Function_handler<std::pair<std::__cxx11::string,bool>(),SchemaConverter::_visit_pattern(std::__cxx11::string_const&,std::__cxx11::string_const&)::{lambda()#1}>
::_M_invoke;
local_58 = std::
_Function_handler<std::pair<std::__cxx11::string,bool>(),SchemaConverter::_visit_pattern(std::__cxx11::string_const&,std::__cxx11::string_const&)::{lambda()#1}>
::_M_manager;
/* try { // try from 001a659d to 001a65a9 has its CatchHandler @ 001a6890 */
_visit_pattern(std::__cxx11::string_const&,std::__cxx11::string_const&)::{lambda()#1}::
operator()[abi_cxx11_();
/* try { // try from 001a65aa to 001a65c0 has its CatchHandler @ 001a6870 */
_visit_pattern(std::__cxx11::string_const&,std::__cxx11::string_const&)::
{lambda(std::pair<std::__cxx11::string,bool>const&)#1}::operator()::string_bool>_const___const
(local_88,&local_139,local_e8);
/* try { // try from 001a65c1 to 001a65de has its CatchHandler @ 001a684a */
plVar2 = (long *)std::__cxx11::string::replace((ulong)local_88,0,(char *)0x0,0x1c3c51);
plVar3 = plVar2 + 2;
if ((long *)*plVar2 == plVar3) {
local_128 = *plVar3;
lStack_120 = plVar2[3];
local_138 = &local_128;
}
else {
local_128 = *plVar3;
local_138 = (long *)*plVar2;
}
local_130 = plVar2[1];
*plVar2 = (long)plVar3;
plVar2[1] = 0;
*(int1 *)(plVar2 + 2) = 0;
/* try { // try from 001a66e8 to 001a66f3 has its CatchHandler @ 001a682e */
plVar2 = (long *)std::__cxx11::string::append((char *)&local_138);
plVar3 = plVar2 + 2;
if ((long *)*plVar2 == plVar3) {
local_108 = *plVar3;
lStack_100 = plVar2[3];
local_118 = &local_108;
}
else {
local_108 = *plVar3;
local_118 = (long *)*plVar2;
}
local_110 = plVar2[1];
*plVar2 = (long)plVar3;
plVar2[1] = 0;
*(int1 *)(plVar2 + 2) = 0;
/* try { // try from 001a673f to 001a674c has its CatchHandler @ 001a6812 */
_add_rule(param_1,param_2);
if (local_118 != &local_108) {
operator_delete(local_118,local_108 + 1);
}
if (local_138 != &local_128) {
operator_delete(local_138,local_128 + 1);
}
if (local_88[0] != local_78) {
operator_delete(local_88[0],local_78[0] + 1);
}
if (local_e8[0] != local_d8) {
operator_delete(local_e8[0],local_d8[0] + 1);
}
if (local_58 != (code *)0x0) {
/* try { // try from 001a67c4 to 001a67d5 has its CatchHandler @ 001a680d */
(*local_58)(&local_68,&local_68,3);
}
std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,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>>
::~_Hashtable((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,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>>
*)&local_c0);
if (local_48 != local_38) {
operator_delete(local_48,local_38[0] + 1);
}
}
else {
local_e8[0] = (long *)0x2c;
/* try { // try from 001a6626 to 001a6634 has its CatchHandler @ 001a6909 */
local_c0 = &local_b0;
local_c0 = (int8 **)std::__cxx11::string::_M_create((ulong *)&local_c0,(ulong)local_e8);
uVar1 = s_Pattern_must_start_with_____and_e_001c3c24._36_8_;
local_b0 = local_e8[0];
*(ulong *)((long)local_c0 + 0x1c) =
CONCAT44(s_Pattern_must_start_with_____and_e_001c3c24._32_4_,
s_Pattern_must_start_with_____and_e_001c3c24._28_4_);
*(int8 *)((long)local_c0 + 0x24) = uVar1;
plVar2 = (long *)CONCAT44(s_Pattern_must_start_with_____and_e_001c3c24._28_4_,
s_Pattern_must_start_with_____and_e_001c3c24._24_4_);
local_c0[2] = (int8 *)s_Pattern_must_start_with_____and_e_001c3c24._16_8_;
local_c0[3] = plVar2;
uVar1 = s_Pattern_must_start_with_____and_e_001c3c24._8_8_;
*local_c0 = (int8 *)s_Pattern_must_start_with_____and_e_001c3c24._0_8_;
local_c0[1] = (int8 *)uVar1;
local_b8 = local_e8[0];
*(char *)((long)local_c0 + (long)local_e8[0]) = '\0';
/* try { // try from 001a6678 to 001a667f has its CatchHandler @ 001a68e7 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(param_2 + 200),
(string *)&local_c0);
if (local_c0 != &local_b0) {
operator_delete(local_c0,(long)local_b0 + 1);
}
*(string **)param_1 = param_1 + 0x10;
*(int8 *)(param_1 + 8) = 0;
param_1[0x10] = (string)0x0;
}
return param_1;
}
| |
27,301 | my_rename_with_symlink | eloqsql/mysys/my_symlink2.c | int my_rename_with_symlink(const char *from, const char *to, myf MyFlags)
{
#ifndef HAVE_READLINK
return my_rename(from, to, MyFlags);
#else
char link_name[FN_REFLEN], tmp_name[FN_REFLEN];
int was_symlink= (!my_disable_symlinks &&
!my_readlink(link_name, from, MYF(0)));
int result=0;
int name_is_different;
DBUG_ENTER("my_rename_with_symlink");
if (!was_symlink)
DBUG_RETURN(my_rename(from, to, MyFlags));
/* Change filename that symlink pointed to */
strmov(tmp_name, to);
fn_same(tmp_name,link_name,1); /* Copy dir */
name_is_different= strcmp(link_name, tmp_name);
if (name_is_different && !access(tmp_name, F_OK))
{
my_errno= EEXIST;
if (MyFlags & MY_WME)
my_error(EE_CANTCREATEFILE, MYF(0), tmp_name, EEXIST);
DBUG_RETURN(1);
}
/* Create new symlink */
if (my_symlink(tmp_name, to, MyFlags))
DBUG_RETURN(1);
/*
Rename symlinked file if the base name didn't change.
This can happen if you use this function where 'from' and 'to' has
the same basename and different directories.
*/
if (name_is_different && my_rename(link_name, tmp_name, MyFlags))
{
int save_errno=my_errno;
my_delete(to, MyFlags); /* Remove created symlink */
my_errno=save_errno;
DBUG_RETURN(1);
}
/* Remove original symlink */
if (my_delete(from, MyFlags))
{
int save_errno=my_errno;
/* Remove created link */
my_delete(to, MyFlags);
/* Rename file back */
if (strcmp(link_name, tmp_name))
(void) my_rename(tmp_name, link_name, MyFlags);
my_errno=save_errno;
result= 1;
}
DBUG_RETURN(result);
#endif /* HAVE_READLINK */
} | O3 | c | my_rename_with_symlink:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x408, %rsp # imm = 0x408
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
leaq 0xb66806(%rip), %rax # 0xc0832c
cmpb $0x0, (%rax)
jne 0xa1b40
leaq -0x230(%rbp), %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0xa15b8
testl %eax, %eax
je 0xa1b79
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xa9a14
movl %eax, %r12d
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0xa1cc5
movl %r12d, %eax
addq $0x408, %rsp # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x430(%rbp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x29360
leaq -0x230(%rbp), %rsi
movl $0x1, %r12d
movq %r13, %rdi
movl $0x1, %edx
callq 0xa95b8
leaq -0x230(%rbp), %rdi
movq %r13, %rsi
callq 0x296b0
leaq -0x430(%rbp), %rdi
testl %eax, %eax
je 0xa1c17
xorl %esi, %esi
callq 0x290d0
testl %eax, %eax
je 0xa1c8a
leaq -0x430(%rbp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xa1651
testl %eax, %eax
jne 0xa1b51
leaq -0x230(%rbp), %rdi
leaq -0x430(%rbp), %rsi
movq %rbx, %rdx
callq 0xa9a14
testl %eax, %eax
je 0xa1c2a
callq 0xa2412
movl (%rax), %r15d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x9e6ac
jmp 0xa1c7d
movq %r14, %rsi
movq %rbx, %rdx
callq 0xa1651
testl %eax, %eax
jne 0xa1b51
movq %r15, %rdi
movq %rbx, %rsi
callq 0x9e6ac
testl %eax, %eax
je 0xa1cbd
callq 0xa2412
movl (%rax), %r15d
movq %r14, %rdi
movq %rbx, %rsi
callq 0x9e6ac
leaq -0x230(%rbp), %rdi
leaq -0x430(%rbp), %rsi
callq 0x296b0
testl %eax, %eax
je 0xa1c7d
leaq -0x430(%rbp), %rdi
leaq -0x230(%rbp), %rsi
movq %rbx, %rdx
callq 0xa9a14
callq 0xa2412
movl %r15d, (%rax)
jmp 0xa1b51
callq 0xa2412
movl $0x11, (%rax)
testb $0x10, %bl
je 0xa1b51
leaq -0x430(%rbp), %rdx
movl $0x1, %edi
xorl %esi, %esi
movl $0x11, %ecx
xorl %eax, %eax
callq 0x9e923
jmp 0xa1b51
xorl %r12d, %r12d
jmp 0xa1b51
callq 0x29260
| my_rename_with_symlink:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 408h
mov rbx, rdx
mov r14, rsi
mov r15, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
lea rax, my_disable_symlinks
cmp byte ptr [rax], 0
jnz short loc_A1B40
lea rdi, [rbp+var_230]
mov rsi, r15
xor edx, edx
call my_readlink
test eax, eax
jz short loc_A1B79
loc_A1B40:
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call my_rename
mov r12d, eax
loc_A1B51:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_A1CC5
mov eax, r12d
add rsp, 408h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_A1B79:
lea r13, [rbp+var_430]
mov rdi, r13
mov rsi, r14
call _strcpy
lea rsi, [rbp+var_230]
mov r12d, 1
mov rdi, r13
mov edx, 1
call fn_same
lea rdi, [rbp+var_230]
mov rsi, r13
call _strcmp
lea rdi, [rbp+var_430]
test eax, eax
jz short loc_A1C17
xor esi, esi
call _access
test eax, eax
jz loc_A1C8A
lea rdi, [rbp+var_430]
mov rsi, r14
mov rdx, rbx
call my_symlink
test eax, eax
jnz loc_A1B51
lea rdi, [rbp+var_230]
lea rsi, [rbp+var_430]
mov rdx, rbx
call my_rename
test eax, eax
jz short loc_A1C2A
call _my_thread_var
mov r15d, [rax]
mov rdi, r14
mov rsi, rbx
call my_delete
jmp short loc_A1C7D
loc_A1C17:
mov rsi, r14
mov rdx, rbx
call my_symlink
test eax, eax
jnz loc_A1B51
loc_A1C2A:
mov rdi, r15
mov rsi, rbx
call my_delete
test eax, eax
jz loc_A1CBD
call _my_thread_var
mov r15d, [rax]
mov rdi, r14
mov rsi, rbx
call my_delete
lea rdi, [rbp+var_230]
lea rsi, [rbp+var_430]
call _strcmp
test eax, eax
jz short loc_A1C7D
lea rdi, [rbp+var_430]
lea rsi, [rbp+var_230]
mov rdx, rbx
call my_rename
loc_A1C7D:
call _my_thread_var
mov [rax], r15d
jmp loc_A1B51
loc_A1C8A:
call _my_thread_var
mov dword ptr [rax], 11h
test bl, 10h
jz loc_A1B51
lea rdx, [rbp+var_430]
mov edi, 1
xor esi, esi
mov ecx, 11h
xor eax, eax
call my_error
jmp loc_A1B51
loc_A1CBD:
xor r12d, r12d
jmp loc_A1B51
loc_A1CC5:
call ___stack_chk_fail
| long long my_rename_with_symlink(long long a1, long long a2, long long a3)
{
unsigned int v4; // r12d
int v6; // r15d
_BYTE *v7; // rdi
_BYTE v8[512]; // [rsp+0h] [rbp-430h] BYREF
_BYTE v9[512]; // [rsp+200h] [rbp-230h] BYREF
unsigned long long v10; // [rsp+400h] [rbp-30h]
v10 = __readfsqword(0x28u);
if ( my_disable_symlinks || (unsigned int)my_readlink((long long)v9, a1, 0) )
return (unsigned int)my_rename(a1, a2, a3);
strcpy(v8, a2);
v4 = 1;
fn_same(v8, v9, 1LL);
if ( !(unsigned int)strcmp(v9, v8) )
{
if ( (unsigned int)my_symlink((long long)v8, a2, a3) )
return v4;
goto LABEL_11;
}
if ( (unsigned int)access(v8, 0LL) )
{
if ( (unsigned int)my_symlink((long long)v8, a2, a3) )
return v4;
if ( (unsigned int)my_rename(v9, v8, a3) )
{
v6 = *(_DWORD *)my_thread_var(v9);
v7 = (_BYTE *)a2;
my_delete(a2, a3);
LABEL_14:
*(_DWORD *)my_thread_var(v7) = v6;
return v4;
}
LABEL_11:
if ( !(unsigned int)my_delete(a1, a3) )
return 0;
v6 = *(_DWORD *)my_thread_var(a1);
my_delete(a2, a3);
v7 = v9;
if ( (unsigned int)strcmp(v9, v8) )
{
v7 = v8;
my_rename(v8, v9, a3);
}
goto LABEL_14;
}
*(_DWORD *)my_thread_var(v8) = 17;
if ( (a3 & 0x10) != 0 )
my_error(1u, 0LL, v8, 17LL);
return v4;
}
| my_rename_with_symlink:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x408
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
LEA RAX,[0xd0832c]
CMP byte ptr [RAX],0x0
JNZ 0x001a1b40
LEA RDI,[RBP + -0x230]
MOV RSI,R15
XOR EDX,EDX
CALL 0x001a15b8
TEST EAX,EAX
JZ 0x001a1b79
LAB_001a1b40:
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x001a9a14
MOV R12D,EAX
LAB_001a1b51:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001a1cc5
MOV EAX,R12D
ADD RSP,0x408
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001a1b79:
LEA R13,[RBP + -0x430]
MOV RDI,R13
MOV RSI,R14
CALL 0x00129360
LEA RSI,[RBP + -0x230]
MOV R12D,0x1
MOV RDI,R13
MOV EDX,0x1
CALL 0x001a95b8
LEA RDI,[RBP + -0x230]
MOV RSI,R13
CALL 0x001296b0
LEA RDI,[RBP + -0x430]
TEST EAX,EAX
JZ 0x001a1c17
XOR ESI,ESI
CALL 0x001290d0
TEST EAX,EAX
JZ 0x001a1c8a
LEA RDI,[RBP + -0x430]
MOV RSI,R14
MOV RDX,RBX
CALL 0x001a1651
TEST EAX,EAX
JNZ 0x001a1b51
LEA RDI,[RBP + -0x230]
LEA RSI,[RBP + -0x430]
MOV RDX,RBX
CALL 0x001a9a14
TEST EAX,EAX
JZ 0x001a1c2a
CALL 0x001a2412
MOV R15D,dword ptr [RAX]
MOV RDI,R14
MOV RSI,RBX
CALL 0x0019e6ac
JMP 0x001a1c7d
LAB_001a1c17:
MOV RSI,R14
MOV RDX,RBX
CALL 0x001a1651
TEST EAX,EAX
JNZ 0x001a1b51
LAB_001a1c2a:
MOV RDI,R15
MOV RSI,RBX
CALL 0x0019e6ac
TEST EAX,EAX
JZ 0x001a1cbd
CALL 0x001a2412
MOV R15D,dword ptr [RAX]
MOV RDI,R14
MOV RSI,RBX
CALL 0x0019e6ac
LEA RDI,[RBP + -0x230]
LEA RSI,[RBP + -0x430]
CALL 0x001296b0
TEST EAX,EAX
JZ 0x001a1c7d
LEA RDI,[RBP + -0x430]
LEA RSI,[RBP + -0x230]
MOV RDX,RBX
CALL 0x001a9a14
LAB_001a1c7d:
CALL 0x001a2412
MOV dword ptr [RAX],R15D
JMP 0x001a1b51
LAB_001a1c8a:
CALL 0x001a2412
MOV dword ptr [RAX],0x11
TEST BL,0x10
JZ 0x001a1b51
LEA RDX,[RBP + -0x430]
MOV EDI,0x1
XOR ESI,ESI
MOV ECX,0x11
XOR EAX,EAX
CALL 0x0019e923
JMP 0x001a1b51
LAB_001a1cbd:
XOR R12D,R12D
JMP 0x001a1b51
LAB_001a1cc5:
CALL 0x00129260
|
int4 my_rename_with_symlink(int8 param_1,char *param_2,ulong param_3)
{
int iVar1;
int4 uVar2;
int4 *puVar3;
int4 uVar4;
long in_FS_OFFSET;
char local_438 [512];
char local_238 [512];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
if (my_disable_symlinks == '\0') {
iVar1 = my_readlink(local_238,param_1,0);
if (iVar1 == 0) {
strcpy(local_438,param_2);
uVar2 = 1;
fn_same(local_438,local_238,1);
iVar1 = strcmp(local_238,local_438);
if (iVar1 == 0) {
iVar1 = my_symlink(local_438,param_2,param_3);
if (iVar1 != 0) goto LAB_001a1b51;
LAB_001a1c2a:
iVar1 = my_delete(param_1,param_3);
if (iVar1 == 0) {
uVar2 = 0;
goto LAB_001a1b51;
}
puVar3 = (int4 *)_my_thread_var();
uVar4 = *puVar3;
my_delete(param_2,param_3);
iVar1 = strcmp(local_238,local_438);
if (iVar1 != 0) {
my_rename(local_438,local_238,param_3);
}
}
else {
iVar1 = access(local_438,0);
if (iVar1 == 0) {
puVar3 = (int4 *)_my_thread_var();
*puVar3 = 0x11;
if ((param_3 & 0x10) != 0) {
my_error(1,0,local_438,0x11);
}
goto LAB_001a1b51;
}
iVar1 = my_symlink(local_438,param_2,param_3);
if (iVar1 != 0) goto LAB_001a1b51;
iVar1 = my_rename(local_238,local_438,param_3);
if (iVar1 == 0) goto LAB_001a1c2a;
puVar3 = (int4 *)_my_thread_var();
uVar4 = *puVar3;
my_delete(param_2,param_3);
}
puVar3 = (int4 *)_my_thread_var();
*puVar3 = uVar4;
goto LAB_001a1b51;
}
}
uVar2 = my_rename(param_1,param_2,param_3);
LAB_001a1b51:
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return uVar2;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
27,302 | trnman_init | eloqsql/storage/maria/trnman.c | int trnman_init(TrID initial_trid)
{
DBUG_ENTER("trnman_init");
DBUG_PRINT("enter", ("initial_trid: %lu", (ulong) initial_trid));
short_trid_to_active_trn= (TRN **)my_malloc(PSI_INSTRUMENT_ME, SHORT_TRID_MAX*sizeof(TRN*),
MYF(MY_WME|MY_ZEROFILL));
if (unlikely(!short_trid_to_active_trn))
DBUG_RETURN(1);
short_trid_to_active_trn--; /* min short_id is 1 */
/*
Initialize lists.
active_list_max.min_read_from must be larger than any trid,
so that when an active list is empty we would could free
all committed list.
And committed_list_max itself can not be freed so
committed_list_max.commit_trid must not be smaller that
active_list_max.min_read_from
*/
active_list_max.trid= active_list_min.trid= 0;
active_list_max.min_read_from= MAX_TRID;
active_list_max.next= active_list_min.prev= 0;
active_list_max.prev= &active_list_min;
active_list_min.next= &active_list_max;
committed_list_max.commit_trid= MAX_TRID;
committed_list_max.next= committed_list_min.prev= 0;
committed_list_max.prev= &committed_list_min;
committed_list_min.next= &committed_list_max;
trnman_active_transactions= 0;
trnman_committed_transactions= 0;
trnman_allocated_transactions= 0;
/* This is needed for recovery and repair */
dummy_transaction_object.min_read_from= ~(TrID) 0;
dummy_transaction_object.first_undo_lsn= TRANSACTION_LOGGED_LONG_ID;
pool= 0;
global_trid_generator= initial_trid;
trid_min_read_from= initial_trid;
lf_hash_init(&trid_to_trn, sizeof(TRN*), LF_HASH_UNIQUE,
0, 0, trn_get_hash_key, 0);
DBUG_PRINT("info", ("mysql_mutex_init LOCK_trn_list"));
mysql_mutex_init(key_LOCK_trn_list, &LOCK_trn_list, MY_MUTEX_INIT_FAST);
DBUG_RETURN(0);
} | O3 | c | trnman_init:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
xorl %ebx, %ebx
pushq $0x30
popq %rdx
movl $0x7fff8, %esi # imm = 0x7FFF8
xorl %edi, %edi
callq 0xa2c71
movq %rax, 0x3d56bd(%rip) # 0x3ffeb0
testq %rax, %rax
je 0x2a93f
andq $0x0, 0x3d572c(%rip) # 0x3fff30
andq $0x0, 0x3d57d4(%rip) # 0x3fffe0
addq $-0x8, %rax
orq $-0x1, 0x3d57d0(%rip) # 0x3fffe8
movq %rax, 0x3d5691(%rip) # 0x3ffeb0
andq $0x0, 0x3d5701(%rip) # 0x3fff28
leaq 0x3d568a(%rip), %rax # 0x3ffeb8
andq $0x0, 0x3d579a(%rip) # 0x3fffd0
leaq 0x3d572b(%rip), %rcx # 0x3fff68
orq $-0x1, 0x3d585b(%rip) # 0x4000a0
movq %rax, 0x3d578c(%rip) # 0x3fffd8
andq $0x0, 0x3d58e4(%rip) # 0x400138
movq %rcx, 0x3d56c5(%rip) # 0x3fff20
andq $0x0, 0x3d581d(%rip) # 0x400080
leaq 0x3d57ae(%rip), %rax # 0x400018
andl $0x0, 0x3d5907(%rip) # 0x400178
leaq 0x3d5850(%rip), %rcx # 0x4000c8
andl $0x0, 0x3d58fd(%rip) # 0x40017c
movq %rcx, 0x3d5802(%rip) # 0x400088
andl $0x0, 0x3d58f3(%rip) # 0x400180
leaq 0x3d548c(%rip), %rcx # 0x3ffd20
orq $-0x1, 0x80(%rcx)
movq %rax, 0x3d588d(%rip) # 0x400130
andq $0x0, 0x3d58dd(%rip) # 0x400188
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0xa0(%rcx)
movq %r14, 0x3d58cd(%rip) # 0x400190
movq %r14, 0x35c8be(%rip) # 0x387188
andq $0x0, (%rsp)
leaq 0x3d58c2(%rip), %rdi # 0x400198
leaq 0x33004(%rip), %r9 # 0x5d8e1
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xa8ba4
leaq 0x3d551c(%rip), %rax # 0x3ffe10
movl (%rax), %edi
leaq 0x35e753(%rip), %rax # 0x389050
movq (%rax), %rax
leaq 0x3d5959(%rip), %r14 # 0x400260
movq %r14, %rsi
callq *0x40(%rax)
movq %rax, 0x3d598c(%rip) # 0x4002a0
movq %r14, 0x3d597d(%rip) # 0x400298
xorps %xmm0, %xmm0
movups %xmm0, 0x3d5963(%rip) # 0x400288
leaq 0xbe0e54(%rip), %rsi # 0xc0b780
movq %r14, %rdi
callq 0x292f0
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x1
popq %rbx
jmp 0x2a934
| trnman_init:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 10h
mov r14, rdi
xor ebx, ebx
push 30h ; '0'
pop rdx
mov esi, 7FFF8h
xor edi, edi
call my_malloc
mov cs:short_trid_to_active_trn, rax
test rax, rax
jz loc_2A93F
and cs:qword_3FFF30, 0
and cs:qword_3FFFE0, 0
add rax, 0FFFFFFFFFFFFFFF8h
or cs:qword_3FFFE8, 0FFFFFFFFFFFFFFFFh
mov cs:short_trid_to_active_trn, rax
and cs:qword_3FFF28, 0
lea rax, active_list_min
and cs:qword_3FFFD0, 0
lea rcx, active_list_max
or cs:qword_4000A0, 0FFFFFFFFFFFFFFFFh
mov cs:qword_3FFFD8, rax
and cs:qword_400138, 0
mov cs:qword_3FFF20, rcx
and cs:qword_400080, 0
lea rax, committed_list_max
and cs:trnman_active_transactions, 0
lea rcx, committed_list_min
and cs:trnman_committed_transactions, 0
mov cs:qword_400088, rcx
and cs:trnman_allocated_transactions, 0
lea rcx, dummy_transaction_object
or qword ptr [rcx+80h], 0FFFFFFFFFFFFFFFFh
mov cs:qword_400130, rax
and cs:pool, 0
mov rax, 8000000000000000h
mov [rcx+0A0h], rax
mov cs:global_trid_generator, r14
mov cs:trid_min_read_from, r14
and [rsp+20h+var_20], 0
lea rdi, trid_to_trn
lea r9, trn_get_hash_key
push 8
pop rsi
push 1
pop rdx
xor ecx, ecx
xor r8d, r8d
call lf_hash_init
lea rax, key_LOCK_trn_list
mov edi, [rax]
lea rax, PSI_server
mov rax, [rax]
lea r14, LOCK_trn_list
mov rsi, r14
call qword ptr [rax+40h]
mov cs:qword_4002A0, rax
mov cs:qword_400298, r14
xorps xmm0, xmm0
movups cs:xmmword_400288, xmm0
lea rsi, my_fast_mutexattr
mov rdi, r14
call _pthread_mutex_init
loc_2A934:
mov eax, ebx
add rsp, 10h
pop rbx
pop r14
pop rbp
retn
loc_2A93F:
push 1
pop rbx
jmp short loc_2A934
| long long trnman_init(long long a1)
{
unsigned int v1; // ebx
long long v2; // rax
v1 = 0;
v2 = my_malloc(0LL, 524280LL, 48LL);
short_trid_to_active_trn = v2;
if ( v2 )
{
qword_3FFF30 = 0LL;
qword_3FFFE0 = 0LL;
qword_3FFFE8 = -1LL;
short_trid_to_active_trn = v2 - 8;
qword_3FFF28 = 0LL;
qword_3FFFD0 = 0LL;
qword_4000A0 = -1LL;
qword_3FFFD8 = (long long)&active_list_min;
qword_400138 = 0LL;
qword_3FFF20 = (long long)&active_list_max;
qword_400080 = 0LL;
trnman_active_transactions = 0;
trnman_committed_transactions = 0;
qword_400088 = (long long)&committed_list_min;
trnman_allocated_transactions = 0;
dummy_transaction_object[16] = -1LL;
qword_400130 = (long long)&committed_list_max;
pool = 0LL;
dummy_transaction_object[20] = 0x8000000000000000LL;
global_trid_generator = a1;
trid_min_read_from = a1;
lf_hash_init((unsigned int)&trid_to_trn, 8, 1, 0, 0, (unsigned int)trn_get_hash_key, 0LL);
qword_4002A0 = ((long long ( *)(_QWORD, void *))PSI_server[8])(key_LOCK_trn_list, &LOCK_trn_list);
qword_400298 = (long long)&LOCK_trn_list;
xmmword_400288 = 0LL;
pthread_mutex_init(&LOCK_trn_list, &my_fast_mutexattr);
}
else
{
return 1;
}
return v1;
}
| trnman_init:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV R14,RDI
XOR EBX,EBX
PUSH 0x30
POP RDX
MOV ESI,0x7fff8
XOR EDI,EDI
CALL 0x001a2c71
MOV qword ptr [0x004ffeb0],RAX
TEST RAX,RAX
JZ 0x0012a93f
AND qword ptr [0x004fff30],0x0
AND qword ptr [0x004fffe0],0x0
ADD RAX,-0x8
OR qword ptr [0x004fffe8],-0x1
MOV qword ptr [0x004ffeb0],RAX
AND qword ptr [0x004fff28],0x0
LEA RAX,[0x4ffeb8]
AND qword ptr [0x004fffd0],0x0
LEA RCX,[0x4fff68]
OR qword ptr [0x005000a0],-0x1
MOV qword ptr [0x004fffd8],RAX
AND qword ptr [0x00500138],0x0
MOV qword ptr [0x004fff20],RCX
AND qword ptr [0x00500080],0x0
LEA RAX,[0x500018]
AND dword ptr [0x00500178],0x0
LEA RCX,[0x5000c8]
AND dword ptr [0x0050017c],0x0
MOV qword ptr [0x00500088],RCX
AND dword ptr [0x00500180],0x0
LEA RCX,[0x4ffd20]
OR qword ptr [RCX + 0x80],-0x1
MOV qword ptr [0x00500130],RAX
AND qword ptr [0x00500188],0x0
MOV RAX,-0x8000000000000000
MOV qword ptr [RCX + 0xa0],RAX
MOV qword ptr [0x00500190],R14
MOV qword ptr [0x00487188],R14
AND qword ptr [RSP],0x0
LEA RDI,[0x500198]
LEA R9,[0x15d8e1]
PUSH 0x8
POP RSI
PUSH 0x1
POP RDX
XOR ECX,ECX
XOR R8D,R8D
CALL 0x001a8ba4
LEA RAX,[0x4ffe10]
MOV EDI,dword ptr [RAX]
LEA RAX,[0x489050]
MOV RAX,qword ptr [RAX]
LEA R14,[0x500260]
MOV RSI,R14
CALL qword ptr [RAX + 0x40]
MOV qword ptr [0x005002a0],RAX
MOV qword ptr [0x00500298],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [0x00500288],XMM0
LEA RSI,[0xd0b780]
MOV RDI,R14
CALL 0x001292f0
LAB_0012a934:
MOV EAX,EBX
ADD RSP,0x10
POP RBX
POP R14
POP RBP
RET
LAB_0012a93f:
PUSH 0x1
POP RBX
JMP 0x0012a934
|
bool trnman_init(int8 param_1)
{
long lVar1;
lVar1 = my_malloc(0,0x7fff8,0x30);
if (lVar1 == 0) {
short_trid_to_active_trn = 0;
}
else {
active_list_min._120_8_ = 0;
active_list_max._120_8_ = 0;
short_trid_to_active_trn = lVar1 + -8;
active_list_max._128_8_ = 0xffffffffffffffff;
active_list_min._112_8_ = 0;
active_list_max._104_8_ = 0;
committed_list_max._136_8_ = 0xffffffffffffffff;
active_list_max._112_8_ = active_list_min;
committed_list_min._112_8_ = 0;
active_list_min._104_8_ = active_list_max;
committed_list_max._104_8_ = 0;
trnman_active_transactions = 0;
trnman_committed_transactions = 0;
committed_list_max._112_8_ = committed_list_min;
trnman_allocated_transactions = 0;
dummy_transaction_object._128_8_ = 0xffffffffffffffff;
committed_list_min._104_8_ = committed_list_max;
pool = 0;
dummy_transaction_object._160_8_ = 0x8000000000000000;
trid_min_read_from = param_1;
global_trid_generator = param_1;
lf_hash_init(trid_to_trn,8,1,0,0,trn_get_hash_key,0);
LOCK_trn_list._64_8_ = (**(code **)(PSI_server + 0x40))(key_LOCK_trn_list,LOCK_trn_list);
LOCK_trn_list._56_8_ = LOCK_trn_list;
LOCK_trn_list._40_8_ = 0;
LOCK_trn_list._48_8_ = 0;
pthread_mutex_init((pthread_mutex_t *)LOCK_trn_list,(pthread_mutexattr_t *)&my_fast_mutexattr);
}
return lVar1 == 0;
}
| |
27,303 | CLI::Option::~Option() | MikePodsytnik[P]TCRtrie/build_O1/_deps/cli11-src/include/CLI/Option.hpp | class Option : public OptionBase<Option> {
friend App;
protected:
/// @name Names
///@{
/// A list of the short names (`-a`) without the leading dashes
std::vector<std::string> snames_{};
/// A list of the long names (`--long`) without the leading dashes
std::vector<std::string> lnames_{};
/// A list of the flag names with the appropriate default value, the first part of the pair should be duplicates of
/// what is in snames or lnames but will trigger a particular response on a flag
std::vector<std::pair<std::string, std::string>> default_flag_values_{};
/// a list of flag names with specified default values;
std::vector<std::string> fnames_{};
/// A positional name
std::string pname_{};
/// If given, check the environment for this option
std::string envname_{};
///@}
/// @name Help
///@{
/// The description for help strings
std::string description_{};
/// A human readable default value, either manually set, captured, or captured by default
std::string default_str_{};
/// If given, replace the text that describes the option type and usage in the help text
std::string option_text_{};
/// A human readable type value, set when App creates this
///
/// This is a lambda function so "types" can be dynamic, such as when a set prints its contents.
std::function<std::string()> type_name_{[]() { return std::string(); }};
/// Run this function to capture a default (ignore if empty)
std::function<std::string()> default_function_{};
///@}
/// @name Configuration
///@{
/// The number of arguments that make up one option. max is the nominal type size, min is the minimum number of
/// strings
int type_size_max_{1};
/// The minimum number of arguments an option should be expecting
int type_size_min_{1};
/// The minimum number of expected values
int expected_min_{1};
/// The maximum number of expected values
int expected_max_{1};
/// A list of Validators to run on each value parsed
std::vector<Validator> validators_{};
/// A list of options that are required with this option
std::set<Option *> needs_{};
/// A list of options that are excluded with this option
std::set<Option *> excludes_{};
///@}
/// @name Other
///@{
/// link back up to the parent App for fallthrough
App *parent_{nullptr};
/// Options store a callback to do all the work
callback_t callback_{};
///@}
/// @name Parsing results
///@{
/// complete Results of parsing
results_t results_{};
/// results after reduction
results_t proc_results_{};
/// enumeration for the option state machine
enum class option_state : char {
parsing = 0, //!< The option is currently collecting parsed results
validated = 2, //!< the results have been validated
reduced = 4, //!< a subset of results has been generated
callback_run = 6, //!< the callback has been executed
};
/// Whether the callback has run (needed for INI parsing)
option_state current_option_state_{option_state::parsing};
/// Specify that extra args beyond type_size_max should be allowed
bool allow_extra_args_{false};
/// Specify that the option should act like a flag vs regular option
bool flag_like_{false};
/// Control option to run the callback to set the default
bool run_callback_for_default_{false};
/// flag indicating a separator needs to be injected after each argument call
bool inject_separator_{false};
/// flag indicating that the option should trigger the validation and callback chain on each result when loaded
bool trigger_on_result_{false};
/// flag indicating that the option should force the callback regardless if any results present
bool force_callback_{false};
///@}
/// Making an option by hand is not defined, it must be made by the App class
Option(std::string option_name, std::string option_description, callback_t callback, App *parent)
: description_(std::move(option_description)), parent_(parent), callback_(std::move(callback)) {
std::tie(snames_, lnames_, pname_) = detail::get_names(detail::split_names(option_name));
}
public:
/// @name Basic
///@{
Option(const Option &) = delete;
Option &operator=(const Option &) = delete;
/// Count the total number of times an option was passed
CLI11_NODISCARD std::size_t count() const { return results_.size(); }
/// True if the option was not passed
CLI11_NODISCARD bool empty() const { return results_.empty(); } | O1 | cpp | CLI::Option::~Option():
pushq %rbx
movq %rdi, %rbx
addq $0x230, %rdi # imm = 0x230
callq 0xaf62
leaq 0x218(%rbx), %rdi
callq 0xaf62
movq 0x208(%rbx), %rax
testq %rax, %rax
je 0x19a99
leaq 0x1f8(%rbx), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x1c0(%rbx), %rdi
callq 0x1dcd6
leaq 0x190(%rbx), %rdi
callq 0x1dcd6
leaq 0x178(%rbx), %rdi
callq 0x19bd8
movq 0x158(%rbx), %rax
testq %rax, %rax
je 0x19ada
leaq 0x148(%rbx), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x138(%rbx), %rax
testq %rax, %rax
je 0x19af7
leaq 0x128(%rbx), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x108(%rbx), %rdi
leaq 0x118(%rbx), %rax
cmpq %rax, %rdi
je 0x19b15
movq (%rax), %rsi
incq %rsi
callq 0x7430
movq 0xe8(%rbx), %rdi
leaq 0xf8(%rbx), %rax
cmpq %rax, %rdi
je 0x19b33
movq (%rax), %rsi
incq %rsi
callq 0x7430
movq 0xc8(%rbx), %rdi
leaq 0xd8(%rbx), %rax
cmpq %rax, %rdi
je 0x19b51
movq (%rax), %rsi
incq %rsi
callq 0x7430
movq 0xa8(%rbx), %rdi
leaq 0xb8(%rbx), %rax
cmpq %rax, %rdi
je 0x19b6f
movq (%rax), %rsi
incq %rsi
callq 0x7430
movq 0x88(%rbx), %rdi
leaq 0x98(%rbx), %rax
cmpq %rax, %rdi
je 0x19b8d
movq (%rax), %rsi
incq %rsi
callq 0x7430
leaq 0x70(%rbx), %rdi
callq 0xaf62
leaq 0x58(%rbx), %rdi
callq 0x19c08
leaq 0x40(%rbx), %rdi
callq 0xaf62
leaq 0x28(%rbx), %rdi
callq 0xaf62
movq (%rbx), %rdi
addq $0x10, %rbx
cmpq %rbx, %rdi
je 0x19bc9
movq (%rbx), %rsi
incq %rsi
popq %rbx
jmp 0x7430
popq %rbx
retq
jmp 0x19bcf
jmp 0x19bcf
movq %rax, %rdi
callq 0xc892
nop
| _ZN3CLI6OptionD2Ev:
push rbx
mov rbx, rdi
add rdi, 230h
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rbx+218h]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rax, [rbx+208h]
test rax, rax
jz short loc_19A99
lea rdi, [rbx+1F8h]
mov rsi, rdi
mov edx, 3
call rax
loc_19A99:
lea rdi, [rbx+1C0h]
call _ZNSt8_Rb_treeIPN3CLI6OptionES2_St9_IdentityIS2_ESt4lessIS2_ESaIS2_EED2Ev; std::_Rb_tree<CLI::Option *,CLI::Option *,std::_Identity<CLI::Option *>,std::less<CLI::Option *>,std::allocator<CLI::Option *>>::~_Rb_tree()
lea rdi, [rbx+190h]
call _ZNSt8_Rb_treeIPN3CLI6OptionES2_St9_IdentityIS2_ESt4lessIS2_ESaIS2_EED2Ev; std::_Rb_tree<CLI::Option *,CLI::Option *,std::_Identity<CLI::Option *>,std::less<CLI::Option *>,std::allocator<CLI::Option *>>::~_Rb_tree()
lea rdi, [rbx+178h]
call _ZNSt6vectorIN3CLI9ValidatorESaIS1_EED2Ev; std::vector<CLI::Validator>::~vector()
mov rax, [rbx+158h]
test rax, rax
jz short loc_19ADA
lea rdi, [rbx+148h]
mov rsi, rdi
mov edx, 3
call rax
loc_19ADA:
mov rax, [rbx+138h]
test rax, rax
jz short loc_19AF7
lea rdi, [rbx+128h]
mov rsi, rdi
mov edx, 3
call rax
loc_19AF7:
mov rdi, [rbx+108h]; void *
lea rax, [rbx+118h]
cmp rdi, rax
jz short loc_19B15
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_19B15:
mov rdi, [rbx+0E8h]; void *
lea rax, [rbx+0F8h]
cmp rdi, rax
jz short loc_19B33
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_19B33:
mov rdi, [rbx+0C8h]; void *
lea rax, [rbx+0D8h]
cmp rdi, rax
jz short loc_19B51
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_19B51:
mov rdi, [rbx+0A8h]; void *
lea rax, [rbx+0B8h]
cmp rdi, rax
jz short loc_19B6F
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_19B6F:
mov rdi, [rbx+88h]; void *
lea rax, [rbx+98h]
cmp rdi, rax
jz short loc_19B8D
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_19B8D:
lea rdi, [rbx+70h]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rbx+58h]
call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_ESaIS7_EED2Ev; std::vector<std::pair<std::string,std::string>>::~vector()
lea rdi, [rbx+40h]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rbx+28h]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, [rbx]; void *
add rbx, 10h
cmp rdi, rbx
jz short loc_19BC9
mov rsi, [rbx]
inc rsi; unsigned __int64
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
loc_19BC9:
pop rbx
retn
jmp short loc_19BCF
jmp short $+2
loc_19BCF:
mov rdi, rax
call __clang_call_terminate
| void CLI::Option::~Option(CLI::Option *this)
{
void ( *v2)(char *, char *, long long); // rax
void ( *v3)(char *, char *, long long); // rax
void ( *v4)(char *, char *, long long); // rax
char *v5; // rdi
char *v6; // rdi
char *v7; // rdi
char *v8; // rdi
char *v9; // rdi
_QWORD *v10; // rdi
_QWORD *v11; // rbx
std::vector<std::string>::~vector((_QWORD *)this + 70);
std::vector<std::string>::~vector((_QWORD *)this + 67);
v2 = (void ( *)(char *, char *, long long))*((_QWORD *)this + 65);
if ( v2 )
v2((char *)this + 504, (char *)this + 504, 3LL);
std::_Rb_tree<CLI::Option *,CLI::Option *,std::_Identity<CLI::Option *>,std::less<CLI::Option *>,std::allocator<CLI::Option *>>::~_Rb_tree((char *)this + 448);
std::_Rb_tree<CLI::Option *,CLI::Option *,std::_Identity<CLI::Option *>,std::less<CLI::Option *>,std::allocator<CLI::Option *>>::~_Rb_tree((char *)this + 400);
std::vector<CLI::Validator>::~vector((char *)this + 376);
v3 = (void ( *)(char *, char *, long long))*((_QWORD *)this + 43);
if ( v3 )
v3((char *)this + 328, (char *)this + 328, 3LL);
v4 = (void ( *)(char *, char *, long long))*((_QWORD *)this + 39);
if ( v4 )
v4((char *)this + 296, (char *)this + 296, 3LL);
v5 = (char *)*((_QWORD *)this + 33);
if ( v5 != (char *)this + 280 )
operator delete(v5, *((_QWORD *)this + 35) + 1LL);
v6 = (char *)*((_QWORD *)this + 29);
if ( v6 != (char *)this + 248 )
operator delete(v6, *((_QWORD *)this + 31) + 1LL);
v7 = (char *)*((_QWORD *)this + 25);
if ( v7 != (char *)this + 216 )
operator delete(v7, *((_QWORD *)this + 27) + 1LL);
v8 = (char *)*((_QWORD *)this + 21);
if ( v8 != (char *)this + 184 )
operator delete(v8, *((_QWORD *)this + 23) + 1LL);
v9 = (char *)*((_QWORD *)this + 17);
if ( v9 != (char *)this + 152 )
operator delete(v9, *((_QWORD *)this + 19) + 1LL);
std::vector<std::string>::~vector((_QWORD *)this + 14);
std::vector<std::pair<std::string,std::string>>::~vector((char *)this + 88);
std::vector<std::string>::~vector((_QWORD *)this + 8);
std::vector<std::string>::~vector((_QWORD *)this + 5);
v10 = *(_QWORD **)this;
v11 = (_QWORD *)((char *)this + 16);
if ( v10 != v11 )
operator delete(v10, *v11 + 1LL);
}
| ~Option:
PUSH RBX
MOV RBX,RDI
ADD RDI,0x230
CALL 0x0010af62
LEA RDI,[RBX + 0x218]
CALL 0x0010af62
MOV RAX,qword ptr [RBX + 0x208]
TEST RAX,RAX
JZ 0x00119a99
LEA RDI,[RBX + 0x1f8]
LAB_00119a8f:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_00119a99:
LEA RDI,[RBX + 0x1c0]
CALL 0x0011dcd6
LEA RDI,[RBX + 0x190]
CALL 0x0011dcd6
LEA RDI,[RBX + 0x178]
CALL 0x00119bd8
MOV RAX,qword ptr [RBX + 0x158]
TEST RAX,RAX
JZ 0x00119ada
LEA RDI,[RBX + 0x148]
LAB_00119ad0:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_00119ada:
MOV RAX,qword ptr [RBX + 0x138]
TEST RAX,RAX
JZ 0x00119af7
LEA RDI,[RBX + 0x128]
LAB_00119aed:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_00119af7:
MOV RDI,qword ptr [RBX + 0x108]
LEA RAX,[RBX + 0x118]
CMP RDI,RAX
JZ 0x00119b15
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x00107430
LAB_00119b15:
MOV RDI,qword ptr [RBX + 0xe8]
LEA RAX,[RBX + 0xf8]
CMP RDI,RAX
JZ 0x00119b33
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x00107430
LAB_00119b33:
MOV RDI,qword ptr [RBX + 0xc8]
LEA RAX,[RBX + 0xd8]
CMP RDI,RAX
JZ 0x00119b51
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x00107430
LAB_00119b51:
MOV RDI,qword ptr [RBX + 0xa8]
LEA RAX,[RBX + 0xb8]
CMP RDI,RAX
JZ 0x00119b6f
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x00107430
LAB_00119b6f:
MOV RDI,qword ptr [RBX + 0x88]
LEA RAX,[RBX + 0x98]
CMP RDI,RAX
JZ 0x00119b8d
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x00107430
LAB_00119b8d:
LEA RDI,[RBX + 0x70]
CALL 0x0010af62
LEA RDI,[RBX + 0x58]
CALL 0x00119c08
LEA RDI,[RBX + 0x40]
CALL 0x0010af62
LEA RDI,[RBX + 0x28]
CALL 0x0010af62
MOV RDI,qword ptr [RBX]
ADD RBX,0x10
CMP RDI,RBX
JZ 0x00119bc9
MOV RSI,qword ptr [RBX]
INC RSI
POP RBX
JMP 0x00107430
LAB_00119bc9:
POP RBX
RET
|
/* CLI::Option::~Option() */
void __thiscall CLI::Option::~Option(Option *this)
{
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x230));
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x218));
if (*(code **)(this + 0x208) != (code *)0x0) {
/* try { // try from 00119a8f to 00119a98 has its CatchHandler @ 00119bcf */
(**(code **)(this + 0x208))(this + 0x1f8,this + 0x1f8,3);
}
std::
_Rb_tree<CLI::Option*,CLI::Option*,std::_Identity<CLI::Option*>,std::less<CLI::Option*>,std::allocator<CLI::Option*>>
::~_Rb_tree((_Rb_tree<CLI::Option*,CLI::Option*,std::_Identity<CLI::Option*>,std::less<CLI::Option*>,std::allocator<CLI::Option*>>
*)(this + 0x1c0));
std::
_Rb_tree<CLI::Option*,CLI::Option*,std::_Identity<CLI::Option*>,std::less<CLI::Option*>,std::allocator<CLI::Option*>>
::~_Rb_tree((_Rb_tree<CLI::Option*,CLI::Option*,std::_Identity<CLI::Option*>,std::less<CLI::Option*>,std::allocator<CLI::Option*>>
*)(this + 400));
std::vector<CLI::Validator,std::allocator<CLI::Validator>>::~vector
((vector<CLI::Validator,std::allocator<CLI::Validator>> *)(this + 0x178));
if (*(code **)(this + 0x158) != (code *)0x0) {
/* try { // try from 00119ad0 to 00119ad9 has its CatchHandler @ 00119bcd */
(**(code **)(this + 0x158))(this + 0x148,this + 0x148,3);
}
if (*(code **)(this + 0x138) != (code *)0x0) {
/* try { // try from 00119aed to 00119af6 has its CatchHandler @ 00119bcb */
(**(code **)(this + 0x138))(this + 0x128,this + 0x128,3);
}
if (*(Option **)(this + 0x108) != this + 0x118) {
operator_delete(*(Option **)(this + 0x108),*(long *)(this + 0x118) + 1);
}
if (*(Option **)(this + 0xe8) != this + 0xf8) {
operator_delete(*(Option **)(this + 0xe8),*(long *)(this + 0xf8) + 1);
}
if (*(Option **)(this + 200) != this + 0xd8) {
operator_delete(*(Option **)(this + 200),*(long *)(this + 0xd8) + 1);
}
if (*(Option **)(this + 0xa8) != this + 0xb8) {
operator_delete(*(Option **)(this + 0xa8),*(long *)(this + 0xb8) + 1);
}
if (*(Option **)(this + 0x88) != this + 0x98) {
operator_delete(*(Option **)(this + 0x88),*(long *)(this + 0x98) + 1);
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x70));
std::
vector<std::pair<std::__cxx11::string,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string,std::__cxx11::string>>>
::~vector((vector<std::pair<std::__cxx11::string,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string,std::__cxx11::string>>>
*)(this + 0x58));
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x40));
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x28));
if (*(Option **)this != this + 0x10) {
operator_delete(*(Option **)this,*(long *)(this + 0x10) + 1);
return;
}
return;
}
| |
27,304 | mysql_real_connect_start_internal | eloqsql/libmariadb/libmariadb/mariadb_async.c | static void
mysql_real_connect_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_real_connect,
(parms->mysql, parms->host, parms->user, parms->passwd, parms->db,
parms->port, parms->unix_socket, parms->client_flags),
parms->mysql,
MYSQL *,
r_ptr)
} | O0 | c | mysql_real_connect_start_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x20(%rax), %r8
movq -0x10(%rbp), %rax
movl 0x28(%rax), %r9d
movq -0x10(%rbp), %rax
movq 0x30(%rax), %r10
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x1adf0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| mysql_real_connect_start_internal:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rdi, [rax]
mov rax, [rbp+var_10]
mov rsi, [rax+8]
mov rax, [rbp+var_10]
mov rdx, [rax+10h]
mov rax, [rbp+var_10]
mov rcx, [rax+18h]
mov rax, [rbp+var_10]
mov r8, [rax+20h]
mov rax, [rbp+var_10]
mov r9d, [rax+28h]
mov rax, [rbp+var_10]
mov r10, [rax+30h]
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov [rsp+30h+var_30], r10
mov [rsp+30h+var_28], rax
call mysql_real_connect
mov [rbp+var_18], rax
mov rcx, [rbp+var_18]
mov rax, [rbp+var_20]
mov [rax+8], rcx
mov rax, [rbp+var_20]
mov dword ptr [rax], 0
add rsp, 30h
pop rbp
retn
| long long mysql_real_connect_start_internal(long long a1)
{
long long result; // rax
long long v2; // [rsp+10h] [rbp-20h]
v2 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 1152LL) + 40LL);
*(_QWORD *)(v2 + 8) = mysql_real_connect(
*(_QWORD *)a1,
*(_QWORD *)(a1 + 8),
*(_QWORD *)(a1 + 16),
*(_QWORD *)(a1 + 24),
*(_QWORD *)(a1 + 32),
*(_DWORD *)(a1 + 40),
*(_QWORD *)(a1 + 48),
*(_QWORD *)(a1 + 56));
result = v2;
*(_DWORD *)v2 = 0;
return result;
}
| mysql_real_connect_start_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV R8,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV R9D,dword ptr [RAX + 0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV R10,qword ptr [RAX + 0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RSP],R10
MOV qword ptr [RSP + 0x8],RAX
CALL 0x0011adf0
MOV qword ptr [RBP + -0x18],RAX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x0
ADD RSP,0x30
POP RBP
RET
|
void mysql_real_connect_start_internal(long *param_1)
{
int4 *puVar1;
int8 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_real_connect(*param_1,param_1[1],param_1[2],param_1[3],param_1[4],(int)param_1[5],
param_1[6],param_1[7]);
*(int8 *)(puVar1 + 2) = uVar2;
*puVar1 = 0;
return;
}
| |
27,305 | void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) | giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc | Result HandleExceptionsInMethodIfSupported(T* object, Result (T::*method)(),
const char* location) {
// NOTE: The user code can affect the way in which Google Test handles
// exceptions by setting GTEST_FLAG(catch_exceptions), but only before
// RUN_ALL_TESTS() starts. It is technically possible to check the flag
// after the exception is caught and either report or re-throw the
// exception based on the flag's value:
//
// try {
// // Perform the test method.
// } catch (...) {
// if (GTEST_FLAG_GET(catch_exceptions))
// // Report the exception as failure.
// else
// throw; // Re-throws the original exception.
// }
//
// However, the purpose of this flag is to allow the program to drop into
// the debugger when the exception is thrown. On most platforms, once the
// control enters the catch block, the exception origin information is
// lost and the debugger will stop the program at the point of the
// re-throw in this function -- instead of at the point of the original
// throw statement in the code under test. For this reason, we perform
// the check early, sacrificing the ability to affect Google Test's
// exception handling in the method where the exception is thrown.
if (internal::GetUnitTestImpl()->catch_exceptions()) {
#if GTEST_HAS_EXCEPTIONS
try {
return HandleSehExceptionsInMethodIfSupported(object, method, location);
} catch (const AssertionException&) { // NOLINT
// This failure was reported already.
} catch (const internal::GoogleTestFailureException&) { // NOLINT
// This exception type can only be thrown by a failed Google
// Test assertion with the intention of letting another testing
// framework catch it. Therefore we just re-throw it.
throw;
} catch (const std::exception& e) { // NOLINT
internal::ReportFailureInUnknownLocation(
TestPartResult::kFatalFailure,
FormatCxxExceptionMessage(e.what(), location));
} catch (...) { // NOLINT
internal::ReportFailureInUnknownLocation(
TestPartResult::kFatalFailure,
FormatCxxExceptionMessage(nullptr, location));
}
return static_cast<Result>(0);
#else
return HandleSehExceptionsInMethodIfSupported(object, method, location);
#endif // GTEST_HAS_EXCEPTIONS
} else {
return (object->*method)();
}
} | O1 | cpp | void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
callq 0x19012
movq 0x24aee(%rip), %rax # 0x597b0
addq %r15, %r14
cmpb $0x1, 0x2c8(%rax)
jne 0x34cee
testb $0x1, %r12b
je 0x34cdc
movq (%r14), %rax
movq -0x1(%rax,%r12), %r12
movq %r14, %rdi
callq *%r12
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
testb $0x1, %r12b
movq %r12, %rcx
je 0x34cff
movq (%r14), %rax
movq -0x1(%rax,%rcx), %rcx
movq %r14, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmpq *%rcx
movq %rdx, %r14
movq %rax, %rdi
cmpl $0x4, %r14d
jne 0x34d22
callq 0x81f0
jmp 0x34d96
cmpl $0x3, %r14d
je 0x34da2
callq 0x81f0
cmpl $0x2, %r14d
jne 0x34d5d
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x30d5d
leaq 0x8(%rsp), %rsi
movl $0x2, %edi
callq 0x204e0
jmp 0x34d7b
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x30d5d
leaq 0x8(%rsp), %rsi
movl $0x2, %edi
callq 0x204e0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x34d96
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x84e0
callq 0x8910
xorl %eax, %eax
jmp 0x34ce2
callq 0x81f0
callq 0x87e0
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x34dcf
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x84e0
jmp 0x34dcf
movq %rax, %rbx
callq 0x8910
jmp 0x34e08
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x34df9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x84e0
jmp 0x34df9
movq %rax, %rbx
callq 0x8910
jmp 0x34e08
movq %rax, %rbx
callq 0x8910
movq %rbx, %rdi
callq 0x8990
movq %rax, %rdi
callq 0x326a4
| _ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc:
push r15
push r14
push r12
push rbx
sub rsp, 28h
mov rbx, rcx
mov r15, rdx
mov r12, rsi
mov r14, rdi
call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void)
mov rax, cs:qword_597B0
add r14, r15
cmp byte ptr [rax+2C8h], 1
jnz short loc_34CEE
test r12b, 1
jz short loc_34CDC
mov rax, [r14]
mov r12, [rax+r12-1]
loc_34CDC:
mov rdi, r14
call r12
loc_34CE2:
add rsp, 28h
pop rbx
pop r12
pop r14
pop r15
retn
loc_34CEE:
test r12b, 1
mov rcx, r12
jz short loc_34CFF
mov rax, [r14]
mov rcx, [rax+rcx-1]
loc_34CFF:
mov rdi, r14
add rsp, 28h
pop rbx
pop r12
pop r14
pop r15
jmp rcx
mov r14, rdx
mov rdi, rax; void *
cmp r14d, 4
jnz short loc_34D22
call ___cxa_begin_catch
jmp short loc_34D96
loc_34D22:
cmp r14d, 3
jz short loc_34DA2
call ___cxa_begin_catch
cmp r14d, 2
jnz short loc_34D5D
mov rcx, [rax]
mov rdi, rax
call qword ptr [rcx+10h]
lea rdi, [rsp+48h+var_40]
mov rsi, rax
mov rdx, rbx
call _ZN7testing8internalL25FormatCxxExceptionMessageB5cxx11EPKcS2_; testing::internal::FormatCxxExceptionMessage(char const*,char const*)
lea rsi, [rsp+48h+var_40]; int
mov edi, 2; int
call _ZN7testing8internal30ReportFailureInUnknownLocationENS_14TestPartResult4TypeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::ReportFailureInUnknownLocation(testing::TestPartResult::Type,std::string const&)
jmp short loc_34D7B
loc_34D5D:
lea rdi, [rsp+48h+var_40]
xor esi, esi
mov rdx, rbx
call _ZN7testing8internalL25FormatCxxExceptionMessageB5cxx11EPKcS2_; testing::internal::FormatCxxExceptionMessage(char const*,char const*)
lea rsi, [rsp+48h+var_40]; int
mov edi, 2; int
call _ZN7testing8internal30ReportFailureInUnknownLocationENS_14TestPartResult4TypeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::ReportFailureInUnknownLocation(testing::TestPartResult::Type,std::string const&)
loc_34D7B:
lea rax, [rsp+48h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_34D96
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_34D96:
call ___cxa_end_catch
xor eax, eax
jmp loc_34CE2
loc_34DA2:
call ___cxa_begin_catch
call ___cxa_rethrow
mov rbx, rax
lea rax, [rsp+48h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_34DCF
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_34DCF
mov rbx, rax
loc_34DCF:
call ___cxa_end_catch
jmp short loc_34E08
mov rbx, rax
lea rax, [rsp+48h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_34DF9
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_34DF9
mov rbx, rax
loc_34DF9:
call ___cxa_end_catch
jmp short loc_34E08
mov rbx, rax
call ___cxa_end_catch
loc_34E08:
mov rdi, rbx
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
| long long testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,bool>(
testing::UnitTest *a1,
long long ( *a2)(_QWORD),
long long a3)
{
long long ( *v4)(_QWORD *); // r12
_QWORD *v5; // r14
long long ( *v7)(_QWORD *); // rcx
v4 = (long long ( *)(_QWORD *))a2;
testing::UnitTest::GetInstance(a1);
v5 = (_QWORD *)((char *)a1 + a3);
if ( *((_BYTE *)qword_597B0 + 712) == 1 )
{
if ( ((unsigned __int8)a2 & 1) != 0 )
v4 = *(long long ( **)(_QWORD *))((char *)a2 + *v5 - 1);
return v4(v5);
}
else
{
v7 = (long long ( *)(_QWORD *))a2;
if ( ((unsigned __int8)a2 & 1) != 0 )
v7 = *(long long ( **)(_QWORD *))((char *)a2 + *v5 - 1);
return v7(v5);
}
}
| HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,bool>:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RCX
MOV R15,RDX
MOV R12,RSI
MOV R14,RDI
CALL 0x00119012
MOV RAX,qword ptr [0x001597b0]
ADD R14,R15
CMP byte ptr [RAX + 0x2c8],0x1
JNZ 0x00134cee
TEST R12B,0x1
JZ 0x00134cdc
MOV RAX,qword ptr [R14]
MOV R12,qword ptr [RAX + R12*0x1 + -0x1]
LAB_00134cdc:
MOV RDI,R14
CALL R12
LAB_00134ce2:
ADD RSP,0x28
POP RBX
POP R12
POP R14
POP R15
RET
LAB_00134cee:
TEST R12B,0x1
MOV RCX,R12
JZ 0x00134cff
MOV RAX,qword ptr [R14]
MOV RCX,qword ptr [RAX + RCX*0x1 + -0x1]
LAB_00134cff:
MOV RDI,R14
ADD RSP,0x28
POP RBX
POP R12
POP R14
POP R15
JMP RCX
|
/* bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,
bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*)
*/
bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,bool>
(UnitTestImpl *param_1,_func_bool *param_2,char *param_3)
{
bool bVar1;
UnitTestImpl *pUVar2;
UnitTest::GetInstance();
pUVar2 = param_1 + (long)param_3;
if (*(char *)(UnitTest::GetInstance()::instance._64_8_ + 0x2c8) == '\x01') {
if (((ulong)param_2 & 1) != 0) {
param_2 = *(_func_bool **)(param_2 + *(long *)pUVar2 + -1);
}
/* try { // try from 00134cdc to 00134ce1 has its CatchHandler @ 00134d0f */
bVar1 = (*param_2)(pUVar2);
return bVar1;
}
if (((ulong)param_2 & 1) != 0) {
param_2 = *(_func_bool **)(param_2 + *(long *)pUVar2 + -1);
}
/* WARNING: Could not recover jumptable at 0x00134d0d. Too many branches */
/* WARNING: Treating indirect jump as call */
bVar1 = (*param_2)(pUVar2);
return bVar1;
}
| |
27,306 | JS_AddIntrinsicDate | bluesky950520[P]quickjs/quickjs.c | void JS_AddIntrinsicDate(JSContext *ctx)
{
JSValue obj;
/* Date */
ctx->class_proto[JS_CLASS_DATE] = JS_NewObject(ctx);
JS_SetPropertyFunctionList(ctx, ctx->class_proto[JS_CLASS_DATE], js_date_proto_funcs,
countof(js_date_proto_funcs));
obj = JS_NewGlobalCConstructor(ctx, "Date", js_date_constructor, 7,
ctx->class_proto[JS_CLASS_DATE]);
JS_SetPropertyFunctionList(ctx, obj, js_date_funcs, countof(js_date_funcs));
} | O0 | c | JS_AddIntrinsicDate:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq 0x40(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x40(%rsp), %rdi
callq 0x2a570
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x20(%rsp), %rcx
movq %rcx, 0xa0(%rax)
movq 0x28(%rsp), %rcx
movq %rcx, 0xa8(%rax)
movq 0x40(%rsp), %rdi
movq 0x40(%rsp), %rax
movq 0x40(%rax), %rax
movq 0xa0(%rax), %rsi
movq 0xa8(%rax), %rdx
leaq 0x10c942(%rip), %rcx # 0x1328e0
movl $0x2f, %r8d
callq 0x4cb00
movq 0x40(%rsp), %rdi
movq 0x40(%rsp), %rax
movq 0x40(%rax), %rax
movq 0xa0(%rax), %r8
movq 0xa8(%rax), %r9
leaq 0xe970b(%rip), %rsi # 0x10f6d7
leaq 0x2f19d(%rip), %rdx # 0x55170
movl $0x7, %ecx
callq 0x4e170
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
leaq 0x10aeff(%rip), %rcx # 0x130f10
movl $0x3, %r8d
callq 0x4cb00
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
| JS_AddIntrinsicDate:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov rax, [rsp+48h+var_8]
mov rax, [rax+40h]
mov [rsp+48h+var_40], rax
mov rdi, [rsp+48h+var_8]
call JS_NewObject
mov rcx, rax
mov rax, [rsp+48h+var_40]
mov [rsp+48h+var_28], rcx
mov [rsp+48h+var_20], rdx
mov rcx, [rsp+48h+var_28]
mov [rax+0A0h], rcx
mov rcx, [rsp+48h+var_20]
mov [rax+0A8h], rcx
mov rdi, [rsp+48h+var_8]
mov rax, [rsp+48h+var_8]
mov rax, [rax+40h]
mov rsi, [rax+0A0h]
mov rdx, [rax+0A8h]
lea rcx, js_date_proto_funcs
mov r8d, 2Fh ; '/'
call JS_SetPropertyFunctionList
mov rdi, [rsp+48h+var_8]
mov rax, [rsp+48h+var_8]
mov rax, [rax+40h]
mov r8, [rax+0A0h]
mov r9, [rax+0A8h]
lea rsi, aInvalidDate+8; "Date"
lea rdx, js_date_constructor
mov ecx, 7
call JS_NewGlobalCConstructor
mov [rsp+48h+var_38], rax
mov [rsp+48h+var_30], rdx
mov rax, [rsp+48h+var_38]
mov [rsp+48h+var_18], rax
mov rax, [rsp+48h+var_30]
mov [rsp+48h+var_10], rax
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_18]
mov rdx, [rsp+48h+var_10]
lea rcx, js_date_funcs
mov r8d, 3
call JS_SetPropertyFunctionList
add rsp, 48h
retn
| long long JS_AddIntrinsicDate(long long a1)
{
long long v1; // rdx
long long v2; // rdx
long long v4; // [rsp+8h] [rbp-40h]
long long v5; // [rsp+10h] [rbp-38h]
v4 = *(_QWORD *)(a1 + 64);
*(_QWORD *)(v4 + 160) = JS_NewObject(a1);
*(_QWORD *)(v4 + 168) = v1;
JS_SetPropertyFunctionList(
a1,
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 160LL),
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 168LL),
&js_date_proto_funcs,
47LL);
v5 = JS_NewGlobalCConstructor(
a1,
"Date",
js_date_constructor,
7LL,
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 160LL),
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 168LL));
return JS_SetPropertyFunctionList(a1, v5, v2, &js_date_funcs, 3LL);
}
| js_free:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x8],RSI
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RAX + 0x18]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x00125ae0
ADD RSP,0x18
RET
|
void js_free(long param_1,int8 param_2)
{
js_free_rt(*(int8 *)(param_1 + 0x18),param_2);
return;
}
| |
27,307 | JS_AddIntrinsicDate | bluesky950520[P]quickjs/quickjs.c | void JS_AddIntrinsicDate(JSContext *ctx)
{
JSValue obj;
/* Date */
ctx->class_proto[JS_CLASS_DATE] = JS_NewObject(ctx);
JS_SetPropertyFunctionList(ctx, ctx->class_proto[JS_CLASS_DATE], js_date_proto_funcs,
countof(js_date_proto_funcs));
obj = JS_NewGlobalCConstructor(ctx, "Date", js_date_constructor, 7,
ctx->class_proto[JS_CLASS_DATE]);
JS_SetPropertyFunctionList(ctx, obj, js_date_funcs, countof(js_date_funcs));
} | O1 | c | JS_AddIntrinsicDate:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x40(%rdi), %r14
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rdx
movl $0x1, %ecx
callq 0x20f05
movq %rax, 0xa0(%r14)
movq %rdx, 0xa8(%r14)
movq 0x40(%rbx), %rax
movq 0xa0(%rax), %rsi
movq 0xa8(%rax), %rdx
leaq 0xaaf37(%rip), %rcx # 0xc9800
movq %rbx, %rdi
movl $0x2f, %r8d
callq 0x32c67
movq 0x40(%rbx), %rax
movq 0xa0(%rax), %r14
movq 0xa8(%rax), %r15
movups 0x48(%rbx), %xmm0
movups %xmm0, (%rsp)
leaq 0x1860e(%rip), %rsi # 0x36f06
leaq 0x81d74(%rip), %r12 # 0xa0673
movq %rbx, %rdi
movq %r12, %rdx
movl $0x7, %ecx
movl $0x4, %r8d
xorl %r9d, %r9d
callq 0x21006
movq %rax, %r13
movq %rdx, %rbp
movq %rbx, %rdi
movq %rax, %rsi
movq %r12, %rcx
movq %r14, %r8
movq %r15, %r9
callq 0x361aa
leaq 0xa9507(%rip), %rcx # 0xc7e40
movq %rbx, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movl $0x3, %r8d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x32c67
| JS_AddIntrinsicDate:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdi
mov r14, [rdi+40h]
mov rsi, [r14+10h]
mov rdx, [r14+18h]
mov ecx, 1
call JS_NewObjectProtoClass
mov [r14+0A0h], rax
mov [r14+0A8h], rdx
mov rax, [rbx+40h]
mov rsi, [rax+0A0h]
mov rdx, [rax+0A8h]
lea rcx, js_date_proto_funcs
mov rdi, rbx
mov r8d, 2Fh ; '/'
call JS_SetPropertyFunctionList
mov rax, [rbx+40h]
mov r14, [rax+0A0h]
mov r15, [rax+0A8h]
movups xmm0, xmmword ptr [rbx+48h]
movups [rsp+48h+var_48], xmm0
lea rsi, js_date_constructor
lea r12, aInvalidDate+8; "Date"
mov rdi, rbx
mov rdx, r12
mov ecx, 7
mov r8d, 4
xor r9d, r9d
call JS_NewCFunction3
mov r13, rax
mov rbp, rdx
mov rdi, rbx
mov rsi, rax
mov rcx, r12
mov r8, r14
mov r9, r15
call JS_NewGlobalCConstructor2
lea rcx, js_date_funcs
mov rdi, rbx
mov rsi, r13
mov rdx, rbp
mov r8d, 3
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp JS_SetPropertyFunctionList
| long long JS_AddIntrinsicDate(_QWORD *a1)
{
_QWORD *v1; // r14
long long v2; // rdx
long long v3; // rax
long long v4; // r14
long long v5; // r15
long long v6; // r13
long long v7; // rdx
long long v8; // rbp
v1 = (_QWORD *)a1[8];
v1[20] = JS_NewObjectProtoClass(a1, v1[2], v1[3], 1LL);
v1[21] = v2;
JS_SetPropertyFunctionList(a1, *(_QWORD *)(a1[8] + 160LL), *(_QWORD *)(a1[8] + 168LL), &js_date_proto_funcs, 47LL);
v3 = a1[8];
v4 = *(_QWORD *)(v3 + 160);
v5 = *(_QWORD *)(v3 + 168);
v6 = JS_NewCFunction3((_DWORD)a1, (unsigned int)js_date_constructor, (unsigned int)"Date", 7, 4, 0, a1[9], a1[10]);
v8 = v7;
JS_NewGlobalCConstructor2(a1, v6, v7, "Date", v4, v5);
return JS_SetPropertyFunctionList(a1, v6, v8, &js_date_funcs, 3LL);
}
| |||
27,308 | JS_AddIntrinsicDate | bluesky950520[P]quickjs/quickjs.c | void JS_AddIntrinsicDate(JSContext *ctx)
{
JSValue obj;
/* Date */
ctx->class_proto[JS_CLASS_DATE] = JS_NewObject(ctx);
JS_SetPropertyFunctionList(ctx, ctx->class_proto[JS_CLASS_DATE], js_date_proto_funcs,
countof(js_date_proto_funcs));
obj = JS_NewGlobalCConstructor(ctx, "Date", js_date_constructor, 7,
ctx->class_proto[JS_CLASS_DATE]);
JS_SetPropertyFunctionList(ctx, obj, js_date_funcs, countof(js_date_funcs));
} | O2 | c | JS_AddIntrinsicDate:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x40(%rdi), %r14
callq 0x1b2c9
movq %rax, 0xa0(%r14)
movq %rdx, 0xa8(%r14)
movq 0x40(%rbx), %rax
movq 0xa0(%rax), %rsi
movq 0xa8(%rax), %rdx
leaq 0x9e6a8(%rip), %rcx # 0xb7800
pushq $0x2f
popq %r8
movq %rbx, %rdi
callq 0x2c3ff
movq 0x40(%rbx), %rax
movq 0xa0(%rax), %r8
movq 0xa8(%rax), %r9
leaq 0x6e430(%rip), %rsi # 0x875ad
leaq 0x1746a(%rip), %rdx # 0x305ee
pushq $0x7
popq %rcx
movq %rbx, %rdi
callq 0x2cd8c
leaq 0x9ccaa(%rip), %rcx # 0xb5e40
pushq $0x3
popq %r8
movq %rbx, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2c3ff
| JS_AddIntrinsicDate:
push r14
push rbx
push rax
mov rbx, rdi
mov r14, [rdi+40h]
call JS_NewObject
mov [r14+0A0h], rax
mov [r14+0A8h], rdx
mov rax, [rbx+40h]
mov rsi, [rax+0A0h]
mov rdx, [rax+0A8h]
lea rcx, js_date_proto_funcs
push 2Fh ; '/'
pop r8
mov rdi, rbx
call JS_SetPropertyFunctionList
mov rax, [rbx+40h]
mov r8, [rax+0A0h]
mov r9, [rax+0A8h]
lea rsi, aInvalidDate+8; "Date"
lea rdx, js_date_constructor
push 7
pop rcx
mov rdi, rbx
call JS_NewGlobalCConstructor
lea rcx, js_date_funcs
push 3
pop r8
mov rdi, rbx
mov rsi, rax
add rsp, 8
pop rbx
pop r14
jmp JS_SetPropertyFunctionList
| long long JS_AddIntrinsicDate(long long a1)
{
long long v1; // r14
long long v2; // rdx
long long v3; // rax
long long v4; // rdx
v1 = *(_QWORD *)(a1 + 64);
*(_QWORD *)(v1 + 160) = JS_NewObject(a1);
*(_QWORD *)(v1 + 168) = v2;
JS_SetPropertyFunctionList(
a1,
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 160LL),
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 168LL),
&js_date_proto_funcs,
47LL);
v3 = JS_NewGlobalCConstructor(
a1,
"Date",
js_date_constructor,
7LL,
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 160LL),
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 168LL));
return JS_SetPropertyFunctionList(a1, v3, v4, &js_date_funcs, 3LL);
}
| JS_AddIntrinsicDate:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R14,qword ptr [RDI + 0x40]
CALL 0x0011b2c9
MOV qword ptr [R14 + 0xa0],RAX
MOV qword ptr [R14 + 0xa8],RDX
MOV RAX,qword ptr [RBX + 0x40]
MOV RSI,qword ptr [RAX + 0xa0]
MOV RDX,qword ptr [RAX + 0xa8]
LEA RCX,[0x1b7800]
PUSH 0x2f
POP R8
MOV RDI,RBX
CALL 0x0012c3ff
MOV RAX,qword ptr [RBX + 0x40]
MOV R8,qword ptr [RAX + 0xa0]
MOV R9,qword ptr [RAX + 0xa8]
LEA RSI,[0x1875ad]
LEA RDX,[0x1305ee]
PUSH 0x7
POP RCX
MOV RDI,RBX
CALL 0x0012cd8c
LEA RCX,[0x1b5e40]
PUSH 0x3
POP R8
MOV RDI,RBX
MOV RSI,RAX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x0012c3ff
|
void JS_AddIntrinsicDate(long param_1)
{
long lVar1;
int1 auVar2 [16];
lVar1 = *(long *)(param_1 + 0x40);
auVar2 = JS_NewObject();
*(int1 (*) [16])(lVar1 + 0xa0) = auVar2;
JS_SetPropertyFunctionList
(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0xa0),
*(int8 *)(*(long *)(param_1 + 0x40) + 0xa8),js_date_proto_funcs,0x2f);
auVar2 = JS_NewGlobalCConstructor
(param_1,"Date",js_date_constructor,7,
*(int8 *)(*(long *)(param_1 + 0x40) + 0xa0),
*(int8 *)(*(long *)(param_1 + 0x40) + 0xa8));
JS_SetPropertyFunctionList(param_1,auVar2._0_8_,auVar2._8_8_,js_date_funcs,3);
return;
}
| |
27,309 | void nlohmann::json_abi_v3_11_3::detail::get_arithmetic_value<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, double, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, double&) | monkey531[P]llama/common/json.hpp | void get_arithmetic_value(const BasicJsonType& j, ArithmeticType& val)
{
switch (static_cast<value_t>(j))
{
case value_t::number_unsigned:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>());
break;
}
case value_t::number_integer:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>());
break;
}
case value_t::number_float:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>());
break;
}
case value_t::null:
case value_t::object:
case value_t::array:
case value_t::string:
case value_t::boolean:
case value_t::binary:
case value_t::discarded:
default:
JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j));
}
} | O0 | cpp | void nlohmann::json_abi_v3_11_3::detail::get_arithmetic_value<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, double, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, double&):
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x50(%rsp), %rdi
callq 0x110b90
movzbl %al, %ecx
movq %rcx, 0x8(%rsp)
subb $0x9, %al
ja 0x111fa6
movq 0x8(%rsp), %rax
leaq 0xfad68(%rip), %rcx # 0x20cc8c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x50(%rsp), %rdi
callq 0x110ba0
movq (%rax), %xmm0
movaps 0xfacde(%rip), %xmm1 # 0x20cc20
punpckldq %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0xface2(%rip), %xmm1 # 0x20cc30
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0 # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movq 0x48(%rsp), %rax
movsd %xmm0, (%rax)
jmp 0x112054
movq 0x50(%rsp), %rdi
callq 0x110bc0
cvtsi2sdq (%rax), %xmm0
movq 0x48(%rsp), %rax
movsd %xmm0, (%rax)
jmp 0x112054
movq 0x50(%rsp), %rdi
callq 0x110be0
movsd (%rax), %xmm0
movq 0x48(%rsp), %rax
movsd %xmm0, (%rax)
jmp 0x112054
jmp 0x111fa6
movb $0x1, 0x13(%rsp)
movl $0x20, %edi
callq 0x59660
movq %rax, (%rsp)
movq 0x50(%rsp), %rdi
callq 0xb2d00
movq %rax, 0x20(%rsp)
leaq 0xfc488(%rip), %rsi # 0x20e457
leaq 0x28(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0x110db0
jmp 0x111fe0
movq (%rsp), %rdi
movq 0x50(%rsp), %rcx
movl $0x12e, %esi # imm = 0x12E
leaq 0x28(%rsp), %rdx
callq 0x110c00
jmp 0x111ffa
movq (%rsp), %rdi
movb $0x0, 0x13(%rsp)
leaq 0x18bd7e(%rip), %rsi # 0x29dd88
leaq -0x5f261(%rip), %rdx # 0xb2db0
callq 0x59ac0
jmp 0x112063
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
jmp 0x112040
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x5a4d8
testb $0x1, 0x13(%rsp)
jne 0x112049
jmp 0x112052
movq (%rsp), %rdi
callq 0x59f20
jmp 0x112059
addq $0x58, %rsp
retq
movq 0x18(%rsp), %rdi
callq 0x59b80
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEdTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
sub rsp, 58h
mov qword ptr [rsp+58h+var_8], rdi; char
mov qword ptr [rsp+58h+var_10], rsi; int
mov rdi, qword ptr [rsp+58h+var_8]
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEcvNS0_6detail7value_tEEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator nlohmann::json_abi_v3_11_3::detail::value_t(void)
movzx ecx, al
mov qword ptr [rsp+58h+var_50], rcx; int
sub al, 9; switch 10 cases
ja def_111F2B; jumptable 0000000000111F2B default case
mov rax, qword ptr [rsp+58h+var_50]
lea rcx, jpt_111F2B
movsxd rax, ds:(jpt_111F2B - 20CC8Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_111F2D:
mov rdi, qword ptr [rsp+58h+var_8]; jumptable 0000000000111F2B case 6
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKmTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
movq xmm0, qword ptr [rax]
movaps xmm1, cs:xmmword_20CC20
punpckldq xmm0, xmm1
movapd xmm1, cs:xmmword_20CC30
subpd xmm0, xmm1
movaps xmm1, xmm0
unpckhpd xmm0, xmm0
addsd xmm0, xmm1
mov rax, qword ptr [rsp+58h+var_10]
movsd qword ptr [rax], xmm0
jmp loc_112054
loc_111F6B:
mov rdi, qword ptr [rsp+58h+var_8]; jumptable 0000000000111F2B case 5
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKlTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
cvtsi2sd xmm0, qword ptr [rax]
mov rax, qword ptr [rsp+58h+var_10]
movsd qword ptr [rax], xmm0
jmp loc_112054
loc_111F88:
mov rdi, qword ptr [rsp+58h+var_8]; jumptable 0000000000111F2B case 7
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKdTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv
movsd xmm0, qword ptr [rax]
mov rax, qword ptr [rsp+58h+var_10]
movsd qword ptr [rax], xmm0
jmp loc_112054
loc_111FA4:
jmp short $+2; jumptable 0000000000111F2B cases 0-4,8,9
def_111F2B:
mov [rsp+58h+var_45], 1; jumptable 0000000000111F2B default case
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov [rsp+58h+var_58], rax; int
mov rdi, qword ptr [rsp+58h+var_8]
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 qword ptr [rsp+58h+var_38], rax; int
lea rsi, aTypeMustBeNumb; "type must be number, but is "
lea rdi, [rsp+58h+var_30]
lea rdx, [rsp+58h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
jmp short $+2
loc_111FE0:
mov rdi, [rsp+58h+var_58]; int
mov rcx, qword ptr [rsp+58h+var_8]
mov esi, 12Eh
lea rdx, [rsp+58h+var_30]
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
jmp short $+2
loc_111FFA:
mov rdi, [rsp+58h+var_58]; void *
mov [rsp+58h+var_45], 0
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail10type_errorD2Ev; void (*)(void *)
call ___cxa_throw
jmp short loc_112063
mov rcx, rax
mov eax, edx
mov [rsp+arg_10], rcx
mov [rsp+arg_C], eax
jmp short loc_112040
mov rcx, rax
mov eax, edx
mov [rsp+arg_10], rcx
mov [rsp+arg_C], eax
lea rdi, [rsp+arg_20]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_112040:
test [rsp+arg_B], 1
jnz short loc_112049
jmp short loc_112052
loc_112049:
mov rdi, [rsp+0]; void *
call ___cxa_free_exception
loc_112052:
jmp short loc_112059
loc_112054:
add rsp, 58h
retn
loc_112059:
mov rdi, [rsp+arg_10]
call __Unwind_Resume
loc_112063:
nop word ptr [rax+rax+00000000h]
nop dword ptr [rax]
| long long ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEdTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
long long a1,
long long a2)
{
__m128d v2; // xmm1
long long result; // rax
double v4; // xmm0_8
long long v5; // xmm0_8
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // [rsp+0h] [rbp-58h]
int v7[2]; // [rsp+20h] [rbp-38h] BYREF
_BYTE v8[32]; // [rsp+28h] [rbp-30h] BYREF
int v9[2]; // [rsp+48h] [rbp-10h]
char v10[8]; // [rsp+50h] [rbp-8h]
*(_QWORD *)v10 = a1;
*(_QWORD *)v9 = a2;
switch ( 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 nlohmann::json_abi_v3_11_3::detail::value_t(a1) )
{
case 5:
v4 = (double)(int)*(_QWORD *)ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKlTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv(*(long long *)v10);
result = *(_QWORD *)v9;
**(double **)v9 = v4;
break;
case 6:
v2 = _mm_sub_pd(
(__m128d)_mm_unpacklo_epi32(
_mm_loadl_epi64((const __m128i *)ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKmTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv(*(long long *)v10)),
(__m128i)xmmword_20CC20),
(__m128d)xmmword_20CC30);
result = *(_QWORD *)v9;
**(double **)v9 = _mm_unpackhi_pd(v2, v2).m128d_f64[0] + v2.m128d_f64[0];
break;
case 7:
v5 = *(_QWORD *)ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7get_ptrIPKdTnNSt9enable_ifIXaasr3std10is_pointerIT_EE5valuesr3std8is_constINSt14remove_pointerISI_E4typeEEE5valueEiE4typeELi0EEEDTcldtclL_ZSt7declvalIRKSD_EDTcl9__declvalISI_ELi0EEEvEE12get_impl_ptrclsr3stdE7declvalISI_EEEEv(*(long long *)v10);
result = *(_QWORD *)v9;
**(_QWORD **)v9 = v5;
break;
default:
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
*(_QWORD *)v7 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(*(_BYTE **)v10);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v8,
(long long)"type must be number, but is ",
(nlohmann::json_abi_v3_11_3::detail **)v7);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
302LL,
(long long)v8,
*(long long *)v10);
__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::type_error::~type_error);
}
return result;
}
| |||
27,310 | void nlohmann::json_abi_v3_11_3::detail::get_arithmetic_value<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, double, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, double&) | monkey531[P]llama/common/json.hpp | void get_arithmetic_value(const BasicJsonType& j, ArithmeticType& val)
{
switch (static_cast<value_t>(j))
{
case value_t::number_unsigned:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>());
break;
}
case value_t::number_integer:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>());
break;
}
case value_t::number_float:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>());
break;
}
case value_t::null:
case value_t::object:
case value_t::array:
case value_t::string:
case value_t::boolean:
case value_t::binary:
case value_t::discarded:
default:
JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j));
}
} | O2 | cpp | void nlohmann::json_abi_v3_11_3::detail::get_arithmetic_value<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, double, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, double&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
movzbl (%rdi), %eax
cmpl $0x5, %eax
je 0x62dae
cmpl $0x7, %eax
je 0x62da6
cmpl $0x6, %eax
jne 0x62dc1
movsd 0x8(%r14), %xmm1
unpcklps 0x4e900(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x4e908(%rip), %xmm1 # 0xb16a0
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0 # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
jmp 0x62db4
movsd 0x8(%r14), %xmm0
jmp 0x62db4
cvtsi2sdq 0x8(%r14), %xmm0
movsd %xmm0, (%rsi)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x20
popq %rdi
callq 0x23450
movq %rax, %rbx
movq %r14, %rdi
callq 0x425be
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x4fc8d(%rip), %rsi # 0xb2a70
leaq 0x10(%rsp), %rdi
callq 0x6272b
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x6263e
xorl %ebp, %ebp
leaq 0x9713a(%rip), %rsi # 0xf9f48
leaq -0x23cc7(%rip), %rdx # 0x3f14e
movq %rbx, %rdi
callq 0x23e90
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x24158
testb %bpl, %bpl
jne 0x62e34
jmp 0x62e3c
movq %rax, %r14
movq %rbx, %rdi
callq 0x23660
movq %r14, %rdi
callq 0x23f10
| _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEdTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
push rbp; char
push r14; int
push rbx; int
sub rsp, 30h
mov r14, rdi
movzx eax, byte ptr [rdi]
cmp eax, 5
jz short loc_62DAE
cmp eax, 7
jz short loc_62DA6
cmp eax, 6
jnz short loc_62DC1
movsd xmm1, qword ptr [r14+8]
unpcklps xmm1, cs:xmmword_B1690
subpd xmm1, cs:xmmword_B16A0
movapd xmm0, xmm1
unpckhpd xmm0, xmm1
addsd xmm0, xmm1
jmp short loc_62DB4
loc_62DA6:
movsd xmm0, qword ptr [r14+8]
jmp short loc_62DB4
loc_62DAE:
cvtsi2sd xmm0, qword ptr [r14+8]
loc_62DB4:
movsd qword ptr [rsi], xmm0
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_62DC1:
push 20h ; ' '
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aTypeMustBeNumb; "type must be number, but is "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Eh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rdi, [rsp+48h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_62E34
jmp short loc_62E3C
mov r14, rax
loc_62E34:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_62E3C:
mov rdi, r14
call __Unwind_Resume
| long long ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEdTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
unsigned __int8 *a1,
double *a2)
{
long long result; // rax
__m128d v3; // xmm1
double v4; // xmm0_8
nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx
const char *v6; // [rsp+8h] [rbp-40h] BYREF
_BYTE v7[56]; // [rsp+10h] [rbp-38h] BYREF
result = *a1;
switch ( (_DWORD)result )
{
case 5:
v4 = (double)(int)*((_QWORD *)a1 + 1);
break;
case 7:
v4 = *((double *)a1 + 1);
break;
case 6:
v3 = _mm_sub_pd(
(__m128d)_mm_unpacklo_ps((__m128)*((unsigned long long *)a1 + 1), (__m128)xmmword_B1690),
(__m128d)xmmword_B16A0);
v4 = _mm_unpackhi_pd(v3, v3).m128d_f64[0] + v3.m128d_f64[0];
break;
default:
exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL);
v6 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v7,
(long long)"type must be number, but is ",
&v6);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
302,
(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);
}
*a2 = v4;
return result;
}
| _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEdTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
CMP EAX,0x5
JZ 0x00162dae
CMP EAX,0x7
JZ 0x00162da6
CMP EAX,0x6
JNZ 0x00162dc1
MOVSD XMM1,qword ptr [R14 + 0x8]
UNPCKLPS XMM1,xmmword ptr [0x001b1690]
SUBPD XMM1,xmmword ptr [0x001b16a0]
MOVAPD XMM0,XMM1
UNPCKHPD XMM0,XMM1
ADDSD XMM0,XMM1
JMP 0x00162db4
LAB_00162da6:
MOVSD XMM0,qword ptr [R14 + 0x8]
JMP 0x00162db4
LAB_00162dae:
CVTSI2SD XMM0,qword ptr [R14 + 0x8]
LAB_00162db4:
MOVSD qword ptr [RSI],XMM0
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_00162dc1:
PUSH 0x20
POP RDI
CALL 0x00123450
MOV RBX,RAX
MOV RDI,R14
CALL 0x001425be
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_00162ddc:
LEA RSI,[0x1b2a70]
LEA RDI,[RSP + 0x10]
CALL 0x0016272b
MOV BPL,0x1
LAB_00162df0:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x0016263e
XOR EBP,EBP
LEA RSI,[0x1f9f48]
LEA RDX,[0x13f14e]
MOV RDI,RBX
CALL 0x00123e90
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEdTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,double *param_2)
{
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
bVar1;
int8 uVar2;
double dVar3;
char *local_40;
detail local_38 [32];
bVar1 = *param_1;
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x5) {
dVar3 = (double)*(long *)(param_1 + 8);
}
else if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x7) {
dVar3 = *(double *)(param_1 + 8);
}
else {
if (bVar1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x6) {
uVar2 = __cxa_allocate_exception(0x20);
local_40 = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 00162ddc to 00162dec has its CatchHandler @ 00162e31 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"type must be number, but is ",&local_40);
/* try { // try from 00162df0 to 00162e1c has its CatchHandler @ 00162e1d */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar2,0x12e,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
dVar3 = ((double)CONCAT44(_UNK_001b1694,(int)((ulong)*(int8 *)(param_1 + 8) >> 0x20)) -
_UNK_001b16a8) +
((double)CONCAT44(_DAT_001b1690,(int)*(int8 *)(param_1 + 8)) - _DAT_001b16a0);
}
*param_2 = dVar3;
return;
}
| |
27,311 | void nlohmann::json_abi_v3_11_3::detail::get_arithmetic_value<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, double, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, double&) | monkey531[P]llama/common/json.hpp | void get_arithmetic_value(const BasicJsonType& j, ArithmeticType& val)
{
switch (static_cast<value_t>(j))
{
case value_t::number_unsigned:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>());
break;
}
case value_t::number_integer:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>());
break;
}
case value_t::number_float:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>());
break;
}
case value_t::null:
case value_t::object:
case value_t::array:
case value_t::string:
case value_t::boolean:
case value_t::binary:
case value_t::discarded:
default:
JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j));
}
} | O3 | cpp | void nlohmann::json_abi_v3_11_3::detail::get_arithmetic_value<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, double, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, double&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
movzbl (%rdi), %eax
cmpl $0x5, %eax
je 0xb1323
cmpl $0x7, %eax
je 0xb1329
cmpl $0x6, %eax
jne 0xb135a
movq 0x8(%r14), %rax
jmp 0xb134e
movsd 0x8(%r14), %xmm0
cvttsd2si %xmm0, %rcx
movq %rcx, %rdx
sarq $0x3f, %rdx
subsd 0x3c3bd(%rip), %xmm0 # 0xed700
cvttsd2si %xmm0, %rax
andq %rdx, %rax
orq %rcx, %rax
movq %rax, (%rsi)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x1a430
movq %rax, %rbx
movq %r14, %rdi
callq 0x5df1e
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x3d702(%rip), %rsi # 0xeea80
leaq 0x10(%rsp), %rdi
callq 0x85ac7
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x858f8
xorl %ebp, %ebp
leaq 0x76b9f(%rip), %rsi # 0x127f48
leaq -0x5725c(%rip), %rdx # 0x5a154
movq %rbx, %rdi
callq 0x1aea0
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb13d6
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1a890
testb %bpl, %bpl
jne 0xb13e0
jmp 0xb13e8
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a640
movq %r14, %rdi
callq 0x1af20
| _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
movzx eax, byte ptr [rdi]
cmp eax, 5
jz short loc_B1323
cmp eax, 7
jz short loc_B1329
cmp eax, 6
jnz short loc_B135A
loc_B1323:
mov rax, [r14+8]
jmp short loc_B134E
loc_B1329:
movsd xmm0, qword ptr [r14+8]
cvttsd2si rcx, xmm0
mov rdx, rcx
sar rdx, 3Fh
subsd xmm0, cs:qword_ED700
cvttsd2si rax, xmm0
and rax, rdx
or rax, rcx
loc_B134E:
mov [rsi], rax
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_B135A:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aTypeMustBeNumb; "type must be number, but is "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 12Eh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_B13D6
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_B13D6:
test bpl, bpl
jnz short loc_B13E0
jmp short loc_B13E8
mov r14, rax
loc_B13E0:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_B13E8:
mov rdi, r14
call __Unwind_Resume
| long long ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
double *a1,
_QWORD *a2)
{
int v2; // eax
long long result; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
const char *v5; // [rsp+8h] [rbp-40h] BYREF
_QWORD v6[2]; // [rsp+10h] [rbp-38h] BYREF
v2 = *(unsigned __int8 *)a1;
if ( v2 != 5 )
{
if ( v2 == 7 )
{
result = (unsigned int)(int)a1[1];
goto LABEL_6;
}
if ( v2 != 6 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v5 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v6,
(long long)"type must be number, but is ",
&v5);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
302,
v6);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
}
result = *((_QWORD *)a1 + 1);
LABEL_6:
*a2 = result;
return result;
}
| _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
CMP EAX,0x5
JZ 0x001b1323
CMP EAX,0x7
JZ 0x001b1329
CMP EAX,0x6
JNZ 0x001b135a
LAB_001b1323:
MOV RAX,qword ptr [R14 + 0x8]
JMP 0x001b134e
LAB_001b1329:
MOVSD XMM0,qword ptr [R14 + 0x8]
CVTTSD2SI RCX,XMM0
MOV RDX,RCX
SAR RDX,0x3f
SUBSD XMM0,qword ptr [0x001ed700]
CVTTSD2SI RAX,XMM0
AND RAX,RDX
OR RAX,RCX
LAB_001b134e:
MOV qword ptr [RSI],RAX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_001b135a:
MOV EDI,0x20
CALL 0x0011a430
MOV RBX,RAX
MOV RDI,R14
CALL 0x0015df1e
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001b1377:
LEA RSI,[0x1eea80]
LEA RDI,[RSP + 0x10]
CALL 0x00185ac7
MOV BPL,0x1
LAB_001b138b:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x001858f8
XOR EBP,EBP
LEA RSI,[0x227f48]
LEA RDX,[0x15a154]
MOV RDI,RBX
CALL 0x0011aea0
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEmTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,ulong *param_2)
{
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
bVar1;
int8 uVar2;
ulong uVar3;
char *local_40;
detail local_38 [32];
bVar1 = *param_1;
if (bVar1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x5) {
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x7) {
uVar3 = (ulong)*(double *)(param_1 + 8);
uVar3 = (long)(*(double *)(param_1 + 8) - _DAT_001ed700) & (long)uVar3 >> 0x3f | uVar3;
goto LAB_001b134e;
}
if (bVar1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x6) {
uVar2 = __cxa_allocate_exception(0x20);
local_40 = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 001b1377 to 001b1387 has its CatchHandler @ 001b13dd */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"type must be number, but is ",&local_40);
/* try { // try from 001b138b to 001b13b7 has its CatchHandler @ 001b13b8 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar2,0x12e,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
}
uVar3 = *(ulong *)(param_1 + 8);
LAB_001b134e:
*param_2 = uVar3;
return;
}
| |
27,312 | my_stat | eloqsql/mysys/my_lib.c | MY_STAT *my_stat(const char *path, MY_STAT *stat_area, myf my_flags)
{
int m_used;
DBUG_ENTER("my_stat");
DBUG_PRINT("my", ("path: '%s' stat_area: %p MyFlags: %lu", path,
stat_area, my_flags));
if ((m_used= (stat_area == NULL)))
if (!(stat_area= (MY_STAT *) my_malloc(key_memory_MY_STAT, sizeof(MY_STAT),
my_flags)))
goto error;
#ifndef _WIN32
if (!stat((char *) path, (struct stat *) stat_area))
{
MSAN_STAT_WORKAROUND(stat_area);
DBUG_RETURN(stat_area);
}
#else
if (!my_win_stat(path, stat_area))
DBUG_RETURN(stat_area);
#endif
DBUG_PRINT("error",("Got errno: %d from stat", errno));
my_errno= errno;
if (m_used) /* Free if new area */
my_free(stat_area);
error:
if (my_flags & (MY_FAE+MY_WME))
{
my_error(EE_STAT, MYF(ME_BELL), path, my_errno);
DBUG_RETURN((MY_STAT *) NULL);
}
DBUG_RETURN((MY_STAT *) NULL);
} | O3 | c | my_stat:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq %rsi, %r14
testq %rsi, %rsi
jne 0x4bd34
leaq 0x385a9b(%rip), %rax # 0x3d17b8
movl (%rax), %edi
movl $0x90, %esi
movq %r15, %rdx
callq 0x45319
movq %rax, %r14
testq %rax, %rax
je 0x4bd60
movq %rbx, %rdi
movq %r14, %rsi
callq 0x26600
testl %eax, %eax
je 0x4bd89
callq 0x26060
movl (%rax), %r13d
callq 0x462ea
movl %r13d, (%rax)
testq %r12, %r12
jne 0x4bd60
movq %r14, %rdi
callq 0x45546
testb $0x18, %r15b
je 0x4bd86
callq 0x462ea
movl (%rax), %ecx
xorl %r14d, %r14d
movl $0x4, %esi
movl $0xd, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x4b493
jmp 0x4bd89
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_stat:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rdx
mov r12, rsi
mov rbx, rdi
mov r14, rsi
test rsi, rsi
jnz short loc_4BD34
lea rax, key_memory_MY_STAT
mov edi, [rax]
mov esi, 90h
mov rdx, r15
call my_malloc
mov r14, rax
test rax, rax
jz short loc_4BD60
loc_4BD34:
mov rdi, rbx
mov rsi, r14
call _stat64
test eax, eax
jz short loc_4BD89
call ___errno_location
mov r13d, [rax]
call _my_thread_var
mov [rax], r13d
test r12, r12
jnz short loc_4BD60
mov rdi, r14
call my_free
loc_4BD60:
test r15b, 18h
jz short loc_4BD86
call _my_thread_var
mov ecx, [rax]
xor r14d, r14d
mov esi, 4
mov edi, 0Dh
mov rdx, rbx
xor eax, eax
call my_error
jmp short loc_4BD89
loc_4BD86:
xor r14d, r14d
loc_4BD89:
mov rax, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_stat(long long a1, long long a2, char a3)
{
long long v4; // r14
int v5; // r13d
unsigned int *v6; // rax
v4 = a2;
if ( a2 || (v4 = my_malloc(key_memory_MY_STAT, 0x90uLL, a3)) != 0 )
{
if ( !(unsigned int)stat64(a1, v4) )
return v4;
v5 = *(_DWORD *)__errno_location(a1);
*(_DWORD *)my_thread_var() = v5;
if ( !a2 )
my_free(v4);
}
if ( (a3 & 0x18) == 0 )
return 0LL;
v6 = (unsigned int *)my_thread_var();
v4 = 0LL;
my_error(0xDu, 4, a1, *v6);
return v4;
}
| my_stat:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
MOV R14,RSI
TEST RSI,RSI
JNZ 0x0014bd34
LEA RAX,[0x4d17b8]
MOV EDI,dword ptr [RAX]
MOV ESI,0x90
MOV RDX,R15
CALL 0x00145319
MOV R14,RAX
TEST RAX,RAX
JZ 0x0014bd60
LAB_0014bd34:
MOV RDI,RBX
MOV RSI,R14
CALL 0x00126600
TEST EAX,EAX
JZ 0x0014bd89
CALL 0x00126060
MOV R13D,dword ptr [RAX]
CALL 0x001462ea
MOV dword ptr [RAX],R13D
TEST R12,R12
JNZ 0x0014bd60
MOV RDI,R14
CALL 0x00145546
LAB_0014bd60:
TEST R15B,0x18
JZ 0x0014bd86
CALL 0x001462ea
MOV ECX,dword ptr [RAX]
XOR R14D,R14D
MOV ESI,0x4
MOV EDI,0xd
MOV RDX,RBX
XOR EAX,EAX
CALL 0x0014b493
JMP 0x0014bd89
LAB_0014bd86:
XOR R14D,R14D
LAB_0014bd89:
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
stat64 * my_stat(char *param_1,stat64 *param_2,ulong param_3)
{
int iVar1;
stat64 *__buf;
int *piVar2;
int4 *puVar3;
__buf = param_2;
if ((param_2 != (stat64 *)0x0) ||
(__buf = (stat64 *)my_malloc(key_memory_MY_STAT,0x90,param_3), __buf != (stat64 *)0x0)) {
iVar1 = stat64(param_1,__buf);
if (iVar1 == 0) {
return __buf;
}
piVar2 = __errno_location();
iVar1 = *piVar2;
piVar2 = (int *)_my_thread_var();
*piVar2 = iVar1;
if (param_2 == (stat64 *)0x0) {
my_free(__buf);
}
}
if ((param_3 & 0x18) != 0) {
puVar3 = (int4 *)_my_thread_var();
my_error(0xd,4,param_1,*puVar3);
}
return (stat64 *)0x0;
}
| |
27,313 | inline_mysql_cond_destroy | eloqsql/include/mysql/psi/mysql_thread.h | static inline int inline_mysql_cond_destroy(
mysql_cond_t *that)
{
#ifdef HAVE_PSI_COND_INTERFACE
if (psi_likely(that->m_psi != NULL))
{
PSI_COND_CALL(destroy_cond)(that->m_psi);
that->m_psi= NULL;
}
#endif
return pthread_cond_destroy(&that->m_cond);
} | O0 | c | inline_mysql_cond_destroy:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x30(%rax)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x5e134
leaq 0x261fa1(%rip), %rax # 0x2c00b8
movq (%rax), %rax
movq 0x68(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rdi
callq *%rax
movq -0x8(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x8(%rbp), %rdi
callq 0x2a280
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| inline_mysql_cond_destroy_2:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
cmp qword ptr [rax+30h], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_5E134
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+68h]
mov rcx, [rbp+var_8]
mov rdi, [rcx+30h]
call rax
mov rax, [rbp+var_8]
mov qword ptr [rax+30h], 0
loc_5E134:
mov rdi, [rbp+var_8]
call _pthread_cond_destroy
add rsp, 10h
pop rbp
retn
| long long inline_mysql_cond_destroy_2(long long a1)
{
if ( *(_QWORD *)(a1 + 48) )
{
((void ( *)(_QWORD))PSI_server[13])(*(_QWORD *)(a1 + 48));
*(_QWORD *)(a1 + 48) = 0LL;
}
return pthread_cond_destroy(a1);
}
| inline_mysql_cond_destroy:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x30],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0015e134
LEA RAX,[0x3c00b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x68]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x30]
CALL RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x30],0x0
LAB_0015e134:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0012a280
ADD RSP,0x10
POP RBP
RET
|
void inline_mysql_cond_destroy(pthread_cond_t *param_1)
{
if (param_1[1].__align != 0) {
(**(code **)(PSI_server + 0x68))(param_1[1].__align);
param_1[1].__align = 0;
}
pthread_cond_destroy(param_1);
return;
}
| |
27,314 | psi_cond_timedwait | eloqsql/mysys/my_thr_init.c | ATTRIBUTE_COLD int psi_cond_timedwait(mysql_cond_t *that, mysql_mutex_t *mutex,
const struct timespec *abstime,
const char *file, uint line)
{
PSI_cond_locker_state state;
PSI_cond_locker *locker= PSI_COND_CALL(start_cond_wait)
(&state, that->m_psi, mutex->m_psi, PSI_COND_TIMEDWAIT, file, line);
int result= my_cond_timedwait(&that->m_cond, &mutex->m_mutex, abstime);
if (psi_likely(locker))
PSI_COND_CALL(end_cond_wait)(locker, result);
return result;
} | O3 | c | psi_cond_timedwait:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r8d, %r9d
movq %rcx, %r8
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0x3570f9(%rip), %r13 # 0x386010
movq (%r13), %rax
movq 0x30(%rdi), %rsi
movq 0x40(%r15), %rdx
leaq -0x60(%rbp), %rdi
pushq $0x1
popq %rcx
callq *0x1c0(%rax)
movq %rax, %rbx
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x29660
movl %eax, %r14d
testq %rbx, %rbx
jne 0x2ef5b
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r13), %rax
movq %rbx, %rdi
movl %r14d, %esi
callq *0x1c8(%rax)
jmp 0x2ef49
| psi_cond_timedwait:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r9d, r8d
mov r8, rcx
mov r14, rdx
mov r15, rsi
mov r12, rdi
lea r13, PSI_server
mov rax, [r13+0]
mov rsi, [rdi+30h]
mov rdx, [r15+40h]
lea rdi, [rbp+var_60]
push 1
pop rcx
call qword ptr [rax+1C0h]
mov rbx, rax
mov rdi, r12
mov rsi, r15
mov rdx, r14
call _pthread_cond_timedwait
mov r14d, eax
test rbx, rbx
jnz short loc_2EF5B
loc_2EF49:
mov eax, r14d
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2EF5B:
mov rax, [r13+0]
mov rdi, rbx
mov esi, r14d
call qword ptr [rax+1C8h]
jmp short loc_2EF49
| long long psi_cond_timedwait(long long a1, long long a2, long long a3, long long a4, unsigned int a5)
{
long long v6; // rbx
unsigned int v7; // r14d
_BYTE v9[96]; // [rsp+0h] [rbp-60h] BYREF
v6 = ((long long ( *)(_BYTE *, _QWORD, _QWORD, long long, long long, _QWORD))PSI_server[56])(
v9,
*(_QWORD *)(a1 + 48),
*(_QWORD *)(a2 + 64),
1LL,
a4,
a5);
v7 = pthread_cond_timedwait(a1, a2, a3);
if ( v6 )
((void ( *)(long long, _QWORD))PSI_server[57])(v6, v7);
return v7;
}
| psi_cond_timedwait:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R9D,R8D
MOV R8,RCX
MOV R14,RDX
MOV R15,RSI
MOV R12,RDI
LEA R13,[0x486010]
MOV RAX,qword ptr [R13]
MOV RSI,qword ptr [RDI + 0x30]
MOV RDX,qword ptr [R15 + 0x40]
LEA RDI,[RBP + -0x60]
PUSH 0x1
POP RCX
CALL qword ptr [RAX + 0x1c0]
MOV RBX,RAX
MOV RDI,R12
MOV RSI,R15
MOV RDX,R14
CALL 0x00129660
MOV R14D,EAX
TEST RBX,RBX
JNZ 0x0012ef5b
LAB_0012ef49:
MOV EAX,R14D
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012ef5b:
MOV RAX,qword ptr [R13]
MOV RDI,RBX
MOV ESI,R14D
CALL qword ptr [RAX + 0x1c8]
JMP 0x0012ef49
|
int psi_cond_timedwait(pthread_cond_t *param_1,pthread_mutex_t *param_2,timespec *param_3,
int8 param_4,int4 param_5)
{
int iVar1;
long lVar2;
int1 local_68 [56];
lVar2 = (**(code **)(PSI_server + 0x1c0))
(local_68,param_1[1].__align,*(int8 *)((long)param_2 + 0x40),1,param_4,
param_5);
iVar1 = pthread_cond_timedwait(param_1,param_2,param_3);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x1c8))(lVar2,iVar1);
}
return iVar1;
}
| |
27,315 | my_strcasecmp_utf8mb4 | eloqsql/strings/ctype-utf8.c | static int
my_strcasecmp_utf8mb4(CHARSET_INFO *cs, const char *s, const char *t)
{
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
while (s[0] && t[0])
{
my_wc_t s_wc,t_wc;
if ((uchar) s[0] < 128)
{
/*
s[0] is between 0 and 127.
It represents a single byte character.
Convert it into weight according to collation.
*/
s_wc= my_unicase_default_page00[(uchar) s[0]].tolower;
s++;
}
else
{
int res= my_mb_wc_utf8mb4_no_range(cs, &s_wc, (const uchar*) s);
/*
In the case of wrong multibyte sequence we will
call strcmp() for byte-to-byte comparison.
*/
if (res <= 0)
return strcmp(s, t);
s+= res;
my_tolower_utf8mb4(uni_plane, &s_wc);
}
/* Do the same for the second string */
if ((uchar) t[0] < 128)
{
/* Convert single byte character into weight */
t_wc= my_unicase_default_page00[(uchar) t[0]].tolower;
t++;
}
else
{
int res= my_mb_wc_utf8mb4_no_range(cs, &t_wc, (const uchar*) t);
if (res <= 0)
return strcmp(s, t);
t+= res;
my_tolower_utf8mb4(uni_plane, &t_wc);
}
/* Now we have two weights, let's compare them */
if ( s_wc != t_wc )
return ((int) s_wc) - ((int) t_wc);
}
return ((int) (uchar) s[0]) - ((int) (uchar) t[0]);
} | O3 | c | my_strcasecmp_utf8mb4:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movb (%rsi), %al
testb %al, %al
je 0x57ca1
movq %rsi, %r14
movq 0x78(%rdi), %r15
leaq 0x2f1b04(%rip), %r12 # 0x3496d0
cmpb $0x0, (%rbx)
je 0x57c9b
testb %al, %al
js 0x57bee
movzbl %al, %eax
leaq (%rax,%rax,2), %rax
movl 0x4(%r12,%rax,4), %r13d
movq %r13, -0x30(%rbp)
incq %r14
jmp 0x57c35
leaq -0x30(%rbp), %rdi
movq %r14, %rsi
callq 0x5775b
testl %eax, %eax
je 0x57cc1
movl %eax, %eax
addq %rax, %r14
movq -0x30(%rbp), %r13
cmpq (%r15), %r13
ja 0x57c35
movq 0x8(%r15), %rax
movq %r13, %rcx
shrq $0x8, %rcx
movq (%rax,%rcx,8), %rax
testq %rax, %rax
je 0x57c35
movzbl %r13b, %ecx
leaq (%rcx,%rcx,2), %rcx
movl 0x4(%rax,%rcx,4), %r13d
movq %r13, -0x30(%rbp)
movsbq (%rbx), %rax
testq %rax, %rax
js 0x57c4c
leaq (%rax,%rax,2), %rax
movl 0x4(%r12,%rax,4), %eax
incq %rbx
jmp 0x57c89
leaq -0x38(%rbp), %rdi
movq %rbx, %rsi
callq 0x5775b
testl %eax, %eax
je 0x57cc1
movl %eax, %eax
addq %rax, %rbx
movq -0x38(%rbp), %rax
cmpq (%r15), %rax
ja 0x57c89
movq 0x8(%r15), %rcx
movq %rax, %rdx
shrq $0x8, %rdx
movq (%rcx,%rdx,8), %rcx
testq %rcx, %rcx
je 0x57c89
movzbl %al, %eax
leaq (%rax,%rax,2), %rax
movl 0x4(%rcx,%rax,4), %eax
cmpq %rax, %r13
jne 0x57cbc
movb (%r14), %al
testb %al, %al
jne 0x57bcc
xorl %eax, %eax
movzbl %al, %r13d
jmp 0x57ca4
xorl %r13d, %r13d
movzbl (%rbx), %eax
subl %eax, %r13d
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
subl %eax, %r13d
jmp 0x57caa
movq %r14, %rdi
movq %rbx, %rsi
callq 0x24500
movl %eax, %r13d
jmp 0x57caa
| my_strcasecmp_utf8mb4:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdx
mov al, [rsi]
test al, al
jz loc_57CA1
mov r14, rsi
mov r15, [rdi+78h]
lea r12, my_unicase_default_page00
loc_57BCC:
cmp byte ptr [rbx], 0
jz loc_57C9B
test al, al
js short loc_57BEE
movzx eax, al
lea rax, [rax+rax*2]
mov r13d, [r12+rax*4+4]
mov [rbp+var_30], r13
inc r14
jmp short loc_57C35
loc_57BEE:
lea rdi, [rbp+var_30]
mov rsi, r14
call my_mb_wc_utf8mb4_no_range
test eax, eax
jz loc_57CC1
mov eax, eax
add r14, rax
mov r13, [rbp+var_30]
cmp r13, [r15]
ja short loc_57C35
mov rax, [r15+8]
mov rcx, r13
shr rcx, 8
mov rax, [rax+rcx*8]
test rax, rax
jz short loc_57C35
movzx ecx, r13b
lea rcx, [rcx+rcx*2]
mov r13d, [rax+rcx*4+4]
mov [rbp+var_30], r13
loc_57C35:
movsx rax, byte ptr [rbx]
test rax, rax
js short loc_57C4C
lea rax, [rax+rax*2]
mov eax, [r12+rax*4+4]
inc rbx
jmp short loc_57C89
loc_57C4C:
lea rdi, [rbp+var_38]
mov rsi, rbx
call my_mb_wc_utf8mb4_no_range
test eax, eax
jz short loc_57CC1
mov eax, eax
add rbx, rax
mov rax, [rbp+var_38]
cmp rax, [r15]
ja short loc_57C89
mov rcx, [r15+8]
mov rdx, rax
shr rdx, 8
mov rcx, [rcx+rdx*8]
test rcx, rcx
jz short loc_57C89
movzx eax, al
lea rax, [rax+rax*2]
mov eax, [rcx+rax*4+4]
loc_57C89:
cmp r13, rax
jnz short loc_57CBC
mov al, [r14]
test al, al
jnz loc_57BCC
xor eax, eax
loc_57C9B:
movzx r13d, al
jmp short loc_57CA4
loc_57CA1:
xor r13d, r13d
loc_57CA4:
movzx eax, byte ptr [rbx]
sub r13d, eax
loc_57CAA:
mov eax, r13d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_57CBC:
sub r13d, eax
jmp short loc_57CAA
loc_57CC1:
mov rdi, r14
mov rsi, rbx
call _strcmp
mov r13d, eax
jmp short loc_57CAA
| long long my_strcasecmp_utf8mb4(long long a1, unsigned __int8 *a2, unsigned __int8 *a3)
{
unsigned __int8 v4; // al
unsigned __int8 *v5; // r14
_QWORD *v6; // r15
unsigned long long v7; // r13
unsigned int v8; // eax
long long v9; // rax
long long v10; // rax
unsigned long long v11; // rax
unsigned int v12; // eax
long long v13; // rcx
int v14; // r13d
unsigned long long v17; // [rsp+8h] [rbp-38h] BYREF
unsigned long long v18[6]; // [rsp+10h] [rbp-30h] BYREF
v4 = *a2;
if ( *a2 )
{
v5 = a2;
v6 = *(_QWORD **)(a1 + 120);
while ( 1 )
{
if ( !*a3 )
goto LABEL_19;
if ( (v4 & 0x80u) != 0 )
{
v8 = my_mb_wc_utf8mb4_no_range(v18, v5);
if ( !v8 )
return (unsigned int)strcmp(v5, a3);
v5 += v8;
v7 = v18[0];
if ( v18[0] <= *v6 )
{
v9 = *(_QWORD *)(v6[1] + 8 * (v18[0] >> 8));
if ( v9 )
{
v7 = *(unsigned int *)(v9 + 12LL * LOBYTE(v18[0]) + 4);
v18[0] = v7;
}
}
}
else
{
v7 = (unsigned int)my_unicase_default_page00[3 * v4 + 1];
v18[0] = v7;
++v5;
}
v10 = (char)*a3;
if ( v10 < 0 )
{
v12 = my_mb_wc_utf8mb4_no_range(&v17, a3);
if ( !v12 )
return (unsigned int)strcmp(v5, a3);
a3 += v12;
v11 = v17;
if ( v17 <= *v6 )
{
v13 = *(_QWORD *)(v6[1] + 8 * (v17 >> 8));
if ( v13 )
v11 = *(unsigned int *)(v13 + 12LL * (unsigned __int8)v17 + 4);
}
}
else
{
v11 = (unsigned int)my_unicase_default_page00[3 * v10 + 1];
++a3;
}
if ( v7 != v11 )
return (unsigned int)(v7 - v11);
v4 = *v5;
if ( !*v5 )
{
v4 = 0;
LABEL_19:
v14 = v4;
return (unsigned int)(v14 - *a3);
}
}
}
v14 = 0;
return (unsigned int)(v14 - *a3);
}
| my_strcasecmp_utf8mb4:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDX
MOV AL,byte ptr [RSI]
TEST AL,AL
JZ 0x00157ca1
MOV R14,RSI
MOV R15,qword ptr [RDI + 0x78]
LEA R12,[0x4496d0]
LAB_00157bcc:
CMP byte ptr [RBX],0x0
JZ 0x00157c9b
TEST AL,AL
JS 0x00157bee
MOVZX EAX,AL
LEA RAX,[RAX + RAX*0x2]
MOV R13D,dword ptr [R12 + RAX*0x4 + 0x4]
MOV qword ptr [RBP + -0x30],R13
INC R14
JMP 0x00157c35
LAB_00157bee:
LEA RDI,[RBP + -0x30]
MOV RSI,R14
CALL 0x0015775b
TEST EAX,EAX
JZ 0x00157cc1
MOV EAX,EAX
ADD R14,RAX
MOV R13,qword ptr [RBP + -0x30]
CMP R13,qword ptr [R15]
JA 0x00157c35
MOV RAX,qword ptr [R15 + 0x8]
MOV RCX,R13
SHR RCX,0x8
MOV RAX,qword ptr [RAX + RCX*0x8]
TEST RAX,RAX
JZ 0x00157c35
MOVZX ECX,R13B
LEA RCX,[RCX + RCX*0x2]
MOV R13D,dword ptr [RAX + RCX*0x4 + 0x4]
MOV qword ptr [RBP + -0x30],R13
LAB_00157c35:
MOVSX RAX,byte ptr [RBX]
TEST RAX,RAX
JS 0x00157c4c
LEA RAX,[RAX + RAX*0x2]
MOV EAX,dword ptr [R12 + RAX*0x4 + 0x4]
INC RBX
JMP 0x00157c89
LAB_00157c4c:
LEA RDI,[RBP + -0x38]
MOV RSI,RBX
CALL 0x0015775b
TEST EAX,EAX
JZ 0x00157cc1
MOV EAX,EAX
ADD RBX,RAX
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [R15]
JA 0x00157c89
MOV RCX,qword ptr [R15 + 0x8]
MOV RDX,RAX
SHR RDX,0x8
MOV RCX,qword ptr [RCX + RDX*0x8]
TEST RCX,RCX
JZ 0x00157c89
MOVZX EAX,AL
LEA RAX,[RAX + RAX*0x2]
MOV EAX,dword ptr [RCX + RAX*0x4 + 0x4]
LAB_00157c89:
CMP R13,RAX
JNZ 0x00157cbc
MOV AL,byte ptr [R14]
TEST AL,AL
JNZ 0x00157bcc
XOR EAX,EAX
LAB_00157c9b:
MOVZX R13D,AL
JMP 0x00157ca4
LAB_00157ca1:
XOR R13D,R13D
LAB_00157ca4:
MOVZX EAX,byte ptr [RBX]
SUB R13D,EAX
LAB_00157caa:
MOV EAX,R13D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00157cbc:
SUB R13D,EAX
JMP 0x00157caa
LAB_00157cc1:
MOV RDI,R14
MOV RSI,RBX
CALL 0x00124500
MOV R13D,EAX
JMP 0x00157caa
|
int my_strcasecmp_utf8mb4(long param_1,byte *param_2,byte *param_3)
{
ulong *puVar1;
long lVar2;
ulong uVar3;
byte bVar4;
uint uVar5;
int iVar6;
ulong uVar7;
ulong local_40;
ulong local_38;
bVar4 = *param_2;
if (bVar4 == 0) {
uVar5 = 0;
}
else {
puVar1 = *(ulong **)(param_1 + 0x78);
do {
if (*param_3 == 0) goto LAB_00157c9b;
if ((char)bVar4 < '\0') {
uVar5 = my_mb_wc_utf8mb4_no_range(&local_38,param_2);
if (uVar5 == 0) goto LAB_00157cc1;
param_2 = param_2 + uVar5;
if ((local_38 <= *puVar1) &&
(lVar2 = *(long *)(puVar1[1] + (local_38 >> 8) * 8), lVar2 != 0)) {
local_38 = (ulong)*(uint *)(lVar2 + 4 + (local_38 & 0xff) * 0xc);
}
}
else {
local_38 = (ulong)*(uint *)(my_unicase_default_page00 + (ulong)bVar4 * 0xc + 4);
param_2 = param_2 + 1;
}
uVar3 = local_38;
bVar4 = *param_3;
if ((long)(char)bVar4 < 0) {
uVar5 = my_mb_wc_utf8mb4_no_range(&local_40,param_3);
if (uVar5 == 0) {
LAB_00157cc1:
iVar6 = strcmp((char *)param_2,(char *)param_3);
return iVar6;
}
param_3 = param_3 + uVar5;
uVar7 = local_40;
if ((local_40 <= *puVar1) &&
(lVar2 = *(long *)(puVar1[1] + (local_40 >> 8) * 8), lVar2 != 0)) {
uVar7 = (ulong)*(uint *)(lVar2 + 4 + (local_40 & 0xff) * 0xc);
}
}
else {
param_3 = param_3 + 1;
uVar7 = (ulong)*(uint *)(my_unicase_default_page00 + (long)(char)bVar4 * 0xc + 4);
}
if (uVar3 != uVar7) {
return (int)uVar3 - (int)uVar7;
}
bVar4 = *param_2;
} while (bVar4 != 0);
bVar4 = 0;
LAB_00157c9b:
uVar5 = (uint)bVar4;
}
return uVar5 - *param_3;
}
| |
27,316 | 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 0x74d70
movq -0x10(%rbp), %rax
movl 0x61c(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x74ccd
movq -0x10(%rbp), %rax
movq 0x4b8(%rax), %rax
cmpq -0x20(%rbp), %rax
ja 0x74ccd
movq -0x10(%rbp), %rdi
addq $0x4b8, %rdi # imm = 0x4B8
movl $0x1, %esi
callq 0xe1f60
cmpl $0x0, %eax
je 0x74ccd
jmp 0x74cbe
callq 0xf7440
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x74d97
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 0x74d6e
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x7b8(%rax)
jne 0x74d2f
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x36ff0
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x74d52
jmp 0x74d3a
jmp 0x74d3c
jmp 0x74d3e
callq 0xf7440
movl $0x86, (%rax)
movl $0x86, -0x4(%rbp)
jmp 0x74d97
movq -0x10(%rbp), %rax
movl 0x624(%rax), %ecx
orl $0x2, %ecx
movl %ecx, 0x624(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x74d97
jmp 0x74d70
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x7b8(%rax)
jne 0x74d8b
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x36ff0
jmp 0x74d8d
callq 0xf7440
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_74D70
mov rax, [rbp+var_10]
mov eax, [rax+61Ch]
and eax, 10h
cmp eax, 0
jz short loc_74CCD
mov rax, [rbp+var_10]
mov rax, [rax+4B8h]
cmp rax, [rbp+var_20]
ja short loc_74CCD
mov rdi, [rbp+var_10]
add rdi, 4B8h
mov esi, 1
call my_b_flush_io_cache
cmp eax, 0
jz short loc_74CCD
jmp short $+2
loc_74CBE:
call _my_thread_var
mov eax, [rax]
mov [rbp+var_4], eax
jmp loc_74D97
loc_74CCD:
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_74D6E
mov rax, [rbp+var_10]
mov rax, [rax]
cmp dword ptr [rax+7B8h], 0
jnz short loc_74D2F
mov rdi, [rbp+var_10]
xor esi, esi
call _ma_writeinfo
loc_74D2F:
mov rax, [rbp+var_18]
cmp byte ptr [rax], 0
jnz short loc_74D52
jmp short $+2
loc_74D3A:
jmp short $+2
loc_74D3C:
jmp short $+2
loc_74D3E:
call _my_thread_var
mov dword ptr [rax], 86h
mov [rbp+var_4], 86h
jmp short loc_74D97
loc_74D52:
mov rax, [rbp+var_10]
mov ecx, [rax+624h]
or ecx, 2
mov [rax+624h], ecx
mov [rbp+var_4], 0
jmp short loc_74D97
loc_74D6E:
jmp short $+2
loc_74D70:
mov rax, [rbp+var_10]
mov rax, [rax]
cmp dword ptr [rax+7B8h], 0
jnz short loc_74D8B
mov rdi, [rbp+var_10]
xor esi, esi
call _ma_writeinfo
loc_74D8B:
jmp short $+2
loc_74D8D:
call _my_thread_var
mov eax, [rax]
mov [rbp+var_4], eax
loc_74D97:
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 0x00174d70
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x61c]
AND EAX,0x10
CMP EAX,0x0
JZ 0x00174ccd
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x4b8]
CMP RAX,qword ptr [RBP + -0x20]
JA 0x00174ccd
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x4b8
MOV ESI,0x1
CALL 0x001e1f60
CMP EAX,0x0
JZ 0x00174ccd
JMP 0x00174cbe
LAB_00174cbe:
CALL 0x001f7440
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00174d97
LAB_00174ccd:
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 0x00174d6e
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX + 0x7b8],0x0
JNZ 0x00174d2f
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
CALL 0x00136ff0
LAB_00174d2f:
MOV RAX,qword ptr [RBP + -0x18]
CMP byte ptr [RAX],0x0
JNZ 0x00174d52
JMP 0x00174d3a
LAB_00174d3a:
JMP 0x00174d3c
LAB_00174d3c:
JMP 0x00174d3e
LAB_00174d3e:
CALL 0x001f7440
MOV dword ptr [RAX],0x86
MOV dword ptr [RBP + -0x4],0x86
JMP 0x00174d97
LAB_00174d52:
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 0x00174d97
LAB_00174d6e:
JMP 0x00174d70
LAB_00174d70:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX + 0x7b8],0x0
JNZ 0x00174d8b
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
CALL 0x00136ff0
LAB_00174d8b:
JMP 0x00174d8d
LAB_00174d8d:
CALL 0x001f7440
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x4],EAX
LAB_00174d97:
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;
}
| |
27,317 | 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);
} | O3 | c | ma_read_static_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $-0x1, %rdx
je 0x5c7b3
movq %rdx, %r15
movq %rsi, %r14
testb $0x10, 0x61c(%rbx)
je 0x5c786
cmpq %r15, 0x4b8(%rbx)
ja 0x5c786
leaq 0x4b8(%rbx), %rdi
movl $0x1, %esi
callq 0x9648d
testl %eax, %eax
jne 0x5c7c9
movl $0x1, 0x598(%rbx)
movq (%rbx), %rax
movq 0x398(%rax), %rdx
movl $0x4, %r8d
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rcx
callq *0x6e0(%rax)
testl %eax, %eax
je 0x5c7db
movq (%rbx), %rax
cmpl $0x0, 0x7b8(%rax)
jne 0x5c7c9
movq %rbx, %rdi
xorl %esi, %esi
callq 0x38d12
callq 0xa2a4e
movl (%rax), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rax
cmpl $0x0, 0x7b8(%rax)
jne 0x5c7f1
movq %rbx, %rdi
xorl %esi, %esi
callq 0x38d12
cmpb $0x0, (%r14)
je 0x5c802
orb $0x2, 0x624(%rbx)
xorl %eax, %eax
jmp 0x5c7d0
callq 0xa2a4e
movl $0x86, (%rax)
movl $0x86, %eax
jmp 0x5c7d0
| _ma_read_static_record:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
cmp rdx, 0FFFFFFFFFFFFFFFFh
jz short loc_5C7B3
mov r15, rdx
mov r14, rsi
test byte ptr [rbx+61Ch], 10h
jz short loc_5C786
cmp [rbx+4B8h], r15
ja short loc_5C786
lea rdi, [rbx+4B8h]
mov esi, 1
call my_b_flush_io_cache
test eax, eax
jnz short loc_5C7C9
loc_5C786:
mov dword ptr [rbx+598h], 1
mov rax, [rbx]
mov rdx, [rax+398h]
mov r8d, 4
mov rdi, rbx
mov rsi, r14
mov rcx, r15
call qword ptr [rax+6E0h]
test eax, eax
jz short loc_5C7DB
loc_5C7B3:
mov rax, [rbx]
cmp dword ptr [rax+7B8h], 0
jnz short loc_5C7C9
mov rdi, rbx
xor esi, esi
call _ma_writeinfo
loc_5C7C9:
call _my_thread_var
mov eax, [rax]
loc_5C7D0:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_5C7DB:
mov rax, [rbx]
cmp dword ptr [rax+7B8h], 0
jnz short loc_5C7F1
mov rdi, rbx
xor esi, esi
call _ma_writeinfo
loc_5C7F1:
cmp byte ptr [r14], 0
jz short loc_5C802
or byte ptr [rbx+624h], 2
xor eax, eax
jmp short loc_5C7D0
loc_5C802:
call _my_thread_var
mov dword ptr [rax], 86h
mov eax, 86h
jmp short loc_5C7D0
| long long ma_read_static_record(long long a1, const char *a2, unsigned long long a3, long long a4, long long a5)
{
long long v5; // rbx
char *v7; // r14
v5 = a1;
if ( a3 == -1LL )
goto LABEL_17;
v7 = (char *)a2;
if ( (*(_BYTE *)(a1 + 1564) & 0x10) != 0 && *(_QWORD *)(a1 + 1208) <= a3 )
{
a1 += 1208LL;
a2 = (_BYTE *)(&dword_0 + 1);
if ( (unsigned int)my_b_flush_io_cache(a1, 1LL) )
return *(unsigned int *)my_thread_var(a1, a2);
}
*(_DWORD *)(v5 + 1432) = 1;
a1 = v5;
a2 = v7;
if ( (*(unsigned int ( **)(long long, char *, _QWORD, unsigned long long, long long))(*(_QWORD *)v5 + 1760LL))(
v5,
v7,
*(_QWORD *)(*(_QWORD *)v5 + 920LL),
a3,
4LL) )
{
LABEL_17:
if ( !*(_DWORD *)(*(_QWORD *)v5 + 1976LL) )
{
a1 = v5;
a2 = 0LL;
ma_writeinfo((long long *)v5, 0LL, a3, a4, a5);
}
return *(unsigned int *)my_thread_var(a1, a2);
}
if ( !*(_DWORD *)(*(_QWORD *)v5 + 1976LL) )
{
a1 = v5;
a2 = 0LL;
ma_writeinfo((long long *)v5, 0LL, a3, a4, a5);
}
if ( *v7 )
{
*(_BYTE *)(v5 + 1572) |= 2u;
return 0LL;
}
else
{
*(_DWORD *)my_thread_var(a1, a2) = 134;
return 134LL;
}
}
| _ma_read_static_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
CMP RDX,-0x1
JZ 0x0015c7b3
MOV R15,RDX
MOV R14,RSI
TEST byte ptr [RBX + 0x61c],0x10
JZ 0x0015c786
CMP qword ptr [RBX + 0x4b8],R15
JA 0x0015c786
LEA RDI,[RBX + 0x4b8]
MOV ESI,0x1
CALL 0x0019648d
TEST EAX,EAX
JNZ 0x0015c7c9
LAB_0015c786:
MOV dword ptr [RBX + 0x598],0x1
MOV RAX,qword ptr [RBX]
MOV RDX,qword ptr [RAX + 0x398]
MOV R8D,0x4
MOV RDI,RBX
MOV RSI,R14
MOV RCX,R15
CALL qword ptr [RAX + 0x6e0]
TEST EAX,EAX
JZ 0x0015c7db
LAB_0015c7b3:
MOV RAX,qword ptr [RBX]
CMP dword ptr [RAX + 0x7b8],0x0
JNZ 0x0015c7c9
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00138d12
LAB_0015c7c9:
CALL 0x001a2a4e
MOV EAX,dword ptr [RAX]
LAB_0015c7d0:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0015c7db:
MOV RAX,qword ptr [RBX]
CMP dword ptr [RAX + 0x7b8],0x0
JNZ 0x0015c7f1
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00138d12
LAB_0015c7f1:
CMP byte ptr [R14],0x0
JZ 0x0015c802
OR byte ptr [RBX + 0x624],0x2
XOR EAX,EAX
JMP 0x0015c7d0
LAB_0015c802:
CALL 0x001a2a4e
MOV dword ptr [RAX],0x86
MOV EAX,0x86
JMP 0x0015c7d0
|
int4 _ma_read_static_record(long *param_1,char *param_2,ulong param_3)
{
int iVar1;
int4 *puVar2;
if (param_3 != 0xffffffffffffffff) {
if ((((*(byte *)((long)param_1 + 0x61c) & 0x10) != 0) && ((ulong)param_1[0x97] <= param_3)) &&
(iVar1 = my_b_flush_io_cache(param_1 + 0x97,1), iVar1 != 0)) goto LAB_0015c7c9;
*(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') {
*(byte *)((long)param_1 + 0x624) = *(byte *)((long)param_1 + 0x624) | 2;
return 0;
}
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x86;
return 0x86;
}
}
if (*(int *)(*param_1 + 0x7b8) == 0) {
_ma_writeinfo(param_1,0);
}
LAB_0015c7c9:
puVar2 = (int4 *)_my_thread_var();
return *puVar2;
}
| |
27,318 | compute_pc2line_info | bluesky950520[P]quickjs/quickjs.c | static void compute_pc2line_info(JSFunctionDef *s)
{
if (s->source_loc_slots) {
int last_line_num = s->line_num;
int last_col_num = s->col_num;
uint32_t last_pc = 0;
int i;
js_dbuf_init(s->ctx, &s->pc2line);
for (i = 0; i < s->source_loc_count; i++) {
uint32_t pc = s->source_loc_slots[i].pc;
int line_num = s->source_loc_slots[i].line_num;
int col_num = s->source_loc_slots[i].col_num;
int diff_pc, diff_line, diff_col;
if (line_num < 0)
continue;
diff_pc = pc - last_pc;
if (diff_pc < 0)
continue;
diff_line = line_num - last_line_num;
diff_col = col_num - last_col_num;
if (diff_line == 0 && diff_col == 0)
continue;
if (diff_line >= PC2LINE_BASE &&
diff_line < PC2LINE_BASE + PC2LINE_RANGE &&
diff_pc <= PC2LINE_DIFF_PC_MAX) {
dbuf_putc(&s->pc2line, (diff_line - PC2LINE_BASE) +
diff_pc * PC2LINE_RANGE + PC2LINE_OP_FIRST);
} else {
/* longer encoding */
dbuf_putc(&s->pc2line, 0);
dbuf_put_leb128(&s->pc2line, diff_pc);
dbuf_put_sleb128(&s->pc2line, diff_line);
}
dbuf_put_sleb128(&s->pc2line, diff_col);
last_pc = pc;
last_line_num = line_num;
last_col_num = col_num;
}
}
} | O0 | c | compute_pc2line_info:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rax
cmpq $0x0, 0x1b8(%rax)
je 0xbd0bb
movq 0x30(%rsp), %rax
movl 0x1d8(%rax), %eax
movl %eax, 0x2c(%rsp)
movq 0x30(%rsp), %rax
movl 0x1dc(%rax), %eax
movl %eax, 0x28(%rsp)
movl $0x0, 0x24(%rsp)
movq 0x30(%rsp), %rax
movq (%rax), %rdi
movq 0x30(%rsp), %rsi
addq $0x1e0, %rsi # imm = 0x1E0
callq 0x4b230
movl $0x0, 0x20(%rsp)
movl 0x20(%rsp), %eax
movq 0x30(%rsp), %rcx
cmpl 0x1c4(%rcx), %eax
jge 0xbd0b9
movq 0x30(%rsp), %rax
movq 0x1b8(%rax), %rax
movslq 0x20(%rsp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, 0x1c(%rsp)
movq 0x30(%rsp), %rax
movq 0x1b8(%rax), %rax
movslq 0x20(%rsp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, 0x18(%rsp)
movq 0x30(%rsp), %rax
movq 0x1b8(%rax), %rax
movslq 0x20(%rsp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, 0x14(%rsp)
cmpl $0x0, 0x18(%rsp)
jge 0xbcfc0
jmp 0xbd0a9
movl 0x1c(%rsp), %eax
subl 0x24(%rsp), %eax
movl %eax, 0x10(%rsp)
cmpl $0x0, 0x10(%rsp)
jge 0xbcfd8
jmp 0xbd0a9
movl 0x18(%rsp), %eax
subl 0x2c(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0x14(%rsp), %eax
subl 0x28(%rsp), %eax
movl %eax, 0x8(%rsp)
cmpl $0x0, 0xc(%rsp)
jne 0xbd003
cmpl $0x0, 0x8(%rsp)
jne 0xbd003
jmp 0xbd0a9
cmpl $-0x1, 0xc(%rsp)
jl 0xbd03f
cmpl $0x4, 0xc(%rsp)
jge 0xbd03f
cmpl $0x32, 0x10(%rsp)
jg 0xbd03f
movq 0x30(%rsp), %rdi
addq $0x1e0, %rdi # imm = 0x1E0
movl 0xc(%rsp), %eax
subl $-0x1, %eax
imull $0x5, 0x10(%rsp), %ecx
addl %ecx, %eax
addl $0x1, %eax
movzbl %al, %esi
callq 0x1e6d0
jmp 0xbd07c
movq 0x30(%rsp), %rdi
addq $0x1e0, %rdi # imm = 0x1E0
xorl %esi, %esi
callq 0x1e6d0
movq 0x30(%rsp), %rdi
addq $0x1e0, %rdi # imm = 0x1E0
movl 0x10(%rsp), %esi
callq 0x793f0
movq 0x30(%rsp), %rdi
addq $0x1e0, %rdi # imm = 0x1E0
movl 0xc(%rsp), %esi
callq 0x793b0
movq 0x30(%rsp), %rdi
addq $0x1e0, %rdi # imm = 0x1E0
movl 0x8(%rsp), %esi
callq 0x793b0
movl 0x1c(%rsp), %eax
movl %eax, 0x24(%rsp)
movl 0x18(%rsp), %eax
movl %eax, 0x2c(%rsp)
movl 0x14(%rsp), %eax
movl %eax, 0x28(%rsp)
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0xbcf43
jmp 0xbd0bb
addq $0x38, %rsp
retq
| compute_pc2line_info:
sub rsp, 38h
mov [rsp+38h+var_8], rdi
mov rax, [rsp+38h+var_8]
cmp qword ptr [rax+1B8h], 0
jz loc_BD0BB
mov rax, [rsp+38h+var_8]
mov eax, [rax+1D8h]
mov [rsp+38h+var_C], eax
mov rax, [rsp+38h+var_8]
mov eax, [rax+1DCh]
mov [rsp+38h+var_10], eax
mov [rsp+38h+var_14], 0
mov rax, [rsp+38h+var_8]
mov rdi, [rax]
mov rsi, [rsp+38h+var_8]
add rsi, 1E0h
call js_dbuf_init
mov [rsp+38h+var_18], 0
loc_BCF43:
mov eax, [rsp+38h+var_18]
mov rcx, [rsp+38h+var_8]
cmp eax, [rcx+1C4h]
jge loc_BD0B9
mov rax, [rsp+38h+var_8]
mov rax, [rax+1B8h]
movsxd rcx, [rsp+38h+var_18]
imul rcx, 0Ch
add rax, rcx
mov eax, [rax]
mov [rsp+38h+var_1C], eax
mov rax, [rsp+38h+var_8]
mov rax, [rax+1B8h]
movsxd rcx, [rsp+38h+var_18]
imul rcx, 0Ch
add rax, rcx
mov eax, [rax+4]
mov [rsp+38h+var_20], eax
mov rax, [rsp+38h+var_8]
mov rax, [rax+1B8h]
movsxd rcx, [rsp+38h+var_18]
imul rcx, 0Ch
add rax, rcx
mov eax, [rax+8]
mov [rsp+38h+var_24], eax
cmp [rsp+38h+var_20], 0
jge short loc_BCFC0
jmp loc_BD0A9
loc_BCFC0:
mov eax, [rsp+38h+var_1C]
sub eax, [rsp+38h+var_14]
mov [rsp+38h+var_28], eax
cmp [rsp+38h+var_28], 0
jge short loc_BCFD8
jmp loc_BD0A9
loc_BCFD8:
mov eax, [rsp+38h+var_20]
sub eax, [rsp+38h+var_C]
mov [rsp+38h+var_2C], eax
mov eax, [rsp+38h+var_24]
sub eax, [rsp+38h+var_10]
mov [rsp+38h+var_30], eax
cmp [rsp+38h+var_2C], 0
jnz short loc_BD003
cmp [rsp+38h+var_30], 0
jnz short loc_BD003
jmp loc_BD0A9
loc_BD003:
cmp [rsp+38h+var_2C], 0FFFFFFFFh
jl short loc_BD03F
cmp [rsp+38h+var_2C], 4
jge short loc_BD03F
cmp [rsp+38h+var_28], 32h ; '2'
jg short loc_BD03F
mov rdi, [rsp+38h+var_8]
add rdi, 1E0h
mov eax, [rsp+38h+var_2C]
sub eax, 0FFFFFFFFh
imul ecx, [rsp+38h+var_28], 5
add eax, ecx
add eax, 1
movzx esi, al
call dbuf_putc
jmp short loc_BD07C
loc_BD03F:
mov rdi, [rsp+38h+var_8]
add rdi, 1E0h
xor esi, esi
call dbuf_putc
mov rdi, [rsp+38h+var_8]
add rdi, 1E0h
mov esi, [rsp+38h+var_28]
call dbuf_put_leb128
mov rdi, [rsp+38h+var_8]
add rdi, 1E0h
mov esi, [rsp+38h+var_2C]
call dbuf_put_sleb128
loc_BD07C:
mov rdi, [rsp+38h+var_8]
add rdi, 1E0h
mov esi, [rsp+38h+var_30]
call dbuf_put_sleb128
mov eax, [rsp+38h+var_1C]
mov [rsp+38h+var_14], eax
mov eax, [rsp+38h+var_20]
mov [rsp+38h+var_C], eax
mov eax, [rsp+38h+var_24]
mov [rsp+38h+var_10], eax
loc_BD0A9:
mov eax, [rsp+38h+var_18]
add eax, 1
mov [rsp+38h+var_18], eax
jmp loc_BCF43
loc_BD0B9:
jmp short $+2
loc_BD0BB:
add rsp, 38h
retn
| long long compute_pc2line_info(long long a1)
{
long long result; // rax
unsigned int v2; // [rsp+8h] [rbp-30h]
signed int v3; // [rsp+Ch] [rbp-2Ch]
signed int v4; // [rsp+10h] [rbp-28h]
long long v5; // [rsp+14h] [rbp-24h]
int v6; // [rsp+1Ch] [rbp-1Ch]
unsigned int i; // [rsp+20h] [rbp-18h]
int v8; // [rsp+24h] [rbp-14h]
long long v9; // [rsp+28h] [rbp-10h]
result = a1;
if ( *(_QWORD *)(a1 + 440) )
{
HIDWORD(v9) = *(_DWORD *)(a1 + 472);
LODWORD(v9) = *(_DWORD *)(a1 + 476);
v8 = 0;
js_dbuf_init(*(_QWORD *)a1, a1 + 480);
for ( i = 0; ; ++i )
{
result = i;
if ( (signed int)i >= *(_DWORD *)(a1 + 452) )
break;
v6 = *(_DWORD *)(12LL * (int)i + *(_QWORD *)(a1 + 440));
HIDWORD(v5) = *(_DWORD *)(12LL * (int)i + *(_QWORD *)(a1 + 440) + 4);
LODWORD(v5) = *(_DWORD *)(12LL * (int)i + *(_QWORD *)(a1 + 440) + 8);
if ( v5 >= 0 )
{
v4 = v6 - v8;
if ( v6 - v8 >= 0 )
{
v3 = HIDWORD(v5) - HIDWORD(v9);
v2 = v5 - v9;
if ( HIDWORD(v5) != HIDWORD(v9) || v2 )
{
if ( v3 < -1 || v3 >= 4 || v4 > 50 )
{
dbuf_putc((_QWORD *)(a1 + 480), 0);
dbuf_put_leb128((_QWORD *)(a1 + 480), v4);
dbuf_put_sleb128(a1 + 480, v3);
}
else
{
dbuf_putc((_QWORD *)(a1 + 480), 5 * v4 + v3 + 1 + 1);
}
dbuf_put_sleb128(a1 + 480, v2);
v8 = v6;
v9 = v5;
}
}
}
}
}
return result;
}
| compute_pc2line_info:
SUB RSP,0x38
MOV qword ptr [RSP + 0x30],RDI
MOV RAX,qword ptr [RSP + 0x30]
CMP qword ptr [RAX + 0x1b8],0x0
JZ 0x001bd0bb
MOV RAX,qword ptr [RSP + 0x30]
MOV EAX,dword ptr [RAX + 0x1d8]
MOV dword ptr [RSP + 0x2c],EAX
MOV RAX,qword ptr [RSP + 0x30]
MOV EAX,dword ptr [RAX + 0x1dc]
MOV dword ptr [RSP + 0x28],EAX
MOV dword ptr [RSP + 0x24],0x0
MOV RAX,qword ptr [RSP + 0x30]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RSP + 0x30]
ADD RSI,0x1e0
CALL 0x0014b230
MOV dword ptr [RSP + 0x20],0x0
LAB_001bcf43:
MOV EAX,dword ptr [RSP + 0x20]
MOV RCX,qword ptr [RSP + 0x30]
CMP EAX,dword ptr [RCX + 0x1c4]
JGE 0x001bd0b9
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX + 0x1b8]
MOVSXD RCX,dword ptr [RSP + 0x20]
IMUL RCX,RCX,0xc
ADD RAX,RCX
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x1c],EAX
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX + 0x1b8]
MOVSXD RCX,dword ptr [RSP + 0x20]
IMUL RCX,RCX,0xc
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x4]
MOV dword ptr [RSP + 0x18],EAX
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX + 0x1b8]
MOVSXD RCX,dword ptr [RSP + 0x20]
IMUL RCX,RCX,0xc
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RSP + 0x14],EAX
CMP dword ptr [RSP + 0x18],0x0
JGE 0x001bcfc0
JMP 0x001bd0a9
LAB_001bcfc0:
MOV EAX,dword ptr [RSP + 0x1c]
SUB EAX,dword ptr [RSP + 0x24]
MOV dword ptr [RSP + 0x10],EAX
CMP dword ptr [RSP + 0x10],0x0
JGE 0x001bcfd8
JMP 0x001bd0a9
LAB_001bcfd8:
MOV EAX,dword ptr [RSP + 0x18]
SUB EAX,dword ptr [RSP + 0x2c]
MOV dword ptr [RSP + 0xc],EAX
MOV EAX,dword ptr [RSP + 0x14]
SUB EAX,dword ptr [RSP + 0x28]
MOV dword ptr [RSP + 0x8],EAX
CMP dword ptr [RSP + 0xc],0x0
JNZ 0x001bd003
CMP dword ptr [RSP + 0x8],0x0
JNZ 0x001bd003
JMP 0x001bd0a9
LAB_001bd003:
CMP dword ptr [RSP + 0xc],-0x1
JL 0x001bd03f
CMP dword ptr [RSP + 0xc],0x4
JGE 0x001bd03f
CMP dword ptr [RSP + 0x10],0x32
JG 0x001bd03f
MOV RDI,qword ptr [RSP + 0x30]
ADD RDI,0x1e0
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,-0x1
IMUL ECX,dword ptr [RSP + 0x10],0x5
ADD EAX,ECX
ADD EAX,0x1
MOVZX ESI,AL
CALL 0x0011e6d0
JMP 0x001bd07c
LAB_001bd03f:
MOV RDI,qword ptr [RSP + 0x30]
ADD RDI,0x1e0
XOR ESI,ESI
CALL 0x0011e6d0
MOV RDI,qword ptr [RSP + 0x30]
ADD RDI,0x1e0
MOV ESI,dword ptr [RSP + 0x10]
CALL 0x001793f0
MOV RDI,qword ptr [RSP + 0x30]
ADD RDI,0x1e0
MOV ESI,dword ptr [RSP + 0xc]
CALL 0x001793b0
LAB_001bd07c:
MOV RDI,qword ptr [RSP + 0x30]
ADD RDI,0x1e0
MOV ESI,dword ptr [RSP + 0x8]
CALL 0x001793b0
MOV EAX,dword ptr [RSP + 0x1c]
MOV dword ptr [RSP + 0x24],EAX
MOV EAX,dword ptr [RSP + 0x18]
MOV dword ptr [RSP + 0x2c],EAX
MOV EAX,dword ptr [RSP + 0x14]
MOV dword ptr [RSP + 0x28],EAX
LAB_001bd0a9:
MOV EAX,dword ptr [RSP + 0x20]
ADD EAX,0x1
MOV dword ptr [RSP + 0x20],EAX
JMP 0x001bcf43
LAB_001bd0b9:
JMP 0x001bd0bb
LAB_001bd0bb:
ADD RSP,0x38
RET
|
void compute_pc2line_info(int8 *param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
int local_18;
int local_14;
int local_10;
int local_c;
if (param_1[0x37] != 0) {
local_c = *(int *)(param_1 + 0x3b);
local_10 = *(int *)((long)param_1 + 0x1dc);
local_14 = 0;
js_dbuf_init(*param_1,param_1 + 0x3c);
for (local_18 = 0; local_18 < *(int *)((long)param_1 + 0x1c4); local_18 = local_18 + 1) {
iVar1 = *(int *)(param_1[0x37] + (long)local_18 * 0xc);
iVar2 = *(int *)(param_1[0x37] + (long)local_18 * 0xc + 4);
iVar3 = *(int *)(param_1[0x37] + (long)local_18 * 0xc + 8);
if (((-1 < iVar2) && (iVar4 = iVar1 - local_14, -1 < iVar4)) &&
((iVar5 = iVar2 - local_c, iVar5 != 0 || (iVar3 != local_10)))) {
if (((iVar5 < -1) || (3 < iVar5)) || (0x32 < iVar4)) {
dbuf_putc(param_1 + 0x3c,0);
dbuf_put_leb128(param_1 + 0x3c,iVar4);
dbuf_put_sleb128(param_1 + 0x3c,iVar5);
}
else {
dbuf_putc(param_1 + 0x3c,iVar5 + iVar4 * 5 + 2U & 0xff);
}
dbuf_put_sleb128(param_1 + 0x3c);
local_14 = iVar1;
local_10 = iVar3;
local_c = iVar2;
}
}
}
return;
}
| |
27,319 | ma_get_last_key | eloqsql/storage/maria/ma_search.c | uchar *_ma_get_last_key(MARIA_KEY *key, MARIA_PAGE *ma_page, uchar *endpos)
{
uint page_flag,nod_flag;
uchar *lastpos, *page;
MARIA_KEYDEF *keyinfo= key->keyinfo;
DBUG_ENTER("_ma_get_last_key");
DBUG_PRINT("enter",("page: %p endpos: %p", ma_page->buff,
endpos));
page_flag= ma_page->flag;
nod_flag= ma_page->node;
page= ma_page->buff + keyinfo->share->keypage_header + nod_flag;
if (! (keyinfo->flag & (HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY)) &&
! (page_flag & KEYPAGE_FLAG_HAS_TRANSID))
{
lastpos= endpos-keyinfo->keylength-nod_flag;
key->ref_length= keyinfo->share->rec_reflength;
key->data_length= keyinfo->keylength - key->ref_length;
key->flag= 0;
if (lastpos >= page)
bmove(key->data, lastpos, keyinfo->keylength + nod_flag);
}
else
{
lastpos= page;
key->data[0]=0; /* safety */
while (page < endpos)
{
lastpos= page;
if (!(*keyinfo->get_key)(key, page_flag, nod_flag, &page))
{
DBUG_PRINT("error",("Couldn't find last key: page: %p",
page));
_ma_set_fatal_error_with_share(keyinfo->share, HA_ERR_CRASHED);
DBUG_RETURN(0);
}
}
}
DBUG_PRINT("exit",("lastpos: %p length: %u", lastpos,
key->data_length + key->ref_length));
DBUG_RETURN(lastpos);
} | O3 | c | ma_get_last_key:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rdi, %r14
movq 0x8(%rdi), %rbx
movl 0x28(%rsi), %r8d
movl 0x2c(%rsi), %edi
movq (%rbx), %rcx
movl 0x744(%rcx), %eax
addq 0x10(%rsi), %rax
addq %r8, %rax
movq %rax, -0x38(%rbp)
testb $0x28, 0xa2(%rbx)
sete %dl
movl %edi, -0x2c(%rbp)
testb $0x2, %dil
sete %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x57bdb
movzwl 0xaa(%rbx), %edx
subq %rdx, %r15
movq %r15, %r12
subq %r8, %r12
movl 0x740(%rcx), %ecx
movl %ecx, 0x14(%r14)
movzwl 0xaa(%rbx), %edx
subl %ecx, %edx
movl %edx, 0x10(%r14)
movl $0x0, 0x18(%r14)
cmpq %rax, %r12
jb 0x57c26
movq (%r14), %rdi
movzwl 0xaa(%rbx), %edx
addl %r8d, %edx
movq %r12, %rsi
callq 0x29120
jmp 0x57c26
movq (%r14), %rcx
movb $0x0, (%rcx)
cmpq %r15, %rax
jae 0x57c11
movq %rax, %r12
movq %r14, %rdi
movl -0x2c(%rbp), %esi
movq %r8, %r13
movl %r8d, %edx
leaq -0x38(%rbp), %rcx
callq *0xe0(%rbx)
testl %eax, %eax
je 0x57c16
movq -0x38(%rbp), %rax
cmpq %r15, %rax
movq %r13, %r8
jb 0x57be6
jmp 0x57c26
movq %rax, %r12
jmp 0x57c26
movq (%rbx), %rdi
movl $0x7e, %esi
callq 0x36966
xorl %r12d, %r12d
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ma_get_last_key:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15, rdx
mov r14, rdi
mov rbx, [rdi+8]
mov r8d, [rsi+28h]
mov edi, [rsi+2Ch]
mov rcx, [rbx]
mov eax, [rcx+744h]
add rax, [rsi+10h]
add rax, r8
mov [rbp+var_38], rax
test byte ptr [rbx+0A2h], 28h
setz dl
mov [rbp+var_2C], edi
test dil, 2
setz sil
and sil, dl
cmp sil, 1
jnz short loc_57BDB
movzx edx, word ptr [rbx+0AAh]
sub r15, rdx
mov r12, r15
sub r12, r8
mov ecx, [rcx+740h]
mov [r14+14h], ecx
movzx edx, word ptr [rbx+0AAh]
sub edx, ecx
mov [r14+10h], edx
mov dword ptr [r14+18h], 0
cmp r12, rax
jb short loc_57C26
mov rdi, [r14]
movzx edx, word ptr [rbx+0AAh]
add edx, r8d
mov rsi, r12
call _memmove
jmp short loc_57C26
loc_57BDB:
mov rcx, [r14]
mov byte ptr [rcx], 0
cmp rax, r15
jnb short loc_57C11
loc_57BE6:
mov r12, rax
mov rdi, r14
mov esi, [rbp+var_2C]
mov r13, r8
mov edx, r8d
lea rcx, [rbp+var_38]
call qword ptr [rbx+0E0h]
test eax, eax
jz short loc_57C16
mov rax, [rbp+var_38]
cmp rax, r15
mov r8, r13
jb short loc_57BE6
jmp short loc_57C26
loc_57C11:
mov r12, rax
jmp short loc_57C26
loc_57C16:
mov rdi, [rbx]
mov esi, 7Eh ; '~'
call _ma_set_fatal_error_with_share
xor r12d, r12d
loc_57C26:
mov rax, r12
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| unsigned long long ma_get_last_key(long long a1, long long a2, unsigned long long a3)
{
long long *v5; // rbx
long long v6; // r8
unsigned int v7; // edi
long long v8; // rcx
unsigned long long v9; // rax
bool v10; // dl
unsigned long long v11; // r15
unsigned long long v12; // r12
int v13; // ecx
long long v14; // r13
long long v15; // rdx
long long v16; // rcx
long long v17; // r8
int v18; // r9d
unsigned long long v20; // [rsp+8h] [rbp-38h] BYREF
unsigned int v21; // [rsp+14h] [rbp-2Ch]
v5 = *(long long **)(a1 + 8);
v6 = *(unsigned int *)(a2 + 40);
v7 = *(_DWORD *)(a2 + 44);
v8 = *v5;
v9 = v6 + *(_QWORD *)(a2 + 16) + *(unsigned int *)(*v5 + 1860);
v20 = v9;
v10 = (*((_BYTE *)v5 + 162) & 0x28) == 0;
v21 = v7;
if ( v10 && (v7 & 2) == 0 )
{
v11 = a3 - *((unsigned __int16 *)v5 + 85);
v12 = v11 - v6;
v13 = *(_DWORD *)(v8 + 1856);
*(_DWORD *)(a1 + 20) = v13;
*(_DWORD *)(a1 + 16) = *((unsigned __int16 *)v5 + 85) - v13;
*(_DWORD *)(a1 + 24) = 0;
if ( v11 - v6 >= v9 )
memmove(*(_QWORD *)a1, v11 - v6, (unsigned int)v6 + *((unsigned __int16 *)v5 + 85));
}
else
{
**(_BYTE **)a1 = 0;
if ( v9 >= a3 )
{
return v9;
}
else
{
while ( 1 )
{
v12 = v9;
v14 = v6;
if ( !((unsigned int ( *)(long long, _QWORD, _QWORD, unsigned long long *))v5[28])(
a1,
v21,
(unsigned int)v6,
&v20) )
break;
v9 = v20;
v6 = v14;
if ( v20 >= a3 )
return v12;
}
ma_set_fatal_error_with_share(*v5, 126, v15, v16, v17, v18);
return 0LL;
}
}
return v12;
}
| _ma_get_last_key:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15,RDX
MOV R14,RDI
MOV RBX,qword ptr [RDI + 0x8]
MOV R8D,dword ptr [RSI + 0x28]
MOV EDI,dword ptr [RSI + 0x2c]
MOV RCX,qword ptr [RBX]
MOV EAX,dword ptr [RCX + 0x744]
ADD RAX,qword ptr [RSI + 0x10]
ADD RAX,R8
MOV qword ptr [RBP + -0x38],RAX
TEST byte ptr [RBX + 0xa2],0x28
SETZ DL
MOV dword ptr [RBP + -0x2c],EDI
TEST DIL,0x2
SETZ SIL
AND SIL,DL
CMP SIL,0x1
JNZ 0x00157bdb
MOVZX EDX,word ptr [RBX + 0xaa]
SUB R15,RDX
MOV R12,R15
SUB R12,R8
MOV ECX,dword ptr [RCX + 0x740]
MOV dword ptr [R14 + 0x14],ECX
MOVZX EDX,word ptr [RBX + 0xaa]
SUB EDX,ECX
MOV dword ptr [R14 + 0x10],EDX
MOV dword ptr [R14 + 0x18],0x0
CMP R12,RAX
JC 0x00157c26
MOV RDI,qword ptr [R14]
MOVZX EDX,word ptr [RBX + 0xaa]
ADD EDX,R8D
MOV RSI,R12
CALL 0x00129120
JMP 0x00157c26
LAB_00157bdb:
MOV RCX,qword ptr [R14]
MOV byte ptr [RCX],0x0
CMP RAX,R15
JNC 0x00157c11
LAB_00157be6:
MOV R12,RAX
MOV RDI,R14
MOV ESI,dword ptr [RBP + -0x2c]
MOV R13,R8
MOV EDX,R8D
LEA RCX,[RBP + -0x38]
CALL qword ptr [RBX + 0xe0]
TEST EAX,EAX
JZ 0x00157c16
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,R15
MOV R8,R13
JC 0x00157be6
JMP 0x00157c26
LAB_00157c11:
MOV R12,RAX
JMP 0x00157c26
LAB_00157c16:
MOV RDI,qword ptr [RBX]
MOV ESI,0x7e
CALL 0x00136966
XOR R12D,R12D
LAB_00157c26:
MOV RAX,R12
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void * _ma_get_last_key(int8 *param_1,long param_2,void *param_3)
{
uint uVar1;
long *plVar2;
void *pvVar3;
void *pvVar4;
int iVar5;
ulong uVar6;
void *local_40;
uint local_34;
plVar2 = (long *)param_1[1];
uVar1 = *(uint *)(param_2 + 0x28);
uVar6 = (ulong)uVar1;
local_34 = *(uint *)(param_2 + 0x2c);
local_40 = (void *)((ulong)*(uint *)(*plVar2 + 0x744) + *(long *)(param_2 + 0x10) + uVar6);
if ((local_34 & 2) == 0 && (*(byte *)((long)plVar2 + 0xa2) & 0x28) == 0) {
param_3 = (void *)((long)param_3 + (-uVar6 - (ulong)*(ushort *)((long)plVar2 + 0xaa)));
iVar5 = *(int *)(*plVar2 + 0x740);
*(int *)((long)param_1 + 0x14) = iVar5;
*(uint *)(param_1 + 2) = (uint)*(ushort *)((long)plVar2 + 0xaa) - iVar5;
*(int4 *)(param_1 + 3) = 0;
if (local_40 <= param_3) {
memmove((void *)*param_1,param_3,(ulong)(*(ushort *)((long)plVar2 + 0xaa) + uVar1));
}
}
else {
*(int1 *)*param_1 = 0;
pvVar4 = local_40;
do {
pvVar3 = local_40;
if (param_3 <= pvVar3) {
return pvVar4;
}
local_40 = pvVar3;
iVar5 = (*(code *)plVar2[0x1c])(param_1,local_34,uVar6,&local_40);
pvVar4 = pvVar3;
} while (iVar5 != 0);
_ma_set_fatal_error_with_share(*plVar2,0x7e);
param_3 = (void *)0x0;
}
return param_3;
}
| |
27,320 | minja::Parser::unterminated(minja::TemplateToken const&) const | monkey531[P]llama/common/minja.hpp | std::runtime_error unterminated(const TemplateToken & token) const {
return std::runtime_error("Unterminated " + TemplateToken::typeToString(token.type)
+ error_location_suffix(*template_str, token.location.pos));
} | O2 | cpp | minja::Parser::unterminated(minja::TemplateToken const&) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl 0x8(%rdx), %esi
leaq 0x68(%rsp), %r12
movq %r12, %rdi
callq 0x72d94
leaq 0x444d0(%rip), %rsi # 0xb68d6
leaq 0x28(%rsp), %rdi
movq %r12, %rdx
callq 0x58a46
movq (%r15), %rsi
movq 0x20(%r14), %rdx
leaq 0x8(%rsp), %rdi
callq 0x57f7a
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x39627
leaq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0x24e10
leaq 0x48(%rsp), %rdi
callq 0x251b8
leaq 0x8(%rsp), %rdi
callq 0x251b8
leaq 0x28(%rsp), %rdi
callq 0x251b8
leaq 0x68(%rsp), %rdi
callq 0x251b8
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x251b8
jmp 0x72491
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x251b8
jmp 0x724a0
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x251b8
jmp 0x724af
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x251b8
movq %rbx, %rdi
callq 0x24f60
nop
| _ZNK5minja6Parser12unterminatedERKNS_13TemplateTokenE:
push r15
push r14
push r12
push rbx
sub rsp, 88h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov esi, [rdx+8]
lea r12, [rsp+0A8h+var_40]
mov rdi, r12
call _ZN5minja13TemplateToken12typeToStringB5cxx11ENS0_4TypeE; minja::TemplateToken::typeToString(minja::TemplateToken::Type)
lea rsi, aUnterminated; "Unterminated "
lea rdi, [rsp+0A8h+var_80]
mov rdx, r12
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov rsi, [r15]
mov rdx, [r14+20h]
lea rdi, [rsp+0A8h+var_A0]
call _ZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; minja::error_location_suffix(std::string const&,ulong)
lea rdi, [rsp+0A8h+var_60]
lea rsi, [rsp+0A8h+var_80]
lea rdx, [rsp+0A8h+var_A0]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&)
lea rsi, [rsp+0A8h+var_60]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
lea rdi, [rsp+0A8h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0A8h+var_A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0A8h+var_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0A8h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, rbx
add rsp, 88h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_72491
mov rbx, rax
loc_72491:
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_724A0
mov rbx, rax
loc_724A0:
lea rdi, [rsp+arg_20]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_724AF
mov rbx, rax
loc_724AF:
lea rdi, [rsp+arg_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
| minja::Parser * minja::Parser::unterminated(minja::Parser *this, const minja::TemplateToken *a2, long long a3)
{
_QWORD v5[4]; // [rsp+8h] [rbp-A0h] BYREF
_QWORD v6[4]; // [rsp+28h] [rbp-80h] BYREF
_BYTE v7[32]; // [rsp+48h] [rbp-60h] BYREF
_BYTE v8[64]; // [rsp+68h] [rbp-40h] BYREF
minja::TemplateToken::typeToString[abi:cxx11](v8, *(unsigned int *)(a3 + 8));
std::operator+<char>((long long)v6, (long long)"Unterminated ", (long long)v8);
minja::error_location_suffix((long long)v5, *(_QWORD *)a2, *(_QWORD *)(a3 + 32));
std::operator+<char>((long long)v7, v6, v5);
std::runtime_error::runtime_error(this, v7);
std::string::~string(v7);
std::string::~string(v5);
std::string::~string(v6);
std::string::~string(v8);
return this;
}
| unterminated:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV ESI,dword ptr [RDX + 0x8]
LEA R12,[RSP + 0x68]
MOV RDI,R12
CALL 0x00172d94
LAB_001723ff:
LEA RSI,[0x1b68d6]
LEA RDI,[RSP + 0x28]
MOV RDX,R12
CALL 0x00158a46
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R14 + 0x20]
LAB_0017241a:
LEA RDI,[RSP + 0x8]
CALL 0x00157f7a
LAB_00172424:
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x00139627
LAB_00172438:
LEA RSI,[RSP + 0x48]
MOV RDI,RBX
CALL 0x00124e10
LAB_00172445:
LEA RDI,[RSP + 0x48]
CALL 0x001251b8
LEA RDI,[RSP + 0x8]
CALL 0x001251b8
LEA RDI,[RSP + 0x28]
CALL 0x001251b8
LEA RDI,[RSP + 0x68]
CALL 0x001251b8
MOV RAX,RBX
ADD RSP,0x88
POP RBX
POP R12
POP R14
POP R15
RET
|
/* minja::Parser::unterminated(minja::TemplateToken const&) const */
TemplateToken * minja::Parser::unterminated(TemplateToken *param_1)
{
long in_RDX;
int8 *in_RSI;
minja local_a0 [32];
string local_80 [32];
string local_60 [32];
TemplateToken local_40 [32];
TemplateToken::typeToString_abi_cxx11_(local_40,*(int4 *)(in_RDX + 8));
/* try { // try from 001723ff to 00172412 has its CatchHandler @ 001724ac */
std::operator+((char *)local_80,(string *)"Unterminated ");
/* try { // try from 0017241a to 00172423 has its CatchHandler @ 0017249d */
error_location_suffix(local_a0,(string *)*in_RSI,*(ulong *)(in_RDX + 0x20));
/* try { // try from 00172424 to 00172437 has its CatchHandler @ 0017248e */
std::operator+(local_60,local_80);
/* try { // try from 00172438 to 00172444 has its CatchHandler @ 0017247f */
std::runtime_error::runtime_error((runtime_error *)param_1,local_60);
std::__cxx11::string::~string(local_60);
std::__cxx11::string::~string((string *)local_a0);
std::__cxx11::string::~string(local_80);
std::__cxx11::string::~string((string *)local_40);
return param_1;
}
| |
27,321 | my_strntoull_8bit | eloqsql/strings/ctype-simple.c | ulonglong my_strntoull_8bit(CHARSET_INFO *cs,
const char *nptr, size_t l, int base,
char **endptr, int *err)
{
int negative;
register ulonglong cutoff;
register uint cutlim;
register ulonglong i;
register const char *s, *e;
const char *save;
int overflow;
*err= 0; /* Initialize error indicator */
s = nptr;
e = nptr+l;
for(; s<e && my_isspace(cs,*s); s++);
if (s == e)
{
goto noconv;
}
if (*s == '-')
{
negative = 1;
++s;
}
else if (*s == '+')
{
negative = 0;
++s;
}
else
negative = 0;
save = s;
cutoff = (~(ulonglong) 0) / (unsigned long int) base;
cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) base);
overflow = 0;
i = 0;
for ( ; s != e; s++)
{
register uchar c= *s;
if (c>='0' && c<='9')
c -= '0';
else if (c>='A' && c<='Z')
c = c - 'A' + 10;
else if (c>='a' && c<='z')
c = c - 'a' + 10;
else
break;
if (c >= base)
break;
if (i > cutoff || (i == cutoff && c > cutlim))
overflow = 1;
else
{
i *= (ulonglong) base;
i += c;
}
}
if (s == save)
goto noconv;
if (endptr != NULL)
*endptr = (char *) s;
if (overflow)
{
err[0]= ERANGE;
return (~(ulonglong) 0);
}
return (negative ? -((longlong) i) : (longlong) i);
noconv:
err[0]= EDOM;
if (endptr != NULL)
*endptr = (char *) nptr;
return 0L;
} | O3 | c | my_strntoull_8bit:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl $0x0, (%r9)
leaq (%rsi,%rdx), %r11
movq %rsi, %r10
testq %rdx, %rdx
jle 0x3c42d
movq 0x40(%rdi), %rax
movq %rsi, %r10
movzbl (%r10), %edx
testb $0x8, 0x1(%rax,%rdx)
je 0x3c42d
incq %r10
cmpq %r11, %r10
jb 0x3c41a
cmpq %r11, %r10
je 0x3c515
movb (%r10), %dil
leal -0x2b(%rdi), %eax
andb $-0x3, %al
cmpb $0x1, %al
adcq $0x0, %r10
movslq %ecx, %rbx
movq $-0x1, %rax
xorl %edx, %edx
movq %rbx, -0x38(%rbp)
divq %rbx
xorl %r12d, %r12d
cmpq %r11, %r10
je 0x3c4f2
movq %rdi, -0x30(%rbp)
movq %r10, %r14
xorl %r15d, %r15d
movq %r15, %rdi
movl %r12d, %r13d
movb (%r14), %r12b
leal -0x30(%r12), %ebx
cmpb $0xa, %bl
jb 0x3c4a1
leal -0x41(%r12), %ebx
cmpb $0x19, %bl
ja 0x3c490
addb $-0x37, %r12b
jmp 0x3c49e
leal -0x61(%r12), %ebx
cmpb $0x19, %bl
ja 0x3c4e0
addb $-0x57, %r12b
movl %r12d, %ebx
movzbl %bl, %ebx
cmpl %ecx, %ebx
jge 0x3c4e0
movl $0x1, %r12d
cmpq %rax, %rdi
jbe 0x3c4b8
movq %rdi, %r15
jmp 0x3c4cf
jne 0x3c4c1
movq %rax, %r15
cmpl %edx, %ebx
ja 0x3c4cf
imulq -0x38(%rbp), %rdi
movl %ebx, %r15d
addq %rdi, %r15
movl %r13d, %r12d
incq %r14
cmpq %r11, %r14
jne 0x3c46d
movq %r15, %rdi
movq %r11, %r14
movl %r12d, %r13d
testl %r13d, %r13d
sete %al
movq %rdi, %r12
movq %r14, %r11
movq -0x30(%rbp), %rdi
jmp 0x3c4f4
movb $0x1, %al
cmpq %r10, %r11
je 0x3c515
testq %r8, %r8
je 0x3c501
movq %r11, (%r8)
testb %al, %al
je 0x3c528
movq %r12, %rax
negq %rax
cmpb $0x2d, %dil
cmovneq %r12, %rax
jmp 0x3c536
movl $0x21, (%r9)
testq %r8, %r8
je 0x3c524
movq %rsi, (%r8)
xorl %eax, %eax
jmp 0x3c536
movl $0x22, (%r9)
movq $-0x1, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_strntoull_8bit:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
mov dword ptr [r9], 0
lea r11, [rsi+rdx]
mov r10, rsi
test rdx, rdx
jle short loc_3C42D
mov rax, [rdi+40h]
mov r10, rsi
loc_3C41A:
movzx edx, byte ptr [r10]
test byte ptr [rax+rdx+1], 8
jz short loc_3C42D
inc r10
cmp r10, r11
jb short loc_3C41A
loc_3C42D:
cmp r10, r11
jz loc_3C515
mov dil, [r10]
lea eax, [rdi-2Bh]
and al, 0FDh
cmp al, 1
adc r10, 0
movsxd rbx, ecx
mov rax, 0FFFFFFFFFFFFFFFFh
xor edx, edx
mov [rbp+var_38], rbx
div rbx
xor r12d, r12d
cmp r10, r11
jz loc_3C4F2
mov [rbp+var_30], rdi
mov r14, r10
xor r15d, r15d
loc_3C46D:
mov rdi, r15
mov r13d, r12d
mov r12b, [r14]
lea ebx, [r12-30h]
cmp bl, 0Ah
jb short loc_3C4A1
lea ebx, [r12-41h]
cmp bl, 19h
ja short loc_3C490
add r12b, 0C9h
jmp short loc_3C49E
loc_3C490:
lea ebx, [r12-61h]
cmp bl, 19h
ja short loc_3C4E0
add r12b, 0A9h
loc_3C49E:
mov ebx, r12d
loc_3C4A1:
movzx ebx, bl
cmp ebx, ecx
jge short loc_3C4E0
mov r12d, 1
cmp rdi, rax
jbe short loc_3C4B8
mov r15, rdi
jmp short loc_3C4CF
loc_3C4B8:
jnz short loc_3C4C1
mov r15, rax
cmp ebx, edx
ja short loc_3C4CF
loc_3C4C1:
imul rdi, [rbp+var_38]
mov r15d, ebx
add r15, rdi
mov r12d, r13d
loc_3C4CF:
inc r14
cmp r14, r11
jnz short loc_3C46D
mov rdi, r15
mov r14, r11
mov r13d, r12d
loc_3C4E0:
test r13d, r13d
setz al
mov r12, rdi
mov r11, r14
mov rdi, [rbp+var_30]
jmp short loc_3C4F4
loc_3C4F2:
mov al, 1
loc_3C4F4:
cmp r11, r10
jz short loc_3C515
test r8, r8
jz short loc_3C501
mov [r8], r11
loc_3C501:
test al, al
jz short loc_3C528
mov rax, r12
neg rax
cmp dil, 2Dh ; '-'
cmovnz rax, r12
jmp short loc_3C536
loc_3C515:
mov dword ptr [r9], 21h ; '!'
test r8, r8
jz short loc_3C524
mov [r8], rsi
loc_3C524:
xor eax, eax
jmp short loc_3C536
loc_3C528:
mov dword ptr [r9], 22h ; '"'
mov rax, 0FFFFFFFFFFFFFFFFh
loc_3C536:
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_strntoull_8bit(
long long a1,
unsigned __int8 *a2,
long long a3,
int a4,
unsigned __int8 **a5,
_DWORD *a6)
{
unsigned __int8 *v6; // r11
unsigned __int8 *v7; // r10
unsigned __int8 v8; // di
unsigned __int8 *v9; // r10
unsigned long long v10; // rax
unsigned long long v11; // r12
unsigned __int8 *v12; // r14
unsigned long long v13; // r15
unsigned long long v14; // rdi
int v15; // r13d
unsigned __int8 v16; // r12
unsigned __int8 v17; // bl
unsigned __int8 v18; // r12
bool v19; // al
long long result; // rax
unsigned __int8 v21; // [rsp+8h] [rbp-30h]
*a6 = 0;
v6 = &a2[a3];
v7 = a2;
if ( a3 > 0 )
{
v7 = a2;
do
{
if ( (*(_BYTE *)(*(_QWORD *)(a1 + 64) + *v7 + 1LL) & 8) == 0 )
break;
++v7;
}
while ( v7 < v6 );
}
if ( v7 == v6 )
goto LABEL_30;
v8 = *v7;
v9 = &v7[((*v7 - 43) & 0xFD) == 0];
v10 = 0xFFFFFFFFFFFFFFFFLL / a4;
v11 = 0LL;
if ( v9 == v6 )
{
v19 = 1;
}
else
{
v21 = v8;
v12 = v9;
v13 = 0LL;
while ( 1 )
{
v14 = v13;
v15 = v11;
v16 = *v12;
v17 = *v12 - 48;
if ( v17 >= 0xAu )
{
if ( (unsigned __int8)(v16 - 65) > 0x19u )
{
if ( (unsigned __int8)(v16 - 97) > 0x19u )
break;
v18 = v16 - 87;
}
else
{
v18 = v16 - 55;
}
v17 = v18;
}
if ( v17 >= a4 )
break;
LODWORD(v11) = 1;
if ( v13 <= v10 )
{
if ( v13 != v10 || (v13 = 0xFFFFFFFFFFFFFFFFLL / a4, v17 <= (unsigned int)(0xFFFFFFFFFFFFFFFFLL % a4)) )
{
v13 = a4 * v14 + v17;
LODWORD(v11) = v15;
}
}
if ( ++v12 == v6 )
{
v14 = v13;
v12 = &a2[a3];
v15 = v11;
break;
}
}
v19 = v15 == 0;
v11 = v14;
v6 = v12;
v8 = v21;
}
if ( v6 == v9 )
{
LABEL_30:
*a6 = 33;
if ( a5 )
*a5 = a2;
return 0LL;
}
else
{
if ( a5 )
*a5 = v6;
if ( v19 )
{
result = -(long long)v11;
if ( v8 != 45 )
return v11;
}
else
{
*a6 = 34;
return -1LL;
}
}
return result;
}
| my_strntoull_8bit:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV dword ptr [R9],0x0
LEA R11,[RSI + RDX*0x1]
MOV R10,RSI
TEST RDX,RDX
JLE 0x0013c42d
MOV RAX,qword ptr [RDI + 0x40]
MOV R10,RSI
LAB_0013c41a:
MOVZX EDX,byte ptr [R10]
TEST byte ptr [RAX + RDX*0x1 + 0x1],0x8
JZ 0x0013c42d
INC R10
CMP R10,R11
JC 0x0013c41a
LAB_0013c42d:
CMP R10,R11
JZ 0x0013c515
MOV DIL,byte ptr [R10]
LEA EAX,[RDI + -0x2b]
AND AL,0xfd
CMP AL,0x1
ADC R10,0x0
MOVSXD RBX,ECX
MOV RAX,-0x1
XOR EDX,EDX
MOV qword ptr [RBP + -0x38],RBX
DIV RBX
XOR R12D,R12D
CMP R10,R11
JZ 0x0013c4f2
MOV qword ptr [RBP + -0x30],RDI
MOV R14,R10
XOR R15D,R15D
LAB_0013c46d:
MOV RDI,R15
MOV R13D,R12D
MOV R12B,byte ptr [R14]
LEA EBX,[R12 + -0x30]
CMP BL,0xa
JC 0x0013c4a1
LEA EBX,[R12 + -0x41]
CMP BL,0x19
JA 0x0013c490
ADD R12B,0xc9
JMP 0x0013c49e
LAB_0013c490:
LEA EBX,[R12 + -0x61]
CMP BL,0x19
JA 0x0013c4e0
ADD R12B,0xa9
LAB_0013c49e:
MOV EBX,R12D
LAB_0013c4a1:
MOVZX EBX,BL
CMP EBX,ECX
JGE 0x0013c4e0
MOV R12D,0x1
CMP RDI,RAX
JBE 0x0013c4b8
MOV R15,RDI
JMP 0x0013c4cf
LAB_0013c4b8:
JNZ 0x0013c4c1
MOV R15,RAX
CMP EBX,EDX
JA 0x0013c4cf
LAB_0013c4c1:
IMUL RDI,qword ptr [RBP + -0x38]
MOV R15D,EBX
ADD R15,RDI
MOV R12D,R13D
LAB_0013c4cf:
INC R14
CMP R14,R11
JNZ 0x0013c46d
MOV RDI,R15
MOV R14,R11
MOV R13D,R12D
LAB_0013c4e0:
TEST R13D,R13D
SETZ AL
MOV R12,RDI
MOV R11,R14
MOV RDI,qword ptr [RBP + -0x30]
JMP 0x0013c4f4
LAB_0013c4f2:
MOV AL,0x1
LAB_0013c4f4:
CMP R11,R10
JZ 0x0013c515
TEST R8,R8
JZ 0x0013c501
MOV qword ptr [R8],R11
LAB_0013c501:
TEST AL,AL
JZ 0x0013c528
MOV RAX,R12
NEG RAX
CMP DIL,0x2d
CMOVNZ RAX,R12
JMP 0x0013c536
LAB_0013c515:
MOV dword ptr [R9],0x21
TEST R8,R8
JZ 0x0013c524
MOV qword ptr [R8],RSI
LAB_0013c524:
XOR EAX,EAX
JMP 0x0013c536
LAB_0013c528:
MOV dword ptr [R9],0x22
MOV RAX,-0x1
LAB_0013c536:
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong my_strntoull_8bit(long param_1,byte *param_2,long param_3,int param_4,ulong *param_5,
int4 *param_6)
{
byte bVar1;
byte bVar2;
int1 auVar3 [16];
int1 auVar4 [16];
ulong uVar5;
ulong uVar6;
ulong uVar7;
byte *pbVar8;
byte *pbVar9;
byte bVar10;
ulong uVar11;
ulong uVar12;
int iVar13;
byte *pbVar14;
bool bVar15;
*param_6 = 0;
pbVar9 = param_2 + param_3;
pbVar8 = param_2;
if (0 < param_3) {
do {
if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*pbVar8) & 8) == 0) break;
pbVar8 = pbVar8 + 1;
} while (pbVar8 < pbVar9);
}
if (pbVar8 != pbVar9) {
bVar1 = *pbVar8;
pbVar8 = pbVar8 + ((bVar1 - 0x2b & 0xfd) == 0);
auVar3._8_8_ = 0;
auVar3._0_8_ = (long)param_4;
auVar4 = ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff);
uVar6 = SUB168(auVar4 / auVar3,0);
uVar7 = 0;
if (pbVar8 == pbVar9) {
bVar15 = true;
}
else {
uVar11 = uVar7;
pbVar14 = pbVar8;
uVar7 = 0;
do {
iVar13 = (int)uVar11;
bVar2 = *pbVar14;
bVar10 = bVar2 - 0x30;
if (9 < bVar10) {
if ((byte)(bVar2 + 0xbf) < 0x1a) {
bVar10 = bVar2 - 0x37;
}
else {
if (0x19 < (byte)(bVar2 + 0x9f)) goto LAB_0013c4e0;
bVar10 = bVar2 + 0xa9;
}
}
if (param_4 <= (int)(uint)bVar10) goto LAB_0013c4e0;
uVar12 = 1;
uVar5 = uVar7;
if ((uVar7 <= uVar6) &&
((uVar7 != uVar6 || (uVar5 = uVar6, (uint)bVar10 <= SUB164(auVar4 % auVar3,0))))) {
uVar12 = uVar11;
uVar5 = (ulong)bVar10 + uVar7 * (long)param_4;
}
uVar7 = uVar5;
pbVar14 = pbVar14 + 1;
uVar11 = uVar12;
} while (pbVar14 != pbVar9);
iVar13 = (int)uVar12;
pbVar14 = pbVar9;
LAB_0013c4e0:
pbVar9 = pbVar14;
bVar15 = iVar13 == 0;
}
if (pbVar9 != pbVar8) {
if (param_5 != (ulong *)0x0) {
*param_5 = (ulong)pbVar9;
}
if (bVar15) {
if (bVar1 == 0x2d) {
return -uVar7;
}
return uVar7;
}
*param_6 = 0x22;
return 0xffffffffffffffff;
}
}
*param_6 = 0x21;
if (param_5 != (ulong *)0x0) {
*param_5 = (ulong)param_2;
}
return 0;
}
| |
27,322 | lunasvg::SVGGeometryElement::updateMarkerPositions(std::vector<lunasvg::SVGMarkerPosition, std::allocator<lunasvg::SVGMarkerPosition>>&, lunasvg::SVGLayoutState const&) | dmazzella[P]pylunasvg/lunasvg/source/svggeometryelement.cpp | void SVGGeometryElement::updateMarkerPositions(SVGMarkerPositionList& positions, const SVGLayoutState& state)
{
if(m_path.isEmpty())
return;
auto markerStart = getMarker(state.marker_start());
auto markerMid = getMarker(state.marker_mid());
auto markerEnd = getMarker(state.marker_end());
if(markerStart == nullptr && markerMid == nullptr && markerEnd == nullptr) {
return;
}
Point origin;
Point startPoint;
Point inslopePoints[2];
Point outslopePoints[2];
int index = 0;
std::array<Point, 3> points;
PathIterator it(m_path);
while(!it.isDone()) {
switch(it.currentSegment(points)) {
case PathCommand::MoveTo:
startPoint = points[0];
inslopePoints[0] = origin;
inslopePoints[1] = points[0];
origin = points[0];
break;
case PathCommand::LineTo:
inslopePoints[0] = origin;
inslopePoints[1] = points[0];
origin = points[0];
break;
case PathCommand::CubicTo:
inslopePoints[0] = points[1];
inslopePoints[1] = points[2];
origin = points[2];
break;
case PathCommand::Close:
inslopePoints[0] = origin;
inslopePoints[1] = points[0];
origin = startPoint;
startPoint = Point();
break;
}
it.next();
if(!it.isDone() && (markerStart || markerMid)) {
it.currentSegment(points);
outslopePoints[0] = origin;
outslopePoints[1] = points[0];
if(index == 0 && markerStart) {
auto slope = outslopePoints[1] - outslopePoints[0];
auto angle = 180.f * std::atan2(slope.y, slope.x) / PLUTOVG_PI;
const auto& orient = markerStart->orient();
if(orient.orientType() == SVGAngle::OrientType::AutoStartReverse)
angle -= 180.f;
positions.emplace_back(markerStart, origin, angle);
}
if(index > 0 && markerMid) {
auto inslope = inslopePoints[1] - inslopePoints[0];
auto outslope = outslopePoints[1] - outslopePoints[0];
auto inangle = 180.f * std::atan2(inslope.y, inslope.x) / PLUTOVG_PI;
auto outangle = 180.f * std::atan2(outslope.y, outslope.x) / PLUTOVG_PI;
if(std::abs(inangle - outangle) > 180.f)
inangle += 360.f;
auto angle = (inangle + outangle) * 0.5f;
positions.emplace_back(markerMid, origin, angle);
}
}
if(markerEnd && it.isDone()) {
auto slope = inslopePoints[1] - inslopePoints[0];
auto angle = 180.f * std::atan2(slope.y, slope.x) / PLUTOVG_PI;
positions.emplace_back(markerEnd, origin, angle);
}
index += 1;
}
} | O2 | cpp | lunasvg::SVGGeometryElement::updateMarkerPositions(std::vector<lunasvg::SVGMarkerPosition, std::allocator<lunasvg::SVGMarkerPosition>>&, lunasvg::SVGLayoutState const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdx, %r15
movq %rsi, 0x60(%rsp)
movq %rdi, %r14
leaq 0x98(%rdi), %r13
movq %r13, %rdi
callq 0xc9b6
testb %al, %al
jne 0x132c2
movq 0x108(%r15), %rax
movq 0x110(%r15), %rcx
leaq 0x40(%rsp), %rbp
movq %rcx, (%rbp)
movq %rax, 0x8(%rbp)
movq %r14, %rdi
movq %rbp, %rsi
callq 0xee8a
movq %rax, %r12
movq %rax, 0x38(%rsp)
movq 0x128(%r15), %rax
movq 0x130(%r15), %rcx
movq %rcx, (%rbp)
movq %rax, 0x8(%rbp)
leaq 0x40(%rsp), %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xee8a
movq %rax, %rbp
movq %rax, 0x68(%rsp)
movq 0x148(%r15), %rax
movq 0x150(%r15), %rcx
movq %rcx, (%rbx)
movq %rax, 0x8(%rbx)
leaq 0x40(%rsp), %rsi
movq %r14, %rdi
callq 0xee8a
movq %rax, 0x88(%rsp)
testq %rax, %rax
jne 0x132d4
testq %r12, %r12
jne 0x132d4
testq %rbp, %rbp
jne 0x132d4
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8(%rsp), %r14
andq $0x0, (%r14)
xorps %xmm1, %xmm1
leaq 0x40(%rsp), %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0xa0(%rsp)
movaps %xmm1, (%r15)
andq $0x0, 0x10(%r15)
leaq 0x78(%rsp), %r12
movq %r12, %rdi
movq %r13, %rsi
callq 0xca02
xorps %xmm0, %xmm0
movss %xmm0, 0x4(%rsp)
xorl %ebx, %ebx
leaq 0x14(%rsp), %rbp
leaq 0x27618(%rip), %r13 # 0x3a938
movss %xmm0, (%rsp)
xorps %xmm1, %xmm1
movl 0x84(%rsp), %eax
cmpl 0x80(%rsp), %eax
jge 0x132c2
movaps %xmm1, 0x20(%rsp)
movq %r12, %rdi
movq %r15, %rsi
callq 0xca1a
cmpl $0x3, %eax
ja 0x13415
movl %eax, %eax
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
movsd 0x40(%rsp), %xmm0
movss 0x8(%rsp), %xmm1
movss %xmm1, 0x4(%rsp)
movss 0xc(%rsp), %xmm1
movss %xmm1, (%rsp)
movsd %xmm0, 0x8(%rsp)
movaps %xmm0, 0xa0(%rsp)
movaps %xmm0, 0x20(%rsp)
jmp 0x13415
movss 0x48(%rsp), %xmm0
movss %xmm0, 0x4(%rsp)
movss 0x4c(%rsp), %xmm0
movss %xmm0, (%rsp)
movsd 0x50(%rsp), %xmm0
jmp 0x1340a
movss 0x8(%rsp), %xmm0
movss %xmm0, 0x4(%rsp)
movss 0xc(%rsp), %xmm0
movss %xmm0, (%rsp)
movsd 0x40(%rsp), %xmm0
movaps %xmm0, 0x20(%rsp)
movaps 0xa0(%rsp), %xmm0
movlps %xmm0, 0x8(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0xa0(%rsp)
jmp 0x13415
movss 0x8(%rsp), %xmm0
movss %xmm0, 0x4(%rsp)
movss 0xc(%rsp), %xmm0
movss %xmm0, (%rsp)
movsd 0x40(%rsp), %xmm0
movaps %xmm0, 0x20(%rsp)
movsd %xmm0, 0x8(%rsp)
movq %r12, %rdi
callq 0xca7a
movl 0x84(%rsp), %eax
movaps 0x20(%rsp), %xmm1
movaps %xmm1, %xmm0
shufps $0x55, %xmm1, %xmm0 # xmm0 = xmm0[1,1],xmm1[1,1]
cmpl 0x80(%rsp), %eax
jge 0x13605
movq 0x68(%rsp), %rax
orq 0x38(%rsp), %rax
je 0x13605
movaps %xmm0, 0xb0(%rsp)
movq %r12, %rdi
movq %r15, %rsi
callq 0xca1a
movss 0x8(%rsp), %xmm5
movss 0xc(%rsp), %xmm4
movss 0x40(%rsp), %xmm2
movss 0x44(%rsp), %xmm3
testl %ebx, %ebx
jne 0x1351c
cmpq $0x0, 0x38(%rsp)
je 0x1351c
movss %xmm2, 0x1c(%rsp)
movaps %xmm2, %xmm1
movss %xmm5, 0x74(%rsp)
subss %xmm5, %xmm1
movss %xmm3, 0x18(%rsp)
movaps %xmm3, %xmm0
movss %xmm4, 0x90(%rsp)
subss %xmm4, %xmm0
callq 0xa400
mulss 0x27466(%rip), %xmm0 # 0x3a928
divss 0x27462(%rip), %xmm0 # 0x3a92c
movss %xmm0, 0x14(%rsp)
movq 0x38(%rsp), %rax
cmpl $0x1, 0x128(%rax)
jne 0x134ec
addss 0x2744a(%rip), %xmm0 # 0x3a930
movss %xmm0, 0x14(%rsp)
movq 0x60(%rsp), %rdi
leaq 0x38(%rsp), %rsi
movq %r14, %rdx
movq %rbp, %rcx
callq 0x140be
movss 0x1c(%rsp), %xmm2
movss 0x18(%rsp), %xmm3
movss 0x90(%rsp), %xmm4
movss 0x74(%rsp), %xmm5
testl %ebx, %ebx
movaps 0x20(%rsp), %xmm1
movaps 0xb0(%rsp), %xmm0
je 0x13605
cmpq $0x0, 0x68(%rsp)
je 0x13605
movaps 0x20(%rsp), %xmm1
subss 0x4(%rsp), %xmm1
subss (%rsp), %xmm0
subss %xmm5, %xmm2
movss %xmm2, 0x1c(%rsp)
subss %xmm4, %xmm3
movss %xmm3, 0x18(%rsp)
callq 0xa400
movaps %xmm0, 0x90(%rsp)
movss 0x18(%rsp), %xmm0
movss 0x1c(%rsp), %xmm1
callq 0xa400
movaps 0x90(%rsp), %xmm3
unpcklps %xmm0, %xmm3 # xmm3 = xmm3[0],xmm0[0],xmm3[1],xmm0[1]
mulps 0x2735f(%rip), %xmm3 # 0x3a8f0
divps 0x27368(%rip), %xmm3 # 0x3a900
movaps %xmm3, %xmm0
shufps $0x55, %xmm3, %xmm0 # xmm0 = xmm0[1,1],xmm3[1,1]
movaps %xmm3, %xmm1
subss %xmm0, %xmm1
andps 0x27363(%rip), %xmm1 # 0x3a910
movaps %xmm3, %xmm2
movaps %xmm3, %xmm4
addss 0x27379(%rip), %xmm2 # 0x3a934
movss 0x27365(%rip), %xmm3 # 0x3a928
cmpltss %xmm1, %xmm3
andps %xmm3, %xmm2
andnps %xmm4, %xmm3
orps %xmm2, %xmm3
addss %xmm0, %xmm3
mulss 0x27343(%rip), %xmm3 # 0x3a920
movss %xmm3, 0x14(%rsp)
movq 0x60(%rsp), %rdi
leaq 0x68(%rsp), %rsi
movq %r14, %rdx
movq %rbp, %rcx
callq 0x140be
movaps 0xb0(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
cmpq $0x0, 0x88(%rsp)
je 0x1366d
movl 0x84(%rsp), %eax
cmpl 0x80(%rsp), %eax
jl 0x1366d
movaps %xmm1, 0x20(%rsp)
movaps 0x20(%rsp), %xmm1
subss 0x4(%rsp), %xmm1
subss (%rsp), %xmm0
callq 0xa400
mulss 0x272e6(%rip), %xmm0 # 0x3a928
divss 0x272e2(%rip), %xmm0 # 0x3a92c
movss %xmm0, 0x14(%rsp)
movq 0x60(%rsp), %rdi
leaq 0x88(%rsp), %rsi
movq %r14, %rdx
movq %rbp, %rcx
callq 0x140be
movaps 0x20(%rsp), %xmm1
decl %ebx
jmp 0x13328
| _ZN7lunasvg18SVGGeometryElement21updateMarkerPositionsERSt6vectorINS_17SVGMarkerPositionESaIS2_EERKNS_14SVGLayoutStateE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0C8h
mov r15, rdx
mov [rsp+0F8h+var_98], rsi
mov r14, rdi
lea r13, [rdi+98h]
mov rdi, r13; this
call _ZNK7lunasvg4Path7isEmptyEv; lunasvg::Path::isEmpty(void)
test al, al
jnz loc_132C2
mov rax, [r15+108h]
mov rcx, [r15+110h]
lea rbp, [rsp+0F8h+var_B8]
mov [rbp+0], rcx
mov [rbp+8], rax
mov rdi, r14
mov rsi, rbp
call _ZNK7lunasvg10SVGElement9getMarkerERKSt17basic_string_viewIcSt11char_traitsIcEE; lunasvg::SVGElement::getMarker(std::string_view const&)
mov r12, rax
mov [rsp+0F8h+var_C0], rax
mov rax, [r15+128h]
mov rcx, [r15+130h]
mov [rbp+0], rcx
mov [rbp+8], rax
lea rbx, [rsp+0F8h+var_B8]
mov rdi, r14
mov rsi, rbx
call _ZNK7lunasvg10SVGElement9getMarkerERKSt17basic_string_viewIcSt11char_traitsIcEE; lunasvg::SVGElement::getMarker(std::string_view const&)
mov rbp, rax
mov [rsp+0F8h+var_90], rax
mov rax, [r15+148h]
mov rcx, [r15+150h]
mov [rbx], rcx
mov [rbx+8], rax
lea rsi, [rsp+0F8h+var_B8]
mov rdi, r14
call _ZNK7lunasvg10SVGElement9getMarkerERKSt17basic_string_viewIcSt11char_traitsIcEE; lunasvg::SVGElement::getMarker(std::string_view const&)
mov [rsp+0F8h+var_70], rax
test rax, rax
jnz short loc_132D4
test r12, r12
jnz short loc_132D4
test rbp, rbp
jnz short loc_132D4
loc_132C2:
add rsp, 0C8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_132D4:
lea r14, [rsp+0F8h+var_F0]
and qword ptr [r14], 0
xorps xmm1, xmm1
lea r15, [rsp+0F8h+var_B8]
xorps xmm0, xmm0
movaps [rsp+0F8h+var_58], xmm0
movaps xmmword ptr [r15], xmm1
and qword ptr [r15+10h], 0
lea r12, [rsp+0F8h+var_80]
mov rdi, r12; this
mov rsi, r13; lunasvg::Path *
call _ZN7lunasvg12PathIteratorC2ERKNS_4PathE; lunasvg::PathIterator::PathIterator(lunasvg::Path const&)
xorps xmm0, xmm0
movss [rsp+0F8h+var_F4], xmm0
xor ebx, ebx
lea rbp, [rsp+0F8h+var_E4]
lea r13, jpt_1335B
movss [rsp+0F8h+var_F8], xmm0
xorps xmm1, xmm1
loc_13328:
mov eax, [rsp+0F8h+var_74]
cmp eax, [rsp+0F8h+var_78]
jge short loc_132C2
movaps [rsp+0F8h+var_D8], xmm1
mov rdi, r12
mov rsi, r15
call _ZNK7lunasvg12PathIterator14currentSegmentERSt5arrayINS_5PointELm3EE; lunasvg::PathIterator::currentSegment(std::array<lunasvg::Point,3ul> &)
cmp eax, 3; switch 4 cases
ja def_1335B; jumptable 000000000001335B default case
mov eax, eax
movsxd rax, ds:(jpt_1335B - 3A938h)[r13+rax*4]
add rax, r13
jmp rax; switch jump
loc_1335D:
movsd xmm0, [rsp+0F8h+var_B8]; jumptable 000000000001335B case 0
movss xmm1, dword ptr [rsp+0F8h+var_F0]
movss [rsp+0F8h+var_F4], xmm1
movss xmm1, dword ptr [rsp+0F8h+var_F0+4]
movss [rsp+0F8h+var_F8], xmm1
movsd [rsp+0F8h+var_F0], xmm0
movaps [rsp+0F8h+var_58], xmm0
movaps [rsp+0F8h+var_D8], xmm0
jmp def_1335B; jumptable 000000000001335B default case
loc_13392:
movss xmm0, [rsp+0F8h+var_B0]; jumptable 000000000001335B case 2
movss [rsp+0F8h+var_F4], xmm0
movss xmm0, [rsp+0F8h+var_AC]
movss [rsp+0F8h+var_F8], xmm0
movsd xmm0, [rsp+0F8h+var_A8]
jmp short loc_1340A
loc_133B1:
movss xmm0, dword ptr [rsp+0F8h+var_F0]; jumptable 000000000001335B case 3
movss [rsp+0F8h+var_F4], xmm0
movss xmm0, dword ptr [rsp+0F8h+var_F0+4]
movss [rsp+0F8h+var_F8], xmm0
movsd xmm0, [rsp+0F8h+var_B8]
movaps [rsp+0F8h+var_D8], xmm0
movaps xmm0, [rsp+0F8h+var_58]
movlps [rsp+0F8h+var_F0], xmm0
xorps xmm0, xmm0
movaps [rsp+0F8h+var_58], xmm0
jmp short def_1335B; jumptable 000000000001335B default case
loc_133ED:
movss xmm0, dword ptr [rsp+0F8h+var_F0]; jumptable 000000000001335B case 1
movss [rsp+0F8h+var_F4], xmm0
movss xmm0, dword ptr [rsp+0F8h+var_F0+4]
movss [rsp+0F8h+var_F8], xmm0
movsd xmm0, [rsp+0F8h+var_B8]
loc_1340A:
movaps [rsp+0F8h+var_D8], xmm0
movsd [rsp+0F8h+var_F0], xmm0
def_1335B:
mov rdi, r12; jumptable 000000000001335B default case
call _ZN7lunasvg12PathIterator4nextEv; lunasvg::PathIterator::next(void)
mov eax, [rsp+0F8h+var_74]
movaps xmm1, [rsp+0F8h+var_D8]
movaps xmm0, xmm1
shufps xmm0, xmm1, 55h ; 'U'
cmp eax, [rsp+0F8h+var_78]
jge loc_13605
mov rax, [rsp+0F8h+var_90]
or rax, [rsp+0F8h+var_C0]
jz loc_13605
movaps [rsp+0F8h+var_48], xmm0
mov rdi, r12
mov rsi, r15
call _ZNK7lunasvg12PathIterator14currentSegmentERSt5arrayINS_5PointELm3EE; lunasvg::PathIterator::currentSegment(std::array<lunasvg::Point,3ul> &)
movss xmm5, dword ptr [rsp+0F8h+var_F0]
movss xmm4, dword ptr [rsp+0F8h+var_F0+4]
movss xmm2, dword ptr [rsp+0F8h+var_B8]
movss xmm3, dword ptr [rsp+0F8h+var_B8+4]
test ebx, ebx
jnz loc_1351C
cmp [rsp+0F8h+var_C0], 0
jz loc_1351C
movss [rsp+0F8h+var_DC], xmm2
movaps xmm1, xmm2
movss [rsp+0F8h+var_84], xmm5
subss xmm1, xmm5
movss [rsp+0F8h+var_E0], xmm3
movaps xmm0, xmm3
movss dword ptr [rsp+0F8h+var_68], xmm4
subss xmm0, xmm4
call _atan2f
mulss xmm0, cs:dword_3A928
divss xmm0, cs:dword_3A92C
movss [rsp+0F8h+var_E4], xmm0
mov rax, [rsp+0F8h+var_C0]
cmp dword ptr [rax+128h], 1
jnz short loc_134EC
addss xmm0, cs:dword_3A930
movss [rsp+0F8h+var_E4], xmm0
loc_134EC:
mov rdi, [rsp+0F8h+var_98]
lea rsi, [rsp+0F8h+var_C0]
mov rdx, r14
mov rcx, rbp
call _ZNSt6vectorIN7lunasvg17SVGMarkerPositionESaIS1_EE12emplace_backIJRPNS0_16SVGMarkerElementERNS0_5PointERfEEERS1_DpOT_; std::vector<lunasvg::SVGMarkerPosition>::emplace_back<lunasvg::SVGMarkerElement *&,lunasvg::Point &,float &>(lunasvg::SVGMarkerElement *&,lunasvg::Point &,float &)
movss xmm2, [rsp+0F8h+var_DC]
movss xmm3, [rsp+0F8h+var_E0]
movss xmm4, dword ptr [rsp+0F8h+var_68]
movss xmm5, [rsp+0F8h+var_84]
loc_1351C:
test ebx, ebx
movaps xmm1, [rsp+0F8h+var_D8]
movaps xmm0, [rsp+0F8h+var_48]
jz loc_13605
cmp [rsp+0F8h+var_90], 0
jz loc_13605
movaps xmm1, [rsp+0F8h+var_D8]
subss xmm1, [rsp+0F8h+var_F4]
subss xmm0, [rsp+0F8h+var_F8]
subss xmm2, xmm5
movss [rsp+0F8h+var_DC], xmm2
subss xmm3, xmm4
movss [rsp+0F8h+var_E0], xmm3
call _atan2f
movaps [rsp+0F8h+var_68], xmm0
movss xmm0, [rsp+0F8h+var_E0]
movss xmm1, [rsp+0F8h+var_DC]
call _atan2f
movaps xmm3, [rsp+0F8h+var_68]
unpcklps xmm3, xmm0
mulps xmm3, cs:xmmword_3A8F0
divps xmm3, cs:xmmword_3A900
movaps xmm0, xmm3
shufps xmm0, xmm3, 55h ; 'U'
movaps xmm1, xmm3
subss xmm1, xmm0
andps xmm1, cs:xmmword_3A910
movaps xmm2, xmm3
movaps xmm4, xmm3
addss xmm2, cs:dword_3A934
movss xmm3, cs:dword_3A928
cmpltss xmm3, xmm1
andps xmm2, xmm3
andnps xmm3, xmm4
orps xmm3, xmm2
addss xmm3, xmm0
mulss xmm3, cs:dword_3A920
movss [rsp+0F8h+var_E4], xmm3
mov rdi, [rsp+0F8h+var_98]
lea rsi, [rsp+0F8h+var_90]
mov rdx, r14
mov rcx, rbp
call _ZNSt6vectorIN7lunasvg17SVGMarkerPositionESaIS1_EE12emplace_backIJRPNS0_16SVGMarkerElementERNS0_5PointERfEEERS1_DpOT_; std::vector<lunasvg::SVGMarkerPosition>::emplace_back<lunasvg::SVGMarkerElement *&,lunasvg::Point &,float &>(lunasvg::SVGMarkerElement *&,lunasvg::Point &,float &)
movaps xmm0, [rsp+0F8h+var_48]
movaps xmm1, [rsp+0F8h+var_D8]
loc_13605:
cmp [rsp+0F8h+var_70], 0
jz short loc_1366D
mov eax, [rsp+0F8h+var_74]
cmp eax, [rsp+0F8h+var_78]
jl short loc_1366D
movaps [rsp+0F8h+var_D8], xmm1
movaps xmm1, [rsp+0F8h+var_D8]
subss xmm1, [rsp+0F8h+var_F4]
subss xmm0, [rsp+0F8h+var_F8]
call _atan2f
mulss xmm0, cs:dword_3A928
divss xmm0, cs:dword_3A92C
movss [rsp+0F8h+var_E4], xmm0
mov rdi, [rsp+0F8h+var_98]
lea rsi, [rsp+0F8h+var_70]
mov rdx, r14
mov rcx, rbp
call _ZNSt6vectorIN7lunasvg17SVGMarkerPositionESaIS1_EE12emplace_backIJRPNS0_16SVGMarkerElementERNS0_5PointERfEEERS1_DpOT_; std::vector<lunasvg::SVGMarkerPosition>::emplace_back<lunasvg::SVGMarkerElement *&,lunasvg::Point &,float &>(lunasvg::SVGMarkerElement *&,lunasvg::Point &,float &)
movaps xmm1, [rsp+0F8h+var_D8]
loc_1366D:
dec ebx
jmp loc_13328
| char lunasvg::SVGGeometryElement::updateMarkerPositions(
long long a1,
long long a2,
_QWORD *a3,
double a4,
double a5,
double a6,
double a7)
{
long long v8; // rax
long long v9; // rax
long long Marker; // r12
long long v11; // rax
long long v12; // rbp
long long v13; // rax
int v14; // ebx
__m128 v15; // xmm1
double v16; // kr00_8
__m128 v17; // xmm0
double v18; // kr10_8
__m128 v19; // xmm0
float v20; // xmm5_4
float v21; // xmm4_4
double v22; // xmm1_8
double v23; // xmm0_8
__m128 v24; // xmm3
__m128 v25; // xmm1
long long v26; // xmm2_8
__m128 v27; // xmm4
__m128 v28; // xmm3
double v30; // [rsp+8h] [rbp-F0h] BYREF
__int32 v31; // [rsp+14h] [rbp-E4h] BYREF
float v32; // [rsp+18h] [rbp-E0h]
float v33; // [rsp+1Ch] [rbp-DCh]
__m128 v34; // [rsp+20h] [rbp-D8h]
long long v35; // [rsp+38h] [rbp-C0h] BYREF
__int128 v36; // [rsp+40h] [rbp-B8h] BYREF
unsigned long long v37; // [rsp+50h] [rbp-A8h]
long long v38; // [rsp+60h] [rbp-98h]
long long v39; // [rsp+68h] [rbp-90h] BYREF
float v40; // [rsp+74h] [rbp-84h]
long long v41; // [rsp+78h] [rbp-80h] BYREF
int v42; // [rsp+80h] [rbp-78h]
int v43; // [rsp+84h] [rbp-74h]
long long v44; // [rsp+88h] [rbp-70h] BYREF
__m128 v45; // [rsp+90h] [rbp-68h]
__m128 v46; // [rsp+A0h] [rbp-58h]
__m128 v47; // [rsp+B0h] [rbp-48h]
v38 = a2;
LOBYTE(v8) = lunasvg::Path::isEmpty((lunasvg::Path *)(a1 + 152));
if ( !(_BYTE)v8 )
{
v9 = a3[33];
*(_QWORD *)&v36 = a3[34];
*((_QWORD *)&v36 + 1) = v9;
Marker = lunasvg::SVGElement::getMarker(a1);
v35 = Marker;
v11 = a3[37];
*(_QWORD *)&v36 = a3[38];
*((_QWORD *)&v36 + 1) = v11;
v12 = lunasvg::SVGElement::getMarker(a1);
v39 = v12;
v13 = a3[41];
*(_QWORD *)&v36 = a3[42];
*((_QWORD *)&v36 + 1) = v13;
v8 = lunasvg::SVGElement::getMarker(a1);
v44 = v8;
if ( v8 || Marker || v12 )
{
v30 = 0.0;
v46 = 0LL;
v36 = 0LL;
v37 = 0LL;
lunasvg::PathIterator::PathIterator((lunasvg::PathIterator *)&v41, (const lunasvg::Path *)(a1 + 152));
v14 = 0;
v15 = 0LL;
v16 = 0.0;
while ( 1 )
{
LOBYTE(v8) = v43;
if ( v43 >= v42 )
break;
v34 = v15;
switch ( (unsigned int)lunasvg::PathIterator::currentSegment(&v41, (long long)&v36) )
{
case 0u:
v16 = v30;
*(_QWORD *)&v30 = v36;
v46 = (__m128)(unsigned long long)v36;
v34 = (__m128)(unsigned long long)v36;
break;
case 1u:
v17 = (__m128)(unsigned long long)v36;
v16 = v30;
goto LABEL_13;
case 2u:
v17 = (__m128)v37;
v16 = *((double *)&v36 + 1);
LABEL_13:
v34 = v17;
v30 = *(double *)v17.m128_u64;
break;
case 3u:
v18 = v30;
v34 = (__m128)(unsigned long long)v36;
_mm_storel_ps(&v30, v46);
v46 = 0LL;
v16 = v18;
break;
default:
break;
}
lunasvg::PathIterator::next((lunasvg::PathIterator *)&v41);
v15 = v34;
v19 = _mm_shuffle_ps(v34, v34, 85);
if ( v43 < v42 && v35 | v39 )
{
v47 = v19;
lunasvg::PathIterator::currentSegment(&v41, (long long)&v36);
v20 = *(float *)&v30;
v21 = *((float *)&v30 + 1);
*(_QWORD *)&a6 = (unsigned int)v36;
*(_QWORD *)&a7 = DWORD1(v36);
if ( !v14 && v35 )
{
v33 = *(float *)&v36;
*(_QWORD *)&v22 = (unsigned int)v36;
v40 = *(float *)&v30;
*(float *)&v22 = *(float *)&v36 - *(float *)&v30;
v32 = *((float *)&v36 + 1);
*(_QWORD *)&v23 = DWORD1(v36);
v45.m128_i32[0] = HIDWORD(v30);
*(float *)&v23 = (float)(atan2f(
*((float *)&v36 + 1) - *((float *)&v30 + 1),
*(float *)&v36 - *(float *)&v30)
* 180.0)
/ 3.1415927;
v31 = LODWORD(v23);
if ( *(_DWORD *)(v35 + 296) == 1 )
{
*(float *)&v23 = *(float *)&v23 + -180.0;
v31 = LODWORD(v23);
}
std::vector<lunasvg::SVGMarkerPosition>::emplace_back<lunasvg::SVGMarkerElement *&,lunasvg::Point &,float &>(
v38,
&v35,
&v30,
&v31,
v23,
v22,
a6,
a7);
*(_QWORD *)&a6 = LODWORD(v33);
*(_QWORD *)&a7 = LODWORD(v32);
v21 = v45.m128_f32[0];
v20 = v40;
}
v15 = v34;
v19 = v47;
if ( v14 && v39 )
{
v33 = *(float *)&a6 - v20;
v32 = *(float *)&a7 - v21;
v19.m128_f32[0] = atan2f(v47.m128_f32[0] - *((float *)&v16 + 1), v34.m128_f32[0] - *(float *)&v16);
v45 = v19;
v19 = (__m128)LODWORD(v32);
v19.m128_f32[0] = atan2f(v32, v33);
v24 = _mm_div_ps(_mm_mul_ps(_mm_unpacklo_ps(v45, v19), (__m128)xmmword_3A8F0), (__m128)xmmword_3A900);
v19.m128_u64[0] = _mm_shuffle_ps(v24, v24, 85).m128_u64[0];
v25.m128_i32[1] = v24.m128_i32[1];
v25.m128_f32[0] = v24.m128_f32[0] - v19.m128_f32[0];
v25.m128_u64[0] &= 0x7FFFFFFF7FFFFFFFuLL;
HIDWORD(v26) = v24.m128_i32[1];
v27 = v24;
*(float *)&v26 = v24.m128_f32[0] + 360.0;
v28 = _mm_cmplt_ss((__m128)0x43340000u, v25);
*(_QWORD *)&a6 = v26 & v28.m128_u64[0];
*(_QWORD *)&a7 = _mm_andnot_ps(v28, v27).m128_u64[0] | *(_QWORD *)&a6;
*(float *)&a7 = (float)(*(float *)&a7 + v19.m128_f32[0]) * 0.5;
v31 = LODWORD(a7);
std::vector<lunasvg::SVGMarkerPosition>::emplace_back<lunasvg::SVGMarkerElement *&,lunasvg::Point &,float &>(
v38,
&v39,
&v30,
&v31,
*(double *)v19.m128_u64,
*(double *)v25.m128_u64,
a6,
a7);
v19.m128_u64[0] = v47.m128_u64[0];
v15 = v34;
}
}
if ( v44 && v43 >= v42 )
{
v34 = v15;
v15.m128_f32[0] = v15.m128_f32[0] - *(float *)&v16;
v19.m128_f32[0] = (float)(atan2f(v19.m128_f32[0] - *((float *)&v16 + 1), v15.m128_f32[0]) * 180.0) / 3.1415927;
v31 = v19.m128_i32[0];
std::vector<lunasvg::SVGMarkerPosition>::emplace_back<lunasvg::SVGMarkerElement *&,lunasvg::Point &,float &>(
v38,
&v44,
&v30,
&v31,
*(double *)v19.m128_u64,
*(double *)v15.m128_u64,
a6,
a7);
v15 = v34;
}
--v14;
}
}
}
return v8;
}
| updateMarkerPositions:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xc8
MOV R15,RDX
MOV qword ptr [RSP + 0x60],RSI
MOV R14,RDI
LEA R13,[RDI + 0x98]
MOV RDI,R13
CALL 0x0010c9b6
TEST AL,AL
JNZ 0x001132c2
MOV RAX,qword ptr [R15 + 0x108]
MOV RCX,qword ptr [R15 + 0x110]
LEA RBP,[RSP + 0x40]
MOV qword ptr [RBP],RCX
MOV qword ptr [RBP + 0x8],RAX
MOV RDI,R14
MOV RSI,RBP
CALL 0x0010ee8a
MOV R12,RAX
MOV qword ptr [RSP + 0x38],RAX
MOV RAX,qword ptr [R15 + 0x128]
MOV RCX,qword ptr [R15 + 0x130]
MOV qword ptr [RBP],RCX
MOV qword ptr [RBP + 0x8],RAX
LEA RBX,[RSP + 0x40]
MOV RDI,R14
MOV RSI,RBX
CALL 0x0010ee8a
MOV RBP,RAX
MOV qword ptr [RSP + 0x68],RAX
MOV RAX,qword ptr [R15 + 0x148]
MOV RCX,qword ptr [R15 + 0x150]
MOV qword ptr [RBX],RCX
MOV qword ptr [RBX + 0x8],RAX
LEA RSI,[RSP + 0x40]
MOV RDI,R14
CALL 0x0010ee8a
MOV qword ptr [RSP + 0x88],RAX
TEST RAX,RAX
JNZ 0x001132d4
TEST R12,R12
JNZ 0x001132d4
TEST RBP,RBP
JNZ 0x001132d4
LAB_001132c2:
ADD RSP,0xc8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001132d4:
LEA R14,[RSP + 0x8]
AND qword ptr [R14],0x0
XORPS XMM1,XMM1
LEA R15,[RSP + 0x40]
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0xa0],XMM0
MOVAPS xmmword ptr [R15],XMM1
AND qword ptr [R15 + 0x10],0x0
LEA R12,[RSP + 0x78]
MOV RDI,R12
MOV RSI,R13
CALL 0x0010ca02
XORPS XMM0,XMM0
MOVSS dword ptr [RSP + 0x4],XMM0
XOR EBX,EBX
LEA RBP,[RSP + 0x14]
LEA R13,[0x13a938]
MOVSS dword ptr [RSP],XMM0
XORPS XMM1,XMM1
LAB_00113328:
MOV EAX,dword ptr [RSP + 0x84]
CMP EAX,dword ptr [RSP + 0x80]
JGE 0x001132c2
MOVAPS xmmword ptr [RSP + 0x20],XMM1
MOV RDI,R12
MOV RSI,R15
CALL 0x0010ca1a
CMP EAX,0x3
JA 0x00113415
MOV EAX,EAX
MOVSXD RAX,dword ptr [R13 + RAX*0x4]
ADD RAX,R13
switchD:
JMP RAX
caseD_0:
MOVSD XMM0,qword ptr [RSP + 0x40]
MOVSS XMM1,dword ptr [RSP + 0x8]
MOVSS dword ptr [RSP + 0x4],XMM1
MOVSS XMM1,dword ptr [RSP + 0xc]
MOVSS dword ptr [RSP],XMM1
MOVSD qword ptr [RSP + 0x8],XMM0
MOVAPS xmmword ptr [RSP + 0xa0],XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
JMP 0x00113415
caseD_2:
MOVSS XMM0,dword ptr [RSP + 0x48]
MOVSS dword ptr [RSP + 0x4],XMM0
MOVSS XMM0,dword ptr [RSP + 0x4c]
MOVSS dword ptr [RSP],XMM0
MOVSD XMM0,qword ptr [RSP + 0x50]
JMP 0x0011340a
caseD_3:
MOVSS XMM0,dword ptr [RSP + 0x8]
MOVSS dword ptr [RSP + 0x4],XMM0
MOVSS XMM0,dword ptr [RSP + 0xc]
MOVSS dword ptr [RSP],XMM0
MOVSD XMM0,qword ptr [RSP + 0x40]
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOVAPS XMM0,xmmword ptr [RSP + 0xa0]
MOVLPS qword ptr [RSP + 0x8],XMM0
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0xa0],XMM0
JMP 0x00113415
caseD_1:
MOVSS XMM0,dword ptr [RSP + 0x8]
MOVSS dword ptr [RSP + 0x4],XMM0
MOVSS XMM0,dword ptr [RSP + 0xc]
MOVSS dword ptr [RSP],XMM0
MOVSD XMM0,qword ptr [RSP + 0x40]
LAB_0011340a:
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOVSD qword ptr [RSP + 0x8],XMM0
default:
MOV RDI,R12
CALL 0x0010ca7a
MOV EAX,dword ptr [RSP + 0x84]
MOVAPS XMM1,xmmword ptr [RSP + 0x20]
MOVAPS XMM0,XMM1
SHUFPS XMM0,XMM1,0x55
CMP EAX,dword ptr [RSP + 0x80]
JGE 0x00113605
MOV RAX,qword ptr [RSP + 0x68]
OR RAX,qword ptr [RSP + 0x38]
JZ 0x00113605
MOVAPS xmmword ptr [RSP + 0xb0],XMM0
MOV RDI,R12
MOV RSI,R15
CALL 0x0010ca1a
MOVSS XMM5,dword ptr [RSP + 0x8]
MOVSS XMM4,dword ptr [RSP + 0xc]
MOVSS XMM2,dword ptr [RSP + 0x40]
MOVSS XMM3,dword ptr [RSP + 0x44]
TEST EBX,EBX
JNZ 0x0011351c
CMP qword ptr [RSP + 0x38],0x0
JZ 0x0011351c
MOVSS dword ptr [RSP + 0x1c],XMM2
MOVAPS XMM1,XMM2
MOVSS dword ptr [RSP + 0x74],XMM5
SUBSS XMM1,XMM5
MOVSS dword ptr [RSP + 0x18],XMM3
MOVAPS XMM0,XMM3
MOVSS dword ptr [RSP + 0x90],XMM4
SUBSS XMM0,XMM4
CALL 0x0010a400
MULSS XMM0,dword ptr [0x0013a928]
DIVSS XMM0,dword ptr [0x0013a92c]
MOVSS dword ptr [RSP + 0x14],XMM0
MOV RAX,qword ptr [RSP + 0x38]
CMP dword ptr [RAX + 0x128],0x1
JNZ 0x001134ec
ADDSS XMM0,dword ptr [0x0013a930]
MOVSS dword ptr [RSP + 0x14],XMM0
LAB_001134ec:
MOV RDI,qword ptr [RSP + 0x60]
LEA RSI,[RSP + 0x38]
MOV RDX,R14
MOV RCX,RBP
CALL 0x001140be
MOVSS XMM2,dword ptr [RSP + 0x1c]
MOVSS XMM3,dword ptr [RSP + 0x18]
MOVSS XMM4,dword ptr [RSP + 0x90]
MOVSS XMM5,dword ptr [RSP + 0x74]
LAB_0011351c:
TEST EBX,EBX
MOVAPS XMM1,xmmword ptr [RSP + 0x20]
MOVAPS XMM0,xmmword ptr [RSP + 0xb0]
JZ 0x00113605
CMP qword ptr [RSP + 0x68],0x0
JZ 0x00113605
MOVAPS XMM1,xmmword ptr [RSP + 0x20]
SUBSS XMM1,dword ptr [RSP + 0x4]
SUBSS XMM0,dword ptr [RSP]
SUBSS XMM2,XMM5
MOVSS dword ptr [RSP + 0x1c],XMM2
SUBSS XMM3,XMM4
MOVSS dword ptr [RSP + 0x18],XMM3
CALL 0x0010a400
MOVAPS xmmword ptr [RSP + 0x90],XMM0
MOVSS XMM0,dword ptr [RSP + 0x18]
MOVSS XMM1,dword ptr [RSP + 0x1c]
CALL 0x0010a400
MOVAPS XMM3,xmmword ptr [RSP + 0x90]
UNPCKLPS XMM3,XMM0
MULPS XMM3,xmmword ptr [0x0013a8f0]
DIVPS XMM3,xmmword ptr [0x0013a900]
MOVAPS XMM0,XMM3
SHUFPS XMM0,XMM3,0x55
MOVAPS XMM1,XMM3
SUBSS XMM1,XMM0
ANDPS XMM1,xmmword ptr [0x0013a910]
MOVAPS XMM2,XMM3
MOVAPS XMM4,XMM3
ADDSS XMM2,dword ptr [0x0013a934]
MOVSS XMM3,dword ptr [0x0013a928]
CMPLTSS XMM3,XMM1
ANDPS XMM2,XMM3
ANDNPS XMM3,XMM4
ORPS XMM3,XMM2
ADDSS XMM3,XMM0
MULSS XMM3,dword ptr [0x0013a920]
MOVSS dword ptr [RSP + 0x14],XMM3
MOV RDI,qword ptr [RSP + 0x60]
LEA RSI,[RSP + 0x68]
MOV RDX,R14
MOV RCX,RBP
CALL 0x001140be
MOVAPS XMM0,xmmword ptr [RSP + 0xb0]
MOVAPS XMM1,xmmword ptr [RSP + 0x20]
LAB_00113605:
CMP qword ptr [RSP + 0x88],0x0
JZ 0x0011366d
MOV EAX,dword ptr [RSP + 0x84]
CMP EAX,dword ptr [RSP + 0x80]
JL 0x0011366d
MOVAPS xmmword ptr [RSP + 0x20],XMM1
MOVAPS XMM1,xmmword ptr [RSP + 0x20]
SUBSS XMM1,dword ptr [RSP + 0x4]
SUBSS XMM0,dword ptr [RSP]
CALL 0x0010a400
MULSS XMM0,dword ptr [0x0013a928]
DIVSS XMM0,dword ptr [0x0013a92c]
MOVSS dword ptr [RSP + 0x14],XMM0
MOV RDI,qword ptr [RSP + 0x60]
LEA RSI,[RSP + 0x88]
MOV RDX,R14
MOV RCX,RBP
CALL 0x001140be
MOVAPS XMM1,xmmword ptr [RSP + 0x20]
LAB_0011366d:
DEC EBX
JMP 0x00113328
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* lunasvg::SVGGeometryElement::updateMarkerPositions(std::vector<lunasvg::SVGMarkerPosition,
std::allocator<lunasvg::SVGMarkerPosition> >&, lunasvg::SVGLayoutState const&) */
void __thiscall
lunasvg::SVGGeometryElement::updateMarkerPositions
(SVGGeometryElement *this,vector *param_1,SVGLayoutState *param_2)
{
char cVar1;
int4 uVar2;
SVGMarkerElement *pSVar3;
SVGMarkerElement *pSVar4;
int iVar5;
uint uVar6;
float fVar7;
float extraout_XMM0_Db;
float extraout_XMM0_Db_00;
float fVar8;
float fVar9;
int1 auVar10 [16];
float fVar11;
float fVar12;
float local_f8;
float local_f4;
float local_f0;
float fStack_ec;
float local_e4;
float local_e0;
float local_dc;
float local_d8;
float fStack_d4;
int8 uStack_d0;
SVGMarkerElement *local_c0;
int8 local_b8;
int8 uStack_b0;
int8 local_a8;
vector *local_98;
SVGMarkerElement *local_90;
float local_84;
PathIterator local_80 [8];
int local_78;
int local_74;
SVGMarkerElement *local_70;
float local_68;
float fStack_64;
float local_58;
float fStack_54;
int8 uStack_50;
float local_48;
float fStack_44;
float fStack_40;
float fStack_3c;
local_98 = param_1;
cVar1 = Path::isEmpty((Path *)(this + 0x98));
if (cVar1 == '\0') {
uStack_b0 = *(int8 *)(param_2 + 0x108);
local_b8 = *(int8 *)(param_2 + 0x110);
pSVar3 = (SVGMarkerElement *)
SVGElement::getMarker((SVGElement *)this,(basic_string_view *)&local_b8);
uStack_b0 = *(int8 *)(param_2 + 0x128);
local_b8 = *(int8 *)(param_2 + 0x130);
local_c0 = pSVar3;
pSVar4 = (SVGMarkerElement *)
SVGElement::getMarker((SVGElement *)this,(basic_string_view *)&local_b8);
uStack_b0 = *(int8 *)(param_2 + 0x148);
local_b8 = *(int8 *)(param_2 + 0x150);
local_90 = pSVar4;
local_70 = (SVGMarkerElement *)
SVGElement::getMarker((SVGElement *)this,(basic_string_view *)&local_b8);
if (((local_70 != (SVGMarkerElement *)0x0) || (pSVar3 != (SVGMarkerElement *)0x0)) ||
(pSVar4 != (SVGMarkerElement *)0x0)) {
local_f0 = 0.0;
fStack_ec = 0.0;
local_58 = 0.0;
fStack_54 = 0.0;
uStack_50 = 0;
local_b8._0_4_ = 0.0;
local_b8._4_4_ = 0.0;
uStack_b0 = 0;
local_a8 = 0;
PathIterator::PathIterator(local_80,(Path *)(this + 0x98));
local_f4 = 0.0;
iVar5 = 0;
local_f8 = 0.0;
local_d8 = 0.0;
fStack_d4 = 0.0;
uStack_d0._0_4_ = 0;
uStack_d0._4_4_ = 0;
while (local_74 < local_78) {
uVar2 = PathIterator::currentSegment(local_80,(array *)&local_b8);
switch(uVar2) {
case 0:
local_f4 = local_f0;
local_f8 = fStack_ec;
local_f0 = (float)local_b8;
fStack_ec = local_b8._4_4_;
local_58 = (float)local_b8;
fStack_54 = local_b8._4_4_;
uStack_50 = 0;
local_d8 = (float)local_b8;
fStack_d4 = local_b8._4_4_;
uStack_d0 = 0;
break;
case 1:
local_f4 = local_f0;
local_f8 = fStack_ec;
local_d8 = (float)local_b8;
fStack_d4 = local_b8._4_4_;
goto LAB_0011340a;
case 2:
local_f4 = (float)uStack_b0;
local_f8 = uStack_b0._4_4_;
local_d8 = (float)local_a8;
fStack_d4 = (float)((ulong)local_a8 >> 0x20);
LAB_0011340a:
uStack_d0 = 0;
local_f0 = local_d8;
fStack_ec = fStack_d4;
break;
case 3:
local_f4 = local_f0;
local_f8 = fStack_ec;
local_d8 = (float)local_b8;
fStack_d4 = local_b8._4_4_;
uStack_d0 = 0;
local_f0 = local_58;
fStack_ec = fStack_54;
local_58 = 0.0;
fStack_54 = 0.0;
uStack_50 = 0;
}
PathIterator::next(local_80);
fVar7 = fStack_d4;
if ((local_74 < local_78) &&
(local_90 != (SVGMarkerElement *)0x0 || local_c0 != (SVGMarkerElement *)0x0)) {
local_48 = fStack_d4;
fStack_44 = fStack_d4;
fStack_40 = fStack_d4;
fStack_3c = fStack_d4;
PathIterator::currentSegment(local_80,(array *)&local_b8);
fVar8 = (float)local_b8;
fVar11 = fStack_ec;
fVar12 = local_f0;
fVar9 = local_b8._4_4_;
if ((iVar5 == 0) && (local_c0 != (SVGMarkerElement *)0x0)) {
local_dc = (float)local_b8;
local_84 = local_f0;
local_e0 = local_b8._4_4_;
local_68 = fStack_ec;
fVar7 = atan2f(local_b8._4_4_ - fStack_ec,(float)local_b8 - local_f0);
local_e4 = (fVar7 * DAT_0013a928) / _DAT_0013a92c;
if (*(int *)(local_c0 + 0x128) == 1) {
local_e4 = local_e4 + _DAT_0013a930;
}
std::vector<lunasvg::SVGMarkerPosition,std::allocator<lunasvg::SVGMarkerPosition>>::
emplace_back<lunasvg::SVGMarkerElement*&,lunasvg::Point&,float&>
((vector<lunasvg::SVGMarkerPosition,std::allocator<lunasvg::SVGMarkerPosition>>
*)local_98,&local_c0,(Point *)&local_f0,&local_e4);
fVar8 = local_dc;
fVar11 = local_68;
fVar12 = local_84;
fVar9 = local_e0;
}
fVar7 = local_48;
if ((iVar5 != 0) && (local_90 != (SVGMarkerElement *)0x0)) {
local_dc = fVar8 - fVar12;
local_e0 = fVar9 - fVar11;
local_68 = atan2f(local_48 - local_f8,local_d8 - local_f4);
fStack_64 = extraout_XMM0_Db;
fVar7 = atan2f(local_e0,local_dc);
auVar10._0_4_ = local_68 * _DAT_0013a8f0;
auVar10._4_4_ = fVar7 * _UNK_0013a8f4;
auVar10._8_4_ = fStack_64 * _UNK_0013a8f8;
auVar10._12_4_ = extraout_XMM0_Db_00 * _UNK_0013a8fc;
auVar10 = divps(auVar10,_DAT_0013a900);
fVar7 = auVar10._0_4_;
uVar6 = -(uint)(DAT_0013a928 < (float)((uint)(fVar7 - auVar10._4_4_) & _DAT_0013a910));
local_e4 = ((float)(~uVar6 & (uint)fVar7 | (uint)(fVar7 + DAT_0013a934) & uVar6) +
auVar10._4_4_) * DAT_0013a920;
std::vector<lunasvg::SVGMarkerPosition,std::allocator<lunasvg::SVGMarkerPosition>>::
emplace_back<lunasvg::SVGMarkerElement*&,lunasvg::Point&,float&>
((vector<lunasvg::SVGMarkerPosition,std::allocator<lunasvg::SVGMarkerPosition>>
*)local_98,&local_90,(Point *)&local_f0,&local_e4);
fVar7 = local_48;
}
}
if ((local_70 != (SVGMarkerElement *)0x0) && (local_78 <= local_74)) {
fVar7 = atan2f(fVar7 - local_f8,local_d8 - local_f4);
local_e4 = (fVar7 * DAT_0013a928) / _DAT_0013a92c;
std::vector<lunasvg::SVGMarkerPosition,std::allocator<lunasvg::SVGMarkerPosition>>::
emplace_back<lunasvg::SVGMarkerElement*&,lunasvg::Point&,float&>
((vector<lunasvg::SVGMarkerPosition,std::allocator<lunasvg::SVGMarkerPosition>>
*)local_98,&local_70,(Point *)&local_f0,&local_e4);
}
iVar5 = iVar5 + -1;
}
}
}
return;
}
| |
27,323 | maria_collect_stats_nonulls_next | eloqsql/storage/maria/ma_check.c | static
int maria_collect_stats_nonulls_next(HA_KEYSEG *keyseg, ulonglong *notnull,
const uchar *prev_key,
const uchar *last_key)
{
uint diffs[2];
size_t first_null_seg, kp;
HA_KEYSEG *seg;
/*
Find the first keypart where values are different or either of them is
NULL. We get results in diffs array:
diffs[0]= 1 + number of first different keypart
diffs[1]=offset: (last_key + diffs[1]) points to first value in
last_key that is NULL or different from corresponding
value in prev_key.
*/
ha_key_cmp(keyseg, prev_key, last_key, USE_WHOLE_KEY,
SEARCH_FIND | SEARCH_NULL_ARE_NOT_EQUAL, diffs);
seg= keyseg + diffs[0] - 1;
/* Find first NULL in last_key */
first_null_seg= ha_find_null(seg, last_key + diffs[1]) - keyseg;
for (kp= 0; kp < first_null_seg; kp++)
notnull[kp]++;
/*
Return 1+ number of first key part where values differ. Don't care if
these were NULLs and not .... We compensate for that in
maria_update_key_parts.
*/
return diffs[0];
} | O3 | c | maria_collect_stats_nonulls_next:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r14
movq %rsi, %rbx
movq %rdi, %r15
leaq -0x28(%rbp), %r12
movq %rdx, %rsi
movq %rcx, %rdx
movl $0xffff, %ecx # imm = 0xFFFF
movl $0x10001, %r8d # imm = 0x10001
movq %r12, %r9
callq 0xbdd92
movl (%r12), %eax
movl 0x4(%r12), %esi
shlq $0x5, %rax
leaq (%r15,%rax), %rdi
addq $-0x20, %rdi
addq %r14, %rsi
callq 0xbe819
subq %r15, %rax
je 0x81b2a
sarq $0x5, %rax
cmpq $0x1, %rax
adcq $0x0, %rax
xorl %ecx, %ecx
incq (%rbx,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0x81b1e
movl -0x28(%rbp), %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| maria_collect_stats_nonulls_next:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov r14, rcx
mov rbx, rsi
mov r15, rdi
lea r12, [rbp+var_28]
mov rsi, rdx
mov rdx, rcx
mov ecx, 0FFFFh
mov r8d, 10001h
mov r9, r12
call ha_key_cmp
mov eax, [r12]
mov esi, [r12+4]
shl rax, 5
lea rdi, [r15+rax]
add rdi, 0FFFFFFFFFFFFFFE0h
add rsi, r14
call ha_find_null
sub rax, r15
jz short loc_81B2A
sar rax, 5
cmp rax, 1
adc rax, 0
xor ecx, ecx
loc_81B1E:
inc qword ptr [rbx+rcx*8]
inc rcx
cmp rax, rcx
jnz short loc_81B1E
loc_81B2A:
mov eax, [rbp+var_28]
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long maria_collect_stats_nonulls_next(long long a1, long long a2, long long a3, long long a4)
{
long long v5; // rax
long long v6; // rax
long long v7; // rcx
_DWORD v9[10]; // [rsp+8h] [rbp-28h] BYREF
ha_key_cmp(a1, a3, a4, 0xFFFFLL, 65537LL, v9);
v5 = ha_find_null(a1 + 32LL * v9[0] - 32, a4 + v9[1]) - a1;
if ( v5 )
{
v6 = (v5 >> 5 == 0) + (v5 >> 5);
v7 = 0LL;
do
++*(_QWORD *)(a2 + 8 * v7++);
while ( v6 != v7 );
}
return v9[0];
}
| maria_collect_stats_nonulls_next:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R14,RCX
MOV RBX,RSI
MOV R15,RDI
LEA R12,[RBP + -0x28]
MOV RSI,RDX
MOV RDX,RCX
MOV ECX,0xffff
MOV R8D,0x10001
MOV R9,R12
CALL 0x001bdd92
MOV EAX,dword ptr [R12]
MOV ESI,dword ptr [R12 + 0x4]
SHL RAX,0x5
LEA RDI,[R15 + RAX*0x1]
ADD RDI,-0x20
ADD RSI,R14
CALL 0x001be819
SUB RAX,R15
JZ 0x00181b2a
SAR RAX,0x5
CMP RAX,0x1
ADC RAX,0x0
XOR ECX,ECX
LAB_00181b1e:
INC qword ptr [RBX + RCX*0x8]
INC RCX
CMP RAX,RCX
JNZ 0x00181b1e
LAB_00181b2a:
MOV EAX,dword ptr [RBP + -0x28]
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
uint maria_collect_stats_nonulls_next(long param_1,long param_2,int8 param_3,long param_4)
{
long *plVar1;
long lVar2;
long lVar3;
uint local_30;
uint local_2c;
ha_key_cmp(param_1,param_3,param_4,0xffff,0x10001,&local_30);
lVar2 = ha_find_null(param_1 + (ulong)local_30 * 0x20 + -0x20,(ulong)local_2c + param_4);
if (lVar2 - param_1 != 0) {
lVar2 = lVar2 - param_1 >> 5;
lVar3 = 0;
do {
plVar1 = (long *)(param_2 + lVar3 * 8);
*plVar1 = *plVar1 + 1;
lVar3 = lVar3 + 1;
} while (lVar2 + (ulong)(lVar2 == 0) != lVar3);
}
return local_30;
}
| |
27,324 | DownSample::forward(ggml_context*, ggml_tensor*) | 7CodeWizard[P]stablediffusion/common.hpp | struct ggml_tensor* forward(struct ggml_context* ctx, struct ggml_tensor* x) {
// x: [N, channels, h, w]
struct ggml_tensor* c = NULL;
if (vae_downsample) {
c = ggml_pad(ctx, x, 1, 1, 0, 0);
c = ggml_nn_conv_2d(ctx, c, op_w, op_b, 2, 2, 0, 0);
} else {
c = ggml_nn_conv_2d(ctx, x, op_w, op_b, 2, 2, 1, 1);
}
return c; // [N, out_channels, h/2, w/2]
} | O2 | cpp | DownSample::forward(ggml_context*, ggml_tensor*):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x1, 0x18(%rdi)
jne 0x2e835
pushq $0x1
popq %rcx
movq %rbx, %rdi
movq %rdx, %rsi
movl %ecx, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x6dea1
movq 0x8(%r14), %rdx
movq 0x10(%r14), %rcx
pushq $0x2
popq %r8
movq %rbx, %rdi
movq %rax, %rsi
movl %r8d, %r9d
pushq $0x0
pushq $0x0
jmp 0x2e855
movq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
pushq $0x1
popq %r10
pushq $0x2
popq %r8
movq %rbx, %rdi
movq %rdx, %rsi
movq %rax, %rdx
movl %r8d, %r9d
pushq %r10
pushq %r10
callq 0x1ce99
addq $0x18, %rsp
popq %rbx
popq %r14
retq
| _ZN10DownSample7forwardEP12ggml_contextP11ggml_tensor:
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
cmp byte ptr [rdi+18h], 1
jnz short loc_2E835
push 1
pop rcx
mov rdi, rbx
mov rsi, rdx
mov edx, ecx
xor r8d, r8d
xor r9d, r9d
call ggml_pad
mov rdx, [r14+8]
mov rcx, [r14+10h]
push 2
pop r8
mov rdi, rbx
mov rsi, rax
mov r9d, r8d
push 0
push 0
jmp short loc_2E855
loc_2E835:
mov rax, [r14+8]
mov rcx, [r14+10h]
push 1
pop r10
push 2
pop r8
mov rdi, rbx
mov rsi, rdx
mov rdx, rax
mov r9d, r8d
push r10
push r10
loc_2E855:
call _ZL15ggml_nn_conv_2dP12ggml_contextP11ggml_tensorS2_S2_iiiiii; ggml_nn_conv_2d(ggml_context *,ggml_tensor *,ggml_tensor *,ggml_tensor *,int,int,int,int,int,int)
add rsp, 18h
pop rbx
pop r14
retn
| long long DownSample::forward(long long a1, long long a2, long long a3)
{
long long v3; // rax
int v4; // eax
if ( *(_BYTE *)(a1 + 24) != 1 )
return ggml_nn_conv_2d(a2, a3, *(_QWORD *)(a1 + 8), *(_QWORD *)(a1 + 16), 2, 2, 1, 1);
v4 = ggml_pad(a2, a3, 1LL, 1LL, 0LL, 0LL, v3);
return ggml_nn_conv_2d(a2, v4, *(_QWORD *)(a1 + 8), *(_QWORD *)(a1 + 16), 2, 2, 0, 0);
}
| forward:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
CMP byte ptr [RDI + 0x18],0x1
JNZ 0x0012e835
PUSH 0x1
POP RCX
MOV RDI,RBX
MOV RSI,RDX
MOV EDX,ECX
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0016dea1
MOV RDX,qword ptr [R14 + 0x8]
MOV RCX,qword ptr [R14 + 0x10]
PUSH 0x2
POP R8
MOV RDI,RBX
MOV RSI,RAX
MOV R9D,R8D
PUSH 0x0
PUSH 0x0
JMP 0x0012e855
LAB_0012e835:
MOV RAX,qword ptr [R14 + 0x8]
MOV RCX,qword ptr [R14 + 0x10]
PUSH 0x1
POP R10
PUSH 0x2
POP R8
MOV RDI,RBX
MOV RSI,RDX
MOV RDX,RAX
MOV R9D,R8D
PUSH R10
PUSH R10
LAB_0012e855:
CALL 0x0011ce99
ADD RSP,0x18
POP RBX
POP R14
RET
|
/* DownSample::forward(ggml_context*, ggml_tensor*) */
void __thiscall DownSample::forward(DownSample *this,ggml_context *param_1,ggml_tensor *param_2)
{
int in_EAX;
ggml_tensor *pgVar1;
ggml_tensor *pgVar2;
int unaff_EBX;
bool bVar3;
bVar3 = this[0x18] != (DownSample)0x1;
if (bVar3) {
pgVar2 = *(ggml_tensor **)(this + 8);
pgVar1 = *(ggml_tensor **)(this + 0x10);
}
else {
param_2 = (ggml_tensor *)ggml_pad(param_1,param_2,1,1,0,0);
pgVar2 = *(ggml_tensor **)(this + 8);
pgVar1 = *(ggml_tensor **)(this + 0x10);
}
ggml_nn_conv_2d(param_1,param_2,pgVar2,pgVar1,2,2,(uint)bVar3,(uint)bVar3,in_EAX,unaff_EBX);
return;
}
| |
27,325 | ggml_opt_result_reset | monkey531[P]llama/ggml/src/ggml-opt.cpp | void ggml_opt_result_reset(ggml_opt_result_t result) {
result->ndata = 0;
result->loss.clear();
result->pred.clear();
result->ncorrect = 0;
} | O1 | cpp | ggml_opt_result_reset:
movq $0x0, (%rdi)
movq 0x8(%rdi), %rax
cmpq %rax, 0x10(%rdi)
je 0x2994c
movq %rax, 0x10(%rdi)
movq 0x20(%rdi), %rax
cmpq %rax, 0x28(%rdi)
je 0x2995a
movq %rax, 0x28(%rdi)
movq $0x0, 0x38(%rdi)
retq
| ggml_opt_result_reset:
mov qword ptr [rdi], 0
mov rax, [rdi+8]
cmp [rdi+10h], rax
jz short loc_2994C
mov [rdi+10h], rax
loc_2994C:
mov rax, [rdi+20h]
cmp [rdi+28h], rax
jz short loc_2995A
mov [rdi+28h], rax
loc_2995A:
mov qword ptr [rdi+38h], 0
retn
| long long ggml_opt_result_reset(_QWORD *a1)
{
long long v1; // rax
long long result; // rax
*a1 = 0LL;
v1 = a1[1];
if ( a1[2] != v1 )
a1[2] = v1;
result = a1[4];
if ( a1[5] != result )
a1[5] = result;
a1[7] = 0LL;
return result;
}
| ggml_opt_result_reset:
MOV qword ptr [RDI],0x0
MOV RAX,qword ptr [RDI + 0x8]
CMP qword ptr [RDI + 0x10],RAX
JZ 0x0012994c
MOV qword ptr [RDI + 0x10],RAX
LAB_0012994c:
MOV RAX,qword ptr [RDI + 0x20]
CMP qword ptr [RDI + 0x28],RAX
JZ 0x0012995a
MOV qword ptr [RDI + 0x28],RAX
LAB_0012995a:
MOV qword ptr [RDI + 0x38],0x0
RET
|
void ggml_opt_result_reset(int8 *param_1)
{
*param_1 = 0;
if (param_1[2] != param_1[1]) {
param_1[2] = param_1[1];
}
if (param_1[5] != param_1[4]) {
param_1[5] = param_1[4];
}
param_1[7] = 0;
return;
}
| |
27,326 | ftxui::operator|=(std::shared_ptr<ftxui::Node>&, std::function<std::shared_ptr<ftxui::Node> (std::shared_ptr<ftxui::Node>)>) | Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/dom/util.cpp | Element& operator|=(Element& e, Decorator d) {
e = e | std::move(d);
return e;
} | O1 | cpp | ftxui::operator|=(std::shared_ptr<ftxui::Node>&, std::function<std::shared_ptr<ftxui::Node> (std::shared_ptr<ftxui::Node>)>):
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
movq (%rdi), %rax
movq %rax, 0x20(%rsp)
movq 0x8(%rdi), %rax
movq %rax, 0x28(%rsp)
testq %rax, %rax
je 0x25f3a
movq 0x34084(%rip), %rcx # 0x59fb0
cmpb $0x0, (%rcx)
je 0x25f36
incl 0x8(%rax)
jmp 0x25f3a
lock
incl 0x8(%rax)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movq 0x18(%rsi), %rax
movq %rax, 0x18(%rsp)
movq 0x10(%rsi), %rax
testq %rax, %rax
je 0x25f6f
movups (%rsi), %xmm1
addq $0x10, %rsi
movaps %xmm1, (%rsp)
movq %rax, 0x10(%rsp)
movups %xmm0, (%rsi)
leaq 0x30(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
callq 0x25e98
movaps 0x30(%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, 0x30(%rsp)
movq 0x8(%rbx), %rdi
movups %xmm0, (%rbx)
testq %rdi, %rdi
je 0x25f9f
callq 0x14c7c
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x25fae
callq 0x14c7c
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x25fc5
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x25fd4
callq 0x14c7c
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
retq
jmp 0x26010
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x25ff9
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x26008
callq 0x14c7c
movq %rbx, %rdi
callq 0xb780
movq %rax, %rdi
callq 0x106a9
| _ZN5ftxuioRERSt10shared_ptrINS_4NodeEESt8functionIFS2_S2_EE:
push rbx
sub rsp, 40h
mov rbx, rdi
mov rax, [rdi]
mov [rsp+48h+var_28], rax
mov rax, [rdi+8]
mov [rsp+48h+var_20], rax
test rax, rax
jz short loc_25F3A
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_25F36
inc dword ptr [rax+8]
jmp short loc_25F3A
loc_25F36:
lock inc dword ptr [rax+8]
loc_25F3A:
xorps xmm0, xmm0
movaps [rsp+48h+var_48], xmm0
mov [rsp+48h+var_38], 0
mov rax, [rsi+18h]
mov [rsp+48h+var_30], rax
mov rax, [rsi+10h]
test rax, rax
jz short loc_25F6F
movups xmm1, xmmword ptr [rsi]
add rsi, 10h
movaps [rsp+48h+var_48], xmm1
mov [rsp+48h+var_38], rax
movups xmmword ptr [rsi], xmm0
loc_25F6F:
lea rdi, [rsp+48h+var_18]
lea rsi, [rsp+48h+var_28]
mov rdx, rsp
call _ZN5ftxuiorESt10shared_ptrINS_4NodeEESt8functionIFS2_S2_EE; ftxui::operator|(std::shared_ptr<ftxui::Node>,std::function<std::shared_ptr<ftxui::Node> ()(std::shared_ptr<ftxui::Node>)>)
movaps xmm0, [rsp+48h+var_18]
xorps xmm1, xmm1
movaps [rsp+48h+var_18], xmm1
mov rdi, [rbx+8]
movups xmmword ptr [rbx], xmm0
test rdi, rdi
jz short loc_25F9F
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_25F9F:
mov rdi, qword ptr [rsp+48h+var_18+8]
test rdi, rdi
jz short loc_25FAE
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_25FAE:
mov rax, [rsp+48h+var_38]
test rax, rax
jz short loc_25FC5
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_25FC5:
mov rdi, [rsp+48h+var_20]
test rdi, rdi
jz short loc_25FD4
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_25FD4:
mov rax, rbx
add rsp, 40h
pop rbx
retn
jmp short loc_26010
mov rbx, rax
mov rax, [rsp+48h+var_38]
test rax, rax
jz short loc_25FF9
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_25FF9:
mov rdi, [rsp+48h+var_20]
test rdi, rdi
jz short loc_26008
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_26008:
mov rdi, rbx
call __Unwind_Resume
loc_26010:
mov rdi, rax
call __clang_call_terminate
| long long * ftxui::operator|=(long long *a1, __int128 *a2)
{
volatile signed __int32 *v3; // rax
void ( *v4)(__int128 *, __int128 *, long long); // rax
__int128 v5; // xmm0
volatile signed __int32 *v6; // rdi
__int128 v8; // [rsp+0h] [rbp-48h] BYREF
void ( *v9)(__int128 *, __int128 *, long long); // [rsp+10h] [rbp-38h]
long long v10; // [rsp+18h] [rbp-30h]
long long v11; // [rsp+20h] [rbp-28h] BYREF
volatile signed __int32 *v12; // [rsp+28h] [rbp-20h]
__int128 v13; // [rsp+30h] [rbp-18h] BYREF
v11 = *a1;
v3 = (volatile signed __int32 *)a1[1];
v12 = v3;
if ( v3 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v3 + 2);
else
_InterlockedIncrement(v3 + 2);
}
v8 = 0LL;
v9 = 0LL;
v10 = *((_QWORD *)a2 + 3);
v4 = (void ( *)(__int128 *, __int128 *, long long))*((_QWORD *)a2 + 2);
if ( v4 )
{
v8 = *a2;
v9 = v4;
a2[1] = 0LL;
}
ftxui::operator|((long long)&v13, &v11, (long long)&v8);
v5 = v13;
v13 = 0LL;
v6 = (volatile signed __int32 *)a1[1];
*(_OWORD *)a1 = v5;
if ( v6 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v6);
if ( *((_QWORD *)&v13 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v13 + 1));
if ( v9 )
v9(&v8, &v8, 3LL);
if ( v12 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v12);
return a1;
}
| operator|=:
PUSH RBX
SUB RSP,0x40
MOV RBX,RDI
MOV RAX,qword ptr [RDI]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RDI + 0x8]
MOV qword ptr [RSP + 0x28],RAX
TEST RAX,RAX
JZ 0x00125f3a
MOV RCX,qword ptr [0x00159fb0]
CMP byte ptr [RCX],0x0
JZ 0x00125f36
INC dword ptr [RAX + 0x8]
JMP 0x00125f3a
LAB_00125f36:
INC.LOCK dword ptr [RAX + 0x8]
LAB_00125f3a:
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
MOV qword ptr [RSP + 0x10],0x0
MOV RAX,qword ptr [RSI + 0x18]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSI + 0x10]
TEST RAX,RAX
JZ 0x00125f6f
MOVUPS XMM1,xmmword ptr [RSI]
ADD RSI,0x10
MOVAPS xmmword ptr [RSP],XMM1
MOV qword ptr [RSP + 0x10],RAX
MOVUPS xmmword ptr [RSI],XMM0
LAB_00125f6f:
LEA RDI,[RSP + 0x30]
LEA RSI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x00125e98
MOVAPS XMM0,xmmword ptr [RSP + 0x30]
XORPS XMM1,XMM1
MOVAPS xmmword ptr [RSP + 0x30],XMM1
MOV RDI,qword ptr [RBX + 0x8]
MOVUPS xmmword ptr [RBX],XMM0
TEST RDI,RDI
JZ 0x00125f9f
CALL 0x00114c7c
LAB_00125f9f:
MOV RDI,qword ptr [RSP + 0x38]
TEST RDI,RDI
JZ 0x00125fae
CALL 0x00114c7c
LAB_00125fae:
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x00125fc5
LAB_00125fb8:
MOV RDI,RSP
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_00125fc5:
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
JZ 0x00125fd4
CALL 0x00114c7c
LAB_00125fd4:
MOV RAX,RBX
ADD RSP,0x40
POP RBX
RET
|
/* ftxui::TEMPNAMEPLACEHOLDERVALUE(std::shared_ptr<ftxui::Node>&,
std::function<std::shared_ptr<ftxui::Node> (std::shared_ptr<ftxui::Node>)>) */
int8 * ftxui::operator|=(int8 *param_1,int8 *param_2)
{
code *pcVar1;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *this;
int4 uVar2;
int4 uVar3;
int4 uVar4;
int4 uVar5;
int8 local_48;
int8 uStack_40;
code *local_38;
int8 local_30;
int8 local_28;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_20;
int8 local_18;
int8 uStack_10;
local_28 = *param_1;
local_20 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)param_1[1];
if (local_20 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_00159fb0 == '\0') {
LOCK();
*(int *)(local_20 + 8) = *(int *)(local_20 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_20 + 8) = *(int *)(local_20 + 8) + 1;
}
}
local_48 = 0;
uStack_40 = 0;
local_38 = (code *)0x0;
local_30 = param_2[3];
pcVar1 = (code *)param_2[2];
if (pcVar1 != (code *)0x0) {
local_48 = *param_2;
uStack_40 = param_2[1];
param_2[2] = 0;
param_2[3] = 0;
local_38 = pcVar1;
}
/* try { // try from 00125f6f to 00125f80 has its CatchHandler @ 00125fdf */
operator|((ftxui *)&local_18,&local_28,&local_48);
uVar2 = (int4)local_18;
uVar3 = local_18._4_4_;
uVar4 = (int4)uStack_10;
uVar5 = uStack_10._4_4_;
local_18 = 0;
uStack_10 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
this = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)param_1[1];
*(int4 *)param_1 = uVar2;
*(int4 *)((long)param_1 + 4) = uVar3;
*(int4 *)(param_1 + 1) = uVar4;
*(int4 *)((long)param_1 + 0xc) = uVar5;
if (this != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(this);
}
if (uStack_10 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(uStack_10);
}
if (local_38 != (code *)0x0) {
/* try { // try from 00125fb8 to 00125fc4 has its CatchHandler @ 00125fdd */
(*local_38)(&local_48,&local_48,3);
}
if (local_20 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_20);
}
return param_1;
}
| |
27,327 | ImPlot::SetupAxisScale(int, int) | zkingston[P]unknot/build_O1/_deps/implot-src/implot.cpp | void SetupAxisScale(ImAxis idx, ImPlotScale scale) {
ImPlotContext& gp = *GImPlot;
IM_ASSERT_USER_ERROR(gp.CurrentPlot != nullptr && !gp.CurrentPlot->SetupLocked,
"Setup needs to be called after BeginPlot and before any setup locking functions (e.g. PlotX)!");
ImPlotPlot& plot = *gp.CurrentPlot;
ImPlotAxis& axis = plot.Axes[idx];
IM_ASSERT_USER_ERROR(axis.Enabled, "Axis is not enabled! Did you forget to call SetupAxis()?");
axis.Scale = scale;
switch (scale)
{
case ImPlotScale_Time:
axis.TransformForward = nullptr;
axis.TransformInverse = nullptr;
axis.TransformData = nullptr;
axis.Locator = Locator_Time;
axis.ConstraintRange = ImPlotRange(IMPLOT_MIN_TIME, IMPLOT_MAX_TIME);
axis.Ticker.Levels = 2;
break;
case ImPlotScale_Log10:
axis.TransformForward = TransformForward_Log10;
axis.TransformInverse = TransformInverse_Log10;
axis.TransformData = nullptr;
axis.Locator = Locator_Log10;
axis.ConstraintRange = ImPlotRange(DBL_MIN, INFINITY);
break;
case ImPlotScale_SymLog:
axis.TransformForward = TransformForward_SymLog;
axis.TransformInverse = TransformInverse_SymLog;
axis.TransformData = nullptr;
axis.Locator = Locator_SymLog;
axis.ConstraintRange = ImPlotRange(-INFINITY, INFINITY);
break;
default:
axis.TransformForward = nullptr;
axis.TransformInverse = nullptr;
axis.TransformData = nullptr;
axis.Locator = nullptr;
axis.ConstraintRange = ImPlotRange(-INFINITY, INFINITY);
break;
}
} | O1 | cpp | ImPlot::SetupAxisScale(int, int):
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movl %edi, %ebp
movq 0x27e3cf(%rip), %r14 # 0x336ca0
movq 0x50(%r14), %rax
testq %rax, %rax
je 0xb88e3
cmpb $0x1, 0x9de(%rax)
jne 0xb88ef
leaq 0x1dc65a(%rip), %rdi # 0x294f44
callq 0x2161f4
movq 0x50(%r14), %rax
movslq %ebp, %rcx
imulq $0x178, %rcx, %rcx # imm = 0x178
leaq (%rax,%rcx), %r14
addq $0x18, %r14
cmpb $0x0, 0x16c(%r14)
jne 0xb891b
leaq 0x1e1cdd(%rip), %rdi # 0x29a5f3
callq 0x2161f4
movl %ebx, 0x24(%r14)
cmpl $0x3, %ebx
je 0xb89b3
cmpl $0x2, %ebx
je 0xb8975
leaq 0xf8(%r14), %rax
cmpl $0x1, %ebx
jne 0xb89ea
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
leaq -0x7e52(%rip), %rax # 0xb0b00
movq %rax, 0xb8(%r14)
movhps 0x1e1a90(%rip), %xmm0 # xmm0 = xmm0[0,1],mem[0,1]
movups %xmm0, 0x40(%r14)
movl $0x2, 0x90(%r14)
jmp 0xb8a09
leaq 0x92(%rip), %rax # 0xb8a0e
movq %rax, 0xf8(%r14)
leaq 0xae(%rip), %rax # 0xb8a38
movq %rax, 0x100(%r14)
movq $0x0, 0x108(%r14)
leaq -0x8e61(%rip), %rax # 0xafb42
movq %rax, 0xb8(%r14)
movaps 0x1e0faf(%rip), %xmm0 # 0x299960
jmp 0xb8a04
leaq -0x8d59(%rip), %rax # 0xafc61
movq %rax, 0xf8(%r14)
leaq 0x80(%rip), %rax # 0xb8a48
movq %rax, 0x100(%r14)
movq $0x0, 0x108(%r14)
leaq -0x8d6c(%rip), %rax # 0xafc75
movq %rax, 0xb8(%r14)
jmp 0xb89fd
xorl %ecx, %ecx
movq %rcx, 0xb8(%r14)
movq %rcx, 0x10(%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movaps 0x1e0f4c(%rip), %xmm0 # 0x299950
movups %xmm0, 0x40(%r14)
popq %rbx
popq %r14
popq %rbp
retq
| _ZN6ImPlot14SetupAxisScaleEii:
push rbp
push r14
push rbx
mov ebx, esi
mov ebp, edi
mov r14, cs:GImPlot
mov rax, [r14+50h]
test rax, rax
jz short loc_B88E3
cmp byte ptr [rax+9DEh], 1
jnz short loc_B88EF
loc_B88E3:
lea rdi, aSetupNeedsToBe; "Setup needs to be called after BeginPlo"...
call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*)
loc_B88EF:
mov rax, [r14+50h]
movsxd rcx, ebp
imul rcx, 178h
lea r14, [rax+rcx]
add r14, 18h
cmp byte ptr [r14+16Ch], 0
jnz short loc_B891B
lea rdi, aAxisIsNotEnabl; "Axis is not enabled! Did you forget to "...
call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*)
loc_B891B:
mov [r14+24h], ebx
cmp ebx, 3
jz loc_B89B3
cmp ebx, 2
jz short loc_B8975
lea rax, [r14+0F8h]
cmp ebx, 1
jnz loc_B89EA
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
mov qword ptr [rax+10h], 0
lea rax, _ZN6ImPlot12Locator_TimeER12ImPlotTickerRK11ImPlotRangefbPFidPciPvES6_; ImPlot::Locator_Time(ImPlotTicker &,ImPlotRange const&,float,bool,int (*)(double,char *,int,void *),void *)
mov [r14+0B8h], rax
movhps xmm0, cs:qword_29A3F0
movups xmmword ptr [r14+40h], xmm0
mov dword ptr [r14+90h], 2
jmp loc_B8A09
loc_B8975:
lea rax, _ZN6ImPlotL22TransformForward_Log10EdPv; ImPlot::TransformForward_Log10(double,void *)
mov [r14+0F8h], rax
lea rax, _ZN6ImPlotL22TransformInverse_Log10EdPv; ImPlot::TransformInverse_Log10(double,void *)
mov [r14+100h], rax
mov qword ptr [r14+108h], 0
lea rax, _ZN6ImPlot13Locator_Log10ER12ImPlotTickerRK11ImPlotRangefbPFidPciPvES6_; ImPlot::Locator_Log10(ImPlotTicker &,ImPlotRange const&,float,bool,int (*)(double,char *,int,void *),void *)
mov [r14+0B8h], rax
movaps xmm0, cs:xmmword_299960
jmp short loc_B8A04
loc_B89B3:
lea rax, _ZN6ImPlotL23TransformForward_SymLogEdPv; ImPlot::TransformForward_SymLog(double,void *)
mov [r14+0F8h], rax
lea rax, _ZN6ImPlotL23TransformInverse_SymLogEdPv; ImPlot::TransformInverse_SymLog(double,void *)
mov [r14+100h], rax
mov qword ptr [r14+108h], 0
lea rax, _ZN6ImPlot14Locator_SymLogER12ImPlotTickerRK11ImPlotRangefbPFidPciPvES6_; ImPlot::Locator_SymLog(ImPlotTicker &,ImPlotRange const&,float,bool,int (*)(double,char *,int,void *),void *)
mov [r14+0B8h], rax
jmp short loc_B89FD
loc_B89EA:
xor ecx, ecx
mov [r14+0B8h], rcx
mov [rax+10h], rcx
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
loc_B89FD:
movaps xmm0, cs:xmmword_299950
loc_B8A04:
movups xmmword ptr [r14+40h], xmm0
loc_B8A09:
pop rbx
pop r14
pop rbp
retn
| unsigned __int16 * ImPlot::SetupAxisScale(ImPlot *this, const char *a2)
{
ImGui *v2; // r14
long long v3; // rax
long long v4; // rax
long long v5; // rcx
__m128 *v6; // r14
unsigned __int16 *result; // rax
__int128 v8; // xmm0
v2 = GImPlot;
v3 = *((_QWORD *)GImPlot + 10);
if ( !v3 || *(_BYTE *)(v3 + 2526) == 1 )
ImGui::ErrorLog(
(ImGui *)"Setup needs to be called after BeginPlot and before any setup locking functions (e.g. PlotX)!",
a2);
v4 = *((_QWORD *)v2 + 10);
v5 = 376LL * (int)this;
v6 = (__m128 *)(v4 + v5 + 24);
if ( !*(_BYTE *)(v4 + v5 + 388) )
ImGui::ErrorLog((ImGui *)"Axis is not enabled! Did you forget to call SetupAxis()?", a2);
v6[2].m128_i32[1] = (int)a2;
if ( (_DWORD)a2 == 3 )
{
v6[15].m128_u64[1] = (unsigned long long)ImPlot::TransformForward_SymLog;
v6[16].m128_u64[0] = (unsigned long long)ImPlot::TransformInverse_SymLog;
v6[16].m128_u64[1] = 0LL;
result = (unsigned __int16 *)ImPlot::Locator_SymLog;
v6[11].m128_u64[1] = (unsigned long long)ImPlot::Locator_SymLog;
LABEL_13:
v8 = xmmword_299950;
goto LABEL_14;
}
if ( (_DWORD)a2 != 2 )
{
result = &v6[15].m128_u16[4];
if ( (_DWORD)a2 == 1 )
{
*(_OWORD *)result = 0LL;
v6[16].m128_u64[1] = 0LL;
result = (unsigned __int16 *)ImPlot::Locator_Time;
v6[11].m128_u64[1] = (unsigned long long)ImPlot::Locator_Time;
v6[4] = _mm_loadh_ps((const double *)&qword_29A3F0);
v6[9].m128_i32[0] = 2;
return result;
}
v6[11].m128_u64[1] = 0LL;
v6[16].m128_u64[1] = 0LL;
*(_OWORD *)result = 0LL;
goto LABEL_13;
}
v6[15].m128_u64[1] = (unsigned long long)ImPlot::TransformForward_Log10;
v6[16].m128_u64[0] = (unsigned long long)ImPlot::TransformInverse_Log10;
v6[16].m128_u64[1] = 0LL;
result = (unsigned __int16 *)ImPlot::Locator_Log10;
v6[11].m128_u64[1] = (unsigned long long)ImPlot::Locator_Log10;
v8 = xmmword_299960;
LABEL_14:
v6[4] = (__m128)v8;
return result;
}
| SetupAxisScale:
PUSH RBP
PUSH R14
PUSH RBX
MOV EBX,ESI
MOV EBP,EDI
MOV R14,qword ptr [0x00436ca0]
MOV RAX,qword ptr [R14 + 0x50]
TEST RAX,RAX
JZ 0x001b88e3
CMP byte ptr [RAX + 0x9de],0x1
JNZ 0x001b88ef
LAB_001b88e3:
LEA RDI,[0x394f44]
CALL 0x003161f4
LAB_001b88ef:
MOV RAX,qword ptr [R14 + 0x50]
MOVSXD RCX,EBP
IMUL RCX,RCX,0x178
LEA R14,[RAX + RCX*0x1]
ADD R14,0x18
CMP byte ptr [R14 + 0x16c],0x0
JNZ 0x001b891b
LEA RDI,[0x39a5f3]
CALL 0x003161f4
LAB_001b891b:
MOV dword ptr [R14 + 0x24],EBX
CMP EBX,0x3
JZ 0x001b89b3
CMP EBX,0x2
JZ 0x001b8975
LEA RAX,[R14 + 0xf8]
CMP EBX,0x1
JNZ 0x001b89ea
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
MOV qword ptr [RAX + 0x10],0x0
LEA RAX,[0x1b0b00]
MOV qword ptr [R14 + 0xb8],RAX
MOVHPS XMM0,qword ptr [0x0039a3f0]
MOVUPS xmmword ptr [R14 + 0x40],XMM0
MOV dword ptr [R14 + 0x90],0x2
JMP 0x001b8a09
LAB_001b8975:
LEA RAX,[0x1b8a0e]
MOV qword ptr [R14 + 0xf8],RAX
LEA RAX,[0x1b8a38]
MOV qword ptr [R14 + 0x100],RAX
MOV qword ptr [R14 + 0x108],0x0
LEA RAX,[0x1afb42]
MOV qword ptr [R14 + 0xb8],RAX
MOVAPS XMM0,xmmword ptr [0x00399960]
JMP 0x001b8a04
LAB_001b89b3:
LEA RAX,[0x1afc61]
MOV qword ptr [R14 + 0xf8],RAX
LEA RAX,[0x1b8a48]
MOV qword ptr [R14 + 0x100],RAX
MOV qword ptr [R14 + 0x108],0x0
LEA RAX,[0x1afc75]
MOV qword ptr [R14 + 0xb8],RAX
JMP 0x001b89fd
LAB_001b89ea:
XOR ECX,ECX
MOV qword ptr [R14 + 0xb8],RCX
MOV qword ptr [RAX + 0x10],RCX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
LAB_001b89fd:
MOVAPS XMM0,xmmword ptr [0x00399950]
LAB_001b8a04:
MOVUPS xmmword ptr [R14 + 0x40],XMM0
LAB_001b8a09:
POP RBX
POP R14
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* ImPlot::SetupAxisScale(int, int) */
void ImPlot::SetupAxisScale(int param_1,int param_2)
{
long lVar1;
int8 uVar2;
int4 uVar3;
int4 uVar4;
int4 uVar5;
int4 uVar6;
lVar1 = GImPlot;
if ((*(long *)(GImPlot + 0x50) == 0) || (*(char *)(*(long *)(GImPlot + 0x50) + 0x9de) == '\x01'))
{
ImGui::ErrorLog(
"Setup needs to be called after BeginPlot and before any setup locking functions (e.g. PlotX)!"
);
}
lVar1 = *(long *)(lVar1 + 0x50) + (long)param_1 * 0x178;
if (*(char *)(lVar1 + 0x184) == '\0') {
ImGui::ErrorLog("Axis is not enabled! Did you forget to call SetupAxis()?");
}
*(int *)(lVar1 + 0x3c) = param_2;
if (param_2 == 3) {
*(code **)(lVar1 + 0x110) = TransformForward_SymLog;
*(code **)(lVar1 + 0x118) = TransformInverse_SymLog;
*(int8 *)(lVar1 + 0x120) = 0;
*(code **)(lVar1 + 0xd0) = Locator_SymLog;
uVar3 = _DAT_00399950;
uVar4 = _UNK_00399954;
uVar5 = _UNK_00399958;
uVar6 = _UNK_0039995c;
}
else if (param_2 == 2) {
*(code **)(lVar1 + 0x110) = TransformForward_Log10;
*(code **)(lVar1 + 0x118) = TransformInverse_Log10;
*(int8 *)(lVar1 + 0x120) = 0;
*(code **)(lVar1 + 0xd0) = Locator_Log10;
uVar3 = _DAT_00399960;
uVar4 = _UNK_00399964;
uVar5 = _UNK_00399968;
uVar6 = _UNK_0039996c;
}
else {
if (param_2 == 1) {
*(int8 *)(lVar1 + 0x110) = 0;
*(int8 *)(lVar1 + 0x118) = 0;
*(int8 *)(lVar1 + 0x120) = 0;
*(code **)(lVar1 + 0xd0) = Locator_Time;
uVar2 = DAT_0039a3f0;
*(int8 *)(lVar1 + 0x58) = 0;
*(int8 *)(lVar1 + 0x60) = uVar2;
*(int4 *)(lVar1 + 0xa8) = 2;
return;
}
*(int8 *)(lVar1 + 0xd0) = 0;
*(int8 *)(lVar1 + 0x120) = 0;
*(int8 *)(lVar1 + 0x110) = 0;
*(int8 *)(lVar1 + 0x118) = 0;
uVar3 = _DAT_00399950;
uVar4 = _UNK_00399954;
uVar5 = _UNK_00399958;
uVar6 = _UNK_0039995c;
}
*(int4 *)(lVar1 + 0x58) = uVar3;
*(int4 *)(lVar1 + 0x5c) = uVar4;
*(int4 *)(lVar1 + 0x60) = uVar5;
*(int4 *)(lVar1 + 100) = uVar6;
return;
}
| |
27,328 | testing::internal::Mutex::Mutex() | AlayaLite/build_O0/_deps/googletest-src/googletest/include/gtest/internal/gtest-port.h | Mutex() {
GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_init(&mutex_, nullptr));
has_owner_ = false;
} | O0 | c | testing::internal::Mutex::Mutex():
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq 0x40(%rsp), %rdi
movq %rdi, 0x20(%rsp)
xorl %eax, %eax
movl %eax, %esi
callq 0xb7f0
movl %eax, 0x3c(%rsp)
cmpl $0x0, 0x3c(%rsp)
je 0x4a439
leaq 0x2bb5f(%rip), %rdx # 0x75f11
leaq 0x38(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movl $0x3, %esi
movl $0x6d3, %ecx # imm = 0x6D3
callq 0x1b8d0
movq 0x10(%rsp), %rdi
callq 0x107d0
movq %rax, %rdi
leaq 0x2bc02(%rip), %rsi # 0x75fe1
callq 0xb460
movq %rax, 0x18(%rsp)
jmp 0x4a3eb
movq 0x18(%rsp), %rdi
leaq 0x2bbae(%rip), %rsi # 0x75fa5
callq 0xb460
movq %rax, 0x8(%rsp)
jmp 0x4a403
movq 0x8(%rsp), %rdi
movl 0x3c(%rsp), %esi
callq 0xb8f0
jmp 0x4a413
leaq 0x38(%rsp), %rdi
callq 0x1ba40
jmp 0x4a439
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x1ba40
jmp 0x4a447
movq 0x20(%rsp), %rax
movb $0x0, 0x28(%rax)
addq $0x48, %rsp
retq
movq 0x30(%rsp), %rdi
callq 0xb910
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
| _ZN7testing8internal5MutexC2Ev:
sub rsp, 48h
mov [rsp+48h+var_8], rdi; __int64
mov rdi, [rsp+48h+var_8]
mov qword ptr [rsp+48h+var_28], rdi; int
xor eax, eax
mov esi, eax
call _pthread_mutex_init
mov [rsp+48h+var_C], eax
cmp [rsp+48h+var_C], 0
jz loc_4A439
lea rdx, aWorkspaceLlm4b_6; "/workspace/llm4binary/github2025/AlayaL"...
lea rdi, [rsp+48h+var_10]; int
mov [rsp+48h+var_38], rdi; int
mov esi, 3
mov ecx, 6D3h
call _ZN7testing8internal8GTestLogC2ENS0_16GTestLogSeverityEPKci; testing::internal::GTestLog::GTestLog(testing::internal::GTestLogSeverity,char const*,int)
mov rdi, [rsp+48h+var_38]; this
call _ZN7testing8internal8GTestLog9GetStreamEv; testing::internal::GTestLog::GetStream(void)
mov rdi, rax
lea rsi, aPthreadMutexIn_0; "pthread_mutex_init(&mutex_, nullptr)"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+48h+var_30], rax
jmp short $+2
loc_4A3EB:
mov rdi, [rsp+48h+var_30]
lea rsi, aFailedWithErro; "failed with error "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov [rsp+48h+var_40], rax
jmp short $+2
loc_4A403:
mov rdi, [rsp+48h+var_40]
mov esi, [rsp+48h+var_C]
call __ZNSolsEi; std::ostream::operator<<(int)
jmp short $+2
loc_4A413:
lea rdi, [rsp+48h+var_10]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
jmp short loc_4A439
mov rcx, rax
mov eax, edx
mov [rsp+arg_28], rcx
mov [rsp+arg_24], eax
lea rdi, [rsp+arg_30]; this
call _ZN7testing8internal8GTestLogD2Ev; testing::internal::GTestLog::~GTestLog()
jmp short loc_4A447
loc_4A439:
mov rax, qword ptr [rsp+48h+var_28]
mov byte ptr [rax+28h], 0
add rsp, 48h
retn
loc_4A447:
mov rdi, [rsp+arg_28]
call __Unwind_Resume
| testing::internal::Mutex * testing::internal::Mutex::Mutex(testing::internal::Mutex *this)
{
void *Stream; // rax
testing::internal::Mutex *result; // rax
long long v3; // [rsp+8h] [rbp-40h]
long long v4; // [rsp+18h] [rbp-30h]
int v5; // [rsp+38h] [rbp-10h] BYREF
unsigned int v6; // [rsp+3Ch] [rbp-Ch]
long long v7; // [rsp+40h] [rbp-8h]
v7 = (long long)this;
v6 = pthread_mutex_init(this, 0LL);
if ( v6 )
{
testing::internal::GTestLog::GTestLog(
(testing::internal::GTestLog *)&v5,
3,
(long long)"/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/include/gtest/internal/gtest-port.h",
1747);
Stream = testing::internal::GTestLog::GetStream((testing::internal::GTestLog *)&v5);
v4 = std::operator<<<std::char_traits<char>>(Stream, "pthread_mutex_init(&mutex_, nullptr)");
v3 = std::operator<<<std::char_traits<char>>(v4, "failed with error ");
std::ostream::operator<<(v3, v6);
testing::internal::GTestLog::~GTestLog((testing::internal::GTestLog *)&v5);
}
result = this;
*((_BYTE *)this + 40) = 0;
return result;
}
| Mutex:
SUB RSP,0x48
MOV qword ptr [RSP + 0x40],RDI
MOV RDI,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x20],RDI
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0010b7f0
MOV dword ptr [RSP + 0x3c],EAX
CMP dword ptr [RSP + 0x3c],0x0
JZ 0x0014a439
LEA RDX,[0x175f11]
LEA RDI,[RSP + 0x38]
MOV qword ptr [RSP + 0x10],RDI
MOV ESI,0x3
MOV ECX,0x6d3
CALL 0x0011b8d0
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x001107d0
MOV RDI,RAX
LAB_0014a3d8:
LEA RSI,[0x175fe1]
CALL 0x0010b460
MOV qword ptr [RSP + 0x18],RAX
JMP 0x0014a3eb
LAB_0014a3eb:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[0x175fa5]
CALL 0x0010b460
MOV qword ptr [RSP + 0x8],RAX
JMP 0x0014a403
LAB_0014a403:
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,dword ptr [RSP + 0x3c]
CALL 0x0010b8f0
LAB_0014a411:
JMP 0x0014a413
LAB_0014a413:
LEA RDI,[RSP + 0x38]
CALL 0x0011ba40
JMP 0x0014a439
LAB_0014a439:
MOV RAX,qword ptr [RSP + 0x20]
MOV byte ptr [RAX + 0x28],0x0
ADD RSP,0x48
RET
|
/* testing::internal::Mutex::Mutex() */
void __thiscall testing::internal::Mutex::Mutex(Mutex *this)
{
ostream *poVar1;
GTestLog local_10 [4];
int local_c;
Mutex *local_8;
local_8 = this;
local_c = pthread_mutex_init((pthread_mutex_t *)this,(pthread_mutexattr_t *)0x0);
if (local_c != 0) {
GTestLog::GTestLog(local_10,3,
"/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/include/gtest/internal/gtest-port.h"
,0x6d3);
poVar1 = (ostream *)GTestLog::GetStream();
/* try { // try from 0014a3d8 to 0014a410 has its CatchHandler @ 0014a41f */
poVar1 = std::operator<<(poVar1,"pthread_mutex_init(&mutex_, nullptr)");
poVar1 = std::operator<<(poVar1,"failed with error ");
std::ostream::operator<<(poVar1,local_c);
GTestLog::~GTestLog(local_10);
}
this[0x28] = (Mutex)0x0;
return;
}
| |
27,329 | init_key_cache_internal | eloqsql/mysys/mf_keycache.c | static
int init_key_cache_internal(KEY_CACHE *keycache, uint key_cache_block_size,
size_t use_mem, uint division_limit,
uint age_threshold, uint changed_blocks_hash_size,
uint partitions,
my_bool use_op_lock)
{
void *keycache_cb;
int blocks;
if (keycache->key_cache_inited)
{
if (use_op_lock)
pthread_mutex_lock(&keycache->op_lock);
keycache_cb= keycache->keycache_cb;
}
else
{
if (partitions == 0)
{
if (!(keycache_cb= (void *) my_malloc(key_memory_KEY_CACHE,
sizeof(SIMPLE_KEY_CACHE_CB),
MYF(0))))
return 0;
((SIMPLE_KEY_CACHE_CB *) keycache_cb)->key_cache_inited= 0;
keycache->key_cache_type= SIMPLE_KEY_CACHE;
keycache->interface_funcs= &simple_key_cache_funcs;
}
else
{
if (!(keycache_cb= (void *) my_malloc(key_memory_KEY_CACHE,
sizeof(PARTITIONED_KEY_CACHE_CB),
MYF(0))))
return 0;
((PARTITIONED_KEY_CACHE_CB *) keycache_cb)->key_cache_inited= 0;
keycache->key_cache_type= PARTITIONED_KEY_CACHE;
keycache->interface_funcs= &partitioned_key_cache_funcs;
}
/*
Initialize op_lock if it's not initialized before.
The mutex may have been initialized before if we are being called
from repartition_key_cache_internal().
*/
if (use_op_lock)
pthread_mutex_init(&keycache->op_lock, MY_MUTEX_INIT_FAST);
keycache->keycache_cb= keycache_cb;
keycache->key_cache_inited= 1;
if (use_op_lock)
pthread_mutex_lock(&keycache->op_lock);
}
if (partitions != 0)
{
((PARTITIONED_KEY_CACHE_CB *) keycache_cb)->partitions= partitions;
}
keycache->can_be_used= 0;
blocks= keycache->interface_funcs->init(keycache_cb, key_cache_block_size,
use_mem, division_limit,
age_threshold, changed_blocks_hash_size);
keycache->partitions= partitions ?
((PARTITIONED_KEY_CACHE_CB *) keycache_cb)->partitions :
0;
DBUG_ASSERT(partitions <= MAX_KEY_CACHE_PARTITIONS);
keycache->key_cache_mem_size=
keycache->partitions ?
((PARTITIONED_KEY_CACHE_CB *) keycache_cb)->key_cache_mem_size :
((SIMPLE_KEY_CACHE_CB *) keycache_cb)->key_cache_mem_size;
if (blocks > 0)
keycache->can_be_used= 1;
if (use_op_lock)
pthread_mutex_unlock(&keycache->op_lock);
return blocks;
} | O3 | c | init_key_cache_internal:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %r12d
movl %ecx, %r13d
movq %rdx, %r14
movq %rdi, %rbx
movl 0x10(%rbp), %ecx
cmpb $0x0, 0x48(%rdi)
je 0x9956c
cmpb $0x0, 0x18(%rbp)
je 0x99563
leaq 0x58(%rbx), %rdi
movl %r8d, %r15d
movl %r13d, -0x2c(%rbp)
movl %esi, %r13d
callq 0x29200
movl %r13d, %esi
movl 0x10(%rbp), %ecx
movl -0x2c(%rbp), %r13d
movl %r15d, %r8d
movq 0x8(%rbx), %r15
jmp 0x99619
movl %esi, -0x30(%rbp)
movl %r8d, -0x34(%rbp)
movl %r12d, -0x2c(%rbp)
leaq 0xb70c7a(%rip), %rax # 0xc0a1f8
movl (%rax), %edi
xorl %r12d, %r12d
testl %ecx, %ecx
je 0x995ae
movl $0x20, %esi
xorl %edx, %edx
callq 0xa11e5
testq %rax, %rax
je 0x99684
movq %rax, %r15
leaq 0x2ee1b2(%rip), %rax # 0x387758
movl $0x1, %r12d
jmp 0x995cd
movl $0x170, %esi # imm = 0x170
xorl %edx, %edx
callq 0xa11e5
testq %rax, %rax
je 0x99684
movq %rax, %r15
leaq 0x2ee13b(%rip), %rax # 0x387708
movb $0x0, (%r15)
movl %r12d, (%rbx)
movq %rax, 0x10(%rbx)
cmpb $0x0, 0x18(%rbp)
je 0x99603
leaq 0x58(%rbx), %r12
leaq 0xb70f87(%rip), %rsi # 0xc0a570
movq %r12, %rdi
callq 0x29320
movq %r15, 0x8(%rbx)
movb $0x1, 0x48(%rbx)
movq %r12, %rdi
callq 0x29200
jmp 0x9960b
movq %r15, 0x8(%rbx)
movb $0x1, 0x48(%rbx)
movl -0x2c(%rbp), %r12d
movl -0x34(%rbp), %r8d
movl 0x10(%rbp), %ecx
movl -0x30(%rbp), %esi
testl %ecx, %ecx
je 0x99621
movl %ecx, 0x1c(%r15)
movb $0x0, 0x49(%rbx)
movq 0x10(%rbx), %rax
movq %r15, %rdi
movq %r14, %rdx
movl %ecx, %r14d
movl %r13d, %ecx
movl %r12d, %r9d
callq *(%rax)
movl %eax, %r12d
testl %r14d, %r14d
je 0x99657
movl 0x1c(%r15), %eax
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
leaq 0x8(,%rcx,8), %rcx
jmp 0x9965e
xorl %eax, %eax
movl $0x8, %ecx
movl %eax, 0x4c(%rbx)
movq (%r15,%rcx), %rax
movq %rax, 0x50(%rbx)
testl %r12d, %r12d
jle 0x99672
movb $0x1, 0x49(%rbx)
cmpb $0x0, 0x18(%rbp)
je 0x99684
addq $0x58, %rbx
movq %rbx, %rdi
callq 0x291c0
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| init_key_cache_internal:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r12d, r9d
mov r13d, ecx
mov r14, rdx
mov rbx, rdi
mov ecx, [rbp+arg_0]
cmp byte ptr [rdi+48h], 0
jz short loc_9956C
cmp [rbp+arg_8], 0
jz short loc_99563
lea rdi, [rbx+58h]
mov r15d, r8d
mov [rbp+var_2C], r13d
mov r13d, esi
call _pthread_mutex_lock
mov esi, r13d
mov ecx, [rbp+arg_0]
mov r13d, [rbp+var_2C]
mov r8d, r15d
loc_99563:
mov r15, [rbx+8]
jmp loc_99619
loc_9956C:
mov [rbp+var_30], esi
mov [rbp+var_34], r8d
mov [rbp+var_2C], r12d
lea rax, key_memory_KEY_CACHE
mov edi, [rax]
xor r12d, r12d
test ecx, ecx
jz short loc_995AE
mov esi, 20h ; ' '
xor edx, edx
call my_malloc
test rax, rax
jz loc_99684
mov r15, rax
lea rax, partitioned_key_cache_funcs
mov r12d, 1
jmp short loc_995CD
loc_995AE:
mov esi, 170h
xor edx, edx
call my_malloc
test rax, rax
jz loc_99684
mov r15, rax
lea rax, simple_key_cache_funcs
loc_995CD:
mov byte ptr [r15], 0
mov [rbx], r12d
mov [rbx+10h], rax
cmp [rbp+arg_8], 0
jz short loc_99603
lea r12, [rbx+58h]
lea rsi, my_fast_mutexattr
mov rdi, r12
call _pthread_mutex_init
mov [rbx+8], r15
mov byte ptr [rbx+48h], 1
mov rdi, r12
call _pthread_mutex_lock
jmp short loc_9960B
loc_99603:
mov [rbx+8], r15
mov byte ptr [rbx+48h], 1
loc_9960B:
mov r12d, [rbp+var_2C]
mov r8d, [rbp+var_34]
mov ecx, [rbp+arg_0]
mov esi, [rbp+var_30]
loc_99619:
test ecx, ecx
jz short loc_99621
mov [r15+1Ch], ecx
loc_99621:
mov byte ptr [rbx+49h], 0
mov rax, [rbx+10h]
mov rdi, r15
mov rdx, r14
mov r14d, ecx
mov ecx, r13d
mov r9d, r12d
call qword ptr [rax]
mov r12d, eax
test r14d, r14d
jz short loc_99657
mov eax, [r15+1Ch]
xor ecx, ecx
test eax, eax
setnz cl
lea rcx, ds:8[rcx*8]
jmp short loc_9965E
loc_99657:
xor eax, eax
mov ecx, 8
loc_9965E:
mov [rbx+4Ch], eax
mov rax, [r15+rcx]
mov [rbx+50h], rax
test r12d, r12d
jle short loc_99672
mov byte ptr [rbx+49h], 1
loc_99672:
cmp [rbp+arg_8], 0
jz short loc_99684
add rbx, 58h ; 'X'
mov rdi, rbx
call _pthread_mutex_unlock
loc_99684:
mov eax, r12d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long init_key_cache_internal(
long long a1,
long long a2,
long long a3,
unsigned int a4,
long long a5,
unsigned int a6,
int a7,
char a8)
{
unsigned int v8; // r12d
int v11; // ecx
unsigned int v12; // r15d
long long v13; // r15
unsigned int v14; // r12d
long long v15; // rax
long long ( **v16)(); // rax
long long v17; // rax
long long v18; // rdx
int v19; // r14d
int v20; // eax
long long v21; // rcx
unsigned int v23; // [rsp+Ch] [rbp-34h]
v8 = a6;
v11 = a7;
if ( *(_BYTE *)(a1 + 72) )
{
if ( a8 )
{
v12 = a5;
pthread_mutex_lock(a1 + 88);
a2 = (unsigned int)a2;
v11 = a7;
a5 = v12;
}
v13 = *(_QWORD *)(a1 + 8);
}
else
{
v23 = a5;
v14 = 0;
if ( a7 )
{
v15 = my_malloc(key_memory_KEY_CACHE, 32LL, 0LL);
if ( !v15 )
return v14;
v13 = v15;
v16 = partitioned_key_cache_funcs;
v14 = 1;
}
else
{
v17 = my_malloc(key_memory_KEY_CACHE, 368LL, 0LL);
if ( !v17 )
return v14;
v13 = v17;
v16 = simple_key_cache_funcs;
}
*(_BYTE *)v13 = 0;
*(_DWORD *)a1 = v14;
*(_QWORD *)(a1 + 16) = v16;
if ( a8 )
{
pthread_mutex_init(a1 + 88, &my_fast_mutexattr);
*(_QWORD *)(a1 + 8) = v13;
*(_BYTE *)(a1 + 72) = 1;
pthread_mutex_lock(a1 + 88);
}
else
{
*(_QWORD *)(a1 + 8) = v13;
*(_BYTE *)(a1 + 72) = 1;
}
v8 = a6;
a5 = v23;
v11 = a7;
a2 = (unsigned int)a2;
}
if ( v11 )
*(_DWORD *)(v13 + 28) = v11;
*(_BYTE *)(a1 + 73) = 0;
v18 = a3;
v19 = v11;
v14 = (**(long long ( ***)(long long, long long, long long, _QWORD, long long, _QWORD))(a1 + 16))(
v13,
a2,
v18,
a4,
a5,
v8);
if ( v19 )
{
v20 = *(_DWORD *)(v13 + 28);
v21 = 8LL * (v20 != 0) + 8;
}
else
{
v20 = 0;
v21 = 8LL;
}
*(_DWORD *)(a1 + 76) = v20;
*(_QWORD *)(a1 + 80) = *(_QWORD *)(v13 + v21);
if ( (int)v14 > 0 )
*(_BYTE *)(a1 + 73) = 1;
if ( a8 )
pthread_mutex_unlock(a1 + 88);
return v14;
}
| init_key_cache_internal:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R12D,R9D
MOV R13D,ECX
MOV R14,RDX
MOV RBX,RDI
MOV ECX,dword ptr [RBP + 0x10]
CMP byte ptr [RDI + 0x48],0x0
JZ 0x0019956c
CMP byte ptr [RBP + 0x18],0x0
JZ 0x00199563
LEA RDI,[RBX + 0x58]
MOV R15D,R8D
MOV dword ptr [RBP + -0x2c],R13D
MOV R13D,ESI
CALL 0x00129200
MOV ESI,R13D
MOV ECX,dword ptr [RBP + 0x10]
MOV R13D,dword ptr [RBP + -0x2c]
MOV R8D,R15D
LAB_00199563:
MOV R15,qword ptr [RBX + 0x8]
JMP 0x00199619
LAB_0019956c:
MOV dword ptr [RBP + -0x30],ESI
MOV dword ptr [RBP + -0x34],R8D
MOV dword ptr [RBP + -0x2c],R12D
LEA RAX,[0xd0a1f8]
MOV EDI,dword ptr [RAX]
XOR R12D,R12D
TEST ECX,ECX
JZ 0x001995ae
MOV ESI,0x20
XOR EDX,EDX
CALL 0x001a11e5
TEST RAX,RAX
JZ 0x00199684
MOV R15,RAX
LEA RAX,[0x487758]
MOV R12D,0x1
JMP 0x001995cd
LAB_001995ae:
MOV ESI,0x170
XOR EDX,EDX
CALL 0x001a11e5
TEST RAX,RAX
JZ 0x00199684
MOV R15,RAX
LEA RAX,[0x487708]
LAB_001995cd:
MOV byte ptr [R15],0x0
MOV dword ptr [RBX],R12D
MOV qword ptr [RBX + 0x10],RAX
CMP byte ptr [RBP + 0x18],0x0
JZ 0x00199603
LEA R12,[RBX + 0x58]
LEA RSI,[0xd0a570]
MOV RDI,R12
CALL 0x00129320
MOV qword ptr [RBX + 0x8],R15
MOV byte ptr [RBX + 0x48],0x1
MOV RDI,R12
CALL 0x00129200
JMP 0x0019960b
LAB_00199603:
MOV qword ptr [RBX + 0x8],R15
MOV byte ptr [RBX + 0x48],0x1
LAB_0019960b:
MOV R12D,dword ptr [RBP + -0x2c]
MOV R8D,dword ptr [RBP + -0x34]
MOV ECX,dword ptr [RBP + 0x10]
MOV ESI,dword ptr [RBP + -0x30]
LAB_00199619:
TEST ECX,ECX
JZ 0x00199621
MOV dword ptr [R15 + 0x1c],ECX
LAB_00199621:
MOV byte ptr [RBX + 0x49],0x0
MOV RAX,qword ptr [RBX + 0x10]
MOV RDI,R15
MOV RDX,R14
MOV R14D,ECX
MOV ECX,R13D
MOV R9D,R12D
CALL qword ptr [RAX]
MOV R12D,EAX
TEST R14D,R14D
JZ 0x00199657
MOV EAX,dword ptr [R15 + 0x1c]
XOR ECX,ECX
TEST EAX,EAX
SETNZ CL
LEA RCX,[0x8 + RCX*0x8]
JMP 0x0019965e
LAB_00199657:
XOR EAX,EAX
MOV ECX,0x8
LAB_0019965e:
MOV dword ptr [RBX + 0x4c],EAX
MOV RAX,qword ptr [R15 + RCX*0x1]
MOV qword ptr [RBX + 0x50],RAX
TEST R12D,R12D
JLE 0x00199672
MOV byte ptr [RBX + 0x49],0x1
LAB_00199672:
CMP byte ptr [RBP + 0x18],0x0
JZ 0x00199684
ADD RBX,0x58
MOV RDI,RBX
CALL 0x001291c0
LAB_00199684:
MOV EAX,R12D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int init_key_cache_internal
(int4 *param_1,ulong param_2,int8 param_3,int4 param_4,ulong param_5
,int4 param_6,int param_7,char param_8)
{
int iVar1;
int iVar2;
int1 *puVar3;
int1 *puVar4;
long lVar5;
int4 uVar6;
if (*(char *)(param_1 + 0x12) == '\0') {
uVar6 = 0;
if (param_7 == 0) {
puVar3 = (int1 *)my_malloc(key_memory_KEY_CACHE,0x170,0);
if (puVar3 == (int1 *)0x0) {
return 0;
}
puVar4 = simple_key_cache_funcs;
}
else {
puVar3 = (int1 *)my_malloc(key_memory_KEY_CACHE,0x20,0);
if (puVar3 == (int1 *)0x0) {
return 0;
}
puVar4 = partitioned_key_cache_funcs;
uVar6 = 1;
}
*puVar3 = 0;
*param_1 = uVar6;
*(int1 **)(param_1 + 4) = puVar4;
if (param_8 == '\0') {
*(int1 **)(param_1 + 2) = puVar3;
*(int1 *)(param_1 + 0x12) = 1;
}
else {
pthread_mutex_init((pthread_mutex_t *)(param_1 + 0x16),
(pthread_mutexattr_t *)&my_fast_mutexattr);
*(int1 **)(param_1 + 2) = puVar3;
*(int1 *)(param_1 + 0x12) = 1;
pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x16));
}
param_5 = param_5 & 0xffffffff;
param_2 = param_2 & 0xffffffff;
}
else {
if (param_8 != '\0') {
param_5 = param_5 & 0xffffffff;
param_2 = param_2 & 0xffffffff;
pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x16));
}
puVar3 = *(int1 **)(param_1 + 2);
}
if (param_7 != 0) {
*(int *)(puVar3 + 0x1c) = param_7;
}
*(int1 *)((long)param_1 + 0x49) = 0;
iVar1 = (*(code *)**(int8 **)(param_1 + 4))(puVar3,param_2,param_3,param_4,param_5,param_6);
if (param_7 == 0) {
iVar2 = 0;
lVar5 = 8;
}
else {
iVar2 = *(int *)(puVar3 + 0x1c);
lVar5 = (ulong)(iVar2 != 0) * 8 + 8;
}
param_1[0x13] = iVar2;
*(int8 *)(param_1 + 0x14) = *(int8 *)(puVar3 + lVar5);
if (0 < iVar1) {
*(int1 *)((long)param_1 + 0x49) = 1;
}
if (param_8 != '\0') {
pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x16));
}
return iVar1;
}
| |
27,330 | my_strxfrm_pad_desc_and_reverse | eloqsql/strings/ctype-simple.c | size_t
my_strxfrm_pad_desc_and_reverse(CHARSET_INFO *cs,
uchar *str, uchar *frmend, uchar *strend,
uint nweights, uint flags, uint level)
{
if (nweights && frmend < strend && (flags & MY_STRXFRM_PAD_WITH_SPACE))
{
uint fill_length= MY_MIN((uint) (strend - frmend), nweights * cs->mbminlen);
my_ci_fill(cs, (char*) frmend, fill_length, cs->pad_char);
frmend+= fill_length;
}
my_strxfrm_desc_and_reverse(str, frmend, flags, level);
if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && frmend < strend)
{
size_t fill_length= strend - frmend;
my_ci_fill(cs, (char*) frmend, fill_length, cs->pad_char);
frmend= strend;
}
return frmend - str;
} | O3 | c | my_strxfrm_pad_desc_and_reverse:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %r13d
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, -0x30(%rbp)
movq %rdi, %r12
movl 0x10(%rbp), %ecx
testl %r8d, %r8d
sete %al
cmpq %r15, %rdx
setae %sil
testb $0x40, %r13b
sete %dl
orb %al, %dl
orb %sil, %dl
jne 0x4aada
movl %r8d, %ebx
movl %r15d, %eax
subl %r14d, %eax
imull 0x98(%r12), %ebx
cmpl %eax, %ebx
cmovael %eax, %ebx
movzbl 0xb0(%r12), %ecx
movq 0xb8(%r12), %rax
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq *0x78(%rax)
movl 0x10(%rbp), %ecx
addq %rbx, %r14
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
movl %r13d, %edx
callq 0x4c432
testb %r13b, %r13b
jns 0x4ab19
cmpq %r15, %r14
jae 0x4ab19
movq %r15, %rdx
subq %r14, %rdx
movzbl 0xb0(%r12), %ecx
movq 0xb8(%r12), %rax
movq %r12, %rdi
movq %r14, %rsi
callq *0x78(%rax)
movq %r15, %r14
subq %rbx, %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_strxfrm_pad_desc_and_reverse:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r13d, r9d
mov r15, rcx
mov r14, rdx
mov [rbp+var_30], rsi
mov r12, rdi
mov ecx, [rbp+arg_0]
test r8d, r8d
setz al
cmp rdx, r15
setnb sil
test r13b, 40h
setz dl
or dl, al
or dl, sil
jnz short loc_4AADA
mov ebx, r8d
mov eax, r15d
sub eax, r14d
imul ebx, [r12+98h]
cmp ebx, eax
cmovnb ebx, eax
movzx ecx, byte ptr [r12+0B0h]
mov rax, [r12+0B8h]
mov rdi, r12
mov rsi, r14
mov rdx, rbx
call qword ptr [rax+78h]
mov ecx, [rbp+arg_0]
add r14, rbx
loc_4AADA:
mov rbx, [rbp+var_30]
mov rdi, rbx
mov rsi, r14
mov edx, r13d
call my_strxfrm_desc_and_reverse
test r13b, r13b
jns short loc_4AB19
cmp r14, r15
jnb short loc_4AB19
mov rdx, r15
sub rdx, r14
movzx ecx, byte ptr [r12+0B0h]
mov rax, [r12+0B8h]
mov rdi, r12
mov rsi, r14
call qword ptr [rax+78h]
mov r14, r15
loc_4AB19:
sub r14, rbx
mov rax, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_strxfrm_pad_desc_and_reverse(
long long a1,
long long a2,
unsigned long long a3,
unsigned long long a4,
int a5,
unsigned int a6,
unsigned int a7)
{
unsigned long long v9; // r14
long long v10; // rcx
long long v11; // rbx
v9 = a3;
v10 = a7;
if ( a3 < a4 && a5 != 0 && (a6 & 0x40) != 0 )
{
v11 = (unsigned int)(*(_DWORD *)(a1 + 152) * a5);
if ( (unsigned int)v11 >= (int)a4 - (int)a3 )
v11 = (unsigned int)(a4 - a3);
(*(void ( **)(long long, unsigned long long, long long, _QWORD))(*(_QWORD *)(a1 + 184) + 120LL))(
a1,
a3,
v11,
*(unsigned __int8 *)(a1 + 176));
v10 = a7;
v9 += v11;
}
my_strxfrm_desc_and_reverse(a2, v9, a6, v10);
if ( (a6 & 0x80u) != 0 && v9 < a4 )
{
(*(void ( **)(long long, unsigned long long, unsigned long long, _QWORD))(*(_QWORD *)(a1 + 184) + 120LL))(
a1,
v9,
a4 - v9,
*(unsigned __int8 *)(a1 + 176));
v9 = a4;
}
return v9 - a2;
}
| my_strxfrm_pad_desc_and_reverse:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R13D,R9D
MOV R15,RCX
MOV R14,RDX
MOV qword ptr [RBP + -0x30],RSI
MOV R12,RDI
MOV ECX,dword ptr [RBP + 0x10]
TEST R8D,R8D
SETZ AL
CMP RDX,R15
SETNC SIL
TEST R13B,0x40
SETZ DL
OR DL,AL
OR DL,SIL
JNZ 0x0014aada
MOV EBX,R8D
MOV EAX,R15D
SUB EAX,R14D
IMUL EBX,dword ptr [R12 + 0x98]
CMP EBX,EAX
CMOVNC EBX,EAX
MOVZX ECX,byte ptr [R12 + 0xb0]
MOV RAX,qword ptr [R12 + 0xb8]
MOV RDI,R12
MOV RSI,R14
MOV RDX,RBX
CALL qword ptr [RAX + 0x78]
MOV ECX,dword ptr [RBP + 0x10]
ADD R14,RBX
LAB_0014aada:
MOV RBX,qword ptr [RBP + -0x30]
MOV RDI,RBX
MOV RSI,R14
MOV EDX,R13D
CALL 0x0014c432
TEST R13B,R13B
JNS 0x0014ab19
CMP R14,R15
JNC 0x0014ab19
MOV RDX,R15
SUB RDX,R14
MOVZX ECX,byte ptr [R12 + 0xb0]
MOV RAX,qword ptr [R12 + 0xb8]
MOV RDI,R12
MOV RSI,R14
CALL qword ptr [RAX + 0x78]
MOV R14,R15
LAB_0014ab19:
SUB R14,RBX
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_strxfrm_pad_desc_and_reverse
(long param_1,long param_2,ulong param_3,ulong param_4,int param_5,uint param_6,
int4 param_7)
{
uint uVar1;
uint uVar2;
if (((param_6 & 0x40) != 0 && param_5 != 0) && param_3 < param_4) {
uVar1 = (int)param_4 - (int)param_3;
uVar2 = param_5 * *(int *)(param_1 + 0x98);
if (uVar1 <= uVar2) {
uVar2 = uVar1;
}
(**(code **)(*(long *)(param_1 + 0xb8) + 0x78))
(param_1,param_3,(ulong)uVar2,*(int1 *)(param_1 + 0xb0));
param_3 = param_3 + uVar2;
}
my_strxfrm_desc_and_reverse(param_2,param_3,param_6,param_7);
if (((char)param_6 < '\0') && (param_3 < param_4)) {
(**(code **)(*(long *)(param_1 + 0xb8) + 0x78))
(param_1,param_3,param_4 - param_3,*(int1 *)(param_1 + 0xb0));
param_3 = param_4;
}
return param_3 - param_2;
}
| |
27,331 | GetCurrentMonitor | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/platforms/rcore_desktop_glfw.c | int GetCurrentMonitor(void)
{
int index = 0;
int monitorCount = 0;
GLFWmonitor **monitors = glfwGetMonitors(&monitorCount);
GLFWmonitor *monitor = NULL;
if (monitorCount >= 1)
{
if (IsWindowFullscreen())
{
// Get the handle of the monitor that the specified window is in full screen on
monitor = glfwGetWindowMonitor(platform.handle);
for (int i = 0; i < monitorCount; i++)
{
if (monitors[i] == monitor)
{
index = i;
break;
}
}
}
else
{
// In case the window is between two monitors, we use below logic
// to try to detect the "current monitor" for that window, note that
// this is probably an overengineered solution for a very side case
// trying to match SDL behaviour
int closestDist = 0x7FFFFFFF;
// Window center position
int wcx = 0;
int wcy = 0;
glfwGetWindowPos(platform.handle, &wcx, &wcy);
wcx += (int)CORE.Window.screen.width/2;
wcy += (int)CORE.Window.screen.height/2;
for (int i = 0; i < monitorCount; i++)
{
// Monitor top-left position
int mx = 0;
int my = 0;
monitor = monitors[i];
glfwGetMonitorPos(monitor, &mx, &my);
const GLFWvidmode *mode = glfwGetVideoMode(monitor);
if (mode)
{
const int right = mx + mode->width - 1;
const int bottom = my + mode->height - 1;
if ((wcx >= mx) &&
(wcx <= right) &&
(wcy >= my) &&
(wcy <= bottom))
{
index = i;
break;
}
int xclosest = wcx;
if (wcx < mx) xclosest = mx;
else if (wcx > right) xclosest = right;
int yclosest = wcy;
if (wcy < my) yclosest = my;
else if (wcy > bottom) yclosest = bottom;
int dx = wcx - xclosest;
int dy = wcy - yclosest;
int dist = (dx*dx) + (dy*dy);
if (dist < closestDist)
{
index = i;
closestDist = dist;
}
}
else TRACELOG(LOG_WARNING, "GLFW: Failed to find video mode for selected monitor");
}
}
}
return index;
} | O0 | c | GetCurrentMonitor:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl $0x0, -0x4(%rbp)
movl $0x0, -0x8(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x18ab10
movq %rax, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
cmpl $0x1, -0x8(%rbp)
jl 0xc903e
callq 0xca0f0
testb $0x1, %al
jne 0xc8e50
jmp 0xc8e9b
movq 0x152911(%rip), %rdi # 0x21b768
callq 0x18f1c0
movq %rax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0xc8e96
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq -0x18(%rbp), %rax
jne 0xc8e89
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xc8e96
jmp 0xc8e8b
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xc8e67
jmp 0xc903c
movl $0x7fffffff, -0x20(%rbp) # imm = 0x7FFFFFFF
movl $0x0, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movq 0x1528b1(%rip), %rdi # 0x21b768
leaq -0x24(%rbp), %rsi
leaq -0x28(%rbp), %rdx
callq 0x18df10
movl 0x151de2(%rip), %eax # 0x21acac
movl $0x2, %ecx
cltd
idivl %ecx
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl 0x151dd2(%rip), %eax # 0x21acb0
movl $0x2, %ecx
cltd
idivl %ecx
addl -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0xc903a
movl $0x0, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x30(%rbp), %rsi
leaq -0x34(%rbp), %rdx
callq 0x18ac20
movq -0x18(%rbp), %rdi
callq 0x18b1f0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0xc9017
movl -0x30(%rbp), %eax
movq -0x40(%rbp), %rcx
addl (%rcx), %eax
subl $0x1, %eax
movl %eax, -0x44(%rbp)
movl -0x34(%rbp), %eax
movq -0x40(%rbp), %rcx
addl 0x4(%rcx), %eax
subl $0x1, %eax
movl %eax, -0x48(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x30(%rbp), %eax
jl 0xc8f90
movl -0x24(%rbp), %eax
cmpl -0x44(%rbp), %eax
jg 0xc8f90
movl -0x28(%rbp), %eax
cmpl -0x34(%rbp), %eax
jl 0xc8f90
movl -0x28(%rbp), %eax
cmpl -0x48(%rbp), %eax
jg 0xc8f90
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xc903a
movl -0x24(%rbp), %eax
movl %eax, -0x4c(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x30(%rbp), %eax
jge 0xc8fa6
movl -0x30(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0xc8fb6
movl -0x24(%rbp), %eax
cmpl -0x44(%rbp), %eax
jle 0xc8fb4
movl -0x44(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0xc8fb6
movl -0x28(%rbp), %eax
movl %eax, -0x50(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x34(%rbp), %eax
jge 0xc8fcc
movl -0x34(%rbp), %eax
movl %eax, -0x50(%rbp)
jmp 0xc8fdc
movl -0x28(%rbp), %eax
cmpl -0x48(%rbp), %eax
jle 0xc8fda
movl -0x48(%rbp), %eax
movl %eax, -0x50(%rbp)
jmp 0xc8fdc
movl -0x24(%rbp), %eax
subl -0x4c(%rbp), %eax
movl %eax, -0x54(%rbp)
movl -0x28(%rbp), %eax
subl -0x50(%rbp), %eax
movl %eax, -0x58(%rbp)
movl -0x54(%rbp), %eax
imull -0x54(%rbp), %eax
movl -0x58(%rbp), %ecx
imull -0x58(%rbp), %ecx
addl %ecx, %eax
movl %eax, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0xc9015
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x5c(%rbp), %eax
movl %eax, -0x20(%rbp)
jmp 0xc902a
movl $0x4, %edi
leaq 0xec30a(%rip), %rsi # 0x1b532d
movb $0x0, %al
callq 0x182c40
jmp 0xc902c
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xc8ef3
jmp 0xc903c
jmp 0xc903e
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| GetCurrentMonitor:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_4], 0
mov [rbp+var_8], 0
lea rdi, [rbp+var_8]
call glfwGetMonitors
mov [rbp+var_10], rax
mov [rbp+var_18], 0
cmp [rbp+var_8], 1
jl loc_C903E
call IsWindowFullscreen
test al, 1
jnz short loc_C8E50
jmp short loc_C8E9B
loc_C8E50:
mov rdi, cs:platform
call glfwGetWindowMonitor
mov [rbp+var_18], rax
mov [rbp+var_1C], 0
loc_C8E67:
mov eax, [rbp+var_1C]
cmp eax, [rbp+var_8]
jge short loc_C8E96
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_1C]
mov rax, [rax+rcx*8]
cmp rax, [rbp+var_18]
jnz short loc_C8E89
mov eax, [rbp+var_1C]
mov [rbp+var_4], eax
jmp short loc_C8E96
loc_C8E89:
jmp short $+2
loc_C8E8B:
mov eax, [rbp+var_1C]
add eax, 1
mov [rbp+var_1C], eax
jmp short loc_C8E67
loc_C8E96:
jmp loc_C903C
loc_C8E9B:
mov [rbp+var_20], 7FFFFFFFh
mov [rbp+var_24], 0
mov [rbp+var_28], 0
mov rdi, cs:platform
lea rsi, [rbp+var_24]
lea rdx, [rbp+var_28]
call glfwGetWindowPos
mov eax, dword ptr cs:qword_21ACAC
mov ecx, 2
cdq
idiv ecx
add eax, [rbp+var_24]
mov [rbp+var_24], eax
mov eax, dword ptr cs:qword_21ACAC+4
mov ecx, 2
cdq
idiv ecx
add eax, [rbp+var_28]
mov [rbp+var_28], eax
mov [rbp+var_2C], 0
loc_C8EF3:
mov eax, [rbp+var_2C]
cmp eax, [rbp+var_8]
jge loc_C903A
mov [rbp+var_30], 0
mov [rbp+var_34], 0
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_2C]
mov rax, [rax+rcx*8]
mov [rbp+var_18], rax
mov rdi, [rbp+var_18]
lea rsi, [rbp+var_30]
lea rdx, [rbp+var_34]
call glfwGetMonitorPos
mov rdi, [rbp+var_18]
call glfwGetVideoMode
mov [rbp+var_40], rax
cmp [rbp+var_40], 0
jz loc_C9017
mov eax, [rbp+var_30]
mov rcx, [rbp+var_40]
add eax, [rcx]
sub eax, 1
mov [rbp+var_44], eax
mov eax, [rbp+var_34]
mov rcx, [rbp+var_40]
add eax, [rcx+4]
sub eax, 1
mov [rbp+var_48], eax
mov eax, [rbp+var_24]
cmp eax, [rbp+var_30]
jl short loc_C8F90
mov eax, [rbp+var_24]
cmp eax, [rbp+var_44]
jg short loc_C8F90
mov eax, [rbp+var_28]
cmp eax, [rbp+var_34]
jl short loc_C8F90
mov eax, [rbp+var_28]
cmp eax, [rbp+var_48]
jg short loc_C8F90
mov eax, [rbp+var_2C]
mov [rbp+var_4], eax
jmp loc_C903A
loc_C8F90:
mov eax, [rbp+var_24]
mov [rbp+var_4C], eax
mov eax, [rbp+var_24]
cmp eax, [rbp+var_30]
jge short loc_C8FA6
mov eax, [rbp+var_30]
mov [rbp+var_4C], eax
jmp short loc_C8FB6
loc_C8FA6:
mov eax, [rbp+var_24]
cmp eax, [rbp+var_44]
jle short loc_C8FB4
mov eax, [rbp+var_44]
mov [rbp+var_4C], eax
loc_C8FB4:
jmp short $+2
loc_C8FB6:
mov eax, [rbp+var_28]
mov [rbp+var_50], eax
mov eax, [rbp+var_28]
cmp eax, [rbp+var_34]
jge short loc_C8FCC
mov eax, [rbp+var_34]
mov [rbp+var_50], eax
jmp short loc_C8FDC
loc_C8FCC:
mov eax, [rbp+var_28]
cmp eax, [rbp+var_48]
jle short loc_C8FDA
mov eax, [rbp+var_48]
mov [rbp+var_50], eax
loc_C8FDA:
jmp short $+2
loc_C8FDC:
mov eax, [rbp+var_24]
sub eax, [rbp+var_4C]
mov [rbp+var_54], eax
mov eax, [rbp+var_28]
sub eax, [rbp+var_50]
mov [rbp+var_58], eax
mov eax, [rbp+var_54]
imul eax, [rbp+var_54]
mov ecx, [rbp+var_58]
imul ecx, [rbp+var_58]
add eax, ecx
mov [rbp+var_5C], eax
mov eax, [rbp+var_5C]
cmp eax, [rbp+var_20]
jge short loc_C9015
mov eax, [rbp+var_2C]
mov [rbp+var_4], eax
mov eax, [rbp+var_5C]
mov [rbp+var_20], eax
loc_C9015:
jmp short loc_C902A
loc_C9017:
mov edi, 4
lea rsi, aGlfwFailedToFi; "GLFW: Failed to find video mode for sel"...
mov al, 0
call TraceLog
loc_C902A:
jmp short $+2
loc_C902C:
mov eax, [rbp+var_2C]
add eax, 1
mov [rbp+var_2C], eax
jmp loc_C8EF3
loc_C903A:
jmp short $+2
loc_C903C:
jmp short $+2
loc_C903E:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
| long long GetCurrentMonitor()
{
int v0; // edx
int v1; // ecx
int v2; // r8d
int v3; // r9d
int v5; // [rsp+10h] [rbp-50h]
int v6; // [rsp+14h] [rbp-4Ch]
int v7; // [rsp+18h] [rbp-48h]
int v8; // [rsp+1Ch] [rbp-44h]
_DWORD *VideoMode; // [rsp+20h] [rbp-40h]
int v10; // [rsp+2Ch] [rbp-34h] BYREF
int v11; // [rsp+30h] [rbp-30h] BYREF
int j; // [rsp+34h] [rbp-2Ch]
int v13; // [rsp+38h] [rbp-28h] BYREF
int v14; // [rsp+3Ch] [rbp-24h] BYREF
int v15; // [rsp+40h] [rbp-20h]
int i; // [rsp+44h] [rbp-1Ch]
long long WindowMonitor; // [rsp+48h] [rbp-18h]
long long Monitors; // [rsp+50h] [rbp-10h]
int v19; // [rsp+58h] [rbp-8h] BYREF
unsigned int v20; // [rsp+5Ch] [rbp-4h]
v20 = 0;
v19 = 0;
Monitors = glfwGetMonitors(&v19);
WindowMonitor = 0LL;
if ( v19 >= 1 )
{
if ( (IsWindowFullscreen() & 1) != 0 )
{
WindowMonitor = glfwGetWindowMonitor(platform);
for ( i = 0; i < v19; ++i )
{
if ( *(_QWORD *)(Monitors + 8LL * i) == WindowMonitor )
return (unsigned int)i;
}
}
else
{
v15 = 0x7FFFFFFF;
v14 = 0;
v13 = 0;
glfwGetWindowPos(platform, &v14, &v13);
v14 += (int)qword_21ACAC / 2;
v13 += SHIDWORD(qword_21ACAC) / 2;
for ( j = 0; j < v19; ++j )
{
v11 = 0;
v10 = 0;
WindowMonitor = *(_QWORD *)(Monitors + 8LL * j);
glfwGetMonitorPos(WindowMonitor, &v11, &v10);
VideoMode = (_DWORD *)glfwGetVideoMode(WindowMonitor);
if ( VideoMode )
{
v8 = *VideoMode + v11 - 1;
v7 = VideoMode[1] + v10 - 1;
if ( v14 >= v11 && v14 <= v8 && v13 >= v10 && v13 <= v7 )
return (unsigned int)j;
v6 = v14;
if ( v14 >= v11 )
{
if ( v14 > v8 )
v6 = *VideoMode + v11 - 1;
}
else
{
v6 = v11;
}
v5 = v13;
if ( v13 >= v10 )
{
if ( v13 > v7 )
v5 = VideoMode[1] + v10 - 1;
}
else
{
v5 = v10;
}
if ( (v13 - v5) * (v13 - v5) + (v14 - v6) * (v14 - v6) < v15 )
{
v20 = j;
v15 = (v13 - v5) * (v13 - v5) + (v14 - v6) * (v14 - v6);
}
}
else
{
TraceLog(4, (unsigned int)"GLFW: Failed to find video mode for selected monitor", v0, v1, v2, v3);
}
}
}
}
return v20;
}
| GetCurrentMonitor:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV dword ptr [RBP + -0x4],0x0
MOV dword ptr [RBP + -0x8],0x0
LEA RDI,[RBP + -0x8]
CALL 0x0028ab10
MOV qword ptr [RBP + -0x10],RAX
MOV qword ptr [RBP + -0x18],0x0
CMP dword ptr [RBP + -0x8],0x1
JL 0x001c903e
CALL 0x001ca0f0
TEST AL,0x1
JNZ 0x001c8e50
JMP 0x001c8e9b
LAB_001c8e50:
MOV RDI,qword ptr [0x0031b768]
CALL 0x0028f1c0
MOV qword ptr [RBP + -0x18],RAX
MOV dword ptr [RBP + -0x1c],0x0
LAB_001c8e67:
MOV EAX,dword ptr [RBP + -0x1c]
CMP EAX,dword ptr [RBP + -0x8]
JGE 0x001c8e96
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RAX + RCX*0x8]
CMP RAX,qword ptr [RBP + -0x18]
JNZ 0x001c8e89
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001c8e96
LAB_001c8e89:
JMP 0x001c8e8b
LAB_001c8e8b:
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x001c8e67
LAB_001c8e96:
JMP 0x001c903c
LAB_001c8e9b:
MOV dword ptr [RBP + -0x20],0x7fffffff
MOV dword ptr [RBP + -0x24],0x0
MOV dword ptr [RBP + -0x28],0x0
MOV RDI,qword ptr [0x0031b768]
LEA RSI,[RBP + -0x24]
LEA RDX,[RBP + -0x28]
CALL 0x0028df10
MOV EAX,dword ptr [0x0031acac]
MOV ECX,0x2
CDQ
IDIV ECX
ADD EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x24],EAX
MOV EAX,dword ptr [0x0031acb0]
MOV ECX,0x2
CDQ
IDIV ECX
ADD EAX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x28],EAX
MOV dword ptr [RBP + -0x2c],0x0
LAB_001c8ef3:
MOV EAX,dword ptr [RBP + -0x2c]
CMP EAX,dword ptr [RBP + -0x8]
JGE 0x001c903a
MOV dword ptr [RBP + -0x30],0x0
MOV dword ptr [RBP + -0x34],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[RBP + -0x30]
LEA RDX,[RBP + -0x34]
CALL 0x0028ac20
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x0028b1f0
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RBP + -0x40],0x0
JZ 0x001c9017
MOV EAX,dword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x40]
ADD EAX,dword ptr [RCX]
SUB EAX,0x1
MOV dword ptr [RBP + -0x44],EAX
MOV EAX,dword ptr [RBP + -0x34]
MOV RCX,qword ptr [RBP + -0x40]
ADD EAX,dword ptr [RCX + 0x4]
SUB EAX,0x1
MOV dword ptr [RBP + -0x48],EAX
MOV EAX,dword ptr [RBP + -0x24]
CMP EAX,dword ptr [RBP + -0x30]
JL 0x001c8f90
MOV EAX,dword ptr [RBP + -0x24]
CMP EAX,dword ptr [RBP + -0x44]
JG 0x001c8f90
MOV EAX,dword ptr [RBP + -0x28]
CMP EAX,dword ptr [RBP + -0x34]
JL 0x001c8f90
MOV EAX,dword ptr [RBP + -0x28]
CMP EAX,dword ptr [RBP + -0x48]
JG 0x001c8f90
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001c903a
LAB_001c8f90:
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4c],EAX
MOV EAX,dword ptr [RBP + -0x24]
CMP EAX,dword ptr [RBP + -0x30]
JGE 0x001c8fa6
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x4c],EAX
JMP 0x001c8fb6
LAB_001c8fa6:
MOV EAX,dword ptr [RBP + -0x24]
CMP EAX,dword ptr [RBP + -0x44]
JLE 0x001c8fb4
MOV EAX,dword ptr [RBP + -0x44]
MOV dword ptr [RBP + -0x4c],EAX
LAB_001c8fb4:
JMP 0x001c8fb6
LAB_001c8fb6:
MOV EAX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x50],EAX
MOV EAX,dword ptr [RBP + -0x28]
CMP EAX,dword ptr [RBP + -0x34]
JGE 0x001c8fcc
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x50],EAX
JMP 0x001c8fdc
LAB_001c8fcc:
MOV EAX,dword ptr [RBP + -0x28]
CMP EAX,dword ptr [RBP + -0x48]
JLE 0x001c8fda
MOV EAX,dword ptr [RBP + -0x48]
MOV dword ptr [RBP + -0x50],EAX
LAB_001c8fda:
JMP 0x001c8fdc
LAB_001c8fdc:
MOV EAX,dword ptr [RBP + -0x24]
SUB EAX,dword ptr [RBP + -0x4c]
MOV dword ptr [RBP + -0x54],EAX
MOV EAX,dword ptr [RBP + -0x28]
SUB EAX,dword ptr [RBP + -0x50]
MOV dword ptr [RBP + -0x58],EAX
MOV EAX,dword ptr [RBP + -0x54]
IMUL EAX,dword ptr [RBP + -0x54]
MOV ECX,dword ptr [RBP + -0x58]
IMUL ECX,dword ptr [RBP + -0x58]
ADD EAX,ECX
MOV dword ptr [RBP + -0x5c],EAX
MOV EAX,dword ptr [RBP + -0x5c]
CMP EAX,dword ptr [RBP + -0x20]
JGE 0x001c9015
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x4],EAX
MOV EAX,dword ptr [RBP + -0x5c]
MOV dword ptr [RBP + -0x20],EAX
LAB_001c9015:
JMP 0x001c902a
LAB_001c9017:
MOV EDI,0x4
LEA RSI,[0x2b532d]
MOV AL,0x0
CALL 0x00282c40
LAB_001c902a:
JMP 0x001c902c
LAB_001c902c:
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x001c8ef3
LAB_001c903a:
JMP 0x001c903c
LAB_001c903c:
JMP 0x001c903e
LAB_001c903e:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
int GetCurrentMonitor(void)
{
int iVar1;
int iVar2;
ulong uVar3;
long lVar4;
int *piVar5;
int local_58;
int local_54;
int local_3c;
int local_38;
int local_34;
int local_30;
int local_2c;
int local_28;
int local_24;
int8 local_20;
long local_18;
int local_10;
int local_c;
local_c = 0;
local_10 = 0;
local_18 = glfwGetMonitors(&local_10);
local_20 = 0;
if (0 < local_10) {
uVar3 = IsWindowFullscreen();
if ((uVar3 & 1) == 0) {
local_28 = 0x7fffffff;
local_2c = 0;
local_30 = 0;
glfwGetWindowPos(platform,&local_2c,&local_30);
local_2c = DAT_0031acac / 2 + local_2c;
local_30 = DAT_0031acb0 / 2 + local_30;
for (local_34 = 0; local_34 < local_10; local_34 = local_34 + 1) {
local_38 = 0;
local_3c = 0;
local_20 = *(int8 *)(local_18 + (long)local_34 * 8);
glfwGetMonitorPos(local_20,&local_38,&local_3c);
piVar5 = (int *)glfwGetVideoMode(local_20);
if (piVar5 == (int *)0x0) {
TraceLog(4,"GLFW: Failed to find video mode for selected monitor");
}
else {
iVar1 = local_38 + *piVar5 + -1;
iVar2 = local_3c + piVar5[1] + -1;
if ((((local_38 <= local_2c) && (local_2c <= iVar1)) && (local_3c <= local_30)) &&
(local_30 <= iVar2)) {
return local_34;
}
local_54 = local_2c;
if (local_2c < local_38) {
local_54 = local_38;
}
else if (iVar1 < local_2c) {
local_54 = iVar1;
}
local_58 = local_30;
if (local_30 < local_3c) {
local_58 = local_3c;
}
else if (iVar2 < local_30) {
local_58 = iVar2;
}
iVar1 = (local_2c - local_54) * (local_2c - local_54) +
(local_30 - local_58) * (local_30 - local_58);
if (iVar1 < local_28) {
local_c = local_34;
local_28 = iVar1;
}
}
}
}
else {
lVar4 = glfwGetWindowMonitor(platform);
for (local_24 = 0; local_24 < local_10; local_24 = local_24 + 1) {
if (*(long *)(local_18 + (long)local_24 * 8) == lVar4) {
return local_24;
}
}
}
}
return local_c;
}
| |
27,332 | GetCurrentMonitor | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/platforms/rcore_desktop_glfw.c | int GetCurrentMonitor(void)
{
int index = 0;
int monitorCount = 0;
GLFWmonitor **monitors = glfwGetMonitors(&monitorCount);
GLFWmonitor *monitor = NULL;
if (monitorCount >= 1)
{
if (IsWindowFullscreen())
{
// Get the handle of the monitor that the specified window is in full screen on
monitor = glfwGetWindowMonitor(platform.handle);
for (int i = 0; i < monitorCount; i++)
{
if (monitors[i] == monitor)
{
index = i;
break;
}
}
}
else
{
// In case the window is between two monitors, we use below logic
// to try to detect the "current monitor" for that window, note that
// this is probably an overengineered solution for a very side case
// trying to match SDL behaviour
int closestDist = 0x7FFFFFFF;
// Window center position
int wcx = 0;
int wcy = 0;
glfwGetWindowPos(platform.handle, &wcx, &wcy);
wcx += (int)CORE.Window.screen.width/2;
wcy += (int)CORE.Window.screen.height/2;
for (int i = 0; i < monitorCount; i++)
{
// Monitor top-left position
int mx = 0;
int my = 0;
monitor = monitors[i];
glfwGetMonitorPos(monitor, &mx, &my);
const GLFWvidmode *mode = glfwGetVideoMode(monitor);
if (mode)
{
const int right = mx + mode->width - 1;
const int bottom = my + mode->height - 1;
if ((wcx >= mx) &&
(wcx <= right) &&
(wcy >= my) &&
(wcy <= bottom))
{
index = i;
break;
}
int xclosest = wcx;
if (wcx < mx) xclosest = mx;
else if (wcx > right) xclosest = right;
int yclosest = wcy;
if (wcy < my) yclosest = my;
else if (wcy > bottom) yclosest = bottom;
int dx = wcx - xclosest;
int dy = wcy - yclosest;
int dist = (dx*dx) + (dy*dy);
if (dist < closestDist)
{
index = i;
closestDist = dist;
}
}
else TRACELOG(LOG_WARNING, "GLFW: Failed to find video mode for selected monitor");
}
}
}
return index;
} | O1 | c | GetCurrentMonitor:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x4(%rsp), %r15
movl $0x0, (%r15)
movq %r15, %rdi
callq 0xc4b46
xorl %r12d, %r12d
cmpl $0x0, (%r15)
jle 0x72fd9
movq %rax, %rbx
cmpb $0x1, 0xced5b(%rip) # 0x141bbd
jne 0x72e9b
movq 0xcf82d(%rip), %rdi # 0x142698
callq 0xc739a
movslq 0x4(%rsp), %rcx
testq %rcx, %rcx
jle 0x72fd9
xorl %r12d, %r12d
cmpq %rax, (%rbx,%r12,8)
je 0x72fd9
incq %r12
cmpq %r12, %rcx
jne 0x72e81
xorl %r12d, %r12d
jmp 0x72fd9
xorl %r12d, %r12d
leaq 0x14(%rsp), %r15
movl %r12d, (%r15)
leaq 0x10(%rsp), %r14
movl %r12d, (%r14)
movq 0xcf7e3(%rip), %rdi # 0x142698
movq %r15, %rsi
movq %r14, %rdx
callq 0xc695d
movl 0xced16(%rip), %eax # 0x141bdc
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %ecx, (%r15)
movl 0xced08(%rip), %eax # 0x141be0
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %ecx, (%r14)
cmpl %r12d, 0x4(%rsp)
jle 0x72fd9
movl $0x7fffffff, %r13d # imm = 0x7FFFFFFF
xorl %r15d, %r15d
xorl %r14d, %r14d
xorl %r12d, %r12d
movl %r15d, 0xc(%rsp)
movl %r15d, 0x8(%rsp)
movq (%rbx,%r14,8), %rbp
movq %rbp, %rdi
leaq 0xc(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0xc4bde
movq %rbp, %rdi
callq 0xc4f2f
testq %rax, %rax
je 0x72faf
movl 0xc(%rsp), %esi
movl (%rax), %r8d
movl 0x4(%rax), %edx
leal (%r8,%rsi), %r10d
movl 0x8(%rsp), %ecx
leal (%rdx,%rcx), %edi
movl 0x14(%rsp), %eax
cmpl %esi, %eax
jl 0x72f67
cmpl %r10d, %eax
jge 0x72f67
movl 0x10(%rsp), %r9d
cmpl %ecx, %r9d
jl 0x72f67
cmpl %edi, %r9d
jge 0x72f67
xorl %eax, %eax
movl %r14d, %r12d
jmp 0x72fc4
movl %eax, %r9d
cmpl %r10d, %eax
jl 0x72f76
leal (%r8,%rsi), %r9d
decl %r9d
cmpl %esi, %eax
cmovll %esi, %r9d
movl 0x10(%rsp), %esi
movl %esi, %r8d
cmpl %edi, %esi
jl 0x72f8e
leal (%rdx,%rcx), %r8d
decl %r8d
cmpl %ecx, %esi
cmovll %ecx, %r8d
subl %r9d, %eax
subl %r8d, %esi
imull %eax, %eax
imull %esi, %esi
addl %eax, %esi
cmpl %r13d, %esi
cmovll %esi, %r13d
cmovll %r14d, %r12d
jmp 0x72fc2
movl $0x4, %edi
leaq 0x7289a(%rip), %rsi # 0xe5855
xorl %eax, %eax
callq 0xbfa73
movb $0x1, %al
testb %al, %al
je 0x72fd9
incq %r14
movslq 0x4(%rsp), %rax
cmpq %rax, %r14
jl 0x72efe
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| GetCurrentMonitor:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
lea r15, [rsp+48h+var_44]
mov dword ptr [r15], 0
mov rdi, r15
call glfwGetMonitors
xor r12d, r12d
cmp dword ptr [r15], 0
jle loc_72FD9
mov rbx, rax
cmp cs:byte_141BBD, 1
jnz short loc_72E9B
mov rdi, cs:platform_0
call glfwGetWindowMonitor
movsxd rcx, [rsp+48h+var_44]
test rcx, rcx
jle loc_72FD9
xor r12d, r12d
loc_72E81:
cmp [rbx+r12*8], rax
jz loc_72FD9
inc r12
cmp rcx, r12
jnz short loc_72E81
xor r12d, r12d
jmp loc_72FD9
loc_72E9B:
xor r12d, r12d
lea r15, [rsp+48h+var_34]
mov [r15], r12d
lea r14, [rsp+48h+var_38]
mov [r14], r12d
mov rdi, cs:platform_0
mov rsi, r15
mov rdx, r14
call glfwGetWindowPos
mov eax, dword ptr cs:qword_141BDC
mov ecx, eax
shr ecx, 1Fh
add ecx, eax
sar ecx, 1
add [r15], ecx
mov eax, dword ptr cs:qword_141BDC+4
mov ecx, eax
shr ecx, 1Fh
add ecx, eax
sar ecx, 1
add [r14], ecx
cmp [rsp+48h+var_44], r12d
jle loc_72FD9
mov r13d, 7FFFFFFFh
xor r15d, r15d
xor r14d, r14d
xor r12d, r12d
loc_72EFE:
mov [rsp+48h+var_3C], r15d
mov [rsp+48h+var_40], r15d
mov rbp, [rbx+r14*8]
mov rdi, rbp
lea rsi, [rsp+48h+var_3C]
lea rdx, [rsp+48h+var_40]
call glfwGetMonitorPos
mov rdi, rbp
call glfwGetVideoMode
test rax, rax
jz loc_72FAF
mov esi, [rsp+48h+var_3C]
mov r8d, [rax]
mov edx, [rax+4]
lea r10d, [r8+rsi]
mov ecx, [rsp+48h+var_40]
lea edi, [rdx+rcx]
mov eax, [rsp+48h+var_34]
cmp eax, esi
jl short loc_72F67
cmp eax, r10d
jge short loc_72F67
mov r9d, [rsp+48h+var_38]
cmp r9d, ecx
jl short loc_72F67
cmp r9d, edi
jge short loc_72F67
xor eax, eax
mov r12d, r14d
jmp short loc_72FC4
loc_72F67:
mov r9d, eax
cmp eax, r10d
jl short loc_72F76
lea r9d, [r8+rsi]
dec r9d
loc_72F76:
cmp eax, esi
cmovl r9d, esi
mov esi, [rsp+48h+var_38]
mov r8d, esi
cmp esi, edi
jl short loc_72F8E
lea r8d, [rdx+rcx]
dec r8d
loc_72F8E:
cmp esi, ecx
cmovl r8d, ecx
sub eax, r9d
sub esi, r8d
imul eax, eax
imul esi, esi
add esi, eax
cmp esi, r13d
cmovl r13d, esi
cmovl r12d, r14d
jmp short loc_72FC2
loc_72FAF:
mov edi, 4
lea rsi, aGlfwFailedToFi; "GLFW: Failed to find video mode for sel"...
xor eax, eax
call TraceLog
loc_72FC2:
mov al, 1
loc_72FC4:
test al, al
jz short loc_72FD9
inc r14
movsxd rax, [rsp+48h+var_44]
cmp r14, rax
jl loc_72EFE
loc_72FD9:
mov eax, r12d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long GetCurrentMonitor()
{
long long Monitors; // rax
long long v1; // r12
long long v2; // rbx
long long WindowMonitor; // rax
int v4; // r13d
long long v5; // r14
long long v6; // rbp
_DWORD *VideoMode; // rax
int v8; // edx
int v9; // ecx
int v10; // r8d
int v11; // r9d
int v12; // edx
int v13; // r10d
int v14; // edi
char v15; // al
int v16; // r9d
int v17; // r8d
int v19; // [rsp+4h] [rbp-44h] BYREF
int v20; // [rsp+8h] [rbp-40h] BYREF
int v21; // [rsp+Ch] [rbp-3Ch] BYREF
int v22; // [rsp+10h] [rbp-38h] BYREF
int v23[13]; // [rsp+14h] [rbp-34h] BYREF
v19 = 0;
Monitors = glfwGetMonitors(&v19);
LODWORD(v1) = 0;
if ( v19 <= 0 )
return (unsigned int)v1;
v2 = Monitors;
if ( byte_141BBD != 1 )
{
LODWORD(v1) = 0;
v23[0] = 0;
v22 = 0;
glfwGetWindowPos(platform_0, v23, &v22);
v23[0] += (int)qword_141BDC / 2;
v22 += SHIDWORD(qword_141BDC) / 2;
if ( v19 <= 0 )
return (unsigned int)v1;
v4 = 0x7FFFFFFF;
v5 = 0LL;
LODWORD(v1) = 0;
while ( 1 )
{
v21 = 0;
v20 = 0;
v6 = *(_QWORD *)(v2 + 8 * v5);
glfwGetMonitorPos(v6, &v21, &v20);
VideoMode = (_DWORD *)glfwGetVideoMode(v6);
if ( VideoMode )
{
v12 = VideoMode[1];
v13 = *VideoMode + v21;
v14 = v12 + v20;
if ( v23[0] >= v21 && v23[0] < v13 && v22 >= v20 && v22 < v14 )
{
v15 = 0;
LODWORD(v1) = v5;
goto LABEL_29;
}
v16 = v23[0];
if ( v23[0] >= v13 )
v16 = *VideoMode + v21 - 1;
if ( v23[0] < v21 )
v16 = v21;
v17 = v22;
if ( v22 >= v14 )
v17 = v12 + v20 - 1;
if ( v22 < v20 )
v17 = v20;
if ( (v23[0] - v16) * (v23[0] - v16) + (v22 - v17) * (v22 - v17) < v4 )
{
v4 = (v23[0] - v16) * (v23[0] - v16) + (v22 - v17) * (v22 - v17);
LODWORD(v1) = v5;
}
}
else
{
TraceLog(4, (unsigned int)"GLFW: Failed to find video mode for selected monitor", v8, v9, v10, v11);
}
v15 = 1;
LABEL_29:
if ( v15 )
{
if ( ++v5 < v19 )
continue;
}
return (unsigned int)v1;
}
}
WindowMonitor = glfwGetWindowMonitor(platform_0);
if ( v19 > 0 )
{
v1 = 0LL;
while ( *(_QWORD *)(v2 + 8 * v1) != WindowMonitor )
{
if ( v19 == ++v1 )
{
LODWORD(v1) = 0;
return (unsigned int)v1;
}
}
}
return (unsigned int)v1;
}
| GetCurrentMonitor:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
LEA R15,[RSP + 0x4]
MOV dword ptr [R15],0x0
MOV RDI,R15
CALL 0x001c4b46
XOR R12D,R12D
CMP dword ptr [R15],0x0
JLE 0x00172fd9
MOV RBX,RAX
CMP byte ptr [0x00241bbd],0x1
JNZ 0x00172e9b
MOV RDI,qword ptr [0x00242698]
CALL 0x001c739a
MOVSXD RCX,dword ptr [RSP + 0x4]
TEST RCX,RCX
JLE 0x00172fd9
XOR R12D,R12D
LAB_00172e81:
CMP qword ptr [RBX + R12*0x8],RAX
JZ 0x00172fd9
INC R12
CMP RCX,R12
JNZ 0x00172e81
XOR R12D,R12D
JMP 0x00172fd9
LAB_00172e9b:
XOR R12D,R12D
LEA R15,[RSP + 0x14]
MOV dword ptr [R15],R12D
LEA R14,[RSP + 0x10]
MOV dword ptr [R14],R12D
MOV RDI,qword ptr [0x00242698]
MOV RSI,R15
MOV RDX,R14
CALL 0x001c695d
MOV EAX,dword ptr [0x00241bdc]
MOV ECX,EAX
SHR ECX,0x1f
ADD ECX,EAX
SAR ECX,0x1
ADD dword ptr [R15],ECX
MOV EAX,dword ptr [0x00241be0]
MOV ECX,EAX
SHR ECX,0x1f
ADD ECX,EAX
SAR ECX,0x1
ADD dword ptr [R14],ECX
CMP dword ptr [RSP + 0x4],R12D
JLE 0x00172fd9
MOV R13D,0x7fffffff
XOR R15D,R15D
XOR R14D,R14D
XOR R12D,R12D
LAB_00172efe:
MOV dword ptr [RSP + 0xc],R15D
MOV dword ptr [RSP + 0x8],R15D
MOV RBP,qword ptr [RBX + R14*0x8]
MOV RDI,RBP
LEA RSI,[RSP + 0xc]
LEA RDX,[RSP + 0x8]
CALL 0x001c4bde
MOV RDI,RBP
CALL 0x001c4f2f
TEST RAX,RAX
JZ 0x00172faf
MOV ESI,dword ptr [RSP + 0xc]
MOV R8D,dword ptr [RAX]
MOV EDX,dword ptr [RAX + 0x4]
LEA R10D,[R8 + RSI*0x1]
MOV ECX,dword ptr [RSP + 0x8]
LEA EDI,[RDX + RCX*0x1]
MOV EAX,dword ptr [RSP + 0x14]
CMP EAX,ESI
JL 0x00172f67
CMP EAX,R10D
JGE 0x00172f67
MOV R9D,dword ptr [RSP + 0x10]
CMP R9D,ECX
JL 0x00172f67
CMP R9D,EDI
JGE 0x00172f67
XOR EAX,EAX
MOV R12D,R14D
JMP 0x00172fc4
LAB_00172f67:
MOV R9D,EAX
CMP EAX,R10D
JL 0x00172f76
LEA R9D,[R8 + RSI*0x1]
DEC R9D
LAB_00172f76:
CMP EAX,ESI
CMOVL R9D,ESI
MOV ESI,dword ptr [RSP + 0x10]
MOV R8D,ESI
CMP ESI,EDI
JL 0x00172f8e
LEA R8D,[RDX + RCX*0x1]
DEC R8D
LAB_00172f8e:
CMP ESI,ECX
CMOVL R8D,ECX
SUB EAX,R9D
SUB ESI,R8D
IMUL EAX,EAX
IMUL ESI,ESI
ADD ESI,EAX
CMP ESI,R13D
CMOVL R13D,ESI
CMOVL R12D,R14D
JMP 0x00172fc2
LAB_00172faf:
MOV EDI,0x4
LEA RSI,[0x1e5855]
XOR EAX,EAX
CALL 0x001bfa73
LAB_00172fc2:
MOV AL,0x1
LAB_00172fc4:
TEST AL,AL
JZ 0x00172fd9
INC R14
MOVSXD RAX,dword ptr [RSP + 0x4]
CMP R14,RAX
JL 0x00172efe
LAB_00172fd9:
MOV EAX,R12D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong GetCurrentMonitor(void)
{
int iVar1;
int8 uVar2;
bool bVar3;
long lVar4;
long lVar5;
int *piVar6;
int iVar7;
int iVar8;
ulong uVar9;
int iVar10;
ulong uVar11;
int local_44;
int local_40;
int local_3c;
int local_38;
int local_34;
local_44 = 0;
lVar4 = glfwGetMonitors(&local_44);
uVar9 = 0;
if (0 < local_44) {
if (DAT_00241bbd == '\x01') {
lVar5 = glfwGetWindowMonitor(platform_0);
if (0 < (long)local_44) {
uVar9 = 0;
do {
if (*(long *)(lVar4 + uVar9 * 8) == lVar5) goto LAB_00172fd9;
uVar9 = uVar9 + 1;
} while ((long)local_44 != uVar9);
uVar9 = 0;
}
}
else {
uVar9 = 0;
local_34 = 0;
local_38 = 0;
glfwGetWindowPos(platform_0,&local_34,&local_38);
local_34 = local_34 + DAT_00241bdc / 2;
local_38 = local_38 + DAT_00241be0 / 2;
if (0 < local_44) {
iVar10 = 0x7fffffff;
uVar11 = 0;
uVar9 = 0;
do {
local_3c = 0;
local_40 = 0;
uVar2 = *(int8 *)(lVar4 + uVar11 * 8);
glfwGetMonitorPos(uVar2,&local_3c,&local_40);
piVar6 = (int *)glfwGetVideoMode(uVar2);
if (piVar6 == (int *)0x0) {
TraceLog(4,"GLFW: Failed to find video mode for selected monitor");
LAB_00172fc2:
bVar3 = true;
}
else {
iVar7 = *piVar6 + local_3c;
iVar1 = piVar6[1] + local_40;
if ((((local_34 < local_3c) || (iVar7 <= local_34)) || (local_38 < local_40)) ||
(iVar1 <= local_38)) {
iVar8 = local_34;
if (iVar7 <= local_34) {
iVar8 = *piVar6 + local_3c + -1;
}
if (local_34 < local_3c) {
iVar8 = local_3c;
}
iVar7 = local_38;
if (iVar1 <= local_38) {
iVar7 = piVar6[1] + local_40 + -1;
}
if (local_38 < local_40) {
iVar7 = local_40;
}
iVar7 = (local_38 - iVar7) * (local_38 - iVar7) +
(local_34 - iVar8) * (local_34 - iVar8);
if (iVar7 < iVar10) {
uVar9 = uVar11 & 0xffffffff;
iVar10 = iVar7;
}
goto LAB_00172fc2;
}
bVar3 = false;
uVar9 = uVar11 & 0xffffffff;
}
} while ((bVar3) && (uVar11 = uVar11 + 1, (long)uVar11 < (long)local_44));
}
}
}
LAB_00172fd9:
return uVar9 & 0xffffffff;
}
| |
27,333 | GetCurrentMonitor | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/platforms/rcore_desktop_glfw.c | int GetCurrentMonitor(void)
{
int index = 0;
int monitorCount = 0;
GLFWmonitor **monitors = glfwGetMonitors(&monitorCount);
GLFWmonitor *monitor = NULL;
if (monitorCount >= 1)
{
if (IsWindowFullscreen())
{
// Get the handle of the monitor that the specified window is in full screen on
monitor = glfwGetWindowMonitor(platform.handle);
for (int i = 0; i < monitorCount; i++)
{
if (monitors[i] == monitor)
{
index = i;
break;
}
}
}
else
{
// In case the window is between two monitors, we use below logic
// to try to detect the "current monitor" for that window, note that
// this is probably an overengineered solution for a very side case
// trying to match SDL behaviour
int closestDist = 0x7FFFFFFF;
// Window center position
int wcx = 0;
int wcy = 0;
glfwGetWindowPos(platform.handle, &wcx, &wcy);
wcx += (int)CORE.Window.screen.width/2;
wcy += (int)CORE.Window.screen.height/2;
for (int i = 0; i < monitorCount; i++)
{
// Monitor top-left position
int mx = 0;
int my = 0;
monitor = monitors[i];
glfwGetMonitorPos(monitor, &mx, &my);
const GLFWvidmode *mode = glfwGetVideoMode(monitor);
if (mode)
{
const int right = mx + mode->width - 1;
const int bottom = my + mode->height - 1;
if ((wcx >= mx) &&
(wcx <= right) &&
(wcy >= my) &&
(wcy <= bottom))
{
index = i;
break;
}
int xclosest = wcx;
if (wcx < mx) xclosest = mx;
else if (wcx > right) xclosest = right;
int yclosest = wcy;
if (wcy < my) yclosest = my;
else if (wcy > bottom) yclosest = bottom;
int dx = wcx - xclosest;
int dy = wcy - yclosest;
int dist = (dx*dx) + (dy*dy);
if (dist < closestDist)
{
index = i;
closestDist = dist;
}
}
else TRACELOG(LOG_WARNING, "GLFW: Failed to find video mode for selected monitor");
}
}
}
return index;
} | O3 | c | GetCurrentMonitor:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x4(%rsp), %r15
movl $0x0, (%r15)
movq %r15, %rdi
callq 0xbf07a
xorl %r12d, %r12d
cmpl $0x0, (%r15)
jle 0x6f791
movq %rax, %r14
cmpb $0x1, 0xcc59c(%rip) # 0x13bbcd
jne 0x6f66a
movq 0xcd06e(%rip), %rdi # 0x13c6a8
callq 0xc18ac
movslq 0x4(%rsp), %rcx
testq %rcx, %rcx
jle 0x6f791
xorl %r12d, %r12d
cmpq %rax, (%r14,%r12,8)
je 0x6f791
incq %r12
cmpq %r12, %rcx
jne 0x6f650
xorl %r12d, %r12d
jmp 0x6f791
xorl %r12d, %r12d
leaq 0x14(%rsp), %r15
movl %r12d, (%r15)
leaq 0x10(%rsp), %rbx
movl %r12d, (%rbx)
movq 0xcd024(%rip), %rdi # 0x13c6a8
movq %r15, %rsi
movq %rbx, %rdx
callq 0xc0e6f
movl 0xcc557(%rip), %eax # 0x13bbec
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %ecx, (%r15)
movl 0xcc549(%rip), %eax # 0x13bbf0
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %ecx, (%rbx)
cmpl %r12d, 0x4(%rsp)
jle 0x6f791
movl $0x7fffffff, %r13d # imm = 0x7FFFFFFF
xorl %r15d, %r15d
xorl %ebx, %ebx
xorl %r12d, %r12d
movl %r15d, 0xc(%rsp)
movl %r15d, 0x8(%rsp)
movq (%r14,%rbx,8), %rbp
movq %rbp, %rdi
leaq 0xc(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0xbf112
movq %rbp, %rdi
callq 0xbf463
testq %rax, %rax
je 0x6f768
movl 0xc(%rsp), %edi
movl (%rax), %r9d
movl 0x4(%rax), %esi
leal (%r9,%rdi), %r10d
movl 0x8(%rsp), %edx
leal (%rsi,%rdx), %r8d
movl 0x14(%rsp), %ecx
movl 0x10(%rsp), %eax
cmpl %edi, %ecx
jl 0x6f728
cmpl %r10d, %ecx
jge 0x6f728
cmpl %edx, %eax
jl 0x6f728
cmpl %r8d, %eax
jl 0x6f78e
movl %ecx, %r11d
cmpl %r10d, %ecx
jl 0x6f737
leal (%r9,%rdi), %r11d
decl %r11d
cmpl %edi, %ecx
cmovll %edi, %r11d
movl %eax, %edi
cmpl %r8d, %eax
jl 0x6f749
leal (%rsi,%rdx), %edi
decl %edi
cmpl %edx, %eax
cmovll %edx, %edi
subl %r11d, %ecx
subl %edi, %eax
imull %ecx, %ecx
imull %eax, %eax
addl %ecx, %eax
cmpl %r13d, %eax
cmovll %eax, %r13d
cmovll %ebx, %r12d
jmp 0x6f77b
movl $0x4, %edi
leaq 0x70159(%rip), %rsi # 0xdf8cd
xorl %eax, %eax
callq 0xb9db7
incq %rbx
movslq 0x4(%rsp), %rax
cmpq %rax, %rbx
jl 0x6f6cb
jmp 0x6f791
movl %ebx, %r12d
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| GetCurrentMonitor:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
lea r15, [rsp+48h+var_44]
mov dword ptr [r15], 0
mov rdi, r15
call glfwGetMonitors
xor r12d, r12d
cmp dword ptr [r15], 0
jle loc_6F791
mov r14, rax
cmp cs:byte_13BBCD, 1
jnz short loc_6F66A
mov rdi, cs:platform_0
call glfwGetWindowMonitor
movsxd rcx, [rsp+48h+var_44]
test rcx, rcx
jle loc_6F791
xor r12d, r12d
loc_6F650:
cmp [r14+r12*8], rax
jz loc_6F791
inc r12
cmp rcx, r12
jnz short loc_6F650
xor r12d, r12d
jmp loc_6F791
loc_6F66A:
xor r12d, r12d
lea r15, [rsp+48h+var_34]
mov [r15], r12d
lea rbx, [rsp+48h+var_38]
mov [rbx], r12d
mov rdi, cs:platform_0
mov rsi, r15
mov rdx, rbx
call glfwGetWindowPos
mov eax, dword ptr cs:qword_13BBEC
mov ecx, eax
shr ecx, 1Fh
add ecx, eax
sar ecx, 1
add [r15], ecx
mov eax, dword ptr cs:qword_13BBEC+4
mov ecx, eax
shr ecx, 1Fh
add ecx, eax
sar ecx, 1
add [rbx], ecx
cmp [rsp+48h+var_44], r12d
jle loc_6F791
mov r13d, 7FFFFFFFh
xor r15d, r15d
xor ebx, ebx
xor r12d, r12d
loc_6F6CB:
mov [rsp+48h+var_3C], r15d
mov [rsp+48h+var_40], r15d
mov rbp, [r14+rbx*8]
mov rdi, rbp
lea rsi, [rsp+48h+var_3C]
lea rdx, [rsp+48h+var_40]
call glfwGetMonitorPos
mov rdi, rbp
call glfwGetVideoMode
test rax, rax
jz short loc_6F768
mov edi, [rsp+48h+var_3C]
mov r9d, [rax]
mov esi, [rax+4]
lea r10d, [r9+rdi]
mov edx, [rsp+48h+var_40]
lea r8d, [rsi+rdx]
mov ecx, [rsp+48h+var_34]
mov eax, [rsp+48h+var_38]
cmp ecx, edi
jl short loc_6F728
cmp ecx, r10d
jge short loc_6F728
cmp eax, edx
jl short loc_6F728
cmp eax, r8d
jl short loc_6F78E
loc_6F728:
mov r11d, ecx
cmp ecx, r10d
jl short loc_6F737
lea r11d, [r9+rdi]
dec r11d
loc_6F737:
cmp ecx, edi
cmovl r11d, edi
mov edi, eax
cmp eax, r8d
jl short loc_6F749
lea edi, [rsi+rdx]
dec edi
loc_6F749:
cmp eax, edx
cmovl edi, edx
sub ecx, r11d
sub eax, edi
imul ecx, ecx
imul eax, eax
add eax, ecx
cmp eax, r13d
cmovl r13d, eax
cmovl r12d, ebx
jmp short loc_6F77B
loc_6F768:
mov edi, 4
lea rsi, aGlfwFailedToFi; "GLFW: Failed to find video mode for sel"...
xor eax, eax
call TraceLog
loc_6F77B:
inc rbx
movsxd rax, [rsp+48h+var_44]
cmp rbx, rax
jl loc_6F6CB
jmp short loc_6F791
loc_6F78E:
mov r12d, ebx
loc_6F791:
mov eax, r12d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long GetCurrentMonitor()
{
long long Monitors; // rax
long long v1; // r12
long long v2; // r14
long long WindowMonitor; // rax
int v4; // r13d
long long v5; // rbx
long long v6; // rbp
_DWORD *VideoMode; // rax
int v8; // edx
int v9; // ecx
int v10; // r8d
int v11; // r9d
int v12; // esi
int v13; // r10d
int v14; // r8d
int v15; // r11d
int v16; // edi
int v18; // [rsp+4h] [rbp-44h] BYREF
int v19; // [rsp+8h] [rbp-40h] BYREF
int v20; // [rsp+Ch] [rbp-3Ch] BYREF
int v21; // [rsp+10h] [rbp-38h] BYREF
int v22[13]; // [rsp+14h] [rbp-34h] BYREF
v18 = 0;
Monitors = glfwGetMonitors(&v18);
LODWORD(v1) = 0;
if ( v18 > 0 )
{
v2 = Monitors;
if ( byte_13BBCD == 1 )
{
WindowMonitor = glfwGetWindowMonitor(platform_0);
if ( v18 > 0 )
{
v1 = 0LL;
while ( *(_QWORD *)(v2 + 8 * v1) != WindowMonitor )
{
if ( v18 == ++v1 )
{
LODWORD(v1) = 0;
return (unsigned int)v1;
}
}
}
}
else
{
LODWORD(v1) = 0;
v22[0] = 0;
v21 = 0;
glfwGetWindowPos(platform_0, v22, &v21);
v22[0] += (int)qword_13BBEC / 2;
v21 += SHIDWORD(qword_13BBEC) / 2;
if ( v18 > 0 )
{
v4 = 0x7FFFFFFF;
v5 = 0LL;
LODWORD(v1) = 0;
do
{
v20 = 0;
v19 = 0;
v6 = *(_QWORD *)(v2 + 8 * v5);
glfwGetMonitorPos(v6, &v20, &v19);
VideoMode = (_DWORD *)glfwGetVideoMode(v6);
if ( VideoMode )
{
v12 = VideoMode[1];
v13 = *VideoMode + v20;
v14 = v12 + v19;
if ( v22[0] >= v20 && v22[0] < v13 && v21 >= v19 && v21 < v14 )
{
LODWORD(v1) = v5;
return (unsigned int)v1;
}
v15 = v22[0];
if ( v22[0] >= v13 )
v15 = *VideoMode + v20 - 1;
if ( v22[0] < v20 )
v15 = v20;
v16 = v21;
if ( v21 >= v14 )
v16 = v12 + v19 - 1;
if ( v21 < v19 )
v16 = v19;
if ( (v22[0] - v15) * (v22[0] - v15) + (v21 - v16) * (v21 - v16) < v4 )
{
v4 = (v22[0] - v15) * (v22[0] - v15) + (v21 - v16) * (v21 - v16);
LODWORD(v1) = v5;
}
}
else
{
TraceLog(4, (unsigned int)"GLFW: Failed to find video mode for selected monitor", v8, v9, v10, v11);
}
++v5;
}
while ( v5 < v18 );
}
}
}
return (unsigned int)v1;
}
| GetCurrentMonitor:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
LEA R15,[RSP + 0x4]
MOV dword ptr [R15],0x0
MOV RDI,R15
CALL 0x001bf07a
XOR R12D,R12D
CMP dword ptr [R15],0x0
JLE 0x0016f791
MOV R14,RAX
CMP byte ptr [0x0023bbcd],0x1
JNZ 0x0016f66a
MOV RDI,qword ptr [0x0023c6a8]
CALL 0x001c18ac
MOVSXD RCX,dword ptr [RSP + 0x4]
TEST RCX,RCX
JLE 0x0016f791
XOR R12D,R12D
LAB_0016f650:
CMP qword ptr [R14 + R12*0x8],RAX
JZ 0x0016f791
INC R12
CMP RCX,R12
JNZ 0x0016f650
XOR R12D,R12D
JMP 0x0016f791
LAB_0016f66a:
XOR R12D,R12D
LEA R15,[RSP + 0x14]
MOV dword ptr [R15],R12D
LEA RBX,[RSP + 0x10]
MOV dword ptr [RBX],R12D
MOV RDI,qword ptr [0x0023c6a8]
MOV RSI,R15
MOV RDX,RBX
CALL 0x001c0e6f
MOV EAX,dword ptr [0x0023bbec]
MOV ECX,EAX
SHR ECX,0x1f
ADD ECX,EAX
SAR ECX,0x1
ADD dword ptr [R15],ECX
MOV EAX,dword ptr [0x0023bbf0]
MOV ECX,EAX
SHR ECX,0x1f
ADD ECX,EAX
SAR ECX,0x1
ADD dword ptr [RBX],ECX
CMP dword ptr [RSP + 0x4],R12D
JLE 0x0016f791
MOV R13D,0x7fffffff
XOR R15D,R15D
XOR EBX,EBX
XOR R12D,R12D
LAB_0016f6cb:
MOV dword ptr [RSP + 0xc],R15D
MOV dword ptr [RSP + 0x8],R15D
MOV RBP,qword ptr [R14 + RBX*0x8]
MOV RDI,RBP
LEA RSI,[RSP + 0xc]
LEA RDX,[RSP + 0x8]
CALL 0x001bf112
MOV RDI,RBP
CALL 0x001bf463
TEST RAX,RAX
JZ 0x0016f768
MOV EDI,dword ptr [RSP + 0xc]
MOV R9D,dword ptr [RAX]
MOV ESI,dword ptr [RAX + 0x4]
LEA R10D,[R9 + RDI*0x1]
MOV EDX,dword ptr [RSP + 0x8]
LEA R8D,[RSI + RDX*0x1]
MOV ECX,dword ptr [RSP + 0x14]
MOV EAX,dword ptr [RSP + 0x10]
CMP ECX,EDI
JL 0x0016f728
CMP ECX,R10D
JGE 0x0016f728
CMP EAX,EDX
JL 0x0016f728
CMP EAX,R8D
JL 0x0016f78e
LAB_0016f728:
MOV R11D,ECX
CMP ECX,R10D
JL 0x0016f737
LEA R11D,[R9 + RDI*0x1]
DEC R11D
LAB_0016f737:
CMP ECX,EDI
CMOVL R11D,EDI
MOV EDI,EAX
CMP EAX,R8D
JL 0x0016f749
LEA EDI,[RSI + RDX*0x1]
DEC EDI
LAB_0016f749:
CMP EAX,EDX
CMOVL EDI,EDX
SUB ECX,R11D
SUB EAX,EDI
IMUL ECX,ECX
IMUL EAX,EAX
ADD EAX,ECX
CMP EAX,R13D
CMOVL R13D,EAX
CMOVL R12D,EBX
JMP 0x0016f77b
LAB_0016f768:
MOV EDI,0x4
LEA RSI,[0x1df8cd]
XOR EAX,EAX
CALL 0x001b9db7
LAB_0016f77b:
INC RBX
MOVSXD RAX,dword ptr [RSP + 0x4]
CMP RBX,RAX
JL 0x0016f6cb
JMP 0x0016f791
LAB_0016f78e:
MOV R12D,EBX
LAB_0016f791:
MOV EAX,R12D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong GetCurrentMonitor(void)
{
int iVar1;
int8 uVar2;
long lVar3;
long lVar4;
int *piVar5;
ulong uVar6;
int iVar7;
int iVar8;
ulong uVar9;
int iVar10;
int local_44;
int local_40;
int local_3c;
int local_38;
int local_34;
local_44 = 0;
lVar3 = glfwGetMonitors(&local_44);
uVar9 = 0;
if (0 < local_44) {
if (DAT_0023bbcd == '\x01') {
lVar4 = glfwGetWindowMonitor(platform_0);
if (0 < (long)local_44) {
uVar9 = 0;
do {
if (*(long *)(lVar3 + uVar9 * 8) == lVar4) goto LAB_0016f791;
uVar9 = uVar9 + 1;
} while ((long)local_44 != uVar9);
uVar9 = 0;
}
}
else {
uVar9 = 0;
local_34 = 0;
local_38 = 0;
glfwGetWindowPos(platform_0,&local_34,&local_38);
local_34 = local_34 + DAT_0023bbec / 2;
local_38 = local_38 + DAT_0023bbf0 / 2;
if (0 < local_44) {
iVar10 = 0x7fffffff;
uVar6 = 0;
uVar9 = 0;
do {
local_3c = 0;
local_40 = 0;
uVar2 = *(int8 *)(lVar3 + uVar6 * 8);
glfwGetMonitorPos(uVar2,&local_3c,&local_40);
piVar5 = (int *)glfwGetVideoMode(uVar2);
if (piVar5 == (int *)0x0) {
TraceLog(4,"GLFW: Failed to find video mode for selected monitor");
}
else {
iVar7 = *piVar5 + local_3c;
iVar1 = piVar5[1] + local_40;
if ((((local_3c <= local_34) && (local_34 < iVar7)) && (local_40 <= local_38)) &&
(local_38 < iVar1)) {
uVar9 = uVar6 & 0xffffffff;
break;
}
iVar8 = local_34;
if (iVar7 <= local_34) {
iVar8 = *piVar5 + local_3c + -1;
}
if (local_34 < local_3c) {
iVar8 = local_3c;
}
iVar7 = local_38;
if (iVar1 <= local_38) {
iVar7 = piVar5[1] + local_40 + -1;
}
if (local_38 < local_40) {
iVar7 = local_40;
}
iVar7 = (local_38 - iVar7) * (local_38 - iVar7) +
(local_34 - iVar8) * (local_34 - iVar8);
if (iVar7 < iVar10) {
uVar9 = uVar6 & 0xffffffff;
iVar10 = iVar7;
}
}
uVar6 = uVar6 + 1;
} while ((long)uVar6 < (long)local_44);
}
}
}
LAB_0016f791:
return uVar9 & 0xffffffff;
}
| |
27,334 | d2b | eloqsql/libmariadb/libmariadb/ma_dtoa.c | static Bigint *d2b(U *d, int *e, int *bits, Stack_alloc *alloc)
{
Bigint *b;
int de, k;
ULong *x, y, z;
int i;
#define d0 word0(d)
#define d1 word1(d)
b= Balloc(1, alloc);
x= b->p.x;
z= d0 & Frac_mask;
d0 &= 0x7fffffff; /* clear sign bit, which we ignore */
if ((de= (int)(d0 >> Exp_shift)))
z|= Exp_msk1;
if ((y= d1))
{
if ((k= lo0bits(&y)))
{
x[0]= y | z << (32 - k);
z>>= (k == 32) ? (--k) : k;
}
else
x[0]= y;
i= b->wds= (x[1]= z) ? 2 : 1;
}
else
{
k= lo0bits(&z);
x[0]= z;
i= b->wds= 1;
k+= 32;
}
if (de)
{
*e= de - Bias - (P-1) + k;
*bits= P - k;
}
else
{
*e= de - Bias - (P-1) + 1 + k;
*bits= 32*i - hi0bits(x[i-1]);
}
return b;
#undef d0
#undef d1
} | O0 | c | d2b:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rsi
movl $0x1, %edi
callq 0x5a2b0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0xfffff, %eax # imm = 0xFFFFF
movl %eax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
shrl $0x14, %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
je 0x59861
movl -0x40(%rbp), %eax
orl $0x100000, %eax # imm = 0x100000
movl %eax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x3c(%rbp)
cmpl $0x0, %eax
je 0x598f8
leaq -0x3c(%rbp), %rdi
callq 0x5a8b0
movl %eax, -0x30(%rbp)
cmpl $0x0, %eax
je 0x598c9
movl -0x3c(%rbp), %eax
movl %eax, -0x48(%rbp)
movl -0x40(%rbp), %eax
movl $0x20, %ecx
subl -0x30(%rbp), %ecx
shll %cl, %eax
movl -0x48(%rbp), %ecx
orl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
cmpl $0x20, -0x30(%rbp)
jne 0x598b6
movl -0x30(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x30(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x598bc
movl -0x30(%rbp), %eax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %ecx
movl -0x40(%rbp), %eax
shrl %cl, %eax
movl %eax, -0x40(%rbp)
jmp 0x598d2
movl -0x3c(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
movl -0x40(%rbp), %edx
movq -0x38(%rbp), %rax
movl %edx, 0x4(%rax)
movl $0x1, %eax
movl $0x2, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movq -0x28(%rbp), %rcx
movl %eax, 0x14(%rcx)
movl %eax, -0x44(%rbp)
jmp 0x59928
leaq -0x40(%rbp), %rdi
callq 0x5a8b0
movl %eax, -0x30(%rbp)
movl -0x40(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movl $0x1, 0x14(%rax)
movl $0x1, -0x44(%rbp)
movl -0x30(%rbp), %eax
addl $0x20, %eax
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x59953
movl -0x2c(%rbp), %ecx
subl $0x3ff, %ecx # imm = 0x3FF
subl $0x34, %ecx
addl -0x30(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl $0x35, %ecx
subl -0x30(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
jmp 0x59994
movl -0x2c(%rbp), %ecx
subl $0x3ff, %ecx # imm = 0x3FF
subl $0x34, %ecx
addl $0x1, %ecx
addl -0x30(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl -0x44(%rbp), %eax
shll $0x5, %eax
movl %eax, -0x50(%rbp)
movq -0x38(%rbp), %rax
movl -0x44(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edi
callq 0x59e30
movl -0x50(%rbp), %ecx
subl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nop
| d2b:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rsi, [rbp+var_20]
mov edi, 1
call Balloc
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_38], rax
mov rax, [rbp+var_8]
mov eax, [rax+4]
and eax, 0FFFFFh
mov [rbp+var_40], eax
mov rax, [rbp+var_8]
mov ecx, [rax+4]
and ecx, 7FFFFFFFh
mov [rax+4], ecx
mov rax, [rbp+var_8]
mov eax, [rax+4]
shr eax, 14h
mov [rbp+var_2C], eax
cmp eax, 0
jz short loc_59861
mov eax, [rbp+var_40]
or eax, 100000h
mov [rbp+var_40], eax
loc_59861:
mov rax, [rbp+var_8]
mov eax, [rax]
mov [rbp+var_3C], eax
cmp eax, 0
jz loc_598F8
lea rdi, [rbp+var_3C]
call lo0bits
mov [rbp+var_30], eax
cmp eax, 0
jz short loc_598C9
mov eax, [rbp+var_3C]
mov [rbp+var_48], eax
mov eax, [rbp+var_40]
mov ecx, 20h ; ' '
sub ecx, [rbp+var_30]
shl eax, cl
mov ecx, [rbp+var_48]
or ecx, eax
mov rax, [rbp+var_38]
mov [rax], ecx
cmp [rbp+var_30], 20h ; ' '
jnz short loc_598B6
mov eax, [rbp+var_30]
add eax, 0FFFFFFFFh
mov [rbp+var_30], eax
mov [rbp+var_4C], eax
jmp short loc_598BC
loc_598B6:
mov eax, [rbp+var_30]
mov [rbp+var_4C], eax
loc_598BC:
mov ecx, [rbp+var_4C]
mov eax, [rbp+var_40]
shr eax, cl
mov [rbp+var_40], eax
jmp short loc_598D2
loc_598C9:
mov ecx, [rbp+var_3C]
mov rax, [rbp+var_38]
mov [rax], ecx
loc_598D2:
mov edx, [rbp+var_40]
mov rax, [rbp+var_38]
mov [rax+4], edx
mov eax, 1
mov ecx, 2
cmp edx, 0
cmovnz eax, ecx
mov rcx, [rbp+var_28]
mov [rcx+14h], eax
mov [rbp+var_44], eax
jmp short loc_59928
loc_598F8:
lea rdi, [rbp+var_40]
call lo0bits
mov [rbp+var_30], eax
mov ecx, [rbp+var_40]
mov rax, [rbp+var_38]
mov [rax], ecx
mov rax, [rbp+var_28]
mov dword ptr [rax+14h], 1
mov [rbp+var_44], 1
mov eax, [rbp+var_30]
add eax, 20h ; ' '
mov [rbp+var_30], eax
loc_59928:
cmp [rbp+var_2C], 0
jz short loc_59953
mov ecx, [rbp+var_2C]
sub ecx, 3FFh
sub ecx, 34h ; '4'
add ecx, [rbp+var_30]
mov rax, [rbp+var_10]
mov [rax], ecx
mov ecx, 35h ; '5'
sub ecx, [rbp+var_30]
mov rax, [rbp+var_18]
mov [rax], ecx
jmp short loc_59994
loc_59953:
mov ecx, [rbp+var_2C]
sub ecx, 3FFh
sub ecx, 34h ; '4'
add ecx, 1
add ecx, [rbp+var_30]
mov rax, [rbp+var_10]
mov [rax], ecx
mov eax, [rbp+var_44]
shl eax, 5
mov [rbp+var_50], eax
mov rax, [rbp+var_38]
mov ecx, [rbp+var_44]
sub ecx, 1
movsxd rcx, ecx
mov edi, [rax+rcx*4]
call hi0bits
mov ecx, [rbp+var_50]
sub ecx, eax
mov rax, [rbp+var_18]
mov [rax], ecx
loc_59994:
mov rax, [rbp+var_28]
add rsp, 50h
pop rbp
retn
| long long d2b(unsigned int *a1, _DWORD *a2, _DWORD *a3, long long a4)
{
unsigned int v4; // edx
int v5; // eax
char v7; // [rsp+4h] [rbp-4Ch]
int v8; // [rsp+Ch] [rbp-44h]
unsigned int v9; // [rsp+10h] [rbp-40h] BYREF
unsigned int v10; // [rsp+14h] [rbp-3Ch] BYREF
unsigned int *v11; // [rsp+18h] [rbp-38h]
int v12; // [rsp+20h] [rbp-30h]
unsigned int v13; // [rsp+24h] [rbp-2Ch]
long long v14; // [rsp+28h] [rbp-28h]
long long v15; // [rsp+30h] [rbp-20h]
_DWORD *v16; // [rsp+38h] [rbp-18h]
_DWORD *v17; // [rsp+40h] [rbp-10h]
unsigned int *v18; // [rsp+48h] [rbp-8h]
v18 = a1;
v17 = a2;
v16 = a3;
v15 = a4;
v14 = Balloc(1LL, a4);
v11 = *(unsigned int **)v14;
v9 = a1[1] & 0xFFFFF;
a1[1] &= ~0x80000000;
v13 = v18[1] >> 20;
if ( v13 )
v9 |= 0x100000u;
v10 = *v18;
if ( v10 )
{
v12 = lo0bits(&v10);
if ( v12 )
{
*v11 = (v9 << (32 - v12)) | v10;
if ( v12 == 32 )
{
v12 = 31;
v7 = 31;
}
else
{
v7 = v12;
}
v9 >>= v7;
}
else
{
*v11 = v10;
}
v4 = v9;
v11[1] = v9;
v5 = 1;
if ( v4 )
v5 = 2;
*(_DWORD *)(v14 + 20) = v5;
v8 = v5;
}
else
{
v12 = lo0bits(&v9);
*v11 = v9;
*(_DWORD *)(v14 + 20) = 1;
v8 = 1;
v12 += 32;
}
if ( v13 )
{
*v17 = v12 + v13 - 1075;
*v16 = 53 - v12;
}
else
{
*v17 = v12 - 1074;
*v16 = 32 * v8 - hi0bits(v11[v8 - 1]);
}
return v14;
}
| d2b:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV RSI,qword ptr [RBP + -0x20]
MOV EDI,0x1
CALL 0x0015a2b0
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x4]
AND EAX,0xfffff
MOV dword ptr [RBP + -0x40],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x4]
AND ECX,0x7fffffff
MOV dword ptr [RAX + 0x4],ECX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x4]
SHR EAX,0x14
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JZ 0x00159861
MOV EAX,dword ptr [RBP + -0x40]
OR EAX,0x100000
MOV dword ptr [RBP + -0x40],EAX
LAB_00159861:
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x3c],EAX
CMP EAX,0x0
JZ 0x001598f8
LEA RDI,[RBP + -0x3c]
CALL 0x0015a8b0
MOV dword ptr [RBP + -0x30],EAX
CMP EAX,0x0
JZ 0x001598c9
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x48],EAX
MOV EAX,dword ptr [RBP + -0x40]
MOV ECX,0x20
SUB ECX,dword ptr [RBP + -0x30]
SHL EAX,CL
MOV ECX,dword ptr [RBP + -0x48]
OR ECX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],ECX
CMP dword ptr [RBP + -0x30],0x20
JNZ 0x001598b6
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x30],EAX
MOV dword ptr [RBP + -0x4c],EAX
JMP 0x001598bc
LAB_001598b6:
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x4c],EAX
LAB_001598bc:
MOV ECX,dword ptr [RBP + -0x4c]
MOV EAX,dword ptr [RBP + -0x40]
SHR EAX,CL
MOV dword ptr [RBP + -0x40],EAX
JMP 0x001598d2
LAB_001598c9:
MOV ECX,dword ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],ECX
LAB_001598d2:
MOV EDX,dword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x4],EDX
MOV EAX,0x1
MOV ECX,0x2
CMP EDX,0x0
CMOVNZ EAX,ECX
MOV RCX,qword ptr [RBP + -0x28]
MOV dword ptr [RCX + 0x14],EAX
MOV dword ptr [RBP + -0x44],EAX
JMP 0x00159928
LAB_001598f8:
LEA RDI,[RBP + -0x40]
CALL 0x0015a8b0
MOV dword ptr [RBP + -0x30],EAX
MOV ECX,dword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x14],0x1
MOV dword ptr [RBP + -0x44],0x1
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,0x20
MOV dword ptr [RBP + -0x30],EAX
LAB_00159928:
CMP dword ptr [RBP + -0x2c],0x0
JZ 0x00159953
MOV ECX,dword ptr [RBP + -0x2c]
SUB ECX,0x3ff
SUB ECX,0x34
ADD ECX,dword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],ECX
MOV ECX,0x35
SUB ECX,dword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX],ECX
JMP 0x00159994
LAB_00159953:
MOV ECX,dword ptr [RBP + -0x2c]
SUB ECX,0x3ff
SUB ECX,0x34
ADD ECX,0x1
ADD ECX,dword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],ECX
MOV EAX,dword ptr [RBP + -0x44]
SHL EAX,0x5
MOV dword ptr [RBP + -0x50],EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RBP + -0x44]
SUB ECX,0x1
MOVSXD RCX,ECX
MOV EDI,dword ptr [RAX + RCX*0x4]
CALL 0x00159e30
MOV ECX,dword ptr [RBP + -0x50]
SUB ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX],ECX
LAB_00159994:
MOV RAX,qword ptr [RBP + -0x28]
ADD RSP,0x50
POP RBP
RET
|
int8 * d2b(uint *param_1,int *param_2,int *param_3,int8 param_4)
{
int iVar1;
int local_4c;
uint local_48;
uint local_44;
uint *local_40;
int local_38;
uint local_34;
int8 *local_30;
int8 local_28;
int *local_20;
int *local_18;
uint *local_10;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
local_30 = (int8 *)Balloc(1,param_4);
local_40 = (uint *)*local_30;
local_48 = local_10[1] & 0xfffff;
local_10[1] = local_10[1] & 0x7fffffff;
local_34 = local_10[1] >> 0x14;
if (local_34 != 0) {
local_48 = local_48 | 0x100000;
}
local_44 = *local_10;
if (local_44 == 0) {
local_38 = lo0bits(&local_48);
*local_40 = local_48;
*(int4 *)((long)local_30 + 0x14) = 1;
local_4c = 1;
local_38 = local_38 + 0x20;
}
else {
local_38 = lo0bits(&local_44);
if (local_38 == 0) {
*local_40 = local_44;
}
else {
*local_40 = local_44 | local_48 << (0x20U - (char)local_38 & 0x1f);
if (local_38 == 0x20) {
local_38 = 0x1f;
}
local_48 = local_48 >> ((byte)local_38 & 0x1f);
}
local_40[1] = local_48;
local_4c = 1;
if (local_48 != 0) {
local_4c = 2;
}
*(int *)((long)local_30 + 0x14) = local_4c;
}
if (local_34 == 0) {
*local_18 = local_38 + -0x432;
iVar1 = hi0bits(local_40[local_4c + -1]);
*local_20 = local_4c * 0x20 - iVar1;
}
else {
*local_18 = (local_34 - 0x433) + local_38;
*local_20 = 0x35 - local_38;
}
return local_30;
}
| |
27,335 | GetNumBlock | seiftnesse[P]memoryallocator/src/custom_alloc_util.c | int GetNumBlock(size_t size) {
// Safety against overflow
if (size > INT_MAX - BLOCK_SIZE) {
HEAP_LOG("Size too large for block conversion: %zu bytes\n", size);
return INT_MAX / BLOCK_SIZE;
}
// Round up to nearest block
int blocks = (size + BLOCK_SIZE - 1) / BLOCK_SIZE;
HEAP_LOG("Size %zu bytes converted to %d blocks\n", size, blocks);
return blocks;
} | O2 | c | GetNumBlock:
leaq 0xfff(%rdi), %rcx
shrq $0xc, %rcx
cmpq $0x7ffff000, %rdi # imm = 0x7FFFF000
movl $0x7ffff, %eax # imm = 0x7FFFF
cmovbl %ecx, %eax
retq
| GetNumBlock:
lea rcx, [rdi+0FFFh]
shr rcx, 0Ch
cmp rdi, 7FFFF000h
mov eax, offset unk_7FFFF
cmovb eax, ecx
retn
| void * GetNumBlock(unsigned long long a1)
{
void *result; // rax
result = &unk_7FFFF;
if ( a1 < 0x7FFFF000 )
return (void *)(unsigned int)((a1 + 4095) >> 12);
return result;
}
| GetNumBlock:
LEA RCX,[RDI + 0xfff]
SHR RCX,0xc
CMP RDI,0x7ffff000
MOV EAX,0x7ffff
CMOVC EAX,ECX
RET
|
ulong GetNumBlock(ulong param_1)
{
ulong uVar1;
uVar1 = 0x7ffff;
if (param_1 < 0x7ffff000) {
uVar1 = param_1 + 0xfff >> 0xc & 0xffffffff;
}
return uVar1;
}
| |
27,336 | SchemaConverter::_add_rule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/json-schema-to-grammar.cpp | std::string _add_rule(const std::string & name, const std::string & rule) {
std::string esc_name = regex_replace(name, INVALID_RULE_CHARS_RE, "-");
if (_rules.find(esc_name) == _rules.end() || _rules[esc_name] == rule) {
_rules[esc_name] = rule;
return esc_name;
} else {
int i = 0;
while (_rules.find(esc_name + std::to_string(i)) != _rules.end() && _rules[esc_name + std::to_string(i)] != rule) {
i++;
}
std::string key = esc_name + std::to_string(i);
_rules[key] = rule;
return key;
}
} | O2 | cpp | SchemaConverter::_add_rule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rcx, 0x10(%rsp)
movq %rsi, %r14
movq %rdi, %r13
leaq 0x6f12d(%rip), %rax # 0xfd2f0
leaq 0x20919(%rip), %rcx # 0xaeae3
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
movq %rdx, %rsi
movq %rax, %rdx
xorl %r8d, %r8d
callq 0x720f6
leaq 0x28(%r14), %rdi
movq %rdi, 0x8(%rsp)
movq %rbx, %rsi
callq 0x8e486
addq $0x30, %r14
cmpq %r14, %rax
je 0x8e21a
leaq 0x18(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x8e420
movq %rax, %rdi
movq 0x10(%rsp), %rsi
callq 0x3a3b8
testb %al, %al
je 0x8e262
leaq 0x18(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x8e420
movq %rax, %rdi
movq 0x10(%rsp), %rsi
callq 0x234c0
leaq 0x10(%r13), %rcx
movq %rcx, (%r13)
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdx
cmpq %rax, %rdx
je 0x8e318
movq %rdx, (%r13)
movq 0x28(%rsp), %rcx
movq %rcx, 0x10(%r13)
jmp 0x8e31e
xorl %esi, %esi
leaq 0x78(%rsp), %rbx
leaq 0x38(%rsp), %r12
movq %rbx, %rdi
movl %esi, 0x4(%rsp)
callq 0x3d9f3
movq %r12, %rdi
leaq 0x18(%rsp), %rsi
movq %rbx, %rdx
callq 0x7b04e
movq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x8e486
cmpq %r14, %rax
je 0x8e339
leaq 0x58(%rsp), %r15
movq %r15, %rdi
movl 0x4(%rsp), %esi
callq 0x3d9f3
leaq 0x98(%rsp), %rbp
movq %rbp, %rdi
leaq 0x18(%rsp), %rsi
movq %r15, %rdx
callq 0x7b04e
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0x8cebe
movq %rax, %rdi
movq 0x10(%rsp), %rsi
callq 0x586ae
movl %eax, %r15d
movq %rbp, %rdi
callq 0x241b8
leaq 0x58(%rsp), %rdi
callq 0x241b8
movq %r12, %rdi
callq 0x241b8
movq %rbx, %rdi
callq 0x241b8
testb %r15b, %r15b
je 0x8e34d
movl 0x4(%rsp), %esi
incl %esi
jmp 0x8e26e
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x20(%rsp), %rcx
movq %rcx, 0x8(%r13)
movq %rax, 0x18(%rsp)
andq $0x0, 0x20(%rsp)
movb $0x0, 0x28(%rsp)
jmp 0x8e391
leaq 0x38(%rsp), %rdi
callq 0x241b8
leaq 0x78(%rsp), %rdi
callq 0x241b8
leaq 0x38(%rsp), %rdi
movl 0x4(%rsp), %esi
callq 0x3d9f3
leaq 0x18(%rsp), %rsi
leaq 0x38(%rsp), %rdx
movq %r13, %rdi
callq 0x7b04e
leaq 0x38(%rsp), %rdi
callq 0x241b8
movq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x8e420
movq %rax, %rdi
movq 0x10(%rsp), %rsi
callq 0x234c0
leaq 0x18(%rsp), %rdi
callq 0x241b8
movq %r13, %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
jmp 0x8e409
jmp 0x8e3fc
movq %rax, %rbx
movq %r13, %rdi
jmp 0x8e409
jmp 0x8e3fc
jmp 0x8e3fc
jmp 0x8e3fc
movq %rax, %rbx
jmp 0x8e3e1
jmp 0x8e3ed
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x241b8
leaq 0x58(%rsp), %rdi
callq 0x241b8
jmp 0x8e3f0
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x241b8
jmp 0x8e404
movq %rax, %rbx
jmp 0x8e40e
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x241b8
leaq 0x18(%rsp), %rdi
callq 0x241b8
movq %rbx, %rdi
callq 0x23f80
| _ZN15SchemaConverter9_add_ruleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0B8h
mov [rsp+0E8h+var_D8], rcx
mov r14, rsi
mov r13, rdi
lea rax, _Z21INVALID_RULE_CHARS_REB5cxx11; INVALID_RULE_CHARS_RE
lea rcx, asc_AEAE2+1; "-"
lea rbx, [rsp+0E8h+var_D0]
mov rdi, rbx
mov rsi, rdx
mov rdx, rax
xor r8d, r8d
call _ZSt13regex_replaceINSt7__cxx1112regex_traitsIcEEcSt11char_traitsIcESaIcEENS0_12basic_stringIT0_T1_T2_EERKSA_RKNS0_11basic_regexIS7_T_EEPKS7_NSt15regex_constants15match_flag_typeE; std::regex_replace<std::regex_traits<char>,char,std::char_traits<char>,std::allocator<char>>(std::string const&,std::basic_regex<char,std::regex_traits<char>> const&,char const*,std::regex_constants::match_flag_type)
lea rdi, [r14+28h]
mov [rsp+0E8h+var_E0], rdi
mov rsi, rbx
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE4findERS7_; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::find(std::string const&)
add r14, 30h ; '0'
cmp rax, r14
jz short loc_8E21A
lea rsi, [rsp+0E8h+var_D0]
mov rdi, [rsp+0E8h+var_E0]
call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixERS9_; std::map<std::string,std::string>::operator[](std::string const&)
mov rdi, rax
mov rsi, [rsp+0E8h+var_D8]
call _ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_
test al, al
jz short loc_8E262
loc_8E21A:
lea rsi, [rsp+0E8h+var_D0]
mov rdi, [rsp+0E8h+var_E0]
call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixERS9_; std::map<std::string,std::string>::operator[](std::string const&)
mov rdi, rax
mov rsi, [rsp+0E8h+var_D8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
lea rcx, [r13+10h]
mov [r13+0], rcx
lea rax, [rsp+0E8h+var_C0]
mov rdx, [rax-10h]
cmp rdx, rax
jz loc_8E318
mov [r13+0], rdx
mov rcx, [rsp+0E8h+var_C0]
mov [r13+10h], rcx
jmp loc_8E31E
loc_8E262:
xor esi, esi; int
lea rbx, [rsp+0E8h+var_70]
lea r12, [rsp+0E8h+var_B0]
loc_8E26E:
mov rdi, rbx; this
mov [rsp+0E8h+var_E4], esi
call _ZNSt7__cxx119to_stringEi; std::to_string(int)
mov rdi, r12
lea rsi, [rsp+0E8h+var_D0]
mov rdx, rbx
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_OS8_; std::operator+<char>(std::string const&,std::string&&)
mov rdi, [rsp+0E8h+var_E0]
mov rsi, r12
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE4findERS7_; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::find(std::string const&)
cmp rax, r14
jz loc_8E339
lea r15, [rsp+0E8h+var_90]
mov rdi, r15; this
mov esi, [rsp+0E8h+var_E4]; int
call _ZNSt7__cxx119to_stringEi; std::to_string(int)
lea rbp, [rsp+0E8h+var_50]
mov rdi, rbp
lea rsi, [rsp+0E8h+var_D0]
mov rdx, r15
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_OS8_; std::operator+<char>(std::string const&,std::string&&)
mov rdi, [rsp+0E8h+var_E0]
mov rsi, rbp
call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixEOS5_; std::map<std::string,std::string>::operator[](std::string&&)
mov rdi, rax
mov rsi, [rsp+0E8h+var_D8]
call _ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EESA_; std::operator!=<char>(std::string const&,std::string const&)
mov r15d, eax
mov rdi, rbp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0E8h+var_90]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r12; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test r15b, r15b
jz short loc_8E34D
mov esi, [rsp+0E8h+var_E4]
inc esi
jmp loc_8E26E
loc_8E318:
movups xmm0, xmmword ptr [rax]
movups xmmword ptr [rcx], xmm0
loc_8E31E:
mov rcx, [rsp+0E8h+var_C8]
mov [r13+8], rcx
mov [rsp+0E8h+var_D0], rax
and [rsp+0E8h+var_C8], 0
mov byte ptr [rsp+0E8h+var_C0], 0
jmp short loc_8E391
loc_8E339:
lea rdi, [rsp+0E8h+var_B0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0E8h+var_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_8E34D:
lea rdi, [rsp+0E8h+var_B0]; this
mov esi, [rsp+0E8h+var_E4]; int
call _ZNSt7__cxx119to_stringEi; std::to_string(int)
lea rsi, [rsp+0E8h+var_D0]
lea rdx, [rsp+0E8h+var_B0]
mov rdi, r13
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_OS8_; std::operator+<char>(std::string const&,std::string&&)
lea rdi, [rsp+0E8h+var_B0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, [rsp+0E8h+var_E0]
mov rsi, r13
call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixERS9_; std::map<std::string,std::string>::operator[](std::string const&)
mov rdi, rax
mov rsi, [rsp+0E8h+var_D8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
loc_8E391:
lea rdi, [rsp+0E8h+var_D0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, r13
add rsp, 0B8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_30]
jmp short loc_8E409
jmp short loc_8E3FC
mov rbx, rax
mov rdi, r13
jmp short loc_8E409
jmp short loc_8E3FC
jmp short loc_8E3FC
jmp short loc_8E3FC
mov rbx, rax
jmp short loc_8E3E1
jmp short loc_8E3ED
mov rbx, rax
lea rdi, [rsp+arg_90]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_8E3E1:
lea rdi, [rsp+arg_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_8E3F0
loc_8E3ED:
mov rbx, rax
loc_8E3F0:
lea rdi, [rsp+arg_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_8E404
loc_8E3FC:
mov rbx, rax
jmp short loc_8E40E
mov rbx, rax
loc_8E404:
lea rdi, [rsp+arg_70]; void *
loc_8E409:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_8E40E:
lea rdi, [rsp+arg_10]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
| long long SchemaConverter::_add_rule(long long a1, long long a2, _QWORD *a3, _QWORD *a4)
{
long long v4; // r14
_QWORD *v5; // rax
long long v6; // rax
int i; // esi
_QWORD *v8; // rax
bool v9; // r15
long long v10; // rax
long long v12; // [rsp+8h] [rbp-E0h]
__int128 *v14; // [rsp+18h] [rbp-D0h] BYREF
long long v15; // [rsp+20h] [rbp-C8h]
__int128 v16; // [rsp+28h] [rbp-C0h] BYREF
_BYTE v17[32]; // [rsp+38h] [rbp-B0h] BYREF
_BYTE v18[32]; // [rsp+58h] [rbp-90h] BYREF
_BYTE v19[32]; // [rsp+78h] [rbp-70h] BYREF
_BYTE v20[80]; // [rsp+98h] [rbp-50h] BYREF
std::regex_replace<std::regex_traits<char>,char,std::char_traits<char>,std::allocator<char>>(
(long long)&v14,
a3,
(long long)&INVALID_RULE_CHARS_RE[abi:cxx11],
(long long)"-",
0);
v12 = a2 + 40;
v4 = a2 + 48;
if ( std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::find(
a2 + 40,
&v14) == a2 + 48
|| (v5 = (_QWORD *)std::map<std::string,std::string>::operator[](v12, &v14), std::operator==<char>(v5, a4)) )
{
v6 = std::map<std::string,std::string>::operator[](v12, &v14);
std::string::_M_assign(v6, a4);
*(_QWORD *)a1 = a1 + 16;
if ( v14 == &v16 )
{
*(_OWORD *)(a1 + 16) = v16;
}
else
{
*(_QWORD *)a1 = v14;
*(_QWORD *)(a1 + 16) = v16;
}
*(_QWORD *)(a1 + 8) = v15;
v14 = &v16;
v15 = 0LL;
LOBYTE(v16) = 0;
}
else
{
for ( i = 0; ; ++i )
{
std::to_string((std::__cxx11 *)v19, i);
std::operator+<char>((long long)v17, (long long)&v14, (long long)v19);
if ( std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::find(
v12,
v17) == v4 )
break;
std::to_string((std::__cxx11 *)v18, i);
std::operator+<char>((long long)v20, (long long)&v14, (long long)v18);
v8 = (_QWORD *)std::map<std::string,std::string>::operator[](v12, (long long)v20);
v9 = std::operator!=<char>(v8, a4);
std::string::~string(v20);
std::string::~string(v18);
std::string::~string(v17);
std::string::~string(v19);
if ( !v9 )
goto LABEL_12;
}
std::string::~string(v17);
std::string::~string(v19);
LABEL_12:
std::to_string((std::__cxx11 *)v17, i);
std::operator+<char>(a1, (long long)&v14, (long long)v17);
std::string::~string(v17);
v10 = std::map<std::string,std::string>::operator[](v12, a1);
std::string::_M_assign(v10, a4);
}
std::string::~string(&v14);
return a1;
}
| _add_rule:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xb8
MOV qword ptr [RSP + 0x10],RCX
MOV R14,RSI
MOV R13,RDI
LEA RAX,[0x1fd2f0]
LEA RCX,[0x1aeae3]
LEA RBX,[RSP + 0x18]
MOV RDI,RBX
MOV RSI,RDX
MOV RDX,RAX
XOR R8D,R8D
CALL 0x001720f6
LEA RDI,[R14 + 0x28]
LAB_0018e1e4:
MOV qword ptr [RSP + 0x8],RDI
MOV RSI,RBX
CALL 0x0018e486
ADD R14,0x30
CMP RAX,R14
JZ 0x0018e21a
LAB_0018e1fa:
LEA RSI,[RSP + 0x18]
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0018e420
MOV RDI,RAX
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x0013a3b8
TEST AL,AL
JZ 0x0018e262
LAB_0018e21a:
LEA RSI,[RSP + 0x18]
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0018e420
MOV RDI,RAX
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x001234c0
LEA RCX,[R13 + 0x10]
MOV qword ptr [R13],RCX
LEA RAX,[RSP + 0x28]
MOV RDX,qword ptr [RAX + -0x10]
CMP RDX,RAX
JZ 0x0018e318
MOV qword ptr [R13],RDX
MOV RCX,qword ptr [RSP + 0x28]
MOV qword ptr [R13 + 0x10],RCX
JMP 0x0018e31e
LAB_0018e262:
XOR ESI,ESI
LEA RBX,[RSP + 0x78]
LEA R12,[RSP + 0x38]
LAB_0018e26e:
MOV RDI,RBX
MOV dword ptr [RSP + 0x4],ESI
CALL 0x0013d9f3
LAB_0018e27a:
MOV RDI,R12
LEA RSI,[RSP + 0x18]
MOV RDX,RBX
CALL 0x0017b04e
LAB_0018e28a:
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,R12
CALL 0x0018e486
CMP RAX,R14
JZ 0x0018e339
LAB_0018e2a0:
LEA R15,[RSP + 0x58]
MOV RDI,R15
MOV ESI,dword ptr [RSP + 0x4]
CALL 0x0013d9f3
LAB_0018e2b1:
LEA RBP,[RSP + 0x98]
MOV RDI,RBP
LEA RSI,[RSP + 0x18]
MOV RDX,R15
CALL 0x0017b04e
LAB_0018e2c9:
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,RBP
CALL 0x0018cebe
MOV RDI,RAX
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x001586ae
MOV R15D,EAX
MOV RDI,RBP
CALL 0x001241b8
LEA RDI,[RSP + 0x58]
CALL 0x001241b8
MOV RDI,R12
CALL 0x001241b8
MOV RDI,RBX
CALL 0x001241b8
TEST R15B,R15B
JZ 0x0018e34d
MOV ESI,dword ptr [RSP + 0x4]
INC ESI
JMP 0x0018e26e
LAB_0018e318:
MOVUPS XMM0,xmmword ptr [RAX]
MOVUPS xmmword ptr [RCX],XMM0
LAB_0018e31e:
MOV RCX,qword ptr [RSP + 0x20]
MOV qword ptr [R13 + 0x8],RCX
MOV qword ptr [RSP + 0x18],RAX
AND qword ptr [RSP + 0x20],0x0
MOV byte ptr [RSP + 0x28],0x0
JMP 0x0018e391
LAB_0018e339:
LEA RDI,[RSP + 0x38]
CALL 0x001241b8
LEA RDI,[RSP + 0x78]
CALL 0x001241b8
LAB_0018e34d:
LEA RDI,[RSP + 0x38]
MOV ESI,dword ptr [RSP + 0x4]
CALL 0x0013d9f3
LAB_0018e35b:
LEA RSI,[RSP + 0x18]
LEA RDX,[RSP + 0x38]
MOV RDI,R13
CALL 0x0017b04e
LEA RDI,[RSP + 0x38]
CALL 0x001241b8
LAB_0018e377:
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,R13
CALL 0x0018e420
MOV RDI,RAX
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x001234c0
LAB_0018e391:
LEA RDI,[RSP + 0x18]
CALL 0x001241b8
MOV RAX,R13
ADD RSP,0xb8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* SchemaConverter::_add_rule(std::__cxx11::string const&, std::__cxx11::string const&) */
string * SchemaConverter::_add_rule(string *param_1,string *param_2)
{
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
*this;
char cVar1;
bool bVar2;
string *psVar3;
string *in_RCX;
int iVar4;
int1 *local_d0;
int8 local_c8;
int1 local_c0;
int7 uStack_bf;
int8 uStack_b8;
string local_b0 [32];
__cxx11 local_90 [32];
__cxx11 local_70 [32];
string local_50 [32];
std::
regex_replace<std::__cxx11::regex_traits<char>,char,std::char_traits<char>,std::allocator<char>>
((string *)&local_d0);
this = (_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
*)(param_2 + 0x28);
/* try { // try from 0018e1e4 to 0018e1f0 has its CatchHandler @ 0018e3c6 */
psVar3 = (string *)
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::find(this,(string *)&local_d0);
if (psVar3 != param_2 + 0x30) {
/* try { // try from 0018e1fa to 0018e208 has its CatchHandler @ 0018e3c4 */
psVar3 = (string *)
std::
map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::operator[]((map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
*)this,(string *)&local_d0);
cVar1 = std::operator==(psVar3,in_RCX);
if (cVar1 == '\0') {
iVar4 = 0;
while( true ) {
/* try { // try from 0018e26e to 0018e279 has its CatchHandler @ 0018e3fc */
std::__cxx11::to_string(local_70,iVar4);
/* try { // try from 0018e27a to 0018e289 has its CatchHandler @ 0018e401 */
std::operator+(local_b0,(string *)&local_d0);
/* try { // try from 0018e28a to 0018e296 has its CatchHandler @ 0018e3ed */
psVar3 = (string *)
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::find(this,local_b0);
if (psVar3 == param_2 + 0x30) break;
/* try { // try from 0018e2a0 to 0018e2b0 has its CatchHandler @ 0018e3cf */
std::__cxx11::to_string(local_90,iVar4);
/* try { // try from 0018e2b1 to 0018e2c8 has its CatchHandler @ 0018e3ca */
std::operator+(local_50,(string *)&local_d0);
/* try { // try from 0018e2c9 to 0018e2d5 has its CatchHandler @ 0018e3d1 */
psVar3 = (string *)
std::
map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::operator[]((map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
*)this,local_50);
bVar2 = std::operator!=(psVar3,in_RCX);
std::__cxx11::string::~string(local_50);
std::__cxx11::string::~string((string *)local_90);
std::__cxx11::string::~string(local_b0);
std::__cxx11::string::~string((string *)local_70);
if (!bVar2) goto LAB_0018e34d;
iVar4 = iVar4 + 1;
}
std::__cxx11::string::~string(local_b0);
std::__cxx11::string::~string((string *)local_70);
LAB_0018e34d:
/* try { // try from 0018e34d to 0018e35a has its CatchHandler @ 0018e3ba */
std::__cxx11::to_string((__cxx11 *)local_b0,iVar4);
/* try { // try from 0018e35b to 0018e36c has its CatchHandler @ 0018e3b0 */
std::operator+(param_1,(string *)&local_d0);
std::__cxx11::string::~string(local_b0);
/* try { // try from 0018e377 to 0018e390 has its CatchHandler @ 0018e3bc */
psVar3 = (string *)
std::
map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::operator[]((map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
*)this,param_1);
std::__cxx11::string::_M_assign(psVar3);
goto LAB_0018e391;
}
}
/* try { // try from 0018e21a to 0018e235 has its CatchHandler @ 0018e3c8 */
psVar3 = (string *)
std::
map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::operator[]((map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
*)this,(string *)&local_d0);
std::__cxx11::string::_M_assign(psVar3);
*(string **)param_1 = param_1 + 0x10;
if (local_d0 == &local_c0) {
*(ulong *)(param_1 + 0x10) = CONCAT71(uStack_bf,local_c0);
*(int8 *)(param_1 + 0x18) = uStack_b8;
}
else {
*(int1 **)param_1 = local_d0;
*(ulong *)(param_1 + 0x10) = CONCAT71(uStack_bf,local_c0);
}
*(int8 *)(param_1 + 8) = local_c8;
local_c8 = 0;
local_c0 = 0;
local_d0 = &local_c0;
LAB_0018e391:
std::__cxx11::string::~string((string *)&local_d0);
return param_1;
}
| |
27,337 | 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>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) | monkey531[P]llama/common/json.hpp | reference operator[](typename object_t::key_type key)
{
// implicitly convert null value to an empty object
if (is_null())
{
m_data.m_type = value_t::object;
m_data.m_value.object = create<object_t>();
assert_invariant();
}
// operator[] only works for objects
if (JSON_HEDLEY_LIKELY(is_object()))
{
auto result = m_data.m_value.object->emplace(std::move(key), nullptr);
return set_parent(result.first->second);
}
JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a string argument with ", type_name()), this));
} | 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>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movb (%rdi), %al
testb %al, %al
jne 0xab092
movb $0x1, (%r14)
movl $0x20, %edi
callq 0x1a8a0
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x8(%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x5834c
movb (%r14), %al
cmpb $0x1, %al
jne 0xab0fb
movq 0x8(%r14), %r14
movq %rsp, %r15
movb $0x0, (%r15)
movq $0x0, 0x8(%r15)
movq %r15, %rdi
movl $0x1, %esi
callq 0x5834c
movq %r15, %rdi
movl $0x1, %esi
callq 0x5834c
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x5ef1e
movq %rax, %rbx
movq %rsp, %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x5834c
movq %r14, %rdi
callq 0x5d83a
addq $0x20, %rbx
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x1a430
movq %rax, %rbx
movq %r14, %rdi
callq 0x5e894
leaq 0x20(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x44ea5(%rip), %rsi # 0xeffc4
movq %rsp, %rdi
callq 0xab1a7
movb $0x1, %bpl
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x131, %esi # imm = 0x131
movq %r14, %rcx
callq 0x5e63c
xorl %ebp, %ebp
leaq 0x7de12(%rip), %rsi # 0x128f58
leaq -0x50683(%rip), %rdx # 0x5aaca
movq %rbx, %rdi
callq 0x1aef0
movq %rax, %r14
movq %rsp, %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x5834c
movq %rbx, %rdi
callq 0x5d83a
jmp 0xab19f
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xab18d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a8c0
testb %bpl, %bpl
jne 0xab197
jmp 0xab19f
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a660
movq %r14, %rdi
callq 0x1af80
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixES9_:
push rbp; char
push r15; int
push r14; __int64
push rbx; int
sub rsp, 28h
mov rbx, rsi
mov r14, rdi
mov al, [rdi]
test al, al
jnz short loc_AB092
mov byte ptr [r14], 1
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
mov qword ptr [rax+10h], 0
mov [r14+8], rax
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 al, [r14]
loc_AB092:
cmp al, 1
jnz short loc_AB0FB
mov r14, [r14+8]
mov r15, rsp
mov byte ptr [r15], 0
mov qword ptr [r15+8], 0
mov rdi, r15
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, r15
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 rsi, rbx
mov rdx, r15
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE7emplaceERSH_OSD_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::emplace(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&&)
mov rbx, rax
mov r14, rsp
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
add rbx, 20h ; ' '
mov rax, rbx
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_AB0FB:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_28]
mov [rdx], rax
lea rsi, aCannotUseOpera_0; "cannot use operator[] with a string arg"...
mov rdi, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA51_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[51],char const*>(char const(&)[51],char const* &&)
mov bpl, 1
mov rdx, rsp
mov rdi, rbx; this
mov esi, 131h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
mov rbx, rsp
mov rdi, rbx
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
jmp short loc_AB19F
mov r14, rax
lea rax, [rsp+48h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_AB18D
mov rsi, [rsp+48h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_AB18D:
test bpl, bpl
jnz short loc_AB197
jmp short loc_AB19F
mov r14, rax
loc_AB197:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_AB19F:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[](
long long a1,
long long *a2)
{
char v2; // al
long long v3; // rax
_QWORD *v4; // r14
long long v5; // rbx
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
_QWORD v8[9]; // [rsp+0h] [rbp-48h] BYREF
v2 = *(_BYTE *)a1;
if ( !*(_BYTE *)a1 )
{
*(_BYTE *)a1 = 1;
v3 = operator new(0x20uLL);
*(_OWORD *)v3 = 0LL;
*(_QWORD *)(v3 + 16) = 0LL;
*(_QWORD *)(a1 + 8) = v3;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
v2 = *(_BYTE *)a1;
}
if ( v2 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v8[4] = 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(&)[51],char const*>(
v8,
"cannot use operator[] with a string argument with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
305,
v8);
__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);
}
v4 = *(_QWORD **)(a1 + 8);
LOBYTE(v8[0]) = 0;
v8[1] = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v8);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v8);
v5 = 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>>>>::emplace(
v4,
a2,
(long long)v8);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v8);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v8);
return v5 + 32;
}
| operator[]:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RSI
MOV R14,RDI
MOV AL,byte ptr [RDI]
TEST AL,AL
JNZ 0x001ab092
MOV byte ptr [R14],0x1
MOV EDI,0x20
CALL 0x0011a8a0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
MOV qword ptr [RAX + 0x10],0x0
MOV qword ptr [R14 + 0x8],RAX
MOV RDI,R14
MOV ESI,0x1
CALL 0x0015834c
MOV AL,byte ptr [R14]
LAB_001ab092:
CMP AL,0x1
JNZ 0x001ab0fb
MOV R14,qword ptr [R14 + 0x8]
MOV R15,RSP
MOV byte ptr [R15],0x0
MOV qword ptr [R15 + 0x8],0x0
MOV RDI,R15
MOV ESI,0x1
CALL 0x0015834c
MOV RDI,R15
MOV ESI,0x1
CALL 0x0015834c
LAB_001ab0c3:
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R15
CALL 0x0015ef1e
LAB_001ab0d1:
MOV RBX,RAX
MOV R14,RSP
MOV RDI,R14
XOR ESI,ESI
CALL 0x0015834c
MOV RDI,R14
CALL 0x0015d83a
ADD RBX,0x20
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001ab0fb:
MOV EDI,0x20
CALL 0x0011a430
MOV RBX,RAX
MOV RDI,R14
CALL 0x0015e894
LEA RDX,[RSP + 0x20]
MOV qword ptr [RDX],RAX
LAB_001ab118:
LEA RSI,[0x1effc4]
MOV RDI,RSP
CALL 0x001ab1a7
MOV BPL,0x1
LAB_001ab12a:
MOV RDX,RSP
MOV RDI,RBX
MOV ESI,0x131
MOV RCX,R14
CALL 0x0015e63c
XOR EBP,EBP
LEA RSI,[0x228f58]
LEA RDX,[0x15aaca]
MOV RDI,RBX
CALL 0x0011aef0
|
/* 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[](std::__cxx11::string) */
long __thiscall
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[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,string *param_2)
{
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_00;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
bVar1;
int8 *puVar2;
long lVar3;
int8 uVar4;
bool bVar5;
basic_json local_48 [8];
int8 local_40;
char *local_28;
bVar1 = *this;
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
*this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1;
puVar2 = (int8 *)operator_new(0x20);
*puVar2 = 0;
puVar2[1] = 0;
puVar2[2] = 0;
*(int8 **)(this + 8) = puVar2;
assert_invariant(SUB81(this,0));
bVar1 = *this;
}
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
this_00 = *(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 + 8);
local_48[0] = (basic_json)0x0;
local_40 = 0;
bVar5 = SUB81(local_48,0);
assert_invariant(bVar5);
assert_invariant(bVar5);
/* try { // try from 001ab0c3 to 001ab0d0 has its CatchHandler @ 001ab155 */
lVar3 = 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>>>>
::emplace(this_00,param_2,local_48);
assert_invariant(bVar5);
data::~data((data *)local_48);
return lVar3 + 0x20;
}
uVar4 = __cxa_allocate_exception(0x20);
local_28 = (char *)type_name(this);
/* try { // try from 001ab118 to 001ab126 has its CatchHandler @ 001ab194 */
detail::concat<std::__cxx11::string,char_const(&)[51],char_const*>
((detail *)local_48,"cannot use operator[] with a string argument with ",&local_28);
/* try { // try from 001ab12a to 001ab154 has its CatchHandler @ 001ab16f */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar4,0x131,local_48,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&detail::type_error::typeinfo,detail::exception::~exception);
}
| |
27,338 | ma_set_data_pagecache_callbacks | eloqsql/storage/maria/ma_open.c | void _ma_set_data_pagecache_callbacks(PAGECACHE_FILE *file,
MARIA_SHARE *share)
{
pagecache_file_set_null_hooks(file);
file->callback_data= (uchar*) share;
file->flush_log_callback= &maria_flush_log_for_page_none; /* Do nothing */
file->post_write_hook= maria_page_write_failure;
if (share->temporary)
{
file->post_read_hook= &maria_page_crc_check_none;
file->pre_write_hook= &maria_page_filler_set_none;
}
else
{
file->post_read_hook= &maria_page_crc_check_data;
if (share->options & HA_OPTION_PAGE_CHECKSUM)
file->pre_write_hook= &maria_page_crc_set_normal;
else
file->pre_write_hook= &maria_page_filler_set_normal;
if (share->now_transactional)
file->flush_log_callback= maria_flush_log_for_page;
}
if (MY_TEST(share->base.extra_options & MA_EXTRA_OPTIONS_ENCRYPTED))
{
ma_crypt_set_data_pagecache_callbacks(file, share);
}
} | O3 | c | ma_set_data_pagecache_callbacks:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x346f3
movq %rbx, 0x40(%r14)
leaq -0x5584(%rip), %rax # 0x501ec
movq %rax, 0x38(%r14)
leaq -0x55f5(%rip), %rax # 0x50186
movq %rax, 0x30(%r14)
cmpb $0x0, 0x7d9(%rbx)
je 0x557a0
leaq -0x5656(%rip), %rax # 0x50139
movq %rax, 0x20(%r14)
leaq -0x561c(%rip), %rax # 0x5017e
movq %rax, 0x28(%r14)
jmp 0x557dd
leaq -0x5718(%rip), %rax # 0x5008f
movq %rax, 0x20(%r14)
btl $0xb, 0x720(%rbx)
jb 0x557be
leaq -0x5678(%rip), %rax # 0x50144
jmp 0x557c5
leaq -0x57c2(%rip), %rax # 0x50003
movq %rax, 0x28(%r14)
cmpb $0x0, 0x7e7(%rbx)
je 0x557dd
leaq -0x563e(%rip), %rax # 0x5019b
movq %rax, 0x38(%r14)
testb $0x1, 0x428(%rbx)
jne 0x557eb
popq %rbx
popq %r14
popq %rbp
retq
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x50ad3
| _ma_set_data_pagecache_callbacks:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rsi
mov r14, rdi
call pagecache_file_set_null_hooks
mov [r14+40h], rbx
lea rax, maria_flush_log_for_page_none
mov [r14+38h], rax
lea rax, maria_page_write_failure
mov [r14+30h], rax
cmp byte ptr [rbx+7D9h], 0
jz short loc_557A0
lea rax, maria_page_crc_check_none
mov [r14+20h], rax
lea rax, maria_page_filler_set_none
mov [r14+28h], rax
jmp short loc_557DD
loc_557A0:
lea rax, maria_page_crc_check_data
mov [r14+20h], rax
bt dword ptr [rbx+720h], 0Bh
jb short loc_557BE
lea rax, maria_page_filler_set_normal
jmp short loc_557C5
loc_557BE:
lea rax, maria_page_crc_set_normal
loc_557C5:
mov [r14+28h], rax
cmp byte ptr [rbx+7E7h], 0
jz short loc_557DD
lea rax, maria_flush_log_for_page
mov [r14+38h], rax
loc_557DD:
test byte ptr [rbx+428h], 1
jnz short loc_557EB
pop rbx
pop r14
pop rbp
retn
loc_557EB:
mov rdi, r14
mov rsi, rbx
pop rbx
pop r14
pop rbp
jmp ma_crypt_set_data_pagecache_callbacks
| long long ( * ma_set_data_pagecache_callbacks(_QWORD *a1, long long a2))()
{
long long ( *result)(); // rax
pagecache_file_set_null_hooks((long long)a1);
a1[8] = a2;
a1[7] = maria_flush_log_for_page_none;
a1[6] = maria_page_write_failure;
if ( *(_BYTE *)(a2 + 2009) )
{
a1[4] = maria_page_crc_check_none;
result = maria_page_filler_set_none;
a1[5] = maria_page_filler_set_none;
}
else
{
a1[4] = maria_page_crc_check_data;
if ( _bittest((const signed __int32 *)(a2 + 1824), 0xBu) )
result = (long long ( *)())maria_page_crc_set_normal;
else
result = (long long ( *)())maria_page_filler_set_normal;
a1[5] = result;
if ( *(_BYTE *)(a2 + 2023) )
{
result = (long long ( *)())maria_flush_log_for_page;
a1[7] = maria_flush_log_for_page;
}
}
if ( (*(_BYTE *)(a2 + 1064) & 1) != 0 )
return ma_crypt_set_data_pagecache_callbacks(a1, a2);
return result;
}
| _ma_set_data_pagecache_callbacks:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
CALL 0x001346f3
MOV qword ptr [R14 + 0x40],RBX
LEA RAX,[0x1501ec]
MOV qword ptr [R14 + 0x38],RAX
LEA RAX,[0x150186]
MOV qword ptr [R14 + 0x30],RAX
CMP byte ptr [RBX + 0x7d9],0x0
JZ 0x001557a0
LEA RAX,[0x150139]
MOV qword ptr [R14 + 0x20],RAX
LEA RAX,[0x15017e]
MOV qword ptr [R14 + 0x28],RAX
JMP 0x001557dd
LAB_001557a0:
LEA RAX,[0x15008f]
MOV qword ptr [R14 + 0x20],RAX
BT dword ptr [RBX + 0x720],0xb
JC 0x001557be
LEA RAX,[0x150144]
JMP 0x001557c5
LAB_001557be:
LEA RAX,[0x150003]
LAB_001557c5:
MOV qword ptr [R14 + 0x28],RAX
CMP byte ptr [RBX + 0x7e7],0x0
JZ 0x001557dd
LEA RAX,[0x15019b]
MOV qword ptr [R14 + 0x38],RAX
LAB_001557dd:
TEST byte ptr [RBX + 0x428],0x1
JNZ 0x001557eb
POP RBX
POP R14
POP RBP
RET
LAB_001557eb:
MOV RDI,R14
MOV RSI,RBX
POP RBX
POP R14
POP RBP
JMP 0x00150ad3
|
void _ma_set_data_pagecache_callbacks(long param_1,long param_2)
{
code *pcVar1;
pagecache_file_set_null_hooks();
*(long *)(param_1 + 0x40) = param_2;
*(code **)(param_1 + 0x38) = maria_flush_log_for_page_none;
*(code **)(param_1 + 0x30) = maria_page_write_failure;
if (*(char *)(param_2 + 0x7d9) == '\0') {
*(code **)(param_1 + 0x20) = maria_page_crc_check_data;
if ((*(uint *)(param_2 + 0x720) >> 0xb & 1) == 0) {
pcVar1 = maria_page_filler_set_normal;
}
else {
pcVar1 = maria_page_crc_set_normal;
}
*(code **)(param_1 + 0x28) = pcVar1;
if (*(char *)(param_2 + 0x7e7) != '\0') {
*(code **)(param_1 + 0x38) = maria_flush_log_for_page;
}
}
else {
*(code **)(param_1 + 0x20) = maria_page_crc_check_none;
*(code **)(param_1 + 0x28) = maria_page_filler_set_none;
}
if ((*(byte *)(param_2 + 0x428) & 1) == 0) {
return;
}
ma_crypt_set_data_pagecache_callbacks(param_1,param_2);
return;
}
| |
27,339 | ma_check_if_zero | eloqsql/storage/maria/ma_locking.c | my_bool _ma_check_if_zero(uchar *pos, size_t length)
{
uchar *end;
for (end= pos+ length; pos != end ; pos++)
if (pos[0] != 0)
return 1;
return 0;
} | O0 | c | ma_check_if_zero:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x47574
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
je 0x47564
movb $0x1, -0x1(%rbp)
jmp 0x47578
jmp 0x47566
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x47548
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopl (%rax)
| _ma_check_if_zero:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_20], rax
loc_47548:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_20]
jz short loc_47574
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
cmp eax, 0
jz short loc_47564
mov [rbp+var_1], 1
jmp short loc_47578
loc_47564:
jmp short $+2
loc_47566:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_47548
loc_47574:
mov [rbp+var_1], 0
loc_47578:
mov al, [rbp+var_1]
pop rbp
retn
| char ma_check_if_zero(_BYTE *a1, long long a2)
{
_BYTE *i; // [rsp+10h] [rbp-10h]
for ( i = a1; i != &a1[a2]; ++i )
{
if ( *i )
return 1;
}
return 0;
}
| _ma_check_if_zero:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x20],RAX
LAB_00147548:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x20]
JZ 0x00147574
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x00147564
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00147578
LAB_00147564:
JMP 0x00147566
LAB_00147566:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00147548
LAB_00147574:
MOV byte ptr [RBP + -0x1],0x0
LAB_00147578:
MOV AL,byte ptr [RBP + -0x1]
POP RBP
RET
|
int1 _ma_check_if_zero(char *param_1,long param_2)
{
char *local_18;
local_18 = param_1;
while( true ) {
if (local_18 == param_1 + param_2) {
return 0;
}
if (*local_18 != '\0') break;
local_18 = local_18 + 1;
}
return 1;
}
| |
27,340 | unlock_lock_and_free_resource | eloqsql/mysys/waiting_threads.c | static int unlock_lock_and_free_resource(WT_THD *thd, WT_RESOURCE *rc)
{
uint keylen;
const void *key;
DBUG_ENTER("unlock_lock_and_free_resource");
DBUG_ASSERT(rc->state == ACTIVE);
if (rc->owners.elements || rc->waiter_count)
{
DBUG_PRINT("wt", ("nothing to do, %u owners, %u waiters",
rc->owners.elements, rc->waiter_count));
rc_unlock(rc);
DBUG_RETURN(0);
}
if (fix_thd_pins(thd))
{
rc_unlock(rc);
DBUG_RETURN(1);
}
/* XXX if (rc->id.type->make_key) key= rc->id.type->make_key(&rc->id, &keylen); else */
{
key= &rc->id;
keylen= sizeof_WT_RESOURCE_ID;
}
/*
To free the element correctly we need to:
1. take its lock (already done).
2. set the state to FREE
3. release the lock
4. remove from the hash
*/
rc->state= FREE;
rc_unlock(rc);
DBUG_RETURN(lf_hash_delete(&reshash, thd->pins, key, keylen) == -1);
} | O3 | c | unlock_lock_and_free_resource:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
cmpl $0x0, 0xe8(%rsi)
jne 0xc727e
cmpl $0x0, 0x10(%rbx)
je 0xc7291
addq $0x18, %rbx
movq %rbx, %rdi
callq 0xc3eb2
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %rdi, %r14
cmpq $0x0, 0x30(%rdi)
je 0xc72cf
movl $0x1, 0x14(%rbx)
leaq 0x18(%rbx), %rdi
callq 0xc3eb2
movq 0x30(%r14), %rsi
leaq 0xb6a14a(%rip), %rdi # 0xc31400
movq %rbx, %rdx
movl $0x10, %ecx
callq 0x31e8c
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
sete %al
jmp 0xc728c
leaq 0xb6a152(%rip), %rdi # 0xc31428
callq 0x31980
movq %rax, 0x30(%r14)
testq %rax, %rax
jne 0xc729b
addq $0x18, %rbx
movq %rbx, %rdi
callq 0xc3eb2
movl $0x1, %eax
jmp 0xc728c
| unlock_lock_and_free_resource:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rsi
cmp dword ptr [rsi+0E8h], 0
jnz short loc_C727E
cmp dword ptr [rbx+10h], 0
jz short loc_C7291
loc_C727E:
add rbx, 18h
mov rdi, rbx
call my_rw_unlock
xor eax, eax
loc_C728C:
pop rbx
pop r14
pop rbp
retn
loc_C7291:
mov r14, rdi
cmp qword ptr [rdi+30h], 0
jz short loc_C72CF
loc_C729B:
mov dword ptr [rbx+14h], 1
lea rdi, [rbx+18h]
call my_rw_unlock
mov rsi, [r14+30h]
lea rdi, reshash
mov rdx, rbx
mov ecx, 10h
call lf_hash_delete
mov ecx, eax
xor eax, eax
cmp ecx, 0FFFFFFFFh
setz al
jmp short loc_C728C
loc_C72CF:
lea rdi, unk_C31428
call lf_pinbox_get_pins
mov [r14+30h], rax
test rax, rax
jnz short loc_C729B
add rbx, 18h
mov rdi, rbx
call my_rw_unlock
mov eax, 1
jmp short loc_C728C
| _BOOL8 unlock_lock_and_free_resource(long long a1, _DWORD *a2)
{
long long pins; // rax
if ( a2[58] || a2[4] )
{
my_rw_unlock((long long)(a2 + 6));
return 0LL;
}
else if ( *(_QWORD *)(a1 + 48)
|| (pins = lf_pinbox_get_pins((long long)&unk_C31428), (*(_QWORD *)(a1 + 48) = pins) != 0LL) )
{
a2[5] = 1;
my_rw_unlock((long long)(a2 + 6));
return (unsigned int)lf_hash_delete((long long)&reshash, *(volatile long long **)(a1 + 48), (long long)a2, 0x10u) == -1;
}
else
{
my_rw_unlock((long long)(a2 + 6));
return 1LL;
}
}
| unlock_lock_and_free_resource:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RSI
CMP dword ptr [RSI + 0xe8],0x0
JNZ 0x001c727e
CMP dword ptr [RBX + 0x10],0x0
JZ 0x001c7291
LAB_001c727e:
ADD RBX,0x18
MOV RDI,RBX
CALL 0x001c3eb2
XOR EAX,EAX
LAB_001c728c:
POP RBX
POP R14
POP RBP
RET
LAB_001c7291:
MOV R14,RDI
CMP qword ptr [RDI + 0x30],0x0
JZ 0x001c72cf
LAB_001c729b:
MOV dword ptr [RBX + 0x14],0x1
LEA RDI,[RBX + 0x18]
CALL 0x001c3eb2
MOV RSI,qword ptr [R14 + 0x30]
LEA RDI,[0xd31400]
MOV RDX,RBX
MOV ECX,0x10
CALL 0x00131e8c
MOV ECX,EAX
XOR EAX,EAX
CMP ECX,-0x1
SETZ AL
JMP 0x001c728c
LAB_001c72cf:
LEA RDI,[0xd31428]
CALL 0x00131980
MOV qword ptr [R14 + 0x30],RAX
TEST RAX,RAX
JNZ 0x001c729b
ADD RBX,0x18
MOV RDI,RBX
CALL 0x001c3eb2
MOV EAX,0x1
JMP 0x001c728c
|
bool unlock_lock_and_free_resource(long param_1,long param_2)
{
int iVar1;
long lVar2;
bool bVar3;
if ((*(int *)(param_2 + 0xe8) == 0) && (*(int *)(param_2 + 0x10) == 0)) {
if (*(long *)(param_1 + 0x30) == 0) {
lVar2 = lf_pinbox_get_pins(0xd31428);
*(long *)(param_1 + 0x30) = lVar2;
if (lVar2 == 0) {
my_rw_unlock(param_2 + 0x18);
return true;
}
}
*(int4 *)(param_2 + 0x14) = 1;
my_rw_unlock(param_2 + 0x18);
iVar1 = lf_hash_delete(reshash,*(int8 *)(param_1 + 0x30),param_2,0x10);
bVar3 = iVar1 == -1;
}
else {
my_rw_unlock(param_2 + 0x18);
bVar3 = false;
}
return bVar3;
}
| |
27,341 | mi_new | eloqsql/storage/myisam/mi_page.c | my_off_t _mi_new(register MI_INFO *info, MI_KEYDEF *keyinfo, int level)
{
my_off_t pos;
uchar buff[8];
DBUG_ENTER("_mi_new");
if ((pos= info->s->state.key_del[keyinfo->block_size_index]) ==
HA_OFFSET_ERROR)
{
if (info->state->key_file_length >=
info->s->base.max_key_file_length - keyinfo->block_length)
{
my_errno=HA_ERR_INDEX_FILE_FULL;
DBUG_RETURN(HA_OFFSET_ERROR);
}
pos=info->state->key_file_length;
info->state->key_file_length+= keyinfo->block_length;
}
else
{
if (!key_cache_read(info->s->key_cache,
info->s->kfile, pos, level,
buff,
(uint) sizeof(buff),
(uint) keyinfo->block_length,0))
pos= HA_OFFSET_ERROR;
else
info->s->state.key_del[keyinfo->block_size_index]= mi_sizekorr(buff);
}
info->s->state.changed|= STATE_NOT_SORTED_PAGES;
DBUG_PRINT("exit",("Pos: %ld",(long) pos));
DBUG_RETURN(pos);
} | O3 | c | mi_new:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %edx, %ecx
movq %rsi, %r15
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x20(%rbp)
movq (%rdi), %rax
movq 0xa0(%rax), %rdx
movzwl 0x18(%rsi), %esi
movq (%rdx,%rsi,8), %rbx
cmpq $-0x1, %rbx
je 0x83fbc
movq 0x278(%rax), %rdi
movl 0x350(%rax), %esi
movzwl 0xe(%r15), %eax
leaq -0x28(%rbp), %r8
movq %rbx, %rdx
movl $0x8, %r9d
pushq $0x0
pushq %rax
callq 0x98654
addq $0x10, %rsp
testq %rax, %rax
je 0x83fe1
movq -0x28(%rbp), %rax
bswapq %rax
movq (%r14), %rcx
movq 0xa0(%rcx), %rcx
movzwl 0x18(%r15), %edx
movq %rax, (%rcx,%rdx,8)
jmp 0x83fe8
movq 0x8(%r14), %rcx
movq 0x20(%rcx), %rbx
movq 0x118(%rax), %rdx
movzwl 0xe(%r15), %eax
subq %rax, %rdx
cmpq %rdx, %rbx
jae 0x8400f
addq %rbx, %rax
movq %rax, 0x20(%rcx)
jmp 0x83fe8
movq $-0x1, %rbx
movq (%r14), %rax
orb $0x20, 0xf0(%rax)
movq %fs:0x28, %rax
cmpq -0x20(%rbp), %rax
jne 0x84023
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0xa1b22
movl $0x88, (%rax)
movq $-0x1, %rbx
jmp 0x83ff2
callq 0x29270
| _mi_new:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 18h
mov ecx, edx
mov r15, rsi
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_20], rax
mov rax, [rdi]
mov rdx, [rax+0A0h]
movzx esi, word ptr [rsi+18h]
mov rbx, [rdx+rsi*8]
cmp rbx, 0FFFFFFFFFFFFFFFFh
jz short loc_83FBC
mov rdi, [rax+278h]
mov esi, [rax+350h]
movzx eax, word ptr [r15+0Eh]
lea r8, [rbp+var_28]
mov rdx, rbx
mov r9d, 8
push 0
push rax
call key_cache_read
add rsp, 10h
test rax, rax
jz short loc_83FE1
mov rax, [rbp+var_28]
bswap rax
mov rcx, [r14]
mov rcx, [rcx+0A0h]
movzx edx, word ptr [r15+18h]
mov [rcx+rdx*8], rax
jmp short loc_83FE8
loc_83FBC:
mov rcx, [r14+8]
mov rbx, [rcx+20h]
mov rdx, [rax+118h]
movzx eax, word ptr [r15+0Eh]
sub rdx, rax
cmp rbx, rdx
jnb short loc_8400F
add rax, rbx
mov [rcx+20h], rax
jmp short loc_83FE8
loc_83FE1:
mov rbx, 0FFFFFFFFFFFFFFFFh
loc_83FE8:
mov rax, [r14]
or byte ptr [rax+0F0h], 20h
loc_83FF2:
mov rax, fs:28h
cmp rax, [rbp+var_20]
jnz short loc_84023
mov rax, rbx
add rsp, 18h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_8400F:
call _my_thread_var
mov dword ptr [rax], 88h
mov rbx, 0FFFFFFFFFFFFFFFFh
jmp short loc_83FF2
loc_84023:
call ___stack_chk_fail
| long long mi_new(_QWORD *a1, long long a2)
{
long long v3; // rax
const char *v4; // rsi
unsigned long long v5; // rbx
long long v6; // rcx
long long v7; // rdx
long long v8; // rax
unsigned long long v10; // [rsp+8h] [rbp-28h]
v3 = *a1;
v4 = (const char *)*(unsigned __int16 *)(a2 + 24);
v5 = *(_QWORD *)(*(_QWORD *)(*a1 + 160LL) + 8LL * (_QWORD)v4);
if ( v5 == -1LL )
{
v6 = a1[1];
v5 = *(_QWORD *)(v6 + 32);
v7 = *(_QWORD *)(v3 + 280);
v8 = *(unsigned __int16 *)(a2 + 14);
if ( v5 >= v7 - v8 )
{
*(_DWORD *)my_thread_var(a1, v4) = 136;
return -1LL;
}
*(_QWORD *)(v6 + 32) = v5 + v8;
}
else if ( key_cache_read(*(_QWORD *)(v3 + 632), *(unsigned int *)(v3 + 848), v5) )
{
*(_QWORD *)(*(_QWORD *)(*a1 + 160LL) + 8LL * *(unsigned __int16 *)(a2 + 24)) = _byteswap_uint64(v10);
}
else
{
v5 = -1LL;
}
*(_BYTE *)(*a1 + 240LL) |= 0x20u;
return v5;
}
| _mi_new:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV ECX,EDX
MOV R15,RSI
MOV R14,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RDI]
MOV RDX,qword ptr [RAX + 0xa0]
MOVZX ESI,word ptr [RSI + 0x18]
MOV RBX,qword ptr [RDX + RSI*0x8]
CMP RBX,-0x1
JZ 0x00183fbc
MOV RDI,qword ptr [RAX + 0x278]
MOV ESI,dword ptr [RAX + 0x350]
MOVZX EAX,word ptr [R15 + 0xe]
LEA R8,[RBP + -0x28]
MOV RDX,RBX
MOV R9D,0x8
PUSH 0x0
PUSH RAX
CALL 0x00198654
ADD RSP,0x10
TEST RAX,RAX
JZ 0x00183fe1
MOV RAX,qword ptr [RBP + -0x28]
BSWAP RAX
MOV RCX,qword ptr [R14]
MOV RCX,qword ptr [RCX + 0xa0]
MOVZX EDX,word ptr [R15 + 0x18]
MOV qword ptr [RCX + RDX*0x8],RAX
JMP 0x00183fe8
LAB_00183fbc:
MOV RCX,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [RCX + 0x20]
MOV RDX,qword ptr [RAX + 0x118]
MOVZX EAX,word ptr [R15 + 0xe]
SUB RDX,RAX
CMP RBX,RDX
JNC 0x0018400f
ADD RAX,RBX
MOV qword ptr [RCX + 0x20],RAX
JMP 0x00183fe8
LAB_00183fe1:
MOV RBX,-0x1
LAB_00183fe8:
MOV RAX,qword ptr [R14]
OR byte ptr [RAX + 0xf0],0x20
LAB_00183ff2:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x00184023
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0018400f:
CALL 0x001a1b22
MOV dword ptr [RAX],0x88
MOV RBX,-0x1
JMP 0x00183ff2
LAB_00184023:
CALL 0x00129270
|
ulong _mi_new(long *param_1,long param_2,int4 param_3)
{
long lVar1;
int4 *puVar2;
ulong uVar3;
long in_FS_OFFSET;
ulong local_30;
long local_28;
local_28 = *(long *)(in_FS_OFFSET + 0x28);
lVar1 = *param_1;
uVar3 = *(ulong *)(*(long *)(lVar1 + 0xa0) + (ulong)*(ushort *)(param_2 + 0x18) * 8);
if (uVar3 == 0xffffffffffffffff) {
uVar3 = *(ulong *)(param_1[1] + 0x20);
if (*(long *)(lVar1 + 0x118) - (ulong)*(ushort *)(param_2 + 0xe) <= uVar3) {
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x88;
uVar3 = 0xffffffffffffffff;
goto LAB_00183ff2;
}
*(ulong *)(param_1[1] + 0x20) = *(ushort *)(param_2 + 0xe) + uVar3;
}
else {
lVar1 = key_cache_read(*(int8 *)(lVar1 + 0x278),*(int4 *)(lVar1 + 0x350),uVar3,
param_3,&local_30,8,*(int2 *)(param_2 + 0xe),0);
if (lVar1 == 0) {
uVar3 = 0xffffffffffffffff;
}
else {
*(ulong *)(*(long *)(*param_1 + 0xa0) + (ulong)*(ushort *)(param_2 + 0x18) * 8) =
local_30 >> 0x38 | (local_30 & 0xff000000000000) >> 0x28 |
(local_30 & 0xff0000000000) >> 0x18 | (local_30 & 0xff00000000) >> 8 |
(local_30 & 0xff000000) << 8 | (local_30 & 0xff0000) << 0x18 |
(local_30 & 0xff00) << 0x28 | local_30 << 0x38;
}
}
*(byte *)(*param_1 + 0xf0) = *(byte *)(*param_1 + 0xf0) | 0x20;
LAB_00183ff2:
if (*(long *)(in_FS_OFFSET + 0x28) == local_28) {
return uVar3;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
27,342 | my_bitmap_init | eloqsql/mysys/my_bitmap.c | my_bool my_bitmap_init(MY_BITMAP *map, my_bitmap_map *buf, uint n_bits,
my_bool thread_safe)
{
DBUG_ENTER("my_bitmap_init");
map->mutex= 0;
if (!buf)
{
uint size_in_bytes= bitmap_buffer_size(n_bits);
uint extra= 0;
if (thread_safe)
{
size_in_bytes= ALIGN_SIZE(size_in_bytes);
extra= sizeof(mysql_mutex_t);
}
if (!(buf= (my_bitmap_map*) my_malloc(key_memory_MY_BITMAP_bitmap,
size_in_bytes+extra, MYF(MY_WME))))
DBUG_RETURN(1);
if (thread_safe)
{
map->mutex= (mysql_mutex_t *) ((char*) buf + size_in_bytes);
mysql_mutex_init(key_BITMAP_mutex, map->mutex, MY_MUTEX_INIT_FAST);
}
}
else
{
DBUG_ASSERT(thread_safe == 0);
}
map->bitmap= buf;
map->n_bits= n_bits;
create_last_word_mask(map);
bitmap_clear_all(map);
DBUG_RETURN(0);
} | O3 | c | my_bitmap_init:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
movq $0x0, 0x10(%rdi)
testq %rsi, %rsi
jne 0x9d211
movl %ecx, %r12d
leal 0x1f(%r14), %eax
shrl $0x5, %eax
leal 0x7(,%rax,4), %r13d
shll $0x2, %eax
andl $-0x8, %r13d
leal 0x48(%r13), %esi
testb %r12b, %r12b
leaq 0xb6b517(%rip), %rcx # 0xc086c0
movl (%rcx), %edi
cmovel %eax, %esi
movl $0x10, %edx
callq 0x9fd89
movq %rax, %r15
testb %r12b, %r12b
je 0x9d20c
testq %r15, %r15
je 0x9d20c
movq %r15, %r12
addq %r13, %r12
movq %r12, 0x10(%rbx)
leaq 0xb6ab3a(%rip), %rax # 0xc07d10
movl (%rax), %edi
leaq 0x2e8e31(%rip), %rax # 0x386010
movq (%rax), %rax
movq %r12, %rsi
callq *0x40(%rax)
movq %rax, 0x40(%r15,%r13)
movq %r12, 0x38(%r15,%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r15,%r13)
leaq 0xb6b82e(%rip), %rsi # 0xc08a30
movq %r12, %rdi
callq 0x29340
jmp 0x9d211
testq %r15, %r15
je 0x9d249
movq %r15, (%rbx)
movl %r14d, 0x1c(%rbx)
movq %rbx, %rdi
callq 0x9d0e4
movq (%rbx), %rdi
movl 0x1c(%rbx), %edx
addl $0x1f, %edx
shrl $0x3, %edx
andl $-0x4, %edx
xorl %ebx, %ebx
xorl %esi, %esi
callq 0x292c0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %bl
jmp 0x9d238
| my_bitmap_init:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14d, edx
mov r15, rsi
mov rbx, rdi
mov qword ptr [rdi+10h], 0
test rsi, rsi
jnz loc_9D211
mov r12d, ecx
lea eax, [r14+1Fh]
shr eax, 5
lea r13d, ds:7[rax*4]
shl eax, 2
and r13d, 0FFFFFFF8h
lea esi, [r13+48h]
test r12b, r12b
lea rcx, key_memory_MY_BITMAP_bitmap
mov edi, [rcx]
cmovz esi, eax
mov edx, 10h
call my_malloc
mov r15, rax
test r12b, r12b
jz short loc_9D20C
test r15, r15
jz short loc_9D20C
mov r12, r15
add r12, r13
mov [rbx+10h], r12
lea rax, key_BITMAP_mutex
mov edi, [rax]
lea rax, PSI_server
mov rax, [rax]
mov rsi, r12
call qword ptr [rax+40h]
mov [r15+r13+40h], rax
mov [r15+r13+38h], r12
xorps xmm0, xmm0
movups xmmword ptr [r15+r13+28h], xmm0
lea rsi, my_fast_mutexattr
mov rdi, r12
call _pthread_mutex_init
jmp short loc_9D211
loc_9D20C:
test r15, r15
jz short loc_9D249
loc_9D211:
mov [rbx], r15
mov [rbx+1Ch], r14d
mov rdi, rbx
call create_last_word_mask
mov rdi, [rbx]
mov edx, [rbx+1Ch]
add edx, 1Fh
shr edx, 3
and edx, 0FFFFFFFCh
xor ebx, ebx
xor esi, esi
call _memset
loc_9D238:
mov eax, ebx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_9D249:
mov bl, 1
jmp short loc_9D238
| long long my_bitmap_init(long long a1, long long a2, int a3, char a4)
{
long long v5; // r15
unsigned int v6; // ebx
unsigned int v8; // eax
int v9; // r13d
unsigned int v10; // eax
long long v11; // r13
long long v12; // rsi
long long v13; // rax
long long v14; // r12
v5 = a2;
v6 = a1;
*(_QWORD *)(a1 + 16) = 0LL;
if ( !a2 )
{
v8 = (unsigned int)(a3 + 31) >> 5;
v9 = 4 * v8 + 7;
v10 = 4 * v8;
v11 = v9 & 0xFFFFFFF8;
v12 = (unsigned int)(v11 + 72);
if ( !a4 )
v12 = v10;
v13 = my_malloc(key_memory_MY_BITMAP_bitmap, v12, 16LL);
v5 = v13;
if ( a4 && v13 )
{
v14 = v11 + v13;
*(_QWORD *)(a1 + 16) = v11 + v13;
*(_QWORD *)(v13 + v11 + 64) = ((long long ( *)(_QWORD, long long))PSI_server[8])(
key_BITMAP_mutex,
v11 + v13);
*(_QWORD *)(v5 + v11 + 56) = v14;
*(_OWORD *)(v5 + v11 + 40) = 0LL;
pthread_mutex_init(v11 + v5, &my_fast_mutexattr);
}
else if ( !v13 )
{
LOBYTE(v6) = 1;
return v6;
}
}
*(_QWORD *)a1 = v5;
*(_DWORD *)(a1 + 28) = a3;
create_last_word_mask(a1);
v6 = 0;
memset(*(_QWORD *)a1, 0LL, ((unsigned int)(*(_DWORD *)(a1 + 28) + 31) >> 3) & 0xFFFFFFFC);
return v6;
}
| my_bitmap_init:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14D,EDX
MOV R15,RSI
MOV RBX,RDI
MOV qword ptr [RDI + 0x10],0x0
TEST RSI,RSI
JNZ 0x0019d211
MOV R12D,ECX
LEA EAX,[R14 + 0x1f]
SHR EAX,0x5
LEA R13D,[0x7 + RAX*0x4]
SHL EAX,0x2
AND R13D,0xfffffff8
LEA ESI,[R13 + 0x48]
TEST R12B,R12B
LEA RCX,[0xd086c0]
MOV EDI,dword ptr [RCX]
CMOVZ ESI,EAX
MOV EDX,0x10
CALL 0x0019fd89
MOV R15,RAX
TEST R12B,R12B
JZ 0x0019d20c
TEST R15,R15
JZ 0x0019d20c
MOV R12,R15
ADD R12,R13
MOV qword ptr [RBX + 0x10],R12
LEA RAX,[0xd07d10]
MOV EDI,dword ptr [RAX]
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
MOV RSI,R12
CALL qword ptr [RAX + 0x40]
MOV qword ptr [R15 + R13*0x1 + 0x40],RAX
MOV qword ptr [R15 + R13*0x1 + 0x38],R12
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R15 + R13*0x1 + 0x28],XMM0
LEA RSI,[0xd08a30]
MOV RDI,R12
CALL 0x00129340
JMP 0x0019d211
LAB_0019d20c:
TEST R15,R15
JZ 0x0019d249
LAB_0019d211:
MOV qword ptr [RBX],R15
MOV dword ptr [RBX + 0x1c],R14D
MOV RDI,RBX
CALL 0x0019d0e4
MOV RDI,qword ptr [RBX]
MOV EDX,dword ptr [RBX + 0x1c]
ADD EDX,0x1f
SHR EDX,0x3
AND EDX,0xfffffffc
XOR EBX,EBX
XOR ESI,ESI
CALL 0x001292c0
LAB_0019d238:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0019d249:
MOV BL,0x1
JMP 0x0019d238
|
ulong my_bitmap_init(long *param_1,long param_2,int param_3,char param_4)
{
int8 *puVar1;
int iVar2;
uint uVar3;
int8 uVar4;
ulong uVar5;
pthread_mutex_t *__mutex;
uint uVar6;
param_1[2] = 0;
if (param_2 == 0) {
uVar3 = param_3 + 0x1fU >> 5;
uVar6 = uVar3 * 4 + 7 & 0xfffffff8;
uVar5 = (ulong)uVar6;
iVar2 = uVar6 + 0x48;
if (param_4 == '\0') {
iVar2 = uVar3 << 2;
}
param_2 = my_malloc(key_memory_MY_BITMAP_bitmap,iVar2,0x10);
if ((param_4 == '\0') || (param_2 == 0)) {
if (param_2 == 0) {
uVar5 = CONCAT71((int7)((ulong)param_1 >> 8),1);
goto LAB_0019d238;
}
}
else {
__mutex = (pthread_mutex_t *)(param_2 + uVar5);
param_1[2] = (long)__mutex;
uVar4 = (**(code **)(PSI_server + 0x40))(key_BITMAP_mutex,__mutex);
*(int8 *)(param_2 + 0x40 + uVar5) = uVar4;
*(pthread_mutex_t **)(param_2 + 0x38 + uVar5) = __mutex;
puVar1 = (int8 *)(param_2 + 0x28 + uVar5);
*puVar1 = 0;
puVar1[1] = 0;
pthread_mutex_init(__mutex,(pthread_mutexattr_t *)&my_fast_mutexattr);
}
}
*param_1 = param_2;
*(int *)((long)param_1 + 0x1c) = param_3;
create_last_word_mask(param_1);
uVar5 = 0;
memset((void *)*param_1,0,(ulong)(*(int *)((long)param_1 + 0x1c) + 0x1fU >> 3 & 0xfffffffc));
LAB_0019d238:
return uVar5 & 0xffffffff;
}
| |
27,343 | exec_REDO_LOGREC_REDO_INDEX_FREE_PAGE | eloqsql/storage/maria/ma_recovery.c | prototype_redo_exec_hook(REDO_INDEX_FREE_PAGE)
{
int error= 1;
MARIA_HA *info= get_MARIA_HA_from_REDO_record(rec);
if (info == NULL || maria_is_crashed(info))
return 0;
if (_ma_apply_redo_index_free_page(info, current_group_end_lsn,
rec->header + FILEID_STORE_SIZE))
goto end;
error= 0;
end:
return error;
} | O3 | c | exec_REDO_LOGREC_REDO_INDEX_FREE_PAGE:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x8cf4d
movq %rax, %rdi
xorl %eax, %eax
testq %rdi, %rdi
je 0x8b567
movq (%rdi), %rcx
testb $0x2, 0x170(%rcx)
jne 0x8b567
movq 0xbc77de(%rip), %rsi # 0xc52d30
addq $0x1a, %rbx
movq %rbx, %rdx
callq 0x421ef
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| exec_REDO_LOGREC_REDO_INDEX_FREE_PAGE:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
call get_MARIA_HA_from_REDO_record
mov rdi, rax
xor eax, eax
test rdi, rdi
jz short loc_8B567
mov rcx, [rdi]
test byte ptr [rcx+170h], 2
jnz short loc_8B567
mov rsi, cs:current_group_end_lsn
add rbx, 1Ah
mov rdx, rbx
call _ma_apply_redo_index_free_page
mov ecx, eax
xor eax, eax
test ecx, ecx
setnz al
loc_8B567:
add rsp, 8
pop rbx
pop rbp
retn
| _BOOL8 exec_REDO_LOGREC_REDO_INDEX_FREE_PAGE(long long a1)
{
_DWORD *MARIA_HA_from_REDO_record; // rdi
_BOOL8 result; // rax
MARIA_HA_from_REDO_record = (_DWORD *)get_MARIA_HA_from_REDO_record(a1);
result = 0LL;
if ( MARIA_HA_from_REDO_record )
{
if ( (*(_BYTE *)(*(_QWORD *)MARIA_HA_from_REDO_record + 368LL) & 2) == 0 )
return (unsigned int)ma_apply_redo_index_free_page(
MARIA_HA_from_REDO_record,
current_group_end_lsn,
(unsigned int *)(a1 + 26)) != 0;
}
return result;
}
| exec_REDO_LOGREC_REDO_INDEX_FREE_PAGE:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
CALL 0x0018cf4d
MOV RDI,RAX
XOR EAX,EAX
TEST RDI,RDI
JZ 0x0018b567
MOV RCX,qword ptr [RDI]
TEST byte ptr [RCX + 0x170],0x2
JNZ 0x0018b567
MOV RSI,qword ptr [0x00d52d30]
ADD RBX,0x1a
MOV RDX,RBX
CALL 0x001421ef
MOV ECX,EAX
XOR EAX,EAX
TEST ECX,ECX
SETNZ AL
LAB_0018b567:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
bool exec_REDO_LOGREC_REDO_INDEX_FREE_PAGE(long param_1)
{
int iVar1;
long *plVar2;
bool bVar3;
plVar2 = (long *)get_MARIA_HA_from_REDO_record();
bVar3 = false;
if ((plVar2 != (long *)0x0) && ((*(byte *)(*plVar2 + 0x170) & 2) == 0)) {
iVar1 = _ma_apply_redo_index_free_page(plVar2,current_group_end_lsn,param_1 + 0x1a);
bVar3 = iVar1 != 0;
}
return bVar3;
}
| |
27,344 | flush_simple_key_cache_blocks | eloqsql/mysys/mf_keycache.c | static
int flush_simple_key_cache_blocks(SIMPLE_KEY_CACHE_CB *keycache,
File file,
void *file_extra __attribute__((unused)),
enum flush_type type)
{
int res= 0;
DBUG_ENTER("flush_key_blocks");
DBUG_PRINT("enter", ("keycache: %p", keycache));
if (!keycache->key_cache_inited)
DBUG_RETURN(0);
keycache_pthread_mutex_lock(&keycache->cache_lock);
/* While waiting for lock, keycache could have been ended. */
if (keycache->disk_blocks > 0)
{
inc_counter_for_resize_op(keycache);
res= flush_key_blocks_int(keycache, file, type);
dec_counter_for_resize_op(keycache);
}
keycache_pthread_mutex_unlock(&keycache->cache_lock);
DBUG_RETURN(res);
} | O0 | c | flush_simple_key_cache_blocks:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
jmp 0xe672f
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
jne 0xe6743
jmp 0xe673a
movl $0x0, -0x4(%rbp)
jmp 0xe67a3
movq -0x10(%rbp), %rdi
addq $0xc0, %rdi
leaq 0x6d8c2(%rip), %rsi # 0x154017
movl $0x111a, %edx # imm = 0x111A
callq 0xe3330
movq -0x10(%rbp), %rax
cmpl $0x0, 0x48(%rax)
jle 0xe678d
movq -0x10(%rbp), %rdi
callq 0xe3450
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x24(%rbp), %edx
callq 0xe6d90
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0xe4250
movq -0x10(%rbp), %rdi
addq $0xc0, %rdi
callq 0xe3d50
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| flush_simple_key_cache_blocks:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov [rbp+var_28], 0
jmp short $+2
loc_E672F:
mov rax, [rbp+var_10]
cmp byte ptr [rax], 0
jnz short loc_E6743
jmp short $+2
loc_E673A:
mov [rbp+var_4], 0
jmp short loc_E67A3
loc_E6743:
mov rdi, [rbp+var_10]
add rdi, 0C0h
lea rsi, aWorkspaceLlm4b_36; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 111Ah
call inline_mysql_mutex_lock_24
mov rax, [rbp+var_10]
cmp dword ptr [rax+48h], 0
jle short loc_E678D
mov rdi, [rbp+var_10]
call inc_counter_for_resize_op_0
mov rdi, [rbp+var_10]
mov esi, [rbp+var_14]
mov edx, [rbp+var_24]
call flush_key_blocks_int
mov [rbp+var_28], eax
mov rdi, [rbp+var_10]
call dec_counter_for_resize_op_0
loc_E678D:
mov rdi, [rbp+var_10]
add rdi, 0C0h
call inline_mysql_mutex_unlock_25
mov eax, [rbp+var_28]
mov [rbp+var_4], eax
loc_E67A3:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long flush_simple_key_cache_blocks(long long a1, unsigned int a2, long long a3, unsigned int a4)
{
unsigned int v5; // [rsp+8h] [rbp-28h]
v5 = 0;
if ( *(_BYTE *)a1 )
{
inline_mysql_mutex_lock_24(
a1 + 192,
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",
0x111Au);
if ( *(int *)(a1 + 72) > 0 )
{
inc_counter_for_resize_op_0(a1);
v5 = flush_key_blocks_int(a1, a2, a4);
dec_counter_for_resize_op_0(a1);
}
inline_mysql_mutex_unlock_25(a1 + 192);
return v5;
}
else
{
return 0;
}
}
| flush_simple_key_cache_blocks:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
MOV dword ptr [RBP + -0x28],0x0
JMP 0x001e672f
LAB_001e672f:
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX],0x0
JNZ 0x001e6743
JMP 0x001e673a
LAB_001e673a:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001e67a3
LAB_001e6743:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0xc0
LEA RSI,[0x254017]
MOV EDX,0x111a
CALL 0x001e3330
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x48],0x0
JLE 0x001e678d
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001e3450
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
MOV EDX,dword ptr [RBP + -0x24]
CALL 0x001e6d90
MOV dword ptr [RBP + -0x28],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001e4250
LAB_001e678d:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0xc0
CALL 0x001e3d50
MOV EAX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x4],EAX
LAB_001e67a3:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4
flush_simple_key_cache_blocks
(char *param_1,int4 param_2,int8 param_3,int4 param_4)
{
int4 local_30;
int4 local_c;
local_30 = 0;
if (*param_1 == '\0') {
local_c = 0;
}
else {
inline_mysql_mutex_lock
(param_1 + 0xc0,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0x111a)
;
if (0 < *(int *)(param_1 + 0x48)) {
inc_counter_for_resize_op(param_1);
local_30 = flush_key_blocks_int(param_1,param_2,param_4);
dec_counter_for_resize_op(param_1);
}
inline_mysql_mutex_unlock(param_1 + 0xc0);
local_c = local_30;
}
return local_c;
}
| |
27,345 | flush_simple_key_cache_blocks | eloqsql/mysys/mf_keycache.c | static
int flush_simple_key_cache_blocks(SIMPLE_KEY_CACHE_CB *keycache,
File file,
void *file_extra __attribute__((unused)),
enum flush_type type)
{
int res= 0;
DBUG_ENTER("flush_key_blocks");
DBUG_PRINT("enter", ("keycache: %p", keycache));
if (!keycache->key_cache_inited)
DBUG_RETURN(0);
keycache_pthread_mutex_lock(&keycache->cache_lock);
/* While waiting for lock, keycache could have been ended. */
if (keycache->disk_blocks > 0)
{
inc_counter_for_resize_op(keycache);
res= flush_key_blocks_int(keycache, file, type);
dec_counter_for_resize_op(keycache);
}
keycache_pthread_mutex_unlock(&keycache->cache_lock);
DBUG_RETURN(res);
} | O3 | c | flush_simple_key_cache_blocks:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
cmpb $0x0, (%rdi)
je 0x998dd
movl %ecx, %r15d
movl %esi, %r12d
movq %rdi, %r14
leaq 0xc0(%rdi), %rbx
cmpq $0x0, 0x100(%rdi)
jne 0x99905
movq %rbx, %rdi
callq 0x29200
cmpl $0x0, 0x48(%r14)
jle 0x998e2
incq 0x70(%r14)
movq %r14, %rdi
movl %r12d, %esi
movl %r15d, %edx
callq 0x99c9a
movl %eax, %r15d
decq 0x70(%r14)
jne 0x998e5
leaq 0x110(%r14), %rdi
callq 0x987a5
jmp 0x998e5
xorl %r15d, %r15d
jmp 0x998f9
xorl %r15d, %r15d
movq 0x100(%r14), %rdi
testq %rdi, %rdi
jne 0x9991b
movq %rbx, %rdi
callq 0x291c0
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x42704(%rip), %rsi # 0xdc010
movq %rbx, %rdi
movl $0x111a, %edx # imm = 0x111A
callq 0x2eb6f
jmp 0x998ad
leaq 0x2ec6ee(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x998f1
| flush_simple_key_cache_blocks:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
cmp byte ptr [rdi], 0
jz short loc_998DD
mov r15d, ecx
mov r12d, esi
mov r14, rdi
lea rbx, [rdi+0C0h]
cmp qword ptr [rdi+100h], 0
jnz short loc_99905
mov rdi, rbx
call _pthread_mutex_lock
loc_998AD:
cmp dword ptr [r14+48h], 0
jle short loc_998E2
inc qword ptr [r14+70h]
mov rdi, r14
mov esi, r12d
mov edx, r15d
call flush_key_blocks_int
mov r15d, eax
dec qword ptr [r14+70h]
jnz short loc_998E5
lea rdi, [r14+110h]
call release_whole_queue
jmp short loc_998E5
loc_998DD:
xor r15d, r15d
jmp short loc_998F9
loc_998E2:
xor r15d, r15d
loc_998E5:
mov rdi, [r14+100h]
test rdi, rdi
jnz short loc_9991B
loc_998F1:
mov rdi, rbx
call _pthread_mutex_unlock
loc_998F9:
mov eax, r15d
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_99905:
lea rsi, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, rbx
mov edx, 111Ah
call psi_mutex_lock
jmp short loc_998AD
loc_9991B:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_998F1
| long long flush_simple_key_cache_blocks(long long a1, unsigned int a2, long long a3, unsigned int a4)
{
unsigned int v5; // r15d
if ( *(_BYTE *)a1 )
{
if ( *(_QWORD *)(a1 + 256) )
psi_mutex_lock(a1 + 192, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0x111Au);
else
pthread_mutex_lock(a1 + 192);
if ( *(int *)(a1 + 72) <= 0 )
{
v5 = 0;
}
else
{
++*(_QWORD *)(a1 + 112);
v5 = flush_key_blocks_int(a1, a2, a4);
if ( (*(_QWORD *)(a1 + 112))-- == 1LL )
release_whole_queue((long long *)(a1 + 272));
}
if ( *(_QWORD *)(a1 + 256) )
PSI_server[44]();
pthread_mutex_unlock(a1 + 192);
}
else
{
return 0;
}
return v5;
}
| flush_simple_key_cache_blocks:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
CMP byte ptr [RDI],0x0
JZ 0x001998dd
MOV R15D,ECX
MOV R12D,ESI
MOV R14,RDI
LEA RBX,[RDI + 0xc0]
CMP qword ptr [RDI + 0x100],0x0
JNZ 0x00199905
MOV RDI,RBX
CALL 0x00129200
LAB_001998ad:
CMP dword ptr [R14 + 0x48],0x0
JLE 0x001998e2
INC qword ptr [R14 + 0x70]
MOV RDI,R14
MOV ESI,R12D
MOV EDX,R15D
CALL 0x00199c9a
MOV R15D,EAX
DEC qword ptr [R14 + 0x70]
JNZ 0x001998e5
LEA RDI,[R14 + 0x110]
CALL 0x001987a5
JMP 0x001998e5
LAB_001998dd:
XOR R15D,R15D
JMP 0x001998f9
LAB_001998e2:
XOR R15D,R15D
LAB_001998e5:
MOV RDI,qword ptr [R14 + 0x100]
TEST RDI,RDI
JNZ 0x0019991b
LAB_001998f1:
MOV RDI,RBX
CALL 0x001291c0
LAB_001998f9:
MOV EAX,R15D
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00199905:
LEA RSI,[0x1dc010]
MOV RDI,RBX
MOV EDX,0x111a
CALL 0x0012eb6f
JMP 0x001998ad
LAB_0019991b:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001998f1
|
int4
flush_simple_key_cache_blocks
(char *param_1,int4 param_2,int8 param_3,int4 param_4)
{
long *plVar1;
pthread_mutex_t *__mutex;
int4 uVar2;
if (*param_1 == '\0') {
uVar2 = 0;
}
else {
__mutex = (pthread_mutex_t *)(param_1 + 0xc0);
if (*(long *)(param_1 + 0x100) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0x111a);
}
if (*(int *)(param_1 + 0x48) < 1) {
uVar2 = 0;
}
else {
*(long *)(param_1 + 0x70) = *(long *)(param_1 + 0x70) + 1;
uVar2 = flush_key_blocks_int(param_1,param_2,param_4);
plVar1 = (long *)(param_1 + 0x70);
*plVar1 = *plVar1 + -1;
if (*plVar1 == 0) {
release_whole_queue(param_1 + 0x110);
}
}
if (*(long *)(param_1 + 0x100) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
}
return uVar2;
}
| |
27,346 | unpack_fields | eloqsql/libmariadb/libmariadb/mariadb_lib.c | MYSQL_FIELD *
unpack_fields(const MYSQL *mysql,
MYSQL_DATA *data, MA_MEM_ROOT *alloc, uint fields,
my_bool default_value)
{
MYSQL_ROWS *row;
MYSQL_FIELD *field,*result;
char *p;
unsigned int i, field_count= sizeof(rset_field_offsets)/sizeof(size_t)/2;
field=result=(MYSQL_FIELD*) ma_alloc_root(alloc,sizeof(MYSQL_FIELD)*fields);
if (!result)
return(0);
for (row=data->data; row ; row = row->next,field++)
{
if (field >= result + fields)
goto error;
for (i=0; i < field_count; i++)
{
uint length= (uint)(row->data[i+1] - row->data[i] - 1);
if (!row->data[i] && row->data[i][length])
goto error;
*(char **)(((char *)field) + rset_field_offsets[i*2])=
ma_strdup_root(alloc, (char *)row->data[i]);
*(unsigned int *)(((char *)field) + rset_field_offsets[i*2+1])= length;
}
field->extension= NULL;
if (ma_has_extended_type_info(mysql))
{
if (row->data[i+1] - row->data[i] > 1)
{
size_t len= row->data[i+1] - row->data[i] - 1;
MA_FIELD_EXTENSION *ext= new_ma_field_extension(alloc);
if ((field->extension= ext))
ma_field_extension_init_type_info(alloc, ext, row->data[i], len);
}
i++;
}
p= (char *)row->data[i];
/* filler */
field->charsetnr= uint2korr(p);
p+= 2;
field->length= (uint) uint4korr(p);
p+= 4;
field->type= (enum enum_field_types)uint1korr(p);
p++;
field->flags= uint2korr(p);
p+= 2;
field->decimals= (uint) p[0];
p++;
/* filler */
p+= 2;
if (INTERNAL_NUM_FIELD(field))
field->flags|= NUM_FLAG;
i++;
/* This is used by deprecated function mysql_list_fields only,
however the reported length is not correct, so we always zero it */
if (default_value && row->data[i])
field->def=ma_strdup_root(alloc,(char*) row->data[i]);
else
field->def=0;
field->def_length= 0;
field->max_length= 0;
}
if (field < result + fields)
goto error;
free_rows(data); /* Free old data */
return(result);
error:
free_rows(data);
ma_free_root(alloc, MYF(0));
return(0);
} | O3 | c | unpack_fields:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r8d, -0x3c(%rbp)
movq %rsi, %rbx
movq %rdi, -0x68(%rbp)
movl %ecx, %esi
shlq $0x7, %rsi
movq %rdx, %r14
movq %rdx, %rdi
movq %rsi, -0x50(%rbp)
callq 0x1db33
testq %rax, %rax
je 0x17ab7
movq %rbx, -0x48(%rbp)
movq (%rbx), %rcx
movq %rax, -0x38(%rbp)
movq %rax, %r8
testq %rcx, %rcx
movq %r14, %rdi
je 0x17a90
movq %rcx, %r13
movq -0x38(%rbp), %r15
movq -0x50(%rbp), %rax
addq %r15, %rax
movq %rax, -0x60(%rbp)
leaq 0x2060f(%rip), %r12 # 0x37ea0
movq %r15, %r8
movq %rdi, -0x58(%rbp)
cmpq -0x60(%rbp), %r8
jae 0x17a9d
xorl %ebx, %ebx
movq %r13, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rbx,%rax), %rsi
movl %esi, %r14d
notl %r14d
addl 0x8(%rbx,%rax), %r14d
movq %rdi, %r15
movq %r8, %r13
callq 0x1dcd6
movq %r13, %r8
movq %r15, %rdi
movq (%r12,%rbx,2), %rcx
movq 0x8(%r12,%rbx,2), %rdx
movq %rax, (%r13,%rcx)
movl %r14d, (%r13,%rdx)
addq $0x8, %rbx
cmpq $0x30, %rbx
jne 0x178a8
movq $0x0, 0x78(%r8)
movq -0x68(%rbp), %rax
movq 0x4f0(%rax), %rax
movl $0x6, %r9d
testb $0x8, 0x70(%rax)
movq -0x30(%rbp), %r10
je 0x179db
movq 0x8(%r10), %rax
movq 0x38(%rax), %rbx
subq 0x30(%rax), %rbx
cmpq $0x2, %rbx
jl 0x179d1
movl $0x20, %esi
callq 0x1db33
testq %rax, %rax
je 0x179c3
movq %rax, %r12
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq %r13, %r8
movq %rax, 0x78(%r13)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x30(%rax), %rsi
leaq (%rsi,%rbx), %rax
decq %rax
movq %r15, %rdi
movq %rax, -0x70(%rbp)
movzbl 0x1(%rsi), %ebx
testb %bl, %bl
js 0x179d1
leaq (%rsi,%rbx), %r14
addq $0x2, %r14
cmpq %rax, %r14
ja 0x179d1
movzbl (%rsi), %r15d
cmpb $0x1, %r15b
ja 0x179b5
addq $0x2, %rsi
shll $0x4, %r15d
movq -0x58(%rbp), %rdi
movq %rbx, %rdx
callq 0x1dd27
movq %r13, %r8
testq %rax, %rax
cmoveq %rax, %rbx
movq %rax, (%r12,%r15)
movq -0x70(%rbp), %rax
movq %rbx, 0x8(%r12,%r15)
movq %r14, %rsi
cmpq %rax, %r14
movq -0x58(%rbp), %rdi
jb 0x1796b
jmp 0x179d1
movq %r13, %r8
movq $0x0, 0x78(%r13)
movq %r15, %rdi
movl $0x7, %r9d
movq -0x30(%rbp), %r10
movq 0x8(%r10), %rax
movq (%rax,%r9,8), %rsi
movzwl (%rsi), %eax
movl %eax, 0x6c(%r8)
movl 0x2(%rsi), %ecx
movq %rcx, 0x38(%r8)
movzbl 0x6(%rsi), %edx
movl %edx, 0x70(%r8)
movzwl 0x7(%rsi), %eax
movl %eax, 0x64(%r8)
movsbl 0x9(%rsi), %esi
movl %esi, 0x68(%r8)
cmpl $0x9, %edx
ja 0x17a20
cmpl $0x7, %edx
jne 0x17a2d
cmpq $0x8, %rcx
je 0x17a2d
cmpl $0xe, %ecx
je 0x17a2d
jmp 0x17a36
cmpl $0xf6, %edx
je 0x17a2d
cmpl $0xd, %edx
jne 0x17a36
orl $0x8000, %eax # imm = 0x8000
movl %eax, 0x64(%r8)
cmpb $0x0, -0x3c(%rbp)
je 0x17a60
movq 0x8(%r10), %rax
movq 0x8(%rax,%r9,8), %rsi
testq %rsi, %rsi
je 0x17a60
movq %r10, %r14
movq %rdi, %rbx
callq 0x1dcd6
movq %r13, %r8
movq %rbx, %rdi
movq %r14, %r10
jmp 0x17a62
xorl %eax, %eax
movq %rax, 0x30(%r8)
movl $0x0, 0x60(%r8)
movq $0x0, 0x40(%r8)
subq $-0x80, %r8
movq (%r10), %r10
movq %r10, %r13
testq %r10, %r10
leaq 0x20416(%rip), %r12 # 0x37ea0
jne 0x17898
movq -0x38(%rbp), %rax
addq -0x50(%rbp), %rax
cmpq %rax, %r8
jae 0x17abb
movq %rdi, %r14
movq -0x48(%rbp), %rdi
callq 0x1574e
xorl %ebx, %ebx
movq %r14, %rdi
xorl %esi, %esi
callq 0x1dc4b
jmp 0x17ac8
xorl %ebx, %ebx
jmp 0x17ac8
movq -0x48(%rbp), %rdi
callq 0x1574e
movq -0x38(%rbp), %rbx
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| unpack_fields:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rbp+var_3C], r8d
mov rbx, rsi
mov [rbp+var_68], rdi
mov esi, ecx
shl rsi, 7
mov r14, rdx
mov rdi, rdx
mov [rbp+var_50], rsi
call ma_alloc_root
test rax, rax
jz loc_17AB7
mov [rbp+var_48], rbx
mov rcx, [rbx]
mov [rbp+var_38], rax
mov r8, rax
test rcx, rcx
mov rdi, r14
jz loc_17A90
mov r13, rcx
mov r15, [rbp+var_38]
mov rax, [rbp+var_50]
add rax, r15
mov [rbp+var_60], rax
lea r12, rset_field_offsets
mov r8, r15
mov [rbp+var_58], rdi
loc_17898:
cmp r8, [rbp+var_60]
jnb loc_17A9D
xor ebx, ebx
mov [rbp+var_30], r13
loc_178A8:
mov rax, [rbp+var_30]
mov rax, [rax+8]
mov rsi, [rbx+rax]
mov r14d, esi
not r14d
add r14d, [rbx+rax+8]
mov r15, rdi
mov r13, r8
call ma_strdup_root
mov r8, r13
mov rdi, r15
mov rcx, [r12+rbx*2]
mov rdx, [r12+rbx*2+8]
mov [r13+rcx+0], rax
mov [r13+rdx+0], r14d
add rbx, 8
cmp rbx, 30h ; '0'
jnz short loc_178A8
mov qword ptr [r8+78h], 0
mov rax, [rbp+var_68]
mov rax, [rax+4F0h]
mov r9d, 6
test byte ptr [rax+70h], 8
mov r10, [rbp+var_30]
jz loc_179DB
mov rax, [r10+8]
mov rbx, [rax+38h]
sub rbx, [rax+30h]
cmp rbx, 2
jl loc_179D1
mov esi, 20h ; ' '
call ma_alloc_root
test rax, rax
jz loc_179C3
mov r12, rax
xorps xmm0, xmm0
movups xmmword ptr [rax+10h], xmm0
movups xmmword ptr [rax], xmm0
mov r8, r13
mov [r13+78h], rax
mov rax, [rbp+var_30]
mov rax, [rax+8]
mov rsi, [rax+30h]
lea rax, [rsi+rbx]
dec rax
mov rdi, r15
mov [rbp+var_70], rax
loc_1796B:
movzx ebx, byte ptr [rsi+1]
test bl, bl
js short loc_179D1
lea r14, [rsi+rbx]
add r14, 2
cmp r14, rax
ja short loc_179D1
movzx r15d, byte ptr [rsi]
cmp r15b, 1
ja short loc_179B5
add rsi, 2
shl r15d, 4
mov rdi, [rbp+var_58]
mov rdx, rbx
call ma_memdup_root
mov r8, r13
test rax, rax
cmovz rbx, rax
mov [r12+r15], rax
mov rax, [rbp+var_70]
mov [r12+r15+8], rbx
loc_179B5:
mov rsi, r14
cmp r14, rax
mov rdi, [rbp+var_58]
jb short loc_1796B
jmp short loc_179D1
loc_179C3:
mov r8, r13
mov qword ptr [r13+78h], 0
mov rdi, r15
loc_179D1:
mov r9d, 7
mov r10, [rbp+var_30]
loc_179DB:
mov rax, [r10+8]
mov rsi, [rax+r9*8]
movzx eax, word ptr [rsi]
mov [r8+6Ch], eax
mov ecx, [rsi+2]
mov [r8+38h], rcx
movzx edx, byte ptr [rsi+6]
mov [r8+70h], edx
movzx eax, word ptr [rsi+7]
mov [r8+64h], eax
movsx esi, byte ptr [rsi+9]
mov [r8+68h], esi
cmp edx, 9
ja short loc_17A20
cmp edx, 7
jnz short loc_17A2D
cmp rcx, 8
jz short loc_17A2D
cmp ecx, 0Eh
jz short loc_17A2D
jmp short loc_17A36
loc_17A20:
cmp edx, 0F6h
jz short loc_17A2D
cmp edx, 0Dh
jnz short loc_17A36
loc_17A2D:
or eax, 8000h
mov [r8+64h], eax
loc_17A36:
cmp byte ptr [rbp+var_3C], 0
jz short loc_17A60
mov rax, [r10+8]
mov rsi, [rax+r9*8+8]
test rsi, rsi
jz short loc_17A60
mov r14, r10
mov rbx, rdi
call ma_strdup_root
mov r8, r13
mov rdi, rbx
mov r10, r14
jmp short loc_17A62
loc_17A60:
xor eax, eax
loc_17A62:
mov [r8+30h], rax
mov dword ptr [r8+60h], 0
mov qword ptr [r8+40h], 0
sub r8, 0FFFFFFFFFFFFFF80h
mov r10, [r10]
mov r13, r10
test r10, r10
lea r12, rset_field_offsets
jnz loc_17898
loc_17A90:
mov rax, [rbp+var_38]
add rax, [rbp+var_50]
cmp r8, rax
jnb short loc_17ABB
loc_17A9D:
mov r14, rdi
mov rdi, [rbp+var_48]
call free_rows
xor ebx, ebx
mov rdi, r14
xor esi, esi
call ma_free_root
jmp short loc_17AC8
loc_17AB7:
xor ebx, ebx
jmp short loc_17AC8
loc_17ABB:
mov rdi, [rbp+var_48]
call free_rows
mov rbx, [rbp+var_38]
loc_17AC8:
mov rax, rbx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long unpack_fields(long long a1, _QWORD *a2, long long a3, unsigned int a4, char a5)
{
long long v6; // rax
unsigned long long v7; // r8
long long v8; // rdi
_QWORD *v9; // r13
long long v10; // rbx
unsigned int v11; // r14d
unsigned long long v12; // r13
long long v13; // rax
long long v14; // rdx
long long v15; // r9
_QWORD *v16; // r10
long long v17; // rbx
_OWORD *v18; // rax
_OWORD *v19; // r12
unsigned __int8 *v20; // rsi
unsigned long long v21; // rax
long long v22; // rbx
unsigned long long v23; // r14
unsigned int v24; // r15d
unsigned int v25; // r15d
long long v26; // rax
unsigned __int16 *v27; // rsi
long long v28; // rcx
unsigned int v29; // edx
int v30; // eax
_QWORD *v31; // r14
long long v32; // rax
long long v33; // rbx
unsigned long long v35; // [rsp+0h] [rbp-70h]
unsigned long long v37; // [rsp+10h] [rbp-60h]
long long v38; // [rsp+18h] [rbp-58h]
unsigned long long v39; // [rsp+20h] [rbp-50h]
long long v42; // [rsp+38h] [rbp-38h]
_QWORD *v43; // [rsp+40h] [rbp-30h]
v39 = (unsigned long long)a4 << 7;
v6 = ma_alloc_root(a3, v39);
if ( !v6 )
return 0LL;
v42 = v6;
v7 = v6;
v8 = a3;
if ( *a2 )
{
v9 = (_QWORD *)*a2;
v37 = v6 + v39;
v7 = v6;
v38 = a3;
do
{
if ( v7 >= v37 )
goto LABEL_35;
v10 = 0LL;
v43 = v9;
do
{
v11 = *(_DWORD *)(v10 + v43[1] + 8) + ~(unsigned int)*(_QWORD *)(v10 + v43[1]);
v12 = v7;
v13 = ma_strdup_root();
v7 = v12;
v14 = *(_QWORD *)((char *)&rset_field_offsets + 2 * v10 + 8);
*(_QWORD *)(v12 + *(_QWORD *)((char *)&rset_field_offsets + 2 * v10)) = v13;
*(_DWORD *)(v12 + v14) = v11;
v10 += 8LL;
}
while ( v10 != 48 );
*(_QWORD *)(v12 + 120) = 0LL;
v15 = 6LL;
v16 = v43;
if ( (*(_BYTE *)(*(_QWORD *)(a1 + 1264) + 112LL) & 8) != 0 )
{
v17 = *(_QWORD *)(v43[1] + 56LL) - *(_QWORD *)(v43[1] + 48LL);
if ( v17 >= 2 )
{
v18 = (_OWORD *)ma_alloc_root(v8, 32LL);
if ( v18 )
{
v19 = v18;
v18[1] = 0LL;
*v18 = 0LL;
v7 = v12;
*(_QWORD *)(v12 + 120) = v18;
v20 = *(unsigned __int8 **)(v43[1] + 48LL);
v21 = (unsigned long long)&v20[v17 - 1];
v35 = v21;
do
{
v22 = v20[1];
if ( (v22 & 0x80u) != 0LL )
break;
v23 = (unsigned long long)&v20[v22 + 2];
if ( v23 > v21 )
break;
v24 = *v20;
if ( (unsigned __int8)v24 <= 1u )
{
v25 = v24;
v26 = ma_memdup_root(v38, v20 + 2, v22);
v7 = v12;
if ( !v26 )
v22 = 0LL;
*(_QWORD *)&v19[v25] = v26;
v21 = v35;
*((_QWORD *)&v19[v25] + 1) = v22;
}
v20 = (unsigned __int8 *)v23;
v8 = v38;
}
while ( v23 < v21 );
}
else
{
v7 = v12;
*(_QWORD *)(v12 + 120) = 0LL;
}
}
v15 = 7LL;
v16 = v43;
}
v27 = *(unsigned __int16 **)(v16[1] + 8 * v15);
*(_DWORD *)(v7 + 108) = *v27;
v28 = *(unsigned int *)(v27 + 1);
*(_QWORD *)(v7 + 56) = v28;
v29 = *((unsigned __int8 *)v27 + 6);
*(_DWORD *)(v7 + 112) = v29;
v30 = *(unsigned __int16 *)((char *)v27 + 7);
*(_DWORD *)(v7 + 100) = v30;
*(_DWORD *)(v7 + 104) = *((char *)v27 + 9);
if ( v29 > 9 )
{
if ( v29 != 246 && v29 != 13 )
goto LABEL_29;
}
else if ( v29 == 7 && v28 != 8 && (_DWORD)v28 != 14 )
{
goto LABEL_29;
}
*(_DWORD *)(v7 + 100) = v30 | 0x8000;
LABEL_29:
if ( a5 && *(_QWORD *)(v16[1] + 8 * v15 + 8) )
{
v31 = v16;
v32 = ma_strdup_root();
v7 = v12;
v16 = v31;
}
else
{
v32 = 0LL;
}
*(_QWORD *)(v7 + 48) = v32;
*(_DWORD *)(v7 + 96) = 0;
*(_QWORD *)(v7 + 64) = 0LL;
v7 += 128LL;
v9 = (_QWORD *)*v16;
}
while ( *v16 );
}
if ( v7 >= v39 + v42 )
{
free_rows((long long)a2);
return v42;
}
else
{
LABEL_35:
free_rows((long long)a2);
v33 = 0LL;
ma_free_root(v8, 0LL);
}
return v33;
}
| unpack_fields:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV dword ptr [RBP + -0x3c],R8D
MOV RBX,RSI
MOV qword ptr [RBP + -0x68],RDI
MOV ESI,ECX
SHL RSI,0x7
MOV R14,RDX
MOV RDI,RDX
MOV qword ptr [RBP + -0x50],RSI
CALL 0x0011db33
TEST RAX,RAX
JZ 0x00117ab7
MOV qword ptr [RBP + -0x48],RBX
MOV RCX,qword ptr [RBX]
MOV qword ptr [RBP + -0x38],RAX
MOV R8,RAX
TEST RCX,RCX
MOV RDI,R14
JZ 0x00117a90
MOV R13,RCX
MOV R15,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,R15
MOV qword ptr [RBP + -0x60],RAX
LEA R12,[0x137ea0]
MOV R8,R15
MOV qword ptr [RBP + -0x58],RDI
LAB_00117898:
CMP R8,qword ptr [RBP + -0x60]
JNC 0x00117a9d
XOR EBX,EBX
MOV qword ptr [RBP + -0x30],R13
LAB_001178a8:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x8]
MOV RSI,qword ptr [RBX + RAX*0x1]
MOV R14D,ESI
NOT R14D
ADD R14D,dword ptr [RBX + RAX*0x1 + 0x8]
MOV R15,RDI
MOV R13,R8
CALL 0x0011dcd6
MOV R8,R13
MOV RDI,R15
MOV RCX,qword ptr [R12 + RBX*0x2]
MOV RDX,qword ptr [R12 + RBX*0x2 + 0x8]
MOV qword ptr [R13 + RCX*0x1],RAX
MOV dword ptr [R13 + RDX*0x1],R14D
ADD RBX,0x8
CMP RBX,0x30
JNZ 0x001178a8
MOV qword ptr [R8 + 0x78],0x0
MOV RAX,qword ptr [RBP + -0x68]
MOV RAX,qword ptr [RAX + 0x4f0]
MOV R9D,0x6
TEST byte ptr [RAX + 0x70],0x8
MOV R10,qword ptr [RBP + -0x30]
JZ 0x001179db
MOV RAX,qword ptr [R10 + 0x8]
MOV RBX,qword ptr [RAX + 0x38]
SUB RBX,qword ptr [RAX + 0x30]
CMP RBX,0x2
JL 0x001179d1
MOV ESI,0x20
CALL 0x0011db33
TEST RAX,RAX
JZ 0x001179c3
MOV R12,RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + 0x10],XMM0
MOVUPS xmmword ptr [RAX],XMM0
MOV R8,R13
MOV qword ptr [R13 + 0x78],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x8]
MOV RSI,qword ptr [RAX + 0x30]
LEA RAX,[RSI + RBX*0x1]
DEC RAX
MOV RDI,R15
MOV qword ptr [RBP + -0x70],RAX
LAB_0011796b:
MOVZX EBX,byte ptr [RSI + 0x1]
TEST BL,BL
JS 0x001179d1
LEA R14,[RSI + RBX*0x1]
ADD R14,0x2
CMP R14,RAX
JA 0x001179d1
MOVZX R15D,byte ptr [RSI]
CMP R15B,0x1
JA 0x001179b5
ADD RSI,0x2
SHL R15D,0x4
MOV RDI,qword ptr [RBP + -0x58]
MOV RDX,RBX
CALL 0x0011dd27
MOV R8,R13
TEST RAX,RAX
CMOVZ RBX,RAX
MOV qword ptr [R12 + R15*0x1],RAX
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [R12 + R15*0x1 + 0x8],RBX
LAB_001179b5:
MOV RSI,R14
CMP R14,RAX
MOV RDI,qword ptr [RBP + -0x58]
JC 0x0011796b
JMP 0x001179d1
LAB_001179c3:
MOV R8,R13
MOV qword ptr [R13 + 0x78],0x0
MOV RDI,R15
LAB_001179d1:
MOV R9D,0x7
MOV R10,qword ptr [RBP + -0x30]
LAB_001179db:
MOV RAX,qword ptr [R10 + 0x8]
MOV RSI,qword ptr [RAX + R9*0x8]
MOVZX EAX,word ptr [RSI]
MOV dword ptr [R8 + 0x6c],EAX
MOV ECX,dword ptr [RSI + 0x2]
MOV qword ptr [R8 + 0x38],RCX
MOVZX EDX,byte ptr [RSI + 0x6]
MOV dword ptr [R8 + 0x70],EDX
MOVZX EAX,word ptr [RSI + 0x7]
MOV dword ptr [R8 + 0x64],EAX
MOVSX ESI,byte ptr [RSI + 0x9]
MOV dword ptr [R8 + 0x68],ESI
CMP EDX,0x9
JA 0x00117a20
CMP EDX,0x7
JNZ 0x00117a2d
CMP RCX,0x8
JZ 0x00117a2d
CMP ECX,0xe
JZ 0x00117a2d
JMP 0x00117a36
LAB_00117a20:
CMP EDX,0xf6
JZ 0x00117a2d
CMP EDX,0xd
JNZ 0x00117a36
LAB_00117a2d:
OR EAX,0x8000
MOV dword ptr [R8 + 0x64],EAX
LAB_00117a36:
CMP byte ptr [RBP + -0x3c],0x0
JZ 0x00117a60
MOV RAX,qword ptr [R10 + 0x8]
MOV RSI,qword ptr [RAX + R9*0x8 + 0x8]
TEST RSI,RSI
JZ 0x00117a60
MOV R14,R10
MOV RBX,RDI
CALL 0x0011dcd6
MOV R8,R13
MOV RDI,RBX
MOV R10,R14
JMP 0x00117a62
LAB_00117a60:
XOR EAX,EAX
LAB_00117a62:
MOV qword ptr [R8 + 0x30],RAX
MOV dword ptr [R8 + 0x60],0x0
MOV qword ptr [R8 + 0x40],0x0
SUB R8,-0x80
MOV R10,qword ptr [R10]
MOV R13,R10
TEST R10,R10
LEA R12,[0x137ea0]
JNZ 0x00117898
LAB_00117a90:
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,qword ptr [RBP + -0x50]
CMP R8,RAX
JNC 0x00117abb
LAB_00117a9d:
MOV R14,RDI
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x0011574e
XOR EBX,EBX
MOV RDI,R14
XOR ESI,ESI
CALL 0x0011dc4b
JMP 0x00117ac8
LAB_00117ab7:
XOR EBX,EBX
JMP 0x00117ac8
LAB_00117abb:
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x0011574e
MOV RBX,qword ptr [RBP + -0x38]
LAB_00117ac8:
MOV RAX,RBX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong unpack_fields(long param_1,long *param_2,int8 param_3,ulong param_4,char param_5)
{
byte bVar1;
ushort uVar2;
int iVar3;
uint uVar4;
long lVar5;
ushort *puVar6;
ulong uVar7;
int8 uVar8;
int8 *puVar9;
byte *pbVar10;
int8 uVar11;
long lVar12;
ulong uVar13;
long lVar14;
byte *pbVar15;
ulong uVar16;
long *plVar17;
byte *pbVar18;
lVar14 = (param_4 & 0xffffffff) * 0x80;
uVar7 = ma_alloc_root(param_3);
if (uVar7 == 0) {
uVar7 = 0;
}
else {
plVar17 = (long *)*param_2;
uVar16 = uVar7;
if (plVar17 != (long *)0x0) {
do {
if (lVar14 + uVar7 <= uVar16) goto LAB_00117a9d;
lVar12 = 0;
do {
uVar11 = *(int8 *)(lVar12 + plVar17[1]);
iVar3 = *(int *)(lVar12 + 8 + plVar17[1]);
uVar8 = ma_strdup_root();
lVar5 = *(long *)((long)&DAT_00137ea8 + lVar12 * 2);
*(int8 *)(uVar16 + *(long *)((long)&rset_field_offsets + lVar12 * 2)) = uVar8;
*(uint *)(uVar16 + lVar5) = ~(uint)uVar11 + iVar3;
lVar12 = lVar12 + 8;
} while (lVar12 != 0x30);
*(int8 *)(uVar16 + 0x78) = 0;
lVar12 = 6;
if ((*(byte *)(*(long *)(param_1 + 0x4f0) + 0x70) & 8) != 0) {
lVar12 = *(long *)(plVar17[1] + 0x38) - *(long *)(plVar17[1] + 0x30);
if (1 < lVar12) {
puVar9 = (int8 *)ma_alloc_root(param_3,0x20);
if (puVar9 == (int8 *)0x0) {
*(int8 *)(uVar16 + 0x78) = 0;
}
else {
puVar9[2] = 0;
puVar9[3] = 0;
*puVar9 = 0;
puVar9[1] = 0;
*(int8 **)(uVar16 + 0x78) = puVar9;
pbVar10 = *(byte **)(plVar17[1] + 0x30) + lVar12 + -1;
pbVar15 = *(byte **)(plVar17[1] + 0x30);
do {
uVar13 = (ulong)pbVar15[1];
if (((char)pbVar15[1] < '\0') || (pbVar18 = pbVar15 + uVar13 + 2, pbVar10 < pbVar18)
) break;
bVar1 = *pbVar15;
if (bVar1 < 2) {
lVar12 = ma_memdup_root(param_3,pbVar15 + 2,uVar13);
if (lVar12 == 0) {
uVar13 = 0;
}
puVar9[(ulong)bVar1 * 2] = lVar12;
puVar9[(ulong)bVar1 * 2 + 1] = uVar13;
}
pbVar15 = pbVar18;
} while (pbVar18 < pbVar10);
}
}
lVar12 = 7;
}
puVar6 = *(ushort **)(plVar17[1] + lVar12 * 8);
*(uint *)(uVar16 + 0x6c) = (uint)*puVar6;
uVar4 = *(uint *)(puVar6 + 1);
*(ulong *)(uVar16 + 0x38) = (ulong)uVar4;
bVar1 = (byte)puVar6[3];
*(uint *)(uVar16 + 0x70) = (uint)bVar1;
uVar2 = *(ushort *)((long)puVar6 + 7);
*(uint *)(uVar16 + 100) = (uint)uVar2;
*(int *)(uVar16 + 0x68) = (int)*(char *)((long)puVar6 + 9);
if (bVar1 < 10) {
if ((bVar1 != 7) || (((ulong)uVar4 == 8 || (uVar4 == 0xe)))) {
LAB_00117a2d:
*(uint *)(uVar16 + 100) = uVar2 | 0x8000;
}
}
else if ((bVar1 == 0xf6) || (bVar1 == 0xd)) goto LAB_00117a2d;
if ((param_5 == '\0') || (*(long *)(plVar17[1] + 8 + lVar12 * 8) == 0)) {
uVar11 = 0;
}
else {
uVar11 = ma_strdup_root();
}
*(int8 *)(uVar16 + 0x30) = uVar11;
*(int4 *)(uVar16 + 0x60) = 0;
*(int8 *)(uVar16 + 0x40) = 0;
uVar16 = uVar16 + 0x80;
plVar17 = (long *)*plVar17;
} while (plVar17 != (long *)0x0);
}
if (uVar16 < uVar7 + lVar14) {
LAB_00117a9d:
free_rows(param_2);
uVar7 = 0;
ma_free_root(param_3,0);
}
else {
free_rows(param_2);
}
}
return uVar7;
}
| |
27,347 | my_copy_fix_mb2_or_mb4 | eloqsql/strings/ctype-ucs2.c | static size_t
my_copy_fix_mb2_or_mb4(CHARSET_INFO *cs,
char *dst, size_t dst_length,
const char *src, size_t src_length,
size_t nchars, MY_STRCOPY_STATUS *status)
{
size_t length2, src_offset= src_length % cs->mbminlen;
my_char_copy_status_t padstatus;
if (!src_offset)
return my_copy_fix_mb(cs, dst, dst_length,
src, src_length, nchars, status);
if ((padstatus= my_copy_incomplete_char(cs, dst, dst_length,
src, src_length, nchars, TRUE)) ==
MY_CHAR_COPY_ERROR)
{
status->m_source_end_pos= status->m_well_formed_error_pos= src;
return 0;
}
length2= my_copy_fix_mb(cs, dst + cs->mbminlen, dst_length - cs->mbminlen,
src + src_offset, src_length - src_offset,
nchars - 1, status);
if (padstatus == MY_CHAR_COPY_FIXED)
status->m_well_formed_error_pos= src;
return cs->mbminlen /* The left-padded character */ + length2;
} | O3 | c | my_copy_fix_mb2_or_mb4:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r12
movq %rdx, %r10
movq %rsi, %rbx
movq %rdi, %r14
movl 0x98(%rdi), %r13d
movq %r8, %rax
xorl %edx, %edx
divq %r13
testq %rdx, %rdx
je 0xcb399
cmpq %r10, %r13
seta %al
movq 0x10(%rbp), %rsi
testq %r9, %r9
sete %cl
orb %al, %cl
jne 0xcb428
movq %rdx, %r15
movq %rsi, -0x38(%rbp)
movq %r10, -0x40(%rbp)
movq %r8, -0x48(%rbp)
movq %r9, -0x50(%rbp)
subq %rdx, %r13
movq %rbx, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x2a2c0
addq %rbx, %r13
movq %r13, %rdi
movq %r12, -0x58(%rbp)
movq %r12, %rsi
movq %r15, %rdx
callq 0x2a130
movl 0x98(%r14), %edx
addq %rbx, %rdx
movq 0xb8(%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0xc0(%rax)
movl 0x98(%r14), %r13d
cmpl %r13d, %eax
movl %eax, -0x2c(%rbp)
jne 0xcb3b8
movq -0x58(%rbp), %r12
movq -0x50(%rbp), %r9
movq -0x48(%rbp), %r8
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rsi
jmp 0xcb3ee
movq %r14, %rdi
movq %rbx, %rsi
movq %r10, %rdx
movq %r12, %rcx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xba372
movq 0xb8(%r14), %rax
leaq (%rbx,%r13), %rcx
movl $0x3f, %esi
movq %r14, %rdi
movq %rbx, %rdx
callq *0x30(%rax)
cmpl 0x98(%r14), %eax
movq -0x58(%rbp), %r12
movq -0x50(%rbp), %r9
movq -0x48(%rbp), %r8
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rsi
jne 0xcb428
movl %eax, %eax
addq %rax, %rbx
subq %rax, %rdx
leaq (%r12,%r15), %rcx
subq %r15, %r8
decq %r9
movq %rsi, (%rsp)
movq %r14, %rdi
movq %rsi, %r15
movq %rbx, %rsi
callq 0xba372
cmpl %r13d, -0x2c(%rbp)
je 0xcb41c
movq %r12, 0x8(%r15)
movl 0x98(%r14), %ecx
addq %rcx, %rax
jmp 0xcb431
movq %r12, 0x8(%rsi)
movq %r12, (%rsi)
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_copy_fix_mb2_or_mb4:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r12, rcx
mov r10, rdx
mov rbx, rsi
mov r14, rdi
mov r13d, [rdi+98h]
mov rax, r8
xor edx, edx
div r13
test rdx, rdx
jz loc_CB399
cmp r13, r10
setnbe al
mov rsi, [rbp+arg_0]
test r9, r9
setz cl
or cl, al
jnz loc_CB428
mov r15, rdx
mov [rbp+var_38], rsi
mov [rbp+var_40], r10
mov [rbp+var_48], r8
mov [rbp+var_50], r9
sub r13, rdx
mov rdi, rbx
xor esi, esi
mov rdx, r13
call _memset
add r13, rbx
mov rdi, r13
mov [rbp+var_58], r12
mov rsi, r12
mov rdx, r15
call _memmove
mov edx, [r14+98h]
add rdx, rbx
mov rax, [r14+0B8h]
mov rdi, r14
mov rsi, rbx
call qword ptr [rax+0C0h]
mov r13d, [r14+98h]
cmp eax, r13d
mov [rbp+var_2C], eax
jnz short loc_CB3B8
mov r12, [rbp+var_58]
mov r9, [rbp+var_50]
mov r8, [rbp+var_48]
mov rdx, [rbp+var_40]
mov rsi, [rbp+var_38]
jmp short loc_CB3EE
loc_CB399:
mov rdi, r14
mov rsi, rbx
mov rdx, r10
mov rcx, r12
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp my_copy_fix_mb
loc_CB3B8:
mov rax, [r14+0B8h]
lea rcx, [rbx+r13]
mov esi, 3Fh ; '?'
mov rdi, r14
mov rdx, rbx
call qword ptr [rax+30h]
cmp eax, [r14+98h]
mov r12, [rbp+var_58]
mov r9, [rbp+var_50]
mov r8, [rbp+var_48]
mov rdx, [rbp+var_40]
mov rsi, [rbp+var_38]
jnz short loc_CB428
loc_CB3EE:
mov eax, eax
add rbx, rax
sub rdx, rax
lea rcx, [r12+r15]
sub r8, r15
dec r9
mov [rsp+60h+var_60], rsi
mov rdi, r14
mov r15, rsi
mov rsi, rbx
call my_copy_fix_mb
cmp [rbp+var_2C], r13d
jz short loc_CB41C
mov [r15+8], r12
loc_CB41C:
mov ecx, [r14+98h]
add rax, rcx
jmp short loc_CB431
loc_CB428:
mov [rsi+8], r12
mov [rsi], r12
xor eax, eax
loc_CB431:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| unsigned long long my_copy_fix_mb2_or_mb4(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
long long a6,
unsigned long long *a7)
{
unsigned long long v9; // r13
unsigned long long *v10; // rsi
unsigned long long v11; // r15
unsigned long long v12; // r13
unsigned int v13; // eax
long long v14; // r13
long long v15; // r9
unsigned long long v16; // r8
unsigned long long v17; // rdx
unsigned long long fixed; // rax
unsigned int v23; // [rsp+34h] [rbp-2Ch]
v9 = *(unsigned int *)(a1 + 152);
if ( !(a5 % v9) )
return my_copy_fix_mb(a1, a2, a3, a4, a5, a6, a7);
v10 = a7;
if ( v9 > a3 || a6 == 0 )
goto LABEL_10;
v11 = a5 % *(unsigned int *)(a1 + 152);
v12 = v9 - a5 % v9;
memset(a2, 0LL, v12);
memmove(a2 + v12, a4, v11);
v13 = (*(long long ( **)(long long, long long, long long))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
a2,
a2 + *(unsigned int *)(a1 + 152));
v14 = *(unsigned int *)(a1 + 152);
v23 = v13;
if ( v13 != (_DWORD)v14 )
{
v13 = (*(long long ( **)(long long, long long, long long, long long))(*(_QWORD *)(a1 + 184) + 48LL))(
a1,
63LL,
a2,
a2 + v14);
v15 = a6;
v16 = a5;
v17 = a3;
v10 = a7;
if ( v13 == *(_DWORD *)(a1 + 152) )
goto LABEL_7;
LABEL_10:
v10[1] = a4;
*v10 = a4;
return 0LL;
}
v15 = a6;
v16 = a5;
v17 = a3;
v10 = a7;
LABEL_7:
fixed = my_copy_fix_mb(a1, v13 + a2, v17 - v13, a4 + v11, v16 - v11, v15 - 1, v10);
if ( v23 != (_DWORD)v14 )
v10[1] = a4;
return *(unsigned int *)(a1 + 152) + fixed;
}
| my_copy_fix_mb2_or_mb4:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R12,RCX
MOV R10,RDX
MOV RBX,RSI
MOV R14,RDI
MOV R13D,dword ptr [RDI + 0x98]
MOV RAX,R8
XOR EDX,EDX
DIV R13
TEST RDX,RDX
JZ 0x001cb399
CMP R13,R10
SETA AL
MOV RSI,qword ptr [RBP + 0x10]
TEST R9,R9
SETZ CL
OR CL,AL
JNZ 0x001cb428
MOV R15,RDX
MOV qword ptr [RBP + -0x38],RSI
MOV qword ptr [RBP + -0x40],R10
MOV qword ptr [RBP + -0x48],R8
MOV qword ptr [RBP + -0x50],R9
SUB R13,RDX
MOV RDI,RBX
XOR ESI,ESI
MOV RDX,R13
CALL 0x0012a2c0
ADD R13,RBX
MOV RDI,R13
MOV qword ptr [RBP + -0x58],R12
MOV RSI,R12
MOV RDX,R15
CALL 0x0012a130
MOV EDX,dword ptr [R14 + 0x98]
ADD RDX,RBX
MOV RAX,qword ptr [R14 + 0xb8]
MOV RDI,R14
MOV RSI,RBX
CALL qword ptr [RAX + 0xc0]
MOV R13D,dword ptr [R14 + 0x98]
CMP EAX,R13D
MOV dword ptr [RBP + -0x2c],EAX
JNZ 0x001cb3b8
MOV R12,qword ptr [RBP + -0x58]
MOV R9,qword ptr [RBP + -0x50]
MOV R8,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x38]
JMP 0x001cb3ee
LAB_001cb399:
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R10
MOV RCX,R12
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001ba372
LAB_001cb3b8:
MOV RAX,qword ptr [R14 + 0xb8]
LEA RCX,[RBX + R13*0x1]
MOV ESI,0x3f
MOV RDI,R14
MOV RDX,RBX
CALL qword ptr [RAX + 0x30]
CMP EAX,dword ptr [R14 + 0x98]
MOV R12,qword ptr [RBP + -0x58]
MOV R9,qword ptr [RBP + -0x50]
MOV R8,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x38]
JNZ 0x001cb428
LAB_001cb3ee:
MOV EAX,EAX
ADD RBX,RAX
SUB RDX,RAX
LEA RCX,[R12 + R15*0x1]
SUB R8,R15
DEC R9
MOV qword ptr [RSP],RSI
MOV RDI,R14
MOV R15,RSI
MOV RSI,RBX
CALL 0x001ba372
CMP dword ptr [RBP + -0x2c],R13D
JZ 0x001cb41c
MOV qword ptr [R15 + 0x8],R12
LAB_001cb41c:
MOV ECX,dword ptr [R14 + 0x98]
ADD RAX,RCX
JMP 0x001cb431
LAB_001cb428:
MOV qword ptr [RSI + 0x8],R12
MOV qword ptr [RSI],R12
XOR EAX,EAX
LAB_001cb431:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_copy_fix_mb2_or_mb4
(long param_1,void *param_2,ulong param_3,void *param_4,ulong param_5,long param_6,
int8 *param_7)
{
uint uVar1;
uint uVar2;
uint uVar3;
long lVar4;
ulong __n;
ulong uVar5;
uVar5 = (ulong)*(uint *)(param_1 + 0x98);
__n = param_5 % uVar5;
if (__n == 0) {
lVar4 = my_copy_fix_mb(param_1,param_2,param_3,param_4);
return lVar4;
}
if (param_6 != 0 && uVar5 <= param_3) {
memset(param_2,0,uVar5 - __n);
memmove((void *)((uVar5 - __n) + (long)param_2),param_4,__n);
uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))
(param_1,param_2,(ulong)*(uint *)(param_1 + 0x98) + (long)param_2);
uVar1 = *(uint *)(param_1 + 0x98);
uVar3 = uVar2;
if ((uVar2 == uVar1) ||
(uVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))
(param_1,0x3f,param_2,(long)param_2 + (ulong)uVar1),
uVar3 == *(uint *)(param_1 + 0x98))) {
lVar4 = my_copy_fix_mb(param_1,(long)param_2 + (ulong)uVar3,param_3 - uVar3,
(long)param_4 + __n,param_5 - __n,param_6 + -1,param_7);
if (uVar2 != uVar1) {
param_7[1] = param_4;
}
return lVar4 + (ulong)*(uint *)(param_1 + 0x98);
}
}
param_7[1] = param_4;
*param_7 = param_4;
return 0;
}
| |
27,348 | my_load_path | eloqsql/mysys/mf_loadpath.c | char * my_load_path(char * to, const char *path,
const char *own_path_prefix)
{
char buff[FN_REFLEN+1];
const char *from= buff;
int is_cur;
DBUG_ENTER("my_load_path");
DBUG_PRINT("enter",("path: %s prefix: %s",path,
own_path_prefix ? own_path_prefix : ""));
if ((path[0] == FN_HOMELIB && path[1] == FN_LIBCHAR) ||
test_if_hard_path(path))
from= path;
else if ((is_cur=(path[0] == FN_CURLIB && path[1] == FN_LIBCHAR)) ||
(is_prefix(path,FN_PARENTDIR)) ||
! own_path_prefix)
{
if (is_cur)
is_cur=2; /* Remove current dir */
if (! my_getwd(buff,(uint) (FN_REFLEN-strlen(path)+is_cur),MYF(0)))
{
size_t length= strlen(buff);
(void) strmake(buff + length, path+is_cur, FN_REFLEN - length);
}
else
from= path; /* Return org file name */
}
else
(void) strxnmov(buff, FN_REFLEN, own_path_prefix, path, NullS);
strmake(to, from, FN_REFLEN-1);
DBUG_PRINT("exit",("to: %s",to));
DBUG_RETURN(to);
} | O0 | c | my_load_path:
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)
movq %rdx, -0x228(%rbp)
leaq -0x210(%rbp), %rax
movq %rax, -0x230(%rbp)
jmp 0x46f1d
movq -0x220(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x7e, %eax
jne 0x46f3c
movq -0x220(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x2f, %eax
je 0x46f4d
movq -0x220(%rbp), %rdi
callq 0x446e0
cmpl $0x0, %eax
je 0x46f60
movq -0x220(%rbp), %rax
movq %rax, -0x230(%rbp)
jmp 0x470a4
movq -0x220(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x2e, %ecx
movb %al, -0x241(%rbp)
jne 0x46f8e
movq -0x220(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x2f, %eax
sete %al
movb %al, -0x241(%rbp)
movb -0x241(%rbp), %al
movb %al, %cl
andb $0x1, %cl
movzbl %cl, %ecx
movl %ecx, -0x234(%rbp)
testb $0x1, %al
jne 0x46fcc
movq -0x220(%rbp), %rdi
leaq 0x4a07e(%rip), %rsi # 0x91032
callq 0x883f0
cmpl $0x0, %eax
jne 0x46fcc
cmpq $0x0, -0x228(%rbp)
jne 0x4707c
cmpl $0x0, -0x234(%rbp)
je 0x46fdf
movl $0x2, -0x234(%rbp)
leaq -0x210(%rbp), %rax
movq %rax, -0x250(%rbp)
movq -0x220(%rbp), %rdi
callq 0x25170
movq -0x250(%rbp), %rdi
movq %rax, %rcx
movl $0x200, %eax # imm = 0x200
subq %rcx, %rax
movslq -0x234(%rbp), %rcx
addq %rcx, %rax
movl %eax, %eax
movl %eax, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x44490
cmpl $0x0, %eax
jne 0x4706c
leaq -0x210(%rbp), %rdi
callq 0x25170
movq %rax, -0x240(%rbp)
leaq -0x210(%rbp), %rdi
addq -0x240(%rbp), %rdi
movq -0x220(%rbp), %rsi
movslq -0x234(%rbp), %rax
addq %rax, %rsi
movl $0x200, %edx # imm = 0x200
subq -0x240(%rbp), %rdx
callq 0x8bc00
jmp 0x4707a
movq -0x220(%rbp), %rax
movq %rax, -0x230(%rbp)
jmp 0x470a2
leaq -0x210(%rbp), %rdi
movq -0x228(%rbp), %rdx
movq -0x220(%rbp), %rcx
movl $0x200, %esi # imm = 0x200
xorl %eax, %eax
movl %eax, %r8d
movb $0x0, %al
callq 0x8be20
jmp 0x470a4
movq -0x218(%rbp), %rdi
movq -0x230(%rbp), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x8bc00
jmp 0x470be
jmp 0x470c0
movq -0x218(%rbp), %rax
movq %rax, -0x258(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x470f0
movq -0x258(%rbp), %rax
addq $0x260, %rsp # imm = 0x260
popq %rbp
retq
callq 0x25410
nopw %cs:(%rax,%rax)
nop
| my_load_path:
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
mov [rbp+var_228], rdx
lea rax, [rbp+var_210]
mov [rbp+var_230], rax
jmp short $+2
loc_46F1D:
mov rax, [rbp+var_220]
movsx eax, byte ptr [rax]
cmp eax, 7Eh ; '~'
jnz short loc_46F3C
mov rax, [rbp+var_220]
movsx eax, byte ptr [rax+1]
cmp eax, 2Fh ; '/'
jz short loc_46F4D
loc_46F3C:
mov rdi, [rbp+var_220]
call test_if_hard_path
cmp eax, 0
jz short loc_46F60
loc_46F4D:
mov rax, [rbp+var_220]
mov [rbp+var_230], rax
jmp loc_470A4
loc_46F60:
mov rax, [rbp+var_220]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 2Eh ; '.'
mov [rbp+var_241], al
jnz short loc_46F8E
mov rax, [rbp+var_220]
movsx eax, byte ptr [rax+1]
cmp eax, 2Fh ; '/'
setz al
mov [rbp+var_241], al
loc_46F8E:
mov al, [rbp+var_241]
mov cl, al
and cl, 1
movzx ecx, cl
mov [rbp+var_234], ecx
test al, 1
jnz short loc_46FCC
mov rdi, [rbp+var_220]
lea rsi, asc_91032; ".."
call is_prefix
cmp eax, 0
jnz short loc_46FCC
cmp [rbp+var_228], 0
jnz loc_4707C
loc_46FCC:
cmp [rbp+var_234], 0
jz short loc_46FDF
mov [rbp+var_234], 2
loc_46FDF:
lea rax, [rbp+var_210]
mov [rbp+var_250], rax
mov rdi, [rbp+var_220]
call _strlen
mov rdi, [rbp+var_250]
mov rcx, rax
mov eax, 200h
sub rax, rcx
movsxd rcx, [rbp+var_234]
add rax, rcx
mov eax, eax
mov esi, eax
xor eax, eax
mov edx, eax
call my_getwd
cmp eax, 0
jnz short loc_4706C
lea rdi, [rbp+var_210]
call _strlen
mov [rbp+var_240], rax
lea rdi, [rbp+var_210]
add rdi, [rbp+var_240]
mov rsi, [rbp+var_220]
movsxd rax, [rbp+var_234]
add rsi, rax
mov edx, 200h
sub rdx, [rbp+var_240]
call strmake
jmp short loc_4707A
loc_4706C:
mov rax, [rbp+var_220]
mov [rbp+var_230], rax
loc_4707A:
jmp short loc_470A2
loc_4707C:
lea rdi, [rbp+var_210]
mov rdx, [rbp+var_228]
mov rcx, [rbp+var_220]
mov esi, 200h
xor eax, eax
mov r8d, eax
mov al, 0
call strxnmov
loc_470A2:
jmp short $+2
loc_470A4:
mov rdi, [rbp+var_218]
mov rsi, [rbp+var_230]
mov edx, 1FFh
call strmake
jmp short $+2
loc_470BE:
jmp short $+2
loc_470C0:
mov rax, [rbp+var_218]
mov [rbp+var_258], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_470F0
mov rax, [rbp+var_258]
add rsp, 260h
pop rbp
retn
loc_470F0:
call ___stack_chk_fail
| long long my_load_path(long long a1, char *a2, long long a3)
{
int v3; // r9d
int v4; // eax
bool v6; // [rsp+1Fh] [rbp-241h]
long long v7; // [rsp+20h] [rbp-240h]
int v8; // [rsp+2Ch] [rbp-234h]
_BYTE v10[520]; // [rsp+50h] [rbp-210h] BYREF
unsigned long long v11; // [rsp+258h] [rbp-8h]
v11 = __readfsqword(0x28u);
if ( (*a2 != 126 || a2[1] != 47) && !test_if_hard_path(a2) )
{
v6 = 0;
if ( *a2 == 46 )
v6 = a2[1] == 47;
v8 = v6;
if ( v6 || (unsigned int)is_prefix(a2, "..") || !a3 )
{
if ( v6 )
v8 = 2;
v4 = strlen(a2);
if ( (unsigned int)my_getwd((long long)v10, (unsigned int)(v8 + 512 - v4), 0) )
goto LABEL_4;
v7 = strlen(v10);
strmake(&v10[v7], &a2[v8], 512 - v7);
}
else
{
strxnmov((unsigned int)v10, 512, a3, (_DWORD)a2, 0, v3);
}
strmake(a1, v10, 511LL);
return a1;
}
LABEL_4:
strmake(a1, a2, 511LL);
return a1;
}
| my_load_path:
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
MOV qword ptr [RBP + -0x228],RDX
LEA RAX,[RBP + -0x210]
MOV qword ptr [RBP + -0x230],RAX
JMP 0x00146f1d
LAB_00146f1d:
MOV RAX,qword ptr [RBP + -0x220]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x7e
JNZ 0x00146f3c
MOV RAX,qword ptr [RBP + -0x220]
MOVSX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x2f
JZ 0x00146f4d
LAB_00146f3c:
MOV RDI,qword ptr [RBP + -0x220]
CALL 0x001446e0
CMP EAX,0x0
JZ 0x00146f60
LAB_00146f4d:
MOV RAX,qword ptr [RBP + -0x220]
MOV qword ptr [RBP + -0x230],RAX
JMP 0x001470a4
LAB_00146f60:
MOV RAX,qword ptr [RBP + -0x220]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x2e
MOV byte ptr [RBP + -0x241],AL
JNZ 0x00146f8e
MOV RAX,qword ptr [RBP + -0x220]
MOVSX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x2f
SETZ AL
MOV byte ptr [RBP + -0x241],AL
LAB_00146f8e:
MOV AL,byte ptr [RBP + -0x241]
MOV CL,AL
AND CL,0x1
MOVZX ECX,CL
MOV dword ptr [RBP + -0x234],ECX
TEST AL,0x1
JNZ 0x00146fcc
MOV RDI,qword ptr [RBP + -0x220]
LEA RSI,[0x191032]
CALL 0x001883f0
CMP EAX,0x0
JNZ 0x00146fcc
CMP qword ptr [RBP + -0x228],0x0
JNZ 0x0014707c
LAB_00146fcc:
CMP dword ptr [RBP + -0x234],0x0
JZ 0x00146fdf
MOV dword ptr [RBP + -0x234],0x2
LAB_00146fdf:
LEA RAX,[RBP + -0x210]
MOV qword ptr [RBP + -0x250],RAX
MOV RDI,qword ptr [RBP + -0x220]
CALL 0x00125170
MOV RDI,qword ptr [RBP + -0x250]
MOV RCX,RAX
MOV EAX,0x200
SUB RAX,RCX
MOVSXD RCX,dword ptr [RBP + -0x234]
ADD RAX,RCX
MOV EAX,EAX
MOV ESI,EAX
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00144490
CMP EAX,0x0
JNZ 0x0014706c
LEA RDI,[RBP + -0x210]
CALL 0x00125170
MOV qword ptr [RBP + -0x240],RAX
LEA RDI,[RBP + -0x210]
ADD RDI,qword ptr [RBP + -0x240]
MOV RSI,qword ptr [RBP + -0x220]
MOVSXD RAX,dword ptr [RBP + -0x234]
ADD RSI,RAX
MOV EDX,0x200
SUB RDX,qword ptr [RBP + -0x240]
CALL 0x0018bc00
JMP 0x0014707a
LAB_0014706c:
MOV RAX,qword ptr [RBP + -0x220]
MOV qword ptr [RBP + -0x230],RAX
LAB_0014707a:
JMP 0x001470a2
LAB_0014707c:
LEA RDI,[RBP + -0x210]
MOV RDX,qword ptr [RBP + -0x228]
MOV RCX,qword ptr [RBP + -0x220]
MOV ESI,0x200
XOR EAX,EAX
MOV R8D,EAX
MOV AL,0x0
CALL 0x0018be20
LAB_001470a2:
JMP 0x001470a4
LAB_001470a4:
MOV RDI,qword ptr [RBP + -0x218]
MOV RSI,qword ptr [RBP + -0x230]
MOV EDX,0x1ff
CALL 0x0018bc00
JMP 0x001470be
LAB_001470be:
JMP 0x001470c0
LAB_001470c0:
MOV RAX,qword ptr [RBP + -0x218]
MOV qword ptr [RBP + -0x258],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001470f0
MOV RAX,qword ptr [RBP + -0x258]
ADD RSP,0x260
POP RBP
RET
LAB_001470f0:
CALL 0x00125410
|
int8 my_load_path(int8 param_1,char *param_2,long param_3)
{
int iVar1;
size_t sVar2;
long in_FS_OFFSET;
bool local_249;
uint local_23c;
char *local_238;
char local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_238 = param_2;
if (((*param_2 != '~') || (param_2[1] != '/')) && (iVar1 = test_if_hard_path(param_2), iVar1 == 0)
) {
local_249 = false;
if (*param_2 == '.') {
local_249 = param_2[1] == '/';
}
local_23c = (uint)local_249;
if (((local_249 == false) && (iVar1 = is_prefix(param_2,&DAT_00191032), iVar1 == 0)) &&
(param_3 != 0)) {
strxnmov(local_218,0x200,param_3,param_2,0);
local_238 = local_218;
}
else {
if (local_23c != 0) {
local_23c = 2;
}
sVar2 = strlen(param_2);
iVar1 = my_getwd(local_218,(0x200 - (int)sVar2) + local_23c,0);
if (iVar1 == 0) {
sVar2 = strlen(local_218);
strmake(local_218 + sVar2,param_2 + (int)local_23c,0x200 - sVar2);
local_238 = local_218;
}
}
}
strmake(param_1,local_238,0x1ff);
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return param_1;
}
| |
27,349 | common_params_handle_model_default(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/arg.cpp | static void common_params_handle_model_default(
std::string & model,
const std::string & model_url,
std::string & hf_repo,
std::string & hf_file,
const std::string & hf_token,
const std::string & model_default) {
if (!hf_repo.empty()) {
// short-hand to avoid specifying --hf-file -> default it to --model
if (hf_file.empty()) {
if (model.empty()) {
auto auto_detected = common_get_hf_file(hf_repo, hf_token);
if (auto_detected.first.empty() || auto_detected.second.empty()) {
exit(1); // built without CURL, error message already printed
}
hf_repo = auto_detected.first;
hf_file = auto_detected.second;
} else {
hf_file = model;
}
}
// make sure model path is present (for caching purposes)
if (model.empty()) {
// this is to avoid different repo having same file name, or same file name in different subdirs
std::string filename = hf_repo + "_" + hf_file;
// to make sure we don't have any slashes in the filename
string_replace_all(filename, "/", "_");
model = fs_get_cache_file(filename);
}
} else if (!model_url.empty()) {
if (model.empty()) {
auto f = string_split<std::string>(model_url, '#').front();
f = string_split<std::string>(f, '?').front();
model = fs_get_cache_file(string_split<std::string>(f, '/').back());
}
} else if (model.empty()) {
model = model_default;
}
} | O1 | cpp | common_params_handle_model_default(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdx)
je 0x4f432
movq %rcx, %r14
movq %rdx, %r15
cmpq $0x0, 0x8(%rcx)
jne 0x4f5b0
cmpq $0x0, 0x8(%rbx)
je 0x4f535
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1b4c0
jmp 0x4f5b0
cmpq $0x0, 0x8(%rsi)
movq 0x8(%rbx), %rax
je 0x4f513
testq %rax, %rax
jne 0x4f722
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movl $0x23, %edx
callq 0x4f7e8
movq (%r14), %rax
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x232a0
leaq 0x8(%rsp), %rdi
callq 0x22380
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movl $0x3f, %edx
callq 0x4f7e8
movq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x1b4c0
leaq 0x8(%rsp), %rdi
callq 0x22380
leaq 0x68(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movl $0x2f, %edx
callq 0x4f7e8
movq 0x70(%rsp), %rsi
addq $-0x20, %rsi
leaq 0x8(%rsp), %rdi
callq 0x74e2e
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1bab0
movq (%r14), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4f504
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8e0
leaq 0x68(%rsp), %rdi
callq 0x22380
jmp 0x4f70b
testq %rax, %rax
jne 0x4f722
movq %rbx, %rdi
movq %r9, %rsi
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1b4c0
leaq 0x28(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r8, %rdx
callq 0x76566
cmpq $0x0, 0x8(%r12)
je 0x4f731
cmpq $0x0, 0x50(%rsp)
je 0x4f731
leaq 0x28(%rsp), %rsi
movq %r15, %rdi
callq 0x1b4c0
leaq 0x48(%rsp), %rsi
movq %r14, %rdi
callq 0x1b4c0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4f595
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x1b8e0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4f5b0
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1b8e0
cmpq $0x0, 0x8(%rbx)
jne 0x4f722
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x232a0
leaq 0xa33b7(%rip), %rsi # 0xf299a
movq %r15, %rdi
callq 0x1c0e0
movq (%r14), %rsi
movq 0x8(%r14), %rdx
leaq 0x8(%rsp), %rdi
callq 0x1b270
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4f623
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x4f62a
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4f659
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8e0
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
leaq 0xa8701(%rip), %rsi # 0xf7d69
leaq 0xa86fb(%rip), %rdx # 0xf7d6a
callq 0x233d6
leaq 0x78(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0xa3316(%rip), %rsi # 0xf299a
leaq 0xa3310(%rip), %rdx # 0xf299b
leaq 0x68(%rsp), %rdi
callq 0x233d6
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x68(%rsp), %rdx
callq 0x730fc
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x4f6c0
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x1b8e0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4f6d7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8e0
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x74e2e
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1bab0
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x4f70b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8e0
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x4f722
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1b8e0
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl $0x1, %edi
callq 0x1ba80
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
jmp 0x4f74f
jmp 0x4f7b0
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x22380
jmp 0x4f7b3
jmp 0x4f7b0
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x22380
jmp 0x4f7e0
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x56852
jmp 0x4f7e0
jmp 0x4f7b0
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x4f797
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x1b8e0
jmp 0x4f797
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4f7b3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8e0
jmp 0x4f7b3
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x4f7e0
movq 0x38(%rsp), %rsi
jmp 0x4f7d8
jmp 0x4f7c6
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4f7e0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8e0
movq %rbx, %rdi
callq 0x1bf90
| _ZL34common_params_handle_model_defaultRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS4_S5_S5_S7_S7_:
push r15
push r14
push r12
push rbx
sub rsp, 88h
mov rbx, rdi
cmp qword ptr [rdx+8], 0
jz short loc_4F432
mov r14, rcx
mov r15, rdx
cmp qword ptr [rcx+8], 0
jnz loc_4F5B0
cmp qword ptr [rbx+8], 0
jz loc_4F535
mov rdi, r14
mov rsi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
jmp loc_4F5B0
loc_4F432:
cmp qword ptr [rsi+8], 0
mov rax, [rbx+8]
jz loc_4F513
test rax, rax
jnz loc_4F722
lea r14, [rsp+0A8h+var_A0]
mov rdi, r14; int
mov edx, 23h ; '#'; int
call _ZL12string_splitINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorIT_SaIS7_EERKS5_c; string_split<std::string>(std::string const&,char)
mov rax, [r14]
lea r15, [rsp+0A8h+var_70]
mov [r15-10h], r15
mov rsi, [rax]
mov rdx, [rax+8]
add rdx, rsi
lea rdi, [rsp+0A8h+var_80]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rdi, [rsp+0A8h+var_A0]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rsp+0A8h+var_A0]; int
lea rsi, [rsp+0A8h+var_80]; int
mov edx, 3Fh ; '?'; int
call _ZL12string_splitINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorIT_SaIS7_EERKS5_c; string_split<std::string>(std::string const&,char)
mov rsi, [rsp+0A8h+var_A0]
lea rdi, [rsp+0A8h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
lea rdi, [rsp+0A8h+var_A0]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rsp+0A8h+var_40]; int
lea rsi, [rsp+0A8h+var_80]; int
mov edx, 2Fh ; '/'; int
call _ZL12string_splitINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorIT_SaIS7_EERKS5_c; string_split<std::string>(std::string const&,char)
mov rsi, [rsp+0A8h+var_38]
add rsi, 0FFFFFFFFFFFFFFE0h
lea rdi, [rsp+0A8h+var_A0]
call _Z17fs_get_cache_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; fs_get_cache_file(std::string const&)
lea r14, [rsp+0A8h+var_A0]
mov rdi, rbx
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r14]; void *
lea rax, [rsp+0A8h+var_90]
cmp rdi, rax
jz short loc_4F504
mov rsi, [rsp+0A8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4F504:
lea rdi, [rsp+0A8h+var_40]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
jmp loc_4F70B
loc_4F513:
test rax, rax
jnz loc_4F722
mov rdi, rbx
mov rsi, r9
add rsp, 88h
pop rbx
pop r12
pop r14
pop r15
jmp __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
loc_4F535:
lea r12, [rsp+0A8h+var_80]
mov rdi, r12
mov rsi, r15
mov rdx, r8
call _Z18common_get_hf_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_; common_get_hf_file(std::string const&,std::string const&)
cmp qword ptr [r12+8], 0
jz loc_4F731
cmp [rsp+0A8h+var_58], 0
jz loc_4F731
lea rsi, [rsp+0A8h+var_80]
mov rdi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
lea rsi, [rsp+0A8h+var_60]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
lea rax, [rsp+0A8h+var_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_4F595
mov rsi, [rsp+0A8h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4F595:
lea rax, [rsp+0A8h+var_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_4F5B0
mov rsi, [rsp+0A8h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4F5B0:
cmp qword ptr [rbx+8], 0
jnz loc_4F722
lea r12, [rsp+0A8h+var_90]
mov [r12-10h], r12
mov rsi, [r15]
mov rdx, [r15+8]
add rdx, rsi
lea r15, [rsp+0A8h+var_A0]
mov rdi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rsi, aCall911+8; "_"
mov rdi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov rsi, [r14]
mov rdx, [r14+8]
lea rdi, [rsp+0A8h+var_A0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
lea r15, [rsp+0A8h+var_70]
mov [r15-10h], r15
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_4F623
mov [rsp+0A8h+var_80], rdx
mov rdx, [rcx]
mov [rsp+0A8h+var_70], rdx
jmp short loc_4F62A
loc_4F623:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r15], xmm0
loc_4F62A:
mov rdx, [rax+8]
mov [rsp+0A8h+var_78], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rdi, [rsp+0A8h+var_A0]; void *
cmp rdi, r12
jz short loc_4F659
mov rsi, [rsp+0A8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4F659:
lea rdi, [rsp+0A8h+var_A0]
mov [rdi], r12
lea rsi, asc_F7D68+1; "/"
lea rdx, asc_F7D68+2; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea r14, [rsp+0A8h+var_30]
mov [r14-10h], r14
lea rsi, aCall911+8; "_"
lea rdx, aCall911+9; ""
lea rdi, [rsp+0A8h+var_40]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdi, [rsp+0A8h+var_80]; int
lea rsi, [rsp+0A8h+var_A0]; int
lea rdx, [rsp+0A8h+var_40]; int
call _Z18string_replace_allRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS4_S7_; string_replace_all(std::string &,std::string const&,std::string const&)
mov rdi, [rsp+0A8h+var_40]; void *
cmp rdi, r14
jz short loc_4F6C0
mov rsi, [rsp+0A8h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4F6C0:
mov rdi, [rsp+0A8h+var_A0]; void *
cmp rdi, r12
jz short loc_4F6D7
mov rsi, [rsp+0A8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4F6D7:
lea rdi, [rsp+0A8h+var_A0]
lea rsi, [rsp+0A8h+var_80]
call _Z17fs_get_cache_fileRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; fs_get_cache_file(std::string const&)
lea r14, [rsp+0A8h+var_A0]
mov rdi, rbx
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r14]; void *
cmp rdi, r12
jz short loc_4F70B
mov rsi, [rsp+0A8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4F70B:
mov rdi, [rsp+0A8h+var_80]; void *
cmp rdi, r15
jz short loc_4F722
mov rsi, [rsp+0A8h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4F722:
add rsp, 88h
pop rbx
pop r12
pop r14
pop r15
retn
loc_4F731:
mov edi, 1
call _exit
mov rbx, rax
lea rdi, [rsp+0A8h+var_40]
jmp short loc_4F74F
jmp short loc_4F7B0
mov rbx, rax
lea rdi, [rsp+0A8h+var_A0]
loc_4F74F:
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
jmp short loc_4F7B3
jmp short loc_4F7B0
mov rbx, rax
lea rdi, [rsp+0A8h+var_A0]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
jmp short loc_4F7E0
mov rbx, rax
lea rdi, [rsp+0A8h+var_80]
call _ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ED2Ev; std::pair<std::string,std::string>::~pair()
jmp short loc_4F7E0
jmp short loc_4F7B0
mov rbx, rax
mov rdi, [rsp+0A8h+var_40]; void *
cmp rdi, r14
jz short loc_4F797
mov rsi, [rsp+0A8h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_4F797
mov rbx, rax
loc_4F797:
mov rdi, [rsp+0A8h+var_A0]; void *
cmp rdi, r12
jz short loc_4F7B3
mov rsi, [rsp+0A8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_4F7B3
loc_4F7B0:
mov rbx, rax
loc_4F7B3:
mov rdi, [rsp+0A8h+var_80]
cmp rdi, r15
jz short loc_4F7E0
mov rsi, [rsp+0A8h+var_70]
jmp short loc_4F7D8
jmp short $+2
loc_4F7C6:
mov rbx, rax
mov rdi, [rsp+0A8h+var_A0]; void *
cmp rdi, r12
jz short loc_4F7E0
mov rsi, [rsp+0A8h+var_90]
loc_4F7D8:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4F7E0:
mov rdi, rbx
call __Unwind_Resume
| void common_params_handle_model_default(
long long a1,
long long a2,
long long a3,
_QWORD *a4,
long long a5,
long long a6)
{
long long v8; // rax
int v9; // ecx
int v10; // r8d
int v11; // r9d
int v12; // ecx
int v13; // r8d
int v14; // r9d
long long v15; // rax
__int128 *v16; // rcx
int v17; // ecx
int v18; // r8d
int v19; // r9d
void *v20; // [rsp+0h] [rbp-A8h]
void *v21; // [rsp+0h] [rbp-A8h]
void *v22; // [rsp+0h] [rbp-A8h]
void *v23; // [rsp+8h] [rbp-A0h] BYREF
long long v24; // [rsp+10h] [rbp-98h]
_QWORD v25[2]; // [rsp+18h] [rbp-90h] BYREF
void *v26; // [rsp+28h] [rbp-80h] BYREF
long long v27; // [rsp+30h] [rbp-78h]
__int128 v28; // [rsp+38h] [rbp-70h] BYREF
void *v29[2]; // [rsp+48h] [rbp-60h] BYREF
long long v30; // [rsp+58h] [rbp-50h] BYREF
void *v31[2]; // [rsp+68h] [rbp-40h] BYREF
_QWORD v32[6]; // [rsp+78h] [rbp-30h] BYREF
if ( *(_QWORD *)(a3 + 8) )
{
if ( !a4[1] )
{
if ( *(_QWORD *)(a1 + 8) )
{
std::string::_M_assign(a4, a1);
}
else
{
common_get_hf_file(&v26, a3, a5);
if ( !v27 || !v29[1] )
exit(1LL);
std::string::_M_assign(a3, &v26);
std::string::_M_assign(a4, v29);
if ( v29[0] != &v30 )
operator delete(v29[0], v30 + 1);
if ( v26 != &v28 )
operator delete(v26, v28 + 1);
}
}
if ( !*(_QWORD *)(a1 + 8) )
{
v23 = v25;
std::string::_M_construct<char *>(&v23, *(_BYTE **)a3, *(_QWORD *)a3 + *(_QWORD *)(a3 + 8));
std::string::append(&v23, "_");
v15 = std::string::_M_append(&v23, *a4, a4[1]);
v26 = &v28;
v16 = (__int128 *)(v15 + 16);
if ( *(_QWORD *)v15 == v15 + 16 )
{
v28 = *v16;
}
else
{
v26 = *(void **)v15;
*(_QWORD *)&v28 = *(_QWORD *)v16;
}
v27 = *(_QWORD *)(v15 + 8);
*(_QWORD *)v15 = v16;
*(_QWORD *)(v15 + 8) = 0LL;
*(_BYTE *)(v15 + 16) = 0;
if ( v23 != v25 )
operator delete(v23, v25[0] + 1LL);
v23 = v25;
std::string::_M_construct<char const*>(&v23, "/", (long long)"");
v31[0] = v32;
std::string::_M_construct<char const*>(v31, "_", (long long)"");
string_replace_all((int)&v26, (int)&v23, (int)v31, v17, v18, v19, v20, (int)v23, v24);
if ( v31[0] != v32 )
operator delete(v31[0], v32[0] + 1LL);
if ( v23 != v25 )
operator delete(v23, v25[0] + 1LL);
fs_get_cache_file(&v23, &v26);
std::string::operator=(a1, &v23);
if ( v23 != v25 )
operator delete(v23, v25[0] + 1LL);
LABEL_30:
if ( v26 != &v28 )
operator delete(v26, v28 + 1);
}
}
else
{
v8 = *(_QWORD *)(a1 + 8);
if ( *(_QWORD *)(a2 + 8) )
{
if ( v8 )
return;
string_split<std::string>((int)&v23, a2, 35, (int)a4, a5, a6, v20, (int)v23, v24);
v26 = &v28;
std::string::_M_construct<char *>(&v26, *(_BYTE **)v23, *(_QWORD *)v23 + *((_QWORD *)v23 + 1));
std::vector<std::string>::~vector(&v23);
string_split<std::string>((int)&v23, (int)&v26, 63, v9, v10, v11, v21, (int)v23, v24);
std::string::_M_assign(&v26, v23);
std::vector<std::string>::~vector(&v23);
string_split<std::string>((int)v31, (int)&v26, 47, v12, v13, v14, v22, (int)v23, v24);
fs_get_cache_file(&v23, (char *)v31[1] - 32);
std::string::operator=(a1, &v23);
if ( v23 != v25 )
operator delete(v23, v25[0] + 1LL);
std::vector<std::string>::~vector(v31);
goto LABEL_30;
}
if ( !v8 )
std::string::_M_assign(a1, a6);
}
}
| common_params_handle_model_default:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV RBX,RDI
CMP qword ptr [RDX + 0x8],0x0
JZ 0x0014f432
MOV R14,RCX
MOV R15,RDX
CMP qword ptr [RCX + 0x8],0x0
JNZ 0x0014f5b0
CMP qword ptr [RBX + 0x8],0x0
JZ 0x0014f535
MOV RDI,R14
MOV RSI,RBX
CALL 0x0011b4c0
JMP 0x0014f5b0
LAB_0014f432:
CMP qword ptr [RSI + 0x8],0x0
MOV RAX,qword ptr [RBX + 0x8]
JZ 0x0014f513
TEST RAX,RAX
JNZ 0x0014f722
LEA R14,[RSP + 0x8]
MOV RDI,R14
MOV EDX,0x23
CALL 0x0014f7e8
MOV RAX,qword ptr [R14]
LEA R15,[RSP + 0x38]
MOV qword ptr [R15 + -0x10],R15
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
ADD RDX,RSI
LAB_0014f472:
LEA RDI,[RSP + 0x28]
CALL 0x001232a0
LEA RDI,[RSP + 0x8]
CALL 0x00122380
LAB_0014f486:
LEA RDI,[RSP + 0x8]
LEA RSI,[RSP + 0x28]
MOV EDX,0x3f
CALL 0x0014f7e8
MOV RSI,qword ptr [RSP + 0x8]
LAB_0014f49f:
LEA RDI,[RSP + 0x28]
CALL 0x0011b4c0
LEA RDI,[RSP + 0x8]
CALL 0x00122380
LAB_0014f4b3:
LEA RDI,[RSP + 0x68]
LEA RSI,[RSP + 0x28]
MOV EDX,0x2f
CALL 0x0014f7e8
MOV RSI,qword ptr [RSP + 0x70]
ADD RSI,-0x20
LAB_0014f4d0:
LEA RDI,[RSP + 0x8]
CALL 0x00174e2e
LAB_0014f4da:
LEA R14,[RSP + 0x8]
MOV RDI,RBX
MOV RSI,R14
CALL 0x0011bab0
MOV RDI,qword ptr [R14]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x0014f504
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011b8e0
LAB_0014f504:
LEA RDI,[RSP + 0x68]
CALL 0x00122380
JMP 0x0014f70b
LAB_0014f513:
TEST RAX,RAX
JNZ 0x0014f722
MOV RDI,RBX
MOV RSI,R9
ADD RSP,0x88
POP RBX
POP R12
POP R14
POP R15
JMP 0x0011b4c0
LAB_0014f535:
LEA R12,[RSP + 0x28]
MOV RDI,R12
MOV RSI,R15
MOV RDX,R8
CALL 0x00176566
CMP qword ptr [R12 + 0x8],0x0
JZ 0x0014f731
CMP qword ptr [RSP + 0x50],0x0
JZ 0x0014f731
LAB_0014f560:
LEA RSI,[RSP + 0x28]
MOV RDI,R15
CALL 0x0011b4c0
LEA RSI,[RSP + 0x48]
MOV RDI,R14
CALL 0x0011b4c0
LAB_0014f57a:
LEA RAX,[RSP + 0x58]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0014f595
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x0011b8e0
LAB_0014f595:
LEA RAX,[RSP + 0x38]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0014f5b0
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x0011b8e0
LAB_0014f5b0:
CMP qword ptr [RBX + 0x8],0x0
JNZ 0x0014f722
LEA R12,[RSP + 0x18]
MOV qword ptr [R12 + -0x10],R12
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
ADD RDX,RSI
LEA R15,[RSP + 0x8]
MOV RDI,R15
CALL 0x001232a0
LAB_0014f5dc:
LEA RSI,[0x1f299a]
MOV RDI,R15
CALL 0x0011c0e0
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
LAB_0014f5f2:
LEA RDI,[RSP + 0x8]
CALL 0x0011b270
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 0x0014f623
MOV qword ptr [RSP + 0x28],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x38],RDX
JMP 0x0014f62a
LAB_0014f623:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R15],XMM0
LAB_0014f62a:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x0014f659
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011b8e0
LAB_0014f659:
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],R12
LAB_0014f661:
LEA RSI,[0x1f7d69]
LEA RDX,[0x1f7d6a]
CALL 0x001233d6
LEA R14,[RSP + 0x78]
MOV qword ptr [R14 + -0x10],R14
LAB_0014f67d:
LEA RSI,[0x1f299a]
LEA RDX,[0x1f299b]
LEA RDI,[RSP + 0x68]
CALL 0x001233d6
LAB_0014f695:
LEA RDI,[RSP + 0x28]
LEA RSI,[RSP + 0x8]
LEA RDX,[RSP + 0x68]
CALL 0x001730fc
MOV RDI,qword ptr [RSP + 0x68]
CMP RDI,R14
JZ 0x0014f6c0
MOV RSI,qword ptr [RSP + 0x78]
INC RSI
CALL 0x0011b8e0
LAB_0014f6c0:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x0014f6d7
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011b8e0
LAB_0014f6d7:
LEA RDI,[RSP + 0x8]
LEA RSI,[RSP + 0x28]
CALL 0x00174e2e
LAB_0014f6e6:
LEA R14,[RSP + 0x8]
MOV RDI,RBX
MOV RSI,R14
CALL 0x0011bab0
MOV RDI,qword ptr [R14]
CMP RDI,R12
JZ 0x0014f70b
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011b8e0
LAB_0014f70b:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R15
JZ 0x0014f722
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x0011b8e0
LAB_0014f722:
ADD RSP,0x88
POP RBX
POP R12
POP R14
POP R15
RET
LAB_0014f731:
MOV EDI,0x1
CALL 0x0011ba80
|
/* common_params_handle_model_default(std::__cxx11::string&, std::__cxx11::string const&,
std::__cxx11::string&, std::__cxx11::string&, std::__cxx11::string const&, std::__cxx11::string
const&) */
void common_params_handle_model_default
(string *param_1,string *param_2,string *param_3,string *param_4,string *param_5,
string *param_6)
{
long *plVar1;
long *plVar2;
long *local_a0 [2];
long local_90 [2];
long *local_80;
long local_78;
long local_70;
long lStack_68;
long *local_60;
long local_58;
long local_50 [2];
long *local_40 [2];
long local_30 [2];
if (*(long *)(param_3 + 8) == 0) {
if (*(long *)(param_2 + 8) == 0) {
if (*(long *)(param_1 + 8) != 0) {
return;
}
std::__cxx11::string::_M_assign(param_1);
return;
}
if (*(long *)(param_1 + 8) != 0) {
return;
}
string_split<std::__cxx11::string>((string *)local_a0,(char)param_2);
local_80 = &local_70;
/* try { // try from 0014f472 to 0014f47b has its CatchHandler @ 0014f758 */
std::__cxx11::string::_M_construct<char*>(&local_80,*local_a0[0],local_a0[0][1] + *local_a0[0]);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_a0);
/* try { // try from 0014f486 to 0014f499 has its CatchHandler @ 0014f756 */
string_split<std::__cxx11::string>((string *)local_a0,(char)&local_80);
/* try { // try from 0014f49f to 0014f4a8 has its CatchHandler @ 0014f747 */
std::__cxx11::string::_M_assign((string *)&local_80);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_a0);
/* try { // try from 0014f4b3 to 0014f4c6 has its CatchHandler @ 0014f745 */
string_split<std::__cxx11::string>((string *)local_40,(char)&local_80);
/* try { // try from 0014f4d0 to 0014f4d9 has its CatchHandler @ 0014f73b */
fs_get_cache_file((string *)local_a0);
std::__cxx11::string::operator=(param_1,(string *)local_a0);
if (local_a0[0] != local_90) {
operator_delete(local_a0[0],local_90[0] + 1);
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_40);
}
else {
if (*(long *)(param_4 + 8) == 0) {
if (*(long *)(param_1 + 8) == 0) {
common_get_hf_file((string *)&local_80,param_3);
if ((local_78 == 0) || (local_58 == 0)) {
/* WARNING: Subroutine does not return */
exit(1);
}
/* try { // try from 0014f560 to 0014f579 has its CatchHandler @ 0014f767 */
std::__cxx11::string::_M_assign(param_3);
std::__cxx11::string::_M_assign(param_4);
if (local_60 != local_50) {
operator_delete(local_60,local_50[0] + 1);
}
if (local_80 != &local_70) {
operator_delete(local_80,local_70 + 1);
}
}
else {
std::__cxx11::string::_M_assign(param_4);
}
}
if (*(long *)(param_1 + 8) != 0) {
return;
}
local_a0[0] = local_90;
std::__cxx11::string::_M_construct<char*>
(local_a0,*(long *)param_3,*(long *)(param_3 + 8) + *(long *)param_3);
/* try { // try from 0014f5dc to 0014f5ea has its CatchHandler @ 0014f7c6 */
std::__cxx11::string::append((char *)local_a0);
/* try { // try from 0014f5f2 to 0014f5fb has its CatchHandler @ 0014f7c4 */
plVar1 = (long *)std::__cxx11::string::_M_append((char *)local_a0,*(ulong *)param_4);
local_80 = &local_70;
plVar2 = plVar1 + 2;
if ((long *)*plVar1 == plVar2) {
local_70 = *plVar2;
lStack_68 = plVar1[3];
}
else {
local_70 = *plVar2;
local_80 = (long *)*plVar1;
}
local_78 = plVar1[1];
*plVar1 = (long)plVar2;
plVar1[1] = 0;
*(int1 *)(plVar1 + 2) = 0;
if (local_a0[0] != local_90) {
operator_delete(local_a0[0],local_90[0] + 1);
}
local_a0[0] = local_90;
/* try { // try from 0014f661 to 0014f673 has its CatchHandler @ 0014f7b0 */
std::__cxx11::string::_M_construct<char_const*>(local_a0,&DAT_001f7d69,&DAT_001f7d6a);
/* try { // try from 0014f67d to 0014f694 has its CatchHandler @ 0014f794 */
local_40[0] = local_30;
std::__cxx11::string::_M_construct<char_const*>(local_40,&DAT_001f299a,&DAT_001f299b);
/* try { // try from 0014f695 to 0014f6a8 has its CatchHandler @ 0014f778 */
string_replace_all((string *)&local_80,(string *)local_a0,(string *)local_40);
if (local_40[0] != local_30) {
operator_delete(local_40[0],local_30[0] + 1);
}
if (local_a0[0] != local_90) {
operator_delete(local_a0[0],local_90[0] + 1);
}
/* try { // try from 0014f6d7 to 0014f6e5 has its CatchHandler @ 0014f776 */
fs_get_cache_file((string *)local_a0);
std::__cxx11::string::operator=(param_1,(string *)local_a0);
if (local_a0[0] != local_90) {
operator_delete(local_a0[0],local_90[0] + 1);
}
}
if (local_80 != &local_70) {
operator_delete(local_80,local_70 + 1);
}
return;
}
| |
27,350 | r3d_framebuffers_unload | r3d/src/r3d_state.c | void r3d_framebuffers_unload(void)
{
r3d_framebuffer_unload_gbuffer();
r3d_framebuffer_unload_deferred();
r3d_framebuffer_unload_scene();
r3d_framebuffer_unload_post();
if (R3D.framebuffer.pingPongSSAO.id != 0) {
r3d_framebuffer_unload_pingpong_ssao();
}
if (R3D.framebuffer.pingPongBloom.id != 0) {
r3d_framebuffer_unload_pingpong_bloom();
}
} | O3 | c | r3d_framebuffers_unload:
pushq %rbp
movq %rsp, %rbp
callq 0xc03c6
callq 0xc0423
callq 0xc045f
callq 0xc049b
cmpl $0x0, 0xef85e(%rip) # 0x1afc0c
je 0xc03b5
callq 0xc04d7
cmpl $0x0, 0xef874(%rip) # 0x1afc30
je 0xc03c4
popq %rbp
jmp 0xc0513
popq %rbp
retq
| r3d_framebuffers_unload:
push rbp
mov rbp, rsp
call r3d_framebuffer_unload_gbuffer
call r3d_framebuffer_unload_deferred
call r3d_framebuffer_unload_scene
call r3d_framebuffer_unload_post
cmp dword ptr cs:qword_1AFC0C, 0
jz short loc_C03B5
call r3d_framebuffer_unload_pingpong_ssao
loc_C03B5:
cmp dword ptr cs:qword_1AFC30, 0
jz short loc_C03C4
pop rbp
jmp r3d_framebuffer_unload_pingpong_bloom
loc_C03C4:
pop rbp
retn
| long long r3d_framebuffers_unload()
{
long long result; // rax
r3d_framebuffer_unload_gbuffer();
r3d_framebuffer_unload_deferred();
r3d_framebuffer_unload_scene();
result = r3d_framebuffer_unload_post();
if ( (_DWORD)qword_1AFC0C )
result = r3d_framebuffer_unload_pingpong_ssao();
if ( (_DWORD)qword_1AFC30 )
return r3d_framebuffer_unload_pingpong_bloom();
return result;
}
| r3d_framebuffers_unload:
PUSH RBP
MOV RBP,RSP
CALL 0x001c03c6
CALL 0x001c0423
CALL 0x001c045f
CALL 0x001c049b
CMP dword ptr [0x002afc0c],0x0
JZ 0x001c03b5
CALL 0x001c04d7
LAB_001c03b5:
CMP dword ptr [0x002afc30],0x0
JZ 0x001c03c4
POP RBP
JMP 0x001c0513
LAB_001c03c4:
POP RBP
RET
|
void r3d_framebuffers_unload(void)
{
r3d_framebuffer_unload_gbuffer();
r3d_framebuffer_unload_deferred();
r3d_framebuffer_unload_scene();
r3d_framebuffer_unload_post();
if (DAT_002afc0c != 0) {
r3d_framebuffer_unload_pingpong_ssao();
}
if (DAT_002afc30 != 0) {
r3d_framebuffer_unload_pingpong_bloom();
return;
}
return;
}
| |
27,351 | int10_to_str | eloqsql/strings/int2str.c | char *int10_to_str(long int val,char *dst,int radix)
{
char buffer[65];
register char *p;
long int new_val;
unsigned long int uval = (unsigned long int) val;
if (radix < 0) /* -10 */
{
if (val < 0)
{
*dst++ = '-';
/* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */
uval = (unsigned long int)0 - uval;
}
}
p = &buffer[sizeof(buffer)-1];
*p = '\0';
new_val= (long) (uval / 10);
*--p = '0'+ (char) (uval - (unsigned long) new_val * 10);
val = new_val;
while (val != 0)
{
new_val=val/10;
*--p = '0' + (char) (val-new_val*10);
val= new_val;
}
while ((*dst++ = *p++) != 0) ;
return dst-1;
} | O0 | c | int10_to_str:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x58(%rbp)
movq %rsi, -0x60(%rbp)
movl %edx, -0x64(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x80(%rbp)
cmpl $0x0, -0x64(%rbp)
jge 0x14a576
cmpq $0x0, -0x58(%rbp)
jge 0x14a574
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb $0x2d, (%rax)
xorl %eax, %eax
subq -0x80(%rbp), %rax
movq %rax, -0x80(%rbp)
jmp 0x14a576
leaq -0x50(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movb $0x0, (%rax)
movq -0x80(%rbp), %rax
movl $0xa, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0x78(%rbp)
movq -0x80(%rbp), %rax
imulq $0xa, -0x78(%rbp), %rcx
subq %rcx, %rax
movsbl %al, %eax
addl $0x30, %eax
movb %al, %cl
movq -0x70(%rbp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x70(%rbp)
movb %cl, -0x1(%rax)
movq -0x78(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
je 0x14a612
movq -0x58(%rbp), %rax
movl $0xa, %ecx
cqto
idivq %rcx
movq %rax, -0x78(%rbp)
movq -0x58(%rbp), %rax
imulq $0xa, -0x78(%rbp), %rcx
subq %rcx, %rax
movsbl %al, %eax
addl $0x30, %eax
movb %al, %cl
movq -0x70(%rbp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x70(%rbp)
movb %cl, -0x1(%rax)
movq -0x78(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x14a5c9
jmp 0x14a614
movq -0x70(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x70(%rbp)
movb (%rax), %al
movq -0x60(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x60(%rbp)
movb %al, (%rcx)
movsbl %al, %eax
cmpl $0x0, %eax
je 0x14a640
jmp 0x14a614
movq -0x60(%rbp), %rax
decq %rax
movq %rax, -0x88(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x14a670
movq -0x88(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
callq 0x2a270
nopw %cs:(%rax,%rax)
nop
| int10_to_str:
push rbp
mov rbp, rsp
sub rsp, 90h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_58], rdi
mov [rbp+var_60], rsi
mov [rbp+var_64], edx
mov rax, [rbp+var_58]
mov [rbp+var_80], rax
cmp [rbp+var_64], 0
jge short loc_14A576
cmp [rbp+var_58], 0
jge short loc_14A574
mov rax, [rbp+var_60]
mov rcx, rax
add rcx, 1
mov [rbp+var_60], rcx
mov byte ptr [rax], 2Dh ; '-'
xor eax, eax
sub rax, [rbp+var_80]
mov [rbp+var_80], rax
loc_14A574:
jmp short $+2
loc_14A576:
lea rax, [rbp+var_50]
add rax, 40h ; '@'
mov [rbp+var_70], rax
mov rax, [rbp+var_70]
mov byte ptr [rax], 0
mov rax, [rbp+var_80]
mov ecx, 0Ah
xor edx, edx
div rcx
mov [rbp+var_78], rax
mov rax, [rbp+var_80]
imul rcx, [rbp+var_78], 0Ah
sub rax, rcx
movsx eax, al
add eax, 30h ; '0'
mov cl, al
mov rax, [rbp+var_70]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_70], rdx
mov [rax-1], cl
mov rax, [rbp+var_78]
mov [rbp+var_58], rax
loc_14A5C9:
cmp [rbp+var_58], 0
jz short loc_14A612
mov rax, [rbp+var_58]
mov ecx, 0Ah
cqo
idiv rcx
mov [rbp+var_78], rax
mov rax, [rbp+var_58]
imul rcx, [rbp+var_78], 0Ah
sub rax, rcx
movsx eax, al
add eax, 30h ; '0'
mov cl, al
mov rax, [rbp+var_70]
mov rdx, rax
add rdx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_70], rdx
mov [rax-1], cl
mov rax, [rbp+var_78]
mov [rbp+var_58], rax
jmp short loc_14A5C9
loc_14A612:
jmp short $+2
loc_14A614:
mov rax, [rbp+var_70]
mov rcx, rax
add rcx, 1
mov [rbp+var_70], rcx
mov al, [rax]
mov rcx, [rbp+var_60]
mov rdx, rcx
add rdx, 1
mov [rbp+var_60], rdx
mov [rcx], al
movsx eax, al
cmp eax, 0
jz short loc_14A640
jmp short loc_14A614
loc_14A640:
mov rax, [rbp+var_60]
dec rax
mov [rbp+var_88], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_14A670
mov rax, [rbp+var_88]
add rsp, 90h
pop rbp
retn
loc_14A670:
call ___stack_chk_fail
| _BYTE * int10_to_str(long long a1, _BYTE *a2, int a3)
{
_BYTE *v3; // rax
_BYTE *v4; // rax
_BYTE *v5; // rcx
unsigned long long v7; // [rsp+10h] [rbp-80h]
_BYTE *v8; // [rsp+20h] [rbp-70h]
_BYTE *v9; // [rsp+30h] [rbp-60h]
signed long long i; // [rsp+38h] [rbp-58h]
_BYTE v11[9]; // [rsp+7Fh] [rbp-11h] BYREF
unsigned long long v12; // [rsp+88h] [rbp-8h]
v12 = __readfsqword(0x28u);
v9 = a2;
v7 = a1;
if ( a3 < 0 && a1 < 0 )
{
v9 = a2 + 1;
*a2 = 45;
v7 = -a1;
}
v11[1] = 0;
v8 = v11;
v11[0] = v7 % 0xA + 48;
for ( i = v7 / 0xA; i; i /= 10LL )
{
v3 = v8--;
*(v3 - 1) = i % 10 + 48;
}
do
{
v4 = v8++;
LOBYTE(v4) = *v4;
v5 = v9++;
*v5 = (_BYTE)v4;
}
while ( (_BYTE)v4 );
return v9 - 1;
}
| inline_mysql_file_create_with_symlink:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV RAX,qword ptr [RBP + 0x18]
MOV EAX,dword 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 qword ptr [RBP + -0x28],R8
MOV dword ptr [RBP + -0x2c],R9D
LEA RAX,[0x3c00b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x148]
MOV ESI,dword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x28]
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 0x0014a5ea
LEA RAX,[0x3c00b8]
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 RSI,qword ptr [RBP + -0x28]
MOV EDX,dword ptr [RBP + -0x2c]
MOV ECX,dword ptr [RBP + 0x10]
MOV R8,qword ptr [RBP + 0x18]
CALL 0x001f5430
MOV dword ptr [RBP + -0x30],EAX
LEA RAX,[0x3c00b8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x200]
MOV RDI,qword ptr [RBP + -0x38]
MOV ESI,dword ptr [RBP + -0x30]
CALL RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0014a60a
LAB_0014a5ea:
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x28]
MOV EDX,dword ptr [RBP + -0x2c]
MOV ECX,dword ptr [RBP + 0x10]
MOV R8,qword ptr [RBP + 0x18]
CALL 0x001f5430
MOV dword ptr [RBP + -0x30],EAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x4],EAX
LAB_0014a60a:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x80
POP RBP
RET
|
int4
inline_mysql_file_create_with_symlink
(int4 param_1,int8 param_2,int4 param_3,int8 param_4,
int8 param_5,int4 param_6,int4 param_7,int8 param_8)
{
int1 local_88 [72];
long local_40;
int4 local_38;
int4 local_34;
int8 local_30;
int8 local_28;
int4 local_1c;
int8 local_18;
int4 local_10;
int4 local_c;
local_34 = param_6;
local_30 = 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_5,&local_40);
if (local_40 == 0) {
local_c = my_create_with_symlink(local_28,local_30,local_34,param_7,param_8);
}
else {
(**(code **)(PSI_server + 0x1f0))(local_40,local_18,local_1c);
local_38 = my_create_with_symlink(local_28,local_30,local_34,param_7,param_8);
(**(code **)(PSI_server + 0x200))(local_40,local_38);
local_c = local_38;
}
return local_c;
}
| |
27,352 | minja::SliceExpr::SliceExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&) | monkey531[P]llama/common/minja.hpp | Expression(const Location & location) : location(location) {} | O1 | cpp | minja::SliceExpr::SliceExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&):
leaq 0x725b7(%rip), %rax # 0xed528
addq $0x10, %rax
movq %rax, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0x7afa2
movq 0x73ffd(%rip), %r9 # 0xeef90
cmpb $0x0, (%r9)
je 0x7af9e
incl 0x8(%rax)
jmp 0x7afa2
lock
incl 0x8(%rax)
movq 0x10(%rsi), %rax
movq %rax, 0x18(%rdi)
leaq 0x72b97(%rip), %rax # 0xedb48
addq $0x10, %rax
movq %rax, (%rdi)
xorl %eax, %eax
movq %rax, 0x28(%rdi)
movups (%rdx), %xmm0
movq %rax, 0x8(%rdx)
movups %xmm0, 0x20(%rdi)
movq %rax, (%rdx)
movq %rax, 0x38(%rdi)
movups (%rcx), %xmm0
movq %rax, 0x8(%rcx)
movups %xmm0, 0x30(%rdi)
movq %rax, (%rcx)
movl %r8d, 0x40(%rdi)
retq
nop
| _ZN5minja12BinaryOpExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_NS0_2OpE:
lea rax, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression
add rax, 10h
mov [rdi], rax
mov rax, [rsi]
mov [rdi+8], rax
mov rax, [rsi+8]
mov [rdi+10h], rax
test rax, rax
jz short loc_7AFA2
mov r9, cs:__libc_single_threaded_ptr
cmp byte ptr [r9], 0
jz short loc_7AF9E
inc dword ptr [rax+8]
jmp short loc_7AFA2
loc_7AF9E:
lock inc dword ptr [rax+8]
loc_7AFA2:
mov rax, [rsi+10h]
mov [rdi+18h], rax
lea rax, _ZTVN5minja12BinaryOpExprE; `vtable for'minja::BinaryOpExpr
add rax, 10h
mov [rdi], rax
xor eax, eax
mov [rdi+28h], rax
movups xmm0, xmmword ptr [rdx]
mov [rdx+8], rax
movups xmmword ptr [rdi+20h], xmm0
mov [rdx], rax
mov [rdi+38h], rax
movups xmm0, xmmword ptr [rcx]
mov [rcx+8], rax
movups xmmword ptr [rdi+30h], xmm0
mov [rcx], rax
mov [rdi+40h], r8d
retn
| long long minja::BinaryOpExpr::BinaryOpExpr(long long a1, _QWORD *a2, __int128 *a3, __int128 *a4, int a5)
{
long long v5; // rax
long long result; // rax
__int128 v7; // xmm0
__int128 v8; // xmm0
*(_QWORD *)a1 = &`vtable for'minja::Expression + 2;
*(_QWORD *)(a1 + 8) = *a2;
v5 = a2[1];
*(_QWORD *)(a1 + 16) = v5;
if ( v5 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v5 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v5 + 8));
}
*(_QWORD *)(a1 + 24) = a2[2];
*(_QWORD *)a1 = &`vtable for'minja::BinaryOpExpr + 2;
result = 0LL;
*(_QWORD *)(a1 + 40) = 0LL;
v7 = *a3;
*((_QWORD *)a3 + 1) = 0LL;
*(_OWORD *)(a1 + 32) = v7;
*(_QWORD *)a3 = 0LL;
*(_QWORD *)(a1 + 56) = 0LL;
v8 = *a4;
*((_QWORD *)a4 + 1) = 0LL;
*(_OWORD *)(a1 + 48) = v8;
*(_QWORD *)a4 = 0LL;
*(_DWORD *)(a1 + 64) = a5;
return result;
}
| BinaryOpExpr:
LEA RAX,[0x1ed528]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI + 0x8],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x10],RAX
TEST RAX,RAX
JZ 0x0017afa2
MOV R9,qword ptr [0x001eef90]
CMP byte ptr [R9],0x0
JZ 0x0017af9e
INC dword ptr [RAX + 0x8]
JMP 0x0017afa2
LAB_0017af9e:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0017afa2:
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RDI + 0x18],RAX
LEA RAX,[0x1edb48]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x28],RAX
MOVUPS XMM0,xmmword ptr [RDX]
MOV qword ptr [RDX + 0x8],RAX
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOV qword ptr [RDX],RAX
MOV qword ptr [RDI + 0x38],RAX
MOVUPS XMM0,xmmword ptr [RCX]
MOV qword ptr [RCX + 0x8],RAX
MOVUPS xmmword ptr [RDI + 0x30],XMM0
MOV qword ptr [RCX],RAX
MOV dword ptr [RDI + 0x40],R8D
RET
|
/* minja::BinaryOpExpr::BinaryOpExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&,
std::shared_ptr<minja::Expression>&&, minja::BinaryOpExpr::Op) */
void __thiscall
minja::BinaryOpExpr::BinaryOpExpr
(BinaryOpExpr *this,int8 *param_1,int8 *param_2,int8 *param_3,
int4 param_5)
{
long lVar1;
int8 uVar2;
*(int ***)this = &PTR___cxa_pure_virtual_001ed538;
*(int8 *)(this + 8) = *param_1;
lVar1 = param_1[1];
*(long *)(this + 0x10) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_001eef90 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x18) = param_1[2];
*(int ***)this = &PTR_do_evaluate_001edb58;
*(int8 *)(this + 0x28) = 0;
uVar2 = param_2[1];
param_2[1] = 0;
*(int8 *)(this + 0x20) = *param_2;
*(int8 *)(this + 0x28) = uVar2;
*param_2 = 0;
*(int8 *)(this + 0x38) = 0;
uVar2 = param_3[1];
param_3[1] = 0;
*(int8 *)(this + 0x30) = *param_3;
*(int8 *)(this + 0x38) = uVar2;
*param_3 = 0;
*(int4 *)(this + 0x40) = param_5;
return;
}
| |
27,353 | minja::SliceExpr::SliceExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&) | monkey531[P]llama/common/minja.hpp | Expression(const Location & location) : location(location) {} | O3 | cpp | minja::SliceExpr::SliceExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&):
leaq 0x6f1d7(%rip), %rax # 0xea528
addq $0x10, %rax
movq %rax, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0x7b382
movq 0x70c1d(%rip), %r9 # 0xebf90
cmpb $0x0, (%r9)
je 0x7b37e
incl 0x8(%rax)
jmp 0x7b382
lock
incl 0x8(%rax)
movq 0x10(%rsi), %rax
movq %rax, 0x18(%rdi)
leaq 0x6f8a7(%rip), %rax # 0xeac38
addq $0x10, %rax
movq %rax, (%rdi)
xorl %eax, %eax
movq %rax, 0x28(%rdi)
movups (%rdx), %xmm0
movq %rax, 0x8(%rdx)
movups %xmm0, 0x20(%rdi)
movq %rax, (%rdx)
movq %rax, 0x38(%rdi)
movups (%rcx), %xmm0
movq %rax, 0x8(%rcx)
movups %xmm0, 0x30(%rdi)
movq %rax, (%rcx)
movq %rax, 0x48(%rdi)
movups (%r8), %xmm0
movq %rax, 0x8(%r8)
movups %xmm0, 0x40(%rdi)
movq %rax, (%r8)
retq
| _ZN5minja6IfExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_S7_:
lea rax, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression
add rax, 10h
mov [rdi], rax
mov rax, [rsi]
mov [rdi+8], rax
mov rax, [rsi+8]
mov [rdi+10h], rax
test rax, rax
jz short loc_7B382
mov r9, cs:__libc_single_threaded_ptr
cmp byte ptr [r9], 0
jz short loc_7B37E
inc dword ptr [rax+8]
jmp short loc_7B382
loc_7B37E:
lock inc dword ptr [rax+8]
loc_7B382:
mov rax, [rsi+10h]
mov [rdi+18h], rax
lea rax, _ZTVN5minja6IfExprE; `vtable for'minja::IfExpr
add rax, 10h
mov [rdi], rax
xor eax, eax
mov [rdi+28h], rax
movups xmm0, xmmword ptr [rdx]
mov [rdx+8], rax
movups xmmword ptr [rdi+20h], xmm0
mov [rdx], rax
mov [rdi+38h], rax
movups xmm0, xmmword ptr [rcx]
mov [rcx+8], rax
movups xmmword ptr [rdi+30h], xmm0
mov [rcx], rax
mov [rdi+48h], rax
movups xmm0, xmmword ptr [r8]
mov [r8+8], rax
movups xmmword ptr [rdi+40h], xmm0
mov [r8], rax
retn
| long long minja::IfExpr::IfExpr(long long a1, _QWORD *a2, __int128 *a3, __int128 *a4, __int128 *a5)
{
long long v5; // rax
long long result; // rax
__int128 v7; // xmm0
__int128 v8; // xmm0
__int128 v9; // xmm0
*(_QWORD *)a1 = &`vtable for'minja::Expression + 2;
*(_QWORD *)(a1 + 8) = *a2;
v5 = a2[1];
*(_QWORD *)(a1 + 16) = v5;
if ( v5 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v5 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v5 + 8));
}
*(_QWORD *)(a1 + 24) = a2[2];
*(_QWORD *)a1 = &`vtable for'minja::IfExpr + 2;
result = 0LL;
*(_QWORD *)(a1 + 40) = 0LL;
v7 = *a3;
*((_QWORD *)a3 + 1) = 0LL;
*(_OWORD *)(a1 + 32) = v7;
*(_QWORD *)a3 = 0LL;
*(_QWORD *)(a1 + 56) = 0LL;
v8 = *a4;
*((_QWORD *)a4 + 1) = 0LL;
*(_OWORD *)(a1 + 48) = v8;
*(_QWORD *)a4 = 0LL;
*(_QWORD *)(a1 + 72) = 0LL;
v9 = *a5;
*((_QWORD *)a5 + 1) = 0LL;
*(_OWORD *)(a1 + 64) = v9;
*(_QWORD *)a5 = 0LL;
return result;
}
| IfExpr:
LEA RAX,[0x1ea528]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI + 0x8],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x10],RAX
TEST RAX,RAX
JZ 0x0017b382
MOV R9,qword ptr [0x001ebf90]
CMP byte ptr [R9],0x0
JZ 0x0017b37e
INC dword ptr [RAX + 0x8]
JMP 0x0017b382
LAB_0017b37e:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0017b382:
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RDI + 0x18],RAX
LEA RAX,[0x1eac38]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x28],RAX
MOVUPS XMM0,xmmword ptr [RDX]
MOV qword ptr [RDX + 0x8],RAX
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOV qword ptr [RDX],RAX
MOV qword ptr [RDI + 0x38],RAX
MOVUPS XMM0,xmmword ptr [RCX]
MOV qword ptr [RCX + 0x8],RAX
MOVUPS xmmword ptr [RDI + 0x30],XMM0
MOV qword ptr [RCX],RAX
MOV qword ptr [RDI + 0x48],RAX
MOVUPS XMM0,xmmword ptr [R8]
MOV qword ptr [R8 + 0x8],RAX
MOVUPS xmmword ptr [RDI + 0x40],XMM0
MOV qword ptr [R8],RAX
RET
|
/* minja::IfExpr::IfExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&,
std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&) */
void __thiscall
minja::IfExpr::IfExpr
(IfExpr *this,Location *param_1,shared_ptr *param_2,shared_ptr *param_3,
shared_ptr *param_4)
{
long lVar1;
int8 uVar2;
*(int ***)this = &PTR___cxa_pure_virtual_001ea538;
*(int8 *)(this + 8) = *(int8 *)param_1;
lVar1 = *(long *)(param_1 + 8);
*(long *)(this + 0x10) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_001ebf90 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10);
*(int ***)this = &PTR_do_evaluate_001eac48;
*(int8 *)(this + 0x28) = 0;
uVar2 = *(int8 *)(param_2 + 8);
*(int8 *)(param_2 + 8) = 0;
*(int8 *)(this + 0x20) = *(int8 *)param_2;
*(int8 *)(this + 0x28) = uVar2;
*(int8 *)param_2 = 0;
*(int8 *)(this + 0x38) = 0;
uVar2 = *(int8 *)(param_3 + 8);
*(int8 *)(param_3 + 8) = 0;
*(int8 *)(this + 0x30) = *(int8 *)param_3;
*(int8 *)(this + 0x38) = uVar2;
*(int8 *)param_3 = 0;
*(int8 *)(this + 0x48) = 0;
uVar2 = *(int8 *)(param_4 + 8);
*(int8 *)(param_4 + 8) = 0;
*(int8 *)(this + 0x40) = *(int8 *)param_4;
*(int8 *)(this + 0x48) = uVar2;
*(int8 *)param_4 = 0;
return;
}
| |
27,354 | JS_ToObject | bluesky950520[P]quickjs/quickjs.c | static JSValue JS_ToObject(JSContext *ctx, JSValue val)
{
int tag = JS_VALUE_GET_NORM_TAG(val);
JSValue obj;
switch(tag) {
default:
case JS_TAG_NULL:
case JS_TAG_UNDEFINED:
return JS_ThrowTypeError(ctx, "Cannot convert undefined or null to object");
case JS_TAG_OBJECT:
case JS_TAG_EXCEPTION:
return js_dup(val);
case JS_TAG_BIG_INT:
obj = JS_NewObjectClass(ctx, JS_CLASS_BIG_INT);
goto set_value;
case JS_TAG_INT:
case JS_TAG_FLOAT64:
obj = JS_NewObjectClass(ctx, JS_CLASS_NUMBER);
goto set_value;
case JS_TAG_STRING:
/* XXX: should call the string constructor */
{
JSString *p1 = JS_VALUE_GET_STRING(val);
obj = JS_NewObjectClass(ctx, JS_CLASS_STRING);
JS_DefinePropertyValue(ctx, obj, JS_ATOM_length, js_int32(p1->len), 0);
}
goto set_value;
case JS_TAG_BOOL:
obj = JS_NewObjectClass(ctx, JS_CLASS_BOOLEAN);
goto set_value;
case JS_TAG_SYMBOL:
obj = JS_NewObjectClass(ctx, JS_CLASS_SYMBOL);
set_value:
if (!JS_IsException(obj))
JS_SetObjectData(ctx, obj, js_dup(val));
return obj;
}
} | O0 | c | JS_ToObject:
subq $0xd8, %rsp
movq %rsi, 0xb8(%rsp)
movq %rdx, 0xc0(%rsp)
movq %rdi, 0xb0(%rsp)
movl 0xc0(%rsp), %eax
movl %eax, 0xac(%rsp)
movl 0xac(%rsp), %eax
addl $0x9, %eax
movl %eax, %ecx
movq %rcx, 0x18(%rsp)
subl $0x10, %eax
ja 0x377c8
movq 0x18(%rsp), %rax
leaq 0xd3065(%rip), %rcx # 0x10a824
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x377ca
movq 0xb0(%rsp), %rdi
leaq 0xd7314(%rip), %rsi # 0x10eaed
movb $0x0, %al
callq 0x2d300
movq %rax, 0xc8(%rsp)
movq %rdx, 0xd0(%rsp)
jmp 0x37a43
movq 0xb8(%rsp), %rdi
movq 0xc0(%rsp), %rsi
callq 0x216d0
movq %rax, 0xc8(%rsp)
movq %rdx, 0xd0(%rsp)
jmp 0x37a43
movq 0xb0(%rsp), %rdi
movl $0x22, %esi
callq 0x2a480
movq %rax, 0x88(%rsp)
movq %rdx, 0x90(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0xa0(%rsp)
jmp 0x379b9
movq 0xb0(%rsp), %rdi
movl $0x4, %esi
callq 0x2a480
movq %rax, 0x78(%rsp)
movq %rdx, 0x80(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0xa0(%rsp)
jmp 0x379b9
movq 0xb8(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0xb0(%rsp), %rdi
movl $0x5, %esi
callq 0x2a480
movq %rax, 0x60(%rsp)
movq %rdx, 0x68(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x70(%rsp), %rax
movq 0x4(%rax), %rax
andq $0x7fffffff, %rax # imm = 0x7FFFFFFF
movl %eax, %edi
callq 0x33cc0
movq 0x10(%rsp), %rdi
movq %rax, 0x50(%rsp)
movq %rdx, 0x58(%rsp)
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
movq 0x50(%rsp), %r8
movq 0x58(%rsp), %r9
movl $0x32, %ecx
xorl %eax, %eax
movl $0x0, (%rsp)
callq 0x371b0
jmp 0x379b9
movq 0xb0(%rsp), %rdi
movl $0x6, %esi
callq 0x2a480
movq %rax, 0x40(%rsp)
movq %rdx, 0x48(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0xa0(%rsp)
jmp 0x379b9
movq 0xb0(%rsp), %rdi
movl $0x7, %esi
callq 0x2a480
movq %rax, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0x98(%rsp), %rdi
movq 0xa0(%rsp), %rsi
callq 0x23cc0
cmpl $0x0, %eax
jne 0x37a23
movq 0xb0(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0xb8(%rsp), %rdi
movq 0xc0(%rsp), %rsi
callq 0x216d0
movq 0x8(%rsp), %rdi
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %r8
callq 0x55010
movq 0x98(%rsp), %rax
movq %rax, 0xc8(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0xd0(%rsp)
movq 0xc8(%rsp), %rax
movq 0xd0(%rsp), %rdx
addq $0xd8, %rsp
retq
nopl (%rax,%rax)
| JS_ToObject:
sub rsp, 0D8h
mov [rsp+0D8h+var_20], rsi
mov [rsp+0D8h+var_18], rdx
mov [rsp+0D8h+var_28], rdi
mov eax, dword ptr [rsp+0D8h+var_18]
mov [rsp+0D8h+var_2C], eax
mov eax, [rsp+0D8h+var_2C]
add eax, 9; switch 17 cases
mov ecx, eax
mov [rsp+0D8h+var_C0], rcx
sub eax, 10h
ja short def_377C6; jumptable 00000000000377C6 default case, cases -6--2,4,5
mov rax, [rsp+0D8h+var_C0]
lea rcx, jpt_377C6
movsxd rax, ds:(jpt_377C6 - 10A824h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
def_377C6:
jmp short $+2; jumptable 00000000000377C6 default case, cases -6--2,4,5
loc_377CA:
mov rdi, [rsp+0D8h+var_28]; jumptable 00000000000377C6 cases 2,3
lea rsi, aCannotConvertU; "Cannot convert undefined or null to obj"...
mov al, 0
call JS_ThrowTypeError
mov [rsp+0D8h+var_10], rax
mov [rsp+0D8h+var_8], rdx
jmp loc_37A43
loc_377F5:
mov rdi, [rsp+0D8h+var_20]; jumptable 00000000000377C6 cases -1,6
mov rsi, [rsp+0D8h+var_18]
call js_dup
mov [rsp+0D8h+var_10], rax
mov [rsp+0D8h+var_8], rdx
jmp loc_37A43
loc_3781F:
mov rdi, [rsp+0D8h+var_28]; jumptable 00000000000377C6 case -9
mov esi, 22h ; '"'
call JS_NewObjectClass
mov [rsp+0D8h+var_50], rax
mov [rsp+0D8h+var_48], rdx
mov rax, [rsp+0D8h+var_50]
mov [rsp+0D8h+var_40], rax
mov rax, [rsp+0D8h+var_48]
mov [rsp+0D8h+var_38], rax
jmp loc_379B9
loc_37866:
mov rdi, [rsp+0D8h+var_28]; jumptable 00000000000377C6 cases 0,7
mov esi, 4
call JS_NewObjectClass
mov [rsp+0D8h+var_60], rax
mov [rsp+0D8h+var_58], rdx
mov rax, [rsp+0D8h+var_60]
mov [rsp+0D8h+var_40], rax
mov rax, [rsp+0D8h+var_58]
mov [rsp+0D8h+var_38], rax
jmp loc_379B9
loc_378A7:
mov rax, [rsp+0D8h+var_20]; jumptable 00000000000377C6 case -7
mov [rsp+0D8h+var_68], rax
mov rdi, [rsp+0D8h+var_28]
mov esi, 5
call JS_NewObjectClass
mov [rsp+0D8h+var_78], rax
mov [rsp+0D8h+var_70], rdx
mov rax, [rsp+0D8h+var_78]
mov [rsp+0D8h+var_40], rax
mov rax, [rsp+0D8h+var_70]
mov [rsp+0D8h+var_38], rax
mov rax, [rsp+0D8h+var_28]
mov [rsp+0D8h+var_C8], rax
mov rax, [rsp+0D8h+var_68]
mov rax, [rax+4]
and rax, 7FFFFFFFh
mov edi, eax
call js_int32
mov rdi, [rsp+0D8h+var_C8]
mov [rsp+0D8h+var_88], rax
mov [rsp+0D8h+var_80], rdx
mov rsi, [rsp+0D8h+var_40]
mov rdx, [rsp+0D8h+var_38]
mov r8, [rsp+0D8h+var_88]
mov r9, [rsp+0D8h+var_80]
mov ecx, 32h ; '2'
xor eax, eax
mov [rsp+0D8h+var_D8], 0
call JS_DefinePropertyValue
jmp short loc_379B9
loc_3794B:
mov rdi, [rsp+0D8h+var_28]; jumptable 00000000000377C6 case 1
mov esi, 6
call JS_NewObjectClass
mov [rsp+0D8h+var_98], rax
mov [rsp+0D8h+var_90], rdx
mov rax, [rsp+0D8h+var_98]
mov [rsp+0D8h+var_40], rax
mov rax, [rsp+0D8h+var_90]
mov [rsp+0D8h+var_38], rax
jmp short loc_379B9
loc_37983:
mov rdi, [rsp+0D8h+var_28]; jumptable 00000000000377C6 case -8
mov esi, 7
call JS_NewObjectClass
mov [rsp+0D8h+var_A8], rax
mov [rsp+0D8h+var_A0], rdx
mov rax, [rsp+0D8h+var_A8]
mov [rsp+0D8h+var_40], rax
mov rax, [rsp+0D8h+var_A0]
mov [rsp+0D8h+var_38], rax
loc_379B9:
mov rdi, [rsp+0D8h+var_40]
mov rsi, [rsp+0D8h+var_38]
call JS_IsException_1
cmp eax, 0
jnz short loc_37A23
mov rax, [rsp+0D8h+var_28]
mov [rsp+0D8h+var_D0], rax
mov rdi, [rsp+0D8h+var_20]
mov rsi, [rsp+0D8h+var_18]
call js_dup
mov rdi, [rsp+0D8h+var_D0]
mov [rsp+0D8h+var_B8], rax
mov [rsp+0D8h+var_B0], rdx
mov rsi, [rsp+0D8h+var_40]
mov rdx, [rsp+0D8h+var_38]
mov rcx, [rsp+0D8h+var_B8]
mov r8, [rsp+0D8h+var_B0]
call JS_SetObjectData
loc_37A23:
mov rax, [rsp+0D8h+var_40]
mov [rsp+0D8h+var_10], rax
mov rax, [rsp+0D8h+var_38]
mov [rsp+0D8h+var_8], rax
loc_37A43:
mov rax, [rsp+0D8h+var_10]
mov rdx, [rsp+0D8h+var_8]
add rsp, 0D8h
retn
| _DWORD * JS_ToObject(
long long a1,
_DWORD *a2,
long long a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
long long a12,
long long a13,
long long a14)
{
long long v14; // rdx
BOOL IsException_1; // eax
long long v16; // rdx
long long v17; // rdx
long long v18; // rdx
__m128 v19; // xmm4
__m128 v20; // xmm5
long long v21; // rdx
long long v22; // rdx
long long v23; // rdx
char v25; // [rsp+0h] [rbp-D8h]
_DWORD *v26; // [rsp+20h] [rbp-B8h]
long long v27; // [rsp+30h] [rbp-A8h]
_DWORD *v28; // [rsp+50h] [rbp-88h]
long long v29; // [rsp+98h] [rbp-40h]
long long v30; // [rsp+A0h] [rbp-38h]
unsigned int v31; // [rsp+C0h] [rbp-18h]
long long v32; // [rsp+C8h] [rbp-10h]
v31 = a3;
switch ( (int)a3 )
{
case -9:
v29 = JS_NewObjectClass(a1, 34);
v30 = v14;
IsException_1 = JS_IsException_1(v29, v14);
goto LABEL_10;
case -8:
v27 = JS_NewObjectClass(a1, 7);
v29 = v27;
v30 = v22;
IsException_1 = JS_IsException_1(v27, v22);
goto LABEL_10;
case -7:
v29 = JS_NewObjectClass(a1, 5);
v30 = v17;
v28 = (_DWORD *)js_int32(a2[1] & 0x7FFFFFFF);
JS_DefinePropertyValue(a1, v29, v30, 0x32u, v28, v18, a4, a5, a6, a7, v19, v20, a10, a11, 0);
IsException_1 = JS_IsException_1(v29, v30);
goto LABEL_10;
case -1:
case 6:
return js_dup(a2, a3);
case 0:
case 7:
v29 = JS_NewObjectClass(a1, 4);
v30 = v16;
IsException_1 = JS_IsException_1(v29, v16);
goto LABEL_10;
case 1:
v29 = JS_NewObjectClass(a1, 6);
v30 = v21;
IsException_1 = JS_IsException_1(v29, v21);
LABEL_10:
if ( !IsException_1 )
{
v26 = js_dup(a2, v31);
JS_SetObjectData(a1, v29, v30, v26, v23);
}
v32 = v29;
break;
default:
v32 = JS_ThrowTypeError(
a1,
(long long)"Cannot convert undefined or null to object",
a3,
(unsigned int)(a3 + 9),
a13,
a14,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
v25);
break;
}
return (_DWORD *)v32;
}
| JS_ToObject:
SUB RSP,0xd8
MOV qword ptr [RSP + 0xb8],RSI
MOV qword ptr [RSP + 0xc0],RDX
MOV qword ptr [RSP + 0xb0],RDI
MOV EAX,dword ptr [RSP + 0xc0]
MOV dword ptr [RSP + 0xac],EAX
MOV EAX,dword ptr [RSP + 0xac]
ADD EAX,0x9
MOV ECX,EAX
MOV qword ptr [RSP + 0x18],RCX
SUB EAX,0x10
JA 0x001377c8
MOV RAX,qword ptr [RSP + 0x18]
LEA RCX,[0x20a824]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_fffffffa:
JMP 0x001377ca
caseD_2:
MOV RDI,qword ptr [RSP + 0xb0]
LEA RSI,[0x20eaed]
MOV AL,0x0
CALL 0x0012d300
MOV qword ptr [RSP + 0xc8],RAX
MOV qword ptr [RSP + 0xd0],RDX
JMP 0x00137a43
caseD_ffffffff:
MOV RDI,qword ptr [RSP + 0xb8]
MOV RSI,qword ptr [RSP + 0xc0]
CALL 0x001216d0
MOV qword ptr [RSP + 0xc8],RAX
MOV qword ptr [RSP + 0xd0],RDX
JMP 0x00137a43
caseD_fffffff7:
MOV RDI,qword ptr [RSP + 0xb0]
MOV ESI,0x22
CALL 0x0012a480
MOV qword ptr [RSP + 0x88],RAX
MOV qword ptr [RSP + 0x90],RDX
MOV RAX,qword ptr [RSP + 0x88]
MOV qword ptr [RSP + 0x98],RAX
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0xa0],RAX
JMP 0x001379b9
caseD_0:
MOV RDI,qword ptr [RSP + 0xb0]
MOV ESI,0x4
CALL 0x0012a480
MOV qword ptr [RSP + 0x78],RAX
MOV qword ptr [RSP + 0x80],RDX
MOV RAX,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0x98],RAX
MOV RAX,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0xa0],RAX
JMP 0x001379b9
caseD_fffffff9:
MOV RAX,qword ptr [RSP + 0xb8]
MOV qword ptr [RSP + 0x70],RAX
MOV RDI,qword ptr [RSP + 0xb0]
MOV ESI,0x5
CALL 0x0012a480
MOV qword ptr [RSP + 0x60],RAX
MOV qword ptr [RSP + 0x68],RDX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x98],RAX
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0xa0],RAX
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x70]
MOV RAX,qword ptr [RAX + 0x4]
AND RAX,0x7fffffff
MOV EDI,EAX
CALL 0x00133cc0
MOV RDI,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x50],RAX
MOV qword ptr [RSP + 0x58],RDX
MOV RSI,qword ptr [RSP + 0x98]
MOV RDX,qword ptr [RSP + 0xa0]
MOV R8,qword ptr [RSP + 0x50]
MOV R9,qword ptr [RSP + 0x58]
MOV ECX,0x32
XOR EAX,EAX
MOV dword ptr [RSP],0x0
CALL 0x001371b0
JMP 0x001379b9
caseD_1:
MOV RDI,qword ptr [RSP + 0xb0]
MOV ESI,0x6
CALL 0x0012a480
MOV qword ptr [RSP + 0x40],RAX
MOV qword ptr [RSP + 0x48],RDX
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x98],RAX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0xa0],RAX
JMP 0x001379b9
caseD_fffffff8:
MOV RDI,qword ptr [RSP + 0xb0]
MOV ESI,0x7
CALL 0x0012a480
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x38],RDX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x98],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0xa0],RAX
LAB_001379b9:
MOV RDI,qword ptr [RSP + 0x98]
MOV RSI,qword ptr [RSP + 0xa0]
CALL 0x00123cc0
CMP EAX,0x0
JNZ 0x00137a23
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0xb8]
MOV RSI,qword ptr [RSP + 0xc0]
CALL 0x001216d0
MOV RDI,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],RDX
MOV RSI,qword ptr [RSP + 0x98]
MOV RDX,qword ptr [RSP + 0xa0]
MOV RCX,qword ptr [RSP + 0x20]
MOV R8,qword ptr [RSP + 0x28]
CALL 0x00155010
LAB_00137a23:
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0xc8],RAX
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0xd0],RAX
LAB_00137a43:
MOV RAX,qword ptr [RSP + 0xc8]
MOV RDX,qword ptr [RSP + 0xd0]
ADD RSP,0xd8
RET
|
int1 [16] JS_ToObject(int8 param_1,long param_2,int8 param_3)
{
int iVar1;
int1 auVar2 [16];
int1 auVar3 [16];
int8 local_40;
int8 local_38;
int4 local_18;
local_18 = (int4)param_3;
switch(local_18) {
case 0:
case 7:
auVar2 = JS_NewObjectClass(param_1,4);
break;
case 1:
auVar2 = JS_NewObjectClass(param_1,6);
break;
case 0xfffffff7:
auVar2 = JS_NewObjectClass(param_1,0x22);
break;
case 0xfffffff8:
auVar2 = JS_NewObjectClass(param_1,7);
break;
case 0xfffffff9:
auVar2 = JS_NewObjectClass(param_1,5);
auVar3 = js_int32((uint)*(int8 *)(param_2 + 4) & 0x7fffffff);
JS_DefinePropertyValue(param_1,auVar2._0_8_,auVar2._8_8_,0x32,auVar3._0_8_,auVar3._8_8_,0);
break;
default:
case 2:
case 3:
auVar2 = JS_ThrowTypeError(param_1,"Cannot convert int or null to object");
return auVar2;
case 0xffffffff:
case 6:
auVar2 = js_dup(param_2,param_3);
return auVar2;
}
local_38 = auVar2._8_8_;
local_40 = auVar2._0_8_;
iVar1 = JS_IsException(local_40,local_38);
if (iVar1 == 0) {
auVar3 = js_dup(param_2,param_3);
JS_SetObjectData(param_1,local_40,local_38,auVar3._0_8_,auVar3._8_8_);
}
return auVar2;
}
| |
27,355 | JS_ToObject | bluesky950520[P]quickjs/quickjs.c | static JSValue JS_ToObject(JSContext *ctx, JSValue val)
{
int tag = JS_VALUE_GET_NORM_TAG(val);
JSValue obj;
switch(tag) {
default:
case JS_TAG_NULL:
case JS_TAG_UNDEFINED:
return JS_ThrowTypeError(ctx, "Cannot convert undefined or null to object");
case JS_TAG_OBJECT:
case JS_TAG_EXCEPTION:
return js_dup(val);
case JS_TAG_BIG_INT:
obj = JS_NewObjectClass(ctx, JS_CLASS_BIG_INT);
goto set_value;
case JS_TAG_INT:
case JS_TAG_FLOAT64:
obj = JS_NewObjectClass(ctx, JS_CLASS_NUMBER);
goto set_value;
case JS_TAG_STRING:
/* XXX: should call the string constructor */
{
JSString *p1 = JS_VALUE_GET_STRING(val);
obj = JS_NewObjectClass(ctx, JS_CLASS_STRING);
JS_DefinePropertyValue(ctx, obj, JS_ATOM_length, js_int32(p1->len), 0);
}
goto set_value;
case JS_TAG_BOOL:
obj = JS_NewObjectClass(ctx, JS_CLASS_BOOLEAN);
goto set_value;
case JS_TAG_SYMBOL:
obj = JS_NewObjectClass(ctx, JS_CLASS_SYMBOL);
set_value:
if (!JS_IsException(obj))
JS_SetObjectData(ctx, obj, js_dup(val));
return obj;
}
} | O1 | c | JS_ToObject:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r15
movq %rsi, 0x10(%rsp)
leal 0x9(%rdx), %eax
cmpl $0x10, %eax
ja 0x26e45
movq %rdx, %r14
movq %rsi, %rbx
leaq 0x75894(%rip), %rcx # 0x9c69c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, 0x8(%rsp)
cmpl $-0x9, %r14d
jb 0x26f31
movq 0x8(%rsp), %rax
incl (%rax)
jmp 0x26f31
movq 0x40(%r15), %rax
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
movq %r15, %rdi
movl $0x4, %ecx
jmp 0x26ef4
leaq 0x78c3d(%rip), %rsi # 0x9fa89
xorl %ebx, %ebx
movq %r15, %rdi
xorl %eax, %eax
callq 0x22567
movl $0x6, %r14d
jmp 0x26f31
movq 0x40(%r15), %rax
movq 0x70(%rax), %rsi
movq 0x78(%rax), %rdx
movq %r15, %rdi
movl $0x7, %ecx
jmp 0x26ef4
movq 0x40(%r15), %rax
movq 0x60(%rax), %rsi
movq 0x68(%rax), %rdx
movq %r15, %rdi
movl $0x6, %ecx
jmp 0x26ef4
movq 0x10(%rsp), %rbp
movq 0x40(%r15), %rax
movq 0x50(%rax), %rsi
movq 0x58(%rax), %rdx
movq %r15, %rdi
movl $0x5, %ecx
callq 0x20f05
movq %rax, %r12
movq %rdx, %r13
movq 0x4(%rbp), %r8
andl $0x7fffffff, %r8d # imm = 0x7FFFFFFF
movl $0x0, (%rsp)
movq %r15, %rdi
movq %rax, %rsi
movl $0x32, %ecx
xorl %r9d, %r9d
callq 0x26abb
jmp 0x26eff
movq 0x40(%r15), %rax
movq 0x220(%rax), %rsi
movq 0x228(%rax), %rdx
movq %r15, %rdi
movl $0x22, %ecx
callq 0x20f05
movq %rax, %r12
movq %rdx, %r13
cmpl $0x6, %r13d
je 0x26f2b
movq %rbx, 0x8(%rsp)
cmpl $-0x9, %r14d
jb 0x26f17
movq 0x8(%rsp), %rax
incl (%rax)
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbx, %rcx
movq %r14, %r8
callq 0x36e62
movq %r12, %rbx
movq %r13, %r14
movq %rbx, %rax
movq %r14, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| JS_ToObject:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r15, rdi
mov [rsp+48h+var_38], rsi
lea eax, [rdx+9]; switch 17 cases
cmp eax, 10h
ja short def_26E0F; jumptable 0000000000026E0F default case, cases -6--2,2-5
mov r14, rdx
mov rbx, rsi
lea rcx, jpt_26E0F
movsxd rax, ds:(jpt_26E0F - 9C69Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_26E11:
mov [rsp+48h+var_40], rbx; jumptable 0000000000026E0F cases -1,6
cmp r14d, 0FFFFFFF7h
jb loc_26F31
mov rax, [rsp+48h+var_40]
inc dword ptr [rax]
jmp loc_26F31
loc_26E2C:
mov rax, [r15+40h]; jumptable 0000000000026E0F cases 0,7
mov rsi, [rax+40h]
mov rdx, [rax+48h]
mov rdi, r15
mov ecx, 4
jmp loc_26EF4
def_26E0F:
lea rsi, aCannotConvertU; jumptable 0000000000026E0F default case, cases -6--2,2-5
xor ebx, ebx
mov rdi, r15
xor eax, eax
call JS_ThrowTypeError
mov r14d, 6
jmp loc_26F31
loc_26E63:
mov rax, [r15+40h]; jumptable 0000000000026E0F case -8
mov rsi, [rax+70h]
mov rdx, [rax+78h]
mov rdi, r15
mov ecx, 7
jmp short loc_26EF4
loc_26E79:
mov rax, [r15+40h]; jumptable 0000000000026E0F case 1
mov rsi, [rax+60h]
mov rdx, [rax+68h]
mov rdi, r15
mov ecx, 6
jmp short loc_26EF4
loc_26E8F:
mov rbp, [rsp+48h+var_38]; jumptable 0000000000026E0F case -7
mov rax, [r15+40h]
mov rsi, [rax+50h]
mov rdx, [rax+58h]
mov rdi, r15
mov ecx, 5
call JS_NewObjectProtoClass
mov r12, rax
mov r13, rdx
mov r8, [rbp+4]
and r8d, 7FFFFFFFh
mov [rsp+48h+var_48], 0
mov rdi, r15
mov rsi, rax
mov ecx, 32h ; '2'
xor r9d, r9d
call JS_DefinePropertyValue
jmp short loc_26EFF
loc_26EDA:
mov rax, [r15+40h]; jumptable 0000000000026E0F case -9
mov rsi, [rax+220h]
mov rdx, [rax+228h]
mov rdi, r15
mov ecx, 22h ; '"'
loc_26EF4:
call JS_NewObjectProtoClass
mov r12, rax
mov r13, rdx
loc_26EFF:
cmp r13d, 6
jz short loc_26F2B
mov [rsp+48h+var_40], rbx
cmp r14d, 0FFFFFFF7h
jb short loc_26F17
mov rax, [rsp+48h+var_40]
inc dword ptr [rax]
loc_26F17:
mov rdi, r15
mov rsi, r12
mov rdx, r13
mov rcx, rbx
mov r8, r14
call JS_SetObjectData
loc_26F2B:
mov rbx, r12
mov r14, r13
loc_26F31:
mov rax, rbx
mov rdx, r14
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _DWORD * JS_ToObject(
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)
{
_DWORD *v15; // rbx
long long v16; // rax
long long v17; // rsi
long long v18; // rdx
unsigned int v19; // ecx
long long v20; // rax
long long v21; // rax
unsigned long long v22; // r12
long long v23; // rdx
long long v24; // r13
__m128 v25; // xmm4
__m128 v26; // xmm5
long long v27; // rax
long long v28; // rdx
char v30; // [rsp+0h] [rbp-48h]
v15 = (_DWORD *)a2;
switch ( (int)a3 )
{
case -9:
v27 = *(_QWORD *)(a1 + 64);
v17 = *(_QWORD *)(v27 + 544);
v18 = *(_QWORD *)(v27 + 552);
v19 = 34;
goto LABEL_10;
case -8:
v20 = *(_QWORD *)(a1 + 64);
v17 = *(_QWORD *)(v20 + 112);
v18 = *(_QWORD *)(v20 + 120);
v19 = 7;
goto LABEL_10;
case -7:
v22 = JS_NewObjectProtoClass(
a1,
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 80LL),
*(_QWORD *)(*(_QWORD *)(a1 + 64) + 88LL),
5u);
v24 = v23;
JS_DefinePropertyValue(
a1,
v22,
v23,
50LL,
(_DWORD *)(*(_QWORD *)(a2 + 4) & 0x7FFFFFFFLL),
0LL,
*(double *)a7.m128_u64,
a8,
a9,
a10,
v25,
v26,
a13,
a14,
0);
goto LABEL_11;
case -1:
case 6:
if ( (unsigned int)a3 >= 0xFFFFFFF7 )
++*(_DWORD *)a2;
return v15;
case 0:
case 7:
v16 = *(_QWORD *)(a1 + 64);
v17 = *(_QWORD *)(v16 + 64);
v18 = *(_QWORD *)(v16 + 72);
v19 = 4;
goto LABEL_10;
case 1:
v21 = *(_QWORD *)(a1 + 64);
v17 = *(_QWORD *)(v21 + 96);
v18 = *(_QWORD *)(v21 + 104);
v19 = 6;
LABEL_10:
v22 = JS_NewObjectProtoClass(a1, v17, v18, v19);
v24 = v28;
LABEL_11:
if ( (_DWORD)v24 != 6 )
{
if ( (unsigned int)a3 >= 0xFFFFFFF7 )
++*v15;
JS_SetObjectData(a1, v22, v24, v15, a3);
}
v15 = (_DWORD *)v22;
break;
default:
v15 = 0LL;
JS_ThrowTypeError(
a1,
(long long)"Cannot convert undefined or null to object",
a3,
a4,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v30);
break;
}
return v15;
}
| JS_ToObject:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R15,RDI
MOV qword ptr [RSP + 0x10],RSI
LEA EAX,[RDX + 0x9]
CMP EAX,0x10
JA 0x00126e45
MOV R14,RDX
MOV RBX,RSI
LEA RCX,[0x19c69c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_ffffffff:
MOV qword ptr [RSP + 0x8],RBX
CMP R14D,-0x9
JC 0x00126f31
MOV RAX,qword ptr [RSP + 0x8]
INC dword ptr [RAX]
JMP 0x00126f31
caseD_0:
MOV RAX,qword ptr [R15 + 0x40]
MOV RSI,qword ptr [RAX + 0x40]
MOV RDX,qword ptr [RAX + 0x48]
MOV RDI,R15
MOV ECX,0x4
JMP 0x00126ef4
caseD_fffffffa:
LEA RSI,[0x19fa89]
XOR EBX,EBX
MOV RDI,R15
XOR EAX,EAX
CALL 0x00122567
MOV R14D,0x6
JMP 0x00126f31
caseD_fffffff8:
MOV RAX,qword ptr [R15 + 0x40]
MOV RSI,qword ptr [RAX + 0x70]
MOV RDX,qword ptr [RAX + 0x78]
MOV RDI,R15
MOV ECX,0x7
JMP 0x00126ef4
caseD_1:
MOV RAX,qword ptr [R15 + 0x40]
MOV RSI,qword ptr [RAX + 0x60]
MOV RDX,qword ptr [RAX + 0x68]
MOV RDI,R15
MOV ECX,0x6
JMP 0x00126ef4
caseD_fffffff9:
MOV RBP,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [R15 + 0x40]
MOV RSI,qword ptr [RAX + 0x50]
MOV RDX,qword ptr [RAX + 0x58]
MOV RDI,R15
MOV ECX,0x5
CALL 0x00120f05
MOV R12,RAX
MOV R13,RDX
MOV R8,qword ptr [RBP + 0x4]
AND R8D,0x7fffffff
MOV dword ptr [RSP],0x0
MOV RDI,R15
MOV RSI,RAX
MOV ECX,0x32
XOR R9D,R9D
CALL 0x00126abb
JMP 0x00126eff
caseD_fffffff7:
MOV RAX,qword ptr [R15 + 0x40]
MOV RSI,qword ptr [RAX + 0x220]
MOV RDX,qword ptr [RAX + 0x228]
MOV RDI,R15
MOV ECX,0x22
LAB_00126ef4:
CALL 0x00120f05
MOV R12,RAX
MOV R13,RDX
LAB_00126eff:
CMP R13D,0x6
JZ 0x00126f2b
MOV qword ptr [RSP + 0x8],RBX
CMP R14D,-0x9
JC 0x00126f17
MOV RAX,qword ptr [RSP + 0x8]
INC dword ptr [RAX]
LAB_00126f17:
MOV RDI,R15
MOV RSI,R12
MOV RDX,R13
MOV RCX,RBX
MOV R8,R14
CALL 0x00136e62
LAB_00126f2b:
MOV RBX,R12
MOV R14,R13
LAB_00126f31:
MOV RAX,RBX
MOV RDX,R14
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16] JS_ToObject(long param_1,int *param_2,int8 param_3)
{
uint uVar1;
int1 auVar2 [16];
int8 uVar3;
int8 uVar5;
int1 auVar6 [16];
int8 uVar4;
auVar2._8_8_ = param_3;
auVar2._0_8_ = param_2;
auVar6._8_8_ = param_3;
auVar6._0_8_ = param_2;
uVar1 = (uint)param_3;
switch(uVar1) {
case 0:
case 7:
uVar5 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x40);
uVar4 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x48);
uVar3 = 4;
break;
case 1:
uVar5 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x60);
uVar4 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x68);
uVar3 = 6;
break;
case 0xfffffff7:
uVar5 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x220);
uVar4 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x228);
uVar3 = 0x22;
break;
case 0xfffffff8:
uVar5 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x70);
uVar4 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x78);
uVar3 = 7;
break;
case 0xfffffff9:
auVar6 = JS_NewObjectProtoClass
(param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x50),
*(int8 *)(*(long *)(param_1 + 0x40) + 0x58),5);
JS_DefinePropertyValue
(param_1,auVar6._0_8_,auVar6._8_8_,0x32,
(uint)*(int8 *)(param_2 + 1) & 0x7fffffff,0,0);
goto LAB_00126eff;
default:
JS_ThrowTypeError(param_1,"Cannot convert int or null to object");
return ZEXT816(6) << 0x40;
case 0xffffffff:
case 6:
if (uVar1 < 0xfffffff7) {
return auVar6;
}
*param_2 = *param_2 + 1;
return auVar2;
}
auVar6 = JS_NewObjectProtoClass(param_1,uVar5,uVar4,uVar3);
LAB_00126eff:
if (auVar6._8_4_ != 6) {
if (0xfffffff6 < uVar1) {
*param_2 = *param_2 + 1;
}
JS_SetObjectData(param_1,auVar6._0_8_,auVar6._8_8_,param_2,param_3);
}
return auVar6;
}
| |
27,356 | ma_block_start_trans_no_versioning | eloqsql/storage/maria/ma_state.c | my_bool _ma_block_start_trans_no_versioning(void* param)
{
MARIA_HA *info=(MARIA_HA*) param;
DBUG_ENTER("_ma_block_start_trans_no_versioning");
DBUG_ASSERT(info->s->base.born_transactional && !info->s->lock_key_trees);
info->state->changed= 0; /* from _ma_reset_update_flag() */
info->state= info->state_start;
*info->state= info->s->state.state;
if (!info->trn)
{
/*
Assume for now that this doesn't fail (It can only fail in
out of memory conditions)
*/
DBUG_RETURN(maria_create_trn_hook(info));
}
DBUG_RETURN(0);
} | O3 | c | ma_block_start_trans_no_versioning:
movq 0x20(%rdi), %rax
andb $-0x2, 0x34(%rax)
movq (%rdi), %rax
movq 0x60(%rdi), %rcx
movq %rcx, 0x20(%rdi)
movq 0x48(%rax), %rdx
movq %rdx, 0x30(%rcx)
movups 0x18(%rax), %xmm0
movups 0x28(%rax), %xmm1
movups 0x38(%rax), %xmm2
movups %xmm2, 0x20(%rcx)
movups %xmm1, 0x10(%rcx)
movups %xmm0, (%rcx)
cmpq $0x0, 0x8(%rdi)
je 0x38c84
xorl %eax, %eax
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x3c4349(%rip), %rax # 0x3fcfd8
callq *(%rax)
popq %rbp
retq
| _ma_block_start_trans_no_versioning:
mov rax, [rdi+20h]
and byte ptr [rax+34h], 0FEh
mov rax, [rdi]
mov rcx, [rdi+60h]
mov [rdi+20h], rcx
mov rdx, [rax+48h]
mov [rcx+30h], rdx
movups xmm0, xmmword ptr [rax+18h]
movups xmm1, xmmword ptr [rax+28h]
movups xmm2, xmmword ptr [rax+38h]
movups xmmword ptr [rcx+20h], xmm2
movups xmmword ptr [rcx+10h], xmm1
movups xmmword ptr [rcx], xmm0
cmp qword ptr [rdi+8], 0
jz short loc_38C84
xor eax, eax
retn
loc_38C84:
push rbp
mov rbp, rsp
lea rax, maria_create_trn_hook
call qword ptr [rax]
pop rbp
retn
| long long ma_block_start_trans_no_versioning(long long *a1)
{
long long v1; // rax
long long v2; // rcx
__int128 v3; // xmm0
__int128 v4; // xmm1
*(_BYTE *)(a1[4] + 52) &= ~1u;
v1 = *a1;
v2 = a1[12];
a1[4] = v2;
*(_QWORD *)(v2 + 48) = *(_QWORD *)(v1 + 72);
v3 = *(_OWORD *)(v1 + 24);
v4 = *(_OWORD *)(v1 + 40);
*(_OWORD *)(v2 + 32) = *(_OWORD *)(v1 + 56);
*(_OWORD *)(v2 + 16) = v4;
*(_OWORD *)v2 = v3;
if ( a1[1] )
return 0LL;
else
return maria_create_trn_hook(a1);
}
| _ma_block_start_trans_no_versioning:
MOV RAX,qword ptr [RDI + 0x20]
AND byte ptr [RAX + 0x34],0xfe
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x60]
MOV qword ptr [RDI + 0x20],RCX
MOV RDX,qword ptr [RAX + 0x48]
MOV qword ptr [RCX + 0x30],RDX
MOVUPS XMM0,xmmword ptr [RAX + 0x18]
MOVUPS XMM1,xmmword ptr [RAX + 0x28]
MOVUPS XMM2,xmmword ptr [RAX + 0x38]
MOVUPS xmmword ptr [RCX + 0x20],XMM2
MOVUPS xmmword ptr [RCX + 0x10],XMM1
MOVUPS xmmword ptr [RCX],XMM0
CMP qword ptr [RDI + 0x8],0x0
JZ 0x00138c84
XOR EAX,EAX
RET
LAB_00138c84:
PUSH RBP
MOV RBP,RSP
LEA RAX,[0x4fcfd8]
CALL qword ptr [RAX]
POP RBP
RET
|
int8 _ma_block_start_trans_no_versioning(long *param_1)
{
long lVar1;
int4 *puVar2;
int4 uVar3;
int4 uVar4;
int4 uVar5;
int4 uVar6;
int4 uVar7;
int4 uVar8;
int4 uVar9;
int4 uVar10;
int4 uVar11;
int4 uVar12;
int4 uVar13;
int8 uVar14;
*(byte *)(param_1[4] + 0x34) = *(byte *)(param_1[4] + 0x34) & 0xfe;
lVar1 = *param_1;
puVar2 = (int4 *)param_1[0xc];
param_1[4] = (long)puVar2;
*(int8 *)(puVar2 + 0xc) = *(int8 *)(lVar1 + 0x48);
uVar3 = *(int4 *)(lVar1 + 0x18);
uVar4 = *(int4 *)(lVar1 + 0x1c);
uVar5 = *(int4 *)(lVar1 + 0x20);
uVar6 = *(int4 *)(lVar1 + 0x24);
uVar7 = *(int4 *)(lVar1 + 0x28);
uVar8 = *(int4 *)(lVar1 + 0x2c);
uVar9 = *(int4 *)(lVar1 + 0x30);
uVar10 = *(int4 *)(lVar1 + 0x34);
uVar11 = *(int4 *)(lVar1 + 0x3c);
uVar12 = *(int4 *)(lVar1 + 0x40);
uVar13 = *(int4 *)(lVar1 + 0x44);
puVar2[8] = *(int4 *)(lVar1 + 0x38);
puVar2[9] = uVar11;
puVar2[10] = uVar12;
puVar2[0xb] = uVar13;
puVar2[4] = uVar7;
puVar2[5] = uVar8;
puVar2[6] = uVar9;
puVar2[7] = uVar10;
*puVar2 = uVar3;
puVar2[1] = uVar4;
puVar2[2] = uVar5;
puVar2[3] = uVar6;
if (param_1[1] != 0) {
return 0;
}
uVar14 = (*maria_create_trn_hook)();
return uVar14;
}
| |
27,357 | ma_tls_close | eloqsql/libmariadb/libmariadb/secure/openssl.c | my_bool ma_tls_close(MARIADB_TLS *ctls)
{
int i, rc;
SSL *ssl;
SSL_CTX *ctx= NULL;
if (!ctls || !ctls->ssl)
return 1;
ssl= (SSL *)ctls->ssl;
ctx= SSL_get_SSL_CTX(ssl);
if (ctx)
SSL_CTX_free(ctx);
SSL_set_quiet_shutdown(ssl, 1);
/* 2 x pending + 2 * data = 4 */
for (i=0; i < 4; i++)
if ((rc= SSL_shutdown(ssl)))
break;
/* Since we transferred ownership of BIO to ssl, BIO will
automatically freed - no need for an explicit BIO_free_all */
SSL_free(ssl);
ctls->ssl= NULL;
return rc;
} | O0 | c | ma_tls_close:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq $0x0, -0x28(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x51e16
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x51e1c
movb $0x1, -0x1(%rbp)
jmp 0x51e9b
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x140e0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x51e45
movq -0x28(%rbp), %rdi
callq 0x14090
movq -0x20(%rbp), %rdi
movl $0x1, %esi
callq 0x14460
movl $0x0, -0x14(%rbp)
cmpl $0x4, -0x14(%rbp)
jge 0x51e80
movq -0x20(%rbp), %rdi
callq 0x144d0
movl %eax, -0x18(%rbp)
cmpl $0x0, %eax
je 0x51e73
jmp 0x51e80
jmp 0x51e75
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x51e5a
movq -0x20(%rbp), %rdi
callq 0x14280
movq -0x10(%rbp), %rax
movq $0x0, 0x10(%rax)
movl -0x18(%rbp), %eax
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_tls_close:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_28], 0
cmp [rbp+var_10], 0
jz short loc_51E16
mov rax, [rbp+var_10]
cmp qword ptr [rax+10h], 0
jnz short loc_51E1C
loc_51E16:
mov [rbp+var_1], 1
jmp short loc_51E9B
loc_51E1C:
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov [rbp+var_20], rax
mov rdi, [rbp+var_20]
call _SSL_get_SSL_CTX
mov [rbp+var_28], rax
cmp [rbp+var_28], 0
jz short loc_51E45
mov rdi, [rbp+var_28]
call _SSL_CTX_free
loc_51E45:
mov rdi, [rbp+var_20]
mov esi, 1
call _SSL_set_quiet_shutdown
mov [rbp+var_14], 0
loc_51E5A:
cmp [rbp+var_14], 4
jge short loc_51E80
mov rdi, [rbp+var_20]
call _SSL_shutdown
mov [rbp+var_18], eax
cmp eax, 0
jz short loc_51E73
jmp short loc_51E80
loc_51E73:
jmp short $+2
loc_51E75:
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_14], eax
jmp short loc_51E5A
loc_51E80:
mov rdi, [rbp+var_20]
call _SSL_free
mov rax, [rbp+var_10]
mov qword ptr [rax+10h], 0
mov eax, [rbp+var_18]
mov [rbp+var_1], al
loc_51E9B:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char ma_tls_close(long long a1)
{
long long SSL_CTX; // [rsp+8h] [rbp-28h]
long long v3; // [rsp+10h] [rbp-20h]
int v4; // [rsp+18h] [rbp-18h]
int i; // [rsp+1Ch] [rbp-14h]
if ( !a1 || !*(_QWORD *)(a1 + 16) )
return 1;
v3 = *(_QWORD *)(a1 + 16);
SSL_CTX = SSL_get_SSL_CTX(v3);
if ( SSL_CTX )
SSL_CTX_free(SSL_CTX);
SSL_set_quiet_shutdown(v3, 1LL);
for ( i = 0; i < 4; ++i )
{
v4 = SSL_shutdown(v3);
if ( v4 )
break;
}
SSL_free(v3);
*(_QWORD *)(a1 + 16) = 0LL;
return v4;
}
| ma_tls_close:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x28],0x0
CMP qword ptr [RBP + -0x10],0x0
JZ 0x00151e16
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x10],0x0
JNZ 0x00151e1c
LAB_00151e16:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00151e9b
LAB_00151e1c:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x001140e0
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],0x0
JZ 0x00151e45
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x00114090
LAB_00151e45:
MOV RDI,qword ptr [RBP + -0x20]
MOV ESI,0x1
CALL 0x00114460
MOV dword ptr [RBP + -0x14],0x0
LAB_00151e5a:
CMP dword ptr [RBP + -0x14],0x4
JGE 0x00151e80
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x001144d0
MOV dword ptr [RBP + -0x18],EAX
CMP EAX,0x0
JZ 0x00151e73
JMP 0x00151e80
LAB_00151e73:
JMP 0x00151e75
LAB_00151e75:
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x00151e5a
LAB_00151e80:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00114280
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],0x0
MOV EAX,dword ptr [RBP + -0x18]
MOV byte ptr [RBP + -0x1],AL
LAB_00151e9b:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 ma_tls_close(long param_1)
{
SSL *ssl;
SSL_CTX *pSVar1;
int local_20;
int local_1c;
int1 local_9;
if ((param_1 == 0) || (*(long *)(param_1 + 0x10) == 0)) {
local_9 = 1;
}
else {
ssl = *(SSL **)(param_1 + 0x10);
pSVar1 = SSL_get_SSL_CTX(ssl);
if (pSVar1 != (SSL_CTX *)0x0) {
SSL_CTX_free(pSVar1);
}
SSL_set_quiet_shutdown(ssl,1);
local_1c = 0;
while ((local_1c < 4 && (local_20 = SSL_shutdown(ssl), local_20 == 0))) {
local_1c = local_1c + 1;
}
SSL_free(ssl);
*(int8 *)(param_1 + 0x10) = 0;
local_9 = (int1)local_20;
}
return local_9;
}
| |
27,358 | my_8bit_charset_flags_from_data | eloqsql/strings/ctype-simple.c | uint my_8bit_charset_flags_from_data(CHARSET_INFO *cs)
{
uint flags= 0;
if (my_charset_is_8bit_pure_ascii(cs))
flags|= MY_CS_PUREASCII;
if (!my_charset_is_ascii_compatible(cs))
flags|= MY_CS_NONASCII;
return flags;
} | O3 | c | my_8bit_charset_flags_from_data:
movq 0x68(%rdi), %rcx
testq %rcx, %rcx
je 0x39d18
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
xorl %edx, %edx
cmpw $0x80, (%rcx,%rdx,2)
jae 0x39cff
incq %rdx
cmpq $0x100, %rdx # imm = 0x100
jne 0x39ce6
movl $0x1000, %eax # imm = 0x1000
xorl %edx, %edx
movzwl (%rcx,%rdx,2), %esi
cmpq %rsi, %rdx
jne 0x39d1b
incq %rdx
cmpq $0x80, %rdx
jne 0x39d01
jmp 0x39d20
xorl %eax, %eax
retq
orl $0x2000, %eax # imm = 0x2000
popq %rbp
retq
| my_8bit_charset_flags_from_data:
mov rcx, [rdi+68h]
test rcx, rcx
jz short loc_39D18
push rbp
mov rbp, rsp
xor eax, eax
xor edx, edx
loc_39CE6:
cmp word ptr [rcx+rdx*2], 80h
jnb short loc_39CFF
inc rdx
cmp rdx, 100h
jnz short loc_39CE6
mov eax, 1000h
loc_39CFF:
xor edx, edx
loc_39D01:
movzx esi, word ptr [rcx+rdx*2]
cmp rdx, rsi
jnz short loc_39D1B
inc rdx
cmp rdx, 80h
jnz short loc_39D01
jmp short loc_39D20
loc_39D18:
xor eax, eax
retn
loc_39D1B:
or eax, 2000h
loc_39D20:
pop rbp
retn
| char * my_8bit_charset_flags_from_data(long long a1)
{
long long v1; // rcx
char *result; // rax
long long v3; // rdx
long long v4; // rdx
v1 = *(_QWORD *)(a1 + 104);
if ( !v1 )
return 0LL;
result = 0LL;
v3 = 0LL;
while ( *(_WORD *)(v1 + 2 * v3) < 0x80u )
{
if ( ++v3 == 256 )
{
result = "pthread_self";
break;
}
}
v4 = 0LL;
while ( v4 == *(unsigned __int16 *)(v1 + 2 * v4) )
{
if ( ++v4 == 128 )
return result;
}
return (char *)((unsigned int)result | 0x2000);
}
| my_8bit_charset_flags_from_data:
MOV RCX,qword ptr [RDI + 0x68]
TEST RCX,RCX
JZ 0x00139d18
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
XOR EDX,EDX
LAB_00139ce6:
CMP word ptr [RCX + RDX*0x2],0x80
JNC 0x00139cff
INC RDX
CMP RDX,0x100
JNZ 0x00139ce6
MOV EAX,0x1000
LAB_00139cff:
XOR EDX,EDX
LAB_00139d01:
MOVZX ESI,word ptr [RCX + RDX*0x2]
CMP RDX,RSI
JNZ 0x00139d1b
INC RDX
CMP RDX,0x80
JNZ 0x00139d01
JMP 0x00139d20
LAB_00139d18:
XOR EAX,EAX
RET
LAB_00139d1b:
OR EAX,0x2000
LAB_00139d20:
POP RBP
RET
|
uint my_8bit_charset_flags_from_data(long param_1)
{
long lVar1;
uint uVar2;
long lVar3;
ulong uVar4;
lVar1 = *(long *)(param_1 + 0x68);
if (lVar1 == 0) {
return 0;
}
uVar2 = 0;
lVar3 = 0;
do {
if (0x7f < *(ushort *)(lVar1 + lVar3 * 2)) goto LAB_00139cff;
lVar3 = lVar3 + 1;
} while (lVar3 != 0x100);
uVar2 = 0x1000;
LAB_00139cff:
uVar4 = 0;
do {
if (uVar4 != *(ushort *)(lVar1 + uVar4 * 2)) {
return uVar2 | 0x2000;
}
uVar4 = uVar4 + 1;
} while (uVar4 != 0x80);
return uVar2;
}
| |
27,359 | r3d_render_auto_detect_mode | r3d/src/r3d_core.c | R3D_RenderMode r3d_render_auto_detect_mode(const Material* material)
{
// If the desired mode is opaque, then there is no need to perform further tests
if (R3D.state.render.blendMode == R3D_BLEND_OPAQUE) {
return R3D_RENDER_DEFERRED;
}
// If the blend mode is not alpha but also not opaque
// (such as additive or multiply), then we still need the forward render mode
if (R3D.state.render.blendMode != R3D_BLEND_ALPHA) {
return R3D_RENDER_FORWARD;
}
// Obtaining the albedo texture used in the material
unsigned int texId = material->maps[MATERIAL_MAP_ALBEDO].texture.id;
// Detecting if it is a default texture
bool defaultTex = (texId == 0 || texId == rlGetTextureIdDefault());
// Detecting if a transparency value is used for the albedo
bool alphaColor = (material->maps[MATERIAL_MAP_ALBEDO].color.a < 255);
// Detecting if the format of the used texture supports transparency
// NOTE: By default, we know that default textures do not contain transparency
bool alphaFormat = false;
if (!defaultTex) {
switch (material->maps[MATERIAL_MAP_ALBEDO].texture.format) {
case PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA:
case PIXELFORMAT_UNCOMPRESSED_R5G5B5A1:
case PIXELFORMAT_UNCOMPRESSED_R4G4B4A4:
case PIXELFORMAT_UNCOMPRESSED_R8G8B8A8:
case PIXELFORMAT_UNCOMPRESSED_R32G32B32A32:
case PIXELFORMAT_UNCOMPRESSED_R16G16B16A16:
case PIXELFORMAT_COMPRESSED_DXT1_RGBA:
case PIXELFORMAT_COMPRESSED_DXT3_RGBA:
case PIXELFORMAT_COMPRESSED_DXT5_RGBA:
case PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA:
case PIXELFORMAT_COMPRESSED_PVRT_RGBA:
case PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA:
case PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA:
alphaFormat = true;
break;
default:
break;
}
}
// If the color contains transparency or the texture format supports it
// and the current blend mode is alpha, then we will use the forward mode
if ((alphaColor || alphaFormat) && R3D.state.render.blendMode == R3D_BLEND_ALPHA) {
return R3D_RENDER_FORWARD;
}
// Here, the alpha blend mode is requested but transparency is not possible,
// so we can perform the rendering in deferred mode
return R3D_RENDER_DEFERRED;
} | O3 | c | r3d_render_auto_detect_mode:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0xe2268(%rip), %r14 # 0x1b0370
movl 0x1714(%r14), %ecx
movl $0x1, %eax
testl %ecx, %ecx
je 0xce18a
cmpl $0x1, %ecx
jne 0xce14b
movq %rdi, %rbx
movq 0x10(%rdi), %rcx
movl (%rcx), %r15d
testl %r15d, %r15d
je 0xce152
callq 0x1d4dc
movq 0x10(%rbx), %rdx
movb 0x17(%rdx), %cl
cmpl %eax, %r15d
jne 0xce15f
cmpb $-0x1, %cl
je 0xce185
movl 0x1714(%r14), %edx
jmp 0xce17b
movl $0x2, %eax
jmp 0xce18a
movl $0x2, %eax
cmpb $-0x1, 0x17(%rcx)
jne 0xce18a
jmp 0xce185
movl 0x10(%rdx), %eax
cmpl $0x18, %eax
ja 0xce13d
movl $0x1d3a4e4, %edx # imm = 0x1D3A4E4
btl %eax, %edx
jae 0xce13d
movl 0x1714(%r14), %edx
cmpb $-0x1, %cl
movl $0x2, %eax
cmpl $0x1, %edx
je 0xce18a
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| r3d_render_auto_detect_mode:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
lea r14, R3D
mov ecx, [r14+1714h]
mov eax, 1
test ecx, ecx
jz short loc_CE18A
cmp ecx, 1
jnz short loc_CE14B
mov rbx, rdi
mov rcx, [rdi+10h]
mov r15d, [rcx]
test r15d, r15d
jz short loc_CE152
call rlGetTextureIdDefault
mov rdx, [rbx+10h]
mov cl, [rdx+17h]
cmp r15d, eax
jnz short loc_CE15F
loc_CE13D:
cmp cl, 0FFh
jz short loc_CE185
mov edx, [r14+1714h]
jmp short loc_CE17B
loc_CE14B:
mov eax, 2
jmp short loc_CE18A
loc_CE152:
mov eax, 2
cmp byte ptr [rcx+17h], 0FFh
jnz short loc_CE18A
jmp short loc_CE185
loc_CE15F:
mov eax, [rdx+10h]
cmp eax, 18h
ja short loc_CE13D
mov edx, 1D3A4E4h
bt edx, eax
jnb short loc_CE13D
mov edx, [r14+1714h]
cmp cl, 0FFh
loc_CE17B:
mov eax, 2
cmp edx, 1
jz short loc_CE18A
loc_CE185:
mov eax, 1
loc_CE18A:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long r3d_render_auto_detect_mode(long long a1)
{
int v1; // ecx
long long result; // rax
int *v3; // rcx
int v4; // r15d
int TextureIdDefault; // eax
long long v6; // rdx
char v7; // cl
int v8; // edx
unsigned int v9; // eax
int v10; // edx
v1 = *(_DWORD *)&R3D[5908];
result = 1LL;
if ( v1 )
{
if ( v1 != 1 )
return 2LL;
v3 = *(int **)(a1 + 16);
v4 = *v3;
if ( *v3 )
{
TextureIdDefault = rlGetTextureIdDefault(a1);
v6 = *(_QWORD *)(a1 + 16);
v7 = *(_BYTE *)(v6 + 23);
if ( v4 != TextureIdDefault )
{
v9 = *(_DWORD *)(v6 + 16);
if ( v9 <= 0x18 )
{
v10 = 30647524;
if ( _bittest(&v10, v9) )
{
v8 = *(_DWORD *)&R3D[5908];
LABEL_13:
result = 2LL;
if ( v8 == 1 )
return result;
return 1LL;
}
}
}
if ( v7 != -1 )
{
v8 = *(_DWORD *)&R3D[5908];
goto LABEL_13;
}
}
else
{
result = 2LL;
if ( *((_BYTE *)v3 + 23) != 0xFF )
return result;
}
return 1LL;
}
return result;
}
| r3d_render_auto_detect_mode:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
LEA R14,[0x2b0370]
MOV ECX,dword ptr [R14 + 0x1714]
MOV EAX,0x1
TEST ECX,ECX
JZ 0x001ce18a
CMP ECX,0x1
JNZ 0x001ce14b
MOV RBX,RDI
MOV RCX,qword ptr [RDI + 0x10]
MOV R15D,dword ptr [RCX]
TEST R15D,R15D
JZ 0x001ce152
CALL 0x0011d4dc
MOV RDX,qword ptr [RBX + 0x10]
MOV CL,byte ptr [RDX + 0x17]
CMP R15D,EAX
JNZ 0x001ce15f
LAB_001ce13d:
CMP CL,0xff
JZ 0x001ce185
MOV EDX,dword ptr [R14 + 0x1714]
JMP 0x001ce17b
LAB_001ce14b:
MOV EAX,0x2
JMP 0x001ce18a
LAB_001ce152:
MOV EAX,0x2
CMP byte ptr [RCX + 0x17],0xff
JNZ 0x001ce18a
JMP 0x001ce185
LAB_001ce15f:
MOV EAX,dword ptr [RDX + 0x10]
CMP EAX,0x18
JA 0x001ce13d
MOV EDX,0x1d3a4e4
BT EDX,EAX
JNC 0x001ce13d
MOV EDX,dword ptr [R14 + 0x1714]
CMP CL,0xff
LAB_001ce17b:
MOV EAX,0x2
CMP EDX,0x1
JZ 0x001ce18a
LAB_001ce185:
MOV EAX,0x1
LAB_001ce18a:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int8 r3d_render_auto_detect_mode(long param_1)
{
int iVar1;
uint uVar2;
int iVar3;
int8 uVar4;
uVar4 = 1;
if (DAT_002b1a84 != 0) {
if (DAT_002b1a84 == 1) {
iVar1 = **(int **)(param_1 + 0x10);
if (iVar1 == 0) {
if (*(char *)((long)*(int **)(param_1 + 0x10) + 0x17) != -1) {
return 2;
}
}
else {
iVar3 = rlGetTextureIdDefault();
if (((((iVar1 != iVar3) &&
(uVar2 = *(uint *)(*(long *)(param_1 + 0x10) + 0x10), uVar2 < 0x19)) &&
((0x1d3a4e4U >> (uVar2 & 0x1f) & 1) != 0)) ||
(*(char *)(*(long *)(param_1 + 0x10) + 0x17) != -1)) && (DAT_002b1a84 == 1)) {
return 2;
}
}
uVar4 = 1;
}
else {
uVar4 = 2;
}
}
return uVar4;
}
| |
27,360 | ggml_can_repeat | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c | bool ggml_can_repeat(const struct ggml_tensor * t0, const struct ggml_tensor * t1) {
static_assert(GGML_MAX_DIMS == 4, "GGML_MAX_DIMS is not 4 - update this function");
return ggml_is_empty(t0) ? ggml_is_empty(t1) :
(t1->ne[0]%t0->ne[0] == 0) &&
(t1->ne[1]%t0->ne[1] == 0) &&
(t1->ne[2]%t0->ne[2] == 0) &&
(t1->ne[3]%t0->ne[3] == 0);
} | O2 | c | ggml_can_repeat:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x1d0c0
testb %al, %al
je 0x20f14
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1d0c0
movq 0x10(%r14), %rax
cqto
idivq 0x10(%rbx)
testq %rdx, %rdx
jne 0x20f41
movq 0x18(%r14), %rax
cqto
idivq 0x18(%rbx)
testq %rdx, %rdx
jne 0x20f41
movq 0x20(%r14), %rax
cqto
idivq 0x20(%rbx)
testq %rdx, %rdx
je 0x20f4b
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x28(%r14), %rax
cqto
idivq 0x28(%rbx)
testq %rdx, %rdx
sete %al
jmp 0x20f43
| ggml_can_repeat:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
call _ggml_is_empty
test al, al
jz short loc_20F14
mov rdi, r14
add rsp, 8
pop rbx
pop r14
jmp _ggml_is_empty
loc_20F14:
mov rax, [r14+10h]
cqo
idiv qword ptr [rbx+10h]
test rdx, rdx
jnz short loc_20F41
mov rax, [r14+18h]
cqo
idiv qword ptr [rbx+18h]
test rdx, rdx
jnz short loc_20F41
mov rax, [r14+20h]
cqo
idiv qword ptr [rbx+20h]
test rdx, rdx
jz short loc_20F4B
loc_20F41:
xor eax, eax
loc_20F43:
add rsp, 8
pop rbx
pop r14
retn
loc_20F4B:
mov rax, [r14+28h]
cqo
idiv qword ptr [rbx+28h]
test rdx, rdx
setz al
jmp short loc_20F43
| bool ggml_can_repeat(_QWORD *a1, long long *a2)
{
if ( ggml_is_empty((long long)a1) )
return ggml_is_empty((long long)a2);
if ( a2[2] % a1[2] || a2[3] % a1[3] || a2[4] % a1[4] )
return 0;
return a2[5] % a1[5] == 0;
}
| ggml_can_repeat:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
CALL 0x0011d0c0
TEST AL,AL
JZ 0x00120f14
MOV RDI,R14
ADD RSP,0x8
POP RBX
POP R14
JMP 0x0011d0c0
LAB_00120f14:
MOV RAX,qword ptr [R14 + 0x10]
CQO
IDIV qword ptr [RBX + 0x10]
TEST RDX,RDX
JNZ 0x00120f41
MOV RAX,qword ptr [R14 + 0x18]
CQO
IDIV qword ptr [RBX + 0x18]
TEST RDX,RDX
JNZ 0x00120f41
MOV RAX,qword ptr [R14 + 0x20]
CQO
IDIV qword ptr [RBX + 0x20]
TEST RDX,RDX
JZ 0x00120f4b
LAB_00120f41:
XOR EAX,EAX
LAB_00120f43:
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_00120f4b:
MOV RAX,qword ptr [R14 + 0x28]
CQO
IDIV qword ptr [RBX + 0x28]
TEST RDX,RDX
SETZ AL
JMP 0x00120f43
|
int8 ggml_can_repeat(long param_1,long param_2)
{
char cVar1;
int8 uVar2;
cVar1 = ggml_is_empty();
if (cVar1 != '\0') {
uVar2 = ggml_is_empty(param_2);
return uVar2;
}
if (((*(long *)(param_2 + 0x10) % *(long *)(param_1 + 0x10) == 0) &&
(*(long *)(param_2 + 0x18) % *(long *)(param_1 + 0x18) == 0)) &&
(*(long *)(param_2 + 0x20) % *(long *)(param_1 + 0x20) == 0)) {
uVar2 = CONCAT71((int7)((ulong)(*(long *)(param_2 + 0x28) / *(long *)(param_1 + 0x28)) >> 8),
*(long *)(param_2 + 0x28) % *(long *)(param_1 + 0x28) == 0);
}
else {
uVar2 = 0;
}
return uVar2;
}
| |
27,361 | CollisionComponent::fixed_update(Dimension*) | untodesu[P]voxelius/game/shared/collision.cc | void CollisionComponent::fixed_update(Dimension *dimension)
{
// FIXME: this isn't particularly accurate considering
// some voxels might be passable and some other voxels
// might apply some slowing factor; what I might do in the
// future is to add a specific value to the voxel registry
// entries that would specify the amount of force we apply
// to prevent player movement inside a specific voxel, plus
// we shouldn't treat all voxels as full cubes if we want
// to support slabs, stairs and non-full liquid voxels in the future
auto group = dimension->entities.group<CollisionComponent>(entt::get<TransformComponent, VelocityComponent>);
for(auto [entity, collision, transform, velocity] : group.each()) {
auto surface = voxel_surface::UNKNOWN;
auto vertical_move = vgrid_collide(dimension, 1, collision, transform, velocity, surface);
if(dimension->entities.any_of<GravityComponent>(entity)) {
if(vertical_move == cxpr::sign<int>(dimension->get_gravity()))
dimension->entities.emplace_or_replace<GroundedComponent>(entity, GroundedComponent{surface});
else dimension->entities.remove<GroundedComponent>(entity);
}
else {
// The entity cannot be grounded because the component
// setup of said entity should not let it comprehend the
// concept of resting on the ground (it flies around)
dimension->entities.remove<GroundedComponent>(entity);
}
vgrid_collide(dimension, 0, collision, transform, velocity, surface);
vgrid_collide(dimension, 2, collision, transform, velocity, surface);
}
} | O2 | cpp | CollisionComponent::fixed_update(Dimension*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %r14
addq $0x158, %rdi # imm = 0x158
movq %rdi, 0x8(%rsp)
callq 0x6cd54
testq %rax, %rax
je 0x6c756
movq 0x8(%rax), %rcx
movdqu 0x10(%rax), %xmm0
leaq 0x20(%rcx), %rdx
movq 0x28(%rax), %rax
jmp 0x6c760
pxor %xmm0, %xmm0
xorl %ecx, %ecx
xorl %edx, %edx
xorl %eax, %eax
leaq 0x30(%rsp), %rsi
movq %rdx, (%rsi)
movq %rax, 0x8(%rsi)
pshufd $0x4e, %xmm0, %xmm0 # xmm0 = xmm0[2,3,0,1]
movdqu %xmm0, 0x10(%rsi)
movq %rcx, 0x20(%rsi)
leaq 0x4(%rsp), %r13
movq 0x8(%rsp), %rbx
testq %rax, %rax
je 0x6c872
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x6ce9c
movq 0x20(%rsp), %r12
movq 0x10(%rsp), %rbp
movq 0x18(%rsp), %r15
orw $-0x1, 0x4(%rsp)
movq %r14, %rdi
pushq $0x1
popq %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %rbp, %r8
movq %r13, %r9
callq 0x6c881
movl %eax, %r13d
movl 0x28(%rsp), %esi
movq %rbx, %rdi
callq 0x6e652
testb %al, %al
je 0x6c81b
movq %r14, %rdi
callq 0x6e86a
xorl %eax, %eax
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
seta %al
ucomiss %xmm0, %xmm1
pushq $-0x1
popq %rcx
cmoval %ecx, %eax
movl 0x28(%rsp), %esi
cmpl %eax, %r13d
jne 0x6c824
movzwl 0x4(%rsp), %eax
movw %ax, 0x6(%rsp)
movq 0x8(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0x6cf1a
jmp 0x6c82e
movl 0x28(%rsp), %esi
movq %rbx, %rdi
jmp 0x6c829
movq 0x8(%rsp), %rdi
callq 0x6cfa6
leaq 0x4(%rsp), %r13
movq %r14, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r15, %rcx
movq %rbp, %r8
movq %r13, %r9
callq 0x6c881
movq %r14, %rdi
pushq $0x2
popq %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %rbp, %r8
movq %r13, %r9
callq 0x6c881
movq 0x38(%rsp), %rax
decq %rax
movq %rax, 0x38(%rsp)
jmp 0x6c784
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN18CollisionComponent12fixed_updateEP9Dimension:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r14, rdi
add rdi, 158h
mov [rsp+88h+var_80], rdi
call _ZN4entt14basic_registryINS_6entityESaIS1_EE5groupIJ18CollisionComponentEJ18TransformComponent17VelocityComponentEJEEENS_11basic_groupINS_7owned_tIJDpNS_11storage_forIT_S1_SaINSt12remove_constISB_E4typeEEE4typeEEEENS_5get_tIJDpNSA_IT0_S1_SaINSC_ISL_E4typeEEE4typeEEEENS_9exclude_tIJDpNSA_IT1_S1_SaINSC_ISU_E4typeEEE4typeEEEEEENSK_IJDpSL_EEENST_IJDpSU_EEE
test rax, rax
jz short loc_6C756
mov rcx, [rax+8]
movdqu xmm0, xmmword ptr [rax+10h]
lea rdx, [rcx+20h]
mov rax, [rax+28h]
jmp short loc_6C760
loc_6C756:
pxor xmm0, xmm0
xor ecx, ecx
xor edx, edx
xor eax, eax
loc_6C760:
lea rsi, [rsp+88h+var_58]
mov [rsi], rdx
mov [rsi+8], rax
pshufd xmm0, xmm0, 4Eh ; 'N'
movdqu xmmword ptr [rsi+10h], xmm0
mov [rsi+20h], rcx
lea r13, [rsp+88h+var_84]
mov rbx, [rsp+88h+var_80]
loc_6C784:
test rax, rax
jz loc_6C872
lea rdi, [rsp+88h+var_78]
lea rsi, [rsp+88h+var_58]
call _ZNK4entt8internal23extended_group_iteratorINS0_19sparse_set_iteratorISt6vectorINS_6entityESaIS4_EEEENS_7owned_tIJNS_16basic_sigh_mixinINS_13basic_storageI18CollisionComponentS4_SaISB_EvEENS_14basic_registryIS4_S5_EEEEEEENS_5get_tIJNS9_INSA_I18TransformComponentS4_SaISJ_EvEESF_EENS9_INSA_I17VelocityComponentS4_SaISN_EvEESF_EEEEEEdeEv; entt::internal::extended_group_iterator<entt::internal::sparse_set_iterator<std::vector<entt::entity>>,entt::owned_t<entt::basic_sigh_mixin<entt::basic_storage<CollisionComponent,entt::entity,std::allocator<CollisionComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::get_t<entt::basic_sigh_mixin<entt::basic_storage<TransformComponent,entt::entity,std::allocator<TransformComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>,entt::basic_sigh_mixin<entt::basic_storage<VelocityComponent,entt::entity,std::allocator<VelocityComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>>::operator*(void)
mov r12, [rsp+88h+var_68]
mov rbp, [rsp+88h+var_78]
mov r15, [rsp+88h+var_70]
or [rsp+88h+var_84], 0FFFFh
mov rdi, r14
push 1
pop rsi
mov rdx, r12
mov rcx, r15
mov r8, rbp
mov r9, r13
call _ZL13vgrid_collidePK9DimensioniR18CollisionComponentR18TransformComponentR17VelocityComponentR13voxel_surface; vgrid_collide(Dimension const*,int,CollisionComponent &,TransformComponent &,VelocityComponent &,voxel_surface &)
mov r13d, eax
mov esi, [rsp+88h+var_60]
mov rdi, rbx
call _ZNK4entt14basic_registryINS_6entityESaIS1_EE6all_ofIJ16GravityComponentEEEbS1_; entt::basic_registry<entt::entity,std::allocator<entt::entity>>::all_of<GravityComponent>(entt::entity)
test al, al
jz short loc_6C81B
mov rdi, r14; this
call _ZNK9Dimension11get_gravityEv; Dimension::get_gravity(void)
xor eax, eax
xorps xmm1, xmm1
ucomiss xmm0, xmm1
setnbe al
ucomiss xmm1, xmm0
push 0FFFFFFFFFFFFFFFFh
pop rcx
cmova eax, ecx
mov esi, [rsp+88h+var_60]
cmp r13d, eax
jnz short loc_6C824
movzx eax, [rsp+88h+var_84]
mov [rsp+88h+var_82], ax
mov rdi, [rsp+88h+var_80]
lea rdx, [rsp+88h+var_82]
call _ZN4entt14basic_registryINS_6entityESaIS1_EE18emplace_or_replaceI17GroundedComponentJS5_EEEDcS1_DpOT0_
jmp short loc_6C82E
loc_6C81B:
mov esi, [rsp+88h+var_60]
mov rdi, rbx
jmp short loc_6C829
loc_6C824:
mov rdi, [rsp+88h+var_80]
loc_6C829:
call _ZN4entt14basic_registryINS_6entityESaIS1_EE6removeI17GroundedComponentJEEEmS1_; entt::basic_registry<entt::entity,std::allocator<entt::entity>>::remove<GroundedComponent>(entt::entity)
loc_6C82E:
lea r13, [rsp+88h+var_84]
mov rdi, r14
xor esi, esi
mov rdx, r12
mov rcx, r15
mov r8, rbp
mov r9, r13
call _ZL13vgrid_collidePK9DimensioniR18CollisionComponentR18TransformComponentR17VelocityComponentR13voxel_surface; vgrid_collide(Dimension const*,int,CollisionComponent &,TransformComponent &,VelocityComponent &,voxel_surface &)
mov rdi, r14
push 2
pop rsi
mov rdx, r12
mov rcx, r15
mov r8, rbp
mov r9, r13
call _ZL13vgrid_collidePK9DimensioniR18CollisionComponentR18TransformComponentR17VelocityComponentR13voxel_surface; vgrid_collide(Dimension const*,int,CollisionComponent &,TransformComponent &,VelocityComponent &,voxel_surface &)
mov rax, [rsp+88h+var_50]
dec rax
mov [rsp+88h+var_50], rax
jmp loc_6C784
loc_6C872:
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long CollisionComponent::fixed_update(CollisionComponent *this, Dimension *a2)
{
const __m128i *v3; // rax
long long v4; // rcx
__m128i v5; // xmm0
long long v6; // rdx
long long result; // rax
__m128i v8; // xmm0
char *v9; // rbx
long long v10; // r12
long long v11; // rbp
long long v12; // r15
int v13; // r13d
int v14; // eax
long long v15; // rsi
char *v16; // rdi
__int16 v17; // [rsp+4h] [rbp-84h] BYREF
__int16 v18; // [rsp+6h] [rbp-82h] BYREF
char *v19; // [rsp+8h] [rbp-80h]
long long v20; // [rsp+10h] [rbp-78h] BYREF
long long v21; // [rsp+18h] [rbp-70h]
long long v22; // [rsp+20h] [rbp-68h]
unsigned int v23; // [rsp+28h] [rbp-60h]
long long v24; // [rsp+30h] [rbp-58h] BYREF
long long v25; // [rsp+38h] [rbp-50h]
__m128i v26; // [rsp+40h] [rbp-48h]
long long v27; // [rsp+50h] [rbp-38h]
v19 = (char *)this + 344;
v3 = (const __m128i *)entt::basic_registry<entt::entity,std::allocator<entt::entity>>::group<CollisionComponent,TransformComponent,VelocityComponent>(
(char *)this + 344,
a2);
if ( v3 )
{
v4 = v3->m128i_i64[1];
v5 = _mm_loadu_si128(v3 + 1);
v6 = v4 + 32;
result = v3[2].m128i_i64[1];
}
else
{
v5 = 0LL;
v4 = 0LL;
v6 = 0LL;
result = 0LL;
}
v24 = v6;
v25 = result;
v8 = _mm_shuffle_epi32(v5, 78);
v26 = v8;
v27 = v4;
v9 = v19;
while ( result )
{
entt::internal::extended_group_iterator<entt::internal::sparse_set_iterator<std::vector<entt::entity>>,entt::owned_t<entt::basic_sigh_mixin<entt::basic_storage<CollisionComponent,entt::entity,std::allocator<CollisionComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::get_t<entt::basic_sigh_mixin<entt::basic_storage<TransformComponent,entt::entity,std::allocator<TransformComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>,entt::basic_sigh_mixin<entt::basic_storage<VelocityComponent,entt::entity,std::allocator<VelocityComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>>::operator*(
&v20,
&v24);
v10 = v22;
v11 = v20;
v12 = v21;
v17 = -1;
v13 = vgrid_collide(this, 1LL, v22, v21, v20, &v17);
if ( (unsigned __int8)entt::basic_registry<entt::entity,std::allocator<entt::entity>>::all_of<GravityComponent>(
v9,
v23) )
{
Dimension::get_gravity(this);
v14 = *(float *)v8.m128i_i32 > 0.0;
if ( *(float *)v8.m128i_i32 < 0.0 )
v14 = -1;
v15 = v23;
if ( v13 == v14 )
{
v18 = v17;
entt::basic_registry<entt::entity,std::allocator<entt::entity>>::emplace_or_replace<GroundedComponent,GroundedComponent>(
v19,
v23,
&v18);
goto LABEL_14;
}
v16 = v19;
}
else
{
v15 = v23;
v16 = v9;
}
entt::basic_registry<entt::entity,std::allocator<entt::entity>>::remove<GroundedComponent>(v16, v15);
LABEL_14:
vgrid_collide(this, 0LL, v10, v12, v11, &v17);
vgrid_collide(this, 2LL, v10, v12, v11, &v17);
result = --v25;
}
return result;
}
| fixed_update:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R14,RDI
ADD RDI,0x158
MOV qword ptr [RSP + 0x8],RDI
CALL 0x0016cd54
TEST RAX,RAX
JZ 0x0016c756
MOV RCX,qword ptr [RAX + 0x8]
MOVDQU XMM0,xmmword ptr [RAX + 0x10]
LEA RDX,[RCX + 0x20]
MOV RAX,qword ptr [RAX + 0x28]
JMP 0x0016c760
LAB_0016c756:
PXOR XMM0,XMM0
XOR ECX,ECX
XOR EDX,EDX
XOR EAX,EAX
LAB_0016c760:
LEA RSI,[RSP + 0x30]
MOV qword ptr [RSI],RDX
MOV qword ptr [RSI + 0x8],RAX
PSHUFD XMM0,XMM0,0x4e
MOVDQU xmmword ptr [RSI + 0x10],XMM0
MOV qword ptr [RSI + 0x20],RCX
LEA R13,[RSP + 0x4]
MOV RBX,qword ptr [RSP + 0x8]
LAB_0016c784:
TEST RAX,RAX
JZ 0x0016c872
LEA RDI,[RSP + 0x10]
LEA RSI,[RSP + 0x30]
CALL 0x0016ce9c
MOV R12,qword ptr [RSP + 0x20]
MOV RBP,qword ptr [RSP + 0x10]
MOV R15,qword ptr [RSP + 0x18]
OR word ptr [RSP + 0x4],0xffff
MOV RDI,R14
PUSH 0x1
POP RSI
MOV RDX,R12
MOV RCX,R15
MOV R8,RBP
MOV R9,R13
CALL 0x0016c881
MOV R13D,EAX
MOV ESI,dword ptr [RSP + 0x28]
MOV RDI,RBX
CALL 0x0016e652
TEST AL,AL
JZ 0x0016c81b
MOV RDI,R14
CALL 0x0016e86a
XOR EAX,EAX
XORPS XMM1,XMM1
UCOMISS XMM0,XMM1
SETA AL
UCOMISS XMM1,XMM0
PUSH -0x1
POP RCX
CMOVA EAX,ECX
MOV ESI,dword ptr [RSP + 0x28]
CMP R13D,EAX
JNZ 0x0016c824
MOVZX EAX,word ptr [RSP + 0x4]
MOV word ptr [RSP + 0x6],AX
MOV RDI,qword ptr [RSP + 0x8]
LEA RDX,[RSP + 0x6]
CALL 0x0016cf1a
JMP 0x0016c82e
LAB_0016c81b:
MOV ESI,dword ptr [RSP + 0x28]
MOV RDI,RBX
JMP 0x0016c829
LAB_0016c824:
MOV RDI,qword ptr [RSP + 0x8]
LAB_0016c829:
CALL 0x0016cfa6
LAB_0016c82e:
LEA R13,[RSP + 0x4]
MOV RDI,R14
XOR ESI,ESI
MOV RDX,R12
MOV RCX,R15
MOV R8,RBP
MOV R9,R13
CALL 0x0016c881
MOV RDI,R14
PUSH 0x2
POP RSI
MOV RDX,R12
MOV RCX,R15
MOV R8,RBP
MOV R9,R13
CALL 0x0016c881
MOV RAX,qword ptr [RSP + 0x38]
DEC RAX
MOV qword ptr [RSP + 0x38],RAX
JMP 0x0016c784
LAB_0016c872:
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* CollisionComponent::fixed_update(Dimension*) */
void CollisionComponent::fixed_update(Dimension *param_1)
{
basic_registry<entt::entity,std::allocator<entt::entity>> *pbVar1;
VelocityComponent *pVVar2;
TransformComponent *pTVar3;
CollisionComponent *pCVar4;
bool bVar5;
uint uVar6;
uint uVar7;
long lVar8;
basic_registry<entt::entity,std::allocator<entt::entity>> *pbVar9;
float fVar10;
int1 auVar11 [16];
int2 local_84;
int2 local_82;
basic_registry<entt::entity,std::allocator<entt::entity>> *local_80;
VelocityComponent *local_78;
TransformComponent *local_70;
CollisionComponent *local_68;
int4 local_60;
long local_58;
long local_50;
int1 local_48 [16];
long local_38;
local_80 = (basic_registry<entt::entity,std::allocator<entt::entity>> *)(param_1 + 0x158);
lVar8 = entt::basic_registry<entt::entity,std::allocator<entt::entity>>::
group<CollisionComponent,TransformComponent,VelocityComponent>();
pbVar1 = local_80;
if (lVar8 == 0) {
auVar11 = (int1 [16])0x0;
local_38 = 0;
local_58 = 0;
local_50 = 0;
}
else {
local_38 = *(long *)(lVar8 + 8);
auVar11 = *(int1 (*) [16])(lVar8 + 0x10);
local_58 = local_38 + 0x20;
local_50 = *(long *)(lVar8 + 0x28);
}
local_48._0_8_ = auVar11._8_8_;
local_48._8_4_ = auVar11._0_4_;
local_48._12_4_ = auVar11._4_4_;
do {
if (local_50 == 0) {
return;
}
entt::internal::
extended_group_iterator<entt::internal::sparse_set_iterator<std::vector<entt::entity,std::allocator<entt::entity>>>,entt::owned_t<entt::basic_sigh_mixin<entt::basic_storage<CollisionComponent,entt::entity,std::allocator<CollisionComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::get_t<entt::basic_sigh_mixin<entt::basic_storage<TransformComponent,entt::entity,std::allocator<TransformComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>,entt::basic_sigh_mixin<entt::basic_storage<VelocityComponent,entt::entity,std::allocator<VelocityComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>>
::operator*((extended_group_iterator<entt::internal::sparse_set_iterator<std::vector<entt::entity,std::allocator<entt::entity>>>,entt::owned_t<entt::basic_sigh_mixin<entt::basic_storage<CollisionComponent,entt::entity,std::allocator<CollisionComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::get_t<entt::basic_sigh_mixin<entt::basic_storage<TransformComponent,entt::entity,std::allocator<TransformComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>,entt::basic_sigh_mixin<entt::basic_storage<VelocityComponent,entt::entity,std::allocator<VelocityComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>>
*)&local_78);
pCVar4 = local_68;
pTVar3 = local_70;
pVVar2 = local_78;
local_84 = 0xffff;
uVar6 = vgrid_collide(param_1,1,local_68,local_70,local_78,(voxel_surface *)&local_84);
bVar5 = entt::basic_registry<entt::entity,std::allocator<entt::entity>>::
all_of<GravityComponent>(pbVar1,local_60);
pbVar9 = pbVar1;
if (bVar5) {
fVar10 = (float)Dimension::get_gravity(param_1);
uVar7 = (uint)(0.0 < fVar10);
if (fVar10 < 0.0) {
uVar7 = 0xffffffff;
}
pbVar9 = local_80;
if (uVar6 != uVar7) goto LAB_0016c829;
local_82 = local_84;
entt::basic_registry<entt::entity,std::allocator<entt::entity>>::
emplace_or_replace<GroundedComponent,GroundedComponent>(local_80,local_60,&local_82);
}
else {
LAB_0016c829:
entt::basic_registry<entt::entity,std::allocator<entt::entity>>::remove<GroundedComponent>
(pbVar9);
}
vgrid_collide(param_1,0,pCVar4,pTVar3,pVVar2,(voxel_surface *)&local_84);
vgrid_collide(param_1,2,pCVar4,pTVar3,pVVar2,(voxel_surface *)&local_84);
local_50 = local_50 + -1;
} while( true );
}
| |
27,362 | mi_read_cache | eloqsql/storage/myisam/mi_cache.c | int _mi_read_cache(IO_CACHE *info, uchar *buff, my_off_t pos, size_t length,
int flag)
{
size_t read_length,in_buff_length;
my_off_t offset;
uchar *in_buff_pos;
DBUG_ENTER("_mi_read_cache");
DBUG_ASSERT(!(info->myflags & MY_ENCRYPT));
if (pos < info->pos_in_file)
{
read_length=length;
if ((my_off_t) read_length > (my_off_t) (info->pos_in_file-pos))
read_length=(size_t)(info->pos_in_file-pos);
info->seek_not_done=1;
if (mysql_file_pread(info->file, buff, read_length, pos, MYF(MY_NABP)))
DBUG_RETURN(1);
if (!(length-=read_length))
DBUG_RETURN(0);
pos+=read_length;
buff+=read_length;
}
if (pos >= info->pos_in_file &&
(offset= (my_off_t) (pos - info->pos_in_file)) <
(my_off_t) (info->read_end - info->request_pos))
{
in_buff_pos=info->request_pos+ (uint)offset;
in_buff_length= MY_MIN(length, (size_t)(info->read_end-in_buff_pos));
memcpy(buff,info->request_pos+(uint) offset, in_buff_length);
if (!(length-=in_buff_length))
DBUG_RETURN(0);
pos+=in_buff_length;
buff+=in_buff_length;
}
else
in_buff_length=0;
if (flag & READING_NEXT)
{
if (pos != (info->pos_in_file +
(uint) (info->read_end - info->request_pos)))
{
info->pos_in_file=pos; /* Force start here */
info->read_pos=info->read_end=info->request_pos; /* Everything used */
info->seek_not_done=1;
}
else
info->read_pos=info->read_end; /* All block used */
if (!_my_b_read(info,buff,length))
DBUG_RETURN(0);
read_length=info->error;
}
else
{
info->seek_not_done=1;
if ((read_length= mysql_file_pread(info->file, buff, length, pos,
MYF(0))) == length)
DBUG_RETURN(0);
}
if (!(flag & READING_HEADER) || (int) read_length == -1 ||
read_length+in_buff_length < 3)
{
DBUG_PRINT("error",
("Error %d reading next-multi-part block (Got %d bytes)",
my_errno, (int) read_length));
if (!my_errno || my_errno == -1 || my_errno == HA_ERR_FILE_TOO_SHORT)
my_errno= HA_ERR_WRONG_IN_RECORD;
DBUG_RETURN(1);
}
bzero(buff+read_length,MI_BLOCK_INFO_HEADER_LENGTH - in_buff_length -
read_length);
DBUG_RETURN(0);
} | O0 | c | mi_read_cache:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
jmp 0xd67ce
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
jae 0xd6896
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
subq -0x20(%rbp), %rcx
cmpq %rcx, %rax
jbe 0xd680a
movq -0x10(%rbp), %rax
movq (%rax), %rax
subq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl $0x1, 0xe0(%rax)
movq -0x10(%rbp), %rax
movl 0xd4(%rax), %edx
movq -0x18(%rbp), %rcx
movq -0x38(%rbp), %r8
movq -0x20(%rbp), %r9
leaq 0x7d276(%rip), %rdi # 0x153aab
movl $0x35, %esi
movq $0x4, (%rsp)
callq 0xd6b20
cmpq $0x0, %rax
je 0xd685b
jmp 0xd684f
movl $0x1, -0x4(%rbp)
jmp 0xd6b0f
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0xd687e
jmp 0xd6872
movl $0x0, -0x4(%rbp)
jmp 0xd6b0f
movq -0x38(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x38(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
jb 0xd697f
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
subq (%rcx), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq -0x10(%rbp), %rdx
movq 0x28(%rdx), %rdx
subq %rdx, %rcx
cmpq %rcx, %rax
jae 0xd697f
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x48(%rbp), %rcx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq -0x50(%rbp), %rdx
subq %rdx, %rcx
cmpq %rcx, %rax
jae 0xd6909
movq -0x28(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0xd691c
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x50(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rsi
movq -0x48(%rbp), %rax
movl %eax, %eax
addq %rax, %rsi
movq -0x40(%rbp), %rdx
callq 0x2a090
movq -0x40(%rbp), %rcx
movq -0x28(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0xd6965
jmp 0xd6959
movl $0x0, -0x4(%rbp)
jmp 0xd6b0f
movq -0x40(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x40(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0xd6987
movq $0x0, -0x40(%rbp)
movl -0x2c(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xd6a36
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movq -0x10(%rbp), %rdx
movq 0x18(%rdx), %rdx
movq -0x10(%rbp), %rsi
movq 0x28(%rsi), %rsi
subq %rsi, %rdx
movl %edx, %edx
addq %rdx, %rcx
cmpq %rcx, %rax
je 0xd69f1
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0xe0(%rax)
jmp 0xd6a01
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0xe0d10
cmpl $0x0, %eax
jne 0xd6a25
jmp 0xd6a19
movl $0x0, -0x4(%rbp)
jmp 0xd6b0f
movq -0x10(%rbp), %rax
movslq 0xe4(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0xd6a8f
movq -0x10(%rbp), %rax
movl $0x1, 0xe0(%rax)
movq -0x10(%rbp), %rax
movl 0xd4(%rax), %edx
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %r8
movq -0x20(%rbp), %r9
leaq 0x7d04a(%rip), %rdi # 0x153aab
movl $0x5d, %esi
xorl %eax, %eax
movq $0x0, (%rsp)
callq 0xd6b20
movq %rax, -0x38(%rbp)
cmpq -0x28(%rbp), %rax
jne 0xd6a8d
jmp 0xd6a81
movl $0x0, -0x4(%rbp)
jmp 0xd6b0f
jmp 0xd6a8f
movl -0x2c(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0xd6ab1
movq -0x38(%rbp), %rax
cmpl $-0x1, %eax
je 0xd6ab1
movq -0x38(%rbp), %rax
addq -0x40(%rbp), %rax
cmpq $0x3, %rax
jae 0xd6aec
jmp 0xd6ab3
jmp 0xd6ab5
callq 0xf6210
cmpl $0x0, (%rax)
je 0xd6ad6
callq 0xf6210
cmpl $-0x1, (%rax)
je 0xd6ad6
callq 0xf6210
cmpl $0xaf, (%rax)
jne 0xd6ae1
callq 0xf6210
movl $0x7f, (%rax)
jmp 0xd6ae3
movl $0x1, -0x4(%rbp)
jmp 0xd6b0f
movq -0x18(%rbp), %rdi
addq -0x38(%rbp), %rdi
movl $0x14, %edx
subq -0x40(%rbp), %rdx
subq -0x38(%rbp), %rdx
xorl %esi, %esi
callq 0x2a2a0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _mi_read_cache:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_2C], r8d
jmp short $+2
loc_D67CE:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
cmp rax, [rcx]
jnb loc_D6896
mov rax, [rbp+var_28]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
sub rcx, [rbp+var_20]
cmp rax, rcx
jbe short loc_D680A
mov rax, [rbp+var_10]
mov rax, [rax]
sub rax, [rbp+var_20]
mov [rbp+var_38], rax
loc_D680A:
mov rax, [rbp+var_10]
mov dword ptr [rax+0E0h], 1
mov rax, [rbp+var_10]
mov edx, [rax+0D4h]
mov rcx, [rbp+var_18]
mov r8, [rbp+var_38]
mov r9, [rbp+var_20]
lea rdi, aWorkspaceLlm4b_32; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 35h ; '5'
mov [rsp+60h+var_60], 4
call inline_mysql_file_pread_8
cmp rax, 0
jz short loc_D685B
jmp short $+2
loc_D684F:
mov [rbp+var_4], 1
jmp loc_D6B0F
loc_D685B:
mov rcx, [rbp+var_38]
mov rax, [rbp+var_28]
sub rax, rcx
mov [rbp+var_28], rax
cmp rax, 0
jnz short loc_D687E
jmp short $+2
loc_D6872:
mov [rbp+var_4], 0
jmp loc_D6B0F
loc_D687E:
mov rax, [rbp+var_38]
add rax, [rbp+var_20]
mov [rbp+var_20], rax
mov rax, [rbp+var_38]
add rax, [rbp+var_18]
mov [rbp+var_18], rax
loc_D6896:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
cmp rax, [rcx]
jb loc_D697F
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
sub rax, [rcx]
mov [rbp+var_48], rax
mov rcx, [rbp+var_10]
mov rcx, [rcx+18h]
mov rdx, [rbp+var_10]
mov rdx, [rdx+28h]
sub rcx, rdx
cmp rax, rcx
jnb loc_D697F
mov rax, [rbp+var_10]
mov rax, [rax+28h]
mov rcx, [rbp+var_48]
mov ecx, ecx
add rax, rcx
mov [rbp+var_50], rax
mov rax, [rbp+var_28]
mov rcx, [rbp+var_10]
mov rcx, [rcx+18h]
mov rdx, [rbp+var_50]
sub rcx, rdx
cmp rax, rcx
jnb short loc_D6909
mov rax, [rbp+var_28]
mov [rbp+var_58], rax
jmp short loc_D691C
loc_D6909:
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov rcx, [rbp+var_50]
sub rax, rcx
mov [rbp+var_58], rax
loc_D691C:
mov rax, [rbp+var_58]
mov [rbp+var_40], rax
mov rdi, [rbp+var_18]
mov rax, [rbp+var_10]
mov rsi, [rax+28h]
mov rax, [rbp+var_48]
mov eax, eax
add rsi, rax
mov rdx, [rbp+var_40]
call _memcpy
mov rcx, [rbp+var_40]
mov rax, [rbp+var_28]
sub rax, rcx
mov [rbp+var_28], rax
cmp rax, 0
jnz short loc_D6965
jmp short $+2
loc_D6959:
mov [rbp+var_4], 0
jmp loc_D6B0F
loc_D6965:
mov rax, [rbp+var_40]
add rax, [rbp+var_20]
mov [rbp+var_20], rax
mov rax, [rbp+var_40]
add rax, [rbp+var_18]
mov [rbp+var_18], rax
jmp short loc_D6987
loc_D697F:
mov [rbp+var_40], 0
loc_D6987:
mov eax, [rbp+var_2C]
and eax, 1
cmp eax, 0
jz loc_D6A36
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
mov rdx, [rbp+var_10]
mov rdx, [rdx+18h]
mov rsi, [rbp+var_10]
mov rsi, [rsi+28h]
sub rdx, rsi
mov edx, edx
add rcx, rdx
cmp rax, rcx
jz short loc_D69F1
mov rcx, [rbp+var_20]
mov rax, [rbp+var_10]
mov [rax], rcx
mov rax, [rbp+var_10]
mov rcx, [rax+28h]
mov rax, [rbp+var_10]
mov [rax+18h], rcx
mov rax, [rbp+var_10]
mov [rax+10h], rcx
mov rax, [rbp+var_10]
mov dword ptr [rax+0E0h], 1
jmp short loc_D6A01
loc_D69F1:
mov rax, [rbp+var_10]
mov rcx, [rax+18h]
mov rax, [rbp+var_10]
mov [rax+10h], rcx
loc_D6A01:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_28]
call _my_b_read
cmp eax, 0
jnz short loc_D6A25
jmp short $+2
loc_D6A19:
mov [rbp+var_4], 0
jmp loc_D6B0F
loc_D6A25:
mov rax, [rbp+var_10]
movsxd rax, dword ptr [rax+0E4h]
mov [rbp+var_38], rax
jmp short loc_D6A8F
loc_D6A36:
mov rax, [rbp+var_10]
mov dword ptr [rax+0E0h], 1
mov rax, [rbp+var_10]
mov edx, [rax+0D4h]
mov rcx, [rbp+var_18]
mov r8, [rbp+var_28]
mov r9, [rbp+var_20]
lea rdi, aWorkspaceLlm4b_32; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 5Dh ; ']'
xor eax, eax
mov [rsp+60h+var_60], 0
call inline_mysql_file_pread_8
mov [rbp+var_38], rax
cmp rax, [rbp+var_28]
jnz short loc_D6A8D
jmp short $+2
loc_D6A81:
mov [rbp+var_4], 0
jmp loc_D6B0F
loc_D6A8D:
jmp short $+2
loc_D6A8F:
mov eax, [rbp+var_2C]
and eax, 2
cmp eax, 0
jz short loc_D6AB1
mov rax, [rbp+var_38]
cmp eax, 0FFFFFFFFh
jz short loc_D6AB1
mov rax, [rbp+var_38]
add rax, [rbp+var_40]
cmp rax, 3
jnb short loc_D6AEC
loc_D6AB1:
jmp short $+2
loc_D6AB3:
jmp short $+2
loc_D6AB5:
call _my_thread_var
cmp dword ptr [rax], 0
jz short loc_D6AD6
call _my_thread_var
cmp dword ptr [rax], 0FFFFFFFFh
jz short loc_D6AD6
call _my_thread_var
cmp dword ptr [rax], 0AFh
jnz short loc_D6AE1
loc_D6AD6:
call _my_thread_var
mov dword ptr [rax], 7Fh
loc_D6AE1:
jmp short $+2
loc_D6AE3:
mov [rbp+var_4], 1
jmp short loc_D6B0F
loc_D6AEC:
mov rdi, [rbp+var_18]
add rdi, [rbp+var_38]
mov edx, 14h
sub rdx, [rbp+var_40]
sub rdx, [rbp+var_38]
xor esi, esi
call _memset
mov [rbp+var_4], 0
loc_D6B0F:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
| long long mi_read_cache(char *a1, const char *a2, unsigned long long a3, unsigned long long a4, char a5)
{
long long v5; // rcx
const char *v6; // rsi
unsigned long long v8; // [rsp+8h] [rbp-58h]
long long v9; // [rsp+10h] [rbp-50h]
unsigned long long v10; // [rsp+18h] [rbp-48h]
unsigned long long v11; // [rsp+20h] [rbp-40h]
unsigned long long v12; // [rsp+28h] [rbp-38h]
long long v13; // [rsp+28h] [rbp-38h]
unsigned long long v15; // [rsp+38h] [rbp-28h]
unsigned long long v16; // [rsp+40h] [rbp-20h]
const char *v17; // [rsp+48h] [rbp-18h]
char *v18; // [rsp+50h] [rbp-10h]
v18 = a1;
v17 = a2;
v16 = a3;
v15 = a4;
if ( a3 < *(_QWORD *)a1 )
{
v12 = a4;
if ( a4 > *(_QWORD *)a1 - a3 )
v12 = *(_QWORD *)a1 - a3;
*((_DWORD *)a1 + 56) = 1;
if ( inline_mysql_file_pread_8(
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_cache.c",
53,
*((_DWORD *)a1 + 53),
(_DWORD)a2,
v12,
a3,
4LL) )
{
return 1;
}
v15 -= v12;
if ( !v15 )
return 0;
v16 += v12;
v17 = &a2[v12];
}
if ( v16 < *(_QWORD *)a1 || (v10 = v16 - *(_QWORD *)a1, v10 >= *((_QWORD *)a1 + 3) - *((_QWORD *)a1 + 5)) )
{
v11 = 0LL;
}
else
{
v9 = (unsigned int)v10 + *((_QWORD *)a1 + 5);
if ( v15 >= *((_QWORD *)a1 + 3) - v9 )
v8 = *((_QWORD *)a1 + 3) - v9;
else
v8 = v15;
v11 = v8;
memcpy(v17, (unsigned int)v10 + *((_QWORD *)a1 + 5), v8);
v15 -= v8;
if ( !v15 )
return 0;
v16 += v8;
v17 += v8;
}
if ( (a5 & 1) != 0 )
{
if ( v16 == (unsigned int)*((_QWORD *)a1 + 3) - (unsigned int)*((_QWORD *)a1 + 5) + *(_QWORD *)a1 )
{
*((_QWORD *)a1 + 2) = *((_QWORD *)a1 + 3);
}
else
{
*(_QWORD *)a1 = v16;
v5 = *((_QWORD *)a1 + 5);
*((_QWORD *)a1 + 3) = v5;
*((_QWORD *)a1 + 2) = v5;
*((_DWORD *)a1 + 56) = 1;
}
v6 = v17;
if ( !(unsigned int)my_b_read(a1, v17, v15) )
return 0;
v13 = *((int *)a1 + 57);
}
else
{
*((_DWORD *)a1 + 56) = 1;
a1 = "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_cache.c";
v6 = (_BYTE *)(&qword_58 + 5);
v13 = inline_mysql_file_pread_8(
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_cache.c",
93,
*((_DWORD *)v18 + 53),
(_DWORD)v17,
v15,
v16,
0LL);
if ( v13 == v15 )
return 0;
}
if ( (a5 & 2) != 0 && (_DWORD)v13 != -1 && v11 + v13 >= 3 )
{
memset(&v17[v13], 0LL, 20 - v11 - v13);
return 0;
}
else
{
if ( !*(_DWORD *)my_thread_var(a1, v6)
|| *(_DWORD *)my_thread_var(a1, v6) == -1
|| *(_DWORD *)my_thread_var(a1, v6) == 175 )
{
*(_DWORD *)my_thread_var(a1, v6) = 127;
}
return 1;
}
}
| _mi_read_cache:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV dword ptr [RBP + -0x2c],R8D
JMP 0x001d67ce
LAB_001d67ce:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX]
JNC 0x001d6896
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
SUB RCX,qword ptr [RBP + -0x20]
CMP RAX,RCX
JBE 0x001d680a
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
SUB RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x38],RAX
LAB_001d680a:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xe0],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RAX + 0xd4]
MOV RCX,qword ptr [RBP + -0x18]
MOV R8,qword ptr [RBP + -0x38]
MOV R9,qword ptr [RBP + -0x20]
LEA RDI,[0x253aab]
MOV ESI,0x35
MOV qword ptr [RSP],0x4
CALL 0x001d6b20
CMP RAX,0x0
JZ 0x001d685b
JMP 0x001d684f
LAB_001d684f:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001d6b0f
LAB_001d685b:
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,0x0
JNZ 0x001d687e
JMP 0x001d6872
LAB_001d6872:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001d6b0f
LAB_001d687e:
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x18],RAX
LAB_001d6896:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX]
JC 0x001d697f
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
SUB RAX,qword ptr [RCX]
MOV qword ptr [RBP + -0x48],RAX
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x18]
MOV RDX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RDX + 0x28]
SUB RCX,RDX
CMP RAX,RCX
JNC 0x001d697f
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x28]
MOV RCX,qword ptr [RBP + -0x48]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x18]
MOV RDX,qword ptr [RBP + -0x50]
SUB RCX,RDX
CMP RAX,RCX
JNC 0x001d6909
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x001d691c
LAB_001d6909:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RBP + -0x50]
SUB RAX,RCX
MOV qword ptr [RBP + -0x58],RAX
LAB_001d691c:
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x28]
MOV RAX,qword ptr [RBP + -0x48]
MOV EAX,EAX
ADD RSI,RAX
MOV RDX,qword ptr [RBP + -0x40]
CALL 0x0012a090
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,0x0
JNZ 0x001d6965
JMP 0x001d6959
LAB_001d6959:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001d6b0f
LAB_001d6965:
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001d6987
LAB_001d697f:
MOV qword ptr [RBP + -0x40],0x0
LAB_001d6987:
MOV EAX,dword ptr [RBP + -0x2c]
AND EAX,0x1
CMP EAX,0x0
JZ 0x001d6a36
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
MOV RDX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RDX + 0x18]
MOV RSI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RSI + 0x28]
SUB RDX,RSI
MOV EDX,EDX
ADD RCX,RDX
CMP RAX,RCX
JZ 0x001d69f1
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xe0],0x1
JMP 0x001d6a01
LAB_001d69f1:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],RCX
LAB_001d6a01:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x001e0d10
CMP EAX,0x0
JNZ 0x001d6a25
JMP 0x001d6a19
LAB_001d6a19:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001d6b0f
LAB_001d6a25:
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RAX,dword ptr [RAX + 0xe4]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x001d6a8f
LAB_001d6a36:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xe0],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RAX + 0xd4]
MOV RCX,qword ptr [RBP + -0x18]
MOV R8,qword ptr [RBP + -0x28]
MOV R9,qword ptr [RBP + -0x20]
LEA RDI,[0x253aab]
MOV ESI,0x5d
XOR EAX,EAX
MOV qword ptr [RSP],0x0
CALL 0x001d6b20
MOV qword ptr [RBP + -0x38],RAX
CMP RAX,qword ptr [RBP + -0x28]
JNZ 0x001d6a8d
JMP 0x001d6a81
LAB_001d6a81:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001d6b0f
LAB_001d6a8d:
JMP 0x001d6a8f
LAB_001d6a8f:
MOV EAX,dword ptr [RBP + -0x2c]
AND EAX,0x2
CMP EAX,0x0
JZ 0x001d6ab1
MOV RAX,qword ptr [RBP + -0x38]
CMP EAX,-0x1
JZ 0x001d6ab1
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,qword ptr [RBP + -0x40]
CMP RAX,0x3
JNC 0x001d6aec
LAB_001d6ab1:
JMP 0x001d6ab3
LAB_001d6ab3:
JMP 0x001d6ab5
LAB_001d6ab5:
CALL 0x001f6210
CMP dword ptr [RAX],0x0
JZ 0x001d6ad6
CALL 0x001f6210
CMP dword ptr [RAX],-0x1
JZ 0x001d6ad6
CALL 0x001f6210
CMP dword ptr [RAX],0xaf
JNZ 0x001d6ae1
LAB_001d6ad6:
CALL 0x001f6210
MOV dword ptr [RAX],0x7f
LAB_001d6ae1:
JMP 0x001d6ae3
LAB_001d6ae3:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001d6b0f
LAB_001d6aec:
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,qword ptr [RBP + -0x38]
MOV EDX,0x14
SUB RDX,qword ptr [RBP + -0x40]
SUB RDX,qword ptr [RBP + -0x38]
XOR ESI,ESI
CALL 0x0012a2a0
MOV dword ptr [RBP + -0x4],0x0
LAB_001d6b0f:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
int4 _mi_read_cache(ulong *param_1,void *param_2,ulong param_3,ulong param_4,uint param_5)
{
int iVar1;
long lVar2;
ulong uVar3;
int *piVar4;
int4 *puVar5;
size_t local_60;
size_t local_48;
ulong local_40;
ulong local_30;
ulong local_28;
void *local_20;
int4 local_c;
local_30 = param_4;
local_28 = param_3;
local_20 = param_2;
if (param_3 < *param_1) {
local_40 = param_4;
if (*param_1 - param_3 < param_4) {
local_40 = *param_1 - param_3;
}
*(int4 *)(param_1 + 0x1c) = 1;
lVar2 = inline_mysql_file_pread
("/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_cache.c",0x35,
*(int4 *)((long)param_1 + 0xd4),param_2,local_40,param_3,4);
if (lVar2 != 0) {
return 1;
}
local_30 = param_4 - local_40;
if (local_30 == 0) {
return 0;
}
local_28 = local_40 + param_3;
local_20 = (void *)(local_40 + (long)param_2);
}
if ((local_28 < *param_1) || (uVar3 = local_28 - *param_1, param_1[3] - param_1[5] <= uVar3)) {
local_48 = 0;
}
else {
lVar2 = param_1[5] + (uVar3 & 0xffffffff);
if (local_30 < param_1[3] - lVar2) {
local_60 = local_30;
}
else {
local_60 = param_1[3] - lVar2;
}
local_48 = local_60;
memcpy(local_20,(void *)(param_1[5] + (uVar3 & 0xffffffff)),local_60);
local_30 = local_30 - local_60;
if (local_30 == 0) {
return 0;
}
local_28 = local_60 + local_28;
local_20 = (void *)(local_60 + (long)local_20);
}
if ((param_5 & 1) == 0) {
*(int4 *)(param_1 + 0x1c) = 1;
local_40 = inline_mysql_file_pread
("/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_cache.c",0x5d,
*(int4 *)((long)param_1 + 0xd4),local_20,local_30,local_28,0);
if (local_40 == local_30) {
return 0;
}
}
else {
if (local_28 == *param_1 + (ulong)(uint)((int)param_1[3] - (int)param_1[5])) {
param_1[2] = param_1[3];
}
else {
*param_1 = local_28;
param_1[3] = param_1[5];
param_1[2] = param_1[5];
*(int4 *)(param_1 + 0x1c) = 1;
}
iVar1 = _my_b_read(param_1,local_20,local_30);
if (iVar1 == 0) {
return 0;
}
local_40 = (ulong)*(int *)((long)param_1 + 0xe4);
}
if ((((param_5 & 2) == 0) || ((int)local_40 == -1)) || (local_40 + local_48 < 3)) {
piVar4 = (int *)_my_thread_var();
if (((*piVar4 == 0) || (piVar4 = (int *)_my_thread_var(), *piVar4 == -1)) ||
(piVar4 = (int *)_my_thread_var(), *piVar4 == 0xaf)) {
puVar5 = (int4 *)_my_thread_var();
*puVar5 = 0x7f;
}
local_c = 1;
}
else {
memset((void *)((long)local_20 + local_40),0,(0x14 - local_48) - local_40);
local_c = 0;
}
return local_c;
}
| |
27,363 | httplib::Server::dispatch_request_for_content_reader(httplib::Request&, httplib::Response&, httplib::ContentReader, std::vector<std::pair<std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>>, std::function<void (httplib::Request const&, httplib::Response&, httplib::ContentReader const&)>>, std::allocator<std::pair<std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>>, std::function<void (httplib::Request const&, httplib::Response&, httplib::ContentReader const&)>>>> const&) | nickolajgrishuk[P]metricz-cpp/build_O0/_deps/httplib-src/httplib.h | inline bool Server::dispatch_request_for_content_reader(
Request &req, Response &res, ContentReader content_reader,
const HandlersForContentReader &handlers) {
for (const auto &x : handlers) {
const auto &pattern = x.first;
const auto &handler = x.second;
if (std::regex_match(req.path, req.matches, pattern)) {
handler(req, res, content_reader);
return true;
}
}
return false;
} | O0 | c | httplib::Server::dispatch_request_for_content_reader(httplib::Request&, httplib::Response&, httplib::ContentReader, std::vector<std::pair<std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>>, std::function<void (httplib::Request const&, httplib::Response&, httplib::ContentReader const&)>>, std::allocator<std::pair<std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>>, std::function<void (httplib::Request const&, httplib::Response&, httplib::ContentReader const&)>>>> const&):
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rcx, -0x68(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x66a70
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
callq 0x66aa0
movq %rax, -0x48(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x66ad0
testb $0x1, %al
jne 0x5e5c5
jmp 0x5e632
leaq -0x40(%rbp), %rdi
callq 0x66b10
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rdi
addq $0x20, %rdi
movq -0x18(%rbp), %rsi
addq $0x198, %rsi # imm = 0x198
movq -0x58(%rbp), %rdx
xorl %ecx, %ecx
callq 0x4e760
testb $0x1, %al
jne 0x5e60a
jmp 0x5e625
movq -0x68(%rbp), %rcx
movq -0x60(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x66b30
movb $0x1, -0x1(%rbp)
jmp 0x5e636
jmp 0x5e627
leaq -0x40(%rbp), %rdi
callq 0x66b80
jmp 0x5e5b2
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
| _ZN7httplib6Server35dispatch_request_for_content_readerERNS_7RequestERNS_8ResponseENS_13ContentReaderERKSt6vectorISt4pairINSt7__cxx1111basic_regexIcNS8_12regex_traitsIcEEEESt8functionIFvRKS1_S4_RKS5_EEESaISK_EE:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_68], rcx
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov rax, [rbp+var_30]
mov [rbp+var_38], rax
mov rdi, [rbp+var_38]
call _ZNKSt6vectorISt4pairINSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEESt8functionIFvRKN7httplib7RequestERNS7_8ResponseERKNS7_13ContentReaderEEEESaISI_EE5beginEv; std::vector<std::pair<std::basic_regex<char,std::regex_traits<char>>,std::function<void ()(httplib::Request const&,httplib::Response &,httplib::ContentReader const&)>>>::begin(void)
mov [rbp+var_40], rax
mov rdi, [rbp+var_38]
call _ZNKSt6vectorISt4pairINSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEESt8functionIFvRKN7httplib7RequestERNS7_8ResponseERKNS7_13ContentReaderEEEESaISI_EE3endEv; std::vector<std::pair<std::basic_regex<char,std::regex_traits<char>>,std::function<void ()(httplib::Request const&,httplib::Response &,httplib::ContentReader const&)>>>::end(void)
mov [rbp+var_48], rax
loc_5E5B2:
lea rdi, [rbp+var_40]
lea rsi, [rbp+var_48]
call _ZN9__gnu_cxxneIPKSt4pairINSt7__cxx1111basic_regexIcNS2_12regex_traitsIcEEEESt8functionIFvRKN7httplib7RequestERNS8_8ResponseERKNS8_13ContentReaderEEEESt6vectorISJ_SaISJ_EEEEbRKNS_17__normal_iteratorIT_T0_EESU_; __gnu_cxx::operator!=<std::pair<std::basic_regex<char,std::regex_traits<char>>,std::function<void ()(httplib::Request const&,httplib::Response &,httplib::ContentReader const&)>> const*,std::vector<std::pair<std::basic_regex<char,std::regex_traits<char>>,std::function<void ()(httplib::Request const&,httplib::Response &,httplib::ContentReader const&)>>>>(__gnu_cxx::__normal_iterator<std::pair<std::basic_regex<char,std::regex_traits<char>>,std::function<void ()(httplib::Request const&,httplib::Response &,httplib::ContentReader const&)>> const*,std::vector<std::pair<std::basic_regex<char,std::regex_traits<char>>,std::function<void ()(httplib::Request const&,httplib::Response &,httplib::ContentReader const&)>>>> const&,__gnu_cxx::__normal_iterator<std::pair<std::basic_regex<char,std::regex_traits<char>>,std::function<void ()(httplib::Request const&,httplib::Response &,httplib::ContentReader const&)>> const*,std::vector<std::pair<std::basic_regex<char,std::regex_traits<char>>,std::function<void ()(httplib::Request const&,httplib::Response &,httplib::ContentReader const&)>>>> const&)
test al, 1
jnz short loc_5E5C5
jmp short loc_5E632
loc_5E5C5:
lea rdi, [rbp+var_40]
call _ZNK9__gnu_cxx17__normal_iteratorIPKSt4pairINSt7__cxx1111basic_regexIcNS2_12regex_traitsIcEEEESt8functionIFvRKN7httplib7RequestERNS8_8ResponseERKNS8_13ContentReaderEEEESt6vectorISJ_SaISJ_EEEdeEv; __gnu_cxx::__normal_iterator<std::pair<std::basic_regex<char,std::regex_traits<char>>,std::function<void ()(httplib::Request const&,httplib::Response &,httplib::ContentReader const&)>> const*,std::vector<std::pair<std::basic_regex<char,std::regex_traits<char>>,std::function<void ()(httplib::Request const&,httplib::Response &,httplib::ContentReader const&)>>>>::operator*(void)
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
mov [rbp+var_58], rax
mov rax, [rbp+var_50]
add rax, 20h ; ' '
mov [rbp+var_60], rax
mov rdi, [rbp+var_18]
add rdi, 20h ; ' '
mov rsi, [rbp+var_18]
add rsi, 198h
mov rdx, [rbp+var_58]
xor ecx, ecx
call _ZSt11regex_matchISt11char_traitsIcESaIcESaINSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS3_12basic_stringIcS1_S2_EEEEEEEcNS3_12regex_traitsIcEEEbRKNS9_IT2_T_T0_EERNS3_13match_resultsINSJ_14const_iteratorET1_EERKNS3_11basic_regexISG_T3_EENSt15regex_constants15match_flag_typeE; std::regex_match<std::char_traits<char>,std::allocator<char>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>(std::string const&,std::match_results<std::string::const_iterator> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type)
test al, 1
jnz short loc_5E60A
jmp short loc_5E625
loc_5E60A:
mov rcx, [rbp+var_68]
mov rdi, [rbp+var_60]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call _ZNKSt8functionIFvRKN7httplib7RequestERNS0_8ResponseERKNS0_13ContentReaderEEEclES3_S5_S8_; std::function<void ()(httplib::Request const&,httplib::Response &,httplib::ContentReader const&)>::operator()(httplib::Request const&,httplib::Response &,httplib::ContentReader const&)
mov [rbp+var_1], 1
jmp short loc_5E636
loc_5E625:
jmp short $+2
loc_5E627:
lea rdi, [rbp+var_40]
call _ZN9__gnu_cxx17__normal_iteratorIPKSt4pairINSt7__cxx1111basic_regexIcNS2_12regex_traitsIcEEEESt8functionIFvRKN7httplib7RequestERNS8_8ResponseERKNS8_13ContentReaderEEEESt6vectorISJ_SaISJ_EEEppEv; __gnu_cxx::__normal_iterator<std::pair<std::basic_regex<char,std::regex_traits<char>>,std::function<void ()(httplib::Request const&,httplib::Response &,httplib::ContentReader const&)>> const*,std::vector<std::pair<std::basic_regex<char,std::regex_traits<char>>,std::function<void ()(httplib::Request const&,httplib::Response &,httplib::ContentReader const&)>>>>::operator++(void)
jmp short loc_5E5B2
loc_5E632:
mov [rbp+var_1], 0
loc_5E636:
mov al, [rbp+var_1]
and al, 1
add rsp, 70h
pop rbp
retn
| char httplib::Server::dispatch_request_for_content_reader(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5)
{
long long v7; // [rsp+18h] [rbp-58h]
long long v8; // [rsp+28h] [rbp-48h] BYREF
long long v9; // [rsp+30h] [rbp-40h] BYREF
long long v10; // [rsp+38h] [rbp-38h]
long long v11; // [rsp+40h] [rbp-30h]
long long v12; // [rsp+48h] [rbp-28h]
long long v13; // [rsp+50h] [rbp-20h]
long long v14; // [rsp+58h] [rbp-18h]
long long v15; // [rsp+60h] [rbp-10h]
v15 = a1;
v14 = a2;
v13 = a3;
v12 = a4;
v11 = a5;
v10 = a5;
v9 = std::vector<std::pair<std::basic_regex<char,std::regex_traits<char>>,std::function<void ()(httplib::Request const&,httplib::Response &,httplib::ContentReader const&)>>>::begin(a5);
v8 = std::vector<std::pair<std::basic_regex<char,std::regex_traits<char>>,std::function<void ()(httplib::Request const&,httplib::Response &,httplib::ContentReader const&)>>>::end(v10);
while ( (__gnu_cxx::operator!=<std::pair<std::basic_regex<char,std::regex_traits<char>>,std::function<void ()(httplib::Request const&,httplib::Response &,httplib::ContentReader const&)>> const*,std::vector<std::pair<std::basic_regex<char,std::regex_traits<char>>,std::function<void ()(httplib::Request const&,httplib::Response &,httplib::ContentReader const&)>>>>(
&v9,
&v8) & 1) != 0 )
{
v7 = __gnu_cxx::__normal_iterator<std::pair<std::basic_regex<char,std::regex_traits<char>>,std::function<void ()(httplib::Request const&,httplib::Response &,httplib::ContentReader const&)>> const*,std::vector<std::pair<std::basic_regex<char,std::regex_traits<char>>,std::function<void ()(httplib::Request const&,httplib::Response &,httplib::ContentReader const&)>>>>::operator*(&v9);
if ( (std::regex_match<std::char_traits<char>,std::allocator<char>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>(
v14 + 32,
v14 + 408,
v7,
0) & 1) != 0 )
{
std::function<void ()(httplib::Request const&,httplib::Response &,httplib::ContentReader const&)>::operator()(
v7 + 32,
v14,
v13,
a4);
return 1;
}
__gnu_cxx::__normal_iterator<std::pair<std::basic_regex<char,std::regex_traits<char>>,std::function<void ()(httplib::Request const&,httplib::Response &,httplib::ContentReader const&)>> const*,std::vector<std::pair<std::basic_regex<char,std::regex_traits<char>>,std::function<void ()(httplib::Request const&,httplib::Response &,httplib::ContentReader const&)>>>>::operator++(&v9);
}
return 0;
}
| dispatch_request_for_content_reader:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x68],RCX
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x00166a70
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x00166aa0
MOV qword ptr [RBP + -0x48],RAX
LAB_0015e5b2:
LEA RDI,[RBP + -0x40]
LEA RSI,[RBP + -0x48]
CALL 0x00166ad0
TEST AL,0x1
JNZ 0x0015e5c5
JMP 0x0015e632
LAB_0015e5c5:
LEA RDI,[RBP + -0x40]
CALL 0x00166b10
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x20
MOV qword ptr [RBP + -0x60],RAX
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x20
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x198
MOV RDX,qword ptr [RBP + -0x58]
XOR ECX,ECX
CALL 0x0014e760
TEST AL,0x1
JNZ 0x0015e60a
JMP 0x0015e625
LAB_0015e60a:
MOV RCX,qword ptr [RBP + -0x68]
MOV RDI,qword ptr [RBP + -0x60]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00166b30
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0015e636
LAB_0015e625:
JMP 0x0015e627
LAB_0015e627:
LEA RDI,[RBP + -0x40]
CALL 0x00166b80
JMP 0x0015e5b2
LAB_0015e632:
MOV byte ptr [RBP + -0x1],0x0
LAB_0015e636:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x70
POP RBP
RET
|
/* httplib::Server::dispatch_request_for_content_reader(httplib::Request&, httplib::Response&,
httplib::ContentReader, std::vector<std::pair<std::__cxx11::basic_regex<char,
std::__cxx11::regex_traits<char> >, std::function<void (httplib::Request const&,
httplib::Response&, httplib::ContentReader const&)> >,
std::allocator<std::pair<std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char> >,
std::function<void (httplib::Request const&, httplib::Response&, httplib::ContentReader const&)>
> > > const&) */
int8 __thiscall
httplib::Server::dispatch_request_for_content_reader
(Server *this,Request *param_1,Response *param_2,ContentReader *param_4,
vector<std::pair<std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>,std::function<void(httplib::Request_const&,httplib::Response&,httplib::ContentReader_const&)>>,std::allocator<std::pair<std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>,std::function<void(httplib::Request_const&,httplib::Response&,httplib::ContentReader_const&)>>>>
*param_5)
{
bool bVar1;
int7 extraout_var;
long lVar2;
int7 extraout_var_00;
int7 uVar3;
int8 local_50;
int8 local_48;
vector<std::pair<std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>,std::function<void(httplib::Request_const&,httplib::Response&,httplib::ContentReader_const&)>>,std::allocator<std::pair<std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>,std::function<void(httplib::Request_const&,httplib::Response&,httplib::ContentReader_const&)>>>>
*local_40;
vector<std::pair<std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>,std::function<void(httplib::Request_const&,httplib::Response&,httplib::ContentReader_const&)>>,std::allocator<std::pair<std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>,std::function<void(httplib::Request_const&,httplib::Response&,httplib::ContentReader_const&)>>>>
*local_38;
ContentReader *local_30;
Response *local_28;
Request *local_20;
Server *local_18;
int1 local_9;
local_40 = param_5;
local_38 = param_5;
local_30 = param_4;
local_28 = param_2;
local_20 = param_1;
local_18 = this;
local_48 = std::
vector<std::pair<std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>,std::function<void(httplib::Request_const&,httplib::Response&,httplib::ContentReader_const&)>>,std::allocator<std::pair<std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>,std::function<void(httplib::Request_const&,httplib::Response&,httplib::ContentReader_const&)>>>>
::begin(param_5);
local_50 = std::
vector<std::pair<std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>,std::function<void(httplib::Request_const&,httplib::Response&,httplib::ContentReader_const&)>>,std::allocator<std::pair<std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>,std::function<void(httplib::Request_const&,httplib::Response&,httplib::ContentReader_const&)>>>>
::end(local_40);
do {
bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_48,(__normal_iterator *)&local_50);
if (!bVar1) {
local_9 = 0;
uVar3 = extraout_var;
LAB_0015e636:
return CONCAT71(uVar3,local_9);
}
lVar2 = __gnu_cxx::
__normal_iterator<std::pair<std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>,std::function<void(httplib::Request_const&,httplib::Response&,httplib::ContentReader_const&)>>const*,std::vector<std::pair<std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>,std::function<void(httplib::Request_const&,httplib::Response&,httplib::ContentReader_const&)>>,std::allocator<std::pair<std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>,std::function<void(httplib::Request_const&,httplib::Response&,httplib::ContentReader_const&)>>>>>
::operator*((__normal_iterator<std::pair<std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>,std::function<void(httplib::Request_const&,httplib::Response&,httplib::ContentReader_const&)>>const*,std::vector<std::pair<std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>,std::function<void(httplib::Request_const&,httplib::Response&,httplib::ContentReader_const&)>>,std::allocator<std::pair<std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>,std::function<void(httplib::Request_const&,httplib::Response&,httplib::ContentReader_const&)>>>>>
*)&local_48);
bVar1 = std::
regex_match<std::char_traits<char>,std::allocator<char>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>,char,std::__cxx11::regex_traits<char>>
(local_20 + 0x20,local_20 + 0x198,lVar2,0);
if (bVar1) {
std::function<void(httplib::Request_const&,httplib::Response&,httplib::ContentReader_const&)>
::operator()((function<void(httplib::Request_const&,httplib::Response&,httplib::ContentReader_const&)>
*)(lVar2 + 0x20),local_20,local_28,param_4);
local_9 = 1;
uVar3 = extraout_var_00;
goto LAB_0015e636;
}
__gnu_cxx::
__normal_iterator<std::pair<std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>,std::function<void(httplib::Request_const&,httplib::Response&,httplib::ContentReader_const&)>>const*,std::vector<std::pair<std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>,std::function<void(httplib::Request_const&,httplib::Response&,httplib::ContentReader_const&)>>,std::allocator<std::pair<std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>,std::function<void(httplib::Request_const&,httplib::Response&,httplib::ContentReader_const&)>>>>>
::operator++((__normal_iterator<std::pair<std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>,std::function<void(httplib::Request_const&,httplib::Response&,httplib::ContentReader_const&)>>const*,std::vector<std::pair<std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>,std::function<void(httplib::Request_const&,httplib::Response&,httplib::ContentReader_const&)>>,std::allocator<std::pair<std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>,std::function<void(httplib::Request_const&,httplib::Response&,httplib::ContentReader_const&)>>>>>
*)&local_48);
} while( true );
}
| |
27,364 | pfs_start_statement_v1 | eloqsql/storage/perfschema/pfs.cc | void pfs_start_statement_v1(PSI_statement_locker *locker,
const char *db, uint db_len,
const char *src_file, uint src_line)
{
PSI_statement_locker_state *state= reinterpret_cast<PSI_statement_locker_state*> (locker);
assert(state != NULL);
uint flags= state->m_flags;
ulonglong timer_start= 0;
if (flags & STATE_FLAG_TIMED)
{
timer_start= get_timer_raw_value_and_function(statement_timer, & state->m_timer);
state->m_timer_start= timer_start;
}
compile_time_assert(PSI_SCHEMA_NAME_LEN == NAME_LEN);
assert(db_len <= sizeof(state->m_schema_name));
if (db_len > 0)
memcpy(state->m_schema_name, db, db_len);
state->m_schema_name_length= db_len;
if (flags & STATE_FLAG_EVENT)
{
PFS_events_statements *pfs= reinterpret_cast<PFS_events_statements*> (state->m_statement);
assert(pfs != NULL);
pfs->m_event.m_timer_start= timer_start;
pfs->m_event.m_source_file= src_file;
pfs->m_event.m_source_line= src_line;
assert(db_len <= sizeof(pfs->m_current_schema_name));
if (db_len > 0)
memcpy(pfs->m_current_schema_name, db, db_len);
pfs->m_current_schema_name_length= db_len;
}
} | O0 | cpp | pfs_start_statement_v1:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x34(%rbp)
movq $0x0, -0x40(%rbp)
movl -0x34(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x4ab16
leaq 0x1c88cd(%rip), %rax # 0x2133c4
movl (%rax), %edi
movq -0x30(%rbp), %rsi
addq $0x20, %rsi
callq 0x42d20
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x18(%rax)
jmp 0x4ab18
jmp 0x4ab1a
cmpl $0x0, -0x14(%rbp)
jbe 0x4ab39
movq -0x30(%rbp), %rdi
addq $0xa8, %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %eax
movl %eax, %edx
callq 0x26280
movl -0x14(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x168(%rax)
movl -0x34(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x4abab
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x20(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x48(%rax)
movl -0x24(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0x50(%rax)
cmpl $0x0, -0x14(%rbp)
jbe 0x4ab9e
movq -0x48(%rbp), %rdi
addq $0x1e4, %rdi # imm = 0x1E4
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %eax
movl %eax, %edx
callq 0x26280
movl -0x14(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0x2a4(%rax)
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| pfs_start_statement_v1:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_20], rcx
mov [rbp+var_24], r8d
mov rax, [rbp+var_8]
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov eax, [rax+4]
mov [rbp+var_34], eax
mov [rbp+var_40], 0
mov eax, [rbp+var_34]
and eax, 1
cmp eax, 0
jz short loc_4AB16
lea rax, statement_timer
mov edi, [rax]
mov rsi, [rbp+var_30]
add rsi, 20h ; ' '
call _Z32get_timer_raw_value_and_function15enum_timer_namePPFyvE; get_timer_raw_value_and_function(enum_timer_name,ulong long (**)(void))
mov [rbp+var_40], rax
mov rcx, [rbp+var_40]
mov rax, [rbp+var_30]
mov [rax+18h], rcx
loc_4AB16:
jmp short $+2
loc_4AB18:
jmp short $+2
loc_4AB1A:
cmp [rbp+var_14], 0
jbe short loc_4AB39
mov rdi, [rbp+var_30]
add rdi, 0A8h
mov rsi, [rbp+var_10]
mov eax, [rbp+var_14]
mov edx, eax
call _memcpy
loc_4AB39:
mov ecx, [rbp+var_14]
mov rax, [rbp+var_30]
mov [rax+168h], ecx
mov eax, [rbp+var_34]
and eax, 4
cmp eax, 0
jz short loc_4ABAB
mov rax, [rbp+var_30]
mov rax, [rax+28h]
mov [rbp+var_48], rax
mov rcx, [rbp+var_40]
mov rax, [rbp+var_48]
mov [rax+38h], rcx
mov rcx, [rbp+var_20]
mov rax, [rbp+var_48]
mov [rax+48h], rcx
mov ecx, [rbp+var_24]
mov rax, [rbp+var_48]
mov [rax+50h], ecx
cmp [rbp+var_14], 0
jbe short loc_4AB9E
mov rdi, [rbp+var_48]
add rdi, 1E4h
mov rsi, [rbp+var_10]
mov eax, [rbp+var_14]
mov edx, eax
call _memcpy
loc_4AB9E:
mov ecx, [rbp+var_14]
mov rax, [rbp+var_48]
mov [rax+2A4h], ecx
loc_4ABAB:
add rsp, 50h
pop rbp
retn
| long long pfs_start_statement_v1(long long a1, long long a2, unsigned int a3, long long a4, int a5)
{
long long result; // rax
long long v6; // [rsp+8h] [rbp-48h]
unsigned long long timer_raw_value_and_function; // [rsp+10h] [rbp-40h]
int v8; // [rsp+1Ch] [rbp-34h]
v8 = *(_DWORD *)(a1 + 4);
timer_raw_value_and_function = 0LL;
if ( (v8 & 1) != 0 )
{
timer_raw_value_and_function = get_timer_raw_value_and_function(
(unsigned int)statement_timer,
(unsigned long long (**)(void))(a1 + 32));
*(_QWORD *)(a1 + 24) = timer_raw_value_and_function;
}
if ( a3 )
memcpy(a1 + 168, a2, a3);
*(_DWORD *)(a1 + 360) = a3;
result = v8 & 4;
if ( (v8 & 4) != 0 )
{
v6 = *(_QWORD *)(a1 + 40);
*(_QWORD *)(v6 + 56) = timer_raw_value_and_function;
*(_QWORD *)(v6 + 72) = a4;
*(_DWORD *)(v6 + 80) = a5;
if ( a3 )
memcpy(v6 + 484, a2, a3);
result = v6;
*(_DWORD *)(v6 + 676) = a3;
}
return result;
}
| pfs_start_statement_v1:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
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 RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RAX + 0x4]
MOV dword ptr [RBP + -0x34],EAX
MOV qword ptr [RBP + -0x40],0x0
MOV EAX,dword ptr [RBP + -0x34]
AND EAX,0x1
CMP EAX,0x0
JZ 0x0014ab16
LEA RAX,[0x3133c4]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x30]
ADD RSI,0x20
CALL 0x00142d20
MOV qword ptr [RBP + -0x40],RAX
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x18],RCX
LAB_0014ab16:
JMP 0x0014ab18
LAB_0014ab18:
JMP 0x0014ab1a
LAB_0014ab1a:
CMP dword ptr [RBP + -0x14],0x0
JBE 0x0014ab39
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0xa8
MOV RSI,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x14]
MOV EDX,EAX
CALL 0x00126280
LAB_0014ab39:
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x168],ECX
MOV EAX,dword ptr [RBP + -0x34]
AND EAX,0x4
CMP EAX,0x0
JZ 0x0014abab
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x48],RAX
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RAX + 0x38],RCX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RAX + 0x48],RCX
MOV ECX,dword ptr [RBP + -0x24]
MOV RAX,qword ptr [RBP + -0x48]
MOV dword ptr [RAX + 0x50],ECX
CMP dword ptr [RBP + -0x14],0x0
JBE 0x0014ab9e
MOV RDI,qword ptr [RBP + -0x48]
ADD RDI,0x1e4
MOV RSI,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x14]
MOV EDX,EAX
CALL 0x00126280
LAB_0014ab9e:
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x48]
MOV dword ptr [RAX + 0x2a4],ECX
LAB_0014abab:
ADD RSP,0x50
POP RBP
RET
|
void pfs_start_statement_v1
(long param_1,void *param_2,uint param_3,int8 param_4,int4 param_5)
{
uint uVar1;
long lVar2;
int8 local_48;
uVar1 = *(uint *)(param_1 + 4);
local_48 = 0;
if ((uVar1 & 1) != 0) {
local_48 = get_timer_raw_value_and_function(statement_timer,param_1 + 0x20);
*(int8 *)(param_1 + 0x18) = local_48;
}
if (param_3 != 0) {
memcpy((void *)(param_1 + 0xa8),param_2,(ulong)param_3);
}
*(uint *)(param_1 + 0x168) = param_3;
if ((uVar1 & 4) != 0) {
lVar2 = *(long *)(param_1 + 0x28);
*(int8 *)(lVar2 + 0x38) = local_48;
*(int8 *)(lVar2 + 0x48) = param_4;
*(int4 *)(lVar2 + 0x50) = param_5;
if (param_3 != 0) {
memcpy((void *)(lVar2 + 0x1e4),param_2,(ulong)param_3);
}
*(uint *)(lVar2 + 0x2a4) = param_3;
}
return;
}
| |
27,365 | my_utf8mb3_uni | eloqsql/strings/ctype-utf8.c | static int my_utf8mb3_uni(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t * pwc, const uchar *s, const uchar *e)
{
return my_mb_wc_utf8mb3_quick(pwc, s, e);
} | O3 | c | my_utf8mb3_uni:
pushq %rbp
movq %rsp, %rbp
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x54e6d
movzbl (%rdx), %edi
testb %dil, %dil
js 0x54e65
movl %edi, %edi
movl $0x1, %eax
movq %rdi, (%rsi)
jmp 0x54e6d
cmpb $-0x3e, %dil
jae 0x54e6f
xorl %eax, %eax
popq %rbp
retq
cmpb $-0x21, %dil
ja 0x54ea6
leaq 0x2(%rdx), %r8
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %r8
ja 0x54e6d
movzbl 0x1(%rdx), %ecx
xorl $0x80, %ecx
movl $0x0, %eax
cmpb $0x3f, %cl
ja 0x54e6d
andl $0x1f, %edi
shll $0x6, %edi
orl %ecx, %edi
movl $0x2, %eax
jmp 0x54e60
cmpb $-0x11, %dil
ja 0x54e6b
leaq 0x3(%rdx), %r8
movl $0xffffff99, %eax # imm = 0xFFFFFF99
cmpq %rcx, %r8
ja 0x54e6d
movzbl 0x1(%rdx), %ecx
cmpb $-0x41, %cl
jg 0x54e6b
movzbl 0x2(%rdx), %edx
cmpb $-0x41, %dl
jg 0x54e6b
cmpl $0xe0, %edi
sete %r8b
cmpb $-0x60, %cl
setb %r9b
movl $0x0, %eax
testb %r9b, %r8b
jne 0x54e6d
shll $0xc, %edi
movzwl %di, %eax
andl $0x3f, %ecx
shll $0x6, %ecx
orl %eax, %ecx
andl $0x3f, %edx
orq %rcx, %rdx
movl $0x3, %eax
movq %rdx, %rdi
jmp 0x54e60
| my_utf8mb3_uni:
push rbp
mov rbp, rsp
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short loc_54E6D
movzx edi, byte ptr [rdx]
test dil, dil
js short loc_54E65
mov edi, edi
mov eax, 1
loc_54E60:
mov [rsi], rdi
jmp short loc_54E6D
loc_54E65:
cmp dil, 0C2h
jnb short loc_54E6F
loc_54E6B:
xor eax, eax
loc_54E6D:
pop rbp
retn
loc_54E6F:
cmp dil, 0DFh
ja short loc_54EA6
lea r8, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp r8, rcx
ja short loc_54E6D
movzx ecx, byte ptr [rdx+1]
xor ecx, 80h
mov eax, 0
cmp cl, 3Fh ; '?'
ja short loc_54E6D
and edi, 1Fh
shl edi, 6
or edi, ecx
mov eax, 2
jmp short loc_54E60
loc_54EA6:
cmp dil, 0EFh
ja short loc_54E6B
lea r8, [rdx+3]
mov eax, 0FFFFFF99h
cmp r8, rcx
ja short loc_54E6D
movzx ecx, byte ptr [rdx+1]
cmp cl, 0BFh
jg short loc_54E6B
movzx edx, byte ptr [rdx+2]
cmp dl, 0BFh
jg short loc_54E6B
cmp edi, 0E0h
setz r8b
cmp cl, 0A0h
setb r9b
mov eax, 0
test r8b, r9b
jnz short loc_54E6D
shl edi, 0Ch
movzx eax, di
and ecx, 3Fh
shl ecx, 6
or ecx, eax
and edx, 3Fh
or rdx, rcx
mov eax, 3
mov rdi, rdx
jmp loc_54E60
| long long my_utf8mb3_uni(long long a1, unsigned long long *a2, unsigned __int8 *a3, unsigned long long a4)
{
long long result; // rax
int v5; // edi
unsigned long long v6; // rdi
char v7; // cl
char v8; // dl
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
v5 = *a3;
if ( (v5 & 0x80u) == 0 )
{
v6 = *a3;
result = 1LL;
LABEL_4:
*a2 = v6;
return result;
}
if ( (unsigned __int8)v5 < 0xC2u )
return 0LL;
if ( (unsigned __int8)v5 > 0xDFu )
{
if ( (unsigned __int8)v5 > 0xEFu )
return 0LL;
result = 4294967193LL;
if ( (unsigned long long)(a3 + 3) > a4 )
return result;
v7 = a3[1];
if ( v7 > -65 )
return 0LL;
v8 = a3[2];
if ( v8 > -65 )
return 0LL;
result = 0LL;
if ( (unsigned __int8)v7 >= 0xA0u || v5 != 224 )
{
result = 3LL;
v6 = (unsigned __int16)((_WORD)v5 << 12) | ((unsigned __int8)(v7 & 0x3F) << 6) | (unsigned long long)(v8 & 0x3F);
goto LABEL_4;
}
}
else
{
result = 4294967194LL;
if ( (unsigned long long)(a3 + 2) <= a4 )
{
result = 0LL;
if ( (a3[1] ^ 0x80u) <= 0x3F )
{
v6 = a3[1] ^ 0x80 | ((unsigned __int8)(v5 & 0x1F) << 6);
result = 2LL;
goto LABEL_4;
}
}
}
}
return result;
}
| my_utf8mb3_uni:
PUSH RBP
MOV RBP,RSP
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x00154e6d
MOVZX EDI,byte ptr [RDX]
TEST DIL,DIL
JS 0x00154e65
MOV EDI,EDI
MOV EAX,0x1
LAB_00154e60:
MOV qword ptr [RSI],RDI
JMP 0x00154e6d
LAB_00154e65:
CMP DIL,0xc2
JNC 0x00154e6f
LAB_00154e6b:
XOR EAX,EAX
LAB_00154e6d:
POP RBP
RET
LAB_00154e6f:
CMP DIL,0xdf
JA 0x00154ea6
LEA R8,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP R8,RCX
JA 0x00154e6d
MOVZX ECX,byte ptr [RDX + 0x1]
XOR ECX,0x80
MOV EAX,0x0
CMP CL,0x3f
JA 0x00154e6d
AND EDI,0x1f
SHL EDI,0x6
OR EDI,ECX
MOV EAX,0x2
JMP 0x00154e60
LAB_00154ea6:
CMP DIL,0xef
JA 0x00154e6b
LEA R8,[RDX + 0x3]
MOV EAX,0xffffff99
CMP R8,RCX
JA 0x00154e6d
MOVZX ECX,byte ptr [RDX + 0x1]
CMP CL,0xbf
JG 0x00154e6b
MOVZX EDX,byte ptr [RDX + 0x2]
CMP DL,0xbf
JG 0x00154e6b
CMP EDI,0xe0
SETZ R8B
CMP CL,0xa0
SETC R9B
MOV EAX,0x0
TEST R8B,R9B
JNZ 0x00154e6d
SHL EDI,0xc
MOVZX EAX,DI
AND ECX,0x3f
SHL ECX,0x6
OR ECX,EAX
AND EDX,0x3f
OR RDX,RCX
MOV EAX,0x3
MOV RDI,RDX
JMP 0x00154e60
|
int8 my_utf8mb3_uni(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
byte bVar1;
byte bVar2;
int8 uVar3;
ulong uVar4;
uint uVar5;
if (param_4 <= param_3) {
return 0xffffff9b;
}
bVar1 = *param_3;
uVar5 = (uint)bVar1;
if ((char)bVar1 < '\0') {
if (0xc1 < bVar1) {
if (bVar1 < 0xe0) {
if (param_4 < param_3 + 2) {
return 0xffffff9a;
}
if (0x3f < (byte)(param_3[1] ^ 0x80)) {
return 0;
}
uVar4 = (ulong)((uVar5 & 0x1f) << 6 | param_3[1] ^ 0x80);
uVar3 = 2;
goto LAB_00154e60;
}
if (bVar1 < 0xf0) {
if (param_4 < param_3 + 3) {
return 0xffffff99;
}
bVar2 = param_3[1];
if (((char)bVar2 < -0x40) && ((char)param_3[2] < -0x40)) {
if (uVar5 == 0xe0 && bVar2 < 0xa0) {
return 0;
}
uVar4 = (ulong)(param_3[2] & 0x3f | (bVar2 & 0x3f) << 6 | (bVar1 & 0xf) << 0xc);
uVar3 = 3;
goto LAB_00154e60;
}
}
}
uVar3 = 0;
}
else {
uVar4 = (ulong)uVar5;
uVar3 = 1;
LAB_00154e60:
*param_2 = uVar4;
}
return uVar3;
}
| |
27,366 | stbi__bmp_parse_header(stbi__context*, stbi__bmp_data*) | llama.cpp/examples/llava/../../common/stb_image.h | static void *stbi__bmp_parse_header(stbi__context *s, stbi__bmp_data *info)
{
int hsz;
if (stbi__get8(s) != 'B' || stbi__get8(s) != 'M') return stbi__errpuc("not BMP", "Corrupt BMP");
stbi__get32le(s); // discard filesize
stbi__get16le(s); // discard reserved
stbi__get16le(s); // discard reserved
info->offset = stbi__get32le(s);
info->hsz = hsz = stbi__get32le(s);
info->mr = info->mg = info->mb = info->ma = 0;
info->extra_read = 14;
if (info->offset < 0) return stbi__errpuc("bad BMP", "bad BMP");
if (hsz != 12 && hsz != 40 && hsz != 56 && hsz != 108 && hsz != 124) return stbi__errpuc("unknown BMP", "BMP type not supported: unknown");
if (hsz == 12) {
s->img_x = stbi__get16le(s);
s->img_y = stbi__get16le(s);
} else {
s->img_x = stbi__get32le(s);
s->img_y = stbi__get32le(s);
}
if (stbi__get16le(s) != 1) return stbi__errpuc("bad BMP", "bad BMP");
info->bpp = stbi__get16le(s);
if (hsz != 12) {
int compress = stbi__get32le(s);
if (compress == 1 || compress == 2) return stbi__errpuc("BMP RLE", "BMP type not supported: RLE");
if (compress >= 4) return stbi__errpuc("BMP JPEG/PNG", "BMP type not supported: unsupported compression"); // this includes PNG/JPEG modes
if (compress == 3 && info->bpp != 16 && info->bpp != 32) return stbi__errpuc("bad BMP", "bad BMP"); // bitfields requires 16 or 32 bits/pixel
stbi__get32le(s); // discard sizeof
stbi__get32le(s); // discard hres
stbi__get32le(s); // discard vres
stbi__get32le(s); // discard colorsused
stbi__get32le(s); // discard max important
if (hsz == 40 || hsz == 56) {
if (hsz == 56) {
stbi__get32le(s);
stbi__get32le(s);
stbi__get32le(s);
stbi__get32le(s);
}
if (info->bpp == 16 || info->bpp == 32) {
if (compress == 0) {
stbi__bmp_set_mask_defaults(info, compress);
} else if (compress == 3) {
info->mr = stbi__get32le(s);
info->mg = stbi__get32le(s);
info->mb = stbi__get32le(s);
info->extra_read += 12;
// not documented, but generated by photoshop and handled by mspaint
if (info->mr == info->mg && info->mg == info->mb) {
// ?!?!?
return stbi__errpuc("bad BMP", "bad BMP");
}
} else
return stbi__errpuc("bad BMP", "bad BMP");
}
} else {
// V4/V5 header
int i;
if (hsz != 108 && hsz != 124)
return stbi__errpuc("bad BMP", "bad BMP");
info->mr = stbi__get32le(s);
info->mg = stbi__get32le(s);
info->mb = stbi__get32le(s);
info->ma = stbi__get32le(s);
if (compress != 3) // override mr/mg/mb unless in BI_BITFIELDS mode, as per docs
stbi__bmp_set_mask_defaults(info, compress);
stbi__get32le(s); // discard color space
for (i=0; i < 12; ++i)
stbi__get32le(s); // discard color space parameters
if (hsz == 124) {
stbi__get32le(s); // discard rendering intent
stbi__get32le(s); // discard offset of profile data
stbi__get32le(s); // discard size of profile data
stbi__get32le(s); // discard reserved
}
}
}
return (void *) 1;
} | O3 | c | stbi__bmp_parse_header(stbi__context*, stbi__bmp_data*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0xc0(%rdi), %rcx
cmpq 0xc8(%rdi), %rcx
jb 0x314ab
cmpl $0x0, 0x30(%rbx)
je 0x3161e
movq %rbx, %rdi
callq 0x2f0a9
movq 0xc0(%rbx), %rcx
leaq 0x1(%rcx), %rax
movq %rax, 0xc0(%rbx)
cmpb $0x42, (%rcx)
jne 0x3161e
cmpq 0xc8(%rbx), %rax
jb 0x314e1
cmpl $0x0, 0x30(%rbx)
je 0x3161e
movq %rbx, %rdi
callq 0x2f0a9
movq 0xc0(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xc0(%rbx)
cmpb $0x4d, (%rax)
jne 0x3161e
movq %rbx, %rdi
callq 0x313ef
movq %rbx, %rdi
callq 0x313ef
movq %rbx, %rdi
callq 0x313ef
movq %rbx, %rdi
callq 0x313ef
movq %rbx, %rdi
callq 0x313ef
movl %eax, %ebp
movq %rbx, %rdi
callq 0x313ef
shll $0x10, %eax
orl %ebp, %eax
movl %eax, 0x4(%r14)
movq %rbx, %rdi
callq 0x313ef
movl %eax, %r15d
movq %rbx, %rdi
callq 0x313ef
movl %eax, %ebp
shll $0x10, %ebp
orl %r15d, %ebp
movl %ebp, 0x8(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0xc(%r14)
movl $0xe, 0x20(%r14)
cmpl $0x0, 0x4(%r14)
js 0x3182a
cmpl $0x37, %ebp
jle 0x3164d
cmpl $0x38, %ebp
je 0x31586
cmpl $0x6c, %ebp
je 0x31586
cmpl $0x7c, %ebp
jne 0x3165b
movq %rbx, %rdi
callq 0x313ef
movl %eax, %r15d
movq %rbx, %rdi
callq 0x313ef
shll $0x10, %eax
orl %r15d, %eax
movl %eax, (%rbx)
movq %rbx, %rdi
callq 0x313ef
movl %eax, %r15d
movq %rbx, %rdi
callq 0x313ef
shll $0x10, %eax
orl %r15d, %eax
movl %eax, 0x4(%rbx)
movq %rbx, %rdi
callq 0x313ef
cmpl $0x1, %eax
jne 0x3182a
movq %rbx, %rdi
callq 0x313ef
movl %eax, (%r14)
movl $0x1, %r15d
cmpl $0xc, %ebp
je 0x3163b
movq %rbx, %rdi
callq 0x313ef
movl %eax, %r13d
movq %rbx, %rdi
callq 0x313ef
movl %eax, %r12d
shll $0x10, %r12d
leal (%r12,%r13), %eax
decl %eax
cmpl $0x1, %eax
ja 0x31687
leaq 0x2c730(%rip), %rdi # 0x5dd40
callq 0x1e400
leaq 0x1df01(%rip), %rcx # 0x4f51d
jmp 0x31631
leaq 0x2c71b(%rip), %rdi # 0x5dd40
callq 0x1e400
leaq 0x1ded0(%rip), %rcx # 0x4f501
movq %rcx, (%rax)
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0xc, %ebp
je 0x31670
cmpl $0x28, %ebp
je 0x31586
leaq 0x2c6de(%rip), %rdi # 0x5dd40
callq 0x1e400
leaq 0x1dea3(%rip), %rcx # 0x4f511
jmp 0x31631
movq %rbx, %rdi
callq 0x313ef
movl %eax, (%rbx)
movq %rbx, %rdi
callq 0x313ef
jmp 0x315ba
orl %r13d, %r12d
cmpl $0x4, %r12d
jl 0x316a5
leaq 0x2c6a9(%rip), %rdi # 0x5dd40
callq 0x1e400
leaq 0x1de82(%rip), %rcx # 0x4f525
jmp 0x31631
cmpl $0x3, %r12d
jne 0x316bc
movl (%r14), %eax
cmpl $0x10, %eax
je 0x316bc
cmpl $0x20, %eax
jne 0x3182a
movq %rbx, %rdi
callq 0x313ce
movq %rbx, %rdi
callq 0x313ce
movq %rbx, %rdi
callq 0x313ce
movq %rbx, %rdi
callq 0x313ce
movq %rbx, %rdi
callq 0x313ce
cmpl $0x6b, %ebp
jg 0x31781
cmpl $0x28, %ebp
je 0x3171b
cmpl $0x38, %ebp
jne 0x3182a
movq %rbx, %rdi
callq 0x313ce
movq %rbx, %rdi
callq 0x313ce
movq %rbx, %rdi
callq 0x313ce
movq %rbx, %rdi
callq 0x313ce
movl (%r14), %eax
cmpl $0x20, %eax
je 0x3172c
cmpl $0x10, %eax
jne 0x3163b
testl %r12d, %r12d
je 0x31842
cmpl $0x3, %r12d
jne 0x3182a
movq %rbx, %rdi
callq 0x313ce
movl %eax, 0xc(%r14)
movq %rbx, %rdi
callq 0x313ce
movl %eax, 0x10(%r14)
movq %rbx, %rdi
callq 0x313ce
movl %eax, 0x14(%r14)
addl $0xc, 0x20(%r14)
movl 0x10(%r14), %ecx
movl 0xc(%r14), %edx
xorl %ecx, %edx
xorl %eax, %ecx
orl %edx, %ecx
jne 0x3163b
jmp 0x3182a
cmpl $0x6c, %ebp
je 0x3178f
cmpl $0x7c, %ebp
jne 0x3182a
movq %rbx, %rdi
callq 0x313ce
movl %eax, 0xc(%r14)
movq %rbx, %rdi
callq 0x313ce
movl %eax, 0x10(%r14)
movq %rbx, %rdi
callq 0x313ce
movl %eax, 0x14(%r14)
movq %rbx, %rdi
callq 0x313ce
movl %eax, 0x18(%r14)
cmpl $0x3, %r12d
je 0x317d0
movq %r14, %rdi
movl %r12d, %esi
callq 0x31929
movq %rbx, %rdi
callq 0x313ce
movl $0xc, %r14d
movq %rbx, %rdi
callq 0x313ef
movq %rbx, %rdi
callq 0x313ef
decl %r14d
jne 0x317de
cmpl $0x6c, %ebp
je 0x3163b
cmpl $0x7c, %ebp
jne 0x31638
movq %rbx, %rdi
callq 0x313ce
movq %rbx, %rdi
callq 0x313ce
movq %rbx, %rdi
callq 0x313ce
movq %rbx, %rdi
callq 0x313ce
jmp 0x3163b
leaq 0x2c50f(%rip), %rdi # 0x5dd40
callq 0x1e400
leaq 0x1dccc(%rip), %rcx # 0x4f509
jmp 0x31631
cmpl $0x20, %eax
je 0x31867
cmpl $0x10, %eax
jne 0x31880
movabsq $0x3e000007c00, %rax # imm = 0x3E000007C00
movq %rax, 0xc(%r14)
movl $0x1f, 0x14(%r14)
jmp 0x3163b
movaps 0x1cdd2(%rip), %xmm0 # 0x4e640
movups %xmm0, 0xc(%r14)
movl $0x0, 0x1c(%r14)
jmp 0x3163b
addq $0xc, %r14
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
jmp 0x3163b
| _ZL22stbi__bmp_parse_headerP13stbi__contextP14stbi__bmp_data:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rsi
mov rbx, rdi
mov rcx, [rdi+0C0h]
cmp rcx, [rdi+0C8h]
jb short loc_314AB
cmp dword ptr [rbx+30h], 0
jz loc_3161E
mov rdi, rbx
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rcx, [rbx+0C0h]
loc_314AB:
lea rax, [rcx+1]
mov [rbx+0C0h], rax
cmp byte ptr [rcx], 42h ; 'B'
jnz loc_3161E
cmp rax, [rbx+0C8h]
jb short loc_314E1
cmp dword ptr [rbx+30h], 0
jz loc_3161E
mov rdi, rbx
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rax, [rbx+0C0h]
loc_314E1:
lea rcx, [rax+1]
mov [rbx+0C0h], rcx
cmp byte ptr [rax], 4Dh ; 'M'
jnz loc_3161E
mov rdi, rbx
call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *)
mov rdi, rbx
call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *)
mov rdi, rbx
call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *)
mov rdi, rbx
call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *)
mov rdi, rbx
call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *)
mov ebp, eax
mov rdi, rbx
call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *)
shl eax, 10h
or eax, ebp
mov [r14+4], eax
mov rdi, rbx
call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *)
mov r15d, eax
mov rdi, rbx
call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *)
mov ebp, eax
shl ebp, 10h
or ebp, r15d
mov [r14+8], ebp
xorps xmm0, xmm0
movups xmmword ptr [r14+0Ch], xmm0
mov dword ptr [r14+20h], 0Eh
cmp dword ptr [r14+4], 0
js loc_3182A
cmp ebp, 37h ; '7'
jle loc_3164D
cmp ebp, 38h ; '8'
jz short loc_31586
cmp ebp, 6Ch ; 'l'
jz short loc_31586
cmp ebp, 7Ch ; '|'
jnz loc_3165B
loc_31586:
mov rdi, rbx
call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *)
mov r15d, eax
mov rdi, rbx
call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *)
shl eax, 10h
or eax, r15d
mov [rbx], eax
mov rdi, rbx
call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *)
mov r15d, eax
mov rdi, rbx
call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *)
shl eax, 10h
or eax, r15d
loc_315BA:
mov [rbx+4], eax
mov rdi, rbx
call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *)
cmp eax, 1
jnz loc_3182A
mov rdi, rbx
call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *)
mov [r14], eax
mov r15d, 1
cmp ebp, 0Ch
jz short loc_3163B
mov rdi, rbx
call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *)
mov r13d, eax
mov rdi, rbx
call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *)
mov r12d, eax
shl r12d, 10h
lea eax, [r12+r13]
dec eax
cmp eax, 1
ja short loc_31687
lea rdi, _ZL22stbi__g_failure_reason_tlsind
call ___tls_get_addr
lea rcx, aBmpRle; "BMP RLE"
jmp short loc_31631
loc_3161E:
lea rdi, _ZL22stbi__g_failure_reason_tlsind
call ___tls_get_addr
lea rcx, aNotBmp; "not BMP"
loc_31631:
mov [rax+0], rcx
loc_31638:
xor r15d, r15d
loc_3163B:
mov rax, r15
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3164D:
cmp ebp, 0Ch
jz short loc_31670
cmp ebp, 28h ; '('
jz loc_31586
loc_3165B:
lea rdi, _ZL22stbi__g_failure_reason_tlsind
call ___tls_get_addr
lea rcx, aUnknownBmp; "unknown BMP"
jmp short loc_31631
loc_31670:
mov rdi, rbx
call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *)
mov [rbx], eax
mov rdi, rbx
call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *)
jmp loc_315BA
loc_31687:
or r12d, r13d
cmp r12d, 4
jl short loc_316A5
lea rdi, _ZL22stbi__g_failure_reason_tlsind
call ___tls_get_addr
lea rcx, aBmpJpegPng; "BMP JPEG/PNG"
jmp short loc_31631
loc_316A5:
cmp r12d, 3
jnz short loc_316BC
mov eax, [r14]
cmp eax, 10h
jz short loc_316BC
cmp eax, 20h ; ' '
jnz loc_3182A
loc_316BC:
mov rdi, rbx
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov rdi, rbx
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov rdi, rbx
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov rdi, rbx
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov rdi, rbx
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
cmp ebp, 6Bh ; 'k'
jg loc_31781
cmp ebp, 28h ; '('
jz short loc_3171B
cmp ebp, 38h ; '8'
jnz loc_3182A
mov rdi, rbx
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov rdi, rbx
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov rdi, rbx
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov rdi, rbx
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
loc_3171B:
mov eax, [r14]
cmp eax, 20h ; ' '
jz short loc_3172C
cmp eax, 10h
jnz loc_3163B
loc_3172C:
test r12d, r12d
jz loc_31842
cmp r12d, 3
jnz loc_3182A
mov rdi, rbx
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov [r14+0Ch], eax
mov rdi, rbx
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov [r14+10h], eax
mov rdi, rbx
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov [r14+14h], eax
add dword ptr [r14+20h], 0Ch
mov ecx, [r14+10h]
mov edx, [r14+0Ch]
xor edx, ecx
xor ecx, eax
or ecx, edx
jnz loc_3163B
jmp loc_3182A
loc_31781:
cmp ebp, 6Ch ; 'l'
jz short loc_3178F
cmp ebp, 7Ch ; '|'
jnz loc_3182A
loc_3178F:
mov rdi, rbx
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov [r14+0Ch], eax
mov rdi, rbx
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov [r14+10h], eax
mov rdi, rbx
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov [r14+14h], eax
mov rdi, rbx
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov [r14+18h], eax
cmp r12d, 3
jz short loc_317D0
mov rdi, r14
mov esi, r12d
call _ZL27stbi__bmp_set_mask_defaultsP14stbi__bmp_datai; stbi__bmp_set_mask_defaults(stbi__bmp_data *,int)
loc_317D0:
mov rdi, rbx
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov r14d, 0Ch
loc_317DE:
mov rdi, rbx
call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *)
mov rdi, rbx
call _ZL13stbi__get16leP13stbi__context; stbi__get16le(stbi__context *)
dec r14d
jnz short loc_317DE
cmp ebp, 6Ch ; 'l'
jz loc_3163B
cmp ebp, 7Ch ; '|'
jnz loc_31638
mov rdi, rbx
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov rdi, rbx
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov rdi, rbx
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
mov rdi, rbx
call _ZL13stbi__get32leP13stbi__context; stbi__get32le(stbi__context *)
jmp loc_3163B
loc_3182A:
lea rdi, _ZL22stbi__g_failure_reason_tlsind
call ___tls_get_addr
lea rcx, aBadBmp; "bad BMP"
jmp loc_31631
loc_31842:
cmp eax, 20h ; ' '
jz short loc_31867
cmp eax, 10h
jnz short loc_31880
mov rax, 3E000007C00h
mov [r14+0Ch], rax
mov dword ptr [r14+14h], 1Fh
jmp loc_3163B
loc_31867:
movaps xmm0, cs:xmmword_4E640
movups xmmword ptr [r14+0Ch], xmm0
mov dword ptr [r14+1Ch], 0
jmp loc_3163B
loc_31880:
add r14, 0Ch
xorps xmm0, xmm0
movups xmmword ptr [r14], xmm0
jmp loc_3163B
| long long stbi__bmp_parse_header(long long a1, int *a2)
{
_BYTE *v2; // rcx
_BYTE *v3; // rax
int v4; // ebp
int v5; // r15d
signed int v6; // ebp
int v7; // r15d
int v8; // r15d
int v9; // eax
long long v10; // r15
int v11; // r13d
unsigned int v12; // r12d
const char **addr; // rax
const char *v14; // rcx
int v16; // r12d
int v17; // eax
unsigned int v18; // eax
int v19; // r14d
v2 = *(_BYTE **)(a1 + 192);
if ( (unsigned long long)v2 >= *(_QWORD *)(a1 + 200) )
{
if ( !*(_DWORD *)(a1 + 48) )
goto LABEL_19;
stbi__refill_buffer(a1);
v2 = *(_BYTE **)(a1 + 192);
}
v3 = v2 + 1;
*(_QWORD *)(a1 + 192) = v2 + 1;
if ( *v2 != 66 )
goto LABEL_19;
if ( (unsigned long long)v3 < *(_QWORD *)(a1 + 200) )
goto LABEL_8;
if ( !*(_DWORD *)(a1 + 48) )
{
LABEL_19:
addr = (const char **)__tls_get_addr(&ZL22stbi__g_failure_reason_tlsind);
v14 = "not BMP";
goto LABEL_20;
}
stbi__refill_buffer(a1);
v3 = *(_BYTE **)(a1 + 192);
LABEL_8:
*(_QWORD *)(a1 + 192) = v3 + 1;
if ( *v3 != 77 )
goto LABEL_19;
stbi__get16le(a1);
stbi__get16le(a1);
stbi__get16le(a1);
stbi__get16le(a1);
v4 = stbi__get16le(a1);
a2[1] = v4 | ((unsigned int)stbi__get16le(a1) << 16);
v5 = stbi__get16le(a1);
v6 = v5 | ((unsigned int)stbi__get16le(a1) << 16);
a2[2] = v6;
*(_OWORD *)(a2 + 3) = 0LL;
a2[8] = 14;
if ( a2[1] < 0 )
goto LABEL_46;
if ( v6 > 55 )
{
if ( v6 == 56 || v6 == 108 || v6 == 124 )
goto LABEL_14;
LABEL_24:
addr = (const char **)__tls_get_addr(&ZL22stbi__g_failure_reason_tlsind);
v14 = "unknown BMP";
goto LABEL_20;
}
if ( v6 == 12 )
{
*(_DWORD *)a1 = stbi__get16le(a1);
v9 = stbi__get16le(a1);
goto LABEL_15;
}
if ( v6 != 40 )
goto LABEL_24;
LABEL_14:
v7 = stbi__get16le(a1);
*(_DWORD *)a1 = v7 | ((unsigned int)stbi__get16le(a1) << 16);
v8 = stbi__get16le(a1);
v9 = v8 | ((unsigned int)stbi__get16le(a1) << 16);
LABEL_15:
*(_DWORD *)(a1 + 4) = v9;
if ( (unsigned int)stbi__get16le(a1) != 1 )
goto LABEL_46;
*a2 = stbi__get16le(a1);
v10 = 1LL;
if ( v6 == 12 )
return v10;
v11 = stbi__get16le(a1);
v12 = (unsigned int)stbi__get16le(a1) << 16;
if ( v12 + v11 - 1 <= 1 )
{
addr = (const char **)__tls_get_addr(&ZL22stbi__g_failure_reason_tlsind);
v14 = "BMP RLE";
LABEL_20:
*addr = v14;
return 0LL;
}
v16 = v11 | v12;
if ( v16 >= 4 )
{
addr = (const char **)__tls_get_addr(&ZL22stbi__g_failure_reason_tlsind);
v14 = "BMP JPEG/PNG";
goto LABEL_20;
}
if ( v16 == 3 && *a2 != 16 && *a2 != 32 )
{
LABEL_46:
addr = (const char **)__tls_get_addr(&ZL22stbi__g_failure_reason_tlsind);
v14 = "bad BMP";
goto LABEL_20;
}
stbi__get32le(a1);
stbi__get32le(a1);
stbi__get32le(a1);
stbi__get32le(a1);
stbi__get32le(a1);
if ( v6 > 107 )
{
a2[3] = stbi__get32le(a1);
a2[4] = stbi__get32le(a1);
a2[5] = stbi__get32le(a1);
a2[6] = stbi__get32le(a1);
if ( v16 != 3 )
stbi__bmp_set_mask_defaults(a2, (unsigned int)v16);
stbi__get32le(a1);
v19 = 12;
do
{
stbi__get16le(a1);
stbi__get16le(a1);
--v19;
}
while ( v19 );
if ( v6 != 108 )
{
stbi__get32le(a1);
stbi__get32le(a1);
stbi__get32le(a1);
stbi__get32le(a1);
}
}
else
{
if ( v6 != 40 )
{
stbi__get32le(a1);
stbi__get32le(a1);
stbi__get32le(a1);
stbi__get32le(a1);
}
v17 = *a2;
if ( *a2 == 32 || v17 == 16 )
{
if ( v16 )
{
if ( v16 != 3 )
goto LABEL_46;
a2[3] = stbi__get32le(a1);
a2[4] = stbi__get32le(a1);
v18 = stbi__get32le(a1);
a2[5] = v18;
a2[8] += 12;
if ( *(_QWORD *)(a2 + 3) == __PAIR64__(v18, a2[4]) )
goto LABEL_46;
}
else if ( v17 == 32 )
{
*(_OWORD *)(a2 + 3) = xmmword_4E640;
a2[7] = 0;
}
else if ( v17 == 16 )
{
*(_QWORD *)(a2 + 3) = 0x3E000007C00LL;
a2[5] = 31;
}
else
{
*(_OWORD *)(a2 + 3) = 0LL;
}
}
}
return v10;
}
| stbi__bmp_parse_header:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
MOV RCX,qword ptr [RDI + 0xc0]
CMP RCX,qword ptr [RDI + 0xc8]
JC 0x001314ab
CMP dword ptr [RBX + 0x30],0x0
JZ 0x0013161e
MOV RDI,RBX
CALL 0x0012f0a9
MOV RCX,qword ptr [RBX + 0xc0]
LAB_001314ab:
LEA RAX,[RCX + 0x1]
MOV qword ptr [RBX + 0xc0],RAX
CMP byte ptr [RCX],0x42
JNZ 0x0013161e
CMP RAX,qword ptr [RBX + 0xc8]
JC 0x001314e1
CMP dword ptr [RBX + 0x30],0x0
JZ 0x0013161e
MOV RDI,RBX
CALL 0x0012f0a9
MOV RAX,qword ptr [RBX + 0xc0]
LAB_001314e1:
LEA RCX,[RAX + 0x1]
MOV qword ptr [RBX + 0xc0],RCX
CMP byte ptr [RAX],0x4d
JNZ 0x0013161e
MOV RDI,RBX
CALL 0x001313ef
MOV RDI,RBX
CALL 0x001313ef
MOV RDI,RBX
CALL 0x001313ef
MOV RDI,RBX
CALL 0x001313ef
MOV RDI,RBX
CALL 0x001313ef
MOV EBP,EAX
MOV RDI,RBX
CALL 0x001313ef
SHL EAX,0x10
OR EAX,EBP
MOV dword ptr [R14 + 0x4],EAX
MOV RDI,RBX
CALL 0x001313ef
MOV R15D,EAX
MOV RDI,RBX
CALL 0x001313ef
MOV EBP,EAX
SHL EBP,0x10
OR EBP,R15D
MOV dword ptr [R14 + 0x8],EBP
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0xc],XMM0
MOV dword ptr [R14 + 0x20],0xe
CMP dword ptr [R14 + 0x4],0x0
JS 0x0013182a
CMP EBP,0x37
JLE 0x0013164d
CMP EBP,0x38
JZ 0x00131586
CMP EBP,0x6c
JZ 0x00131586
CMP EBP,0x7c
JNZ 0x0013165b
LAB_00131586:
MOV RDI,RBX
CALL 0x001313ef
MOV R15D,EAX
MOV RDI,RBX
CALL 0x001313ef
SHL EAX,0x10
OR EAX,R15D
MOV dword ptr [RBX],EAX
MOV RDI,RBX
CALL 0x001313ef
MOV R15D,EAX
MOV RDI,RBX
CALL 0x001313ef
SHL EAX,0x10
OR EAX,R15D
LAB_001315ba:
MOV dword ptr [RBX + 0x4],EAX
MOV RDI,RBX
CALL 0x001313ef
CMP EAX,0x1
JNZ 0x0013182a
MOV RDI,RBX
CALL 0x001313ef
MOV dword ptr [R14],EAX
MOV R15D,0x1
CMP EBP,0xc
JZ 0x0013163b
MOV RDI,RBX
CALL 0x001313ef
MOV R13D,EAX
MOV RDI,RBX
CALL 0x001313ef
MOV R12D,EAX
SHL R12D,0x10
LEA EAX,[R12 + R13*0x1]
DEC EAX
CMP EAX,0x1
JA 0x00131687
LEA RDI,[0x15dd40]
CALL 0x0011e400
LEA RCX,[0x14f51d]
JMP 0x00131631
LAB_0013161e:
LEA RDI,[0x15dd40]
CALL 0x0011e400
LEA RCX,[0x14f501]
LAB_00131631:
MOV qword ptr [RAX],RCX
LAB_00131638:
XOR R15D,R15D
LAB_0013163b:
MOV RAX,R15
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013164d:
CMP EBP,0xc
JZ 0x00131670
CMP EBP,0x28
JZ 0x00131586
LAB_0013165b:
LEA RDI,[0x15dd40]
CALL 0x0011e400
LEA RCX,[0x14f511]
JMP 0x00131631
LAB_00131670:
MOV RDI,RBX
CALL 0x001313ef
MOV dword ptr [RBX],EAX
MOV RDI,RBX
CALL 0x001313ef
JMP 0x001315ba
LAB_00131687:
OR R12D,R13D
CMP R12D,0x4
JL 0x001316a5
LEA RDI,[0x15dd40]
CALL 0x0011e400
LEA RCX,[0x14f525]
JMP 0x00131631
LAB_001316a5:
CMP R12D,0x3
JNZ 0x001316bc
MOV EAX,dword ptr [R14]
CMP EAX,0x10
JZ 0x001316bc
CMP EAX,0x20
JNZ 0x0013182a
LAB_001316bc:
MOV RDI,RBX
CALL 0x001313ce
MOV RDI,RBX
CALL 0x001313ce
MOV RDI,RBX
CALL 0x001313ce
MOV RDI,RBX
CALL 0x001313ce
MOV RDI,RBX
CALL 0x001313ce
CMP EBP,0x6b
JG 0x00131781
CMP EBP,0x28
JZ 0x0013171b
CMP EBP,0x38
JNZ 0x0013182a
MOV RDI,RBX
CALL 0x001313ce
MOV RDI,RBX
CALL 0x001313ce
MOV RDI,RBX
CALL 0x001313ce
MOV RDI,RBX
CALL 0x001313ce
LAB_0013171b:
MOV EAX,dword ptr [R14]
CMP EAX,0x20
JZ 0x0013172c
CMP EAX,0x10
JNZ 0x0013163b
LAB_0013172c:
TEST R12D,R12D
JZ 0x00131842
CMP R12D,0x3
JNZ 0x0013182a
MOV RDI,RBX
CALL 0x001313ce
MOV dword ptr [R14 + 0xc],EAX
MOV RDI,RBX
CALL 0x001313ce
MOV dword ptr [R14 + 0x10],EAX
MOV RDI,RBX
CALL 0x001313ce
MOV dword ptr [R14 + 0x14],EAX
ADD dword ptr [R14 + 0x20],0xc
MOV ECX,dword ptr [R14 + 0x10]
MOV EDX,dword ptr [R14 + 0xc]
XOR EDX,ECX
XOR ECX,EAX
OR ECX,EDX
JNZ 0x0013163b
JMP 0x0013182a
LAB_00131781:
CMP EBP,0x6c
JZ 0x0013178f
CMP EBP,0x7c
JNZ 0x0013182a
LAB_0013178f:
MOV RDI,RBX
CALL 0x001313ce
MOV dword ptr [R14 + 0xc],EAX
MOV RDI,RBX
CALL 0x001313ce
MOV dword ptr [R14 + 0x10],EAX
MOV RDI,RBX
CALL 0x001313ce
MOV dword ptr [R14 + 0x14],EAX
MOV RDI,RBX
CALL 0x001313ce
MOV dword ptr [R14 + 0x18],EAX
CMP R12D,0x3
JZ 0x001317d0
MOV RDI,R14
MOV ESI,R12D
CALL 0x00131929
LAB_001317d0:
MOV RDI,RBX
CALL 0x001313ce
MOV R14D,0xc
LAB_001317de:
MOV RDI,RBX
CALL 0x001313ef
MOV RDI,RBX
CALL 0x001313ef
DEC R14D
JNZ 0x001317de
CMP EBP,0x6c
JZ 0x0013163b
CMP EBP,0x7c
JNZ 0x00131638
MOV RDI,RBX
CALL 0x001313ce
MOV RDI,RBX
CALL 0x001313ce
MOV RDI,RBX
CALL 0x001313ce
MOV RDI,RBX
CALL 0x001313ce
JMP 0x0013163b
LAB_0013182a:
LEA RDI,[0x15dd40]
CALL 0x0011e400
LEA RCX,[0x14f509]
JMP 0x00131631
LAB_00131842:
CMP EAX,0x20
JZ 0x00131867
CMP EAX,0x10
JNZ 0x00131880
MOV RAX,0x3e000007c00
MOV qword ptr [R14 + 0xc],RAX
MOV dword ptr [R14 + 0x14],0x1f
JMP 0x0013163b
LAB_00131867:
MOVAPS XMM0,xmmword ptr [0x0014e640]
MOVUPS xmmword ptr [R14 + 0xc],XMM0
MOV dword ptr [R14 + 0x1c],0x0
JMP 0x0013163b
LAB_00131880:
ADD R14,0xc
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14],XMM0
JMP 0x0013163b
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* stbi__bmp_parse_header(stbi__context*, stbi__bmp_data*) */
int8 stbi__bmp_parse_header(stbi__context *param_1,stbi__bmp_data *param_2)
{
int8 uVar1;
uint uVar2;
int iVar3;
uint uVar4;
int4 uVar5;
char *pcVar6;
int8 *puVar7;
char *pcVar8;
pcVar8 = *(char **)(param_1 + 0xc0);
if (pcVar8 < *(char **)(param_1 + 200)) {
LAB_001314ab:
pcVar6 = pcVar8 + 1;
*(char **)(param_1 + 0xc0) = pcVar6;
if (*pcVar8 == 'B') {
if (*(char **)(param_1 + 200) <= pcVar6) {
if (*(int *)(param_1 + 0x30) == 0) goto LAB_0013161e;
stbi__refill_buffer(param_1);
pcVar6 = *(char **)(param_1 + 0xc0);
}
*(char **)(param_1 + 0xc0) = pcVar6 + 1;
if (*pcVar6 == 'M') {
stbi__get16le(param_1);
stbi__get16le(param_1);
stbi__get16le(param_1);
stbi__get16le(param_1);
uVar2 = stbi__get16le(param_1);
iVar3 = stbi__get16le(param_1);
*(uint *)(param_2 + 4) = iVar3 << 0x10 | uVar2;
uVar2 = stbi__get16le(param_1);
iVar3 = stbi__get16le(param_1);
uVar2 = iVar3 << 0x10 | uVar2;
*(uint *)(param_2 + 8) = uVar2;
*(int8 *)(param_2 + 0xc) = 0;
*(int8 *)(param_2 + 0x14) = 0;
*(int4 *)(param_2 + 0x20) = 0xe;
if (-1 < *(int *)(param_2 + 4)) {
if ((int)uVar2 < 0x38) {
if (uVar2 != 0xc) {
if (uVar2 != 0x28) goto LAB_0013165b;
goto LAB_00131586;
}
uVar5 = stbi__get16le(param_1);
*(int4 *)param_1 = uVar5;
uVar4 = stbi__get16le(param_1);
}
else {
if (((uVar2 != 0x38) && (uVar2 != 0x6c)) && (uVar2 != 0x7c)) {
LAB_0013165b:
puVar7 = (int8 *)__tls_get_addr(&PTR_0015dd40);
pcVar8 = "unknown BMP";
goto LAB_00131631;
}
LAB_00131586:
uVar4 = stbi__get16le(param_1);
iVar3 = stbi__get16le(param_1);
*(uint *)param_1 = iVar3 << 0x10 | uVar4;
uVar4 = stbi__get16le(param_1);
iVar3 = stbi__get16le(param_1);
uVar4 = iVar3 << 0x10 | uVar4;
}
*(uint *)(param_1 + 4) = uVar4;
iVar3 = stbi__get16le(param_1);
if (iVar3 == 1) {
uVar5 = stbi__get16le(param_1);
*(int4 *)param_2 = uVar5;
if (uVar2 == 0xc) {
return 1;
}
uVar4 = stbi__get16le(param_1);
iVar3 = stbi__get16le(param_1);
if ((iVar3 * 0x10000 + uVar4) - 1 < 2) {
puVar7 = (int8 *)__tls_get_addr(&PTR_0015dd40);
pcVar8 = "BMP RLE";
goto LAB_00131631;
}
uVar4 = iVar3 * 0x10000 | uVar4;
if (3 < (int)uVar4) {
puVar7 = (int8 *)__tls_get_addr(&PTR_0015dd40);
pcVar8 = "BMP JPEG/PNG";
goto LAB_00131631;
}
if (((uVar4 != 3) || (*(int *)param_2 == 0x10)) || (*(int *)param_2 == 0x20)) {
stbi__get32le(param_1);
stbi__get32le(param_1);
stbi__get32le(param_1);
stbi__get32le(param_1);
stbi__get32le(param_1);
if ((int)uVar2 < 0x6c) {
if (uVar2 != 0x28) {
if (uVar2 != 0x38) goto LAB_0013182a;
stbi__get32le(param_1);
stbi__get32le(param_1);
stbi__get32le(param_1);
stbi__get32le(param_1);
}
uVar1 = _UNK_0014e648;
iVar3 = *(int *)param_2;
if ((iVar3 != 0x20) && (iVar3 != 0x10)) {
return 1;
}
if (uVar4 == 0) {
if (iVar3 == 0x20) {
*(int8 *)(param_2 + 0xc) = _DAT_0014e640;
*(int8 *)(param_2 + 0x14) = uVar1;
*(int4 *)(param_2 + 0x1c) = 0;
return 1;
}
if (iVar3 != 0x10) {
*(int8 *)(param_2 + 0xc) = 0;
*(int8 *)(param_2 + 0x14) = 0;
return 1;
}
*(int8 *)(param_2 + 0xc) = 0x3e000007c00;
*(int4 *)(param_2 + 0x14) = 0x1f;
return 1;
}
if (uVar4 == 3) {
uVar5 = stbi__get32le(param_1);
*(int4 *)(param_2 + 0xc) = uVar5;
uVar5 = stbi__get32le(param_1);
*(int4 *)(param_2 + 0x10) = uVar5;
iVar3 = stbi__get32le(param_1);
*(int *)(param_2 + 0x14) = iVar3;
*(int *)(param_2 + 0x20) = *(int *)(param_2 + 0x20) + 0xc;
if (*(int *)(param_2 + 0x10) != iVar3 ||
*(int *)(param_2 + 0xc) != *(int *)(param_2 + 0x10)) {
return 1;
}
}
}
else if ((uVar2 == 0x6c) || (uVar2 == 0x7c)) {
uVar5 = stbi__get32le(param_1);
*(int4 *)(param_2 + 0xc) = uVar5;
uVar5 = stbi__get32le(param_1);
*(int4 *)(param_2 + 0x10) = uVar5;
uVar5 = stbi__get32le(param_1);
*(int4 *)(param_2 + 0x14) = uVar5;
uVar5 = stbi__get32le(param_1);
*(int4 *)(param_2 + 0x18) = uVar5;
if (uVar4 != 3) {
stbi__bmp_set_mask_defaults(param_2,uVar4);
}
stbi__get32le(param_1);
iVar3 = 0xc;
do {
stbi__get16le(param_1);
stbi__get16le(param_1);
iVar3 = iVar3 + -1;
} while (iVar3 != 0);
if (uVar2 != 0x6c) {
if (uVar2 != 0x7c) {
return 0;
}
stbi__get32le(param_1);
stbi__get32le(param_1);
stbi__get32le(param_1);
stbi__get32le(param_1);
return 1;
}
return 1;
}
}
}
}
LAB_0013182a:
puVar7 = (int8 *)__tls_get_addr(&PTR_0015dd40);
pcVar8 = "bad BMP";
goto LAB_00131631;
}
}
}
else if (*(int *)(param_1 + 0x30) != 0) {
stbi__refill_buffer(param_1);
pcVar8 = *(char **)(param_1 + 0xc0);
goto LAB_001314ab;
}
LAB_0013161e:
puVar7 = (int8 *)__tls_get_addr(&PTR_0015dd40);
pcVar8 = "not BMP";
LAB_00131631:
*puVar7 = pcVar8;
return 0;
}
| |
27,367 | ma_read_bitmap_page | eloqsql/storage/maria/ma_bitmap.c | static my_bool _ma_read_bitmap_page(MARIA_HA *info,
MARIA_FILE_BITMAP *bitmap,
pgcache_page_no_t page)
{
MARIA_SHARE *share= info->s;
my_bool res;
DBUG_ENTER("_ma_read_bitmap_page");
DBUG_PRINT("enter", ("page: %lld data_file_length: %lld",
(longlong) page,
(longlong) share->state.state.data_file_length));
DBUG_ASSERT(page % bitmap->pages_covered == 0);
DBUG_ASSERT(!bitmap->changed);
bitmap->page= page;
if ((page + 1) * bitmap->block_size > share->state.state.data_file_length)
{
/* Inexistent or half-created page */
res= _ma_bitmap_create_missing(info, bitmap, page);
if (!res)
adjust_total_size(info, page);
DBUG_RETURN(res);
}
adjust_total_size(info, page);
bitmap->full_head_size= bitmap->full_tail_size= 0;
DBUG_ASSERT(share->pagecache->block_size == bitmap->block_size);
res= pagecache_read(share->pagecache,
&bitmap->file, page, 0,
bitmap->map, PAGECACHE_PLAIN_PAGE,
PAGECACHE_LOCK_LEFT_UNLOCKED, 0) == NULL;
if (!res)
{
/* Calculate used_size */
const uchar *data, *end= bitmap->map;
for (data= bitmap->map + bitmap->total_size; --data >= end && *data == 0; )
{}
bitmap->used_size= (uint) ((data + 1) - end);
DBUG_ASSERT(bitmap->used_size <= bitmap->total_size);
}
else
{
_ma_set_fatal_error(info, my_errno);
}
/*
We can't check maria_bitmap_marker here as if the bitmap page
previously had a true checksum and the user switched mode to not checksum
this may have any value, except maria_normal_page_marker.
Using maria_normal_page_marker gives us a protection against bugs
when running without any checksums.
*/
#ifndef DBUG_OFF
if (!res)
{
memcpy(bitmap->map + bitmap->block_size, bitmap->map, bitmap->block_size);
_ma_check_bitmap(bitmap);
}
#endif
DBUG_RETURN(res);
} | O0 | c | ma_read_bitmap_page:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x457a1
jmp 0x457a3
jmp 0x457a5
jmp 0x457a7
jmp 0x457a9
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq -0x18(%rbp), %rcx
movl 0x134(%rcx), %ecx
imulq %rcx, %rax
movq -0x28(%rbp), %rcx
cmpq 0x40(%rcx), %rax
jbe 0x45809
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x45920
movb %al, -0x29(%rbp)
cmpb $0x0, -0x29(%rbp)
jne 0x457fc
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x45ba0
jmp 0x457fe
movb -0x29(%rbp), %al
movb %al, -0x1(%rbp)
jmp 0x45914
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x45ba0
movq -0x18(%rbp), %rax
movl $0x0, 0x2c(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x28(%rax)
jmp 0x4582e
movq -0x28(%rbp), %rax
movq 0x600(%rax), %rdi
movq -0x18(%rbp), %rsi
addq $0x40, %rsi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %r8
xorl %ecx, %ecx
movl $0x1, %r9d
xorl %eax, %eax
movl $0x0, (%rsp)
movq $0x0, 0x8(%rsp)
callq 0x2d940
cmpq $0x0, %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x29(%rbp)
cmpb $0x0, -0x29(%rbp)
jne 0x458f4
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
movl 0x128(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rcx
addq $-0x1, %rcx
movq %rcx, -0x38(%rbp)
xorl %eax, %eax
cmpq -0x40(%rbp), %rcx
movb %al, -0x41(%rbp)
jb 0x458cd
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
sete %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0x458d6
jmp 0x458d8
jmp 0x458a6
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq -0x40(%rbp), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0x458f2
jmp 0x4590c
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
callq 0xf6090
movq -0x50(%rbp), %rdi
movl (%rax), %esi
callq 0x33880
jmp 0x4590e
movb -0x29(%rbp), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
| _ma_read_bitmap_page:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_28], rax
jmp short $+2
loc_457A1:
jmp short $+2
loc_457A3:
jmp short $+2
loc_457A5:
jmp short $+2
loc_457A7:
jmp short $+2
loc_457A9:
mov rcx, [rbp+var_20]
mov rax, [rbp+var_18]
mov [rax+10h], rcx
mov rax, [rbp+var_20]
add rax, 1
mov rcx, [rbp+var_18]
mov ecx, [rcx+134h]
imul rax, rcx
mov rcx, [rbp+var_28]
cmp rax, [rcx+40h]
jbe short loc_45809
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call _ma_bitmap_create_missing
mov [rbp+var_29], al
cmp [rbp+var_29], 0
jnz short loc_457FC
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
call adjust_total_size
loc_457FC:
jmp short $+2
loc_457FE:
mov al, [rbp+var_29]
mov [rbp+var_1], al
jmp loc_45914
loc_45809:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
call adjust_total_size
mov rax, [rbp+var_18]
mov dword ptr [rax+2Ch], 0
mov rax, [rbp+var_18]
mov dword ptr [rax+28h], 0
jmp short $+2
loc_4582E:
mov rax, [rbp+var_28]
mov rdi, [rax+600h]
mov rsi, [rbp+var_18]
add rsi, 40h ; '@'
mov rdx, [rbp+var_20]
mov rax, [rbp+var_18]
mov r8, [rax+8]
xor ecx, ecx
mov r9d, 1
xor eax, eax
mov [rsp+60h+var_60], 0
mov [rsp+60h+var_58], 0
call pagecache_read
cmp rax, 0
setz al
and al, 1
movzx eax, al
mov [rbp+var_29], al
cmp [rbp+var_29], 0
jnz short loc_458F4
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov [rbp+var_40], rax
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov rcx, [rbp+var_18]
mov ecx, [rcx+128h]
add rax, rcx
mov [rbp+var_38], rax
loc_458A6:
mov rcx, [rbp+var_38]
add rcx, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_38], rcx
xor eax, eax
cmp rcx, [rbp+var_40]
mov [rbp+var_41], al
jb short loc_458CD
mov rax, [rbp+var_38]
movzx eax, byte ptr [rax]
cmp eax, 0
setz al
mov [rbp+var_41], al
loc_458CD:
mov al, [rbp+var_41]
test al, 1
jnz short loc_458D6
jmp short loc_458D8
loc_458D6:
jmp short loc_458A6
loc_458D8:
mov rax, [rbp+var_38]
add rax, 1
mov rcx, [rbp+var_40]
sub rax, rcx
mov ecx, eax
mov rax, [rbp+var_18]
mov [rax+24h], ecx
jmp short $+2
loc_458F2:
jmp short loc_4590C
loc_458F4:
mov rax, [rbp+var_10]
mov [rbp+var_50], rax
call _my_thread_var
mov rdi, [rbp+var_50]
mov esi, [rax]
call _ma_set_fatal_error
loc_4590C:
jmp short $+2
loc_4590E:
mov al, [rbp+var_29]
mov [rbp+var_1], al
loc_45914:
mov al, [rbp+var_1]
add rsp, 60h
pop rbp
retn
| bool ma_read_bitmap_page(_DWORD *a1, long long a2, long long a3)
{
long long v3; // rax
int *v4; // rax
long long v5; // rdx
long long v6; // rcx
long long v7; // r8
int v8; // r9d
bool v10; // [rsp+1Fh] [rbp-41h]
unsigned long long v11; // [rsp+20h] [rbp-40h]
_BYTE *v12; // [rsp+28h] [rbp-38h]
char missing; // [rsp+37h] [rbp-29h]
bool v14; // [rsp+37h] [rbp-29h]
long long v15; // [rsp+38h] [rbp-28h]
v15 = *(_QWORD *)a1;
*(_QWORD *)(a2 + 16) = a3;
if ( (unsigned long long)*(unsigned int *)(a2 + 308) * (a3 + 1) <= *(_QWORD *)(v15 + 64) )
{
adjust_total_size(a1, a3);
*(_DWORD *)(a2 + 44) = 0;
*(_DWORD *)(a2 + 40) = 0;
v3 = pagecache_read(*(_QWORD **)(v15 + 1536), a2 + 64, a3, 0, *(_QWORD *)(a2 + 8), 1, 0, 0LL);
v14 = v3 == 0;
if ( v3 )
{
v11 = *(_QWORD *)(a2 + 8);
v12 = (_BYTE *)(*(unsigned int *)(a2 + 296) + v11);
do
{
--v12;
v10 = 0;
if ( (unsigned long long)v12 >= v11 )
v10 = *v12 == 0;
}
while ( v10 );
*(_DWORD *)(a2 + 36) = (_DWORD)v12 + 1 - v11;
}
else
{
v4 = (int *)my_thread_var();
ma_set_fatal_error(a1, *v4, v5, v6, v7, v8);
}
return v14;
}
else
{
missing = ma_bitmap_create_missing(a1, a2, a3);
if ( !missing )
adjust_total_size(a1, a3);
return missing;
}
}
| _ma_read_bitmap_page:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001457a1
LAB_001457a1:
JMP 0x001457a3
LAB_001457a3:
JMP 0x001457a5
LAB_001457a5:
JMP 0x001457a7
LAB_001457a7:
JMP 0x001457a9
LAB_001457a9:
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV RCX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RCX + 0x134]
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RCX + 0x40]
JBE 0x00145809
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00145920
MOV byte ptr [RBP + -0x29],AL
CMP byte ptr [RBP + -0x29],0x0
JNZ 0x001457fc
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x00145ba0
LAB_001457fc:
JMP 0x001457fe
LAB_001457fe:
MOV AL,byte ptr [RBP + -0x29]
MOV byte ptr [RBP + -0x1],AL
JMP 0x00145914
LAB_00145809:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x00145ba0
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x2c],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x28],0x0
JMP 0x0014582e
LAB_0014582e:
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX + 0x600]
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x40
MOV RDX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x18]
MOV R8,qword ptr [RAX + 0x8]
XOR ECX,ECX
MOV R9D,0x1
XOR EAX,EAX
MOV dword ptr [RSP],0x0
MOV qword ptr [RSP + 0x8],0x0
CALL 0x0012d940
CMP RAX,0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x29],AL
CMP byte ptr [RBP + -0x29],0x0
JNZ 0x001458f4
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RCX + 0x128]
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
LAB_001458a6:
MOV RCX,qword ptr [RBP + -0x38]
ADD RCX,-0x1
MOV qword ptr [RBP + -0x38],RCX
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x40]
MOV byte ptr [RBP + -0x41],AL
JC 0x001458cd
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x0
SETZ AL
MOV byte ptr [RBP + -0x41],AL
LAB_001458cd:
MOV AL,byte ptr [RBP + -0x41]
TEST AL,0x1
JNZ 0x001458d6
JMP 0x001458d8
LAB_001458d6:
JMP 0x001458a6
LAB_001458d8:
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x1
MOV RCX,qword ptr [RBP + -0x40]
SUB RAX,RCX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x24],ECX
JMP 0x001458f2
LAB_001458f2:
JMP 0x0014590c
LAB_001458f4:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x50],RAX
CALL 0x001f6090
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,dword ptr [RAX]
CALL 0x00133880
LAB_0014590c:
JMP 0x0014590e
LAB_0014590e:
MOV AL,byte ptr [RBP + -0x29]
MOV byte ptr [RBP + -0x1],AL
LAB_00145914:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x60
POP RBP
RET
|
int8 _ma_read_bitmap_page(long *param_1,long param_2,long param_3)
{
ulong uVar1;
ulong uVar2;
int8 uVar3;
int7 uVar6;
long lVar4;
int4 *puVar5;
bool bVar7;
char *local_40;
char local_9;
lVar4 = *param_1;
*(long *)(param_2 + 0x10) = param_3;
uVar2 = (param_3 + 1) * (ulong)*(uint *)(param_2 + 0x134);
uVar1 = *(ulong *)(lVar4 + 0x40);
if (uVar2 < uVar1 || uVar2 - uVar1 == 0) {
adjust_total_size(param_1,param_3);
*(int4 *)(param_2 + 0x2c) = 0;
*(int4 *)(param_2 + 0x28) = 0;
lVar4 = pagecache_read(*(int8 *)(lVar4 + 0x600),param_2 + 0x40,param_3,0,
*(int8 *)(param_2 + 8),1,0,0);
local_9 = lVar4 == 0;
if ((bool)local_9) {
puVar5 = (int4 *)_my_thread_var();
param_2 = _ma_set_fatal_error(param_1,*puVar5);
}
else {
local_40 = (char *)(*(long *)(param_2 + 8) + (ulong)*(uint *)(param_2 + 0x128));
do {
local_40 = local_40 + -1;
bVar7 = false;
if (*(char **)(param_2 + 8) <= local_40) {
bVar7 = *local_40 == '\0';
}
} while (bVar7);
*(int *)(param_2 + 0x24) = ((int)local_40 + 1) - (int)*(char **)(param_2 + 8);
}
uVar6 = (int7)((ulong)param_2 >> 8);
}
else {
uVar3 = _ma_bitmap_create_missing(param_1,param_2,param_3);
local_9 = (char)uVar3;
if (local_9 == '\0') {
uVar3 = adjust_total_size(param_1,param_3);
}
uVar6 = (int7)((ulong)uVar3 >> 8);
}
return CONCAT71(uVar6,local_9);
}
| |
27,368 | 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));
} | O3 | c | cleanup_dirname:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp # imm = 0x228
movq %rsi, %r14
movq %rdi, -0x248(%rbp)
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
leaq -0x35(%rbp), %r15
movb $0x2f, (%r15)
movw $0x2e2e, 0x1(%r15) # imm = 0x2E2E
movb $0x0, 0x3(%r15)
leaq -0x240(%rbp), %r12
movq %r12, %r13
movzbl (%r14), %eax
movb %al, (%r12)
cmpl $0x2f, %eax
je 0x2a30e
testl %eax, %eax
jne 0x2a4c6
jmp 0x2a4d1
movb $0x2f, (%r12)
movq %r12, %rax
subq %r13, %rax
cmpq $0x4, %rax
jb 0x2a3e5
movzwl -0x3(%r12), %ecx
xorw -0x35(%rbp), %cx
movb -0x1(%r12), %dl
xorb -0x33(%rbp), %dl
movzbl %dl, %edx
orw %cx, %dx
jne 0x2a402
leaq -0x3(%r12), %rax
cmpq %r13, %rax
je 0x2a449
leaq -0x4(%r12), %rbx
movb -0x4(%r12), %al
cmpb $0x7e, %al
jne 0x2a3a8
cmpq %r13, %rbx
je 0x2a36e
cmpb $0x2f, -0x5(%r12)
jne 0x2a46d
leaq 0x33b943(%rip), %rax # 0x365cb8
movq (%rax), %rsi
testq %rsi, %rsi
je 0x2a4c6
leaq -0x240(%rbp), %rdi
callq 0x24340
leaq -0x1(%rax), %rbx
leaq -0x2(%rax), %rcx
xorl %edx, %edx
cmpb $0x2f, -0x1(%rax)
sete %dl
notq %rdx
cmoveq %rcx, %rbx
movb (%rax,%rdx), %al
cmpb $0x2e, %al
jne 0x2a46d
cmpq %r13, %rbx
leaq 0x33b916(%rip), %r12 # 0x365cd0
je 0x2a3c6
cmpb $0x2f, -0x1(%rbx)
jne 0x2a46d
movl $0x200, %esi # imm = 0x200
movq %r12, %rdi
xorl %edx, %edx
callq 0x2ac88
testl %eax, %eax
je 0x2a44e
addq $0x4, %rbx
movq %rbx, %r12
jmp 0x2a4c6
cmpq $0x2, %rax
jne 0x2a402
movzwl (%r13), %eax
cmpw -0x34(%rbp), %ax
je 0x2a444
movb -0x1(%r12), %cl
cmpb $0x2f, %cl
je 0x2a415
jmp 0x2a427
testq %rax, %rax
jle 0x2a4c6
movb -0x1(%r12), %cl
cmpb $0x2f, %cl
jne 0x2a41d
decq %r12
jmp 0x2a4c6
cmpq $0x1, %rax
je 0x2a4c6
cmpb $0x2e, %cl
jne 0x2a4c6
leaq -0x2(%r12), %rax
cmpb $0x2f, -0x2(%r12)
cmoveq %rax, %r12
jmp 0x2a4c6
movq %r12, %r13
jmp 0x2a4c6
movq %rax, %r12
jmp 0x2a4c6
leaq -0x240(%rbp), %rdi
movq %r12, %rsi
callq 0x24340
leaq -0x1(%rax), %rbx
leaq -0x2(%rax), %rcx
cmpb $0x2f, -0x1(%rax)
cmoveq %rcx, %rbx
movq %rbx, %r12
cmpq %r13, %rbx
jb 0x2a487
movq %rbx, %r12
cmpb $0x2f, (%r12)
je 0x2a491
decq %r12
cmpq %r13, %r12
jae 0x2a478
cmpb $0x7e, 0x1(%r12)
je 0x2a4b2
jmp 0x2a4c6
cmpb $0x7e, 0x1(%r12)
je 0x2a4b2
movzwl (%r12), %eax
xorw -0x35(%rbp), %ax
movb 0x2(%r12), %cl
xorb -0x33(%rbp), %cl
movzbl %cl, %ecx
orw %ax, %cx
jne 0x2a4c6
incq %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x24340
movq %rax, %r12
movb $0x2f, (%rax)
incq %r14
incq %r12
jmp 0x2a2f4
leaq -0x240(%rbp), %rbx
movq -0x248(%rbp), %rdi
movq %rbx, %rsi
callq 0x242d0
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x2a50e
subq %rbx, %r12
movq %r12, %rax
addq $0x228, %rsp # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x24380
| cleanup_dirname:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 228h
mov r14, rsi
mov [rbp+var_248], rdi
mov rax, fs:28h
mov [rbp+var_30], rax
lea r15, [rbp+var_35]
mov byte ptr [r15], 2Fh ; '/'
mov word ptr [r15+1], 2E2Eh
mov byte ptr [r15+3], 0
lea r12, [rbp+var_240]
mov r13, r12
loc_2A2F4:
movzx eax, byte ptr [r14]
mov [r12], al
cmp eax, 2Fh ; '/'
jz short loc_2A30E
test eax, eax
jnz loc_2A4C6
jmp loc_2A4D1
loc_2A30E:
mov byte ptr [r12], 2Fh ; '/'
mov rax, r12
sub rax, r13
cmp rax, 4
jb loc_2A3E5
movzx ecx, word ptr [r12-3]
xor cx, [rbp+var_35]
mov dl, [r12-1]
xor dl, [rbp+var_33]
movzx edx, dl
or dx, cx
jnz loc_2A402
lea rax, [r12-3]
cmp rax, r13
jz loc_2A449
lea rbx, [r12-4]
mov al, [r12-4]
cmp al, 7Eh ; '~'
jnz short loc_2A3A8
cmp rbx, r13
jz short loc_2A36E
cmp byte ptr [r12-5], 2Fh ; '/'
jnz loc_2A46D
loc_2A36E:
lea rax, home_dir
mov rsi, [rax]
test rsi, rsi
jz loc_2A4C6
lea rdi, [rbp+var_240]
call _stpcpy
lea rbx, [rax-1]
lea rcx, [rax-2]
xor edx, edx
cmp byte ptr [rax-1], 2Fh ; '/'
setz dl
not rdx
cmovz rbx, rcx
mov al, [rax+rdx]
loc_2A3A8:
cmp al, 2Eh ; '.'
jnz loc_2A46D
cmp rbx, r13
lea r12, curr_dir
jz short loc_2A3C6
cmp byte ptr [rbx-1], 2Fh ; '/'
jnz loc_2A46D
loc_2A3C6:
mov esi, 200h
mov rdi, r12
xor edx, edx
call my_getwd
test eax, eax
jz short loc_2A44E
add rbx, 4
mov r12, rbx
jmp loc_2A4C6
loc_2A3E5:
cmp rax, 2
jnz short loc_2A402
movzx eax, word ptr [r13+0]
cmp ax, [rbp+var_35+1]
jz short loc_2A444
mov cl, [r12-1]
cmp cl, 2Fh ; '/'
jz short loc_2A415
jmp short loc_2A427
loc_2A402:
test rax, rax
jle loc_2A4C6
mov cl, [r12-1]
cmp cl, 2Fh ; '/'
jnz short loc_2A41D
loc_2A415:
dec r12
jmp loc_2A4C6
loc_2A41D:
cmp rax, 1
jz loc_2A4C6
loc_2A427:
cmp cl, 2Eh ; '.'
jnz loc_2A4C6
lea rax, [r12-2]
cmp byte ptr [r12-2], 2Fh ; '/'
cmovz r12, rax
jmp loc_2A4C6
loc_2A444:
mov r13, r12
jmp short loc_2A4C6
loc_2A449:
mov r12, rax
jmp short loc_2A4C6
loc_2A44E:
lea rdi, [rbp+var_240]
mov rsi, r12
call _stpcpy
lea rbx, [rax-1]
lea rcx, [rax-2]
cmp byte ptr [rax-1], 2Fh ; '/'
cmovz rbx, rcx
loc_2A46D:
mov r12, rbx
cmp rbx, r13
jb short loc_2A487
mov r12, rbx
loc_2A478:
cmp byte ptr [r12], 2Fh ; '/'
jz short loc_2A491
dec r12
cmp r12, r13
jnb short loc_2A478
loc_2A487:
cmp byte ptr [r12+1], 7Eh ; '~'
jz short loc_2A4B2
jmp short loc_2A4C6
loc_2A491:
cmp byte ptr [r12+1], 7Eh ; '~'
jz short loc_2A4B2
movzx eax, word ptr [r12]
xor ax, [rbp+var_35]
mov cl, [r12+2]
xor cl, [rbp+var_33]
movzx ecx, cl
or cx, ax
jnz short loc_2A4C6
loc_2A4B2:
inc rbx
mov rdi, rbx
mov rsi, r15
call _stpcpy
mov r12, rax
mov byte ptr [rax], 2Fh ; '/'
loc_2A4C6:
inc r14
inc r12
jmp loc_2A2F4
loc_2A4D1:
lea rbx, [rbp+var_240]
mov rdi, [rbp+var_248]
mov rsi, rbx
call _strcpy
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_2A50E
sub r12, rbx
mov rax, r12
add rsp, 228h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2A50E:
call ___stack_chk_fail
| long long cleanup_dirname(long long a1, unsigned __int8 *a2)
{
_BYTE *v3; // r12
_WORD *v4; // r13
int v5; // eax
long long v6; // rax
_BYTE *v7; // rbx
char v8; // al
long long v9; // rax
char v10; // cl
long long v11; // rax
long long v13; // [rsp+8h] [rbp-248h]
_BYTE v14[523]; // [rsp+10h] [rbp-240h] BYREF
char v15[5]; // [rsp+21Bh] [rbp-35h] BYREF
unsigned long long v16; // [rsp+220h] [rbp-30h]
v13 = a1;
v16 = __readfsqword(0x28u);
strcpy(v15, "/..");
v3 = v14;
v4 = v14;
while ( 1 )
{
v5 = *a2;
*v3 = v5;
if ( v5 != 47 )
break;
*v3 = 47;
v6 = v3 - (_BYTE *)v4;
if ( (unsigned long long)(v3 - (_BYTE *)v4) < 4 )
{
if ( v6 == 2 )
{
if ( *v4 == *(_WORD *)&v15[1] )
{
v4 = v3;
goto LABEL_45;
}
v10 = *(v3 - 1);
if ( v10 == 47 )
goto LABEL_26;
LABEL_28:
if ( v10 == 46 && *(v3 - 2) == 47 )
v3 -= 2;
goto LABEL_45;
}
}
else if ( !((unsigned __int16)(*(_WORD *)v15 ^ *(_WORD *)(v3 - 3)) | (unsigned __int8)(v15[2] ^ *(v3 - 1))) )
{
if ( v3 - 3 == (_BYTE *)v4 )
{
v3 -= 3;
goto LABEL_45;
}
v7 = v3 - 4;
v8 = *(v3 - 4);
if ( v8 == 126 )
{
if ( v7 == (_BYTE *)v4 || *(v3 - 5) == 47 )
{
if ( !home_dir )
goto LABEL_45;
v9 = stpcpy(v14);
v7 = (_BYTE *)(v9 - 1);
if ( *(_BYTE *)(v9 - 1) == 47 )
v7 = (_BYTE *)(v9 - 2);
v8 = *(_BYTE *)(v9 + ~(unsigned long long)(*(_BYTE *)(v9 - 1) == 47));
goto LABEL_15;
}
}
else
{
LABEL_15:
if ( v8 == 46 && (v7 == (_BYTE *)v4 || *(v7 - 1) == 47) )
{
if ( (unsigned int)my_getwd(&curr_dir, 512LL, 0LL) )
{
v3 = v7 + 4;
goto LABEL_45;
}
v11 = stpcpy(v14);
v7 = (_BYTE *)(v11 - 1);
if ( *(_BYTE *)(v11 - 1) == 47 )
v7 = (_BYTE *)(v11 - 2);
}
}
v3 = v7;
if ( v7 < (_BYTE *)v4 )
{
LABEL_40:
if ( v3[1] == 126 )
goto LABEL_44;
}
else
{
v3 = v7;
while ( *v3 != 47 )
{
if ( --v3 < (_BYTE *)v4 )
goto LABEL_40;
}
if ( v3[1] == 126 || !((unsigned __int16)(*(_WORD *)v15 ^ *(_WORD *)v3) | (unsigned __int8)(v15[2] ^ v3[2])) )
{
LABEL_44:
v3 = (_BYTE *)stpcpy(v7 + 1);
*v3 = 47;
goto LABEL_45;
}
}
goto LABEL_45;
}
if ( v6 <= 0 )
goto LABEL_45;
v10 = *(v3 - 1);
if ( v10 == 47 )
{
LABEL_26:
--v3;
goto LABEL_45;
}
if ( v6 != 1 )
goto LABEL_28;
LABEL_45:
++a2;
++v3;
}
if ( v5 )
goto LABEL_45;
strcpy(v13, v14);
return v3 - v14;
}
| cleanup_dirname:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x228
MOV R14,RSI
MOV qword ptr [RBP + -0x248],RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
LEA R15,[RBP + -0x35]
MOV byte ptr [R15],0x2f
MOV word ptr [R15 + 0x1],0x2e2e
MOV byte ptr [R15 + 0x3],0x0
LEA R12,[RBP + -0x240]
MOV R13,R12
LAB_0012a2f4:
MOVZX EAX,byte ptr [R14]
MOV byte ptr [R12],AL
CMP EAX,0x2f
JZ 0x0012a30e
TEST EAX,EAX
JNZ 0x0012a4c6
JMP 0x0012a4d1
LAB_0012a30e:
MOV byte ptr [R12],0x2f
MOV RAX,R12
SUB RAX,R13
CMP RAX,0x4
JC 0x0012a3e5
MOVZX ECX,word ptr [R12 + -0x3]
XOR CX,word ptr [RBP + -0x35]
MOV DL,byte ptr [R12 + -0x1]
XOR DL,byte ptr [RBP + -0x33]
MOVZX EDX,DL
OR DX,CX
JNZ 0x0012a402
LEA RAX,[R12 + -0x3]
CMP RAX,R13
JZ 0x0012a449
LEA RBX,[R12 + -0x4]
MOV AL,byte ptr [R12 + -0x4]
CMP AL,0x7e
JNZ 0x0012a3a8
CMP RBX,R13
JZ 0x0012a36e
CMP byte ptr [R12 + -0x5],0x2f
JNZ 0x0012a46d
LAB_0012a36e:
LEA RAX,[0x465cb8]
MOV RSI,qword ptr [RAX]
TEST RSI,RSI
JZ 0x0012a4c6
LEA RDI,[RBP + -0x240]
CALL 0x00124340
LEA RBX,[RAX + -0x1]
LEA RCX,[RAX + -0x2]
XOR EDX,EDX
CMP byte ptr [RAX + -0x1],0x2f
SETZ DL
NOT RDX
CMOVZ RBX,RCX
MOV AL,byte ptr [RAX + RDX*0x1]
LAB_0012a3a8:
CMP AL,0x2e
JNZ 0x0012a46d
CMP RBX,R13
LEA R12,[0x465cd0]
JZ 0x0012a3c6
CMP byte ptr [RBX + -0x1],0x2f
JNZ 0x0012a46d
LAB_0012a3c6:
MOV ESI,0x200
MOV RDI,R12
XOR EDX,EDX
CALL 0x0012ac88
TEST EAX,EAX
JZ 0x0012a44e
ADD RBX,0x4
MOV R12,RBX
JMP 0x0012a4c6
LAB_0012a3e5:
CMP RAX,0x2
JNZ 0x0012a402
MOVZX EAX,word ptr [R13]
CMP AX,word ptr [RBP + -0x34]
JZ 0x0012a444
MOV CL,byte ptr [R12 + -0x1]
CMP CL,0x2f
JZ 0x0012a415
JMP 0x0012a427
LAB_0012a402:
TEST RAX,RAX
JLE 0x0012a4c6
MOV CL,byte ptr [R12 + -0x1]
CMP CL,0x2f
JNZ 0x0012a41d
LAB_0012a415:
DEC R12
JMP 0x0012a4c6
LAB_0012a41d:
CMP RAX,0x1
JZ 0x0012a4c6
LAB_0012a427:
CMP CL,0x2e
JNZ 0x0012a4c6
LEA RAX,[R12 + -0x2]
CMP byte ptr [R12 + -0x2],0x2f
CMOVZ R12,RAX
JMP 0x0012a4c6
LAB_0012a444:
MOV R13,R12
JMP 0x0012a4c6
LAB_0012a449:
MOV R12,RAX
JMP 0x0012a4c6
LAB_0012a44e:
LEA RDI,[RBP + -0x240]
MOV RSI,R12
CALL 0x00124340
LEA RBX,[RAX + -0x1]
LEA RCX,[RAX + -0x2]
CMP byte ptr [RAX + -0x1],0x2f
CMOVZ RBX,RCX
LAB_0012a46d:
MOV R12,RBX
CMP RBX,R13
JC 0x0012a487
MOV R12,RBX
LAB_0012a478:
CMP byte ptr [R12],0x2f
JZ 0x0012a491
DEC R12
CMP R12,R13
JNC 0x0012a478
LAB_0012a487:
CMP byte ptr [R12 + 0x1],0x7e
JZ 0x0012a4b2
JMP 0x0012a4c6
LAB_0012a491:
CMP byte ptr [R12 + 0x1],0x7e
JZ 0x0012a4b2
MOVZX EAX,word ptr [R12]
XOR AX,word ptr [RBP + -0x35]
MOV CL,byte ptr [R12 + 0x2]
XOR CL,byte ptr [RBP + -0x33]
MOVZX ECX,CL
OR CX,AX
JNZ 0x0012a4c6
LAB_0012a4b2:
INC RBX
MOV RDI,RBX
MOV RSI,R15
CALL 0x00124340
MOV R12,RAX
MOV byte ptr [RAX],0x2f
LAB_0012a4c6:
INC R14
INC R12
JMP 0x0012a2f4
LAB_0012a4d1:
LEA RBX,[RBP + -0x240]
MOV RDI,qword ptr [RBP + -0x248]
MOV RSI,RBX
CALL 0x001242d0
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0012a50e
SUB R12,RBX
MOV RAX,R12
ADD RSP,0x228
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012a50e:
CALL 0x00124380
|
long cleanup_dirname(char *param_1,char *param_2)
{
char cVar1;
int iVar2;
ulong uVar3;
char *pcVar4;
short *psVar5;
short *psVar6;
short *psVar7;
short *psVar8;
short *psVar9;
long in_FS_OFFSET;
short local_248 [261];
int1 local_3d [2];
char cStack_3b;
int1 local_3a;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
_local_3d = 0x2e2e2f;
local_3a = 0;
psVar7 = local_248;
psVar8 = psVar7;
do {
cVar1 = *param_2;
*(char *)psVar7 = cVar1;
psVar5 = psVar7;
psVar9 = psVar8;
if (cVar1 == '/') {
*(char *)psVar7 = '/';
uVar3 = (long)psVar7 - (long)psVar8;
if (uVar3 < 4) {
if (uVar3 != 2) goto LAB_0012a402;
psVar9 = psVar7;
if (*psVar8 == stack0xffffffffffffffc4) goto LAB_0012a4c6;
cVar1 = *(char *)((long)psVar7 + -1);
if (cVar1 == '/') goto LAB_0012a415;
LAB_0012a427:
psVar9 = psVar8;
if ((cVar1 == '.') && ((char)psVar7[-1] == '/')) {
psVar5 = psVar7 + -1;
}
}
else if (*(char *)((long)psVar7 + -1) == cStack_3b &&
(int1 [2])*(short *)((long)psVar7 + -3) == local_3d) {
psVar5 = (short *)((long)psVar7 + -3);
if (psVar5 == psVar8) goto LAB_0012a4c6;
psVar5 = psVar7 + -2;
cVar1 = (char)psVar7[-2];
if (cVar1 == '~') {
if ((psVar5 == psVar8) || (psVar6 = psVar5, *(char *)((long)psVar7 + -5) == '/')) {
psVar5 = psVar7;
if (home_dir == (char *)0x0) goto LAB_0012a4c6;
pcVar4 = stpcpy((char *)local_248,home_dir);
psVar5 = (short *)(pcVar4 + -1);
if (pcVar4[-1] == '/') {
psVar5 = (short *)(pcVar4 + -2);
}
cVar1 = pcVar4[~(ulong)(pcVar4[-1] == '/')];
goto LAB_0012a3a8;
}
}
else {
LAB_0012a3a8:
psVar6 = psVar5;
if ((cVar1 == '.') && ((psVar5 == psVar8 || (*(char *)((long)psVar5 + -1) == '/')))) {
iVar2 = my_getwd(&curr_dir,0x200,0);
if (iVar2 != 0) {
psVar5 = psVar5 + 2;
goto LAB_0012a4c6;
}
pcVar4 = stpcpy((char *)local_248,&curr_dir);
psVar5 = (short *)(pcVar4 + -1);
psVar6 = (short *)(pcVar4 + -1);
if (pcVar4[-1] == '/') {
psVar5 = (short *)(pcVar4 + -2);
psVar6 = (short *)(pcVar4 + -2);
}
}
}
for (; psVar8 <= psVar5; psVar5 = (short *)((long)psVar5 + -1)) {
if ((char)*psVar5 == '/') {
if (*(char *)((long)psVar5 + 1) == '~') goto LAB_0012a4b2;
if ((char)psVar5[1] != cStack_3b || (int1 [2])*psVar5 != local_3d)
goto LAB_0012a4c6;
goto LAB_0012a4b2;
}
}
if (*(char *)((long)psVar5 + 1) == '~') {
LAB_0012a4b2:
psVar5 = (short *)stpcpy((char *)((long)psVar6 + 1),local_3d);
*(int1 *)psVar5 = 0x2f;
}
}
else {
LAB_0012a402:
if (0 < (long)uVar3) {
cVar1 = *(char *)((long)psVar7 + -1);
if (cVar1 == '/') {
LAB_0012a415:
psVar5 = (short *)((long)psVar7 + -1);
psVar9 = psVar8;
}
else if (uVar3 != 1) goto LAB_0012a427;
}
}
}
else if (cVar1 == '\0') {
strcpy(param_1,(char *)local_248);
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return (long)psVar7 - (long)local_248;
}
LAB_0012a4c6:
param_2 = param_2 + 1;
psVar7 = (short *)((long)psVar5 + 1);
psVar8 = psVar9;
} while( true );
}
| |
27,369 | js_sub_string | bluesky950520[P]quickjs/quickjs.c | static JSValue js_sub_string(JSContext *ctx, JSString *p, int start, int end)
{
int len = end - start;
if (start == 0 && end == p->len) {
return js_dup(JS_MKPTR(JS_TAG_STRING, p));
}
if (len <= 0) {
return JS_AtomToString(ctx, JS_ATOM_empty_string);
}
if (p->is_wide_char) {
JSString *str;
int i;
uint16_t c = 0;
for (i = start; i < end; i++) {
c |= p->u.str16[i];
}
if (c > 0xFF)
return js_new_string16_len(ctx, p->u.str16 + start, len);
str = js_alloc_string(ctx, len, 0);
if (!str)
return JS_EXCEPTION;
for (i = 0; i < len; i++) {
str->u.str8[i] = p->u.str16[start + i];
}
str->u.str8[len] = '\0';
return JS_MKPTR(JS_TAG_STRING, str);
} else {
return js_new_string8_len(ctx, (const char *)(p->u.str8 + start), len);
}
} | O0 | c | js_sub_string:
subq $0x58, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movl %edx, 0x34(%rsp)
movl %ecx, 0x30(%rsp)
movl 0x30(%rsp), %eax
subl 0x34(%rsp), %eax
movl %eax, 0x2c(%rsp)
cmpl $0x0, 0x34(%rsp)
jne 0x50b62
movl 0x30(%rsp), %eax
movq 0x38(%rsp), %rcx
movq 0x4(%rcx), %rcx
andq $0x7fffffff, %rcx # imm = 0x7FFFFFFF
cmpl %ecx, %eax
jne 0x50b62
movq 0x38(%rsp), %rax
movq %rax, 0x18(%rsp)
movq $-0x7, 0x20(%rsp)
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x216d0
movq %rax, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
jmp 0x50ce2
cmpl $0x0, 0x2c(%rsp)
jg 0x50b87
movq 0x40(%rsp), %rdi
movl $0x2f, %esi
callq 0x29000
movq %rax, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
jmp 0x50ce2
movq 0x38(%rsp), %rax
movq 0x4(%rax), %rax
shrq $0x1f, %rax
andq $0x1, %rax
cmpb $0x0, %al
je 0x50cb9
movw $0x0, 0xa(%rsp)
movl 0x34(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x30(%rsp), %eax
jge 0x50be1
movq 0x38(%rsp), %rax
movslq 0xc(%rsp), %rcx
movzwl 0x18(%rax,%rcx,2), %ecx
movzwl 0xa(%rsp), %eax
orl %ecx, %eax
movw %ax, 0xa(%rsp)
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x50baf
movzwl 0xa(%rsp), %eax
cmpl $0xff, %eax
jle 0x50c1e
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
addq $0x18, %rsi
movslq 0x34(%rsp), %rax
shlq %rax
addq %rax, %rsi
movl 0x2c(%rsp), %edx
callq 0x60760
movq %rax, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
jmp 0x50ce2
movq 0x40(%rsp), %rdi
movl 0x2c(%rsp), %esi
xorl %edx, %edx
callq 0x29760
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x50c51
movl $0x0, 0x48(%rsp)
movq $0x6, 0x50(%rsp)
jmp 0x50ce2
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x2c(%rsp), %eax
jge 0x50c95
movq 0x38(%rsp), %rax
movl 0x34(%rsp), %ecx
addl 0xc(%rsp), %ecx
movslq %ecx, %rcx
movw 0x18(%rax,%rcx,2), %ax
movb %al, %dl
movq 0x10(%rsp), %rax
movslq 0xc(%rsp), %rcx
movb %dl, 0x18(%rax,%rcx)
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x50c59
movq 0x10(%rsp), %rax
movslq 0x2c(%rsp), %rcx
movb $0x0, 0x18(%rax,%rcx)
movq 0x10(%rsp), %rax
movq %rax, 0x48(%rsp)
movq $-0x7, 0x50(%rsp)
jmp 0x50ce2
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
addq $0x18, %rsi
movslq 0x34(%rsp), %rax
addq %rax, %rsi
movl 0x2c(%rsp), %edx
callq 0x285c0
movq %rax, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
movq 0x48(%rsp), %rax
movq 0x50(%rsp), %rdx
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
| js_sub_string:
sub rsp, 58h
mov [rsp+58h+var_18], rdi
mov [rsp+58h+var_20], rsi
mov [rsp+58h+var_24], edx
mov [rsp+58h+var_28], ecx
mov eax, [rsp+58h+var_28]
sub eax, [rsp+58h+var_24]
mov [rsp+58h+var_2C], eax
cmp [rsp+58h+var_24], 0
jnz short loc_50B62
mov eax, [rsp+58h+var_28]
mov rcx, [rsp+58h+var_20]
mov rcx, [rcx+4]
and rcx, 7FFFFFFFh
cmp eax, ecx
jnz short loc_50B62
mov rax, [rsp+58h+var_20]
mov [rsp+58h+var_40], rax
mov [rsp+58h+var_38], 0FFFFFFFFFFFFFFF9h
mov rdi, [rsp+58h+var_40]
mov rsi, [rsp+58h+var_38]
call js_dup
mov [rsp+58h+var_10], rax
mov [rsp+58h+var_8], rdx
jmp loc_50CE2
loc_50B62:
cmp [rsp+58h+var_2C], 0
jg short loc_50B87
mov rdi, [rsp+58h+var_18]
mov esi, 2Fh ; '/'
call JS_AtomToString
mov [rsp+58h+var_10], rax
mov [rsp+58h+var_8], rdx
jmp loc_50CE2
loc_50B87:
mov rax, [rsp+58h+var_20]
mov rax, [rax+4]
shr rax, 1Fh
and rax, 1
cmp al, 0
jz loc_50CB9
mov [rsp+58h+var_4E], 0
mov eax, [rsp+58h+var_24]
mov [rsp+58h+var_4C], eax
loc_50BAF:
mov eax, [rsp+58h+var_4C]
cmp eax, [rsp+58h+var_28]
jge short loc_50BE1
mov rax, [rsp+58h+var_20]
movsxd rcx, [rsp+58h+var_4C]
movzx ecx, word ptr [rax+rcx*2+18h]
movzx eax, [rsp+58h+var_4E]
or eax, ecx
mov [rsp+58h+var_4E], ax
mov eax, [rsp+58h+var_4C]
add eax, 1
mov [rsp+58h+var_4C], eax
jmp short loc_50BAF
loc_50BE1:
movzx eax, [rsp+58h+var_4E]
cmp eax, 0FFh
jle short loc_50C1E
mov rdi, [rsp+58h+var_18]
mov rsi, [rsp+58h+var_20]
add rsi, 18h
movsxd rax, [rsp+58h+var_24]
shl rax, 1
add rsi, rax
mov edx, [rsp+58h+var_2C]
call js_new_string16_len
mov [rsp+58h+var_10], rax
mov [rsp+58h+var_8], rdx
jmp loc_50CE2
loc_50C1E:
mov rdi, [rsp+58h+var_18]
mov esi, [rsp+58h+var_2C]
xor edx, edx
call js_alloc_string
mov [rsp+58h+var_48], rax
cmp [rsp+58h+var_48], 0
jnz short loc_50C51
mov dword ptr [rsp+58h+var_10], 0
mov [rsp+58h+var_8], 6
jmp loc_50CE2
loc_50C51:
mov [rsp+58h+var_4C], 0
loc_50C59:
mov eax, [rsp+58h+var_4C]
cmp eax, [rsp+58h+var_2C]
jge short loc_50C95
mov rax, [rsp+58h+var_20]
mov ecx, [rsp+58h+var_24]
add ecx, [rsp+58h+var_4C]
movsxd rcx, ecx
mov ax, [rax+rcx*2+18h]
mov dl, al
mov rax, [rsp+58h+var_48]
movsxd rcx, [rsp+58h+var_4C]
mov [rax+rcx+18h], dl
mov eax, [rsp+58h+var_4C]
add eax, 1
mov [rsp+58h+var_4C], eax
jmp short loc_50C59
loc_50C95:
mov rax, [rsp+58h+var_48]
movsxd rcx, [rsp+58h+var_2C]
mov byte ptr [rax+rcx+18h], 0
mov rax, [rsp+58h+var_48]
mov [rsp+58h+var_10], rax
mov [rsp+58h+var_8], 0FFFFFFFFFFFFFFF9h
jmp short loc_50CE2
loc_50CB9:
mov rdi, [rsp+58h+var_18]
mov rsi, [rsp+58h+var_20]
add rsi, 18h
movsxd rax, [rsp+58h+var_24]
add rsi, rax
mov edx, [rsp+58h+var_2C]
call js_new_string8_len
mov [rsp+58h+var_10], rax
mov [rsp+58h+var_8], rdx
loc_50CE2:
mov rax, [rsp+58h+var_10]
mov rdx, [rsp+58h+var_8]
add rsp, 58h
retn
| _DWORD * js_sub_string(long long a1, _DWORD *a2, int a3, int a4)
{
unsigned __int16 v5; // [rsp+Ah] [rbp-4Eh]
int i; // [rsp+Ch] [rbp-4Ch]
signed int j; // [rsp+Ch] [rbp-4Ch]
long long v8; // [rsp+10h] [rbp-48h]
signed int v9; // [rsp+2Ch] [rbp-2Ch]
long long v11; // [rsp+48h] [rbp-10h]
v9 = a4 - a3;
if ( !a3 && a4 == (a2[1] & 0x7FFFFFFF) )
return js_dup(a2, 0xFFFFFFF9);
if ( v9 <= 0 )
return (_DWORD *)JS_AtomToString(a1, 0x2Fu);
if ( (*(_QWORD *)(a2 + 1) & 0x80000000LL) == 0 )
return (_DWORD *)js_new_string8_len(a1, (long long)a2 + a3 + 24, v9);
v5 = 0;
for ( i = a3; i < a4; ++i )
v5 |= *((_WORD *)a2 + i + 12);
if ( v5 > 0xFFu )
return (_DWORD *)js_new_string16_len(a1, (char *)a2 + 2 * a3 + 24, (unsigned int)v9);
v8 = js_alloc_string(a1, v9, 0);
if ( v8 )
{
for ( j = 0; j < v9; ++j )
*(_BYTE *)(v8 + j + 24) = *((_WORD *)a2 + j + a3 + 12);
*(_BYTE *)(v8 + v9 + 24) = 0;
return (_DWORD *)v8;
}
else
{
LODWORD(v11) = 0;
}
return (_DWORD *)v11;
}
| js_sub_string:
SUB RSP,0x58
MOV qword ptr [RSP + 0x40],RDI
MOV qword ptr [RSP + 0x38],RSI
MOV dword ptr [RSP + 0x34],EDX
MOV dword ptr [RSP + 0x30],ECX
MOV EAX,dword ptr [RSP + 0x30]
SUB EAX,dword ptr [RSP + 0x34]
MOV dword ptr [RSP + 0x2c],EAX
CMP dword ptr [RSP + 0x34],0x0
JNZ 0x00150b62
MOV EAX,dword ptr [RSP + 0x30]
MOV RCX,qword ptr [RSP + 0x38]
MOV RCX,qword ptr [RCX + 0x4]
AND RCX,0x7fffffff
CMP EAX,ECX
JNZ 0x00150b62
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x20],-0x7
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x001216d0
MOV qword ptr [RSP + 0x48],RAX
MOV qword ptr [RSP + 0x50],RDX
JMP 0x00150ce2
LAB_00150b62:
CMP dword ptr [RSP + 0x2c],0x0
JG 0x00150b87
MOV RDI,qword ptr [RSP + 0x40]
MOV ESI,0x2f
CALL 0x00129000
MOV qword ptr [RSP + 0x48],RAX
MOV qword ptr [RSP + 0x50],RDX
JMP 0x00150ce2
LAB_00150b87:
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0x4]
SHR RAX,0x1f
AND RAX,0x1
CMP AL,0x0
JZ 0x00150cb9
MOV word ptr [RSP + 0xa],0x0
MOV EAX,dword ptr [RSP + 0x34]
MOV dword ptr [RSP + 0xc],EAX
LAB_00150baf:
MOV EAX,dword ptr [RSP + 0xc]
CMP EAX,dword ptr [RSP + 0x30]
JGE 0x00150be1
MOV RAX,qword ptr [RSP + 0x38]
MOVSXD RCX,dword ptr [RSP + 0xc]
MOVZX ECX,word ptr [RAX + RCX*0x2 + 0x18]
MOVZX EAX,word ptr [RSP + 0xa]
OR EAX,ECX
MOV word ptr [RSP + 0xa],AX
MOV EAX,dword ptr [RSP + 0xc]
ADD EAX,0x1
MOV dword ptr [RSP + 0xc],EAX
JMP 0x00150baf
LAB_00150be1:
MOVZX EAX,word ptr [RSP + 0xa]
CMP EAX,0xff
JLE 0x00150c1e
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x38]
ADD RSI,0x18
MOVSXD RAX,dword ptr [RSP + 0x34]
SHL RAX,0x1
ADD RSI,RAX
MOV EDX,dword ptr [RSP + 0x2c]
CALL 0x00160760
MOV qword ptr [RSP + 0x48],RAX
MOV qword ptr [RSP + 0x50],RDX
JMP 0x00150ce2
LAB_00150c1e:
MOV RDI,qword ptr [RSP + 0x40]
MOV ESI,dword ptr [RSP + 0x2c]
XOR EDX,EDX
CALL 0x00129760
MOV qword ptr [RSP + 0x10],RAX
CMP qword ptr [RSP + 0x10],0x0
JNZ 0x00150c51
MOV dword ptr [RSP + 0x48],0x0
MOV qword ptr [RSP + 0x50],0x6
JMP 0x00150ce2
LAB_00150c51:
MOV dword ptr [RSP + 0xc],0x0
LAB_00150c59:
MOV EAX,dword ptr [RSP + 0xc]
CMP EAX,dword ptr [RSP + 0x2c]
JGE 0x00150c95
MOV RAX,qword ptr [RSP + 0x38]
MOV ECX,dword ptr [RSP + 0x34]
ADD ECX,dword ptr [RSP + 0xc]
MOVSXD RCX,ECX
MOV AX,word ptr [RAX + RCX*0x2 + 0x18]
MOV DL,AL
MOV RAX,qword ptr [RSP + 0x10]
MOVSXD RCX,dword ptr [RSP + 0xc]
MOV byte ptr [RAX + RCX*0x1 + 0x18],DL
MOV EAX,dword ptr [RSP + 0xc]
ADD EAX,0x1
MOV dword ptr [RSP + 0xc],EAX
JMP 0x00150c59
LAB_00150c95:
MOV RAX,qword ptr [RSP + 0x10]
MOVSXD RCX,dword ptr [RSP + 0x2c]
MOV byte ptr [RAX + RCX*0x1 + 0x18],0x0
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x48],RAX
MOV qword ptr [RSP + 0x50],-0x7
JMP 0x00150ce2
LAB_00150cb9:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x38]
ADD RSI,0x18
MOVSXD RAX,dword ptr [RSP + 0x34]
ADD RSI,RAX
MOV EDX,dword ptr [RSP + 0x2c]
CALL 0x001285c0
MOV qword ptr [RSP + 0x48],RAX
MOV qword ptr [RSP + 0x50],RDX
LAB_00150ce2:
MOV RAX,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
ADD RSP,0x58
RET
|
int1 [16] js_sub_string(int8 param_1,long param_2,int param_3,uint param_4)
{
int iVar1;
long lVar2;
int1 auVar3 [16];
ushort local_4e;
int local_4c;
int4 local_10;
int4 uStack_c;
int8 local_8;
iVar1 = param_4 - param_3;
if ((param_3 == 0) && (param_4 == ((uint)*(int8 *)(param_2 + 4) & 0x7fffffff))) {
auVar3 = js_dup(param_2,0xfffffffffffffff9);
local_8 = auVar3._8_8_;
local_10 = auVar3._0_4_;
uStack_c = auVar3._4_4_;
}
else if (iVar1 < 1) {
auVar3 = JS_AtomToString(param_1,0x2f);
local_8 = auVar3._8_8_;
local_10 = auVar3._0_4_;
uStack_c = auVar3._4_4_;
}
else if ((*(ulong *)(param_2 + 4) >> 0x1f & 1) == 0) {
auVar3 = js_new_string8_len(param_1,param_2 + 0x18 + (long)param_3,iVar1);
local_8 = auVar3._8_8_;
local_10 = auVar3._0_4_;
uStack_c = auVar3._4_4_;
}
else {
local_4e = 0;
for (local_4c = param_3; local_4c < (int)param_4; local_4c = local_4c + 1) {
local_4e = local_4e | *(ushort *)(param_2 + 0x18 + (long)local_4c * 2);
}
if (local_4e < 0x100) {
lVar2 = js_alloc_string(param_1,iVar1,0);
if (lVar2 == 0) {
local_10 = 0;
local_8 = 6;
}
else {
for (local_4c = 0; local_4c < iVar1; local_4c = local_4c + 1) {
*(char *)(lVar2 + 0x18 + (long)local_4c) =
(char)*(int2 *)(param_2 + 0x18 + (long)(param_3 + local_4c) * 2);
}
*(int1 *)(lVar2 + 0x18 + (long)iVar1) = 0;
local_10 = (int4)lVar2;
uStack_c = (int4)((ulong)lVar2 >> 0x20);
local_8 = 0xfffffffffffffff9;
}
}
else {
auVar3 = js_new_string16_len(param_1,param_2 + 0x18 + (long)param_3 * 2,iVar1);
local_8 = auVar3._8_8_;
local_10 = auVar3._0_4_;
uStack_c = auVar3._4_4_;
}
}
auVar3._4_4_ = uStack_c;
auVar3._0_4_ = local_10;
auVar3._8_8_ = local_8;
return auVar3;
}
| |
27,370 | js_sub_string | bluesky950520[P]quickjs/quickjs.c | static JSValue js_sub_string(JSContext *ctx, JSString *p, int start, int end)
{
int len = end - start;
if (start == 0 && end == p->len) {
return js_dup(JS_MKPTR(JS_TAG_STRING, p));
}
if (len <= 0) {
return JS_AtomToString(ctx, JS_ATOM_empty_string);
}
if (p->is_wide_char) {
JSString *str;
int i;
uint16_t c = 0;
for (i = start; i < end; i++) {
c |= p->u.str16[i];
}
if (c > 0xFF)
return js_new_string16_len(ctx, p->u.str16 + start, len);
str = js_alloc_string(ctx, len, 0);
if (!str)
return JS_EXCEPTION;
for (i = 0; i < len; i++) {
str->u.str8[i] = p->u.str16[start + i];
}
str->u.str8[len] = '\0';
return JS_MKPTR(JS_TAG_STRING, str);
} else {
return js_new_string8_len(ctx, (const char *)(p->u.str8 + start), len);
}
} | O2 | c | js_sub_string:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
testl %edx, %edx
jne 0x2e23e
movl $0x7fffffff, %eax # imm = 0x7FFFFFFF
andl 0x4(%rbx), %eax
cmpl %ecx, %eax
jne 0x2e23e
incl (%rbx)
pushq $-0x7
popq %rdx
jmp 0x2e2ca
movl %ecx, %ebp
subl %edx, %ebp
testl %ebp, %ebp
jle 0x2e25f
leaq 0x18(%rbx), %rsi
testb $-0x80, 0x7(%rbx)
movslq %edx, %r14
jne 0x2e269
addq %r14, %rsi
movl %ebp, %edx
callq 0x1a4e8
jmp 0x2e2c7
pushq $0x2f
popq %rsi
callq 0x1a990
jmp 0x2e2c7
movslq %ecx, %rcx
xorl %eax, %eax
movq %r14, %rdx
cmpq %rcx, %rdx
jge 0x2e27f
orw (%rsi,%rdx,2), %ax
incq %rdx
jmp 0x2e271
cmpw $0x100, %ax # imm = 0x100
jb 0x2e292
leaq (%rsi,%r14,2), %rsi
movl %ebp, %edx
callq 0x35ff3
jmp 0x2e2c7
movl %ebp, %esi
xorl %edx, %edx
callq 0x1ad45
testq %rax, %rax
je 0x2e2d2
movl %ebp, %ecx
leaq (%rbx,%r14,2), %rdx
addq $0x18, %rdx
xorl %esi, %esi
cmpq %rsi, %rcx
je 0x2e2bf
movb (%rdx,%rsi,2), %dil
movb %dil, 0x18(%rax,%rsi)
incq %rsi
jmp 0x2e2ac
movb $0x0, 0x18(%rax,%rcx)
pushq $-0x7
popq %rdx
movq %rax, %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x6
popq %rdx
xorl %ebx, %ebx
jmp 0x2e2ca
| js_sub_string:
push rbp
push r14
push rbx
mov rbx, rsi
test edx, edx
jnz short loc_2E23E
mov eax, 7FFFFFFFh
and eax, [rbx+4]
cmp eax, ecx
jnz short loc_2E23E
inc dword ptr [rbx]
push 0FFFFFFFFFFFFFFF9h
pop rdx
jmp loc_2E2CA
loc_2E23E:
mov ebp, ecx
sub ebp, edx
test ebp, ebp
jle short loc_2E25F
lea rsi, [rbx+18h]
test byte ptr [rbx+7], 80h
movsxd r14, edx
jnz short loc_2E269
add rsi, r14
mov edx, ebp
call js_new_string8_len
jmp short loc_2E2C7
loc_2E25F:
push 2Fh ; '/'
pop rsi
call JS_AtomToString
jmp short loc_2E2C7
loc_2E269:
movsxd rcx, ecx
xor eax, eax
mov rdx, r14
loc_2E271:
cmp rdx, rcx
jge short loc_2E27F
or ax, [rsi+rdx*2]
inc rdx
jmp short loc_2E271
loc_2E27F:
cmp ax, 100h
jb short loc_2E292
lea rsi, [rsi+r14*2]
mov edx, ebp
call js_new_string16_len
jmp short loc_2E2C7
loc_2E292:
mov esi, ebp
xor edx, edx
call js_alloc_string
test rax, rax
jz short loc_2E2D2
mov ecx, ebp
lea rdx, [rbx+r14*2]
add rdx, 18h
xor esi, esi
loc_2E2AC:
cmp rcx, rsi
jz short loc_2E2BF
mov dil, [rdx+rsi*2]
mov [rax+rsi+18h], dil
inc rsi
jmp short loc_2E2AC
loc_2E2BF:
mov byte ptr [rax+rcx+18h], 0
push 0FFFFFFFFFFFFFFF9h
pop rdx
loc_2E2C7:
mov rbx, rax
loc_2E2CA:
mov rax, rbx
pop rbx
pop r14
pop rbp
retn
loc_2E2D2:
push 6
pop rdx
xor ebx, ebx
jmp short loc_2E2CA
| long long js_sub_string(long long a1, _DWORD *a2, long long i, int a4)
{
char *v4; // rbx
unsigned int v5; // ebp
_DWORD *v6; // rsi
long long v7; // r14
long long v8; // rax
unsigned __int16 v9; // ax
long long j; // rsi
v4 = (char *)a2;
if ( (_DWORD)i || (a2[1] & 0x7FFFFFFF) != a4 )
{
v5 = a4 - i;
if ( a4 - (int)i <= 0 )
return JS_AtomToString(a1, 47);
v6 = a2 + 6;
v7 = (int)i;
if ( v4[7] >= 0 )
return js_new_string8_len(a1, (long long)v6 + (int)i, v5);
v9 = 0;
for ( i = (int)i; i < a4; ++i )
v9 |= *((_WORD *)v6 + i);
if ( v9 >= 0x100u )
return js_new_string16_len(a1, (char *)v6 + 2 * v7, v5);
v8 = js_alloc_string(a1, v5, 0LL);
if ( !v8 )
return 0LL;
for ( j = 0LL; v5 != j; ++j )
*(_BYTE *)(v8 + j + 24) = v4[2 * v7 + 24 + 2 * j];
*(_BYTE *)(v8 + v5 + 24) = 0;
return v8;
}
else
{
++*a2;
}
return (long long)v4;
}
| js_sub_string:
PUSH RBP
PUSH R14
PUSH RBX
MOV RBX,RSI
TEST EDX,EDX
JNZ 0x0012e23e
MOV EAX,0x7fffffff
AND EAX,dword ptr [RBX + 0x4]
CMP EAX,ECX
JNZ 0x0012e23e
INC dword ptr [RBX]
PUSH -0x7
POP RDX
JMP 0x0012e2ca
LAB_0012e23e:
MOV EBP,ECX
SUB EBP,EDX
TEST EBP,EBP
JLE 0x0012e25f
LEA RSI,[RBX + 0x18]
TEST byte ptr [RBX + 0x7],0x80
MOVSXD R14,EDX
JNZ 0x0012e269
ADD RSI,R14
MOV EDX,EBP
CALL 0x0011a4e8
JMP 0x0012e2c7
LAB_0012e25f:
PUSH 0x2f
POP RSI
CALL 0x0011a990
JMP 0x0012e2c7
LAB_0012e269:
MOVSXD RCX,ECX
XOR EAX,EAX
MOV RDX,R14
LAB_0012e271:
CMP RDX,RCX
JGE 0x0012e27f
OR AX,word ptr [RSI + RDX*0x2]
INC RDX
JMP 0x0012e271
LAB_0012e27f:
CMP AX,0x100
JC 0x0012e292
LEA RSI,[RSI + R14*0x2]
MOV EDX,EBP
CALL 0x00135ff3
JMP 0x0012e2c7
LAB_0012e292:
MOV ESI,EBP
XOR EDX,EDX
CALL 0x0011ad45
TEST RAX,RAX
JZ 0x0012e2d2
MOV ECX,EBP
LEA RDX,[RBX + R14*0x2]
ADD RDX,0x18
XOR ESI,ESI
LAB_0012e2ac:
CMP RCX,RSI
JZ 0x0012e2bf
MOV DIL,byte ptr [RDX + RSI*0x2]
MOV byte ptr [RAX + RSI*0x1 + 0x18],DIL
INC RSI
JMP 0x0012e2ac
LAB_0012e2bf:
MOV byte ptr [RAX + RCX*0x1 + 0x18],0x0
PUSH -0x7
POP RDX
LAB_0012e2c7:
MOV RBX,RAX
LAB_0012e2ca:
MOV RAX,RBX
POP RBX
POP R14
POP RBP
RET
LAB_0012e2d2:
PUSH 0x6
POP RDX
XOR EBX,EBX
JMP 0x0012e2ca
|
int * js_sub_string(int1 param_1,int *param_2,int param_3,uint param_4)
{
ushort uVar1;
int *piVar2;
long lVar3;
uint uVar4;
ulong uVar5;
long lVar6;
if ((param_3 == 0) && ((param_2[1] & 0x7fffffffU) == param_4)) {
*param_2 = *param_2 + 1;
piVar2 = param_2;
}
else {
uVar4 = param_4 - param_3;
if ((int)uVar4 < 1) {
piVar2 = (int *)JS_AtomToString(param_1,0x2f);
}
else {
lVar6 = (long)param_3;
if ((*(byte *)((long)param_2 + 7) & 0x80) == 0) {
piVar2 = (int *)js_new_string8_len(param_1,(long)param_2 + lVar6 + 0x18,uVar4);
}
else {
uVar1 = 0;
for (lVar3 = lVar6; lVar3 < (int)param_4; lVar3 = lVar3 + 1) {
uVar1 = uVar1 | *(ushort *)((long)param_2 + lVar3 * 2 + 0x18);
}
if (uVar1 < 0x100) {
piVar2 = (int *)js_alloc_string(param_1,uVar4,0);
if (piVar2 == (int *)0x0) {
piVar2 = (int *)0x0;
}
else {
for (uVar5 = 0; uVar4 != uVar5; uVar5 = uVar5 + 1) {
*(int1 *)((long)piVar2 + uVar5 + 0x18) =
*(int1 *)((long)param_2 + uVar5 * 2 + lVar6 * 2 + 0x18);
}
*(int1 *)((long)piVar2 + (ulong)uVar4 + 0x18) = 0;
}
}
else {
piVar2 = (int *)js_new_string16_len(param_1,(long)param_2 + lVar6 * 2 + 0x18,uVar4);
}
}
}
}
return piVar2;
}
| |
27,371 | js_regexp_string_iterator_finalizer | bluesky950520[P]quickjs/quickjs.c | static void js_regexp_string_iterator_finalizer(JSRuntime *rt, JSValue val)
{
JSObject *p = JS_VALUE_GET_OBJ(val);
JSRegExpStringIteratorData *it = p->u.regexp_string_iterator_data;
if (it) {
JS_FreeValueRT(rt, it->iterating_regexp);
JS_FreeValueRT(rt, it->iterated_string);
js_free_rt(rt, it);
}
} | O0 | c | js_regexp_string_iterator_finalizer:
subq $0x28, %rsp
movq %rsi, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq %rdi, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
je 0x5bf2a
movq 0x10(%rsp), %rdi
movq (%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x23d10
movq 0x10(%rsp), %rdi
movq (%rsp), %rax
movq 0x10(%rax), %rsi
movq 0x18(%rax), %rdx
callq 0x23d10
movq 0x10(%rsp), %rdi
movq (%rsp), %rsi
callq 0x21960
addq $0x28, %rsp
retq
nop
| js_regexp_string_iterator_finalizer:
sub rsp, 28h
mov [rsp+28h+var_10], rsi
mov [rsp+28h+var_8], rdx
mov [rsp+28h+var_18], rdi
mov rax, [rsp+28h+var_10]
mov [rsp+28h+var_20], rax
mov rax, [rsp+28h+var_20]
mov rax, [rax+30h]
mov [rsp+28h+var_28], rax
cmp [rsp+28h+var_28], 0
jz short loc_5BF2A
mov rdi, [rsp+28h+var_18]
mov rax, [rsp+28h+var_28]
mov rsi, [rax]
mov rdx, [rax+8]
call JS_FreeValueRT
mov rdi, [rsp+28h+var_18]
mov rax, [rsp+28h+var_28]
mov rsi, [rax+10h]
mov rdx, [rax+18h]
call JS_FreeValueRT
mov rdi, [rsp+28h+var_18]
mov rsi, [rsp+28h+var_28]
call js_free_rt
loc_5BF2A:
add rsp, 28h
retn
| void js_regexp_string_iterator_finalizer(long long a1, long long a2)
{
long long v2; // [rsp+0h] [rbp-28h]
v2 = *(_QWORD *)(a2 + 48);
if ( v2 )
{
JS_FreeValueRT(a1, *(_DWORD **)v2, *(_QWORD *)(v2 + 8));
JS_FreeValueRT(a1, *(_DWORD **)(v2 + 16), *(_QWORD *)(v2 + 24));
js_free_rt(a1, v2);
}
}
| js_regexp_string_iterator_finalizer:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RSI
MOV qword ptr [RSP + 0x20],RDX
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RSP],RAX
CMP qword ptr [RSP],0x0
JZ 0x0015bf2a
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x00123d10
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP]
MOV RSI,qword ptr [RAX + 0x10]
MOV RDX,qword ptr [RAX + 0x18]
CALL 0x00123d10
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP]
CALL 0x00121960
LAB_0015bf2a:
ADD RSP,0x28
RET
|
void js_regexp_string_iterator_finalizer(int8 param_1,long param_2)
{
int8 *puVar1;
puVar1 = *(int8 **)(param_2 + 0x30);
if (puVar1 != (int8 *)0x0) {
JS_FreeValueRT(param_1,*puVar1,puVar1[1]);
JS_FreeValueRT(param_1,puVar1[2],puVar1[3]);
js_free_rt(param_1,puVar1);
}
return;
}
| |
27,372 | js_regexp_string_iterator_finalizer | bluesky950520[P]quickjs/quickjs.c | static void js_regexp_string_iterator_finalizer(JSRuntime *rt, JSValue val)
{
JSObject *p = JS_VALUE_GET_OBJ(val);
JSRegExpStringIteratorData *it = p->u.regexp_string_iterator_data;
if (it) {
JS_FreeValueRT(rt, it->iterating_regexp);
JS_FreeValueRT(rt, it->iterated_string);
js_free_rt(rt, it);
}
} | O1 | c | js_regexp_string_iterator_finalizer:
pushq %r14
pushq %rbx
pushq %rax
movq 0x30(%rsi), %rbx
testq %rbx, %rbx
je 0x3b2f4
movq %rdi, %r14
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
callq 0x1d8c6
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rdx
movq %r14, %rdi
callq 0x1d8c6
decq 0x28(%r14)
movq %rbx, %rdi
callq *0x20(%r14)
movq 0x10(%r14), %rcx
movq 0x30(%r14), %rdx
subq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x30(%r14)
movq 0x40(%r14), %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rcx
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| js_regexp_string_iterator_finalizer:
push r14
push rbx
push rax
mov rbx, [rsi+30h]
test rbx, rbx
jz short loc_3B2F4
mov r14, rdi
mov rsi, [rbx]
mov rdx, [rbx+8]
call JS_FreeValueRT
mov rsi, [rbx+10h]
mov rdx, [rbx+18h]
mov rdi, r14
call JS_FreeValueRT
dec qword ptr [r14+28h]
mov rdi, rbx
call qword ptr [r14+20h]
mov rcx, [r14+10h]
mov rdx, [r14+30h]
sub rdx, rax
add rdx, 0FFFFFFFFFFFFFFF8h
mov [r14+30h], rdx
mov rdi, [r14+40h]
mov rsi, rbx
add rsp, 8
pop rbx
pop r14
jmp rcx
loc_3B2F4:
add rsp, 8
pop rbx
pop r14
retn
| long long js_regexp_string_iterator_finalizer(long long a1, long long a2)
{
long long v2; // rbx
long long v3; // rax
long long ( *v4)(_QWORD, long long); // rcx
long long result; // rax
v2 = *(_QWORD *)(a2 + 48);
if ( v2 )
{
JS_FreeValueRT(a1, *(_DWORD **)v2, *(_QWORD *)(v2 + 8));
JS_FreeValueRT(a1, *(_DWORD **)(v2 + 16), *(_QWORD *)(v2 + 24));
--*(_QWORD *)(a1 + 40);
v3 = (*(long long ( **)(long long))(a1 + 32))(v2);
v4 = *(long long ( **)(_QWORD, long long))(a1 + 16);
*(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v3 - 8;
return v4(*(_QWORD *)(a1 + 64), v2);
}
return result;
}
| js_regexp_string_iterator_finalizer:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,qword ptr [RSI + 0x30]
TEST RBX,RBX
JZ 0x0013b2f4
MOV R14,RDI
MOV RSI,qword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x8]
CALL 0x0011d8c6
MOV RSI,qword ptr [RBX + 0x10]
MOV RDX,qword ptr [RBX + 0x18]
MOV RDI,R14
CALL 0x0011d8c6
DEC qword ptr [R14 + 0x28]
MOV RDI,RBX
CALL qword ptr [R14 + 0x20]
MOV RCX,qword ptr [R14 + 0x10]
MOV RDX,qword ptr [R14 + 0x30]
SUB RDX,RAX
ADD RDX,-0x8
MOV qword ptr [R14 + 0x30],RDX
MOV RDI,qword ptr [R14 + 0x40]
MOV RSI,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP RCX
LAB_0013b2f4:
ADD RSP,0x8
POP RBX
POP R14
RET
|
void js_regexp_string_iterator_finalizer(long param_1,long param_2)
{
int8 *puVar1;
long lVar2;
puVar1 = *(int8 **)(param_2 + 0x30);
if (puVar1 != (int8 *)0x0) {
JS_FreeValueRT(param_1,*puVar1,puVar1[1]);
JS_FreeValueRT(param_1,puVar1[2],puVar1[3]);
*(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + -1;
lVar2 = (**(code **)(param_1 + 0x20))(puVar1);
lVar2 = (*(long *)(param_1 + 0x30) - lVar2) + -8;
*(long *)(param_1 + 0x30) = lVar2;
/* WARNING: Could not recover jumptable at 0x0013b2f2. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(param_1 + 0x10))
(*(int8 *)(param_1 + 0x40),puVar1,lVar2,*(code **)(param_1 + 0x10));
return;
}
return;
}
| |
27,373 | js_regexp_string_iterator_finalizer | bluesky950520[P]quickjs/quickjs.c | static void js_regexp_string_iterator_finalizer(JSRuntime *rt, JSValue val)
{
JSObject *p = JS_VALUE_GET_OBJ(val);
JSRegExpStringIteratorData *it = p->u.regexp_string_iterator_data;
if (it) {
JS_FreeValueRT(rt, it->iterating_regexp);
JS_FreeValueRT(rt, it->iterated_string);
js_free_rt(rt, it);
}
} | O2 | c | js_regexp_string_iterator_finalizer:
pushq %r14
pushq %rbx
pushq %rax
movq 0x30(%rsi), %rbx
testq %rbx, %rbx
je 0x34114
movq %rdi, %r14
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
callq 0x18031
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rdx
movq %r14, %rdi
callq 0x18031
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x170cb
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| js_regexp_string_iterator_finalizer:
push r14
push rbx
push rax
mov rbx, [rsi+30h]
test rbx, rbx
jz short loc_34114
mov r14, rdi
mov rsi, [rbx]
mov rdx, [rbx+8]
call JS_FreeValueRT
mov rsi, [rbx+10h]
mov rdx, [rbx+18h]
mov rdi, r14
call JS_FreeValueRT
mov rdi, r14
mov rsi, rbx
add rsp, 8
pop rbx
pop r14
jmp js_free_rt
loc_34114:
add rsp, 8
pop rbx
pop r14
retn
| long long js_regexp_string_iterator_finalizer(long long a1, long long a2)
{
long long v2; // rbx
long long result; // rax
v2 = *(_QWORD *)(a2 + 48);
if ( v2 )
{
JS_FreeValueRT(a1, *(unsigned int **)v2, *(_QWORD *)(v2 + 8));
JS_FreeValueRT(a1, *(unsigned int **)(v2 + 16), *(_QWORD *)(v2 + 24));
return js_free_rt(a1, v2);
}
return result;
}
| js_regexp_string_iterator_finalizer:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,qword ptr [RSI + 0x30]
TEST RBX,RBX
JZ 0x00134114
MOV R14,RDI
MOV RSI,qword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x8]
CALL 0x00118031
MOV RSI,qword ptr [RBX + 0x10]
MOV RDX,qword ptr [RBX + 0x18]
MOV RDI,R14
CALL 0x00118031
MOV RDI,R14
MOV RSI,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x001170cb
LAB_00134114:
ADD RSP,0x8
POP RBX
POP R14
RET
|
void js_regexp_string_iterator_finalizer(int8 param_1,long param_2)
{
int8 *puVar1;
puVar1 = *(int8 **)(param_2 + 0x30);
if (puVar1 != (int8 *)0x0) {
JS_FreeValueRT(param_1,*puVar1,puVar1[1]);
JS_FreeValueRT(param_1,puVar1[2],puVar1[3]);
js_free_rt(param_1,puVar1);
return;
}
return;
}
| |
27,374 | nglog::(anonymous namespace)::DumpSignalInfo(int, siginfo_t*) | ng-log[P]ng-log/src/signalhandler.cc | void DumpSignalInfo(int signal_number, siginfo_t* siginfo) {
// Get the signal name.
const char* signal_name = nullptr;
for (auto kFailureSignal : kFailureSignals) {
if (signal_number == kFailureSignal.number) {
signal_name = kFailureSignal.name;
}
}
char buf[256]; // Big enough for signal info.
MinimalFormatter formatter(buf, sizeof(buf));
formatter.AppendString("*** ");
if (signal_name) {
formatter.AppendString(signal_name);
} else {
// Use the signal number if the name is unknown. The signal name
// should be known, but just in case.
formatter.AppendString("Signal ");
formatter.AppendUint64(static_cast<uint64>(signal_number), 10);
}
formatter.AppendString(" (@0x");
formatter.AppendUint64(reinterpret_cast<uintptr_t>(siginfo->si_addr), 16);
formatter.AppendString(")");
formatter.AppendString(" received by PID ");
formatter.AppendUint64(static_cast<uint64>(getpid()), 10);
formatter.AppendString(" (TID ");
std::ostringstream oss;
oss << std::showbase << std::hex << std::this_thread::get_id();
formatter.AppendString(oss.str().c_str());
# if defined(GLOG_OS_LINUX) && defined(HAVE_SYS_SYSCALL_H) && \
defined(HAVE_SYS_TYPES_H)
pid_t tid = syscall(SYS_gettid);
formatter.AppendString(" LWP ");
formatter.AppendUint64(static_cast<uint64>(tid), 10);
# endif
formatter.AppendString(") ");
// Only linux has the PID of the signal sender in si_pid.
# ifdef NGLOG_OS_LINUX
formatter.AppendString("from PID ");
formatter.AppendUint64(static_cast<uint64>(siginfo->si_pid), 10);
formatter.AppendString("; ");
# endif
formatter.AppendString("stack trace: ***\n");
g_failure_writer(buf, formatter.num_bytes_written());
} | O0 | cpp | nglog::(anonymous namespace)::DumpSignalInfo(int, siginfo_t*):
pushq %rbp
movq %rsp, %rbp
subq $0x350, %rsp # imm = 0x350
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
leaq 0x271ff(%rip), %rax # 0x6fcd0
movq %rax, -0x20(%rbp)
leaq 0x271f4(%rip), %rax # 0x6fcd0
movq %rax, -0x28(%rbp)
leaq 0x271e9(%rip), %rax # 0x6fcd0
addq $0x60, %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
je 0x48b2c
movq -0x28(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x40(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
movl -0x4(%rbp), %eax
cmpl -0x40(%rbp), %eax
jne 0x48b1c
movq -0x38(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x48b1e
movq -0x28(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x28(%rbp)
jmp 0x48aef
leaq -0x140(%rbp), %rsi
leaq -0x158(%rbp), %rdi
movl $0x100, %edx # imm = 0x100
callq 0x48e20
leaq -0x158(%rbp), %rdi
leaq 0x6338(%rip), %rsi # 0x4ee8a
callq 0x48e60
cmpq $0x0, -0x18(%rbp)
je 0x48b70
movq -0x18(%rbp), %rsi
leaq -0x158(%rbp), %rdi
callq 0x48e60
jmp 0x48b98
leaq -0x158(%rbp), %rdi
leaq 0x6311(%rip), %rsi # 0x4ee8f
callq 0x48e60
movslq -0x4(%rbp), %rsi
leaq -0x158(%rbp), %rdi
movl $0xa, %edx
callq 0x48ef0
leaq 0x62f8(%rip), %rsi # 0x4ee97
leaq -0x158(%rbp), %rdi
movq %rdi, -0x320(%rbp)
callq 0x48e60
movq -0x320(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movl $0x10, %edx
callq 0x48ef0
movq -0x320(%rbp), %rdi
leaq 0x505d(%rip), %rsi # 0x4dc36
callq 0x48e60
movq -0x320(%rbp), %rdi
leaq 0x62b1(%rip), %rsi # 0x4ee9d
callq 0x48e60
callq 0x9af0
movq -0x320(%rbp), %rdi
movslq %eax, %rsi
movl $0xa, %edx
callq 0x48ef0
movq -0x320(%rbp), %rdi
leaq 0x6297(%rip), %rsi # 0x4eeaf
callq 0x48e60
leaq -0x2d0(%rbp), %rdi
movq %rdi, -0x318(%rbp)
callq 0x99f0
movq -0x318(%rbp), %rdi
leaq -0x3ca8e(%rip), %rsi # 0xc1b0
callq 0x9210
movq %rax, -0x310(%rbp)
jmp 0x48c4c
movq -0x310(%rbp), %rdi
leaq -0x3ca7a(%rip), %rsi # 0xc1e0
callq 0x9210
movq %rax, -0x328(%rbp)
jmp 0x48c68
callq 0xc210
movq -0x328(%rbp), %rdi
movq %rax, -0x2e8(%rbp)
movq -0x2e8(%rbp), %rsi
callq 0xc140
jmp 0x48c89
leaq -0x308(%rbp), %rdi
leaq -0x2d0(%rbp), %rsi
callq 0x9750
jmp 0x48c9e
leaq -0x308(%rbp), %rdi
movq %rdi, -0x338(%rbp)
callq 0x92b0
movq %rax, %rsi
leaq -0x158(%rbp), %rdi
movq %rdi, -0x330(%rbp)
callq 0x48e60
movq -0x338(%rbp), %rdi
callq 0x9ea8
movq -0x330(%rbp), %rdi
leaq 0x63be(%rip), %rsi # 0x4f09f
callq 0x48e60
movq -0x330(%rbp), %rdi
leaq 0x61c2(%rip), %rsi # 0x4eeb6
callq 0x48e60
movq -0x330(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq 0x10(%rax), %rsi
movl $0xa, %edx
callq 0x48ef0
jmp 0x48d14
leaq 0x61a5(%rip), %rsi # 0x4eec0
leaq -0x158(%rbp), %rdi
movq %rdi, -0x348(%rbp)
callq 0x48e60
movq -0x348(%rbp), %rdi
leaq 0x4a0c(%rip), %rsi # 0x4d748
callq 0x48e60
movq -0x348(%rbp), %rdi
movq 0x27e31(%rip), %rax # 0x70b80
movq %rax, -0x340(%rbp)
callq 0x48fd0
movq %rax, %rsi
movq -0x340(%rbp), %rax
leaq -0x140(%rbp), %rdi
callq *%rax
jmp 0x48d70
leaq -0x2d0(%rbp), %rdi
callq 0x9150
addq $0x350, %rsp # imm = 0x350
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2d8(%rbp)
movl %eax, -0x2dc(%rbp)
leaq -0x2d0(%rbp), %rdi
callq 0x9150
movq -0x2d8(%rbp), %rdi
callq 0x9d00
nop
| _ZN5nglog12_GLOBAL__N_114DumpSignalInfoEiP9siginfo_t:
push rbp
mov rbp, rsp
sub rsp, 350h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], 0
lea rax, _ZN5nglog12_GLOBAL__N_115kFailureSignalsE; nglog::`anonymous namespace'::kFailureSignals
mov [rbp+var_20], rax
lea rax, _ZN5nglog12_GLOBAL__N_115kFailureSignalsE; nglog::`anonymous namespace'::kFailureSignals
mov [rbp+var_28], rax
lea rax, _ZN5nglog12_GLOBAL__N_115kFailureSignalsE; nglog::`anonymous namespace'::kFailureSignals
add rax, 60h ; '`'
mov [rbp+var_30], rax
loc_48AEF:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_30]
jz short loc_48B2C
mov rax, [rbp+var_28]
mov rcx, [rax]
mov [rbp+var_40], rcx
mov rax, [rax+8]
mov [rbp+var_38], rax
mov eax, [rbp+var_4]
cmp eax, dword ptr [rbp+var_40]
jnz short loc_48B1C
mov rax, [rbp+var_38]
mov [rbp+var_18], rax
loc_48B1C:
jmp short $+2
loc_48B1E:
mov rax, [rbp+var_28]
add rax, 10h
mov [rbp+var_28], rax
jmp short loc_48AEF
loc_48B2C:
lea rsi, [rbp+var_140]; char *
lea rdi, [rbp+var_158]; this
mov edx, 100h; unsigned __int64
call _ZN5nglog12_GLOBAL__N_116MinimalFormatterC2EPcm; nglog::`anonymous namespace'::MinimalFormatter::MinimalFormatter(char *,ulong)
lea rdi, [rbp+var_158]; this
lea rsi, asc_4EE8A; "*** "
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendStringEPKc; nglog::`anonymous namespace'::MinimalFormatter::AppendString(char const*)
cmp [rbp+var_18], 0
jz short loc_48B70
mov rsi, [rbp+var_18]; char *
lea rdi, [rbp+var_158]; this
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendStringEPKc; nglog::`anonymous namespace'::MinimalFormatter::AppendString(char const*)
jmp short loc_48B98
loc_48B70:
lea rdi, [rbp+var_158]; this
lea rsi, aSignal; "Signal "
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendStringEPKc; nglog::`anonymous namespace'::MinimalFormatter::AppendString(char const*)
movsxd rsi, [rbp+var_4]; unsigned __int64
lea rdi, [rbp+var_158]; this
mov edx, 0Ah; unsigned int
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendUint64Emj; nglog::`anonymous namespace'::MinimalFormatter::AppendUint64(ulong,uint)
loc_48B98:
lea rsi, a0x; " (@0x"
lea rdi, [rbp+var_158]; this
mov [rbp+var_320], rdi
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendStringEPKc; nglog::`anonymous namespace'::MinimalFormatter::AppendString(char const*)
mov rdi, [rbp+var_320]; this
mov rax, [rbp+var_10]
mov rsi, [rax+10h]; unsigned __int64
mov edx, 10h; unsigned int
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendUint64Emj; nglog::`anonymous namespace'::MinimalFormatter::AppendUint64(ulong,uint)
mov rdi, [rbp+var_320]; this
lea rsi, aVoidNglogAnony+86h; char *
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendStringEPKc; nglog::`anonymous namespace'::MinimalFormatter::AppendString(char const*)
mov rdi, [rbp+var_320]; this
lea rsi, aReceivedByPid; " received by PID "
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendStringEPKc; nglog::`anonymous namespace'::MinimalFormatter::AppendString(char const*)
call _getpid
mov rdi, [rbp+var_320]; this
movsxd rsi, eax; unsigned __int64
mov edx, 0Ah; unsigned int
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendUint64Emj; nglog::`anonymous namespace'::MinimalFormatter::AppendUint64(ulong,uint)
mov rdi, [rbp+var_320]; this
lea rsi, aTid; " (TID "
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendStringEPKc; nglog::`anonymous namespace'::MinimalFormatter::AppendString(char const*)
lea rdi, [rbp+var_2D0]
mov [rbp+var_318], rdi
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
mov rdi, [rbp+var_318]
lea rsi, _ZSt8showbaseRSt8ios_base; std::showbase(std::ios_base &)
call __ZNSolsEPFRSt8ios_baseS0_E; std::ostream::operator<<(std::ios_base & (*)(std::ios_base &))
mov [rbp+var_310], rax
jmp short $+2
loc_48C4C:
mov rdi, [rbp+var_310]; this
lea rsi, _ZSt3hexRSt8ios_base; std::hex(std::ios_base &)
call __ZNSolsEPFRSt8ios_baseS0_E; std::ostream::operator<<(std::ios_base & (*)(std::ios_base &))
mov [rbp+var_328], rax
jmp short $+2
loc_48C68:
call _ZNSt11this_thread6get_idEv; std::this_thread::get_id(void)
mov rdi, [rbp+var_328]
mov [rbp+var_2E8], rax
mov rsi, [rbp+var_2E8]
call _ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_NSt6thread2idE; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::thread::id)
jmp short $+2
loc_48C89:
lea rdi, [rbp+var_308]
lea rsi, [rbp+var_2D0]
call __ZNKSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEE3strEv; std::ostringstream::str(void)
jmp short $+2
loc_48C9E:
lea rdi, [rbp+var_308]
mov [rbp+var_338], rdi
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rsi, rax; char *
lea rdi, [rbp+var_158]; this
mov [rbp+var_330], rdi
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendStringEPKc; nglog::`anonymous namespace'::MinimalFormatter::AppendString(char const*)
mov rdi, [rbp+var_338]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rdi, [rbp+var_330]; this
lea rsi, aCheckFailedIsl_0+23h; char *
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendStringEPKc; nglog::`anonymous namespace'::MinimalFormatter::AppendString(char const*)
mov rdi, [rbp+var_330]; this
lea rsi, aFromPid; "from PID "
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendStringEPKc; nglog::`anonymous namespace'::MinimalFormatter::AppendString(char const*)
mov rdi, [rbp+var_330]; this
mov rax, [rbp+var_10]
movsxd rsi, dword ptr [rax+10h]; unsigned __int64
mov edx, 0Ah; unsigned int
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendUint64Emj; nglog::`anonymous namespace'::MinimalFormatter::AppendUint64(ulong,uint)
jmp short $+2
loc_48D14:
lea rsi, asc_4EEC0; "; "
lea rdi, [rbp+var_158]; this
mov [rbp+var_348], rdi
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendStringEPKc; nglog::`anonymous namespace'::MinimalFormatter::AppendString(char const*)
mov rdi, [rbp+var_348]; this
lea rsi, aCheckFailureSt+12h; char *
call _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendStringEPKc; nglog::`anonymous namespace'::MinimalFormatter::AppendString(char const*)
mov rdi, [rbp+var_348]; this
mov rax, cs:_ZN5nglog12_GLOBAL__N_116g_failure_writerE; nglog::`anonymous namespace'::g_failure_writer
mov [rbp+var_340], rax
call _ZNK5nglog12_GLOBAL__N_116MinimalFormatter17num_bytes_writtenEv; nglog::`anonymous namespace'::MinimalFormatter::num_bytes_written(void)
mov rsi, rax
mov rax, [rbp+var_340]
lea rdi, [rbp+var_140]
call rax
jmp short $+2
loc_48D70:
lea rdi, [rbp+var_2D0]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream()
add rsp, 350h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_2D8], rcx
mov [rbp+var_2DC], eax
lea rdi, [rbp+var_2D0]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream()
mov rdi, [rbp+var_2D8]
call __Unwind_Resume
| long long nglog::`anonymous namespace'::DumpSignalInfo(int a1, long long a2)
{
int v2; // eax
std::this_thread *v3; // rdi
const char *v4; // rax
long long v5; // rax
long long ( *v7)(nglog::_anonymous_namespace_ *__hidden, const char *, unsigned long long); // [rsp+10h] [rbp-340h]
long long v8; // [rsp+28h] [rbp-328h]
_BYTE v9[32]; // [rsp+48h] [rbp-308h] BYREF
long long id; // [rsp+68h] [rbp-2E8h]
_BYTE v11[376]; // [rsp+80h] [rbp-2D0h] BYREF
char v12[24]; // [rsp+1F8h] [rbp-158h] BYREF
char v13[256]; // [rsp+210h] [rbp-140h] BYREF
long long v14; // [rsp+310h] [rbp-40h]
char *v15; // [rsp+318h] [rbp-38h]
char *v16; // [rsp+320h] [rbp-30h]
long long *v17; // [rsp+328h] [rbp-28h]
void *v18; // [rsp+330h] [rbp-20h]
char *v19; // [rsp+338h] [rbp-18h]
long long v20; // [rsp+340h] [rbp-10h]
int v21; // [rsp+34Ch] [rbp-4h]
v21 = a1;
v20 = a2;
v19 = 0LL;
v18 = &nglog::`anonymous namespace'::kFailureSignals;
v17 = (long long *)&nglog::`anonymous namespace'::kFailureSignals;
v16 = (char *)&nglog::`anonymous namespace'::kFailureSignals + 96;
while ( v17 != (long long *)v16 )
{
v14 = *v17;
v15 = (char *)v17[1];
if ( v21 == (_DWORD)v14 )
v19 = v15;
v17 += 2;
}
nglog::`anonymous namespace'::MinimalFormatter::MinimalFormatter(
(nglog::_anonymous_namespace_::MinimalFormatter *)v12,
v13,
0x100uLL);
nglog::`anonymous namespace'::MinimalFormatter::AppendString(
(nglog::_anonymous_namespace_::MinimalFormatter *)v12,
"*** ");
if ( v19 )
{
nglog::`anonymous namespace'::MinimalFormatter::AppendString(
(nglog::_anonymous_namespace_::MinimalFormatter *)v12,
v19);
}
else
{
nglog::`anonymous namespace'::MinimalFormatter::AppendString(
(nglog::_anonymous_namespace_::MinimalFormatter *)v12,
"Signal ");
nglog::`anonymous namespace'::MinimalFormatter::AppendUint64(
(nglog::_anonymous_namespace_::MinimalFormatter *)v12,
v21,
0xAu);
}
nglog::`anonymous namespace'::MinimalFormatter::AppendString(
(nglog::_anonymous_namespace_::MinimalFormatter *)v12,
" (@0x");
nglog::`anonymous namespace'::MinimalFormatter::AppendUint64(
(nglog::_anonymous_namespace_::MinimalFormatter *)v12,
*(_QWORD *)(v20 + 16),
0x10u);
nglog::`anonymous namespace'::MinimalFormatter::AppendString(
(nglog::_anonymous_namespace_::MinimalFormatter *)v12,
")");
nglog::`anonymous namespace'::MinimalFormatter::AppendString(
(nglog::_anonymous_namespace_::MinimalFormatter *)v12,
" received by PID ");
v2 = getpid();
nglog::`anonymous namespace'::MinimalFormatter::AppendUint64(
(nglog::_anonymous_namespace_::MinimalFormatter *)v12,
v2,
0xAu);
nglog::`anonymous namespace'::MinimalFormatter::AppendString(
(nglog::_anonymous_namespace_::MinimalFormatter *)v12,
" (TID ");
std::ostringstream::basic_ostringstream(v11);
v3 = (std::this_thread *)std::ostream::operator<<(v11, std::showbase);
v8 = std::ostream::operator<<(v3, std::hex);
id = std::this_thread::get_id(v3);
std::operator<<<char,std::char_traits<char>>(v8, id);
std::ostringstream::str(v9, v11);
v4 = (const char *)std::string::c_str(v9);
nglog::`anonymous namespace'::MinimalFormatter::AppendString(
(nglog::_anonymous_namespace_::MinimalFormatter *)v12,
v4);
std::string::~string(v9);
nglog::`anonymous namespace'::MinimalFormatter::AppendString(
(nglog::_anonymous_namespace_::MinimalFormatter *)v12,
") ");
nglog::`anonymous namespace'::MinimalFormatter::AppendString(
(nglog::_anonymous_namespace_::MinimalFormatter *)v12,
"from PID ");
nglog::`anonymous namespace'::MinimalFormatter::AppendUint64(
(nglog::_anonymous_namespace_::MinimalFormatter *)v12,
*(int *)(v20 + 16),
0xAu);
nglog::`anonymous namespace'::MinimalFormatter::AppendString(
(nglog::_anonymous_namespace_::MinimalFormatter *)v12,
"; ");
nglog::`anonymous namespace'::MinimalFormatter::AppendString(
(nglog::_anonymous_namespace_::MinimalFormatter *)v12,
"stack trace: ***\n");
v7 = nglog::`anonymous namespace'::g_failure_writer;
v5 = nglog::`anonymous namespace'::MinimalFormatter::num_bytes_written((nglog::_anonymous_namespace_::MinimalFormatter *)v12);
((void ( *)(char *, long long))v7)(v13, v5);
return std::ostringstream::~ostringstream(v11);
}
| DumpSignalInfo:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x350
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],0x0
LEA RAX,[0x16fcd0]
MOV qword ptr [RBP + -0x20],RAX
LEA RAX,[0x16fcd0]
MOV qword ptr [RBP + -0x28],RAX
LEA RAX,[0x16fcd0]
ADD RAX,0x60
MOV qword ptr [RBP + -0x30],RAX
LAB_00148aef:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x30]
JZ 0x00148b2c
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RCX
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x38],RAX
MOV EAX,dword ptr [RBP + -0x4]
CMP EAX,dword ptr [RBP + -0x40]
JNZ 0x00148b1c
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x18],RAX
LAB_00148b1c:
JMP 0x00148b1e
LAB_00148b1e:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x10
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00148aef
LAB_00148b2c:
LEA RSI,[RBP + -0x140]
LEA RDI,[RBP + -0x158]
MOV EDX,0x100
CALL 0x00148e20
LEA RDI,[RBP + -0x158]
LEA RSI,[0x14ee8a]
CALL 0x00148e60
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00148b70
MOV RSI,qword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x158]
CALL 0x00148e60
JMP 0x00148b98
LAB_00148b70:
LEA RDI,[RBP + -0x158]
LEA RSI,[0x14ee8f]
CALL 0x00148e60
MOVSXD RSI,dword ptr [RBP + -0x4]
LEA RDI,[RBP + -0x158]
MOV EDX,0xa
CALL 0x00148ef0
LAB_00148b98:
LEA RSI,[0x14ee97]
LEA RDI,[RBP + -0x158]
MOV qword ptr [RBP + -0x320],RDI
CALL 0x00148e60
MOV RDI,qword ptr [RBP + -0x320]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x10]
MOV EDX,0x10
CALL 0x00148ef0
MOV RDI,qword ptr [RBP + -0x320]
LEA RSI,[0x14dc36]
CALL 0x00148e60
MOV RDI,qword ptr [RBP + -0x320]
LEA RSI,[0x14ee9d]
CALL 0x00148e60
CALL 0x00109af0
MOV RDI,qword ptr [RBP + -0x320]
MOVSXD RSI,EAX
MOV EDX,0xa
CALL 0x00148ef0
MOV RDI,qword ptr [RBP + -0x320]
LEA RSI,[0x14eeaf]
CALL 0x00148e60
LEA RDI,[RBP + -0x2d0]
MOV qword ptr [RBP + -0x318],RDI
CALL 0x001099f0
MOV RDI,qword ptr [RBP + -0x318]
LAB_00148c37:
LEA RSI,[0x10c1b0]
CALL 0x00109210
MOV qword ptr [RBP + -0x310],RAX
JMP 0x00148c4c
LAB_00148c4c:
MOV RDI,qword ptr [RBP + -0x310]
LEA RSI,[0x10c1e0]
CALL 0x00109210
MOV qword ptr [RBP + -0x328],RAX
JMP 0x00148c68
LAB_00148c68:
CALL 0x0010c210
MOV RDI,qword ptr [RBP + -0x328]
MOV qword ptr [RBP + -0x2e8],RAX
MOV RSI,qword ptr [RBP + -0x2e8]
CALL 0x0010c140
JMP 0x00148c89
LAB_00148c89:
LEA RDI,[RBP + -0x308]
LEA RSI,[RBP + -0x2d0]
CALL 0x00109750
JMP 0x00148c9e
LAB_00148c9e:
LEA RDI,[RBP + -0x308]
MOV qword ptr [RBP + -0x338],RDI
CALL 0x001092b0
MOV RSI,RAX
LEA RDI,[RBP + -0x158]
MOV qword ptr [RBP + -0x330],RDI
CALL 0x00148e60
MOV RDI,qword ptr [RBP + -0x338]
CALL 0x00109ea8
MOV RDI,qword ptr [RBP + -0x330]
LEA RSI,[0x14f09f]
CALL 0x00148e60
MOV RDI,qword ptr [RBP + -0x330]
LEA RSI,[0x14eeb6]
CALL 0x00148e60
MOV RDI,qword ptr [RBP + -0x330]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RSI,dword ptr [RAX + 0x10]
MOV EDX,0xa
CALL 0x00148ef0
JMP 0x00148d14
LAB_00148d14:
LEA RSI,[0x14eec0]
LEA RDI,[RBP + -0x158]
MOV qword ptr [RBP + -0x348],RDI
CALL 0x00148e60
MOV RDI,qword ptr [RBP + -0x348]
LEA RSI,[0x14d748]
CALL 0x00148e60
MOV RDI,qword ptr [RBP + -0x348]
MOV RAX,qword ptr [0x00170b80]
MOV qword ptr [RBP + -0x340],RAX
CALL 0x00148fd0
MOV RSI,RAX
MOV RAX,qword ptr [RBP + -0x340]
LEA RDI,[RBP + -0x140]
CALL RAX
LAB_00148d6e:
JMP 0x00148d70
LAB_00148d70:
LEA RDI,[RBP + -0x2d0]
CALL 0x00109150
ADD RSP,0x350
POP RBP
RET
|
/* nglog::(anonymous namespace)::DumpSignalInfo(int, siginfo_t*) */
void nglog::(anonymous_namespace)::DumpSignalInfo(int param_1,siginfo_t *param_2)
{
int *puVar1;
__pid_t _Var2;
ostream *this;
int8 uVar3;
char *pcVar4;
string local_310 [32];
int8 local_2f0;
ostringstream local_2d8 [376];
MinimalFormatter local_160 [24];
char local_148 [256];
Elf64_DynTag local_48;
char *local_40;
Elf64_Dyn *local_38;
Elf64_Dyn *local_30;
int8 *local_28;
char *local_20;
siginfo_t *local_18;
int local_c;
local_20 = (char *)0x0;
local_28 = &kFailureSignals;
local_38 = _DYNAMIC;
for (local_30 = (Elf64_Dyn *)&kFailureSignals; local_30 != _DYNAMIC; local_30 = local_30 + 1) {
local_48 = local_30->d_tag;
local_40 = (char *)local_30->d_val;
if (param_1 == (int4)local_48) {
local_20 = local_40;
}
}
local_18 = param_2;
local_c = param_1;
MinimalFormatter::MinimalFormatter(local_160,local_148,0x100);
MinimalFormatter::AppendString(local_160,"*** ");
if (local_20 == (char *)0x0) {
MinimalFormatter::AppendString(local_160,"Signal ");
MinimalFormatter::AppendUint64(local_160,(long)local_c,10);
}
else {
MinimalFormatter::AppendString(local_160,local_20);
}
MinimalFormatter::AppendString(local_160," (@0x");
MinimalFormatter::AppendUint64(local_160,(local_18->_sifields)._sigpoll.si_band,0x10);
MinimalFormatter::AppendString(local_160,")");
MinimalFormatter::AppendString(local_160," received by PID ");
_Var2 = getpid();
MinimalFormatter::AppendUint64(local_160,(long)_Var2,10);
MinimalFormatter::AppendString(local_160," (TID ");
std::__cxx11::ostringstream::ostringstream(local_2d8);
/* try { // try from 00148c37 to 00148d6d has its CatchHandler @ 00148d85 */
this = (ostream *)std::ostream::operator<<((ostream *)local_2d8,std::showbase);
uVar3 = std::ostream::operator<<(this,std::hex);
local_2f0 = std::this_thread::get_id();
std::operator<<(uVar3,local_2f0);
std::__cxx11::ostringstream::str();
pcVar4 = (char *)std::__cxx11::string::c_str();
MinimalFormatter::AppendString(local_160,pcVar4);
std::__cxx11::string::~string(local_310);
MinimalFormatter::AppendString(local_160,") ");
MinimalFormatter::AppendString(local_160,"from PID ");
MinimalFormatter::AppendUint64(local_160,(long)(local_18->_sifields)._pad[0],10);
MinimalFormatter::AppendString(local_160,"; ");
MinimalFormatter::AppendString(local_160,"stack trace: ***\n");
puVar1 = g_failure_writer;
uVar3 = MinimalFormatter::num_bytes_written(local_160);
(*(code *)puVar1)(local_148,uVar3);
std::__cxx11::ostringstream::~ostringstream(local_2d8);
return;
}
| |
27,375 | hashcmp | eloqsql/mysys/hash.c | static int hashcmp(const HASH *hash, HASH_LINK *pos, const uchar *key,
size_t length)
{
size_t rec_keylength;
uchar *rec_key= (uchar*) my_hash_key(hash, pos->data, &rec_keylength, 1);
return ((length && length != rec_keylength) ||
my_strnncoll(hash->charset, (uchar*) rec_key, rec_keylength,
(uchar*) key, rec_keylength));
} | O3 | c | hashcmp:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r15
movq %rdx, %rbx
movq %rdi, %r14
movq 0x50(%rdi), %rax
testq %rax, %rax
je 0x4bfc8
leaq -0x28(%rbp), %r12
movq %rsi, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq *%rax
movq %rax, %rsi
movq (%r12), %rdx
jmp 0x4bfd3
movq 0x8(%r14), %rdx
movq %rdx, -0x28(%rbp)
addq (%r14), %rsi
testq %r15, %r15
sete %al
cmpq %r15, %rdx
sete %cl
orb %al, %cl
movl $0x1, %eax
cmpb $0x1, %cl
jne 0x4c00b
movq 0x68(%r14), %rdi
movq 0xc0(%rdi), %rax
movq %rbx, %rcx
movq %rdx, %r8
xorl %r9d, %r9d
callq *0x8(%rax)
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| hashcmp:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov r15, rcx
mov rbx, rdx
mov r14, rdi
mov rax, [rdi+50h]
test rax, rax
jz short loc_4BFC8
lea r12, [rbp+var_28]
mov rdi, rsi
mov rsi, r12
mov edx, 1
call rax
mov rsi, rax
mov rdx, [r12]
jmp short loc_4BFD3
loc_4BFC8:
mov rdx, [r14+8]
mov [rbp+var_28], rdx
add rsi, [r14]
loc_4BFD3:
test r15, r15
setz al
cmp rdx, r15
setz cl
or cl, al
mov eax, 1
cmp cl, 1
jnz short loc_4C00B
mov rdi, [r14+68h]
mov rax, [rdi+0C0h]
mov rcx, rbx
mov r8, rdx
xor r9d, r9d
call qword ptr [rax+8]
mov ecx, eax
xor eax, eax
test ecx, ecx
setnz al
loc_4C00B:
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| _BOOL8 hashcmp(_QWORD *a1, long long a2, long long a3, long long a4)
{
long long ( *v6)(long long, _QWORD *, long long); // rax
long long v7; // rsi
long long v8; // rdx
_BOOL8 result; // rax
_QWORD v10[5]; // [rsp+8h] [rbp-28h] BYREF
v6 = (long long ( *)(long long, _QWORD *, long long))a1[10];
if ( v6 )
{
v7 = v6(a2, v10, 1LL);
v8 = v10[0];
}
else
{
v8 = a1[1];
v10[0] = v8;
v7 = *a1 + a2;
}
result = 1LL;
if ( a4 == 0 || v8 == a4 )
return (*(unsigned int ( **)(_QWORD, long long, long long, long long, long long, _QWORD))(*(_QWORD *)(a1[13] + 192LL)
+ 8LL))(
a1[13],
v7,
v8,
a3,
v8,
0LL) != 0;
return result;
}
| hashcmp:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R15,RCX
MOV RBX,RDX
MOV R14,RDI
MOV RAX,qword ptr [RDI + 0x50]
TEST RAX,RAX
JZ 0x0014bfc8
LEA R12,[RBP + -0x28]
MOV RDI,RSI
MOV RSI,R12
MOV EDX,0x1
CALL RAX
MOV RSI,RAX
MOV RDX,qword ptr [R12]
JMP 0x0014bfd3
LAB_0014bfc8:
MOV RDX,qword ptr [R14 + 0x8]
MOV qword ptr [RBP + -0x28],RDX
ADD RSI,qword ptr [R14]
LAB_0014bfd3:
TEST R15,R15
SETZ AL
CMP RDX,R15
SETZ CL
OR CL,AL
MOV EAX,0x1
CMP CL,0x1
JNZ 0x0014c00b
MOV RDI,qword ptr [R14 + 0x68]
MOV RAX,qword ptr [RDI + 0xc0]
MOV RCX,RBX
MOV R8,RDX
XOR R9D,R9D
CALL qword ptr [RAX + 0x8]
MOV ECX,EAX
XOR EAX,EAX
TEST ECX,ECX
SETNZ AL
LAB_0014c00b:
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
bool hashcmp(long *param_1,long param_2,int8 param_3,long param_4)
{
int iVar1;
bool bVar2;
long local_30;
if ((code *)param_1[10] == (code *)0x0) {
local_30 = param_1[1];
param_2 = param_2 + *param_1;
}
else {
param_2 = (*(code *)param_1[10])(param_2,&local_30,1);
}
bVar2 = true;
if (local_30 == param_4 || param_4 == 0) {
iVar1 = (**(code **)(*(long *)(param_1[0xd] + 0xc0) + 8))
(param_1[0xd],param_2,local_30,param_3,local_30,0);
bVar2 = iVar1 != 0;
}
return bVar2;
}
| |
27,376 | my_uca_context_weight_find | eloqsql/strings/ctype-uca.c | static inline const MY_CONTRACTION *
my_uca_context_weight_find(my_uca_scanner *scanner, my_wc_t *wc,
size_t max_char_length)
{
const MY_CONTRACTION *cnt;
DBUG_ASSERT(scanner->level->contractions.nitems);
/*
If we have scanned a character which can have previous context,
and there were some more characters already before,
then reconstruct codepoint of the previous character
from "page" and "code" into w[1], and verify that {wc[1], wc[0]}
together form a real previous context pair.
Note, we support only 2-character long sequences with previous
context at the moment. CLDR does not have longer sequences.
*/
if (my_uca_can_be_previous_context_tail(&scanner->level->contractions,
wc[0]) &&
scanner->wbeg != nochar && /* if not the very first character */
my_uca_can_be_previous_context_head(&scanner->level->contractions,
(wc[1]= ((scanner->page << 8) +
scanner->code))) &&
(cnt= my_uca_previous_context_find(scanner, wc[1], wc[0])))
{
scanner->page= scanner->code= 0; /* Clear for the next character */
return cnt;
}
else if (my_uca_can_be_contraction_head(&scanner->level->contractions,
wc[0]))
{
/* Check if w[0] starts a contraction */
if ((cnt= my_uca_scanner_contraction_find(scanner, wc, max_char_length)))
return cnt;
}
return NULL;
} | O0 | c | my_uca_context_weight_find:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
jmp 0xf5356
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0xf5500
movsbl %al, %eax
cmpl $0x0, %eax
je 0xf5401
movq -0x10(%rbp), %rax
leaq 0x1659fb(%rip), %rcx # 0x25ad80
cmpq %rcx, (%rax)
je 0xf5401
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rax
movl 0x24(%rax), %eax
shll $0x8, %eax
movq -0x10(%rbp), %rcx
addl 0x28(%rcx), %eax
movslq %eax, %rsi
movq -0x18(%rbp), %rax
movq %rsi, 0x8(%rax)
callq 0xf5530
movsbl %al, %eax
cmpl $0x0, %eax
je 0xf5401
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %rax
movq (%rax), %rdx
callq 0xf5560
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0xf5401
movq -0x10(%rbp), %rax
movl $0x0, 0x28(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x24(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xf544e
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0xec970
cmpb $0x0, %al
je 0xf5444
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xf5610
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0xf5442
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xf544e
jmp 0xf5444
jmp 0xf5446
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| my_uca_context_weight_find:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
jmp short $+2
loc_F5356:
mov rax, [rbp+var_10]
mov rdi, [rax+18h]
add rdi, 18h
mov rax, [rbp+var_18]
mov rsi, [rax]
call my_uca_can_be_previous_context_tail
movsx eax, al
cmp eax, 0
jz loc_F5401
mov rax, [rbp+var_10]
lea rcx, nochar
cmp [rax], rcx
jz short loc_F5401
mov rax, [rbp+var_10]
mov rdi, [rax+18h]
add rdi, 18h
mov rax, [rbp+var_10]
mov eax, [rax+24h]
shl eax, 8
mov rcx, [rbp+var_10]
add eax, [rcx+28h]
movsxd rsi, eax
mov rax, [rbp+var_18]
mov [rax+8], rsi
call my_uca_can_be_previous_context_head
movsx eax, al
cmp eax, 0
jz short loc_F5401
mov rdi, [rbp+var_10]
mov rax, [rbp+var_18]
mov rsi, [rax+8]
mov rax, [rbp+var_18]
mov rdx, [rax]
call my_uca_previous_context_find
mov [rbp+var_28], rax
cmp rax, 0
jz short loc_F5401
mov rax, [rbp+var_10]
mov dword ptr [rax+28h], 0
mov rax, [rbp+var_10]
mov dword ptr [rax+24h], 0
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
jmp short loc_F544E
loc_F5401:
mov rax, [rbp+var_10]
mov rdi, [rax+18h]
add rdi, 18h
mov rax, [rbp+var_18]
mov rsi, [rax]
call my_uca_can_be_contraction_head
cmp al, 0
jz short loc_F5444
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call my_uca_scanner_contraction_find
mov [rbp+var_28], rax
cmp rax, 0
jz short loc_F5442
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
jmp short loc_F544E
loc_F5442:
jmp short $+2
loc_F5444:
jmp short $+2
loc_F5446:
mov [rbp+var_8], 0
loc_F544E:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| long long my_uca_context_weight_find(long long a1, _QWORD *a2, long long a3)
{
long long v3; // rdi
long long v5; // [rsp+8h] [rbp-28h]
long long v6; // [rsp+8h] [rbp-28h]
if ( (unsigned __int8)my_uca_can_be_previous_context_tail(*(_QWORD *)(a1 + 24) + 24LL, *a2)
&& *(_UNKNOWN **)a1 != &nochar
&& (v3 = *(_QWORD *)(a1 + 24) + 24LL,
a2[1] = *(_DWORD *)(a1 + 40) + (*(_DWORD *)(a1 + 36) << 8),
(unsigned __int8)my_uca_can_be_previous_context_head(v3))
&& (v5 = my_uca_previous_context_find(a1, a2[1], *a2)) != 0 )
{
*(_DWORD *)(a1 + 40) = 0;
*(_DWORD *)(a1 + 36) = 0;
return v5;
}
else if ( (unsigned __int8)my_uca_can_be_contraction_head(*(_QWORD *)(a1 + 24) + 24LL, *a2)
&& (v6 = my_uca_scanner_contraction_find(a1, a2, a3)) != 0 )
{
return v6;
}
else
{
return 0LL;
}
}
| my_uca_context_weight_find:
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
JMP 0x001f5356
LAB_001f5356:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x18]
ADD RDI,0x18
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX]
CALL 0x001f5500
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x001f5401
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x35ad80]
CMP qword ptr [RAX],RCX
JZ 0x001f5401
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x18]
ADD RDI,0x18
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x24]
SHL EAX,0x8
MOV RCX,qword ptr [RBP + -0x10]
ADD EAX,dword ptr [RCX + 0x28]
MOVSXD RSI,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x8],RSI
CALL 0x001f5530
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x001f5401
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RAX]
CALL 0x001f5560
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,0x0
JZ 0x001f5401
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x28],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x24],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001f544e
LAB_001f5401:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x18]
ADD RDI,0x18
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX]
CALL 0x001ec970
CMP AL,0x0
JZ 0x001f5444
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x001f5610
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,0x0
JZ 0x001f5442
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001f544e
LAB_001f5442:
JMP 0x001f5444
LAB_001f5444:
JMP 0x001f5446
LAB_001f5446:
MOV qword ptr [RBP + -0x8],0x0
LAB_001f544e:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
long my_uca_context_weight_find(int8 *param_1,int8 *param_2,int8 param_3)
{
char cVar1;
long lVar2;
long local_10;
cVar1 = my_uca_can_be_previous_context_tail(param_1[3] + 0x18,*param_2);
if ((cVar1 != '\0') && ((int4 *)*param_1 != &nochar)) {
lVar2 = param_1[3];
param_2[1] = (long)(*(int *)((long)param_1 + 0x24) * 0x100 + *(int *)(param_1 + 5));
cVar1 = my_uca_can_be_previous_context_head(lVar2 + 0x18);
if ((cVar1 != '\0') &&
(lVar2 = my_uca_previous_context_find(param_1,param_2[1],*param_2), lVar2 != 0)) {
*(int4 *)(param_1 + 5) = 0;
*(int4 *)((long)param_1 + 0x24) = 0;
return lVar2;
}
}
cVar1 = my_uca_can_be_contraction_head(param_1[3] + 0x18,*param_2);
if ((cVar1 == '\0') ||
(local_10 = my_uca_scanner_contraction_find(param_1,param_2,param_3), local_10 == 0)) {
local_10 = 0;
}
return local_10;
}
| |
27,377 | ctrlvec_load_prompt_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool) | llama.cpp/examples/cvector-generator/cvector-generator.cpp | static std::vector<std::string> ctrlvec_load_prompt_file(std::string path, bool skip_empty_lines) {
std::vector<std::string> output;
std::ifstream file(path);
if (!file.is_open()) {
fprintf(stderr, "error: unable to open file: %s\n", path.c_str());
exit(1);
}
std::string line;
while (std::getline(file, line)) {
bool is_skip = skip_empty_lines && line.empty();
if (!is_skip) {
string_process_escapes(line);
output.push_back(line);
}
}
file.close();
return output;
} | O3 | cpp | ctrlvec_load_prompt_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x228, %rsp # imm = 0x228
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movl $0x8, %edx
callq 0x22470
leaq 0x98(%rsp), %rdi
callq 0x22390
testb %al, %al
je 0x28118
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
movq %rsp, %r15
movq 0x20(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x223f0
movsbl %al, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x21040
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x280df
cmpq $0x0, 0x8(%rsp)
je 0x28090
movq %r15, %rdi
callq 0xfb67a
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2b23c
jmp 0x28090
leaq 0x20(%rsp), %rdi
callq 0x21b60
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x280ff
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x211a0
leaq 0x20(%rsp), %rdi
callq 0x21080
addq $0x228, %rsp # imm = 0x228
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r15, %rdi
callq 0x2290a
jmp 0x28129
movq %rax, %r14
jmp 0x2814c
jmp 0x28129
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x28142
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x211a0
leaq 0x20(%rsp), %rdi
callq 0x21080
movq %rbx, %rdi
callq 0x2a4f6
movq %r14, %rdi
callq 0x21c10
| _ZL24ctrlvec_load_prompt_fileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb:
push r15
push r14
push r12
push rbx
sub rsp, 228h
mov r15, rsi
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
mov qword ptr [rdi+10h], 0
lea r14, [rsp+248h+var_228]
mov rdi, r14
mov edx, 8
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode; std::ifstream::basic_ifstream(std::string const&,std::_Ios_Openmode)
lea rdi, [rsp+248h+var_1B0]
call __ZNKSt12__basic_fileIcE7is_openEv; std::__basic_file<char>::is_open(void)
test al, al
jz loc_28118
lea r12, [rsp+248h+var_238]
mov [r12-10h], r12
mov qword ptr [r12-8], 0
mov byte ptr [r12], 0
mov r15, rsp
loc_28090:
mov rax, [rsp+248h+var_228]
mov rdi, [rax-18h]
add rdi, r14
mov esi, 0Ah
call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char)
movsx edx, al
mov rdi, r14
mov rsi, r15
call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &,char)
mov rcx, [rax]
mov rcx, [rcx-18h]
test byte ptr [rax+rcx+20h], 5
jnz short loc_280DF
cmp [rsp+248h+var_240], 0
jz short loc_28090
mov rdi, r15
call _Z22string_process_escapesRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; string_process_escapes(std::string &)
mov rdi, rbx
mov rsi, r15
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_; std::vector<std::string>::push_back(std::string const&)
jmp short loc_28090
loc_280DF:
lea rdi, [rsp+248h+var_228]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEE5closeEv; std::ifstream::close(void)
mov rdi, [rsp+248h+var_248]; void *
cmp rdi, r12
jz short loc_280FF
mov rsi, [rsp+248h+var_238]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_280FF:
lea rdi, [rsp+248h+var_228]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
add rsp, 228h
pop rbx
pop r12
pop r14
pop r15
retn
loc_28118:
mov rdi, r15
call _ZL24ctrlvec_load_prompt_fileNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb_cold_1; ctrlvec_load_prompt_file(std::string,bool) [clone]
jmp short loc_28129
mov r14, rax
jmp short loc_2814C
jmp short $+2
loc_28129:
mov r14, rax
mov rdi, [rsp+248h+var_248]; void *
cmp rdi, r12
jz short loc_28142
mov rsi, [rsp+248h+var_238]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_28142:
lea rdi, [rsp+248h+var_228]
call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream()
loc_2814C:
mov rdi, rbx
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, r14
call __Unwind_Resume
| long long ctrlvec_load_prompt_file(long long a1, const char **a2)
{
char v2; // al
_QWORD *v3; // rax
void *v5; // [rsp+0h] [rbp-248h] BYREF
long long v6; // [rsp+8h] [rbp-240h]
_QWORD v7[2]; // [rsp+10h] [rbp-238h] BYREF
_QWORD v8[15]; // [rsp+20h] [rbp-228h] BYREF
_BYTE v9[432]; // [rsp+98h] [rbp-1B0h] BYREF
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
std::ifstream::basic_ifstream(v8, a2, 8LL);
if ( !(unsigned __int8)std::__basic_file<char>::is_open(v9) )
ctrlvec_load_prompt_file(a2);
v5 = v7;
v6 = 0LL;
LOBYTE(v7[0]) = 0;
while ( 1 )
{
v2 = std::ios::widen((char *)v8 + *(_QWORD *)(v8[0] - 24LL), 10LL);
v3 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(v8, &v5, (unsigned int)v2);
if ( (*((_BYTE *)v3 + *(_QWORD *)(*v3 - 24LL) + 32) & 5) != 0 )
break;
if ( v6 )
{
string_process_escapes(&v5);
std::vector<std::string>::push_back(a1, &v5);
}
}
std::ifstream::close(v8);
if ( v5 != v7 )
operator delete(v5, v7[0] + 1LL);
return std::ifstream::~ifstream(v8);
}
| ctrlvec_load_prompt_file:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x228
MOV R15,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
LAB_0012804e:
LEA R14,[RSP + 0x20]
MOV RDI,R14
MOV EDX,0x8
CALL 0x00122470
LEA RDI,[RSP + 0x98]
CALL 0x00122390
TEST AL,AL
JZ 0x00128118
LEA R12,[RSP + 0x10]
MOV qword ptr [R12 + -0x10],R12
MOV qword ptr [R12 + -0x8],0x0
MOV byte ptr [R12],0x0
MOV R15,RSP
LAB_00128090:
MOV RAX,qword ptr [RSP + 0x20]
MOV RDI,qword ptr [RAX + -0x18]
ADD RDI,R14
LAB_0012809c:
MOV ESI,0xa
CALL 0x001223f0
MOVSX EDX,AL
MOV RDI,R14
MOV RSI,R15
CALL 0x00121040
MOV RCX,qword ptr [RAX]
MOV RCX,qword ptr [RCX + -0x18]
TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5
JNZ 0x001280df
CMP qword ptr [RSP + 0x8],0x0
JZ 0x00128090
LAB_001280ca:
MOV RDI,R15
CALL 0x001fb67a
MOV RDI,RBX
MOV RSI,R15
CALL 0x0012b23c
JMP 0x00128090
LAB_001280df:
LEA RDI,[RSP + 0x20]
CALL 0x00121b60
LAB_001280e9:
MOV RDI,qword ptr [RSP]
CMP RDI,R12
JZ 0x001280ff
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x001211a0
LAB_001280ff:
LEA RDI,[RSP + 0x20]
CALL 0x00121080
ADD RSP,0x228
POP RBX
POP R12
POP R14
POP R15
RET
LAB_00128118:
MOV RDI,R15
CALL 0x0012290a
LAB_00128120:
JMP 0x00128129
LAB_00128129:
MOV R14,RAX
MOV RDI,qword ptr [RSP]
CMP RDI,R12
JZ 0x00128142
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x001211a0
LAB_00128142:
LEA RDI,[RSP + 0x20]
CALL 0x00121080
LAB_0012814c:
MOV RDI,RBX
CALL 0x0012a4f6
MOV RDI,R14
CALL 0x00121c10
|
/* ctrlvec_load_prompt_file(std::__cxx11::string, bool) */
void ctrlvec_load_prompt_file
(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *param_1,
int8 param_2)
{
char cVar1;
istream *piVar2;
int8 uVar3;
void *unaff_R12;
int1 *local_248;
long local_240;
int1 local_238;
int7 uStack_237;
long local_228 [65];
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
/* try { // try from 0012804e to 0012805f has its CatchHandler @ 00128122 */
std::ifstream::ifstream((ifstream *)local_228,param_2,8);
cVar1 = std::__basic_file<char>::is_open();
if (cVar1 != '\0') {
local_240 = 0;
local_238 = 0;
local_248 = &local_238;
while( true ) {
/* try { // try from 0012809c to 001280b3 has its CatchHandler @ 00128129 */
cVar1 = std::ios::widen((char)*(int8 *)(local_228[0] + -0x18) +
(char)(istream *)local_228);
piVar2 = std::getline<char,std::char_traits<char>,std::allocator<char>>
((istream *)local_228,(string *)&local_248,cVar1);
if (((byte)piVar2[*(long *)(*(long *)piVar2 + -0x18) + 0x20] & 5) != 0) break;
if (local_240 != 0) {
/* try { // try from 001280ca to 001280dc has its CatchHandler @ 00128127 */
string_process_escapes((string *)&local_248);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::push_back
(param_1,(string *)&local_248);
}
}
/* try { // try from 001280df to 001280e8 has its CatchHandler @ 00128120 */
std::ifstream::close();
if (local_248 != &local_238) {
operator_delete(local_248,CONCAT71(uStack_237,local_238) + 1);
}
std::ifstream::~ifstream((ifstream *)local_228);
return;
}
uVar3 = ctrlvec_load_prompt_file(param_2);
/* catch() { ... } // from try @ 001280df with catch @ 00128120 */
/* catch() { ... } // from try @ 0012809c with catch @ 00128129 */
if (local_248 != (int1 *)unaff_R12) {
operator_delete(local_248,CONCAT71(uStack_237,local_238) + 1);
}
std::ifstream::~ifstream((ifstream *)local_228);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(param_1);
/* WARNING: Subroutine does not return */
_Unwind_Resume(uVar3);
}
| |
27,378 | utf8_encode_len | bluesky950520[P]quickjs/cutils.c | size_t utf8_encode_len(uint32_t c)
{
if (c < 0x80)
return 1;
if (c < 0x800)
return 2;
if (c < 0x10000)
return 3;
if (c < 0x110000)
return 4;
return 3;
} | O0 | c | utf8_encode_len:
movl %edi, -0xc(%rsp)
cmpl $0x80, -0xc(%rsp)
jae 0x1e989
movq $0x1, -0x8(%rsp)
jmp 0x1e9d1
cmpl $0x800, -0xc(%rsp) # imm = 0x800
jae 0x1e99e
movq $0x2, -0x8(%rsp)
jmp 0x1e9d1
cmpl $0x10000, -0xc(%rsp) # imm = 0x10000
jae 0x1e9b3
movq $0x3, -0x8(%rsp)
jmp 0x1e9d1
cmpl $0x110000, -0xc(%rsp) # imm = 0x110000
jae 0x1e9c8
movq $0x4, -0x8(%rsp)
jmp 0x1e9d1
movq $0x3, -0x8(%rsp)
movq -0x8(%rsp), %rax
retq
nopw (%rax,%rax)
| utf8_encode_len:
mov [rsp+var_C], edi
cmp [rsp+var_C], 80h
jnb short loc_1E989
mov [rsp+var_8], 1
jmp short loc_1E9D1
loc_1E989:
cmp [rsp+var_C], 800h
jnb short loc_1E99E
mov [rsp+var_8], 2
jmp short loc_1E9D1
loc_1E99E:
cmp [rsp+var_C], 10000h
jnb short loc_1E9B3
mov [rsp+var_8], 3
jmp short loc_1E9D1
loc_1E9B3:
cmp [rsp+var_C], 110000h
jnb short loc_1E9C8
mov [rsp+var_8], 4
jmp short loc_1E9D1
loc_1E9C8:
mov [rsp+var_8], 3
loc_1E9D1:
mov rax, [rsp+var_8]
retn
| long long utf8_encode_len(unsigned int a1)
{
if ( a1 < 0x80 )
return 1LL;
if ( a1 < 0x800 )
return 2LL;
if ( a1 < 0x10000 )
return 3LL;
if ( a1 >= 0x110000 )
return 3LL;
return 4LL;
}
| utf8_encode_len:
MOV dword ptr [RSP + -0xc],EDI
CMP dword ptr [RSP + -0xc],0x80
JNC 0x0011e989
MOV qword ptr [RSP + -0x8],0x1
JMP 0x0011e9d1
LAB_0011e989:
CMP dword ptr [RSP + -0xc],0x800
JNC 0x0011e99e
MOV qword ptr [RSP + -0x8],0x2
JMP 0x0011e9d1
LAB_0011e99e:
CMP dword ptr [RSP + -0xc],0x10000
JNC 0x0011e9b3
MOV qword ptr [RSP + -0x8],0x3
JMP 0x0011e9d1
LAB_0011e9b3:
CMP dword ptr [RSP + -0xc],0x110000
JNC 0x0011e9c8
MOV qword ptr [RSP + -0x8],0x4
JMP 0x0011e9d1
LAB_0011e9c8:
MOV qword ptr [RSP + -0x8],0x3
LAB_0011e9d1:
MOV RAX,qword ptr [RSP + -0x8]
RET
|
int8 utf8_encode_len(uint param_1)
{
int8 local_8;
if (param_1 < 0x80) {
local_8 = 1;
}
else if (param_1 < 0x800) {
local_8 = 2;
}
else if (param_1 < 0x10000) {
local_8 = 3;
}
else if (param_1 < 0x110000) {
local_8 = 4;
}
else {
local_8 = 3;
}
return local_8;
}
| |
27,379 | utf8_encode_len | bluesky950520[P]quickjs/cutils.c | size_t utf8_encode_len(uint32_t c)
{
if (c < 0x80)
return 1;
if (c < 0x800)
return 2;
if (c < 0x10000)
return 3;
if (c < 0x110000)
return 4;
return 3;
} | O1 | c | utf8_encode_len:
movl $0x1, %eax
cmpl $0x80, %edi
jb 0x1b682
movl $0x2, %eax
cmpl $0x800, %edi # imm = 0x800
jb 0x1b682
movl $0x3, %eax
cmpl $0x10000, %edi # imm = 0x10000
jb 0x1b682
xorl %eax, %eax
cmpl $0x110000, %edi # imm = 0x110000
adcq $0x3, %rax
retq
| utf8_encode_len:
mov eax, 1
cmp edi, 80h
jb short locret_1B682
mov eax, 2
cmp edi, 800h
jb short locret_1B682
mov eax, 3
cmp edi, 10000h
jb short locret_1B682
xor eax, eax
cmp edi, 110000h
adc rax, 3
locret_1B682:
retn
| long long utf8_encode_len(unsigned int a1)
{
long long result; // rax
result = 1LL;
if ( a1 >= 0x80 )
{
result = 2LL;
if ( a1 >= 0x800 )
{
result = 3LL;
if ( a1 >= 0x10000 )
return (a1 < 0x110000) + 3LL;
}
}
return result;
}
| |||
27,380 | utf8_encode_len | bluesky950520[P]quickjs/cutils.c | size_t utf8_encode_len(uint32_t c)
{
if (c < 0x80)
return 1;
if (c < 0x800)
return 2;
if (c < 0x10000)
return 3;
if (c < 0x110000)
return 4;
return 3;
} | O2 | c | utf8_encode_len:
cmpl $0x80, %edi
jae 0x15eba
pushq $0x1
jmp 0x15ed0
cmpl $0x800, %edi # imm = 0x800
jae 0x15ec6
pushq $0x2
jmp 0x15ed0
cmpl $0x10000, %edi # imm = 0x10000
jae 0x15ed2
pushq $0x3
popq %rax
retq
xorl %eax, %eax
cmpl $0x110000, %edi # imm = 0x110000
adcq $0x3, %rax
retq
| utf8_encode_len:
cmp edi, 80h
jnb short loc_15EBA
push 1
jmp short loc_15ED0
loc_15EBA:
cmp edi, 800h
jnb short loc_15EC6
push 2
jmp short loc_15ED0
loc_15EC6:
cmp edi, 10000h
jnb short loc_15ED2
push 3
loc_15ED0:
pop rax
retn
loc_15ED2:
xor eax, eax
cmp edi, 110000h
adc rax, 3
retn
| long long utf8_encode_len(unsigned int a1)
{
if ( a1 < 0x80 )
return 1LL;
if ( a1 < 0x800 )
return 2LL;
if ( a1 < 0x10000 )
return 3LL;
return (a1 < 0x110000) + 3LL;
}
| utf8_encode_len:
CMP EDI,0x80
JNC 0x00115eba
PUSH 0x1
JMP 0x00115ed0
LAB_00115eba:
CMP EDI,0x800
JNC 0x00115ec6
PUSH 0x2
JMP 0x00115ed0
LAB_00115ec6:
CMP EDI,0x10000
JNC 0x00115ed2
PUSH 0x3
LAB_00115ed0:
POP RAX
RET
LAB_00115ed2:
XOR EAX,EAX
CMP EDI,0x110000
ADC RAX,0x3
RET
|
char utf8_encode_len(uint param_1)
{
char cVar1;
if (param_1 < 0x80) {
cVar1 = '\x01';
}
else if (param_1 < 0x800) {
cVar1 = '\x02';
}
else {
if (0xffff < param_1) {
return (param_1 < 0x110000) + '\x03';
}
cVar1 = '\x03';
}
return cVar1;
}
| |
27,381 | utf8_encode_len | bluesky950520[P]quickjs/cutils.c | size_t utf8_encode_len(uint32_t c)
{
if (c < 0x80)
return 1;
if (c < 0x800)
return 2;
if (c < 0x10000)
return 3;
if (c < 0x110000)
return 4;
return 3;
} | O3 | c | utf8_encode_len:
movl $0x1, %eax
cmpl $0x80, %edi
jb 0x1bfb3
movl $0x2, %eax
cmpl $0x800, %edi # imm = 0x800
jb 0x1bfb3
movl $0x3, %eax
cmpl $0x10000, %edi # imm = 0x10000
jb 0x1bfb3
xorl %eax, %eax
cmpl $0x110000, %edi # imm = 0x110000
adcq $0x3, %rax
retq
| utf8_encode_len:
mov eax, 1
cmp edi, 80h
jb short locret_1BFB3
mov eax, 2
cmp edi, 800h
jb short locret_1BFB3
mov eax, 3
cmp edi, offset loc_10000
jb short locret_1BFB3
xor eax, eax
cmp edi, 110000h
adc rax, 3
locret_1BFB3:
retn
| long long utf8_encode_len(unsigned int a1)
{
long long result; // rax
result = 1LL;
if ( a1 >= 0x80 )
{
result = 2LL;
if ( a1 >= 0x800 )
{
result = 3LL;
if ( a1 >= (unsigned int)&loc_10000 )
return (a1 < 0x110000) + 3LL;
}
}
return result;
}
| utf8_encode_len:
MOV EAX,0x1
CMP EDI,0x80
JC 0x0011bfb3
MOV EAX,0x2
CMP EDI,0x800
JC 0x0011bfb3
MOV EAX,0x3
CMP EDI,0x10000
JC 0x0011bfb3
XOR EAX,EAX
CMP EDI,0x110000
ADC RAX,0x3
LAB_0011bfb3:
RET
|
char utf8_encode_len(uint param_1)
{
char cVar1;
cVar1 = '\x01';
if (((0x7f < param_1) && (cVar1 = '\x02', 0x7ff < param_1)) && (cVar1 = '\x03', 0xffff < param_1))
{
cVar1 = (param_1 < 0x110000) + '\x03';
}
return cVar1;
}
| |
27,382 | my_collation_get_by_name | eloqsql/mysys/charset.c | CHARSET_INFO *
my_collation_get_by_name(MY_CHARSET_LOADER *loader,
const char *name, myf flags)
{
uint cs_number;
CHARSET_INFO *cs;
my_pthread_once(&charsets_initialized, init_available_charsets);
cs_number= get_collation_number(name,flags);
my_charset_loader_init_mysys(loader);
cs= cs_number ? get_internal_charset(loader, cs_number, flags) : NULL;
if (!cs && (flags & MY_WME))
{
char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)];
strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX);
my_error(EE_UNKNOWN_COLLATION, MYF(ME_BELL), name, index_file);
}
return cs;
} | O0 | c | my_collation_get_by_name:
pushq %rbp
movq %rsp, %rbp
subq $0x260, %rsp # imm = 0x260
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x228(%rbp)
movq %rsi, -0x230(%rbp)
movq %rdx, -0x238(%rbp)
leaq 0x36a560(%rip), %rdi # 0x39a194
leaq -0x90b(%rip), %rsi # 0x2f330
callq 0x25280
movq -0x230(%rbp), %rdi
movq -0x238(%rbp), %rsi
callq 0x2f280
movl %eax, -0x23c(%rbp)
movq -0x228(%rbp), %rdi
callq 0x2e950
cmpl $0x0, -0x23c(%rbp)
je 0x2fc90
movq -0x228(%rbp), %rdi
movl -0x23c(%rbp), %esi
movq -0x238(%rbp), %rdx
callq 0x2f980
movq %rax, -0x250(%rbp)
jmp 0x2fc9b
xorl %eax, %eax
movq %rax, -0x250(%rbp)
jmp 0x2fc9b
movq -0x250(%rbp), %rax
movq %rax, -0x248(%rbp)
cmpq $0x0, -0x248(%rbp)
jne 0x2fcfe
movq -0x238(%rbp), %rax
andq $0x10, %rax
cmpq $0x0, %rax
je 0x2fcfe
leaq -0x220(%rbp), %rdi
callq 0x2eff0
movq %rax, %rdi
leaq 0x5358d(%rip), %rsi # 0x83267
callq 0x252d0
movq -0x230(%rbp), %rdx
leaq -0x220(%rbp), %rcx
movl $0x1c, %edi
movl $0x4, %esi
movb $0x0, %al
callq 0x37670
movq -0x248(%rbp), %rax
movq %rax, -0x258(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x2fd2e
movq -0x258(%rbp), %rax
addq $0x260, %rsp # imm = 0x260
popq %rbp
retq
callq 0x25330
nopw %cs:(%rax,%rax)
| my_collation_get_by_name:
push rbp
mov rbp, rsp
sub rsp, 260h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_228], rdi
mov [rbp+var_230], rsi
mov [rbp+var_238], rdx
lea rdi, charsets_initialized
lea rsi, init_available_charsets
call _pthread_once
mov rdi, [rbp+var_230]
mov rsi, [rbp+var_238]
call get_collation_number
mov [rbp+var_23C], eax
mov rdi, [rbp+var_228]
call my_charset_loader_init_mysys
cmp [rbp+var_23C], 0
jz short loc_2FC90
mov rdi, [rbp+var_228]
mov esi, [rbp+var_23C]
mov rdx, [rbp+var_238]
call get_internal_charset
mov [rbp+var_250], rax
jmp short loc_2FC9B
loc_2FC90:
xor eax, eax
mov [rbp+var_250], rax
jmp short $+2
loc_2FC9B:
mov rax, [rbp+var_250]
mov [rbp+var_248], rax
cmp [rbp+var_248], 0
jnz short loc_2FCFE
mov rax, [rbp+var_238]
and rax, 10h
cmp rax, 0
jz short loc_2FCFE
lea rdi, [rbp+var_220]
call get_charsets_dir
mov rdi, rax
lea rsi, aIndexXml; "Index.xml"
call _stpcpy
mov rdx, [rbp+var_230]
lea rcx, [rbp+var_220]
mov edi, 1Ch
mov esi, 4
mov al, 0
call my_error
loc_2FCFE:
mov rax, [rbp+var_248]
mov [rbp+var_258], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_2FD2E
mov rax, [rbp+var_258]
add rsp, 260h
pop rbp
retn
loc_2FD2E:
call ___stack_chk_fail
| long long my_collation_get_by_name(long long a1, long long a2, long long a3)
{
long long charsets_dir; // rax
int v4; // r8d
int v5; // r9d
long long internal_charset; // [rsp+10h] [rbp-250h]
unsigned int collation_number; // [rsp+24h] [rbp-23Ch]
_BYTE v10[536]; // [rsp+40h] [rbp-220h] BYREF
unsigned long long v11; // [rsp+258h] [rbp-8h]
v11 = __readfsqword(0x28u);
pthread_once(&charsets_initialized, init_available_charsets);
collation_number = get_collation_number(a2, a3);
my_charset_loader_init_mysys(a1);
if ( collation_number )
internal_charset = get_internal_charset(a1, collation_number, a3);
else
internal_charset = 0LL;
if ( !internal_charset && (a3 & 0x10) != 0 )
{
charsets_dir = get_charsets_dir((long long)v10);
stpcpy(charsets_dir, "Index.xml");
my_error(28, 4, a2, (unsigned int)v10, v4, v5);
}
return internal_charset;
}
| my_collation_get_by_name:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x260
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x228],RDI
MOV qword ptr [RBP + -0x230],RSI
MOV qword ptr [RBP + -0x238],RDX
LEA RDI,[0x49a194]
LEA RSI,[0x12f330]
CALL 0x00125280
MOV RDI,qword ptr [RBP + -0x230]
MOV RSI,qword ptr [RBP + -0x238]
CALL 0x0012f280
MOV dword ptr [RBP + -0x23c],EAX
MOV RDI,qword ptr [RBP + -0x228]
CALL 0x0012e950
CMP dword ptr [RBP + -0x23c],0x0
JZ 0x0012fc90
MOV RDI,qword ptr [RBP + -0x228]
MOV ESI,dword ptr [RBP + -0x23c]
MOV RDX,qword ptr [RBP + -0x238]
CALL 0x0012f980
MOV qword ptr [RBP + -0x250],RAX
JMP 0x0012fc9b
LAB_0012fc90:
XOR EAX,EAX
MOV qword ptr [RBP + -0x250],RAX
JMP 0x0012fc9b
LAB_0012fc9b:
MOV RAX,qword ptr [RBP + -0x250]
MOV qword ptr [RBP + -0x248],RAX
CMP qword ptr [RBP + -0x248],0x0
JNZ 0x0012fcfe
MOV RAX,qword ptr [RBP + -0x238]
AND RAX,0x10
CMP RAX,0x0
JZ 0x0012fcfe
LEA RDI,[RBP + -0x220]
CALL 0x0012eff0
MOV RDI,RAX
LEA RSI,[0x183267]
CALL 0x001252d0
MOV RDX,qword ptr [RBP + -0x230]
LEA RCX,[RBP + -0x220]
MOV EDI,0x1c
MOV ESI,0x4
MOV AL,0x0
CALL 0x00137670
LAB_0012fcfe:
MOV RAX,qword ptr [RBP + -0x248]
MOV qword ptr [RBP + -0x258],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0012fd2e
MOV RAX,qword ptr [RBP + -0x258]
ADD RSP,0x260
POP RBP
RET
LAB_0012fd2e:
CALL 0x00125330
|
long my_collation_get_by_name(int8 param_1,int8 param_2,ulong param_3)
{
int iVar1;
char *__dest;
long in_FS_OFFSET;
long local_258;
int1 local_228 [536];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
pthread_once(&charsets_initialized,init_available_charsets);
iVar1 = get_collation_number(param_2,param_3);
my_charset_loader_init_mysys(param_1);
if (iVar1 == 0) {
local_258 = 0;
}
else {
local_258 = get_internal_charset(param_1,iVar1,param_3);
}
if ((local_258 == 0) && ((param_3 & 0x10) != 0)) {
__dest = (char *)get_charsets_dir(local_228);
stpcpy(__dest,"Index.xml");
my_error(0x1c,4,param_2,local_228);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_258;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
27,383 | mi_ft_update | eloqsql/storage/myisam/ft_update.c | int _mi_ft_update(MI_INFO *info, uint keynr, uchar *keybuf,
const uchar *oldrec, const uchar *newrec, my_off_t pos)
{
int error= -1;
FT_WORD *oldlist,*newlist, *old_word, *new_word;
CHARSET_INFO *cs=info->s->keyinfo[keynr].seg->charset;
uint key_length;
int cmp, cmp2;
DBUG_ENTER("_mi_ft_update");
if (!(old_word=oldlist=_mi_ft_parserecord(info, keynr, oldrec,
&info->ft_memroot)) ||
!(new_word=newlist=_mi_ft_parserecord(info, keynr, newrec,
&info->ft_memroot)))
goto err;
error=0;
while(old_word->pos && new_word->pos)
{
cmp= ha_compare_text(cs, (uchar*) old_word->pos,old_word->len,
(uchar*) new_word->pos,new_word->len,0);
cmp2= cmp ? 0 : (fabs(old_word->weight - new_word->weight) > 1.e-5);
if (cmp < 0 || cmp2)
{
key_length=_ft_make_key(info,keynr,keybuf,old_word,pos);
if ((error=_mi_ck_delete(info,keynr,(uchar*) keybuf,key_length)))
goto err;
}
if (cmp > 0 || cmp2)
{
key_length=_ft_make_key(info,keynr,keybuf,new_word,pos);
if ((error=_mi_ck_write(info,keynr,(uchar*) keybuf,key_length)))
goto err;
}
if (cmp<=0) old_word++;
if (cmp>=0) new_word++;
}
if (old_word->pos)
error=_mi_ft_erase(info,keynr,keybuf,old_word,pos);
else if (new_word->pos)
error=_mi_ft_store(info,keynr,keybuf,new_word,pos);
err:
free_root(&info->ft_memroot, MYF(MY_MARK_BLOCKS_FREE));
DBUG_RETURN(error);
} | O0 | c | mi_ft_update:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movl $0xffffffff, -0x34(%rbp) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x218(%rax), %rax
movl -0xc(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movq 0x28(%rax), %rax
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x20(%rbp), %rdx
movq -0x8(%rbp), %rcx
addq $0x90, %rcx
callq 0xa2440
movq %rax, -0x40(%rbp)
movq %rax, -0x50(%rbp)
cmpq $0x0, %rax
je 0xa269e
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x28(%rbp), %rdx
movq -0x8(%rbp), %rcx
addq $0x90, %rcx
callq 0xa2440
movq %rax, -0x48(%rbp)
movq %rax, -0x58(%rbp)
cmpq $0x0, %rax
jne 0xa26a3
jmp 0xa284f
movl $0x0, -0x34(%rbp)
movq -0x50(%rbp), %rcx
xorl %eax, %eax
cmpq $0x0, (%rcx)
movb %al, -0x6d(%rbp)
je 0xa26c7
movq -0x58(%rbp), %rax
cmpq $0x0, (%rax)
setne %al
movb %al, -0x6d(%rbp)
movb -0x6d(%rbp), %al
testb $0x1, %al
jne 0xa26d3
jmp 0xa27ff
movq -0x60(%rbp), %rdi
movq -0x50(%rbp), %rax
movq (%rax), %rsi
movq -0x50(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x58(%rbp), %rax
movq (%rax), %rcx
movq -0x58(%rbp), %rax
movq 0x10(%rax), %r8
xorl %r9d, %r9d
callq 0xefa80
movl %eax, -0x68(%rbp)
cmpl $0x0, -0x68(%rbp)
je 0xa270d
xorl %eax, %eax
movl %eax, -0x74(%rbp)
jmp 0xa2741
movq -0x50(%rbp), %rax
movsd 0x8(%rax), %xmm0
movq -0x58(%rbp), %rax
subsd 0x8(%rax), %xmm0
movaps 0xada1a(%rip), %xmm1 # 0x150140
pand %xmm1, %xmm0
movsd 0xad906(%rip), %xmm1 # 0x150038
ucomisd %xmm1, %xmm0
seta %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x74(%rbp)
movl -0x74(%rbp), %eax
movl %eax, -0x6c(%rbp)
cmpl $0x0, -0x68(%rbp)
jl 0xa2753
cmpl $0x0, -0x6c(%rbp)
je 0xa2790
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movq -0x50(%rbp), %rcx
movq -0x30(%rbp), %r8
callq 0xa2880
movl %eax, -0x64(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movl -0x64(%rbp), %ecx
callq 0xa34c0
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
je 0xa278e
jmp 0xa284f
jmp 0xa2790
cmpl $0x0, -0x68(%rbp)
jg 0xa279c
cmpl $0x0, -0x6c(%rbp)
je 0xa27d6
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movq -0x58(%rbp), %rcx
movq -0x30(%rbp), %r8
callq 0xa2880
movl %eax, -0x64(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movl -0x64(%rbp), %ecx
callq 0xc5240
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
je 0xa27d4
jmp 0xa284f
jmp 0xa27d6
cmpl $0x0, -0x68(%rbp)
jg 0xa27e8
movq -0x50(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x50(%rbp)
cmpl $0x0, -0x68(%rbp)
jl 0xa27fa
movq -0x58(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x58(%rbp)
jmp 0xa26aa
movq -0x50(%rbp), %rax
cmpq $0x0, (%rax)
je 0xa2826
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movq -0x50(%rbp), %rcx
movq -0x30(%rbp), %r8
callq 0xa29d0
movl %eax, -0x34(%rbp)
jmp 0xa284d
movq -0x58(%rbp), %rax
cmpq $0x0, (%rax)
je 0xa284b
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movq -0x58(%rbp), %rcx
movq -0x30(%rbp), %r8
callq 0xa2a60
movl %eax, -0x34(%rbp)
jmp 0xa284d
jmp 0xa284f
movq -0x8(%rbp), %rdi
addq $0x90, %rdi
movl $0x2, %esi
callq 0xecfe0
movl -0x34(%rbp), %eax
movl %eax, -0x78(%rbp)
movl -0x78(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _mi_ft_update:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov [rbp+var_34], 0FFFFFFFFh
mov rax, [rbp+var_8]
mov rax, [rax]
mov rax, [rax+218h]
mov ecx, [rbp+var_C]
imul rcx, 70h ; 'p'
add rax, rcx
mov rax, [rax+28h]
mov rax, [rax]
mov [rbp+var_60], rax
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_8]
add rcx, 90h
call _mi_ft_parserecord
mov [rbp+var_40], rax
mov [rbp+var_50], rax
cmp rax, 0
jz short loc_A269E
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_8]
add rcx, 90h
call _mi_ft_parserecord
mov [rbp+var_48], rax
mov [rbp+var_58], rax
cmp rax, 0
jnz short loc_A26A3
loc_A269E:
jmp loc_A284F
loc_A26A3:
mov [rbp+var_34], 0
loc_A26AA:
mov rcx, [rbp+var_50]
xor eax, eax
cmp qword ptr [rcx], 0
mov [rbp+var_6D], al
jz short loc_A26C7
mov rax, [rbp+var_58]
cmp qword ptr [rax], 0
setnz al
mov [rbp+var_6D], al
loc_A26C7:
mov al, [rbp+var_6D]
test al, 1
jnz short loc_A26D3
jmp loc_A27FF
loc_A26D3:
mov rdi, [rbp+var_60]
mov rax, [rbp+var_50]
mov rsi, [rax]
mov rax, [rbp+var_50]
mov rdx, [rax+10h]
mov rax, [rbp+var_58]
mov rcx, [rax]
mov rax, [rbp+var_58]
mov r8, [rax+10h]
xor r9d, r9d
call ha_compare_text
mov [rbp+var_68], eax
cmp [rbp+var_68], 0
jz short loc_A270D
xor eax, eax
mov [rbp+var_74], eax
jmp short loc_A2741
loc_A270D:
mov rax, [rbp+var_50]
movsd xmm0, qword ptr [rax+8]
mov rax, [rbp+var_58]
subsd xmm0, qword ptr [rax+8]
movaps xmm1, cs:xmmword_150140
pand xmm0, xmm1
movsd xmm1, cs:qword_150038
ucomisd xmm0, xmm1
setnbe al
and al, 1
movzx eax, al
mov [rbp+var_74], eax
loc_A2741:
mov eax, [rbp+var_74]
mov [rbp+var_6C], eax
cmp [rbp+var_68], 0
jl short loc_A2753
cmp [rbp+var_6C], 0
jz short loc_A2790
loc_A2753:
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_50]
mov r8, [rbp+var_30]
call _ft_make_key
mov [rbp+var_64], eax
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
mov rdx, [rbp+var_18]
mov ecx, [rbp+var_64]
call _mi_ck_delete
mov [rbp+var_34], eax
cmp eax, 0
jz short loc_A278E
jmp loc_A284F
loc_A278E:
jmp short $+2
loc_A2790:
cmp [rbp+var_68], 0
jg short loc_A279C
cmp [rbp+var_6C], 0
jz short loc_A27D6
loc_A279C:
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_58]
mov r8, [rbp+var_30]
call _ft_make_key
mov [rbp+var_64], eax
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
mov rdx, [rbp+var_18]
mov ecx, [rbp+var_64]
call _mi_ck_write
mov [rbp+var_34], eax
cmp eax, 0
jz short loc_A27D4
jmp short loc_A284F
loc_A27D4:
jmp short $+2
loc_A27D6:
cmp [rbp+var_68], 0
jg short loc_A27E8
mov rax, [rbp+var_50]
add rax, 18h
mov [rbp+var_50], rax
loc_A27E8:
cmp [rbp+var_68], 0
jl short loc_A27FA
mov rax, [rbp+var_58]
add rax, 18h
mov [rbp+var_58], rax
loc_A27FA:
jmp loc_A26AA
loc_A27FF:
mov rax, [rbp+var_50]
cmp qword ptr [rax], 0
jz short loc_A2826
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_50]
mov r8, [rbp+var_30]
call _mi_ft_erase
mov [rbp+var_34], eax
jmp short loc_A284D
loc_A2826:
mov rax, [rbp+var_58]
cmp qword ptr [rax], 0
jz short loc_A284B
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_58]
mov r8, [rbp+var_30]
call _mi_ft_store
mov [rbp+var_34], eax
loc_A284B:
jmp short $+2
loc_A284D:
jmp short $+2
loc_A284F:
mov rdi, [rbp+var_8]
add rdi, 90h
mov esi, 2
call free_root
mov eax, [rbp+var_34]
mov [rbp+var_78], eax
mov eax, [rbp+var_78]
add rsp, 80h
pop rbp
retn
| long long mi_ft_update(_QWORD *a1, unsigned int a2, long long a3, long long a4, long long a5, long long a6)
{
__m128i v6; // xmm0
BOOL v8; // [rsp+Ch] [rbp-74h]
bool v9; // [rsp+13h] [rbp-6Dh]
int v10; // [rsp+18h] [rbp-68h]
unsigned int key; // [rsp+1Ch] [rbp-64h]
unsigned int v12; // [rsp+1Ch] [rbp-64h]
long long v13; // [rsp+20h] [rbp-60h]
long long v14; // [rsp+28h] [rbp-58h]
_QWORD *v15; // [rsp+30h] [rbp-50h]
unsigned int v16; // [rsp+4Ch] [rbp-34h]
v16 = -1;
v13 = **(_QWORD **)(112LL * a2 + *(_QWORD *)(*a1 + 536LL) + 40);
v15 = (_QWORD *)mi_ft_parserecord(a1, a2, a4, (long long)(a1 + 18));
if ( v15 )
{
v14 = mi_ft_parserecord(a1, a2, a5, (long long)(a1 + 18));
if ( v14 )
{
v16 = 0;
while ( 1 )
{
v9 = 0;
if ( *v15 )
v9 = *(_QWORD *)v14 != 0LL;
if ( !v9 )
break;
v10 = ha_compare_text(v13, *v15, v15[2], *(_QWORD *)v14, *(_QWORD *)(v14 + 16), 0LL);
if ( v10 )
{
v8 = 0;
}
else
{
v6 = (__m128i)(unsigned long long)v15[1];
*(double *)v6.m128i_i64 = *(double *)v6.m128i_i64 - *(double *)(v14 + 8);
v8 = *(double *)_mm_and_si128(v6, (__m128i)xmmword_150140).m128i_i64 > 0.00001;
}
if ( v10 < 0 || v8 )
{
key = ft_make_key(a1, a2, a3, v15, a6);
v16 = mi_ck_delete(a1, a2, a3, key);
if ( v16 )
goto LABEL_26;
}
if ( v10 > 0 || v8 )
{
v12 = ft_make_key(a1, a2, a3, v14, a6);
v16 = mi_ck_write(a1, a2, a3, v12);
if ( v16 )
goto LABEL_26;
}
if ( v10 <= 0 )
v15 += 3;
if ( v10 >= 0 )
v14 += 24LL;
}
if ( *v15 )
{
v16 = mi_ft_erase(a1, a2, a3, v15, a6);
}
else if ( *(_QWORD *)v14 )
{
v16 = mi_ft_store(a1, a2, a3, v14, a6);
}
}
}
LABEL_26:
free_root(a1 + 18, 2LL);
return v16;
}
| _mi_ft_update:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV dword ptr [RBP + -0x34],0xffffffff
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x218]
MOV ECX,dword ptr [RBP + -0xc]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOV RAX,qword ptr [RAX + 0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x60],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x8]
ADD RCX,0x90
CALL 0x001a2440
MOV qword ptr [RBP + -0x40],RAX
MOV qword ptr [RBP + -0x50],RAX
CMP RAX,0x0
JZ 0x001a269e
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x8]
ADD RCX,0x90
CALL 0x001a2440
MOV qword ptr [RBP + -0x48],RAX
MOV qword ptr [RBP + -0x58],RAX
CMP RAX,0x0
JNZ 0x001a26a3
LAB_001a269e:
JMP 0x001a284f
LAB_001a26a3:
MOV dword ptr [RBP + -0x34],0x0
LAB_001a26aa:
MOV RCX,qword ptr [RBP + -0x50]
XOR EAX,EAX
CMP qword ptr [RCX],0x0
MOV byte ptr [RBP + -0x6d],AL
JZ 0x001a26c7
MOV RAX,qword ptr [RBP + -0x58]
CMP qword ptr [RAX],0x0
SETNZ AL
MOV byte ptr [RBP + -0x6d],AL
LAB_001a26c7:
MOV AL,byte ptr [RBP + -0x6d]
TEST AL,0x1
JNZ 0x001a26d3
JMP 0x001a27ff
LAB_001a26d3:
MOV RDI,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x50]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x58]
MOV R8,qword ptr [RAX + 0x10]
XOR R9D,R9D
CALL 0x001efa80
MOV dword ptr [RBP + -0x68],EAX
CMP dword ptr [RBP + -0x68],0x0
JZ 0x001a270d
XOR EAX,EAX
MOV dword ptr [RBP + -0x74],EAX
JMP 0x001a2741
LAB_001a270d:
MOV RAX,qword ptr [RBP + -0x50]
MOVSD XMM0,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x58]
SUBSD XMM0,qword ptr [RAX + 0x8]
MOVAPS XMM1,xmmword ptr [0x00250140]
PAND XMM0,XMM1
MOVSD XMM1,qword ptr [0x00250038]
UCOMISD XMM0,XMM1
SETA AL
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x74],EAX
LAB_001a2741:
MOV EAX,dword ptr [RBP + -0x74]
MOV dword ptr [RBP + -0x6c],EAX
CMP dword ptr [RBP + -0x68],0x0
JL 0x001a2753
CMP dword ptr [RBP + -0x6c],0x0
JZ 0x001a2790
LAB_001a2753:
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x50]
MOV R8,qword ptr [RBP + -0x30]
CALL 0x001a2880
MOV dword ptr [RBP + -0x64],EAX
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV RDX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x64]
CALL 0x001a34c0
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
JZ 0x001a278e
JMP 0x001a284f
LAB_001a278e:
JMP 0x001a2790
LAB_001a2790:
CMP dword ptr [RBP + -0x68],0x0
JG 0x001a279c
CMP dword ptr [RBP + -0x6c],0x0
JZ 0x001a27d6
LAB_001a279c:
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x58]
MOV R8,qword ptr [RBP + -0x30]
CALL 0x001a2880
MOV dword ptr [RBP + -0x64],EAX
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV RDX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x64]
CALL 0x001c5240
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
JZ 0x001a27d4
JMP 0x001a284f
LAB_001a27d4:
JMP 0x001a27d6
LAB_001a27d6:
CMP dword ptr [RBP + -0x68],0x0
JG 0x001a27e8
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x18
MOV qword ptr [RBP + -0x50],RAX
LAB_001a27e8:
CMP dword ptr [RBP + -0x68],0x0
JL 0x001a27fa
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x18
MOV qword ptr [RBP + -0x58],RAX
LAB_001a27fa:
JMP 0x001a26aa
LAB_001a27ff:
MOV RAX,qword ptr [RBP + -0x50]
CMP qword ptr [RAX],0x0
JZ 0x001a2826
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x50]
MOV R8,qword ptr [RBP + -0x30]
CALL 0x001a29d0
MOV dword ptr [RBP + -0x34],EAX
JMP 0x001a284d
LAB_001a2826:
MOV RAX,qword ptr [RBP + -0x58]
CMP qword ptr [RAX],0x0
JZ 0x001a284b
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x58]
MOV R8,qword ptr [RBP + -0x30]
CALL 0x001a2a60
MOV dword ptr [RBP + -0x34],EAX
LAB_001a284b:
JMP 0x001a284d
LAB_001a284d:
JMP 0x001a284f
LAB_001a284f:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x90
MOV ESI,0x2
CALL 0x001ecfe0
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x78],EAX
MOV EAX,dword ptr [RBP + -0x78]
ADD RSP,0x80
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int _mi_ft_update(long *param_1,uint param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6)
{
int8 uVar1;
int iVar2;
int4 uVar3;
bool bVar4;
long *local_60;
long *local_58;
int local_3c;
local_3c = -1;
uVar1 = **(int8 **)(*(long *)(*param_1 + 0x218) + (ulong)param_2 * 0x70 + 0x28);
local_58 = (long *)_mi_ft_parserecord(param_1,param_2,param_4,param_1 + 0x12);
if ((local_58 != (long *)0x0) &&
(local_60 = (long *)_mi_ft_parserecord(param_1,param_2,param_5,param_1 + 0x12),
local_60 != (long *)0x0)) {
local_3c = 0;
while( true ) {
bVar4 = false;
if (*local_58 != 0) {
bVar4 = *local_60 != 0;
}
if (!bVar4) break;
iVar2 = ha_compare_text(uVar1,*local_58,local_58[2],*local_60,local_60[2],0);
if (iVar2 == 0) {
bVar4 = DAT_00250038 <
(double)((ulong)((double)local_58[1] - (double)local_60[1]) & _DAT_00250140);
}
else {
bVar4 = false;
}
if ((iVar2 < 0) || (bVar4)) {
uVar3 = _ft_make_key(param_1,param_2,param_3,local_58,param_6);
local_3c = _mi_ck_delete(param_1,param_2,param_3,uVar3);
if (local_3c != 0) goto LAB_001a284f;
}
if ((0 < iVar2) || (bVar4)) {
uVar3 = _ft_make_key(param_1,param_2,param_3,local_60,param_6);
local_3c = _mi_ck_write(param_1,param_2,param_3,uVar3);
if (local_3c != 0) goto LAB_001a284f;
}
if (iVar2 < 1) {
local_58 = local_58 + 3;
}
if (-1 < iVar2) {
local_60 = local_60 + 3;
}
}
if (*local_58 == 0) {
if (*local_60 != 0) {
local_3c = _mi_ft_store(param_1,param_2,param_3,local_60,param_6);
}
}
else {
local_3c = _mi_ft_erase(param_1,param_2,param_3,local_58,param_6);
}
}
LAB_001a284f:
free_root(param_1 + 0x12,2);
return local_3c;
}
| |
27,384 | auto save_knot_trajectory_json<float, Eigen::Matrix<float, 3, 1, 0, 3, 1>>(std::vector<PolyLine<float>, std::allocator<PolyLine<float>>> const&, std::filesystem::__cxx11::path const&) | zkingston[P]unknot/src/util.hh | auto save_knot_trajectory_json(
const std::vector<PolyLine<RealT>> &knots,
const std::filesystem::path &filepath)
{
nlohmann::json j;
for (const auto &knot : knots)
{
auto jk = get_knot_json(knot);
j.emplace_back(jk);
}
std::ofstream file(filepath);
file << j.dump();
} | O0 | cpp | auto save_knot_trajectory_json<float, Eigen::Matrix<float, 3, 1, 0, 3, 1>>(std::vector<PolyLine<float>, std::allocator<PolyLine<float>>> const&, std::filesystem::__cxx11::path const&):
subq $0x288, %rsp # imm = 0x288
movq %rdi, 0x280(%rsp)
movq %rsi, 0x278(%rsp)
leaq 0x268(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x5edb0
movq 0x280(%rsp), %rax
movq %rax, 0x260(%rsp)
movq 0x260(%rsp), %rdi
callq 0x5edf0
movq %rax, 0x258(%rsp)
movq 0x260(%rsp), %rdi
callq 0x5ee20
movq %rax, 0x250(%rsp)
leaq 0x258(%rsp), %rdi
leaq 0x250(%rsp), %rsi
callq 0x5ee50
testb $0x1, %al
jne 0x19ff0
jmp 0x1a08e
leaq 0x258(%rsp), %rdi
callq 0x5ee90
movq %rax, 0x248(%rsp)
movq 0x248(%rsp), %rsi
leaq 0x238(%rsp), %rdi
callq 0x5eea0
jmp 0x1a01c
leaq 0x268(%rsp), %rdi
leaq 0x238(%rsp), %rsi
callq 0x5eff0
jmp 0x1a033
leaq 0x238(%rsp), %rdi
callq 0x5f190
leaq 0x258(%rsp), %rdi
callq 0x5f1c0
jmp 0x19fd2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x230(%rsp)
movl %eax, 0x22c(%rsp)
jmp 0x1a143
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x230(%rsp)
movl %eax, 0x22c(%rsp)
leaq 0x238(%rsp), %rdi
callq 0x5f190
jmp 0x1a143
movq 0x278(%rsp), %rsi
leaq 0x28(%rsp), %rdi
movl $0x10, %edx
callq 0x5f1e0
jmp 0x1a0a7
leaq 0x8(%rsp), %rdi
leaq 0x268(%rsp), %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
movl $0x20, %ecx
xorl %r9d, %r9d
movl %r9d, %r8d
callq 0x5f220
jmp 0x1a0cb
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x12ae0
jmp 0x1a0dc
leaq 0x8(%rsp), %rdi
callq 0x13768
leaq 0x28(%rsp), %rdi
callq 0x131a0
leaq 0x268(%rsp), %rdi
callq 0x5f190
addq $0x288, %rsp # imm = 0x288
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x230(%rsp)
movl %eax, 0x22c(%rsp)
jmp 0x1a139
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x230(%rsp)
movl %eax, 0x22c(%rsp)
leaq 0x8(%rsp), %rdi
callq 0x13768
leaq 0x28(%rsp), %rdi
callq 0x131a0
leaq 0x268(%rsp), %rdi
callq 0x5f190
movq 0x230(%rsp), %rdi
callq 0x13540
nopl (%rax)
| _Z25save_knot_trajectory_jsonIfN5Eigen6MatrixIfLi3ELi1ELi0ELi3ELi1EEEEDaRKSt6vectorI8PolyLineIT_ESaIS6_EERKNSt10filesystem7__cxx114pathE:
sub rsp, 288h
mov [rsp+288h+var_8], rdi
mov [rsp+288h+var_10], rsi
lea rdi, [rsp+288h+var_20]
xor eax, eax
mov esi, eax
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EDn; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(decltype(nullptr))
mov rax, [rsp+288h+var_8]
mov [rsp+288h+var_28], rax
mov rdi, [rsp+288h+var_28]
call _ZNKSt6vectorI8PolyLineIfESaIS1_EE5beginEv; std::vector<PolyLine<float>>::begin(void)
mov [rsp+288h+var_30], rax
mov rdi, [rsp+288h+var_28]
call _ZNKSt6vectorI8PolyLineIfESaIS1_EE3endEv; std::vector<PolyLine<float>>::end(void)
mov [rsp+288h+var_38], rax
loc_19FD2:
lea rdi, [rsp+288h+var_30]
lea rsi, [rsp+288h+var_38]
call _ZN9__gnu_cxxneIPK8PolyLineIfESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_; __gnu_cxx::operator!=<PolyLine<float> const*,std::vector<PolyLine<float>>>(__gnu_cxx::__normal_iterator<PolyLine<float> const*,std::vector<PolyLine<float>>> const&,__gnu_cxx::__normal_iterator<PolyLine<float> const*,std::vector<PolyLine<float>>> const&)
test al, 1
jnz short loc_19FF0
jmp loc_1A08E
loc_19FF0:
lea rdi, [rsp+288h+var_30]
call _ZNK9__gnu_cxx17__normal_iteratorIPK8PolyLineIfESt6vectorIS2_SaIS2_EEEdeEv; __gnu_cxx::__normal_iterator<PolyLine<float> const*,std::vector<PolyLine<float>>>::operator*(void)
mov [rsp+288h+var_40], rax
mov rsi, [rsp+288h+var_40]
lea rdi, [rsp+288h+var_50]
call _Z13get_knot_jsonIfN5Eigen6MatrixIfLi3ELi1ELi0ELi3ELi1EEEEN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS4_14adl_serializerES7_IhSaIhEEvEERK8PolyLineIT_E; get_knot_json<float,Eigen::Matrix<float,3,1,0,3,1>>(PolyLine<float> const&)
jmp short $+2
loc_1A01C:
lea rdi, [rsp+288h+var_20]; char
lea rsi, [rsp+288h+var_50]; int
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE12emplace_backIJRSD_EEESF_DpOT_; nlohmann::json_abi_v3_11_3::basic_json<std::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<std::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<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)
jmp short $+2
loc_1A033:
lea rdi, [rsp+288h+var_50]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
lea rdi, [rsp+288h+var_30]
call _ZN9__gnu_cxx17__normal_iteratorIPK8PolyLineIfESt6vectorIS2_SaIS2_EEEppEv; __gnu_cxx::__normal_iterator<PolyLine<float> const*,std::vector<PolyLine<float>>>::operator++(void)
jmp short loc_19FD2
mov rcx, rax
mov eax, edx
mov [rsp+arg_228], rcx
mov [rsp+arg_224], eax
jmp loc_1A143
mov rcx, rax
mov eax, edx
mov [rsp+arg_228], rcx
mov [rsp+arg_224], eax
lea rdi, [rsp+arg_230]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
jmp loc_1A143
loc_1A08E:
mov rsi, [rsp+288h+var_10]
lea rdi, [rsp+288h+var_260]
mov edx, 10h
call _ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1INSt10filesystem7__cxx114pathES6_EERKT_St13_Ios_Openmode; std::ofstream::basic_ofstream<std::filesystem::__cxx11::path,std::filesystem::__cxx11::path>(std::filesystem::__cxx11::path const&,std::_Ios_Openmode)
jmp short $+2
loc_1A0A7:
lea rdi, [rsp+288h+var_280]; int
lea rsi, [rsp+288h+var_20]; int
mov edx, 0FFFFFFFFh; int
mov ecx, 20h ; ' '; int
xor r9d, r9d; int
mov r8d, r9d; int
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dumpEicbNS0_6detail15error_handler_tE; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::dump(int,char,bool,nlohmann::json_abi_v3_11_3::detail::error_handler_t)
jmp short $+2
loc_1A0CB:
lea rdi, [rsp+288h+var_260]
lea rsi, [rsp+288h+var_280]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
jmp short $+2
loc_1A0DC:
lea rdi, [rsp+288h+var_280]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+288h+var_260]
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream()
lea rdi, [rsp+288h+var_20]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
add rsp, 288h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_228], rcx
mov [rsp+arg_224], eax
jmp short loc_1A139
mov rcx, rax
mov eax, edx
mov [rsp+arg_228], rcx
mov [rsp+arg_224], eax
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_1A139:
lea rdi, [rsp+arg_20]
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream()
loc_1A143:
lea rdi, [rsp+arg_260]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
mov rdi, [rsp+arg_228]
call __Unwind_Resume
| long long save_knot_trajectory_json<float,Eigen::Matrix<float,3,1,0,3,1>>(long long a1, long long a2)
{
long long v3; // [rsp+0h] [rbp-288h]
void *v4; // [rsp+0h] [rbp-288h]
int v5; // [rsp+8h] [rbp-280h] BYREF
void *v6; // [rsp+10h] [rbp-278h]
long long v7; // [rsp+18h] [rbp-270h]
long long v8; // [rsp+20h] [rbp-268h]
__int16 v9; // [rsp+28h] [rbp-260h] BYREF
long long v10; // [rsp+30h] [rbp-258h]
int v11; // [rsp+38h] [rbp-250h]
int v12; // [rsp+40h] [rbp-248h]
char v13; // [rsp+48h] [rbp-240h]
int v14[4]; // [rsp+238h] [rbp-50h] BYREF
long long v15; // [rsp+248h] [rbp-40h]
long long v16; // [rsp+250h] [rbp-38h] BYREF
long long v17; // [rsp+258h] [rbp-30h] BYREF
long long v18; // [rsp+260h] [rbp-28h]
char v19[4]; // [rsp+268h] [rbp-20h] BYREF
long long v20; // [rsp+278h] [rbp-10h]
long long v21; // [rsp+280h] [rbp-8h]
v21 = a1;
v20 = a2;
nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
v19,
0LL);
v18 = v21;
v17 = std::vector<PolyLine<float>>::begin(v21);
v16 = std::vector<PolyLine<float>>::end(v18);
while ( (__gnu_cxx::operator!=<PolyLine<float> const*,std::vector<PolyLine<float>>>(&v17, &v16) & 1) != 0 )
{
v15 = __gnu_cxx::__normal_iterator<PolyLine<float> const*,std::vector<PolyLine<float>>>::operator*(&v17);
get_knot_json<float,Eigen::Matrix<float,3,1,0,3,1>>((unsigned int)v14, v3, v5, (_DWORD)v6, v7, v8, v9);
nlohmann::json_abi_v3_11_3::basic_json<std::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<std::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>&>(
(char)v19,
(int)v14,
v4,
v5,
(int)v6,
v7,
v8,
v9,
v10,
v11,
v12);
nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json(v14);
__gnu_cxx::__normal_iterator<PolyLine<float> const*,std::vector<PolyLine<float>>>::operator++(&v17);
}
std::ofstream::basic_ofstream<std::filesystem::__cxx11::path,std::filesystem::__cxx11::path>(&v9, v20, 16LL);
nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::dump(
(int)&v5,
(int)v19,
-1,
32,
0,
0,
v3,
v5,
v6,
v7,
v8,
v9,
v10,
v11,
v12,
v13);
std::operator<<<char>(&v9, &v5);
std::string::~string(&v5);
std::ofstream::~ofstream(&v9);
return nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json(v19);
}
| save_knot_trajectory_json<float,Eigen::Matrix<float,3,1,0,3,1>>:
SUB RSP,0x288
MOV qword ptr [RSP + 0x280],RDI
MOV qword ptr [RSP + 0x278],RSI
LEA RDI,[RSP + 0x268]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0015edb0
MOV RAX,qword ptr [RSP + 0x280]
MOV qword ptr [RSP + 0x260],RAX
MOV RDI,qword ptr [RSP + 0x260]
CALL 0x0015edf0
MOV qword ptr [RSP + 0x258],RAX
MOV RDI,qword ptr [RSP + 0x260]
CALL 0x0015ee20
MOV qword ptr [RSP + 0x250],RAX
LAB_00119fd2:
LEA RDI,[RSP + 0x258]
LEA RSI,[RSP + 0x250]
CALL 0x0015ee50
TEST AL,0x1
JNZ 0x00119ff0
JMP 0x0011a08e
LAB_00119ff0:
LEA RDI,[RSP + 0x258]
CALL 0x0015ee90
MOV qword ptr [RSP + 0x248],RAX
MOV RSI,qword ptr [RSP + 0x248]
LAB_0011a00d:
LEA RDI,[RSP + 0x238]
CALL 0x0015eea0
JMP 0x0011a01c
LAB_0011a01c:
LEA RDI,[RSP + 0x268]
LEA RSI,[RSP + 0x238]
CALL 0x0015eff0
JMP 0x0011a033
LAB_0011a033:
LEA RDI,[RSP + 0x238]
CALL 0x0015f190
LEA RDI,[RSP + 0x258]
CALL 0x0015f1c0
JMP 0x00119fd2
LAB_0011a08e:
MOV RSI,qword ptr [RSP + 0x278]
LAB_0011a096:
LEA RDI,[RSP + 0x28]
MOV EDX,0x10
CALL 0x0015f1e0
JMP 0x0011a0a7
LAB_0011a0a7:
LEA RDI,[RSP + 0x8]
LEA RSI,[RSP + 0x268]
MOV EDX,0xffffffff
MOV ECX,0x20
XOR R9D,R9D
MOV R8D,R9D
CALL 0x0015f220
JMP 0x0011a0cb
LAB_0011a0cb:
LEA RDI,[RSP + 0x28]
LEA RSI,[RSP + 0x8]
CALL 0x00112ae0
LAB_0011a0da:
JMP 0x0011a0dc
LAB_0011a0dc:
LEA RDI,[RSP + 0x8]
CALL 0x00113768
LEA RDI,[RSP + 0x28]
CALL 0x001131a0
LEA RDI,[RSP + 0x268]
CALL 0x0015f190
ADD RSP,0x288
RET
|
/* auto save_knot_trajectory_json<float, Eigen::Matrix<float, 3, 1, 0, 3, 1>
>(std::vector<PolyLine<float>, std::allocator<PolyLine<float> > > const&,
std::filesystem::__cxx11::path const&) */
void save_knot_trajectory_json<float,Eigen::Matrix<float,3,1,0,3,1>>(vector *param_1,path *param_2)
{
bool bVar1;
string local_280 [32];
ofstream local_260 [528];
PolyLine local_50 [16];
int8 local_40;
int8 local_38;
int8 local_30;
vector<PolyLine<float>,std::allocator<PolyLine<float>>> *local_28;
basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_20 [16];
path *local_10;
vector<PolyLine<float>,std::allocator<PolyLine<float>>> *local_8;
local_10 = param_2;
local_8 = (vector<PolyLine<float>,std::allocator<PolyLine<float>>> *)param_1;
nlohmann::json_abi_v3_11_3::
basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json((_func_decltype_nullptr *)local_20);
local_28 = local_8;
local_30 = std::vector<PolyLine<float>,std::allocator<PolyLine<float>>>::begin(local_8);
local_38 = std::vector<PolyLine<float>,std::allocator<PolyLine<float>>>::end(local_28);
while( true ) {
bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_30,(__normal_iterator *)&local_38);
if (!bVar1) break;
local_40 = __gnu_cxx::
__normal_iterator<PolyLine<float>const*,std::vector<PolyLine<float>,std::allocator<PolyLine<float>>>>
::operator*((__normal_iterator<PolyLine<float>const*,std::vector<PolyLine<float>,std::allocator<PolyLine<float>>>>
*)&local_30);
/* try { // try from 0011a00d to 0011a019 has its CatchHandler @ 0011a04f */
get_knot_json<float,Eigen::Matrix<float,3,1,0,3,1>>(local_50);
/* try { // try from 0011a01c to 0011a030 has its CatchHandler @ 0011a068 */
nlohmann::json_abi_v3_11_3::
basic_json<std::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<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&>
(local_20,local_50);
nlohmann::json_abi_v3_11_3::
basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::~basic_json((basic_json<std::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_50);
__gnu_cxx::
__normal_iterator<PolyLine<float>const*,std::vector<PolyLine<float>,std::allocator<PolyLine<float>>>>
::operator++((__normal_iterator<PolyLine<float>const*,std::vector<PolyLine<float>,std::allocator<PolyLine<float>>>>
*)&local_30);
}
/* try { // try from 0011a096 to 0011a0a4 has its CatchHandler @ 0011a04f */
std::ofstream::ofstream<std::filesystem::__cxx11::path,std::filesystem::__cxx11::path>
(local_260,local_10,0x10);
/* try { // try from 0011a0a7 to 0011a0c8 has its CatchHandler @ 0011a105 */
nlohmann::json_abi_v3_11_3::
basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::dump(local_280,local_20,0xffffffff,0x20,0);
/* try { // try from 0011a0cb to 0011a0d9 has its CatchHandler @ 0011a11b */
std::operator<<((ostream *)local_260,local_280);
std::__cxx11::string::~string(local_280);
std::ofstream::~ofstream(local_260);
nlohmann::json_abi_v3_11_3::
basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::~basic_json(local_20);
return;
}
| |
27,385 | auto save_knot_trajectory_json<float, Eigen::Matrix<float, 3, 1, 0, 3, 1>>(std::vector<PolyLine<float>, std::allocator<PolyLine<float>>> const&, std::filesystem::__cxx11::path const&) | zkingston[P]unknot/src/util.hh | auto save_knot_trajectory_json(
const std::vector<PolyLine<RealT>> &knots,
const std::filesystem::path &filepath)
{
nlohmann::json j;
for (const auto &knot : knots)
{
auto jk = get_knot_json(knot);
j.emplace_back(jk);
}
std::ofstream file(filepath);
file << j.dump();
} | O1 | cpp | auto save_knot_trajectory_json<float, Eigen::Matrix<float, 3, 1, 0, 3, 1>>(std::vector<PolyLine<float>, std::allocator<PolyLine<float>>> const&, std::filesystem::__cxx11::path const&):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x230, %rsp # imm = 0x230
movq %rsi, %rbx
movb $0x0, (%rsp)
movq $0x0, 0x8(%rsp)
movq (%rdi), %r14
movq 0x8(%rdi), %r13
cmpq %r13, %r14
je 0x148f2
leaq 0x30(%rsp), %r15
movq %rsp, %r12
movq %r15, %rdi
movq %r14, %rsi
callq 0x2b078
movq %r12, %rdi
movq %r15, %rsi
callq 0x2b112
movq %r15, %rdi
callq 0x2c524
addq $0x18, %r14
cmpq %r13, %r14
jne 0x148cb
movq (%rbx), %rsi
leaq 0x30(%rsp), %rdi
movl $0x10, %edx
callq 0xfb00
leaq 0x10(%rsp), %rdi
movq %rsp, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
movl $0x20, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x2b20c
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
leaq 0x30(%rsp), %rdi
callq 0xfbb0
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14950
movq 0x20(%rsp), %rsi
incq %rsi
callq 0xfa70
movq 0x3205e9(%rip), %rax # 0x334f40
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x38(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x30(%rsp,%rcx)
callq 0xf870
leaq 0x128(%rsp), %rdi
callq 0xf310
movq %rsp, %rdi
callq 0x2c524
addq $0x230, %rsp # imm = 0x230
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x149be
movq 0x20(%rsp), %rsi
incq %rsi
callq 0xfa70
jmp 0x149be
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xfec0
jmp 0x149de
jmp 0x149cc
movq %rax, %rbx
jmp 0x149de
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2c524
movq %rsp, %rdi
callq 0x2c524
movq %rbx, %rdi
callq 0x101c0
| _Z25save_knot_trajectory_jsonIfN5Eigen6MatrixIfLi3ELi1ELi0ELi3ELi1EEEEDaRKSt6vectorI8PolyLineIT_ESaIS6_EERKNSt10filesystem7__cxx114pathE:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 230h
mov rbx, rsi
mov [rsp+258h+var_258], 0
mov [rsp+258h+var_250], 0
mov r14, [rdi]
mov r13, [rdi+8]
cmp r14, r13
jz short loc_148F2
lea r15, [rsp+258h+var_228]
mov r12, rsp
loc_148CB:
mov rdi, r15
mov rsi, r14
call _Z13get_knot_jsonIfN5Eigen6MatrixIfLi3ELi1ELi0ELi3ELi1EEEEN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS4_14adl_serializerES7_IhSaIhEEvEERK8PolyLineIT_E; get_knot_json<float,Eigen::Matrix<float,3,1,0,3,1>>(PolyLine<float> const&)
mov rdi, r12
mov rsi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE12emplace_backIJRSD_EEESF_DpOT_; nlohmann::json_abi_v3_11_3::basic_json<std::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<std::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<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
add r14, 18h
cmp r14, r13
jnz short loc_148CB
loc_148F2:
mov rsi, [rbx]
lea rdi, [rsp+258h+var_228]
mov edx, 10h
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode; std::ofstream::basic_ofstream(char const*,std::_Ios_Openmode)
lea rdi, [rsp+258h+var_248]
mov rsi, rsp
mov edx, 0FFFFFFFFh
mov ecx, 20h ; ' '
xor r8d, r8d
xor r9d, r9d
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dumpEicbNS0_6detail15error_handler_tE; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::dump(int,char,bool,nlohmann::json_abi_v3_11_3::detail::error_handler_t)
mov rsi, [rsp+258h+var_248]
mov rdx, [rsp+258h+var_240]
lea rdi, [rsp+258h+var_228]
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+258h+var_238]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_14950
mov rsi, [rsp+258h+var_238]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_14950:
mov rax, cs:_ZTTSt14basic_ofstreamIcSt11char_traitsIcEE_ptr
mov rcx, [rax]
mov rax, [rax+18h]
lea rdi, [rsp+258h+var_220]
mov [rdi-8], rcx
mov rcx, [rcx-18h]
mov [rsp+rcx+258h+var_228], rax
call __ZNSt13basic_filebufIcSt11char_traitsIcEED2Ev; std::filebuf::~filebuf()
lea rdi, [rsp+258h+var_130]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, rsp
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
add rsp, 230h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
mov rbx, rax
lea rax, [rsp+arg_18]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_149BE
mov rsi, [rsp+arg_18]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_149BE
mov rbx, rax
loc_149BE:
lea rdi, [rsp+arg_28]
call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream()
jmp short loc_149DE
jmp short $+2
loc_149CC:
mov rbx, rax
jmp short loc_149DE
mov rbx, rax
lea rdi, [rsp+arg_28]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<std::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_149DE:
mov rdi, rsp
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<std::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 save_knot_trajectory_json<float,Eigen::Matrix<float,3,1,0,3,1>>(long long *a1, _QWORD *a2)
{
long long v2; // r14
long long v3; // r13
long long v4; // rax
int v6; // [rsp+0h] [rbp-258h] BYREF
long long v7; // [rsp+8h] [rbp-250h]
long long *v8; // [rsp+10h] [rbp-248h] BYREF
long long v9; // [rsp+18h] [rbp-240h]
long long v10; // [rsp+20h] [rbp-238h] BYREF
long long v11; // [rsp+30h] [rbp-228h] BYREF
_BYTE v12[304]; // [rsp+128h] [rbp-130h] BYREF
LOBYTE(v6) = 0;
v7 = 0LL;
v2 = *a1;
v3 = a1[1];
if ( *a1 != v3 )
{
do
{
get_knot_json<float,Eigen::Matrix<float,3,1,0,3,1>>(&v11, v2);
nlohmann::json_abi_v3_11_3::basic_json<std::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<std::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>&>(
&v6,
&v11);
nlohmann::json_abi_v3_11_3::basic_json<std::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(&v11);
v2 += 24LL;
}
while ( v2 != v3 );
}
std::ofstream::basic_ofstream(&v11, *a2, 16LL);
nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::dump(
(unsigned int)&v8,
(unsigned int)&v6,
-1,
32,
0,
0,
v6,
v7,
(_DWORD)v8,
v9);
std::__ostream_insert<char,std::char_traits<char>>(&v11, v8, v9);
if ( v8 != &v10 )
operator delete(v8, v10 + 1);
v4 = `VTT for'std::ofstream[3];
v11 = `VTT for'std::ofstream[0];
*(_QWORD *)(v12 + *(_QWORD *)(`VTT for'std::ofstream[0] - 24LL) + 232) = v4;
std::filebuf::~filebuf();
std::ios_base::~ios_base((std::ios_base *)v12);
return nlohmann::json_abi_v3_11_3::basic_json<std::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(&v6);
}
| save_knot_trajectory_json<float,Eigen::Matrix<float,3,1,0,3,1>>:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x230
MOV RBX,RSI
MOV byte ptr [RSP],0x0
MOV qword ptr [RSP + 0x8],0x0
MOV R14,qword ptr [RDI]
MOV R13,qword ptr [RDI + 0x8]
CMP R14,R13
JZ 0x001148f2
LEA R15,[RSP + 0x30]
MOV R12,RSP
LAB_001148cb:
MOV RDI,R15
MOV RSI,R14
CALL 0x0012b078
LAB_001148d6:
MOV RDI,R12
MOV RSI,R15
CALL 0x0012b112
MOV RDI,R15
CALL 0x0012c524
ADD R14,0x18
CMP R14,R13
JNZ 0x001148cb
LAB_001148f2:
MOV RSI,qword ptr [RBX]
LAB_001148f5:
LEA RDI,[RSP + 0x30]
MOV EDX,0x10
CALL 0x0010fb00
LAB_00114904:
LEA RDI,[RSP + 0x10]
MOV RSI,RSP
MOV EDX,0xffffffff
MOV ECX,0x20
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0012b20c
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
LAB_0011492b:
LEA RDI,[RSP + 0x30]
CALL 0x0010fbb0
LAB_00114935:
LEA RAX,[RSP + 0x20]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00114950
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x0010fa70
LAB_00114950:
MOV RAX,qword ptr [0x00434f40]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x18]
LEA RDI,[RSP + 0x38]
MOV qword ptr [RDI + -0x8],RCX
MOV RCX,qword ptr [RCX + -0x18]
MOV qword ptr [RSP + RCX*0x1 + 0x30],RAX
CALL 0x0010f870
LEA RDI,[RSP + 0x128]
CALL 0x0010f310
MOV RDI,RSP
CALL 0x0012c524
ADD RSP,0x230
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* auto save_knot_trajectory_json<float, Eigen::Matrix<float, 3, 1, 0, 3, 1>
>(std::vector<PolyLine<float>, std::allocator<PolyLine<float> > > const&,
std::filesystem::__cxx11::path const&) */
void save_knot_trajectory_json<float,Eigen::Matrix<float,3,1,0,3,1>>(vector *param_1,path *param_2)
{
long lVar1;
long lVar2;
basic_json<std::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_258 [8];
int8 local_250;
long *local_248;
long local_240;
long local_238 [2];
long local_228;
filebuf local_220 [240];
ios_base local_130 [264];
local_258[0] = (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0;
local_250 = 0;
lVar2 = *(long *)param_1;
lVar1 = *(long *)(param_1 + 8);
if (lVar2 != lVar1) {
do {
/* try { // try from 001148cb to 001148d5 has its CatchHandler @ 001149cc */
get_knot_json<float,Eigen::Matrix<float,3,1,0,3,1>>((PolyLine *)&local_228);
/* try { // try from 001148d6 to 001148e0 has its CatchHandler @ 001149d1 */
nlohmann::json_abi_v3_11_3::
basic_json<std::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<std::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_258,(basic_json *)&local_228);
nlohmann::json_abi_v3_11_3::
basic_json<std::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_228);
lVar2 = lVar2 + 0x18;
} while (lVar2 != lVar1);
}
/* try { // try from 001148f5 to 00114903 has its CatchHandler @ 001149ca */
std::ofstream::ofstream((ofstream *)&local_228,*(int8 *)param_2,0x10);
/* try { // try from 00114904 to 00114920 has its CatchHandler @ 001149bb */
nlohmann::json_abi_v3_11_3::
basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::dump(&local_248,local_258,0xffffffff,0x20,0,0);
/* try { // try from 0011492b to 00114934 has its CatchHandler @ 0011499b */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)&local_228,(char *)local_248,local_240);
if (local_248 != local_238) {
operator_delete(local_248,local_238[0] + 1);
}
local_228 = *(long *)PTR_VTT_00434f40;
*(int8 *)(local_220 + *(long *)(local_228 + -0x18) + -8) =
*(int8 *)(PTR_VTT_00434f40 + 0x18);
std::filebuf::~filebuf(local_220);
std::ios_base::~ios_base(local_130);
nlohmann::json_abi_v3_11_3::
basic_json<std::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_258);
return;
}
| |
27,386 | CompVisVDenoiser::get_scalings(float) | 7CodeWizard[P]stablediffusion/denoiser.hpp | std::vector<float> get_scalings(float sigma) {
float c_skip = sigma_data * sigma_data / (sigma * sigma + sigma_data * sigma_data);
float c_out = -sigma * sigma_data / std::sqrt(sigma * sigma + sigma_data * sigma_data);
float c_in = 1.0f / std::sqrt(sigma * sigma + sigma_data * sigma_data);
return {c_skip, c_out, c_in};
} | O1 | cpp | CompVisVDenoiser::get_scalings(float):
pushq %r14
pushq %rbx
subq $0x58, %rsp
movaps %xmm0, %xmm3
movq %rsi, %r14
movq %rdi, %rbx
movaps 0x71849(%rip), %xmm0 # 0xbb0d0
xorps %xmm3, %xmm0
movss 0x18(%rsi), %xmm1
shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0]
movaps %xmm1, %xmm2
unpcklps %xmm0, %xmm2 # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
mulps %xmm1, %xmm2
mulss %xmm3, %xmm3
movaps %xmm3, %xmm4
addss %xmm2, %xmm4
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm4
jb 0x498b8
xorps %xmm0, %xmm0
sqrtss %xmm4, %xmm0
jmp 0x498e1
movaps %xmm4, %xmm0
movaps %xmm2, 0x10(%rsp)
movaps %xmm3, 0x30(%rsp)
movaps %xmm4, 0x20(%rsp)
callq 0xab40
movaps 0x20(%rsp), %xmm4
xorps %xmm1, %xmm1
movaps 0x30(%rsp), %xmm3
movaps 0x10(%rsp), %xmm2
unpcklps %xmm0, %xmm4 # xmm4 = xmm4[0],xmm0[0],xmm4[1],xmm0[1]
divps %xmm4, %xmm2
movss 0x18(%r14), %xmm0
mulss %xmm0, %xmm0
addss %xmm0, %xmm3
ucomiss %xmm1, %xmm3
jb 0x49903
xorps %xmm0, %xmm0
sqrtss %xmm3, %xmm0
jmp 0x49915
movaps %xmm3, %xmm0
movaps %xmm2, 0x10(%rsp)
callq 0xab40
movaps 0x10(%rsp), %xmm2
movss 0x716eb(%rip), %xmm1 # 0xbb008
divss %xmm0, %xmm1
leaq 0x48(%rsp), %rsi
movlps %xmm2, (%rsi)
movss %xmm1, 0x8(%rsi)
leaq 0xf(%rsp), %rcx
movl $0x3, %edx
movq %rbx, %rdi
callq 0x3b1b2
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r14
retq
nop
| _ZN16CompVisVDenoiser12get_scalingsEf:
push r14
push rbx
sub rsp, 58h
movaps xmm3, xmm0
mov r14, rsi
mov rbx, rdi
movaps xmm0, cs:xmmword_BB0D0
xorps xmm0, xmm3
movss xmm1, dword ptr [rsi+18h]
shufps xmm1, xmm1, 0
movaps xmm2, xmm1
unpcklps xmm2, xmm0
mulps xmm2, xmm1
mulss xmm3, xmm3
movaps xmm4, xmm3
addss xmm4, xmm2
xorps xmm1, xmm1
ucomiss xmm4, xmm1
jb short loc_498B8
xorps xmm0, xmm0
sqrtss xmm0, xmm4
jmp short loc_498E1
loc_498B8:
movaps xmm0, xmm4
movaps [rsp+68h+var_58], xmm2
movaps [rsp+68h+var_38], xmm3
movaps [rsp+68h+var_48], xmm4
call _sqrtf
movaps xmm4, [rsp+68h+var_48]
xorps xmm1, xmm1
movaps xmm3, [rsp+68h+var_38]
movaps xmm2, [rsp+68h+var_58]
loc_498E1:
unpcklps xmm4, xmm0
divps xmm2, xmm4
movss xmm0, dword ptr [r14+18h]
mulss xmm0, xmm0
addss xmm3, xmm0
ucomiss xmm3, xmm1
jb short loc_49903
xorps xmm0, xmm0
sqrtss xmm0, xmm3
jmp short loc_49915
loc_49903:
movaps xmm0, xmm3
movaps [rsp+68h+var_58], xmm2
call _sqrtf
movaps xmm2, [rsp+68h+var_58]
loc_49915:
movss xmm1, cs:dword_BB008
divss xmm1, xmm0
lea rsi, [rsp+68h+var_20]
movlps qword ptr [rsi], xmm2
movss dword ptr [rsi+8], xmm1
lea rcx, [rsp+68h+var_59]
mov edx, 3
mov rdi, rbx
call _ZNSt6vectorIfSaIfEEC2ESt16initializer_listIfERKS0_; std::vector<float>::vector(std::initializer_list<float>,std::allocator<float> const&)
mov rax, rbx
add rsp, 58h
pop rbx
pop r14
retn
| CompVisVDenoiser * CompVisVDenoiser::get_scalings(CompVisVDenoiser *this, __m128 a2, long long a3)
{
__m128 v3; // xmm1
__m128 v4; // xmm2
__m128 v5; // xmm3
__m128 v6; // xmm4
__m128 v7; // xmm2
float v8; // xmm3_4
double v9; // xmm0_8
__m128 v11; // [rsp+20h] [rbp-48h]
double v12; // [rsp+48h] [rbp-20h] BYREF
float v13; // [rsp+50h] [rbp-18h]
v5 = a2;
v3 = _mm_shuffle_ps((__m128)*(unsigned int *)(a3 + 24), (__m128)*(unsigned int *)(a3 + 24), 0);
v4 = _mm_mul_ps(_mm_unpacklo_ps(v3, _mm_xor_ps((__m128)xmmword_BB0D0, a2)), v3);
v5.m128_f32[0] = v5.m128_f32[0] * v5.m128_f32[0];
v6 = v5;
v6.m128_f32[0] = v5.m128_f32[0] + v4.m128_f32[0];
if ( (float)(v5.m128_f32[0] + v4.m128_f32[0]) < 0.0 )
{
v11 = v6;
*(double *)a2.m128_u64 = sqrtf(this);
v6 = v11;
}
else
{
a2 = 0LL;
a2.m128_f32[0] = fsqrt(v6.m128_f32[0]);
}
v7 = _mm_div_ps(v4, _mm_unpacklo_ps(v6, a2));
v8 = v5.m128_f32[0] + (float)(*(float *)(a3 + 24) * *(float *)(a3 + 24));
if ( v8 < 0.0 )
v9 = sqrtf(this);
else
*(float *)&v9 = fsqrt(v8);
_mm_storel_ps(&v12, v7);
v13 = 1.0 / *(float *)&v9;
std::vector<float>::vector((long long)this, (long long)&v12, 3LL);
return this;
}
| |||
27,387 | CompVisVDenoiser::get_scalings(float) | 7CodeWizard[P]stablediffusion/denoiser.hpp | std::vector<float> get_scalings(float sigma) {
float c_skip = sigma_data * sigma_data / (sigma * sigma + sigma_data * sigma_data);
float c_out = -sigma * sigma_data / std::sqrt(sigma * sigma + sigma_data * sigma_data);
float c_in = 1.0f / std::sqrt(sigma * sigma + sigma_data * sigma_data);
return {c_skip, c_out, c_in};
} | O2 | cpp | CompVisVDenoiser::get_scalings(float):
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movaps 0x6abd3(%rip), %xmm1 # 0x99880
xorps %xmm0, %xmm1
movss 0x18(%rsi), %xmm2
shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0]
movaps %xmm2, %xmm3
unpcklps %xmm1, %xmm3 # xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1]
mulps %xmm2, %xmm3
mulss %xmm0, %xmm0
addss %xmm3, %xmm0
sqrtss %xmm0, %xmm1
unpcklps %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
divps %xmm0, %xmm3
movss 0x6832c(%rip), %xmm0 # 0x97008
divss %xmm1, %xmm0
leaq 0x10(%rsp), %rsi
movlps %xmm3, (%rsi)
movss %xmm0, 0x8(%rsi)
pushq $0x3
popq %rdx
leaq 0xf(%rsp), %rcx
callq 0x2481a
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
retq
nop
| _ZN16CompVisVDenoiser12get_scalingsEf:
push rbx
sub rsp, 20h
mov rbx, rdi
movaps xmm1, cs:xmmword_99880
xorps xmm1, xmm0
movss xmm2, dword ptr [rsi+18h]
shufps xmm2, xmm2, 0
movaps xmm3, xmm2
unpcklps xmm3, xmm1
mulps xmm3, xmm2
mulss xmm0, xmm0
addss xmm0, xmm3
sqrtss xmm1, xmm0
unpcklps xmm0, xmm1
divps xmm3, xmm0
movss xmm0, cs:dword_97008
divss xmm0, xmm1
lea rsi, [rsp+28h+var_18]
movlps qword ptr [rsi], xmm3
movss dword ptr [rsi+8], xmm0
push 3
pop rdx
lea rcx, [rsp+28h+var_19]
call _ZNSt6vectorIfSaIfEEC2ESt16initializer_listIfERKS0_; std::vector<float>::vector(std::initializer_list<float>,std::allocator<float> const&)
mov rax, rbx
add rsp, 20h
pop rbx
retn
| CompVisVDenoiser * CompVisVDenoiser::get_scalings(CompVisVDenoiser *this, __m128 a2, long long a3)
{
__m128 v3; // xmm1
__m128 v4; // xmm2
__m128 v5; // xmm3
double v7; // [rsp+10h] [rbp-18h] BYREF
float v8; // [rsp+18h] [rbp-10h]
v3 = _mm_xor_ps((__m128)xmmword_99880, a2);
v4 = _mm_shuffle_ps((__m128)*(unsigned int *)(a3 + 24), (__m128)*(unsigned int *)(a3 + 24), 0);
v5 = _mm_mul_ps(_mm_unpacklo_ps(v4, v3), v4);
a2.m128_f32[0] = (float)(a2.m128_f32[0] * a2.m128_f32[0]) + v5.m128_f32[0];
v3.m128_f32[0] = fsqrt(a2.m128_f32[0]);
_mm_storel_ps(&v7, _mm_div_ps(v5, _mm_unpacklo_ps(a2, v3)));
v8 = 1.0 / v3.m128_f32[0];
std::vector<float>::vector((long long)this, (long long)&v7, 3LL);
return this;
}
| get_scalings:
PUSH RBX
SUB RSP,0x20
MOV RBX,RDI
MOVAPS XMM1,xmmword ptr [0x00199880]
XORPS XMM1,XMM0
MOVSS XMM2,dword ptr [RSI + 0x18]
SHUFPS XMM2,XMM2,0x0
MOVAPS XMM3,XMM2
UNPCKLPS XMM3,XMM1
MULPS XMM3,XMM2
MULSS XMM0,XMM0
ADDSS XMM0,XMM3
SQRTSS XMM1,XMM0
UNPCKLPS XMM0,XMM1
DIVPS XMM3,XMM0
MOVSS XMM0,dword ptr [0x00197008]
DIVSS XMM0,XMM1
LEA RSI,[RSP + 0x10]
MOVLPS qword ptr [RSI],XMM3
MOVSS dword ptr [RSI + 0x8],XMM0
PUSH 0x3
POP RDX
LEA RCX,[RSP + 0xf]
CALL 0x0012481a
MOV RAX,RBX
ADD RSP,0x20
POP RBX
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CompVisVDenoiser::get_scalings(float) */
void CompVisVDenoiser::get_scalings(float param_1)
{
long in_RSI;
vector<float,std::allocator<float>> *in_RDI;
float fVar1;
uint in_XMM0_Db;
int1 auVar2 [16];
int1 auVar3 [16];
int1 local_19;
int8 local_18;
float local_10;
fVar1 = *(float *)(in_RSI + 0x18);
auVar2._0_4_ = fVar1 * fVar1;
auVar2._4_4_ = (float)(_DAT_00199880 ^ (uint)param_1) * fVar1;
auVar2._8_4_ = fVar1 * fVar1;
auVar2._12_4_ = (float)(_UNK_00199884 ^ in_XMM0_Db) * fVar1;
fVar1 = param_1 * param_1 + auVar2._0_4_;
local_10 = SQRT(fVar1);
auVar3._4_4_ = local_10;
auVar3._0_4_ = fVar1;
auVar3._8_4_ = in_XMM0_Db;
auVar3._12_4_ = _UNK_00199884 ^ in_XMM0_Db;
auVar3 = divps(auVar2,auVar3);
local_10 = DAT_00197008 / local_10;
local_18 = auVar3._0_8_;
std::vector<float,std::allocator<float>>::vector(in_RDI,&local_18,3,&local_19);
return;
}
| |
27,388 | CompVisVDenoiser::get_scalings(float) | 7CodeWizard[P]stablediffusion/denoiser.hpp | std::vector<float> get_scalings(float sigma) {
float c_skip = sigma_data * sigma_data / (sigma * sigma + sigma_data * sigma_data);
float c_out = -sigma * sigma_data / std::sqrt(sigma * sigma + sigma_data * sigma_data);
float c_in = 1.0f / std::sqrt(sigma * sigma + sigma_data * sigma_data);
return {c_skip, c_out, c_in};
} | O3 | cpp | CompVisVDenoiser::get_scalings(float):
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movaps 0x712ff(%rip), %xmm1 # 0xba0d0
xorps %xmm0, %xmm1
movss 0x18(%rsi), %xmm2
shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0]
movaps %xmm2, %xmm3
unpcklps %xmm1, %xmm3 # xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1]
mulps %xmm2, %xmm3
mulss %xmm0, %xmm0
addss %xmm3, %xmm0
xorps %xmm1, %xmm1
sqrtss %xmm0, %xmm1
unpcklps %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
divps %xmm0, %xmm3
movss 0x71205(%rip), %xmm0 # 0xba008
divss %xmm1, %xmm0
leaq 0x10(%rsp), %rsi
movlps %xmm3, (%rsi)
movss %xmm0, 0x8(%rsi)
leaq 0xf(%rsp), %rcx
movl $0x3, %edx
callq 0x3a5a4
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
retq
| _ZN16CompVisVDenoiser12get_scalingsEf:
push rbx
sub rsp, 20h
mov rbx, rdi
movaps xmm1, cs:xmmword_BA0D0
xorps xmm1, xmm0
movss xmm2, dword ptr [rsi+18h]
shufps xmm2, xmm2, 0
movaps xmm3, xmm2
unpcklps xmm3, xmm1
mulps xmm3, xmm2
mulss xmm0, xmm0
addss xmm0, xmm3
xorps xmm1, xmm1
sqrtss xmm1, xmm0
unpcklps xmm0, xmm1
divps xmm3, xmm0
movss xmm0, cs:dword_BA008
divss xmm0, xmm1
lea rsi, [rsp+28h+var_18]
movlps qword ptr [rsi], xmm3
movss dword ptr [rsi+8], xmm0
lea rcx, [rsp+28h+var_19]
mov edx, 3
call _ZNSt6vectorIfSaIfEEC2ESt16initializer_listIfERKS0_; std::vector<float>::vector(std::initializer_list<float>,std::allocator<float> const&)
mov rax, rbx
add rsp, 20h
pop rbx
retn
| CompVisVDenoiser * CompVisVDenoiser::get_scalings(CompVisVDenoiser *this, __m128 a2, long long a3)
{
__m128 v3; // xmm2
__m128 v4; // xmm3
__m128 v5; // xmm1
double v7; // [rsp+10h] [rbp-18h] BYREF
float v8; // [rsp+18h] [rbp-10h]
v3 = _mm_shuffle_ps((__m128)*(unsigned int *)(a3 + 24), (__m128)*(unsigned int *)(a3 + 24), 0);
v4 = _mm_mul_ps(_mm_unpacklo_ps(v3, _mm_xor_ps((__m128)xmmword_BA0D0, a2)), v3);
a2.m128_f32[0] = (float)(a2.m128_f32[0] * a2.m128_f32[0]) + v4.m128_f32[0];
v5 = 0LL;
v5.m128_f32[0] = fsqrt(a2.m128_f32[0]);
_mm_storel_ps(&v7, _mm_div_ps(v4, _mm_unpacklo_ps(a2, v5)));
v8 = 1.0 / v5.m128_f32[0];
std::vector<float>::vector((long long)this, (long long)&v7, 3LL);
return this;
}
| |||
27,389 | LefDefParser::defwStartDefaultCap(int) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp | int
defwStartDefaultCap(int count)
{
defwObsoleteNum = DEFW_DEFAULTCAP_START;
defwFunc = DEFW_DEFAULTCAP_START; // Current function of writer
if (!defwFile)
return DEFW_UNINITIALIZED;
if (!defwDidInit)
return DEFW_BAD_ORDER;
if ((defwState >= DEFW_DEFAULTCAP_START) &&
(defwState <= DEFW_DEFAULTCAP_END))
return DEFW_BAD_ORDER;
if (defVersionNum >= 5.4)
return DEFW_OBSOLETE;
if (defwState == DEFW_ROW)
fprintf(defwFile, ";\n\n"); // add the ; and \n for the previous row.
fprintf(defwFile, "DEFAULTCAP %d\n", count);
defwLines++;
defwCounter = count;
defwState = DEFW_DEFAULTCAP_START;
return DEFW_OK;
} | O0 | cpp | LefDefParser::defwStartDefaultCap(int):
pushq %rax
movl %edi, (%rsp)
movl $0x13, 0x187aa(%rip) # 0x2b0b8
leaq 0x18853(%rip), %rax # 0x2b168
movl $0x13, (%rax)
leaq 0x18836(%rip), %rax # 0x2b158
cmpq $0x0, (%rax)
jne 0x12935
movl $0x1, 0x4(%rsp)
jmp 0x12a08
leaq 0x18838(%rip), %rax # 0x2b174
cmpl $0x0, (%rax)
jne 0x1294e
movl $0x2, 0x4(%rsp)
jmp 0x12a08
leaq 0x1880f(%rip), %rax # 0x2b164
cmpl $0x13, (%rax)
jl 0x12973
leaq 0x18803(%rip), %rax # 0x2b164
cmpl $0x15, (%rax)
jg 0x12973
movl $0x2, 0x4(%rsp)
jmp 0x12a08
movsd 0x18735(%rip), %xmm0 # 0x2b0b0
movsd 0x109ad(%rip), %xmm1 # 0x23330
ucomisd %xmm1, %xmm0
jb 0x12993
movl $0x6, 0x4(%rsp)
jmp 0x12a08
leaq 0x187ca(%rip), %rax # 0x2b164
cmpl $0x10, (%rax)
jne 0x129b7
leaq 0x187b2(%rip), %rax # 0x2b158
movq (%rax), %rdi
leaq 0x11745(%rip), %rsi # 0x240f5
movb $0x0, %al
callq 0x10f0
leaq 0x1879a(%rip), %rax # 0x2b158
movq (%rax), %rdi
movl (%rsp), %edx
leaq 0x117cb(%rip), %rsi # 0x24196
movb $0x0, %al
callq 0x10f0
leaq 0x18787(%rip), %rax # 0x2b160
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x1877b(%rip), %rax # 0x2b160
movl %ecx, (%rax)
movl (%rsp), %ecx
leaq 0x18787(%rip), %rax # 0x2b178
movl %ecx, (%rax)
leaq 0x1876a(%rip), %rax # 0x2b164
movl $0x13, (%rax)
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
popq %rcx
retq
nop
| _ZN12LefDefParser19defwStartDefaultCapEi:
push rax
mov [rsp+8+var_8], edi
mov cs:_ZN12LefDefParserL15defwObsoleteNumE, 13h; LefDefParser::defwObsoleteNum
lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc
mov dword ptr [rax], 13h
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
cmp qword ptr [rax], 0
jnz short loc_12935
mov [rsp+8+var_4], 1
jmp loc_12A08
loc_12935:
lea rax, _ZN12LefDefParser11defwDidInitE; LefDefParser::defwDidInit
cmp dword ptr [rax], 0
jnz short loc_1294E
mov [rsp+8+var_4], 2
jmp loc_12A08
loc_1294E:
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
cmp dword ptr [rax], 13h
jl short loc_12973
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
cmp dword ptr [rax], 15h
jg short loc_12973
mov [rsp+8+var_4], 2
jmp loc_12A08
loc_12973:
movsd xmm0, cs:_ZN12LefDefParserL13defVersionNumE; LefDefParser::defVersionNum
movsd xmm1, cs:qword_23330
ucomisd xmm0, xmm1
jb short loc_12993
mov [rsp+8+var_4], 6
jmp short loc_12A08
loc_12993:
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
cmp dword ptr [rax], 10h
jnz short loc_129B7
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
lea rsi, asc_240F5; ";\n\n"
mov al, 0
call _fprintf
loc_129B7:
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
mov edx, [rsp+8+var_8]
lea rsi, aDefaultcapD; "DEFAULTCAP %d\n"
mov al, 0
call _fprintf
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov [rax], ecx
mov ecx, [rsp+8+var_8]
lea rax, _ZN12LefDefParser11defwCounterE; LefDefParser::defwCounter
mov [rax], ecx
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
mov dword ptr [rax], 13h
mov [rsp+8+var_4], 0
loc_12A08:
mov eax, [rsp+8+var_4]
pop rcx
retn
| long long LefDefParser::defwStartDefaultCap(LefDefParser *this)
{
LefDefParser::defwObsoleteNum = 19;
LefDefParser::defwFunc = 19;
if ( LefDefParser::defwFile )
{
if ( LefDefParser::defwDidInit )
{
if ( LefDefParser::defwState < 19 || LefDefParser::defwState > 21 )
{
if ( *(double *)&LefDefParser::defVersionNum < 5.4 )
{
if ( LefDefParser::defwState == 16 )
fprintf(LefDefParser::defwFile, ";\n\n");
fprintf(LefDefParser::defwFile, "DEFAULTCAP %d\n", (_DWORD)this);
++LefDefParser::defwLines;
LefDefParser::defwCounter = (_DWORD)this;
LefDefParser::defwState = 19;
return 0;
}
else
{
return 6;
}
}
else
{
return 2;
}
}
else
{
return 2;
}
}
else
{
return 1;
}
}
| defwStartDefaultCap:
PUSH RAX
MOV dword ptr [RSP],EDI
MOV dword ptr [0x0012b0b8],0x13
LEA RAX,[0x12b168]
MOV dword ptr [RAX],0x13
LEA RAX,[0x12b158]
CMP qword ptr [RAX],0x0
JNZ 0x00112935
MOV dword ptr [RSP + 0x4],0x1
JMP 0x00112a08
LAB_00112935:
LEA RAX,[0x12b174]
CMP dword ptr [RAX],0x0
JNZ 0x0011294e
MOV dword ptr [RSP + 0x4],0x2
JMP 0x00112a08
LAB_0011294e:
LEA RAX,[0x12b164]
CMP dword ptr [RAX],0x13
JL 0x00112973
LEA RAX,[0x12b164]
CMP dword ptr [RAX],0x15
JG 0x00112973
MOV dword ptr [RSP + 0x4],0x2
JMP 0x00112a08
LAB_00112973:
MOVSD XMM0,qword ptr [0x0012b0b0]
MOVSD XMM1,qword ptr [0x00123330]
UCOMISD XMM0,XMM1
JC 0x00112993
MOV dword ptr [RSP + 0x4],0x6
JMP 0x00112a08
LAB_00112993:
LEA RAX,[0x12b164]
CMP dword ptr [RAX],0x10
JNZ 0x001129b7
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x1240f5]
MOV AL,0x0
CALL 0x001010f0
LAB_001129b7:
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
MOV EDX,dword ptr [RSP]
LEA RSI,[0x124196]
MOV AL,0x0
CALL 0x001010f0
LEA RAX,[0x12b160]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x12b160]
MOV dword ptr [RAX],ECX
MOV ECX,dword ptr [RSP]
LEA RAX,[0x12b178]
MOV dword ptr [RAX],ECX
LEA RAX,[0x12b164]
MOV dword ptr [RAX],0x13
MOV dword ptr [RSP + 0x4],0x0
LAB_00112a08:
MOV EAX,dword ptr [RSP + 0x4]
POP RCX
RET
|
/* LefDefParser::defwStartDefaultCap(int) */
int4 LefDefParser::defwStartDefaultCap(int param_1)
{
int4 local_4;
defwObsoleteNum = 0x13;
defwFunc = 0x13;
if (defwFile == (FILE *)0x0) {
local_4 = 1;
}
else if (defwDidInit == 0) {
local_4 = 2;
}
else if ((defwState < 0x13) || (0x15 < defwState)) {
if (defVersionNum < DAT_00123330) {
if (defwState == 0x10) {
fprintf(defwFile,";\n\n");
}
fprintf(defwFile,"DEFAULTCAP %d\n",param_1);
defwLines = defwLines + 1;
defwState = 0x13;
local_4 = 0;
defwCounter = param_1;
}
else {
local_4 = 6;
}
}
else {
local_4 = 2;
}
return local_4;
}
| |
27,390 | my_uni_utf32 | eloqsql/strings/ctype-ucs2.c | static int
my_uni_utf32(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
if (s + 4 > e)
return MY_CS_TOOSMALL4;
if (wc > 0x10FFFF)
return MY_CS_ILUNI;
s[0]= (uchar) (wc >> 24);
s[1]= (uchar) (wc >> 16) & 0xFF;
s[2]= (uchar) (wc >> 8) & 0xFF;
s[3]= (uchar) wc & 0xFF;
return 4;
} | O3 | c | my_uni_utf32:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
movq %rsi, %rbx
leaq 0x4(%rdx), %rsi
movl $0xffffff98, %eax # imm = 0xFFFFFF98
cmpq %rcx, %rsi
ja 0x7def4
xorl %eax, %eax
cmpq $0x10ffff, %rbx # imm = 0x10FFFF
ja 0x7def4
movb $0x0, (%rdx)
movl %ebx, %eax
shrl $0x10, %eax
movb %al, 0x1(%rdx)
movb %bh, 0x2(%rdx)
movb %bl, 0x3(%rdx)
movl $0x4, %eax
popq %rbx
popq %rbp
retq
| my_uni_utf32:
push rbp
mov rbp, rsp
push rbx
mov rbx, rsi
lea rsi, [rdx+4]
mov eax, 0FFFFFF98h
cmp rsi, rcx
ja short loc_7DEF4
xor eax, eax
cmp rbx, offset unk_10FFFF
ja short loc_7DEF4
mov byte ptr [rdx], 0
mov eax, ebx
shr eax, 10h
mov [rdx+1], al
mov [rdx+2], bh
mov [rdx+3], bl
mov eax, 4
loc_7DEF4:
pop rbx
pop rbp
retn
| long long my_uni_utf32(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
long long result; // rax
result = 4294967192LL;
if ( (unsigned long long)(a3 + 4) <= a4 )
{
result = 0LL;
if ( a2 <= (unsigned long long)&unk_10FFFF )
{
*a3 = 0;
a3[1] = BYTE2(a2);
a3[2] = BYTE1(a2);
a3[3] = a2;
return 4LL;
}
}
return result;
}
| my_uni_utf32:
PUSH RBP
MOV RBP,RSP
PUSH RBX
MOV RBX,RSI
LEA RSI,[RDX + 0x4]
MOV EAX,0xffffff98
CMP RSI,RCX
JA 0x0017def4
XOR EAX,EAX
CMP RBX,0x10ffff
JA 0x0017def4
MOV byte ptr [RDX],0x0
MOV EAX,EBX
SHR EAX,0x10
MOV byte ptr [RDX + 0x1],AL
MOV byte ptr [RDX + 0x2],BH
MOV byte ptr [RDX + 0x3],BL
MOV EAX,0x4
LAB_0017def4:
POP RBX
POP RBP
RET
|
int8 my_uni_utf32(int8 param_1,ulong param_2,int1 *param_3,int1 *param_4)
{
int8 uVar1;
uVar1 = 0xffffff98;
if ((param_3 + 4 <= param_4) && (uVar1 = 0, param_2 < 0x110000)) {
*param_3 = 0;
param_3[1] = (char)(param_2 >> 0x10);
param_3[2] = (char)(param_2 >> 8);
param_3[3] = (char)param_2;
uVar1 = 4;
}
return uVar1;
}
| |
27,391 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [11], 0>(char const (&) [11]) | llama.cpp/common/json.hpp | reference at(KeyType && key)
{
// 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 set_parent(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>& 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 (&) [11], 0>(char const (&) [11]):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0x6d99f
movq %rsi, %r15
movq 0x8(%r14), %r12
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0x6d989
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1cad0
testl %eax, %eax
je 0x6d97e
addq $0x30, %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
jne 0x6d95f
jmp 0x6d981
movq %rbx, %rax
movq 0x8(%r14), %rcx
movq 0x8(%rcx), %rbx
cmpq %rbx, %rax
je 0x6d9fd
addq $0x20, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x1c460
movq %rax, %rbx
movq %r14, %rdi
callq 0x30fda
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0x5e46f(%rip), %rsi # 0xcbe30
leaq 0x20(%rsp), %rdi
callq 0x73b07
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x30d7e
xorl %ebp, %ebp
leaq 0x904f4(%rip), %rsi # 0xfdee0
leaq -0x401ed(%rip), %rdx # 0x2d806
movq %rbx, %rdi
callq 0x1c7b0
jmp 0x6da76
movl $0x20, %edi
callq 0x1c460
movq %rax, %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x1c490
leaq (%rax,%r15), %rdx
movq %rsp, %rdi
movq %r15, %rsi
callq 0x3fe82
leaq 0x5e5e1(%rip), %rsi # 0xcc013
leaq 0x5e5e0(%rip), %rcx # 0xcc019
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x763c5
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0x2f640
xorl %ebp, %ebp
leaq 0x903f9(%rip), %rsi # 0xfde60
leaq -0x40268(%rip), %rdx # 0x2d806
movq %rbx, %rdi
callq 0x1c7b0
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6da94
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1c110
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x6dadf
movq 0x10(%rsp), %rsi
jmp 0x6dad7
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x6dae9
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1c110
jmp 0x6dae9
jmp 0x6dae6
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6dadf
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1c110
testb %bpl, %bpl
jne 0x6dae9
jmp 0x6daf1
movq %rax, %r14
movq %rbx, %rdi
callq 0x1caa0
movq %r14, %rdi
callq 0x1c7d0
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
push rbp; void *
push r15; int
push r14; __int64
push r12; int
push rbx; void *
sub rsp, 40h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_6D99F
mov r15, rsi
mov r12, [r14+8]
mov rbx, [r12]
mov rax, [r12+8]
cmp rbx, rax
jz short loc_6D989
loc_6D95F:
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_6D97E
add rbx, 30h ; '0'
mov rax, [r12+8]
cmp rbx, rax
jnz short loc_6D95F
jmp short loc_6D981
loc_6D97E:
mov rax, rbx
loc_6D981:
mov rcx, [r14+8]
mov rbx, [rcx+8]
loc_6D989:
cmp rax, rbx
jz short loc_6D9FD
add rax, 20h ; ' '
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_6D99F:
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_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_6DA76
loc_6D9FD:
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_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_6DA76:
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_6DA94
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6DA94:
mov rdi, [rsp+68h+var_68]
cmp rdi, r12
jz short loc_6DADF
mov rsi, [rsp+68h+var_58]
jmp short loc_6DAD7
mov r14, rax
mov rdi, [rsp+68h+var_68]; void *
cmp rdi, r12
jz short loc_6DAE9
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_6DAE9
jmp short loc_6DAE6
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_6DADF
mov rsi, [rsp+68h+var_38]
loc_6DAD7:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6DADF:
test bpl, bpl
jnz short loc_6DAE9
jmp short loc_6DAF1
loc_6DAE6:
mov r14, rax
loc_6DAE9:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_6DAF1:
mov rdi, r14
call __Unwind_Resume
| long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_(
long long a1,
_BYTE *a2)
{
long long *v2; // r12
long long v3; // rbx
long long v4; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
nlohmann::json_abi_v3_11_3::detail::exception *v7; // rbx
long long v8; // rax
void *v9[2]; // [rsp+0h] [rbp-68h] BYREF
long long v10; // [rsp+10h] [rbp-58h] BYREF
_QWORD v11[2]; // [rsp+20h] [rbp-48h] BYREF
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9[0] = (void *)nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(v11, "cannot use at() with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
304,
v11);
__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 = *(long long **)(a1 + 8);
v3 = *v2;
v4 = v2[1];
if ( *v2 != v4 )
{
while ( (unsigned int)std::string::compare(v3, a2) )
{
v3 += 48LL;
v4 = v2[1];
if ( v3 == v4 )
goto LABEL_7;
}
v4 = v3;
LABEL_7:
v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL);
}
if ( v4 == v3 )
{
v7 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9[0] = &v10;
v8 = strlen(a2);
std::string::_M_construct<char const*>((long long)v9, a2, (long long)&a2[v8]);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
v11,
"key '",
v9,
"' not found");
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
v7,
403,
v11);
__cxa_throw(
v7,
(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 v4 + 32;
}
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x0016d99f
MOV R15,RSI
MOV R12,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [R12]
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JZ 0x0016d989
LAB_0016d95f:
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011cad0
TEST EAX,EAX
JZ 0x0016d97e
ADD RBX,0x30
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JNZ 0x0016d95f
JMP 0x0016d981
LAB_0016d97e:
MOV RAX,RBX
LAB_0016d981:
MOV RCX,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [RCX + 0x8]
LAB_0016d989:
CMP RAX,RBX
JZ 0x0016d9fd
ADD RAX,0x20
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0016d99f:
MOV EDI,0x20
CALL 0x0011c460
MOV RBX,RAX
MOV RDI,R14
CALL 0x00130fda
MOV RDX,RSP
MOV qword ptr [RDX],RAX
LAB_0016d9ba:
LEA RSI,[0x1cbe30]
LEA RDI,[RSP + 0x20]
CALL 0x00173b07
MOV BPL,0x1
LAB_0016d9ce:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x00130d7e
XOR EBP,EBP
LEA RSI,[0x1fdee0]
LEA RDX,[0x12d806]
MOV RDI,RBX
CALL 0x0011c7b0
LAB_0016d9fd:
MOV EDI,0x20
CALL 0x0011c460
MOV RBX,RAX
LEA R12,[RSP + 0x10]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,R15
CALL 0x0011c490
LEA RDX,[RAX + R15*0x1]
LAB_0016da20:
MOV RDI,RSP
MOV RSI,R15
CALL 0x0013fe82
LAB_0016da2b:
LEA RSI,[0x1cc013]
LEA RCX,[0x1cc019]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001763c5
MOV BPL,0x1
LAB_0016da49:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x0012f640
XOR EBP,EBP
LEA RSI,[0x1fde60]
LEA RDX,[0x12d806]
MOV RDI,RBX
CALL 0x0011c7b0
|
char * _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA13_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_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 0016d9ba to 0016d9ca has its CatchHandler @ 0016dae6 */
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 0016d9ce to 0016d9fa has its CatchHandler @ 0016dac1 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(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 0016da20 to 0016da2a has its CatchHandler @ 0016dabf */
std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5);
/* try { // try from 0016da2b to 0016da45 has its CatchHandler @ 0016daa4 */
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 0016da49 to 0016da75 has its CatchHandler @ 0016da76 */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(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;
}
| |
27,392 | minja::Value::to_bool() const | llama.cpp/common/minja/minja.hpp | bool to_bool() const {
if (is_null()) return false;
if (is_boolean()) return get<bool>();
if (is_number()) return get<double>() != 0;
if (is_string()) return !get<std::string>().empty();
if (is_array()) return !empty();
return true;
} | O3 | cpp | minja::Value::to_bool() const:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rsi
cmpq $0x0, 0x20(%rdi)
movq 0x10(%rdi), %rax
movb 0x40(%rdi), %cl
jne 0xbf3f8
testq %rax, %rax
jne 0xbf3f8
testb %cl, %cl
jne 0xbf3f8
cmpq $0x0, 0x30(%rsi)
jne 0xbf3f8
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
cmpb $0x4, %cl
jne 0xbf40c
movq %rsi, %rdi
addq $0x28, %rsp
popq %rbx
popq %r14
jmp 0xbf484
leal -0x5(%rcx), %edx
cmpb $0x2, %dl
ja 0xbf42f
movq %rsi, %rdi
callq 0xbf594
xorpd %xmm1, %xmm1
cmpneqsd %xmm0, %xmm1
movq %xmm1, %rbx
andl $0x1, %ebx
jmp 0xbf3ee
cmpb $0x3, %cl
jne 0xbf465
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0xbf6aa
cmpq $0x0, 0x8(%r14)
setne %bl
movq (%r14), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xbf3ee
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x20170
jmp 0xbf3ee
testq %rax, %rax
je 0xbf47c
movq %rsi, %rdi
callq 0xbf7b4
movl %eax, %ebx
xorb $0x1, %bl
jmp 0xbf3ee
movb $0x1, %bl
jmp 0xbf3ee
nop
| _ZNK5minja5Value7to_boolEv:
push r14
push rbx
sub rsp, 28h
mov rsi, rdi
cmp qword ptr [rdi+20h], 0
mov rax, [rdi+10h]
mov cl, [rdi+40h]
jnz short loc_BF3F8
test rax, rax
jnz short loc_BF3F8
test cl, cl
jnz short loc_BF3F8
cmp qword ptr [rsi+30h], 0
jnz short loc_BF3F8
xor ebx, ebx
loc_BF3EE:
mov eax, ebx
add rsp, 28h
pop rbx
pop r14
retn
loc_BF3F8:
cmp cl, 4
jnz short loc_BF40C
mov rdi, rsi
add rsp, 28h
pop rbx
pop r14
jmp _ZNK5minja5Value3getIbEET_v; minja::Value::get<bool>(void)
loc_BF40C:
lea edx, [rcx-5]
cmp dl, 2
ja short loc_BF42F
mov rdi, rsi
call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void)
xorpd xmm1, xmm1
cmpneqsd xmm1, xmm0
movq rbx, xmm1
and ebx, 1
jmp short loc_BF3EE
loc_BF42F:
cmp cl, 3
jnz short loc_BF465
lea r14, [rsp+38h+var_30]
mov rdi, r14
call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void)
cmp qword ptr [r14+8], 0
setnz bl
mov rdi, [r14]; void *
lea rax, [rsp+38h+var_20]
cmp rdi, rax
jz short loc_BF3EE
mov rsi, [rsp+38h+var_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_BF3EE
loc_BF465:
test rax, rax
jz short loc_BF47C
mov rdi, rsi; this
call _ZNK5minja5Value5emptyEv; minja::Value::empty(void)
mov ebx, eax
xor bl, 1
jmp loc_BF3EE
loc_BF47C:
mov bl, 1
jmp loc_BF3EE
| long long minja::Value::to_bool(minja::Value *this)
{
unsigned int v1; // ebx
long long v2; // rax
char v3; // cl
__m128d v5; // xmm0
void *v6[2]; // [rsp+8h] [rbp-30h] BYREF
long long v7; // [rsp+18h] [rbp-20h] BYREF
v2 = *((_QWORD *)this + 2);
v3 = *((_BYTE *)this + 64);
if ( !*((_QWORD *)this + 4) && !v2 && !v3 && !*((_QWORD *)this + 6) )
return 0;
if ( v3 != 4 )
{
if ( (unsigned __int8)(v3 - 5) > 2u )
{
if ( v3 == 3 )
{
minja::Value::get<std::string>(v6, this);
LOBYTE(v1) = v6[1] != 0LL;
if ( v6[0] != &v7 )
operator delete(v6[0], v7 + 1);
}
else if ( v2 )
{
v1 = minja::Value::empty(this);
LOBYTE(v1) = v1 ^ 1;
}
else
{
LOBYTE(v1) = 1;
}
}
else
{
v5.m128d_f64[0] = minja::Value::get<double>(this);
return *(_OWORD *)&_mm_cmpneq_sd((__m128d)0LL, v5) & 1;
}
return v1;
}
return minja::Value::get<bool>(this);
}
| to_bool:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RSI,RDI
CMP qword ptr [RDI + 0x20],0x0
MOV RAX,qword ptr [RDI + 0x10]
MOV CL,byte ptr [RDI + 0x40]
JNZ 0x001bf3f8
TEST RAX,RAX
JNZ 0x001bf3f8
TEST CL,CL
JNZ 0x001bf3f8
CMP qword ptr [RSI + 0x30],0x0
JNZ 0x001bf3f8
XOR EBX,EBX
LAB_001bf3ee:
MOV EAX,EBX
ADD RSP,0x28
POP RBX
POP R14
RET
LAB_001bf3f8:
CMP CL,0x4
JNZ 0x001bf40c
MOV RDI,RSI
ADD RSP,0x28
POP RBX
POP R14
JMP 0x001bf484
LAB_001bf40c:
LEA EDX,[RCX + -0x5]
CMP DL,0x2
JA 0x001bf42f
MOV RDI,RSI
CALL 0x001bf594
XORPD XMM1,XMM1
CMPNEQSD XMM1,XMM0
MOVQ RBX,XMM1
AND EBX,0x1
JMP 0x001bf3ee
LAB_001bf42f:
CMP CL,0x3
JNZ 0x001bf465
LEA R14,[RSP + 0x8]
MOV RDI,R14
CALL 0x001bf6aa
CMP qword ptr [R14 + 0x8],0x0
SETNZ BL
MOV RDI,qword ptr [R14]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x001bf3ee
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00120170
JMP 0x001bf3ee
LAB_001bf465:
TEST RAX,RAX
JZ 0x001bf47c
MOV RDI,RSI
CALL 0x001bf7b4
MOV EBX,EAX
XOR BL,0x1
JMP 0x001bf3ee
LAB_001bf47c:
MOV BL,0x1
JMP 0x001bf3ee
|
/* minja::Value::to_bool() const */
byte __thiscall minja::Value::to_bool(Value *this)
{
Value VVar1;
bool bVar2;
byte bVar3;
double dVar4;
long *local_30;
long local_28;
long local_20 [2];
VVar1 = this[0x40];
if ((((*(long *)(this + 0x20) == 0) && (*(long *)(this + 0x10) == 0)) && (VVar1 == (Value)0x0)) &&
(*(long *)(this + 0x30) == 0)) {
bVar3 = 0;
}
else {
if (VVar1 == (Value)0x4) {
bVar2 = get<bool>(this);
return bVar2;
}
if ((byte)((char)VVar1 - 5U) < 3) {
dVar4 = get<double>(this);
bVar3 = -(dVar4 != 0.0) & 1;
}
else if (VVar1 == (Value)0x3) {
get<std::__cxx11::string>();
bVar3 = local_28 != 0;
if (local_30 != local_20) {
operator_delete(local_30,local_20[0] + 1);
}
}
else if (*(long *)(this + 0x10) == 0) {
bVar3 = 1;
}
else {
bVar3 = empty(this);
bVar3 = bVar3 ^ 1;
}
}
return bVar3;
}
| |
27,393 | minja::Value::operator/(minja::Value const&) const | llama.cpp/common/minja/minja.hpp | Value operator/(const Value& rhs) const {
if (is_number_integer() && rhs.is_number_integer())
return get<int64_t>() / rhs.get<int64_t>();
else
return get<double>() / rhs.get<double>();
} | O3 | cpp | minja::Value::operator/(minja::Value const&) const:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movb 0x40(%rsi), %al
addb $-0x5, %al
cmpb $0x1, %al
ja 0xf6329
movb 0x40(%r14), %al
addb $-0x5, %al
cmpb $0x1, %al
ja 0xf6329
movq %rsi, %rdi
callq 0xcb63a
movq %rax, %r15
movq %r14, %rdi
callq 0xcb63a
movq %rax, %rcx
movq %r15, %rax
cqto
idivq %rcx
leaq 0x40(%rbx), %r14
xorpd %xmm0, %xmm0
movupd %xmm0, (%rbx)
movupd %xmm0, 0x10(%rbx)
movupd %xmm0, 0x20(%rbx)
movupd %xmm0, 0x30(%rbx)
movupd %xmm0, 0x40(%rbx)
movq %r14, %rdi
movq %rax, %rsi
callq 0x356da
jmp 0xf6375
movq %rsi, %rdi
callq 0xc8aca
movsd %xmm0, 0x8(%rsp)
movq %r14, %rdi
callq 0xc8aca
movsd 0x8(%rsp), %xmm1
divsd %xmm0, %xmm1
leaq 0x40(%rbx), %r14
xorpd %xmm0, %xmm0
movupd %xmm0, (%rbx)
movupd %xmm0, 0x10(%rbx)
movupd %xmm0, 0x20(%rbx)
movupd %xmm0, 0x30(%rbx)
movupd %xmm0, 0x40(%rbx)
movq %r14, %rdi
movapd %xmm1, %xmm0
callq 0x35032
movq %r14, %rdi
movl $0x1, %esi
callq 0x9524a
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
| _ZNK5minja5ValuedvERKS0_:
push r15
push r14
push rbx
sub rsp, 10h
mov r14, rdx
mov rbx, rdi
mov al, [rsi+40h]
add al, 0FBh
cmp al, 1
ja short loc_F6329
mov al, [r14+40h]
add al, 0FBh
cmp al, 1
ja short loc_F6329
mov rdi, rsi
call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void)
mov r15, rax
mov rdi, r14
call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void)
mov rcx, rax
mov rax, r15
cqo
idiv rcx
lea r14, [rbx+40h]
xorpd xmm0, xmm0
movupd xmmword ptr [rbx], xmm0
movupd xmmword ptr [rbx+10h], xmm0
movupd xmmword ptr [rbx+20h], xmm0
movupd xmmword ptr [rbx+30h], xmm0
movupd xmmword ptr [rbx+40h], xmm0
mov rdi, r14
mov rsi, rax
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)
jmp short loc_F6375
loc_F6329:
mov rdi, rsi
call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void)
movsd [rsp+28h+var_20], xmm0
mov rdi, r14
call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void)
movsd xmm1, [rsp+28h+var_20]
divsd xmm1, xmm0
lea r14, [rbx+40h]
xorpd xmm0, xmm0
movupd xmmword ptr [rbx], xmm0
movupd xmmword ptr [rbx+10h], xmm0
movupd xmmword ptr [rbx+20h], xmm0
movupd xmmword ptr [rbx+30h], xmm0
movupd xmmword ptr [rbx+40h], xmm0
mov rdi, r14
movapd xmm0, xmm1
call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE7EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_14number_float_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::number_float_t)
loc_F6375:
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 rax, rbx
add rsp, 10h
pop rbx
pop r14
pop r15
retn
| long long minja::Value::operator/(long long a1, long long a2, long long a3)
{
long long v4; // r15
long long v5; // rax
char *v6; // r14
double v7; // xmm0_8
double v9; // [rsp+8h] [rbp-20h]
if ( (unsigned __int8)(*(_BYTE *)(a2 + 64) - 5) > 1u || (unsigned __int8)(*(_BYTE *)(a3 + 64) - 5) > 1u )
{
v9 = minja::Value::get<double>(a2);
v7 = minja::Value::get<double>(a3);
v6 = (char *)(a1 + 64);
*(_OWORD *)a1 = 0LL;
*(_OWORD *)(a1 + 16) = 0LL;
*(_OWORD *)(a1 + 32) = 0LL;
*(_OWORD *)(a1 + 48) = 0LL;
*(_OWORD *)(a1 + 64) = 0LL;
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
(unsigned __int8 *)(a1 + 64),
v9 / v7);
}
else
{
v4 = minja::Value::get<long>((_QWORD *)a2);
v5 = minja::Value::get<long>((_QWORD *)a3);
v6 = (char *)(a1 + 64);
*(_OWORD *)a1 = 0LL;
*(_OWORD *)(a1 + 16) = 0LL;
*(_OWORD *)(a1 + 32) = 0LL;
*(_OWORD *)(a1 + 48) = 0LL;
*(_OWORD *)(a1 + 64) = 0LL;
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
(unsigned __int8 *)(a1 + 64),
v4 / v5);
}
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v6);
return a1;
}
| operator/:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV R14,RDX
MOV RBX,RDI
MOV AL,byte ptr [RSI + 0x40]
ADD AL,0xfb
CMP AL,0x1
JA 0x001f6329
MOV AL,byte ptr [R14 + 0x40]
ADD AL,0xfb
CMP AL,0x1
JA 0x001f6329
MOV RDI,RSI
CALL 0x001cb63a
MOV R15,RAX
MOV RDI,R14
CALL 0x001cb63a
MOV RCX,RAX
MOV RAX,R15
CQO
IDIV RCX
LEA R14,[RBX + 0x40]
XORPD XMM0,XMM0
MOVUPD xmmword ptr [RBX],XMM0
MOVUPD xmmword ptr [RBX + 0x10],XMM0
MOVUPD xmmword ptr [RBX + 0x20],XMM0
MOVUPD xmmword ptr [RBX + 0x30],XMM0
MOVUPD xmmword ptr [RBX + 0x40],XMM0
MOV RDI,R14
MOV RSI,RAX
CALL 0x001356da
JMP 0x001f6375
LAB_001f6329:
MOV RDI,RSI
CALL 0x001c8aca
MOVSD qword ptr [RSP + 0x8],XMM0
MOV RDI,R14
CALL 0x001c8aca
MOVSD XMM1,qword ptr [RSP + 0x8]
DIVSD XMM1,XMM0
LEA R14,[RBX + 0x40]
XORPD XMM0,XMM0
MOVUPD xmmword ptr [RBX],XMM0
MOVUPD xmmword ptr [RBX + 0x10],XMM0
MOVUPD xmmword ptr [RBX + 0x20],XMM0
MOVUPD xmmword ptr [RBX + 0x30],XMM0
MOVUPD xmmword ptr [RBX + 0x40],XMM0
MOV RDI,R14
MOVAPD XMM0,XMM1
CALL 0x00135032
LAB_001f6375:
MOV RDI,R14
MOV ESI,0x1
CALL 0x0019524a
MOV RAX,RBX
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
/* minja::Value::TEMPNAMEPLACEHOLDERVALUE(minja::Value const&) const */
Value * __thiscall minja::Value::operator/(Value *this,Value *param_1)
{
long lVar1;
long lVar2;
Value *in_RDX;
double dVar3;
double dVar4;
if (((byte)((char)param_1[0x40] - 5U) < 2) && ((byte)((char)in_RDX[0x40] - 5U) < 2)) {
lVar1 = get<long>(param_1);
lVar2 = get<long>(in_RDX);
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
nlohmann::json_abi_v3_11_3::detail::
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)5>::
construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(this + 0x40,lVar1 / lVar2,lVar1 % lVar2);
}
else {
dVar3 = get<double>(param_1);
dVar4 = get<double>(in_RDX);
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
nlohmann::json_abi_v3_11_3::detail::
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)7>::
construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(dVar3 / dVar4,this + 0x40);
}
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant((bool)((char)this + '@'));
return this;
}
| |
27,394 | set_object_name_computed | bluesky950520[P]quickjs/quickjs.c | static void set_object_name_computed(JSParseState *s)
{
JSFunctionDef *fd = s->cur_func;
int opcode;
opcode = get_prev_opcode(fd);
if (opcode == OP_set_name) {
/* XXX: should free atom after OP_set_name? */
fd->byte_code.size = fd->last_opcode_pos;
fd->last_opcode_pos = -1;
emit_op(s, OP_set_name_computed);
} else if (opcode == OP_set_class_name) {
int define_class_pos;
define_class_pos = fd->last_opcode_pos + 1 -
get_u32(fd->byte_code.buf + fd->last_opcode_pos + 1);
assert(fd->byte_code.buf[define_class_pos] == OP_define_class);
fd->byte_code.buf[define_class_pos] = OP_define_class_computed;
fd->last_opcode_pos = -1;
}
} | O0 | c | set_object_name_computed:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x90(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0xac9f0
movl %eax, 0x14(%rsp)
cmpl $0x4d, 0x14(%rsp)
jne 0xad207
movq 0x18(%rsp), %rax
movslq 0x168(%rax), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x140(%rax)
movq 0x18(%rsp), %rax
movl $0xffffffff, 0x168(%rax) # imm = 0xFFFFFFFF
movq 0x20(%rsp), %rdi
movl $0x4e, %esi
callq 0x9bc60
jmp 0xad279
cmpl $0xc3, 0x14(%rsp)
jne 0xad277
movq 0x18(%rsp), %rax
movl 0x168(%rax), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
movq 0x18(%rsp), %rax
movq 0x138(%rax), %rdi
movq 0x18(%rsp), %rax
movslq 0x168(%rax), %rax
addq %rax, %rdi
addq $0x1, %rdi
callq 0x5def0
movl %eax, %ecx
movl 0xc(%rsp), %eax
subl %ecx, %eax
movl %eax, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq 0x138(%rax), %rax
movslq 0x10(%rsp), %rcx
movb $0x57, (%rax,%rcx)
movq 0x18(%rsp), %rax
movl $0xffffffff, 0x168(%rax) # imm = 0xFFFFFFFF
jmp 0xad279
addq $0x28, %rsp
retq
nop
| set_object_name_computed:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov rax, [rsp+28h+var_8]
mov rax, [rax+90h]
mov [rsp+28h+var_10], rax
mov rdi, [rsp+28h+var_10]
call get_prev_opcode
mov [rsp+28h+var_14], eax
cmp [rsp+28h+var_14], 4Dh ; 'M'
jnz short loc_AD207
mov rax, [rsp+28h+var_10]
movsxd rcx, dword ptr [rax+168h]
mov rax, [rsp+28h+var_10]
mov [rax+140h], rcx
mov rax, [rsp+28h+var_10]
mov dword ptr [rax+168h], 0FFFFFFFFh
mov rdi, [rsp+28h+var_8]
mov esi, 4Eh ; 'N'
call emit_op
jmp short loc_AD279
loc_AD207:
cmp [rsp+28h+var_14], 0C3h
jnz short loc_AD277
mov rax, [rsp+28h+var_10]
mov eax, [rax+168h]
add eax, 1
mov [rsp+28h+var_1C], eax
mov rax, [rsp+28h+var_10]
mov rdi, [rax+138h]
mov rax, [rsp+28h+var_10]
movsxd rax, dword ptr [rax+168h]
add rdi, rax
add rdi, 1
call get_u32
mov ecx, eax
mov eax, [rsp+28h+var_1C]
sub eax, ecx
mov [rsp+28h+var_18], eax
mov rax, [rsp+28h+var_10]
mov rax, [rax+138h]
movsxd rcx, [rsp+28h+var_18]
mov byte ptr [rax+rcx], 57h ; 'W'
mov rax, [rsp+28h+var_10]
mov dword ptr [rax+168h], 0FFFFFFFFh
loc_AD277:
jmp short $+2
loc_AD279:
add rsp, 28h
retn
| long long set_object_name_computed(long long a1)
{
long long result; // rax
int v2; // [rsp+Ch] [rbp-1Ch]
long long v3; // [rsp+18h] [rbp-10h]
v3 = *(_QWORD *)(a1 + 144);
result = get_prev_opcode(v3);
if ( (_DWORD)result == 77 )
{
*(_QWORD *)(v3 + 320) = *(int *)(v3 + 360);
*(_DWORD *)(v3 + 360) = -1;
return emit_op(a1, 78);
}
else if ( (_DWORD)result == 195 )
{
v2 = *(_DWORD *)(v3 + 360) + 1;
*(_BYTE *)(*(_QWORD *)(v3 + 312)
+ (int)(v2 - get_u32((unsigned int *)(*(int *)(v3 + 360) + *(_QWORD *)(v3 + 312) + 1LL)))) = 87;
result = v3;
*(_DWORD *)(v3 + 360) = -1;
}
return result;
}
| set_object_name_computed:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0x90]
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x001ac9f0
MOV dword ptr [RSP + 0x14],EAX
CMP dword ptr [RSP + 0x14],0x4d
JNZ 0x001ad207
MOV RAX,qword ptr [RSP + 0x18]
MOVSXD RCX,dword ptr [RAX + 0x168]
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RAX + 0x140],RCX
MOV RAX,qword ptr [RSP + 0x18]
MOV dword ptr [RAX + 0x168],0xffffffff
MOV RDI,qword ptr [RSP + 0x20]
MOV ESI,0x4e
CALL 0x0019bc60
JMP 0x001ad279
LAB_001ad207:
CMP dword ptr [RSP + 0x14],0xc3
JNZ 0x001ad277
MOV RAX,qword ptr [RSP + 0x18]
MOV EAX,dword ptr [RAX + 0x168]
ADD EAX,0x1
MOV dword ptr [RSP + 0xc],EAX
MOV RAX,qword ptr [RSP + 0x18]
MOV RDI,qword ptr [RAX + 0x138]
MOV RAX,qword ptr [RSP + 0x18]
MOVSXD RAX,dword ptr [RAX + 0x168]
ADD RDI,RAX
ADD RDI,0x1
CALL 0x0015def0
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,ECX
MOV dword ptr [RSP + 0x10],EAX
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x138]
MOVSXD RCX,dword ptr [RSP + 0x10]
MOV byte ptr [RAX + RCX*0x1],0x57
MOV RAX,qword ptr [RSP + 0x18]
MOV dword ptr [RAX + 0x168],0xffffffff
LAB_001ad277:
JMP 0x001ad279
LAB_001ad279:
ADD RSP,0x28
RET
|
void set_object_name_computed(long param_1)
{
long lVar1;
int iVar2;
int iVar3;
lVar1 = *(long *)(param_1 + 0x90);
iVar2 = get_prev_opcode(lVar1);
if (iVar2 == 0x4d) {
*(long *)(lVar1 + 0x140) = (long)*(int *)(lVar1 + 0x168);
*(int4 *)(lVar1 + 0x168) = 0xffffffff;
emit_op(param_1,0x4e);
}
else if (iVar2 == 0xc3) {
iVar2 = *(int *)(lVar1 + 0x168);
iVar3 = get_u32(*(long *)(lVar1 + 0x138) + (long)*(int *)(lVar1 + 0x168) + 1);
*(int1 *)(*(long *)(lVar1 + 0x138) + (long)((iVar2 + 1) - iVar3)) = 0x57;
*(int4 *)(lVar1 + 0x168) = 0xffffffff;
}
return;
}
| |
27,395 | set_object_name_computed | bluesky950520[P]quickjs/quickjs.c | static void set_object_name_computed(JSParseState *s)
{
JSFunctionDef *fd = s->cur_func;
int opcode;
opcode = get_prev_opcode(fd);
if (opcode == OP_set_name) {
/* XXX: should free atom after OP_set_name? */
fd->byte_code.size = fd->last_opcode_pos;
fd->last_opcode_pos = -1;
emit_op(s, OP_set_name_computed);
} else if (opcode == OP_set_class_name) {
int define_class_pos;
define_class_pos = fd->last_opcode_pos + 1 -
get_u32(fd->byte_code.buf + fd->last_opcode_pos + 1);
assert(fd->byte_code.buf[define_class_pos] == OP_define_class);
fd->byte_code.buf[define_class_pos] = OP_define_class_computed;
fd->last_opcode_pos = -1;
}
} | O1 | c | set_object_name_computed:
movq 0x90(%rdi), %rdi
movslq 0x168(%rdi), %rax
testq %rax, %rax
js 0x69ae8
movq 0x138(%rdi), %rcx
movb (%rcx,%rax), %cl
jmp 0x69aea
xorl %ecx, %ecx
cmpb $-0x3d, %cl
je 0x69b15
movzbl %cl, %ecx
cmpl $0x4d, %ecx
jne 0x69b34
movq %rax, 0x140(%rdi)
movl %eax, 0x168(%rdi)
addq $0x138, %rdi # imm = 0x138
movl $0x4e, %esi
jmp 0x1a8bc
movq 0x138(%rdi), %rcx
movl 0x1(%rcx,%rax), %edx
subl %edx, %eax
incl %eax
cltq
movb $0x57, (%rcx,%rax)
movl $0xffffffff, 0x168(%rdi) # imm = 0xFFFFFFFF
retq
| set_object_name_computed:
mov rdi, [rdi+90h]
movsxd rax, dword ptr [rdi+168h]
test rax, rax
js short loc_69AE8
mov rcx, [rdi+138h]
mov cl, [rcx+rax]
jmp short loc_69AEA
loc_69AE8:
xor ecx, ecx
loc_69AEA:
cmp cl, 0C3h
jz short loc_69B15
movzx ecx, cl
cmp ecx, 4Dh ; 'M'
jnz short locret_69B34
mov [rdi+140h], rax
mov [rdi+168h], eax
add rdi, 138h
mov esi, 4Eh ; 'N'
jmp dbuf_putc
loc_69B15:
mov rcx, [rdi+138h]
mov edx, [rcx+rax+1]
sub eax, edx
inc eax
cdqe
mov byte ptr [rcx+rax], 57h ; 'W'
mov dword ptr [rdi+168h], 0FFFFFFFFh
locret_69B34:
retn
| long long set_object_name_computed(long long a1)
{
long long v1; // rdi
long long result; // rax
char v3; // cl
long long v4; // rcx
v1 = *(_QWORD *)(a1 + 144);
result = *(int *)(v1 + 360);
if ( result < 0 )
v3 = 0;
else
v3 = *(_BYTE *)(*(_QWORD *)(v1 + 312) + result);
if ( v3 == -61 )
{
v4 = *(_QWORD *)(v1 + 312);
result = (int)result - *(_DWORD *)(v4 + result + 1) + 1;
*(_BYTE *)(v4 + (int)result) = 87;
*(_DWORD *)(v1 + 360) = -1;
}
else if ( v3 == 77 )
{
*(_QWORD *)(v1 + 320) = result;
*(_DWORD *)(v1 + 360) = result;
return dbuf_putc((_QWORD *)(v1 + 312), 78);
}
return result;
}
| set_object_name_computed:
MOV RDI,qword ptr [RDI + 0x90]
MOVSXD RAX,dword ptr [RDI + 0x168]
TEST RAX,RAX
JS 0x00169ae8
MOV RCX,qword ptr [RDI + 0x138]
MOV CL,byte ptr [RCX + RAX*0x1]
JMP 0x00169aea
LAB_00169ae8:
XOR ECX,ECX
LAB_00169aea:
CMP CL,0xc3
JZ 0x00169b15
MOVZX ECX,CL
CMP ECX,0x4d
JNZ 0x00169b34
MOV qword ptr [RDI + 0x140],RAX
MOV dword ptr [RDI + 0x168],EAX
ADD RDI,0x138
MOV ESI,0x4e
JMP 0x0011a8bc
LAB_00169b15:
MOV RCX,qword ptr [RDI + 0x138]
MOV EDX,dword ptr [RCX + RAX*0x1 + 0x1]
SUB EAX,EDX
INC EAX
CDQE
MOV byte ptr [RCX + RAX*0x1],0x57
MOV dword ptr [RDI + 0x168],0xffffffff
LAB_00169b34:
RET
|
void set_object_name_computed(long param_1)
{
int iVar1;
long lVar2;
long lVar3;
char cVar4;
lVar2 = *(long *)(param_1 + 0x90);
iVar1 = *(int *)(lVar2 + 0x168);
lVar3 = (long)iVar1;
if (lVar3 < 0) {
cVar4 = '\0';
}
else {
cVar4 = *(char *)(*(long *)(lVar2 + 0x138) + lVar3);
}
if (cVar4 == -0x3d) {
*(int1 *)
(*(long *)(lVar2 + 0x138) +
(long)((iVar1 - *(int *)(*(long *)(lVar2 + 0x138) + 1 + lVar3)) + 1)) = 0x57;
*(int4 *)(lVar2 + 0x168) = 0xffffffff;
}
else if (cVar4 == 'M') {
*(long *)(lVar2 + 0x140) = lVar3;
*(int *)(lVar2 + 0x168) = iVar1;
dbuf_putc(lVar2 + 0x138,0x4e);
return;
}
return;
}
| |
27,396 | bool minja::Value::get<bool>() const | llama.cpp/common/minja/minja.hpp | T get() const {
if (is_primitive()) return primitive_.get<T>();
throw std::runtime_error("get<T> not defined for this value type: " + dump());
} | O3 | cpp | bool minja::Value::get<bool>() const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpq $0x0, 0x10(%rdi)
jne 0xbee5e
cmpq $0x0, 0x20(%r14)
jne 0xbee5e
cmpq $0x0, 0x30(%r14)
jne 0xbee5e
addq $0x40, %r14
leaq 0x20(%rsp), %rbx
movb $0x0, (%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0xbf1e7
movb (%rbx), %al
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x10, %edi
callq 0x20640
movq %rax, %rbx
movq %rsp, %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0xb6034
leaq 0x60b56(%rip), %rsi # 0x11f9da
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0xaf8d4
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x20470
xorl %ebp, %ebp
movq 0xa3116(%rip), %rsi # 0x161fc0
movq 0xa30cf(%rip), %rdx # 0x161f80
movq %rbx, %rdi
callq 0x20a40
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbeed7
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x20180
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbeef2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x20180
testb %bpl, %bpl
jne 0xbef1c
jmp 0xbef24
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbef1c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x20180
jmp 0xbef1c
movq %rax, %r14
movq %rbx, %rdi
callq 0x20ef0
movq %r14, %rdi
callq 0x20ae0
| _ZNK5minja5Value3getIbEET_v:
push rbp
push r14
push rbx
sub rsp, 40h
mov r14, rdi
cmp qword ptr [rdi+10h], 0
jnz short loc_BEE5E
cmp qword ptr [r14+20h], 0
jnz short loc_BEE5E
cmp qword ptr [r14+30h], 0
jnz short loc_BEE5E
add r14, 40h ; '@'
lea rbx, [rsp+58h+var_38]
mov byte ptr [rbx], 0
mov rdi, r14
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_9boolean_tE; nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::boolean_t &)
mov al, [rbx]
add rsp, 40h
pop rbx
pop r14
pop rbp
retn
loc_BEE5E:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, rsp
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aGetTNotDefined; "get<T> not defined for this value type:"...
lea rdi, [rsp+58h+var_38]
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+58h+var_38]
mov rdi, rbx
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, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+58h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_BEED7
mov rsi, [rsp+58h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_BEED7:
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_BEEF2
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_BEEF2:
test bpl, bpl
jnz short loc_BEF1C
jmp short loc_BEF24
mov r14, rax
lea rax, [rsp+58h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_BEF1C
mov rsi, [rsp+58h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_BEF1C
mov r14, rax
loc_BEF1C:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_BEF24:
mov rdi, r14
call __Unwind_Resume
| char minja::Value::get<bool>(_QWORD *a1)
{
void *exception; // rbx
_BYTE v3[16]; // [rsp+0h] [rbp-58h] BYREF
_QWORD v4[2]; // [rsp+20h] [rbp-38h] BYREF
if ( a1[2] || a1[4] || a1[6] )
{
exception = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v3, (long long)a1, 0xFFFFFFFF, 0);
std::operator+<char>(v4, (long long)"get<T> not defined for this value type: ", (long long)v3);
std::runtime_error::runtime_error(exception, v4);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
LOBYTE(v4[0]) = 0;
nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
a1 + 8,
v4);
return v4[0];
}
| get<bool>:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP qword ptr [RDI + 0x10],0x0
JNZ 0x001bee5e
CMP qword ptr [R14 + 0x20],0x0
JNZ 0x001bee5e
CMP qword ptr [R14 + 0x30],0x0
JNZ 0x001bee5e
ADD R14,0x40
LEA RBX,[RSP + 0x20]
MOV byte ptr [RBX],0x0
MOV RDI,R14
MOV RSI,RBX
CALL 0x001bf1e7
MOV AL,byte ptr [RBX]
ADD RSP,0x40
POP RBX
POP R14
POP RBP
RET
LAB_001bee5e:
MOV EDI,0x10
CALL 0x00120640
MOV RBX,RAX
LAB_001bee6b:
MOV RDI,RSP
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x001b6034
LAB_001bee7d:
LEA RSI,[0x21f9da]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001af8d4
MOV BPL,0x1
LAB_001bee94:
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x00120470
XOR EBP,EBP
MOV RSI,qword ptr [0x00261fc0]
MOV RDX,qword ptr [0x00261f80]
MOV RDI,RBX
CALL 0x00120a40
|
/* bool minja::Value::get<bool>() const */
bool __thiscall minja::Value::get<bool>(Value *this)
{
runtime_error *this_00;
int1 auStack_58 [32];
string local_38 [32];
if (((*(long *)(this + 0x10) == 0) && (*(long *)(this + 0x20) == 0)) &&
(*(long *)(this + 0x30) == 0)) {
local_38[0] = (string)0x0;
nlohmann::json_abi_v3_11_3::detail::
from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
((basic_json *)(this + 0x40),local_38);
return (bool)local_38[0];
}
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001bee6b to 001bee7c has its CatchHandler @ 001bef19 */
dump_abi_cxx11_((int)auStack_58,SUB81(this,0));
/* try { // try from 001bee7d to 001bee90 has its CatchHandler @ 001beef9 */
std::operator+((char *)local_38,(string *)"get<T> not defined for this value type: ");
/* try { // try from 001bee94 to 001beeb8 has its CatchHandler @ 001beeb9 */
std::runtime_error::runtime_error(this_00,local_38);
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_00261fc0,PTR__runtime_error_00261f80);
}
| |
27,397 | translog_stop_writing | eloqsql/storage/maria/ma_loghandler.c | void translog_stop_writing()
{
DBUG_ENTER("translog_stop_writing");
DBUG_PRINT("error", ("errno: %d my_errno: %d", errno, my_errno));
translog_status= (translog_status == TRANSLOG_SHUTDOWN ?
TRANSLOG_UNINITED :
TRANSLOG_READONLY);
log_descriptor.is_everything_flushed= 1;
log_descriptor.open_flags= O_BINARY | O_RDONLY;
DBUG_ASSERT(0);
DBUG_VOID_RETURN;
} | O0 | c | translog_stop_writing:
pushq %rbp
movq %rsp, %rbp
jmp 0x50b66
jmp 0x50b68
movl 0x4288e2(%rip), %edx # 0x479450
movl $0x2, %eax
xorl %ecx, %ecx
cmpl $0x3, %edx
cmovel %ecx, %eax
movl %eax, 0x4288cf(%rip) # 0x479450
movb $0x1, 0xc2a9a8(%rip) # 0xc7b530
movl $0x0, 0x429ada(%rip) # 0x47a66c
jmp 0x50b94
jmp 0x50b96
jmp 0x50b98
popq %rbp
retq
nopw (%rax,%rax)
| translog_stop_writing:
push rbp
mov rbp, rsp
jmp short $+2
loc_50B66:
jmp short $+2
loc_50B68:
mov edx, cs:translog_status
mov eax, 2
xor ecx, ecx
cmp edx, 3
cmovz eax, ecx
mov cs:translog_status, eax
mov cs:byte_C7B530, 1
mov cs:dword_47A66C, 0
jmp short $+2
loc_50B94:
jmp short $+2
loc_50B96:
jmp short $+2
loc_50B98:
pop rbp
retn
| long long translog_stop_writing()
{
long long result; // rax
result = 2LL;
if ( translog_status == 3 )
result = 0LL;
translog_status = result;
byte_C7B530 = 1;
dword_47A66C = 0;
return result;
}
| translog_stop_writing:
PUSH RBP
MOV RBP,RSP
JMP 0x00150b66
LAB_00150b66:
JMP 0x00150b68
LAB_00150b68:
MOV EDX,dword ptr [0x00579450]
MOV EAX,0x2
XOR ECX,ECX
CMP EDX,0x3
CMOVZ EAX,ECX
MOV dword ptr [0x00579450],EAX
MOV byte ptr [0x00d7b530],0x1
MOV dword ptr [0x0057a66c],0x0
JMP 0x00150b94
LAB_00150b94:
JMP 0x00150b96
LAB_00150b96:
JMP 0x00150b98
LAB_00150b98:
POP RBP
RET
|
void translog_stop_writing(void)
{
int4 uVar1;
uVar1 = 2;
if (translog_status == 3) {
uVar1 = 0;
}
translog_status = uVar1;
DAT_00d7b530 = 1;
DAT_0057a66c = 0;
return;
}
| |
27,398 | translog_stop_writing | eloqsql/storage/maria/ma_loghandler.c | void translog_stop_writing()
{
DBUG_ENTER("translog_stop_writing");
DBUG_PRINT("error", ("errno: %d my_errno: %d", errno, my_errno));
translog_status= (translog_status == TRANSLOG_SHUTDOWN ?
TRANSLOG_UNINITED :
TRANSLOG_READONLY);
log_descriptor.is_everything_flushed= 1;
log_descriptor.open_flags= O_BINARY | O_RDONLY;
DBUG_ASSERT(0);
DBUG_VOID_RETURN;
} | O3 | c | translog_stop_writing:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
cmpl $0x3, 0x3b5e6d(%rip) # 0x3ff860
setne %al
addl %eax, %eax
movl %eax, 0x3b5e62(%rip) # 0x3ff860
movb $0x1, 0xbb7f3b(%rip) # 0xc01940
movl $0x0, 0x3b706d(%rip) # 0x400a7c
popq %rbp
retq
| translog_stop_writing:
push rbp
mov rbp, rsp
xor eax, eax
cmp cs:translog_status, 3
setnz al
add eax, eax
mov cs:translog_status, eax
mov byte ptr cs:word_C01940, 1
mov cs:dword_400A7C, 0
pop rbp
retn
| long long translog_stop_writing()
{
long long result; // rax
result = 2 * (unsigned int)(translog_status != 3);
translog_status = 2 * (translog_status != 3);
LOBYTE(word_C01940) = 1;
dword_400A7C = 0;
return result;
}
| translog_stop_writing:
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
CMP dword ptr [0x004ff860],0x3
SETNZ AL
ADD EAX,EAX
MOV dword ptr [0x004ff860],EAX
MOV byte ptr [0x00d01940],0x1
MOV dword ptr [0x00500a7c],0x0
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void translog_stop_writing(void)
{
translog_status = (uint)(translog_status != 3) * 2;
DAT_00d01940 = 1;
_DAT_00500a7c = 0;
return;
}
| |
27,399 | intern_filename | eloqsql/mysys/mf_pack.c | char *intern_filename(char *to, const char *from)
{
size_t length, to_length;
char buff[FN_REFLEN + 1];
if (from == to)
{ /* Dirname may destroy from */
(void) strnmov(buff, from, FN_REFLEN);
from=buff;
}
length= dirname_part(to, from, &to_length); /* Copy dirname & fix chars */
(void) strnmov(to + to_length, from + length, FN_REFLEN - to_length);
return (to);
} | O0 | c | intern_filename:
pushq %rbp
movq %rsp, %rbp
subq $0x240, %rsp # imm = 0x240
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x218(%rbp)
movq %rsi, -0x220(%rbp)
movq -0x220(%rbp), %rax
cmpq -0x218(%rbp), %rax
jne 0xe82fc
leaq -0x210(%rbp), %rdi
movq -0x220(%rbp), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x14d360
leaq -0x210(%rbp), %rax
movq %rax, -0x220(%rbp)
movq -0x218(%rbp), %rdi
movq -0x220(%rbp), %rsi
leaq -0x230(%rbp), %rdx
callq 0xdec70
movq %rax, -0x228(%rbp)
movq -0x218(%rbp), %rdi
movq -0x230(%rbp), %rax
addq %rax, %rdi
movq -0x220(%rbp), %rsi
movq -0x228(%rbp), %rcx
addq %rcx, %rsi
movl $0x200, %edx # imm = 0x200
subq %rax, %rdx
callq 0x14d360
movq -0x218(%rbp), %rax
movq %rax, -0x238(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xe837c
movq -0x238(%rbp), %rax
addq $0x240, %rsp # imm = 0x240
popq %rbp
retq
callq 0x2a260
nopw %cs:(%rax,%rax)
| intern_filename:
push rbp
mov rbp, rsp
sub rsp, 240h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_218], rdi
mov [rbp+var_220], rsi
mov rax, [rbp+var_220]
cmp rax, [rbp+var_218]
jnz short loc_E82FC
lea rdi, [rbp+var_210]
mov rsi, [rbp+var_220]
mov edx, 200h
call strnmov
lea rax, [rbp+var_210]
mov [rbp+var_220], rax
loc_E82FC:
mov rdi, [rbp+var_218]
mov rsi, [rbp+var_220]
lea rdx, [rbp+var_230]
call dirname_part
mov [rbp+var_228], rax
mov rdi, [rbp+var_218]
mov rax, [rbp+var_230]
add rdi, rax
mov rsi, [rbp+var_220]
mov rcx, [rbp+var_228]
add rsi, rcx
mov edx, 200h
sub rdx, rax
call strnmov
mov rax, [rbp+var_218]
mov [rbp+var_238], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_E837C
mov rax, [rbp+var_238]
add rsp, 240h
pop rbp
retn
loc_E837C:
call ___stack_chk_fail
| long long intern_filename(long long a1, _BYTE *a2)
{
long long v3; // [rsp+10h] [rbp-230h] BYREF
long long v4; // [rsp+18h] [rbp-228h]
_BYTE *v5; // [rsp+20h] [rbp-220h]
long long v6; // [rsp+28h] [rbp-218h]
_BYTE v7[520]; // [rsp+30h] [rbp-210h] BYREF
unsigned long long v8; // [rsp+238h] [rbp-8h]
v8 = __readfsqword(0x28u);
v6 = a1;
v5 = a2;
if ( a2 == (_BYTE *)a1 )
{
strnmov(v7, v5, 512LL);
v5 = v7;
}
v4 = dirname_part(v6, v5, &v3);
strnmov(v3 + v6, &v5[v4], 512 - v3);
return v6;
}
| intern_filename:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x240
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x218],RDI
MOV qword ptr [RBP + -0x220],RSI
MOV RAX,qword ptr [RBP + -0x220]
CMP RAX,qword ptr [RBP + -0x218]
JNZ 0x001e82fc
LEA RDI,[RBP + -0x210]
MOV RSI,qword ptr [RBP + -0x220]
MOV EDX,0x200
CALL 0x0024d360
LEA RAX,[RBP + -0x210]
MOV qword ptr [RBP + -0x220],RAX
LAB_001e82fc:
MOV RDI,qword ptr [RBP + -0x218]
MOV RSI,qword ptr [RBP + -0x220]
LEA RDX,[RBP + -0x230]
CALL 0x001dec70
MOV qword ptr [RBP + -0x228],RAX
MOV RDI,qword ptr [RBP + -0x218]
MOV RAX,qword ptr [RBP + -0x230]
ADD RDI,RAX
MOV RSI,qword ptr [RBP + -0x220]
MOV RCX,qword ptr [RBP + -0x228]
ADD RSI,RCX
MOV EDX,0x200
SUB RDX,RAX
CALL 0x0024d360
MOV RAX,qword ptr [RBP + -0x218]
MOV qword ptr [RBP + -0x238],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001e837c
MOV RAX,qword ptr [RBP + -0x238]
ADD RSP,0x240
POP RBP
RET
LAB_001e837c:
CALL 0x0012a260
|
int1 * intern_filename(int1 *param_1,int1 *param_2)
{
long in_FS_OFFSET;
long local_238;
long local_230;
int1 *local_228;
int1 *local_220;
int1 local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_228 = param_2;
local_220 = param_1;
if (param_2 == param_1) {
strnmov(local_218,param_2,0x200);
local_228 = local_218;
}
local_230 = dirname_part(local_220,local_228,&local_238);
strnmov(local_220 + local_238,local_228 + local_230,0x200 - local_238);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_220;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
Subsets and Splits
C++ Functions Using STL
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ STL Function Queries
Filters C++ code examples that use standard library containers and algorithms, helping identify common programming patterns and library usage in code generation tasks.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.