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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
29,800 | common_chat_templates_from_model(llama_model const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/common.cpp | common_chat_templates common_chat_templates_from_model(const struct llama_model * model, const std::string & chat_template_override)
{
auto vocab = llama_model_get_vocab(model);
std::string default_template_src = chat_template_override;
std::string template_tool_use_src = chat_template_override;
bool has_explicit_template = !chat_template_override.empty();
if (chat_template_override.empty()) {
auto str = llama_model_chat_template(model, /* name */ nullptr);
if (str) {
default_template_src = str;
has_explicit_template = true;
}
str = llama_model_chat_template(model, /* name */ "tool_use");
if (str) {
template_tool_use_src = str;
has_explicit_template = true;
}
}
if (default_template_src.empty() || default_template_src == "chatml") {
if (!template_tool_use_src.empty()) {
default_template_src = template_tool_use_src;
} else {
default_template_src = R"(
{%- for message in messages -%}
{{- "<|im_start|>" + message.role + "\n" + message.content + "<|im_end|>\n" -}}
{%- endfor -%}
{%- if add_generation_prompt -%}
{{- "<|im_start|>assistant\n" -}}
{%- endif -%}
)";
}
}
const auto get_token = [&](llama_token token, const char * name, const char * jinja_variable_name) {
if (token == LLAMA_TOKEN_NULL) {
if (default_template_src.find(jinja_variable_name) != std::string::npos
|| template_tool_use_src.find(jinja_variable_name) != std::string::npos) {
LOG_WRN("%s: warning: vocab does not have a %s token, jinja template won't work as intended.\n", __func__, name);
}
return std::string();
} else {
return common_token_to_piece(vocab, token, true);
}
};
auto token_bos = get_token(llama_vocab_bos(vocab), "BOS", "bos_token");
auto token_eos = get_token(llama_vocab_eos(vocab), "EOS", "eos_token");
return {
has_explicit_template,
std::make_unique<minja::chat_template>(default_template_src, token_bos, token_eos),
template_tool_use_src.empty()
? nullptr
: std::make_unique<minja::chat_template>(template_tool_use_src, token_bos, token_eos)
};
} | O2 | cpp | common_chat_templates_from_model(llama_model 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 $0xa8, %rsp
movq %rdx, %rbp
movq %rsi, %r13
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x20d60
movq %rax, %r14
movq %rax, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
movq %rbp, %rsi
callq 0x20910
leaq 0x30(%rsp), %r12
movq %r12, %rdi
movq %rbp, %rsi
callq 0x20910
movb $0x1, %r15b
cmpq $0x0, 0x8(%rbp)
jne 0x277fe
movq %r13, %rdi
xorl %esi, %esi
callq 0x20310
testq %rax, %rax
setne %r15b
je 0x277da
leaq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x20ce0
leaq 0x674fa(%rip), %rsi # 0x8ecdb
movq %r13, %rdi
callq 0x20310
testq %rax, %rax
je 0x277fe
leaq 0x30(%rsp), %rdi
movq %rax, %rsi
callq 0x20ce0
movb $0x1, %r15b
cmpq $0x0, 0x18(%rsp)
je 0x2781b
leaq 0x674d7(%rip), %rsi # 0x8ece4
leaq 0x10(%rsp), %rdi
callq 0x2300f
testb %al, %al
je 0x27845
cmpq $0x0, 0x38(%rsp)
je 0x27834
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x203e0
jmp 0x27845
leaq 0x674b0(%rip), %rsi # 0x8eceb
leaq 0x10(%rsp), %rdi
callq 0x20ce0
leaq 0x10(%rsp), %rax
movq %rax, 0x50(%rsp)
movq %r12, 0x58(%rsp)
leaq 0x8(%rsp), %rax
movq %rax, 0x60(%rsp)
movq %r14, %rdi
callq 0x205d0
leaq 0x675c4(%rip), %rcx # 0x8ee31
leaq 0x675c1(%rip), %r8 # 0x8ee35
leaq 0x88(%rsp), %rdi
leaq 0x50(%rsp), %rsi
movl %eax, %edx
callq 0x27992
movq 0x8(%rsp), %rdi
callq 0x20080
leaq 0x675a6(%rip), %rcx # 0x8ee3f
leaq 0x675a3(%rip), %r8 # 0x8ee43
leaq 0x68(%rsp), %rdi
leaq 0x50(%rsp), %rsi
movl %eax, %edx
callq 0x27992
movb %r15b, (%rbx)
leaq 0x8(%rbx), %r14
leaq 0x10(%rsp), %rsi
leaq 0x88(%rsp), %rdx
leaq 0x68(%rsp), %rcx
movq %r14, %rdi
callq 0x2cb3e
leaq 0x10(%rbx), %rdi
cmpq $0x0, 0x38(%rsp)
je 0x278f7
leaq 0x30(%rsp), %rsi
leaq 0x88(%rsp), %rdx
leaq 0x68(%rsp), %rcx
callq 0x2cb3e
jmp 0x278fb
andq $0x0, (%rdi)
leaq 0x68(%rsp), %rdi
callq 0x20d88
leaq 0x88(%rsp), %rdi
callq 0x20d88
leaq 0x30(%rsp), %rdi
callq 0x20d88
leaq 0x10(%rsp), %rdi
callq 0x20d88
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r14, %rdi
callq 0x2cb9a
jmp 0x2794d
jmp 0x27972
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x20d88
jmp 0x27963
movq %rax, %rbx
jmp 0x2797f
jmp 0x27972
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x20d88
jmp 0x27975
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x20d88
leaq 0x10(%rsp), %rdi
callq 0x20d88
movq %rbx, %rdi
callq 0x20b90
nop
| _Z32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A8h
mov rbp, rdx
mov r13, rsi
mov rbx, rdi
mov rdi, rsi
call _llama_model_get_vocab
mov r14, rax
mov [rsp+0D8h+var_D0], rax
lea rdi, [rsp+0D8h+var_C8]
mov rsi, rbp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
lea r12, [rsp+0D8h+var_A8]
mov rdi, r12
mov rsi, rbp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&)
mov r15b, 1
cmp qword ptr [rbp+8], 0
jnz short loc_277FE
mov rdi, r13
xor esi, esi
call _llama_model_chat_template
test rax, rax
setnz r15b
jz short loc_277DA
lea rdi, [rsp+0D8h+var_C8]
mov rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*)
loc_277DA:
lea rsi, aToolUse; "tool_use"
mov rdi, r13
call _llama_model_chat_template
test rax, rax
jz short loc_277FE
lea rdi, [rsp+0D8h+var_A8]
mov rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*)
mov r15b, 1
loc_277FE:
cmp [rsp+0D8h+var_C0], 0
jz short loc_2781B
lea rsi, aChatml; "chatml"
lea rdi, [rsp+0D8h+var_C8]
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_27845
loc_2781B:
cmp [rsp+0D8h+var_A0], 0
jz short loc_27834
lea rdi, [rsp+0D8h+var_C8]
lea rsi, [rsp+0D8h+var_A8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
jmp short loc_27845
loc_27834:
lea rsi, aForMessageInMe; "\n {%- for message in me"...
lea rdi, [rsp+0D8h+var_C8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*)
loc_27845:
lea rax, [rsp+0D8h+var_C8]
mov [rsp+0D8h+var_88], rax
mov [rsp+0D8h+var_80], r12
lea rax, [rsp+0D8h+var_D0]
mov [rsp+0D8h+var_78], rax
mov rdi, r14
call _llama_vocab_bos
lea rcx, aBos; "BOS"
lea r8, aBosToken; "bos_token"
lea rdi, [rsp+0D8h+var_50]; void *
lea rsi, [rsp+0D8h+var_88]
mov edx, eax
call _ZZ32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clB5cxx11EiPKcSC_; common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()(int,char const*,char const*)
mov rdi, [rsp+0D8h+var_D0]
call _llama_vocab_eos
lea rcx, aEos; "EOS"
lea r8, aEosToken; "eos_token"
lea rdi, [rsp+0D8h+var_70]; void *
lea rsi, [rsp+0D8h+var_88]
mov edx, eax
call _ZZ32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clB5cxx11EiPKcSC_; common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()(int,char const*,char const*)
mov [rbx], r15b
lea r14, [rbx+8]
lea rsi, [rsp+0D8h+var_C8]
lea rdx, [rsp+0D8h+var_50]
lea rcx, [rsp+0D8h+var_70]
mov rdi, r14
call _ZSt11make_uniqueIN5minja13chat_templateEJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_EENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<minja::chat_template,std::string &,std::string &,std::string &>(std::string &,std::string &,std::string &)
lea rdi, [rbx+10h]
cmp [rsp+0D8h+var_A0], 0
jz short loc_278F7
lea rsi, [rsp+0D8h+var_A8]
lea rdx, [rsp+0D8h+var_50]
lea rcx, [rsp+0D8h+var_70]
call _ZSt11make_uniqueIN5minja13chat_templateEJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_EENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<minja::chat_template,std::string &,std::string &,std::string &>(std::string &,std::string &,std::string &)
jmp short loc_278FB
loc_278F7:
and qword ptr [rdi], 0
loc_278FB:
lea rdi, [rsp+0D8h+var_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0D8h+var_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0D8h+var_A8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0D8h+var_C8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, rbx
add rsp, 0A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, r14
call _ZNSt10unique_ptrIN5minja13chat_templateESt14default_deleteIS1_EED2Ev; std::unique_ptr<minja::chat_template>::~unique_ptr()
jmp short loc_2794D
jmp short loc_27972
mov rbx, rax
loc_2794D:
lea rdi, [rsp+arg_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_27963
mov rbx, rax
jmp short loc_2797F
jmp short loc_27972
mov rbx, rax
loc_27963:
lea rdi, [rsp+arg_80]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_27975
loc_27972:
mov rbx, rax
loc_27975:
lea rdi, [rsp+arg_28]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_2797F:
lea rdi, [rsp+arg_8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
| bool * common_chat_templates_from_model(bool *a1, long long a2, long long a3)
{
long long vocab; // r14
bool v6; // r15
const char *v7; // rax
const char *v8; // rax
_QWORD *v9; // rdi
long long v11; // [rsp+8h] [rbp-D0h] BYREF
char v12[8]; // [rsp+10h] [rbp-C8h] BYREF
long long v13; // [rsp+18h] [rbp-C0h]
char v14[8]; // [rsp+30h] [rbp-A8h] BYREF
long long v15; // [rsp+38h] [rbp-A0h]
char *v16; // [rsp+50h] [rbp-88h]
char *v17; // [rsp+58h] [rbp-80h]
long long *v18; // [rsp+60h] [rbp-78h]
_BYTE v19[32]; // [rsp+68h] [rbp-70h] BYREF
_BYTE v20[80]; // [rsp+88h] [rbp-50h] BYREF
vocab = llama_model_get_vocab(a2);
v11 = vocab;
std::string::basic_string(v12, a3);
std::string::basic_string(v14, a3);
v6 = 1;
if ( !*(_QWORD *)(a3 + 8) )
{
v7 = (const char *)llama_model_chat_template(a2, 0LL);
v6 = v7 != 0LL;
if ( v7 )
std::string::assign(v12, v7);
v8 = (const char *)llama_model_chat_template(a2, "tool_use");
if ( v8 )
{
std::string::assign(v14, v8);
v6 = 1;
}
}
if ( !v13 || std::operator==<char>((long long)v12) )
{
if ( v15 )
std::string::_M_assign(v12, v14);
else
std::string::assign(
v12,
"\n"
" {%- for message in messages -%}\n"
" {{- \"<|im_start|>\" + message.role + \"\\n\" + message.content + \"<|im_end|>\\n\" -}}\n"
" {%- endfor -%}\n"
" {%- if add_generation_prompt -%}\n"
" {{- \"<|im_start|>assistant\\n\" -}}\n"
" {%- endif -%}\n"
" ");
}
v16 = v12;
v17 = v14;
v18 = &v11;
llama_vocab_bos(vocab);
common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()[abi:cxx11](v20);
llama_vocab_eos(v11);
common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()[abi:cxx11](v19);
*a1 = v6;
std::make_unique<minja::chat_template,std::string &,std::string &,std::string &>(a1 + 8, v12, v20, v19);
v9 = a1 + 16;
if ( v15 )
std::make_unique<minja::chat_template,std::string &,std::string &,std::string &>(v9, v14, v20, v19);
else
*v9 = 0LL;
std::string::~string(v19);
std::string::~string(v20);
std::string::~string(v14);
std::string::~string(v12);
return a1;
}
| common_chat_templates_from_model:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xa8
MOV RBP,RDX
MOV R13,RSI
MOV RBX,RDI
MOV RDI,RSI
CALL 0x00120d60
MOV R14,RAX
MOV qword ptr [RSP + 0x8],RAX
LEA RDI,[RSP + 0x10]
MOV RSI,RBP
CALL 0x00120910
LAB_001277a0:
LEA R12,[RSP + 0x30]
MOV RDI,R12
MOV RSI,RBP
CALL 0x00120910
MOV R15B,0x1
CMP qword ptr [RBP + 0x8],0x0
JNZ 0x001277fe
LAB_001277ba:
MOV RDI,R13
XOR ESI,ESI
CALL 0x00120310
TEST RAX,RAX
SETNZ R15B
JZ 0x001277da
LEA RDI,[RSP + 0x10]
MOV RSI,RAX
CALL 0x00120ce0
LAB_001277da:
LEA RSI,[0x18ecdb]
MOV RDI,R13
CALL 0x00120310
TEST RAX,RAX
JZ 0x001277fe
LEA RDI,[RSP + 0x30]
MOV RSI,RAX
CALL 0x00120ce0
MOV R15B,0x1
LAB_001277fe:
CMP qword ptr [RSP + 0x18],0x0
JZ 0x0012781b
LEA RSI,[0x18ece4]
LEA RDI,[RSP + 0x10]
CALL 0x0012300f
TEST AL,AL
JZ 0x00127845
LAB_0012781b:
CMP qword ptr [RSP + 0x38],0x0
JZ 0x00127834
LAB_00127823:
LEA RDI,[RSP + 0x10]
LEA RSI,[RSP + 0x30]
CALL 0x001203e0
JMP 0x00127845
LAB_00127834:
LEA RSI,[0x18eceb]
LEA RDI,[RSP + 0x10]
CALL 0x00120ce0
LAB_00127845:
LEA RAX,[RSP + 0x10]
MOV qword ptr [RSP + 0x50],RAX
MOV qword ptr [RSP + 0x58],R12
LEA RAX,[RSP + 0x8]
MOV qword ptr [RSP + 0x60],RAX
LAB_0012785e:
MOV RDI,R14
CALL 0x001205d0
LEA RCX,[0x18ee31]
LEA R8,[0x18ee35]
LEA RDI,[RSP + 0x88]
LEA RSI,[RSP + 0x50]
MOV EDX,EAX
CALL 0x00127992
MOV RDI,qword ptr [RSP + 0x8]
LAB_0012788d:
CALL 0x00120080
LEA RCX,[0x18ee3f]
LEA R8,[0x18ee43]
LEA RDI,[RSP + 0x68]
LEA RSI,[RSP + 0x50]
MOV EDX,EAX
CALL 0x00127992
MOV byte ptr [RBX],R15B
LEA R14,[RBX + 0x8]
LAB_001278b8:
LEA RSI,[RSP + 0x10]
LEA RDX,[RSP + 0x88]
LEA RCX,[RSP + 0x68]
MOV RDI,R14
CALL 0x0012cb3e
LEA RDI,[RBX + 0x10]
CMP qword ptr [RSP + 0x38],0x0
JZ 0x001278f7
LAB_001278de:
LEA RSI,[RSP + 0x30]
LEA RDX,[RSP + 0x88]
LEA RCX,[RSP + 0x68]
CALL 0x0012cb3e
LAB_001278f5:
JMP 0x001278fb
LAB_001278f7:
AND qword ptr [RDI],0x0
LAB_001278fb:
LEA RDI,[RSP + 0x68]
CALL 0x00120d88
LEA RDI,[RSP + 0x88]
CALL 0x00120d88
LEA RDI,[RSP + 0x30]
CALL 0x00120d88
LEA RDI,[RSP + 0x10]
CALL 0x00120d88
MOV RAX,RBX
ADD RSP,0xa8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_chat_templates_from_model(llama_model const*, std::__cxx11::string const&) */
llama_model * common_chat_templates_from_model(llama_model *param_1,string *param_2)
{
bool bVar1;
uint uVar2;
int8 uVar3;
long lVar4;
string *in_RDX;
llama_model lVar5;
int8 local_d0;
string local_c8 [8];
long local_c0;
string local_a8 [8];
long local_a0;
string *local_88;
string *local_80;
int8 *local_78;
string local_70 [32];
string local_50 [32];
uVar3 = llama_model_get_vocab(param_2);
local_d0 = uVar3;
std::__cxx11::string::string(local_c8,in_RDX);
/* try { // try from 001277a0 to 001277af has its CatchHandler @ 00127959 */
std::__cxx11::string::string(local_a8,in_RDX);
lVar5 = (llama_model)0x1;
if (*(long *)(in_RDX + 8) == 0) {
/* try { // try from 001277ba to 001277fa has its CatchHandler @ 0012795e */
lVar4 = llama_model_chat_template(param_2,0);
lVar5 = (llama_model)(lVar4 != 0);
if ((bool)lVar5) {
std::__cxx11::string::assign((char *)local_c8);
}
lVar4 = llama_model_chat_template(param_2,"tool_use");
if (lVar4 != 0) {
std::__cxx11::string::assign((char *)local_a8);
lVar5 = (llama_model)0x1;
}
}
if (local_c0 != 0) {
bVar1 = std::operator==(local_c8,"chatml");
if (!bVar1) goto LAB_00127845;
}
if (local_a0 == 0) {
std::__cxx11::string::assign((char *)local_c8);
}
else {
/* try { // try from 00127823 to 00127844 has its CatchHandler @ 00127948 */
std::__cxx11::string::_M_assign(local_c8);
}
LAB_00127845:
local_88 = local_c8;
local_78 = &local_d0;
local_80 = local_a8;
/* try { // try from 0012785e to 00127887 has its CatchHandler @ 00127972 */
uVar2 = llama_vocab_bos(uVar3);
common_chat_templates_from_model(llama_model_const*,std::__cxx11::string_const&)::$_0::
operator()[abi_cxx11_((int)local_50,(char *)&local_88,(char *)(ulong)uVar2);
/* try { // try from 0012788d to 001278b0 has its CatchHandler @ 00127960 */
uVar2 = llama_vocab_eos(local_d0);
common_chat_templates_from_model(llama_model_const*,std::__cxx11::string_const&)::$_0::
operator()[abi_cxx11_((int)local_70,(char *)&local_88,(char *)(ulong)uVar2);
*param_1 = lVar5;
/* try { // try from 001278b8 to 001278d1 has its CatchHandler @ 0012794a */
std::
make_unique<minja::chat_template,std::__cxx11::string&,std::__cxx11::string&,std::__cxx11::string&>
((string *)(param_1 + 8),local_c8,local_50);
if (local_a0 == 0) {
*(int8 *)(param_1 + 0x10) = 0;
}
else {
/* try { // try from 001278de to 001278f4 has its CatchHandler @ 0012793b */
std::
make_unique<minja::chat_template,std::__cxx11::string&,std::__cxx11::string&,std::__cxx11::string&>
((string *)(param_1 + 0x10),local_a8,local_50);
}
std::__cxx11::string::~string(local_70);
std::__cxx11::string::~string(local_50);
std::__cxx11::string::~string(local_a8);
std::__cxx11::string::~string(local_c8);
return param_1;
}
| |
29,801 | write_dynamic_record | eloqsql/storage/maria/ma_dynrec.c | static my_bool write_dynamic_record(MARIA_HA *info, const uchar *record,
ulong reclength)
{
int flag;
ulong length;
my_off_t filepos;
DBUG_ENTER("write_dynamic_record");
flag=0;
/*
Check if we have enough room for the new record.
First we do simplified check to make usual case faster.
Then we do more precise check for the space left.
Though it still is not absolutely precise, as
we always use MARIA_MAX_DYN_BLOCK_HEADER while it can be
less in the most of the cases.
*/
if (unlikely(info->s->base.max_data_file_length -
info->state->data_file_length <
reclength + MARIA_MAX_DYN_BLOCK_HEADER))
{
if (info->s->base.max_data_file_length - info->state->data_file_length +
info->state->empty - info->state->del * MARIA_MAX_DYN_BLOCK_HEADER <
reclength + MARIA_MAX_DYN_BLOCK_HEADER)
{
my_errno=HA_ERR_RECORD_FILE_FULL;
DBUG_RETURN(1);
}
}
do
{
if (_ma_find_writepos(info,reclength,&filepos,&length))
goto err;
if (_ma_write_part_record(info,filepos,length,
(info->append_insert_at_end ?
HA_OFFSET_ERROR : info->s->state.dellink),
(uchar**) &record,&reclength,&flag))
goto err;
} while (reclength);
DBUG_RETURN(0);
err:
DBUG_RETURN(1);
} | O3 | c | write_dynamic_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq %rsi, -0x50(%rbp)
movq %rdx, -0x38(%rbp)
movl $0x0, -0x2c(%rbp)
movq (%rdi), %rax
movq 0x20(%rdi), %rsi
movq 0x368(%rax), %rax
subq 0x28(%rsi), %rax
leaq 0x14(%rdx), %rcx
cmpq %rcx, %rax
jb 0x4823a
leaq -0x48(%rbp), %r15
leaq -0x50(%rbp), %r12
leaq -0x38(%rbp), %r13
movq %rbx, %rdi
movq %rdx, %rsi
leaq -0x40(%rbp), %rdx
movq %r15, %rcx
callq 0x4add9
movb $0x1, %r14b
testl %eax, %eax
jne 0x48228
movq $-0x1, %rcx
cmpb $0x0, 0x681(%rbx)
jne 0x481fa
movq (%rbx), %rax
movq 0xc8(%rax), %rcx
movq -0x40(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x2c(%rbp), %rax
movq %rax, (%rsp)
movq %rbx, %rdi
movq %r12, %r8
movq %r13, %r9
callq 0x48b3e
testl %eax, %eax
jne 0x48228
movq -0x38(%rbp), %rdx
testq %rdx, %rdx
jne 0x481c7
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq 0x10(%rsi), %rax
movq 0x8(%rsi), %rsi
shlq $0x2, %rsi
leaq (%rsi,%rsi,4), %rsi
subq %rsi, %rax
cmpq %rcx, %rax
jae 0x481bb
callq 0xac2be
movl $0x87, (%rax)
movb $0x1, %r14b
jmp 0x48228
| write_dynamic_record:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, rdi
mov [rbp+var_50], rsi
mov [rbp+var_38], rdx
mov [rbp+var_2C], 0
mov rax, [rdi]
mov rsi, [rdi+20h]
mov rax, [rax+368h]
sub rax, [rsi+28h]
lea rcx, [rdx+14h]
cmp rax, rcx
jb short loc_4823A
loc_481BB:
lea r15, [rbp+var_48]
lea r12, [rbp+var_50]
lea r13, [rbp+var_38]
loc_481C7:
mov rdi, rbx
mov rsi, rdx
lea rdx, [rbp+var_40]
mov rcx, r15
call _ma_find_writepos
mov r14b, 1
test eax, eax
jnz short loc_48228
mov rcx, 0FFFFFFFFFFFFFFFFh
cmp byte ptr [rbx+681h], 0
jnz short loc_481FA
mov rax, [rbx]
mov rcx, [rax+0C8h]
loc_481FA:
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_48]
lea rax, [rbp+var_2C]
mov [rsp+60h+var_60], rax
mov rdi, rbx
mov r8, r12
mov r9, r13
call _ma_write_part_record
test eax, eax
jnz short loc_48228
mov rdx, [rbp+var_38]
test rdx, rdx
jnz short loc_481C7
xor r14d, r14d
loc_48228:
mov eax, r14d
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4823A:
add rax, [rsi+10h]
mov rsi, [rsi+8]
shl rsi, 2
lea rsi, [rsi+rsi*4]
sub rax, rsi
cmp rax, rcx
jnb loc_481BB
call _my_thread_var
mov dword ptr [rax], 87h
mov r14b, 1
jmp short loc_48228
| long long write_dynamic_record(_BYTE *a1, long long a2, long long a3)
{
unsigned int v3; // r14d
_QWORD *v4; // rsi
unsigned long long v5; // rax
long long v6; // rcx
long long v8; // [rsp+10h] [rbp-50h] BYREF
long long v9; // [rsp+18h] [rbp-48h] BYREF
long long v10; // [rsp+20h] [rbp-40h] BYREF
long long v11; // [rsp+28h] [rbp-38h] BYREF
_DWORD v12[11]; // [rsp+34h] [rbp-2Ch] BYREF
v8 = a2;
v11 = a3;
v12[0] = 0;
v4 = (_QWORD *)*((_QWORD *)a1 + 4);
v5 = *(_QWORD *)(*(_QWORD *)a1 + 872LL) - v4[5];
if ( v5 >= a3 + 20 || v4[2] + v5 - 20LL * v4[1] >= a3 + 20 )
{
while ( 1 )
{
LOBYTE(v3) = 1;
if ( (unsigned int)ma_find_writepos(a1, a3, &v10, &v9) )
break;
LODWORD(v6) = -1;
if ( !a1[1665] )
v6 = *(_QWORD *)(*(_QWORD *)a1 + 200LL);
if ( (unsigned int)ma_write_part_record(
(_DWORD)a1,
v10,
v9,
v6,
(unsigned int)&v8,
(unsigned int)&v11,
(long long)v12) )
break;
a3 = v11;
if ( !v11 )
return 0;
}
}
else
{
*(_DWORD *)my_thread_var(a1) = 135;
LOBYTE(v3) = 1;
}
return v3;
}
| write_dynamic_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,RDI
MOV qword ptr [RBP + -0x50],RSI
MOV qword ptr [RBP + -0x38],RDX
MOV dword ptr [RBP + -0x2c],0x0
MOV RAX,qword ptr [RDI]
MOV RSI,qword ptr [RDI + 0x20]
MOV RAX,qword ptr [RAX + 0x368]
SUB RAX,qword ptr [RSI + 0x28]
LEA RCX,[RDX + 0x14]
CMP RAX,RCX
JC 0x0014823a
LAB_001481bb:
LEA R15,[RBP + -0x48]
LEA R12,[RBP + -0x50]
LEA R13,[RBP + -0x38]
LAB_001481c7:
MOV RDI,RBX
MOV RSI,RDX
LEA RDX,[RBP + -0x40]
MOV RCX,R15
CALL 0x0014add9
MOV R14B,0x1
TEST EAX,EAX
JNZ 0x00148228
MOV RCX,-0x1
CMP byte ptr [RBX + 0x681],0x0
JNZ 0x001481fa
MOV RAX,qword ptr [RBX]
MOV RCX,qword ptr [RAX + 0xc8]
LAB_001481fa:
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x48]
LEA RAX,[RBP + -0x2c]
MOV qword ptr [RSP],RAX
MOV RDI,RBX
MOV R8,R12
MOV R9,R13
CALL 0x00148b3e
TEST EAX,EAX
JNZ 0x00148228
MOV RDX,qword ptr [RBP + -0x38]
TEST RDX,RDX
JNZ 0x001481c7
XOR R14D,R14D
LAB_00148228:
MOV EAX,R14D
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014823a:
ADD RAX,qword ptr [RSI + 0x10]
MOV RSI,qword ptr [RSI + 0x8]
SHL RSI,0x2
LEA RSI,[RSI + RSI*0x4]
SUB RAX,RSI
CMP RAX,RCX
JNC 0x001481bb
CALL 0x001ac2be
MOV dword ptr [RAX],0x87
MOV R14B,0x1
JMP 0x00148228
|
ulong write_dynamic_record(long *param_1,int8 param_2,long param_3)
{
long lVar1;
int iVar2;
ulong uVar3;
int4 *puVar4;
int8 uVar5;
ulong unaff_R14;
int8 local_58;
int8 local_50;
int8 local_48;
long local_40;
int4 local_34;
local_34 = 0;
lVar1 = param_1[4];
uVar3 = *(long *)(*param_1 + 0x368) - *(long *)(lVar1 + 0x28);
local_58 = param_2;
local_40 = param_3;
if ((uVar3 < param_3 + 0x14U) &&
(uVar3 + *(long *)(lVar1 + 0x10) + *(long *)(lVar1 + 8) * -0x14 < param_3 + 0x14U)) {
puVar4 = (int4 *)_my_thread_var();
*puVar4 = 0x87;
unaff_R14 = CONCAT71((int7)(unaff_R14 >> 8),1);
}
else {
do {
iVar2 = _ma_find_writepos(param_1,local_40,&local_48,&local_50);
unaff_R14 = CONCAT71((int7)(unaff_R14 >> 8),1);
if (iVar2 != 0) goto LAB_00148228;
uVar5 = 0xffffffffffffffff;
if (*(char *)((long)param_1 + 0x681) == '\0') {
uVar5 = *(int8 *)(*param_1 + 200);
}
iVar2 = _ma_write_part_record(param_1,local_48,local_50,uVar5,&local_58,&local_40,&local_34);
if (iVar2 != 0) goto LAB_00148228;
} while (local_40 != 0);
unaff_R14 = 0;
}
LAB_00148228:
return unaff_R14 & 0xffffffff;
}
| |
29,802 | common_embd_normalize(float const*, float*, int, int) | monkey531[P]llama/common/common.cpp | void common_embd_normalize(const float * inp, float * out, int n, int embd_norm) {
double sum = 0.0;
switch (embd_norm) {
case -1: // no normalisation
sum = 1.0;
break;
case 0: // max absolute
for (int i = 0; i < n; i++) {
if (sum < std::abs(inp[i])) {
sum = std::abs(inp[i]);
}
}
sum /= 32760.0; // make an int16 range
break;
case 2: // euclidean
for (int i = 0; i < n; i++) {
sum += inp[i] * inp[i];
}
sum = std::sqrt(sum);
break;
default: // p-norm (euclidean is p-norm p=2)
for (int i = 0; i < n; i++) {
sum += std::pow(std::abs(inp[i]), embd_norm);
}
sum = std::pow(sum, 1.0 / embd_norm);
break;
}
const float norm = sum > 0.0 ? 1.0 / sum : 0.0f;
for (int i = 0; i < n; i++) {
out[i] = inp[i] * norm;
}
} | O3 | cpp | common_embd_normalize(float const*, float*, int, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movsd 0x7757c(%rip), %xmm3 # 0xee8b0
movapd %xmm3, %xmm0
cmpl $-0x1, %ecx
je 0x77449
testl %ecx, %ecx
je 0x77387
cmpl $0x2, %ecx
jne 0x773bd
xorpd %xmm1, %xmm1
xorpd %xmm0, %xmm0
testl %ebp, %ebp
jle 0x77374
movl %ebp, %eax
xorl %ecx, %ecx
movss (%r14,%rcx,4), %xmm2
mulss %xmm2, %xmm2
cvtss2sd %xmm2, %xmm2
addsd %xmm2, %xmm0
incq %rcx
cmpq %rcx, %rax
jne 0x7735a
ucomisd %xmm1, %xmm0
jb 0x77417
sqrtsd %xmm0, %xmm0
jmp 0x77449
testl %ebp, %ebp
jle 0x7741e
movl %ebp, %eax
xorpd %xmm2, %xmm2
xorl %ecx, %ecx
movaps 0x774c2(%rip), %xmm1 # 0xee860
movss (%r14,%rcx,4), %xmm0
andps %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
maxsd %xmm2, %xmm0
incq %rcx
movapd %xmm0, %xmm2
cmpq %rcx, %rax
jne 0x7739e
jmp 0x77422
cvtsi2sd %ecx, %xmm2
testl %ebp, %ebp
jle 0x7742c
movl %ebp, %r15d
xorpd %xmm0, %xmm0
xorl %r12d, %r12d
movsd %xmm2, 0x8(%rsp)
movsd %xmm0, (%rsp)
movss (%r14,%r12,4), %xmm0
andps 0x77479(%rip), %xmm0 # 0xee860
cvtss2sd %xmm0, %xmm0
movapd %xmm2, %xmm1
callq 0x1af90
movsd 0x8(%rsp), %xmm2
movsd (%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movsd (%rsp), %xmm0
incq %r12
cmpq %r12, %r15
jne 0x773d5
jmp 0x77430
callq 0x1a720
jmp 0x77441
xorpd %xmm0, %xmm0
divsd 0x7748e(%rip), %xmm0 # 0xee8b8
jmp 0x77449
xorpd %xmm0, %xmm0
movsd 0x77478(%rip), %xmm1 # 0xee8b0
divsd %xmm2, %xmm1
callq 0x1af90
movsd 0x77467(%rip), %xmm3 # 0xee8b0
testl %ebp, %ebp
jle 0x7747f
divsd %xmm0, %xmm3
xorps %xmm1, %xmm1
cmpltsd %xmm0, %xmm1
andpd %xmm3, %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
movl %ebp, %eax
xorl %ecx, %ecx
movss (%r14,%rcx,4), %xmm1
mulss %xmm0, %xmm1
movss %xmm1, (%rbx,%rcx,4)
incq %rcx
cmpq %rcx, %rax
jne 0x77468
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| _Z21common_embd_normalizePKfPfii:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov ebp, edx
mov rbx, rsi
mov r14, rdi
movsd xmm3, cs:qword_EE8B0
movapd xmm0, xmm3
cmp ecx, 0FFFFFFFFh
jz loc_77449
test ecx, ecx
jz short loc_77387
cmp ecx, 2
jnz short loc_773BD
xorpd xmm1, xmm1
xorpd xmm0, xmm0
test ebp, ebp
jle short loc_77374
mov eax, ebp
xor ecx, ecx
loc_7735A:
movss xmm2, dword ptr [r14+rcx*4]
mulss xmm2, xmm2
cvtss2sd xmm2, xmm2
addsd xmm0, xmm2
inc rcx
cmp rax, rcx
jnz short loc_7735A
loc_77374:
ucomisd xmm0, xmm1
jb loc_77417
sqrtsd xmm0, xmm0
jmp loc_77449
loc_77387:
test ebp, ebp
jle loc_7741E
mov eax, ebp
xorpd xmm2, xmm2
xor ecx, ecx
movaps xmm1, cs:xmmword_EE860
loc_7739E:
movss xmm0, dword ptr [r14+rcx*4]
andps xmm0, xmm1
cvtss2sd xmm0, xmm0
maxsd xmm0, xmm2
inc rcx
movapd xmm2, xmm0
cmp rax, rcx
jnz short loc_7739E
jmp short loc_77422
loc_773BD:
cvtsi2sd xmm2, ecx
test ebp, ebp
jle short loc_7742C
mov r15d, ebp
xorpd xmm0, xmm0
xor r12d, r12d
movsd [rsp+38h+var_30], xmm2
loc_773D5:
movsd [rsp+38h+var_38], xmm0
movss xmm0, dword ptr [r14+r12*4]
andps xmm0, cs:xmmword_EE860
cvtss2sd xmm0, xmm0
movapd xmm1, xmm2
call _pow
movsd xmm2, [rsp+38h+var_30]
movsd xmm1, [rsp+38h+var_38]
addsd xmm1, xmm0
movsd [rsp+38h+var_38], xmm1
movsd xmm0, [rsp+38h+var_38]
inc r12
cmp r15, r12
jnz short loc_773D5
jmp short loc_77430
loc_77417:
call _sqrt
jmp short loc_77441
loc_7741E:
xorpd xmm0, xmm0
loc_77422:
divsd xmm0, cs:qword_EE8B8
jmp short loc_77449
loc_7742C:
xorpd xmm0, xmm0
loc_77430:
movsd xmm1, cs:qword_EE8B0
divsd xmm1, xmm2
call _pow
loc_77441:
movsd xmm3, cs:qword_EE8B0
loc_77449:
test ebp, ebp
jle short loc_7747F
divsd xmm3, xmm0
xorps xmm1, xmm1
cmpltsd xmm1, xmm0
andpd xmm1, xmm3
xorps xmm0, xmm0
cvtsd2ss xmm0, xmm1
mov eax, ebp
xor ecx, ecx
loc_77468:
movss xmm1, dword ptr [r14+rcx*4]
mulss xmm1, xmm0
movss dword ptr [rbx+rcx*4], xmm1
inc rcx
cmp rax, rcx
jnz short loc_77468
loc_7747F:
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| void common_embd_normalize(const float *a1, float *a2, int a3, int a4)
{
__m128d v5; // xmm0
double v6; // xmm0_8
long long i; // rcx
double v8; // xmm2_8
long long v9; // rcx
double v10; // xmm0_8
double v11; // xmm2_8
double v12; // xmm0_8
long long v13; // r12
double v14; // xmm0_8
float v15; // xmm0_4
long long v16; // rcx
double v17; // [rsp+0h] [rbp-38h]
double v18; // [rsp+8h] [rbp-30h]
v5.m128d_f64[0] = 1.0;
if ( a4 != -1 )
{
if ( a4 )
{
if ( a4 == 2 )
{
v6 = 0.0;
if ( a3 > 0 )
{
for ( i = 0LL; i != a3; ++i )
v6 = v6 + (float)(a1[i] * a1[i]);
}
if ( v6 < 0.0 )
v5.m128d_f64[0] = sqrt(v6);
else
v5.m128d_f64[0] = sqrt(v6);
}
else
{
v11 = (double)a4;
if ( a3 <= 0 )
{
v12 = 0.0;
}
else
{
v12 = 0.0;
v13 = 0LL;
v18 = (double)a4;
do
{
v17 = v12;
v14 = pow(fabs(a1[v13]), v11);
v11 = v18;
v12 = v17 + v14;
++v13;
}
while ( a3 != v13 );
}
v5.m128d_f64[0] = pow(v12, 1.0 / v11);
}
}
else
{
if ( a3 <= 0 )
{
v10 = 0.0;
}
else
{
v8 = 0.0;
v9 = 0LL;
do
{
v10 = fmax(fabs(a1[v9++]), v8);
v8 = v10;
}
while ( a3 != v9 );
}
v5.m128d_f64[0] = v10 / 32760.0;
}
}
if ( a3 > 0 )
{
v15 = COERCE_DOUBLE(*(_OWORD *)&_mm_cmplt_sd((__m128d)0LL, v5) & COERCE_UNSIGNED_INT64(1.0 / v5.m128d_f64[0]));
v16 = 0LL;
do
{
a2[v16] = a1[v16] * v15;
++v16;
}
while ( a3 != v16 );
}
}
| common_embd_normalize:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV EBP,EDX
MOV RBX,RSI
MOV R14,RDI
MOVSD XMM3,qword ptr [0x001ee8b0]
MOVAPD XMM0,XMM3
CMP ECX,-0x1
JZ 0x00177449
TEST ECX,ECX
JZ 0x00177387
CMP ECX,0x2
JNZ 0x001773bd
XORPD XMM1,XMM1
XORPD XMM0,XMM0
TEST EBP,EBP
JLE 0x00177374
MOV EAX,EBP
XOR ECX,ECX
LAB_0017735a:
MOVSS XMM2,dword ptr [R14 + RCX*0x4]
MULSS XMM2,XMM2
CVTSS2SD XMM2,XMM2
ADDSD XMM0,XMM2
INC RCX
CMP RAX,RCX
JNZ 0x0017735a
LAB_00177374:
UCOMISD XMM0,XMM1
JC 0x00177417
SQRTSD XMM0,XMM0
JMP 0x00177449
LAB_00177387:
TEST EBP,EBP
JLE 0x0017741e
MOV EAX,EBP
XORPD XMM2,XMM2
XOR ECX,ECX
MOVAPS XMM1,xmmword ptr [0x001ee860]
LAB_0017739e:
MOVSS XMM0,dword ptr [R14 + RCX*0x4]
ANDPS XMM0,XMM1
CVTSS2SD XMM0,XMM0
MAXSD XMM0,XMM2
INC RCX
MOVAPD XMM2,XMM0
CMP RAX,RCX
JNZ 0x0017739e
JMP 0x00177422
LAB_001773bd:
CVTSI2SD XMM2,ECX
TEST EBP,EBP
JLE 0x0017742c
MOV R15D,EBP
XORPD XMM0,XMM0
XOR R12D,R12D
MOVSD qword ptr [RSP + 0x8],XMM2
LAB_001773d5:
MOVSD qword ptr [RSP],XMM0
MOVSS XMM0,dword ptr [R14 + R12*0x4]
ANDPS XMM0,xmmword ptr [0x001ee860]
CVTSS2SD XMM0,XMM0
MOVAPD XMM1,XMM2
CALL 0x0011af90
MOVSD XMM2,qword ptr [RSP + 0x8]
MOVSD XMM1,qword ptr [RSP]
ADDSD XMM1,XMM0
MOVSD qword ptr [RSP],XMM1
MOVSD XMM0,qword ptr [RSP]
INC R12
CMP R15,R12
JNZ 0x001773d5
JMP 0x00177430
LAB_00177417:
CALL 0x0011a720
JMP 0x00177441
LAB_0017741e:
XORPD XMM0,XMM0
LAB_00177422:
DIVSD XMM0,qword ptr [0x001ee8b8]
JMP 0x00177449
LAB_0017742c:
XORPD XMM0,XMM0
LAB_00177430:
MOVSD XMM1,qword ptr [0x001ee8b0]
DIVSD XMM1,XMM2
CALL 0x0011af90
LAB_00177441:
MOVSD XMM3,qword ptr [0x001ee8b0]
LAB_00177449:
TEST EBP,EBP
JLE 0x0017747f
DIVSD XMM3,XMM0
XORPS XMM1,XMM1
CMPLTSD XMM1,XMM0
ANDPD XMM1,XMM3
XORPS XMM0,XMM0
CVTSD2SS XMM0,XMM1
MOV EAX,EBP
XOR ECX,ECX
LAB_00177468:
MOVSS XMM1,dword ptr [R14 + RCX*0x4]
MULSS XMM1,XMM0
MOVSS dword ptr [RBX + RCX*0x4],XMM1
INC RCX
CMP RAX,RCX
JNZ 0x00177468
LAB_0017747f:
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* common_embd_normalize(float const*, float*, int, int) */
void common_embd_normalize(float *param_1,float *param_2,int param_3,int param_4)
{
ulong uVar1;
double dVar2;
double dVar3;
dVar2 = DAT_001ee8b0;
if (param_4 != -1) {
if (param_4 == 0) {
if (param_3 < 1) {
dVar2 = 0.0;
}
else {
uVar1 = 0;
dVar3 = 0.0;
do {
dVar2 = (double)(float)((uint)param_1[uVar1] & _DAT_001ee860);
if ((double)(float)((uint)param_1[uVar1] & _DAT_001ee860) <= dVar3) {
dVar2 = dVar3;
}
uVar1 = uVar1 + 1;
dVar3 = dVar2;
} while ((uint)param_3 != uVar1);
}
dVar2 = dVar2 / _DAT_001ee8b8;
}
else if (param_4 == 2) {
dVar2 = 0.0;
if (0 < param_3) {
uVar1 = 0;
do {
dVar2 = dVar2 + (double)(param_1[uVar1] * param_1[uVar1]);
uVar1 = uVar1 + 1;
} while ((uint)param_3 != uVar1);
}
if (0.0 <= dVar2) {
dVar2 = SQRT(dVar2);
}
else {
dVar2 = sqrt(dVar2);
}
}
else {
if (param_3 < 1) {
dVar2 = 0.0;
}
else {
dVar2 = 0.0;
uVar1 = 0;
do {
dVar3 = pow((double)(float)((uint)param_1[uVar1] & _DAT_001ee860),(double)param_4);
dVar2 = dVar2 + dVar3;
uVar1 = uVar1 + 1;
} while ((uint)param_3 != uVar1);
}
dVar2 = pow(dVar2,DAT_001ee8b0 / (double)param_4);
}
}
if (0 < param_3) {
dVar3 = DAT_001ee8b0 / dVar2;
uVar1 = 0;
do {
param_2[uVar1] = param_1[uVar1] * (float)(double)(-(ulong)(0.0 < dVar2) & (ulong)dVar3);
uVar1 = uVar1 + 1;
} while ((uint)param_3 != uVar1);
}
return;
}
| |
29,803 | wt_resource_destroy | eloqsql/mysys/waiting_threads.c | static void wt_resource_destroy(uchar *arg)
{
WT_RESOURCE *rc= (WT_RESOURCE*)(arg+LF_HASH_OVERHEAD);
DBUG_ENTER("wt_resource_destroy");
DBUG_ASSERT(rc->owners.elements == 0);
rc_rwlock_destroy(rc);
mysql_cond_destroy(&rc->cond);
delete_dynamic(&rc->owners);
DBUG_VOID_RETURN;
} | O3 | c | wt_resource_destroy:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x3cc0a(%rip), %rax # 0xea30c
movslq (%rax), %rax
leaq (%rdi,%rax), %rbx
leaq (%rdi,%rax), %r14
addq $0x18, %r14
movq %r14, %rdi
callq 0xaa9c0
movq 0xc0(%r14), %rdi
testq %rdi, %rdi
jne 0xad744
leaq 0xa8(%rbx), %rdi
callq 0x2a280
addq $0xe0, %rbx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x94b7c
leaq 0x2e1b0d(%rip), %rax # 0x38f258
movq (%rax), %rax
callq *0x68(%rax)
movq $0x0, 0xd8(%rbx)
jmp 0xad725
| wt_resource_destroy:
push rbp
mov rbp, rsp
push r14
push rbx
lea rax, LF_HASH_OVERHEAD
movsxd rax, dword ptr [rax]
lea rbx, [rdi+rax]
lea r14, [rdi+rax]
add r14, 18h
mov rdi, r14
call my_rw_destroy
mov rdi, [r14+0C0h]
test rdi, rdi
jnz short loc_AD744
loc_AD725:
lea rdi, [rbx+0A8h]
call _pthread_cond_destroy
add rbx, 0E0h
mov rdi, rbx
pop rbx
pop r14
pop rbp
jmp delete_dynamic
loc_AD744:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+68h]
mov qword ptr [rbx+0D8h], 0
jmp short loc_AD725
| long long wt_resource_destroy(long long a1)
{
long long v1; // rbx
v1 = a1 + LF_HASH_OVERHEAD;
my_rw_destroy(v1 + 24);
if ( *(_QWORD *)(v1 + 216) )
{
PSI_server[13]();
*(_QWORD *)(v1 + 216) = 0LL;
}
pthread_cond_destroy(v1 + 168);
return delete_dynamic((long long *)(v1 + 224));
}
| wt_resource_destroy:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
LEA RAX,[0x1ea30c]
MOVSXD RAX,dword ptr [RAX]
LEA RBX,[RDI + RAX*0x1]
LEA R14,[RDI + RAX*0x1]
ADD R14,0x18
MOV RDI,R14
CALL 0x001aa9c0
MOV RDI,qword ptr [R14 + 0xc0]
TEST RDI,RDI
JNZ 0x001ad744
LAB_001ad725:
LEA RDI,[RBX + 0xa8]
CALL 0x0012a280
ADD RBX,0xe0
MOV RDI,RBX
POP RBX
POP R14
POP RBP
JMP 0x00194b7c
LAB_001ad744:
LEA RAX,[0x48f258]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x68]
MOV qword ptr [RBX + 0xd8],0x0
JMP 0x001ad725
|
void wt_resource_destroy(long param_1)
{
long lVar1;
lVar1 = param_1 + LF_HASH_OVERHEAD;
param_1 = param_1 + LF_HASH_OVERHEAD;
my_rw_destroy(param_1 + 0x18);
if (*(long *)(param_1 + 0xd8) != 0) {
(**(code **)(PSI_server + 0x68))();
*(int8 *)(lVar1 + 0xd8) = 0;
}
pthread_cond_destroy((pthread_cond_t *)(lVar1 + 0xa8));
delete_dynamic(lVar1 + 0xe0);
return;
}
| |
29,804 | ma_pvio_read | eloqsql/libmariadb/libmariadb/ma_pvio.c | ssize_t ma_pvio_read(MARIADB_PVIO *pvio, uchar *buffer, size_t length)
{
ssize_t r= -1;
if (!pvio)
return -1;
if (IS_PVIO_ASYNC_ACTIVE(pvio))
{
r=
#if defined(HAVE_TLS) && !defined(HAVE_SCHANNEL)
(pvio->ctls) ? ma_tls_read_async(pvio, buffer, length) :
#endif
(ssize_t)ma_pvio_read_async(pvio, buffer, length);
goto end;
}
else
{
if (IS_PVIO_ASYNC(pvio))
{
/*
If switching from non-blocking to blocking API usage, set the socket
back to blocking mode.
*/
my_bool old_mode;
ma_pvio_blocking(pvio, TRUE, &old_mode);
}
}
/* secure connection */
#ifdef HAVE_TLS
if (pvio->ctls)
{
r= ma_pvio_tls_read(pvio->ctls, buffer, length);
goto end;
}
#endif
if (pvio->methods->read)
r= pvio->methods->read(pvio, buffer, length);
end:
if (pvio_callback)
{
void (*callback)(int mode, MYSQL *mysql, const uchar *buffer, size_t length);
LIST *p= pvio_callback;
while (p)
{
callback= p->data;
callback(0, pvio->mysql, buffer, r);
p= p->next;
}
}
if (r > 0)
pvio->bytes_read+= r;
return r;
} | O0 | c | ma_pvio_read:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq $-0x1, -0x28(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x23190
movq $-0x1, -0x8(%rbp)
jmp 0x23338
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x23227
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
cmpq $0x0, 0x480(%rax)
je 0x23227
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x480(%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0x23227
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movsbl 0x14(%rax), %eax
cmpl $0x0, %eax
je 0x23227
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x23205
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x37100
movq %rax, -0x48(%rbp)
jmp 0x2321a
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x23350
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x232c3
movq -0x10(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x2326c
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
cmpq $0x0, 0x480(%rax)
je 0x2326c
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x480(%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0x2326c
movq -0x10(%rbp), %rdi
movl $0x1, %esi
leaq -0x29(%rbp), %rdx
callq 0x234d0
jmp 0x2326e
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x23294
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x24160
movq %rax, -0x28(%rbp)
jmp 0x232c3
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
cmpq $0x0, 0x10(%rax)
je 0x232c1
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq *%rax
movq %rax, -0x28(%rbp)
jmp 0x232c3
leaq 0x3d13e(%rip), %rax # 0x60408
cmpq $0x0, (%rax)
je 0x23319
leaq 0x3d131(%rip), %rax # 0x60408
movq (%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x23317
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x40(%rcx), %rsi
movq -0x18(%rbp), %rdx
movq -0x28(%rbp), %rcx
xorl %edi, %edi
callq *%rax
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x232de
jmp 0x23319
cmpq $0x0, -0x28(%rbp)
jle 0x23330
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x60(%rax), %rcx
movq %rcx, 0x60(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_pvio_read:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], 0FFFFFFFFFFFFFFFFh
cmp [rbp+var_10], 0
jnz short loc_23190
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp loc_23338
loc_23190:
mov rax, [rbp+var_10]
cmp qword ptr [rax+40h], 0
jz loc_23227
mov rax, [rbp+var_10]
mov rax, [rax+40h]
cmp qword ptr [rax+480h], 0
jz short loc_23227
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rax, [rax+480h]
cmp qword ptr [rax+28h], 0
jz short loc_23227
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rax, [rax+480h]
mov rax, [rax+28h]
movsx eax, byte ptr [rax+14h]
cmp eax, 0
jz short loc_23227
mov rax, [rbp+var_10]
cmp qword ptr [rax+38h], 0
jz short loc_23205
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call ma_tls_read_async
mov [rbp+var_48], rax
jmp short loc_2321A
loc_23205:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call ma_pvio_read_async
mov [rbp+var_48], rax
loc_2321A:
mov rax, [rbp+var_48]
mov [rbp+var_28], rax
jmp loc_232C3
loc_23227:
mov rax, [rbp+var_10]
cmp qword ptr [rax+40h], 0
jz short loc_2326C
mov rax, [rbp+var_10]
mov rax, [rax+40h]
cmp qword ptr [rax+480h], 0
jz short loc_2326C
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rax, [rax+480h]
cmp qword ptr [rax+28h], 0
jz short loc_2326C
mov rdi, [rbp+var_10]
mov esi, 1
lea rdx, [rbp+var_29]
call ma_pvio_blocking
loc_2326C:
jmp short $+2
loc_2326E:
mov rax, [rbp+var_10]
cmp qword ptr [rax+38h], 0
jz short loc_23294
mov rax, [rbp+var_10]
mov rdi, [rax+38h]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call ma_pvio_tls_read
mov [rbp+var_28], rax
jmp short loc_232C3
loc_23294:
mov rax, [rbp+var_10]
mov rax, [rax+48h]
cmp qword ptr [rax+10h], 0
jz short loc_232C1
mov rax, [rbp+var_10]
mov rax, [rax+48h]
mov rax, [rax+10h]
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call rax
mov [rbp+var_28], rax
loc_232C1:
jmp short $+2
loc_232C3:
lea rax, pvio_callback
cmp qword ptr [rax], 0
jz short loc_23319
lea rax, pvio_callback
mov rax, [rax]
mov [rbp+var_40], rax
loc_232DE:
cmp [rbp+var_40], 0
jz short loc_23317
mov rax, [rbp+var_40]
mov rax, [rax+10h]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov rcx, [rbp+var_10]
mov rsi, [rcx+40h]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_28]
xor edi, edi
call rax
mov rax, [rbp+var_40]
mov rax, [rax+8]
mov [rbp+var_40], rax
jmp short loc_232DE
loc_23317:
jmp short $+2
loc_23319:
cmp [rbp+var_28], 0
jle short loc_23330
mov rcx, [rbp+var_28]
mov rax, [rbp+var_10]
add rcx, [rax+60h]
mov [rax+60h], rcx
loc_23330:
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_23338:
mov rax, [rbp+var_8]
add rsp, 50h
pop rbp
retn
| long long ma_pvio_read(_QWORD *a1, long long a2, long long a3)
{
long long async; // [rsp+8h] [rbp-48h]
long long i; // [rsp+10h] [rbp-40h]
char v6; // [rsp+27h] [rbp-29h] BYREF
long long v7; // [rsp+28h] [rbp-28h]
long long v8; // [rsp+30h] [rbp-20h]
long long v9; // [rsp+38h] [rbp-18h]
_QWORD *v10; // [rsp+40h] [rbp-10h]
v10 = a1;
v9 = a2;
v8 = a3;
v7 = -1LL;
if ( !a1 )
return -1LL;
if ( v10[8]
&& *(_QWORD *)(v10[8] + 1152LL)
&& *(_QWORD *)(*(_QWORD *)(v10[8] + 1152LL) + 40LL)
&& *(_BYTE *)(*(_QWORD *)(*(_QWORD *)(v10[8] + 1152LL) + 40LL) + 20LL) )
{
if ( v10[7] )
async = ma_tls_read_async(v10, v9, v8);
else
async = ma_pvio_read_async(v10, v9, v8);
v7 = async;
}
else
{
if ( v10[8] && *(_QWORD *)(v10[8] + 1152LL) && *(_QWORD *)(*(_QWORD *)(v10[8] + 1152LL) + 40LL) )
ma_pvio_blocking(v10, 1LL, &v6);
if ( v10[7] )
{
v7 = ma_pvio_tls_read(v10[7], v9, v8);
}
else if ( *(_QWORD *)(v10[9] + 16LL) )
{
v7 = (*(long long ( **)(_QWORD *, long long, long long))(v10[9] + 16LL))(v10, v9, v8);
}
}
if ( pvio_callback )
{
for ( i = pvio_callback; i; i = *(_QWORD *)(i + 8) )
(*(void ( **)(_QWORD, _QWORD, long long, long long))(i + 16))(0LL, v10[8], v9, v7);
}
if ( v7 > 0 )
v10[12] += v7;
return v7;
}
| ma_pvio_read:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],-0x1
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x00123190
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x00123338
LAB_00123190:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x40],0x0
JZ 0x00123227
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x00123227
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RAX,qword ptr [RAX + 0x480]
CMP qword ptr [RAX + 0x28],0x0
JZ 0x00123227
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOVSX EAX,byte ptr [RAX + 0x14]
CMP EAX,0x0
JZ 0x00123227
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x38],0x0
JZ 0x00123205
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00137100
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0012321a
LAB_00123205:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00123350
MOV qword ptr [RBP + -0x48],RAX
LAB_0012321a:
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001232c3
LAB_00123227:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x40],0x0
JZ 0x0012326c
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x0012326c
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RAX,qword ptr [RAX + 0x480]
CMP qword ptr [RAX + 0x28],0x0
JZ 0x0012326c
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x1
LEA RDX,[RBP + -0x29]
CALL 0x001234d0
LAB_0012326c:
JMP 0x0012326e
LAB_0012326e:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x38],0x0
JZ 0x00123294
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x38]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x00124160
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001232c3
LAB_00123294:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x48]
CMP qword ptr [RAX + 0x10],0x0
JZ 0x001232c1
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x48]
MOV RAX,qword ptr [RAX + 0x10]
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL RAX
MOV qword ptr [RBP + -0x28],RAX
LAB_001232c1:
JMP 0x001232c3
LAB_001232c3:
LEA RAX,[0x160408]
CMP qword ptr [RAX],0x0
JZ 0x00123319
LEA RAX,[0x160408]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
LAB_001232de:
CMP qword ptr [RBP + -0x40],0x0
JZ 0x00123317
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RCX + 0x40]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x28]
XOR EDI,EDI
CALL RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x40],RAX
JMP 0x001232de
LAB_00123317:
JMP 0x00123319
LAB_00123319:
CMP qword ptr [RBP + -0x28],0x0
JLE 0x00123330
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
ADD RCX,qword ptr [RAX + 0x60]
MOV qword ptr [RAX + 0x60],RCX
LAB_00123330:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
LAB_00123338:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x50
POP RBP
RET
|
long ma_pvio_read(long param_1,int8 param_2,int8 param_3)
{
long local_50;
long local_48;
int1 local_31;
long local_30;
int8 local_28;
int8 local_20;
long local_18;
long local_10;
local_30 = -1;
if (param_1 == 0) {
local_10 = -1;
}
else {
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
if ((((*(long *)(param_1 + 0x40) == 0) || (*(long *)(*(long *)(param_1 + 0x40) + 0x480) == 0))
|| (*(long *)(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x28) == 0)) ||
(*(char *)(*(long *)(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x28) + 0x14) == '\0')) {
if (((*(long *)(param_1 + 0x40) != 0) && (*(long *)(*(long *)(param_1 + 0x40) + 0x480) != 0))
&& (*(long *)(*(long *)(*(long *)(param_1 + 0x40) + 0x480) + 0x28) != 0)) {
ma_pvio_blocking(param_1,1,&local_31);
}
if (*(long *)(local_18 + 0x38) == 0) {
if (*(long *)(*(long *)(local_18 + 0x48) + 0x10) != 0) {
local_30 = (**(code **)(*(long *)(local_18 + 0x48) + 0x10))(local_18,local_20,local_28);
}
}
else {
local_30 = ma_pvio_tls_read(*(int8 *)(local_18 + 0x38),local_20,local_28);
}
}
else {
if (*(long *)(param_1 + 0x38) == 0) {
local_50 = ma_pvio_read_async(param_1,param_2,param_3);
}
else {
local_50 = ma_tls_read_async(param_1,param_2,param_3);
}
local_30 = local_50;
}
if (pvio_callback != 0) {
for (local_48 = pvio_callback; local_48 != 0; local_48 = *(long *)(local_48 + 8)) {
(**(code **)(local_48 + 0x10))(0,*(int8 *)(local_18 + 0x40),local_20,local_30);
}
}
if (0 < local_30) {
*(long *)(local_18 + 0x60) = local_30 + *(long *)(local_18 + 0x60);
}
local_10 = local_30;
}
return local_10;
}
| |
29,805 | ma_pvio_read | eloqsql/libmariadb/libmariadb/ma_pvio.c | ssize_t ma_pvio_read(MARIADB_PVIO *pvio, uchar *buffer, size_t length)
{
ssize_t r= -1;
if (!pvio)
return -1;
if (IS_PVIO_ASYNC_ACTIVE(pvio))
{
r=
#if defined(HAVE_TLS) && !defined(HAVE_SCHANNEL)
(pvio->ctls) ? ma_tls_read_async(pvio, buffer, length) :
#endif
(ssize_t)ma_pvio_read_async(pvio, buffer, length);
goto end;
}
else
{
if (IS_PVIO_ASYNC(pvio))
{
/*
If switching from non-blocking to blocking API usage, set the socket
back to blocking mode.
*/
my_bool old_mode;
ma_pvio_blocking(pvio, TRUE, &old_mode);
}
}
/* secure connection */
#ifdef HAVE_TLS
if (pvio->ctls)
{
r= ma_pvio_tls_read(pvio->ctls, buffer, length);
goto end;
}
#endif
if (pvio->methods->read)
r= pvio->methods->read(pvio, buffer, length);
end:
if (pvio_callback)
{
void (*callback)(int mode, MYSQL *mysql, const uchar *buffer, size_t length);
LIST *p= pvio_callback;
while (p)
{
callback= p->data;
callback(0, pvio->mysql, buffer, r);
p= p->next;
}
}
if (r > 0)
pvio->bytes_read+= r;
return r;
} | O3 | c | ma_pvio_read:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
testq %rdi, %rdi
je 0x1d037
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq 0x40(%rdi), %rdi
testq %rdi, %rdi
je 0x1d065
movq 0x480(%rdi), %rax
testq %rax, %rax
je 0x1d065
movq 0x28(%rax), %r13
testq %r13, %r13
je 0x1d043
cmpb $0x0, 0x14(%r13)
je 0x1d043
cmpq $0x0, 0x38(%rbx)
je 0x1d0df
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x282ae
jmp 0x1d093
movq $-0x1, %r12
jmp 0x1d0c4
cmpq $0x0, 0x28(%rax)
je 0x1d065
movq 0x48(%rbx), %rax
movq 0x38(%rax), %rax
testq %rax, %rax
je 0x1d065
leaq -0x29(%rbp), %rdx
movq %rbx, %rdi
movl $0x1, %esi
callq *%rax
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x1d07b
movq %r14, %rsi
movq %r15, %rdx
callq 0x1d7d6
jmp 0x1d093
movq 0x48(%rbx), %rax
movq 0x10(%rax), %rax
testq %rax, %rax
je 0x1d0d6
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq *%rax
movq %rax, %r12
leaq 0x2be7b(%rip), %rax # 0x48f18
movq (%rax), %r15
testq %r15, %r15
je 0x1d0bb
movq 0x40(%rbx), %rsi
xorl %edi, %edi
movq %r14, %rdx
movq %r12, %rcx
callq *0x10(%r15)
movq 0x8(%r15), %r15
jmp 0x1d0a0
testq %r12, %r12
jle 0x1d0c4
addq %r12, 0x60(%rbx)
movq %r12, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq $-0x1, %r12
jmp 0x1d096
movq 0x48(%rbx), %rax
cmpq $0x0, 0x18(%rax)
je 0x1d1a1
movl 0x28(%rbx), %eax
movl %eax, -0x3c(%rbp)
leaq 0x38(%r13), %rax
movq %rax, -0x48(%rbp)
movq $0x0, -0x38(%rbp)
movq $-0x1, %r12
movq 0x48(%rbx), %rax
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x1d127
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq *%rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jns 0x1d198
callq 0x13060
movl (%rax), %eax
cmpl $0xb, %eax
je 0x1d13f
cmpl $0x4, %eax
jne 0x1d198
movl $0x1, (%r13)
movl -0x3c(%rbp), %eax
testl %eax, %eax
js 0x1d15a
movl $0x9, (%r13)
movl %eax, 0x10(%r13)
movq 0x20(%r13), %rax
testq %rax, %rax
je 0x1d16e
movq 0x28(%r13), %rsi
movl $0x1, %edi
callq *%rax
movq -0x48(%rbp), %rdi
callq 0x2d751
movq 0x20(%r13), %rax
testq %rax, %rax
je 0x1d188
movq 0x28(%r13), %rsi
xorl %edi, %edi
callq *%rax
testb $0x8, 0x4(%r13)
je 0x1d10b
jmp 0x1d096
movq -0x38(%rbp), %r12
jmp 0x1d096
movq 0x50(%rbx), %r8
movq $-0x1, %r12
testq %r8, %r8
je 0x1d096
leaq 0x2b844(%rip), %rax # 0x48a00
movq (%rax), %rdx
movl $0x138a, %esi # imm = 0x138A
xorl %ecx, %ecx
xorl %eax, %eax
callq *%r8
jmp 0x1d096
| ma_pvio_read:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
test rdi, rdi
jz short loc_1D037
mov r15, rdx
mov r14, rsi
mov rbx, rdi
mov rdi, [rdi+40h]
test rdi, rdi
jz short loc_1D065
mov rax, [rdi+480h]
test rax, rax
jz short loc_1D065
mov r13, [rax+28h]
test r13, r13
jz short loc_1D043
cmp byte ptr [r13+14h], 0
jz short loc_1D043
cmp qword ptr [rbx+38h], 0
jz loc_1D0DF
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call ma_tls_read_async
jmp short loc_1D093
loc_1D037:
mov r12, 0FFFFFFFFFFFFFFFFh
jmp loc_1D0C4
loc_1D043:
cmp qword ptr [rax+28h], 0
jz short loc_1D065
mov rax, [rbx+48h]
mov rax, [rax+38h]
test rax, rax
jz short loc_1D065
lea rdx, [rbp+var_29]
mov rdi, rbx
mov esi, 1
call rax
loc_1D065:
mov rdi, [rbx+38h]
test rdi, rdi
jz short loc_1D07B
mov rsi, r14
mov rdx, r15
call ma_pvio_tls_read
jmp short loc_1D093
loc_1D07B:
mov rax, [rbx+48h]
mov rax, [rax+10h]
test rax, rax
jz short loc_1D0D6
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call rax
loc_1D093:
mov r12, rax
loc_1D096:
lea rax, pvio_callback
mov r15, [rax]
loc_1D0A0:
test r15, r15
jz short loc_1D0BB
mov rsi, [rbx+40h]
xor edi, edi
mov rdx, r14
mov rcx, r12
call qword ptr [r15+10h]
mov r15, [r15+8]
jmp short loc_1D0A0
loc_1D0BB:
test r12, r12
jle short loc_1D0C4
add [rbx+60h], r12
loc_1D0C4:
mov rax, r12
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_1D0D6:
mov r12, 0FFFFFFFFFFFFFFFFh
jmp short loc_1D096
loc_1D0DF:
mov rax, [rbx+48h]
cmp qword ptr [rax+18h], 0
jz loc_1D1A1
mov eax, [rbx+28h]
mov [rbp+var_3C], eax
lea rax, [r13+38h]
mov [rbp+var_48], rax
mov [rbp+var_38], 0
mov r12, 0FFFFFFFFFFFFFFFFh
loc_1D10B:
mov rax, [rbx+48h]
mov rax, [rax+18h]
test rax, rax
jz short loc_1D127
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call rax
mov [rbp+var_38], rax
loc_1D127:
cmp [rbp+var_38], 0
jns short loc_1D198
call ___errno_location
mov eax, [rax]
cmp eax, 0Bh
jz short loc_1D13F
cmp eax, 4
jnz short loc_1D198
loc_1D13F:
mov dword ptr [r13+0], 1
mov eax, [rbp+var_3C]
test eax, eax
js short loc_1D15A
mov dword ptr [r13+0], 9
mov [r13+10h], eax
loc_1D15A:
mov rax, [r13+20h]
test rax, rax
jz short loc_1D16E
mov rsi, [r13+28h]
mov edi, 1
call rax
loc_1D16E:
mov rdi, [rbp+var_48]
call my_context_yield
mov rax, [r13+20h]
test rax, rax
jz short loc_1D188
mov rsi, [r13+28h]
xor edi, edi
call rax
loc_1D188:
test byte ptr [r13+4], 8
jz loc_1D10B
jmp loc_1D096
loc_1D198:
mov r12, [rbp+var_38]
jmp loc_1D096
loc_1D1A1:
mov r8, [rbx+50h]
mov r12, 0FFFFFFFFFFFFFFFFh
test r8, r8
jz loc_1D096
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov esi, 138Ah
xor ecx, ecx
xor eax, eax
call r8
jmp loc_1D096
| long long ma_pvio_read(long long a1, long long a2, long long a3)
{
long long v5; // rdi
long long v6; // rax
long long v7; // r13
long long async; // rax
long long v9; // r12
void ( *v10)(long long, long long, _BYTE *); // rax
long long v11; // rdi
long long ( *v12)(long long, long long, long long); // rax
long long i; // r15
long long ( *v15)(long long, long long, long long); // rax
int v16; // eax
void ( *v17)(long long, _QWORD); // rax
void ( *v18)(_QWORD, _QWORD); // rax
void ( *v19)(long long, long long, char *, _QWORD); // r8
int v20; // [rsp+14h] [rbp-3Ch]
long long v21; // [rsp+18h] [rbp-38h]
_BYTE v22[41]; // [rsp+27h] [rbp-29h] BYREF
if ( !a1 )
return -1LL;
v5 = *(_QWORD *)(a1 + 64);
if ( v5 )
{
v6 = *(_QWORD *)(v5 + 1152);
if ( v6 )
{
v7 = *(_QWORD *)(v6 + 40);
if ( v7 && *(_BYTE *)(v7 + 20) )
{
if ( !*(_QWORD *)(a1 + 56) )
{
if ( *(_QWORD *)(*(_QWORD *)(a1 + 72) + 24LL) )
{
v20 = *(_DWORD *)(a1 + 40);
v21 = 0LL;
v9 = -1LL;
while ( 1 )
{
v15 = *(long long ( **)(long long, long long, long long))(*(_QWORD *)(a1 + 72) + 24LL);
if ( v15 )
v21 = v15(a1, a2, a3);
if ( v21 >= 0 )
break;
v16 = *(_DWORD *)__errno_location();
if ( v16 != 11 && v16 != 4 )
break;
*(_DWORD *)v7 = 1;
if ( v20 >= 0 )
{
*(_DWORD *)v7 = 9;
*(_DWORD *)(v7 + 16) = v20;
}
v17 = *(void ( **)(long long, _QWORD))(v7 + 32);
if ( v17 )
v17(1LL, *(_QWORD *)(v7 + 40));
my_context_yield(v7 + 56);
v18 = *(void ( **)(_QWORD, _QWORD))(v7 + 32);
if ( v18 )
v18(0LL, *(_QWORD *)(v7 + 40));
if ( (*(_BYTE *)(v7 + 4) & 8) != 0 )
goto LABEL_17;
}
v9 = v21;
}
else
{
v19 = *(void ( **)(long long, long long, char *, _QWORD))(a1 + 80);
v9 = -1LL;
if ( v19 )
v19(v5, 5002LL, SQLSTATE_UNKNOWN, 0LL);
}
goto LABEL_17;
}
async = ma_tls_read_async(a1, a2, a3);
goto LABEL_16;
}
if ( *(_QWORD *)(v6 + 40) )
{
v10 = *(void ( **)(long long, long long, _BYTE *))(*(_QWORD *)(a1 + 72) + 56LL);
if ( v10 )
v10(a1, 1LL, v22);
}
}
}
v11 = *(_QWORD *)(a1 + 56);
if ( v11 )
{
async = ma_pvio_tls_read(v11, a2, a3);
}
else
{
v12 = *(long long ( **)(long long, long long, long long))(*(_QWORD *)(a1 + 72) + 16LL);
if ( !v12 )
{
v9 = -1LL;
goto LABEL_17;
}
async = v12(a1, a2, a3);
}
LABEL_16:
v9 = async;
LABEL_17:
for ( i = pvio_callback; i; i = *(_QWORD *)(i + 8) )
(*(void ( **)(_QWORD, _QWORD, long long, long long))(i + 16))(0LL, *(_QWORD *)(a1 + 64), a2, v9);
if ( v9 > 0 )
*(_QWORD *)(a1 + 96) += v9;
return v9;
}
| ma_pvio_read:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
TEST RDI,RDI
JZ 0x0011d037
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x40]
TEST RDI,RDI
JZ 0x0011d065
MOV RAX,qword ptr [RDI + 0x480]
TEST RAX,RAX
JZ 0x0011d065
MOV R13,qword ptr [RAX + 0x28]
TEST R13,R13
JZ 0x0011d043
CMP byte ptr [R13 + 0x14],0x0
JZ 0x0011d043
CMP qword ptr [RBX + 0x38],0x0
JZ 0x0011d0df
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL 0x001282ae
JMP 0x0011d093
LAB_0011d037:
MOV R12,-0x1
JMP 0x0011d0c4
LAB_0011d043:
CMP qword ptr [RAX + 0x28],0x0
JZ 0x0011d065
MOV RAX,qword ptr [RBX + 0x48]
MOV RAX,qword ptr [RAX + 0x38]
TEST RAX,RAX
JZ 0x0011d065
LEA RDX,[RBP + -0x29]
MOV RDI,RBX
MOV ESI,0x1
CALL RAX
LAB_0011d065:
MOV RDI,qword ptr [RBX + 0x38]
TEST RDI,RDI
JZ 0x0011d07b
MOV RSI,R14
MOV RDX,R15
CALL 0x0011d7d6
JMP 0x0011d093
LAB_0011d07b:
MOV RAX,qword ptr [RBX + 0x48]
MOV RAX,qword ptr [RAX + 0x10]
TEST RAX,RAX
JZ 0x0011d0d6
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL RAX
LAB_0011d093:
MOV R12,RAX
LAB_0011d096:
LEA RAX,[0x148f18]
MOV R15,qword ptr [RAX]
LAB_0011d0a0:
TEST R15,R15
JZ 0x0011d0bb
MOV RSI,qword ptr [RBX + 0x40]
XOR EDI,EDI
MOV RDX,R14
MOV RCX,R12
CALL qword ptr [R15 + 0x10]
MOV R15,qword ptr [R15 + 0x8]
JMP 0x0011d0a0
LAB_0011d0bb:
TEST R12,R12
JLE 0x0011d0c4
ADD qword ptr [RBX + 0x60],R12
LAB_0011d0c4:
MOV RAX,R12
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0011d0d6:
MOV R12,-0x1
JMP 0x0011d096
LAB_0011d0df:
MOV RAX,qword ptr [RBX + 0x48]
CMP qword ptr [RAX + 0x18],0x0
JZ 0x0011d1a1
MOV EAX,dword ptr [RBX + 0x28]
MOV dword ptr [RBP + -0x3c],EAX
LEA RAX,[R13 + 0x38]
MOV qword ptr [RBP + -0x48],RAX
MOV qword ptr [RBP + -0x38],0x0
MOV R12,-0x1
LAB_0011d10b:
MOV RAX,qword ptr [RBX + 0x48]
MOV RAX,qword ptr [RAX + 0x18]
TEST RAX,RAX
JZ 0x0011d127
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL RAX
MOV qword ptr [RBP + -0x38],RAX
LAB_0011d127:
CMP qword ptr [RBP + -0x38],0x0
JNS 0x0011d198
CALL 0x00113060
MOV EAX,dword ptr [RAX]
CMP EAX,0xb
JZ 0x0011d13f
CMP EAX,0x4
JNZ 0x0011d198
LAB_0011d13f:
MOV dword ptr [R13],0x1
MOV EAX,dword ptr [RBP + -0x3c]
TEST EAX,EAX
JS 0x0011d15a
MOV dword ptr [R13],0x9
MOV dword ptr [R13 + 0x10],EAX
LAB_0011d15a:
MOV RAX,qword ptr [R13 + 0x20]
TEST RAX,RAX
JZ 0x0011d16e
MOV RSI,qword ptr [R13 + 0x28]
MOV EDI,0x1
CALL RAX
LAB_0011d16e:
MOV RDI,qword ptr [RBP + -0x48]
CALL 0x0012d751
MOV RAX,qword ptr [R13 + 0x20]
TEST RAX,RAX
JZ 0x0011d188
MOV RSI,qword ptr [R13 + 0x28]
XOR EDI,EDI
CALL RAX
LAB_0011d188:
TEST byte ptr [R13 + 0x4],0x8
JZ 0x0011d10b
JMP 0x0011d096
LAB_0011d198:
MOV R12,qword ptr [RBP + -0x38]
JMP 0x0011d096
LAB_0011d1a1:
MOV R8,qword ptr [RBX + 0x50]
MOV R12,-0x1
TEST R8,R8
JZ 0x0011d096
LEA RAX,[0x148a00]
MOV RDX,qword ptr [RAX]
MOV ESI,0x138a
XOR ECX,ECX
XOR EAX,EAX
CALL R8
JMP 0x0011d096
|
long ma_pvio_read(long param_1,int8 param_2,int8 param_3)
{
int iVar1;
long lVar2;
int4 *puVar3;
code *pcVar4;
long lVar5;
int *piVar6;
long lVar7;
long local_40;
int1 local_31;
if (param_1 == 0) {
return -1;
}
lVar2 = *(long *)(param_1 + 0x40);
if ((lVar2 != 0) && (lVar7 = *(long *)(lVar2 + 0x480), lVar7 != 0)) {
puVar3 = *(int4 **)(lVar7 + 0x28);
if ((puVar3 != (int4 *)0x0) && (*(char *)(puVar3 + 5) != '\0')) {
if (*(long *)(param_1 + 0x38) == 0) {
if (*(long *)(*(long *)(param_1 + 0x48) + 0x18) == 0) {
lVar7 = pvio_callback;
lVar5 = -1;
if (*(code **)(param_1 + 0x50) != (code *)0x0) {
(**(code **)(param_1 + 0x50))(lVar2,0x138a,SQLSTATE_UNKNOWN,0);
lVar7 = pvio_callback;
}
}
else {
iVar1 = *(int *)(param_1 + 0x28);
local_40 = 0;
do {
pcVar4 = *(code **)(*(long *)(param_1 + 0x48) + 0x18);
if (pcVar4 != (code *)0x0) {
local_40 = (*pcVar4)(param_1,param_2,param_3);
}
lVar7 = pvio_callback;
lVar5 = local_40;
if (-1 < local_40) break;
piVar6 = __errno_location();
if ((*piVar6 != 0xb) && (lVar7 = pvio_callback, *piVar6 != 4)) break;
*puVar3 = 1;
if (-1 < iVar1) {
*puVar3 = 9;
puVar3[4] = iVar1;
}
if (*(code **)(puVar3 + 8) != (code *)0x0) {
(**(code **)(puVar3 + 8))(1,*(int8 *)(puVar3 + 10));
}
my_context_yield(puVar3 + 0xe);
if (*(code **)(puVar3 + 8) != (code *)0x0) {
(**(code **)(puVar3 + 8))(0,*(int8 *)(puVar3 + 10));
}
lVar7 = pvio_callback;
lVar5 = -1;
} while ((*(byte *)(puVar3 + 1) & 8) == 0);
}
}
else {
lVar5 = ma_tls_read_async(param_1,param_2,param_3);
lVar7 = pvio_callback;
}
goto LAB_0011d0a0;
}
if ((*(long *)(lVar7 + 0x28) != 0) &&
(pcVar4 = *(code **)(*(long *)(param_1 + 0x48) + 0x38), pcVar4 != (code *)0x0)) {
(*pcVar4)(param_1,1,&local_31);
}
}
if (*(long *)(param_1 + 0x38) == 0) {
pcVar4 = *(code **)(*(long *)(param_1 + 0x48) + 0x10);
if (pcVar4 == (code *)0x0) {
lVar7 = pvio_callback;
lVar5 = -1;
}
else {
lVar5 = (*pcVar4)(param_1,param_2,param_3);
lVar7 = pvio_callback;
}
}
else {
lVar5 = ma_pvio_tls_read(*(long *)(param_1 + 0x38),param_2,param_3);
lVar7 = pvio_callback;
}
LAB_0011d0a0:
for (; lVar7 != 0; lVar7 = *(long *)(lVar7 + 8)) {
(**(code **)(lVar7 + 0x10))(0,*(int8 *)(param_1 + 0x40),param_2,lVar5);
}
if (0 < lVar5) {
*(long *)(param_1 + 0x60) = *(long *)(param_1 + 0x60) + lVar5;
}
return lVar5;
}
| |
29,806 | skip_all | eloqsql/unittest/mytap/tap.c | void
skip_all(char const *reason, ...)
{
va_list ap;
va_start(ap, reason);
fprintf(tapout, "1..0 # skip ");
vfprintf(tapout, reason, ap);
fflush(tapout);
va_end(ap);
exit(0);
} | O3 | c | skip_all:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %rbx
leaq -0xe0(%rbp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x2d63b
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
leaq -0x30(%rbp), %r14
movq %rdi, 0x10(%r14)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%r14)
movabsq $0x3000000008, %rax # imm = 0x3000000008
movq %rax, (%r14)
movq 0x2e9939(%rip), %r15 # 0x316f98
movq (%r15), %rdi
leaq 0x4db1b(%rip), %rdx # 0x7b184
movl $0x1, %esi
xorl %eax, %eax
callq 0x265e0
movq (%r15), %rdi
movl $0x1, %esi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x260e0
movq (%r15), %rdi
callq 0x263e0
xorl %edi, %edi
callq 0x26430
| skip_all:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 0C8h
mov rbx, rdi
lea rdi, [rbp+var_E0]
mov [rdi+8], rsi
mov [rdi+10h], rdx
mov [rdi+18h], rcx
mov [rdi+20h], r8
mov [rdi+28h], r9
test al, al
jz short loc_2D63B
movaps [rbp+var_B0], xmm0
movaps [rbp+var_A0], xmm1
movaps [rbp+var_90], xmm2
movaps [rbp+var_80], xmm3
movaps [rbp+var_70], xmm4
movaps [rbp+var_60], xmm5
movaps [rbp+var_50], xmm6
movaps [rbp+var_40], xmm7
loc_2D63B:
lea r14, [rbp+var_30]
mov [r14+10h], rdi
lea rax, [rbp+arg_0]
mov [r14+8], rax
mov rax, 3000000008h
mov [r14], rax
mov r15, cs:stdout_ptr
mov rdi, [r15]
lea rdx, a10Skip; "1..0 # skip "
mov esi, 1
xor eax, eax
call ___fprintf_chk
mov rdi, [r15]
mov esi, 1
mov rdx, rbx
mov rcx, r14
call ___vfprintf_chk
mov rdi, [r15]
call _fflush
xor edi, edi
call _exit
| void __noreturn skip_all(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
char v15; // [rsp+0h] [rbp-E0h] BYREF
long long v16; // [rsp+8h] [rbp-D8h]
long long v17; // [rsp+10h] [rbp-D0h]
long long v18; // [rsp+18h] [rbp-C8h]
long long v19; // [rsp+20h] [rbp-C0h]
long long v20; // [rsp+28h] [rbp-B8h]
__m128 v21; // [rsp+30h] [rbp-B0h]
__m128 v22; // [rsp+40h] [rbp-A0h]
__m128 v23; // [rsp+50h] [rbp-90h]
__m128 v24; // [rsp+60h] [rbp-80h]
__m128 v25; // [rsp+70h] [rbp-70h]
__m128 v26; // [rsp+80h] [rbp-60h]
__m128 v27; // [rsp+90h] [rbp-50h]
__m128 v28; // [rsp+A0h] [rbp-40h]
_QWORD v29[6]; // [rsp+B0h] [rbp-30h] BYREF
v21 = a7;
v22 = a8;
v23 = a9;
v24 = a10;
v25 = a11;
v26 = a12;
v27 = a13;
v28 = a14;
v16 = a2;
v17 = a3;
v18 = a4;
v19 = a5;
v20 = a6;
v29[2] = &v15;
v29[1] = &a15;
v29[0] = 0x3000000008LL;
__fprintf_chk(stdout, 1LL, "1..0 # skip ");
__vfprintf_chk(stdout, 1LL, a1, v29);
fflush(stdout);
exit(0LL);
}
| skip_all:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xc8
MOV RBX,RDI
LEA RDI,[RBP + -0xe0]
MOV qword ptr [RDI + 0x8],RSI
MOV qword ptr [RDI + 0x10],RDX
MOV qword ptr [RDI + 0x18],RCX
MOV qword ptr [RDI + 0x20],R8
MOV qword ptr [RDI + 0x28],R9
TEST AL,AL
JZ 0x0012d63b
MOVAPS xmmword ptr [RBP + -0xb0],XMM0
MOVAPS xmmword ptr [RBP + -0xa0],XMM1
MOVAPS xmmword ptr [RBP + -0x90],XMM2
MOVAPS xmmword ptr [RBP + -0x80],XMM3
MOVAPS xmmword ptr [RBP + -0x70],XMM4
MOVAPS xmmword ptr [RBP + -0x60],XMM5
MOVAPS xmmword ptr [RBP + -0x50],XMM6
MOVAPS xmmword ptr [RBP + -0x40],XMM7
LAB_0012d63b:
LEA R14,[RBP + -0x30]
MOV qword ptr [R14 + 0x10],RDI
LEA RAX,[RBP + 0x10]
MOV qword ptr [R14 + 0x8],RAX
MOV RAX,0x3000000008
MOV qword ptr [R14],RAX
MOV R15,qword ptr [0x00416f98]
MOV RDI,qword ptr [R15]
LEA RDX,[0x17b184]
MOV ESI,0x1
XOR EAX,EAX
CALL 0x001265e0
MOV RDI,qword ptr [R15]
MOV ESI,0x1
MOV RDX,RBX
MOV RCX,R14
CALL 0x001260e0
MOV RDI,qword ptr [R15]
CALL 0x001263e0
XOR EDI,EDI
CALL 0x00126430
|
void skip_all(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
int *puVar1;
char in_AL;
int1 local_e8 [8];
int8 local_e0;
int8 local_d8;
int8 local_d0;
int8 local_c8;
int8 local_c0;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int8 local_48;
int8 local_38;
int1 *local_30;
int1 *local_28;
puVar1 = PTR_stdout_00416f98;
local_28 = local_e8;
if (in_AL != '\0') {
local_b8 = param_1;
local_a8 = param_2;
local_98 = param_3;
local_88 = param_4;
local_78 = param_5;
local_68 = param_6;
local_58 = param_7;
local_48 = param_8;
}
local_30 = &stack0x00000008;
local_38 = 0x3000000008;
local_e0 = param_10;
local_d8 = param_11;
local_d0 = param_12;
local_c8 = param_13;
local_c0 = param_14;
__fprintf_chk(*(int8 *)PTR_stdout_00416f98,1,"1..0 # skip ");
__vfprintf_chk(*(int8 *)puVar1,1,param_9,&local_38);
fflush(*(FILE **)puVar1);
/* WARNING: Subroutine does not return */
exit(0);
}
| |
29,807 | evmone::append_data_section(std::__cxx11::basic_string<unsigned char, evmc::byte_traits<unsigned char>, std::allocator<unsigned char>>&, std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char>>) | corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/eof.cpp | bool append_data_section(bytes& container, bytes_view aux_data)
{
const auto header = read_valid_eof1_header(container);
// Assert we don't need to trim off the bytes beyond the declared data section first.
assert(container.size() <= header.data_offset + header.data_size);
const auto new_data_size = container.size() - header.data_offset + aux_data.size();
if (new_data_size > std::numeric_limits<uint16_t>::max())
return false;
// Check that appended data size is greater or equal of what header declaration expects.
if (new_data_size < header.data_size)
return false;
// Appending aux_data to the end, assuming data section is always the last one.
container.append(aux_data);
// Update data size
const auto data_size_pos = header.data_size_position();
container[data_size_pos] = static_cast<uint8_t>(new_data_size >> 8);
container[data_size_pos + 1] = static_cast<uint8_t>(new_data_size);
return true;
} | O3 | cpp | evmone::append_data_section(std::__cxx11::basic_string<unsigned char, evmc::byte_traits<unsigned char>, std::allocator<unsigned char>>&, std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char>>):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %rdx
movq %rsp, %r13
movq %r13, %rdi
callq 0x41305
movq 0x8(%r14), %rbx
movl 0x44(%r13), %ecx
movzwl 0x40(%r13), %eax
leal (%rcx,%rax), %edx
cmpq %rdx, %rbx
ja 0x4179f
subq %rcx, %rbx
addq %r15, %rbx
cmpq $0x10000, %rbx # imm = 0x10000
setb %cl
cmpq %rax, %rbx
setae %bpl
andb %cl, %bpl
cmpb $0x1, %bpl
jne 0x41732
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x44e5e
movq 0x50(%rsp), %rax
xorl %ecx, %ecx
subq 0x48(%rsp), %rax
leaq 0x3(%rax), %rax
cmovneq %rax, %rcx
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
addq %rcx, %rax
movq (%r14), %rcx
movb %bh, 0xa(%rcx,%rax)
movq (%r14), %rcx
movb %bl, 0xb(%rcx,%rax)
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x41749
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x21200
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x41760
movq 0x58(%rsp), %rsi
subq %rdi, %rsi
callq 0x21200
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x41777
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x21200
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x4178e
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21200
movl %ebp, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x44b75(%rip), %rdi # 0x8631b
leaq 0x44a86(%rip), %rsi # 0x86233
leaq 0x44ba1(%rip), %rcx # 0x86355
movl $0x38a, %edx # imm = 0x38A
callq 0x21130
movq %rax, %rbx
movq %rsp, %rdi
callq 0x43ad8
movq %rbx, %rdi
callq 0x213b0
| _ZN6evmone19append_data_sectionERNSt7__cxx1112basic_stringIhN4evmc11byte_traitsIhEESaIhEEESt17basic_string_viewIhS4_E:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov r12, rdx
mov r15, rsi
mov r14, rdi
mov rdx, [rdi]
mov r13, rsp
mov rdi, r13
call _ZN6evmone22read_valid_eof1_headerESt17basic_string_viewIhN4evmc11byte_traitsIhEEE; evmone::read_valid_eof1_header(std::basic_string_view<uchar,evmc::byte_traits<uchar>>)
mov rbx, [r14+8]
mov ecx, [r13+44h]
movzx eax, word ptr [r13+40h]
lea edx, [rcx+rax]
cmp rbx, rdx
ja loc_4179F
sub rbx, rcx
add rbx, r15
cmp rbx, 10000h
setb cl
cmp rbx, rax
setnb bpl
and bpl, cl
cmp bpl, 1
jnz short loc_41732
mov rdi, r14
mov rsi, r12
mov rdx, r15
call _ZNSt7__cxx1112basic_stringIhN4evmc11byte_traitsIhEESaIhEE6appendEPKhm; std::basic_string<uchar,evmc::byte_traits<uchar>,std::allocator<uchar>>::append(uchar const*,ulong)
mov rax, [rsp+0A8h+var_58]
xor ecx, ecx
sub rax, [rsp+0A8h+var_60]
lea rax, [rax+3]
cmovnz rcx, rax
mov rax, [rsp+0A8h+var_90]
sub rax, [rsp+0A8h+var_98]
add rax, rcx
mov rcx, [r14]
mov [rcx+rax+0Ah], bh
mov rcx, [r14]
mov [rcx+rax+0Bh], bl
loc_41732:
mov rdi, [rsp+0A8h+var_48]; void *
test rdi, rdi
jz short loc_41749
mov rsi, [rsp+0A8h+var_38]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_41749:
mov rdi, [rsp+0A8h+var_60]; void *
test rdi, rdi
jz short loc_41760
mov rsi, [rsp+0A8h+var_50]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_41760:
mov rdi, [rsp+0A8h+var_80]; void *
test rdi, rdi
jz short loc_41777
mov rsi, [rsp+0A8h+var_70]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_41777:
mov rdi, [rsp+0A8h+var_98]; void *
test rdi, rdi
jz short loc_4178E
mov rsi, [rsp+0A8h+var_88]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_4178E:
mov eax, ebp
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4179F:
lea rdi, aContainerSizeH; "container.size() <= header.data_offset "...
lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aBoolEvmoneAppe; "bool evmone::append_data_section(bytes "...
mov edx, 38Ah
call ___assert_fail
mov rbx, rax
mov rdi, rsp; this
call _ZN6evmone10EOF1HeaderD2Ev; evmone::EOF1Header::~EOF1Header()
mov rdi, rbx
call __Unwind_Resume
| long long evmone::append_data_section(long long *a1, long long a2, long long a3)
{
unsigned int v3; // ebp
unsigned long long v5; // rbx
unsigned long long v6; // rbx
long long v7; // rcx
long long v8; // rax
long long v10; // [rsp+0h] [rbp-A8h] BYREF
void *v11; // [rsp+10h] [rbp-98h]
long long v12; // [rsp+18h] [rbp-90h]
long long v13; // [rsp+20h] [rbp-88h]
void *v14; // [rsp+28h] [rbp-80h]
long long v15; // [rsp+38h] [rbp-70h]
unsigned __int16 v16; // [rsp+40h] [rbp-68h]
unsigned int v17; // [rsp+44h] [rbp-64h]
void *v18; // [rsp+48h] [rbp-60h]
_BYTE *v19; // [rsp+50h] [rbp-58h]
long long v20; // [rsp+58h] [rbp-50h]
void *v21; // [rsp+60h] [rbp-48h]
long long v22; // [rsp+70h] [rbp-38h]
evmone::read_valid_eof1_header((long long)&v10, a2, *a1);
v5 = a1[1];
if ( v5 > v17 + v16 )
__assert_fail(
"container.size() <= header.data_offset + header.data_size",
"/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/eof.cpp",
906LL,
"bool evmone::append_data_section(bytes &, bytes_view)");
v6 = a2 + v5 - v17;
LOBYTE(v3) = v6 < 0x10000 && v6 >= v16;
if ( (_BYTE)v3 == 1 )
{
std::basic_string<unsigned char,evmc::byte_traits<unsigned char>,std::allocator<unsigned char>>::append(a1, a3, a2);
v7 = 0LL;
if ( v19 != v18 )
v7 = v19 - (_BYTE *)v18 + 3;
v8 = v7 + v12 - (_QWORD)v11;
*(_BYTE *)(*a1 + v8 + 10) = BYTE1(v6);
*(_BYTE *)(*a1 + v8 + 11) = v6;
}
if ( v21 )
operator delete(v21, v22 - (_QWORD)v21);
if ( v18 )
operator delete(v18, v20 - (_QWORD)v18);
if ( v14 )
operator delete(v14, v15 - (_QWORD)v14);
if ( v11 )
operator delete(v11, v13 - (_QWORD)v11);
return v3;
}
| append_data_section:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV R12,RDX
MOV R15,RSI
MOV R14,RDI
MOV RDX,qword ptr [RDI]
MOV R13,RSP
MOV RDI,R13
CALL 0x00141305
MOV RBX,qword ptr [R14 + 0x8]
MOV ECX,dword ptr [R13 + 0x44]
MOVZX EAX,word ptr [R13 + 0x40]
LEA EDX,[RCX + RAX*0x1]
CMP RBX,RDX
JA 0x0014179f
SUB RBX,RCX
ADD RBX,R15
CMP RBX,0x10000
SETC CL
CMP RBX,RAX
SETNC BPL
AND BPL,CL
CMP BPL,0x1
JNZ 0x00141732
LAB_001416f5:
MOV RDI,R14
MOV RSI,R12
MOV RDX,R15
CALL 0x00144e5e
LAB_00141703:
MOV RAX,qword ptr [RSP + 0x50]
XOR ECX,ECX
SUB RAX,qword ptr [RSP + 0x48]
LEA RAX,[RAX + 0x3]
CMOVNZ RCX,RAX
MOV RAX,qword ptr [RSP + 0x18]
SUB RAX,qword ptr [RSP + 0x10]
ADD RAX,RCX
MOV RCX,qword ptr [R14]
MOV byte ptr [RCX + RAX*0x1 + 0xa],BH
MOV RCX,qword ptr [R14]
MOV byte ptr [RCX + RAX*0x1 + 0xb],BL
LAB_00141732:
MOV RDI,qword ptr [RSP + 0x60]
TEST RDI,RDI
JZ 0x00141749
MOV RSI,qword ptr [RSP + 0x70]
SUB RSI,RDI
CALL 0x00121200
LAB_00141749:
MOV RDI,qword ptr [RSP + 0x48]
TEST RDI,RDI
JZ 0x00141760
MOV RSI,qword ptr [RSP + 0x58]
SUB RSI,RDI
CALL 0x00121200
LAB_00141760:
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
JZ 0x00141777
MOV RSI,qword ptr [RSP + 0x38]
SUB RSI,RDI
CALL 0x00121200
LAB_00141777:
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x0014178e
MOV RSI,qword ptr [RSP + 0x20]
SUB RSI,RDI
CALL 0x00121200
LAB_0014178e:
MOV EAX,EBP
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014179f:
LEA RDI,[0x18631b]
LEA RSI,[0x186233]
LEA RCX,[0x186355]
MOV EDX,0x38a
CALL 0x00121130
|
/* evmone::append_data_section(std::__cxx11::basic_string<unsigned char, evmc::byte_traits<unsigned
char>, std::allocator<unsigned char> >&, std::basic_string_view<unsigned char,
evmc::byte_traits<unsigned char> >) */
ulong __thiscall evmone::append_data_section(evmone *this,ulong param_1,uchar *param_3)
{
long lVar1;
ulong uVar2;
int8 unaff_RBP;
int1 auStack_a8 [16];
void *local_98;
long local_90;
long local_88;
void *local_80;
long local_70;
ushort local_68;
uint local_64;
void *local_60;
long local_58;
long local_50;
void *local_48;
long local_38;
read_valid_eof1_header(auStack_a8,param_1,*(int8 *)this);
if (*(ulong *)(this + 8) <= (ulong)(local_64 + local_68)) {
uVar2 = (*(ulong *)(this + 8) - (ulong)local_64) + param_1;
if (local_68 <= uVar2 && uVar2 < 0x10000) {
/* try { // try from 001416f5 to 00141702 has its CatchHandler @ 001417be */
std::__cxx11::
basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>>::
append((basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>>
*)this,param_3,param_1);
lVar1 = 0;
if (local_58 - (long)local_60 != 0) {
lVar1 = (local_58 - (long)local_60) + 3;
}
lVar1 = (local_90 - (long)local_98) + lVar1;
*(char *)(*(long *)this + 10 + lVar1) = (char)(uVar2 >> 8);
*(char *)(*(long *)this + 0xb + lVar1) = (char)uVar2;
}
if (local_48 != (void *)0x0) {
operator_delete(local_48,local_38 - (long)local_48);
}
if (local_60 != (void *)0x0) {
operator_delete(local_60,local_50 - (long)local_60);
}
if (local_80 != (void *)0x0) {
operator_delete(local_80,local_70 - (long)local_80);
}
if (local_98 != (void *)0x0) {
operator_delete(local_98,local_88 - (long)local_98);
}
return CONCAT71((int7)((ulong)unaff_RBP >> 8),local_68 <= uVar2 && uVar2 < 0x10000) & 0xffffffff
;
}
/* WARNING: Subroutine does not return */
__assert_fail("container.size() <= header.data_offset + header.data_size",
"/workspace/llm4binary/github/2025_star3/corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/eof.cpp"
,0x38a,"bool evmone::append_data_section(bytes &, bytes_view)");
}
| |
29,808 | testing::TestSuite::Passed() const | seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/include/gtest/gtest.h | bool Failed() const {
return failed_test_count() > 0 || ad_hoc_test_result().Failed();
} | O1 | c | testing::TestSuite::Passed() const:
pushq %rbx
movq %rdi, %rbx
callq 0x208bc
testl %eax, %eax
jle 0x3a6b9
xorl %eax, %eax
jmp 0x3a6ca
addq $0x88, %rbx
movq %rbx, %rdi
callq 0x241b8
xorb $0x1, %al
popq %rbx
retq
| _ZNK7testing9TestSuite6PassedEv:
push rbx
mov rbx, rdi
call _ZNK7testing9TestSuite17failed_test_countEv; testing::TestSuite::failed_test_count(void)
test eax, eax
jle short loc_3A6B9
xor eax, eax
jmp short loc_3A6CA
loc_3A6B9:
add rbx, 88h
mov rdi, rbx; this
call _ZNK7testing10TestResult6FailedEv; testing::TestResult::Failed(void)
xor al, 1
loc_3A6CA:
pop rbx
retn
| char testing::TestSuite::Passed(testing::TestSuite *this)
{
if ( (int)testing::TestSuite::failed_test_count(this) <= 0 )
return testing::TestResult::Failed((testing::TestSuite *)((char *)this + 136)) ^ 1;
else
return 0;
}
| Passed:
PUSH RBX
MOV RBX,RDI
CALL 0x001208bc
TEST EAX,EAX
JLE 0x0013a6b9
XOR EAX,EAX
JMP 0x0013a6ca
LAB_0013a6b9:
ADD RBX,0x88
MOV RDI,RBX
CALL 0x001241b8
XOR AL,0x1
LAB_0013a6ca:
POP RBX
RET
|
/* testing::TestSuite::Passed() const */
ulong __thiscall testing::TestSuite::Passed(TestSuite *this)
{
int iVar1;
ulong uVar2;
iVar1 = failed_test_count(this);
if (iVar1 < 1) {
uVar2 = TestResult::Failed((TestResult *)(this + 0x88));
uVar2 = uVar2 ^ 1;
}
else {
uVar2 = 0;
}
return uVar2;
}
| |
29,809 | LefDefParser::lefiVia::propIsNumber(int) const | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiVia.cpp | int
lefiVia::propIsNumber(int index) const
{
char msg[160];
if (index < 0 || index >= numProps_) {
sprintf(msg, "ERROR (LEFPARS-1422): The layer number %d given for the VIA PROPERTY is invalid.\nValid number is from 0 to %d", index, numLayers_);
lefiError(0, 1422, msg);
return 0;
}
return propDValue_[index] ? 1 : 0;
} | O0 | cpp | LefDefParser::lefiVia::propIsNumber(int) const:
subq $0xc8, %rsp
movq %rdi, 0xb8(%rsp)
movl %esi, 0xb4(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpl $0x0, 0xb4(%rsp)
jl 0x1714e
movq 0x8(%rsp), %rcx
movl 0xb4(%rsp), %eax
cmpl 0x20(%rcx), %eax
jl 0x1718e
movq 0x8(%rsp), %rax
leaq 0x10(%rsp), %rdi
movl 0xb4(%rsp), %edx
movl 0x48(%rax), %ecx
leaq 0x7b3e2(%rip), %rsi # 0x9254b
movb $0x0, %al
callq 0x2050
leaq 0x10(%rsp), %rdx
xorl %edi, %edi
movl $0x58e, %esi # imm = 0x58E
callq 0x59060
movl $0x0, 0xc4(%rsp)
jmp 0x171c6
movq 0x8(%rsp), %rax
movq 0x38(%rax), %rax
movslq 0xb4(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
xorps %xmm1, %xmm1
xorl %eax, %eax
movl $0x1, %ecx
ucomisd %xmm1, %xmm0
setp %sil
setne %dl
orb %sil, %dl
cmovnel %ecx, %eax
movl %eax, 0xc4(%rsp)
movl 0xc4(%rsp), %eax
addq $0xc8, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZNK12LefDefParser7lefiVia12propIsNumberEi:
sub rsp, 0C8h
mov [rsp+0C8h+var_10], rdi
mov [rsp+0C8h+var_14], esi
mov rax, [rsp+0C8h+var_10]
mov [rsp+0C8h+var_C0], rax
cmp [rsp+0C8h+var_14], 0
jl short loc_1714E
mov rcx, [rsp+0C8h+var_C0]
mov eax, [rsp+0C8h+var_14]
cmp eax, [rcx+20h]
jl short loc_1718E
loc_1714E:
mov rax, [rsp+0C8h+var_C0]
lea rdi, [rsp+0C8h+var_B8]
mov edx, [rsp+0C8h+var_14]
mov ecx, [rax+48h]
lea rsi, aErrorLefpars14_2; "ERROR (LEFPARS-1422): The layer number "...
mov al, 0
call _sprintf
lea rdx, [rsp+0C8h+var_B8]; int
xor edi, edi; this
mov esi, 58Eh; int
call _ZN12LefDefParser9lefiErrorEiiPKc; LefDefParser::lefiError(int,int,char const*)
mov [rsp+0C8h+var_4], 0
jmp short loc_171C6
loc_1718E:
mov rax, [rsp+0C8h+var_C0]
mov rax, [rax+38h]
movsxd rcx, [rsp+0C8h+var_14]
movsd xmm0, qword ptr [rax+rcx*8]
xorps xmm1, xmm1
xor eax, eax
mov ecx, 1
ucomisd xmm0, xmm1
setp sil
setnz dl
or dl, sil
cmovnz eax, ecx
mov [rsp+0C8h+var_4], eax
loc_171C6:
mov eax, [rsp+0C8h+var_4]
add rsp, 0C8h
retn
| _BOOL8 LefDefParser::lefiVia::propIsNumber(LefDefParser::lefiVia *this, int a2)
{
const char *v2; // rcx
int v4[41]; // [rsp+10h] [rbp-B8h] BYREF
int v5; // [rsp+B4h] [rbp-14h]
LefDefParser::lefiVia *v6; // [rsp+B8h] [rbp-10h]
v6 = this;
v5 = a2;
if ( a2 >= 0 && v5 < *((_DWORD *)this + 8) )
{
return *(double *)(*((_QWORD *)this + 7) + 8LL * v5) != 0.0;
}
else
{
sprintf(
v4,
"ERROR (LEFPARS-1422): The layer number %d given for the VIA PROPERTY is invalid.\nValid number is from 0 to %d",
v5,
*((_DWORD *)this + 18));
LefDefParser::lefiError(0LL, 1422, (int)v4, v2);
return 0;
}
}
| propIsNumber:
SUB RSP,0xc8
MOV qword ptr [RSP + 0xb8],RDI
MOV dword ptr [RSP + 0xb4],ESI
MOV RAX,qword ptr [RSP + 0xb8]
MOV qword ptr [RSP + 0x8],RAX
CMP dword ptr [RSP + 0xb4],0x0
JL 0x0011714e
MOV RCX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RSP + 0xb4]
CMP EAX,dword ptr [RCX + 0x20]
JL 0x0011718e
LAB_0011714e:
MOV RAX,qword ptr [RSP + 0x8]
LEA RDI,[RSP + 0x10]
MOV EDX,dword ptr [RSP + 0xb4]
MOV ECX,dword ptr [RAX + 0x48]
LEA RSI,[0x19254b]
MOV AL,0x0
CALL 0x00102050
LEA RDX,[RSP + 0x10]
XOR EDI,EDI
MOV ESI,0x58e
CALL 0x00159060
MOV dword ptr [RSP + 0xc4],0x0
JMP 0x001171c6
LAB_0011718e:
MOV RAX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RAX + 0x38]
MOVSXD RCX,dword ptr [RSP + 0xb4]
MOVSD XMM0,qword ptr [RAX + RCX*0x8]
XORPS XMM1,XMM1
XOR EAX,EAX
MOV ECX,0x1
UCOMISD XMM0,XMM1
SETP SIL
SETNZ DL
OR DL,SIL
CMOVNZ EAX,ECX
MOV dword ptr [RSP + 0xc4],EAX
LAB_001171c6:
MOV EAX,dword ptr [RSP + 0xc4]
ADD RSP,0xc8
RET
|
/* LefDefParser::lefiVia::propIsNumber(int) const */
bool __thiscall LefDefParser::lefiVia::propIsNumber(lefiVia *this,int param_1)
{
bool bVar1;
char local_b8 [164];
int local_14;
lefiVia *local_10;
if ((param_1 < 0) || (*(int *)(this + 0x20) <= param_1)) {
local_14 = param_1;
local_10 = this;
sprintf(local_b8,
"ERROR (LEFPARS-1422): The layer number %d given for the VIA PROPERTY is invalid.\nValid number is from 0 to %d"
,(ulong)(uint)param_1,(ulong)*(uint *)(this + 0x48));
lefiError(0,0x58e,local_b8);
bVar1 = false;
}
else {
bVar1 = *(double *)(*(long *)(this + 0x38) + (long)param_1 * 8) != 0.0;
}
return bVar1;
}
| |
29,810 | JS_LoadModule | bluesky950520[P]quickjs/quickjs.c | JSValue JS_LoadModule(JSContext *ctx, const char *basename,
const char *filename)
{
JSValue promise, resolving_funcs[2];
promise = JS_NewPromiseCapability(ctx, resolving_funcs);
if (JS_IsException(promise))
return JS_EXCEPTION;
JS_LoadModuleInternal(ctx, basename, filename,
(JSValueConst *)resolving_funcs);
JS_FreeValue(ctx, resolving_funcs[0]);
JS_FreeValue(ctx, resolving_funcs[1]);
return promise;
} | O1 | c | JS_LoadModule:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
xorl %ebp, %ebp
movq %rsp, %rsi
movl $0x3, %ecx
xorl %edx, %edx
callq 0x356a2
movq %rdx, %r15
movl $0x6, %edx
cmpl $0x6, %r15d
je 0x303a2
movq %rax, %r14
movq %rsp, %rbp
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %rbp, %rcx
callq 0x303c0
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
movq 0x18(%rbx), %rdi
callq 0x1ccb2
movq 0x10(%rbp), %rsi
movq 0x18(%rbp), %rdx
movq 0x18(%rbx), %rdi
callq 0x1ccb2
movq %r15, %rdx
movq %r14, %rbp
movq %rbp, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| JS_LoadModule:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r12, rdx
mov r13, rsi
mov rbx, rdi
xor ebp, ebp
mov rsi, rsp
mov ecx, 3
xor edx, edx
call js_new_promise_capability
mov r15, rdx
mov edx, 6
cmp r15d, 6
jz short loc_303A2
mov r14, rax
mov rbp, rsp
mov rdi, rbx
mov rsi, r13
mov rdx, r12
mov rcx, rbp
call JS_LoadModuleInternal
mov rsi, [rbp+0]
mov rdx, [rbp+8]
mov rdi, [rbx+18h]
call JS_FreeValueRT
mov rsi, [rbp+10h]
mov rdx, [rbp+18h]
mov rdi, [rbx+18h]
call JS_FreeValueRT
mov rdx, r15
mov rbp, r14
loc_303A2:
mov rax, rbp
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long JS_LoadModule(long long a1, long long a2, long long a3)
{
long long v4; // rbp
long long v5; // rax
int v6; // edx
long long v7; // r14
_DWORD *v9[11]; // [rsp+0h] [rbp-58h] BYREF
v4 = 0LL;
v5 = js_new_promise_capability(a1, v9, 0LL);
if ( v6 != 6 )
{
v7 = v5;
JS_LoadModuleInternal(a1, a2, a3, v9);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v9[0], (long long)v9[1]);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v9[2], (long long)v9[3]);
return v7;
}
return v4;
}
| JS_LoadModule:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R12,RDX
MOV R13,RSI
MOV RBX,RDI
XOR EBP,EBP
MOV RSI,RSP
MOV ECX,0x3
XOR EDX,EDX
CALL 0x001356a2
MOV R15,RDX
MOV EDX,0x6
CMP R15D,0x6
JZ 0x001303a2
MOV R14,RAX
MOV RBP,RSP
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R12
MOV RCX,RBP
CALL 0x001303c0
MOV RSI,qword ptr [RBP]
MOV RDX,qword ptr [RBP + 0x8]
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x0011ccb2
MOV RSI,qword ptr [RBP + 0x10]
MOV RDX,qword ptr [RBP + 0x18]
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x0011ccb2
MOV RDX,R15
MOV RBP,R14
LAB_001303a2:
MOV RAX,RBP
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16] JS_LoadModule(long param_1,int8 param_2,int8 param_3)
{
int1 auVar1 [16];
int1 auVar2 [16];
int8 local_58;
int8 local_50;
int8 local_48;
int8 local_40;
auVar2 = js_new_promise_capability(param_1,&local_58,0,3);
auVar1 = ZEXT816(6) << 0x40;
if (auVar2._8_4_ != 6) {
JS_LoadModuleInternal(param_1,param_2,param_3,&local_58);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_58,local_50);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_48,local_40);
auVar1 = auVar2;
}
return auVar1;
}
| |
29,811 | JS_LoadModule | bluesky950520[P]quickjs/quickjs.c | JSValue JS_LoadModule(JSContext *ctx, const char *basename,
const char *filename)
{
JSValue promise, resolving_funcs[2];
promise = JS_NewPromiseCapability(ctx, resolving_funcs);
if (JS_IsException(promise))
return JS_EXCEPTION;
JS_LoadModuleInternal(ctx, basename, filename,
(JSValueConst *)resolving_funcs);
JS_FreeValue(ctx, resolving_funcs[0]);
JS_FreeValue(ctx, resolving_funcs[1]);
return promise;
} | O3 | c | JS_LoadModule:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r12
movq %rsi, %rbp
movq %rdi, %r15
xorl %r13d, %r13d
movq %rsp, %rsi
movl $0x3, %ecx
xorl %edx, %edx
callq 0x3687c
movq %rdx, %r14
movl $0x6, %edx
cmpl $0x6, %r14d
je 0x313ae
movq %rax, %rbx
movq %rsp, %r13
movq %r15, %rdi
movq %rbp, %rsi
movq %r12, %rdx
movq %r13, %rcx
callq 0x313cc
movq 0x8(%r13), %rdx
movq 0x18(%r15), %rdi
cmpl $-0x9, %edx
jb 0x31388
movq (%rsp), %rsi
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jg 0x31388
callq 0x20d90
movq 0x18(%r15), %rdi
movq 0x18(%rsp), %rdx
cmpl $-0x9, %edx
jb 0x313a8
movq 0x10(%rsp), %rsi
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jg 0x313a8
callq 0x20d90
movq %r14, %rdx
movq %rbx, %r13
movq %r13, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| JS_LoadModule:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r12, rdx
mov rbp, rsi
mov r15, rdi
xor r13d, r13d
mov rsi, rsp
mov ecx, 3
xor edx, edx
call js_new_promise_capability
mov r14, rdx
mov edx, 6
cmp r14d, 6
jz short loc_313AE
mov rbx, rax
mov r13, rsp
mov rdi, r15
mov rsi, rbp
mov rdx, r12
mov rcx, r13
call JS_LoadModuleInternal
mov rdx, [r13+8]
mov rdi, [r15+18h]
cmp edx, 0FFFFFFF7h
jb short loc_31388
mov rsi, [rsp+58h+var_58]
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jg short loc_31388
call js_free_value_rt
mov rdi, [r15+18h]
loc_31388:
mov rdx, [rsp+58h+var_40]
cmp edx, 0FFFFFFF7h
jb short loc_313A8
mov rsi, [rsp+58h+var_48]
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jg short loc_313A8
call js_free_value_rt
loc_313A8:
mov rdx, r14
mov r13, rbx
loc_313AE:
mov rax, r13
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long JS_LoadModule(long long a1, long long a2, long long a3)
{
long long v5; // r13
long long v6; // rax
int v7; // edx
long long v8; // rbx
long long v9; // r8
long long v10; // r9
long long v11; // rdx
long long v12; // rdi
_QWORD *v13; // rsi
int v14; // eax
long long v15; // rcx
long long v16; // rdx
_QWORD *v17; // rsi
int v18; // eax
long long v19; // rcx
_DWORD *v21; // [rsp+0h] [rbp-58h] BYREF
long long v22; // [rsp+8h] [rbp-50h]
_DWORD *v23; // [rsp+10h] [rbp-48h]
long long v24; // [rsp+18h] [rbp-40h]
v5 = 0LL;
v6 = js_new_promise_capability(a1, &v21, 0LL);
if ( v7 != 6 )
{
v8 = v6;
JS_LoadModuleInternal(a1, a2, a3, &v21);
v11 = v22;
v12 = *(_QWORD *)(a1 + 24);
if ( (unsigned int)v22 >= 0xFFFFFFF7 )
{
v13 = v21;
v14 = *v21;
v15 = (unsigned int)(*v21 - 1);
*v21 = v15;
if ( v14 <= 1 )
{
js_free_value_rt(v12, v13, v11, v15, v9, v10);
v12 = *(_QWORD *)(a1 + 24);
}
}
v16 = v24;
if ( (unsigned int)v24 >= 0xFFFFFFF7 )
{
v17 = v23;
v18 = *v23;
v19 = (unsigned int)(*v23 - 1);
*v23 = v19;
if ( v18 <= 1 )
js_free_value_rt(v12, v17, v16, v19, v9, v10);
}
return v8;
}
return v5;
}
| JS_LoadModule:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R12,RDX
MOV RBP,RSI
MOV R15,RDI
XOR R13D,R13D
MOV RSI,RSP
MOV ECX,0x3
XOR EDX,EDX
CALL 0x0013687c
MOV R14,RDX
MOV EDX,0x6
CMP R14D,0x6
JZ 0x001313ae
MOV RBX,RAX
MOV R13,RSP
MOV RDI,R15
MOV RSI,RBP
MOV RDX,R12
MOV RCX,R13
CALL 0x001313cc
MOV RDX,qword ptr [R13 + 0x8]
MOV RDI,qword ptr [R15 + 0x18]
CMP EDX,-0x9
JC 0x00131388
MOV RSI,qword ptr [RSP]
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JG 0x00131388
CALL 0x00120d90
MOV RDI,qword ptr [R15 + 0x18]
LAB_00131388:
MOV RDX,qword ptr [RSP + 0x18]
CMP EDX,-0x9
JC 0x001313a8
MOV RSI,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JG 0x001313a8
CALL 0x00120d90
LAB_001313a8:
MOV RDX,R14
MOV R13,RBX
LAB_001313ae:
MOV RAX,R13
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16] JS_LoadModule(long param_1,int8 param_2,int8 param_3)
{
int iVar1;
int1 auVar2 [16];
int8 uVar3;
int1 auVar4 [16];
int *local_58;
uint local_50;
int *local_48;
uint local_40;
auVar4 = js_new_promise_capability(param_1,&local_58,0,3);
auVar2 = ZEXT816(6) << 0x40;
if (auVar4._8_4_ != 6) {
JS_LoadModuleInternal(param_1,param_2,param_3,&local_58);
uVar3 = *(int8 *)(param_1 + 0x18);
if ((0xfffffff6 < local_50) && (iVar1 = *local_58, *local_58 = iVar1 + -1, iVar1 < 2)) {
js_free_value_rt(uVar3);
uVar3 = *(int8 *)(param_1 + 0x18);
}
auVar2 = auVar4;
if ((0xfffffff6 < local_40) && (iVar1 = *local_48, *local_48 = iVar1 + -1, iVar1 < 2)) {
js_free_value_rt(uVar3);
}
}
return auVar2;
}
| |
29,812 | my_hash_iterate | eloqsql/mysys/hash.c | my_bool my_hash_iterate(HASH *hash, my_hash_walk_action action, void *argument)
{
uint records, i;
records= hash->records;
for (i= 0 ; i < records ; i++)
{
if ((*action)(dynamic_element(&hash->array, i, HASH_LINK *)->data,
argument))
return 1;
}
return 0;
} | O0 | c | my_hash_iterate:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl %eax, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jae 0xe1205
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x28(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rdi
movq -0x20(%rbp), %rsi
callq *%rax
cmpb $0x0, %al
je 0xe11f8
movb $0x1, -0x1(%rbp)
jmp 0xe1209
jmp 0xe11fa
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xe11c6
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| my_hash_iterate:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov [rbp+var_24], eax
mov [rbp+var_28], 0
loc_E11C6:
mov eax, [rbp+var_28]
cmp eax, [rbp+var_24]
jnb short loc_E1205
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
mov rcx, [rcx+28h]
mov edx, [rbp+var_28]
shl rdx, 4
add rcx, rdx
mov rdi, [rcx+8]
mov rsi, [rbp+var_20]
call rax
cmp al, 0
jz short loc_E11F8
mov [rbp+var_1], 1
jmp short loc_E1209
loc_E11F8:
jmp short $+2
loc_E11FA:
mov eax, [rbp+var_28]
add eax, 1
mov [rbp+var_28], eax
jmp short loc_E11C6
loc_E1205:
mov [rbp+var_1], 0
loc_E1209:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char my_hash_iterate(long long a1, unsigned __int8 ( *a2)(_QWORD, long long), long long a3)
{
unsigned int i; // [rsp+8h] [rbp-28h]
unsigned int v5; // [rsp+Ch] [rbp-24h]
v5 = *(_QWORD *)(a1 + 24);
for ( i = 0; i < v5; ++i )
{
if ( a2(*(_QWORD *)(16LL * i + *(_QWORD *)(a1 + 40) + 8), a3) )
return 1;
}
return 0;
}
| my_hash_iterate:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV dword ptr [RBP + -0x24],EAX
MOV dword ptr [RBP + -0x28],0x0
LAB_001e11c6:
MOV EAX,dword ptr [RBP + -0x28]
CMP EAX,dword ptr [RBP + -0x24]
JNC 0x001e1205
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x28]
MOV EDX,dword ptr [RBP + -0x28]
SHL RDX,0x4
ADD RCX,RDX
MOV RDI,qword ptr [RCX + 0x8]
MOV RSI,qword ptr [RBP + -0x20]
CALL RAX
CMP AL,0x0
JZ 0x001e11f8
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001e1209
LAB_001e11f8:
JMP 0x001e11fa
LAB_001e11fa:
MOV EAX,dword ptr [RBP + -0x28]
ADD EAX,0x1
MOV dword ptr [RBP + -0x28],EAX
JMP 0x001e11c6
LAB_001e1205:
MOV byte ptr [RBP + -0x1],0x0
LAB_001e1209:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 my_hash_iterate(long param_1,code *param_2,int8 param_3)
{
int8 uVar1;
char cVar2;
uint local_30;
uVar1 = *(int8 *)(param_1 + 0x18);
local_30 = 0;
while( true ) {
if ((uint)uVar1 <= local_30) {
return 0;
}
cVar2 = (*param_2)(*(int8 *)(*(long *)(param_1 + 0x28) + (ulong)local_30 * 0x10 + 8),
param_3);
if (cVar2 != '\0') break;
local_30 = local_30 + 1;
}
return 1;
}
| |
29,813 | minja::Context::get(minja::Value const&) | llama.cpp/common/minja/minja.hpp | virtual Value get(const Value & key) {
if (values_.contains(key)) return values_.at(key);
if (parent_) return parent_->get(key);
return Value();
} | O3 | cpp | minja::Context::get(minja::Value const&):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x18(%rsi), %r12
movq %r12, %rdi
movq %rdx, %rsi
callq 0xc069e
testb %al, %al
je 0xc04ca
movq %r12, %rdi
movq %r14, %rsi
callq 0xc08ea
movq %rbx, %rdi
movq %rax, %rsi
callq 0xbe22c
jmp 0xc051d
movq 0x68(%r15), %rsi
testq %rsi, %rsi
je 0xc04e1
movq (%rsi), %rax
movq %rbx, %rdi
movq %r14, %rdx
callq *0x10(%rax)
jmp 0xc051d
leaq 0x40(%rbx), %r14
movq $0x0, 0x48(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x30(%rbx)
movb $0x0, 0x40(%rbx)
movq %r14, %rdi
movl $0x1, %esi
callq 0x858ca
movq %r14, %rdi
movl $0x1, %esi
callq 0x858ca
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| _ZN5minja7Context3getERKNS_5ValueE:
push r15
push r14
push r12
push rbx
push rax
mov r14, rdx
mov r15, rsi
mov rbx, rdi
lea r12, [rsi+18h]
mov rdi, r12; this
mov rsi, rdx; minja::Value *
call _ZNK5minja5Value8containsERKS0_; minja::Value::contains(minja::Value const&)
test al, al
jz short loc_C04CA
mov rdi, r12; this
mov rsi, r14; minja::Value *
call _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&)
mov rdi, rbx; this
mov rsi, rax; minja::Value *
call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&)
jmp short loc_C051D
loc_C04CA:
mov rsi, [r15+68h]
test rsi, rsi
jz short loc_C04E1
mov rax, [rsi]
mov rdi, rbx
mov rdx, r14
call qword ptr [rax+10h]
jmp short loc_C051D
loc_C04E1:
lea r14, [rbx+40h]
mov qword ptr [rbx+48h], 0
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
movups xmmword ptr [rbx+10h], xmm0
movups xmmword ptr [rbx+20h], xmm0
movups xmmword ptr [rbx+30h], xmm0
mov byte ptr [rbx+40h], 0
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
loc_C051D:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| minja::Context * minja::Context::get(minja::Context *this, const minja::Value *a2, const minja::Value *a3)
{
const minja::Value *v4; // rax
long long v5; // rsi
if ( (unsigned __int8)minja::Value::contains((const minja::Value *)((char *)a2 + 24), a3) )
{
v4 = (const minja::Value *)minja::Value::at((const minja::Value *)((char *)a2 + 24), a3);
minja::Value::Value(this, v4);
}
else
{
v5 = *((_QWORD *)a2 + 13);
if ( v5 )
{
(*(void ( **)(minja::Context *, long long, const minja::Value *))(*(_QWORD *)v5 + 16LL))(this, v5, a3);
}
else
{
*((_QWORD *)this + 9) = 0LL;
*(_OWORD *)this = 0LL;
*((_OWORD *)this + 1) = 0LL;
*((_OWORD *)this + 2) = 0LL;
*((_OWORD *)this + 3) = 0LL;
*((_BYTE *)this + 64) = 0;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)this + 64);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)this + 64);
}
}
return this;
}
| get:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
LEA R12,[RSI + 0x18]
MOV RDI,R12
MOV RSI,RDX
CALL 0x001c069e
TEST AL,AL
JZ 0x001c04ca
MOV RDI,R12
MOV RSI,R14
CALL 0x001c08ea
MOV RDI,RBX
MOV RSI,RAX
CALL 0x001be22c
JMP 0x001c051d
LAB_001c04ca:
MOV RSI,qword ptr [R15 + 0x68]
TEST RSI,RSI
JZ 0x001c04e1
MOV RAX,qword ptr [RSI]
MOV RDI,RBX
MOV RDX,R14
CALL qword ptr [RAX + 0x10]
JMP 0x001c051d
LAB_001c04e1:
LEA R14,[RBX + 0x40]
MOV qword ptr [RBX + 0x48],0x0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
MOVUPS xmmword ptr [RBX + 0x10],XMM0
MOVUPS xmmword ptr [RBX + 0x20],XMM0
MOVUPS xmmword ptr [RBX + 0x30],XMM0
MOV byte ptr [RBX + 0x40],0x0
MOV RDI,R14
MOV ESI,0x1
CALL 0x001858ca
MOV RDI,R14
MOV ESI,0x1
CALL 0x001858ca
LAB_001c051d:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* minja::Context::get(minja::Value const&) */
Value * minja::Context::get(Value *param_1)
{
char cVar1;
Value *pVVar2;
Value *in_RDX;
long in_RSI;
bool bVar3;
cVar1 = Value::contains((Value *)(in_RSI + 0x18),in_RDX);
if (cVar1 == '\0') {
if (*(long **)(in_RSI + 0x68) == (long *)0x0) {
bVar3 = (bool)((char)param_1 + '@');
*(int8 *)(param_1 + 0x48) = 0;
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
*(int8 *)(param_1 + 0x18) = 0;
*(int8 *)(param_1 + 0x20) = 0;
*(int8 *)(param_1 + 0x28) = 0;
*(int8 *)(param_1 + 0x30) = 0;
*(int8 *)(param_1 + 0x38) = 0;
param_1[0x40] = (Value)0x0;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar3);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar3);
}
else {
(**(code **)(**(long **)(in_RSI + 0x68) + 0x10))(param_1);
}
}
else {
pVVar2 = (Value *)Value::at((Value *)(in_RSI + 0x18),in_RDX);
Value::Value(param_1,pVVar2);
}
return param_1;
}
| |
29,814 | ma_tls_write | eloqsql/libmariadb/libmariadb/secure/openssl.c | ssize_t ma_tls_write(MARIADB_TLS *ctls, const uchar* buffer, size_t length)
{
int rc;
MARIADB_PVIO *pvio= ctls->pvio;
while ((rc= SSL_write((SSL *)ctls->ssl, (void *)buffer, (int)length)) <= 0)
{
int error= SSL_get_error((SSL *)ctls->ssl, rc);
if (error != SSL_ERROR_WANT_WRITE)
break;
if (pvio->methods->wait_io_or_timeout(pvio, TRUE, pvio->mysql->options.write_timeout) < 1)
break;
}
if (rc <= 0)
{
MYSQL *mysql= SSL_get_app_data(ctls->ssl);
ma_tls_set_error(mysql);
}
return rc;
} | O0 | c | ma_tls_write:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
movl %eax, %edx
callq 0x14830
movl %eax, -0x1c(%rbp)
cmpl $0x0, %eax
jg 0x51db8
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0x1c(%rbp), %esi
callq 0x14040
movl %eax, -0x2c(%rbp)
cmpl $0x3, -0x2c(%rbp)
je 0x51d8a
jmp 0x51db8
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x28(%rbp), %rcx
movq 0x40(%rcx), %rcx
movl 0x398(%rcx), %edx
movl $0x1, %esi
callq *%rax
cmpl $0x1, %eax
jge 0x51db6
jmp 0x51db8
jmp 0x51d50
cmpl $0x0, -0x1c(%rbp)
jg 0x51dda
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
xorl %esi, %esi
callq 0x14150
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x519a0
movslq -0x1c(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_tls_write:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov [rbp+var_28], rax
loc_51D50:
mov rax, [rbp+var_8]
mov rdi, [rax+10h]
mov rsi, [rbp+var_10]
mov rax, [rbp+var_18]
mov edx, eax
call _SSL_write
mov [rbp+var_1C], eax
cmp eax, 0
jg short loc_51DB8
mov rax, [rbp+var_8]
mov rdi, [rax+10h]
mov esi, [rbp+var_1C]
call _SSL_get_error
mov [rbp+var_2C], eax
cmp [rbp+var_2C], 3
jz short loc_51D8A
jmp short loc_51DB8
loc_51D8A:
mov rax, [rbp+var_28]
mov rax, [rax+48h]
mov rax, [rax+30h]
mov rdi, [rbp+var_28]
mov rcx, [rbp+var_28]
mov rcx, [rcx+40h]
mov edx, [rcx+398h]
mov esi, 1
call rax
cmp eax, 1
jge short loc_51DB6
jmp short loc_51DB8
loc_51DB6:
jmp short loc_51D50
loc_51DB8:
cmp [rbp+var_1C], 0
jg short loc_51DDA
mov rax, [rbp+var_8]
mov rdi, [rax+10h]
xor esi, esi
call _SSL_get_ex_data
mov [rbp+var_38], rax
mov rdi, [rbp+var_38]
call ma_tls_set_error
loc_51DDA:
movsxd rax, [rbp+var_1C]
add rsp, 40h
pop rbp
retn
| long long ma_tls_write(long long a1, long long a2, unsigned int a3)
{
long long *v4; // [rsp+8h] [rbp-38h]
long long v5; // [rsp+18h] [rbp-28h]
int v6; // [rsp+24h] [rbp-1Ch]
v5 = *(_QWORD *)(a1 + 8);
do
v6 = SSL_write(*(_QWORD *)(a1 + 16), a2, a3);
while ( v6 <= 0
&& (unsigned int)SSL_get_error(*(_QWORD *)(a1 + 16), (unsigned int)v6) == 3
&& (*(int ( **)(long long, long long, _QWORD))(*(_QWORD *)(v5 + 72) + 48LL))(
v5,
1LL,
*(unsigned int *)(*(_QWORD *)(v5 + 64) + 920LL)) >= 1 );
if ( v6 <= 0 )
{
v4 = (long long *)SSL_get_ex_data(*(_QWORD *)(a1 + 16), 0LL);
ma_tls_set_error(v4);
}
return v6;
}
| ma_tls_write:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x28],RAX
LAB_00151d50:
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x10]
MOV RSI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV EDX,EAX
CALL 0x00114830
MOV dword ptr [RBP + -0x1c],EAX
CMP EAX,0x0
JG 0x00151db8
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x10]
MOV ESI,dword ptr [RBP + -0x1c]
CALL 0x00114040
MOV dword ptr [RBP + -0x2c],EAX
CMP dword ptr [RBP + -0x2c],0x3
JZ 0x00151d8a
JMP 0x00151db8
LAB_00151d8a:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x48]
MOV RAX,qword ptr [RAX + 0x30]
MOV RDI,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RCX + 0x40]
MOV EDX,dword ptr [RCX + 0x398]
MOV ESI,0x1
CALL RAX
CMP EAX,0x1
JGE 0x00151db6
JMP 0x00151db8
LAB_00151db6:
JMP 0x00151d50
LAB_00151db8:
CMP dword ptr [RBP + -0x1c],0x0
JG 0x00151dda
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x10]
XOR ESI,ESI
CALL 0x00114150
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x001519a0
LAB_00151dda:
MOVSXD RAX,dword ptr [RBP + -0x1c]
ADD RSP,0x40
POP RBP
RET
|
long ma_tls_write(long param_1,void *param_2,int param_3)
{
long lVar1;
int ret_code;
int iVar2;
void *pvVar3;
lVar1 = *(long *)(param_1 + 8);
do {
ret_code = SSL_write(*(SSL **)(param_1 + 0x10),param_2,param_3);
if ((0 < ret_code) || (iVar2 = SSL_get_error(*(SSL **)(param_1 + 0x10),ret_code), iVar2 != 3))
break;
iVar2 = (**(code **)(*(long *)(lVar1 + 0x48) + 0x30))
(lVar1,1,*(int4 *)(*(long *)(lVar1 + 0x40) + 0x398));
} while (0 < iVar2);
if (ret_code < 1) {
pvVar3 = SSL_get_ex_data(*(SSL **)(param_1 + 0x10),0);
ma_tls_set_error(pvVar3);
}
return (long)ret_code;
}
| |
29,815 | ma_calc_bin_pack_key_length | eloqsql/storage/maria/ma_search.c | int _ma_calc_bin_pack_key_length(const MARIA_KEY *int_key,
uint nod_flag,
uchar *next_key,
uchar *org_key, uchar *prev_key,
MARIA_KEY_PARAM *s_temp)
{
uint length,key_length,ref_length;
const uchar *key= int_key->data;
s_temp->totlength= key_length= (int_key->data_length + int_key->ref_length+
nod_flag);
#ifdef HAVE_valgrind
s_temp->n_length= s_temp->n_ref_length=0; /* For valgrind */
#endif
s_temp->key=key;
s_temp->prev_key=org_key;
if (prev_key) /* If not first key in block */
{
/* pack key against previous key */
/*
As keys may be identical when running a sort in maria_chk, we
have to guard against the case where keys may be identical
*/
const uchar *end;
end=key+key_length;
for ( ; *key == *prev_key && key < end; key++,prev_key++) ;
s_temp->ref_length= ref_length=(uint) (key-s_temp->key);
length=key_length - ref_length + get_pack_length(ref_length);
}
else
{
/* No previous key */
s_temp->ref_length=ref_length=0;
length=key_length+1;
}
if ((s_temp->next_key_pos=next_key)) /* If another key after */
{
/* pack key against next key */
uint next_length,next_length_pack;
get_key_pack_length(next_length,next_length_pack,next_key);
/* If first key and next key is packed (only on delete) */
if (!prev_key && org_key && next_length)
{
const uchar *end;
for (key= s_temp->key, end=key+next_length ;
*key == *org_key && key < end;
key++,org_key++) ;
ref_length= (uint) (key - s_temp->key);
}
if (next_length > ref_length)
{
/*
We put a key with different case between two keys with the same prefix
Extend next key to have same prefix as this key
*/
s_temp->n_ref_length= ref_length;
s_temp->prev_length= next_length-ref_length;
s_temp->prev_key+= ref_length;
return s_temp->move_length= ((int) (length+ s_temp->prev_length -
next_length_pack +
get_pack_length(ref_length)));
}
/* Check how many characters are identical to next key */
key= s_temp->key+next_length;
s_temp->prev_length= 0;
while (*key++ == *next_key++) ;
if ((ref_length= (uint) (key - s_temp->key)-1) == next_length)
{
s_temp->next_key_pos=0;
return (s_temp->move_length= length); /* Can't pack next key */
}
s_temp->n_ref_length=ref_length;
return s_temp->move_length= (int) (length-(ref_length - next_length) -
next_length_pack +
get_pack_length(ref_length));
}
return (s_temp->move_length= (int) length);
} | O0 | c | ma_calc_bin_pack_key_length:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x10(%rbp), %rax
addl 0x14(%rax), %ecx
addl -0x14(%rbp), %ecx
movl %ecx, -0x40(%rbp)
movq -0x38(%rbp), %rax
movl %ecx, 0x30(%rax)
movq -0x50(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
cmpq $0x0, -0x30(%rbp)
je 0x3ecd8
movq -0x50(%rbp), %rax
movl -0x40(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rax
movzbl (%rax), %ecx
movq -0x30(%rbp), %rax
movzbl (%rax), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x69(%rbp)
jne 0x3ec76
movq -0x50(%rbp), %rax
cmpq -0x58(%rbp), %rax
setb %al
movb %al, -0x69(%rbp)
movb -0x69(%rbp), %al
testb $0x1, %al
jne 0x3ec7f
jmp 0x3ec9b
jmp 0x3ec81
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x3ec51
movq -0x50(%rbp), %rax
movq -0x38(%rbp), %rcx
movq (%rcx), %rcx
subq %rcx, %rax
movl %eax, %ecx
movl %ecx, -0x44(%rbp)
movq -0x38(%rbp), %rax
movl %ecx, 0x20(%rax)
movl -0x40(%rbp), %eax
subl -0x44(%rbp), %eax
movl -0x44(%rbp), %esi
movl $0x1, %ecx
movl $0x3, %edx
cmpl $0xff, %esi
cmovael %edx, %ecx
addl %ecx, %eax
movl %eax, -0x3c(%rbp)
jmp 0x3ecf3
movl $0x0, -0x44(%rbp)
movq -0x38(%rbp), %rax
movl $0x0, 0x20(%rax)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
movq -0x20(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rax, 0x10(%rcx)
cmpq $0x0, %rax
je 0x3ef12
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xff, %eax
je 0x3ed35
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movzbl (%rax), %eax
movl %eax, -0x5c(%rbp)
movl $0x1, -0x60(%rbp)
jmp 0x3ed69
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %eax
movzwl %ax, %eax
movq -0x20(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzwl %ax, %eax
movl %eax, -0x5c(%rbp)
movq -0x20(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x20(%rbp)
movl $0x3, -0x60(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x3edf5
cmpq $0x0, -0x28(%rbp)
je 0x3edf5
cmpl $0x0, -0x5c(%rbp)
je 0x3edf5
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movl -0x5c(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movq -0x50(%rbp), %rax
movzbl (%rax), %ecx
movq -0x28(%rbp), %rax
movzbl (%rax), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x6a(%rbp)
jne 0x3edbf
movq -0x50(%rbp), %rax
cmpq -0x68(%rbp), %rax
setb %al
movb %al, -0x6a(%rbp)
movb -0x6a(%rbp), %al
testb $0x1, %al
jne 0x3edc8
jmp 0x3ede4
jmp 0x3edca
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x3ed9a
movq -0x50(%rbp), %rax
movq -0x38(%rbp), %rcx
movq (%rcx), %rcx
subq %rcx, %rax
movl %eax, -0x44(%rbp)
movl -0x5c(%rbp), %eax
cmpl -0x44(%rbp), %eax
jbe 0x3ee5c
movl -0x44(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x28(%rax)
movl -0x5c(%rbp), %ecx
subl -0x44(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x38(%rax)
movl -0x44(%rbp), %edx
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rcx
movl %edx, %edx
addq %rdx, %rcx
movq %rcx, 0x8(%rax)
movl -0x3c(%rbp), %eax
movq -0x38(%rbp), %rcx
addl 0x38(%rcx), %eax
subl -0x60(%rbp), %eax
movl -0x44(%rbp), %esi
movl $0x1, %ecx
movl $0x3, %edx
cmpl $0xff, %esi
cmovael %edx, %ecx
addl %ecx, %eax
movq -0x38(%rbp), %rcx
movl %eax, 0x44(%rcx)
movl %eax, -0x4(%rbp)
jmp 0x3ef1f
movq -0x38(%rbp), %rax
movq (%rax), %rax
movl -0x5c(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x38(%rbp), %rax
movl $0x0, 0x38(%rax)
movq -0x50(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x50(%rbp)
movzbl (%rax), %eax
movq -0x20(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movzbl (%rcx), %ecx
cmpl %ecx, %eax
jne 0x3eea2
jmp 0x3ee78
movq -0x50(%rbp), %rax
movq -0x38(%rbp), %rcx
movq (%rcx), %rcx
subq %rcx, %rax
subl $0x1, %eax
movl %eax, -0x44(%rbp)
cmpl -0x5c(%rbp), %eax
jne 0x3eed6
movq -0x38(%rbp), %rax
movq $0x0, 0x10(%rax)
movl -0x3c(%rbp), %eax
movq -0x38(%rbp), %rcx
movl %eax, 0x44(%rcx)
movl %eax, -0x4(%rbp)
jmp 0x3ef1f
movl -0x44(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x28(%rax)
movl -0x3c(%rbp), %eax
movl -0x44(%rbp), %ecx
subl -0x5c(%rbp), %ecx
subl %ecx, %eax
subl -0x60(%rbp), %eax
movl -0x44(%rbp), %esi
movl $0x1, %ecx
movl $0x3, %edx
cmpl $0xff, %esi
cmovael %edx, %ecx
addl %ecx, %eax
movq -0x38(%rbp), %rcx
movl %eax, 0x44(%rcx)
movl %eax, -0x4(%rbp)
jmp 0x3ef1f
movl -0x3c(%rbp), %eax
movq -0x38(%rbp), %rcx
movl %eax, 0x44(%rcx)
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ma_calc_bin_pack_key_length:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_50], rax
mov rax, [rbp+var_10]
mov ecx, [rax+10h]
mov rax, [rbp+var_10]
add ecx, [rax+14h]
add ecx, [rbp+var_14]
mov [rbp+var_40], ecx
mov rax, [rbp+var_38]
mov [rax+30h], ecx
mov rcx, [rbp+var_50]
mov rax, [rbp+var_38]
mov [rax], rcx
mov rcx, [rbp+var_28]
mov rax, [rbp+var_38]
mov [rax+8], rcx
cmp [rbp+var_30], 0
jz loc_3ECD8
mov rax, [rbp+var_50]
mov ecx, [rbp+var_40]
add rax, rcx
mov [rbp+var_58], rax
loc_3EC51:
mov rax, [rbp+var_50]
movzx ecx, byte ptr [rax]
mov rax, [rbp+var_30]
movzx edx, byte ptr [rax]
xor eax, eax
cmp ecx, edx
mov [rbp+var_69], al
jnz short loc_3EC76
mov rax, [rbp+var_50]
cmp rax, [rbp+var_58]
setb al
mov [rbp+var_69], al
loc_3EC76:
mov al, [rbp+var_69]
test al, 1
jnz short loc_3EC7F
jmp short loc_3EC9B
loc_3EC7F:
jmp short $+2
loc_3EC81:
mov rax, [rbp+var_50]
add rax, 1
mov [rbp+var_50], rax
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
jmp short loc_3EC51
loc_3EC9B:
mov rax, [rbp+var_50]
mov rcx, [rbp+var_38]
mov rcx, [rcx]
sub rax, rcx
mov ecx, eax
mov [rbp+var_44], ecx
mov rax, [rbp+var_38]
mov [rax+20h], ecx
mov eax, [rbp+var_40]
sub eax, [rbp+var_44]
mov esi, [rbp+var_44]
mov ecx, 1
mov edx, 3
cmp esi, 0FFh
cmovnb ecx, edx
add eax, ecx
mov [rbp+var_3C], eax
jmp short loc_3ECF3
loc_3ECD8:
mov [rbp+var_44], 0
mov rax, [rbp+var_38]
mov dword ptr [rax+20h], 0
mov eax, [rbp+var_40]
add eax, 1
mov [rbp+var_3C], eax
loc_3ECF3:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_38]
mov [rcx+10h], rax
cmp rax, 0
jz loc_3EF12
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
cmp eax, 0FFh
jz short loc_3ED35
mov rax, [rbp+var_20]
mov rcx, rax
add rcx, 1
mov [rbp+var_20], rcx
movzx eax, byte ptr [rax]
mov [rbp+var_5C], eax
mov [rbp+var_60], 1
jmp short loc_3ED69
loc_3ED35:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+2]
movzx eax, ax
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+1]
movzx ecx, cx
shl ecx, 8
or eax, ecx
movzx eax, ax
mov [rbp+var_5C], eax
mov rax, [rbp+var_20]
add rax, 3
mov [rbp+var_20], rax
mov [rbp+var_60], 3
loc_3ED69:
cmp [rbp+var_30], 0
jnz loc_3EDF5
cmp [rbp+var_28], 0
jz short loc_3EDF5
cmp [rbp+var_5C], 0
jz short loc_3EDF5
mov rax, [rbp+var_38]
mov rax, [rax]
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
mov ecx, [rbp+var_5C]
add rax, rcx
mov [rbp+var_68], rax
loc_3ED9A:
mov rax, [rbp+var_50]
movzx ecx, byte ptr [rax]
mov rax, [rbp+var_28]
movzx edx, byte ptr [rax]
xor eax, eax
cmp ecx, edx
mov [rbp+var_6A], al
jnz short loc_3EDBF
mov rax, [rbp+var_50]
cmp rax, [rbp+var_68]
setb al
mov [rbp+var_6A], al
loc_3EDBF:
mov al, [rbp+var_6A]
test al, 1
jnz short loc_3EDC8
jmp short loc_3EDE4
loc_3EDC8:
jmp short $+2
loc_3EDCA:
mov rax, [rbp+var_50]
add rax, 1
mov [rbp+var_50], rax
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
jmp short loc_3ED9A
loc_3EDE4:
mov rax, [rbp+var_50]
mov rcx, [rbp+var_38]
mov rcx, [rcx]
sub rax, rcx
mov [rbp+var_44], eax
loc_3EDF5:
mov eax, [rbp+var_5C]
cmp eax, [rbp+var_44]
jbe short loc_3EE5C
mov ecx, [rbp+var_44]
mov rax, [rbp+var_38]
mov [rax+28h], ecx
mov ecx, [rbp+var_5C]
sub ecx, [rbp+var_44]
mov rax, [rbp+var_38]
mov [rax+38h], ecx
mov edx, [rbp+var_44]
mov rax, [rbp+var_38]
mov rcx, [rax+8]
mov edx, edx
add rcx, rdx
mov [rax+8], rcx
mov eax, [rbp+var_3C]
mov rcx, [rbp+var_38]
add eax, [rcx+38h]
sub eax, [rbp+var_60]
mov esi, [rbp+var_44]
mov ecx, 1
mov edx, 3
cmp esi, 0FFh
cmovnb ecx, edx
add eax, ecx
mov rcx, [rbp+var_38]
mov [rcx+44h], eax
mov [rbp+var_4], eax
jmp loc_3EF1F
loc_3EE5C:
mov rax, [rbp+var_38]
mov rax, [rax]
mov ecx, [rbp+var_5C]
add rax, rcx
mov [rbp+var_50], rax
mov rax, [rbp+var_38]
mov dword ptr [rax+38h], 0
loc_3EE78:
mov rax, [rbp+var_50]
mov rcx, rax
add rcx, 1
mov [rbp+var_50], rcx
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_20]
mov rdx, rcx
add rdx, 1
mov [rbp+var_20], rdx
movzx ecx, byte ptr [rcx]
cmp eax, ecx
jnz short loc_3EEA2
jmp short loc_3EE78
loc_3EEA2:
mov rax, [rbp+var_50]
mov rcx, [rbp+var_38]
mov rcx, [rcx]
sub rax, rcx
sub eax, 1
mov [rbp+var_44], eax
cmp eax, [rbp+var_5C]
jnz short loc_3EED6
mov rax, [rbp+var_38]
mov qword ptr [rax+10h], 0
mov eax, [rbp+var_3C]
mov rcx, [rbp+var_38]
mov [rcx+44h], eax
mov [rbp+var_4], eax
jmp short loc_3EF1F
loc_3EED6:
mov ecx, [rbp+var_44]
mov rax, [rbp+var_38]
mov [rax+28h], ecx
mov eax, [rbp+var_3C]
mov ecx, [rbp+var_44]
sub ecx, [rbp+var_5C]
sub eax, ecx
sub eax, [rbp+var_60]
mov esi, [rbp+var_44]
mov ecx, 1
mov edx, 3
cmp esi, 0FFh
cmovnb ecx, edx
add eax, ecx
mov rcx, [rbp+var_38]
mov [rcx+44h], eax
mov [rbp+var_4], eax
jmp short loc_3EF1F
loc_3EF12:
mov eax, [rbp+var_3C]
mov rcx, [rbp+var_38]
mov [rcx+44h], eax
mov [rbp+var_4], eax
loc_3EF1F:
mov eax, [rbp+var_4]
pop rbp
retn
| long long ma_calc_bin_pack_key_length(
unsigned __int8 **a1,
int a2,
unsigned __int8 *a3,
unsigned __int8 *a4,
unsigned __int8 *a5,
unsigned __int8 **a6)
{
int v6; // ecx
int v7; // ecx
unsigned int v8; // eax
unsigned __int8 *v9; // rax
unsigned __int8 *v10; // rcx
int v11; // ecx
bool v13; // [rsp+0h] [rbp-6Ah]
bool v14; // [rsp+1h] [rbp-69h]
int v15; // [rsp+Ah] [rbp-60h]
unsigned int v16; // [rsp+Eh] [rbp-5Ch]
unsigned __int8 *v17; // [rsp+12h] [rbp-58h]
unsigned __int8 *v18; // [rsp+1Ah] [rbp-50h]
unsigned __int8 *i; // [rsp+1Ah] [rbp-50h]
unsigned __int8 *v20; // [rsp+1Ah] [rbp-50h]
unsigned int v21; // [rsp+26h] [rbp-44h]
unsigned int v22; // [rsp+26h] [rbp-44h]
int v23; // [rsp+2Ah] [rbp-40h]
unsigned int v24; // [rsp+2Eh] [rbp-3Ch]
unsigned __int8 *v25; // [rsp+3Ah] [rbp-30h]
unsigned __int8 *v26; // [rsp+42h] [rbp-28h]
unsigned __int8 *v27; // [rsp+4Ah] [rbp-20h]
v26 = a4;
v25 = a5;
v18 = *a1;
v23 = a2 + *((_DWORD *)a1 + 5) + *((_DWORD *)a1 + 4);
*((_DWORD *)a6 + 12) = v23;
*a6 = v18;
a6[1] = a4;
if ( a5 )
{
v17 = &v18[v23];
while ( 1 )
{
v14 = 0;
if ( *v18 == *v25 )
v14 = v18 < v17;
if ( !v14 )
break;
++v18;
++v25;
}
v21 = (_DWORD)v18 - (unsigned int)*a6;
*((_DWORD *)a6 + 8) = v21;
v6 = 1;
if ( v21 >= 0xFF )
v6 = 3;
v24 = v6 + v23 - v21;
}
else
{
v21 = 0;
*((_DWORD *)a6 + 8) = 0;
v24 = v23 + 1;
}
a6[2] = a3;
if ( a3 )
{
if ( *a3 == 255 )
{
v16 = _byteswap_ushort(*(_WORD *)(a3 + 1));
v27 = a3 + 3;
v15 = 3;
}
else
{
v27 = a3 + 1;
v16 = *a3;
v15 = 1;
}
if ( !v25 && v26 && v16 )
{
for ( i = *a6; ; ++i )
{
v13 = 0;
if ( *i == *v26 )
v13 = i < &(*a6)[v16];
if ( !v13 )
break;
++v26;
}
v21 = (_DWORD)i - *(_DWORD *)a6;
}
if ( v16 <= v21 )
{
v20 = &(*a6)[v16];
*((_DWORD *)a6 + 14) = 0;
do
{
v9 = v20++;
v10 = v27++;
}
while ( *v9 == *v10 );
v22 = (_DWORD)v20 - (unsigned int)*a6 - 1;
if ( v22 == v16 )
{
a6[2] = 0LL;
*((_DWORD *)a6 + 17) = v24;
return v24;
}
else
{
*((_DWORD *)a6 + 10) = v22;
v11 = 1;
if ( v22 >= 0xFF )
v11 = 3;
*((_DWORD *)a6 + 17) = v11 + v24 - (v22 - v16) - v15;
return v11 + v24 - (v22 - v16) - v15;
}
}
else
{
*((_DWORD *)a6 + 10) = v21;
*((_DWORD *)a6 + 14) = v16 - v21;
a6[1] += v21;
v7 = 1;
if ( v21 >= 0xFF )
v7 = 3;
v8 = v7 + *((_DWORD *)a6 + 14) + v24 - v15;
*((_DWORD *)a6 + 17) = v8;
return v8;
}
}
else
{
*((_DWORD *)a6 + 17) = v24;
return v24;
}
}
| _ma_calc_bin_pack_key_length:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x10]
ADD ECX,dword ptr [RAX + 0x14]
ADD ECX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x40],ECX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x30],ECX
MOV RCX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x8],RCX
CMP qword ptr [RBP + -0x30],0x0
JZ 0x0013ecd8
MOV RAX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RBP + -0x40]
ADD RAX,RCX
MOV qword ptr [RBP + -0x58],RAX
LAB_0013ec51:
MOV RAX,qword ptr [RBP + -0x50]
MOVZX ECX,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EDX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,EDX
MOV byte ptr [RBP + -0x69],AL
JNZ 0x0013ec76
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,qword ptr [RBP + -0x58]
SETC AL
MOV byte ptr [RBP + -0x69],AL
LAB_0013ec76:
MOV AL,byte ptr [RBP + -0x69]
TEST AL,0x1
JNZ 0x0013ec7f
JMP 0x0013ec9b
LAB_0013ec7f:
JMP 0x0013ec81
LAB_0013ec81:
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x1
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0013ec51
LAB_0013ec9b:
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RCX]
SUB RAX,RCX
MOV ECX,EAX
MOV dword ptr [RBP + -0x44],ECX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x20],ECX
MOV EAX,dword ptr [RBP + -0x40]
SUB EAX,dword ptr [RBP + -0x44]
MOV ESI,dword ptr [RBP + -0x44]
MOV ECX,0x1
MOV EDX,0x3
CMP ESI,0xff
CMOVNC ECX,EDX
ADD EAX,ECX
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x0013ecf3
LAB_0013ecd8:
MOV dword ptr [RBP + -0x44],0x0
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x20],0x0
MOV EAX,dword ptr [RBP + -0x40]
ADD EAX,0x1
MOV dword ptr [RBP + -0x3c],EAX
LAB_0013ecf3:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x38]
MOV qword ptr [RCX + 0x10],RAX
CMP RAX,0x0
JZ 0x0013ef12
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xff
JZ 0x0013ed35
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x20],RCX
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x5c],EAX
MOV dword ptr [RBP + -0x60],0x1
JMP 0x0013ed69
LAB_0013ed35:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x2]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0x1]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOVZX EAX,AX
MOV dword ptr [RBP + -0x5c],EAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x3
MOV qword ptr [RBP + -0x20],RAX
MOV dword ptr [RBP + -0x60],0x3
LAB_0013ed69:
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x0013edf5
CMP qword ptr [RBP + -0x28],0x0
JZ 0x0013edf5
CMP dword ptr [RBP + -0x5c],0x0
JZ 0x0013edf5
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RBP + -0x5c]
ADD RAX,RCX
MOV qword ptr [RBP + -0x68],RAX
LAB_0013ed9a:
MOV RAX,qword ptr [RBP + -0x50]
MOVZX ECX,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x28]
MOVZX EDX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,EDX
MOV byte ptr [RBP + -0x6a],AL
JNZ 0x0013edbf
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,qword ptr [RBP + -0x68]
SETC AL
MOV byte ptr [RBP + -0x6a],AL
LAB_0013edbf:
MOV AL,byte ptr [RBP + -0x6a]
TEST AL,0x1
JNZ 0x0013edc8
JMP 0x0013ede4
LAB_0013edc8:
JMP 0x0013edca
LAB_0013edca:
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x1
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0013ed9a
LAB_0013ede4:
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RCX]
SUB RAX,RCX
MOV dword ptr [RBP + -0x44],EAX
LAB_0013edf5:
MOV EAX,dword ptr [RBP + -0x5c]
CMP EAX,dword ptr [RBP + -0x44]
JBE 0x0013ee5c
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x28],ECX
MOV ECX,dword ptr [RBP + -0x5c]
SUB ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x38],ECX
MOV EDX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RAX + 0x8]
MOV EDX,EDX
ADD RCX,RDX
MOV qword ptr [RAX + 0x8],RCX
MOV EAX,dword ptr [RBP + -0x3c]
MOV RCX,qword ptr [RBP + -0x38]
ADD EAX,dword ptr [RCX + 0x38]
SUB EAX,dword ptr [RBP + -0x60]
MOV ESI,dword ptr [RBP + -0x44]
MOV ECX,0x1
MOV EDX,0x3
CMP ESI,0xff
CMOVNC ECX,EDX
ADD EAX,ECX
MOV RCX,qword ptr [RBP + -0x38]
MOV dword ptr [RCX + 0x44],EAX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0013ef1f
LAB_0013ee5c:
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x5c]
ADD RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x38],0x0
LAB_0013ee78:
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x50],RCX
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x20]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOVZX ECX,byte ptr [RCX]
CMP EAX,ECX
JNZ 0x0013eea2
JMP 0x0013ee78
LAB_0013eea2:
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RCX]
SUB RAX,RCX
SUB EAX,0x1
MOV dword ptr [RBP + -0x44],EAX
CMP EAX,dword ptr [RBP + -0x5c]
JNZ 0x0013eed6
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x10],0x0
MOV EAX,dword ptr [RBP + -0x3c]
MOV RCX,qword ptr [RBP + -0x38]
MOV dword ptr [RCX + 0x44],EAX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0013ef1f
LAB_0013eed6:
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x28],ECX
MOV EAX,dword ptr [RBP + -0x3c]
MOV ECX,dword ptr [RBP + -0x44]
SUB ECX,dword ptr [RBP + -0x5c]
SUB EAX,ECX
SUB EAX,dword ptr [RBP + -0x60]
MOV ESI,dword ptr [RBP + -0x44]
MOV ECX,0x1
MOV EDX,0x3
CMP ESI,0xff
CMOVNC ECX,EDX
ADD EAX,ECX
MOV RCX,qword ptr [RBP + -0x38]
MOV dword ptr [RCX + 0x44],EAX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0013ef1f
LAB_0013ef12:
MOV EAX,dword ptr [RBP + -0x3c]
MOV RCX,qword ptr [RBP + -0x38]
MOV dword ptr [RCX + 0x44],EAX
MOV dword ptr [RBP + -0x4],EAX
LAB_0013ef1f:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int _ma_calc_bin_pack_key_length
(int8 *param_1,int param_2,byte *param_3,char *param_4,char *param_5,
long *param_6)
{
byte bVar1;
byte bVar2;
char *pcVar3;
uint uVar4;
byte *pbVar5;
int local_68;
uint local_64;
byte *local_58;
uint local_4c;
int local_44;
char *local_38;
char *local_30;
byte *local_28;
int local_c;
local_58 = (byte *)*param_1;
uVar4 = *(int *)(param_1 + 2) + *(int *)((long)param_1 + 0x14) + param_2;
*(uint *)(param_6 + 6) = uVar4;
*param_6 = (long)local_58;
param_6[1] = (long)param_4;
local_38 = param_5;
if (param_5 == (char *)0x0) {
local_4c = 0;
*(int4 *)(param_6 + 4) = 0;
local_44 = uVar4 + 1;
}
else {
pcVar3 = (char *)local_58 + uVar4;
for (; *local_58 == *local_38 && local_58 < pcVar3; local_58 = local_58 + 1) {
local_38 = local_38 + 1;
}
local_4c = (int)local_58 - (int)*param_6;
*(uint *)(param_6 + 4) = local_4c;
local_44 = 1;
if (0xfe < local_4c) {
local_44 = 3;
}
local_44 = (uVar4 - local_4c) + local_44;
}
param_6[2] = (long)param_3;
if (param_3 == (byte *)0x0) {
*(int *)((long)param_6 + 0x44) = local_44;
local_c = local_44;
}
else {
if (*param_3 == 0xff) {
local_64 = (uint)CONCAT11(param_3[1],param_3[2]);
local_28 = param_3 + 3;
local_68 = 3;
}
else {
local_28 = param_3 + 1;
local_64 = (uint)*param_3;
local_68 = 1;
}
if (((local_38 == (char *)0x0) && (param_4 != (char *)0x0)) && (local_64 != 0)) {
local_58 = (byte *)*param_6;
pcVar3 = (char *)local_58 + local_64;
local_30 = param_4;
for (; *local_58 == *local_30 && local_58 < pcVar3; local_58 = local_58 + 1) {
local_30 = local_30 + 1;
}
local_4c = (int)local_58 - (int)*param_6;
}
if (local_4c < local_64) {
*(uint *)(param_6 + 5) = local_4c;
*(uint *)(param_6 + 7) = local_64 - local_4c;
param_6[1] = param_6[1] + (ulong)local_4c;
local_c = 1;
if (0xfe < local_4c) {
local_c = 3;
}
local_c = ((local_44 + (int)param_6[7]) - local_68) + local_c;
*(int *)((long)param_6 + 0x44) = local_c;
}
else {
*(int4 *)(param_6 + 7) = 0;
local_58 = (byte *)(*param_6 + (ulong)local_64);
do {
pbVar5 = local_58 + 1;
bVar1 = *local_58;
bVar2 = *local_28;
local_58 = pbVar5;
local_28 = local_28 + 1;
} while (bVar1 == bVar2);
uVar4 = ((int)pbVar5 - (int)*param_6) - 1;
if (uVar4 == local_64) {
param_6[2] = 0;
*(int *)((long)param_6 + 0x44) = local_44;
local_c = local_44;
}
else {
*(uint *)(param_6 + 5) = uVar4;
local_c = 1;
if (0xfe < uVar4) {
local_c = 3;
}
local_c = ((local_44 - (uVar4 - local_64)) - local_68) + local_c;
*(int *)((long)param_6 + 0x44) = local_c;
}
}
}
return local_c;
}
| |
29,816 | JS_NewAtomStr | bluesky950520[P]quickjs/quickjs.c | static JSAtom JS_NewAtomStr(JSContext *ctx, JSString *p)
{
JSRuntime *rt = ctx->rt;
uint32_t n;
if (is_num_string(&n, p)) {
if (n <= JS_ATOM_MAX_INT) {
js_free_string(rt, p);
return __JS_AtomFromUInt32(n);
}
}
/* XXX: should generate an exception */
return __JS_NewAtom(rt, p, JS_ATOM_TYPE_STRING);
} | O0 | c | JS_NewAtomStr:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rsi
leaq 0x4(%rsp), %rdi
callq 0x5b770
cmpl $0x0, %eax
je 0x271da
cmpl $0x7fffffff, 0x4(%rsp) # imm = 0x7FFFFFFF
ja 0x271d8
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x5b8b0
movl 0x4(%rsp), %edi
callq 0x272f0
movl %eax, 0x24(%rsp)
jmp 0x271f2
jmp 0x271da
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl $0x1, %edx
callq 0x27390
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
| JS_NewAtomStr:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov [rsp+28h+var_18], rsi
mov rax, [rsp+28h+var_10]
mov rax, [rax+18h]
mov [rsp+28h+var_20], rax
mov rsi, [rsp+28h+var_18]
lea rdi, [rsp+28h+var_24]
call is_num_string
cmp eax, 0
jz short loc_271DA
cmp [rsp+28h+var_24], 7FFFFFFFh
ja short loc_271D8
mov rdi, [rsp+28h+var_20]
mov rsi, [rsp+28h+var_18]
call js_free_string
mov edi, [rsp+28h+var_24]
call __JS_AtomFromUInt32
mov [rsp+28h+var_4], eax
jmp short loc_271F2
loc_271D8:
jmp short $+2
loc_271DA:
mov rdi, [rsp+28h+var_20]
mov rsi, [rsp+28h+var_18]
mov edx, 1
call __JS_NewAtom
mov [rsp+28h+var_4], eax
loc_271F2:
mov eax, [rsp+28h+var_4]
add rsp, 28h
retn
| long long JS_NewAtomStr(long long a1, long long a2)
{
unsigned int v3; // [rsp+4h] [rbp-24h] BYREF
long long v4; // [rsp+8h] [rbp-20h]
long long v5; // [rsp+10h] [rbp-18h]
long long v6; // [rsp+18h] [rbp-10h]
v6 = a1;
v5 = a2;
v4 = *(_QWORD *)(a1 + 24);
if ( (unsigned int)is_num_string(&v3, a2) && v3 <= 0x7FFFFFFF )
{
js_free_string(v4, v5);
return (unsigned int)_JS_AtomFromUInt32(v3);
}
else
{
return (unsigned int)_JS_NewAtom(v4, v5, 1LL);
}
}
| JS_NewAtomStr:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV qword ptr [RSP + 0x10],RSI
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x8],RAX
MOV RSI,qword ptr [RSP + 0x10]
LEA RDI,[RSP + 0x4]
CALL 0x0015b770
CMP EAX,0x0
JZ 0x001271da
CMP dword ptr [RSP + 0x4],0x7fffffff
JA 0x001271d8
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x0015b8b0
MOV EDI,dword ptr [RSP + 0x4]
CALL 0x001272f0
MOV dword ptr [RSP + 0x24],EAX
JMP 0x001271f2
LAB_001271d8:
JMP 0x001271da
LAB_001271da:
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x10]
MOV EDX,0x1
CALL 0x00127390
MOV dword ptr [RSP + 0x24],EAX
LAB_001271f2:
MOV EAX,dword ptr [RSP + 0x24]
ADD RSP,0x28
RET
|
int4 JS_NewAtomStr(long param_1,int8 param_2)
{
int iVar1;
uint local_24;
int8 local_20;
int8 local_18;
long local_10;
int4 local_4;
local_20 = *(int8 *)(param_1 + 0x18);
local_18 = param_2;
local_10 = param_1;
iVar1 = is_num_string(&local_24,param_2);
if ((iVar1 == 0) || (0x7fffffff < local_24)) {
local_4 = __JS_NewAtom(local_20,local_18,1);
}
else {
js_free_string(local_20,local_18);
local_4 = __JS_AtomFromUInt32(local_24);
}
return local_4;
}
| |
29,817 | JS_NewAtomStr | bluesky950520[P]quickjs/quickjs.c | static JSAtom JS_NewAtomStr(JSContext *ctx, JSString *p)
{
JSRuntime *rt = ctx->rt;
uint32_t n;
if (is_num_string(&n, p)) {
if (n <= JS_ATOM_MAX_INT) {
js_free_string(rt, p);
return __JS_AtomFromUInt32(n);
}
}
/* XXX: should generate an exception */
return __JS_NewAtom(rt, p, JS_ATOM_TYPE_STRING);
} | O1 | c | JS_NewAtomStr:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq 0x4(%rsi), %rax
movl %eax, %edx
andl $0x7fffffff, %edx # imm = 0x7FFFFFFF
leal -0xb(%rdx), %ecx
cmpl $-0xa, %ecx
jb 0x1f458
testl %eax, %eax
js 0x1f44a
movzbl 0x18(%rbx), %ecx
jmp 0x1f44e
movzwl 0x18(%rbx), %ecx
leal -0x30(%rcx), %r14d
cmpl $0x9, %r14d
jbe 0x1f4c0
xorl %ecx, %ecx
movq 0x18(%rdi), %r15
testb %cl, %cl
je 0x1f4ab
testl %r14d, %r14d
js 0x1f4ab
movl (%rbx), %ecx
leal -0x1(%rcx), %edx
movl %edx, (%rbx)
cmpl $0x1, %ecx
jg 0x1f537
shrq $0x3e, %rax
jne 0x1f52c
decq 0x28(%r15)
movq %rbx, %rdi
callq *0x20(%r15)
movq 0x30(%r15), %rcx
movq 0x40(%r15), %rdi
subq %rax, %rcx
addq $-0x8, %rcx
movq %rcx, 0x30(%r15)
movq %rbx, %rsi
callq *0x10(%r15)
jmp 0x1f537
movq %r15, %rdi
movq %rbx, %rsi
movl $0x1, %edx
popq %rbx
popq %r14
popq %r15
jmp 0x1f629
cmpl $0x30, %ecx
jne 0x1f4d0
cmpl $0x1, %edx
sete %cl
xorl %r14d, %r14d
jmp 0x1f45a
movb $0x1, %cl
cmpl $0x2, %edx
jb 0x1f45a
movl %eax, %edx
andl $0x7fffffff, %edx # imm = 0x7FFFFFFF
decq %rdx
xorl %esi, %esi
testl %eax, %eax
js 0x1f4f0
movzbl 0x19(%rbx,%rsi), %r8d
jmp 0x1f4f6
movzwl 0x1a(%rbx,%rsi,2), %r8d
addl $-0x30, %r8d
cmpl $0x9, %r8d
ja 0x1f458
movl %r14d, %r9d
leaq (%r9,%r9,4), %r9
movl %r8d, %r8d
leaq (%r8,%r9,2), %r14
movq %r14, %r8
shrq $0x20, %r8
jne 0x1f458
incq %rsi
cmpq %rsi, %rdx
jne 0x1f4e4
jmp 0x1f45a
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3ac4f
orl $0x80000000, %r14d # imm = 0x80000000
movl %r14d, %eax
popq %rbx
popq %r14
popq %r15
retq
| JS_NewAtomStr:
push r15
push r14
push rbx
mov rbx, rsi
mov rax, [rsi+4]
mov edx, eax
and edx, 7FFFFFFFh
lea ecx, [rdx-0Bh]
cmp ecx, 0FFFFFFF6h
jb short loc_1F458
test eax, eax
js short loc_1F44A
movzx ecx, byte ptr [rbx+18h]
jmp short loc_1F44E
loc_1F44A:
movzx ecx, word ptr [rbx+18h]
loc_1F44E:
lea r14d, [rcx-30h]
cmp r14d, 9
jbe short loc_1F4C0
loc_1F458:
xor ecx, ecx
loc_1F45A:
mov r15, [rdi+18h]
test cl, cl
jz short loc_1F4AB
test r14d, r14d
js short loc_1F4AB
mov ecx, [rbx]
lea edx, [rcx-1]
mov [rbx], edx
cmp ecx, 1
jg loc_1F537
shr rax, 3Eh
jnz loc_1F52C
dec qword ptr [r15+28h]
mov rdi, rbx
call qword ptr [r15+20h]
mov rcx, [r15+30h]
mov rdi, [r15+40h]
sub rcx, rax
add rcx, 0FFFFFFFFFFFFFFF8h
mov [r15+30h], rcx
mov rsi, rbx
call qword ptr [r15+10h]
jmp loc_1F537
loc_1F4AB:
mov rdi, r15
mov rsi, rbx
mov edx, 1
pop rbx
pop r14
pop r15
jmp __JS_NewAtom
loc_1F4C0:
cmp ecx, 30h ; '0'
jnz short loc_1F4D0
cmp edx, 1
setz cl
xor r14d, r14d
jmp short loc_1F45A
loc_1F4D0:
mov cl, 1
cmp edx, 2
jb short loc_1F45A
mov edx, eax
and edx, 7FFFFFFFh
dec rdx
xor esi, esi
loc_1F4E4:
test eax, eax
js short loc_1F4F0
movzx r8d, byte ptr [rbx+rsi+19h]
jmp short loc_1F4F6
loc_1F4F0:
movzx r8d, word ptr [rbx+rsi*2+1Ah]
loc_1F4F6:
add r8d, 0FFFFFFD0h
cmp r8d, 9
ja loc_1F458
mov r9d, r14d
lea r9, [r9+r9*4]
mov r8d, r8d
lea r14, [r8+r9*2]
mov r8, r14
shr r8, 20h
jnz loc_1F458
inc rsi
cmp rdx, rsi
jnz short loc_1F4E4
jmp loc_1F45A
loc_1F52C:
mov rdi, r15
mov rsi, rbx
call JS_FreeAtomStruct
loc_1F537:
or r14d, 80000000h
mov eax, r14d
pop rbx
pop r14
pop r15
retn
| long long JS_NewAtomStr(long long a1, long long a2)
{
unsigned long long v2; // r14
unsigned long long v4; // rax
unsigned int v5; // edx
int v6; // ecx
bool v7; // cl
long long v8; // r15
int v9; // ecx
long long v10; // rax
long long v11; // rdi
long long v13; // rsi
int v14; // r8d
unsigned int v15; // r8d
v4 = *(_QWORD *)(a2 + 4);
v5 = v4 & 0x7FFFFFFF;
if ( (v4 & 0x7FFFFFFF) - 11 >= 0xFFFFFFF6 )
{
v6 = (v4 & 0x80000000) != 0LL ? *(unsigned __int16 *)(a2 + 24) : *(unsigned __int8 *)(a2 + 24);
LODWORD(v2) = v6 - 48;
if ( (unsigned int)(v6 - 48) <= 9 )
{
if ( v6 == 48 )
{
v7 = v5 == 1;
LODWORD(v2) = 0;
goto LABEL_7;
}
v7 = 1;
if ( v5 < 2 )
goto LABEL_7;
v13 = 0LL;
while ( 1 )
{
v14 = (v4 & 0x80000000) != 0LL ? *(unsigned __int16 *)(a2 + 2 * v13 + 26) : *(unsigned __int8 *)(a2 + v13 + 25);
v15 = v14 - 48;
if ( v15 > 9 )
break;
v2 = v15 + 10LL * (unsigned int)v2;
if ( HIDWORD(v2) )
break;
if ( (v4 & 0x7FFFFFFF) - 1 == ++v13 )
goto LABEL_7;
}
}
}
v7 = 0;
LABEL_7:
v8 = *(_QWORD *)(a1 + 24);
if ( !v7 || (v2 & 0x80000000) != 0LL )
return _JS_NewAtom(*(_QWORD *)(a1 + 24), a2, 1LL);
v9 = (*(_DWORD *)a2)--;
if ( v9 <= 1 )
{
if ( v4 >> 62 )
{
JS_FreeAtomStruct(v8);
}
else
{
--*(_QWORD *)(v8 + 40);
v10 = (*(long long ( **)(long long))(v8 + 32))(a2);
v11 = *(_QWORD *)(v8 + 64);
*(_QWORD *)(v8 + 48) = *(_QWORD *)(v8 + 48) - v10 - 8;
(*(void ( **)(long long, long long))(v8 + 16))(v11, a2);
}
}
return (unsigned int)v2 | 0x80000000;
}
| JS_NewAtomStr:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV RAX,qword ptr [RSI + 0x4]
MOV EDX,EAX
AND EDX,0x7fffffff
LEA ECX,[RDX + -0xb]
CMP ECX,-0xa
JC 0x0011f458
TEST EAX,EAX
JS 0x0011f44a
MOVZX ECX,byte ptr [RBX + 0x18]
JMP 0x0011f44e
LAB_0011f44a:
MOVZX ECX,word ptr [RBX + 0x18]
LAB_0011f44e:
LEA R14D,[RCX + -0x30]
CMP R14D,0x9
JBE 0x0011f4c0
LAB_0011f458:
XOR ECX,ECX
LAB_0011f45a:
MOV R15,qword ptr [RDI + 0x18]
TEST CL,CL
JZ 0x0011f4ab
TEST R14D,R14D
JS 0x0011f4ab
MOV ECX,dword ptr [RBX]
LEA EDX,[RCX + -0x1]
MOV dword ptr [RBX],EDX
CMP ECX,0x1
JG 0x0011f537
SHR RAX,0x3e
JNZ 0x0011f52c
DEC qword ptr [R15 + 0x28]
MOV RDI,RBX
CALL qword ptr [R15 + 0x20]
MOV RCX,qword ptr [R15 + 0x30]
MOV RDI,qword ptr [R15 + 0x40]
SUB RCX,RAX
ADD RCX,-0x8
MOV qword ptr [R15 + 0x30],RCX
MOV RSI,RBX
CALL qword ptr [R15 + 0x10]
JMP 0x0011f537
LAB_0011f4ab:
MOV RDI,R15
MOV RSI,RBX
MOV EDX,0x1
POP RBX
POP R14
POP R15
JMP 0x0011f629
LAB_0011f4c0:
CMP ECX,0x30
JNZ 0x0011f4d0
CMP EDX,0x1
SETZ CL
XOR R14D,R14D
JMP 0x0011f45a
LAB_0011f4d0:
MOV CL,0x1
CMP EDX,0x2
JC 0x0011f45a
MOV EDX,EAX
AND EDX,0x7fffffff
DEC RDX
XOR ESI,ESI
LAB_0011f4e4:
TEST EAX,EAX
JS 0x0011f4f0
MOVZX R8D,byte ptr [RBX + RSI*0x1 + 0x19]
JMP 0x0011f4f6
LAB_0011f4f0:
MOVZX R8D,word ptr [RBX + RSI*0x2 + 0x1a]
LAB_0011f4f6:
ADD R8D,-0x30
CMP R8D,0x9
JA 0x0011f458
MOV R9D,R14D
LEA R9,[R9 + R9*0x4]
MOV R8D,R8D
LEA R14,[R8 + R9*0x2]
MOV R8,R14
SHR R8,0x20
JNZ 0x0011f458
INC RSI
CMP RDX,RSI
JNZ 0x0011f4e4
JMP 0x0011f45a
LAB_0011f52c:
MOV RDI,R15
MOV RSI,RBX
CALL 0x0013ac4f
LAB_0011f537:
OR R14D,0x80000000
MOV EAX,R14D
POP RBX
POP R14
POP R15
RET
|
ulong JS_NewAtomStr(long param_1,int *param_2)
{
int iVar1;
uint uVar2;
long lVar3;
ulong uVar4;
uint uVar5;
uint uVar6;
long lVar7;
ulong unaff_R14;
bool bVar8;
uVar2 = (uint)*(ulong *)(param_2 + 1);
uVar6 = uVar2 & 0x7fffffff;
if (0xfffffff5 < uVar6 - 0xb) {
if ((int)uVar2 < 0) {
uVar5 = (uint)*(ushort *)(param_2 + 6);
}
else {
uVar5 = (uint)*(byte *)(param_2 + 6);
}
unaff_R14 = (ulong)(uVar5 - 0x30);
if (uVar5 - 0x30 < 10) {
if (uVar5 == 0x30) {
bVar8 = uVar6 == 1;
unaff_R14 = 0;
}
else {
bVar8 = true;
if (1 < uVar6) {
lVar7 = 0;
do {
if ((int)uVar2 < 0) {
uVar6 = (uint)*(ushort *)((long)param_2 + lVar7 * 2 + 0x1a);
}
else {
uVar6 = (uint)*(byte *)((long)param_2 + lVar7 + 0x19);
}
if ((9 < uVar6 - 0x30) ||
(unaff_R14 = (ulong)(uVar6 - 0x30) + (unaff_R14 & 0xffffffff) * 10,
unaff_R14 >> 0x20 != 0)) goto LAB_0011f458;
lVar7 = lVar7 + 1;
} while ((ulong)(uVar2 & 0x7fffffff) - 1 != lVar7);
}
}
goto LAB_0011f45a;
}
}
LAB_0011f458:
bVar8 = false;
LAB_0011f45a:
lVar7 = *(long *)(param_1 + 0x18);
if ((bVar8) && (-1 < (int)(uint)unaff_R14)) {
iVar1 = *param_2;
*param_2 = iVar1 + -1;
if (iVar1 < 2) {
if (*(ulong *)(param_2 + 1) >> 0x3e == 0) {
*(long *)(lVar7 + 0x28) = *(long *)(lVar7 + 0x28) + -1;
lVar3 = (**(code **)(lVar7 + 0x20))(param_2);
*(long *)(lVar7 + 0x30) = (*(long *)(lVar7 + 0x30) - lVar3) + -8;
(**(code **)(lVar7 + 0x10))(*(int8 *)(lVar7 + 0x40),param_2);
}
else {
JS_FreeAtomStruct(lVar7,param_2);
}
}
return (ulong)((uint)unaff_R14 | 0x80000000);
}
uVar4 = __JS_NewAtom(lVar7,param_2,1);
return uVar4;
}
| |
29,818 | JS_NewAtomStr | bluesky950520[P]quickjs/quickjs.c | static JSAtom JS_NewAtomStr(JSContext *ctx, JSString *p)
{
JSRuntime *rt = ctx->rt;
uint32_t n;
if (is_num_string(&n, p)) {
if (n <= JS_ATOM_MAX_INT) {
js_free_string(rt, p);
return __JS_AtomFromUInt32(n);
}
}
/* XXX: should generate an exception */
return __JS_NewAtom(rt, p, JS_ATOM_TYPE_STRING);
} | O3 | c | JS_NewAtomStr:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq 0x18(%rdi), %r14
movq 0x4(%rsi), %rax
movl %eax, %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
leal -0xb(%rcx), %edx
cmpl $-0xa, %edx
jb 0x1fb9b
testl %eax, %eax
js 0x1fb8d
movzbl 0x18(%rbx), %edx
jmp 0x1fb91
movzwl 0x18(%rbx), %edx
leal -0x30(%rdx), %r15d
cmpl $0x9, %r15d
jbe 0x1fbb0
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %edx
popq %rbx
popq %r14
popq %r15
jmp 0x1fd32
cmpl $0x30, %edx
jne 0x1fbbf
xorl %r15d, %r15d
cmpl $0x1, %ecx
jne 0x1fb9b
jmp 0x1fc0c
cmpl $0x2, %ecx
jb 0x1fc0c
movl %eax, %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
decq %rcx
xorl %edx, %edx
testl %eax, %eax
js 0x1fbdc
movzbl 0x19(%rbx,%rdx), %esi
jmp 0x1fbe1
movzwl 0x1a(%rbx,%rdx,2), %esi
addl $-0x30, %esi
cmpl $0x9, %esi
ja 0x1fb9b
movl %r15d, %edi
leaq (%rdi,%rdi,4), %rdi
movl %esi, %esi
leaq (%rsi,%rdi,2), %r15
movq %r15, %rsi
shrq $0x20, %rsi
jne 0x1fb9b
incq %rdx
cmpq %rdx, %rcx
jne 0x1fbd1
testl %r15d, %r15d
js 0x1fb9b
movl (%rbx), %ecx
leal -0x1(%rcx), %edx
movl %edx, (%rbx)
cmpl $0x1, %ecx
jg 0x1fc50
shrq $0x3e, %rax
jne 0x1fc45
decq 0x28(%r14)
movq %rbx, %rdi
callq *0x20(%r14)
movq 0x30(%r14), %rcx
movq 0x40(%r14), %rdi
subq %rax, %rcx
addq $-0x8, %rcx
movq %rcx, 0x30(%r14)
movq %rbx, %rsi
callq *0x10(%r14)
jmp 0x1fc50
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3c2d5
orl $0x80000000, %r15d # imm = 0x80000000
movl %r15d, %eax
popq %rbx
popq %r14
popq %r15
retq
| JS_NewAtomStr:
push r15
push r14
push rbx
mov rbx, rsi
mov r14, [rdi+18h]
mov rax, [rsi+4]
mov ecx, eax
and ecx, 7FFFFFFFh
lea edx, [rcx-0Bh]
cmp edx, 0FFFFFFF6h
jb short loc_1FB9B
test eax, eax
js short loc_1FB8D
movzx edx, byte ptr [rbx+18h]
jmp short loc_1FB91
loc_1FB8D:
movzx edx, word ptr [rbx+18h]
loc_1FB91:
lea r15d, [rdx-30h]
cmp r15d, 9
jbe short loc_1FBB0
loc_1FB9B:
mov rdi, r14
mov rsi, rbx
mov edx, 1
pop rbx
pop r14
pop r15
jmp __JS_NewAtom
loc_1FBB0:
cmp edx, 30h ; '0'
jnz short loc_1FBBF
xor r15d, r15d
cmp ecx, 1
jnz short loc_1FB9B
jmp short loc_1FC0C
loc_1FBBF:
cmp ecx, 2
jb short loc_1FC0C
mov ecx, eax
and ecx, 7FFFFFFFh
dec rcx
xor edx, edx
loc_1FBD1:
test eax, eax
js short loc_1FBDC
movzx esi, byte ptr [rbx+rdx+19h]
jmp short loc_1FBE1
loc_1FBDC:
movzx esi, word ptr [rbx+rdx*2+1Ah]
loc_1FBE1:
add esi, 0FFFFFFD0h
cmp esi, 9
ja short loc_1FB9B
mov edi, r15d
lea rdi, [rdi+rdi*4]
mov esi, esi
lea r15, [rsi+rdi*2]
mov rsi, r15
shr rsi, 20h
jnz short loc_1FB9B
inc rdx
cmp rcx, rdx
jnz short loc_1FBD1
test r15d, r15d
js short loc_1FB9B
loc_1FC0C:
mov ecx, [rbx]
lea edx, [rcx-1]
mov [rbx], edx
cmp ecx, 1
jg short loc_1FC50
shr rax, 3Eh
jnz short loc_1FC45
dec qword ptr [r14+28h]
mov rdi, rbx
call qword ptr [r14+20h]
mov rcx, [r14+30h]
mov rdi, [r14+40h]
sub rcx, rax
add rcx, 0FFFFFFFFFFFFFFF8h
mov [r14+30h], rcx
mov rsi, rbx
call qword ptr [r14+10h]
jmp short loc_1FC50
loc_1FC45:
mov rdi, r14
mov rsi, rbx
call JS_FreeAtomStruct
loc_1FC50:
or r15d, 80000000h
mov eax, r15d
pop rbx
pop r14
pop r15
retn
| long long JS_NewAtomStr(long long a1, long long a2)
{
long long v3; // r14
unsigned long long v4; // rax
unsigned int v5; // ecx
int v6; // edx
unsigned long long v7; // r15
long long v9; // rdx
int v10; // esi
unsigned int v11; // esi
int v12; // ecx
long long v13; // rax
long long v14; // rdi
v3 = *(_QWORD *)(a1 + 24);
v4 = *(_QWORD *)(a2 + 4);
v5 = v4 & 0x7FFFFFFF;
if ( (v4 & 0x7FFFFFFF) - 11 < 0xFFFFFFF6 )
return _JS_NewAtom(v3, a2, 1LL);
v6 = (v4 & 0x80000000) != 0LL ? *(unsigned __int16 *)(a2 + 24) : *(unsigned __int8 *)(a2 + 24);
LODWORD(v7) = v6 - 48;
if ( (unsigned int)(v6 - 48) > 9 )
return _JS_NewAtom(v3, a2, 1LL);
if ( v6 == 48 )
{
LODWORD(v7) = 0;
if ( v5 != 1 )
return _JS_NewAtom(v3, a2, 1LL);
}
else if ( v5 >= 2 )
{
v9 = 0LL;
while ( 1 )
{
v10 = (v4 & 0x80000000) != 0LL ? *(unsigned __int16 *)(a2 + 2 * v9 + 26) : *(unsigned __int8 *)(a2 + v9 + 25);
v11 = v10 - 48;
if ( v11 > 9 )
break;
v7 = v11 + 10LL * (unsigned int)v7;
if ( HIDWORD(v7) )
break;
if ( (v4 & 0x7FFFFFFF) - 1 == ++v9 )
{
if ( (v7 & 0x80000000) != 0LL )
return _JS_NewAtom(v3, a2, 1LL);
goto LABEL_19;
}
}
return _JS_NewAtom(v3, a2, 1LL);
}
LABEL_19:
v12 = (*(_DWORD *)a2)--;
if ( v12 <= 1 )
{
if ( v4 >> 62 )
{
JS_FreeAtomStruct(v3);
}
else
{
--*(_QWORD *)(v3 + 40);
v13 = (*(long long ( **)(long long))(v3 + 32))(a2);
v14 = *(_QWORD *)(v3 + 64);
*(_QWORD *)(v3 + 48) = *(_QWORD *)(v3 + 48) - v13 - 8;
(*(void ( **)(long long, long long))(v3 + 16))(v14, a2);
}
}
return (unsigned int)v7 | 0x80000000;
}
| JS_NewAtomStr:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R14,qword ptr [RDI + 0x18]
MOV RAX,qword ptr [RSI + 0x4]
MOV ECX,EAX
AND ECX,0x7fffffff
LEA EDX,[RCX + -0xb]
CMP EDX,-0xa
JC 0x0011fb9b
TEST EAX,EAX
JS 0x0011fb8d
MOVZX EDX,byte ptr [RBX + 0x18]
JMP 0x0011fb91
LAB_0011fb8d:
MOVZX EDX,word ptr [RBX + 0x18]
LAB_0011fb91:
LEA R15D,[RDX + -0x30]
CMP R15D,0x9
JBE 0x0011fbb0
LAB_0011fb9b:
MOV RDI,R14
MOV RSI,RBX
MOV EDX,0x1
POP RBX
POP R14
POP R15
JMP 0x0011fd32
LAB_0011fbb0:
CMP EDX,0x30
JNZ 0x0011fbbf
XOR R15D,R15D
CMP ECX,0x1
JNZ 0x0011fb9b
JMP 0x0011fc0c
LAB_0011fbbf:
CMP ECX,0x2
JC 0x0011fc0c
MOV ECX,EAX
AND ECX,0x7fffffff
DEC RCX
XOR EDX,EDX
LAB_0011fbd1:
TEST EAX,EAX
JS 0x0011fbdc
MOVZX ESI,byte ptr [RBX + RDX*0x1 + 0x19]
JMP 0x0011fbe1
LAB_0011fbdc:
MOVZX ESI,word ptr [RBX + RDX*0x2 + 0x1a]
LAB_0011fbe1:
ADD ESI,-0x30
CMP ESI,0x9
JA 0x0011fb9b
MOV EDI,R15D
LEA RDI,[RDI + RDI*0x4]
MOV ESI,ESI
LEA R15,[RSI + RDI*0x2]
MOV RSI,R15
SHR RSI,0x20
JNZ 0x0011fb9b
INC RDX
CMP RCX,RDX
JNZ 0x0011fbd1
TEST R15D,R15D
JS 0x0011fb9b
LAB_0011fc0c:
MOV ECX,dword ptr [RBX]
LEA EDX,[RCX + -0x1]
MOV dword ptr [RBX],EDX
CMP ECX,0x1
JG 0x0011fc50
SHR RAX,0x3e
JNZ 0x0011fc45
DEC qword ptr [R14 + 0x28]
MOV RDI,RBX
CALL qword ptr [R14 + 0x20]
MOV RCX,qword ptr [R14 + 0x30]
MOV RDI,qword ptr [R14 + 0x40]
SUB RCX,RAX
ADD RCX,-0x8
MOV qword ptr [R14 + 0x30],RCX
MOV RSI,RBX
CALL qword ptr [R14 + 0x10]
JMP 0x0011fc50
LAB_0011fc45:
MOV RDI,R14
MOV RSI,RBX
CALL 0x0013c2d5
LAB_0011fc50:
OR R15D,0x80000000
MOV EAX,R15D
POP RBX
POP R14
POP R15
RET
|
ulong JS_NewAtomStr(long param_1,int *param_2)
{
int iVar1;
long lVar2;
uint uVar3;
ulong uVar4;
long lVar5;
uint uVar6;
uint uVar7;
lVar2 = *(long *)(param_1 + 0x18);
uVar3 = (uint)*(ulong *)(param_2 + 1);
uVar6 = uVar3 & 0x7fffffff;
if (0xfffffff5 < uVar6 - 0xb) {
if ((int)uVar3 < 0) {
uVar7 = (uint)*(ushort *)(param_2 + 6);
}
else {
uVar7 = (uint)*(byte *)(param_2 + 6);
}
uVar4 = (ulong)(uVar7 - 0x30);
if (uVar7 - 0x30 < 10) {
if (uVar7 == 0x30) {
uVar4 = 0;
if (uVar6 != 1) goto LAB_0011fb9b;
}
else if (1 < uVar6) {
lVar5 = 0;
do {
if ((int)uVar3 < 0) {
uVar6 = (uint)*(ushort *)((long)param_2 + lVar5 * 2 + 0x1a);
}
else {
uVar6 = (uint)*(byte *)((long)param_2 + lVar5 + 0x19);
}
if ((9 < uVar6 - 0x30) ||
(uVar4 = (ulong)(uVar6 - 0x30) + (uVar4 & 0xffffffff) * 10, uVar4 >> 0x20 != 0))
goto LAB_0011fb9b;
lVar5 = lVar5 + 1;
} while ((ulong)(uVar3 & 0x7fffffff) - 1 != lVar5);
if ((int)uVar4 < 0) goto LAB_0011fb9b;
}
iVar1 = *param_2;
*param_2 = iVar1 + -1;
if (iVar1 < 2) {
if (*(ulong *)(param_2 + 1) >> 0x3e == 0) {
*(long *)(lVar2 + 0x28) = *(long *)(lVar2 + 0x28) + -1;
lVar5 = (**(code **)(lVar2 + 0x20))(param_2);
*(long *)(lVar2 + 0x30) = (*(long *)(lVar2 + 0x30) - lVar5) + -8;
(**(code **)(lVar2 + 0x10))(*(int8 *)(lVar2 + 0x40),param_2);
}
else {
JS_FreeAtomStruct(lVar2,param_2);
}
}
return (ulong)((uint)uVar4 | 0x80000000);
}
}
LAB_0011fb9b:
uVar4 = __JS_NewAtom(lVar2,param_2,1);
return uVar4;
}
| |
29,819 | ggml_graph_export_node | 7CodeWizard[P]stablediffusion/ggml/src/ggml.c | static void ggml_graph_export_node(const struct ggml_tensor * tensor, const char * arg, FILE * fout) {
const int64_t * ne = tensor->ne;
const size_t * nb = tensor->nb;
fprintf(fout, "%-6s %-6s %-12s %8d %" PRId64 " %" PRId64 " %" PRId64 " %" PRId64 " %16zu %16zu %16zu %16zu %16p %32s\n",
arg,
ggml_type_name(tensor->type),
ggml_op_name (tensor->op),
ggml_n_dims(tensor),
ne[0], ne[1], ne[2], ne[3],
nb[0], nb[1], nb[2], nb[3],
tensor->data,
tensor->name);
} | O0 | c | ggml_graph_export_node:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movq %rdx, 0x90(%rsp)
movq 0xa0(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x88(%rsp)
movq 0xa0(%rsp), %rax
addq $0x30, %rax
movq %rax, 0x80(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0xa0(%rsp), %rax
movl (%rax), %edi
callq 0x11b090
movq %rax, 0x68(%rsp)
movq 0xa0(%rsp), %rax
movl 0x50(%rax), %edi
callq 0x11b0d0
movq %rax, 0x70(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x11b310
movq 0x58(%rsp), %rdi
movq 0x60(%rsp), %rdx
movq 0x68(%rsp), %rcx
movq 0x70(%rsp), %r8
movl %eax, %r9d
movq 0x88(%rsp), %rax
movq (%rax), %rax
movq 0x88(%rsp), %rsi
movq 0x8(%rsi), %rbp
movq 0x88(%rsp), %rsi
movq 0x10(%rsi), %r13
movq 0x88(%rsp), %rsi
movq 0x18(%rsi), %r12
movq 0x80(%rsp), %rsi
movq (%rsi), %r15
movq 0x80(%rsp), %rsi
movq 0x8(%rsi), %r14
movq 0x80(%rsp), %rsi
movq 0x10(%rsi), %rbx
movq 0x80(%rsp), %rsi
movq 0x18(%rsi), %r11
movq 0xa0(%rsp), %rsi
movq 0x118(%rsi), %r10
movq 0xa0(%rsp), %rsi
addq $0x120, %rsi # imm = 0x120
movq %rsi, 0x78(%rsp)
leaq 0x5b8c9(%rip), %rsi # 0x18c309
movq %rax, (%rsp)
movq 0x78(%rsp), %rax
movq %rbp, 0x8(%rsp)
movq %r13, 0x10(%rsp)
movq %r12, 0x18(%rsp)
movq %r15, 0x20(%rsp)
movq %r14, 0x28(%rsp)
movq %rbx, 0x30(%rsp)
movq %r11, 0x38(%rsp)
movq %r10, 0x40(%rsp)
movq %rax, 0x48(%rsp)
movb $0x0, %al
callq 0xbae0
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| ggml_graph_export_node:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0A8h
mov [rsp+0D8h+var_38], rdi
mov [rsp+0D8h+var_40], rsi
mov [rsp+0D8h+var_48], rdx
mov rax, [rsp+0D8h+var_38]
add rax, 10h
mov [rsp+0D8h+var_50], rax
mov rax, [rsp+0D8h+var_38]
add rax, 30h ; '0'
mov [rsp+0D8h+var_58], rax
mov rax, [rsp+0D8h+var_48]
mov [rsp+0D8h+var_80], rax
mov rax, [rsp+0D8h+var_40]
mov [rsp+0D8h+var_78], rax
mov rax, [rsp+0D8h+var_38]
mov edi, [rax]
call ggml_type_name
mov [rsp+0D8h+var_70], rax
mov rax, [rsp+0D8h+var_38]
mov edi, [rax+50h]
call ggml_op_name
mov [rsp+0D8h+var_68], rax
mov rdi, [rsp+0D8h+var_38]
call ggml_n_dims
mov rdi, [rsp+0D8h+var_80]
mov rdx, [rsp+0D8h+var_78]
mov rcx, [rsp+0D8h+var_70]
mov r8, [rsp+0D8h+var_68]
mov r9d, eax
mov rax, [rsp+0D8h+var_50]
mov rax, [rax]
mov rsi, [rsp+0D8h+var_50]
mov rbp, [rsi+8]
mov rsi, [rsp+0D8h+var_50]
mov r13, [rsi+10h]
mov rsi, [rsp+0D8h+var_50]
mov r12, [rsi+18h]
mov rsi, [rsp+0D8h+var_58]
mov r15, [rsi]
mov rsi, [rsp+0D8h+var_58]
mov r14, [rsi+8]
mov rsi, [rsp+0D8h+var_58]
mov rbx, [rsi+10h]
mov rsi, [rsp+0D8h+var_58]
mov r11, [rsi+18h]
mov rsi, [rsp+0D8h+var_38]
mov r10, [rsi+118h]
mov rsi, [rsp+0D8h+var_38]
add rsi, 120h
mov [rsp+0D8h+var_60], rsi
lea rsi, a6s6s12s8dLdLdL; "%-6s %-6s %-12s %8d %ld %ld %ld %ld %16"...
mov [rsp+0D8h+var_D8], rax
mov rax, [rsp+0D8h+var_60]
mov [rsp+0D8h+var_D0], rbp
mov [rsp+0D8h+var_C8], r13
mov [rsp+0D8h+var_C0], r12
mov [rsp+0D8h+var_B8], r15
mov [rsp+0D8h+var_B0], r14
mov [rsp+0D8h+var_A8], rbx
mov [rsp+0D8h+var_A0], r11
mov [rsp+0D8h+var_98], r10
mov [rsp+0D8h+var_90], rax
mov al, 0
call _fprintf
add rsp, 0A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ggml_graph_export_node(long long a1, const char *a2, long long a3)
{
int v3; // eax
char *v6; // [rsp+68h] [rbp-70h]
const char *v7; // [rsp+70h] [rbp-68h]
v6 = ggml_type_name(*(_DWORD *)a1);
v7 = (const char *)ggml_op_name(*(_DWORD *)(a1 + 80));
v3 = ggml_n_dims(a1);
return fprintf(
a3,
"%-6s %-6s %-12s %8d %ld %ld %ld %ld %16zu %16zu %16zu %16zu %16p %32s\n",
a2,
v6,
v7,
v3,
*(_QWORD *)(a1 + 16),
*(_QWORD *)(a1 + 24),
*(_QWORD *)(a1 + 32),
*(_QWORD *)(a1 + 40),
*(_QWORD *)(a1 + 48),
*(_QWORD *)(a1 + 56),
*(_QWORD *)(a1 + 64),
*(_QWORD *)(a1 + 72),
*(const void **)(a1 + 280),
(const char *)(a1 + 288));
}
| |||
29,820 | ggml_graph_export_node | 7CodeWizard[P]stablediffusion/ggml/src/ggml.c | static void ggml_graph_export_node(const struct ggml_tensor * tensor, const char * arg, FILE * fout) {
const int64_t * ne = tensor->ne;
const size_t * nb = tensor->nb;
fprintf(fout, "%-6s %-6s %-12s %8d %" PRId64 " %" PRId64 " %" PRId64 " %" PRId64 " %16zu %16zu %16zu %16zu %16p %32s\n",
arg,
ggml_type_name(tensor->type),
ggml_op_name (tensor->op),
ggml_n_dims(tensor),
ne[0], ne[1], ne[2], ne[3],
nb[0], nb[1], nb[2], nb[3],
tensor->data,
tensor->name);
} | O2 | c | ggml_graph_export_node:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movl (%rdi), %eax
movl 0x50(%rdi), %ecx
imulq $0x48, %rax, %rax
leaq 0x61f30(%rip), %rdx # 0xd52a0
movq (%rax,%rdx), %r12
leaq 0x62485(%rip), %rax # 0xd5800
movq (%rax,%rcx,8), %r13
callq 0x67d2a
vmovups 0x10(%r15), %ymm0
vmovups 0x30(%r15), %ymm1
movq 0x118(%r15), %rcx
addq $0x120, %r15 # imm = 0x120
movq %r15, 0x48(%rsp)
movq %rcx, 0x40(%rsp)
vmovups %ymm1, 0x20(%rsp)
vmovups %ymm0, (%rsp)
leaq 0x30f8a(%rip), %rsi # 0xa4344
movq %r14, %rdi
movq %rbx, %rdx
movq %r12, %rcx
movq %r13, %r8
movl %eax, %r9d
xorl %eax, %eax
vzeroupper
callq 0xa8b0
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| ggml_graph_export_node:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 50h
mov r14, rdx
mov rbx, rsi
mov r15, rdi
mov eax, [rdi]
mov ecx, [rdi+50h]
imul rax, 48h ; 'H'
lea rdx, type_traits
mov r12, [rax+rdx]
lea rax, GGML_OP_NAME
mov r13, [rax+rcx*8]
call ggml_n_dims
vmovups ymm0, ymmword ptr [r15+10h]
vmovups ymm1, ymmword ptr [r15+30h]
mov rcx, [r15+118h]
add r15, 120h
mov [rsp+78h+var_30], r15
mov [rsp+78h+var_38], rcx
vmovups [rsp+78h+var_58], ymm1
vmovups [rsp+78h+var_78], ymm0
lea rsi, a6s6s12s8dLdLdL; "%-6s %-6s %-12s %8d %ld %ld %ld %ld %16"...
mov rdi, r14
mov rdx, rbx
mov rcx, r12
mov r8, r13
mov r9d, eax
xor eax, eax
vzeroupper
call _fprintf
add rsp, 50h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| double ggml_graph_export_node(unsigned int *a1, const char *a2, long long a3)
{
const char *v5; // r12
const char *v6; // r13
int v7; // eax
__m256 v11; // [rsp+0h] [rbp-78h]
__m256 v12; // [rsp+20h] [rbp-58h]
_R15 = a1;
v5 = (&type_traits)[9 * *a1];
v6 = (const char *)*(&GGML_OP_NAME + a1[20]);
v7 = ggml_n_dims((long long)a1);
__asm
{
vmovups ymm0, ymmword ptr [r15+10h]
vmovups ymm1, ymmword ptr [r15+30h]
vmovups [rsp+78h+var_58], ymm1
vmovups [rsp+78h+var_78], ymm0
vzeroupper
}
return fprintf(
a3,
"%-6s %-6s %-12s %8d %ld %ld %ld %ld %16zu %16zu %16zu %16zu %16p %32s\n",
a2,
v5,
v6,
v7,
*(_QWORD *)v11.m256_f32,
*(_QWORD *)&v11.m256_f32[2],
*(_QWORD *)&v11.m256_f32[4],
*(_QWORD *)&v11.m256_f32[6],
*(size_t *)v12.m256_f32,
*(size_t *)&v12.m256_f32[2],
*(size_t *)&v12.m256_f32[4],
*(size_t *)&v12.m256_f32[6],
*((const void **)a1 + 35),
(const char *)a1 + 288);
}
| ggml_graph_export_node:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x50
MOV R14,RDX
MOV RBX,RSI
MOV R15,RDI
MOV EAX,dword ptr [RDI]
MOV ECX,dword ptr [RDI + 0x50]
IMUL RAX,RAX,0x48
LEA RDX,[0x1d52a0]
MOV R12,qword ptr [RAX + RDX*0x1]
LEA RAX,[0x1d5800]
MOV R13,qword ptr [RAX + RCX*0x8]
CALL 0x00167d2a
VMOVUPS YMM0,ymmword ptr [R15 + 0x10]
VMOVUPS YMM1,ymmword ptr [R15 + 0x30]
MOV RCX,qword ptr [R15 + 0x118]
ADD R15,0x120
MOV qword ptr [RSP + 0x48],R15
MOV qword ptr [RSP + 0x40],RCX
VMOVUPS ymmword ptr [RSP + 0x20],YMM1
VMOVUPS ymmword ptr [RSP],YMM0
LEA RSI,[0x1a4344]
MOV RDI,R14
MOV RDX,RBX
MOV RCX,R12
MOV R8,R13
MOV R9D,EAX
XOR EAX,EAX
VZEROUPPER
CALL 0x0010a8b0
ADD RSP,0x50
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
void ggml_graph_export_node(uint *param_1,int8 param_2,FILE *param_3)
{
int8 uVar1;
int *puVar2;
uint uVar3;
uVar1 = *(int8 *)(type_traits + (ulong)*param_1 * 0x48);
puVar2 = (&GGML_OP_NAME)[param_1[0x14]];
uVar3 = ggml_n_dims();
fprintf(param_3,"%-6s %-6s %-12s %8d %ld %ld %ld %ld %16zu %16zu %16zu %16zu %16p %32s\n",param_2,
uVar1,puVar2,(ulong)uVar3,*(int8 *)(param_1 + 4),*(int8 *)(param_1 + 6),
*(int8 *)(param_1 + 8),*(int8 *)(param_1 + 10),*(int8 *)(param_1 + 0xc),
*(int8 *)(param_1 + 0xe),*(int8 *)(param_1 + 0x10),
*(int8 *)(param_1 + 0x12),*(int8 *)(param_1 + 0x46),param_1 + 0x48);
return;
}
| |
29,821 | ggml_graph_export_node | 7CodeWizard[P]stablediffusion/ggml/src/ggml.c | static void ggml_graph_export_node(const struct ggml_tensor * tensor, const char * arg, FILE * fout) {
const int64_t * ne = tensor->ne;
const size_t * nb = tensor->nb;
fprintf(fout, "%-6s %-6s %-12s %8d %" PRId64 " %" PRId64 " %" PRId64 " %" PRId64 " %16zu %16zu %16zu %16zu %16p %32s\n",
arg,
ggml_type_name(tensor->type),
ggml_op_name (tensor->op),
ggml_n_dims(tensor),
ne[0], ne[1], ne[2], ne[3],
nb[0], nb[1], nb[2], nb[3],
tensor->data,
tensor->name);
} | O3 | c | ggml_graph_export_node:
movq %rdx, %rax
movq %rsi, %rdx
movl (%rdi), %ecx
movl 0x50(%rdi), %esi
leaq (%rcx,%rcx,8), %rcx
leaq 0x5c6c4(%rip), %r8 # 0xf42b0
movq (%r8,%rcx,8), %rcx
leaq 0x5cc19(%rip), %r8 # 0xf4810
movq (%r8,%rsi,8), %r8
movl $0x4, %esi
movl %esi, %r9d
leal -0x1(%r9), %esi
cmpq $0x1, 0x10(%rdi,%rsi,8)
jg 0x97c1a
cmpl $0x1, %esi
ja 0x97c00
movl $0x1, %r9d
subq $0x58, %rsp
vmovups 0x10(%rdi), %ymm0
vmovups 0x30(%rdi), %ymm1
movq 0x118(%rdi), %rsi
addq $0x120, %rdi # imm = 0x120
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
vmovups %ymm1, 0x20(%rsp)
vmovups %ymm0, (%rsp)
leaq 0x2f91f(%rip), %rsi # 0xc7571
movq %rax, %rdi
xorl %eax, %eax
vzeroupper
callq 0xa8a0
addq $0x58, %rsp
retq
| ggml_graph_export_node:
mov rax, rdx
mov rdx, rsi
mov ecx, [rdi]
mov esi, [rdi+50h]
lea rcx, [rcx+rcx*8]
lea r8, type_traits
mov rcx, [r8+rcx*8]
lea r8, GGML_OP_NAME
mov r8, [r8+rsi*8]
mov esi, 4
loc_97C00:
mov r9d, esi
lea esi, [r9-1]
cmp qword ptr [rdi+rsi*8+10h], 1
jg short loc_97C1A
cmp esi, 1
ja short loc_97C00
mov r9d, 1
loc_97C1A:
sub rsp, 58h
vmovups ymm0, ymmword ptr [rdi+10h]
vmovups ymm1, ymmword ptr [rdi+30h]
mov rsi, [rdi+118h]
add rdi, 120h
mov [rsp+58h+var_10], rdi
mov [rsp+58h+var_18], rsi
vmovups [rsp+58h+var_38], ymm1
vmovups [rsp+58h+var_58], ymm0
lea rsi, a6s6s12s8dLdLdL; "%-6s %-6s %-12s %8d %ld %ld %ld %ld %16"...
mov rdi, rax
xor eax, eax
vzeroupper
call _fprintf
add rsp, 58h
retn
| long long ggml_graph_export_node(unsigned int *_RDI, const char *a2, long long a3)
{
const char *v4; // rdx
int v5; // r9d
__m256 v9; // [rsp+0h] [rbp-58h]
__m256 v10; // [rsp+20h] [rbp-38h]
v4 = a2;
LODWORD(a2) = 4;
while ( 1 )
{
v5 = (int)a2;
a2 = (const char *)(unsigned int)((_DWORD)a2 - 1);
if ( *(long long *)&_RDI[2 * (_QWORD)a2 + 4] > 1 )
break;
if ( (unsigned int)a2 <= 1 )
{
v5 = 1;
break;
}
}
__asm
{
vmovups ymm0, ymmword ptr [rdi+10h]
vmovups ymm1, ymmword ptr [rdi+30h]
vmovups [rsp+58h+var_38], ymm1
vmovups [rsp+58h+var_58], ymm0
vzeroupper
}
return fprintf(
a3,
"%-6s %-6s %-12s %8d %ld %ld %ld %ld %16zu %16zu %16zu %16zu %16p %32s\n",
v4,
(&type_traits)[9 * *_RDI],
(const char *)*(&GGML_OP_NAME + _RDI[20]),
v5,
*(_QWORD *)v9.m256_f32,
*(_QWORD *)&v9.m256_f32[2],
*(_QWORD *)&v9.m256_f32[4],
*(_QWORD *)&v9.m256_f32[6],
*(size_t *)v10.m256_f32,
*(size_t *)&v10.m256_f32[2],
*(size_t *)&v10.m256_f32[4],
*(size_t *)&v10.m256_f32[6],
*((const void **)_RDI + 35),
(const char *)_RDI + 288);
}
| |||
29,822 | SchemaConverter::_generate_union_rule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>> const&) | monkey531[P]llama/common/json-schema-to-grammar.cpp | std::string _generate_union_rule(const std::string & name, const std::vector<json> & alt_schemas) {
std::vector<std::string> rules;
for (size_t i = 0; i < alt_schemas.size(); i++) {
rules.push_back(visit(alt_schemas[i], name + (name.empty() ? "alternative-" : "-") + std::to_string(i)));
}
return string_join(rules, " | ");
} | O1 | cpp | SchemaConverter::_generate_union_rule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdx, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdi, 0x98(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x80(%rsp)
movq $0x0, 0x90(%rsp)
movq (%rcx), %r12
movq %rcx, 0xa0(%rsp)
cmpq %r12, 0x8(%rcx)
je 0xa643a
leaq 0x50(%rsp), %rbp
xorl %r13d, %r13d
leaq 0x60(%rsp), %r14
movq %rbp, %rbx
movq 0xb0(%rsp), %rcx
movq 0x8(%rcx), %rbp
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq (%rcx), %rsi
leaq (%rsi,%rbp), %rdx
movq %rsp, %r15
movq %r15, %rdi
callq 0x21694
testq %rbp, %rbp
leaq 0x146b5(%rip), %rsi # 0xba8f7
leaq 0x1473b(%rip), %rax # 0xba984
cmoveq %rax, %rsi
movq %r15, %rdi
callq 0x1ae70
movl $0x1, %esi
cmpq $0xa, %r13
movq %rbx, %rbp
jb 0xa62b2
movl $0x4, %esi
movq %r13, %rcx
movabsq $0x346dc5d63886594b, %rdi # imm = 0x346DC5D63886594B
cmpq $0x63, %rcx
jbe 0xa62ab
cmpq $0x3e7, %rcx # imm = 0x3E7
jbe 0xa62b0
cmpq $0x2710, %rcx # imm = 0x2710
jb 0xa62b2
movq %rcx, %rax
mulq %rdi
shrq $0xb, %rdx
addl $0x4, %esi
cmpq $0x1869f, %rcx # imm = 0x1869F
movq %rdx, %rcx
ja 0xa6275
addl $-0x3, %esi
jmp 0xa62b2
addl $-0x2, %esi
jmp 0xa62b2
decl %esi
movl %esi, %esi
movq %rbp, 0x40(%rsp)
leaq 0x40(%rsp), %rdi
xorl %edx, %edx
callq 0x1a8a0
movq 0x40(%rsp), %rdi
movl 0x48(%rsp), %esi
movq %r13, %rdx
callq 0x4f00b
movq (%rsp), %rcx
movl $0xf, %esi
leaq 0x10(%rsp), %rax
cmpq %rax, %rcx
je 0xa62ee
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %r8
movq 0x48(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rsi, %rax
jbe 0xa6317
movl $0xf, %esi
cmpq %rbp, 0x40(%rsp)
je 0xa6312
movq 0x50(%rsp), %rsi
cmpq %rsi, %rax
jbe 0xa6326
movq 0x40(%rsp), %rsi
movq %rsp, %rdi
callq 0x1a1f0
jmp 0xa6334
leaq 0x40(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1a850
leaq 0x30(%rsp), %rsi
movq %rsi, 0x20(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0xa6359
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0xa635f
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x28(%rsp)
movq %rcx, (%rax)
movq %r13, %rax
shlq $0x4, %rax
addq %rax, %r12
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq %r14, %rdi
movq 0xa8(%rsp), %rsi
movq %r12, %rdx
leaq 0x20(%rsp), %rcx
callq 0xa340c
leaq 0x80(%rsp), %rdi
movq %r14, %rsi
leaq 0x30(%rsp), %r12
callq 0x82478
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0xa63cf
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x1a740
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0xa63e6
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a740
movq 0x40(%rsp), %rdi
cmpq %rbp, %rdi
je 0xa63fd
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x1a740
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xa6418
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a740
incq %r13
movq 0xa0(%rsp), %rax
movq (%rax), %r12
movq 0x8(%rax), %rax
subq %r12, %rax
sarq $0x4, %rax
cmpq %rax, %r13
jb 0xa620e
leaq 0x70(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x146f8(%rip), %rsi # 0xbab42
leaq 0x146f4(%rip), %rdx # 0xbab45
leaq 0x60(%rsp), %rdi
callq 0x20d42
leaq 0x80(%rsp), %rsi
leaq 0x60(%rsp), %rdx
movq 0x98(%rsp), %r14
movq %r14, %rdi
callq 0x23414
movq 0x60(%rsp), %rdi
cmpq %rbx, %rdi
je 0xa648f
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x1a740
leaq 0x80(%rsp), %rdi
callq 0x2a118
movq %r14, %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x60(%rsp), %rdi
cmpq %rbx, %rdi
je 0xa654e
movq 0x70(%rsp), %rsi
jmp 0xa6546
jmp 0xa64cb
movq %rax, %r14
jmp 0xa654e
jmp 0xa64d2
movq %rax, %r14
jmp 0xa6533
movq %rax, %r14
jmp 0xa651c
movq %rax, %r14
jmp 0xa6500
movq %rax, %r14
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0xa6500
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x1a740
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0xa651c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a740
movq 0x40(%rsp), %rdi
cmpq %rbx, %rdi
je 0xa6533
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x1a740
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xa654e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a740
leaq 0x80(%rsp), %rdi
callq 0x2a118
movq %r14, %rdi
callq 0x1ad30
nop
| _ZN15SchemaConverter20_generate_union_ruleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapES8_S5_blmdSaNSA_14adl_serializerES8_IhSaIhEEvEESaISG_EE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0B8h
mov [rsp+0E8h+var_38], rdx
mov [rsp+0E8h+var_40], rsi
mov [rsp+0E8h+var_50], rdi
xorps xmm0, xmm0
movaps [rsp+0E8h+var_68], xmm0
mov [rsp+0E8h+var_58], 0
mov r12, [rcx]
mov [rsp+0E8h+var_48], rcx
cmp [rcx+8], r12
jz loc_A643A
lea rbp, [rsp+0E8h+var_98]
xor r13d, r13d
lea r14, [rsp+0E8h+var_88]
loc_A620E:
mov rbx, rbp
mov rcx, [rsp+0E8h+var_38]
mov rbp, [rcx+8]
lea rax, [rsp+0E8h+var_D8]
mov [rsp+0E8h+var_E8], rax
mov rsi, [rcx]
lea rdx, [rsi+rbp]
mov r15, rsp
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)
test rbp, rbp
lea rsi, aTuple+5; "-"
lea rax, aAlternative; "alternative-"
cmovz rsi, rax
mov rdi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov esi, 1
cmp r13, 0Ah
mov rbp, rbx
jb short loc_A62B2
mov esi, 4
mov rcx, r13
mov rdi, 346DC5D63886594Bh
loc_A6275:
cmp rcx, 63h ; 'c'
jbe short loc_A62AB
cmp rcx, 3E7h
jbe short loc_A62B0
cmp rcx, 2710h
jb short loc_A62B2
mov rax, rcx
mul rdi
shr rdx, 0Bh
add esi, 4
cmp rcx, 1869Fh
mov rcx, rdx
ja short loc_A6275
add esi, 0FFFFFFFDh
jmp short loc_A62B2
loc_A62AB:
add esi, 0FFFFFFFEh
jmp short loc_A62B2
loc_A62B0:
dec esi
loc_A62B2:
mov esi, esi
mov [rsp+0E8h+var_A8], rbp
lea rdi, [rsp+0E8h+var_A8]
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
mov rdi, [rsp+0E8h+var_A8]
mov esi, dword ptr [rsp+0E8h+var_A0]
mov rdx, r13
call _ZNSt8__detail18__to_chars_10_implImEEvPcjT_; std::__detail::__to_chars_10_impl<ulong>(char *,uint,ulong)
mov rcx, [rsp+0E8h+var_E8]
mov esi, 0Fh
lea rax, [rsp+0E8h+var_D8]
cmp rcx, rax
jz short loc_A62EE
mov rsi, [rsp+0E8h+var_D8]
loc_A62EE:
mov r8, [rsp+0E8h+var_E0]
mov rdx, [rsp+0E8h+var_A0]
lea rax, [rdx+r8]
cmp rax, rsi
jbe short loc_A6317
mov esi, 0Fh
cmp [rsp+0E8h+var_A8], rbp
jz short loc_A6312
mov rsi, [rsp+0E8h+var_98]
loc_A6312:
cmp rax, rsi
jbe short loc_A6326
loc_A6317:
mov rsi, [rsp+0E8h+var_A8]
mov rdi, rsp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
jmp short loc_A6334
loc_A6326:
lea rdi, [rsp+0E8h+var_A8]
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
loc_A6334:
lea rsi, [rsp+0E8h+var_B8]
mov [rsp+0E8h+var_C8], rsi
mov rdx, [rax]
lea rcx, [rax+10h]
cmp rdx, rcx
jz short loc_A6359
mov [rsp+0E8h+var_C8], rdx
mov rdx, [rcx]
mov [rsp+0E8h+var_B8], rdx
jmp short loc_A635F
loc_A6359:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rsi], xmm0
loc_A635F:
mov rdx, rax
add rdx, 8
mov rsi, [rax+8]
mov [rsp+0E8h+var_C0], rsi
mov [rax], rcx
mov rax, r13
shl rax, 4
add r12, rax
mov qword ptr [rdx], 0
mov byte ptr [rcx], 0
mov rdi, r14
mov rsi, [rsp+0E8h+var_40]
mov rdx, r12
lea rcx, [rsp+0E8h+var_C8]
call _ZN15SchemaConverter5visitERKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_; SchemaConverter::visit(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&,std::string const&)
lea rdi, [rsp+0E8h+var_68]
mov rsi, r14
lea r12, [rsp+0E8h+var_B8]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
mov rdi, [rsp+0E8h+var_88]; void *
lea rax, [rsp+0E8h+var_78]
cmp rdi, rax
jz short loc_A63CF
mov rsi, [rsp+0E8h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A63CF:
mov rdi, [rsp+0E8h+var_C8]; void *
cmp rdi, r12
jz short loc_A63E6
mov rsi, [rsp+0E8h+var_B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A63E6:
mov rdi, [rsp+0E8h+var_A8]; void *
cmp rdi, rbp
jz short loc_A63FD
mov rsi, [rsp+0E8h+var_98]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A63FD:
mov rdi, [rsp+0E8h+var_E8]; void *
lea rax, [rsp+0E8h+var_D8]
cmp rdi, rax
jz short loc_A6418
mov rsi, [rsp+0E8h+var_D8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A6418:
inc r13
mov rax, [rsp+0E8h+var_48]
mov r12, [rax]
mov rax, [rax+8]
sub rax, r12
sar rax, 4
cmp r13, rax
jb loc_A620E
loc_A643A:
lea rbx, [rsp+0E8h+var_78]
mov [rbx-10h], rbx
lea rsi, asc_BAB41+1; " | "
lea rdx, asc_BAB41+4; ""
lea rdi, [rsp+0E8h+var_88]
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, [rsp+0E8h+var_68]
lea rdx, [rsp+0E8h+var_88]
mov r14, [rsp+0E8h+var_50]
mov rdi, r14
call _Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_; string_join(std::vector<std::string> const&,std::string const&)
mov rdi, [rsp+0E8h+var_88]; void *
cmp rdi, rbx
jz short loc_A648F
mov rsi, [rsp+0E8h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A648F:
lea rdi, [rsp+0E8h+var_68]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rax, r14
add rsp, 0B8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, [rsp+arg_58]
cmp rdi, rbx
jz loc_A654E
mov rsi, [rsp+arg_68]
jmp short loc_A6546
jmp short $+2
loc_A64CB:
mov r14, rax
jmp short loc_A654E
jmp short $+2
loc_A64D2:
mov r14, rax
jmp short loc_A6533
mov r14, rax
jmp short loc_A651C
mov r14, rax
jmp short loc_A6500
mov r14, rax
mov rdi, [rsp+arg_58]; void *
lea rax, [rsp+arg_68]
cmp rdi, rax
jz short loc_A6500
mov rsi, [rsp+arg_68]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A6500:
mov rdi, [rsp+arg_18]; void *
lea rax, [rsp+arg_28]
cmp rdi, rax
jz short loc_A651C
mov rsi, [rsp+arg_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A651C:
mov rdi, [rsp+arg_38]; void *
cmp rdi, rbx
jz short loc_A6533
mov rsi, [rsp+arg_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A6533:
mov rdi, [rsp+0]; void *
lea rax, [rsp+arg_8]
cmp rdi, rax
jz short loc_A654E
mov rsi, [rsp+arg_8]
loc_A6546:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A654E:
lea rdi, [rsp+arg_78]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, r14
call __Unwind_Resume
| long long SchemaConverter::_generate_union_rule(long long a1, long long a2, long long a3, long long *a4)
{
__m128d v4; // xmm0
long long v5; // r12
unsigned long long *v6; // rbp
unsigned long long v7; // r13
unsigned long long *v8; // rbx
long long v9; // rbp
char *v10; // rsi
unsigned int v11; // esi
unsigned long long v12; // rcx
bool v13; // cc
unsigned long long v14; // rsi
unsigned long long v15; // rsi
void **v16; // rax
__m128d *v17; // rcx
long long v18; // r14
void *v20; // [rsp+0h] [rbp-E8h] BYREF
long long v21; // [rsp+8h] [rbp-E0h]
_QWORD v22[2]; // [rsp+10h] [rbp-D8h] BYREF
void *v23[2]; // [rsp+20h] [rbp-C8h] BYREF
__m128d v24; // [rsp+30h] [rbp-B8h] BYREF
void *v25; // [rsp+40h] [rbp-A8h] BYREF
long long v26; // [rsp+48h] [rbp-A0h]
unsigned long long v27; // [rsp+50h] [rbp-98h] BYREF
void *v28[2]; // [rsp+60h] [rbp-88h] BYREF
_QWORD v29[2]; // [rsp+70h] [rbp-78h] BYREF
__int128 v30; // [rsp+80h] [rbp-68h] BYREF
long long v31; // [rsp+90h] [rbp-58h]
long long v32; // [rsp+98h] [rbp-50h]
long long *v33; // [rsp+A0h] [rbp-48h]
long long v34; // [rsp+A8h] [rbp-40h]
long long v35; // [rsp+B0h] [rbp-38h]
v35 = a3;
v34 = a2;
v32 = a1;
v4 = 0LL;
v30 = 0LL;
v31 = 0LL;
v5 = *a4;
v33 = a4;
if ( a4[1] != v5 )
{
v6 = &v27;
v7 = 0LL;
do
{
v8 = v6;
v9 = *(_QWORD *)(v35 + 8);
v20 = v22;
std::string::_M_construct<char *>(&v20, *(_BYTE **)v35, *(_QWORD *)v35 + v9);
v10 = "-";
if ( !v9 )
v10 = "alternative-";
std::string::append(&v20, v10);
v11 = 1;
v6 = v8;
if ( v7 >= 0xA )
{
v11 = 4;
v12 = v7;
while ( 1 )
{
if ( v12 <= 0x63 )
{
v11 -= 2;
goto LABEL_14;
}
if ( v12 <= 0x3E7 )
break;
if ( v12 < 0x2710 )
goto LABEL_14;
v11 += 4;
v13 = v12 <= 0x1869F;
v12 /= 0x2710uLL;
if ( v13 )
{
v11 -= 3;
goto LABEL_14;
}
}
--v11;
}
LABEL_14:
v25 = v8;
std::string::_M_construct(&v25, v11, 0LL);
std::__detail::__to_chars_10_impl<unsigned long>((char *)v25, v26, v7);
v14 = 15LL;
if ( v20 != v22 )
v14 = v22[0];
if ( v26 + v21 <= v14 )
goto LABEL_20;
v15 = 15LL;
if ( v25 != v8 )
v15 = v27;
if ( v26 + v21 <= v15 )
v16 = (void **)std::string::replace(&v25, 0LL, 0LL, v20, v21);
else
LABEL_20:
v16 = (void **)std::string::_M_append(&v20, v25);
v23[0] = &v24;
v17 = (__m128d *)(v16 + 2);
if ( *v16 == v16 + 2 )
{
v4 = *v17;
v24 = *v17;
}
else
{
v23[0] = *v16;
v24.m128d_f64[0] = v17->m128d_f64[0];
}
v23[1] = v16[1];
*v16 = v17;
v16[1] = 0LL;
LOBYTE(v17->m128d_f64[0]) = 0;
SchemaConverter::visit(v28, v34, 16 * v7 + v5, v23, v4);
std::vector<std::string>::emplace_back<std::string>((long long)&v30, (long long)v28);
if ( v28[0] != v29 )
operator delete(v28[0], v29[0] + 1LL);
if ( v23[0] != &v24 )
operator delete(v23[0], *(_QWORD *)&v24.m128d_f64[0] + 1LL);
if ( v25 != v8 )
operator delete(v25, v27 + 1);
if ( v20 != v22 )
operator delete(v20, v22[0] + 1LL);
++v7;
v5 = *v33;
}
while ( v7 < (v33[1] - *v33) >> 4 );
}
v28[0] = v29;
std::string::_M_construct<char const*>(v28, " | ", (long long)"");
v18 = v32;
string_join(v32, &v30, v28);
if ( v28[0] != v29 )
operator delete(v28[0], v29[0] + 1LL);
std::vector<std::string>::~vector(&v30);
return v18;
}
| _generate_union_rule:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xb8
MOV qword ptr [RSP + 0xb0],RDX
MOV qword ptr [RSP + 0xa8],RSI
MOV qword ptr [RSP + 0x98],RDI
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x80],XMM0
MOV qword ptr [RSP + 0x90],0x0
MOV R12,qword ptr [RCX]
MOV qword ptr [RSP + 0xa0],RCX
CMP qword ptr [RCX + 0x8],R12
JZ 0x001a643a
LEA RBP,[RSP + 0x50]
XOR R13D,R13D
LEA R14,[RSP + 0x60]
LAB_001a620e:
MOV RBX,RBP
MOV RCX,qword ptr [RSP + 0xb0]
MOV RBP,qword ptr [RCX + 0x8]
LEA RAX,[RSP + 0x10]
MOV qword ptr [RSP],RAX
MOV RSI,qword ptr [RCX]
LEA RDX,[RSI + RBP*0x1]
LAB_001a622d:
MOV R15,RSP
MOV RDI,R15
CALL 0x00121694
TEST RBP,RBP
LEA RSI,[0x1ba8f7]
LEA RAX,[0x1ba984]
CMOVZ RSI,RAX
LAB_001a624d:
MOV RDI,R15
CALL 0x0011ae70
MOV ESI,0x1
CMP R13,0xa
MOV RBP,RBX
JC 0x001a62b2
MOV ESI,0x4
MOV RCX,R13
MOV RDI,0x346dc5d63886594b
LAB_001a6275:
CMP RCX,0x63
JBE 0x001a62ab
CMP RCX,0x3e7
JBE 0x001a62b0
CMP RCX,0x2710
JC 0x001a62b2
MOV RAX,RCX
MUL RDI
SHR RDX,0xb
ADD ESI,0x4
CMP RCX,0x1869f
MOV RCX,RDX
JA 0x001a6275
ADD ESI,-0x3
JMP 0x001a62b2
LAB_001a62ab:
ADD ESI,-0x2
JMP 0x001a62b2
LAB_001a62b0:
DEC ESI
LAB_001a62b2:
MOV ESI,ESI
MOV qword ptr [RSP + 0x40],RBP
LAB_001a62b9:
LEA RDI,[RSP + 0x40]
XOR EDX,EDX
CALL 0x0011a8a0
MOV RDI,qword ptr [RSP + 0x40]
MOV ESI,dword ptr [RSP + 0x48]
MOV RDX,R13
CALL 0x0014f00b
MOV RCX,qword ptr [RSP]
MOV ESI,0xf
LEA RAX,[RSP + 0x10]
CMP RCX,RAX
JZ 0x001a62ee
MOV RSI,qword ptr [RSP + 0x10]
LAB_001a62ee:
MOV R8,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x48]
LEA RAX,[RDX + R8*0x1]
CMP RAX,RSI
JBE 0x001a6317
MOV ESI,0xf
CMP qword ptr [RSP + 0x40],RBP
JZ 0x001a6312
MOV RSI,qword ptr [RSP + 0x50]
LAB_001a6312:
CMP RAX,RSI
JBE 0x001a6326
LAB_001a6317:
MOV RSI,qword ptr [RSP + 0x40]
LAB_001a631c:
MOV RDI,RSP
CALL 0x0011a1f0
JMP 0x001a6334
LAB_001a6326:
LEA RDI,[RSP + 0x40]
XOR ESI,ESI
XOR EDX,EDX
CALL 0x0011a850
LAB_001a6334:
LEA RSI,[RSP + 0x30]
MOV qword ptr [RSP + 0x20],RSI
MOV RDX,qword ptr [RAX]
LEA RCX,[RAX + 0x10]
CMP RDX,RCX
JZ 0x001a6359
MOV qword ptr [RSP + 0x20],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x30],RDX
JMP 0x001a635f
LAB_001a6359:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RSI],XMM0
LAB_001a635f:
MOV RDX,RAX
ADD RDX,0x8
MOV RSI,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RAX],RCX
MOV RAX,R13
SHL RAX,0x4
ADD R12,RAX
MOV qword ptr [RDX],0x0
MOV byte ptr [RCX],0x0
LAB_001a6386:
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0xa8]
MOV RDX,R12
LEA RCX,[RSP + 0x20]
CALL 0x001a340c
LAB_001a639e:
LEA RDI,[RSP + 0x80]
MOV RSI,R14
LEA R12,[RSP + 0x30]
CALL 0x00182478
MOV RDI,qword ptr [RSP + 0x60]
LEA RAX,[RSP + 0x70]
CMP RDI,RAX
JZ 0x001a63cf
MOV RSI,qword ptr [RSP + 0x70]
INC RSI
CALL 0x0011a740
LAB_001a63cf:
MOV RDI,qword ptr [RSP + 0x20]
CMP RDI,R12
JZ 0x001a63e6
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x0011a740
LAB_001a63e6:
MOV RDI,qword ptr [RSP + 0x40]
CMP RDI,RBP
JZ 0x001a63fd
MOV RSI,qword ptr [RSP + 0x50]
INC RSI
CALL 0x0011a740
LAB_001a63fd:
MOV RDI,qword ptr [RSP]
LEA RAX,[RSP + 0x10]
CMP RDI,RAX
JZ 0x001a6418
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x0011a740
LAB_001a6418:
INC R13
MOV RAX,qword ptr [RSP + 0xa0]
MOV R12,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x8]
SUB RAX,R12
SAR RAX,0x4
CMP R13,RAX
JC 0x001a620e
LAB_001a643a:
LEA RBX,[RSP + 0x70]
MOV qword ptr [RBX + -0x10],RBX
LAB_001a6443:
LEA RSI,[0x1bab42]
LEA RDX,[0x1bab45]
LEA RDI,[RSP + 0x60]
CALL 0x00120d42
LAB_001a645b:
LEA RSI,[RSP + 0x80]
LEA RDX,[RSP + 0x60]
MOV R14,qword ptr [RSP + 0x98]
MOV RDI,R14
CALL 0x00123414
LAB_001a6478:
MOV RDI,qword ptr [RSP + 0x60]
CMP RDI,RBX
JZ 0x001a648f
MOV RSI,qword ptr [RSP + 0x70]
INC RSI
CALL 0x0011a740
LAB_001a648f:
LEA RDI,[RSP + 0x80]
CALL 0x0012a118
MOV RAX,R14
ADD RSP,0xb8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* SchemaConverter::_generate_union_rule(std::__cxx11::string const&,
std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > > const&) */
vector * SchemaConverter::_generate_union_rule(string *param_1,vector *param_2)
{
long *plVar1;
ulong uVar2;
bool bVar3;
string *psVar4;
char cVar5;
int8 *puVar6;
long *in_RCX;
ulong uVar7;
long *in_RDX;
char cVar8;
ulong uVar9;
ulong *local_e8;
long local_e0;
ulong local_d8 [2];
long *local_c8;
int8 local_c0;
long local_b8;
int8 uStack_b0;
ulong *local_a8;
uint local_a0;
int4 uStack_9c;
ulong local_98 [2];
long *local_88 [2];
long local_78 [2];
int8 local_68;
int8 uStack_60;
int8 local_58;
string *local_50;
long *local_48;
vector *local_40;
long *local_38;
local_68 = 0;
uStack_60 = 0;
local_58 = 0;
local_50 = param_1;
local_40 = param_2;
if (in_RCX[1] != *in_RCX) {
uVar9 = 0;
local_48 = in_RCX;
local_38 = in_RDX;
do {
local_e8 = local_d8;
/* try { // try from 001a622d to 001a6237 has its CatchHandler @ 001a64cb */
std::__cxx11::string::_M_construct<char*>(&local_e8,*local_38,*local_38 + local_38[1]);
/* try { // try from 001a624d to 001a6254 has its CatchHandler @ 001a64d0 */
std::__cxx11::string::append((char *)&local_e8);
cVar8 = '\x01';
if (9 < uVar9) {
uVar7 = uVar9;
cVar5 = '\x04';
do {
cVar8 = cVar5;
if (uVar7 < 100) {
cVar8 = cVar8 + -2;
goto LAB_001a62b2;
}
if (uVar7 < 1000) {
cVar8 = cVar8 + -1;
goto LAB_001a62b2;
}
if (uVar7 < 10000) goto LAB_001a62b2;
bVar3 = 99999 < uVar7;
uVar7 = uVar7 / 10000;
cVar5 = cVar8 + '\x04';
} while (bVar3);
cVar8 = cVar8 + '\x01';
}
LAB_001a62b2:
/* try { // try from 001a62b9 to 001a62c4 has its CatchHandler @ 001a64d2 */
local_a8 = local_98;
std::__cxx11::string::_M_construct((ulong)&local_a8,cVar8);
std::__detail::__to_chars_10_impl<unsigned_long>((char *)local_a8,local_a0,uVar9);
uVar7 = 0xf;
if (local_e8 != local_d8) {
uVar7 = local_d8[0];
}
uVar2 = CONCAT44(uStack_9c,local_a0) + local_e0;
if (uVar7 < uVar2) {
uVar7 = 0xf;
if (local_a8 != local_98) {
uVar7 = local_98[0];
}
if (uVar7 < uVar2) goto LAB_001a6317;
puVar6 = (int8 *)
std::__cxx11::string::replace((ulong)&local_a8,0,(char *)0x0,(ulong)local_e8);
}
else {
LAB_001a6317:
/* try { // try from 001a631c to 001a6333 has its CatchHandler @ 001a64d7 */
puVar6 = (int8 *)std::__cxx11::string::_M_append((char *)&local_e8,(ulong)local_a8);
}
local_c8 = &local_b8;
plVar1 = puVar6 + 2;
if ((long *)*puVar6 == plVar1) {
local_b8 = *plVar1;
uStack_b0 = puVar6[3];
}
else {
local_b8 = *plVar1;
local_c8 = (long *)*puVar6;
}
local_c0 = puVar6[1];
*puVar6 = plVar1;
puVar6[1] = 0;
*(int1 *)plVar1 = 0;
/* try { // try from 001a6386 to 001a639d has its CatchHandler @ 001a64dc */
visit((basic_json *)local_88,(string *)local_40);
/* try { // try from 001a639e to 001a63b2 has its CatchHandler @ 001a64e1 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_68,
(string *)local_88);
if (local_88[0] != local_78) {
operator_delete(local_88[0],local_78[0] + 1);
}
if (local_c8 != &local_b8) {
operator_delete(local_c8,local_b8 + 1);
}
if (local_a8 != local_98) {
operator_delete(local_a8,local_98[0] + 1);
}
if (local_e8 != local_d8) {
operator_delete(local_e8,local_d8[0] + 1);
}
uVar9 = uVar9 + 1;
} while (uVar9 < (ulong)(local_48[1] - *local_48 >> 4));
}
/* try { // try from 001a6443 to 001a645a has its CatchHandler @ 001a64c9 */
local_88[0] = local_78;
std::__cxx11::string::_M_construct<char_const*>(local_88,&DAT_001bab42,&DAT_001bab45);
psVar4 = local_50;
/* try { // try from 001a645b to 001a6477 has its CatchHandler @ 001a64b1 */
string_join((vector *)local_50,(string *)&local_68);
if (local_88[0] != local_78) {
operator_delete(local_88[0],local_78[0] + 1);
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_68);
return (vector *)psVar4;
}
| |
29,823 | Config::find(char const*) const | untodesu[P]voxelius/core/config.cc | const IConfigValue *Config::find(const char *name) const
{
auto kv_pair = m_values.find(name);
if(kv_pair != m_values.cend())
return kv_pair->second;
return nullptr;
} | O0 | cpp | Config::find(char const*) const:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
addq $0x8, %rax
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq -0x41(%rbp), %rdi
movq %rdi, -0x68(%rbp)
callq 0x1b000
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
leaq -0x40(%rbp), %rdi
callq 0x1cfc0
jmp 0xf903b
movq -0x78(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0xf9710
movq %rax, -0x88(%rbp)
jmp 0xf9051
movq -0x88(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x1b238
leaq -0x41(%rbp), %rdi
callq 0x1a9c0
movq -0x80(%rbp), %rdi
addq $0x8, %rdi
callq 0xf92e0
movq %rax, -0x60(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0xf9160
testb $0x1, %al
jne 0xf9092
jmp 0xf90d3
leaq -0x20(%rbp), %rdi
callq 0xf9740
movq 0x20(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0xf90db
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0xf90c8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x1b238
leaq -0x41(%rbp), %rdi
callq 0x1a9c0
jmp 0xf90e8
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x1aff0
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
| _ZNK6Config4findEPKc:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov [rbp+var_80], rax
add rax, 8
mov [rbp+var_78], rax
mov rax, [rbp+var_18]
mov [rbp+var_70], rax
lea rdi, [rbp+var_41]
mov [rbp+var_68], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, [rbp+var_70]
mov rdx, [rbp+var_68]
lea rdi, [rbp+var_40]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_F903B:
mov rdi, [rbp+var_78]
lea rsi, [rbp+var_40]
call _ZNKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP12IConfigValueSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S7_EEE4findERSD_; std::unordered_map<std::string,IConfigValue *>::find(std::string const&)
mov [rbp+var_88], rax
jmp short $+2
loc_F9051:
mov rax, [rbp+var_88]
mov [rbp+var_20], rax
lea rdi, [rbp+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_41]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rdi, [rbp+var_80]
add rdi, 8
call _ZNKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP12IConfigValueSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S7_EEE4cendEv; std::unordered_map<std::string,IConfigValue *>::cend(void)
mov [rbp+var_60], rax
lea rdi, [rbp+var_20]
lea rsi, [rbp+var_60]
call _ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP12IConfigValueELb1EEESE_; std::__detail::operator!=(std::__detail::_Node_iterator_base<std::pair<std::string const,IConfigValue *>,true> const&,std::__detail::_Node_iterator_base<std::pair<std::string const,IConfigValue *>,true> const&)
test al, 1
jnz short loc_F9092
jmp short loc_F90D3
loc_F9092:
lea rdi, [rbp+var_20]
call _ZNKSt8__detail20_Node_const_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP12IConfigValueELb0ELb1EEptEv; std::__detail::_Node_const_iterator<std::pair<std::string const,IConfigValue *>,false,true>::operator->(void)
mov rax, [rax+20h]
mov [rbp+var_8], rax
jmp short loc_F90DB
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
jmp short loc_F90C8
mov rcx, rax
mov eax, edx
mov [rbp+var_50], rcx
mov [rbp+var_54], eax
lea rdi, [rbp+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_F90C8:
lea rdi, [rbp+var_41]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_F90E8
loc_F90D3:
mov [rbp+var_8], 0
loc_F90DB:
mov rax, [rbp+var_8]
add rsp, 90h
pop rbp
retn
loc_F90E8:
mov rdi, [rbp+var_50]
call __Unwind_Resume
| long long Config::find(Config *this, const char *a2)
{
long long v3; // [rsp+30h] [rbp-60h] BYREF
char v4; // [rsp+4Fh] [rbp-41h] BYREF
_BYTE v5[32]; // [rsp+50h] [rbp-40h] BYREF
_QWORD v6[3]; // [rsp+70h] [rbp-20h] BYREF
v6[2] = this;
v6[1] = a2;
std::allocator<char>::allocator(&v4, a2);
std::string::basic_string<std::allocator<char>>((long long)v5, (long long)a2, (long long)&v4);
v6[0] = std::unordered_map<std::string,IConfigValue *>::find((char *)this + 8, v5);
std::string::~string(v5);
std::allocator<char>::~allocator(&v4);
v3 = std::unordered_map<std::string,IConfigValue *>::cend((char *)this + 8);
if ( (std::__detail::operator!=(v6, &v3) & 1) != 0 )
return *(_QWORD *)(std::__detail::_Node_const_iterator<std::pair<std::string const,IConfigValue *>,false,true>::operator->(v6)
+ 32);
else
return 0LL;
}
| find:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x80],RAX
ADD RAX,0x8
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x70],RAX
LEA RDI,[RBP + -0x41]
MOV qword ptr [RBP + -0x68],RDI
CALL 0x0011b000
MOV RSI,qword ptr [RBP + -0x70]
MOV RDX,qword ptr [RBP + -0x68]
LAB_001f9030:
LEA RDI,[RBP + -0x40]
CALL 0x0011cfc0
JMP 0x001f903b
LAB_001f903b:
MOV RDI,qword ptr [RBP + -0x78]
LEA RSI,[RBP + -0x40]
CALL 0x001f9710
LAB_001f9048:
MOV qword ptr [RBP + -0x88],RAX
JMP 0x001f9051
LAB_001f9051:
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RBP + -0x20],RAX
LEA RDI,[RBP + -0x40]
CALL 0x0011b238
LEA RDI,[RBP + -0x41]
CALL 0x0011a9c0
MOV RDI,qword ptr [RBP + -0x80]
ADD RDI,0x8
CALL 0x001f92e0
MOV qword ptr [RBP + -0x60],RAX
LEA RDI,[RBP + -0x20]
LEA RSI,[RBP + -0x60]
CALL 0x001f9160
TEST AL,0x1
JNZ 0x001f9092
JMP 0x001f90d3
LAB_001f9092:
LEA RDI,[RBP + -0x20]
CALL 0x001f9740
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001f90db
LAB_001f90d3:
MOV qword ptr [RBP + -0x8],0x0
LAB_001f90db:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x90
POP RBP
RET
|
/* Config::find(char const*) const */
int8 __thiscall Config::find(Config *this,char *param_1)
{
ulong uVar1;
long lVar2;
int8 local_68 [3];
allocator local_49;
string local_48 [32];
int8 local_28;
char *local_20;
Config *local_18;
int8 local_10;
local_20 = param_1;
local_18 = this;
std::allocator<char>::allocator();
/* try { // try from 001f9030 to 001f9038 has its CatchHandler @ 001f90a5 */
std::__cxx11::string::string<std::allocator<char>>(local_48,param_1,&local_49);
/* try { // try from 001f903b to 001f9047 has its CatchHandler @ 001f90b3 */
local_28 = std::
unordered_map<std::__cxx11::string,IConfigValue*,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,IConfigValue*>>>
::find((unordered_map<std::__cxx11::string,IConfigValue*,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,IConfigValue*>>>
*)(this + 8),local_48);
std::__cxx11::string::~string(local_48);
std::allocator<char>::~allocator((allocator<char> *)&local_49);
local_68[0] = std::
unordered_map<std::__cxx11::string,IConfigValue*,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,IConfigValue*>>>
::cend();
uVar1 = std::__detail::operator!=
((_Node_iterator_base *)&local_28,(_Node_iterator_base *)local_68);
if ((uVar1 & 1) == 0) {
local_10 = 0;
}
else {
lVar2 = std::__detail::
_Node_const_iterator<std::pair<std::__cxx11::string_const,IConfigValue*>,false,true>::
operator->((_Node_const_iterator<std::pair<std::__cxx11::string_const,IConfigValue*>,false,true>
*)&local_28);
local_10 = *(int8 *)(lVar2 + 0x20);
}
return local_10;
}
| |
29,824 | cli::value_base<cli::integer>::synopsys[abi:cxx11]() const | msxemulator/build_O3/_deps/picotool-src/cli.h | vector<string> synopsys() const override {
string s = string("<") + this->_name + ">";
if (this->_max > 1) s += "..";
return {s};
} | O3 | c | cli::value_base<cli::integer>::synopsys[abi:cxx11]() const:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x50(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x4d273(%rip), %rsi # 0xa3ff0
leaq 0x4d26d(%rip), %rdx # 0xa3ff1
leaq 0x40(%rsp), %rdi
callq 0x5c00c
movq 0x48(%r14), %rsi
movq 0x50(%r14), %rdx
leaq 0x40(%rsp), %rdi
callq 0xf170
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x56dc7
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x56dcf
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rsp, %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x4f1b8(%rip), %rsi # 0xa5fa8
callq 0xf830
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x56e1c
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x56e23
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x28(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x56e51
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xf470
movq 0x40(%rsp), %rdi
cmpq %r13, %rdi
je 0x56e68
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xf470
cmpl $0x2, 0x8c(%r14)
jl 0x56e83
leaq 0x4ed27(%rip), %rsi # 0xa5ba0
leaq 0x20(%rsp), %rdi
callq 0xf830
movq %rsp, %rdi
movq %r12, (%rdi)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
callq 0x1d410
movq %rsp, %rsi
leaq 0x40(%rsp), %rcx
movl $0x1, %edx
movq %rbx, %rdi
callq 0x1d20c
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x56ec6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xf470
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x56edd
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xf470
movq %rbx, %rax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x56f0b
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x56f0e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xf470
jmp 0x56f0e
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x56f59
movq 0x30(%rsp), %rsi
jmp 0x56f4c
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x56f3d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xf470
jmp 0x56f3d
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r13, %rdi
je 0x56f59
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xf470
jmp 0x56f59
movq %rax, %rbx
movq %rbx, %rdi
callq 0xf7d0
nop
| _ZNK3cli10value_baseI9family_idE8synopsysB5cxx11Ev:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 60h
mov r14, rsi
mov rbx, rdi
lea r13, [rsp+88h+var_38]
mov [r13-10h], r13
lea rsi, aMissing+8; "<"
lea rdx, aMissing+9; ""
lea rdi, [rsp+88h+var_48]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rsi, [r14+48h]
mov rdx, [r14+50h]
lea rdi, [rsp+88h+var_48]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
lea r12, [rsp+88h+var_78]
mov [r12-10h], r12
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_56DC7
mov [rsp+88h+var_88], rdx
mov rdx, [rcx]
mov [rsp+88h+var_78], rdx
jmp short loc_56DCF
loc_56DC7:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r12], xmm0
loc_56DCF:
mov rdx, [rax+8]
mov rdi, rsp
mov [rdi+8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
lea rsi, asc_A5FA7+1; ">"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea r15, [rsp+88h+var_58]
mov [r15-10h], r15
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_56E1C
mov [rsp+88h+var_68], rdx
mov rdx, [rcx]
mov [rsp+88h+var_58], rdx
jmp short loc_56E23
loc_56E1C:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r15], xmm0
loc_56E23:
mov rdx, [rax+8]
mov [rsp+88h+var_60], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rdi, [rsp+88h+var_88]; void *
cmp rdi, r12
jz short loc_56E51
mov rsi, [rsp+88h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_56E51:
mov rdi, [rsp+88h+var_48]; void *
cmp rdi, r13
jz short loc_56E68
mov rsi, [rsp+88h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_56E68:
cmp dword ptr [r14+8Ch], 2
jl short loc_56E83
lea rsi, asc_A5BA0; ".."
lea rdi, [rsp+88h+var_68]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
loc_56E83:
mov rdi, rsp
mov [rdi], r12
mov rsi, [rsp+88h+var_68]
mov rdx, [rsp+88h+var_60]
add rdx, rsi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rsi, rsp
lea rcx, [rsp+88h+var_48]
mov edx, 1
mov rdi, rbx
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ESt16initializer_listIS5_ERKS6_; std::vector<std::string>::vector(std::initializer_list<std::string>,std::allocator<std::string> const&)
mov rdi, [rsp+88h+var_88]; void *
cmp rdi, r12
jz short loc_56EC6
mov rsi, [rsp+88h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_56EC6:
mov rdi, [rsp+88h+var_68]; void *
cmp rdi, r15
jz short loc_56EDD
mov rsi, [rsp+88h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_56EDD:
mov rax, rbx
add rsp, 60h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
jmp short loc_56F0B
mov rbx, rax
mov rdi, [rsp+0]; void *
cmp rdi, r12
jz short loc_56F0E
mov rsi, [rsp+arg_8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_56F0E
loc_56F0B:
mov rbx, rax
loc_56F0E:
mov rdi, [rsp+arg_18]
cmp rdi, r15
jz short loc_56F59
mov rsi, [rsp+arg_28]
jmp short loc_56F4C
mov rbx, rax
mov rdi, [rsp+0]; void *
cmp rdi, r12
jz short loc_56F3D
mov rsi, [rsp+arg_8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_56F3D
mov rbx, rax
loc_56F3D:
mov rdi, [rsp+arg_38]; void *
cmp rdi, r13
jz short loc_56F59
mov rsi, [rsp+arg_48]
loc_56F4C:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_56F59
mov rbx, rax
loc_56F59:
mov rdi, rbx
call __Unwind_Resume
| long long cli::value_base<family_id>::synopsys[abi:cxx11](long long a1, long long a2)
{
long long v2; // rax
__int128 *v3; // rcx
long long v4; // rax
__int128 *v5; // rcx
void *v7[2]; // [rsp+0h] [rbp-88h] BYREF
__int128 v8; // [rsp+10h] [rbp-78h] BYREF
void *v9; // [rsp+20h] [rbp-68h] BYREF
long long v10; // [rsp+28h] [rbp-60h]
__int128 v11; // [rsp+30h] [rbp-58h] BYREF
void *v12[2]; // [rsp+40h] [rbp-48h] BYREF
_QWORD v13[7]; // [rsp+50h] [rbp-38h] BYREF
v12[0] = v13;
std::string::_M_construct<char const*>(v12, "<", "");
v2 = std::string::_M_append(v12, *(_QWORD *)(a2 + 72), *(_QWORD *)(a2 + 80));
v7[0] = &v8;
v3 = (__int128 *)(v2 + 16);
if ( *(_QWORD *)v2 == v2 + 16 )
{
v8 = *v3;
}
else
{
v7[0] = *(void **)v2;
*(_QWORD *)&v8 = *(_QWORD *)v3;
}
v7[1] = *(void **)(v2 + 8);
*(_QWORD *)v2 = v3;
*(_QWORD *)(v2 + 8) = 0LL;
*(_BYTE *)(v2 + 16) = 0;
v4 = std::string::append(v7, ">");
v9 = &v11;
v5 = (__int128 *)(v4 + 16);
if ( *(_QWORD *)v4 == v4 + 16 )
{
v11 = *v5;
}
else
{
v9 = *(void **)v4;
*(_QWORD *)&v11 = *(_QWORD *)v5;
}
v10 = *(_QWORD *)(v4 + 8);
*(_QWORD *)v4 = v5;
*(_QWORD *)(v4 + 8) = 0LL;
*(_BYTE *)(v4 + 16) = 0;
if ( v7[0] != &v8 )
operator delete(v7[0], v8 + 1);
if ( v12[0] != v13 )
operator delete(v12[0], v13[0] + 1LL);
if ( *(int *)(a2 + 140) >= 2 )
std::string::append(&v9, "..");
v7[0] = &v8;
std::string::_M_construct<char *>((long long)v7, v9, (long long)v9 + v10);
std::vector<std::string>::vector(a1, (long long)v7, 1LL);
if ( v7[0] != &v8 )
operator delete(v7[0], v8 + 1);
if ( v9 != &v11 )
operator delete(v9, v11 + 1);
return a1;
}
| synopsys[abi:cxx11]:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x60
MOV R14,RSI
MOV RBX,RDI
LEA R13,[RSP + 0x50]
MOV qword ptr [R13 + -0x10],R13
LAB_00156d76:
LEA RSI,[0x1a3ff0]
LEA RDX,[0x1a3ff1]
LEA RDI,[RSP + 0x40]
CALL 0x0015c00c
MOV RSI,qword ptr [R14 + 0x48]
MOV RDX,qword ptr [R14 + 0x50]
LAB_00156d96:
LEA RDI,[RSP + 0x40]
CALL 0x0010f170
LEA R12,[RSP + 0x10]
MOV qword ptr [R12 + -0x10],R12
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x00156dc7
MOV qword ptr [RSP],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x10],RDX
JMP 0x00156dcf
LAB_00156dc7:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R12],XMM0
LAB_00156dcf:
MOV RDX,qword ptr [RAX + 0x8]
MOV RDI,RSP
MOV qword ptr [RDI + 0x8],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LAB_00156de9:
LEA RSI,[0x1a5fa8]
CALL 0x0010f830
LEA R15,[RSP + 0x30]
MOV qword ptr [R15 + -0x10],R15
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x00156e1c
MOV qword ptr [RSP + 0x20],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x30],RDX
JMP 0x00156e23
LAB_00156e1c:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R15],XMM0
LAB_00156e23:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x28],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV RDI,qword ptr [RSP]
CMP RDI,R12
JZ 0x00156e51
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x0010f470
LAB_00156e51:
MOV RDI,qword ptr [RSP + 0x40]
CMP RDI,R13
JZ 0x00156e68
MOV RSI,qword ptr [RSP + 0x50]
INC RSI
CALL 0x0010f470
LAB_00156e68:
CMP dword ptr [R14 + 0x8c],0x2
JL 0x00156e83
LAB_00156e72:
LEA RSI,[0x1a5ba0]
LEA RDI,[RSP + 0x20]
CALL 0x0010f830
LAB_00156e83:
MOV RDI,RSP
MOV qword ptr [RDI],R12
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
ADD RDX,RSI
LAB_00156e96:
CALL 0x0011d410
LAB_00156e9b:
MOV RSI,RSP
LEA RCX,[RSP + 0x40]
MOV EDX,0x1
MOV RDI,RBX
CALL 0x0011d20c
LAB_00156eb0:
MOV RDI,qword ptr [RSP]
CMP RDI,R12
JZ 0x00156ec6
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x0010f470
LAB_00156ec6:
MOV RDI,qword ptr [RSP + 0x20]
CMP RDI,R15
JZ 0x00156edd
MOV RSI,qword ptr [RSP + 0x30]
INC RSI
CALL 0x0010f470
LAB_00156edd:
MOV RAX,RBX
ADD RSP,0x60
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* cli::value_base<family_id>::synopsys[abi:cxx11]() const */
void cli::value_base<family_id>::synopsys_abi_cxx11_(void)
{
long *plVar1;
long *plVar2;
long in_RSI;
long *local_88;
long local_80;
long local_78;
long lStack_70;
long *local_68;
long local_60;
long local_58;
long lStack_50;
long *local_48 [2];
long local_38 [2];
/* try { // try from 00156d76 to 00156d8d has its CatchHandler @ 00156f56 */
local_48[0] = local_38;
std::__cxx11::string::_M_construct<char_const*>((string *)local_48,"<","");
/* try { // try from 00156d96 to 00156d9f has its CatchHandler @ 00156f3a */
plVar1 = (long *)std::__cxx11::string::_M_append((char *)local_48,*(ulong *)(in_RSI + 0x48));
plVar2 = plVar1 + 2;
if ((long *)*plVar1 == plVar2) {
local_78 = *plVar2;
lStack_70 = plVar1[3];
local_88 = &local_78;
}
else {
local_78 = *plVar2;
local_88 = (long *)*plVar1;
}
local_80 = plVar1[1];
*plVar1 = (long)plVar2;
plVar1[1] = 0;
*(int1 *)(plVar1 + 2) = 0;
/* try { // try from 00156de9 to 00156df4 has its CatchHandler @ 00156f1f */
plVar1 = (long *)std::__cxx11::string::append((char *)&local_88);
plVar2 = plVar1 + 2;
if ((long *)*plVar1 == plVar2) {
local_58 = *plVar2;
lStack_50 = plVar1[3];
local_68 = &local_58;
}
else {
local_58 = *plVar2;
local_68 = (long *)*plVar1;
}
local_60 = plVar1[1];
*plVar1 = (long)plVar2;
plVar1[1] = 0;
*(int1 *)(plVar1 + 2) = 0;
if (local_88 != &local_78) {
operator_delete(local_88,local_78 + 1);
}
if (local_48[0] != local_38) {
operator_delete(local_48[0],local_38[0] + 1);
}
if (1 < *(int *)(in_RSI + 0x8c)) {
/* try { // try from 00156e72 to 00156e82 has its CatchHandler @ 00156eee */
std::__cxx11::string::append((char *)&local_68);
}
local_88 = &local_78;
/* try { // try from 00156e96 to 00156e9a has its CatchHandler @ 00156f0b */
std::__cxx11::string::_M_construct<char*>(&local_88,local_68,local_60 + (long)local_68);
/* try { // try from 00156e9b to 00156eaf has its CatchHandler @ 00156ef0 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector();
if (local_88 != &local_78) {
operator_delete(local_88,local_78 + 1);
}
if (local_68 != &local_58) {
operator_delete(local_68,local_58 + 1);
}
return;
}
| |
29,825 | matrix_f_mul_vector | tsotchke[P]eshkol/src/core/utils/vector.c | VectorF* matrix_f_mul_vector(Arena* arena, const MatrixF* mat, const VectorF* vec) {
assert(arena != NULL);
assert(mat != NULL);
assert(vec != NULL);
assert(mat->cols == vec->dim);
VectorF* result = vector_f_create(arena, mat->rows);
if (!result) {
return NULL;
}
// Multiply the matrix by the vector
for (size_t i = 0; i < mat->rows; i++) {
float sum = 0.0f;
for (size_t j = 0; j < mat->cols; j++) {
sum += mat->data[i][j] * vec->data[j];
}
result->data[i] = sum;
}
return result;
} | O0 | c | matrix_f_mul_vector:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x79fd
jmp 0x7a1c
leaq 0x27d1(%rip), %rdi # 0xa1d5
leaq 0x3d4d(%rip), %rsi # 0xb758
movl $0x476, %edx # imm = 0x476
leaq 0x4450(%rip), %rcx # 0xbe67
callq 0x1090
cmpq $0x0, -0x18(%rbp)
je 0x7a25
jmp 0x7a44
leaq 0x41e9(%rip), %rdi # 0xbc15
leaq 0x3d25(%rip), %rsi # 0xb758
movl $0x477, %edx # imm = 0x477
leaq 0x4428(%rip), %rcx # 0xbe67
callq 0x1090
cmpq $0x0, -0x20(%rbp)
je 0x7a4d
jmp 0x7a6c
leaq 0x3e23(%rip), %rdi # 0xb877
leaq 0x3cfd(%rip), %rsi # 0xb758
movl $0x478, %edx # imm = 0x478
leaq 0x4400(%rip), %rcx # 0xbe67
callq 0x1090
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x20(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jne 0x7a80
jmp 0x7a9f
leaq 0x4428(%rip), %rdi # 0xbeaf
leaq 0x3cca(%rip), %rsi # 0xb758
movl $0x479, %edx # imm = 0x479
leaq 0x43cd(%rip), %rcx # 0xbe67
callq 0x1090
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rsi
callq 0x49a0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x7ac8
movq $0x0, -0x8(%rbp)
jmp 0x7b70
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x40(%rcx), %rax
jae 0x7b68
xorps %xmm0, %xmm0
movss %xmm0, -0x34(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x48(%rcx), %rax
jae 0x7b45
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x40(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
movq -0x20(%rbp), %rax
movq -0x40(%rbp), %rcx
movss (%rax,%rcx,4), %xmm2
movss -0x34(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x34(%rbp)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x7af2
movss -0x34(%rbp), %xmm0
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x7ad0
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| matrix_f_mul_vector:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
cmp [rbp+var_10], 0
jz short loc_79FD
jmp short loc_7A1C
loc_79FD:
lea rdi, aArenaNull; "arena != NULL"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov edx, 476h
lea rcx, aVectorfMatrixF; "VectorF *matrix_f_mul_vector(Arena *, c"...
call ___assert_fail
loc_7A1C:
cmp [rbp+var_18], 0
jz short loc_7A25
jmp short loc_7A44
loc_7A25:
lea rdi, aMatNull; "mat != NULL"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov edx, 477h
lea rcx, aVectorfMatrixF; "VectorF *matrix_f_mul_vector(Arena *, c"...
call ___assert_fail
loc_7A44:
cmp [rbp+var_20], 0
jz short loc_7A4D
jmp short loc_7A6C
loc_7A4D:
lea rdi, aVecNull; "vec != NULL"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov edx, 478h
lea rcx, aVectorfMatrixF; "VectorF *matrix_f_mul_vector(Arena *, c"...
call ___assert_fail
loc_7A6C:
mov rax, [rbp+var_18]
mov rax, [rax+48h]
mov rcx, [rbp+var_20]
cmp rax, [rcx+10h]
jnz short loc_7A80
jmp short loc_7A9F
loc_7A80:
lea rdi, aMatColsVecDim; "mat->cols == vec->dim"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
mov edx, 479h
lea rcx, aVectorfMatrixF; "VectorF *matrix_f_mul_vector(Arena *, c"...
call ___assert_fail
loc_7A9F:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_18]
mov rsi, [rax+40h]
call vector_f_create
mov [rbp+var_28], rax
cmp [rbp+var_28], 0
jnz short loc_7AC8
mov [rbp+var_8], 0
jmp loc_7B70
loc_7AC8:
mov [rbp+var_30], 0
loc_7AD0:
mov rax, [rbp+var_30]
mov rcx, [rbp+var_18]
cmp rax, [rcx+40h]
jnb loc_7B68
xorps xmm0, xmm0
movss [rbp+var_34], xmm0
mov [rbp+var_40], 0
loc_7AF2:
mov rax, [rbp+var_40]
mov rcx, [rbp+var_18]
cmp rax, [rcx+48h]
jnb short loc_7B45
mov rax, [rbp+var_18]
mov rcx, [rbp+var_30]
shl rcx, 4
add rax, rcx
mov rcx, [rbp+var_40]
movss xmm0, dword ptr [rax+rcx*4]
mov rax, [rbp+var_20]
mov rcx, [rbp+var_40]
movss xmm2, dword ptr [rax+rcx*4]
movss xmm1, [rbp+var_34]
mulss xmm0, xmm2
addss xmm0, xmm1
movss [rbp+var_34], xmm0
mov rax, [rbp+var_40]
add rax, 1
mov [rbp+var_40], rax
jmp short loc_7AF2
loc_7B45:
movss xmm0, [rbp+var_34]
mov rax, [rbp+var_28]
mov rcx, [rbp+var_30]
movss dword ptr [rax+rcx*4], xmm0
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
jmp loc_7AD0
loc_7B68:
mov rax, [rbp+var_28]
mov [rbp+var_8], rax
loc_7B70:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| long long matrix_f_mul_vector(_QWORD *a1, long long a2, long long a3)
{
unsigned long long j; // [rsp+0h] [rbp-40h]
float v5; // [rsp+Ch] [rbp-34h]
unsigned long long i; // [rsp+10h] [rbp-30h]
long long v7; // [rsp+18h] [rbp-28h]
if ( !a1 )
__assert_fail(
"arena != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c",
1142LL,
"VectorF *matrix_f_mul_vector(Arena *, const MatrixF *, const VectorF *)");
if ( !a2 )
__assert_fail(
"mat != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c",
1143LL,
"VectorF *matrix_f_mul_vector(Arena *, const MatrixF *, const VectorF *)");
if ( !a3 )
__assert_fail(
"vec != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c",
1144LL,
"VectorF *matrix_f_mul_vector(Arena *, const MatrixF *, const VectorF *)");
if ( *(_QWORD *)(a2 + 72) != *(_QWORD *)(a3 + 16) )
__assert_fail(
"mat->cols == vec->dim",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c",
1145LL,
"VectorF *matrix_f_mul_vector(Arena *, const MatrixF *, const VectorF *)");
v7 = vector_f_create(a1, *(_QWORD *)(a2 + 64));
if ( !v7 )
return 0LL;
for ( i = 0LL; i < *(_QWORD *)(a2 + 64); ++i )
{
v5 = 0.0;
for ( j = 0LL; j < *(_QWORD *)(a2 + 72); ++j )
v5 = (float)(*(float *)(16 * i + a2 + 4 * j) * *(float *)(a3 + 4 * j)) + v5;
*(float *)(v7 + 4 * i) = v5;
}
return v7;
}
| matrix_f_mul_vector:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
CMP qword ptr [RBP + -0x10],0x0
JZ 0x001079fd
JMP 0x00107a1c
LAB_001079fd:
LEA RDI,[0x10a1c3]
LEA RSI,[0x10b724]
MOV EDX,0x476
LEA RCX,[0x10be21]
CALL 0x00101090
LAB_00107a1c:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00107a25
JMP 0x00107a44
LAB_00107a25:
LEA RDI,[0x10bbcf]
LEA RSI,[0x10b724]
MOV EDX,0x477
LEA RCX,[0x10be21]
CALL 0x00101090
LAB_00107a44:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x00107a4d
JMP 0x00107a6c
LAB_00107a4d:
LEA RDI,[0x10b831]
LEA RSI,[0x10b724]
MOV EDX,0x478
LEA RCX,[0x10be21]
CALL 0x00101090
LAB_00107a6c:
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x48]
MOV RCX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RCX + 0x10]
JNZ 0x00107a80
JMP 0x00107a9f
LAB_00107a80:
LEA RDI,[0x10be69]
LEA RSI,[0x10b724]
MOV EDX,0x479
LEA RCX,[0x10be21]
CALL 0x00101090
LAB_00107a9f:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + 0x40]
CALL 0x001049a0
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x00107ac8
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00107b70
LAB_00107ac8:
MOV qword ptr [RBP + -0x30],0x0
LAB_00107ad0:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RCX + 0x40]
JNC 0x00107b68
XORPS XMM0,XMM0
MOVSS dword ptr [RBP + -0x34],XMM0
MOV qword ptr [RBP + -0x40],0x0
LAB_00107af2:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RCX + 0x48]
JNC 0x00107b45
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x30]
SHL RCX,0x4
ADD RAX,RCX
MOV RCX,qword ptr [RBP + -0x40]
MOVSS XMM0,dword ptr [RAX + RCX*0x4]
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x40]
MOVSS XMM2,dword ptr [RAX + RCX*0x4]
MOVSS XMM1,dword ptr [RBP + -0x34]
MULSS XMM0,XMM2
ADDSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x34],XMM0
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x1
MOV qword ptr [RBP + -0x40],RAX
JMP 0x00107af2
LAB_00107b45:
MOVSS XMM0,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
MOVSS dword ptr [RAX + RCX*0x4],XMM0
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00107ad0
LAB_00107b68:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x8],RAX
LAB_00107b70:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
long matrix_f_mul_vector(long param_1,long param_2,long param_3)
{
ulong local_48;
float local_3c;
ulong local_38;
long local_10;
if (param_1 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("arena != NULL","/workspace/llm4binary/github2025/eshkol/src/core/utils/vector.c",
0x476,"VectorF *matrix_f_mul_vector(Arena *, const MatrixF *, const VectorF *)");
}
if (param_2 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("mat != NULL","/workspace/llm4binary/github2025/eshkol/src/core/utils/vector.c",
0x477,"VectorF *matrix_f_mul_vector(Arena *, const MatrixF *, const VectorF *)");
}
if (param_3 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("vec != NULL","/workspace/llm4binary/github2025/eshkol/src/core/utils/vector.c",
0x478,"VectorF *matrix_f_mul_vector(Arena *, const MatrixF *, const VectorF *)");
}
if (*(long *)(param_2 + 0x48) != *(long *)(param_3 + 0x10)) {
/* WARNING: Subroutine does not return */
__assert_fail("mat->cols == vec->dim",
"/workspace/llm4binary/github2025/eshkol/src/core/utils/vector.c",0x479,
"VectorF *matrix_f_mul_vector(Arena *, const MatrixF *, const VectorF *)");
}
local_10 = vector_f_create(param_1,*(int8 *)(param_2 + 0x40));
if (local_10 == 0) {
local_10 = 0;
}
else {
for (local_38 = 0; local_38 < *(ulong *)(param_2 + 0x40); local_38 = local_38 + 1) {
local_3c = 0.0;
for (local_48 = 0; local_48 < *(ulong *)(param_2 + 0x48); local_48 = local_48 + 1) {
local_3c = *(float *)(param_2 + local_38 * 0x10 + local_48 * 4) *
*(float *)(param_3 + local_48 * 4) + local_3c;
}
*(float *)(local_10 + local_38 * 4) = local_3c;
}
}
return local_10;
}
| |
29,826 | matrix_f_mul_vector | tsotchke[P]eshkol/src/core/utils/vector.c | VectorF* matrix_f_mul_vector(Arena* arena, const MatrixF* mat, const VectorF* vec) {
assert(arena != NULL);
assert(mat != NULL);
assert(vec != NULL);
assert(mat->cols == vec->dim);
VectorF* result = vector_f_create(arena, mat->rows);
if (!result) {
return NULL;
}
// Multiply the matrix by the vector
for (size_t i = 0; i < mat->rows; i++) {
float sum = 0.0f;
for (size_t j = 0; j < mat->cols; j++) {
sum += mat->data[i][j] * vec->data[j];
}
result->data[i] = sum;
}
return result;
} | O3 | c | matrix_f_mul_vector:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x5e51
movq %rsi, %r14
testq %rsi, %rsi
je 0x5e70
movq %rdx, %rbx
testq %rdx, %rdx
je 0x5e8f
movq 0x48(%r14), %rax
cmpq 0x10(%rbx), %rax
jne 0x5eae
movq 0x40(%r14), %rsi
callq 0x40d8
testq %rax, %rax
je 0x5e49
movq 0x40(%r14), %rcx
testq %rcx, %rcx
je 0x5e49
movq 0x48(%r14), %rdx
xorl %esi, %esi
xorps %xmm0, %xmm0
testq %rdx, %rdx
je 0x5e38
xorl %edi, %edi
movss (%r14,%rdi,4), %xmm1
mulss (%rbx,%rdi,4), %xmm1
addss %xmm1, %xmm0
incq %rdi
cmpq %rdi, %rdx
jne 0x5e21
movss %xmm0, (%rax,%rsi,4)
incq %rsi
addq $0x10, %r14
cmpq %rcx, %rsi
jne 0x5e17
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x12e7(%rip), %rdi # 0x713f
leaq 0x2891(%rip), %rsi # 0x86f0
leaq 0x2f99(%rip), %rcx # 0x8dff
movl $0x476, %edx # imm = 0x476
callq 0x1090
leaq 0x2d36(%rip), %rdi # 0x8bad
leaq 0x2872(%rip), %rsi # 0x86f0
leaq 0x2f7a(%rip), %rcx # 0x8dff
movl $0x477, %edx # imm = 0x477
callq 0x1090
leaq 0x2979(%rip), %rdi # 0x880f
leaq 0x2853(%rip), %rsi # 0x86f0
leaq 0x2f5b(%rip), %rcx # 0x8dff
movl $0x478, %edx # imm = 0x478
callq 0x1090
leaq 0x2f92(%rip), %rdi # 0x8e47
leaq 0x2834(%rip), %rsi # 0x86f0
leaq 0x2f3c(%rip), %rcx # 0x8dff
movl $0x479, %edx # imm = 0x479
callq 0x1090
| matrix_f_mul_vector:
push r14
push rbx
push rax
test rdi, rdi
jz short loc_5E51
mov r14, rsi
test rsi, rsi
jz loc_5E70
mov rbx, rdx
test rdx, rdx
jz loc_5E8F
mov rax, [r14+48h]
cmp rax, [rbx+10h]
jnz loc_5EAE
mov rsi, [r14+40h]
call vector_f_create
test rax, rax
jz short loc_5E49
mov rcx, [r14+40h]
test rcx, rcx
jz short loc_5E49
mov rdx, [r14+48h]
xor esi, esi
loc_5E17:
xorps xmm0, xmm0
test rdx, rdx
jz short loc_5E38
xor edi, edi
loc_5E21:
movss xmm1, dword ptr [r14+rdi*4]
mulss xmm1, dword ptr [rbx+rdi*4]
addss xmm0, xmm1
inc rdi
cmp rdx, rdi
jnz short loc_5E21
loc_5E38:
movss dword ptr [rax+rsi*4], xmm0
inc rsi
add r14, 10h
cmp rsi, rcx
jnz short loc_5E17
loc_5E49:
add rsp, 8
pop rbx
pop r14
retn
loc_5E51:
lea rdi, aArenaNull; "arena != NULL"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVectorfMatrixF; "VectorF *matrix_f_mul_vector(Arena *, c"...
mov edx, 476h
call ___assert_fail
loc_5E70:
lea rdi, aMatNull; "mat != NULL"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVectorfMatrixF; "VectorF *matrix_f_mul_vector(Arena *, c"...
mov edx, 477h
call ___assert_fail
loc_5E8F:
lea rdi, aVecNull; "vec != NULL"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVectorfMatrixF; "VectorF *matrix_f_mul_vector(Arena *, c"...
mov edx, 478h
call ___assert_fail
loc_5EAE:
lea rdi, aMatColsVecDim; "mat->cols == vec->dim"
lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVectorfMatrixF; "VectorF *matrix_f_mul_vector(Arena *, c"...
mov edx, 479h
call ___assert_fail
| long long matrix_f_mul_vector(_QWORD *a1, long long a2, long long a3)
{
long long v3; // r14
long long result; // rax
long long v6; // rcx
long long v7; // rdx
long long i; // rsi
float v9; // xmm0_4
long long j; // rdi
if ( !a1 )
__assert_fail(
"arena != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c",
1142LL,
"VectorF *matrix_f_mul_vector(Arena *, const MatrixF *, const VectorF *)");
v3 = a2;
if ( !a2 )
__assert_fail(
"mat != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c",
1143LL,
"VectorF *matrix_f_mul_vector(Arena *, const MatrixF *, const VectorF *)");
if ( !a3 )
__assert_fail(
"vec != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c",
1144LL,
"VectorF *matrix_f_mul_vector(Arena *, const MatrixF *, const VectorF *)");
if ( *(_QWORD *)(a2 + 72) != *(_QWORD *)(a3 + 16) )
__assert_fail(
"mat->cols == vec->dim",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c",
1145LL,
"VectorF *matrix_f_mul_vector(Arena *, const MatrixF *, const VectorF *)");
result = vector_f_create(a1, *(_QWORD *)(a2 + 64));
if ( result )
{
v6 = *(_QWORD *)(a2 + 64);
if ( v6 )
{
v7 = *(_QWORD *)(a2 + 72);
for ( i = 0LL; i != v6; ++i )
{
v9 = 0.0;
if ( v7 )
{
for ( j = 0LL; j != v7; ++j )
v9 = v9 + (float)(*(float *)(v3 + 4 * j) * *(float *)(a3 + 4 * j));
}
*(float *)(result + 4 * i) = v9;
v3 += 16LL;
}
}
}
return result;
}
| matrix_f_mul_vector:
PUSH R14
PUSH RBX
PUSH RAX
TEST RDI,RDI
JZ 0x00105e51
MOV R14,RSI
TEST RSI,RSI
JZ 0x00105e70
MOV RBX,RDX
TEST RDX,RDX
JZ 0x00105e8f
MOV RAX,qword ptr [R14 + 0x48]
CMP RAX,qword ptr [RBX + 0x10]
JNZ 0x00105eae
MOV RSI,qword ptr [R14 + 0x40]
CALL 0x001040d8
TEST RAX,RAX
JZ 0x00105e49
MOV RCX,qword ptr [R14 + 0x40]
TEST RCX,RCX
JZ 0x00105e49
MOV RDX,qword ptr [R14 + 0x48]
XOR ESI,ESI
LAB_00105e17:
XORPS XMM0,XMM0
TEST RDX,RDX
JZ 0x00105e38
XOR EDI,EDI
LAB_00105e21:
MOVSS XMM1,dword ptr [R14 + RDI*0x4]
MULSS XMM1,dword ptr [RBX + RDI*0x4]
ADDSS XMM0,XMM1
INC RDI
CMP RDX,RDI
JNZ 0x00105e21
LAB_00105e38:
MOVSS dword ptr [RAX + RSI*0x4],XMM0
INC RSI
ADD R14,0x10
CMP RSI,RCX
JNZ 0x00105e17
LAB_00105e49:
ADD RSP,0x8
POP RBX
POP R14
RET
LAB_00105e51:
LEA RDI,[0x10713f]
LEA RSI,[0x1086f0]
LEA RCX,[0x108dff]
MOV EDX,0x476
CALL 0x00101090
LAB_00105e70:
LEA RDI,[0x108bad]
LEA RSI,[0x1086f0]
LEA RCX,[0x108dff]
MOV EDX,0x477
CALL 0x00101090
LAB_00105e8f:
LEA RDI,[0x10880f]
LEA RSI,[0x1086f0]
LEA RCX,[0x108dff]
MOV EDX,0x478
CALL 0x00101090
LAB_00105eae:
LEA RDI,[0x108e47]
LEA RSI,[0x1086f0]
LEA RCX,[0x108dff]
MOV EDX,0x479
CALL 0x00101090
|
void matrix_f_mul_vector(long param_1,long param_2,long param_3)
{
long lVar1;
long lVar2;
long lVar3;
long lVar4;
long lVar5;
float fVar6;
if (param_1 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("arena != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c"
,0x476,"VectorF *matrix_f_mul_vector(Arena *, const MatrixF *, const VectorF *)");
}
if (param_2 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("mat != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c"
,0x477,"VectorF *matrix_f_mul_vector(Arena *, const MatrixF *, const VectorF *)");
}
if (param_3 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("vec != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c"
,0x478,"VectorF *matrix_f_mul_vector(Arena *, const MatrixF *, const VectorF *)");
}
if (*(long *)(param_2 + 0x48) == *(long *)(param_3 + 0x10)) {
lVar3 = vector_f_create();
if ((lVar3 != 0) && (lVar1 = *(long *)(param_2 + 0x40), lVar1 != 0)) {
lVar2 = *(long *)(param_2 + 0x48);
lVar4 = 0;
do {
fVar6 = 0.0;
if (lVar2 != 0) {
lVar5 = 0;
do {
fVar6 = fVar6 + *(float *)(param_2 + lVar5 * 4) * *(float *)(param_3 + lVar5 * 4);
lVar5 = lVar5 + 1;
} while (lVar2 != lVar5);
}
*(float *)(lVar3 + lVar4 * 4) = fVar6;
lVar4 = lVar4 + 1;
param_2 = param_2 + 0x10;
} while (lVar4 != lVar1);
}
return;
}
/* WARNING: Subroutine does not return */
__assert_fail("mat->cols == vec->dim",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c",
0x479,"VectorF *matrix_f_mul_vector(Arena *, const MatrixF *, const VectorF *)");
}
| |
29,827 | alloc_tensor_range | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-alloc.c | static bool alloc_tensor_range(struct ggml_context * ctx,
struct ggml_tensor * first, struct ggml_tensor * last,
ggml_backend_buffer_type_t buft, size_t size,
ggml_backend_buffer_t ** buffers, size_t * n_buffers) {
ggml_backend_buffer_t buffer = ggml_backend_buft_alloc_buffer(buft, size);
if (buffer == NULL) {
#ifndef NDEBUG
GGML_LOG_DEBUG("%s: failed to allocate %s buffer of size %zu\n", __func__, ggml_backend_buft_name(buft), size);
#endif
for (size_t i = 0; i < *n_buffers; i++) {
ggml_backend_buffer_free((*buffers)[i]);
}
free(*buffers);
return false;
}
struct ggml_tallocr tallocr = ggml_tallocr_new(buffer);
for (struct ggml_tensor * t = first; t != last; t = ggml_get_next_tensor(ctx, t)) {
if (t->data == NULL) {
if (t->view_src == NULL) {
ggml_tallocr_alloc(&tallocr, t);
} else if (t->buffer == NULL) {
ggml_backend_view_init(t);
}
} else {
if (t->view_src != NULL && t->buffer == NULL) {
// view of a pre-allocated tensor
ggml_backend_view_init(t);
}
}
}
*buffers = realloc(*buffers, sizeof(ggml_backend_buffer_t) * (*n_buffers + 1));
(*buffers)[(*n_buffers)++] = buffer;
return true;
} | O2 | c | alloc_tensor_range:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %r14
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %r12
movq 0x60(%rsp), %rbp
movq %rcx, %rdi
movq %r8, (%rsp)
movq %r8, %rsi
callq 0x1d700
testq %rax, %rax
je 0x2ae3b
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %rax, (%rsp)
movq %rax, %rsi
callq 0x1fd60
cmpq %r15, %r13
je 0x2ae0e
cmpq $0x0, 0xf8(%r13)
movq 0xe8(%r13), %rax
je 0x2addd
testq %rax, %rax
jne 0x2ade2
jmp 0x2adfe
testq %rax, %rax
je 0x2adf3
cmpq $0x0, 0x8(%r13)
jne 0x2adfe
movq %r13, %rdi
callq 0x1f420
jmp 0x2adfe
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1d9a0
movq %r12, %rdi
movq %r13, %rsi
callq 0x1e820
movq %rax, %r13
jmp 0x2adc0
movq (%r14), %rdi
movq (%rbp), %rax
leaq 0x8(,%rax,8), %rsi
callq 0x1f860
movq %rax, (%r14)
movq (%rbp), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, (%rbp)
movq (%rsp), %r15
movq %r15, (%rax,%rcx,8)
jmp 0x2ae83
movq %rax, %r15
movq %rbx, %rdi
callq 0x1f6b0
leaq 0x263cf(%rip), %rsi # 0x5121c
leaq 0x26901(%rip), %rdx # 0x51755
xorl %ebx, %ebx
pushq $0x1
popq %rdi
movq %rax, %rcx
movq (%rsp), %r8
xorl %eax, %eax
callq 0x1db70
movq (%r14), %rdi
cmpq (%rbp), %rbx
jae 0x2ae7e
movq (%rdi,%rbx,8), %rdi
callq 0x1fa90
incq %rbx
jmp 0x2ae67
callq 0x1ed30
testq %r15, %r15
setne %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| alloc_tensor_range:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14, r9
mov rbx, rcx
mov r15, rdx
mov r13, rsi
mov r12, rdi
mov rbp, [rsp+58h+arg_0]
mov rdi, rcx
mov [rsp+58h+var_58], r8
mov rsi, r8
call _ggml_backend_buft_alloc_buffer
test rax, rax
jz loc_2AE3B
lea rbx, [rsp+58h+var_50]
mov rdi, rbx
mov [rsp+58h+var_58], rax
mov rsi, rax
call _ggml_tallocr_new
loc_2ADC0:
cmp r13, r15
jz short loc_2AE0E
cmp qword ptr [r13+0F8h], 0
mov rax, [r13+0E8h]
jz short loc_2ADDD
test rax, rax
jnz short loc_2ADE2
jmp short loc_2ADFE
loc_2ADDD:
test rax, rax
jz short loc_2ADF3
loc_2ADE2:
cmp qword ptr [r13+8], 0
jnz short loc_2ADFE
mov rdi, r13
call _ggml_backend_view_init
jmp short loc_2ADFE
loc_2ADF3:
mov rdi, rbx
mov rsi, r13
call _ggml_tallocr_alloc
loc_2ADFE:
mov rdi, r12
mov rsi, r13
call _ggml_get_next_tensor
mov r13, rax
jmp short loc_2ADC0
loc_2AE0E:
mov rdi, [r14]
mov rax, [rbp+0]
lea rsi, ds:8[rax*8]
call _realloc
mov [r14], rax
mov rcx, [rbp+0]
lea rdx, [rcx+1]
mov [rbp+0], rdx
mov r15, [rsp+58h+var_58]
mov [rax+rcx*8], r15
jmp short loc_2AE83
loc_2AE3B:
mov r15, rax
mov rdi, rbx
call _ggml_backend_buft_name
lea rsi, aSFailedToAlloc_0; "%s: failed to allocate %s buffer of siz"...
lea rdx, aAllocTensorRan; "alloc_tensor_range"
xor ebx, ebx
push 1
pop rdi
mov rcx, rax
mov r8, [rsp+58h+var_58]
xor eax, eax
call _ggml_log_internal
loc_2AE67:
mov rdi, [r14]
cmp rbx, [rbp+0]
jnb short loc_2AE7E
mov rdi, [rdi+rbx*8]; void *
call _ggml_backend_buffer_free
inc rbx
jmp short loc_2AE67
loc_2AE7E:
call _free
loc_2AE83:
test r15, r15
setnz al
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| bool alloc_tensor_range(
long long a1,
_QWORD *next_tensor,
_QWORD *a3,
long long a4,
long long a5,
long long *a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
double a11,
double a12,
__m128 a13,
__m128 a14,
unsigned long long *a15)
{
long long v19; // rax
double v20; // xmm4_8
double v21; // xmm5_8
long long v22; // rax
long long v23; // rax
unsigned long long v24; // rcx
long long v25; // r15
long long v26; // rax
unsigned long long v27; // rbx
long long v28; // r9
__m128 v29; // xmm4
__m128 v30; // xmm5
long long v31; // rdi
long long v34; // [rsp+0h] [rbp-58h]
_QWORD v35[10]; // [rsp+8h] [rbp-50h] BYREF
v19 = ggml_backend_buft_alloc_buffer(a4, a5);
if ( v19 )
{
v34 = v19;
ggml_tallocr_new(v35, v19);
while ( 1 )
{
if ( next_tensor == a3 )
{
v23 = realloc(*a6, 8 * *a15 + 8);
*a6 = v23;
v24 = (*a15)++;
v25 = v34;
*(_QWORD *)(v23 + 8 * v24) = v34;
return v25 != 0;
}
v22 = next_tensor[29];
if ( next_tensor[31] )
{
if ( !v22 )
goto LABEL_11;
}
else if ( !v22 )
{
ggml_tallocr_alloc(v35, (long long)next_tensor, a7, a8, a9, a10, v20, v21, a13, a14);
goto LABEL_11;
}
if ( !next_tensor[1] )
ggml_backend_view_init(next_tensor);
LABEL_11:
next_tensor = (_QWORD *)ggml_get_next_tensor(a1, next_tensor);
}
}
v25 = 0LL;
v26 = ggml_backend_buft_name(a4);
v27 = 0LL;
ggml_log_internal(
a7,
a8,
a9,
a10,
v29,
v30,
a13,
a14,
1LL,
(long long)"%s: failed to allocate %s buffer of size %zu\n",
(long long)"alloc_tensor_range",
v26,
a5,
v28);
while ( 1 )
{
v31 = *a6;
if ( v27 >= *a15 )
break;
ggml_backend_buffer_free(*(void **)(v31 + 8 * v27++));
}
free(v31, "%s: failed to allocate %s buffer of size %zu\n");
return v25 != 0;
}
| alloc_tensor_range:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,R9
MOV RBX,RCX
MOV R15,RDX
MOV R13,RSI
MOV R12,RDI
MOV RBP,qword ptr [RSP + 0x60]
MOV RDI,RCX
MOV qword ptr [RSP],R8
MOV RSI,R8
CALL 0x0011d700
TEST RAX,RAX
JZ 0x0012ae3b
LEA RBX,[RSP + 0x8]
MOV RDI,RBX
MOV qword ptr [RSP],RAX
MOV RSI,RAX
CALL 0x0011fd60
LAB_0012adc0:
CMP R13,R15
JZ 0x0012ae0e
CMP qword ptr [R13 + 0xf8],0x0
MOV RAX,qword ptr [R13 + 0xe8]
JZ 0x0012addd
TEST RAX,RAX
JNZ 0x0012ade2
JMP 0x0012adfe
LAB_0012addd:
TEST RAX,RAX
JZ 0x0012adf3
LAB_0012ade2:
CMP qword ptr [R13 + 0x8],0x0
JNZ 0x0012adfe
MOV RDI,R13
CALL 0x0011f420
JMP 0x0012adfe
LAB_0012adf3:
MOV RDI,RBX
MOV RSI,R13
CALL 0x0011d9a0
LAB_0012adfe:
MOV RDI,R12
MOV RSI,R13
CALL 0x0011e820
MOV R13,RAX
JMP 0x0012adc0
LAB_0012ae0e:
MOV RDI,qword ptr [R14]
MOV RAX,qword ptr [RBP]
LEA RSI,[0x8 + RAX*0x8]
CALL 0x0011f860
MOV qword ptr [R14],RAX
MOV RCX,qword ptr [RBP]
LEA RDX,[RCX + 0x1]
MOV qword ptr [RBP],RDX
MOV R15,qword ptr [RSP]
MOV qword ptr [RAX + RCX*0x8],R15
JMP 0x0012ae83
LAB_0012ae3b:
MOV R15,RAX
MOV RDI,RBX
CALL 0x0011f6b0
LEA RSI,[0x15121c]
LEA RDX,[0x151755]
XOR EBX,EBX
PUSH 0x1
POP RDI
MOV RCX,RAX
MOV R8,qword ptr [RSP]
XOR EAX,EAX
CALL 0x0011db70
LAB_0012ae67:
MOV RDI,qword ptr [R14]
CMP RBX,qword ptr [RBP]
JNC 0x0012ae7e
MOV RDI,qword ptr [RDI + RBX*0x8]
CALL 0x0011fa90
INC RBX
JMP 0x0012ae67
LAB_0012ae7e:
CALL 0x0011ed30
LAB_0012ae83:
TEST R15,R15
SETNZ AL
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
bool alloc_tensor_range(int8 param_1,long param_2,long param_3,int8 param_4,
int8 param_5,int8 *param_6,ulong *param_7)
{
long lVar1;
void *pvVar2;
int8 uVar3;
ulong uVar4;
int1 local_50 [32];
lVar1 = ggml_backend_buft_alloc_buffer(param_4,param_5);
if (lVar1 == 0) {
uVar3 = ggml_backend_buft_name(param_4);
ggml_log_internal(1,"%s: failed to allocate %s buffer of size %zu\n","alloc_tensor_range",uVar3,
param_5);
for (uVar4 = 0; uVar4 < *param_7; uVar4 = uVar4 + 1) {
ggml_backend_buffer_free(*(int8 *)((long)*param_6 + uVar4 * 8));
}
free((void *)*param_6);
}
else {
ggml_tallocr_new(local_50,lVar1);
for (; param_2 != param_3; param_2 = ggml_get_next_tensor(param_1,param_2)) {
if (*(long *)(param_2 + 0xf8) == 0) {
if (*(long *)(param_2 + 0xe8) != 0) goto LAB_0012ade2;
ggml_tallocr_alloc(local_50,param_2);
}
else if (*(long *)(param_2 + 0xe8) != 0) {
LAB_0012ade2:
if (*(long *)(param_2 + 8) == 0) {
ggml_backend_view_init(param_2);
}
}
}
pvVar2 = realloc((void *)*param_6,*param_7 * 8 + 8);
*param_6 = pvVar2;
uVar4 = *param_7;
*param_7 = uVar4 + 1;
*(long *)((long)pvVar2 + uVar4 * 8) = lVar1;
}
return lVar1 != 0;
}
| |
29,828 | alloc_tensor_range | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-alloc.c | static bool alloc_tensor_range(struct ggml_context * ctx,
struct ggml_tensor * first, struct ggml_tensor * last,
ggml_backend_buffer_type_t buft, size_t size,
ggml_backend_buffer_t ** buffers, size_t * n_buffers) {
ggml_backend_buffer_t buffer = ggml_backend_buft_alloc_buffer(buft, size);
if (buffer == NULL) {
#ifndef NDEBUG
GGML_LOG_DEBUG("%s: failed to allocate %s buffer of size %zu\n", __func__, ggml_backend_buft_name(buft), size);
#endif
for (size_t i = 0; i < *n_buffers; i++) {
ggml_backend_buffer_free((*buffers)[i]);
}
free(*buffers);
return false;
}
struct ggml_tallocr tallocr = ggml_tallocr_new(buffer);
for (struct ggml_tensor * t = first; t != last; t = ggml_get_next_tensor(ctx, t)) {
if (t->data == NULL) {
if (t->view_src == NULL) {
ggml_tallocr_alloc(&tallocr, t);
} else if (t->buffer == NULL) {
ggml_backend_view_init(t);
}
} else {
if (t->view_src != NULL && t->buffer == NULL) {
// view of a pre-allocated tensor
ggml_backend_view_init(t);
}
}
}
*buffers = realloc(*buffers, sizeof(ggml_backend_buffer_t) * (*n_buffers + 1));
(*buffers)[(*n_buffers)++] = buffer;
return true;
} | O3 | c | alloc_tensor_range:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %r14
movq %r8, %rbp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %r12
movq %rcx, %rdi
movq %r8, %rsi
callq 0x16480
testq %rax, %rax
je 0x251af
leaq 0x8(%rsp), %rdi
movq %rax, %rbx
movq %rax, %rsi
callq 0x17fa0
cmpq %r15, %r13
je 0x25181
leaq 0x8(%rsp), %rbp
cmpq $0x0, 0xf8(%r13)
movq 0xe8(%r13), %rax
je 0x2514d
testq %rax, %rax
jne 0x25152
jmp 0x2516e
testq %rax, %rax
je 0x25163
cmpq $0x0, 0x8(%r13)
jne 0x2516e
movq %r13, %rdi
callq 0x178f0
jmp 0x2516e
movq %rbp, %rdi
movq %r13, %rsi
callq 0x166c0
movq %r12, %rdi
movq %r13, %rsi
callq 0x170b0
movq %rax, %r13
cmpq %r15, %rax
jne 0x25135
movq (%r14), %rdi
movq 0x60(%rsp), %r15
movq (%r15), %rax
leaq 0x8(,%rax,8), %rsi
callq 0x17c10
movq %rax, (%r14)
movq (%r15), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, (%r15)
movq %rbx, (%rax,%rcx,8)
movq %rbx, %r15
jmp 0x25205
movq %rax, %r15
movq %rbx, %rdi
callq 0x17aa0
leaq 0x2a0eb(%rip), %rsi # 0x4f2ac
leaq 0x2a61d(%rip), %rdx # 0x4f7e5
movl $0x1, %edi
movq %rax, %rcx
movq %rbp, %r8
xorl %eax, %eax
callq 0x16810
movq 0x60(%rsp), %r12
cmpq $0x0, (%r12)
je 0x251fd
xorl %ebx, %ebx
movq (%r14), %rax
movq (%rax,%rbx,8), %rdi
callq 0x17d70
incq %rbx
cmpq (%r12), %rbx
jb 0x251e8
movq (%r14), %rdi
callq 0x17420
testq %r15, %r15
setne %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| alloc_tensor_range:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14, r9
mov rbp, r8
mov rbx, rcx
mov r15, rdx
mov r13, rsi
mov r12, rdi
mov rdi, rcx
mov rsi, r8
call _ggml_backend_buft_alloc_buffer
test rax, rax
jz loc_251AF
lea rdi, [rsp+58h+var_50]
mov rbx, rax
mov rsi, rax
call _ggml_tallocr_new
cmp r13, r15
jz short loc_25181
lea rbp, [rsp+58h+var_50]
loc_25135:
cmp qword ptr [r13+0F8h], 0
mov rax, [r13+0E8h]
jz short loc_2514D
test rax, rax
jnz short loc_25152
jmp short loc_2516E
loc_2514D:
test rax, rax
jz short loc_25163
loc_25152:
cmp qword ptr [r13+8], 0
jnz short loc_2516E
mov rdi, r13
call _ggml_backend_view_init
jmp short loc_2516E
loc_25163:
mov rdi, rbp
mov rsi, r13
call _ggml_tallocr_alloc
loc_2516E:
mov rdi, r12
mov rsi, r13
call _ggml_get_next_tensor
mov r13, rax
cmp rax, r15
jnz short loc_25135
loc_25181:
mov rdi, [r14]
mov r15, [rsp+58h+arg_0]
mov rax, [r15]
lea rsi, ds:8[rax*8]
call _realloc
mov [r14], rax
mov rcx, [r15]
lea rdx, [rcx+1]
mov [r15], rdx
mov [rax+rcx*8], rbx
mov r15, rbx
jmp short loc_25205
loc_251AF:
mov r15, rax
mov rdi, rbx
call _ggml_backend_buft_name
lea rsi, aSFailedToAlloc_0; "%s: failed to allocate %s buffer of siz"...
lea rdx, aAllocTensorRan; "alloc_tensor_range"
mov edi, 1
mov rcx, rax
mov r8, rbp
xor eax, eax
call _ggml_log_internal
mov r12, [rsp+58h+arg_0]
cmp qword ptr [r12], 0
jz short loc_251FD
xor ebx, ebx
loc_251E8:
mov rax, [r14]
mov rdi, [rax+rbx*8]; void *
call _ggml_backend_buffer_free
inc rbx
cmp rbx, [r12]
jb short loc_251E8
loc_251FD:
mov rdi, [r14]
call _free
loc_25205:
test r15, r15
setnz al
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| bool alloc_tensor_range(
long long a1,
_QWORD *a2,
_QWORD *a3,
long long a4,
long long a5,
long long *a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
double a11,
double a12,
__m128 a13,
__m128 a14,
unsigned long long *a15)
{
_QWORD *next_tensor; // r13
long long v20; // rax
long long v21; // rbx
double v22; // xmm4_8
double v23; // xmm5_8
long long v24; // rax
long long v25; // rax
unsigned long long v26; // rcx
long long v27; // r15
long long v28; // rax
long long v29; // r9
__m128 v30; // xmm4
__m128 v31; // xmm5
unsigned long long v32; // rbx
_QWORD v34[10]; // [rsp+8h] [rbp-50h] BYREF
next_tensor = a2;
v20 = ggml_backend_buft_alloc_buffer(a4, a5);
if ( v20 )
{
v21 = v20;
ggml_tallocr_new(v34, v20);
if ( a2 != a3 )
{
do
{
v24 = next_tensor[29];
if ( next_tensor[31] )
{
if ( v24 )
goto LABEL_7;
}
else
{
if ( v24 )
{
LABEL_7:
if ( !next_tensor[1] )
ggml_backend_view_init(next_tensor);
goto LABEL_10;
}
ggml_tallocr_alloc(v34, (long long)next_tensor, a7, a8, a9, a10, v22, v23, a13, a14);
}
LABEL_10:
next_tensor = (_QWORD *)ggml_get_next_tensor(a1, (long long)next_tensor);
}
while ( next_tensor != a3 );
}
v25 = realloc(*a6, 8 * *a15 + 8);
*a6 = v25;
v26 = (*a15)++;
*(_QWORD *)(v25 + 8 * v26) = v21;
v27 = v21;
}
else
{
v27 = 0LL;
v28 = ggml_backend_buft_name(a4);
ggml_log_internal(
1u,
(long long)"%s: failed to allocate %s buffer of size %zu\n",
(long long)"alloc_tensor_range",
v28,
a5,
v29,
a7,
a8,
a9,
a10,
v30,
v31,
a13,
a14);
if ( *a15 )
{
v32 = 0LL;
do
ggml_backend_buffer_free(*(void **)(*a6 + 8 * v32++));
while ( v32 < *a15 );
}
free(*a6);
}
return v27 != 0;
}
| alloc_tensor_range:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,R9
MOV RBP,R8
MOV RBX,RCX
MOV R15,RDX
MOV R13,RSI
MOV R12,RDI
MOV RDI,RCX
MOV RSI,R8
CALL 0x00116480
TEST RAX,RAX
JZ 0x001251af
LEA RDI,[RSP + 0x8]
MOV RBX,RAX
MOV RSI,RAX
CALL 0x00117fa0
CMP R13,R15
JZ 0x00125181
LEA RBP,[RSP + 0x8]
LAB_00125135:
CMP qword ptr [R13 + 0xf8],0x0
MOV RAX,qword ptr [R13 + 0xe8]
JZ 0x0012514d
TEST RAX,RAX
JNZ 0x00125152
JMP 0x0012516e
LAB_0012514d:
TEST RAX,RAX
JZ 0x00125163
LAB_00125152:
CMP qword ptr [R13 + 0x8],0x0
JNZ 0x0012516e
MOV RDI,R13
CALL 0x001178f0
JMP 0x0012516e
LAB_00125163:
MOV RDI,RBP
MOV RSI,R13
CALL 0x001166c0
LAB_0012516e:
MOV RDI,R12
MOV RSI,R13
CALL 0x001170b0
MOV R13,RAX
CMP RAX,R15
JNZ 0x00125135
LAB_00125181:
MOV RDI,qword ptr [R14]
MOV R15,qword ptr [RSP + 0x60]
MOV RAX,qword ptr [R15]
LEA RSI,[0x8 + RAX*0x8]
CALL 0x00117c10
MOV qword ptr [R14],RAX
MOV RCX,qword ptr [R15]
LEA RDX,[RCX + 0x1]
MOV qword ptr [R15],RDX
MOV qword ptr [RAX + RCX*0x8],RBX
MOV R15,RBX
JMP 0x00125205
LAB_001251af:
MOV R15,RAX
MOV RDI,RBX
CALL 0x00117aa0
LEA RSI,[0x14f2ac]
LEA RDX,[0x14f7e5]
MOV EDI,0x1
MOV RCX,RAX
MOV R8,RBP
XOR EAX,EAX
CALL 0x00116810
MOV R12,qword ptr [RSP + 0x60]
CMP qword ptr [R12],0x0
JZ 0x001251fd
XOR EBX,EBX
LAB_001251e8:
MOV RAX,qword ptr [R14]
MOV RDI,qword ptr [RAX + RBX*0x8]
CALL 0x00117d70
INC RBX
CMP RBX,qword ptr [R12]
JC 0x001251e8
LAB_001251fd:
MOV RDI,qword ptr [R14]
CALL 0x00117420
LAB_00125205:
TEST R15,R15
SETNZ AL
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
bool alloc_tensor_range(int8 param_1,long param_2,long param_3,int8 param_4,
int8 param_5,long *param_6,ulong *param_7)
{
long lVar1;
void *pvVar2;
int8 uVar3;
ulong uVar4;
int1 local_50 [32];
lVar1 = ggml_backend_buft_alloc_buffer(param_4,param_5);
if (lVar1 == 0) {
uVar3 = ggml_backend_buft_name(param_4);
ggml_log_internal(1,"%s: failed to allocate %s buffer of size %zu\n","alloc_tensor_range",uVar3,
param_5);
if (*param_7 != 0) {
uVar4 = 0;
do {
ggml_backend_buffer_free(*(int8 *)(*param_6 + uVar4 * 8));
uVar4 = uVar4 + 1;
} while (uVar4 < *param_7);
}
free((void *)*param_6);
}
else {
ggml_tallocr_new(local_50,lVar1);
if (param_2 != param_3) {
do {
if (*(long *)(param_2 + 0xf8) == 0) {
if (*(long *)(param_2 + 0xe8) != 0) goto LAB_00125152;
ggml_tallocr_alloc(local_50,param_2);
}
else if (*(long *)(param_2 + 0xe8) != 0) {
LAB_00125152:
if (*(long *)(param_2 + 8) == 0) {
ggml_backend_view_init(param_2);
}
}
param_2 = ggml_get_next_tensor(param_1,param_2);
} while (param_2 != param_3);
}
pvVar2 = realloc((void *)*param_6,*param_7 * 8 + 8);
*param_6 = (long)pvVar2;
uVar4 = *param_7;
*param_7 = uVar4 + 1;
*(long *)((long)pvVar2 + uVar4 * 8) = lVar1;
}
return lVar1 != 0;
}
| |
29,829 | get_hash_link | eloqsql/mysys/mf_keycache.c | static HASH_LINK *get_hash_link(SIMPLE_KEY_CACHE_CB *keycache,
int file, my_off_t filepos)
{
reg1 HASH_LINK *hash_link, **start;
#if defined(KEYCACHE_DEBUG)
int cnt;
#endif
KEYCACHE_DBUG_PRINT("get_hash_link", ("fd: %u pos: %lu",
(uint) file,(ulong) filepos));
restart:
/*
Find the bucket in the hash table for the pair (file, filepos);
start contains the head of the bucket list,
hash_link points to the first member of the list
*/
hash_link= *(start= &keycache->hash_root[KEYCACHE_HASH(file, filepos)]);
#if defined(KEYCACHE_DEBUG)
cnt= 0;
#endif
/* Look for an element for the pair (file, filepos) in the bucket chain */
while (hash_link &&
(hash_link->diskpos != filepos || hash_link->file != file))
{
hash_link= hash_link->next;
#if defined(KEYCACHE_DEBUG)
cnt++;
if (! (cnt <= keycache->hash_links_used))
{
int i;
for (i=0, hash_link= *start ;
i < cnt ; i++, hash_link= hash_link->next)
{
KEYCACHE_DBUG_PRINT("get_hash_link", ("fd: %u pos: %lu",
(uint) hash_link->file,(ulong) hash_link->diskpos));
}
}
KEYCACHE_DBUG_ASSERT(cnt <= keycache->hash_links_used);
#endif
}
if (! hash_link)
{
/* There is no hash link in the hash table for the pair (file, filepos) */
if (keycache->free_hash_list)
{
hash_link= keycache->free_hash_list;
keycache->free_hash_list= hash_link->next;
}
else if (keycache->hash_links_used < keycache->hash_links)
{
hash_link= &keycache->hash_link_root[keycache->hash_links_used++];
}
else
{
/* Wait for a free hash link */
struct st_my_thread_var *thread= my_thread_var;
KEYCACHE_PAGE page;
KEYCACHE_DBUG_PRINT("get_hash_link", ("waiting"));
page.file= file;
page.filepos= filepos;
thread->keycache_link= (void *) &page;
link_into_queue(&keycache->waiting_for_hash_link, thread);
KEYCACHE_DBUG_PRINT("get_hash_link: wait",
("suspend thread %ld", (ulong) thread->id));
keycache_pthread_cond_wait(&thread->suspend,
&keycache->cache_lock);
thread->keycache_link= NULL;
goto restart;
}
hash_link->file= file;
hash_link->diskpos= filepos;
link_hash(start, hash_link);
}
/* Register the request for the page */
hash_link->requests++;
return hash_link;
} | O0 | c | get_hash_link:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
jmp 0xe6265
jmp 0xe6267
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movl 0x18(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movslq -0xc(%rbp), %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movl 0x164(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq -0x8(%rbp), %rdx
movl 0x38(%rdx), %edx
subl $0x1, %edx
movl %edx, %edx
andq %rdx, %rcx
movq %rcx, %rsi
shlq $0x3, %rsi
movq %rax, %rdx
addq %rsi, %rdx
movq %rdx, -0x28(%rbp)
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x20(%rbp)
movb %al, -0x49(%rbp)
je 0xe6300
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rcx
movb $0x1, %al
cmpq -0x18(%rbp), %rcx
movb %al, -0x4a(%rbp)
jne 0xe62fa
movq -0x20(%rbp), %rax
movl 0x18(%rax), %eax
cmpl -0xc(%rbp), %eax
setne %al
movb %al, -0x4a(%rbp)
movb -0x4a(%rbp), %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
testb $0x1, %al
jne 0xe6309
jmp 0xe6316
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0xe62cb
cmpq $0x0, -0x20(%rbp)
jne 0xe642a
movq -0x8(%rbp), %rax
cmpq $0x0, 0x90(%rax)
je 0xe6355
movq -0x8(%rbp), %rax
movq 0x90(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x90(%rax)
jmp 0xe6407
movq -0x8(%rbp), %rax
movl 0x44(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x40(%rcx), %eax
jge 0xe638f
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rax
movq -0x8(%rbp), %rdx
movl 0x44(%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x44(%rdx)
movslq %ecx, %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0xe6405
callq 0xf7440
movq %rax, -0x30(%rbp)
jmp 0xe639a
movl -0xc(%rbp), %eax
movl %eax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
leaq -0x40(%rbp), %rcx
movq %rcx, 0xa8(%rax)
movq -0x8(%rbp), %rdi
addq $0x118, %rdi # imm = 0x118
movq -0x30(%rbp), %rsi
callq 0xe6600
jmp 0xe63cd
movq -0x30(%rbp), %rdi
addq $0x8, %rdi
movq -0x8(%rbp), %rsi
addq $0xc0, %rsi
leaq 0x6f0ea(%rip), %rdx # 0x1554d1
movl $0x71e, %ecx # imm = 0x71E
callq 0xe61e0
movq -0x30(%rbp), %rax
movq $0x0, 0xa8(%rax)
jmp 0xe6267
jmp 0xe6407
movl -0xc(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xe6930
movq -0x20(%rbp), %rax
movl 0x28(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x28(%rax)
movq -0x20(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| get_hash_link_0:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
jmp short $+2
loc_E6265:
jmp short $+2
loc_E6267:
mov rax, [rbp+var_8]
mov rax, [rax+80h]
mov [rbp+var_48], rax
mov rax, [rbp+var_18]
mov rcx, [rbp+var_8]
mov ecx, [rcx+18h]
xor edx, edx
div rcx
movsxd rcx, [rbp+var_C]
add rax, rcx
mov rcx, [rbp+var_8]
mov ecx, [rcx+164h]
xor edx, edx
div rcx
mov rcx, rax
mov rax, [rbp+var_48]
mov rdx, [rbp+var_8]
mov edx, [rdx+38h]
sub edx, 1
mov edx, edx
and rcx, rdx
mov rsi, rcx
shl rsi, 3
mov rdx, rax
add rdx, rsi
mov [rbp+var_28], rdx
mov rax, [rax+rcx*8]
mov [rbp+var_20], rax
loc_E62CB:
xor eax, eax
cmp [rbp+var_20], 0
mov [rbp+var_49], al
jz short loc_E6300
mov rax, [rbp+var_20]
mov rcx, [rax+20h]
mov al, 1
cmp rcx, [rbp+var_18]
mov [rbp+var_4A], al
jnz short loc_E62FA
mov rax, [rbp+var_20]
mov eax, [rax+18h]
cmp eax, [rbp+var_C]
setnz al
mov [rbp+var_4A], al
loc_E62FA:
mov al, [rbp+var_4A]
mov [rbp+var_49], al
loc_E6300:
mov al, [rbp+var_49]
test al, 1
jnz short loc_E6309
jmp short loc_E6316
loc_E6309:
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_20], rax
jmp short loc_E62CB
loc_E6316:
cmp [rbp+var_20], 0
jnz loc_E642A
mov rax, [rbp+var_8]
cmp qword ptr [rax+90h], 0
jz short loc_E6355
mov rax, [rbp+var_8]
mov rax, [rax+90h]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov rcx, [rax]
mov rax, [rbp+var_8]
mov [rax+90h], rcx
jmp loc_E6407
loc_E6355:
mov rax, [rbp+var_8]
mov eax, [rax+44h]
mov rcx, [rbp+var_8]
cmp eax, [rcx+40h]
jge short loc_E638F
mov rax, [rbp+var_8]
mov rax, [rax+88h]
mov rdx, [rbp+var_8]
mov ecx, [rdx+44h]
mov esi, ecx
add esi, 1
mov [rdx+44h], esi
movsxd rcx, ecx
imul rcx, 30h ; '0'
add rax, rcx
mov [rbp+var_20], rax
jmp short loc_E6405
loc_E638F:
call _my_thread_var
mov [rbp+var_30], rax
jmp short $+2
loc_E639A:
mov eax, [rbp+var_C]
mov [rbp+var_40], eax
mov rax, [rbp+var_18]
mov [rbp+var_38], rax
mov rax, [rbp+var_30]
lea rcx, [rbp+var_40]
mov [rax+0A8h], rcx
mov rdi, [rbp+var_8]
add rdi, 118h
mov rsi, [rbp+var_30]
call link_into_queue
jmp short $+2
loc_E63CD:
mov rdi, [rbp+var_30]
add rdi, 8
mov rsi, [rbp+var_8]
add rsi, 0C0h
lea rdx, aWorkspaceLlm4b_36; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 71Eh
call inline_mysql_cond_wait_4
mov rax, [rbp+var_30]
mov qword ptr [rax+0A8h], 0
jmp loc_E6267
loc_E6405:
jmp short $+2
loc_E6407:
mov ecx, [rbp+var_C]
mov rax, [rbp+var_20]
mov [rax+18h], ecx
mov rcx, [rbp+var_18]
mov rax, [rbp+var_20]
mov [rax+20h], rcx
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_20]
call link_hash_0
loc_E642A:
mov rax, [rbp+var_20]
mov ecx, [rax+28h]
add ecx, 1
mov [rax+28h], ecx
mov rax, [rbp+var_20]
add rsp, 50h
pop rbp
retn
| long long * get_hash_link_0(long long a1, int a2, unsigned long long a3)
{
const char *v3; // rsi
long long v4; // rax
int v5; // ecx
bool v7; // [rsp+6h] [rbp-4Ah]
bool v8; // [rsp+7h] [rbp-49h]
int v9; // [rsp+10h] [rbp-40h] BYREF
unsigned long long v10; // [rsp+18h] [rbp-38h]
long long v11; // [rsp+20h] [rbp-30h]
const char *v12; // [rsp+28h] [rbp-28h]
long long *i; // [rsp+30h] [rbp-20h]
unsigned long long v14; // [rsp+38h] [rbp-18h]
int v15; // [rsp+44h] [rbp-Ch]
long long v16; // [rsp+48h] [rbp-8h]
v16 = a1;
v15 = a2;
v14 = a3;
while ( 1 )
{
v3 = (const char *)(8
* ((unsigned int)(*(_DWORD *)(v16 + 56) - 1) & ((v15 + v14 / *(unsigned int *)(v16 + 24))
/ *(unsigned int *)(v16 + 356))));
v12 = &v3[*(_QWORD *)(v16 + 128)];
for ( i = *(long long **)v12; ; i = (long long *)*i )
{
v8 = 0;
if ( i )
{
v7 = 1;
if ( i[4] == v14 )
v7 = *((_DWORD *)i + 6) != v15;
v8 = v7;
}
if ( !v8 )
break;
}
if ( i )
break;
if ( *(_QWORD *)(v16 + 144) )
{
i = *(long long **)(v16 + 144);
*(_QWORD *)(v16 + 144) = *i;
LABEL_15:
*((_DWORD *)i + 6) = v15;
i[4] = v14;
link_hash_0(v12, i);
break;
}
if ( *(_DWORD *)(v16 + 68) < *(_DWORD *)(v16 + 64) )
{
v4 = *(_QWORD *)(v16 + 136);
v5 = *(_DWORD *)(v16 + 68);
*(_DWORD *)(v16 + 68) = v5 + 1;
i = (long long *)(48LL * v5 + v4);
goto LABEL_15;
}
v11 = my_thread_var(a1, v3);
v9 = v15;
v10 = v14;
*(_QWORD *)(v11 + 168) = &v9;
link_into_queue(v16 + 280, v11);
a1 = v11 + 8;
inline_mysql_cond_wait_4(
v11 + 8,
v16 + 192,
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",
0x71Eu);
*(_QWORD *)(v11 + 168) = 0LL;
}
++*((_DWORD *)i + 10);
return i;
}
| get_hash_link:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
JMP 0x001e6265
LAB_001e6265:
JMP 0x001e6267
LAB_001e6267:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x80]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RCX + 0x18]
XOR EDX,EDX
DIV RCX
MOVSXD RCX,dword ptr [RBP + -0xc]
ADD RAX,RCX
MOV RCX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RCX + 0x164]
XOR EDX,EDX
DIV RCX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RDX + 0x38]
SUB EDX,0x1
MOV EDX,EDX
AND RCX,RDX
MOV RSI,RCX
SHL RSI,0x3
MOV RDX,RAX
ADD RDX,RSI
MOV qword ptr [RBP + -0x28],RDX
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x20],RAX
LAB_001e62cb:
XOR EAX,EAX
CMP qword ptr [RBP + -0x20],0x0
MOV byte ptr [RBP + -0x49],AL
JZ 0x001e6300
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX + 0x20]
MOV AL,0x1
CMP RCX,qword ptr [RBP + -0x18]
MOV byte ptr [RBP + -0x4a],AL
JNZ 0x001e62fa
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x18]
CMP EAX,dword ptr [RBP + -0xc]
SETNZ AL
MOV byte ptr [RBP + -0x4a],AL
LAB_001e62fa:
MOV AL,byte ptr [RBP + -0x4a]
MOV byte ptr [RBP + -0x49],AL
LAB_001e6300:
MOV AL,byte ptr [RBP + -0x49]
TEST AL,0x1
JNZ 0x001e6309
JMP 0x001e6316
LAB_001e6309:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001e62cb
LAB_001e6316:
CMP qword ptr [RBP + -0x20],0x0
JNZ 0x001e642a
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x90],0x0
JZ 0x001e6355
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x90]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x90],RCX
JMP 0x001e6407
LAB_001e6355:
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x44]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX + 0x40]
JGE 0x001e638f
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x88]
MOV RDX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RDX + 0x44]
MOV ESI,ECX
ADD ESI,0x1
MOV dword ptr [RDX + 0x44],ESI
MOVSXD RCX,ECX
IMUL RCX,RCX,0x30
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001e6405
LAB_001e638f:
CALL 0x001f7440
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001e639a
LAB_001e639a:
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x40],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x30]
LEA RCX,[RBP + -0x40]
MOV qword ptr [RAX + 0xa8],RCX
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x118
MOV RSI,qword ptr [RBP + -0x30]
CALL 0x001e6600
JMP 0x001e63cd
LAB_001e63cd:
MOV RDI,qword ptr [RBP + -0x30]
ADD RDI,0x8
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0xc0
LEA RDX,[0x2554d1]
MOV ECX,0x71e
CALL 0x001e61e0
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0xa8],0x0
JMP 0x001e6267
LAB_001e6405:
JMP 0x001e6407
LAB_001e6407:
MOV ECX,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x18],ECX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x20],RCX
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001e6930
LAB_001e642a:
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0x28]
ADD ECX,0x1
MOV dword ptr [RAX + 0x28],ECX
MOV RAX,qword ptr [RBP + -0x20]
ADD RSP,0x50
POP RBP
RET
|
int8 * get_hash_link(long param_1,int param_2,ulong param_3)
{
int iVar1;
ulong uVar2;
bool bVar3;
int local_48 [2];
ulong local_40;
long local_38;
long local_30;
int8 *local_28;
ulong local_20;
int local_14;
long local_10;
local_20 = param_3;
local_14 = param_2;
local_10 = param_1;
while( true ) {
uVar2 = (local_20 / *(uint *)(local_10 + 0x18) + (long)local_14) /
(ulong)*(uint *)(local_10 + 0x164) & (ulong)(*(int *)(local_10 + 0x38) - 1);
local_30 = *(long *)(local_10 + 0x80) + uVar2 * 8;
local_28 = *(int8 **)(*(long *)(local_10 + 0x80) + uVar2 * 8);
while( true ) {
bVar3 = false;
if ((local_28 != (int8 *)0x0) && (bVar3 = true, local_28[4] == local_20)) {
bVar3 = *(int *)(local_28 + 3) != local_14;
}
if (!bVar3) break;
local_28 = (int8 *)*local_28;
}
if (local_28 != (int8 *)0x0) goto LAB_001e642a;
if (*(long *)(local_10 + 0x90) != 0) break;
if (*(int *)(local_10 + 0x44) < *(int *)(local_10 + 0x40)) {
iVar1 = *(int *)(local_10 + 0x44);
*(int *)(local_10 + 0x44) = iVar1 + 1;
local_28 = (int8 *)(*(long *)(local_10 + 0x88) + (long)iVar1 * 0x30);
LAB_001e6407:
*(int *)(local_28 + 3) = local_14;
local_28[4] = local_20;
link_hash(local_30,local_28);
LAB_001e642a:
*(int *)(local_28 + 5) = *(int *)(local_28 + 5) + 1;
return local_28;
}
local_38 = _my_thread_var();
local_48[0] = local_14;
local_40 = local_20;
*(int **)(local_38 + 0xa8) = local_48;
link_into_queue(local_10 + 0x118,local_38);
inline_mysql_cond_wait
(local_38 + 8,local_10 + 0xc0,
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0x71e);
*(int8 *)(local_38 + 0xa8) = 0;
}
local_28 = *(int8 **)(local_10 + 0x90);
*(int8 *)(local_10 + 0x90) = *local_28;
goto LAB_001e6407;
}
| |
29,830 | POINTonE1_on_curve | corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/e1.c | static bool_t POINTonE1_on_curve(const POINTonE1 *p)
{
vec384 XXX, YY, BZ6;
limb_t inf = vec_is_zero(p->Z, sizeof(p->Z));
sqr_fp(BZ6, p->Z);
mul_fp(BZ6, BZ6, p->Z);
sqr_fp(BZ6, BZ6); /* Z^6 */
mul_by_b_onE1(BZ6, BZ6); /* B*Z^6 */
sqr_fp(XXX, p->X);
mul_fp(XXX, XXX, p->X); /* X^3 */
add_fp(XXX, XXX, BZ6); /* X^3 + B*Z^6 */
sqr_fp(YY, p->Y); /* Y^2 */
return vec_is_equal(XXX, YY, sizeof(XXX)) | inf;
} | O0 | c | POINTonE1_on_curve:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
movl $0x30, %esi
callq 0xa7680
movq %rax, -0xa8(%rbp)
leaq -0xa0(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x60, %rsi
callq 0xb0f10
leaq -0xa0(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
movq -0x8(%rbp), %rdx
addq $0x60, %rdx
callq 0xb4a30
leaq -0xa0(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0xb0f10
leaq -0xa0(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0xb6cf0
leaq -0x40(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0xb0f10
leaq -0x40(%rbp), %rdi
leaq -0x40(%rbp), %rsi
movq -0x8(%rbp), %rdx
callq 0xb4a30
leaq -0x40(%rbp), %rdi
leaq -0x40(%rbp), %rsi
leaq -0xa0(%rbp), %rdx
callq 0xae790
leaq -0x70(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x30, %rsi
callq 0xb0f10
leaq -0x40(%rbp), %rdi
leaq -0x70(%rbp), %rsi
movl $0x30, %edx
callq 0xa9e70
orq -0xa8(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| POINTonE1_on_curve:
push rbp
mov rbp, rsp
sub rsp, 0B0h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
add rdi, 60h ; '`'
mov esi, 30h ; '0'
call vec_is_zero
mov [rbp+var_A8], rax
lea rdi, [rbp+var_A0]
mov rsi, [rbp+var_8]
add rsi, 60h ; '`'
call sqr_fp
lea rdi, [rbp+var_A0]
lea rsi, [rbp+var_A0]
mov rdx, [rbp+var_8]
add rdx, 60h ; '`'
call mul_fp
lea rdi, [rbp+var_A0]
lea rsi, [rbp+var_A0]
call sqr_fp
lea rdi, [rbp+var_A0]
lea rsi, [rbp+var_A0]
call mul_by_b_onE1
lea rdi, [rbp+var_40]
mov rsi, [rbp+var_8]
call sqr_fp
lea rdi, [rbp+var_40]
lea rsi, [rbp+var_40]
mov rdx, [rbp+var_8]
call mul_fp
lea rdi, [rbp+var_40]
lea rsi, [rbp+var_40]
lea rdx, [rbp+var_A0]
call add_fp
lea rdi, [rbp+var_70]
mov rsi, [rbp+var_8]
add rsi, 30h ; '0'
call sqr_fp
lea rdi, [rbp+var_40]
lea rsi, [rbp+var_70]
mov edx, 30h ; '0'
call vec_is_equal
or rax, [rbp+var_A8]
add rsp, 0B0h
pop rbp
retn
| long long POINTonE1_on_curve(long long a1)
{
unsigned long long is_zero; // [rsp+8h] [rbp-A8h]
_BYTE v3[48]; // [rsp+10h] [rbp-A0h] BYREF
_BYTE v4[48]; // [rsp+40h] [rbp-70h] BYREF
_BYTE v5[56]; // [rsp+70h] [rbp-40h] BYREF
long long v6; // [rsp+A8h] [rbp-8h]
v6 = a1;
is_zero = vec_is_zero(a1 + 96, 0x30uLL);
sqr_fp(v3, a1 + 96);
mul_fp(v3, v3, v6 + 96);
sqr_fp(v3, v3);
mul_by_b_onE1(v3, v3);
sqr_fp(v5, v6);
mul_fp(v5, v5, v6);
add_fp(v5, v5, v3);
sqr_fp(v4, v6 + 48);
return is_zero | vec_is_equal(v5, v4, 48LL);
}
| POINTonE1_on_curve:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xb0
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x60
MOV ESI,0x30
CALL 0x001a7680
MOV qword ptr [RBP + -0xa8],RAX
LEA RDI,[RBP + -0xa0]
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x60
CALL 0x001b0f10
LEA RDI,[RBP + -0xa0]
LEA RSI,[RBP + -0xa0]
MOV RDX,qword ptr [RBP + -0x8]
ADD RDX,0x60
CALL 0x001b4a30
LEA RDI,[RBP + -0xa0]
LEA RSI,[RBP + -0xa0]
CALL 0x001b0f10
LEA RDI,[RBP + -0xa0]
LEA RSI,[RBP + -0xa0]
CALL 0x001b6cf0
LEA RDI,[RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x8]
CALL 0x001b0f10
LEA RDI,[RBP + -0x40]
LEA RSI,[RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x8]
CALL 0x001b4a30
LEA RDI,[RBP + -0x40]
LEA RSI,[RBP + -0x40]
LEA RDX,[RBP + -0xa0]
CALL 0x001ae790
LEA RDI,[RBP + -0x70]
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x30
CALL 0x001b0f10
LEA RDI,[RBP + -0x40]
LEA RSI,[RBP + -0x70]
MOV EDX,0x30
CALL 0x001a9e70
OR RAX,qword ptr [RBP + -0xa8]
ADD RSP,0xb0
POP RBP
RET
|
ulong POINTonE1_on_curve(long param_1)
{
ulong uVar1;
ulong uVar2;
int1 local_a8 [48];
int1 local_78 [48];
int1 local_48 [56];
long local_10;
local_10 = param_1;
uVar1 = vec_is_zero(param_1 + 0x60,0x30);
sqr_fp(local_a8,local_10 + 0x60);
mul_fp(local_a8,local_a8,local_10 + 0x60);
sqr_fp(local_a8,local_a8);
mul_by_b_onE1(local_a8,local_a8);
sqr_fp(local_48,local_10);
mul_fp(local_48,local_48,local_10);
add_fp(local_48,local_48,local_a8);
sqr_fp(local_78,local_10 + 0x30);
uVar2 = vec_is_equal(local_48,local_78,0x30);
return uVar2 | uVar1;
}
| |
29,831 | JS_OrdinaryIsInstanceOf | bluesky950520[P]quickjs/quickjs.c | static int JS_OrdinaryIsInstanceOf(JSContext *ctx, JSValue val,
JSValue obj)
{
JSValue obj_proto;
JSObject *proto;
const JSObject *p, *proto1;
BOOL ret;
if (!JS_IsFunction(ctx, obj))
return FALSE;
p = JS_VALUE_GET_OBJ(obj);
if (p->class_id == JS_CLASS_BOUND_FUNCTION) {
JSBoundFunction *s = p->u.bound_function;
return JS_IsInstanceOf(ctx, val, s->func_obj);
}
/* Only explicitly boxed values are instances of constructors */
if (JS_VALUE_GET_TAG(val) != JS_TAG_OBJECT)
return FALSE;
obj_proto = JS_GetProperty(ctx, obj, JS_ATOM_prototype);
if (JS_VALUE_GET_TAG(obj_proto) != JS_TAG_OBJECT) {
if (!JS_IsException(obj_proto))
JS_ThrowTypeError(ctx, "operand 'prototype' property is not an object");
ret = -1;
goto done;
}
proto = JS_VALUE_GET_OBJ(obj_proto);
p = JS_VALUE_GET_OBJ(val);
for(;;) {
proto1 = p->shape->proto;
if (!proto1) {
/* slow case if proxy in the prototype chain */
if (unlikely(p->class_id == JS_CLASS_PROXY)) {
JSValue obj1;
obj1 = js_dup(JS_MKPTR(JS_TAG_OBJECT, (JSObject *)p));
for(;;) {
obj1 = JS_GetPrototypeFree(ctx, obj1);
if (JS_IsException(obj1)) {
ret = -1;
break;
}
if (JS_IsNull(obj1)) {
ret = FALSE;
break;
}
if (proto == JS_VALUE_GET_OBJ(obj1)) {
JS_FreeValue(ctx, obj1);
ret = TRUE;
break;
}
/* must check for timeout to avoid infinite loop */
if (js_poll_interrupts(ctx)) {
JS_FreeValue(ctx, obj1);
ret = -1;
break;
}
}
} else {
ret = FALSE;
}
break;
}
p = proto1;
if (proto == p) {
ret = TRUE;
break;
}
}
done:
JS_FreeValue(ctx, obj_proto);
return ret;
} | O1 | c | JS_OrdinaryIsInstanceOf:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq %rsi, 0x20(%rsp)
movq %rcx, 0x10(%rsp)
movq %rcx, %rsi
movq %r8, %rdx
callq 0x22dbe
xorl %ebp, %ebp
testl %eax, %eax
je 0x22f0d
movq 0x10(%rsp), %rax
cmpw $0xe, 0x6(%rax)
jne 0x22e73
movq 0x30(%rax), %rax
movq (%rax), %rcx
movq 0x8(%rax), %r8
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x22bc0
cmpl $-0x1, %r15d
jne 0x22f0d
movq 0x10(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
movl $0x3c, %ecx
movq %rsi, %r8
movq %r14, %r9
pushq $0x0
pushq $0x0
callq 0x22fa3
addq $0x10, %rsp
movq %rax, %r14
movq %rdx, %r15
movq %rax, 0x18(%rsp)
movl $0xffffffff, %ebp # imm = 0xFFFFFFFF
cmpl $-0x1, %r15d
je 0x22ecf
cmpl $0x6, %r15d
je 0x22efe
leaq 0x7c142(%rip), %rsi # 0x9f005
movq %rbx, %rdi
xorl %eax, %eax
callq 0x22567
jmp 0x22efe
movq 0x18(%rsp), %r13
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rcx
movq 0x38(%rcx), %rcx
testq %rcx, %rcx
je 0x22ef5
movq %rcx, %rax
cmpq %rcx, %r13
jne 0x22ed9
movl $0x1, %ebp
jmp 0x22efe
cmpw $0x30, 0x6(%rax)
je 0x22f1e
xorl %ebp, %ebp
movq 0x18(%rbx), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1d8c6
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
incl (%rax)
movq %rax, 0x8(%rsp)
movq $-0x1, %r12
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
movq %r12, %rdx
callq 0x3d4a6
movq %rdx, %r12
movq %rax, 0x8(%rsp)
cmpl $0x2, %r12d
je 0x22efc
cmpl $0x6, %r12d
je 0x22efe
cmpq 0x8(%rsp), %r13
je 0x22f8d
movl 0x1d8(%rbx), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x1d8(%rbx)
cmpl $0x1, %eax
jg 0x22f2c
movq %rbx, %rdi
callq 0x3d4e2
testl %eax, %eax
je 0x22f2c
movq 0x8(%rsp), %rsi
movq 0x18(%rbx), %rdi
movq %r12, %rdx
callq 0x1d8c6
jmp 0x22efe
movq 0x8(%rsp), %rsi
movq 0x18(%rbx), %rdi
movq %r12, %rdx
callq 0x1d8c6
jmp 0x22eee
| JS_OrdinaryIsInstanceOf:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14, r8
mov r15, rdx
mov r12, rsi
mov rbx, rdi
mov [rsp+58h+var_38], rsi
mov [rsp+58h+var_48], rcx
mov rsi, rcx
mov rdx, r8
call JS_IsFunction
xor ebp, ebp
test eax, eax
jz loc_22F0D
mov rax, [rsp+58h+var_48]
cmp word ptr [rax+6], 0Eh
jnz short loc_22E73
mov rax, [rax+30h]
mov rcx, [rax]
mov r8, [rax+8]
mov rdi, rbx
mov rsi, r12
mov rdx, r15
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp JS_IsInstanceOf
loc_22E73:
cmp r15d, 0FFFFFFFFh
jnz loc_22F0D
mov rsi, [rsp+58h+var_48]
mov rdi, rbx
mov rdx, r14
mov ecx, 3Ch ; '<'
mov r8, rsi
mov r9, r14
push 0
push 0
call JS_GetPropertyInternal2
add rsp, 10h
mov r14, rax
mov r15, rdx
mov [rsp+58h+var_40], rax
mov ebp, 0FFFFFFFFh
cmp r15d, 0FFFFFFFFh
jz short loc_22ECF
cmp r15d, 6
jz short loc_22EFE
lea rsi, aOperandPrototy; "operand 'prototype' property is not an "...
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
jmp short loc_22EFE
loc_22ECF:
mov r13, [rsp+58h+var_40]
mov rax, [rsp+58h+var_38]
loc_22ED9:
mov rcx, [rax+18h]
mov rcx, [rcx+38h]
test rcx, rcx
jz short loc_22EF5
mov rax, rcx
cmp r13, rcx
jnz short loc_22ED9
loc_22EEE:
mov ebp, 1
jmp short loc_22EFE
loc_22EF5:
cmp word ptr [rax+6], 30h ; '0'
jz short loc_22F1E
loc_22EFC:
xor ebp, ebp
loc_22EFE:
mov rdi, [rbx+18h]
mov rsi, r14
mov rdx, r15
call JS_FreeValueRT
loc_22F0D:
mov eax, ebp
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_22F1E:
inc dword ptr [rax]
mov [rsp+58h+var_50], rax
mov r12, 0FFFFFFFFFFFFFFFFh
loc_22F2C:
mov rsi, [rsp+58h+var_50]
mov rdi, rbx
mov rdx, r12
call JS_GetPrototypeFree
mov r12, rdx
mov [rsp+58h+var_50], rax
cmp r12d, 2
jz short loc_22EFC
cmp r12d, 6
jz short loc_22EFE
cmp r13, [rsp+58h+var_50]
jz short loc_22F8D
mov eax, [rbx+1D8h]
lea ecx, [rax-1]
mov [rbx+1D8h], ecx
cmp eax, 1
jg short loc_22F2C
mov rdi, rbx
call __js_poll_interrupts
test eax, eax
jz short loc_22F2C
mov rsi, [rsp+58h+var_50]
mov rdi, [rbx+18h]
mov rdx, r12
call JS_FreeValueRT
jmp loc_22EFE
loc_22F8D:
mov rsi, [rsp+58h+var_50]
mov rdi, [rbx+18h]
mov rdx, r12
call JS_FreeValueRT
jmp loc_22EEE
| long long JS_OrdinaryIsInstanceOf(
long long a1,
long long a2,
long long a3,
long long a4,
int a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
long long v15; // r9
__m128 v16; // xmm4
__m128 v17; // xmm5
unsigned int v18; // ebp
long long v20; // rdx
long long v21; // rcx
long long v22; // r8
long long v23; // r9
_DWORD *PropertyInternal2; // r14
__m128 v25; // xmm4
__m128 v26; // xmm5
long long v27; // r15
long long v28; // rax
_DWORD *v29; // rcx
long long v30; // r12
_DWORD *PrototypeFree; // rax
long long v32; // rdx
int v33; // eax
char v34; // [rsp+0h] [rbp-58h]
_DWORD *v35; // [rsp+8h] [rbp-50h]
v18 = 0;
if ( (unsigned int)JS_IsFunction(a1, a4, a5) )
{
if ( *(_WORD *)(a4 + 6) == 14 )
return JS_IsInstanceOf(
a1,
a2,
a3,
**(_QWORD **)(a4 + 48),
*(_QWORD *)(*(_QWORD *)(a4 + 48) + 8LL),
v15,
a6,
a7,
a8,
a9,
v16,
v17,
a12,
a13);
if ( (_DWORD)a3 == -1 )
{
PropertyInternal2 = (_DWORD *)JS_GetPropertyInternal2(a1, a4, a5, 60, a4, a5, 0LL, 0);
v27 = v20;
v18 = -1;
if ( (_DWORD)v20 == -1 )
{
v28 = a2;
while ( 1 )
{
v29 = *(_DWORD **)(*(_QWORD *)(v28 + 24) + 56LL);
if ( !v29 )
break;
v28 = *(_QWORD *)(*(_QWORD *)(v28 + 24) + 56LL);
if ( PropertyInternal2 == v29 )
{
LABEL_11:
v18 = 1;
goto LABEL_14;
}
}
if ( *(_WORD *)(v28 + 6) == 48 )
{
++*(_DWORD *)v28;
v35 = (_DWORD *)v28;
v30 = -1LL;
while ( 1 )
{
PrototypeFree = (_DWORD *)JS_GetPrototypeFree(a1, v35, v30);
v30 = v32;
v35 = PrototypeFree;
if ( (_DWORD)v32 == 2 )
break;
if ( (_DWORD)v32 == 6 )
goto LABEL_14;
if ( PropertyInternal2 == PrototypeFree )
{
JS_FreeValueRT(*(_QWORD *)(a1 + 24), PrototypeFree, v32);
goto LABEL_11;
}
v33 = *(_DWORD *)(a1 + 472);
*(_DWORD *)(a1 + 472) = v33 - 1;
if ( v33 <= 1 && (unsigned int)_js_poll_interrupts(a1) )
{
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v35, v30);
goto LABEL_14;
}
}
}
v18 = 0;
}
else if ( (_DWORD)v20 != 6 )
{
JS_ThrowTypeError(
a1,
(long long)"operand 'prototype' property is not an object",
v20,
v21,
v22,
v23,
a6,
a7,
a8,
a9,
v25,
v26,
a12,
a13,
v34);
}
LABEL_14:
JS_FreeValueRT(*(_QWORD *)(a1 + 24), PropertyInternal2, v27);
}
}
return v18;
}
| JS_OrdinaryIsInstanceOf:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,R8
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
MOV qword ptr [RSP + 0x20],RSI
MOV qword ptr [RSP + 0x10],RCX
MOV RSI,RCX
MOV RDX,R8
CALL 0x00122dbe
XOR EBP,EBP
TEST EAX,EAX
JZ 0x00122f0d
MOV RAX,qword ptr [RSP + 0x10]
CMP word ptr [RAX + 0x6],0xe
JNZ 0x00122e73
MOV RAX,qword ptr [RAX + 0x30]
MOV RCX,qword ptr [RAX]
MOV R8,qword ptr [RAX + 0x8]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R15
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00122bc0
LAB_00122e73:
CMP R15D,-0x1
JNZ 0x00122f0d
MOV RSI,qword ptr [RSP + 0x10]
MOV RDI,RBX
MOV RDX,R14
MOV ECX,0x3c
MOV R8,RSI
MOV R9,R14
PUSH 0x0
PUSH 0x0
CALL 0x00122fa3
ADD RSP,0x10
MOV R14,RAX
MOV R15,RDX
MOV qword ptr [RSP + 0x18],RAX
MOV EBP,0xffffffff
CMP R15D,-0x1
JZ 0x00122ecf
CMP R15D,0x6
JZ 0x00122efe
LEA RSI,[0x19f005]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x00122567
JMP 0x00122efe
LAB_00122ecf:
MOV R13,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSP + 0x20]
LAB_00122ed9:
MOV RCX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RCX + 0x38]
TEST RCX,RCX
JZ 0x00122ef5
MOV RAX,RCX
CMP R13,RCX
JNZ 0x00122ed9
LAB_00122eee:
MOV EBP,0x1
JMP 0x00122efe
LAB_00122ef5:
CMP word ptr [RAX + 0x6],0x30
JZ 0x00122f1e
LAB_00122efc:
XOR EBP,EBP
LAB_00122efe:
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R14
MOV RDX,R15
CALL 0x0011d8c6
LAB_00122f0d:
MOV EAX,EBP
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00122f1e:
INC dword ptr [RAX]
MOV qword ptr [RSP + 0x8],RAX
MOV R12,-0x1
LAB_00122f2c:
MOV RSI,qword ptr [RSP + 0x8]
MOV RDI,RBX
MOV RDX,R12
CALL 0x0013d4a6
MOV R12,RDX
MOV qword ptr [RSP + 0x8],RAX
CMP R12D,0x2
JZ 0x00122efc
CMP R12D,0x6
JZ 0x00122efe
CMP R13,qword ptr [RSP + 0x8]
JZ 0x00122f8d
MOV EAX,dword ptr [RBX + 0x1d8]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RBX + 0x1d8],ECX
CMP EAX,0x1
JG 0x00122f2c
MOV RDI,RBX
CALL 0x0013d4e2
TEST EAX,EAX
JZ 0x00122f2c
MOV RSI,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RBX + 0x18]
MOV RDX,R12
CALL 0x0011d8c6
JMP 0x00122efe
LAB_00122f8d:
MOV RSI,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RBX + 0x18]
MOV RDX,R12
CALL 0x0011d8c6
JMP 0x00122eee
|
int8
JS_OrdinaryIsInstanceOf
(long param_1,int *param_2,int8 param_3,long param_4,int8 param_5)
{
int iVar1;
int8 uVar2;
int *piVar3;
int1 auVar5 [16];
int1 auVar6 [16];
int8 local_50;
int *piVar4;
iVar1 = JS_IsFunction(param_1,param_4,param_5);
if (iVar1 == 0) {
return 0;
}
if (*(short *)(param_4 + 6) == 0xe) {
uVar2 = JS_IsInstanceOf(param_1,param_2,param_3,**(int8 **)(param_4 + 0x30),
(*(int8 **)(param_4 + 0x30))[1]);
return uVar2;
}
if ((int)param_3 != -1) {
return 0;
}
auVar5 = JS_GetPropertyInternal2(param_1,param_4,param_5,0x3c,param_4,param_5,0,0);
piVar3 = auVar5._0_8_;
uVar2 = 0xffffffff;
if (auVar5._8_4_ == -1) {
do {
piVar4 = *(int **)(*(long *)(param_2 + 6) + 0x38);
if (piVar4 == (int *)0x0) {
if (*(short *)((long)param_2 + 6) != 0x30) goto LAB_00122efc;
*param_2 = *param_2 + 1;
auVar6._8_8_ = 0xffffffffffffffff;
auVar6._0_8_ = param_2;
goto LAB_00122f2c;
}
param_2 = piVar4;
} while (piVar3 != piVar4);
LAB_00122eee:
uVar2 = 1;
}
else if (auVar5._8_4_ != 6) {
JS_ThrowTypeError(param_1,"operand \'prototype\' property is not an object");
}
goto LAB_00122efe;
LAB_00122efc:
uVar2 = 0;
goto LAB_00122efe;
while( true ) {
if (auVar6._8_4_ == 6) goto LAB_00122efe;
if (piVar3 == piVar4) {
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),piVar4,auVar6._8_8_);
goto LAB_00122eee;
}
iVar1 = *(int *)(param_1 + 0x1d8);
*(int *)(param_1 + 0x1d8) = iVar1 + -1;
if ((iVar1 < 2) && (iVar1 = __js_poll_interrupts(param_1), iVar1 != 0)) break;
LAB_00122f2c:
local_50 = auVar6._0_8_;
auVar6 = JS_GetPrototypeFree(param_1,local_50,auVar6._8_8_);
piVar4 = auVar6._0_8_;
if (auVar6._8_4_ == 2) goto LAB_00122efc;
}
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),piVar4,auVar6._8_8_);
LAB_00122efe:
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),piVar3,auVar5._8_8_);
return uVar2;
}
| |
29,832 | JS_OrdinaryIsInstanceOf | bluesky950520[P]quickjs/quickjs.c | static int JS_OrdinaryIsInstanceOf(JSContext *ctx, JSValue val,
JSValue obj)
{
JSValue obj_proto;
JSObject *proto;
const JSObject *p, *proto1;
BOOL ret;
if (!JS_IsFunction(ctx, obj))
return FALSE;
p = JS_VALUE_GET_OBJ(obj);
if (p->class_id == JS_CLASS_BOUND_FUNCTION) {
JSBoundFunction *s = p->u.bound_function;
return JS_IsInstanceOf(ctx, val, s->func_obj);
}
/* Only explicitly boxed values are instances of constructors */
if (JS_VALUE_GET_TAG(val) != JS_TAG_OBJECT)
return FALSE;
obj_proto = JS_GetProperty(ctx, obj, JS_ATOM_prototype);
if (JS_VALUE_GET_TAG(obj_proto) != JS_TAG_OBJECT) {
if (!JS_IsException(obj_proto))
JS_ThrowTypeError(ctx, "operand 'prototype' property is not an object");
ret = -1;
goto done;
}
proto = JS_VALUE_GET_OBJ(obj_proto);
p = JS_VALUE_GET_OBJ(val);
for(;;) {
proto1 = p->shape->proto;
if (!proto1) {
/* slow case if proxy in the prototype chain */
if (unlikely(p->class_id == JS_CLASS_PROXY)) {
JSValue obj1;
obj1 = js_dup(JS_MKPTR(JS_TAG_OBJECT, (JSObject *)p));
for(;;) {
obj1 = JS_GetPrototypeFree(ctx, obj1);
if (JS_IsException(obj1)) {
ret = -1;
break;
}
if (JS_IsNull(obj1)) {
ret = FALSE;
break;
}
if (proto == JS_VALUE_GET_OBJ(obj1)) {
JS_FreeValue(ctx, obj1);
ret = TRUE;
break;
}
/* must check for timeout to avoid infinite loop */
if (js_poll_interrupts(ctx)) {
JS_FreeValue(ctx, obj1);
ret = -1;
break;
}
}
} else {
ret = FALSE;
}
break;
}
p = proto1;
if (proto == p) {
ret = TRUE;
break;
}
}
done:
JS_FreeValue(ctx, obj_proto);
return ret;
} | O2 | c | JS_OrdinaryIsInstanceOf:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %rbx
movq %rcx, %rsi
movq %r8, %rdx
callq 0x1ce7d
xorl %ebp, %ebp
testl %eax, %eax
je 0x1cf8f
cmpw $0xe, 0x6(%r15)
jne 0x1cf18
movq 0x30(%r15), %rax
movq (%rax), %rcx
movq 0x8(%rax), %r8
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1ccbb
cmpl $-0x1, %r13d
jne 0x1cf8f
pushq $0x3c
popq %rcx
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1b043
movq %rax, %r15
movq %rdx, %r14
pushq $-0x1
popq %rbp
cmpl $0x6, %r14d
je 0x1cf81
cmpl $-0x1, %r14d
jne 0x1cf63
pushq $0x1
popq %r13
movq 0x18(%r12), %rax
movq 0x38(%rax), %rax
testq %rax, %rax
je 0x1cf76
movq %rax, %r12
cmpq %r15, %rax
jne 0x1cf48
movl %r13d, %ebp
jmp 0x1cf81
leaq 0x68feb(%rip), %rsi # 0x85f55
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1c64d
jmp 0x1cf81
cmpw $0x30, 0x6(%r12)
je 0x1cfa0
xorl %ebp, %ebp
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1801e
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
incl (%r12)
pushq $-0x1
popq %rax
movq %rax, (%rsp)
movq %rbx, %rdi
movq %r12, %rsi
movq (%rsp), %rdx
callq 0x35dad
cmpl $0x2, %edx
je 0x1cf7f
movq %rdx, (%rsp)
cmpl $0x6, %edx
je 0x1cf81
movq %rax, %r12
movq %rbx, %rdi
cmpq %rax, %r15
je 0x1cfed
callq 0x35de8
testl %eax, %eax
je 0x1cfab
movq %rbx, %rdi
movq %r12, %rsi
movq (%rsp), %rdx
callq 0x1801e
jmp 0x1cf81
movq %r12, %rsi
movq (%rsp), %rdx
callq 0x1801e
jmp 0x1cf5e
| JS_OrdinaryIsInstanceOf:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, r8
mov r15, rcx
mov r13, rdx
mov r12, rsi
mov rbx, rdi
mov rsi, rcx
mov rdx, r8
call JS_IsFunction
xor ebp, ebp
test eax, eax
jz loc_1CF8F
cmp word ptr [r15+6], 0Eh
jnz short loc_1CF18
mov rax, [r15+30h]
mov rcx, [rax]
mov r8, [rax+8]
mov rdi, rbx
mov rsi, r12
mov rdx, r13
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp JS_IsInstanceOf
loc_1CF18:
cmp r13d, 0FFFFFFFFh
jnz short loc_1CF8F
push 3Ch ; '<'
pop rcx
mov rdi, rbx
mov rsi, r15
mov rdx, r14
call JS_GetProperty
mov r15, rax
mov r14, rdx
push 0FFFFFFFFFFFFFFFFh
pop rbp
cmp r14d, 6
jz short loc_1CF81
cmp r14d, 0FFFFFFFFh
jnz short loc_1CF63
push 1
pop r13
loc_1CF48:
mov rax, [r12+18h]
mov rax, [rax+38h]
test rax, rax
jz short loc_1CF76
mov r12, rax
cmp rax, r15
jnz short loc_1CF48
loc_1CF5E:
mov ebp, r13d
jmp short loc_1CF81
loc_1CF63:
lea rsi, aOperandPrototy; "operand 'prototype' property is not an "...
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
jmp short loc_1CF81
loc_1CF76:
cmp word ptr [r12+6], 30h ; '0'
jz short loc_1CFA0
loc_1CF7F:
xor ebp, ebp
loc_1CF81:
mov rdi, rbx
mov rsi, r15
mov rdx, r14
call JS_FreeValue
loc_1CF8F:
mov eax, ebp
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_1CFA0:
inc dword ptr [r12]
push 0FFFFFFFFFFFFFFFFh
pop rax
mov [rsp+38h+var_38], rax
loc_1CFAB:
mov rdi, rbx
mov rsi, r12
mov rdx, [rsp+38h+var_38]
call JS_GetPrototypeFree
cmp edx, 2
jz short loc_1CF7F
mov [rsp+38h+var_38], rdx
cmp edx, 6
jz short loc_1CF81
mov r12, rax
mov rdi, rbx
cmp r15, rax
jz short loc_1CFED
call js_poll_interrupts
test eax, eax
jz short loc_1CFAB
mov rdi, rbx
mov rsi, r12
mov rdx, [rsp+38h+var_38]
call JS_FreeValue
jmp short loc_1CF81
loc_1CFED:
mov rsi, r12
mov rdx, [rsp+38h+var_38]
call JS_FreeValue
jmp loc_1CF5E
| long long JS_OrdinaryIsInstanceOf(
long long a1,
long long a2,
long long a3,
long long a4,
int a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
char v13; // al
long long v17; // r12
long long v18; // r9
__m128 v19; // xmm4
__m128 v20; // xmm5
unsigned int v21; // ebp
long long v23; // rdx
long long v24; // rcx
long long v25; // r8
long long v26; // r9
long long Property; // r15
__m128 v28; // xmm4
__m128 v29; // xmm5
long long v30; // r14
long long v31; // rax
long long PrototypeFree; // rax
long long v33; // rdx
char v34; // [rsp+0h] [rbp-38h]
long long v35; // [rsp+0h] [rbp-38h]
v34 = v13;
v17 = a2;
v21 = 0;
if ( (unsigned int)JS_IsFunction(a1, a4, a5) )
{
if ( *(_WORD *)(a4 + 6) == 14 )
return JS_IsInstanceOf(
a1,
a2,
a3,
**(_QWORD **)(a4 + 48),
*(_QWORD *)(*(_QWORD *)(a4 + 48) + 8LL),
v18,
a6,
a7,
a8,
a9,
v19,
v20,
a12,
a13);
if ( (_DWORD)a3 == -1 )
{
Property = JS_GetProperty(a1, a4, a5, 60);
v30 = v23;
v21 = -1;
if ( (_DWORD)v23 != 6 )
{
if ( (_DWORD)v23 == -1 )
{
while ( 1 )
{
v31 = *(_QWORD *)(*(_QWORD *)(v17 + 24) + 56LL);
if ( !v31 )
break;
v17 = *(_QWORD *)(*(_QWORD *)(v17 + 24) + 56LL);
if ( v31 == Property )
{
LABEL_9:
v21 = 1;
goto LABEL_13;
}
}
if ( *(_WORD *)(v17 + 6) == 48 )
{
++*(_DWORD *)v17;
v35 = -1LL;
while ( 1 )
{
PrototypeFree = JS_GetPrototypeFree(a1, v17, v35);
if ( (_DWORD)v33 == 2 )
break;
v35 = v33;
if ( (_DWORD)v33 == 6 )
goto LABEL_13;
v17 = PrototypeFree;
if ( Property == PrototypeFree )
{
JS_FreeValue(a1, PrototypeFree, v33);
goto LABEL_9;
}
if ( (unsigned int)js_poll_interrupts(a1) )
{
JS_FreeValue(a1, v17, v35);
goto LABEL_13;
}
}
}
v21 = 0;
}
else
{
JS_ThrowTypeError(
a1,
(long long)"operand 'prototype' property is not an object",
v23,
v24,
v25,
v26,
a6,
a7,
a8,
a9,
v28,
v29,
a12,
a13,
v34);
}
}
LABEL_13:
JS_FreeValue(a1, Property, v30);
}
}
return v21;
}
| JS_OrdinaryIsInstanceOf:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,R8
MOV R15,RCX
MOV R13,RDX
MOV R12,RSI
MOV RBX,RDI
MOV RSI,RCX
MOV RDX,R8
CALL 0x0011ce7d
XOR EBP,EBP
TEST EAX,EAX
JZ 0x0011cf8f
CMP word ptr [R15 + 0x6],0xe
JNZ 0x0011cf18
MOV RAX,qword ptr [R15 + 0x30]
MOV RCX,qword ptr [RAX]
MOV R8,qword ptr [RAX + 0x8]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0011ccbb
LAB_0011cf18:
CMP R13D,-0x1
JNZ 0x0011cf8f
PUSH 0x3c
POP RCX
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
CALL 0x0011b043
MOV R15,RAX
MOV R14,RDX
PUSH -0x1
POP RBP
CMP R14D,0x6
JZ 0x0011cf81
CMP R14D,-0x1
JNZ 0x0011cf63
PUSH 0x1
POP R13
LAB_0011cf48:
MOV RAX,qword ptr [R12 + 0x18]
MOV RAX,qword ptr [RAX + 0x38]
TEST RAX,RAX
JZ 0x0011cf76
MOV R12,RAX
CMP RAX,R15
JNZ 0x0011cf48
LAB_0011cf5e:
MOV EBP,R13D
JMP 0x0011cf81
LAB_0011cf63:
LEA RSI,[0x185f55]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x0011c64d
JMP 0x0011cf81
LAB_0011cf76:
CMP word ptr [R12 + 0x6],0x30
JZ 0x0011cfa0
LAB_0011cf7f:
XOR EBP,EBP
LAB_0011cf81:
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
CALL 0x0011801e
LAB_0011cf8f:
MOV EAX,EBP
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0011cfa0:
INC dword ptr [R12]
PUSH -0x1
POP RAX
MOV qword ptr [RSP],RAX
LAB_0011cfab:
MOV RDI,RBX
MOV RSI,R12
MOV RDX,qword ptr [RSP]
CALL 0x00135dad
CMP EDX,0x2
JZ 0x0011cf7f
MOV qword ptr [RSP],RDX
CMP EDX,0x6
JZ 0x0011cf81
MOV R12,RAX
MOV RDI,RBX
CMP R15,RAX
JZ 0x0011cfed
CALL 0x00135de8
TEST EAX,EAX
JZ 0x0011cfab
MOV RDI,RBX
MOV RSI,R12
MOV RDX,qword ptr [RSP]
CALL 0x0011801e
JMP 0x0011cf81
LAB_0011cfed:
MOV RSI,R12
MOV RDX,qword ptr [RSP]
CALL 0x0011801e
JMP 0x0011cf5e
|
ulong JS_OrdinaryIsInstanceOf
(int8 param_1,int *param_2,int8 param_3,long param_4,int8 param_5)
{
int iVar1;
ulong uVar2;
int *piVar3;
int1 auVar5 [16];
int1 auVar6 [16];
int8 local_38;
int *piVar4;
iVar1 = JS_IsFunction(param_1,param_4,param_5);
uVar2 = 0;
if (iVar1 == 0) goto LAB_0011cf8f;
if (*(short *)(param_4 + 6) == 0xe) {
uVar2 = JS_IsInstanceOf(param_1,param_2,param_3,**(int8 **)(param_4 + 0x30),
(*(int8 **)(param_4 + 0x30))[1]);
return uVar2;
}
if ((int)param_3 != -1) goto LAB_0011cf8f;
auVar5 = JS_GetProperty(param_1,param_4,param_5,0x3c);
piVar3 = auVar5._0_8_;
uVar2 = 0xffffffffffffffff;
if (auVar5._8_4_ != 6) {
if (auVar5._8_4_ == -1) {
do {
piVar4 = *(int **)(*(long *)(param_2 + 6) + 0x38);
if (piVar4 == (int *)0x0) {
if (*(short *)((long)param_2 + 6) != 0x30) goto LAB_0011cf7f;
*param_2 = *param_2 + 1;
auVar6._8_8_ = 0xffffffffffffffff;
auVar6._0_8_ = param_2;
goto LAB_0011cfab;
}
param_2 = piVar4;
} while (piVar4 != piVar3);
LAB_0011cf5e:
uVar2 = 1;
}
else {
JS_ThrowTypeError(param_1,"operand \'prototype\' property is not an object");
}
}
goto LAB_0011cf81;
LAB_0011cf7f:
uVar2 = 0;
goto LAB_0011cf81;
while( true ) {
if (auVar6._8_4_ == 6) goto LAB_0011cf81;
if (piVar3 == piVar4) {
JS_FreeValue(param_1,piVar4,auVar6._8_8_);
goto LAB_0011cf5e;
}
iVar1 = js_poll_interrupts();
if (iVar1 != 0) break;
LAB_0011cfab:
local_38 = auVar6._8_8_;
auVar6 = JS_GetPrototypeFree(param_1,auVar6._0_8_,local_38);
piVar4 = auVar6._0_8_;
if (auVar6._8_4_ == 2) goto LAB_0011cf7f;
}
JS_FreeValue(param_1,piVar4,auVar6._8_8_);
LAB_0011cf81:
JS_FreeValue(param_1,piVar3,auVar5._8_8_);
LAB_0011cf8f:
return uVar2 & 0xffffffff;
}
| |
29,833 | inline_mysql_mutex_init | eloqsql/include/mysql/psi/mysql_thread.h | static inline int inline_mysql_mutex_init(
#ifdef HAVE_PSI_MUTEX_INTERFACE
PSI_mutex_key key,
#endif
mysql_mutex_t *that,
const pthread_mutexattr_t *attr
#ifdef SAFE_MUTEX
, const char *src_name, const char *src_file, uint src_line
#endif
)
{
#ifdef HAVE_PSI_MUTEX_INTERFACE
that->m_psi= PSI_MUTEX_CALL(init_mutex)(key, &that->m_mutex);
#else
that->m_psi= NULL;
#endif
#ifdef COROUTINE_ENABLED
that->l.data= that;
that->l.prev= that->l.next= NULL;
#endif
#ifdef SAFE_MUTEX
return safe_mutex_init(&that->m_mutex, attr, src_name, src_file, src_line);
#else
return pthread_mutex_init(&that->m_mutex, attr);
#endif
} | O0 | c | inline_mysql_mutex_init:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq 0x1a9f26(%rip), %rax # 0x1ce830
movq (%rax), %rax
movq 0x40(%rax), %rax
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
callq *%rax
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x24460
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| inline_mysql_mutex_init:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+40h]
mov edi, [rbp+var_4]
mov rsi, [rbp+var_10]
call rax
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+40h], rcx
mov rcx, [rbp+var_10]
mov rax, [rbp+var_10]
mov [rax+38h], rcx
mov rax, [rbp+var_10]
mov qword ptr [rax+30h], 0
mov rax, [rbp+var_10]
mov qword ptr [rax+28h], 0
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call _pthread_mutex_init
add rsp, 20h
pop rbp
retn
| long long inline_mysql_mutex_init(unsigned int a1, _QWORD *a2, long long a3)
{
a2[8] = (*((long long ( **)(_QWORD, _QWORD *))PSI_server[0] + 8))(a1, a2);
a2[7] = a2;
a2[6] = 0LL;
a2[5] = 0LL;
return pthread_mutex_init(a2, a3);
}
| inline_mysql_mutex_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
LEA RAX,[0x2ce830]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x40]
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x10]
CALL RAX
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x40],RCX
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x38],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x30],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x28],0x0
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00124460
ADD RSP,0x20
POP RBP
RET
|
void inline_mysql_mutex_init
(int4 param_1,pthread_mutex_t *param_2,pthread_mutexattr_t *param_3)
{
int8 uVar1;
uVar1 = (**(code **)(PSI_server + 0x40))(param_1,param_2);
*(int8 *)((long)param_2 + 0x40) = uVar1;
*(pthread_mutex_t **)((long)param_2 + 0x38) = param_2;
*(int8 *)((long)param_2 + 0x30) = 0;
param_2[1].__align = 0;
pthread_mutex_init(param_2,param_3);
return;
}
| |
29,834 | OpenSubdiv::v3_6_0::Bfr::PatchTree::buildQuadtree() | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/patchTree.cpp | void
PatchTree::buildQuadtree() {
int numPatches = (int) _patchParams.size();
_treeNodes.reserve(numPatches);
_treeNodes.resize(_numSubFaces ? _numSubFaces : 1);
_treeDepth = 0;
for (int patchIndex = 0; patchIndex < numPatches; ++patchIndex) {
PatchParam const & param = _patchParams[patchIndex];
int depth = param.GetDepth();
int rootDepth = param.NonQuadRoot();
int subFace = param.GetFaceId();
assert((subFace == 0) || (subFace < _numSubFaces));
TreeNode * node = &_treeNodes[subFace];
_treeDepth = std::max(depth, _treeDepth);
if (depth == rootDepth) {
node->patchIndex = patchIndex;
continue;
}
if (!_patchesAreTriangular) {
// Use the UV bits of the PatchParam directly for quad patches:
int u = param.GetU();
int v = param.GetV();
for (int j = rootDepth + 1; j <= depth; ++j) {
int uBit = (u >> (depth - j)) & 1;
int vBit = (v >> (depth - j)) & 1;
int quadrant = (vBit << 1) | uBit;
node = assignLeafOrChildNode(node, (j == depth), quadrant,
patchIndex);
}
} else {
// Use an interior UV point of triangles to identify quadrants:
double u = 0.25f;
double v = 0.25f;
param.UnnormalizeTriangle(u, v);
double median = 0.5f;
bool triRotated = false;
for (int j = rootDepth + 1; j <= depth; ++j, median *= 0.5f) {
int quadrant = transformUVToTriQuadrant(median, u, v,
triRotated);
node = assignLeafOrChildNode(node, (j == depth), quadrant,
patchIndex);
}
}
}
} | O3 | cpp | OpenSubdiv::v3_6_0::Bfr::PatchTree::buildQuadtree():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x50(%rdi), %rax
subq 0x48(%rdi), %rax
shrq $0x3, %rax
leaq 0x60(%rdi), %r14
movq %rax, 0x18(%rsp)
movslq %eax, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x3a760
movl 0x18(%rbx), %eax
cmpl $0x1, %eax
adcl $0x0, %eax
movslq %eax, %rsi
movq %r14, %rdi
callq 0x3ac40
movl $0x0, 0x78(%rbx)
testl %r15d, %r15d
jle 0x8e887
movq 0x18(%rsp), %rax
andl $0x7fffffff, %eax # imm = 0x7FFFFFFF
movq %rax, 0x18(%rsp)
xorl %r14d, %r14d
movq 0x48(%rbx), %rax
movq (%rax,%r14,8), %rcx
movl %ecx, %edx
andl $0xfffffff, %edx # imm = 0xFFFFFFF
je 0x8e69b
cmpl 0x18(%rbx), %edx
jge 0x8e896
movq %rcx, %rbp
shrq $0x20, %rbp
andl $0xf, %ebp
movq %rcx, %r15
movabsq $0x1000000000, %rdx # imm = 0x1000000000
andq %rdx, %r15
movq %r15, %rdx
shrq $0x24, %rdx
andl $0xfffffff, %ecx # imm = 0xFFFFFFF
leaq (%rcx,%rcx,4), %r13
shlq $0x2, %r13
addq 0x60(%rbx), %r13
movl 0x78(%rbx), %ecx
cmpl %ecx, %ebp
cmovgl %ebp, %ecx
movl %ecx, 0x78(%rbx)
cmpl %edx, %ebp
jne 0x8e6f0
movl %r14d, (%r13)
incq %r14
cmpq 0x18(%rsp), %r14
jne 0x8e680
jmp 0x8e887
leaq (%rax,%r14,8), %rdi
testb $0x4, (%rbx)
jne 0x8e754
cmpq $0x1, %r15
movl $0x2, %eax
sbbl $0x0, %eax
subl %eax, %ebp
jb 0x8e6e1
movq (%rdi), %r15
movq %r15, %r12
shrq $0x36, %r12
shrq $0x2c, %r15
andl $0x3ff, %r15d # imm = 0x3FF
xorl %eax, %eax
btl %ebp, %r12d
setb %al
movl %r15d, %edx
movl %ebp, %ecx
shrl %cl, %edx
andl $0x1, %edx
leal (%rax,%rdx,2), %ecx
xorl %edx, %edx
subl $0x1, %ebp
setb %dl
movq %rbx, %rdi
movq %r13, %rsi
movl %r14d, %r8d
callq 0x3ac50
movq %rax, %r13
cmpl $-0x1, %ebp
jne 0x8e71e
jmp 0x8e6e1
movabsq $0x3fd0000000000000, %rax # imm = 0x3FD0000000000000
movq %rax, 0x10(%rsp)
movq %rax, 0x8(%rsp)
leaq 0x10(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x38cf0
cmpq $0x1, %r15
movl $0x2, %r15d
sbbl $0x0, %r15d
subl %ebp, %r15d
ja 0x8e6e1
xorl %ebp, %ebp
movsd 0x28e28(%rip), %xmm2 # 0xb75c0
movsd 0x10(%rsp), %xmm0
testb $0x1, %bpl
movsd %xmm2, 0x20(%rsp)
je 0x8e7cd
ucomisd %xmm0, %xmm2
movsd 0x8(%rsp), %xmm1
jbe 0x8e7f7
subsd %xmm2, %xmm1
movsd %xmm1, 0x8(%rsp)
movl $0x1, %ecx
movb $0x1, %bpl
jmp 0x8e84e
ucomisd %xmm2, %xmm0
jae 0x8e82c
movsd 0x8(%rsp), %xmm1
ucomisd %xmm2, %xmm1
jae 0x8e83d
addsd %xmm1, %xmm0
xorl %ebp, %ebp
ucomisd %xmm2, %xmm0
movl $0x0, %ecx
jb 0x8e84e
movl $0x3, %ecx
jmp 0x8e7c5
ucomisd %xmm1, %xmm2
subsd %xmm2, %xmm0
movsd %xmm0, 0x10(%rsp)
movl $0x2, %ecx
movb $0x1, %bpl
ja 0x8e84e
subsd %xmm2, %xmm1
movsd %xmm1, 0x8(%rsp)
addsd %xmm1, %xmm0
xorl %ecx, %ecx
ucomisd %xmm0, %xmm2
jbe 0x8e84e
movl $0x3, %ecx
jmp 0x8e84e
subsd %xmm2, %xmm0
movsd %xmm0, 0x10(%rsp)
movl $0x1, %ecx
jmp 0x8e84c
subsd %xmm2, %xmm1
movsd %xmm1, 0x8(%rsp)
movl $0x2, %ecx
xorl %ebp, %ebp
xorl %edx, %edx
testl %r15d, %r15d
sete %dl
movq %rbx, %rdi
movq %r13, %rsi
movl %r14d, %r8d
callq 0x3ac50
movq %rax, %r13
movsd 0x20(%rsp), %xmm2
mulsd 0x28d4b(%rip), %xmm2 # 0xb75c0
incl %r15d
cmpl $0x1, %r15d
jne 0x8e798
jmp 0x8e6e1
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x33f86(%rip), %rdi # 0xc2823
leaq 0x33dfd(%rip), %rsi # 0xc26a1
leaq 0x33fa3(%rip), %rcx # 0xc284e
movl $0x17d, %edx # imm = 0x17D
callq 0x39540
nop
| _ZN10OpenSubdiv6v3_6_03Bfr9PatchTree13buildQuadtreeEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rdi
mov rax, [rdi+50h]
sub rax, [rdi+48h]
shr rax, 3
lea r14, [rdi+60h]
mov [rsp+58h+var_40], rax
movsxd r15, eax
mov rdi, r14
mov rsi, r15
call __ZNSt6vectorIN10OpenSubdiv6v3_6_03Bfr9PatchTree8TreeNodeESaIS4_EE7reserveEm; std::vector<OpenSubdiv::v3_6_0::Bfr::PatchTree::TreeNode>::reserve(ulong)
mov eax, [rbx+18h]
cmp eax, 1
adc eax, 0
movsxd rsi, eax
mov rdi, r14
call __ZNSt6vectorIN10OpenSubdiv6v3_6_03Bfr9PatchTree8TreeNodeESaIS4_EE6resizeEm; std::vector<OpenSubdiv::v3_6_0::Bfr::PatchTree::TreeNode>::resize(ulong)
mov dword ptr [rbx+78h], 0
test r15d, r15d
jle loc_8E887
mov rax, [rsp+58h+var_40]
and eax, 7FFFFFFFh
mov [rsp+58h+var_40], rax
xor r14d, r14d
loc_8E680:
mov rax, [rbx+48h]
mov rcx, [rax+r14*8]
mov edx, ecx
and edx, 0FFFFFFFh
jz short loc_8E69B
cmp edx, [rbx+18h]
jge loc_8E896
loc_8E69B:
mov rbp, rcx
shr rbp, 20h
and ebp, 0Fh
mov r15, rcx
mov rdx, 1000000000h
and r15, rdx
mov rdx, r15
shr rdx, 24h
and ecx, 0FFFFFFFh
lea r13, [rcx+rcx*4]
shl r13, 2
add r13, [rbx+60h]
mov ecx, [rbx+78h]
cmp ebp, ecx
cmovg ecx, ebp
mov [rbx+78h], ecx
cmp ebp, edx
jnz short loc_8E6F0
mov [r13+0], r14d
loc_8E6E1:
inc r14
cmp r14, [rsp+58h+var_40]
jnz short loc_8E680
jmp loc_8E887
loc_8E6F0:
lea rdi, [rax+r14*8]
test byte ptr [rbx], 4
jnz short loc_8E754
cmp r15, 1
mov eax, 2
sbb eax, 0
sub ebp, eax
jb short loc_8E6E1
mov r15, [rdi]
mov r12, r15
shr r12, 36h
shr r15, 2Ch
and r15d, 3FFh
loc_8E71E:
xor eax, eax
bt r12d, ebp
setb al
mov edx, r15d
mov ecx, ebp
shr edx, cl
and edx, 1
lea ecx, [rax+rdx*2]
xor edx, edx
sub ebp, 1
setb dl
mov rdi, rbx
mov rsi, r13
mov r8d, r14d
call __ZN10OpenSubdiv6v3_6_03Bfr9PatchTree21assignLeafOrChildNodeEPNS2_8TreeNodeEbii; OpenSubdiv::v3_6_0::Bfr::PatchTree::assignLeafOrChildNode(OpenSubdiv::v3_6_0::Bfr::PatchTree::TreeNode *,bool,int,int)
mov r13, rax
cmp ebp, 0FFFFFFFFh
jnz short loc_8E71E
jmp short loc_8E6E1
loc_8E754:
mov rax, 3FD0000000000000h
mov [rsp+58h+var_48], rax
mov [rsp+58h+var_50], rax
lea rsi, [rsp+58h+var_48]
lea rdx, [rsp+58h+var_50]
call __ZNK10OpenSubdiv6v3_6_03Far10PatchParam19UnnormalizeTriangleIdEEvRT_S5_; OpenSubdiv::v3_6_0::Far::PatchParam::UnnormalizeTriangle<double>(double &,double &)
cmp r15, 1
mov r15d, 2
sbb r15d, 0
sub r15d, ebp
ja loc_8E6E1
xor ebp, ebp
movsd xmm2, cs:qword_B75C0
loc_8E798:
movsd xmm0, [rsp+58h+var_48]
test bpl, 1
movsd [rsp+58h+var_38], xmm2
jz short loc_8E7CD
ucomisd xmm2, xmm0
movsd xmm1, [rsp+58h+var_50]
jbe short loc_8E7F7
subsd xmm1, xmm2
movsd [rsp+58h+var_50], xmm1
mov ecx, 1
loc_8E7C5:
mov bpl, 1
jmp loc_8E84E
loc_8E7CD:
ucomisd xmm0, xmm2
jnb short loc_8E82C
movsd xmm1, [rsp+58h+var_50]
ucomisd xmm1, xmm2
jnb short loc_8E83D
addsd xmm0, xmm1
xor ebp, ebp
ucomisd xmm0, xmm2
mov ecx, 0
jb short loc_8E84E
mov ecx, 3
jmp short loc_8E7C5
loc_8E7F7:
ucomisd xmm2, xmm1
subsd xmm0, xmm2
movsd [rsp+58h+var_48], xmm0
mov ecx, 2
mov bpl, 1
ja short loc_8E84E
subsd xmm1, xmm2
movsd [rsp+58h+var_50], xmm1
addsd xmm0, xmm1
xor ecx, ecx
ucomisd xmm2, xmm0
jbe short loc_8E84E
mov ecx, 3
jmp short loc_8E84E
loc_8E82C:
subsd xmm0, xmm2
movsd [rsp+58h+var_48], xmm0
mov ecx, 1
jmp short loc_8E84C
loc_8E83D:
subsd xmm1, xmm2
movsd [rsp+58h+var_50], xmm1
mov ecx, 2
loc_8E84C:
xor ebp, ebp
loc_8E84E:
xor edx, edx
test r15d, r15d
setz dl
mov rdi, rbx
mov rsi, r13
mov r8d, r14d
call __ZN10OpenSubdiv6v3_6_03Bfr9PatchTree21assignLeafOrChildNodeEPNS2_8TreeNodeEbii; OpenSubdiv::v3_6_0::Bfr::PatchTree::assignLeafOrChildNode(OpenSubdiv::v3_6_0::Bfr::PatchTree::TreeNode *,bool,int,int)
mov r13, rax
movsd xmm2, [rsp+58h+var_38]
mulsd xmm2, cs:qword_B75C0
inc r15d
cmp r15d, 1
jnz loc_8E798
jmp loc_8E6E1
loc_8E887:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_8E896:
lea rdi, aSubface0Subfac; "(subFace == 0) || (subFace < _numSubFac"...
lea rsi, aWorkspaceLlm4b_38; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aVoidOpensubdiv_118; "void OpenSubdiv::v3_6_0::Bfr::PatchTree"...
mov edx, 17Dh
call ___assert_fail
| long long OpenSubdiv::v3_6_0::Bfr::PatchTree::buildQuadtree(
OpenSubdiv::v3_6_0::Bfr::PatchTree *this,
double a2,
double a3,
double a4,
double a5)
{
int v6; // r15d
long long result; // rax
long long v8; // r8
long long v9; // r14
long long v10; // rcx
unsigned int v11; // ebp
long long v12; // r15
unsigned long long v13; // rdx
_DWORD *v14; // r13
long long v15; // rcx
_QWORD *v16; // rdi
bool v17; // cf
unsigned int v18; // ebp
long long v19; // r12
long long v20; // r15
long long v21; // rcx
unsigned int v22; // r15d
bool v23; // cc
unsigned int v24; // r15d
char v25; // bp
long long v26; // rcx
double v27; // [rsp+8h] [rbp-50h] BYREF
double v28; // [rsp+10h] [rbp-48h] BYREF
long long v29; // [rsp+18h] [rbp-40h]
double v30; // [rsp+20h] [rbp-38h]
v29 = (*((_QWORD *)this + 10) - *((_QWORD *)this + 9)) >> 3;
v6 = v29;
std::vector<OpenSubdiv::v3_6_0::Bfr::PatchTree::TreeNode>::reserve((char *)this + 96, (int)v29);
result = std::vector<OpenSubdiv::v3_6_0::Bfr::PatchTree::TreeNode>::resize(
(char *)this + 96,
(*((_DWORD *)this + 6) == 0) + *((_DWORD *)this + 6));
*((_DWORD *)this + 30) = 0;
if ( v6 > 0 )
{
v29 &= 0x7FFFFFFFu;
v9 = 0LL;
while ( 1 )
{
result = *((_QWORD *)this + 9);
v10 = *(_QWORD *)(result + 8 * v9);
if ( (v10 & 0xFFFFFFF) != 0 && (v10 & 0xFFFFFFF) >= *((_DWORD *)this + 6) )
__assert_fail(
"(subFace == 0) || (subFace < _numSubFaces)",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/patchTree.cpp",
381LL,
"void OpenSubdiv::v3_6_0::Bfr::PatchTree::buildQuadtree()");
v11 = BYTE4(v10) & 0xF;
v12 = v10 & 0x1000000000LL;
v13 = (v10 & 0x1000000000uLL) >> 36;
v14 = (_DWORD *)(*((_QWORD *)this + 12) + 20 * (v10 & 0xFFFFFFF));
v15 = *((unsigned int *)this + 30);
if ( (int)v11 > (int)v15 )
v15 = v11;
*((_DWORD *)this + 30) = v15;
if ( v11 == (_DWORD)v13 )
{
*v14 = v9;
goto LABEL_9;
}
v16 = (_QWORD *)(result + 8 * v9);
if ( (*(_BYTE *)this & 4) == 0 )
{
result = 2 - (unsigned int)(v12 == 0);
v17 = v11 < (unsigned int)result;
v18 = v11 - result;
if ( !v17 )
{
v19 = *v16 >> 54;
v20 = (*v16 >> 44) & 0x3FFLL;
do
{
v21 = _bittest((const int *)&v19, v18) + 2 * (((unsigned int)v20 >> v18) & 1);
v17 = v18-- == 0;
result = OpenSubdiv::v3_6_0::Bfr::PatchTree::assignLeafOrChildNode(this, v14, v17, v21, (unsigned int)v9);
v14 = (_DWORD *)result;
}
while ( v18 != -1 );
}
goto LABEL_9;
}
v28 = 0.25;
v27 = 0.25;
result = OpenSubdiv::v3_6_0::Far::PatchParam::UnnormalizeTriangle<double>(
v16,
&v28,
&v27,
v15,
v8,
a2,
a3,
a4,
a5);
v22 = 2 - (v12 == 0);
v23 = v22 <= v11;
v24 = v22 - v11;
if ( v23 )
break;
LABEL_9:
if ( ++v9 == v29 )
return result;
}
v25 = 0;
a4 = 0.5;
while ( 1 )
{
a2 = v28;
v30 = a4;
if ( (v25 & 1) != 0 )
break;
if ( v28 >= a4 )
{
a2 = v28 - a4;
v28 = v28 - a4;
v26 = 1LL;
LABEL_31:
v25 = 0;
goto LABEL_32;
}
a3 = v27;
if ( v27 >= a4 )
{
a3 = v27 - a4;
v27 = v27 - a4;
v26 = 2LL;
goto LABEL_31;
}
a2 = v28 + v27;
v25 = 0;
v26 = 0LL;
if ( v28 + v27 >= a4 )
{
v26 = 3LL;
LABEL_21:
v25 = 1;
}
LABEL_32:
result = OpenSubdiv::v3_6_0::Bfr::PatchTree::assignLeafOrChildNode(this, v14, v24 == 0, v26, (unsigned int)v9);
v14 = (_DWORD *)result;
a4 = v30 * 0.5;
if ( ++v24 == 1 )
goto LABEL_9;
}
a3 = v27;
if ( a4 <= v28 )
{
a2 = v28 - a4;
v28 = v28 - a4;
v26 = 2LL;
v25 = 1;
if ( a4 <= v27 )
{
a3 = v27 - a4;
v27 = a3;
a2 = a2 + a3;
v26 = 0LL;
if ( a4 > a2 )
v26 = 3LL;
}
goto LABEL_32;
}
a3 = v27 - a4;
v27 = v27 - a4;
v26 = 1LL;
goto LABEL_21;
}
return result;
}
| buildQuadtree:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x50]
SUB RAX,qword ptr [RDI + 0x48]
SHR RAX,0x3
LEA R14,[RDI + 0x60]
MOV qword ptr [RSP + 0x18],RAX
MOVSXD R15,EAX
MOV RDI,R14
MOV RSI,R15
CALL 0x0013a760
MOV EAX,dword ptr [RBX + 0x18]
CMP EAX,0x1
ADC EAX,0x0
MOVSXD RSI,EAX
MOV RDI,R14
CALL 0x0013ac40
MOV dword ptr [RBX + 0x78],0x0
TEST R15D,R15D
JLE 0x0018e887
MOV RAX,qword ptr [RSP + 0x18]
AND EAX,0x7fffffff
MOV qword ptr [RSP + 0x18],RAX
XOR R14D,R14D
LAB_0018e680:
MOV RAX,qword ptr [RBX + 0x48]
MOV RCX,qword ptr [RAX + R14*0x8]
MOV EDX,ECX
AND EDX,0xfffffff
JZ 0x0018e69b
CMP EDX,dword ptr [RBX + 0x18]
JGE 0x0018e896
LAB_0018e69b:
MOV RBP,RCX
SHR RBP,0x20
AND EBP,0xf
MOV R15,RCX
MOV RDX,0x1000000000
AND R15,RDX
MOV RDX,R15
SHR RDX,0x24
AND ECX,0xfffffff
LEA R13,[RCX + RCX*0x4]
SHL R13,0x2
ADD R13,qword ptr [RBX + 0x60]
MOV ECX,dword ptr [RBX + 0x78]
CMP EBP,ECX
CMOVG ECX,EBP
MOV dword ptr [RBX + 0x78],ECX
CMP EBP,EDX
JNZ 0x0018e6f0
MOV dword ptr [R13],R14D
LAB_0018e6e1:
INC R14
CMP R14,qword ptr [RSP + 0x18]
JNZ 0x0018e680
JMP 0x0018e887
LAB_0018e6f0:
LEA RDI,[RAX + R14*0x8]
TEST byte ptr [RBX],0x4
JNZ 0x0018e754
CMP R15,0x1
MOV EAX,0x2
SBB EAX,0x0
SUB EBP,EAX
JC 0x0018e6e1
MOV R15,qword ptr [RDI]
MOV R12,R15
SHR R12,0x36
SHR R15,0x2c
AND R15D,0x3ff
LAB_0018e71e:
XOR EAX,EAX
BT R12D,EBP
SETC AL
MOV EDX,R15D
MOV ECX,EBP
SHR EDX,CL
AND EDX,0x1
LEA ECX,[RAX + RDX*0x2]
XOR EDX,EDX
SUB EBP,0x1
SETC DL
MOV RDI,RBX
MOV RSI,R13
MOV R8D,R14D
CALL 0x0013ac50
MOV R13,RAX
CMP EBP,-0x1
JNZ 0x0018e71e
JMP 0x0018e6e1
LAB_0018e754:
MOV RAX,0x3fd0000000000000
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x8],RAX
LEA RSI,[RSP + 0x10]
LEA RDX,[RSP + 0x8]
CALL 0x00138cf0
CMP R15,0x1
MOV R15D,0x2
SBB R15D,0x0
SUB R15D,EBP
JA 0x0018e6e1
XOR EBP,EBP
MOVSD XMM2,qword ptr [0x001b75c0]
LAB_0018e798:
MOVSD XMM0,qword ptr [RSP + 0x10]
TEST BPL,0x1
MOVSD qword ptr [RSP + 0x20],XMM2
JZ 0x0018e7cd
UCOMISD XMM2,XMM0
MOVSD XMM1,qword ptr [RSP + 0x8]
JBE 0x0018e7f7
SUBSD XMM1,XMM2
MOVSD qword ptr [RSP + 0x8],XMM1
MOV ECX,0x1
LAB_0018e7c5:
MOV BPL,0x1
JMP 0x0018e84e
LAB_0018e7cd:
UCOMISD XMM0,XMM2
JNC 0x0018e82c
MOVSD XMM1,qword ptr [RSP + 0x8]
UCOMISD XMM1,XMM2
JNC 0x0018e83d
ADDSD XMM0,XMM1
XOR EBP,EBP
UCOMISD XMM0,XMM2
MOV ECX,0x0
JC 0x0018e84e
MOV ECX,0x3
JMP 0x0018e7c5
LAB_0018e7f7:
UCOMISD XMM2,XMM1
SUBSD XMM0,XMM2
MOVSD qword ptr [RSP + 0x10],XMM0
MOV ECX,0x2
MOV BPL,0x1
JA 0x0018e84e
SUBSD XMM1,XMM2
MOVSD qword ptr [RSP + 0x8],XMM1
ADDSD XMM0,XMM1
XOR ECX,ECX
UCOMISD XMM2,XMM0
JBE 0x0018e84e
MOV ECX,0x3
JMP 0x0018e84e
LAB_0018e82c:
SUBSD XMM0,XMM2
MOVSD qword ptr [RSP + 0x10],XMM0
MOV ECX,0x1
JMP 0x0018e84c
LAB_0018e83d:
SUBSD XMM1,XMM2
MOVSD qword ptr [RSP + 0x8],XMM1
MOV ECX,0x2
LAB_0018e84c:
XOR EBP,EBP
LAB_0018e84e:
XOR EDX,EDX
TEST R15D,R15D
SETZ DL
MOV RDI,RBX
MOV RSI,R13
MOV R8D,R14D
CALL 0x0013ac50
MOV R13,RAX
MOVSD XMM2,qword ptr [RSP + 0x20]
MULSD XMM2,qword ptr [0x001b75c0]
INC R15D
CMP R15D,0x1
JNZ 0x0018e798
JMP 0x0018e6e1
LAB_0018e887:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0018e896:
LEA RDI,[0x1c2823]
LEA RSI,[0x1c26a1]
LEA RCX,[0x1c284e]
MOV EDX,0x17d
CALL 0x00139540
|
/* OpenSubdiv::v3_6_0::Bfr::PatchTree::buildQuadtree() */
void __thiscall OpenSubdiv::v3_6_0::Bfr::PatchTree::buildQuadtree(PatchTree *this)
{
PatchParam *this_00;
ulong uVar1;
int iVar2;
uint uVar3;
byte bVar4;
int iVar5;
uint uVar6;
uint uVar7;
TreeNode *pTVar8;
ulong uVar9;
int iVar10;
ulong uVar11;
bool bVar12;
double dVar13;
double local_50;
double local_48;
ulong local_40;
double local_38;
local_40 = (ulong)(*(long *)(this + 0x50) - *(long *)(this + 0x48)) >> 3;
iVar2 = (int)local_40;
std::
vector<OpenSubdiv::v3_6_0::Bfr::PatchTree::TreeNode,std::allocator<OpenSubdiv::v3_6_0::Bfr::PatchTree::TreeNode>>
::reserve((vector<OpenSubdiv::v3_6_0::Bfr::PatchTree::TreeNode,std::allocator<OpenSubdiv::v3_6_0::Bfr::PatchTree::TreeNode>>
*)(this + 0x60),(long)iVar2);
std::
vector<OpenSubdiv::v3_6_0::Bfr::PatchTree::TreeNode,std::allocator<OpenSubdiv::v3_6_0::Bfr::PatchTree::TreeNode>>
::resize((vector<OpenSubdiv::v3_6_0::Bfr::PatchTree::TreeNode,std::allocator<OpenSubdiv::v3_6_0::Bfr::PatchTree::TreeNode>>
*)(this + 0x60),(long)(int)(*(int *)(this + 0x18) + (uint)(*(int *)(this + 0x18) == 0)))
;
*(int4 *)(this + 0x78) = 0;
if (0 < iVar2) {
local_40 = (ulong)((uint)local_40 & 0x7fffffff);
uVar9 = 0;
do {
uVar1 = *(ulong *)(*(long *)(this + 0x48) + uVar9 * 8);
if (((uVar1 & 0xfffffff) != 0) && (*(int *)(this + 0x18) <= (int)((uint)uVar1 & 0xfffffff))) {
/* WARNING: Subroutine does not return */
__assert_fail("(subFace == 0) || (subFace < _numSubFaces)",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/patchTree.cpp"
,0x17d,"void OpenSubdiv::v3_6_0::Bfr::PatchTree::buildQuadtree()");
}
uVar6 = (uint)(uVar1 >> 0x20) & 0xf;
uVar11 = uVar1 & 0x1000000000;
pTVar8 = (TreeNode *)((ulong)((uint)uVar1 & 0xfffffff) * 0x14 + *(long *)(this + 0x60));
uVar3 = *(uint *)(this + 0x78);
if ((int)*(uint *)(this + 0x78) < (int)uVar6) {
uVar3 = uVar6;
}
*(uint *)(this + 0x78) = uVar3;
iVar2 = (int)uVar9;
if (uVar6 == (uint)(uVar11 >> 0x24)) {
*(int *)pTVar8 = iVar2;
}
else {
this_00 = (PatchParam *)(*(long *)(this + 0x48) + uVar9 * 8);
if (((byte)*this & 4) == 0) {
uVar3 = 2 - (uVar11 == 0);
uVar7 = uVar6 - uVar3;
if (uVar3 <= uVar6) {
uVar3 = (uint)((ulong)*(int8 *)this_00 >> 0x20);
do {
uVar6 = uVar7 & 0x1f;
bVar4 = (byte)uVar7;
bVar12 = uVar7 == 0;
uVar7 = uVar7 - 1;
pTVar8 = (TreeNode *)
assignLeafOrChildNode
(this,pTVar8,bVar12,
(uint)(((uVar3 >> 0x16) >> uVar6 & 1) != 0) +
((uVar3 >> 0xc & 0x3ff) >> (bVar4 & 0x1f) & 1) * 2,iVar2);
} while (uVar7 != 0xffffffff);
}
}
else {
local_48 = 0.25;
local_50 = 0.25;
Far::PatchParam::UnnormalizeTriangle<double>(this_00,&local_48,&local_50);
uVar3 = 2 - (uVar11 == 0);
iVar10 = uVar3 - uVar6;
if (uVar3 < uVar6 || iVar10 == 0) {
bVar12 = false;
dVar13 = DAT_001b75c0;
do {
if (bVar12) {
if (dVar13 <= local_48) {
local_48 = local_48 - dVar13;
iVar5 = 2;
bVar12 = true;
if (dVar13 <= local_50) {
local_50 = local_50 - dVar13;
iVar5 = 0;
if (local_48 + local_50 < dVar13) {
iVar5 = 3;
}
}
}
else {
local_50 = local_50 - dVar13;
iVar5 = 1;
LAB_0018e7c5:
bVar12 = true;
}
}
else {
if (dVar13 <= local_48) {
local_48 = local_48 - dVar13;
iVar5 = 1;
}
else {
if (local_50 < dVar13) {
bVar12 = false;
iVar5 = 0;
if (dVar13 <= local_48 + local_50) {
iVar5 = 3;
goto LAB_0018e7c5;
}
goto LAB_0018e84e;
}
local_50 = local_50 - dVar13;
iVar5 = 2;
}
bVar12 = false;
}
LAB_0018e84e:
local_38 = dVar13;
pTVar8 = (TreeNode *)assignLeafOrChildNode(this,pTVar8,iVar10 == 0,iVar5,iVar2);
dVar13 = local_38 * DAT_001b75c0;
iVar10 = iVar10 + 1;
} while (iVar10 != 1);
}
}
}
uVar9 = uVar9 + 1;
} while (uVar9 != local_40);
}
return;
}
| |
29,835 | do_state_timer2 | qoraal-tictactoe/build_O0/_deps/qoraal_engine-src/src/parts/engine.c | int32_t
do_state_timer2 (PENGINE_T instance, uint32_t parm, uint32_t flags, uint32_t mult)
{
int32_t value ;
int32_t ret ;
if (flags & (PART_ACTION_FLAG_VALIDATE)) {
return parts_valadate_int (instance, parm, flags, 0, INT_MAX) ;
}
value = parts_get_int (instance, parm, flags, 0, INT_MAX) ;
ret = inst_set_task (instance, STATE_TASK_TIMER2, 0) ;
if (value) {
value *= mult ;
PENGINE_EVENT_T task = engine_port_event_create (action_state_task_cb) ;
if (!task ||
(engine_port_event_queue (task, ENGINE_EVENT_ID_GET(_state_timer2),
STATE_TASK_TIMER2, (uintptr_t) instance, value) != ENGINE_OK)) {
return ENGINE_FAIL ;
}
inst_set_task (instance, STATE_TASK_TIMER2, task) ;
}
return ret / mult ;
} | O0 | c | do_state_timer2:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl -0x18(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x85df
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
xorl %ecx, %ecx
movl $0x7fffffff, %r8d # imm = 0x7FFFFFFF
callq 0x91b0
movl %eax, -0x4(%rbp)
jmp 0x868e
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
xorl %ecx, %ecx
movl $0x7fffffff, %r8d # imm = 0x7FFFFFFF
callq 0x92f0
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x8450
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x20(%rbp)
je 0x8683
movl -0x1c(%rbp), %eax
imull -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
leaq 0x7b(%rip), %rdi # 0x86a0
callq 0x12200
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x8668
movq -0x30(%rbp), %rdi
leaq 0x280b8(%rip), %rax # 0x306f8
leaq 0x28031(%rip), %rcx # 0x30678
subq %rcx, %rax
shrq $0x4, %rax
movq -0x10(%rbp), %rcx
movl -0x20(%rbp), %r8d
movl $0x2, %edx
movzwl %ax, %esi
callq 0x12340
cmpl $0x0, %eax
je 0x8671
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x868e
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rdx
movl $0x2, %esi
callq 0x8450
movl -0x24(%rbp), %eax
xorl %edx, %edx
divl -0x1c(%rbp)
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| do_state_timer2:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov [rbp+var_1C], ecx
mov eax, [rbp+var_18]
and eax, 1
cmp eax, 0
jz short loc_85DF
mov rdi, [rbp+var_10]
mov esi, [rbp+var_14]
mov edx, [rbp+var_18]
xor ecx, ecx
mov r8d, 7FFFFFFFh
call parts_valadate_int
mov [rbp+var_4], eax
jmp loc_868E
loc_85DF:
mov rdi, [rbp+var_10]
mov esi, [rbp+var_14]
mov edx, [rbp+var_18]
xor ecx, ecx
mov r8d, 7FFFFFFFh
call parts_get_int
mov [rbp+var_20], eax
mov rdi, [rbp+var_10]
mov esi, 2
xor eax, eax
mov edx, eax
call inst_set_task
mov [rbp+var_24], eax
cmp [rbp+var_20], 0
jz short loc_8683
mov eax, [rbp+var_1C]
imul eax, [rbp+var_20]
mov [rbp+var_20], eax
lea rdi, action_state_task_cb
call engine_port_event_create
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
jz short loc_8668
mov rdi, [rbp+var_30]
lea rax, __engine_event__state_timer2
lea rcx, __engine_event_base__
sub rax, rcx
shr rax, 4
mov rcx, [rbp+var_10]
mov r8d, [rbp+var_20]
mov edx, 2
movzx esi, ax
call engine_port_event_queue
cmp eax, 0
jz short loc_8671
loc_8668:
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_868E
loc_8671:
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_30]
mov esi, 2
call inst_set_task
loc_8683:
mov eax, [rbp+var_24]
xor edx, edx
div [rbp+var_1C]
mov [rbp+var_4], eax
loc_868E:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long do_state_timer2(long long a1, unsigned int a2, unsigned int a3, unsigned int a4)
{
long long v5; // [rsp+0h] [rbp-30h]
unsigned int v6; // [rsp+Ch] [rbp-24h]
int v7; // [rsp+10h] [rbp-20h]
unsigned int v8; // [rsp+10h] [rbp-20h]
if ( (a3 & 1) == 0 )
{
v7 = parts_get_int(a1, a2, a3, 0LL, 0x7FFFFFFFLL);
v6 = inst_set_task(a1, 2, 0LL);
if ( v7 )
{
v8 = v7 * a4;
v5 = engine_port_event_create(action_state_task_cb);
if ( !v5
|| (unsigned int)engine_port_event_queue(
v5,
(unsigned __int16)((unsigned long long)((char *)_engine_event__state_timer2
- (char *)_engine_event_base__) >> 4),
2LL,
a1,
v8) )
{
return (unsigned int)-1;
}
inst_set_task(a1, 2, v5);
}
return v6 / a4;
}
return (unsigned int)parts_valadate_int(a1, a2, a3, 0LL, 0x7FFFFFFFLL);
}
| do_state_timer2:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV dword ptr [RBP + -0x1c],ECX
MOV EAX,dword ptr [RBP + -0x18]
AND EAX,0x1
CMP EAX,0x0
JZ 0x001085df
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
MOV EDX,dword ptr [RBP + -0x18]
XOR ECX,ECX
MOV R8D,0x7fffffff
CALL 0x001091b0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0010868e
LAB_001085df:
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
MOV EDX,dword ptr [RBP + -0x18]
XOR ECX,ECX
MOV R8D,0x7fffffff
CALL 0x001092f0
MOV dword ptr [RBP + -0x20],EAX
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x2
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00108450
MOV dword ptr [RBP + -0x24],EAX
CMP dword ptr [RBP + -0x20],0x0
JZ 0x00108683
MOV EAX,dword ptr [RBP + -0x1c]
IMUL EAX,dword ptr [RBP + -0x20]
MOV dword ptr [RBP + -0x20],EAX
LEA RDI,[0x1086a0]
CALL 0x00112200
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x30],0x0
JZ 0x00108668
MOV RDI,qword ptr [RBP + -0x30]
LEA RAX,[0x1306f8]
LEA RCX,[0x130678]
SUB RAX,RCX
SHR RAX,0x4
MOV RCX,qword ptr [RBP + -0x10]
MOV R8D,dword ptr [RBP + -0x20]
MOV EDX,0x2
MOVZX ESI,AX
CALL 0x00112340
CMP EAX,0x0
JZ 0x00108671
LAB_00108668:
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0010868e
LAB_00108671:
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x30]
MOV ESI,0x2
CALL 0x00108450
LAB_00108683:
MOV EAX,dword ptr [RBP + -0x24]
XOR EDX,EDX
DIV dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x4],EAX
LAB_0010868e:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
uint do_state_timer2(int8 param_1,int4 param_2,uint param_3,uint param_4)
{
uint uVar1;
int iVar2;
long lVar3;
if ((param_3 & 1) != 0) {
uVar1 = parts_valadate_int(param_1,param_2,param_3,0,0x7fffffff);
return uVar1;
}
iVar2 = parts_get_int(param_1,param_2,param_3,0,0x7fffffff);
uVar1 = inst_set_task(param_1,2,0);
if (iVar2 != 0) {
lVar3 = engine_port_event_create(action_state_task_cb);
if ((lVar3 == 0) ||
(iVar2 = engine_port_event_queue(lVar3,8,2,param_1,param_4 * iVar2), iVar2 != 0)) {
return 0xffffffff;
}
inst_set_task(param_1,2,lVar3);
}
return uVar1 / param_4;
}
| |
29,836 | my_charlen_utf8mb3 | eloqsql/strings/ctype-utf8.c | static
int my_charlen_utf8mb3(CHARSET_INFO *cs __attribute__((unused)),
const uchar *s, const uchar *e)
{
uchar c;
if (s >= e)
return MY_CS_TOOSMALL;
c= s[0];
if (c < 0xf0)
return my_valid_mbcharlen_utf8mb3(s, e);
return MY_CS_ILSEQ;
} | O3 | c | my_charlen_utf8mb3:
pushq %rbp
movq %rsp, %rbp
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rdx, %rsi
jae 0x6ec57
movb (%rsi), %cl
cmpb $-0x11, %cl
ja 0x6ec55
movl $0x1, %eax
testb %cl, %cl
jns 0x6ec57
cmpb $-0x3e, %cl
jae 0x6ec59
xorl %eax, %eax
popq %rbp
retq
cmpb $-0x21, %cl
ja 0x6ec79
leaq 0x2(%rsi), %rcx
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rdx, %rcx
ja 0x6ec57
xorl %eax, %eax
cmpb $-0x40, 0x1(%rsi)
setl %al
addl %eax, %eax
jmp 0x6ec57
leaq 0x3(%rsi), %rdi
movl $0xffffff99, %eax # imm = 0xFFFFFF99
cmpq %rdx, %rdi
ja 0x6ec57
movb 0x1(%rsi), %dl
cmpb $-0x41, %dl
jg 0x6ec55
cmpb $-0x41, 0x2(%rsi)
movl $0x0, %eax
jg 0x6ec57
xorl %eax, %eax
cmpb $-0x60, %dl
setae %al
cmpb $-0x20, %cl
leal (%rax,%rax,2), %ecx
movl $0x3, %eax
cmovel %ecx, %eax
jmp 0x6ec57
| my_charlen_utf8mb3:
push rbp
mov rbp, rsp
mov eax, 0FFFFFF9Bh
cmp rsi, rdx
jnb short loc_6EC57
mov cl, [rsi]
cmp cl, 0EFh
ja short loc_6EC55
mov eax, 1
test cl, cl
jns short loc_6EC57
cmp cl, 0C2h
jnb short loc_6EC59
loc_6EC55:
xor eax, eax
loc_6EC57:
pop rbp
retn
loc_6EC59:
cmp cl, 0DFh
ja short loc_6EC79
lea rcx, [rsi+2]
mov eax, 0FFFFFF9Ah
cmp rcx, rdx
ja short loc_6EC57
xor eax, eax
cmp byte ptr [rsi+1], 0C0h
setl al
add eax, eax
jmp short loc_6EC57
loc_6EC79:
lea rdi, [rsi+3]
mov eax, 0FFFFFF99h
cmp rdi, rdx
ja short loc_6EC57
mov dl, [rsi+1]
cmp dl, 0BFh
jg short loc_6EC55
cmp byte ptr [rsi+2], 0BFh
mov eax, 0
jg short loc_6EC57
xor eax, eax
cmp dl, 0A0h
setnb al
cmp cl, 0E0h
lea ecx, [rax+rax*2]
mov eax, 3
cmovz eax, ecx
jmp short loc_6EC57
| long long my_charlen_utf8mb3(long long a1, char *a2, unsigned long long a3)
{
long long result; // rax
char v4; // cl
char v5; // dl
result = 4294967195LL;
if ( (unsigned long long)a2 < a3 )
{
v4 = *a2;
if ( (unsigned __int8)*a2 > 0xEFu )
return 0LL;
result = 1LL;
if ( v4 >= 0 )
return result;
if ( (unsigned __int8)v4 < 0xC2u )
return 0LL;
if ( (unsigned __int8)v4 > 0xDFu )
{
result = 4294967193LL;
if ( (unsigned long long)(a2 + 3) <= a3 )
{
v5 = a2[1];
if ( v5 > -65 )
return 0LL;
result = 0LL;
if ( a2[2] <= -65 )
{
result = 3LL;
if ( v4 == -32 )
return 3 * (unsigned int)((unsigned __int8)v5 >= 0xA0u);
}
}
}
else
{
result = 4294967194LL;
if ( (unsigned long long)(a2 + 2) <= a3 )
return 2 * (unsigned int)(a2[1] < -64);
}
}
return result;
}
| my_charlen_utf8mb3:
PUSH RBP
MOV RBP,RSP
MOV EAX,0xffffff9b
CMP RSI,RDX
JNC 0x0016ec57
MOV CL,byte ptr [RSI]
CMP CL,0xef
JA 0x0016ec55
MOV EAX,0x1
TEST CL,CL
JNS 0x0016ec57
CMP CL,0xc2
JNC 0x0016ec59
LAB_0016ec55:
XOR EAX,EAX
LAB_0016ec57:
POP RBP
RET
LAB_0016ec59:
CMP CL,0xdf
JA 0x0016ec79
LEA RCX,[RSI + 0x2]
MOV EAX,0xffffff9a
CMP RCX,RDX
JA 0x0016ec57
XOR EAX,EAX
CMP byte ptr [RSI + 0x1],0xc0
SETL AL
ADD EAX,EAX
JMP 0x0016ec57
LAB_0016ec79:
LEA RDI,[RSI + 0x3]
MOV EAX,0xffffff99
CMP RDI,RDX
JA 0x0016ec57
MOV DL,byte ptr [RSI + 0x1]
CMP DL,0xbf
JG 0x0016ec55
CMP byte ptr [RSI + 0x2],0xbf
MOV EAX,0x0
JG 0x0016ec57
XOR EAX,EAX
CMP DL,0xa0
SETNC AL
CMP CL,0xe0
LEA ECX,[RAX + RAX*0x2]
MOV EAX,0x3
CMOVZ EAX,ECX
JMP 0x0016ec57
|
int my_charlen_utf8mb3(int8 param_1,byte *param_2,byte *param_3)
{
byte bVar1;
if (param_3 <= param_2) {
return -0x65;
}
bVar1 = *param_2;
if (bVar1 < 0xf0) {
if (-1 < (char)bVar1) {
return 1;
}
if (0xc1 < bVar1) {
if (bVar1 < 0xe0) {
if (param_3 < param_2 + 2) {
return -0x66;
}
return (uint)((char)param_2[1] < -0x40) * 2;
}
if (param_3 < param_2 + 3) {
return -0x67;
}
if ((char)param_2[1] < -0x40) {
if (-0x41 < (char)param_2[2]) {
return 0;
}
if (bVar1 != 0xe0) {
return 3;
}
return (uint)(0x9f < param_2[1]) * 3;
}
}
}
return 0;
}
| |
29,837 | testing::internal::FlagToEnvVar[abi:cxx11](char const*) | seiftnesse[P]memoryallocator/build_O0/_deps/googletest-src/googletest/src/gtest-port.cc | static std::string FlagToEnvVar(const char* flag) {
const std::string full_flag =
(Message() << GTEST_FLAG_PREFIX_ << flag).GetString();
Message env_var;
for (size_t i = 0; i != full_flag.length(); i++) {
env_var << ToUpper(full_flag.c_str()[i]);
}
return env_var.GetString();
} | O0 | cpp | testing::internal::FlagToEnvVar[abi:cxx11](char const*):
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x80(%rbp)
movq %rdi, %rax
movq %rax, -0x78(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x38(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x2daf0
movq -0x70(%rbp), %rdi
leaq 0x4c032(%rip), %rsi # 0x73bb8
callq 0x4c010
movq %rax, -0x68(%rbp)
jmp 0x27b91
movq -0x68(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x18fc0
movq %rax, -0x88(%rbp)
jmp 0x27ba7
movq -0x88(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x20c50
jmp 0x27bb9
leaq -0x38(%rbp), %rdi
callq 0x13ed0
leaq -0x50(%rbp), %rdi
callq 0x2daf0
jmp 0x27bcd
movq $0x0, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq -0x30(%rbp), %rdi
callq 0xbb50
movq %rax, %rcx
movq -0x90(%rbp), %rax
cmpq %rcx, %rax
je 0x27c7e
leaq -0x30(%rbp), %rdi
callq 0xb280
movq -0x58(%rbp), %rcx
movsbl (%rax,%rcx), %edi
callq 0x56c20
movb %al, -0x91(%rbp)
jmp 0x27c1a
movb -0x91(%rbp), %al
movb %al, -0x59(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x59(%rbp), %rsi
callq 0x51510
jmp 0x27c32
jmp 0x27c34
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x27bd5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x13ed0
jmp 0x27cb5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x27cac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x13ed0
jmp 0x27cac
movq -0x80(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x20c50
jmp 0x27c8d
leaq -0x50(%rbp), %rdi
callq 0x13ed0
leaq -0x30(%rbp), %rdi
callq 0xbe58
movq -0x78(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
leaq -0x30(%rbp), %rdi
callq 0xbe58
movq -0x40(%rbp), %rdi
callq 0xbcd0
nop
| _ZN7testing8internalL12FlagToEnvVarB5cxx11EPKc:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov [rbp+var_80], rdi
mov rax, rdi
mov [rbp+var_78], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
lea rdi, [rbp+var_38]; this
mov [rbp+var_70], rdi
call _ZN7testing7MessageC2Ev; testing::Message::Message(void)
mov rdi, [rbp+var_70]
lea rsi, aGtest; "gtest_"
call _ZN7testing7MessagelsIA7_cEERS0_RKT_; testing::Message::operator<<<char [7]>(char [7] const&)
mov [rbp+var_68], rax
jmp short $+2
loc_27B91:
mov rdi, [rbp+var_68]
lea rsi, [rbp+var_10]
call _ZN7testing7MessagelsIKcEERS0_RKPT_; testing::Message::operator<<<char const>(char const * const&)
mov qword ptr [rbp+var_88], rax
jmp short $+2
loc_27BA7:
mov rsi, qword ptr [rbp+var_88]; char
lea rdi, [rbp+var_30]
call _ZNK7testing7Message9GetStringB5cxx11Ev; testing::Message::GetString(void)
jmp short $+2
loc_27BB9:
lea rdi, [rbp+var_38]; this
call _ZN7testing7MessageD2Ev; testing::Message::~Message()
lea rdi, [rbp+var_50]; this
call _ZN7testing7MessageC2Ev; testing::Message::Message(void)
jmp short $+2
loc_27BCD:
mov [rbp+var_58], 0
loc_27BD5:
mov rax, [rbp+var_58]
mov [rbp+var_90], rax
lea rdi, [rbp+var_30]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void)
mov rcx, rax
mov rax, [rbp+var_90]
cmp rax, rcx
jz loc_27C7E
lea rdi, [rbp+var_30]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rcx, [rbp+var_58]
movsx edi, byte ptr [rax+rcx]; this
call _ZN7testing8internal7ToUpperEc; testing::internal::ToUpper(char)
mov [rbp+var_91], al
jmp short $+2
loc_27C1A:
mov al, [rbp+var_91]
mov [rbp+var_59], al
lea rdi, [rbp+var_50]
lea rsi, [rbp+var_59]
call _ZN7testing7MessagelsIcEERS0_RKT_; testing::Message::operator<<<char>(char const&)
jmp short $+2
loc_27C32:
jmp short $+2
loc_27C34:
mov rax, [rbp+var_58]
add rax, 1
mov [rbp+var_58], rax
jmp short loc_27BD5
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
lea rdi, [rbp+var_38]; this
call _ZN7testing7MessageD2Ev; testing::Message::~Message()
jmp short loc_27CB5
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
jmp short loc_27CAC
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
lea rdi, [rbp+var_50]; this
call _ZN7testing7MessageD2Ev; testing::Message::~Message()
jmp short loc_27CAC
loc_27C7E:
mov rdi, [rbp+var_80]
lea rsi, [rbp+var_50]
call _ZNK7testing7Message9GetStringB5cxx11Ev; testing::Message::GetString(void)
jmp short $+2
loc_27C8D:
lea rdi, [rbp+var_50]; this
call _ZN7testing7MessageD2Ev; testing::Message::~Message()
lea rdi, [rbp+var_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rax, [rbp+var_78]
add rsp, 0A0h
pop rbp
retn
loc_27CAC:
lea rdi, [rbp+var_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_27CB5:
mov rdi, [rbp+var_40]
call __Unwind_Resume
| long long testing::internal::FlagToEnvVar[abi:cxx11](long long a1, char *a2)
{
long long v2; // rax
long long v4; // [rsp+10h] [rbp-90h]
long long v5; // [rsp+38h] [rbp-68h]
char v6; // [rsp+47h] [rbp-59h] BYREF
long long i; // [rsp+48h] [rbp-58h]
_BYTE v8[12]; // [rsp+50h] [rbp-50h] BYREF
_BYTE v9[8]; // [rsp+68h] [rbp-38h] BYREF
_BYTE v10[32]; // [rsp+70h] [rbp-30h] BYREF
_QWORD v11[2]; // [rsp+90h] [rbp-10h] BYREF
v11[1] = a1;
v11[0] = a2;
testing::Message::Message((testing::Message *)v9);
v5 = testing::Message::operator<<<char [7]>(v9, "gtest_");
LOBYTE(a2) = testing::Message::operator<<<char const>(v5, v11);
testing::Message::GetString[abi:cxx11]((long long)v10);
testing::Message::~Message((testing::Message *)v9);
testing::Message::Message((testing::Message *)v8);
for ( i = 0LL; ; ++i )
{
v4 = i;
if ( v4 == std::string::length(v10) )
break;
v2 = std::string::c_str(v10);
v6 = testing::internal::ToUpper((testing::internal *)(unsigned int)*(char *)(v2 + i), (char)a2);
a2 = &v6;
testing::Message::operator<<<char>(v8, &v6);
}
testing::Message::GetString[abi:cxx11](a1);
testing::Message::~Message((testing::Message *)v8);
std::string::~string(v10);
return a1;
}
| FlagToEnvVar[abi:cxx11]:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV qword ptr [RBP + -0x80],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x78],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
LEA RDI,[RBP + -0x38]
MOV qword ptr [RBP + -0x70],RDI
CALL 0x0012daf0
MOV RDI,qword ptr [RBP + -0x70]
LAB_00127b7f:
LEA RSI,[0x173bb8]
CALL 0x0014c010
MOV qword ptr [RBP + -0x68],RAX
JMP 0x00127b91
LAB_00127b91:
MOV RDI,qword ptr [RBP + -0x68]
LEA RSI,[RBP + -0x10]
CALL 0x00118fc0
MOV qword ptr [RBP + -0x88],RAX
JMP 0x00127ba7
LAB_00127ba7:
MOV RSI,qword ptr [RBP + -0x88]
LEA RDI,[RBP + -0x30]
CALL 0x00120c50
JMP 0x00127bb9
LAB_00127bb9:
LEA RDI,[RBP + -0x38]
CALL 0x00113ed0
LAB_00127bc2:
LEA RDI,[RBP + -0x50]
CALL 0x0012daf0
JMP 0x00127bcd
LAB_00127bcd:
MOV qword ptr [RBP + -0x58],0x0
LAB_00127bd5:
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x90],RAX
LEA RDI,[RBP + -0x30]
CALL 0x0010bb50
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x90]
CMP RAX,RCX
JZ 0x00127c7e
LEA RDI,[RBP + -0x30]
CALL 0x0010b280
MOV RCX,qword ptr [RBP + -0x58]
MOVSX EDI,byte ptr [RAX + RCX*0x1]
LAB_00127c0d:
CALL 0x00156c20
MOV byte ptr [RBP + -0x91],AL
JMP 0x00127c1a
LAB_00127c1a:
MOV AL,byte ptr [RBP + -0x91]
MOV byte ptr [RBP + -0x59],AL
LEA RDI,[RBP + -0x50]
LEA RSI,[RBP + -0x59]
CALL 0x00151510
JMP 0x00127c32
LAB_00127c32:
JMP 0x00127c34
LAB_00127c34:
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x1
MOV qword ptr [RBP + -0x58],RAX
JMP 0x00127bd5
LAB_00127c7e:
MOV RDI,qword ptr [RBP + -0x80]
LEA RSI,[RBP + -0x50]
CALL 0x00120c50
LAB_00127c8b:
JMP 0x00127c8d
LAB_00127c8d:
LEA RDI,[RBP + -0x50]
CALL 0x00113ed0
LEA RDI,[RBP + -0x30]
CALL 0x0010be58
MOV RAX,qword ptr [RBP + -0x78]
ADD RSP,0xa0
POP RBP
RET
|
/* testing::internal::FlagToEnvVar[abi:cxx11](char const*) */
internal * __thiscall testing::internal::FlagToEnvVar_abi_cxx11_(internal *this,char *param_1)
{
Message *this_00;
long lVar1;
long lVar2;
char local_61;
long local_60;
Message local_58 [24];
Message local_40 [8];
string local_38 [32];
char *local_18;
internal *local_10;
local_18 = param_1;
local_10 = this;
Message::Message(local_40);
/* try { // try from 00127b7f to 00127bb6 has its CatchHandler @ 00127c42 */
this_00 = Message::operator<<(local_40,"gtest_");
Message::operator<<(this_00,&local_18);
Message::GetString_abi_cxx11_();
Message::~Message(local_40);
/* try { // try from 00127bc2 to 00127bca has its CatchHandler @ 00127c59 */
Message::Message(local_58);
local_60 = 0;
while( true ) {
lVar2 = local_60;
lVar1 = std::__cxx11::string::length();
if (lVar2 == lVar1) break;
lVar2 = std::__cxx11::string::c_str();
/* try { // try from 00127c0d to 00127c8a has its CatchHandler @ 00127c67 */
local_61 = ToUpper(*(char *)(lVar2 + local_60));
Message::operator<<(local_58,&local_61);
local_60 = local_60 + 1;
}
Message::GetString_abi_cxx11_();
Message::~Message(local_58);
std::__cxx11::string::~string(local_38);
return this;
}
| |
29,838 | ma_tls_connect | eloqsql/libmariadb/libmariadb/secure/openssl.c | my_bool ma_tls_connect(MARIADB_TLS *ctls)
{
SSL *ssl = (SSL *)ctls->ssl;
my_bool blocking, try_connect= 1;
MYSQL *mysql;
MARIADB_PVIO *pvio;
int rc;
#ifdef OPENSSL_USE_BIOMETHOD
BIO_METHOD *bio_method= NULL;
BIO *bio;
#endif
mysql= (MYSQL *)SSL_get_app_data(ssl);
pvio= mysql->net.pvio;
/* Set socket to non blocking if not already set */
if (!(blocking= pvio->methods->is_blocking(pvio)))
pvio->methods->blocking(pvio, FALSE, 0);
SSL_clear(ssl);
#ifdef OPENSSL_USE_BIOMETHOD
bio= BIO_new(&ma_BIO_method);
bio->ptr= pvio;
SSL_set_bio(ssl, bio, bio);
BIO_set_fd(bio, mysql_get_socket(mysql), BIO_NOCLOSE);
#else
SSL_set_fd(ssl, (int)mysql_get_socket(mysql));
#endif
while (try_connect && (rc= SSL_connect(ssl)) == -1)
{
switch((SSL_get_error(ssl, rc))) {
case SSL_ERROR_WANT_READ:
if (pvio->methods->wait_io_or_timeout(pvio, TRUE, mysql->options.connect_timeout) < 1)
try_connect= 0;
break;
case SSL_ERROR_WANT_WRITE:
if (pvio->methods->wait_io_or_timeout(pvio, TRUE, mysql->options.connect_timeout) < 1)
try_connect= 0;
break;
default:
try_connect= 0;
}
}
/* In case handshake failed or if a root certificate (ca) was specified,
we need to check the result code of X509 verification. A detailed check
of the peer certificate (hostname checking will follow later) */
if (rc != 1 ||
(mysql->client_flag & CLIENT_SSL_VERIFY_SERVER_CERT) ||
(mysql->options.ssl_ca || mysql->options.ssl_capath))
{
long x509_err= SSL_get_verify_result(ssl);
if (x509_err != X509_V_OK)
{
my_set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN,
ER(CR_SSL_CONNECTION_ERROR), X509_verify_cert_error_string(x509_err));
/* restore blocking mode */
if (!blocking)
pvio->methods->blocking(pvio, FALSE, 0);
return 1;
} else if (rc != 1) {
ma_tls_set_error(mysql);
return 1;
}
}
pvio->ctls->ssl= ctls->ssl= (void *)ssl;
return 0;
} | O0 | c | ma_tls_connect:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movb $0x1, -0x1a(%rbp)
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x14150
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x68(%rax), %rax
movq -0x30(%rbp), %rdi
callq *%rax
movb %al, -0x19(%rbp)
cmpb $0x0, %al
jne 0x517c7
movq -0x30(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x38(%rax), %rax
movq -0x30(%rbp), %rdi
xorl %esi, %esi
xorl %ecx, %ecx
movl %ecx, %edx
callq *%rax
movq -0x18(%rbp), %rdi
callq 0x140a0
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rdi
callq 0x3c910
movq -0x48(%rbp), %rdi
movl %eax, %esi
callq 0x142a0
movsbl -0x1a(%rbp), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x49(%rbp)
je 0x5180f
movq -0x18(%rbp), %rdi
callq 0x14620
movl %eax, -0x34(%rbp)
cmpl $-0x1, %eax
sete %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
testb $0x1, %al
jne 0x5181b
jmp 0x5189e
movq -0x18(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x14040
movl %eax, %ecx
movl %ecx, -0x50(%rbp)
subl $0x2, %eax
je 0x5183d
jmp 0x51833
movl -0x50(%rbp), %eax
subl $0x3, %eax
je 0x51869
jmp 0x51895
movq -0x30(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x30(%rax), %rax
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rcx
movl 0x390(%rcx), %edx
movl $0x1, %esi
callq *%rax
cmpl $0x1, %eax
jge 0x51867
movb $0x0, -0x1a(%rbp)
jmp 0x51899
movq -0x30(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x30(%rax), %rax
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rcx
movl 0x390(%rcx), %edx
movl $0x1, %esi
callq *%rax
cmpl $0x1, %eax
jge 0x51893
movb $0x0, -0x1a(%rbp)
jmp 0x51899
movb $0x0, -0x1a(%rbp)
jmp 0x517ec
cmpl $0x1, -0x34(%rbp)
jne 0x518db
movq -0x28(%rbp), %rax
movq 0x368(%rax), %rax
andq $0x40000000, %rax # imm = 0x40000000
cmpq $0x0, %rax
jne 0x518db
movq -0x28(%rbp), %rax
cmpq $0x0, 0x410(%rax)
jne 0x518db
movq -0x28(%rbp), %rax
cmpq $0x0, 0x418(%rax)
je 0x51978
movq -0x18(%rbp), %rdi
callq 0x14180
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x5195f
movq -0x28(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq 0x2f5a2(%rip), %rax # 0x80ea0
movq (%rax), %rax
movq %rax, -0x60(%rbp)
leaq 0x2f5a4(%rip), %rax # 0x80eb0
movq 0xd0(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x40(%rbp), %rdi
callq 0x142e0
movq -0x68(%rbp), %rdi
movq -0x60(%rbp), %rdx
movq -0x58(%rbp), %rcx
movq %rax, %r8
movl $0x7ea, %esi # imm = 0x7EA
movb $0x0, %al
callq 0x307d0
cmpb $0x0, -0x19(%rbp)
jne 0x51959
movq -0x30(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x38(%rax), %rax
movq -0x30(%rbp), %rdi
xorl %esi, %esi
xorl %ecx, %ecx
movl %ecx, %edx
callq *%rax
movb $0x1, -0x1(%rbp)
jmp 0x51994
cmpl $0x1, -0x34(%rbp)
je 0x51974
movq -0x28(%rbp), %rdi
callq 0x519a0
movb $0x1, -0x1(%rbp)
jmp 0x51994
jmp 0x51976
jmp 0x51978
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rax
movq 0x38(%rax), %rax
movq %rcx, 0x10(%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
| ma_tls_connect:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov [rbp+var_18], rax
mov [rbp+var_1A], 1
mov rdi, [rbp+var_18]
xor esi, esi
call _SSL_get_ex_data
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov rax, [rax+48h]
mov rax, [rax+68h]
mov rdi, [rbp+var_30]
call rax
mov [rbp+var_19], al
cmp al, 0
jnz short loc_517C7
mov rax, [rbp+var_30]
mov rax, [rax+48h]
mov rax, [rax+38h]
mov rdi, [rbp+var_30]
xor esi, esi
xor ecx, ecx
mov edx, ecx
call rax
loc_517C7:
mov rdi, [rbp+var_18]
call _SSL_clear
mov rax, [rbp+var_18]
mov [rbp+var_48], rax
mov rdi, [rbp+var_28]
call mysql_get_socket
mov rdi, [rbp+var_48]
mov esi, eax
call _SSL_set_fd
loc_517EC:
movsx ecx, [rbp+var_1A]
xor eax, eax
cmp ecx, 0
mov [rbp+var_49], al
jz short loc_5180F
mov rdi, [rbp+var_18]
call _SSL_connect
mov [rbp+var_34], eax
cmp eax, 0FFFFFFFFh
setz al
mov [rbp+var_49], al
loc_5180F:
mov al, [rbp+var_49]
test al, 1
jnz short loc_5181B
jmp loc_5189E
loc_5181B:
mov rdi, [rbp+var_18]
mov esi, [rbp+var_34]
call _SSL_get_error
mov ecx, eax
mov [rbp+var_50], ecx
sub eax, 2
jz short loc_5183D
jmp short $+2
loc_51833:
mov eax, [rbp+var_50]
sub eax, 3
jz short loc_51869
jmp short loc_51895
loc_5183D:
mov rax, [rbp+var_30]
mov rax, [rax+48h]
mov rax, [rax+30h]
mov rdi, [rbp+var_30]
mov rcx, [rbp+var_28]
mov edx, [rcx+390h]
mov esi, 1
call rax
cmp eax, 1
jge short loc_51867
mov [rbp+var_1A], 0
loc_51867:
jmp short loc_51899
loc_51869:
mov rax, [rbp+var_30]
mov rax, [rax+48h]
mov rax, [rax+30h]
mov rdi, [rbp+var_30]
mov rcx, [rbp+var_28]
mov edx, [rcx+390h]
mov esi, 1
call rax
cmp eax, 1
jge short loc_51893
mov [rbp+var_1A], 0
loc_51893:
jmp short loc_51899
loc_51895:
mov [rbp+var_1A], 0
loc_51899:
jmp loc_517EC
loc_5189E:
cmp [rbp+var_34], 1
jnz short loc_518DB
mov rax, [rbp+var_28]
mov rax, [rax+368h]
and rax, 40000000h
cmp rax, 0
jnz short loc_518DB
mov rax, [rbp+var_28]
cmp qword ptr [rax+410h], 0
jnz short loc_518DB
mov rax, [rbp+var_28]
cmp qword ptr [rax+418h], 0
jz loc_51978
loc_518DB:
mov rdi, [rbp+var_18]
call _SSL_get_verify_result
mov [rbp+var_40], rax
cmp [rbp+var_40], 0
jz short loc_5195F
mov rax, [rbp+var_28]
mov [rbp+var_68], rax
lea rax, SQLSTATE_UNKNOWN
mov rax, [rax]
mov [rbp+var_60], rax
lea rax, client_errors
mov rax, [rax+0D0h]
mov [rbp+var_58], rax
mov rdi, [rbp+var_40]
call _X509_verify_cert_error_string
mov rdi, [rbp+var_68]
mov rdx, [rbp+var_60]
mov rcx, [rbp+var_58]
mov r8, rax
mov esi, 7EAh
mov al, 0
call my_set_error
cmp [rbp+var_19], 0
jnz short loc_51959
mov rax, [rbp+var_30]
mov rax, [rax+48h]
mov rax, [rax+38h]
mov rdi, [rbp+var_30]
xor esi, esi
xor ecx, ecx
mov edx, ecx
call rax
loc_51959:
mov [rbp+var_1], 1
jmp short loc_51994
loc_5195F:
cmp [rbp+var_34], 1
jz short loc_51974
mov rdi, [rbp+var_28]
call ma_tls_set_error
mov [rbp+var_1], 1
jmp short loc_51994
loc_51974:
jmp short $+2
loc_51976:
jmp short $+2
loc_51978:
mov rcx, [rbp+var_18]
mov rax, [rbp+var_10]
mov [rax+10h], rcx
mov rax, [rbp+var_30]
mov rax, [rax+38h]
mov [rax+10h], rcx
mov [rbp+var_1], 0
loc_51994:
mov al, [rbp+var_1]
add rsp, 70h
pop rbp
retn
| char ma_tls_connect(long long a1)
{
unsigned int socket; // eax
long long v2; // rax
char *v4; // [rsp+10h] [rbp-60h]
char *v5; // [rsp+18h] [rbp-58h]
int error; // [rsp+20h] [rbp-50h]
bool v7; // [rsp+27h] [rbp-49h]
long long verify_result; // [rsp+30h] [rbp-40h]
unsigned int v9; // [rsp+3Ch] [rbp-34h]
long long v10; // [rsp+40h] [rbp-30h]
_QWORD *v11; // [rsp+48h] [rbp-28h]
char v12; // [rsp+56h] [rbp-1Ah]
char v13; // [rsp+57h] [rbp-19h]
long long v14; // [rsp+58h] [rbp-18h]
v14 = *(_QWORD *)(a1 + 16);
v12 = 1;
v11 = (_QWORD *)SSL_get_ex_data(v14, 0LL);
v10 = *v11;
v13 = (*(long long ( **)(_QWORD))(*(_QWORD *)(*v11 + 72LL) + 104LL))(*v11);
if ( !v13 )
(*(void ( **)(long long, _QWORD, _QWORD))(*(_QWORD *)(v10 + 72) + 56LL))(v10, 0LL, 0LL);
SSL_clear(v14);
socket = mysql_get_socket((long long)v11);
SSL_set_fd(v14, socket);
while ( 1 )
{
v7 = 0;
if ( v12 )
{
v9 = SSL_connect(v14);
v7 = v9 == -1;
}
if ( !v7 )
break;
error = SSL_get_error(v14, v9);
if ( error == 2 )
{
if ( (*(int ( **)(long long, long long, _QWORD))(*(_QWORD *)(v10 + 72) + 48LL))(
v10,
1LL,
*((unsigned int *)v11 + 228)) < 1 )
v12 = 0;
}
else if ( error == 3 )
{
if ( (*(int ( **)(long long, long long, _QWORD))(*(_QWORD *)(v10 + 72) + 48LL))(
v10,
1LL,
*((unsigned int *)v11 + 228)) < 1 )
v12 = 0;
}
else
{
v12 = 0;
}
}
if ( v9 == 1 && (v11[109] & 0x40000000LL) == 0 && !v11[130] && !v11[131] )
goto LABEL_26;
verify_result = SSL_get_verify_result(v14);
if ( !verify_result )
{
if ( v9 != 1 )
{
ma_tls_set_error(v11);
return 1;
}
LABEL_26:
*(_QWORD *)(a1 + 16) = v14;
*(_QWORD *)(*(_QWORD *)(v10 + 56) + 16LL) = v14;
return 0;
}
v4 = SQLSTATE_UNKNOWN;
v5 = client_errors[26];
v2 = X509_verify_cert_error_string(verify_result);
my_set_error((long long)v11, 0x7EAu, (long long)v4, (long long)v5, v2);
if ( !v13 )
(*(void ( **)(long long, _QWORD, _QWORD))(*(_QWORD *)(v10 + 72) + 56LL))(v10, 0LL, 0LL);
return 1;
}
| ma_tls_connect:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x18],RAX
MOV byte ptr [RBP + -0x1a],0x1
MOV RDI,qword ptr [RBP + -0x18]
XOR ESI,ESI
CALL 0x00114150
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x48]
MOV RAX,qword ptr [RAX + 0x68]
MOV RDI,qword ptr [RBP + -0x30]
CALL RAX
MOV byte ptr [RBP + -0x19],AL
CMP AL,0x0
JNZ 0x001517c7
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x48]
MOV RAX,qword ptr [RAX + 0x38]
MOV RDI,qword ptr [RBP + -0x30]
XOR ESI,ESI
XOR ECX,ECX
MOV EDX,ECX
CALL RAX
LAB_001517c7:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001140a0
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0013c910
MOV RDI,qword ptr [RBP + -0x48]
MOV ESI,EAX
CALL 0x001142a0
LAB_001517ec:
MOVSX ECX,byte ptr [RBP + -0x1a]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x49],AL
JZ 0x0015180f
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00114620
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,-0x1
SETZ AL
MOV byte ptr [RBP + -0x49],AL
LAB_0015180f:
MOV AL,byte ptr [RBP + -0x49]
TEST AL,0x1
JNZ 0x0015181b
JMP 0x0015189e
LAB_0015181b:
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0x34]
CALL 0x00114040
MOV ECX,EAX
MOV dword ptr [RBP + -0x50],ECX
SUB EAX,0x2
JZ 0x0015183d
JMP 0x00151833
LAB_00151833:
MOV EAX,dword ptr [RBP + -0x50]
SUB EAX,0x3
JZ 0x00151869
JMP 0x00151895
LAB_0015183d:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x48]
MOV RAX,qword ptr [RAX + 0x30]
MOV RDI,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x28]
MOV EDX,dword ptr [RCX + 0x390]
MOV ESI,0x1
CALL RAX
CMP EAX,0x1
JGE 0x00151867
MOV byte ptr [RBP + -0x1a],0x0
LAB_00151867:
JMP 0x00151899
LAB_00151869:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x48]
MOV RAX,qword ptr [RAX + 0x30]
MOV RDI,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x28]
MOV EDX,dword ptr [RCX + 0x390]
MOV ESI,0x1
CALL RAX
CMP EAX,0x1
JGE 0x00151893
MOV byte ptr [RBP + -0x1a],0x0
LAB_00151893:
JMP 0x00151899
LAB_00151895:
MOV byte ptr [RBP + -0x1a],0x0
LAB_00151899:
JMP 0x001517ec
LAB_0015189e:
CMP dword ptr [RBP + -0x34],0x1
JNZ 0x001518db
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x368]
AND RAX,0x40000000
CMP RAX,0x0
JNZ 0x001518db
MOV RAX,qword ptr [RBP + -0x28]
CMP qword ptr [RAX + 0x410],0x0
JNZ 0x001518db
MOV RAX,qword ptr [RBP + -0x28]
CMP qword ptr [RAX + 0x418],0x0
JZ 0x00151978
LAB_001518db:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00114180
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RBP + -0x40],0x0
JZ 0x0015195f
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x68],RAX
LEA RAX,[0x180ea0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x60],RAX
LEA RAX,[0x180eb0]
MOV RAX,qword ptr [RAX + 0xd0]
MOV qword ptr [RBP + -0x58],RAX
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x001142e0
MOV RDI,qword ptr [RBP + -0x68]
MOV RDX,qword ptr [RBP + -0x60]
MOV RCX,qword ptr [RBP + -0x58]
MOV R8,RAX
MOV ESI,0x7ea
MOV AL,0x0
CALL 0x001307d0
CMP byte ptr [RBP + -0x19],0x0
JNZ 0x00151959
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x48]
MOV RAX,qword ptr [RAX + 0x38]
MOV RDI,qword ptr [RBP + -0x30]
XOR ESI,ESI
XOR ECX,ECX
MOV EDX,ECX
CALL RAX
LAB_00151959:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00151994
LAB_0015195f:
CMP dword ptr [RBP + -0x34],0x1
JZ 0x00151974
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001519a0
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00151994
LAB_00151974:
JMP 0x00151976
LAB_00151976:
JMP 0x00151978
LAB_00151978:
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RAX + 0x10],RCX
MOV byte ptr [RBP + -0x1],0x0
LAB_00151994:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x70
POP RBP
RET
|
int1 ma_tls_connect(long param_1)
{
SSL *ssl;
long lVar1;
bool bVar2;
int *puVar3;
int *puVar4;
char cVar5;
int iVar6;
long *plVar7;
long n;
char *pcVar8;
bool bVar9;
int local_3c;
ssl = *(SSL **)(param_1 + 0x10);
bVar2 = true;
plVar7 = (long *)SSL_get_ex_data(ssl,0);
lVar1 = *plVar7;
cVar5 = (**(code **)(*(long *)(lVar1 + 0x48) + 0x68))(lVar1);
if (cVar5 == '\0') {
(**(code **)(*(long *)(lVar1 + 0x48) + 0x38))(lVar1,0,0);
}
SSL_clear(ssl);
iVar6 = mysql_get_socket(plVar7);
SSL_set_fd(ssl,iVar6);
while( true ) {
bVar9 = false;
if (bVar2) {
local_3c = SSL_connect(ssl);
bVar9 = local_3c == -1;
}
if (!bVar9) break;
iVar6 = SSL_get_error(ssl,local_3c);
if (iVar6 == 2) {
iVar6 = (**(code **)(*(long *)(lVar1 + 0x48) + 0x30))(lVar1,1,(int)plVar7[0x72]);
if (iVar6 < 1) {
bVar2 = false;
}
}
else if (iVar6 == 3) {
iVar6 = (**(code **)(*(long *)(lVar1 + 0x48) + 0x30))(lVar1,1,(int)plVar7[0x72]);
if (iVar6 < 1) {
bVar2 = false;
}
}
else {
bVar2 = false;
}
}
if ((((local_3c != 1) || ((plVar7[0x6d] & 0x40000000U) != 0)) || (plVar7[0x82] != 0)) ||
(plVar7[0x83] != 0)) {
n = SSL_get_verify_result(ssl);
puVar4 = PTR_s_TLS_SSL_error_____100s_00180f80;
puVar3 = SQLSTATE_UNKNOWN;
if (n != 0) {
pcVar8 = X509_verify_cert_error_string(n);
my_set_error(plVar7,0x7ea,puVar3,puVar4,pcVar8);
if (cVar5 == '\0') {
(**(code **)(*(long *)(lVar1 + 0x48) + 0x38))(lVar1,0,0);
}
return 1;
}
if (local_3c != 1) {
ma_tls_set_error(plVar7);
return 1;
}
}
*(SSL **)(param_1 + 0x10) = ssl;
*(SSL **)(*(long *)(lVar1 + 0x38) + 0x10) = ssl;
return 0;
}
| |
29,839 | verify_segment_integrity | seiftnesse[P]memoryallocator/src/custom_alloc_util.c | int verify_segment_integrity(segment_t *s, int repair) {
if (!s) return 0;
int errors = 0;
// Basic check - magic number (always performed)
if (s->magic != SEGMENT_MAGIC) {
HEAP_LOG("CORRUPTION: Invalid magic number in segment %p: 0x%08X != 0x%08X\n",
s, s->magic, SEGMENT_MAGIC);
errors++;
if (repair) {
s->magic = SEGMENT_MAGIC;
HEAP_LOG("Repaired: Reset magic number for segment %p\n", s);
}
}
// Size sanity check (basic)
if (s->size <= 0 || s->size > MAX_REASONABLE_BLOCKS) {
HEAP_LOG("CORRUPTION: Unreasonable size in segment %p: %d blocks\n", s, s->size);
errors++;
if (repair && s->next) {
// Try to determine reasonable size from distance to next segment
uintptr_t next_addr = (uintptr_t)(s->next);
uintptr_t this_addr = (uintptr_t)(s);
int corrected_size = (next_addr - this_addr) / BLOCK_SIZE;
if (corrected_size > 0 && corrected_size <= MAX_REASONABLE_BLOCKS) {
s->size = corrected_size;
HEAP_LOG("Repaired: Corrected size for segment %p to %d blocks based on next segment\n",
s, s->size);
}
}
}
// Stop here if only basic checks are enabled
if (integrity_check_level < 2) return errors;
// Get the integrity structure - ВАЖНО: добавлен детальный вывод для отладки
segment_integrity_t *integrity = get_segment_integrity(s);
if (!integrity) {
HEAP_LOG("WARNING: Could not get integrity structure for segment %p\n", s);
if (repair) {
HEAP_LOG("Attempting to initialize integrity for segment %p\n", s);
initialize_segment_integrity(s);
integrity = get_segment_integrity(s);
}
if (!integrity) {
HEAP_LOG("CRITICAL: Cannot perform integrity checks - no integrity structure available\n");
return errors;
}
}
HEAP_LOG("Checking integrity for segment %p: header_guard=0x%08X, checksum=0x%08X\n",
s, integrity->header_guard, integrity->checksum);
// Check header guard
if (integrity->header_guard != HEADER_GUARD_VALUE) {
HEAP_LOG("CORRUPTION: Invalid header guard in segment %p: 0x%08X != 0x%08X\n",
s, integrity->header_guard, HEADER_GUARD_VALUE);
errors++;
if (repair) {
integrity->header_guard = HEADER_GUARD_VALUE;
HEAP_LOG("Repaired: Reset header guard for segment %p\n", s);
}
}
// Check checksum
uint32_t current_checksum = calculate_segment_checksum(s);
if (integrity->checksum != current_checksum) {
HEAP_LOG("CORRUPTION: Invalid checksum in segment %p: 0x%08X != 0x%08X\n",
s, integrity->checksum, current_checksum);
errors++;
if (repair) {
integrity->checksum = current_checksum;
HEAP_LOG("Repaired: Reset checksum for segment %p\n", s);
}
}
// Check footer guard only if level 3 checks are enabled
if (integrity_check_level >= 3) {
uint32_t *footer = get_segment_footer(s);
if (footer) {
HEAP_LOG("Footer guard check for segment %p: current=0x%08X, expected=0x%08X\n",
s, *footer, FOOTER_GUARD_VALUE);
if (*footer != FOOTER_GUARD_VALUE) {
HEAP_LOG("CORRUPTION: Invalid footer guard in segment %p: 0x%08X != 0x%08X\n",
s, *footer, FOOTER_GUARD_VALUE);
errors++;
if (repair) {
*footer = FOOTER_GUARD_VALUE;
HEAP_LOG("Repaired: Reset footer guard for segment %p\n", s);
}
}
} else {
HEAP_LOG("WARNING: Could not get footer pointer for segment %p\n", s);
}
// Linked list checks - добавлена проверка на null
if (s->next) {
HEAP_LOG("Checking next segment link: %p->next = %p, %p->next->prev = %p\n",
s, s->next, s->next, s->next->prev);
if (s->next->prev != s) {
HEAP_LOG("CORRUPTION: Broken linked list: s->next->prev != s for segment %p\n", s);
errors++;
if (repair) {
s->next->prev = s;
HEAP_LOG("Repaired: Fixed broken linked list for segment %p\n", s);
}
}
}
if (s->prev) {
HEAP_LOG("Checking prev segment link: %p->prev = %p, %p->prev->next = %p\n",
s, s->prev, s->prev, s->prev->next);
if (s->prev->next != s) {
HEAP_LOG("CORRUPTION: Broken linked list: s->prev->next != s for segment %p\n", s);
errors++;
if (repair) {
s->prev->next = s;
HEAP_LOG("Repaired: Fixed broken linked list for segment %p\n", s);
}
}
}
// Check that segment is within heap bounds
uintptr_t heap_start = (uintptr_t)(memory);
uintptr_t heap_end = heap_start + HEAP_SIZE;
uintptr_t segment_addr = (uintptr_t)(s);
if (segment_addr < heap_start || segment_addr >= heap_end) {
HEAP_LOG("CORRUPTION: Segment %p is outside heap bounds [%p-%p]\n",
s, (void*)heap_start, (void*)heap_end);
errors++;
// Cannot repair this automatically
}
}
return errors;
} | O1 | c | verify_segment_integrity:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2ad4
movq %rdi, %r14
xorl %ebx, %ebx
cmpl $0xcafebafe, 0x28(%rdi) # imm = 0xCAFEBAFE
je 0x2a54
movl $0x1, %ebx
testl %esi, %esi
je 0x2a54
movl $0xcafebafe, 0x28(%r14) # imm = 0xCAFEBAFE
movl $0xffffbfff, %eax # imm = 0xFFFFBFFF
movl 0x4(%r14), %ecx
addl %eax, %ecx
cmpl %eax, %ecx
ja 0x2a88
incl %ebx
testl %esi, %esi
je 0x2a88
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x2a88
subq %r14, %rax
shrq $0xc, %rax
leal -0x1(%rax), %ecx
cmpl $0x3fff, %ecx # imm = 0x3FFF
ja 0x2a88
movl %eax, 0x4(%r14)
cmpl $0x2, 0x362d(%rip) # 0x60bc
jl 0x2bce
leaq 0x3f(%r14), %r13
andq $-0x10, %r13
leaq 0x3c(%r14), %rbp
leaq 0x30(%r14), %r12
xorl %r15d, %r15d
cmpq %r13, %rbp
cmovbeq %r12, %r15
testq %r15, %r15
jne 0x2ae7
testl %esi, %esi
je 0x2adb
movq %r14, %rdi
movl %esi, %r15d
callq 0x2807
movl %r15d, %esi
xorl %eax, %eax
cmpq %r13, %rbp
cmovaq %rax, %r12
movq %r12, %r15
jmp 0x2ade
xorl %ebx, %ebx
jmp 0x2bce
xorl %r15d, %r15d
testq %r15, %r15
je 0x2bce
cmpl $0xfeedface, (%r15) # imm = 0xFEEDFACE
je 0x2b01
incl %ebx
testl %esi, %esi
je 0x2b01
movl %esi, %ebp
movl $0xfeedface, (%r15) # imm = 0xFEEDFACE
jmp 0x2b03
movl %esi, %ebp
movq %r14, %rdi
callq 0x2925
cmpl %eax, 0x4(%r15)
jne 0x2b15
movl %ebp, %esi
jmp 0x2b21
incl %ebx
movl %ebp, %esi
testl %ebp, %ebp
je 0x2b21
movl %eax, 0x4(%r15)
cmpl $0x3, 0x3594(%rip) # 0x60bc
jl 0x2bce
movl 0x4(%r14), %ecx
leal -0x4001(%rcx), %eax
cmpl $0xffffc000, %eax # imm = 0xFFFFC000
jae 0x2b43
xorl %eax, %eax
jmp 0x2b63
shlq $0xc, %rcx
leaq (%rcx,%r14), %rax
addq $-0x4, %rax
addq %r14, %rcx
xorl %edx, %edx
cmpq %r14, %rax
cmovbeq %rdx, %rax
cmpq $0x4, %rcx
cmovbq %rdx, %rax
testq %rax, %rax
je 0x2b7c
cmpl $0xdeadc0de, (%rax) # imm = 0xDEADC0DE
je 0x2b7c
incl %ebx
testl %esi, %esi
je 0x2b7c
movl $0xdeadc0de, (%rax) # imm = 0xDEADC0DE
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x2b95
cmpq %r14, 0x10(%rax)
je 0x2b95
incl %ebx
testl %esi, %esi
je 0x2b95
movq %r14, 0x10(%rax)
movq 0x10(%r14), %rax
testq %rax, %rax
je 0x2bae
cmpq %r14, 0x8(%rax)
je 0x2bae
incl %ebx
testl %esi, %esi
je 0x2bae
movq %r14, 0x8(%rax)
leaq 0x10354b(%rip), %rax # 0x106100
cmpq %rax, %r14
setb %cl
addq $0x4000000, %rax # imm = 0x4000000
cmpq %rax, %r14
setae %al
orb %cl, %al
movzbl %al, %eax
addl %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| verify_segment_integrity:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
test rdi, rdi
jz loc_2AD4
mov r14, rdi
xor ebx, ebx
cmp dword ptr [rdi+28h], 0CAFEBAFEh
jz short loc_2A54
mov ebx, 1
test esi, esi
jz short loc_2A54
mov dword ptr [r14+28h], 0CAFEBAFEh
loc_2A54:
mov eax, 0FFFFBFFFh
mov ecx, [r14+4]
add ecx, eax
cmp ecx, eax
ja short loc_2A88
inc ebx
test esi, esi
jz short loc_2A88
mov rax, [r14+8]
test rax, rax
jz short loc_2A88
sub rax, r14
shr rax, 0Ch
lea ecx, [rax-1]
cmp ecx, 3FFFh
ja short loc_2A88
mov [r14+4], eax
loc_2A88:
cmp cs:integrity_check_level, 2
jl loc_2BCE
lea r13, [r14+3Fh]
and r13, 0FFFFFFFFFFFFFFF0h
lea rbp, [r14+3Ch]
lea r12, [r14+30h]
xor r15d, r15d
cmp rbp, r13
cmovbe r15, r12
test r15, r15
jnz short loc_2AE7
test esi, esi
jz short loc_2ADB
mov rdi, r14
mov r15d, esi
call initialize_segment_integrity
mov esi, r15d
xor eax, eax
cmp rbp, r13
cmova r12, rax
mov r15, r12
jmp short loc_2ADE
loc_2AD4:
xor ebx, ebx
jmp loc_2BCE
loc_2ADB:
xor r15d, r15d
loc_2ADE:
test r15, r15
jz loc_2BCE
loc_2AE7:
cmp dword ptr [r15], 0FEEDFACEh
jz short loc_2B01
inc ebx
test esi, esi
jz short loc_2B01
mov ebp, esi
mov dword ptr [r15], 0FEEDFACEh
jmp short loc_2B03
loc_2B01:
mov ebp, esi
loc_2B03:
mov rdi, r14
call calculate_segment_checksum
cmp [r15+4], eax
jnz short loc_2B15
mov esi, ebp
jmp short loc_2B21
loc_2B15:
inc ebx
mov esi, ebp
test ebp, ebp
jz short loc_2B21
mov [r15+4], eax
loc_2B21:
cmp cs:integrity_check_level, 3
jl loc_2BCE
mov ecx, [r14+4]
lea eax, [rcx-4001h]
cmp eax, 0FFFFC000h
jnb short loc_2B43
xor eax, eax
jmp short loc_2B63
loc_2B43:
shl rcx, 0Ch
lea rax, [rcx+r14]
add rax, 0FFFFFFFFFFFFFFFCh
add rcx, r14
xor edx, edx
cmp rax, r14
cmovbe rax, rdx
cmp rcx, 4
cmovb rax, rdx
loc_2B63:
test rax, rax
jz short loc_2B7C
cmp dword ptr [rax], 0DEADC0DEh
jz short loc_2B7C
inc ebx
test esi, esi
jz short loc_2B7C
mov dword ptr [rax], 0DEADC0DEh
loc_2B7C:
mov rax, [r14+8]
test rax, rax
jz short loc_2B95
cmp [rax+10h], r14
jz short loc_2B95
inc ebx
test esi, esi
jz short loc_2B95
mov [rax+10h], r14
loc_2B95:
mov rax, [r14+10h]
test rax, rax
jz short loc_2BAE
cmp [rax+8], r14
jz short loc_2BAE
inc ebx
test esi, esi
jz short loc_2BAE
mov [rax+8], r14
loc_2BAE:
lea rax, memory
cmp r14, rax
setb cl
add rax, 4000000h
cmp r14, rax
setnb al
or al, cl
movzx eax, al
add ebx, eax
loc_2BCE:
mov eax, ebx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long verify_segment_integrity(unsigned long long a1, int a2)
{
unsigned int v2; // ebx
long long v3; // rax
unsigned long long v4; // rax
unsigned long long v5; // r13
_DWORD *v6; // r12
_DWORD *v7; // r15
int v8; // ebp
int v9; // eax
int v10; // esi
long long v11; // rcx
_DWORD *v12; // rax
long long v13; // rcx
unsigned long long v14; // rcx
long long v15; // rax
long long v16; // rax
if ( a1 )
{
v2 = 0;
if ( *(_DWORD *)(a1 + 40) != -889275650 )
{
v2 = 1;
if ( a2 )
*(_DWORD *)(a1 + 40) = -889275650;
}
if ( (unsigned int)(*(_DWORD *)(a1 + 4) - 16385) <= 0xFFFFBFFF )
{
++v2;
if ( a2 )
{
v3 = *(_QWORD *)(a1 + 8);
if ( v3 )
{
v4 = (v3 - a1) >> 12;
if ( (unsigned int)(v4 - 1) <= 0x3FFF )
*(_DWORD *)(a1 + 4) = v4;
}
}
}
if ( integrity_check_level >= 2 )
{
v5 = (a1 + 63) & 0xFFFFFFFFFFFFFFF0LL;
v6 = (_DWORD *)(a1 + 48);
v7 = 0LL;
if ( a1 + 60 <= v5 )
v7 = (_DWORD *)(a1 + 48);
if ( v7 )
goto LABEL_52;
if ( a2 )
{
initialize_segment_integrity(a1);
if ( a1 + 60 > v5 )
v6 = 0LL;
v7 = v6;
}
else
{
v7 = 0LL;
}
if ( v7 )
{
LABEL_52:
if ( *v7 == -17958194 || (++v2, !a2) )
{
v8 = a2;
}
else
{
v8 = a2;
*v7 = -17958194;
}
v9 = calculate_segment_checksum(a1);
if ( v7[1] == v9 )
{
v10 = v8;
}
else
{
++v2;
v10 = v8;
if ( v8 )
v7[1] = v9;
}
if ( integrity_check_level >= 3 )
{
v11 = *(unsigned int *)(a1 + 4);
if ( (unsigned int)(v11 - 16385) >= 0xFFFFC000 )
{
v13 = v11 << 12;
v12 = (_DWORD *)(v13 + a1 - 4);
v14 = a1 + v13;
if ( (unsigned long long)v12 <= a1 )
v12 = 0LL;
if ( v14 < 4 )
v12 = 0LL;
}
else
{
v12 = 0LL;
}
if ( v12 )
{
if ( *v12 != -559038242 )
{
++v2;
if ( v10 )
*v12 = -559038242;
}
}
v15 = *(_QWORD *)(a1 + 8);
if ( v15 )
{
if ( *(_QWORD *)(v15 + 16) != a1 )
{
++v2;
if ( v10 )
*(_QWORD *)(v15 + 16) = a1;
}
}
v16 = *(_QWORD *)(a1 + 16);
if ( v16 )
{
if ( *(_QWORD *)(v16 + 8) != a1 )
{
++v2;
if ( v10 )
*(_QWORD *)(v16 + 8) = a1;
}
}
v2 += a1 < (unsigned long long)&memory || a1 >= (unsigned long long)&memory + 0x4000000;
}
}
}
}
else
{
return 0;
}
return v2;
}
| verify_segment_integrity:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
TEST RDI,RDI
JZ 0x00102ad4
MOV R14,RDI
XOR EBX,EBX
CMP dword ptr [RDI + 0x28],0xcafebafe
JZ 0x00102a54
MOV EBX,0x1
TEST ESI,ESI
JZ 0x00102a54
MOV dword ptr [R14 + 0x28],0xcafebafe
LAB_00102a54:
MOV EAX,0xffffbfff
MOV ECX,dword ptr [R14 + 0x4]
ADD ECX,EAX
CMP ECX,EAX
JA 0x00102a88
INC EBX
TEST ESI,ESI
JZ 0x00102a88
MOV RAX,qword ptr [R14 + 0x8]
TEST RAX,RAX
JZ 0x00102a88
SUB RAX,R14
SHR RAX,0xc
LEA ECX,[RAX + -0x1]
CMP ECX,0x3fff
JA 0x00102a88
MOV dword ptr [R14 + 0x4],EAX
LAB_00102a88:
CMP dword ptr [0x001060bc],0x2
JL 0x00102bce
LEA R13,[R14 + 0x3f]
AND R13,-0x10
LEA RBP,[R14 + 0x3c]
LEA R12,[R14 + 0x30]
XOR R15D,R15D
CMP RBP,R13
CMOVBE R15,R12
TEST R15,R15
JNZ 0x00102ae7
TEST ESI,ESI
JZ 0x00102adb
MOV RDI,R14
MOV R15D,ESI
CALL 0x00102807
MOV ESI,R15D
XOR EAX,EAX
CMP RBP,R13
CMOVA R12,RAX
MOV R15,R12
JMP 0x00102ade
LAB_00102ad4:
XOR EBX,EBX
JMP 0x00102bce
LAB_00102adb:
XOR R15D,R15D
LAB_00102ade:
TEST R15,R15
JZ 0x00102bce
LAB_00102ae7:
CMP dword ptr [R15],0xfeedface
JZ 0x00102b01
INC EBX
TEST ESI,ESI
JZ 0x00102b01
MOV EBP,ESI
MOV dword ptr [R15],0xfeedface
JMP 0x00102b03
LAB_00102b01:
MOV EBP,ESI
LAB_00102b03:
MOV RDI,R14
CALL 0x00102925
CMP dword ptr [R15 + 0x4],EAX
JNZ 0x00102b15
MOV ESI,EBP
JMP 0x00102b21
LAB_00102b15:
INC EBX
MOV ESI,EBP
TEST EBP,EBP
JZ 0x00102b21
MOV dword ptr [R15 + 0x4],EAX
LAB_00102b21:
CMP dword ptr [0x001060bc],0x3
JL 0x00102bce
MOV ECX,dword ptr [R14 + 0x4]
LEA EAX,[RCX + -0x4001]
CMP EAX,0xffffc000
JNC 0x00102b43
XOR EAX,EAX
JMP 0x00102b63
LAB_00102b43:
SHL RCX,0xc
LEA RAX,[RCX + R14*0x1]
ADD RAX,-0x4
ADD RCX,R14
XOR EDX,EDX
CMP RAX,R14
CMOVBE RAX,RDX
CMP RCX,0x4
CMOVC RAX,RDX
LAB_00102b63:
TEST RAX,RAX
JZ 0x00102b7c
CMP dword ptr [RAX],0xdeadc0de
JZ 0x00102b7c
INC EBX
TEST ESI,ESI
JZ 0x00102b7c
MOV dword ptr [RAX],0xdeadc0de
LAB_00102b7c:
MOV RAX,qword ptr [R14 + 0x8]
TEST RAX,RAX
JZ 0x00102b95
CMP qword ptr [RAX + 0x10],R14
JZ 0x00102b95
INC EBX
TEST ESI,ESI
JZ 0x00102b95
MOV qword ptr [RAX + 0x10],R14
LAB_00102b95:
MOV RAX,qword ptr [R14 + 0x10]
TEST RAX,RAX
JZ 0x00102bae
CMP qword ptr [RAX + 0x8],R14
JZ 0x00102bae
INC EBX
TEST ESI,ESI
JZ 0x00102bae
MOV qword ptr [RAX + 0x8],R14
LAB_00102bae:
LEA RAX,[0x206100]
CMP R14,RAX
SETC CL
ADD RAX,0x4000000
CMP R14,RAX
SETNC AL
OR AL,CL
MOVZX EAX,AL
ADD EBX,EAX
LAB_00102bce:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
char verify_segment_integrity(int *param_1,int param_2)
{
uint uVar1;
long lVar2;
int iVar3;
int *piVar4;
char cVar5;
int *piVar6;
if (param_1 == (int *)0x0) {
cVar5 = '\0';
}
else {
cVar5 = '\0';
if ((param_1[10] != -0x35014502) && (cVar5 = '\x01', param_2 != 0)) {
param_1[10] = -0x35014502;
}
if ((((param_1[1] - 0x4001U < 0xffffc000) && (cVar5 = cVar5 + '\x01', param_2 != 0)) &&
(*(long *)(param_1 + 2) != 0)) &&
(iVar3 = (int)((ulong)(*(long *)(param_1 + 2) - (long)param_1) >> 0xc), iVar3 - 1U < 0x4000))
{
param_1[1] = iVar3;
}
if (1 < integrity_check_level) {
piVar6 = (int *)((long)param_1 + 0x3fU & 0xfffffffffffffff0);
piVar4 = (int *)0x0;
if (param_1 + 0xf <= piVar6) {
piVar4 = param_1 + 0xc;
}
if (piVar4 == (int *)0x0) {
if (param_2 == 0) {
piVar4 = (int *)0x0;
}
else {
initialize_segment_integrity(param_1);
piVar4 = param_1 + 0xc;
if (piVar6 < param_1 + 0xf) {
piVar4 = (int *)0x0;
}
}
if (piVar4 == (int *)0x0) {
return cVar5;
}
}
if ((*piVar4 != -0x1120532) && (cVar5 = cVar5 + '\x01', param_2 != 0)) {
*piVar4 = -0x1120532;
}
iVar3 = calculate_segment_checksum(param_1);
if ((piVar4[1] != iVar3) && (cVar5 = cVar5 + '\x01', param_2 != 0)) {
piVar4[1] = iVar3;
}
if (2 < integrity_check_level) {
uVar1 = param_1[1];
if (uVar1 - 0x4001 < 0xffffc000) {
piVar4 = (int *)0x0;
}
else {
piVar4 = param_1 + (ulong)uVar1 * 0x400 + -1;
if (param_1 + (ulong)uVar1 * 0x400 + -1 <= param_1) {
piVar4 = (int *)0x0;
}
if (param_1 + (ulong)uVar1 * 0x400 < (int *)0x4) {
piVar4 = (int *)0x0;
}
}
if (((piVar4 != (int *)0x0) && (*piVar4 != -0x21523f22)) &&
(cVar5 = cVar5 + '\x01', param_2 != 0)) {
*piVar4 = -0x21523f22;
}
lVar2 = *(long *)(param_1 + 2);
if (((lVar2 != 0) && (*(int **)(lVar2 + 0x10) != param_1)) &&
(cVar5 = cVar5 + '\x01', param_2 != 0)) {
*(int **)(lVar2 + 0x10) = param_1;
}
lVar2 = *(long *)(param_1 + 4);
if (((lVar2 != 0) && (*(int **)(lVar2 + 8) != param_1)) &&
(cVar5 = cVar5 + '\x01', param_2 != 0)) {
*(int **)(lVar2 + 8) = param_1;
}
cVar5 = cVar5 + (memory + 0x3ffffff < param_1 || param_1 < memory);
}
}
}
return cVar5;
}
| |
29,840 | s2b | eloqsql/strings/dtoa.c | static Bigint *s2b(const char *s, int nd0, int nd, ULong y9, Stack_alloc *alloc)
{
Bigint *b;
int i, k;
Long x, y;
x= (nd + 8) / 9;
for (k= 0, y= 1; x > y; y <<= 1, k++) ;
b= Balloc(k, alloc);
b->p.x[0]= y9;
b->wds= 1;
i= 9;
if (9 < nd0)
{
s+= 9;
do
b= multadd(b, 10, *s++ - '0', alloc);
while (++i < nd0);
s++; /* skip '.' */
}
else
s+= 10;
/* now do the fractional part */
for(; i < nd; i++)
b= multadd(b, 10, *s++ - '0', alloc);
return b;
} | O0 | c | s2b:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movq %r8, -0x20(%rbp)
movl -0x10(%rbp), %eax
addl $0x8, %eax
movl $0x9, %ecx
cltd
idivl %ecx
movl %eax, -0x34(%rbp)
movl $0x0, -0x30(%rbp)
movl $0x1, -0x38(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x38(%rbp), %eax
jle 0x72ce5
jmp 0x72cd2
movl -0x38(%rbp), %eax
shll %eax
movl %eax, -0x38(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x72cc8
movl -0x30(%rbp), %edi
movq -0x20(%rbp), %rsi
callq 0x72dd0
movq %rax, -0x28(%rbp)
movl -0x14(%rbp), %ecx
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movl $0x1, 0x14(%rax)
movl $0x9, -0x2c(%rbp)
movl $0x9, %eax
cmpl -0xc(%rbp), %eax
jge 0x72d70
movq -0x8(%rbp), %rax
addq $0x9, %rax
movq %rax, -0x8(%rbp)
movq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movsbl (%rax), %edx
subl $0x30, %edx
movq -0x20(%rbp), %rcx
movl $0xa, %esi
callq 0x73a60
movq %rax, -0x28(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
cmpl -0xc(%rbp), %eax
jl 0x72d29
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x72d7c
movq -0x8(%rbp), %rax
addq $0xa, %rax
movq %rax, -0x8(%rbp)
jmp 0x72d7e
movl -0x2c(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x72dbc
movq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movsbl (%rax), %edx
subl $0x30, %edx
movq -0x20(%rbp), %rcx
movl $0xa, %esi
callq 0x73a60
movq %rax, -0x28(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x72d7e
movq -0x28(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| s2b:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], edx
mov [rbp+var_14], ecx
mov [rbp+var_20], r8
mov eax, [rbp+var_10]
add eax, 8
mov ecx, 9
cdq
idiv ecx
mov [rbp+var_34], eax
mov [rbp+var_30], 0
mov [rbp+var_38], 1
loc_72CC8:
mov eax, [rbp+var_34]
cmp eax, [rbp+var_38]
jle short loc_72CE5
jmp short $+2
loc_72CD2:
mov eax, [rbp+var_38]
shl eax, 1
mov [rbp+var_38], eax
mov eax, [rbp+var_30]
add eax, 1
mov [rbp+var_30], eax
jmp short loc_72CC8
loc_72CE5:
mov edi, [rbp+var_30]
mov rsi, [rbp+var_20]
call Balloc
mov [rbp+var_28], rax
mov ecx, [rbp+var_14]
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rax], ecx
mov rax, [rbp+var_28]
mov dword ptr [rax+14h], 1
mov [rbp+var_2C], 9
mov eax, 9
cmp eax, [rbp+var_C]
jge short loc_72D70
mov rax, [rbp+var_8]
add rax, 9
mov [rbp+var_8], rax
loc_72D29:
mov rdi, [rbp+var_28]
mov rax, [rbp+var_8]
mov rcx, rax
add rcx, 1
mov [rbp+var_8], rcx
movsx edx, byte ptr [rax]
sub edx, 30h ; '0'
mov rcx, [rbp+var_20]
mov esi, 0Ah
call multadd
mov [rbp+var_28], rax
mov eax, [rbp+var_2C]
add eax, 1
mov [rbp+var_2C], eax
cmp eax, [rbp+var_C]
jl short loc_72D29
mov rax, [rbp+var_8]
add rax, 1
mov [rbp+var_8], rax
jmp short loc_72D7C
loc_72D70:
mov rax, [rbp+var_8]
add rax, 0Ah
mov [rbp+var_8], rax
loc_72D7C:
jmp short $+2
loc_72D7E:
mov eax, [rbp+var_2C]
cmp eax, [rbp+var_10]
jge short loc_72DBC
mov rdi, [rbp+var_28]
mov rax, [rbp+var_8]
mov rcx, rax
add rcx, 1
mov [rbp+var_8], rcx
movsx edx, byte ptr [rax]
sub edx, 30h ; '0'
mov rcx, [rbp+var_20]
mov esi, 0Ah
call multadd
mov [rbp+var_28], rax
mov eax, [rbp+var_2C]
add eax, 1
mov [rbp+var_2C], eax
jmp short loc_72D7E
loc_72DBC:
mov rax, [rbp+var_28]
add rsp, 40h
pop rbp
retn
| long long s2b(long long a1, int a2, int a3, int a4, long long a5)
{
char *v5; // rax
char *v6; // rax
int i; // [rsp+8h] [rbp-38h]
unsigned int v9; // [rsp+10h] [rbp-30h]
int v10; // [rsp+14h] [rbp-2Ch]
long long v11; // [rsp+18h] [rbp-28h]
char *v15; // [rsp+38h] [rbp-8h]
char *v16; // [rsp+38h] [rbp-8h]
v9 = 0;
for ( i = 1; (a3 + 8) / 9 > i; i *= 2 )
++v9;
v11 = Balloc(v9, a5);
**(_DWORD **)v11 = a4;
*(_DWORD *)(v11 + 20) = 1;
v10 = 9;
if ( a2 <= 9 )
{
v16 = (char *)(a1 + 10);
}
else
{
v15 = (char *)(a1 + 9);
do
{
v5 = v15++;
v11 = multadd(v11, 10LL, (unsigned int)(*v5 - 48), a5);
++v10;
}
while ( v10 < a2 );
v16 = v15 + 1;
}
while ( v10 < a3 )
{
v6 = v16++;
v11 = multadd(v11, 10LL, (unsigned int)(*v6 - 48), a5);
++v10;
}
return v11;
}
| s2b:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],EDX
MOV dword ptr [RBP + -0x14],ECX
MOV qword ptr [RBP + -0x20],R8
MOV EAX,dword ptr [RBP + -0x10]
ADD EAX,0x8
MOV ECX,0x9
CDQ
IDIV ECX
MOV dword ptr [RBP + -0x34],EAX
MOV dword ptr [RBP + -0x30],0x0
MOV dword ptr [RBP + -0x38],0x1
LAB_00172cc8:
MOV EAX,dword ptr [RBP + -0x34]
CMP EAX,dword ptr [RBP + -0x38]
JLE 0x00172ce5
JMP 0x00172cd2
LAB_00172cd2:
MOV EAX,dword ptr [RBP + -0x38]
SHL EAX,0x1
MOV dword ptr [RBP + -0x38],EAX
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,0x1
MOV dword ptr [RBP + -0x30],EAX
JMP 0x00172cc8
LAB_00172ce5:
MOV EDI,dword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x00172dd0
MOV qword ptr [RBP + -0x28],RAX
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x14],0x1
MOV dword ptr [RBP + -0x2c],0x9
MOV EAX,0x9
CMP EAX,dword ptr [RBP + -0xc]
JGE 0x00172d70
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x9
MOV qword ptr [RBP + -0x8],RAX
LAB_00172d29:
MOV RDI,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x8],RCX
MOVSX EDX,byte ptr [RAX]
SUB EDX,0x30
MOV RCX,qword ptr [RBP + -0x20]
MOV ESI,0xa
CALL 0x00173a60
MOV qword ptr [RBP + -0x28],RAX
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,dword ptr [RBP + -0xc]
JL 0x00172d29
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x1
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00172d7c
LAB_00172d70:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0xa
MOV qword ptr [RBP + -0x8],RAX
LAB_00172d7c:
JMP 0x00172d7e
LAB_00172d7e:
MOV EAX,dword ptr [RBP + -0x2c]
CMP EAX,dword ptr [RBP + -0x10]
JGE 0x00172dbc
MOV RDI,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x8],RCX
MOVSX EDX,byte ptr [RAX]
SUB EDX,0x30
MOV RCX,qword ptr [RBP + -0x20]
MOV ESI,0xa
CALL 0x00173a60
MOV qword ptr [RBP + -0x28],RAX
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x00172d7e
LAB_00172dbc:
MOV RAX,qword ptr [RBP + -0x28]
ADD RSP,0x40
POP RBP
RET
|
int8 * s2b(long param_1,int param_2,int param_3,int4 param_4,int8 param_5)
{
char *pcVar1;
int local_40;
int local_38;
int local_34;
int8 *local_30;
char *local_10;
local_38 = 0;
for (local_40 = 1; local_40 < (param_3 + 8) / 9; local_40 = local_40 << 1) {
local_38 = local_38 + 1;
}
local_30 = (int8 *)Balloc(local_38,param_5,(long)(param_3 + 8) % 9 & 0xffffffff);
*(int4 *)*local_30 = param_4;
*(int4 *)((long)local_30 + 0x14) = 1;
local_34 = 9;
if (param_2 < 10) {
local_10 = (char *)(param_1 + 10);
}
else {
pcVar1 = (char *)(param_1 + 9);
do {
local_10 = pcVar1;
local_30 = (int8 *)multadd(local_30,10,*local_10 + -0x30,param_5);
local_34 = local_34 + 1;
pcVar1 = local_10 + 1;
} while (local_34 < param_2);
local_10 = local_10 + 2;
}
for (; local_34 < param_3; local_34 = local_34 + 1) {
local_30 = (int8 *)multadd(local_30,10,*local_10 + -0x30,param_5);
local_10 = local_10 + 1;
}
return local_30;
}
| |
29,841 | get_timer_raw_value(enum_timer_name) | eloqsql/storage/perfschema/pfs_timer.cc | ulonglong get_timer_raw_value(enum_timer_name timer_name)
{
switch (timer_name)
{
case TIMER_NAME_CYCLE:
return my_timer_cycles();
case TIMER_NAME_NANOSEC:
return my_timer_nanoseconds();
case TIMER_NAME_MICROSEC:
return my_timer_microseconds();
case TIMER_NAME_MILLISEC:
return my_timer_milliseconds();
case TIMER_NAME_TICK:
return my_timer_ticks();
default:
assert(false);
}
return 0;
} | O0 | cpp | get_timer_raw_value(enum_timer_name):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0x4, %eax
ja 0x34836
movq -0x18(%rbp), %rax
leaq 0x81f86(%rip), %rcx # 0xb677c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
callq 0x34720
movq %rax, -0x8(%rbp)
jmp 0x34840
callq 0x5fdd0
movq %rax, -0x8(%rbp)
jmp 0x34840
callq 0x5fe00
movq %rax, -0x8(%rbp)
jmp 0x34840
callq 0x5fe50
movq %rax, -0x8(%rbp)
jmp 0x34840
callq 0x5fe90
movq %rax, -0x8(%rbp)
jmp 0x34840
jmp 0x34838
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _Z19get_timer_raw_value15enum_timer_name:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_C], edi
mov eax, [rbp+var_C]
dec eax; switch 5 cases
mov ecx, eax
mov [rbp+var_18], rcx
sub eax, 4
ja short def_347FD; jumptable 00000000000347FD default case
mov rax, [rbp+var_18]
lea rcx, jpt_347FD
movsxd rax, ds:(jpt_347FD - 0B677Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_347FF:
call _ZL15my_timer_cyclesv; jumptable 00000000000347FD case 1
mov [rbp+var_8], rax
jmp short loc_34840
loc_3480A:
call my_timer_nanoseconds; jumptable 00000000000347FD case 2
mov [rbp+var_8], rax
jmp short loc_34840
loc_34815:
call my_timer_microseconds; jumptable 00000000000347FD case 3
mov [rbp+var_8], rax
jmp short loc_34840
loc_34820:
call my_timer_milliseconds; jumptable 00000000000347FD case 4
mov [rbp+var_8], rax
jmp short loc_34840
loc_3482B:
call my_timer_ticks; jumptable 00000000000347FD case 5
mov [rbp+var_8], rax
jmp short loc_34840
def_347FD:
jmp short $+2; jumptable 00000000000347FD default case
loc_34838:
mov [rbp+var_8], 0
loc_34840:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
| unsigned long long get_timer_raw_value(int a1)
{
unsigned long long v2; // [rsp+18h] [rbp-8h]
switch ( a1 )
{
case 1:
v2 = my_timer_cycles();
break;
case 2:
v2 = my_timer_nanoseconds();
break;
case 3:
v2 = my_timer_microseconds();
break;
case 4:
v2 = my_timer_milliseconds();
break;
case 5:
v2 = my_timer_ticks();
break;
default:
v2 = 0LL;
break;
}
return v2;
}
| get_timer_raw_value:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0xc],EDI
MOV EAX,dword ptr [RBP + -0xc]
DEC EAX
MOV ECX,EAX
MOV qword ptr [RBP + -0x18],RCX
SUB EAX,0x4
JA 0x00134836
MOV RAX,qword ptr [RBP + -0x18]
LEA RCX,[0x1b677c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
CALL 0x00134720
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00134840
caseD_2:
CALL 0x0015fdd0
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00134840
caseD_3:
CALL 0x0015fe00
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00134840
caseD_4:
CALL 0x0015fe50
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00134840
caseD_5:
CALL 0x0015fe90
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00134840
default:
JMP 0x00134838
LAB_00134838:
MOV qword ptr [RBP + -0x8],0x0
LAB_00134840:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
/* get_timer_raw_value(enum_timer_name) */
int8 get_timer_raw_value(int4 param_1)
{
int8 local_10;
switch(param_1) {
case 1:
local_10 = my_timer_cycles();
break;
case 2:
local_10 = my_timer_nanoseconds();
break;
case 3:
local_10 = my_timer_microseconds();
break;
case 4:
local_10 = my_timer_milliseconds();
break;
case 5:
local_10 = my_timer_ticks();
break;
default:
local_10 = 0;
}
return local_10;
}
| |
29,842 | get_timer_raw_value(enum_timer_name) | eloqsql/storage/perfschema/pfs_timer.cc | ulonglong get_timer_raw_value(enum_timer_name timer_name)
{
switch (timer_name)
{
case TIMER_NAME_CYCLE:
return my_timer_cycles();
case TIMER_NAME_NANOSEC:
return my_timer_nanoseconds();
case TIMER_NAME_MICROSEC:
return my_timer_microseconds();
case TIMER_NAME_MILLISEC:
return my_timer_milliseconds();
case TIMER_NAME_TICK:
return my_timer_ticks();
default:
assert(false);
}
return 0;
} | O3 | cpp | get_timer_raw_value(enum_timer_name):
pushq %rbp
movq %rsp, %rbp
decl %edi
cmpl $0x4, %edi
ja 0x33edb
leaq 0x4f975(%rip), %rax # 0x83824
movslq (%rax,%rdi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
rdtsc
shlq $0x20, %rdx
orq %rdx, %rax
jmp 0x33edd
popq %rbp
jmp 0x49349
popq %rbp
jmp 0x492cd
popq %rbp
jmp 0x49309
popq %rbp
jmp 0x492a4
xorl %eax, %eax
popq %rbp
retq
| _Z19get_timer_raw_value15enum_timer_name:
push rbp
mov rbp, rsp
dec edi; switch 5 cases
cmp edi, 4
ja short def_33EB6; jumptable 0000000000033EB6 default case
lea rax, jpt_33EB6
movsxd rcx, ds:(jpt_33EB6 - 83824h)[rax+rdi*4]
add rcx, rax
jmp rcx; switch jump
loc_33EB8:
rdtsc; jumptable 0000000000033EB6 case 1
shl rdx, 20h
or rax, rdx
jmp short loc_33EDD
loc_33EC3:
pop rbp; jumptable 0000000000033EB6 case 5
jmp my_timer_ticks
loc_33EC9:
pop rbp; jumptable 0000000000033EB6 case 3
jmp my_timer_microseconds
loc_33ECF:
pop rbp; jumptable 0000000000033EB6 case 4
jmp my_timer_milliseconds
loc_33ED5:
pop rbp; jumptable 0000000000033EB6 case 2
jmp my_timer_nanoseconds
def_33EB6:
xor eax, eax; jumptable 0000000000033EB6 default case
loc_33EDD:
pop rbp
retn
| long long get_timer_raw_value(int a1)
{
long long result; // rax
switch ( a1 )
{
case 1:
result = __rdtsc();
break;
case 2:
result = my_timer_nanoseconds();
break;
case 3:
result = my_timer_microseconds();
break;
case 4:
result = my_timer_milliseconds();
break;
case 5:
result = my_timer_ticks();
break;
default:
result = 0LL;
break;
}
return result;
}
| get_timer_raw_value:
PUSH RBP
MOV RBP,RSP
DEC EDI
CMP EDI,0x4
JA 0x00133edb
LEA RAX,[0x183824]
MOVSXD RCX,dword ptr [RAX + RDI*0x4]
ADD RCX,RAX
switchD:
JMP RCX
caseD_1:
RDTSC
SHL RDX,0x20
OR RAX,RDX
JMP 0x00133edd
caseD_5:
POP RBP
JMP 0x00149349
caseD_3:
POP RBP
JMP 0x001492cd
caseD_4:
POP RBP
JMP 0x00149309
caseD_2:
POP RBP
JMP 0x001492a4
default:
XOR EAX,EAX
LAB_00133edd:
POP RBP
RET
|
/* get_timer_raw_value(enum_timer_name) */
int8 get_timer_raw_value(int4 param_1)
{
int8 uVar1;
switch(param_1) {
case 1:
uVar1 = rdtsc();
break;
case 2:
uVar1 = my_timer_nanoseconds();
return uVar1;
case 3:
uVar1 = my_timer_microseconds();
return uVar1;
case 4:
uVar1 = my_timer_milliseconds();
return uVar1;
case 5:
uVar1 = my_timer_ticks();
return uVar1;
default:
uVar1 = 0;
}
return uVar1;
}
| |
29,843 | aria_get_capabilities | eloqsql/storage/maria/ma_backup.c | int aria_get_capabilities(File kfile, ARIA_TABLE_CAPABILITIES *cap)
{
MARIA_SHARE share;
int error= 0;
uint head_length= sizeof(share.state.header), base_pos;
uint aligned_bit_blocks;
size_t info_length;
uchar *disc_cache;
DBUG_ENTER("aria_get_capabilities");
bzero(cap, sizeof(*cap));
if (my_pread(kfile,share.state.header.file_version, head_length, 0,
MYF(MY_NABP)))
DBUG_RETURN(HA_ERR_NOT_A_TABLE);
if (memcmp(share.state.header.file_version, maria_file_magic, 4))
DBUG_RETURN(HA_ERR_NOT_A_TABLE);
share.options= mi_uint2korr(share.state.header.options);
info_length= mi_uint2korr(share.state.header.header_length);
base_pos= mi_uint2korr(share.state.header.base_pos);
/*
Allocate space for header information and for data that is too
big to keep on stack
*/
if (!(disc_cache= my_malloc(PSI_NOT_INSTRUMENTED, info_length, MYF(MY_WME))))
DBUG_RETURN(ENOMEM);
if (my_pread(kfile, disc_cache, info_length, 0L, MYF(MY_NABP)))
{
error= my_errno;
goto err;
}
_ma_base_info_read(disc_cache + base_pos, &share.base);
cap->transactional= share.base.born_transactional;
cap->checksum= MY_TEST(share.options & HA_OPTION_PAGE_CHECKSUM);
cap->online_backup_safe= cap->transactional && cap->checksum;
cap->header_size= share.base.keystart;
cap->keypage_header= ((share.base.born_transactional ?
LSN_STORE_SIZE + TRANSID_SIZE :
0) + KEYPAGE_KEYID_SIZE + KEYPAGE_FLAG_SIZE +
KEYPAGE_USED_SIZE);
cap->block_size= share.base.block_size;
cap->data_file_type= share.state.header.data_file_type;
cap->s3_block_size= share.base.s3_block_size;
cap->compression= share.base.compression_algorithm;
cap->encrypted= MY_TEST(share.base.extra_options &
MA_EXTRA_OPTIONS_ENCRYPTED);
if (share.state.header.data_file_type == BLOCK_RECORD)
{
/* Calulate how man pages the row bitmap covers. From _ma_bitmap_init() */
aligned_bit_blocks= (cap->block_size - PAGE_SUFFIX_SIZE) / 6;
/*
In each 6 bytes, we have 6*8/3 = 16 pages covered
The +1 is to add the bitmap page, as this doesn't have to be covered
*/
cap->bitmap_pages_covered= aligned_bit_blocks * 16 + 1;
}
/* Do a check that that we got things right */
if (share.state.header.data_file_type != BLOCK_RECORD &&
cap->online_backup_safe)
error= HA_ERR_NOT_A_TABLE;
err:
my_free(disc_cache);
DBUG_RETURN(error);
} | O3 | c | aria_get_capabilities:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc48, %rsp # imm = 0xC48
movq %rsi, %rbx
movl %edi, %r15d
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rsi)
movups %xmm0, 0x10(%rsi)
movups %xmm0, (%rsi)
leaq -0xc68(%rbp), %rsi
movl $0x18, %edx
movl $0x4, %r8d
xorl %ecx, %ecx
callq 0xa07d0
movl $0x82, %r12d
testq %rax, %rax
jne 0x710cb
movl -0xc68(%rbp), %eax
leaq 0x3130d6(%rip), %rcx # 0x384050
cmpl (%rcx), %eax
jne 0x710cb
movzwl -0xc64(%rbp), %eax
movzwl -0xc62(%rbp), %ecx
rolw $0x8, %ax
movzwl %ax, %eax
movq %rax, -0x548(%rbp)
rolw $0x8, %cx
movzwl %cx, %r12d
movzwl -0xc5c(%rbp), %r13d
movl $0x10, %edx
xorl %edi, %edi
movq %r12, %rsi
callq 0x9ff21
testq %rax, %rax
je 0x70fed
movq %rax, %r14
movl $0x4, %r8d
movl %r15d, %edi
movq %rax, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0xa07d0
testq %rax, %rax
je 0x70ff8
callq 0xa1c92
movl (%rax), %r12d
jmp 0x710c3
movl $0xc, %r12d
jmp 0x710cb
rolw $0x8, %r13w
movzwl %r13w, %eax
movq %r14, %rdi
addq %rax, %rdi
leaq -0x908(%rbp), %r15
movq %r15, %rsi
callq 0x710f4
movb 0xec(%r15), %al
movb %al, 0x1d(%rbx)
movl 0x3c0(%r15), %ecx
shrl $0xb, %ecx
andb $0x1, %cl
movb %cl, 0x1c(%rbx)
testb %al, %al
movzbl %cl, %eax
movl $0x0, %ecx
cmovel %ecx, %eax
movb %al, 0x1f(%rbx)
movq (%r15), %rcx
movq %rcx, (%rbx)
movl $0x4, %ecx
movl $0x11, %edx
cmovel %ecx, %edx
movl %edx, 0x14(%rbx)
movl 0xbc(%r15), %ecx
movl %ecx, 0x10(%rbx)
movzbl -0x34a(%r15), %edx
movl %edx, 0x18(%rbx)
movq 0x60(%r15), %rsi
movq %rsi, 0x20(%rbx)
movb 0xd0(%r15), %sil
movb %sil, 0x28(%rbx)
movb 0xc8(%r15), %sil
andb $0x1, %sil
movb %sil, 0x1e(%rbx)
cmpl $0x3, %edx
jne 0x710b5
addl $-0x4, %ecx
movl $0xaaaaaaab, %eax # imm = 0xAAAAAAAB
imulq %rcx, %rax
shrq $0x20, %rax
andl $-0x4, %eax
leal 0x1(,%rax,4), %eax
movq %rax, 0x8(%rbx)
xorl %r12d, %r12d
jmp 0x710c3
xorl %ecx, %ecx
testb %al, %al
movl $0x82, %r12d
cmovel %ecx, %r12d
movq %r14, %rdi
callq 0xa014e
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x710ef
movl %r12d, %eax
addq $0xc48, %rsp # imm = 0xC48
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29260
| aria_get_capabilities:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0C48h
mov rbx, rsi
mov r15d, edi
mov rax, fs:28h
mov [rbp+var_30], rax
xorps xmm0, xmm0
movups xmmword ptr [rsi+20h], xmm0
movups xmmword ptr [rsi+10h], xmm0
movups xmmword ptr [rsi], xmm0
lea rsi, [rbp+var_C68]
mov edx, 18h
mov r8d, 4
xor ecx, ecx
call my_pread
mov r12d, 82h
test rax, rax
jnz loc_710CB
mov eax, [rbp+var_C68]
lea rcx, maria_file_magic
cmp eax, [rcx]
jnz loc_710CB
movzx eax, [rbp+var_C64]
movzx ecx, [rbp+var_C62]
rol ax, 8
movzx eax, ax
mov [rbp+var_548], rax
rol cx, 8
movzx r12d, cx
movzx r13d, [rbp+var_C5C]
mov edx, 10h
xor edi, edi
mov rsi, r12
call my_malloc
test rax, rax
jz short loc_70FED
mov r14, rax
mov r8d, 4
mov edi, r15d
mov rsi, rax
mov rdx, r12
xor ecx, ecx
call my_pread
test rax, rax
jz short loc_70FF8
call _my_thread_var
mov r12d, [rax]
jmp loc_710C3
loc_70FED:
mov r12d, 0Ch
jmp loc_710CB
loc_70FF8:
rol r13w, 8
movzx eax, r13w
mov rdi, r14
add rdi, rax
lea r15, [rbp+var_908]
mov rsi, r15
call _ma_base_info_read
mov al, [r15+0ECh]
mov [rbx+1Dh], al
mov ecx, [r15+3C0h]
shr ecx, 0Bh
and cl, 1
mov [rbx+1Ch], cl
test al, al
movzx eax, cl
mov ecx, 0
cmovz eax, ecx
mov [rbx+1Fh], al
mov rcx, [r15]
mov [rbx], rcx
mov ecx, 4
mov edx, 11h
cmovz edx, ecx
mov [rbx+14h], edx
mov ecx, [r15+0BCh]
mov [rbx+10h], ecx
movzx edx, byte ptr [r15-34Ah]
mov [rbx+18h], edx
mov rsi, [r15+60h]
mov [rbx+20h], rsi
mov sil, [r15+0D0h]
mov [rbx+28h], sil
mov sil, [r15+0C8h]
and sil, 1
mov [rbx+1Eh], sil
cmp edx, 3
jnz short loc_710B5
add ecx, 0FFFFFFFCh
mov eax, 0AAAAAAABh
imul rax, rcx
shr rax, 20h
and eax, 0FFFFFFFCh
lea eax, ds:1[rax*4]
mov [rbx+8], rax
xor r12d, r12d
jmp short loc_710C3
loc_710B5:
xor ecx, ecx
test al, al
mov r12d, 82h
cmovz r12d, ecx
loc_710C3:
mov rdi, r14
call my_free
loc_710CB:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_710EF
mov eax, r12d
add rsp, 0C48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_710EF:
call ___stack_chk_fail
| long long aria_get_capabilities(long long a1, long long a2)
{
unsigned int v2; // r12d
long long v3; // r12
__int16 v4; // r13
long long v5; // rax
long long v6; // r14
char v7; // al
bool v8; // cl
bool v9; // zf
bool v10; // al
int v11; // edx
int v12; // ecx
int v13; // edx
int v15; // [rsp+8h] [rbp-C68h] BYREF
__int16 v16; // [rsp+Ch] [rbp-C64h]
__int16 v17; // [rsp+Eh] [rbp-C62h]
__int16 v18; // [rsp+14h] [rbp-C5Ch]
unsigned __int8 v19; // [rsp+1Eh] [rbp-C52h]
_QWORD v20[23]; // [rsp+368h] [rbp-908h] BYREF
int v21; // [rsp+424h] [rbp-84Ch]
char v22; // [rsp+430h] [rbp-840h]
char v23; // [rsp+438h] [rbp-838h]
char v24; // [rsp+454h] [rbp-81Ch]
long long v25; // [rsp+728h] [rbp-548h]
unsigned long long v26; // [rsp+C40h] [rbp-30h]
v26 = __readfsqword(0x28u);
*(_OWORD *)(a2 + 32) = 0LL;
*(_OWORD *)(a2 + 16) = 0LL;
*(_OWORD *)a2 = 0LL;
v2 = 130;
if ( !my_pread(a1, &v15, 24LL, 0LL, 4LL) && v15 == maria_file_magic )
{
v25 = (unsigned __int16)__ROL2__(v16, 8);
v3 = (unsigned __int16)__ROL2__(v17, 8);
v4 = v18;
v5 = my_malloc(0LL, v3, 16LL);
if ( v5 )
{
v6 = v5;
if ( my_pread((unsigned int)a1, v5, v3, 0LL, 4LL) )
{
v2 = *(_DWORD *)my_thread_var((unsigned int)a1);
}
else
{
ma_base_info_read((unsigned __int16)__ROL2__(v4, 8) + v6, v20);
v7 = v24;
*(_BYTE *)(a2 + 29) = v24;
v8 = (v25 & 0x800) != 0;
*(_BYTE *)(a2 + 28) = v8;
v9 = v7 == 0;
v10 = v8;
if ( v9 )
v10 = 0;
*(_BYTE *)(a2 + 31) = v10;
*(_QWORD *)a2 = v20[0];
v11 = 17;
if ( v9 )
v11 = 4;
*(_DWORD *)(a2 + 20) = v11;
v12 = v21;
*(_DWORD *)(a2 + 16) = v21;
v13 = v19;
*(_DWORD *)(a2 + 24) = v19;
*(_QWORD *)(a2 + 32) = v20[12];
*(_BYTE *)(a2 + 40) = v23;
*(_BYTE *)(a2 + 30) = v22 & 1;
if ( v13 == 3 )
{
*(_QWORD *)(a2 + 8) = 4 * (((2863311531u * (unsigned long long)(unsigned int)(v12 - 4)) >> 32) & 0xFFFFFFFC) + 1;
v2 = 0;
}
else
{
v2 = 130;
if ( !v10 )
v2 = 0;
}
}
my_free(v6);
}
else
{
return 12;
}
}
return v2;
}
| aria_get_capabilities:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xc48
MOV RBX,RSI
MOV R15D,EDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSI + 0x20],XMM0
MOVUPS xmmword ptr [RSI + 0x10],XMM0
MOVUPS xmmword ptr [RSI],XMM0
LEA RSI,[RBP + -0xc68]
MOV EDX,0x18
MOV R8D,0x4
XOR ECX,ECX
CALL 0x001a07d0
MOV R12D,0x82
TEST RAX,RAX
JNZ 0x001710cb
MOV EAX,dword ptr [RBP + -0xc68]
LEA RCX,[0x484050]
CMP EAX,dword ptr [RCX]
JNZ 0x001710cb
MOVZX EAX,word ptr [RBP + -0xc64]
MOVZX ECX,word ptr [RBP + -0xc62]
ROL AX,0x8
MOVZX EAX,AX
MOV qword ptr [RBP + -0x548],RAX
ROL CX,0x8
MOVZX R12D,CX
MOVZX R13D,word ptr [RBP + -0xc5c]
MOV EDX,0x10
XOR EDI,EDI
MOV RSI,R12
CALL 0x0019ff21
TEST RAX,RAX
JZ 0x00170fed
MOV R14,RAX
MOV R8D,0x4
MOV EDI,R15D
MOV RSI,RAX
MOV RDX,R12
XOR ECX,ECX
CALL 0x001a07d0
TEST RAX,RAX
JZ 0x00170ff8
CALL 0x001a1c92
MOV R12D,dword ptr [RAX]
JMP 0x001710c3
LAB_00170fed:
MOV R12D,0xc
JMP 0x001710cb
LAB_00170ff8:
ROL R13W,0x8
MOVZX EAX,R13W
MOV RDI,R14
ADD RDI,RAX
LEA R15,[RBP + -0x908]
MOV RSI,R15
CALL 0x001710f4
MOV AL,byte ptr [R15 + 0xec]
MOV byte ptr [RBX + 0x1d],AL
MOV ECX,dword ptr [R15 + 0x3c0]
SHR ECX,0xb
AND CL,0x1
MOV byte ptr [RBX + 0x1c],CL
TEST AL,AL
MOVZX EAX,CL
MOV ECX,0x0
CMOVZ EAX,ECX
MOV byte ptr [RBX + 0x1f],AL
MOV RCX,qword ptr [R15]
MOV qword ptr [RBX],RCX
MOV ECX,0x4
MOV EDX,0x11
CMOVZ EDX,ECX
MOV dword ptr [RBX + 0x14],EDX
MOV ECX,dword ptr [R15 + 0xbc]
MOV dword ptr [RBX + 0x10],ECX
MOVZX EDX,byte ptr [R15 + -0x34a]
MOV dword ptr [RBX + 0x18],EDX
MOV RSI,qword ptr [R15 + 0x60]
MOV qword ptr [RBX + 0x20],RSI
MOV SIL,byte ptr [R15 + 0xd0]
MOV byte ptr [RBX + 0x28],SIL
MOV SIL,byte ptr [R15 + 0xc8]
AND SIL,0x1
MOV byte ptr [RBX + 0x1e],SIL
CMP EDX,0x3
JNZ 0x001710b5
ADD ECX,-0x4
MOV EAX,0xaaaaaaab
IMUL RAX,RCX
SHR RAX,0x20
AND EAX,0xfffffffc
LEA EAX,[0x1 + RAX*0x4]
MOV qword ptr [RBX + 0x8],RAX
XOR R12D,R12D
JMP 0x001710c3
LAB_001710b5:
XOR ECX,ECX
TEST AL,AL
MOV R12D,0x82
CMOVZ R12D,ECX
LAB_001710c3:
MOV RDI,R14
CALL 0x001a014e
LAB_001710cb:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001710ef
MOV EAX,R12D
ADD RSP,0xc48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001710ef:
CALL 0x00129260
|
int4 aria_get_capabilities(ulong param_1,int8 *param_2)
{
long lVar1;
long lVar2;
int4 *puVar3;
byte bVar4;
ushort uVar5;
int4 uVar6;
long in_FS_OFFSET;
int local_c70;
ushort local_c6c;
ushort local_c6a;
ushort local_c64;
byte local_c5a;
int8 local_910 [12];
int8 local_8b0;
int local_854;
byte local_848;
int1 local_840;
char local_824;
ulong local_550;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
param_2[4] = 0;
param_2[5] = 0;
param_2[2] = 0;
param_2[3] = 0;
*param_2 = 0;
param_2[1] = 0;
lVar1 = my_pread(param_1,&local_c70,0x18,0,4);
uVar6 = 0x82;
if ((lVar1 == 0) && (local_c70 == maria_file_magic)) {
local_550 = (ulong)(ushort)(local_c6c << 8 | local_c6c >> 8);
uVar5 = local_c6a << 8 | local_c6a >> 8;
lVar1 = my_malloc(0,uVar5,0x10);
if (lVar1 == 0) {
uVar6 = 0xc;
}
else {
lVar2 = my_pread(param_1 & 0xffffffff,lVar1,uVar5,0,4);
if (lVar2 == 0) {
_ma_base_info_read(lVar1 + (ulong)(ushort)(local_c64 << 8 | local_c64 >> 8),local_910);
*(char *)((long)param_2 + 0x1d) = local_824;
bVar4 = (byte)((uint)local_550 >> 0xb) & 1;
*(byte *)((long)param_2 + 0x1c) = bVar4;
if (local_824 == '\0') {
bVar4 = 0;
}
*(byte *)((long)param_2 + 0x1f) = bVar4;
*param_2 = local_910[0];
uVar6 = 0x11;
if (local_824 == '\0') {
uVar6 = 4;
}
*(int4 *)((long)param_2 + 0x14) = uVar6;
*(int *)(param_2 + 2) = local_854;
*(uint *)(param_2 + 3) = (uint)local_c5a;
param_2[4] = local_8b0;
*(int1 *)(param_2 + 5) = local_840;
*(byte *)((long)param_2 + 0x1e) = local_848 & 1;
if (local_c5a == 3) {
param_2[1] = (ulong)(((uint)((ulong)(local_854 - 4) * 0xaaaaaaab >> 0x20) & 0xfffffffc) *
4 + 1);
uVar6 = 0;
}
else {
uVar6 = 0x82;
if (bVar4 == 0) {
uVar6 = 0;
}
}
}
else {
puVar3 = (int4 *)_my_thread_var();
uVar6 = *puVar3;
}
my_free(lVar1);
}
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return uVar6;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
29,844 | my_numchars_mb | eloqsql/strings/ctype-mb.c | size_t my_numchars_mb(CHARSET_INFO *cs __attribute__((unused)),
const char *pos, const char *end)
{
register size_t count= 0;
while (pos < end)
{
uint mb_len;
pos+= (mb_len= my_ismbchar(cs,pos,end)) ? mb_len : 1;
count++;
}
return count;
} | O3 | c | my_numchars_mb:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpq %rdx, %rsi
jae 0xb4b91
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
xorl %r14d, %r14d
movl $0x1, %r13d
movq 0xb8(%r12), %rax
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq *0xc0(%rax)
cmpl $0x2, %eax
cmovbl %r13d, %eax
cmovll %r13d, %eax
addq %rax, %r15
incq %r14
cmpq %rbx, %r15
jb 0xb4b62
jmp 0xb4b94
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_numchars_mb:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
cmp rsi, rdx
jnb short loc_B4B91
mov rbx, rdx
mov r15, rsi
mov r12, rdi
xor r14d, r14d
mov r13d, 1
loc_B4B62:
mov rax, [r12+0B8h]
mov rdi, r12
mov rsi, r15
mov rdx, rbx
call qword ptr [rax+0C0h]
cmp eax, 2
cmovb eax, r13d
cmovl eax, r13d
add r15, rax
inc r14
cmp r15, rbx
jb short loc_B4B62
jmp short loc_B4B94
loc_B4B91:
xor r14d, r14d
loc_B4B94:
mov rax, r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_numchars_mb(long long a1, unsigned long long a2, unsigned long long a3)
{
unsigned long long v4; // r15
long long v5; // r14
long long v6; // rax
bool v7; // cc
if ( a2 >= a3 )
return 0LL;
v4 = a2;
v5 = 0LL;
do
{
v6 = (*(long long ( **)(long long, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
v4,
a3);
v7 = (int)v6 < 2;
if ( (unsigned int)v6 < 2 )
v6 = 1LL;
if ( v7 )
v6 = 1LL;
v4 += v6;
++v5;
}
while ( v4 < a3 );
return v5;
}
| my_numchars_mb:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
CMP RSI,RDX
JNC 0x001b4b91
MOV RBX,RDX
MOV R15,RSI
MOV R12,RDI
XOR R14D,R14D
MOV R13D,0x1
LAB_001b4b62:
MOV RAX,qword ptr [R12 + 0xb8]
MOV RDI,R12
MOV RSI,R15
MOV RDX,RBX
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x2
CMOVC EAX,R13D
CMOVL EAX,R13D
ADD R15,RAX
INC R14
CMP R15,RBX
JC 0x001b4b62
JMP 0x001b4b94
LAB_001b4b91:
XOR R14D,R14D
LAB_001b4b94:
MOV RAX,R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_numchars_mb(long param_1,ulong param_2,ulong param_3)
{
uint uVar1;
ulong uVar2;
long lVar3;
if (param_2 < param_3) {
lVar3 = 0;
do {
uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3);
uVar2 = (ulong)uVar1;
if (uVar1 < 2) {
uVar2 = 1;
}
if ((int)uVar1 < 2) {
uVar2 = 1;
}
param_2 = param_2 + uVar2;
lVar3 = lVar3 + 1;
} while (param_2 < param_3);
}
else {
lVar3 = 0;
}
return lVar3;
}
| |
29,845 | mp_print_str | bluesky950520[P]quickjs/libbf.c | void mp_print_str(const char *str, const limb_t *tab, limb_t n)
{
slimb_t i;
printf("%s= 0x", str);
for(i = n - 1; i >= 0; i--) {
if (i != (n - 1))
printf("_");
printf(FMT_LIMB, tab[i]);
}
printf("\n");
} | O1 | c | mp_print_str:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %rsi
leaq 0x1de3a(%rip), %rdi # 0xa3130
xorl %eax, %eax
callq 0xe280
movq %rbx, %rax
decq %rax
js 0x85344
leaq (%r14,%rbx,8), %r15
addq $-0x8, %r15
leaq 0x1de23(%rip), %r14 # 0xa3137
xorl %r13d, %r13d
xorl %r12d, %r12d
subq $0x1, %r12
jb 0x8532a
movl $0x5f, %edi
callq 0xe080
movq (%r15,%r13,8), %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0xe280
leaq (%rbx,%r12), %rax
movq %r12, %r13
testq %rax, %rax
jg 0x8531a
movl $0xa, %edi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xe080
| mp_print_str:
push r15
push r14
push r13
push r12
push rbx
mov rbx, rdx
mov r14, rsi
mov rsi, rdi
lea rdi, aS0x; "%s= 0x"
xor eax, eax
call _printf
mov rax, rbx
dec rax
js short loc_85344
lea r15, [r14+rbx*8]
add r15, 0FFFFFFFFFFFFFFF8h
lea r14, a016lx; "%016lx"
xor r13d, r13d
xor r12d, r12d
loc_8531A:
sub r12, 1
jb short loc_8532A
mov edi, 5Fh ; '_'
call _putchar
loc_8532A:
mov rsi, [r15+r13*8]
mov rdi, r14
xor eax, eax
call _printf
lea rax, [rbx+r12]
mov r13, r12
test rax, rax
jg short loc_8531A
loc_85344:
mov edi, 0Ah
pop rbx
pop r12
pop r13
pop r14
pop r15
jmp _putchar
| long long mp_print_str(const char *a1, long long a2, long long a3)
{
long long v4; // r13
long long v5; // r12
printf("%s= 0x", a1);
if ( a3 - 1 >= 0 )
{
v4 = 0LL;
v5 = 0LL;
do
{
if ( v5-- != 0 )
putchar(95LL);
printf("%016lx", *(_QWORD *)(a2 + 8 * a3 - 8 + 8 * v4));
v4 = v5;
}
while ( a3 + v5 > 0 );
}
return putchar(10LL);
}
| mp_print_str:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,RDX
MOV R14,RSI
MOV RSI,RDI
LEA RDI,[0x1a3130]
XOR EAX,EAX
CALL 0x0010e280
MOV RAX,RBX
DEC RAX
JS 0x00185344
LEA R15,[R14 + RBX*0x8]
ADD R15,-0x8
LEA R14,[0x1a3137]
XOR R13D,R13D
XOR R12D,R12D
LAB_0018531a:
SUB R12,0x1
JC 0x0018532a
MOV EDI,0x5f
CALL 0x0010e080
LAB_0018532a:
MOV RSI,qword ptr [R15 + R13*0x8]
MOV RDI,R14
XOR EAX,EAX
CALL 0x0010e280
LEA RAX,[RBX + R12*0x1]
MOV R13,R12
TEST RAX,RAX
JG 0x0018531a
LAB_00185344:
MOV EDI,0xa
POP RBX
POP R12
POP R13
POP R14
POP R15
JMP 0x0010e080
|
void mp_print_str(int8 param_1,long param_2,long param_3)
{
long lVar1;
long lVar2;
printf("%s= 0x",param_1);
if (-1 < param_3 + -1) {
lVar2 = 0;
do {
lVar1 = lVar2 + -1;
if (lVar2 != 0) {
putchar(0x5f);
}
printf("%016lx",*(int8 *)(param_2 + param_3 * 8 + -8 + lVar2 * 8));
lVar2 = lVar1;
} while (0 < param_3 + lVar1);
}
putchar(10);
return;
}
| |
29,846 | mp_print_str | bluesky950520[P]quickjs/libbf.c | void mp_print_str(const char *str, const limb_t *tab, limb_t n)
{
slimb_t i;
printf("%s= 0x", str);
for(i = n - 1; i >= 0; i--) {
if (i != (n - 1))
printf("_");
printf(FMT_LIMB, tab[i]);
}
printf("\n");
} | O2 | c | mp_print_str:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %rsi
leaq 0x1a436(%rip), %rdi # 0x8a070
xorl %eax, %eax
callq 0xe290
leaq (%r14,%rbx,8), %r15
addq $-0x8, %r15
decq %rbx
leaq 0x1a424(%rip), %r14 # 0x8a077
pushq $0x5f
popq %rbp
xorl %r12d, %r12d
movq %rbx, %rax
addq %r12, %rax
js 0x6fc84
movq %r12, %r13
subq $0x1, %r13
jb 0x6fc71
movl %ebp, %edi
callq 0xe080
movq (%r15,%r12,8), %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0xe290
movq %r13, %r12
jmp 0x6fc59
pushq $0xa
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe080
| mp_print_str:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdx
mov r14, rsi
mov rsi, rdi
lea rdi, aS0x; "%s= 0x"
xor eax, eax
call _printf
lea r15, [r14+rbx*8]
add r15, 0FFFFFFFFFFFFFFF8h
dec rbx
lea r14, a016lx; "%016lx"
push 5Fh ; '_'
pop rbp
xor r12d, r12d
loc_6FC59:
mov rax, rbx
add rax, r12
js short loc_6FC84
mov r13, r12
sub r13, 1
jb short loc_6FC71
mov edi, ebp
call _putchar
loc_6FC71:
mov rsi, [r15+r12*8]
mov rdi, r14
xor eax, eax
call _printf
mov r12, r13
jmp short loc_6FC59
loc_6FC84:
push 0Ah
pop rdi
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _putchar
| long long mp_print_str(const char *a1, long long a2, long long a3)
{
long long v4; // r15
long long v5; // rbx
long long i; // r12
printf("%s= 0x", a1);
v4 = a2 + 8 * a3 - 8;
v5 = a3 - 1;
for ( i = 0LL; i + v5 >= 0; --i )
{
if ( i )
putchar(95LL);
printf("%016lx", *(_QWORD *)(v4 + 8 * i));
}
return putchar(10LL);
}
| mp_print_str:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RSI
MOV RSI,RDI
LEA RDI,[0x18a070]
XOR EAX,EAX
CALL 0x0010e290
LEA R15,[R14 + RBX*0x8]
ADD R15,-0x8
DEC RBX
LEA R14,[0x18a077]
PUSH 0x5f
POP RBP
XOR R12D,R12D
LAB_0016fc59:
MOV RAX,RBX
ADD RAX,R12
JS 0x0016fc84
MOV R13,R12
SUB R13,0x1
JC 0x0016fc71
MOV EDI,EBP
CALL 0x0010e080
LAB_0016fc71:
MOV RSI,qword ptr [R15 + R12*0x8]
MOV RDI,R14
XOR EAX,EAX
CALL 0x0010e290
MOV R12,R13
JMP 0x0016fc59
LAB_0016fc84:
PUSH 0xa
POP RDI
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0010e080
|
void mp_print_str(int8 param_1,long param_2,long param_3)
{
long lVar1;
printf("%s= 0x",param_1);
lVar1 = 0;
while (-1 < param_3 + -1 + lVar1) {
if (lVar1 != 0) {
putchar(0x5f);
}
printf("%016lx",*(int8 *)(param_2 + param_3 * 8 + -8 + lVar1 * 8));
lVar1 = lVar1 + -1;
}
putchar(10);
return;
}
| |
29,847 | vemit_tap | eloqsql/unittest/mytap/tap.c | static void
vemit_tap(int pass, char const *fmt, va_list ap)
{
fprintf(tapout, "%sok %d%s",
pass ? "" : "not ",
++g_test.last,
(fmt && *fmt) ? " - " : "");
if (fmt && *fmt)
vfprintf(tapout, fmt, ap);
fflush(tapout);
} | O0 | c | vemit_tap:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq 0x1b230e(%rip), %rax # 0x1d8fb8
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movl -0x4(%rbp), %edx
leaq 0x5b9c9(%rip), %rax # 0x82684
leaq 0x600d1(%rip), %rcx # 0x86d93
cmpl $0x0, %edx
cmovneq %rcx, %rax
movq %rax, -0x28(%rbp)
movl 0x36a691(%rip), %eax # 0x391364
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movl %eax, 0x36a685(%rip) # 0x391364
xorl %eax, %eax
cmpq $0x0, -0x10(%rbp)
movb %al, -0x19(%rbp)
je 0x26cfb
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x19(%rbp)
movl -0x20(%rbp), %ecx
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rdi
movb -0x19(%rbp), %sil
leaq 0x60082(%rip), %r8 # 0x86d93
leaq 0x5b971(%rip), %rax # 0x82689
testb $0x1, %sil
cmovneq %rax, %r8
leaq 0x5b953(%rip), %rsi # 0x8267a
movb $0x0, %al
callq 0x25470
cmpq $0x0, -0x10(%rbp)
je 0x26d58
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x26d58
movq 0x1b2270(%rip), %rax # 0x1d8fb8
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x25430
movq 0x1b2259(%rip), %rax # 0x1d8fb8
movq (%rax), %rdi
callq 0x25380
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| vemit_tap:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, cs:stdout_ptr
mov rax, [rax]
mov [rbp+var_30], rax
mov edx, [rbp+var_4]
lea rax, aNot; "not "
lea rcx, asc_86D8F+4; ""
cmp edx, 0
cmovnz rax, rcx
mov [rbp+var_28], rax
mov eax, cs:dword_391364
add eax, 1
mov [rbp+var_20], eax
mov cs:dword_391364, eax
xor eax, eax
cmp [rbp+var_10], 0
mov [rbp+var_19], al
jz short loc_26CFB
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 0
setnz al
mov [rbp+var_19], al
loc_26CFB:
mov ecx, [rbp+var_20]
mov rdx, [rbp+var_28]
mov rdi, [rbp+var_30]
mov sil, [rbp+var_19]
lea r8, asc_86D8F+4; ""
lea rax, asc_82689; " - "
test sil, 1
cmovnz r8, rax
lea rsi, aSokDS; "%sok %d%s"
mov al, 0
call _fprintf
cmp [rbp+var_10], 0
jz short loc_26D58
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 0
jz short loc_26D58
mov rax, cs:stdout_ptr
mov rdi, [rax]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call _vfprintf
loc_26D58:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
add rsp, 30h
pop rbp
retn
| long long vemit_tap(int a1, _BYTE *a2, long long a3)
{
const char *v3; // rax
const char *v4; // r8
int v6; // [rsp+10h] [rbp-20h]
bool v7; // [rsp+17h] [rbp-19h]
v3 = "not ";
if ( a1 )
v3 = "";
v6 = ++dword_391364;
v7 = 0;
if ( a2 )
v7 = *a2 != 0;
v4 = "";
if ( v7 )
v4 = " - ";
fprintf(stdout, "%sok %d%s", v3, v6, v4);
if ( a2 && *a2 )
vfprintf(stdout, a2, a3);
return fflush(stdout);
}
| vemit_tap:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [0x002d8fb8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
MOV EDX,dword ptr [RBP + -0x4]
LEA RAX,[0x182684]
LEA RCX,[0x186d93]
CMP EDX,0x0
CMOVNZ RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV EAX,dword ptr [0x00491364]
ADD EAX,0x1
MOV dword ptr [RBP + -0x20],EAX
MOV dword ptr [0x00491364],EAX
XOR EAX,EAX
CMP qword ptr [RBP + -0x10],0x0
MOV byte ptr [RBP + -0x19],AL
JZ 0x00126cfb
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x19],AL
LAB_00126cfb:
MOV ECX,dword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RBP + -0x30]
MOV SIL,byte ptr [RBP + -0x19]
LEA R8,[0x186d93]
LEA RAX,[0x182689]
TEST SIL,0x1
CMOVNZ R8,RAX
LEA RSI,[0x18267a]
MOV AL,0x0
CALL 0x00125470
CMP qword ptr [RBP + -0x10],0x0
JZ 0x00126d58
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x00126d58
MOV RAX,qword ptr [0x002d8fb8]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x00125430
LAB_00126d58:
MOV RAX,qword ptr [0x002d8fb8]
MOV RDI,qword ptr [RAX]
CALL 0x00125380
ADD RSP,0x30
POP RBP
RET
|
void vemit_tap(int param_1,char *param_2,__gnuc_va_list param_3)
{
int *puVar1;
int *puVar2;
bool bVar3;
puVar1 = &DAT_00182684;
if (param_1 != 0) {
puVar1 = &DAT_00186d93;
}
DAT_00491364 = DAT_00491364 + 1;
bVar3 = false;
if (param_2 != (char *)0x0) {
bVar3 = *param_2 != '\0';
}
puVar2 = &DAT_00186d93;
if (bVar3) {
puVar2 = &DAT_00182689;
}
fprintf(*(FILE **)PTR_stdout_002d8fb8,"%sok %d%s",puVar1,(ulong)DAT_00491364,puVar2);
if ((param_2 != (char *)0x0) && (*param_2 != '\0')) {
vfprintf(*(FILE **)PTR_stdout_002d8fb8,param_2,param_3);
}
fflush(*(FILE **)PTR_stdout_002d8fb8);
return;
}
| |
29,848 | ma_init_block_record | eloqsql/storage/maria/ma_blockrec.c | my_bool _ma_init_block_record(MARIA_HA *info)
{
MARIA_ROW *row= &info->cur_row, *new_row= &info->new_row;
MARIA_SHARE *share= info->s;
myf flag= MY_WME | (share->temporary ? MY_THREAD_SPECIFIC : 0);
uint default_extents;
DBUG_ENTER("_ma_init_block_record");
if (!my_multi_malloc(PSI_INSTRUMENT_ME, flag,
&row->empty_bits, share->base.pack_bytes,
&row->field_lengths,
share->base.max_field_lengths + 2,
&row->blob_lengths, sizeof(ulong) * share->base.blobs,
&row->null_field_lengths, (sizeof(uint) *
(share->base.fields -
share->base.blobs +
EXTRA_LENGTH_FIELDS)),
&row->tail_positions, (sizeof(MARIA_RECORD_POS) *
(share->base.blobs + 2)),
&new_row->empty_bits, share->base.pack_bytes,
&new_row->field_lengths,
share->base.max_field_lengths + 2,
&new_row->blob_lengths,
sizeof(ulong) * share->base.blobs,
&new_row->null_field_lengths, (sizeof(uint) *
(share->base.fields -
share->base.blobs +
EXTRA_LENGTH_FIELDS)),
&info->log_row_parts,
sizeof(*info->log_row_parts) *
(TRANSLOG_INTERNAL_PARTS + 3 +
share->base.fields + 3),
&info->update_field_data,
(share->base.fields * 4 +
share->base.max_field_lengths + 1 + 4),
NullS, 0))
DBUG_RETURN(1);
/* Skip over bytes used to store length of field length for logging */
row->field_lengths+= 2;
new_row->field_lengths+= 2;
/* Reserve some initial space to avoid mallocs during execution */
default_extents= (ELEMENTS_RESERVED_FOR_MAIN_PART + 1 +
(AVERAGE_BLOB_SIZE /
FULL_PAGE_SIZE(share) /
BLOB_SEGMENT_MIN_SIZE));
if (my_init_dynamic_array(PSI_INSTRUMENT_ME, &info->bitmap_blocks,
sizeof(MARIA_BITMAP_BLOCK),
default_extents, 64, flag))
goto err;
info->cur_row.extents_buffer_length= default_extents * ROW_EXTENT_SIZE;
if (!(info->cur_row.extents= my_malloc(PSI_INSTRUMENT_ME,
info->cur_row.extents_buffer_length,
flag)))
goto err;
info->row_base_length= share->base_length;
info->row_flag= share->base.default_row_flag;
/*
We need to reserve 'EXTRA_LENGTH_FIELDS' number of parts in
null_field_lengths to allow splitting of rows in 'find_where_to_split_row'
*/
row->null_field_lengths+= EXTRA_LENGTH_FIELDS;
new_row->null_field_lengths+= EXTRA_LENGTH_FIELDS;
DBUG_RETURN(0);
err:
_ma_end_block_record(info);
DBUG_RETURN(1);
} | O0 | c | ma_init_block_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp # imm = 0x128
movq %rdi, -0x38(%rbp)
movq -0x38(%rbp), %rax
addq $0x80, %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
addq $0x140, %rax # imm = 0x140
movq %rax, -0x48(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movsbl 0x7d9(%rax), %edx
xorl %eax, %eax
movl $0x10000, %ecx # imm = 0x10000
cmpl $0x0, %edx
cmovnel %ecx, %eax
orl $0x10, %eax
movl %eax, %eax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rsi
movq -0x40(%rbp), %rdx
addq $0x48, %rdx
movq -0x50(%rbp), %rax
movl 0x3f4(%rax), %ecx
movq -0x40(%rbp), %r8
addq $0x50, %r8
movq -0x50(%rbp), %rax
movl 0x3d4(%rax), %r9d
addl $0x2, %r9d
movq -0x40(%rbp), %rax
addq $0x60, %rax
movq %rax, -0xb0(%rbp)
movq -0x50(%rbp), %rax
movl 0x3f0(%rax), %eax
shlq $0x3, %rax
movq %rax, -0xa8(%rbp)
movq -0x40(%rbp), %rax
addq $0x58, %rax
movq %rax, -0xa0(%rbp)
movq -0x50(%rbp), %rax
movl 0x3c8(%rax), %eax
movq -0x50(%rbp), %rdi
subl 0x3f0(%rdi), %eax
addl $0x3, %eax
movl %eax, %eax
shlq $0x2, %rax
movq %rax, -0x98(%rbp)
movq -0x40(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x90(%rbp)
movq -0x50(%rbp), %rax
movl 0x3f0(%rax), %eax
addl $0x2, %eax
movl %eax, %eax
shlq $0x3, %rax
movq %rax, -0x88(%rbp)
movq -0x48(%rbp), %rax
addq $0x48, %rax
movq %rax, -0x80(%rbp)
movq -0x50(%rbp), %rax
movl 0x3f4(%rax), %eax
movl %eax, -0x74(%rbp)
movq -0x48(%rbp), %rax
addq $0x50, %rax
movq %rax, -0x70(%rbp)
movq -0x50(%rbp), %rax
movl 0x3d4(%rax), %eax
addl $0x2, %eax
movl %eax, -0x64(%rbp)
movq -0x48(%rbp), %r13
addq $0x60, %r13
movq -0x50(%rbp), %rax
movl 0x3f0(%rax), %eax
movl %eax, %r12d
shlq $0x3, %r12
movq -0x48(%rbp), %r15
addq $0x58, %r15
movq -0x50(%rbp), %rax
movl 0x3c8(%rax), %eax
movq -0x50(%rbp), %rdi
subl 0x3f0(%rdi), %eax
addl $0x3, %eax
movl %eax, %eax
movl %eax, %r14d
shlq $0x2, %r14
movq -0x38(%rbp), %rbx
addq $0x318, %rbx # imm = 0x318
movq -0x50(%rbp), %rax
movl 0x3c8(%rax), %eax
addl $0x5, %eax
addl $0x3, %eax
movl %eax, %eax
movl %eax, %r11d
shlq $0x4, %r11
movq -0x38(%rbp), %r10
addq $0x3c8, %r10 # imm = 0x3C8
movq -0x50(%rbp), %rax
movl 0x3c8(%rax), %eax
shll $0x2, %eax
movq -0x50(%rbp), %rdi
addl 0x3d4(%rdi), %eax
addl $0x1, %eax
addl $0x4, %eax
movl %eax, -0x60(%rbp)
xorl %edi, %edi
xorl %eax, %eax
movq -0xb0(%rbp), %rax
movq %rax, (%rsp)
movq -0xa8(%rbp), %rax
movq %rax, 0x8(%rsp)
movq -0xa0(%rbp), %rax
movq %rax, 0x10(%rsp)
movq -0x98(%rbp), %rax
movq %rax, 0x18(%rsp)
movq -0x90(%rbp), %rax
movq %rax, 0x20(%rsp)
movq -0x88(%rbp), %rax
movq %rax, 0x28(%rsp)
movq -0x80(%rbp), %rax
movq %rax, 0x30(%rsp)
movl -0x74(%rbp), %eax
movl %eax, 0x38(%rsp)
movq -0x70(%rbp), %rax
movq %rax, 0x40(%rsp)
movl -0x64(%rbp), %eax
movl %eax, 0x48(%rsp)
movl -0x60(%rbp), %eax
movq %r13, 0x50(%rsp)
movq %r12, 0x58(%rsp)
movq %r15, 0x60(%rsp)
movq %r14, 0x68(%rsp)
movq %rbx, 0x70(%rsp)
movq %r11, 0x78(%rsp)
movq %r10, 0x80(%rsp)
movl %eax, 0x88(%rsp)
movq $0x0, 0x90(%rsp)
movl $0x0, 0x98(%rsp)
movb $0x0, %al
callq 0xedf20
cmpq $0x0, %rax
jne 0x7583c
jmp 0x75833
movb $0x1, -0x29(%rbp)
jmp 0x75965
movq -0x40(%rbp), %rax
movq 0x50(%rax), %rcx
addq $0x2, %rcx
movq %rcx, 0x50(%rax)
movq -0x48(%rbp), %rax
movq 0x50(%rax), %rcx
addq $0x2, %rcx
movq %rcx, 0x50(%rax)
movq -0x50(%rbp), %rax
movl 0x7bc(%rax), %eax
movq -0x50(%rbp), %rcx
movl 0xc18(%rcx), %ecx
addl $0x8, %ecx
subl %ecx, %eax
subl $0x4, %eax
movl %eax, %eax
movl %eax, %ecx
movl $0x100000, %eax # imm = 0x100000
cqto
idivq %rcx
movl $0x80, %ecx
cqto
idivq %rcx
addq $0x5, %rax
movl %eax, -0x5c(%rbp)
movq -0x38(%rbp), %rsi
addq $0x2c0, %rsi # imm = 0x2C0
movl -0x5c(%rbp), %r8d
movq -0x58(%rbp), %rax
xorl %edi, %edi
movl $0x18, %edx
xorl %ecx, %ecx
movl $0x40, %r9d
movq %rax, (%rsp)
callq 0xdbb90
cmpb $0x0, %al
je 0x758cb
jmp 0x75958
imull $0x7, -0x5c(%rbp), %eax
movl %eax, %eax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movq %rcx, 0x118(%rax)
movq -0x38(%rbp), %rax
movq 0x118(%rax), %rsi
movq -0x58(%rbp), %rdx
xorl %edi, %edi
callq 0xf4be0
movq -0x38(%rbp), %rcx
movq %rax, 0x90(%rcx)
cmpq $0x0, %rax
jne 0x75907
jmp 0x75958
movq -0x50(%rbp), %rax
movl 0x7c4(%rax), %eax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movq %rcx, 0x610(%rax)
movq -0x50(%rbp), %rax
movl 0x418(%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x618(%rax)
movq -0x40(%rbp), %rax
movq 0x58(%rax), %rcx
addq $0xc, %rcx
movq %rcx, 0x58(%rax)
movq -0x48(%rbp), %rax
movq 0x58(%rax), %rcx
addq $0xc, %rcx
movq %rcx, 0x58(%rax)
movb $0x0, -0x29(%rbp)
jmp 0x75965
movq -0x38(%rbp), %rdi
callq 0x75980
movb $0x1, -0x29(%rbp)
movb -0x29(%rbp), %al
addq $0x128, %rsp # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopw (%rax,%rax)
| _ma_init_block_record:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 128h
mov [rbp+var_38], rdi
mov rax, [rbp+var_38]
add rax, 80h
mov [rbp+var_40], rax
mov rax, [rbp+var_38]
add rax, 140h
mov [rbp+var_48], rax
mov rax, [rbp+var_38]
mov rax, [rax]
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
movsx edx, byte ptr [rax+7D9h]
xor eax, eax
mov ecx, 10000h
cmp edx, 0
cmovnz eax, ecx
or eax, 10h
mov eax, eax
mov [rbp+var_58], rax
mov rsi, [rbp+var_58]
mov rdx, [rbp+var_40]
add rdx, 48h ; 'H'
mov rax, [rbp+var_50]
mov ecx, [rax+3F4h]
mov r8, [rbp+var_40]
add r8, 50h ; 'P'
mov rax, [rbp+var_50]
mov r9d, [rax+3D4h]
add r9d, 2
mov rax, [rbp+var_40]
add rax, 60h ; '`'
mov [rbp+var_B0], rax
mov rax, [rbp+var_50]
mov eax, [rax+3F0h]
shl rax, 3
mov [rbp+var_A8], rax
mov rax, [rbp+var_40]
add rax, 58h ; 'X'
mov [rbp+var_A0], rax
mov rax, [rbp+var_50]
mov eax, [rax+3C8h]
mov rdi, [rbp+var_50]
sub eax, [rdi+3F0h]
add eax, 3
mov eax, eax
shl rax, 2
mov [rbp+var_98], rax
mov rax, [rbp+var_40]
add rax, 28h ; '('
mov [rbp+var_90], rax
mov rax, [rbp+var_50]
mov eax, [rax+3F0h]
add eax, 2
mov eax, eax
shl rax, 3
mov [rbp+var_88], rax
mov rax, [rbp+var_48]
add rax, 48h ; 'H'
mov [rbp+var_80], rax
mov rax, [rbp+var_50]
mov eax, [rax+3F4h]
mov [rbp+var_74], eax
mov rax, [rbp+var_48]
add rax, 50h ; 'P'
mov [rbp+var_70], rax
mov rax, [rbp+var_50]
mov eax, [rax+3D4h]
add eax, 2
mov [rbp+var_64], eax
mov r13, [rbp+var_48]
add r13, 60h ; '`'
mov rax, [rbp+var_50]
mov eax, [rax+3F0h]
mov r12d, eax
shl r12, 3
mov r15, [rbp+var_48]
add r15, 58h ; 'X'
mov rax, [rbp+var_50]
mov eax, [rax+3C8h]
mov rdi, [rbp+var_50]
sub eax, [rdi+3F0h]
add eax, 3
mov eax, eax
mov r14d, eax
shl r14, 2
mov rbx, [rbp+var_38]
add rbx, 318h
mov rax, [rbp+var_50]
mov eax, [rax+3C8h]
add eax, 5
add eax, 3
mov eax, eax
mov r11d, eax
shl r11, 4
mov r10, [rbp+var_38]
add r10, 3C8h
mov rax, [rbp+var_50]
mov eax, [rax+3C8h]
shl eax, 2
mov rdi, [rbp+var_50]
add eax, [rdi+3D4h]
add eax, 1
add eax, 4
mov [rbp+var_60], eax
xor edi, edi
xor eax, eax
mov rax, [rbp+var_B0]
mov [rsp+150h+var_150], rax
mov rax, [rbp+var_A8]
mov [rsp+150h+var_148], rax
mov rax, [rbp+var_A0]
mov [rsp+150h+var_140], rax
mov rax, [rbp+var_98]
mov [rsp+150h+var_138], rax
mov rax, [rbp+var_90]
mov [rsp+150h+var_130], rax
mov rax, [rbp+var_88]
mov [rsp+150h+var_128], rax
mov rax, [rbp+var_80]
mov [rsp+150h+var_120], rax
mov eax, [rbp+var_74]
mov [rsp+150h+var_118], eax
mov rax, [rbp+var_70]
mov [rsp+150h+var_110], rax
mov eax, [rbp+var_64]
mov [rsp+150h+var_108], eax
mov eax, [rbp+var_60]
mov [rsp+150h+var_100], r13
mov [rsp+150h+var_F8], r12
mov [rsp+150h+var_F0], r15
mov [rsp+150h+var_E8], r14
mov [rsp+150h+var_E0], rbx
mov [rsp+150h+var_D8], r11
mov [rsp+150h+var_D0], r10
mov [rsp+150h+var_C8], eax
mov [rsp+150h+var_C0], 0
mov [rsp+150h+var_B8], 0
mov al, 0
call my_multi_malloc
cmp rax, 0
jnz short loc_7583C
jmp short $+2
loc_75833:
mov [rbp+var_29], 1
jmp loc_75965
loc_7583C:
mov rax, [rbp+var_40]
mov rcx, [rax+50h]
add rcx, 2
mov [rax+50h], rcx
mov rax, [rbp+var_48]
mov rcx, [rax+50h]
add rcx, 2
mov [rax+50h], rcx
mov rax, [rbp+var_50]
mov eax, [rax+7BCh]
mov rcx, [rbp+var_50]
mov ecx, [rcx+0C18h]
add ecx, 8
sub eax, ecx
sub eax, 4
mov eax, eax
mov ecx, eax
mov eax, 100000h
cqo
idiv rcx
mov ecx, 80h
cqo
idiv rcx
add rax, 5
mov [rbp+var_5C], eax
mov rsi, [rbp+var_38]
add rsi, 2C0h
mov r8d, [rbp+var_5C]
mov rax, [rbp+var_58]
xor edi, edi
mov edx, 18h
xor ecx, ecx
mov r9d, 40h ; '@'
mov [rsp+150h+var_150], rax
call init_dynamic_array2
cmp al, 0
jz short loc_758CB
jmp loc_75958
loc_758CB:
imul eax, [rbp+var_5C], 7
mov eax, eax
mov ecx, eax
mov rax, [rbp+var_38]
mov [rax+118h], rcx
mov rax, [rbp+var_38]
mov rsi, [rax+118h]
mov rdx, [rbp+var_58]
xor edi, edi
call my_malloc
mov rcx, [rbp+var_38]
mov [rcx+90h], rax
cmp rax, 0
jnz short loc_75907
jmp short loc_75958
loc_75907:
mov rax, [rbp+var_50]
mov eax, [rax+7C4h]
mov ecx, eax
mov rax, [rbp+var_38]
mov [rax+610h], rcx
mov rax, [rbp+var_50]
mov ecx, [rax+418h]
mov rax, [rbp+var_38]
mov [rax+618h], ecx
mov rax, [rbp+var_40]
mov rcx, [rax+58h]
add rcx, 0Ch
mov [rax+58h], rcx
mov rax, [rbp+var_48]
mov rcx, [rax+58h]
add rcx, 0Ch
mov [rax+58h], rcx
mov [rbp+var_29], 0
jmp short loc_75965
loc_75958:
mov rdi, [rbp+var_38]
call _ma_end_block_record
mov [rbp+var_29], 1
loc_75965:
mov al, [rbp+var_29]
add rsp, 128h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| char ma_init_block_record(long long a1)
{
int v1; // eax
long long v2; // rax
int v4; // [rsp+38h] [rbp-118h]
int v5; // [rsp+48h] [rbp-108h]
int v6; // [rsp+F4h] [rbp-5Ch]
long long v7; // [rsp+F8h] [rbp-58h]
_DWORD *v8; // [rsp+100h] [rbp-50h]
long long v9; // [rsp+108h] [rbp-48h]
long long v10; // [rsp+110h] [rbp-40h]
v8 = *(_DWORD **)a1;
v1 = 0;
if ( *(_BYTE *)(*(_QWORD *)a1 + 2009LL) )
v1 = 0x10000;
v7 = v1 | 0x10u;
v4 = v8[253];
v5 = v8[245] + 2;
v9 = a1 + 320;
v10 = a1 + 128;
if ( !my_multi_malloc(
0,
v1 | 0x10u,
(int)v10 + 72,
v4,
(int)v10 + 80,
v5,
v10 + 96,
8LL * (unsigned int)v8[252],
v10 + 88,
4LL * (unsigned int)(v8[242] - v8[252] + 3),
v10 + 40,
8LL * (unsigned int)(v8[252] + 2),
v9 + 72,
v4,
v9 + 80,
v5,
v9 + 96,
8LL * (unsigned int)v8[252],
v9 + 88,
4LL * (unsigned int)(v8[242] - v8[252] + 3),
a1 + 792,
16LL * (unsigned int)(v8[242] + 8),
a1 + 968,
v8[245] + 4 * v8[242] + 5,
0LL,
0,
v10 + 96,
8LL * (unsigned int)v8[252],
v10 + 88,
4LL * (unsigned int)(v8[242] - v8[252] + 3),
v10 + 40,
8LL * (unsigned int)(v8[252] + 2),
v9 + 72) )
return 1;
*(_QWORD *)(a1 + 208) += 2LL;
*(_QWORD *)(a1 + 400) += 2LL;
v6 = 0x100000LL / (unsigned int)(v8[495] - (v8[774] + 8) - 4) / 128 + 5;
if ( (unsigned __int8)init_dynamic_array2(0, (int)a1 + 704, 24, 0, v6, 64, v7)
|| (*(_QWORD *)(a1 + 280) = (unsigned int)(7 * v6),
v2 = my_malloc(0LL, *(_QWORD *)(a1 + 280), v7),
(*(_QWORD *)(a1 + 144) = v2) == 0LL) )
{
ma_end_block_record(a1);
return 1;
}
else
{
*(_QWORD *)(a1 + 1552) = (unsigned int)v8[497];
*(_DWORD *)(a1 + 1560) = v8[262];
*(_QWORD *)(a1 + 216) += 12LL;
*(_QWORD *)(a1 + 408) += 12LL;
return 0;
}
}
| _ma_init_block_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x128
MOV qword ptr [RBP + -0x38],RDI
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x80
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x140
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOVSX EDX,byte ptr [RAX + 0x7d9]
XOR EAX,EAX
MOV ECX,0x10000
CMP EDX,0x0
CMOVNZ EAX,ECX
OR EAX,0x10
MOV EAX,EAX
MOV qword ptr [RBP + -0x58],RAX
MOV RSI,qword ptr [RBP + -0x58]
MOV RDX,qword ptr [RBP + -0x40]
ADD RDX,0x48
MOV RAX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RAX + 0x3f4]
MOV R8,qword ptr [RBP + -0x40]
ADD R8,0x50
MOV RAX,qword ptr [RBP + -0x50]
MOV R9D,dword ptr [RAX + 0x3d4]
ADD R9D,0x2
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x60
MOV qword ptr [RBP + -0xb0],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RAX + 0x3f0]
SHL RAX,0x3
MOV qword ptr [RBP + -0xa8],RAX
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x58
MOV qword ptr [RBP + -0xa0],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RAX + 0x3c8]
MOV RDI,qword ptr [RBP + -0x50]
SUB EAX,dword ptr [RDI + 0x3f0]
ADD EAX,0x3
MOV EAX,EAX
SHL RAX,0x2
MOV qword ptr [RBP + -0x98],RAX
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x28
MOV qword ptr [RBP + -0x90],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RAX + 0x3f0]
ADD EAX,0x2
MOV EAX,EAX
SHL RAX,0x3
MOV qword ptr [RBP + -0x88],RAX
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x48
MOV qword ptr [RBP + -0x80],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RAX + 0x3f4]
MOV dword ptr [RBP + -0x74],EAX
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x50
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RAX + 0x3d4]
ADD EAX,0x2
MOV dword ptr [RBP + -0x64],EAX
MOV R13,qword ptr [RBP + -0x48]
ADD R13,0x60
MOV RAX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RAX + 0x3f0]
MOV R12D,EAX
SHL R12,0x3
MOV R15,qword ptr [RBP + -0x48]
ADD R15,0x58
MOV RAX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RAX + 0x3c8]
MOV RDI,qword ptr [RBP + -0x50]
SUB EAX,dword ptr [RDI + 0x3f0]
ADD EAX,0x3
MOV EAX,EAX
MOV R14D,EAX
SHL R14,0x2
MOV RBX,qword ptr [RBP + -0x38]
ADD RBX,0x318
MOV RAX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RAX + 0x3c8]
ADD EAX,0x5
ADD EAX,0x3
MOV EAX,EAX
MOV R11D,EAX
SHL R11,0x4
MOV R10,qword ptr [RBP + -0x38]
ADD R10,0x3c8
MOV RAX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RAX + 0x3c8]
SHL EAX,0x2
MOV RDI,qword ptr [RBP + -0x50]
ADD EAX,dword ptr [RDI + 0x3d4]
ADD EAX,0x1
ADD EAX,0x4
MOV dword ptr [RBP + -0x60],EAX
XOR EDI,EDI
XOR EAX,EAX
MOV RAX,qword ptr [RBP + -0xb0]
MOV qword ptr [RSP],RAX
MOV RAX,qword ptr [RBP + -0xa8]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RBP + -0xa0]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RBP + -0x98]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RBP + -0x90]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RSP + 0x30],RAX
MOV EAX,dword ptr [RBP + -0x74]
MOV dword ptr [RSP + 0x38],EAX
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RSP + 0x40],RAX
MOV EAX,dword ptr [RBP + -0x64]
MOV dword ptr [RSP + 0x48],EAX
MOV EAX,dword ptr [RBP + -0x60]
MOV qword ptr [RSP + 0x50],R13
MOV qword ptr [RSP + 0x58],R12
MOV qword ptr [RSP + 0x60],R15
MOV qword ptr [RSP + 0x68],R14
MOV qword ptr [RSP + 0x70],RBX
MOV qword ptr [RSP + 0x78],R11
MOV qword ptr [RSP + 0x80],R10
MOV dword ptr [RSP + 0x88],EAX
MOV qword ptr [RSP + 0x90],0x0
MOV dword ptr [RSP + 0x98],0x0
MOV AL,0x0
CALL 0x001edf20
CMP RAX,0x0
JNZ 0x0017583c
JMP 0x00175833
LAB_00175833:
MOV byte ptr [RBP + -0x29],0x1
JMP 0x00175965
LAB_0017583c:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RAX + 0x50]
ADD RCX,0x2
MOV qword ptr [RAX + 0x50],RCX
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RAX + 0x50]
ADD RCX,0x2
MOV qword ptr [RAX + 0x50],RCX
MOV RAX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RAX + 0x7bc]
MOV RCX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RCX + 0xc18]
ADD ECX,0x8
SUB EAX,ECX
SUB EAX,0x4
MOV EAX,EAX
MOV ECX,EAX
MOV EAX,0x100000
CQO
IDIV RCX
MOV ECX,0x80
CQO
IDIV RCX
ADD RAX,0x5
MOV dword ptr [RBP + -0x5c],EAX
MOV RSI,qword ptr [RBP + -0x38]
ADD RSI,0x2c0
MOV R8D,dword ptr [RBP + -0x5c]
MOV RAX,qword ptr [RBP + -0x58]
XOR EDI,EDI
MOV EDX,0x18
XOR ECX,ECX
MOV R9D,0x40
MOV qword ptr [RSP],RAX
CALL 0x001dbb90
CMP AL,0x0
JZ 0x001758cb
JMP 0x00175958
LAB_001758cb:
IMUL EAX,dword ptr [RBP + -0x5c],0x7
MOV EAX,EAX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x118],RCX
MOV RAX,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RAX + 0x118]
MOV RDX,qword ptr [RBP + -0x58]
XOR EDI,EDI
CALL 0x001f4be0
MOV RCX,qword ptr [RBP + -0x38]
MOV qword ptr [RCX + 0x90],RAX
CMP RAX,0x0
JNZ 0x00175907
JMP 0x00175958
LAB_00175907:
MOV RAX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RAX + 0x7c4]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x610],RCX
MOV RAX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RAX + 0x418]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x618],ECX
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RAX + 0x58]
ADD RCX,0xc
MOV qword ptr [RAX + 0x58],RCX
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RAX + 0x58]
ADD RCX,0xc
MOV qword ptr [RAX + 0x58],RCX
MOV byte ptr [RBP + -0x29],0x0
JMP 0x00175965
LAB_00175958:
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x00175980
MOV byte ptr [RBP + -0x29],0x1
LAB_00175965:
MOV AL,byte ptr [RBP + -0x29]
ADD RSP,0x128
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 _ma_init_block_record(long *param_1)
{
long lVar1;
int1 auVar2 [16];
char cVar3;
uint uVar4;
int iVar5;
long lVar6;
lVar1 = *param_1;
uVar4 = 0;
if (*(char *)(lVar1 + 0x7d9) != '\0') {
uVar4 = 0x10000;
}
uVar4 = uVar4 | 0x10;
lVar6 = my_multi_malloc(0,uVar4,param_1 + 0x19,*(int4 *)(lVar1 + 0x3f4),param_1 + 0x1a,
*(int *)(lVar1 + 0x3d4) + 2,param_1 + 0x1c,
(ulong)*(uint *)(lVar1 + 0x3f0) << 3,param_1 + 0x1b,
(ulong)((*(int *)(lVar1 + 0x3c8) - *(int *)(lVar1 + 0x3f0)) + 3) << 2,
param_1 + 0x15,(ulong)(*(int *)(lVar1 + 0x3f0) + 2) << 3,param_1 + 0x31,
*(int4 *)(lVar1 + 0x3f4),param_1 + 0x32,*(int *)(lVar1 + 0x3d4) + 2,
param_1 + 0x34,(ulong)*(uint *)(lVar1 + 0x3f0) << 3,param_1 + 0x33,
(ulong)((*(int *)(lVar1 + 0x3c8) - *(int *)(lVar1 + 0x3f0)) + 3) << 2,
param_1 + 99,(ulong)(*(int *)(lVar1 + 0x3c8) + 8) << 4,param_1 + 0x79,
*(int *)(lVar1 + 0x3c8) * 4 + *(int *)(lVar1 + 0x3d4) + 5,0,0);
if (lVar6 != 0) {
param_1[0x1a] = param_1[0x1a] + 2;
param_1[0x32] = param_1[0x32] + 2;
auVar2._8_8_ = 0;
auVar2._0_8_ = SUB168(SEXT816(0x100000),8);
iVar5 = (int)(SUB168((auVar2 << 0x40 | ZEXT816(0x100000)) /
SEXT816((long)(ulong)((*(int *)(lVar1 + 0x7bc) -
(*(int *)(lVar1 + 0xc18) + 8)) - 4)),0) / 0x80) + 5;
cVar3 = init_dynamic_array2(0,param_1 + 0x58,0x18,0,iVar5,0x40,uVar4);
if (cVar3 == '\0') {
param_1[0x23] = (ulong)(uint)(iVar5 * 7);
lVar6 = my_malloc(0,param_1[0x23],uVar4);
param_1[0x12] = lVar6;
if (lVar6 != 0) {
param_1[0xc2] = (ulong)*(uint *)(lVar1 + 0x7c4);
*(int4 *)(param_1 + 0xc3) = *(int4 *)(lVar1 + 0x418);
param_1[0x1b] = param_1[0x1b] + 0xc;
param_1[0x33] = param_1[0x33] + 0xc;
return 0;
}
}
_ma_end_block_record(param_1);
}
return 1;
}
| |
29,849 | js_typed_array_at | bluesky950520[P]quickjs/quickjs.c | static JSValue js_typed_array_at(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSObject *p;
int64_t idx, len;
p = get_typed_array(ctx, this_val);
if (!p)
return JS_EXCEPTION;
if (typed_array_is_oob(p))
return JS_ThrowTypeErrorArrayBufferOOB(ctx);
len = p->u.array.count;
// note: can change p->u.array.count
if (JS_ToInt64Sat(ctx, &idx, argv[0]))
return JS_EXCEPTION;
if (idx < 0)
idx = len + idx;
if (idx < 0 || idx >= p->u.array.count)
return JS_UNDEFINED;
switch (p->class_id) {
case JS_CLASS_INT8_ARRAY:
return js_int32(p->u.array.u.int8_ptr[idx]);
case JS_CLASS_UINT8C_ARRAY:
case JS_CLASS_UINT8_ARRAY:
return js_int32(p->u.array.u.uint8_ptr[idx]);
case JS_CLASS_INT16_ARRAY:
return js_int32(p->u.array.u.int16_ptr[idx]);
case JS_CLASS_UINT16_ARRAY:
return js_int32(p->u.array.u.uint16_ptr[idx]);
case JS_CLASS_INT32_ARRAY:
return js_int32(p->u.array.u.int32_ptr[idx]);
case JS_CLASS_UINT32_ARRAY:
return js_uint32(p->u.array.u.uint32_ptr[idx]);
case JS_CLASS_FLOAT16_ARRAY:
return js_float64(fromfp16(p->u.array.u.fp16_ptr[idx]));
case JS_CLASS_FLOAT32_ARRAY:
return js_float64(p->u.array.u.float_ptr[idx]);
case JS_CLASS_FLOAT64_ARRAY:
return js_float64(p->u.array.u.double_ptr[idx]);
case JS_CLASS_BIG_INT64_ARRAY:
return JS_NewBigInt64(ctx, p->u.array.u.int64_ptr[idx]);
case JS_CLASS_BIG_UINT64_ARRAY:
return JS_NewBigUint64(ctx, p->u.array.u.uint64_ptr[idx]);
}
abort(); /* unreachable */
return JS_UNDEFINED;
} | O1 | c | js_typed_array_at:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %r12
movq %rdi, %r15
movq %rsi, 0x8(%rsp)
cmpl $-0x1, %edx
jne 0x80493
movq 0x8(%rsp), %r14
movzwl 0x6(%r14), %eax
addl $-0x15, %eax
cmpw $0xc, %ax
jb 0x804a7
leaq 0x21f77(%rip), %rsi # 0xa2411
xorl %r14d, %r14d
movq %r15, %rdi
xorl %eax, %eax
callq 0x22567
movl $0x6, %ebx
testq %r14, %r14
je 0x80502
movq %r14, %rdi
callq 0x396c4
testl %eax, %eax
je 0x804d3
leaq 0x21f5e(%rip), %rsi # 0xa2422
xorl %r14d, %r14d
movq %r15, %rdi
xorl %eax, %eax
callq 0x22567
jmp 0x80505
movl 0x40(%r14), %r13d
movq (%r12), %rdx
movq 0x8(%r12), %rcx
movq %rdx, 0x8(%rsp)
cmpl $-0x9, %ecx
jb 0x804f1
movq 0x8(%rsp), %rax
incl (%rax)
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x277bc
testl %eax, %eax
je 0x8051e
xorl %r14d, %r14d
xorl %ecx, %ecx
movl %r14d, %eax
orq %rcx, %rax
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x8(%rsp), %rax
testq %rax, %rax
jns 0x80530
addq %r13, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movl $0x3, %ebx
testq %rax, %rax
js 0x80502
movl 0x40(%r14), %ecx
cmpq %rcx, %rax
jge 0x80502
movzwl 0x6(%r14), %ecx
addl $-0x15, %ecx
cmpl $0xb, %ecx
ja 0x8065c
leaq 0x1d1e4(%rip), %rdx # 0x9d744
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq 0x38(%r14), %rcx
movzbl (%rcx,%rax), %r14d
jmp 0x8060b
movq 0x38(%r14), %rcx
movq (%rcx,%rax,8), %rsi
movq %r15, %rdi
callq 0x28376
movq %rax, %r14
movq %rdx, %rbx
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
jmp 0x80507
movq 0x38(%r14), %rcx
cvtss2sd (%rcx,%rax,4), %xmm0
jmp 0x80621
movq 0x38(%r14), %rcx
movl (%rcx,%rax,4), %r14d
jmp 0x8060b
movq 0x38(%r14), %rcx
movslq (%rcx,%rax,4), %rax
xorl %ecx, %ecx
testq %rax, %rax
movl %eax, %edx
cvtsi2sd %rdx, %xmm0
movq %xmm0, %r14
cmovnsq %rax, %r14
movl $0x7, %ebx
cmovnsq %rcx, %rbx
movabsq $0x7fffffff00000000, %rcx # imm = 0x7FFFFFFF00000000
andq %r14, %rcx
jmp 0x80507
movq 0x38(%r14), %rcx
movsbq (%rcx,%rax), %r14
jmp 0x8060b
movq 0x38(%r14), %rcx
movzwl (%rcx,%rax,2), %r14d
jmp 0x8060b
movq 0x38(%r14), %rcx
movswq (%rcx,%rax,2), %r14
xorl %ecx, %ecx
xorl %ebx, %ebx
jmp 0x80507
movq 0x38(%r14), %rcx
movzwl (%rcx,%rax,2), %edi
callq 0x3d955
movq %xmm0, %r14
jmp 0x80630
movq 0x38(%r14), %rcx
movq (%rcx,%rax,8), %r14
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %r14, %rcx
movl $0x7, %ebx
jmp 0x80507
movq 0x38(%r14), %rcx
movq (%rcx,%rax,8), %rsi
movq %r15, %rdi
callq 0xff18
jmp 0x80587
callq 0xe090
| js_typed_array_at:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 10h
mov r12, r8
mov r15, rdi
mov [rsp+38h+var_30], rsi
cmp edx, 0FFFFFFFFh
jnz short loc_80493
mov r14, [rsp+38h+var_30]
movzx eax, word ptr [r14+6]
add eax, 0FFFFFFEBh
cmp ax, 0Ch
jb short loc_804A7
loc_80493:
lea rsi, aNotATypedarray; "not a TypedArray"
xor r14d, r14d
mov rdi, r15
xor eax, eax
call JS_ThrowTypeError
loc_804A7:
mov ebx, 6
test r14, r14
jz short loc_80502
mov rdi, r14
call typed_array_is_oob
test eax, eax
jz short loc_804D3
lea rsi, aArraybufferIsD_0; "ArrayBuffer is detached or resized"
xor r14d, r14d
mov rdi, r15
xor eax, eax
call JS_ThrowTypeError
jmp short loc_80505
loc_804D3:
mov r13d, [r14+40h]
mov rdx, [r12]
mov rcx, [r12+8]
mov [rsp+38h+var_30], rdx
cmp ecx, 0FFFFFFF7h
jb short loc_804F1
mov rax, [rsp+38h+var_30]
inc dword ptr [rax]
loc_804F1:
lea rsi, [rsp+38h+var_30]
mov rdi, r15
call JS_ToInt64SatFree
test eax, eax
jz short loc_8051E
loc_80502:
xor r14d, r14d
loc_80505:
xor ecx, ecx
loc_80507:
mov eax, r14d
or rax, rcx
mov rdx, rbx
add rsp, 10h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_8051E:
mov rax, [rsp+38h+var_30]
test rax, rax
jns short loc_80530
add rax, r13
mov [rsp+38h+var_30], rax
loc_80530:
mov rax, [rsp+38h+var_30]
mov ebx, 3
test rax, rax
js short loc_80502
mov ecx, [r14+40h]
cmp rax, rcx
jge short loc_80502
movzx ecx, word ptr [r14+6]
add ecx, 0FFFFFFEBh; switch 12 cases
cmp ecx, 0Bh
ja def_80567; jumptable 0000000000080567 default case
lea rdx, jpt_80567
movsxd rcx, ds:(jpt_80567 - 9D744h)[rdx+rcx*4]
add rcx, rdx
jmp rcx; switch jump
loc_80569:
mov rcx, [r14+38h]; jumptable 0000000000080567 cases 21,23
movzx r14d, byte ptr [rcx+rax]
jmp loc_8060B
loc_80577:
mov rcx, [r14+38h]; jumptable 0000000000080567 case 28
mov rsi, [rcx+rax*8]
mov rdi, r15
call JS_NewBigInt64
loc_80587:
mov r14, rax
mov rbx, rdx
mov rcx, 0FFFFFFFF00000000h
and rcx, rax
jmp loc_80507
loc_8059F:
mov rcx, [r14+38h]; jumptable 0000000000080567 case 31
cvtss2sd xmm0, dword ptr [rcx+rax*4]
jmp short loc_80621
loc_805AA:
mov rcx, [r14+38h]; jumptable 0000000000080567 case 26
mov r14d, [rcx+rax*4]
jmp short loc_8060B
loc_805B4:
mov rcx, [r14+38h]; jumptable 0000000000080567 case 27
movsxd rax, dword ptr [rcx+rax*4]
xor ecx, ecx
test rax, rax
mov edx, eax
cvtsi2sd xmm0, rdx
movq r14, xmm0
cmovns r14, rax
mov ebx, 7
cmovns rbx, rcx
mov rcx, 7FFFFFFF00000000h
and rcx, r14
jmp loc_80507
loc_805EC:
mov rcx, [r14+38h]; jumptable 0000000000080567 case 22
movsx r14, byte ptr [rcx+rax]
jmp short loc_8060B
loc_805F7:
mov rcx, [r14+38h]; jumptable 0000000000080567 case 25
movzx r14d, word ptr [rcx+rax*2]
jmp short loc_8060B
loc_80602:
mov rcx, [r14+38h]; jumptable 0000000000080567 case 24
movsx r14, word ptr [rcx+rax*2]
loc_8060B:
xor ecx, ecx
xor ebx, ebx
jmp loc_80507
loc_80614:
mov rcx, [r14+38h]; jumptable 0000000000080567 case 30
movzx edi, word ptr [rcx+rax*2]
call fromfp16
loc_80621:
movq r14, xmm0
jmp short loc_80630
loc_80628:
mov rcx, [r14+38h]; jumptable 0000000000080567 case 32
mov r14, [rcx+rax*8]
loc_80630:
mov rcx, 0FFFFFFFF00000000h
and rcx, r14
mov ebx, 7
jmp loc_80507
loc_80647:
mov rcx, [r14+38h]; jumptable 0000000000080567 case 29
mov rsi, [rcx+rax*8]
mov rdi, r15
call JS_NewBigUint64
jmp loc_80587
def_80567:
call _abort; jumptable 0000000000080567 default case
| unsigned long long js_typed_array_at(
const char *a1,
long long a2,
long long a3,
long long a4,
long long *a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long v15; // r14
long long v16; // rdx
long long v17; // rcx
long long v18; // r8
long long v19; // r9
__m128 v20; // xmm4
__m128 v21; // xmm5
long long v22; // r13
long long v23; // rdx
long long v24; // rcx
unsigned long long v25; // rcx
unsigned long long v27; // rax
long long v28; // rax
char v29; // [rsp+0h] [rbp-38h]
unsigned long long v30[6]; // [rsp+8h] [rbp-30h] BYREF
v30[0] = a2;
if ( (_DWORD)a3 != -1 || (v15 = v30[0], (unsigned __int16)(*(_WORD *)(v30[0] + 6) - 21) >= 0xCu) )
{
*(double *)&v15 = 0.0;
JS_ThrowTypeError(
(long long)a1,
(long long)"not a TypedArray",
a3,
a4,
(long long)a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v29);
}
if ( *(double *)&v15 == 0.0 )
goto LABEL_10;
if ( typed_array_is_oob(v15) )
{
LODWORD(v15) = 0;
JS_ThrowTypeError(
(long long)a1,
(long long)"ArrayBuffer is detached or resized",
v16,
v17,
v18,
v19,
a7,
a8,
a9,
a10,
v20,
v21,
a13,
a14,
v29);
LABEL_11:
v25 = 0LL;
return v25 | (unsigned int)v15;
}
v22 = *(unsigned int *)(v15 + 64);
v23 = *a5;
v24 = a5[1];
v30[0] = *a5;
if ( (unsigned int)v24 >= 0xFFFFFFF7 )
++*(_DWORD *)v30[0];
if ( (unsigned int)JS_ToInt64SatFree((long long)a1, v30, v23, v24) )
goto LABEL_10;
if ( (v30[0] & 0x8000000000000000LL) != 0LL )
v30[0] += v22;
if ( (v30[0] & 0x8000000000000000LL) != 0LL || (long long)v30[0] >= *(unsigned int *)(v15 + 64) )
{
LABEL_10:
LODWORD(v15) = 0;
goto LABEL_11;
}
switch ( *(_WORD *)(v15 + 6) )
{
case 0x15:
case 0x17:
LODWORD(v15) = *(unsigned __int8 *)(*(_QWORD *)(v15 + 56) + v30[0]);
goto LABEL_29;
case 0x16:
LODWORD(v15) = *(char *)(*(_QWORD *)(v15 + 56) + v30[0]);
goto LABEL_29;
case 0x18:
LODWORD(v15) = *(__int16 *)(*(_QWORD *)(v15 + 56) + 2 * v30[0]);
goto LABEL_29;
case 0x19:
LODWORD(v15) = *(unsigned __int16 *)(*(_QWORD *)(v15 + 56) + 2 * v30[0]);
goto LABEL_29;
case 0x1A:
LODWORD(v15) = *(_DWORD *)(*(_QWORD *)(v15 + 56) + 4 * v30[0]);
LABEL_29:
v25 = 0LL;
return v25 | (unsigned int)v15;
case 0x1B:
v28 = *(int *)(*(_QWORD *)(v15 + 56) + 4 * v30[0]);
*(double *)&v15 = (double)(int)v28;
if ( v28 >= 0 )
v15 = v28;
v25 = v15 & 0x7FFFFFFF00000000LL;
return v25 | (unsigned int)v15;
case 0x1C:
v27 = (unsigned long long)JS_NewBigInt64((long long)a1, *(_QWORD *)(*(_QWORD *)(v15 + 56) + 8 * v30[0]));
goto LABEL_20;
case 0x1D:
v27 = (unsigned long long)JS_NewBigUint64((long long)a1, *(_QWORD *)(*(_QWORD *)(v15 + 56) + 8 * v30[0]));
LABEL_20:
LODWORD(v15) = v27;
v25 = v27 & 0xFFFFFFFF00000000LL;
return v25 | (unsigned int)v15;
case 0x1E:
fromfp16(*(_WORD *)(*(_QWORD *)(v15 + 56) + 2 * v30[0]));
goto LABEL_31;
case 0x1F:
*(double *)a7.m128_u64 = *(float *)(*(_QWORD *)(v15 + 56) + 4 * v30[0]);
LABEL_31:
v15 = a7.m128_i64[0];
break;
case 0x20:
v15 = *(long long *)(*(_QWORD *)(v15 + 56) + 8 * v30[0]);
break;
default:
abort(a1);
}
v25 = v15 & 0xFFFFFFFF00000000LL;
return v25 | (unsigned int)v15;
}
| js_typed_array_at:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R12,R8
MOV R15,RDI
MOV qword ptr [RSP + 0x8],RSI
CMP EDX,-0x1
JNZ 0x00180493
MOV R14,qword ptr [RSP + 0x8]
MOVZX EAX,word ptr [R14 + 0x6]
ADD EAX,-0x15
CMP AX,0xc
JC 0x001804a7
LAB_00180493:
LEA RSI,[0x1a2411]
XOR R14D,R14D
MOV RDI,R15
XOR EAX,EAX
CALL 0x00122567
LAB_001804a7:
MOV EBX,0x6
TEST R14,R14
JZ 0x00180502
MOV RDI,R14
CALL 0x001396c4
TEST EAX,EAX
JZ 0x001804d3
LEA RSI,[0x1a2422]
XOR R14D,R14D
MOV RDI,R15
XOR EAX,EAX
CALL 0x00122567
JMP 0x00180505
LAB_001804d3:
MOV R13D,dword ptr [R14 + 0x40]
MOV RDX,qword ptr [R12]
MOV RCX,qword ptr [R12 + 0x8]
MOV qword ptr [RSP + 0x8],RDX
CMP ECX,-0x9
JC 0x001804f1
MOV RAX,qword ptr [RSP + 0x8]
INC dword ptr [RAX]
LAB_001804f1:
LEA RSI,[RSP + 0x8]
MOV RDI,R15
CALL 0x001277bc
TEST EAX,EAX
JZ 0x0018051e
LAB_00180502:
XOR R14D,R14D
LAB_00180505:
XOR ECX,ECX
LAB_00180507:
MOV EAX,R14D
OR RAX,RCX
MOV RDX,RBX
ADD RSP,0x10
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_0018051e:
MOV RAX,qword ptr [RSP + 0x8]
TEST RAX,RAX
JNS 0x00180530
ADD RAX,R13
MOV qword ptr [RSP + 0x8],RAX
LAB_00180530:
MOV RAX,qword ptr [RSP + 0x8]
MOV EBX,0x3
TEST RAX,RAX
JS 0x00180502
MOV ECX,dword ptr [R14 + 0x40]
CMP RAX,RCX
JGE 0x00180502
MOVZX ECX,word ptr [R14 + 0x6]
ADD ECX,-0x15
CMP ECX,0xb
JA 0x0018065c
LEA RDX,[0x19d744]
MOVSXD RCX,dword ptr [RDX + RCX*0x4]
ADD RCX,RDX
switchD:
JMP RCX
caseD_15:
MOV RCX,qword ptr [R14 + 0x38]
MOVZX R14D,byte ptr [RCX + RAX*0x1]
JMP 0x0018060b
caseD_1c:
MOV RCX,qword ptr [R14 + 0x38]
MOV RSI,qword ptr [RCX + RAX*0x8]
MOV RDI,R15
CALL 0x00128376
LAB_00180587:
MOV R14,RAX
MOV RBX,RDX
MOV RCX,-0x100000000
AND RCX,RAX
JMP 0x00180507
caseD_1f:
MOV RCX,qword ptr [R14 + 0x38]
CVTSS2SD XMM0,dword ptr [RCX + RAX*0x4]
JMP 0x00180621
caseD_1a:
MOV RCX,qword ptr [R14 + 0x38]
MOV R14D,dword ptr [RCX + RAX*0x4]
JMP 0x0018060b
caseD_1b:
MOV RCX,qword ptr [R14 + 0x38]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
XOR ECX,ECX
TEST RAX,RAX
MOV EDX,EAX
CVTSI2SD XMM0,RDX
MOVQ R14,XMM0
CMOVNS R14,RAX
MOV EBX,0x7
CMOVNS RBX,RCX
MOV RCX,0x7fffffff00000000
AND RCX,R14
JMP 0x00180507
caseD_16:
MOV RCX,qword ptr [R14 + 0x38]
MOVSX R14,byte ptr [RCX + RAX*0x1]
JMP 0x0018060b
caseD_19:
MOV RCX,qword ptr [R14 + 0x38]
MOVZX R14D,word ptr [RCX + RAX*0x2]
JMP 0x0018060b
caseD_18:
MOV RCX,qword ptr [R14 + 0x38]
MOVSX R14,word ptr [RCX + RAX*0x2]
LAB_0018060b:
XOR ECX,ECX
XOR EBX,EBX
JMP 0x00180507
caseD_1e:
MOV RCX,qword ptr [R14 + 0x38]
MOVZX EDI,word ptr [RCX + RAX*0x2]
CALL 0x0013d955
LAB_00180621:
MOVQ R14,XMM0
JMP 0x00180630
caseD_20:
MOV RCX,qword ptr [R14 + 0x38]
MOV R14,qword ptr [RCX + RAX*0x8]
LAB_00180630:
MOV RCX,-0x100000000
AND RCX,R14
MOV EBX,0x7
JMP 0x00180507
caseD_1d:
MOV RCX,qword ptr [R14 + 0x38]
MOV RSI,qword ptr [RCX + RAX*0x8]
MOV RDI,R15
CALL 0x0010ff18
JMP 0x00180587
default:
CALL 0x0010e090
|
int1 [16]
js_typed_array_at(int8 param_1,int *param_2,int param_3,int8 param_4,int8 *param_5
)
{
uint uVar1;
int1 auVar2 [16];
int iVar3;
double dVar4;
ulong uVar5;
int8 uVar6;
ulong uVar7;
double dVar8;
int1 auVar9 [16];
int1 auVar10 [16];
int *local_30;
local_30 = param_2;
if ((param_3 != -1) || (0xb < (ushort)(*(short *)((long)param_2 + 6) - 0x15U))) {
param_2 = (int *)0x0;
JS_ThrowTypeError(param_1,"not a TypedArray");
}
uVar5 = 6;
if (param_2 == (int *)0x0) {
LAB_00180505:
auVar2._8_8_ = 0;
auVar2._0_8_ = uVar5;
auVar10 = auVar2 << 0x40;
uVar5 = 0;
goto LAB_00180507;
}
iVar3 = typed_array_is_oob(param_2);
if (iVar3 != 0) {
JS_ThrowTypeError(param_1,"ArrayBuffer is detached or resized");
goto LAB_00180505;
}
uVar1 = param_2[0x10];
local_30 = (int *)*param_5;
if (0xfffffff6 < (uint)param_5[1]) {
*local_30 = *local_30 + 1;
}
iVar3 = JS_ToInt64SatFree(param_1,&local_30);
if (iVar3 != 0) goto LAB_00180505;
if ((long)local_30 < 0) {
local_30 = (int *)((long)local_30 + (ulong)uVar1);
}
uVar5 = 3;
if (((long)local_30 < 0) || ((long)(ulong)(uint)param_2[0x10] <= (long)local_30))
goto LAB_00180505;
switch(*(int2 *)((long)param_2 + 6)) {
case 0x15:
case 0x17:
uVar7 = (ulong)*(byte *)(*(long *)(param_2 + 0xe) + (long)local_30);
break;
case 0x16:
uVar7 = (ulong)*(char *)(*(long *)(param_2 + 0xe) + (long)local_30);
break;
case 0x18:
uVar7 = (ulong)*(short *)(*(long *)(param_2 + 0xe) + (long)local_30 * 2);
break;
case 0x19:
uVar7 = (ulong)*(ushort *)(*(long *)(param_2 + 0xe) + (long)local_30 * 2);
break;
case 0x1a:
uVar7 = (ulong)*(uint *)(*(long *)(param_2 + 0xe) + (long)local_30 * 4);
break;
case 0x1b:
uVar1 = *(uint *)(*(long *)(param_2 + 0xe) + (long)local_30 * 4);
dVar4 = (double)(long)(int)uVar1;
dVar8 = (double)uVar1;
if (-1 < (long)dVar4) {
dVar8 = dVar4;
}
uVar6 = 7;
if (-1 < (long)dVar4) {
uVar6 = 0;
}
auVar10._8_8_ = uVar6;
auVar10._0_8_ = dVar8;
uVar5 = (ulong)dVar8 & 0x7fffffff00000000;
goto LAB_00180507;
case 0x1c:
auVar10 = JS_NewBigInt64(param_1,*(int8 *)(*(long *)(param_2 + 0xe) + (long)local_30 * 8))
;
goto LAB_00180587;
case 0x1d:
auVar10 = JS_NewBigUint64(param_1,*(int8 *)(*(long *)(param_2 + 0xe) + (long)local_30 * 8)
);
LAB_00180587:
uVar5 = auVar10._0_8_ & 0xffffffff00000000;
goto LAB_00180507;
case 0x1e:
dVar8 = (double)fromfp16(*(int2 *)(*(long *)(param_2 + 0xe) + (long)local_30 * 2));
goto LAB_00180630;
case 0x1f:
dVar8 = (double)*(float *)(*(long *)(param_2 + 0xe) + (long)local_30 * 4);
goto LAB_00180630;
case 0x20:
dVar8 = *(double *)(*(long *)(param_2 + 0xe) + (long)local_30 * 8);
LAB_00180630:
uVar5 = (ulong)dVar8 & 0xffffffff00000000;
auVar10._8_8_ = 7;
auVar10._0_8_ = dVar8;
goto LAB_00180507;
default:
/* WARNING: Subroutine does not return */
abort();
}
uVar5 = 0;
auVar10._8_8_ = 0;
auVar10._0_8_ = uVar7;
LAB_00180507:
auVar9._0_8_ = auVar10._0_8_ & 0xffffffff | uVar5;
auVar9._8_8_ = auVar10._8_8_;
return auVar9;
}
| |
29,850 | minja::ExpressionNode::ExpressionNode(minja::Location const&, std::shared_ptr<minja::Expression>&&) | monkey531[P]llama/common/minja.hpp | TemplateNode(const Location & location) : location_(location) {} | O3 | cpp | minja::ExpressionNode::ExpressionNode(minja::Location const&, std::shared_ptr<minja::Expression>&&):
leaq 0x898f3(%rip), %rax # 0x12afd8
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 0xa1715
movq 0x8a881(%rip), %rcx # 0x12bf88
cmpb $0x0, (%rcx)
je 0xa1711
incl 0x8(%rax)
jmp 0xa1715
lock
incl 0x8(%rax)
movq 0x10(%rsi), %rax
movq %rax, 0x18(%rdi)
leaq 0x89f04(%rip), %rax # 0x12b628
addq $0x10, %rax
movq %rax, (%rdi)
movups (%rdx), %xmm0
movups %xmm0, 0x20(%rdi)
movq 0x10(%rdx), %rax
movq %rax, 0x30(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdx)
movq $0x0, 0x10(%rdx)
retq
nop
| _ZN5minja12SequenceNodeC2ERKNS_8LocationEOSt6vectorISt10shared_ptrINS_12TemplateNodeEESaIS7_EE:
lea rax, _ZTVN5minja12TemplateNodeE; `vtable for'minja::TemplateNode
add rax, 10h
mov [rdi], rax
mov rax, [rsi]
mov [rdi+8], rax
mov rax, [rsi+8]
mov [rdi+10h], rax
test rax, rax
jz short loc_A1715
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_A1711
inc dword ptr [rax+8]
jmp short loc_A1715
loc_A1711:
lock inc dword ptr [rax+8]
loc_A1715:
mov rax, [rsi+10h]
mov [rdi+18h], rax
lea rax, _ZTVN5minja12SequenceNodeE; `vtable for'minja::SequenceNode
add rax, 10h
mov [rdi], rax
movups xmm0, xmmword ptr [rdx]
movups xmmword ptr [rdi+20h], xmm0
mov rax, [rdx+10h]
mov [rdi+30h], rax
xorps xmm0, xmm0
movups xmmword ptr [rdx], xmm0
mov qword ptr [rdx+10h], 0
retn
| long long minja::SequenceNode::SequenceNode(long long a1, _QWORD *a2, long long a3)
{
long long v3; // rax
long long result; // rax
*(_QWORD *)a1 = &`vtable for'minja::TemplateNode + 2;
*(_QWORD *)(a1 + 8) = *a2;
v3 = a2[1];
*(_QWORD *)(a1 + 16) = v3;
if ( v3 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v3 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v3 + 8));
}
*(_QWORD *)(a1 + 24) = a2[2];
*(_QWORD *)a1 = &`vtable for'minja::SequenceNode + 2;
*(_OWORD *)(a1 + 32) = *(_OWORD *)a3;
result = *(_QWORD *)(a3 + 16);
*(_QWORD *)(a1 + 48) = result;
*(_OWORD *)a3 = 0LL;
*(_QWORD *)(a3 + 16) = 0LL;
return result;
}
| SequenceNode:
LEA RAX,[0x22afd8]
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 0x001a1715
MOV RCX,qword ptr [0x0022bf88]
CMP byte ptr [RCX],0x0
JZ 0x001a1711
INC dword ptr [RAX + 0x8]
JMP 0x001a1715
LAB_001a1711:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001a1715:
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RDI + 0x18],RAX
LEA RAX,[0x22b628]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOVUPS XMM0,xmmword ptr [RDX]
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOV RAX,qword ptr [RDX + 0x10]
MOV qword ptr [RDI + 0x30],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDX],XMM0
MOV qword ptr [RDX + 0x10],0x0
RET
|
/* minja::SequenceNode::SequenceNode(minja::Location const&,
std::vector<std::shared_ptr<minja::TemplateNode>,
std::allocator<std::shared_ptr<minja::TemplateNode> > >&&) */
void __thiscall
minja::SequenceNode::SequenceNode(SequenceNode *this,Location *param_1,vector *param_2)
{
long lVar1;
int8 uVar2;
*(int ***)this = &PTR___cxa_pure_virtual_0022afe8;
*(int8 *)(this + 8) = *(int8 *)param_1;
lVar1 = *(long *)(param_1 + 8);
*(long *)(this + 0x10) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_0022bf88 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10);
*(int ***)this = &PTR_do_render_0022b638;
uVar2 = *(int8 *)(param_2 + 8);
*(int8 *)(this + 0x20) = *(int8 *)param_2;
*(int8 *)(this + 0x28) = uVar2;
*(int8 *)(this + 0x30) = *(int8 *)(param_2 + 0x10);
*(int8 *)param_2 = 0;
*(int8 *)(param_2 + 8) = 0;
*(int8 *)(param_2 + 0x10) = 0;
return;
}
| |
29,851 | my_printf_error | eloqsql/mysys/my_error.c | void my_printf_error(uint error, const char *format, myf MyFlags, ...)
{
va_list args;
char ebuff[ERRMSGSIZE];
DBUG_ENTER("my_printf_error");
DBUG_PRINT("my", ("nr: %d MyFlags: %lu errno: %d format: %s",
error, MyFlags, errno, format));
va_start(args,MyFlags);
(void) my_vsnprintf_ex(&my_charset_utf8mb3_general_ci, ebuff,
sizeof(ebuff), format, args);
va_end(args);
(*error_handler_hook)(error, ebuff, MyFlags);
DBUG_VOID_RETURN;
} | O3 | c | my_printf_error:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x2d8, %rsp # imm = 0x2D8
movq %rdx, %rbx
movq %rsi, %r10
movl %edi, %r14d
leaq -0x2f0(%rbp), %rdx
movq %rcx, 0x18(%rdx)
movq %r8, 0x20(%rdx)
movq %r9, 0x28(%rdx)
testb %al, %al
je 0x5e83d
movaps %xmm0, -0x2c0(%rbp)
movaps %xmm1, -0x2b0(%rbp)
movaps %xmm2, -0x2a0(%rbp)
movaps %xmm3, -0x290(%rbp)
movaps %xmm4, -0x280(%rbp)
movaps %xmm5, -0x270(%rbp)
movaps %xmm6, -0x260(%rbp)
movaps %xmm7, -0x250(%rbp)
movq %fs:0x28, %rax
movq %rax, -0x20(%rbp)
movabsq $0x3000000018, %rax # imm = 0x3000000018
leaq -0x240(%rbp), %r8
movq %rax, (%r8)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%r8)
movq %rdx, 0x10(%r8)
leaq 0x35267f(%rip), %rdi # 0x3b0ef0
leaq -0x220(%rbp), %r15
movl $0x200, %edx # imm = 0x200
movq %r15, %rsi
movq %r10, %rcx
callq 0x9135c
leaq 0x2df131(%rip), %rax # 0x33d9c0
movl %r14d, %edi
movq %r15, %rsi
movq %rbx, %rdx
callq *(%rax)
movq %fs:0x28, %rax
cmpq -0x20(%rbp), %rax
jne 0x5e8b7
addq $0x2d8, %rsp # imm = 0x2D8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x362b0
| my_printf_error:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 2D8h
mov rbx, rdx
mov r10, rsi
mov r14d, edi
lea rdx, [rbp+var_2F0]
mov [rdx+18h], rcx
mov [rdx+20h], r8
mov [rdx+28h], r9
test al, al
jz short loc_5E83D
movaps [rbp+var_2C0], xmm0
movaps [rbp+var_2B0], xmm1
movaps [rbp+var_2A0], xmm2
movaps [rbp+var_290], xmm3
movaps [rbp+var_280], xmm4
movaps [rbp+var_270], xmm5
movaps [rbp+var_260], xmm6
movaps [rbp+var_250], xmm7
loc_5E83D:
mov rax, fs:28h
mov [rbp+var_20], rax
mov rax, 3000000018h
lea r8, [rbp+var_240]
mov [r8], rax
lea rax, [rbp+arg_0]
mov [r8+8], rax
mov [r8+10h], rdx
lea rdi, my_charset_utf8mb3_general_ci
lea r15, [rbp+var_220]
mov edx, 200h
mov rsi, r15
mov rcx, r10
call my_vsnprintf_ex
lea rax, error_handler_hook
mov edi, r14d
mov rsi, r15
mov rdx, rbx
call qword ptr [rax]
mov rax, fs:28h
cmp rax, [rbp+var_20]
jnz short loc_5E8B7
add rsp, 2D8h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_5E8B7:
call ___stack_chk_fail
| unsigned long long my_printf_error(
__m128 a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
long long a9,
long long a10,
long long a11,
long long a12,
long long a13,
long long a14,
char a15)
{
char v16; // [rsp+0h] [rbp-2F0h] BYREF
long long v17; // [rsp+18h] [rbp-2D8h]
long long v18; // [rsp+20h] [rbp-2D0h]
long long v19; // [rsp+28h] [rbp-2C8h]
__m128 v20; // [rsp+30h] [rbp-2C0h]
__m128 v21; // [rsp+40h] [rbp-2B0h]
__m128 v22; // [rsp+50h] [rbp-2A0h]
__m128 v23; // [rsp+60h] [rbp-290h]
__m128 v24; // [rsp+70h] [rbp-280h]
__m128 v25; // [rsp+80h] [rbp-270h]
__m128 v26; // [rsp+90h] [rbp-260h]
__m128 v27; // [rsp+A0h] [rbp-250h]
_QWORD v28[4]; // [rsp+B0h] [rbp-240h] BYREF
_BYTE v29[512]; // [rsp+D0h] [rbp-220h] BYREF
unsigned long long v30; // [rsp+2D0h] [rbp-20h]
v20 = a1;
v21 = a2;
v22 = a3;
v23 = a4;
v24 = a5;
v25 = a6;
v26 = a7;
v27 = a8;
v17 = a12;
v18 = a13;
v19 = a14;
v30 = __readfsqword(0x28u);
v28[0] = 0x3000000018LL;
v28[1] = &a15;
v28[2] = &v16;
my_vsnprintf_ex(&my_charset_utf8mb3_general_ci, v29, 512LL, a10, v28);
error_handler_hook();
return __readfsqword(0x28u);
}
| my_printf_error:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x2d8
MOV RBX,RDX
MOV R10,RSI
MOV R14D,EDI
LEA RDX,[RBP + -0x2f0]
MOV qword ptr [RDX + 0x18],RCX
MOV qword ptr [RDX + 0x20],R8
MOV qword ptr [RDX + 0x28],R9
TEST AL,AL
JZ 0x0015e83d
MOVAPS xmmword ptr [RBP + -0x2c0],XMM0
MOVAPS xmmword ptr [RBP + -0x2b0],XMM1
MOVAPS xmmword ptr [RBP + -0x2a0],XMM2
MOVAPS xmmword ptr [RBP + -0x290],XMM3
MOVAPS xmmword ptr [RBP + -0x280],XMM4
MOVAPS xmmword ptr [RBP + -0x270],XMM5
MOVAPS xmmword ptr [RBP + -0x260],XMM6
MOVAPS xmmword ptr [RBP + -0x250],XMM7
LAB_0015e83d:
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,0x3000000018
LEA R8,[RBP + -0x240]
MOV qword ptr [R8],RAX
LEA RAX,[RBP + 0x10]
MOV qword ptr [R8 + 0x8],RAX
MOV qword ptr [R8 + 0x10],RDX
LEA RDI,[0x4b0ef0]
LEA R15,[RBP + -0x220]
MOV EDX,0x200
MOV RSI,R15
MOV RCX,R10
CALL 0x0019135c
LEA RAX,[0x43d9c0]
MOV EDI,R14D
MOV RSI,R15
MOV RDX,RBX
CALL qword ptr [RAX]
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x0015e8b7
ADD RSP,0x2d8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0015e8b7:
CALL 0x001362b0
|
void my_printf_error(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int4 param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
long in_FS_OFFSET;
int1 local_2f8 [24];
int8 local_2e0;
int8 local_2d8;
int8 local_2d0;
int8 local_2c8;
int8 local_2b8;
int8 local_2a8;
int8 local_298;
int8 local_288;
int8 local_278;
int8 local_268;
int8 local_258;
int8 local_248;
int1 *local_240;
int1 *local_238;
int1 local_228 [512];
long local_28;
local_238 = local_2f8;
if (in_AL != '\0') {
local_2c8 = param_1;
local_2b8 = param_2;
local_2a8 = param_3;
local_298 = param_4;
local_288 = param_5;
local_278 = param_6;
local_268 = param_7;
local_258 = param_8;
}
local_28 = *(long *)(in_FS_OFFSET + 0x28);
local_248 = 0x3000000018;
local_240 = &stack0x00000008;
local_2e0 = param_12;
local_2d8 = param_13;
local_2d0 = param_14;
my_vsnprintf_ex(my_charset_utf8mb3_general_ci,local_228,0x200,param_10);
(*(code *)error_handler_hook)(param_9,local_228,param_11);
if (*(long *)(in_FS_OFFSET + 0x28) == local_28) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
29,852 | JS_NewDate | bluesky950520[P]quickjs/quickjs.c | JSValue JS_NewDate(JSContext *ctx, double epoch_ms)
{
JSValue obj = js_create_from_ctor(ctx, JS_UNDEFINED, JS_CLASS_DATE);
if (JS_IsException(obj))
return JS_EXCEPTION;
JS_SetObjectData(ctx, obj, js_float64(time_clip(epoch_ms)));
return obj;
} | O1 | c | JS_NewDate:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movapd %xmm0, (%rsp)
movq %rdi, %rbx
xorl %r12d, %r12d
movl $0x3, %edx
xorl %esi, %esi
movl $0xa, %ecx
callq 0x36d56
movq %rdx, %r15
movl $0x6, %edx
cmpl $0x6, %r15d
je 0x36d47
movq %rax, %r14
movapd 0x67a78(%rip), %xmm2 # 0x9e770
movapd (%rsp), %xmm0
andpd %xmm0, %xmm2
movsd 0x67bd7(%rip), %xmm1 # 0x9e8e0
ucomisd %xmm2, %xmm1
jae 0x36d1b
movabsq $0x7ff8000000000000, %rcx # imm = 0x7FF8000000000000
jmp 0x36d2d
callq 0xe140
xorpd %xmm1, %xmm1
addsd %xmm0, %xmm1
movq %xmm1, %rcx
movl $0x7, %r8d
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x36e62
movq %r15, %rdx
movq %r14, %r12
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| JS_NewDate:
push r15
push r14
push r12
push rbx
sub rsp, 18h
movapd [rsp+38h+var_38], xmm0
mov rbx, rdi
xor r12d, r12d
mov edx, 3
xor esi, esi
mov ecx, 0Ah
call js_create_from_ctor
mov r15, rdx
mov edx, 6
cmp r15d, 6
jz short loc_36D47
mov r14, rax
movapd xmm2, cs:xmmword_9E770
movapd xmm0, [rsp+38h+var_38]
andpd xmm2, xmm0
movsd xmm1, cs:qword_9E8E0
ucomisd xmm1, xmm2
jnb short loc_36D1B
mov rcx, 7FF8000000000000h
jmp short loc_36D2D
loc_36D1B:
call _trunc
xorpd xmm1, xmm1
addsd xmm1, xmm0
movq rcx, xmm1
loc_36D2D:
mov r8d, 7
mov rdi, rbx
mov rsi, r14
mov rdx, r15
call JS_SetObjectData
mov rdx, r15
mov r12, r14
loc_36D47:
mov rax, r12
add rsp, 18h
pop rbx
pop r12
pop r14
pop r15
retn
| long long JS_NewDate(long long a1, double a2)
{
long long v2; // r12
long long v3; // rax
long long v4; // rdx
long long v5; // r15
long long v6; // r14
double v7; // rcx
v2 = 0LL;
v3 = js_create_from_ctor(a1, 0LL, 3LL, 10LL);
v5 = v4;
if ( (_DWORD)v4 != 6 )
{
v6 = v3;
if ( fabs(a2) <= 8.64e15 )
v7 = trunc(a1, 0LL, 6LL) + 0.0;
else
v7 = NAN;
JS_SetObjectData(a1, v6, v5, *(_QWORD *)&v7, 7LL);
return v6;
}
return v2;
}
| JS_NewDate:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x18
MOVAPD xmmword ptr [RSP],XMM0
MOV RBX,RDI
XOR R12D,R12D
MOV EDX,0x3
XOR ESI,ESI
MOV ECX,0xa
CALL 0x00136d56
MOV R15,RDX
MOV EDX,0x6
CMP R15D,0x6
JZ 0x00136d47
MOV R14,RAX
MOVAPD XMM2,xmmword ptr [0x0019e770]
MOVAPD XMM0,xmmword ptr [RSP]
ANDPD XMM2,XMM0
MOVSD XMM1,qword ptr [0x0019e8e0]
UCOMISD XMM1,XMM2
JNC 0x00136d1b
MOV RCX,0x7ff8000000000000
JMP 0x00136d2d
LAB_00136d1b:
CALL 0x0010e140
XORPD XMM1,XMM1
ADDSD XMM1,XMM0
MOVQ RCX,XMM1
LAB_00136d2d:
MOV R8D,0x7
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R15
CALL 0x00136e62
MOV RDX,R15
MOV R12,R14
LAB_00136d47:
MOV RAX,R12
ADD RSP,0x18
POP RBX
POP R12
POP R14
POP R15
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int1 [16] JS_NewDate(double param_1,int8 param_2)
{
int1 auVar1 [16];
double dVar2;
int1 auVar3 [16];
auVar3 = js_create_from_ctor(param_2,0,3,10);
auVar1 = ZEXT816(6) << 0x40;
if (auVar3._8_4_ != 6) {
if ((double)(_DAT_0019e770 & (ulong)param_1) <= DAT_0019e8e0) {
dVar2 = trunc(param_1);
dVar2 = dVar2 + 0.0;
}
else {
dVar2 = NAN;
}
JS_SetObjectData(param_2,auVar3._0_8_,auVar3._8_8_,dVar2,7);
auVar1 = auVar3;
}
return auVar1;
}
| |
29,853 | JS_NewDate | bluesky950520[P]quickjs/quickjs.c | JSValue JS_NewDate(JSContext *ctx, double epoch_ms)
{
JSValue obj = js_create_from_ctor(ctx, JS_UNDEFINED, JS_CLASS_DATE);
if (JS_IsException(obj))
return JS_EXCEPTION;
JS_SetObjectData(ctx, obj, js_float64(time_clip(epoch_ms)));
return obj;
} | O2 | c | JS_NewDate:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movapd %xmm0, (%rsp)
movq %rdi, %r15
pushq $0x3
popq %rdx
pushq $0xa
popq %rcx
xorl %esi, %esi
callq 0x3045a
movq %rdx, %rbx
cmpl $0x6, %ebx
jne 0x303f8
pushq $0x6
popq %rbx
xorl %r14d, %r14d
jmp 0x3044a
movq %rax, %r14
movapd 0x552fd(%rip), %xmm2 # 0x85700
movapd (%rsp), %xmm0
andpd %xmm0, %xmm2
movsd 0x553fc(%rip), %xmm1 # 0x85810
ucomisd %xmm2, %xmm1
jae 0x30426
movabsq $0x7ff8000000000000, %rcx # imm = 0x7FF8000000000000
jmp 0x30438
callq 0xe150
xorpd %xmm1, %xmm1
addsd %xmm0, %xmm1
movq %xmm1, %rcx
pushq $0x7
popq %r8
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x3055c
movq %r14, %rax
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
| JS_NewDate:
push r15
push r14
push rbx
sub rsp, 10h
movapd [rsp+28h+var_28], xmm0
mov r15, rdi
push 3
pop rdx
push 0Ah
pop rcx
xor esi, esi
call js_create_from_ctor
mov rbx, rdx
cmp ebx, 6
jnz short loc_303F8
push 6
pop rbx
xor r14d, r14d
jmp short loc_3044A
loc_303F8:
mov r14, rax
movapd xmm2, cs:xmmword_85700
movapd xmm0, [rsp+28h+var_28]
andpd xmm2, xmm0
movsd xmm1, cs:qword_85810
ucomisd xmm1, xmm2
jnb short loc_30426
mov rcx, 7FF8000000000000h
jmp short loc_30438
loc_30426:
call _trunc
xorpd xmm1, xmm1
addsd xmm1, xmm0
movq rcx, xmm1
loc_30438:
push 7
pop r8
mov rdi, r15
mov rsi, r14
mov rdx, rbx
call JS_SetObjectData
loc_3044A:
mov rax, r14
mov rdx, rbx
add rsp, 10h
pop rbx
pop r14
pop r15
retn
| long long JS_NewDate(long long a1, double a2)
{
long long v2; // rax
long long v3; // rdx
long long v4; // rbx
long long v5; // r14
double v6; // rcx
v2 = js_create_from_ctor(a1, 0LL, 3LL, 10LL);
v4 = v3;
if ( (_DWORD)v3 == 6 )
return 0LL;
v5 = v2;
if ( fabs(a2) <= 8.64e15 )
v6 = trunc() + 0.0;
else
v6 = NAN;
JS_SetObjectData(a1, v5, v4, *(_QWORD *)&v6, 7LL);
return v5;
}
| JS_NewDate:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOVAPD xmmword ptr [RSP],XMM0
MOV R15,RDI
PUSH 0x3
POP RDX
PUSH 0xa
POP RCX
XOR ESI,ESI
CALL 0x0013045a
MOV RBX,RDX
CMP EBX,0x6
JNZ 0x001303f8
PUSH 0x6
POP RBX
XOR R14D,R14D
JMP 0x0013044a
LAB_001303f8:
MOV R14,RAX
MOVAPD XMM2,xmmword ptr [0x00185700]
MOVAPD XMM0,xmmword ptr [RSP]
ANDPD XMM2,XMM0
MOVSD XMM1,qword ptr [0x00185810]
UCOMISD XMM1,XMM2
JNC 0x00130426
MOV RCX,0x7ff8000000000000
JMP 0x00130438
LAB_00130426:
CALL 0x0010e150
XORPD XMM1,XMM1
ADDSD XMM1,XMM0
MOVQ RCX,XMM1
LAB_00130438:
PUSH 0x7
POP R8
MOV RDI,R15
MOV RSI,R14
MOV RDX,RBX
CALL 0x0013055c
LAB_0013044a:
MOV RAX,R14
MOV RDX,RBX
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int1 [16] JS_NewDate(double param_1,int8 param_2)
{
double dVar1;
int1 auVar2 [16];
auVar2 = js_create_from_ctor(param_2,0,3,10);
if (auVar2._8_4_ == 6) {
auVar2 = ZEXT816(6) << 0x40;
}
else {
if ((double)(_DAT_00185700 & (ulong)param_1) <= DAT_00185810) {
dVar1 = trunc(param_1);
dVar1 = dVar1 + 0.0;
}
else {
dVar1 = NAN;
}
JS_SetObjectData(param_2,auVar2._0_8_,auVar2._8_8_,dVar1,7);
}
return auVar2;
}
| |
29,854 | lf_alloc_destroy | eloqsql/mysys/lf_alloc-pin.c | void lf_alloc_destroy(LF_ALLOCATOR *allocator)
{
uchar *node= allocator->top;
while (node)
{
uchar *tmp= anext_node(node);
if (allocator->destructor)
allocator->destructor(node);
my_free(node);
node= tmp;
}
lf_pinbox_destroy(&allocator->pinbox);
allocator->top= 0;
} | O3 | c | lf_alloc_destroy:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x48(%rdi), %r14
testq %r14, %r14
je 0xac538
movl 0x38(%rbx), %eax
movq (%r14,%rax), %r15
movq 0x60(%rbx), %rax
testq %rax, %rax
je 0xac528
movq %r14, %rdi
callq *%rax
movq %r14, %rdi
callq 0xa6612
movq %r15, %r14
testq %r15, %r15
jne 0xac513
movq %rbx, %rdi
callq 0xac6cb
movq $0x0, 0x48(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| lf_alloc_destroy:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov r14, [rdi+48h]
test r14, r14
jz short loc_AC538
loc_AC513:
mov eax, [rbx+38h]
mov r15, [r14+rax]
mov rax, [rbx+60h]
test rax, rax
jz short loc_AC528
mov rdi, r14
call rax
loc_AC528:
mov rdi, r14
call my_free
mov r14, r15
test r15, r15
jnz short loc_AC513
loc_AC538:
mov rdi, rbx
call lf_dynarray_destroy
mov qword ptr [rbx+48h], 0
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long lf_alloc_destroy(long long a1)
{
long long v1; // r14
long long v2; // r15
void ( *v3)(long long); // rax
long long result; // rax
v1 = *(_QWORD *)(a1 + 72);
if ( v1 )
{
do
{
v2 = *(_QWORD *)(v1 + *(unsigned int *)(a1 + 56));
v3 = *(void ( **)(long long))(a1 + 96);
if ( v3 )
v3(v1);
my_free(v1);
v1 = v2;
}
while ( v2 );
}
result = lf_dynarray_destroy(a1);
*(_QWORD *)(a1 + 72) = 0LL;
return result;
}
| lf_alloc_destroy:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R14,qword ptr [RDI + 0x48]
TEST R14,R14
JZ 0x001ac538
LAB_001ac513:
MOV EAX,dword ptr [RBX + 0x38]
MOV R15,qword ptr [R14 + RAX*0x1]
MOV RAX,qword ptr [RBX + 0x60]
TEST RAX,RAX
JZ 0x001ac528
MOV RDI,R14
CALL RAX
LAB_001ac528:
MOV RDI,R14
CALL 0x001a6612
MOV R14,R15
TEST R15,R15
JNZ 0x001ac513
LAB_001ac538:
MOV RDI,RBX
CALL 0x001ac6cb
MOV qword ptr [RBX + 0x48],0x0
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void lf_alloc_destroy(long param_1)
{
long lVar1;
long lVar2;
lVar2 = *(long *)(param_1 + 0x48);
while (lVar2 != 0) {
lVar1 = *(long *)(lVar2 + (ulong)*(uint *)(param_1 + 0x38));
if (*(code **)(param_1 + 0x60) != (code *)0x0) {
(**(code **)(param_1 + 0x60))(lVar2);
}
my_free(lVar2);
lVar2 = lVar1;
}
lf_dynarray_destroy(param_1);
*(int8 *)(param_1 + 0x48) = 0;
return;
}
| |
29,855 | my_strtod | eloqsql/strings/dtoa.c | double my_strtod(const char *str, char **end, int *error)
{
char buf[DTOA_BUFF_SIZE];
double res;
DBUG_ASSERT(end != NULL && ((str != NULL && *end != NULL) ||
(str == NULL && *end == NULL)) &&
error != NULL);
res= my_strtod_int(str, end, error, buf, sizeof(buf));
return (*error == 0) ? res : (res < 0 ? -DBL_MAX : DBL_MAX);
} | O0 | c | my_strtod:
pushq %rbp
movq %rsp, %rbp
subq $0xea0, %rsp # imm = 0xEA0
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0xe78(%rbp)
movq %rsi, -0xe80(%rbp)
movq %rdx, -0xe88(%rbp)
jmp 0x72b0f
movq -0xe78(%rbp), %rdi
movq -0xe80(%rbp), %rsi
movq -0xe88(%rbp), %rdx
leaq -0xe70(%rbp), %rcx
movl $0xe60, %r8d # imm = 0xE60
callq 0x72bd0
movsd %xmm0, -0xe90(%rbp)
movq -0xe88(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x72b5c
movsd -0xe90(%rbp), %xmm0
movsd %xmm0, -0xe98(%rbp)
jmp 0x72b93
movsd -0xe90(%rbp), %xmm0
movsd 0x852c(%rip), %xmm3 # 0x7b098
movsd 0x852c(%rip), %xmm2 # 0x7b0a0
xorps %xmm1, %xmm1
cmpltsd %xmm1, %xmm0
movaps %xmm0, %xmm1
andpd %xmm3, %xmm1
andnpd %xmm2, %xmm0
orpd %xmm1, %xmm0
movsd %xmm0, -0xe98(%rbp)
movsd -0xe98(%rbp), %xmm0
movsd %xmm0, -0xea0(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x72bc6
movsd -0xea0(%rbp), %xmm0
addq $0xea0, %rsp # imm = 0xEA0
popq %rbp
retq
callq 0x242f0
nopl (%rax,%rax)
| my_strtod:
push rbp
mov rbp, rsp
sub rsp, 0EA0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_E78], rdi
mov [rbp+var_E80], rsi
mov [rbp+var_E88], rdx
jmp short $+2
loc_72B0F:
mov rdi, [rbp+var_E78]
mov rsi, [rbp+var_E80]
mov rdx, [rbp+var_E88]
lea rcx, [rbp+var_E70]
mov r8d, 0E60h
call my_strtod_int
movsd [rbp+var_E90], xmm0
mov rax, [rbp+var_E88]
cmp dword ptr [rax], 0
jnz short loc_72B5C
movsd xmm0, [rbp+var_E90]
movsd [rbp+var_E98], xmm0
jmp short loc_72B93
loc_72B5C:
movsd xmm0, [rbp+var_E90]
movsd xmm3, cs:qword_7B098
movsd xmm2, cs:qword_7B0A0
xorps xmm1, xmm1
cmpltsd xmm0, xmm1
movaps xmm1, xmm0
andpd xmm1, xmm3
andnpd xmm0, xmm2
orpd xmm0, xmm1
movsd [rbp+var_E98], xmm0
loc_72B93:
movsd xmm0, [rbp+var_E98]
movsd [rbp+var_EA0], xmm0
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_72BC6
movsd xmm0, [rbp+var_EA0]
add rsp, 0EA0h
pop rbp
retn
loc_72BC6:
call ___stack_chk_fail
| double my_strtod(long long a1, long long a2, _DWORD *a3)
{
__m128d v3; // xmm1
double v4; // xmm0_8
double v6; // [rsp+8h] [rbp-E98h]
double v7; // [rsp+10h] [rbp-E90h]
_BYTE v9[3688]; // [rsp+30h] [rbp-E70h] BYREF
unsigned long long v10; // [rsp+E98h] [rbp-8h]
v10 = __readfsqword(0x28u);
v7 = my_strtod_int(a1, a2, a3, v9, 3680LL);
if ( !*a3 )
return v7;
v3.m128d_f64[0] = 0.0;
v4 = _mm_cmplt_sd((__m128d)*(unsigned long long *)&v7, v3).m128d_f64[0];
*(_QWORD *)&v6 = ~*(_QWORD *)&v4 & 0x7FEFFFFFFFFFFFFFLL | *(_QWORD *)&v4 & 0xFFEFFFFFFFFFFFFFLL;
return v6;
}
| my_strtod:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xea0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0xe78],RDI
MOV qword ptr [RBP + -0xe80],RSI
MOV qword ptr [RBP + -0xe88],RDX
JMP 0x00172b0f
LAB_00172b0f:
MOV RDI,qword ptr [RBP + -0xe78]
MOV RSI,qword ptr [RBP + -0xe80]
MOV RDX,qword ptr [RBP + -0xe88]
LEA RCX,[RBP + -0xe70]
MOV R8D,0xe60
CALL 0x00172bd0
MOVSD qword ptr [RBP + -0xe90],XMM0
MOV RAX,qword ptr [RBP + -0xe88]
CMP dword ptr [RAX],0x0
JNZ 0x00172b5c
MOVSD XMM0,qword ptr [RBP + -0xe90]
MOVSD qword ptr [RBP + -0xe98],XMM0
JMP 0x00172b93
LAB_00172b5c:
MOVSD XMM0,qword ptr [RBP + -0xe90]
MOVSD XMM3,qword ptr [0x0017b098]
MOVSD XMM2,qword ptr [0x0017b0a0]
XORPS XMM1,XMM1
CMPLTSD XMM0,XMM1
MOVAPS XMM1,XMM0
ANDPD XMM1,XMM3
ANDNPD XMM0,XMM2
ORPD XMM0,XMM1
MOVSD qword ptr [RBP + -0xe98],XMM0
LAB_00172b93:
MOVSD XMM0,qword ptr [RBP + -0xe98]
MOVSD qword ptr [RBP + -0xea0],XMM0
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00172bc6
MOVSD XMM0,qword ptr [RBP + -0xea0]
ADD RSP,0xea0
POP RBP
RET
LAB_00172bc6:
CALL 0x001242f0
|
double my_strtod(int8 param_1,int8 param_2,int *param_3)
{
long in_FS_OFFSET;
double local_ea0;
int1 local_e78 [3688];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_ea0 = (double)my_strtod_int(param_1,param_2,param_3,local_e78,0xe60);
if (*param_3 != 0) {
local_ea0 = (double)(~-(ulong)(local_ea0 < 0.0) & DAT_0017b0a0 |
-(ulong)(local_ea0 < 0.0) & DAT_0017b098);
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_ea0;
}
| |
29,856 | markdown_printer::~markdown_printer() | monkey531[P]llama/examples/llama-bench/llama-bench.cpp | static int get_field_width(const std::string & field) {
if (field == "model") {
return -30;
}
if (field == "t/s") {
return 20;
}
if (field == "size" || field == "params") {
return 10;
}
if (field == "n_gpu_layers") {
return 3;
}
if (field == "n_threads") {
return 7;
}
if (field == "n_batch") {
return 7;
}
if (field == "n_ubatch") {
return 8;
}
if (field == "type_k" || field == "type_v") {
return 6;
}
if (field == "split_mode") {
return 5;
}
if (field == "flash_attn") {
return 2;
}
if (field == "use_mmap") {
return 4;
}
if (field == "test") {
return 13;
}
int width = std::max((int) field.length(), 10);
if (test::get_field_type(field) == test::STRING) {
return -width;
}
return width;
} | O1 | cpp | markdown_printer::~markdown_printer():
pushq %rbx
movq %rdi, %rbx
leaq 0xba7ad(%rip), %rax # 0xf3060
movq %rax, (%rdi)
addq $0x10, %rdi
callq 0x249f4
movl $0x28, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x1a7f0
nop
| _ZN16markdown_printerD0Ev:
push rbx
mov rbx, rdi
lea rax, off_F3060
mov [rdi], rax
add rdi, 10h; void *
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov esi, 28h ; '('; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
| void markdown_printer::~markdown_printer(markdown_printer *this)
{
*(_QWORD *)this = off_F3060;
std::vector<std::string>::~vector((_QWORD *)this + 2);
operator delete(this, 0x28uLL);
}
| ~markdown_printer:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x1f3060]
MOV qword ptr [RDI],RAX
ADD RDI,0x10
CALL 0x001249f4
MOV ESI,0x28
MOV RDI,RBX
POP RBX
JMP 0x0011a7f0
|
/* markdown_printer::~markdown_printer() */
void __thiscall markdown_printer::~markdown_printer(markdown_printer *this)
{
*(int ***)this = &PTR__markdown_printer_001f3060;
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x10));
operator_delete(this,0x28);
return;
}
| |
29,857 | markdown_printer::~markdown_printer() | monkey531[P]llama/examples/llama-bench/llama-bench.cpp | static int get_field_width(const std::string & field) {
if (field == "model") {
return -30;
}
if (field == "t/s") {
return 20;
}
if (field == "size" || field == "params") {
return 10;
}
if (field == "n_gpu_layers") {
return 3;
}
if (field == "n_threads") {
return 7;
}
if (field == "n_batch") {
return 7;
}
if (field == "n_ubatch") {
return 8;
}
if (field == "type_k" || field == "type_v") {
return 6;
}
if (field == "split_mode") {
return 5;
}
if (field == "flash_attn") {
return 2;
}
if (field == "use_mmap") {
return 4;
}
if (field == "test") {
return 13;
}
int width = std::max((int) field.length(), 10);
if (test::get_field_type(field) == test::STRING) {
return -width;
}
return width;
} | O2 | cpp | markdown_printer::~markdown_printer():
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x5efb6(%rip), %rsi # 0x9a3c4
callq 0x29b97
testb %al, %al
je 0x3b41b
pushq $-0x1e
jmp 0x3b430
leaq 0x603fd(%rip), %rsi # 0x9b81f
movq %rbx, %rdi
callq 0x29b97
testb %al, %al
je 0x3b438
pushq $0x14
popq %rbp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x618f3(%rip), %rsi # 0x9cd32
movq %rbx, %rdi
callq 0x29b97
pushq $0xa
popq %rbp
testb %al, %al
jne 0x3b431
leaq 0x61ad0(%rip), %rsi # 0x9cf25
movq %rbx, %rdi
callq 0x29b97
testb %al, %al
jne 0x3b431
leaq 0x60230(%rip), %rsi # 0x9b698
movq %rbx, %rdi
callq 0x29b97
testb %al, %al
je 0x3b478
pushq $0x3
jmp 0x3b430
leaq 0x601ed(%rip), %rsi # 0x9b66c
movq %rbx, %rdi
callq 0x29b97
pushq $0x7
popq %rbp
testb %al, %al
jne 0x3b431
leaq 0x601c6(%rip), %rsi # 0x9b65b
movq %rbx, %rdi
callq 0x29b97
testb %al, %al
jne 0x3b431
leaq 0x601bb(%rip), %rsi # 0x9b663
movq %rbx, %rdi
callq 0x29b97
testb %al, %al
je 0x3b4bb
pushq $0x8
jmp 0x3b430
leaq 0x601c8(%rip), %rsi # 0x9b68a
movq %rbx, %rdi
callq 0x29b97
pushq $0x6
popq %rbp
testb %al, %al
jne 0x3b431
leaq 0x601b5(%rip), %rsi # 0x9b691
movq %rbx, %rdi
callq 0x29b97
testb %al, %al
jne 0x3b431
leaq 0x601b2(%rip), %rsi # 0x9b6a5
movq %rbx, %rdi
callq 0x29b97
testb %al, %al
je 0x3b506
pushq $0x5
jmp 0x3b430
leaq 0x601ba(%rip), %rsi # 0x9b6c7
movq %rbx, %rdi
callq 0x29b97
testb %al, %al
je 0x3b520
pushq $0x2
jmp 0x3b430
leaq 0x601b8(%rip), %rsi # 0x9b6df
movq %rbx, %rdi
callq 0x29b97
testb %al, %al
je 0x3b53a
pushq $0x4
jmp 0x3b430
leaq 0x602d9(%rip), %rsi # 0x9b81a
movq %rbx, %rdi
callq 0x29b97
testb %al, %al
je 0x3b554
pushq $0xd
jmp 0x3b430
movl 0x8(%rbx), %eax
cmpl $0xb, %eax
pushq $0xa
popq %r14
cmovgel %eax, %r14d
movq %rbx, %rdi
callq 0x3a38e
movl %r14d, %ebp
negl %ebp
testl %eax, %eax
cmovnel %r14d, %ebp
jmp 0x3b431
| _ZN16markdown_printer15get_field_widthERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r14
push rbx
mov rbx, rdi
lea rsi, aModel+2; "model"
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_3B41B
push 0FFFFFFFFFFFFFFE2h
jmp short loc_3B430
loc_3B41B:
lea rsi, aTS; "t/s"
mov rdi, rbx
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_3B438
push 14h
loc_3B430:
pop rbp
loc_3B431:
mov eax, ebp
pop rbx
pop r14
pop rbp
retn
loc_3B438:
lea rsi, aSize2Size+9; "size"
mov rdi, rbx
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
push 0Ah
pop rbp
test al, al
jnz short loc_3B431
lea rsi, aCommonInitFrom+11h; "params"
mov rdi, rbx
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jnz short loc_3B431
lea rsi, aNGpuLayers_0; "n_gpu_layers"
mov rdi, rbx
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_3B478
push 3
jmp short loc_3B430
loc_3B478:
lea rsi, aNThreads; "n_threads"
mov rdi, rbx
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
push 7
pop rbp
test al, al
jnz short loc_3B431
lea rsi, aNBatch; "n_batch"
mov rdi, rbx
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jnz short loc_3B431
lea rsi, aNUbatch; "n_ubatch"
mov rdi, rbx
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_3B4BB
push 8
jmp loc_3B430
loc_3B4BB:
lea rsi, aTypeK; "type_k"
mov rdi, rbx
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
push 6
pop rbp
test al, al
jnz loc_3B431
lea rsi, aTypeV; "type_v"
mov rdi, rbx
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jnz loc_3B431
lea rsi, aSplitMode_0; "split_mode"
mov rdi, rbx
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_3B506
push 5
jmp loc_3B430
loc_3B506:
lea rsi, aFlashAttn_0; "flash_attn"
mov rdi, rbx
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_3B520
push 2
jmp loc_3B430
loc_3B520:
lea rsi, aUseMmap; "use_mmap"
mov rdi, rbx
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_3B53A
push 4
jmp loc_3B430
loc_3B53A:
lea rsi, aTest; "test"
mov rdi, rbx
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_3B554
push 0Dh
jmp loc_3B430
loc_3B554:
mov eax, [rbx+8]
cmp eax, 0Bh
push 0Ah
pop r14
cmovge r14d, eax
mov rdi, rbx
call _ZN4test14get_field_typeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; test::get_field_type(std::string const&)
mov ebp, r14d
neg ebp
test eax, eax
cmovnz ebp, r14d
jmp loc_3B431
| long long markdown_printer::get_field_width(long long a1)
{
unsigned int v1; // ebp
unsigned int v3; // r14d
if ( std::operator==<char>(a1) )
return (unsigned int)-30;
if ( std::operator==<char>(a1) )
return 20;
v1 = 10;
if ( !std::operator==<char>(a1) && !std::operator==<char>(a1) )
{
if ( std::operator==<char>(a1) )
return 3;
v1 = 7;
if ( !std::operator==<char>(a1) && !std::operator==<char>(a1) )
{
if ( std::operator==<char>(a1) )
return 8;
v1 = 6;
if ( !std::operator==<char>(a1) && !std::operator==<char>(a1) )
{
if ( std::operator==<char>(a1) )
return 5;
if ( std::operator==<char>(a1) )
return 2;
if ( std::operator==<char>(a1) )
return 4;
if ( std::operator==<char>(a1) )
return 13;
v3 = 10;
if ( *(int *)(a1 + 8) >= 11 )
v3 = *(_DWORD *)(a1 + 8);
v1 = -v3;
if ( (unsigned int)test::get_field_type(a1) )
return v3;
}
}
}
return v1;
}
| get_field_width:
PUSH RBP
PUSH R14
PUSH RBX
MOV RBX,RDI
LEA RSI,[0x19a3c4]
CALL 0x00129b97
TEST AL,AL
JZ 0x0013b41b
PUSH -0x1e
JMP 0x0013b430
LAB_0013b41b:
LEA RSI,[0x19b81f]
MOV RDI,RBX
CALL 0x00129b97
TEST AL,AL
JZ 0x0013b438
PUSH 0x14
LAB_0013b430:
POP RBP
LAB_0013b431:
MOV EAX,EBP
POP RBX
POP R14
POP RBP
RET
LAB_0013b438:
LEA RSI,[0x19cd32]
MOV RDI,RBX
CALL 0x00129b97
PUSH 0xa
POP RBP
TEST AL,AL
JNZ 0x0013b431
LEA RSI,[0x19cf25]
MOV RDI,RBX
CALL 0x00129b97
TEST AL,AL
JNZ 0x0013b431
LEA RSI,[0x19b698]
MOV RDI,RBX
CALL 0x00129b97
TEST AL,AL
JZ 0x0013b478
PUSH 0x3
JMP 0x0013b430
LAB_0013b478:
LEA RSI,[0x19b66c]
MOV RDI,RBX
CALL 0x00129b97
PUSH 0x7
POP RBP
TEST AL,AL
JNZ 0x0013b431
LEA RSI,[0x19b65b]
MOV RDI,RBX
CALL 0x00129b97
TEST AL,AL
JNZ 0x0013b431
LEA RSI,[0x19b663]
MOV RDI,RBX
CALL 0x00129b97
TEST AL,AL
JZ 0x0013b4bb
PUSH 0x8
JMP 0x0013b430
LAB_0013b4bb:
LEA RSI,[0x19b68a]
MOV RDI,RBX
CALL 0x00129b97
PUSH 0x6
POP RBP
TEST AL,AL
JNZ 0x0013b431
LEA RSI,[0x19b691]
MOV RDI,RBX
CALL 0x00129b97
TEST AL,AL
JNZ 0x0013b431
LEA RSI,[0x19b6a5]
MOV RDI,RBX
CALL 0x00129b97
TEST AL,AL
JZ 0x0013b506
PUSH 0x5
JMP 0x0013b430
LAB_0013b506:
LEA RSI,[0x19b6c7]
MOV RDI,RBX
CALL 0x00129b97
TEST AL,AL
JZ 0x0013b520
PUSH 0x2
JMP 0x0013b430
LAB_0013b520:
LEA RSI,[0x19b6df]
MOV RDI,RBX
CALL 0x00129b97
TEST AL,AL
JZ 0x0013b53a
PUSH 0x4
JMP 0x0013b430
LAB_0013b53a:
LEA RSI,[0x19b81a]
MOV RDI,RBX
CALL 0x00129b97
TEST AL,AL
JZ 0x0013b554
PUSH 0xd
JMP 0x0013b430
LAB_0013b554:
MOV EAX,dword ptr [RBX + 0x8]
CMP EAX,0xb
PUSH 0xa
POP R14
CMOVGE R14D,EAX
MOV RDI,RBX
CALL 0x0013a38e
MOV EBP,R14D
NEG EBP
TEST EAX,EAX
CMOVNZ EBP,R14D
JMP 0x0013b431
|
/* markdown_printer::get_field_width(std::__cxx11::string const&) */
int markdown_printer::get_field_width(string *param_1)
{
bool bVar1;
int iVar2;
int iVar3;
int iVar4;
bVar1 = std::operator==(param_1,"model");
if (bVar1) {
iVar3 = -0x1e;
}
else {
bVar1 = std::operator==(param_1,"t/s");
if (bVar1) {
iVar3 = 0x14;
}
else {
bVar1 = std::operator==(param_1,"size");
iVar3 = 10;
if ((!bVar1) && (bVar1 = std::operator==(param_1,"params"), !bVar1)) {
bVar1 = std::operator==(param_1,"n_gpu_layers");
if (bVar1) {
iVar3 = 3;
}
else {
bVar1 = std::operator==(param_1,"n_threads");
iVar3 = 7;
if ((!bVar1) && (bVar1 = std::operator==(param_1,"n_batch"), !bVar1)) {
bVar1 = std::operator==(param_1,"n_ubatch");
if (bVar1) {
iVar3 = 8;
}
else {
bVar1 = std::operator==(param_1,"type_k");
iVar3 = 6;
if ((!bVar1) && (bVar1 = std::operator==(param_1,"type_v"), !bVar1)) {
bVar1 = std::operator==(param_1,"split_mode");
if (bVar1) {
iVar3 = 5;
}
else {
bVar1 = std::operator==(param_1,"flash_attn");
if (bVar1) {
iVar3 = 2;
}
else {
bVar1 = std::operator==(param_1,"use_mmap");
if (bVar1) {
iVar3 = 4;
}
else {
bVar1 = std::operator==(param_1,"test");
if (bVar1) {
iVar3 = 0xd;
}
else {
iVar4 = 10;
if (10 < *(int *)(param_1 + 8)) {
iVar4 = *(int *)(param_1 + 8);
}
iVar2 = test::get_field_type(param_1);
iVar3 = -iVar4;
if (iVar2 != 0) {
iVar3 = iVar4;
}
}
}
}
}
}
}
}
}
}
}
}
return iVar3;
}
| |
29,858 | maria_page_filler_set_bitmap | eloqsql/storage/maria/ma_pagecrc.c | my_bool maria_page_filler_set_bitmap(PAGECACHE_IO_HOOK_ARGS *args)
{
uchar *page= args->page;
MARIA_SHARE *share= (MARIA_SHARE *)args->data;
DBUG_ENTER("maria_page_filler_set_bitmap");
int4store_aligned(page + share->block_size - CRC_SIZE,
MARIA_NO_CRC_BITMAP_PAGE);
DBUG_RETURN(0);
} | O3 | c | maria_page_filler_set_bitmap:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rax
movq 0x10(%rdi), %rcx
movl 0x7bc(%rcx), %ecx
movl $0xfffffffe, -0x4(%rax,%rcx) # imm = 0xFFFFFFFE
xorl %eax, %eax
popq %rbp
retq
| maria_page_filler_set_bitmap:
push rbp
mov rbp, rsp
mov rax, [rdi]
mov rcx, [rdi+10h]
mov ecx, [rcx+7BCh]
mov dword ptr [rax+rcx-4], 0FFFFFFFEh
xor eax, eax
pop rbp
retn
| long long maria_page_filler_set_bitmap(_QWORD *a1)
{
*(_DWORD *)(*a1 + *(unsigned int *)(a1[2] + 1980LL) - 4LL) = -2;
return 0LL;
}
| maria_page_filler_set_bitmap:
PUSH RBP
MOV RBP,RSP
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RDI + 0x10]
MOV ECX,dword ptr [RCX + 0x7bc]
MOV dword ptr [RAX + RCX*0x1 + -0x4],0xfffffffe
XOR EAX,EAX
POP RBP
RET
|
int8 maria_page_filler_set_bitmap(long *param_1)
{
*(int4 *)(*param_1 + -4 + (ulong)*(uint *)(param_1[2] + 0x7bc)) = 0xfffffffe;
return 0;
}
| |
29,859 | my_fstat | eloqsql/mysys/my_lib.c | int my_fstat(File Filedes, MY_STAT *stat_area,
myf MyFlags __attribute__((unused)))
{
DBUG_ENTER("my_fstat");
DBUG_PRINT("my",("fd: %d MyFlags: %lu", Filedes, MyFlags));
#ifdef _WIN32
DBUG_RETURN(my_win_fstat(Filedes, stat_area));
#elif defined HAVE_valgrind
{
int s= fstat(Filedes, stat_area);
if (!s)
MSAN_STAT_WORKAROUND(stat_area);
DBUG_RETURN(s);
}
#else
DBUG_RETURN(fstat(Filedes, (struct stat *) stat_area));
#endif
} | O3 | c | my_fstat:
pushq %rbp
movq %rsp, %rbp
popq %rbp
jmp 0x29590
nopl (%rax)
| my_fstat:
push rbp
mov rbp, rsp
pop rbp
jmp _fstat64
| long long my_fstat()
{
return fstat64();
}
| my_fstat:
PUSH RBP
MOV RBP,RSP
POP RBP
JMP 0x00129590
|
void my_fstat(int param_1,stat64 *param_2)
{
fstat64(param_1,param_2);
return;
}
| |
29,860 | 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>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>, bool, nlohmann::json_abi_v3_11_3::detail::value_t) | hkr04[P]cpp-mcp/common/json.hpp | basic_json(initializer_list_t init,
bool type_deduction = true,
value_t manual_type = value_t::array)
{
// check if each element is an array with two elements whose first
// element is a string
bool is_an_object = std::all_of(init.begin(), init.end(),
[](const detail::json_ref<basic_json>& element_ref)
{
// The cast is to ensure op[size_type] is called, bearing in mind size_type may not be int;
// (many string types can be constructed from 0 via its null-pointer guise, so we get a
// broken call to op[key_type], the wrong semantics and a 4804 warning on Windows)
return element_ref->is_array() && element_ref->size() == 2 && (*element_ref)[static_cast<size_type>(0)].is_string();
});
// adjust type if type deduction is not wanted
if (!type_deduction)
{
// if array is wanted, do not create an object though possible
if (manual_type == value_t::array)
{
is_an_object = false;
}
// if object is wanted but impossible, throw an exception
if (JSON_HEDLEY_UNLIKELY(manual_type == value_t::object && !is_an_object))
{
JSON_THROW(type_error::create(301, "cannot create object from initializer list", nullptr));
}
}
if (is_an_object)
{
// the initializer list is a list of pairs -> create object
m_data.m_type = value_t::object;
m_data.m_value = value_t::object;
for (auto& element_ref : init)
{
auto element = element_ref.moved_or_copied();
m_data.m_value.object->emplace(
std::move(*((*element.m_data.m_value.array)[0].m_data.m_value.string)),
std::move((*element.m_data.m_value.array)[1]));
}
}
else
{
// the initializer list describes an array -> create array
m_data.m_type = value_t::array;
m_data.m_value.array = create<array_t>(init.begin(), init.end());
}
set_parents();
assert_invariant();
} | O0 | 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>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>, bool, nlohmann::json_abi_v3_11_3::detail::value_t):
subq $0x128, %rsp # imm = 0x128
movb %r8b, %al
movq %rsi, 0x118(%rsp)
movq %rdx, 0x120(%rsp)
movq %rdi, 0x110(%rsp)
andb $0x1, %cl
movb %cl, 0x10f(%rsp)
movb %al, 0x10e(%rsp)
movq 0x110(%rsp), %rdi
movq %rdi, 0x50(%rsp)
movq %rdi, %rax
movq %rax, 0x58(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
callq 0xba40
leaq 0x118(%rsp), %rdi
movq %rdi, 0x60(%rsp)
callq 0xe700
movq 0x60(%rsp), %rdi
movq %rax, 0x68(%rsp)
callq 0xe710
movq 0x68(%rsp), %rdi
movq %rax, %rsi
callq 0xe6c0
movb %al, 0x77(%rsp)
jmp 0x8427
movb 0x77(%rsp), %al
andb $0x1, %al
movb %al, 0x10d(%rsp)
testb $0x1, 0x10f(%rsp)
jne 0x8584
cmpb $0x2, 0x10e(%rsp)
jne 0x846f
movb $0x0, 0x10d(%rsp)
jmp 0x846f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
jmp 0x8769
xorl %eax, %eax
cmpb $0x1, 0x10e(%rsp)
movb %al, 0x4f(%rsp)
jne 0x848c
movb 0x10d(%rsp), %al
xorb $-0x1, %al
movb %al, 0x4f(%rsp)
movb 0x4f(%rsp), %al
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x849d
jmp 0x8582
movb $0x1, 0xd6(%rsp)
movl $0x20, %edi
callq 0x62b0
movq %rax, 0x38(%rsp)
leaq 0xd7(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x6980
movq 0x40(%rsp), %rdx
leaq 0x45e81(%rip), %rsi # 0x4e353
leaq 0xd8(%rsp), %rdi
callq 0x80f0
jmp 0x84e1
movq 0x38(%rsp), %rdi
xorl %eax, %eax
movl %eax, %ecx
movl $0x12d, %esi # imm = 0x12D
leaq 0xd8(%rsp), %rdx
callq 0xe750
jmp 0x84fe
movq 0x38(%rsp), %rdi
movb $0x0, 0xd6(%rsp)
leaq 0x64236(%rip), %rsi # 0x6c748
leaq 0x63d7(%rip), %rdx # 0xe8f0
callq 0x6940
jmp 0x8780
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
jmp 0x855a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x6360
leaq 0xd7(%rsp), %rdi
callq 0x6640
testb $0x1, 0xd6(%rsp)
jne 0x8573
jmp 0x857d
movq 0x38(%rsp), %rdi
callq 0x6420
jmp 0x8769
jmp 0x8584
testb $0x1, 0x10d(%rsp)
je 0x86f0
movq 0x58(%rsp), %rax
movb $0x1, (%rax)
leaq 0xc8(%rsp), %rdi
movl $0x1, %esi
callq 0xe900
jmp 0x85ae
movq 0x58(%rsp), %rax
movq 0xc8(%rsp), %rcx
movq %rcx, 0x8(%rax)
leaq 0x118(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq 0xc0(%rsp), %rdi
callq 0xe700
movq %rax, 0xb8(%rsp)
movq 0xc0(%rsp), %rdi
callq 0xe710
movq %rax, 0xb0(%rsp)
movq 0xb8(%rsp), %rax
cmpq 0xb0(%rsp), %rax
je 0x86ee
movq 0xb8(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0xa8(%rsp), %rsi
leaq 0x98(%rsp), %rdi
callq 0xeae0
jmp 0x8636
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0xa0(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xec40
movq 0x8(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0xa0(%rsp), %rdi
movl $0x1, %esi
callq 0xec40
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %rax, %rdx
callq 0xeb40
movb %dl, 0x2f(%rsp)
movq %rax, 0x30(%rsp)
jmp 0x868d
movb 0x2f(%rsp), %al
movq 0x30(%rsp), %rcx
movq %rcx, 0x88(%rsp)
movb %al, 0x90(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x87f0
movq 0xb8(%rsp), %rax
addq $0x18, %rax
movq %rax, 0xb8(%rsp)
jmp 0x85f9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x87f0
jmp 0x8769
jmp 0x8748
movq 0x58(%rsp), %rax
movb $0x2, (%rax)
leaq 0x118(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xe700
movq 0x8(%rsp), %rdi
movq %rax, 0x80(%rsp)
callq 0xe710
movq %rax, 0x78(%rsp)
leaq 0x80(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0xec60
movq %rax, 0x10(%rsp)
jmp 0x873a
movq 0x58(%rsp), %rax
movq 0x10(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq 0x58(%rsp), %rdi
callq 0xb1e0
movq 0x58(%rsp), %rdi
movl $0x1, %esi
callq 0x96f0
addq $0x128, %rsp # imm = 0x128
retq
movq 0x50(%rsp), %rdi
callq 0x9700
movq 0x100(%rsp), %rdi
callq 0x6970
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ESt16initializer_listINS0_6detail8json_refISD_EEEbNSF_7value_tE:
sub rsp, 128h
mov al, r8b
mov [rsp+128h+var_10], rsi
mov [rsp+128h+var_8], rdx
mov [rsp+128h+var_18], rdi
and cl, 1
mov [rsp+128h+var_19], cl
mov [rsp+128h+var_1A], al
mov rdi, [rsp+128h+var_18]
mov [rsp+128h+var_D8], rdi
mov rax, rdi
mov [rsp+128h+var_D0], rax
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataC2Ev; 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(void)
lea rdi, [rsp+128h+var_10]
mov [rsp+128h+var_C8], rdi
call _ZNKSt16initializer_listIN8nlohmann16json_abi_v3_11_36detail8json_refINS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEE5beginEv; std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::begin(void)
mov rdi, [rsp+128h+var_C8]
mov [rsp+128h+var_C0], rax
call _ZNKSt16initializer_listIN8nlohmann16json_abi_v3_11_36detail8json_refINS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEE3endEv; std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::end(void)
mov rdi, [rsp+128h+var_C0]
mov rsi, rax
call _ZSt6all_ofIPKN8nlohmann16json_abi_v3_11_36detail8json_refINS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEZNSG_C1ESt16initializer_listISH_EbNS2_7value_tEEUlRSI_E_EbT_SP_T0_; std::all_of<nlohmann::json_abi_v3_11_3::detail::json_ref<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>::(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<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>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::{lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<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&)#1}>(nlohmann::json_abi_v3_11_3::detail::json_ref<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::detail::json_ref<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>::(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<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>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::{lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<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&)#1})
mov [rsp+128h+var_B1], al
jmp short $+2
loc_8427:
mov al, [rsp+128h+var_B1]
and al, 1
mov [rsp+128h+var_1B], al
test [rsp+128h+var_19], 1
jnz loc_8584
cmp [rsp+128h+var_1A], 2
jnz short loc_846F
mov [rsp+128h+var_1B], 0
jmp short loc_846F
mov rcx, rax
mov eax, edx
mov [rsp+arg_F8], rcx
mov [rsp+arg_F4], eax
jmp loc_8769
loc_846F:
xor eax, eax
cmp [rsp+128h+var_1A], 1
mov [rsp+128h+var_D9], al
jnz short loc_848C
mov al, [rsp+128h+var_1B]
xor al, 0FFh
mov [rsp+128h+var_D9], al
loc_848C:
mov al, [rsp+128h+var_D9]
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_849D
jmp loc_8582
loc_849D:
mov [rsp+128h+var_52], 1
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov [rsp+128h+var_F0], rax
lea rdi, [rsp+128h+var_51]
mov [rsp+128h+var_E8], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rsp+128h+var_E8]
lea rsi, aCannotCreateOb; "cannot create object from initializer l"...
lea rdi, [rsp+128h+var_50]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_84E1:
mov rdi, [rsp+128h+var_F0]
xor eax, eax
mov ecx, eax
mov esi, 12Dh
lea rdx, [rsp+128h+var_50]
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_
jmp short $+2
loc_84FE:
mov rdi, [rsp+128h+var_F0]; void *
mov [rsp+128h+var_52], 0
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail10type_errorD2Ev; void (*)(void *)
call ___cxa_throw
jmp _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6objectESt16initializer_listINS0_6detail8json_refISD_EEE; 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>::object(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<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 rcx, rax
mov eax, edx
mov [rsp+arg_F8], rcx
mov [rsp+arg_F4], eax
jmp short loc_855A
mov rcx, rax
mov eax, edx
mov [rsp+arg_F8], rcx
mov [rsp+arg_F4], eax
lea rdi, [rsp+arg_D0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_855A:
lea rdi, [rsp+arg_CF]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
test [rsp+arg_CE], 1
jnz short loc_8573
jmp short loc_857D
loc_8573:
mov rdi, [rsp+arg_30]; void *
call ___cxa_free_exception
loc_857D:
jmp loc_8769
loc_8582:
jmp short $+2
loc_8584:
test [rsp+128h+var_1B], 1
jz loc_86F0
mov rax, [rsp+128h+var_D0]
mov byte ptr [rax], 1
lea rdi, [rsp+128h+var_60]
mov esi, 1
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10json_valueC2ENS0_6detail7value_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::json_value::json_value(nlohmann::json_abi_v3_11_3::detail::value_t)
jmp short $+2
loc_85AE:
mov rax, [rsp+128h+var_D0]
mov rcx, [rsp+128h+var_60]
mov [rax+8], rcx
lea rax, [rsp+128h+var_10]
mov [rsp+128h+var_68], rax
mov rdi, [rsp+128h+var_68]
call _ZNKSt16initializer_listIN8nlohmann16json_abi_v3_11_36detail8json_refINS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEE5beginEv; std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::begin(void)
mov [rsp+128h+var_70], rax
mov rdi, [rsp+128h+var_68]
call _ZNKSt16initializer_listIN8nlohmann16json_abi_v3_11_36detail8json_refINS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEE3endEv; std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::end(void)
mov [rsp+128h+var_78], rax
loc_85F9:
mov rax, [rsp+128h+var_70]
cmp rax, [rsp+128h+var_78]
jz loc_86EE
mov rax, [rsp+128h+var_70]
mov [rsp+128h+var_80], rax
mov rsi, [rsp+128h+var_80]
lea rdi, [rsp+128h+var_90]
call _ZNK8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15moved_or_copiedEv; nlohmann::json_abi_v3_11_3::detail::json_ref<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>>::moved_or_copied(void)
jmp short $+2
loc_8636:
mov rax, [rsp+128h+var_D0]
mov rax, [rax+8]
mov [rsp+128h+var_110], rax
mov rdi, [rsp+128h+var_88]
xor eax, eax
mov esi, eax
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EEixEm; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::operator[](ulong)
mov rax, [rax+8]
mov [rsp+128h+var_108], rax
mov rdi, [rsp+128h+var_88]
mov esi, 1
call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EEixEm; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::operator[](ulong)
mov rdi, [rsp+128h+var_110]
mov rsi, [rsp+128h+var_108]
mov rdx, rax
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 [rsp+128h+var_F9], dl
mov [rsp+128h+var_F8], rax
jmp short $+2
loc_868D:
mov al, [rsp+128h+var_F9]
mov rcx, [rsp+128h+var_F8]
mov [rsp+128h+var_A0], rcx
mov [rsp+128h+var_98], al
lea rdi, [rsp+128h+var_90]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
mov rax, [rsp+128h+var_70]
add rax, 18h
mov [rsp+128h+var_70], rax
jmp loc_85F9
mov rcx, rax
mov eax, edx
mov [rsp+arg_F8], rcx
mov [rsp+arg_F4], eax
lea rdi, [rsp+arg_90]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
jmp short loc_8769
loc_86EE:
jmp short loc_8748
loc_86F0:
mov rax, [rsp+128h+var_D0]
mov byte ptr [rax], 2
lea rdi, [rsp+128h+var_10]
mov [rsp+128h+var_120], rdi
call _ZNKSt16initializer_listIN8nlohmann16json_abi_v3_11_36detail8json_refINS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEE5beginEv; std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::begin(void)
mov rdi, [rsp+128h+var_120]
mov [rsp+128h+var_A8], rax
call _ZNKSt16initializer_listIN8nlohmann16json_abi_v3_11_36detail8json_refINS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEE3endEv; std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::end(void)
mov [rsp+128h+var_B0], rax
lea rdi, [rsp+128h+var_A8]
lea rsi, [rsp+128h+var_B0]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJPKNS0_6detail8json_refISD_EESL_EEEPT_DpOT0_; 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>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,nlohmann::json_abi_v3_11_3::detail::json_ref<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::detail::json_ref<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::detail::json_ref<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::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const* &&)
mov [rsp+128h+var_118], rax
jmp short $+2
loc_873A:
mov rax, [rsp+128h+var_D0]
mov rcx, [rsp+128h+var_118]
mov [rax+8], rcx
loc_8748:
mov rdi, [rsp+128h+var_D0]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE11set_parentsEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::set_parents(void)
mov rdi, [rsp+128h+var_D0]
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)
add rsp, 128h
retn
loc_8769:
mov rdi, [rsp+arg_48]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rsp+arg_F8]
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>::basic_json(
long long a1,
long long a2,
long long a3,
char a4,
char a5)
{
long long v5; // rsi
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
int v10; // r8d
int v11; // r9d
long long v12; // rax
char v13; // dl
int v14; // edx
int v15; // ecx
int v16; // r8d
int v17; // r9d
long long v19; // [rsp+18h] [rbp-110h]
long long v20; // [rsp+20h] [rbp-108h]
void *exception; // [rsp+38h] [rbp-F0h]
char v22; // [rsp+4Fh] [rbp-D9h]
long long v23; // [rsp+68h] [rbp-C0h]
long long v24; // [rsp+78h] [rbp-B0h] BYREF
_QWORD v25[2]; // [rsp+80h] [rbp-A8h] BYREF
char v26; // [rsp+90h] [rbp-98h]
_BYTE v27[8]; // [rsp+98h] [rbp-90h] BYREF
long long v28; // [rsp+A0h] [rbp-88h]
long long v29; // [rsp+A8h] [rbp-80h]
long long v30; // [rsp+B0h] [rbp-78h]
long long v31; // [rsp+B8h] [rbp-70h]
_QWORD *v32; // [rsp+C0h] [rbp-68h]
long long v33; // [rsp+C8h] [rbp-60h] BYREF
char v34; // [rsp+D6h] [rbp-52h]
char v35; // [rsp+D7h] [rbp-51h] BYREF
_BYTE v36[53]; // [rsp+D8h] [rbp-50h] BYREF
char v37; // [rsp+10Dh] [rbp-1Bh]
char v38; // [rsp+10Eh] [rbp-1Ah]
char v39; // [rsp+10Fh] [rbp-19h]
long long v40; // [rsp+110h] [rbp-18h]
_QWORD v41[2]; // [rsp+118h] [rbp-10h] BYREF
v41[0] = a2;
v41[1] = a3;
v40 = a1;
v39 = a4 & 1;
v38 = a5;
*(_OWORD *)a1 = 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>::data::data();
v23 = std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::begin(v41);
v5 = std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::end(v41);
v37 = std::all_of<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> const*,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::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<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>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::{lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> const&)#1}>(
v23,
v5) & 1;
if ( (v39 & 1) == 0 )
{
if ( v38 == 2 )
v37 = 0;
v22 = 0;
if ( v38 == 1 )
v22 = ~v37;
if ( (v22 & 1) != 0 )
{
exception = __cxa_allocate_exception(0x20uLL);
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>(
(long long)v36,
(long long)"cannot create object from initializer list",
(long long)&v35);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_(
(_DWORD)exception,
301,
(unsigned int)v36,
0,
v10,
v11);
v34 = 0;
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
nlohmann::json_abi_v3_11_3::detail::type_error::~type_error);
}
}
if ( (v37 & 1) != 0 )
{
*(_BYTE *)a1 = 1;
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>::json_value::json_value(
(unsigned int)&v33,
1,
v6,
v7,
v8,
v9);
*(_QWORD *)(a1 + 8) = v33;
v32 = v41;
v31 = std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::begin(v41);
v30 = std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::end(v41);
while ( v31 != v30 )
{
v29 = v31;
nlohmann::json_abi_v3_11_3::detail::json_ref<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>>::moved_or_copied(
v27,
v31);
v19 = *(_QWORD *)(a1 + 8);
v20 = *(_QWORD *)(std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::operator[](
v28,
0LL)
+ 8);
v12 = std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::operator[](
v28,
1LL);
v25[1] = 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(
v19,
v20,
v12);
v26 = v13;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json(v27);
v31 += 24LL;
}
}
else
{
*(_BYTE *)a1 = 2;
v25[0] = std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::begin(v41);
v24 = std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::end(v41);
*(_QWORD *)(a1 + 8) = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> const*>(
(unsigned int)v25,
(unsigned int)&v24,
v14,
v15,
v16,
v17);
}
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::set_parents(a1);
return nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(
a1,
1LL);
}
| basic_json:
SUB RSP,0x128
MOV AL,R8B
MOV qword ptr [RSP + 0x118],RSI
MOV qword ptr [RSP + 0x120],RDX
MOV qword ptr [RSP + 0x110],RDI
AND CL,0x1
MOV byte ptr [RSP + 0x10f],CL
MOV byte ptr [RSP + 0x10e],AL
MOV RDI,qword ptr [RSP + 0x110]
MOV qword ptr [RSP + 0x50],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x58],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
CALL 0x0010ba40
LEA RDI,[RSP + 0x118]
MOV qword ptr [RSP + 0x60],RDI
CALL 0x0010e700
MOV RDI,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x68],RAX
CALL 0x0010e710
MOV RDI,qword ptr [RSP + 0x68]
MOV RSI,RAX
LAB_0010841c:
CALL 0x0010e6c0
LAB_00108421:
MOV byte ptr [RSP + 0x77],AL
JMP 0x00108427
LAB_00108427:
MOV AL,byte ptr [RSP + 0x77]
AND AL,0x1
MOV byte ptr [RSP + 0x10d],AL
TEST byte ptr [RSP + 0x10f],0x1
JNZ 0x00108584
CMP byte ptr [RSP + 0x10e],0x2
JNZ 0x0010846f
MOV byte ptr [RSP + 0x10d],0x0
JMP 0x0010846f
LAB_0010846f:
XOR EAX,EAX
CMP byte ptr [RSP + 0x10e],0x1
MOV byte ptr [RSP + 0x4f],AL
JNZ 0x0010848c
MOV AL,byte ptr [RSP + 0x10d]
XOR AL,0xff
MOV byte ptr [RSP + 0x4f],AL
LAB_0010848c:
MOV AL,byte ptr [RSP + 0x4f]
XOR AL,0xff
XOR AL,0xff
TEST AL,0x1
JNZ 0x0010849d
JMP 0x00108582
LAB_0010849d:
MOV byte ptr [RSP + 0xd6],0x1
MOV EDI,0x20
CALL 0x001062b0
MOV qword ptr [RSP + 0x38],RAX
LEA RDI,[RSP + 0xd7]
MOV qword ptr [RSP + 0x40],RDI
CALL 0x00106980
MOV RDX,qword ptr [RSP + 0x40]
LAB_001084cb:
LEA RSI,[0x14e353]
LEA RDI,[RSP + 0xd8]
CALL 0x001080f0
JMP 0x001084e1
LAB_001084e1:
MOV RDI,qword ptr [RSP + 0x38]
XOR EAX,EAX
MOV ECX,EAX
MOV ESI,0x12d
LEA RDX,[RSP + 0xd8]
CALL 0x0010e750
JMP 0x001084fe
LAB_001084fe:
MOV RDI,qword ptr [RSP + 0x38]
MOV byte ptr [RSP + 0xd6],0x0
LEA RSI,[0x16c748]
LEA RDX,[0x10e8f0]
CALL 0x00106940
LAB_00108582:
JMP 0x00108584
LAB_00108584:
TEST byte ptr [RSP + 0x10d],0x1
JZ 0x001086f0
MOV RAX,qword ptr [RSP + 0x58]
MOV byte ptr [RAX],0x1
LAB_0010859a:
LEA RDI,[RSP + 0xc8]
MOV ESI,0x1
CALL 0x0010e900
JMP 0x001085ae
LAB_001085ae:
MOV RAX,qword ptr [RSP + 0x58]
MOV RCX,qword ptr [RSP + 0xc8]
MOV qword ptr [RAX + 0x8],RCX
LEA RAX,[RSP + 0x118]
MOV qword ptr [RSP + 0xc0],RAX
MOV RDI,qword ptr [RSP + 0xc0]
CALL 0x0010e700
MOV qword ptr [RSP + 0xb8],RAX
MOV RDI,qword ptr [RSP + 0xc0]
CALL 0x0010e710
MOV qword ptr [RSP + 0xb0],RAX
LAB_001085f9:
MOV RAX,qword ptr [RSP + 0xb8]
CMP RAX,qword ptr [RSP + 0xb0]
JZ 0x001086ee
MOV RAX,qword ptr [RSP + 0xb8]
MOV qword ptr [RSP + 0xa8],RAX
MOV RSI,qword ptr [RSP + 0xa8]
LEA RDI,[RSP + 0x98]
CALL 0x0010eae0
JMP 0x00108636
LAB_00108636:
MOV RAX,qword ptr [RSP + 0x58]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0xa0]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0010ec40
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0xa0]
MOV ESI,0x1
CALL 0x0010ec40
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,RAX
LAB_0010867d:
CALL 0x0010eb40
MOV byte ptr [RSP + 0x2f],DL
MOV qword ptr [RSP + 0x30],RAX
JMP 0x0010868d
LAB_0010868d:
MOV AL,byte ptr [RSP + 0x2f]
MOV RCX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x88],RCX
MOV byte ptr [RSP + 0x90],AL
LEA RDI,[RSP + 0x98]
CALL 0x001087f0
MOV RAX,qword ptr [RSP + 0xb8]
ADD RAX,0x18
MOV qword ptr [RSP + 0xb8],RAX
JMP 0x001085f9
LAB_001086ee:
JMP 0x00108748
LAB_001086f0:
MOV RAX,qword ptr [RSP + 0x58]
MOV byte ptr [RAX],0x2
LEA RDI,[RSP + 0x118]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x0010e700
MOV RDI,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x80],RAX
CALL 0x0010e710
MOV qword ptr [RSP + 0x78],RAX
LAB_00108721:
LEA RDI,[RSP + 0x80]
LEA RSI,[RSP + 0x78]
CALL 0x0010ec60
LAB_00108733:
MOV qword ptr [RSP + 0x10],RAX
JMP 0x0010873a
LAB_0010873a:
MOV RAX,qword ptr [RSP + 0x58]
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
LAB_00108748:
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x0010b1e0
MOV RDI,qword ptr [RSP + 0x58]
MOV ESI,0x1
CALL 0x001096f0
ADD RSP,0x128
RET
|
/* 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(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> > >, bool, nlohmann::json_abi_v3_11_3::detail::value_t) */
void nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(data *param_1,int8 param_2,int8 param_3,byte param_4,char param_5)
{
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;
string *psVar1;
int8 uVar2;
int8 uVar3;
long lVar4;
basic_json *pbVar5;
vector *pvVar6;
int1 extraout_DL;
byte local_d9;
json_ref *local_b0;
json_ref *local_a8;
int8 local_a0;
int1 local_98;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_90 [8];
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*local_88;
long local_80;
long local_78;
long local_70;
initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*local_68;
int8 local_60;
int1 local_52;
allocator local_51;
string local_50 [53];
bool local_1b;
char local_1a;
byte local_19;
data *local_18;
int8 local_10;
int8 local_8;
local_19 = param_4 & 1;
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
local_1a = param_5;
local_18 = param_1;
local_10 = param_2;
local_8 = param_3;
data::data(param_1);
uVar2 = std::
initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<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>>>
::begin((initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*)&local_10);
uVar3 = std::
initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::end((initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*)&local_10);
/* try { // try from 0010841c to 00108420 has its CatchHandler @ 00108456 */
local_1b = std::
all_of<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>const*,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>::json_ref(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::_lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>const&)_1_>
(uVar2,uVar3);
if ((local_19 & 1) == 0) {
if (local_1a == '\x02') {
local_1b = false;
}
local_d9 = 0;
if (local_1a == '\x01') {
local_d9 = local_1b ^ 0xff;
}
if ((local_d9 & 1) != 0) {
local_52 = 1;
uVar2 = __cxa_allocate_exception(0x20);
std::allocator<char>::allocator();
/* try { // try from 001084cb to 001084de has its CatchHandler @ 00108523 */
std::__cxx11::string::string<std::allocator<char>>
(local_50,"cannot create object from initializer list",&local_51);
/* try { // try from 001084e1 to 0010851d has its CatchHandler @ 00108539 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_
(uVar2,0x12d,local_50,0);
local_52 = 0;
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&detail::type_error::typeinfo,detail::type_error::~type_error);
}
}
if (local_1b == false) {
*param_1 = (data)0x2;
local_a8 = (json_ref *)
std::
initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<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>>>
::begin((initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*)&local_10);
local_b0 = (json_ref *)
std::
initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::end((initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*)&local_10);
/* try { // try from 00108721 to 00108732 has its CatchHandler @ 00108456 */
pvVar6 = create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>const*>
(&local_a8,&local_b0);
*(vector **)(param_1 + 8) = pvVar6;
}
else {
*param_1 = (data)0x1;
/* try { // try from 0010859a to 00108633 has its CatchHandler @ 00108456 */
json_value::json_value((json_value *)&local_60,1);
*(int8 *)(param_1 + 8) = local_60;
local_68 = (initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*)&local_10;
local_70 = std::
initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<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>>>
::begin(local_68);
local_78 = std::
initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::end(local_68);
for (; local_70 != local_78; local_70 = local_70 + 0x18) {
local_80 = local_70;
detail::
json_ref<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>>
::moved_or_copied();
this = *(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
**)(param_1 + 8);
lVar4 = std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::operator[](local_88,0);
psVar1 = *(string **)(lVar4 + 8);
pbVar5 = (basic_json *)
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::operator[](local_88,1);
/* try { // try from 0010867d to 00108681 has its CatchHandler @ 001086cb */
local_a0 = 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,psVar1,pbVar5);
local_98 = extraout_DL;
~basic_json(local_90);
}
}
set_parents();
assert_invariant(SUB81(param_1,0));
return;
}
| |
29,861 | my_tell | eloqsql/mysys/my_seek.c | my_off_t my_tell(File fd, myf MyFlags)
{
os_off_t pos;
DBUG_ENTER("my_tell");
DBUG_PRINT("my",("fd: %d MyFlags: %lu",fd, MyFlags));
DBUG_ASSERT(fd >= 0);
#if defined (HAVE_TELL) && !defined (_WIN32) && !defined(_AIX)
pos= tell(fd);
#else
pos= my_seek(fd, 0L, MY_SEEK_CUR,0);
#endif
if (pos == (os_off_t) -1)
{
my_errno= errno;
if (MyFlags & MY_WME)
my_error(EE_CANT_SEEK, MYF(0), my_filename(fd), my_errno);
DBUG_PRINT("error", ("tell: %llu errno: %d", (ulonglong) pos, my_errno));
}
DBUG_PRINT("exit",("pos: %llu", (ulonglong) pos));
DBUG_RETURN((my_off_t) pos);
} | O3 | c | my_tell:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r15
movl %edi, %r14d
xorl %esi, %esi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x30e38
movq %rax, %rbx
cmpq $-0x1, %rax
jne 0x30efd
callq 0x24050
movl (%rax), %r12d
callq 0x3193e
movl %r12d, (%rax)
testb $0x10, %r15b
je 0x30efd
movl %r14d, %edi
callq 0x367dc
movq %rax, %r14
callq 0x3193e
movl (%rax), %ecx
movl $0x21, %edi
xorl %esi, %esi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2cce7
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
| my_tell:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov r15, rsi
mov r14d, edi
xor esi, esi
mov edx, 1
xor ecx, ecx
call my_seek
mov rbx, rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_30EFD
call ___errno_location
mov r12d, [rax]
call _my_thread_var
mov [rax], r12d
test r15b, 10h
jz short loc_30EFD
mov edi, r14d
call my_filename
mov r14, rax
call _my_thread_var
mov ecx, [rax]
mov edi, 21h ; '!'
xor esi, esi
mov rdx, r14
xor eax, eax
call my_error
loc_30EFD:
mov rax, rbx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long my_tell(long long a1, char a2)
{
long long v2; // rbx
int v3; // r12d
long long v4; // rdx
long long v5; // rcx
long long v6; // r8
long long v7; // r9
long long v8; // r14
long long v9; // rdx
long long v10; // rcx
long long v11; // r8
long long v12; // r9
unsigned int *v13; // rax
v2 = my_seek(a1, 0LL, 1LL, 0);
if ( v2 == -1 )
{
v3 = *(_DWORD *)__errno_location(a1);
*(_DWORD *)my_thread_var(a1, 0LL, v4, v5, v6, v7) = v3;
if ( (a2 & 0x10) != 0 )
{
v8 = my_filename((unsigned int)a1);
v13 = (unsigned int *)my_thread_var((unsigned int)a1, 0LL, v9, v10, v11, v12);
my_error(0x21u, 0LL, v8, *v13);
}
}
return v2;
}
| my_tell:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R15,RSI
MOV R14D,EDI
XOR ESI,ESI
MOV EDX,0x1
XOR ECX,ECX
CALL 0x00130e38
MOV RBX,RAX
CMP RAX,-0x1
JNZ 0x00130efd
CALL 0x00124050
MOV R12D,dword ptr [RAX]
CALL 0x0013193e
MOV dword ptr [RAX],R12D
TEST R15B,0x10
JZ 0x00130efd
MOV EDI,R14D
CALL 0x001367dc
MOV R14,RAX
CALL 0x0013193e
MOV ECX,dword ptr [RAX]
MOV EDI,0x21
XOR ESI,ESI
MOV RDX,R14
XOR EAX,EAX
CALL 0x0012cce7
LAB_00130efd:
MOV RAX,RBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
long my_tell(ulong param_1,ulong param_2)
{
int iVar1;
long lVar2;
int *piVar3;
int8 uVar4;
int4 *puVar5;
lVar2 = my_seek(param_1,0,1,0);
if (lVar2 == -1) {
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar3 = (int *)_my_thread_var();
*piVar3 = iVar1;
if ((param_2 & 0x10) != 0) {
uVar4 = my_filename(param_1 & 0xffffffff);
puVar5 = (int4 *)_my_thread_var();
my_error(0x21,0,uVar4,*puVar5);
}
}
return lVar2;
}
| |
29,862 | rw_pr_unlock | eloqsql/mysys/thr_rwlock.c | int rw_pr_unlock(rw_pr_lock_t *rwlock)
{
if (rwlock->active_writer)
{
/* We are unlocking wr-lock. */
#ifdef SAFE_MUTEX
rwlock->writer_thread= 0;
#endif
rwlock->active_writer= FALSE;
if (rwlock->writers_waiting_readers)
{
/*
Avoid expensive cond signal in case when there is no contention
or it is wr-only.
Note that from view point of performance it would be better to
signal on the condition variable after unlocking mutex (as it
reduces number of contex switches).
Unfortunately this would mean that such rwlock can't be safely
used by MDL subsystem, which relies on the fact that it is OK
to destroy rwlock once it is in unlocked state.
*/
pthread_cond_signal(&rwlock->no_active_readers);
}
pthread_mutex_unlock(&rwlock->lock);
}
else
{
/* We are unlocking rd-lock. */
pthread_mutex_lock(&rwlock->lock);
rwlock->active_readers--;
if (rwlock->active_readers == 0 &&
rwlock->writers_waiting_readers)
{
/*
If we are last reader and there are waiting
writers wake them up.
*/
pthread_cond_signal(&rwlock->no_active_readers);
}
pthread_mutex_unlock(&rwlock->lock);
}
return 0;
} | O3 | c | rw_pr_unlock:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x0, 0x60(%rdi)
je 0x26b44
movb $0x0, 0x60(%rbx)
cmpl $0x0, 0x5c(%rbx)
je 0x26b51
leaq 0x28(%rbx), %rdi
callq 0x24040
jmp 0x26b51
movq %rbx, %rdi
callq 0x24480
decl 0x58(%rbx)
je 0x26b33
movq %rbx, %rdi
callq 0x241e0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
| rw_pr_unlock:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
cmp byte ptr [rdi+60h], 0
jz short loc_26B44
mov byte ptr [rbx+60h], 0
loc_26B33:
cmp dword ptr [rbx+5Ch], 0
jz short loc_26B51
lea rdi, [rbx+28h]
call _pthread_cond_signal
jmp short loc_26B51
loc_26B44:
mov rdi, rbx
call _pthread_mutex_lock
dec dword ptr [rbx+58h]
jz short loc_26B33
loc_26B51:
mov rdi, rbx
call _pthread_mutex_unlock
xor eax, eax
add rsp, 8
pop rbx
pop rbp
retn
| long long rw_pr_unlock(long long a1)
{
if ( *(_BYTE *)(a1 + 96) )
{
*(_BYTE *)(a1 + 96) = 0;
}
else
{
pthread_mutex_lock(a1);
if ( (*(_DWORD *)(a1 + 88))-- != 1 )
goto LABEL_6;
}
if ( *(_DWORD *)(a1 + 92) )
pthread_cond_signal(a1 + 40);
LABEL_6:
pthread_mutex_unlock(a1);
return 0LL;
}
| rw_pr_unlock:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
CMP byte ptr [RDI + 0x60],0x0
JZ 0x00126b44
MOV byte ptr [RBX + 0x60],0x0
LAB_00126b33:
CMP dword ptr [RBX + 0x5c],0x0
JZ 0x00126b51
LEA RDI,[RBX + 0x28]
CALL 0x00124040
JMP 0x00126b51
LAB_00126b44:
MOV RDI,RBX
CALL 0x00124480
DEC dword ptr [RBX + 0x58]
JZ 0x00126b33
LAB_00126b51:
MOV RDI,RBX
CALL 0x001241e0
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int8 rw_pr_unlock(pthread_mutex_t *param_1)
{
int *piVar1;
if (*(char *)((long)param_1 + 0x60) == '\0') {
pthread_mutex_lock(param_1);
piVar1 = (int *)((long)param_1 + 0x58);
*piVar1 = *piVar1 + -1;
if (*piVar1 != 0) goto LAB_00126b51;
}
else {
*(int1 *)((long)param_1 + 0x60) = 0;
}
if (*(int *)((long)param_1 + 0x5c) != 0) {
pthread_cond_signal((pthread_cond_t *)(param_1 + 1));
}
LAB_00126b51:
pthread_mutex_unlock(param_1);
return 0;
}
| |
29,863 | js_worker_ctor | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_worker_ctor(JSContext *ctx, JSValue new_target,
int argc, JSValue *argv)
{
JSRuntime *rt = JS_GetRuntime(ctx);
WorkerFuncArgs *args = NULL;
pthread_t tid;
pthread_attr_t attr;
JSValue obj = JS_UNDEFINED;
int ret;
const char *filename = NULL, *basename;
JSAtom basename_atom;
/* XXX: in order to avoid problems with resource liberation, we
don't support creating workers inside workers */
if (!is_main_thread(rt))
return JS_ThrowTypeError(ctx, "cannot create a worker inside a worker");
/* base name, assuming the calling function is a normal JS
function */
basename_atom = JS_GetScriptOrModuleName(ctx, 1);
if (basename_atom == JS_ATOM_NULL) {
return JS_ThrowTypeError(ctx, "could not determine calling script or module name");
}
basename = JS_AtomToCString(ctx, basename_atom);
JS_FreeAtom(ctx, basename_atom);
if (!basename)
goto fail;
/* module name */
filename = JS_ToCString(ctx, argv[0]);
if (!filename)
goto fail;
args = malloc(sizeof(*args));
if (!args)
goto oom_fail;
memset(args, 0, sizeof(*args));
args->filename = strdup(filename);
args->basename = strdup(basename);
/* ports */
args->recv_pipe = js_new_message_pipe();
if (!args->recv_pipe)
goto oom_fail;
args->send_pipe = js_new_message_pipe();
if (!args->send_pipe)
goto oom_fail;
obj = js_worker_ctor_internal(ctx, new_target,
args->send_pipe, args->recv_pipe);
if (JS_IsException(obj))
goto fail;
pthread_attr_init(&attr);
/* no join at the end */
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
// musl libc gives threads 80 kb stacks, much smaller than
// JS_DEFAULT_STACK_SIZE (1 MB)
pthread_attr_setstacksize(&attr, 2 << 20); // 2 MB, glibc default
ret = pthread_create(&tid, &attr, worker_func, args);
pthread_attr_destroy(&attr);
if (ret != 0) {
JS_ThrowTypeError(ctx, "could not create worker");
goto fail;
}
JS_FreeCString(ctx, basename);
JS_FreeCString(ctx, filename);
return obj;
oom_fail:
JS_ThrowOutOfMemory(ctx);
fail:
JS_FreeCString(ctx, basename);
JS_FreeCString(ctx, filename);
if (args) {
free(args->filename);
free(args->basename);
js_free_message_pipe(args->recv_pipe);
js_free_message_pipe(args->send_pipe);
free(args);
}
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
} | O0 | c | js_worker_ctor:
subq $0xe8, %rsp
movq %rsi, 0xc8(%rsp)
movq %rdx, 0xd0(%rsp)
movq %rdi, 0xc0(%rsp)
movl %ecx, 0xbc(%rsp)
movq %r8, 0xb0(%rsp)
movq 0xc0(%rsp), %rdi
callq 0x27f00
movq %rax, 0xa8(%rsp)
movq $0x0, 0xa0(%rsp)
movq 0xf39ba(%rip), %rax # 0x10a310
movq %rax, 0x50(%rsp)
movq 0xf39b6(%rip), %rax # 0x10a318
movq %rax, 0x58(%rsp)
movq $0x0, 0x40(%rsp)
movq 0xa8(%rsp), %rdi
callq 0x177f0
cmpl $0x0, %eax
jne 0x169ad
movq 0xc0(%rsp), %rdi
leaq 0xf351b(%rip), %rsi # 0x109eac
movb $0x0, %al
callq 0x2d300
movq %rax, 0xd8(%rsp)
movq %rdx, 0xe0(%rsp)
jmp 0x16d00
movq 0xc0(%rsp), %rdi
movl $0x1, %esi
callq 0x4a160
movl %eax, 0x34(%rsp)
cmpl $0x0, 0x34(%rsp)
jne 0x169f5
movq 0xc0(%rsp), %rdi
leaq 0xf34fa(%rip), %rsi # 0x109ed3
movb $0x0, %al
callq 0x2d300
movq %rax, 0xd8(%rsp)
movq %rdx, 0xe0(%rsp)
jmp 0x16d00
movq 0xc0(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0x290d0
movq %rax, 0x38(%rsp)
movq 0xc0(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0x29040
cmpq $0x0, 0x38(%rsp)
jne 0x16a29
jmp 0x16c53
movq 0xc0(%rsp), %rdi
movq 0xb0(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x147e0
movq %rax, 0x40(%rsp)
cmpq $0x0, 0x40(%rsp)
jne 0x16a57
jmp 0x16c53
movl $0x20, %edi
callq 0xe660
movq %rax, 0xa0(%rsp)
cmpq $0x0, 0xa0(%rsp)
jne 0x16a79
jmp 0x16c3d
movq 0xa0(%rsp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0xe350
movq 0x40(%rsp), %rdi
callq 0xe900
movq %rax, %rcx
movq 0xa0(%rsp), %rax
movq %rcx, (%rax)
movq 0x38(%rsp), %rdi
callq 0xe900
movq %rax, %rcx
movq 0xa0(%rsp), %rax
movq %rcx, 0x8(%rax)
callq 0x17830
movq %rax, %rcx
movq 0xa0(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0xa0(%rsp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x16ae6
jmp 0x16c3d
callq 0x17830
movq %rax, %rcx
movq 0xa0(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0xa0(%rsp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x16b0e
jmp 0x16c3d
movq 0xc0(%rsp), %rdi
movq 0xa0(%rsp), %rax
movq 0x18(%rax), %rcx
movq 0xa0(%rsp), %rax
movq 0x10(%rax), %r8
movq 0xc8(%rsp), %rsi
movq 0xd0(%rsp), %rdx
callq 0x16d20
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x50(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x10390
cmpl $0x0, %eax
je 0x16b7a
jmp 0x16c53
leaq 0x60(%rsp), %rdi
callq 0xe490
leaq 0x60(%rsp), %rdi
movl $0x1, %esi
callq 0xe630
leaq 0x60(%rsp), %rdi
movl $0x200000, %esi # imm = 0x200000
callq 0xe9b0
movq 0xa0(%rsp), %rcx
leaq 0x98(%rsp), %rdi
leaq 0x60(%rsp), %rsi
leaq 0xd22(%rip), %rdx # 0x178e0
callq 0xe700
movl %eax, 0x4c(%rsp)
leaq 0x60(%rsp), %rdi
callq 0xe860
cmpl $0x0, 0x4c(%rsp)
je 0x16bfa
movq 0xc0(%rsp), %rdi
leaq 0xf331e(%rip), %rsi # 0x109f05
movb $0x0, %al
callq 0x2d300
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
jmp 0x16c53
movq 0xc0(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x29e50
movq 0xc0(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x29e50
movq 0x50(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0xe0(%rsp)
jmp 0x16d00
movq 0xc0(%rsp), %rdi
callq 0x21c10
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
movq 0xc0(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x29e50
movq 0xc0(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x29e50
cmpq $0x0, 0xa0(%rsp)
je 0x16cd2
movq 0xa0(%rsp), %rax
movq (%rax), %rdi
callq 0xe060
movq 0xa0(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0xe060
movq 0xa0(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x11700
movq 0xa0(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x11700
movq 0xa0(%rsp), %rdi
callq 0xe060
movq 0xc0(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
callq 0x23c90
movl $0x0, 0xd8(%rsp)
movq $0x6, 0xe0(%rsp)
movq 0xd8(%rsp), %rax
movq 0xe0(%rsp), %rdx
addq $0xe8, %rsp
retq
nopl (%rax,%rax)
| js_worker_ctor:
sub rsp, 0E8h
mov [rsp+0E8h+var_20], rsi
mov [rsp+0E8h+var_18], rdx
mov [rsp+0E8h+var_28], rdi
mov [rsp+0E8h+var_2C], ecx
mov [rsp+0E8h+var_38], r8
mov rdi, [rsp+0E8h+var_28]
call JS_GetRuntime
mov [rsp+0E8h+var_40], rax
mov [rsp+0E8h+var_48], 0
mov rax, cs:qword_10A310
mov [rsp+0E8h+var_98], rax
mov rax, cs:qword_10A318
mov [rsp+0E8h+var_90], rax
mov [rsp+0E8h+var_A8], 0
mov rdi, [rsp+0E8h+var_40]
call is_main_thread
cmp eax, 0
jnz short loc_169AD
mov rdi, [rsp+0E8h+var_28]
lea rsi, aCannotCreateAW; "cannot create a worker inside a worker"
mov al, 0
call JS_ThrowTypeError
mov [rsp+0E8h+var_10], rax
mov [rsp+0E8h+var_8], rdx
jmp loc_16D00
loc_169AD:
mov rdi, [rsp+0E8h+var_28]
mov esi, 1
call JS_GetScriptOrModuleName
mov [rsp+0E8h+var_B4], eax
cmp [rsp+0E8h+var_B4], 0
jnz short loc_169F5
mov rdi, [rsp+0E8h+var_28]
lea rsi, aCouldNotDeterm; "could not determine calling script or m"...
mov al, 0
call JS_ThrowTypeError
mov [rsp+0E8h+var_10], rax
mov [rsp+0E8h+var_8], rdx
jmp loc_16D00
loc_169F5:
mov rdi, [rsp+0E8h+var_28]
mov esi, [rsp+0E8h+var_B4]
call JS_AtomToCString
mov [rsp+0E8h+var_B0], rax
mov rdi, [rsp+0E8h+var_28]
mov esi, [rsp+0E8h+var_B4]
call JS_FreeAtom
cmp [rsp+0E8h+var_B0], 0
jnz short loc_16A29
jmp loc_16C53
loc_16A29:
mov rdi, [rsp+0E8h+var_28]
mov rax, [rsp+0E8h+var_38]
mov rsi, [rax]
mov rdx, [rax+8]
call JS_ToCString
mov [rsp+0E8h+var_A8], rax
cmp [rsp+0E8h+var_A8], 0
jnz short loc_16A57
jmp loc_16C53
loc_16A57:
mov edi, 20h ; ' '
call _malloc
mov [rsp+0E8h+var_48], rax
cmp [rsp+0E8h+var_48], 0
jnz short loc_16A79
jmp loc_16C3D
loc_16A79:
mov rdi, [rsp+0E8h+var_48]
xor esi, esi
mov edx, 20h ; ' '
call _memset
mov rdi, [rsp+0E8h+var_A8]
call _strdup
mov rcx, rax
mov rax, [rsp+0E8h+var_48]
mov [rax], rcx
mov rdi, [rsp+0E8h+var_B0]
call _strdup
mov rcx, rax
mov rax, [rsp+0E8h+var_48]
mov [rax+8], rcx
call js_new_message_pipe
mov rcx, rax
mov rax, [rsp+0E8h+var_48]
mov [rax+10h], rcx
mov rax, [rsp+0E8h+var_48]
cmp qword ptr [rax+10h], 0
jnz short loc_16AE6
jmp loc_16C3D
loc_16AE6:
call js_new_message_pipe
mov rcx, rax
mov rax, [rsp+0E8h+var_48]
mov [rax+18h], rcx
mov rax, [rsp+0E8h+var_48]
cmp qword ptr [rax+18h], 0
jnz short loc_16B0E
jmp loc_16C3D
loc_16B0E:
mov rdi, [rsp+0E8h+var_28]
mov rax, [rsp+0E8h+var_48]
mov rcx, [rax+18h]
mov rax, [rsp+0E8h+var_48]
mov r8, [rax+10h]
mov rsi, [rsp+0E8h+var_20]
mov rdx, [rsp+0E8h+var_18]
call js_worker_ctor_internal
mov [rsp+0E8h+var_C8], rax
mov [rsp+0E8h+var_C0], rdx
mov rax, [rsp+0E8h+var_C8]
mov [rsp+0E8h+var_98], rax
mov rax, [rsp+0E8h+var_C0]
mov [rsp+0E8h+var_90], rax
mov rdi, [rsp+0E8h+var_98]
mov rsi, [rsp+0E8h+var_90]
call JS_IsException_0
cmp eax, 0
jz short loc_16B7A
jmp loc_16C53
loc_16B7A:
lea rdi, [rsp+0E8h+var_88]
call _pthread_attr_init
lea rdi, [rsp+0E8h+var_88]
mov esi, 1
call _pthread_attr_setdetachstate
lea rdi, [rsp+0E8h+var_88]
mov esi, 200000h
call _pthread_attr_setstacksize
mov rcx, [rsp+0E8h+var_48]
lea rdi, [rsp+0E8h+var_50]
lea rsi, [rsp+0E8h+var_88]
lea rdx, worker_func
call _pthread_create
mov [rsp+0E8h+var_9C], eax
lea rdi, [rsp+0E8h+var_88]
call _pthread_attr_destroy
cmp [rsp+0E8h+var_9C], 0
jz short loc_16BFA
mov rdi, [rsp+0E8h+var_28]
lea rsi, aCouldNotCreate; "could not create worker"
mov al, 0
call JS_ThrowTypeError
mov [rsp+0E8h+var_D8], rax
mov [rsp+0E8h+var_D0], rdx
jmp short loc_16C53
loc_16BFA:
mov rdi, [rsp+0E8h+var_28]
mov rsi, [rsp+0E8h+var_B0]
call JS_FreeCString
mov rdi, [rsp+0E8h+var_28]
mov rsi, [rsp+0E8h+var_A8]
call JS_FreeCString
mov rax, [rsp+0E8h+var_98]
mov [rsp+0E8h+var_10], rax
mov rax, [rsp+0E8h+var_90]
mov [rsp+0E8h+var_8], rax
jmp loc_16D00
loc_16C3D:
mov rdi, [rsp+0E8h+var_28]
call JS_ThrowOutOfMemory
mov [rsp+0E8h+var_E8], rax
mov [rsp+0E8h+var_E0], rdx
loc_16C53:
mov rdi, [rsp+0E8h+var_28]
mov rsi, [rsp+0E8h+var_B0]
call JS_FreeCString
mov rdi, [rsp+0E8h+var_28]
mov rsi, [rsp+0E8h+var_A8]
call JS_FreeCString
cmp [rsp+0E8h+var_48], 0
jz short loc_16CD2
mov rax, [rsp+0E8h+var_48]
mov rdi, [rax]
call _free
mov rax, [rsp+0E8h+var_48]
mov rdi, [rax+8]
call _free
mov rax, [rsp+0E8h+var_48]
mov rdi, [rax+10h]
call js_free_message_pipe
mov rax, [rsp+0E8h+var_48]
mov rdi, [rax+18h]
call js_free_message_pipe
mov rdi, [rsp+0E8h+var_48]
call _free
loc_16CD2:
mov rdi, [rsp+0E8h+var_28]
mov rsi, [rsp+0E8h+var_98]
mov rdx, [rsp+0E8h+var_90]
call JS_FreeValue
mov dword ptr [rsp+0E8h+var_10], 0
mov [rsp+0E8h+var_8], 6
loc_16D00:
mov rax, [rsp+0E8h+var_10]
mov rdx, [rsp+0E8h+var_8]
add rsp, 0E8h
retn
| long long js_worker_ctor(long long a1, long long a2, long long a3, int a4, long long *a5)
{
int v5; // edx
int v6; // ecx
int v7; // r8d
int v8; // r9d
long long v9; // rdx
int v10; // edx
int v11; // ecx
int v12; // r8d
int v13; // r9d
long long v14; // rdx
long long v15; // rdx
int v16; // edx
int v17; // ecx
int v18; // r8d
int v19; // r9d
long long v21; // [rsp+20h] [rbp-C8h]
unsigned int ScriptOrModuleName; // [rsp+34h] [rbp-B4h]
long long v23; // [rsp+38h] [rbp-B0h]
long long v24; // [rsp+40h] [rbp-A8h]
int v25; // [rsp+4Ch] [rbp-9Ch]
long long v26; // [rsp+50h] [rbp-98h]
long long v27; // [rsp+58h] [rbp-90h]
_BYTE v28[56]; // [rsp+60h] [rbp-88h] BYREF
_BYTE v29[8]; // [rsp+98h] [rbp-50h] BYREF
_QWORD *v30; // [rsp+A0h] [rbp-48h]
long long Runtime; // [rsp+A8h] [rbp-40h]
long long *v32; // [rsp+B0h] [rbp-38h]
int v33; // [rsp+BCh] [rbp-2Ch]
long long v34; // [rsp+C0h] [rbp-28h]
long long v35; // [rsp+C8h] [rbp-20h]
long long v36; // [rsp+D0h] [rbp-18h]
long long v37; // [rsp+D8h] [rbp-10h]
long long v38; // [rsp+E0h] [rbp-8h]
v35 = a2;
v36 = a3;
v34 = a1;
v33 = a4;
v32 = a5;
Runtime = JS_GetRuntime(a1);
v30 = 0LL;
v26 = 0LL;
v27 = 3LL;
v24 = 0LL;
if ( (unsigned int)is_main_thread(Runtime) )
{
ScriptOrModuleName = JS_GetScriptOrModuleName(v34, 1LL);
if ( ScriptOrModuleName )
{
v23 = JS_AtomToCString(v34, ScriptOrModuleName);
JS_FreeAtom(v34, ScriptOrModuleName);
if ( v23 )
{
v24 = JS_ToCString(v34, *v32, v32[1]);
if ( v24 )
{
v30 = (_QWORD *)malloc(32LL);
if ( v30
&& (memset(v30, 0LL, 32LL), *v30 = strdup(v24),
v30[1] = strdup(v23),
(v30[2] = js_new_message_pipe()) != 0LL)
&& (v30[3] = js_new_message_pipe()) != 0LL )
{
v21 = js_worker_ctor_internal(v34, v35, v36, v30[3], v30[2]);
v26 = v21;
v27 = v15;
if ( !JS_IsException_0(v21, v15) )
{
pthread_attr_init(v28);
pthread_attr_setdetachstate(v28, 1LL);
pthread_attr_setstacksize(v28, 0x200000LL);
v25 = pthread_create(v29, v28, worker_func, v30);
pthread_attr_destroy(v28);
if ( !v25 )
{
JS_FreeCString(v34, v23);
JS_FreeCString(v34, v24);
v37 = v21;
v38 = v27;
return v37;
}
JS_ThrowTypeError(v34, (unsigned int)"could not create worker", v16, v17, v18, v19);
}
}
else
{
JS_ThrowOutOfMemory(v34);
}
}
}
JS_FreeCString(v34, v23);
JS_FreeCString(v34, v24);
if ( v30 )
{
free(*v30);
free(v30[1]);
js_free_message_pipe(v30[2]);
js_free_message_pipe(v30[3]);
free(v30);
}
JS_FreeValue(v34, v26, v27);
LODWORD(v37) = 0;
v38 = 6LL;
}
else
{
v37 = JS_ThrowTypeError(
v34,
(unsigned int)"could not determine calling script or module name",
v10,
v11,
v12,
v13);
v38 = v14;
}
}
else
{
v37 = JS_ThrowTypeError(v34, (unsigned int)"cannot create a worker inside a worker", v5, v6, v7, v8);
v38 = v9;
}
return v37;
}
| js_worker_ctor:
SUB RSP,0xe8
MOV qword ptr [RSP + 0xc8],RSI
MOV qword ptr [RSP + 0xd0],RDX
MOV qword ptr [RSP + 0xc0],RDI
MOV dword ptr [RSP + 0xbc],ECX
MOV qword ptr [RSP + 0xb0],R8
MOV RDI,qword ptr [RSP + 0xc0]
CALL 0x00127f00
MOV qword ptr [RSP + 0xa8],RAX
MOV qword ptr [RSP + 0xa0],0x0
MOV RAX,qword ptr [0x0020a310]
MOV qword ptr [RSP + 0x50],RAX
MOV RAX,qword ptr [0x0020a318]
MOV qword ptr [RSP + 0x58],RAX
MOV qword ptr [RSP + 0x40],0x0
MOV RDI,qword ptr [RSP + 0xa8]
CALL 0x001177f0
CMP EAX,0x0
JNZ 0x001169ad
MOV RDI,qword ptr [RSP + 0xc0]
LEA RSI,[0x209eac]
MOV AL,0x0
CALL 0x0012d300
MOV qword ptr [RSP + 0xd8],RAX
MOV qword ptr [RSP + 0xe0],RDX
JMP 0x00116d00
LAB_001169ad:
MOV RDI,qword ptr [RSP + 0xc0]
MOV ESI,0x1
CALL 0x0014a160
MOV dword ptr [RSP + 0x34],EAX
CMP dword ptr [RSP + 0x34],0x0
JNZ 0x001169f5
MOV RDI,qword ptr [RSP + 0xc0]
LEA RSI,[0x209ed3]
MOV AL,0x0
CALL 0x0012d300
MOV qword ptr [RSP + 0xd8],RAX
MOV qword ptr [RSP + 0xe0],RDX
JMP 0x00116d00
LAB_001169f5:
MOV RDI,qword ptr [RSP + 0xc0]
MOV ESI,dword ptr [RSP + 0x34]
CALL 0x001290d0
MOV qword ptr [RSP + 0x38],RAX
MOV RDI,qword ptr [RSP + 0xc0]
MOV ESI,dword ptr [RSP + 0x34]
CALL 0x00129040
CMP qword ptr [RSP + 0x38],0x0
JNZ 0x00116a29
JMP 0x00116c53
LAB_00116a29:
MOV RDI,qword ptr [RSP + 0xc0]
MOV RAX,qword ptr [RSP + 0xb0]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x001147e0
MOV qword ptr [RSP + 0x40],RAX
CMP qword ptr [RSP + 0x40],0x0
JNZ 0x00116a57
JMP 0x00116c53
LAB_00116a57:
MOV EDI,0x20
CALL 0x0010e660
MOV qword ptr [RSP + 0xa0],RAX
CMP qword ptr [RSP + 0xa0],0x0
JNZ 0x00116a79
JMP 0x00116c3d
LAB_00116a79:
MOV RDI,qword ptr [RSP + 0xa0]
XOR ESI,ESI
MOV EDX,0x20
CALL 0x0010e350
MOV RDI,qword ptr [RSP + 0x40]
CALL 0x0010e900
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RAX],RCX
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x0010e900
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RAX + 0x8],RCX
CALL 0x00117830
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RSP + 0xa0]
CMP qword ptr [RAX + 0x10],0x0
JNZ 0x00116ae6
JMP 0x00116c3d
LAB_00116ae6:
CALL 0x00117830
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RSP + 0xa0]
CMP qword ptr [RAX + 0x18],0x0
JNZ 0x00116b0e
JMP 0x00116c3d
LAB_00116b0e:
MOV RDI,qword ptr [RSP + 0xc0]
MOV RAX,qword ptr [RSP + 0xa0]
MOV RCX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RSP + 0xa0]
MOV R8,qword ptr [RAX + 0x10]
MOV RSI,qword ptr [RSP + 0xc8]
MOV RDX,qword ptr [RSP + 0xd0]
CALL 0x00116d20
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],RDX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x50],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x58],RAX
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x58]
CALL 0x00110390
CMP EAX,0x0
JZ 0x00116b7a
JMP 0x00116c53
LAB_00116b7a:
LEA RDI,[RSP + 0x60]
CALL 0x0010e490
LEA RDI,[RSP + 0x60]
MOV ESI,0x1
CALL 0x0010e630
LEA RDI,[RSP + 0x60]
MOV ESI,0x200000
CALL 0x0010e9b0
MOV RCX,qword ptr [RSP + 0xa0]
LEA RDI,[RSP + 0x98]
LEA RSI,[RSP + 0x60]
LEA RDX,[0x1178e0]
CALL 0x0010e700
MOV dword ptr [RSP + 0x4c],EAX
LEA RDI,[RSP + 0x60]
CALL 0x0010e860
CMP dword ptr [RSP + 0x4c],0x0
JZ 0x00116bfa
MOV RDI,qword ptr [RSP + 0xc0]
LEA RSI,[0x209f05]
MOV AL,0x0
CALL 0x0012d300
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
JMP 0x00116c53
LAB_00116bfa:
MOV RDI,qword ptr [RSP + 0xc0]
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x00129e50
MOV RDI,qword ptr [RSP + 0xc0]
MOV RSI,qword ptr [RSP + 0x40]
CALL 0x00129e50
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0xd8],RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0xe0],RAX
JMP 0x00116d00
LAB_00116c3d:
MOV RDI,qword ptr [RSP + 0xc0]
CALL 0x00121c10
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],RDX
LAB_00116c53:
MOV RDI,qword ptr [RSP + 0xc0]
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x00129e50
MOV RDI,qword ptr [RSP + 0xc0]
MOV RSI,qword ptr [RSP + 0x40]
CALL 0x00129e50
CMP qword ptr [RSP + 0xa0],0x0
JZ 0x00116cd2
MOV RAX,qword ptr [RSP + 0xa0]
MOV RDI,qword ptr [RAX]
CALL 0x0010e060
MOV RAX,qword ptr [RSP + 0xa0]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x0010e060
MOV RAX,qword ptr [RSP + 0xa0]
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x00111700
MOV RAX,qword ptr [RSP + 0xa0]
MOV RDI,qword ptr [RAX + 0x18]
CALL 0x00111700
MOV RDI,qword ptr [RSP + 0xa0]
CALL 0x0010e060
LAB_00116cd2:
MOV RDI,qword ptr [RSP + 0xc0]
MOV RSI,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RSP + 0x58]
CALL 0x00123c90
MOV dword ptr [RSP + 0xd8],0x0
MOV qword ptr [RSP + 0xe0],0x6
LAB_00116d00:
MOV RAX,qword ptr [RSP + 0xd8]
MOV RDX,qword ptr [RSP + 0xe0]
ADD RSP,0xe8
RET
|
int1 [16]
js_worker_ctor(int8 param_1,int8 param_2,int8 param_3,int4 param_4,
int8 *param_5)
{
int1 auVar1 [16];
int1 auVar2 [16];
int1 auVar3 [16];
int iVar4;
char *__s;
char *pcVar5;
int8 uVar6;
int1 auVar7 [16];
char *local_a8;
int8 local_98;
int8 local_90;
pthread_attr_t local_88;
pthread_t local_50;
int8 *local_48;
int8 local_40;
int8 *local_38;
int4 local_2c;
int8 local_28;
int8 local_20;
int8 local_18;
int4 local_10;
int4 uStack_c;
int8 local_8;
local_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
local_40 = JS_GetRuntime(param_1);
local_48 = (int8 *)0x0;
auVar7._8_8_ = DAT_0020a318;
auVar7._0_8_ = DAT_0020a310;
auVar3._8_8_ = DAT_0020a318;
auVar3._0_8_ = DAT_0020a310;
auVar2._8_8_ = DAT_0020a318;
auVar2._0_8_ = DAT_0020a310;
local_a8 = (char *)0x0;
iVar4 = is_main_thread(local_40);
if (iVar4 == 0) {
auVar7 = JS_ThrowTypeError(local_28,"cannot create a worker inside a worker");
local_10 = auVar7._0_4_;
uStack_c = auVar7._4_4_;
local_8 = auVar7._8_8_;
goto LAB_00116d00;
}
iVar4 = JS_GetScriptOrModuleName(local_28,1);
if (iVar4 == 0) {
auVar7 = JS_ThrowTypeError(local_28,"could not determine calling script or module name");
local_10 = auVar7._0_4_;
uStack_c = auVar7._4_4_;
local_8 = auVar7._8_8_;
goto LAB_00116d00;
}
__s = (char *)JS_AtomToCString(local_28,iVar4);
JS_FreeAtom(local_28,iVar4);
if ((__s != (char *)0x0) &&
(local_a8 = (char *)JS_ToCString(local_28,*local_38,local_38[1]), auVar7 = auVar3,
local_a8 != (char *)0x0)) {
local_48 = (int8 *)malloc(0x20);
if (local_48 != (int8 *)0x0) {
memset(local_48,0,0x20);
pcVar5 = strdup(local_a8);
*local_48 = pcVar5;
pcVar5 = strdup(__s);
local_48[1] = pcVar5;
uVar6 = js_new_message_pipe();
local_48[2] = uVar6;
if (local_48[2] != 0) {
uVar6 = js_new_message_pipe();
local_48[3] = uVar6;
if (local_48[3] != 0) {
auVar7 = js_worker_ctor_internal(local_28,local_20,local_18,local_48[3],local_48[2]);
iVar4 = JS_IsException(auVar7._0_8_,auVar7._8_8_);
if (iVar4 == 0) {
pthread_attr_init(&local_88);
pthread_attr_setdetachstate(&local_88,1);
pthread_attr_setstacksize(&local_88,0x200000);
iVar4 = pthread_create(&local_50,&local_88,worker_func,local_48);
pthread_attr_destroy(&local_88);
if (iVar4 == 0) {
JS_FreeCString(local_28,__s);
JS_FreeCString(local_28,local_a8);
local_10 = auVar7._0_4_;
uStack_c = auVar7._4_4_;
local_8 = auVar7._8_8_;
goto LAB_00116d00;
}
JS_ThrowTypeError(local_28,"could not create worker");
}
goto LAB_00116c53;
}
}
}
JS_ThrowOutOfMemory(local_28);
auVar7 = auVar2;
}
LAB_00116c53:
local_90 = auVar7._8_8_;
local_98 = auVar7._0_8_;
JS_FreeCString(local_28,__s);
JS_FreeCString(local_28,local_a8);
if (local_48 != (int8 *)0x0) {
free((void *)*local_48);
free((void *)local_48[1]);
js_free_message_pipe(local_48[2]);
js_free_message_pipe(local_48[3]);
free(local_48);
}
JS_FreeValue(local_28,local_98,local_90);
local_10 = 0;
local_8 = 6;
LAB_00116d00:
auVar1._4_4_ = uStack_c;
auVar1._0_4_ = local_10;
auVar1._8_8_ = local_8;
return auVar1;
}
| |
29,864 | js_worker_ctor | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_worker_ctor(JSContext *ctx, JSValue new_target,
int argc, JSValue *argv)
{
JSRuntime *rt = JS_GetRuntime(ctx);
WorkerFuncArgs *args = NULL;
pthread_t tid;
pthread_attr_t attr;
JSValue obj = JS_UNDEFINED;
int ret;
const char *filename = NULL, *basename;
JSAtom basename_atom;
/* XXX: in order to avoid problems with resource liberation, we
don't support creating workers inside workers */
if (!is_main_thread(rt))
return JS_ThrowTypeError(ctx, "cannot create a worker inside a worker");
/* base name, assuming the calling function is a normal JS
function */
basename_atom = JS_GetScriptOrModuleName(ctx, 1);
if (basename_atom == JS_ATOM_NULL) {
return JS_ThrowTypeError(ctx, "could not determine calling script or module name");
}
basename = JS_AtomToCString(ctx, basename_atom);
JS_FreeAtom(ctx, basename_atom);
if (!basename)
goto fail;
/* module name */
filename = JS_ToCString(ctx, argv[0]);
if (!filename)
goto fail;
args = malloc(sizeof(*args));
if (!args)
goto oom_fail;
memset(args, 0, sizeof(*args));
args->filename = strdup(filename);
args->basename = strdup(basename);
/* ports */
args->recv_pipe = js_new_message_pipe();
if (!args->recv_pipe)
goto oom_fail;
args->send_pipe = js_new_message_pipe();
if (!args->send_pipe)
goto oom_fail;
obj = js_worker_ctor_internal(ctx, new_target,
args->send_pipe, args->recv_pipe);
if (JS_IsException(obj))
goto fail;
pthread_attr_init(&attr);
/* no join at the end */
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
// musl libc gives threads 80 kb stacks, much smaller than
// JS_DEFAULT_STACK_SIZE (1 MB)
pthread_attr_setstacksize(&attr, 2 << 20); // 2 MB, glibc default
ret = pthread_create(&tid, &attr, worker_func, args);
pthread_attr_destroy(&attr);
if (ret != 0) {
JS_ThrowTypeError(ctx, "could not create worker");
goto fail;
}
JS_FreeCString(ctx, basename);
JS_FreeCString(ctx, filename);
return obj;
oom_fail:
JS_ThrowOutOfMemory(ctx);
fail:
JS_FreeCString(ctx, basename);
JS_FreeCString(ctx, filename);
if (args) {
free(args->filename);
free(args->basename);
js_free_message_pipe(args->recv_pipe);
js_free_message_pipe(args->send_pipe);
free(args);
}
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
} | O2 | c | js_worker_ctor:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r8, %r13
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x1a185
movq %rax, %rdi
callq 0x132c2
testl %eax, %eax
je 0x12ca4
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x29420
testl %eax, %eax
je 0x12cb7
movl %eax, %ebp
movq %r14, 0x10(%rsp)
movq %rbx, %rdi
movl %eax, %esi
callq 0x1a9bf
movq %rax, %r12
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1a995
pushq $0x3
popq %r14
movq %r12, 0x8(%rsp)
testq %r12, %r12
je 0x12cad
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %rbx, %rdi
callq 0x11a6c
testq %rax, %rax
je 0x12cad
movq %rax, %r13
pushq $0x1
popq %rdi
pushq $0x20
popq %rsi
callq 0xe500
movq %rax, %rbp
testq %rax, %rax
je 0x12cdd
movq %r13, %rdi
callq 0xe930
movq %rax, (%rbp)
movq 0x8(%rsp), %rdi
callq 0xe930
movq %rax, 0x8(%rbp)
callq 0x132d6
movq %rax, 0x10(%rbp)
testq %rax, %rax
je 0x12cdd
callq 0x132d6
movq %rax, 0x18(%rbp)
testq %rax, %rax
je 0x12cdd
movq 0x10(%rbp), %r8
movq %rbx, %rdi
movq %r15, %rsi
movq 0x10(%rsp), %rdx
movq %rax, %rcx
callq 0x12d8a
movq %rax, %r12
movq %rdx, %r14
cmpl $0x6, %r14d
je 0x12ce8
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0xe4a0
pushq $0x1
popq %rsi
movq %r15, %rdi
callq 0xe650
movl $0x200000, %esi # imm = 0x200000
movq %r15, %rdi
callq 0xe9e0
leaq 0x6d6(%rip), %rdx # 0x13341
leaq 0x18(%rsp), %rdi
movq %r15, %rsi
movq %rbp, %rcx
callq 0xe730
movl %eax, %r15d
leaq 0x20(%rsp), %rdi
callq 0xe890
testl %r15d, %r15d
je 0x12d60
leaq 0x700fe(%rip), %rsi # 0x82d96
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1c64d
jmp 0x12ce8
leaq 0x70092(%rip), %rsi # 0x82d3d
jmp 0x12cbe
xorl %r13d, %r13d
xorl %r12d, %r12d
xorl %ebp, %ebp
jmp 0x12ce8
leaq 0x700a6(%rip), %rsi # 0x82d64
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1c64d
movq %rax, %r12
movq %rdx, %r14
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
jmp 0x12d48
movq %rbx, %rdi
callq 0x171e0
xorl %r12d, %r12d
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
callq 0x1b057
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1b057
testq %rbp, %rbp
je 0x12d31
movq (%rbp), %rdi
callq 0xe060
movq 0x8(%rbp), %rdi
callq 0xe060
movq 0x10(%rbp), %rdi
callq 0x10360
movq 0x18(%rbp), %rdi
callq 0x10360
movq %rbp, %rdi
callq 0xe060
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x1801e
pushq $0x6
popq %r14
xorl %r12d, %r12d
xorl %ecx, %ecx
movl %r12d, %eax
orq %rcx, %rax
movq %r14, %rdx
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
callq 0x1b057
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1b057
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r12, %rcx
jmp 0x12cd8
| js_worker_ctor:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r13, r8
mov r14, rdx
mov r15, rsi
mov rbx, rdi
call JS_GetRuntime
mov rdi, rax
call is_main_thread
test eax, eax
jz loc_12CA4
push 1
pop rsi
mov rdi, rbx
call JS_GetScriptOrModuleName
test eax, eax
jz loc_12CB7
mov ebp, eax
mov [rsp+88h+var_78], r14
mov rdi, rbx
mov esi, eax
call JS_AtomToCString
mov r12, rax
mov rdi, rbx
mov esi, ebp
call JS_FreeAtom
push 3
pop r14
mov [rsp+88h+var_80], r12
test r12, r12
jz loc_12CAD
mov rsi, [r13+0]
mov rdx, [r13+8]
mov rdi, rbx
call JS_ToCString
test rax, rax
jz loc_12CAD
mov r13, rax
push 1
pop rdi
push 20h ; ' '
pop rsi
call _calloc
mov rbp, rax
test rax, rax
jz loc_12CDD
mov rdi, r13
call _strdup
mov [rbp+0], rax
mov rdi, [rsp+88h+var_80]
call _strdup
mov [rbp+8], rax
call js_new_message_pipe
mov [rbp+10h], rax
test rax, rax
jz loc_12CDD
call js_new_message_pipe
mov [rbp+18h], rax
test rax, rax
jz loc_12CDD
mov r8, [rbp+10h]
mov rdi, rbx
mov rsi, r15
mov rdx, [rsp+88h+var_78]
mov rcx, rax
call js_worker_ctor_internal
mov r12, rax
mov r14, rdx
cmp r14d, 6
jz loc_12CE8
lea r15, [rsp+88h+var_68]
mov rdi, r15
call _pthread_attr_init
push 1
pop rsi
mov rdi, r15
call _pthread_attr_setdetachstate
mov esi, 200000h
mov rdi, r15
call _pthread_attr_setstacksize
lea rdx, worker_func
lea rdi, [rsp+88h+var_70]
mov rsi, r15
mov rcx, rbp
call _pthread_create
mov r15d, eax
lea rdi, [rsp+88h+var_68]
call _pthread_attr_destroy
test r15d, r15d
jz loc_12D60
lea rsi, aCouldNotCreate; "could not create worker"
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
jmp short loc_12CE8
loc_12CA4:
lea rsi, aCannotCreateAW; "cannot create a worker inside a worker"
jmp short loc_12CBE
loc_12CAD:
xor r13d, r13d
xor r12d, r12d
xor ebp, ebp
jmp short loc_12CE8
loc_12CB7:
lea rsi, aCouldNotDeterm; "could not determine calling script or m"...
loc_12CBE:
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
mov r12, rax
mov r14, rdx
mov rcx, 0FFFFFFFF00000000h
loc_12CD8:
and rcx, rax
jmp short loc_12D48
loc_12CDD:
mov rdi, rbx
call JS_ThrowOutOfMemory
xor r12d, r12d
loc_12CE8:
mov rdi, rbx
mov rsi, [rsp+88h+var_80]
call JS_FreeCString
mov rdi, rbx
mov rsi, r13
call JS_FreeCString
test rbp, rbp
jz short loc_12D31
mov rdi, [rbp+0]
call _free
mov rdi, [rbp+8]
call _free
mov rdi, [rbp+10h]
call js_free_message_pipe
mov rdi, [rbp+18h]
call js_free_message_pipe
mov rdi, rbp
call _free
loc_12D31:
mov rdi, rbx
mov rsi, r12
mov rdx, r14
call JS_FreeValue
push 6
pop r14
xor r12d, r12d
xor ecx, ecx
loc_12D48:
mov eax, r12d
or rax, rcx
mov rdx, r14
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_12D60:
mov rdi, rbx
mov rsi, [rsp+88h+var_80]
call JS_FreeCString
mov rdi, rbx
mov rsi, r13
call JS_FreeCString
mov rax, 0FFFFFFFF00000000h
mov rcx, r12
jmp loc_12CD8
| unsigned long long js_worker_ctor(long long a1, long long a2, long long a3, long long a4, long long *a5)
{
long long Runtime; // rax
int v8; // edx
int v9; // ecx
int v10; // r8d
int v11; // r9d
unsigned int ScriptOrModuleName; // eax
unsigned int v13; // ebp
long long v14; // r12
long long v15; // r14
long long v16; // rax
long long v17; // r13
_QWORD *v18; // rbp
long long v19; // rax
long long v20; // rax
long long v21; // r12
long long v22; // rdx
int v23; // r15d
int v24; // edx
int v25; // ecx
int v26; // r8d
int v27; // r9d
const char *v28; // rsi
long long v29; // rax
unsigned long long v30; // rcx
unsigned long long v31; // rcx
long long v33; // [rsp+8h] [rbp-80h]
long long v34; // [rsp+10h] [rbp-78h]
char v35[8]; // [rsp+18h] [rbp-70h] BYREF
_BYTE v36[104]; // [rsp+20h] [rbp-68h] BYREF
Runtime = JS_GetRuntime(a1);
if ( !(unsigned int)is_main_thread(Runtime) )
{
v28 = "cannot create a worker inside a worker";
LABEL_14:
v29 = JS_ThrowTypeError(a1, (_DWORD)v28, v8, v9, v10, v11);
LODWORD(v21) = v29;
v30 = 0xFFFFFFFF00000000LL;
goto LABEL_15;
}
ScriptOrModuleName = JS_GetScriptOrModuleName(a1, 1LL);
if ( !ScriptOrModuleName )
{
v28 = "could not determine calling script or module name";
goto LABEL_14;
}
v13 = ScriptOrModuleName;
v34 = a3;
v14 = JS_AtomToCString(a1, ScriptOrModuleName);
JS_FreeAtom(a1, v13);
v15 = 3LL;
v33 = v14;
if ( !v14 || (v16 = JS_ToCString(a1, *a5, a5[1])) == 0 )
{
v17 = 0LL;
v21 = 0LL;
v18 = 0LL;
goto LABEL_17;
}
v17 = v16;
v18 = (_QWORD *)calloc(1LL, 32LL);
if ( !v18
|| (*v18 = strdup(v17), v18[1] = strdup(v14), v19 = js_new_message_pipe(), (v18[2] = v19) == 0LL)
|| (v20 = js_new_message_pipe(), (v18[3] = v20) == 0LL) )
{
JS_ThrowOutOfMemory(a1);
v21 = 0LL;
goto LABEL_17;
}
v21 = js_worker_ctor_internal(a1, a2, v34);
v15 = v22;
if ( (_DWORD)v22 != 6 )
{
pthread_attr_init(v36);
pthread_attr_setdetachstate(v36, 1LL);
pthread_attr_setstacksize(v36, 0x200000LL);
v23 = pthread_create(v35, v36, worker_func, v18);
pthread_attr_destroy(v36);
if ( v23 )
{
JS_ThrowTypeError(a1, (unsigned int)"could not create worker", v24, v25, v26, v27);
goto LABEL_17;
}
JS_FreeCString(a1, v33);
JS_FreeCString(a1, v17);
v29 = 0xFFFFFFFF00000000LL;
v30 = v21;
LABEL_15:
v31 = v29 & v30;
return v31 | (unsigned int)v21;
}
LABEL_17:
JS_FreeCString(a1, v33);
JS_FreeCString(a1, v17);
if ( v18 )
{
free(*v18);
free(v18[1]);
js_free_message_pipe(v18[2]);
js_free_message_pipe(v18[3]);
free(v18);
}
JS_FreeValue(a1, v21, v15);
LODWORD(v21) = 0;
v31 = 0LL;
return v31 | (unsigned int)v21;
}
| js_worker_ctor:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R13,R8
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
CALL 0x0011a185
MOV RDI,RAX
CALL 0x001132c2
TEST EAX,EAX
JZ 0x00112ca4
PUSH 0x1
POP RSI
MOV RDI,RBX
CALL 0x00129420
TEST EAX,EAX
JZ 0x00112cb7
MOV EBP,EAX
MOV qword ptr [RSP + 0x10],R14
MOV RDI,RBX
MOV ESI,EAX
CALL 0x0011a9bf
MOV R12,RAX
MOV RDI,RBX
MOV ESI,EBP
CALL 0x0011a995
PUSH 0x3
POP R14
MOV qword ptr [RSP + 0x8],R12
TEST R12,R12
JZ 0x00112cad
MOV RSI,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
MOV RDI,RBX
CALL 0x00111a6c
TEST RAX,RAX
JZ 0x00112cad
MOV R13,RAX
PUSH 0x1
POP RDI
PUSH 0x20
POP RSI
CALL 0x0010e500
MOV RBP,RAX
TEST RAX,RAX
JZ 0x00112cdd
MOV RDI,R13
CALL 0x0010e930
MOV qword ptr [RBP],RAX
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0010e930
MOV qword ptr [RBP + 0x8],RAX
CALL 0x001132d6
MOV qword ptr [RBP + 0x10],RAX
TEST RAX,RAX
JZ 0x00112cdd
CALL 0x001132d6
MOV qword ptr [RBP + 0x18],RAX
TEST RAX,RAX
JZ 0x00112cdd
MOV R8,qword ptr [RBP + 0x10]
MOV RDI,RBX
MOV RSI,R15
MOV RDX,qword ptr [RSP + 0x10]
MOV RCX,RAX
CALL 0x00112d8a
MOV R12,RAX
MOV R14,RDX
CMP R14D,0x6
JZ 0x00112ce8
LEA R15,[RSP + 0x20]
MOV RDI,R15
CALL 0x0010e4a0
PUSH 0x1
POP RSI
MOV RDI,R15
CALL 0x0010e650
MOV ESI,0x200000
MOV RDI,R15
CALL 0x0010e9e0
LEA RDX,[0x113341]
LEA RDI,[RSP + 0x18]
MOV RSI,R15
MOV RCX,RBP
CALL 0x0010e730
MOV R15D,EAX
LEA RDI,[RSP + 0x20]
CALL 0x0010e890
TEST R15D,R15D
JZ 0x00112d60
LEA RSI,[0x182d96]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x0011c64d
JMP 0x00112ce8
LAB_00112ca4:
LEA RSI,[0x182d3d]
JMP 0x00112cbe
LAB_00112cad:
XOR R13D,R13D
XOR R12D,R12D
XOR EBP,EBP
JMP 0x00112ce8
LAB_00112cb7:
LEA RSI,[0x182d64]
LAB_00112cbe:
MOV RDI,RBX
XOR EAX,EAX
CALL 0x0011c64d
MOV R12,RAX
MOV R14,RDX
MOV RCX,-0x100000000
LAB_00112cd8:
AND RCX,RAX
JMP 0x00112d48
LAB_00112cdd:
MOV RDI,RBX
CALL 0x001171e0
XOR R12D,R12D
LAB_00112ce8:
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x0011b057
MOV RDI,RBX
MOV RSI,R13
CALL 0x0011b057
TEST RBP,RBP
JZ 0x00112d31
MOV RDI,qword ptr [RBP]
CALL 0x0010e060
MOV RDI,qword ptr [RBP + 0x8]
CALL 0x0010e060
MOV RDI,qword ptr [RBP + 0x10]
CALL 0x00110360
MOV RDI,qword ptr [RBP + 0x18]
CALL 0x00110360
MOV RDI,RBP
CALL 0x0010e060
LAB_00112d31:
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R14
CALL 0x0011801e
PUSH 0x6
POP R14
XOR R12D,R12D
XOR ECX,ECX
LAB_00112d48:
MOV EAX,R12D
OR RAX,RCX
MOV RDX,R14
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00112d60:
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x0011b057
MOV RDI,RBX
MOV RSI,R13
CALL 0x0011b057
MOV RAX,-0x100000000
MOV RCX,R12
JMP 0x00112cd8
|
int1 [16]
js_worker_ctor(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 *param_5)
{
int iVar1;
int8 uVar2;
char *pcVar3;
char *__s;
int8 *__arg;
char *pcVar4;
long lVar5;
ulong uVar6;
ulong uVar7;
int1 auVar8 [16];
int1 auVar9 [16];
pthread_t local_70;
pthread_attr_t local_68;
uVar2 = JS_GetRuntime();
iVar1 = is_main_thread(uVar2);
if (iVar1 == 0) {
pcVar3 = "cannot create a worker inside a worker";
LAB_00112cbe:
auVar8 = JS_ThrowTypeError(param_1,pcVar3);
uVar6 = auVar8._0_8_;
uVar7 = 0xffffffff00000000;
}
else {
iVar1 = JS_GetScriptOrModuleName(param_1,1);
if (iVar1 == 0) {
pcVar3 = "could not determine calling script or module name";
goto LAB_00112cbe;
}
pcVar3 = (char *)JS_AtomToCString(param_1,iVar1);
JS_FreeAtom(param_1,iVar1);
if (pcVar3 == (char *)0x0) {
LAB_00112cad:
__s = (char *)0x0;
auVar8 = ZEXT816(3) << 0x40;
__arg = (int8 *)0x0;
LAB_00112ce8:
JS_FreeCString(param_1,pcVar3);
JS_FreeCString(param_1,__s);
if (__arg != (int8 *)0x0) {
free((void *)*__arg);
free((void *)__arg[1]);
js_free_message_pipe(__arg[2]);
js_free_message_pipe(__arg[3]);
free(__arg);
}
JS_FreeValue(param_1,auVar8._0_8_,auVar8._8_8_);
auVar8 = ZEXT816(6) << 0x40;
uVar7 = 0;
goto LAB_00112d48;
}
__s = (char *)JS_ToCString(param_1,*param_5,param_5[1]);
if (__s == (char *)0x0) goto LAB_00112cad;
__arg = (int8 *)calloc(1,0x20);
if (__arg == (int8 *)0x0) {
LAB_00112cdd:
JS_ThrowOutOfMemory(param_1);
auVar8 = ZEXT816(3) << 0x40;
goto LAB_00112ce8;
}
pcVar4 = strdup(__s);
*__arg = pcVar4;
pcVar4 = strdup(pcVar3);
__arg[1] = pcVar4;
lVar5 = js_new_message_pipe();
__arg[2] = lVar5;
if (lVar5 == 0) goto LAB_00112cdd;
lVar5 = js_new_message_pipe();
__arg[3] = lVar5;
if (lVar5 == 0) goto LAB_00112cdd;
auVar8 = js_worker_ctor_internal(param_1,param_2,param_3,lVar5,__arg[2]);
uVar7 = auVar8._0_8_;
if (auVar8._8_4_ == 6) goto LAB_00112ce8;
pthread_attr_init(&local_68);
pthread_attr_setdetachstate(&local_68,1);
pthread_attr_setstacksize(&local_68,0x200000);
iVar1 = pthread_create(&local_70,&local_68,worker_func,__arg);
pthread_attr_destroy(&local_68);
if (iVar1 != 0) {
JS_ThrowTypeError(param_1,"could not create worker");
goto LAB_00112ce8;
}
JS_FreeCString(param_1,pcVar3);
JS_FreeCString(param_1,__s);
uVar6 = 0xffffffff00000000;
}
uVar7 = uVar7 & uVar6;
LAB_00112d48:
auVar9._0_8_ = auVar8._0_8_ & 0xffffffff | uVar7;
auVar9._8_8_ = auVar8._8_8_;
return auVar9;
}
| |
29,865 | minja::Parser::parseLogicalOr() | monkey531[P]llama/common/./minja.hpp | std::shared_ptr<Expression> parseLogicalOr() {
auto left = parseLogicalAnd();
if (!left) throw std::runtime_error("Expected left side of 'logical or' expression");
static std::regex or_tok(R"(or\b)");
auto location = get_location();
while (!consumeToken(or_tok).empty()) {
auto right = parseLogicalAnd();
if (!right) throw std::runtime_error("Expected right side of 'or' expression");
left = std::make_shared<BinaryOpExpr>(location, std::move(left), std::move(right), BinaryOpExpr::Op::Or);
}
return left;
} | O0 | cpp | minja::Parser::parseLogicalOr():
subq $0xb8, %rsp
movq %rdi, 0x28(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq 0xa8(%rsp), %rsi
movq %rsi, 0x20(%rsp)
movb $0x0, 0xa7(%rsp)
callq 0x9d6f0
movq 0x28(%rsp), %rdi
callq 0x77a80
testb $0x1, %al
jne 0x9d068
movl $0x10, %edi
callq 0x50540
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x10(%rsp)
leaq 0x12f773(%rip), %rsi # 0x1cc77b
callq 0x50340
jmp 0x9d00f
movq 0x10(%rsp), %rdi
movq 0x1b6f95(%rip), %rsi # 0x253fb0
movq 0x1b6f56(%rip), %rdx # 0x253f78
callq 0x508f0
jmp 0x9d2a1
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
callq 0x50c40
jmp 0x9d28a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
jmp 0x9d28a
cmpb $0x0, 0x1b7ed1(%rip) # 0x254f40
jne 0x9d0c2
leaq 0x1b7ec8(%rip), %rdi # 0x254f40
callq 0x504b0
cmpl $0x0, %eax
je 0x9d0c2
leaq 0x1b7e97(%rip), %rdi # 0x254f20
leaq 0x12f719(%rip), %rsi # 0x1cc7a9
movl $0x10, %edx
callq 0x76c30
jmp 0x9d09c
leaq -0x263c3(%rip), %rdi # 0x76ce0
leaq 0x1b7e76(%rip), %rsi # 0x254f20
leaq 0x1b77b7(%rip), %rdx # 0x254868
callq 0x50c20
leaq 0x1b7e83(%rip), %rdi # 0x254f40
callq 0x50820
movq 0x20(%rsp), %rsi
leaq 0x78(%rsp), %rdi
callq 0x76db0
jmp 0x9d0d3
jmp 0x9d0d5
movq 0x20(%rsp), %rsi
leaq 0x1b7e3f(%rip), %rdx # 0x254f20
leaq 0x58(%rsp), %rdi
movl $0x1, %ecx
callq 0x778a0
jmp 0x9d0f2
leaq 0x58(%rsp), %rdi
callq 0x503b0
xorb $-0x1, %al
movb %al, 0xf(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x510c0
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x9d119
jmp 0x9d249
movq 0x20(%rsp), %rsi
leaq 0x48(%rsp), %rdi
callq 0x9d6f0
jmp 0x9d12a
leaq 0x48(%rsp), %rdi
callq 0x77a80
testb $0x1, %al
jne 0x9d1ed
movl $0x10, %edi
callq 0x50540
movq %rax, %rdi
movq %rdi, %rax
movq %rax, (%rsp)
leaq 0x12f657(%rip), %rsi # 0x1cc7ae
callq 0x50340
jmp 0x9d15e
movq (%rsp), %rdi
movq 0x1b6e47(%rip), %rsi # 0x253fb0
movq 0x1b6e08(%rip), %rdx # 0x253f78
callq 0x508f0
jmp 0x9d2a1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
leaq 0x1b7dab(%rip), %rdi # 0x254f40
callq 0x505d0
jmp 0x9d28a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
jmp 0x9d267
movq (%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
callq 0x50c40
jmp 0x9d23d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
jmp 0x9d23d
movq 0x28(%rsp), %rdx
movl $0xf, 0x34(%rsp)
leaq 0x38(%rsp), %rdi
leaq 0x78(%rsp), %rsi
leaq 0x48(%rsp), %rcx
leaq 0x34(%rsp), %r8
callq 0x9da00
jmp 0x9d215
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x9daa0
leaq 0x38(%rsp), %rdi
callq 0x9dad0
leaq 0x48(%rsp), %rdi
callq 0x77890
jmp 0x9d0d5
leaq 0x48(%rsp), %rdi
callq 0x77890
jmp 0x9d267
movb $0x1, 0xa7(%rsp)
leaq 0x78(%rsp), %rdi
callq 0x7a6d0
testb $0x1, 0xa7(%rsp)
jne 0x9d27d
jmp 0x9d273
leaq 0x78(%rsp), %rdi
callq 0x7a6d0
jmp 0x9d28a
movq 0x28(%rsp), %rdi
callq 0x77890
movq 0x18(%rsp), %rax
addq $0xb8, %rsp
retq
movq 0x28(%rsp), %rdi
callq 0x77890
movq 0x98(%rsp), %rdi
callq 0x50940
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
| _ZN5minja6Parser14parseLogicalOrEv:
sub rsp, 0B8h
mov [rsp+0B8h+var_90], rdi
mov rax, rdi
mov [rsp+0B8h+var_A0], rax
mov [rsp+0B8h+var_8], rdi
mov [rsp+0B8h+var_10], rsi
mov rsi, [rsp+0B8h+var_10]
mov [rsp+0B8h+var_98], rsi
mov [rsp+0B8h+var_11], 0
call _ZN5minja6Parser15parseLogicalAndEv; minja::Parser::parseLogicalAnd(void)
mov rdi, [rsp+0B8h+var_90]
call _ZNKSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(void)
test al, 1
jnz short loc_9D068
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rsp+0B8h+var_A8], rax
lea rsi, aExpectedLeftSi; "Expected left side of 'logical or' expr"...
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short $+2
loc_9D00F:
mov rdi, [rsp+0B8h+var_A8]; void *
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
jmp loc_9D2A1
mov rdi, [rsp+arg_8]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_90], rcx
mov [rsp+arg_8C], eax
call ___cxa_free_exception
jmp loc_9D28A
mov rcx, rax
mov eax, edx
mov [rsp+arg_90], rcx
mov [rsp+arg_8C], eax
jmp loc_9D28A
loc_9D068:
cmp cs:_ZGVZN5minja6Parser14parseLogicalOrEvE6or_tokB5cxx11, 0; `guard variable for'minja::Parser::parseLogicalOr(void)::or_tok
jnz short loc_9D0C2
lea rdi, _ZGVZN5minja6Parser14parseLogicalOrEvE6or_tokB5cxx11; __guard *
call ___cxa_guard_acquire
cmp eax, 0
jz short loc_9D0C2
lea rdi, _ZZN5minja6Parser14parseLogicalOrEvE6or_tokB5cxx11; minja::Parser::parseLogicalOr(void)::or_tok
lea rsi, aOrB; "or\\b"
mov edx, 10h
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
jmp short $+2
loc_9D09C:
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser14parseLogicalOrEvE6or_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser14parseLogicalOrEvE6or_tokB5cxx11; __guard *
call ___cxa_guard_release
loc_9D0C2:
mov rsi, [rsp+0B8h+var_98]
lea rdi, [rsp+0B8h+var_40]; this
call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void)
jmp short $+2
loc_9D0D3:
jmp short $+2
loc_9D0D5:
mov rsi, [rsp+0B8h+var_98]
lea rdx, _ZZN5minja6Parser14parseLogicalOrEvE6or_tokB5cxx11; minja::Parser::parseLogicalOr(void)::or_tok
lea rdi, [rsp+0B8h+var_60]
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
jmp short $+2
loc_9D0F2:
lea rdi, [rsp+0B8h+var_60]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
xor al, 0FFh
mov [rsp+0B8h+var_A9], al
lea rdi, [rsp+0B8h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov al, [rsp+0B8h+var_A9]
test al, 1
jnz short loc_9D119
jmp loc_9D249
loc_9D119:
mov rsi, [rsp+0B8h+var_98]
lea rdi, [rsp+0B8h+var_70]; this
call _ZN5minja6Parser15parseLogicalAndEv; minja::Parser::parseLogicalAnd(void)
jmp short $+2
loc_9D12A:
lea rdi, [rsp+0B8h+var_70]
call _ZNKSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(void)
test al, 1
jnz loc_9D1ED
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rsp+0B8h+var_B8], rax
lea rsi, aExpectedRightS; "Expected right side of 'or' expression"
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short $+2
loc_9D15E:
mov rdi, [rsp+0B8h+var_B8]; void *
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
jmp loc_9D2A1
mov rcx, rax
mov eax, edx
mov [rsp+arg_90], rcx
mov [rsp+arg_8C], eax
lea rdi, _ZGVZN5minja6Parser14parseLogicalOrEvE6or_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp loc_9D28A
mov rcx, rax
mov eax, edx
mov [rsp+arg_90], rcx
mov [rsp+arg_8C], eax
jmp loc_9D267
mov rdi, [rsp+0]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_90], rcx
mov [rsp+arg_8C], eax
call ___cxa_free_exception
jmp short loc_9D23D
mov rcx, rax
mov eax, edx
mov [rsp+arg_90], rcx
mov [rsp+arg_8C], eax
jmp short loc_9D23D
loc_9D1ED:
mov rdx, [rsp+0B8h+var_90]
mov [rsp+0B8h+var_84], 0Fh
lea rdi, [rsp+0B8h+var_80]
lea rsi, [rsp+0B8h+var_40]
lea rcx, [rsp+0B8h+var_70]
lea r8, [rsp+0B8h+var_84]
call _ZSt11make_sharedIN5minja12BinaryOpExprEJRNS0_8LocationESt10shared_ptrINS0_10ExpressionEES6_NS1_2OpEEES4_IT_EDpOT0_; std::make_shared<minja::BinaryOpExpr,minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>(minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op &&)
jmp short $+2
loc_9D215:
mov rdi, [rsp+0B8h+var_90]
lea rsi, [rsp+0B8h+var_80]
call _ZNSt10shared_ptrIN5minja10ExpressionEEaSINS0_12BinaryOpExprEEENSt9enable_ifIXsr13is_assignableIRSt12__shared_ptrIS1_LN9__gnu_cxx12_Lock_policyE2EES_IT_EEE5valueERS2_E4typeEOSC_
lea rdi, [rsp+0B8h+var_80]
call _ZNSt10shared_ptrIN5minja12BinaryOpExprEED2Ev; std::shared_ptr<minja::BinaryOpExpr>::~shared_ptr()
lea rdi, [rsp+0B8h+var_70]
call _ZNSt10shared_ptrIN5minja10ExpressionEED2Ev; std::shared_ptr<minja::Expression>::~shared_ptr()
jmp loc_9D0D5
loc_9D23D:
lea rdi, [rsp+arg_40]
call _ZNSt10shared_ptrIN5minja10ExpressionEED2Ev; std::shared_ptr<minja::Expression>::~shared_ptr()
jmp short loc_9D267
loc_9D249:
mov [rsp+0B8h+var_11], 1
lea rdi, [rsp+0B8h+var_40]; this
call _ZN5minja8LocationD2Ev; minja::Location::~Location()
test [rsp+0B8h+var_11], 1
jnz short loc_9D27D
jmp short loc_9D273
loc_9D267:
lea rdi, [rsp+arg_70]; this
call _ZN5minja8LocationD2Ev; minja::Location::~Location()
jmp short loc_9D28A
loc_9D273:
mov rdi, [rsp+0B8h+var_90]
call _ZNSt10shared_ptrIN5minja10ExpressionEED2Ev; std::shared_ptr<minja::Expression>::~shared_ptr()
loc_9D27D:
mov rax, [rsp+0B8h+var_A0]
add rsp, 0B8h
retn
loc_9D28A:
mov rdi, [rsp+arg_20]
call _ZNSt10shared_ptrIN5minja10ExpressionEED2Ev; std::shared_ptr<minja::Expression>::~shared_ptr()
mov rdi, [rsp+arg_90]
call __Unwind_Resume
loc_9D2A1:
nop word ptr [rax+rax+00000000h]
nop dword ptr [rax+rax+00h]
| minja::Parser * minja::Parser::parseLogicalOr(minja::Parser *this, long long a2)
{
int v2; // r9d
int v4; // [rsp+0h] [rbp-B8h]
std::runtime_error *v5; // [rsp+0h] [rbp-B8h]
int v6; // [rsp+8h] [rbp-B0h]
char v7; // [rsp+Fh] [rbp-A9h]
int v8; // [rsp+10h] [rbp-A8h]
std::runtime_error *exception; // [rsp+10h] [rbp-A8h]
minja::Parser *v10; // [rsp+18h] [rbp-A0h]
long long v11; // [rsp+20h] [rbp-98h]
int v12; // [rsp+34h] [rbp-84h] BYREF
_BYTE v13[16]; // [rsp+38h] [rbp-80h] BYREF
_QWORD v14[2]; // [rsp+48h] [rbp-70h] BYREF
_BYTE v15[32]; // [rsp+58h] [rbp-60h] BYREF
_BYTE v16[47]; // [rsp+78h] [rbp-40h] BYREF
char v17; // [rsp+A7h] [rbp-11h]
long long v18; // [rsp+A8h] [rbp-10h]
minja::Parser *v19; // [rsp+B0h] [rbp-8h]
v10 = this;
v19 = this;
v18 = a2;
v11 = a2;
v17 = 0;
minja::Parser::parseLogicalAnd(this);
if ( !std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(this) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected left side of 'logical or' expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( !(_BYTE)`guard variable for'minja::Parser::parseLogicalOr(void)::or_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseLogicalOr(void)::or_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseLogicalOr(void)::or_tok[abi:cxx11],
(long long)"or\\b",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseLogicalOr(void)::or_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseLogicalOr(void)::or_tok[abi:cxx11]);
}
minja::Parser::get_location((minja::Parser *)v16, a2);
while ( 1 )
{
minja::Parser::consumeToken((long long)v15, v11, (long long)&minja::Parser::parseLogicalOr(void)::or_tok[abi:cxx11], 1u);
v7 = ~(unsigned __int8)std::string::empty(v15);
std::string::~string(v15);
if ( (v7 & 1) == 0 )
break;
minja::Parser::parseLogicalAnd((minja::Parser *)v14);
if ( !std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(v14) )
{
v5 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v5, "Expected right side of 'or' expression");
__cxa_throw(
v5,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v12 = 15;
std::make_shared<minja::BinaryOpExpr,minja::Location &,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>(
(unsigned int)v13,
(unsigned int)v16,
(_DWORD)this,
(unsigned int)v14,
(unsigned int)&v12,
v2,
v4,
v6,
v8,
(long long)v10,
v11);
std::shared_ptr<minja::Expression>::operator=<minja::BinaryOpExpr>(this, v13);
std::shared_ptr<minja::BinaryOpExpr>::~shared_ptr(v13);
std::shared_ptr<minja::Expression>::~shared_ptr((long long)v14);
}
v17 = 1;
minja::Location::~Location((minja::Location *)v16);
if ( (v17 & 1) == 0 )
std::shared_ptr<minja::Expression>::~shared_ptr((long long)this);
return v10;
}
| parseLogicalOr:
SUB RSP,0xb8
MOV qword ptr [RSP + 0x28],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0xb0],RDI
MOV qword ptr [RSP + 0xa8],RSI
MOV RSI,qword ptr [RSP + 0xa8]
MOV qword ptr [RSP + 0x20],RSI
MOV byte ptr [RSP + 0xa7],0x0
CALL 0x0019d6f0
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00177a80
TEST AL,0x1
JNZ 0x0019d068
MOV EDI,0x10
CALL 0x00150540
MOV RDI,RAX
MOV RAX,RDI
MOV qword ptr [RSP + 0x10],RAX
LAB_0019d001:
LEA RSI,[0x2cc77b]
CALL 0x00150340
JMP 0x0019d00f
LAB_0019d00f:
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [0x00353fb0]
MOV RDX,qword ptr [0x00353f78]
CALL 0x001508f0
LAB_0019d068:
CMP byte ptr [0x00354f40],0x0
JNZ 0x0019d0c2
LEA RDI,[0x354f40]
CALL 0x001504b0
CMP EAX,0x0
JZ 0x0019d0c2
LAB_0019d082:
LEA RDI,[0x354f20]
LEA RSI,[0x2cc7a9]
MOV EDX,0x10
CALL 0x00176c30
JMP 0x0019d09c
LAB_0019d09c:
LEA RDI,[0x176ce0]
LEA RSI,[0x354f20]
LEA RDX,[0x354868]
CALL 0x00150c20
LEA RDI,[0x354f40]
CALL 0x00150820
LAB_0019d0c2:
MOV RSI,qword ptr [RSP + 0x20]
LEA RDI,[RSP + 0x78]
CALL 0x00176db0
JMP 0x0019d0d3
LAB_0019d0d3:
JMP 0x0019d0d5
LAB_0019d0d5:
MOV RSI,qword ptr [RSP + 0x20]
LEA RDX,[0x354f20]
LEA RDI,[RSP + 0x58]
MOV ECX,0x1
CALL 0x001778a0
JMP 0x0019d0f2
LAB_0019d0f2:
LEA RDI,[RSP + 0x58]
CALL 0x001503b0
XOR AL,0xff
MOV byte ptr [RSP + 0xf],AL
LEA RDI,[RSP + 0x58]
CALL 0x001510c0
MOV AL,byte ptr [RSP + 0xf]
TEST AL,0x1
JNZ 0x0019d119
JMP 0x0019d249
LAB_0019d119:
MOV RSI,qword ptr [RSP + 0x20]
LEA RDI,[RSP + 0x48]
CALL 0x0019d6f0
LAB_0019d128:
JMP 0x0019d12a
LAB_0019d12a:
LEA RDI,[RSP + 0x48]
CALL 0x00177a80
TEST AL,0x1
JNZ 0x0019d1ed
MOV EDI,0x10
CALL 0x00150540
MOV RDI,RAX
MOV RAX,RDI
MOV qword ptr [RSP],RAX
LAB_0019d150:
LEA RSI,[0x2cc7ae]
CALL 0x00150340
JMP 0x0019d15e
LAB_0019d15e:
MOV RDI,qword ptr [RSP]
MOV RSI,qword ptr [0x00353fb0]
MOV RDX,qword ptr [0x00353f78]
CALL 0x001508f0
LAB_0019d1ed:
MOV RDX,qword ptr [RSP + 0x28]
MOV dword ptr [RSP + 0x34],0xf
LAB_0019d1fa:
LEA RDI,[RSP + 0x38]
LEA RSI,[RSP + 0x78]
LEA RCX,[RSP + 0x48]
LEA R8,[RSP + 0x34]
CALL 0x0019da00
LAB_0019d213:
JMP 0x0019d215
LAB_0019d215:
MOV RDI,qword ptr [RSP + 0x28]
LEA RSI,[RSP + 0x38]
CALL 0x0019daa0
LEA RDI,[RSP + 0x38]
CALL 0x0019dad0
LEA RDI,[RSP + 0x48]
CALL 0x00177890
JMP 0x0019d0d5
LAB_0019d249:
MOV byte ptr [RSP + 0xa7],0x1
LEA RDI,[RSP + 0x78]
CALL 0x0017a6d0
TEST byte ptr [RSP + 0xa7],0x1
JNZ 0x0019d27d
JMP 0x0019d273
LAB_0019d273:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00177890
LAB_0019d27d:
MOV RAX,qword ptr [RSP + 0x18]
ADD RSP,0xb8
RET
|
/* minja::Parser::parseLogicalOr() */
__shared_ptr * minja::Parser::parseLogicalOr(void)
{
bool bVar1;
byte bVar2;
int iVar3;
runtime_error *prVar4;
int8 in_RSI;
__shared_ptr *in_RDI;
Location local_80 [16];
__shared_ptr local_70 [16];
string local_60 [32];
shared_ptr local_40 [47];
byte local_11;
local_11 = 0;
parseLogicalAnd();
bVar1 = std::__shared_ptr::operator_cast_to_bool(in_RDI);
if (!bVar1) {
prVar4 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0019d001 to 0019d00c has its CatchHandler @ 0019d02c */
std::runtime_error::runtime_error(prVar4,"Expected left side of \'logical or\' expression");
/* try { // try from 0019d00f to 0019d026 has its CatchHandler @ 0019d04f */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar4,PTR_typeinfo_00353fb0,PTR__runtime_error_00353f78);
}
if (parseLogicalOr()::or_tok_abi_cxx11_ == '\0') {
iVar3 = __cxa_guard_acquire(&parseLogicalOr()::or_tok_abi_cxx11_);
if (iVar3 != 0) {
/* try { // try from 0019d082 to 0019d099 has its CatchHandler @ 0019d17a */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
(parseLogicalOr()::or_tok_abi_cxx11_,&DAT_002cc7a9,0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseLogicalOr()::or_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseLogicalOr()::or_tok_abi_cxx11_);
}
}
/* try { // try from 0019d0c2 to 0019d0d0 has its CatchHandler @ 0019d04f */
get_location();
while( true ) {
/* try { // try from 0019d0d5 to 0019d127 has its CatchHandler @ 0019d19f */
consumeToken(local_60,in_RSI,parseLogicalOr()::or_tok_abi_cxx11_,1);
bVar2 = std::__cxx11::string::empty();
std::__cxx11::string::~string(local_60);
if (((bVar2 ^ 0xff) & 1) == 0) {
local_11 = 1;
Location::~Location((Location *)local_40);
if ((local_11 & 1) == 0) {
std::shared_ptr<minja::Expression>::~shared_ptr((shared_ptr<minja::Expression> *)in_RDI);
}
return in_RDI;
}
parseLogicalAnd();
bVar1 = std::__shared_ptr::operator_cast_to_bool(local_70);
if (!bVar1) break;
/* try { // try from 0019d1fa to 0019d212 has its CatchHandler @ 0019d1d7 */
std::
make_shared<minja::BinaryOpExpr,minja::Location&,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>
(local_80,local_40,(shared_ptr *)in_RDI,(Op *)local_70);
std::shared_ptr<minja::Expression>::operator=
((shared_ptr<minja::Expression> *)in_RDI,(shared_ptr *)local_80);
std::shared_ptr<minja::BinaryOpExpr>::~shared_ptr((shared_ptr<minja::BinaryOpExpr> *)local_80);
std::shared_ptr<minja::Expression>::~shared_ptr((shared_ptr<minja::Expression> *)local_70);
}
prVar4 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0019d150 to 0019d15b has its CatchHandler @ 0019d1b8 */
std::runtime_error::runtime_error(prVar4,"Expected right side of \'or\' expression");
/* try { // try from 0019d15e to 0019d174 has its CatchHandler @ 0019d1d7 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar4,PTR_typeinfo_00353fb0,PTR__runtime_error_00353f78);
}
| |
29,866 | minja::Parser::parseStringConcat() | monkey531[P]llama/common/minja.hpp | std::shared_ptr<Expression> parseStringConcat() {
auto left = parseMathPow();
if (!left) throw std::runtime_error("Expected left side of 'string concat' expression");
static std::regex concat_tok(R"(~(?!\}))");
if (!consumeToken(concat_tok).empty()) {
auto right = parseLogicalAnd();
if (!right) throw std::runtime_error("Expected right side of 'string concat' expression");
left = std::make_shared<BinaryOpExpr>(get_location(), std::move(left), std::move(right), BinaryOpExpr::Op::StrConcat);
}
return left;
} | O3 | cpp | minja::Parser::parseStringConcat():
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x8c4a6
cmpq $0x0, (%rbx)
je 0x8c376
leaq 0xa5f09(%rip), %rax # 0x132160
movb (%rax), %al
testb %al, %al
je 0x8c3ad
leaq 0xa5ed8(%rip), %rdx # 0x132140
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0x88460
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
movq -0x8(%rax), %r15
cmpq %rax, %rdi
je 0x8c299
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1b930
testq %r15, %r15
je 0x8c369
movq %rsp, %rdi
movq %r14, %rsi
callq 0x89a2c
cmpq $0x0, (%rsp)
je 0x8c404
movq (%r14), %rax
movq %rax, 0x10(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x8c2e3
movq 0xa4ca3(%rip), %rcx # 0x130f78
cmpb $0x0, (%rcx)
je 0x8c2df
incl 0x8(%rax)
jmp 0x8c2e3
lock
incl 0x8(%rax)
movq 0x20(%r14), %rax
subq 0x10(%r14), %rax
movq %rax, 0x20(%rsp)
movl $0x58, %edi
callq 0x1b900
movq %rax, %r14
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x8(%r14)
leaq 0xa3666(%rip), %rax # 0x12f978
addq $0x10, %rax
movq %rax, (%r14)
movq %r14, %r15
addq $0x10, %r15
leaq 0x10(%rsp), %rsi
movq %rsp, %rcx
movq %r15, %rdi
movq %rbx, %rdx
xorl %r8d, %r8d
callq 0x9a39e
movq %r15, (%rbx)
movq 0x8(%rbx), %rdi
movq %r14, 0x8(%rbx)
testq %rdi, %rdi
je 0x8c34b
callq 0x267a6
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x8c35a
callq 0x267a6
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x8c369
callq 0x267a6
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x1b480
movq %rax, %r15
leaq 0x687d8(%rip), %rsi # 0xf4b62
movq %rax, %rdi
callq 0x1b350
movq 0xa4c4f(%rip), %rsi # 0x130fe8
movq 0xa4bb0(%rip), %rdx # 0x130f50
movq %r15, %rdi
callq 0x1c040
jmp 0x8c436
leaq 0xa5dac(%rip), %rdi # 0x132160
callq 0x1c130
testl %eax, %eax
je 0x8c261
leaq 0xa5d78(%rip), %rdi # 0x132140
leaq 0x687c4(%rip), %rsi # 0xf4b93
movl $0x10, %edx
callq 0x675a8
leaq -0x24b34(%rip), %rdi # 0x678ac
leaq 0xa5d59(%rip), %rsi # 0x132140
leaq 0xa558a(%rip), %rdx # 0x131978
callq 0x1b7f0
leaq 0xa5d66(%rip), %rdi # 0x132160
callq 0x1b600
jmp 0x8c261
movl $0x10, %edi
callq 0x1b480
movq %rax, %r15
leaq 0x68783(%rip), %rsi # 0xf4b9b
movq %rax, %rdi
callq 0x1b350
movq 0xa4bc1(%rip), %rsi # 0x130fe8
movq 0xa4b22(%rip), %rdx # 0x130f50
movq %r15, %rdi
callq 0x1c040
movq %rax, %r14
leaq 0xa5d20(%rip), %rdi # 0x132160
callq 0x1b5f0
jmp 0x8c490
movq %rax, %r14
jmp 0x8c47a
movq %rax, %r14
movq %r15, %rdi
callq 0x1b6c0
jmp 0x8c47a
jmp 0x8c48d
movq %rax, %r14
movq %r15, %rdi
callq 0x1b6c0
jmp 0x8c490
movq %rax, %r14
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x8c47a
callq 0x267a6
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x8c490
callq 0x267a6
jmp 0x8c490
jmp 0x8c48d
movq %rax, %r14
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x8c49e
callq 0x267a6
movq %r14, %rdi
callq 0x1c0d0
| _ZN5minja6Parser17parseStringConcatEv:
push r15
push r14
push rbx
sub rsp, 30h
mov r14, rsi
mov rbx, rdi
call _ZN5minja6Parser12parseMathPowEv; minja::Parser::parseMathPow(void)
cmp qword ptr [rbx], 0
jz loc_8C376
lea rax, _ZGVZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; `guard variable for'minja::Parser::parseStringConcat(void)::concat_tok
mov al, [rax]
test al, al
jz loc_8C3AD
loc_8C261:
lea rdx, _ZZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; minja::Parser::parseStringConcat(void)::concat_tok
lea rdi, [rsp+48h+var_38]
mov rsi, r14
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
mov r15, [rax-8]
cmp rdi, rax
jz short loc_8C299
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8C299:
test r15, r15
jz loc_8C369
mov rdi, rsp; this
mov rsi, r14
call _ZN5minja6Parser15parseLogicalAndEv; minja::Parser::parseLogicalAnd(void)
cmp [rsp+48h+var_48], 0
jz loc_8C404
mov rax, [r14]
mov [rsp+48h+var_38], rax
mov rax, [r14+8]
mov [rsp+48h+var_30], rax
test rax, rax
jz short loc_8C2E3
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_8C2DF
inc dword ptr [rax+8]
jmp short loc_8C2E3
loc_8C2DF:
lock inc dword ptr [rax+8]
loc_8C2E3:
mov rax, [r14+20h]
sub rax, [r14+10h]
mov [rsp+48h+var_28], rax
mov edi, 58h ; 'X'; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
mov rax, 100000001h
mov [r14+8], rax
lea rax, _ZTVSt23_Sp_counted_ptr_inplaceIN5minja12BinaryOpExprESaIS1_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<minja::BinaryOpExpr>,(__gnu_cxx::_Lock_policy)2>
add rax, 10h
mov [r14], rax
mov r15, r14
add r15, 10h
lea rsi, [rsp+48h+var_38]
mov rcx, rsp
mov rdi, r15
mov rdx, rbx
xor r8d, r8d
call _ZN5minja12BinaryOpExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_NS0_2OpE; minja::BinaryOpExpr::BinaryOpExpr(minja::Location const&,std::shared_ptr<minja::Expression> &&,std::shared_ptr<minja::Expression> &,minja::BinaryOpExpr::Op)
mov [rbx], r15
mov rdi, [rbx+8]
mov [rbx+8], r14
test rdi, rdi
jz short loc_8C34B
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8C34B:
mov rdi, [rsp+48h+var_30]
test rdi, rdi
jz short loc_8C35A
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8C35A:
mov rdi, [rsp+48h+var_40]
test rdi, rdi
jz short loc_8C369
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8C369:
mov rax, rbx
add rsp, 30h
pop rbx
pop r14
pop r15
retn
loc_8C376:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedLeftSi_2; "Expected left side of 'string concat' e"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
jmp loc_8C436
loc_8C3AD:
lea rdi, _ZGVZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_8C261
lea rdi, _ZZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; minja::Parser::parseStringConcat(void)::concat_tok
lea rsi, asc_F4B93; "~(?!\\})"
mov edx, 10h
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_8C261
loc_8C404:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedRightS_2; "Expected right side of 'string concat' "...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
loc_8C436:
mov r14, rax
lea rdi, _ZGVZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_8C490
mov r14, rax
jmp short loc_8C47A
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_8C47A
jmp short loc_8C48D
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_8C490
mov r14, rax
mov rdi, [rsp+48h+var_30]
test rdi, rdi
jz short loc_8C47A
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8C47A:
mov rdi, [rsp+48h+var_40]
test rdi, rdi
jz short loc_8C490
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_8C490
jmp short $+2
loc_8C48D:
mov r14, rax
loc_8C490:
mov rdi, [rbx+8]
test rdi, rdi
jz short loc_8C49E
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8C49E:
mov rdi, r14
call __Unwind_Resume
| minja::Parser * minja::Parser::parseStringConcat(volatile signed __int32 **this, long long *a2)
{
volatile signed __int32 *v3; // r15
volatile signed __int32 *v4; // rax
volatile signed __int32 *v5; // r14
volatile signed __int32 *v6; // rdi
std::runtime_error *exception; // r15
std::runtime_error *v9; // r15
volatile signed __int32 *v10; // [rsp+0h] [rbp-48h] BYREF
volatile signed __int32 *v11; // [rsp+8h] [rbp-40h]
long long *v12; // [rsp+10h] [rbp-38h] BYREF
volatile signed __int32 *v13; // [rsp+18h] [rbp-30h]
long long v14; // [rsp+20h] [rbp-28h] BYREF
minja::Parser::parseMathPow((minja::Parser *)this);
if ( !*this )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected left side of 'string concat' expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( !(_BYTE)`guard variable for'minja::Parser::parseStringConcat(void)::concat_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseStringConcat(void)::concat_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseStringConcat(void)::concat_tok[abi:cxx11],
(long long)"~(?!\\})",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseStringConcat(void)::concat_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseStringConcat(void)::concat_tok[abi:cxx11]);
}
minja::Parser::consumeToken(
(long long)&v12,
(long long)a2,
(long long)&minja::Parser::parseStringConcat(void)::concat_tok[abi:cxx11],
1u);
v3 = v13;
if ( v12 != &v14 )
operator delete(v12, v14 + 1);
if ( v3 )
{
minja::Parser::parseLogicalAnd(&v10, a2);
if ( !v10 )
{
v9 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v9, "Expected right side of 'string concat' expression");
__cxa_throw(
v9,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v12 = (long long *)*a2;
v4 = (volatile signed __int32 *)a2[1];
v13 = v4;
if ( v4 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v4 + 2);
else
_InterlockedIncrement(v4 + 2);
}
v14 = a2[4] - a2[2];
v5 = (volatile signed __int32 *)operator new(0x58uLL);
*((_QWORD *)v5 + 1) = 0x100000001LL;
*(_QWORD *)v5 = &`vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<minja::BinaryOpExpr>,(__gnu_cxx::_Lock_policy)2>
+ 2;
minja::BinaryOpExpr::BinaryOpExpr(v5 + 4, &v12, this, &v10, 0LL);
*this = v5 + 4;
v6 = this[1];
this[1] = v5;
if ( v6 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v6);
if ( v13 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v13);
if ( v11 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v11);
}
return (minja::Parser *)this;
}
| parseStringConcat:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RSI
MOV RBX,RDI
CALL 0x0018c4a6
CMP qword ptr [RBX],0x0
JZ 0x0018c376
LEA RAX,[0x232160]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x0018c3ad
LAB_0018c261:
LEA RDX,[0x232140]
LEA RDI,[RSP + 0x10]
MOV RSI,R14
MOV ECX,0x1
CALL 0x00188460
LEA RAX,[RSP + 0x20]
MOV RDI,qword ptr [RAX + -0x10]
MOV R15,qword ptr [RAX + -0x8]
CMP RDI,RAX
JZ 0x0018c299
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x0011b930
LAB_0018c299:
TEST R15,R15
JZ 0x0018c369
LAB_0018c2a2:
MOV RDI,RSP
MOV RSI,R14
CALL 0x00189a2c
CMP qword ptr [RSP],0x0
JZ 0x0018c404
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x18],RAX
TEST RAX,RAX
JZ 0x0018c2e3
MOV RCX,qword ptr [0x00230f78]
CMP byte ptr [RCX],0x0
JZ 0x0018c2df
INC dword ptr [RAX + 0x8]
JMP 0x0018c2e3
LAB_0018c2df:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0018c2e3:
MOV RAX,qword ptr [R14 + 0x20]
SUB RAX,qword ptr [R14 + 0x10]
MOV qword ptr [RSP + 0x20],RAX
LAB_0018c2f0:
MOV EDI,0x58
CALL 0x0011b900
LAB_0018c2fa:
MOV R14,RAX
MOV RAX,0x100000001
MOV qword ptr [R14 + 0x8],RAX
LEA RAX,[0x22f978]
ADD RAX,0x10
MOV qword ptr [R14],RAX
MOV R15,R14
ADD R15,0x10
LEA RSI,[RSP + 0x10]
MOV RCX,RSP
MOV RDI,R15
MOV RDX,RBX
XOR R8D,R8D
CALL 0x0019a39e
MOV qword ptr [RBX],R15
MOV RDI,qword ptr [RBX + 0x8]
MOV qword ptr [RBX + 0x8],R14
TEST RDI,RDI
JZ 0x0018c34b
CALL 0x001267a6
LAB_0018c34b:
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x0018c35a
CALL 0x001267a6
LAB_0018c35a:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x0018c369
CALL 0x001267a6
LAB_0018c369:
MOV RAX,RBX
ADD RSP,0x30
POP RBX
POP R14
POP R15
RET
LAB_0018c376:
MOV EDI,0x10
CALL 0x0011b480
MOV R15,RAX
LAB_0018c383:
LEA RSI,[0x1f4b62]
MOV RDI,RAX
CALL 0x0011b350
LAB_0018c392:
MOV RSI,qword ptr [0x00230fe8]
MOV RDX,qword ptr [0x00230f50]
MOV RDI,R15
CALL 0x0011c040
LAB_0018c3ad:
LEA RDI,[0x232160]
CALL 0x0011c130
TEST EAX,EAX
JZ 0x0018c261
LAB_0018c3c1:
LEA RDI,[0x232140]
LEA RSI,[0x1f4b93]
MOV EDX,0x10
CALL 0x001675a8
LAB_0018c3d9:
LEA RDI,[0x1678ac]
LEA RSI,[0x232140]
LEA RDX,[0x231978]
CALL 0x0011b7f0
LEA RDI,[0x232160]
CALL 0x0011b600
JMP 0x0018c261
LAB_0018c404:
MOV EDI,0x10
CALL 0x0011b480
MOV R15,RAX
LAB_0018c411:
LEA RSI,[0x1f4b9b]
MOV RDI,RAX
CALL 0x0011b350
LAB_0018c420:
MOV RSI,qword ptr [0x00230fe8]
MOV RDX,qword ptr [0x00230f50]
MOV RDI,R15
CALL 0x0011c040
|
/* minja::Parser::parseStringConcat() */
void minja::Parser::parseStringConcat(void)
{
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *this;
int iVar1;
int8 *puVar2;
runtime_error *prVar3;
int8 *in_RSI;
long *in_RDI;
long local_48;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40;
long *local_38;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_30;
long local_28 [2];
parseMathPow();
if (*in_RDI == 0) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0018c383 to 0018c391 has its CatchHandler @ 0018c45b */
std::runtime_error::runtime_error(prVar3,"Expected left side of \'string concat\' expression");
/* try { // try from 0018c392 to 0018c3a7 has its CatchHandler @ 0018c459 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_00230fe8,PTR__runtime_error_00230f50);
}
if (parseStringConcat()::concat_tok_abi_cxx11_ == '\0') {
iVar1 = __cxa_guard_acquire(&parseStringConcat()::concat_tok_abi_cxx11_);
if (iVar1 != 0) {
/* try { // try from 0018c3c1 to 0018c3d8 has its CatchHandler @ 0018c436 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseStringConcat()::concat_tok_abi_cxx11_,"~(?!\\})",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseStringConcat()::concat_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseStringConcat()::concat_tok_abi_cxx11_);
}
}
/* try { // try from 0018c261 to 0018c279 has its CatchHandler @ 0018c48d */
consumeToken(&local_38);
if (local_38 != local_28) {
operator_delete(local_38,local_28[0] + 1);
}
if (local_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
/* try { // try from 0018c2a2 to 0018c2ac has its CatchHandler @ 0018c48b */
parseLogicalAnd();
if (local_48 == 0) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0018c411 to 0018c41f has its CatchHandler @ 0018c44c */
std::runtime_error::runtime_error
(prVar3,"Expected right side of \'string concat\' expression");
/* try { // try from 0018c420 to 0018c435 has its CatchHandler @ 0018c447 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_00230fe8,PTR__runtime_error_00230f50);
}
local_38 = (long *)*in_RSI;
local_30 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1];
if (local_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_00230f78 == '\0') {
LOCK();
*(int *)(local_30 + 8) = *(int *)(local_30 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_30 + 8) = *(int *)(local_30 + 8) + 1;
}
}
local_28[0] = in_RSI[4] - in_RSI[2];
/* try { // try from 0018c2f0 to 0018c2f9 has its CatchHandler @ 0018c468 */
puVar2 = (int8 *)operator_new(0x58);
puVar2[1] = 0x100000001;
*puVar2 = &PTR___Sp_counted_ptr_inplace_0022f988;
BinaryOpExpr::BinaryOpExpr((BinaryOpExpr *)(puVar2 + 2),&local_38);
*in_RDI = (long)(puVar2 + 2);
this = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RDI[1];
in_RDI[1] = (long)puVar2;
if (this != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(this);
}
if (local_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_30);
}
if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40);
}
}
return;
}
| |
29,867 | ma_zlib_ctx_init | eloqsql/libmariadb/plugins/compress/c_zlib.c | static ma_compress_ctx *ma_zlib_ctx_init(int compression_level)
{
ma_compress_ctx *ctx;
if (!(ctx = (ma_compress_ctx *)calloc(1, sizeof(ma_compress_ctx))))
return NULL;
ctx->compression_level= (compression_level == COMPRESSION_LEVEL_DEFAULT) ?
Z_DEFAULT_COMPRESSION : compression_level;
return ctx;
} | O0 | c | ma_zlib_ctx_init:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0xc(%rbp)
movl $0x1, %edi
movl $0x20, %esi
callq 0x122a0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x3e11e
movq $0x0, -0x8(%rbp)
jmp 0x3e149
cmpl $0x7fffffff, -0xc(%rbp) # imm = 0x7FFFFFFF
jne 0x3e131
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movl %eax, -0x1c(%rbp)
jmp 0x3e137
movl -0xc(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_zlib_ctx_init:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_C], edi
mov edi, 1
mov esi, 20h ; ' '
call _calloc
mov [rbp+var_18], rax
cmp rax, 0
jnz short loc_3E11E
mov [rbp+var_8], 0
jmp short loc_3E149
loc_3E11E:
cmp [rbp+var_C], 7FFFFFFFh
jnz short loc_3E131
mov eax, 0FFFFFFFFh
mov [rbp+var_1C], eax
jmp short loc_3E137
loc_3E131:
mov eax, [rbp+var_C]
mov [rbp+var_1C], eax
loc_3E137:
mov ecx, [rbp+var_1C]
mov rax, [rbp+var_18]
mov [rax+10h], ecx
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
loc_3E149:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
| long long ma_zlib_ctx_init(int a1)
{
int v2; // [rsp+4h] [rbp-1Ch]
long long v3; // [rsp+8h] [rbp-18h]
v3 = calloc(1LL, 32LL);
if ( !v3 )
return 0LL;
if ( a1 == 0x7FFFFFFF )
v2 = -1;
else
v2 = a1;
*(_DWORD *)(v3 + 16) = v2;
return v3;
}
| ma_zlib_ctx_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0xc],EDI
MOV EDI,0x1
MOV ESI,0x20
CALL 0x001122a0
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JNZ 0x0013e11e
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0013e149
LAB_0013e11e:
CMP dword ptr [RBP + -0xc],0x7fffffff
JNZ 0x0013e131
MOV EAX,0xffffffff
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x0013e137
LAB_0013e131:
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x1c],EAX
LAB_0013e137:
MOV ECX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
LAB_0013e149:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
void * ma_zlib_ctx_init(int param_1)
{
int local_24;
void *local_10;
local_10 = calloc(1,0x20);
if (local_10 == (void *)0x0) {
local_10 = (void *)0x0;
}
else {
local_24 = param_1;
if (param_1 == 0x7fffffff) {
local_24 = -1;
}
*(int *)((long)local_10 + 0x10) = local_24;
}
return local_10;
}
| |
29,868 | minja::Value::dump(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, int, int, bool) const | monkey531[P]llama/common/minja.hpp | void dump(std::ostringstream & out, int indent = -1, int level = 0, bool to_json = false) const {
auto print_indent = [&](int level) {
if (indent > 0) {
out << "\n";
for (int i = 0, n = level * indent; i < n; ++i) out << ' ';
}
};
auto print_sub_sep = [&]() {
out << ',';
if (indent < 0) out << ' ';
else print_indent(level + 1);
};
auto string_quote = to_json ? '"' : '\'';
if (is_null()) out << "null";
else if (array_) {
out << "[";
print_indent(level + 1);
for (size_t i = 0; i < array_->size(); ++i) {
if (i) print_sub_sep();
(*array_)[i].dump(out, indent, level + 1, to_json);
}
print_indent(level);
out << "]";
} else if (object_) {
out << "{";
print_indent(level + 1);
for (auto begin = object_->begin(), it = begin; it != object_->end(); ++it) {
if (it != begin) print_sub_sep();
if (it->first.is_string()) {
dump_string(it->first, out, string_quote);
} else {
out << string_quote << it->first.dump() << string_quote;
}
out << ": ";
it->second.dump(out, indent, level + 1, to_json);
}
print_indent(level);
out << "}";
} else if (callable_) {
throw std::runtime_error("Cannot dump callable to JSON");
} else if (is_boolean() && !to_json) {
out << (this->to_bool() ? "True" : "False");
} else if (is_string() && !to_json) {
dump_string(primitive_, out, string_quote);
} else {
out << primitive_.dump();
}
} | O2 | cpp | minja::Value::dump(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, int, int, bool) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %r8d, %r12d
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xc(%rsp), %rax
movl %edx, (%rax)
leaq 0x8(%rsp), %rdx
movl %ecx, (%rdx)
leaq 0x18(%rsp), %rcx
movq %rax, (%rcx)
movq %rsi, 0x8(%rcx)
movq %rsi, 0x48(%rsp)
movq %rax, 0x50(%rsp)
movq %rcx, 0x58(%rsp)
movq %rdx, 0x60(%rsp)
xorl %r15d, %r15d
testl %r8d, %r8d
sete %bpl
callq 0x64972
testb %al, %al
je 0x646aa
leaq 0x51012(%rip), %rsi # 0xb56b7
jmp 0x648f5
cmpq $0x0, 0x10(%rbx)
je 0x6474d
leaq 0x51dd4(%rip), %rsi # 0xb6490
movq %r14, %rdi
callq 0x238b0
movl 0x8(%rsp), %esi
incl %esi
leaq 0x18(%rsp), %rdi
callq 0x64992
xorl %r13d, %r13d
movl %r12d, %eax
pushq $0x50
popq %r12
movzbl %al, %ebp
xorl %r15d, %r15d
movq 0x10(%rbx), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rax
subq %rdi, %rax
cqto
idivq %r12
cmpq %rax, %r15
jae 0x64733
testq %r15, %r15
je 0x64712
leaq 0x48(%rsp), %rdi
callq 0x649de
movq 0x10(%rbx), %rax
movq (%rax), %rdi
addq %r13, %rdi
movl 0xc(%rsp), %edx
movl 0x8(%rsp), %ecx
incl %ecx
movq %r14, %rsi
movl %ebp, %r8d
callq 0x64646
incq %r15
addq $0x50, %r13
jmp 0x646e4
movl 0x8(%rsp), %esi
leaq 0x18(%rsp), %rdi
callq 0x64992
leaq 0x4f67b(%rip), %rsi # 0xb3dc3
jmp 0x648f5
movb %bpl, %r15b
leal (%r15,%r15,4), %ebp
addl $0x22, %ebp
cmpq $0x0, 0x20(%rbx)
je 0x64880
leaq 0x50614(%rip), %rsi # 0xb4d7d
movq %r14, %rdi
callq 0x238b0
movl 0x8(%rsp), %esi
incl %esi
leaq 0x18(%rsp), %rdi
callq 0x64992
movq 0x20(%rbx), %rax
movq (%rax), %r15
xorl %r13d, %r13d
movsbl %bpl, %ebp
movl %r12d, %ecx
leaq 0x51d06(%rip), %r12 # 0xb649f
movzbl %cl, %ecx
movl %ecx, 0x14(%rsp)
movl %ebp, 0x10(%rsp)
cmpq 0x8(%rax), %r15
je 0x64869
testq %r13, %r13
je 0x647bd
leaq 0x48(%rsp), %rdi
callq 0x649de
cmpb $0x3, (%r15)
jne 0x647d2
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x64a14
jmp 0x64832
movq %r14, %rdi
movq %r13, %r14
movq %rbx, %r13
movq %rdi, %rbx
movl %ebp, %esi
callq 0x23a30
movq %rax, %rbp
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
pushq $-0x1
popq %rdx
pushq $0x20
popq %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5e56c
movq %rbp, %rdi
movl 0x10(%rsp), %ebp
leaq 0x28(%rsp), %rsi
callq 0x237e0
movq %rax, %rdi
movl %ebp, %esi
callq 0x23a30
leaq 0x28(%rsp), %rdi
callq 0x241c8
movq %rbx, %rax
movq %r13, %rbx
movq %r14, %r13
movq %rax, %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x238b0
leaq 0x10(%r15), %rdi
movl 0xc(%rsp), %edx
movl 0x8(%rsp), %ecx
incl %ecx
movq %r14, %rsi
movl 0x14(%rsp), %r8d
callq 0x64646
addq $0x60, %r15
movq 0x20(%rbx), %rax
addq $-0x60, %r13
jmp 0x647a4
movl 0x8(%rsp), %esi
leaq 0x18(%rsp), %rdi
callq 0x64992
leaq 0x54ce1(%rip), %rsi # 0xb955f
jmp 0x648f5
cmpq $0x0, 0x30(%rbx)
jne 0x6491d
movb 0x40(%rbx), %al
cmpb $0x4, %al
setne %cl
orb %r12b, %cl
je 0x648d9
addq $0x40, %rbx
cmpb $0x3, %al
setne %al
orb %r12b, %al
je 0x6490c
leaq 0x28(%rsp), %r15
pushq $-0x1
popq %rdx
pushq $0x20
popq %rcx
movq %r15, %rdi
movq %rbx, %rsi
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x5e56c
movq %r14, %rdi
movq %r15, %rsi
callq 0x237e0
leaq 0x28(%rsp), %rdi
callq 0x241c8
jmp 0x648fd
movq %rbx, %rdi
callq 0x640e0
leaq 0x504b4(%rip), %rcx # 0xb4d9c
leaq 0x504b2(%rip), %rsi # 0xb4da1
testb %al, %al
cmovneq %rcx, %rsi
movq %r14, %rdi
callq 0x238b0
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movsbl %bpl, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x64a14
jmp 0x648fd
pushq $0x10
popq %rdi
callq 0x23470
movq %rax, %r14
leaq 0x50450(%rip), %rsi # 0xb4d7f
movq %rax, %rdi
callq 0x23330
movq 0x9a6aa(%rip), %rsi # 0xfefe8
movq 0x9a603(%rip), %rdx # 0xfef48
movq %r14, %rdi
callq 0x23f00
jmp 0x6495c
movq %rax, %rbx
movq %r14, %rdi
callq 0x236a0
jmp 0x64969
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x241c8
movq %rbx, %rdi
callq 0x23f80
nop
| _ZNK5minja5Value4dumpERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEEiib:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov r12d, r8d
mov r14, rsi
mov rbx, rdi
lea rax, [rsp+98h+var_8C]
mov [rax], edx
lea rdx, [rsp+98h+var_90]
mov [rdx], ecx
lea rcx, [rsp+98h+var_80]
mov [rcx], rax
mov [rcx+8], rsi
mov [rsp+98h+var_50], rsi
mov [rsp+98h+var_48], rax
mov [rsp+98h+var_40], rcx
mov [rsp+98h+var_38], rdx
xor r15d, r15d
test r8d, r8d
setz bpl
call _ZNK5minja5Value7is_nullEv; minja::Value::is_null(void)
test al, al
jz short loc_646AA
lea rsi, aOnNull_0+5; "null"
jmp loc_648F5
loc_646AA:
cmp qword ptr [rbx+10h], 0
jz loc_6474D
lea rsi, aBytes+9; "["
mov rdi, r14
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov esi, [rsp+98h+var_90]
inc esi
lea rdi, [rsp+98h+var_80]
call _ZZNK5minja5Value4dumpERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEEiibENKUliE_clEi; minja::Value::dump(std::ostringstream &,int,int,bool)::{lambda(int)#1}::operator()(int)
xor r13d, r13d
mov eax, r12d
push 50h ; 'P'
pop r12
movzx ebp, al
xor r15d, r15d
loc_646E4:
mov rax, [rbx+10h]
mov rdi, [rax]
mov rax, [rax+8]
sub rax, rdi
cqo
idiv r12
cmp r15, rax
jnb short loc_64733
test r15, r15
jz short loc_64712
lea rdi, [rsp+98h+var_50]
call _ZZNK5minja5Value4dumpERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEEiibENKUlvE_clEv; minja::Value::dump(std::ostringstream &,int,int,bool)::{lambda(void)#1}::operator()(void)
mov rax, [rbx+10h]
mov rdi, [rax]
loc_64712:
add rdi, r13; this
mov edx, [rsp+98h+var_8C]
mov ecx, [rsp+98h+var_90]
inc ecx
mov rsi, r14
mov r8d, ebp
call _ZNK5minja5Value4dumpERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEEiib; minja::Value::dump(std::ostringstream &,int,int,bool)
inc r15
add r13, 50h ; 'P'
jmp short loc_646E4
loc_64733:
mov esi, [rsp+98h+var_90]
lea rdi, [rsp+98h+var_80]
call _ZZNK5minja5Value4dumpERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEEiibENKUliE_clEi; minja::Value::dump(std::ostringstream &,int,int,bool)::{lambda(int)#1}::operator()(int)
lea rsi, asc_B3DC2+1; "]"
jmp loc_648F5
loc_6474D:
mov r15b, bpl
lea ebp, [r15+r15*4]
add ebp, 22h ; '"'
cmp qword ptr [rbx+20h], 0
jz loc_64880
lea rsi, asc_B4D7D; "{"
mov rdi, r14
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov esi, [rsp+98h+var_90]
inc esi
lea rdi, [rsp+98h+var_80]
call _ZZNK5minja5Value4dumpERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEEiibENKUliE_clEi; minja::Value::dump(std::ostringstream &,int,int,bool)::{lambda(int)#1}::operator()(int)
mov rax, [rbx+20h]
mov r15, [rax]
xor r13d, r13d
movsx ebp, bpl
mov ecx, r12d
lea r12, aSubtype+9; ": "
movzx ecx, cl
mov [rsp+98h+var_84], ecx
mov [rsp+98h+var_88], ebp
loc_647A4:
cmp r15, [rax+8]
jz loc_64869
test r13, r13
jz short loc_647BD
lea rdi, [rsp+98h+var_50]
call _ZZNK5minja5Value4dumpERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEEiibENKUlvE_clEv; minja::Value::dump(std::ostringstream &,int,int,bool)::{lambda(void)#1}::operator()(void)
loc_647BD:
cmp byte ptr [r15], 3
jnz short loc_647D2
mov rdi, r15
mov rsi, r14
mov edx, ebp
call _ZN5minja5Value11dump_stringERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEERNS6_19basic_ostringstreamIcS9_SA_EEc; minja::Value::dump_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> const&,std::ostringstream &,char)
jmp short loc_64832
loc_647D2:
mov rdi, r14
mov r14, r13
mov r13, rbx
mov rbx, rdi
mov esi, ebp
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char)
mov rbp, rax
lea rdi, [rsp+98h+var_70]
mov rsi, r15
push 0FFFFFFFFFFFFFFFFh
pop rdx
push 20h ; ' '
pop rcx
xor r8d, r8d
xor r9d, r9d
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dumpEicbNS0_6detail15error_handler_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::dump(int,char,bool,nlohmann::json_abi_v3_11_3::detail::error_handler_t)
mov rdi, rbp
mov ebp, [rsp+98h+var_88]
lea rsi, [rsp+98h+var_70]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov rdi, rax
mov esi, ebp
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char)
lea rdi, [rsp+98h+var_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, rbx
mov rbx, r13
mov r13, r14
mov r14, rax
loc_64832:
mov rdi, r14
mov rsi, r12
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
lea rdi, [r15+10h]
mov edx, [rsp+98h+var_8C]
mov ecx, [rsp+98h+var_90]
inc ecx
mov rsi, r14
mov r8d, [rsp+98h+var_84]
call _ZNK5minja5Value4dumpERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEEiib; minja::Value::dump(std::ostringstream &,int,int,bool)
add r15, 60h ; '`'
mov rax, [rbx+20h]
add r13, 0FFFFFFFFFFFFFFA0h
jmp loc_647A4
loc_64869:
mov esi, [rsp+98h+var_90]
lea rdi, [rsp+98h+var_80]
call _ZZNK5minja5Value4dumpERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEEiibENKUliE_clEi; minja::Value::dump(std::ostringstream &,int,int,bool)::{lambda(int)#1}::operator()(int)
lea rsi, aNT020+17h; "}"
jmp short loc_648F5
loc_64880:
cmp qword ptr [rbx+30h], 0
jnz loc_6491D
mov al, [rbx+40h]
cmp al, 4
setnz cl
or cl, r12b
jz short loc_648D9
add rbx, 40h ; '@'
cmp al, 3
setnz al
or al, r12b
jz short loc_6490C
lea r15, [rsp+98h+var_70]
push 0FFFFFFFFFFFFFFFFh
pop rdx
push 20h ; ' '
pop rcx
mov rdi, r15
mov rsi, rbx
xor r8d, r8d
xor r9d, r9d
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dumpEicbNS0_6detail15error_handler_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::dump(int,char,bool,nlohmann::json_abi_v3_11_3::detail::error_handler_t)
mov rdi, r14
mov rsi, r15
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
lea rdi, [rsp+98h+var_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_648FD
loc_648D9:
mov rdi, rbx; this
call _ZNK5minja5Value7to_boolEv; minja::Value::to_bool(void)
lea rcx, aTrue_0; "True"
lea rsi, aFalse; "False"
test al, al
cmovnz rsi, rcx
loc_648F5:
mov rdi, r14
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
loc_648FD:
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_6490C:
movsx edx, bpl
mov rdi, rbx
mov rsi, r14
call _ZN5minja5Value11dump_stringERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEERNS6_19basic_ostringstreamIcS9_SA_EEc; minja::Value::dump_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> const&,std::ostringstream &,char)
jmp short loc_648FD
loc_6491D:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aCannotDumpCall; "Cannot dump callable to JSON"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short loc_6495C
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_64969
loc_6495C:
mov rbx, rax
lea rdi, [rsp+98h+var_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_64969:
mov rdi, rbx
call __Unwind_Resume
| void minja::Value::dump(long long a1, long long a2, unsigned int a3, unsigned int a4, int a5)
{
unsigned __int8 v5; // r12
long long v6; // r14
long long v7; // rbx
bool v8; // bp
char *v9; // rsi
long long v10; // r13
unsigned long long i; // r15
long long *v12; // rax
long long v13; // rdi
bool v14; // r15
unsigned int v15; // ebp
_BYTE **v16; // rax
_BYTE *v17; // r15
long long v18; // r13
long long v19; // rdi
long long v20; // r14
long long v21; // r13
long long v22; // rbx
long long v23; // rbp
long long v24; // rdi
long long v25; // rax
long long v26; // rax
char v27; // al
long long v28; // rbx
std::runtime_error *exception; // r14
unsigned int v30; // [rsp+8h] [rbp-90h] BYREF
unsigned int v31; // [rsp+Ch] [rbp-8Ch] BYREF
unsigned int v32; // [rsp+10h] [rbp-88h]
unsigned int v33; // [rsp+14h] [rbp-84h]
_QWORD v34[2]; // [rsp+18h] [rbp-80h] BYREF
_BYTE v35[32]; // [rsp+28h] [rbp-70h] BYREF
_QWORD v36[10]; // [rsp+48h] [rbp-50h] BYREF
v5 = a5;
v6 = a2;
v7 = a1;
v31 = a3;
v30 = a4;
v34[0] = &v31;
v34[1] = a2;
v36[0] = a2;
v36[1] = &v31;
v36[2] = v34;
v36[3] = &v30;
v8 = a5 == 0;
if ( (unsigned __int8)minja::Value::is_null((minja::Value *)a1) )
{
v9 = "null";
LABEL_26:
std::operator<<<std::char_traits<char>>(v6, v9);
return;
}
if ( *(_QWORD *)(a1 + 16) )
{
std::operator<<<std::char_traits<char>>(a2, "[");
minja::Value::dump(std::ostringstream &,int,int,bool)const::{lambda(int)#1}::operator()(v34, v30 + 1);
v10 = 0LL;
for ( i = 0LL; ; ++i )
{
v12 = *(long long **)(v7 + 16);
v13 = *v12;
if ( i >= (v12[1] - *v12) / 80 )
break;
if ( i )
{
minja::Value::dump(std::ostringstream &,int,int,bool)const::{lambda(void)#1}::operator()(v36);
v13 = **(_QWORD **)(v7 + 16);
}
minja::Value::dump(v10 + v13, a2, v31, v30 + 1, v5);
v10 += 80LL;
}
minja::Value::dump(std::ostringstream &,int,int,bool)const::{lambda(int)#1}::operator()(v34, v30);
v9 = "]";
goto LABEL_26;
}
v14 = v8;
LOBYTE(v15) = 5 * v8 + 34;
if ( *(_QWORD *)(a1 + 32) )
{
std::operator<<<std::char_traits<char>>(a2, "{");
minja::Value::dump(std::ostringstream &,int,int,bool)const::{lambda(int)#1}::operator()(v34, v30 + 1);
v16 = *(_BYTE ***)(a1 + 32);
v17 = *v16;
v18 = 0LL;
v15 = (char)v15;
v33 = v5;
v32 = (char)v15;
while ( v17 != v16[1] )
{
if ( v18 )
minja::Value::dump(std::ostringstream &,int,int,bool)const::{lambda(void)#1}::operator()(v36);
if ( *v17 == 3 )
{
minja::Value::dump_string(v17, v6, v15);
}
else
{
v19 = v6;
v20 = v18;
v21 = v7;
v22 = v19;
v23 = std::operator<<<std::char_traits<char>>(v19, v15);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::dump(
(long long)v35,
(long long)v17,
-1,
32,
0,
0);
v24 = v23;
v15 = v32;
v25 = std::operator<<<char>(v24, v35);
std::operator<<<std::char_traits<char>>(v25, v15);
std::string::~string(v35);
v26 = v22;
v7 = v21;
v18 = v20;
v6 = v26;
}
std::operator<<<std::char_traits<char>>(v6, ": ");
minja::Value::dump(v17 + 16, v6, v31, v30 + 1, v33);
v17 += 96;
v16 = *(_BYTE ***)(v7 + 32);
v18 -= 96LL;
}
minja::Value::dump(std::ostringstream &,int,int,bool)const::{lambda(int)#1}::operator()(v34, v30);
v9 = "}";
goto LABEL_26;
}
if ( *(_QWORD *)(a1 + 48) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Cannot dump callable to JSON");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v27 = *(_BYTE *)(a1 + 64);
if ( !(v5 | (v27 != 4)) )
{
v9 = "False";
if ( (unsigned __int8)minja::Value::to_bool((minja::Value *)a1) )
v9 = "True";
goto LABEL_26;
}
v28 = a1 + 64;
if ( v5 | (v27 != 3) )
{
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::dump(
(long long)v35,
v28,
-1,
32,
0,
0);
std::operator<<<char>(a2, v35);
std::string::~string(v35);
}
else
{
minja::Value::dump_string(v28, a2, (unsigned int)(char)(5 * v14 + 34));
}
}
| dump:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R12D,R8D
MOV R14,RSI
MOV RBX,RDI
LEA RAX,[RSP + 0xc]
MOV dword ptr [RAX],EDX
LEA RDX,[RSP + 0x8]
MOV dword ptr [RDX],ECX
LEA RCX,[RSP + 0x18]
MOV qword ptr [RCX],RAX
MOV qword ptr [RCX + 0x8],RSI
MOV qword ptr [RSP + 0x48],RSI
MOV qword ptr [RSP + 0x50],RAX
MOV qword ptr [RSP + 0x58],RCX
MOV qword ptr [RSP + 0x60],RDX
XOR R15D,R15D
TEST R8D,R8D
SETZ BPL
CALL 0x00164972
TEST AL,AL
JZ 0x001646aa
LEA RSI,[0x1b56b7]
JMP 0x001648f5
LAB_001646aa:
CMP qword ptr [RBX + 0x10],0x0
JZ 0x0016474d
LEA RSI,[0x1b6490]
MOV RDI,R14
CALL 0x001238b0
MOV ESI,dword ptr [RSP + 0x8]
INC ESI
LEA RDI,[RSP + 0x18]
CALL 0x00164992
XOR R13D,R13D
MOV EAX,R12D
PUSH 0x50
POP R12
MOVZX EBP,AL
XOR R15D,R15D
LAB_001646e4:
MOV RAX,qword ptr [RBX + 0x10]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x8]
SUB RAX,RDI
CQO
IDIV R12
CMP R15,RAX
JNC 0x00164733
TEST R15,R15
JZ 0x00164712
LEA RDI,[RSP + 0x48]
CALL 0x001649de
MOV RAX,qword ptr [RBX + 0x10]
MOV RDI,qword ptr [RAX]
LAB_00164712:
ADD RDI,R13
MOV EDX,dword ptr [RSP + 0xc]
MOV ECX,dword ptr [RSP + 0x8]
INC ECX
MOV RSI,R14
MOV R8D,EBP
CALL 0x00164646
INC R15
ADD R13,0x50
JMP 0x001646e4
LAB_00164733:
MOV ESI,dword ptr [RSP + 0x8]
LEA RDI,[RSP + 0x18]
CALL 0x00164992
LEA RSI,[0x1b3dc3]
JMP 0x001648f5
LAB_0016474d:
MOV R15B,BPL
LEA EBP,[R15 + R15*0x4]
ADD EBP,0x22
CMP qword ptr [RBX + 0x20],0x0
JZ 0x00164880
LEA RSI,[0x1b4d7d]
MOV RDI,R14
CALL 0x001238b0
MOV ESI,dword ptr [RSP + 0x8]
INC ESI
LEA RDI,[RSP + 0x18]
CALL 0x00164992
MOV RAX,qword ptr [RBX + 0x20]
MOV R15,qword ptr [RAX]
XOR R13D,R13D
MOVSX EBP,BPL
MOV ECX,R12D
LEA R12,[0x1b649f]
MOVZX ECX,CL
MOV dword ptr [RSP + 0x14],ECX
MOV dword ptr [RSP + 0x10],EBP
LAB_001647a4:
CMP R15,qword ptr [RAX + 0x8]
JZ 0x00164869
TEST R13,R13
JZ 0x001647bd
LEA RDI,[RSP + 0x48]
CALL 0x001649de
LAB_001647bd:
CMP byte ptr [R15],0x3
JNZ 0x001647d2
MOV RDI,R15
MOV RSI,R14
MOV EDX,EBP
CALL 0x00164a14
JMP 0x00164832
LAB_001647d2:
MOV RDI,R14
MOV R14,R13
MOV R13,RBX
MOV RBX,RDI
MOV ESI,EBP
CALL 0x00123a30
MOV RBP,RAX
LEA RDI,[RSP + 0x28]
MOV RSI,R15
PUSH -0x1
POP RDX
PUSH 0x20
POP RCX
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0015e56c
LAB_00164801:
MOV RDI,RBP
MOV EBP,dword ptr [RSP + 0x10]
LEA RSI,[RSP + 0x28]
CALL 0x001237e0
MOV RDI,RAX
MOV ESI,EBP
CALL 0x00123a30
LAB_0016481c:
LEA RDI,[RSP + 0x28]
CALL 0x001241c8
MOV RAX,RBX
MOV RBX,R13
MOV R13,R14
MOV R14,RAX
LAB_00164832:
MOV RDI,R14
MOV RSI,R12
CALL 0x001238b0
LEA RDI,[R15 + 0x10]
MOV EDX,dword ptr [RSP + 0xc]
MOV ECX,dword ptr [RSP + 0x8]
INC ECX
MOV RSI,R14
MOV R8D,dword ptr [RSP + 0x14]
CALL 0x00164646
ADD R15,0x60
MOV RAX,qword ptr [RBX + 0x20]
ADD R13,-0x60
JMP 0x001647a4
LAB_00164869:
MOV ESI,dword ptr [RSP + 0x8]
LEA RDI,[RSP + 0x18]
CALL 0x00164992
LEA RSI,[0x1b955f]
JMP 0x001648f5
LAB_00164880:
CMP qword ptr [RBX + 0x30],0x0
JNZ 0x0016491d
MOV AL,byte ptr [RBX + 0x40]
CMP AL,0x4
SETNZ CL
OR CL,R12B
JZ 0x001648d9
ADD RBX,0x40
CMP AL,0x3
SETNZ AL
OR AL,R12B
JZ 0x0016490c
LEA R15,[RSP + 0x28]
PUSH -0x1
POP RDX
PUSH 0x20
POP RCX
MOV RDI,R15
MOV RSI,RBX
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0015e56c
LAB_001648c2:
MOV RDI,R14
MOV RSI,R15
CALL 0x001237e0
LAB_001648cd:
LEA RDI,[RSP + 0x28]
CALL 0x001241c8
JMP 0x001648fd
LAB_001648d9:
MOV RDI,RBX
CALL 0x001640e0
LEA RCX,[0x1b4d9c]
LEA RSI,[0x1b4da1]
TEST AL,AL
CMOVNZ RSI,RCX
LAB_001648f5:
MOV RDI,R14
CALL 0x001238b0
LAB_001648fd:
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0016490c:
MOVSX EDX,BPL
MOV RDI,RBX
MOV RSI,R14
CALL 0x00164a14
JMP 0x001648fd
LAB_0016491d:
PUSH 0x10
POP RDI
CALL 0x00123470
MOV R14,RAX
LAB_00164928:
LEA RSI,[0x1b4d7f]
MOV RDI,RAX
CALL 0x00123330
LAB_00164937:
MOV RSI,qword ptr [0x001fefe8]
MOV RDX,qword ptr [0x001fef48]
MOV RDI,R14
CALL 0x00123f00
|
/* minja::Value::dump(std::__cxx11::ostringstream&, int, int, bool) const */
void __thiscall
minja::Value::dump(Value *this,ostringstream *param_1,int param_2,int param_3,bool param_4)
{
char cVar1;
int8 *puVar2;
ostream *poVar3;
runtime_error *this_00;
int iVar4;
char *pcVar5;
long lVar6;
int7 in_register_00000081;
long lVar7;
ulong uVar8;
int local_90;
int local_8c;
int local_88;
uint local_84;
int *local_80;
ostringstream *local_78;
string local_70 [32];
ostringstream *local_50;
int *local_48;
int **local_40;
int *local_38;
local_80 = &local_8c;
local_38 = &local_90;
local_40 = &local_80;
local_90 = param_3;
local_8c = param_2;
local_78 = param_1;
local_50 = param_1;
local_48 = local_80;
cVar1 = is_null(this);
if (cVar1 == '\0') {
if (*(long *)(this + 0x10) == 0) {
cVar1 = ((int)CONCAT71(in_register_00000081,param_4) == 0) * '\x05' + '\"';
if (*(long *)(this + 0x20) == 0) {
if (*(long *)(this + 0x30) != 0) {
this_00 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00164928 to 00164936 has its CatchHandler @ 0016494f */
std::runtime_error::runtime_error(this_00,"Cannot dump callable to JSON");
/* WARNING: Subroutine does not return */
__cxa_throw(this_00,PTR_typeinfo_001fefe8,PTR__runtime_error_001fef48);
}
if (this[0x40] != (Value)0x4 || param_4) {
if (this[0x40] != (Value)0x3 || param_4) {
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::dump(local_70,this + 0x40,0xffffffffffffffff,0x20,0,0);
/* try { // try from 001648c2 to 001648cc has its CatchHandler @ 0016494d */
std::operator<<((ostream *)param_1,local_70);
std::__cxx11::string::~string(local_70);
return;
}
dump_string(this + 0x40,param_1,cVar1);
return;
}
cVar1 = to_bool(this);
pcVar5 = "False";
if (cVar1 != '\0') {
pcVar5 = "True";
}
}
else {
std::operator<<((ostream *)param_1,"{");
const::{lambda(int)#1}::operator()((_lambda_int__1_ *)&local_80,local_90 + 1);
puVar2 = *(int8 **)(this + 0x20);
lVar7 = 0;
iVar4 = (int)cVar1;
local_84 = (uint)param_4;
local_88 = iVar4;
for (pcVar5 = (char *)*puVar2; pcVar5 != (char *)puVar2[1]; pcVar5 = pcVar5 + 0x60) {
if (lVar7 != 0) {
const::{lambda()#1}::operator()((_lambda___1_ *)&local_50);
}
if (*pcVar5 == '\x03') {
dump_string(pcVar5,param_1,(char)iVar4);
}
else {
poVar3 = std::operator<<((ostream *)param_1,(char)iVar4);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::dump(local_70,pcVar5,0xffffffffffffffff,0x20,0,0);
iVar4 = local_88;
/* try { // try from 00164801 to 0016481b has its CatchHandler @ 0016495c */
poVar3 = std::operator<<(poVar3,local_70);
std::operator<<(poVar3,(char)iVar4);
std::__cxx11::string::~string(local_70);
}
std::operator<<((ostream *)param_1,": ");
dump((Value *)(pcVar5 + 0x10),param_1,local_8c,local_90 + 1,SUB41(local_84,0));
puVar2 = *(int8 **)(this + 0x20);
lVar7 = lVar7 + -0x60;
}
const::{lambda(int)#1}::operator()((_lambda_int__1_ *)&local_80,local_90);
pcVar5 = "}";
}
}
else {
std::operator<<((ostream *)param_1,"[");
const::{lambda(int)#1}::operator()((_lambda_int__1_ *)&local_80,local_90 + 1);
lVar7 = 0;
for (uVar8 = 0; lVar6 = **(long **)(this + 0x10),
uVar8 < (ulong)(((*(long **)(this + 0x10))[1] - lVar6) / 0x50); uVar8 = uVar8 + 1) {
if (uVar8 != 0) {
const::{lambda()#1}::operator()((_lambda___1_ *)&local_50);
lVar6 = **(long **)(this + 0x10);
}
dump((Value *)(lVar6 + lVar7),param_1,local_8c,local_90 + 1,param_4);
lVar7 = lVar7 + 0x50;
}
const::{lambda(int)#1}::operator()((_lambda_int__1_ *)&local_80,local_90);
pcVar5 = "]";
}
}
else {
pcVar5 = "null";
}
std::operator<<((ostream *)param_1,pcVar5);
return;
}
| |
29,869 | ma_write_init_default | eloqsql/storage/maria/ma_write.c | MARIA_RECORD_POS _ma_write_init_default(MARIA_HA *info,
const uchar *record
__attribute__((unused)))
{
return ((info->s->state.dellink != HA_OFFSET_ERROR &&
!info->append_insert_at_end) ?
info->s->state.dellink :
info->state->data_file_length);
} | O0 | c | ma_write_init_default:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
cmpq $-0x1, 0xc8(%rax)
je 0x810ae
movq -0x8(%rbp), %rax
cmpb $0x0, 0x681(%rax)
jne 0x810ae
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0xc8(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x810be
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ma_write_init_default:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov rax, [rax]
cmp qword ptr [rax+0C8h], 0FFFFFFFFFFFFFFFFh
jz short loc_810AE
mov rax, [rbp+var_8]
cmp byte ptr [rax+681h], 0
jnz short loc_810AE
mov rax, [rbp+var_8]
mov rax, [rax]
mov rax, [rax+0C8h]
mov [rbp+var_18], rax
jmp short loc_810BE
loc_810AE:
mov rax, [rbp+var_8]
mov rax, [rax+20h]
mov rax, [rax+28h]
mov [rbp+var_18], rax
loc_810BE:
mov rax, [rbp+var_18]
pop rbp
retn
| long long ma_write_init_default(long long a1)
{
if ( *(_QWORD *)(*(_QWORD *)a1 + 200LL) == -1LL || *(_BYTE *)(a1 + 1665) )
return *(_QWORD *)(*(_QWORD *)(a1 + 32) + 40LL);
else
return *(_QWORD *)(*(_QWORD *)a1 + 200LL);
}
| _ma_write_init_default:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
CMP qword ptr [RAX + 0xc8],-0x1
JZ 0x001810ae
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX + 0x681],0x0
JNZ 0x001810ae
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0xc8]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001810be
LAB_001810ae:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x18],RAX
LAB_001810be:
MOV RAX,qword ptr [RBP + -0x18]
POP RBP
RET
|
int8 _ma_write_init_default(long *param_1)
{
int8 local_20;
if ((*(long *)(*param_1 + 200) == -1) || (*(char *)((long)param_1 + 0x681) != '\0')) {
local_20 = *(int8 *)(param_1[4] + 0x28);
}
else {
local_20 = *(int8 *)(*param_1 + 200);
}
return local_20;
}
| |
29,870 | rtree_estimate | eloqsql/storage/myisam/rt_index.c | ha_rows rtree_estimate(MI_INFO *info, uint keynr, uchar *key,
uint key_length, uint flag)
{
MI_KEYDEF *keyinfo = info->s->keyinfo + keynr;
my_off_t root;
uint i = 0;
uchar *k;
uchar *last;
uint nod_flag;
uchar *page_buf;
uint k_len;
double area = 0;
ha_rows res = 0;
if (flag & MBR_DISJOINT)
return HA_POS_ERROR;
if ((root = info->s->state.key_root[keynr]) == HA_OFFSET_ERROR)
return HA_POS_ERROR;
if (!(page_buf = (uchar*)my_alloca((uint)keyinfo->block_length)))
return HA_POS_ERROR;
if (!_mi_fetch_keypage(info, keyinfo, root, DFLT_INIT_HITS, page_buf, 0))
goto err1;
nod_flag = mi_test_if_nod(page_buf);
k_len = keyinfo->keylength - info->s->base.rec_reflength;
k = rt_PAGE_FIRST_KEY(page_buf, nod_flag);
last = rt_PAGE_END(page_buf);
for (; k < last; k = rt_PAGE_NEXT_KEY(k, k_len, nod_flag), ++i)
{
if (nod_flag)
{
double k_area = rtree_rect_volume(keyinfo->seg, k, key_length);
/* The following should be safe, even if we compare doubles */
if (k_area == 0)
{
if (flag & (MBR_CONTAIN | MBR_INTERSECT))
{
area += 1;
}
else if (flag & (MBR_WITHIN | MBR_EQUAL))
{
if (!rtree_key_cmp(keyinfo->seg, key, k, key_length, MBR_WITHIN))
area += 1;
}
else
goto err1;
}
else
{
if (flag & (MBR_CONTAIN | MBR_INTERSECT))
{
area += rtree_overlapping_area(keyinfo->seg, key, k, key_length) /
k_area;
}
else if (flag & (MBR_WITHIN | MBR_EQUAL))
{
if (!rtree_key_cmp(keyinfo->seg, key, k, key_length, MBR_WITHIN))
area += rtree_rect_volume(keyinfo->seg, key, key_length) /
k_area;
}
else
goto err1;
}
}
else
{
if (!rtree_key_cmp(keyinfo->seg, key, k, key_length, flag))
++res;
}
}
if (nod_flag)
{
if (i)
res = (ha_rows) (area / i * info->state->records);
else
res = HA_POS_ERROR;
}
my_afree((uchar*)page_buf);
return res;
err1:
my_afree((uchar*)page_buf);
return HA_POS_ERROR;
} | O3 | c | rtree_estimate:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, -0x58(%rbp)
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
btl $0xc, %r8d
jb 0x8b649
movl %ecx, %r15d
movq %rdi, %rbx
movq (%rdi), %rax
movl %esi, %ecx
movq 0x98(%rax), %rdx
movq (%rdx,%rcx,8), %rdx
cmpq $-0x1, %rdx
je 0x8b649
movl %r8d, %r14d
imulq $0x70, %rcx, %r13
addq 0x218(%rax), %r13
movzwl 0xe(%r13), %eax
movq %rsp, %r12
addl $0xf, %eax
andl $-0x10, %eax
subq %rax, %r12
movq %r12, %rsp
movq %rbx, %rdi
movq %r13, %rsi
movl $0x3, %ecx
movq %r12, %r8
xorl %r9d, %r9d
callq 0x84424
testq %rax, %rax
je 0x8b649
movq %r13, -0x50(%rbp)
movl %r14d, -0x44(%rbp)
movl %r15d, -0x34(%rbp)
movzbl (%r12), %r14d
testb %r14b, %r14b
js 0x8b471
movzbl 0x1(%r12), %eax
shll $0x8, %r14d
orq %rax, %r14
xorl %r13d, %r13d
cmpq $0x3, %r14
movq -0x58(%rbp), %r15
jb 0x8b6e3
movq %rbx, -0x68(%rbp)
leaq 0x2(%r12), %rbx
addq %r12, %r14
movl $0x0, -0x60(%rbp)
jmp 0x8b4ac
movq %rbx, -0x68(%rbp)
movq (%rbx), %rax
movl 0x17c(%rax), %r13d
leaq (%r12,%r13), %rbx
addq $0x2, %rbx
movzbl 0x1(%r12), %eax
andl $0x7f, %r14d
shll $0x8, %r14d
orq %rax, %r14
addq %r12, %r14
cmpq %r14, %rbx
movq -0x58(%rbp), %r15
jae 0x8b6ea
movl %r13d, -0x60(%rbp)
movq -0x50(%rbp), %rax
movzwl 0x12(%rax), %ecx
movq -0x68(%rbp), %rax
movq (%rax), %rax
subl 0x178(%rax), %ecx
movq %rcx, -0x78(%rbp)
xorl %eax, %eax
xorpd %xmm0, %xmm0
movsd %xmm0, -0x40(%rbp)
xorl %edx, %edx
movl %edx, -0x5c(%rbp)
movq %rax, -0x80(%rbp)
xorl %r12d, %r12d
movq -0x50(%rbp), %rax
movq 0x28(%rax), %rdi
cmpl $0x0, -0x60(%rbp)
je 0x8b602
movq %rbx, %rsi
movl -0x34(%rbp), %edx
callq 0x8c620
ucomisd 0x55d17(%rip), %xmm0 # 0xe1218
jne 0x8b526
jp 0x8b526
movl -0x44(%rbp), %eax
testl $0x600, %eax # imm = 0x600
je 0x8b563
movsd -0x40(%rbp), %xmm0
addsd 0x55cdc(%rip), %xmm0 # 0xe11f8
movsd %xmm0, -0x40(%rbp)
jmp 0x8b5ed
movl -0x44(%rbp), %eax
testl $0x600, %eax # imm = 0x600
movsd %xmm0, -0x70(%rbp)
je 0x8b593
movq -0x50(%rbp), %rax
movq 0x28(%rax), %rdi
movq %r15, %rsi
movq %rbx, %rdx
movl -0x34(%rbp), %ecx
callq 0x8d0d6
divsd -0x70(%rbp), %xmm0
movsd -0x40(%rbp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, -0x40(%rbp)
jmp 0x8b5ed
testl $0x2800, %eax # imm = 0x2800
je 0x8b649
movq -0x50(%rbp), %rax
movq 0x28(%rax), %rdi
movq %r15, %rsi
movq %rbx, %rdx
movl -0x34(%rbp), %ecx
movl $0x800, %r8d # imm = 0x800
callq 0x8bbe0
testl %eax, %eax
jne 0x8b5ed
jmp 0x8b50f
testl $0x2800, %eax # imm = 0x2800
je 0x8b649
movq -0x50(%rbp), %rax
movq 0x28(%rax), %rdi
movq %r15, %rsi
movq %rbx, %rdx
movl -0x34(%rbp), %r15d
movl %r15d, %ecx
movl $0x800, %r8d # imm = 0x800
callq 0x8bbe0
testl %eax, %eax
jne 0x8b5e9
movq -0x50(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x58(%rbp), %rsi
movl %r15d, %edx
callq 0x8c620
divsd -0x70(%rbp), %xmm0
movsd -0x40(%rbp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, -0x40(%rbp)
movq -0x58(%rbp), %r15
addq -0x78(%rbp), %rbx
addq %r13, %rbx
decl %r12d
cmpq %r14, %rbx
jb 0x8b4dc
jmp 0x8b672
movq %r15, %rsi
movq %rbx, %rdx
movl -0x34(%rbp), %ecx
movl -0x44(%rbp), %r8d
callq 0x8bbe0
cmpl $0x1, %eax
movq -0x80(%rbp), %rcx
adcq $0x0, %rcx
movq -0x68(%rbp), %rax
movq (%rax), %rax
movl 0x178(%rax), %eax
addq -0x78(%rbp), %rbx
addq %rax, %rbx
movl -0x5c(%rbp), %edx
subl %r12d, %edx
movq %rcx, %rax
incl %edx
cmpq %r14, %rbx
jb 0x8b4d2
jmp 0x8b650
movq $-0x1, %rax
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x8b6f7
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl -0x5c(%rbp), %ecx
subl %r12d, %ecx
movq $-0x1, %rax
je 0x8b650
movl %ecx, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movsd -0x40(%rbp), %xmm2
divsd %xmm0, %xmm2
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rax
movsd (%rax), %xmm0
unpcklps 0x4da49(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x4da51(%rip), %xmm0 # 0xd9100
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1 # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
mulsd %xmm2, %xmm1
cvttsd2si %xmm1, %rdx
movq %rdx, %rcx
sarq $0x3f, %rcx
subsd 0x55b15(%rip), %xmm1 # 0xe11e8
cvttsd2si %xmm1, %rax
andq %rcx, %rax
orq %rdx, %rax
jmp 0x8b650
xorl %eax, %eax
jmp 0x8b650
xorl %eax, %eax
negl %r13d
sbbq %rax, %rax
jmp 0x8b650
callq 0x29260
| rtree_estimate:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov [rbp+var_58], rdx
mov rax, fs:28h
mov [rbp+var_30], rax
bt r8d, 0Ch
jb loc_8B649
mov r15d, ecx
mov rbx, rdi
mov rax, [rdi]
mov ecx, esi
mov rdx, [rax+98h]
mov rdx, [rdx+rcx*8]
cmp rdx, 0FFFFFFFFFFFFFFFFh
jz loc_8B649
mov r14d, r8d
imul r13, rcx, 70h ; 'p'
add r13, [rax+218h]
movzx eax, word ptr [r13+0Eh]
mov r12, rsp
add eax, 0Fh
and eax, 0FFFFFFF0h
sub r12, rax
mov rsp, r12
mov rdi, rbx
mov rsi, r13
mov ecx, 3
mov r8, r12
xor r9d, r9d
call _mi_fetch_keypage
test rax, rax
jz loc_8B649
mov [rbp+var_50], r13
mov [rbp+var_44], r14d
mov [rbp+var_34], r15d
movzx r14d, byte ptr [r12]
test r14b, r14b
js short loc_8B471
movzx eax, byte ptr [r12+1]
shl r14d, 8
or r14, rax
xor r13d, r13d
cmp r14, 3
mov r15, [rbp+var_58]
jb loc_8B6E3
mov [rbp+var_68], rbx
lea rbx, [r12+2]
add r14, r12
mov [rbp+var_60], 0
jmp short loc_8B4AC
loc_8B471:
mov [rbp+var_68], rbx
mov rax, [rbx]
mov r13d, [rax+17Ch]
lea rbx, [r12+r13]
add rbx, 2
movzx eax, byte ptr [r12+1]
and r14d, 7Fh
shl r14d, 8
or r14, rax
add r14, r12
cmp rbx, r14
mov r15, [rbp+var_58]
jnb loc_8B6EA
mov [rbp+var_60], r13d
loc_8B4AC:
mov rax, [rbp+var_50]
movzx ecx, word ptr [rax+12h]
mov rax, [rbp+var_68]
mov rax, [rax]
sub ecx, [rax+178h]
mov [rbp+var_78], rcx
xor eax, eax
xorpd xmm0, xmm0
movsd [rbp+var_40], xmm0
xor edx, edx
loc_8B4D2:
mov [rbp+var_5C], edx
mov [rbp+var_80], rax
xor r12d, r12d
loc_8B4DC:
mov rax, [rbp+var_50]
mov rdi, [rax+28h]
cmp [rbp+var_60], 0
jz loc_8B602
mov rsi, rbx
mov edx, [rbp+var_34]
call rtree_rect_volume
ucomisd xmm0, cs:qword_E1218
jnz short loc_8B526
jp short loc_8B526
mov eax, [rbp+var_44]
test eax, 600h
jz short loc_8B563
loc_8B50F:
movsd xmm0, [rbp+var_40]
addsd xmm0, cs:qword_E11F8
movsd [rbp+var_40], xmm0
jmp loc_8B5ED
loc_8B526:
mov eax, [rbp+var_44]
test eax, 600h
movsd [rbp+var_70], xmm0
jz short loc_8B593
mov rax, [rbp+var_50]
mov rdi, [rax+28h]
mov rsi, r15
mov rdx, rbx
mov ecx, [rbp+var_34]
call rtree_overlapping_area
divsd xmm0, [rbp+var_70]
movsd xmm1, [rbp+var_40]
addsd xmm1, xmm0
movsd [rbp+var_40], xmm1
jmp loc_8B5ED
loc_8B563:
test eax, 2800h
jz loc_8B649
mov rax, [rbp+var_50]
mov rdi, [rax+28h]
mov rsi, r15
mov rdx, rbx
mov ecx, [rbp+var_34]
mov r8d, 800h
call rtree_key_cmp
test eax, eax
jnz short loc_8B5ED
jmp loc_8B50F
loc_8B593:
test eax, 2800h
jz loc_8B649
mov rax, [rbp+var_50]
mov rdi, [rax+28h]
mov rsi, r15
mov rdx, rbx
mov r15d, [rbp+var_34]
mov ecx, r15d
mov r8d, 800h
call rtree_key_cmp
test eax, eax
jnz short loc_8B5E9
mov rax, [rbp+var_50]
mov rdi, [rax+28h]
mov rsi, [rbp+var_58]
mov edx, r15d
call rtree_rect_volume
divsd xmm0, [rbp+var_70]
movsd xmm1, [rbp+var_40]
addsd xmm1, xmm0
movsd [rbp+var_40], xmm1
loc_8B5E9:
mov r15, [rbp+var_58]
loc_8B5ED:
add rbx, [rbp+var_78]
add rbx, r13
dec r12d
cmp rbx, r14
jb loc_8B4DC
jmp short loc_8B672
loc_8B602:
mov rsi, r15
mov rdx, rbx
mov ecx, [rbp+var_34]
mov r8d, [rbp+var_44]
call rtree_key_cmp
cmp eax, 1
mov rcx, [rbp+var_80]
adc rcx, 0
mov rax, [rbp+var_68]
mov rax, [rax]
mov eax, [rax+178h]
add rbx, [rbp+var_78]
add rbx, rax
mov edx, [rbp+var_5C]
sub edx, r12d
mov rax, rcx
inc edx
cmp rbx, r14
jb loc_8B4D2
jmp short loc_8B650
loc_8B649:
mov rax, 0FFFFFFFFFFFFFFFFh
loc_8B650:
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz loc_8B6F7
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_8B672:
mov ecx, [rbp+var_5C]
sub ecx, r12d
mov rax, 0FFFFFFFFFFFFFFFFh
jz short loc_8B650
mov eax, ecx
xorps xmm0, xmm0
cvtsi2sd xmm0, rax
movsd xmm2, [rbp+var_40]
divsd xmm2, xmm0
mov rax, [rbp+var_68]
mov rax, [rax+8]
movsd xmm0, qword ptr [rax]
unpcklps xmm0, cs:xmmword_D90F0
subpd xmm0, cs:xmmword_D9100
movapd xmm1, xmm0
unpckhpd xmm1, xmm0
addsd xmm1, xmm0
mulsd xmm1, xmm2
cvttsd2si rdx, xmm1
mov rcx, rdx
sar rcx, 3Fh
subsd xmm1, cs:qword_E11E8
cvttsd2si rax, xmm1
and rax, rcx
or rax, rdx
jmp loc_8B650
loc_8B6E3:
xor eax, eax
jmp loc_8B650
loc_8B6EA:
xor eax, eax
neg r13d
sbb rax, rax
jmp loc_8B650
loc_8B6F7:
call ___stack_chk_fail
| long long rtree_estimate(unsigned long long **a1, unsigned int a2, long long a3, unsigned int a4, unsigned int a5)
{
long long v6; // rdx
long long v8; // r13
unsigned __int8 *v9; // r12
int v10; // r14d
unsigned long long v11; // r14
long long v12; // r13
long long v13; // r15
unsigned long long v14; // rbx
unsigned __int8 *v15; // r14
long long result; // rax
int v17; // edx
int v18; // r12d
long long v19; // rdi
double v20; // xmm0_8
double v21; // xmm0_8
long long v22; // rsi
unsigned int v23; // r15d
double v24; // xmm0_8
int v25; // eax
__m128d v26; // xmm0
long long v27; // [rsp+0h] [rbp-80h] BYREF
long long v28; // [rsp+8h] [rbp-78h]
double v29; // [rsp+10h] [rbp-70h]
unsigned long long **v30; // [rsp+18h] [rbp-68h]
int v31; // [rsp+20h] [rbp-60h]
int v32; // [rsp+24h] [rbp-5Ch]
long long v33; // [rsp+28h] [rbp-58h]
long long v34; // [rsp+30h] [rbp-50h]
unsigned int v35; // [rsp+3Ch] [rbp-44h]
double v36; // [rsp+40h] [rbp-40h]
unsigned int v37; // [rsp+4Ch] [rbp-34h]
unsigned long long v38; // [rsp+50h] [rbp-30h]
v33 = a3;
v38 = __readfsqword(0x28u);
if ( (a5 & 0x1000) != 0 )
return -1LL;
v6 = *(_QWORD *)((*a1)[19] + 8LL * a2);
if ( v6 == -1 )
return -1LL;
v8 = (*a1)[67] + 112LL * a2;
v9 = (unsigned __int8 *)&v27 - ((*(unsigned __int16 *)(v8 + 14) + 15) & 0xFFFFFFF0);
if ( !mi_fetch_keypage(a1, v8, v6) )
return -1LL;
v34 = v8;
v35 = a5;
v37 = a4;
v10 = *v9;
if ( (v10 & 0x80u) != 0 )
{
v30 = a1;
v12 = *((unsigned int *)*a1 + 95);
v14 = (unsigned long long)&v9[v12 + 2];
v15 = &v9[v9[1] | (unsigned long long)((unsigned __int8)(v10 & 0x7F) << 8)];
v13 = v33;
if ( v14 >= (unsigned long long)v15 )
return -(long long)((_DWORD)v12 != 0);
v31 = *((_DWORD *)*a1 + 95);
}
else
{
v11 = v9[1] | (unsigned long long)(unsigned int)(v10 << 8);
v12 = 0LL;
v13 = v33;
if ( v11 < 3 )
return 0LL;
v30 = a1;
v14 = (unsigned long long)(v9 + 2);
v15 = &v9[v11];
v31 = 0;
}
v28 = (unsigned int)*(unsigned __int16 *)(v34 + 18) - *((_DWORD *)*v30 + 94);
result = 0LL;
v36 = 0.0;
v17 = 0;
while ( 2 )
{
v32 = v17;
v27 = result;
v18 = 0;
while ( 1 )
{
v19 = *(_QWORD *)(v34 + 40);
if ( !v31 )
break;
v20 = rtree_rect_volume(v19, v14, v37);
if ( v20 == 0.0 )
{
if ( (v35 & 0x600) != 0 )
goto LABEL_14;
if ( (v35 & 0x2800) == 0 )
return -1LL;
if ( !(unsigned int)rtree_key_cmp(*(_QWORD *)(v34 + 40), v13, v14, v37, 2048LL) )
LABEL_14:
v36 = v36 + 1.0;
}
else
{
v29 = v20;
if ( (v35 & 0x600) != 0 )
{
v21 = rtree_overlapping_area(*(_QWORD *)(v34 + 40), v13, v14, v37);
v36 = v36 + v21 / v29;
}
else
{
if ( (v35 & 0x2800) == 0 )
return -1LL;
v22 = v13;
v23 = v37;
if ( !(unsigned int)rtree_key_cmp(*(_QWORD *)(v34 + 40), v22, v14, v37, 2048LL) )
{
v24 = rtree_rect_volume(*(_QWORD *)(v34 + 40), v33, v23);
v36 = v36 + v24 / v29;
}
v13 = v33;
}
}
v14 += v12 + v28;
--v18;
if ( v14 >= (unsigned long long)v15 )
{
result = -1LL;
if ( v32 != v18 )
{
v26 = _mm_sub_pd((__m128d)_mm_unpacklo_ps((__m128)*v30[1], (__m128)xmmword_D90F0), (__m128d)xmmword_D9100);
return (unsigned int)(int)((_mm_unpackhi_pd(v26, v26).m128d_f64[0] + v26.m128d_f64[0])
* (v36
/ (double)(v32 - v18)));
}
return result;
}
}
v25 = rtree_key_cmp(v19, v13, v14, v37, v35);
v14 += *((unsigned int *)*v30 + 94) + v28;
result = (v25 == 0) + v27;
v17 = v32 - v18 + 1;
if ( v14 < (unsigned long long)v15 )
continue;
return result;
}
}
| rtree_estimate:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x58],RDX
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
BT R8D,0xc
JC 0x0018b649
MOV R15D,ECX
MOV RBX,RDI
MOV RAX,qword ptr [RDI]
MOV ECX,ESI
MOV RDX,qword ptr [RAX + 0x98]
MOV RDX,qword ptr [RDX + RCX*0x8]
CMP RDX,-0x1
JZ 0x0018b649
MOV R14D,R8D
IMUL R13,RCX,0x70
ADD R13,qword ptr [RAX + 0x218]
MOVZX EAX,word ptr [R13 + 0xe]
MOV R12,RSP
ADD EAX,0xf
AND EAX,0xfffffff0
SUB R12,RAX
MOV RSP,R12
MOV RDI,RBX
MOV RSI,R13
MOV ECX,0x3
MOV R8,R12
XOR R9D,R9D
CALL 0x00184424
TEST RAX,RAX
JZ 0x0018b649
MOV qword ptr [RBP + -0x50],R13
MOV dword ptr [RBP + -0x44],R14D
MOV dword ptr [RBP + -0x34],R15D
MOVZX R14D,byte ptr [R12]
TEST R14B,R14B
JS 0x0018b471
MOVZX EAX,byte ptr [R12 + 0x1]
SHL R14D,0x8
OR R14,RAX
XOR R13D,R13D
CMP R14,0x3
MOV R15,qword ptr [RBP + -0x58]
JC 0x0018b6e3
MOV qword ptr [RBP + -0x68],RBX
LEA RBX,[R12 + 0x2]
ADD R14,R12
MOV dword ptr [RBP + -0x60],0x0
JMP 0x0018b4ac
LAB_0018b471:
MOV qword ptr [RBP + -0x68],RBX
MOV RAX,qword ptr [RBX]
MOV R13D,dword ptr [RAX + 0x17c]
LEA RBX,[R12 + R13*0x1]
ADD RBX,0x2
MOVZX EAX,byte ptr [R12 + 0x1]
AND R14D,0x7f
SHL R14D,0x8
OR R14,RAX
ADD R14,R12
CMP RBX,R14
MOV R15,qword ptr [RBP + -0x58]
JNC 0x0018b6ea
MOV dword ptr [RBP + -0x60],R13D
LAB_0018b4ac:
MOV RAX,qword ptr [RBP + -0x50]
MOVZX ECX,word ptr [RAX + 0x12]
MOV RAX,qword ptr [RBP + -0x68]
MOV RAX,qword ptr [RAX]
SUB ECX,dword ptr [RAX + 0x178]
MOV qword ptr [RBP + -0x78],RCX
XOR EAX,EAX
XORPD XMM0,XMM0
MOVSD qword ptr [RBP + -0x40],XMM0
XOR EDX,EDX
LAB_0018b4d2:
MOV dword ptr [RBP + -0x5c],EDX
MOV qword ptr [RBP + -0x80],RAX
XOR R12D,R12D
LAB_0018b4dc:
MOV RAX,qword ptr [RBP + -0x50]
MOV RDI,qword ptr [RAX + 0x28]
CMP dword ptr [RBP + -0x60],0x0
JZ 0x0018b602
MOV RSI,RBX
MOV EDX,dword ptr [RBP + -0x34]
CALL 0x0018c620
UCOMISD XMM0,qword ptr [0x001e1218]
JNZ 0x0018b526
JP 0x0018b526
MOV EAX,dword ptr [RBP + -0x44]
TEST EAX,0x600
JZ 0x0018b563
LAB_0018b50f:
MOVSD XMM0,qword ptr [RBP + -0x40]
ADDSD XMM0,qword ptr [0x001e11f8]
MOVSD qword ptr [RBP + -0x40],XMM0
JMP 0x0018b5ed
LAB_0018b526:
MOV EAX,dword ptr [RBP + -0x44]
TEST EAX,0x600
MOVSD qword ptr [RBP + -0x70],XMM0
JZ 0x0018b593
MOV RAX,qword ptr [RBP + -0x50]
MOV RDI,qword ptr [RAX + 0x28]
MOV RSI,R15
MOV RDX,RBX
MOV ECX,dword ptr [RBP + -0x34]
CALL 0x0018d0d6
DIVSD XMM0,qword ptr [RBP + -0x70]
MOVSD XMM1,qword ptr [RBP + -0x40]
ADDSD XMM1,XMM0
MOVSD qword ptr [RBP + -0x40],XMM1
JMP 0x0018b5ed
LAB_0018b563:
TEST EAX,0x2800
JZ 0x0018b649
MOV RAX,qword ptr [RBP + -0x50]
MOV RDI,qword ptr [RAX + 0x28]
MOV RSI,R15
MOV RDX,RBX
MOV ECX,dword ptr [RBP + -0x34]
MOV R8D,0x800
CALL 0x0018bbe0
TEST EAX,EAX
JNZ 0x0018b5ed
JMP 0x0018b50f
LAB_0018b593:
TEST EAX,0x2800
JZ 0x0018b649
MOV RAX,qword ptr [RBP + -0x50]
MOV RDI,qword ptr [RAX + 0x28]
MOV RSI,R15
MOV RDX,RBX
MOV R15D,dword ptr [RBP + -0x34]
MOV ECX,R15D
MOV R8D,0x800
CALL 0x0018bbe0
TEST EAX,EAX
JNZ 0x0018b5e9
MOV RAX,qword ptr [RBP + -0x50]
MOV RDI,qword ptr [RAX + 0x28]
MOV RSI,qword ptr [RBP + -0x58]
MOV EDX,R15D
CALL 0x0018c620
DIVSD XMM0,qword ptr [RBP + -0x70]
MOVSD XMM1,qword ptr [RBP + -0x40]
ADDSD XMM1,XMM0
MOVSD qword ptr [RBP + -0x40],XMM1
LAB_0018b5e9:
MOV R15,qword ptr [RBP + -0x58]
LAB_0018b5ed:
ADD RBX,qword ptr [RBP + -0x78]
ADD RBX,R13
DEC R12D
CMP RBX,R14
JC 0x0018b4dc
JMP 0x0018b672
LAB_0018b602:
MOV RSI,R15
MOV RDX,RBX
MOV ECX,dword ptr [RBP + -0x34]
MOV R8D,dword ptr [RBP + -0x44]
CALL 0x0018bbe0
CMP EAX,0x1
MOV RCX,qword ptr [RBP + -0x80]
ADC RCX,0x0
MOV RAX,qword ptr [RBP + -0x68]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x178]
ADD RBX,qword ptr [RBP + -0x78]
ADD RBX,RAX
MOV EDX,dword ptr [RBP + -0x5c]
SUB EDX,R12D
MOV RAX,RCX
INC EDX
CMP RBX,R14
JC 0x0018b4d2
JMP 0x0018b650
LAB_0018b649:
MOV RAX,-0x1
LAB_0018b650:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x0018b6f7
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0018b672:
MOV ECX,dword ptr [RBP + -0x5c]
SUB ECX,R12D
MOV RAX,-0x1
JZ 0x0018b650
MOV EAX,ECX
XORPS XMM0,XMM0
CVTSI2SD XMM0,RAX
MOVSD XMM2,qword ptr [RBP + -0x40]
DIVSD XMM2,XMM0
MOV RAX,qword ptr [RBP + -0x68]
MOV RAX,qword ptr [RAX + 0x8]
MOVSD XMM0,qword ptr [RAX]
UNPCKLPS XMM0,xmmword ptr [0x001d90f0]
SUBPD XMM0,xmmword ptr [0x001d9100]
MOVAPD XMM1,XMM0
UNPCKHPD XMM1,XMM0
ADDSD XMM1,XMM0
MULSD XMM1,XMM2
CVTTSD2SI RDX,XMM1
MOV RCX,RDX
SAR RCX,0x3f
SUBSD XMM1,qword ptr [0x001e11e8]
CVTTSD2SI RAX,XMM1
AND RAX,RCX
OR RAX,RDX
JMP 0x0018b650
LAB_0018b6e3:
XOR EAX,EAX
JMP 0x0018b650
LAB_0018b6ea:
XOR EAX,EAX
NEG R13D
SBB RAX,RAX
JMP 0x0018b650
LAB_0018b6f7:
CALL 0x00129260
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
ulong rtree_estimate(long *param_1,ulong param_2,int8 param_3,int4 param_4,uint param_5)
{
byte bVar1;
uint uVar2;
int8 uVar3;
long lVar4;
int4 uVar5;
int iVar6;
long lVar7;
byte *pbVar8;
byte *pbVar9;
int iVar10;
long lVar11;
ulong uVar12;
ulong uVar13;
byte *pbVar14;
int8 uVar15;
long in_FS_OFFSET;
double dVar16;
int8 uStack_90;
int8 local_88;
ulong local_80;
double local_78;
long *local_70;
uint local_68;
int local_64;
int8 local_60;
long local_58;
uint local_4c;
double local_48;
int4 local_3c;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
pbVar9 = (byte *)&local_88;
local_60 = param_3;
if ((param_5 >> 0xc & 1) == 0) {
lVar7 = *(long *)(*(long *)(*param_1 + 0x98) + (param_2 & 0xffffffff) * 8);
pbVar9 = (byte *)&local_88;
if (lVar7 != -1) {
lVar11 = (param_2 & 0xffffffff) * 0x70 + *(long *)(*param_1 + 0x218);
lVar4 = -(ulong)(*(ushort *)(lVar11 + 0xe) + 0xf & 0xfffffff0);
pbVar9 = (byte *)((long)&local_88 + lVar4);
*(int8 *)((long)&uStack_90 + lVar4) = 0x18b41f;
lVar7 = _mi_fetch_keypage(param_1,lVar11,lVar7,3,pbVar9,0);
if (lVar7 != 0) {
local_58 = lVar11;
local_4c = param_5;
local_3c = param_4;
bVar1 = *pbVar9;
if ((char)bVar1 < '\0') {
local_70 = param_1;
uVar2 = *(uint *)(*param_1 + 0x17c);
uVar12 = (ulong)uVar2;
pbVar8 = pbVar9 + uVar12 + 2;
pbVar14 = pbVar9 + ((ulong)((bVar1 & 0x7f) << 8) |
(ulong)*(byte *)((long)&local_88 + lVar4 + 1));
if (pbVar14 <= pbVar8) {
uVar13 = -(ulong)(uVar2 != 0);
goto LAB_0018b650;
}
}
else {
uVar13 = (ulong)CONCAT11(bVar1,*(int1 *)((long)&local_88 + lVar4 + 1));
uVar12 = 0;
if (uVar13 < 3) {
uVar13 = 0;
goto LAB_0018b650;
}
pbVar8 = (byte *)((long)&local_88 + lVar4 + 2);
pbVar14 = pbVar9 + uVar13;
local_68 = 0;
uVar2 = local_68;
}
local_68 = uVar2;
local_80 = (ulong)((uint)*(ushort *)(lVar11 + 0x12) - *(int *)(*param_1 + 0x178));
uVar13 = 0;
local_48 = 0.0;
uVar15 = local_60;
local_70 = param_1;
iVar10 = 0;
do {
local_64 = iVar10;
iVar10 = 0;
local_88 = uVar13;
while (uVar5 = local_3c, uVar2 = local_4c, uVar3 = *(int8 *)(local_58 + 0x28),
local_68 != 0) {
*(int8 *)((long)&uStack_90 + lVar4) = 0x18b4f9;
dVar16 = (double)rtree_rect_volume(uVar3,pbVar8,uVar5);
uVar5 = local_3c;
if ((dVar16 != _DAT_001e1218) || (NAN(dVar16) || NAN(_DAT_001e1218))) {
local_78 = dVar16;
if ((local_4c & 0x600) == 0) {
if ((local_4c & 0x2800) == 0) goto LAB_0018b649;
uVar3 = *(int8 *)(local_58 + 0x28);
*(int8 *)((long)&uStack_90 + lVar4) = 0x18b5be;
iVar6 = rtree_key_cmp(uVar3,uVar15,pbVar8,uVar5,0x800);
uVar15 = local_60;
if (iVar6 == 0) {
uVar3 = *(int8 *)(local_58 + 0x28);
*(int8 *)((long)&uStack_90 + lVar4) = 0x18b5d6;
dVar16 = (double)rtree_rect_volume(uVar3,uVar15,uVar5);
local_48 = local_48 + dVar16 / local_78;
uVar15 = local_60;
}
}
else {
uVar3 = *(int8 *)(local_58 + 0x28);
*(int8 *)((long)&uStack_90 + lVar4) = 0x18b54b;
dVar16 = (double)rtree_overlapping_area(uVar3,uVar15,pbVar8,uVar5);
local_48 = local_48 + dVar16 / local_78;
}
}
else {
if ((local_4c & 0x600) == 0) {
if ((local_4c & 0x2800) == 0) goto LAB_0018b649;
uVar3 = *(int8 *)(local_58 + 0x28);
*(int8 *)((long)&uStack_90 + lVar4) = 0x18b58a;
iVar6 = rtree_key_cmp(uVar3,uVar15,pbVar8,uVar5,0x800);
if (iVar6 != 0) goto LAB_0018b5ed;
}
local_48 = local_48 + DAT_001e11f8;
}
LAB_0018b5ed:
pbVar8 = pbVar8 + uVar12 + local_80;
iVar10 = iVar10 + -1;
if (pbVar14 <= pbVar8) {
uVar13 = 0xffffffffffffffff;
if (local_64 - iVar10 != 0) {
dVar16 = (((double)CONCAT44(DAT_001d90f0._4_4_,
(int)((ulong)*(int8 *)local_70[1] >> 0x20)) -
_UNK_001d9108) +
((double)CONCAT44((int4)DAT_001d90f0,(int)*(int8 *)local_70[1])
- _DAT_001d9100)) * (local_48 / (double)(uint)(local_64 - iVar10));
uVar13 = (ulong)dVar16;
uVar13 = (long)(dVar16 - _DAT_001e11e8) & (long)uVar13 >> 0x3f | uVar13;
}
goto LAB_0018b650;
}
}
*(int8 *)((long)&uStack_90 + lVar4) = 0x18b614;
iVar6 = rtree_key_cmp(uVar3,uVar15,pbVar8,uVar5,uVar2);
uVar13 = local_88 + (iVar6 == 0);
pbVar8 = pbVar8 + *(uint *)(*local_70 + 0x178) + local_80;
iVar10 = (local_64 - iVar10) + 1;
} while (pbVar8 < pbVar14);
goto LAB_0018b650;
}
}
}
LAB_0018b649:
uVar13 = 0xffffffffffffffff;
LAB_0018b650:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
*(code **)(pbVar9 + -8) = rtree_insert_req;
__stack_chk_fail();
}
return uVar13;
}
| |
29,871 | intx::operator*(intx::uint<256u> const&, intx::uint<256u> const&) | corpus-core[P]colibri-stateless/build_O2/_deps/intx-src/include/intx/intx.hpp | inline constexpr uint operator*(const uint& x, const uint& y) noexcept
{
uint<N> p;
for (size_t j = 0; j < num_words; j++)
{
uint64_t k = 0;
for (size_t i = 0; i < (num_words - j - 1); i++)
{
auto a = addc(p[i + j], k);
auto t = umul(x[i], y[j]) + uint128{a.value, a.carry};
p[i + j] = t[0];
k = t[1];
}
p[num_words - 1] += x[num_words - j - 1] * y[j] + k;
}
return p;
} | O2 | cpp | intx::operator*(intx::uint<256u> const&, intx::uint<256u> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
pushq $0x3
popq %r12
xorl %r13d, %r13d
movq %rdi, (%rsp)
cmpq $0x4, %r13
je 0x38d6d
xorl %ebp, %ebp
xorl %r8d, %r8d
cmpq %rbp, %r12
je 0x38d44
xorl %ecx, %ecx
addq (%r14,%rbp,8), %r8
setb %cl
movq (%rbx,%r13,8), %rax
mulq (%r15,%rbp,8)
movq %rax, %rdi
movq %rdx, %rsi
movq %r8, %rdx
callq 0x38d80
movq %rdx, %r8
movq %rax, (%r14,%rbp,8)
incq %rbp
jmp 0x38d14
pushq $0x3
popq %rax
subl %r13d, %eax
shll $0x3, %eax
movq (%rbx,%r13,8), %rcx
imulq (%r15,%rax), %rcx
addq %r8, %rcx
movq (%rsp), %rax
addq %rcx, 0x18(%rax)
incq %r13
decq %r12
addq $0x8, %r14
jmp 0x38d09
movq (%rsp), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN4intxmlERKNS_4uintILj256EEES3_:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdx
mov r15, rsi
mov r14, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi+10h], xmm0
movups xmmword ptr [rdi], xmm0
push 3
pop r12
xor r13d, r13d
mov [rsp+38h+var_38], rdi
loc_38D09:
cmp r13, 4
jz short loc_38D6D
xor ebp, ebp
xor r8d, r8d
loc_38D14:
cmp r12, rbp
jz short loc_38D44
xor ecx, ecx
add r8, [r14+rbp*8]
setb cl
mov rax, [rbx+r13*8]
mul qword ptr [r15+rbp*8]
mov rdi, rax
mov rsi, rdx
mov rdx, r8
call _ZN4intxplENS_4uintILj128EEES1_; intx::operator+(intx::uint<128u>,intx::uint<128u>)
mov r8, rdx
mov [r14+rbp*8], rax
inc rbp
jmp short loc_38D14
loc_38D44:
push 3
pop rax
sub eax, r13d
shl eax, 3
mov rcx, [rbx+r13*8]
imul rcx, [r15+rax]
add rcx, r8
mov rax, [rsp+38h+var_38]
add [rax+18h], rcx
inc r13
dec r12
add r14, 8
jmp short loc_38D09
loc_38D6D:
mov rax, [rsp+38h+var_38]
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long intx::operator*(long long a1, long long a2, long long a3)
{
long long v5; // r14
long long v6; // r12
long long i; // r13
long long v8; // rbp
long long v9; // r8
unsigned __int128 v10; // rdi
long long v11; // rax
long long v12; // rdx
v5 = a1;
*(_OWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
v6 = 3LL;
for ( i = 0LL; i != 4; ++i )
{
v8 = 0LL;
v9 = 0LL;
while ( v6 != v8 )
{
v10 = *(unsigned long long *)(a2 + 8 * v8) * (unsigned __int128)*(unsigned long long *)(a3 + 8 * i);
v11 = intx::operator+(
v10,
*((_QWORD *)&v10 + 1),
*(_QWORD *)(v5 + 8 * v8) + v9,
__CFADD__(*(_QWORD *)(v5 + 8 * v8), v9));
v9 = v12;
*(_QWORD *)(v5 + 8 * v8++) = v11;
}
*(_QWORD *)(a1 + 24) += v9 + *(_QWORD *)(a2 + (unsigned int)(8 * (3 - i))) * *(_QWORD *)(a3 + 8 * i);
--v6;
v5 += 8LL;
}
return a1;
}
| operator*:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R15,RSI
MOV R14,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
MOVUPS xmmword ptr [RDI],XMM0
PUSH 0x3
POP R12
XOR R13D,R13D
MOV qword ptr [RSP],RDI
LAB_00138d09:
CMP R13,0x4
JZ 0x00138d6d
XOR EBP,EBP
XOR R8D,R8D
LAB_00138d14:
CMP R12,RBP
JZ 0x00138d44
XOR ECX,ECX
ADD R8,qword ptr [R14 + RBP*0x8]
SETC CL
MOV RAX,qword ptr [RBX + R13*0x8]
MUL qword ptr [R15 + RBP*0x8]
MOV RDI,RAX
MOV RSI,RDX
MOV RDX,R8
CALL 0x00138d80
MOV R8,RDX
MOV qword ptr [R14 + RBP*0x8],RAX
INC RBP
JMP 0x00138d14
LAB_00138d44:
PUSH 0x3
POP RAX
SUB EAX,R13D
SHL EAX,0x3
MOV RCX,qword ptr [RBX + R13*0x8]
IMUL RCX,qword ptr [R15 + RAX*0x1]
ADD RCX,R8
MOV RAX,qword ptr [RSP]
ADD qword ptr [RAX + 0x18],RCX
INC R13
DEC R12
ADD R14,0x8
JMP 0x00138d09
LAB_00138d6d:
MOV RAX,qword ptr [RSP]
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* intx::TEMPNAMEPLACEHOLDERVALUE(intx::uint<256u> const&, intx::uint<256u> const&) */
intx * __thiscall intx::operator*(intx *this,uint *param_1,uint *param_2)
{
int1 auVar1 [16];
long lVar2;
ulong uVar3;
long lVar4;
long lVar5;
intx *piVar6;
int1 auVar7 [16];
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
lVar4 = 3;
piVar6 = this;
for (lVar5 = 0; lVar5 != 4; lVar5 = lVar5 + 1) {
uVar3 = 0;
for (lVar2 = 0; lVar4 != lVar2; lVar2 = lVar2 + 1) {
auVar7._8_8_ = 0;
auVar7._0_8_ = *(ulong *)(param_2 + lVar5 * 8);
auVar1._8_8_ = 0;
auVar1._0_8_ = *(ulong *)(param_1 + lVar2 * 8);
auVar7 = operator+(SUB168(auVar7 * auVar1,0),SUB168(auVar7 * auVar1,8),
uVar3 + *(ulong *)(piVar6 + lVar2 * 8),
CARRY8(uVar3,*(ulong *)(piVar6 + lVar2 * 8)));
uVar3 = auVar7._8_8_;
*(long *)(piVar6 + lVar2 * 8) = auVar7._0_8_;
}
*(ulong *)(this + 0x18) =
*(long *)(this + 0x18) +
*(long *)(param_2 + lVar5 * 8) * *(long *)(param_1 + (uint)((3 - (int)lVar5) * 8)) + uVar3;
lVar4 = lVar4 + -1;
piVar6 = piVar6 + 8;
}
return this;
}
| |
29,872 | string_process_escapes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&) | monkey531[P]llama/common/common.cpp | void string_process_escapes(std::string & input) {
std::size_t input_len = input.length();
std::size_t output_idx = 0;
for (std::size_t input_idx = 0; input_idx < input_len; ++input_idx) {
if (input[input_idx] == '\\' && input_idx + 1 < input_len) {
switch (input[++input_idx]) {
case 'n': input[output_idx++] = '\n'; break;
case 'r': input[output_idx++] = '\r'; break;
case 't': input[output_idx++] = '\t'; break;
case '\'': input[output_idx++] = '\''; break;
case '\"': input[output_idx++] = '\"'; break;
case '\\': input[output_idx++] = '\\'; break;
case 'x':
// Handle \x12, etc
if (input_idx + 2 < input_len) {
const char x[3] = { input[input_idx + 1], input[input_idx + 2], 0 };
char *err_p = nullptr;
const long val = std::strtol(x, &err_p, 16);
if (err_p == x + 2) {
input_idx += 2;
input[output_idx++] = char(val);
break;
}
}
// fall through
default: input[output_idx++] = '\\';
input[output_idx++] = input[input_idx]; break;
}
} else {
input[output_idx++] = input[input_idx];
}
}
input.resize(output_idx);
} | O0 | cpp | string_process_escapes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&):
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq 0x40(%rsp), %rdi
callq 0x5a9f0
movq %rax, 0x38(%rsp)
movq $0x0, 0x30(%rsp)
movq $0x0, 0x28(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x38(%rsp), %rax
jae 0xee164
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x5b3e0
movsbl (%rax), %eax
cmpl $0x5c, %eax
jne 0xee119
movq 0x28(%rsp), %rax
addq $0x1, %rax
cmpq 0x38(%rsp), %rax
jae 0xee119
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
incq %rsi
movq %rsi, 0x28(%rsp)
callq 0x5b3e0
movsbl (%rax), %eax
movl %eax, 0xc(%rsp)
subl $0x22, %eax
je 0xedfbf
jmp 0xedee2
movl 0xc(%rsp), %eax
subl $0x27, %eax
je 0xedf9c
jmp 0xedef1
movl 0xc(%rsp), %eax
subl $0x5c, %eax
je 0xedfe2
jmp 0xedf00
movl 0xc(%rsp), %eax
subl $0x6e, %eax
je 0xedf33
jmp 0xedf0b
movl 0xc(%rsp), %eax
subl $0x72, %eax
je 0xedf56
jmp 0xedf16
movl 0xc(%rsp), %eax
subl $0x74, %eax
je 0xedf79
jmp 0xedf21
movl 0xc(%rsp), %eax
subl $0x78, %eax
je 0xee005
jmp 0xee0c3
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
callq 0x5b3e0
movb $0xa, (%rax)
jmp 0xee117
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
callq 0x5b3e0
movb $0xd, (%rax)
jmp 0xee117
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
callq 0x5b3e0
movb $0x9, (%rax)
jmp 0xee117
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
callq 0x5b3e0
movb $0x27, (%rax)
jmp 0xee117
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
callq 0x5b3e0
movb $0x22, (%rax)
jmp 0xee117
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
callq 0x5b3e0
movb $0x5c, (%rax)
jmp 0xee117
movq 0x28(%rsp), %rax
addq $0x2, %rax
cmpq 0x38(%rsp), %rax
jae 0xee0c1
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
addq $0x1, %rsi
callq 0x5b3e0
movb (%rax), %al
movb %al, 0x25(%rsp)
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
addq $0x2, %rsi
callq 0x5b3e0
movb (%rax), %al
movb %al, 0x26(%rsp)
movb $0x0, 0x27(%rsp)
movq $0x0, 0x18(%rsp)
leaq 0x25(%rsp), %rdi
leaq 0x18(%rsp), %rsi
movl $0x10, %edx
callq 0x5b5a8
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rax
leaq 0x25(%rsp), %rcx
addq $0x2, %rcx
cmpq %rcx, %rax
jne 0xee0bf
movq 0x28(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x28(%rsp)
movq 0x10(%rsp), %rax
movb %al, 0xb(%rsp)
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
callq 0x5b3e0
movb 0xb(%rsp), %cl
movb %cl, (%rax)
jmp 0xee117
jmp 0xee0c1
jmp 0xee0c3
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
callq 0x5b3e0
movb $0x5c, (%rax)
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x5b3e0
movb (%rax), %al
movb %al, 0xa(%rsp)
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
callq 0x5b3e0
movb 0xa(%rsp), %cl
movb %cl, (%rax)
jmp 0xee14f
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x5b3e0
movb (%rax), %al
movb %al, 0x9(%rsp)
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
callq 0x5b3e0
movb 0x9(%rsp), %cl
movb %cl, (%rax)
jmp 0xee151
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0xede7a
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x5a6e0
addq $0x48, %rsp
retq
nopl (%rax,%rax)
| _Z22string_process_escapesRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov rdi, [rsp+48h+var_8]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void)
mov [rsp+48h+var_10], rax
mov [rsp+48h+var_18], 0
mov [rsp+48h+var_20], 0
loc_EDE7A:
mov rax, [rsp+48h+var_20]
cmp rax, [rsp+48h+var_10]
jnb loc_EE164
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_20]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
movsx eax, byte ptr [rax]
cmp eax, 5Ch ; '\'
jnz loc_EE119
mov rax, [rsp+48h+var_20]
add rax, 1
cmp rax, [rsp+48h+var_10]
jnb loc_EE119
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_20]
inc rsi
mov [rsp+48h+var_20], rsi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
movsx eax, byte ptr [rax]
mov [rsp+48h+var_3C], eax
sub eax, 22h ; '"'
jz loc_EDFBF
jmp short $+2
loc_EDEE2:
mov eax, [rsp+48h+var_3C]
sub eax, 27h ; '''
jz loc_EDF9C
jmp short $+2
loc_EDEF1:
mov eax, [rsp+48h+var_3C]
sub eax, 5Ch ; '\'
jz loc_EDFE2
jmp short $+2
loc_EDF00:
mov eax, [rsp+48h+var_3C]
sub eax, 6Eh ; 'n'
jz short loc_EDF33
jmp short $+2
loc_EDF0B:
mov eax, [rsp+48h+var_3C]
sub eax, 72h ; 'r'
jz short loc_EDF56
jmp short $+2
loc_EDF16:
mov eax, [rsp+48h+var_3C]
sub eax, 74h ; 't'
jz short loc_EDF79
jmp short $+2
loc_EDF21:
mov eax, [rsp+48h+var_3C]
sub eax, 78h ; 'x'
jz loc_EE005
jmp loc_EE0C3
loc_EDF33:
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_18]
mov rax, rsi
add rax, 1
mov [rsp+48h+var_18], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov byte ptr [rax], 0Ah
jmp loc_EE117
loc_EDF56:
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_18]
mov rax, rsi
add rax, 1
mov [rsp+48h+var_18], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov byte ptr [rax], 0Dh
jmp loc_EE117
loc_EDF79:
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_18]
mov rax, rsi
add rax, 1
mov [rsp+48h+var_18], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov byte ptr [rax], 9
jmp loc_EE117
loc_EDF9C:
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_18]
mov rax, rsi
add rax, 1
mov [rsp+48h+var_18], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov byte ptr [rax], 27h ; '''
jmp loc_EE117
loc_EDFBF:
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_18]
mov rax, rsi
add rax, 1
mov [rsp+48h+var_18], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov byte ptr [rax], 22h ; '"'
jmp loc_EE117
loc_EDFE2:
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_18]
mov rax, rsi
add rax, 1
mov [rsp+48h+var_18], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov byte ptr [rax], 5Ch ; '\'
jmp loc_EE117
loc_EE005:
mov rax, [rsp+48h+var_20]
add rax, 2
cmp rax, [rsp+48h+var_10]
jnb loc_EE0C1
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_20]
add rsi, 1
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov al, [rax]
mov [rsp+48h+var_23], al
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_20]
add rsi, 2
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov al, [rax]
mov [rsp+48h+var_22], al
mov [rsp+48h+var_21], 0
mov [rsp+48h+var_30], 0
lea rdi, [rsp+48h+var_23]
lea rsi, [rsp+48h+var_30]
mov edx, 10h
call strtol
mov [rsp+48h+var_38], rax
mov rax, [rsp+48h+var_30]
lea rcx, [rsp+48h+var_23]
add rcx, 2
cmp rax, rcx
jnz short loc_EE0BF
mov rax, [rsp+48h+var_20]
add rax, 2
mov [rsp+48h+var_20], rax
mov rax, [rsp+48h+var_38]
mov [rsp+48h+var_3D], al
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_18]
mov rax, rsi
add rax, 1
mov [rsp+48h+var_18], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov cl, [rsp+48h+var_3D]
mov [rax], cl
jmp short loc_EE117
loc_EE0BF:
jmp short $+2
loc_EE0C1:
jmp short $+2
loc_EE0C3:
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_18]
mov rax, rsi
add rax, 1
mov [rsp+48h+var_18], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov byte ptr [rax], 5Ch ; '\'
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_20]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov al, [rax]
mov [rsp+48h+var_3E], al
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_18]
mov rax, rsi
add rax, 1
mov [rsp+48h+var_18], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov cl, [rsp+48h+var_3E]
mov [rax], cl
loc_EE117:
jmp short loc_EE14F
loc_EE119:
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_20]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov al, [rax]
mov [rsp+48h+var_3F], al
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_18]
mov rax, rsi
add rax, 1
mov [rsp+48h+var_18], rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov cl, [rsp+48h+var_3F]
mov [rax], cl
loc_EE14F:
jmp short $+2
loc_EE151:
mov rax, [rsp+48h+var_20]
add rax, 1
mov [rsp+48h+var_20], rax
jmp loc_EDE7A
loc_EE164:
mov rdi, [rsp+48h+var_8]
mov rsi, [rsp+48h+var_18]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm; std::string::resize(ulong)
add rsp, 48h
retn
| long long string_process_escapes(long long a1)
{
long long v1; // rsi
long long v2; // rsi
long long v3; // rsi
long long v4; // rsi
long long v5; // rsi
long long v6; // rsi
long long v7; // rsi
long long v8; // rsi
long long v9; // rsi
long long v10; // rsi
char v12; // [rsp+9h] [rbp-3Fh]
char v13; // [rsp+Ah] [rbp-3Eh]
int v14; // [rsp+Ch] [rbp-3Ch]
char v15; // [rsp+10h] [rbp-38h]
char *v16; // [rsp+18h] [rbp-30h] BYREF
_BYTE v17[2]; // [rsp+25h] [rbp-23h] BYREF
char v18; // [rsp+27h] [rbp-21h] BYREF
unsigned long long i; // [rsp+28h] [rbp-20h]
long long v20; // [rsp+30h] [rbp-18h]
unsigned long long v21; // [rsp+38h] [rbp-10h]
long long v22; // [rsp+40h] [rbp-8h]
v22 = a1;
v21 = std::string::length(a1);
v20 = 0LL;
for ( i = 0LL; i < v21; ++i )
{
if ( *(_BYTE *)std::string::operator[](v22, i) == 92 && i + 1 < v21 )
{
v14 = *(char *)std::string::operator[](v22, ++i);
switch ( v14 )
{
case '"':
v5 = v20++;
*(_BYTE *)std::string::operator[](v22, v5) = 34;
break;
case '\'':
v4 = v20++;
*(_BYTE *)std::string::operator[](v22, v4) = 39;
break;
case '\\':
v6 = v20++;
*(_BYTE *)std::string::operator[](v22, v6) = 92;
break;
case 'n':
v1 = v20++;
*(_BYTE *)std::string::operator[](v22, v1) = 10;
break;
case 'r':
v2 = v20++;
*(_BYTE *)std::string::operator[](v22, v2) = 13;
break;
case 't':
v3 = v20++;
*(_BYTE *)std::string::operator[](v22, v3) = 9;
break;
default:
if ( v14 == 120
&& i + 2 < v21
&& (v17[0] = *(_BYTE *)std::string::operator[](v22, i + 1),
v17[1] = *(_BYTE *)std::string::operator[](v22, i + 2),
v18 = 0,
v16 = 0LL,
v15 = strtol(v17, &v16, 16LL),
v16 == &v18) )
{
i += 2LL;
v7 = v20++;
*(_BYTE *)std::string::operator[](v22, v7) = v15;
}
else
{
v8 = v20++;
*(_BYTE *)std::string::operator[](v22, v8) = 92;
v13 = *(_BYTE *)std::string::operator[](v22, i);
v9 = v20++;
*(_BYTE *)std::string::operator[](v22, v9) = v13;
}
break;
}
}
else
{
v12 = *(_BYTE *)std::string::operator[](v22, i);
v10 = v20++;
*(_BYTE *)std::string::operator[](v22, v10) = v12;
}
}
return std::string::resize(v22, v20);
}
| string_process_escapes:
SUB RSP,0x48
MOV qword ptr [RSP + 0x40],RDI
MOV RDI,qword ptr [RSP + 0x40]
CALL 0x0015a9f0
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x30],0x0
MOV qword ptr [RSP + 0x28],0x0
LAB_001ede7a:
MOV RAX,qword ptr [RSP + 0x28]
CMP RAX,qword ptr [RSP + 0x38]
JNC 0x001ee164
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x0015b3e0
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x5c
JNZ 0x001ee119
MOV RAX,qword ptr [RSP + 0x28]
ADD RAX,0x1
CMP RAX,qword ptr [RSP + 0x38]
JNC 0x001ee119
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x28]
INC RSI
MOV qword ptr [RSP + 0x28],RSI
CALL 0x0015b3e0
MOVSX EAX,byte ptr [RAX]
MOV dword ptr [RSP + 0xc],EAX
SUB EAX,0x22
JZ 0x001edfbf
JMP 0x001edee2
LAB_001edee2:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0x27
JZ 0x001edf9c
JMP 0x001edef1
LAB_001edef1:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0x5c
JZ 0x001edfe2
JMP 0x001edf00
LAB_001edf00:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0x6e
JZ 0x001edf33
JMP 0x001edf0b
LAB_001edf0b:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0x72
JZ 0x001edf56
JMP 0x001edf16
LAB_001edf16:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0x74
JZ 0x001edf79
JMP 0x001edf21
LAB_001edf21:
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,0x78
JZ 0x001ee005
JMP 0x001ee0c3
LAB_001edf33:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
MOV RAX,RSI
ADD RAX,0x1
MOV qword ptr [RSP + 0x30],RAX
CALL 0x0015b3e0
MOV byte ptr [RAX],0xa
JMP 0x001ee117
LAB_001edf56:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
MOV RAX,RSI
ADD RAX,0x1
MOV qword ptr [RSP + 0x30],RAX
CALL 0x0015b3e0
MOV byte ptr [RAX],0xd
JMP 0x001ee117
LAB_001edf79:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
MOV RAX,RSI
ADD RAX,0x1
MOV qword ptr [RSP + 0x30],RAX
CALL 0x0015b3e0
MOV byte ptr [RAX],0x9
JMP 0x001ee117
LAB_001edf9c:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
MOV RAX,RSI
ADD RAX,0x1
MOV qword ptr [RSP + 0x30],RAX
CALL 0x0015b3e0
MOV byte ptr [RAX],0x27
JMP 0x001ee117
LAB_001edfbf:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
MOV RAX,RSI
ADD RAX,0x1
MOV qword ptr [RSP + 0x30],RAX
CALL 0x0015b3e0
MOV byte ptr [RAX],0x22
JMP 0x001ee117
LAB_001edfe2:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
MOV RAX,RSI
ADD RAX,0x1
MOV qword ptr [RSP + 0x30],RAX
CALL 0x0015b3e0
MOV byte ptr [RAX],0x5c
JMP 0x001ee117
LAB_001ee005:
MOV RAX,qword ptr [RSP + 0x28]
ADD RAX,0x2
CMP RAX,qword ptr [RSP + 0x38]
JNC 0x001ee0c1
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x28]
ADD RSI,0x1
CALL 0x0015b3e0
MOV AL,byte ptr [RAX]
MOV byte ptr [RSP + 0x25],AL
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x28]
ADD RSI,0x2
CALL 0x0015b3e0
MOV AL,byte ptr [RAX]
MOV byte ptr [RSP + 0x26],AL
MOV byte ptr [RSP + 0x27],0x0
MOV qword ptr [RSP + 0x18],0x0
LEA RDI,[RSP + 0x25]
LEA RSI,[RSP + 0x18]
MOV EDX,0x10
CALL 0x0015b5a8
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x18]
LEA RCX,[RSP + 0x25]
ADD RCX,0x2
CMP RAX,RCX
JNZ 0x001ee0bf
MOV RAX,qword ptr [RSP + 0x28]
ADD RAX,0x2
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV byte ptr [RSP + 0xb],AL
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
MOV RAX,RSI
ADD RAX,0x1
MOV qword ptr [RSP + 0x30],RAX
CALL 0x0015b3e0
MOV CL,byte ptr [RSP + 0xb]
MOV byte ptr [RAX],CL
JMP 0x001ee117
LAB_001ee0bf:
JMP 0x001ee0c1
LAB_001ee0c1:
JMP 0x001ee0c3
LAB_001ee0c3:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
MOV RAX,RSI
ADD RAX,0x1
MOV qword ptr [RSP + 0x30],RAX
CALL 0x0015b3e0
MOV byte ptr [RAX],0x5c
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x0015b3e0
MOV AL,byte ptr [RAX]
MOV byte ptr [RSP + 0xa],AL
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
MOV RAX,RSI
ADD RAX,0x1
MOV qword ptr [RSP + 0x30],RAX
CALL 0x0015b3e0
MOV CL,byte ptr [RSP + 0xa]
MOV byte ptr [RAX],CL
LAB_001ee117:
JMP 0x001ee14f
LAB_001ee119:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x0015b3e0
MOV AL,byte ptr [RAX]
MOV byte ptr [RSP + 0x9],AL
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
MOV RAX,RSI
ADD RAX,0x1
MOV qword ptr [RSP + 0x30],RAX
CALL 0x0015b3e0
MOV CL,byte ptr [RSP + 0x9]
MOV byte ptr [RAX],CL
LAB_001ee14f:
JMP 0x001ee151
LAB_001ee151:
MOV RAX,qword ptr [RSP + 0x28]
ADD RAX,0x1
MOV qword ptr [RSP + 0x28],RAX
JMP 0x001ede7a
LAB_001ee164:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x30]
CALL 0x0015a6e0
ADD RSP,0x48
RET
|
/* string_process_escapes(std::__cxx11::string&) */
void string_process_escapes(string *param_1)
{
int1 uVar1;
char cVar2;
char *pcVar3;
long lVar4;
int1 *puVar5;
char *local_30;
char local_23;
int1 local_22;
char local_21;
ulong local_20;
long local_18;
ulong local_10;
string *local_8;
local_8 = param_1;
local_10 = std::__cxx11::string::length();
local_18 = 0;
local_20 = 0;
do {
if (local_10 <= local_20) {
std::__cxx11::string::resize((ulong)local_8);
return;
}
pcVar3 = (char *)std::__cxx11::string::operator[]((ulong)local_8);
if ((*pcVar3 == '\\') && (local_20 + 1 < local_10)) {
local_20 = local_20 + 1;
pcVar3 = (char *)std::__cxx11::string::operator[]((ulong)local_8);
cVar2 = *pcVar3;
if (cVar2 == '\"') {
local_18 = local_18 + 1;
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
*puVar5 = 0x22;
}
else if (cVar2 == '\'') {
local_18 = local_18 + 1;
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
*puVar5 = 0x27;
}
else if (cVar2 == '\\') {
local_18 = local_18 + 1;
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
*puVar5 = 0x5c;
}
else if (cVar2 == 'n') {
local_18 = local_18 + 1;
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
*puVar5 = 10;
}
else if (cVar2 == 'r') {
local_18 = local_18 + 1;
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
*puVar5 = 0xd;
}
else if (cVar2 == 't') {
local_18 = local_18 + 1;
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
*puVar5 = 9;
}
else {
if ((cVar2 == 'x') && (local_20 + 2 < local_10)) {
pcVar3 = (char *)std::__cxx11::string::operator[]((ulong)local_8);
local_23 = *pcVar3;
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
local_22 = *puVar5;
local_21 = '\0';
local_30 = (char *)0x0;
lVar4 = strtol(&local_23,&local_30,0x10);
if (local_30 == &local_21) {
local_20 = local_20 + 2;
local_18 = local_18 + 1;
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
*puVar5 = (char)lVar4;
goto LAB_001ee14f;
}
}
local_18 = local_18 + 1;
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
*puVar5 = 0x5c;
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
uVar1 = *puVar5;
local_18 = local_18 + 1;
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
*puVar5 = uVar1;
}
}
else {
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
uVar1 = *puVar5;
local_18 = local_18 + 1;
puVar5 = (int1 *)std::__cxx11::string::operator[]((ulong)local_8);
*puVar5 = uVar1;
}
LAB_001ee14f:
local_20 = local_20 + 1;
} while( true );
}
| |
29,873 | ggml_thread_cpumask_next | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c | static void ggml_thread_cpumask_next(const bool * global_mask, bool * local_mask, bool strict, int32_t* iter) {
if (!strict) {
memcpy(local_mask, global_mask, GGML_MAX_N_THREADS);
return;
} else {
memset(local_mask, 0, GGML_MAX_N_THREADS);
int32_t base_idx = *iter;
for (int32_t i = 0; i < GGML_MAX_N_THREADS; i++) {
int32_t idx = base_idx + i;
if (idx >= GGML_MAX_N_THREADS) {
// Just a cheaper modulo
idx -= GGML_MAX_N_THREADS;
}
if (global_mask[idx]) {
local_mask[idx] = 1;
*iter = idx + 1;
return;
}
}
}
} | O0 | c | ggml_thread_cpumask_next:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq %rcx, -0x20(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x13065
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
movl $0x200, %edx # imm = 0x200
callq 0xd8a0
jmp 0x130e2
movq -0x10(%rbp), %rdi
xorl %esi, %esi
movl $0x200, %edx # imm = 0x200
callq 0xd560
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
cmpl $0x200, -0x28(%rbp) # imm = 0x200
jge 0x130e0
movl -0x24(%rbp), %eax
addl -0x28(%rbp), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x200, -0x2c(%rbp) # imm = 0x200
jl 0x130ab
movl -0x2c(%rbp), %eax
subl $0x200, %eax # imm = 0x200
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rax
movslq -0x2c(%rbp), %rcx
testb $0x1, (%rax,%rcx)
je 0x130d3
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb $0x1, (%rax,%rcx)
movl -0x2c(%rbp), %ecx
addl $0x1, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
jmp 0x130e2
jmp 0x130d5
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x13085
jmp 0x130e2
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| ggml_thread_cpumask_next:
push rbp
mov rbp, rsp
sub rsp, 30h
mov al, dl
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
and al, 1
mov [rbp+var_11], al
mov [rbp+var_20], rcx
test [rbp+var_11], 1
jnz short loc_13065
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_8]
mov edx, 200h
call _memcpy
jmp short loc_130E2
loc_13065:
mov rdi, [rbp+var_10]
xor esi, esi
mov edx, 200h
call _memset
mov rax, [rbp+var_20]
mov eax, [rax]
mov [rbp+var_24], eax
mov [rbp+var_28], 0
loc_13085:
cmp [rbp+var_28], 200h
jge short loc_130E0
mov eax, [rbp+var_24]
add eax, [rbp+var_28]
mov [rbp+var_2C], eax
cmp [rbp+var_2C], 200h
jl short loc_130AB
mov eax, [rbp+var_2C]
sub eax, 200h
mov [rbp+var_2C], eax
loc_130AB:
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_2C]
test byte ptr [rax+rcx], 1
jz short loc_130D3
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_2C]
mov byte ptr [rax+rcx], 1
mov ecx, [rbp+var_2C]
add ecx, 1
mov rax, [rbp+var_20]
mov [rax], ecx
jmp short loc_130E2
loc_130D3:
jmp short $+2
loc_130D5:
mov eax, [rbp+var_28]
add eax, 1
mov [rbp+var_28], eax
jmp short loc_13085
loc_130E0:
jmp short $+2
loc_130E2:
add rsp, 30h
pop rbp
retn
| long long ggml_thread_cpumask_next(long long a1, long long a2, char a3, unsigned int *a4)
{
long long result; // rax
int v5; // [rsp+4h] [rbp-2Ch]
int i; // [rsp+8h] [rbp-28h]
int v7; // [rsp+Ch] [rbp-24h]
if ( (a3 & 1) == 0 )
return memcpy(a2, a1, 512LL);
memset(a2, 0LL, 512LL);
result = *a4;
v7 = *a4;
for ( i = 0; i < 512; ++i )
{
v5 = i + v7;
if ( i + v7 >= 512 )
v5 -= 512;
if ( (*(_BYTE *)(a1 + v5) & 1) != 0 )
{
*(_BYTE *)(a2 + v5) = 1;
result = (long long)a4;
*a4 = v5 + 1;
return result;
}
result = (unsigned int)(i + 1);
}
return result;
}
| ggml_thread_cpumask_next:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV AL,DL
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
AND AL,0x1
MOV byte ptr [RBP + -0x11],AL
MOV qword ptr [RBP + -0x20],RCX
TEST byte ptr [RBP + -0x11],0x1
JNZ 0x00113065
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x8]
MOV EDX,0x200
CALL 0x0010d8a0
JMP 0x001130e2
LAB_00113065:
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
MOV EDX,0x200
CALL 0x0010d560
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x24],EAX
MOV dword ptr [RBP + -0x28],0x0
LAB_00113085:
CMP dword ptr [RBP + -0x28],0x200
JGE 0x001130e0
MOV EAX,dword ptr [RBP + -0x24]
ADD EAX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x2c],EAX
CMP dword ptr [RBP + -0x2c],0x200
JL 0x001130ab
MOV EAX,dword ptr [RBP + -0x2c]
SUB EAX,0x200
MOV dword ptr [RBP + -0x2c],EAX
LAB_001130ab:
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0x2c]
TEST byte ptr [RAX + RCX*0x1],0x1
JZ 0x001130d3
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x2c]
MOV byte ptr [RAX + RCX*0x1],0x1
MOV ECX,dword ptr [RBP + -0x2c]
ADD ECX,0x1
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],ECX
JMP 0x001130e2
LAB_001130d3:
JMP 0x001130d5
LAB_001130d5:
MOV EAX,dword ptr [RBP + -0x28]
ADD EAX,0x1
MOV dword ptr [RBP + -0x28],EAX
JMP 0x00113085
LAB_001130e0:
JMP 0x001130e2
LAB_001130e2:
ADD RSP,0x30
POP RBP
RET
|
void ggml_thread_cpumask_next(void *param_1,void *param_2,byte param_3,int *param_4)
{
int local_34;
int local_30;
if ((param_3 & 1) == 0) {
memcpy(param_2,param_1,0x200);
}
else {
memset(param_2,0,0x200);
for (local_30 = 0; local_30 < 0x200; local_30 = local_30 + 1) {
local_34 = *param_4 + local_30;
if (0x1ff < local_34) {
local_34 = local_34 + -0x200;
}
if ((*(byte *)((long)param_1 + (long)local_34) & 1) != 0) {
*(int1 *)((long)param_2 + (long)local_34) = 1;
*param_4 = local_34 + 1;
return;
}
}
}
return;
}
| |
29,874 | ggml_thread_cpumask_next | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c | static void ggml_thread_cpumask_next(const bool * global_mask, bool * local_mask, bool strict, int32_t* iter) {
if (!strict) {
memcpy(local_mask, global_mask, GGML_MAX_N_THREADS);
return;
} else {
memset(local_mask, 0, GGML_MAX_N_THREADS);
int32_t base_idx = *iter;
for (int32_t i = 0; i < GGML_MAX_N_THREADS; i++) {
int32_t idx = base_idx + i;
if (idx >= GGML_MAX_N_THREADS) {
// Just a cheaper modulo
idx -= GGML_MAX_N_THREADS;
}
if (global_mask[idx]) {
local_mask[idx] = 1;
*iter = idx + 1;
return;
}
}
}
} | O2 | c | ggml_thread_cpumask_next:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
testl %edx, %edx
je 0xb646
movq %rcx, %rbx
movl $0x200, %edx # imm = 0x200
movq %r14, %rdi
xorl %esi, %esi
callq 0x83d0
movl (%rbx), %eax
movl $0x200, %ecx # imm = 0x200
subl $0x1, %ecx
jb 0xb640
leal -0x200(%rax), %edx
cmpl $0x200, %eax # imm = 0x200
cmovll %eax, %edx
movslq %edx, %rdx
incl %eax
cmpb $0x1, (%r15,%rdx)
jne 0xb618
movb $0x1, (%r14,%rdx)
incl %edx
movl %edx, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
movl $0x200, %edx # imm = 0x200
movq %r14, %rdi
movq %r15, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x85b0
| ggml_thread_cpumask_next:
push r15
push r14
push rbx
mov r14, rsi
mov r15, rdi
test edx, edx
jz short loc_B646
mov rbx, rcx
mov edx, 200h
mov rdi, r14
xor esi, esi
call _memset
mov eax, [rbx]
mov ecx, 200h
loc_B618:
sub ecx, 1
jb short loc_B640
lea edx, [rax-200h]
cmp eax, 200h
cmovl edx, eax
movsxd rdx, edx
inc eax
cmp byte ptr [r15+rdx], 1
jnz short loc_B618
mov byte ptr [r14+rdx], 1
inc edx
mov [rbx], edx
loc_B640:
pop rbx
pop r14
pop r15
retn
loc_B646:
mov edx, 200h
mov rdi, r14
mov rsi, r15
pop rbx
pop r14
pop r15
jmp _memcpy
| long long ggml_thread_cpumask_next(long long a1, long long a2, int a3, _DWORD *a4)
{
long long result; // rax
int v6; // ecx
int v8; // edx
if ( !a3 )
return memcpy(a2, a1, 512LL);
memset(a2, 0LL, 512LL);
result = (unsigned int)*a4;
v6 = 512;
while ( v6-- != 0 )
{
v8 = result - 512;
if ( (int)result < 512 )
v8 = result;
result = (unsigned int)(result + 1);
if ( *(_BYTE *)(a1 + v8) == 1 )
{
*(_BYTE *)(a2 + v8) = 1;
*a4 = v8 + 1;
return result;
}
}
return result;
}
| ggml_thread_cpumask_next:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RSI
MOV R15,RDI
TEST EDX,EDX
JZ 0x0010b646
MOV RBX,RCX
MOV EDX,0x200
MOV RDI,R14
XOR ESI,ESI
CALL 0x001083d0
MOV EAX,dword ptr [RBX]
MOV ECX,0x200
LAB_0010b618:
SUB ECX,0x1
JC 0x0010b640
LEA EDX,[RAX + -0x200]
CMP EAX,0x200
CMOVL EDX,EAX
MOVSXD RDX,EDX
INC EAX
CMP byte ptr [R15 + RDX*0x1],0x1
JNZ 0x0010b618
MOV byte ptr [R14 + RDX*0x1],0x1
INC EDX
MOV dword ptr [RBX],EDX
LAB_0010b640:
POP RBX
POP R14
POP R15
RET
LAB_0010b646:
MOV EDX,0x200
MOV RDI,R14
MOV RSI,R15
POP RBX
POP R14
POP R15
JMP 0x001085b0
|
void ggml_thread_cpumask_next(void *param_1,void *param_2,int param_3,int *param_4)
{
int iVar1;
int iVar2;
int iVar3;
bool bVar4;
if (param_3 == 0) {
memcpy(param_2,param_1,0x200);
return;
}
memset(param_2,0,0x200);
iVar1 = *param_4;
iVar2 = 0x200;
do {
bVar4 = iVar2 == 0;
iVar2 = iVar2 + -1;
if (bVar4) {
return;
}
iVar3 = iVar1 + -0x200;
if (iVar1 < 0x200) {
iVar3 = iVar1;
}
iVar1 = iVar1 + 1;
} while (*(char *)((long)param_1 + (long)iVar3) != '\x01');
*(int1 *)((long)param_2 + (long)iVar3) = 1;
*param_4 = iVar3 + 1;
return;
}
| |
29,875 | my_scan_mb2 | eloqsql/strings/ctype-ucs2.c | static size_t
my_scan_mb2(CHARSET_INFO *cs __attribute__((unused)),
const char *str, const char *end, int sequence_type)
{
const char *str0= str;
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
int res;
switch (sequence_type)
{
case MY_SEQ_SPACES:
for (res= mb_wc(cs, &wc, (const uchar *) str, (const uchar *) end);
res > 0 && wc == ' ';
str+= res,
res= mb_wc(cs, &wc, (const uchar *) str, (const uchar *) end))
{
}
return (size_t) (str - str0);
case MY_SEQ_NONSPACES:
DBUG_ASSERT(0); /* Not implemented */
/* pass through */
default:
return 0;
}
} | O3 | c | my_scan_mb2:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpl $0x2, %ecx
jne 0xc4778
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movq 0xb8(%rdi), %rax
movq 0x28(%rax), %rbx
leaq -0x38(%rbp), %rsi
movq %r12, %rdx
movq %r14, %rcx
callq *%rbx
movq %r12, -0x30(%rbp)
testl %eax, %eax
jle 0xc4772
cmpq $0x20, -0x38(%rbp)
movq -0x30(%rbp), %r12
jne 0xc4772
leaq -0x38(%rbp), %r13
movq -0x30(%rbp), %r12
movq %r12, %rcx
movl %eax, %r12d
addq %rcx, %r12
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq *%rbx
testl %eax, %eax
jle 0xc4772
cmpq $0x20, -0x38(%rbp)
je 0xc4750
subq -0x30(%rbp), %r12
jmp 0xc477b
xorl %r12d, %r12d
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_scan_mb2:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
cmp ecx, 2
jnz short loc_C4778
mov r14, rdx
mov r12, rsi
mov r15, rdi
mov rax, [rdi+0B8h]
mov rbx, [rax+28h]
lea rsi, [rbp+var_38]
mov rdx, r12
mov rcx, r14
call rbx
mov [rbp+var_30], r12
test eax, eax
jle short loc_C4772
cmp [rbp+var_38], 20h ; ' '
mov r12, [rbp+var_30]
jnz short loc_C4772
lea r13, [rbp+var_38]
mov r12, [rbp+var_30]
loc_C4750:
mov rcx, r12
mov r12d, eax
add r12, rcx
mov rdi, r15
mov rsi, r13
mov rdx, r12
mov rcx, r14
call rbx
test eax, eax
jle short loc_C4772
cmp [rbp+var_38], 20h ; ' '
jz short loc_C4750
loc_C4772:
sub r12, [rbp+var_30]
jmp short loc_C477B
loc_C4778:
xor r12d, r12d
loc_C477B:
mov rax, r12
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_scan_mb2(long long a1, long long a2, long long a3, int a4)
{
long long v5; // r12
long long ( *v6)(long long, long long *, long long, long long); // rbx
int v7; // eax
long long v10; // [rsp+8h] [rbp-38h] BYREF
long long v11; // [rsp+10h] [rbp-30h]
if ( a4 != 2 )
return 0LL;
v5 = a2;
v6 = *(long long ( **)(long long, long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL);
v7 = v6(a1, &v10, a2, a3);
v11 = a2;
if ( v7 > 0 )
{
v5 = v11;
if ( v10 == 32 )
{
v5 = v11;
do
{
v5 += (unsigned int)v7;
v7 = v6(a1, &v10, v5, a3);
}
while ( v7 > 0 && v10 == 32 );
}
}
return v5 - v11;
}
| my_scan_mb2:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
CMP ECX,0x2
JNZ 0x001c4778
MOV R14,RDX
MOV R12,RSI
MOV R15,RDI
MOV RAX,qword ptr [RDI + 0xb8]
MOV RBX,qword ptr [RAX + 0x28]
LEA RSI,[RBP + -0x38]
MOV RDX,R12
MOV RCX,R14
CALL RBX
MOV qword ptr [RBP + -0x30],R12
TEST EAX,EAX
JLE 0x001c4772
CMP qword ptr [RBP + -0x38],0x20
MOV R12,qword ptr [RBP + -0x30]
JNZ 0x001c4772
LEA R13,[RBP + -0x38]
MOV R12,qword ptr [RBP + -0x30]
LAB_001c4750:
MOV RCX,R12
MOV R12D,EAX
ADD R12,RCX
MOV RDI,R15
MOV RSI,R13
MOV RDX,R12
MOV RCX,R14
CALL RBX
TEST EAX,EAX
JLE 0x001c4772
CMP qword ptr [RBP + -0x38],0x20
JZ 0x001c4750
LAB_001c4772:
SUB R12,qword ptr [RBP + -0x30]
JMP 0x001c477b
LAB_001c4778:
XOR R12D,R12D
LAB_001c477b:
MOV RAX,R12
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_scan_mb2(long param_1,long param_2,int8 param_3,int param_4)
{
code *pcVar1;
uint uVar2;
long local_40;
long local_38;
if (param_4 == 2) {
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
uVar2 = (*pcVar1)(param_1,&local_40,param_2,param_3);
local_38 = param_2;
if ((0 < (int)uVar2) && (local_40 == 0x20)) {
do {
param_2 = (ulong)uVar2 + param_2;
uVar2 = (*pcVar1)(param_1,&local_40,param_2,param_3);
if ((int)uVar2 < 1) break;
} while (local_40 == 0x20);
}
param_2 = param_2 - local_38;
}
else {
param_2 = 0;
}
return param_2;
}
| |
29,876 | testing::internal::HasOneFailure(char const*, char const*, char const*, testing::TestPartResultArray const&, testing::TestPartResult::Type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc | static AssertionResult HasOneFailure(const char* /* results_expr */,
const char* /* type_expr */,
const char* /* substr_expr */,
const TestPartResultArray& results,
TestPartResult::Type type,
const std::string& substr) {
const std::string expected(type == TestPartResult::kFatalFailure
? "1 fatal failure"
: "1 non-fatal failure");
Message msg;
if (results.size() != 1) {
msg << "Expected: " << expected << "\n"
<< " Actual: " << results.size() << " failures";
for (int i = 0; i < results.size(); i++) {
msg << "\n" << results.GetTestPartResult(i);
}
return AssertionFailure() << msg;
}
const TestPartResult& r = results.GetTestPartResult(0);
if (r.type() != type) {
return AssertionFailure() << "Expected: " << expected << "\n"
<< " Actual:\n"
<< r;
}
if (strstr(r.message(), substr.c_str()) == nullptr) {
return AssertionFailure()
<< "Expected: " << expected << " containing \"" << substr << "\"\n"
<< " Actual:\n"
<< r;
}
return AssertionSuccess();
} | O0 | cpp | testing::internal::HasOneFailure(char const*, char const*, char const*, testing::TestPartResultArray const&, testing::TestPartResult::Type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0x198, %rsp # imm = 0x198
movq %rdi, 0xc0(%rsp)
movq %rdi, %rax
movq %rax, 0xc8(%rsp)
movq 0x1a0(%rsp), %rax
movq %rdi, 0x190(%rsp)
movq %rsi, 0x188(%rsp)
movq %rdx, 0x180(%rsp)
movq %rcx, 0x178(%rsp)
movq %r8, 0x170(%rsp)
movl %r9d, 0x16c(%rsp)
movl 0x16c(%rsp), %eax
subl $0x2, %eax
leaq 0x56540(%rip), %rcx # 0x11e523
leaq 0x56549(%rip), %rax # 0x11e533
cmoveq %rcx, %rax
movq %rax, 0xd0(%rsp)
leaq 0x147(%rsp), %rdi
movq %rdi, 0xd8(%rsp)
callq 0x16d00
movq 0xd0(%rsp), %rsi
movq 0xd8(%rsp), %rdx
leaq 0x148(%rsp), %rdi
callq 0x1dbb0
jmp 0xc802a
leaq 0x147(%rsp), %rdi
callq 0x16790
leaq 0x128(%rsp), %rdi
callq 0xc8d80
jmp 0xc8046
movq 0x170(%rsp), %rdi
callq 0xc3ec0
cmpl $0x1, %eax
je 0xc829a
leaq 0x550e6(%rip), %rsi # 0x11d149
leaq 0x128(%rsp), %rdi
callq 0xee580
movq %rax, 0xb8(%rsp)
jmp 0xc807a
movq 0xb8(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0x32aa0
movq %rax, 0xb0(%rsp)
jmp 0xc8099
movq 0xb0(%rsp), %rdi
leaq 0x557eb(%rip), %rsi # 0x11d893
callq 0xeb120
movq %rax, 0xa8(%rsp)
jmp 0xc80b7
movq 0xa8(%rsp), %rdi
leaq 0x55077(%rip), %rsi # 0x11d13d
callq 0xee580
movq %rax, 0xa0(%rsp)
jmp 0xc80d5
movq 0x170(%rsp), %rdi
callq 0xc3ec0
movq 0xa0(%rsp), %rdi
movl %eax, 0x124(%rsp)
leaq 0x124(%rsp), %rsi
callq 0xec470
movq %rax, 0x98(%rsp)
jmp 0xc8108
movq 0x98(%rsp), %rdi
leaq 0x56430(%rip), %rsi # 0x11e547
callq 0xec790
jmp 0xc811e
movl $0x0, 0x120(%rsp)
movl 0x120(%rsp), %eax
movl %eax, 0x94(%rsp)
movq 0x170(%rsp), %rdi
callq 0xc3ec0
movl %eax, %ecx
movl 0x94(%rsp), %eax
cmpl %ecx, %eax
jge 0xc8218
leaq 0x55737(%rip), %rsi # 0x11d893
leaq 0x128(%rsp), %rdi
callq 0xeb120
movq %rax, 0x88(%rsp)
jmp 0xc8173
movq 0x170(%rsp), %rdi
movl 0x120(%rsp), %esi
callq 0xc3e50
movq %rax, 0x80(%rsp)
jmp 0xc8191
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdi
callq 0xfad50
jmp 0xc81a8
jmp 0xc81aa
movl 0x120(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x120(%rsp)
jmp 0xc8129
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x138(%rsp)
movl %eax, 0x134(%rsp)
leaq 0x147(%rsp), %rdi
callq 0x16790
jmp 0xc855c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x138(%rsp)
movl %eax, 0x134(%rsp)
jmp 0xc854f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x138(%rsp)
movl %eax, 0x134(%rsp)
jmp 0xc8542
leaq 0x110(%rsp), %rdi
callq 0xb9150
jmp 0xc8227
leaq 0x110(%rsp), %rdi
leaq 0x128(%rsp), %rsi
callq 0xeae10
movq %rax, 0x78(%rsp)
jmp 0xc8243
movq 0x78(%rsp), %rsi
movq 0xc0(%rsp), %rdi
callq 0xb8f20
jmp 0xc8257
leaq 0x110(%rsp), %rdi
callq 0x1e090
movl $0x1, 0x10c(%rsp)
jmp 0xc8518
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x138(%rsp)
movl %eax, 0x134(%rsp)
leaq 0x110(%rsp), %rdi
callq 0x1e090
jmp 0xc8542
movq 0x170(%rsp), %rdi
xorl %esi, %esi
callq 0xc3e50
movq %rax, 0x70(%rsp)
jmp 0xc82b0
movq 0x70(%rsp), %rax
movq %rax, 0x100(%rsp)
movq 0x100(%rsp), %rdi
callq 0xecf10
cmpl 0x16c(%rsp), %eax
je 0xc83ba
leaq 0xf0(%rsp), %rdi
callq 0xb9150
jmp 0xc82e6
leaq 0x54e5c(%rip), %rsi # 0x11d149
leaq 0xf0(%rsp), %rdi
callq 0xfad90
movq %rax, 0x68(%rsp)
jmp 0xc8301
movq 0x68(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0x322e0
movq %rax, 0x60(%rsp)
jmp 0xc831a
movq 0x60(%rsp), %rdi
leaq 0x5556d(%rip), %rsi # 0x11d893
callq 0xeebb0
movq %rax, 0x58(%rsp)
jmp 0xc8332
movq 0x58(%rsp), %rdi
leaq 0x56213(%rip), %rsi # 0x11e551
callq 0xfad90
movq %rax, 0x50(%rsp)
jmp 0xc834a
movq 0x50(%rsp), %rdi
movq 0x100(%rsp), %rsi
callq 0xfae20
movq %rax, 0x48(%rsp)
jmp 0xc8363
movq 0x48(%rsp), %rsi
movq 0xc0(%rsp), %rdi
callq 0xb8f20
jmp 0xc8377
leaq 0xf0(%rsp), %rdi
callq 0x1e090
movl $0x1, 0x10c(%rsp)
jmp 0xc8518
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x138(%rsp)
movl %eax, 0x134(%rsp)
leaq 0xf0(%rsp), %rdi
callq 0x1e090
jmp 0xc8542
movq 0x100(%rsp), %rdi
callq 0xecf20
movq %rax, 0x40(%rsp)
movq 0x1a0(%rsp), %rdi
callq 0x1f1e0
movq 0x40(%rsp), %rdi
movq %rax, %rsi
callq 0x16110
cmpq $0x0, %rax
jne 0xc84fe
leaq 0xe0(%rsp), %rdi
callq 0xb9150
jmp 0xc83ff
leaq 0x54d43(%rip), %rsi # 0x11d149
leaq 0xe0(%rsp), %rdi
callq 0xfad90
movq %rax, 0x38(%rsp)
jmp 0xc841a
movq 0x38(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0x322e0
movq %rax, 0x30(%rsp)
jmp 0xc8433
movq 0x30(%rsp), %rdi
leaq 0x5611d(%rip), %rsi # 0x11e55c
callq 0xfaeb0
movq %rax, 0x28(%rsp)
jmp 0xc844b
movq 0x28(%rsp), %rdi
movq 0x1a0(%rsp), %rsi
callq 0x322e0
movq %rax, 0x20(%rsp)
jmp 0xc8464
movq 0x20(%rsp), %rdi
leaq 0x55845(%rip), %rsi # 0x11dcb5
callq 0x32250
movq %rax, 0x18(%rsp)
jmp 0xc847c
movq 0x18(%rsp), %rdi
leaq 0x560c9(%rip), %rsi # 0x11e551
callq 0xfad90
movq %rax, 0x10(%rsp)
jmp 0xc8494
movq 0x10(%rsp), %rdi
movq 0x100(%rsp), %rsi
callq 0xfae20
movq %rax, 0x8(%rsp)
jmp 0xc84ad
movq 0x8(%rsp), %rsi
movq 0xc0(%rsp), %rdi
callq 0xb8f20
jmp 0xc84c1
leaq 0xe0(%rsp), %rdi
callq 0x1e090
movl $0x1, 0x10c(%rsp)
jmp 0xc8518
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x138(%rsp)
movl %eax, 0x134(%rsp)
leaq 0xe0(%rsp), %rdi
callq 0x1e090
jmp 0xc8542
movq 0xc0(%rsp), %rdi
callq 0xb9120
jmp 0xc850d
movl $0x1, 0x10c(%rsp)
leaq 0x128(%rsp), %rdi
callq 0x1e080
leaq 0x148(%rsp), %rdi
callq 0x1dfd0
movq 0xc8(%rsp), %rax
addq $0x198, %rsp # imm = 0x198
retq
leaq 0x128(%rsp), %rdi
callq 0x1e080
leaq 0x148(%rsp), %rdi
callq 0x1dfd0
movq 0x138(%rsp), %rdi
callq 0x16cf0
nopl (%rax)
| _ZN7testing8internalL13HasOneFailureEPKcS2_S2_RKNS_19TestPartResultArrayENS_14TestPartResult4TypeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 198h
mov [rsp+198h+var_D8], rdi
mov rax, rdi
mov [rsp+198h+var_D0], rax
mov rax, [rsp+198h+arg_0]
mov [rsp+198h+var_8], rdi
mov [rsp+198h+var_10], rsi
mov [rsp+198h+var_18], rdx
mov [rsp+198h+var_20], rcx
mov [rsp+198h+var_28], r8
mov [rsp+198h+var_2C], r9d
mov eax, [rsp+198h+var_2C]
sub eax, 2
lea rcx, a1FatalFailure; "1 fatal failure"
lea rax, a1NonFatalFailu; "1 non-fatal failure"
cmovz rax, rcx
mov [rsp+198h+var_C8], rax
lea rdi, [rsp+198h+var_51]
mov [rsp+198h+var_C0], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, [rsp+198h+var_C8]
mov rdx, [rsp+198h+var_C0]
lea rdi, [rsp+198h+var_50]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_C802A:
lea rdi, [rsp+198h+var_51]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rdi, [rsp+198h+var_70]; this
call _ZN7testing7MessageC2Ev; testing::Message::Message(void)
jmp short $+2
loc_C8046:
mov rdi, [rsp+198h+var_28]; this
call _ZNK7testing19TestPartResultArray4sizeEv; testing::TestPartResultArray::size(void)
cmp eax, 1
jz loc_C829A
lea rsi, aExpected_1+1; "Expected: "
lea rdi, [rsp+198h+var_70]
call _ZN7testing7MessagelsIA11_cEERS0_RKT_; testing::Message::operator<<<char [11]>(char [11] const&)
mov [rsp+198h+var_E0], rax
jmp short $+2
loc_C807A:
mov rdi, [rsp+198h+var_E0]
lea rsi, [rsp+198h+var_50]
call _ZN7testing7MessagelsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERS0_RKT_; testing::Message::operator<<<std::string>(std::string const&)
mov [rsp+198h+var_E8], rax
jmp short $+2
loc_C8099:
mov rdi, [rsp+198h+var_E8]
lea rsi, aSFromSSMsTotal+19h; "\n"
call _ZN7testing7MessagelsIA2_cEERS0_RKT_; testing::Message::operator<<<char [2]>(char [2] const&)
mov [rsp+198h+var_F0], rax
jmp short $+2
loc_C80B7:
mov rdi, [rsp+198h+var_F0]
lea rsi, aActual_0+1; " Actual: "
call _ZN7testing7MessagelsIA11_cEERS0_RKT_; testing::Message::operator<<<char [11]>(char [11] const&)
mov [rsp+198h+var_F8], rax
jmp short $+2
loc_C80D5:
mov rdi, [rsp+198h+var_28]; this
call _ZNK7testing19TestPartResultArray4sizeEv; testing::TestPartResultArray::size(void)
mov rdi, [rsp+198h+var_F8]
mov [rsp+198h+var_74], eax
lea rsi, [rsp+198h+var_74]
call _ZN7testing7MessagelsIiEERS0_RKT_; testing::Message::operator<<<int>(int const&)
mov [rsp+198h+var_100], rax
jmp short $+2
loc_C8108:
mov rdi, [rsp+198h+var_100]
lea rsi, aFailures; " failures"
call _ZN7testing7MessagelsIA10_cEERS0_RKT_; testing::Message::operator<<<char [10]>(char [10] const&)
jmp short $+2
loc_C811E:
mov [rsp+198h+var_78], 0
loc_C8129:
mov eax, [rsp+198h+var_78]
mov [rsp+198h+var_104], eax
mov rdi, [rsp+198h+var_28]; this
call _ZNK7testing19TestPartResultArray4sizeEv; testing::TestPartResultArray::size(void)
mov ecx, eax
mov eax, [rsp+198h+var_104]
cmp eax, ecx
jge loc_C8218
lea rsi, aSFromSSMsTotal+19h; "\n"
lea rdi, [rsp+198h+var_70]
call _ZN7testing7MessagelsIA2_cEERS0_RKT_; testing::Message::operator<<<char [2]>(char [2] const&)
mov [rsp+198h+var_110], rax
jmp short $+2
loc_C8173:
mov rdi, [rsp+198h+var_28]; this
mov esi, [rsp+198h+var_78]; int
call _ZNK7testing19TestPartResultArray17GetTestPartResultEi; testing::TestPartResultArray::GetTestPartResult(int)
mov [rsp+198h+var_118], rax
jmp short $+2
loc_C8191:
mov rsi, [rsp+198h+var_118]
mov rdi, [rsp+198h+var_110]
call _ZN7testing7MessagelsINS_14TestPartResultEEERS0_RKT_; testing::Message::operator<<<testing::TestPartResult>(testing::TestPartResult const&)
jmp short $+2
loc_C81A8:
jmp short $+2
loc_C81AA:
mov eax, [rsp+198h+var_78]
add eax, 1
mov [rsp+198h+var_78], eax
jmp loc_C8129
mov rcx, rax
mov eax, edx
mov [rsp+arg_130], rcx
mov [rsp+arg_12C], eax
lea rdi, [rsp+arg_13F]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_C855C
mov rcx, rax
mov eax, edx
mov [rsp+arg_130], rcx
mov [rsp+arg_12C], eax
jmp loc_C854F
mov rcx, rax
mov eax, edx
mov [rsp+arg_130], rcx
mov [rsp+arg_12C], eax
jmp loc_C8542
loc_C8218:
lea rdi, [rsp+198h+var_88]; this
call _ZN7testing16AssertionFailureEv; testing::AssertionFailure(void)
jmp short $+2
loc_C8227:
lea rdi, [rsp+198h+var_88]
lea rsi, [rsp+198h+var_70]
call _ZN7testing15AssertionResultlsINS_7MessageEEERS0_RKT_; testing::AssertionResult::operator<<<testing::Message>(testing::Message const&)
mov [rsp+198h+var_120], rax
jmp short $+2
loc_C8243:
mov rsi, [rsp+198h+var_120]; testing::AssertionResult *
mov rdi, [rsp+198h+var_D8]; this
call _ZN7testing15AssertionResultC2ERKS0_; testing::AssertionResult::AssertionResult(testing::AssertionResult const&)
jmp short $+2
loc_C8257:
lea rdi, [rsp+198h+var_88]; this
call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult()
mov [rsp+198h+var_8C], 1
jmp loc_C8518
mov rcx, rax
mov eax, edx
mov [rsp+arg_130], rcx
mov [rsp+arg_12C], eax
lea rdi, [rsp+arg_108]; this
call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult()
jmp loc_C8542
loc_C829A:
mov rdi, [rsp+198h+var_28]; this
xor esi, esi; int
call _ZNK7testing19TestPartResultArray17GetTestPartResultEi; testing::TestPartResultArray::GetTestPartResult(int)
mov [rsp+198h+var_128], rax
jmp short $+2
loc_C82B0:
mov rax, [rsp+198h+var_128]
mov [rsp+198h+var_98], rax
mov rdi, [rsp+198h+var_98]; this
call _ZNK7testing14TestPartResult4typeEv; testing::TestPartResult::type(void)
cmp eax, [rsp+198h+var_2C]
jz loc_C83BA
lea rdi, [rsp+198h+var_A8]; this
call _ZN7testing16AssertionFailureEv; testing::AssertionFailure(void)
jmp short $+2
loc_C82E6:
lea rsi, aExpected_1+1; "Expected: "
lea rdi, [rsp+198h+var_A8]
call _ZN7testing15AssertionResultlsIA11_cEERS0_RKT_; testing::AssertionResult::operator<<<char [11]>(char [11] const&)
mov [rsp+198h+var_130], rax
jmp short $+2
loc_C8301:
mov rdi, [rsp+198h+var_130]
lea rsi, [rsp+198h+var_50]
call _ZN7testing15AssertionResultlsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERS0_RKT_; testing::AssertionResult::operator<<<std::string>(std::string const&)
mov [rsp+198h+var_138], rax
jmp short $+2
loc_C831A:
mov rdi, [rsp+198h+var_138]
lea rsi, aSFromSSMsTotal+19h; "\n"
call _ZN7testing15AssertionResultlsIA2_cEERS0_RKT_; testing::AssertionResult::operator<<<char [2]>(char [2] const&)
mov [rsp+198h+var_140], rax
jmp short $+2
loc_C8332:
mov rdi, [rsp+198h+var_140]
lea rsi, aActual_1; " Actual:\n"
call _ZN7testing15AssertionResultlsIA11_cEERS0_RKT_; testing::AssertionResult::operator<<<char [11]>(char [11] const&)
mov [rsp+198h+var_148], rax
jmp short $+2
loc_C834A:
mov rdi, [rsp+198h+var_148]
mov rsi, [rsp+198h+var_98]
call _ZN7testing15AssertionResultlsINS_14TestPartResultEEERS0_RKT_; testing::AssertionResult::operator<<<testing::TestPartResult>(testing::TestPartResult const&)
mov [rsp+198h+var_150], rax
jmp short $+2
loc_C8363:
mov rsi, [rsp+198h+var_150]; testing::AssertionResult *
mov rdi, [rsp+198h+var_D8]; this
call _ZN7testing15AssertionResultC2ERKS0_; testing::AssertionResult::AssertionResult(testing::AssertionResult const&)
jmp short $+2
loc_C8377:
lea rdi, [rsp+198h+var_A8]; this
call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult()
mov [rsp+198h+var_8C], 1
jmp loc_C8518
mov rcx, rax
mov eax, edx
mov [rsp+arg_130], rcx
mov [rsp+arg_12C], eax
lea rdi, [rsp+arg_E8]; this
call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult()
jmp loc_C8542
loc_C83BA:
mov rdi, [rsp+198h+var_98]; this
call _ZNK7testing14TestPartResult7messageEv; testing::TestPartResult::message(void)
mov [rsp+198h+var_158], rax
mov rdi, [rsp+198h+arg_0]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdi, [rsp+198h+var_158]
mov rsi, rax
call _strstr
cmp rax, 0
jnz loc_C84FE
lea rdi, [rsp+198h+var_B8]; this
call _ZN7testing16AssertionFailureEv; testing::AssertionFailure(void)
jmp short $+2
loc_C83FF:
lea rsi, aExpected_1+1; "Expected: "
lea rdi, [rsp+198h+var_B8]
call _ZN7testing15AssertionResultlsIA11_cEERS0_RKT_; testing::AssertionResult::operator<<<char [11]>(char [11] const&)
mov [rsp+198h+var_160], rax
jmp short $+2
loc_C841A:
mov rdi, [rsp+198h+var_160]
lea rsi, [rsp+198h+var_50]
call _ZN7testing15AssertionResultlsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERS0_RKT_; testing::AssertionResult::operator<<<std::string>(std::string const&)
mov [rsp+198h+var_168], rax
jmp short $+2
loc_C8433:
mov rdi, [rsp+198h+var_168]
lea rsi, aContaining; " containing \""
call _ZN7testing15AssertionResultlsIA14_cEERS0_RKT_; testing::AssertionResult::operator<<<char [14]>(char [14] const&)
mov [rsp+198h+var_170], rax
jmp short $+2
loc_C844B:
mov rdi, [rsp+198h+var_170]
mov rsi, [rsp+198h+arg_0]
call _ZN7testing15AssertionResultlsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERS0_RKT_; testing::AssertionResult::operator<<<std::string>(std::string const&)
mov [rsp+198h+var_178], rax
jmp short $+2
loc_C8464:
mov rdi, [rsp+198h+var_178]
lea rsi, aType_1+0Dh; "\"\n"
call _ZN7testing15AssertionResultlsIA3_cEERS0_RKT_; testing::AssertionResult::operator<<<char [3]>(char [3] const&)
mov [rsp+198h+var_180], rax
jmp short $+2
loc_C847C:
mov rdi, [rsp+198h+var_180]
lea rsi, aActual_1; " Actual:\n"
call _ZN7testing15AssertionResultlsIA11_cEERS0_RKT_; testing::AssertionResult::operator<<<char [11]>(char [11] const&)
mov [rsp+198h+var_188], rax
jmp short $+2
loc_C8494:
mov rdi, [rsp+198h+var_188]
mov rsi, [rsp+198h+var_98]
call _ZN7testing15AssertionResultlsINS_14TestPartResultEEERS0_RKT_; testing::AssertionResult::operator<<<testing::TestPartResult>(testing::TestPartResult const&)
mov [rsp+198h+var_190], rax
jmp short $+2
loc_C84AD:
mov rsi, [rsp+198h+var_190]; testing::AssertionResult *
mov rdi, [rsp+198h+var_D8]; this
call _ZN7testing15AssertionResultC2ERKS0_; testing::AssertionResult::AssertionResult(testing::AssertionResult const&)
jmp short $+2
loc_C84C1:
lea rdi, [rsp+198h+var_B8]; this
call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult()
mov [rsp+198h+var_8C], 1
jmp short loc_C8518
mov rcx, rax
mov eax, edx
mov [rsp+arg_130], rcx
mov [rsp+arg_12C], eax
lea rdi, [rsp+arg_D8]; this
call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult()
jmp short loc_C8542
loc_C84FE:
mov rdi, [rsp+198h+var_D8]; this
call _ZN7testing16AssertionSuccessEv; testing::AssertionSuccess(void)
jmp short $+2
loc_C850D:
mov [rsp+198h+var_8C], 1
loc_C8518:
lea rdi, [rsp+198h+var_70]; this
call _ZN7testing7MessageD2Ev; testing::Message::~Message()
lea rdi, [rsp+198h+var_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, [rsp+198h+var_D0]
add rsp, 198h
retn
loc_C8542:
lea rdi, [rsp+arg_120]; this
call _ZN7testing7MessageD2Ev; testing::Message::~Message()
loc_C854F:
lea rdi, [rsp+arg_140]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_C855C:
mov rdi, [rsp+arg_130]
call __Unwind_Resume
| testing * testing::internal::HasOneFailure(
testing *a1,
long long a2,
long long a3,
long long a4,
testing::TestPartResultArray *a5,
int a6,
long long a7)
{
const char *v7; // rax
int v8; // edx
int v9; // ecx
int v10; // r8d
int v11; // r9d
int v12; // eax
int v13; // edx
int v14; // ecx
int v15; // r8d
int v16; // r9d
int v17; // edx
int v18; // ecx
int v19; // r8d
int v20; // r9d
int v21; // edx
int v22; // ecx
int v23; // r8d
int v24; // r9d
int v25; // edx
int v26; // ecx
int v27; // r8d
int v28; // r9d
long long v29; // rax
int v30; // edx
int v31; // ecx
int v32; // r8d
int v33; // r9d
int v34; // edx
int v35; // ecx
int v36; // r8d
int v37; // r9d
int v38; // edx
int v39; // ecx
int v40; // r8d
int v41; // r9d
int v42; // edx
int v43; // ecx
int v44; // r8d
int v45; // r9d
testing::AssertionResult *v47; // [rsp+8h] [rbp-190h]
int v48; // [rsp+10h] [rbp-188h]
unsigned int v49; // [rsp+18h] [rbp-180h]
testing::AssertionResult *v50; // [rsp+20h] [rbp-178h]
testing::AssertionResult *v51; // [rsp+28h] [rbp-170h]
unsigned int v52; // [rsp+30h] [rbp-168h]
testing::AssertionResult *v53; // [rsp+38h] [rbp-160h]
long long v54; // [rsp+40h] [rbp-158h]
testing::AssertionResult *v55; // [rsp+48h] [rbp-150h]
int v56; // [rsp+50h] [rbp-148h]
int v57; // [rsp+58h] [rbp-140h]
unsigned int v58; // [rsp+60h] [rbp-138h]
testing::AssertionResult *v59; // [rsp+68h] [rbp-130h]
testing::AssertionResult *v60; // [rsp+78h] [rbp-120h]
long long v61; // [rsp+80h] [rbp-118h]
long long v62; // [rsp+88h] [rbp-110h]
long long v63; // [rsp+98h] [rbp-100h]
long long v64; // [rsp+A0h] [rbp-F8h]
long long v65; // [rsp+A8h] [rbp-F0h]
long long v66; // [rsp+B0h] [rbp-E8h]
long long v67; // [rsp+B8h] [rbp-E0h]
const char *v68; // [rsp+D0h] [rbp-C8h]
_BYTE v69[16]; // [rsp+E0h] [rbp-B8h] BYREF
_BYTE v70[16]; // [rsp+F0h] [rbp-A8h] BYREF
testing::TestPartResult *TestPartResult; // [rsp+100h] [rbp-98h]
int v72; // [rsp+10Ch] [rbp-8Ch]
_BYTE v73[16]; // [rsp+110h] [rbp-88h] BYREF
int i; // [rsp+120h] [rbp-78h]
int v75; // [rsp+124h] [rbp-74h] BYREF
_BYTE v76[31]; // [rsp+128h] [rbp-70h] BYREF
char v77; // [rsp+147h] [rbp-51h] BYREF
_BYTE v78[36]; // [rsp+148h] [rbp-50h] BYREF
int v79; // [rsp+16Ch] [rbp-2Ch]
testing::TestPartResultArray *v80; // [rsp+170h] [rbp-28h]
long long v81; // [rsp+178h] [rbp-20h]
long long v82; // [rsp+180h] [rbp-18h]
long long v83; // [rsp+188h] [rbp-10h]
testing *v84; // [rsp+190h] [rbp-8h]
v84 = a1;
v83 = a2;
v82 = a3;
v81 = a4;
v80 = a5;
v79 = a6;
v7 = "1 non-fatal failure";
if ( a6 == 2 )
v7 = "1 fatal failure";
v68 = v7;
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>((long long)v78, (long long)v68, (long long)&v77);
std::allocator<char>::~allocator(&v77, v68);
testing::Message::Message((testing::Message *)v76);
if ( (unsigned int)testing::TestPartResultArray::size(v80) == 1 )
{
TestPartResult = (testing::TestPartResult *)testing::TestPartResultArray::GetTestPartResult(v80, 0);
v12 = testing::TestPartResult::type(TestPartResult);
if ( v12 == v79 )
{
v54 = testing::TestPartResult::message(TestPartResult);
v29 = std::string::c_str(a7);
if ( strstr(v54, v29) )
{
testing::AssertionSuccess(a1);
}
else
{
testing::AssertionFailure((testing *)v69);
v53 = (testing::AssertionResult *)testing::AssertionResult::operator<<<char [11]>(
(unsigned int)v69,
(unsigned int)"Expected: ",
v30,
v31,
v32,
v33);
v52 = (unsigned int)testing::AssertionResult::operator<<<std::string>(v53, (long long)v78);
v51 = (testing::AssertionResult *)testing::AssertionResult::operator<<<char [14]>(
v52,
(unsigned int)" containing \"",
v34,
v35,
v36,
v37);
v50 = testing::AssertionResult::operator<<<std::string>(v51, a7);
v49 = (unsigned int)testing::AssertionResult::operator<<<char [3]>(v50, (long long)"\"\n");
v48 = testing::AssertionResult::operator<<<char [11]>(v49, (unsigned int)" Actual:\n", v38, v39, v40, v41);
v47 = (testing::AssertionResult *)testing::AssertionResult::operator<<<testing::TestPartResult>(
v48,
(_DWORD)TestPartResult,
v42,
v43,
v44,
v45);
testing::AssertionResult::AssertionResult(a1, v47);
testing::AssertionResult::~AssertionResult((testing::AssertionResult *)v69);
}
v72 = 1;
}
else
{
testing::AssertionFailure((testing *)v70);
v59 = (testing::AssertionResult *)testing::AssertionResult::operator<<<char [11]>(
(unsigned int)v70,
(unsigned int)"Expected: ",
v13,
v14,
v15,
v16);
v58 = (unsigned int)testing::AssertionResult::operator<<<std::string>(v59, (long long)v78);
v57 = testing::AssertionResult::operator<<<char [2]>(v58, (unsigned int)"\n", v17, v18, v19, v20);
v56 = testing::AssertionResult::operator<<<char [11]>(v57, (unsigned int)" Actual:\n", v21, v22, v23, v24);
v55 = (testing::AssertionResult *)testing::AssertionResult::operator<<<testing::TestPartResult>(
v56,
(_DWORD)TestPartResult,
v25,
v26,
v27,
v28);
testing::AssertionResult::AssertionResult(a1, v55);
testing::AssertionResult::~AssertionResult((testing::AssertionResult *)v70);
v72 = 1;
}
}
else
{
v67 = testing::Message::operator<<<char [11]>(v76, "Expected: ");
v66 = testing::Message::operator<<<std::string>(v67, (long long)v78);
v65 = testing::Message::operator<<<char [2]>(v66, "\n");
v64 = testing::Message::operator<<<char [11]>(v65, " Actual: ");
v75 = testing::TestPartResultArray::size(v80);
v63 = testing::Message::operator<<<int>(v64, &v75);
testing::Message::operator<<<char [10]>(v63, " failures");
for ( i = 0; i < (int)testing::TestPartResultArray::size(v80); ++i )
{
v62 = testing::Message::operator<<<char [2]>(v76, "\n");
v61 = testing::TestPartResultArray::GetTestPartResult(v80, i);
testing::Message::operator<<<testing::TestPartResult>(v62, v61);
}
testing::AssertionFailure((testing *)v73);
v60 = (testing::AssertionResult *)testing::AssertionResult::operator<<<testing::Message>(
(unsigned int)v73,
(unsigned int)v76,
v8,
v9,
v10,
v11);
testing::AssertionResult::AssertionResult(a1, v60);
testing::AssertionResult::~AssertionResult((testing::AssertionResult *)v73);
v72 = 1;
}
testing::Message::~Message((testing::Message *)v76);
std::string::~string(v78);
return a1;
}
| HasOneFailure:
SUB RSP,0x198
MOV qword ptr [RSP + 0xc0],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0xc8],RAX
MOV RAX,qword ptr [RSP + 0x1a0]
MOV qword ptr [RSP + 0x190],RDI
MOV qword ptr [RSP + 0x188],RSI
MOV qword ptr [RSP + 0x180],RDX
MOV qword ptr [RSP + 0x178],RCX
MOV qword ptr [RSP + 0x170],R8
MOV dword ptr [RSP + 0x16c],R9D
MOV EAX,dword ptr [RSP + 0x16c]
SUB EAX,0x2
LEA RCX,[0x21e523]
LEA RAX,[0x21e533]
CMOVZ RAX,RCX
MOV qword ptr [RSP + 0xd0],RAX
LEA RDI,[RSP + 0x147]
MOV qword ptr [RSP + 0xd8],RDI
CALL 0x00116d00
MOV RSI,qword ptr [RSP + 0xd0]
MOV RDX,qword ptr [RSP + 0xd8]
LAB_001c801b:
LEA RDI,[RSP + 0x148]
CALL 0x0011dbb0
JMP 0x001c802a
LAB_001c802a:
LEA RDI,[RSP + 0x147]
CALL 0x00116790
LAB_001c8037:
LEA RDI,[RSP + 0x128]
CALL 0x001c8d80
JMP 0x001c8046
LAB_001c8046:
MOV RDI,qword ptr [RSP + 0x170]
CALL 0x001c3ec0
CMP EAX,0x1
JZ 0x001c829a
LAB_001c805c:
LEA RSI,[0x21d149]
LEA RDI,[RSP + 0x128]
CALL 0x001ee580
MOV qword ptr [RSP + 0xb8],RAX
JMP 0x001c807a
LAB_001c807a:
MOV RDI,qword ptr [RSP + 0xb8]
LEA RSI,[RSP + 0x148]
CALL 0x00132aa0
MOV qword ptr [RSP + 0xb0],RAX
JMP 0x001c8099
LAB_001c8099:
MOV RDI,qword ptr [RSP + 0xb0]
LEA RSI,[0x21d893]
CALL 0x001eb120
MOV qword ptr [RSP + 0xa8],RAX
JMP 0x001c80b7
LAB_001c80b7:
MOV RDI,qword ptr [RSP + 0xa8]
LEA RSI,[0x21d13d]
CALL 0x001ee580
MOV qword ptr [RSP + 0xa0],RAX
JMP 0x001c80d5
LAB_001c80d5:
MOV RDI,qword ptr [RSP + 0x170]
CALL 0x001c3ec0
MOV RDI,qword ptr [RSP + 0xa0]
MOV dword ptr [RSP + 0x124],EAX
LEA RSI,[RSP + 0x124]
CALL 0x001ec470
MOV qword ptr [RSP + 0x98],RAX
JMP 0x001c8108
LAB_001c8108:
MOV RDI,qword ptr [RSP + 0x98]
LEA RSI,[0x21e547]
CALL 0x001ec790
JMP 0x001c811e
LAB_001c811e:
MOV dword ptr [RSP + 0x120],0x0
LAB_001c8129:
MOV EAX,dword ptr [RSP + 0x120]
MOV dword ptr [RSP + 0x94],EAX
MOV RDI,qword ptr [RSP + 0x170]
CALL 0x001c3ec0
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0x94]
CMP EAX,ECX
JGE 0x001c8218
LEA RSI,[0x21d893]
LEA RDI,[RSP + 0x128]
CALL 0x001eb120
MOV qword ptr [RSP + 0x88],RAX
JMP 0x001c8173
LAB_001c8173:
MOV RDI,qword ptr [RSP + 0x170]
MOV ESI,dword ptr [RSP + 0x120]
CALL 0x001c3e50
MOV qword ptr [RSP + 0x80],RAX
JMP 0x001c8191
LAB_001c8191:
MOV RSI,qword ptr [RSP + 0x80]
MOV RDI,qword ptr [RSP + 0x88]
CALL 0x001fad50
JMP 0x001c81a8
LAB_001c81a8:
JMP 0x001c81aa
LAB_001c81aa:
MOV EAX,dword ptr [RSP + 0x120]
ADD EAX,0x1
MOV dword ptr [RSP + 0x120],EAX
JMP 0x001c8129
LAB_001c8218:
LEA RDI,[RSP + 0x110]
CALL 0x001b9150
JMP 0x001c8227
LAB_001c8227:
LEA RDI,[RSP + 0x110]
LEA RSI,[RSP + 0x128]
CALL 0x001eae10
MOV qword ptr [RSP + 0x78],RAX
JMP 0x001c8243
LAB_001c8243:
MOV RSI,qword ptr [RSP + 0x78]
MOV RDI,qword ptr [RSP + 0xc0]
CALL 0x001b8f20
JMP 0x001c8257
LAB_001c8257:
LEA RDI,[RSP + 0x110]
CALL 0x0011e090
MOV dword ptr [RSP + 0x10c],0x1
JMP 0x001c8518
LAB_001c829a:
MOV RDI,qword ptr [RSP + 0x170]
LAB_001c82a2:
XOR ESI,ESI
CALL 0x001c3e50
MOV qword ptr [RSP + 0x70],RAX
JMP 0x001c82b0
LAB_001c82b0:
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x100],RAX
MOV RDI,qword ptr [RSP + 0x100]
CALL 0x001ecf10
CMP EAX,dword ptr [RSP + 0x16c]
JZ 0x001c83ba
LEA RDI,[RSP + 0xf0]
CALL 0x001b9150
JMP 0x001c82e6
LAB_001c82e6:
LEA RSI,[0x21d149]
LEA RDI,[RSP + 0xf0]
CALL 0x001fad90
MOV qword ptr [RSP + 0x68],RAX
JMP 0x001c8301
LAB_001c8301:
MOV RDI,qword ptr [RSP + 0x68]
LEA RSI,[RSP + 0x148]
CALL 0x001322e0
MOV qword ptr [RSP + 0x60],RAX
JMP 0x001c831a
LAB_001c831a:
MOV RDI,qword ptr [RSP + 0x60]
LEA RSI,[0x21d893]
CALL 0x001eebb0
MOV qword ptr [RSP + 0x58],RAX
JMP 0x001c8332
LAB_001c8332:
MOV RDI,qword ptr [RSP + 0x58]
LEA RSI,[0x21e551]
CALL 0x001fad90
MOV qword ptr [RSP + 0x50],RAX
JMP 0x001c834a
LAB_001c834a:
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x100]
CALL 0x001fae20
MOV qword ptr [RSP + 0x48],RAX
JMP 0x001c8363
LAB_001c8363:
MOV RSI,qword ptr [RSP + 0x48]
MOV RDI,qword ptr [RSP + 0xc0]
CALL 0x001b8f20
JMP 0x001c8377
LAB_001c8377:
LEA RDI,[RSP + 0xf0]
CALL 0x0011e090
MOV dword ptr [RSP + 0x10c],0x1
JMP 0x001c8518
LAB_001c83ba:
MOV RDI,qword ptr [RSP + 0x100]
CALL 0x001ecf20
MOV qword ptr [RSP + 0x40],RAX
MOV RDI,qword ptr [RSP + 0x1a0]
CALL 0x0011f1e0
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,RAX
CALL 0x00116110
CMP RAX,0x0
JNZ 0x001c84fe
LAB_001c83f0:
LEA RDI,[RSP + 0xe0]
CALL 0x001b9150
JMP 0x001c83ff
LAB_001c83ff:
LEA RSI,[0x21d149]
LEA RDI,[RSP + 0xe0]
CALL 0x001fad90
MOV qword ptr [RSP + 0x38],RAX
JMP 0x001c841a
LAB_001c841a:
MOV RDI,qword ptr [RSP + 0x38]
LEA RSI,[RSP + 0x148]
CALL 0x001322e0
MOV qword ptr [RSP + 0x30],RAX
JMP 0x001c8433
LAB_001c8433:
MOV RDI,qword ptr [RSP + 0x30]
LEA RSI,[0x21e55c]
CALL 0x001faeb0
MOV qword ptr [RSP + 0x28],RAX
JMP 0x001c844b
LAB_001c844b:
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x1a0]
CALL 0x001322e0
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001c8464
LAB_001c8464:
MOV RDI,qword ptr [RSP + 0x20]
LEA RSI,[0x21dcb5]
CALL 0x00132250
MOV qword ptr [RSP + 0x18],RAX
JMP 0x001c847c
LAB_001c847c:
MOV RDI,qword ptr [RSP + 0x18]
LEA RSI,[0x21e551]
CALL 0x001fad90
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001c8494
LAB_001c8494:
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x100]
CALL 0x001fae20
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001c84ad
LAB_001c84ad:
MOV RSI,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RSP + 0xc0]
CALL 0x001b8f20
JMP 0x001c84c1
LAB_001c84c1:
LEA RDI,[RSP + 0xe0]
CALL 0x0011e090
MOV dword ptr [RSP + 0x10c],0x1
JMP 0x001c8518
LAB_001c84fe:
MOV RDI,qword ptr [RSP + 0xc0]
CALL 0x001b9120
LAB_001c850b:
JMP 0x001c850d
LAB_001c850d:
MOV dword ptr [RSP + 0x10c],0x1
LAB_001c8518:
LEA RDI,[RSP + 0x128]
CALL 0x0011e080
LEA RDI,[RSP + 0x148]
CALL 0x0011dfd0
MOV RAX,qword ptr [RSP + 0xc8]
ADD RSP,0x198
RET
|
/* testing::internal::HasOneFailure(char const*, char const*, char const*,
testing::TestPartResultArray const&, testing::TestPartResult::Type, std::__cxx11::string const&)
*/
internal * __thiscall
testing::internal::HasOneFailure
(internal *this,int8 param_1,int8 param_2,int8 param_3,
TestPartResultArray *param_4,int param_6,string *param_7)
{
int iVar1;
int iVar2;
char *pcVar3;
Message *pMVar4;
TestPartResult *pTVar5;
AssertionResult *pAVar6;
char *__needle;
testing local_b8 [16];
testing local_a8 [16];
TestPartResult *local_98;
int4 local_8c;
testing local_88 [16];
int local_78;
int local_74;
Message local_70 [31];
allocator local_51;
string local_50 [36];
int local_2c;
TestPartResultArray *local_28;
int8 local_20;
int8 local_18;
int8 local_10;
internal *local_8;
pcVar3 = "1 non-fatal failure";
if (param_6 == 2) {
pcVar3 = "1 fatal failure";
}
local_2c = param_6;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
local_8 = this;
std::allocator<char>::allocator();
/* try { // try from 001c801b to 001c8027 has its CatchHandler @ 001c81c0 */
std::__cxx11::string::string<std::allocator<char>>(local_50,pcVar3,&local_51);
std::allocator<char>::~allocator((allocator<char> *)&local_51);
/* try { // try from 001c8037 to 001c8043 has its CatchHandler @ 001c81e6 */
Message::Message(local_70);
iVar1 = TestPartResultArray::size(local_28);
if (iVar1 == 1) {
/* try { // try from 001c82a2 to 001c82e3 has its CatchHandler @ 001c81ff */
local_98 = (TestPartResult *)TestPartResultArray::GetTestPartResult(local_28,0);
iVar1 = TestPartResult::type(local_98);
if (iVar1 == local_2c) {
pcVar3 = (char *)TestPartResult::message(local_98);
__needle = (char *)std::__cxx11::string::c_str(param_7);
pcVar3 = strstr(pcVar3,__needle);
if (pcVar3 == (char *)0x0) {
/* try { // try from 001c83f0 to 001c83fc has its CatchHandler @ 001c81ff */
AssertionFailure(local_b8);
/* try { // try from 001c83ff to 001c84be has its CatchHandler @ 001c84db */
pAVar6 = AssertionResult::operator<<((AssertionResult *)local_b8,"Expected: ");
pAVar6 = AssertionResult::operator<<(pAVar6,local_50);
pAVar6 = AssertionResult::operator<<(pAVar6," containing \"");
pAVar6 = AssertionResult::operator<<(pAVar6,param_7);
pAVar6 = AssertionResult::operator<<(pAVar6,"\"\n");
pAVar6 = AssertionResult::operator<<(pAVar6," Actual:\n");
pAVar6 = AssertionResult::operator<<(pAVar6,local_98);
AssertionResult::AssertionResult((AssertionResult *)this,pAVar6);
AssertionResult::~AssertionResult((AssertionResult *)local_b8);
}
else {
/* try { // try from 001c84fe to 001c850a has its CatchHandler @ 001c81ff */
AssertionSuccess((testing *)this);
}
}
else {
AssertionFailure(local_a8);
/* try { // try from 001c82e6 to 001c8374 has its CatchHandler @ 001c8394 */
pAVar6 = AssertionResult::operator<<((AssertionResult *)local_a8,"Expected: ");
pAVar6 = AssertionResult::operator<<(pAVar6,local_50);
pAVar6 = AssertionResult::operator<<(pAVar6,"\n");
pAVar6 = AssertionResult::operator<<(pAVar6," Actual:\n");
pAVar6 = AssertionResult::operator<<(pAVar6,local_98);
AssertionResult::AssertionResult((AssertionResult *)this,pAVar6);
AssertionResult::~AssertionResult((AssertionResult *)local_a8);
}
}
else {
/* try { // try from 001c805c to 001c8224 has its CatchHandler @ 001c81ff */
pMVar4 = Message::operator<<(local_70,"Expected: ");
pMVar4 = Message::operator<<(pMVar4,local_50);
pMVar4 = Message::operator<<(pMVar4,"\n");
pMVar4 = Message::operator<<(pMVar4," Actual: ");
local_74 = TestPartResultArray::size(local_28);
pMVar4 = Message::operator<<(pMVar4,&local_74);
Message::operator<<(pMVar4," failures");
local_78 = 0;
while( true ) {
iVar1 = local_78;
iVar2 = TestPartResultArray::size(local_28);
if (iVar2 <= iVar1) break;
pMVar4 = Message::operator<<(local_70,"\n");
pTVar5 = (TestPartResult *)TestPartResultArray::GetTestPartResult(local_28,local_78);
Message::operator<<(pMVar4,pTVar5);
local_78 = local_78 + 1;
}
AssertionFailure(local_88);
/* try { // try from 001c8227 to 001c8254 has its CatchHandler @ 001c8274 */
pAVar6 = AssertionResult::operator<<((AssertionResult *)local_88,local_70);
AssertionResult::AssertionResult((AssertionResult *)this,pAVar6);
AssertionResult::~AssertionResult((AssertionResult *)local_88);
}
local_8c = 1;
Message::~Message(local_70);
std::__cxx11::string::~string(local_50);
return this;
}
| |
29,877 | bitmap_test_and_clear | eloqsql/mysys/my_bitmap.c | my_bool bitmap_test_and_clear(MY_BITMAP *map, uint bitmap_bit)
{
my_bool res;
DBUG_ASSERT(map->bitmap);
DBUG_ASSERT(bitmap_bit < map->n_bits);
bitmap_lock(map);
res= bitmap_fast_test_and_clear(map, bitmap_bit);
bitmap_unlock(map);
return res;
} | O0 | c | bitmap_test_and_clear:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
jmp 0xb4a61
jmp 0xb4a63
jmp 0xb4a65
movq -0x8(%rbp), %rdi
callq 0xb4980
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0xb49f0
movb %al, -0xd(%rbp)
movq -0x8(%rbp), %rdi
callq 0xb49c0
movb -0xd(%rbp), %al
addq $0x10, %rsp
popq %rbp
retq
nop
| bitmap_test_and_clear:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
jmp short $+2
loc_B4A61:
jmp short $+2
loc_B4A63:
jmp short $+2
loc_B4A65:
mov rdi, [rbp+var_8]
call bitmap_lock
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
call bitmap_fast_test_and_clear
mov [rbp+var_D], al
mov rdi, [rbp+var_8]
call bitmap_unlock
mov al, [rbp+var_D]
add rsp, 10h
pop rbp
retn
| char bitmap_test_and_clear(_QWORD *a1, unsigned int a2)
{
char v3; // [rsp+3h] [rbp-Dh]
bitmap_lock((long long)a1);
v3 = bitmap_fast_test_and_clear(a1, a2);
bitmap_unlock((long long)a1);
return v3;
}
| bitmap_test_and_clear:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
JMP 0x001b4a61
LAB_001b4a61:
JMP 0x001b4a63
LAB_001b4a63:
JMP 0x001b4a65
LAB_001b4a65:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001b4980
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
CALL 0x001b49f0
MOV byte ptr [RBP + -0xd],AL
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001b49c0
MOV AL,byte ptr [RBP + -0xd]
ADD RSP,0x10
POP RBP
RET
|
int1 bitmap_test_and_clear(int8 param_1,int4 param_2)
{
int1 uVar1;
bitmap_lock(param_1);
uVar1 = bitmap_fast_test_and_clear(param_1,param_2);
bitmap_unlock(param_1);
return uVar1;
}
| |
29,878 | LefDefParser::defiPinAntennaModel::clear() | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiPinCap.cpp | void defiPinAntennaModel::clear() {
int i;
if (oxide_)
free((char*)(oxide_));
oxide_ = 0;
for (i = 0; i < numAPinGateArea_; i++) {
if (APinGateAreaLayer_[i])
free(APinGateAreaLayer_[i]);
}
numAPinGateArea_ = 0;
for (i = 0; i < numAPinMaxAreaCar_; i++) {
if (APinMaxAreaCarLayer_[i])
free(APinMaxAreaCarLayer_[i]);
}
numAPinMaxAreaCar_ = 0;
for (i = 0; i < numAPinMaxSideAreaCar_; i++) {
if (APinMaxSideAreaCarLayer_[i])
free(APinMaxSideAreaCarLayer_[i]);
}
numAPinMaxSideAreaCar_ = 0;
for (i = 0; i < numAPinMaxCutCar_; i++) {
if (APinMaxCutCarLayer_[i])
free(APinMaxCutCarLayer_[i]);
}
numAPinMaxCutCar_ = 0;
} | O3 | cpp | LefDefParser::defiPinAntennaModel::clear():
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x1bf92
callq 0x7220
movq $0x0, (%rbx)
movl 0x8(%rbx), %eax
testl %eax, %eax
jle 0x1bfc3
xorl %r14d, %r14d
movq 0x18(%rbx), %rcx
movq (%rcx,%r14,8), %rdi
testq %rdi, %rdi
je 0x1bfb8
callq 0x7220
movl 0x8(%rbx), %eax
incq %r14
movslq %eax, %rcx
cmpq %rcx, %r14
jl 0x1bfa3
movl $0x0, 0x8(%rbx)
movl 0x20(%rbx), %eax
testl %eax, %eax
jle 0x1bff4
xorl %r14d, %r14d
movq 0x30(%rbx), %rcx
movq (%rcx,%r14,8), %rdi
testq %rdi, %rdi
je 0x1bfe9
callq 0x7220
movl 0x20(%rbx), %eax
incq %r14
movslq %eax, %rcx
cmpq %rcx, %r14
jl 0x1bfd4
movl $0x0, 0x20(%rbx)
movl 0x38(%rbx), %eax
testl %eax, %eax
jle 0x1c025
xorl %r14d, %r14d
movq 0x48(%rbx), %rcx
movq (%rcx,%r14,8), %rdi
testq %rdi, %rdi
je 0x1c01a
callq 0x7220
movl 0x38(%rbx), %eax
incq %r14
movslq %eax, %rcx
cmpq %rcx, %r14
jl 0x1c005
movl $0x0, 0x38(%rbx)
movl 0x50(%rbx), %eax
testl %eax, %eax
jle 0x1c056
xorl %r14d, %r14d
movq 0x60(%rbx), %rcx
movq (%rcx,%r14,8), %rdi
testq %rdi, %rdi
je 0x1c04b
callq 0x7220
movl 0x50(%rbx), %eax
incq %r14
movslq %eax, %rcx
cmpq %rcx, %r14
jl 0x1c036
movl $0x0, 0x50(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
| _ZN12LefDefParser19defiPinAntennaModel5clearEv:
push r14
push rbx
push rax
mov rbx, rdi
mov rdi, [rdi]
test rdi, rdi
jz short loc_1BF92
call _free
loc_1BF92:
mov qword ptr [rbx], 0
mov eax, [rbx+8]
test eax, eax
jle short loc_1BFC3
xor r14d, r14d
loc_1BFA3:
mov rcx, [rbx+18h]
mov rdi, [rcx+r14*8]
test rdi, rdi
jz short loc_1BFB8
call _free
mov eax, [rbx+8]
loc_1BFB8:
inc r14
movsxd rcx, eax
cmp r14, rcx
jl short loc_1BFA3
loc_1BFC3:
mov dword ptr [rbx+8], 0
mov eax, [rbx+20h]
test eax, eax
jle short loc_1BFF4
xor r14d, r14d
loc_1BFD4:
mov rcx, [rbx+30h]
mov rdi, [rcx+r14*8]
test rdi, rdi
jz short loc_1BFE9
call _free
mov eax, [rbx+20h]
loc_1BFE9:
inc r14
movsxd rcx, eax
cmp r14, rcx
jl short loc_1BFD4
loc_1BFF4:
mov dword ptr [rbx+20h], 0
mov eax, [rbx+38h]
test eax, eax
jle short loc_1C025
xor r14d, r14d
loc_1C005:
mov rcx, [rbx+48h]
mov rdi, [rcx+r14*8]
test rdi, rdi
jz short loc_1C01A
call _free
mov eax, [rbx+38h]
loc_1C01A:
inc r14
movsxd rcx, eax
cmp r14, rcx
jl short loc_1C005
loc_1C025:
mov dword ptr [rbx+38h], 0
mov eax, [rbx+50h]
test eax, eax
jle short loc_1C056
xor r14d, r14d
loc_1C036:
mov rcx, [rbx+60h]
mov rdi, [rcx+r14*8]
test rdi, rdi
jz short loc_1C04B
call _free
mov eax, [rbx+50h]
loc_1C04B:
inc r14
movsxd rcx, eax
cmp r14, rcx
jl short loc_1C036
loc_1C056:
mov dword ptr [rbx+50h], 0
add rsp, 8
pop rbx
pop r14
retn
| long long LefDefParser::defiPinAntennaModel::clear(LefDefParser::defiPinAntennaModel *this)
{
void *v2; // rdi
int v3; // eax
long long i; // r14
void *v5; // rdi
int v6; // eax
long long j; // r14
void *v8; // rdi
int v9; // eax
long long k; // r14
void *v11; // rdi
long long result; // rax
long long v13; // r14
void *v14; // rdi
v2 = *(void **)this;
if ( v2 )
free(v2);
*(_QWORD *)this = 0LL;
v3 = *((_DWORD *)this + 2);
if ( v3 > 0 )
{
for ( i = 0LL; i < v3; ++i )
{
v5 = *(void **)(*((_QWORD *)this + 3) + 8 * i);
if ( v5 )
{
free(v5);
v3 = *((_DWORD *)this + 2);
}
}
}
*((_DWORD *)this + 2) = 0;
v6 = *((_DWORD *)this + 8);
if ( v6 > 0 )
{
for ( j = 0LL; j < v6; ++j )
{
v8 = *(void **)(*((_QWORD *)this + 6) + 8 * j);
if ( v8 )
{
free(v8);
v6 = *((_DWORD *)this + 8);
}
}
}
*((_DWORD *)this + 8) = 0;
v9 = *((_DWORD *)this + 14);
if ( v9 > 0 )
{
for ( k = 0LL; k < v9; ++k )
{
v11 = *(void **)(*((_QWORD *)this + 9) + 8 * k);
if ( v11 )
{
free(v11);
v9 = *((_DWORD *)this + 14);
}
}
}
*((_DWORD *)this + 14) = 0;
result = *((unsigned int *)this + 20);
if ( (int)result > 0 )
{
v13 = 0LL;
do
{
v14 = *(void **)(*((_QWORD *)this + 12) + 8 * v13);
if ( v14 )
{
free(v14);
result = *((unsigned int *)this + 20);
}
++v13;
}
while ( v13 < (int)result );
}
*((_DWORD *)this + 20) = 0;
return result;
}
| clear:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RDI,qword ptr [RDI]
TEST RDI,RDI
JZ 0x0011bf92
CALL 0x00107220
LAB_0011bf92:
MOV qword ptr [RBX],0x0
MOV EAX,dword ptr [RBX + 0x8]
TEST EAX,EAX
JLE 0x0011bfc3
XOR R14D,R14D
LAB_0011bfa3:
MOV RCX,qword ptr [RBX + 0x18]
MOV RDI,qword ptr [RCX + R14*0x8]
TEST RDI,RDI
JZ 0x0011bfb8
CALL 0x00107220
MOV EAX,dword ptr [RBX + 0x8]
LAB_0011bfb8:
INC R14
MOVSXD RCX,EAX
CMP R14,RCX
JL 0x0011bfa3
LAB_0011bfc3:
MOV dword ptr [RBX + 0x8],0x0
MOV EAX,dword ptr [RBX + 0x20]
TEST EAX,EAX
JLE 0x0011bff4
XOR R14D,R14D
LAB_0011bfd4:
MOV RCX,qword ptr [RBX + 0x30]
MOV RDI,qword ptr [RCX + R14*0x8]
TEST RDI,RDI
JZ 0x0011bfe9
CALL 0x00107220
MOV EAX,dword ptr [RBX + 0x20]
LAB_0011bfe9:
INC R14
MOVSXD RCX,EAX
CMP R14,RCX
JL 0x0011bfd4
LAB_0011bff4:
MOV dword ptr [RBX + 0x20],0x0
MOV EAX,dword ptr [RBX + 0x38]
TEST EAX,EAX
JLE 0x0011c025
XOR R14D,R14D
LAB_0011c005:
MOV RCX,qword ptr [RBX + 0x48]
MOV RDI,qword ptr [RCX + R14*0x8]
TEST RDI,RDI
JZ 0x0011c01a
CALL 0x00107220
MOV EAX,dword ptr [RBX + 0x38]
LAB_0011c01a:
INC R14
MOVSXD RCX,EAX
CMP R14,RCX
JL 0x0011c005
LAB_0011c025:
MOV dword ptr [RBX + 0x38],0x0
MOV EAX,dword ptr [RBX + 0x50]
TEST EAX,EAX
JLE 0x0011c056
XOR R14D,R14D
LAB_0011c036:
MOV RCX,qword ptr [RBX + 0x60]
MOV RDI,qword ptr [RCX + R14*0x8]
TEST RDI,RDI
JZ 0x0011c04b
CALL 0x00107220
MOV EAX,dword ptr [RBX + 0x50]
LAB_0011c04b:
INC R14
MOVSXD RCX,EAX
CMP R14,RCX
JL 0x0011c036
LAB_0011c056:
MOV dword ptr [RBX + 0x50],0x0
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* LefDefParser::defiPinAntennaModel::clear() */
void __thiscall LefDefParser::defiPinAntennaModel::clear(defiPinAntennaModel *this)
{
void *pvVar1;
int iVar2;
long lVar3;
if (*(void **)this != (void *)0x0) {
free(*(void **)this);
}
*(int8 *)this = 0;
iVar2 = *(int *)(this + 8);
if (0 < iVar2) {
lVar3 = 0;
do {
pvVar1 = *(void **)(*(long *)(this + 0x18) + lVar3 * 8);
if (pvVar1 != (void *)0x0) {
free(pvVar1);
iVar2 = *(int *)(this + 8);
}
lVar3 = lVar3 + 1;
} while (lVar3 < iVar2);
}
*(int4 *)(this + 8) = 0;
iVar2 = *(int *)(this + 0x20);
if (0 < iVar2) {
lVar3 = 0;
do {
pvVar1 = *(void **)(*(long *)(this + 0x30) + lVar3 * 8);
if (pvVar1 != (void *)0x0) {
free(pvVar1);
iVar2 = *(int *)(this + 0x20);
}
lVar3 = lVar3 + 1;
} while (lVar3 < iVar2);
}
*(int4 *)(this + 0x20) = 0;
iVar2 = *(int *)(this + 0x38);
if (0 < iVar2) {
lVar3 = 0;
do {
pvVar1 = *(void **)(*(long *)(this + 0x48) + lVar3 * 8);
if (pvVar1 != (void *)0x0) {
free(pvVar1);
iVar2 = *(int *)(this + 0x38);
}
lVar3 = lVar3 + 1;
} while (lVar3 < iVar2);
}
*(int4 *)(this + 0x38) = 0;
iVar2 = *(int *)(this + 0x50);
if (0 < iVar2) {
lVar3 = 0;
do {
pvVar1 = *(void **)(*(long *)(this + 0x60) + lVar3 * 8);
if (pvVar1 != (void *)0x0) {
free(pvVar1);
iVar2 = *(int *)(this + 0x50);
}
lVar3 = lVar3 + 1;
} while (lVar3 < iVar2);
}
*(int4 *)(this + 0x50) = 0;
return;
}
| |
29,879 | sanitize_thread(PFS_thread*) | eloqsql/storage/perfschema/pfs_instr.cc | PFS_thread *sanitize_thread(PFS_thread *unsafe)
{
return global_thread_container.sanitize(unsafe);
} | O3 | cpp | sanitize_thread(PFS_thread*):
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
xorl %ecx, %ecx
leaq 0x3935a4(%rip), %rdx # 0x3ca3e8
movabsq $-0xb81702e05c0b817, %rsi # imm = 0xF47E8FD1FA3F47E9
movabsq $0xb81702e05c0b9, %rdi # imm = 0xB81702E05C0B9
movq 0xa8(%rdx,%rcx,8), %r9
testq %r9, %r9
je 0x36e91
movq 0x48(%r9), %r8
cmpq %rax, %r8
ja 0x36e91
imulq $0x1640, 0x50(%r9), %r9 # imm = 0x1640
addq %r8, %r9
cmpq %rax, %r9
jbe 0x36e91
movq %rax, %r9
subq %r8, %r9
imulq %rsi, %r9
rorq $0x6, %r9
cmpq %rdi, %r9
jb 0x36e9f
incq %rcx
cmpq $0x100, %rcx # imm = 0x100
jne 0x36e58
xorl %eax, %eax
popq %rbp
retq
| _Z15sanitize_threadP10PFS_thread:
push rbp
mov rbp, rsp
mov rax, rdi
xor ecx, ecx
lea rdx, global_thread_container
mov rsi, 0F47E8FD1FA3F47E9h
mov rdi, 0B81702E05C0B9h
loc_36E58:
mov r9, [rdx+rcx*8+0A8h]
test r9, r9
jz short loc_36E91
mov r8, [r9+48h]
cmp r8, rax
ja short loc_36E91
imul r9, [r9+50h], 1640h
add r9, r8
cmp r9, rax
jbe short loc_36E91
mov r9, rax
sub r9, r8
imul r9, rsi
ror r9, 6
cmp r9, rdi
jb short loc_36E9F
loc_36E91:
inc rcx
cmp rcx, 100h
jnz short loc_36E58
xor eax, eax
loc_36E9F:
pop rbp
retn
| PFS_thread * sanitize_thread(PFS_thread *a1)
{
PFS_thread *result; // rax
long long v2; // rcx
long long v3; // r9
unsigned long long v4; // r8
result = a1;
v2 = 0LL;
while ( 1 )
{
v3 = global_thread_container[v2 + 21];
if ( v3 )
{
v4 = *(_QWORD *)(v3 + 72);
if ( v4 <= (unsigned long long)a1
&& v4 + 5696LL * *(_QWORD *)(v3 + 80) > (unsigned long long)a1
&& __ROR8__(0xF47E8FD1FA3F47E9LL * ((_QWORD)a1 - v4), 6) < 0xB81702E05C0B9uLL )
{
break;
}
}
if ( ++v2 == 256 )
return 0LL;
}
return result;
}
| sanitize_thread:
PUSH RBP
MOV RBP,RSP
MOV RAX,RDI
XOR ECX,ECX
LEA RDX,[0x4ca3e8]
MOV RSI,-0xb81702e05c0b817
MOV RDI,0xb81702e05c0b9
LAB_00136e58:
MOV R9,qword ptr [RDX + RCX*0x8 + 0xa8]
TEST R9,R9
JZ 0x00136e91
MOV R8,qword ptr [R9 + 0x48]
CMP R8,RAX
JA 0x00136e91
IMUL R9,qword ptr [R9 + 0x50],0x1640
ADD R9,R8
CMP R9,RAX
JBE 0x00136e91
MOV R9,RAX
SUB R9,R8
IMUL R9,RSI
ROR R9,0x6
CMP R9,RDI
JC 0x00136e9f
LAB_00136e91:
INC RCX
CMP RCX,0x100
JNZ 0x00136e58
XOR EAX,EAX
LAB_00136e9f:
POP RBP
RET
|
/* sanitize_thread(PFS_thread*) */
PFS_thread * sanitize_thread(PFS_thread *param_1)
{
long lVar1;
PFS_thread *pPVar2;
long lVar3;
ulong uVar4;
lVar3 = 0;
while ((((lVar1 = *(long *)(global_thread_container + lVar3 * 8 + 0xa8), lVar1 == 0 ||
(pPVar2 = *(PFS_thread **)(lVar1 + 0x48), param_1 < pPVar2)) ||
(pPVar2 + *(long *)(lVar1 + 0x50) * 0x1640 <= param_1)) ||
(uVar4 = ((long)param_1 - (long)pPVar2) * -0xb81702e05c0b817,
0xb81702e05c0b8 < (uVar4 >> 6 | uVar4 << 0x3a)))) {
lVar3 = lVar3 + 1;
if (lVar3 == 0x100) {
return (PFS_thread *)0x0;
}
}
return param_1;
}
| |
29,880 | thr_unlock | eloqsql/mysys/thr_lock.c | void thr_unlock(THR_LOCK_DATA *data, uint unlock_flags)
{
THR_LOCK *lock=data->lock;
enum thr_lock_type lock_type=data->type;
DBUG_ENTER("thr_unlock");
DBUG_PRINT("lock",("data: %p thread: %lu lock: %p",
data, (ulong) data->owner->thread_id,
lock));
mysql_mutex_lock(&lock->mutex);
check_locks(lock,"start of release lock", lock_type, 0);
if (((*data->prev)=data->next)) /* remove from lock-list */
data->next->prev= data->prev;
else if (lock_type <= TL_READ_NO_INSERT)
lock->read.last=data->prev;
else if (lock_type == TL_WRITE_DELAYED && data->cond)
{
/*
This only happens in extreme circumstances when a
write delayed lock that is waiting for a lock
*/
lock->write_wait.last=data->prev; /* Put it on wait queue */
}
else
lock->write.last=data->prev;
if (unlock_flags & THR_UNLOCK_UPDATE_STATUS)
{
/* External lock was not called; Update or restore status */
if (lock_type >= TL_WRITE_CONCURRENT_INSERT)
{
if (lock->update_status)
(*lock->update_status)(data->status_param);
}
else
{
if (lock->restore_status)
(*lock->restore_status)(data->status_param);
}
}
if (lock_type == TL_READ_NO_INSERT)
lock->read_no_write_count--;
data->type=TL_UNLOCK; /* Mark unlocked */
wake_up_waiters(lock);
mysql_mutex_unlock(&lock->mutex);
DBUG_VOID_RETURN;
} | O0 | c | thr_unlock:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x40(%rax), %eax
movl %eax, -0x1c(%rbp)
jmp 0x83e17
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
leaq 0x56239(%rip), %rsi # 0xda05f
movl $0x3c0, %edx # imm = 0x3C0
callq 0x83ba0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
je 0x83e5f
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, 0x10(%rax)
jmp 0x83eb4
cmpl $0x5, -0x1c(%rbp)
jg 0x83e77
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x78(%rax)
jmp 0x83eb2
cmpl $0x9, -0x1c(%rbp)
jne 0x83e9d
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x83e9d
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x88(%rax)
jmp 0x83eb0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x98(%rax)
jmp 0x83eb2
jmp 0x83eb4
movl -0xc(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x83f11
cmpl $0x8, -0x1c(%rbp)
jl 0x83eea
movq -0x18(%rbp), %rax
cmpq $0x0, 0xc0(%rax)
je 0x83ee8
movq -0x18(%rbp), %rax
movq 0xc0(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rdi
callq *%rax
jmp 0x83f0f
movq -0x18(%rbp), %rax
cmpq $0x0, 0xc8(%rax)
je 0x83f0d
movq -0x18(%rbp), %rax
movq 0xc8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rdi
callq *%rax
jmp 0x83f0f
jmp 0x83f11
cmpl $0x5, -0x1c(%rbp)
jne 0x83f2a
movq -0x18(%rbp), %rax
movl 0xa8(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0xa8(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x40(%rax)
movq -0x18(%rbp), %rdi
callq 0x83f60
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
callq 0x83c10
jmp 0x83f4d
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| thr_unlock:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov rax, [rbp+var_8]
mov rax, [rax+18h]
mov [rbp+var_18], rax
mov rax, [rbp+var_8]
mov eax, [rax+40h]
mov [rbp+var_1C], eax
jmp short $+2
loc_83E17:
mov rdi, [rbp+var_18]
add rdi, 18h
lea rsi, aWorkspaceLlm4b_21; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 3C0h
call inline_mysql_mutex_lock_11
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov rcx, [rbp+var_8]
mov rcx, [rcx+10h]
mov [rcx], rax
cmp rax, 0
jz short loc_83E5F
mov rax, [rbp+var_8]
mov rcx, [rax+10h]
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov [rax+10h], rcx
jmp short loc_83EB4
loc_83E5F:
cmp [rbp+var_1C], 5
jg short loc_83E77
mov rax, [rbp+var_8]
mov rcx, [rax+10h]
mov rax, [rbp+var_18]
mov [rax+78h], rcx
jmp short loc_83EB2
loc_83E77:
cmp [rbp+var_1C], 9
jnz short loc_83E9D
mov rax, [rbp+var_8]
cmp qword ptr [rax+20h], 0
jz short loc_83E9D
mov rax, [rbp+var_8]
mov rcx, [rax+10h]
mov rax, [rbp+var_18]
mov [rax+88h], rcx
jmp short loc_83EB0
loc_83E9D:
mov rax, [rbp+var_8]
mov rcx, [rax+10h]
mov rax, [rbp+var_18]
mov [rax+98h], rcx
loc_83EB0:
jmp short $+2
loc_83EB2:
jmp short $+2
loc_83EB4:
mov eax, [rbp+var_C]
and eax, 1
cmp eax, 0
jz short loc_83F11
cmp [rbp+var_1C], 8
jl short loc_83EEA
mov rax, [rbp+var_18]
cmp qword ptr [rax+0C0h], 0
jz short loc_83EE8
mov rax, [rbp+var_18]
mov rax, [rax+0C0h]
mov rcx, [rbp+var_8]
mov rdi, [rcx+28h]
call rax
loc_83EE8:
jmp short loc_83F0F
loc_83EEA:
mov rax, [rbp+var_18]
cmp qword ptr [rax+0C8h], 0
jz short loc_83F0D
mov rax, [rbp+var_18]
mov rax, [rax+0C8h]
mov rcx, [rbp+var_8]
mov rdi, [rcx+28h]
call rax
loc_83F0D:
jmp short $+2
loc_83F0F:
jmp short $+2
loc_83F11:
cmp [rbp+var_1C], 5
jnz short loc_83F2A
mov rax, [rbp+var_18]
mov ecx, [rax+0A8h]
add ecx, 0FFFFFFFFh
mov [rax+0A8h], ecx
loc_83F2A:
mov rax, [rbp+var_8]
mov dword ptr [rax+40h], 0
mov rdi, [rbp+var_18]
call wake_up_waiters
mov rdi, [rbp+var_18]
add rdi, 18h
call inline_mysql_mutex_unlock_11
jmp short $+2
loc_83F4D:
add rsp, 20h
pop rbp
retn
| long long thr_unlock(long long a1, char a2)
{
long long v2; // rax
int v4; // [rsp+4h] [rbp-1Ch]
long long v5; // [rsp+8h] [rbp-18h]
v5 = *(_QWORD *)(a1 + 24);
v4 = *(_DWORD *)(a1 + 64);
inline_mysql_mutex_lock_11(v5 + 24, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c", 0x3C0u);
v2 = *(_QWORD *)(a1 + 8);
**(_QWORD **)(a1 + 16) = v2;
if ( v2 )
{
*(_QWORD *)(*(_QWORD *)(a1 + 8) + 16LL) = *(_QWORD *)(a1 + 16);
}
else if ( v4 > 5 )
{
if ( v4 == 9 && *(_QWORD *)(a1 + 32) )
*(_QWORD *)(v5 + 136) = *(_QWORD *)(a1 + 16);
else
*(_QWORD *)(v5 + 152) = *(_QWORD *)(a1 + 16);
}
else
{
*(_QWORD *)(v5 + 120) = *(_QWORD *)(a1 + 16);
}
if ( (a2 & 1) != 0 )
{
if ( v4 < 8 )
{
if ( *(_QWORD *)(v5 + 200) )
(*(void ( **)(_QWORD))(v5 + 200))(*(_QWORD *)(a1 + 40));
}
else if ( *(_QWORD *)(v5 + 192) )
{
(*(void ( **)(_QWORD))(v5 + 192))(*(_QWORD *)(a1 + 40));
}
}
if ( v4 == 5 )
--*(_DWORD *)(v5 + 168);
*(_DWORD *)(a1 + 64) = 0;
wake_up_waiters(v5);
return inline_mysql_mutex_unlock_11(v5 + 24);
}
| thr_unlock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x40]
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x00183e17
LAB_00183e17:
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x18
LEA RSI,[0x1da05f]
MOV EDX,0x3c0
CALL 0x00183ba0
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX + 0x10]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JZ 0x00183e5f
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RAX + 0x10],RCX
JMP 0x00183eb4
LAB_00183e5f:
CMP dword ptr [RBP + -0x1c],0x5
JG 0x00183e77
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x78],RCX
JMP 0x00183eb2
LAB_00183e77:
CMP dword ptr [RBP + -0x1c],0x9
JNZ 0x00183e9d
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x20],0x0
JZ 0x00183e9d
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x88],RCX
JMP 0x00183eb0
LAB_00183e9d:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x98],RCX
LAB_00183eb0:
JMP 0x00183eb2
LAB_00183eb2:
JMP 0x00183eb4
LAB_00183eb4:
MOV EAX,dword ptr [RBP + -0xc]
AND EAX,0x1
CMP EAX,0x0
JZ 0x00183f11
CMP dword ptr [RBP + -0x1c],0x8
JL 0x00183eea
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0xc0],0x0
JZ 0x00183ee8
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x28]
CALL RAX
LAB_00183ee8:
JMP 0x00183f0f
LAB_00183eea:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0xc8],0x0
JZ 0x00183f0d
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0xc8]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x28]
CALL RAX
LAB_00183f0d:
JMP 0x00183f0f
LAB_00183f0f:
JMP 0x00183f11
LAB_00183f11:
CMP dword ptr [RBP + -0x1c],0x5
JNZ 0x00183f2a
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RAX + 0xa8]
ADD ECX,-0x1
MOV dword ptr [RAX + 0xa8],ECX
LAB_00183f2a:
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x40],0x0
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00183f60
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x18
CALL 0x00183c10
JMP 0x00183f4d
LAB_00183f4d:
ADD RSP,0x20
POP RBP
RET
|
void thr_unlock(long param_1,uint param_2)
{
int iVar1;
long lVar2;
long lVar3;
lVar2 = *(long *)(param_1 + 0x18);
iVar1 = *(int *)(param_1 + 0x40);
inline_mysql_mutex_lock
(lVar2 + 0x18,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x3c0);
lVar3 = *(long *)(param_1 + 8);
**(long **)(param_1 + 0x10) = lVar3;
if (lVar3 == 0) {
if (iVar1 < 6) {
*(int8 *)(lVar2 + 0x78) = *(int8 *)(param_1 + 0x10);
}
else if ((iVar1 == 9) && (*(long *)(param_1 + 0x20) != 0)) {
*(int8 *)(lVar2 + 0x88) = *(int8 *)(param_1 + 0x10);
}
else {
*(int8 *)(lVar2 + 0x98) = *(int8 *)(param_1 + 0x10);
}
}
else {
*(int8 *)(*(long *)(param_1 + 8) + 0x10) = *(int8 *)(param_1 + 0x10);
}
if ((param_2 & 1) != 0) {
if (iVar1 < 8) {
if (*(long *)(lVar2 + 200) != 0) {
(**(code **)(lVar2 + 200))(*(int8 *)(param_1 + 0x28));
}
}
else if (*(long *)(lVar2 + 0xc0) != 0) {
(**(code **)(lVar2 + 0xc0))(*(int8 *)(param_1 + 0x28));
}
}
if (iVar1 == 5) {
*(int *)(lVar2 + 0xa8) = *(int *)(lVar2 + 0xa8) + -1;
}
*(int4 *)(param_1 + 0x40) = 0;
wake_up_waiters(lVar2);
inline_mysql_mutex_unlock(lVar2 + 0x18);
return;
}
| |
29,881 | ma_pvio_register_callback | eloqsql/libmariadb/libmariadb/ma_pvio.c | int ma_pvio_register_callback(my_bool register_callback,
void (*callback_function)(int mode, MYSQL *mysql, const uchar *buffer, size_t length))
{
LIST *list;
if (!callback_function)
return 1;
/* plugin will unregister in it's deinit function */
if (register_callback)
{
list= (LIST *)malloc(sizeof(LIST));
list->data= (void *)callback_function;
pvio_callback= list_add(pvio_callback, list);
}
else /* unregister callback function */
{
LIST *p= pvio_callback;
while (p)
{
if (p->data == callback_function)
{
list_delete(pvio_callback, p);
break;
}
p= p->next;
}
}
return 0;
} | O0 | c | ma_pvio_register_callback:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dil, %al
movb %al, -0x5(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x88bf5
movl $0x1, -0x4(%rbp)
jmp 0x88c86
cmpb $0x0, -0x5(%rbp)
je 0x88c37
movl $0x18, %edi
callq 0x60aa0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
leaq 0x432e54(%rip), %rax # 0x4bba70
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x877a0
movq %rax, %rcx
leaq 0x432e3e(%rip), %rax # 0x4bba70
movq %rcx, (%rax)
jmp 0x88c7f
leaq 0x432e32(%rip), %rax # 0x4bba70
movq (%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x88c7d
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x88c6f
leaq 0x432e0f(%rip), %rax # 0x4bba70
movq (%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x87810
jmp 0x88c7d
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x88c45
jmp 0x88c7f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
| ma_pvio_register_callback:
push rbp
mov rbp, rsp
sub rsp, 20h
mov al, dil
mov [rbp+var_5], al
mov [rbp+var_10], rsi
cmp [rbp+var_10], 0
jnz short loc_88BF5
mov [rbp+var_4], 1
jmp loc_88C86
loc_88BF5:
cmp [rbp+var_5], 0
jz short loc_88C37
mov edi, 18h
call _malloc
mov [rbp+var_18], rax
mov rcx, [rbp+var_10]
mov rax, [rbp+var_18]
mov [rax+10h], rcx
lea rax, pvio_callback
mov rdi, [rax]
mov rsi, [rbp+var_18]
call list_add
mov rcx, rax
lea rax, pvio_callback
mov [rax], rcx
jmp short loc_88C7F
loc_88C37:
lea rax, pvio_callback
mov rax, [rax]
mov [rbp+var_20], rax
loc_88C45:
cmp [rbp+var_20], 0
jz short loc_88C7D
mov rax, [rbp+var_20]
mov rax, [rax+10h]
cmp rax, [rbp+var_10]
jnz short loc_88C6F
lea rax, pvio_callback
mov rdi, [rax]
mov rsi, [rbp+var_20]
call list_delete
jmp short loc_88C7D
loc_88C6F:
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov [rbp+var_20], rax
jmp short loc_88C45
loc_88C7D:
jmp short $+2
loc_88C7F:
mov [rbp+var_4], 0
loc_88C86:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long ma_pvio_register_callback(char a1, long long a2)
{
_QWORD *i; // [rsp+0h] [rbp-20h]
_QWORD *v4; // [rsp+8h] [rbp-18h]
if ( a2 )
{
if ( a1 )
{
v4 = (_QWORD *)malloc(24LL);
v4[2] = a2;
pvio_callback = (long long)list_add(pvio_callback, v4);
}
else
{
for ( i = (_QWORD *)pvio_callback; i; i = (_QWORD *)i[1] )
{
if ( i[2] == a2 )
{
list_delete(pvio_callback, i);
break;
}
}
}
return 0;
}
else
{
return 1;
}
}
| ma_pvio_register_callback:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV AL,DIL
MOV byte ptr [RBP + -0x5],AL
MOV qword ptr [RBP + -0x10],RSI
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x00188bf5
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00188c86
LAB_00188bf5:
CMP byte ptr [RBP + -0x5],0x0
JZ 0x00188c37
MOV EDI,0x18
CALL 0x00160aa0
MOV qword ptr [RBP + -0x18],RAX
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x10],RCX
LEA RAX,[0x5bba70]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001877a0
MOV RCX,RAX
LEA RAX,[0x5bba70]
MOV qword ptr [RAX],RCX
JMP 0x00188c7f
LAB_00188c37:
LEA RAX,[0x5bba70]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
LAB_00188c45:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x00188c7d
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x10]
CMP RAX,qword ptr [RBP + -0x10]
JNZ 0x00188c6f
LEA RAX,[0x5bba70]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x00187810
JMP 0x00188c7d
LAB_00188c6f:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00188c45
LAB_00188c7d:
JMP 0x00188c7f
LAB_00188c7f:
MOV dword ptr [RBP + -0x4],0x0
LAB_00188c86:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 ma_pvio_register_callback(char param_1,long param_2)
{
void *pvVar1;
int8 local_28;
int4 local_c;
if (param_2 == 0) {
local_c = 1;
}
else {
if (param_1 == '\0') {
for (local_28 = pvio_callback; local_28 != 0; local_28 = *(long *)(local_28 + 8)) {
if (*(long *)(local_28 + 0x10) == param_2) {
list_delete(pvio_callback,local_28);
break;
}
}
}
else {
pvVar1 = malloc(0x18);
*(long *)((long)pvVar1 + 0x10) = param_2;
pvio_callback = list_add(pvio_callback,pvVar1);
}
local_c = 0;
}
return local_c;
}
| |
29,882 | init_available_charsets | eloqsql/mysys/charset.c | static void init_available_charsets(void)
{
char fname[FN_REFLEN + sizeof(MY_CHARSET_INDEX)];
struct charset_info_st **cs;
MY_CHARSET_LOADER loader;
DBUG_ENTER("init_available_charsets");
bzero((char*) &all_charsets,sizeof(all_charsets));
bzero((char*) &my_collation_statistics, sizeof(my_collation_statistics));
my_hash_init2(key_memory_charsets, &charset_name_hash, 16,
&my_charset_latin1, 64, 0, 0, get_charset_key,
0, 0, HASH_UNIQUE);
init_compiled_charsets(MYF(0));
/* Copy compiled charsets */
for (cs= (struct charset_info_st**) all_charsets;
cs < (struct charset_info_st**) all_charsets +
array_elements(all_charsets)-1 ;
cs++)
{
if (*cs)
{
DBUG_ASSERT(cs[0]->mbmaxlen <= MY_CS_MBMAXLEN);
if (cs[0]->m_ctype)
if (init_state_maps(*cs))
*cs= NULL;
}
}
my_charset_loader_init_mysys(&loader);
strmov(get_charsets_dir(fname), MY_CHARSET_INDEX);
my_read_charset_file(&loader, fname, MYF(0));
DBUG_VOID_RETURN;
} | O0 | c | init_available_charsets:
pushq %rbp
movq %rsp, %rbp
subq $0x300, %rsp # imm = 0x300
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
leaq 0x35a1a1(%rip), %rdi # 0x38dba0
xorl %esi, %esi
movl $0x4000, %edx # imm = 0x4000
callq 0x24180
leaq 0x35e1fe(%rip), %rdi # 0x391c10
xorl %esi, %esi
movl $0x4000, %edx # imm = 0x4000
callq 0x24180
leaq 0x359997(%rip), %rax # 0x38d3bc
movl (%rax), %edi
leaq 0x35e172(%rip), %rsi # 0x391ba0
movl $0x10, %edx
leaq 0x248036(%rip), %rcx # 0x27ba70
movl $0x40, %r8d
xorl %eax, %eax
movl %eax, %r9d
leaq 0x1ab4(%rip), %rax # 0x35500
movq $0x0, (%rsp)
movq %rax, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movl $0x1, 0x20(%rsp)
callq 0x35f20
xorl %eax, %eax
movl %eax, %edi
callq 0x396e0
leaq 0x35a118(%rip), %rax # 0x38dba0
movq %rax, -0x2d8(%rbp)
leaq 0x35a10a(%rip), %rax # 0x38dba0
addq $0x4000, %rax # imm = 0x4000
addq $-0x8, %rax
cmpq %rax, -0x2d8(%rbp)
jae 0x33b06
movq -0x2d8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x33af0
jmp 0x33ab8
jmp 0x33aba
movq -0x2d8(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x40(%rax)
je 0x33aee
movq -0x2d8(%rbp), %rax
movq (%rax), %rdi
callq 0x35060
cmpb $0x0, %al
je 0x33aec
movq -0x2d8(%rbp), %rax
movq $0x0, (%rax)
jmp 0x33aee
jmp 0x33af0
jmp 0x33af2
movq -0x2d8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x2d8(%rbp)
jmp 0x33a8f
leaq -0x2d0(%rbp), %rdi
callq 0x33000
leaq -0x220(%rbp), %rdi
callq 0x336a0
movq %rax, %rdi
leaq 0x4c889(%rip), %rsi # 0x803b1
callq 0x242a0
leaq -0x220(%rbp), %rsi
leaq -0x2d0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
callq 0x35540
jmp 0x33b46
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x33b61
addq $0x300, %rsp # imm = 0x300
popq %rbp
retq
callq 0x24300
nopw %cs:(%rax,%rax)
| init_available_charsets:
push rbp
mov rbp, rsp
sub rsp, 300h
mov rax, fs:28h
mov [rbp+var_8], rax
lea rdi, all_charsets
xor esi, esi
mov edx, 4000h
call _memset
lea rdi, my_collation_statistics
xor esi, esi
mov edx, 4000h
call _memset
lea rax, key_memory_charsets
mov edi, [rax]
lea rsi, charset_name_hash
mov edx, 10h
lea rcx, my_charset_latin1
mov r8d, 40h ; '@'
xor eax, eax
mov r9d, eax
lea rax, get_charset_key
mov [rsp+300h+var_300], 0
mov [rsp+300h+var_2F8], rax
mov [rsp+300h+var_2F0], 0
mov [rsp+300h+var_2E8], 0
mov [rsp+300h+var_2E0], 1
call my_hash_init2
xor eax, eax
mov edi, eax
call init_compiled_charsets
lea rax, all_charsets
mov [rbp+var_2D8], rax
loc_33A8F:
lea rax, all_charsets
add rax, 4000h
add rax, 0FFFFFFFFFFFFFFF8h
cmp [rbp+var_2D8], rax
jnb short loc_33B06
mov rax, [rbp+var_2D8]
cmp qword ptr [rax], 0
jz short loc_33AF0
jmp short $+2
loc_33AB8:
jmp short $+2
loc_33ABA:
mov rax, [rbp+var_2D8]
mov rax, [rax]
cmp qword ptr [rax+40h], 0
jz short loc_33AEE
mov rax, [rbp+var_2D8]
mov rdi, [rax]
call init_state_maps
cmp al, 0
jz short loc_33AEC
mov rax, [rbp+var_2D8]
mov qword ptr [rax], 0
loc_33AEC:
jmp short $+2
loc_33AEE:
jmp short $+2
loc_33AF0:
jmp short $+2
loc_33AF2:
mov rax, [rbp+var_2D8]
add rax, 8
mov [rbp+var_2D8], rax
jmp short loc_33A8F
loc_33B06:
lea rdi, [rbp+var_2D0]
call my_charset_loader_init_mysys
lea rdi, [rbp+var_220]
call get_charsets_dir
mov rdi, rax
lea rsi, aIndexXml; "Index.xml"
call _stpcpy
lea rsi, [rbp+var_220]
lea rdi, [rbp+var_2D0]
xor eax, eax
mov edx, eax
call my_read_charset_file
jmp short $+2
loc_33B46:
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_33B61
add rsp, 300h
pop rbp
retn
loc_33B61:
call ___stack_chk_fail
| unsigned long long init_available_charsets()
{
_BYTE *charsets_dir; // rax
_QWORD *i; // [rsp+28h] [rbp-2D8h]
_BYTE v3[176]; // [rsp+30h] [rbp-2D0h] BYREF
_BYTE v4[536]; // [rsp+E0h] [rbp-220h] BYREF
unsigned long long v5; // [rsp+2F8h] [rbp-8h]
v5 = __readfsqword(0x28u);
memset(all_charsets, 0LL, sizeof(all_charsets));
memset(my_collation_statistics, 0LL, sizeof(my_collation_statistics));
my_hash_init2(
key_memory_charsets,
(unsigned int)&charset_name_hash,
16,
(unsigned int)&my_charset_latin1,
64,
0,
0LL,
(long long)get_charset_key,
0LL,
0LL,
1);
init_compiled_charsets(0LL);
for ( i = all_charsets; i < &all_charsets[2047]; ++i )
{
if ( *i && *(_QWORD *)(*i + 64LL) )
{
if ( (unsigned __int8)init_state_maps(*i) )
*i = 0LL;
}
}
my_charset_loader_init_mysys((long long)v3);
charsets_dir = get_charsets_dir(v4);
stpcpy(charsets_dir, "Index.xml");
my_read_charset_file(v3, v4, 0LL);
return __readfsqword(0x28u);
}
| init_available_charsets:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x300
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
LEA RDI,[0x48dba0]
XOR ESI,ESI
MOV EDX,0x4000
CALL 0x00124180
LEA RDI,[0x491c10]
XOR ESI,ESI
MOV EDX,0x4000
CALL 0x00124180
LEA RAX,[0x48d3bc]
MOV EDI,dword ptr [RAX]
LEA RSI,[0x491ba0]
MOV EDX,0x10
LEA RCX,[0x37ba70]
MOV R8D,0x40
XOR EAX,EAX
MOV R9D,EAX
LEA RAX,[0x135500]
MOV qword ptr [RSP],0x0
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],0x0
MOV dword ptr [RSP + 0x20],0x1
CALL 0x00135f20
XOR EAX,EAX
MOV EDI,EAX
CALL 0x001396e0
LEA RAX,[0x48dba0]
MOV qword ptr [RBP + -0x2d8],RAX
LAB_00133a8f:
LEA RAX,[0x48dba0]
ADD RAX,0x4000
ADD RAX,-0x8
CMP qword ptr [RBP + -0x2d8],RAX
JNC 0x00133b06
MOV RAX,qword ptr [RBP + -0x2d8]
CMP qword ptr [RAX],0x0
JZ 0x00133af0
JMP 0x00133ab8
LAB_00133ab8:
JMP 0x00133aba
LAB_00133aba:
MOV RAX,qword ptr [RBP + -0x2d8]
MOV RAX,qword ptr [RAX]
CMP qword ptr [RAX + 0x40],0x0
JZ 0x00133aee
MOV RAX,qword ptr [RBP + -0x2d8]
MOV RDI,qword ptr [RAX]
CALL 0x00135060
CMP AL,0x0
JZ 0x00133aec
MOV RAX,qword ptr [RBP + -0x2d8]
MOV qword ptr [RAX],0x0
LAB_00133aec:
JMP 0x00133aee
LAB_00133aee:
JMP 0x00133af0
LAB_00133af0:
JMP 0x00133af2
LAB_00133af2:
MOV RAX,qword ptr [RBP + -0x2d8]
ADD RAX,0x8
MOV qword ptr [RBP + -0x2d8],RAX
JMP 0x00133a8f
LAB_00133b06:
LEA RDI,[RBP + -0x2d0]
CALL 0x00133000
LEA RDI,[RBP + -0x220]
CALL 0x001336a0
MOV RDI,RAX
LEA RSI,[0x1803b1]
CALL 0x001242a0
LEA RSI,[RBP + -0x220]
LEA RDI,[RBP + -0x2d0]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x00135540
JMP 0x00133b46
LAB_00133b46:
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00133b61
ADD RSP,0x300
POP RBP
RET
LAB_00133b61:
CALL 0x00124300
|
void init_available_charsets(void)
{
char cVar1;
char *__dest;
long in_FS_OFFSET;
long *local_2e0;
int1 local_2d8 [176];
int1 local_228 [536];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
memset(&all_charsets,0,0x4000);
memset(my_collation_statistics,0,0x4000);
my_hash_init2(key_memory_charsets,charset_name_hash,0x10,&my_charset_latin1,0x40,0,0,
get_charset_key,0,0,1);
init_compiled_charsets(0);
for (local_2e0 = &all_charsets; local_2e0 < (long *)0x491b98; local_2e0 = local_2e0 + 1) {
if (((*local_2e0 != 0) && (*(long *)(*local_2e0 + 0x40) != 0)) &&
(cVar1 = init_state_maps(*local_2e0), cVar1 != '\0')) {
*local_2e0 = 0;
}
}
my_charset_loader_init_mysys(local_2d8);
__dest = (char *)get_charsets_dir(local_228);
stpcpy(__dest,"Index.xml");
my_read_charset_file(local_2d8,local_228,0);
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return;
}
| |
29,883 | google::protobuf::compiler::ruby::GenerateBinaryDescriptor(google::protobuf::FileDescriptor const*, google::protobuf::io::Printer*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/ruby/ruby_generator.cc | bool GenerateBinaryDescriptor(const FileDescriptor* file, io::Printer* printer,
std::string* error) {
printer->Print(
R"(descriptor_data = File.binread(__FILE__).split("\n__END__\n", 2)[1])");
printer->Print(
"\nGoogle::Protobuf::DescriptorPool.generated_pool.add_serialized_file("
"descriptor_data)\n\n");
return true;
} | O0 | cpp | google::protobuf::compiler::ruby::GenerateBinaryDescriptor(google::protobuf::FileDescriptor const*, google::protobuf::io::Printer*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*):
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq %rdx, (%rsp)
movq 0x8(%rsp), %rdi
leaq 0x2e7cfe(%rip), %rsi # 0x3b81ac
callq 0x39230
movq 0x8(%rsp), %rdi
leaq 0x2e7d31(%rip), %rsi # 0x3b81f0
callq 0x39230
movb $0x1, %al
andb $0x1, %al
addq $0x18, %rsp
retq
nopl (%rax)
| _ZN6google8protobuf8compiler4ruby24GenerateBinaryDescriptorEPKNS0_14FileDescriptorEPNS0_2io7PrinterEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov [rsp+18h+var_10], rsi
mov [rsp+18h+var_18], rdx
mov rdi, [rsp+18h+var_10]
lea rsi, aDescriptorData; "descriptor_data = File.binread(__FILE__"...
call _ZN6google8protobuf2io7Printer5PrintIJEEEvPKcDpRKT_
mov rdi, [rsp+18h+var_10]
lea rsi, aGoogleProtobuf_38; "\nGoogle::Protobuf::DescriptorPool.gene"...
call _ZN6google8protobuf2io7Printer5PrintIJEEEvPKcDpRKT_
mov al, 1
and al, 1
add rsp, 18h
retn
| char google::protobuf::compiler::ruby::GenerateBinaryDescriptor(long long a1, long long a2)
{
google::protobuf::io::Printer::Print<>(
a2,
(long long)"descriptor_data = File.binread(__FILE__).split(\"\\n__END__\\n\", 2)[1]");
google::protobuf::io::Printer::Print<>(
a2,
(long long)"\nGoogle::Protobuf::DescriptorPool.generated_pool.add_serialized_file(descriptor_data)\n\n");
return 1;
}
| GenerateBinaryDescriptor:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x8],RSI
MOV qword ptr [RSP],RDX
MOV RDI,qword ptr [RSP + 0x8]
LEA RSI,[0x4b81ac]
CALL 0x00139230
MOV RDI,qword ptr [RSP + 0x8]
LEA RSI,[0x4b81f0]
CALL 0x00139230
MOV AL,0x1
AND AL,0x1
ADD RSP,0x18
RET
|
/* google::protobuf::compiler::ruby::GenerateBinaryDescriptor(google::protobuf::FileDescriptor
const*, google::protobuf::io::Printer*, std::__cxx11::string*) */
int1
google::protobuf::compiler::ruby::GenerateBinaryDescriptor
(FileDescriptor *param_1,Printer *param_2,string *param_3)
{
io::Printer::Print<>
(param_2,"descriptor_data = File.binread(__FILE__).split(\"\\n__END__\\n\", 2)[1]");
io::Printer::Print<>
(param_2,
"\nGoogle::Protobuf::DescriptorPool.generated_pool.add_serialized_file(descriptor_data)\n\n"
);
return 1;
}
| |
29,884 | testing::internal::PrintTestPartResultToString[abi:cxx11](testing::TestPartResult const&) | AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc | static std::string PrintTestPartResultToString(
const TestPartResult& test_part_result) {
return (Message() << internal::FormatFileLocation(
test_part_result.file_name(),
test_part_result.line_number())
<< " "
<< TestPartResultTypeToString(test_part_result.type())
<< test_part_result.message())
.GetString();
} | O0 | cpp | testing::internal::PrintTestPartResultToString[abi:cxx11](testing::TestPartResult const&):
subq $0x98, %rsp
movq %rdi, 0x28(%rsp)
movq %rdi, %rax
movq %rax, 0x30(%rsp)
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
leaq 0x80(%rsp), %rdi
callq 0xc8d80
movq 0x88(%rsp), %rdi
callq 0xeceb0
movq %rax, 0x38(%rsp)
movq 0x88(%rsp), %rdi
callq 0xecf00
movq 0x38(%rsp), %rsi
movl %eax, %edx
leaq 0x60(%rsp), %rdi
callq 0xc13f0
jmp 0xcea73
leaq 0x80(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x32aa0
movq %rax, 0x20(%rsp)
jmp 0xcea8c
movq 0x20(%rsp), %rdi
leaq 0x4e66b(%rip), %rsi # 0x11d103
callq 0xeb120
movq %rax, 0x18(%rsp)
jmp 0xceaa4
movq 0x88(%rsp), %rdi
callq 0xecf10
movl %eax, %edi
callq 0xe69a0
movq %rax, 0x10(%rsp)
jmp 0xceabf
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rax
movq %rax, 0x48(%rsp)
leaq 0x48(%rsp), %rsi
callq 0x329f0
movq %rax, 0x8(%rsp)
jmp 0xceadf
movq 0x88(%rsp), %rdi
callq 0xecf20
movq 0x8(%rsp), %rdi
movq %rax, 0x40(%rsp)
leaq 0x40(%rsp), %rsi
callq 0x329f0
movq %rax, (%rsp)
jmp 0xceb06
movq (%rsp), %rsi
movq 0x28(%rsp), %rdi
callq 0xbad90
jmp 0xceb16
leaq 0x60(%rsp), %rdi
callq 0x1dfd0
leaq 0x80(%rsp), %rdi
callq 0x1e080
movq 0x30(%rsp), %rax
addq $0x98, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
jmp 0xceb62
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x58(%rsp)
movl %eax, 0x54(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x1dfd0
leaq 0x80(%rsp), %rdi
callq 0x1e080
movq 0x58(%rsp), %rdi
callq 0x16cf0
nopl (%rax)
| _ZN7testing8internalL27PrintTestPartResultToStringB5cxx11ERKNS_14TestPartResultE:
sub rsp, 98h
mov qword ptr [rsp+98h+var_70], rdi; int
mov rax, rdi
mov qword ptr [rsp+98h+var_68], rax; int
mov qword ptr [rsp+98h+var_8], rdi; int
mov [rsp+98h+var_10], rsi; __int64
lea rdi, [rsp+98h+var_18]; this
call _ZN7testing7MessageC2Ev; testing::Message::Message(void)
mov rdi, [rsp+98h+var_10]; this
call _ZNK7testing14TestPartResult9file_nameEv; testing::TestPartResult::file_name(void)
mov qword ptr [rsp+98h+var_60], rax; int
mov rdi, [rsp+98h+var_10]; this
call _ZNK7testing14TestPartResult11line_numberEv; testing::TestPartResult::line_number(void)
mov rsi, qword ptr [rsp+98h+var_60]
mov edx, eax
lea rdi, [rsp+98h+var_38]; __int64
call _ZN7testing8internal18FormatFileLocationB5cxx11EPKci; testing::internal::FormatFileLocation(char const*,int)
jmp short $+2
loc_CEA73:
lea rdi, [rsp+98h+var_18]
lea rsi, [rsp+98h+var_38]
call _ZN7testing7MessagelsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERS0_RKT_; testing::Message::operator<<<std::string>(std::string const&)
mov [rsp+98h+var_78], rax
jmp short $+2
loc_CEA8C:
mov rdi, [rsp+98h+var_78]
lea rsi, asc_11D101+2; " "
call _ZN7testing7MessagelsIA2_cEERS0_RKT_; testing::Message::operator<<<char [2]>(char [2] const&)
mov [rsp+98h+var_80], rax
jmp short $+2
loc_CEAA4:
mov rdi, [rsp+98h+var_10]; this
call _ZNK7testing14TestPartResult4typeEv; testing::TestPartResult::type(void)
mov edi, eax
call _ZN7testingL26TestPartResultTypeToStringENS_14TestPartResult4TypeE; testing::TestPartResultTypeToString(testing::TestPartResult::Type)
mov [rsp+98h+var_88], rax
jmp short $+2
loc_CEABF:
mov rdi, [rsp+98h+var_80]
mov rax, [rsp+98h+var_88]
mov [rsp+98h+var_50], rax
lea rsi, [rsp+98h+var_50]
call _ZN7testing7MessagelsIKcEERS0_RKPT_; testing::Message::operator<<<char const>(char const * const&)
mov [rsp+98h+var_90], rax
jmp short $+2
loc_CEADF:
mov rdi, [rsp+98h+var_10]; this
call _ZNK7testing14TestPartResult7messageEv; testing::TestPartResult::message(void)
mov rdi, [rsp+98h+var_90]
mov [rsp+98h+var_58], rax
lea rsi, [rsp+98h+var_58]
call _ZN7testing7MessagelsIKcEERS0_RKPT_; testing::Message::operator<<<char const>(char const * const&)
mov qword ptr [rsp+98h+var_98], rax
jmp short $+2
loc_CEB06:
mov rsi, qword ptr [rsp+98h+var_98]; int
mov rdi, qword ptr [rsp+98h+var_70]; int
call _ZNK7testing7Message9GetStringB5cxx11Ev; testing::Message::GetString(void)
jmp short $+2
loc_CEB16:
lea rdi, [rsp+98h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+98h+var_18]; this
call _ZN7testing7MessageD2Ev; testing::Message::~Message()
mov rax, qword ptr [rsp+98h+var_68]
add rsp, 98h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_50], rcx
mov [rsp+arg_4C], eax
jmp short loc_CEB62
mov rcx, rax
mov eax, edx
mov [rsp+arg_50], rcx
mov [rsp+arg_4C], eax
lea rdi, [rsp+arg_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_CEB62:
lea rdi, [rsp+arg_78]; this
call _ZN7testing7MessageD2Ev; testing::Message::~Message()
mov rdi, [rsp+arg_50]
call __Unwind_Resume
| long long testing::internal::PrintTestPartResultToString[abi:cxx11](long long a1, testing::TestPartResult *a2)
{
int v2; // eax
unsigned int v3; // eax
int v5; // [rsp+0h] [rbp-98h]
long long v6; // [rsp+8h] [rbp-90h]
long long v7; // [rsp+18h] [rbp-80h]
long long v8; // [rsp+20h] [rbp-78h]
long long v9; // [rsp+38h] [rbp-60h]
long long v10; // [rsp+40h] [rbp-58h] BYREF
long long v11[3]; // [rsp+48h] [rbp-50h] BYREF
long long v12[4]; // [rsp+60h] [rbp-38h] BYREF
_BYTE v13[8]; // [rsp+80h] [rbp-18h] BYREF
testing::TestPartResult *v14; // [rsp+88h] [rbp-10h]
int v15[2]; // [rsp+90h] [rbp-8h]
*(_QWORD *)v15 = a1;
v14 = a2;
testing::Message::Message((testing::Message *)v13);
v9 = testing::TestPartResult::file_name(v14);
v2 = testing::TestPartResult::line_number(v14);
testing::internal::FormatFileLocation[abi:cxx11](v12, v9, v2);
v8 = testing::Message::operator<<<std::string>((long long)v13, (long long)v12);
v7 = testing::Message::operator<<<char [2]>(v8, " ");
v3 = testing::TestPartResult::type(v14);
v11[0] = testing::TestPartResultTypeToString(v3);
v6 = testing::Message::operator<<<char const>(v7, v11);
v10 = testing::TestPartResult::message(v14);
v5 = testing::Message::operator<<<char const>(v6, &v10);
testing::Message::GetString[abi:cxx11](a1, v5);
std::string::~string(v12);
testing::Message::~Message((testing::Message *)v13);
return a1;
}
| PrintTestPartResultToString[abi:cxx11]:
SUB RSP,0x98
MOV qword ptr [RSP + 0x28],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x90],RDI
MOV qword ptr [RSP + 0x88],RSI
LEA RDI,[RSP + 0x80]
CALL 0x001c8d80
MOV RDI,qword ptr [RSP + 0x88]
CALL 0x001eceb0
MOV qword ptr [RSP + 0x38],RAX
MOV RDI,qword ptr [RSP + 0x88]
CALL 0x001ecf00
MOV RSI,qword ptr [RSP + 0x38]
MOV EDX,EAX
LAB_001cea67:
LEA RDI,[RSP + 0x60]
CALL 0x001c13f0
JMP 0x001cea73
LAB_001cea73:
LEA RDI,[RSP + 0x80]
LEA RSI,[RSP + 0x60]
CALL 0x00132aa0
MOV qword ptr [RSP + 0x20],RAX
JMP 0x001cea8c
LAB_001cea8c:
MOV RDI,qword ptr [RSP + 0x20]
LEA RSI,[0x21d103]
CALL 0x001eb120
MOV qword ptr [RSP + 0x18],RAX
JMP 0x001ceaa4
LAB_001ceaa4:
MOV RDI,qword ptr [RSP + 0x88]
CALL 0x001ecf10
MOV EDI,EAX
CALL 0x001e69a0
MOV qword ptr [RSP + 0x10],RAX
JMP 0x001ceabf
LAB_001ceabf:
MOV RDI,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x48],RAX
LEA RSI,[RSP + 0x48]
CALL 0x001329f0
MOV qword ptr [RSP + 0x8],RAX
JMP 0x001ceadf
LAB_001ceadf:
MOV RDI,qword ptr [RSP + 0x88]
CALL 0x001ecf20
MOV RDI,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x40],RAX
LEA RSI,[RSP + 0x40]
CALL 0x001329f0
MOV qword ptr [RSP],RAX
JMP 0x001ceb06
LAB_001ceb06:
MOV RSI,qword ptr [RSP]
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x001bad90
LAB_001ceb14:
JMP 0x001ceb16
LAB_001ceb16:
LEA RDI,[RSP + 0x60]
CALL 0x0011dfd0
LEA RDI,[RSP + 0x80]
CALL 0x0011e080
MOV RAX,qword ptr [RSP + 0x30]
ADD RSP,0x98
RET
|
/* testing::internal::PrintTestPartResultToString[abi:cxx11](testing::TestPartResult const&) */
internal * __thiscall
testing::internal::PrintTestPartResultToString_abi_cxx11_(internal *this,TestPartResult *param_1)
{
int iVar1;
int4 uVar2;
char *pcVar3;
Message *pMVar4;
char *local_58;
char *local_50 [3];
internal local_38 [32];
Message local_18 [8];
TestPartResult *local_10;
internal *local_8;
local_10 = param_1;
local_8 = this;
Message::Message(local_18);
pcVar3 = (char *)TestPartResult::file_name(local_10);
iVar1 = TestPartResult::line_number(local_10);
/* try { // try from 001cea67 to 001cea70 has its CatchHandler @ 001ceb3a */
FormatFileLocation_abi_cxx11_(local_38,pcVar3,iVar1);
/* try { // try from 001cea73 to 001ceb13 has its CatchHandler @ 001ceb4a */
pMVar4 = Message::operator<<(local_18,(string *)local_38);
pMVar4 = Message::operator<<(pMVar4," ");
uVar2 = TestPartResult::type(local_10);
local_50[0] = (char *)TestPartResultTypeToString(uVar2);
pMVar4 = Message::operator<<(pMVar4,local_50);
local_58 = (char *)TestPartResult::message(local_10);
Message::operator<<(pMVar4,&local_58);
Message::GetString_abi_cxx11_();
std::__cxx11::string::~string((string *)local_38);
Message::~Message(local_18);
return this;
}
| |
29,885 | inline_mysql_cond_signal | eloqsql/include/mysql/psi/mysql_thread.h | static inline int inline_mysql_cond_signal(
mysql_cond_t *that)
{
int result;
#ifdef HAVE_PSI_COND_INTERFACE
if (psi_likely(that->m_psi != NULL))
PSI_COND_CALL(signal_cond)(that->m_psi);
#endif
result= pthread_cond_signal(&that->m_cond);
return result;
} | O0 | c | inline_mysql_cond_signal:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x30(%rax)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x73adb
leaq 0x1c59d9(%rip), %rax # 0x2394a0
movq (%rax), %rax
movq 0x170(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x30(%rcx), %rdi
callq *%rax
movq -0x8(%rbp), %rdi
callq 0x28030
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
| inline_mysql_cond_signal_0:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
cmp qword ptr [rax+30h], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_73ADB
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+170h]
mov rcx, [rbp+var_8]
mov rdi, [rcx+30h]
call rax
loc_73ADB:
mov rdi, [rbp+var_8]
call _pthread_cond_signal
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
add rsp, 10h
pop rbp
retn
| long long inline_mysql_cond_signal_0(long long a1)
{
if ( *(_QWORD *)(a1 + 48) )
((void ( *)(_QWORD))PSI_server[46])(*(_QWORD *)(a1 + 48));
return (unsigned int)pthread_cond_signal(a1);
}
| inline_mysql_cond_signal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x30],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00173adb
LEA RAX,[0x3394a0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x170]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x30]
CALL RAX
LAB_00173adb:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00128030
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
ADD RSP,0x10
POP RBP
RET
|
int inline_mysql_cond_signal(pthread_cond_t *param_1)
{
int iVar1;
if (param_1[1].__align != 0) {
(**(code **)(PSI_server + 0x170))(param_1[1].__align);
}
iVar1 = pthread_cond_signal(param_1);
return iVar1;
}
| |
29,886 | 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(unsigned long) | monkey531[P]llama/common/json.hpp | reference at(size_type idx)
{
// at only works for arrays
if (JSON_HEDLEY_LIKELY(is_array()))
{
JSON_TRY
{
return set_parent(m_data.m_value.array->at(idx));
}
JSON_CATCH (std::out_of_range&)
{
// create better exception explanation
JSON_THROW(out_of_range::create(401, detail::concat("array index ", std::to_string(idx), " is out of range"), 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>::at(unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r15
cmpb $0x2, (%rdi)
jne 0xa9f96
movq %rsi, %r12
movq 0x8(%r15), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rdx
subq %rax, %rdx
sarq $0x4, %rdx
cmpq %rsi, %rdx
jbe 0xa9ff5
shlq $0x4, %r12
addq %r12, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x1a440
movq %rax, %r14
movq %r15, %rdi
callq 0x5e3ac
leaq 0x20(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x45eb8(%rip), %rsi # 0xefe72
movq %rsp, %rdi
callq 0xaa355
movb $0x1, %bpl
movq %rsp, %rdx
movq %r14, %rdi
movl $0x130, %esi # imm = 0x130
movq %r15, %rcx
callq 0x5e154
xorl %ebp, %ebp
leaq 0x7ef77(%rip), %rsi # 0x128f58
leaq -0x4f986(%rip), %rdx # 0x5a662
movq %r14, %rdi
callq 0x1af20
jmp 0xaa07d
leaq 0x453c0(%rip), %rdi # 0xef3bc
movq %r12, %rsi
xorl %eax, %eax
callq 0x1ad00
movq %rax, %rbx
cmpl $0x1, %edx
jne 0xaa127
movq %rbx, %rdi
callq 0x1a380
movl $0x20, %edi
callq 0x1a440
movq %rax, %r14
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
callq 0x5ca16
leaq 0x45e19(%rip), %rsi # 0xefe54
leaq 0x45e1f(%rip), %rcx # 0xefe61
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0xaa2b0
movb $0x1, %bpl
movq %rsp, %rdx
movq %r14, %rdi
movl $0x191, %esi # imm = 0x191
movq %r15, %rcx
callq 0x5c7c4
xorl %ebp, %ebp
leaq 0x7ee6a(%rip), %rsi # 0x128ed8
leaq -0x4fa13(%rip), %rdx # 0x5a662
movq %r14, %rdi
callq 0x1af20
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xaa09b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a8e0
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xaa0b6
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a8e0
testb %bpl, %bpl
jne 0xaa0e0
jmp 0xaa0e8
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xaa0e0
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a8e0
jmp 0xaa0e0
movq %rax, %rbx
movq %r14, %rdi
callq 0x1a690
callq 0x1ae60
jmp 0xaa127
movq %rax, %rdi
callq 0x212e3
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xaa115
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a8e0
testb %bpl, %bpl
jne 0xaa11f
jmp 0xaa127
movq %rax, %rbx
movq %r14, %rdi
callq 0x1a690
movq %rbx, %rdi
callq 0x1afa0
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atEm:
push rbp; char
push r15; int
push r14; int
push r12; int
push rbx; char
sub rsp, 40h
mov r15, rdi
cmp byte ptr [rdi], 2
jnz short loc_A9F96
mov r12, rsi
mov rcx, [r15+8]
mov rax, [rcx]
mov rdx, [rcx+8]
sub rdx, rax
sar rdx, 4
cmp rdx, rsi
jbe short loc_A9FF5
shl r12, 4
add rax, r12
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_A9F96:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, r15
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+68h+var_48]
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
mov rdi, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
mov rdx, rsp
mov rdi, r14; this
mov esi, 130h; int
mov rcx, r15
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, r14; void *
call ___cxa_throw
jmp loc_AA07D
loc_A9FF5:
lea rdi, aVectorMRangeCh; "vector::_M_range_check: __n (which is %"...
mov rsi, r12
xor eax, eax
call __ZSt24__throw_out_of_range_fmtPKcz; std::__throw_out_of_range_fmt(char const*,...)
mov rbx, rax
cmp edx, 1
jnz loc_AA127
mov rdi, rbx; void *
call ___cxa_begin_catch
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rdi, [rsp+68h+var_48]; this
mov rsi, r12; unsigned __int64
call _ZNSt7__cxx119to_stringEm; std::to_string(ulong)
lea rsi, aArrayIndex; "array index "
lea rcx, aIsOutOfRange; " is out of range"
mov rdi, rsp
lea rdx, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA13_KcS8_RA17_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[13],std::string,char const(&)[17]>(char const(&)[13],std::string,char const(&)[17] &&)
mov bpl, 1
mov rdx, rsp
mov rdi, r14; this
mov esi, 191h; int
mov rcx, r15
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, r14; void *
call ___cxa_throw
loc_AA07D:
mov rbx, rax
lea rax, [rsp+68h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_AA09B
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_AA09B:
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_AA0B6
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_AA0B6:
test bpl, bpl
jnz short loc_AA0E0
jmp short loc_AA0E8
mov rbx, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_AA0E0
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_AA0E0
mov rbx, rax
loc_AA0E0:
mov rdi, r14; void *
call ___cxa_free_exception
loc_AA0E8:
call ___cxa_end_catch
jmp short loc_AA127
mov rdi, rax
call __clang_call_terminate
mov rbx, rax
lea rax, [rsp+68h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_AA115
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_AA115:
test bpl, bpl
jnz short loc_AA11F
jmp short loc_AA127
mov rbx, rax
loc_AA11F:
mov rdi, r14; void *
call ___cxa_free_exception
loc_AA127:
mov rdi, rbx
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>::at(
long long a1,
unsigned long long a2)
{
_QWORD *v2; // rcx
unsigned long long v3; // rdx
nlohmann::json_abi_v3_11_3::detail::exception *exception; // r14
_QWORD v6[6]; // [rsp+0h] [rbp-68h] BYREF
if ( *(_BYTE *)a1 != 2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v6[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(&)[22],char const*>(v6, "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,
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);
}
v2 = *(_QWORD **)(a1 + 8);
v3 = (long long)(v2[1] - *v2) >> 4;
if ( v3 <= a2 )
std::__throw_out_of_range_fmt("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)", a2, v3);
return 16 * a2 + *v2;
}
| at:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R15,RDI
CMP byte ptr [RDI],0x2
JNZ 0x001a9f96
MOV R12,RSI
MOV RCX,qword ptr [R15 + 0x8]
MOV RAX,qword ptr [RCX]
MOV RDX,qword ptr [RCX + 0x8]
SUB RDX,RAX
SAR RDX,0x4
CMP RDX,RSI
JBE 0x001a9ff5
SHL R12,0x4
ADD RAX,R12
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001a9f96:
MOV EDI,0x20
CALL 0x0011a440
MOV R14,RAX
MOV RDI,R15
CALL 0x0015e3ac
LEA RDX,[RSP + 0x20]
MOV qword ptr [RDX],RAX
LAB_001a9fb3:
LEA RSI,[0x1efe72]
MOV RDI,RSP
CALL 0x001aa355
MOV BPL,0x1
LAB_001a9fc5:
MOV RDX,RSP
MOV RDI,R14
MOV ESI,0x130
MOV RCX,R15
CALL 0x0015e154
XOR EBP,EBP
LEA RSI,[0x228f58]
LEA RDX,[0x15a662]
MOV RDI,R14
CALL 0x0011af20
LAB_001a9ff5:
LEA RDI,[0x1ef3bc]
MOV RSI,R12
XOR EAX,EAX
CALL 0x0011ad00
LAB_001aa006:
MOV RBX,RAX
CMP EDX,0x1
JNZ 0x001aa127
MOV RDI,RBX
CALL 0x0011a380
MOV EDI,0x20
CALL 0x0011a440
MOV R14,RAX
LAB_001aa027:
LEA RDI,[RSP + 0x20]
MOV RSI,R12
CALL 0x0015ca16
LAB_001aa034:
LEA RSI,[0x1efe54]
LEA RCX,[0x1efe61]
MOV RDI,RSP
LEA RDX,[RSP + 0x20]
CALL 0x001aa2b0
MOV BPL,0x1
LAB_001aa052:
MOV RDX,RSP
MOV RDI,R14
MOV ESI,0x191
MOV RCX,R15
CALL 0x0015c7c4
XOR EBP,EBP
LEA RSI,[0x228ed8]
LEA RDX,[0x15a662]
MOV RDI,R14
CALL 0x0011af20
LAB_001aa127:
MOV RDI,RBX
CALL 0x0011afa0
|
/* 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>::at(unsigned long) */
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>
::at(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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,ulong param_1)
{
long lVar1;
int8 uVar2;
int1 auVar3 [12];
detail adStack_68 [32];
char *local_48 [4];
if (*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>
)0x2) {
uVar2 = __cxa_allocate_exception(0x20);
local_48[0] = (char *)type_name(this);
/* try { // try from 001a9fb3 to 001a9fc1 has its CatchHandler @ 001aa11c */
detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(adStack_68,"cannot use at() with ",local_48);
/* try { // try from 001a9fc5 to 001a9fef has its CatchHandler @ 001aa0f7 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar2,0x130,adStack_68,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception);
}
lVar1 = **(long **)(this + 8);
if (param_1 < (ulong)((*(long **)(this + 8))[1] - lVar1 >> 4)) {
return lVar1 + param_1 * 0x10;
}
/* try { // try from 001a9ff5 to 001aa005 has its CatchHandler @ 001aa006 */
auVar3 = std::__throw_out_of_range_fmt
("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)",
param_1);
/* catch(type#1 @ 0022d870) { ... } // from try @ 001a9ff5 with catch @ 001aa006
*/
if (auVar3._8_4_ == 1) {
__cxa_begin_catch(auVar3._0_8_);
uVar2 = __cxa_allocate_exception(0x20);
/* try { // try from 001aa027 to 001aa033 has its CatchHandler @ 001aa0dd */
std::__cxx11::to_string((__cxx11 *)local_48,param_1);
/* try { // try from 001aa034 to 001aa04e has its CatchHandler @ 001aa0bd */
detail::concat<std::__cxx11::string,char_const(&)[13],std::__cxx11::string,char_const(&)[17]>
(adStack_68,"array index ",(string *)local_48," is out of range");
/* try { // try from 001aa052 to 001aa07c has its CatchHandler @ 001aa07d */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar2,0x191,adStack_68,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&detail::out_of_range::typeinfo,detail::exception::~exception);
}
/* WARNING: Subroutine does not return */
_Unwind_Resume(auVar3._0_8_);
}
| |
29,887 | my_interval_timer | eloqsql/mysys/my_getsystime.c | ulonglong my_interval_timer()
{
#ifdef HAVE_CLOCK_GETTIME
struct timespec tp;
clock_gettime(CLOCK_MONOTONIC, &tp);
return tp.tv_sec*1000000000ULL+tp.tv_nsec;
#elif defined(HAVE_GETHRTIME)
return gethrtime();
#elif defined(_WIN32)
DBUG_ASSERT(query_performance_frequency);
LARGE_INTEGER t_cnt;
QueryPerformanceCounter(&t_cnt);
return (t_cnt.QuadPart / query_performance_frequency * 1000000000ULL) +
((t_cnt.QuadPart % query_performance_frequency) * 1000000000ULL /
query_performance_frequency);
#else
/* TODO: check for other possibilities for hi-res timestamping */
struct timeval tv;
gettimeofday(&tv,NULL);
return tv.tv_sec*1000000000ULL+tv.tv_usec*1000ULL;
#endif
} | O3 | c | my_interval_timer:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
leaq -0x18(%rbp), %rbx
movl $0x1, %edi
movq %rbx, %rsi
callq 0x24270
imulq $0x3b9aca00, (%rbx), %rax # imm = 0x3B9ACA00
addq 0x8(%rbx), %rax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
| my_interval_timer:
push rbp
mov rbp, rsp
push rbx
sub rsp, 18h
lea rbx, [rbp+var_18]
mov edi, 1
mov rsi, rbx
call _clock_gettime
imul rax, [rbx], 3B9ACA00h
add rax, [rbx+8]
add rsp, 18h
pop rbx
pop rbp
retn
| long long my_interval_timer()
{
_QWORD v1[3]; // [rsp+8h] [rbp-18h] BYREF
clock_gettime(1LL, v1);
return v1[1] + 1000000000LL * v1[0];
}
| my_interval_timer:
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x18
LEA RBX,[RBP + -0x18]
MOV EDI,0x1
MOV RSI,RBX
CALL 0x00124270
IMUL RAX,qword ptr [RBX],0x3b9aca00
ADD RAX,qword ptr [RBX + 0x8]
ADD RSP,0x18
POP RBX
POP RBP
RET
|
long my_interval_timer(void)
{
timespec local_20;
clock_gettime(1,&local_20);
return local_20.tv_sec * 1000000000 + local_20.tv_nsec;
}
| |
29,888 | ftxui::(anonymous namespace)::Text::~Text() | Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/dom/text.cpp | explicit Text(std::string text) : text_(std::move(text)) {} | O1 | cpp | ftxui::(anonymous namespace)::Text::~Text():
pushq %rbx
movq %rdi, %rbx
leaq 0x33189(%rip), %rax # 0x58990
movq %rax, (%rdi)
movq 0x60(%rdi), %rdi
leaq 0x70(%rbx), %rax
cmpq %rax, %rdi
je 0x25822
movq (%rax), %rsi
incq %rsi
callq 0xb400
movq %rbx, %rdi
popq %rbx
jmp 0x24132
nop
| _ZN5ftxui12_GLOBAL__N_14TextD2Ev:
push rbx
mov rbx, rdi
lea rax, off_58990
mov [rdi], rax
mov rdi, [rdi+60h]; void *
lea rax, [rbx+70h]
cmp rdi, rax
jz short loc_25822
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_25822:
mov rdi, rbx; this
pop rbx
jmp _ZN5ftxui4NodeD2Ev; ftxui::Node::~Node()
| void ftxui::`anonymous namespace'::Text::~Text(ftxui::_anonymous_namespace_::Text *this)
{
char *v2; // rdi
*(_QWORD *)this = off_58990;
v2 = (char *)*((_QWORD *)this + 12);
if ( v2 != (char *)this + 112 )
operator delete(v2, *((_QWORD *)this + 14) + 1LL);
ftxui::Node::~Node((void **)this);
}
| ~Text:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x158990]
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x60]
LEA RAX,[RBX + 0x70]
CMP RDI,RAX
JZ 0x00125822
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x0010b400
LAB_00125822:
MOV RDI,RBX
POP RBX
JMP 0x00124132
|
/* ftxui::(anonymous namespace)::Text::~Text() */
void __thiscall ftxui::(anonymous_namespace)::Text::~Text(Text *this)
{
*(int ***)this = &PTR__Text_00158990;
if (*(Text **)(this + 0x60) != this + 0x70) {
operator_delete(*(Text **)(this + 0x60),*(long *)(this + 0x70) + 1);
}
Node::~Node((Node *)this);
return;
}
| |
29,889 | my_getwd | eloqsql/mysys/my_getwd.c | int my_getwd(char * buf, size_t size, myf MyFlags)
{
char * pos;
DBUG_ENTER("my_getwd");
DBUG_PRINT("my",("buf:%p size: %u MyFlags %lu",
buf, (uint) size, MyFlags));
if (size < 1)
DBUG_RETURN(-1);
if (curr_dir[0]) /* Current pos is saved here */
(void) strmake(buf,&curr_dir[0],size-1);
else
{
#if defined(HAVE_GETCWD)
if (size < 2)
DBUG_RETURN(-1);
if (!getcwd(buf,(uint) (size-2)) && MyFlags & MY_WME)
{
my_errno=errno;
my_error(EE_GETWD,MYF(ME_BELL),errno);
DBUG_RETURN(-1);
}
#elif defined(HAVE_GETWD)
{
char pathname[MAXPATHLEN];
getwd(pathname);
strmake(buf,pathname,size-1);
}
#else
#error "No way to get current directory"
#endif
if (*((pos=strend(buf))-1) != FN_LIBCHAR) /* End with FN_LIBCHAR */
{
pos[0]= FN_LIBCHAR;
pos[1]=0;
}
(void) strmake(&curr_dir[0],buf, (size_t) (FN_REFLEN-1));
}
DBUG_RETURN(0);
} | O0 | c | my_getwd:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
jmp 0x89dc6
cmpq $0x1, -0x18(%rbp)
jae 0x89ddb
jmp 0x89dcf
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x89eba
leaq 0x382dfe(%rip), %rax # 0x40cbe0
cmpb $0x0, (%rax)
je 0x89e04
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
subq $0x1, %rdx
leaq 0x382de6(%rip), %rsi # 0x40cbe0
callq 0xd5860
jmp 0x89eb1
cmpq $0x2, -0x18(%rbp)
jae 0x89e19
jmp 0x89e0d
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x89eba
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
subq $0x2, %rax
movl %eax, %eax
movl %eax, %esi
callq 0x383d0
cmpq $0x0, %rax
jne 0x89e77
movq -0x20(%rbp), %rax
andq $0x10, %rax
cmpq $0x0, %rax
je 0x89e77
callq 0x389e0
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
callq 0x8ca30
movl -0x2c(%rbp), %ecx
movl %ecx, (%rax)
callq 0x389e0
movl (%rax), %edx
movl $0x10, %edi
movl $0x4, %esi
movb $0x0, %al
callq 0x85630
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x89eba
movq -0x10(%rbp), %rdi
callq 0xd57e0
movq %rax, -0x28(%rbp)
movsbl -0x1(%rax), %eax
cmpl $0x2f, %eax
je 0x89e9c
movq -0x28(%rbp), %rax
movb $0x2f, (%rax)
movq -0x28(%rbp), %rax
movb $0x0, 0x1(%rax)
movq -0x10(%rbp), %rsi
leaq 0x382d39(%rip), %rdi # 0x40cbe0
movl $0x1ff, %edx # imm = 0x1FF
callq 0xd5860
jmp 0x89eb3
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_getwd:
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_89DC6:
cmp [rbp+var_18], 1
jnb short loc_89DDB
jmp short $+2
loc_89DCF:
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_89EBA
loc_89DDB:
lea rax, curr_dir
cmp byte ptr [rax], 0
jz short loc_89E04
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
sub rdx, 1
lea rsi, curr_dir
call strmake
jmp loc_89EB1
loc_89E04:
cmp [rbp+var_18], 2
jnb short loc_89E19
jmp short $+2
loc_89E0D:
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_89EBA
loc_89E19:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_18]
sub rax, 2
mov eax, eax
mov esi, eax
call _getcwd
cmp rax, 0
jnz short loc_89E77
mov rax, [rbp+var_20]
and rax, 10h
cmp rax, 0
jz short loc_89E77
call ___errno_location
mov eax, [rax]
mov [rbp+var_2C], eax
call _my_thread_var
mov ecx, [rbp+var_2C]
mov [rax], ecx
call ___errno_location
mov edx, [rax]
mov edi, 10h
mov esi, 4
mov al, 0
call my_error
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_89EBA
loc_89E77:
mov rdi, [rbp+var_10]
call strend
mov [rbp+var_28], rax
movsx eax, byte ptr [rax-1]
cmp eax, 2Fh ; '/'
jz short loc_89E9C
mov rax, [rbp+var_28]
mov byte ptr [rax], 2Fh ; '/'
mov rax, [rbp+var_28]
mov byte ptr [rax+1], 0
loc_89E9C:
mov rsi, [rbp+var_10]
lea rdi, curr_dir
mov edx, 1FFh
call strmake
loc_89EB1:
jmp short $+2
loc_89EB3:
mov [rbp+var_4], 0
loc_89EBA:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long my_getwd(long long a1, unsigned long long a2, char a3)
{
unsigned int *v3; // rax
int v5; // [rsp+4h] [rbp-2Ch]
_BYTE *v6; // [rsp+8h] [rbp-28h]
if ( a2 )
{
if ( curr_dir[0] )
{
strmake(a1, curr_dir, a2 - 1);
}
else
{
if ( a2 < 2 )
return (unsigned int)-1;
if ( !getcwd(a1, (unsigned int)(a2 - 2)) && (a3 & 0x10) != 0 )
{
v5 = *(_DWORD *)__errno_location(a1);
*(_DWORD *)my_thread_var() = v5;
v3 = (unsigned int *)__errno_location(a1);
my_error(0x10u, 4LL, *v3);
return (unsigned int)-1;
}
v6 = (_BYTE *)strend(a1);
if ( *(v6 - 1) != 47 )
{
*v6 = 47;
v6[1] = 0;
}
strmake(curr_dir, a1, 511LL);
}
return 0;
}
return (unsigned int)-1;
}
| my_getwd:
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 0x00189dc6
LAB_00189dc6:
CMP qword ptr [RBP + -0x18],0x1
JNC 0x00189ddb
JMP 0x00189dcf
LAB_00189dcf:
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00189eba
LAB_00189ddb:
LEA RAX,[0x50cbe0]
CMP byte ptr [RAX],0x0
JZ 0x00189e04
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
SUB RDX,0x1
LEA RSI,[0x50cbe0]
CALL 0x001d5860
JMP 0x00189eb1
LAB_00189e04:
CMP qword ptr [RBP + -0x18],0x2
JNC 0x00189e19
JMP 0x00189e0d
LAB_00189e0d:
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00189eba
LAB_00189e19:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,0x2
MOV EAX,EAX
MOV ESI,EAX
CALL 0x001383d0
CMP RAX,0x0
JNZ 0x00189e77
MOV RAX,qword ptr [RBP + -0x20]
AND RAX,0x10
CMP RAX,0x0
JZ 0x00189e77
CALL 0x001389e0
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
CALL 0x0018ca30
MOV ECX,dword ptr [RBP + -0x2c]
MOV dword ptr [RAX],ECX
CALL 0x001389e0
MOV EDX,dword ptr [RAX]
MOV EDI,0x10
MOV ESI,0x4
MOV AL,0x0
CALL 0x00185630
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00189eba
LAB_00189e77:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001d57e0
MOV qword ptr [RBP + -0x28],RAX
MOVSX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x2f
JZ 0x00189e9c
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],0x2f
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x1],0x0
LAB_00189e9c:
MOV RSI,qword ptr [RBP + -0x10]
LEA RDI,[0x50cbe0]
MOV EDX,0x1ff
CALL 0x001d5860
LAB_00189eb1:
JMP 0x00189eb3
LAB_00189eb3:
MOV dword ptr [RBP + -0x4],0x0
LAB_00189eba:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 my_getwd(char *param_1,ulong param_2,ulong param_3)
{
int iVar1;
char *pcVar2;
int *piVar3;
int1 *puVar4;
if (param_2 == 0) {
return 0xffffffff;
}
if (curr_dir == '\0') {
if (param_2 < 2) {
return 0xffffffff;
}
pcVar2 = getcwd(param_1,(ulong)((int)param_2 - 2));
if ((pcVar2 == (char *)0x0) && ((param_3 & 0x10) != 0)) {
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar3 = (int *)_my_thread_var();
*piVar3 = iVar1;
piVar3 = __errno_location();
my_error(0x10,4,*piVar3);
return 0xffffffff;
}
puVar4 = (int1 *)strend(param_1);
if (puVar4[-1] != '/') {
*puVar4 = 0x2f;
puVar4[1] = 0;
}
strmake(&curr_dir,param_1,0x1ff);
}
else {
strmake(param_1,&curr_dir,param_2 - 1);
}
return 0;
}
| |
29,890 | my_getwd | eloqsql/mysys/my_getwd.c | int my_getwd(char * buf, size_t size, myf MyFlags)
{
char * pos;
DBUG_ENTER("my_getwd");
DBUG_PRINT("my",("buf:%p size: %u MyFlags %lu",
buf, (uint) size, MyFlags));
if (size < 1)
DBUG_RETURN(-1);
if (curr_dir[0]) /* Current pos is saved here */
(void) strmake(buf,&curr_dir[0],size-1);
else
{
#if defined(HAVE_GETCWD)
if (size < 2)
DBUG_RETURN(-1);
if (!getcwd(buf,(uint) (size-2)) && MyFlags & MY_WME)
{
my_errno=errno;
my_error(EE_GETWD,MYF(ME_BELL),errno);
DBUG_RETURN(-1);
}
#elif defined(HAVE_GETWD)
{
char pathname[MAXPATHLEN];
getwd(pathname);
strmake(buf,pathname,size-1);
}
#else
#error "No way to get current directory"
#endif
if (*((pos=strend(buf))-1) != FN_LIBCHAR) /* End with FN_LIBCHAR */
{
pos[0]= FN_LIBCHAR;
pos[1]=0;
}
(void) strmake(&curr_dir[0],buf, (size_t) (FN_REFLEN-1));
}
DBUG_RETURN(0);
} | O3 | c | my_getwd:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
testq %rsi, %rsi
je 0x2f749
movq %rdx, %r15
movq %rsi, %rdx
movq %rdi, %r14
leaq 0x349998(%rip), %rax # 0x379080
cmpb $0x0, (%rax)
je 0x2f703
decq %rdx
leaq 0x349989(%rip), %rsi # 0x379080
movq %r14, %rdi
callq 0x631d4
xorl %ebx, %ebx
jmp 0x2f749
cmpq $0x1, %rdx
je 0x2f749
addl $-0x2, %edx
movq %r14, %rdi
movq %rdx, %rsi
callq 0x241c0
testb $0x10, %r15b
je 0x2f756
testq %rax, %rax
jne 0x2f756
callq 0x24050
movq %rax, %r14
movl (%rax), %r15d
callq 0x3193e
movl %r15d, (%rax)
movl (%r14), %edx
movl $0x4, %esi
movl $0x10, %edi
xorl %eax, %eax
callq 0x2cce7
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x6318c
cmpb $0x2f, -0x1(%rax)
je 0x2f769
movw $0x2f, (%rax)
leaq 0x349910(%rip), %rdi # 0x379080
movl $0x1ff, %edx # imm = 0x1FF
movq %r14, %rsi
jmp 0x2f6fa
| my_getwd:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov ebx, 0FFFFFFFFh
test rsi, rsi
jz short loc_2F749
mov r15, rdx
mov rdx, rsi
mov r14, rdi
lea rax, curr_dir
cmp byte ptr [rax], 0
jz short loc_2F703
dec rdx
lea rsi, curr_dir
mov rdi, r14
loc_2F6FA:
call strmake
xor ebx, ebx
jmp short loc_2F749
loc_2F703:
cmp rdx, 1
jz short loc_2F749
add edx, 0FFFFFFFEh
mov rdi, r14
mov rsi, rdx
call _getcwd
test r15b, 10h
jz short loc_2F756
test rax, rax
jnz short loc_2F756
call ___errno_location
mov r14, rax
mov r15d, [rax]
call _my_thread_var
mov [rax], r15d
mov edx, [r14]
mov esi, 4
mov edi, 10h
xor eax, eax
call my_error
loc_2F749:
mov eax, ebx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_2F756:
mov rdi, r14
call strend
cmp byte ptr [rax-1], 2Fh ; '/'
jz short loc_2F769
mov word ptr [rax], 2Fh ; '/'
loc_2F769:
lea rdi, curr_dir
mov edx, 1FFh
mov rsi, r14
jmp short loc_2F6FA
| long long my_getwd(_BYTE *a1, long long a2, char a3)
{
unsigned int v3; // ebx
_BYTE *v5; // r14
long long v6; // rdx
_BYTE *v7; // rsi
long long v8; // rsi
long long v9; // rax
unsigned int *v10; // r14
unsigned int v11; // r15d
long long v12; // rdx
long long v13; // rcx
long long v14; // r8
long long v15; // r9
_WORD *v17; // rax
v3 = -1;
if ( a2 )
{
v5 = a1;
if ( curr_dir[0] )
{
v6 = a2 - 1;
v7 = curr_dir;
}
else
{
if ( a2 == 1 )
return v3;
v8 = (unsigned int)(a2 - 2);
v9 = getcwd(a1, v8);
if ( (a3 & 0x10) != 0 && !v9 )
{
v10 = (unsigned int *)__errno_location(a1);
v11 = *v10;
*(_DWORD *)my_thread_var(a1, v8, v12, v13, v14, v15) = v11;
my_error(0x10u, 4LL, *v10);
return v3;
}
v17 = (_WORD *)strend(a1);
if ( *((_BYTE *)v17 - 1) != 47 )
*v17 = 47;
a1 = curr_dir;
v6 = 511LL;
v7 = v5;
}
strmake(a1, v7, v6);
return 0;
}
return v3;
}
| my_getwd:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,0xffffffff
TEST RSI,RSI
JZ 0x0012f749
MOV R15,RDX
MOV RDX,RSI
MOV R14,RDI
LEA RAX,[0x479080]
CMP byte ptr [RAX],0x0
JZ 0x0012f703
DEC RDX
LEA RSI,[0x479080]
MOV RDI,R14
LAB_0012f6fa:
CALL 0x001631d4
XOR EBX,EBX
JMP 0x0012f749
LAB_0012f703:
CMP RDX,0x1
JZ 0x0012f749
ADD EDX,-0x2
MOV RDI,R14
MOV RSI,RDX
CALL 0x001241c0
TEST R15B,0x10
JZ 0x0012f756
TEST RAX,RAX
JNZ 0x0012f756
CALL 0x00124050
MOV R14,RAX
MOV R15D,dword ptr [RAX]
CALL 0x0013193e
MOV dword ptr [RAX],R15D
MOV EDX,dword ptr [R14]
MOV ESI,0x4
MOV EDI,0x10
XOR EAX,EAX
CALL 0x0012cce7
LAB_0012f749:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0012f756:
MOV RDI,R14
CALL 0x0016318c
CMP byte ptr [RAX + -0x1],0x2f
JZ 0x0012f769
MOV word ptr [RAX],0x2f
LAB_0012f769:
LEA RDI,[0x479080]
MOV EDX,0x1ff
MOV RSI,R14
JMP 0x0012f6fa
|
int8 my_getwd(char *param_1,long param_2,ulong param_3)
{
int iVar1;
char *pcVar2;
int *piVar3;
int *piVar4;
int2 *puVar5;
char *pcVar6;
if (param_2 == 0) {
return 0xffffffff;
}
if (curr_dir == '\0') {
if (param_2 == 1) {
return 0xffffffff;
}
pcVar2 = getcwd(param_1,(ulong)((int)param_2 - 2));
if (((param_3 & 0x10) != 0) && (pcVar2 == (char *)0x0)) {
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar4 = (int *)_my_thread_var();
*piVar4 = iVar1;
my_error(0x10,4,*piVar3);
return 0xffffffff;
}
puVar5 = (int2 *)strend(param_1);
if (*(char *)((long)puVar5 + -1) != '/') {
*puVar5 = 0x2f;
}
pcVar6 = &curr_dir;
param_2 = 0x1ff;
pcVar2 = param_1;
}
else {
param_2 = param_2 + -1;
pcVar2 = &curr_dir;
pcVar6 = param_1;
}
strmake(pcVar6,pcVar2,param_2);
return 0;
}
| |
29,891 | ma_dpointer | eloqsql/storage/maria/ma_search.c | void _ma_dpointer(MARIA_SHARE *share, uchar *buff, my_off_t pos)
{
if (pos != HA_OFFSET_ERROR)
pos= (*share->recpos_to_keypos)(share, pos);
switch (share->rec_reflength) {
#if SIZEOF_OFF_T > 4
case 8: mi_int8store(buff,pos); break;
case 7: mi_int7store(buff,pos); break;
case 6: mi_int6store(buff,pos); break;
case 5: mi_int5store(buff,pos); break;
#else
case 8: *buff++=0;
/* fall through */
case 7: *buff++=0;
/* fall through */
case 6: *buff++=0;
/* fall through */
case 5: *buff++=0;
/* fall through */
#endif
case 4: mi_int4store(buff,pos); break;
case 3: mi_int3store(buff,pos); break;
case 2: mi_int2store(buff,(uint) pos); break;
case 0: break; /* For NO_RECORD */
default: abort(); /* Impossible */
}
} | O0 | c | ma_dpointer:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $-0x1, -0x18(%rbp)
je 0x977c7
movq -0x8(%rbp), %rax
movq 0x6d0(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq *%rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x740(%rax), %eax
movq %rax, -0x88(%rbp)
subq $0x8, %rax
ja 0x97aa9
movq -0x88(%rbp), %rax
leaq 0xc3040(%rip), %rcx # 0x15a830
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
shrq $0x20, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x30(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x30(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x30(%rbp), %rax
shrq $0x18, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x7(%rax)
movq -0x38(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x6(%rax)
movq -0x38(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x5(%rax)
movq -0x38(%rbp), %rax
shrq $0x18, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x4(%rax)
jmp 0x97aae
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
shrq $0x20, %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x6(%rax)
movq -0x40(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x5(%rax)
movq -0x40(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x4(%rax)
movq -0x40(%rbp), %rax
shrq $0x18, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x48(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x48(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x48(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0x97aae
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rax
shrq $0x20, %rax
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x5(%rax)
movq -0x50(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x4(%rax)
movq -0x50(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x50(%rbp), %rax
shrq $0x18, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x58(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x58(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0x97aae
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rax
shrq $0x20, %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x4(%rax)
movq -0x60(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x60(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x60(%rbp), %rax
shrq $0x18, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x68(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0x97aae
movq -0x18(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x70(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x70(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x70(%rbp), %rax
shrq $0x18, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0x97aae
movq -0x18(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x78(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x78(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0x97aae
movq -0x18(%rbp), %rax
movl %eax, -0x7c(%rbp)
movl -0x7c(%rbp), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x7c(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0x97aae
jmp 0x97aae
callq 0x2a5c0
addq $0x90, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _ma_dpointer:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
cmp [rbp+var_18], 0FFFFFFFFFFFFFFFFh
jz short loc_977C7
mov rax, [rbp+var_8]
mov rax, [rax+6D0h]
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
call rax
mov [rbp+var_18], rax
loc_977C7:
mov rax, [rbp+var_8]
mov eax, [rax+740h]
mov [rbp+var_88], rax
sub rax, 8; switch 9 cases
ja def_977F7; jumptable 00000000000977F7 default case, case 1
mov rax, [rbp+var_88]
lea rcx, jpt_977F7
movsxd rax, ds:(jpt_977F7 - 15A830h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_977F9:
mov rax, [rbp+var_18]; jumptable 00000000000977F7 case 8
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
shr rax, 20h
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+3], cl
mov rax, [rbp+var_30]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov rax, [rbp+var_30]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_30]
shr rax, 18h
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
mov rax, [rbp+var_20]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+7], cl
mov rax, [rbp+var_38]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+6], cl
mov rax, [rbp+var_38]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+5], cl
mov rax, [rbp+var_38]
shr rax, 18h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+4], cl
jmp loc_97AAE
loc_978A1:
mov rax, [rbp+var_18]; jumptable 00000000000977F7 case 7
mov [rbp+var_40], rax
mov rax, [rbp+var_18]
shr rax, 20h
mov [rbp+var_48], rax
mov rax, [rbp+var_40]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+6], cl
mov rax, [rbp+var_40]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+5], cl
mov rax, [rbp+var_40]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+4], cl
mov rax, [rbp+var_40]
shr rax, 18h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+3], cl
mov rax, [rbp+var_48]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov rax, [rbp+var_48]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_48]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp loc_97AAE
loc_97928:
mov rax, [rbp+var_18]; jumptable 00000000000977F7 case 6
mov [rbp+var_50], rax
mov rax, [rbp+var_18]
shr rax, 20h
mov [rbp+var_58], rax
mov rax, [rbp+var_50]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+5], cl
mov rax, [rbp+var_50]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+4], cl
mov rax, [rbp+var_50]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+3], cl
mov rax, [rbp+var_50]
shr rax, 18h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov rax, [rbp+var_58]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_58]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp loc_97AAE
loc_9799E:
mov rax, [rbp+var_18]; jumptable 00000000000977F7 case 5
mov [rbp+var_60], rax
mov rax, [rbp+var_18]
shr rax, 20h
mov [rbp+var_68], rax
mov rax, [rbp+var_60]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+4], cl
mov rax, [rbp+var_60]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+3], cl
mov rax, [rbp+var_60]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov rax, [rbp+var_60]
shr rax, 18h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_68]
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp loc_97AAE
loc_97A03:
mov rax, [rbp+var_18]; jumptable 00000000000977F7 case 4
mov [rbp+var_70], rax
mov rax, [rbp+var_70]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+3], cl
mov rax, [rbp+var_70]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov rax, [rbp+var_70]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_70]
shr rax, 18h
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp short loc_97AAE
loc_97A4C:
mov rax, [rbp+var_18]; jumptable 00000000000977F7 case 3
mov [rbp+var_78], rax
mov rax, [rbp+var_78]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov rax, [rbp+var_78]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_78]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp short loc_97AAE
loc_97A84:
mov rax, [rbp+var_18]; jumptable 00000000000977F7 case 2
mov [rbp+var_7C], eax
mov eax, [rbp+var_7C]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov eax, [rbp+var_7C]
shr eax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp short loc_97AAE
loc_97AA7:
jmp short loc_97AAE; jumptable 00000000000977F7 case 0
def_977F7:
call _abort; jumptable 00000000000977F7 default case, case 1
loc_97AAE:
add rsp, 90h
pop rbp
retn
| _BYTE * ma_dpointer(long long a1, _BYTE *a2, long long a3)
{
_BYTE *result; // rax
long long v4; // [rsp+78h] [rbp-18h]
_BYTE *v5; // [rsp+80h] [rbp-10h]
v5 = a2;
v4 = a3;
if ( a3 != -1 )
{
a2 = (_BYTE *)a3;
v4 = (*(long long ( **)(long long, long long))(a1 + 1744))(a1, a3);
}
result = (_BYTE *)*(unsigned int *)(a1 + 1856);
switch ( *(_DWORD *)(a1 + 1856) )
{
case 0:
return result;
case 2:
v5[1] = v4;
result = v5;
*v5 = BYTE1(v4);
break;
case 3:
v5[2] = v4;
v5[1] = BYTE1(v4);
result = v5;
*v5 = BYTE2(v4);
break;
case 4:
v5[3] = v4;
v5[2] = BYTE1(v4);
v5[1] = BYTE2(v4);
result = v5;
*v5 = BYTE3(v4);
break;
case 5:
v5[4] = v4;
v5[3] = BYTE1(v4);
v5[2] = BYTE2(v4);
v5[1] = BYTE3(v4);
result = v5;
*v5 = BYTE4(v4);
break;
case 6:
v5[5] = v4;
v5[4] = BYTE1(v4);
v5[3] = BYTE2(v4);
v5[2] = BYTE3(v4);
v5[1] = BYTE4(v4);
result = v5;
*v5 = BYTE5(v4);
break;
case 7:
v5[6] = v4;
v5[5] = BYTE1(v4);
v5[4] = BYTE2(v4);
v5[3] = BYTE3(v4);
v5[2] = BYTE4(v4);
v5[1] = BYTE5(v4);
result = v5;
*v5 = BYTE6(v4);
break;
case 8:
v5[3] = BYTE4(v4);
v5[2] = BYTE5(v4);
v5[1] = BYTE6(v4);
*v5 = HIBYTE(v4);
v5[7] = v4;
v5[6] = BYTE1(v4);
v5[5] = BYTE2(v4);
result = v5;
v5[4] = BYTE3(v4);
break;
default:
abort(a1, a2, a3);
}
return result;
}
| _ma_dpointer:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
CMP qword ptr [RBP + -0x18],-0x1
JZ 0x001977c7
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x6d0]
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
CALL RAX
MOV qword ptr [RBP + -0x18],RAX
LAB_001977c7:
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x740]
MOV qword ptr [RBP + -0x88],RAX
SUB RAX,0x8
JA 0x00197aa9
MOV RAX,qword ptr [RBP + -0x88]
LEA RCX,[0x25a830]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_8:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x20
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x3],CL
MOV RAX,qword ptr [RBP + -0x30]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x30]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x30]
SHR RAX,0x18
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x7],CL
MOV RAX,qword ptr [RBP + -0x38]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x6],CL
MOV RAX,qword ptr [RBP + -0x38]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x5],CL
MOV RAX,qword ptr [RBP + -0x38]
SHR RAX,0x18
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x4],CL
JMP 0x00197aae
caseD_7:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x20
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x6],CL
MOV RAX,qword ptr [RBP + -0x40]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x5],CL
MOV RAX,qword ptr [RBP + -0x40]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RBP + -0x40]
SHR RAX,0x18
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x3],CL
MOV RAX,qword ptr [RBP + -0x48]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x48]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x48]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x00197aae
caseD_6:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x20
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x5],CL
MOV RAX,qword ptr [RBP + -0x50]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RBP + -0x50]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x3],CL
MOV RAX,qword ptr [RBP + -0x50]
SHR RAX,0x18
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x58]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x58]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x00197aae
caseD_5:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x20
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x60]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RBP + -0x60]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x3],CL
MOV RAX,qword ptr [RBP + -0x60]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x60]
SHR RAX,0x18
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x68]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x00197aae
caseD_4:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x70]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x3],CL
MOV RAX,qword ptr [RBP + -0x70]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x70]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x70]
SHR RAX,0x18
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x00197aae
caseD_3:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x78]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x78]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x78]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x00197aae
caseD_2:
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x7c],EAX
MOV EAX,dword ptr [RBP + -0x7c]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV EAX,dword ptr [RBP + -0x7c]
SHR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x00197aae
caseD_0:
JMP 0x00197aae
caseD_1:
CALL 0x0012a5c0
LAB_00197aae:
ADD RSP,0x90
POP RBP
RET
|
void _ma_dpointer(long param_1,int1 *param_2,long param_3)
{
int1 uVar1;
int1 uVar2;
int1 uVar3;
int1 uVar4;
int1 uVar5;
int1 uVar6;
int1 uVar7;
long local_20;
local_20 = param_3;
if (param_3 != -1) {
local_20 = (**(code **)(param_1 + 0x6d0))(param_1,param_3);
}
uVar4 = (int1)local_20;
uVar5 = (int1)((ulong)local_20 >> 8);
uVar6 = (int1)((ulong)local_20 >> 0x10);
uVar7 = (int1)((ulong)local_20 >> 0x18);
uVar1 = (int1)((ulong)local_20 >> 0x20);
uVar2 = (int1)((ulong)local_20 >> 0x28);
uVar3 = (int1)((ulong)local_20 >> 0x30);
switch(*(int4 *)(param_1 + 0x740)) {
case 0:
break;
default:
/* WARNING: Subroutine does not return */
abort();
case 2:
param_2[1] = uVar4;
*param_2 = uVar5;
break;
case 3:
param_2[2] = uVar4;
param_2[1] = uVar5;
*param_2 = uVar6;
break;
case 4:
param_2[3] = uVar4;
param_2[2] = uVar5;
param_2[1] = uVar6;
*param_2 = uVar7;
break;
case 5:
param_2[4] = uVar4;
param_2[3] = uVar5;
param_2[2] = uVar6;
param_2[1] = uVar7;
*param_2 = uVar1;
break;
case 6:
param_2[5] = uVar4;
param_2[4] = uVar5;
param_2[3] = uVar6;
param_2[2] = uVar7;
param_2[1] = uVar1;
*param_2 = uVar2;
break;
case 7:
param_2[6] = uVar4;
param_2[5] = uVar5;
param_2[4] = uVar6;
param_2[3] = uVar7;
param_2[2] = uVar1;
param_2[1] = uVar2;
*param_2 = uVar3;
break;
case 8:
param_2[3] = uVar1;
param_2[2] = uVar2;
param_2[1] = uVar3;
*param_2 = (char)((ulong)local_20 >> 0x38);
param_2[7] = uVar4;
param_2[6] = uVar5;
param_2[5] = uVar6;
param_2[4] = uVar7;
}
return;
}
| |
29,892 | js_async_function_resolve_call | bluesky950520[P]quickjs/quickjs.c | static JSValue js_async_function_resolve_call(JSContext *ctx,
JSValue func_obj,
JSValue this_obj,
int argc, JSValue *argv,
int flags)
{
JSObject *p = JS_VALUE_GET_OBJ(func_obj);
JSAsyncFunctionData *s = p->u.async_function_data;
BOOL is_reject = p->class_id - JS_CLASS_ASYNC_FUNCTION_RESOLVE;
JSValue arg;
if (argc > 0)
arg = argv[0];
else
arg = JS_UNDEFINED;
s->func_state.throw_flag = is_reject;
if (is_reject) {
JS_Throw(ctx, js_dup(arg));
} else {
/* return value of await */
s->func_state.frame.cur_sp[-1] = js_dup(arg);
}
js_async_function_resume(ctx, s);
return JS_UNDEFINED;
} | O1 | c | js_async_function_resolve_call:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x30(%rsi), %rbx
movzwl 0x6(%rsi), %eax
addl $-0x35, %eax
testl %r9d, %r9d
jle 0x35a64
movq 0x40(%rsp), %rcx
movq (%rcx), %rdx
movq 0x8(%rcx), %r12
movabsq $-0x100000000, %r13 # imm = 0xFFFFFFFF00000000
andq %rdx, %r13
movl %edx, %ecx
jmp 0x35a6f
movl $0x3, %r12d
xorl %ecx, %ecx
xorl %r13d, %r13d
movl %eax, 0x54(%rbx)
testl %eax, %eax
je 0x35ab3
orq %rcx, %r13
movq %r13, (%rsp)
cmpl $-0x9, %r12d
jb 0x35a89
movq (%rsp), %rax
incl (%rax)
movq 0x18(%r14), %r15
leaq 0xf8(%r15), %rbp
movq 0xf0(%r15), %rsi
movq 0xf8(%r15), %rdx
movq %r15, %rdi
callq 0x1ccb2
movq %r13, 0xf0(%r15)
jmp 0x35ad5
movq 0xa0(%rbx), %rbp
orq %rcx, %r13
movq %r13, (%rsp)
cmpl $-0x9, %r12d
jb 0x35acd
movq (%rsp), %rax
incl (%rax)
movq %r13, -0x10(%rbp)
addq $-0x8, %rbp
movq %r12, (%rbp)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x52423
movl $0x3, %edx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_async_function_resolve_call:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rdi
mov rbx, [rsi+30h]
movzx eax, word ptr [rsi+6]
add eax, 0FFFFFFCBh
test r9d, r9d
jle short loc_35A64
mov rcx, [rsp+38h+arg_0]
mov rdx, [rcx]
mov r12, [rcx+8]
mov r13, 0FFFFFFFF00000000h
and r13, rdx
mov ecx, edx
jmp short loc_35A6F
loc_35A64:
mov r12d, 3
xor ecx, ecx
xor r13d, r13d
loc_35A6F:
mov [rbx+54h], eax
test eax, eax
jz short loc_35AB3
or r13, rcx
mov [rsp+38h+var_38], r13
cmp r12d, 0FFFFFFF7h
jb short loc_35A89
mov rax, [rsp+38h+var_38]
inc dword ptr [rax]
loc_35A89:
mov r15, [r14+18h]
lea rbp, [r15+0F8h]
mov rsi, [r15+0F0h]
mov rdx, [r15+0F8h]
mov rdi, r15
call JS_FreeValueRT
mov [r15+0F0h], r13
jmp short loc_35AD5
loc_35AB3:
mov rbp, [rbx+0A0h]
or r13, rcx
mov [rsp+38h+var_38], r13
cmp r12d, 0FFFFFFF7h
jb short loc_35ACD
mov rax, [rsp+38h+var_38]
inc dword ptr [rax]
loc_35ACD:
mov [rbp-10h], r13
add rbp, 0FFFFFFFFFFFFFFF8h
loc_35AD5:
mov [rbp+0], r12
mov rdi, r14
mov rsi, rbx
call js_async_function_resume
mov edx, 3
xor eax, eax
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long js_async_function_resolve_call(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
int a6,
long long *a7)
{
long long v7; // rbx
int v8; // eax
long long v9; // r12
unsigned long long v10; // r13
long long v11; // rcx
_DWORD *v12; // r13
long long v13; // r15
long long *v14; // rbp
long long v15; // rbp
_DWORD *v16; // r13
v7 = *(_QWORD *)(a2 + 48);
v8 = *(unsigned __int16 *)(a2 + 6) - 53;
if ( a6 <= 0 )
{
v9 = 3LL;
v11 = 0LL;
v10 = 0LL;
}
else
{
a3 = *a7;
v9 = a7[1];
v10 = *a7 & 0xFFFFFFFF00000000LL;
v11 = (unsigned int)*a7;
}
*(_DWORD *)(v7 + 84) = v8;
if ( v8 )
{
v12 = (_DWORD *)(v11 | v10);
if ( (unsigned int)v9 >= 0xFFFFFFF7 )
++*v12;
v13 = *(_QWORD *)(a1 + 24);
v14 = (long long *)(v13 + 248);
JS_FreeValueRT(v13, *(_DWORD **)(v13 + 240), *(_QWORD *)(v13 + 248));
*(_QWORD *)(v13 + 240) = v12;
}
else
{
v15 = *(_QWORD *)(v7 + 160);
v16 = (_DWORD *)(v11 | v10);
if ( (unsigned int)v9 >= 0xFFFFFFF7 )
++*v16;
*(_QWORD *)(v15 - 16) = v16;
v14 = (long long *)(v15 - 8);
}
*v14 = v9;
js_async_function_resume(a1, v7, a3);
return 0LL;
}
| js_async_function_resolve_call:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RDI
MOV RBX,qword ptr [RSI + 0x30]
MOVZX EAX,word ptr [RSI + 0x6]
ADD EAX,-0x35
TEST R9D,R9D
JLE 0x00135a64
MOV RCX,qword ptr [RSP + 0x40]
MOV RDX,qword ptr [RCX]
MOV R12,qword ptr [RCX + 0x8]
MOV R13,-0x100000000
AND R13,RDX
MOV ECX,EDX
JMP 0x00135a6f
LAB_00135a64:
MOV R12D,0x3
XOR ECX,ECX
XOR R13D,R13D
LAB_00135a6f:
MOV dword ptr [RBX + 0x54],EAX
TEST EAX,EAX
JZ 0x00135ab3
OR R13,RCX
MOV qword ptr [RSP],R13
CMP R12D,-0x9
JC 0x00135a89
MOV RAX,qword ptr [RSP]
INC dword ptr [RAX]
LAB_00135a89:
MOV R15,qword ptr [R14 + 0x18]
LEA RBP,[R15 + 0xf8]
MOV RSI,qword ptr [R15 + 0xf0]
MOV RDX,qword ptr [R15 + 0xf8]
MOV RDI,R15
CALL 0x0011ccb2
MOV qword ptr [R15 + 0xf0],R13
JMP 0x00135ad5
LAB_00135ab3:
MOV RBP,qword ptr [RBX + 0xa0]
OR R13,RCX
MOV qword ptr [RSP],R13
CMP R12D,-0x9
JC 0x00135acd
MOV RAX,qword ptr [RSP]
INC dword ptr [RAX]
LAB_00135acd:
MOV qword ptr [RBP + -0x10],R13
ADD RBP,-0x8
LAB_00135ad5:
MOV qword ptr [RBP],R12
MOV RDI,R14
MOV RSI,RBX
CALL 0x00152423
MOV EDX,0x3
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16] js_async_function_resolve_call(long param_1,long param_2)
{
long lVar1;
long lVar2;
int iVar3;
ulong uVar4;
ulong *puVar5;
int in_R9D;
ulong uVar6;
ulong uVar7;
int *piVar8;
ulong *in_stack_00000008;
lVar1 = *(long *)(param_2 + 0x30);
iVar3 = *(ushort *)(param_2 + 6) - 0x35;
if (in_R9D < 1) {
uVar6 = 3;
uVar4 = 0;
uVar7 = 0;
}
else {
uVar6 = in_stack_00000008[1];
uVar7 = *in_stack_00000008 & 0xffffffff00000000;
uVar4 = *in_stack_00000008 & 0xffffffff;
}
*(int *)(lVar1 + 0x54) = iVar3;
if (iVar3 == 0) {
lVar2 = *(long *)(lVar1 + 0xa0);
piVar8 = (int *)(uVar7 | uVar4);
if (0xfffffff6 < (uint)uVar6) {
*piVar8 = *piVar8 + 1;
}
*(int **)(lVar2 + -0x10) = piVar8;
puVar5 = (ulong *)(lVar2 + -8);
}
else {
piVar8 = (int *)(uVar7 | uVar4);
if (0xfffffff6 < (uint)uVar6) {
*piVar8 = *piVar8 + 1;
}
lVar2 = *(long *)(param_1 + 0x18);
puVar5 = (ulong *)(lVar2 + 0xf8);
JS_FreeValueRT(lVar2,*(int8 *)(lVar2 + 0xf0),*(int8 *)(lVar2 + 0xf8));
*(int **)(lVar2 + 0xf0) = piVar8;
}
*puVar5 = uVar6;
js_async_function_resume(param_1,lVar1);
return ZEXT816(3) << 0x40;
}
| |
29,893 | js_async_function_resolve_call | bluesky950520[P]quickjs/quickjs.c | static JSValue js_async_function_resolve_call(JSContext *ctx,
JSValue func_obj,
JSValue this_obj,
int argc, JSValue *argv,
int flags)
{
JSObject *p = JS_VALUE_GET_OBJ(func_obj);
JSAsyncFunctionData *s = p->u.async_function_data;
BOOL is_reject = p->class_id - JS_CLASS_ASYNC_FUNCTION_RESOLVE;
JSValue arg;
if (argc > 0)
arg = argv[0];
else
arg = JS_UNDEFINED;
s->func_state.throw_flag = is_reject;
if (is_reject) {
JS_Throw(ctx, js_dup(arg));
} else {
/* return value of await */
s->func_state.frame.cur_sp[-1] = js_dup(arg);
}
js_async_function_resume(ctx, s);
return JS_UNDEFINED;
} | O3 | c | js_async_function_resolve_call:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x30(%rsi), %rbx
movzwl 0x6(%rsi), %eax
addl $-0x35, %eax
testl %r9d, %r9d
jle 0x36cb0
movq 0x20(%rsp), %rcx
movq (%rcx), %rdi
movq 0x8(%rcx), %rdx
movabsq $-0x100000000, %rsi # imm = 0xFFFFFFFF00000000
andq %rdi, %rsi
movl %edi, %ecx
jmp 0x36cb9
movl $0x3, %edx
xorl %ecx, %ecx
xorl %esi, %esi
movl %eax, 0x54(%rbx)
testl %eax, %eax
je 0x36cd4
orq %rcx, %rsi
cmpl $-0x9, %edx
jb 0x36cca
incl (%rsi)
movq %r14, %rdi
callq 0x21f17
jmp 0x36ced
movq 0xa0(%rbx), %rax
orq %rcx, %rsi
cmpl $-0x9, %edx
jb 0x36ce5
incl (%rsi)
movq %rsi, -0x10(%rax)
movq %rdx, -0x8(%rax)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x54ede
movl $0x3, %edx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| js_async_function_resolve_call:
push r14
push rbx
push rax
mov r14, rdi
mov rbx, [rsi+30h]
movzx eax, word ptr [rsi+6]
add eax, 0FFFFFFCBh
test r9d, r9d
jle short loc_36CB0
mov rcx, [rsp+18h+arg_0]
mov rdi, [rcx]
mov rdx, [rcx+8]
mov rsi, 0FFFFFFFF00000000h
and rsi, rdi
mov ecx, edi
jmp short loc_36CB9
loc_36CB0:
mov edx, 3
xor ecx, ecx
xor esi, esi
loc_36CB9:
mov [rbx+54h], eax
test eax, eax
jz short loc_36CD4
or rsi, rcx
cmp edx, 0FFFFFFF7h
jb short loc_36CCA
inc dword ptr [rsi]
loc_36CCA:
mov rdi, r14
call JS_Throw
jmp short loc_36CED
loc_36CD4:
mov rax, [rbx+0A0h]
or rsi, rcx
cmp edx, 0FFFFFFF7h
jb short loc_36CE5
inc dword ptr [rsi]
loc_36CE5:
mov [rax-10h], rsi
mov [rax-8], rdx
loc_36CED:
mov rdi, r14
mov rsi, rbx
call js_async_function_resume
mov edx, 3
xor eax, eax
add rsp, 8
pop rbx
pop r14
retn
| long long js_async_function_resolve_call(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
_QWORD *a7)
{
long long v7; // rbx
int v8; // eax
long long v9; // rdx
unsigned long long v10; // rsi
long long v11; // rcx
_DWORD *v12; // rsi
long long v13; // rax
_DWORD *v14; // rsi
v7 = *(_QWORD *)(a2 + 48);
v8 = *(unsigned __int16 *)(a2 + 6) - 53;
if ( (int)a6 <= 0 )
{
v9 = 3LL;
v11 = 0LL;
v10 = 0LL;
}
else
{
v9 = a7[1];
v10 = *a7 & 0xFFFFFFFF00000000LL;
v11 = (unsigned int)*a7;
}
*(_DWORD *)(v7 + 84) = v8;
if ( v8 )
{
v12 = (_DWORD *)(v11 | v10);
if ( (unsigned int)v9 >= 0xFFFFFFF7 )
++*v12;
JS_Throw(a1, (long long)v12, v9, v11, a5, a6);
}
else
{
v13 = *(_QWORD *)(v7 + 160);
v14 = (_DWORD *)(v11 | v10);
if ( (unsigned int)v9 >= 0xFFFFFFF7 )
++*v14;
*(_QWORD *)(v13 - 16) = v14;
*(_QWORD *)(v13 - 8) = v9;
}
js_async_function_resume(a1, v7, v9);
return 0LL;
}
| js_async_function_resolve_call:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RDI
MOV RBX,qword ptr [RSI + 0x30]
MOVZX EAX,word ptr [RSI + 0x6]
ADD EAX,-0x35
TEST R9D,R9D
JLE 0x00136cb0
MOV RCX,qword ptr [RSP + 0x20]
MOV RDI,qword ptr [RCX]
MOV RDX,qword ptr [RCX + 0x8]
MOV RSI,-0x100000000
AND RSI,RDI
MOV ECX,EDI
JMP 0x00136cb9
LAB_00136cb0:
MOV EDX,0x3
XOR ECX,ECX
XOR ESI,ESI
LAB_00136cb9:
MOV dword ptr [RBX + 0x54],EAX
TEST EAX,EAX
JZ 0x00136cd4
OR RSI,RCX
CMP EDX,-0x9
JC 0x00136cca
INC dword ptr [RSI]
LAB_00136cca:
MOV RDI,R14
CALL 0x00121f17
JMP 0x00136ced
LAB_00136cd4:
MOV RAX,qword ptr [RBX + 0xa0]
OR RSI,RCX
CMP EDX,-0x9
JC 0x00136ce5
INC dword ptr [RSI]
LAB_00136ce5:
MOV qword ptr [RAX + -0x10],RSI
MOV qword ptr [RAX + -0x8],RDX
LAB_00136ced:
MOV RDI,R14
MOV RSI,RBX
CALL 0x00154ede
MOV EDX,0x3
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP R14
RET
|
int1 [16] js_async_function_resolve_call(int8 param_1,long param_2)
{
long lVar1;
long lVar2;
int iVar3;
ulong uVar4;
ulong uVar5;
ulong uVar6;
int *piVar7;
int in_R9D;
ulong *in_stack_00000008;
lVar1 = *(long *)(param_2 + 0x30);
iVar3 = *(ushort *)(param_2 + 6) - 0x35;
if (in_R9D < 1) {
uVar5 = 3;
uVar4 = 0;
uVar6 = 0;
}
else {
uVar5 = in_stack_00000008[1];
uVar6 = *in_stack_00000008 & 0xffffffff00000000;
uVar4 = *in_stack_00000008 & 0xffffffff;
}
*(int *)(lVar1 + 0x54) = iVar3;
if (iVar3 == 0) {
lVar2 = *(long *)(lVar1 + 0xa0);
piVar7 = (int *)(uVar6 | uVar4);
if (0xfffffff6 < (uint)uVar5) {
*piVar7 = *piVar7 + 1;
}
*(int **)(lVar2 + -0x10) = piVar7;
*(ulong *)(lVar2 + -8) = uVar5;
}
else {
if (0xfffffff6 < (uint)uVar5) {
*(int *)(uVar6 | uVar4) = *(int *)(uVar6 | uVar4) + 1;
}
JS_Throw(param_1);
}
js_async_function_resume(param_1,lVar1);
return ZEXT816(3) << 0x40;
}
| |
29,894 | void nglog::internal::MakeCheckOpValueString<unsigned char>(std::ostream*, unsigned char const&) | ng-log[P]ng-log/src/logging.cc | void MakeCheckOpValueString(std::ostream* os, const unsigned char& v) {
if (v >= 32 && v <= 126) {
(*os) << "'" << v << "'";
} else {
(*os) << "unsigned char value " << static_cast<unsigned short>(v);
}
} | O1 | cpp | void nglog::internal::MakeCheckOpValueString<unsigned char>(std::ostream*, unsigned char const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movb (%rsi), %al
addb $-0x20, %al
cmpb $0x5e, %al
ja 0xf3ad
leaq 0x1463a(%rip), %r15 # 0x239a6
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7600
movb (%r14), %al
leaq 0xf(%rsp), %rsi
movb %al, (%rsi)
movl $0x1, %edx
movq %rbx, %rdi
callq 0x7600
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x7600
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x147a8(%rip), %rsi # 0x23b5c
movl $0x14, %edx
movq %rbx, %rdi
callq 0x7600
movzbl (%r14), %esi
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x7360
| _ZN5nglog8internal22MakeCheckOpValueStringIhEEvPSoRKT_:
push r15
push r14
push rbx
sub rsp, 10h
mov r14, rsi
mov rbx, rdi
mov al, [rsi]
add al, 0E0h
cmp al, 5Eh ; '^'
ja short loc_F3AD
lea r15, aDataNumCharsTo+59h; "'"
mov edx, 1
mov rdi, rbx
mov rsi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov al, [r14]
lea rsi, [rsp+28h+var_19]
mov [rsi], al
mov edx, 1
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov edx, 1
mov rdi, rax
mov rsi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
add rsp, 10h
pop rbx
pop r14
pop r15
retn
loc_F3AD:
lea rsi, aUnsignedCharVa; "unsigned char value "
mov edx, 14h
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
movzx esi, byte ptr [r14]
mov rdi, rbx
add rsp, 10h
pop rbx
pop r14
pop r15
jmp __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
| long long nglog::internal::MakeCheckOpValueString<unsigned char>(long long a1, _BYTE *a2)
{
long long v2; // rax
_BYTE v4[25]; // [rsp+Fh] [rbp-19h] BYREF
if ( (unsigned __int8)(*a2 - 32) > 0x5Eu )
{
std::__ostream_insert<char,std::char_traits<char>>(a1, "unsigned char value ", 20LL);
return std::ostream::_M_insert<unsigned long>(a1);
}
else
{
std::__ostream_insert<char,std::char_traits<char>>(a1, "'", 1LL);
v4[0] = *a2;
v2 = std::__ostream_insert<char,std::char_traits<char>>(a1, v4, 1LL);
return std::__ostream_insert<char,std::char_traits<char>>(v2, "'", 1LL);
}
}
| MakeCheckOpValueString<unsigned_char>:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV R14,RSI
MOV RBX,RDI
MOV AL,byte ptr [RSI]
ADD AL,0xe0
CMP AL,0x5e
JA 0x0010f3ad
LEA R15,[0x1239a6]
MOV EDX,0x1
MOV RDI,RBX
MOV RSI,R15
CALL 0x00107600
MOV AL,byte ptr [R14]
LEA RSI,[RSP + 0xf]
MOV byte ptr [RSI],AL
MOV EDX,0x1
MOV RDI,RBX
CALL 0x00107600
MOV EDX,0x1
MOV RDI,RAX
MOV RSI,R15
CALL 0x00107600
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
LAB_0010f3ad:
LEA RSI,[0x123b5c]
MOV EDX,0x14
MOV RDI,RBX
CALL 0x00107600
MOVZX ESI,byte ptr [R14]
MOV RDI,RBX
ADD RSP,0x10
POP RBX
POP R14
POP R15
JMP 0x00107360
|
/* void nglog::internal::MakeCheckOpValueString<unsigned char>(std::ostream*, unsigned char const&)
*/
void nglog::internal::MakeCheckOpValueString<unsigned_char>(ostream *param_1,uchar *param_2)
{
ostream *poVar1;
uchar local_19;
if ((byte)(*param_2 - 0x20) < 0x5f) {
std::__ostream_insert<char,std::char_traits<char>>(param_1,"\'",1);
local_19 = *param_2;
poVar1 = std::__ostream_insert<char,std::char_traits<char>>(param_1,(char *)&local_19,1);
std::__ostream_insert<char,std::char_traits<char>>(poVar1,"\'",1);
return;
}
std::__ostream_insert<char,std::char_traits<char>>(param_1,"unsigned char value ",0x14);
std::ostream::_M_insert<unsigned_long>((ulong)param_1);
return;
}
| |
29,895 | main | AlayaLite/build_O3/_deps/libcoro-src/examples/coro_io_scheduler.cpp | int main()
{
auto scheduler = coro::io_scheduler::make_shared(coro::io_scheduler::options{
// The scheduler will spawn a dedicated event processing thread. This is the default, but
// it is possible to use 'manual' and call 'process_events()' to drive the scheduler yourself.
.thread_strategy = coro::io_scheduler::thread_strategy_t::spawn,
// If the scheduler is in spawn mode this functor is called upon starting the dedicated
// event processor thread.
.on_io_thread_start_functor = [] { std::cout << "io_scheduler::process event thread start\n"; },
// If the scheduler is in spawn mode this functor is called upon stopping the dedicated
// event process thread.
.on_io_thread_stop_functor = [] { std::cout << "io_scheduler::process event thread stop\n"; },
// The io scheduler can use a coro::thread_pool to process the events or tasks it is given.
// You can use an execution strategy of `process_tasks_inline` to have the event loop thread
// directly process the tasks, this might be desirable for small tasks vs a thread pool for large tasks.
.pool =
coro::thread_pool::options{
.thread_count = 2,
.on_thread_start_functor = [](size_t i)
{ std::cout << "io_scheduler::thread_pool worker " << i << " starting\n"; },
.on_thread_stop_functor = [](size_t i)
{ std::cout << "io_scheduler::thread_pool worker " << i << " stopping\n"; },
},
.execution_strategy = coro::io_scheduler::execution_strategy_t::process_tasks_on_thread_pool});
auto make_server_task = [](std::shared_ptr<coro::io_scheduler> scheduler) -> coro::task<void>
{
// Start by creating a tcp server, we'll do this before putting it into the scheduler so
// it is immediately available for the client to connect since this will create a socket,
// bind the socket and start listening on that socket. See tcp::server for more details on
// how to specify the local address and port to bind to as well as enabling SSL/TLS.
coro::net::tcp::server server{scheduler};
// Now scheduler this task onto the scheduler.
co_await scheduler->schedule();
// Wait for an incoming connection and accept it.
auto poll_status = co_await server.poll();
if (poll_status != coro::poll_status::event)
{
co_return; // Handle error, see poll_status for detailed error states.
}
// Accept the incoming client connection.
auto client = server.accept();
// Verify the incoming connection was accepted correctly.
if (!client.socket().is_valid())
{
co_return; // Handle error.
}
// Now wait for the client message, this message is small enough it should always arrive
// with a single recv() call.
poll_status = co_await client.poll(coro::poll_op::read);
if (poll_status != coro::poll_status::event)
{
co_return; // Handle error.
}
// Prepare a buffer and recv() the client's message. This function returns the recv() status
// as well as a span<char> that overlaps the given buffer for the bytes that were read. This
// can be used to resize the buffer or work with the bytes without modifying the buffer at all.
std::string request(256, '\0');
auto [recv_status, recv_bytes] = client.recv(request);
if (recv_status != coro::net::recv_status::ok)
{
co_return; // Handle error, see net::recv_status for detailed error states.
}
request.resize(recv_bytes.size());
std::cout << "server: " << request << "\n";
// Make sure the client socket can be written to.
poll_status = co_await client.poll(coro::poll_op::write);
if (poll_status != coro::poll_status::event)
{
co_return; // Handle error.
}
// Send the server response to the client.
// This message is small enough that it will be sent in a single send() call, but to demonstrate
// how to use the 'remaining' portion of the send() result this is wrapped in a loop until
// all the bytes are sent.
std::string response = "Hello from server.";
std::span<const char> remaining = response;
do
{
// Optimistically send() prior to polling.
auto [send_status, r] = client.send(remaining);
if (send_status != coro::net::send_status::ok)
{
co_return; // Handle error, see net::send_status for detailed error states.
}
if (r.empty())
{
break; // The entire message has been sent.
}
// Re-assign remaining bytes for the next loop iteration and poll for the socket to be
// able to be written to again.
remaining = r;
auto pstatus = co_await client.poll(coro::poll_op::write);
if (pstatus != coro::poll_status::event)
{
co_return; // Handle error.
}
} while (true);
co_return;
};
auto make_client_task = [](std::shared_ptr<coro::io_scheduler> scheduler) -> coro::task<void>
{
// Immediately schedule onto the scheduler.
co_await scheduler->schedule();
// Create the tcp::client with the default settings, see tcp::client for how to set the
// ip address, port, and optionally enabling SSL/TLS.
coro::net::tcp::client client{scheduler};
// Ommitting error checking code for the client, each step should check the status and
// verify the number of bytes sent or received.
// Connect to the server.
co_await client.connect();
// Make sure the client socket can be written to.
co_await client.poll(coro::poll_op::write);
// Send the request data.
client.send(std::string_view{"Hello from client."});
// Wait for the response and receive it.
co_await client.poll(coro::poll_op::read);
std::string response(256, '\0');
auto [recv_status, recv_bytes] = client.recv(response);
response.resize(recv_bytes.size());
std::cout << "client: " << response << "\n";
co_return;
};
// Create and wait for the server and client tasks to complete.
coro::sync_wait(coro::when_all(make_server_task(scheduler), make_client_task(scheduler)));
} | O3 | cpp | main:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
xorl %eax, %eax
leaq 0x40(%rsp), %rsi
movl %eax, (%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rsi)
leaq 0x36d(%rip), %rcx # 0x3baa
movq %rcx, 0x20(%rsi)
leaq 0x37a(%rip), %rcx # 0x3bc2
movq %rcx, 0x18(%rsi)
movups %xmm0, 0x28(%rsi)
leaq 0x383(%rip), %rcx # 0x3bda
movq %rcx, 0x40(%rsi)
leaq 0x390(%rip), %rcx # 0x3bf2
movq %rcx, 0x38(%rsi)
movl $0x2, 0x48(%rsi)
movups %xmm0, 0x50(%rsi)
leaq 0x272(%rip), %rcx # 0x3aea
movq %rcx, 0x68(%rsi)
leaq 0x2af(%rip), %rcx # 0x3b32
movq %rcx, 0x60(%rsi)
movups %xmm0, 0x70(%rsi)
leaq 0x2b8(%rip), %rcx # 0x3b4a
movq %rcx, 0x88(%rsi)
leaq 0x2f2(%rip), %rcx # 0x3b92
movq %rcx, 0x80(%rsi)
movl %eax, 0x90(%rsi)
leaq 0x8(%rsp), %rdi
callq 0x6c68
movq 0xc0(%rsp), %rax
testq %rax, %rax
je 0x38d6
leaq 0xb0(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0xa0(%rsp), %rax
testq %rax, %rax
je 0x38f5
leaq 0x90(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x78(%rsp), %rax
testq %rax, %rax
je 0x390e
leaq 0x68(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x58(%rsp), %rax
testq %rax, %rax
je 0x3927
leaq 0x48(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x8(%rsp), %rbx
movq 0x10(%rsp), %r14
testq %r14, %r14
je 0x394d
movq 0xc66b(%rip), %rax # 0xffa8
cmpb $0x0, (%rax)
je 0x3948
incl 0x8(%r14)
jmp 0x394d
lock
incl 0x8(%r14)
movl $0x160, %edi # imm = 0x160
callq 0x32b0
leaq 0x2ac(%rip), %rcx # 0x3c0a
movq %rcx, (%rax)
leaq 0x980(%rip), %rcx # 0x42e8
movq %rcx, 0x8(%rax)
movq %rbx, 0x148(%rax)
movq %r14, 0x150(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movq %rax, (%rsp)
movb $0x0, 0x158(%rax)
movq 0x8(%rsp), %rbx
movq 0x10(%rsp), %r14
testq %r14, %r14
je 0x39b2
movq 0xc606(%rip), %rax # 0xffa8
cmpb $0x0, (%rax)
je 0x39ad
incl 0x8(%r14)
jmp 0x39b2
lock
incl 0x8(%r14)
movl $0xa8, %edi
callq 0x32b0
leaq 0xa0d(%rip), %rcx # 0x43d0
movq %rcx, (%rax)
leaq 0xdd9(%rip), %rcx # 0x47a6
movq %rcx, 0x8(%rax)
movq %rbx, 0x90(%rax)
movq %r14, 0x98(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
leaq 0x18(%rsp), %rdx
movq %rax, (%rdx)
movb $0x0, 0xa0(%rax)
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0x4ae9
leaq 0x20(%rsp), %rdi
callq 0x4a3c
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x3a19
callq *0x8(%rdi)
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x3a26
callq *0x8(%rdi)
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x3a33
callq *0x8(%rdi)
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x3a3f
callq *0x8(%rdi)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x3a4e
callq 0x5900
xorl %eax, %eax
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
jmp 0x3aac
jmp 0x3aac
jmp 0x3aac
jmp 0x3aac
jmp 0x3aac
jmp 0x3aac
jmp 0x3aac
jmp 0x3aac
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x4bc6
jmp 0x3a7d
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x3a9e
callq *0x8(%rdi)
jmp 0x3a9e
jmp 0x3aac
movq %rax, %rbx
testq %r14, %r14
je 0x3a9e
movq %r14, %rdi
callq 0x5900
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x3ac4
callq *0x8(%rdi)
jmp 0x3ac4
movq %rax, %rdi
callq 0x4bee
movq %rax, %rbx
testq %r14, %r14
je 0x3ac4
movq %r14, %rdi
callq 0x5900
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x3ae2
callq 0x5900
jmp 0x3ae2
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x49c6
movq %rbx, %rdi
callq 0x3430
| main:
push r14
push rbx
sub rsp, 0D8h
xor eax, eax
lea rsi, [rsp+0E8h+var_A8]
mov [rsi], eax
xorps xmm0, xmm0
movups xmmword ptr [rsi+8], xmm0
lea rcx, _ZNSt17_Function_handlerIFvvEZ4mainE3$_2E9_M_invokeERKSt9_Any_data; std::_Function_handler<void ()(void),main::$_2>::_M_invoke(std::_Any_data const&)
mov [rsi+20h], rcx
lea rcx, _ZNSt17_Function_handlerIFvvEZ4mainE3$_2E10_M_managerERSt9_Any_dataRKS3_St18_Manager_operation; std::_Function_handler<void ()(void),main::$_2>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsi+18h], rcx
movups xmmword ptr [rsi+28h], xmm0
lea rcx, _ZNSt17_Function_handlerIFvvEZ4mainE3$_3E9_M_invokeERKSt9_Any_data; std::_Function_handler<void ()(void),main::$_3>::_M_invoke(std::_Any_data const&)
mov [rsi+40h], rcx
lea rcx, _ZNSt17_Function_handlerIFvvEZ4mainE3$_3E10_M_managerERSt9_Any_dataRKS3_St18_Manager_operation; std::_Function_handler<void ()(void),main::$_3>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsi+38h], rcx
mov dword ptr [rsi+48h], 2
movups xmmword ptr [rsi+50h], xmm0
lea rcx, _ZNSt17_Function_handlerIFvmEZ4mainE3$_0E9_M_invokeERKSt9_Any_dataOm; std::_Function_handler<void ()(ulong),main::$_0>::_M_invoke(std::_Any_data const&,ulong &&)
mov [rsi+68h], rcx
lea rcx, _ZNSt17_Function_handlerIFvmEZ4mainE3$_0E10_M_managerERSt9_Any_dataRKS3_St18_Manager_operation; std::_Function_handler<void ()(ulong),main::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsi+60h], rcx
movups xmmword ptr [rsi+70h], xmm0
lea rcx, _ZNSt17_Function_handlerIFvmEZ4mainE3$_1E9_M_invokeERKSt9_Any_dataOm; std::_Function_handler<void ()(ulong),main::$_1>::_M_invoke(std::_Any_data const&,ulong &&)
mov [rsi+88h], rcx
lea rcx, _ZNSt17_Function_handlerIFvmEZ4mainE3$_1E10_M_managerERSt9_Any_dataRKS3_St18_Manager_operation; std::_Function_handler<void ()(ulong),main::$_1>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsi+80h], rcx
mov [rsi+90h], eax
lea rdi, [rsp+0E8h+var_E0]
call _ZN4coro12io_scheduler11make_sharedENS0_7optionsE; coro::io_scheduler::make_shared(coro::io_scheduler::options)
mov rax, [rsp+0E8h+var_28]
test rax, rax
jz short loc_38D6
lea rdi, [rsp+0E8h+var_38]
mov rsi, rdi
mov edx, 3
call rax
loc_38D6:
mov rax, [rsp+0E8h+var_48]
test rax, rax
jz short loc_38F5
lea rdi, [rsp+0E8h+var_58]
mov rsi, rdi
mov edx, 3
call rax
loc_38F5:
mov rax, [rsp+0E8h+var_70]
test rax, rax
jz short loc_390E
lea rdi, [rsp+0E8h+var_80]
mov rsi, rdi
mov edx, 3
call rax
loc_390E:
mov rax, [rsp+0E8h+var_90]
test rax, rax
jz short loc_3927
lea rdi, [rsp+0E8h+var_A0]
mov rsi, rdi
mov edx, 3
call rax
loc_3927:
mov rbx, [rsp+0E8h+var_E0]
mov r14, [rsp+0E8h+var_D8]
test r14, r14
jz short loc_394D
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_3948
inc dword ptr [r14+8]
jmp short loc_394D
loc_3948:
lock inc dword ptr [r14+8]
loc_394D:
mov edi, 160h; unsigned __int64
call __Znwm; operator new(ulong)
lea rcx, _ZZ4mainENK3$_4clESt10shared_ptrIN4coro12io_schedulerEE_resume
mov [rax], rcx
lea rcx, _ZZ4mainENK3$_4clESt10shared_ptrIN4coro12io_schedulerEE_destroy
mov [rax+8], rcx
mov [rax+148h], rbx
mov [rax+150h], r14
xorps xmm0, xmm0
movups xmmword ptr [rax+10h], xmm0
mov [rsp+0E8h+var_E8], rax
mov byte ptr [rax+158h], 0
mov rbx, [rsp+0E8h+var_E0]
mov r14, [rsp+0E8h+var_D8]
test r14, r14
jz short loc_39B2
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_39AD
inc dword ptr [r14+8]
jmp short loc_39B2
loc_39AD:
lock inc dword ptr [r14+8]
loc_39B2:
mov edi, 0A8h; unsigned __int64
call __Znwm; operator new(ulong)
lea rcx, _ZZ4mainENK3$_5clESt10shared_ptrIN4coro12io_schedulerEE_resume
mov [rax], rcx
lea rcx, _ZZ4mainENK3$_5clESt10shared_ptrIN4coro12io_schedulerEE_destroy
mov [rax+8], rcx
mov [rax+90h], rbx
mov [rax+98h], r14
xorps xmm0, xmm0
movups xmmword ptr [rax+10h], xmm0
lea rdx, [rsp+0E8h+var_D0]
mov [rdx], rax
mov byte ptr [rax+0A0h], 0
lea rdi, [rsp+0E8h+var_C8]
mov rsi, rsp
call _ZN4coro8when_allITpTkNS_8concepts9awaitableEJNS_4taskIvEES3_EEEDaDpT_
lea rdi, [rsp+0E8h+var_C8]
call _ZN4coro9sync_waitITkNS_8concepts9awaitableENS_6detail24when_all_ready_awaitableISt5tupleIJNS2_13when_all_taskIvEES6_EEEEOS7_EEDcOT_
mov rdi, [rsp+0E8h+var_B0]
test rdi, rdi
jz short loc_3A19
call qword ptr [rdi+8]
loc_3A19:
mov rdi, [rsp+0E8h+var_B8]
test rdi, rdi
jz short loc_3A26
call qword ptr [rdi+8]
loc_3A26:
mov rdi, [rsp+0E8h+var_D0]
test rdi, rdi
jz short loc_3A33
call qword ptr [rdi+8]
loc_3A33:
mov rdi, [rsp+0E8h+var_E8]
test rdi, rdi
jz short loc_3A3F
call qword ptr [rdi+8]
loc_3A3F:
mov rdi, [rsp+0E8h+var_D8]
test rdi, rdi
jz short loc_3A4E
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_3A4E:
xor eax, eax
add rsp, 0D8h
pop rbx
pop r14
retn
jmp short loc_3AAC
jmp short loc_3AAC
jmp short loc_3AAC
jmp short loc_3AAC
jmp short loc_3AAC
jmp short loc_3AAC
jmp short loc_3AAC
jmp short loc_3AAC
mov rbx, rax
lea rdi, [rsp+0E8h+var_C8]
call _ZN4coro6detail24when_all_ready_awaitableISt5tupleIJNS0_13when_all_taskIvEES4_EEED2Ev; coro::detail::when_all_ready_awaitable<std::tuple<coro::detail::when_all_task<void>,coro::detail::when_all_task<void>>>::~when_all_ready_awaitable()
jmp short loc_3A7D
mov rbx, rax
loc_3A7D:
mov rdi, [rsp+0E8h+var_D0]
test rdi, rdi
jz short loc_3A9E
call qword ptr [rdi+8]
jmp short loc_3A9E
jmp short loc_3AAC
mov rbx, rax
test r14, r14
jz short loc_3A9E
mov rdi, r14
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_3A9E:
mov rdi, [rsp+0E8h+var_E8]
test rdi, rdi
jz short loc_3AC4
call qword ptr [rdi+8]
jmp short loc_3AC4
loc_3AAC:
mov rdi, rax
call __clang_call_terminate
mov rbx, rax
test r14, r14
jz short loc_3AC4
mov rdi, r14
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_3AC4:
mov rdi, [rsp+0E8h+var_D8]
test rdi, rdi
jz short loc_3AE2
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_3AE2
mov rbx, rax
lea rdi, [rsp+0E8h+var_A8]; this
call _ZN4coro12io_scheduler7optionsD2Ev; coro::io_scheduler::options::~options()
loc_3AE2:
mov rdi, rbx
call __Unwind_Resume
| int main(int argc, const char **argv, const char **envp)
{
long long v3; // rbx
long long v4; // r14
long long v5; // rax
long long v6; // rbx
long long v7; // r14
long long v8; // rax
int v9; // edx
int v10; // ecx
int v11; // r8d
int v12; // r9d
long long v14; // [rsp+0h] [rbp-E8h] BYREF
long long v15; // [rsp+8h] [rbp-E0h] BYREF
long long v16; // [rsp+10h] [rbp-D8h]
long long v17; // [rsp+18h] [rbp-D0h]
char v18[16]; // [rsp+20h] [rbp-C8h] BYREF
long long v19; // [rsp+30h] [rbp-B8h]
long long v20; // [rsp+38h] [rbp-B0h]
int v21; // [rsp+40h] [rbp-A8h] BYREF
__int128 v22; // [rsp+48h] [rbp-A0h] BYREF
long long ( *v23)(); // [rsp+58h] [rbp-90h]
long long ( *v24)(); // [rsp+60h] [rbp-88h]
__int128 v25; // [rsp+68h] [rbp-80h] BYREF
long long ( *v26)(); // [rsp+78h] [rbp-70h]
long long ( *v27)(); // [rsp+80h] [rbp-68h]
int v28; // [rsp+88h] [rbp-60h]
__int128 v29; // [rsp+90h] [rbp-58h] BYREF
long long ( *v30)(); // [rsp+A0h] [rbp-48h]
long long ( *v31)(); // [rsp+A8h] [rbp-40h]
__int128 v32; // [rsp+B0h] [rbp-38h] BYREF
long long ( *v33)(); // [rsp+C0h] [rbp-28h]
long long ( *v34)(); // [rsp+C8h] [rbp-20h]
int v35; // [rsp+D0h] [rbp-18h]
v21 = 0;
v22 = 0LL;
v24 = std::_Function_handler<void ()(void),main::$_2>::_M_invoke;
v23 = std::_Function_handler<void ()(void),main::$_2>::_M_manager;
v25 = 0LL;
v27 = std::_Function_handler<void ()(void),main::$_3>::_M_invoke;
v26 = std::_Function_handler<void ()(void),main::$_3>::_M_manager;
v28 = 2;
v29 = 0LL;
v31 = std::_Function_handler<void ()(unsigned long),main::$_0>::_M_invoke;
v30 = std::_Function_handler<void ()(unsigned long),main::$_0>::_M_manager;
v32 = 0LL;
v34 = std::_Function_handler<void ()(unsigned long),main::$_1>::_M_invoke;
v33 = std::_Function_handler<void ()(unsigned long),main::$_1>::_M_manager;
v35 = 0;
coro::io_scheduler::make_shared(&v15, &v21, envp);
if ( v33 )
((void ( *)(__int128 *, __int128 *, long long))v33)(&v32, &v32, 3LL);
if ( v30 )
((void ( *)(__int128 *, __int128 *, long long))v30)(&v29, &v29, 3LL);
if ( v26 )
((void ( *)(__int128 *, __int128 *, long long))v26)(&v25, &v25, 3LL);
if ( v23 )
((void ( *)(__int128 *, __int128 *, long long))v23)(&v22, &v22, 3LL);
v3 = v15;
v4 = v16;
if ( v16 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v16 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v16 + 8));
}
v5 = operator new(0x160uLL);
*(_QWORD *)v5 = main::$_4::operator();
*(_QWORD *)(v5 + 8) = main::$_4::operator();
*(_QWORD *)(v5 + 328) = v3;
*(_QWORD *)(v5 + 336) = v4;
*(_OWORD *)(v5 + 16) = 0LL;
v14 = v5;
*(_BYTE *)(v5 + 344) = 0;
v6 = v15;
v7 = v16;
if ( v16 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v16 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v16 + 8));
}
v8 = operator new(0xA8uLL);
*(_QWORD *)v8 = main::$_5::operator();
*(_QWORD *)(v8 + 8) = main::$_5::operator();
*(_QWORD *)(v8 + 144) = v6;
*(_QWORD *)(v8 + 152) = v7;
*(_OWORD *)(v8 + 16) = 0LL;
v17 = v8;
*(_BYTE *)(v8 + 160) = 0;
ZN4coro8when_allITpTkNS_8concepts9awaitableEJNS_4taskIvEES3_EEEDaDpT_(v18, &v14);
ZN4coro9sync_waitITkNS_8concepts9awaitableENS_6detail24when_all_ready_awaitableISt5tupleIJNS2_13when_all_taskIvEES6_EEEEOS7_EEDcOT_(
(unsigned int)v18,
(unsigned int)&v14,
v9,
v10,
v11,
v12,
v14,
v15,
v16,
v17,
v18[0]);
if ( v20 )
(*(void (**)(void))(v20 + 8))();
if ( v19 )
(*(void (**)(void))(v19 + 8))();
if ( v17 )
(*(void (**)(void))(v17 + 8))();
if ( v14 )
(*(void (**)(void))(v14 + 8))();
if ( v16 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release();
return 0;
}
| main:
PUSH R14
PUSH RBX
SUB RSP,0xd8
XOR EAX,EAX
LEA RSI,[RSP + 0x40]
MOV dword ptr [RSI],EAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSI + 0x8],XMM0
LEA RCX,[0x103baa]
MOV qword ptr [RSI + 0x20],RCX
LEA RCX,[0x103bc2]
MOV qword ptr [RSI + 0x18],RCX
MOVUPS xmmword ptr [RSI + 0x28],XMM0
LEA RCX,[0x103bda]
MOV qword ptr [RSI + 0x40],RCX
LEA RCX,[0x103bf2]
MOV qword ptr [RSI + 0x38],RCX
MOV dword ptr [RSI + 0x48],0x2
MOVUPS xmmword ptr [RSI + 0x50],XMM0
LEA RCX,[0x103aea]
MOV qword ptr [RSI + 0x68],RCX
LEA RCX,[0x103b32]
MOV qword ptr [RSI + 0x60],RCX
MOVUPS xmmword ptr [RSI + 0x70],XMM0
LEA RCX,[0x103b4a]
MOV qword ptr [RSI + 0x88],RCX
LEA RCX,[0x103b92]
MOV qword ptr [RSI + 0x80],RCX
MOV dword ptr [RSI + 0x90],EAX
LAB_001038ad:
LEA RDI,[RSP + 0x8]
CALL 0x00106c68
MOV RAX,qword ptr [RSP + 0xc0]
TEST RAX,RAX
JZ 0x001038d6
LEA RDI,[RSP + 0xb0]
LAB_001038cc:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001038d6:
MOV RAX,qword ptr [RSP + 0xa0]
TEST RAX,RAX
JZ 0x001038f5
LEA RDI,[RSP + 0x90]
LAB_001038eb:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001038f5:
MOV RAX,qword ptr [RSP + 0x78]
TEST RAX,RAX
JZ 0x0010390e
LEA RDI,[RSP + 0x68]
LAB_00103904:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_0010390e:
MOV RAX,qword ptr [RSP + 0x58]
TEST RAX,RAX
JZ 0x00103927
LEA RDI,[RSP + 0x48]
LAB_0010391d:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_00103927:
MOV RBX,qword ptr [RSP + 0x8]
MOV R14,qword ptr [RSP + 0x10]
TEST R14,R14
JZ 0x0010394d
MOV RAX,qword ptr [0x0010ffa8]
CMP byte ptr [RAX],0x0
JZ 0x00103948
INC dword ptr [R14 + 0x8]
JMP 0x0010394d
LAB_00103948:
INC.LOCK dword ptr [R14 + 0x8]
LAB_0010394d:
MOV EDI,0x160
CALL 0x001032b0
LEA RCX,[0x103c0a]
MOV qword ptr [RAX],RCX
LEA RCX,[0x1042e8]
MOV qword ptr [RAX + 0x8],RCX
MOV qword ptr [RAX + 0x148],RBX
MOV qword ptr [RAX + 0x150],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + 0x10],XMM0
MOV qword ptr [RSP],RAX
MOV byte ptr [RAX + 0x158],0x0
MOV RBX,qword ptr [RSP + 0x8]
MOV R14,qword ptr [RSP + 0x10]
TEST R14,R14
JZ 0x001039b2
MOV RAX,qword ptr [0x0010ffa8]
CMP byte ptr [RAX],0x0
JZ 0x001039ad
INC dword ptr [R14 + 0x8]
JMP 0x001039b2
LAB_001039ad:
INC.LOCK dword ptr [R14 + 0x8]
LAB_001039b2:
MOV EDI,0xa8
CALL 0x001032b0
LEA RCX,[0x1043d0]
MOV qword ptr [RAX],RCX
LEA RCX,[0x1047a6]
MOV qword ptr [RAX + 0x8],RCX
MOV qword ptr [RAX + 0x90],RBX
MOV qword ptr [RAX + 0x98],R14
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + 0x10],XMM0
LEA RDX,[RSP + 0x18]
MOV qword ptr [RDX],RAX
MOV byte ptr [RAX + 0xa0],0x0
LAB_001039f5:
LEA RDI,[RSP + 0x20]
MOV RSI,RSP
CALL 0x00104ae9
LAB_00103a02:
LEA RDI,[RSP + 0x20]
CALL 0x00104a3c
MOV RDI,qword ptr [RSP + 0x38]
TEST RDI,RDI
JZ 0x00103a19
LAB_00103a16:
CALL qword ptr [RDI + 0x8]
LAB_00103a19:
MOV RDI,qword ptr [RSP + 0x30]
TEST RDI,RDI
JZ 0x00103a26
LAB_00103a23:
CALL qword ptr [RDI + 0x8]
LAB_00103a26:
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x00103a33
LAB_00103a30:
CALL qword ptr [RDI + 0x8]
LAB_00103a33:
MOV RDI,qword ptr [RSP]
TEST RDI,RDI
JZ 0x00103a3f
LAB_00103a3c:
CALL qword ptr [RDI + 0x8]
LAB_00103a3f:
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x00103a4e
CALL 0x00105900
LAB_00103a4e:
XOR EAX,EAX
ADD RSP,0xd8
POP RBX
POP R14
RET
|
int8 main(void)
{
int8 uVar1;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var2;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var3;
int8 *local_e8;
int8 local_e0;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_d8;
int8 *local_d0;
int1 local_c8 [16];
long local_b8;
long local_b0;
int4 local_a8;
int8 local_a0;
int8 uStack_98;
code *local_90;
code *local_88;
int8 local_80;
int8 uStack_78;
code *local_70;
code *local_68;
int4 local_60;
int8 local_58;
int8 uStack_50;
code *local_48;
code *local_40;
int8 local_38;
int8 uStack_30;
code *local_28;
code *local_20;
int4 local_18;
local_a8 = 0;
local_a0 = 0;
uStack_98 = 0;
local_88 = std::_Function_handler<void(),main::$_2>::_M_invoke;
local_90 = std::_Function_handler<void(),main::$_2>::_M_manager;
local_80 = 0;
uStack_78 = 0;
local_68 = std::_Function_handler<void(),main::$_3>::_M_invoke;
local_70 = std::_Function_handler<void(),main::$_3>::_M_manager;
local_60 = 2;
local_58 = 0;
uStack_50 = 0;
local_40 = std::_Function_handler<void(unsigned_long),main::$_0>::_M_invoke;
local_48 = std::_Function_handler<void(unsigned_long),main::$_0>::_M_manager;
local_38 = 0;
uStack_30 = 0;
local_20 = std::_Function_handler<void(unsigned_long),main::$_1>::_M_invoke;
local_28 = std::_Function_handler<void(unsigned_long),main::$_1>::_M_manager;
local_18 = 0;
/* try { // try from 001038ad to 001038b6 has its CatchHandler @ 00103ad5 */
coro::io_scheduler::make_shared((io_scheduler *)&local_e0);
if (local_28 != (code *)0x0) {
/* try { // try from 001038cc to 001038d5 has its CatchHandler @ 00103a69 */
(*local_28)(&local_38,&local_38,3);
}
if (local_48 != (code *)0x0) {
/* try { // try from 001038eb to 001038f4 has its CatchHandler @ 00103a67 */
(*local_48)(&local_58,&local_58,3);
}
if (local_70 != (code *)0x0) {
/* try { // try from 00103904 to 0010390d has its CatchHandler @ 00103a65 */
(*local_70)(&local_80,&local_80,3);
}
if (local_90 != (code *)0x0) {
/* try { // try from 0010391d to 00103926 has its CatchHandler @ 00103a63 */
(*local_90)(&local_a0,&local_a0,3);
}
p_Var2 = local_d8;
uVar1 = local_e0;
if (local_d8 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_0010ffa8 == '\0') {
LOCK();
*(int *)(local_d8 + 8) = *(int *)(local_d8 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_d8 + 8) = *(int *)(local_d8 + 8) + 1;
}
}
/* try { // try from 0010394d to 00103956 has its CatchHandler @ 00103ab4 */
local_e8 = (int8 *)operator_new(0x160);
p_Var3 = local_d8;
*local_e8 = main::$_4::operator();
local_e8[1] = main::$_4::operator();
local_e8[0x29] = uVar1;
local_e8[0x2a] = p_Var2;
local_e8[2] = 0;
local_e8[3] = 0;
*(int1 *)(local_e8 + 0x2b) = 0;
if (local_d8 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_0010ffa8 == '\0') {
LOCK();
*(int *)(local_d8 + 8) = *(int *)(local_d8 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_d8 + 8) = *(int *)(local_d8 + 8) + 1;
}
}
/* try { // try from 001039b2 to 001039bb has its CatchHandler @ 00103a8e */
local_d0 = (int8 *)operator_new(0xa8);
*local_d0 = main::$_5::operator();
local_d0[1] = main::$_5::operator();
local_d0[0x12] = local_e0;
local_d0[0x13] = p_Var3;
local_d0[2] = 0;
local_d0[3] = 0;
*(int1 *)(local_d0 + 0x14) = 0;
/* try { // try from 001039f5 to 00103a01 has its CatchHandler @ 00103a7a */
_ZN4coro8when_allITpTkNS_8concepts9awaitableEJNS_4taskIvEES3_EEEDaDpT_(local_c8,&local_e8);
/* try { // try from 00103a02 to 00103a0b has its CatchHandler @ 00103a6b */
_ZN4coro9sync_waitITkNS_8concepts9awaitableENS_6detail24when_all_ready_awaitableISt5tupleIJNS2_13when_all_taskIvEES6_EEEEOS7_EEDcOT_
(local_c8);
if (local_b0 != 0) {
/* try { // try from 00103a16 to 00103a18 has its CatchHandler @ 00103a61 */
(**(code **)(local_b0 + 8))();
}
if (local_b8 != 0) {
/* try { // try from 00103a23 to 00103a25 has its CatchHandler @ 00103a5f */
(**(code **)(local_b8 + 8))();
}
if (local_d0 != (int8 *)0x0) {
/* try { // try from 00103a30 to 00103a32 has its CatchHandler @ 00103a5d */
(*(code *)local_d0[1])();
}
if (local_e8 != (int8 *)0x0) {
/* try { // try from 00103a3c to 00103a3e has its CatchHandler @ 00103a5b */
(*(code *)local_e8[1])();
}
if (local_d8 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_d8);
}
return 0;
}
| |
29,896 | my_mb_wc_euc_jp | eloqsql/strings/ctype-ujis.c | static int
my_mb_wc_euc_jp(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *pwc, const uchar *s, const uchar *e)
{
int hi;
if (s >= e)
return MY_CS_TOOSMALL;
if ((hi= s[0]) < 0x80) /* ASCII code set: [00..7F] -> [U+0000..U+007F] */
{
*pwc= hi;
return 1;
}
if (hi >= 0xA1 && hi <= 0xFE) /* JIS-X-0208 code set: [A1..FE][A1..FE] */
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
return (*pwc= jisx0208_eucjp_to_unicode[(hi << 8) + s[1]]) ? 2 :
(s[1] < 0xA1 || s[1] > 0xFE) ? MY_CS_ILSEQ : -2;
}
/* JIS-X-0201 HALF WIDTH KATAKANA: [8E][A1..DF] -> [U+FF61..U+FF9F] */
if (hi == 0x8E)
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
if (s[1] < 0xA1 || s[1] > 0xDF)
return MY_CS_ILSEQ;
*pwc= 0xFEC0 + s[1]; /* 0xFFC0 = 0xFF61 - 0xA1 */
return 2;
}
if (hi == 0x8F) /* JIS X 0212 code set: [8F][A1..FE][A1..FE] */
{
if (s + 3 > e)
return MY_CS_TOOSMALL3;
return (*pwc= jisx0212_eucjp_to_unicode[(((int) s[1]) << 8) + s[2]]) ?
3 :
(s[1] < 0xA1 || s[1] > 0xFE || s[2] < 0xA1 || s[2] > 0xFE) ?
MY_CS_ILSEQ : -3;
}
return MY_CS_ILSEQ;
} | O0 | c | my_mb_wc_euc_jp:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0xf83ba
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0xf85d6
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x80, %eax
jge 0xf83e2
movslq -0x2c(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0xf85d6
cmpl $0xa1, -0x2c(%rbp)
jl 0xf8491
cmpl $0xfe, -0x2c(%rbp)
jg 0xf8491
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0xf8416
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0xf85d6
movl -0x2c(%rbp), %eax
shll $0x8, %eax
movq -0x20(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
addl %ecx, %eax
movslq %eax, %rcx
leaq 0x2a6940(%rip), %rax # 0x39ed70
movzwl (%rax,%rcx,2), %eax
movq -0x18(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
je 0xf844b
movl $0x2, %eax
movl %eax, -0x30(%rbp)
jmp 0xf8486
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %ecx
movb $0x1, %al
cmpl $0xa1, %ecx
movb %al, -0x31(%rbp)
jl 0xf8473
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xfe, %eax
setg %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %dl
movl $0xfffffffe, %eax # imm = 0xFFFFFFFE
xorl %ecx, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xf85d6
cmpl $0x8e, -0x2c(%rbp)
jne 0xf8501
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0xf84b4
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0xf85d6
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xa1, %eax
jl 0xf84d2
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0xdf, %eax
jle 0xf84de
movl $0x0, -0x4(%rbp)
jmp 0xf85d6
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
addl $0xfec0, %eax # imm = 0xFEC0
movslq %eax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0xf85d6
cmpl $0x8f, -0x2c(%rbp)
jne 0xf85cf
movq -0x20(%rbp), %rax
addq $0x3, %rax
cmpq -0x28(%rbp), %rax
jbe 0xf8528
movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99
jmp 0xf85d6
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
shll $0x8, %eax
movq -0x20(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
addl %ecx, %eax
movslq %eax, %rcx
leaq 0x2c6829(%rip), %rax # 0x3bed70
movzwl (%rax,%rcx,2), %eax
movq -0x18(%rbp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
je 0xf8562
movl $0x3, %eax
movl %eax, -0x38(%rbp)
jmp 0xf85c7
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %ecx
movb $0x1, %al
cmpl $0xa1, %ecx
movb %al, -0x39(%rbp)
jl 0xf85b4
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %ecx
movb $0x1, %al
cmpl $0xfe, %ecx
movb %al, -0x39(%rbp)
jg 0xf85b4
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %ecx
movb $0x1, %al
cmpl $0xa1, %ecx
movb %al, -0x39(%rbp)
jl 0xf85b4
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %eax
cmpl $0xfe, %eax
setg %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %dl
movl $0xfffffffd, %eax # imm = 0xFFFFFFFD
xorl %ecx, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0x38(%rbp)
movl -0x38(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xf85d6
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
| my_mb_wc_euc_jp:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_F83BA
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_F85D6
loc_F83BA:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
mov [rbp+var_2C], eax
cmp eax, 80h
jge short loc_F83E2
movsxd rcx, [rbp+var_2C]
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 1
jmp loc_F85D6
loc_F83E2:
cmp [rbp+var_2C], 0A1h
jl loc_F8491
cmp [rbp+var_2C], 0FEh
jg loc_F8491
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_F8416
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_F85D6
loc_F8416:
mov eax, [rbp+var_2C]
shl eax, 8
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+1]
add eax, ecx
movsxd rcx, eax
lea rax, jisx0208_eucjp_to_unicode
movzx eax, word ptr [rax+rcx*2]
mov rcx, [rbp+var_18]
mov [rcx], rax
cmp rax, 0
jz short loc_F844B
mov eax, 2
mov [rbp+var_30], eax
jmp short loc_F8486
loc_F844B:
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+1]
mov al, 1
cmp ecx, 0A1h
mov [rbp+var_31], al
jl short loc_F8473
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 0FEh
setnle al
mov [rbp+var_31], al
loc_F8473:
mov dl, [rbp+var_31]
mov eax, 0FFFFFFFEh
xor ecx, ecx
test dl, 1
cmovnz eax, ecx
mov [rbp+var_30], eax
loc_F8486:
mov eax, [rbp+var_30]
mov [rbp+var_4], eax
jmp loc_F85D6
loc_F8491:
cmp [rbp+var_2C], 8Eh
jnz short loc_F8501
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_F84B4
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_F85D6
loc_F84B4:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 0A1h
jl short loc_F84D2
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
cmp eax, 0DFh
jle short loc_F84DE
loc_F84D2:
mov [rbp+var_4], 0
jmp loc_F85D6
loc_F84DE:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
add eax, 0FEC0h
movsxd rcx, eax
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_4], 2
jmp loc_F85D6
loc_F8501:
cmp [rbp+var_2C], 8Fh
jnz loc_F85CF
mov rax, [rbp+var_20]
add rax, 3
cmp rax, [rbp+var_28]
jbe short loc_F8528
mov [rbp+var_4], 0FFFFFF99h
jmp loc_F85D6
loc_F8528:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+1]
shl eax, 8
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx+2]
add eax, ecx
movsxd rcx, eax
lea rax, jisx0212_eucjp_to_unicode
movzx eax, word ptr [rax+rcx*2]
mov rcx, [rbp+var_18]
mov [rcx], rax
cmp rax, 0
jz short loc_F8562
mov eax, 3
mov [rbp+var_38], eax
jmp short loc_F85C7
loc_F8562:
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+1]
mov al, 1
cmp ecx, 0A1h
mov [rbp+var_39], al
jl short loc_F85B4
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+1]
mov al, 1
cmp ecx, 0FEh
mov [rbp+var_39], al
jg short loc_F85B4
mov rax, [rbp+var_20]
movzx ecx, byte ptr [rax+2]
mov al, 1
cmp ecx, 0A1h
mov [rbp+var_39], al
jl short loc_F85B4
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax+2]
cmp eax, 0FEh
setnle al
mov [rbp+var_39], al
loc_F85B4:
mov dl, [rbp+var_39]
mov eax, 0FFFFFFFDh
xor ecx, ecx
test dl, 1
cmovnz eax, ecx
mov [rbp+var_38], eax
loc_F85C7:
mov eax, [rbp+var_38]
mov [rbp+var_4], eax
jmp short loc_F85D6
loc_F85CF:
mov [rbp+var_4], 0
loc_F85D6:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_mb_wc_euc_jp(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4)
{
long long v4; // rax
unsigned int v5; // eax
long long v6; // rax
unsigned int v7; // eax
bool v9; // [rsp+1h] [rbp-39h]
bool v11; // [rsp+9h] [rbp-31h]
unsigned int v13; // [rsp+Eh] [rbp-2Ch]
if ( (unsigned long long)a3 < a4 )
{
v13 = *a3;
if ( v13 >= 0x80 )
{
if ( *a3 < 0xA1u || *a3 == 255 )
{
if ( v13 == 142 )
{
if ( (unsigned long long)(a3 + 2) <= a4 )
{
if ( a3[1] >= 0xA1u && a3[1] <= 0xDFu )
{
*a2 = a3[1] + 65216;
return 2;
}
else
{
return 0;
}
}
else
{
return (unsigned int)-102;
}
}
else if ( v13 == 143 )
{
if ( (unsigned long long)(a3 + 3) <= a4 )
{
v6 = jisx0212_eucjp_to_unicode[256 * a3[1] + a3[2]];
*a2 = v6;
if ( v6 )
{
return 3;
}
else
{
v9 = 1;
if ( a3[1] >= 0xA1u )
{
v9 = 1;
if ( a3[1] != 255 )
{
v9 = 1;
if ( a3[2] >= 0xA1u )
v9 = a3[2] == 255;
}
}
v7 = -3;
if ( v9 )
v7 = 0;
return v7;
}
}
else
{
return (unsigned int)-103;
}
}
else
{
return 0;
}
}
else if ( (unsigned long long)(a3 + 2) <= a4 )
{
v4 = jisx0208_eucjp_to_unicode[a3[1] + (v13 << 8)];
*a2 = v4;
if ( v4 )
{
return 2;
}
else
{
v11 = 1;
if ( a3[1] >= 0xA1u )
v11 = a3[1] == 255;
v5 = -2;
if ( v11 )
v5 = 0;
return v5;
}
}
else
{
return (unsigned int)-102;
}
}
else
{
*a2 = *a3;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
| my_mb_wc_euc_jp:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x001f83ba
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x001f85d6
LAB_001f83ba:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x80
JGE 0x001f83e2
MOVSXD RCX,dword ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001f85d6
LAB_001f83e2:
CMP dword ptr [RBP + -0x2c],0xa1
JL 0x001f8491
CMP dword ptr [RBP + -0x2c],0xfe
JG 0x001f8491
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x001f8416
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x001f85d6
LAB_001f8416:
MOV EAX,dword ptr [RBP + -0x2c]
SHL EAX,0x8
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0x1]
ADD EAX,ECX
MOVSXD RCX,EAX
LEA RAX,[0x49ed70]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JZ 0x001f844b
MOV EAX,0x2
MOV dword ptr [RBP + -0x30],EAX
JMP 0x001f8486
LAB_001f844b:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0x1]
MOV AL,0x1
CMP ECX,0xa1
MOV byte ptr [RBP + -0x31],AL
JL 0x001f8473
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xfe
SETG AL
MOV byte ptr [RBP + -0x31],AL
LAB_001f8473:
MOV DL,byte ptr [RBP + -0x31]
MOV EAX,0xfffffffe
XOR ECX,ECX
TEST DL,0x1
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x30],EAX
LAB_001f8486:
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001f85d6
LAB_001f8491:
CMP dword ptr [RBP + -0x2c],0x8e
JNZ 0x001f8501
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x001f84b4
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x001f85d6
LAB_001f84b4:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xa1
JL 0x001f84d2
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0xdf
JLE 0x001f84de
LAB_001f84d2:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001f85d6
LAB_001f84de:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
ADD EAX,0xfec0
MOVSXD RCX,EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV dword ptr [RBP + -0x4],0x2
JMP 0x001f85d6
LAB_001f8501:
CMP dword ptr [RBP + -0x2c],0x8f
JNZ 0x001f85cf
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x3
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x001f8528
MOV dword ptr [RBP + -0x4],0xffffff99
JMP 0x001f85d6
LAB_001f8528:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x1]
SHL EAX,0x8
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX + 0x2]
ADD EAX,ECX
MOVSXD RCX,EAX
LEA RAX,[0x4bed70]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JZ 0x001f8562
MOV EAX,0x3
MOV dword ptr [RBP + -0x38],EAX
JMP 0x001f85c7
LAB_001f8562:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0x1]
MOV AL,0x1
CMP ECX,0xa1
MOV byte ptr [RBP + -0x39],AL
JL 0x001f85b4
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0x1]
MOV AL,0x1
CMP ECX,0xfe
MOV byte ptr [RBP + -0x39],AL
JG 0x001f85b4
MOV RAX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RAX + 0x2]
MOV AL,0x1
CMP ECX,0xa1
MOV byte ptr [RBP + -0x39],AL
JL 0x001f85b4
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX + 0x2]
CMP EAX,0xfe
SETG AL
MOV byte ptr [RBP + -0x39],AL
LAB_001f85b4:
MOV DL,byte ptr [RBP + -0x39]
MOV EAX,0xfffffffd
XOR ECX,ECX
TEST DL,0x1
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x38],EAX
LAB_001f85c7:
MOV EAX,dword ptr [RBP + -0x38]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001f85d6
LAB_001f85cf:
MOV dword ptr [RBP + -0x4],0x0
LAB_001f85d6:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_mb_wc_euc_jp(int8 param_1,ulong *param_2,byte *param_3,byte *param_4)
{
ushort uVar1;
bool bVar2;
uint uVar3;
int4 local_40;
int4 local_38;
int4 local_c;
if (param_3 < param_4) {
uVar3 = (uint)*param_3;
if (uVar3 < 0x80) {
*param_2 = (long)(int)uVar3;
local_c = 1;
}
else if ((uVar3 < 0xa1) || (0xfe < uVar3)) {
if (uVar3 == 0x8e) {
if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else if ((param_3[1] < 0xa1) || (0xdf < param_3[1])) {
local_c = 0;
}
else {
*param_2 = (long)(int)(param_3[1] + 0xfec0);
local_c = 2;
}
}
else if (uVar3 == 0x8f) {
if (param_4 < param_3 + 3) {
local_c = 0xffffff99;
}
else {
uVar1 = *(ushort *)
(&jisx0212_eucjp_to_unicode +
(long)(int)((uint)param_3[1] * 0x100 + (uint)param_3[2]) * 2);
*param_2 = (ulong)uVar1;
if ((ulong)uVar1 == 0) {
bVar2 = true;
if (((0xa0 < param_3[1]) && (bVar2 = true, param_3[1] != 0xff)) &&
(bVar2 = true, 0xa0 < param_3[2])) {
bVar2 = 0xfe < param_3[2];
}
local_40 = 0xfffffffd;
if (bVar2) {
local_40 = 0;
}
}
else {
local_40 = 3;
}
local_c = local_40;
}
}
else {
local_c = 0;
}
}
else if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
uVar1 = *(ushort *)
(jisx0208_eucjp_to_unicode + (long)(int)(uVar3 * 0x100 + (uint)param_3[1]) * 2);
*param_2 = (ulong)uVar1;
if ((ulong)uVar1 == 0) {
bVar2 = true;
if (0xa0 < param_3[1]) {
bVar2 = 0xfe < param_3[1];
}
local_38 = 0xfffffffe;
if (bVar2) {
local_38 = 0;
}
}
else {
local_38 = 2;
}
local_c = local_38;
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
| |
29,897 | minja::Value::Value(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/minja.hpp | Value(const std::string & v) : primitive_(v) {} | O1 | cpp | minja::Value::Value(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x40, %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
callq 0x8065e
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x8be7b
callq 0x6e5ca
movq %rbx, %rdi
callq 0x1caca
movq %rbx, %rdi
callq 0x891fa
movq %r14, %rdi
callq 0x1bf90
nop
| _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r14
push rbx
push rax
mov rbx, rdi
add rdi, 40h ; '@'
xorps xmm0, xmm0
movups xmmword ptr [rbx+30h], xmm0
movups xmmword ptr [rbx+20h], xmm0
movups xmmword ptr [rbx+10h], xmm0
movups xmmword ptr [rbx], xmm0
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRKS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SI_EE5valueEiE4typeELi0EEEOT_
add rsp, 8
pop rbx
pop r14
retn
mov r14, rax
mov rdi, [rbx+38h]
test rdi, rdi
jz short loc_8BE7B
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8BE7B:
mov rdi, rbx
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE_cold_1; minja::Value::Value(std::string const&) [clone]
mov rdi, rbx
call _ZNSt23enable_shared_from_thisIN5minja5ValueEED2Ev; std::enable_shared_from_this<minja::Value>::~enable_shared_from_this()
mov rdi, r14
call __Unwind_Resume
| _QWORD * minja::Value::Value(long long a1, long long a2)
{
*(_OWORD *)(a1 + 48) = 0LL;
*(_OWORD *)(a1 + 32) = 0LL;
*(_OWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
return ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRKS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SI_EE5valueEiE4typeELi0EEEOT_(
(unsigned __int8 *)(a1 + 64),
a2);
}
| Value:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
ADD RDI,0x40
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x30],XMM0
MOVUPS xmmword ptr [RBX + 0x20],XMM0
MOVUPS xmmword ptr [RBX + 0x10],XMM0
MOVUPS xmmword ptr [RBX],XMM0
LAB_0018be5d:
CALL 0x0018065e
LAB_0018be62:
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* minja::Value::Value(std::__cxx11::string const&) */
void __thiscall minja::Value::Value(Value *this,string *param_1)
{
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
/* try { // try from 0018be5d to 0018be61 has its CatchHandler @ 0018be6a */
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRKS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SI_EE5valueEiE4typeELi0EEEOT_
(this + 0x40);
return;
}
| |
29,898 | my_caseup_utf32 | eloqsql/strings/ctype-ucs2.c | static size_t
my_caseup_utf32(CHARSET_INFO *cs, const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
int res;
const char *srcend= src + srclen;
char *dstend= dst + dstlen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(srclen <= dstlen);
while ((src < srcend) &&
(res= my_utf32_uni(cs, &wc, (uchar *)src, (uchar*) srcend)) > 0)
{
my_toupper_utf32(uni_plane, &wc);
if (res != my_uni_utf32(cs, wc, (uchar*) dst, (uchar*) dstend))
break;
src+= res;
dst+= res;
}
return srclen;
} | O3 | c | my_caseup_utf32:
movq %rdx, %rax
cmpq $0x4, %rdx
jl 0x4b6d5
pushq %rbp
movq %rsp, %rbp
pushq %rbx
leaq (%rsi,%rax), %rdx
addq %rcx, %r8
movq 0x78(%rdi), %rdi
addq $0x4, %rcx
movzbl (%rsi), %r9d
shll $0x18, %r9d
movzbl 0x1(%rsi), %r10d
shll $0x10, %r10d
orl %r9d, %r10d
cmpl $0x10ffff, %r10d # imm = 0x10FFFF
ja 0x4b6d3
movzbl 0x2(%rsi), %ebx
shll $0x8, %ebx
movzbl 0x3(%rsi), %r9d
orq %r9, %rbx
orq %r10, %rbx
cmpq (%rdi), %rbx
ja 0x4b694
movq 0x8(%rdi), %r10
movl %ebx, %r11d
shrl $0x8, %r11d
movq (%r10,%r11,8), %r10
testq %r10, %r10
je 0x4b694
leaq (%r9,%r9,2), %r9
movl (%r10,%r9,4), %ebx
cmpq %r8, %rcx
ja 0x4b6d3
cmpl $0x10ffff, %ebx # imm = 0x10FFFF
ja 0x4b6d3
movb $0x0, -0x4(%rcx)
movl %ebx, %r9d
shrl $0x10, %r9d
movb %r9b, -0x3(%rcx)
movb %bh, -0x2(%rcx)
movb %bl, -0x1(%rcx)
leaq 0x4(%rsi), %r9
cmpq %rdx, %r9
jae 0x4b6d3
addq $0x8, %rsi
addq $0x4, %rcx
cmpq %rdx, %rsi
movq %r9, %rsi
jbe 0x4b644
popq %rbx
popq %rbp
retq
| my_caseup_utf32:
mov rax, rdx
cmp rdx, 4
jl locret_4B6D5
push rbp
mov rbp, rsp
push rbx
lea rdx, [rsi+rax]
add r8, rcx
mov rdi, [rdi+78h]
add rcx, 4
loc_4B644:
movzx r9d, byte ptr [rsi]
shl r9d, 18h
movzx r10d, byte ptr [rsi+1]
shl r10d, 10h
or r10d, r9d
cmp r10d, offset unk_10FFFF
ja short loc_4B6D3
movzx ebx, byte ptr [rsi+2]
shl ebx, 8
movzx r9d, byte ptr [rsi+3]
or rbx, r9
or rbx, r10
cmp rbx, [rdi]
ja short loc_4B694
mov r10, [rdi+8]
mov r11d, ebx
shr r11d, 8
mov r10, [r10+r11*8]
test r10, r10
jz short loc_4B694
lea r9, [r9+r9*2]
mov ebx, [r10+r9*4]
loc_4B694:
cmp rcx, r8
ja short loc_4B6D3
cmp ebx, offset unk_10FFFF
ja short loc_4B6D3
mov byte ptr [rcx-4], 0
mov r9d, ebx
shr r9d, 10h
mov [rcx-3], r9b
mov [rcx-2], bh
mov [rcx-1], bl
lea r9, [rsi+4]
cmp r9, rdx
jnb short loc_4B6D3
add rsi, 8
add rcx, 4
cmp rsi, rdx
mov rsi, r9
jbe loc_4B644
loc_4B6D3:
pop rbx
pop rbp
locret_4B6D5:
retn
| long long my_caseup_utf32(long long a1, unsigned __int8 *a2, long long a3, long long a4, long long a5)
{
long long result; // rax
unsigned long long v6; // rdx
unsigned long long v7; // r8
unsigned long long *v8; // rdi
unsigned long long v9; // rcx
long long v10; // r10
long long v11; // r9
unsigned long long v12; // rbx
long long v13; // r10
bool v14; // cc
result = a3;
if ( a3 >= 4 )
{
v6 = (unsigned long long)&a2[a3];
v7 = a4 + a5;
v8 = *(unsigned long long **)(a1 + 120);
v9 = a4 + 4;
do
{
v10 = (*a2 << 24) | (a2[1] << 16);
if ( (unsigned int)v10 > (unsigned int)&unk_10FFFF )
break;
v11 = a2[3];
v12 = v10 | v11 | (a2[2] << 8);
if ( v12 <= *v8 )
{
v13 = *(_QWORD *)(v8[1] + 8LL * ((unsigned int)v12 >> 8));
if ( v13 )
LODWORD(v12) = *(_DWORD *)(v13 + 12 * v11);
}
if ( v9 > v7 )
break;
if ( (unsigned int)v12 > (unsigned int)&unk_10FFFF )
break;
*(_BYTE *)(v9 - 4) = 0;
*(_BYTE *)(v9 - 3) = BYTE2(v12);
*(_BYTE *)(v9 - 2) = BYTE1(v12);
*(_BYTE *)(v9 - 1) = v12;
if ( (unsigned long long)(a2 + 4) >= v6 )
break;
v9 += 4LL;
v14 = (unsigned long long)(a2 + 8) <= v6;
a2 += 4;
}
while ( v14 );
}
return result;
}
| my_caseup_utf32:
MOV RAX,RDX
CMP RDX,0x4
JL 0x0014b6d5
PUSH RBP
MOV RBP,RSP
PUSH RBX
LEA RDX,[RSI + RAX*0x1]
ADD R8,RCX
MOV RDI,qword ptr [RDI + 0x78]
ADD RCX,0x4
LAB_0014b644:
MOVZX R9D,byte ptr [RSI]
SHL R9D,0x18
MOVZX R10D,byte ptr [RSI + 0x1]
SHL R10D,0x10
OR R10D,R9D
CMP R10D,0x10ffff
JA 0x0014b6d3
MOVZX EBX,byte ptr [RSI + 0x2]
SHL EBX,0x8
MOVZX R9D,byte ptr [RSI + 0x3]
OR RBX,R9
OR RBX,R10
CMP RBX,qword ptr [RDI]
JA 0x0014b694
MOV R10,qword ptr [RDI + 0x8]
MOV R11D,EBX
SHR R11D,0x8
MOV R10,qword ptr [R10 + R11*0x8]
TEST R10,R10
JZ 0x0014b694
LEA R9,[R9 + R9*0x2]
MOV EBX,dword ptr [R10 + R9*0x4]
LAB_0014b694:
CMP RCX,R8
JA 0x0014b6d3
CMP EBX,0x10ffff
JA 0x0014b6d3
MOV byte ptr [RCX + -0x4],0x0
MOV R9D,EBX
SHR R9D,0x10
MOV byte ptr [RCX + -0x3],R9B
MOV byte ptr [RCX + -0x2],BH
MOV byte ptr [RCX + -0x1],BL
LEA R9,[RSI + 0x4]
CMP R9,RDX
JNC 0x0014b6d3
ADD RSI,0x8
ADD RCX,0x4
CMP RSI,RDX
MOV RSI,R9
JBE 0x0014b644
LAB_0014b6d3:
POP RBX
POP RBP
LAB_0014b6d5:
RET
|
void my_caseup_utf32(long param_1,byte *param_2,long param_3,long param_4,long param_5)
{
ulong *puVar1;
long lVar2;
ulong uVar3;
ulong uVar4;
byte *pbVar5;
byte *pbVar6;
uint uVar7;
if (3 < param_3) {
puVar1 = *(ulong **)(param_1 + 0x78);
uVar3 = param_4 + 4;
pbVar5 = param_2;
while (uVar7 = (uint)pbVar5[1] << 0x10 | (uint)*pbVar5 << 0x18, uVar7 < 0x110000) {
uVar4 = (ulong)CONCAT11(pbVar5[2],pbVar5[3]) | (ulong)uVar7;
if ((uVar4 <= *puVar1) && (lVar2 = *(long *)(puVar1[1] + (uVar4 >> 8) * 8), lVar2 != 0)) {
uVar4 = (ulong)*(uint *)(lVar2 + (ulong)pbVar5[3] * 0xc);
}
if ((ulong)(param_5 + param_4) < uVar3) {
return;
}
if (0x10ffff < (uint)uVar4) {
return;
}
*(int1 *)(uVar3 - 4) = 0;
*(char *)(uVar3 - 3) = (char)(uVar4 >> 0x10);
*(char *)(uVar3 - 2) = (char)(uVar4 >> 8);
*(char *)(uVar3 - 1) = (char)uVar4;
if (param_2 + param_3 <= pbVar5 + 4) {
return;
}
pbVar6 = pbVar5 + 8;
uVar3 = uVar3 + 4;
pbVar5 = pbVar5 + 4;
if (param_2 + param_3 < pbVar6) {
return;
}
}
}
return;
}
| |
29,899 | rapidcsv::Document::Document(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, rapidcsv::LabelParams const&, rapidcsv::SeparatorParams const&, rapidcsv::ConverterParams const&, rapidcsv::LineReaderParams const&) | Andrewchistyakov[P]flashcards_lyc/src/rapidcsv.h | explicit Document(const std::string& pPath = std::string(),
const LabelParams& pLabelParams = LabelParams(),
const SeparatorParams& pSeparatorParams = SeparatorParams(),
const ConverterParams& pConverterParams = ConverterParams(),
const LineReaderParams& pLineReaderParams = LineReaderParams())
: mPath(pPath)
, mLabelParams(pLabelParams)
, mSeparatorParams(pSeparatorParams)
, mConverterParams(pConverterParams)
, mLineReaderParams(pLineReaderParams)
, mData()
, mColumnNames()
, mRowNames()
{
if (!mPath.empty())
{
ReadCsv();
}
} | O1 | c | rapidcsv::Document::Document(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, rapidcsv::LabelParams const&, rapidcsv::SeparatorParams const&, rapidcsv::ConverterParams const&, rapidcsv::LineReaderParams const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r13
movq %rdi, %rbx
leaq 0x10(%rdi), %rbp
movq %rbp, (%rdi)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
movq %rax, %rsi
callq 0x11e4e
movq (%r13), %rax
movq %rax, 0x20(%rbx)
movzwl 0x4(%r12), %eax
movw %ax, 0x2c(%rbx)
movl (%r12), %eax
movl %eax, 0x28(%rbx)
movaps (%r15), %xmm0
movaps 0x10(%r15), %xmm1
movaps 0x20(%r15), %xmm2
movaps %xmm0, 0x30(%rbx)
movaps %xmm1, 0x40(%rbx)
movaps %xmm2, 0x50(%rbx)
movzwl (%r14), %eax
movw %ax, 0x60(%rbx)
movb 0x2(%r14), %al
movb %al, 0x62(%rbx)
leaq 0x88(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x98(%rbx)
movups %xmm0, 0x88(%rbx)
movups %xmm0, 0x78(%rbx)
movups %xmm0, 0x68(%rbx)
movq %rax, 0x98(%rbx)
movq %rax, 0xa0(%rbx)
leaq 0xb8(%rbx), %rax
movups %xmm0, 0xc8(%rbx)
movups %xmm0, 0xb8(%rbx)
movups %xmm0, 0xa8(%rbx)
movq $0x0, 0xd8(%rbx)
movq %rax, 0xc8(%rbx)
movq %rax, 0xd0(%rbx)
movb $0x0, 0xe0(%rbx)
cmpq $0x0, 0x8(%rbx)
je 0x1cfc8
leaq 0x68(%rbx), %r15
leaq 0x80(%rbx), %r12
leaq 0xb0(%rbx), %r13
movq %rbx, %rdi
callq 0x1d634
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %r13, %rdi
callq 0x1ef48
movq %r12, %rdi
callq 0x1ef48
movq %r15, %rdi
callq 0x1d6a8
movq (%rbx), %rdi
cmpq %rbp, %rdi
je 0x1d006
movq (%rbp), %rsi
incq %rsi
callq 0xb400
movq %r14, %rdi
callq 0xb780
| _ZN8rapidcsv8DocumentC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_11LabelParamsERKNS_15SeparatorParamsERKNS_15ConverterParamsERKNS_16LineReaderParamsE:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, r9
mov r15, r8
mov r12, rcx
mov r13, rdx
mov rbx, rdi
lea rbp, [rdi+10h]
mov [rdi], rbp
mov rax, [rsi]
mov rdx, [rsi+8]
add rdx, rax
mov rsi, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rax, [r13+0]
mov [rbx+20h], rax
movzx eax, word ptr [r12+4]
mov [rbx+2Ch], ax
mov eax, [r12]
mov [rbx+28h], eax
movaps xmm0, xmmword ptr [r15]
movaps xmm1, xmmword ptr [r15+10h]
movaps xmm2, xmmword ptr [r15+20h]
movaps xmmword ptr [rbx+30h], xmm0
movaps xmmword ptr [rbx+40h], xmm1
movaps xmmword ptr [rbx+50h], xmm2
movzx eax, word ptr [r14]
mov [rbx+60h], ax
mov al, [r14+2]
mov [rbx+62h], al
lea rax, [rbx+88h]
xorps xmm0, xmm0
movups xmmword ptr [rbx+98h], xmm0
movups xmmword ptr [rbx+88h], xmm0
movups xmmword ptr [rbx+78h], xmm0
movups xmmword ptr [rbx+68h], xmm0
mov [rbx+98h], rax
mov [rbx+0A0h], rax
lea rax, [rbx+0B8h]
movups xmmword ptr [rbx+0C8h], xmm0
movups xmmword ptr [rbx+0B8h], xmm0
movups xmmword ptr [rbx+0A8h], xmm0
mov qword ptr [rbx+0D8h], 0
mov [rbx+0C8h], rax
mov [rbx+0D0h], rax
mov byte ptr [rbx+0E0h], 0
cmp qword ptr [rbx+8], 0
jz short loc_1CFC8
lea r15, [rbx+68h]
lea r12, [rbx+80h]
lea r13, [rbx+0B0h]
mov rdi, rbx; this
call _ZN8rapidcsv8Document7ReadCsvEv; rapidcsv::Document::ReadCsv(void)
loc_1CFC8:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, r13
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree()
mov rdi, r12
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree()
mov rdi, r15
call _ZNSt6vectorIS_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EESaIS7_EED2Ev; std::vector<std::vector<std::string>>::~vector()
mov rdi, [rbx]; void *
cmp rdi, rbp
jz short loc_1D006
mov rsi, [rbp+0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1D006:
mov rdi, r14
call __Unwind_Resume
| long long rapidcsv::Document::Document(
rapidcsv::Document *this,
long long a2,
_QWORD *a3,
long long a4,
_OWORD *a5,
long long a6)
{
__int128 v10; // xmm1
__int128 v11; // xmm2
long long result; // rax
*(_QWORD *)this = (char *)this + 16;
std::string::_M_construct<char *>(this, *(_BYTE **)a2, *(_QWORD *)a2 + *(_QWORD *)(a2 + 8));
*((_QWORD *)this + 4) = *a3;
*((_WORD *)this + 22) = *(_WORD *)(a4 + 4);
*((_DWORD *)this + 10) = *(_DWORD *)a4;
v10 = a5[1];
v11 = a5[2];
*((_OWORD *)this + 3) = *a5;
*((_OWORD *)this + 4) = v10;
*((_OWORD *)this + 5) = v11;
*((_WORD *)this + 48) = *(_WORD *)a6;
*((_BYTE *)this + 98) = *(_BYTE *)(a6 + 2);
*(_OWORD *)((char *)this + 152) = 0LL;
*(_OWORD *)((char *)this + 136) = 0LL;
*(_OWORD *)((char *)this + 120) = 0LL;
*(_OWORD *)((char *)this + 104) = 0LL;
*((_QWORD *)this + 19) = (char *)this + 136;
*((_QWORD *)this + 20) = (char *)this + 136;
result = (long long)this + 184;
*(_OWORD *)((char *)this + 200) = 0LL;
*(_OWORD *)((char *)this + 184) = 0LL;
*(_OWORD *)((char *)this + 168) = 0LL;
*((_QWORD *)this + 27) = 0LL;
*((_QWORD *)this + 25) = (char *)this + 184;
*((_QWORD *)this + 26) = (char *)this + 184;
*((_BYTE *)this + 224) = 0;
if ( *((_QWORD *)this + 1) )
return rapidcsv::Document::ReadCsv(this);
return result;
}
| Document:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,R9
MOV R15,R8
MOV R12,RCX
MOV R13,RDX
MOV RBX,RDI
LEA RBP,[RDI + 0x10]
MOV qword ptr [RDI],RBP
MOV RAX,qword ptr [RSI]
MOV RDX,qword ptr [RSI + 0x8]
ADD RDX,RAX
MOV RSI,RAX
CALL 0x00111e4e
MOV RAX,qword ptr [R13]
MOV qword ptr [RBX + 0x20],RAX
MOVZX EAX,word ptr [R12 + 0x4]
MOV word ptr [RBX + 0x2c],AX
MOV EAX,dword ptr [R12]
MOV dword ptr [RBX + 0x28],EAX
MOVAPS XMM0,xmmword ptr [R15]
MOVAPS XMM1,xmmword ptr [R15 + 0x10]
MOVAPS XMM2,xmmword ptr [R15 + 0x20]
MOVAPS xmmword ptr [RBX + 0x30],XMM0
MOVAPS xmmword ptr [RBX + 0x40],XMM1
MOVAPS xmmword ptr [RBX + 0x50],XMM2
MOVZX EAX,word ptr [R14]
MOV word ptr [RBX + 0x60],AX
MOV AL,byte ptr [R14 + 0x2]
MOV byte ptr [RBX + 0x62],AL
LEA RAX,[RBX + 0x88]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x98],XMM0
MOVUPS xmmword ptr [RBX + 0x88],XMM0
MOVUPS xmmword ptr [RBX + 0x78],XMM0
MOVUPS xmmword ptr [RBX + 0x68],XMM0
MOV qword ptr [RBX + 0x98],RAX
MOV qword ptr [RBX + 0xa0],RAX
LEA RAX,[RBX + 0xb8]
MOVUPS xmmword ptr [RBX + 0xc8],XMM0
MOVUPS xmmword ptr [RBX + 0xb8],XMM0
MOVUPS xmmword ptr [RBX + 0xa8],XMM0
MOV qword ptr [RBX + 0xd8],0x0
MOV qword ptr [RBX + 0xc8],RAX
MOV qword ptr [RBX + 0xd0],RAX
MOV byte ptr [RBX + 0xe0],0x0
CMP qword ptr [RBX + 0x8],0x0
JZ 0x0011cfc8
LAB_0011cfae:
LEA R15,[RBX + 0x68]
LEA R12,[RBX + 0x80]
LEA R13,[RBX + 0xb0]
MOV RDI,RBX
CALL 0x0011d634
LAB_0011cfc8:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* rapidcsv::Document::Document(std::__cxx11::string const&, rapidcsv::LabelParams const&,
rapidcsv::SeparatorParams const&, rapidcsv::ConverterParams const&, rapidcsv::LineReaderParams
const&) */
void __thiscall
rapidcsv::Document::Document
(Document *this,string *param_1,LabelParams *param_2,SeparatorParams *param_3,
ConverterParams *param_4,LineReaderParams *param_5)
{
int8 uVar1;
int8 uVar2;
int8 uVar3;
int8 uVar4;
int8 uVar5;
*(Document **)this = this + 0x10;
std::__cxx11::string::_M_construct<char*>
(this,*(long *)param_1,*(long *)(param_1 + 8) + *(long *)param_1);
*(int8 *)(this + 0x20) = *(int8 *)param_2;
*(int2 *)(this + 0x2c) = *(int2 *)(param_3 + 4);
*(int4 *)(this + 0x28) = *(int4 *)param_3;
uVar1 = *(int8 *)(param_4 + 8);
uVar2 = *(int8 *)(param_4 + 0x10);
uVar3 = *(int8 *)(param_4 + 0x18);
uVar4 = *(int8 *)(param_4 + 0x20);
uVar5 = *(int8 *)(param_4 + 0x28);
*(int8 *)(this + 0x30) = *(int8 *)param_4;
*(int8 *)(this + 0x38) = uVar1;
*(int8 *)(this + 0x40) = uVar2;
*(int8 *)(this + 0x48) = uVar3;
*(int8 *)(this + 0x50) = uVar4;
*(int8 *)(this + 0x58) = uVar5;
*(int2 *)(this + 0x60) = *(int2 *)param_5;
this[0x62] = *(Document *)(param_5 + 2);
*(int8 *)(this + 0x98) = 0;
*(int8 *)(this + 0xa0) = 0;
*(int8 *)(this + 0x88) = 0;
*(int8 *)(this + 0x90) = 0;
*(int8 *)(this + 0x78) = 0;
*(int8 *)(this + 0x80) = 0;
*(int8 *)(this + 0x68) = 0;
*(int8 *)(this + 0x70) = 0;
*(Document **)(this + 0x98) = this + 0x88;
*(Document **)(this + 0xa0) = this + 0x88;
*(int8 *)(this + 200) = 0;
*(int8 *)(this + 0xd0) = 0;
*(int8 *)(this + 0xb8) = 0;
*(int8 *)(this + 0xc0) = 0;
*(int8 *)(this + 0xa8) = 0;
*(int8 *)(this + 0xb0) = 0;
*(int8 *)(this + 0xd8) = 0;
*(Document **)(this + 200) = this + 0xb8;
*(Document **)(this + 0xd0) = this + 0xb8;
this[0xe0] = (Document)0x0;
if (*(long *)(this + 8) != 0) {
/* try { // try from 0011cfae to 0011cfc7 has its CatchHandler @ 0011cfd7 */
ReadCsv(this);
}
return;
}
|
Subsets and Splits
C++ Functions With Standard Library Dependencies
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ Standard Library Function Analysis
Filters C++ code examples that use standard library containers and types, providing useful insights into common programming patterns and data structures in the dataset.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.