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
16,600
minja::FilterNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
void do_render(std::ostringstream & out, const std::shared_ptr<Context> & context) const override { if (!filter) throw std::runtime_error("FilterNode.filter is null"); if (!body) throw std::runtime_error("FilterNode.body is null"); auto filter_value = filter->evaluate(context); if (!filter_value.is_callable()) { throw std::runtime_error("Filter must be a callable: " + filter_value.dump()); } std::string rendered_body = body->render(context); ArgumentsValue filter_args = {{Value(rendered_body)}, {}}; auto result = filter_value.call(context, filter_args); out << result.to_str(); }
O2
cpp
minja::FilterNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x110, %rsp # imm = 0x110 movq %rsi, %rbx movq 0x20(%rdi), %rsi testq %rsi, %rsi je 0x78149 movq %rdi, %r15 cmpq $0x0, 0x30(%rdi) je 0x78165 movq %rdx, %r14 leaq 0xc0(%rsp), %r12 movq %r12, %rdi callq 0x635ba cmpq $0x0, 0x30(%r12) je 0x78195 movq 0x30(%r15), %rsi leaq 0xa0(%rsp), %rdi movq %r14, %rdx callq 0x76c94 leaq 0x50(%rsp), %rdi leaq 0xa0(%rsp), %rsi callq 0x66828 leaq 0x20(%rsp), %rdi leaq 0x50(%rsp), %rsi pushq $0x1 popq %rdx movq %rsp, %rcx callq 0x6dd20 xorps %xmm0, %xmm0 leaq 0x20(%rsp), %r15 movups %xmm0, 0x18(%r15) andq $0x0, 0x28(%r15) leaq 0x50(%rsp), %rdi callq 0x6384a leaq 0x50(%rsp), %rdi leaq 0xc0(%rsp), %rsi movq %r14, %rdx movq %r15, %rcx callq 0x6dfdc movq %rsp, %rdi leaq 0x50(%rsp), %rsi callq 0x70d34 movq %rsp, %rsi movq %rbx, %rdi callq 0x237e0 movq %rsp, %rdi callq 0x241f8 leaq 0x50(%rsp), %rdi callq 0x6384a leaq 0x20(%rsp), %rdi callq 0x6e0c0 leaq 0xa0(%rsp), %rdi callq 0x241f8 leaq 0xc0(%rsp), %rdi callq 0x6384a addq $0x110, %rsp # imm = 0x110 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq pushq $0x10 popq %rdi callq 0x23450 movq %rax, %r14 leaq 0x3caad(%rip), %rsi # 0xb4c08 movq %rax, %rdi callq 0x23310 jmp 0x7817f pushq $0x10 popq %rdi callq 0x23450 movq %rax, %r14 leaq 0x3caab(%rip), %rsi # 0xb4c22 movq %rax, %rdi callq 0x23310 movq 0x85e6a(%rip), %rsi # 0xfdff0 movq 0x85dcb(%rip), %rdx # 0xfdf58 movq %r14, %rdi callq 0x23f20 pushq $0x10 popq %rdi callq 0x23450 movq %rax, %r14 leaq 0x20(%rsp), %rdi leaq 0xc0(%rsp), %rsi pushq $-0x1 popq %rdx xorl %ecx, %ecx callq 0x63a38 leaq 0x3ca7c(%rip), %rsi # 0xb4c3a leaq 0x50(%rsp), %rdi leaq 0x20(%rsp), %rdx callq 0x591e2 movb $0x1, %bpl leaq 0x50(%rsp), %rsi movq %r14, %rdi callq 0x23e50 xorl %ebp, %ebp movq 0x85e0a(%rip), %rsi # 0xfdff0 movq 0x85d6b(%rip), %rdx # 0xfdf58 movq %r14, %rdi callq 0x23f20 movq %rax, %rbx leaq 0x50(%rsp), %rdi callq 0x241f8 jmp 0x7820a movq %rax, %rbx movb $0x1, %bpl leaq 0x20(%rsp), %rdi callq 0x241f8 testb %bpl, %bpl jne 0x7821e jmp 0x78281 movq %rax, %rbx movq %r14, %rdi callq 0x23690 jmp 0x78281 jmp 0x7822a movq %rax, %rbx movq %r14, %rdi callq 0x23690 jmp 0x7828e movq %rax, %rbx movq %rsp, %rdi callq 0x241f8 jmp 0x78247 movq %rax, %rbx leaq 0x50(%rsp), %rdi callq 0x6384a jmp 0x78256 movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x6e0c0 jmp 0x78274 movq %rax, %rbx leaq 0x50(%rsp), %rdi callq 0x6384a jmp 0x78274 movq %rax, %rbx leaq 0xa0(%rsp), %rdi callq 0x241f8 leaq 0xc0(%rsp), %rdi callq 0x6384a movq %rbx, %rdi callq 0x23fb0 movq %rax, %rbx jmp 0x78281 nop
_ZNK5minja10FilterNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE: push rbp push r15 push r14 push r12 push rbx sub rsp, 110h mov rbx, rsi mov rsi, [rdi+20h] test rsi, rsi jz loc_78149 mov r15, rdi cmp qword ptr [rdi+30h], 0 jz loc_78165 mov r14, rdx lea r12, [rsp+138h+var_78] mov rdi, r12 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) cmp qword ptr [r12+30h], 0 jz loc_78195 mov rsi, [r15+30h] lea rdi, [rsp+138h+var_98] mov rdx, r14 call _ZNK5minja12TemplateNode6renderB5cxx11ERKSt10shared_ptrINS_7ContextEE; minja::TemplateNode::render(std::shared_ptr<minja::Context> const&) lea rdi, [rsp+138h+var_E8] lea rsi, [rsp+138h+var_98] call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) lea rdi, [rsp+138h+var_118] lea rsi, [rsp+138h+var_E8] push 1 pop rdx mov rcx, rsp call _ZNSt6vectorIN5minja5ValueESaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<minja::Value>::vector(std::initializer_list<minja::Value>,std::allocator<minja::Value> const&) xorps xmm0, xmm0 lea r15, [rsp+138h+var_118] movups xmmword ptr [r15+18h], xmm0 and qword ptr [r15+28h], 0 lea rdi, [rsp+138h+var_E8]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() lea rdi, [rsp+138h+var_E8] lea rsi, [rsp+138h+var_78] mov rdx, r14 mov rcx, r15 call _ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE; minja::Value::call(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &) mov rdi, rsp; this lea rsi, [rsp+138h+var_E8]; minja::Value * call _ZNK5minja5Value6to_strB5cxx11Ev; minja::Value::to_str(void) mov rsi, rsp mov rdi, rbx call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov rdi, rsp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+138h+var_E8]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() lea rdi, [rsp+138h+var_118]; this call _ZN5minja14ArgumentsValueD2Ev; minja::ArgumentsValue::~ArgumentsValue() lea rdi, [rsp+138h+var_98]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+138h+var_78]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() add rsp, 110h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_78149: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aFilternodeFilt; "FilterNode.filter is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_7817F loc_78165: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aFilternodeBody; "FilterNode.body is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_7817F: mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw loc_78195: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rdi, [rsp+138h+var_118] lea rsi, [rsp+138h+var_78] push 0FFFFFFFFFFFFFFFFh pop rdx xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aFilterMustBeAC; "Filter must be a callable: " lea rdi, [rsp+138h+var_E8] lea rdx, [rsp+138h+var_118] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+138h+var_E8] mov rdi, r14 call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw mov rbx, rax lea rdi, [rsp+138h+var_E8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_7820A mov rbx, rax mov bpl, 1 loc_7820A: lea rdi, [rsp+138h+var_118]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_7821E jmp short loc_78281 mov rbx, rax loc_7821E: mov rdi, r14; void * call ___cxa_free_exception jmp short loc_78281 jmp short $+2 loc_7822A: mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_7828E mov rbx, rax mov rdi, rsp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_78247 mov rbx, rax loc_78247: lea rdi, [rsp+138h+var_E8]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp short loc_78256 mov rbx, rax loc_78256: lea rdi, [rsp+138h+var_118]; this call _ZN5minja14ArgumentsValueD2Ev; minja::ArgumentsValue::~ArgumentsValue() jmp short loc_78274 mov rbx, rax lea rdi, [rsp+138h+var_E8]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp short loc_78274 mov rbx, rax loc_78274: lea rdi, [rsp+138h+var_98]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_78281: lea rdi, [rsp+138h+var_78]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_7828E: mov rdi, rbx call __Unwind_Resume mov rbx, rax jmp short loc_78281
void minja::FilterNode::do_render(long long a1, long long a2) { void (***v3)(void); // rsi std::runtime_error *exception; // r14 void *v5; // r14 _BYTE v6[32]; // [rsp+0h] [rbp-138h] BYREF _BYTE v7[24]; // [rsp+20h] [rbp-118h] BYREF __int128 v8; // [rsp+38h] [rbp-100h] long long v9; // [rsp+48h] [rbp-F0h] _BYTE v10[80]; // [rsp+50h] [rbp-E8h] BYREF _BYTE v11[32]; // [rsp+A0h] [rbp-98h] BYREF _BYTE v12[48]; // [rsp+C0h] [rbp-78h] BYREF long long v13; // [rsp+F0h] [rbp-48h] v3 = *(void (****)(void))(a1 + 32); if ( !v3 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "FilterNode.filter is null"); goto LABEL_7; } if ( !*(_QWORD *)(a1 + 48) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "FilterNode.body is null"); LABEL_7: __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Expression::evaluate((long long)v12, v3); if ( !v13 ) { v5 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v7, (long long)v12, 0xFFFFFFFF, 0); std::operator+<char>((long long)v10, (long long)"Filter must be a callable: ", (long long)v7); std::runtime_error::runtime_error(v5, v10); __cxa_throw( v5, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::TemplateNode::render[abi:cxx11]((long long)v11, *(long long ( ****)(_QWORD))(a1 + 48)); minja::Value::Value((long long)v10, (long long)v11); std::vector<minja::Value>::vector((long long)v7, (long long)v10, 1LL); v8 = 0LL; v9 = 0LL; minja::Value::~Value((minja::Value *)v10); minja::Value::call((long long)v10, (long long)v12); minja::Value::to_str[abi:cxx11]((std::__cxx11 *)v6, (minja::Value *)v10, 0.0); std::operator<<<char>(a2, v6); std::string::~string(v6); minja::Value::~Value((minja::Value *)v10); minja::ArgumentsValue::~ArgumentsValue((minja::ArgumentsValue *)v7); std::string::~string(v11); minja::Value::~Value((minja::Value *)v12); }
do_render: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x110 MOV RBX,RSI MOV RSI,qword ptr [RDI + 0x20] TEST RSI,RSI JZ 0x00178149 MOV R15,RDI CMP qword ptr [RDI + 0x30],0x0 JZ 0x00178165 MOV R14,RDX LEA R12,[RSP + 0xc0] MOV RDI,R12 CALL 0x001635ba CMP qword ptr [R12 + 0x30],0x0 JZ 0x00178195 MOV RSI,qword ptr [R15 + 0x30] LAB_00178080: LEA RDI,[RSP + 0xa0] MOV RDX,R14 CALL 0x00176c94 LAB_00178090: LEA RDI,[RSP + 0x50] LEA RSI,[RSP + 0xa0] CALL 0x00166828 LAB_001780a2: LEA RDI,[RSP + 0x20] LEA RSI,[RSP + 0x50] PUSH 0x1 POP RDX MOV RCX,RSP CALL 0x0016dd20 XORPS XMM0,XMM0 LEA R15,[RSP + 0x20] MOVUPS xmmword ptr [R15 + 0x18],XMM0 AND qword ptr [R15 + 0x28],0x0 LEA RDI,[RSP + 0x50] CALL 0x0016384a LAB_001780d3: LEA RDI,[RSP + 0x50] LEA RSI,[RSP + 0xc0] MOV RDX,R14 MOV RCX,R15 CALL 0x0016dfdc LAB_001780eb: MOV RDI,RSP LEA RSI,[RSP + 0x50] CALL 0x00170d34 LAB_001780f8: MOV RSI,RSP MOV RDI,RBX CALL 0x001237e0 LAB_00178103: MOV RDI,RSP CALL 0x001241f8 LEA RDI,[RSP + 0x50] CALL 0x0016384a LEA RDI,[RSP + 0x20] CALL 0x0016e0c0 LEA RDI,[RSP + 0xa0] CALL 0x001241f8 LEA RDI,[RSP + 0xc0] CALL 0x0016384a ADD RSP,0x110 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00178149: PUSH 0x10 POP RDI CALL 0x00123450 MOV R14,RAX LAB_00178154: LEA RSI,[0x1b4c08] MOV RDI,RAX CALL 0x00123310 LAB_00178163: JMP 0x0017817f LAB_00178165: PUSH 0x10 POP RDI CALL 0x00123450 MOV R14,RAX LAB_00178170: LEA RSI,[0x1b4c22] MOV RDI,RAX CALL 0x00123310 LAB_0017817f: MOV RSI,qword ptr [0x001fdff0] MOV RDX,qword ptr [0x001fdf58] MOV RDI,R14 CALL 0x00123f20 LAB_00178195: PUSH 0x10 POP RDI CALL 0x00123450 MOV R14,RAX LAB_001781a0: LEA RDI,[RSP + 0x20] LEA RSI,[RSP + 0xc0] PUSH -0x1 POP RDX XOR ECX,ECX CALL 0x00163a38 LAB_001781b7: LEA RSI,[0x1b4c3a] LEA RDI,[RSP + 0x50] LEA RDX,[RSP + 0x20] CALL 0x001591e2 MOV BPL,0x1 LAB_001781d0: LEA RSI,[RSP + 0x50] MOV RDI,R14 CALL 0x00123e50 XOR EBP,EBP MOV RSI,qword ptr [0x001fdff0] MOV RDX,qword ptr [0x001fdf58] MOV RDI,R14 CALL 0x00123f20
/* minja::FilterNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&) const */ void minja::FilterNode::do_render(ostringstream *param_1,shared_ptr *param_2) { runtime_error *prVar1; string asStack_138 [32]; vector<minja::Value,std::allocator<minja::Value>> local_118 [24]; int8 local_100; int8 uStack_f8; int8 local_f0; Value local_e8 [80]; TemplateNode local_98 [32]; Expression local_78 [48]; long local_48; if (*(shared_ptr **)(param_1 + 0x20) == (shared_ptr *)0x0) { prVar1 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00178154 to 00178162 has its CatchHandler @ 0017822a */ std::runtime_error::runtime_error(prVar1,"FilterNode.filter is null"); } else { if (*(long *)(param_1 + 0x30) != 0) { Expression::evaluate(local_78,*(shared_ptr **)(param_1 + 0x20)); if (local_48 != 0) { /* try { // try from 00178080 to 0017808f has its CatchHandler @ 00178296 */ TemplateNode::render_abi_cxx11_(local_98,*(shared_ptr **)(param_1 + 0x30)); /* try { // try from 00178090 to 001780a1 has its CatchHandler @ 00178271 */ Value::Value(local_e8,(string *)local_98); /* try { // try from 001780a2 to 001780b6 has its CatchHandler @ 00178262 */ std::vector<minja::Value,std::allocator<minja::Value>>::vector (local_118,local_e8,1,asStack_138); local_100 = 0; uStack_f8 = 0; local_f0 = 0; Value::~Value(local_e8); /* try { // try from 001780d3 to 001780ea has its CatchHandler @ 00178253 */ Value::call(local_e8,(ArgumentsValue *)local_78); /* try { // try from 001780eb to 001780f7 has its CatchHandler @ 00178244 */ Value::to_str_abi_cxx11_(); /* try { // try from 001780f8 to 00178102 has its CatchHandler @ 00178237 */ std::operator<<((ostream *)param_2,asStack_138); std::__cxx11::string::~string(asStack_138); Value::~Value(local_e8); ArgumentsValue::~ArgumentsValue((ArgumentsValue *)local_118); std::__cxx11::string::~string((string *)local_98); Value::~Value((Value *)local_78); return; } prVar1 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001781a0 to 001781b6 has its CatchHandler @ 0017821b */ Value::dump_abi_cxx11_((int)local_118,SUB81(local_78,0)); /* try { // try from 001781b7 to 001781cc has its CatchHandler @ 00178204 */ std::operator+((char *)local_e8,(string *)"Filter must be a callable: "); /* try { // try from 001781d0 to 001781f4 has its CatchHandler @ 001781f5 */ std::runtime_error::runtime_error(prVar1,(string *)local_e8); /* WARNING: Subroutine does not return */ __cxa_throw(prVar1,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58); } prVar1 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00178170 to 0017817e has its CatchHandler @ 00178228 */ std::runtime_error::runtime_error(prVar1,"FilterNode.body is null"); } /* WARNING: Subroutine does not return */ __cxa_throw(prVar1,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58); }
16,601
my_charset_get_by_name
eloqsql/mysys/charset.c
CHARSET_INFO * my_charset_get_by_name(MY_CHARSET_LOADER *loader, const char *cs_name, uint cs_flags, myf flags) { uint cs_number; CHARSET_INFO *cs; DBUG_ENTER("get_charset_by_csname"); DBUG_PRINT("enter",("name: '%s'", cs_name)); my_pthread_once(&charsets_initialized, init_available_charsets); cs_number= get_charset_number(cs_name, cs_flags, flags); cs= cs_number ? get_internal_charset(loader, cs_number, flags) : NULL; if (!cs && (flags & MY_WME)) { char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)]; strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX); my_error(EE_UNKNOWN_CHARSET, MYF(ME_BELL), cs_name, index_file); } DBUG_RETURN(cs); }
O0
c
my_charset_get_by_name: pushq %rbp movq %rsp, %rbp subq $0x260, %rsp # imm = 0x260 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x228(%rbp) movq %rsi, -0x230(%rbp) movl %edx, -0x234(%rbp) movq %rcx, -0x240(%rbp) jmp 0xd4115 leaq 0x3a30e8(%rip), %rdi # 0x477204 leaq -0xae3(%rip), %rsi # 0xd3640 callq 0x3a280 movq -0x230(%rbp), %rdi movl -0x234(%rbp), %esi movq -0x240(%rbp), %rdx callq 0xd3900 movl %eax, -0x244(%rbp) cmpl $0x0, -0x244(%rbp) je 0xd4172 movq -0x228(%rbp), %rdi movl -0x244(%rbp), %esi movq -0x240(%rbp), %rdx callq 0xd3c90 movq %rax, -0x258(%rbp) jmp 0xd417d xorl %eax, %eax movq %rax, -0x258(%rbp) jmp 0xd417d movq -0x258(%rbp), %rax movq %rax, -0x250(%rbp) cmpq $0x0, -0x250(%rbp) jne 0xd41e0 movq -0x240(%rbp), %rax andq $0x10, %rax cmpq $0x0, %rax je 0xd41e0 leaq -0x220(%rbp), %rdi callq 0xd3300 movq %rax, %rdi leaq 0x75956(%rip), %rsi # 0x149b12 callq 0x3a9c0 movq -0x230(%rbp), %rdx leaq -0x220(%rbp), %rcx movl $0x16, %edi movl $0x4, %esi movb $0x0, %al callq 0xdb970 jmp 0xd41e2 movq -0x250(%rbp), %rax movq %rax, -0x260(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xd4212 movq -0x260(%rbp), %rax addq $0x260, %rsp # imm = 0x260 popq %rbp retq callq 0x3a2a0 nopw (%rax,%rax)
my_charset_get_by_name: push rbp mov rbp, rsp sub rsp, 260h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_228], rdi mov [rbp+var_230], rsi mov [rbp+var_234], edx mov [rbp+var_240], rcx jmp short $+2 loc_D4115: lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once mov rdi, [rbp+var_230] mov esi, [rbp+var_234] mov rdx, [rbp+var_240] call get_charset_number mov [rbp+var_244], eax cmp [rbp+var_244], 0 jz short loc_D4172 mov rdi, [rbp+var_228] mov esi, [rbp+var_244] mov rdx, [rbp+var_240] call get_internal_charset mov [rbp+var_258], rax jmp short loc_D417D loc_D4172: xor eax, eax mov [rbp+var_258], rax jmp short $+2 loc_D417D: mov rax, [rbp+var_258] mov [rbp+var_250], rax cmp [rbp+var_250], 0 jnz short loc_D41E0 mov rax, [rbp+var_240] and rax, 10h cmp rax, 0 jz short loc_D41E0 lea rdi, [rbp+var_220] call get_charsets_dir mov rdi, rax lea rsi, aIndexXml; "Index.xml" call _stpcpy mov rdx, [rbp+var_230] lea rcx, [rbp+var_220] mov edi, 16h mov esi, 4 mov al, 0 call my_error loc_D41E0: jmp short $+2 loc_D41E2: mov rax, [rbp+var_250] mov [rbp+var_260], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_D4212 mov rax, [rbp+var_260] add rsp, 260h pop rbp retn loc_D4212: call ___stack_chk_fail
long long my_charset_get_by_name(long long a1, long long a2, unsigned int a3, long long a4) { long long charsets_dir; // rax int v5; // r8d int v6; // r9d long long internal_charset; // [rsp+8h] [rbp-258h] unsigned int charset_number; // [rsp+1Ch] [rbp-244h] _BYTE v12[536]; // [rsp+40h] [rbp-220h] BYREF unsigned long long v13; // [rsp+258h] [rbp-8h] v13 = __readfsqword(0x28u); pthread_once(&charsets_initialized, init_available_charsets); charset_number = get_charset_number(a2, a3, a4); if ( charset_number ) internal_charset = get_internal_charset(a1, charset_number, a4); else internal_charset = 0LL; if ( !internal_charset && (a4 & 0x10) != 0 ) { charsets_dir = get_charsets_dir((long long)v12); stpcpy(charsets_dir, "Index.xml"); my_error(22, 4, a2, (unsigned int)v12, v5, v6); } return internal_charset; }
my_charset_get_by_name: PUSH RBP MOV RBP,RSP SUB RSP,0x260 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x228],RDI MOV qword ptr [RBP + -0x230],RSI MOV dword ptr [RBP + -0x234],EDX MOV qword ptr [RBP + -0x240],RCX JMP 0x001d4115 LAB_001d4115: LEA RDI,[0x577204] LEA RSI,[0x1d3640] CALL 0x0013a280 MOV RDI,qword ptr [RBP + -0x230] MOV ESI,dword ptr [RBP + -0x234] MOV RDX,qword ptr [RBP + -0x240] CALL 0x001d3900 MOV dword ptr [RBP + -0x244],EAX CMP dword ptr [RBP + -0x244],0x0 JZ 0x001d4172 MOV RDI,qword ptr [RBP + -0x228] MOV ESI,dword ptr [RBP + -0x244] MOV RDX,qword ptr [RBP + -0x240] CALL 0x001d3c90 MOV qword ptr [RBP + -0x258],RAX JMP 0x001d417d LAB_001d4172: XOR EAX,EAX MOV qword ptr [RBP + -0x258],RAX JMP 0x001d417d LAB_001d417d: MOV RAX,qword ptr [RBP + -0x258] MOV qword ptr [RBP + -0x250],RAX CMP qword ptr [RBP + -0x250],0x0 JNZ 0x001d41e0 MOV RAX,qword ptr [RBP + -0x240] AND RAX,0x10 CMP RAX,0x0 JZ 0x001d41e0 LEA RDI,[RBP + -0x220] CALL 0x001d3300 MOV RDI,RAX LEA RSI,[0x249b12] CALL 0x0013a9c0 MOV RDX,qword ptr [RBP + -0x230] LEA RCX,[RBP + -0x220] MOV EDI,0x16 MOV ESI,0x4 MOV AL,0x0 CALL 0x001db970 LAB_001d41e0: JMP 0x001d41e2 LAB_001d41e2: MOV RAX,qword ptr [RBP + -0x250] MOV qword ptr [RBP + -0x260],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001d4212 MOV RAX,qword ptr [RBP + -0x260] ADD RSP,0x260 POP RBP RET LAB_001d4212: CALL 0x0013a2a0
long my_charset_get_by_name(int8 param_1,int8 param_2,int4 param_3,ulong param_4) { int iVar1; char *__dest; long in_FS_OFFSET; long local_260; int1 local_228 [536]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); pthread_once(&charsets_initialized,init_available_charsets); iVar1 = get_charset_number(param_2,param_3,param_4); if (iVar1 == 0) { local_260 = 0; } else { local_260 = get_internal_charset(param_1,iVar1,param_4); } if ((local_260 == 0) && ((param_4 & 0x10) != 0)) { __dest = (char *)get_charsets_dir(local_228); stpcpy(__dest,"Index.xml"); my_error(0x16,4,param_2,local_228); } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_260; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
16,602
nglog::ShellEscape(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
ng-log[P]ng-log/src/logging.cc
static string ShellEscape(const string& src) { string result; if (!src.empty() && // empty string needs quotes src.find_first_not_of(kDontNeedShellEscapeChars) == string::npos) { // only contains chars that don't need quotes; it's fine result.assign(src); } else if (src.find_first_of('\'') == string::npos) { // no single quotes; just wrap it in single quotes result.assign("'"); result.append(src); result.append("'"); } else { // needs double quote escaping result.assign("\""); for (size_t i = 0; i < src.size(); ++i) { switch (src[i]) { case '\\': case '$': case '"': case '`': result.append("\\"); } result.append(src, i, 1); } result.append("\""); } return result; }
O2
cpp
nglog::ShellEscape(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 pushq %rax movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, (%rdi) andq $0x0, 0x8(%rdi) movq %rsi, %r14 movb $0x0, 0x10(%rdi) cmpq $0x0, 0x8(%rsi) je 0xfe4b leaq 0x10a39(%rip), %rsi # 0x20870 movq %r14, %rdi xorl %edx, %edx callq 0x8340 cmpq $-0x1, %rax je 0xfef5 pushq $0x27 popq %rsi movq %r14, %rdi xorl %edx, %edx callq 0x8780 cmpq $-0x1, %rax je 0xfecb leaq 0x11a40(%rip), %rsi # 0x218a5 movq %rbx, %rdi callq 0x8ad0 xorl %r12d, %r12d pushq $0x1 popq %r13 movabsq $0x4400000000000005, %r15 # imm = 0x4400000000000005 leaq 0x11a22(%rip), %rbp # 0x218a7 cmpq 0x8(%r14), %r12 jae 0xfec2 movq (%r14), %rax movzbl (%rax,%r12), %eax addl $-0x22, %eax cmpl $0x3e, %eax ja 0xfeac btq %rax, %r15 jae 0xfeac movq %rbx, %rdi movq %rbp, %rsi callq 0x8ac0 movq %rbx, %rdi movq %r14, %rsi movq %r12, %rdx movq %r13, %rcx callq 0x8800 incq %r12 jmp 0xfe85 leaq 0x119dc(%rip), %r15 # 0x218a5 jmp 0xfee8 leaq 0x10aec(%rip), %r15 # 0x209be movq %rbx, %rdi movq %r15, %rsi callq 0x8ad0 movq %rbx, %rdi movq %r14, %rsi callq 0x8af0 movq %rbx, %rdi movq %r15, %rsi callq 0x8ac0 jmp 0xff00 movq %rbx, %rdi movq %r14, %rsi callq 0x82f0 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xff14 movq %rax, %r14 movq %rbx, %rdi callq 0x8b78 movq %r14, %rdi callq 0x8a40 nop
_ZN5nglogL11ShellEscapeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi lea rax, [rdi+10h] mov [rdi], rax and qword ptr [rdi+8], 0 mov r14, rsi mov byte ptr [rdi+10h], 0 cmp qword ptr [rsi+8], 0 jz short loc_FE4B lea rsi, _ZN5nglogL25kDontNeedShellEscapeCharsE; "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklm"... mov rdi, r14 xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE17find_first_not_ofEPKcm; std::string::find_first_not_of(char const*,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh jz loc_FEF5 loc_FE4B: push 27h ; ''' pop rsi mov rdi, r14 xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh jz short loc_FECB lea rsi, asc_218A5; "\"" mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*) xor r12d, r12d push 1 pop r13 mov r15, 4400000000000005h lea rbp, asc_218A7; "\\" loc_FE85: cmp r12, [r14+8] jnb short loc_FEC2 mov rax, [r14] movzx eax, byte ptr [rax+r12] add eax, 0FFFFFFDEh cmp eax, 3Eh ; '>' ja short loc_FEAC bt r15, rax jnb short loc_FEAC mov rdi, rbx mov rsi, rbp call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) loc_FEAC: mov rdi, rbx mov rsi, r14 mov rdx, r12 mov rcx, r13 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_mm; std::string::append(std::string const&,ulong,ulong) inc r12 jmp short loc_FE85 loc_FEC2: lea r15, asc_218A5; "\"" jmp short loc_FEE8 loc_FECB: lea r15, aDataNumCharsTo+59h; "'" mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*) mov rdi, rbx mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&) loc_FEE8: mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) jmp short loc_FF00 loc_FEF5: mov rdi, rbx mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) loc_FF00: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_FF14: mov r14, rax mov rdi, rbx; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r14 call __Unwind_Resume
long long nglog::ShellEscape(long long a1, _QWORD *a2) { unsigned long long v2; // r12 long long v3; // r15 unsigned long long v4; // rax char *v5; // r15 *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; if ( a2[1] && std::string::find_first_not_of( a2, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-_.=/:,@", 0LL) == -1 ) { std::string::_M_assign(a1, a2); } else { if ( std::string::find(a2, 39LL, 0LL) == -1 ) { v5 = "'"; std::string::assign(a1, "'"); std::string::append(a1, a2); } else { std::string::assign(a1, "\""); v2 = 0LL; v3 = 0x4400000000000005LL; while ( v2 < a2[1] ) { v4 = (unsigned int)*(unsigned __int8 *)(*a2 + v2) - 34; if ( (unsigned int)v4 <= 0x3E ) { if ( _bittest64(&v3, v4) ) std::string::append(a1, "\\"); } std::string::append(a1, a2, v2++, 1LL); } v5 = "\""; } std::string::append(a1, v5); } return a1; }
ShellEscape: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX AND qword ptr [RDI + 0x8],0x0 MOV R14,RSI MOV byte ptr [RDI + 0x10],0x0 CMP qword ptr [RSI + 0x8],0x0 JZ 0x0010fe4b LEA RSI,[0x120870] MOV RDI,R14 XOR EDX,EDX CALL 0x00108340 CMP RAX,-0x1 JZ 0x0010fef5 LAB_0010fe4b: PUSH 0x27 POP RSI MOV RDI,R14 XOR EDX,EDX CALL 0x00108780 CMP RAX,-0x1 JZ 0x0010fecb LAB_0010fe5e: LEA RSI,[0x1218a5] MOV RDI,RBX CALL 0x00108ad0 XOR R12D,R12D PUSH 0x1 POP R13 MOV R15,0x4400000000000005 LEA RBP,[0x1218a7] LAB_0010fe85: CMP R12,qword ptr [R14 + 0x8] JNC 0x0010fec2 MOV RAX,qword ptr [R14] MOVZX EAX,byte ptr [RAX + R12*0x1] ADD EAX,-0x22 CMP EAX,0x3e JA 0x0010feac BT R15,RAX JNC 0x0010feac LAB_0010fea1: MOV RDI,RBX MOV RSI,RBP CALL 0x00108ac0 LAB_0010feac: MOV RDI,RBX MOV RSI,R14 MOV RDX,R12 MOV RCX,R13 CALL 0x00108800 INC R12 JMP 0x0010fe85 LAB_0010fec2: LEA R15,[0x1218a5] JMP 0x0010fee8 LAB_0010fecb: LEA R15,[0x1209be] MOV RDI,RBX MOV RSI,R15 CALL 0x00108ad0 MOV RDI,RBX MOV RSI,R14 CALL 0x00108af0 LAB_0010fee8: MOV RDI,RBX MOV RSI,R15 CALL 0x00108ac0 JMP 0x0010ff00 LAB_0010fef5: MOV RDI,RBX MOV RSI,R14 CALL 0x001082f0 LAB_0010ff00: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nglog::ShellEscape(std::__cxx11::string const&) */ nglog * __thiscall nglog::ShellEscape(nglog *this,string *param_1) { uint uVar1; long lVar2; ulong uVar3; *(nglog **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (nglog)0x0; if ((*(long *)(param_1 + 8) == 0) || (lVar2 = std::__cxx11::string::find_first_not_of((char *)param_1,0x120870), lVar2 != -1)) { lVar2 = std::__cxx11::string::find((char)param_1,0x27); if (lVar2 == -1) { /* try { // try from 0010fecb to 0010feff has its CatchHandler @ 0010ff12 */ std::__cxx11::string::assign((char *)this); std::__cxx11::string::append((string *)this); } else { /* try { // try from 0010fe5e to 0010fe6c has its CatchHandler @ 0010ff12 */ std::__cxx11::string::assign((char *)this); for (uVar3 = 0; uVar3 < *(ulong *)(param_1 + 8); uVar3 = uVar3 + 1) { uVar1 = *(byte *)(*(long *)param_1 + uVar3) - 0x22; if ((uVar1 < 0x3f) && ((0x4400000000000005U >> ((ulong)uVar1 & 0x3f) & 1) != 0)) { /* try { // try from 0010fea1 to 0010febc has its CatchHandler @ 0010ff14 */ std::__cxx11::string::append((char *)this); } std::__cxx11::string::append((string *)this,(ulong)param_1,uVar3); } } std::__cxx11::string::append((char *)this); } else { std::__cxx11::string::_M_assign((string *)this); } return this; }
16,603
nglog::ShellEscape(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
ng-log[P]ng-log/src/logging.cc
static string ShellEscape(const string& src) { string result; if (!src.empty() && // empty string needs quotes src.find_first_not_of(kDontNeedShellEscapeChars) == string::npos) { // only contains chars that don't need quotes; it's fine result.assign(src); } else if (src.find_first_of('\'') == string::npos) { // no single quotes; just wrap it in single quotes result.assign("'"); result.append(src); result.append("'"); } else { // needs double quote escaping result.assign("\""); for (size_t i = 0; i < src.size(); ++i) { switch (src[i]) { case '\\': case '$': case '"': case '`': result.append("\\"); } result.append(src, i, 1); } result.append("\""); } return result; }
O3
cpp
nglog::ShellEscape(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 pushq %rax movq %rsi, %r14 movq %rdi, %rbx leaq 0x10(%rdi), %r12 movq %r12, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) cmpq $0x0, 0x8(%rsi) je 0x1143f leaq 0x1242a(%rip), %rsi # 0x23850 movl $0x47, %ecx movq %r14, %rdi xorl %edx, %edx callq 0x7960 cmpq $-0x1, %rax je 0x11512 movq %r14, %rdi movl $0x27, %esi xorl %edx, %edx callq 0x7700 movq 0x8(%rbx), %rdx cmpq $-0x1, %rax je 0x114dc leaq 0x13422(%rip), %r15 # 0x24885 movl $0x1, %r8d movq %rbx, %rdi xorl %esi, %esi movq %r15, %rcx callq 0x78b0 cmpq $0x0, 0x8(%r14) je 0x11505 movq %r12, (%rsp) xorl %r12d, %r12d movabsq $0x4400000000000005, %rbp # imm = 0x4400000000000005 leaq 0x133ee(%rip), %r13 # 0x24887 movq (%r14), %rax movzbl (%rax,%r12), %eax addl $-0x22, %eax cmpl $0x3e, %eax ja 0x114ba btq %rax, %rbp jae 0x114ba movq %rbx, %rdi movq %r13, %rsi callq 0x7a40 movl $0x1, %ecx movq %rbx, %rdi movq %r14, %rsi movq %r12, %rdx callq 0x7770 incq %r12 cmpq 0x8(%r14), %r12 jb 0x11499 movq (%rsp), %r12 jmp 0x11505 leaq 0x124bb(%rip), %r15 # 0x2399e movl $0x1, %r8d movq %rbx, %rdi xorl %esi, %esi movq %r15, %rcx callq 0x78b0 movq (%r14), %rsi movq 0x8(%r14), %rdx movq %rbx, %rdi callq 0x7140 movq %rbx, %rdi movq %r15, %rsi callq 0x7a40 jmp 0x1151d movq %rbx, %rdi movq %r14, %rsi callq 0x7290 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r12, (%rsp) jmp 0x11532 movq %rax, %r14 movq (%rbx), %rdi cmpq (%rsp), %rdi je 0x1154d movq (%rsp), %rax movq (%rax), %rsi incq %rsi callq 0x8efc movq %r14, %rdi callq 0x79b0 nop
_ZN5nglogL11ShellEscapeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rsi mov rbx, rdi lea r12, [rdi+10h] mov [rdi], r12 mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 cmp qword ptr [rsi+8], 0 jz short loc_1143F lea rsi, _ZN5nglogL25kDontNeedShellEscapeCharsE; "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklm"... mov ecx, 47h ; 'G' mov rdi, r14 xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE17find_first_not_ofEPKcmm; std::string::find_first_not_of(char const*,ulong,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh jz loc_11512 loc_1143F: mov rdi, r14 mov esi, 27h ; ''' xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong) mov rdx, [rbx+8] cmp rax, 0FFFFFFFFFFFFFFFFh jz loc_114DC lea r15, asc_24885; "\"" mov r8d, 1 mov rdi, rbx xor esi, esi mov rcx, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) cmp qword ptr [r14+8], 0 jz loc_11505 mov [rsp+38h+var_38], r12 xor r12d, r12d mov rbp, 4400000000000005h lea r13, asc_24887; "\\" loc_11499: mov rax, [r14] movzx eax, byte ptr [rax+r12] add eax, 0FFFFFFDEh cmp eax, 3Eh ; '>' ja short loc_114BA bt rbp, rax jnb short loc_114BA mov rdi, rbx mov rsi, r13 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) loc_114BA: mov ecx, 1 mov rdi, rbx mov rsi, r14 mov rdx, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_mm; std::string::append(std::string const&,ulong,ulong) inc r12 cmp r12, [r14+8] jb short loc_11499 mov r12, [rsp+38h+var_38] jmp short loc_11505 loc_114DC: lea r15, aDataNumCharsTo+59h; "'" mov r8d, 1 mov rdi, rbx xor esi, esi mov rcx, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) mov rsi, [r14] mov rdx, [r14+8] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) loc_11505: mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) jmp short loc_1151D loc_11512: mov rdi, rbx mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) loc_1151D: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov [rsp+0], r12 jmp short $+2 loc_11532: mov r14, rax mov rdi, [rbx]; void * cmp rdi, [rsp+0] jz short loc_1154D mov rax, [rsp+0] mov rsi, [rax] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_1154D: mov rdi, r14 call __Unwind_Resume
long long nglog::ShellEscape(long long a1, _QWORD *a2) { long long v2; // rax long long v3; // rdx char *v4; // r15 unsigned long long v5; // r12 long long v6; // rbp unsigned long long v7; // rax *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; if ( a2[1] && std::string::find_first_not_of( a2, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-_.=/:,@", 0LL, 71LL) == -1 ) { return std::string::_M_assign(a1, a2); } v2 = std::string::find(a2, 39LL, 0LL); v3 = *(_QWORD *)(a1 + 8); if ( v2 == -1 ) { v4 = "'"; std::string::_M_replace(a1, 0LL, v3, "'", 1LL); std::string::_M_append(a1, *a2); } else { v4 = "\""; std::string::_M_replace(a1, 0LL, v3, "\"", 1LL); if ( a2[1] ) { v5 = 0LL; v6 = 0x4400000000000005LL; do { v7 = (unsigned int)*(unsigned __int8 *)(*a2 + v5) - 34; if ( (unsigned int)v7 <= 0x3E ) { if ( _bittest64(&v6, v7) ) std::string::append(a1, "\\"); } std::string::append(a1, a2, v5++, 1LL); } while ( v5 < a2[1] ); } } return std::string::append(a1, v4); }
ShellEscape: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI LEA R12,[RDI + 0x10] MOV qword ptr [RDI],R12 MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 CMP qword ptr [RSI + 0x8],0x0 JZ 0x0011143f LEA RSI,[0x123850] MOV ECX,0x47 MOV RDI,R14 XOR EDX,EDX CALL 0x00107960 CMP RAX,-0x1 JZ 0x00111512 LAB_0011143f: MOV RDI,R14 MOV ESI,0x27 XOR EDX,EDX CALL 0x00107700 MOV RDX,qword ptr [RBX + 0x8] CMP RAX,-0x1 JZ 0x001114dc LAB_0011145c: LEA R15,[0x124885] MOV R8D,0x1 MOV RDI,RBX XOR ESI,ESI MOV RCX,R15 CALL 0x001078b0 CMP qword ptr [R14 + 0x8],0x0 JZ 0x00111505 MOV qword ptr [RSP],R12 XOR R12D,R12D MOV RBP,0x4400000000000005 LEA R13,[0x124887] LAB_00111499: MOV RAX,qword ptr [R14] MOVZX EAX,byte ptr [RAX + R12*0x1] ADD EAX,-0x22 CMP EAX,0x3e JA 0x001114ba BT RBP,RAX JNC 0x001114ba LAB_001114af: MOV RDI,RBX MOV RSI,R13 CALL 0x00107a40 LAB_001114ba: MOV ECX,0x1 MOV RDI,RBX MOV RSI,R14 MOV RDX,R12 CALL 0x00107770 INC R12 CMP R12,qword ptr [R14 + 0x8] JC 0x00111499 MOV R12,qword ptr [RSP] JMP 0x00111505 LAB_001114dc: LEA R15,[0x12399e] MOV R8D,0x1 MOV RDI,RBX XOR ESI,ESI MOV RCX,R15 CALL 0x001078b0 MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] MOV RDI,RBX CALL 0x00107140 LAB_00111505: MOV RDI,RBX MOV RSI,R15 CALL 0x00107a40 JMP 0x0011151d LAB_00111512: MOV RDI,RBX MOV RSI,R14 CALL 0x00107290 LAB_0011151d: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nglog::ShellEscape(std::__cxx11::string const&) */ void __thiscall nglog::ShellEscape(nglog *this,string *param_1) { uint uVar1; long lVar2; ulong uVar3; *(nglog **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (nglog)0x0; if ((*(long *)(param_1 + 8) == 0) || (lVar2 = std::__cxx11::string::find_first_not_of((char *)param_1,0x123850,0), lVar2 != -1)) { lVar2 = std::__cxx11::string::find((char)param_1,0x27); if (lVar2 == -1) { /* try { // try from 001114dc to 0011151c has its CatchHandler @ 0011152c */ std::__cxx11::string::_M_replace((ulong)this,0,*(char **)(this + 8),0x12399e); std::__cxx11::string::_M_append((char *)this,*(ulong *)param_1); } else { /* try { // try from 0011145c to 00111475 has its CatchHandler @ 0011152c */ std::__cxx11::string::_M_replace((ulong)this,0,*(char **)(this + 8),0x124885); if (*(long *)(param_1 + 8) != 0) { uVar3 = 0; do { uVar1 = *(byte *)(*(long *)param_1 + uVar3) - 0x22; if ((uVar1 < 0x3f) && ((0x4400000000000005U >> ((ulong)uVar1 & 0x3f) & 1) != 0)) { /* try { // try from 001114af to 001114cc has its CatchHandler @ 00111532 */ std::__cxx11::string::append((char *)this); } std::__cxx11::string::append((string *)this,(ulong)param_1,uVar3); uVar3 = uVar3 + 1; } while (uVar3 < *(ulong *)(param_1 + 8)); } } std::__cxx11::string::append((char *)this); } else { std::__cxx11::string::_M_assign((string *)this); } return; }
16,604
YAML::Node const YAML::Node::operator[]<char [22]>(char const (&) [22]) const
aimrt_mujoco_sim/_deps/yaml-cpp-src/include/yaml-cpp/node/impl.h
inline const Node Node::operator[](const Key& key) const { EnsureNodeExists(); detail::node* value = static_cast<const detail::node&>(*m_pNode).get(key, m_pMemory); if (!value) { return Node(ZombieNode, key_to_string(key)); } return Node(*value, m_pMemory); }
O0
c
YAML::Node const YAML::Node::operator[]<char [22]>(char const (&) [22]) const: subq $0xc8, %rsp movq %rdi, 0x20(%rsp) movq %rdi, %rax movq %rax, 0x28(%rsp) movq %rdi, 0xc0(%rsp) movq %rsi, 0xb8(%rsp) movq %rdx, 0xb0(%rsp) movq 0xb8(%rsp), %rdi movq %rdi, 0x30(%rsp) callq 0xe3390 movq 0x30(%rsp), %rsi movq 0x38(%rsi), %rax movq %rax, 0x38(%rsp) movq 0xb0(%rsp), %rax movq %rax, 0x40(%rsp) addq $0x28, %rsi leaq 0x98(%rsp), %rdi movq %rdi, 0x48(%rsp) callq 0xda5a0 movq 0x38(%rsp), %rdi movq 0x40(%rsp), %rsi movq 0x48(%rsp), %rdx callq 0xea530 movq %rax, 0x50(%rsp) jmp 0xe2cca leaq 0x98(%rsp), %rdi callq 0xda6e0 movq 0x50(%rsp), %rax movq %rax, 0xa8(%rsp) cmpq $0x0, 0xa8(%rsp) jne 0xe2d6e movq 0xb0(%rsp), %rsi leaq 0x68(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0xea5d0 movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rdx xorl %esi, %esi callq 0xe3580 jmp 0xe2d19 leaq 0x68(%rsp), %rdi callq 0x96fb8 jmp 0xe2dd5 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) leaq 0x98(%rsp), %rdi callq 0xda6e0 jmp 0xe2de2 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) leaq 0x68(%rsp), %rdi callq 0x96fb8 jmp 0xe2de2 movq 0x30(%rsp), %rsi movq 0xa8(%rsp), %rax movq %rax, 0x8(%rsp) addq $0x28, %rsi leaq 0x58(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0xda5a0 movq 0x20(%rsp), %rdi movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx callq 0xe35d0 jmp 0xe2da9 leaq 0x58(%rsp), %rdi callq 0xda6e0 jmp 0xe2dd5 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) leaq 0x58(%rsp), %rdi callq 0xda6e0 jmp 0xe2de2 movq 0x28(%rsp), %rax addq $0xc8, %rsp retq movq 0x90(%rsp), %rdi callq 0x90db0 nop
_ZNK4YAML4NodeixIA18_cEEKS0_RKT_: sub rsp, 0C8h mov [rsp+0C8h+var_A8], rdi mov rax, rdi mov [rsp+0C8h+var_A0], rax mov [rsp+0C8h+var_8], rdi mov [rsp+0C8h+var_10], rsi mov [rsp+0C8h+var_18], rdx mov rdi, [rsp+0C8h+var_10]; this mov [rsp+0C8h+var_98], rdi call _ZNK4YAML4Node16EnsureNodeExistsEv; YAML::Node::EnsureNodeExists(void) mov rsi, [rsp+0C8h+var_98] mov rax, [rsi+38h] mov [rsp+0C8h+var_90], rax mov rax, [rsp+0C8h+var_18] mov [rsp+0C8h+var_88], rax add rsi, 28h ; '(' lea rdi, [rsp+0C8h+var_30] mov [rsp+0C8h+var_80], rdi call _ZNSt10shared_ptrIN4YAML6detail13memory_holderEEC2ERKS3_; std::shared_ptr<YAML::detail::memory_holder>::shared_ptr(std::shared_ptr<YAML::detail::memory_holder> const&) mov rdi, [rsp+0C8h+var_90] mov rsi, [rsp+0C8h+var_88] mov rdx, [rsp+0C8h+var_80] call _ZNK4YAML6detail4node3getIA18_cEEPS1_RKT_St10shared_ptrINS0_13memory_holderEE; YAML::detail::node::get<char [18]>(char [18] const&,std::shared_ptr<YAML::detail::memory_holder>) mov [rsp+0C8h+var_78], rax jmp short $+2 loc_E2CCA: lea rdi, [rsp+0C8h+var_30] call _ZNSt10shared_ptrIN4YAML6detail13memory_holderEED2Ev; std::shared_ptr<YAML::detail::memory_holder>::~shared_ptr() mov rax, [rsp+0C8h+var_78] mov [rsp+0C8h+var_20], rax cmp [rsp+0C8h+var_20], 0 jnz short loc_E2D6E mov rsi, [rsp+0C8h+var_18] lea rdi, [rsp+0C8h+var_60] mov [rsp+0C8h+var_B0], rdi call _ZN4YAML13key_to_stringIA18_cEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; YAML::key_to_string<char [18]>(char [18] const&) mov rdi, [rsp+0C8h+var_A8] mov rdx, [rsp+0C8h+var_B0] xor esi, esi call _ZN4YAML4NodeC2ENS0_6ZombieERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; YAML::Node::Node(YAML::Node::Zombie,std::string const&) jmp short $+2 loc_E2D19: lea rdi, [rsp+0C8h+var_60]; void * call j__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp loc_E2DD5 mov rcx, rax mov eax, edx mov [rsp+arg_88], rcx mov [rsp+arg_84], eax lea rdi, [rsp+arg_90] call _ZNSt10shared_ptrIN4YAML6detail13memory_holderEED2Ev; std::shared_ptr<YAML::detail::memory_holder>::~shared_ptr() jmp loc_E2DE2 mov rcx, rax mov eax, edx mov [rsp+arg_88], rcx mov [rsp+arg_84], eax lea rdi, [rsp+arg_60]; void * call j__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_E2DE2 loc_E2D6E: mov rsi, [rsp+0C8h+var_98] mov rax, [rsp+0C8h+var_20] mov [rsp+0C8h+var_C0], rax add rsi, 28h ; '(' lea rdi, [rsp+0C8h+var_70] mov [rsp+0C8h+var_B8], rdi call _ZNSt10shared_ptrIN4YAML6detail13memory_holderEEC2ERKS3_; std::shared_ptr<YAML::detail::memory_holder>::shared_ptr(std::shared_ptr<YAML::detail::memory_holder> const&) mov rdi, [rsp+0C8h+var_A8] mov rsi, [rsp+0C8h+var_C0] mov rdx, [rsp+0C8h+var_B8] call _ZN4YAML4NodeC2ERNS_6detail4nodeESt10shared_ptrINS1_13memory_holderEE; YAML::Node::Node(YAML::detail::node &,std::shared_ptr<YAML::detail::memory_holder>) jmp short $+2 loc_E2DA9: lea rdi, [rsp+0C8h+var_70] call _ZNSt10shared_ptrIN4YAML6detail13memory_holderEED2Ev; std::shared_ptr<YAML::detail::memory_holder>::~shared_ptr() jmp short loc_E2DD5 mov rcx, rax mov eax, edx mov [rsp+arg_88], rcx mov [rsp+arg_84], eax lea rdi, [rsp+arg_50] call _ZNSt10shared_ptrIN4YAML6detail13memory_holderEED2Ev; std::shared_ptr<YAML::detail::memory_holder>::~shared_ptr() jmp short loc_E2DE2 loc_E2DD5: mov rax, [rsp+0C8h+var_A0] add rsp, 0C8h retn loc_E2DE2: mov rdi, [rsp+arg_88] call __Unwind_Resume
long long YAML::Node::operator[]<char [18]>(long long a1, YAML::Node *a2, long long a3) { int v3; // ecx int v4; // r8d int v5; // r9d long long v7; // [rsp+8h] [rbp-C0h] long long v8; // [rsp+38h] [rbp-90h] int v9; // [rsp+40h] [rbp-88h] long long v10; // [rsp+50h] [rbp-78h] _BYTE v11[16]; // [rsp+58h] [rbp-70h] BYREF _BYTE v12[48]; // [rsp+68h] [rbp-60h] BYREF _BYTE v13[16]; // [rsp+98h] [rbp-30h] BYREF long long v14; // [rsp+A8h] [rbp-20h] long long v15; // [rsp+B0h] [rbp-18h] YAML::Node *v16; // [rsp+B8h] [rbp-10h] long long v17; // [rsp+C0h] [rbp-8h] v17 = a1; v16 = a2; v15 = a3; YAML::Node::EnsureNodeExists(a2); v8 = *((_QWORD *)a2 + 7); v9 = v15; std::shared_ptr<YAML::detail::memory_holder>::shared_ptr((long long)v13, (long long)a2 + 40); v10 = YAML::detail::node::get<char [18]>(v8, v9, (unsigned int)v13, v3, v4, v5); std::shared_ptr<YAML::detail::memory_holder>::~shared_ptr((long long)v13); v14 = v10; if ( v10 ) { v7 = v14; std::shared_ptr<YAML::detail::memory_holder>::shared_ptr((long long)v11, (long long)a2 + 40); YAML::Node::Node(a1, v7, v11); std::shared_ptr<YAML::detail::memory_holder>::~shared_ptr((long long)v11); } else { YAML::key_to_string<char [18]>(v12, v15); YAML::Node::Node(a1, 0LL, v12); std::string::~string(v12); } return a1; }
operator[]<char[18]>: SUB RSP,0xc8 MOV qword ptr [RSP + 0x20],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0xc0],RDI MOV qword ptr [RSP + 0xb8],RSI MOV qword ptr [RSP + 0xb0],RDX MOV RDI,qword ptr [RSP + 0xb8] MOV qword ptr [RSP + 0x30],RDI CALL 0x001e3390 MOV RSI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSI + 0x38] MOV qword ptr [RSP + 0x38],RAX MOV RAX,qword ptr [RSP + 0xb0] MOV qword ptr [RSP + 0x40],RAX ADD RSI,0x28 LEA RDI,[RSP + 0x98] MOV qword ptr [RSP + 0x48],RDI CALL 0x001da5a0 MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x48] LAB_001e2cbe: CALL 0x001ea530 LAB_001e2cc3: MOV qword ptr [RSP + 0x50],RAX JMP 0x001e2cca LAB_001e2cca: LEA RDI,[RSP + 0x98] CALL 0x001da6e0 MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0xa8],RAX CMP qword ptr [RSP + 0xa8],0x0 JNZ 0x001e2d6e MOV RSI,qword ptr [RSP + 0xb0] LEA RDI,[RSP + 0x68] MOV qword ptr [RSP + 0x18],RDI CALL 0x001ea5d0 MOV RDI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x18] LAB_001e2d10: XOR ESI,ESI CALL 0x001e3580 JMP 0x001e2d19 LAB_001e2d19: LEA RDI,[RSP + 0x68] CALL 0x00196fb8 JMP 0x001e2dd5 LAB_001e2d6e: MOV RSI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0xa8] MOV qword ptr [RSP + 0x8],RAX ADD RSI,0x28 LEA RDI,[RSP + 0x58] MOV qword ptr [RSP + 0x10],RDI CALL 0x001da5a0 MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_001e2da2: CALL 0x001e35d0 LAB_001e2da7: JMP 0x001e2da9 LAB_001e2da9: LEA RDI,[RSP + 0x58] CALL 0x001da6e0 JMP 0x001e2dd5 LAB_001e2dd5: MOV RAX,qword ptr [RSP + 0x28] ADD RSP,0xc8 RET
/* YAML::Node const YAML::Node::operator[]<char [18]>(char const (&) [18]) const */ char * YAML::Node::operator[]<char[18]>(char *param_1) { char *pcVar1; node *pnVar2; char *in_RDX; Node *in_RSI; shared_ptr<YAML::detail::memory_holder> local_70 [16]; YAML local_60 [48]; shared_ptr<YAML::detail::memory_holder> local_30 [16]; node *local_20; char *local_18; char *local_8; local_18 = in_RDX; local_8 = param_1; EnsureNodeExists(in_RSI); pcVar1 = local_18; pnVar2 = *(node **)(in_RSI + 0x38); std::shared_ptr<YAML::detail::memory_holder>::shared_ptr(local_30,in_RSI + 0x28); /* try { // try from 001e2cbe to 001e2cc2 has its CatchHandler @ 001e2d28 */ pnVar2 = YAML::detail::node::get<char[18]>(pnVar2,pcVar1,local_30); std::shared_ptr<YAML::detail::memory_holder>::~shared_ptr(local_30); local_20 = pnVar2; if (pnVar2 == (node *)0x0) { key_to_string<char[18]>(local_60,local_18); /* try { // try from 001e2d10 to 001e2d16 has its CatchHandler @ 001e2d4e */ Node((Node *)param_1,0,local_60); std::__cxx11::string::~string((string *)local_60); } else { std::shared_ptr<YAML::detail::memory_holder>::shared_ptr(local_70,in_RSI + 0x28); /* try { // try from 001e2da2 to 001e2da6 has its CatchHandler @ 001e2db5 */ Node((Node *)param_1,pnVar2,local_70); std::shared_ptr<YAML::detail::memory_holder>::~shared_ptr(local_70); } return param_1; }
16,605
YAML::Node const YAML::Node::operator[]<char [22]>(char const (&) [22]) const
aimrt_mujoco_sim/_deps/yaml-cpp-src/include/yaml-cpp/node/impl.h
inline const Node Node::operator[](const Key& key) const { EnsureNodeExists(); detail::node* value = static_cast<const detail::node&>(*m_pNode).get(key, m_pMemory); if (!value) { return Node(ZombieNode, key_to_string(key)); } return Node(*value, m_pMemory); }
O3
c
YAML::Node const YAML::Node::operator[]<char [22]>(char const (&) [22]) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx movq %rsi, %rdi callq 0x4a4ba movq 0x28(%r12), %rax movq 0x38(%r12), %rdi movq %rax, 0x8(%rsp) movq 0x30(%r12), %rax movq %rax, 0x10(%rsp) testq %rax, %rax je 0x55f0b movq 0x1ba02b(%rip), %rcx # 0x20ff28 cmpb $0x0, (%rcx) je 0x55f07 incl 0x8(%rax) jmp 0x55f0b lock incl 0x8(%rax) leaq 0x8(%rsp), %rdx movq %r15, %rsi callq 0x564f6 movq %rax, %r14 movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x55f2a callq 0x466d6 testq %r14, %r14 je 0x55f79 movq 0x28(%r12), %rax movq 0x30(%r12), %rdi testq %rdi, %rdi je 0x55fd3 movq 0x1b9fdf(%rip), %rdx # 0x20ff28 leaq 0x18(%rbx), %rcx cmpb $0x0, (%rdx) je 0x55ff6 incl 0x8(%rdi) movb $0x1, (%rbx) movq %rcx, 0x8(%rbx) movq $0x0, 0x10(%rbx) movb $0x0, 0x18(%rbx) movq %rax, 0x28(%rbx) movq %rdi, 0x30(%rbx) jmp 0x5601a leaq 0x18(%rsp), %r14 movq %r14, %rdi movq %r15, %rsi callq 0x5689e movb $0x0, (%rbx) leaq 0x8(%rbx), %rdi leaq 0x18(%rbx), %rax movq %rax, 0x8(%rbx) movq (%r14), %rsi movq 0x8(%r14), %rdx addq %rsi, %rdx callq 0x2c640 xorps %xmm0, %xmm0 movups %xmm0, 0x28(%rbx) movq $0x0, 0x38(%rbx) leaq 0x28(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x56026 movq 0x28(%rsp), %rsi incq %rsi callq 0x2d2d0 jmp 0x56026 movb $0x1, (%rbx) leaq 0x18(%rbx), %rcx movq %rcx, 0x8(%rbx) xorl %ecx, %ecx movq %rcx, 0x10(%rbx) movb $0x0, 0x18(%rbx) movq %rax, 0x28(%rbx) movq %rcx, 0x30(%rbx) movq %r14, 0x38(%rbx) jmp 0x56026 lock incl 0x8(%rdi) cmpb $0x0, (%rdx) movb $0x1, (%rbx) movq %rcx, 0x8(%rbx) movq $0x0, 0x10(%rbx) movb $0x0, 0x18(%rbx) movq %rax, 0x28(%rbx) movq %rdi, 0x30(%rbx) je 0x56035 incl 0x8(%rdi) movq %r14, 0x38(%rbx) callq 0x466d6 movq %rbx, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq lock incl 0x8(%rdi) jmp 0x5601d movq %rax, %rbx leaq 0x28(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x5606d movq 0x28(%rsp), %rsi incq %rsi callq 0x2d2d0 jmp 0x5606d movq %rax, %rbx movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x5606d callq 0x466d6 movq %rbx, %rdi callq 0x2e220 nop
_ZNK4YAML4NodeixIA11_cEEKS0_RKT_: push r15 push r14 push r12 push rbx sub rsp, 38h mov r15, rdx mov r12, rsi mov rbx, rdi mov rdi, rsi; this call _ZNK4YAML4Node16EnsureNodeExistsEv; YAML::Node::EnsureNodeExists(void) mov rax, [r12+28h] mov rdi, [r12+38h] mov [rsp+58h+var_50], rax mov rax, [r12+30h] mov [rsp+58h+var_48], rax test rax, rax jz short loc_55F0B mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_55F07 inc dword ptr [rax+8] jmp short loc_55F0B loc_55F07: lock inc dword ptr [rax+8] loc_55F0B: lea rdx, [rsp+58h+var_50] mov rsi, r15 call _ZNK4YAML6detail4node3getIA11_cEEPS1_RKT_St10shared_ptrINS0_13memory_holderEE; YAML::detail::node::get<char [11]>(char [11] const&,std::shared_ptr<YAML::detail::memory_holder>) mov r14, rax mov rdi, [rsp+58h+var_48] test rdi, rdi jz short loc_55F2A call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_55F2A: test r14, r14 jz short loc_55F79 mov rax, [r12+28h] mov rdi, [r12+30h] test rdi, rdi jz loc_55FD3 mov rdx, cs:__libc_single_threaded_ptr lea rcx, [rbx+18h] cmp byte ptr [rdx], 0 jz loc_55FF6 inc dword ptr [rdi+8] mov byte ptr [rbx], 1 mov [rbx+8], rcx mov qword ptr [rbx+10h], 0 mov byte ptr [rbx+18h], 0 mov [rbx+28h], rax mov [rbx+30h], rdi jmp loc_5601A loc_55F79: lea r14, [rsp+58h+var_40] mov rdi, r14 mov rsi, r15 call _ZN20streamable_to_stringIA11_cLb1EE4implB5cxx11ERA11_Kc; streamable_to_string<char [11],true>::impl(char const(&)[11]) mov byte ptr [rbx], 0 lea rdi, [rbx+8] lea rax, [rbx+18h] mov [rbx+8], rax mov rsi, [r14] mov rdx, [r14+8] 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) xorps xmm0, xmm0 movups xmmword ptr [rbx+28h], xmm0 mov qword ptr [rbx+38h], 0 lea rax, [rsp+58h+var_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_56026 mov rsi, [rsp+58h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_56026 loc_55FD3: mov byte ptr [rbx], 1 lea rcx, [rbx+18h] mov [rbx+8], rcx xor ecx, ecx mov [rbx+10h], rcx mov byte ptr [rbx+18h], 0 mov [rbx+28h], rax mov [rbx+30h], rcx mov [rbx+38h], r14 jmp short loc_56026 loc_55FF6: lock inc dword ptr [rdi+8] cmp byte ptr [rdx], 0 mov byte ptr [rbx], 1 mov [rbx+8], rcx mov qword ptr [rbx+10h], 0 mov byte ptr [rbx+18h], 0 mov [rbx+28h], rax mov [rbx+30h], rdi jz short loc_56035 loc_5601A: inc dword ptr [rdi+8] loc_5601D: mov [rbx+38h], 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_56026: mov rax, rbx add rsp, 38h pop rbx pop r12 pop r14 pop r15 retn loc_56035: lock inc dword ptr [rdi+8] jmp short loc_5601D mov rbx, rax lea rax, [rsp+arg_20] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_5606D mov rsi, [rsp+arg_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_5606D mov rbx, rax mov rdi, [rsp+arg_8] test rdi, rdi jz short loc_5606D call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_5606D: mov rdi, rbx call __Unwind_Resume
operator[]<char[11]>: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R15,RDX MOV R12,RSI MOV RBX,RDI MOV RDI,RSI CALL 0x0014a4ba MOV RAX,qword ptr [R12 + 0x28] MOV RDI,qword ptr [R12 + 0x38] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [R12 + 0x30] MOV qword ptr [RSP + 0x10],RAX TEST RAX,RAX JZ 0x00155f0b MOV RCX,qword ptr [0x0030ff28] CMP byte ptr [RCX],0x0 JZ 0x00155f07 INC dword ptr [RAX + 0x8] JMP 0x00155f0b LAB_00155f07: INC.LOCK dword ptr [RAX + 0x8] LAB_00155f0b: LEA RDX,[RSP + 0x8] MOV RSI,R15 CALL 0x001564f6 LAB_00155f18: MOV R14,RAX MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x00155f2a CALL 0x001466d6 LAB_00155f2a: TEST R14,R14 JZ 0x00155f79 MOV RAX,qword ptr [R12 + 0x28] MOV RDI,qword ptr [R12 + 0x30] TEST RDI,RDI JZ 0x00155fd3 MOV RDX,qword ptr [0x0030ff28] LEA RCX,[RBX + 0x18] CMP byte ptr [RDX],0x0 JZ 0x00155ff6 INC dword ptr [RDI + 0x8] MOV byte ptr [RBX],0x1 MOV qword ptr [RBX + 0x8],RCX MOV qword ptr [RBX + 0x10],0x0 MOV byte ptr [RBX + 0x18],0x0 MOV qword ptr [RBX + 0x28],RAX MOV qword ptr [RBX + 0x30],RDI JMP 0x0015601a LAB_00155f79: LEA R14,[RSP + 0x18] MOV RDI,R14 MOV RSI,R15 CALL 0x0015689e MOV byte ptr [RBX],0x0 LEA RDI,[RBX + 0x8] LEA RAX,[RBX + 0x18] MOV qword ptr [RBX + 0x8],RAX MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] ADD RDX,RSI LAB_00155fa2: CALL 0x0012c640 LAB_00155fa7: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x28],XMM0 MOV qword ptr [RBX + 0x38],0x0 LEA RAX,[RSP + 0x28] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00156026 MOV RSI,qword ptr [RSP + 0x28] INC RSI CALL 0x0012d2d0 JMP 0x00156026 LAB_00155fd3: MOV byte ptr [RBX],0x1 LEA RCX,[RBX + 0x18] MOV qword ptr [RBX + 0x8],RCX XOR ECX,ECX MOV qword ptr [RBX + 0x10],RCX MOV byte ptr [RBX + 0x18],0x0 MOV qword ptr [RBX + 0x28],RAX MOV qword ptr [RBX + 0x30],RCX MOV qword ptr [RBX + 0x38],R14 JMP 0x00156026 LAB_00155ff6: INC.LOCK dword ptr [RDI + 0x8] CMP byte ptr [RDX],0x0 MOV byte ptr [RBX],0x1 MOV qword ptr [RBX + 0x8],RCX MOV qword ptr [RBX + 0x10],0x0 MOV byte ptr [RBX + 0x18],0x0 MOV qword ptr [RBX + 0x28],RAX MOV qword ptr [RBX + 0x30],RDI JZ 0x00156035 LAB_0015601a: INC dword ptr [RDI + 0x8] LAB_0015601d: MOV qword ptr [RBX + 0x38],R14 CALL 0x001466d6 LAB_00156026: MOV RAX,RBX ADD RSP,0x38 POP RBX POP R12 POP R14 POP R15 RET LAB_00156035: INC.LOCK dword ptr [RDI + 0x8] JMP 0x0015601d
/* YAML::Node const YAML::Node::operator[]<char [11]>(char const (&) [11]) const */ char * YAML::Node::operator[]<char[11]>(char *param_1) { char cVar1; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Var2; int8 uVar3; int *puVar4; node *pnVar5; char *in_RDX; Node *in_RSI; long *local_40; long local_38; long local_30 [2]; EnsureNodeExists(in_RSI); pnVar5 = *(node **)(in_RSI + 0x38); p_Var2 = *(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(in_RSI + 0x30); if (p_Var2 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_0030ff28 == '\0') { LOCK(); *(int *)(p_Var2 + 8) = *(int *)(p_Var2 + 8) + 1; UNLOCK(); } else { *(int *)(p_Var2 + 8) = *(int *)(p_Var2 + 8) + 1; } } /* try { // try from 00155f0b to 00155f17 has its CatchHandler @ 0015605b */ pnVar5 = detail::node::get<char[11]>(pnVar5); if (p_Var2 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Var2); } puVar4 = PTR___libc_single_threaded_0030ff28; if (pnVar5 == (node *)0x0) { streamable_to_string<char[11],true>::impl_abi_cxx11_ ((streamable_to_string<char[11],true> *)&local_40,in_RDX); *param_1 = '\0'; *(char **)(param_1 + 8) = param_1 + 0x18; /* try { // try from 00155fa2 to 00155fa6 has its CatchHandler @ 0015603b */ std::__cxx11::string::_M_construct<char*>(param_1 + 8,local_40,local_38 + (long)local_40); param_1[0x28] = '\0'; param_1[0x29] = '\0'; param_1[0x2a] = '\0'; param_1[0x2b] = '\0'; param_1[0x2c] = '\0'; param_1[0x2d] = '\0'; param_1[0x2e] = '\0'; param_1[0x2f] = '\0'; param_1[0x30] = '\0'; param_1[0x31] = '\0'; param_1[0x32] = '\0'; param_1[0x33] = '\0'; param_1[0x34] = '\0'; param_1[0x35] = '\0'; param_1[0x36] = '\0'; param_1[0x37] = '\0'; param_1[0x38] = '\0'; param_1[0x39] = '\0'; param_1[0x3a] = '\0'; param_1[0x3b] = '\0'; param_1[0x3c] = '\0'; param_1[0x3d] = '\0'; param_1[0x3e] = '\0'; param_1[0x3f] = '\0'; if (local_40 == local_30) { return param_1; } operator_delete(local_40,local_30[0] + 1); return param_1; } uVar3 = *(int8 *)(in_RSI + 0x28); p_Var2 = *(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(in_RSI + 0x30); if (p_Var2 == (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { *param_1 = '\x01'; *(char **)(param_1 + 8) = param_1 + 0x18; param_1[0x10] = '\0'; param_1[0x11] = '\0'; param_1[0x12] = '\0'; param_1[0x13] = '\0'; param_1[0x14] = '\0'; param_1[0x15] = '\0'; param_1[0x16] = '\0'; param_1[0x17] = '\0'; param_1[0x18] = '\0'; *(int8 *)(param_1 + 0x28) = uVar3; param_1[0x30] = '\0'; param_1[0x31] = '\0'; param_1[0x32] = '\0'; param_1[0x33] = '\0'; param_1[0x34] = '\0'; param_1[0x35] = '\0'; param_1[0x36] = '\0'; param_1[0x37] = '\0'; *(node **)(param_1 + 0x38) = pnVar5; return param_1; } if (*PTR___libc_single_threaded_0030ff28 == '\0') { LOCK(); *(int *)(p_Var2 + 8) = *(int *)(p_Var2 + 8) + 1; UNLOCK(); cVar1 = *puVar4; *param_1 = '\x01'; *(char **)(param_1 + 8) = param_1 + 0x18; param_1[0x10] = '\0'; param_1[0x11] = '\0'; param_1[0x12] = '\0'; param_1[0x13] = '\0'; param_1[0x14] = '\0'; param_1[0x15] = '\0'; param_1[0x16] = '\0'; param_1[0x17] = '\0'; param_1[0x18] = '\0'; *(int8 *)(param_1 + 0x28) = uVar3; *(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(param_1 + 0x30) = p_Var2; if (cVar1 == '\0') { LOCK(); *(int *)(p_Var2 + 8) = *(int *)(p_Var2 + 8) + 1; UNLOCK(); goto LAB_0015601d; } } else { *(int *)(p_Var2 + 8) = *(int *)(p_Var2 + 8) + 1; *param_1 = '\x01'; *(char **)(param_1 + 8) = param_1 + 0x18; param_1[0x10] = '\0'; param_1[0x11] = '\0'; param_1[0x12] = '\0'; param_1[0x13] = '\0'; param_1[0x14] = '\0'; param_1[0x15] = '\0'; param_1[0x16] = '\0'; param_1[0x17] = '\0'; param_1[0x18] = '\0'; *(int8 *)(param_1 + 0x28) = uVar3; *(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(param_1 + 0x30) = p_Var2; } *(int *)(p_Var2 + 8) = *(int *)(p_Var2 + 8) + 1; LAB_0015601d: *(node **)(param_1 + 0x38) = pnVar5; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Var2); return param_1; }
16,606
mi_kpointer
eloqsql/storage/myisam/mi_search.c
void _mi_kpointer(register MI_INFO *info, register uchar *buff, my_off_t pos) { pos/=MI_MIN_KEY_BLOCK_LENGTH; switch (info->s->base.key_reflength) { #if SIZEOF_OFF_T > 4 case 7: mi_int7store(buff,pos); break; case 6: mi_int6store(buff,pos); break; case 5: mi_int5store(buff,pos); break; #else 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 1: buff[0]= (uchar) pos; break; default: abort(); /* impossible */ } }
O0
c
mi_kpointer: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x18(%rbp), %rax shrq $0xa, %rax movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movl 0x17c(%rax), %eax decl %eax movl %eax, %ecx movq %rcx, -0x68(%rbp) subl $0x6, %eax ja 0xc1b66 movq -0x68(%rbp), %rax leaq 0xa11df(%rip), %rcx # 0x162b28 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 -0x20(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x6(%rax) movq -0x20(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x5(%rax) movq -0x20(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x4(%rax) movq -0x20(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x3(%rax) movq -0x28(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x28(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x28(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0xc1b6b movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x18(%rbp), %rax shrq $0x20, %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x5(%rax) movq -0x30(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x4(%rax) movq -0x30(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x3(%rax) movq -0x30(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x38(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x38(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0xc1b6b 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, 0x4(%rax) movq -0x40(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x3(%rax) movq -0x40(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x40(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x48(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0xc1b6b movq -0x18(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x3(%rax) movq -0x50(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x50(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x50(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0xc1b6b movq -0x18(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x58(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x58(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0xc1b6b movq -0x18(%rbp), %rax movl %eax, -0x5c(%rbp) movl -0x5c(%rbp), %eax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movl -0x5c(%rbp), %eax shrl $0x8, %eax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0xc1b6b movq -0x18(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0xc1b6b callq 0x2a610 addq $0x70, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_mi_kpointer: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_18] shr rax, 0Ah mov [rbp+var_18], rax mov rax, [rbp+var_8] mov rax, [rax] mov eax, [rax+17Ch] dec eax; switch 7 cases mov ecx, eax mov [rbp+var_68], rcx sub eax, 6 ja def_C1950; jumptable 00000000000C1950 default case mov rax, [rbp+var_68] lea rcx, jpt_C1950 movsxd rax, ds:(jpt_C1950 - 162B28h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_C1952: mov rax, [rbp+var_18]; jumptable 00000000000C1950 case 7 mov [rbp+var_20], rax mov rax, [rbp+var_18] shr rax, 20h mov [rbp+var_28], rax mov rax, [rbp+var_20] mov cl, al mov rax, [rbp+var_10] mov [rax+6], cl mov rax, [rbp+var_20] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+5], cl mov rax, [rbp+var_20] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+4], cl mov rax, [rbp+var_20] shr rax, 18h mov cl, al mov rax, [rbp+var_10] mov [rax+3], cl mov rax, [rbp+var_28] mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_28] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_28] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp loc_C1B6B loc_C19D9: mov rax, [rbp+var_18]; jumptable 00000000000C1950 case 6 mov [rbp+var_30], rax mov rax, [rbp+var_18] shr rax, 20h mov [rbp+var_38], rax mov rax, [rbp+var_30] mov cl, al mov rax, [rbp+var_10] mov [rax+5], cl mov rax, [rbp+var_30] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+4], cl mov rax, [rbp+var_30] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+3], cl mov rax, [rbp+var_30] shr rax, 18h mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_38] mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_38] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp loc_C1B6B loc_C1A4F: mov rax, [rbp+var_18]; jumptable 00000000000C1950 case 5 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+4], cl mov rax, [rbp+var_40] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+3], cl mov rax, [rbp+var_40] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_40] shr rax, 18h mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_48] mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp loc_C1B6B loc_C1AB4: mov rax, [rbp+var_18]; jumptable 00000000000C1950 case 4 mov [rbp+var_50], rax mov rax, [rbp+var_50] mov cl, al mov rax, [rbp+var_10] mov [rax+3], cl mov rax, [rbp+var_50] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_50] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_50] shr rax, 18h mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp short loc_C1B6B loc_C1AFD: mov rax, [rbp+var_18]; jumptable 00000000000C1950 case 3 mov [rbp+var_58], rax mov rax, [rbp+var_58] mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_58] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_58] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp short loc_C1B6B loc_C1B35: mov rax, [rbp+var_18]; jumptable 00000000000C1950 case 2 mov [rbp+var_5C], eax mov eax, [rbp+var_5C] mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov eax, [rbp+var_5C] shr eax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp short loc_C1B6B loc_C1B58: mov rax, [rbp+var_18]; jumptable 00000000000C1950 case 1 mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp short loc_C1B6B def_C1950: call _abort; jumptable 00000000000C1950 default case loc_C1B6B: add rsp, 70h pop rbp retn
_BYTE * mi_kpointer(long long a1, _BYTE *a2, unsigned long long a3) { _BYTE *result; // rax unsigned long long v4; // [rsp+58h] [rbp-18h] v4 = a3 >> 10; switch ( *(_DWORD *)(*(_QWORD *)a1 + 380LL) ) { case 1: result = a2; *a2 = v4; break; case 2: a2[1] = v4; result = a2; *a2 = BYTE1(v4); break; case 3: a2[2] = v4; a2[1] = BYTE1(v4); result = a2; *a2 = BYTE2(v4); break; case 4: a2[3] = v4; a2[2] = BYTE1(v4); a2[1] = BYTE2(v4); result = a2; *a2 = BYTE3(v4); break; case 5: a2[4] = v4; a2[3] = BYTE1(v4); a2[2] = BYTE2(v4); a2[1] = BYTE3(v4); result = a2; *a2 = BYTE4(v4); break; case 6: a2[5] = v4; a2[4] = BYTE1(v4); a2[3] = BYTE2(v4); a2[2] = BYTE3(v4); a2[1] = BYTE4(v4); result = a2; *a2 = BYTE5(v4); break; case 7: a2[6] = v4; a2[5] = BYTE1(v4); a2[4] = BYTE2(v4); a2[3] = BYTE3(v4); a2[2] = BYTE4(v4); a2[1] = BYTE5(v4); result = a2; *a2 = BYTE6(v4); break; default: abort(a1, a2, a3); } return result; }
_mi_kpointer: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0xa MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x17c] DEC EAX MOV ECX,EAX MOV qword ptr [RBP + -0x68],RCX SUB EAX,0x6 JA 0x001c1b66 MOV RAX,qword ptr [RBP + -0x68] LEA RCX,[0x262b28] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_7: 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 + -0x20] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x6],CL MOV RAX,qword ptr [RBP + -0x20] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x5],CL MOV RAX,qword ptr [RBP + -0x20] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x4],CL MOV RAX,qword ptr [RBP + -0x20] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x28] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x28] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x28] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x001c1b6b caseD_6: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x20 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x5],CL MOV RAX,qword ptr [RBP + -0x30] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x4],CL MOV RAX,qword ptr [RBP + -0x30] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x30] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x38] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x38] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x001c1b6b caseD_5: 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 + 0x4],CL MOV RAX,qword ptr [RBP + -0x40] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x40] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x40] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x48] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x001c1b6b caseD_4: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x50] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x50] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x50] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x50] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x001c1b6b caseD_3: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x58] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x58] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x58] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x001c1b6b caseD_2: MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x5c],EAX MOV EAX,dword ptr [RBP + -0x5c] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV EAX,dword ptr [RBP + -0x5c] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x001c1b6b caseD_1: MOV RAX,qword ptr [RBP + -0x18] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x001c1b6b default: CALL 0x0012a610 LAB_001c1b6b: ADD RSP,0x70 POP RBP RET
void _mi_kpointer(long *param_1,byte *param_2,ulong param_3) { byte bVar1; byte bVar2; byte bVar3; byte bVar4; byte bVar5; byte bVar6; ulong uVar7; uVar7 = param_3 >> 10; bVar1 = (byte)uVar7; bVar2 = (byte)(uVar7 >> 8); bVar3 = (byte)(uVar7 >> 0x10); bVar4 = (byte)(uVar7 >> 0x18); bVar5 = (byte)(uVar7 >> 0x20); bVar6 = (byte)(uVar7 >> 0x28); switch(*(int4 *)(*param_1 + 0x17c)) { case 1: *param_2 = bVar1; break; case 2: param_2[1] = bVar1; *param_2 = bVar2; break; case 3: param_2[2] = bVar1; param_2[1] = bVar2; *param_2 = bVar3; break; case 4: param_2[3] = bVar1; param_2[2] = bVar2; param_2[1] = bVar3; *param_2 = bVar4; break; case 5: param_2[4] = bVar1; param_2[3] = bVar2; param_2[2] = bVar3; param_2[1] = bVar4; *param_2 = bVar5; break; case 6: param_2[5] = bVar1; param_2[4] = bVar2; param_2[3] = bVar3; param_2[2] = bVar4; param_2[1] = bVar5; *param_2 = bVar6; break; case 7: param_2[6] = bVar1; param_2[5] = bVar2; param_2[4] = bVar3; param_2[3] = bVar4; param_2[2] = bVar5; param_2[1] = bVar6; *param_2 = (byte)(param_3 >> 0x3a); break; default: /* WARNING: Subroutine does not return */ abort(); } return; }
16,607
translog_next_LSN
eloqsql/storage/maria/ma_loghandler.c
LSN translog_next_LSN(TRANSLOG_ADDRESS addr, TRANSLOG_ADDRESS horizon) { TRANSLOG_SCANNER_DATA scanner; LSN result; DBUG_ENTER("translog_next_LSN"); if (horizon == LSN_IMPOSSIBLE) horizon= translog_get_horizon(); if (addr == horizon) DBUG_RETURN(LSN_IMPOSSIBLE); translog_scanner_init(addr, 0, &scanner, 1); /* addr can point not to a chunk beginning but page end so next page beginning. */ if (addr % TRANSLOG_PAGE_SIZE == 0) { /* We are emulating the page end which cased such horizon value to trigger translog_scanner_eop(). We can't just increase addr on page header overhead because it can be file end so we allow translog_get_next_chunk() to skip to the next page in correct way */ scanner.page_addr-= TRANSLOG_PAGE_SIZE; scanner.page_offset= TRANSLOG_PAGE_SIZE; #ifndef DBUG_OFF scanner.page= NULL; /* prevent using incorrect page content */ #endif } /* addr can point not to a chunk beginning but to a page end */ if (translog_scanner_eop(&scanner)) { if (translog_get_next_chunk(&scanner)) { result= LSN_ERROR; goto out; } if (scanner.page == END_OF_LOG) { result= LSN_IMPOSSIBLE; goto out; } } while (!translog_is_LSN_chunk(scanner.page[scanner.page_offset]) && scanner.page[scanner.page_offset] != TRANSLOG_FILLER) { if (translog_get_next_chunk(&scanner)) { result= LSN_ERROR; goto out; } if (scanner.page == END_OF_LOG) { result= LSN_IMPOSSIBLE; goto out; } } if (scanner.page[scanner.page_offset] == TRANSLOG_FILLER) result= LSN_IMPOSSIBLE; /* reached page filler */ else result= scanner.page_addr + scanner.page_offset; out: translog_destroy_scanner(&scanner); DBUG_RETURN(result); }
O0
c
translog_next_LSN: pushq %rbp movq %rsp, %rbp subq $0x2070, %rsp # imm = 0x2070 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x2048(%rbp) movq %rsi, -0x2050(%rbp) cmpq $0x0, -0x2050(%rbp) jne 0x4cc2c callq 0x4a710 movq %rax, -0x2050(%rbp) movq -0x2048(%rbp), %rax cmpq -0x2050(%rbp), %rax jne 0x4cc4e jmp 0x4cc3e movq $0x0, -0x2040(%rbp) jmp 0x4cdae movq -0x2048(%rbp), %rdi xorl %esi, %esi leaq -0x2038(%rbp), %rdx movl $0x1, %ecx callq 0x48860 movq -0x2048(%rbp), %rax movl $0x2000, %ecx # imm = 0x2000 cqto idivq %rcx cmpq $0x0, %rdx jne 0x4cc94 movq -0x38(%rbp), %rax subq $0x2000, %rax # imm = 0x2000 movq %rax, -0x38(%rbp) movl $0x2000, -0x10(%rbp) # imm = 0x2000 leaq -0x2038(%rbp), %rdi callq 0x4cdf0 cmpb $0x0, %al je 0x4cce3 leaq -0x2038(%rbp), %rdi callq 0x489b0 cmpb $0x0, %al je 0x4ccc4 movq $0x1, -0x2058(%rbp) jmp 0x4cd94 leaq 0xc62995(%rip), %rax # 0xcaf660 cmpq %rax, -0x20(%rbp) jne 0x4cce1 movq $0x0, -0x2058(%rbp) jmp 0x4cd94 jmp 0x4cce3 jmp 0x4cce5 movq -0x20(%rbp), %rax movl -0x10(%rbp), %ecx movzbl (%rax,%rcx), %edi callq 0x48950 movb %al, %cl xorl %eax, %eax cmpb $0x0, %cl movb %al, -0x2059(%rbp) jne 0x4cd1d movq -0x20(%rbp), %rax movl -0x10(%rbp), %ecx movzbl (%rax,%rcx), %eax cmpl $0xff, %eax setne %al movb %al, -0x2059(%rbp) movb -0x2059(%rbp), %al testb $0x1, %al jne 0x4cd29 jmp 0x4cd62 leaq -0x2038(%rbp), %rdi callq 0x489b0 cmpb $0x0, %al je 0x4cd46 movq $0x1, -0x2058(%rbp) jmp 0x4cd94 leaq 0xc62913(%rip), %rax # 0xcaf660 cmpq %rax, -0x20(%rbp) jne 0x4cd60 movq $0x0, -0x2058(%rbp) jmp 0x4cd94 jmp 0x4cce5 movq -0x20(%rbp), %rax movl -0x10(%rbp), %ecx movzbl (%rax,%rcx), %eax cmpl $0xff, %eax jne 0x4cd81 movq $0x0, -0x2058(%rbp) jmp 0x4cd92 movq -0x38(%rbp), %rax movl -0x10(%rbp), %ecx addq %rcx, %rax movq %rax, -0x2058(%rbp) jmp 0x4cd94 leaq -0x2038(%rbp), %rdi callq 0x48b90 movq -0x2058(%rbp), %rax movq %rax, -0x2040(%rbp) movq -0x2040(%rbp), %rax movq %rax, -0x2068(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x4cdde movq -0x2068(%rbp), %rax addq $0x2070, %rsp # imm = 0x2070 popq %rbp retq callq 0x2a290 nopw %cs:(%rax,%rax)
translog_next_LSN: push rbp mov rbp, rsp sub rsp, 2070h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_2048], rdi mov [rbp+var_2050], rsi cmp [rbp+var_2050], 0 jnz short loc_4CC2C call translog_get_horizon mov [rbp+var_2050], rax loc_4CC2C: mov rax, [rbp+var_2048] cmp rax, [rbp+var_2050] jnz short loc_4CC4E jmp short $+2 loc_4CC3E: mov [rbp+var_2040], 0 jmp loc_4CDAE loc_4CC4E: mov rdi, [rbp+var_2048] xor esi, esi lea rdx, [rbp+var_2038] mov ecx, 1 call translog_scanner_init mov rax, [rbp+var_2048] mov ecx, 2000h cqo idiv rcx cmp rdx, 0 jnz short loc_4CC94 mov rax, [rbp+var_38] sub rax, 2000h mov [rbp+var_38], rax mov [rbp+var_10], 2000h loc_4CC94: lea rdi, [rbp+var_2038] call translog_scanner_eop cmp al, 0 jz short loc_4CCE3 lea rdi, [rbp+var_2038] call translog_get_next_chunk cmp al, 0 jz short loc_4CCC4 mov [rbp+var_2058], 1 jmp loc_4CD94 loc_4CCC4: lea rax, end_of_log cmp [rbp+var_20], rax jnz short loc_4CCE1 mov [rbp+var_2058], 0 jmp loc_4CD94 loc_4CCE1: jmp short $+2 loc_4CCE3: jmp short $+2 loc_4CCE5: mov rax, [rbp+var_20] mov ecx, [rbp+var_10] movzx edi, byte ptr [rax+rcx] call translog_is_LSN_chunk mov cl, al xor eax, eax cmp cl, 0 mov [rbp+var_2059], al jnz short loc_4CD1D mov rax, [rbp+var_20] mov ecx, [rbp+var_10] movzx eax, byte ptr [rax+rcx] cmp eax, 0FFh setnz al mov [rbp+var_2059], al loc_4CD1D: mov al, [rbp+var_2059] test al, 1 jnz short loc_4CD29 jmp short loc_4CD62 loc_4CD29: lea rdi, [rbp+var_2038] call translog_get_next_chunk cmp al, 0 jz short loc_4CD46 mov [rbp+var_2058], 1 jmp short loc_4CD94 loc_4CD46: lea rax, end_of_log cmp [rbp+var_20], rax jnz short loc_4CD60 mov [rbp+var_2058], 0 jmp short loc_4CD94 loc_4CD60: jmp short loc_4CCE5 loc_4CD62: mov rax, [rbp+var_20] mov ecx, [rbp+var_10] movzx eax, byte ptr [rax+rcx] cmp eax, 0FFh jnz short loc_4CD81 mov [rbp+var_2058], 0 jmp short loc_4CD92 loc_4CD81: mov rax, [rbp+var_38] mov ecx, [rbp+var_10] add rax, rcx mov [rbp+var_2058], rax loc_4CD92: jmp short $+2 loc_4CD94: lea rdi, [rbp+var_2038] call translog_destroy_scanner mov rax, [rbp+var_2058] mov [rbp+var_2040], rax loc_4CDAE: mov rax, [rbp+var_2040] mov [rbp+var_2068], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_4CDDE mov rax, [rbp+var_2068] add rsp, 2070h pop rbp retn loc_4CDDE: call ___stack_chk_fail
long long translog_next_LSN(long long a1, long long a2) { bool v3; // [rsp+17h] [rbp-2059h] long long v4; // [rsp+18h] [rbp-2058h] long long horizon; // [rsp+20h] [rbp-2050h] _BYTE v7[8192]; // [rsp+38h] [rbp-2038h] BYREF long long v8; // [rsp+2038h] [rbp-38h] _BYTE *v9; // [rsp+2050h] [rbp-20h] unsigned int v10; // [rsp+2060h] [rbp-10h] unsigned long long v11; // [rsp+2068h] [rbp-8h] v11 = __readfsqword(0x28u); horizon = a2; if ( !a2 ) horizon = translog_get_horizon(); if ( a1 == horizon ) return 0LL; translog_scanner_init(a1, 0, (long long)v7, 1); if ( !(a1 % 0x2000) ) { v8 -= 0x2000LL; v10 = 0x2000; } if ( (unsigned __int8)translog_scanner_eop(v7) ) { if ( translog_get_next_chunk((long long)v7) ) { v4 = 1LL; } else { if ( v9 != (_BYTE *)&end_of_log ) goto LABEL_12; v4 = 0LL; } } else { while ( 1 ) { LABEL_12: v3 = 0; if ( !(unsigned __int8)translog_is_LSN_chunk(v9[v10]) ) v3 = (unsigned __int8)v9[v10] != 255; if ( !v3 ) break; if ( translog_get_next_chunk((long long)v7) ) { v4 = 1LL; goto LABEL_23; } if ( v9 == (_BYTE *)&end_of_log ) { v4 = 0LL; goto LABEL_23; } } if ( (unsigned __int8)v9[v10] == 255 ) v4 = 0LL; else v4 = v10 + v8; } LABEL_23: translog_destroy_scanner((long long)v7); return v4; }
translog_next_LSN: PUSH RBP MOV RBP,RSP SUB RSP,0x2070 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x2048],RDI MOV qword ptr [RBP + -0x2050],RSI CMP qword ptr [RBP + -0x2050],0x0 JNZ 0x0014cc2c CALL 0x0014a710 MOV qword ptr [RBP + -0x2050],RAX LAB_0014cc2c: MOV RAX,qword ptr [RBP + -0x2048] CMP RAX,qword ptr [RBP + -0x2050] JNZ 0x0014cc4e JMP 0x0014cc3e LAB_0014cc3e: MOV qword ptr [RBP + -0x2040],0x0 JMP 0x0014cdae LAB_0014cc4e: MOV RDI,qword ptr [RBP + -0x2048] XOR ESI,ESI LEA RDX,[RBP + -0x2038] MOV ECX,0x1 CALL 0x00148860 MOV RAX,qword ptr [RBP + -0x2048] MOV ECX,0x2000 CQO IDIV RCX CMP RDX,0x0 JNZ 0x0014cc94 MOV RAX,qword ptr [RBP + -0x38] SUB RAX,0x2000 MOV qword ptr [RBP + -0x38],RAX MOV dword ptr [RBP + -0x10],0x2000 LAB_0014cc94: LEA RDI,[RBP + -0x2038] CALL 0x0014cdf0 CMP AL,0x0 JZ 0x0014cce3 LEA RDI,[RBP + -0x2038] CALL 0x001489b0 CMP AL,0x0 JZ 0x0014ccc4 MOV qword ptr [RBP + -0x2058],0x1 JMP 0x0014cd94 LAB_0014ccc4: LEA RAX,[0xdaf660] CMP qword ptr [RBP + -0x20],RAX JNZ 0x0014cce1 MOV qword ptr [RBP + -0x2058],0x0 JMP 0x0014cd94 LAB_0014cce1: JMP 0x0014cce3 LAB_0014cce3: JMP 0x0014cce5 LAB_0014cce5: MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x10] MOVZX EDI,byte ptr [RAX + RCX*0x1] CALL 0x00148950 MOV CL,AL XOR EAX,EAX CMP CL,0x0 MOV byte ptr [RBP + -0x2059],AL JNZ 0x0014cd1d MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0xff SETNZ AL MOV byte ptr [RBP + -0x2059],AL LAB_0014cd1d: MOV AL,byte ptr [RBP + -0x2059] TEST AL,0x1 JNZ 0x0014cd29 JMP 0x0014cd62 LAB_0014cd29: LEA RDI,[RBP + -0x2038] CALL 0x001489b0 CMP AL,0x0 JZ 0x0014cd46 MOV qword ptr [RBP + -0x2058],0x1 JMP 0x0014cd94 LAB_0014cd46: LEA RAX,[0xdaf660] CMP qword ptr [RBP + -0x20],RAX JNZ 0x0014cd60 MOV qword ptr [RBP + -0x2058],0x0 JMP 0x0014cd94 LAB_0014cd60: JMP 0x0014cce5 LAB_0014cd62: MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0xff JNZ 0x0014cd81 MOV qword ptr [RBP + -0x2058],0x0 JMP 0x0014cd92 LAB_0014cd81: MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + -0x10] ADD RAX,RCX MOV qword ptr [RBP + -0x2058],RAX LAB_0014cd92: JMP 0x0014cd94 LAB_0014cd94: LEA RDI,[RBP + -0x2038] CALL 0x00148b90 MOV RAX,qword ptr [RBP + -0x2058] MOV qword ptr [RBP + -0x2040],RAX LAB_0014cdae: MOV RAX,qword ptr [RBP + -0x2040] MOV qword ptr [RBP + -0x2068],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0014cdde MOV RAX,qword ptr [RBP + -0x2068] ADD RSP,0x2070 POP RBP RET LAB_0014cdde: CALL 0x0012a290
long translog_next_LSN(long param_1,long param_2) { char cVar1; long in_FS_OFFSET; bool bVar2; long local_2060; long local_2058; long local_2048; int1 local_2040 [8192]; long local_40; int1 *local_28; uint local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_2058 = param_2; if (param_2 == 0) { local_2058 = translog_get_horizon(); } if (param_1 == local_2058) { local_2048 = 0; goto LAB_0014cdae; } translog_scanner_init(param_1,0,local_2040,1); if (param_1 % 0x2000 == 0) { local_40 = local_40 + -0x2000; local_18 = 0x2000; } cVar1 = translog_scanner_eop(local_2040); if (cVar1 == '\0') { LAB_0014cce5: do { cVar1 = translog_is_LSN_chunk(local_28[local_18]); bVar2 = false; if (cVar1 == '\0') { bVar2 = local_28[local_18] != -1; } if (!bVar2) { if (local_28[local_18] == -1) { local_2060 = 0; } else { local_2060 = local_40 + (ulong)local_18; } goto LAB_0014cd94; } cVar1 = translog_get_next_chunk(local_2040); if (cVar1 != '\0') { local_2060 = 1; goto LAB_0014cd94; } } while (local_28 != &end_of_log); local_2060 = 0; } else { cVar1 = translog_get_next_chunk(local_2040); if (cVar1 == '\0') { if (local_28 != &end_of_log) goto LAB_0014cce5; local_2060 = 0; } else { local_2060 = 1; } } LAB_0014cd94: translog_destroy_scanner(local_2040); local_2048 = local_2060; LAB_0014cdae: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_2048; }
16,608
void OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<float, double>::apply<2>(OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<float, double>::Parameters const&)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/../bfr/pointOperations.h
static void apply(Parameters const & args) { typedef struct PointCopier<REAL_DST,REAL_SRC,SIZE> Point; for (int i = 0; i < args.srcCount; ++i) { REAL_DST * pDst = args.resultData + args.resultStride * i; REAL_SRC const * pSrc = args.pointData + args.pointStride * args.srcIndices[i]; Point::Copy(pDst, pSrc, args.pointSize); } }
O0
c
void OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<float, double>::apply<2>(OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<float, double>::Parameters const&): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movl $0x0, -0xc(%rbp) movl -0xc(%rbp), %eax movq -0x8(%rbp), %rcx cmpl 0x18(%rcx), %eax jge 0x1b569b movq -0x8(%rbp), %rax movq 0x20(%rax), %rax movq -0x8(%rbp), %rcx movl 0x28(%rcx), %ecx imull -0xc(%rbp), %ecx movslq %ecx, %rcx shlq $0x3, %rcx addq %rcx, %rax movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq -0x8(%rbp), %rcx movl 0xc(%rcx), %ecx movq -0x8(%rbp), %rdx movq 0x10(%rdx), %rdx movslq -0xc(%rbp), %rsi imull (%rdx,%rsi,4), %ecx movslq %ecx, %rcx shlq $0x2, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x8(%rbp), %rax movl 0x8(%rax), %edx callq 0xc88b0 movl -0xc(%rbp), %eax addl $0x1, %eax movl %eax, -0xc(%rbp) jmp 0x1b5623 addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax,%rax)
_ZN10OpenSubdiv6v3_6_03Bfr6points15CopyConsecutiveIdfE5applyILi1EEEvRKNS4_10ParametersE: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_C], 0 loc_1B5623: mov eax, [rbp+var_C] mov rcx, [rbp+var_8] cmp eax, [rcx+18h] jge short loc_1B569B mov rax, [rbp+var_8] mov rax, [rax+20h] mov rcx, [rbp+var_8] mov ecx, [rcx+28h] imul ecx, [rbp+var_C] movsxd rcx, ecx shl rcx, 3 add rax, rcx mov [rbp+var_18], rax mov rax, [rbp+var_8] mov rax, [rax] mov rcx, [rbp+var_8] mov ecx, [rcx+0Ch] mov rdx, [rbp+var_8] mov rdx, [rdx+10h] movsxd rsi, [rbp+var_C] imul ecx, [rdx+rsi*4] movsxd rcx, ecx shl rcx, 2 add rax, rcx mov [rbp+var_20], rax mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] mov rax, [rbp+var_8] mov edx, [rax+8] call __ZN10OpenSubdiv6v3_6_03Bfr6points11PointCopierIdfLi1EE4CopyEPdPKfi; OpenSubdiv::v3_6_0::Bfr::points::PointCopier<double,float,1>::Copy(double *,float const*,int) mov eax, [rbp+var_C] add eax, 1 mov [rbp+var_C], eax jmp short loc_1B5623 loc_1B569B: add rsp, 20h pop rbp retn
long long OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<double,float>::apply<1>(long long a1) { long long result; // rax unsigned int i; // [rsp+14h] [rbp-Ch] for ( i = 0; ; ++i ) { result = i; if ( (signed int)i >= *(_DWORD *)(a1 + 24) ) break; OpenSubdiv::v3_6_0::Bfr::points::PointCopier<double,float,1>::Copy( 8LL * (int)(i * *(_DWORD *)(a1 + 40)) + *(_QWORD *)(a1 + 32), 4LL * *(_DWORD *)(*(_QWORD *)(a1 + 16) + 4LL * (int)i) * *(_DWORD *)(a1 + 12) + *(_QWORD *)a1, *(unsigned int *)(a1 + 8)); } return result; }
16,609
void OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<float, double>::apply<2>(OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<float, double>::Parameters const&)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/../bfr/pointOperations.h
static void apply(Parameters const & args) { typedef struct PointCopier<REAL_DST,REAL_SRC,SIZE> Point; for (int i = 0; i < args.srcCount; ++i) { REAL_DST * pDst = args.resultData + args.resultStride * i; REAL_SRC const * pSrc = args.pointData + args.pointStride * args.srcIndices[i]; Point::Copy(pDst, pSrc, args.pointSize); } }
O1
c
void OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<float, double>::apply<2>(OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<float, double>::Parameters const&): movslq 0x18(%rdi), %rax testq %rax, %rax jle 0x9c6be pushq %rbx movq 0x20(%rdi), %rcx movslq 0x28(%rdi), %rdx movq (%rdi), %rsi movl 0xc(%rdi), %r8d movq 0x10(%rdi), %r9 movl 0x8(%rdi), %edi shlq $0x3, %rdx xorl %r10d, %r10d testl %edi, %edi jle 0x9c6b2 movl (%r9,%r10,4), %r11d imull %r8d, %r11d movslq %r11d, %r11 leaq (%rsi,%r11,4), %r11 xorl %ebx, %ebx xorps %xmm0, %xmm0 cvtss2sd (%r11,%rbx,4), %xmm0 movsd %xmm0, (%rcx,%rbx,8) incq %rbx cmpq %rbx, %rdi jne 0x9c69c incq %r10 addq %rdx, %rcx cmpq %rax, %r10 jne 0x9c687 popq %rbx retq nop
_ZN10OpenSubdiv6v3_6_03Bfr6points15CopyConsecutiveIdfE5applyILi4EEEvRKNS4_10ParametersE: movsxd rax, dword ptr [rdi+18h] test rax, rax jle short locret_9C6BE push rbx mov rcx, [rdi+20h] movsxd rdx, dword ptr [rdi+28h] mov rsi, [rdi] mov r8d, [rdi+0Ch] mov r9, [rdi+10h] mov edi, [rdi+8] shl rdx, 3 xor r10d, r10d loc_9C687: test edi, edi jle short loc_9C6B2 mov r11d, [r9+r10*4] imul r11d, r8d movsxd r11, r11d lea r11, [rsi+r11*4] xor ebx, ebx loc_9C69C: xorps xmm0, xmm0 cvtss2sd xmm0, dword ptr [r11+rbx*4] movsd qword ptr [rcx+rbx*8], xmm0 inc rbx cmp rdi, rbx jnz short loc_9C69C loc_9C6B2: inc r10 add rcx, rdx cmp r10, rax jnz short loc_9C687 pop rbx locret_9C6BE: retn
long long OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<double,float>::apply<4>(long long *a1) { long long result; // rax long long v2; // rcx long long v3; // rdx long long v4; // rsi int v5; // r8d long long v6; // r9 long long v7; // rdi long long v8; // rdx long long i; // r10 long long v10; // r11 long long j; // rbx result = *((int *)a1 + 6); if ( result > 0 ) { v2 = a1[4]; v3 = *((int *)a1 + 10); v4 = *a1; v5 = *((_DWORD *)a1 + 3); v6 = a1[2]; v7 = *((unsigned int *)a1 + 2); v8 = 8 * v3; for ( i = 0LL; i != result; ++i ) { if ( (int)v7 > 0 ) { v10 = v4 + 4LL * v5 * *(_DWORD *)(v6 + 4 * i); for ( j = 0LL; j != v7; ++j ) *(double *)(v2 + 8 * j) = *(float *)(v10 + 4 * j); } v2 += v8; } } return result; }
apply<4>: MOVSXD RAX,dword ptr [RDI + 0x18] TEST RAX,RAX JLE 0x0019c6be PUSH RBX MOV RCX,qword ptr [RDI + 0x20] MOVSXD RDX,dword ptr [RDI + 0x28] MOV RSI,qword ptr [RDI] MOV R8D,dword ptr [RDI + 0xc] MOV R9,qword ptr [RDI + 0x10] MOV EDI,dword ptr [RDI + 0x8] SHL RDX,0x3 XOR R10D,R10D LAB_0019c687: TEST EDI,EDI JLE 0x0019c6b2 MOV R11D,dword ptr [R9 + R10*0x4] IMUL R11D,R8D MOVSXD R11,R11D LEA R11,[RSI + R11*0x4] XOR EBX,EBX LAB_0019c69c: XORPS XMM0,XMM0 CVTSS2SD XMM0,dword ptr [R11 + RBX*0x4] MOVSD qword ptr [RCX + RBX*0x8],XMM0 INC RBX CMP RDI,RBX JNZ 0x0019c69c LAB_0019c6b2: INC R10 ADD RCX,RDX CMP R10,RAX JNZ 0x0019c687 POP RBX LAB_0019c6be: RET
/* void OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<double, float>::apply<4>(OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<double, float>::Parameters const&) */ void OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<double,float>::apply<4>(Parameters *param_1) { int iVar1; int iVar2; int iVar3; uint uVar4; int iVar5; long lVar6; long lVar7; long lVar8; ulong uVar9; long lVar10; iVar1 = *(int *)(param_1 + 0x18); if (0 < (long)iVar1) { lVar8 = *(long *)(param_1 + 0x20); iVar2 = *(int *)(param_1 + 0x28); lVar6 = *(long *)param_1; iVar3 = *(int *)(param_1 + 0xc); lVar7 = *(long *)(param_1 + 0x10); uVar4 = *(uint *)(param_1 + 8); lVar10 = 0; do { if (0 < (int)uVar4) { iVar5 = *(int *)(lVar7 + lVar10 * 4); uVar9 = 0; do { *(double *)(lVar8 + uVar9 * 8) = (double)*(float *)(lVar6 + (long)(iVar5 * iVar3) * 4 + uVar9 * 4); uVar9 = uVar9 + 1; } while (uVar4 != uVar9); } lVar10 = lVar10 + 1; lVar8 = lVar8 + (long)iVar2 * 8; } while (lVar10 != iVar1); } return; }
16,610
void OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<float, double>::apply<2>(OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<float, double>::Parameters const&)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/../bfr/pointOperations.h
static void apply(Parameters const & args) { typedef struct PointCopier<REAL_DST,REAL_SRC,SIZE> Point; for (int i = 0; i < args.srcCount; ++i) { REAL_DST * pDst = args.resultData + args.resultStride * i; REAL_SRC const * pSrc = args.pointData + args.pointStride * args.srcIndices[i]; Point::Copy(pDst, pSrc, args.pointSize); } }
O2
c
void OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<float, double>::apply<2>(OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<float, double>::Parameters const&): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx xorl %r14d, %r14d movslq 0x18(%rbx), %rax cmpq %rax, %r14 jge 0xa8776 movslq 0x28(%rbx), %rax movslq %r14d, %rdi imulq %rax, %rdi shlq $0x3, %rdi addq 0x20(%rbx), %rdi movslq 0xc(%rbx), %rax movq 0x10(%rbx), %rcx movslq (%rcx,%r14,4), %rsi imulq %rax, %rsi shlq $0x2, %rsi addq (%rbx), %rsi movl 0x8(%rbx), %edx callq 0x511b0 incq %r14 jmp 0xa8736 addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN10OpenSubdiv6v3_6_03Bfr6points15CopyConsecutiveIdfE5applyILi0EEEvRKNS4_10ParametersE: push r14 push rbx push rax mov rbx, rdi xor r14d, r14d loc_A8736: movsxd rax, dword ptr [rbx+18h] cmp r14, rax jge short loc_A8776 movsxd rax, dword ptr [rbx+28h] movsxd rdi, r14d imul rdi, rax shl rdi, 3 add rdi, [rbx+20h] movsxd rax, dword ptr [rbx+0Ch] mov rcx, [rbx+10h] movsxd rsi, dword ptr [rcx+r14*4] imul rsi, rax shl rsi, 2 add rsi, [rbx] mov edx, [rbx+8] call __ZN10OpenSubdiv6v3_6_03Bfr6points11PointCopierIdfLi0EE4CopyEPdPKfi; OpenSubdiv::v3_6_0::Bfr::points::PointCopier<double,float,0>::Copy(double *,float const*,int) inc r14 jmp short loc_A8736 loc_A8776: add rsp, 8 pop rbx pop r14 retn
long long OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<double,float>::apply<0>(long long a1) { long long i; // r14 long long result; // rax for ( i = 0LL; ; ++i ) { result = *(int *)(a1 + 24); if ( i >= result ) break; OpenSubdiv::v3_6_0::Bfr::points::PointCopier<double,float,0>::Copy( *(_QWORD *)(a1 + 32) + 8 * *(int *)(a1 + 40) * (long long)(int)i, *(_QWORD *)a1 + 4 * *(int *)(a1 + 12) * (long long)*(int *)(*(_QWORD *)(a1 + 16) + 4 * i), *(unsigned int *)(a1 + 8)); } return result; }
apply<0>: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI XOR R14D,R14D LAB_001a8736: MOVSXD RAX,dword ptr [RBX + 0x18] CMP R14,RAX JGE 0x001a8776 MOVSXD RAX,dword ptr [RBX + 0x28] MOVSXD RDI,R14D IMUL RDI,RAX SHL RDI,0x3 ADD RDI,qword ptr [RBX + 0x20] MOVSXD RAX,dword ptr [RBX + 0xc] MOV RCX,qword ptr [RBX + 0x10] MOVSXD RSI,dword ptr [RCX + R14*0x4] IMUL RSI,RAX SHL RSI,0x2 ADD RSI,qword ptr [RBX] MOV EDX,dword ptr [RBX + 0x8] CALL 0x001511b0 INC R14 JMP 0x001a8736 LAB_001a8776: ADD RSP,0x8 POP RBX POP R14 RET
/* void OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<double, float>::apply<0>(OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<double, float>::Parameters const&) */ void OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<double,float>::apply<0>(Parameters *param_1) { long lVar1; for (lVar1 = 0; lVar1 < *(int *)(param_1 + 0x18); lVar1 = lVar1 + 1) { PointCopier<double,float,0>::Copy ((double *) ((long)(int)lVar1 * (long)*(int *)(param_1 + 0x28) * 8 + *(long *)(param_1 + 0x20)), (float *)((long)*(int *)(*(long *)(param_1 + 0x10) + lVar1 * 4) * (long)*(int *)(param_1 + 0xc) * 4 + *(long *)param_1),*(int *)(param_1 + 8) ); } return; }
16,611
void OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<float, double>::apply<2>(OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<float, double>::Parameters const&)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/../bfr/pointOperations.h
static void apply(Parameters const & args) { typedef struct PointCopier<REAL_DST,REAL_SRC,SIZE> Point; for (int i = 0; i < args.srcCount; ++i) { REAL_DST * pDst = args.resultData + args.resultStride * i; REAL_SRC const * pSrc = args.pointData + args.pointStride * args.srcIndices[i]; Point::Copy(pDst, pSrc, args.pointSize); } }
O3
c
void OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<float, double>::apply<2>(OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<float, double>::Parameters const&): movslq 0x18(%rdi), %rax testq %rax, %rax jle 0x9f1f8 pushq %rbx movq 0x20(%rdi), %rcx movslq 0x28(%rdi), %rdx movq (%rdi), %rsi movl 0xc(%rdi), %r8d movq 0x10(%rdi), %r9 movl 0x8(%rdi), %edi shlq $0x3, %rdx xorl %r10d, %r10d testl %edi, %edi jle 0x9f1ec movl (%r9,%r10,4), %r11d imull %r8d, %r11d movslq %r11d, %r11 leaq (%rsi,%r11,4), %r11 xorl %ebx, %ebx xorps %xmm0, %xmm0 cvtss2sd (%r11,%rbx,4), %xmm0 movsd %xmm0, (%rcx,%rbx,8) incq %rbx cmpq %rbx, %rdi jne 0x9f1d6 incq %r10 addq %rdx, %rcx cmpq %rax, %r10 jne 0x9f1c1 popq %rbx retq nopl (%rax)
_ZN10OpenSubdiv6v3_6_03Bfr6points15CopyConsecutiveIdfE5applyILi0EEEvRKNS4_10ParametersE: movsxd rax, dword ptr [rdi+18h] test rax, rax jle short locret_9F1F8 push rbx mov rcx, [rdi+20h] movsxd rdx, dword ptr [rdi+28h] mov rsi, [rdi] mov r8d, [rdi+0Ch] mov r9, [rdi+10h] mov edi, [rdi+8] shl rdx, 3 xor r10d, r10d loc_9F1C1: test edi, edi jle short loc_9F1EC mov r11d, [r9+r10*4] imul r11d, r8d movsxd r11, r11d lea r11, [rsi+r11*4] xor ebx, ebx loc_9F1D6: xorps xmm0, xmm0 cvtss2sd xmm0, dword ptr [r11+rbx*4] movsd qword ptr [rcx+rbx*8], xmm0 inc rbx cmp rdi, rbx jnz short loc_9F1D6 loc_9F1EC: inc r10 add rcx, rdx cmp r10, rax jnz short loc_9F1C1 pop rbx locret_9F1F8: retn
long long OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<double,float>::apply<0>(long long *a1) { long long result; // rax long long v2; // rcx long long v3; // rdx long long v4; // rsi int v5; // r8d long long v6; // r9 long long v7; // rdi long long v8; // rdx long long i; // r10 long long v10; // r11 long long j; // rbx result = *((int *)a1 + 6); if ( result > 0 ) { v2 = a1[4]; v3 = *((int *)a1 + 10); v4 = *a1; v5 = *((_DWORD *)a1 + 3); v6 = a1[2]; v7 = *((unsigned int *)a1 + 2); v8 = 8 * v3; for ( i = 0LL; i != result; ++i ) { if ( (int)v7 > 0 ) { v10 = v4 + 4LL * v5 * *(_DWORD *)(v6 + 4 * i); for ( j = 0LL; j != v7; ++j ) *(double *)(v2 + 8 * j) = *(float *)(v10 + 4 * j); } v2 += v8; } } return result; }
apply<0>: MOVSXD RAX,dword ptr [RDI + 0x18] TEST RAX,RAX JLE 0x0019f1f8 PUSH RBX MOV RCX,qword ptr [RDI + 0x20] MOVSXD RDX,dword ptr [RDI + 0x28] MOV RSI,qword ptr [RDI] MOV R8D,dword ptr [RDI + 0xc] MOV R9,qword ptr [RDI + 0x10] MOV EDI,dword ptr [RDI + 0x8] SHL RDX,0x3 XOR R10D,R10D LAB_0019f1c1: TEST EDI,EDI JLE 0x0019f1ec MOV R11D,dword ptr [R9 + R10*0x4] IMUL R11D,R8D MOVSXD R11,R11D LEA R11,[RSI + R11*0x4] XOR EBX,EBX LAB_0019f1d6: XORPS XMM0,XMM0 CVTSS2SD XMM0,dword ptr [R11 + RBX*0x4] MOVSD qword ptr [RCX + RBX*0x8],XMM0 INC RBX CMP RDI,RBX JNZ 0x0019f1d6 LAB_0019f1ec: INC R10 ADD RCX,RDX CMP R10,RAX JNZ 0x0019f1c1 POP RBX LAB_0019f1f8: RET
/* void OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<double, float>::apply<0>(OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<double, float>::Parameters const&) */ void OpenSubdiv::v3_6_0::Bfr::points::CopyConsecutive<double,float>::apply<0>(Parameters *param_1) { int iVar1; int iVar2; int iVar3; uint uVar4; int iVar5; long lVar6; long lVar7; long lVar8; ulong uVar9; long lVar10; iVar1 = *(int *)(param_1 + 0x18); if (0 < (long)iVar1) { lVar8 = *(long *)(param_1 + 0x20); iVar2 = *(int *)(param_1 + 0x28); lVar6 = *(long *)param_1; iVar3 = *(int *)(param_1 + 0xc); lVar7 = *(long *)(param_1 + 0x10); uVar4 = *(uint *)(param_1 + 8); lVar10 = 0; do { if (0 < (int)uVar4) { iVar5 = *(int *)(lVar7 + lVar10 * 4); uVar9 = 0; do { *(double *)(lVar8 + uVar9 * 8) = (double)*(float *)(lVar6 + (long)(iVar5 * iVar3) * 4 + uVar9 * 4); uVar9 = uVar9 + 1; } while (uVar4 != uVar9); } lVar10 = lVar10 + 1; lVar8 = lVar8 + (long)iVar2 * 8; } while (lVar10 != iVar1); } return; }
16,612
HalfToFloat
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c
static float HalfToFloat(unsigned short x) { float result = 0.0f; const unsigned int e = (x & 0x7C00) >> 10; // Exponent const unsigned int m = (x & 0x03FF) << 13; // Mantissa const float fm = (float)m; const unsigned int v = (*(unsigned int*)&fm) >> 23; // Evil log2 bit hack to count leading zeros in denormalized format const unsigned int r = (x & 0x8000) << 16 | (e != 0)*((e + 112) << 23 | m) | ((e == 0)&(m != 0))*((v - 37) << 23 | ((m << (150 - v)) & 0x007FE000)); // sign : normalized : denormalized result = *(float *)&r; return result; }
O0
c
HalfToFloat: pushq %rbp movq %rsp, %rbp movw %di, %ax movw %ax, -0x2(%rbp) movl $0x0, -0x8(%rbp) movzwl -0x2(%rbp), %eax shrl $0xa, %eax andl $0x1f, %eax movl %eax, -0xc(%rbp) movzwl -0x2(%rbp), %eax andl $0x3ff, %eax # imm = 0x3FF shll $0xd, %eax movl %eax, -0x10(%rbp) movl -0x10(%rbp), %eax cvtsi2ss %rax, %xmm0 movss %xmm0, -0x14(%rbp) movl -0x14(%rbp), %eax shrl $0x17, %eax movl %eax, -0x18(%rbp) movzwl -0x2(%rbp), %eax andl $0x8000, %eax # imm = 0x8000 shll $0x10, %eax cmpl $0x0, -0xc(%rbp) setne %cl andb $0x1, %cl movzbl %cl, %ecx movl -0xc(%rbp), %edx addl $0x70, %edx shll $0x17, %edx orl -0x10(%rbp), %edx imull %edx, %ecx orl %ecx, %eax cmpl $0x0, -0xc(%rbp) sete %cl andb $0x1, %cl movzbl %cl, %ecx cmpl $0x0, -0x10(%rbp) setne %dl andb $0x1, %dl movzbl %dl, %edx andl %edx, %ecx movl %ecx, -0x20(%rbp) movl -0x18(%rbp), %edx subl $0x25, %edx shll $0x17, %edx movl -0x10(%rbp), %esi movl $0x96, %ecx subl -0x18(%rbp), %ecx shll %cl, %esi movl -0x20(%rbp), %ecx andl $0x7fe000, %esi # imm = 0x7FE000 orl %esi, %edx imull %edx, %ecx orl %ecx, %eax movl %eax, -0x1c(%rbp) movss -0x1c(%rbp), %xmm0 movss %xmm0, -0x8(%rbp) movss -0x8(%rbp), %xmm0 popq %rbp retq nopw (%rax,%rax)
HalfToFloat: push rbp mov rbp, rsp mov ax, di mov [rbp+var_2], ax mov [rbp+var_8], 0 movzx eax, [rbp+var_2] shr eax, 0Ah and eax, 1Fh mov [rbp+var_C], eax movzx eax, [rbp+var_2] and eax, 3FFh shl eax, 0Dh mov [rbp+var_10], eax mov eax, [rbp+var_10] cvtsi2ss xmm0, rax movss [rbp+var_14], xmm0 mov eax, [rbp+var_14] shr eax, 17h mov [rbp+var_18], eax movzx eax, [rbp+var_2] and eax, 8000h shl eax, 10h cmp [rbp+var_C], 0 setnz cl and cl, 1 movzx ecx, cl mov edx, [rbp+var_C] add edx, 70h ; 'p' shl edx, 17h or edx, [rbp+var_10] imul ecx, edx or eax, ecx cmp [rbp+var_C], 0 setz cl and cl, 1 movzx ecx, cl cmp [rbp+var_10], 0 setnz dl and dl, 1 movzx edx, dl and ecx, edx mov [rbp+var_20], ecx mov edx, [rbp+var_18] sub edx, 25h ; '%' shl edx, 17h mov esi, [rbp+var_10] mov ecx, 96h sub ecx, [rbp+var_18] shl esi, cl mov ecx, [rbp+var_20] and esi, 7FE000h or edx, esi imul ecx, edx or eax, ecx mov [rbp+var_1C], eax movss xmm0, [rbp+var_1C] movss [rbp+var_8], xmm0 movss xmm0, [rbp+var_8] pop rbp retn
float HalfToFloat(unsigned __int16 a1) { float result; // xmm0_4 LODWORD(result) = ((((a1 & 0x3FF) << 13 << (-106 - (COERCE_UNSIGNED_INT((float)((unsigned __int16)(a1 & 0x3FF) << 13)) >> 23))) & 0x7FE000 | (((COERCE_UNSIGNED_INT((float)((unsigned __int16)(a1 & 0x3FF) << 13)) >> 23) - 37) << 23)) * ((a1 & 0x3FF) << 13 != 0 && ((a1 >> 10) & 0x1F) == 0)) | ((((a1 & 0x3FF) << 13) | ((((a1 >> 10) & 0x1F) + 112) << 23)) * (((a1 >> 10) & 0x1F) != 0)) | ((a1 & 0x8000) << 16); return result; }
16,613
HalfToFloat
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c
static float HalfToFloat(unsigned short x) { float result = 0.0f; const unsigned int e = (x & 0x7C00) >> 10; // Exponent const unsigned int m = (x & 0x03FF) << 13; // Mantissa const float fm = (float)m; const unsigned int v = (*(unsigned int*)&fm) >> 23; // Evil log2 bit hack to count leading zeros in denormalized format const unsigned int r = (x & 0x8000) << 16 | (e != 0)*((e + 112) << 23 | m) | ((e == 0)&(m != 0))*((v - 37) << 23 | ((m << (150 - v)) & 0x007FE000)); // sign : normalized : denormalized result = *(float *)&r; return result; }
O2
c
HalfToFloat: movl %edi, %eax shrl $0xa, %eax movl %edi, %esi shll $0xd, %esi movl $0x7fe000, %r8d # imm = 0x7FE000 movl %esi, %edx andl %r8d, %edx cvtsi2ss %edx, %xmm0 andl $0x1f, %eax movd %xmm0, %r9d movl %r9d, %r10d shrl $0x17, %r10d shll $0x10, %edi andl $0x80000000, %edi # imm = 0x80000000 movl %eax, %r11d shll $0x17, %r11d andl $0x7f800000, %r9d # imm = 0x7F800000 movb $-0x6a, %cl subb %r10b, %cl shll %cl, %esi andl %r8d, %esi testl %edx, %edx leal -0x12800000(%r9,%rsi), %ecx cmovel %edx, %ecx xorl %esi, %esi testl %eax, %eax leal 0x38000000(%r11,%rdx), %edx cmovel %eax, %edx cmovel %ecx, %esi orl %edi, %edx orl %esi, %edx movd %edx, %xmm0 retq
HalfToFloat: mov eax, edi shr eax, 0Ah mov esi, edi shl esi, 0Dh mov r8d, 7FE000h mov edx, esi and edx, r8d cvtsi2ss xmm0, edx and eax, 1Fh movd r9d, xmm0 mov r10d, r9d shr r10d, 17h shl edi, 10h and edi, 80000000h mov r11d, eax shl r11d, 17h and r9d, 7F800000h mov cl, 96h sub cl, r10b shl esi, cl and esi, r8d test edx, edx lea ecx, [r9+rsi-12800000h] cmovz ecx, edx xor esi, esi test eax, eax lea edx, [r11+rdx+38000000h] cmovz edx, eax cmovz esi, ecx or edx, edi or edx, esi movd xmm0, edx retn
__m128i HalfToFloat(unsigned int a1, __m128i a2) { int v2; // esi int v3; // edx int v4; // eax unsigned int v5; // r9d unsigned int v6; // edi int v7; // ecx int v8; // esi int v9; // edx v2 = a1 << 13; v3 = (a1 << 13) & 0x7FE000; *(float *)a2.m128i_i32 = (float)v3; v4 = (a1 >> 10) & 0x1F; v5 = _mm_cvtsi128_si32(a2); v6 = (a1 << 16) & 0x80000000; v7 = (v5 & 0x7F800000) + ((v2 << (-106 - (v5 >> 23))) & 0x7FE000) - 310378496; if ( !v3 ) v7 = 0; v8 = 0; v9 = (v4 << 23) + v3 + 939524096; if ( !v4 ) { v9 = 0; v8 = v7; } return _mm_cvtsi32_si128(v8 | v6 | v9); }
HalfToFloat: MOV EAX,EDI SHR EAX,0xa MOV ESI,EDI SHL ESI,0xd MOV R8D,0x7fe000 MOV EDX,ESI AND EDX,R8D CVTSI2SS XMM0,EDX AND EAX,0x1f MOVD R9D,XMM0 MOV R10D,R9D SHR R10D,0x17 SHL EDI,0x10 AND EDI,0x80000000 MOV R11D,EAX SHL R11D,0x17 AND R9D,0x7f800000 MOV CL,0x96 SUB CL,R10B SHL ESI,CL AND ESI,R8D TEST EDX,EDX LEA ECX,[R9 + RSI*0x1 + -0x12800000] CMOVZ ECX,EDX XOR ESI,ESI TEST EAX,EAX LEA EDX,[R11 + RDX*0x1 + 0x38000000] CMOVZ EDX,EAX CMOVZ ESI,ECX OR EDX,EDI OR EDX,ESI MOVD XMM0,EDX RET
uint HalfToFloat(uint param_1) { uint uVar1; uint uVar2; uint uVar3; uint uVar4; uVar4 = param_1 << 0xd & 0x7fe000; uVar2 = param_1 >> 10 & 0x1f; uVar3 = ((uint)(float)uVar4 & 0x7f800000) + 0xed800000 + ((param_1 << 0xd) << (0x96U - (char)((uint)(float)uVar4 >> 0x17) & 0x1f) & 0x7fe000); if (uVar4 == 0) { uVar3 = 0; } uVar4 = uVar2 * 0x800000 + 0x38000000 + uVar4; uVar1 = 0; if (uVar2 == 0) { uVar4 = 0; uVar1 = uVar3; } return uVar4 | (param_1 & 0x8000) << 0x10 | uVar1; }
16,614
HalfToFloat
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c
static float HalfToFloat(unsigned short x) { float result = 0.0f; const unsigned int e = (x & 0x7C00) >> 10; // Exponent const unsigned int m = (x & 0x03FF) << 13; // Mantissa const float fm = (float)m; const unsigned int v = (*(unsigned int*)&fm) >> 23; // Evil log2 bit hack to count leading zeros in denormalized format const unsigned int r = (x & 0x8000) << 16 | (e != 0)*((e + 112) << 23 | m) | ((e == 0)&(m != 0))*((v - 37) << 23 | ((m << (150 - v)) & 0x007FE000)); // sign : normalized : denormalized result = *(float *)&r; return result; }
O3
c
HalfToFloat: movl %edi, %eax shrl $0xa, %eax movl %edi, %esi shll $0xd, %esi movl $0x7fe000, %r8d # imm = 0x7FE000 movl %esi, %edx andl %r8d, %edx cvtsi2ss %edx, %xmm0 andl $0x1f, %eax movd %xmm0, %r9d movl %r9d, %r10d shrl $0x17, %r10d shll $0x10, %edi andl $0x80000000, %edi # imm = 0x80000000 movl %eax, %r11d shll $0x17, %r11d andl $0x7f800000, %r9d # imm = 0x7F800000 movb $-0x6a, %cl subb %r10b, %cl shll %cl, %esi andl %r8d, %esi testl %edx, %edx leal -0x12800000(%r9,%rsi), %ecx cmovel %edx, %ecx xorl %esi, %esi testl %eax, %eax leal 0x38000000(%r11,%rdx), %edx cmovel %eax, %edx cmovel %ecx, %esi orl %edi, %edx orl %esi, %edx movd %edx, %xmm0 retq
HalfToFloat: mov eax, edi shr eax, 0Ah mov esi, edi shl esi, 0Dh mov r8d, 7FE000h mov edx, esi and edx, r8d cvtsi2ss xmm0, edx and eax, 1Fh movd r9d, xmm0 mov r10d, r9d shr r10d, 17h shl edi, 10h and edi, 80000000h mov r11d, eax shl r11d, 17h and r9d, 7F800000h mov cl, 96h sub cl, r10b shl esi, cl and esi, r8d test edx, edx lea ecx, [r9+rsi-12800000h] cmovz ecx, edx xor esi, esi test eax, eax lea edx, [r11+rdx+38000000h] cmovz edx, eax cmovz esi, ecx or edx, edi or edx, esi movd xmm0, edx retn
__m128i HalfToFloat(unsigned int a1, __m128i a2) { int v2; // esi int v3; // edx int v4; // eax unsigned int v5; // r9d unsigned int v6; // edi int v7; // ecx int v8; // esi int v9; // edx v2 = a1 << 13; v3 = (a1 << 13) & 0x7FE000; *(float *)a2.m128i_i32 = (float)v3; v4 = (a1 >> 10) & 0x1F; v5 = _mm_cvtsi128_si32(a2); v6 = (a1 << 16) & 0x80000000; v7 = (v5 & 0x7F800000) + ((v2 << (-106 - (v5 >> 23))) & 0x7FE000) - 310378496; if ( !v3 ) v7 = 0; v8 = 0; v9 = (v4 << 23) + v3 + 939524096; if ( !v4 ) { v9 = 0; v8 = v7; } return _mm_cvtsi32_si128(v8 | v6 | v9); }
HalfToFloat: MOV EAX,EDI SHR EAX,0xa MOV ESI,EDI SHL ESI,0xd MOV R8D,0x7fe000 MOV EDX,ESI AND EDX,R8D CVTSI2SS XMM0,EDX AND EAX,0x1f MOVD R9D,XMM0 MOV R10D,R9D SHR R10D,0x17 SHL EDI,0x10 AND EDI,0x80000000 MOV R11D,EAX SHL R11D,0x17 AND R9D,0x7f800000 MOV CL,0x96 SUB CL,R10B SHL ESI,CL AND ESI,R8D TEST EDX,EDX LEA ECX,[R9 + RSI*0x1 + -0x12800000] CMOVZ ECX,EDX XOR ESI,ESI TEST EAX,EAX LEA EDX,[R11 + RDX*0x1 + 0x38000000] CMOVZ EDX,EAX CMOVZ ESI,ECX OR EDX,EDI OR EDX,ESI MOVD XMM0,EDX RET
uint HalfToFloat(uint param_1) { uint uVar1; uint uVar2; uint uVar3; uint uVar4; uVar4 = param_1 << 0xd & 0x7fe000; uVar2 = param_1 >> 10 & 0x1f; uVar3 = ((uint)(float)uVar4 & 0x7f800000) + 0xed800000 + ((param_1 << 0xd) << (0x96U - (char)((uint)(float)uVar4 >> 0x17) & 0x1f) & 0x7fe000); if (uVar4 == 0) { uVar3 = 0; } uVar4 = uVar2 * 0x800000 + 0x38000000 + uVar4; uVar1 = 0; if (uVar2 == 0) { uVar4 = 0; uVar1 = uVar3; } return uVar4 | (param_1 & 0x8000) << 0x10 | uVar1; }
16,615
load_4
eloqsql/libmariadb/plugins/auth/ref10/sc_muladd.c
static crypto_uint64 load_4(const unsigned char *in) { crypto_uint64 result; result = (crypto_uint64) in[0]; result |= ((crypto_uint64) in[1]) << 8; result |= ((crypto_uint64) in[2]) << 16; result |= ((crypto_uint64) in[3]) << 24; return result; }
O0
c
load_4: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movzbl (%rax), %eax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax movzbl 0x1(%rax), %eax shlq $0x8, %rax orq -0x10(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax movzbl 0x2(%rax), %eax shlq $0x10, %rax orq -0x10(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax movzbl 0x3(%rax), %eax shlq $0x18, %rax orq -0x10(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax popq %rbp retq nopw %cs:(%rax,%rax) nop
load_4: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] movzx eax, byte ptr [rax] mov [rbp+var_10], rax mov rax, [rbp+var_8] movzx eax, byte ptr [rax+1] shl rax, 8 or rax, [rbp+var_10] mov [rbp+var_10], rax mov rax, [rbp+var_8] movzx eax, byte ptr [rax+2] shl rax, 10h or rax, [rbp+var_10] mov [rbp+var_10], rax mov rax, [rbp+var_8] movzx eax, byte ptr [rax+3] shl rax, 18h or rax, [rbp+var_10] mov [rbp+var_10], rax mov rax, [rbp+var_10] pop rbp retn
unsigned long long load_4(unsigned __int16 *a1) { return *a1 | ((unsigned long long)*((unsigned __int8 *)a1 + 2) << 16) | ((unsigned long long)*((unsigned __int8 *)a1 + 3) << 24); }
load_4: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x1] SHL RAX,0x8 OR RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x2] SHL RAX,0x10 OR RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x3] SHL RAX,0x18 OR RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] POP RBP RET
int4 load_4(int4 *param_1) { return *param_1; }
16,616
ftxui::(anonymous namespace)::Set[abi:cxx11](std::vector<ftxui::(anonymous namespace)::DECMode, std::allocator<ftxui::(anonymous namespace)::DECMode>> const&)
Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/component/screen_interactive.cpp
std::string Set(const std::vector<DECMode>& parameters) { return CSI + "?" + Serialize(parameters) + "h"; }
O1
cpp
ftxui::(anonymous namespace)::Set[abi:cxx11](std::vector<ftxui::(anonymous namespace)::DECMode, std::allocator<ftxui::(anonymous namespace)::DECMode>> const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x38(%rsp), %r12 movq %r12, -0x10(%r12) movq 0x2ad0e(%rip), %rsi # 0x5b2a0 movq 0x2ad0f(%rip), %rdx # 0x5b2a8 addq %rsi, %rdx leaq 0x28(%rsp), %r15 movq %r15, %rdi callq 0x11e4e leaq 0xf8c9(%rip), %rsi # 0x3fe79 movq %r15, %rdi callq 0xb7f0 leaq 0x48(%rsp), %rdi movq %r14, %rsi callq 0x307e6 movq 0x28(%rsp), %rcx movq 0x30(%rsp), %r8 movq 0x50(%rsp), %rdx leaq (%rdx,%r8), %rax movl $0xf, %esi cmpq %r12, %rcx je 0x305e7 movq 0x38(%rsp), %rsi cmpq %rsi, %rax jbe 0x30606 leaq 0x58(%rsp), %rdi movl $0xf, %esi cmpq %rdi, -0x10(%rdi) je 0x30601 movq 0x58(%rsp), %rsi cmpq %rsi, %rax jbe 0x30617 movq 0x48(%rsp), %rsi leaq 0x28(%rsp), %rdi callq 0xb110 jmp 0x30625 leaq 0x48(%rsp), %rdi xorl %esi, %esi xorl %edx, %edx callq 0xb470 leaq 0x18(%rsp), %rdx movq %rdx, -0x10(%rdx) movq (%rax), %rsi leaq 0x10(%rax), %rcx cmpq %rcx, %rsi je 0x30649 movq %rsi, 0x8(%rsp) movq (%rcx), %rdx movq %rdx, 0x18(%rsp) jmp 0x3064f movups (%rcx), %xmm0 movups %xmm0, (%rdx) movq %rax, %rdx addq $0x8, %rdx movq 0x8(%rax), %rsi movq %rsi, 0x10(%rsp) movq %rcx, (%rax) movq $0x0, (%rdx) movb $0x0, (%rcx) leaq 0xcc29(%rip), %rsi # 0x3d29c leaq 0x8(%rsp), %rdi callq 0xb7f0 leaq 0x10(%rbx), %rdx movq %rdx, (%rbx) movq (%rax), %rsi movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rsi je 0x3069f movq %rsi, (%rbx) movq (%rcx), %rdx movq %rdx, 0x10(%rbx) jmp 0x306a5 movups (%rcx), %xmm0 movups %xmm0, (%rdx) movq 0x8(%rax), %rdx movq %rdx, 0x8(%rbx) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x306d7 movq 0x18(%rsp), %rsi incq %rsi callq 0xb400 leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x306f2 movq 0x58(%rsp), %rsi incq %rsi callq 0xb400 movq 0x28(%rsp), %rdi cmpq %r12, %rdi je 0x30709 movq 0x38(%rsp), %rsi incq %rsi callq 0xb400 movq %rbx, %rax addq $0x68, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x3073b movq 0x18(%rsp), %rsi incq %rsi callq 0xb400 jmp 0x3073b movq %rax, %rbx leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x3075d movq 0x58(%rsp), %rsi incq %rsi callq 0xb400 jmp 0x3075d jmp 0x3075a movq %rax, %rbx movq 0x28(%rsp), %rdi cmpq %r12, %rdi je 0x30774 movq 0x38(%rsp), %rsi incq %rsi callq 0xb400 movq %rbx, %rdi callq 0xb780
_ZN5ftxui12_GLOBAL__N_13SetB5cxx11ERKSt6vectorINS0_7DECModeESaIS2_EE: push r15 push r14 push r12 push rbx sub rsp, 68h mov r14, rsi mov rbx, rdi lea r12, [rsp+88h+var_50] mov [r12-10h], r12 mov rsi, cs:_ZN5ftxui12_GLOBAL__N_13CSIB5cxx11E; ftxui::`anonymous namespace'::CSI mov rdx, cs:qword_5B2A8 add rdx, rsi lea r15, [rsp+88h+var_60] mov rdi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rsi, asc_3FE79; "?" mov rdi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rdi, [rsp+88h+var_40]; int mov rsi, r14; int call _ZN5ftxui12_GLOBAL__N_19SerializeB5cxx11ERKSt6vectorINS0_7DECModeESaIS2_EE; ftxui::`anonymous namespace'::Serialize(std::vector<ftxui::`anonymous namespace'::DECMode> const&) mov rcx, [rsp+88h+var_60] mov r8, [rsp+88h+var_58] mov rdx, [rsp+88h+var_38] lea rax, [rdx+r8] mov esi, 0Fh cmp rcx, r12 jz short loc_305E7 mov rsi, [rsp+88h+var_50] loc_305E7: cmp rax, rsi jbe short loc_30606 lea rdi, [rsp+88h+var_30] mov esi, 0Fh cmp [rdi-10h], rdi jz short loc_30601 mov rsi, [rsp+88h+var_30] loc_30601: cmp rax, rsi jbe short loc_30617 loc_30606: mov rsi, qword ptr [rsp+88h+var_40] lea rdi, [rsp+88h+var_60] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) jmp short loc_30625 loc_30617: lea rdi, [rsp+88h+var_40] xor esi, esi xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong) loc_30625: lea rdx, [rsp+88h+var_70] mov [rdx-10h], rdx mov rsi, [rax] lea rcx, [rax+10h] cmp rsi, rcx jz short loc_30649 mov [rsp+88h+var_80], rsi mov rdx, [rcx] mov [rsp+88h+var_70], rdx jmp short loc_3064F loc_30649: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rdx], xmm0 loc_3064F: mov rdx, rax add rdx, 8 mov rsi, [rax+8] mov [rsp+88h+var_78], rsi mov [rax], rcx mov qword ptr [rdx], 0 mov byte ptr [rcx], 0 lea rsi, aWorkspaceLlm4b+53h; "h" lea rdi, [rsp+88h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rdx, [rbx+10h] mov [rbx], rdx mov rsi, [rax] mov rcx, rax add rcx, 10h cmp rsi, rcx jz short loc_3069F mov [rbx], rsi mov rdx, [rcx] mov [rbx+10h], rdx jmp short loc_306A5 loc_3069F: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rdx], xmm0 loc_306A5: mov rdx, [rax+8] mov [rbx+8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 lea rax, [rsp+88h+var_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_306D7 mov rsi, [rsp+88h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_306D7: lea rax, [rsp+88h+var_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_306F2 mov rsi, [rsp+88h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_306F2: mov rdi, [rsp+88h+var_60]; void * cmp rdi, r12 jz short loc_30709 mov rsi, [rsp+88h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_30709: mov rax, rbx add rsp, 68h pop rbx pop r12 pop r14 pop r15 retn mov rbx, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_3073B mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_3073B mov rbx, rax loc_3073B: lea rax, [rsp+arg_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_3075D mov rsi, [rsp+arg_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_3075D jmp short $+2 loc_3075A: mov rbx, rax loc_3075D: mov rdi, [rsp+arg_20]; void * cmp rdi, r12 jz short loc_30774 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_30774: mov rdi, rbx call __Unwind_Resume
long long ftxui::`anonymous namespace'::Set[abi:cxx11](long long a1, int a2) { int v2; // edx int v3; // ecx int v4; // r8d int v5; // r9d char *v6; // rax unsigned long long v7; // rsi unsigned long long v8; // rsi long long v9; // rax __int128 *v10; // rcx long long v11; // rax _OWORD *v12; // rcx long long v14; // [rsp+0h] [rbp-88h] __int128 *v15; // [rsp+8h] [rbp-80h] BYREF long long v16; // [rsp+10h] [rbp-78h] __int128 v17; // [rsp+18h] [rbp-70h] BYREF void *v18[2]; // [rsp+28h] [rbp-60h] BYREF _QWORD v19[2]; // [rsp+38h] [rbp-50h] BYREF int v20[2]; // [rsp+48h] [rbp-40h] BYREF long long v21; // [rsp+50h] [rbp-38h] _QWORD v22[6]; // [rsp+58h] [rbp-30h] BYREF v18[0] = v19; std::string::_M_construct<char *>( v18, (_BYTE *)ftxui::`anonymous namespace'::CSI[abi:cxx11], ftxui::`anonymous namespace'::CSI[abi:cxx11] + qword_5B2A8); std::string::append(v18, "?"); ftxui::`anonymous namespace'::Serialize[abi:cxx11]((int)v20, a2, v2, v3, v4, v5, v14, v15, v16, v17); v6 = (char *)v18[1] + v21; v7 = 15LL; if ( v18[0] != v19 ) v7 = v19[0]; if ( (unsigned long long)v6 <= v7 ) goto LABEL_7; v8 = 15LL; if ( *(_QWORD **)v20 != v22 ) v8 = v22[0]; if ( (unsigned long long)v6 <= v8 ) v9 = std::string::replace(v20, 0LL, 0LL); else LABEL_7: v9 = std::string::_M_append(v18, *(_QWORD *)v20, v21); v15 = &v17; v10 = (__int128 *)(v9 + 16); if ( *(_QWORD *)v9 == v9 + 16 ) { v17 = *v10; } else { v15 = *(__int128 **)v9; *(_QWORD *)&v17 = *(_QWORD *)v10; } v16 = *(_QWORD *)(v9 + 8); *(_QWORD *)v9 = v10; *(_QWORD *)(v9 + 8) = 0LL; *(_BYTE *)v10 = 0; v11 = std::string::append(&v15, "h"); *(_QWORD *)a1 = a1 + 16; v12 = (_OWORD *)(v11 + 16); if ( *(_QWORD *)v11 == v11 + 16 ) { *(_OWORD *)(a1 + 16) = *v12; } else { *(_QWORD *)a1 = *(_QWORD *)v11; *(_QWORD *)(a1 + 16) = *(_QWORD *)v12; } *(_QWORD *)(a1 + 8) = *(_QWORD *)(v11 + 8); *(_QWORD *)v11 = v12; *(_QWORD *)(v11 + 8) = 0LL; *(_BYTE *)(v11 + 16) = 0; if ( v15 != &v17 ) operator delete(v15, v17 + 1); if ( *(_QWORD **)v20 != v22 ) operator delete(*(void **)v20, v22[0] + 1LL); if ( v18[0] != v19 ) operator delete(v18[0], v19[0] + 1LL); return a1; }
Set[abi:cxx11]: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R14,RSI MOV RBX,RDI LEA R12,[RSP + 0x38] MOV qword ptr [R12 + -0x10],R12 MOV RSI,qword ptr [0x0015b2a0] MOV RDX,qword ptr [0x0015b2a8] ADD RDX,RSI LEA R15,[RSP + 0x28] MOV RDI,R15 CALL 0x00111e4e LAB_001305a9: LEA RSI,[0x13fe79] MOV RDI,R15 CALL 0x0010b7f0 LAB_001305b8: LEA RDI,[RSP + 0x48] MOV RSI,R14 CALL 0x001307e6 MOV RCX,qword ptr [RSP + 0x28] MOV R8,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x50] LEA RAX,[RDX + R8*0x1] MOV ESI,0xf CMP RCX,R12 JZ 0x001305e7 MOV RSI,qword ptr [RSP + 0x38] LAB_001305e7: CMP RAX,RSI JBE 0x00130606 LEA RDI,[RSP + 0x58] MOV ESI,0xf CMP qword ptr [RDI + -0x10],RDI JZ 0x00130601 MOV RSI,qword ptr [RSP + 0x58] LAB_00130601: CMP RAX,RSI JBE 0x00130617 LAB_00130606: MOV RSI,qword ptr [RSP + 0x48] LAB_0013060b: LEA RDI,[RSP + 0x28] CALL 0x0010b110 JMP 0x00130625 LAB_00130617: LEA RDI,[RSP + 0x48] XOR ESI,ESI XOR EDX,EDX CALL 0x0010b470 LAB_00130625: LEA RDX,[RSP + 0x18] MOV qword ptr [RDX + -0x10],RDX MOV RSI,qword ptr [RAX] LEA RCX,[RAX + 0x10] CMP RSI,RCX JZ 0x00130649 MOV qword ptr [RSP + 0x8],RSI MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x18],RDX JMP 0x0013064f LAB_00130649: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RDX],XMM0 LAB_0013064f: MOV RDX,RAX ADD RDX,0x8 MOV RSI,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RSI MOV qword ptr [RAX],RCX MOV qword ptr [RDX],0x0 MOV byte ptr [RCX],0x0 LAB_0013066c: LEA RSI,[0x13d29c] LEA RDI,[RSP + 0x8] CALL 0x0010b7f0 LAB_0013067d: LEA RDX,[RBX + 0x10] MOV qword ptr [RBX],RDX MOV RSI,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RSI,RCX JZ 0x0013069f MOV qword ptr [RBX],RSI MOV RDX,qword ptr [RCX] MOV qword ptr [RBX + 0x10],RDX JMP 0x001306a5 LAB_0013069f: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RDX],XMM0 LAB_001306a5: MOV RDX,qword ptr [RAX + 0x8] MOV qword ptr [RBX + 0x8],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001306d7 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0010b400 LAB_001306d7: LEA RAX,[RSP + 0x58] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001306f2 MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x0010b400 LAB_001306f2: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R12 JZ 0x00130709 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x0010b400 LAB_00130709: MOV RAX,RBX ADD RSP,0x68 POP RBX POP R12 POP R14 POP R15 RET
/* ftxui::(anonymous namespace)::Set[abi:cxx11](std::vector<ftxui::(anonymous namespace)::DECMode, std::allocator<ftxui::(anonymous namespace)::DECMode> > const&) */ _anonymous_namespace_ * __thiscall ftxui::(anonymous_namespace)::Set_abi_cxx11_(_anonymous_namespace_ *this,vector *param_1) { long lVar1; int8 *puVar2; long *plVar3; long *plVar4; ulong uVar5; long *local_80; int8 local_78; long local_70; int8 uStack_68; ulong *local_60; long local_58; ulong local_50 [2]; ulong *local_40; long local_38; ulong local_30 [2]; local_60 = local_50; std::__cxx11::string::_M_construct<char*>(&local_60,CSI_abi_cxx11_,DAT_0015b2a8 + CSI_abi_cxx11_); /* try { // try from 001305a9 to 001305b7 has its CatchHandler @ 0013075a */ std::__cxx11::string::append((char *)&local_60); /* try { // try from 001305b8 to 001305c4 has its CatchHandler @ 00130758 */ Serialize_abi_cxx11_((_anonymous_namespace_ *)&local_40,param_1); uVar5 = 0xf; if (local_60 != local_50) { uVar5 = local_50[0]; } if (uVar5 < (ulong)(local_38 + local_58)) { uVar5 = 0xf; if (local_40 != local_30) { uVar5 = local_30[0]; } if ((ulong)(local_38 + local_58) <= uVar5) { puVar2 = (int8 *) std::__cxx11::string::replace((ulong)&local_40,0,(char *)0x0,(ulong)local_60); goto LAB_00130625; } } /* try { // try from 0013060b to 00130624 has its CatchHandler @ 00130738 */ puVar2 = (int8 *)std::__cxx11::string::_M_append((char *)&local_60,(ulong)local_40); LAB_00130625: local_80 = &local_70; plVar3 = puVar2 + 2; if ((long *)*puVar2 == plVar3) { local_70 = *plVar3; uStack_68 = puVar2[3]; } else { local_70 = *plVar3; local_80 = (long *)*puVar2; } local_78 = puVar2[1]; *puVar2 = plVar3; puVar2[1] = 0; *(int1 *)plVar3 = 0; /* try { // try from 0013066c to 0013067c has its CatchHandler @ 00130718 */ plVar3 = (long *)std::__cxx11::string::append((char *)&local_80); *(_anonymous_namespace_ **)this = this + 0x10; plVar4 = plVar3 + 2; if ((long *)*plVar3 == plVar4) { lVar1 = plVar3[3]; *(long *)(this + 0x10) = *plVar4; *(long *)(this + 0x18) = lVar1; } else { *(long **)this = (long *)*plVar3; *(long *)(this + 0x10) = *plVar4; } *(long *)(this + 8) = plVar3[1]; *plVar3 = (long)plVar4; plVar3[1] = 0; *(int1 *)(plVar3 + 2) = 0; if (local_80 != &local_70) { operator_delete(local_80,local_70 + 1); } if (local_40 != local_30) { operator_delete(local_40,local_30[0] + 1); } if (local_60 != local_50) { operator_delete(local_60,local_50[0] + 1); } return this; }
16,617
my_strntoul_8bit
eloqsql/strings/ctype-simple.c
ulong my_strntoul_8bit(CHARSET_INFO *cs, const char *nptr, size_t l, int base, char **endptr, int *err) { int negative; register uint32 cutoff; register uint cutlim; register uint32 i; register const char *s; const char *save, *e; int overflow; *err= 0; /* Initialize error indicator */ s = nptr; e = nptr+l; for( ; s<e && my_isspace(cs, *s); s++); if (s==e) { goto noconv; } if (*s == '-') { negative = 1; ++s; } else if (*s == '+') { negative = 0; ++s; } else negative = 0; save = s; cutoff = ((uint32)~0L) / (uint32) base; cutlim = (uint) (((uint32)~0L) % (uint32) base); overflow = 0; i = 0; for ( ; s != e; ++s) { register uchar c= *s; if (c>='0' && c<='9') c -= '0'; else if (c>='A' && c<='Z') c = c - 'A' + 10; else if (c>='a' && c<='z') c = c - 'a' + 10; else break; if (c >= base) break; if (i > cutoff || (i == cutoff && c > cutlim)) overflow = 1; else { i *= (uint32) base; i += c; } } if (s == save) goto noconv; if (endptr != NULL) *endptr = (char *) s; if (overflow) { err[0]= ERANGE; return (~(uint32) 0); } return (negative ? -((long) i) : (long) i); noconv: err[0]= EDOM; if (endptr != NULL) *endptr = (char *) nptr; return 0L; }
O0
c
my_strntoul_8bit: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) movq -0x38(%rbp), %rax movl $0x0, (%rax) movq -0x18(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x18(%rbp), %rax addq -0x20(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x50(%rbp), %rcx xorl %eax, %eax cmpq -0x60(%rbp), %rcx movb %al, -0x66(%rbp) jae 0x58458 movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq -0x50(%rbp), %rcx movzbl (%rcx), %ecx movzbl 0x1(%rax,%rcx), %eax andl $0x8, %eax cmpl $0x0, %eax setne %al movb %al, -0x66(%rbp) movb -0x66(%rbp), %al testb $0x1, %al jne 0x58461 jmp 0x58471 jmp 0x58463 movq -0x50(%rbp), %rax addq $0x1, %rax movq %rax, -0x50(%rbp) jmp 0x58429 movq -0x50(%rbp), %rax cmpq -0x60(%rbp), %rax jne 0x58480 jmp 0x5862c movq -0x50(%rbp), %rax movsbl (%rax), %eax cmpl $0x2d, %eax jne 0x584a1 movl $0x1, -0x3c(%rbp) movq -0x50(%rbp), %rax addq $0x1, %rax movq %rax, -0x50(%rbp) jmp 0x584cb movq -0x50(%rbp), %rax movsbl (%rax), %eax cmpl $0x2b, %eax jne 0x584c2 movl $0x0, -0x3c(%rbp) movq -0x50(%rbp), %rax addq $0x1, %rax movq %rax, -0x50(%rbp) jmp 0x584c9 movl $0x0, -0x3c(%rbp) jmp 0x584cb movq -0x50(%rbp), %rax movq %rax, -0x58(%rbp) movl $0xffffffff, %eax # imm = 0xFFFFFFFF xorl %edx, %edx divl -0x24(%rbp) movl %eax, -0x40(%rbp) movl $0xffffffff, %eax # imm = 0xFFFFFFFF xorl %edx, %edx divl -0x24(%rbp) movl %edx, -0x44(%rbp) movl $0x0, -0x64(%rbp) movl $0x0, -0x48(%rbp) movq -0x50(%rbp), %rax cmpq -0x60(%rbp), %rax je 0x585cc movq -0x50(%rbp), %rax movb (%rax), %al movb %al, -0x65(%rbp) movzbl -0x65(%rbp), %eax cmpl $0x30, %eax jl 0x58530 movzbl -0x65(%rbp), %eax cmpl $0x39, %eax jg 0x58530 movzbl -0x65(%rbp), %eax subl $0x30, %eax movb %al, -0x65(%rbp) jmp 0x58578 movzbl -0x65(%rbp), %eax cmpl $0x41, %eax jl 0x58551 movzbl -0x65(%rbp), %eax cmpl $0x5a, %eax jg 0x58551 movzbl -0x65(%rbp), %eax subl $0x41, %eax addl $0xa, %eax movb %al, -0x65(%rbp) jmp 0x58576 movzbl -0x65(%rbp), %eax cmpl $0x61, %eax jl 0x58572 movzbl -0x65(%rbp), %eax cmpl $0x7a, %eax jg 0x58572 movzbl -0x65(%rbp), %eax subl $0x61, %eax addl $0xa, %eax movb %al, -0x65(%rbp) jmp 0x58574 jmp 0x585cc jmp 0x58576 jmp 0x58578 movzbl -0x65(%rbp), %eax cmpl -0x24(%rbp), %eax jl 0x58583 jmp 0x585cc movl -0x48(%rbp), %eax cmpl -0x40(%rbp), %eax ja 0x5859c movl -0x48(%rbp), %eax cmpl -0x40(%rbp), %eax jne 0x585a5 movzbl -0x65(%rbp), %eax cmpl -0x44(%rbp), %eax jbe 0x585a5 movl $0x1, -0x64(%rbp) jmp 0x585b9 movl -0x24(%rbp), %eax imull -0x48(%rbp), %eax movl %eax, -0x48(%rbp) movzbl -0x65(%rbp), %eax addl -0x48(%rbp), %eax movl %eax, -0x48(%rbp) jmp 0x585bb movq -0x50(%rbp), %rax addq $0x1, %rax movq %rax, -0x50(%rbp) jmp 0x584fb movq -0x50(%rbp), %rax cmpq -0x58(%rbp), %rax jne 0x585d8 jmp 0x5862c cmpq $0x0, -0x30(%rbp) je 0x585ea movq -0x50(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) cmpl $0x0, -0x64(%rbp) je 0x58605 movq -0x38(%rbp), %rax movl $0x22, (%rax) movl $0xffffffff, %eax # imm = 0xFFFFFFFF movq %rax, -0x8(%rbp) jmp 0x58650 cmpl $0x0, -0x3c(%rbp) je 0x5861b movl -0x48(%rbp), %eax movl %eax, %ecx xorl %eax, %eax subq %rcx, %rax movq %rax, -0x70(%rbp) jmp 0x58622 movl -0x48(%rbp), %eax movq %rax, -0x70(%rbp) movq -0x70(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x58650 movq -0x38(%rbp), %rax movl $0x21, (%rax) cmpq $0x0, -0x30(%rbp) je 0x58648 movq -0x18(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq nopw %cs:(%rax,%rax)
my_strntoul_8bit: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov [rbp+var_30], r8 mov [rbp+var_38], r9 mov rax, [rbp+var_38] mov dword ptr [rax], 0 mov rax, [rbp+var_18] mov [rbp+var_50], rax mov rax, [rbp+var_18] add rax, [rbp+var_20] mov [rbp+var_60], rax loc_58429: mov rcx, [rbp+var_50] xor eax, eax cmp rcx, [rbp+var_60] mov [rbp+var_66], al jnb short loc_58458 mov rax, [rbp+var_10] mov rax, [rax+40h] mov rcx, [rbp+var_50] movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx+1] and eax, 8 cmp eax, 0 setnz al mov [rbp+var_66], al loc_58458: mov al, [rbp+var_66] test al, 1 jnz short loc_58461 jmp short loc_58471 loc_58461: jmp short $+2 loc_58463: mov rax, [rbp+var_50] add rax, 1 mov [rbp+var_50], rax jmp short loc_58429 loc_58471: mov rax, [rbp+var_50] cmp rax, [rbp+var_60] jnz short loc_58480 jmp loc_5862C loc_58480: mov rax, [rbp+var_50] movsx eax, byte ptr [rax] cmp eax, 2Dh ; '-' jnz short loc_584A1 mov [rbp+var_3C], 1 mov rax, [rbp+var_50] add rax, 1 mov [rbp+var_50], rax jmp short loc_584CB loc_584A1: mov rax, [rbp+var_50] movsx eax, byte ptr [rax] cmp eax, 2Bh ; '+' jnz short loc_584C2 mov [rbp+var_3C], 0 mov rax, [rbp+var_50] add rax, 1 mov [rbp+var_50], rax jmp short loc_584C9 loc_584C2: mov [rbp+var_3C], 0 loc_584C9: jmp short $+2 loc_584CB: mov rax, [rbp+var_50] mov [rbp+var_58], rax mov eax, 0FFFFFFFFh xor edx, edx div [rbp+var_24] mov [rbp+var_40], eax mov eax, 0FFFFFFFFh xor edx, edx div [rbp+var_24] mov [rbp+var_44], edx mov [rbp+var_64], 0 mov [rbp+var_48], 0 loc_584FB: mov rax, [rbp+var_50] cmp rax, [rbp+var_60] jz loc_585CC mov rax, [rbp+var_50] mov al, [rax] mov [rbp+var_65], al movzx eax, [rbp+var_65] cmp eax, 30h ; '0' jl short loc_58530 movzx eax, [rbp+var_65] cmp eax, 39h ; '9' jg short loc_58530 movzx eax, [rbp+var_65] sub eax, 30h ; '0' mov [rbp+var_65], al jmp short loc_58578 loc_58530: movzx eax, [rbp+var_65] cmp eax, 41h ; 'A' jl short loc_58551 movzx eax, [rbp+var_65] cmp eax, 5Ah ; 'Z' jg short loc_58551 movzx eax, [rbp+var_65] sub eax, 41h ; 'A' add eax, 0Ah mov [rbp+var_65], al jmp short loc_58576 loc_58551: movzx eax, [rbp+var_65] cmp eax, 61h ; 'a' jl short loc_58572 movzx eax, [rbp+var_65] cmp eax, 7Ah ; 'z' jg short loc_58572 movzx eax, [rbp+var_65] sub eax, 61h ; 'a' add eax, 0Ah mov [rbp+var_65], al jmp short loc_58574 loc_58572: jmp short loc_585CC loc_58574: jmp short $+2 loc_58576: jmp short $+2 loc_58578: movzx eax, [rbp+var_65] cmp eax, [rbp+var_24] jl short loc_58583 jmp short loc_585CC loc_58583: mov eax, [rbp+var_48] cmp eax, [rbp+var_40] ja short loc_5859C mov eax, [rbp+var_48] cmp eax, [rbp+var_40] jnz short loc_585A5 movzx eax, [rbp+var_65] cmp eax, [rbp+var_44] jbe short loc_585A5 loc_5859C: mov [rbp+var_64], 1 jmp short loc_585B9 loc_585A5: mov eax, [rbp+var_24] imul eax, [rbp+var_48] mov [rbp+var_48], eax movzx eax, [rbp+var_65] add eax, [rbp+var_48] mov [rbp+var_48], eax loc_585B9: jmp short $+2 loc_585BB: mov rax, [rbp+var_50] add rax, 1 mov [rbp+var_50], rax jmp loc_584FB loc_585CC: mov rax, [rbp+var_50] cmp rax, [rbp+var_58] jnz short loc_585D8 jmp short loc_5862C loc_585D8: cmp [rbp+var_30], 0 jz short loc_585EA mov rcx, [rbp+var_50] mov rax, [rbp+var_30] mov [rax], rcx loc_585EA: cmp [rbp+var_64], 0 jz short loc_58605 mov rax, [rbp+var_38] mov dword ptr [rax], 22h ; '"' mov eax, 0FFFFFFFFh mov [rbp+var_8], rax jmp short loc_58650 loc_58605: cmp [rbp+var_3C], 0 jz short loc_5861B mov eax, [rbp+var_48] mov ecx, eax xor eax, eax sub rax, rcx mov [rbp+var_70], rax jmp short loc_58622 loc_5861B: mov eax, [rbp+var_48] mov [rbp+var_70], rax loc_58622: mov rax, [rbp+var_70] mov [rbp+var_8], rax jmp short loc_58650 loc_5862C: mov rax, [rbp+var_38] mov dword ptr [rax], 21h ; '!' cmp [rbp+var_30], 0 jz short loc_58648 mov rcx, [rbp+var_18] mov rax, [rbp+var_30] mov [rax], rcx loc_58648: mov [rbp+var_8], 0 loc_58650: mov rax, [rbp+var_8] pop rbp retn
long long my_strntoul_8bit(long long a1, _BYTE *a2, long long a3, int a4, _QWORD *a5, _DWORD *a6) { bool v8; // [rsp+Ah] [rbp-66h] unsigned __int8 v9; // [rsp+Bh] [rbp-65h] unsigned __int8 v10; // [rsp+Bh] [rbp-65h] int v11; // [rsp+Ch] [rbp-64h] _BYTE *v12; // [rsp+10h] [rbp-60h] _BYTE *v13; // [rsp+18h] [rbp-58h] _BYTE *v14; // [rsp+20h] [rbp-50h] unsigned int v15; // [rsp+28h] [rbp-48h] unsigned long long v16; // [rsp+2Ch] [rbp-44h] int v17; // [rsp+34h] [rbp-3Ch] *a6 = 0; v14 = a2; v12 = &a2[a3]; while ( 1 ) { v8 = 0; if ( v14 < v12 ) v8 = (*(_BYTE *)(*(_QWORD *)(a1 + 64) + (unsigned __int8)*v14 + 1LL) & 8) != 0; if ( !v8 ) break; ++v14; } if ( v14 == v12 ) goto LABEL_37; if ( *v14 == 45 ) { v17 = 1; ++v14; } else { v17 = 0; if ( *v14 == 43 ) ++v14; } v13 = v14; v11 = 0; v15 = 0; while ( v14 != v12 ) { v9 = *v14; if ( (unsigned __int8)*v14 < 0x30u || v9 > 0x39u ) { if ( v9 < 0x41u || v9 > 0x5Au ) { if ( v9 < 0x61u || v9 > 0x7Au ) break; v10 = v9 - 97 + 10; } else { v10 = v9 - 65 + 10; } } else { v10 = v9 - 48; } if ( v10 >= a4 ) break; LODWORD(v16) = 0xFFFFFFFF % a4; HIDWORD(v16) = 0xFFFFFFFF / a4; if ( __PAIR64__(v15, v10) <= v16 ) v15 = v15 * a4 + v10; else v11 = 1; ++v14; } if ( v14 == v13 ) { LABEL_37: *a6 = 33; if ( a5 ) *a5 = a2; return 0LL; } else { if ( a5 ) *a5 = v14; if ( v11 ) { *a6 = 34; return 0xFFFFFFFFLL; } else if ( v17 ) { return -(long long)v15; } else { return v15; } } }
my_strntoul_8bit: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV qword ptr [RBP + -0x30],R8 MOV qword ptr [RBP + -0x38],R9 MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x60],RAX LAB_00158429: MOV RCX,qword ptr [RBP + -0x50] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x60] MOV byte ptr [RBP + -0x66],AL JNC 0x00158458 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x50] MOVZX ECX,byte ptr [RCX] MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1] AND EAX,0x8 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x66],AL LAB_00158458: MOV AL,byte ptr [RBP + -0x66] TEST AL,0x1 JNZ 0x00158461 JMP 0x00158471 LAB_00158461: JMP 0x00158463 LAB_00158463: MOV RAX,qword ptr [RBP + -0x50] ADD RAX,0x1 MOV qword ptr [RBP + -0x50],RAX JMP 0x00158429 LAB_00158471: MOV RAX,qword ptr [RBP + -0x50] CMP RAX,qword ptr [RBP + -0x60] JNZ 0x00158480 JMP 0x0015862c LAB_00158480: MOV RAX,qword ptr [RBP + -0x50] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2d JNZ 0x001584a1 MOV dword ptr [RBP + -0x3c],0x1 MOV RAX,qword ptr [RBP + -0x50] ADD RAX,0x1 MOV qword ptr [RBP + -0x50],RAX JMP 0x001584cb LAB_001584a1: MOV RAX,qword ptr [RBP + -0x50] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2b JNZ 0x001584c2 MOV dword ptr [RBP + -0x3c],0x0 MOV RAX,qword ptr [RBP + -0x50] ADD RAX,0x1 MOV qword ptr [RBP + -0x50],RAX JMP 0x001584c9 LAB_001584c2: MOV dword ptr [RBP + -0x3c],0x0 LAB_001584c9: JMP 0x001584cb LAB_001584cb: MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x58],RAX MOV EAX,0xffffffff XOR EDX,EDX DIV dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x40],EAX MOV EAX,0xffffffff XOR EDX,EDX DIV dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x44],EDX MOV dword ptr [RBP + -0x64],0x0 MOV dword ptr [RBP + -0x48],0x0 LAB_001584fb: MOV RAX,qword ptr [RBP + -0x50] CMP RAX,qword ptr [RBP + -0x60] JZ 0x001585cc MOV RAX,qword ptr [RBP + -0x50] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x65],AL MOVZX EAX,byte ptr [RBP + -0x65] CMP EAX,0x30 JL 0x00158530 MOVZX EAX,byte ptr [RBP + -0x65] CMP EAX,0x39 JG 0x00158530 MOVZX EAX,byte ptr [RBP + -0x65] SUB EAX,0x30 MOV byte ptr [RBP + -0x65],AL JMP 0x00158578 LAB_00158530: MOVZX EAX,byte ptr [RBP + -0x65] CMP EAX,0x41 JL 0x00158551 MOVZX EAX,byte ptr [RBP + -0x65] CMP EAX,0x5a JG 0x00158551 MOVZX EAX,byte ptr [RBP + -0x65] SUB EAX,0x41 ADD EAX,0xa MOV byte ptr [RBP + -0x65],AL JMP 0x00158576 LAB_00158551: MOVZX EAX,byte ptr [RBP + -0x65] CMP EAX,0x61 JL 0x00158572 MOVZX EAX,byte ptr [RBP + -0x65] CMP EAX,0x7a JG 0x00158572 MOVZX EAX,byte ptr [RBP + -0x65] SUB EAX,0x61 ADD EAX,0xa MOV byte ptr [RBP + -0x65],AL JMP 0x00158574 LAB_00158572: JMP 0x001585cc LAB_00158574: JMP 0x00158576 LAB_00158576: JMP 0x00158578 LAB_00158578: MOVZX EAX,byte ptr [RBP + -0x65] CMP EAX,dword ptr [RBP + -0x24] JL 0x00158583 JMP 0x001585cc LAB_00158583: MOV EAX,dword ptr [RBP + -0x48] CMP EAX,dword ptr [RBP + -0x40] JA 0x0015859c MOV EAX,dword ptr [RBP + -0x48] CMP EAX,dword ptr [RBP + -0x40] JNZ 0x001585a5 MOVZX EAX,byte ptr [RBP + -0x65] CMP EAX,dword ptr [RBP + -0x44] JBE 0x001585a5 LAB_0015859c: MOV dword ptr [RBP + -0x64],0x1 JMP 0x001585b9 LAB_001585a5: MOV EAX,dword ptr [RBP + -0x24] IMUL EAX,dword ptr [RBP + -0x48] MOV dword ptr [RBP + -0x48],EAX MOVZX EAX,byte ptr [RBP + -0x65] ADD EAX,dword ptr [RBP + -0x48] MOV dword ptr [RBP + -0x48],EAX LAB_001585b9: JMP 0x001585bb LAB_001585bb: MOV RAX,qword ptr [RBP + -0x50] ADD RAX,0x1 MOV qword ptr [RBP + -0x50],RAX JMP 0x001584fb LAB_001585cc: MOV RAX,qword ptr [RBP + -0x50] CMP RAX,qword ptr [RBP + -0x58] JNZ 0x001585d8 JMP 0x0015862c LAB_001585d8: CMP qword ptr [RBP + -0x30],0x0 JZ 0x001585ea MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX LAB_001585ea: CMP dword ptr [RBP + -0x64],0x0 JZ 0x00158605 MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x22 MOV EAX,0xffffffff MOV qword ptr [RBP + -0x8],RAX JMP 0x00158650 LAB_00158605: CMP dword ptr [RBP + -0x3c],0x0 JZ 0x0015861b MOV EAX,dword ptr [RBP + -0x48] MOV ECX,EAX XOR EAX,EAX SUB RAX,RCX MOV qword ptr [RBP + -0x70],RAX JMP 0x00158622 LAB_0015861b: MOV EAX,dword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x70],RAX LAB_00158622: MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x8],RAX JMP 0x00158650 LAB_0015862c: MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x21 CMP qword ptr [RBP + -0x30],0x0 JZ 0x00158648 MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX LAB_00158648: MOV qword ptr [RBP + -0x8],0x0 LAB_00158650: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
ulong my_strntoul_8bit(long param_1,byte *param_2,long param_3,uint param_4,int8 *param_5, int4 *param_6) { bool bVar1; byte *pbVar2; uint uVar3; byte *pbVar4; bool bVar5; ulong local_78; byte local_6d; byte *local_58; uint local_50; *param_6 = 0; pbVar4 = param_2 + param_3; local_58 = param_2; while( true ) { bVar5 = false; if (local_58 < pbVar4) { bVar5 = (*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*local_58) & 8) != 0; } if (!bVar5) break; local_58 = local_58 + 1; } if (local_58 != pbVar4) { if (*local_58 == 0x2d) { bVar5 = true; local_58 = local_58 + 1; } else { if (*local_58 == 0x2b) { local_58 = local_58 + 1; } bVar5 = false; } pbVar2 = local_58; uVar3 = (uint)(0xffffffff / (ulong)param_4); bVar1 = false; local_50 = 0; for (; local_58 != pbVar4; local_58 = local_58 + 1) { local_6d = *local_58; if ((local_6d < 0x30) || (0x39 < local_6d)) { if ((local_6d < 0x41) || (0x5a < local_6d)) { if ((local_6d < 0x61) || (0x7a < local_6d)) break; local_6d = local_6d + 0xa9; } else { local_6d = local_6d - 0x37; } } else { local_6d = local_6d - 0x30; } if ((int)param_4 <= (int)(uint)local_6d) break; if ((uVar3 < local_50) || ((local_50 == uVar3 && ((uint)(0xffffffff % (ulong)param_4) < (uint)local_6d)))) { bVar1 = true; } else { local_50 = (uint)local_6d + param_4 * local_50; } } if (local_58 != pbVar2) { if (param_5 != (int8 *)0x0) { *param_5 = local_58; } if (bVar1) { *param_6 = 0x22; return 0xffffffff; } if (bVar5) { local_78 = -(ulong)local_50; } else { local_78 = (ulong)local_50; } return local_78; } } *param_6 = 0x21; if (param_5 != (int8 *)0x0) { *param_5 = param_2; } return 0; }
16,618
my_thread_global_end
eloqsql/mysys/my_thr_init.c
void my_thread_global_end(void) { struct timespec abstime; my_bool all_threads_killed= 1; set_timespec(abstime, my_thread_end_wait_time); mysql_mutex_lock(&THR_LOCK_threads); while (THR_thread_count > 0) { int error= mysql_cond_timedwait(&THR_COND_threads, &THR_LOCK_threads, &abstime); if (error == ETIMEDOUT || error == ETIME) { #ifdef HAVE_PTHREAD_KILL /* We shouldn't give an error here, because if we don't have pthread_kill(), programs like mysqld can't ensure that all threads are killed when we enter here. */ if (THR_thread_count) fprintf(stderr, "Error in my_thread_global_end(): %d threads didn't exit\n", THR_thread_count); #endif all_threads_killed= 0; break; } } mysql_mutex_unlock(&THR_LOCK_threads); my_thread_destroy_common_mutex(); /* Only destroy the mutex & conditions if we don't have other threads around that could use them. */ if (all_threads_killed) { my_thread_destroy_internal_mutex(); } my_thread_global_init_done= 0; }
O0
c
my_thread_global_end: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movb $0x1, -0x11(%rbp) callq 0x3d500 movq %rax, -0x28(%rbp) imulq $0x3e8, -0x28(%rbp), %rax # imm = 0x3E8 leaq 0x1af974(%rip), %rcx # 0x1e3a18 movl (%rcx), %ecx imulq $0x3b9aca00, %rcx, %rcx # imm = 0x3B9ACA00 addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00 xorl %edx, %edx divq %rcx movq %rax, -0x10(%rbp) movq -0x20(%rbp), %rax movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00 xorl %edx, %edx divq %rcx movq %rdx, -0x8(%rbp) leaq 0x372869(%rip), %rdi # 0x3a6948 leaq 0x5755f(%rip), %rsi # 0x8b645 movl $0xce, %edx callq 0x34190 leaq 0x372651(%rip), %rax # 0x3a6748 cmpl $0x0, (%rax) jbe 0x34164 leaq 0x3728d5(%rip), %rdi # 0x3a69d8 leaq 0x37283e(%rip), %rsi # 0x3a6948 leaq -0x10(%rbp), %rdx leaq 0x57530(%rip), %rcx # 0x8b645 movl $0xd2, %r8d callq 0x34200 movl %eax, -0x2c(%rbp) cmpl $0x6e, -0x2c(%rbp) je 0x3412f cmpl $0x3e, -0x2c(%rbp) jne 0x34162 leaq 0x372612(%rip), %rax # 0x3a6748 cmpl $0x0, (%rax) je 0x3415c movq 0x1aee9e(%rip), %rax # 0x1e2fe0 movq (%rax), %rdi leaq 0x3725fc(%rip), %rax # 0x3a6748 movl (%rax), %edx leaq 0x5752d(%rip), %rsi # 0x8b682 movb $0x0, %al callq 0x25470 movb $0x0, -0x11(%rbp) jmp 0x34164 jmp 0x340f0 leaq 0x3727dd(%rip), %rdi # 0x3a6948 callq 0x34280 callq 0x33b60 cmpb $0x0, -0x11(%rbp) je 0x34180 callq 0x33c10 movb $0x0, 0x372889(%rip) # 0x3a6a10 addq $0x30, %rsp popq %rbp retq nopl (%rax)
my_thread_global_end: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_11], 1 call my_hrtime mov [rbp+var_28], rax imul rax, [rbp+var_28], 3E8h lea rcx, my_thread_end_wait_time mov ecx, [rcx] imul rcx, 3B9ACA00h add rax, rcx mov [rbp+var_20], rax mov rax, [rbp+var_20] mov ecx, 3B9ACA00h xor edx, edx div rcx mov [rbp+var_10], rax mov rax, [rbp+var_20] mov ecx, 3B9ACA00h xor edx, edx div rcx mov [rbp+var_8], rdx lea rdi, THR_LOCK_threads lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 0CEh call inline_mysql_mutex_lock_0 loc_340F0: lea rax, THR_thread_count cmp dword ptr [rax], 0 jbe short loc_34164 lea rdi, THR_COND_threads lea rsi, THR_LOCK_threads lea rdx, [rbp+var_10] lea rcx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov r8d, 0D2h call inline_mysql_cond_timedwait mov [rbp+var_2C], eax cmp [rbp+var_2C], 6Eh ; 'n' jz short loc_3412F cmp [rbp+var_2C], 3Eh ; '>' jnz short loc_34162 loc_3412F: lea rax, THR_thread_count cmp dword ptr [rax], 0 jz short loc_3415C mov rax, cs:stderr_ptr mov rdi, [rax] lea rax, THR_thread_count mov edx, [rax] lea rsi, aErrorInMyThrea; "Error in my_thread_global_end(): %d thr"... mov al, 0 call _fprintf loc_3415C: mov [rbp+var_11], 0 jmp short loc_34164 loc_34162: jmp short loc_340F0 loc_34164: lea rdi, THR_LOCK_threads call inline_mysql_mutex_unlock_0 call my_thread_destroy_common_mutex cmp [rbp+var_11], 0 jz short loc_34180 call my_thread_destroy_internal_mutex loc_34180: mov cs:my_thread_global_init_done, 0 add rsp, 30h pop rbp retn
long long my_thread_global_end() { long long result; // rax int v1; // [rsp+4h] [rbp-2Ch] unsigned long long v2; // [rsp+10h] [rbp-20h] char v3; // [rsp+1Fh] [rbp-11h] _QWORD v4[2]; // [rsp+20h] [rbp-10h] BYREF v3 = 1; v2 = 1000000000LL * my_thread_end_wait_time + 1000 * my_hrtime(); v4[0] = v2 / 0x3B9ACA00; v4[1] = v2 % 0x3B9ACA00; inline_mysql_mutex_lock_0(&THR_LOCK_threads, "/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c", 206LL); while ( THR_thread_count ) { v1 = inline_mysql_cond_timedwait( &THR_COND_threads, &THR_LOCK_threads, v4, "/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c", 210LL); if ( v1 == 110 || v1 == 62 ) { if ( THR_thread_count ) fprintf(stderr, "Error in my_thread_global_end(): %d threads didn't exit\n", THR_thread_count); v3 = 0; break; } } inline_mysql_mutex_unlock_0(&THR_LOCK_threads); result = my_thread_destroy_common_mutex(); if ( v3 ) result = my_thread_destroy_internal_mutex(); my_thread_global_init_done = 0; return result; }
my_thread_global_end: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV byte ptr [RBP + -0x11],0x1 CALL 0x0013d500 MOV qword ptr [RBP + -0x28],RAX IMUL RAX,qword ptr [RBP + -0x28],0x3e8 LEA RCX,[0x2e3a18] MOV ECX,dword ptr [RCX] IMUL RCX,RCX,0x3b9aca00 ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV ECX,0x3b9aca00 XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x20] MOV ECX,0x3b9aca00 XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x8],RDX LEA RDI,[0x4a6948] LEA RSI,[0x18b645] MOV EDX,0xce CALL 0x00134190 LAB_001340f0: LEA RAX,[0x4a6748] CMP dword ptr [RAX],0x0 JBE 0x00134164 LEA RDI,[0x4a69d8] LEA RSI,[0x4a6948] LEA RDX,[RBP + -0x10] LEA RCX,[0x18b645] MOV R8D,0xd2 CALL 0x00134200 MOV dword ptr [RBP + -0x2c],EAX CMP dword ptr [RBP + -0x2c],0x6e JZ 0x0013412f CMP dword ptr [RBP + -0x2c],0x3e JNZ 0x00134162 LAB_0013412f: LEA RAX,[0x4a6748] CMP dword ptr [RAX],0x0 JZ 0x0013415c MOV RAX,qword ptr [0x002e2fe0] MOV RDI,qword ptr [RAX] LEA RAX,[0x4a6748] MOV EDX,dword ptr [RAX] LEA RSI,[0x18b682] MOV AL,0x0 CALL 0x00125470 LAB_0013415c: MOV byte ptr [RBP + -0x11],0x0 JMP 0x00134164 LAB_00134162: JMP 0x001340f0 LAB_00134164: LEA RDI,[0x4a6948] CALL 0x00134280 CALL 0x00133b60 CMP byte ptr [RBP + -0x11],0x0 JZ 0x00134180 CALL 0x00133c10 LAB_00134180: MOV byte ptr [0x004a6a10],0x0 ADD RSP,0x30 POP RBP RET
void my_thread_global_end(void) { bool bVar1; int iVar2; long lVar3; ulong local_18; ulong local_10; bVar1 = true; lVar3 = my_hrtime(); local_10 = lVar3 * 1000 + (ulong)my_thread_end_wait_time * 1000000000; local_18 = local_10 / 1000000000; local_10 = local_10 % 1000000000; inline_mysql_mutex_lock (THR_LOCK_threads,"/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c",0xce); do { if (THR_thread_count == 0) goto LAB_00134164; iVar2 = inline_mysql_cond_timedwait (THR_COND_threads,THR_LOCK_threads,&local_18, "/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c",0xd2); } while ((iVar2 != 0x6e) && (iVar2 != 0x3e)); if (THR_thread_count != 0) { fprintf(*(FILE **)PTR_stderr_002e2fe0, "Error in my_thread_global_end(): %d threads didn\'t exit\n",(ulong)THR_thread_count); } bVar1 = false; LAB_00134164: inline_mysql_mutex_unlock(THR_LOCK_threads); my_thread_destroy_common_mutex(); if (bVar1) { my_thread_destroy_internal_mutex(); } my_thread_global_init_done = 0; return; }
16,619
copy_uca_collation
eloqsql/mysys/charset.c
static void copy_uca_collation(struct charset_info_st *to, CHARSET_INFO *from, CHARSET_INFO *loaded) { to->cset= from->cset; to->coll= from->coll; /* Single-level UCA collation have strnxfrm_multiple=8. In case of a multi-level UCA collation we use strnxfrm_multiply=4. That means MY_COLLATION_HANDLER::strnfrmlen() will request the caller to allocate a buffer smaller size for each level, for performance purpose, and to fit longer VARCHARs to @@max_sort_length. This makes filesort produce non-precise order for some rare Unicode characters that produce more than 4 weights (long expansions). UCA requires 2 bytes per weight multiplied by the number of levels. In case of a 2-level collation, each character requires 4*2=8 bytes. Therefore, the longest VARCHAR that fits into the default @@max_sort_length is 1024/8=VARCHAR(128). With strnxfrm_multiply==8, only VARCHAR(64) would fit. Note, the built-in collation utf8_thai_520_w2 also uses strnxfrm_multiply=4, for the same purpose. TODO: we could add a new LDML syntax to choose strxfrm_multiply value. */ to->strxfrm_multiply= loaded->levels_for_order > 1 ? 4 : from->strxfrm_multiply; to->min_sort_char= from->min_sort_char; to->max_sort_char= from->max_sort_char; to->mbminlen= from->mbminlen; to->mbmaxlen= from->mbmaxlen; to->caseup_multiply= from->caseup_multiply; to->casedn_multiply= from->casedn_multiply; to->state|= MY_CS_AVAILABLE | MY_CS_LOADED | MY_CS_STRNXFRM | MY_CS_UNICODE; }
O0
c
copy_uca_collation: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x10(%rbp), %rax movq 0xb8(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0xb8(%rax) movq -0x10(%rbp), %rax movq 0xc0(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0xc0(%rax) movq -0x18(%rbp), %rax movzbl 0xb2(%rax), %eax cmpl $0x1, %eax jle 0x2b176 movl $0x4, %eax movl %eax, -0x1c(%rbp) jmp 0x2b183 movq -0x10(%rbp), %rax movl 0x90(%rax), %eax movl %eax, -0x1c(%rbp) movl -0x1c(%rbp), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x90(%rax) movq -0x10(%rbp), %rax movq 0xa0(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0xa0(%rax) movq -0x10(%rbp), %rax movq 0xa8(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0xa8(%rax) movq -0x10(%rbp), %rax movl 0x98(%rax), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x98(%rax) movq -0x10(%rbp), %rax movl 0x9c(%rax), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x9c(%rax) movq -0x10(%rbp), %rax movb 0x94(%rax), %cl movq -0x8(%rbp), %rax movb %cl, 0x94(%rax) movq -0x10(%rbp), %rax movb 0x95(%rax), %cl movq -0x8(%rbp), %rax movb %cl, 0x95(%rax) movq -0x8(%rbp), %rax movl 0xc(%rax), %ecx orl $0x2c8, %ecx # imm = 0x2C8 movl %ecx, 0xc(%rax) popq %rbp retq nop
copy_uca_collation: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_10] mov rcx, [rax+0B8h] mov rax, [rbp+var_8] mov [rax+0B8h], rcx mov rax, [rbp+var_10] mov rcx, [rax+0C0h] mov rax, [rbp+var_8] mov [rax+0C0h], rcx mov rax, [rbp+var_18] movzx eax, byte ptr [rax+0B2h] cmp eax, 1 jle short loc_2B176 mov eax, 4 mov [rbp+var_1C], eax jmp short loc_2B183 loc_2B176: mov rax, [rbp+var_10] mov eax, [rax+90h] mov [rbp+var_1C], eax loc_2B183: mov ecx, [rbp+var_1C] mov rax, [rbp+var_8] mov [rax+90h], ecx mov rax, [rbp+var_10] mov rcx, [rax+0A0h] mov rax, [rbp+var_8] mov [rax+0A0h], rcx mov rax, [rbp+var_10] mov rcx, [rax+0A8h] mov rax, [rbp+var_8] mov [rax+0A8h], rcx mov rax, [rbp+var_10] mov ecx, [rax+98h] mov rax, [rbp+var_8] mov [rax+98h], ecx mov rax, [rbp+var_10] mov ecx, [rax+9Ch] mov rax, [rbp+var_8] mov [rax+9Ch], ecx mov rax, [rbp+var_10] mov cl, [rax+94h] mov rax, [rbp+var_8] mov [rax+94h], cl mov rax, [rbp+var_10] mov cl, [rax+95h] mov rax, [rbp+var_8] mov [rax+95h], cl mov rax, [rbp+var_8] mov ecx, [rax+0Ch] or ecx, 2C8h mov [rax+0Ch], ecx pop rbp retn
long long copy_uca_collation(long long a1, long long a2, long long a3) { long long result; // rax int v4; // [rsp+0h] [rbp-1Ch] *(_QWORD *)(a1 + 184) = *(_QWORD *)(a2 + 184); *(_QWORD *)(a1 + 192) = *(_QWORD *)(a2 + 192); if ( *(unsigned __int8 *)(a3 + 178) <= 1u ) v4 = *(_DWORD *)(a2 + 144); else v4 = 4; *(_DWORD *)(a1 + 144) = v4; *(_QWORD *)(a1 + 160) = *(_QWORD *)(a2 + 160); *(_QWORD *)(a1 + 168) = *(_QWORD *)(a2 + 168); *(_DWORD *)(a1 + 152) = *(_DWORD *)(a2 + 152); *(_DWORD *)(a1 + 156) = *(_DWORD *)(a2 + 156); *(_BYTE *)(a1 + 148) = *(_BYTE *)(a2 + 148); *(_BYTE *)(a1 + 149) = *(_BYTE *)(a2 + 149); result = a1; *(_DWORD *)(a1 + 12) |= 0x2C8u; return result; }
copy_uca_collation: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xb8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0xc0] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xc0],RCX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0xb2] CMP EAX,0x1 JLE 0x0012b176 MOV EAX,0x4 MOV dword ptr [RBP + -0x1c],EAX JMP 0x0012b183 LAB_0012b176: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x90] MOV dword ptr [RBP + -0x1c],EAX LAB_0012b183: MOV ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x90],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0xa0] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xa0],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0xa8] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xa8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x98] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x98],ECX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x9c] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x9c],ECX MOV RAX,qword ptr [RBP + -0x10] MOV CL,byte ptr [RAX + 0x94] MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x94],CL MOV RAX,qword ptr [RBP + -0x10] MOV CL,byte ptr [RAX + 0x95] MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x95],CL MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0xc] OR ECX,0x2c8 MOV dword ptr [RAX + 0xc],ECX POP RBP RET
void copy_uca_collation(long param_1,long param_2,long param_3) { int4 local_24; *(int8 *)(param_1 + 0xb8) = *(int8 *)(param_2 + 0xb8); *(int8 *)(param_1 + 0xc0) = *(int8 *)(param_2 + 0xc0); if (*(byte *)(param_3 + 0xb2) < 2) { local_24 = *(int4 *)(param_2 + 0x90); } else { local_24 = 4; } *(int4 *)(param_1 + 0x90) = local_24; *(int8 *)(param_1 + 0xa0) = *(int8 *)(param_2 + 0xa0); *(int8 *)(param_1 + 0xa8) = *(int8 *)(param_2 + 0xa8); *(int4 *)(param_1 + 0x98) = *(int4 *)(param_2 + 0x98); *(int4 *)(param_1 + 0x9c) = *(int4 *)(param_2 + 0x9c); *(int1 *)(param_1 + 0x94) = *(int1 *)(param_2 + 0x94); *(int1 *)(param_1 + 0x95) = *(int1 *)(param_2 + 0x95); *(uint *)(param_1 + 0xc) = *(uint *)(param_1 + 0xc) | 0x2c8; return; }
16,620
copy_uca_collation
eloqsql/mysys/charset.c
static void copy_uca_collation(struct charset_info_st *to, CHARSET_INFO *from, CHARSET_INFO *loaded) { to->cset= from->cset; to->coll= from->coll; /* Single-level UCA collation have strnxfrm_multiple=8. In case of a multi-level UCA collation we use strnxfrm_multiply=4. That means MY_COLLATION_HANDLER::strnfrmlen() will request the caller to allocate a buffer smaller size for each level, for performance purpose, and to fit longer VARCHARs to @@max_sort_length. This makes filesort produce non-precise order for some rare Unicode characters that produce more than 4 weights (long expansions). UCA requires 2 bytes per weight multiplied by the number of levels. In case of a 2-level collation, each character requires 4*2=8 bytes. Therefore, the longest VARCHAR that fits into the default @@max_sort_length is 1024/8=VARCHAR(128). With strnxfrm_multiply==8, only VARCHAR(64) would fit. Note, the built-in collation utf8_thai_520_w2 also uses strnxfrm_multiply=4, for the same purpose. TODO: we could add a new LDML syntax to choose strxfrm_multiply value. */ to->strxfrm_multiply= loaded->levels_for_order > 1 ? 4 : from->strxfrm_multiply; to->min_sort_char= from->min_sort_char; to->max_sort_char= from->max_sort_char; to->mbminlen= from->mbminlen; to->mbmaxlen= from->mbmaxlen; to->caseup_multiply= from->caseup_multiply; to->casedn_multiply= from->casedn_multiply; to->state|= MY_CS_AVAILABLE | MY_CS_LOADED | MY_CS_STRNXFRM | MY_CS_UNICODE; }
O3
c
copy_uca_collation: pushq %rbp movq %rsp, %rbp movq 0xb8(%rsi), %rax movq %rax, 0xb8(%rdi) movq 0xc0(%rsi), %rax movq %rax, 0xc0(%rdi) movl $0x4, %eax cmpb $0x1, 0xb2(%rdx) ja 0x291d7 movl 0x90(%rsi), %eax movl %eax, 0x90(%rdi) movq 0xa0(%rsi), %rax movq %rax, 0xa0(%rdi) movq 0xa8(%rsi), %rax movq %rax, 0xa8(%rdi) movl 0x98(%rsi), %eax movl %eax, 0x98(%rdi) movl 0x9c(%rsi), %eax movl %eax, 0x9c(%rdi) movb 0x94(%rsi), %al movb %al, 0x94(%rdi) movb 0x95(%rsi), %al movb %al, 0x95(%rdi) orl $0x2c8, 0xc(%rdi) # imm = 0x2C8 popq %rbp retq
copy_uca_collation: push rbp mov rbp, rsp mov rax, [rsi+0B8h] mov [rdi+0B8h], rax mov rax, [rsi+0C0h] mov [rdi+0C0h], rax mov eax, 4 cmp byte ptr [rdx+0B2h], 1 ja short loc_291D7 mov eax, [rsi+90h] loc_291D7: mov [rdi+90h], eax mov rax, [rsi+0A0h] mov [rdi+0A0h], rax mov rax, [rsi+0A8h] mov [rdi+0A8h], rax mov eax, [rsi+98h] mov [rdi+98h], eax mov eax, [rsi+9Ch] mov [rdi+9Ch], eax mov al, [rsi+94h] mov [rdi+94h], al mov al, [rsi+95h] mov [rdi+95h], al or dword ptr [rdi+0Ch], 2C8h pop rbp retn
char copy_uca_collation(long long a1, long long a2, long long a3) { int v3; // eax char result; // al *(_QWORD *)(a1 + 184) = *(_QWORD *)(a2 + 184); *(_QWORD *)(a1 + 192) = *(_QWORD *)(a2 + 192); v3 = 4; if ( *(_BYTE *)(a3 + 178) <= 1u ) v3 = *(_DWORD *)(a2 + 144); *(_DWORD *)(a1 + 144) = v3; *(_QWORD *)(a1 + 160) = *(_QWORD *)(a2 + 160); *(_QWORD *)(a1 + 168) = *(_QWORD *)(a2 + 168); *(_DWORD *)(a1 + 152) = *(_DWORD *)(a2 + 152); *(_DWORD *)(a1 + 156) = *(_DWORD *)(a2 + 156); *(_BYTE *)(a1 + 148) = *(_BYTE *)(a2 + 148); result = *(_BYTE *)(a2 + 149); *(_BYTE *)(a1 + 149) = result; *(_DWORD *)(a1 + 12) |= 0x2C8u; return result; }
copy_uca_collation: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RSI + 0xb8] MOV qword ptr [RDI + 0xb8],RAX MOV RAX,qword ptr [RSI + 0xc0] MOV qword ptr [RDI + 0xc0],RAX MOV EAX,0x4 CMP byte ptr [RDX + 0xb2],0x1 JA 0x001291d7 MOV EAX,dword ptr [RSI + 0x90] LAB_001291d7: MOV dword ptr [RDI + 0x90],EAX MOV RAX,qword ptr [RSI + 0xa0] MOV qword ptr [RDI + 0xa0],RAX MOV RAX,qword ptr [RSI + 0xa8] MOV qword ptr [RDI + 0xa8],RAX MOV EAX,dword ptr [RSI + 0x98] MOV dword ptr [RDI + 0x98],EAX MOV EAX,dword ptr [RSI + 0x9c] MOV dword ptr [RDI + 0x9c],EAX MOV AL,byte ptr [RSI + 0x94] MOV byte ptr [RDI + 0x94],AL MOV AL,byte ptr [RSI + 0x95] MOV byte ptr [RDI + 0x95],AL OR dword ptr [RDI + 0xc],0x2c8 POP RBP RET
void copy_uca_collation(long param_1,long param_2,long param_3) { int4 uVar1; *(int8 *)(param_1 + 0xb8) = *(int8 *)(param_2 + 0xb8); *(int8 *)(param_1 + 0xc0) = *(int8 *)(param_2 + 0xc0); uVar1 = 4; if (*(byte *)(param_3 + 0xb2) < 2) { uVar1 = *(int4 *)(param_2 + 0x90); } *(int4 *)(param_1 + 0x90) = uVar1; *(int8 *)(param_1 + 0xa0) = *(int8 *)(param_2 + 0xa0); *(int8 *)(param_1 + 0xa8) = *(int8 *)(param_2 + 0xa8); *(int4 *)(param_1 + 0x98) = *(int4 *)(param_2 + 0x98); *(int4 *)(param_1 + 0x9c) = *(int4 *)(param_2 + 0x9c); *(int1 *)(param_1 + 0x94) = *(int1 *)(param_2 + 0x94); *(int1 *)(param_1 + 0x95) = *(int1 *)(param_2 + 0x95); *(uint *)(param_1 + 0xc) = *(uint *)(param_1 + 0xc) | 0x2c8; return; }
16,621
moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>, moodycamel::ConcurrentQueueDefaultTraits>::ConcurrentQueue(unsigned long)
AlayaLite/build_O0/_deps/concurrentqueue-src/concurrentqueue.h
explicit ConcurrentQueue(size_t capacity = 32 * BLOCK_SIZE) : producerListTail(nullptr), producerCount(0), initialBlockPoolIndex(0), nextExplicitConsumerId(0), globalExplicitConsumerOffset(0) { implicitProducerHashResizeInProgress.clear(std::memory_order_relaxed); populate_initial_implicit_producer_hash(); populate_initial_block_list(capacity / BLOCK_SIZE + ((capacity & (BLOCK_SIZE - 1)) == 0 ? 0 : 1)); #ifdef MOODYCAMEL_QUEUE_INTERNAL_DEBUG // Track all the producers using a fully-resolved typed list for // each kind; this makes it possible to debug them starting from // the root queue object (otherwise wacky casts are needed that // don't compile in the debugger's expression evaluator). explicitProducers.store(nullptr, std::memory_order_relaxed); implicitProducers.store(nullptr, std::memory_order_relaxed); #endif }
O0
c
moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>, moodycamel::ConcurrentQueueDefaultTraits>::ConcurrentQueue(unsigned long): subq $0x58, %rsp movq %rdi, 0x40(%rsp) movq %rsi, 0x38(%rsp) movq 0x40(%rsp), %rdi movq %rdi, 0x10(%rsp) xorl %eax, %eax movl %eax, 0x1c(%rsp) movl %eax, %esi movq %rsi, 0x8(%rsp) callq 0x68250 movq 0x10(%rsp), %rdi movl 0x1c(%rsp), %esi addq $0x8, %rdi callq 0x37bf0 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdi addq $0x10, %rdi callq 0x2d9b0 movq 0x10(%rsp), %rdi addq $0x28, %rdi callq 0x68280 movq 0x10(%rsp), %rdi addq $0x30, %rdi callq 0x682a0 movq 0x10(%rsp), %rdi addq $0x38, %rdi callq 0x682b0 movq 0x10(%rsp), %rdi addq $0x58, %rdi callq 0x682c0 movq 0x10(%rsp), %rdi addq $0x258, %rdi # imm = 0x258 movq %rdi, 0x20(%rsp) callq 0x68310 movq 0x10(%rsp), %rdi movl 0x1c(%rsp), %esi addq $0x25c, %rdi # imm = 0x25C callq 0x37bf0 movq 0x10(%rsp), %rdi movl 0x1c(%rsp), %esi addq $0x260, %rdi # imm = 0x260 callq 0x37bf0 movq 0x20(%rsp), %rax movq %rax, 0x50(%rsp) movl $0x0, 0x4c(%rsp) movq 0x50(%rsp), %rax movq %rax, 0x28(%rsp) movl 0x4c(%rsp), %edi movl $0xffff, %esi # imm = 0xFFFF callq 0x24460 movl %eax, 0x34(%rsp) jmp 0x681c7 movl 0x34(%rsp), %eax movl %eax, 0x48(%rsp) movl 0x4c(%rsp), %eax movl %eax, 0x4(%rsp) subl $0x3, %eax je 0x681f3 jmp 0x681de movl 0x4(%rsp), %eax subl $0x5, %eax je 0x681fd jmp 0x681e9 movq 0x28(%rsp), %rax movb $0x0, (%rax) jmp 0x68210 movq 0x28(%rsp), %rax movb $0x0, (%rax) jmp 0x68210 movq 0x28(%rsp), %rcx xorl %eax, %eax xchgb %al, (%rcx) jmp 0x68210 movq %rax, %rdi callq 0x1f240 movq 0x10(%rsp), %rdi callq 0x68320 movq 0x10(%rsp), %rdi movq 0x38(%rsp), %rsi shrq $0x5, %rsi movq 0x38(%rsp), %rdx andq $0x1f, %rdx movl $0x1, %eax xorl %ecx, %ecx cmpq $0x0, %rdx cmovel %ecx, %eax cltq addq %rax, %rsi callq 0x684e0 addq $0x58, %rsp retq nop
_ZN10moodycamel15ConcurrentQueueINSt7__n486116coroutine_handleIvEENS_28ConcurrentQueueDefaultTraitsEEC2Em: sub rsp, 58h mov [rsp+58h+var_18], rdi mov [rsp+58h+var_20], rsi mov rdi, [rsp+58h+var_18] mov [rsp+58h+var_48], rdi xor eax, eax mov [rsp+58h+var_3C], eax mov esi, eax mov [rsp+58h+var_50], rsi call _ZNSt6atomicIPN10moodycamel15ConcurrentQueueINSt7__n486116coroutine_handleIvEENS0_28ConcurrentQueueDefaultTraitsEE12ProducerBaseEEC2ES8_; std::atomic<moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ProducerBase *>::atomic(moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ProducerBase *) mov rdi, [rsp+58h+var_48] mov esi, [rsp+58h+var_3C] add rdi, 8 call _ZNSt6atomicIjEC2Ej; std::atomic<uint>::atomic(uint) mov rsi, [rsp+58h+var_50] mov rdi, [rsp+58h+var_48] add rdi, 10h call _ZNSt6atomicImEC2Em; std::atomic<ulong>::atomic(ulong) mov rdi, [rsp+58h+var_48] add rdi, 28h ; '(' call _ZN10moodycamel15ConcurrentQueueINSt7__n486116coroutine_handleIvEENS_28ConcurrentQueueDefaultTraitsEE8FreeListINS5_5BlockEEC2Ev; moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::FreeList<moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::Block>::FreeList(void) mov rdi, [rsp+58h+var_48] add rdi, 30h ; '0' call _ZNSt6atomicIPN10moodycamel15ConcurrentQueueINSt7__n486116coroutine_handleIvEENS0_28ConcurrentQueueDefaultTraitsEE20ImplicitProducerHashEEC2Ev; std::atomic<moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducerHash *>::atomic(void) mov rdi, [rsp+58h+var_48] add rdi, 38h ; '8' call _ZNSt6atomicImEC2Ev; std::atomic<ulong>::atomic(void) mov rdi, [rsp+58h+var_48] add rdi, 58h ; 'X' call _ZNSt5arrayIN10moodycamel15ConcurrentQueueINSt7__n486116coroutine_handleIvEENS0_28ConcurrentQueueDefaultTraitsEE19ImplicitProducerKVPELm32EEC2Ev; std::array<moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducerKVP,32ul>::array(void) mov rdi, [rsp+58h+var_48] add rdi, 258h; this mov [rsp+58h+var_38], rdi call _ZNSt11atomic_flagC2Ev; std::atomic_flag::atomic_flag(void) mov rdi, [rsp+58h+var_48] mov esi, [rsp+58h+var_3C] add rdi, 25Ch call _ZNSt6atomicIjEC2Ej; std::atomic<uint>::atomic(uint) mov rdi, [rsp+58h+var_48] mov esi, [rsp+58h+var_3C] add rdi, 260h call _ZNSt6atomicIjEC2Ej; std::atomic<uint>::atomic(uint) mov rax, [rsp+58h+var_38] mov [rsp+58h+var_8], rax mov [rsp+58h+var_C], 0 mov rax, [rsp+58h+var_8] mov [rsp+58h+var_30], rax mov edi, [rsp+58h+var_C] mov esi, 0FFFFh call _ZStanSt12memory_orderSt23__memory_order_modifier; std::operator&(std::memory_order,std::__memory_order_modifier) mov [rsp+58h+var_24], eax jmp short $+2 loc_681C7: mov eax, [rsp+58h+var_24] mov [rsp+58h+var_10], eax mov eax, [rsp+58h+var_C] mov [rsp+58h+var_54], eax sub eax, 3 jz short loc_681F3 jmp short $+2 loc_681DE: mov eax, [rsp+58h+var_54] sub eax, 5 jz short loc_681FD jmp short $+2 loc_681E9: mov rax, [rsp+58h+var_30] mov byte ptr [rax], 0 jmp short loc_68210 loc_681F3: mov rax, [rsp+58h+var_30] mov byte ptr [rax], 0 jmp short loc_68210 loc_681FD: mov rcx, [rsp+58h+var_30] xor eax, eax xchg al, [rcx] jmp short loc_68210 mov rdi, rax call __clang_call_terminate loc_68210: mov rdi, [rsp+58h+var_48] call _ZN10moodycamel15ConcurrentQueueINSt7__n486116coroutine_handleIvEENS_28ConcurrentQueueDefaultTraitsEE39populate_initial_implicit_producer_hashEv; moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::populate_initial_implicit_producer_hash(void) mov rdi, [rsp+58h+var_48] mov rsi, [rsp+58h+var_20] shr rsi, 5 mov rdx, [rsp+58h+var_20] and rdx, 1Fh mov eax, 1 xor ecx, ecx cmp rdx, 0 cmovz eax, ecx cdqe add rsi, rax call _ZN10moodycamel15ConcurrentQueueINSt7__n486116coroutine_handleIvEENS_28ConcurrentQueueDefaultTraitsEE27populate_initial_block_listEm; moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::populate_initial_block_list(ulong) add rsp, 58h retn
long long moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ConcurrentQueue( long long a1, unsigned long long a2) { std::atomic<moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ProducerBase *>::atomic(); std::atomic<unsigned int>::atomic(a1 + 8, 0); std::atomic<unsigned long>::atomic(a1 + 16, 0LL); moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::FreeList<moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::Block>::FreeList(a1 + 40); std::atomic<moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducerHash *>::atomic(a1 + 48); std::atomic<unsigned long>::atomic(a1 + 56); std::array<moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducerKVP,32ul>::array(a1 + 88); std::atomic_flag::atomic_flag((std::atomic_flag *)(a1 + 600)); std::atomic<unsigned int>::atomic(a1 + 604, 0); std::atomic<unsigned int>::atomic(a1 + 608, 0); std::operator&(0, 0xFFFF); *(_BYTE *)(a1 + 600) = 0; moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::populate_initial_implicit_producer_hash(a1); return moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::populate_initial_block_list( a1, ((a2 & 0x1F) != 0) + (a2 >> 5)); }
ConcurrentQueue: SUB RSP,0x58 MOV qword ptr [RSP + 0x40],RDI MOV qword ptr [RSP + 0x38],RSI MOV RDI,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x10],RDI XOR EAX,EAX MOV dword ptr [RSP + 0x1c],EAX MOV ESI,EAX MOV qword ptr [RSP + 0x8],RSI CALL 0x00168250 MOV RDI,qword ptr [RSP + 0x10] MOV ESI,dword ptr [RSP + 0x1c] ADD RDI,0x8 CALL 0x00137bf0 MOV RSI,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x10 CALL 0x0012d9b0 MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x28 CALL 0x00168280 MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x30 CALL 0x001682a0 MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x38 CALL 0x001682b0 MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x58 CALL 0x001682c0 MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x258 MOV qword ptr [RSP + 0x20],RDI CALL 0x00168310 MOV RDI,qword ptr [RSP + 0x10] MOV ESI,dword ptr [RSP + 0x1c] ADD RDI,0x25c CALL 0x00137bf0 MOV RDI,qword ptr [RSP + 0x10] MOV ESI,dword ptr [RSP + 0x1c] ADD RDI,0x260 CALL 0x00137bf0 MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x50],RAX MOV dword ptr [RSP + 0x4c],0x0 MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x28],RAX MOV EDI,dword ptr [RSP + 0x4c] LAB_001681b7: MOV ESI,0xffff CALL 0x00124460 LAB_001681c1: MOV dword ptr [RSP + 0x34],EAX JMP 0x001681c7 LAB_001681c7: MOV EAX,dword ptr [RSP + 0x34] MOV dword ptr [RSP + 0x48],EAX MOV EAX,dword ptr [RSP + 0x4c] MOV dword ptr [RSP + 0x4],EAX SUB EAX,0x3 JZ 0x001681f3 JMP 0x001681de LAB_001681de: MOV EAX,dword ptr [RSP + 0x4] SUB EAX,0x5 JZ 0x001681fd JMP 0x001681e9 LAB_001681e9: MOV RAX,qword ptr [RSP + 0x28] MOV byte ptr [RAX],0x0 JMP 0x00168210 LAB_001681f3: MOV RAX,qword ptr [RSP + 0x28] MOV byte ptr [RAX],0x0 JMP 0x00168210 LAB_001681fd: MOV RCX,qword ptr [RSP + 0x28] XOR EAX,EAX XCHG byte ptr [RCX],AL JMP 0x00168210 LAB_00168210: MOV RDI,qword ptr [RSP + 0x10] CALL 0x00168320 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x38] SHR RSI,0x5 MOV RDX,qword ptr [RSP + 0x38] AND RDX,0x1f MOV EAX,0x1 XOR ECX,ECX CMP RDX,0x0 CMOVZ EAX,ECX CDQE ADD RSI,RAX CALL 0x001684e0 ADD RSP,0x58 RET
/* WARNING: Removing unreachable block (ram,0x001681fd) */ /* WARNING: Removing unreachable block (ram,0x001681f3) */ /* moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>, moodycamel::ConcurrentQueueDefaultTraits>::ConcurrentQueue(unsigned long) */ void __thiscall moodycamel:: ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>:: ConcurrentQueue(ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits> *this,ulong param_1) { std:: atomic<moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ProducerBase*> ::atomic((atomic<moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ProducerBase*> *)this,(ProducerBase *)0x0); std::atomic<unsigned_int>::atomic((atomic<unsigned_int> *)(this + 8),0); std::atomic<unsigned_long>::atomic((atomic<unsigned_long> *)(this + 0x10),0); FreeList<moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::Block> ::FreeList((FreeList<moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::Block> *)(this + 0x28)); std:: atomic<moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducerHash*> ::atomic((atomic<moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducerHash*> *)(this + 0x30)); std::atomic<unsigned_long>::atomic((atomic<unsigned_long> *)(this + 0x38)); std:: array<moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducerKVP,32ul> ::array((array<moodycamel::ConcurrentQueue<std::__n4861::coroutine_handle<void>,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducerKVP,32ul> *)(this + 0x58)); std::atomic_flag::atomic_flag((atomic_flag *)(this + 600)); std::atomic<unsigned_int>::atomic((atomic<unsigned_int> *)(this + 0x25c),0); std::atomic<unsigned_int>::atomic((atomic<unsigned_int> *)(this + 0x260),0); /* try { // try from 001681b7 to 001681c0 has its CatchHandler @ 00168208 */ std::operator&(0,0xffff); *(atomic_flag *)(this + 600) = (atomic_flag)0x0; populate_initial_implicit_producer_hash(this); populate_initial_block_list(this,(param_1 >> 5) + (long)(int)(uint)((param_1 & 0x1f) != 0)); return; }
16,622
my_default_csname
eloqsql/mysys/charset.c
const char* my_default_csname() { const char* csname = NULL; #ifdef _WIN32 char cpbuf[64]; int cp = GetConsoleCP(); if (cp == 0) cp = GetACP(); snprintf(cpbuf, sizeof(cpbuf), "cp%d", (int)cp); csname = my_os_charset_to_mysql_charset(cpbuf); #elif defined(HAVE_SETLOCALE) && defined(HAVE_NL_LANGINFO) if (setlocale(LC_CTYPE, "") && (csname = nl_langinfo(CODESET))) csname = my_os_charset_to_mysql_charset(csname); #endif return csname ? csname : MYSQL_DEFAULT_CHARSET_NAME; }
O0
c
my_default_csname: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq $0x0, -0x8(%rbp) xorl %edi, %edi leaq 0x55c95(%rip), %rsi # 0x8394e callq 0x24260 cmpq $0x0, %rax je 0x2dce5 movl $0xe, %edi callq 0x242a0 movq %rax, -0x8(%rbp) cmpq $0x0, %rax je 0x2dce5 movq -0x8(%rbp), %rdi callq 0x2dd10 movq %rax, -0x8(%rbp) cmpq $0x0, -0x8(%rbp) je 0x2dcf6 movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) jmp 0x2dd03 leaq 0x5212f(%rip), %rax # 0x7fe2c movq %rax, -0x10(%rbp) jmp 0x2dd03 movq -0x10(%rbp), %rax addq $0x10, %rsp popq %rbp retq nopl (%rax)
my_default_csname: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], 0 xor edi, edi lea rsi, asc_8394A+4; "" call _setlocale cmp rax, 0 jz short loc_2DCE5 mov edi, 0Eh call _nl_langinfo mov [rbp+var_8], rax cmp rax, 0 jz short loc_2DCE5 mov rdi, [rbp+var_8] call my_os_charset_to_mysql_charset mov [rbp+var_8], rax loc_2DCE5: cmp [rbp+var_8], 0 jz short loc_2DCF6 mov rax, [rbp+var_8] mov [rbp+var_10], rax jmp short loc_2DD03 loc_2DCF6: lea rax, aLatin1; "latin1" mov [rbp+var_10], rax jmp short $+2 loc_2DD03: mov rax, [rbp+var_10] add rsp, 10h pop rbp retn
const char *my_default_csname() { long long v2; // [rsp+8h] [rbp-8h] v2 = 0LL; if ( setlocale(0LL, "") ) { v2 = nl_langinfo(14LL); if ( v2 ) v2 = my_os_charset_to_mysql_charset(v2); } if ( v2 ) return (const char *)v2; else return "latin1"; }
my_default_csname: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],0x0 XOR EDI,EDI LEA RSI,[0x18394e] CALL 0x00124260 CMP RAX,0x0 JZ 0x0012dce5 MOV EDI,0xe CALL 0x001242a0 MOV qword ptr [RBP + -0x8],RAX CMP RAX,0x0 JZ 0x0012dce5 MOV RDI,qword ptr [RBP + -0x8] CALL 0x0012dd10 MOV qword ptr [RBP + -0x8],RAX LAB_0012dce5: CMP qword ptr [RBP + -0x8],0x0 JZ 0x0012dcf6 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX JMP 0x0012dd03 LAB_0012dcf6: LEA RAX,[0x17fe2c] MOV qword ptr [RBP + -0x10],RAX JMP 0x0012dd03 LAB_0012dd03: MOV RAX,qword ptr [RBP + -0x10] ADD RSP,0x10 POP RBP RET
char * my_default_csname(void) { char *pcVar1; char *local_18; char *local_10; local_10 = (char *)0x0; pcVar1 = setlocale(0,""); if (pcVar1 != (char *)0x0) { local_10 = nl_langinfo(0xe); if (local_10 != (char *)0x0) { local_10 = (char *)my_os_charset_to_mysql_charset(local_10); } } if (local_10 == (char *)0x0) { local_18 = "latin1"; } else { local_18 = local_10; } return local_18; }
16,623
lunasvg::SVGPatternElement::applyPaint(lunasvg::SVGRenderState&, float) const
dmazzella[P]pylunasvg/lunasvg/source/svgpaintelement.cpp
bool SVGPatternElement::applyPaint(SVGRenderState& state, float opacity) const { if(state.hasCycleReference(this)) return false; auto attributes = collectPatternAttributes(); auto patternContentElement = attributes.patternContentElement(); if(patternContentElement == nullptr) return false; LengthContext lengthContext(this, attributes.patternUnits()); Rect patternRect = { lengthContext.valueForLength(attributes.x()), lengthContext.valueForLength(attributes.y()), lengthContext.valueForLength(attributes.width()), lengthContext.valueForLength(attributes.height()) }; if(attributes.patternUnits() == Units::ObjectBoundingBox) { auto bbox = state.fillBoundingBox(); patternRect.x = patternRect.x * bbox.w + bbox.x; patternRect.y = patternRect.y * bbox.h + bbox.y; patternRect.w = patternRect.w * bbox.w; patternRect.h = patternRect.h * bbox.h; } auto currentTransform = attributes.patternTransform() * state.currentTransform(); auto xScale = currentTransform.xScale(); auto yScale = currentTransform.yScale(); auto patternImage = Canvas::create(0, 0, patternRect.w * xScale, patternRect.h * yScale); auto patternImageTransform = Transform::scaled(xScale, yScale); const auto& viewBoxRect = attributes.viewBox(); if(viewBoxRect.isValid()) { const auto& preserveAspectRatio = attributes.preserveAspectRatio(); patternImageTransform.multiply(preserveAspectRatio.getTransform(viewBoxRect, patternRect.size())); } else if(attributes.patternContentUnits() == Units::ObjectBoundingBox) { auto bbox = state.fillBoundingBox(); patternImageTransform.scale(bbox.w, bbox.h); } SVGRenderState newState(this, &state, patternImageTransform, SVGRenderMode::Painting, patternImage); patternContentElement->renderChildren(newState); auto patternTransform = attributes.patternTransform(); patternTransform.translate(patternRect.x, patternRect.y); patternTransform.scale(1.f / xScale, 1.f / yScale); state->setTexture(*patternImage, TextureType::Tiled, opacity, patternTransform); return true; }
O0
cpp
lunasvg::SVGPatternElement::applyPaint(lunasvg::SVGRenderState&, float) const: pushq %rbp movq %rsp, %rbp subq $0x260, %rsp # imm = 0x260 movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movss %xmm0, -0x1c(%rbp) movq -0x10(%rbp), %rsi movq %rsi, -0x1b8(%rbp) movq -0x18(%rbp), %rdi callq 0x4c970 testb $0x1, %al jne 0x369f2 jmp 0x369fb movb $0x0, -0x1(%rbp) jmp 0x36f48 movq -0x1b8(%rbp), %rsi leaq -0x70(%rbp), %rdi callq 0x36f70 leaq -0x70(%rbp), %rdi callq 0x37e90 movq %rax, -0x78(%rbp) cmpq $0x0, -0x78(%rbp) jne 0x36a28 movb $0x0, -0x1(%rbp) jmp 0x36f48 leaq -0x70(%rbp), %rdi callq 0x37eb0 movq -0x1b8(%rbp), %rsi leaq -0x88(%rbp), %rdi movzbl %al, %edx callq 0x20050 leaq -0x70(%rbp), %rdi callq 0x37ee0 movq %rax, %rsi leaq -0x88(%rbp), %rdi callq 0x20080 movss %xmm0, -0x1bc(%rbp) leaq -0x70(%rbp), %rdi callq 0x37f00 movq %rax, %rsi leaq -0x88(%rbp), %rdi callq 0x20080 movss %xmm0, -0x1c4(%rbp) leaq -0x70(%rbp), %rdi callq 0x37f20 movq %rax, %rsi leaq -0x88(%rbp), %rdi callq 0x20080 movss %xmm0, -0x1c0(%rbp) leaq -0x70(%rbp), %rdi callq 0x37f40 movq %rax, %rsi leaq -0x88(%rbp), %rdi callq 0x20080 movss -0x1c4(%rbp), %xmm1 movss -0x1c0(%rbp), %xmm2 movaps %xmm0, %xmm3 movss -0x1bc(%rbp), %xmm0 leaq -0x98(%rbp), %rdi callq 0x14ee0 leaq -0x70(%rbp), %rdi callq 0x37eb0 cmpb $0x1, %al jne 0x36b90 movq -0x18(%rbp), %rdi callq 0x21650 movlpd %xmm0, -0xa8(%rbp) movlpd %xmm1, -0xa0(%rbp) movss -0x98(%rbp), %xmm0 movss -0xa0(%rbp), %xmm2 movss -0xa8(%rbp), %xmm1 mulss %xmm2, %xmm0 addss %xmm1, %xmm0 movss %xmm0, -0x98(%rbp) movss -0x94(%rbp), %xmm0 movss -0x9c(%rbp), %xmm2 movss -0xa4(%rbp), %xmm1 mulss %xmm2, %xmm0 addss %xmm1, %xmm0 movss %xmm0, -0x94(%rbp) movss -0x90(%rbp), %xmm0 mulss -0xa0(%rbp), %xmm0 movss %xmm0, -0x90(%rbp) movss -0x8c(%rbp), %xmm0 mulss -0x9c(%rbp), %xmm0 movss %xmm0, -0x8c(%rbp) leaq -0x70(%rbp), %rdi callq 0x37f60 movq %rax, -0x1d8(%rbp) movq -0x18(%rbp), %rdi callq 0x20eb0 movq -0x1d8(%rbp), %rsi movq %rax, %rdx leaq -0xc0(%rbp), %rdi movq %rdi, -0x1d0(%rbp) callq 0x11850 movq -0x1d0(%rbp), %rdi callq 0x11f80 movq -0x1d0(%rbp), %rdi movss %xmm0, -0xc4(%rbp) callq 0x11fc0 movss %xmm0, -0xc8(%rbp) movss -0xc4(%rbp), %xmm0 movss -0x90(%rbp), %xmm2 movss -0x8c(%rbp), %xmm3 mulss %xmm0, %xmm2 movss -0xc8(%rbp), %xmm0 mulss %xmm0, %xmm3 leaq -0xd8(%rbp), %rdi xorps %xmm1, %xmm1 movaps %xmm1, %xmm0 callq 0x134c0 movss -0xc4(%rbp), %xmm0 movss -0xc8(%rbp), %xmm1 leaq -0xf0(%rbp), %rdi callq 0x11a00 jmp 0x36c46 leaq -0x70(%rbp), %rdi callq 0x37f90 movq %rax, -0x1e0(%rbp) jmp 0x36c58 movq -0x1e0(%rbp), %rax movq %rax, -0x108(%rbp) movq -0x108(%rbp), %rdi callq 0x14530 movb %al, -0x1e1(%rbp) jmp 0x36c7a movb -0x1e1(%rbp), %al testb $0x1, %al jne 0x36c89 jmp 0x36d3d leaq -0x70(%rbp), %rdi callq 0x37fc0 movq %rax, -0x1f0(%rbp) jmp 0x36c9b movq -0x1f0(%rbp), %rax movq %rax, -0x110(%rbp) movq -0x110(%rbp), %rax movq %rax, -0x210(%rbp) movq -0x108(%rbp), %rax movq %rax, -0x208(%rbp) leaq -0x98(%rbp), %rdi callq 0x1fff0 movaps %xmm0, -0x200(%rbp) jmp 0x36cda movq -0x208(%rbp), %rdx movq -0x210(%rbp), %rsi movaps -0x200(%rbp), %xmm0 movlpd %xmm0, -0x130(%rbp) leaq -0x128(%rbp), %rdi leaq -0x130(%rbp), %rcx callq 0x4a860 jmp 0x36d0c leaq -0xf0(%rbp), %rdi leaq -0x128(%rbp), %rsi callq 0x118e0 jmp 0x36d21 jmp 0x36db1 movq %rax, %rcx movl %edx, %eax movq %rcx, -0xf8(%rbp) movl %eax, -0xfc(%rbp) jmp 0x36f3a leaq -0x70(%rbp), %rdi callq 0x37ff0 movb %al, -0x211(%rbp) jmp 0x36d4e movb -0x211(%rbp), %al cmpb $0x1, %al jne 0x36daf movq -0x18(%rbp), %rdi callq 0x21650 movaps %xmm1, -0x240(%rbp) movaps %xmm0, -0x230(%rbp) jmp 0x36d71 movaps -0x240(%rbp), %xmm0 movaps -0x230(%rbp), %xmm1 movlpd %xmm1, -0x140(%rbp) movlpd %xmm0, -0x138(%rbp) movss -0x138(%rbp), %xmm0 movss -0x134(%rbp), %xmm1 leaq -0xf0(%rbp), %rdi callq 0x119b0 jmp 0x36dad jmp 0x36daf jmp 0x36db1 movq -0x18(%rbp), %rax movq %rax, -0x250(%rbp) leaq -0x190(%rbp), %rdi movq %rdi, -0x248(%rbp) leaq -0xd8(%rbp), %rsi callq 0xe750 movq -0x1b8(%rbp), %rsi movq -0x250(%rbp), %rdx movq -0x248(%rbp), %r9 leaq -0x180(%rbp), %rdi leaq -0xf0(%rbp), %rcx xorl %r8d, %r8d callq 0xe780 jmp 0x36e03 leaq -0x190(%rbp), %rdi callq 0xe7f0 movq -0x78(%rbp), %rdi leaq -0x180(%rbp), %rsi callq 0x1a060 jmp 0x36e21 leaq -0x70(%rbp), %rdi callq 0x37f60 movq %rax, -0x258(%rbp) jmp 0x36e33 movq -0x258(%rbp), %rax movq 0x10(%rax), %rcx movq %rcx, -0x1a0(%rbp) movups (%rax), %xmm0 movaps %xmm0, -0x1b0(%rbp) movss -0x98(%rbp), %xmm0 movss -0x94(%rbp), %xmm1 leaq -0x1b0(%rbp), %rdi callq 0x11910 jmp 0x36e6d movss -0xc4(%rbp), %xmm2 movss 0x5524b(%rip), %xmm1 # 0x8c0c8 movaps %xmm1, %xmm0 divss %xmm2, %xmm0 movss -0xc8(%rbp), %xmm2 divss %xmm2, %xmm1 leaq -0x1b0(%rbp), %rdi callq 0x119b0 jmp 0x36e9e movq -0x18(%rbp), %rdi callq 0x20750 movq %rax, -0x260(%rbp) jmp 0x36eb0 leaq -0xd8(%rbp), %rdi callq 0x216b0 movq -0x260(%rbp), %rdi movq %rax, %rsi movss -0x1c(%rbp), %xmm0 movl $0x1, %edx leaq -0x1b0(%rbp), %rcx callq 0x13900 jmp 0x36ede movb $0x1, -0x1(%rbp) leaq -0x180(%rbp), %rdi callq 0xe810 leaq -0xd8(%rbp), %rdi callq 0xe7f0 jmp 0x36f48 movq %rax, %rcx movl %edx, %eax movq %rcx, -0xf8(%rbp) movl %eax, -0xfc(%rbp) leaq -0x190(%rbp), %rdi callq 0xe7f0 jmp 0x36f3a movq %rax, %rcx movl %edx, %eax movq %rcx, -0xf8(%rbp) movl %eax, -0xfc(%rbp) leaq -0x180(%rbp), %rdi callq 0xe810 leaq -0xd8(%rbp), %rdi callq 0xe7f0 jmp 0x36f56 movb -0x1(%rbp), %al andb $0x1, %al addq $0x260, %rsp # imm = 0x260 popq %rbp retq movq -0xf8(%rbp), %rdi callq 0xb6c0 nopw %cs:(%rax,%rax)
_ZNK7lunasvg17SVGPatternElement10applyPaintERNS_14SVGRenderStateEf: push rbp mov rbp, rsp sub rsp, 260h mov [rbp+var_10], rdi mov [rbp+var_18], rsi movss [rbp+var_1C], xmm0 mov rsi, [rbp+var_10]; lunasvg::SVGElement * mov [rbp+var_1B8], rsi mov rdi, [rbp+var_18]; this call _ZNK7lunasvg14SVGRenderState17hasCycleReferenceEPKNS_10SVGElementE; lunasvg::SVGRenderState::hasCycleReference(lunasvg::SVGElement const*) test al, 1 jnz short loc_369F2 jmp short loc_369FB loc_369F2: mov [rbp+var_1], 0 jmp loc_36F48 loc_369FB: mov rsi, [rbp+var_1B8] lea rdi, [rbp+var_70]; this call _ZNK7lunasvg17SVGPatternElement24collectPatternAttributesEv; lunasvg::SVGPatternElement::collectPatternAttributes(void) lea rdi, [rbp+var_70]; this call _ZNK7lunasvg20SVGPatternAttributes21patternContentElementEv; lunasvg::SVGPatternAttributes::patternContentElement(void) mov [rbp+var_78], rax cmp [rbp+var_78], 0 jnz short loc_36A28 mov [rbp+var_1], 0 jmp loc_36F48 loc_36A28: lea rdi, [rbp+var_70]; this call _ZNK7lunasvg20SVGPatternAttributes12patternUnitsEv; lunasvg::SVGPatternAttributes::patternUnits(void) mov rsi, [rbp+var_1B8] lea rdi, [rbp+var_88] movzx edx, al call _ZN7lunasvg13LengthContextC2EPKNS_10SVGElementENS_5UnitsE; lunasvg::LengthContext::LengthContext(lunasvg::SVGElement const*,lunasvg::Units) lea rdi, [rbp+var_70]; this call _ZNK7lunasvg20SVGPatternAttributes1xEv; lunasvg::SVGPatternAttributes::x(void) mov rsi, rax; lunasvg::SVGLength * lea rdi, [rbp+var_88]; this call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_9SVGLengthE; lunasvg::LengthContext::valueForLength(lunasvg::SVGLength const&) movss [rbp+var_1BC], xmm0 lea rdi, [rbp+var_70]; this call _ZNK7lunasvg20SVGPatternAttributes1yEv; lunasvg::SVGPatternAttributes::y(void) mov rsi, rax; lunasvg::SVGLength * lea rdi, [rbp+var_88]; this call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_9SVGLengthE; lunasvg::LengthContext::valueForLength(lunasvg::SVGLength const&) movss [rbp+var_1C4], xmm0 lea rdi, [rbp+var_70]; this call _ZNK7lunasvg20SVGPatternAttributes5widthEv; lunasvg::SVGPatternAttributes::width(void) mov rsi, rax; lunasvg::SVGLength * lea rdi, [rbp+var_88]; this call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_9SVGLengthE; lunasvg::LengthContext::valueForLength(lunasvg::SVGLength const&) movss [rbp+var_1C0], xmm0 lea rdi, [rbp+var_70]; this call _ZNK7lunasvg20SVGPatternAttributes6heightEv; lunasvg::SVGPatternAttributes::height(void) mov rsi, rax; lunasvg::SVGLength * lea rdi, [rbp+var_88]; this call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_9SVGLengthE; lunasvg::LengthContext::valueForLength(lunasvg::SVGLength const&) movss xmm1, [rbp+var_1C4]; float movss xmm2, [rbp+var_1C0]; float movaps xmm3, xmm0; float movss xmm0, [rbp+var_1BC]; float lea rdi, [rbp+var_98]; this call _ZN7lunasvg4RectC2Effff; lunasvg::Rect::Rect(float,float,float,float) lea rdi, [rbp+var_70]; this call _ZNK7lunasvg20SVGPatternAttributes12patternUnitsEv; lunasvg::SVGPatternAttributes::patternUnits(void) cmp al, 1 jnz loc_36B90 mov rdi, [rbp+var_18]; this call _ZNK7lunasvg14SVGRenderState15fillBoundingBoxEv; lunasvg::SVGRenderState::fillBoundingBox(void) movlpd [rbp+var_A8], xmm0 movlpd [rbp+var_A0], xmm1 movss xmm0, [rbp+var_98] movss xmm2, dword ptr [rbp+var_A0] movss xmm1, dword ptr [rbp+var_A8] mulss xmm0, xmm2 addss xmm0, xmm1 movss [rbp+var_98], xmm0 movss xmm0, [rbp+var_94] movss xmm2, dword ptr [rbp+var_A0+4] movss xmm1, dword ptr [rbp+var_A8+4] mulss xmm0, xmm2 addss xmm0, xmm1 movss [rbp+var_94], xmm0 movss xmm0, [rbp+var_90] mulss xmm0, dword ptr [rbp+var_A0] movss [rbp+var_90], xmm0 movss xmm0, [rbp+var_8C] mulss xmm0, dword ptr [rbp+var_A0+4] movss [rbp+var_8C], xmm0 loc_36B90: lea rdi, [rbp+var_70]; this call _ZNK7lunasvg20SVGPatternAttributes16patternTransformEv; lunasvg::SVGPatternAttributes::patternTransform(void) mov [rbp+var_1D8], rax mov rdi, [rbp+var_18]; this call _ZNK7lunasvg14SVGRenderState16currentTransformEv; lunasvg::SVGRenderState::currentTransform(void) mov rsi, [rbp+var_1D8] mov rdx, rax lea rdi, [rbp+var_C0] mov [rbp+var_1D0], rdi call _ZNK7lunasvg9TransformmlERKS0_; lunasvg::Transform::operator*(lunasvg::Transform const&) mov rdi, [rbp+var_1D0]; this call _ZNK7lunasvg9Transform6xScaleEv; lunasvg::Transform::xScale(void) mov rdi, [rbp+var_1D0]; this movss [rbp+var_C4], xmm0 call _ZNK7lunasvg9Transform6yScaleEv; lunasvg::Transform::yScale(void) movss [rbp+var_C8], xmm0 movss xmm0, [rbp+var_C4] movss xmm2, [rbp+var_90] movss xmm3, [rbp+var_8C] mulss xmm2, xmm0; float movss xmm0, [rbp+var_C8] mulss xmm3, xmm0; float lea rdi, [rbp+var_D8]; this xorps xmm1, xmm1; float movaps xmm0, xmm1; float call _ZN7lunasvg6Canvas6createEffff; lunasvg::Canvas::create(float,float,float,float) movss xmm0, [rbp+var_C4]; float movss xmm1, [rbp+var_C8]; float lea rdi, [rbp+var_F0]; this call _ZN7lunasvg9Transform6scaledEff; lunasvg::Transform::scaled(float,float) jmp short $+2 loc_36C46: lea rdi, [rbp+var_70]; this call _ZNK7lunasvg20SVGPatternAttributes7viewBoxEv; lunasvg::SVGPatternAttributes::viewBox(void) mov [rbp+var_1E0], rax jmp short $+2 loc_36C58: mov rax, [rbp+var_1E0] mov [rbp+var_108], rax mov rdi, [rbp+var_108]; this call _ZNK7lunasvg4Rect7isValidEv; lunasvg::Rect::isValid(void) mov [rbp+var_1E1], al jmp short $+2 loc_36C7A: mov al, [rbp+var_1E1] test al, 1 jnz short loc_36C89 jmp loc_36D3D loc_36C89: lea rdi, [rbp+var_70]; this call _ZNK7lunasvg20SVGPatternAttributes19preserveAspectRatioEv; lunasvg::SVGPatternAttributes::preserveAspectRatio(void) mov [rbp+var_1F0], rax jmp short $+2 loc_36C9B: mov rax, [rbp+var_1F0] mov [rbp+var_110], rax mov rax, [rbp+var_110] mov [rbp+var_210], rax mov rax, [rbp+var_108] mov [rbp+var_208], rax lea rdi, [rbp+var_98]; this call _ZNK7lunasvg4Rect4sizeEv; lunasvg::Rect::size(void) movaps [rbp+var_200], xmm0 jmp short $+2 loc_36CDA: mov rdx, [rbp+var_208]; lunasvg::Size * mov rsi, [rbp+var_210]; lunasvg::Rect * movaps xmm0, [rbp+var_200] movlpd [rbp+var_130], xmm0 lea rdi, [rbp+var_128]; this lea rcx, [rbp+var_130] call _ZNK7lunasvg22SVGPreserveAspectRatio12getTransformERKNS_4RectERKNS_4SizeE; lunasvg::SVGPreserveAspectRatio::getTransform(lunasvg::Rect const&,lunasvg::Size const&) jmp short $+2 loc_36D0C: lea rdi, [rbp+var_F0]; this lea rsi, [rbp+var_128]; lunasvg::Transform * call _ZN7lunasvg9Transform8multiplyERKS0_; lunasvg::Transform::multiply(lunasvg::Transform const&) jmp short $+2 loc_36D21: jmp loc_36DB1 mov rcx, rax mov eax, edx mov [rbp+var_F8], rcx mov [rbp+var_FC], eax jmp loc_36F3A loc_36D3D: lea rdi, [rbp+var_70]; this call _ZNK7lunasvg20SVGPatternAttributes19patternContentUnitsEv; lunasvg::SVGPatternAttributes::patternContentUnits(void) mov [rbp+var_211], al jmp short $+2 loc_36D4E: mov al, [rbp+var_211] cmp al, 1 jnz short loc_36DAF mov rdi, [rbp+var_18]; this call _ZNK7lunasvg14SVGRenderState15fillBoundingBoxEv; lunasvg::SVGRenderState::fillBoundingBox(void) movaps [rbp+var_240], xmm1 movaps [rbp+var_230], xmm0 jmp short $+2 loc_36D71: movaps xmm0, [rbp+var_240] movaps xmm1, [rbp+var_230] movlpd [rbp+var_140], xmm1 movlpd qword ptr [rbp+var_138], xmm0 movss xmm0, [rbp+var_138]; float movss xmm1, [rbp+var_138+4]; float lea rdi, [rbp+var_F0]; this call _ZN7lunasvg9Transform5scaleEff; lunasvg::Transform::scale(float,float) jmp short $+2 loc_36DAD: jmp short $+2 loc_36DAF: jmp short $+2 loc_36DB1: mov rax, [rbp+var_18] mov [rbp+var_250], rax lea rdi, [rbp+var_190] mov [rbp+var_248], rdi lea rsi, [rbp+var_D8] call _ZNSt10shared_ptrIN7lunasvg6CanvasEEC2ERKS2_; std::shared_ptr<lunasvg::Canvas>::shared_ptr(std::shared_ptr<lunasvg::Canvas> const&) mov rsi, [rbp+var_1B8] mov rdx, [rbp+var_250] mov r9, [rbp+var_248] lea rdi, [rbp+var_180] lea rcx, [rbp+var_F0] xor r8d, r8d call _ZN7lunasvg14SVGRenderStateC2EPKNS_10SVGElementEPKS0_RKNS_9TransformENS_13SVGRenderModeESt10shared_ptrINS_6CanvasEE; lunasvg::SVGRenderState::SVGRenderState(lunasvg::SVGElement const*,lunasvg::SVGRenderState const*,lunasvg::Transform const&,lunasvg::SVGRenderMode,std::shared_ptr<lunasvg::Canvas>) jmp short $+2 loc_36E03: lea rdi, [rbp+var_190] call _ZNSt10shared_ptrIN7lunasvg6CanvasEED2Ev; std::shared_ptr<lunasvg::Canvas>::~shared_ptr() mov rdi, [rbp+var_78]; this lea rsi, [rbp+var_180]; lunasvg::SVGRenderState * call _ZNK7lunasvg10SVGElement14renderChildrenERNS_14SVGRenderStateE; lunasvg::SVGElement::renderChildren(lunasvg::SVGRenderState &) jmp short $+2 loc_36E21: lea rdi, [rbp+var_70]; this call _ZNK7lunasvg20SVGPatternAttributes16patternTransformEv; lunasvg::SVGPatternAttributes::patternTransform(void) mov [rbp+var_258], rax jmp short $+2 loc_36E33: mov rax, [rbp+var_258] mov rcx, [rax+10h] mov [rbp+var_1A0], rcx movups xmm0, xmmword ptr [rax] movaps [rbp+var_1B0], xmm0 movss xmm0, [rbp+var_98]; float movss xmm1, [rbp+var_94]; float lea rdi, [rbp+var_1B0]; this call _ZN7lunasvg9Transform9translateEff; lunasvg::Transform::translate(float,float) jmp short $+2 loc_36E6D: movss xmm2, [rbp+var_C4] movss xmm1, cs:flt_8C0C8 movaps xmm0, xmm1 divss xmm0, xmm2; float movss xmm2, [rbp+var_C8] divss xmm1, xmm2; float lea rdi, [rbp+var_1B0]; this call _ZN7lunasvg9Transform5scaleEff; lunasvg::Transform::scale(float,float) jmp short $+2 loc_36E9E: mov rdi, [rbp+var_18] call _ZNK7lunasvg14SVGRenderStateptEv; lunasvg::SVGRenderState::operator->(void) mov [rbp+var_260], rax jmp short $+2 loc_36EB0: lea rdi, [rbp+var_D8] call _ZNKSt19__shared_ptr_accessIN7lunasvg6CanvasELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv; std::__shared_ptr_access<lunasvg::Canvas,(__gnu_cxx::_Lock_policy)2,false,false>::operator*(void) mov rdi, [rbp+var_260] mov rsi, rax movss xmm0, [rbp+var_1C] mov edx, 1 lea rcx, [rbp+var_1B0] call _ZN7lunasvg6Canvas10setTextureERKS0_NS_11TextureTypeEfRKNS_9TransformE; lunasvg::Canvas::setTexture(lunasvg::Canvas const&,lunasvg::TextureType,float,lunasvg::Transform const&) jmp short $+2 loc_36EDE: mov [rbp+var_1], 1 lea rdi, [rbp+var_180]; this call _ZN7lunasvg14SVGRenderStateD2Ev; lunasvg::SVGRenderState::~SVGRenderState() lea rdi, [rbp+var_D8] call _ZNSt10shared_ptrIN7lunasvg6CanvasEED2Ev; std::shared_ptr<lunasvg::Canvas>::~shared_ptr() jmp short loc_36F48 mov rcx, rax mov eax, edx mov [rbp+var_F8], rcx mov [rbp+var_FC], eax lea rdi, [rbp+var_190] call _ZNSt10shared_ptrIN7lunasvg6CanvasEED2Ev; std::shared_ptr<lunasvg::Canvas>::~shared_ptr() jmp short loc_36F3A mov rcx, rax mov eax, edx mov [rbp+var_F8], rcx mov [rbp+var_FC], eax lea rdi, [rbp+var_180]; this call _ZN7lunasvg14SVGRenderStateD2Ev; lunasvg::SVGRenderState::~SVGRenderState() loc_36F3A: lea rdi, [rbp+var_D8] call _ZNSt10shared_ptrIN7lunasvg6CanvasEED2Ev; std::shared_ptr<lunasvg::Canvas>::~shared_ptr() jmp short loc_36F56 loc_36F48: mov al, [rbp+var_1] and al, 1 add rsp, 260h pop rbp retn loc_36F56: mov rdi, [rbp+var_F8] call __Unwind_Resume
char lunasvg::SVGPatternElement::applyPaint( lunasvg::SVGPatternElement *this, lunasvg::SVGRenderState *a2, float a3) { char v3; // al const lunasvg::SVGLength *v4; // rax const lunasvg::SVGLength *v5; // rax const lunasvg::SVGLength *v6; // rax const lunasvg::SVGLength *v7; // rax float v8; // xmm3_4 float v9; // xmm0_4 long long v10; // rax long long v11; // xmm0_8 long long v12; // xmm1_8 lunasvg::Canvas *v13; // rax long long v15; // [rsp+0h] [rbp-260h] long long v16; // [rsp+8h] [rbp-258h] lunasvg::SVGRenderState *v17; // [rsp+10h] [rbp-250h] long long v18; // [rsp+88h] [rbp-1D8h] float v19; // [rsp+9Ch] [rbp-1C4h] float v20; // [rsp+A0h] [rbp-1C0h] float v21; // [rsp+A4h] [rbp-1BCh] __int128 v22; // [rsp+B0h] [rbp-1B0h] BYREF long long v23; // [rsp+C0h] [rbp-1A0h] _BYTE v24[16]; // [rsp+D0h] [rbp-190h] BYREF _BYTE v25[64]; // [rsp+E0h] [rbp-180h] BYREF long long v26; // [rsp+120h] [rbp-140h] _QWORD v27[2]; // [rsp+128h] [rbp-138h] _BYTE v28[24]; // [rsp+138h] [rbp-128h] BYREF const lunasvg::Rect *v29; // [rsp+150h] [rbp-110h] lunasvg::Rect *v30; // [rsp+158h] [rbp-108h] _QWORD v31[3]; // [rsp+170h] [rbp-F0h] BYREF _BYTE v32[16]; // [rsp+188h] [rbp-D8h] BYREF float v33; // [rsp+198h] [rbp-C8h] float v34; // [rsp+19Ch] [rbp-C4h] _BYTE v35[24]; // [rsp+1A0h] [rbp-C0h] BYREF long long v36; // [rsp+1B8h] [rbp-A8h] long long v37; // [rsp+1C0h] [rbp-A0h] float v38; // [rsp+1C8h] [rbp-98h] BYREF float v39; // [rsp+1CCh] [rbp-94h] float v40; // [rsp+1D0h] [rbp-90h] float v41; // [rsp+1D4h] [rbp-8Ch] _BYTE v42[16]; // [rsp+1D8h] [rbp-88h] BYREF lunasvg::SVGElement *v43; // [rsp+1E8h] [rbp-78h] _BYTE v44[84]; // [rsp+1F0h] [rbp-70h] BYREF float v45; // [rsp+244h] [rbp-1Ch] lunasvg::SVGRenderState *v46; // [rsp+248h] [rbp-18h] lunasvg::SVGElement *v47; // [rsp+250h] [rbp-10h] char v48; // [rsp+25Fh] [rbp-1h] v47 = this; v46 = a2; v45 = a3; if ( (lunasvg::SVGRenderState::hasCycleReference(a2, this) & 1) != 0 ) { v48 = 0; } else { lunasvg::SVGPatternElement::collectPatternAttributes((lunasvg::SVGPatternElement *)v44); v43 = (lunasvg::SVGElement *)lunasvg::SVGPatternAttributes::patternContentElement((lunasvg::SVGPatternAttributes *)v44); if ( v43 ) { v3 = lunasvg::SVGPatternAttributes::patternUnits((lunasvg::SVGPatternAttributes *)v44); lunasvg::LengthContext::LengthContext((long long)v42, (long long)this, v3); v4 = (const lunasvg::SVGLength *)lunasvg::SVGPatternAttributes::x((lunasvg::SVGPatternAttributes *)v44); v21 = lunasvg::LengthContext::valueForLength((lunasvg::LengthContext *)v42, v4); v5 = (const lunasvg::SVGLength *)lunasvg::SVGPatternAttributes::y((lunasvg::SVGPatternAttributes *)v44); v19 = lunasvg::LengthContext::valueForLength((lunasvg::LengthContext *)v42, v5); v6 = (const lunasvg::SVGLength *)lunasvg::SVGPatternAttributes::width((lunasvg::SVGPatternAttributes *)v44); v20 = lunasvg::LengthContext::valueForLength((lunasvg::LengthContext *)v42, v6); v7 = (const lunasvg::SVGLength *)lunasvg::SVGPatternAttributes::height((lunasvg::SVGPatternAttributes *)v44); v8 = lunasvg::LengthContext::valueForLength((lunasvg::LengthContext *)v42, v7); v9 = v21; lunasvg::Rect::Rect((lunasvg::Rect *)&v38, v21, v19, v20, v8); if ( (unsigned __int8)lunasvg::SVGPatternAttributes::patternUnits((lunasvg::SVGPatternAttributes *)v44) == 1 ) { lunasvg::SVGRenderState::fillBoundingBox(v46); v36 = LODWORD(v21); v37 = LODWORD(v19); v38 = (float)(v38 * v19) + v21; v39 = (float)(v39 * 0.0) + 0.0; v40 = v40 * v19; v9 = v41 * 0.0; v41 = v41 * 0.0; } v18 = lunasvg::SVGPatternAttributes::patternTransform((lunasvg::SVGPatternAttributes *)v44); v10 = lunasvg::SVGRenderState::currentTransform(v46); lunasvg::Transform::operator*((long long)v35, v18, v10); lunasvg::Transform::xScale((lunasvg::Transform *)v35); v34 = v9; lunasvg::Transform::yScale((lunasvg::Transform *)v35); v33 = v9; lunasvg::Canvas::create((lunasvg::Canvas *)v32, 0.0, 0.0, v40 * v9, v41 * v9); v11 = LODWORD(v34); v12 = LODWORD(v33); lunasvg::Transform::scaled((lunasvg::Transform *)v31, v34, v33); v30 = (lunasvg::Rect *)lunasvg::SVGPatternAttributes::viewBox((lunasvg::SVGPatternAttributes *)v44); if ( lunasvg::Rect::isValid(v30) ) { v29 = (const lunasvg::Rect *)lunasvg::SVGPatternAttributes::preserveAspectRatio((lunasvg::SVGPatternAttributes *)v44); v27[1] = lunasvg::Rect::size((lunasvg::Rect *)&v38); lunasvg::SVGPreserveAspectRatio::getTransform((lunasvg::SVGPreserveAspectRatio *)v28, v29, v30); lunasvg::Transform::multiply((lunasvg::Transform *)v31, (const lunasvg::Transform *)v28); } else if ( (unsigned __int8)lunasvg::SVGPatternAttributes::patternContentUnits((lunasvg::SVGPatternAttributes *)v44) == 1 ) { lunasvg::SVGRenderState::fillBoundingBox(v46); v26 = v11; v27[0] = v12; lunasvg::Transform::scale((lunasvg::Transform *)v31, *(float *)&v12, *((float *)&v12 + 1)); } v17 = v46; std::shared_ptr<lunasvg::Canvas>::shared_ptr((long long)v24, (long long)v32); lunasvg::SVGRenderState::SVGRenderState((long long)v25, (long long)this, (long long)v17, v31, 0); std::shared_ptr<lunasvg::Canvas>::~shared_ptr((long long)v24); lunasvg::SVGElement::renderChildren(v43, (lunasvg::SVGRenderState *)v25); v16 = lunasvg::SVGPatternAttributes::patternTransform((lunasvg::SVGPatternAttributes *)v44); v23 = *(_QWORD *)(v16 + 16); v22 = *(_OWORD *)v16; lunasvg::Transform::translate((lunasvg::Transform *)&v22, v38, v39); lunasvg::Transform::scale((lunasvg::Transform *)&v22, 1.0 / v34, 1.0 / v33); v15 = lunasvg::SVGRenderState::operator->((long long)v46); v13 = (lunasvg::Canvas *)std::__shared_ptr_access<lunasvg::Canvas,(__gnu_cxx::_Lock_policy)2,false,false>::operator*((long long)v32); lunasvg::Canvas::setTexture(v15, v13, 1u, (lunasvg::Transform *)&v22, v45); v48 = 1; lunasvg::SVGRenderState::~SVGRenderState((lunasvg::SVGRenderState *)v25); std::shared_ptr<lunasvg::Canvas>::~shared_ptr((long long)v32); } else { v48 = 0; } } return v48 & 1; }
applyPaint: PUSH RBP MOV RBP,RSP SUB RSP,0x260 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOVSS dword ptr [RBP + -0x1c],XMM0 MOV RSI,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x1b8],RSI MOV RDI,qword ptr [RBP + -0x18] CALL 0x0014c970 TEST AL,0x1 JNZ 0x001369f2 JMP 0x001369fb LAB_001369f2: MOV byte ptr [RBP + -0x1],0x0 JMP 0x00136f48 LAB_001369fb: MOV RSI,qword ptr [RBP + -0x1b8] LEA RDI,[RBP + -0x70] CALL 0x00136f70 LEA RDI,[RBP + -0x70] CALL 0x00137e90 MOV qword ptr [RBP + -0x78],RAX CMP qword ptr [RBP + -0x78],0x0 JNZ 0x00136a28 MOV byte ptr [RBP + -0x1],0x0 JMP 0x00136f48 LAB_00136a28: LEA RDI,[RBP + -0x70] CALL 0x00137eb0 MOV RSI,qword ptr [RBP + -0x1b8] LEA RDI,[RBP + -0x88] MOVZX EDX,AL CALL 0x00120050 LEA RDI,[RBP + -0x70] CALL 0x00137ee0 MOV RSI,RAX LEA RDI,[RBP + -0x88] CALL 0x00120080 MOVSS dword ptr [RBP + -0x1bc],XMM0 LEA RDI,[RBP + -0x70] CALL 0x00137f00 MOV RSI,RAX LEA RDI,[RBP + -0x88] CALL 0x00120080 MOVSS dword ptr [RBP + -0x1c4],XMM0 LEA RDI,[RBP + -0x70] CALL 0x00137f20 MOV RSI,RAX LEA RDI,[RBP + -0x88] CALL 0x00120080 MOVSS dword ptr [RBP + -0x1c0],XMM0 LEA RDI,[RBP + -0x70] CALL 0x00137f40 MOV RSI,RAX LEA RDI,[RBP + -0x88] CALL 0x00120080 MOVSS XMM1,dword ptr [RBP + -0x1c4] MOVSS XMM2,dword ptr [RBP + -0x1c0] MOVAPS XMM3,XMM0 MOVSS XMM0,dword ptr [RBP + -0x1bc] LEA RDI,[RBP + -0x98] CALL 0x00114ee0 LEA RDI,[RBP + -0x70] CALL 0x00137eb0 CMP AL,0x1 JNZ 0x00136b90 MOV RDI,qword ptr [RBP + -0x18] CALL 0x00121650 MOVLPD qword ptr [RBP + -0xa8],XMM0 MOVLPD qword ptr [RBP + -0xa0],XMM1 MOVSS XMM0,dword ptr [RBP + -0x98] MOVSS XMM2,dword ptr [RBP + -0xa0] MOVSS XMM1,dword ptr [RBP + -0xa8] MULSS XMM0,XMM2 ADDSS XMM0,XMM1 MOVSS dword ptr [RBP + -0x98],XMM0 MOVSS XMM0,dword ptr [RBP + -0x94] MOVSS XMM2,dword ptr [RBP + -0x9c] MOVSS XMM1,dword ptr [RBP + -0xa4] MULSS XMM0,XMM2 ADDSS XMM0,XMM1 MOVSS dword ptr [RBP + -0x94],XMM0 MOVSS XMM0,dword ptr [RBP + -0x90] MULSS XMM0,dword ptr [RBP + -0xa0] MOVSS dword ptr [RBP + -0x90],XMM0 MOVSS XMM0,dword ptr [RBP + -0x8c] MULSS XMM0,dword ptr [RBP + -0x9c] MOVSS dword ptr [RBP + -0x8c],XMM0 LAB_00136b90: LEA RDI,[RBP + -0x70] CALL 0x00137f60 MOV qword ptr [RBP + -0x1d8],RAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x00120eb0 MOV RSI,qword ptr [RBP + -0x1d8] MOV RDX,RAX LEA RDI,[RBP + -0xc0] MOV qword ptr [RBP + -0x1d0],RDI CALL 0x00111850 MOV RDI,qword ptr [RBP + -0x1d0] CALL 0x00111f80 MOV RDI,qword ptr [RBP + -0x1d0] MOVSS dword ptr [RBP + -0xc4],XMM0 CALL 0x00111fc0 MOVSS dword ptr [RBP + -0xc8],XMM0 MOVSS XMM0,dword ptr [RBP + -0xc4] MOVSS XMM2,dword ptr [RBP + -0x90] MOVSS XMM3,dword ptr [RBP + -0x8c] MULSS XMM2,XMM0 MOVSS XMM0,dword ptr [RBP + -0xc8] MULSS XMM3,XMM0 LEA RDI,[RBP + -0xd8] XORPS XMM1,XMM1 MOVAPS XMM0,XMM1 CALL 0x001134c0 MOVSS XMM0,dword ptr [RBP + -0xc4] MOVSS XMM1,dword ptr [RBP + -0xc8] LAB_00136c38: LEA RDI,[RBP + -0xf0] CALL 0x00111a00 JMP 0x00136c46 LAB_00136c46: LEA RDI,[RBP + -0x70] CALL 0x00137f90 MOV qword ptr [RBP + -0x1e0],RAX JMP 0x00136c58 LAB_00136c58: MOV RAX,qword ptr [RBP + -0x1e0] MOV qword ptr [RBP + -0x108],RAX MOV RDI,qword ptr [RBP + -0x108] CALL 0x00114530 MOV byte ptr [RBP + -0x1e1],AL JMP 0x00136c7a LAB_00136c7a: MOV AL,byte ptr [RBP + -0x1e1] TEST AL,0x1 JNZ 0x00136c89 JMP 0x00136d3d LAB_00136c89: LEA RDI,[RBP + -0x70] CALL 0x00137fc0 MOV qword ptr [RBP + -0x1f0],RAX JMP 0x00136c9b LAB_00136c9b: MOV RAX,qword ptr [RBP + -0x1f0] MOV qword ptr [RBP + -0x110],RAX MOV RAX,qword ptr [RBP + -0x110] MOV qword ptr [RBP + -0x210],RAX MOV RAX,qword ptr [RBP + -0x108] MOV qword ptr [RBP + -0x208],RAX LEA RDI,[RBP + -0x98] CALL 0x0011fff0 MOVAPS xmmword ptr [RBP + -0x200],XMM0 JMP 0x00136cda LAB_00136cda: MOV RDX,qword ptr [RBP + -0x208] MOV RSI,qword ptr [RBP + -0x210] MOVAPS XMM0,xmmword ptr [RBP + -0x200] MOVLPD qword ptr [RBP + -0x130],XMM0 LEA RDI,[RBP + -0x128] LEA RCX,[RBP + -0x130] CALL 0x0014a860 JMP 0x00136d0c LAB_00136d0c: LEA RDI,[RBP + -0xf0] LEA RSI,[RBP + -0x128] CALL 0x001118e0 JMP 0x00136d21 LAB_00136d21: JMP 0x00136db1 LAB_00136d3d: LEA RDI,[RBP + -0x70] CALL 0x00137ff0 MOV byte ptr [RBP + -0x211],AL JMP 0x00136d4e LAB_00136d4e: MOV AL,byte ptr [RBP + -0x211] CMP AL,0x1 JNZ 0x00136daf MOV RDI,qword ptr [RBP + -0x18] CALL 0x00121650 MOVAPS xmmword ptr [RBP + -0x240],XMM1 MOVAPS xmmword ptr [RBP + -0x230],XMM0 JMP 0x00136d71 LAB_00136d71: MOVAPS XMM0,xmmword ptr [RBP + -0x240] MOVAPS XMM1,xmmword ptr [RBP + -0x230] MOVLPD qword ptr [RBP + -0x140],XMM1 MOVLPD qword ptr [RBP + -0x138],XMM0 MOVSS XMM0,dword ptr [RBP + -0x138] MOVSS XMM1,dword ptr [RBP + -0x134] LEA RDI,[RBP + -0xf0] CALL 0x001119b0 JMP 0x00136dad LAB_00136dad: JMP 0x00136daf LAB_00136daf: JMP 0x00136db1 LAB_00136db1: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x250],RAX LEA RDI,[RBP + -0x190] MOV qword ptr [RBP + -0x248],RDI LEA RSI,[RBP + -0xd8] CALL 0x0010e750 MOV RSI,qword ptr [RBP + -0x1b8] MOV RDX,qword ptr [RBP + -0x250] MOV R9,qword ptr [RBP + -0x248] LAB_00136deb: LEA RDI,[RBP + -0x180] LEA RCX,[RBP + -0xf0] XOR R8D,R8D CALL 0x0010e780 JMP 0x00136e03 LAB_00136e03: LEA RDI,[RBP + -0x190] CALL 0x0010e7f0 MOV RDI,qword ptr [RBP + -0x78] LAB_00136e13: LEA RSI,[RBP + -0x180] CALL 0x0011a060 JMP 0x00136e21 LAB_00136e21: LEA RDI,[RBP + -0x70] CALL 0x00137f60 MOV qword ptr [RBP + -0x258],RAX JMP 0x00136e33 LAB_00136e33: MOV RAX,qword ptr [RBP + -0x258] MOV RCX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x1a0],RCX MOVUPS XMM0,xmmword ptr [RAX] MOVAPS xmmword ptr [RBP + -0x1b0],XMM0 MOVSS XMM0,dword ptr [RBP + -0x98] MOVSS XMM1,dword ptr [RBP + -0x94] LEA RDI,[RBP + -0x1b0] CALL 0x00111910 JMP 0x00136e6d LAB_00136e6d: MOVSS XMM2,dword ptr [RBP + -0xc4] MOVSS XMM1,dword ptr [0x0018c0c8] MOVAPS XMM0,XMM1 DIVSS XMM0,XMM2 MOVSS XMM2,dword ptr [RBP + -0xc8] DIVSS XMM1,XMM2 LEA RDI,[RBP + -0x1b0] CALL 0x001119b0 JMP 0x00136e9e LAB_00136e9e: MOV RDI,qword ptr [RBP + -0x18] CALL 0x00120750 MOV qword ptr [RBP + -0x260],RAX JMP 0x00136eb0 LAB_00136eb0: LEA RDI,[RBP + -0xd8] CALL 0x001216b0 MOV RDI,qword ptr [RBP + -0x260] MOV RSI,RAX MOVSS XMM0,dword ptr [RBP + -0x1c] MOV EDX,0x1 LEA RCX,[RBP + -0x1b0] CALL 0x00113900 LAB_00136edc: JMP 0x00136ede LAB_00136ede: MOV byte ptr [RBP + -0x1],0x1 LEA RDI,[RBP + -0x180] CALL 0x0010e810 LEA RDI,[RBP + -0xd8] CALL 0x0010e7f0 JMP 0x00136f48 LAB_00136f48: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x260 POP RBP RET
/* lunasvg::SVGPatternElement::applyPaint(lunasvg::SVGRenderState&, float) const */ ulong __thiscall lunasvg::SVGPatternElement::applyPaint (SVGPatternElement *this,SVGRenderState *param_1,float param_2) { int1 uVar1; char cVar2; byte bVar3; ulong uVar4; SVGLength *pSVar5; Transform *pTVar6; Size *pSVar7; int8 *puVar8; int8 uVar9; int8 uVar10; float fVar11; float fVar12; float fVar13; float fVar14; float fVar15; int8 local_1b8; int8 uStack_1b0; int8 local_1a8; shared_ptr<lunasvg::Canvas> local_198 [16]; SVGRenderState local_188 [64]; int8 local_148; int8 local_140; int8 local_138; Rect local_130 [24]; Size *local_118; Rect *local_110; Transform local_f8 [24]; Canvas local_e0 [16]; float local_d0; float local_cc; Transform local_c8 [24]; int8 local_b0; int8 local_a8; float local_a0; float local_9c; float local_98; float local_94; LengthContext local_90 [16]; SVGElement *local_80; SVGPatternAttributes local_78 [84]; int1 local_24 [12]; SVGPatternElement *local_18; int1 local_9; local_24._0_4_ = param_2; local_24._4_8_ = param_1; local_18 = this; uVar4 = SVGRenderState::hasCycleReference(param_1,(SVGElement *)this); if ((uVar4 & 1) == 0) { collectPatternAttributes(); local_80 = (SVGElement *)SVGPatternAttributes::patternContentElement(local_78); if (local_80 == (SVGElement *)0x0) { local_9 = 0; uVar4 = 0; } else { uVar1 = SVGPatternAttributes::patternUnits(local_78); LengthContext::LengthContext(local_90,this,uVar1); pSVar5 = (SVGLength *)SVGPatternAttributes::x(local_78); fVar11 = (float)LengthContext::valueForLength(local_90,pSVar5); pSVar5 = (SVGLength *)SVGPatternAttributes::y(local_78); fVar12 = (float)LengthContext::valueForLength(local_90,pSVar5); pSVar5 = (SVGLength *)SVGPatternAttributes::width(local_78); fVar13 = (float)LengthContext::valueForLength(local_90,pSVar5); pSVar5 = (SVGLength *)SVGPatternAttributes::height(local_78); fVar14 = (float)LengthContext::valueForLength(local_90,pSVar5); fVar15 = 0.0; Rect::Rect((Rect *)&local_a0,fVar11,fVar12,fVar13,fVar14); cVar2 = SVGPatternAttributes::patternUnits(local_78); if (cVar2 == '\x01') { local_b0 = SVGRenderState::fillBoundingBox(); local_a8 = CONCAT44(fVar15,fVar12); local_a0 = local_a0 * fVar12 + (float)local_b0; local_9c = local_9c * fVar15 + (float)((ulong)local_b0 >> 0x20); local_98 = local_98 * fVar12; local_94 = local_94 * fVar15; } pTVar6 = (Transform *)SVGPatternAttributes::patternTransform(local_78); SVGRenderState::currentTransform((SVGRenderState *)local_24._4_8_); Transform::operator*(local_c8,pTVar6); local_cc = (float)Transform::xScale(local_c8); local_d0 = (float)Transform::yScale(local_c8); Canvas::create(local_e0,0.0,0.0,local_98 * local_cc,local_94 * local_d0); fVar12 = 0.0; /* try { // try from 00136c38 to 00136daa has its CatchHandler @ 00136d26 */ fVar11 = local_d0; Transform::scaled(local_f8,local_cc,local_d0); local_110 = (Rect *)SVGPatternAttributes::viewBox(local_78); bVar3 = Rect::isValid(local_110); if ((bVar3 & 1) == 0) { cVar2 = SVGPatternAttributes::patternContentUnits(local_78); if (cVar2 == '\x01') { local_148 = SVGRenderState::fillBoundingBox(); local_140 = CONCAT44(fVar12,fVar11); Transform::scale(local_f8,fVar11,fVar12); } } else { pSVar7 = (Size *)SVGPatternAttributes::preserveAspectRatio(local_78); local_118 = pSVar7; local_138 = Rect::size((Rect *)&local_a0); SVGPreserveAspectRatio::getTransform(local_130,pSVar7); Transform::multiply(local_f8,(Transform *)local_130); } uVar9 = local_24._4_8_; std::shared_ptr<lunasvg::Canvas>::shared_ptr(local_198,(shared_ptr *)local_e0); /* try { // try from 00136deb to 00136e00 has its CatchHandler @ 00136efc */ SVGRenderState::SVGRenderState(local_188,this,uVar9,local_f8,0,local_198); std::shared_ptr<lunasvg::Canvas>::~shared_ptr(local_198); /* try { // try from 00136e13 to 00136edb has its CatchHandler @ 00136f1c */ SVGElement::renderChildren(local_80,local_188); puVar8 = (int8 *)SVGPatternAttributes::patternTransform(local_78); local_1a8 = puVar8[2]; local_1b8 = *puVar8; uStack_1b0 = puVar8[1]; Transform::translate((Transform *)&local_1b8,local_a0,local_9c); Transform::scale((Transform *)&local_1b8,DAT_0018c0c8 / local_cc,DAT_0018c0c8 / local_d0); uVar9 = SVGRenderState::operator->((SVGRenderState *)local_24._4_8_); uVar10 = std::__shared_ptr_access<lunasvg::Canvas,(__gnu_cxx::_Lock_policy)2,false,false>:: operator*((__shared_ptr_access<lunasvg::Canvas,(__gnu_cxx::_Lock_policy)2,false,false> *)local_e0); Canvas::setTexture((Canvas *)local_24._0_4_,uVar9,uVar10,1,&local_1b8); local_9 = 1; SVGRenderState::~SVGRenderState(local_188); uVar4 = std::shared_ptr<lunasvg::Canvas>::~shared_ptr((shared_ptr<lunasvg::Canvas> *)local_e0) ; } } else { local_9 = 0; } return CONCAT71((int7)(uVar4 >> 8),local_9) & 0xffffffffffffff01; }
16,624
lunasvg::SVGPatternElement::applyPaint(lunasvg::SVGRenderState&, float) const
dmazzella[P]pylunasvg/lunasvg/source/svgpaintelement.cpp
bool SVGPatternElement::applyPaint(SVGRenderState& state, float opacity) const { if(state.hasCycleReference(this)) return false; auto attributes = collectPatternAttributes(); auto patternContentElement = attributes.patternContentElement(); if(patternContentElement == nullptr) return false; LengthContext lengthContext(this, attributes.patternUnits()); Rect patternRect = { lengthContext.valueForLength(attributes.x()), lengthContext.valueForLength(attributes.y()), lengthContext.valueForLength(attributes.width()), lengthContext.valueForLength(attributes.height()) }; if(attributes.patternUnits() == Units::ObjectBoundingBox) { auto bbox = state.fillBoundingBox(); patternRect.x = patternRect.x * bbox.w + bbox.x; patternRect.y = patternRect.y * bbox.h + bbox.y; patternRect.w = patternRect.w * bbox.w; patternRect.h = patternRect.h * bbox.h; } auto currentTransform = attributes.patternTransform() * state.currentTransform(); auto xScale = currentTransform.xScale(); auto yScale = currentTransform.yScale(); auto patternImage = Canvas::create(0, 0, patternRect.w * xScale, patternRect.h * yScale); auto patternImageTransform = Transform::scaled(xScale, yScale); const auto& viewBoxRect = attributes.viewBox(); if(viewBoxRect.isValid()) { const auto& preserveAspectRatio = attributes.preserveAspectRatio(); patternImageTransform.multiply(preserveAspectRatio.getTransform(viewBoxRect, patternRect.size())); } else if(attributes.patternContentUnits() == Units::ObjectBoundingBox) { auto bbox = state.fillBoundingBox(); patternImageTransform.scale(bbox.w, bbox.h); } SVGRenderState newState(this, &state, patternImageTransform, SVGRenderMode::Painting, patternImage); patternContentElement->renderChildren(newState); auto patternTransform = attributes.patternTransform(); patternTransform.translate(patternRect.x, patternRect.y); patternTransform.scale(1.f / xScale, 1.f / yScale); state->setTexture(*patternImage, TextureType::Tiled, opacity, patternTransform); return true; }
O1
cpp
lunasvg::SVGPatternElement::applyPaint(lunasvg::SVGRenderState&, float) const: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x140, %rsp # imm = 0x140 movss %xmm0, 0x1c(%rsp) movq %rsi, %r14 movq %rdi, %r15 movq %rsi, %rdi movq %r15, %rsi callq 0x20d76 testb %al, %al je 0x18a3c xorl %ebx, %ebx jmp 0x18d78 leaq 0x88(%rsp), %rbx movq %rbx, %rdi movq %r15, %rsi callq 0x18dc2 movq 0x48(%rbx), %r12 testq %r12, %r12 setne %bl je 0x18d78 movq 0x88(%rsp), %rsi movq 0xb0(%rsp), %rax movb 0x169(%rax), %al leaq 0x118(%rsp), %r13 movq %r15, (%r13) movb %al, 0x8(%r13) movzbl 0xe1(%rsi), %edx addq $0xe4, %rsi movq %r13, %rdi callq 0x1f7ea movss %xmm0, 0x10(%rsp) movq 0x90(%rsp), %rsi movzbl 0xf9(%rsi), %edx addq $0xfc, %rsi movq %r13, %rdi callq 0x1f7ea movss %xmm0, 0xc(%rsp) movq 0x98(%rsp), %rsi movzbl 0x111(%rsi), %edx addq $0x114, %rsi # imm = 0x114 movq %r13, %rdi callq 0x1f7ea movaps %xmm0, 0x40(%rsp) movq 0xa0(%rsp), %rsi movzbl 0x129(%rsi), %edx addq $0x12c, %rsi # imm = 0x12C movq %r13, %rdi callq 0x1f7ea movq 0xb0(%rsp), %rax cmpb $0x1, 0x169(%rax) movaps %xmm0, 0x30(%rsp) jne 0x18b71 movq (%r14), %rdi movq (%rdi), %rax callq *0x58(%rax) movss 0x10(%rsp), %xmm2 mulss %xmm1, %xmm2 addss %xmm0, %xmm2 movss %xmm2, 0x10(%rsp) movaps 0x40(%rsp), %xmm2 mulss %xmm1, %xmm2 movaps %xmm2, 0x40(%rsp) shufps $0x55, %xmm1, %xmm1 # xmm1 = xmm1[1,1,1,1] shufps $0x55, %xmm0, %xmm0 # xmm0 = xmm0[1,1,1,1] movss 0xc(%rsp), %xmm2 mulss %xmm1, %xmm2 addss %xmm0, %xmm2 movss %xmm2, 0xc(%rsp) movaps 0x30(%rsp), %xmm0 mulss %xmm1, %xmm0 movaps %xmm0, 0x30(%rsp) movl $0x144, %esi # imm = 0x144 addq 0xa8(%rsp), %rsi leaq 0x10(%r14), %rdx leaq 0x128(%rsp), %r13 movq %r13, %rdi callq 0xc91a movq %r13, %rdi callq 0xce06 movss %xmm0, 0x14(%rsp) movq %r13, %rdi callq 0xce2c movss %xmm0, 0x18(%rsp) movaps 0x40(%rsp), %xmm2 mulss 0x14(%rsp), %xmm2 movaps 0x30(%rsp), %xmm3 mulss %xmm0, %xmm3 leaq 0x20(%rsp), %rdi xorps %xmm0, %xmm0 xorps %xmm1, %xmm1 callq 0xd8f0 leaq 0x58(%rsp), %rdi movss 0x14(%rsp), %xmm0 movss 0x18(%rsp), %xmm1 callq 0xca30 movq 0xc0(%rsp), %rdx movss 0xb4(%rdx), %xmm0 ucomiss 0x2a92d(%rip), %xmm0 # 0x4352c jb 0x18c58 movss 0xb8(%rdx), %xmm0 xorps %xmm1, %xmm1 ucomiss %xmm1, %xmm0 jb 0x18c58 movl $0xc0, %esi addq 0xc8(%rsp), %rsi addq $0xac, %rdx movaps 0x40(%rsp), %xmm0 unpcklps 0x30(%rsp), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1] leaq 0x70(%rsp), %rcx movlps %xmm0, (%rcx) leaq 0xd8(%rsp), %rdi callq 0x203bc leaq 0x58(%rsp), %rdi leaq 0xd8(%rsp), %rsi callq 0xc964 jmp 0x18c89 movq 0xb8(%rsp), %rax cmpb $0x1, 0x179(%rax) jne 0x18c89 movq (%r14), %rdi movq (%rdi), %rax callq *0x58(%rax) movaps %xmm1, %xmm2 shufps $0x55, %xmm1, %xmm2 # xmm2 = xmm2[1,1],xmm1[1,1] leaq 0x58(%rsp), %rdi movaps %xmm1, %xmm0 movaps %xmm2, %xmm1 callq 0xc9ea movq 0x20(%rsp), %rax movq 0x28(%rsp), %rcx testq %rcx, %rcx je 0x18cad movq 0x43329(%rip), %rdx # 0x5bfc8 cmpb $0x0, (%rdx) je 0x18ca9 incl 0x8(%rcx) jmp 0x18cad lock incl 0x8(%rcx) leaq 0xd8(%rsp), %rsi movq %r15, (%rsi) movq %r14, 0x8(%rsi) movups 0x58(%rsp), %xmm0 movups %xmm0, 0x10(%rsi) movq 0x68(%rsp), %rdx movq %rdx, 0x20(%rsi) movl $0x0, 0x28(%rsi) movq %rax, 0x30(%rsi) movq %rcx, 0x38(%rsi) movq %r12, %rdi callq 0xffc0 movq 0xa8(%rsp), %rax movups 0x144(%rax), %xmm0 leaq 0x70(%rsp), %rdi movaps %xmm0, (%rdi) movq 0x154(%rax), %rax movq %rax, 0x10(%rdi) movss 0x10(%rsp), %xmm0 movss 0xc(%rsp), %xmm1 callq 0xc996 movss 0x2a3d4(%rip), %xmm1 # 0x430f4 movaps %xmm1, %xmm0 divss 0x14(%rsp), %xmm0 divss 0x18(%rsp), %xmm1 leaq 0x70(%rsp), %rdi callq 0xc9ea movq 0x30(%r14), %rdi movq 0x20(%rsp), %rsi leaq 0x70(%rsp), %rcx movl $0x1, %edx movss 0x1c(%rsp), %xmm0 callq 0xdaf0 movq 0x110(%rsp), %rdi testq %rdi, %rdi je 0x18d69 callq 0xc49a movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x18d78 callq 0xc49a movl %ebx, %eax addq $0x140, %rsp # imm = 0x140 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq jmp 0x18d91 jmp 0x18d96 jmp 0x18d91 movq %rax, %rbx jmp 0x18dab movq %rax, %rbx movq 0x110(%rsp), %rdi testq %rdi, %rdi je 0x18dab callq 0xc49a movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x18dba callq 0xc49a movq %rbx, %rdi callq 0xa5c0
_ZNK7lunasvg17SVGPatternElement10applyPaintERNS_14SVGRenderStateEf: push r15 push r14 push r13 push r12 push rbx sub rsp, 140h movss [rsp+168h+var_14C], xmm0 mov r14, rsi mov r15, rdi mov rdi, rsi; this mov rsi, r15; lunasvg::SVGElement * call _ZNK7lunasvg14SVGRenderState17hasCycleReferenceEPKNS_10SVGElementE; lunasvg::SVGRenderState::hasCycleReference(lunasvg::SVGElement const*) test al, al jz short loc_18A3C xor ebx, ebx jmp loc_18D78 loc_18A3C: lea rbx, [rsp+168h+var_E0] mov rdi, rbx; this mov rsi, r15 call _ZNK7lunasvg17SVGPatternElement24collectPatternAttributesEv; lunasvg::SVGPatternElement::collectPatternAttributes(void) mov r12, [rbx+48h] test r12, r12 setnz bl jz loc_18D78 mov rsi, [rsp+168h+var_E0] mov rax, [rsp+168h+var_B8] mov al, [rax+169h] lea r13, [rsp+168h+var_50] mov [r13+0], r15 mov [r13+8], al movzx edx, byte ptr [rsi+0E1h] add rsi, 0E4h mov rdi, r13 call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_6LengthENS_15LengthDirectionE; lunasvg::LengthContext::valueForLength(lunasvg::Length const&,lunasvg::LengthDirection) movss [rsp+168h+var_158], xmm0 mov rsi, [rsp+168h+var_D8] movzx edx, byte ptr [rsi+0F9h] add rsi, 0FCh mov rdi, r13 call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_6LengthENS_15LengthDirectionE; lunasvg::LengthContext::valueForLength(lunasvg::Length const&,lunasvg::LengthDirection) movss [rsp+168h+var_15C], xmm0 mov rsi, [rsp+168h+var_D0] movzx edx, byte ptr [rsi+111h] add rsi, 114h mov rdi, r13 call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_6LengthENS_15LengthDirectionE; lunasvg::LengthContext::valueForLength(lunasvg::Length const&,lunasvg::LengthDirection) movaps [rsp+168h+var_128], xmm0 mov rsi, [rsp+168h+var_C8] movzx edx, byte ptr [rsi+129h] add rsi, 12Ch mov rdi, r13 call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_6LengthENS_15LengthDirectionE; lunasvg::LengthContext::valueForLength(lunasvg::Length const&,lunasvg::LengthDirection) mov rax, [rsp+168h+var_B8] cmp byte ptr [rax+169h], 1 movaps [rsp+168h+var_138], xmm0 jnz short loc_18B71 mov rdi, [r14] mov rax, [rdi] call qword ptr [rax+58h] movss xmm2, [rsp+168h+var_158] mulss xmm2, xmm1 addss xmm2, xmm0 movss [rsp+168h+var_158], xmm2 movaps xmm2, [rsp+168h+var_128] mulss xmm2, xmm1 movaps [rsp+168h+var_128], xmm2 shufps xmm1, xmm1, 55h ; 'U' shufps xmm0, xmm0, 55h ; 'U' movss xmm2, [rsp+168h+var_15C] mulss xmm2, xmm1 addss xmm2, xmm0 movss [rsp+168h+var_15C], xmm2 movaps xmm0, [rsp+168h+var_138] mulss xmm0, xmm1 movaps [rsp+168h+var_138], xmm0 loc_18B71: mov esi, 144h add rsi, [rsp+168h+var_C0] lea rdx, [r14+10h] lea r13, [rsp+168h+var_40] mov rdi, r13 call _ZNK7lunasvg9TransformmlERKS0_; lunasvg::Transform::operator*(lunasvg::Transform const&) mov rdi, r13; this call _ZNK7lunasvg9Transform6xScaleEv; lunasvg::Transform::xScale(void) movss [rsp+168h+var_154], xmm0 mov rdi, r13; this call _ZNK7lunasvg9Transform6yScaleEv; lunasvg::Transform::yScale(void) movss [rsp+168h+var_150], xmm0 movaps xmm2, [rsp+168h+var_128] mulss xmm2, [rsp+168h+var_154]; float movaps xmm3, [rsp+168h+var_138] mulss xmm3, xmm0; float lea rdi, [rsp+168h+var_148]; this xorps xmm0, xmm0; float xorps xmm1, xmm1; float call _ZN7lunasvg6Canvas6createEffff; lunasvg::Canvas::create(float,float,float,float) lea rdi, [rsp+168h+var_110]; this movss xmm0, [rsp+168h+var_154]; float movss xmm1, [rsp+168h+var_150]; float call _ZN7lunasvg9Transform6scaledEff; lunasvg::Transform::scaled(float,float) mov rdx, [rsp+168h+var_A8] movss xmm0, dword ptr [rdx+0B4h] ucomiss xmm0, cs:dword_4352C jb short loc_18C58 movss xmm0, dword ptr [rdx+0B8h] xorps xmm1, xmm1 ucomiss xmm0, xmm1 jb short loc_18C58 mov esi, 0C0h add rsi, [rsp+168h+var_A0] add rdx, 0ACh movaps xmm0, [rsp+168h+var_128] unpcklps xmm0, [rsp+168h+var_138] lea rcx, [rsp+168h+var_F8] movlps qword ptr [rcx], xmm0 lea rdi, [rsp+168h+var_90]; this call _ZNK7lunasvg22SVGPreserveAspectRatio12getTransformERKNS_4RectERKNS_4SizeE; lunasvg::SVGPreserveAspectRatio::getTransform(lunasvg::Rect const&,lunasvg::Size const&) lea rdi, [rsp+168h+var_110]; this lea rsi, [rsp+168h+var_90]; lunasvg::Transform * call _ZN7lunasvg9Transform8multiplyERKS0_; lunasvg::Transform::multiply(lunasvg::Transform const&) jmp short loc_18C89 loc_18C58: mov rax, [rsp+168h+var_B0] cmp byte ptr [rax+179h], 1 jnz short loc_18C89 mov rdi, [r14] mov rax, [rdi] call qword ptr [rax+58h] movaps xmm2, xmm1 shufps xmm2, xmm1, 55h ; 'U' lea rdi, [rsp+168h+var_110]; this movaps xmm0, xmm1; float movaps xmm1, xmm2; float call _ZN7lunasvg9Transform5scaleEff; lunasvg::Transform::scale(float,float) loc_18C89: mov rax, [rsp+168h+var_148] mov rcx, [rsp+168h+var_140] test rcx, rcx jz short loc_18CAD mov rdx, cs:__libc_single_threaded_ptr cmp byte ptr [rdx], 0 jz short loc_18CA9 inc dword ptr [rcx+8] jmp short loc_18CAD loc_18CA9: lock inc dword ptr [rcx+8] loc_18CAD: lea rsi, [rsp+168h+var_90] mov [rsi], r15 mov [rsi+8], r14 movups xmm0, [rsp+168h+var_110] movups xmmword ptr [rsi+10h], xmm0 mov rdx, [rsp+168h+var_100] mov [rsi+20h], rdx mov dword ptr [rsi+28h], 0 mov [rsi+30h], rax mov [rsi+38h], rcx mov rdi, r12 call _ZNK7lunasvg10SVGElement14renderChildrenERNS_14SVGRenderStateE; lunasvg::SVGElement::renderChildren(lunasvg::SVGRenderState &) mov rax, [rsp+168h+var_C0] movups xmm0, xmmword ptr [rax+144h] lea rdi, [rsp+168h+var_F8]; this movaps xmmword ptr [rdi], xmm0 mov rax, [rax+154h] mov [rdi+10h], rax movss xmm0, [rsp+168h+var_158]; float movss xmm1, [rsp+168h+var_15C]; float call _ZN7lunasvg9Transform9translateEff; lunasvg::Transform::translate(float,float) movss xmm1, cs:flt_430F4 movaps xmm0, xmm1 divss xmm0, [rsp+168h+var_154]; float divss xmm1, [rsp+168h+var_150]; float lea rdi, [rsp+168h+var_F8]; this call _ZN7lunasvg9Transform5scaleEff; lunasvg::Transform::scale(float,float) mov rdi, [r14+30h] mov rsi, [rsp+168h+var_148] lea rcx, [rsp+168h+var_F8] mov edx, 1 movss xmm0, [rsp+168h+var_14C] call _ZN7lunasvg6Canvas10setTextureERKS0_NS_11TextureTypeEfRKNS_9TransformE; lunasvg::Canvas::setTexture(lunasvg::Canvas const&,lunasvg::TextureType,float,lunasvg::Transform const&) mov rdi, [rsp+168h+var_58] test rdi, rdi jz short loc_18D69 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_18D69: mov rdi, [rsp+168h+var_140] test rdi, rdi jz short loc_18D78 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_18D78: mov eax, ebx add rsp, 140h pop rbx pop r12 pop r13 pop r14 pop r15 retn jmp short loc_18D91 jmp short loc_18D96 jmp short $+2 loc_18D91: mov rbx, rax jmp short loc_18DAB loc_18D96: mov rbx, rax mov rdi, [rsp+arg_108] test rdi, rdi jz short loc_18DAB call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_18DAB: mov rdi, [rsp+arg_20] test rdi, rdi jz short loc_18DBA call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_18DBA: mov rdi, rbx call __Unwind_Resume
long long lunasvg::SVGPatternElement::applyPaint( lunasvg::SVGPatternElement *this, lunasvg::SVGRenderState *a2, __m128 a3, __m128 a4) { long long *v4; // rbx lunasvg::SVGElement *v5; // r12 char v6; // al bool v7; // zf __m128 v8; // xmm2 float v9; // xmm1_4 __m128 v10; // xmm1 _QWORD *v11; // rax volatile signed __int32 *v12; // rcx float v14; // [rsp+Ch] [rbp-15Ch] float v15; // [rsp+10h] [rbp-158h] _QWORD *v16; // [rsp+20h] [rbp-148h] BYREF volatile signed __int32 *v17; // [rsp+28h] [rbp-140h] __m128 v18; // [rsp+30h] [rbp-138h] __m128 v19; // [rsp+40h] [rbp-128h] __int128 v20; // [rsp+58h] [rbp-110h] BYREF long long v21; // [rsp+68h] [rbp-100h] __int128 v22; // [rsp+70h] [rbp-F8h] BYREF long long v23; // [rsp+80h] [rbp-E8h] long long v24; // [rsp+88h] [rbp-E0h] BYREF long long v25; // [rsp+90h] [rbp-D8h] long long v26; // [rsp+98h] [rbp-D0h] long long v27; // [rsp+A0h] [rbp-C8h] long long v28; // [rsp+A8h] [rbp-C0h] long long v29; // [rsp+B0h] [rbp-B8h] long long v30; // [rsp+B8h] [rbp-B0h] long long v31; // [rsp+C0h] [rbp-A8h] lunasvg::SVGElement *v32; // [rsp+D0h] [rbp-98h] _QWORD v33[2]; // [rsp+D8h] [rbp-90h] BYREF __int128 v34; // [rsp+E8h] [rbp-80h] long long v35; // [rsp+F8h] [rbp-70h] int v36; // [rsp+100h] [rbp-68h] _QWORD *v37; // [rsp+108h] [rbp-60h] volatile signed __int32 *v38; // [rsp+110h] [rbp-58h] lunasvg::SVGPatternElement *v39; // [rsp+118h] [rbp-50h] BYREF char v40; // [rsp+120h] [rbp-48h] _BYTE v41[64]; // [rsp+128h] [rbp-40h] BYREF if ( (unsigned __int8)lunasvg::SVGRenderState::hasCycleReference(a2, this) ) { LODWORD(v4) = 0; } else { v4 = &v24; lunasvg::SVGPatternElement::collectPatternAttributes((lunasvg::SVGPatternElement *)&v24); v5 = v32; LOBYTE(v4) = v32 != 0LL; if ( v32 ) { v6 = *(_BYTE *)(v29 + 361); v39 = this; v40 = v6; *(double *)a3.m128_u64 = lunasvg::LengthContext::valueForLength(&v39, v24 + 228, *(unsigned __int8 *)(v24 + 225)); v15 = a3.m128_f32[0]; *(double *)a3.m128_u64 = lunasvg::LengthContext::valueForLength(&v39, v25 + 252, *(unsigned __int8 *)(v25 + 249)); v14 = a3.m128_f32[0]; *(double *)a3.m128_u64 = lunasvg::LengthContext::valueForLength(&v39, v26 + 276, *(unsigned __int8 *)(v26 + 273)); v19 = a3; *(double *)a3.m128_u64 = lunasvg::LengthContext::valueForLength(&v39, v27 + 300, *(unsigned __int8 *)(v27 + 297)); v7 = *(_BYTE *)(v29 + 361) == 1; v18 = a3; if ( v7 ) { *(double *)a3.m128_u64 = (*(double ( **)(_QWORD))(**(_QWORD **)a2 + 88LL))(*(_QWORD *)a2); v15 = (float)(v15 * a4.m128_f32[0]) + a3.m128_f32[0]; v8 = v19; v8.m128_f32[0] = v19.m128_f32[0] * a4.m128_f32[0]; v19 = v8; v9 = _mm_shuffle_ps(a4, a4, 85).m128_f32[0]; v14 = (float)(v14 * v9) + _mm_shuffle_ps(a3, a3, 85).m128_f32[0]; a3 = v18; a3.m128_f32[0] = v18.m128_f32[0] * v9; v18 = a3; } lunasvg::Transform::operator*((long long)v41, v28 + 324, (long long)a2 + 16); lunasvg::Transform::xScale((lunasvg::Transform *)v41); lunasvg::Transform::yScale((lunasvg::Transform *)v41); lunasvg::Canvas::create( (lunasvg::Canvas *)&v16, 0.0, 0.0, v19.m128_f32[0] * a3.m128_f32[0], v18.m128_f32[0] * a3.m128_f32[0]); v10 = (__m128)a3.m128_u32[0]; lunasvg::Transform::scaled((lunasvg::Transform *)&v20, a3.m128_f32[0], a3.m128_f32[0]); if ( *(float *)(v31 + 180) < 0.0 || (v10 = 0LL, *(float *)(v31 + 184) < 0.0) ) { if ( *(_BYTE *)(v30 + 377) == 1 ) { (*(void ( **)(_QWORD))(**(_QWORD **)a2 + 88LL))(*(_QWORD *)a2); lunasvg::Transform::scale( (lunasvg::Transform *)&v20, v10.m128_f32[0], _mm_shuffle_ps(v10, v10, 85).m128_f32[0]); } } else { _mm_storel_ps((double *)&v22, _mm_unpacklo_ps(v19, v18)); lunasvg::SVGPreserveAspectRatio::getTransform((lunasvg::Transform *)v33); lunasvg::Transform::multiply((lunasvg::Transform *)&v20, (const lunasvg::Transform *)v33); } v11 = v16; v12 = v17; if ( v17 ) { if ( _libc_single_threaded ) ++*((_DWORD *)v17 + 2); else _InterlockedIncrement(v17 + 2); } v33[0] = this; v33[1] = a2; v34 = v20; v35 = v21; v36 = 0; v37 = v11; v38 = v12; lunasvg::SVGElement::renderChildren(v5, (lunasvg::SVGRenderState *)v33); v22 = *(_OWORD *)(v28 + 324); v23 = *(_QWORD *)(v28 + 340); lunasvg::Transform::translate((lunasvg::Transform *)&v22, v15, v14); lunasvg::Transform::scale((lunasvg::Transform *)&v22, 1.0 / a3.m128_f32[0], 1.0 / a3.m128_f32[0]); lunasvg::Canvas::setTexture(*((_QWORD *)a2 + 6), v16); if ( v38 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v38); if ( v17 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v17); } } return (unsigned int)v4; }
applyPaint: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x140 MOVSS dword ptr [RSP + 0x1c],XMM0 MOV R14,RSI MOV R15,RDI MOV RDI,RSI MOV RSI,R15 CALL 0x00120d76 TEST AL,AL JZ 0x00118a3c XOR EBX,EBX JMP 0x00118d78 LAB_00118a3c: LEA RBX,[RSP + 0x88] MOV RDI,RBX MOV RSI,R15 CALL 0x00118dc2 MOV R12,qword ptr [RBX + 0x48] TEST R12,R12 SETNZ BL JZ 0x00118d78 MOV RSI,qword ptr [RSP + 0x88] MOV RAX,qword ptr [RSP + 0xb0] MOV AL,byte ptr [RAX + 0x169] LEA R13,[RSP + 0x118] MOV qword ptr [R13],R15 MOV byte ptr [R13 + 0x8],AL MOVZX EDX,byte ptr [RSI + 0xe1] ADD RSI,0xe4 MOV RDI,R13 CALL 0x0011f7ea MOVSS dword ptr [RSP + 0x10],XMM0 MOV RSI,qword ptr [RSP + 0x90] MOVZX EDX,byte ptr [RSI + 0xf9] ADD RSI,0xfc MOV RDI,R13 CALL 0x0011f7ea MOVSS dword ptr [RSP + 0xc],XMM0 MOV RSI,qword ptr [RSP + 0x98] MOVZX EDX,byte ptr [RSI + 0x111] ADD RSI,0x114 MOV RDI,R13 CALL 0x0011f7ea MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOV RSI,qword ptr [RSP + 0xa0] MOVZX EDX,byte ptr [RSI + 0x129] ADD RSI,0x12c MOV RDI,R13 CALL 0x0011f7ea MOV RAX,qword ptr [RSP + 0xb0] CMP byte ptr [RAX + 0x169],0x1 MOVAPS xmmword ptr [RSP + 0x30],XMM0 JNZ 0x00118b71 MOV RDI,qword ptr [R14] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x58] MOVSS XMM2,dword ptr [RSP + 0x10] MULSS XMM2,XMM1 ADDSS XMM2,XMM0 MOVSS dword ptr [RSP + 0x10],XMM2 MOVAPS XMM2,xmmword ptr [RSP + 0x40] MULSS XMM2,XMM1 MOVAPS xmmword ptr [RSP + 0x40],XMM2 SHUFPS XMM1,XMM1,0x55 SHUFPS XMM0,XMM0,0x55 MOVSS XMM2,dword ptr [RSP + 0xc] MULSS XMM2,XMM1 ADDSS XMM2,XMM0 MOVSS dword ptr [RSP + 0xc],XMM2 MOVAPS XMM0,xmmword ptr [RSP + 0x30] MULSS XMM0,XMM1 MOVAPS xmmword ptr [RSP + 0x30],XMM0 LAB_00118b71: MOV ESI,0x144 ADD RSI,qword ptr [RSP + 0xa8] LEA RDX,[R14 + 0x10] LEA R13,[RSP + 0x128] MOV RDI,R13 CALL 0x0010c91a MOV RDI,R13 CALL 0x0010ce06 MOVSS dword ptr [RSP + 0x14],XMM0 MOV RDI,R13 CALL 0x0010ce2c MOVSS dword ptr [RSP + 0x18],XMM0 MOVAPS XMM2,xmmword ptr [RSP + 0x40] MULSS XMM2,dword ptr [RSP + 0x14] MOVAPS XMM3,xmmword ptr [RSP + 0x30] MULSS XMM3,XMM0 LEA RDI,[RSP + 0x20] XORPS XMM0,XMM0 XORPS XMM1,XMM1 CALL 0x0010d8f0 LAB_00118bd2: LEA RDI,[RSP + 0x58] MOVSS XMM0,dword ptr [RSP + 0x14] MOVSS XMM1,dword ptr [RSP + 0x18] CALL 0x0010ca30 MOV RDX,qword ptr [RSP + 0xc0] MOVSS XMM0,dword ptr [RDX + 0xb4] UCOMISS XMM0,dword ptr [0x0014352c] JC 0x00118c58 MOVSS XMM0,dword ptr [RDX + 0xb8] XORPS XMM1,XMM1 UCOMISS XMM0,XMM1 JC 0x00118c58 MOV ESI,0xc0 ADD RSI,qword ptr [RSP + 0xc8] ADD RDX,0xac MOVAPS XMM0,xmmword ptr [RSP + 0x40] UNPCKLPS XMM0,xmmword ptr [RSP + 0x30] LEA RCX,[RSP + 0x70] MOVLPS qword ptr [RCX],XMM0 LAB_00118c37: LEA RDI,[RSP + 0xd8] CALL 0x001203bc LEA RDI,[RSP + 0x58] LEA RSI,[RSP + 0xd8] CALL 0x0010c964 JMP 0x00118c89 LAB_00118c58: MOV RAX,qword ptr [RSP + 0xb8] CMP byte ptr [RAX + 0x179],0x1 JNZ 0x00118c89 MOV RDI,qword ptr [R14] MOV RAX,qword ptr [RDI] LAB_00118c6f: CALL qword ptr [RAX + 0x58] MOVAPS XMM2,XMM1 SHUFPS XMM2,XMM1,0x55 LEA RDI,[RSP + 0x58] MOVAPS XMM0,XMM1 MOVAPS XMM1,XMM2 CALL 0x0010c9ea LAB_00118c89: MOV RAX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x28] TEST RCX,RCX JZ 0x00118cad MOV RDX,qword ptr [0x0015bfc8] CMP byte ptr [RDX],0x0 JZ 0x00118ca9 INC dword ptr [RCX + 0x8] JMP 0x00118cad LAB_00118ca9: INC.LOCK dword ptr [RCX + 0x8] LAB_00118cad: LEA RSI,[RSP + 0xd8] MOV qword ptr [RSI],R15 MOV qword ptr [RSI + 0x8],R14 MOVUPS XMM0,xmmword ptr [RSP + 0x58] MOVUPS xmmword ptr [RSI + 0x10],XMM0 MOV RDX,qword ptr [RSP + 0x68] MOV qword ptr [RSI + 0x20],RDX MOV dword ptr [RSI + 0x28],0x0 MOV qword ptr [RSI + 0x30],RAX MOV qword ptr [RSI + 0x38],RCX LAB_00118cdd: MOV RDI,R12 CALL 0x0010ffc0 MOV RAX,qword ptr [RSP + 0xa8] MOVUPS XMM0,xmmword ptr [RAX + 0x144] LEA RDI,[RSP + 0x70] MOVAPS xmmword ptr [RDI],XMM0 MOV RAX,qword ptr [RAX + 0x154] MOV qword ptr [RDI + 0x10],RAX LAB_00118d07: MOVSS XMM0,dword ptr [RSP + 0x10] MOVSS XMM1,dword ptr [RSP + 0xc] CALL 0x0010c996 MOVSS XMM1,dword ptr [0x001430f4] MOVAPS XMM0,XMM1 DIVSS XMM0,dword ptr [RSP + 0x14] DIVSS XMM1,dword ptr [RSP + 0x18] LEA RDI,[RSP + 0x70] CALL 0x0010c9ea MOV RDI,qword ptr [R14 + 0x30] MOV RSI,qword ptr [RSP + 0x20] LEA RCX,[RSP + 0x70] MOV EDX,0x1 MOVSS XMM0,dword ptr [RSP + 0x1c] CALL 0x0010daf0 LAB_00118d57: MOV RDI,qword ptr [RSP + 0x110] TEST RDI,RDI JZ 0x00118d69 CALL 0x0010c49a LAB_00118d69: MOV RDI,qword ptr [RSP + 0x28] TEST RDI,RDI JZ 0x00118d78 CALL 0x0010c49a LAB_00118d78: MOV EAX,EBX ADD RSP,0x140 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* lunasvg::SVGPatternElement::applyPaint(lunasvg::SVGRenderState&, float) const */ ulong lunasvg::SVGPatternElement::applyPaint(SVGRenderState *param_1,float param_2) { char cVar1; ulong uVar2; SVGRenderState *in_RSI; float fVar3; float fVar4; int8 uVar5; float in_XMM1_Da; float fVar6; float in_XMM1_Db; float fVar7; float local_15c; float local_158; int8 local_148; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_140; int8 local_138; int8 local_128; int8 local_110; int8 uStack_108; int8 local_100; int8 local_f8; int8 uStack_f0; int8 local_e8; long local_e0; long local_d8; long local_d0; long local_c8; long local_c0; long local_b8; long local_b0; long local_a8; long local_a0; SVGElement *local_98; SVGRenderState *local_90 [2]; int8 local_80; int8 uStack_78; int8 local_70; int4 local_68; int8 local_60; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58; SVGRenderState *local_50; int1 local_48; Transform local_40 [24]; cVar1 = SVGRenderState::hasCycleReference(in_RSI,(SVGElement *)param_1); if (cVar1 != '\0') { uVar2 = 0; goto LAB_00118d78; } collectPatternAttributes(); uVar2 = CONCAT71((int7)((ulong)&local_e0 >> 8),local_98 != (SVGElement *)0x0); if (local_98 == (SVGElement *)0x0) goto LAB_00118d78; local_48 = *(int1 *)(local_b8 + 0x169); local_50 = param_1; local_158 = (float)LengthContext::valueForLength ((LengthContext *)&local_50,local_e0 + 0xe4, *(int1 *)(local_e0 + 0xe1)); local_15c = (float)LengthContext::valueForLength ((LengthContext *)&local_50,local_d8 + 0xfc, *(int1 *)(local_d8 + 0xf9)); local_128 = LengthContext::valueForLength ((LengthContext *)&local_50,local_d0 + 0x114, *(int1 *)(local_d0 + 0x111)); local_138 = LengthContext::valueForLength ((LengthContext *)&local_50,local_c8 + 300,*(int1 *)(local_c8 + 0x129) ); if (*(char *)(local_b8 + 0x169) == '\x01') { uVar5 = (**(code **)(**(long **)in_RSI + 0x58))(); local_158 = local_158 * in_XMM1_Da + (float)uVar5; local_128 = CONCAT44(local_128._4_4_,(float)local_128 * in_XMM1_Da); local_15c = local_15c * in_XMM1_Db + (float)((ulong)uVar5 >> 0x20); local_138 = CONCAT44(local_138._4_4_,(float)local_138 * in_XMM1_Db); } Transform::operator*(local_40,(Transform *)(local_c0 + 0x144)); fVar3 = (float)Transform::xScale(local_40); fVar4 = (float)Transform::yScale(local_40); Canvas::create((Canvas *)&local_148,0.0,0.0,(float)local_128 * fVar3,(float)local_138 * fVar4); /* try { // try from 00118bd2 to 00118be7 has its CatchHandler @ 00118d91 */ fVar7 = 0.0; fVar6 = fVar4; Transform::scaled(fVar3,fVar4); if (*(float *)(local_a8 + 0xb4) < DAT_0014352c) { LAB_00118c58: if (*(char *)(local_b0 + 0x179) == '\x01') { /* try { // try from 00118c6f to 00118c88 has its CatchHandler @ 00118d8b */ (**(code **)(**(long **)in_RSI + 0x58))(); Transform::scale(fVar6,fVar7); } } else { fVar6 = 0.0; fVar7 = 0.0; if (*(float *)(local_a8 + 0xb8) < 0.0) goto LAB_00118c58; local_f8 = CONCAT44((float)local_138,(float)local_128); /* try { // try from 00118c37 to 00118c55 has its CatchHandler @ 00118d8f */ SVGPreserveAspectRatio::getTransform((Rect *)local_90,(Size *)(local_a0 + 0xc0)); Transform::multiply((Transform *)&local_110,(Transform *)local_90); } if (local_140 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_0015bfc8 == '\0') { LOCK(); *(int *)(local_140 + 8) = *(int *)(local_140 + 8) + 1; UNLOCK(); } else { *(int *)(local_140 + 8) = *(int *)(local_140 + 8) + 1; } } local_80 = local_110; uStack_78 = uStack_108; local_70 = local_100; local_68 = 0; local_60 = local_148; local_58 = local_140; local_90[0] = param_1; /* try { // try from 00118cdd to 00118ce4 has its CatchHandler @ 00118d8d */ SVGElement::renderChildren(local_98,(SVGRenderState *)local_90); local_f8 = *(int8 *)(local_c0 + 0x144); uStack_f0 = *(int8 *)(local_c0 + 0x14c); local_e8 = *(int8 *)(local_c0 + 0x154); /* try { // try from 00118d07 to 00118d56 has its CatchHandler @ 00118d96 */ Transform::translate(local_158,local_15c); Transform::scale(DAT_001430f4 / fVar3,DAT_001430f4 / fVar4); Canvas::setTexture(param_2,*(int8 *)(in_RSI + 0x30),local_148,1,&local_f8); if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58); } if (local_140 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_140); } LAB_00118d78: return uVar2 & 0xffffffff; }
16,625
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 0xa45f8 movb $0x0, 0x60(%rbx) cmpl $0x0, 0x5c(%rbx) je 0xa4605 leaq 0x28(%rbx), %rdi callq 0x295c0 jmp 0xa4605 movq %rbx, %rdi callq 0x29220 decl 0x58(%rbx) je 0xa45e7 movq %rbx, %rdi callq 0x291e0 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_A45F8 mov byte ptr [rbx+60h], 0 loc_A45E7: cmp dword ptr [rbx+5Ch], 0 jz short loc_A4605 lea rdi, [rbx+28h] call _pthread_cond_signal jmp short loc_A4605 loc_A45F8: mov rdi, rbx call _pthread_mutex_lock dec dword ptr [rbx+58h] jz short loc_A45E7 loc_A4605: 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 0x001a45f8 MOV byte ptr [RBX + 0x60],0x0 LAB_001a45e7: CMP dword ptr [RBX + 0x5c],0x0 JZ 0x001a4605 LEA RDI,[RBX + 0x28] CALL 0x001295c0 JMP 0x001a4605 LAB_001a45f8: MOV RDI,RBX CALL 0x00129220 DEC dword ptr [RBX + 0x58] JZ 0x001a45e7 LAB_001a4605: MOV RDI,RBX CALL 0x001291e0 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_001a4605; } else { *(int1 *)((long)param_1 + 0x60) = 0; } if (*(int *)((long)param_1 + 0x5c) != 0) { pthread_cond_signal((pthread_cond_t *)(param_1 + 1)); } LAB_001a4605: pthread_mutex_unlock(param_1); return 0; }
16,626
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 0x24280 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 0x00124280 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; }
16,627
lf_hash_delete
eloqsql/mysys/lf_hash.cc
int lf_hash_delete(LF_HASH *hash, LF_PINS *pins, const void *key, uint keylen) { LF_SLIST **el; uint bucket, hashnr; hashnr= hash->hash_function(hash->charset, (uchar *)key, keylen) & INT_MAX32; /* hide OOM errors - if we cannot initialize a bucket, try the previous one */ for (bucket= hashnr % hash->size; ;bucket= my_clear_highest_bit(bucket)) { el= (LF_SLIST **)lf_dynarray_lvalue(&hash->array, bucket); if (el && (*el || initialize_bucket(hash, el, bucket, pins) == 0)) break; if (unlikely(bucket == 0)) return 1; /* if there's no bucket==0, the hash is empty */ } if (l_delete(el, hash->charset, my_reverse_bits(hashnr) | 1, (uchar *)key, keylen, pins)) { return 1; } my_atomic_add32(&hash->count, -1); return 0; }
O0
cpp
lf_hash_delete: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movq -0x10(%rbp), %rax movq 0xa0(%rax), %rax movq -0x10(%rbp), %rcx movq 0xa8(%rcx), %rdi movq -0x20(%rbp), %rsi movl -0x24(%rbp), %ecx movl %ecx, %edx callq *%rax movl %eax, %eax andq $0x7fffffff, %rax # imm = 0x7FFFFFFF movl %eax, -0x38(%rbp) movl -0x38(%rbp), %eax movq -0x10(%rbp), %rcx movl 0xc0(%rcx), %ecx xorl %edx, %edx divl %ecx movl %edx, -0x34(%rbp) movq -0x10(%rbp), %rdi movl -0x34(%rbp), %esi callq 0xc7c30 movq %rax, -0x30(%rbp) cmpq $0x0, -0x30(%rbp) je 0xc8a63 movq -0x30(%rbp), %rax cmpq $0x0, (%rax) jne 0xc8a61 movq -0x10(%rbp), %rdi movq -0x30(%rbp), %rsi movl -0x34(%rbp), %edx movq -0x18(%rbp), %rcx callq 0xc8670 cmpl $0x0, %eax jne 0xc8a63 jmp 0xc8a8c cmpl $0x0, -0x34(%rbp) sete %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0xc8a7d movl $0x1, -0x4(%rbp) jmp 0xc8af7 jmp 0xc8a7f movl -0x34(%rbp), %edi callq 0xc8b00 movl %eax, -0x34(%rbp) jmp 0xc8a27 movq -0x30(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x10(%rbp), %rax movq 0xa8(%rax), %rax movq %rax, -0x48(%rbp) movl -0x38(%rbp), %edi callq 0xc87f0 movq -0x50(%rbp), %rdi movq -0x48(%rbp), %rsi movl %eax, %edx orl $0x1, %edx movq -0x20(%rbp), %rcx movl -0x24(%rbp), %r8d movq -0x18(%rbp), %r9 callq 0xc8b60 cmpl $0x0, %eax je 0xc8ad7 movl $0x1, -0x4(%rbp) jmp 0xc8af7 movq -0x10(%rbp), %rcx movl $0xffffffff, -0x3c(%rbp) # imm = 0xFFFFFFFF movl -0x3c(%rbp), %eax lock xaddl %eax, 0xc4(%rcx) movl %eax, -0x40(%rbp) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq
lf_hash_delete: 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_24], ecx mov rax, [rbp+var_10] mov rax, [rax+0A0h] mov rcx, [rbp+var_10] mov rdi, [rcx+0A8h] mov rsi, [rbp+var_20] mov ecx, [rbp+var_24] mov edx, ecx call rax mov eax, eax and rax, 7FFFFFFFh mov [rbp+var_38], eax mov eax, [rbp+var_38] mov rcx, [rbp+var_10] mov ecx, [rcx+0C0h] xor edx, edx div ecx mov [rbp+var_34], edx loc_C8A27: mov rdi, [rbp+var_10] mov esi, [rbp+var_34] call lf_dynarray_lvalue mov [rbp+var_30], rax cmp [rbp+var_30], 0 jz short loc_C8A63 mov rax, [rbp+var_30] cmp qword ptr [rax], 0 jnz short loc_C8A61 mov rdi, [rbp+var_10] mov rsi, [rbp+var_30] mov edx, [rbp+var_34] mov rcx, [rbp+var_18] call _ZL17initialize_bucketP10st_lf_hashPP8LF_SLISTjP7LF_PINS; initialize_bucket(st_lf_hash *,LF_SLIST **,uint,LF_PINS *) cmp eax, 0 jnz short loc_C8A63 loc_C8A61: jmp short loc_C8A8C loc_C8A63: cmp [rbp+var_34], 0 setz al and al, 1 movzx eax, al cmp eax, 0 jz short loc_C8A7D mov [rbp+var_4], 1 jmp short loc_C8AF7 loc_C8A7D: jmp short $+2 loc_C8A7F: mov edi, [rbp+var_34]; unsigned int call _ZL20my_clear_highest_bitj; my_clear_highest_bit(uint) mov [rbp+var_34], eax jmp short loc_C8A27 loc_C8A8C: mov rax, [rbp+var_30] mov [rbp+var_50], rax mov rax, [rbp+var_10] mov rax, [rax+0A8h] mov [rbp+var_48], rax mov edi, [rbp+var_38]; unsigned int call _ZL15my_reverse_bitsj; my_reverse_bits(uint) mov rdi, [rbp+var_50] mov rsi, [rbp+var_48] mov edx, eax or edx, 1 mov rcx, [rbp+var_20] mov r8d, [rbp+var_24] mov r9, [rbp+var_18] call _ZL8l_deletePP8LF_SLISTPK15charset_info_stjPKhjP7LF_PINS; l_delete(LF_SLIST **,charset_info_st const*,uint,uchar const*,uint,LF_PINS *) cmp eax, 0 jz short loc_C8AD7 mov [rbp+var_4], 1 jmp short loc_C8AF7 loc_C8AD7: mov rcx, [rbp+var_10] mov [rbp+var_3C], 0FFFFFFFFh mov eax, [rbp+var_3C] lock xadd [rcx+0C4h], eax mov [rbp+var_40], eax mov [rbp+var_4], 0 loc_C8AF7: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long lf_hash_delete(long long a1, long long a2, long long a3, unsigned int a4) { volatile signed long long *i; // rax int v5; // eax long long v8; // [rsp+8h] [rbp-48h] unsigned int v9; // [rsp+18h] [rbp-38h] int v10; // [rsp+1Ch] [rbp-34h] volatile signed long long *v11; // [rsp+20h] [rbp-30h] v9 = (*(long long ( **)(_QWORD, long long, _QWORD))(a1 + 160))(*(_QWORD *)(a1 + 168), a3, a4) & 0x7FFFFFFF; v10 = v9 % *(_DWORD *)(a1 + 192); for ( i = (volatile signed long long *)lf_dynarray_lvalue(a1, v10); ; i = (volatile signed long long *)lf_dynarray_lvalue(a1, v10) ) { v11 = i; if ( i ) { if ( *i || !(unsigned int)initialize_bucket(a1, i, v10, a2) ) break; } if ( !v10 ) return 1; v10 = my_clear_highest_bit(v10); } v8 = *(_QWORD *)(a1 + 168); v5 = my_reverse_bits(v9); if ( (unsigned int)l_delete(v11, v8, v5 | 1u, a3, a4, a2) ) { return 1; } else { _InterlockedExchangeAdd((volatile signed __int32 *)(a1 + 196), 0xFFFFFFFF); return 0; } }
lf_hash_delete: 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 dword ptr [RBP + -0x24],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xa0] MOV RCX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RCX + 0xa8] MOV RSI,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x24] MOV EDX,ECX CALL RAX MOV EAX,EAX AND RAX,0x7fffffff MOV dword ptr [RBP + -0x38],EAX MOV EAX,dword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0xc0] XOR EDX,EDX DIV ECX MOV dword ptr [RBP + -0x34],EDX LAB_001c8a27: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x34] CALL 0x001c7c30 MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -0x30],0x0 JZ 0x001c8a63 MOV RAX,qword ptr [RBP + -0x30] CMP qword ptr [RAX],0x0 JNZ 0x001c8a61 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x30] MOV EDX,dword ptr [RBP + -0x34] MOV RCX,qword ptr [RBP + -0x18] CALL 0x001c8670 CMP EAX,0x0 JNZ 0x001c8a63 LAB_001c8a61: JMP 0x001c8a8c LAB_001c8a63: CMP dword ptr [RBP + -0x34],0x0 SETZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x001c8a7d MOV dword ptr [RBP + -0x4],0x1 JMP 0x001c8af7 LAB_001c8a7d: JMP 0x001c8a7f LAB_001c8a7f: MOV EDI,dword ptr [RBP + -0x34] CALL 0x001c8b00 MOV dword ptr [RBP + -0x34],EAX JMP 0x001c8a27 LAB_001c8a8c: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xa8] MOV qword ptr [RBP + -0x48],RAX MOV EDI,dword ptr [RBP + -0x38] CALL 0x001c87f0 MOV RDI,qword ptr [RBP + -0x50] MOV RSI,qword ptr [RBP + -0x48] MOV EDX,EAX OR EDX,0x1 MOV RCX,qword ptr [RBP + -0x20] MOV R8D,dword ptr [RBP + -0x24] MOV R9,qword ptr [RBP + -0x18] CALL 0x001c8b60 CMP EAX,0x0 JZ 0x001c8ad7 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001c8af7 LAB_001c8ad7: MOV RCX,qword ptr [RBP + -0x10] MOV dword ptr [RBP + -0x3c],0xffffffff MOV EAX,dword ptr [RBP + -0x3c] XADD.LOCK dword ptr [RCX + 0xc4],EAX MOV dword ptr [RBP + -0x40],EAX MOV dword ptr [RBP + -0x4],0x0 LAB_001c8af7: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
int4 lf_hash_delete(st_lf_hash *param_1,LF_PINS *param_2,uchar *param_3,uint param_4) { charset_info_st *pcVar1; uint uVar2; int iVar3; LF_SLIST **ppLVar4; uint local_3c; uVar2 = (**(code **)(param_1 + 0xa0))(*(int8 *)(param_1 + 0xa8),param_3,param_4); local_3c = (uVar2 & 0x7fffffff) % *(uint *)(param_1 + 0xc0); while ((ppLVar4 = (LF_SLIST **)lf_dynarray_lvalue(param_1,local_3c), ppLVar4 == (LF_SLIST **)0x0 || ((*ppLVar4 == (LF_SLIST *)0x0 && (iVar3 = initialize_bucket(param_1,ppLVar4,local_3c,param_2), iVar3 != 0))))) { if (local_3c == 0) { return 1; } local_3c = my_clear_highest_bit(local_3c); } pcVar1 = *(charset_info_st **)(param_1 + 0xa8); uVar2 = my_reverse_bits(uVar2 & 0x7fffffff); iVar3 = l_delete(ppLVar4,pcVar1,uVar2 | 1,param_3,param_4,param_2); if (iVar3 != 0) { return 1; } LOCK(); *(int *)(param_1 + 0xc4) = *(int *)(param_1 + 0xc4) + -1; UNLOCK(); return 0; }
16,628
ImPlot3D::SetupLock()
zkingston[P]unknot/build_O1/_deps/implot3d-src/implot3d.cpp
void SetupLock() { ImPlot3DContext& gp = *GImPlot3D; IM_ASSERT_USER_ERROR(gp.CurrentPlot != nullptr, "SetupLock() needs to be called between BeginPlot() and EndPlot()!"); ImPlot3DPlot& plot = *gp.CurrentPlot; if (plot.SetupLocked) return; // Lock setup plot.SetupLocked = true; ImGuiContext& g = *GImGui; ImGuiWindow* window = g.CurrentWindow; ImDrawList* draw_list = window->DrawList; ImGui::PushClipRect(plot.FrameRect.Min, plot.FrameRect.Max, true); // Set default formatter/locator for (int i = 0; i < 3; i++) { ImPlot3DAxis& axis = plot.Axes[i]; // Set formatter if (axis.Formatter == nullptr) { axis.Formatter = Formatter_Default; if (axis.FormatterData == nullptr) axis.FormatterData = (void*)IMPLOT3D_LABEL_FORMAT; } // Set locator if (axis.Locator == nullptr) axis.Locator = Locator_Default; } // Draw frame background ImU32 f_bg_color = GetStyleColorU32(ImPlot3DCol_FrameBg); draw_list->AddRectFilled(plot.FrameRect.Min, plot.FrameRect.Max, f_bg_color); // Compute canvas/canvas rectangle plot.CanvasRect = ImRect(plot.FrameRect.Min + gp.Style.PlotPadding, plot.FrameRect.Max - gp.Style.PlotPadding); plot.PlotRect = plot.CanvasRect; // Compute ticks for (int i = 0; i < 3; i++) { ImPlot3DAxis& axis = plot.Axes[i]; if (axis.ShowDefaultTicks) { float pixels = plot.GetBoxZoom() * plot.BoxScale[i]; axis.Locator(axis.Ticker, axis.Range, pixels, axis.Formatter, axis.FormatterData); } } // Render title if (plot.HasTitle()) { ImU32 col = GetStyleColorU32(ImPlot3DCol_TitleText); ImVec2 top_center = ImVec2(plot.FrameRect.GetCenter().x, plot.CanvasRect.Min.y); AddTextCentered(draw_list, top_center, col, plot.GetTitle()); plot.PlotRect.Min.y += ImGui::GetTextLineHeight() + gp.Style.LabelPadding.y; } // Handle animation if (plot.AnimationTime > 0.0f) { float dt = ImGui::GetIO().DeltaTime; float t = ImClamp(dt / plot.AnimationTime, 0.0f, 1.0f); plot.AnimationTime -= dt; if (plot.AnimationTime < 0.0f) plot.AnimationTime = 0.0f; plot.Rotation = ImPlot3DQuat::Slerp(plot.Rotation, plot.RotationAnimationEnd, t); } plot.Initialized = true; // Handle user input HandleInput(plot); // Render plot box RenderPlotBox(draw_list, plot); ImGui::PopClipRect(); }
O1
cpp
ImPlot3D::SetupLock(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq 0x2e5fa0(%rip), %r13 # 0x336c98 cmpq $0x0, 0x28(%r13) jne 0x50d0b leaq 0x24480a(%rip), %rdi # 0x295510 callq 0x2161f4 movq 0x28(%r13), %rbx cmpb $0x0, 0x1e8(%rbx) jne 0x50fb3 movb $0x1, 0x1e8(%rbx) leaq 0x2e6306(%rip), %rax # 0x337030 movq (%rax), %rax movq 0x1368(%rax), %rax movq 0x2b0(%rax), %r14 leaq 0x24(%rbx), %r15 leaq 0x2c(%rbx), %r12 movq %r15, %rdi movq %r12, %rsi movl $0x1, %edx callq 0x2244d1 movl $0xd0, %eax leaq -0x28ac(%rip), %rcx # 0x4e4b3 leaq 0x24423c(%rip), %rdx # 0x294fa2 leaq -0x27c2(%rip), %rsi # 0x4e5ab cmpq $0x0, -0x10(%rbx,%rax) jne 0x50d87 movq %rcx, -0x10(%rbx,%rax) cmpq $0x0, -0x8(%rbx,%rax) jne 0x50d87 movq %rdx, -0x8(%rbx,%rax) cmpq $0x0, (%rbx,%rax) jne 0x50d92 movq %rsi, (%rbx,%rax) addq $0x70, %rax cmpq $0x220, %rax # imm = 0x220 jne 0x50d6d movq 0x2e5ef3(%rip), %rcx # 0x336c98 movss 0x14c(%rcx), %xmm0 ucomiss 0x23e250(%rip), %xmm0 # 0x28f004 jne 0x50dcb jp 0x50dcb movl $0x7, %edi callq 0x215eee movq %rax, %rcx addq $0x8, %rcx jmp 0x50dd9 leaq 0x140(%rcx), %rax addq $0x148, %rcx # imm = 0x148 movsd (%rax), %xmm0 movhps (%rcx), %xmm0 # xmm0 = xmm0[0,1],mem[0,1] leaq 0x8(%rsp), %rdi movups %xmm0, (%rdi) callq 0x213cfe xorl %ebp, %ebp xorps %xmm0, %xmm0 movq %r14, %rdi movq %r15, %rsi movq %r12, %rdx movl %eax, %ecx xorl %r8d, %r8d callq 0x23dbe4 movsd 0xb8(%r13), %xmm0 movsd 0x24(%rbx), %xmm1 movsd 0x2c(%rbx), %xmm2 addps %xmm0, %xmm1 subps %xmm0, %xmm2 movlhps %xmm2, %xmm1 # xmm1 = xmm1[0],xmm2[0] movups %xmm1, 0x34(%rbx) movups 0x34(%rbx), %xmm0 movups %xmm0, 0x44(%rbx) movl $0x72, %r15d cmpb $0x1, 0xd8(%rbx,%rbp) jne 0x50e81 movsd 0x44(%rbx), %xmm1 movsd 0x4c(%rbx), %xmm0 subps %xmm1, %xmm0 movaps %xmm0, %xmm1 shufps $0x55, %xmm0, %xmm1 # xmm1 = xmm1[1,1],xmm0[1,1] minss %xmm1, %xmm0 divss 0x24352b(%rip), %xmm0 # 0x294388 mulss (%rbx,%r15,4), %xmm0 leaq 0xa0(%rbx,%rbp), %rdi leaq (%rbx,%rbp), %rsi addq $0x80, %rsi movq 0x40(%rsi), %rdx movq 0x48(%rsi), %rcx callq *0x50(%rsi) addq $0x70, %rbp incq %r15 cmpq $0x75, %r15 jne 0x50e33 cmpl $0x2, 0x10(%rbx) jl 0x50f30 movl 0x4(%rbx), %eax andl $0x1, %eax jne 0x50f30 movq 0x2e5ded(%rip), %rcx # 0x336c98 movss 0x12c(%rcx), %xmm0 ucomiss 0x23e14a(%rip), %xmm0 # 0x28f004 jne 0x50ece jp 0x50ece xorl %edi, %edi callq 0x215eee movq %rax, %rcx addq $0x8, %rcx jmp 0x50edc leaq 0x120(%rcx), %rax addq $0x128, %rcx # imm = 0x128 movsd (%rax), %xmm0 movhps (%rcx), %xmm0 # xmm0 = xmm0[0,1],mem[0,1] leaq 0x8(%rsp), %rdi movups %xmm0, (%rdi) callq 0x213cfe movss 0x24(%rbx), %xmm0 addss 0x2c(%rbx), %xmm0 mulss 0x23e11e(%rip), %xmm0 # 0x28f020 movq 0x18(%rbx), %rdx movss 0x38(%rbx), %xmm1 unpcklps %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1] movq %r14, %rdi movl %eax, %esi callq 0x4b507 callq 0x22c54f addss 0xc4(%r13), %xmm0 addss 0x48(%rbx), %xmm0 movss %xmm0, 0x48(%rbx) movss 0x1d4(%rbx), %xmm0 xorps %xmm1, %xmm1 ucomiss %xmm1, %xmm0 jbe 0x50f97 callq 0x21ac26 movss 0x10(%rax), %xmm1 movss 0x1d4(%rbx), %xmm2 movaps %xmm1, %xmm0 divss %xmm2, %xmm0 movss 0x23e0a7(%rip), %xmm3 # 0x28f008 minss %xmm0, %xmm3 xorps %xmm4, %xmm4 cmpltss %xmm4, %xmm0 andnps %xmm3, %xmm0 subss %xmm1, %xmm2 maxss %xmm2, %xmm4 movss %xmm4, 0x1d4(%rbx) leaq 0x64(%rbx), %rdi leaq 0x1d8(%rbx), %rsi callq 0x53358 movlhps %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0] movups %xmm0, 0x64(%rbx) movb $0x1, 0x21(%rbx) movq %rbx, %rdi callq 0x51d77 movq %r14, %rdi movq %rbx, %rsi callq 0x4de7d callq 0x224522 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN8ImPlot3D9SetupLockEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r13, cs:_ZN8ImPlot3D9GImPlot3DE; ImPlot3D::GImPlot3D cmp qword ptr [r13+28h], 0 jnz short loc_50D0B lea rdi, aSetuplockNeeds; "SetupLock() needs to be called between "... call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*) loc_50D0B: mov rbx, [r13+28h] cmp byte ptr [rbx+1E8h], 0 jnz loc_50FB3 mov byte ptr [rbx+1E8h], 1 lea rax, GImGui mov rax, [rax] mov rax, [rax+1368h] mov r14, [rax+2B0h] lea r15, [rbx+24h] lea r12, [rbx+2Ch] mov rdi, r15 mov rsi, r12 mov edx, 1 call _ZN5ImGui12PushClipRectERK6ImVec2S2_b; ImGui::PushClipRect(ImVec2 const&,ImVec2 const&,bool) mov eax, 0D0h lea rcx, _ZN8ImPlot3D17Formatter_DefaultEfPciPv; ImPlot3D::Formatter_Default(float,char *,int,void *) lea rdx, aG; "%g" lea rsi, _ZN8ImPlot3D15Locator_DefaultER14ImPlot3DTickerRK13ImPlot3DRangefPFifPciPvES6_; int loc_50D6D: cmp qword ptr [rbx+rax-10h], 0 jnz short loc_50D87 mov [rbx+rax-10h], rcx cmp qword ptr [rbx+rax-8], 0 jnz short loc_50D87 mov [rbx+rax-8], rdx loc_50D87: cmp qword ptr [rbx+rax], 0 jnz short loc_50D92 mov [rbx+rax], rsi loc_50D92: add rax, 70h ; 'p' cmp rax, 220h jnz short loc_50D6D mov rcx, cs:_ZN8ImPlot3D9GImPlot3DE; ImPlot3D::GImPlot3D movss xmm0, dword ptr [rcx+14Ch] ucomiss xmm0, cs:flt_28F004 jnz short loc_50DCB jp short loc_50DCB mov edi, offset byte_7; this call _ZN5ImGui17GetStyleColorVec4Ei; ImGui::GetStyleColorVec4(int) mov rcx, rax add rcx, 8 jmp short loc_50DD9 loc_50DCB: lea rax, [rcx+140h] add rcx, 148h loc_50DD9: movsd xmm0, qword ptr [rax] movhps xmm0, qword ptr [rcx] lea rdi, [rsp+48h+var_40] movups xmmword ptr [rdi], xmm0 call _ZN5ImGui23ColorConvertFloat4ToU32ERK6ImVec4; ImGui::ColorConvertFloat4ToU32(ImVec4 const&) xor ebp, ebp xorps xmm0, xmm0 mov rdi, r14; this mov rsi, r15 mov rdx, r12 mov ecx, eax xor r8d, r8d call _ZN10ImDrawList13AddRectFilledERK6ImVec2S2_jfi; ImDrawList::AddRectFilled(ImVec2 const&,ImVec2 const&,uint,float,int) movsd xmm0, qword ptr [r13+0B8h] movsd xmm1, qword ptr [rbx+24h] movsd xmm2, qword ptr [rbx+2Ch] addps xmm1, xmm0 subps xmm2, xmm0 movlhps xmm1, xmm2 movups xmmword ptr [rbx+34h], xmm1 movups xmm0, xmmword ptr [rbx+34h] movups xmmword ptr [rbx+44h], xmm0 mov r15d, 72h ; 'r' loc_50E33: cmp byte ptr [rbx+rbp+0D8h], 1 jnz short loc_50E81 movsd xmm1, qword ptr [rbx+44h] movsd xmm0, qword ptr [rbx+4Ch] subps xmm0, xmm1 movaps xmm1, xmm0 shufps xmm1, xmm0, 55h ; 'U' minss xmm0, xmm1 divss xmm0, cs:dword_294388 mulss xmm0, dword ptr [rbx+r15*4] lea rdi, [rbx+rbp+0A0h] lea rsi, [rbx+rbp] add rsi, 80h; int mov rdx, [rsi+40h] mov rcx, [rsi+48h] call qword ptr [rsi+50h] loc_50E81: add rbp, 70h ; 'p' inc r15 cmp r15, 75h ; 'u' jnz short loc_50E33 cmp dword ptr [rbx+10h], 2 jl loc_50F30 mov eax, [rbx+4] and eax, 1 jnz loc_50F30 mov rcx, cs:_ZN8ImPlot3D9GImPlot3DE; ImPlot3D::GImPlot3D movss xmm0, dword ptr [rcx+12Ch] ucomiss xmm0, cs:flt_28F004 jnz short loc_50ECE jp short loc_50ECE xor edi, edi; this call _ZN5ImGui17GetStyleColorVec4Ei; ImGui::GetStyleColorVec4(int) mov rcx, rax add rcx, 8 jmp short loc_50EDC loc_50ECE: lea rax, [rcx+120h] add rcx, 128h loc_50EDC: movsd xmm0, qword ptr [rax] movhps xmm0, qword ptr [rcx] lea rdi, [rsp+48h+var_40] movups xmmword ptr [rdi], xmm0 call _ZN5ImGui23ColorConvertFloat4ToU32ERK6ImVec4; ImGui::ColorConvertFloat4ToU32(ImVec4 const&) movss xmm0, dword ptr [rbx+24h] addss xmm0, dword ptr [rbx+2Ch] mulss xmm0, dword ptr cs:xmmword_28F020 mov rdx, [rbx+18h] movss xmm1, dword ptr [rbx+38h] unpcklps xmm0, xmm1 mov rdi, r14; this mov esi, eax call _ZN8ImPlot3D15AddTextCenteredEP10ImDrawList6ImVec2jPKc; ImPlot3D::AddTextCentered(ImDrawList *,ImVec2,uint,char const*) call _ZN5ImGui17GetTextLineHeightEv; ImGui::GetTextLineHeight(void) addss xmm0, dword ptr [r13+0C4h] addss xmm0, dword ptr [rbx+48h] movss dword ptr [rbx+48h], xmm0 loc_50F30: movss xmm0, dword ptr [rbx+1D4h] xorps xmm1, xmm1 ucomiss xmm0, xmm1 jbe short loc_50F97 call _ZN5ImGui5GetIOEv; ImGui::GetIO(void) movss xmm1, dword ptr [rax+10h] movss xmm2, dword ptr [rbx+1D4h] movaps xmm0, xmm1 divss xmm0, xmm2 movss xmm3, cs:flt_28F008 minss xmm3, xmm0 xorps xmm4, xmm4 cmpltss xmm0, xmm4 andnps xmm0, xmm3; float subss xmm2, xmm1 maxss xmm4, xmm2 movss dword ptr [rbx+1D4h], xmm4 lea rdi, [rbx+64h]; this lea rsi, [rbx+1D8h]; ImPlot3DPlot * call _ZN12ImPlot3DQuat5SlerpERKS_S1_f; ImPlot3DQuat::Slerp(ImPlot3DQuat const&,ImPlot3DQuat const&,float) movlhps xmm0, xmm1 movups xmmword ptr [rbx+64h], xmm0 loc_50F97: mov byte ptr [rbx+21h], 1 mov rdi, rbx; this call _ZN8ImPlot3D11HandleInputER12ImPlot3DPlot; ImPlot3D::HandleInput(ImPlot3DPlot &) mov rdi, r14; this mov rsi, rbx; ImDrawList * call _ZN8ImPlot3D13RenderPlotBoxEP10ImDrawListRK12ImPlot3DPlot; ImPlot3D::RenderPlotBox(ImDrawList *,ImPlot3DPlot const&) call _ZN5ImGui11PopClipRectEv; ImGui::PopClipRect(void) loc_50FB3: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
void ImPlot3D::SetupLock(ImPlot3D *this, const char *a2, double a3) { ImGui *v3; // r13 long long v4; // rbx ImDrawList *v5; // r14 long long i; // rax const double *v7; // rcx long long v8; // rbp ImGui *v9; // rdi ImPlot3DPlot *v10; // rsi long long j; // r15 __m128 v12; // xmm0 const double *v13; // rcx unsigned int v14; // eax __m128 v15; // xmm0 __m128 v16; // xmm0 __m128 v17; // xmm0 __m128 v18; // xmm1 float v19; // xmm2_4 __m128 v20; // xmm0 __m128 v21; // xmm3 __m128 v22; // xmm0 const ImPlot3DQuat *v23; // rdx const ImPlot3DPlot *v24; // rdx long long v25; // rcx int *v26; // r8 __m128 v27[4]; // [rsp+8h] [rbp-40h] BYREF v3 = ImPlot3D::GImPlot3D; if ( !*((_QWORD *)ImPlot3D::GImPlot3D + 5) ) ImGui::ErrorLog((ImGui *)"SetupLock() needs to be called between BeginPlot() and EndPlot()!", a2); v4 = *((_QWORD *)v3 + 5); if ( !*(_BYTE *)(v4 + 488) ) { *(_BYTE *)(v4 + 488) = 1; v5 = *(ImDrawList **)(*((_QWORD *)GImGui + 621) + 688LL); ImGui::PushClipRect(v4 + 36, v4 + 44, 1LL, a3); for ( i = 208LL; i != 544; i += 112LL ) { if ( !*(_QWORD *)(v4 + i - 16) ) { *(_QWORD *)(v4 + i - 16) = ImPlot3D::Formatter_Default; if ( !*(_QWORD *)(v4 + i - 8) ) *(_QWORD *)(v4 + i - 8) = "%g"; } if ( !*(_QWORD *)(v4 + i) ) *(_QWORD *)(v4 + i) = ImPlot3D::Locator_Default; } if ( *((float *)ImPlot3D::GImPlot3D + 83) == -1.0 ) v7 = (const double *)(ImGui::GetStyleColorVec4((ImGui *)&byte_7, (int)ImPlot3D::Locator_Default) + 8); else v7 = (const double *)((char *)ImPlot3D::GImPlot3D + 328); v27[0] = _mm_loadh_ps(v7); ImGui::ColorConvertFloat4ToU32(v27); v8 = 0LL; v9 = v5; v10 = (ImPlot3DPlot *)(v4 + 36); ImDrawList::AddRectFilled(v5); *(__m128 *)(v4 + 52) = _mm_movelh_ps( _mm_add_ps((__m128)*(unsigned long long *)(v4 + 36), (__m128)*((unsigned long long *)v3 + 23)), _mm_sub_ps((__m128)*(unsigned long long *)(v4 + 44), (__m128)*((unsigned long long *)v3 + 23))); *(_OWORD *)(v4 + 68) = *(_OWORD *)(v4 + 52); for ( j = 114LL; j != 117; ++j ) { if ( *(_BYTE *)(v4 + v8 + 216) == 1 ) { v12 = _mm_sub_ps((__m128)*(unsigned long long *)(v4 + 76), (__m128)*(unsigned long long *)(v4 + 68)); v9 = (ImGui *)(v4 + v8 + 160); v10 = (ImPlot3DPlot *)(v4 + v8 + 128); (*(void ( **)(ImGui *, ImPlot3DPlot *, _QWORD, _QWORD, float))(v4 + v8 + 208))( v9, v10, *(_QWORD *)(v4 + v8 + 192), *(_QWORD *)(v4 + v8 + 200), (float)(fminf(v12.m128_f32[0], _mm_shuffle_ps(v12, v12, 85).m128_f32[0]) / 1.8) * *(float *)(v4 + 4 * j)); } v8 += 112LL; } if ( *(int *)(v4 + 16) >= 2 && (*(_DWORD *)(v4 + 4) & 1) == 0 ) { if ( *((float *)ImPlot3D::GImPlot3D + 75) == -1.0 ) v13 = (const double *)(ImGui::GetStyleColorVec4(0LL, (int)v10) + 8); else v13 = (const double *)((char *)ImPlot3D::GImPlot3D + 296); v27[0] = _mm_loadh_ps(v13); v14 = ImGui::ColorConvertFloat4ToU32(v27); v15 = (__m128)*(unsigned int *)(v4 + 36); v15.m128_f32[0] = (float)(v15.m128_f32[0] + *(float *)(v4 + 44)) * 0.5; v16 = _mm_unpacklo_ps(v15, (__m128)*(unsigned int *)(v4 + 56)); v9 = v5; v10 = (ImPlot3DPlot *)v14; ImPlot3D::AddTextCentered((long long)v5, v14, *(ImGui **)(v4 + 24), v16); ImGui::GetTextLineHeight(v5); *(float *)(v4 + 72) = (float)(v16.m128_f32[0] + *((float *)v3 + 49)) + *(float *)(v4 + 72); } v17.m128_u64[0] = *(unsigned int *)(v4 + 468); v18.m128_i32[0] = 0; if ( v17.m128_f32[0] > 0.0 ) { v18 = (__m128)*(unsigned int *)(ImGui::GetIO(v9) + 16); v19 = *(float *)(v4 + 468); v20 = v18; v20.m128_f32[0] = v18.m128_f32[0] / v19; v21 = (__m128)0x3F800000u; v21.m128_f32[0] = fminf(1.0, v18.m128_f32[0] / v19); v22 = _mm_andnot_ps(_mm_cmplt_ss(v20, (__m128)0LL), v21); *(float *)(v4 + 468) = fmaxf(0.0, v19 - v18.m128_f32[0]); v10 = (ImPlot3DPlot *)(v4 + 472); ImPlot3DQuat::Slerp((ImPlot3DQuat *)(v4 + 100), (const ImPlot3DQuat *)(v4 + 472), v23, v22.m128_f32[0]); v17 = _mm_movelh_ps(v22, v18); *(__m128 *)(v4 + 100) = v17; } *(_BYTE *)(v4 + 33) = 1; ImPlot3D::HandleInput((ImPlot3D *)v4, v10); ImPlot3D::RenderPlotBox(v5, (ImDrawList *)v4, v24, *(double *)v17.m128_u64, v18.m128_f32[0], v25, v26); ImGui::PopClipRect(v5); } }
SetupLock: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R13,qword ptr [0x00436c98] CMP qword ptr [R13 + 0x28],0x0 JNZ 0x00150d0b LEA RDI,[0x395510] CALL 0x003161f4 LAB_00150d0b: MOV RBX,qword ptr [R13 + 0x28] CMP byte ptr [RBX + 0x1e8],0x0 JNZ 0x00150fb3 MOV byte ptr [RBX + 0x1e8],0x1 LEA RAX,[0x437030] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1368] MOV R14,qword ptr [RAX + 0x2b0] LEA R15,[RBX + 0x24] LEA R12,[RBX + 0x2c] MOV RDI,R15 MOV RSI,R12 MOV EDX,0x1 CALL 0x003244d1 MOV EAX,0xd0 LEA RCX,[0x14e4b3] LEA RDX,[0x394fa2] LEA RSI,[0x14e5ab] LAB_00150d6d: CMP qword ptr [RBX + RAX*0x1 + -0x10],0x0 JNZ 0x00150d87 MOV qword ptr [RBX + RAX*0x1 + -0x10],RCX CMP qword ptr [RBX + RAX*0x1 + -0x8],0x0 JNZ 0x00150d87 MOV qword ptr [RBX + RAX*0x1 + -0x8],RDX LAB_00150d87: CMP qword ptr [RBX + RAX*0x1],0x0 JNZ 0x00150d92 MOV qword ptr [RBX + RAX*0x1],RSI LAB_00150d92: ADD RAX,0x70 CMP RAX,0x220 JNZ 0x00150d6d MOV RCX,qword ptr [0x00436c98] MOVSS XMM0,dword ptr [RCX + 0x14c] UCOMISS XMM0,dword ptr [0x0038f004] JNZ 0x00150dcb JP 0x00150dcb MOV EDI,0x7 CALL 0x00315eee MOV RCX,RAX ADD RCX,0x8 JMP 0x00150dd9 LAB_00150dcb: LEA RAX,[RCX + 0x140] ADD RCX,0x148 LAB_00150dd9: MOVSD XMM0,qword ptr [RAX] MOVHPS XMM0,qword ptr [RCX] LEA RDI,[RSP + 0x8] MOVUPS xmmword ptr [RDI],XMM0 CALL 0x00313cfe XOR EBP,EBP XORPS XMM0,XMM0 MOV RDI,R14 MOV RSI,R15 MOV RDX,R12 MOV ECX,EAX XOR R8D,R8D CALL 0x0033dbe4 MOVSD XMM0,qword ptr [R13 + 0xb8] MOVSD XMM1,qword ptr [RBX + 0x24] MOVSD XMM2,qword ptr [RBX + 0x2c] ADDPS XMM1,XMM0 SUBPS XMM2,XMM0 MOVLHPS XMM1,XMM2 MOVUPS xmmword ptr [RBX + 0x34],XMM1 MOVUPS XMM0,xmmword ptr [RBX + 0x34] MOVUPS xmmword ptr [RBX + 0x44],XMM0 MOV R15D,0x72 LAB_00150e33: CMP byte ptr [RBX + RBP*0x1 + 0xd8],0x1 JNZ 0x00150e81 MOVSD XMM1,qword ptr [RBX + 0x44] MOVSD XMM0,qword ptr [RBX + 0x4c] SUBPS XMM0,XMM1 MOVAPS XMM1,XMM0 SHUFPS XMM1,XMM0,0x55 MINSS XMM0,XMM1 DIVSS XMM0,dword ptr [0x00394388] MULSS XMM0,dword ptr [RBX + R15*0x4] LEA RDI,[RBX + RBP*0x1 + 0xa0] LEA RSI,[RBX + RBP*0x1] ADD RSI,0x80 MOV RDX,qword ptr [RSI + 0x40] MOV RCX,qword ptr [RSI + 0x48] CALL qword ptr [RSI + 0x50] LAB_00150e81: ADD RBP,0x70 INC R15 CMP R15,0x75 JNZ 0x00150e33 CMP dword ptr [RBX + 0x10],0x2 JL 0x00150f30 MOV EAX,dword ptr [RBX + 0x4] AND EAX,0x1 JNZ 0x00150f30 MOV RCX,qword ptr [0x00436c98] MOVSS XMM0,dword ptr [RCX + 0x12c] UCOMISS XMM0,dword ptr [0x0038f004] JNZ 0x00150ece JP 0x00150ece XOR EDI,EDI CALL 0x00315eee MOV RCX,RAX ADD RCX,0x8 JMP 0x00150edc LAB_00150ece: LEA RAX,[RCX + 0x120] ADD RCX,0x128 LAB_00150edc: MOVSD XMM0,qword ptr [RAX] MOVHPS XMM0,qword ptr [RCX] LEA RDI,[RSP + 0x8] MOVUPS xmmword ptr [RDI],XMM0 CALL 0x00313cfe MOVSS XMM0,dword ptr [RBX + 0x24] ADDSS XMM0,dword ptr [RBX + 0x2c] MULSS XMM0,dword ptr [0x0038f020] MOV RDX,qword ptr [RBX + 0x18] MOVSS XMM1,dword ptr [RBX + 0x38] UNPCKLPS XMM0,XMM1 MOV RDI,R14 MOV ESI,EAX CALL 0x0014b507 CALL 0x0032c54f ADDSS XMM0,dword ptr [R13 + 0xc4] ADDSS XMM0,dword ptr [RBX + 0x48] MOVSS dword ptr [RBX + 0x48],XMM0 LAB_00150f30: MOVSS XMM0,dword ptr [RBX + 0x1d4] XORPS XMM1,XMM1 UCOMISS XMM0,XMM1 JBE 0x00150f97 CALL 0x0031ac26 MOVSS XMM1,dword ptr [RAX + 0x10] MOVSS XMM2,dword ptr [RBX + 0x1d4] MOVAPS XMM0,XMM1 DIVSS XMM0,XMM2 MOVSS XMM3,dword ptr [0x0038f008] MINSS XMM3,XMM0 XORPS XMM4,XMM4 CMPLTSS XMM0,XMM4 ANDNPS XMM0,XMM3 SUBSS XMM2,XMM1 MAXSS XMM4,XMM2 MOVSS dword ptr [RBX + 0x1d4],XMM4 LEA RDI,[RBX + 0x64] LEA RSI,[RBX + 0x1d8] CALL 0x00153358 MOVLHPS XMM0,XMM1 MOVUPS xmmword ptr [RBX + 0x64],XMM0 LAB_00150f97: MOV byte ptr [RBX + 0x21],0x1 MOV RDI,RBX CALL 0x00151d77 MOV RDI,R14 MOV RSI,RBX CALL 0x0014de7d CALL 0x00324522 LAB_00150fb3: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* ImPlot3D::SetupLock() */ void ImPlot3D::SetupLock(void) { ImPlot3DPlot *pIVar1; ImDrawList *this; uint uVar2; int4 uVar3; long lVar4; int4 *puVar5; long lVar6; int8 *puVar7; long lVar8; float fVar9; float fVar10; float fVar12; int8 uVar11; float fVar13; float fVar14; int4 local_40; int4 uStack_3c; int4 uStack_38; int4 uStack_34; lVar6 = GImPlot3D; if (*(long *)(GImPlot3D + 0x28) == 0) { ImGui::ErrorLog("SetupLock() needs to be called between BeginPlot() and EndPlot()!"); } pIVar1 = *(ImPlot3DPlot **)(lVar6 + 0x28); if (pIVar1[0x1e8] == (ImPlot3DPlot)0x0) { pIVar1[0x1e8] = (ImPlot3DPlot)0x1; this = *(ImDrawList **)(*(long *)(GImGui + 0x1368) + 0x2b0); ImGui::PushClipRect(pIVar1 + 0x24,pIVar1 + 0x2c,true); lVar4 = 0xd0; do { if ((*(long *)(pIVar1 + lVar4 + -0x10) == 0) && (*(code **)(pIVar1 + lVar4 + -0x10) = Formatter_Default, *(long *)(pIVar1 + lVar4 + -8) == 0)) { *(int **)(pIVar1 + lVar4 + -8) = &DAT_00394fa2; } if (*(long *)(pIVar1 + lVar4) == 0) { *(code **)(pIVar1 + lVar4) = Locator_Default; } lVar4 = lVar4 + 0x70; } while (lVar4 != 0x220); if ((*(float *)(GImPlot3D + 0x14c) != DAT_0038f004) || (NAN(*(float *)(GImPlot3D + 0x14c)) || NAN(DAT_0038f004))) { puVar5 = (int4 *)(GImPlot3D + 0x140); puVar7 = (int8 *)(GImPlot3D + 0x148); } else { puVar5 = (int4 *)ImGui::GetStyleColorVec4(7); puVar7 = (int8 *)(puVar5 + 2); } local_40 = *puVar5; uStack_3c = puVar5[1]; uStack_38 = (int4)*puVar7; uStack_34 = (int4)((ulong)*puVar7 >> 0x20); uVar2 = ImGui::ColorConvertFloat4ToU32((ImVec4 *)&local_40); lVar4 = 0; ImDrawList::AddRectFilled(this,pIVar1 + 0x24,pIVar1 + 0x2c,uVar2,0.0,0); fVar9 = (float)*(int8 *)(lVar6 + 0xb8); fVar12 = (float)((ulong)*(int8 *)(lVar6 + 0xb8) >> 0x20); *(float *)(pIVar1 + 0x34) = (float)*(int8 *)(pIVar1 + 0x24) + fVar9; *(float *)(pIVar1 + 0x38) = (float)((ulong)*(int8 *)(pIVar1 + 0x24) >> 0x20) + fVar12; *(float *)(pIVar1 + 0x3c) = (float)*(int8 *)(pIVar1 + 0x2c) - fVar9; *(float *)(pIVar1 + 0x40) = (float)((ulong)*(int8 *)(pIVar1 + 0x2c) >> 0x20) - fVar12; *(int8 *)(pIVar1 + 0x44) = *(int8 *)(pIVar1 + 0x34); *(int8 *)(pIVar1 + 0x4c) = *(int8 *)(pIVar1 + 0x3c); lVar8 = 0x72; do { if (pIVar1[lVar4 + 0xd8] == (ImPlot3DPlot)0x1) { fVar9 = (float)*(int8 *)(pIVar1 + 0x4c) - (float)*(int8 *)(pIVar1 + 0x44); fVar12 = (float)((ulong)*(int8 *)(pIVar1 + 0x4c) >> 0x20) - (float)((ulong)*(int8 *)(pIVar1 + 0x44) >> 0x20); if (fVar12 <= fVar9) { fVar9 = fVar12; } (**(code **)(pIVar1 + lVar4 + 0xd0)) ((fVar9 / _DAT_00394388) * *(float *)(pIVar1 + lVar8 * 4),pIVar1 + lVar4 + 0xa0, pIVar1 + lVar4 + 0x80,*(int8 *)(pIVar1 + lVar4 + 0xc0), *(int8 *)(pIVar1 + lVar4 + 200)); } lVar4 = lVar4 + 0x70; lVar8 = lVar8 + 1; } while (lVar8 != 0x75); if ((1 < *(int *)(pIVar1 + 0x10)) && ((*(uint *)(pIVar1 + 4) & 1) == 0)) { if ((*(float *)(GImPlot3D + 300) != DAT_0038f004) || (NAN(*(float *)(GImPlot3D + 300)) || NAN(DAT_0038f004))) { puVar5 = (int4 *)(GImPlot3D + 0x120); puVar7 = (int8 *)(GImPlot3D + 0x128); } else { puVar5 = (int4 *)ImGui::GetStyleColorVec4(0); puVar7 = (int8 *)(puVar5 + 2); } local_40 = *puVar5; uStack_3c = puVar5[1]; uStack_38 = (int4)*puVar7; uStack_34 = (int4)((ulong)*puVar7 >> 0x20); uVar3 = ImGui::ColorConvertFloat4ToU32((ImVec4 *)&local_40); AddTextCentered((*(float *)(pIVar1 + 0x24) + *(float *)(pIVar1 + 0x2c)) * DAT_0038f020,this, uVar3,*(int8 *)(pIVar1 + 0x18)); fVar9 = (float)ImGui::GetTextLineHeight(); *(float *)(pIVar1 + 0x48) = fVar9 + *(float *)(lVar6 + 0xc4) + *(float *)(pIVar1 + 0x48); } if (0.0 < *(float *)(pIVar1 + 0x1d4)) { lVar6 = ImGui::GetIO(); fVar9 = *(float *)(lVar6 + 0x10); uVar3 = 0; fVar10 = fVar9 / *(float *)(pIVar1 + 0x1d4); fVar12 = DAT_0038f008; if (fVar10 <= DAT_0038f008) { fVar12 = fVar10; } fVar13 = *(float *)(pIVar1 + 0x1d4) - fVar9; fVar14 = 0.0; if (0.0 <= fVar13) { fVar14 = fVar13; } *(float *)(pIVar1 + 0x1d4) = fVar14; uVar11 = ImPlot3DQuat::Slerp((ImPlot3DQuat *)(pIVar1 + 100),(ImPlot3DQuat *)(pIVar1 + 0x1d8), (float)(~-(uint)(fVar10 < 0.0) & (uint)fVar12)); *(int8 *)(pIVar1 + 100) = uVar11; *(float *)(pIVar1 + 0x6c) = fVar9; *(int4 *)(pIVar1 + 0x70) = uVar3; } pIVar1[0x21] = (ImPlot3DPlot)0x1; HandleInput(pIVar1); RenderPlotBox(this,pIVar1); ImGui::PopClipRect(); } return; }
16,629
set_process_priority(ggml_sched_priority)
monkey531[P]llama/common/common.cpp
bool set_process_priority(enum ggml_sched_priority prio) { if (prio == GGML_SCHED_PRIO_NORMAL) { return true; } int p = 0; switch (prio) { case GGML_SCHED_PRIO_NORMAL: p = 0; break; case GGML_SCHED_PRIO_MEDIUM: p = -5; break; case GGML_SCHED_PRIO_HIGH: p = -10; break; case GGML_SCHED_PRIO_REALTIME: p = -20; break; } if (!setpriority(PRIO_PROCESS, 0, p)) { LOG_WRN("failed to set process priority %d : %s (%d)\n", prio, strerror(errno), errno); return false; } return true; }
O3
cpp
set_process_priority(ggml_sched_priority): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %edi, %ebx cmpl $0x3, %edi ja 0x75289 movl %ebx, %eax leaq 0x7c84a(%rip), %rcx # 0xf1ab0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movb $0x1, %bpl jmp 0x752df movl $0xfffffff6, %edx # imm = 0xFFFFFFF6 jmp 0x7528b movl $0xffffffec, %edx # imm = 0xFFFFFFEC jmp 0x7528b movl $0xfffffffb, %edx # imm = 0xFFFFFFFB jmp 0x7528b xorl %edx, %edx xorl %edi, %edi xorl %esi, %esi callq 0x1b230 testl %eax, %eax setne %bpl jne 0x752df leaq 0xbc32d(%rip), %rax # 0x1315d0 cmpl $0x0, (%rax) js 0x752df callq 0xcf8bb movq %rax, %r14 callq 0x1b060 movq %rax, %r15 movl (%rax), %edi callq 0x1b310 movl (%r15), %r9d leaq 0x7cbe9(%rip), %rdx # 0xf1eb2 xorl %ebp, %ebp movq %r14, %rdi movl $0x3, %esi movl %ebx, %ecx movq %rax, %r8 xorl %eax, %eax callq 0xcf958 movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
_Z20set_process_priority19ggml_sched_priority: push rbp push r15 push r14 push rbx push rax mov ebx, edi cmp edi, 3; switch 4 cases ja short def_7526D; jumptable 000000000007526D default case mov eax, ebx lea rcx, jpt_7526D movsxd rax, ds:(jpt_7526D - 0F1AB0h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_7526F: mov bpl, 1; jumptable 000000000007526D case 0 jmp short loc_752DF loc_75274: mov edx, 0FFFFFFF6h; jumptable 000000000007526D case 2 jmp short loc_7528B loc_7527B: mov edx, 0FFFFFFECh; jumptable 000000000007526D case 3 jmp short loc_7528B loc_75282: mov edx, 0FFFFFFFBh; jumptable 000000000007526D case 1 jmp short loc_7528B def_7526D: xor edx, edx; jumptable 000000000007526D default case loc_7528B: xor edi, edi xor esi, esi call _setpriority test eax, eax setnz bpl jnz short loc_752DF lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short loc_752DF call _Z15common_log_mainv; common_log_main(void) mov r14, rax call ___errno_location mov r15, rax mov edi, [rax] call _strerror mov r9d, [r15] lea rdx, aFailedToSetPro; "failed to set process priority %d : %s "... xor ebp, ebp mov rdi, r14 mov esi, 3 mov ecx, ebx mov r8, rax xor eax, eax call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) loc_752DF: mov eax, ebp add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long set_process_priority(int a1, double a2) { char v2; // al unsigned int v3; // ebp long long v4; // rdx int v5; // eax int v6; // r14d unsigned int *v7; // r15 int v8; // eax char v10; // [rsp-8h] [rbp-28h] v10 = v2; switch ( a1 ) { case 0: LOBYTE(v3) = 1; return v3; case 1: v4 = 4294967291LL; goto LABEL_7; case 2: v4 = 4294967286LL; goto LABEL_7; case 3: v4 = 4294967276LL; goto LABEL_7; default: v4 = 0LL; LABEL_7: v5 = setpriority(0LL, 0LL, v4); LOBYTE(v3) = v5 != 0; if ( !v5 && common_log_verbosity_thold >= 0 ) { v6 = common_log_main(); v7 = (unsigned int *)__errno_location(a2); v8 = strerror(*v7); v3 = 0; common_log_add(v6, 3, (unsigned int)"failed to set process priority %d : %s (%d)\n", a1, v8, *v7, v10); } return v3; } }
set_process_priority: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBX,EDI CMP EDI,0x3 JA 0x00175289 MOV EAX,EBX LEA RCX,[0x1f1ab0] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: MOV BPL,0x1 JMP 0x001752df caseD_2: MOV EDX,0xfffffff6 JMP 0x0017528b caseD_3: MOV EDX,0xffffffec JMP 0x0017528b caseD_1: MOV EDX,0xfffffffb JMP 0x0017528b default: XOR EDX,EDX LAB_0017528b: XOR EDI,EDI XOR ESI,ESI CALL 0x0011b230 TEST EAX,EAX SETNZ BPL JNZ 0x001752df LEA RAX,[0x2315d0] CMP dword ptr [RAX],0x0 JS 0x001752df CALL 0x001cf8bb MOV R14,RAX CALL 0x0011b060 MOV R15,RAX MOV EDI,dword ptr [RAX] CALL 0x0011b310 MOV R9D,dword ptr [R15] LEA RDX,[0x1f1eb2] XOR EBP,EBP MOV RDI,R14 MOV ESI,0x3 MOV ECX,EBX MOV R8,RAX XOR EAX,EAX CALL 0x001cf958 LAB_001752df: MOV EAX,EBP ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
/* set_process_priority(ggml_sched_priority) */ ulong set_process_priority(int4 param_1) { int iVar1; int8 uVar2; int *piVar3; char *pcVar4; int8 unaff_RBP; int7 uVar6; ulong uVar5; uVar6 = (int7)((ulong)unaff_RBP >> 8); switch(param_1) { case 0: uVar5 = CONCAT71(uVar6,1); goto LAB_001752df; case 1: iVar1 = -5; break; case 2: iVar1 = -10; break; case 3: iVar1 = -0x14; break; default: iVar1 = 0; } iVar1 = setpriority(PRIO_PROCESS,0,iVar1); uVar5 = CONCAT71(uVar6,iVar1 != 0); if ((iVar1 == 0) && (-1 < common_log_verbosity_thold)) { uVar2 = common_log_main(); piVar3 = __errno_location(); pcVar4 = strerror(*piVar3); uVar5 = 0; common_log_add(uVar2,3,"failed to set process priority %d : %s (%d)\n",param_1,pcVar4,*piVar3); } LAB_001752df: return uVar5 & 0xffffffff; }
16,630
js_date_getTimezoneOffset
bluesky950520[P]quickjs/quickjs.c
static JSValue js_date_getTimezoneOffset(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { // getTimezoneOffset() double v; if (JS_ThisTimeValue(ctx, &v, this_val)) return JS_EXCEPTION; if (isnan(v)) return JS_NAN; else /* assuming -8.64e15 <= v <= -8.64e15 */ return js_int64(getTimezoneOffset((int64_t)trunc(v))); }
O2
c
js_date_getTimezoneOffset: pushq %rax movq %rdx, %rcx movq %rsi, %rdx movq %rsp, %rsi callq 0x49887 testl %eax, %eax je 0x49394 pushq $0x6 popq %rdx xorl %eax, %eax jmp 0x493b6 movsd (%rsp), %xmm0 ucomisd %xmm0, %xmm0 jp 0x493b8 callq 0xe150 cvttsd2si %xmm0, %rdi callq 0x49afd movslq %eax, %rdi callq 0x1fe8f popq %rcx retq pushq $0x7 popq %rdx movabsq $0x7ff8000000000000, %rax # imm = 0x7FF8000000000000 jmp 0x493b6
js_date_getTimezoneOffset: push rax mov rcx, rdx mov rdx, rsi mov rsi, rsp call JS_ThisTimeValue test eax, eax jz short loc_49394 push 6 pop rdx xor eax, eax jmp short loc_493B6 loc_49394: movsd xmm0, [rsp+8+var_8] ucomisd xmm0, xmm0 jp short loc_493B8 call _trunc cvttsd2si rdi, xmm0 call getTimezoneOffset movsxd rdi, eax call js_int64 loc_493B6: pop rcx retn loc_493B8: push 7 pop rdx mov rax, 7FF8000000000000h jmp short loc_493B6
long long js_date_getTimezoneOffset(long long a1, long long a2, long long a3) { double v3; // rax double v5; // xmm0_8 int TimezoneOffset; // eax double v7; // [rsp+0h] [rbp-8h] BYREF v7 = v3; if ( (unsigned int)JS_ThisTimeValue(a1, &v7, a2, a3) ) return 0LL; v5 = trunc(v7); TimezoneOffset = getTimezoneOffset((unsigned int)(int)v5); return js_int64(TimezoneOffset); }
js_date_getTimezoneOffset: PUSH RAX MOV RCX,RDX MOV RDX,RSI MOV RSI,RSP CALL 0x00149887 TEST EAX,EAX JZ 0x00149394 PUSH 0x6 POP RDX XOR EAX,EAX JMP 0x001493b6 LAB_00149394: MOVSD XMM0,qword ptr [RSP] UCOMISD XMM0,XMM0 JP 0x001493b8 CALL 0x0010e150 CVTTSD2SI RDI,XMM0 CALL 0x00149afd MOVSXD RDI,EAX CALL 0x0011fe8f LAB_001493b6: POP RCX RET LAB_001493b8: PUSH 0x7 POP RDX MOV RAX,0x7ff8000000000000 JMP 0x001493b6
int8 js_date_getTimezoneOffset(int8 param_1,int8 param_2,int8 param_3) { int iVar1; double in_RAX; int8 uVar2; double dVar3; double local_8; local_8 = in_RAX; iVar1 = JS_ThisTimeValue(param_1,&local_8,param_2,param_3); if (iVar1 == 0) { if (NAN(local_8)) { uVar2 = 0x7ff8000000000000; } else { dVar3 = trunc(local_8); iVar1 = getTimezoneOffset((long)dVar3); uVar2 = js_int64((long)iVar1); } } else { uVar2 = 0; } return uVar2; }
16,631
fs_validate_filename(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/common.cpp
bool fs_validate_filename(const std::string & filename) { if (!filename.length()) { // Empty filename invalid return false; } if (filename.length() > 255) { // Limit at common largest possible filename on Linux filesystems // to avoid unnecessary further validation // (On systems with smaller limits it will be caught by the OS) return false; } std::u32string filename_utf32; try { #if defined(__clang__) // disable C++17 deprecation warning for std::codecvt_utf8 # pragma clang diagnostic push # pragma clang diagnostic ignored "-Wdeprecated-declarations" #endif std::wstring_convert<std::codecvt_utf8<char32_t>, char32_t> converter; #if defined(__clang__) # pragma clang diagnostic pop #endif filename_utf32 = converter.from_bytes(filename); // If the reverse conversion mismatches, it means overlong UTF-8 sequences were used, // or invalid encodings were encountered. Reject such attempts std::string filename_reencoded = converter.to_bytes(filename_utf32); if (filename_reencoded != filename) { return false; } } catch (const std::exception &) { return false; } // Check for forbidden codepoints: // - Control characters // - Unicode equivalents of illegal characters // - UTF-16 surrogate pairs // - UTF-8 replacement character // - Byte order mark (BOM) // - Illegal characters: / \ : * ? " < > | for (char32_t c : filename_utf32) { if (c <= 0x1F // Control characters (C0) || c == 0x7F // Control characters (DEL) || (c >= 0x80 && c <= 0x9F) // Control characters (C1) || c == 0xFF0E // Fullwidth Full Stop (period equivalent) || c == 0x2215 // Division Slash (forward slash equivalent) || c == 0x2216 // Set Minus (backslash equivalent) || (c >= 0xD800 && c <= 0xDFFF) // UTF-16 surrogate pairs || c == 0xFFFD // Replacement Character (UTF-8) || c == 0xFEFF // Byte Order Mark (BOM) || c == '/' || c == '\\' || c == ':' || c == '*' // Illegal characters || c == '?' || c == '"' || c == '<' || c == '>' || c == '|') { return false; } } // Reject any leading or trailing ' ', or any trailing '.', these are stripped on Windows and will cause a different filename // Unicode and other whitespace is not affected, only 0x20 space if (filename.front() == ' ' || filename.back() == ' ' || filename.back() == '.') { return false; } // Reject any ".." (currently stricter than necessary, it should be fine to just check for == ".." instead) if (filename.find("..") != std::string::npos) { return false; } // Reject "." if (filename == ".") { return false; } return true; }
O2
cpp
fs_validate_filename(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0xa8, %rsp movq $-0x100, %rax addq 0x8(%rdi), %rax cmpq $-0xff, %rax jae 0x5912e xorl %r14d, %r14d jmp 0x591c3 movq %rdi, %rbx leaq 0x18(%rsp), %rax movq %rax, -0x10(%rax) andq $0x0, -0x8(%rax) andl $0x0, (%rax) leaq 0x48(%rsp), %rdi callq 0x5cf08 leaq 0x28(%rsp), %rdi leaq 0x48(%rsp), %rsi movq %rbx, %rdx callq 0x5cf66 leaq 0x8(%rsp), %r14 leaq 0x28(%rsp), %r15 movq %r14, %rdi movq %r15, %rsi callq 0x5cf82 movq %r15, %rdi callq 0x5d02c leaq 0x28(%rsp), %rdi leaq 0x48(%rsp), %rsi movq %r14, %rdx callq 0x5d03c leaq 0x28(%rsp), %r14 movq %r14, %rdi movq %rbx, %rsi callq 0x5d058 movl %eax, %ebp movq %r14, %rdi callq 0x25288 leaq 0x48(%rsp), %rdi callq 0x5d062 testb %bpl, %bpl je 0x591d4 xorl %r14d, %r14d leaq 0x8(%rsp), %rdi callq 0x5d02c movl %r14d, %eax addq $0xa8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq 0x8(%rsp), %rax movq 0x10(%rsp), %rcx shlq $0x2, %rcx xorl %edx, %edx movabsq $0x400000035002101, %rsi # imm = 0x400000035002101 cmpq %rdx, %rcx je 0x59287 movl (%rax,%rdx), %edi xorl %r14d, %r14d cmpl $0x20, %edi jb 0x591b9 cmpl $0x7f, %edi je 0x591b9 movl %edi, %r8d andl $-0x20, %r8d cmpl $0x80, %r8d je 0x591b9 xorl %r14d, %r14d leal -0x2215(%rdi), %r8d cmpl $0x2, %r8d jb 0x591b9 cmpl $0xff0e, %edi # imm = 0xFF0E je 0x591b9 movl %edi, %r8d andl $0xfffff800, %r8d # imm = 0xFFFFF800 cmpl $0xd800, %r8d # imm = 0xD800 je 0x591b6 xorl %r14d, %r14d leal -0x22(%rdi), %r8d cmpl $0x3a, %r8d ja 0x5925d btq %r8, %rsi jb 0x591b9 cmpl $0x7c, %edi je 0x591b9 cmpl $0xfeff, %edi # imm = 0xFEFF je 0x591b9 addq $0x4, %rdx cmpl $0xfffd, %edi # imm = 0xFFFD jne 0x591ee jmp 0x591b9 movq (%rbx), %rax cmpb $0x20, (%rax) je 0x591b6 movq 0x8(%rbx), %rcx movzbl -0x1(%rax,%rcx), %eax xorl %r14d, %r14d cmpl $0x20, %eax je 0x591b9 cmpl $0x2e, %eax je 0x591b9 leaq 0x59648(%rip), %rsi # 0xb2900 xorl %r14d, %r14d movq %rbx, %rdi xorl %edx, %edx callq 0x25230 cmpq $-0x1, %rax jne 0x591b9 leaq 0x5962b(%rip), %rsi # 0xb2901 movq %rbx, %rdi callq 0x28d1d movl %eax, %r14d xorb $0x1, %r14b jmp 0x591b9 jmp 0x592ec movq %rdx, %r14 movq %rax, %rbx leaq 0x48(%rsp), %rdi callq 0x5d062 jmp 0x59304 movq %rdx, %r14 movq %rax, %rbx cmpl $0x1, %r14d jne 0x5931f movq %rbx, %rdi callq 0x243a0 callq 0x24ee0 jmp 0x591b6 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x5d02c movq %rbx, %rdi callq 0x25020
_Z20fs_validate_filenameRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push rbx sub rsp, 0A8h mov rax, 0FFFFFFFFFFFFFF00h add rax, [rdi+8] cmp rax, 0FFFFFFFFFFFFFF01h jnb short loc_5912E xor r14d, r14d jmp loc_591C3 loc_5912E: mov rbx, rdi lea rax, [rsp+0C8h+var_B0] mov [rax-10h], rax and qword ptr [rax-8], 0 and dword ptr [rax], 0 lea rdi, [rsp+0C8h+var_80] call _ZNSt7__cxx1115wstring_convertISt12codecvt_utf8IDiLm1114111ELSt12codecvt_mode0EEDiSaIDiESaIcEEC2Ev; std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::wstring_convert(void) lea rdi, [rsp+0C8h+var_A0] lea rsi, [rsp+0C8h+var_80] mov rdx, rbx call _ZNSt7__cxx1115wstring_convertISt12codecvt_utf8IDiLm1114111ELSt12codecvt_mode0EEDiSaIDiESaIcEE10from_bytesERKNS_12basic_stringIcSt11char_traitsIcES5_EE; std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::from_bytes(std::string const&) lea r14, [rsp+0C8h+var_C0] lea r15, [rsp+0C8h+var_A0] mov rdi, r14 mov rsi, r15 call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEaSEOS4_; std::basic_string<char32_t>::operator=(std::basic_string<char32_t>&&) mov rdi, r15 call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEED2Ev; std::basic_string<char32_t>::~basic_string() lea rdi, [rsp+0C8h+var_A0] lea rsi, [rsp+0C8h+var_80] mov rdx, r14 call _ZNSt7__cxx1115wstring_convertISt12codecvt_utf8IDiLm1114111ELSt12codecvt_mode0EEDiSaIDiESaIcEE8to_bytesERKNS_12basic_stringIDiSt11char_traitsIDiES4_EE; std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::to_bytes(std::basic_string<char32_t> const&) lea r14, [rsp+0C8h+var_A0] mov rdi, r14 mov rsi, rbx call _ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EESA_; std::operator!=<char>(std::string const&,std::string const&) mov ebp, eax mov rdi, r14; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0C8h+var_80] call _ZNSt7__cxx1115wstring_convertISt12codecvt_utf8IDiLm1114111ELSt12codecvt_mode0EEDiSaIDiESaIcEED2Ev; std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::~wstring_convert() test bpl, bpl jz short loc_591D4 loc_591B6: xor r14d, r14d loc_591B9: lea rdi, [rsp+0C8h+var_C0] call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEED2Ev; std::basic_string<char32_t>::~basic_string() loc_591C3: mov eax, r14d add rsp, 0A8h pop rbx pop r14 pop r15 pop rbp retn loc_591D4: mov rax, [rsp+0C8h+var_C0] mov rcx, [rsp+0C8h+var_B8] shl rcx, 2 xor edx, edx mov rsi, 400000035002101h loc_591EE: cmp rcx, rdx jz loc_59287 mov edi, [rax+rdx] xor r14d, r14d cmp edi, 20h ; ' ' jb short loc_591B9 cmp edi, 7Fh jz short loc_591B9 mov r8d, edi and r8d, 0FFFFFFE0h cmp r8d, 80h jz short loc_591B9 xor r14d, r14d lea r8d, [rdi-2215h] cmp r8d, 2 jb short loc_591B9 cmp edi, 0FF0Eh jz short loc_591B9 mov r8d, edi and r8d, 0FFFFF800h cmp r8d, 0D800h jz loc_591B6 xor r14d, r14d lea r8d, [rdi-22h] cmp r8d, 3Ah ; ':' ja short loc_5925D bt rsi, r8 jb loc_591B9 loc_5925D: cmp edi, 7Ch ; '|' jz loc_591B9 cmp edi, 0FEFFh jz loc_591B9 add rdx, 4 cmp edi, 0FFFDh jnz loc_591EE jmp loc_591B9 loc_59287: mov rax, [rbx] cmp byte ptr [rax], 20h ; ' ' jz loc_591B6 mov rcx, [rbx+8] movzx eax, byte ptr [rax+rcx-1] xor r14d, r14d cmp eax, 20h ; ' ' jz loc_591B9 cmp eax, 2Eh ; '.' jz loc_591B9 lea rsi, aN0N1+7; ".." xor r14d, r14d mov rdi, rbx xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcm; std::string::find(char const*,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh jnz loc_591B9 lea rsi, aN0N1+8; "." mov rdi, rbx call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) mov r14d, eax xor r14b, 1 jmp loc_591B9 jmp short $+2 loc_592EC: mov r14, rdx mov rbx, rax lea rdi, [rsp+0C8h+var_80] call _ZNSt7__cxx1115wstring_convertISt12codecvt_utf8IDiLm1114111ELSt12codecvt_mode0EEDiSaIDiESaIcEED2Ev; std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::~wstring_convert() jmp short loc_59304 mov r14, rdx mov rbx, rax loc_59304: cmp r14d, 1 jnz short loc_5931F mov rdi, rbx; void * call ___cxa_begin_catch call ___cxa_end_catch jmp loc_591B6 mov rbx, rax loc_5931F: lea rdi, [rsp+0C8h+var_C0] call _ZNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEED2Ev; std::basic_string<char32_t>::~basic_string() mov rdi, rbx call __Unwind_Resume
long long fs_validate_filename(_QWORD *a1) { unsigned int v1; // r14d char v3; // bp long long v5; // rdx long long v6; // rsi unsigned int v7; // edi unsigned long long v8; // r8 int v9; // eax unsigned int v10; // eax int *v11; // [rsp+8h] [rbp-C0h] BYREF long long v12; // [rsp+10h] [rbp-B8h] int v13; // [rsp+18h] [rbp-B0h] BYREF _BYTE v14[32]; // [rsp+28h] [rbp-A0h] BYREF _BYTE v15[128]; // [rsp+48h] [rbp-80h] BYREF if ( (unsigned long long)(a1[1] - 256LL) >= 0xFFFFFFFFFFFFFF01LL ) { v11 = &v13; v12 = 0LL; v13 = 0; std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::wstring_convert(v15); std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::from_bytes( v14, v15, a1); std::basic_string<char32_t>::operator=(&v11, v14); std::basic_string<char32_t>::~basic_string(v14); std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::to_bytes( v14, v15, &v11); v3 = std::operator!=<char>(v14, a1); std::string::~string(v14); std::wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>>::~wstring_convert(v15); if ( v3 ) goto LABEL_4; v5 = 0LL; v6 = 0x400000035002101LL; while ( v12 != v5 ) { v7 = v11[v5]; v1 = 0; if ( v7 >= 0x20 && v7 != 127 && (v7 & 0xFFFFFFE0) != 0x80 ) { v1 = 0; if ( v7 - 8725 >= 2 && v7 != 65294 ) { if ( (v7 & 0xFFFFF800) == 0xD800 ) goto LABEL_4; v1 = 0; v8 = v7 - 34; if ( ((unsigned int)v8 > 0x3A || !_bittest64(&v6, v8)) && v7 != 124 && v7 != 65279 ) { ++v5; if ( v7 != 65533 ) continue; } } } goto LABEL_5; } if ( *(_BYTE *)*a1 == 32 ) { LABEL_4: v1 = 0; } else { v9 = *(unsigned __int8 *)(*a1 + a1[1] - 1LL); v1 = 0; if ( v9 != 32 && v9 != 46 ) { v1 = 0; if ( std::string::find(a1, "..", 0LL) == -1 ) { LOBYTE(v10) = std::operator==<char>((long long)a1); v1 = v10; LOBYTE(v1) = v10 ^ 1; } } } LABEL_5: std::basic_string<char32_t>::~basic_string(&v11); } else { return 0; } return v1; }
fs_validate_filename: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0xa8 MOV RAX,-0x100 ADD RAX,qword ptr [RDI + 0x8] CMP RAX,-0xff JNC 0x0015912e XOR R14D,R14D JMP 0x001591c3 LAB_0015912e: MOV RBX,RDI LEA RAX,[RSP + 0x18] MOV qword ptr [RAX + -0x10],RAX AND qword ptr [RAX + -0x8],0x0 AND dword ptr [RAX],0x0 LAB_00159142: LEA RDI,[RSP + 0x48] CALL 0x0015cf08 LAB_0015914c: LEA RDI,[RSP + 0x28] LEA RSI,[RSP + 0x48] MOV RDX,RBX CALL 0x0015cf66 LEA R14,[RSP + 0x8] LEA R15,[RSP + 0x28] MOV RDI,R14 MOV RSI,R15 CALL 0x0015cf82 MOV RDI,R15 CALL 0x0015d02c LAB_0015917b: LEA RDI,[RSP + 0x28] LEA RSI,[RSP + 0x48] MOV RDX,R14 CALL 0x0015d03c LAB_0015918d: LEA R14,[RSP + 0x28] MOV RDI,R14 MOV RSI,RBX CALL 0x0015d058 MOV EBP,EAX MOV RDI,R14 CALL 0x00125288 LEA RDI,[RSP + 0x48] CALL 0x0015d062 TEST BPL,BPL JZ 0x001591d4 LAB_001591b6: XOR R14D,R14D LAB_001591b9: LEA RDI,[RSP + 0x8] CALL 0x0015d02c LAB_001591c3: MOV EAX,R14D ADD RSP,0xa8 POP RBX POP R14 POP R15 POP RBP RET LAB_001591d4: MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x10] SHL RCX,0x2 XOR EDX,EDX MOV RSI,0x400000035002101 LAB_001591ee: CMP RCX,RDX JZ 0x00159287 MOV EDI,dword ptr [RAX + RDX*0x1] XOR R14D,R14D CMP EDI,0x20 JC 0x001591b9 CMP EDI,0x7f JZ 0x001591b9 MOV R8D,EDI AND R8D,0xffffffe0 CMP R8D,0x80 JZ 0x001591b9 XOR R14D,R14D LEA R8D,[RDI + -0x2215] CMP R8D,0x2 JC 0x001591b9 CMP EDI,0xff0e JZ 0x001591b9 MOV R8D,EDI AND R8D,0xfffff800 CMP R8D,0xd800 JZ 0x001591b6 XOR R14D,R14D LEA R8D,[RDI + -0x22] CMP R8D,0x3a JA 0x0015925d BT RSI,R8 JC 0x001591b9 LAB_0015925d: CMP EDI,0x7c JZ 0x001591b9 CMP EDI,0xfeff JZ 0x001591b9 ADD RDX,0x4 CMP EDI,0xfffd JNZ 0x001591ee JMP 0x001591b9 LAB_00159287: MOV RAX,qword ptr [RBX] CMP byte ptr [RAX],0x20 JZ 0x001591b6 MOV RCX,qword ptr [RBX + 0x8] MOVZX EAX,byte ptr [RAX + RCX*0x1 + -0x1] XOR R14D,R14D CMP EAX,0x20 JZ 0x001591b9 CMP EAX,0x2e JZ 0x001591b9 LEA RSI,[0x1b2900] XOR R14D,R14D MOV RDI,RBX XOR EDX,EDX CALL 0x00125230 CMP RAX,-0x1 JNZ 0x001591b9 LEA RSI,[0x1b2901] MOV RDI,RBX CALL 0x00128d1d MOV R14D,EAX XOR R14B,0x1 JMP 0x001591b9
/* fs_validate_filename(std::__cxx11::string const&) */ ulong fs_validate_filename(string *param_1) { char cVar1; uint uVar2; bool bVar3; int7 extraout_var; long lVar4; ulong uVar5; int4 *local_c0; long local_b8; int4 local_b0 [4]; wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>> local_a0 [32]; wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>> local_80 [96]; if (*(long *)(param_1 + 8) - 0x100U < 0xffffffffffffff01) { uVar5 = 0; } else { local_c0 = local_b0; local_b8 = 0; local_b0[0] = 0; /* try { // try from 00159142 to 0015914b has its CatchHandler @ 001592fe */ std::__cxx11:: wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>> ::wstring_convert(local_80); /* try { // try from 0015914c to 0015915d has its CatchHandler @ 001592ec */ std::__cxx11:: wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>> ::from_bytes(local_a0,(string *)local_80); std::__cxx11::u32string::operator=((u32string *)&local_c0,(u32string *)local_a0); std::__cxx11::u32string::~u32string((u32string *)local_a0); /* try { // try from 0015917b to 0015918c has its CatchHandler @ 001592ea */ std::__cxx11:: wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>> ::to_bytes(local_a0,(u32string *)local_80); bVar3 = std::operator!=((string *)local_a0,param_1); std::__cxx11::string::~string((string *)local_a0); std::__cxx11:: wstring_convert<std::codecvt_utf8<char32_t,1114111ul,(std::codecvt_mode)0>,char32_t,std::allocator<char32_t>,std::allocator<char>> ::~wstring_convert(local_80); if (bVar3) { LAB_001591b6: uVar5 = 0; } else { lVar4 = 0; while (local_b8 << 2 != lVar4) { uVar2 = *(uint *)((long)local_c0 + lVar4); uVar5 = 0; if ((((uVar2 < 0x20) || (uVar2 == 0x7f)) || ((uVar2 & 0xffffffe0) == 0x80)) || ((uVar5 = 0, uVar2 - 0x2215 < 2 || (uVar2 == 0xff0e)))) goto LAB_001591b9; if ((uVar2 & 0xfffff800) == 0xd800) goto LAB_001591b6; uVar5 = 0; if (((uVar2 - 0x22 < 0x3b) && ((0x400000035002101U >> ((ulong)(uVar2 - 0x22) & 0x3f) & 1) != 0)) || ((uVar2 == 0x7c || ((uVar2 == 0xfeff || (lVar4 = lVar4 + 4, uVar2 == 0xfffd)))))) goto LAB_001591b9; } if (**(char **)param_1 == ' ') goto LAB_001591b6; cVar1 = (*(char **)param_1)[*(long *)(param_1 + 8) + -1]; uVar5 = 0; if ((cVar1 != ' ') && (cVar1 != '.')) { uVar5 = 0; lVar4 = std::__cxx11::string::find((char *)param_1,0x1b2900); if (lVar4 == -1) { bVar3 = std::operator==(param_1,"."); uVar5 = CONCAT71(extraout_var,bVar3) & 0xffffffff ^ 1; } } } LAB_001591b9: std::__cxx11::u32string::~u32string((u32string *)&local_c0); } return uVar5; }
16,632
init_tmpdir
eloqsql/mysys/mf_tempdir.c
my_bool init_tmpdir(MY_TMPDIR *tmpdir, const char *pathlist) { char *end, *copy; char buff[FN_REFLEN]; DBUG_ENTER("init_tmpdir"); DBUG_PRINT("enter", ("pathlist: %s", pathlist ? pathlist : "NULL")); mysql_mutex_init(key_TMPDIR_mutex, &tmpdir->mutex, MY_MUTEX_INIT_FAST); if (my_init_dynamic_array(key_memory_MY_TMPDIR_full_list, &tmpdir->full_list, sizeof(char*), 1, 5, MYF(0))) goto err; if (!pathlist || !pathlist[0]) { /* Get default temporary directory */ pathlist=getenv("TMPDIR"); /* Use this if possible */ #if defined(_WIN32) if (!pathlist) pathlist=getenv("TEMP"); if (!pathlist) pathlist=getenv("TMP"); #endif if (!pathlist || !pathlist[0]) pathlist= DEFAULT_TMPDIR; } do { size_t length; end=strcend(pathlist, DELIM); strmake(buff, pathlist, (uint) (end-pathlist)); length= cleanup_dirname(buff, buff); if (!(copy= my_strndup(key_memory_MY_TMPDIR_full_list, buff, length, MYF(MY_WME))) || insert_dynamic(&tmpdir->full_list, (uchar*) &copy)) DBUG_RETURN(TRUE); pathlist=end+1; } while (*end); freeze_size(&tmpdir->full_list); tmpdir->list=(char **)tmpdir->full_list.buffer; tmpdir->max=tmpdir->full_list.elements-1; tmpdir->cur=0; DBUG_RETURN(FALSE); err: delete_dynamic(&tmpdir->full_list); /* Safe to free */ mysql_mutex_destroy(&tmpdir->mutex); DBUG_RETURN(TRUE); }
O3
c
init_tmpdir: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x218, %rsp # imm = 0x218 movq %rsi, %r14 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) leaq 0x3846a2(%rip), %rax # 0x3eee00 movl (%rax), %edi leaq 0x38(%rbx), %r15 leaq 0x2e4d7d(%rip), %r12 # 0x34f4e8 movq (%r12), %rax movq %r15, %rsi callq *0x40(%rax) movq %rax, 0x78(%rbx) movq %r15, 0x70(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x60(%rbx) leaq 0x385355(%rip), %rsi # 0x3efae0 movq %r15, %rdi callq 0x29640 leaq 0x384fe2(%rip), %rax # 0x3ef77c movl (%rax), %edi movq $0x0, (%rsp) movq %rbx, %rsi movl $0x8, %edx xorl %ecx, %ecx movl $0x1, %r8d movl $0x5, %r9d callq 0x5dc98 testb %al, %al je 0x6a816 movq %rbx, %rdi callq 0x5df90 movq 0x78(%rbx), %rdi testq %rdi, %rdi je 0x6a7e3 movq (%r12), %rax callq *0x48(%rax) movq $0x0, 0x78(%rbx) movq %r15, %rdi callq 0x294b0 movb $0x1, %r14b movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x6a8ed movl %r14d, %eax addq $0x218, %rsp # imm = 0x218 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq testq %r14, %r14 je 0x6a821 cmpb $0x0, (%r14) jne 0x6a841 leaq 0x430a5(%rip), %rdi # 0xad8cd callq 0x29540 testq %rax, %rax je 0x6a83a movq %rax, %r14 cmpb $0x0, (%rax) jne 0x6a841 leaq 0x43093(%rip), %r14 # 0xad8d4 leaq -0x230(%rbp), %r15 leaq -0x238(%rbp), %r12 movq %r14, %rdi movl $0x3a, %esi callq 0xa5a94 movq %rax, %r13 movl %r13d, %edx subl %r14d, %edx movq %r15, %rdi movq %r14, %rsi callq 0xa5af8 movq %r15, %rdi movq %r15, %rsi callq 0x69007 leaq 0x384efa(%rip), %rcx # 0x3ef77c movl (%rcx), %edi movl $0x10, %ecx movq %r15, %rsi movq %rax, %rdx callq 0x70474 movq %rax, -0x238(%rbp) movb $0x1, %r14b testq %rax, %rax je 0x6a7ee movq %rbx, %rdi movq %r12, %rsi callq 0x5dd36 testb %al, %al jne 0x6a7ee movq %r13, %r14 incq %r14 cmpb $0x0, (%r13) jne 0x6a84f movq %rbx, %rdi callq 0x5e038 movq (%rbx), %rax movq %rax, 0x28(%rbx) movl 0x8(%rbx), %eax decl %eax movl %eax, 0x34(%rbx) movl $0x0, 0x30(%rbx) xorl %r14d, %r14d jmp 0x6a7ee callq 0x29470
init_tmpdir: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 218h mov r14, rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax lea rax, key_TMPDIR_mutex mov edi, [rax] lea r15, [rbx+38h] lea r12, PSI_server mov rax, [r12] mov rsi, r15 call qword ptr [rax+40h] mov [rbx+78h], rax mov [rbx+70h], r15 xorps xmm0, xmm0 movups xmmword ptr [rbx+60h], xmm0 lea rsi, my_fast_mutexattr mov rdi, r15 call _pthread_mutex_init lea rax, key_memory_MY_TMPDIR_full_list mov edi, [rax] mov [rsp+240h+var_240], 0 mov rsi, rbx mov edx, 8 xor ecx, ecx mov r8d, 1 mov r9d, 5 call init_dynamic_array2 test al, al jz short loc_6A816 mov rdi, rbx call delete_dynamic mov rdi, [rbx+78h] test rdi, rdi jz short loc_6A7E3 mov rax, [r12] call qword ptr [rax+48h] mov qword ptr [rbx+78h], 0 loc_6A7E3: mov rdi, r15 call _pthread_mutex_destroy mov r14b, 1 loc_6A7EE: mov rax, fs:28h cmp rax, [rbp+var_30] jnz loc_6A8ED mov eax, r14d add rsp, 218h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6A816: test r14, r14 jz short loc_6A821 cmp byte ptr [r14], 0 jnz short loc_6A841 loc_6A821: lea rdi, aTmpdir; "TMPDIR" call _getenv test rax, rax jz short loc_6A83A mov r14, rax cmp byte ptr [rax], 0 jnz short loc_6A841 loc_6A83A: lea r14, aTmp; "/tmp" loc_6A841: lea r15, [rbp+var_230] lea r12, [rbp+var_238] loc_6A84F: mov rdi, r14 mov esi, 3Ah ; ':' call strcend mov r13, rax mov edx, r13d sub edx, r14d mov rdi, r15 mov rsi, r14 call strmake mov rdi, r15 mov rsi, r15 call cleanup_dirname lea rcx, key_memory_MY_TMPDIR_full_list mov edi, [rcx] mov ecx, 10h mov rsi, r15 mov rdx, rax call my_strndup mov [rbp+var_238], rax mov r14b, 1 test rax, rax jz loc_6A7EE mov rdi, rbx mov rsi, r12 call insert_dynamic test al, al jnz loc_6A7EE mov r14, r13 inc r14 cmp byte ptr [r13+0], 0 jnz short loc_6A84F mov rdi, rbx call freeze_size mov rax, [rbx] mov [rbx+28h], rax mov eax, [rbx+8] dec eax mov [rbx+34h], eax mov dword ptr [rbx+30h], 0 xor r14d, r14d jmp loc_6A7EE loc_6A8ED: call ___stack_chk_fail
long long init_tmpdir(long long a1, const char *a2) { const char *v2; // r14 const char *v4; // rax _BYTE *v5; // r13 long long v6; // rax long long v7; // [rsp+8h] [rbp-238h] BYREF unsigned __int8 v8[512]; // [rsp+10h] [rbp-230h] BYREF unsigned long long v9; // [rsp+210h] [rbp-30h] v2 = a2; v9 = __readfsqword(0x28u); *(_QWORD *)(a1 + 120) = (*((long long ( **)(_QWORD, long long))PSI_server + 8))(key_TMPDIR_mutex, a1 + 56); *(_QWORD *)(a1 + 112) = a1 + 56; *(_OWORD *)(a1 + 96) = 0LL; pthread_mutex_init(a1 + 56, &my_fast_mutexattr); if ( (unsigned __int8)init_dynamic_array2(key_memory_MY_TMPDIR_full_list, a1, 8u, 0LL, 1u, 5u, 0LL) ) { delete_dynamic((long long *)a1); if ( *(_QWORD *)(a1 + 120) ) { (*((void (**)(void))PSI_server + 9))(); *(_QWORD *)(a1 + 120) = 0LL; } pthread_mutex_destroy(a1 + 56); LOBYTE(v2) = 1; } else { if ( !a2 || !*a2 ) { v4 = (const char *)getenv("TMPDIR"); if ( !v4 || (v2 = v4, !*v4) ) v2 = "/tmp"; } while ( 1 ) { v5 = (_BYTE *)strcend(v2, 58LL); strmake(v8, v2, (unsigned int)((_DWORD)v5 - (_DWORD)v2)); v6 = cleanup_dirname((long long)v8, v8); v7 = my_strndup(key_memory_MY_TMPDIR_full_list, v8, v6, 16LL); LOBYTE(v2) = 1; if ( !v7 || (unsigned __int8)insert_dynamic(a1, (long long)&v7) ) break; v2 = v5 + 1; if ( !*v5 ) { freeze_size(a1); *(_QWORD *)(a1 + 40) = *(_QWORD *)a1; *(_DWORD *)(a1 + 52) = *(_DWORD *)(a1 + 8) - 1; *(_DWORD *)(a1 + 48) = 0; LODWORD(v2) = 0; return (unsigned int)v2; } } } return (unsigned int)v2; }
init_tmpdir: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x218 MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX LEA RAX,[0x4eee00] MOV EDI,dword ptr [RAX] LEA R15,[RBX + 0x38] LEA R12,[0x44f4e8] MOV RAX,qword ptr [R12] MOV RSI,R15 CALL qword ptr [RAX + 0x40] MOV qword ptr [RBX + 0x78],RAX MOV qword ptr [RBX + 0x70],R15 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x60],XMM0 LEA RSI,[0x4efae0] MOV RDI,R15 CALL 0x00129640 LEA RAX,[0x4ef77c] MOV EDI,dword ptr [RAX] MOV qword ptr [RSP],0x0 MOV RSI,RBX MOV EDX,0x8 XOR ECX,ECX MOV R8D,0x1 MOV R9D,0x5 CALL 0x0015dc98 TEST AL,AL JZ 0x0016a816 MOV RDI,RBX CALL 0x0015df90 MOV RDI,qword ptr [RBX + 0x78] TEST RDI,RDI JZ 0x0016a7e3 MOV RAX,qword ptr [R12] CALL qword ptr [RAX + 0x48] MOV qword ptr [RBX + 0x78],0x0 LAB_0016a7e3: MOV RDI,R15 CALL 0x001294b0 MOV R14B,0x1 LAB_0016a7ee: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0016a8ed MOV EAX,R14D ADD RSP,0x218 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016a816: TEST R14,R14 JZ 0x0016a821 CMP byte ptr [R14],0x0 JNZ 0x0016a841 LAB_0016a821: LEA RDI,[0x1ad8cd] CALL 0x00129540 TEST RAX,RAX JZ 0x0016a83a MOV R14,RAX CMP byte ptr [RAX],0x0 JNZ 0x0016a841 LAB_0016a83a: LEA R14,[0x1ad8d4] LAB_0016a841: LEA R15,[RBP + -0x230] LEA R12,[RBP + -0x238] LAB_0016a84f: MOV RDI,R14 MOV ESI,0x3a CALL 0x001a5a94 MOV R13,RAX MOV EDX,R13D SUB EDX,R14D MOV RDI,R15 MOV RSI,R14 CALL 0x001a5af8 MOV RDI,R15 MOV RSI,R15 CALL 0x00169007 LEA RCX,[0x4ef77c] MOV EDI,dword ptr [RCX] MOV ECX,0x10 MOV RSI,R15 MOV RDX,RAX CALL 0x00170474 MOV qword ptr [RBP + -0x238],RAX MOV R14B,0x1 TEST RAX,RAX JZ 0x0016a7ee MOV RDI,RBX MOV RSI,R12 CALL 0x0015dd36 TEST AL,AL JNZ 0x0016a7ee MOV R14,R13 INC R14 CMP byte ptr [R13],0x0 JNZ 0x0016a84f MOV RDI,RBX CALL 0x0015e038 MOV RAX,qword ptr [RBX] MOV qword ptr [RBX + 0x28],RAX MOV EAX,dword ptr [RBX + 0x8] DEC EAX MOV dword ptr [RBX + 0x34],EAX MOV dword ptr [RBX + 0x30],0x0 XOR R14D,R14D JMP 0x0016a7ee LAB_0016a8ed: CALL 0x00129470
ulong init_tmpdir(int8 *param_1,char *param_2) { pthread_mutex_t *__mutex; char cVar1; int8 uVar2; char *pcVar3; ulong uVar4; long in_FS_OFFSET; long local_240; int1 local_238 [512]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); __mutex = (pthread_mutex_t *)(param_1 + 7); uVar2 = (**(code **)(PSI_server + 0x40))(key_TMPDIR_mutex,__mutex); param_1[0xf] = uVar2; param_1[0xe] = __mutex; param_1[0xc] = 0; param_1[0xd] = 0; pthread_mutex_init(__mutex,(pthread_mutexattr_t *)&my_fast_mutexattr); cVar1 = init_dynamic_array2(key_memory_MY_TMPDIR_full_list,param_1,8,0,1,5,0); if (cVar1 == '\0') { if ((param_2 == (char *)0x0) || (*param_2 == '\0')) { param_2 = getenv("TMPDIR"); if ((param_2 == (char *)0x0) || (*param_2 == '\0')) { param_2 = "/tmp"; } } do { pcVar3 = (char *)strcend(param_2,0x3a); strmake(local_238,param_2,(int)pcVar3 - (int)param_2); uVar2 = cleanup_dirname(local_238,local_238); local_240 = my_strndup(key_memory_MY_TMPDIR_full_list,local_238,uVar2,0x10); uVar4 = CONCAT71((int7)((ulong)param_2 >> 8),1); if (local_240 == 0) goto LAB_0016a7ee; cVar1 = insert_dynamic(param_1,&local_240); if (cVar1 != '\0') goto LAB_0016a7ee; param_2 = pcVar3 + 1; } while (*pcVar3 != '\0'); freeze_size(param_1); param_1[5] = *param_1; *(int *)((long)param_1 + 0x34) = *(int *)(param_1 + 1) + -1; *(int4 *)(param_1 + 6) = 0; uVar4 = 0; } else { delete_dynamic(param_1); if (param_1[0xf] != 0) { (**(code **)(PSI_server + 0x48))(); param_1[0xf] = 0; } pthread_mutex_destroy(__mutex); uVar4 = CONCAT71((int7)((ulong)param_2 >> 8),1); } LAB_0016a7ee: if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return uVar4 & 0xffffffff; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
16,633
lre_is_in_table
bluesky950520[P]quickjs/libunicode.c
static BOOL lre_is_in_table(uint32_t c, const uint8_t *table, const uint8_t *index_table, int index_table_len) { uint32_t code, b, bit; int pos; const uint8_t *p; pos = get_index_pos(&code, c, index_table, index_table_len); if (pos < 0) return FALSE; /* outside the table */ p = table + pos; bit = 0; for(;;) { b = *p++; if (b < 64) { code += (b >> 3) + 1; if (c < code) return bit; bit ^= 1; code += (b & 7) + 1; } else if (b >= 0x80) { code += b - 0x80 + 1; } else if (b < 0x60) { code += (((b - 0x40) << 8) | p[0]) + 1; p++; } else { code += (((b - 0x60) << 16) | (p[0] << 8) | p[1]) + 1; p += 2; } if (c < code) return bit; bit ^= 1; } }
O1
c
lre_is_in_table: pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movl %edi, %ebx leaq 0x4(%rsp), %rdi movl %ebx, %esi callq 0x9e5b3 testl %eax, %eax js 0x9c672 movl %eax, %eax addq %rax, %r14 xorl %eax, %eax movl 0x4(%rsp), %ecx leaq 0x1(%r14), %rdx movzbl (%r14), %esi cmpl $0x3f, %esi ja 0x9c611 movl %esi, %edi shrl $0x3, %edi addl %edi, %ecx incl %ecx movl %ecx, 0x4(%rsp) cmpl %ebx, %ecx ja 0x9c674 xorl $0x1, %eax andl $0x7, %esi addl %esi, %ecx incl %ecx jmp 0x9c63b testb %sil, %sil js 0x9c636 movzbl (%rdx), %edx cmpb $0x5f, %sil ja 0x9c641 shll $0x8, %esi orl %edx, %esi addl %esi, %ecx addl $0xffffc001, %ecx # imm = 0xFFFFC001 movl %ecx, 0x4(%rsp) addq $0x2, %r14 jmp 0x9c660 addl %esi, %ecx addl $-0x7f, %ecx movl %ecx, 0x4(%rsp) jmp 0x9c663 shll $0x10, %esi shll $0x8, %edx orl %esi, %edx movzbl 0x2(%r14), %esi orl %edx, %esi addl %esi, %ecx addl $0xffa00001, %ecx # imm = 0xFFA00001 movl %ecx, 0x4(%rsp) addq $0x3, %r14 movq %r14, %rdx cmpl %ebx, %ecx ja 0x9c674 xorl $0x1, %eax movq %rdx, %r14 jmp 0x9c5e7 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq
lre_is_in_table: push r14 push rbx push rax mov r14, rsi mov ebx, edi lea rdi, [rsp+18h+var_14] mov esi, ebx call get_index_pos test eax, eax js loc_9C672 mov eax, eax add r14, rax xor eax, eax mov ecx, [rsp+18h+var_14] loc_9C5E7: lea rdx, [r14+1] movzx esi, byte ptr [r14] cmp esi, 3Fh ; '?' ja short loc_9C611 mov edi, esi shr edi, 3 add ecx, edi inc ecx mov [rsp+18h+var_14], ecx cmp ecx, ebx ja short loc_9C674 xor eax, 1 and esi, 7 add ecx, esi inc ecx jmp short loc_9C63B loc_9C611: test sil, sil js short loc_9C636 movzx edx, byte ptr [rdx] cmp sil, 5Fh ; '_' ja short loc_9C641 shl esi, 8 or esi, edx add ecx, esi add ecx, 0FFFFC001h mov [rsp+18h+var_14], ecx add r14, 2 jmp short loc_9C660 loc_9C636: add ecx, esi add ecx, 0FFFFFF81h loc_9C63B: mov [rsp+18h+var_14], ecx jmp short loc_9C663 loc_9C641: shl esi, 10h shl edx, 8 or edx, esi movzx esi, byte ptr [r14+2] or esi, edx add ecx, esi add ecx, 0FFA00001h mov [rsp+18h+var_14], ecx add r14, 3 loc_9C660: mov rdx, r14 loc_9C663: cmp ecx, ebx ja short loc_9C674 xor eax, 1 mov r14, rdx jmp loc_9C5E7 loc_9C672: xor eax, eax loc_9C674: add rsp, 8 pop rbx pop r14 retn
long long lre_is_in_table(unsigned int a1, long long a2) { long long v2; // rax int index_pos; // eax unsigned __int8 *v4; // r14 long long result; // rax unsigned int v6; // ecx unsigned __int8 *v7; // rdx unsigned int v8; // esi unsigned int v9; // ecx int v10; // edx unsigned __int8 *v11; // r14 unsigned int v12[5]; // [rsp+0h] [rbp-14h] BYREF v12[0] = HIDWORD(v2); index_pos = get_index_pos(v12, a1); if ( index_pos >= 0 ) { v4 = (unsigned __int8 *)((unsigned int)index_pos + a2); result = 0LL; v6 = v12[0]; while ( 1 ) { v7 = v4 + 1; v8 = *v4; if ( v8 <= 0x3F ) break; if ( (v8 & 0x80u) != 0 ) { v6 = v8 + v6 - 127; LABEL_10: v12[0] = v6; goto LABEL_13; } v10 = *v7; if ( (unsigned __int8)v8 > 0x5Fu ) { v6 = ((v8 << 16) | (v10 << 8) | v4[2]) + v6 - 6291455; v12[0] = v6; v11 = v4 + 3; } else { v6 = (v10 | (v8 << 8)) + v6 - 0x3FFF; v12[0] = v6; v11 = v4 + 2; } v7 = v11; LABEL_13: if ( v6 > a1 ) return result; result = (unsigned int)result ^ 1; v4 = v7; } v9 = (v8 >> 3) + v6 + 1; v12[0] = v9; if ( v9 > a1 ) return result; result = (unsigned int)result ^ 1; v6 = (v8 & 7) + v9 + 1; goto LABEL_10; } return 0LL; }
lre_is_in_table: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV EBX,EDI LEA RDI,[RSP + 0x4] MOV ESI,EBX CALL 0x0019e5b3 TEST EAX,EAX JS 0x0019c672 MOV EAX,EAX ADD R14,RAX XOR EAX,EAX MOV ECX,dword ptr [RSP + 0x4] LAB_0019c5e7: LEA RDX,[R14 + 0x1] MOVZX ESI,byte ptr [R14] CMP ESI,0x3f JA 0x0019c611 MOV EDI,ESI SHR EDI,0x3 ADD ECX,EDI INC ECX MOV dword ptr [RSP + 0x4],ECX CMP ECX,EBX JA 0x0019c674 XOR EAX,0x1 AND ESI,0x7 ADD ECX,ESI INC ECX JMP 0x0019c63b LAB_0019c611: TEST SIL,SIL JS 0x0019c636 MOVZX EDX,byte ptr [RDX] CMP SIL,0x5f JA 0x0019c641 SHL ESI,0x8 OR ESI,EDX ADD ECX,ESI ADD ECX,0xffffc001 MOV dword ptr [RSP + 0x4],ECX ADD R14,0x2 JMP 0x0019c660 LAB_0019c636: ADD ECX,ESI ADD ECX,-0x7f LAB_0019c63b: MOV dword ptr [RSP + 0x4],ECX JMP 0x0019c663 LAB_0019c641: SHL ESI,0x10 SHL EDX,0x8 OR EDX,ESI MOVZX ESI,byte ptr [R14 + 0x2] OR ESI,EDX ADD ECX,ESI ADD ECX,0xffa00001 MOV dword ptr [RSP + 0x4],ECX ADD R14,0x3 LAB_0019c660: MOV RDX,R14 LAB_0019c663: CMP ECX,EBX JA 0x0019c674 XOR EAX,0x1 MOV R14,RDX JMP 0x0019c5e7 LAB_0019c672: XOR EAX,EAX LAB_0019c674: ADD RSP,0x8 POP RBX POP R14 RET
uint lre_is_in_table(uint param_1,long param_2) { byte bVar1; uint uVar2; uint uVar3; int8 in_RAX; byte *pbVar4; byte *pbVar5; uint local_14; local_14 = (uint)((ulong)in_RAX >> 0x20); uVar2 = get_index_pos(&local_14,param_1); if ((int)uVar2 < 0) { return 0; } uVar3 = 0; pbVar4 = (byte *)(param_2 + (ulong)uVar2); while( true ) { pbVar5 = pbVar4 + 1; bVar1 = *pbVar4; if (bVar1 < 0x40) { uVar2 = local_14 + (bVar1 >> 3) + 1; if (param_1 < uVar2) { return uVar3; } uVar3 = uVar3 ^ 1; local_14 = uVar2 + (bVar1 & 7) + 1; } else if ((char)bVar1 < '\0') { local_14 = (local_14 + bVar1) - 0x7f; } else if (bVar1 < 0x60) { local_14 = (local_14 + CONCAT11(bVar1,*pbVar5)) - 0x3fff; pbVar5 = pbVar4 + 2; } else { local_14 = (local_14 + ((uint)pbVar4[2] | (uint)*pbVar5 << 8 | (uint)bVar1 << 0x10)) - 0x5fffff; pbVar5 = pbVar4 + 3; } if (param_1 < local_14) break; uVar3 = uVar3 ^ 1; pbVar4 = pbVar5; } return uVar3; }
16,634
lre_is_in_table
bluesky950520[P]quickjs/libunicode.c
static BOOL lre_is_in_table(uint32_t c, const uint8_t *table, const uint8_t *index_table, int index_table_len) { uint32_t code, b, bit; int pos; const uint8_t *p; pos = get_index_pos(&code, c, index_table, index_table_len); if (pos < 0) return FALSE; /* outside the table */ p = table + pos; bit = 0; for(;;) { b = *p++; if (b < 64) { code += (b >> 3) + 1; if (c < code) return bit; bit ^= 1; code += (b & 7) + 1; } else if (b >= 0x80) { code += b - 0x80 + 1; } else if (b < 0x60) { code += (((b - 0x40) << 8) | p[0]) + 1; p++; } else { code += (((b - 0x60) << 16) | (p[0] << 8) | p[1]) + 1; p += 2; } if (c < code) return bit; bit ^= 1; } }
O3
c
lre_is_in_table: pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movl %edi, %ebx leaq 0x4(%rsp), %rdi movl %ebx, %esi callq 0xa0ec6 testl %eax, %eax js 0x9ef21 movl %eax, %eax addq %rax, %r14 xorl %eax, %eax movl 0x4(%rsp), %ecx leaq 0x1(%r14), %rdx movzbl (%r14), %esi cmpl $0x3f, %esi ja 0x9eec0 movl %esi, %edi shrl $0x3, %edi addl %edi, %ecx incl %ecx cmpl %ebx, %ecx ja 0x9ef23 xorl $0x1, %eax andl $0x7, %esi addl %esi, %ecx incl %ecx jmp 0x9eeea testb %sil, %sil js 0x9eee5 movzbl (%rdx), %edx cmpb $0x5f, %sil ja 0x9eef0 shll $0x8, %esi orl %edx, %esi addl %esi, %ecx addl $0xffffc001, %ecx # imm = 0xFFFFC001 movl %ecx, 0x4(%rsp) addq $0x2, %r14 jmp 0x9ef0f addl %esi, %ecx addl $-0x7f, %ecx movl %ecx, 0x4(%rsp) jmp 0x9ef12 shll $0x10, %esi shll $0x8, %edx orl %esi, %edx movzbl 0x2(%r14), %esi orl %edx, %esi addl %esi, %ecx addl $0xffa00001, %ecx # imm = 0xFFA00001 movl %ecx, 0x4(%rsp) addq $0x3, %r14 movq %r14, %rdx cmpl %ebx, %ecx ja 0x9ef23 xorl $0x1, %eax movq %rdx, %r14 jmp 0x9ee9a xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq
lre_is_in_table: push r14 push rbx push rax mov r14, rsi mov ebx, edi lea rdi, [rsp+18h+var_14] mov esi, ebx call get_index_pos test eax, eax js loc_9EF21 mov eax, eax add r14, rax xor eax, eax mov ecx, [rsp+18h+var_14] loc_9EE9A: lea rdx, [r14+1] movzx esi, byte ptr [r14] cmp esi, 3Fh ; '?' ja short loc_9EEC0 mov edi, esi shr edi, 3 add ecx, edi inc ecx cmp ecx, ebx ja short loc_9EF23 xor eax, 1 and esi, 7 add ecx, esi inc ecx jmp short loc_9EEEA loc_9EEC0: test sil, sil js short loc_9EEE5 movzx edx, byte ptr [rdx] cmp sil, 5Fh ; '_' ja short loc_9EEF0 shl esi, 8 or esi, edx add ecx, esi add ecx, 0FFFFC001h mov [rsp+18h+var_14], ecx add r14, 2 jmp short loc_9EF0F loc_9EEE5: add ecx, esi add ecx, 0FFFFFF81h loc_9EEEA: mov [rsp+18h+var_14], ecx jmp short loc_9EF12 loc_9EEF0: shl esi, 10h shl edx, 8 or edx, esi movzx esi, byte ptr [r14+2] or esi, edx add ecx, esi add ecx, 0FFA00001h mov [rsp+18h+var_14], ecx add r14, 3 loc_9EF0F: mov rdx, r14 loc_9EF12: cmp ecx, ebx ja short loc_9EF23 xor eax, 1 mov r14, rdx jmp loc_9EE9A loc_9EF21: xor eax, eax loc_9EF23: add rsp, 8 pop rbx pop r14 retn
long long lre_is_in_table(unsigned int a1, long long a2) { long long v2; // rax int index_pos; // eax unsigned __int8 *v4; // r14 long long result; // rax unsigned int v6; // ecx unsigned __int8 *v7; // rdx unsigned int v8; // esi unsigned int v9; // ecx int v10; // edx unsigned __int8 *v11; // r14 unsigned int v12[5]; // [rsp+0h] [rbp-14h] BYREF v12[0] = HIDWORD(v2); index_pos = get_index_pos(v12, a1); if ( index_pos >= 0 ) { v4 = (unsigned __int8 *)((unsigned int)index_pos + a2); result = 0LL; v6 = v12[0]; while ( 1 ) { v7 = v4 + 1; v8 = *v4; if ( v8 <= 0x3F ) break; if ( (v8 & 0x80u) != 0 ) { v6 = v8 + v6 - 127; LABEL_10: v12[0] = v6; goto LABEL_13; } v10 = *v7; if ( (unsigned __int8)v8 > 0x5Fu ) { v6 = ((v8 << 16) | (v10 << 8) | v4[2]) + v6 - 6291455; v12[0] = v6; v11 = v4 + 3; } else { v6 = (v10 | (v8 << 8)) + v6 - 0x3FFF; v12[0] = v6; v11 = v4 + 2; } v7 = v11; LABEL_13: if ( v6 > a1 ) return result; result = (unsigned int)result ^ 1; v4 = v7; } v9 = (v8 >> 3) + v6 + 1; if ( v9 > a1 ) return result; result = (unsigned int)result ^ 1; v6 = (v8 & 7) + v9 + 1; goto LABEL_10; } return 0LL; }
lre_is_in_table: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV EBX,EDI LEA RDI,[RSP + 0x4] MOV ESI,EBX CALL 0x001a0ec6 TEST EAX,EAX JS 0x0019ef21 MOV EAX,EAX ADD R14,RAX XOR EAX,EAX MOV ECX,dword ptr [RSP + 0x4] LAB_0019ee9a: LEA RDX,[R14 + 0x1] MOVZX ESI,byte ptr [R14] CMP ESI,0x3f JA 0x0019eec0 MOV EDI,ESI SHR EDI,0x3 ADD ECX,EDI INC ECX CMP ECX,EBX JA 0x0019ef23 XOR EAX,0x1 AND ESI,0x7 ADD ECX,ESI INC ECX JMP 0x0019eeea LAB_0019eec0: TEST SIL,SIL JS 0x0019eee5 MOVZX EDX,byte ptr [RDX] CMP SIL,0x5f JA 0x0019eef0 SHL ESI,0x8 OR ESI,EDX ADD ECX,ESI ADD ECX,0xffffc001 MOV dword ptr [RSP + 0x4],ECX ADD R14,0x2 JMP 0x0019ef0f LAB_0019eee5: ADD ECX,ESI ADD ECX,-0x7f LAB_0019eeea: MOV dword ptr [RSP + 0x4],ECX JMP 0x0019ef12 LAB_0019eef0: SHL ESI,0x10 SHL EDX,0x8 OR EDX,ESI MOVZX ESI,byte ptr [R14 + 0x2] OR ESI,EDX ADD ECX,ESI ADD ECX,0xffa00001 MOV dword ptr [RSP + 0x4],ECX ADD R14,0x3 LAB_0019ef0f: MOV RDX,R14 LAB_0019ef12: CMP ECX,EBX JA 0x0019ef23 XOR EAX,0x1 MOV R14,RDX JMP 0x0019ee9a LAB_0019ef21: XOR EAX,EAX LAB_0019ef23: ADD RSP,0x8 POP RBX POP R14 RET
uint lre_is_in_table(uint param_1,long param_2) { byte bVar1; uint uVar2; uint uVar3; int8 in_RAX; byte *pbVar4; byte *pbVar5; uint local_14; local_14 = (uint)((ulong)in_RAX >> 0x20); uVar2 = get_index_pos(&local_14,param_1); if ((int)uVar2 < 0) { return 0; } uVar3 = 0; pbVar4 = (byte *)(param_2 + (ulong)uVar2); while( true ) { pbVar5 = pbVar4 + 1; bVar1 = *pbVar4; if (bVar1 < 0x40) { uVar2 = local_14 + (bVar1 >> 3) + 1; if (param_1 < uVar2) { return uVar3; } uVar3 = uVar3 ^ 1; local_14 = uVar2 + (bVar1 & 7) + 1; } else if ((char)bVar1 < '\0') { local_14 = (local_14 + bVar1) - 0x7f; } else if (bVar1 < 0x60) { local_14 = (local_14 + CONCAT11(bVar1,*pbVar5)) - 0x3fff; pbVar5 = pbVar4 + 2; } else { local_14 = (local_14 + ((uint)pbVar4[2] | (uint)*pbVar5 << 8 | (uint)bVar1 << 0x10)) - 0x5fffff; pbVar5 = pbVar4 + 3; } if (param_1 < local_14) break; uVar3 = uVar3 ^ 1; pbVar4 = pbVar5; } return uVar3; }
16,635
ftxui::operator|(std::shared_ptr<ftxui::Node>, std::function<std::shared_ptr<ftxui::Node> (std::shared_ptr<ftxui::Node>)>)
Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/dom/util.cpp
Element operator|(Element element, Decorator decorator) { // NOLINT return decorator(std::move(element)); }
O2
cpp
ftxui::operator|(std::shared_ptr<ftxui::Node>, std::function<std::shared_ptr<ftxui::Node> (std::shared_ptr<ftxui::Node>)>): pushq %r14 pushq %rbx subq $0x18, %rsp movq %rdi, %r14 leaq 0x8(%rsp), %rbx movups (%rsi), %xmm0 andq $0x0, 0x8(%rsi) movaps %xmm0, -0x8(%rbx) andq $0x0, (%rsi) movq %rsp, %rax movq %rdx, %rsi movq %rax, %rdx callq 0x20e10 movq %rbx, %rdi callq 0x13452 movq %r14, %rax addq $0x18, %rsp popq %rbx popq %r14 retq movq %rax, %r14 movq %rbx, %rdi callq 0x13452 movq %r14, %rdi callq 0xc7f0
_ZN5ftxuiorESt10shared_ptrINS_4NodeEESt8functionIFS2_S2_EE: push r14 push rbx sub rsp, 18h mov r14, rdi lea rbx, [rsp+28h+var_20] movups xmm0, xmmword ptr [rsi] and qword ptr [rsi+8], 0 movaps xmmword ptr [rbx-8], xmm0 and qword ptr [rsi], 0 mov rax, rsp mov rsi, rdx mov rdx, rax call _ZNKSt8functionIFSt10shared_ptrIN5ftxui4NodeEES3_EEclES3_; std::function<std::shared_ptr<ftxui::Node> ()(std::shared_ptr<ftxui::Node>)>::operator()(std::shared_ptr<ftxui::Node>) mov rdi, rbx call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rax, r14 add rsp, 18h pop rbx pop r14 retn mov r14, rax mov rdi, rbx call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, r14 call __Unwind_Resume
long long ftxui::operator|(long long a1, __int128 *a2, long long a3) { __int128 v3; // xmm0 _OWORD v5[2]; // [rsp+0h] [rbp-28h] BYREF v3 = *a2; *((_QWORD *)a2 + 1) = 0LL; v5[0] = v3; *(_QWORD *)a2 = 0LL; std::function<std::shared_ptr<ftxui::Node> ()(std::shared_ptr<ftxui::Node>)>::operator()(a1, a3, v5); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)v5 + 1); return a1; }
operator|: PUSH R14 PUSH RBX SUB RSP,0x18 MOV R14,RDI LEA RBX,[RSP + 0x8] MOVUPS XMM0,xmmword ptr [RSI] AND qword ptr [RSI + 0x8],0x0 MOVAPS xmmword ptr [RBX + -0x8],XMM0 AND qword ptr [RSI],0x0 LAB_001208b2: MOV RAX,RSP MOV RSI,RDX MOV RDX,RAX CALL 0x00120e10 LAB_001208c0: MOV RDI,RBX CALL 0x00113452 MOV RAX,R14 ADD RSP,0x18 POP RBX POP R14 RET
/* ftxui::TEMPNAMEPLACEHOLDERVALUE(std::shared_ptr<ftxui::Node>, std::function<std::shared_ptr<ftxui::Node> (std::shared_ptr<ftxui::Node>)>) */ ftxui * __thiscall ftxui::operator|(ftxui *this,int8 *param_2,int8 param_3) { int4 local_28; int4 uStack_24; int4 uStack_20; int4 uStack_1c; local_28 = *(int4 *)param_2; uStack_24 = *(int4 *)((long)param_2 + 4); uStack_20 = *(int4 *)(param_2 + 1); uStack_1c = *(int4 *)((long)param_2 + 0xc); param_2[1] = 0; *param_2 = 0; /* try { // try from 001208b2 to 001208bf has its CatchHandler @ 001208d3 */ std::function<std::shared_ptr<ftxui::Node>(std::shared_ptr<ftxui::Node>)>::operator() ((function<std::shared_ptr<ftxui::Node>(std::shared_ptr<ftxui::Node>)> *)this,param_3, &local_28); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_20); return this; }
16,636
json_schema_to_grammar(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&, bool)
monkey531[P]llama/common/json-schema-to-grammar.cpp
std::string json_schema_to_grammar(const json & schema, bool force_gbnf) { #ifdef LLAMA_USE_LLGUIDANCE if (!force_gbnf) { return "%llguidance {}\nstart: %json " + schema.dump(); } #else (void)force_gbnf; #endif // LLAMA_USE_LLGUIDANCE return build_grammar([&](const common_grammar_builder & callbacks) { auto copy = schema; callbacks.resolve_refs(copy); callbacks.add_schema("", copy); }); }
O2
cpp
json_schema_to_grammar(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&, bool): pushq %rbx subq $0x30, %rsp movq %rdi, %rbx leaq 0x10(%rsp), %rax andq $0x0, 0x8(%rax) movq %rsi, (%rax) leaq 0x174(%rip), %rcx # 0x8e6e8 movq %rcx, 0x18(%rax) leaq 0x20d(%rip), %rcx # 0x8e78c movq %rcx, 0x10(%rax) leaq 0xe(%rsp), %rdx andw $0x0, (%rdx) movq %rax, %rsi callq 0x8e5bc leaq 0x10(%rsp), %rdi callq 0x4b47a movq %rbx, %rax addq $0x30, %rsp popq %rbx retq movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x4b47a movq %rbx, %rdi callq 0x25250
_Z22json_schema_to_grammarRKN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEb: push rbx sub rsp, 30h mov rbx, rdi lea rax, [rsp+38h+var_28] and qword ptr [rax+8], 0 mov [rax], rsi lea rcx, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZ22json_schema_to_grammarRKN8nlohmann16json_abi_v3_11_310basic_jsonINS5_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS5_14adl_serializerES8_IhSaIhEEvEEbE3$_0E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(common_grammar_builder const&),json_schema_to_grammar(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&,bool)::$_0>::_M_invoke(std::_Any_data const&,common_grammar_builder const&) mov [rax+18h], rcx lea rcx, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZ22json_schema_to_grammarRKN8nlohmann16json_abi_v3_11_310basic_jsonINS5_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS5_14adl_serializerES8_IhSaIhEEvEEbE3$_0E10_M_managerERSt9_Any_dataRKSN_St18_Manager_operation; std::_Function_handler<void ()(common_grammar_builder const&),json_schema_to_grammar(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&,bool)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rax+10h], rcx lea rdx, [rsp+38h+var_2A] and word ptr [rdx], 0 mov rsi, rax call _Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options; build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&) lea rdi, [rsp+38h+var_28]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() mov rax, rbx add rsp, 30h pop rbx retn mov rbx, rax lea rdi, [rsp+arg_8]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() mov rdi, rbx call __Unwind_Resume
json_schema_to_grammar: PUSH RBX SUB RSP,0x30 MOV RBX,RDI LEA RAX,[RSP + 0x10] AND qword ptr [RAX + 0x8],0x0 MOV qword ptr [RAX],RSI LEA RCX,[0x18e6e8] MOV qword ptr [RAX + 0x18],RCX LEA RCX,[0x18e78c] MOV qword ptr [RAX + 0x10],RCX LEA RDX,[RSP + 0xe] AND word ptr [RDX],0x0 LAB_0018e58c: MOV RSI,RAX CALL 0x0018e5bc LAB_0018e594: LEA RDI,[RSP + 0x10] CALL 0x0014b47a MOV RAX,RBX ADD RSP,0x30 POP RBX RET
/* json_schema_to_grammar(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&, bool) */ basic_json * json_schema_to_grammar(basic_json *param_1,bool param_2) { int7 in_register_00000031; int8 local_28; int8 local_20; code *local_18; code *local_10; local_28 = CONCAT71(in_register_00000031,param_2); local_20 = 0; local_10 = std:: _Function_handler<void(common_grammar_builder_const&),json_schema_to_grammar(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&,bool)::$_0> ::_M_invoke; local_18 = std:: _Function_handler<void(common_grammar_builder_const&),json_schema_to_grammar(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&,bool)::$_0> ::_M_manager; /* try { // try from 0018e58c to 0018e593 has its CatchHandler @ 0018e5a7 */ build_grammar_abi_cxx11_(param_1,(common_grammar_options *)&local_28); std::_Function_base::~_Function_base((_Function_base *)&local_28); return param_1; }
16,637
unsigned long testing::internal::(anonymous namespace)::ReadProcFileField<unsigned long>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
giladroyz[P]FindPeaks/build_O0/_deps/googletest-src/googletest/src/gtest-port.cc
T ReadProcFileField(const std::string& filename, int field) { std::string dummy; std::ifstream file(filename.c_str()); while (field-- > 0) { file >> dummy; } T output = 0; file >> output; return output; }
O0
cpp
unsigned long testing::internal::(anonymous namespace)::ReadProcFileField<unsigned long>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int): pushq %rbp movq %rsp, %rbp subq $0x260, %rsp # imm = 0x260 movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) leaq -0x30(%rbp), %rdi callq 0xa9d0 movq -0x8(%rbp), %rdi callq 0xa260 movq %rax, %rsi leaq -0x238(%rbp), %rdi movl $0x8, %edx callq 0xac90 jmp 0x1e98a jmp 0x1e98c movl -0xc(%rbp), %eax movl %eax, %ecx addl $-0x1, %ecx movl %ecx, -0xc(%rbp) cmpl $0x0, %eax jle 0x1e9e4 leaq -0x238(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0xa8d0 jmp 0x1e9ae jmp 0x1e98c movq %rax, %rcx movl %edx, %eax movq %rcx, -0x240(%rbp) movl %eax, -0x244(%rbp) jmp 0x1ea37 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x240(%rbp) movl %eax, -0x244(%rbp) leaq -0x238(%rbp), %rdi callq 0xa190 jmp 0x1ea37 movq $0x0, -0x250(%rbp) leaq -0x238(%rbp), %rdi leaq -0x250(%rbp), %rsi callq 0xaa10 jmp 0x1ea04 movq -0x250(%rbp), %rax movq %rax, -0x258(%rbp) leaq -0x238(%rbp), %rdi callq 0xa190 leaq -0x30(%rbp), %rdi callq 0xad98 movq -0x258(%rbp), %rax addq $0x260, %rsp # imm = 0x260 popq %rbp retq leaq -0x30(%rbp), %rdi callq 0xad98 movq -0x240(%rbp), %rdi callq 0xac00 nopl (%rax)
_ZN7testing8internal12_GLOBAL__N_117ReadProcFileFieldImEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi: push rbp mov rbp, rsp sub rsp, 260h mov [rbp+var_8], rdi mov [rbp+var_C], esi lea rdi, [rbp+var_30] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void) mov rdi, [rbp+var_8] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov rsi, rax lea rdi, [rbp+var_238] mov edx, 8 call __ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode; std::ifstream::basic_ifstream(char const*,std::_Ios_Openmode) jmp short $+2 loc_1E98A: jmp short $+2 loc_1E98C: mov eax, [rbp+var_C] mov ecx, eax add ecx, 0FFFFFFFFh mov [rbp+var_C], ecx cmp eax, 0 jle short loc_1E9E4 lea rdi, [rbp+var_238] lea rsi, [rbp+var_30] call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &) jmp short $+2 loc_1E9AE: jmp short loc_1E98C mov rcx, rax mov eax, edx mov [rbp+var_240], rcx mov [rbp+var_244], eax jmp short loc_1EA37 mov rcx, rax mov eax, edx mov [rbp+var_240], rcx mov [rbp+var_244], eax lea rdi, [rbp+var_238] call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream() jmp short loc_1EA37 loc_1E9E4: mov [rbp+var_250], 0 lea rdi, [rbp+var_238] lea rsi, [rbp+var_250] call __ZNSirsERm; std::istream::operator>>(ulong &) jmp short $+2 loc_1EA04: mov rax, [rbp+var_250] mov [rbp+var_258], rax lea rdi, [rbp+var_238] call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream() lea rdi, [rbp+var_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rax, [rbp+var_258] add rsp, 260h pop rbp retn loc_1EA37: lea rdi, [rbp+var_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rdi, [rbp+var_240] call __Unwind_Resume
long long testing::internal::`anonymous namespace'::ReadProcFileField<unsigned long>(long long a1, int a2) { long long v2; // rax int v3; // eax long long v5; // [rsp+8h] [rbp-258h] long long v6; // [rsp+10h] [rbp-250h] BYREF _BYTE v7[520]; // [rsp+28h] [rbp-238h] BYREF _BYTE v8[36]; // [rsp+230h] [rbp-30h] BYREF int v9; // [rsp+254h] [rbp-Ch] long long v10; // [rsp+258h] [rbp-8h] v10 = a1; v9 = a2; std::string::basic_string(v8); v2 = std::string::c_str(v10); std::ifstream::basic_ifstream(v7, v2, 8LL); while ( 1 ) { v3 = v9--; if ( v3 <= 0 ) break; std::operator>><char>(v7, v8); } v6 = 0LL; std::istream::operator>>(v7, &v6); v5 = v6; std::ifstream::~ifstream(v7); std::string::~string(v8); return v5; }
ReadProcFileField<unsigned_long>: PUSH RBP MOV RBP,RSP SUB RSP,0x260 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI LEA RDI,[RBP + -0x30] CALL 0x0010a9d0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x0010a260 MOV RSI,RAX LAB_0011e977: LEA RDI,[RBP + -0x238] MOV EDX,0x8 CALL 0x0010ac90 JMP 0x0011e98a LAB_0011e98a: JMP 0x0011e98c LAB_0011e98c: MOV EAX,dword ptr [RBP + -0xc] MOV ECX,EAX ADD ECX,-0x1 MOV dword ptr [RBP + -0xc],ECX CMP EAX,0x0 JLE 0x0011e9e4 LAB_0011e99c: LEA RDI,[RBP + -0x238] LEA RSI,[RBP + -0x30] CALL 0x0010a8d0 JMP 0x0011e9ae LAB_0011e9ae: JMP 0x0011e98c LAB_0011e9e4: MOV qword ptr [RBP + -0x250],0x0 LEA RDI,[RBP + -0x238] LEA RSI,[RBP + -0x250] CALL 0x0010aa10 LAB_0011ea02: JMP 0x0011ea04 LAB_0011ea04: MOV RAX,qword ptr [RBP + -0x250] MOV qword ptr [RBP + -0x258],RAX LEA RDI,[RBP + -0x238] CALL 0x0010a190 LEA RDI,[RBP + -0x30] CALL 0x0010ad98 MOV RAX,qword ptr [RBP + -0x258] ADD RSP,0x260 POP RBP RET
/* unsigned long testing::internal::(anonymous namespace)::ReadProcFileField<unsigned long>(std::__cxx11::string const&, int) */ ulong testing::internal::(anonymous_namespace)::ReadProcFileField<unsigned_long> (string *param_1,int param_2) { ulong uVar1; int8 uVar2; ulong local_258 [3]; ifstream local_240 [520]; string local_38 [36]; int local_14; string *local_10; local_14 = param_2; local_10 = param_1; std::__cxx11::string::string(local_38); uVar2 = std::__cxx11::string::c_str(); /* try { // try from 0011e977 to 0011e987 has its CatchHandler @ 0011e9b0 */ std::ifstream::ifstream(local_240,uVar2,8); while (0 < local_14) { /* try { // try from 0011e99c to 0011ea01 has its CatchHandler @ 0011e9c4 */ local_14 = local_14 + -1; std::operator>>((istream *)local_240,local_38); } local_258[0] = 0; local_14 = local_14 + -1; std::istream::operator>>((istream *)local_240,local_258); uVar1 = local_258[0]; std::ifstream::~ifstream(local_240); std::__cxx11::string::~string(local_38); return uVar1; }
16,638
my_strnxfrm_win1250ch
eloqsql/strings/ctype-win1250ch.c
static size_t my_strnxfrm_win1250ch(CHARSET_INFO *cs __attribute__((unused)), uchar *dest, size_t len, uint nweights_arg __attribute__((unused)), const uchar *src, size_t srclen, uint flags) { int value; const uchar *p; int pass = 0; size_t totlen = 0; p = src; if (!(flags & 0x0F)) /* All levels by default */ flags|= 0x0F; while (totlen < len) { NEXT_CMP_VALUE(src, p, pass, value, (int)srclen); if (!value) break; if ((1 << pass) & flags) dest[totlen++] = value; } if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && len > totlen) { memset(dest + totlen, 0x00, len - totlen); totlen= len; } return totlen; }
O3
c
my_strnxfrm_win1250ch: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdx, %rbx movq %rsi, -0x50(%rbp) movl 0x10(%rbp), %eax movl %eax, %edx orl $0xf, %edx testb $0xf, %al cmovnel %eax, %edx xorl %r10d, %r10d testq %rbx, %rbx je 0xd0a74 movslq %r9d, %rdi movl $0x1, %eax subq %r8, %rax movq %rax, -0x60(%rbp) leaq 0x28ae59(%rip), %r14 # 0x35b770 leaq 0x2b28b2(%rip), %r15 # 0x3831d0 xorl %eax, %eax movq %r8, %r11 movq %rbx, -0x48(%rbp) movq %r9, -0x40(%rbp) movq %r8, -0x38(%rbp) movl %edx, -0x2c(%rbp) movq %r11, %rsi subq %r8, %rsi cmpq %rdi, %rsi jge 0xd094e testl %r10d, %r10d je 0xd0a10 movl $0x9, %r12d jmp 0xd096f testl %r9d, %r9d jle 0xd0a78 testl %r10d, %r10d jne 0xd0a78 movl $0x1, %r10d movl $0x9, %r12d movq %r8, %r11 movq %r14, %rsi movzbl (%r11), %ecx movb (%rsi,%rcx), %sil cmpb $-0x1, %sil jne 0xd0a50 movq %r12, -0x68(%rbp) movq %r10, -0x58(%rbp) movq %r11, %rdx subq %r8, %rdx movq -0x60(%rbp), %rcx leaq (%rcx,%r11), %r13 xorl %r10d, %r10d movq %r10, %rbx shlq $0x4, %rbx movq (%rbx,%r15), %rsi movb (%rsi), %r9b testb %r9b, %r9b je 0xd09e0 cmpq %rdi, %rdx jge 0xd09e0 incq %rsi movq %r13, %r14 movq %r11, %r12 cmpb (%r12), %r9b jne 0xd09e8 incq %r12 movb (%rsi), %r9b testb %r9b, %r9b je 0xd09e3 leaq 0x1(%r14), %rcx incq %rsi cmpq %rdi, %r14 movq %rcx, %r14 jl 0xd09be jmp 0xd09e3 movq %r11, %r12 testb %r9b, %r9b je 0xd0a25 incq %r10 cmpq $0x50, %r10 jne 0xd099d movb $-0x1, %sil movq -0x48(%rbp), %rbx movq -0x40(%rbp), %r9 movq -0x38(%rbp), %r8 movl -0x2c(%rbp), %edx movq -0x58(%rbp), %r10 leaq 0x28ad62(%rip), %r14 # 0x35b770 jmp 0xd0a55 xorl %r10d, %r10d movl $0x8, %r12d leaq 0x28ac50(%rip), %rsi # 0x35b670 jmp 0xd0972 addq %r15, %rbx movq -0x68(%rbp), %rcx movb (%rbx,%rcx), %sil decq %r12 movq %r12, %r11 movq -0x48(%rbp), %rbx movq -0x40(%rbp), %r9 movq -0x38(%rbp), %r8 movl -0x2c(%rbp), %edx movq -0x58(%rbp), %r10 leaq 0x28ad20(%rip), %r14 # 0x35b770 testb %sil, %sil je 0xd0a78 btl %r10d, %edx jae 0xd0a66 movq -0x50(%rbp), %rcx movb %sil, (%rcx,%rax) incq %rax incq %r11 cmpq %rbx, %rax jb 0xd0932 jmp 0xd0a93 xorl %eax, %eax jmp 0xd0a93 testb %dl, %dl jns 0xd0a93 movq -0x50(%rbp), %rdi addq %rax, %rdi movq %rbx, %rdx subq %rax, %rdx xorl %esi, %esi callq 0x292c0 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_strnxfrm_win1250ch: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov rbx, rdx mov [rbp+var_50], rsi mov eax, [rbp+arg_0] mov edx, eax or edx, 0Fh test al, 0Fh cmovnz edx, eax xor r10d, r10d test rbx, rbx jz loc_D0A74 movsxd rdi, r9d mov eax, 1 sub rax, r8 mov [rbp+var_60], rax lea r14, _sort_order_win1250ch2 lea r15, doubles_0 xor eax, eax mov r11, r8 mov [rbp+var_48], rbx mov [rbp+var_40], r9 mov [rbp+var_38], r8 mov [rbp+var_2C], edx loc_D0932: mov rsi, r11 sub rsi, r8 cmp rsi, rdi jge short loc_D094E test r10d, r10d jz loc_D0A10 mov r12d, 9 jmp short loc_D096F loc_D094E: test r9d, r9d jle loc_D0A78 test r10d, r10d jnz loc_D0A78 mov r10d, 1 mov r12d, 9 mov r11, r8 loc_D096F: mov rsi, r14 loc_D0972: movzx ecx, byte ptr [r11] mov sil, [rsi+rcx] cmp sil, 0FFh jnz loc_D0A50 mov [rbp+var_68], r12 mov [rbp+var_58], r10 mov rdx, r11 sub rdx, r8 mov rcx, [rbp+var_60] lea r13, [rcx+r11] xor r10d, r10d loc_D099D: mov rbx, r10 shl rbx, 4 mov rsi, [rbx+r15] mov r9b, [rsi] test r9b, r9b jz short loc_D09E0 cmp rdx, rdi jge short loc_D09E0 inc rsi mov r14, r13 mov r12, r11 loc_D09BE: cmp r9b, [r12] jnz short loc_D09E8 inc r12 mov r9b, [rsi] test r9b, r9b jz short loc_D09E3 lea rcx, [r14+1] inc rsi cmp r14, rdi mov r14, rcx jl short loc_D09BE jmp short loc_D09E3 loc_D09E0: mov r12, r11 loc_D09E3: test r9b, r9b jz short loc_D0A25 loc_D09E8: inc r10 cmp r10, 50h ; 'P' jnz short loc_D099D mov sil, 0FFh mov rbx, [rbp+var_48] mov r9, [rbp+var_40] mov r8, [rbp+var_38] mov edx, [rbp+var_2C] mov r10, [rbp+var_58] lea r14, _sort_order_win1250ch2 jmp short loc_D0A55 loc_D0A10: xor r10d, r10d mov r12d, 8 lea rsi, _sort_order_win1250ch1 jmp loc_D0972 loc_D0A25: add rbx, r15 mov rcx, [rbp+var_68] mov sil, [rbx+rcx] dec r12 mov r11, r12 mov rbx, [rbp+var_48] mov r9, [rbp+var_40] mov r8, [rbp+var_38] mov edx, [rbp+var_2C] mov r10, [rbp+var_58] lea r14, _sort_order_win1250ch2 loc_D0A50: test sil, sil jz short loc_D0A78 loc_D0A55: bt edx, r10d jnb short loc_D0A66 mov rcx, [rbp+var_50] mov [rcx+rax], sil inc rax loc_D0A66: inc r11 cmp rax, rbx jb loc_D0932 jmp short loc_D0A93 loc_D0A74: xor eax, eax jmp short loc_D0A93 loc_D0A78: test dl, dl jns short loc_D0A93 mov rdi, [rbp+var_50] add rdi, rax mov rdx, rbx sub rdx, rax xor esi, esi call _memset mov rax, rbx loc_D0A93: add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long my_strnxfrm_win1250ch( long long a1, long long a2, unsigned long long a3, long long a4, unsigned __int8 *a5, int a6, int a7) { int v8; // edx long long v9; // r10 long long v10; // rdi unsigned long long result; // rax unsigned __int8 *v12; // r11 long long v13; // r12 _BYTE *v14; // rsi char v15; // si long long v16; // r10 char *v17; // rsi char v18; // r9 char *v19; // rsi unsigned __int8 *v20; // r14 _BYTE *v21; // r12 long long v23; // [rsp+8h] [rbp-68h] long long v24; // [rsp+10h] [rbp-60h] long long v25; // [rsp+18h] [rbp-58h] unsigned long long v27; // [rsp+28h] [rbp-48h] int v28; // [rsp+30h] [rbp-40h] unsigned __int8 *v29; // [rsp+38h] [rbp-38h] int v30; // [rsp+44h] [rbp-2Ch] v8 = a7 | 0xF; if ( (a7 & 0xF) != 0 ) v8 = a7; v9 = 0LL; if ( !a3 ) return 0LL; v10 = a6; v24 = 1LL - (_QWORD)a5; result = 0LL; v12 = a5; v27 = a3; v28 = a6; v29 = a5; v30 = v8; while ( 2 ) { if ( v12 - a5 >= v10 ) { if ( a6 <= 0 || (_DWORD)v9 ) break; v9 = 1LL; v13 = 9LL; v12 = a5; } else { if ( !(_DWORD)v9 ) { v9 = 0LL; v13 = 8LL; v14 = &sort_order_win1250ch1; goto LABEL_12; } v13 = 9LL; } v14 = &sort_order_win1250ch2; LABEL_12: v15 = v14[*v12]; if ( v15 != -1 ) goto LABEL_27; v23 = v13; v25 = v9; v16 = 0LL; while ( 1 ) { v17 = (char *)*(&doubles_0 + 2 * v16); v18 = *v17; if ( !*v17 || v12 - a5 >= v10 ) break; v19 = v17 + 1; v20 = &v12[v24]; v21 = v12; while ( v18 == *v21 ) { ++v21; v18 = *v19; if ( *v19 ) { ++v19; if ( (long long)v20++ < v10 ) continue; } goto LABEL_22; } LABEL_23: if ( ++v16 == 80 ) { v15 = -1; a3 = v27; a6 = v28; a5 = v29; v8 = v30; v9 = v25; goto LABEL_28; } } v21 = v12; LABEL_22: if ( v18 ) goto LABEL_23; v15 = *((_BYTE *)&doubles_0 + 16 * v16 + v23); v12 = v21 - 1; a3 = v27; a6 = v28; a5 = v29; v8 = v30; v9 = v25; LABEL_27: if ( v15 ) { LABEL_28: if ( _bittest(&v8, v9) ) *(_BYTE *)(a2 + result++) = v15; ++v12; if ( result >= a3 ) return result; continue; } break; } if ( (v8 & 0x80u) != 0 ) { memset(result + a2, 0LL, a3 - result); return a3; } return result; }
my_strnxfrm_win1250ch: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV RBX,RDX MOV qword ptr [RBP + -0x50],RSI MOV EAX,dword ptr [RBP + 0x10] MOV EDX,EAX OR EDX,0xf TEST AL,0xf CMOVNZ EDX,EAX XOR R10D,R10D TEST RBX,RBX JZ 0x001d0a74 MOVSXD RDI,R9D MOV EAX,0x1 SUB RAX,R8 MOV qword ptr [RBP + -0x60],RAX LEA R14,[0x45b770] LEA R15,[0x4831d0] XOR EAX,EAX MOV R11,R8 MOV qword ptr [RBP + -0x48],RBX MOV qword ptr [RBP + -0x40],R9 MOV qword ptr [RBP + -0x38],R8 MOV dword ptr [RBP + -0x2c],EDX LAB_001d0932: MOV RSI,R11 SUB RSI,R8 CMP RSI,RDI JGE 0x001d094e TEST R10D,R10D JZ 0x001d0a10 MOV R12D,0x9 JMP 0x001d096f LAB_001d094e: TEST R9D,R9D JLE 0x001d0a78 TEST R10D,R10D JNZ 0x001d0a78 MOV R10D,0x1 MOV R12D,0x9 MOV R11,R8 LAB_001d096f: MOV RSI,R14 LAB_001d0972: MOVZX ECX,byte ptr [R11] MOV SIL,byte ptr [RSI + RCX*0x1] CMP SIL,0xff JNZ 0x001d0a50 MOV qword ptr [RBP + -0x68],R12 MOV qword ptr [RBP + -0x58],R10 MOV RDX,R11 SUB RDX,R8 MOV RCX,qword ptr [RBP + -0x60] LEA R13,[RCX + R11*0x1] XOR R10D,R10D LAB_001d099d: MOV RBX,R10 SHL RBX,0x4 MOV RSI,qword ptr [RBX + R15*0x1] MOV R9B,byte ptr [RSI] TEST R9B,R9B JZ 0x001d09e0 CMP RDX,RDI JGE 0x001d09e0 INC RSI MOV R14,R13 MOV R12,R11 LAB_001d09be: CMP R9B,byte ptr [R12] JNZ 0x001d09e8 INC R12 MOV R9B,byte ptr [RSI] TEST R9B,R9B JZ 0x001d09e3 LEA RCX,[R14 + 0x1] INC RSI CMP R14,RDI MOV R14,RCX JL 0x001d09be JMP 0x001d09e3 LAB_001d09e0: MOV R12,R11 LAB_001d09e3: TEST R9B,R9B JZ 0x001d0a25 LAB_001d09e8: INC R10 CMP R10,0x50 JNZ 0x001d099d MOV SIL,0xff MOV RBX,qword ptr [RBP + -0x48] MOV R9,qword ptr [RBP + -0x40] MOV R8,qword ptr [RBP + -0x38] MOV EDX,dword ptr [RBP + -0x2c] MOV R10,qword ptr [RBP + -0x58] LEA R14,[0x45b770] JMP 0x001d0a55 LAB_001d0a10: XOR R10D,R10D MOV R12D,0x8 LEA RSI,[0x45b670] JMP 0x001d0972 LAB_001d0a25: ADD RBX,R15 MOV RCX,qword ptr [RBP + -0x68] MOV SIL,byte ptr [RBX + RCX*0x1] DEC R12 MOV R11,R12 MOV RBX,qword ptr [RBP + -0x48] MOV R9,qword ptr [RBP + -0x40] MOV R8,qword ptr [RBP + -0x38] MOV EDX,dword ptr [RBP + -0x2c] MOV R10,qword ptr [RBP + -0x58] LEA R14,[0x45b770] LAB_001d0a50: TEST SIL,SIL JZ 0x001d0a78 LAB_001d0a55: BT EDX,R10D JNC 0x001d0a66 MOV RCX,qword ptr [RBP + -0x50] MOV byte ptr [RCX + RAX*0x1],SIL INC RAX LAB_001d0a66: INC R11 CMP RAX,RBX JC 0x001d0932 JMP 0x001d0a93 LAB_001d0a74: XOR EAX,EAX JMP 0x001d0a93 LAB_001d0a78: TEST DL,DL JNS 0x001d0a93 MOV RDI,qword ptr [RBP + -0x50] ADD RDI,RAX MOV RDX,RBX SUB RDX,RAX XOR ESI,ESI CALL 0x001292c0 MOV RAX,RBX LAB_001d0a93: ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong my_strnxfrm_win1250ch (int8 param_1,long param_2,ulong param_3,int8 param_4,byte *param_5, int param_6,uint param_7) { uint uVar1; byte *pbVar2; byte *pbVar3; byte *pbVar4; ulong uVar5; char cVar6; int1 *puVar7; byte *pbVar8; byte bVar9; int iVar10; long lVar11; byte *pbVar12; byte *pbVar13; long lVar14; uVar1 = param_7 | 0xf; if ((param_7 & 0xf) != 0) { uVar1 = param_7; } iVar10 = 0; if (param_3 == 0) { uVar5 = 0; } else { uVar5 = 0; pbVar12 = param_5; do { if ((long)pbVar12 - (long)param_5 < (long)param_6) { if (iVar10 != 0) goto LAB_001d096f; iVar10 = 0; lVar14 = 8; puVar7 = _sort_order_win1250ch1; } else { if ((param_6 < 1) || (iVar10 != 0)) goto LAB_001d0a78; iVar10 = 1; pbVar12 = param_5; LAB_001d096f: lVar14 = 9; puVar7 = _sort_order_win1250ch2; } cVar6 = puVar7[*pbVar12]; if (cVar6 == -1) { lVar11 = 0; do { pbVar8 = (&doubles)[lVar11 * 2]; bVar9 = *pbVar8; pbVar13 = pbVar12; pbVar4 = pbVar12 + (1 - (long)param_5); pbVar3 = pbVar12 + -(long)param_5; if (bVar9 != 0) { while (pbVar2 = pbVar4, (long)pbVar3 < (long)param_6) { pbVar8 = pbVar8 + 1; if (bVar9 != *pbVar13) goto LAB_001d09e8; pbVar13 = pbVar13 + 1; bVar9 = *pbVar8; if (bVar9 == 0) break; pbVar4 = pbVar2 + 1; pbVar3 = pbVar2; } } if (bVar9 == 0) { cVar6 = *(char *)((long)&doubles + lVar14 + lVar11 * 0x10); pbVar12 = pbVar13 + -1; goto LAB_001d0a50; } LAB_001d09e8: lVar11 = lVar11 + 1; } while (lVar11 != 0x50); cVar6 = -1; } else { LAB_001d0a50: if (cVar6 == '\0') { LAB_001d0a78: if (-1 < (char)uVar1) { return uVar5; } memset((void *)(param_2 + uVar5),0,param_3 - uVar5); return param_3; } } if ((uVar1 >> iVar10 & 1) != 0) { *(char *)(param_2 + uVar5) = cVar6; uVar5 = uVar5 + 1; } pbVar12 = pbVar12 + 1; } while (uVar5 < param_3); } return uVar5; }
16,639
free_block
eloqsql/mysys/mf_keycache.c
static void free_block(SIMPLE_KEY_CACHE_CB *keycache, BLOCK_LINK *block) { KEYCACHE_THREAD_TRACE("free block"); KEYCACHE_DBUG_PRINT("free_block", ("block %u to be freed, hash_link %p status: %u", BLOCK_NUMBER(block), block->hash_link, block->status)); /* Assert that the block is not free already. And that it is in a clean state. Note that the block might just be assigned to a hash_link and not yet read (BLOCK_READ may not be set here). In this case a reader is registered in the hash_link and free_block() will wait for it below. */ DBUG_ASSERT((block->status & BLOCK_IN_USE) && !(block->status & (BLOCK_IN_EVICTION | BLOCK_IN_SWITCH | BLOCK_REASSIGNED | BLOCK_IN_FLUSH | BLOCK_CHANGED | BLOCK_FOR_UPDATE))); /* Assert that the block is in a file_blocks chain. */ DBUG_ASSERT(block->prev_changed && *block->prev_changed == block); /* Assert that the block is not in the LRU ring. */ DBUG_ASSERT(!block->next_used && !block->prev_used); /* IMHO the below condition (if()) makes no sense. I can't see how it could be possible that free_block() is entered with a NULL hash_link pointer. The only place where it can become NULL is in free_block() (or before its first use ever, but for those blocks free_block() is not called). I don't remove the conditional as it cannot harm, but place an DBUG_ASSERT to confirm my hypothesis. Eventually the condition (if()) can be removed. */ DBUG_ASSERT(block->hash_link && block->hash_link->block == block); if (block->hash_link) { /* While waiting for readers to finish, new readers might request the block. But since we set block->status|= BLOCK_REASSIGNED, they will wait on block->wqueue[COND_FOR_SAVED]. They must be signalled later. */ block->status|= BLOCK_REASSIGNED; wait_for_readers(keycache, block); /* The block must not have been freed by another thread. Repeat some checks. An additional requirement is that it must be read now (BLOCK_READ). */ DBUG_ASSERT(block->hash_link && block->hash_link->block == block); DBUG_ASSERT((block->status & (BLOCK_READ | BLOCK_IN_USE | BLOCK_REASSIGNED)) && !(block->status & (BLOCK_IN_EVICTION | BLOCK_IN_SWITCH | BLOCK_IN_FLUSH | BLOCK_CHANGED | BLOCK_FOR_UPDATE))); DBUG_ASSERT(block->prev_changed && *block->prev_changed == block); DBUG_ASSERT(!block->prev_used); /* Unset BLOCK_REASSIGNED again. If we hand the block to an evicting thread (through unreg_request() below), other threads must not see this flag. They could become confused. */ block->status&= ~BLOCK_REASSIGNED; /* Do not release the hash_link until the block is off all lists. At least not if we hand it over for eviction in unreg_request(). */ } /* Unregister the block request and link the block into the LRU ring. This enables eviction for the block. If the LRU ring was empty and threads are waiting for a block, then the block wil be handed over for eviction immediately. Otherwise we will unlink it from the LRU ring again, without releasing the lock in between. So decrementing the request counter and updating statistics are the only relevant operation in this case. Assert that there are no other requests registered. */ DBUG_ASSERT(block->requests == 1); unreg_request(keycache, block, 0); /* Note that even without releasing the cache lock it is possible that the block is immediately selected for eviction by link_block() and thus not added to the LRU ring. In this case we must not touch the block any more. */ if (block->status & BLOCK_IN_EVICTION) return; /* Error blocks are not put into the LRU ring. */ if (!(block->status & BLOCK_ERROR)) { /* Here the block must be in the LRU ring. Unlink it again. */ DBUG_ASSERT(block->next_used && block->prev_used && *block->prev_used == block); unlink_block(keycache, block); } if (block->temperature == BLOCK_WARM) keycache->warm_blocks--; block->temperature= BLOCK_COLD; /* Remove from file_blocks hash. */ unlink_changed(block); /* Remove reference to block from hash table. */ unlink_hash(keycache, block->hash_link); block->hash_link= NULL; block->status= 0; block->length= 0; block->offset= keycache->key_cache_block_size; KEYCACHE_THREAD_TRACE("free block"); KEYCACHE_DBUG_PRINT("free_block", ("block is freed")); /* Enforced by unlink_changed(), but just to be sure. */ DBUG_ASSERT(!block->next_changed && !block->prev_changed); /* Enforced by unlink_block(): not in LRU ring nor in free_block_list. */ DBUG_ASSERT(!block->next_used && !block->prev_used); /* Insert the free block in the free list. */ block->next_used= keycache->free_block_list; keycache->free_block_list= block; /* Keep track of the number of currently unused blocks. */ keycache->blocks_unused++; /* All pending requests for this page must be resubmitted. */ release_whole_queue(&block->wqueue[COND_FOR_SAVED]); }
O3
c
free_block: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 cmpq $0x0, 0x20(%rsi) je 0x981b3 orb $0x8, 0x50(%rbx) movq %r14, %rdi movq %rbx, %rsi callq 0x98a0b andb $-0x9, 0x50(%rbx) movq %r14, %rdi movq %rbx, %rsi xorl %edx, %edx callq 0x98084 movl 0x50(%rbx), %eax testb %al, %al js 0x981fe testb $0x1, %al jne 0x981d6 movq %r14, %rdi movq %rbx, %rsi callq 0x98a94 cmpl $0x1, 0x54(%rbx) jne 0x981e0 decq 0x68(%r14) movl $0x0, 0x54(%rbx) movq 0x10(%rbx), %rcx movq 0x18(%rbx), %rax testq %rcx, %rcx je 0x98203 movq %rax, 0x18(%rcx) movq 0x10(%rbx), %rcx jmp 0x98205 popq %rbx popq %r14 popq %rbp retq xorl %ecx, %ecx movq %rcx, (%rax) movq 0x20(%rbx), %rsi movq %r14, %rdi callq 0x987a9 xorl %eax, %eax movq %rax, 0x20(%rbx) movq %rax, 0x4c(%rbx) movl 0x18(%r14), %eax movl %eax, 0x48(%rbx) movq 0x98(%r14), %rax movq %rax, (%rbx) movq %rbx, 0x98(%r14) incq 0x58(%r14) addq $0x30, %rbx movq %rbx, %rdi popq %rbx popq %r14 popq %rbp jmp 0x98991
free_block_0: push rbp mov rbp, rsp push r14 push rbx mov rbx, rsi mov r14, rdi cmp qword ptr [rsi+20h], 0 jz short loc_981B3 or byte ptr [rbx+50h], 8 mov rdi, r14 mov rsi, rbx call wait_for_readers_0 and byte ptr [rbx+50h], 0F7h loc_981B3: mov rdi, r14 mov rsi, rbx xor edx, edx call unreg_request_0 mov eax, [rbx+50h] test al, al js short loc_981FE test al, 1 jnz short loc_981D6 mov rdi, r14 mov rsi, rbx call unlink_block_0 loc_981D6: cmp dword ptr [rbx+54h], 1 jnz short loc_981E0 dec qword ptr [r14+68h] loc_981E0: mov dword ptr [rbx+54h], 0 mov rcx, [rbx+10h] mov rax, [rbx+18h] test rcx, rcx jz short loc_98203 mov [rcx+18h], rax mov rcx, [rbx+10h] jmp short loc_98205 loc_981FE: pop rbx pop r14 pop rbp retn loc_98203: xor ecx, ecx loc_98205: mov [rax], rcx mov rsi, [rbx+20h] mov rdi, r14 call unlink_hash_0 xor eax, eax mov [rbx+20h], rax mov [rbx+4Ch], rax mov eax, [r14+18h] mov [rbx+48h], eax mov rax, [r14+98h] mov [rbx], rax mov [r14+98h], rbx inc qword ptr [r14+58h] add rbx, 30h ; '0' mov rdi, rbx pop rbx pop r14 pop rbp jmp release_whole_queue
long long free_block_0(long long a1, long long a2) { long long v2; // rdx long long result; // rax long long v4; // rcx _QWORD *v5; // rax long long v6; // rcx if ( *(_QWORD *)(a2 + 32) ) { *(_BYTE *)(a2 + 80) |= 8u; wait_for_readers_0(a1, a2); *(_BYTE *)(a2 + 80) &= ~8u; } unreg_request_0((_QWORD *)a1, a2, 0LL); result = *(unsigned int *)(a2 + 80); if ( (result & 0x80u) == 0LL ) { if ( (result & 1) == 0 ) unlink_block_0(a1, a2, v2); if ( *(_DWORD *)(a2 + 84) == 1 ) --*(_QWORD *)(a1 + 104); *(_DWORD *)(a2 + 84) = 0; v4 = *(_QWORD *)(a2 + 16); v5 = *(_QWORD **)(a2 + 24); if ( v4 ) { *(_QWORD *)(v4 + 24) = v5; v6 = *(_QWORD *)(a2 + 16); } else { v6 = 0LL; } *v5 = v6; unlink_hash_0(a1, *(_QWORD *)(a2 + 32)); *(_QWORD *)(a2 + 32) = 0LL; *(_QWORD *)(a2 + 76) = 0LL; *(_DWORD *)(a2 + 72) = *(_DWORD *)(a1 + 24); *(_QWORD *)a2 = *(_QWORD *)(a1 + 152); *(_QWORD *)(a1 + 152) = a2; ++*(_QWORD *)(a1 + 88); return release_whole_queue(a2 + 48); } return result; }
free_block: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RSI MOV R14,RDI CMP qword ptr [RSI + 0x20],0x0 JZ 0x001981b3 OR byte ptr [RBX + 0x50],0x8 MOV RDI,R14 MOV RSI,RBX CALL 0x00198a0b AND byte ptr [RBX + 0x50],0xf7 LAB_001981b3: MOV RDI,R14 MOV RSI,RBX XOR EDX,EDX CALL 0x00198084 MOV EAX,dword ptr [RBX + 0x50] TEST AL,AL JS 0x001981fe TEST AL,0x1 JNZ 0x001981d6 MOV RDI,R14 MOV RSI,RBX CALL 0x00198a94 LAB_001981d6: CMP dword ptr [RBX + 0x54],0x1 JNZ 0x001981e0 DEC qword ptr [R14 + 0x68] LAB_001981e0: MOV dword ptr [RBX + 0x54],0x0 MOV RCX,qword ptr [RBX + 0x10] MOV RAX,qword ptr [RBX + 0x18] TEST RCX,RCX JZ 0x00198203 MOV qword ptr [RCX + 0x18],RAX MOV RCX,qword ptr [RBX + 0x10] JMP 0x00198205 LAB_001981fe: POP RBX POP R14 POP RBP RET LAB_00198203: XOR ECX,ECX LAB_00198205: MOV qword ptr [RAX],RCX MOV RSI,qword ptr [RBX + 0x20] MOV RDI,R14 CALL 0x001987a9 XOR EAX,EAX MOV qword ptr [RBX + 0x20],RAX MOV qword ptr [RBX + 0x4c],RAX MOV EAX,dword ptr [R14 + 0x18] MOV dword ptr [RBX + 0x48],EAX MOV RAX,qword ptr [R14 + 0x98] MOV qword ptr [RBX],RAX MOV qword ptr [R14 + 0x98],RBX INC qword ptr [R14 + 0x58] ADD RBX,0x30 MOV RDI,RBX POP RBX POP R14 POP RBP JMP 0x00198991
void free_block(long param_1,int8 *param_2) { int8 *puVar1; int8 uVar2; if (param_2[4] != 0) { *(byte *)(param_2 + 10) = *(byte *)(param_2 + 10) | 8; wait_for_readers(param_1,param_2); *(byte *)(param_2 + 10) = *(byte *)(param_2 + 10) & 0xf7; } unreg_request(param_1,param_2,0); if (-1 < (char)*(uint *)(param_2 + 10)) { if ((*(uint *)(param_2 + 10) & 1) == 0) { unlink_block(param_1,param_2); } if (*(int *)((long)param_2 + 0x54) == 1) { *(long *)(param_1 + 0x68) = *(long *)(param_1 + 0x68) + -1; } *(int4 *)((long)param_2 + 0x54) = 0; puVar1 = (int8 *)param_2[3]; if (param_2[2] == 0) { uVar2 = 0; } else { *(int8 **)(param_2[2] + 0x18) = puVar1; uVar2 = param_2[2]; } *puVar1 = uVar2; unlink_hash(param_1,param_2[4]); param_2[4] = 0; *(int8 *)((long)param_2 + 0x4c) = 0; *(int4 *)(param_2 + 9) = *(int4 *)(param_1 + 0x18); *param_2 = *(int8 *)(param_1 + 0x98); *(int8 **)(param_1 + 0x98) = param_2; *(long *)(param_1 + 0x58) = *(long *)(param_1 + 0x58) + 1; release_whole_queue(param_2 + 6); return; } return; }
16,640
SetShapesTexture
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rshapes.c
void SetShapesTexture(Texture2D texture, Rectangle source) { // Reset texture to default pixel if required // WARNING: Shapes texture should be probably better validated, // it can break the rendering of all shapes if misused if ((texture.id == 0) || (source.width == 0) || (source.height == 0)) { texShapes = (Texture2D){ 1, 1, 1, 1, 7 }; texShapesRec = (Rectangle){ 0.0f, 0.0f, 1.0f, 1.0f }; } else { texShapes = texture; texShapesRec = source; } }
O0
c
SetShapesTexture: pushq %rbp movq %rsp, %rbp leaq 0x10(%rbp), %rax movq %rax, -0x40(%rbp) movlpd %xmm0, -0x10(%rbp) movlpd %xmm1, -0x8(%rbp) cmpl $0x0, (%rax) je 0xd6da3 movss -0x8(%rbp), %xmm0 xorps %xmm1, %xmm1 ucomiss %xmm1, %xmm0 jne 0xd6d8c jp 0xd6d8c jmp 0xd6da3 movss -0x4(%rbp), %xmm0 xorps %xmm1, %xmm1 ucomiss %xmm1, %xmm0 jne 0xd6e27 jp 0xd6e27 movl $0x1, -0x24(%rbp) movl $0x1, -0x20(%rbp) movl $0x1, -0x1c(%rbp) movl $0x1, -0x18(%rbp) movl $0x7, -0x14(%rbp) movq -0x24(%rbp), %rax movq %rax, 0x13d36f(%rip) # 0x214140 movq -0x1c(%rbp), %rax movq %rax, 0x13d36c(%rip) # 0x214148 movl -0x14(%rbp), %eax movl %eax, 0x13d36b(%rip) # 0x214150 xorps %xmm0, %xmm0 movss %xmm0, -0x34(%rbp) xorps %xmm0, %xmm0 movss %xmm0, -0x30(%rbp) movss 0xcd2f7(%rip), %xmm0 # 0x1a40f4 movss %xmm0, -0x2c(%rbp) movss 0xcd2ea(%rip), %xmm0 # 0x1a40f4 movss %xmm0, -0x28(%rbp) movq -0x34(%rbp), %rax movq %rax, 0x13d33a(%rip) # 0x214154 movq -0x2c(%rbp), %rax movq %rax, 0x13d337(%rip) # 0x21415c jmp 0xd6e5f movq -0x40(%rbp), %rax movq (%rax), %rcx movq %rcx, 0x13d30b(%rip) # 0x214140 movq 0x8(%rax), %rcx movq %rcx, 0x13d308(%rip) # 0x214148 movl 0x10(%rax), %eax movl %eax, 0x13d307(%rip) # 0x214150 movq -0x10(%rbp), %rax movq %rax, 0x13d300(%rip) # 0x214154 movq -0x8(%rbp), %rax movq %rax, 0x13d2fd(%rip) # 0x21415c popq %rbp retq nopw %cs:(%rax,%rax)
SetShapesTexture: push rbp mov rbp, rsp lea rax, [rbp+arg_0] mov [rbp+var_40], rax movlpd [rbp+var_10], xmm0 movlpd [rbp+var_8], xmm1 cmp dword ptr [rax], 0 jz short loc_D6DA3 movss xmm0, dword ptr [rbp+var_8] xorps xmm1, xmm1 ucomiss xmm0, xmm1 jnz short loc_D6D8C jp short loc_D6D8C jmp short loc_D6DA3 loc_D6D8C: movss xmm0, dword ptr [rbp+var_8+4] xorps xmm1, xmm1 ucomiss xmm0, xmm1 jnz loc_D6E27 jp loc_D6E27 loc_D6DA3: mov dword ptr [rbp+var_24], 1 mov dword ptr [rbp+var_24+4], 1 mov dword ptr [rbp+var_1C], 1 mov dword ptr [rbp+var_1C+4], 1 mov [rbp+var_14], 7 mov rax, [rbp+var_24] mov cs:texShapes, rax mov rax, [rbp+var_1C] mov cs:qword_214148, rax mov eax, [rbp+var_14] mov cs:dword_214150, eax xorps xmm0, xmm0 movss dword ptr [rbp+var_34], xmm0 xorps xmm0, xmm0 movss dword ptr [rbp+var_34+4], xmm0 movss xmm0, cs:dword_1A40F4 movss dword ptr [rbp+var_2C], xmm0 movss xmm0, cs:dword_1A40F4 movss dword ptr [rbp+var_2C+4], xmm0 mov rax, [rbp+var_34] mov qword ptr cs:texShapesRec, rax mov rax, [rbp+var_2C] mov qword ptr cs:texShapesRec+8, rax jmp short loc_D6E5F loc_D6E27: mov rax, [rbp+var_40] mov rcx, [rax] mov cs:texShapes, rcx mov rcx, [rax+8] mov cs:qword_214148, rcx mov eax, [rax+10h] mov cs:dword_214150, eax mov rax, [rbp+var_10] mov qword ptr cs:texShapesRec, rax mov rax, [rbp+var_8] mov qword ptr cs:texShapesRec+8, rax loc_D6E5F: pop rbp retn
long long SetShapesTexture( double a1, double a2, long long a3, long long a4, long long a5, long long a6, long long a7, long long a8, long long a9, long long a10, int a11) { __int128 v12; // [rsp+Ch] [rbp-34h] __int128 v13; // [rsp+30h] [rbp-10h] *(double *)&v13 = a1; *((double *)&v13 + 1) = a2; if ( !(_DWORD)a9 || *(float *)&a2 == 0.0 || *((float *)&a2 + 1) == 0.0 ) { texShapes = 0x100000001LL; qword_214148 = 0x100000001LL; dword_214150 = 7; *(_QWORD *)&v12 = 0LL; *((_QWORD *)&v12 + 1) = 0x3F8000003F800000LL; texShapesRec = v12; return 0x3F8000003F800000LL; } else { texShapes = a9; qword_214148 = a10; dword_214150 = a11; texShapesRec = v13; return *(_QWORD *)&a2; } }
SetShapesTexture: PUSH RBP MOV RBP,RSP LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x40],RAX MOVLPD qword ptr [RBP + -0x10],XMM0 MOVLPD qword ptr [RBP + -0x8],XMM1 CMP dword ptr [RAX],0x0 JZ 0x001d6da3 MOVSS XMM0,dword ptr [RBP + -0x8] XORPS XMM1,XMM1 UCOMISS XMM0,XMM1 JNZ 0x001d6d8c JP 0x001d6d8c JMP 0x001d6da3 LAB_001d6d8c: MOVSS XMM0,dword ptr [RBP + -0x4] XORPS XMM1,XMM1 UCOMISS XMM0,XMM1 JNZ 0x001d6e27 JP 0x001d6e27 LAB_001d6da3: MOV dword ptr [RBP + -0x24],0x1 MOV dword ptr [RBP + -0x20],0x1 MOV dword ptr [RBP + -0x1c],0x1 MOV dword ptr [RBP + -0x18],0x1 MOV dword ptr [RBP + -0x14],0x7 MOV RAX,qword ptr [RBP + -0x24] MOV qword ptr [0x00314140],RAX MOV RAX,qword ptr [RBP + -0x1c] MOV qword ptr [0x00314148],RAX MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [0x00314150],EAX XORPS XMM0,XMM0 MOVSS dword ptr [RBP + -0x34],XMM0 XORPS XMM0,XMM0 MOVSS dword ptr [RBP + -0x30],XMM0 MOVSS XMM0,dword ptr [0x002a40f4] MOVSS dword ptr [RBP + -0x2c],XMM0 MOVSS XMM0,dword ptr [0x002a40f4] MOVSS dword ptr [RBP + -0x28],XMM0 MOV RAX,qword ptr [RBP + -0x34] MOV qword ptr [0x00314154],RAX MOV RAX,qword ptr [RBP + -0x2c] MOV qword ptr [0x0031415c],RAX JMP 0x001d6e5f LAB_001d6e27: MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RAX] MOV qword ptr [0x00314140],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [0x00314148],RCX MOV EAX,dword ptr [RAX + 0x10] MOV dword ptr [0x00314150],EAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [0x00314154],RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [0x0031415c],RAX LAB_001d6e5f: POP RBP RET
/* WARNING: Restarted to delay deadcode elimination for space: stack */ void SetShapesTexture(int8 param_1,int8 param_2) { int iStack0000000000000008; int8 in_stack_00000010; int4 in_stack_00000018; if (((iStack0000000000000008 == 0) || (((float)param_2 == 0.0 && (!NAN((float)param_2))))) || ((SUB84(param_2,4) == 0.0 && (!NAN(SUB84(param_2,4)))))) { texShapes = 0x100000001; DAT_00314148 = 0x100000001; DAT_00314150 = 7; texShapesRec._0_8_ = 0; texShapesRec._12_4_ = DAT_002a40f4; texShapesRec._8_4_ = DAT_002a40f4; } else { texShapes = _iStack0000000000000008; DAT_00314148 = in_stack_00000010; DAT_00314150 = in_stack_00000018; texShapesRec._0_8_ = param_1; texShapesRec._8_8_ = param_2; } return; }
16,641
SetShapesTexture
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rshapes.c
void SetShapesTexture(Texture2D texture, Rectangle source) { // Reset texture to default pixel if required // WARNING: Shapes texture should be probably better validated, // it can break the rendering of all shapes if misused if ((texture.id == 0) || (source.width == 0) || (source.height == 0)) { texShapes = (Texture2D){ 1, 1, 1, 1, 7 }; texShapesRec = (Rectangle){ 0.0f, 0.0f, 1.0f, 1.0f }; } else { texShapes = texture; texShapesRec = source; } }
O1
c
SetShapesTexture: cmpl $0x0, 0x8(%rsp) je 0x7cb9e xorps %xmm2, %xmm2 ucomiss %xmm2, %xmm1 jne 0x7cb6d jnp 0x7cb9e movaps %xmm1, %xmm3 shufps $0x55, %xmm1, %xmm3 # xmm3 = xmm3[1,1],xmm1[1,1] ucomiss %xmm2, %xmm3 jne 0x7cb7b jnp 0x7cb9e leaq 0x8(%rsp), %rax movl 0x10(%rax), %ecx movl %ecx, 0xbfd27(%rip) # 0x13c8b0 movups (%rax), %xmm2 movups %xmm2, 0xbfd0d(%rip) # 0x13c8a0 movlhps %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0] movups %xmm0, 0xbfd1b(%rip) # 0x13c8b8 retq movaps 0x704fb(%rip), %xmm0 # 0xed0a0 movups %xmm0, 0xbfcf4(%rip) # 0x13c8a0 movl $0x7, 0xbfcfa(%rip) # 0x13c8b0 movaps 0x704f3(%rip), %xmm0 # 0xed0b0 movups %xmm0, 0xbfcf4(%rip) # 0x13c8b8 retq
SetShapesTexture: cmp [rsp+arg_0], 0 jz short loc_7CB9E xorps xmm2, xmm2 ucomiss xmm1, xmm2 jnz short loc_7CB6D jnp short loc_7CB9E loc_7CB6D: movaps xmm3, xmm1 shufps xmm3, xmm1, 55h ; 'U' ucomiss xmm3, xmm2 jnz short loc_7CB7B jnp short loc_7CB9E loc_7CB7B: lea rax, [rsp+arg_0] mov ecx, [rax+10h] mov cs:dword_13C8B0, ecx movups xmm2, xmmword ptr [rax] movups cs:texShapes, xmm2 movlhps xmm0, xmm1 movups cs:texShapesRec, xmm0 retn loc_7CB9E: movaps xmm0, cs:xmmword_ED0A0 movups cs:texShapes, xmm0 mov cs:dword_13C8B0, 7 movaps xmm0, cs:xmmword_ED0B0 movups cs:texShapesRec, xmm0 retn
__int128 * SetShapesTexture( __m128 a1, __m128 a2, long long a3, long long a4, long long a5, long long a6, long long a7, long long a8, __int128 a9, int a10) { __int128 *result; // rax if ( !(_DWORD)a9 || a2.m128_f32[0] == 0.0 || _mm_shuffle_ps(a2, a2, 85).m128_f32[0] == 0.0 ) { texShapes = xmmword_ED0A0; dword_13C8B0 = 7; texShapesRec = xmmword_ED0B0; } else { result = &a9; dword_13C8B0 = a10; texShapes = a9; texShapesRec = (__int128)_mm_movelh_ps(a1, a2); } return result; }
SetShapesTexture: CMP dword ptr [RSP + 0x8],0x0 JZ 0x0017cb9e XORPS XMM2,XMM2 UCOMISS XMM1,XMM2 JNZ 0x0017cb6d JNP 0x0017cb9e LAB_0017cb6d: MOVAPS XMM3,XMM1 SHUFPS XMM3,XMM1,0x55 UCOMISS XMM3,XMM2 JNZ 0x0017cb7b JNP 0x0017cb9e LAB_0017cb7b: LEA RAX,[RSP + 0x8] MOV ECX,dword ptr [RAX + 0x10] MOV dword ptr [0x0023c8b0],ECX MOVUPS XMM2,xmmword ptr [RAX] MOVUPS xmmword ptr [0x0023c8a0],XMM2 MOVLHPS XMM0,XMM1 MOVUPS xmmword ptr [0x0023c8b8],XMM0 RET LAB_0017cb9e: MOVAPS XMM0,xmmword ptr [0x001ed0a0] MOVUPS xmmword ptr [0x0023c8a0],XMM0 MOV dword ptr [0x0023c8b0],0x7 MOVAPS XMM0,xmmword ptr [0x001ed0b0] MOVUPS xmmword ptr [0x0023c8b8],XMM0 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void SetShapesTexture(int8 param_1,int8 param_2) { float fVar1; int iStack0000000000000008; int8 in_stack_00000010; int4 in_stack_00000018; fVar1 = (float)((ulong)param_2 >> 0x20); if (((iStack0000000000000008 != 0) && (((float)param_2 != 0.0 || (NAN((float)param_2))))) && ((fVar1 != 0.0 || (NAN(fVar1))))) { DAT_0023c8b0 = in_stack_00000018; _texShapes = _iStack0000000000000008; _DAT_0023c8a8 = in_stack_00000010; texShapesRec = param_1; DAT_0023c8c0 = param_2; return; } _texShapes = _DAT_001ed0a0; _DAT_0023c8a8 = _UNK_001ed0a8; DAT_0023c8b0 = 7; texShapesRec = _DAT_001ed0b0; DAT_0023c8c0 = _UNK_001ed0b8; return; }
16,642
SetShapesTexture
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rshapes.c
void SetShapesTexture(Texture2D texture, Rectangle source) { // Reset texture to default pixel if required // WARNING: Shapes texture should be probably better validated, // it can break the rendering of all shapes if misused if ((texture.id == 0) || (source.width == 0) || (source.height == 0)) { texShapes = (Texture2D){ 1, 1, 1, 1, 7 }; texShapesRec = (Rectangle){ 0.0f, 0.0f, 1.0f, 1.0f }; } else { texShapes = texture; texShapesRec = source; } }
O2
c
SetShapesTexture: cmpl $0x0, 0x8(%rsp) je 0x65ece xorps %xmm2, %xmm2 ucomiss %xmm2, %xmm1 jne 0x65e9d jnp 0x65ece movaps %xmm1, %xmm3 shufps $0x55, %xmm1, %xmm3 # xmm3 = xmm3[1,1],xmm1[1,1] ucomiss %xmm2, %xmm3 jne 0x65eab jnp 0x65ece leaq 0x8(%rsp), %rax movl 0x10(%rax), %ecx movl %ecx, 0xbc9f7(%rip) # 0x1228b0 movups (%rax), %xmm2 movaps %xmm2, 0xbc9dd(%rip) # 0x1228a0 movlhps %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0] movaps %xmm0, 0xbc9f3(%rip) # 0x1228c0 retq movaps 0x673bb(%rip), %xmm0 # 0xcd290 movaps %xmm0, 0xbc9c4(%rip) # 0x1228a0 movl $0x7, 0xbc9ca(%rip) # 0x1228b0 movaps 0x673b3(%rip), %xmm0 # 0xcd2a0 movaps %xmm0, 0xbc9cc(%rip) # 0x1228c0 retq
SetShapesTexture: cmp [rsp+arg_0], 0 jz short loc_65ECE xorps xmm2, xmm2 ucomiss xmm1, xmm2 jnz short loc_65E9D jnp short loc_65ECE loc_65E9D: movaps xmm3, xmm1 shufps xmm3, xmm1, 55h ; 'U' ucomiss xmm3, xmm2 jnz short loc_65EAB jnp short loc_65ECE loc_65EAB: lea rax, [rsp+arg_0] mov ecx, [rax+10h] mov cs:dword_1228B0, ecx movups xmm2, xmmword ptr [rax] movaps cs:texShapes, xmm2 movlhps xmm0, xmm1 movaps cs:texShapesRec, xmm0 retn loc_65ECE: movaps xmm0, cs:xmmword_CD290 movaps cs:texShapes, xmm0 mov cs:dword_1228B0, 7 movaps xmm0, cs:xmmword_CD2A0 movaps cs:texShapesRec, xmm0 retn
__int128 * SetShapesTexture( __m128 a1, __m128 a2, long long a3, long long a4, long long a5, long long a6, long long a7, long long a8, __int128 a9, int a10) { __int128 *result; // rax if ( !(_DWORD)a9 || a2.m128_f32[0] == 0.0 || _mm_shuffle_ps(a2, a2, 85).m128_f32[0] == 0.0 ) { texShapes = xmmword_CD290; dword_1228B0 = 7; texShapesRec = xmmword_CD2A0; } else { result = &a9; dword_1228B0 = a10; texShapes = a9; texShapesRec = (__int128)_mm_movelh_ps(a1, a2); } return result; }
SetShapesTexture: CMP dword ptr [RSP + 0x8],0x0 JZ 0x00165ece XORPS XMM2,XMM2 UCOMISS XMM1,XMM2 JNZ 0x00165e9d JNP 0x00165ece LAB_00165e9d: MOVAPS XMM3,XMM1 SHUFPS XMM3,XMM1,0x55 UCOMISS XMM3,XMM2 JNZ 0x00165eab JNP 0x00165ece LAB_00165eab: LEA RAX,[RSP + 0x8] MOV ECX,dword ptr [RAX + 0x10] MOV dword ptr [0x002228b0],ECX MOVUPS XMM2,xmmword ptr [RAX] MOVAPS xmmword ptr [0x002228a0],XMM2 MOVLHPS XMM0,XMM1 MOVAPS xmmword ptr [0x002228c0],XMM0 RET LAB_00165ece: MOVAPS XMM0,xmmword ptr [0x001cd290] MOVAPS xmmword ptr [0x002228a0],XMM0 MOV dword ptr [0x002228b0],0x7 MOVAPS XMM0,xmmword ptr [0x001cd2a0] MOVAPS xmmword ptr [0x002228c0],XMM0 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void SetShapesTexture(int8 param_1,int8 param_2) { float fVar1; int iStack0000000000000008; int8 in_stack_00000010; int4 in_stack_00000018; fVar1 = (float)((ulong)param_2 >> 0x20); if (((iStack0000000000000008 != 0) && (((float)param_2 != 0.0 || (NAN((float)param_2))))) && ((fVar1 != 0.0 || (NAN(fVar1))))) { DAT_002228b0 = in_stack_00000018; _texShapes = _iStack0000000000000008; _DAT_002228a8 = in_stack_00000010; texShapesRec = param_1; DAT_002228c8 = param_2; return; } _texShapes = _DAT_001cd290; _DAT_002228a8 = _UNK_001cd298; DAT_002228b0 = 7; texShapesRec = _DAT_001cd2a0; DAT_002228c8 = _UNK_001cd2a8; return; }
16,643
SetShapesTexture
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rshapes.c
void SetShapesTexture(Texture2D texture, Rectangle source) { // Reset texture to default pixel if required // WARNING: Shapes texture should be probably better validated, // it can break the rendering of all shapes if misused if ((texture.id == 0) || (source.width == 0) || (source.height == 0)) { texShapes = (Texture2D){ 1, 1, 1, 1, 7 }; texShapesRec = (Rectangle){ 0.0f, 0.0f, 1.0f, 1.0f }; } else { texShapes = texture; texShapesRec = source; } }
O3
c
SetShapesTexture: cmpl $0x0, 0x8(%rsp) je 0x786e2 xorps %xmm2, %xmm2 ucomiss %xmm2, %xmm1 jne 0x786b1 jnp 0x786e2 movaps %xmm1, %xmm3 shufps $0x55, %xmm1, %xmm3 # xmm3 = xmm3[1,1],xmm1[1,1] ucomiss %xmm2, %xmm3 jne 0x786bf jnp 0x786e2 leaq 0x8(%rsp), %rax movl 0x10(%rax), %ecx movl %ecx, 0xbe1e3(%rip) # 0x1368b0 movups (%rax), %xmm2 movaps %xmm2, 0xbe1c9(%rip) # 0x1368a0 movlhps %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0] movaps %xmm0, 0xbe1df(%rip) # 0x1368c0 retq movaps 0x6ea27(%rip), %xmm0 # 0xe7110 movaps %xmm0, 0xbe1b0(%rip) # 0x1368a0 movl $0x7, 0xbe1b6(%rip) # 0x1368b0 movaps 0x6ea1f(%rip), %xmm0 # 0xe7120 movaps %xmm0, 0xbe1b8(%rip) # 0x1368c0 retq
SetShapesTexture: cmp [rsp+arg_0], 0 jz short loc_786E2 xorps xmm2, xmm2 ucomiss xmm1, xmm2 jnz short loc_786B1 jnp short loc_786E2 loc_786B1: movaps xmm3, xmm1 shufps xmm3, xmm1, 55h ; 'U' ucomiss xmm3, xmm2 jnz short loc_786BF jnp short loc_786E2 loc_786BF: lea rax, [rsp+arg_0] mov ecx, [rax+10h] mov cs:dword_1368B0, ecx movups xmm2, xmmword ptr [rax] movaps cs:texShapes, xmm2 movlhps xmm0, xmm1 movaps cs:texShapesRec, xmm0 retn loc_786E2: movaps xmm0, cs:xmmword_E7110 movaps cs:texShapes, xmm0 mov cs:dword_1368B0, 7 movaps xmm0, cs:xmmword_E7120 movaps cs:texShapesRec, xmm0 retn
__int128 * SetShapesTexture( __m128 a1, __m128 a2, long long a3, long long a4, long long a5, long long a6, long long a7, long long a8, __int128 a9, int a10) { __int128 *result; // rax if ( !(_DWORD)a9 || a2.m128_f32[0] == 0.0 || _mm_shuffle_ps(a2, a2, 85).m128_f32[0] == 0.0 ) { texShapes = xmmword_E7110; dword_1368B0 = 7; texShapesRec = xmmword_E7120; } else { result = &a9; dword_1368B0 = a10; texShapes = a9; texShapesRec = (__int128)_mm_movelh_ps(a1, a2); } return result; }
SetShapesTexture: CMP dword ptr [RSP + 0x8],0x0 JZ 0x001786e2 XORPS XMM2,XMM2 UCOMISS XMM1,XMM2 JNZ 0x001786b1 JNP 0x001786e2 LAB_001786b1: MOVAPS XMM3,XMM1 SHUFPS XMM3,XMM1,0x55 UCOMISS XMM3,XMM2 JNZ 0x001786bf JNP 0x001786e2 LAB_001786bf: LEA RAX,[RSP + 0x8] MOV ECX,dword ptr [RAX + 0x10] MOV dword ptr [0x002368b0],ECX MOVUPS XMM2,xmmword ptr [RAX] MOVAPS xmmword ptr [0x002368a0],XMM2 MOVLHPS XMM0,XMM1 MOVAPS xmmword ptr [0x002368c0],XMM0 RET LAB_001786e2: MOVAPS XMM0,xmmword ptr [0x001e7110] MOVAPS xmmword ptr [0x002368a0],XMM0 MOV dword ptr [0x002368b0],0x7 MOVAPS XMM0,xmmword ptr [0x001e7120] MOVAPS xmmword ptr [0x002368c0],XMM0 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void SetShapesTexture(int8 param_1,int8 param_2) { float fVar1; int iStack0000000000000008; int8 in_stack_00000010; int4 in_stack_00000018; fVar1 = (float)((ulong)param_2 >> 0x20); if (((iStack0000000000000008 != 0) && (((float)param_2 != 0.0 || (NAN((float)param_2))))) && ((fVar1 != 0.0 || (NAN(fVar1))))) { DAT_002368b0 = in_stack_00000018; _texShapes = _iStack0000000000000008; _DAT_002368a8 = in_stack_00000010; texShapesRec = param_1; DAT_002368c8 = param_2; return; } _texShapes = _DAT_001e7110; _DAT_002368a8 = _UNK_001e7118; DAT_002368b0 = 7; texShapesRec = _DAT_001e7120; DAT_002368c8 = _UNK_001e7128; return; }
16,644
used_buffs_urgent_unlock
eloqsql/storage/maria/ma_loghandler.c
static void used_buffs_urgent_unlock(TRUNSLOG_USED_BUFFERS *buffs) { uint i; DBUG_ENTER("used_buffs_urgent_unlock"); translog_lock(); translog_stop_writing(); translog_unlock(); for (i= buffs->unlck_ptr; i < buffs->wrt_ptr; i++) { struct st_translog_buffer *buf= buffs->buff[i]; translog_buffer_lock(buf); translog_buffer_decrease_writers(buf); translog_buffer_unlock(buf); buffs->buff[i]= NULL; } used_buffs_init(buffs); DBUG_VOID_RETURN; }
O3
c
used_buffs_urgent_unlock: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdi, %rbx callq 0x48bf7 xorl %eax, %eax cmpl $0x3, 0x3adb5c(%rip) # 0x3fd5a0 setne %al addl %eax, %eax movl %eax, 0x3adb51(%rip) # 0x3fd5a0 movb $0x1, 0xbafc2a(%rip) # 0xbff680 movl $0x0, 0x3aed5c(%rip) # 0x3fe7bc movq 0xbaf9c1(%rip), %r14 # 0xbff428 movq 0x1000d0(%r14), %rdi testq %rdi, %rdi jne 0x4faf8 addq $0x100090, %r14 # imm = 0x100090 movq %r14, %rdi callq 0x291e0 movzbl 0x19(%rbx), %r15d cmpb 0x18(%rbx), %r15b jae 0x4fae9 leaq 0x336578(%rip), %r12 # 0x386010 movq (%rbx,%r15,8), %r14 movq %r14, %rdi callq 0x48c97 movq %r14, %rdi callq 0x4f9e3 movq 0x1000d0(%r14), %rdi testq %rdi, %rdi jne 0x4fadd addq $0x100090, %r14 # imm = 0x100090 movq %r14, %rdi callq 0x291e0 movq $0x0, (%rbx,%r15,8) incq %r15 movzbl 0x18(%rbx), %eax cmpq %rax, %r15 jb 0x4fa98 jmp 0x4fae9 movq (%r12), %rax callq *0x160(%rax) jmp 0x4fab8 movw $0x0, 0x18(%rbx) popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq 0x336511(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x4fa77
used_buffs_urgent_unlock: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rdi call translog_lock xor eax, eax cmp cs:translog_status, 3 setnz al add eax, eax mov cs:translog_status, eax mov byte ptr cs:word_BFF680, 1 mov cs:dword_3FE7BC, 0 mov r14, qword ptr cs:xmmword_BFF420+8 mov rdi, ds:qword_1000D0[r14] test rdi, rdi jnz loc_4FAF8 loc_4FA77: add r14, 100090h mov rdi, r14 call _pthread_mutex_unlock movzx r15d, byte ptr [rbx+19h] cmp r15b, [rbx+18h] jnb short loc_4FAE9 lea r12, PSI_server loc_4FA98: mov r14, [rbx+r15*8] mov rdi, r14 call translog_buffer_lock mov rdi, r14 call translog_buffer_decrease_writers mov rdi, ds:qword_1000D0[r14] test rdi, rdi jnz short loc_4FADD loc_4FAB8: add r14, 100090h mov rdi, r14 call _pthread_mutex_unlock mov qword ptr [rbx+r15*8], 0 inc r15 movzx eax, byte ptr [rbx+18h] cmp r15, rax jb short loc_4FA98 jmp short loc_4FAE9 loc_4FADD: mov rax, [r12] call qword ptr [rax+160h] jmp short loc_4FAB8 loc_4FAE9: mov word ptr [rbx+18h], 0 pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_4FAF8: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_4FA77
unsigned long long used_buffs_urgent_unlock(long long a1) { long long v1; // r14 unsigned long long result; // rax unsigned long long v3; // r15 long long v4; // r14 translog_lock(); translog_status = 2 * (translog_status != 3); LOBYTE(word_BFF680) = 1; dword_3FE7BC = 0; v1 = *((_QWORD *)&xmmword_BFF420 + 1); if ( *(long long *)((char *)&qword_1000D0 + *((_QWORD *)&xmmword_BFF420 + 1)) ) PSI_server[44](); result = pthread_mutex_unlock(v1 + 1048720); v3 = *(unsigned __int8 *)(a1 + 25); if ( (unsigned __int8)v3 < *(_BYTE *)(a1 + 24) ) { do { v4 = *(_QWORD *)(a1 + 8 * v3); translog_buffer_lock(v4); translog_buffer_decrease_writers(v4); if ( *(long long *)((char *)&qword_1000D0 + v4) ) PSI_server[44](); pthread_mutex_unlock(v4 + 1048720); *(_QWORD *)(a1 + 8 * v3++) = 0LL; result = *(unsigned __int8 *)(a1 + 24); } while ( v3 < result ); } *(_WORD *)(a1 + 24) = 0; return result; }
used_buffs_urgent_unlock: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RDI CALL 0x00148bf7 XOR EAX,EAX CMP dword ptr [0x004fd5a0],0x3 SETNZ AL ADD EAX,EAX MOV dword ptr [0x004fd5a0],EAX MOV byte ptr [0x00cff680],0x1 MOV dword ptr [0x004fe7bc],0x0 MOV R14,qword ptr [0x00cff428] MOV RDI,qword ptr [R14 + 0x1000d0] TEST RDI,RDI JNZ 0x0014faf8 LAB_0014fa77: ADD R14,0x100090 MOV RDI,R14 CALL 0x001291e0 MOVZX R15D,byte ptr [RBX + 0x19] CMP R15B,byte ptr [RBX + 0x18] JNC 0x0014fae9 LEA R12,[0x486010] LAB_0014fa98: MOV R14,qword ptr [RBX + R15*0x8] MOV RDI,R14 CALL 0x00148c97 MOV RDI,R14 CALL 0x0014f9e3 MOV RDI,qword ptr [R14 + 0x1000d0] TEST RDI,RDI JNZ 0x0014fadd LAB_0014fab8: ADD R14,0x100090 MOV RDI,R14 CALL 0x001291e0 MOV qword ptr [RBX + R15*0x8],0x0 INC R15 MOVZX EAX,byte ptr [RBX + 0x18] CMP R15,RAX JC 0x0014fa98 JMP 0x0014fae9 LAB_0014fadd: MOV RAX,qword ptr [R12] CALL qword ptr [RAX + 0x160] JMP 0x0014fab8 LAB_0014fae9: MOV word ptr [RBX + 0x18],0x0 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0014faf8: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0014fa77
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void used_buffs_urgent_unlock(long param_1) { long lVar1; ulong uVar2; translog_lock(); lVar1 = DAT_00cff428; translog_status = (uint)(translog_status != 3) * 2; DAT_00cff680 = 1; _DAT_004fe7bc = 0; if (*(long *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_filesz + DAT_00cff428) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_paddr + lVar1)); uVar2 = (ulong)*(byte *)(param_1 + 0x19); if (*(byte *)(param_1 + 0x19) < *(byte *)(param_1 + 0x18)) { do { lVar1 = *(long *)(param_1 + uVar2 * 8); translog_buffer_lock(lVar1); translog_buffer_decrease_writers(lVar1); if (*(long *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_filesz + lVar1) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_paddr + lVar1)) ; *(int8 *)(param_1 + uVar2 * 8) = 0; uVar2 = uVar2 + 1; } while (uVar2 < *(byte *)(param_1 + 0x18)); } *(int2 *)(param_1 + 0x18) = 0; return; }
16,645
ma_open_keyfile
eloqsql/storage/maria/ma_open.c
int _ma_open_keyfile(MARIA_SHARE *share) { /* Modifications to share->kfile should be under intern_lock to protect against a concurrent checkpoint. */ mysql_mutex_lock(&share->intern_lock); share->kfile.file= mysql_file_open(key_file_kfile, share->unique_file_name.str, share->mode | O_SHARE | O_NOFOLLOW | O_CLOEXEC, MYF(MY_WME | MY_NOSYMLINKS)); mysql_mutex_unlock(&share->intern_lock); return (share->kfile.file < 0); }
O0
c
ma_open_keyfile: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi addq $0x8f0, %rdi # imm = 0x8F0 leaq 0xe9433(%rip), %rsi # 0x151791 movl $0x811, %edx # imm = 0x811 callq 0x61cb0 leaq 0x40e719(%rip), %rax # 0x476a88 movl (%rax), %edi movq -0x8(%rbp), %rax movq 0x5b0(%rax), %rcx movq -0x8(%rbp), %rax movl 0x7a4(%rax), %r8d orl $0x0, %r8d orl $0x20000, %r8d # imm = 0x20000 orl $0x80000, %r8d # imm = 0x80000 leaq 0xe93f1(%rip), %rsi # 0x151791 movl $0x815, %edx # imm = 0x815 movl $0x210, %r9d # imm = 0x210 callq 0x61d20 movl %eax, %ecx movq -0x8(%rbp), %rax movl %ecx, 0x760(%rax) movq -0x8(%rbp), %rdi addq $0x8f0, %rdi # imm = 0x8F0 callq 0x64960 movq -0x8(%rbp), %rax cmpl $0x0, 0x760(%rax) setl %al andb $0x1, %al movzbl %al, %eax addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ma_open_keyfile: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] add rdi, 8F0h lea rsi, aWorkspaceLlm4b_14; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 811h call inline_mysql_mutex_lock_11 lea rax, key_file_kfile mov edi, [rax] mov rax, [rbp+var_8] mov rcx, [rax+5B0h] mov rax, [rbp+var_8] mov r8d, [rax+7A4h] or r8d, 0 or r8d, 20000h or r8d, 80000h lea rsi, aWorkspaceLlm4b_14; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 815h mov r9d, 210h call inline_mysql_file_open_1 mov ecx, eax mov rax, [rbp+var_8] mov [rax+760h], ecx mov rdi, [rbp+var_8] add rdi, 8F0h call inline_mysql_mutex_unlock_11 mov rax, [rbp+var_8] cmp dword ptr [rax+760h], 0 setl al and al, 1 movzx eax, al add rsp, 10h pop rbp retn
_BOOL8 ma_open_keyfile(long long a1) { inline_mysql_mutex_lock_11( a1 + 2288, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c", 0x811u); *(_DWORD *)(a1 + 1888) = inline_mysql_file_open_1( key_file_kfile, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c", 0x815u, *(_QWORD *)(a1 + 1456), *(_DWORD *)(a1 + 1956) | 0xA0000u, 528LL); inline_mysql_mutex_unlock_11(a1 + 2288); return *(int *)(a1 + 1888) < 0; }
_ma_open_keyfile: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x8f0 LEA RSI,[0x251791] MOV EDX,0x811 CALL 0x00161cb0 LEA RAX,[0x576a88] MOV EDI,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x5b0] MOV RAX,qword ptr [RBP + -0x8] MOV R8D,dword ptr [RAX + 0x7a4] OR R8D,0x0 OR R8D,0x20000 OR R8D,0x80000 LEA RSI,[0x251791] MOV EDX,0x815 MOV R9D,0x210 CALL 0x00161d20 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x760],ECX MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x8f0 CALL 0x00164960 MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x760],0x0 SETL AL AND AL,0x1 MOVZX EAX,AL ADD RSP,0x10 POP RBP RET
bool _ma_open_keyfile(long param_1) { int4 uVar1; inline_mysql_mutex_lock (param_1 + 0x8f0,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c", 0x811); uVar1 = inline_mysql_file_open (key_file_kfile, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c",0x815, *(int8 *)(param_1 + 0x5b0),*(uint *)(param_1 + 0x7a4) | 0xa0000,0x210); *(int4 *)(param_1 + 0x760) = uVar1; inline_mysql_mutex_unlock(param_1 + 0x8f0); return *(int *)(param_1 + 0x760) < 0; }
16,646
ma_open_keyfile
eloqsql/storage/maria/ma_open.c
int _ma_open_keyfile(MARIA_SHARE *share) { /* Modifications to share->kfile should be under intern_lock to protect against a concurrent checkpoint. */ mysql_mutex_lock(&share->intern_lock); share->kfile.file= mysql_file_open(key_file_kfile, share->unique_file_name.str, share->mode | O_SHARE | O_NOFOLLOW | O_CLOEXEC, MYF(MY_WME | MY_NOSYMLINKS)); mysql_mutex_unlock(&share->intern_lock); return (share->kfile.file < 0); }
O3
c
ma_open_keyfile: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdi, %rbx leaq 0x8f0(%rdi), %r14 cmpq $0x0, 0x930(%rdi) jne 0x55622 movq %r14, %rdi callq 0x29210 leaq 0x3a6912(%rip), %rax # 0x3fbea8 movl (%rax), %esi movq 0x5b0(%rbx), %r12 movl $0xa0000, %r15d # imm = 0xA0000 orl 0x7a4(%rbx), %r15d leaq 0x32fa5d(%rip), %rax # 0x385010 movq (%rax), %rax leaq -0x78(%rbp), %rdi leaq -0x30(%rbp), %r13 movl $0x2, %edx movq %r12, %rcx movq %r13, %r8 callq *0x148(%rax) movq %rax, (%r13) testq %rax, %rax jne 0x5563b movl $0x210, %edx # imm = 0x210 movq %r12, %rdi movl %r15d, %esi callq 0x9fca4 movl %eax, %r15d movl %r15d, 0x760(%rbx) movq 0x930(%rbx), %rdi testq %rdi, %rdi jne 0x55684 movq %r14, %rdi callq 0x291e0 movl 0x760(%rbx), %eax shrl $0x1f, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x842d8(%rip), %rsi # 0xd9901 movq %r14, %rdi movl $0x811, %edx # imm = 0x811 callq 0x2eb6f jmp 0x5558f leaq 0x32f9ce(%rip), %r13 # 0x385010 movq (%r13), %rcx leaq 0x842b4(%rip), %rsi # 0xd9901 movq %rax, %rdi movl $0x815, %edx # imm = 0x815 callq *0x1f0(%rcx) movl $0x210, %edx # imm = 0x210 movq %r12, %rdi movl %r15d, %esi callq 0x9fca4 movl %eax, %r15d movq (%r13), %rax movq -0x30(%rbp), %rdi movl %r15d, %esi callq *0x200(%rax) jmp 0x555eb leaq 0x32f985(%rip), %rax # 0x385010 movq (%rax), %rax callq *0x160(%rax) jmp 0x55602
_ma_open_keyfile: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov rbx, rdi lea r14, [rdi+8F0h] cmp qword ptr [rdi+930h], 0 jnz loc_55622 mov rdi, r14 call _pthread_mutex_lock loc_5558F: lea rax, key_file_kfile mov esi, [rax] mov r12, [rbx+5B0h] mov r15d, 0A0000h or r15d, [rbx+7A4h] lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_78] lea r13, [rbp+var_30] mov edx, 2 mov rcx, r12 mov r8, r13 call qword ptr [rax+148h] mov [r13+0], rax test rax, rax jnz short loc_5563B mov edx, 210h mov rdi, r12 mov esi, r15d call my_open mov r15d, eax loc_555EB: mov [rbx+760h], r15d mov rdi, [rbx+930h] test rdi, rdi jnz loc_55684 loc_55602: mov rdi, r14 call _pthread_mutex_unlock mov eax, [rbx+760h] shr eax, 1Fh add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_55622: lea rsi, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r14 mov edx, 811h call psi_mutex_lock jmp loc_5558F loc_5563B: lea r13, PSI_server mov rcx, [r13+0] lea rsi, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, rax mov edx, 815h call qword ptr [rcx+1F0h] mov edx, 210h mov rdi, r12 mov esi, r15d call my_open mov r15d, eax mov rax, [r13+0] mov rdi, [rbp+var_30] mov esi, r15d call qword ptr [rax+200h] jmp loc_555EB loc_55684: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_55602
long long ma_open_keyfile(long long a1) { long long v1; // r12 unsigned int v2; // r15d long long v3; // rax long long v4; // r15 _BYTE v6[72]; // [rsp+8h] [rbp-78h] BYREF long long v7[6]; // [rsp+50h] [rbp-30h] BYREF if ( *(_QWORD *)(a1 + 2352) ) psi_mutex_lock(a1 + 2288, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c", 0x811u); else pthread_mutex_lock(a1 + 2288); v1 = *(_QWORD *)(a1 + 1456); v2 = *(_DWORD *)(a1 + 1956) | 0xA0000; v3 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, long long *))PSI_server[41])( v6, key_file_kfile, 2LL, v1, v7); v7[0] = v3; if ( v3 ) { ((void ( *)(long long, const char *, long long))PSI_server[62])( v3, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c", 2069LL); v4 = (unsigned int)my_open(v1, v2, 528LL); ((void ( *)(long long, long long))PSI_server[64])(v7[0], v4); } else { LODWORD(v4) = my_open(v1, v2, 528LL); } *(_DWORD *)(a1 + 1888) = v4; if ( *(_QWORD *)(a1 + 2352) ) PSI_server[44](); pthread_mutex_unlock(a1 + 2288); return *(_DWORD *)(a1 + 1888) >> 31; }
_ma_open_keyfile: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV RBX,RDI LEA R14,[RDI + 0x8f0] CMP qword ptr [RDI + 0x930],0x0 JNZ 0x00155622 MOV RDI,R14 CALL 0x00129210 LAB_0015558f: LEA RAX,[0x4fbea8] MOV ESI,dword ptr [RAX] MOV R12,qword ptr [RBX + 0x5b0] MOV R15D,0xa0000 OR R15D,dword ptr [RBX + 0x7a4] LEA RAX,[0x485010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x78] LEA R13,[RBP + -0x30] MOV EDX,0x2 MOV RCX,R12 MOV R8,R13 CALL qword ptr [RAX + 0x148] MOV qword ptr [R13],RAX TEST RAX,RAX JNZ 0x0015563b MOV EDX,0x210 MOV RDI,R12 MOV ESI,R15D CALL 0x0019fca4 MOV R15D,EAX LAB_001555eb: MOV dword ptr [RBX + 0x760],R15D MOV RDI,qword ptr [RBX + 0x930] TEST RDI,RDI JNZ 0x00155684 LAB_00155602: MOV RDI,R14 CALL 0x001291e0 MOV EAX,dword ptr [RBX + 0x760] SHR EAX,0x1f ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00155622: LEA RSI,[0x1d9901] MOV RDI,R14 MOV EDX,0x811 CALL 0x0012eb6f JMP 0x0015558f LAB_0015563b: LEA R13,[0x485010] MOV RCX,qword ptr [R13] LEA RSI,[0x1d9901] MOV RDI,RAX MOV EDX,0x815 CALL qword ptr [RCX + 0x1f0] MOV EDX,0x210 MOV RDI,R12 MOV ESI,R15D CALL 0x0019fca4 MOV R15D,EAX MOV RAX,qword ptr [R13] MOV RDI,qword ptr [RBP + -0x30] MOV ESI,R15D CALL qword ptr [RAX + 0x200] JMP 0x001555eb LAB_00155684: LEA RAX,[0x485010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00155602
uint _ma_open_keyfile(long param_1) { pthread_mutex_t *__mutex; int8 uVar1; int4 uVar2; uint uVar3; int1 local_80 [72]; long local_38; __mutex = (pthread_mutex_t *)(param_1 + 0x8f0); if (*(long *)(param_1 + 0x930) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c",0x811) ; } uVar1 = *(int8 *)(param_1 + 0x5b0); uVar3 = *(uint *)(param_1 + 0x7a4) | 0xa0000; local_38 = (**(code **)(PSI_server + 0x148))(local_80,key_file_kfile,2,uVar1,&local_38); if (local_38 == 0) { uVar2 = my_open(uVar1,uVar3,0x210); } else { (**(code **)(PSI_server + 0x1f0)) (local_38,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c",0x815); uVar2 = my_open(uVar1,uVar3,0x210); (**(code **)(PSI_server + 0x200))(local_38,uVar2); } *(int4 *)(param_1 + 0x760) = uVar2; if (*(long *)(param_1 + 0x930) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); return *(uint *)(param_1 + 0x760) >> 0x1f; }
16,647
js_closure2
bluesky950520[P]quickjs/quickjs.c
static JSValue js_closure2(JSContext *ctx, JSValue func_obj, JSFunctionBytecode *b, JSVarRef **cur_var_refs, JSStackFrame *sf) { JSObject *p; JSVarRef **var_refs; int i; p = JS_VALUE_GET_OBJ(func_obj); p->u.func.function_bytecode = b; p->u.func.home_object = NULL; p->u.func.var_refs = NULL; if (b->closure_var_count) { var_refs = js_mallocz(ctx, sizeof(var_refs[0]) * b->closure_var_count); if (!var_refs) goto fail; p->u.func.var_refs = var_refs; for(i = 0; i < b->closure_var_count; i++) { JSClosureVar *cv = &b->closure_var[i]; JSVarRef *var_ref; if (cv->is_local) { /* reuse the existing variable reference if it already exists */ var_ref = get_var_ref(ctx, sf, cv->var_idx, cv->is_arg); if (!var_ref) goto fail; } else { var_ref = cur_var_refs[cv->var_idx]; var_ref->header.ref_count++; } var_refs[i] = var_ref; } } return func_obj; fail: /* bfunc is freed when func_obj is freed */ JS_FreeValue(ctx, func_obj); return JS_EXCEPTION; }
O2
c
js_closure2: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, %rax movq %rcx, 0x30(%rsi) xorps %xmm0, %xmm0 movups %xmm0, 0x38(%rsi) movslq 0x5c(%rcx), %rsi testq %rsi, %rsi je 0x393e3 movq %r9, %r15 movq %r8, %r12 movq %rcx, %r13 movq %rdi, %rbp movq %rax, 0x8(%rsp) movq %rdx, 0x10(%rsp) shlq $0x3, %rsi callq 0x17241 testq %rax, %rax je 0x393c0 movq %rax, %rbx movq 0x8(%rsp), %rax addq $0x38, %rax movq %rbx, (%rax) xorl %r14d, %r14d movslq 0x5c(%r13), %rax cmpq %rax, %r14 jge 0x393d9 movq 0x38(%r13), %rax movzbl (%rax,%r14,8), %ecx movzwl 0x2(%rax,%r14,8), %edx testb $0x1, %cl jne 0x393a2 movl %edx, %eax movq (%r12,%rax,8), %rax incl (%rax) jmp 0x393b7 shrl %ecx andl $0x1, %ecx movq %rbp, %rdi movq %r15, %rsi callq 0x37c06 testq %rax, %rax je 0x393c0 movq %rax, (%rbx,%r14,8) incq %r14 jmp 0x3937b movq %rbp, %rdi movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx callq 0x1801e pushq $0x6 popq %rdx xorl %eax, %eax jmp 0x393e3 movq 0x10(%rsp), %rdx movq 0x8(%rsp), %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_closure2: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rax, rsi mov [rsi+30h], rcx xorps xmm0, xmm0 movups xmmword ptr [rsi+38h], xmm0 movsxd rsi, dword ptr [rcx+5Ch] test rsi, rsi jz loc_393E3 mov r15, r9 mov r12, r8 mov r13, rcx mov rbp, rdi mov [rsp+48h+var_40], rax mov [rsp+48h+var_38], rdx shl rsi, 3 call js_mallocz test rax, rax jz short loc_393C0 mov rbx, rax mov rax, [rsp+48h+var_40] add rax, 38h ; '8' mov [rax], rbx xor r14d, r14d loc_3937B: movsxd rax, dword ptr [r13+5Ch] cmp r14, rax jge short loc_393D9 mov rax, [r13+38h] movzx ecx, byte ptr [rax+r14*8] movzx edx, word ptr [rax+r14*8+2] test cl, 1 jnz short loc_393A2 mov eax, edx mov rax, [r12+rax*8] inc dword ptr [rax] jmp short loc_393B7 loc_393A2: shr ecx, 1 and ecx, 1 mov rdi, rbp mov rsi, r15 call get_var_ref test rax, rax jz short loc_393C0 loc_393B7: mov [rbx+r14*8], rax inc r14 jmp short loc_3937B loc_393C0: mov rdi, rbp mov rsi, [rsp+48h+var_40] mov rdx, [rsp+48h+var_38] call JS_FreeValue push 6 pop rdx xor eax, eax jmp short loc_393E3 loc_393D9: mov rdx, [rsp+48h+var_38] mov rax, [rsp+48h+var_40] loc_393E3: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long js_closure2(long long a1, long long a2, long long a3, long long a4, long long a5, long long a6) { long long result; // rax long long v10; // rax long long v11; // rbx long long i; // r14 long long v13; // rax unsigned int v14; // ecx _DWORD *var_ref; // rax result = a2; *(_QWORD *)(a2 + 48) = a4; *(_OWORD *)(a2 + 56) = 0LL; if ( *(_DWORD *)(a4 + 92) ) { v10 = js_mallocz(a1, 8LL * *(int *)(a4 + 92)); if ( v10 ) { v11 = v10; *(_QWORD *)(a2 + 56) = v10; for ( i = 0LL; i < *(int *)(a4 + 92); ++i ) { v13 = *(_QWORD *)(a4 + 56); v14 = *(unsigned __int8 *)(v13 + 8 * i); if ( (v14 & 1) != 0 ) { var_ref = (_DWORD *)get_var_ref(a1, a6, *(unsigned __int16 *)(v13 + 8 * i + 2), (v14 >> 1) & 1); if ( !var_ref ) goto LABEL_9; } else { var_ref = *(_DWORD **)(a5 + 8LL * *(unsigned __int16 *)(v13 + 8 * i + 2)); ++*var_ref; } *(_QWORD *)(v11 + 8 * i) = var_ref; } return a2; } else { LABEL_9: JS_FreeValue(a1, a2, a3); return 0LL; } } return result; }
js_closure2: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RAX,RSI MOV qword ptr [RSI + 0x30],RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSI + 0x38],XMM0 MOVSXD RSI,dword ptr [RCX + 0x5c] TEST RSI,RSI JZ 0x001393e3 MOV R15,R9 MOV R12,R8 MOV R13,RCX MOV RBP,RDI MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],RDX SHL RSI,0x3 CALL 0x00117241 TEST RAX,RAX JZ 0x001393c0 MOV RBX,RAX MOV RAX,qword ptr [RSP + 0x8] ADD RAX,0x38 MOV qword ptr [RAX],RBX XOR R14D,R14D LAB_0013937b: MOVSXD RAX,dword ptr [R13 + 0x5c] CMP R14,RAX JGE 0x001393d9 MOV RAX,qword ptr [R13 + 0x38] MOVZX ECX,byte ptr [RAX + R14*0x8] MOVZX EDX,word ptr [RAX + R14*0x8 + 0x2] TEST CL,0x1 JNZ 0x001393a2 MOV EAX,EDX MOV RAX,qword ptr [R12 + RAX*0x8] INC dword ptr [RAX] JMP 0x001393b7 LAB_001393a2: SHR ECX,0x1 AND ECX,0x1 MOV RDI,RBP MOV RSI,R15 CALL 0x00137c06 TEST RAX,RAX JZ 0x001393c0 LAB_001393b7: MOV qword ptr [RBX + R14*0x8],RAX INC R14 JMP 0x0013937b LAB_001393c0: MOV RDI,RBP MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] CALL 0x0011801e PUSH 0x6 POP RDX XOR EAX,EAX JMP 0x001393e3 LAB_001393d9: MOV RDX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP + 0x8] LAB_001393e3: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_closure2(int8 param_1,long param_2,int8 param_3,long param_4,long param_5, int8 param_6) { byte bVar1; long lVar2; int *piVar3; ulong uVar4; long lVar5; int1 auVar6 [16]; *(long *)(param_2 + 0x30) = param_4; *(int8 *)(param_2 + 0x38) = 0; *(int8 *)(param_2 + 0x40) = 0; if ((long)*(int *)(param_4 + 0x5c) != 0) { lVar2 = js_mallocz(param_1,(long)*(int *)(param_4 + 0x5c) << 3); if (lVar2 == 0) { LAB_001393c0: JS_FreeValue(param_1,param_2,param_3); param_3 = 6; param_2 = 0; } else { *(long *)(param_2 + 0x38) = lVar2; for (lVar5 = 0; lVar5 < *(int *)(param_4 + 0x5c); lVar5 = lVar5 + 1) { bVar1 = *(byte *)(*(long *)(param_4 + 0x38) + lVar5 * 8); uVar4 = (ulong)*(ushort *)(*(long *)(param_4 + 0x38) + 2 + lVar5 * 8); if ((bVar1 & 1) == 0) { piVar3 = *(int **)(param_5 + uVar4 * 8); *piVar3 = *piVar3 + 1; } else { piVar3 = (int *)get_var_ref(param_1,param_6,uVar4,bVar1 >> 1 & 1); if (piVar3 == (int *)0x0) goto LAB_001393c0; } *(int **)(lVar2 + lVar5 * 8) = piVar3; } } } auVar6._8_8_ = param_3; auVar6._0_8_ = param_2; return auVar6; }
16,648
my_strntoull_8bit
eloqsql/strings/ctype-simple.c
ulonglong my_strntoull_8bit(CHARSET_INFO *cs, const char *nptr, size_t l, int base, char **endptr, int *err) { int negative; register ulonglong cutoff; register uint cutlim; register ulonglong i; register const char *s, *e; const char *save; int overflow; *err= 0; /* Initialize error indicator */ s = nptr; e = nptr+l; for(; s<e && my_isspace(cs,*s); s++); if (s == e) { goto noconv; } if (*s == '-') { negative = 1; ++s; } else if (*s == '+') { negative = 0; ++s; } else negative = 0; save = s; cutoff = (~(ulonglong) 0) / (unsigned long int) base; cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) base); overflow = 0; i = 0; for ( ; s != e; s++) { register uchar c= *s; if (c>='0' && c<='9') c -= '0'; else if (c>='A' && c<='Z') c = c - 'A' + 10; else if (c>='a' && c<='z') c = c - 'a' + 10; else break; if (c >= base) break; if (i > cutoff || (i == cutoff && c > cutlim)) overflow = 1; else { i *= (ulonglong) base; i += c; } } if (s == save) goto noconv; if (endptr != NULL) *endptr = (char *) s; if (overflow) { err[0]= ERANGE; return (~(ulonglong) 0); } return (negative ? -((longlong) i) : (longlong) i); noconv: err[0]= EDOM; if (endptr != NULL) *endptr = (char *) nptr; return 0L; }
O3
c
my_strntoull_8bit: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movl $0x0, (%r9) leaq (%rsi,%rdx), %r11 movq %rsi, %r10 testq %rdx, %rdx jle 0x37889 movq 0x40(%rdi), %rax movq %rsi, %r10 movzbl (%r10), %edx testb $0x8, 0x1(%rax,%rdx) je 0x37889 incq %r10 cmpq %r11, %r10 jb 0x37876 cmpq %r11, %r10 je 0x37971 movb (%r10), %dil leal -0x2b(%rdi), %eax andb $-0x3, %al cmpb $0x1, %al adcq $0x0, %r10 movslq %ecx, %rbx movq $-0x1, %rax xorl %edx, %edx movq %rbx, -0x38(%rbp) divq %rbx xorl %r12d, %r12d cmpq %r11, %r10 je 0x3794e movq %rdi, -0x30(%rbp) movq %r10, %r14 xorl %r15d, %r15d movq %r15, %rdi movl %r12d, %r13d movb (%r14), %r12b leal -0x30(%r12), %ebx cmpb $0xa, %bl jb 0x378fd leal -0x41(%r12), %ebx cmpb $0x19, %bl ja 0x378ec addb $-0x37, %r12b jmp 0x378fa leal -0x61(%r12), %ebx cmpb $0x19, %bl ja 0x3793c addb $-0x57, %r12b movl %r12d, %ebx movzbl %bl, %ebx cmpl %ecx, %ebx jge 0x3793c movl $0x1, %r12d cmpq %rax, %rdi jbe 0x37914 movq %rdi, %r15 jmp 0x3792b jne 0x3791d movq %rax, %r15 cmpl %edx, %ebx ja 0x3792b imulq -0x38(%rbp), %rdi movl %ebx, %r15d addq %rdi, %r15 movl %r13d, %r12d incq %r14 cmpq %r11, %r14 jne 0x378c9 movq %r15, %rdi movq %r11, %r14 movl %r12d, %r13d testl %r13d, %r13d sete %al movq %rdi, %r12 movq %r14, %r11 movq -0x30(%rbp), %rdi jmp 0x37950 movb $0x1, %al cmpq %r10, %r11 je 0x37971 testq %r8, %r8 je 0x3795d movq %r11, (%r8) testb %al, %al je 0x37984 movq %r12, %rax negq %rax cmpb $0x2d, %dil cmovneq %r12, %rax jmp 0x37992 movl $0x21, (%r9) testq %r8, %r8 je 0x37980 movq %rsi, (%r8) xorl %eax, %eax jmp 0x37992 movl $0x22, (%r9) movq $-0x1, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_strntoull_8bit: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx mov dword ptr [r9], 0 lea r11, [rsi+rdx] mov r10, rsi test rdx, rdx jle short loc_37889 mov rax, [rdi+40h] mov r10, rsi loc_37876: movzx edx, byte ptr [r10] test byte ptr [rax+rdx+1], 8 jz short loc_37889 inc r10 cmp r10, r11 jb short loc_37876 loc_37889: cmp r10, r11 jz loc_37971 mov dil, [r10] lea eax, [rdi-2Bh] and al, 0FDh cmp al, 1 adc r10, 0 movsxd rbx, ecx mov rax, 0FFFFFFFFFFFFFFFFh xor edx, edx mov [rbp+var_38], rbx div rbx xor r12d, r12d cmp r10, r11 jz loc_3794E mov [rbp+var_30], rdi mov r14, r10 xor r15d, r15d loc_378C9: mov rdi, r15 mov r13d, r12d mov r12b, [r14] lea ebx, [r12-30h] cmp bl, 0Ah jb short loc_378FD lea ebx, [r12-41h] cmp bl, 19h ja short loc_378EC add r12b, 0C9h jmp short loc_378FA loc_378EC: lea ebx, [r12-61h] cmp bl, 19h ja short loc_3793C add r12b, 0A9h loc_378FA: mov ebx, r12d loc_378FD: movzx ebx, bl cmp ebx, ecx jge short loc_3793C mov r12d, 1 cmp rdi, rax jbe short loc_37914 mov r15, rdi jmp short loc_3792B loc_37914: jnz short loc_3791D mov r15, rax cmp ebx, edx ja short loc_3792B loc_3791D: imul rdi, [rbp+var_38] mov r15d, ebx add r15, rdi mov r12d, r13d loc_3792B: inc r14 cmp r14, r11 jnz short loc_378C9 mov rdi, r15 mov r14, r11 mov r13d, r12d loc_3793C: test r13d, r13d setz al mov r12, rdi mov r11, r14 mov rdi, [rbp+var_30] jmp short loc_37950 loc_3794E: mov al, 1 loc_37950: cmp r11, r10 jz short loc_37971 test r8, r8 jz short loc_3795D mov [r8], r11 loc_3795D: test al, al jz short loc_37984 mov rax, r12 neg rax cmp dil, 2Dh ; '-' cmovnz rax, r12 jmp short loc_37992 loc_37971: mov dword ptr [r9], 21h ; '!' test r8, r8 jz short loc_37980 mov [r8], rsi loc_37980: xor eax, eax jmp short loc_37992 loc_37984: mov dword ptr [r9], 22h ; '"' mov rax, 0FFFFFFFFFFFFFFFFh loc_37992: pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_strntoull_8bit( long long a1, unsigned __int8 *a2, long long a3, int a4, unsigned __int8 **a5, _DWORD *a6) { unsigned __int8 *v6; // r11 unsigned __int8 *v7; // r10 unsigned __int8 v8; // di unsigned __int8 *v9; // r10 unsigned long long v10; // rax unsigned long long v11; // r12 unsigned __int8 *v12; // r14 unsigned long long v13; // r15 unsigned long long v14; // rdi int v15; // r13d unsigned __int8 v16; // r12 unsigned __int8 v17; // bl unsigned __int8 v18; // r12 bool v19; // al long long result; // rax unsigned __int8 v21; // [rsp+8h] [rbp-30h] *a6 = 0; v6 = &a2[a3]; v7 = a2; if ( a3 > 0 ) { v7 = a2; do { if ( (*(_BYTE *)(*(_QWORD *)(a1 + 64) + *v7 + 1LL) & 8) == 0 ) break; ++v7; } while ( v7 < v6 ); } if ( v7 == v6 ) goto LABEL_30; v8 = *v7; v9 = &v7[((*v7 - 43) & 0xFD) == 0]; v10 = 0xFFFFFFFFFFFFFFFFLL / a4; v11 = 0LL; if ( v9 == v6 ) { v19 = 1; } else { v21 = v8; v12 = v9; v13 = 0LL; while ( 1 ) { v14 = v13; v15 = v11; v16 = *v12; v17 = *v12 - 48; if ( v17 >= 0xAu ) { if ( (unsigned __int8)(v16 - 65) > 0x19u ) { if ( (unsigned __int8)(v16 - 97) > 0x19u ) break; v18 = v16 - 87; } else { v18 = v16 - 55; } v17 = v18; } if ( v17 >= a4 ) break; LODWORD(v11) = 1; if ( v13 <= v10 ) { if ( v13 != v10 || (v13 = 0xFFFFFFFFFFFFFFFFLL / a4, v17 <= (unsigned int)(0xFFFFFFFFFFFFFFFFLL % a4)) ) { v13 = a4 * v14 + v17; LODWORD(v11) = v15; } } if ( ++v12 == v6 ) { v14 = v13; v12 = &a2[a3]; v15 = v11; break; } } v19 = v15 == 0; v11 = v14; v6 = v12; v8 = v21; } if ( v6 == v9 ) { LABEL_30: *a6 = 33; if ( a5 ) *a5 = a2; return 0LL; } else { if ( a5 ) *a5 = v6; if ( v19 ) { result = -(long long)v11; if ( v8 != 45 ) return v11; } else { *a6 = 34; return -1LL; } } return result; }
my_strntoull_8bit: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV dword ptr [R9],0x0 LEA R11,[RSI + RDX*0x1] MOV R10,RSI TEST RDX,RDX JLE 0x00137889 MOV RAX,qword ptr [RDI + 0x40] MOV R10,RSI LAB_00137876: MOVZX EDX,byte ptr [R10] TEST byte ptr [RAX + RDX*0x1 + 0x1],0x8 JZ 0x00137889 INC R10 CMP R10,R11 JC 0x00137876 LAB_00137889: CMP R10,R11 JZ 0x00137971 MOV DIL,byte ptr [R10] LEA EAX,[RDI + -0x2b] AND AL,0xfd CMP AL,0x1 ADC R10,0x0 MOVSXD RBX,ECX MOV RAX,-0x1 XOR EDX,EDX MOV qword ptr [RBP + -0x38],RBX DIV RBX XOR R12D,R12D CMP R10,R11 JZ 0x0013794e MOV qword ptr [RBP + -0x30],RDI MOV R14,R10 XOR R15D,R15D LAB_001378c9: MOV RDI,R15 MOV R13D,R12D MOV R12B,byte ptr [R14] LEA EBX,[R12 + -0x30] CMP BL,0xa JC 0x001378fd LEA EBX,[R12 + -0x41] CMP BL,0x19 JA 0x001378ec ADD R12B,0xc9 JMP 0x001378fa LAB_001378ec: LEA EBX,[R12 + -0x61] CMP BL,0x19 JA 0x0013793c ADD R12B,0xa9 LAB_001378fa: MOV EBX,R12D LAB_001378fd: MOVZX EBX,BL CMP EBX,ECX JGE 0x0013793c MOV R12D,0x1 CMP RDI,RAX JBE 0x00137914 MOV R15,RDI JMP 0x0013792b LAB_00137914: JNZ 0x0013791d MOV R15,RAX CMP EBX,EDX JA 0x0013792b LAB_0013791d: IMUL RDI,qword ptr [RBP + -0x38] MOV R15D,EBX ADD R15,RDI MOV R12D,R13D LAB_0013792b: INC R14 CMP R14,R11 JNZ 0x001378c9 MOV RDI,R15 MOV R14,R11 MOV R13D,R12D LAB_0013793c: TEST R13D,R13D SETZ AL MOV R12,RDI MOV R11,R14 MOV RDI,qword ptr [RBP + -0x30] JMP 0x00137950 LAB_0013794e: MOV AL,0x1 LAB_00137950: CMP R11,R10 JZ 0x00137971 TEST R8,R8 JZ 0x0013795d MOV qword ptr [R8],R11 LAB_0013795d: TEST AL,AL JZ 0x00137984 MOV RAX,R12 NEG RAX CMP DIL,0x2d CMOVNZ RAX,R12 JMP 0x00137992 LAB_00137971: MOV dword ptr [R9],0x21 TEST R8,R8 JZ 0x00137980 MOV qword ptr [R8],RSI LAB_00137980: XOR EAX,EAX JMP 0x00137992 LAB_00137984: MOV dword ptr [R9],0x22 MOV RAX,-0x1 LAB_00137992: POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong my_strntoull_8bit(long param_1,byte *param_2,long param_3,int param_4,ulong *param_5, int4 *param_6) { byte bVar1; byte bVar2; int1 auVar3 [16]; int1 auVar4 [16]; ulong uVar5; ulong uVar6; ulong uVar7; byte *pbVar8; byte *pbVar9; byte bVar10; ulong uVar11; ulong uVar12; int iVar13; byte *pbVar14; bool bVar15; *param_6 = 0; pbVar9 = param_2 + param_3; pbVar8 = param_2; if (0 < param_3) { do { if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*pbVar8) & 8) == 0) break; pbVar8 = pbVar8 + 1; } while (pbVar8 < pbVar9); } if (pbVar8 != pbVar9) { bVar1 = *pbVar8; pbVar8 = pbVar8 + ((bVar1 - 0x2b & 0xfd) == 0); auVar3._8_8_ = 0; auVar3._0_8_ = (long)param_4; auVar4 = ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff); uVar6 = SUB168(auVar4 / auVar3,0); uVar7 = 0; if (pbVar8 == pbVar9) { bVar15 = true; } else { uVar11 = uVar7; pbVar14 = pbVar8; uVar7 = 0; do { iVar13 = (int)uVar11; bVar2 = *pbVar14; bVar10 = bVar2 - 0x30; if (9 < bVar10) { if ((byte)(bVar2 + 0xbf) < 0x1a) { bVar10 = bVar2 - 0x37; } else { if (0x19 < (byte)(bVar2 + 0x9f)) goto LAB_0013793c; bVar10 = bVar2 + 0xa9; } } if (param_4 <= (int)(uint)bVar10) goto LAB_0013793c; uVar12 = 1; uVar5 = uVar7; if ((uVar7 <= uVar6) && ((uVar7 != uVar6 || (uVar5 = uVar6, (uint)bVar10 <= SUB164(auVar4 % auVar3,0))))) { uVar12 = uVar11; uVar5 = (ulong)bVar10 + uVar7 * (long)param_4; } uVar7 = uVar5; pbVar14 = pbVar14 + 1; uVar11 = uVar12; } while (pbVar14 != pbVar9); iVar13 = (int)uVar12; pbVar14 = pbVar9; LAB_0013793c: pbVar9 = pbVar14; bVar15 = iVar13 == 0; } if (pbVar9 != pbVar8) { if (param_5 != (ulong *)0x0) { *param_5 = (ulong)pbVar9; } if (bVar15) { if (bVar1 == 0x2d) { return -uVar7; } return uVar7; } *param_6 = 0x22; return 0xffffffffffffffff; } } *param_6 = 0x21; if (param_5 != (ulong *)0x0) { *param_5 = (ulong)param_2; } return 0; }
16,649
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>, minja::Value, std::less<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<std::pair<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, minja::Value>>>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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, minja::Value>, std::allocator<std::pair<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, minja::Value>>>>, __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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, minja::Value>, std::allocator<std::pair<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, minja::Value>>>>)
llama.cpp/common/json.hpp
iterator erase(iterator first, iterator last) { if (first == last) { return first; } const auto elements_affected = std::distance(first, last); const auto offset = std::distance(Container::begin(), first); // This is the start situation. We need to delete elements_affected // elements (3 in this example: e, f, g), and need to return an // iterator past the last deleted element (h in this example). // Note that offset is the distance from the start of the vector // to first. We will need this later. // [ a, b, c, d, e, f, g, h, i, j ] // ^ ^ // first last // Since we cannot move const Keys, we re-construct them in place. // We start at first and re-construct (viz. copy) the elements from // the back of the vector. Example for first iteration: // ,--------. // v | destroy e and re-construct with h // [ a, b, c, d, e, f, g, h, i, j ] // ^ ^ // it it + elements_affected for (auto it = first; std::next(it, elements_affected) != Container::end(); ++it) { it->~value_type(); // destroy but keep allocation new (&*it) value_type{std::move(*std::next(it, elements_affected))}; // "move" next element to it } // [ a, b, c, d, h, i, j, h, i, j ] // ^ ^ // first last // remove the unneeded elements at the end of the vector Container::resize(this->size() - static_cast<size_type>(elements_affected)); // [ a, b, c, d, h, i, j ] // ^ ^ // first last // first is now pointing past the last deleted element, but we cannot // use this iterator, because it may have been invalidated by the // resize call. Instead, we can return begin() + offset. return Container::begin() + offset; }
O3
cpp
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>, minja::Value, std::less<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<std::pair<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, minja::Value>>>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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, minja::Value>, std::allocator<std::pair<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, minja::Value>>>>, __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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, minja::Value>, std::allocator<std::pair<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, minja::Value>>>>): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, %r14 cmpq %rdx, %rsi je 0xeb2d1 movq %rdx, %r15 movq %rdi, %rbx movq %rdx, %rax subq %r14, %rax sarq $0x5, %rax movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB imulq %rcx, %rax movq %rax, 0x10(%rsp) movq (%rdi), %rax movq %rax, 0x8(%rsp) xorl %ebp, %ebp leaq (%r15,%rbp), %r12 cmpq 0x8(%rbx), %r12 je 0xeb290 leaq (%r14,%rbp), %r13 addq $0x50, %r13 movq %r13, %rdi xorl %esi, %esi callq 0x8538a movq %r13, %rdi callq 0x89aa4 leaq (%r14,%rbp), %rdi addq $0x48, %rdi callq 0x70a60 leaq (%r14,%rbp), %rdi addq $0x38, %rdi callq 0x70a60 leaq (%r14,%rbp), %r13 addq $0x28, %r13 movq %r13, %rdi callq 0x70a60 movq -0x10(%r13), %rdi testq %rdi, %rdi je 0xeb266 movq 0x77d57(%rip), %rax # 0x162f98 cmpb $0x0, (%rax) je 0xeb251 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0xeb25b movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0xeb266 movq (%rdi), %rax callq *0x18(%rax) leaq (%r14,%rbp), %r13 movq %r13, %rdi xorl %esi, %esi callq 0x8538a movq %r13, %rdi callq 0x89aa4 movq %r13, %rdi movq %r12, %rsi callq 0xeb2e4 addq $0x60, %rbp jmp 0xeb1df movq %r14, %r15 subq 0x8(%rsp), %r15 movq 0x10(%rsp), %rax leaq (%rax,%rax,2), %rsi shlq $0x5, %rsi addq %r14, %rsi subq (%rbx), %rsi addq %rbp, %rsi sarq $0x5, %rsi movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB imulq %rcx, %rsi subq %rax, %rsi movq %rbx, %rdi callq 0xeb370 addq (%rbx), %r15 movq %r15, %r14 movq %r14, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEESR_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r14, rsi cmp rsi, rdx jz loc_EB2D1 mov r15, rdx mov rbx, rdi mov rax, rdx sub rax, r14 sar rax, 5 mov rcx, 0AAAAAAAAAAAAAAABh imul rax, rcx mov [rsp+48h+var_38], rax mov rax, [rdi] mov [rsp+48h+var_40], rax xor ebp, ebp loc_EB1DF: lea r12, [r15+rbp] cmp r12, [rbx+8] jz loc_EB290 lea r13, [r14+rbp] add r13, 50h ; 'P' mov rdi, r13 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r13 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() lea rdi, [r14+rbp] add rdi, 48h ; 'H' call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [r14+rbp] add rdi, 38h ; '8' call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea r13, [r14+rbp] add r13, 28h ; '(' mov rdi, r13 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, [r13-10h] test rdi, rdi jz short loc_EB266 mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag cmp byte ptr [rax], 0 jz short loc_EB251 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_EB25B loc_EB251: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_EB25B: cmp eax, 1 jnz short loc_EB266 mov rax, [rdi] call qword ptr [rax+18h] loc_EB266: lea r13, [r14+rbp] mov rdi, r13 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r13 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, r13 mov rsi, r12 call _ZNSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueEEC2EOSI_; std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>::pair(std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>&&) add rbp, 60h ; '`' jmp loc_EB1DF loc_EB290: mov r15, r14 sub r15, [rsp+48h+var_40] mov rax, [rsp+48h+var_38] lea rsi, [rax+rax*2] shl rsi, 5 add rsi, r14 sub rsi, [rbx] add rsi, rbp sar rsi, 5 mov rcx, 0AAAAAAAAAAAAAAABh imul rsi, rcx sub rsi, rax mov rdi, rbx call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE6resizeEm; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::resize(ulong) add r15, [rbx] mov r14, r15 loc_EB2D1: mov rax, r14 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::erase( long long *a1, long long a2, long long a3) { long long v3; // r14 long long i; // rbp volatile signed __int32 *v7; // rdi signed __int32 v8; // eax long long v10; // [rsp+8h] [rbp-40h] unsigned long long v11; // [rsp+10h] [rbp-38h] v3 = a2; if ( a2 != a3 ) { v11 = 0xAAAAAAAAAAAAAAABLL * ((a3 - a2) >> 5); v10 = *a1; for ( i = 0LL; a3 + i != a1[1]; i += 96LL ) { 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 *)(a2 + i + 80)); 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(a2 + i + 80); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)(a2 + i + 72)); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)(a2 + i + 56)); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)(a2 + i + 40)); v7 = *(volatile signed __int32 **)(a2 + i + 24); if ( v7 ) { if ( _libc_single_threaded ) { v8 = *((_DWORD *)v7 + 3); *((_DWORD *)v7 + 3) = v8 - 1; } else { v8 = _InterlockedExchangeAdd(v7 + 3, 0xFFFFFFFF); } if ( v8 == 1 ) (*(void ( **)(volatile signed __int32 *, _QWORD))(*(_QWORD *)v7 + 24LL))(v7, 0LL); } nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a2 + i)); 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(a2 + i); std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>::pair( a2 + i, a3 + i); } std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::resize( a1, 0xAAAAAAAAAAAAAAABLL * ((long long)(i + a2 + 96 * v11 - *a1) >> 5) - v11); return *a1 + a2 - v10; } return v3; }
erase: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R14,RSI CMP RSI,RDX JZ 0x001eb2d1 MOV R15,RDX MOV RBX,RDI MOV RAX,RDX SUB RAX,R14 SAR RAX,0x5 MOV RCX,-0x5555555555555555 IMUL RAX,RCX MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RDI] MOV qword ptr [RSP + 0x8],RAX XOR EBP,EBP LAB_001eb1df: LEA R12,[R15 + RBP*0x1] CMP R12,qword ptr [RBX + 0x8] JZ 0x001eb290 LEA R13,[R14 + RBP*0x1] ADD R13,0x50 MOV RDI,R13 XOR ESI,ESI CALL 0x0018538a MOV RDI,R13 CALL 0x00189aa4 LEA RDI,[R14 + RBP*0x1] ADD RDI,0x48 CALL 0x00170a60 LEA RDI,[R14 + RBP*0x1] ADD RDI,0x38 CALL 0x00170a60 LEA R13,[R14 + RBP*0x1] ADD R13,0x28 MOV RDI,R13 CALL 0x00170a60 MOV RDI,qword ptr [R13 + -0x10] TEST RDI,RDI JZ 0x001eb266 MOV RAX,qword ptr [0x00262f98] CMP byte ptr [RAX],0x0 JZ 0x001eb251 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x001eb25b LAB_001eb251: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_001eb25b: CMP EAX,0x1 JNZ 0x001eb266 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_001eb266: LEA R13,[R14 + RBP*0x1] MOV RDI,R13 XOR ESI,ESI CALL 0x0018538a MOV RDI,R13 CALL 0x00189aa4 MOV RDI,R13 MOV RSI,R12 CALL 0x001eb2e4 ADD RBP,0x60 JMP 0x001eb1df LAB_001eb290: MOV R15,R14 SUB R15,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RSP + 0x10] LEA RSI,[RAX + RAX*0x2] SHL RSI,0x5 ADD RSI,R14 SUB RSI,qword ptr [RBX] ADD RSI,RBP SAR RSI,0x5 MOV RCX,-0x5555555555555555 IMUL RSI,RCX SUB RSI,RAX MOV RDI,RBX CALL 0x001eb370 ADD R15,qword ptr [RBX] MOV R14,R15 LAB_001eb2d1: MOV RAX,R14 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value> > >::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value> > > >, __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value> > > >) */ long __thiscall nlohmann::json_abi_v3_11_3:: ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::erase(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> *this,long param_2,long param_3) { int *piVar1; long lVar2; long *plVar3; int iVar4; long lVar5; long lVar6; data *pdVar7; if (param_2 != param_3) { lVar5 = param_3 - param_2 >> 5; lVar2 = *(long *)this; for (lVar6 = 0; (pair *)(param_3 + lVar6) != *(pair **)(this + 8); lVar6 = lVar6 + 0x60) { pdVar7 = (data *)(param_2 + lVar6 + 0x50); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(pdVar7,0)); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(pdVar7); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(param_2 + lVar6 + 0x48)); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(param_2 + lVar6 + 0x38)); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(param_2 + lVar6 + 0x28)); plVar3 = *(long **)(param_2 + lVar6 + 0x18); if (plVar3 != (long *)0x0) { if (*PTR___libc_single_threaded_00262f98 == '\0') { LOCK(); piVar1 = (int *)((long)plVar3 + 0xc); iVar4 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar4 = *(int *)((long)plVar3 + 0xc); *(int *)((long)plVar3 + 0xc) = iVar4 + -1; } if (iVar4 == 1) { (**(code **)(*plVar3 + 0x18))(); } } pdVar7 = (data *)(param_2 + lVar6); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(pdVar7,0)); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(pdVar7); std:: pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> ::pair((pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> *)pdVar7,(pair *)(param_3 + lVar6)); } std:: vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::resize((vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> *)this,(((lVar5 * 0x20 + param_2) - *(long *)this) + lVar6 >> 5) * -0x5555555555555555 + lVar5 * 0x5555555555555555); param_2 = (param_2 - lVar2) + *(long *)this; } return param_2; }
16,650
minja::SetNode::SetNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Expression>&&)
monkey531[P]llama/common/minja.hpp
SetNode(const Location & location, const std::string & ns, const std::vector<std::string> & vns, std::shared_ptr<Expression> && v) : TemplateNode(location), ns(ns), var_names(vns), value(std::move(v)) {}
O3
cpp
minja::SetNode::SetNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Expression>&&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %r14 movq %rcx, %r15 movq %rdi, %rbx leaq 0x7b141(%rip), %r13 # 0xdffe8 addq $0x10, %r13 movq %r13, (%rdi) movq (%rsi), %rax movq %rax, 0x8(%rdi) movq 0x8(%rsi), %rax movq %rax, 0x10(%rdi) testq %rax, %rax je 0x64ed7 movq 0x7c0cf(%rip), %rcx # 0xe0f98 cmpb $0x0, (%rcx) je 0x64ed3 incl 0x8(%rax) jmp 0x64ed7 lock incl 0x8(%rax) movq 0x10(%rsi), %rax movq %rax, 0x18(%rbx) leaq 0x7b472(%rip), %rax # 0xe0358 addq $0x10, %rax movq %rax, (%rbx) leaq 0x20(%rbx), %r12 leaq 0x30(%rbx), %rbp movq %rbp, 0x20(%rbx) movq (%rdx), %rsi movq 0x8(%rdx), %rdx addq %rsi, %rdx movq %r12, %rdi callq 0x1f55e leaq 0x40(%rbx), %rdi movq %r15, %rsi callq 0x39c8e xorl %eax, %eax movq %rax, 0x60(%rbx) movups (%r14), %xmm0 movq %rax, 0x8(%r14) movups %xmm0, 0x58(%rbx) movq %rax, (%r14) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movq (%r12), %rdi cmpq %rbp, %rdi je 0x64f58 movq (%rbp), %rsi incq %rsi callq 0x186e0 jmp 0x64f58 movq %rax, %r14 movq %r13, (%rbx) movq 0x10(%rbx), %rdi testq %rdi, %rdi je 0x64f69 callq 0x32e06 movq %r14, %rdi callq 0x18c10 nop
_ZN5minja7SetNodeC2ERKNS_8LocationERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS9_SaIS9_EEOSt10shared_ptrINS_10ExpressionEE: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, r8 mov r15, rcx mov rbx, rdi lea r13, _ZTVN5minja12TemplateNodeE; `vtable for'minja::TemplateNode add r13, 10h mov [rdi], r13 mov rax, [rsi] mov [rdi+8], rax mov rax, [rsi+8] mov [rdi+10h], rax test rax, rax jz short loc_64ED7 mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_64ED3 inc dword ptr [rax+8] jmp short loc_64ED7 loc_64ED3: lock inc dword ptr [rax+8] loc_64ED7: mov rax, [rsi+10h] mov [rbx+18h], rax lea rax, _ZTVN5minja7SetNodeE; `vtable for'minja::SetNode add rax, 10h mov [rbx], rax lea r12, [rbx+20h] lea rbp, [rbx+30h] mov [rbx+20h], rbp mov rsi, [rdx] mov rdx, [rdx+8] add rdx, rsi mov rdi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rdi, [rbx+40h] mov rsi, r15 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&) xor eax, eax mov [rbx+60h], rax movups xmm0, xmmword ptr [r14] mov [r14+8], rax movups xmmword ptr [rbx+58h], xmm0 mov [r14], rax add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax mov rdi, [r12]; void * cmp rdi, rbp jz short loc_64F58 mov rsi, [rbp+0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_64F58 mov r14, rax loc_64F58: mov [rbx], r13 mov rdi, [rbx+10h] test rdi, rdi jz short loc_64F69 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_64F69: mov rdi, r14 call __Unwind_Resume
long long minja::SetNode::SetNode(long long a1, _QWORD *a2, long long a3, _QWORD *a4, __int128 *a5) { long long v7; // rax long long result; // rax __int128 v9; // xmm0 *(_QWORD *)a1 = &`vtable for'minja::TemplateNode + 2; *(_QWORD *)(a1 + 8) = *a2; v7 = a2[1]; *(_QWORD *)(a1 + 16) = v7; if ( v7 ) { if ( _libc_single_threaded ) ++*(_DWORD *)(v7 + 8); else _InterlockedIncrement((volatile signed __int32 *)(v7 + 8)); } *(_QWORD *)(a1 + 24) = a2[2]; *(_QWORD *)a1 = &`vtable for'minja::SetNode + 2; *(_QWORD *)(a1 + 32) = a1 + 48; std::string::_M_construct<char *>(a1 + 32, *(_BYTE **)a3, *(_QWORD *)a3 + *(_QWORD *)(a3 + 8)); std::vector<std::string>::vector(a1 + 64, a4); result = 0LL; *(_QWORD *)(a1 + 96) = 0LL; v9 = *a5; *((_QWORD *)a5 + 1) = 0LL; *(_OWORD *)(a1 + 88) = v9; *(_QWORD *)a5 = 0LL; return result; }
SetNode: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,R8 MOV R15,RCX MOV RBX,RDI LEA R13,[0x1dffe8] ADD R13,0x10 MOV qword ptr [RDI],R13 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 0x00164ed7 MOV RCX,qword ptr [0x001e0f98] CMP byte ptr [RCX],0x0 JZ 0x00164ed3 INC dword ptr [RAX + 0x8] JMP 0x00164ed7 LAB_00164ed3: INC.LOCK dword ptr [RAX + 0x8] LAB_00164ed7: MOV RAX,qword ptr [RSI + 0x10] MOV qword ptr [RBX + 0x18],RAX LEA RAX,[0x1e0358] ADD RAX,0x10 MOV qword ptr [RBX],RAX LEA R12,[RBX + 0x20] LEA RBP,[RBX + 0x30] MOV qword ptr [RBX + 0x20],RBP MOV RSI,qword ptr [RDX] MOV RDX,qword ptr [RDX + 0x8] ADD RDX,RSI LAB_00164f03: MOV RDI,R12 CALL 0x0011f55e LEA RDI,[RBX + 0x40] LAB_00164f0f: MOV RSI,R15 CALL 0x00139c8e LAB_00164f17: XOR EAX,EAX MOV qword ptr [RBX + 0x60],RAX MOVUPS XMM0,xmmword ptr [R14] MOV qword ptr [R14 + 0x8],RAX MOVUPS xmmword ptr [RBX + 0x58],XMM0 MOV qword ptr [R14],RAX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* minja::SetNode::SetNode(minja::Location const&, std::__cxx11::string const&, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, std::shared_ptr<minja::Expression>&&) */ void __thiscall minja::SetNode::SetNode (SetNode *this,Location *param_1,string *param_2,vector *param_3,shared_ptr *param_4) { long lVar1; int8 uVar2; *(int ***)this = &PTR___cxa_pure_virtual_001dfff8; *(int8 *)(this + 8) = *(int8 *)param_1; lVar1 = *(long *)(param_1 + 8); *(long *)(this + 0x10) = lVar1; if (lVar1 != 0) { if (*PTR___libc_single_threaded_001e0f98 == '\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_001e0368; *(SetNode **)(this + 0x20) = this + 0x30; /* try { // try from 00164f03 to 00164f0a has its CatchHandler @ 00164f55 */ std::__cxx11::string::_M_construct<char*> (this + 0x20,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2); /* try { // try from 00164f0f to 00164f16 has its CatchHandler @ 00164f3b */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x40), param_3); *(int8 *)(this + 0x60) = 0; uVar2 = *(int8 *)(param_4 + 8); *(int8 *)(param_4 + 8) = 0; *(int8 *)(this + 0x58) = *(int8 *)param_4; *(int8 *)(this + 0x60) = uVar2; *(int8 *)param_4 = 0; return; }
16,651
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 0xa9015 jmp 0xa9002 movl -0x38(%rbp), %eax shll %eax movl %eax, -0x38(%rbp) movl -0x30(%rbp), %eax addl $0x1, %eax movl %eax, -0x30(%rbp) jmp 0xa8ff8 movl -0x30(%rbp), %edi movq -0x20(%rbp), %rsi callq 0xa9100 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 0xa90a0 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 0xa9d90 movq %rax, -0x28(%rbp) movl -0x2c(%rbp), %eax addl $0x1, %eax movl %eax, -0x2c(%rbp) cmpl -0xc(%rbp), %eax jl 0xa9059 movq -0x8(%rbp), %rax addq $0x1, %rax movq %rax, -0x8(%rbp) jmp 0xa90ac movq -0x8(%rbp), %rax addq $0xa, %rax movq %rax, -0x8(%rbp) jmp 0xa90ae movl -0x2c(%rbp), %eax cmpl -0x10(%rbp), %eax jge 0xa90ec 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 0xa9d90 movq %rax, -0x28(%rbp) movl -0x2c(%rbp), %eax addl $0x1, %eax movl %eax, -0x2c(%rbp) jmp 0xa90ae 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_A8FF8: mov eax, [rbp+var_34] cmp eax, [rbp+var_38] jle short loc_A9015 jmp short $+2 loc_A9002: 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_A8FF8 loc_A9015: 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_A90A0 mov rax, [rbp+var_8] add rax, 9 mov [rbp+var_8], rax loc_A9059: 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_A9059 mov rax, [rbp+var_8] add rax, 1 mov [rbp+var_8], rax jmp short loc_A90AC loc_A90A0: mov rax, [rbp+var_8] add rax, 0Ah mov [rbp+var_8], rax loc_A90AC: jmp short $+2 loc_A90AE: mov eax, [rbp+var_2C] cmp eax, [rbp+var_10] jge short loc_A90EC 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_A90AE loc_A90EC: 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_001a8ff8: MOV EAX,dword ptr [RBP + -0x34] CMP EAX,dword ptr [RBP + -0x38] JLE 0x001a9015 JMP 0x001a9002 LAB_001a9002: 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 0x001a8ff8 LAB_001a9015: MOV EDI,dword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x20] CALL 0x001a9100 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 0x001a90a0 MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x9 MOV qword ptr [RBP + -0x8],RAX LAB_001a9059: 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 0x001a9d90 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 0x001a9059 MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x1 MOV qword ptr [RBP + -0x8],RAX JMP 0x001a90ac LAB_001a90a0: MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0xa MOV qword ptr [RBP + -0x8],RAX LAB_001a90ac: JMP 0x001a90ae LAB_001a90ae: MOV EAX,dword ptr [RBP + -0x2c] CMP EAX,dword ptr [RBP + -0x10] JGE 0x001a90ec 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 0x001a9d90 MOV qword ptr [RBP + -0x28],RAX MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,0x1 MOV dword ptr [RBP + -0x2c],EAX JMP 0x001a90ae LAB_001a90ec: 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; }
16,652
ma_zlib_compress
eloqsql/libmariadb/plugins/compress/c_zlib.c
my_bool ma_zlib_compress(ma_compress_ctx *ctx, void *dst, size_t *dst_len, void *source, size_t source_len) { int rc; if (!ctx) return 1; if ((rc= compress2((Bytef *)dst, (uLongf *)dst_len, (Bytef *)source, (uLong)source_len, ctx->compression_level)) != Z_OK) return 1; return 0; }
O3
c
ma_zlib_compress: testq %rdi, %rdi je 0x8beb3 pushq %rbp movq %rsp, %rbp movl 0x10(%rdi), %eax movq %rsi, %rdi movq %rdx, %rsi movq %rcx, %rdx movq %r8, %rcx movl %eax, %r8d callq 0x5f760 testl %eax, %eax setne %al popq %rbp retq movb $0x1, %al retq
ma_zlib_compress: test rdi, rdi jz short loc_8BEB3 push rbp mov rbp, rsp mov eax, [rdi+10h] mov rdi, rsi mov rsi, rdx mov rdx, rcx mov rcx, r8 mov r8d, eax call _compress2 test eax, eax setnz al pop rbp retn loc_8BEB3: mov al, 1 retn
bool ma_zlib_compress(long long a1, long long a2, long long a3, long long a4, long long a5) { return !a1 || (unsigned int)compress2(a2, a3, a4, a5, *(unsigned int *)(a1 + 16)) != 0; }
ma_zlib_compress: TEST RDI,RDI JZ 0x0018beb3 PUSH RBP MOV RBP,RSP MOV EAX,dword ptr [RDI + 0x10] MOV RDI,RSI MOV RSI,RDX MOV RDX,RCX MOV RCX,R8 MOV R8D,EAX CALL 0x0015f760 TEST EAX,EAX SETNZ AL POP RBP RET LAB_0018beb3: MOV AL,0x1 RET
bool ma_zlib_compress(long param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5) { int iVar1; if (param_1 != 0) { iVar1 = compress2(param_2,param_3,param_4,param_5,*(int4 *)(param_1 + 0x10)); return iVar1 != 0; } return true; }
16,653
PFS_buffer_default_allocator<PFS_table_share_index>::alloc_array(PFS_buffer_default_array<PFS_table_share_index>*)
eloqsql/storage/perfschema/pfs_buffer_container.h
int alloc_array(array_type *array) { array->m_ptr= NULL; array->m_full= true; array->m_monotonic.m_u32= 0; if (array->m_max > 0) { array->m_ptr= PFS_MALLOC_ARRAY(m_builtin_class, array->m_max, sizeof(T), T, MYF(MY_ZEROFILL)); if (array->m_ptr == NULL) return 1; array->m_full= false; } return 0; }
O0
c
PFS_buffer_default_allocator<PFS_table_share_index>::alloc_array(PFS_buffer_default_array<PFS_table_share_index>*): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax movq $0x0, 0x48(%rax) movq -0x18(%rbp), %rax movb $0x1, (%rax) movq -0x18(%rbp), %rax movl $0x0, 0x4(%rax) movq -0x18(%rbp), %rax cmpq $0x0, 0x50(%rax) jbe 0x41f45 movq -0x20(%rbp), %rax movq (%rax), %rdi movq -0x18(%rbp), %rax movq 0x50(%rax), %rsi movl $0x1c0, %edx # imm = 0x1C0 movl $0x20, %ecx callq 0x29b10 movq %rax, %rcx movq -0x18(%rbp), %rax movq %rcx, 0x48(%rax) movq -0x18(%rbp), %rax cmpq $0x0, 0x48(%rax) jne 0x41f3e movl $0x1, -0x4(%rbp) jmp 0x41f4c movq -0x18(%rbp), %rax movb $0x0, (%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nop
_ZN28PFS_buffer_default_allocatorI16PFS_setup_objectE11alloc_arrayEP24PFS_buffer_default_arrayIS0_E: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] mov [rbp+var_20], rax mov rax, [rbp+var_18] mov qword ptr [rax+48h], 0 mov rax, [rbp+var_18] mov byte ptr [rax], 1 mov rax, [rbp+var_18] mov dword ptr [rax+4], 0 mov rax, [rbp+var_18] cmp qword ptr [rax+50h], 0 jbe short loc_41F45 mov rax, [rbp+var_20] mov rdi, [rax]; PFS_builtin_memory_class * mov rax, [rbp+var_18] mov rsi, [rax+50h]; unsigned __int64 mov edx, 1C0h; unsigned __int64 mov ecx, 20h ; ' '; unsigned __int64 call _Z16pfs_malloc_arrayP24PFS_builtin_memory_classmmm; pfs_malloc_array(PFS_builtin_memory_class *,ulong,ulong,ulong) mov rcx, rax mov rax, [rbp+var_18] mov [rax+48h], rcx mov rax, [rbp+var_18] cmp qword ptr [rax+48h], 0 jnz short loc_41F3E mov [rbp+var_4], 1 jmp short loc_41F4C loc_41F3E: mov rax, [rbp+var_18] mov byte ptr [rax], 0 loc_41F45: mov [rbp+var_4], 0 loc_41F4C: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long PFS_buffer_default_allocator<PFS_setup_object>::alloc_array( PFS_builtin_memory_class **a1, long long a2) { *(_QWORD *)(a2 + 72) = 0LL; *(_BYTE *)a2 = 1; *(_DWORD *)(a2 + 4) = 0; if ( !*(_QWORD *)(a2 + 80) ) return 0; *(_QWORD *)(a2 + 72) = pfs_malloc_array(*a1, *(_QWORD *)(a2 + 80), 0x1C0uLL); if ( *(_QWORD *)(a2 + 72) ) { *(_BYTE *)a2 = 0; return 0; } return 1; }
alloc_array: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x48],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],0x1 MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x4],0x0 MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x50],0x0 JBE 0x00141f45 MOV RAX,qword ptr [RBP + -0x20] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0x50] MOV EDX,0x1c0 MOV ECX,0x20 CALL 0x00129b10 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x48],RCX MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x48],0x0 JNZ 0x00141f3e MOV dword ptr [RBP + -0x4],0x1 JMP 0x00141f4c LAB_00141f3e: MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],0x0 LAB_00141f45: MOV dword ptr [RBP + -0x4],0x0 LAB_00141f4c: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
/* PFS_buffer_default_allocator<PFS_setup_object>::alloc_array(PFS_buffer_default_array<PFS_setup_object>*) */ int4 __thiscall PFS_buffer_default_allocator<PFS_setup_object>::alloc_array (PFS_buffer_default_allocator<PFS_setup_object> *this,PFS_buffer_default_array *param_1) { int8 uVar1; *(int8 *)(param_1 + 0x48) = 0; *param_1 = (PFS_buffer_default_array)0x1; *(int4 *)(param_1 + 4) = 0; if (*(long *)(param_1 + 0x50) != 0) { uVar1 = pfs_malloc_array(*(PFS_builtin_memory_class **)this,*(ulong *)(param_1 + 0x50),0x1c0, 0x20); *(int8 *)(param_1 + 0x48) = uVar1; if (*(long *)(param_1 + 0x48) == 0) { return 1; } *param_1 = (PFS_buffer_default_array)0x0; } return 0; }
16,654
PFS_buffer_default_allocator<PFS_table_share_index>::alloc_array(PFS_buffer_default_array<PFS_table_share_index>*)
eloqsql/storage/perfschema/pfs_buffer_container.h
int alloc_array(array_type *array) { array->m_ptr= NULL; array->m_full= true; array->m_monotonic.m_u32= 0; if (array->m_max > 0) { array->m_ptr= PFS_MALLOC_ARRAY(m_builtin_class, array->m_max, sizeof(T), T, MYF(MY_ZEROFILL)); if (array->m_ptr == NULL) return 1; array->m_full= false; } return 0; }
O3
c
PFS_buffer_default_allocator<PFS_table_share_index>::alloc_array(PFS_buffer_default_array<PFS_table_share_index>*): pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %r14 movq $0x0, 0x48(%rsi) movb $0x1, (%rsi) movl $0x0, 0x4(%rsi) movq 0x50(%rsi), %rsi xorl %ebx, %ebx testq %rsi, %rsi je 0x41ea1 movq (%rdi), %rdi movl $0x680, %edx # imm = 0x680 movl $0x20, %ecx callq 0x2cd6c movq %rax, 0x48(%r14) testq %rax, %rax je 0x41e9c movb $0x0, (%r14) jmp 0x41ea1 movl $0x1, %ebx movl %ebx, %eax popq %rbx popq %r14 popq %rbp retq
_ZN28PFS_buffer_default_allocatorI17PFS_prepared_stmtE11alloc_arrayEP24PFS_buffer_default_arrayIS0_E: push rbp mov rbp, rsp push r14 push rbx mov r14, rsi mov qword ptr [rsi+48h], 0 mov byte ptr [rsi], 1 mov dword ptr [rsi+4], 0 mov rsi, [rsi+50h] xor ebx, ebx test rsi, rsi jz short loc_41EA1 mov rdi, [rdi] mov edx, 680h mov ecx, 20h ; ' ' call _Z16pfs_malloc_arrayP24PFS_builtin_memory_classmmm; pfs_malloc_array(PFS_builtin_memory_class *,ulong,ulong,ulong) mov [r14+48h], rax test rax, rax jz short loc_41E9C mov byte ptr [r14], 0 jmp short loc_41EA1 loc_41E9C: mov ebx, 1 loc_41EA1: mov eax, ebx pop rbx pop r14 pop rbp retn
long long PFS_buffer_default_allocator<PFS_prepared_stmt>::alloc_array(long long *a1, long long a2) { unsigned long long v3; // rsi unsigned int v4; // ebx long long v5; // rax *(_QWORD *)(a2 + 72) = 0LL; *(_BYTE *)a2 = 1; *(_DWORD *)(a2 + 4) = 0; v3 = *(_QWORD *)(a2 + 80); v4 = 0; if ( v3 ) { v5 = pfs_malloc_array(*a1, v3, 0x680uLL); *(_QWORD *)(a2 + 72) = v5; if ( v5 ) *(_BYTE *)a2 = 0; else return 1; } return v4; }
alloc_array: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV R14,RSI MOV qword ptr [RSI + 0x48],0x0 MOV byte ptr [RSI],0x1 MOV dword ptr [RSI + 0x4],0x0 MOV RSI,qword ptr [RSI + 0x50] XOR EBX,EBX TEST RSI,RSI JZ 0x00141ea1 MOV RDI,qword ptr [RDI] MOV EDX,0x680 MOV ECX,0x20 CALL 0x0012cd6c MOV qword ptr [R14 + 0x48],RAX TEST RAX,RAX JZ 0x00141e9c MOV byte ptr [R14],0x0 JMP 0x00141ea1 LAB_00141e9c: MOV EBX,0x1 LAB_00141ea1: MOV EAX,EBX POP RBX POP R14 POP RBP RET
/* PFS_buffer_default_allocator<PFS_prepared_stmt>::alloc_array(PFS_buffer_default_array<PFS_prepared_stmt>*) */ int8 __thiscall PFS_buffer_default_allocator<PFS_prepared_stmt>::alloc_array (PFS_buffer_default_allocator<PFS_prepared_stmt> *this,PFS_buffer_default_array *param_1) { long lVar1; int8 uVar2; *(int8 *)(param_1 + 0x48) = 0; *param_1 = (PFS_buffer_default_array)0x1; *(int4 *)(param_1 + 4) = 0; uVar2 = 0; if (*(ulong *)(param_1 + 0x50) != 0) { lVar1 = pfs_malloc_array(*(PFS_builtin_memory_class **)this,*(ulong *)(param_1 + 0x50),0x680, 0x20); *(long *)(param_1 + 0x48) = lVar1; if (lVar1 == 0) { uVar2 = 1; } else { *param_1 = (PFS_buffer_default_array)0x0; } } return uVar2; }
16,655
LefDefParser::defiRow::propIsNumber(int) const
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiRowTrack.cpp
int defiRow::propIsNumber(int index) const { char msg[160]; if (index < 0 || index >= numProps_) { sprintf (msg, "ERROR (DEFPARS-6140): The index number %d specified for the VIA LAYER RECTANGLE is invalide.\nValid index number is from 0 to %d. Specify a valid index number and then try again.", index, numProps_); defiError(0, 6140, msg, defData); return 0; } return propDValues_[index] ? 1 : 0; }
O0
cpp
LefDefParser::defiRow::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 0x2f02e movq 0x8(%rsp), %rcx movl 0xb4(%rsp), %eax cmpl 0x60(%rcx), %eax jl 0x2f07a movq 0x8(%rsp), %rax leaq 0x10(%rsp), %rdi movl 0xb4(%rsp), %edx movl 0x60(%rax), %ecx leaq 0x4256d(%rip), %rsi # 0x715b6 movb $0x0, %al callq 0x7060 movq 0x8(%rsp), %rax leaq 0x10(%rsp), %rdx movq 0x88(%rax), %rcx xorl %edi, %edi movl $0x17fc, %esi # imm = 0x17FC callq 0x277e0 movl $0x0, 0xc4(%rsp) jmp 0x2f0b2 movq 0x8(%rsp), %rax movq 0x78(%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)
_ZNK12LefDefParser7defiRow12propIsNumberEi: 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_2F02E mov rcx, [rsp+0C8h+var_C0] mov eax, [rsp+0C8h+var_14] cmp eax, [rcx+60h] jl short loc_2F07A loc_2F02E: mov rax, [rsp+0C8h+var_C0] lea rdi, [rsp+0C8h+var_B8] mov edx, [rsp+0C8h+var_14] mov ecx, [rax+60h] lea rsi, aErrorDefpars61_2; "ERROR (DEFPARS-6140): The index number "... mov al, 0 call _sprintf mov rax, [rsp+0C8h+var_C0] lea rdx, [rsp+0C8h+var_B8]; int mov rcx, [rax+88h]; char * xor edi, edi; this mov esi, 17FCh; int call _ZN12LefDefParser9defiErrorEiiPKcPNS_8defrDataE; LefDefParser::defiError(int,int,char const*,LefDefParser::defrData *) mov [rsp+0C8h+var_4], 0 jmp short loc_2F0B2 loc_2F07A: mov rax, [rsp+0C8h+var_C0] mov rax, [rax+78h] 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_2F0B2: mov eax, [rsp+0C8h+var_4] add rsp, 0C8h retn
_BOOL8 LefDefParser::defiRow::propIsNumber(LefDefParser::defrData **this, int a2) { LefDefParser::defrData *v2; // r8 char v4[164]; // [rsp+10h] [rbp-B8h] BYREF int v5; // [rsp+B4h] [rbp-14h] LefDefParser::defiRow *v6; // [rsp+B8h] [rbp-10h] v6 = (LefDefParser::defiRow *)this; v5 = a2; if ( a2 >= 0 && v5 < *((_DWORD *)this + 24) ) { return *((double *)this[15] + v5) != 0.0; } else { sprintf( v4, "ERROR (DEFPARS-6140): The index number %d specified for the VIA LAYER RECTANGLE is invalide.\n" "Valid index number is from 0 to %d. Specify a valid index number and then try again.", v5, *((_DWORD *)this + 24)); LefDefParser::defiError(0LL, 6140, v4, this[17], 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 0x0012f02e MOV RCX,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RSP + 0xb4] CMP EAX,dword ptr [RCX + 0x60] JL 0x0012f07a LAB_0012f02e: MOV RAX,qword ptr [RSP + 0x8] LEA RDI,[RSP + 0x10] MOV EDX,dword ptr [RSP + 0xb4] MOV ECX,dword ptr [RAX + 0x60] LEA RSI,[0x1715b6] MOV AL,0x0 CALL 0x00107060 MOV RAX,qword ptr [RSP + 0x8] LEA RDX,[RSP + 0x10] MOV RCX,qword ptr [RAX + 0x88] XOR EDI,EDI MOV ESI,0x17fc CALL 0x001277e0 MOV dword ptr [RSP + 0xc4],0x0 JMP 0x0012f0b2 LAB_0012f07a: MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x78] 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_0012f0b2: MOV EAX,dword ptr [RSP + 0xc4] ADD RSP,0xc8 RET
/* LefDefParser::defiRow::propIsNumber(int) const */ bool __thiscall LefDefParser::defiRow::propIsNumber(defiRow *this,int param_1) { bool bVar1; char local_b8 [164]; int local_14; defiRow *local_10; if ((param_1 < 0) || (*(int *)(this + 0x60) <= param_1)) { local_14 = param_1; local_10 = this; sprintf(local_b8, "ERROR (DEFPARS-6140): The index number %d specified for the VIA LAYER RECTANGLE is invalide.\nValid index number is from 0 to %d. Specify a valid index number and then try again." ,(ulong)(uint)param_1,(ulong)*(uint *)(this + 0x60)); defiError(0,0x17fc,local_b8,*(defrData **)(this + 0x88)); bVar1 = false; } else { bVar1 = *(double *)(*(long *)(this + 0x78) + (long)param_1 * 8) != 0.0; } return bVar1; }
16,656
edit_selected_server()
untodesu[P]voxelius/game/client/play_menu.cc
static void edit_selected_server(void) { input_itemname = selected_server->name; if(selected_server->port != protocol::PORT) input_hostname = fmt::format("{}:{}", selected_server->hostname, selected_server->port); else input_hostname = selected_server->hostname; input_password = selected_server->password; editing_server = true; needs_focus = true; }
O0
cpp
edit_selected_server(): pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq 0x423c11(%rip), %rsi # 0x50e940 leaq 0x423b52(%rip), %rdi # 0x50e888 callq 0x2d4d0 movq 0x423bfe(%rip), %rax # 0x50e940 movzwl 0x60(%rax), %eax cmpl $0xa85f, %eax # imm = 0xA85F je 0xeadb7 leaq -0x48(%rbp), %rax movq %rax, -0x10(%rbp) leaq 0x286092(%rip), %rax # 0x370dee movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x317c0 movq -0x18(%rbp), %rax movq %rax, -0x8(%rbp) movq 0x423bc4(%rip), %rcx # 0x50e940 addq $0x40, %rcx movq 0x423bb9(%rip), %r8 # 0x50e940 addq $0x60, %r8 movq -0x48(%rbp), %rsi movq -0x40(%rbp), %rdx leaq -0x38(%rbp), %rdi callq 0xecb00 leaq 0x423b05(%rip), %rdi # 0x50e8a8 leaq -0x38(%rbp), %rsi callq 0x2c9c0 leaq -0x38(%rbp), %rdi callq 0x2d648 jmp 0xeadce movq 0x423b82(%rip), %rsi # 0x50e940 addq $0x40, %rsi leaq 0x423adf(%rip), %rdi # 0x50e8a8 callq 0x2d4d0 movq 0x423b6b(%rip), %rsi # 0x50e940 addq $0x20, %rsi leaq 0x423ae8(%rip), %rdi # 0x50e8c8 callq 0x2d4d0 movb $0x1, 0x423b5c(%rip) # 0x50e948 movb $0x1, 0x423b56(%rip) # 0x50e949 addq $0x50, %rsp popq %rbp retq nopl (%rax)
_ZL20edit_selected_serverv: push rbp mov rbp, rsp sub rsp, 50h mov rsi, cs:_ZL15selected_server; selected_server lea rdi, _ZL14input_itemnameB5cxx11; input_itemname call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&) mov rax, cs:_ZL15selected_server; selected_server movzx eax, word ptr [rax+60h] cmp eax, 0A85Fh jz short loc_EADB7 lea rax, [rbp+var_48] mov [rbp+var_10], rax lea rax, asc_370DEE; "{}:{}" mov [rbp+var_18], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call _ZN3fmt3v1117basic_string_viewIcEC2EPKc; fmt::v11::basic_string_view<char>::basic_string_view(char const*) mov rax, [rbp+var_18] mov [rbp+var_8], rax mov rcx, cs:_ZL15selected_server; selected_server add rcx, 40h ; '@' mov r8, cs:_ZL15selected_server; selected_server add r8, 60h ; '`' mov rsi, [rbp+var_48] mov rdx, [rbp+var_40] lea rdi, [rbp+var_38] call _ZN3fmt3v116formatIJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERtEEES7_NS0_19basic_format_stringIcJDpNS0_13type_identityIT_E4typeEEEEDpOSC_; fmt::v11::format<std::string &,ushort &>(fmt::v11::basic_format_string<char,fmt::v11::type_identity<std::string &,ushort &>::type>,std::string &,ushort &&&) lea rdi, _ZL14input_hostnameB5cxx11; input_hostname lea rsi, [rbp+var_38] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) lea rdi, [rbp+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_EADCE loc_EADB7: mov rsi, cs:_ZL15selected_server; selected_server add rsi, 40h ; '@' lea rdi, _ZL14input_hostnameB5cxx11; input_hostname call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&) loc_EADCE: mov rsi, cs:_ZL15selected_server; selected_server add rsi, 20h ; ' ' lea rdi, _ZL14input_passwordB5cxx11; input_password call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&) mov cs:_ZL14editing_server, 1; editing_server mov cs:_ZL11needs_focus_0, 1; needs_focus add rsp, 50h pop rbp retn
long long edit_selected_server(void) { long long result; // rax _QWORD v1[2]; // [rsp+8h] [rbp-48h] BYREF _BYTE v2[32]; // [rsp+18h] [rbp-38h] BYREF const char *v3; // [rsp+38h] [rbp-18h] _QWORD *v4; // [rsp+40h] [rbp-10h] const char *v5; // [rsp+48h] [rbp-8h] std::string::operator=(&input_itemname[abi:cxx11], selected_server); if ( *(unsigned __int16 *)(selected_server + 96) == 43103 ) { std::string::operator=(&input_hostname[abi:cxx11], selected_server + 64); } else { v4 = v1; v3 = "{}:{}"; fmt::v11::basic_string_view<char>::basic_string_view(v1, (long long)"{}:{}"); v5 = v3; fmt::v11::format<std::string &,unsigned short &>(v2, v1[0], v1[1], selected_server + 64, selected_server + 96); std::string::operator=(&input_hostname[abi:cxx11]); std::string::~string(v2); } result = std::string::operator=(&input_password[abi:cxx11], selected_server + 32); editing_server = 1; needs_focus = 1; return result; }
edit_selected_server: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV RSI,qword ptr [0x0060e940] LEA RDI,[0x60e888] CALL 0x0012d4d0 MOV RAX,qword ptr [0x0060e940] MOVZX EAX,word ptr [RAX + 0x60] CMP EAX,0xa85f JZ 0x001eadb7 LEA RAX,[RBP + -0x48] MOV qword ptr [RBP + -0x10],RAX LEA RAX,[0x470dee] MOV qword ptr [RBP + -0x18],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x001317c0 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x8],RAX MOV RCX,qword ptr [0x0060e940] ADD RCX,0x40 MOV R8,qword ptr [0x0060e940] ADD R8,0x60 MOV RSI,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x40] LEA RDI,[RBP + -0x38] CALL 0x001ecb00 LEA RDI,[0x60e8a8] LEA RSI,[RBP + -0x38] CALL 0x0012c9c0 LEA RDI,[RBP + -0x38] CALL 0x0012d648 JMP 0x001eadce LAB_001eadb7: MOV RSI,qword ptr [0x0060e940] ADD RSI,0x40 LEA RDI,[0x60e8a8] CALL 0x0012d4d0 LAB_001eadce: MOV RSI,qword ptr [0x0060e940] ADD RSI,0x20 LEA RDI,[0x60e8c8] CALL 0x0012d4d0 MOV byte ptr [0x0060e948],0x1 MOV byte ptr [0x0060e949],0x1 ADD RSP,0x50 POP RBP RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* edit_selected_server() */ void edit_selected_server(void) { int8 local_50; int8 local_48; string local_40 [32]; char *local_20; basic_string_view<char> *local_18; char *local_10; std::__cxx11::string::operator=((string *)input_itemname_abi_cxx11_,selected_server); if (*(short *)(selected_server + 0x60) == -0x57a1) { std::__cxx11::string::operator=((string *)input_hostname_abi_cxx11_,selected_server + 0x40); } else { local_18 = (basic_string_view<char> *)&local_50; local_20 = "{}:{}"; fmt::v11::basic_string_view<char>::basic_string_view(local_18,"{}:{}"); local_10 = local_20; fmt::v11::format<std::__cxx11::string&,unsigned_short&> (local_40,local_50,local_48,selected_server + 0x40,selected_server + 0x60); std::__cxx11::string::operator=((string *)input_hostname_abi_cxx11_,local_40); std::__cxx11::string::~string(local_40); } std::__cxx11::string::operator=((string *)input_password_abi_cxx11_,selected_server + 0x20); editing_server = 1; needs_focus = 1; return; }
16,657
bitmap_xor
eloqsql/mysys/my_bitmap.c
void bitmap_xor(MY_BITMAP *map, const MY_BITMAP *map2) { my_bitmap_map *to= map->bitmap, *from= map2->bitmap, *end= map->last_word_ptr; DBUG_ASSERT(map->bitmap); DBUG_ASSERT(map2->bitmap); DBUG_ASSERT(map->n_bits == map2->n_bits); while (to <= end) *to++ ^= *from++; }
O0
c
bitmap_xor: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x28(%rbp) jmp 0x27d90 jmp 0x27d92 jmp 0x27d94 jmp 0x27d96 jmp 0x27d98 jmp 0x27d9a movq -0x18(%rbp), %rax cmpq -0x28(%rbp), %rax ja 0x27dca movq -0x20(%rbp), %rax movq %rax, %rcx addq $0x4, %rcx movq %rcx, -0x20(%rbp) movl (%rax), %ecx movq -0x18(%rbp), %rax movq %rax, %rdx addq $0x4, %rdx movq %rdx, -0x18(%rbp) xorl (%rax), %ecx movl %ecx, (%rax) jmp 0x27d9a popq %rbp retq nopl (%rax)
bitmap_xor: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_18], rax mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_20], rax mov rax, [rbp+var_8] mov rax, [rax+8] mov [rbp+var_28], rax jmp short $+2 loc_27D90: jmp short $+2 loc_27D92: jmp short $+2 loc_27D94: jmp short $+2 loc_27D96: jmp short $+2 loc_27D98: jmp short $+2 loc_27D9A: mov rax, [rbp+var_18] cmp rax, [rbp+var_28] ja short loc_27DCA mov rax, [rbp+var_20] mov rcx, rax add rcx, 4 mov [rbp+var_20], rcx mov ecx, [rax] mov rax, [rbp+var_18] mov rdx, rax add rdx, 4 mov [rbp+var_18], rdx xor ecx, [rax] mov [rax], ecx jmp short loc_27D9A loc_27DCA: pop rbp retn
_DWORD * bitmap_xor(_QWORD *a1, int **a2) { _DWORD *result; // rax int *v3; // rax int v4; // ecx _DWORD *v5; // rax unsigned long long v6; // [rsp+0h] [rbp-28h] int *v7; // [rsp+8h] [rbp-20h] _DWORD *v8; // [rsp+10h] [rbp-18h] v8 = (_DWORD *)*a1; v7 = *a2; v6 = a1[1]; while ( 1 ) { result = v8; if ( (unsigned long long)v8 > v6 ) break; v3 = v7++; v4 = *v3; v5 = v8++; *v5 ^= v4; } return result; }
bitmap_xor: 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] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x28],RAX JMP 0x00127d90 LAB_00127d90: JMP 0x00127d92 LAB_00127d92: JMP 0x00127d94 LAB_00127d94: JMP 0x00127d96 LAB_00127d96: JMP 0x00127d98 LAB_00127d98: JMP 0x00127d9a LAB_00127d9a: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x28] JA 0x00127dca MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RAX ADD RCX,0x4 MOV qword ptr [RBP + -0x20],RCX MOV ECX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x18] MOV RDX,RAX ADD RDX,0x4 MOV qword ptr [RBP + -0x18],RDX XOR ECX,dword ptr [RAX] MOV dword ptr [RAX],ECX JMP 0x00127d9a LAB_00127dca: POP RBP RET
void bitmap_xor(int8 *param_1,int8 *param_2) { uint *puVar1; uint *local_28; uint *local_20; puVar1 = (uint *)param_1[1]; local_28 = (uint *)*param_2; local_20 = (uint *)*param_1; while (local_20 <= puVar1) { *local_20 = *local_28 ^ *local_20; local_28 = local_28 + 1; local_20 = local_20 + 1; } return; }
16,658
minja::UnaryOpExpr::UnaryOpExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, minja::UnaryOpExpr::Op)
monkey531[P]llama/common/minja.hpp
UnaryOpExpr(const Location & location, std::shared_ptr<Expression> && e, Op o) : Expression(location), expr(std::move(e)), op(o) {}
O2
cpp
minja::UnaryOpExpr::UnaryOpExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, minja::UnaryOpExpr::Op): pushq %r15 pushq %r14 pushq %rbx movl %ecx, %ebx movq %rdx, %r14 movq %rdi, %r15 callq 0x7f29a leaq 0xa10e7(%rip), %rax # 0x120358 addq $0x10, %rax movq %rax, (%r15) andq $0x0, 0x28(%r15) movups (%r14), %xmm0 andq $0x0, 0x8(%r14) movups %xmm0, 0x20(%r15) andq $0x0, (%r14) movl %ebx, 0x30(%r15) popq %rbx popq %r14 popq %r15 retq nop
_ZN5minja11UnaryOpExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEENS0_2OpE: push r15 push r14 push rbx mov ebx, ecx mov r14, rdx mov r15, rdi call _ZN5minja10ExpressionC2ERKNS_8LocationE; minja::Expression::Expression(minja::Location const&) lea rax, _ZTVN5minja11UnaryOpExprE; `vtable for'minja::UnaryOpExpr add rax, 10h mov [r15], rax and qword ptr [r15+28h], 0 movups xmm0, xmmword ptr [r14] and qword ptr [r14+8], 0 movups xmmword ptr [r15+20h], xmm0 and qword ptr [r14], 0 mov [r15+30h], ebx pop rbx pop r14 pop r15 retn
long long * minja::UnaryOpExpr::UnaryOpExpr(long long a1, long long a2, __int128 *a3, int a4) { long long *result; // rax __int128 v7; // xmm0 minja::Expression::Expression(); result = &`vtable for'minja::UnaryOpExpr + 2; *(_QWORD *)a1 = &`vtable for'minja::UnaryOpExpr + 2; *(_QWORD *)(a1 + 40) = 0LL; v7 = *a3; *((_QWORD *)a3 + 1) = 0LL; *(_OWORD *)(a1 + 32) = v7; *(_QWORD *)a3 = 0LL; *(_DWORD *)(a1 + 48) = a4; return result; }
UnaryOpExpr: PUSH R15 PUSH R14 PUSH RBX MOV EBX,ECX MOV R14,RDX MOV R15,RDI CALL 0x0017f29a LEA RAX,[0x220358] ADD RAX,0x10 MOV qword ptr [R15],RAX AND qword ptr [R15 + 0x28],0x0 MOVUPS XMM0,xmmword ptr [R14] AND qword ptr [R14 + 0x8],0x0 MOVUPS xmmword ptr [R15 + 0x20],XMM0 AND qword ptr [R14],0x0 MOV dword ptr [R15 + 0x30],EBX POP RBX POP R14 POP R15 RET
/* minja::UnaryOpExpr::UnaryOpExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, minja::UnaryOpExpr::Op) */ void __thiscall minja::UnaryOpExpr::UnaryOpExpr (UnaryOpExpr *this,Location *param_1,int8 *param_2,int4 param_4) { int8 uVar1; Expression::Expression((Expression *)this,param_1); *(int ***)this = &PTR_do_evaluate_00220368; *(int8 *)(this + 0x28) = 0; uVar1 = param_2[1]; param_2[1] = 0; *(int8 *)(this + 0x20) = *param_2; *(int8 *)(this + 0x28) = uVar1; *param_2 = 0; *(int4 *)(this + 0x30) = param_4; return; }
16,659
SEMANTICANALYZER::AstStatementParser::serializeProperty(AST::ASTTree::DSFIterator&, SEMANTICANALYZER::Property&)
11AgReS1SoR11[P]Graph/Common/SemanticAnalyzer/src/AstStatementParser.cpp
void SEMANTICANALYZER::AstStatementParser::serializeProperty(AST::ASTTree::DSFIterator &propertyIter, Property &property) noexcept { for(auto& it = propertyIter; it != AST::ASTTree::DSFIterator(); ++it) { if(it->value == GRAMMERCONSTANTS::PROPERTY_KEY) { ++it; ++astIter; property.key = it->value; } else if(it->value == GRAMMERCONSTANTS::TEXT || it->value == GRAMMERCONSTANTS::NUMBER) { ++it; ++astIter; property.value = it->value; } auto nextIt = it; ++nextIt; if(nextIt != AST::ASTTree::DSFIterator()) { ++astIter; } } }
O1
cpp
SEMANTICANALYZER::AstStatementParser::serializeProperty(AST::ASTTree::DSFIterator&, SEMANTICANALYZER::Property&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xb8, %rsp movq %rsi, %r14 movq %rdi, %r15 addq $0x8, %r15 movq %rdx, (%rsp) leaq 0x20(%rdx), %rax movq %rax, 0x8(%rsp) leaq 0x60(%rsp), %r12 leaq 0x264a(%rip), %r13 # 0x17790 leaq 0x10(%rsp), %rbp xorps %xmm0, %xmm0 movaps %xmm0, 0xa0(%rsp) movaps %xmm0, 0x90(%rsp) movaps %xmm0, 0x80(%rsp) movaps %xmm0, 0x70(%rsp) movaps %xmm0, 0x60(%rsp) movq %r12, %rdi xorl %esi, %esi callq 0xb600 movq %r14, %rdi movq %r12, %rsi callq 0xb740 movl %eax, %ebx movq %r12, %rdi callq 0xbd20 testb %bl, %bl je 0x15296 movq %r14, %rdi callq 0xb840 movq %rax, %rdi movq %r13, %rsi callq 0xb1f0 testl %eax, %eax je 0x15203 movq %r14, %rdi callq 0xb840 movq %rax, %rdi leaq 0x25dd(%rip), %rsi # 0x1779d callq 0xb1f0 testl %eax, %eax je 0x151e4 movq %r14, %rdi callq 0xb840 movq %rax, %rdi leaq 0x25c7(%rip), %rsi # 0x177a2 callq 0xb1f0 testl %eax, %eax jne 0x15227 movq %r14, %rdi callq 0xbaf0 movq %r15, %rdi callq 0xbaf0 movq %r14, %rdi callq 0xb840 movq 0x8(%rsp), %rdi jmp 0x1521f movq %r14, %rdi callq 0xbaf0 movq %r15, %rdi callq 0xbaf0 movq %r14, %rdi callq 0xb840 movq (%rsp), %rdi movq %rax, %rsi callq 0xb390 movq %r12, %rdi movq %r14, %rsi callq 0xb660 movq %r12, %rdi callq 0xbaf0 xorps %xmm0, %xmm0 movaps %xmm0, 0x50(%rsp) movaps %xmm0, 0x40(%rsp) movaps %xmm0, 0x30(%rsp) movaps %xmm0, 0x20(%rsp) movaps %xmm0, 0x10(%rsp) movq %rbp, %rdi xorl %esi, %esi callq 0xb600 movq %r12, %rdi movq %rbp, %rsi callq 0xb740 movl %eax, %ebx movq %rbp, %rdi callq 0xbd20 testb %bl, %bl je 0x15281 movq %r15, %rdi callq 0xbaf0 movq %r12, %rdi callq 0xbd20 movq %r14, %rdi callq 0xbaf0 jmp 0x1514b addq $0xb8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rdi callq 0x10969
_ZN16SEMANTICANALYZER18AstStatementParser17serializePropertyERN3AST7ASTTree11DSFIteratorERNS_8PropertyE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0B8h mov r14, rsi mov r15, rdi add r15, 8 mov [rsp+0E8h+var_E8], rdx lea rax, [rdx+20h] mov [rsp+0E8h+var_E0], rax lea r12, [rsp+0E8h+var_88] lea r13, aPropertyKey; "PROPERTY_KEY" lea rbp, [rsp+0E8h+var_D8] loc_1514B: xorps xmm0, xmm0 movaps [rsp+0E8h+var_48], xmm0 movaps [rsp+0E8h+var_58], xmm0 movaps [rsp+0E8h+var_68], xmm0 movaps [rsp+0E8h+var_78], xmm0 movaps [rsp+0E8h+var_88], xmm0 mov rdi, r12 xor esi, esi call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EE17_M_initialize_mapEm; std::_Deque_base<AST::Node *>::_M_initialize_map(ulong) mov rdi, r14 mov rsi, r12 call __ZNK3AST7ASTTree11DSFIteratorneERKS1_; AST::ASTTree::DSFIterator::operator!=(AST::ASTTree::DSFIterator const&) mov ebx, eax mov rdi, r12 call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EED2Ev; std::_Deque_base<AST::Node *>::~_Deque_base() test bl, bl jz loc_15296 mov rdi, r14 call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void) mov rdi, rax mov rsi, r13 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_15203 mov rdi, r14 call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void) mov rdi, rax lea rsi, aText; "TEXT" call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_151E4 mov rdi, r14 call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void) mov rdi, rax lea rsi, aNumber_0; "NUMBER" call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jnz short loc_15227 loc_151E4: mov rdi, r14 call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) mov rdi, r15 call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) mov rdi, r14 call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void) mov rdi, [rsp+0E8h+var_E0] jmp short loc_1521F loc_15203: mov rdi, r14 call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) mov rdi, r15 call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) mov rdi, r14 call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void) mov rdi, [rsp+0E8h+var_E8] loc_1521F: mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) loc_15227: mov rdi, r12 mov rsi, r14 call __ZNSt5dequeIPN3AST4NodeESaIS2_EEC2ERKS4_; std::deque<AST::Node *>::deque(std::deque<AST::Node *> const&) mov rdi, r12 call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) xorps xmm0, xmm0 movaps [rsp+0E8h+var_98], xmm0 movaps [rsp+0E8h+var_A8], xmm0 movaps [rsp+0E8h+var_B8], xmm0 movaps [rsp+0E8h+var_C8], xmm0 movaps [rsp+0E8h+var_D8], xmm0 mov rdi, rbp xor esi, esi call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EE17_M_initialize_mapEm; std::_Deque_base<AST::Node *>::_M_initialize_map(ulong) mov rdi, r12 mov rsi, rbp call __ZNK3AST7ASTTree11DSFIteratorneERKS1_; AST::ASTTree::DSFIterator::operator!=(AST::ASTTree::DSFIterator const&) mov ebx, eax mov rdi, rbp call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EED2Ev; std::_Deque_base<AST::Node *>::~_Deque_base() test bl, bl jz short loc_15281 mov rdi, r15 call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) loc_15281: mov rdi, r12 call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EED2Ev; std::_Deque_base<AST::Node *>::~_Deque_base() mov rdi, r14 call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) jmp loc_1514B loc_15296: add rsp, 0B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rdi, rax call __clang_call_terminate
long long SEMANTICANALYZER::AstStatementParser::serializeProperty(long long a1, long long a2, long long a3) { long long v3; // r15 char v4; // bl long long result; // rax long long v6; // rax long long v7; // rax long long v8; // rax long long v9; // rax long long v10; // rdi char v11; // bl long long v13; // [rsp+8h] [rbp-E0h] _OWORD v14[5]; // [rsp+10h] [rbp-D8h] BYREF _OWORD v15[8]; // [rsp+60h] [rbp-88h] BYREF v3 = a1 + 8; v13 = a3 + 32; while ( 1 ) { memset(v15, 0, 80); std::_Deque_base<AST::Node *>::_M_initialize_map(v15, 0LL); v4 = AST::ASTTree::DSFIterator::operator!=(a2, v15); result = std::_Deque_base<AST::Node *>::~_Deque_base(v15); if ( !v4 ) return result; v6 = AST::ASTTree::DSFIterator::operator->(a2); if ( !(unsigned int)std::string::compare(v6, "PROPERTY_KEY") ) { AST::ASTTree::DSFIterator::operator++(a2); AST::ASTTree::DSFIterator::operator++(v3); v9 = AST::ASTTree::DSFIterator::operator->(a2); v10 = a3; } else { v7 = AST::ASTTree::DSFIterator::operator->(a2); if ( (unsigned int)std::string::compare(v7, "TEXT") ) { v8 = AST::ASTTree::DSFIterator::operator->(a2); if ( (unsigned int)std::string::compare(v8, "NUMBER") ) goto LABEL_9; } AST::ASTTree::DSFIterator::operator++(a2); AST::ASTTree::DSFIterator::operator++(v3); v9 = AST::ASTTree::DSFIterator::operator->(a2); v10 = v13; } std::string::_M_assign(v10, v9); LABEL_9: std::deque<AST::Node *>::deque(v15, a2); AST::ASTTree::DSFIterator::operator++(v15); memset(v14, 0, sizeof(v14)); std::_Deque_base<AST::Node *>::_M_initialize_map(v14, 0LL); v11 = AST::ASTTree::DSFIterator::operator!=(v15, v14); std::_Deque_base<AST::Node *>::~_Deque_base(v14); if ( v11 ) AST::ASTTree::DSFIterator::operator++(v3); std::_Deque_base<AST::Node *>::~_Deque_base(v15); AST::ASTTree::DSFIterator::operator++(a2); } }
serializeProperty: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xb8 MOV R14,RSI MOV R15,RDI ADD R15,0x8 MOV qword ptr [RSP],RDX LEA RAX,[RDX + 0x20] MOV qword ptr [RSP + 0x8],RAX LEA R12,[RSP + 0x60] LEA R13,[0x117790] LEA RBP,[RSP + 0x10] LAB_0011514b: XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0xa0],XMM0 MOVAPS xmmword ptr [RSP + 0x90],XMM0 MOVAPS xmmword ptr [RSP + 0x80],XMM0 MOVAPS xmmword ptr [RSP + 0x70],XMM0 MOVAPS xmmword ptr [RSP + 0x60],XMM0 LAB_00115170: MOV RDI,R12 XOR ESI,ESI CALL 0x0010b600 MOV RDI,R14 MOV RSI,R12 CALL 0x0010b740 MOV EBX,EAX MOV RDI,R12 CALL 0x0010bd20 TEST BL,BL JZ 0x00115296 MOV RDI,R14 CALL 0x0010b840 MOV RDI,RAX MOV RSI,R13 CALL 0x0010b1f0 TEST EAX,EAX JZ 0x00115203 MOV RDI,R14 CALL 0x0010b840 MOV RDI,RAX LEA RSI,[0x11779d] CALL 0x0010b1f0 TEST EAX,EAX JZ 0x001151e4 MOV RDI,R14 CALL 0x0010b840 MOV RDI,RAX LEA RSI,[0x1177a2] CALL 0x0010b1f0 TEST EAX,EAX JNZ 0x00115227 LAB_001151e4: MOV RDI,R14 CALL 0x0010baf0 MOV RDI,R15 CALL 0x0010baf0 MOV RDI,R14 CALL 0x0010b840 MOV RDI,qword ptr [RSP + 0x8] JMP 0x0011521f LAB_00115203: MOV RDI,R14 CALL 0x0010baf0 MOV RDI,R15 CALL 0x0010baf0 MOV RDI,R14 CALL 0x0010b840 MOV RDI,qword ptr [RSP] LAB_0011521f: MOV RSI,RAX CALL 0x0010b390 LAB_00115227: MOV RDI,R12 MOV RSI,R14 CALL 0x0010b660 MOV RDI,R12 CALL 0x0010baf0 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x50],XMM0 MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOV RDI,RBP XOR ESI,ESI CALL 0x0010b600 MOV RDI,R12 MOV RSI,RBP CALL 0x0010b740 MOV EBX,EAX MOV RDI,RBP CALL 0x0010bd20 TEST BL,BL JZ 0x00115281 MOV RDI,R15 CALL 0x0010baf0 LAB_00115281: MOV RDI,R12 CALL 0x0010bd20 MOV RDI,R14 CALL 0x0010baf0 JMP 0x0011514b LAB_00115296: ADD RSP,0xb8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* SEMANTICANALYZER::AstStatementParser::serializeProperty(AST::ASTTree::DSFIterator&, SEMANTICANALYZER::Property&) */ void __thiscall SEMANTICANALYZER::AstStatementParser::serializeProperty (AstStatementParser *this,DSFIterator *param_1,Property *param_2) { char cVar1; int iVar2; char *pcVar3; Property *pPVar4; DSFIterator *this_00; int8 local_d8; int8 uStack_d0; int8 local_c8; int8 uStack_c0; int8 local_b8; int8 uStack_b0; int8 local_a8; int8 uStack_a0; int8 local_98; int8 uStack_90; int8 local_88; int8 uStack_80; int8 local_78; int8 uStack_70; int8 local_68; int8 uStack_60; int8 local_58; int8 uStack_50; int8 local_48; int8 uStack_40; this_00 = (DSFIterator *)(this + 8); do { local_48 = 0; uStack_40 = 0; local_58 = 0; uStack_50 = 0; local_68 = 0; uStack_60 = 0; local_78 = 0; uStack_70 = 0; local_88 = 0; uStack_80 = 0; /* try { // try from 00115170 to 00115290 has its CatchHandler @ 001152a8 */ std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::_M_initialize_map ((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_88,0); cVar1 = AST::ASTTree::DSFIterator::operator!=(param_1,(DSFIterator *)&local_88); std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::~_Deque_base ((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_88); if (cVar1 == '\0') { return; } pcVar3 = (char *)AST::ASTTree::DSFIterator::operator->(param_1); iVar2 = std::__cxx11::string::compare(pcVar3); if (iVar2 == 0) { AST::ASTTree::DSFIterator::operator++(param_1); AST::ASTTree::DSFIterator::operator++(this_00); AST::ASTTree::DSFIterator::operator->(param_1); pPVar4 = param_2; LAB_0011521f: std::__cxx11::string::_M_assign((string *)pPVar4); } else { pcVar3 = (char *)AST::ASTTree::DSFIterator::operator->(param_1); iVar2 = std::__cxx11::string::compare(pcVar3); if (iVar2 == 0) { LAB_001151e4: AST::ASTTree::DSFIterator::operator++(param_1); AST::ASTTree::DSFIterator::operator++(this_00); AST::ASTTree::DSFIterator::operator->(param_1); pPVar4 = param_2 + 0x20; goto LAB_0011521f; } pcVar3 = (char *)AST::ASTTree::DSFIterator::operator->(param_1); iVar2 = std::__cxx11::string::compare(pcVar3); if (iVar2 == 0) goto LAB_001151e4; } std::deque<AST::Node*,std::allocator<AST::Node*>>::deque ((deque<AST::Node*,std::allocator<AST::Node*>> *)&local_88,(deque *)param_1); AST::ASTTree::DSFIterator::operator++((DSFIterator *)&local_88); local_98 = 0; uStack_90 = 0; local_a8 = 0; uStack_a0 = 0; local_b8 = 0; uStack_b0 = 0; local_c8 = 0; uStack_c0 = 0; local_d8 = 0; uStack_d0 = 0; std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::_M_initialize_map ((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_d8,0); cVar1 = AST::ASTTree::DSFIterator::operator!=((DSFIterator *)&local_88,(DSFIterator *)&local_d8) ; std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::~_Deque_base ((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_d8); if (cVar1 != '\0') { AST::ASTTree::DSFIterator::operator++(this_00); } std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::~_Deque_base ((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_88); AST::ASTTree::DSFIterator::operator++(param_1); } while( true ); }
16,660
SEMANTICANALYZER::AstStatementParser::serializeProperty(AST::ASTTree::DSFIterator&, SEMANTICANALYZER::Property&)
11AgReS1SoR11[P]Graph/Common/SemanticAnalyzer/src/AstStatementParser.cpp
void SEMANTICANALYZER::AstStatementParser::serializeProperty(AST::ASTTree::DSFIterator &propertyIter, Property &property) noexcept { for(auto& it = propertyIter; it != AST::ASTTree::DSFIterator(); ++it) { if(it->value == GRAMMERCONSTANTS::PROPERTY_KEY) { ++it; ++astIter; property.key = it->value; } else if(it->value == GRAMMERCONSTANTS::TEXT || it->value == GRAMMERCONSTANTS::NUMBER) { ++it; ++astIter; property.value = it->value; } auto nextIt = it; ++nextIt; if(nextIt != AST::ASTTree::DSFIterator()) { ++astIter; } } }
O2
cpp
SEMANTICANALYZER::AstStatementParser::serializeProperty(AST::ASTTree::DSFIterator&, SEMANTICANALYZER::Property&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xb8, %rsp movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 addq $0x8, %r15 leaq 0x20(%rdx), %rax movq %rax, 0x8(%rsp) leaq 0x60(%rsp), %r12 leaq 0x10(%rsp), %rbp xorps %xmm0, %xmm0 movaps %xmm0, 0xa0(%rsp) movaps %xmm0, 0x90(%rsp) movaps %xmm0, 0x80(%rsp) movaps %xmm0, 0x70(%rsp) movaps %xmm0, 0x60(%rsp) movq %r12, %rdi callq 0x107f0 movq %r14, %rdi movq %r12, %rsi callq 0x10b40 movl %eax, %r13d movq %r12, %rdi callq 0x115a0 testb %r13b, %r13b je 0x18f59 movq %r14, %rdi callq 0x10ca0 movq %rax, %rdi leaq 0x2933(%rip), %rsi # 0x1b79c callq 0x116e0 testb %al, %al je 0x18e8f movq %r14, %rdi callq 0x11200 movq %r15, %rdi callq 0x11200 movq %r14, %rdi callq 0x10ca0 movq %rbx, %rdi jmp 0x18ee2 movq %r14, %rdi callq 0x10ca0 movq %rax, %rdi leaq 0x2908(%rip), %rsi # 0x1b7a9 callq 0x116e0 testb %al, %al jne 0x18ec5 movq %r14, %rdi callq 0x10ca0 movq %rax, %rdi leaq 0x28f2(%rip), %rsi # 0x1b7ae callq 0x116e0 testb %al, %al je 0x18eea movq %r14, %rdi callq 0x11200 movq %r15, %rdi callq 0x11200 movq %r14, %rdi callq 0x10ca0 movq 0x8(%rsp), %rdi movq %rax, %rsi callq 0x105f0 movq %r12, %rdi movq %r14, %rsi callq 0x10a40 movq %r12, %rdi callq 0x11200 xorps %xmm0, %xmm0 movaps %xmm0, 0x50(%rsp) movaps %xmm0, 0x40(%rsp) movaps %xmm0, 0x30(%rsp) movaps %xmm0, 0x20(%rsp) movaps %xmm0, 0x10(%rsp) movq %rbp, %rdi callq 0x107f0 movq %r12, %rdi movq %rbp, %rsi callq 0x10b40 movl %eax, %r13d movq %rbp, %rdi callq 0x115a0 testb %r13b, %r13b je 0x18f44 movq %r15, %rdi callq 0x11200 movq %r12, %rdi callq 0x115a0 movq %r14, %rdi callq 0x11200 jmp 0x18e0b addq $0xb8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rdi callq 0x14ce1 nop
_ZN16SEMANTICANALYZER18AstStatementParser17serializePropertyERN3AST7ASTTree11DSFIteratorERNS_8PropertyE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0B8h mov rbx, rdx mov r14, rsi mov r15, rdi add r15, 8 lea rax, [rdx+20h] mov [rsp+0E8h+var_E0], rax lea r12, [rsp+0E8h+var_88] lea rbp, [rsp+0E8h+var_D8] loc_18E0B: xorps xmm0, xmm0 movaps [rsp+0E8h+var_48], xmm0 movaps [rsp+0E8h+var_58], xmm0 movaps [rsp+0E8h+var_68], xmm0 movaps [rsp+0E8h+var_78], xmm0 movaps [rsp+0E8h+var_88], xmm0 mov rdi, r12 call __ZNSt5stackIPN3AST4NodeESt5dequeIS2_SaIS2_EEEC2IS5_vEEv; std::stack<AST::Node *>::stack<std::deque<AST::Node *>,void>(void) mov rdi, r14 mov rsi, r12 call __ZNK3AST7ASTTree11DSFIteratorneERKS1_; AST::ASTTree::DSFIterator::operator!=(AST::ASTTree::DSFIterator const&) mov r13d, eax mov rdi, r12 call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EED2Ev; std::_Deque_base<AST::Node *>::~_Deque_base() test r13b, r13b jz loc_18F59 mov rdi, r14 call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void) mov rdi, rax lea rsi, aPropertyKey; "PROPERTY_KEY" call __ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jz short loc_18E8F mov rdi, r14 call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) mov rdi, r15 call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) mov rdi, r14 call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void) mov rdi, rbx jmp short loc_18EE2 loc_18E8F: mov rdi, r14 call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void) mov rdi, rax lea rsi, aText; "TEXT" call __ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jnz short loc_18EC5 mov rdi, r14 call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void) mov rdi, rax lea rsi, aNumber_0; "NUMBER" call __ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jz short loc_18EEA loc_18EC5: mov rdi, r14 call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) mov rdi, r15 call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) mov rdi, r14 call __ZNK3AST7ASTTree11DSFIteratorptEv; AST::ASTTree::DSFIterator::operator->(void) mov rdi, [rsp+0E8h+var_E0] loc_18EE2: mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) loc_18EEA: mov rdi, r12 mov rsi, r14 call __ZNSt5dequeIPN3AST4NodeESaIS2_EEC2ERKS4_; std::deque<AST::Node *>::deque(std::deque<AST::Node *> const&) mov rdi, r12 call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) xorps xmm0, xmm0 movaps [rsp+0E8h+var_98], xmm0 movaps [rsp+0E8h+var_A8], xmm0 movaps [rsp+0E8h+var_B8], xmm0 movaps [rsp+0E8h+var_C8], xmm0 movaps [rsp+0E8h+var_D8], xmm0 mov rdi, rbp call __ZNSt5stackIPN3AST4NodeESt5dequeIS2_SaIS2_EEEC2IS5_vEEv; std::stack<AST::Node *>::stack<std::deque<AST::Node *>,void>(void) mov rdi, r12 mov rsi, rbp call __ZNK3AST7ASTTree11DSFIteratorneERKS1_; AST::ASTTree::DSFIterator::operator!=(AST::ASTTree::DSFIterator const&) mov r13d, eax mov rdi, rbp call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EED2Ev; std::_Deque_base<AST::Node *>::~_Deque_base() test r13b, r13b jz short loc_18F44 mov rdi, r15 call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) loc_18F44: mov rdi, r12 call __ZNSt11_Deque_baseIPN3AST4NodeESaIS2_EED2Ev; std::_Deque_base<AST::Node *>::~_Deque_base() mov rdi, r14 call __ZN3AST7ASTTree11DSFIteratorppEv; AST::ASTTree::DSFIterator::operator++(void) jmp loc_18E0B loc_18F59: add rsp, 0B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rdi, rax call __clang_call_terminate
long long SEMANTICANALYZER::AstStatementParser::serializeProperty( SEMANTICANALYZER::AstStatementParser *this, AST::ASTTree::DSFIterator *a2, SEMANTICANALYZER::Property *a3) { char *v4; // r15 char v5; // r13 long long result; // rax long long v7; // rax long long v8; // rax SEMANTICANALYZER::Property *v9; // rdi long long v10; // rax long long v11; // rax char v12; // r13 SEMANTICANALYZER::Property *v13; // [rsp+8h] [rbp-E0h] _OWORD v14[5]; // [rsp+10h] [rbp-D8h] BYREF _OWORD v15[8]; // [rsp+60h] [rbp-88h] BYREF v4 = (char *)this + 8; v13 = (SEMANTICANALYZER::Property *)((char *)a3 + 32); while ( 1 ) { memset(v15, 0, 80); std::stack<AST::Node *>::stack<std::deque<AST::Node *>,void>(v15); v5 = AST::ASTTree::DSFIterator::operator!=(a2, v15); result = std::_Deque_base<AST::Node *>::~_Deque_base(v15); if ( !v5 ) return result; v7 = AST::ASTTree::DSFIterator::operator->(a2); if ( (unsigned __int8)std::operator==<char>(v7, "PROPERTY_KEY") ) { AST::ASTTree::DSFIterator::operator++(a2); AST::ASTTree::DSFIterator::operator++(v4); v8 = AST::ASTTree::DSFIterator::operator->(a2); v9 = a3; } else { v10 = AST::ASTTree::DSFIterator::operator->(a2); if ( !(unsigned __int8)std::operator==<char>(v10, "TEXT") ) { v11 = AST::ASTTree::DSFIterator::operator->(a2); if ( !(unsigned __int8)std::operator==<char>(v11, "NUMBER") ) goto LABEL_9; } AST::ASTTree::DSFIterator::operator++(a2); AST::ASTTree::DSFIterator::operator++(v4); v8 = AST::ASTTree::DSFIterator::operator->(a2); v9 = v13; } std::string::_M_assign(v9, v8); LABEL_9: std::deque<AST::Node *>::deque(v15, a2); AST::ASTTree::DSFIterator::operator++(v15); memset(v14, 0, sizeof(v14)); std::stack<AST::Node *>::stack<std::deque<AST::Node *>,void>(v14); v12 = AST::ASTTree::DSFIterator::operator!=(v15, v14); std::_Deque_base<AST::Node *>::~_Deque_base(v14); if ( v12 ) AST::ASTTree::DSFIterator::operator++(v4); std::_Deque_base<AST::Node *>::~_Deque_base(v15); AST::ASTTree::DSFIterator::operator++(a2); } }
serializeProperty: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xb8 MOV RBX,RDX MOV R14,RSI MOV R15,RDI ADD R15,0x8 LEA RAX,[RDX + 0x20] MOV qword ptr [RSP + 0x8],RAX LEA R12,[RSP + 0x60] LEA RBP,[RSP + 0x10] LAB_00118e0b: XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0xa0],XMM0 MOVAPS xmmword ptr [RSP + 0x90],XMM0 MOVAPS xmmword ptr [RSP + 0x80],XMM0 MOVAPS xmmword ptr [RSP + 0x70],XMM0 MOVAPS xmmword ptr [RSP + 0x60],XMM0 LAB_00118e30: MOV RDI,R12 CALL 0x001107f0 MOV RDI,R14 MOV RSI,R12 CALL 0x00110b40 MOV R13D,EAX MOV RDI,R12 CALL 0x001115a0 TEST R13B,R13B JZ 0x00118f59 MOV RDI,R14 CALL 0x00110ca0 MOV RDI,RAX LEA RSI,[0x11b79c] CALL 0x001116e0 TEST AL,AL JZ 0x00118e8f MOV RDI,R14 CALL 0x00111200 MOV RDI,R15 CALL 0x00111200 MOV RDI,R14 CALL 0x00110ca0 MOV RDI,RBX JMP 0x00118ee2 LAB_00118e8f: MOV RDI,R14 CALL 0x00110ca0 MOV RDI,RAX LEA RSI,[0x11b7a9] CALL 0x001116e0 TEST AL,AL JNZ 0x00118ec5 MOV RDI,R14 CALL 0x00110ca0 MOV RDI,RAX LEA RSI,[0x11b7ae] CALL 0x001116e0 TEST AL,AL JZ 0x00118eea LAB_00118ec5: MOV RDI,R14 CALL 0x00111200 MOV RDI,R15 CALL 0x00111200 MOV RDI,R14 CALL 0x00110ca0 MOV RDI,qword ptr [RSP + 0x8] LAB_00118ee2: MOV RSI,RAX CALL 0x001105f0 LAB_00118eea: MOV RDI,R12 MOV RSI,R14 CALL 0x00110a40 MOV RDI,R12 CALL 0x00111200 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x50],XMM0 MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOV RDI,RBP CALL 0x001107f0 MOV RDI,R12 MOV RSI,RBP CALL 0x00110b40 MOV R13D,EAX MOV RDI,RBP CALL 0x001115a0 TEST R13B,R13B JZ 0x00118f44 MOV RDI,R15 CALL 0x00111200 LAB_00118f44: MOV RDI,R12 CALL 0x001115a0 MOV RDI,R14 CALL 0x00111200 JMP 0x00118e0b LAB_00118f59: ADD RSP,0xb8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* SEMANTICANALYZER::AstStatementParser::serializeProperty(AST::ASTTree::DSFIterator&, SEMANTICANALYZER::Property&) */ void __thiscall SEMANTICANALYZER::AstStatementParser::serializeProperty (AstStatementParser *this,DSFIterator *param_1,Property *param_2) { char cVar1; bool bVar2; string *psVar3; Property *pPVar4; DSFIterator *this_00; int8 local_d8; int8 uStack_d0; int8 local_c8; int8 uStack_c0; int8 local_b8; int8 uStack_b0; int8 local_a8; int8 uStack_a0; int8 local_98; int8 uStack_90; int8 local_88; int8 uStack_80; int8 local_78; int8 uStack_70; int8 local_68; int8 uStack_60; int8 local_58; int8 uStack_50; int8 local_48; int8 uStack_40; this_00 = (DSFIterator *)(this + 8); do { local_48 = 0; uStack_40 = 0; local_58 = 0; uStack_50 = 0; local_68 = 0; uStack_60 = 0; local_78 = 0; uStack_70 = 0; local_88 = 0; uStack_80 = 0; /* try { // try from 00118e30 to 00118f53 has its CatchHandler @ 00118f6b */ std::stack<AST::Node*,std::deque<AST::Node*,std::allocator<AST::Node*>>>:: stack<std::deque<AST::Node*,std::allocator<AST::Node*>>,void> ((stack<AST::Node*,std::deque<AST::Node*,std::allocator<AST::Node*>>> *)&local_88); cVar1 = AST::ASTTree::DSFIterator::operator!=(param_1,(DSFIterator *)&local_88); std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::~_Deque_base ((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_88); if (cVar1 == '\0') { return; } psVar3 = (string *)AST::ASTTree::DSFIterator::operator->(param_1); bVar2 = std::operator==(psVar3,"PROPERTY_KEY"); if (bVar2) { AST::ASTTree::DSFIterator::operator++(param_1); AST::ASTTree::DSFIterator::operator++(this_00); AST::ASTTree::DSFIterator::operator->(param_1); pPVar4 = param_2; LAB_00118ee2: std::__cxx11::string::_M_assign((string *)pPVar4); } else { psVar3 = (string *)AST::ASTTree::DSFIterator::operator->(param_1); bVar2 = std::operator==(psVar3,"TEXT"); if (bVar2) { LAB_00118ec5: AST::ASTTree::DSFIterator::operator++(param_1); AST::ASTTree::DSFIterator::operator++(this_00); AST::ASTTree::DSFIterator::operator->(param_1); pPVar4 = param_2 + 0x20; goto LAB_00118ee2; } psVar3 = (string *)AST::ASTTree::DSFIterator::operator->(param_1); bVar2 = std::operator==(psVar3,"NUMBER"); if (bVar2) goto LAB_00118ec5; } std::deque<AST::Node*,std::allocator<AST::Node*>>::deque ((deque<AST::Node*,std::allocator<AST::Node*>> *)&local_88,(deque *)param_1); AST::ASTTree::DSFIterator::operator++((DSFIterator *)&local_88); local_98 = 0; uStack_90 = 0; local_a8 = 0; uStack_a0 = 0; local_b8 = 0; uStack_b0 = 0; local_c8 = 0; uStack_c0 = 0; local_d8 = 0; uStack_d0 = 0; std::stack<AST::Node*,std::deque<AST::Node*,std::allocator<AST::Node*>>>:: stack<std::deque<AST::Node*,std::allocator<AST::Node*>>,void> ((stack<AST::Node*,std::deque<AST::Node*,std::allocator<AST::Node*>>> *)&local_d8); cVar1 = AST::ASTTree::DSFIterator::operator!=((DSFIterator *)&local_88,(DSFIterator *)&local_d8) ; std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::~_Deque_base ((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_d8); if (cVar1 != '\0') { AST::ASTTree::DSFIterator::operator++(this_00); } std::_Deque_base<AST::Node*,std::allocator<AST::Node*>>::~_Deque_base ((_Deque_base<AST::Node*,std::allocator<AST::Node*>> *)&local_88); AST::ASTTree::DSFIterator::operator++(param_1); } while( true ); }
16,661
translog_set_sent_to_disk
eloqsql/storage/maria/ma_loghandler.c
static void translog_set_sent_to_disk(struct st_translog_buffer *buffer) { LSN lsn= buffer->last_lsn; TRANSLOG_ADDRESS in_buffers= buffer->next_buffer_offset; DBUG_ENTER("translog_set_sent_to_disk"); mysql_mutex_lock(&log_descriptor.sent_to_disk_lock); DBUG_PRINT("enter", ("lsn: " LSN_FMT " in_buffers: " LSN_FMT " " "in_buffers_only: " LSN_FMT " start: " LSN_FMT " " "sent_to_disk: " LSN_FMT, LSN_IN_PARTS(lsn), LSN_IN_PARTS(in_buffers), LSN_IN_PARTS(log_descriptor.log_start), LSN_IN_PARTS(log_descriptor.in_buffers_only), LSN_IN_PARTS(log_descriptor.sent_to_disk))); /* We write sequentially (first part of following assert) but we rewrite the same page in case we started mysql and shut it down immediately (second part of the following assert) */ DBUG_ASSERT(cmp_translog_addr(lsn, log_descriptor.sent_to_disk) >= 0 || cmp_translog_addr(lsn, log_descriptor.log_start) < 0); log_descriptor.sent_to_disk= lsn; /* LSN_IMPOSSIBLE == 0 => it will work for very first time */ if (cmp_translog_addr(in_buffers, log_descriptor.in_buffers_only) > 0) { log_descriptor.in_buffers_only= in_buffers; DBUG_PRINT("info", ("set new in_buffers_only")); } mysql_mutex_unlock(&log_descriptor.sent_to_disk_lock); DBUG_VOID_RETURN; }
O0
c
translog_set_sent_to_disk: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq 0x100000(%rax), %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax movq 0x100018(%rax), %rax movq %rax, -0x18(%rbp) leaq 0x3f144f(%rip), %rdi # 0x488420 addq $0x800cc0, %rdi # imm = 0x800CC0 leaq 0xc64e4(%rip), %rsi # 0x15d4c3 movl $0x8e9, %edx # imm = 0x8E9 callq 0x89fb0 jmp 0x96feb jmp 0x96fed jmp 0x96fef movq -0x10(%rbp), %rax movq %rax, 0xbf20c6(%rip) # 0xc890c0 movq -0x18(%rbp), %rax subq 0xbf20d3(%rip), %rax # 0xc890d8 cmpq $0x0, %rax jle 0x9701a movq -0x18(%rbp), %rax movq %rax, 0xbf20c2(%rip) # 0xc890d8 jmp 0x97018 jmp 0x9701a leaq 0x3f13ff(%rip), %rdi # 0x488420 addq $0x800cc0, %rdi # imm = 0x800CC0 callq 0x8a020 jmp 0x9702f addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
translog_set_sent_to_disk: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rax, [rax+100000h] mov [rbp+var_10], rax mov rax, [rbp+var_8] mov rax, qword ptr ds:loc_100018[rax] mov [rbp+var_18], rax lea rdi, log_descriptor add rdi, 800CC0h lea rsi, aWorkspaceLlm4b_19; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 8E9h call inline_mysql_mutex_lock_11 jmp short $+2 loc_96FEB: jmp short $+2 loc_96FED: jmp short $+2 loc_96FEF: mov rax, [rbp+var_10] mov cs:qword_C890C0, rax mov rax, [rbp+var_18] sub rax, cs:qword_C890D8 cmp rax, 0 jle short loc_9701A mov rax, [rbp+var_18] mov cs:qword_C890D8, rax jmp short $+2 loc_97018: jmp short $+2 loc_9701A: lea rdi, log_descriptor add rdi, 800CC0h call inline_mysql_mutex_unlock_12 jmp short $+2 loc_9702F: add rsp, 20h pop rbp retn
long long translog_set_sent_to_disk(long long a1) { long long v2; // [rsp+8h] [rbp-18h] long long v3; // [rsp+10h] [rbp-10h] v3 = *(_QWORD *)(a1 + 0x100000); v2 = *(_QWORD *)((char *)&loc_100018 + a1); inline_mysql_mutex_lock_11( (long long)&log_descriptor[1048984], (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0x8E9u); qword_C890C0 = v3; if ( v2 - qword_C890D8 > 0 ) qword_C890D8 = v2; return inline_mysql_mutex_unlock_12((long long)&log_descriptor[1048984]); }
translog_set_sent_to_disk: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x100000] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x100018] MOV qword ptr [RBP + -0x18],RAX LEA RDI,[0x588420] ADD RDI,0x800cc0 LEA RSI,[0x25d4c3] MOV EDX,0x8e9 CALL 0x00189fb0 JMP 0x00196feb LAB_00196feb: JMP 0x00196fed LAB_00196fed: JMP 0x00196fef LAB_00196fef: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [0x00d890c0],RAX MOV RAX,qword ptr [RBP + -0x18] SUB RAX,qword ptr [0x00d890d8] CMP RAX,0x0 JLE 0x0019701a MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [0x00d890d8],RAX JMP 0x00197018 LAB_00197018: JMP 0x0019701a LAB_0019701a: LEA RDI,[0x588420] ADD RDI,0x800cc0 CALL 0x0018a020 JMP 0x0019702f LAB_0019702f: ADD RSP,0x20 POP RBP RET
void translog_set_sent_to_disk(long param_1) { int8 uVar1; long lVar2; uVar1 = *(int8 *)(param_1 + 0x100000); lVar2 = *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0xf); inline_mysql_mutex_lock (&DAT_00d890e0,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0x8e9); if (0 < lVar2 - DAT_00d890d8) { DAT_00d890d8 = lVar2; } DAT_00d890c0 = uVar1; inline_mysql_mutex_unlock(&DAT_00d890e0); return; }
16,662
stmt_cursor_fetch
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
static int stmt_cursor_fetch(MYSQL_STMT *stmt, uchar **row) { uchar buf[STMT_ID_LENGTH + 4]; MYSQL_DATA *result= &stmt->result; if (stmt->state < MYSQL_STMT_USE_OR_STORE_CALLED) { SET_CLIENT_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0); return(1); } /* do we have some prefetched rows available ? */ if (stmt->result_cursor) return(stmt_buffered_fetch(stmt, row)); if (stmt->upsert_status.server_status & SERVER_STATUS_LAST_ROW_SENT) stmt->upsert_status.server_status&= ~SERVER_STATUS_LAST_ROW_SENT; else { int4store(buf, stmt->stmt_id); int4store(buf + STMT_ID_LENGTH, stmt->prefetch_rows); if (stmt->mysql->methods->db_command(stmt->mysql, COM_STMT_FETCH, (char *)buf, sizeof(buf), 1, stmt)) { UPDATE_STMT_ERROR(stmt); return(1); } /* free previously allocated buffer */ ma_free_root(&result->alloc, MYF(MY_KEEP_PREALLOC)); result->data= 0; result->rows= 0; if (!stmt->mysql->options.extension->skip_read_response) { if (stmt->mysql->methods->db_stmt_read_all_rows(stmt)) return(1); return(stmt_buffered_fetch(stmt, row)); } } /* no more cursor data available */ *row= NULL; return(MYSQL_NO_DATA); }
O3
c
stmt_cursor_fetch: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x20(%rbp) cmpl $0x3, 0x50(%rdi) ja 0x22596 movl $0x7de, 0x108(%rbx) # imm = 0x7DE leaq 0x30d(%rbx), %rdi leaq 0x2c83f(%rip), %rax # 0x4ed90 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 xorl %r14d, %r14d movb %r14b, 0x312(%rbx) leaq 0x10c(%rbx), %rdi leaq 0x2c82a(%rip), %rax # 0x4eda0 movq 0x70(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x13220 movb %r14b, 0x30b(%rbx) movl $0x1, %r14d jmp 0x22688 movq %rsi, %r15 movq 0xe0(%rbx), %rax testq %rax, %rax je 0x225cc movl $0x5, 0x50(%rbx) movq 0x8(%rax), %rax movq %rax, (%r15) movq 0xe0(%rbx), %rax movq (%rax), %rax movq %rax, 0xe0(%rbx) xorl %r14d, %r14d jmp 0x22688 movl 0xf4(%rbx), %eax testb %al, %al js 0x22670 movl 0x40(%rbx), %eax leaq -0x28(%rbp), %rdx movl %eax, (%rdx) movl 0x318(%rbx), %eax movl %eax, 0x4(%rdx) movq 0x38(%rbx), %rdi movq 0x4d0(%rdi), %rax movl $0x1, %r14d movl $0x8, %ecx movl $0x1c, %esi movl $0x1, %r8d movq %rbx, %r9 callq *0x10(%rax) testl %eax, %eax je 0x226a5 movq 0x38(%rbx), %rsi movl 0x90(%rsi), %eax movl %eax, 0x108(%rbx) leaq 0x30d(%rbx), %rdi addq $0x297, %rsi # imm = 0x297 movl $0x5, %edx callq 0x13220 xorl %r15d, %r15d movb %r15b, 0x312(%rbx) leaq 0x10c(%rbx), %rdi movl $0x97, %esi addq 0x38(%rbx), %rsi movl $0x200, %edx # imm = 0x200 callq 0x13220 movb %r15b, 0x30b(%rbx) jmp 0x22688 andl $0xffffff7f, %eax # imm = 0xFFFFFF7F movl %eax, 0xf4(%rbx) movq $0x0, (%r15) movl $0x64, %r14d movq %fs:0x28, %rax cmpq -0x20(%rbp), %rax jne 0x2270e movl %r14d, %eax addq $0x18, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x90(%rbx), %rdi movl $0x1, %esi callq 0x21823 xorl %eax, %eax movq %rax, 0x80(%rbx) movq %rax, 0xc8(%rbx) movq 0x38(%rbx), %rax movq 0x480(%rax), %rcx cmpb $0x0, 0x148(%rcx) jne 0x2267b movq 0x4d0(%rax), %rax movq %rbx, %rdi callq *0x60(%rax) testl %eax, %eax jne 0x22688 movq 0xe0(%rbx), %rax testq %rax, %rax jne 0x225a5 movq $0x0, (%r15) movl $0x6, 0x50(%rbx) jmp 0x22682 callq 0x13500
stmt_cursor_fetch: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 18h mov rbx, rdi mov rax, fs:28h mov [rbp+var_20], rax cmp dword ptr [rdi+50h], 3 ja short loc_22596 mov dword ptr [rbx+108h], 7DEh lea rdi, [rbx+30Dh] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy xor r14d, r14d mov [rbx+312h], r14b lea rdi, [rbx+10Ch] lea rax, client_errors mov rsi, [rax+70h] mov edx, 200h call _strncpy mov [rbx+30Bh], r14b mov r14d, 1 jmp loc_22688 loc_22596: mov r15, rsi mov rax, [rbx+0E0h] test rax, rax jz short loc_225CC loc_225A5: mov dword ptr [rbx+50h], 5 mov rax, [rax+8] mov [r15], rax mov rax, [rbx+0E0h] mov rax, [rax] mov [rbx+0E0h], rax xor r14d, r14d jmp loc_22688 loc_225CC: mov eax, [rbx+0F4h] test al, al js loc_22670 mov eax, [rbx+40h] lea rdx, [rbp+var_28] mov [rdx], eax mov eax, [rbx+318h] mov [rdx+4], eax mov rdi, [rbx+38h] mov rax, [rdi+4D0h] mov r14d, 1 mov ecx, 8 mov esi, 1Ch mov r8d, 1 mov r9, rbx call qword ptr [rax+10h] test eax, eax jz loc_226A5 mov rsi, [rbx+38h] mov eax, [rsi+90h] mov [rbx+108h], eax lea rdi, [rbx+30Dh] add rsi, 297h mov edx, 5 call _strncpy xor r15d, r15d mov [rbx+312h], r15b lea rdi, [rbx+10Ch] mov esi, 97h add rsi, [rbx+38h] mov edx, 200h call _strncpy mov [rbx+30Bh], r15b jmp short loc_22688 loc_22670: and eax, 0FFFFFF7Fh mov [rbx+0F4h], eax loc_2267B: mov qword ptr [r15], 0 loc_22682: mov r14d, 64h ; 'd' loc_22688: mov rax, fs:28h cmp rax, [rbp+var_20] jnz short loc_2270E mov eax, r14d add rsp, 18h pop rbx pop r14 pop r15 pop rbp retn loc_226A5: lea rdi, [rbx+90h] mov esi, 1 call ma_free_root xor eax, eax mov [rbx+80h], rax mov [rbx+0C8h], rax mov rax, [rbx+38h] mov rcx, [rax+480h] cmp byte ptr [rcx+148h], 0 jnz short loc_2267B mov rax, [rax+4D0h] mov rdi, rbx call qword ptr [rax+60h] test eax, eax jnz short loc_22688 mov rax, [rbx+0E0h] test rax, rax jnz loc_225A5 mov qword ptr [r15], 0 mov dword ptr [rbx+50h], 6 jmp loc_22682 loc_2270E: call ___stack_chk_fail
long long stmt_cursor_fetch(long long a1, _QWORD *a2) { unsigned int v2; // r14d long long v3; // rax int v4; // eax long long v5; // rsi long long v7; // rax _DWORD v8[2]; // [rsp+8h] [rbp-28h] BYREF unsigned long long v9; // [rsp+10h] [rbp-20h] v9 = __readfsqword(0x28u); if ( *(_DWORD *)(a1 + 80) > 3u ) { v3 = *(_QWORD *)(a1 + 224); if ( v3 ) { LABEL_4: *(_DWORD *)(a1 + 80) = 5; *a2 = *(_QWORD *)(v3 + 8); *(_QWORD *)(a1 + 224) = **(_QWORD **)(a1 + 224); return 0; } v4 = *(_DWORD *)(a1 + 244); if ( (v4 & 0x80u) != 0 ) { *(_DWORD *)(a1 + 244) = v4 & 0xFFFFFF7F; } else { v8[0] = *(_DWORD *)(a1 + 64); v8[1] = *(_DWORD *)(a1 + 792); v2 = 1; if ( (*(unsigned int ( **)(_QWORD, long long, _DWORD *, long long, long long, long long))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL) + 16LL))( *(_QWORD *)(a1 + 56), 28LL, v8, 8LL, 1LL, a1) ) { v5 = *(_QWORD *)(a1 + 56); *(_DWORD *)(a1 + 264) = *(_DWORD *)(v5 + 144); strncpy(a1 + 781, v5 + 663, 5LL); *(_BYTE *)(a1 + 786) = 0; strncpy(a1 + 268, *(_QWORD *)(a1 + 56) + 151LL, 512LL); *(_BYTE *)(a1 + 779) = 0; return v2; } ma_free_root(a1 + 144, 1); *(_QWORD *)(a1 + 128) = 0LL; *(_QWORD *)(a1 + 200) = 0LL; v7 = *(_QWORD *)(a1 + 56); if ( !*(_BYTE *)(*(_QWORD *)(v7 + 1152) + 328LL) ) { if ( (*(unsigned int ( **)(long long))(*(_QWORD *)(v7 + 1232) + 96LL))(a1) ) return v2; v3 = *(_QWORD *)(a1 + 224); if ( v3 ) goto LABEL_4; *a2 = 0LL; *(_DWORD *)(a1 + 80) = 6; return 100; } } *a2 = 0LL; return 100; } *(_DWORD *)(a1 + 264) = 2014; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 786) = 0; strncpy(a1 + 268, client_errors[14], 512LL); *(_BYTE *)(a1 + 779) = 0; return 1; }
stmt_cursor_fetch: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x18 MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x20],RAX CMP dword ptr [RDI + 0x50],0x3 JA 0x00122596 MOV dword ptr [RBX + 0x108],0x7de LEA RDI,[RBX + 0x30d] LEA RAX,[0x14ed90] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 XOR R14D,R14D MOV byte ptr [RBX + 0x312],R14B LEA RDI,[RBX + 0x10c] LEA RAX,[0x14eda0] MOV RSI,qword ptr [RAX + 0x70] MOV EDX,0x200 CALL 0x00113220 MOV byte ptr [RBX + 0x30b],R14B MOV R14D,0x1 JMP 0x00122688 LAB_00122596: MOV R15,RSI MOV RAX,qword ptr [RBX + 0xe0] TEST RAX,RAX JZ 0x001225cc LAB_001225a5: MOV dword ptr [RBX + 0x50],0x5 MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [R15],RAX MOV RAX,qword ptr [RBX + 0xe0] MOV RAX,qword ptr [RAX] MOV qword ptr [RBX + 0xe0],RAX XOR R14D,R14D JMP 0x00122688 LAB_001225cc: MOV EAX,dword ptr [RBX + 0xf4] TEST AL,AL JS 0x00122670 MOV EAX,dword ptr [RBX + 0x40] LEA RDX,[RBP + -0x28] MOV dword ptr [RDX],EAX MOV EAX,dword ptr [RBX + 0x318] MOV dword ptr [RDX + 0x4],EAX MOV RDI,qword ptr [RBX + 0x38] MOV RAX,qword ptr [RDI + 0x4d0] MOV R14D,0x1 MOV ECX,0x8 MOV ESI,0x1c MOV R8D,0x1 MOV R9,RBX CALL qword ptr [RAX + 0x10] TEST EAX,EAX JZ 0x001226a5 MOV RSI,qword ptr [RBX + 0x38] MOV EAX,dword ptr [RSI + 0x90] MOV dword ptr [RBX + 0x108],EAX LEA RDI,[RBX + 0x30d] ADD RSI,0x297 MOV EDX,0x5 CALL 0x00113220 XOR R15D,R15D MOV byte ptr [RBX + 0x312],R15B LEA RDI,[RBX + 0x10c] MOV ESI,0x97 ADD RSI,qword ptr [RBX + 0x38] MOV EDX,0x200 CALL 0x00113220 MOV byte ptr [RBX + 0x30b],R15B JMP 0x00122688 LAB_00122670: AND EAX,0xffffff7f MOV dword ptr [RBX + 0xf4],EAX LAB_0012267b: MOV qword ptr [R15],0x0 LAB_00122682: MOV R14D,0x64 LAB_00122688: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x0012270e MOV EAX,R14D ADD RSP,0x18 POP RBX POP R14 POP R15 POP RBP RET LAB_001226a5: LEA RDI,[RBX + 0x90] MOV ESI,0x1 CALL 0x00121823 XOR EAX,EAX MOV qword ptr [RBX + 0x80],RAX MOV qword ptr [RBX + 0xc8],RAX MOV RAX,qword ptr [RBX + 0x38] MOV RCX,qword ptr [RAX + 0x480] CMP byte ptr [RCX + 0x148],0x0 JNZ 0x0012267b MOV RAX,qword ptr [RAX + 0x4d0] MOV RDI,RBX CALL qword ptr [RAX + 0x60] TEST EAX,EAX JNZ 0x00122688 MOV RAX,qword ptr [RBX + 0xe0] TEST RAX,RAX JNZ 0x001225a5 MOV qword ptr [R15],0x0 MOV dword ptr [RBX + 0x50],0x6 JMP 0x00122682 LAB_0012270e: CALL 0x00113500
int8 stmt_cursor_fetch(long param_1,int8 *param_2) { int iVar1; long lVar2; int8 uVar3; long in_FS_OFFSET; int4 local_30; int4 local_2c; long local_28; local_28 = *(long *)(in_FS_OFFSET + 0x28); if (*(uint *)(param_1 + 0x50) < 4) { *(int4 *)(param_1 + 0x108) = 0x7de; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; strncpy((char *)(param_1 + 0x10c),PTR_s_Commands_out_of_sync__you_can_t_r_0014ee10,0x200); *(int1 *)(param_1 + 0x30b) = 0; uVar3 = 1; goto LAB_00122688; } lVar2 = *(long *)(param_1 + 0xe0); if (lVar2 != 0) { LAB_001225a5: *(int4 *)(param_1 + 0x50) = 5; *param_2 = *(int8 *)(lVar2 + 8); *(int8 *)(param_1 + 0xe0) = **(int8 **)(param_1 + 0xe0); uVar3 = 0; goto LAB_00122688; } if ((char)*(uint *)(param_1 + 0xf4) < '\0') { *(uint *)(param_1 + 0xf4) = *(uint *)(param_1 + 0xf4) & 0xffffff7f; LAB_0012267b: *param_2 = 0; } else { local_30 = *(int4 *)(param_1 + 0x40); local_2c = *(int4 *)(param_1 + 0x318); uVar3 = 1; iVar1 = (**(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x10)) (*(long *)(param_1 + 0x38),0x1c,&local_30,8,1,param_1); if (iVar1 != 0) { *(int4 *)(param_1 + 0x108) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x90); strncpy((char *)(param_1 + 0x30d),(char *)(*(long *)(param_1 + 0x38) + 0x297),5); *(int1 *)(param_1 + 0x312) = 0; strncpy((char *)(param_1 + 0x10c),(char *)(*(long *)(param_1 + 0x38) + 0x97),0x200); *(int1 *)(param_1 + 0x30b) = 0; goto LAB_00122688; } ma_free_root(param_1 + 0x90,1); *(int8 *)(param_1 + 0x80) = 0; *(int8 *)(param_1 + 200) = 0; if (*(char *)(*(long *)(*(long *)(param_1 + 0x38) + 0x480) + 0x148) != '\0') goto LAB_0012267b; iVar1 = (**(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x60))(param_1); if (iVar1 != 0) goto LAB_00122688; lVar2 = *(long *)(param_1 + 0xe0); if (lVar2 != 0) goto LAB_001225a5; *param_2 = 0; *(int4 *)(param_1 + 0x50) = 6; } uVar3 = 100; LAB_00122688: if (*(long *)(in_FS_OFFSET + 0x28) == local_28) { return uVar3; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
16,663
unreg_request
eloqsql/storage/maria/ma_pagecache.c
static void unreg_request(PAGECACHE *pagecache, PAGECACHE_BLOCK_LINK *block, int at_end) { DBUG_ENTER("unreg_request"); DBUG_PRINT("enter", ("block %p (%u) status: %x requests: %u", block, PCBLOCK_NUMBER(pagecache, block), block->status, block->requests)); PCBLOCK_INFO(block); DBUG_ASSERT(block->requests > 0); if (! --block->requests) { my_bool hot; if (block->hits_left) block->hits_left--; hot= !block->hits_left && at_end && pagecache->warm_blocks > pagecache->min_warm_blocks; if (hot) { if (block->temperature == PCBLOCK_WARM) pagecache->warm_blocks--; block->temperature= PCBLOCK_HOT; KEYCACHE_DBUG_PRINT("unreg_request", ("#warm_blocks: %zu", pagecache->warm_blocks)); } link_block(pagecache, block, hot, (my_bool)at_end); block->last_hit_time= pagecache->time; pagecache->time++; block= pagecache->used_ins; /* Check if we should link a hot block to the warm block */ if (block && pagecache->time - block->last_hit_time > pagecache->age_threshold) { unlink_block(pagecache, block); link_block(pagecache, block, 0, 0); if (block->temperature != PCBLOCK_WARM) { pagecache->warm_blocks++; block->temperature= PCBLOCK_WARM; } KEYCACHE_DBUG_PRINT("unreg_request", ("#warm_blocks: %zu", pagecache->warm_blocks)); } } DBUG_VOID_RETURN; }
O0
c
unreg_request: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) jmp 0x2d415 jmp 0x2d417 jmp 0x2d419 jmp 0x2d41b jmp 0x2d41d movq -0x10(%rbp), %rcx movl 0x60(%rcx), %eax addl $-0x1, %eax movl %eax, 0x60(%rcx) cmpl $0x0, %eax jne 0x2d574 movq -0x10(%rbp), %rax cmpl $0x0, 0x80(%rax) je 0x2d453 movq -0x10(%rbp), %rax movl 0x80(%rax), %ecx addl $-0x1, %ecx movl %ecx, 0x80(%rax) movq -0x10(%rbp), %rcx xorl %eax, %eax cmpl $0x0, 0x80(%rcx) movb %al, -0x16(%rbp) jne 0x2d486 xorl %eax, %eax cmpl $0x0, -0x14(%rbp) movb %al, -0x16(%rbp) je 0x2d486 movq -0x8(%rbp), %rax movq 0x60(%rax), %rax movq -0x8(%rbp), %rcx cmpq 0x8(%rcx), %rax seta %al movb %al, -0x16(%rbp) movb -0x16(%rbp), %al andb $0x1, %al movzbl %al, %eax movb %al, -0x15(%rbp) cmpb $0x0, -0x15(%rbp) je 0x2d4c0 movq -0x10(%rbp), %rax cmpl $0x1, 0x78(%rax) jne 0x2d4b1 movq -0x8(%rbp), %rax movq 0x60(%rax), %rcx addq $-0x1, %rcx movq %rcx, 0x60(%rax) movq -0x10(%rbp), %rax movl $0x2, 0x78(%rax) jmp 0x2d4be jmp 0x2d4c0 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movb -0x15(%rbp), %cl movl -0x14(%rbp), %eax movsbl %cl, %edx movsbl %al, %ecx callq 0x31460 movq -0x8(%rbp), %rax movq 0x18(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x40(%rax) movq -0x8(%rbp), %rax movq 0x18(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x18(%rax) movq -0x8(%rbp), %rax movq 0xc0(%rax), %rax movq %rax, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) je 0x2d572 movq -0x8(%rbp), %rax movq 0x18(%rax), %rax movq -0x10(%rbp), %rcx subq 0x40(%rcx), %rax movq -0x8(%rbp), %rcx cmpq 0x10(%rcx), %rax jbe 0x2d572 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x30ea0 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi xorl %ecx, %ecx movl %ecx, %edx callq 0x31460 movq -0x10(%rbp), %rax cmpl $0x1, 0x78(%rax) je 0x2d56c movq -0x8(%rbp), %rax movq 0x60(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x60(%rax) movq -0x10(%rbp), %rax movl $0x1, 0x78(%rax) jmp 0x2d56e jmp 0x2d570 jmp 0x2d572 jmp 0x2d574 jmp 0x2d576 jmp 0x2d578 addq $0x20, %rsp popq %rbp retq nop
unreg_request: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx jmp short $+2 loc_2D415: jmp short $+2 loc_2D417: jmp short $+2 loc_2D419: jmp short $+2 loc_2D41B: jmp short $+2 loc_2D41D: mov rcx, [rbp+var_10] mov eax, [rcx+60h] add eax, 0FFFFFFFFh mov [rcx+60h], eax cmp eax, 0 jnz loc_2D574 mov rax, [rbp+var_10] cmp dword ptr [rax+80h], 0 jz short loc_2D453 mov rax, [rbp+var_10] mov ecx, [rax+80h] add ecx, 0FFFFFFFFh mov [rax+80h], ecx loc_2D453: mov rcx, [rbp+var_10] xor eax, eax cmp dword ptr [rcx+80h], 0 mov [rbp+var_16], al jnz short loc_2D486 xor eax, eax cmp [rbp+var_14], 0 mov [rbp+var_16], al jz short loc_2D486 mov rax, [rbp+var_8] mov rax, [rax+60h] mov rcx, [rbp+var_8] cmp rax, [rcx+8] setnbe al mov [rbp+var_16], al loc_2D486: mov al, [rbp+var_16] and al, 1 movzx eax, al mov [rbp+var_15], al cmp [rbp+var_15], 0 jz short loc_2D4C0 mov rax, [rbp+var_10] cmp dword ptr [rax+78h], 1 jnz short loc_2D4B1 mov rax, [rbp+var_8] mov rcx, [rax+60h] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax+60h], rcx loc_2D4B1: mov rax, [rbp+var_10] mov dword ptr [rax+78h], 2 jmp short $+2 loc_2D4BE: jmp short $+2 loc_2D4C0: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov cl, [rbp+var_15] mov eax, [rbp+var_14] movsx edx, cl movsx ecx, al call link_block mov rax, [rbp+var_8] mov rcx, [rax+18h] mov rax, [rbp+var_10] mov [rax+40h], rcx mov rax, [rbp+var_8] mov rcx, [rax+18h] add rcx, 1 mov [rax+18h], rcx mov rax, [rbp+var_8] mov rax, [rax+0C0h] mov [rbp+var_10], rax cmp [rbp+var_10], 0 jz short loc_2D572 mov rax, [rbp+var_8] mov rax, [rax+18h] mov rcx, [rbp+var_10] sub rax, [rcx+40h] mov rcx, [rbp+var_8] cmp rax, [rcx+10h] jbe short loc_2D572 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call unlink_block mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] xor ecx, ecx mov edx, ecx call link_block mov rax, [rbp+var_10] cmp dword ptr [rax+78h], 1 jz short loc_2D56C mov rax, [rbp+var_8] mov rcx, [rax+60h] add rcx, 1 mov [rax+60h], rcx mov rax, [rbp+var_10] mov dword ptr [rax+78h], 1 loc_2D56C: jmp short $+2 loc_2D56E: jmp short $+2 loc_2D570: jmp short $+2 loc_2D572: jmp short $+2 loc_2D574: jmp short $+2 loc_2D576: jmp short $+2 loc_2D578: add rsp, 20h pop rbp retn
unsigned long long unreg_request(_QWORD *a1, long long a2, int a3) { unsigned long long result; // rax bool v4; // [rsp+Ah] [rbp-16h] unsigned long long v5; // [rsp+10h] [rbp-10h] result = (unsigned int)(*(_DWORD *)(a2 + 96) - 1); *(_DWORD *)(a2 + 96) = result; if ( !(_DWORD)result ) { if ( *(_DWORD *)(a2 + 128) ) --*(_DWORD *)(a2 + 128); v4 = 0; if ( !*(_DWORD *)(a2 + 128) ) { v4 = 0; if ( a3 ) v4 = a1[12] > a1[1]; } if ( v4 ) { if ( *(_DWORD *)(a2 + 120) == 1 ) --a1[12]; *(_DWORD *)(a2 + 120) = 2; } link_block(a1, a2, v4, (unsigned int)(char)a3); *(_QWORD *)(a2 + 64) = a1[3]++; result = a1[24]; v5 = result; if ( result ) { result = a1[3] - *(_QWORD *)(result + 64); if ( result > a1[2] ) { unlink_block(a1, v5); link_block(a1, v5, 0LL, 0LL); result = v5; if ( *(_DWORD *)(v5 + 120) != 1 ) { ++a1[12]; result = v5; *(_DWORD *)(v5 + 120) = 1; } } } } return result; }
unreg_request: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX JMP 0x0012d415 LAB_0012d415: JMP 0x0012d417 LAB_0012d417: JMP 0x0012d419 LAB_0012d419: JMP 0x0012d41b LAB_0012d41b: JMP 0x0012d41d LAB_0012d41d: MOV RCX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RCX + 0x60] ADD EAX,-0x1 MOV dword ptr [RCX + 0x60],EAX CMP EAX,0x0 JNZ 0x0012d574 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x80],0x0 JZ 0x0012d453 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x80] ADD ECX,-0x1 MOV dword ptr [RAX + 0x80],ECX LAB_0012d453: MOV RCX,qword ptr [RBP + -0x10] XOR EAX,EAX CMP dword ptr [RCX + 0x80],0x0 MOV byte ptr [RBP + -0x16],AL JNZ 0x0012d486 XOR EAX,EAX CMP dword ptr [RBP + -0x14],0x0 MOV byte ptr [RBP + -0x16],AL JZ 0x0012d486 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x60] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x8] SETA AL MOV byte ptr [RBP + -0x16],AL LAB_0012d486: MOV AL,byte ptr [RBP + -0x16] AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x15],AL CMP byte ptr [RBP + -0x15],0x0 JZ 0x0012d4c0 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x78],0x1 JNZ 0x0012d4b1 MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x60] ADD RCX,-0x1 MOV qword ptr [RAX + 0x60],RCX LAB_0012d4b1: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x78],0x2 JMP 0x0012d4be LAB_0012d4be: JMP 0x0012d4c0 LAB_0012d4c0: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV CL,byte ptr [RBP + -0x15] MOV EAX,dword ptr [RBP + -0x14] MOVSX EDX,CL MOVSX ECX,AL CALL 0x00131460 MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x40],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x18] ADD RCX,0x1 MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0xc0] MOV qword ptr [RBP + -0x10],RAX CMP qword ptr [RBP + -0x10],0x0 JZ 0x0012d572 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RBP + -0x10] SUB RAX,qword ptr [RCX + 0x40] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x10] JBE 0x0012d572 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x00130ea0 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] XOR ECX,ECX MOV EDX,ECX CALL 0x00131460 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x78],0x1 JZ 0x0012d56c MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x60] ADD RCX,0x1 MOV qword ptr [RAX + 0x60],RCX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x78],0x1 LAB_0012d56c: JMP 0x0012d56e LAB_0012d56e: JMP 0x0012d570 LAB_0012d570: JMP 0x0012d572 LAB_0012d572: JMP 0x0012d574 LAB_0012d574: JMP 0x0012d576 LAB_0012d576: JMP 0x0012d578 LAB_0012d578: ADD RSP,0x20 POP RBP RET
void unreg_request(long param_1,long param_2,int param_3) { long lVar1; int iVar2; bool local_1e; iVar2 = *(int *)(param_2 + 0x60) + -1; *(int *)(param_2 + 0x60) = iVar2; if (iVar2 == 0) { if (*(int *)(param_2 + 0x80) != 0) { *(int *)(param_2 + 0x80) = *(int *)(param_2 + 0x80) + -1; } local_1e = false; if ((*(int *)(param_2 + 0x80) == 0) && (local_1e = false, param_3 != 0)) { local_1e = *(ulong *)(param_1 + 8) < *(ulong *)(param_1 + 0x60); } if (local_1e != false) { if (*(int *)(param_2 + 0x78) == 1) { *(long *)(param_1 + 0x60) = *(long *)(param_1 + 0x60) + -1; } *(int4 *)(param_2 + 0x78) = 2; } link_block(param_1,param_2,local_1e,(int)(char)param_3); *(int8 *)(param_2 + 0x40) = *(int8 *)(param_1 + 0x18); *(long *)(param_1 + 0x18) = *(long *)(param_1 + 0x18) + 1; lVar1 = *(long *)(param_1 + 0xc0); if ((lVar1 != 0) && (*(ulong *)(param_1 + 0x10) < (ulong)(*(long *)(param_1 + 0x18) - *(long *)(lVar1 + 0x40)))) { unlink_block(param_1,lVar1); link_block(param_1,lVar1,0); if (*(int *)(lVar1 + 0x78) != 1) { *(long *)(param_1 + 0x60) = *(long *)(param_1 + 0x60) + 1; *(int4 *)(lVar1 + 0x78) = 1; } } } return; }
16,664
my_uca_coll_init_utf8mb4
eloqsql/strings/ctype-uca.c
static my_bool my_uca_coll_init_utf8mb4(struct charset_info_st *cs, MY_CHARSET_LOADER *loader) { if (my_coll_init_uca(cs, loader)) return TRUE; if (my_uca_collation_can_optimize_no_contractions(cs)) my_uca_handler_map(cs, &my_uca_package_utf8mb4, &my_uca_package_no_contractions_utf8mb4); return FALSE; }
O0
c
my_uca_coll_init_utf8mb4: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0xab0c0 cmpb $0x0, %al je 0xad937 movb $0x1, -0x1(%rbp) jmp 0xad95f movq -0x10(%rbp), %rdi callq 0xb70b0 cmpb $0x0, %al je 0xad95b movq -0x10(%rbp), %rdi leaq 0x281c91(%rip), %rsi # 0x32f5e0 leaq 0x281caa(%rip), %rdx # 0x32f600 callq 0xb7110 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
my_uca_coll_init_utf8mb4: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call my_coll_init_uca cmp al, 0 jz short loc_AD937 mov [rbp+var_1], 1 jmp short loc_AD95F loc_AD937: mov rdi, [rbp+var_10] call my_uca_collation_can_optimize_no_contractions cmp al, 0 jz short loc_AD95B mov rdi, [rbp+var_10] lea rsi, my_uca_package_utf8mb4 lea rdx, my_uca_package_no_contractions_utf8mb4 call my_uca_handler_map loc_AD95B: mov [rbp+var_1], 0 loc_AD95F: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char my_uca_coll_init_utf8mb4(long long a1, long long a2) { if ( (unsigned __int8)my_coll_init_uca(a1, a2) ) return 1; if ( (unsigned __int8)my_uca_collation_can_optimize_no_contractions(a1) ) my_uca_handler_map(a1, my_uca_package_utf8mb4, my_uca_package_no_contractions_utf8mb4); return 0; }
my_uca_coll_init_utf8mb4: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x001ab0c0 CMP AL,0x0 JZ 0x001ad937 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001ad95f LAB_001ad937: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001b70b0 CMP AL,0x0 JZ 0x001ad95b MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x42f5e0] LEA RDX,[0x42f600] CALL 0x001b7110 LAB_001ad95b: MOV byte ptr [RBP + -0x1],0x0 LAB_001ad95f: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 my_uca_coll_init_utf8mb4(int8 param_1,int8 param_2) { char cVar1; int1 local_9; cVar1 = my_coll_init_uca(param_1,param_2); if (cVar1 == '\0') { cVar1 = my_uca_collation_can_optimize_no_contractions(param_1); if (cVar1 != '\0') { my_uca_handler_map(param_1,my_uca_package_utf8mb4,my_uca_package_no_contractions_utf8mb4); } local_9 = 0; } else { local_9 = 1; } return local_9; }
16,665
google::protobuf::compiler::java::RepeatedImmutableStringFieldLiteGenerator::GenerateBuilderMembers(google::protobuf::io::Printer*) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/string_field_lite.cc
void RepeatedImmutableStringFieldLiteGenerator::GenerateBuilderMembers( io::Printer* printer) const { WriteFieldAccessorDocComment(printer, descriptor_, LIST_GETTER); printer->Print(variables_, "@java.lang.Override\n" "$deprecation$public java.util.List<java.lang.String>\n" " ${$get$capitalized_name$List$}$() {\n" " return java.util.Collections.unmodifiableList(\n" " instance.get$capitalized_name$List());\n" "}\n"); printer->Annotate("{", "}", descriptor_); WriteFieldAccessorDocComment(printer, descriptor_, LIST_COUNT); printer->Print( variables_, "@java.lang.Override\n" "$deprecation$public int ${$get$capitalized_name$Count$}$() {\n" " return instance.get$capitalized_name$Count();\n" "}\n"); printer->Annotate("{", "}", descriptor_); WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_GETTER); printer->Print(variables_, "@java.lang.Override\n" "$deprecation$public java.lang.String " "${$get$capitalized_name$$}$(int index) {\n" " return instance.get$capitalized_name$(index);\n" "}\n"); printer->Annotate("{", "}", descriptor_); WriteFieldStringBytesAccessorDocComment(printer, descriptor_, LIST_INDEXED_GETTER); printer->Print(variables_, "@java.lang.Override\n" "$deprecation$public com.google.protobuf.ByteString\n" " ${$get$capitalized_name$Bytes$}$(int index) {\n" " return instance.get$capitalized_name$Bytes(index);\n" "}\n"); printer->Annotate("{", "}", descriptor_); WriteFieldAccessorDocComment(printer, descriptor_, LIST_INDEXED_SETTER, /* builder */ true); printer->Print(variables_, "$deprecation$public Builder ${$set$capitalized_name$$}$(\n" " int index, java.lang.String value) {\n" " copyOnWrite();\n" " instance.set$capitalized_name$(index, value);\n" " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); WriteFieldAccessorDocComment(printer, descriptor_, LIST_ADDER, /* builder */ true); printer->Print(variables_, "$deprecation$public Builder ${$add$capitalized_name$$}$(\n" " java.lang.String value) {\n" " copyOnWrite();\n" " instance.add$capitalized_name$(value);\n" " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); WriteFieldAccessorDocComment(printer, descriptor_, LIST_MULTI_ADDER, /* builder */ true); printer->Print(variables_, "$deprecation$public Builder ${$addAll$capitalized_name$$}$(\n" " java.lang.Iterable<java.lang.String> values) {\n" " copyOnWrite();\n" " instance.addAll$capitalized_name$(values);\n" " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); WriteFieldAccessorDocComment(printer, descriptor_, CLEARER, /* builder */ true); printer->Print( variables_, "$deprecation$public Builder ${$clear$capitalized_name$$}$() {\n" " copyOnWrite();\n" " instance.clear$capitalized_name$();\n" " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); WriteFieldStringBytesAccessorDocComment(printer, descriptor_, LIST_ADDER, /* builder */ true); printer->Print( variables_, "$deprecation$public Builder ${$add$capitalized_name$Bytes$}$(\n" " com.google.protobuf.ByteString value) {\n" " copyOnWrite();\n" " instance.add$capitalized_name$Bytes(value);\n" " return this;\n" "}\n"); printer->Annotate("{", "}", descriptor_); }
O3
cpp
google::protobuf::compiler::java::RepeatedImmutableStringFieldLiteGenerator::GenerateBuilderMembers(google::protobuf::io::Printer*) const: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 movq 0x8(%rdi), %rsi movq %rbx, %rdi movl $0x5, %edx xorl %ecx, %ecx callq 0xcff9a leaq 0x10(%r14), %r15 leaq 0xfa7c1(%rip), %rdx # 0x1e4eaa movq %rbx, %rdi movq %r15, %rsi callq 0x16cd32 movq 0x8(%r14), %rcx leaq 0x1059da(%rip), %r12 # 0x1f00d9 leaq 0xf5fc7(%rip), %r13 # 0x1e06cd movq %rbx, %rdi movq %r12, %rsi movq %r13, %rdx callq 0xafc7e movq 0x8(%r14), %rsi movq %rbx, %rdi movl $0x4, %edx xorl %ecx, %ecx callq 0xcff9a leaq 0xf6cb5(%rip), %rdx # 0x1e13e3 movq %rbx, %rdi movq %r15, %rsi callq 0x16cd32 movq 0x8(%r14), %rcx movq %rbx, %rdi movq %r12, %rsi movq %r13, %rdx callq 0xafc7e movq 0x8(%r14), %rsi movq %rbx, %rdi movl $0x6, %edx xorl %ecx, %ecx callq 0xcff9a leaq 0xfa817(%rip), %rdx # 0x1e4f7c movq %rbx, %rdi movq %r15, %rsi callq 0x16cd32 movq 0x8(%r14), %rcx movq %rbx, %rdi movq %r12, %rsi movq %r13, %rdx callq 0xafc7e movq 0x8(%r14), %rsi movq %rbx, %rdi movl $0x6, %edx xorl %ecx, %ecx callq 0xd033e leaq 0xfa875(%rip), %rdx # 0x1e5011 movq %rbx, %rdi movq %r15, %rsi callq 0x16cd32 movq 0x8(%r14), %rcx movq %rbx, %rdi movq %r12, %rsi movq %r13, %rdx callq 0xafc7e movq 0x8(%r14), %rsi movq %rbx, %rdi movl $0x7, %edx movl $0x1, %ecx callq 0xcff9a leaq 0xfa8ec(%rip), %rdx # 0x1e50c2 movq %rbx, %rdi movq %r15, %rsi callq 0x16cd32 movq 0x8(%r14), %rcx movq %rbx, %rdi movq %r12, %rsi movq %r13, %rdx callq 0xafc7e movq 0x8(%r14), %rsi movq %rbx, %rdi movl $0x8, %edx movl $0x1, %ecx callq 0xcff9a leaq 0xfa967(%rip), %rdx # 0x1e5177 movq %rbx, %rdi movq %r15, %rsi callq 0x16cd32 movq 0x8(%r14), %rcx movq %rbx, %rdi movq %r12, %rsi movq %r13, %rdx callq 0xafc7e movq 0x8(%r14), %rsi movq %rbx, %rdi movl $0x9, %edx movl $0x1, %ecx callq 0xcff9a leaq 0xfa9d0(%rip), %rdx # 0x1e521a movq %rbx, %rdi movq %r15, %rsi callq 0x16cd32 movq 0x8(%r14), %rcx movq %rbx, %rdi movq %r12, %rsi movq %r13, %rdx callq 0xafc7e movq 0x8(%r14), %rsi movq %rbx, %rdi movl $0x3, %edx movl $0x1, %ecx callq 0xcff9a leaq 0xf35b9(%rip), %rdx # 0x1dde3d movq %rbx, %rdi movq %r15, %rsi callq 0x16cd32 movq 0x8(%r14), %rcx movq %rbx, %rdi movq %r12, %rsi movq %r13, %rdx callq 0xafc7e movq 0x8(%r14), %rsi movq %rbx, %rdi movl $0x8, %edx movl $0x1, %ecx callq 0xd033e leaq 0xfaa1b(%rip), %rdx # 0x1e52d9 movq %rbx, %rdi movq %r15, %rsi callq 0x16cd32 movq 0x8(%r14), %rcx movq %rbx, %rdi movq %r12, %rsi movq %r13, %rdx popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 jmp 0xafc7e
_ZNK6google8protobuf8compiler4java41RepeatedImmutableStringFieldLiteGenerator22GenerateBuilderMembersEPNS0_2io7PrinterE: push r15; int push r14; int push r13; char push r12; int push rbx; void * mov rbx, rsi mov r14, rdi mov rsi, [rdi+8]; google::protobuf::FieldDescriptor * mov rdi, rbx; this mov edx, 5 xor ecx, ecx call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool) lea r15, [r14+10h] lea rdx, aJavaLangOverri_96; "@java.lang.Override\n$deprecation$publi"... mov rdi, rbx; this mov rsi, r15 call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rcx, [r14+8] lea r12, a0oneof1+0Bh; "{" lea r13, aKotlinJvmJvmsy_32+0E3h; "}" mov rdi, rbx mov rsi, r12 mov rdx, r13 call _ZN6google8protobuf2io7Printer8AnnotateINS0_15FieldDescriptorEEEvPKcS6_PKT_; google::protobuf::io::Printer::Annotate<google::protobuf::FieldDescriptor>(char const*,char const*,google::protobuf::FieldDescriptor const*) mov rsi, [r14+8]; google::protobuf::FieldDescriptor * mov rdi, rbx; this mov edx, 4 xor ecx, ecx call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool) lea rdx, aJavaLangOverri_82; "@java.lang.Override\n$deprecation$publi"... mov rdi, rbx; this mov rsi, r15 call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rcx, [r14+8] mov rdi, rbx mov rsi, r12 mov rdx, r13 call _ZN6google8protobuf2io7Printer8AnnotateINS0_15FieldDescriptorEEEvPKcS6_PKT_; google::protobuf::io::Printer::Annotate<google::protobuf::FieldDescriptor>(char const*,char const*,google::protobuf::FieldDescriptor const*) mov rsi, [r14+8]; google::protobuf::FieldDescriptor * mov rdi, rbx; this mov edx, 6 xor ecx, ecx call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool) lea rdx, aJavaLangOverri_97; "@java.lang.Override\n$deprecation$publi"... mov rdi, rbx; this mov rsi, r15 call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rcx, [r14+8] mov rdi, rbx mov rsi, r12 mov rdx, r13 call _ZN6google8protobuf2io7Printer8AnnotateINS0_15FieldDescriptorEEEvPKcS6_PKT_; google::protobuf::io::Printer::Annotate<google::protobuf::FieldDescriptor>(char const*,char const*,google::protobuf::FieldDescriptor const*) mov rsi, [r14+8]; google::protobuf::FieldDescriptor * mov rdi, rbx; this mov edx, 6 xor ecx, ecx call _ZN6google8protobuf8compiler4java39WriteFieldStringBytesAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldStringBytesAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool) lea rdx, aJavaLangOverri_98; "@java.lang.Override\n$deprecation$publi"... mov rdi, rbx; this mov rsi, r15 call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rcx, [r14+8] mov rdi, rbx mov rsi, r12 mov rdx, r13 call _ZN6google8protobuf2io7Printer8AnnotateINS0_15FieldDescriptorEEEvPKcS6_PKT_; google::protobuf::io::Printer::Annotate<google::protobuf::FieldDescriptor>(char const*,char const*,google::protobuf::FieldDescriptor const*) mov rsi, [r14+8]; google::protobuf::FieldDescriptor * mov rdi, rbx; this mov edx, 7 mov ecx, 1 call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool) lea rdx, aDeprecationPub_85; "$deprecation$public Builder ${$set$capi"... mov rdi, rbx; this mov rsi, r15 call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rcx, [r14+8] mov rdi, rbx mov rsi, r12 mov rdx, r13 call _ZN6google8protobuf2io7Printer8AnnotateINS0_15FieldDescriptorEEEvPKcS6_PKT_; google::protobuf::io::Printer::Annotate<google::protobuf::FieldDescriptor>(char const*,char const*,google::protobuf::FieldDescriptor const*) mov rsi, [r14+8]; google::protobuf::FieldDescriptor * mov rdi, rbx; this mov edx, 8 mov ecx, 1 call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool) lea rdx, aDeprecationPub_94; "$deprecation$public Builder ${$add$capi"... mov rdi, rbx; this mov rsi, r15 call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rcx, [r14+8] mov rdi, rbx mov rsi, r12 mov rdx, r13 call _ZN6google8protobuf2io7Printer8AnnotateINS0_15FieldDescriptorEEEvPKcS6_PKT_; google::protobuf::io::Printer::Annotate<google::protobuf::FieldDescriptor>(char const*,char const*,google::protobuf::FieldDescriptor const*) mov rsi, [r14+8]; google::protobuf::FieldDescriptor * mov rdi, rbx; this mov edx, 9 mov ecx, 1 call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool) lea rdx, aDeprecationPub_95; "$deprecation$public Builder ${$addAll$c"... mov rdi, rbx; this mov rsi, r15 call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rcx, [r14+8] mov rdi, rbx mov rsi, r12 mov rdx, r13 call _ZN6google8protobuf2io7Printer8AnnotateINS0_15FieldDescriptorEEEvPKcS6_PKT_; google::protobuf::io::Printer::Annotate<google::protobuf::FieldDescriptor>(char const*,char const*,google::protobuf::FieldDescriptor const*) mov rsi, [r14+8]; google::protobuf::FieldDescriptor * mov rdi, rbx; this mov edx, 3 mov ecx, 1 call _ZN6google8protobuf8compiler4java28WriteFieldAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool) lea rdx, aDeprecationPub_58; "$deprecation$public Builder ${$clear$ca"... mov rdi, rbx; this mov rsi, r15 call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rcx, [r14+8] mov rdi, rbx mov rsi, r12 mov rdx, r13 call _ZN6google8protobuf2io7Printer8AnnotateINS0_15FieldDescriptorEEEvPKcS6_PKT_; google::protobuf::io::Printer::Annotate<google::protobuf::FieldDescriptor>(char const*,char const*,google::protobuf::FieldDescriptor const*) mov rsi, [r14+8]; google::protobuf::FieldDescriptor * mov rdi, rbx; this mov edx, 8 mov ecx, 1 call _ZN6google8protobuf8compiler4java39WriteFieldStringBytesAccessorDocCommentEPNS0_2io7PrinterEPKNS0_15FieldDescriptorENS2_17FieldAccessorTypeEb; google::protobuf::compiler::java::WriteFieldStringBytesAccessorDocComment(google::protobuf::io::Printer *,google::protobuf::FieldDescriptor const*,google::protobuf::compiler::java::FieldAccessorType,bool) lea rdx, aDeprecationPub_96; "$deprecation$public Builder ${$add$capi"... mov rdi, rbx; this mov rsi, r15 call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*) mov rcx, [r14+8] mov rdi, rbx mov rsi, r12 mov rdx, r13 pop rbx pop r12 pop r13 pop r14 pop r15 jmp _ZN6google8protobuf2io7Printer8AnnotateINS0_15FieldDescriptorEEEvPKcS6_PKT_; google::protobuf::io::Printer::Annotate<google::protobuf::FieldDescriptor>(char const*,char const*,google::protobuf::FieldDescriptor const*)
GenerateBuilderMembers: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV RBX,RSI MOV R14,RDI MOV RSI,qword ptr [RDI + 0x8] MOV RDI,RBX MOV EDX,0x5 XOR ECX,ECX CALL 0x001cff9a LEA R15,[R14 + 0x10] LEA RDX,[0x2e4eaa] MOV RDI,RBX MOV RSI,R15 CALL 0x0026cd32 MOV RCX,qword ptr [R14 + 0x8] LEA R12,[0x2f00d9] LEA R13,[0x2e06cd] MOV RDI,RBX MOV RSI,R12 MOV RDX,R13 CALL 0x001afc7e MOV RSI,qword ptr [R14 + 0x8] MOV RDI,RBX MOV EDX,0x4 XOR ECX,ECX CALL 0x001cff9a LEA RDX,[0x2e13e3] MOV RDI,RBX MOV RSI,R15 CALL 0x0026cd32 MOV RCX,qword ptr [R14 + 0x8] MOV RDI,RBX MOV RSI,R12 MOV RDX,R13 CALL 0x001afc7e MOV RSI,qword ptr [R14 + 0x8] MOV RDI,RBX MOV EDX,0x6 XOR ECX,ECX CALL 0x001cff9a LEA RDX,[0x2e4f7c] MOV RDI,RBX MOV RSI,R15 CALL 0x0026cd32 MOV RCX,qword ptr [R14 + 0x8] MOV RDI,RBX MOV RSI,R12 MOV RDX,R13 CALL 0x001afc7e MOV RSI,qword ptr [R14 + 0x8] MOV RDI,RBX MOV EDX,0x6 XOR ECX,ECX CALL 0x001d033e LEA RDX,[0x2e5011] MOV RDI,RBX MOV RSI,R15 CALL 0x0026cd32 MOV RCX,qword ptr [R14 + 0x8] MOV RDI,RBX MOV RSI,R12 MOV RDX,R13 CALL 0x001afc7e MOV RSI,qword ptr [R14 + 0x8] MOV RDI,RBX MOV EDX,0x7 MOV ECX,0x1 CALL 0x001cff9a LEA RDX,[0x2e50c2] MOV RDI,RBX MOV RSI,R15 CALL 0x0026cd32 MOV RCX,qword ptr [R14 + 0x8] MOV RDI,RBX MOV RSI,R12 MOV RDX,R13 CALL 0x001afc7e MOV RSI,qword ptr [R14 + 0x8] MOV RDI,RBX MOV EDX,0x8 MOV ECX,0x1 CALL 0x001cff9a LEA RDX,[0x2e5177] MOV RDI,RBX MOV RSI,R15 CALL 0x0026cd32 MOV RCX,qword ptr [R14 + 0x8] MOV RDI,RBX MOV RSI,R12 MOV RDX,R13 CALL 0x001afc7e MOV RSI,qword ptr [R14 + 0x8] MOV RDI,RBX MOV EDX,0x9 MOV ECX,0x1 CALL 0x001cff9a LEA RDX,[0x2e521a] MOV RDI,RBX MOV RSI,R15 CALL 0x0026cd32 MOV RCX,qword ptr [R14 + 0x8] MOV RDI,RBX MOV RSI,R12 MOV RDX,R13 CALL 0x001afc7e MOV RSI,qword ptr [R14 + 0x8] MOV RDI,RBX MOV EDX,0x3 MOV ECX,0x1 CALL 0x001cff9a LEA RDX,[0x2dde3d] MOV RDI,RBX MOV RSI,R15 CALL 0x0026cd32 MOV RCX,qword ptr [R14 + 0x8] MOV RDI,RBX MOV RSI,R12 MOV RDX,R13 CALL 0x001afc7e MOV RSI,qword ptr [R14 + 0x8] MOV RDI,RBX MOV EDX,0x8 MOV ECX,0x1 CALL 0x001d033e LEA RDX,[0x2e52d9] MOV RDI,RBX MOV RSI,R15 CALL 0x0026cd32 MOV RCX,qword ptr [R14 + 0x8] MOV RDI,RBX MOV RSI,R12 MOV RDX,R13 POP RBX POP R12 POP R13 POP R14 POP R15 JMP 0x001afc7e
/* google::protobuf::compiler::java::RepeatedImmutableStringFieldLiteGenerator::GenerateBuilderMembers(google::protobuf::io::Printer*) const */ void __thiscall google::protobuf::compiler::java::RepeatedImmutableStringFieldLiteGenerator::GenerateBuilderMembers (RepeatedImmutableStringFieldLiteGenerator *this,Printer *param_1) { map *pmVar1; WriteFieldAccessorDocComment(param_1,*(int8 *)(this + 8),5,0); pmVar1 = (map *)(this + 0x10); io::Printer::Print(param_1,pmVar1, "@java.lang.Override\n$deprecation$public java.util.List<java.lang.String>\n ${$get$capitalized_name$List$}$() {\n return java.util.Collections.unmodifiableList(\n instance.get$capitalized_name$List());\n}\n" ); io::Printer::Annotate<google::protobuf::FieldDescriptor> (param_1,"{","}",*(FieldDescriptor **)(this + 8)); WriteFieldAccessorDocComment(param_1,*(int8 *)(this + 8),4,0); io::Printer::Print(param_1,pmVar1, "@java.lang.Override\n$deprecation$public int ${$get$capitalized_name$Count$}$() {\n return instance.get$capitalized_name$Count();\n}\n" ); io::Printer::Annotate<google::protobuf::FieldDescriptor> (param_1,"{","}",*(FieldDescriptor **)(this + 8)); WriteFieldAccessorDocComment(param_1,*(int8 *)(this + 8),6,0); io::Printer::Print(param_1,pmVar1, "@java.lang.Override\n$deprecation$public java.lang.String ${$get$capitalized_name$$}$(int index) {\n return instance.get$capitalized_name$(index);\n}\n" ); io::Printer::Annotate<google::protobuf::FieldDescriptor> (param_1,"{","}",*(FieldDescriptor **)(this + 8)); WriteFieldStringBytesAccessorDocComment(param_1,*(int8 *)(this + 8),6,0); io::Printer::Print(param_1,pmVar1, "@java.lang.Override\n$deprecation$public com.google.protobuf.ByteString\n ${$get$capitalized_name$Bytes$}$(int index) {\n return instance.get$capitalized_name$Bytes(index);\n}\n" ); io::Printer::Annotate<google::protobuf::FieldDescriptor> (param_1,"{","}",*(FieldDescriptor **)(this + 8)); WriteFieldAccessorDocComment(param_1,*(int8 *)(this + 8),7,1); io::Printer::Print(param_1,pmVar1, "$deprecation$public Builder ${$set$capitalized_name$$}$(\n int index, java.lang.String value) {\n copyOnWrite();\n instance.set$capitalized_name$(index, value);\n return this;\n}\n" ); io::Printer::Annotate<google::protobuf::FieldDescriptor> (param_1,"{","}",*(FieldDescriptor **)(this + 8)); WriteFieldAccessorDocComment(param_1,*(int8 *)(this + 8),8,1); io::Printer::Print(param_1,pmVar1, "$deprecation$public Builder ${$add$capitalized_name$$}$(\n java.lang.String value) {\n copyOnWrite();\n instance.add$capitalized_name$(value);\n return this;\n}\n" ); io::Printer::Annotate<google::protobuf::FieldDescriptor> (param_1,"{","}",*(FieldDescriptor **)(this + 8)); WriteFieldAccessorDocComment(param_1,*(int8 *)(this + 8),9,1); io::Printer::Print(param_1,pmVar1, "$deprecation$public Builder ${$addAll$capitalized_name$$}$(\n java.lang.Iterable<java.lang.String> values) {\n copyOnWrite();\n instance.addAll$capitalized_name$(values);\n return this;\n}\n" ); io::Printer::Annotate<google::protobuf::FieldDescriptor> (param_1,"{","}",*(FieldDescriptor **)(this + 8)); WriteFieldAccessorDocComment(param_1,*(int8 *)(this + 8),3,1); io::Printer::Print(param_1,pmVar1, "$deprecation$public Builder ${$clear$capitalized_name$$}$() {\n copyOnWrite();\n instance.clear$capitalized_name$();\n return this;\n}\n" ); io::Printer::Annotate<google::protobuf::FieldDescriptor> (param_1,"{","}",*(FieldDescriptor **)(this + 8)); WriteFieldStringBytesAccessorDocComment(param_1,*(int8 *)(this + 8),8,1); io::Printer::Print(param_1,pmVar1, "$deprecation$public Builder ${$add$capitalized_name$Bytes$}$(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.add$capitalized_name$Bytes(value);\n return this;\n}\n" ); io::Printer::Annotate<google::protobuf::FieldDescriptor> (param_1,"{","}",*(FieldDescriptor **)(this + 8)); return; }
16,666
update_backward_delete_link
eloqsql/storage/myisam/mi_dynrec.c
static int update_backward_delete_link(MI_INFO *info, my_off_t delete_block, my_off_t filepos) { MI_BLOCK_INFO block_info; DBUG_ENTER("update_backward_delete_link"); if (delete_block != HA_OFFSET_ERROR) { block_info.second_read=0; if (_mi_get_block_info(&block_info,info->dfile,delete_block) & BLOCK_DELETED) { uchar buff[8]; mi_sizestore(buff,filepos); if (info->s->file_write(info,buff, 8, delete_block+12, MYF(MY_NABP))) DBUG_RETURN(1); /* Error on write */ } else { my_errno=HA_ERR_WRONG_IN_RECORD; DBUG_RETURN(1); /* Wrong delete link */ } } DBUG_RETURN(0); }
O3
c
update_backward_delete_link: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x68, %rsp movq %fs:0x28, %rax movq %rax, -0x20(%rbp) cmpq $-0x1, %rsi je 0x782d8 movq %rdx, %r15 movq %rsi, %rbx movq %rdi, %r14 leaq -0x78(%rbp), %rdi movl $0x0, 0x50(%rdi) movl 0x1c0(%r14), %esi movq %rbx, %rdx callq 0x77d43 testb $0x4, %al jne 0x782a3 callq 0xa13e6 movl $0x7f, (%rax) movl $0x1, %eax jmp 0x782da bswapq %r15 leaq -0x80(%rbp), %rsi movq %r15, (%rsi) movq (%r14), %rax addq $0xc, %rbx movl $0x8, %edx movl $0x4, %r8d movq %r14, %rdi movq %rbx, %rcx callq *0x2e8(%rax) movq %rax, %rcx movl $0x1, %eax testq %rcx, %rcx jne 0x782da xorl %eax, %eax movq %fs:0x28, %rcx cmpq -0x20(%rbp), %rcx jne 0x782f4 addq $0x68, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x29260
update_backward_delete_link_0: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 68h mov rax, fs:28h mov [rbp+var_20], rax cmp rsi, 0FFFFFFFFFFFFFFFFh jz short loc_782D8 mov r15, rdx mov rbx, rsi mov r14, rdi lea rdi, [rbp+var_78] mov dword ptr [rdi+50h], 0 mov esi, [r14+1C0h] mov rdx, rbx call _mi_get_block_info test al, 4 jnz short loc_782A3 call _my_thread_var mov dword ptr [rax], 7Fh mov eax, 1 jmp short loc_782DA loc_782A3: bswap r15 lea rsi, [rbp+var_80] mov [rsi], r15 mov rax, [r14] add rbx, 0Ch mov edx, 8 mov r8d, 4 mov rdi, r14 mov rcx, rbx call qword ptr [rax+2E8h] mov rcx, rax mov eax, 1 test rcx, rcx jnz short loc_782DA loc_782D8: xor eax, eax loc_782DA: mov rcx, fs:28h cmp rcx, [rbp+var_20] jnz short loc_782F4 add rsp, 68h pop rbx pop r14 pop r15 pop rbp retn loc_782F4: call ___stack_chk_fail
long long update_backward_delete_link_0(unsigned int *a1, long long a2, unsigned long long a3) { long long result; // rax long long v5; // rcx unsigned long long v6; // [rsp+0h] [rbp-80h] BYREF _BYTE v7[80]; // [rsp+8h] [rbp-78h] BYREF int v8; // [rsp+58h] [rbp-28h] unsigned long long v9; // [rsp+60h] [rbp-20h] v9 = __readfsqword(0x28u); if ( a2 == -1 ) return 0LL; v8 = 0; if ( (mi_get_block_info((long long)v7, a1[112], a2) & 4) == 0 ) { *(_DWORD *)my_thread_var(v7) = 127; return 1LL; } v6 = _byteswap_uint64(a3); v5 = (*(long long ( **)(unsigned int *, unsigned long long *, long long, long long, long long))(*(_QWORD *)a1 + 744LL))( a1, &v6, 8LL, a2 + 12, 4LL); result = 1LL; if ( !v5 ) return 0LL; return result; }
update_backward_delete_link: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x68 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x20],RAX CMP RSI,-0x1 JZ 0x001782d8 MOV R15,RDX MOV RBX,RSI MOV R14,RDI LEA RDI,[RBP + -0x78] MOV dword ptr [RDI + 0x50],0x0 MOV ESI,dword ptr [R14 + 0x1c0] MOV RDX,RBX CALL 0x00177d43 TEST AL,0x4 JNZ 0x001782a3 CALL 0x001a13e6 MOV dword ptr [RAX],0x7f MOV EAX,0x1 JMP 0x001782da LAB_001782a3: BSWAP R15 LEA RSI,[RBP + -0x80] MOV qword ptr [RSI],R15 MOV RAX,qword ptr [R14] ADD RBX,0xc MOV EDX,0x8 MOV R8D,0x4 MOV RDI,R14 MOV RCX,RBX CALL qword ptr [RAX + 0x2e8] MOV RCX,RAX MOV EAX,0x1 TEST RCX,RCX JNZ 0x001782da LAB_001782d8: XOR EAX,EAX LAB_001782da: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x20] JNZ 0x001782f4 ADD RSP,0x68 POP RBX POP R14 POP R15 POP RBP RET LAB_001782f4: CALL 0x00129260
int8 update_backward_delete_link(long *param_1,long param_2,ulong param_3) { ulong uVar1; int4 *puVar2; int8 uVar3; long lVar4; long in_FS_OFFSET; ulong local_88; int1 local_80 [80]; int4 local_30; long local_28; local_28 = *(long *)(in_FS_OFFSET + 0x28); if (param_2 != -1) { local_30 = 0; uVar1 = _mi_get_block_info(local_80,(int)param_1[0x38],param_2); if ((uVar1 & 4) == 0) { puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x7f; uVar3 = 1; goto LAB_001782da; } local_88 = param_3 >> 0x38 | (param_3 & 0xff000000000000) >> 0x28 | (param_3 & 0xff0000000000) >> 0x18 | (param_3 & 0xff00000000) >> 8 | (param_3 & 0xff000000) << 8 | (param_3 & 0xff0000) << 0x18 | (param_3 & 0xff00) << 0x28 | param_3 << 0x38; lVar4 = (**(code **)(*param_1 + 0x2e8))(param_1,&local_88,8,param_2 + 0xc,4); uVar3 = 1; if (lVar4 != 0) goto LAB_001782da; } uVar3 = 0; LAB_001782da: if (*(long *)(in_FS_OFFSET + 0x28) == local_28) { return uVar3; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
16,667
mi_kpointer
eloqsql/storage/myisam/mi_search.c
void _mi_kpointer(register MI_INFO *info, register uchar *buff, my_off_t pos) { pos/=MI_MIN_KEY_BLOCK_LENGTH; switch (info->s->base.key_reflength) { #if SIZEOF_OFF_T > 4 case 7: mi_int7store(buff,pos); break; case 6: mi_int6store(buff,pos); break; case 5: mi_int5store(buff,pos); break; #else 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 1: buff[0]= (uchar) pos; break; default: abort(); /* impossible */ } }
O0
c
mi_kpointer: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x18(%rbp), %rax shrq $0xa, %rax movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movl 0x17c(%rax), %eax decl %eax movl %eax, %ecx movq %rcx, -0x68(%rbp) subl $0x6, %eax ja 0x4a196 movq -0x68(%rbp), %rax leaq 0x94553(%rip), %rcx # 0xde4cc 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 -0x20(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x6(%rax) movq -0x20(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x5(%rax) movq -0x20(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x4(%rax) movq -0x20(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x3(%rax) movq -0x28(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x28(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x28(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0x4a19b movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x18(%rbp), %rax shrq $0x20, %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x5(%rax) movq -0x30(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x4(%rax) movq -0x30(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x3(%rax) movq -0x30(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x38(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x38(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0x4a19b 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, 0x4(%rax) movq -0x40(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x3(%rax) movq -0x40(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x40(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x48(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0x4a19b movq -0x18(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x3(%rax) movq -0x50(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x50(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x50(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0x4a19b movq -0x18(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x58(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x58(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0x4a19b movq -0x18(%rbp), %rax movl %eax, -0x5c(%rbp) movl -0x5c(%rbp), %eax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movl -0x5c(%rbp), %eax shrl $0x8, %eax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0x4a19b movq -0x18(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0x4a19b callq 0x281d0 addq $0x70, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_mi_kpointer: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_18] shr rax, 0Ah mov [rbp+var_18], rax mov rax, [rbp+var_8] mov rax, [rax] mov eax, [rax+17Ch] dec eax; switch 7 cases mov ecx, eax mov [rbp+var_68], rcx sub eax, 6 ja def_49F80; jumptable 0000000000049F80 default case mov rax, [rbp+var_68] lea rcx, jpt_49F80 movsxd rax, ds:(jpt_49F80 - 0DE4CCh)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_49F82: mov rax, [rbp+var_18]; jumptable 0000000000049F80 case 7 mov [rbp+var_20], rax mov rax, [rbp+var_18] shr rax, 20h mov [rbp+var_28], rax mov rax, [rbp+var_20] mov cl, al mov rax, [rbp+var_10] mov [rax+6], cl mov rax, [rbp+var_20] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+5], cl mov rax, [rbp+var_20] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+4], cl mov rax, [rbp+var_20] shr rax, 18h mov cl, al mov rax, [rbp+var_10] mov [rax+3], cl mov rax, [rbp+var_28] mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_28] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_28] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp loc_4A19B loc_4A009: mov rax, [rbp+var_18]; jumptable 0000000000049F80 case 6 mov [rbp+var_30], rax mov rax, [rbp+var_18] shr rax, 20h mov [rbp+var_38], rax mov rax, [rbp+var_30] mov cl, al mov rax, [rbp+var_10] mov [rax+5], cl mov rax, [rbp+var_30] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+4], cl mov rax, [rbp+var_30] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+3], cl mov rax, [rbp+var_30] shr rax, 18h mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_38] mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_38] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp loc_4A19B loc_4A07F: mov rax, [rbp+var_18]; jumptable 0000000000049F80 case 5 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+4], cl mov rax, [rbp+var_40] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+3], cl mov rax, [rbp+var_40] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_40] shr rax, 18h mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_48] mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp loc_4A19B loc_4A0E4: mov rax, [rbp+var_18]; jumptable 0000000000049F80 case 4 mov [rbp+var_50], rax mov rax, [rbp+var_50] mov cl, al mov rax, [rbp+var_10] mov [rax+3], cl mov rax, [rbp+var_50] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_50] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_50] shr rax, 18h mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp short loc_4A19B loc_4A12D: mov rax, [rbp+var_18]; jumptable 0000000000049F80 case 3 mov [rbp+var_58], rax mov rax, [rbp+var_58] mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_58] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_58] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp short loc_4A19B loc_4A165: mov rax, [rbp+var_18]; jumptable 0000000000049F80 case 2 mov [rbp+var_5C], eax mov eax, [rbp+var_5C] mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov eax, [rbp+var_5C] shr eax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp short loc_4A19B loc_4A188: mov rax, [rbp+var_18]; jumptable 0000000000049F80 case 1 mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp short loc_4A19B def_49F80: call _abort; jumptable 0000000000049F80 default case loc_4A19B: add rsp, 70h pop rbp retn
_BYTE * mi_kpointer(long long a1, _BYTE *a2, unsigned long long a3) { _BYTE *result; // rax unsigned long long v4; // [rsp+58h] [rbp-18h] v4 = a3 >> 10; switch ( *(_DWORD *)(*(_QWORD *)a1 + 380LL) ) { case 1: result = a2; *a2 = v4; break; case 2: a2[1] = v4; result = a2; *a2 = BYTE1(v4); break; case 3: a2[2] = v4; a2[1] = BYTE1(v4); result = a2; *a2 = BYTE2(v4); break; case 4: a2[3] = v4; a2[2] = BYTE1(v4); a2[1] = BYTE2(v4); result = a2; *a2 = BYTE3(v4); break; case 5: a2[4] = v4; a2[3] = BYTE1(v4); a2[2] = BYTE2(v4); a2[1] = BYTE3(v4); result = a2; *a2 = BYTE4(v4); break; case 6: a2[5] = v4; a2[4] = BYTE1(v4); a2[3] = BYTE2(v4); a2[2] = BYTE3(v4); a2[1] = BYTE4(v4); result = a2; *a2 = BYTE5(v4); break; case 7: a2[6] = v4; a2[5] = BYTE1(v4); a2[4] = BYTE2(v4); a2[3] = BYTE3(v4); a2[2] = BYTE4(v4); a2[1] = BYTE5(v4); result = a2; *a2 = BYTE6(v4); break; default: abort(); } return result; }
_mi_kpointer: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0xa MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x17c] DEC EAX MOV ECX,EAX MOV qword ptr [RBP + -0x68],RCX SUB EAX,0x6 JA 0x0014a196 MOV RAX,qword ptr [RBP + -0x68] LEA RCX,[0x1de4cc] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_7: 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 + -0x20] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x6],CL MOV RAX,qword ptr [RBP + -0x20] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x5],CL MOV RAX,qword ptr [RBP + -0x20] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x4],CL MOV RAX,qword ptr [RBP + -0x20] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x28] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x28] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x28] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x0014a19b caseD_6: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x20 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x5],CL MOV RAX,qword ptr [RBP + -0x30] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x4],CL MOV RAX,qword ptr [RBP + -0x30] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x30] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x38] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x38] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x0014a19b caseD_5: 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 + 0x4],CL MOV RAX,qword ptr [RBP + -0x40] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x40] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x40] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x48] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x0014a19b caseD_4: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x50] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x50] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x50] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x50] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x0014a19b caseD_3: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x58] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x58] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x58] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x0014a19b caseD_2: MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x5c],EAX MOV EAX,dword ptr [RBP + -0x5c] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV EAX,dword ptr [RBP + -0x5c] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x0014a19b caseD_1: MOV RAX,qword ptr [RBP + -0x18] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x0014a19b default: CALL 0x001281d0 LAB_0014a19b: ADD RSP,0x70 POP RBP RET
void _mi_kpointer(long *param_1,byte *param_2,ulong param_3) { byte bVar1; byte bVar2; byte bVar3; byte bVar4; byte bVar5; byte bVar6; ulong uVar7; uVar7 = param_3 >> 10; bVar1 = (byte)uVar7; bVar2 = (byte)(uVar7 >> 8); bVar3 = (byte)(uVar7 >> 0x10); bVar4 = (byte)(uVar7 >> 0x18); bVar5 = (byte)(uVar7 >> 0x20); bVar6 = (byte)(uVar7 >> 0x28); switch(*(int4 *)(*param_1 + 0x17c)) { case 1: *param_2 = bVar1; break; case 2: param_2[1] = bVar1; *param_2 = bVar2; break; case 3: param_2[2] = bVar1; param_2[1] = bVar2; *param_2 = bVar3; break; case 4: param_2[3] = bVar1; param_2[2] = bVar2; param_2[1] = bVar3; *param_2 = bVar4; break; case 5: param_2[4] = bVar1; param_2[3] = bVar2; param_2[2] = bVar3; param_2[1] = bVar4; *param_2 = bVar5; break; case 6: param_2[5] = bVar1; param_2[4] = bVar2; param_2[3] = bVar3; param_2[2] = bVar4; param_2[1] = bVar5; *param_2 = bVar6; break; case 7: param_2[6] = bVar1; param_2[5] = bVar2; param_2[4] = bVar3; param_2[3] = bVar4; param_2[2] = bVar5; param_2[1] = bVar6; *param_2 = (byte)(param_3 >> 0x3a); break; default: /* WARNING: Subroutine does not return */ abort(); } return; }
16,668
read_user_name
eloqsql/libmariadb/libmariadb/mariadb_lib.c
void read_user_name(char *name) { if (geteuid() == 0) strcpy(name,"root"); /* allow use of surun */ else { #ifdef HAVE_GETPWUID struct passwd *skr; const char *str; if ((skr=getpwuid(geteuid())) != NULL) { str=skr->pw_name; } else if ((str=getlogin()) == NULL) { if (!(str=getenv("USER")) && !(str=getenv("LOGNAME")) && !(str=getenv("LOGIN"))) str="UNKNOWN_USER"; } ma_strmake(name,str,USERNAME_LENGTH); #elif defined(HAVE_CUSERID) (void) cuserid(name); #else ma_strmake(name,"UNKNOWN_USER", USERNAME_LENGTH); #endif } return; }
O0
c
read_user_name: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) callq 0x13280 cmpl $0x0, %eax jne 0x1839b movq -0x8(%rbp), %rdi leaq 0x340de(%rip), %rsi # 0x4c46f callq 0x133c0 jmp 0x18430 callq 0x13280 movl %eax, %edi callq 0x134e0 movq %rax, -0x10(%rbp) cmpq $0x0, %rax je 0x183be movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) jmp 0x1841e callq 0x13430 movq %rax, -0x18(%rbp) cmpq $0x0, %rax jne 0x1841c leaq 0x347aa(%rip), %rdi # 0x4cb7e callq 0x13540 movq %rax, -0x18(%rbp) cmpq $0x0, %rax jne 0x1841a leaq 0x3477e(%rip), %rdi # 0x4cb68 callq 0x13540 movq %rax, -0x18(%rbp) cmpq $0x0, %rax jne 0x1841a leaq 0x34770(%rip), %rdi # 0x4cb70 callq 0x13540 movq %rax, -0x18(%rbp) cmpq $0x0, %rax jne 0x1841a leaq 0x34760(%rip), %rax # 0x4cb76 movq %rax, -0x18(%rbp) jmp 0x1841c jmp 0x1841e movq -0x8(%rbp), %rdi movq -0x18(%rbp), %rsi movl $0x200, %edx # imm = 0x200 callq 0x331f0 addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
read_user_name: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi call _geteuid cmp eax, 0 jnz short loc_1839B mov rdi, [rbp+var_8] lea rsi, aRoot; "root" call _strcpy jmp loc_18430 loc_1839B: call _geteuid mov edi, eax call _getpwuid mov [rbp+var_10], rax cmp rax, 0 jz short loc_183BE mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_18], rax jmp short loc_1841E loc_183BE: call _getlogin mov [rbp+var_18], rax cmp rax, 0 jnz short loc_1841C lea rdi, aUnknownUser+8; "USER" call _getenv mov [rbp+var_18], rax cmp rax, 0 jnz short loc_1841A lea rdi, aLogname; "LOGNAME" call _getenv mov [rbp+var_18], rax cmp rax, 0 jnz short loc_1841A lea rdi, aLogin; "LOGIN" call _getenv mov [rbp+var_18], rax cmp rax, 0 jnz short loc_1841A lea rax, aUnknownUser; "UNKNOWN_USER" mov [rbp+var_18], rax loc_1841A: jmp short $+2 loc_1841C: jmp short $+2 loc_1841E: mov rdi, [rbp+var_8] mov rsi, [rbp+var_18] mov edx, 200h call ma_strmake loc_18430: add rsp, 20h pop rbp retn
long long read_user_name(long long a1) { unsigned int v2; // eax const char *v3; // [rsp+8h] [rbp-18h] _QWORD *v4; // [rsp+10h] [rbp-10h] if ( !(unsigned int)geteuid() ) return strcpy(a1, "root"); v2 = geteuid(); v4 = (_QWORD *)getpwuid(v2); if ( v4 ) return ma_strmake(a1, *v4, 512LL); v3 = (const char *)getlogin(); if ( !v3 ) { v3 = (const char *)getenv("USER"); if ( !v3 ) { v3 = (const char *)getenv("LOGNAME"); if ( !v3 ) { v3 = (const char *)getenv("LOGIN"); if ( !v3 ) v3 = "UNKNOWN_USER"; } } } return ma_strmake(a1, v3, 512LL); }
read_user_name: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI CALL 0x00113280 CMP EAX,0x0 JNZ 0x0011839b MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x14c46f] CALL 0x001133c0 JMP 0x00118430 LAB_0011839b: CALL 0x00113280 MOV EDI,EAX CALL 0x001134e0 MOV qword ptr [RBP + -0x10],RAX CMP RAX,0x0 JZ 0x001183be MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX JMP 0x0011841e LAB_001183be: CALL 0x00113430 MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JNZ 0x0011841c LEA RDI,[0x14cb7e] CALL 0x00113540 MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JNZ 0x0011841a LEA RDI,[0x14cb68] CALL 0x00113540 MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JNZ 0x0011841a LEA RDI,[0x14cb70] CALL 0x00113540 MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JNZ 0x0011841a LEA RAX,[0x14cb76] MOV qword ptr [RBP + -0x18],RAX LAB_0011841a: JMP 0x0011841c LAB_0011841c: JMP 0x0011841e LAB_0011841e: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,0x200 CALL 0x001331f0 LAB_00118430: ADD RSP,0x20 POP RBP RET
void read_user_name(char *param_1) { __uid_t _Var1; passwd *ppVar2; char *local_20; _Var1 = geteuid(); if (_Var1 == 0) { strcpy(param_1,"root"); } else { _Var1 = geteuid(); ppVar2 = getpwuid(_Var1); if (ppVar2 == (passwd *)0x0) { local_20 = getlogin(); if ((((local_20 == (char *)0x0) && (local_20 = getenv("USER"), local_20 == (char *)0x0)) && (local_20 = getenv("LOGNAME"), local_20 == (char *)0x0)) && (local_20 = getenv("LOGIN"), local_20 == (char *)0x0)) { local_20 = "UNKNOWN_USER"; } } else { local_20 = ppVar2->pw_name; } ma_strmake(param_1,local_20,0x200); } return; }
16,669
read_user_name
eloqsql/libmariadb/libmariadb/mariadb_lib.c
void read_user_name(char *name) { if (geteuid() == 0) strcpy(name,"root"); /* allow use of surun */ else { #ifdef HAVE_GETPWUID struct passwd *skr; const char *str; if ((skr=getpwuid(geteuid())) != NULL) { str=skr->pw_name; } else if ((str=getlogin()) == NULL) { if (!(str=getenv("USER")) && !(str=getenv("LOGNAME")) && !(str=getenv("LOGIN"))) str="UNKNOWN_USER"; } ma_strmake(name,str,USERNAME_LENGTH); #elif defined(HAVE_CUSERID) (void) cuserid(name); #else ma_strmake(name,"UNKNOWN_USER", USERNAME_LENGTH); #endif } return; }
O3
c
read_user_name: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx callq 0x13290 testl %eax, %eax je 0x16e03 callq 0x13290 movl %eax, %edi callq 0x13530 testq %rax, %rax je 0x16e14 movq (%rax), %rsi jmp 0x16e43 movb $0x0, 0x4(%rbx) movl $0x746f6f72, (%rbx) # imm = 0x746F6F72 addq $0x8, %rsp popq %rbx popq %rbp retq callq 0x13470 testq %rax, %rax jne 0x16e40 leaq 0x1ec6a(%rip), %rdi # 0x35a8f callq 0x13590 testq %rax, %rax jne 0x16e40 leaq 0x1ec43(%rip), %rdi # 0x35a79 callq 0x13590 testq %rax, %rax je 0x16e56 movq %rax, %rsi movl $0x200, %edx # imm = 0x200 movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %rbp jmp 0x25dbb leaq 0x1ec24(%rip), %rdi # 0x35a81 callq 0x13590 testq %rax, %rax leaq 0x1ec1b(%rip), %rsi # 0x35a87 cmovneq %rax, %rsi jmp 0x16e43
read_user_name: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi call _geteuid test eax, eax jz short loc_16E03 call _geteuid mov edi, eax call _getpwuid test rax, rax jz short loc_16E14 mov rsi, [rax] jmp short loc_16E43 loc_16E03: mov byte ptr [rbx+4], 0 mov dword ptr [rbx], 746F6F72h add rsp, 8 pop rbx pop rbp retn loc_16E14: call _getlogin test rax, rax jnz short loc_16E40 lea rdi, aUnknownUser+8; "USER" call _getenv test rax, rax jnz short loc_16E40 lea rdi, aLogname; "LOGNAME" call _getenv test rax, rax jz short loc_16E56 loc_16E40: mov rsi, rax loc_16E43: mov edx, 200h mov rdi, rbx add rsp, 8 pop rbx pop rbp jmp ma_strmake loc_16E56: lea rdi, aLogin; "LOGIN" call _getenv test rax, rax lea rsi, aUnknownUser; "UNKNOWN_USER" cmovnz rsi, rax jmp short loc_16E43
long long read_user_name(char *a1) { long long result; // rax unsigned int v2; // eax const char **v3; // rax const char *v4; // rsi long long v5; // rax long long v6; // rax result = geteuid(a1); if ( (_DWORD)result ) { v2 = geteuid(a1); v3 = (const char **)getpwuid(v2); if ( v3 ) { v4 = *v3; } else { v5 = getlogin(); if ( v5 || (v5 = getenv("USER")) != 0 || (v5 = getenv("LOGNAME")) != 0 ) { v4 = (const char *)v5; } else { v6 = getenv("LOGIN"); v4 = "UNKNOWN_USER"; if ( v6 ) v4 = (const char *)v6; } } return ma_strmake(a1, v4, 512LL); } else { strcpy(a1, "root"); } return result; }
read_user_name: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI CALL 0x00113290 TEST EAX,EAX JZ 0x00116e03 CALL 0x00113290 MOV EDI,EAX CALL 0x00113530 TEST RAX,RAX JZ 0x00116e14 MOV RSI,qword ptr [RAX] JMP 0x00116e43 LAB_00116e03: MOV byte ptr [RBX + 0x4],0x0 MOV dword ptr [RBX],0x746f6f72 ADD RSP,0x8 POP RBX POP RBP RET LAB_00116e14: CALL 0x00113470 TEST RAX,RAX JNZ 0x00116e40 LEA RDI,[0x135a8f] CALL 0x00113590 TEST RAX,RAX JNZ 0x00116e40 LEA RDI,[0x135a79] CALL 0x00113590 TEST RAX,RAX JZ 0x00116e56 LAB_00116e40: MOV RSI,RAX LAB_00116e43: MOV EDX,0x200 MOV RDI,RBX ADD RSP,0x8 POP RBX POP RBP JMP 0x00125dbb LAB_00116e56: LEA RDI,[0x135a81] CALL 0x00113590 TEST RAX,RAX LEA RSI,[0x135a87] CMOVNZ RSI,RAX JMP 0x00116e43
void read_user_name(int4 *param_1) { __uid_t _Var1; passwd *ppVar2; char *pcVar3; char *pcVar4; _Var1 = geteuid(); if (_Var1 != 0) { _Var1 = geteuid(); ppVar2 = getpwuid(_Var1); if (ppVar2 == (passwd *)0x0) { pcVar3 = getlogin(); if (((pcVar3 == (char *)0x0) && (pcVar3 = getenv("USER"), pcVar3 == (char *)0x0)) && (pcVar3 = getenv("LOGNAME"), pcVar3 == (char *)0x0)) { pcVar4 = getenv("LOGIN"); pcVar3 = "UNKNOWN_USER"; if (pcVar4 != (char *)0x0) { pcVar3 = pcVar4; } } } else { pcVar3 = ppVar2->pw_name; } ma_strmake(param_1,pcVar3,0x200); return; } *(int1 *)(param_1 + 1) = 0; *param_1 = 0x746f6f72; return; }
16,670
send_change_user_packet
eloqsql/libmariadb/plugins/auth/my_auth.c
static int send_change_user_packet(MCPVIO_EXT *mpvio, const uchar *data, int data_len) { MYSQL *mysql= mpvio->mysql; char *buff, *end; int res= 1; size_t conn_attr_len= (mysql->options.extension) ? mysql->options.extension->connect_attrs_len : 0; buff= malloc(USERNAME_LENGTH+1 + data_len+1 + NAME_LEN+1 + 2 + NAME_LEN+1 + 9 + conn_attr_len); end= ma_strmake(buff, mysql->user, USERNAME_LENGTH) + 1; if (!data_len) *end++= 0; else { if (mysql->client_flag & CLIENT_SECURE_CONNECTION) { DBUG_ASSERT(data_len <= 255); if (data_len > 255) { my_set_error(mysql, CR_MALFORMED_PACKET, SQLSTATE_UNKNOWN, 0); goto error; } *end++= data_len; } else { DBUG_ASSERT(data_len == SCRAMBLE_LENGTH_323 + 1); DBUG_ASSERT(data[SCRAMBLE_LENGTH_323] == 0); } memcpy(end, data, data_len); end+= data_len; } end= ma_strmake(end, mpvio->db ? mpvio->db : "", NAME_LEN) + 1; if (mysql->server_capabilities & CLIENT_PROTOCOL_41) { int2store(end, (ushort) mysql->charset->nr); end+= 2; } if (mysql->server_capabilities & CLIENT_PLUGIN_AUTH) end= ma_strmake(end, mpvio->plugin->name, NAME_LEN) + 1; end= ma_send_connect_attr(mysql, (unsigned char *)end); res= ma_simple_command(mysql, COM_CHANGE_USER, buff, (ulong)(end-buff), 1, NULL); error: free(buff); return res; }
O0
c
send_change_user_packet: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq -0x8(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x20(%rbp) movl $0x1, -0x34(%rbp) movq -0x20(%rbp), %rax cmpq $0x0, 0x480(%rax) je 0xc8649 movq -0x20(%rbp), %rax movq 0x480(%rax), %rax movq 0x78(%rax), %rax movq %rax, -0x50(%rbp) jmp 0xc8651 xorl %eax, %eax movq %rax, -0x50(%rbp) jmp 0xc8651 movq -0x50(%rbp), %rax movq %rax, -0x40(%rbp) movl -0x14(%rbp), %eax addl $0x201, %eax # imm = 0x201 addl $0x1, %eax addl $0x100, %eax # imm = 0x100 addl $0x1, %eax addl $0x2, %eax addl $0x100, %eax # imm = 0x100 addl $0x1, %eax addl $0x9, %eax movslq %eax, %rdi addq -0x40(%rbp), %rdi callq 0x3a920 movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rdi movq -0x20(%rbp), %rax movq 0x2b8(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0xba490 addq $0x1, %rax movq %rax, -0x30(%rbp) cmpl $0x0, -0x14(%rbp) jne 0xc86c5 movq -0x30(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x30(%rbp) movb $0x0, (%rax) jmp 0xc8744 movq -0x20(%rbp), %rax movq 0x368(%rax), %rax andq $0x8000, %rax # imm = 0x8000 cmpq $0x0, %rax je 0xc8720 cmpl $0xff, -0x14(%rbp) jle 0xc8708 movq -0x20(%rbp), %rdi leaq 0x1ea300(%rip), %rax # 0x2b29f0 movq (%rax), %rdx movl $0x7eb, %esi # imm = 0x7EB xorl %eax, %eax movl %eax, %ecx movb $0x0, %al callq 0x9e610 jmp 0xc8853 movl -0x14(%rbp), %eax movb %al, %cl movq -0x30(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x30(%rbp) movb %cl, (%rax) jmp 0xc8722 jmp 0xc8722 movq -0x30(%rbp), %rdi movq -0x10(%rbp), %rsi movslq -0x14(%rbp), %rdx callq 0x3a0b0 movl -0x14(%rbp), %ecx movq -0x30(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x28(%rax) je 0xc8765 movq -0x8(%rbp), %rax movq 0x28(%rax), %rax movq %rax, -0x60(%rbp) jmp 0xc8772 leaq 0x65556(%rip), %rax # 0x12dcc2 movq %rax, -0x60(%rbp) jmp 0xc8772 movq -0x58(%rbp), %rdi movq -0x60(%rbp), %rsi movl $0x100, %edx # imm = 0x100 callq 0xba490 addq $0x1, %rax movq %rax, -0x30(%rbp) movq -0x20(%rbp), %rax movq 0x370(%rax), %rax andq $0x200, %rax # imm = 0x200 cmpq $0x0, %rax je 0xc87de jmp 0xc87a5 movq -0x20(%rbp), %rax movq 0x2f0(%rax), %rax movl (%rax), %eax movzwl %ax, %eax movl %eax, -0x44(%rbp) movl -0x44(%rbp), %eax movb %al, %cl movq -0x30(%rbp), %rax movb %cl, (%rax) movl -0x44(%rbp), %eax shrl $0x8, %eax movb %al, %cl movq -0x30(%rbp), %rax movb %cl, 0x1(%rax) movq -0x30(%rbp), %rax addq $0x2, %rax movq %rax, -0x30(%rbp) movq -0x20(%rbp), %rax movq 0x370(%rax), %rax andq $0x80000, %rax # imm = 0x80000 cmpq $0x0, %rax je 0xc8817 movq -0x30(%rbp), %rdi movq -0x8(%rbp), %rax movq 0x20(%rax), %rax movq 0x8(%rax), %rsi movl $0x100, %edx # imm = 0x100 callq 0xba490 addq $0x1, %rax movq %rax, -0x30(%rbp) movq -0x20(%rbp), %rdi movq -0x30(%rbp), %rsi callq 0xa32b0 movq %rax, -0x30(%rbp) movq -0x20(%rbp), %rdi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx movq -0x28(%rbp), %rax subq %rax, %rcx movl $0x11, %esi movl $0x1, %r8d xorl %eax, %eax movl %eax, %r9d callq 0x9f460 movl %eax, -0x34(%rbp) movq -0x28(%rbp), %rdi callq 0x3a1a0 movl -0x34(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
send_change_user_packet: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov rax, [rbp+var_8] mov rax, [rax+18h] mov [rbp+var_20], rax mov [rbp+var_34], 1 mov rax, [rbp+var_20] cmp qword ptr [rax+480h], 0 jz short loc_C8649 mov rax, [rbp+var_20] mov rax, [rax+480h] mov rax, [rax+78h] mov [rbp+var_50], rax jmp short loc_C8651 loc_C8649: xor eax, eax mov [rbp+var_50], rax jmp short $+2 loc_C8651: mov rax, [rbp+var_50] mov [rbp+var_40], rax mov eax, [rbp+var_14] add eax, 201h add eax, 1 add eax, 100h add eax, 1 add eax, 2 add eax, 100h add eax, 1 add eax, 9 movsxd rdi, eax add rdi, [rbp+var_40] call _malloc mov [rbp+var_28], rax mov rdi, [rbp+var_28] mov rax, [rbp+var_20] mov rsi, [rax+2B8h] mov edx, 200h call ma_strmake add rax, 1 mov [rbp+var_30], rax cmp [rbp+var_14], 0 jnz short loc_C86C5 mov rax, [rbp+var_30] mov rcx, rax add rcx, 1 mov [rbp+var_30], rcx mov byte ptr [rax], 0 jmp short loc_C8744 loc_C86C5: mov rax, [rbp+var_20] mov rax, [rax+368h] and rax, 8000h cmp rax, 0 jz short loc_C8720 cmp [rbp+var_14], 0FFh jle short loc_C8708 mov rdi, [rbp+var_20] lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] mov esi, 7EBh xor eax, eax mov ecx, eax mov al, 0 call my_set_error jmp loc_C8853 loc_C8708: mov eax, [rbp+var_14] mov cl, al mov rax, [rbp+var_30] mov rdx, rax add rdx, 1 mov [rbp+var_30], rdx mov [rax], cl jmp short loc_C8722 loc_C8720: jmp short $+2 loc_C8722: mov rdi, [rbp+var_30] mov rsi, [rbp+var_10] movsxd rdx, [rbp+var_14] call _memcpy mov ecx, [rbp+var_14] mov rax, [rbp+var_30] movsxd rcx, ecx add rax, rcx mov [rbp+var_30], rax loc_C8744: mov rax, [rbp+var_30] mov [rbp+var_58], rax mov rax, [rbp+var_8] cmp qword ptr [rax+28h], 0 jz short loc_C8765 mov rax, [rbp+var_8] mov rax, [rax+28h] mov [rbp+var_60], rax jmp short loc_C8772 loc_C8765: lea rax, aS_2+3; "" mov [rbp+var_60], rax jmp short $+2 loc_C8772: mov rdi, [rbp+var_58] mov rsi, [rbp+var_60] mov edx, 100h call ma_strmake add rax, 1 mov [rbp+var_30], rax mov rax, [rbp+var_20] mov rax, [rax+370h] and rax, 200h cmp rax, 0 jz short loc_C87DE jmp short $+2 loc_C87A5: mov rax, [rbp+var_20] mov rax, [rax+2F0h] mov eax, [rax] movzx eax, ax mov [rbp+var_44], eax mov eax, [rbp+var_44] mov cl, al mov rax, [rbp+var_30] mov [rax], cl mov eax, [rbp+var_44] shr eax, 8 mov cl, al mov rax, [rbp+var_30] mov [rax+1], cl mov rax, [rbp+var_30] add rax, 2 mov [rbp+var_30], rax loc_C87DE: mov rax, [rbp+var_20] mov rax, [rax+370h] and rax, 80000h cmp rax, 0 jz short loc_C8817 mov rdi, [rbp+var_30] mov rax, [rbp+var_8] mov rax, [rax+20h] mov rsi, [rax+8] mov edx, 100h call ma_strmake add rax, 1 mov [rbp+var_30], rax loc_C8817: mov rdi, [rbp+var_20] mov rsi, [rbp+var_30] call ma_send_connect_attr mov [rbp+var_30], rax mov rdi, [rbp+var_20] mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] mov rax, [rbp+var_28] sub rcx, rax mov esi, 11h mov r8d, 1 xor eax, eax mov r9d, eax call ma_simple_command mov [rbp+var_34], eax loc_C8853: mov rdi, [rbp+var_28] call _free mov eax, [rbp+var_34] add rsp, 60h pop rbp retn
long long send_change_user_packet(long long a1, long long a2, int a3) { _BYTE *v3; // rax _BYTE *v4; // rax _BYTE *v5; // rax long long v7; // [rsp+10h] [rbp-50h] __int16 v8; // [rsp+1Ch] [rbp-44h] unsigned int v9; // [rsp+2Ch] [rbp-34h] _BYTE *v10; // [rsp+30h] [rbp-30h] _BYTE *v11; // [rsp+30h] [rbp-30h] _BYTE *v12; // [rsp+30h] [rbp-30h] long long v13; // [rsp+30h] [rbp-30h] _BYTE *v14; // [rsp+38h] [rbp-28h] long long v15; // [rsp+40h] [rbp-20h] v15 = *(_QWORD *)(a1 + 24); v9 = 1; if ( *(_QWORD *)(v15 + 1152) ) v7 = *(_QWORD *)(*(_QWORD *)(v15 + 1152) + 120LL); else v7 = 0LL; v14 = (_BYTE *)malloc(v7 + a3 + 1039); v10 = ma_strmake(v14, *(_BYTE **)(v15 + 696), 512LL) + 1; if ( a3 ) { if ( (*(_QWORD *)(v15 + 872) & 0x8000LL) != 0 ) { if ( a3 > 255 ) { my_set_error(v15, 0x7EBu, (long long)SQLSTATE_UNKNOWN, 0LL); goto LABEL_19; } v4 = v10++; *v4 = a3; } memcpy(v10, a2, a3); v11 = &v10[a3]; } else { v3 = v10; v11 = v10 + 1; *v3 = 0; } if ( *(_QWORD *)(a1 + 40) ) v5 = ma_strmake(v11, *(_BYTE **)(a1 + 40), 256LL); else v5 = ma_strmake(v11, "", 256LL); v12 = v5 + 1; if ( (*(_QWORD *)(v15 + 880) & 0x200LL) != 0 ) { v8 = **(_DWORD **)(v15 + 752); *v12 = **(_DWORD **)(v15 + 752); v5[2] = HIBYTE(v8); v12 = v5 + 3; } if ( (*(_QWORD *)(v15 + 880) & 0x80000LL) != 0 ) v12 = ma_strmake(v12, *(_BYTE **)(*(_QWORD *)(a1 + 32) + 8LL), 256LL) + 1; v13 = ma_send_connect_attr(v15, (long long)v12); v9 = ma_simple_command(v15, 0x11u, (long long)v14, v13 - (_QWORD)v14, 1, 0LL); LABEL_19: free(v14); return v9; }
send_change_user_packet: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x20],RAX MOV dword ptr [RBP + -0x34],0x1 MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX + 0x480],0x0 JZ 0x001c8649 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x78] MOV qword ptr [RBP + -0x50],RAX JMP 0x001c8651 LAB_001c8649: XOR EAX,EAX MOV qword ptr [RBP + -0x50],RAX JMP 0x001c8651 LAB_001c8651: MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x40],RAX MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x201 ADD EAX,0x1 ADD EAX,0x100 ADD EAX,0x1 ADD EAX,0x2 ADD EAX,0x100 ADD EAX,0x1 ADD EAX,0x9 MOVSXD RDI,EAX ADD RDI,qword ptr [RBP + -0x40] CALL 0x0013a920 MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RAX + 0x2b8] MOV EDX,0x200 CALL 0x001ba490 ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX CMP dword ptr [RBP + -0x14],0x0 JNZ 0x001c86c5 MOV RAX,qword ptr [RBP + -0x30] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x30],RCX MOV byte ptr [RAX],0x0 JMP 0x001c8744 LAB_001c86c5: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x368] AND RAX,0x8000 CMP RAX,0x0 JZ 0x001c8720 CMP dword ptr [RBP + -0x14],0xff JLE 0x001c8708 MOV RDI,qword ptr [RBP + -0x20] LEA RAX,[0x3b29f0] MOV RDX,qword ptr [RAX] MOV ESI,0x7eb XOR EAX,EAX MOV ECX,EAX MOV AL,0x0 CALL 0x0019e610 JMP 0x001c8853 LAB_001c8708: MOV EAX,dword ptr [RBP + -0x14] MOV CL,AL MOV RAX,qword ptr [RBP + -0x30] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x30],RDX MOV byte ptr [RAX],CL JMP 0x001c8722 LAB_001c8720: JMP 0x001c8722 LAB_001c8722: MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x10] MOVSXD RDX,dword ptr [RBP + -0x14] CALL 0x0013a0b0 MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x30] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX LAB_001c8744: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x28],0x0 JZ 0x001c8765 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x60],RAX JMP 0x001c8772 LAB_001c8765: LEA RAX,[0x22dcc2] MOV qword ptr [RBP + -0x60],RAX JMP 0x001c8772 LAB_001c8772: MOV RDI,qword ptr [RBP + -0x58] MOV RSI,qword ptr [RBP + -0x60] MOV EDX,0x100 CALL 0x001ba490 ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x370] AND RAX,0x200 CMP RAX,0x0 JZ 0x001c87de JMP 0x001c87a5 LAB_001c87a5: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x2f0] MOV EAX,dword ptr [RAX] MOVZX EAX,AX MOV dword ptr [RBP + -0x44],EAX MOV EAX,dword ptr [RBP + -0x44] MOV CL,AL MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0x44] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x2 MOV qword ptr [RBP + -0x30],RAX LAB_001c87de: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x370] AND RAX,0x80000 CMP RAX,0x0 JZ 0x001c8817 MOV RDI,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x20] MOV RSI,qword ptr [RAX + 0x8] MOV EDX,0x100 CALL 0x001ba490 ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX LAB_001c8817: MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x30] CALL 0x001a32b0 MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x28] SUB RCX,RAX MOV ESI,0x11 MOV R8D,0x1 XOR EAX,EAX MOV R9D,EAX CALL 0x0019f460 MOV dword ptr [RBP + -0x34],EAX LAB_001c8853: MOV RDI,qword ptr [RBP + -0x28] CALL 0x0013a1a0 MOV EAX,dword ptr [RBP + -0x34] ADD RSP,0x60 POP RBP RET
int4 send_change_user_packet(long param_1,void *param_2,int param_3) { long lVar1; uint uVar2; void *__ptr; long lVar3; int *local_68; long local_58; int4 local_3c; int1 *local_38; lVar1 = *(long *)(param_1 + 0x18); local_3c = 1; if (*(long *)(lVar1 + 0x480) == 0) { local_58 = 0; } else { local_58 = *(long *)(*(long *)(lVar1 + 0x480) + 0x78); } __ptr = malloc((param_3 + 0x40f) + local_58); lVar3 = ma_strmake(__ptr,*(int8 *)(lVar1 + 0x2b8),0x200); local_38 = (int1 *)(lVar3 + 1); if (param_3 == 0) { *local_38 = 0; local_38 = (int1 *)(lVar3 + 2); } else { if ((*(ulong *)(lVar1 + 0x368) & 0x8000) != 0) { if (0xff < param_3) { my_set_error(lVar1,0x7eb,SQLSTATE_UNKNOWN,0); goto LAB_001c8853; } *local_38 = (char)param_3; local_38 = (int1 *)(lVar3 + 2); } memcpy(local_38,param_2,(long)param_3); local_38 = local_38 + param_3; } if (*(long *)(param_1 + 0x28) == 0) { local_68 = &DAT_0022dcc2; } else { local_68 = *(int **)(param_1 + 0x28); } lVar3 = ma_strmake(local_38,local_68,0x100); local_38 = (int1 *)(lVar3 + 1); if ((*(ulong *)(lVar1 + 0x370) & 0x200) != 0) { uVar2 = **(uint **)(lVar1 + 0x2f0) & 0xffff; *local_38 = (char)uVar2; *(char *)(lVar3 + 2) = (char)(uVar2 >> 8); local_38 = (int1 *)(lVar3 + 3); } if ((*(ulong *)(lVar1 + 0x370) & 0x80000) != 0) { lVar3 = ma_strmake(local_38,*(int8 *)(*(long *)(param_1 + 0x20) + 8),0x100); local_38 = (int1 *)(lVar3 + 1); } lVar3 = ma_send_connect_attr(lVar1,local_38); local_3c = ma_simple_command(lVar1,0x11,__ptr,lVar3 - (long)__ptr,1,0); LAB_001c8853: free(__ptr); return local_3c; }
16,671
nglog::CapturedStream::CapturedStream(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
ng-log[P]ng-log/src/googletest.h
CapturedStream(int fd, string filename) : fd_(fd), filename_(std::move(filename)) { Capture(); }
O1
c
nglog::CapturedStream::CapturedStream(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movl %esi, (%rdi) movl $0xffffffff, 0x4(%rdi) # imm = 0xFFFFFFFF leaq 0x18(%rdi), %r12 movq %r12, 0x8(%rdi) movq (%rdx), %rcx leaq 0x10(%rdx), %rax cmpq %rax, %rcx je 0x9eef movq %rcx, 0x8(%rbx) movq (%rax), %rcx movq %rcx, 0x18(%rbx) jmp 0x9ef7 movups (%rax), %xmm0 movups %xmm0, (%r12) leaq 0x4(%rbx), %r14 movq 0x8(%rdx), %rcx movq %rcx, 0x10(%rbx) movq %rax, (%rdx) movq $0x0, 0x8(%rdx) movb $0x0, 0x10(%rdx) movq %rbx, %rdi callq 0x9f4e addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %r15 movq 0x8(%rbx), %rdi cmpq %r12, %rdi je 0x9f37 callq 0x7670 cmpl $-0x1, (%r14) je 0x9f45 movq %r14, %rdi callq 0x9bf0 movq %r15, %rdi callq 0x79b0 nop
_ZN5nglog14CapturedStreamC2EiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push r12 push rbx push rax mov rbx, rdi mov [rdi], esi mov dword ptr [rdi+4], 0FFFFFFFFh lea r12, [rdi+18h] mov [rdi+8], r12 mov rcx, [rdx] lea rax, [rdx+10h] cmp rcx, rax jz short loc_9EEF mov [rbx+8], rcx mov rcx, [rax] mov [rbx+18h], rcx jmp short loc_9EF7 loc_9EEF: movups xmm0, xmmword ptr [rax] movups xmmword ptr [r12], xmm0 loc_9EF7: lea r14, [rbx+4] mov rcx, [rdx+8] mov [rbx+10h], rcx mov [rdx], rax mov qword ptr [rdx+8], 0 mov byte ptr [rdx+10h], 0 mov rdi, rbx; this call _ZN5nglog14CapturedStream7CaptureEv; nglog::CapturedStream::Capture(void) add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn mov r15, rax mov rdi, [rbx+8] cmp rdi, r12 jz short loc_9F37 call _free loc_9F37: cmp dword ptr [r14], 0FFFFFFFFh jz short loc_9F45 mov rdi, r14; this call _ZN5nglog5tools14FileDescriptor12unsafe_closeEv; nglog::tools::FileDescriptor::unsafe_close(void) loc_9F45: mov rdi, r15 call __Unwind_Resume
long long nglog::CapturedStream::CapturedStream(nglog::CapturedStream *this, int a2, long long a3) { _OWORD *v3; // rax *(_DWORD *)this = a2; *((_DWORD *)this + 1) = -1; *((_QWORD *)this + 1) = (char *)this + 24; v3 = (_OWORD *)(a3 + 16); if ( *(_QWORD *)a3 == a3 + 16 ) { *(_OWORD *)((char *)this + 24) = *v3; } else { *((_QWORD *)this + 1) = *(_QWORD *)a3; *((_QWORD *)this + 3) = *(_QWORD *)v3; } *((_QWORD *)this + 2) = *(_QWORD *)(a3 + 8); *(_QWORD *)a3 = v3; *(_QWORD *)(a3 + 8) = 0LL; *(_BYTE *)(a3 + 16) = 0; return nglog::CapturedStream::Capture(this); }
CapturedStream: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOV dword ptr [RDI],ESI MOV dword ptr [RDI + 0x4],0xffffffff LEA R12,[RDI + 0x18] MOV qword ptr [RDI + 0x8],R12 MOV RCX,qword ptr [RDX] LEA RAX,[RDX + 0x10] CMP RCX,RAX JZ 0x00109eef MOV qword ptr [RBX + 0x8],RCX MOV RCX,qword ptr [RAX] MOV qword ptr [RBX + 0x18],RCX JMP 0x00109ef7 LAB_00109eef: MOVUPS XMM0,xmmword ptr [RAX] MOVUPS xmmword ptr [R12],XMM0 LAB_00109ef7: LEA R14,[RBX + 0x4] MOV RCX,qword ptr [RDX + 0x8] MOV qword ptr [RBX + 0x10],RCX MOV qword ptr [RDX],RAX MOV qword ptr [RDX + 0x8],0x0 MOV byte ptr [RDX + 0x10],0x0 LAB_00109f12: MOV RDI,RBX CALL 0x00109f4e LAB_00109f1a: ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* nglog::CapturedStream::CapturedStream(int, std::__cxx11::string) */ void __thiscall nglog::CapturedStream::CapturedStream(CapturedStream *this,int4 param_1,long *param_3) { long *plVar1; long lVar2; *(int4 *)this = param_1; *(int4 *)(this + 4) = 0xffffffff; *(CapturedStream **)(this + 8) = this + 0x18; plVar1 = param_3 + 2; if ((long *)*param_3 == plVar1) { lVar2 = param_3[3]; *(long *)(this + 0x18) = *plVar1; *(long *)(this + 0x20) = lVar2; } else { *(long *)(this + 8) = *param_3; *(long *)(this + 0x18) = *plVar1; } *(long *)(this + 0x10) = param_3[1]; *param_3 = (long)plVar1; param_3[1] = 0; *(int1 *)(param_3 + 2) = 0; /* try { // try from 00109f12 to 00109f19 has its CatchHandler @ 00109f26 */ Capture(this); return; }
16,672
my_b_cache_write
eloqsql/mysys/mf_iocache.c
int _my_b_cache_write(IO_CACHE *info, const uchar *Buffer, size_t Count) { if (Buffer != info->write_buffer) { Count= IO_ROUND_DN(Count); if (!Count) return 0; } if (info->seek_not_done) { /* Whenever a function which operates on IO_CACHE flushes/writes some part of the IO_CACHE to disk it will set the property "seek_not_done" to indicate this to other functions operating on the IO_CACHE. */ if (mysql_file_seek(info->file, info->pos_in_file, MY_SEEK_SET, MYF(info->myflags & MY_WME)) == MY_FILEPOS_ERROR) { info->error= -1; return 1; } info->seek_not_done=0; } if (mysql_file_write(info->file, Buffer, Count, info->myflags | MY_NABP)) return info->error= -1; info->pos_in_file+= Count; return 0; }
O0
c
my_b_cache_write: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx cmpq 0x30(%rcx), %rax je 0xe4af9 movabsq $0xfffff000, %rax # imm = 0xFFFFF000 andq -0x20(%rbp), %rax movq %rax, -0x20(%rbp) cmpq $0x0, -0x20(%rbp) jne 0xe4af7 movl $0x0, -0x4(%rbp) jmp 0xe4bc9 jmp 0xe4af9 movq -0x10(%rbp), %rax cmpl $0x0, 0xe0(%rax) je 0xe4b65 movq -0x10(%rbp), %rax movl 0xd4(%rax), %edx movq -0x10(%rbp), %rax movq (%rax), %rcx movq -0x10(%rbp), %rax movq 0xf8(%rax), %r9 andq $0x10, %r9 leaq 0x75a81(%rip), %rdi # 0x15a5ae movl $0x5ef, %esi # imm = 0x5EF xorl %r8d, %r8d callq 0xe21d0 cmpq $-0x1, %rax jne 0xe4b57 movq -0x10(%rbp), %rax movl $0xffffffff, 0xe4(%rax) # imm = 0xFFFFFFFF movl $0x1, -0x4(%rbp) jmp 0xe4bc9 movq -0x10(%rbp), %rax movl $0x0, 0xe0(%rax) movq -0x10(%rbp), %rax movl 0xd4(%rax), %edx movq -0x18(%rbp), %rcx movq -0x20(%rbp), %r8 movq -0x10(%rbp), %rax movq 0xf8(%rax), %r9 orq $0x4, %r9 leaq 0x75a21(%rip), %rdi # 0x15a5ae movl $0x5f6, %esi # imm = 0x5F6 callq 0xe3b80 cmpq $0x0, %rax je 0xe4bb4 movq -0x10(%rbp), %rax movl $0xffffffff, 0xe4(%rax) # imm = 0xFFFFFFFF movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xe4bc9 movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rax addq (%rax), %rcx movq %rcx, (%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_my_b_cache_write: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_18] mov rcx, [rbp+var_10] cmp rax, [rcx+30h] jz short loc_E4AF9 mov rax, 0FFFFF000h and rax, [rbp+var_20] mov [rbp+var_20], rax cmp [rbp+var_20], 0 jnz short loc_E4AF7 mov [rbp+var_4], 0 jmp loc_E4BC9 loc_E4AF7: jmp short $+2 loc_E4AF9: mov rax, [rbp+var_10] cmp dword ptr [rax+0E0h], 0 jz short loc_E4B65 mov rax, [rbp+var_10] mov edx, [rax+0D4h] mov rax, [rbp+var_10] mov rcx, [rax] mov rax, [rbp+var_10] mov r9, [rax+0F8h] and r9, 10h lea rdi, aWorkspaceLlm4b_36; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 5EFh xor r8d, r8d call inline_mysql_file_seek_6 cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_E4B57 mov rax, [rbp+var_10] mov dword ptr [rax+0E4h], 0FFFFFFFFh mov [rbp+var_4], 1 jmp short loc_E4BC9 loc_E4B57: mov rax, [rbp+var_10] mov dword ptr [rax+0E0h], 0 loc_E4B65: mov rax, [rbp+var_10] mov edx, [rax+0D4h] mov rcx, [rbp+var_18] mov r8, [rbp+var_20] mov rax, [rbp+var_10] mov r9, [rax+0F8h] or r9, 4 lea rdi, aWorkspaceLlm4b_36; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 5F6h call inline_mysql_file_write_3 cmp rax, 0 jz short loc_E4BB4 mov rax, [rbp+var_10] mov dword ptr [rax+0E4h], 0FFFFFFFFh mov [rbp+var_4], 0FFFFFFFFh jmp short loc_E4BC9 loc_E4BB4: mov rcx, [rbp+var_20] mov rax, [rbp+var_10] add rcx, [rax] mov [rax], rcx mov [rbp+var_4], 0 loc_E4BC9: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long my_b_cache_write(long long a1, long long a2, long long a3) { long long v4; // [rsp+0h] [rbp-20h] v4 = a3; if ( a2 == *(_QWORD *)(a1 + 48) || (v4 = (unsigned int)a3 & 0xFFFFF000, (a3 & 0xFFFFF000) != 0) ) { if ( *(_DWORD *)(a1 + 224) ) { if ( inline_mysql_file_seek_6( (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 0x5EFu, *(_DWORD *)(a1 + 212), *(_QWORD *)a1, 0, *(_QWORD *)(a1 + 248) & 0x10LL) == -1 ) { *(_DWORD *)(a1 + 228) = -1; return 1; } *(_DWORD *)(a1 + 224) = 0; } if ( inline_mysql_file_write_3( (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 0x5F6u, *(_DWORD *)(a1 + 212), a2, v4, *(_QWORD *)(a1 + 248) | 4LL) ) { *(_DWORD *)(a1 + 228) = -1; return (unsigned int)-1; } else { *(_QWORD *)a1 += v4; return 0; } } else { return 0; } }
_my_b_cache_write: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x30] JZ 0x001e4af9 MOV RAX,0xfffff000 AND RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x20],RAX CMP qword ptr [RBP + -0x20],0x0 JNZ 0x001e4af7 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001e4bc9 LAB_001e4af7: JMP 0x001e4af9 LAB_001e4af9: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0xe0],0x0 JZ 0x001e4b65 MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0xd4] MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV R9,qword ptr [RAX + 0xf8] AND R9,0x10 LEA RDI,[0x25a5ae] MOV ESI,0x5ef XOR R8D,R8D CALL 0x001e21d0 CMP RAX,-0x1 JNZ 0x001e4b57 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xe4],0xffffffff MOV dword ptr [RBP + -0x4],0x1 JMP 0x001e4bc9 LAB_001e4b57: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xe0],0x0 LAB_001e4b65: MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0xd4] MOV RCX,qword ptr [RBP + -0x18] MOV R8,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV R9,qword ptr [RAX + 0xf8] OR R9,0x4 LEA RDI,[0x25a5ae] MOV ESI,0x5f6 CALL 0x001e3b80 CMP RAX,0x0 JZ 0x001e4bb4 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xe4],0xffffffff MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001e4bc9 LAB_001e4bb4: MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] ADD RCX,qword ptr [RAX] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x0 LAB_001e4bc9: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 _my_b_cache_write(long *param_1,long param_2,ulong param_3) { long lVar1; ulong local_28; int4 local_c; local_28 = param_3; if ((param_2 == param_1[6]) || (local_28 = param_3 & 0xfffff000, local_28 != 0)) { if ((int)param_1[0x1c] != 0) { lVar1 = inline_mysql_file_seek ("/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x5ef, *(int4 *)((long)param_1 + 0xd4),*param_1,0,param_1[0x1f] & 0x10); if (lVar1 == -1) { *(int4 *)((long)param_1 + 0xe4) = 0xffffffff; return 1; } *(int4 *)(param_1 + 0x1c) = 0; } lVar1 = inline_mysql_file_write ("/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x5f6, *(int4 *)((long)param_1 + 0xd4),param_2,local_28,param_1[0x1f] | 4); if (lVar1 == 0) { *param_1 = local_28 + *param_1; local_c = 0; } else { *(int4 *)((long)param_1 + 0xe4) = 0xffffffff; local_c = 0xffffffff; } } else { local_c = 0; } return local_c; }
16,673
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::serializer(std::shared_ptr<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>>, char, nlohmann::json_abi_v3_11_3::detail::error_handler_t)
monkey531[P]llama/common/json.hpp
serializer(output_adapter_t<char> s, const char ichar, error_handler_t error_handler_ = error_handler_t::strict) : o(std::move(s)) , loc(std::localeconv()) , thousands_sep(loc->thousands_sep == nullptr ? '\0' : std::char_traits<char>::to_char_type(* (loc->thousands_sep))) , decimal_point(loc->decimal_point == nullptr ? '\0' : std::char_traits<char>::to_char_type(* (loc->decimal_point))) , indent_char(ichar) , indent_string(512, indent_char) , error_handler(error_handler_) {}
O3
cpp
nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::serializer(std::shared_ptr<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char>>, char, nlohmann::json_abi_v3_11_3::detail::error_handler_t): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %ecx, %ebp movl %edx, %r14d movq %rdi, %rbx xorl %r15d, %r15d movq %r15, 0x8(%rdi) movups (%rsi), %xmm0 movq %r15, 0x8(%rsi) movups %xmm0, (%rdi) movq %r15, (%rsi) xorps %xmm0, %xmm0 movups %xmm0, 0x40(%rdi) movups %xmm0, 0x30(%rdi) movups %xmm0, 0x20(%rdi) movups %xmm0, 0x10(%rdi) callq 0x18d50 movq %rax, 0x50(%rbx) movq 0x8(%rax), %rcx testq %rcx, %rcx je 0x7ce25 movb (%rcx), %r15b movb %r15b, 0x58(%rbx) movq (%rax), %rax testq %rax, %rax je 0x7ce35 movb (%rax), %al jmp 0x7ce37 xorl %eax, %eax movb %al, 0x59(%rbx) leaq 0x5a(%rbx), %rdi movl $0x200, %edx # imm = 0x200 xorl %esi, %esi callq 0x18400 movb %r14b, 0x25a(%rbx) leaq 0x260(%rbx), %rdi leaq 0x270(%rbx), %rax movq %rax, 0x260(%rbx) movsbl %r14b, %edx movl $0x200, %esi # imm = 0x200 callq 0x187f0 movl %ebp, 0x280(%rbx) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x7ce96 callq 0x32e06 movq %r14, %rdi callq 0x18c10
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ESt10shared_ptrINS1_23output_adapter_protocolIcEEEcNS1_15error_handler_tE: push rbp push r15 push r14 push rbx push rax mov ebp, ecx mov r14d, edx mov rbx, rdi xor r15d, r15d mov [rdi+8], r15 movups xmm0, xmmword ptr [rsi] mov [rsi+8], r15 movups xmmword ptr [rdi], xmm0 mov [rsi], r15 xorps xmm0, xmm0 movups xmmword ptr [rdi+40h], xmm0 movups xmmword ptr [rdi+30h], xmm0 movups xmmword ptr [rdi+20h], xmm0 movups xmmword ptr [rdi+10h], xmm0 call _localeconv mov [rbx+50h], rax mov rcx, [rax+8] test rcx, rcx jz short loc_7CE25 mov r15b, [rcx] loc_7CE25: mov [rbx+58h], r15b mov rax, [rax] test rax, rax jz short loc_7CE35 mov al, [rax] jmp short loc_7CE37 loc_7CE35: xor eax, eax loc_7CE37: mov [rbx+59h], al lea rdi, [rbx+5Ah] mov edx, 200h xor esi, esi call _memset mov [rbx+25Ah], r14b lea rdi, [rbx+260h] lea rax, [rbx+270h] mov [rbx+260h], rax movsx edx, r14b mov esi, 200h call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) mov [rbx+280h], ebp add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn mov r14, rax mov rdi, [rbx+8] test rdi, rdi jz short loc_7CE96 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_7CE96: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::serializer( long long a1, __int128 *a2, char a3, int a4) { char v6; // r15 __int128 v7; // xmm0 long long v8; // rax char *v9; // rcx char *v10; // rax char v11; // al long long result; // rax v6 = 0; *(_QWORD *)(a1 + 8) = 0LL; v7 = *a2; *((_QWORD *)a2 + 1) = 0LL; *(_OWORD *)a1 = v7; *(_QWORD *)a2 = 0LL; *(_OWORD *)(a1 + 64) = 0LL; *(_OWORD *)(a1 + 48) = 0LL; *(_OWORD *)(a1 + 32) = 0LL; *(_OWORD *)(a1 + 16) = 0LL; v8 = localeconv(a1); *(_QWORD *)(a1 + 80) = v8; v9 = *(char **)(v8 + 8); if ( v9 ) v6 = *v9; *(_BYTE *)(a1 + 88) = v6; v10 = *(char **)v8; if ( v10 ) v11 = *v10; else v11 = 0; *(_BYTE *)(a1 + 89) = v11; memset(a1 + 90, 0LL, 512LL); *(_BYTE *)(a1 + 602) = a3; *(_QWORD *)(a1 + 608) = a1 + 624; result = std::string::_M_construct(a1 + 608, 512LL, (unsigned int)a3); *(_DWORD *)(a1 + 640) = a4; return result; }
serializer: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBP,ECX MOV R14D,EDX MOV RBX,RDI XOR R15D,R15D MOV qword ptr [RDI + 0x8],R15 MOVUPS XMM0,xmmword ptr [RSI] MOV qword ptr [RSI + 0x8],R15 MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RSI],R15 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x40],XMM0 MOVUPS xmmword ptr [RDI + 0x30],XMM0 MOVUPS xmmword ptr [RDI + 0x20],XMM0 MOVUPS xmmword ptr [RDI + 0x10],XMM0 CALL 0x00118d50 MOV qword ptr [RBX + 0x50],RAX MOV RCX,qword ptr [RAX + 0x8] TEST RCX,RCX JZ 0x0017ce25 MOV R15B,byte ptr [RCX] LAB_0017ce25: MOV byte ptr [RBX + 0x58],R15B MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x0017ce35 MOV AL,byte ptr [RAX] JMP 0x0017ce37 LAB_0017ce35: XOR EAX,EAX LAB_0017ce37: MOV byte ptr [RBX + 0x59],AL LEA RDI,[RBX + 0x5a] MOV EDX,0x200 XOR ESI,ESI CALL 0x00118400 MOV byte ptr [RBX + 0x25a],R14B LEA RDI,[RBX + 0x260] LEA RAX,[RBX + 0x270] MOV qword ptr [RBX + 0x260],RAX LAB_0017ce66: MOVSX EDX,R14B MOV ESI,0x200 CALL 0x001187f0 LAB_0017ce74: MOV dword ptr [RBX + 0x280],EBP ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::detail::serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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> >::serializer(std::shared_ptr<nlohmann::json_abi_v3_11_3::detail::output_adapter_protocol<char> >, char, nlohmann::json_abi_v3_11_3::detail::error_handler_t) */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::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>> ::serializer(serializer<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,int8 *param_2, serializer<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_3,int4 param_4) { int8 uVar1; serializer<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>> sVar2; lconv *plVar3; sVar2 = (serializer<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>> )0x0; *(int8 *)(this + 8) = 0; uVar1 = param_2[1]; param_2[1] = 0; *(int8 *)this = *param_2; *(int8 *)(this + 8) = uVar1; *param_2 = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; plVar3 = localeconv(); *(lconv **)(this + 0x50) = plVar3; if ((serializer<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>> *)plVar3->thousands_sep != (serializer<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>> *)0x0) { sVar2 = *(serializer<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>> *)plVar3->thousands_sep; } this[0x58] = sVar2; if ((serializer<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>> *)plVar3->decimal_point == (serializer<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>> *)0x0) { sVar2 = (serializer<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>> )0x0; } else { sVar2 = *(serializer<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>> *)plVar3->decimal_point; } this[0x59] = sVar2; memset(this + 0x5a,0,0x200); this[0x25a] = param_3; *(serializer<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 + 0x260) = this + 0x270; /* try { // try from 0017ce66 to 0017ce73 has its CatchHandler @ 0017ce85 */ std::__cxx11::string::_M_construct((ulong)(this + 0x260),'\0'); *(int4 *)(this + 0x280) = param_4; return; }
16,674
nlohmann::json_abi_v3_11_3::basic_json<std::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>::set_parents()
msxemulator/build_O0/_deps/picotool-src/lib/nlohmann_json/single_include/nlohmann/json.hpp
void set_parents() { #if JSON_DIAGNOSTICS switch (m_data.m_type) { case value_t::array: { for (auto& element : *m_data.m_value.array) { element.m_parent = this; } break; } case value_t::object: { for (auto& element : *m_data.m_value.object) { element.second.m_parent = this; } break; } case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: break; } #endif }
O0
cpp
nlohmann::json_abi_v3_11_3::basic_json<std::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>::set_parents(): movq %rdi, -0x8(%rsp) retq nopw %cs:(%rax,%rax)
_ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE11set_parentsEv: mov [rsp+var_8], rdi retn
void nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::set_parents() { ; }
set_parents: MOV qword ptr [RSP + -0x8],RDI RET
/* nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::set_parents() */ void nlohmann::json_abi_v3_11_3:: basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::set_parents(void) { return; }
16,675
codegen_profile
tsotchke[P]eshkol/src/backend/codegen/debug.c
bool codegen_profile(CodegenContext* context, AstNode* ast) { assert(context != NULL); assert(ast != NULL); printf("Code Generation Profiling\n"); printf("========================\n\n"); // Make sure memory tracking is enabled bool was_enabled = memory_tracking_is_enabled(); memory_tracking_set_enabled(true); // Get binding system from context BindingSystem* binding_system = codegen_context_get_binding_system(context); if (!binding_system) { DiagnosticContext* diagnostics = codegen_context_get_diagnostics(context); diagnostic_error(diagnostics, 0, 0, "Binding system not available"); return false; } // Profile AST analysis phase ProfilingPhase ast_phase; start_profiling_phase(&ast_phase, "AST Analysis"); // Analyze the AST for closures and tail recursion char* ast_analysis = analyze_ast_for_closures_and_tail_recursion(ast, binding_system); if (ast_analysis) { printf("%s\n", ast_analysis); free(ast_analysis); } end_profiling_phase(&ast_phase); print_profiling_results(&ast_phase); // Profile IR generation phase ProfilingPhase ir_phase; start_profiling_phase(&ir_phase, "IR Generation"); // Generate IR for the AST (to a temporary buffer) FILE* ir_buffer = tmpfile(); if (ir_buffer) { generate_ir_for_node(ir_buffer, ast, 0); fclose(ir_buffer); } end_profiling_phase(&ir_phase); print_profiling_results(&ir_phase); // Profile C code generation phase ProfilingPhase c_phase; start_profiling_phase(&c_phase, "C Code Generation"); // Generate C code for the AST (to a temporary buffer) FILE* c_buffer = tmpfile(); if (c_buffer) { generate_c_code_for_node(c_buffer, ast, 0); fclose(c_buffer); } end_profiling_phase(&c_phase); print_profiling_results(&c_phase); // Profile closure analysis phase ProfilingPhase closure_phase; start_profiling_phase(&closure_phase, "Closure Analysis"); // Analyze closures in the AST if (ast->type == AST_PROGRAM) { for (size_t i = 0; i < ast->as.program.expr_count; i++) { const AstNode* expr = ast->as.program.exprs[i]; // Check for lambdas if (expr->type == AST_LAMBDA) { uint64_t lambda_id = binding_system_register_lambda(binding_system, expr->scope_id); if (lambda_id != 0) { // Analyze the environment chain for this lambda char* env_analysis = analyze_environment_chain(binding_system, lambda_id); if (env_analysis) { printf("%s\n", env_analysis); free(env_analysis); } } } // Check for lambda in define if (expr->type == AST_DEFINE && expr->as.define.value->type == AST_LAMBDA) { const AstNode* lambda = expr->as.define.value; uint64_t lambda_id = binding_system_register_lambda(binding_system, lambda->scope_id); if (lambda_id != 0) { // Analyze the environment chain for this lambda char* env_analysis = analyze_environment_chain(binding_system, lambda_id); if (env_analysis) { printf("%s\n", env_analysis); free(env_analysis); } } } } } end_profiling_phase(&closure_phase); print_profiling_results(&closure_phase); // Profile tail call optimization phase ProfilingPhase tail_call_phase; start_profiling_phase(&tail_call_phase, "Tail Call Optimization"); // Analyze tail call optimization opportunities char* tail_call_analysis = analyze_tail_call_optimization(ast); if (tail_call_analysis) { printf("%s\n", tail_call_analysis); free(tail_call_analysis); } end_profiling_phase(&tail_call_phase); print_profiling_results(&tail_call_phase); // Overall statistics printf("Overall Statistics\n"); printf("-----------------\n"); printf("Total Time: %.6f seconds\n", (double)((ast_phase.end_time - ast_phase.start_time) + (ir_phase.end_time - ir_phase.start_time) + (c_phase.end_time - c_phase.start_time) + (closure_phase.end_time - closure_phase.start_time) + (tail_call_phase.end_time - tail_call_phase.start_time)) / CLOCKS_PER_SEC); printf("Peak Memory Usage: %zu bytes\n", memory_tracking_get_stats().peak_bytes_allocated); printf("Total Allocations: %zu\n", memory_tracking_get_stats().total_allocations); // Restore memory tracking state memory_tracking_set_enabled(was_enabled); return true; }
O0
c
codegen_profile: pushq %rbp movq %rsp, %rbp subq $0x2e0, %rsp # imm = 0x2E0 movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) cmpq $0x0, -0x10(%rbp) je 0x1553c jmp 0x1555b leaq 0x11858(%rip), %rdi # 0x26d9b leaq 0x15de6(%rip), %rsi # 0x2b330 movl $0x19f, %edx # imm = 0x19F leaq 0x15f16(%rip), %rcx # 0x2b46c callq 0x2160 cmpq $0x0, -0x18(%rbp) je 0x15564 jmp 0x15583 leaq 0x13aac(%rip), %rdi # 0x29017 leaq 0x15dbe(%rip), %rsi # 0x2b330 movl $0x1a0, %edx # imm = 0x1A0 leaq 0x15eee(%rip), %rcx # 0x2b46c callq 0x2160 leaq 0x15f15(%rip), %rdi # 0x2b49f movb $0x0, %al callq 0x2120 leaq 0x15e5c(%rip), %rdi # 0x2b3f4 movb $0x0, %al callq 0x2120 callq 0x22790 andb $0x1, %al movb %al, -0x19(%rbp) movl $0x1, %edi callq 0x22740 movq -0x10(%rbp), %rdi callq 0x11a60 movq %rax, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) jne 0x155f1 movq -0x10(%rbp), %rdi callq 0x11690 movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rdi xorl %edx, %edx leaq 0x15ed9(%rip), %rcx # 0x2b4ba movl %edx, %esi callq 0x4840 movb $0x0, -0x1(%rbp) jmp 0x15a00 leaq -0x98(%rbp), %rdi leaq 0x15ed8(%rip), %rsi # 0x2b4d7 callq 0x15a10 movq -0x18(%rbp), %rdi movq -0x28(%rbp), %rsi callq 0x15ac0 movq %rax, -0xa0(%rbp) cmpq $0x0, -0xa0(%rbp) je 0x15643 movq -0xa0(%rbp), %rsi leaq 0x14346(%rip), %rdi # 0x29976 movb $0x0, %al callq 0x2120 movq -0xa0(%rbp), %rdi callq 0x2030 leaq -0x98(%rbp), %rdi callq 0x15ec0 leaq -0x98(%rbp), %rdi callq 0x15f40 leaq -0x108(%rbp), %rdi leaq 0x15e7b(%rip), %rsi # 0x2b4e4 callq 0x15a10 callq 0x21b0 movq %rax, -0x110(%rbp) cmpq $0x0, -0x110(%rbp) je 0x156a2 movq -0x110(%rbp), %rdi movq -0x18(%rbp), %rsi xorl %edx, %edx callq 0x143e0 movq -0x110(%rbp), %rdi callq 0x20d0 leaq -0x108(%rbp), %rdi callq 0x15ec0 leaq -0x108(%rbp), %rdi callq 0x15f40 leaq -0x178(%rbp), %rdi leaq 0x15e2a(%rip), %rsi # 0x2b4f2 callq 0x15a10 callq 0x21b0 movq %rax, -0x180(%rbp) cmpq $0x0, -0x180(%rbp) je 0x15701 movq -0x180(%rbp), %rdi movq -0x18(%rbp), %rsi xorl %edx, %edx callq 0x14f30 movq -0x180(%rbp), %rdi callq 0x20d0 leaq -0x178(%rbp), %rdi callq 0x15ec0 leaq -0x178(%rbp), %rdi callq 0x15f40 leaq -0x1e8(%rbp), %rdi leaq 0x15ddd(%rip), %rsi # 0x2b504 callq 0x15a10 movq -0x18(%rbp), %rax cmpl $0x1e, (%rax) jne 0x158a2 movq $0x0, -0x1f0(%rbp) movq -0x1f0(%rbp), %rax movq -0x18(%rbp), %rcx cmpq 0x50(%rcx), %rax jae 0x158a0 movq -0x18(%rbp), %rax movq 0x48(%rax), %rax movq -0x1f0(%rbp), %rcx movq (%rax,%rcx,8), %rax movq %rax, -0x1f8(%rbp) movq -0x1f8(%rbp), %rax cmpl $0x8, (%rax) jne 0x157ea movq -0x28(%rbp), %rdi movq -0x1f8(%rbp), %rax movq 0x30(%rax), %rsi callq 0x1ede0 movq %rax, -0x200(%rbp) cmpq $0x0, -0x200(%rbp) je 0x157e8 movq -0x28(%rbp), %rdi movq -0x200(%rbp), %rsi callq 0x16020 movq %rax, -0x208(%rbp) cmpq $0x0, -0x208(%rbp) je 0x157e6 movq -0x208(%rbp), %rsi leaq 0x141a3(%rip), %rdi # 0x29976 movb $0x0, %al callq 0x2120 movq -0x208(%rbp), %rdi callq 0x2030 jmp 0x157e8 jmp 0x157ea movq -0x1f8(%rbp), %rax cmpl $0x7, (%rax) jne 0x15887 movq -0x1f8(%rbp), %rax movq 0x50(%rax), %rax cmpl $0x8, (%rax) jne 0x15887 movq -0x1f8(%rbp), %rax movq 0x50(%rax), %rax movq %rax, -0x210(%rbp) movq -0x28(%rbp), %rdi movq -0x210(%rbp), %rax movq 0x30(%rax), %rsi callq 0x1ede0 movq %rax, -0x218(%rbp) cmpq $0x0, -0x218(%rbp) je 0x15885 movq -0x28(%rbp), %rdi movq -0x218(%rbp), %rsi callq 0x16020 movq %rax, -0x220(%rbp) cmpq $0x0, -0x220(%rbp) je 0x15883 movq -0x220(%rbp), %rsi leaq 0x14106(%rip), %rdi # 0x29976 movb $0x0, %al callq 0x2120 movq -0x220(%rbp), %rdi callq 0x2030 jmp 0x15885 jmp 0x15887 jmp 0x15889 movq -0x1f0(%rbp), %rax addq $0x1, %rax movq %rax, -0x1f0(%rbp) jmp 0x15744 jmp 0x158a2 leaq -0x1e8(%rbp), %rdi callq 0x15ec0 leaq -0x1e8(%rbp), %rdi callq 0x15f40 leaq -0x288(%rbp), %rdi leaq 0x15c4d(%rip), %rsi # 0x2b515 callq 0x15a10 movq -0x18(%rbp), %rdi callq 0x16290 movq %rax, -0x290(%rbp) cmpq $0x0, -0x290(%rbp) je 0x15908 movq -0x290(%rbp), %rsi leaq 0x14081(%rip), %rdi # 0x29976 movb $0x0, %al callq 0x2120 movq -0x290(%rbp), %rdi callq 0x2030 leaq -0x288(%rbp), %rdi callq 0x15ec0 leaq -0x288(%rbp), %rdi callq 0x15f40 leaq 0x15c05(%rip), %rdi # 0x2b52c movb $0x0, %al callq 0x2120 leaq 0x15b11(%rip), %rdi # 0x2b446 movb $0x0, %al callq 0x2120 movq -0x88(%rbp), %rax subq -0x90(%rbp), %rax movq -0xf8(%rbp), %rcx subq -0x100(%rbp), %rcx addq %rcx, %rax movq -0x168(%rbp), %rcx subq -0x170(%rbp), %rcx addq %rcx, %rax movq -0x1d8(%rbp), %rcx subq -0x1e0(%rbp), %rcx addq %rcx, %rax movq -0x278(%rbp), %rcx subq -0x280(%rbp), %rcx addq %rcx, %rax cvtsi2sd %rax, %xmm0 movsd 0x1598d(%rip), %xmm1 # 0x2b328 divsd %xmm1, %xmm0 leaq 0x15b9a(%rip), %rdi # 0x2b540 movb $0x1, %al callq 0x2120 leaq -0x2b8(%rbp), %rdi callq 0x226c0 movq -0x298(%rbp), %rsi leaq 0x15b93(%rip), %rdi # 0x2b55a movb $0x0, %al callq 0x2120 leaq -0x2e0(%rbp), %rdi callq 0x226c0 movq -0x2e0(%rbp), %rsi leaq 0x15b90(%rip), %rdi # 0x2b578 movb $0x0, %al callq 0x2120 movb -0x19(%rbp), %al andb $0x1, %al movzbl %al, %edi callq 0x22740 movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x2e0, %rsp # imm = 0x2E0 popq %rbp retq nop
codegen_profile: push rbp mov rbp, rsp sub rsp, 2E0h mov [rbp+var_10], rdi mov [rbp+var_18], rsi cmp [rbp+var_10], 0 jz short loc_1553C jmp short loc_1555B loc_1553C: lea rdi, aContextNull; "context != NULL" lea rsi, aWorkspaceLlm4b_13; "/workspace/llm4binary/github/2025_star3"... mov edx, 19Fh lea rcx, aBoolCodegenPro; "_Bool codegen_profile(CodegenContext *,"... call ___assert_fail loc_1555B: cmp [rbp+var_18], 0 jz short loc_15564 jmp short loc_15583 loc_15564: lea rdi, aAstNull; "ast != NULL" lea rsi, aWorkspaceLlm4b_13; "/workspace/llm4binary/github/2025_star3"... mov edx, 1A0h lea rcx, aBoolCodegenPro; "_Bool codegen_profile(CodegenContext *,"... call ___assert_fail loc_15583: lea rdi, aCodeGeneration_2; "Code Generation Profiling\n" mov al, 0 call _printf lea rdi, asc_2B3F1+3; "========================\n\n" mov al, 0 call _printf call memory_tracking_is_enabled and al, 1 mov [rbp+var_19], al mov edi, 1 call memory_tracking_set_enabled mov rdi, [rbp+var_10] call codegen_context_get_binding_system mov [rbp+var_28], rax cmp [rbp+var_28], 0 jnz short loc_155F1 mov rdi, [rbp+var_10] call codegen_context_get_diagnostics mov [rbp+var_30], rax mov rdi, [rbp+var_30] xor edx, edx lea rcx, aBindingSystemN; "Binding system not available" mov esi, edx call diagnostic_error mov [rbp+var_1], 0 jmp loc_15A00 loc_155F1: lea rdi, [rbp+var_98] lea rsi, aAstAnalysis; "AST Analysis" call start_profiling_phase mov rdi, [rbp+var_18] mov rsi, [rbp+var_28] call analyze_ast_for_closures_and_tail_recursion mov [rbp+var_A0], rax cmp [rbp+var_A0], 0 jz short loc_15643 mov rsi, [rbp+var_A0] lea rdi, aNodeS+6; "%s\n" mov al, 0 call _printf mov rdi, [rbp+var_A0] call _free loc_15643: lea rdi, [rbp+var_98] call end_profiling_phase lea rdi, [rbp+var_98] call print_profiling_results lea rdi, [rbp+var_108] lea rsi, aIrGeneration; "IR Generation" call start_profiling_phase call _tmpfile mov [rbp+var_110], rax cmp [rbp+var_110], 0 jz short loc_156A2 mov rdi, [rbp+var_110] mov rsi, [rbp+var_18] xor edx, edx call generate_ir_for_node mov rdi, [rbp+var_110] call _fclose loc_156A2: lea rdi, [rbp+var_108] call end_profiling_phase lea rdi, [rbp+var_108] call print_profiling_results lea rdi, [rbp+var_178] lea rsi, aCCodeGeneratio; "C Code Generation" call start_profiling_phase call _tmpfile mov [rbp+var_180], rax cmp [rbp+var_180], 0 jz short loc_15701 mov rdi, [rbp+var_180] mov rsi, [rbp+var_18] xor edx, edx call generate_c_code_for_node mov rdi, [rbp+var_180] call _fclose loc_15701: lea rdi, [rbp+var_178] call end_profiling_phase lea rdi, [rbp+var_178] call print_profiling_results lea rdi, [rbp+var_1E8] lea rsi, aClosureAnalysi; "Closure Analysis" call start_profiling_phase mov rax, [rbp+var_18] cmp dword ptr [rax], 1Eh jnz loc_158A2 mov [rbp+var_1F0], 0 loc_15744: mov rax, [rbp+var_1F0] mov rcx, [rbp+var_18] cmp rax, [rcx+50h] jnb loc_158A0 mov rax, [rbp+var_18] mov rax, [rax+48h] mov rcx, [rbp+var_1F0] mov rax, [rax+rcx*8] mov [rbp+var_1F8], rax mov rax, [rbp+var_1F8] cmp dword ptr [rax], 8 jnz short loc_157EA mov rdi, [rbp+var_28] mov rax, [rbp+var_1F8] mov rsi, [rax+30h] call binding_system_register_lambda mov [rbp+var_200], rax cmp [rbp+var_200], 0 jz short loc_157E8 mov rdi, [rbp+var_28] mov rsi, [rbp+var_200] call analyze_environment_chain mov [rbp+var_208], rax cmp [rbp+var_208], 0 jz short loc_157E6 mov rsi, [rbp+var_208] lea rdi, aNodeS+6; "%s\n" mov al, 0 call _printf mov rdi, [rbp+var_208] call _free loc_157E6: jmp short $+2 loc_157E8: jmp short $+2 loc_157EA: mov rax, [rbp+var_1F8] cmp dword ptr [rax], 7 jnz loc_15887 mov rax, [rbp+var_1F8] mov rax, [rax+50h] cmp dword ptr [rax], 8 jnz short loc_15887 mov rax, [rbp+var_1F8] mov rax, [rax+50h] mov [rbp+var_210], rax mov rdi, [rbp+var_28] mov rax, [rbp+var_210] mov rsi, [rax+30h] call binding_system_register_lambda mov [rbp+var_218], rax cmp [rbp+var_218], 0 jz short loc_15885 mov rdi, [rbp+var_28] mov rsi, [rbp+var_218] call analyze_environment_chain mov [rbp+var_220], rax cmp [rbp+var_220], 0 jz short loc_15883 mov rsi, [rbp+var_220] lea rdi, aNodeS+6; "%s\n" mov al, 0 call _printf mov rdi, [rbp+var_220] call _free loc_15883: jmp short $+2 loc_15885: jmp short $+2 loc_15887: jmp short $+2 loc_15889: mov rax, [rbp+var_1F0] add rax, 1 mov [rbp+var_1F0], rax jmp loc_15744 loc_158A0: jmp short $+2 loc_158A2: lea rdi, [rbp+var_1E8] call end_profiling_phase lea rdi, [rbp+var_1E8] call print_profiling_results lea rdi, [rbp+var_288] lea rsi, aTailCallOptimi; "Tail Call Optimization" call start_profiling_phase mov rdi, [rbp+var_18] call analyze_tail_call_optimization mov [rbp+var_290], rax cmp [rbp+var_290], 0 jz short loc_15908 mov rsi, [rbp+var_290] lea rdi, aNodeS+6; "%s\n" mov al, 0 call _printf mov rdi, [rbp+var_290] call _free loc_15908: lea rdi, [rbp+var_288] call end_profiling_phase lea rdi, [rbp+var_288] call print_profiling_results lea rdi, aOverallStatist; "Overall Statistics\n" mov al, 0 call _printf lea rdi, asc_2B43D+9; "-----------------\n" mov al, 0 call _printf mov rax, [rbp+var_88] sub rax, [rbp+var_90] mov rcx, [rbp+var_F8] sub rcx, [rbp+var_100] add rax, rcx mov rcx, [rbp+var_168] sub rcx, [rbp+var_170] add rax, rcx mov rcx, [rbp+var_1D8] sub rcx, [rbp+var_1E0] add rax, rcx mov rcx, [rbp+var_278] sub rcx, [rbp+var_280] add rax, rcx cvtsi2sd xmm0, rax movsd xmm1, cs:qword_2B328 divsd xmm0, xmm1 lea rdi, aTotalTime6fSec; "Total Time: %.6f seconds\n" mov al, 1 call _printf lea rdi, [rbp+var_2B8] call memory_tracking_get_stats mov rsi, [rbp+var_298] lea rdi, aPeakMemoryUsag; "Peak Memory Usage: %zu bytes\n" mov al, 0 call _printf lea rdi, [rbp+var_2E0] call memory_tracking_get_stats mov rsi, [rbp+var_2E0] lea rdi, aTotalAllocatio; "Total Allocations: %zu\n" mov al, 0 call _printf mov al, [rbp+var_19] and al, 1 movzx edi, al call memory_tracking_set_enabled mov [rbp+var_1], 1 loc_15A00: mov al, [rbp+var_1] and al, 1 add rsp, 2E0h pop rbp retn
char codegen_profile(long long a1, long long a2) { size_t v3[5]; // [rsp+0h] [rbp-2E0h] BYREF _BYTE v4[32]; // [rsp+28h] [rbp-2B8h] BYREF size_t v5; // [rsp+48h] [rbp-298h] const char *v6; // [rsp+50h] [rbp-290h] _BYTE v7[8]; // [rsp+58h] [rbp-288h] BYREF long long v8; // [rsp+60h] [rbp-280h] long long v9; // [rsp+68h] [rbp-278h] const char *v10; // [rsp+C0h] [rbp-220h] long long v11; // [rsp+C8h] [rbp-218h] long long v12; // [rsp+D0h] [rbp-210h] const char *v13; // [rsp+D8h] [rbp-208h] long long v14; // [rsp+E0h] [rbp-200h] long long v15; // [rsp+E8h] [rbp-1F8h] unsigned long long i; // [rsp+F0h] [rbp-1F0h] _BYTE v17[8]; // [rsp+F8h] [rbp-1E8h] BYREF long long v18; // [rsp+100h] [rbp-1E0h] long long v19; // [rsp+108h] [rbp-1D8h] long long v20; // [rsp+160h] [rbp-180h] _BYTE v21[8]; // [rsp+168h] [rbp-178h] BYREF long long v22; // [rsp+170h] [rbp-170h] long long v23; // [rsp+178h] [rbp-168h] long long v24; // [rsp+1D0h] [rbp-110h] _BYTE v25[8]; // [rsp+1D8h] [rbp-108h] BYREF long long v26; // [rsp+1E0h] [rbp-100h] long long v27; // [rsp+1E8h] [rbp-F8h] const char *v28; // [rsp+240h] [rbp-A0h] _BYTE v29[8]; // [rsp+248h] [rbp-98h] BYREF long long v30; // [rsp+250h] [rbp-90h] long long v31; // [rsp+258h] [rbp-88h] long long *diagnostics; // [rsp+2B0h] [rbp-30h] long long binding_system; // [rsp+2B8h] [rbp-28h] char v34; // [rsp+2C7h] [rbp-19h] long long v35; // [rsp+2C8h] [rbp-18h] long long v36; // [rsp+2D0h] [rbp-10h] v36 = a1; v35 = a2; if ( !a1 ) __assert_fail( "context != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/debug.c", 415LL, "_Bool codegen_profile(CodegenContext *, AstNode *)"); if ( !v35 ) __assert_fail( "ast != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/debug.c", 416LL, "_Bool codegen_profile(CodegenContext *, AstNode *)"); printf("Code Generation Profiling\n"); printf("========================\n\n"); v34 = memory_tracking_is_enabled() & 1; memory_tracking_set_enabled(1LL); binding_system = codegen_context_get_binding_system(v36); if ( binding_system ) { start_profiling_phase(v29, "AST Analysis"); v28 = (const char *)analyze_ast_for_closures_and_tail_recursion(v35, binding_system); if ( v28 ) { printf("%s\n", v28); free(v28); } end_profiling_phase(v29); print_profiling_results(v29); start_profiling_phase(v25, "IR Generation"); v24 = tmpfile(); if ( v24 ) { generate_ir_for_node(v24, v35, 0); fclose(v24); } end_profiling_phase(v25); print_profiling_results(v25); start_profiling_phase(v21, "C Code Generation"); v20 = tmpfile(); if ( v20 ) { generate_c_code_for_node(v20, v35, 0); fclose(v20); } end_profiling_phase(v21); print_profiling_results(v21); start_profiling_phase(v17, "Closure Analysis"); if ( *(_DWORD *)v35 == 30 ) { for ( i = 0LL; i < *(_QWORD *)(v35 + 80); ++i ) { v15 = *(_QWORD *)(*(_QWORD *)(v35 + 72) + 8 * i); if ( *(_DWORD *)v15 == 8 ) { v14 = binding_system_register_lambda(binding_system, *(_QWORD *)(v15 + 48)); if ( v14 ) { v13 = (const char *)analyze_environment_chain(binding_system, v14); if ( v13 ) { printf("%s\n", v13); free(v13); } } } if ( *(_DWORD *)v15 == 7 && **(_DWORD **)(v15 + 80) == 8 ) { v12 = *(_QWORD *)(v15 + 80); v11 = binding_system_register_lambda(binding_system, *(_QWORD *)(v12 + 48)); if ( v11 ) { v10 = (const char *)analyze_environment_chain(binding_system, v11); if ( v10 ) { printf("%s\n", v10); free(v10); } } } } } end_profiling_phase(v17); print_profiling_results(v17); start_profiling_phase(v7, "Tail Call Optimization"); v6 = (const char *)analyze_tail_call_optimization(v35); if ( v6 ) { printf("%s\n", v6); free(v6); } end_profiling_phase(v7); print_profiling_results(v7); printf("Overall Statistics\n"); printf("-----------------\n"); printf( "Total Time: %.6f seconds\n", (double)((int)v9 - (int)v8 + (int)v19 - (int)v18 + (int)v23 - (int)v22 + (int)v27 - (int)v26 + (int)v31 - (int)v30) / 1000000.0); memory_tracking_get_stats(v4); printf("Peak Memory Usage: %zu bytes\n", v5); memory_tracking_get_stats(v3); printf("Total Allocations: %zu\n", v3[0]); memory_tracking_set_enabled(v34 & 1); return 1; } else { diagnostics = (long long *)codegen_context_get_diagnostics(v36); diagnostic_error(diagnostics, 0, 0, (long long)"Binding system not available"); return 0; } }
codegen_profile: PUSH RBP MOV RBP,RSP SUB RSP,0x2e0 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI CMP qword ptr [RBP + -0x10],0x0 JZ 0x0011553c JMP 0x0011555b LAB_0011553c: LEA RDI,[0x126d9b] LEA RSI,[0x12b330] MOV EDX,0x19f LEA RCX,[0x12b46c] CALL 0x00102160 LAB_0011555b: CMP qword ptr [RBP + -0x18],0x0 JZ 0x00115564 JMP 0x00115583 LAB_00115564: LEA RDI,[0x129017] LEA RSI,[0x12b330] MOV EDX,0x1a0 LEA RCX,[0x12b46c] CALL 0x00102160 LAB_00115583: LEA RDI,[0x12b49f] MOV AL,0x0 CALL 0x00102120 LEA RDI,[0x12b3f4] MOV AL,0x0 CALL 0x00102120 CALL 0x00122790 AND AL,0x1 MOV byte ptr [RBP + -0x19],AL MOV EDI,0x1 CALL 0x00122740 MOV RDI,qword ptr [RBP + -0x10] CALL 0x00111a60 MOV qword ptr [RBP + -0x28],RAX CMP qword ptr [RBP + -0x28],0x0 JNZ 0x001155f1 MOV RDI,qword ptr [RBP + -0x10] CALL 0x00111690 MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x30] XOR EDX,EDX LEA RCX,[0x12b4ba] MOV ESI,EDX CALL 0x00104840 MOV byte ptr [RBP + -0x1],0x0 JMP 0x00115a00 LAB_001155f1: LEA RDI,[RBP + -0x98] LEA RSI,[0x12b4d7] CALL 0x00115a10 MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x28] CALL 0x00115ac0 MOV qword ptr [RBP + -0xa0],RAX CMP qword ptr [RBP + -0xa0],0x0 JZ 0x00115643 MOV RSI,qword ptr [RBP + -0xa0] LEA RDI,[0x129976] MOV AL,0x0 CALL 0x00102120 MOV RDI,qword ptr [RBP + -0xa0] CALL 0x00102030 LAB_00115643: LEA RDI,[RBP + -0x98] CALL 0x00115ec0 LEA RDI,[RBP + -0x98] CALL 0x00115f40 LEA RDI,[RBP + -0x108] LEA RSI,[0x12b4e4] CALL 0x00115a10 CALL 0x001021b0 MOV qword ptr [RBP + -0x110],RAX CMP qword ptr [RBP + -0x110],0x0 JZ 0x001156a2 MOV RDI,qword ptr [RBP + -0x110] MOV RSI,qword ptr [RBP + -0x18] XOR EDX,EDX CALL 0x001143e0 MOV RDI,qword ptr [RBP + -0x110] CALL 0x001020d0 LAB_001156a2: LEA RDI,[RBP + -0x108] CALL 0x00115ec0 LEA RDI,[RBP + -0x108] CALL 0x00115f40 LEA RDI,[RBP + -0x178] LEA RSI,[0x12b4f2] CALL 0x00115a10 CALL 0x001021b0 MOV qword ptr [RBP + -0x180],RAX CMP qword ptr [RBP + -0x180],0x0 JZ 0x00115701 MOV RDI,qword ptr [RBP + -0x180] MOV RSI,qword ptr [RBP + -0x18] XOR EDX,EDX CALL 0x00114f30 MOV RDI,qword ptr [RBP + -0x180] CALL 0x001020d0 LAB_00115701: LEA RDI,[RBP + -0x178] CALL 0x00115ec0 LEA RDI,[RBP + -0x178] CALL 0x00115f40 LEA RDI,[RBP + -0x1e8] LEA RSI,[0x12b504] CALL 0x00115a10 MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX],0x1e JNZ 0x001158a2 MOV qword ptr [RBP + -0x1f0],0x0 LAB_00115744: MOV RAX,qword ptr [RBP + -0x1f0] MOV RCX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RCX + 0x50] JNC 0x001158a0 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x48] MOV RCX,qword ptr [RBP + -0x1f0] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x1f8],RAX MOV RAX,qword ptr [RBP + -0x1f8] CMP dword ptr [RAX],0x8 JNZ 0x001157ea MOV RDI,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x1f8] MOV RSI,qword ptr [RAX + 0x30] CALL 0x0011ede0 MOV qword ptr [RBP + -0x200],RAX CMP qword ptr [RBP + -0x200],0x0 JZ 0x001157e8 MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x200] CALL 0x00116020 MOV qword ptr [RBP + -0x208],RAX CMP qword ptr [RBP + -0x208],0x0 JZ 0x001157e6 MOV RSI,qword ptr [RBP + -0x208] LEA RDI,[0x129976] MOV AL,0x0 CALL 0x00102120 MOV RDI,qword ptr [RBP + -0x208] CALL 0x00102030 LAB_001157e6: JMP 0x001157e8 LAB_001157e8: JMP 0x001157ea LAB_001157ea: MOV RAX,qword ptr [RBP + -0x1f8] CMP dword ptr [RAX],0x7 JNZ 0x00115887 MOV RAX,qword ptr [RBP + -0x1f8] MOV RAX,qword ptr [RAX + 0x50] CMP dword ptr [RAX],0x8 JNZ 0x00115887 MOV RAX,qword ptr [RBP + -0x1f8] MOV RAX,qword ptr [RAX + 0x50] MOV qword ptr [RBP + -0x210],RAX MOV RDI,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x210] MOV RSI,qword ptr [RAX + 0x30] CALL 0x0011ede0 MOV qword ptr [RBP + -0x218],RAX CMP qword ptr [RBP + -0x218],0x0 JZ 0x00115885 MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x218] CALL 0x00116020 MOV qword ptr [RBP + -0x220],RAX CMP qword ptr [RBP + -0x220],0x0 JZ 0x00115883 MOV RSI,qword ptr [RBP + -0x220] LEA RDI,[0x129976] MOV AL,0x0 CALL 0x00102120 MOV RDI,qword ptr [RBP + -0x220] CALL 0x00102030 LAB_00115883: JMP 0x00115885 LAB_00115885: JMP 0x00115887 LAB_00115887: JMP 0x00115889 LAB_00115889: MOV RAX,qword ptr [RBP + -0x1f0] ADD RAX,0x1 MOV qword ptr [RBP + -0x1f0],RAX JMP 0x00115744 LAB_001158a0: JMP 0x001158a2 LAB_001158a2: LEA RDI,[RBP + -0x1e8] CALL 0x00115ec0 LEA RDI,[RBP + -0x1e8] CALL 0x00115f40 LEA RDI,[RBP + -0x288] LEA RSI,[0x12b515] CALL 0x00115a10 MOV RDI,qword ptr [RBP + -0x18] CALL 0x00116290 MOV qword ptr [RBP + -0x290],RAX CMP qword ptr [RBP + -0x290],0x0 JZ 0x00115908 MOV RSI,qword ptr [RBP + -0x290] LEA RDI,[0x129976] MOV AL,0x0 CALL 0x00102120 MOV RDI,qword ptr [RBP + -0x290] CALL 0x00102030 LAB_00115908: LEA RDI,[RBP + -0x288] CALL 0x00115ec0 LEA RDI,[RBP + -0x288] CALL 0x00115f40 LEA RDI,[0x12b52c] MOV AL,0x0 CALL 0x00102120 LEA RDI,[0x12b446] MOV AL,0x0 CALL 0x00102120 MOV RAX,qword ptr [RBP + -0x88] SUB RAX,qword ptr [RBP + -0x90] MOV RCX,qword ptr [RBP + -0xf8] SUB RCX,qword ptr [RBP + -0x100] ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x168] SUB RCX,qword ptr [RBP + -0x170] ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x1d8] SUB RCX,qword ptr [RBP + -0x1e0] ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x278] SUB RCX,qword ptr [RBP + -0x280] ADD RAX,RCX CVTSI2SD XMM0,RAX MOVSD XMM1,qword ptr [0x0012b328] DIVSD XMM0,XMM1 LEA RDI,[0x12b540] MOV AL,0x1 CALL 0x00102120 LEA RDI,[RBP + -0x2b8] CALL 0x001226c0 MOV RSI,qword ptr [RBP + -0x298] LEA RDI,[0x12b55a] MOV AL,0x0 CALL 0x00102120 LEA RDI,[RBP + -0x2e0] CALL 0x001226c0 MOV RSI,qword ptr [RBP + -0x2e0] LEA RDI,[0x12b578] MOV AL,0x0 CALL 0x00102120 MOV AL,byte ptr [RBP + -0x19] AND AL,0x1 MOVZX EDI,AL CALL 0x00122740 MOV byte ptr [RBP + -0x1],0x1 LAB_00115a00: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x2e0 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int1 codegen_profile(long param_1,int *param_2) { int8 local_2e8 [5]; int1 local_2c0 [32]; int8 local_2a0; void *local_298; int1 local_290 [8]; long local_288; long local_280; void *local_228; long local_220; long local_218; void *local_210; long local_208; int *local_200; ulong local_1f8; int1 local_1f0 [8]; long local_1e8; long local_1e0; FILE *local_188; int1 local_180 [8]; long local_178; long local_170; FILE *local_118; int1 local_110 [8]; long local_108; long local_100; void *local_a8; int1 local_a0 [8]; long local_98; long local_90; int8 local_38; long local_30; byte local_21; int *local_20; long local_18; int1 local_9; local_20 = param_2; local_18 = param_1; if (param_1 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("context != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/debug.c" ,0x19f,"_Bool codegen_profile(CodegenContext *, AstNode *)"); } if (param_2 == (int *)0x0) { /* WARNING: Subroutine does not return */ __assert_fail("ast != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/debug.c" ,0x1a0,"_Bool codegen_profile(CodegenContext *, AstNode *)"); } printf("Code Generation Profiling\n"); printf("========================\n\n"); local_21 = memory_tracking_is_enabled(); local_21 = local_21 & 1; memory_tracking_set_enabled(1); local_30 = codegen_context_get_binding_system(local_18); if (local_30 == 0) { local_38 = codegen_context_get_diagnostics(local_18); diagnostic_error(local_38,0,0,"Binding system not available"); local_9 = 0; } else { start_profiling_phase(local_a0,"AST Analysis"); local_a8 = (void *)analyze_ast_for_closures_and_tail_recursion(local_20,local_30); if (local_a8 != (void *)0x0) { printf("%s\n",local_a8); free(local_a8); } end_profiling_phase(local_a0); print_profiling_results(local_a0); start_profiling_phase(local_110,"IR Generation"); local_118 = tmpfile(); if (local_118 != (FILE *)0x0) { generate_ir_for_node(local_118,local_20,0); fclose(local_118); } end_profiling_phase(local_110); print_profiling_results(local_110); start_profiling_phase(local_180,"C Code Generation"); local_188 = tmpfile(); if (local_188 != (FILE *)0x0) { generate_c_code_for_node(local_188,local_20,0); fclose(local_188); } end_profiling_phase(local_180); print_profiling_results(local_180); start_profiling_phase(local_1f0,"Closure Analysis"); if (*local_20 == 0x1e) { for (local_1f8 = 0; local_1f8 < *(ulong *)(local_20 + 0x14); local_1f8 = local_1f8 + 1) { local_200 = *(int **)(*(long *)(local_20 + 0x12) + local_1f8 * 8); if (((*local_200 == 8) && (local_208 = binding_system_register_lambda(local_30,*(int8 *)(local_200 + 0xc)), local_208 != 0)) && (local_210 = (void *)analyze_environment_chain(local_30,local_208), local_210 != (void *)0x0)) { printf("%s\n",local_210); free(local_210); } if ((*local_200 == 7) && (**(int **)(local_200 + 0x14) == 8)) { local_218 = *(long *)(local_200 + 0x14); local_220 = binding_system_register_lambda(local_30,*(int8 *)(local_218 + 0x30)); if ((local_220 != 0) && (local_228 = (void *)analyze_environment_chain(local_30,local_220), local_228 != (void *)0x0)) { printf("%s\n",local_228); free(local_228); } } } } end_profiling_phase(local_1f0); print_profiling_results(local_1f0); start_profiling_phase(local_290,"Tail Call Optimization"); local_298 = (void *)analyze_tail_call_optimization(local_20); if (local_298 != (void *)0x0) { printf("%s\n",local_298); free(local_298); } end_profiling_phase(local_290); print_profiling_results(local_290); printf("Overall Statistics\n"); printf("-----------------\n"); printf("Total Time: %.6f seconds\n", (double)((local_90 - local_98) + (local_100 - local_108) + (local_170 - local_178) + (local_1e0 - local_1e8) + (local_280 - local_288)) / _DAT_0012b328); memory_tracking_get_stats(local_2c0); printf("Peak Memory Usage: %zu bytes\n",local_2a0); memory_tracking_get_stats(local_2e8); printf("Total Allocations: %zu\n",local_2e8[0]); memory_tracking_set_enabled(local_21 & 1); local_9 = 1; } return local_9; }
16,676
translog_get_total_chunk_length
eloqsql/storage/maria/ma_loghandler.c
static uint16 translog_get_total_chunk_length(uchar *page, uint16 offset) { DBUG_ENTER("translog_get_total_chunk_length"); switch (page[offset] & TRANSLOG_CHUNK_TYPE) { case TRANSLOG_CHUNK_LSN: { /* 0 chunk referred as LSN (head or tail) */ translog_size_t rec_len; uchar *start= page + offset; uchar *ptr= start + 1 + 2; /* chunk type and short trid */ uint16 chunk_len, header_len, page_rest; DBUG_PRINT("info", ("TRANSLOG_CHUNK_LSN")); rec_len= translog_variable_record_1group_decode_len(&ptr); chunk_len= uint2korr(ptr); header_len= (uint16) (ptr -start) + 2; DBUG_PRINT("info", ("rec len: %lu chunk len: %u header len: %u", (ulong) rec_len, (uint) chunk_len, (uint) header_len)); if (chunk_len) { DBUG_PRINT("info", ("chunk len: %u + %u = %u", (uint) header_len, (uint) chunk_len, (uint) (chunk_len + header_len))); DBUG_RETURN(chunk_len + header_len); } page_rest= TRANSLOG_PAGE_SIZE - offset; DBUG_PRINT("info", ("page_rest %u", (uint) page_rest)); if (rec_len + header_len < page_rest) DBUG_RETURN(rec_len + header_len); DBUG_RETURN(page_rest); } case TRANSLOG_CHUNK_FIXED: { uchar *ptr; uint type= page[offset] & TRANSLOG_REC_TYPE; uint length; int i; /* 1 (pseudo)fixed record (also LSN) */ DBUG_PRINT("info", ("TRANSLOG_CHUNK_FIXED")); DBUG_ASSERT(log_record_type_descriptor[type].rclass == LOGRECTYPE_FIXEDLENGTH || log_record_type_descriptor[type].rclass == LOGRECTYPE_PSEUDOFIXEDLENGTH); if (log_record_type_descriptor[type].rclass == LOGRECTYPE_FIXEDLENGTH) { DBUG_PRINT("info", ("Fixed length: %u", (uint) (log_record_type_descriptor[type].fixed_length + 3))); DBUG_RETURN(log_record_type_descriptor[type].fixed_length + 3); } ptr= page + offset + 3; /* first compressed LSN */ length= log_record_type_descriptor[type].fixed_length + 3; for (i= 0; i < log_record_type_descriptor[type].compressed_LSN; i++) { /* first 2 bits is length - 2 */ uint len= (((uint8) (*ptr)) >> 6) + 2; if (ptr[0] == 0 && ((uint8) ptr[1]) == 1) len+= LSN_STORE_SIZE; /* case of full LSN storing */ ptr+= len; /* subtract saved bytes */ length-= (LSN_STORE_SIZE - len); } DBUG_PRINT("info", ("Pseudo-fixed length: %u", length)); DBUG_RETURN(length); } case TRANSLOG_CHUNK_NOHDR: /* 2 no header chunk (till page end) */ DBUG_PRINT("info", ("TRANSLOG_CHUNK_NOHDR length: %u", (uint) (TRANSLOG_PAGE_SIZE - offset))); DBUG_RETURN(TRANSLOG_PAGE_SIZE - offset); case TRANSLOG_CHUNK_LNGTH: /* 3 chunk with chunk length */ DBUG_PRINT("info", ("TRANSLOG_CHUNK_LNGTH")); DBUG_ASSERT(TRANSLOG_PAGE_SIZE - offset >= 3); DBUG_PRINT("info", ("length: %u", uint2korr(page + offset + 1) + 3)); DBUG_RETURN(uint2korr(page + offset + 1) + 3); default: DBUG_ASSERT(0); DBUG_RETURN(0); } }
O0
c
translog_get_total_chunk_length: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movw %si, %ax movq %rdi, -0x10(%rbp) movw %ax, -0x12(%rbp) movq -0x10(%rbp), %rax movzwl -0x12(%rbp), %ecx movzbl (%rax,%rcx), %eax andl $0xc0, %eax movl %eax, -0x4c(%rbp) je 0x3060c jmp 0x305db movl -0x4c(%rbp), %eax subl $0x40, %eax je 0x306c3 jmp 0x305e9 movl -0x4c(%rbp), %eax subl $0x80, %eax je 0x307e0 jmp 0x305f9 movl -0x4c(%rbp), %eax subl $0xc0, %eax je 0x307f7 jmp 0x3081e movq -0x10(%rbp), %rax movzwl -0x12(%rbp), %ecx movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax addq $0x1, %rax addq $0x2, %rax movq %rax, -0x28(%rbp) jmp 0x30630 leaq -0x28(%rbp), %rdi callq 0x36e20 movl %eax, -0x18(%rbp) movq -0x28(%rbp), %rax movw (%rax), %ax movw %ax, -0x2a(%rbp) movq -0x28(%rbp), %rax movq -0x20(%rbp), %rcx subq %rcx, %rax movzwl %ax, %eax addl $0x2, %eax movw %ax, -0x2c(%rbp) jmp 0x3065e cmpw $0x0, -0x2a(%rbp) je 0x3067e jmp 0x30667 jmp 0x30669 jmp 0x3066b movzwl -0x2a(%rbp), %eax movzwl -0x2c(%rbp), %ecx addl %ecx, %eax movw %ax, -0x2(%rbp) jmp 0x3082a movzwl -0x12(%rbp), %ecx movl $0x2000, %eax # imm = 0x2000 subl %ecx, %eax movw %ax, -0x2e(%rbp) jmp 0x3068f movl -0x18(%rbp), %eax movzwl -0x2c(%rbp), %ecx addl %ecx, %eax movzwl -0x2e(%rbp), %ecx cmpl %ecx, %eax jae 0x306b4 jmp 0x306a2 movl -0x18(%rbp), %eax movzwl -0x2c(%rbp), %ecx addl %ecx, %eax movw %ax, -0x2(%rbp) jmp 0x3082a jmp 0x306b6 movw -0x2e(%rbp), %ax movw %ax, -0x2(%rbp) jmp 0x3082a movq -0x10(%rbp), %rax movzwl -0x12(%rbp), %ecx movzbl (%rax,%rcx), %eax andl $0x3f, %eax movl %eax, -0x3c(%rbp) jmp 0x306d7 jmp 0x306d9 jmp 0x306db movl -0x3c(%rbp), %eax movl %eax, %ecx leaq 0x447389(%rip), %rax # 0x477a70 imulq $0x48, %rcx, %rcx addq %rcx, %rax cmpl $0x3, (%rax) jne 0x3071c jmp 0x306f5 jmp 0x306f7 jmp 0x306f9 movl -0x3c(%rbp), %eax movl %eax, %ecx leaq 0x44736b(%rip), %rax # 0x477a70 imulq $0x48, %rcx, %rcx addq %rcx, %rax movzwl 0x4(%rax), %eax addl $0x3, %eax movw %ax, -0x2(%rbp) jmp 0x3082a movq -0x10(%rbp), %rax movzwl -0x12(%rbp), %ecx movslq %ecx, %rcx addq %rcx, %rax addq $0x3, %rax movq %rax, -0x38(%rbp) movl -0x3c(%rbp), %eax movl %eax, %ecx leaq 0x447332(%rip), %rax # 0x477a70 imulq $0x48, %rcx, %rcx addq %rcx, %rax movzwl 0x4(%rax), %eax addl $0x3, %eax movl %eax, -0x40(%rbp) movl $0x0, -0x44(%rbp) movl -0x44(%rbp), %eax movl -0x3c(%rbp), %ecx movl %ecx, %edx leaq 0x44730b(%rip), %rcx # 0x477a70 imulq $0x48, %rdx, %rdx addq %rdx, %rcx movswl 0x20(%rcx), %ecx cmpl %ecx, %eax jge 0x307d1 movq -0x38(%rbp), %rax movzbl (%rax), %eax sarl $0x6, %eax addl $0x2, %eax movl %eax, -0x48(%rbp) movq -0x38(%rbp), %rax movzbl (%rax), %eax cmpl $0x0, %eax jne 0x307a6 movq -0x38(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x1, %eax jne 0x307a6 movl -0x48(%rbp), %eax addl $0x7, %eax movl %eax, -0x48(%rbp) movl -0x48(%rbp), %ecx movq -0x38(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x38(%rbp) movl $0x7, %ecx subl -0x48(%rbp), %ecx movl -0x40(%rbp), %eax subl %ecx, %eax movl %eax, -0x40(%rbp) movl -0x44(%rbp), %eax addl $0x1, %eax movl %eax, -0x44(%rbp) jmp 0x30756 jmp 0x307d3 jmp 0x307d5 jmp 0x307d7 movl -0x40(%rbp), %eax movw %ax, -0x2(%rbp) jmp 0x3082a jmp 0x307e2 jmp 0x307e4 jmp 0x307e6 movzwl -0x12(%rbp), %ecx movl $0x2000, %eax # imm = 0x2000 subl %ecx, %eax movw %ax, -0x2(%rbp) jmp 0x3082a jmp 0x307f9 jmp 0x307fb jmp 0x307fd jmp 0x307ff jmp 0x30801 jmp 0x30803 jmp 0x30805 movq -0x10(%rbp), %rax movzwl -0x12(%rbp), %ecx movslq %ecx, %rcx movzwl 0x1(%rax,%rcx), %eax addl $0x3, %eax movw %ax, -0x2(%rbp) jmp 0x3082a jmp 0x30820 jmp 0x30822 jmp 0x30824 movw $0x0, -0x2(%rbp) movw -0x2(%rbp), %ax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
translog_get_total_chunk_length: push rbp mov rbp, rsp sub rsp, 50h mov ax, si mov [rbp+var_10], rdi mov [rbp+var_12], ax mov rax, [rbp+var_10] movzx ecx, [rbp+var_12] movzx eax, byte ptr [rax+rcx] and eax, 0C0h mov [rbp+var_4C], eax jz short loc_3060C jmp short $+2 loc_305DB: mov eax, [rbp+var_4C] sub eax, 40h ; '@' jz loc_306C3 jmp short $+2 loc_305E9: mov eax, [rbp+var_4C] sub eax, 80h jz loc_307E0 jmp short $+2 loc_305F9: mov eax, [rbp+var_4C] sub eax, 0C0h jz loc_307F7 jmp loc_3081E loc_3060C: mov rax, [rbp+var_10] movzx ecx, [rbp+var_12] movsxd rcx, ecx add rax, rcx mov [rbp+var_20], rax mov rax, [rbp+var_20] add rax, 1 add rax, 2 mov [rbp+var_28], rax jmp short $+2 loc_30630: lea rdi, [rbp+var_28] call translog_variable_record_1group_decode_len mov [rbp+var_18], eax mov rax, [rbp+var_28] mov ax, [rax] mov [rbp+var_2A], ax mov rax, [rbp+var_28] mov rcx, [rbp+var_20] sub rax, rcx movzx eax, ax add eax, 2 mov [rbp+var_2C], ax jmp short $+2 loc_3065E: cmp [rbp+var_2A], 0 jz short loc_3067E jmp short $+2 loc_30667: jmp short $+2 loc_30669: jmp short $+2 loc_3066B: movzx eax, [rbp+var_2A] movzx ecx, [rbp+var_2C] add eax, ecx mov [rbp+var_2], ax jmp loc_3082A loc_3067E: movzx ecx, [rbp+var_12] mov eax, 2000h sub eax, ecx mov [rbp+var_2E], ax jmp short $+2 loc_3068F: mov eax, [rbp+var_18] movzx ecx, [rbp+var_2C] add eax, ecx movzx ecx, [rbp+var_2E] cmp eax, ecx jnb short loc_306B4 jmp short $+2 loc_306A2: mov eax, [rbp+var_18] movzx ecx, [rbp+var_2C] add eax, ecx mov [rbp+var_2], ax jmp loc_3082A loc_306B4: jmp short $+2 loc_306B6: mov ax, [rbp+var_2E] mov [rbp+var_2], ax jmp loc_3082A loc_306C3: mov rax, [rbp+var_10] movzx ecx, [rbp+var_12] movzx eax, byte ptr [rax+rcx] and eax, 3Fh mov [rbp+var_3C], eax jmp short $+2 loc_306D7: jmp short $+2 loc_306D9: jmp short $+2 loc_306DB: mov eax, [rbp+var_3C] mov ecx, eax lea rax, log_record_type_descriptor imul rcx, 48h ; 'H' add rax, rcx cmp dword ptr [rax], 3 jnz short loc_3071C jmp short $+2 loc_306F5: jmp short $+2 loc_306F7: jmp short $+2 loc_306F9: mov eax, [rbp+var_3C] mov ecx, eax lea rax, log_record_type_descriptor imul rcx, 48h ; 'H' add rax, rcx movzx eax, word ptr [rax+4] add eax, 3 mov [rbp+var_2], ax jmp loc_3082A loc_3071C: mov rax, [rbp+var_10] movzx ecx, [rbp+var_12] movsxd rcx, ecx add rax, rcx add rax, 3 mov [rbp+var_38], rax mov eax, [rbp+var_3C] mov ecx, eax lea rax, log_record_type_descriptor imul rcx, 48h ; 'H' add rax, rcx movzx eax, word ptr [rax+4] add eax, 3 mov [rbp+var_40], eax mov [rbp+var_44], 0 loc_30756: mov eax, [rbp+var_44] mov ecx, [rbp+var_3C] mov edx, ecx lea rcx, log_record_type_descriptor imul rdx, 48h ; 'H' add rcx, rdx movsx ecx, word ptr [rcx+20h] cmp eax, ecx jge short loc_307D1 mov rax, [rbp+var_38] movzx eax, byte ptr [rax] sar eax, 6 add eax, 2 mov [rbp+var_48], eax mov rax, [rbp+var_38] movzx eax, byte ptr [rax] cmp eax, 0 jnz short loc_307A6 mov rax, [rbp+var_38] movzx eax, byte ptr [rax+1] cmp eax, 1 jnz short loc_307A6 mov eax, [rbp+var_48] add eax, 7 mov [rbp+var_48], eax loc_307A6: mov ecx, [rbp+var_48] mov rax, [rbp+var_38] mov ecx, ecx add rax, rcx mov [rbp+var_38], rax mov ecx, 7 sub ecx, [rbp+var_48] mov eax, [rbp+var_40] sub eax, ecx mov [rbp+var_40], eax mov eax, [rbp+var_44] add eax, 1 mov [rbp+var_44], eax jmp short loc_30756 loc_307D1: jmp short $+2 loc_307D3: jmp short $+2 loc_307D5: jmp short $+2 loc_307D7: mov eax, [rbp+var_40] mov [rbp+var_2], ax jmp short loc_3082A loc_307E0: jmp short $+2 loc_307E2: jmp short $+2 loc_307E4: jmp short $+2 loc_307E6: movzx ecx, [rbp+var_12] mov eax, 2000h sub eax, ecx mov [rbp+var_2], ax jmp short loc_3082A loc_307F7: jmp short $+2 loc_307F9: jmp short $+2 loc_307FB: jmp short $+2 loc_307FD: jmp short $+2 loc_307FF: jmp short $+2 loc_30801: jmp short $+2 loc_30803: jmp short $+2 loc_30805: mov rax, [rbp+var_10] movzx ecx, [rbp+var_12] movsxd rcx, ecx movzx eax, word ptr [rax+rcx+1] add eax, 3 mov [rbp+var_2], ax jmp short loc_3082A loc_3081E: jmp short $+2 loc_30820: jmp short $+2 loc_30822: jmp short $+2 loc_30824: mov [rbp+var_2], 0 loc_3082A: mov ax, [rbp+var_2] add rsp, 50h pop rbp retn
__int16 translog_get_total_chunk_length(long long a1, unsigned __int16 a2) { int v3; // [rsp+4h] [rbp-4Ch] unsigned int v4; // [rsp+8h] [rbp-48h] int i; // [rsp+Ch] [rbp-44h] __int16 v6; // [rsp+10h] [rbp-40h] unsigned __int8 *v7; // [rsp+18h] [rbp-38h] unsigned __int16 v8; // [rsp+24h] [rbp-2Ch] _WORD *v9; // [rsp+28h] [rbp-28h] BYREF long long v10; // [rsp+30h] [rbp-20h] int v11; // [rsp+38h] [rbp-18h] unsigned __int16 v12; // [rsp+3Eh] [rbp-12h] long long v13; // [rsp+40h] [rbp-10h] v13 = a1; v12 = a2; v3 = *(_BYTE *)(a1 + a2) & 0xC0; if ( (*(_BYTE *)(a1 + a2) & 0xC0) != 0 ) { switch ( v3 ) { case 64: if ( log_record_type_descriptor[18 * (*(_BYTE *)(v13 + v12) & 0x3F)] == 3 ) { return LOWORD(log_record_type_descriptor[18 * (*(_BYTE *)(v13 + v12) & 0x3F) + 1]) + 3; } else { v7 = (unsigned __int8 *)(v12 + v13 + 3); v6 = LOWORD(log_record_type_descriptor[18 * (*(_BYTE *)(v13 + v12) & 0x3F) + 1]) + 3; for ( i = 0; i < SLOWORD(log_record_type_descriptor[18 * (*(_BYTE *)(v13 + v12) & 0x3F) + 8]); ++i ) { v4 = ((int)*v7 >> 6) + 2; if ( !*v7 && v7[1] == 1 ) v4 = ((int)*v7 >> 6) + 9; v7 += v4; v6 -= 7 - v4; } return v6; } case 128: return 0x2000 - v12; case 192: return *(_WORD *)(v13 + v12 + 1) + 3; default: return 0; } } else { v10 = v12 + v13; v9 = (_WORD *)(v10 + 3); v11 = translog_variable_record_1group_decode_len(&v9); v8 = (_WORD)v9 - v10 + 2; if ( *v9 ) { return v8 + *v9; } else if ( (unsigned int)v8 + v11 >= (unsigned __int16)(0x2000 - v12) ) { return 0x2000 - v12; } else { return v8 + v11; } } }
translog_get_total_chunk_length: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV AX,SI MOV qword ptr [RBP + -0x10],RDI MOV word ptr [RBP + -0x12],AX MOV RAX,qword ptr [RBP + -0x10] MOVZX ECX,word ptr [RBP + -0x12] MOVZX EAX,byte ptr [RAX + RCX*0x1] AND EAX,0xc0 MOV dword ptr [RBP + -0x4c],EAX JZ 0x0013060c JMP 0x001305db LAB_001305db: MOV EAX,dword ptr [RBP + -0x4c] SUB EAX,0x40 JZ 0x001306c3 JMP 0x001305e9 LAB_001305e9: MOV EAX,dword ptr [RBP + -0x4c] SUB EAX,0x80 JZ 0x001307e0 JMP 0x001305f9 LAB_001305f9: MOV EAX,dword ptr [RBP + -0x4c] SUB EAX,0xc0 JZ 0x001307f7 JMP 0x0013081e LAB_0013060c: MOV RAX,qword ptr [RBP + -0x10] MOVZX ECX,word ptr [RBP + -0x12] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 ADD RAX,0x2 MOV qword ptr [RBP + -0x28],RAX JMP 0x00130630 LAB_00130630: LEA RDI,[RBP + -0x28] CALL 0x00136e20 MOV dword ptr [RBP + -0x18],EAX MOV RAX,qword ptr [RBP + -0x28] MOV AX,word ptr [RAX] MOV word ptr [RBP + -0x2a],AX MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x20] SUB RAX,RCX MOVZX EAX,AX ADD EAX,0x2 MOV word ptr [RBP + -0x2c],AX JMP 0x0013065e LAB_0013065e: CMP word ptr [RBP + -0x2a],0x0 JZ 0x0013067e JMP 0x00130667 LAB_00130667: JMP 0x00130669 LAB_00130669: JMP 0x0013066b LAB_0013066b: MOVZX EAX,word ptr [RBP + -0x2a] MOVZX ECX,word ptr [RBP + -0x2c] ADD EAX,ECX MOV word ptr [RBP + -0x2],AX JMP 0x0013082a LAB_0013067e: MOVZX ECX,word ptr [RBP + -0x12] MOV EAX,0x2000 SUB EAX,ECX MOV word ptr [RBP + -0x2e],AX JMP 0x0013068f LAB_0013068f: MOV EAX,dword ptr [RBP + -0x18] MOVZX ECX,word ptr [RBP + -0x2c] ADD EAX,ECX MOVZX ECX,word ptr [RBP + -0x2e] CMP EAX,ECX JNC 0x001306b4 JMP 0x001306a2 LAB_001306a2: MOV EAX,dword ptr [RBP + -0x18] MOVZX ECX,word ptr [RBP + -0x2c] ADD EAX,ECX MOV word ptr [RBP + -0x2],AX JMP 0x0013082a LAB_001306b4: JMP 0x001306b6 LAB_001306b6: MOV AX,word ptr [RBP + -0x2e] MOV word ptr [RBP + -0x2],AX JMP 0x0013082a LAB_001306c3: MOV RAX,qword ptr [RBP + -0x10] MOVZX ECX,word ptr [RBP + -0x12] MOVZX EAX,byte ptr [RAX + RCX*0x1] AND EAX,0x3f MOV dword ptr [RBP + -0x3c],EAX JMP 0x001306d7 LAB_001306d7: JMP 0x001306d9 LAB_001306d9: JMP 0x001306db LAB_001306db: MOV EAX,dword ptr [RBP + -0x3c] MOV ECX,EAX LEA RAX,[0x577a70] IMUL RCX,RCX,0x48 ADD RAX,RCX CMP dword ptr [RAX],0x3 JNZ 0x0013071c JMP 0x001306f5 LAB_001306f5: JMP 0x001306f7 LAB_001306f7: JMP 0x001306f9 LAB_001306f9: MOV EAX,dword ptr [RBP + -0x3c] MOV ECX,EAX LEA RAX,[0x577a70] IMUL RCX,RCX,0x48 ADD RAX,RCX MOVZX EAX,word ptr [RAX + 0x4] ADD EAX,0x3 MOV word ptr [RBP + -0x2],AX JMP 0x0013082a LAB_0013071c: MOV RAX,qword ptr [RBP + -0x10] MOVZX ECX,word ptr [RBP + -0x12] MOVSXD RCX,ECX ADD RAX,RCX ADD RAX,0x3 MOV qword ptr [RBP + -0x38],RAX MOV EAX,dword ptr [RBP + -0x3c] MOV ECX,EAX LEA RAX,[0x577a70] IMUL RCX,RCX,0x48 ADD RAX,RCX MOVZX EAX,word ptr [RAX + 0x4] ADD EAX,0x3 MOV dword ptr [RBP + -0x40],EAX MOV dword ptr [RBP + -0x44],0x0 LAB_00130756: MOV EAX,dword ptr [RBP + -0x44] MOV ECX,dword ptr [RBP + -0x3c] MOV EDX,ECX LEA RCX,[0x577a70] IMUL RDX,RDX,0x48 ADD RCX,RDX MOVSX ECX,word ptr [RCX + 0x20] CMP EAX,ECX JGE 0x001307d1 MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,byte ptr [RAX] SAR EAX,0x6 ADD EAX,0x2 MOV dword ptr [RBP + -0x48],EAX MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,byte ptr [RAX] CMP EAX,0x0 JNZ 0x001307a6 MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x1 JNZ 0x001307a6 MOV EAX,dword ptr [RBP + -0x48] ADD EAX,0x7 MOV dword ptr [RBP + -0x48],EAX LAB_001307a6: MOV ECX,dword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x38] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x38],RAX MOV ECX,0x7 SUB ECX,dword ptr [RBP + -0x48] MOV EAX,dword ptr [RBP + -0x40] SUB EAX,ECX MOV dword ptr [RBP + -0x40],EAX MOV EAX,dword ptr [RBP + -0x44] ADD EAX,0x1 MOV dword ptr [RBP + -0x44],EAX JMP 0x00130756 LAB_001307d1: JMP 0x001307d3 LAB_001307d3: JMP 0x001307d5 LAB_001307d5: JMP 0x001307d7 LAB_001307d7: MOV EAX,dword ptr [RBP + -0x40] MOV word ptr [RBP + -0x2],AX JMP 0x0013082a LAB_001307e0: JMP 0x001307e2 LAB_001307e2: JMP 0x001307e4 LAB_001307e4: JMP 0x001307e6 LAB_001307e6: MOVZX ECX,word ptr [RBP + -0x12] MOV EAX,0x2000 SUB EAX,ECX MOV word ptr [RBP + -0x2],AX JMP 0x0013082a LAB_001307f7: JMP 0x001307f9 LAB_001307f9: JMP 0x001307fb LAB_001307fb: JMP 0x001307fd LAB_001307fd: JMP 0x001307ff LAB_001307ff: JMP 0x00130801 LAB_00130801: JMP 0x00130803 LAB_00130803: JMP 0x00130805 LAB_00130805: MOV RAX,qword ptr [RBP + -0x10] MOVZX ECX,word ptr [RBP + -0x12] MOVSXD RCX,ECX MOVZX EAX,word ptr [RAX + RCX*0x1 + 0x1] ADD EAX,0x3 MOV word ptr [RBP + -0x2],AX JMP 0x0013082a LAB_0013081e: JMP 0x00130820 LAB_00130820: JMP 0x00130822 LAB_00130822: JMP 0x00130824 LAB_00130824: MOV word ptr [RBP + -0x2],0x0 LAB_0013082a: MOV AX,word ptr [RBP + -0x2] ADD RSP,0x50 POP RBP RET
int8 translog_get_total_chunk_length(long param_1,ushort param_2) { ushort uVar1; uint uVar2; int iVar3; ulong uVar4; uint local_50; int local_4c; uint local_48; byte *local_40; ushort *local_30; long local_28; ushort local_1a; long local_18; ushort local_a; uVar2 = *(byte *)(param_1 + (ulong)param_2) & 0xc0; if ((*(byte *)(param_1 + (ulong)param_2) & 0xc0) == 0) { local_28 = param_1 + (int)(uint)param_2; local_30 = (ushort *)(local_28 + 3); local_1a = param_2; local_18 = param_1; iVar3 = translog_variable_record_1group_decode_len(&local_30); uVar1 = ((short)local_30 - (short)local_28) + 2; if (*local_30 == 0) { local_a = 0x2000 - local_1a; if (iVar3 + (uint)uVar1 < (uint)local_a) { uVar4 = (ulong)(iVar3 + (uint)uVar1); local_a = (ushort)(iVar3 + (uint)uVar1); } else { uVar4 = (ulong)CONCAT22((short)(iVar3 + (uint)uVar1 >> 0x10),local_a); } } else { uVar2 = (uint)*local_30 + (uint)uVar1; uVar4 = (ulong)uVar2; local_a = (ushort)uVar2; } } else if (uVar2 == 0x40) { uVar2 = *(byte *)(param_1 + (ulong)param_2) & 0x3f; if (*(int *)(log_record_type_descriptor + (ulong)uVar2 * 0x48) == 3) { uVar4 = (ulong)(*(ushort *)(log_record_type_descriptor + (ulong)uVar2 * 0x48 + 4) + 3); local_a = (ushort)(*(ushort *)(log_record_type_descriptor + (ulong)uVar2 * 0x48 + 4) + 3); } else { local_40 = (byte *)(param_1 + (int)(uint)param_2 + 3); local_48 = *(ushort *)(log_record_type_descriptor + (ulong)uVar2 * 0x48 + 4) + 3; for (local_4c = 0; local_4c < *(short *)(log_record_type_descriptor + (ulong)uVar2 * 0x48 + 0x20); local_4c = local_4c + 1) { local_50 = ((int)(uint)*local_40 >> 6) + 2; if ((*local_40 == 0) && (local_40[1] == 1)) { local_50 = ((int)(uint)*local_40 >> 6) + 9; } local_40 = local_40 + local_50; local_48 = local_48 - (7 - local_50); } uVar4 = (ulong)local_48; local_a = (ushort)local_48; } } else if (uVar2 == 0x80) { uVar4 = (ulong)(0x2000 - param_2); local_a = (ushort)(0x2000 - param_2); } else { uVar4 = (ulong)(uVar2 - 0xc0); if (uVar2 - 0xc0 == 0) { uVar2 = *(ushort *)(param_1 + 1 + (long)(int)(uint)param_2) + 3; uVar4 = (ulong)uVar2; local_a = (ushort)uVar2; } else { local_a = 0; } } return CONCAT62((int6)(uVar4 >> 0x10),local_a); }
16,677
stbiw__encode_png_line(unsigned char*, int, int, int, int, int, int, signed char*)
7CodeWizard[P]stablediffusion/thirdparty/stb_image_write.h
static void stbiw__encode_png_line(unsigned char *pixels, int stride_bytes, int width, int height, int y, int n, int filter_type, signed char *line_buffer) { static int mapping[] = { 0,1,2,3,4 }; static int firstmap[] = { 0,1,0,5,6 }; int *mymap = (y != 0) ? mapping : firstmap; int i; int type = mymap[filter_type]; unsigned char *z = pixels + stride_bytes * (stbi__flip_vertically_on_write ? height-1-y : y); int signed_stride = stbi__flip_vertically_on_write ? -stride_bytes : stride_bytes; if (type==0) { memcpy(line_buffer, z, width*n); return; } // first loop isn't optimized since it's just one pixel for (i = 0; i < n; ++i) { switch (type) { case 1: line_buffer[i] = z[i]; break; case 2: line_buffer[i] = z[i] - z[i-signed_stride]; break; case 3: line_buffer[i] = z[i] - (z[i-signed_stride]>>1); break; case 4: line_buffer[i] = (signed char) (z[i] - stbiw__paeth(0,z[i-signed_stride],0)); break; case 5: line_buffer[i] = z[i]; break; case 6: line_buffer[i] = z[i]; break; } } switch (type) { case 1: for (i=n; i < width*n; ++i) line_buffer[i] = z[i] - z[i-n]; break; case 2: for (i=n; i < width*n; ++i) line_buffer[i] = z[i] - z[i-signed_stride]; break; case 3: for (i=n; i < width*n; ++i) line_buffer[i] = z[i] - ((z[i-n] + z[i-signed_stride])>>1); break; case 4: for (i=n; i < width*n; ++i) line_buffer[i] = z[i] - stbiw__paeth(z[i-n], z[i-signed_stride], z[i-signed_stride-n]); break; case 5: for (i=n; i < width*n; ++i) line_buffer[i] = z[i] - (z[i-n]>>1); break; case 6: for (i=n; i < width*n; ++i) line_buffer[i] = z[i] - stbiw__paeth(z[i-n], 0,0); break; } }
O1
c
stbiw__encode_png_line(unsigned char*, int, int, int, int, int, int, signed char*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movl %esi, %r10d movq %rdi, %rax movq 0x38(%rsp), %rdi testl %ecx, %ecx leaq 0x8cc9d(%rip), %rsi # 0xbb930 leaq 0x8cc76(%rip), %r11 # 0xbb910 cmoveq %rsi, %r11 movslq %r9d, %rsi movl (%r11,%rsi,4), %r9d imull %r10d, %ecx movslq %ecx, %rcx leaq (%rax,%rcx), %rsi testl %r9d, %r9d je 0x2ed61 testl %r8d, %r8d jle 0x2ed15 movslq %r10d, %r14 movl %r8d, %r11d movq %rcx, %rbx subq %r14, %rbx addq %rax, %rbx xorl %r14d, %r14d leal -0x1(%r9), %r15d leaq 0x8c691(%rip), %r12 # 0xbb36c cmpl $0x5, %r15d ja 0x2ed0d movslq (%r12,%r15,4), %r13 addq %r12, %r13 jmpq *%r13 movb (%rsi,%r14), %bpl jmp 0x2ed09 movb (%rsi,%r14), %bpl subb (%rbx,%r14), %bpl jmp 0x2ed09 movb (%rsi,%r14), %bpl movb (%rbx,%r14), %r13b shrb %r13b subb %r13b, %bpl movb %bpl, (%rdi,%r14) incq %r14 cmpq %r14, %r11 jne 0x2ecdb decl %r9d cmpl $0x5, %r9d ja 0x2eef2 leaq 0x8c65b(%rip), %r11 # 0xbb384 movslq (%r11,%r9,4), %r9 addq %r11, %r9 jmpq *%r9 imull %r8d, %edx cmpl %r8d, %edx jle 0x2eef2 movslq %r8d, %rax movslq %edx, %rcx movb (%rsi,%rax), %dl subb (%rsi), %dl movb %dl, (%rdi,%rax) incq %rsi incq %rdi decq %rcx cmpq %rcx, %rax jne 0x2ed46 jmp 0x2eef2 imull %edx, %r8d movslq %r8d, %rdx popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0xa4c0 imull %r8d, %edx cmpl %r8d, %edx jle 0x2eef2 movslq %r8d, %rax movslq %edx, %rcx movb (%rsi,%rax), %dl movb (%rsi), %r8b shrb %r8b subb %r8b, %dl movb %dl, (%rdi,%rax) incq %rsi incq %rdi decq %rcx cmpq %rcx, %rax jne 0x2ed8a jmp 0x2eef2 imull %r8d, %edx cmpl %r8d, %edx jle 0x2eef2 movslq %r8d, %r9 movslq %r10d, %r8 movslq %edx, %rdx negq %r8 addq %r9, %rcx addq %rcx, %rax addq %r9, %rdi subq %r9, %rdx xorl %ecx, %ecx movb (%rax), %r9b movzbl (%rsi,%rcx), %r10d movzbl (%rax,%r8), %r11d addl %r10d, %r11d shrl %r11d subb %r11b, %r9b movb %r9b, (%rdi,%rcx) incq %rax incq %rcx cmpq %rcx, %rdx jne 0x2edd3 jmp 0x2eef2 imull %r8d, %edx cmpl %r8d, %edx jle 0x2eef2 movslq %r8d, %r9 movslq %r10d, %r10 movslq %edx, %rdx leaq (%r9,%rcx), %r11 subq %r10, %rcx addq %rax, %rcx movq %r11, %r8 subq %r10, %r8 addq %rax, %r8 addq %r11, %rax addq %r9, %rdi subq %r9, %rdx xorl %r9d, %r9d movzbl (%rsi,%r9), %r10d movzbl (%r8,%r9), %ebx movzbl (%rcx,%r9), %r11d leal (%rbx,%r10), %r12d subl %r11d, %r12d movl %r12d, %r14d subl %r10d, %r14d movl %r14d, %ebp negl %ebp cmovsl %r14d, %ebp movl %r12d, %r15d subl %ebx, %r15d movl %r15d, %r14d negl %r14d cmovsl %r15d, %r14d subl %r11d, %r12d movl %r12d, %r15d negl %r15d cmovsl %r12d, %r15d cmpl %r15d, %r14d ja 0x2ee7c movl %ebx, %r11d movb (%rax,%r9), %bl cmpl %r15d, %ebp cmoval %r11d, %r10d cmpl %r14d, %ebp cmoval %r11d, %r10d subb %r10b, %bl movb %bl, (%rdi,%r9) incq %r9 cmpq %r9, %rdx jne 0x2ee32 jmp 0x2eef2 imull %r8d, %edx cmpl %r8d, %edx jle 0x2eef2 movslq %r8d, %r8 movslq %r10d, %r9 movslq %edx, %rdx subq %r9, %rcx addq %rcx, %rax movb (%rsi,%r8), %cl subb (%rax,%r8), %cl movb %cl, (%rdi,%r8) incq %r8 cmpq %r8, %rdx jne 0x2eeb7 jmp 0x2eef2 imull %r8d, %edx cmpl %r8d, %edx jle 0x2eef2 movslq %r8d, %rax movslq %edx, %rcx movb (%rsi,%rax), %dl subb (%rsi), %dl movb %dl, (%rdi,%rax) incq %rsi incq %rdi decq %rcx cmpq %rcx, %rax jne 0x2eedc popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZL22stbiw__encode_png_linePhiiiiiiPa: push rbp push r15 push r14 push r13 push r12 push rbx mov r10d, esi mov rax, rdi mov rdi, [rsp+30h+arg_0] test ecx, ecx lea rsi, _ZZL22stbiw__encode_png_linePhiiiiiiPaE8firstmap; stbiw__encode_png_line(uchar *,int,int,int,int,int,int,signed char *)::firstmap lea r11, _ZZL22stbiw__encode_png_linePhiiiiiiPaE7mapping; stbiw__encode_png_line(uchar *,int,int,int,int,int,int,signed char *)::mapping cmovz r11, rsi movsxd rsi, r9d mov r9d, [r11+rsi*4] imul ecx, r10d movsxd rcx, ecx lea rsi, [rax+rcx] test r9d, r9d jz loc_2ED61 test r8d, r8d jle short loc_2ED15 movsxd r14, r10d mov r11d, r8d mov rbx, rcx sub rbx, r14 add rbx, rax xor r14d, r14d lea r15d, [r9-1] lea r12, jpt_2ECE8 loc_2ECDB: cmp r15d, 5; switch 6 cases ja short def_2ECE8; jumptable 000000000002ECE8 default case movsxd r13, ds:(jpt_2ECE8 - 0BB36Ch)[r12+r15*4] add r13, r12 jmp r13; switch jump loc_2ECEB: mov bpl, [rsi+r14]; jumptable 000000000002ECE8 cases 0,4,5 jmp short loc_2ED09 loc_2ECF1: mov bpl, [rsi+r14]; jumptable 000000000002ECE8 cases 1,3 sub bpl, [rbx+r14] jmp short loc_2ED09 loc_2ECFB: mov bpl, [rsi+r14]; jumptable 000000000002ECE8 case 2 mov r13b, [rbx+r14] shr r13b, 1 sub bpl, r13b loc_2ED09: mov [rdi+r14], bpl def_2ECE8: inc r14; jumptable 000000000002ECE8 default case cmp r11, r14 jnz short loc_2ECDB loc_2ED15: dec r9d; switch 6 cases cmp r9d, 5 ja def_2ED30; jumptable 000000000002ED30 default case lea r11, jpt_2ED30 movsxd r9, ds:(jpt_2ED30 - 0BB384h)[r11+r9*4] add r9, r11 jmp r9; switch jump loc_2ED33: imul edx, r8d; jumptable 000000000002ED30 case 1 cmp edx, r8d jle def_2ED30; jumptable 000000000002ED30 default case movsxd rax, r8d movsxd rcx, edx loc_2ED46: mov dl, [rsi+rax] sub dl, [rsi] mov [rdi+rax], dl inc rsi inc rdi dec rcx cmp rax, rcx jnz short loc_2ED46 jmp def_2ED30; jumptable 000000000002ED30 default case loc_2ED61: imul r8d, edx movsxd rdx, r8d pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _memcpy loc_2ED77: imul edx, r8d; jumptable 000000000002ED30 case 5 cmp edx, r8d jle def_2ED30; jumptable 000000000002ED30 default case movsxd rax, r8d movsxd rcx, edx loc_2ED8A: mov dl, [rsi+rax] mov r8b, [rsi] shr r8b, 1 sub dl, r8b mov [rdi+rax], dl inc rsi inc rdi dec rcx cmp rax, rcx jnz short loc_2ED8A jmp def_2ED30; jumptable 000000000002ED30 default case loc_2EDAC: imul edx, r8d; jumptable 000000000002ED30 case 3 cmp edx, r8d jle def_2ED30; jumptable 000000000002ED30 default case movsxd r9, r8d movsxd r8, r10d movsxd rdx, edx neg r8 add rcx, r9 add rax, rcx add rdi, r9 sub rdx, r9 xor ecx, ecx loc_2EDD3: mov r9b, [rax] movzx r10d, byte ptr [rsi+rcx] movzx r11d, byte ptr [rax+r8] add r11d, r10d shr r11d, 1 sub r9b, r11b mov [rdi+rcx], r9b inc rax inc rcx cmp rdx, rcx jnz short loc_2EDD3 jmp def_2ED30; jumptable 000000000002ED30 default case loc_2EDFD: imul edx, r8d; jumptable 000000000002ED30 case 4 cmp edx, r8d jle def_2ED30; jumptable 000000000002ED30 default case movsxd r9, r8d movsxd r10, r10d movsxd rdx, edx lea r11, [r9+rcx] sub rcx, r10 add rcx, rax mov r8, r11 sub r8, r10 add r8, rax add rax, r11 add rdi, r9 sub rdx, r9 xor r9d, r9d loc_2EE32: movzx r10d, byte ptr [rsi+r9] movzx ebx, byte ptr [r8+r9] movzx r11d, byte ptr [rcx+r9] lea r12d, [rbx+r10] sub r12d, r11d mov r14d, r12d sub r14d, r10d mov ebp, r14d neg ebp cmovs ebp, r14d mov r15d, r12d sub r15d, ebx mov r14d, r15d neg r14d cmovs r14d, r15d sub r12d, r11d mov r15d, r12d neg r15d cmovs r15d, r12d cmp r14d, r15d ja short loc_2EE7C mov r11d, ebx loc_2EE7C: mov bl, [rax+r9] cmp ebp, r15d cmova r10d, r11d cmp ebp, r14d cmova r10d, r11d sub bl, r10b mov [rdi+r9], bl inc r9 cmp rdx, r9 jnz short loc_2EE32 jmp short def_2ED30; jumptable 000000000002ED30 default case loc_2EE9F: imul edx, r8d; jumptable 000000000002ED30 case 2 cmp edx, r8d jle short def_2ED30; jumptable 000000000002ED30 default case movsxd r8, r8d movsxd r9, r10d movsxd rdx, edx sub rcx, r9 add rax, rcx loc_2EEB7: mov cl, [rsi+r8] sub cl, [rax+r8] mov [rdi+r8], cl inc r8 cmp rdx, r8 jnz short loc_2EEB7 jmp short def_2ED30; jumptable 000000000002ED30 default case loc_2EECD: imul edx, r8d; jumptable 000000000002ED30 case 6 cmp edx, r8d jle short def_2ED30; jumptable 000000000002ED30 default case movsxd rax, r8d movsxd rcx, edx loc_2EEDC: mov dl, [rsi+rax] sub dl, [rsi] mov [rdi+rax], dl inc rsi inc rdi dec rcx cmp rax, rcx jnz short loc_2EEDC def_2ED30: pop rbx; jumptable 000000000002ED30 default case pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long stbiw__encode_png_line(unsigned __int8 *a1, int a2, int a3, int a4, long long a5, int a6, long long a7) { long long result; // rax long long v9; // rdi _DWORD *v10; // r11 int v11; // r9d long long v12; // rcx _BYTE *v13; // rsi long long v14; // rbx long long v15; // r14 char v16; // bp int v17; // edx long long v18; // rcx int v19; // edx long long v20; // rcx int v21; // edx long long v22; // rdx long long v23; // rcx int v24; // edx long long v25; // r9 long long v26; // r11 long long v27; // rcx long long v28; // r8 long long v29; // rdi long long v30; // rdx long long v31; // r9 int v32; // r10d int v33; // ebx int v34; // r11d unsigned int v35; // ebp unsigned int v36; // r14d unsigned int v37; // r15d int v38; // edx int v39; // edx long long v40; // rcx result = (long long)a1; v9 = a7; v10 = &stbiw__encode_png_line(unsigned char *,int,int,int,int,int,int,signed char *)::mapping; if ( !a4 ) v10 = &stbiw__encode_png_line(unsigned char *,int,int,int,int,int,int,signed char *)::firstmap; v11 = v10[a6]; v12 = a2 * a4; v13 = (_BYTE *)(result + v12); if ( !v11 ) return memcpy(a7, v13, a3 * (int)a5); if ( (int)a5 > 0 ) { v14 = result + v12 - a2; v15 = 0LL; do { switch ( v11 ) { case 1: case 5: case 6: v16 = v13[v15]; goto LABEL_10; case 2: case 4: v16 = v13[v15] - *(_BYTE *)(v14 + v15); goto LABEL_10; case 3: v16 = v13[v15] - (*(_BYTE *)(v14 + v15) >> 1); LABEL_10: *(_BYTE *)(a7 + v15) = v16; break; default: break; } ++v15; } while ( (unsigned int)a5 != v15 ); } switch ( v11 ) { case 1: v17 = a5 * a3; if ( v17 > (int)a5 ) { result = (int)a5; v18 = v17; do { *(_BYTE *)(v9 + (int)a5) = v13[(int)a5] - *v13; ++v13; ++v9; --v18; } while ( (int)a5 != v18 ); } break; case 2: v38 = a5 * a3; if ( v38 > (int)a5 ) { a5 = (int)a5; result += v12 - a2; do { *(_BYTE *)(a7 + a5) = v13[a5] - *(_BYTE *)(result + a5); ++a5; } while ( v38 != a5 ); } break; case 3: v21 = a5 * a3; if ( v21 > (int)a5 ) { result += (int)a5 + v12; v22 = v21 - (long long)(int)a5; v23 = 0LL; do { *(_BYTE *)((int)a5 + a7 + v23) = *(_BYTE *)result - (((unsigned __int8)v13[v23] + (unsigned int)*(unsigned __int8 *)(result - a2)) >> 1); ++result; ++v23; } while ( v22 != v23 ); } break; case 4: v24 = a5 * a3; if ( v24 > (int)a5 ) { v25 = (int)a5; v26 = (int)a5 + v12; v27 = result + v12 - a2; v28 = result + v26 - a2; result += v26; v29 = v25 + a7; v30 = v24 - v25; v31 = 0LL; do { v32 = (unsigned __int8)v13[v31]; v33 = *(unsigned __int8 *)(v28 + v31); v34 = *(unsigned __int8 *)(v27 + v31); v35 = v34 - v33; if ( v34 - v33 < 0 ) v35 = v33 - v34; v36 = v34 - v32; if ( v34 - v32 < 0 ) v36 = v32 - v34; v37 = v34 - (v33 + v32 - v34); if ( v33 + v32 - v34 - v34 > 0 ) v37 = v33 + v32 - v34 - v34; if ( v36 <= v37 ) LOBYTE(v34) = *(_BYTE *)(v28 + v31); if ( v35 > v37 ) LOBYTE(v32) = v34; if ( v35 > v36 ) LOBYTE(v32) = v34; *(_BYTE *)(v29 + v31) = *(_BYTE *)(result + v31) - v32; ++v31; } while ( v30 != v31 ); } break; case 5: v19 = a5 * a3; if ( v19 > (int)a5 ) { result = (int)a5; v20 = v19; do { *(_BYTE *)(v9 + (int)a5) = v13[(int)a5] - (*v13 >> 1); ++v13; ++v9; --v20; } while ( (int)a5 != v20 ); } break; case 6: v39 = a5 * a3; if ( v39 > (int)a5 ) { result = (int)a5; v40 = v39; do { *(_BYTE *)(v9 + (int)a5) = v13[(int)a5] - *v13; ++v13; ++v9; --v40; } while ( (int)a5 != v40 ); } break; default: return result; } return result; }
16,678
stbiw__encode_png_line(unsigned char*, int, int, int, int, int, int, signed char*)
7CodeWizard[P]stablediffusion/thirdparty/stb_image_write.h
static void stbiw__encode_png_line(unsigned char *pixels, int stride_bytes, int width, int height, int y, int n, int filter_type, signed char *line_buffer) { static int mapping[] = { 0,1,2,3,4 }; static int firstmap[] = { 0,1,0,5,6 }; int *mymap = (y != 0) ? mapping : firstmap; int i; int type = mymap[filter_type]; unsigned char *z = pixels + stride_bytes * (stbi__flip_vertically_on_write ? height-1-y : y); int signed_stride = stbi__flip_vertically_on_write ? -stride_bytes : stride_bytes; if (type==0) { memcpy(line_buffer, z, width*n); return; } // first loop isn't optimized since it's just one pixel for (i = 0; i < n; ++i) { switch (type) { case 1: line_buffer[i] = z[i]; break; case 2: line_buffer[i] = z[i] - z[i-signed_stride]; break; case 3: line_buffer[i] = z[i] - (z[i-signed_stride]>>1); break; case 4: line_buffer[i] = (signed char) (z[i] - stbiw__paeth(0,z[i-signed_stride],0)); break; case 5: line_buffer[i] = z[i]; break; case 6: line_buffer[i] = z[i]; break; } } switch (type) { case 1: for (i=n; i < width*n; ++i) line_buffer[i] = z[i] - z[i-n]; break; case 2: for (i=n; i < width*n; ++i) line_buffer[i] = z[i] - z[i-signed_stride]; break; case 3: for (i=n; i < width*n; ++i) line_buffer[i] = z[i] - ((z[i-n] + z[i-signed_stride])>>1); break; case 4: for (i=n; i < width*n; ++i) line_buffer[i] = z[i] - stbiw__paeth(z[i-n], z[i-signed_stride], z[i-signed_stride-n]); break; case 5: for (i=n; i < width*n; ++i) line_buffer[i] = z[i] - (z[i-n]>>1); break; case 6: for (i=n; i < width*n; ++i) line_buffer[i] = z[i] - stbiw__paeth(z[i-n], 0,0); break; } }
O2
c
stbiw__encode_png_line(unsigned char*, int, int, int, int, int, int, signed char*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdi, %r11 movq 0x70(%rsp), %rdi testl %ecx, %ecx leaq 0x7dddb(%rip), %rax # 0x97870 leaq 0x7ddb4(%rip), %r10 # 0x97850 cmoveq %rax, %r10 movslq %r9d, %rax movl (%r10,%rax,4), %ebp imull %esi, %ecx movslq %ecx, %rax leaq (%r11,%rax), %r14 testl %ebp, %ebp je 0x19ba6 movq %rax, 0x18(%rsp) movl %edx, 0xc(%rsp) movq %r11, 0x28(%rsp) movslq %esi, %rcx xorl %r12d, %r12d testl %r8d, %r8d movl $0x0, %r13d movl %r8d, 0x8(%rsp) cmovgl %r8d, %r13d movq %r14, %r15 movq %rcx, 0x10(%rsp) subq %rcx, %r15 decl %ebp leaq 0x7d7c1(%rip), %rcx # 0x972b4 movq %rdi, 0x20(%rsp) movq %r14, 0x30(%rsp) cmpq %r12, %r13 je 0x19b59 cmpl $0x5, %ebp ja 0x19b54 movslq (%rcx,%rbp,4), %rax addq %rcx, %rax jmpq *%rax movb (%r14,%r12), %bl jmp 0x19b50 movb (%r14,%r12), %bl movzbl (%r15,%r12), %esi xorl %edi, %edi xorl %edx, %edx movq %rcx, %r14 callq 0x19d8c movq %r14, %rcx movq 0x30(%rsp), %r14 movq 0x20(%rsp), %rdi jmp 0x19b4e movb (%r14,%r12), %bl subb (%r15,%r12), %bl jmp 0x19b50 movb (%r14,%r12), %bl movb (%r15,%r12), %al shrb %al subb %al, %bl movb %bl, (%rdi,%r12) incq %r12 jmp 0x19afd cmpl $0x5, %ebp movq 0x28(%rsp), %r13 ja 0x19d0f leaq 0x7d75e(%rip), %rax # 0x972cc movslq (%rax,%rbp,4), %rcx addq %rax, %rcx jmpq *%rcx movl 0xc(%rsp), %ecx movl 0x8(%rsp), %eax imull %eax, %ecx cltq movslq %ecx, %rcx xorl %edx, %edx cmpq %rcx, %rax jge 0x19d0f movb (%r14,%rax), %sil subb (%r14,%rdx), %sil movb %sil, (%rdi,%rax) incq %rax incq %rdx jmp 0x19b89 imull %edx, %r8d movslq %r8d, %rdx movq %r14, %rsi addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0xa4c0 movl 0xc(%rsp), %ecx movl 0x8(%rsp), %eax imull %eax, %ecx cltq movslq %ecx, %rcx xorl %edx, %edx cmpq %rcx, %rax jge 0x19d0f movb (%r14,%rax), %sil movb (%r14,%rdx), %r8b shrb %r8b subb %r8b, %sil movb %sil, (%rdi,%rax) incq %rax incq %rdx jmp 0x19bd5 movl 0xc(%rsp), %ecx movl 0x8(%rsp), %eax imull %eax, %ecx cltq movslq %ecx, %rcx movq %rax, %rdx subq 0x10(%rsp), %rdx xorl %esi, %esi leaq (%rax,%rsi), %r8 cmpq %rcx, %r8 jge 0x19d0f movb (%r14,%rax), %r10b movzbl (%r14), %r8d movzbl (%r14,%rdx), %r9d addl %r8d, %r9d shrl %r9d subb %r9b, %r10b movb %r10b, (%rdi,%rax) incq %r14 incq %rdi incq %rsi jmp 0x19c12 movl 0xc(%rsp), %eax movl 0x8(%rsp), %ecx imull %ecx, %eax movslq %ecx, %r15 movslq %eax, %r12 movq 0x18(%rsp), %rax addq %r15, %rax addq %rax, %r13 negq 0x10(%rsp) cmpq %r12, %r15 jge 0x19d0f movb (%r13), %bl movzbl (%r14), %edi movq 0x10(%rsp), %rax movzbl (%r13,%rax), %esi movzbl (%r14,%rax), %edx callq 0x19d8c subb %al, %bl movq 0x20(%rsp), %rax movb %bl, (%rax,%r15) incq %r15 incq %r13 incq %r14 jmp 0x19c65 movl 0xc(%rsp), %ecx movl 0x8(%rsp), %eax imull %eax, %ecx cltq movslq %ecx, %rcx movq 0x18(%rsp), %rdx addq %rax, %rdx addq %rdx, %r13 addq %rax, %rdi negq 0x10(%rsp) movq 0x10(%rsp), %rsi cmpq %rcx, %rax jge 0x19d0f movb (%r13), %dl subb (%r13,%rsi), %dl movb %dl, (%rdi) incq %rax incq %r13 incq %rdi jmp 0x19cc9 movl 0xc(%rsp), %ecx movl 0x8(%rsp), %eax imull %eax, %ecx cltq movslq %ecx, %rcx xorl %edx, %edx cmpq %rcx, %rax jge 0x19d0f movb (%r14,%rax), %sil subb (%r14,%rdx), %sil movb %sil, (%rdi,%rax) incq %rax incq %rdx jmp 0x19cf6 addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZL22stbiw__encode_png_linePhiiiiiiPa: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r11, rdi mov rdi, [rsp+68h+arg_0] test ecx, ecx lea rax, _ZZL22stbiw__encode_png_linePhiiiiiiPaE8firstmap; stbiw__encode_png_line(uchar *,int,int,int,int,int,int,signed char *)::firstmap lea r10, _ZZL22stbiw__encode_png_linePhiiiiiiPaE7mapping; stbiw__encode_png_line(uchar *,int,int,int,int,int,int,signed char *)::mapping cmovz r10, rax movsxd rax, r9d mov ebp, [r10+rax*4] imul ecx, esi movsxd rax, ecx lea r14, [r11+rax] test ebp, ebp jz loc_19BA6 mov [rsp+68h+var_50], rax mov [rsp+68h+var_5C], edx mov [rsp+68h+var_40], r11 movsxd rcx, esi xor r12d, r12d test r8d, r8d mov r13d, 0 mov [rsp+68h+var_60], r8d cmovg r13d, r8d mov r15, r14 mov [rsp+68h+var_58], rcx sub r15, rcx dec ebp lea rcx, jpt_19B0E mov [rsp+68h+var_48], rdi mov [rsp+68h+var_38], r14 loc_19AFD: cmp r13, r12 jz short loc_19B59 cmp ebp, 5; switch 6 cases ja short def_19B0E; jumptable 0000000000019B0E default case movsxd rax, ds:(jpt_19B0E - 972B4h)[rcx+rbp*4] add rax, rcx jmp rax; switch jump loc_19B10: mov bl, [r14+r12]; jumptable 0000000000019B0E cases 0,4,5 jmp short loc_19B50 loc_19B16: mov bl, [r14+r12]; jumptable 0000000000019B0E case 3 movzx esi, byte ptr [r15+r12]; int xor edi, edi; int xor edx, edx; int mov r14, rcx call _ZL12stbiw__paethiii; stbiw__paeth(int,int,int) mov rcx, r14 mov r14, [rsp+68h+var_38] mov rdi, [rsp+68h+var_48] jmp short loc_19B4E loc_19B3A: mov bl, [r14+r12]; jumptable 0000000000019B0E case 1 sub bl, [r15+r12] jmp short loc_19B50 loc_19B44: mov bl, [r14+r12]; jumptable 0000000000019B0E case 2 mov al, [r15+r12] shr al, 1 loc_19B4E: sub bl, al loc_19B50: mov [rdi+r12], bl def_19B0E: inc r12; jumptable 0000000000019B0E default case jmp short loc_19AFD loc_19B59: cmp ebp, 5; switch 6 cases mov r13, [rsp+68h+var_40] ja def_19B75; jumptable 0000000000019B75 default case lea rax, jpt_19B75 movsxd rcx, ds:(jpt_19B75 - 972CCh)[rax+rbp*4] add rcx, rax jmp rcx; switch jump loc_19B77: mov ecx, [rsp+68h+var_5C]; jumptable 0000000000019B75 case 0 mov eax, [rsp+68h+var_60] imul ecx, eax cdqe movsxd rcx, ecx xor edx, edx loc_19B89: cmp rax, rcx jge def_19B75; jumptable 0000000000019B75 default case mov sil, [r14+rax] sub sil, [r14+rdx] mov [rdi+rax], sil inc rax inc rdx jmp short loc_19B89 loc_19BA6: imul r8d, edx movsxd rdx, r8d mov rsi, r14 add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _memcpy loc_19BC3: mov ecx, [rsp+68h+var_5C]; jumptable 0000000000019B75 case 4 mov eax, [rsp+68h+var_60] imul ecx, eax cdqe movsxd rcx, ecx xor edx, edx loc_19BD5: cmp rax, rcx jge def_19B75; jumptable 0000000000019B75 default case mov sil, [r14+rax] mov r8b, [r14+rdx] shr r8b, 1 sub sil, r8b mov [rdi+rax], sil inc rax inc rdx jmp short loc_19BD5 loc_19BF8: mov ecx, [rsp+68h+var_5C]; jumptable 0000000000019B75 case 2 mov eax, [rsp+68h+var_60] imul ecx, eax cdqe movsxd rcx, ecx mov rdx, rax sub rdx, [rsp+68h+var_58] xor esi, esi loc_19C12: lea r8, [rax+rsi] cmp r8, rcx jge def_19B75; jumptable 0000000000019B75 default case mov r10b, [r14+rax] movzx r8d, byte ptr [r14] movzx r9d, byte ptr [r14+rdx] add r9d, r8d shr r9d, 1 sub r10b, r9b mov [rdi+rax], r10b inc r14 inc rdi inc rsi jmp short loc_19C12 loc_19C44: mov eax, [rsp+68h+var_5C]; jumptable 0000000000019B75 case 3 mov ecx, [rsp+68h+var_60] imul eax, ecx movsxd r15, ecx movsxd r12, eax mov rax, [rsp+68h+var_50] add rax, r15 add r13, rax neg [rsp+68h+var_58] loc_19C65: cmp r15, r12 jge def_19B75; jumptable 0000000000019B75 default case mov bl, [r13+0] movzx edi, byte ptr [r14]; int mov rax, [rsp+68h+var_58] movzx esi, byte ptr [r13+rax+0]; int movzx edx, byte ptr [r14+rax]; int call _ZL12stbiw__paethiii; stbiw__paeth(int,int,int) sub bl, al mov rax, [rsp+68h+var_48] mov [rax+r15], bl inc r15 inc r13 inc r14 jmp short loc_19C65 loc_19CA1: mov ecx, [rsp+68h+var_5C]; jumptable 0000000000019B75 case 1 mov eax, [rsp+68h+var_60] imul ecx, eax cdqe movsxd rcx, ecx mov rdx, [rsp+68h+var_50] add rdx, rax add r13, rdx add rdi, rax neg [rsp+68h+var_58] mov rsi, [rsp+68h+var_58] loc_19CC9: cmp rax, rcx jge short def_19B75; jumptable 0000000000019B75 default case mov dl, [r13+0] sub dl, [r13+rsi+0] mov [rdi], dl inc rax inc r13 inc rdi jmp short loc_19CC9 loc_19CE4: mov ecx, [rsp+68h+var_5C]; jumptable 0000000000019B75 case 5 mov eax, [rsp+68h+var_60] imul ecx, eax cdqe movsxd rcx, ecx xor edx, edx loc_19CF6: cmp rax, rcx jge short def_19B75; jumptable 0000000000019B75 default case mov sil, [r14+rax] sub sil, [r14+rdx] mov [rdi+rax], sil inc rax inc rdx jmp short loc_19CF6 def_19B75: add rsp, 38h; jumptable 0000000000019B75 default case pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
char stbiw__encode_png_line(unsigned __int8 *a1, int a2, int a3, int a4, int a5, int a6, long long a7) { long long v8; // rdi _DWORD *v9; // r10 int v10; // ebp int v11; // ecx long long v12; // rax unsigned __int8 *v13; // r14 long long v14; // rcx long long v15; // r12 long long v16; // r13 unsigned __int8 *v17; // r15 int v18; // ebp unsigned __int8 v19; // bl unsigned __int8 v20; // bl long long v21; // r14 long long v22; // rdx long long v23; // rdx long long v24; // rdx long long i; // rsi long long v26; // r15 unsigned __int8 *v27; // r13 unsigned __int8 v28; // bl char v29; // bl unsigned __int8 *v30; // r13 _BYTE *v31; // rdi long long v32; // rsi long long v33; // rdx long long v37; // [rsp+18h] [rbp-50h] unsigned __int8 *v38; // [rsp+28h] [rbp-40h] unsigned __int8 *v39; // [rsp+30h] [rbp-38h] v8 = a7; v9 = &stbiw__encode_png_line(unsigned char *,int,int,int,int,int,int,signed char *)::mapping; if ( !a4 ) v9 = &stbiw__encode_png_line(unsigned char *,int,int,int,int,int,int,signed char *)::firstmap; v10 = v9[a6]; v11 = a2 * a4; LOBYTE(v12) = v11; v13 = &a1[v11]; if ( v10 ) { v37 = v11; v38 = a1; v14 = a2; v15 = 0LL; v16 = 0LL; if ( a5 > 0 ) v16 = (unsigned int)a5; v17 = &v13[-a2]; v18 = v10 - 1; v39 = v13; while ( v16 != v15 ) { switch ( v18 ) { case 0: case 4: case 5: v19 = v13[v15]; goto LABEL_14; case 1: v19 = v13[v15] - v17[v15]; goto LABEL_14; case 2: v20 = v13[v15]; LOBYTE(v12) = v17[v15] >> 1; goto LABEL_13; case 3: v20 = v13[v15]; v21 = v14; LOBYTE(v12) = stbiw__paeth(0, v17[v15], 0); v14 = v21; v13 = v39; v8 = a7; LABEL_13: v19 = v20 - v12; LABEL_14: *(_BYTE *)(v8 + v15) = v19; break; default: break; } ++v15; } switch ( v18 ) { case 0: v12 = a5; v22 = 0LL; while ( v12 < a5 * a3 ) { *(_BYTE *)(v8 + v12) = v13[v12] - v13[v22]; ++v12; ++v22; } break; case 1: v12 = a5; v30 = &v38[a5 + v37]; v31 = (_BYTE *)(a5 + v8); v32 = -(long long)a2; while ( v12 < a5 * a3 ) { *v31 = *v30 - v30[v32]; ++v12; ++v30; ++v31; } break; case 2: LOBYTE(v12) = a5; v24 = a5 - (long long)a2; for ( i = 0LL; a5 + i < a5 * a3; ++i ) { *(_BYTE *)(v8 + a5) = v13[a5] - ((*v13 + (unsigned int)v13[v24]) >> 1); ++v13; ++v8; } break; case 3: v26 = a5; v12 = a5 + v37; v27 = &v38[v12]; while ( v26 < a5 * a3 ) { v28 = *v27; v29 = v28 - stbiw__paeth(*v13, v27[-a2], v13[-a2]); LOBYTE(v12) = a7; *(_BYTE *)(a7 + v26++) = v29; ++v27; ++v13; } break; case 4: v12 = a5; v23 = 0LL; while ( v12 < a5 * a3 ) { *(_BYTE *)(v8 + v12) = v13[v12] - (v13[v23] >> 1); ++v12; ++v23; } break; case 5: v12 = a5; v33 = 0LL; while ( v12 < a5 * a3 ) { *(_BYTE *)(v8 + v12) = v13[v12] - v13[v33]; ++v12; ++v33; } break; default: return v12; } } else { LOBYTE(v12) = memcpy(a7, &a1[v11], a3 * a5); } return v12; }
stbiw__encode_png_line: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R11,RDI MOV RDI,qword ptr [RSP + 0x70] TEST ECX,ECX LEA RAX,[0x197870] LEA R10,[0x197850] CMOVZ R10,RAX MOVSXD RAX,R9D MOV EBP,dword ptr [R10 + RAX*0x4] IMUL ECX,ESI MOVSXD RAX,ECX LEA R14,[R11 + RAX*0x1] TEST EBP,EBP JZ 0x00119ba6 MOV qword ptr [RSP + 0x18],RAX MOV dword ptr [RSP + 0xc],EDX MOV qword ptr [RSP + 0x28],R11 MOVSXD RCX,ESI XOR R12D,R12D TEST R8D,R8D MOV R13D,0x0 MOV dword ptr [RSP + 0x8],R8D CMOVG R13D,R8D MOV R15,R14 MOV qword ptr [RSP + 0x10],RCX SUB R15,RCX DEC EBP LEA RCX,[0x1972b4] MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x30],R14 LAB_00119afd: CMP R13,R12 JZ 0x00119b59 CMP EBP,0x5 JA 0x00119b54 MOVSXD RAX,dword ptr [RCX + RBP*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: MOV BL,byte ptr [R14 + R12*0x1] JMP 0x00119b50 caseD_3: MOV BL,byte ptr [R14 + R12*0x1] MOVZX ESI,byte ptr [R15 + R12*0x1] XOR EDI,EDI XOR EDX,EDX MOV R14,RCX CALL 0x00119d8c MOV RCX,R14 MOV R14,qword ptr [RSP + 0x30] MOV RDI,qword ptr [RSP + 0x20] JMP 0x00119b4e caseD_1: MOV BL,byte ptr [R14 + R12*0x1] SUB BL,byte ptr [R15 + R12*0x1] JMP 0x00119b50 caseD_2: MOV BL,byte ptr [R14 + R12*0x1] MOV AL,byte ptr [R15 + R12*0x1] SHR AL,0x1 LAB_00119b4e: SUB BL,AL LAB_00119b50: MOV byte ptr [RDI + R12*0x1],BL default: INC R12 JMP 0x00119afd LAB_00119b59: CMP EBP,0x5 MOV R13,qword ptr [RSP + 0x28] JA 0x00119d0f LEA RAX,[0x1972cc] MOVSXD RCX,dword ptr [RAX + RBP*0x4] ADD RCX,RAX switchD: JMP RCX caseD_0: MOV ECX,dword ptr [RSP + 0xc] MOV EAX,dword ptr [RSP + 0x8] IMUL ECX,EAX CDQE MOVSXD RCX,ECX XOR EDX,EDX LAB_00119b89: CMP RAX,RCX JGE 0x00119d0f MOV SIL,byte ptr [R14 + RAX*0x1] SUB SIL,byte ptr [R14 + RDX*0x1] MOV byte ptr [RDI + RAX*0x1],SIL INC RAX INC RDX JMP 0x00119b89 LAB_00119ba6: IMUL R8D,EDX MOVSXD RDX,R8D MOV RSI,R14 ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0010a4c0 caseD_4: MOV ECX,dword ptr [RSP + 0xc] MOV EAX,dword ptr [RSP + 0x8] IMUL ECX,EAX CDQE MOVSXD RCX,ECX XOR EDX,EDX LAB_00119bd5: CMP RAX,RCX JGE 0x00119d0f MOV SIL,byte ptr [R14 + RAX*0x1] MOV R8B,byte ptr [R14 + RDX*0x1] SHR R8B,0x1 SUB SIL,R8B MOV byte ptr [RDI + RAX*0x1],SIL INC RAX INC RDX JMP 0x00119bd5 caseD_2: MOV ECX,dword ptr [RSP + 0xc] MOV EAX,dword ptr [RSP + 0x8] IMUL ECX,EAX CDQE MOVSXD RCX,ECX MOV RDX,RAX SUB RDX,qword ptr [RSP + 0x10] XOR ESI,ESI LAB_00119c12: LEA R8,[RAX + RSI*0x1] CMP R8,RCX JGE 0x00119d0f MOV R10B,byte ptr [R14 + RAX*0x1] MOVZX R8D,byte ptr [R14] MOVZX R9D,byte ptr [R14 + RDX*0x1] ADD R9D,R8D SHR R9D,0x1 SUB R10B,R9B MOV byte ptr [RDI + RAX*0x1],R10B INC R14 INC RDI INC RSI JMP 0x00119c12 caseD_3: MOV EAX,dword ptr [RSP + 0xc] MOV ECX,dword ptr [RSP + 0x8] IMUL EAX,ECX MOVSXD R15,ECX MOVSXD R12,EAX MOV RAX,qword ptr [RSP + 0x18] ADD RAX,R15 ADD R13,RAX NEG qword ptr [RSP + 0x10] LAB_00119c65: CMP R15,R12 JGE 0x00119d0f MOV BL,byte ptr [R13] MOVZX EDI,byte ptr [R14] MOV RAX,qword ptr [RSP + 0x10] MOVZX ESI,byte ptr [R13 + RAX*0x1] MOVZX EDX,byte ptr [R14 + RAX*0x1] CALL 0x00119d8c SUB BL,AL MOV RAX,qword ptr [RSP + 0x20] MOV byte ptr [RAX + R15*0x1],BL INC R15 INC R13 INC R14 JMP 0x00119c65 caseD_1: MOV ECX,dword ptr [RSP + 0xc] MOV EAX,dword ptr [RSP + 0x8] IMUL ECX,EAX CDQE MOVSXD RCX,ECX MOV RDX,qword ptr [RSP + 0x18] ADD RDX,RAX ADD R13,RDX ADD RDI,RAX NEG qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x10] LAB_00119cc9: CMP RAX,RCX JGE 0x00119d0f MOV DL,byte ptr [R13] SUB DL,byte ptr [R13 + RSI*0x1] MOV byte ptr [RDI],DL INC RAX INC R13 INC RDI JMP 0x00119cc9 caseD_5: MOV ECX,dword ptr [RSP + 0xc] MOV EAX,dword ptr [RSP + 0x8] IMUL ECX,EAX CDQE MOVSXD RCX,ECX XOR EDX,EDX LAB_00119cf6: CMP RAX,RCX JGE 0x00119d0f MOV SIL,byte ptr [R14 + RAX*0x1] SUB SIL,byte ptr [R14 + RDX*0x1] MOV byte ptr [RDI + RAX*0x1],SIL INC RAX INC RDX JMP 0x00119cf6 default: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* stbiw__encode_png_line(unsigned char*, int, int, int, int, int, int, signed char*) */ void stbiw__encode_png_line (uchar *param_1,int param_2,int param_3,int param_4,int param_5,int param_6, int param_7,signed *param_8) { uchar uVar1; byte bVar2; char cVar3; long lVar4; long lVar5; byte bVar6; int iVar7; void *__dest; char *pcVar8; int1 *puVar9; ulong uVar10; ulong uVar11; uchar *puVar12; byte *__src; long lVar13; int4 in_stack_0000000c; __dest = (void *)CONCAT44(in_stack_0000000c,param_7); puVar9 = stbiw__encode_png_line(unsigned_char*,int,int,int,int,int,int,signed*)::mapping; if (param_4 == 0) { puVar9 = stbiw__encode_png_line(unsigned_char*,int,int,int,int,int,int,signed*)::firstmap; } lVar4 = (long)(param_4 * param_2); __src = param_1 + lVar4; if (*(int *)(puVar9 + (long)param_6 * 4) == 0) { memcpy(__dest,__src,(long)(param_5 * param_3)); return; } lVar5 = (long)param_2; uVar10 = 0; uVar11 = 0; if (0 < param_5) { uVar11 = (ulong)(uint)param_5; } iVar7 = *(int *)(puVar9 + (long)param_6 * 4) + -1; do { if (uVar11 == uVar10) { switch(iVar7) { case 0: lVar5 = 0; for (lVar4 = (long)param_5; lVar4 < param_3 * param_5; lVar4 = lVar4 + 1) { *(byte *)((long)__dest + lVar4) = __src[lVar4] - __src[lVar5]; lVar5 = lVar5 + 1; } break; case 1: lVar13 = (long)param_5; puVar12 = param_1 + lVar4 + lVar13; pcVar8 = (char *)((long)__dest + lVar13); for (; lVar13 < param_3 * param_5; lVar13 = lVar13 + 1) { *pcVar8 = *puVar12 - puVar12[-lVar5]; puVar12 = puVar12 + 1; pcVar8 = pcVar8 + 1; } break; case 2: lVar4 = (long)param_5; for (lVar13 = 0; lVar4 + lVar13 < (long)(param_3 * param_5); lVar13 = lVar13 + 1) { *(byte *)((long)__dest + lVar4) = __src[lVar4] - (char)((uint)__src[lVar4 - lVar5] + (uint)*__src >> 1); __src = __src + 1; __dest = (void *)((long)__dest + 1); } break; case 3: lVar13 = (long)param_5; puVar12 = param_1 + lVar4 + lVar13; for (; lVar13 < param_3 * param_5; lVar13 = lVar13 + 1) { uVar1 = *puVar12; cVar3 = stbiw__paeth((uint)*__src,(uint)puVar12[-lVar5],(uint)__src[-lVar5]); *(uchar *)((long)__dest + lVar13) = uVar1 - cVar3; puVar12 = puVar12 + 1; __src = __src + 1; } break; case 4: lVar5 = 0; for (lVar4 = (long)param_5; lVar4 < param_3 * param_5; lVar4 = lVar4 + 1) { *(byte *)((long)__dest + lVar4) = __src[lVar4] - (__src[lVar5] >> 1); lVar5 = lVar5 + 1; } break; case 5: lVar5 = 0; for (lVar4 = (long)param_5; lVar4 < param_3 * param_5; lVar4 = lVar4 + 1) { *(byte *)((long)__dest + lVar4) = __src[lVar4] - __src[lVar5]; lVar5 = lVar5 + 1; } } return; } switch(iVar7) { case 0: case 4: case 5: bVar6 = __src[uVar10]; break; case 1: bVar6 = __src[uVar10] - __src[uVar10 - lVar5]; break; case 2: bVar6 = __src[uVar10]; bVar2 = __src[uVar10 - lVar5] >> 1; goto LAB_00119b4e; case 3: bVar6 = __src[uVar10]; bVar2 = stbiw__paeth(0,(uint)__src[uVar10 - lVar5],0); LAB_00119b4e: bVar6 = bVar6 - bVar2; break; default: goto switchD_00119b0e_default; } *(byte *)((long)__dest + uVar10) = bVar6; switchD_00119b0e_default: uVar10 = uVar10 + 1; } while( true ); }
16,679
stbiw__encode_png_line(unsigned char*, int, int, int, int, int, int, signed char*)
7CodeWizard[P]stablediffusion/thirdparty/stb_image_write.h
static void stbiw__encode_png_line(unsigned char *pixels, int stride_bytes, int width, int height, int y, int n, int filter_type, signed char *line_buffer) { static int mapping[] = { 0,1,2,3,4 }; static int firstmap[] = { 0,1,0,5,6 }; int *mymap = (y != 0) ? mapping : firstmap; int i; int type = mymap[filter_type]; unsigned char *z = pixels + stride_bytes * (stbi__flip_vertically_on_write ? height-1-y : y); int signed_stride = stbi__flip_vertically_on_write ? -stride_bytes : stride_bytes; if (type==0) { memcpy(line_buffer, z, width*n); return; } // first loop isn't optimized since it's just one pixel for (i = 0; i < n; ++i) { switch (type) { case 1: line_buffer[i] = z[i]; break; case 2: line_buffer[i] = z[i] - z[i-signed_stride]; break; case 3: line_buffer[i] = z[i] - (z[i-signed_stride]>>1); break; case 4: line_buffer[i] = (signed char) (z[i] - stbiw__paeth(0,z[i-signed_stride],0)); break; case 5: line_buffer[i] = z[i]; break; case 6: line_buffer[i] = z[i]; break; } } switch (type) { case 1: for (i=n; i < width*n; ++i) line_buffer[i] = z[i] - z[i-n]; break; case 2: for (i=n; i < width*n; ++i) line_buffer[i] = z[i] - z[i-signed_stride]; break; case 3: for (i=n; i < width*n; ++i) line_buffer[i] = z[i] - ((z[i-n] + z[i-signed_stride])>>1); break; case 4: for (i=n; i < width*n; ++i) line_buffer[i] = z[i] - stbiw__paeth(z[i-n], z[i-signed_stride], z[i-signed_stride-n]); break; case 5: for (i=n; i < width*n; ++i) line_buffer[i] = z[i] - (z[i-n]>>1); break; case 6: for (i=n; i < width*n; ++i) line_buffer[i] = z[i] - stbiw__paeth(z[i-n], 0,0); break; } }
O3
c
stbiw__encode_png_line(unsigned char*, int, int, int, int, int, int, signed char*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movl %esi, %r10d movq %rdi, %rax movq 0x38(%rsp), %rdi testl %ecx, %ecx leaq 0x8ca7c(%rip), %rsi # 0xba940 leaq 0x8ca55(%rip), %r11 # 0xba920 cmoveq %rsi, %r11 movslq %r9d, %rsi movl (%r11,%rsi,4), %r9d imull %r10d, %ecx movslq %ecx, %rcx leaq (%rax,%rcx), %rsi testl %r9d, %r9d je 0x2df92 testl %r8d, %r8d jle 0x2df46 movslq %r10d, %r14 movl %r8d, %r11d movq %rcx, %rbx subq %r14, %rbx addq %rax, %rbx xorl %r14d, %r14d leal -0x1(%r9), %r15d leaq 0x8c470(%rip), %r12 # 0xba37c cmpl $0x5, %r15d ja 0x2df3e movslq (%r12,%r15,4), %r13 addq %r12, %r13 jmpq *%r13 movb (%rsi,%r14), %bpl jmp 0x2df3a movb (%rsi,%r14), %bpl subb (%rbx,%r14), %bpl jmp 0x2df3a movb (%rsi,%r14), %bpl movb (%rbx,%r14), %r13b shrb %r13b subb %r13b, %bpl movb %bpl, (%rdi,%r14) incq %r14 cmpq %r14, %r11 jne 0x2df0c decl %r9d cmpl $0x5, %r9d ja 0x2e123 leaq 0x8c43a(%rip), %r11 # 0xba394 movslq (%r11,%r9,4), %r9 addq %r11, %r9 jmpq *%r9 imull %r8d, %edx cmpl %r8d, %edx jle 0x2e123 movslq %r8d, %rax movslq %edx, %rcx movb (%rsi,%rax), %dl subb (%rsi), %dl movb %dl, (%rdi,%rax) incq %rsi incq %rdi decq %rcx cmpq %rcx, %rax jne 0x2df77 jmp 0x2e123 imull %edx, %r8d movslq %r8d, %rdx popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0xa4b0 imull %r8d, %edx cmpl %r8d, %edx jle 0x2e123 movslq %r8d, %rax movslq %edx, %rcx movb (%rsi,%rax), %dl movb (%rsi), %r8b shrb %r8b subb %r8b, %dl movb %dl, (%rdi,%rax) incq %rsi incq %rdi decq %rcx cmpq %rcx, %rax jne 0x2dfbb jmp 0x2e123 imull %r8d, %edx cmpl %r8d, %edx jle 0x2e123 movslq %r8d, %r9 movslq %r10d, %r8 movslq %edx, %rdx negq %r8 addq %r9, %rcx addq %rcx, %rax addq %r9, %rdi subq %r9, %rdx xorl %ecx, %ecx movb (%rax), %r9b movzbl (%rsi,%rcx), %r10d movzbl (%rax,%r8), %r11d addl %r10d, %r11d shrl %r11d subb %r11b, %r9b movb %r9b, (%rdi,%rcx) incq %rax incq %rcx cmpq %rcx, %rdx jne 0x2e004 jmp 0x2e123 imull %r8d, %edx cmpl %r8d, %edx jle 0x2e123 movslq %r8d, %r9 movslq %r10d, %r10 movslq %edx, %rdx leaq (%r9,%rcx), %r11 subq %r10, %rcx addq %rax, %rcx movq %r11, %r8 subq %r10, %r8 addq %rax, %r8 addq %r11, %rax addq %r9, %rdi subq %r9, %rdx xorl %r9d, %r9d movzbl (%rsi,%r9), %r10d movzbl (%r8,%r9), %ebx movzbl (%rcx,%r9), %r11d leal (%rbx,%r10), %r12d subl %r11d, %r12d movl %r12d, %r14d subl %r10d, %r14d movl %r14d, %ebp negl %ebp cmovsl %r14d, %ebp movl %r12d, %r15d subl %ebx, %r15d movl %r15d, %r14d negl %r14d cmovsl %r15d, %r14d subl %r11d, %r12d movl %r12d, %r15d negl %r15d cmovsl %r12d, %r15d cmpl %r15d, %r14d ja 0x2e0ad movl %ebx, %r11d movb (%rax,%r9), %bl cmpl %r15d, %ebp cmoval %r11d, %r10d cmpl %r14d, %ebp cmoval %r11d, %r10d subb %r10b, %bl movb %bl, (%rdi,%r9) incq %r9 cmpq %r9, %rdx jne 0x2e063 jmp 0x2e123 imull %r8d, %edx cmpl %r8d, %edx jle 0x2e123 movslq %r8d, %r8 movslq %r10d, %r9 movslq %edx, %rdx subq %r9, %rcx addq %rcx, %rax movb (%rsi,%r8), %cl subb (%rax,%r8), %cl movb %cl, (%rdi,%r8) incq %r8 cmpq %r8, %rdx jne 0x2e0e8 jmp 0x2e123 imull %r8d, %edx cmpl %r8d, %edx jle 0x2e123 movslq %r8d, %rax movslq %edx, %rcx movb (%rsi,%rax), %dl subb (%rsi), %dl movb %dl, (%rdi,%rax) incq %rsi incq %rdi decq %rcx cmpq %rcx, %rax jne 0x2e10d popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZL22stbiw__encode_png_linePhiiiiiiPa: push rbp push r15 push r14 push r13 push r12 push rbx mov r10d, esi mov rax, rdi mov rdi, [rsp+30h+arg_0] test ecx, ecx lea rsi, _ZZL22stbiw__encode_png_linePhiiiiiiPaE8firstmap; stbiw__encode_png_line(uchar *,int,int,int,int,int,int,signed char *)::firstmap lea r11, _ZZL22stbiw__encode_png_linePhiiiiiiPaE7mapping; stbiw__encode_png_line(uchar *,int,int,int,int,int,int,signed char *)::mapping cmovz r11, rsi movsxd rsi, r9d mov r9d, [r11+rsi*4] imul ecx, r10d movsxd rcx, ecx lea rsi, [rax+rcx] test r9d, r9d jz loc_2DF92 test r8d, r8d jle short loc_2DF46 movsxd r14, r10d mov r11d, r8d mov rbx, rcx sub rbx, r14 add rbx, rax xor r14d, r14d lea r15d, [r9-1] lea r12, jpt_2DF19 loc_2DF0C: cmp r15d, 5; switch 6 cases ja short def_2DF19; jumptable 000000000002DF19 default case movsxd r13, ds:(jpt_2DF19 - 0BA37Ch)[r12+r15*4] add r13, r12 jmp r13; switch jump loc_2DF1C: mov bpl, [rsi+r14]; jumptable 000000000002DF19 cases 0,4,5 jmp short loc_2DF3A loc_2DF22: mov bpl, [rsi+r14]; jumptable 000000000002DF19 cases 1,3 sub bpl, [rbx+r14] jmp short loc_2DF3A loc_2DF2C: mov bpl, [rsi+r14]; jumptable 000000000002DF19 case 2 mov r13b, [rbx+r14] shr r13b, 1 sub bpl, r13b loc_2DF3A: mov [rdi+r14], bpl def_2DF19: inc r14; jumptable 000000000002DF19 default case cmp r11, r14 jnz short loc_2DF0C loc_2DF46: dec r9d; switch 6 cases cmp r9d, 5 ja def_2DF61; jumptable 000000000002DF61 default case lea r11, jpt_2DF61 movsxd r9, ds:(jpt_2DF61 - 0BA394h)[r11+r9*4] add r9, r11 jmp r9; switch jump loc_2DF64: imul edx, r8d; jumptable 000000000002DF61 case 1 cmp edx, r8d jle def_2DF61; jumptable 000000000002DF61 default case movsxd rax, r8d movsxd rcx, edx loc_2DF77: mov dl, [rsi+rax] sub dl, [rsi] mov [rdi+rax], dl inc rsi inc rdi dec rcx cmp rax, rcx jnz short loc_2DF77 jmp def_2DF61; jumptable 000000000002DF61 default case loc_2DF92: imul r8d, edx movsxd rdx, r8d pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _memcpy loc_2DFA8: imul edx, r8d; jumptable 000000000002DF61 case 5 cmp edx, r8d jle def_2DF61; jumptable 000000000002DF61 default case movsxd rax, r8d movsxd rcx, edx loc_2DFBB: mov dl, [rsi+rax] mov r8b, [rsi] shr r8b, 1 sub dl, r8b mov [rdi+rax], dl inc rsi inc rdi dec rcx cmp rax, rcx jnz short loc_2DFBB jmp def_2DF61; jumptable 000000000002DF61 default case loc_2DFDD: imul edx, r8d; jumptable 000000000002DF61 case 3 cmp edx, r8d jle def_2DF61; jumptable 000000000002DF61 default case movsxd r9, r8d movsxd r8, r10d movsxd rdx, edx neg r8 add rcx, r9 add rax, rcx add rdi, r9 sub rdx, r9 xor ecx, ecx loc_2E004: mov r9b, [rax] movzx r10d, byte ptr [rsi+rcx] movzx r11d, byte ptr [rax+r8] add r11d, r10d shr r11d, 1 sub r9b, r11b mov [rdi+rcx], r9b inc rax inc rcx cmp rdx, rcx jnz short loc_2E004 jmp def_2DF61; jumptable 000000000002DF61 default case loc_2E02E: imul edx, r8d; jumptable 000000000002DF61 case 4 cmp edx, r8d jle def_2DF61; jumptable 000000000002DF61 default case movsxd r9, r8d movsxd r10, r10d movsxd rdx, edx lea r11, [r9+rcx] sub rcx, r10 add rcx, rax mov r8, r11 sub r8, r10 add r8, rax add rax, r11 add rdi, r9 sub rdx, r9 xor r9d, r9d loc_2E063: movzx r10d, byte ptr [rsi+r9] movzx ebx, byte ptr [r8+r9] movzx r11d, byte ptr [rcx+r9] lea r12d, [rbx+r10] sub r12d, r11d mov r14d, r12d sub r14d, r10d mov ebp, r14d neg ebp cmovs ebp, r14d mov r15d, r12d sub r15d, ebx mov r14d, r15d neg r14d cmovs r14d, r15d sub r12d, r11d mov r15d, r12d neg r15d cmovs r15d, r12d cmp r14d, r15d ja short loc_2E0AD mov r11d, ebx loc_2E0AD: mov bl, [rax+r9] cmp ebp, r15d cmova r10d, r11d cmp ebp, r14d cmova r10d, r11d sub bl, r10b mov [rdi+r9], bl inc r9 cmp rdx, r9 jnz short loc_2E063 jmp short def_2DF61; jumptable 000000000002DF61 default case loc_2E0D0: imul edx, r8d; jumptable 000000000002DF61 case 2 cmp edx, r8d jle short def_2DF61; jumptable 000000000002DF61 default case movsxd r8, r8d movsxd r9, r10d movsxd rdx, edx sub rcx, r9 add rax, rcx loc_2E0E8: mov cl, [rsi+r8] sub cl, [rax+r8] mov [rdi+r8], cl inc r8 cmp rdx, r8 jnz short loc_2E0E8 jmp short def_2DF61; jumptable 000000000002DF61 default case loc_2E0FE: imul edx, r8d; jumptable 000000000002DF61 case 6 cmp edx, r8d jle short def_2DF61; jumptable 000000000002DF61 default case movsxd rax, r8d movsxd rcx, edx loc_2E10D: mov dl, [rsi+rax] sub dl, [rsi] mov [rdi+rax], dl inc rsi inc rdi dec rcx cmp rax, rcx jnz short loc_2E10D def_2DF61: pop rbx; jumptable 000000000002DF61 default case pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long stbiw__encode_png_line(unsigned __int8 *a1, int a2, int a3, int a4, long long a5, int a6, long long a7) { long long result; // rax long long v9; // rdi _DWORD *v10; // r11 int v11; // r9d long long v12; // rcx _BYTE *v13; // rsi long long v14; // rbx long long v15; // r14 char v16; // bp int v17; // edx long long v18; // rcx int v19; // edx long long v20; // rcx int v21; // edx long long v22; // rdx long long v23; // rcx int v24; // edx long long v25; // r9 long long v26; // r11 long long v27; // rcx long long v28; // r8 long long v29; // rdi long long v30; // rdx long long v31; // r9 int v32; // r10d int v33; // ebx int v34; // r11d unsigned int v35; // ebp unsigned int v36; // r14d unsigned int v37; // r15d int v38; // edx int v39; // edx long long v40; // rcx result = (long long)a1; v9 = a7; v10 = &stbiw__encode_png_line(unsigned char *,int,int,int,int,int,int,signed char *)::mapping; if ( !a4 ) v10 = &stbiw__encode_png_line(unsigned char *,int,int,int,int,int,int,signed char *)::firstmap; v11 = v10[a6]; v12 = a2 * a4; v13 = (_BYTE *)(result + v12); if ( !v11 ) return memcpy(a7, v13, a3 * (int)a5); if ( (int)a5 > 0 ) { v14 = result + v12 - a2; v15 = 0LL; do { switch ( v11 ) { case 1: case 5: case 6: v16 = v13[v15]; goto LABEL_10; case 2: case 4: v16 = v13[v15] - *(_BYTE *)(v14 + v15); goto LABEL_10; case 3: v16 = v13[v15] - (*(_BYTE *)(v14 + v15) >> 1); LABEL_10: *(_BYTE *)(a7 + v15) = v16; break; default: break; } ++v15; } while ( (unsigned int)a5 != v15 ); } switch ( v11 ) { case 1: v17 = a5 * a3; if ( v17 > (int)a5 ) { result = (int)a5; v18 = v17; do { *(_BYTE *)(v9 + (int)a5) = v13[(int)a5] - *v13; ++v13; ++v9; --v18; } while ( (int)a5 != v18 ); } break; case 2: v38 = a5 * a3; if ( v38 > (int)a5 ) { a5 = (int)a5; result += v12 - a2; do { *(_BYTE *)(a7 + a5) = v13[a5] - *(_BYTE *)(result + a5); ++a5; } while ( v38 != a5 ); } break; case 3: v21 = a5 * a3; if ( v21 > (int)a5 ) { result += (int)a5 + v12; v22 = v21 - (long long)(int)a5; v23 = 0LL; do { *(_BYTE *)((int)a5 + a7 + v23) = *(_BYTE *)result - (((unsigned __int8)v13[v23] + (unsigned int)*(unsigned __int8 *)(result - a2)) >> 1); ++result; ++v23; } while ( v22 != v23 ); } break; case 4: v24 = a5 * a3; if ( v24 > (int)a5 ) { v25 = (int)a5; v26 = (int)a5 + v12; v27 = result + v12 - a2; v28 = result + v26 - a2; result += v26; v29 = v25 + a7; v30 = v24 - v25; v31 = 0LL; do { v32 = (unsigned __int8)v13[v31]; v33 = *(unsigned __int8 *)(v28 + v31); v34 = *(unsigned __int8 *)(v27 + v31); v35 = v34 - v33; if ( v34 - v33 < 0 ) v35 = v33 - v34; v36 = v34 - v32; if ( v34 - v32 < 0 ) v36 = v32 - v34; v37 = v34 - (v33 + v32 - v34); if ( v33 + v32 - v34 - v34 > 0 ) v37 = v33 + v32 - v34 - v34; if ( v36 <= v37 ) LOBYTE(v34) = *(_BYTE *)(v28 + v31); if ( v35 > v37 ) LOBYTE(v32) = v34; if ( v35 > v36 ) LOBYTE(v32) = v34; *(_BYTE *)(v29 + v31) = *(_BYTE *)(result + v31) - v32; ++v31; } while ( v30 != v31 ); } break; case 5: v19 = a5 * a3; if ( v19 > (int)a5 ) { result = (int)a5; v20 = v19; do { *(_BYTE *)(v9 + (int)a5) = v13[(int)a5] - (*v13 >> 1); ++v13; ++v9; --v20; } while ( (int)a5 != v20 ); } break; case 6: v39 = a5 * a3; if ( v39 > (int)a5 ) { result = (int)a5; v40 = v39; do { *(_BYTE *)(v9 + (int)a5) = v13[(int)a5] - *v13; ++v13; ++v9; --v40; } while ( (int)a5 != v40 ); } break; default: return result; } return result; }
16,680
translog_free_link
eloqsql/storage/maria/ma_loghandler.c
static void translog_free_link(PAGECACHE_BLOCK_LINK *direct_link) { DBUG_ENTER("translog_free_link"); DBUG_PRINT("info", ("Direct link: %p", direct_link)); if (direct_link) pagecache_unlock_by_link(log_descriptor.pagecache, direct_link, PAGECACHE_LOCK_READ_UNLOCK, PAGECACHE_UNPIN, LSN_IMPOSSIBLE, LSN_IMPOSSIBLE, 0, FALSE); DBUG_VOID_RETURN; }
O3
c
translog_free_link: testq %rdi, %rdi je 0x4cf43 pushq %rbp movq %rsp, %rbp movq %rdi, %rsi movq 0x3b3b4b(%rip), %rdi # 0x400a70 xorl %eax, %eax movl $0x5, %edx movl $0x3, %ecx xorl %r8d, %r8d xorl %r9d, %r9d pushq %rax pushq %rax callq 0x33231 addq $0x10, %rsp popq %rbp retq
translog_free_link: test rdi, rdi jz short locret_4CF43 push rbp mov rbp, rsp mov rsi, rdi mov rdi, cs:log_descriptor xor eax, eax mov edx, 5 mov ecx, 3 xor r8d, r8d xor r9d, r9d push rax push rax call pagecache_unlock_by_link add rsp, 10h pop rbp locret_4CF43: retn
long long translog_free_link(long long a1) { long long result; // rax if ( a1 ) return pagecache_unlock_by_link(log_descriptor[0], a1, 5, 3, 0LL, 0LL, 0); return result; }
translog_free_link: TEST RDI,RDI JZ 0x0014cf43 PUSH RBP MOV RBP,RSP MOV RSI,RDI MOV RDI,qword ptr [0x00500a70] XOR EAX,EAX MOV EDX,0x5 MOV ECX,0x3 XOR R8D,R8D XOR R9D,R9D PUSH RAX PUSH RAX CALL 0x00133231 ADD RSP,0x10 POP RBP LAB_0014cf43: RET
void translog_free_link(long param_1) { if (param_1 != 0) { pagecache_unlock_by_link(log_descriptor,param_1,5,3,0,0,0,0); } return; }
16,681
my_wc_mb_big5
eloqsql/strings/ctype-big5.c
static int my_wc_mb_big5(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { int code; if (s >= e) return MY_CS_TOOSMALL; if ((int) wc < 0x80) { s[0]= (uchar) wc; return 1; } if (!(code=func_uni_big5_onechar(wc))) return MY_CS_ILUNI; if (s+2>e) return MY_CS_TOOSMALL; s[0]=code>>8; s[1]=code&0xFF; return 2; }
O0
c
my_wc_mb_big5: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0x3c14b movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x3c1c4 movq -0x18(%rbp), %rax cmpl $0x80, %eax jge 0x3c16b movq -0x18(%rbp), %rax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x1, -0x4(%rbp) jmp 0x3c1c4 movq -0x18(%rbp), %rax movl %eax, %edi callq 0x3c4c0 movl %eax, -0x2c(%rbp) cmpl $0x0, %eax jne 0x3c187 movl $0x0, -0x4(%rbp) jmp 0x3c1c4 movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x3c19e movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x3c1c4 movl -0x2c(%rbp), %eax sarl $0x8, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl -0x2c(%rbp), %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, 0x1(%rax) movl $0x2, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopl (%rax)
my_wc_mb_big5: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_3C14B mov [rbp+var_4], 0FFFFFF9Bh jmp short loc_3C1C4 loc_3C14B: mov rax, [rbp+var_18] cmp eax, 80h jge short loc_3C16B mov rax, [rbp+var_18] mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 1 jmp short loc_3C1C4 loc_3C16B: mov rax, [rbp+var_18] mov edi, eax call func_uni_big5_onechar mov [rbp+var_2C], eax cmp eax, 0 jnz short loc_3C187 mov [rbp+var_4], 0 jmp short loc_3C1C4 loc_3C187: mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_3C19E mov [rbp+var_4], 0FFFFFF9Bh jmp short loc_3C1C4 loc_3C19E: mov eax, [rbp+var_2C] sar eax, 8 mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov eax, [rbp+var_2C] and eax, 0FFh mov cl, al mov rax, [rbp+var_20] mov [rax+1], cl mov [rbp+var_4], 2 loc_3C1C4: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long my_wc_mb_big5(long long a1, int a2, _BYTE *a3, unsigned long long a4) { int v5; // [rsp+4h] [rbp-2Ch] if ( (unsigned long long)a3 < a4 ) { if ( a2 >= 128 ) { v5 = func_uni_big5_onechar((unsigned int)a2); if ( v5 ) { if ( (unsigned long long)(a3 + 2) <= a4 ) { *a3 = BYTE1(v5); a3[1] = v5; return 2; } else { return (unsigned int)-101; } } else { return 0; } } else { *a3 = a2; return 1; } } else { return (unsigned int)-101; } }
my_wc_mb_big5: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x0013c14b MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x0013c1c4 LAB_0013c14b: MOV RAX,qword ptr [RBP + -0x18] CMP EAX,0x80 JGE 0x0013c16b MOV RAX,qword ptr [RBP + -0x18] MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x1 JMP 0x0013c1c4 LAB_0013c16b: MOV RAX,qword ptr [RBP + -0x18] MOV EDI,EAX CALL 0x0013c4c0 MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JNZ 0x0013c187 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0013c1c4 LAB_0013c187: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x0013c19e MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x0013c1c4 LAB_0013c19e: MOV EAX,dword ptr [RBP + -0x2c] SAR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0x2c] AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x1],CL MOV dword ptr [RBP + -0x4],0x2 LAB_0013c1c4: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 my_wc_mb_big5(int8 param_1,int param_2,int1 *param_3,int1 *param_4) { int iVar1; int4 local_c; if (param_3 < param_4) { if (param_2 < 0x80) { *param_3 = (char)param_2; local_c = 1; } else { iVar1 = func_uni_big5_onechar(param_2); if (iVar1 == 0) { local_c = 0; } else if (param_4 < param_3 + 2) { local_c = 0xffffff9b; } else { *param_3 = (char)((uint)iVar1 >> 8); param_3[1] = (char)iVar1; local_c = 2; } } } else { local_c = 0xffffff9b; } return local_c; }
16,682
my_wc_mb_big5
eloqsql/strings/ctype-big5.c
static int my_wc_mb_big5(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { int code; if (s >= e) return MY_CS_TOOSMALL; if ((int) wc < 0x80) { s[0]= (uchar) wc; return 1; } if (!(code=func_uni_big5_onechar(wc))) return MY_CS_ILUNI; if (s+2>e) return MY_CS_TOOSMALL; s[0]=code>>8; s[1]=code&0xFF; return 2; }
O3
c
my_wc_mb_big5: pushq %rbp movq %rsp, %rbp movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x32a75 cmpl $0x7f, %esi jg 0x32938 movb %sil, (%rdx) movl $0x1, %eax jmp 0x32a75 leal -0xa2(%rsi), %edi cmpl $0x55, %edi ja 0x3294e movl %edi, %esi leaq 0x3f8e4(%rip), %rdi # 0x72230 jmp 0x329b0 leal -0x2c7(%rsi), %edi cmpl $0x18a, %edi # imm = 0x18A ja 0x32967 movl %edi, %esi leaq 0x3f97b(%rip), %rdi # 0x722e0 jmp 0x329b0 leal -0x2013(%rsi), %edi cmpl $0x2ac, %edi # imm = 0x2AC ja 0x32980 movl %edi, %esi leaq 0x3fc82(%rip), %rdi # 0x72600 jmp 0x329b0 leal -0x2460(%rsi), %edi cmpl $0x1e2, %edi # imm = 0x1E2 ja 0x32999 movl %edi, %esi leaq 0x401c9(%rip), %rdi # 0x72b60 jmp 0x329b0 leal -0x3000(%rsi), %edi cmpl $0x129, %edi # imm = 0x129 ja 0x329dd movl %edi, %esi leaq 0x40580(%rip), %rdi # 0x72f30 leaq (%rdi,%rsi,2), %rsi movzwl (%rsi), %edi testl %edi, %edi je 0x32a73 leaq 0x2(%rdx), %rsi cmpq %rcx, %rsi ja 0x32a75 rolw $0x8, %di movw %di, (%rdx) movl $0x2, %eax jmp 0x32a75 movl $0xa1c0, %edi # imm = 0xA1C0 cmpl $0x32a3, %esi # imm = 0x32A3 je 0x329bf leal -0x338e(%rsi), %edi cmpl $0x47, %edi ja 0x32a00 movl %edi, %esi leaq 0x40792(%rip), %rdi # 0x73190 jmp 0x329b0 leal -0x4e00(%rsi), %edi cmpl $0x4683, %edi # imm = 0x4683 ja 0x32a19 movl %edi, %esi leaq 0x40809(%rip), %rdi # 0x73220 jmp 0x329b0 leal -0x9577(%rsi), %edi cmpl $0xa2d, %edi # imm = 0xA2D ja 0x32a35 movl %edi, %esi leaq 0x49500(%rip), %rdi # 0x7bf30 jmp 0x329b0 movl %esi, %edi andl $0x7ffffffe, %edi # imm = 0x7FFFFFFE cmpl $0xfa0c, %edi # imm = 0xFA0C jne 0x32a57 addl $0xffff05f4, %esi # imm = 0xFFFF05F4 leaq 0x4acda(%rip), %rdi # 0x7d72c jmp 0x329b0 addl $0xffff01d0, %esi # imm = 0xFFFF01D0 cmpl $0x1cd, %esi # imm = 0x1CD ja 0x32a73 movl %esi, %esi leaq 0x4a922(%rip), %rdi # 0x7d390 jmp 0x329b0 xorl %eax, %eax popq %rbp retq
my_wc_mb_big5: push rbp mov rbp, rsp mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb loc_32A75 cmp esi, 7Fh jg short loc_32938 mov [rdx], sil mov eax, 1 jmp loc_32A75 loc_32938: lea edi, [rsi-0A2h] cmp edi, 55h ; 'U' ja short loc_3294E mov esi, edi lea rdi, tab_uni_big50 jmp short loc_329B0 loc_3294E: lea edi, [rsi-2C7h] cmp edi, 18Ah ja short loc_32967 mov esi, edi lea rdi, tab_uni_big51 jmp short loc_329B0 loc_32967: lea edi, [rsi-2013h] cmp edi, 2ACh ja short loc_32980 mov esi, edi lea rdi, tab_uni_big52 jmp short loc_329B0 loc_32980: lea edi, [rsi-2460h] cmp edi, 1E2h ja short loc_32999 mov esi, edi lea rdi, tab_uni_big53 jmp short loc_329B0 loc_32999: lea edi, [rsi-3000h] cmp edi, 129h ja short loc_329DD mov esi, edi lea rdi, tab_uni_big54 loc_329B0: lea rsi, [rdi+rsi*2] movzx edi, word ptr [rsi] test edi, edi jz loc_32A73 loc_329BF: lea rsi, [rdx+2] cmp rsi, rcx ja loc_32A75 rol di, 8 mov [rdx], di mov eax, 2 jmp loc_32A75 loc_329DD: mov edi, 0A1C0h cmp esi, 32A3h jz short loc_329BF lea edi, [rsi-338Eh] cmp edi, 47h ; 'G' ja short loc_32A00 mov esi, edi lea rdi, tab_uni_big56 jmp short loc_329B0 loc_32A00: lea edi, [rsi-4E00h] cmp edi, 4683h ja short loc_32A19 mov esi, edi lea rdi, tab_uni_big57 jmp short loc_329B0 loc_32A19: lea edi, [rsi-9577h] cmp edi, 0A2Dh ja short loc_32A35 mov esi, edi lea rdi, tab_uni_big58 jmp loc_329B0 loc_32A35: mov edi, esi and edi, 7FFFFFFEh cmp edi, 0FA0Ch jnz short loc_32A57 add esi, 0FFFF05F4h lea rdi, tab_uni_big59 jmp loc_329B0 loc_32A57: add esi, 0FFFF01D0h cmp esi, 1CDh ja short loc_32A73 mov esi, esi lea rdi, tab_uni_big510 jmp loc_329B0 loc_32A73: xor eax, eax loc_32A75: pop rbp retn
long long my_wc_mb_big5(long long a1, int a2, _BYTE *a3, unsigned long long a4) { long long result; // rax long long v5; // rsi _WORD *v6; // rdi __int16 v7; // di result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { if ( a2 <= 127 ) { *a3 = a2; return 1LL; } if ( (unsigned int)(a2 - 162) > 0x55 ) { if ( (unsigned int)(a2 - 711) > 0x18A ) { if ( (unsigned int)(a2 - 8211) > 0x2AC ) { if ( (unsigned int)(a2 - 9312) > 0x1E2 ) { if ( (unsigned int)(a2 - 12288) > 0x129 ) { v7 = -24128; if ( a2 == 12963 ) { LABEL_15: if ( (unsigned long long)(a3 + 2) <= a4 ) { *(_WORD *)a3 = __ROL2__(v7, 8); return 2LL; } return result; } if ( (unsigned int)(a2 - 13198) > 0x47 ) { if ( (unsigned int)(a2 - 19968) > 0x4683 ) { if ( (unsigned int)(a2 - 38263) > 0xA2D ) { if ( (a2 & 0x7FFFFFFE) == 0xFA0C ) { v5 = (unsigned int)(a2 - 64012); v6 = &tab_uni_big59; } else { LODWORD(v5) = a2 - 65072; if ( (unsigned int)v5 > 0x1CD ) return 0LL; v5 = (unsigned int)v5; v6 = &tab_uni_big510; } } else { v5 = (unsigned int)(a2 - 38263); v6 = &tab_uni_big58; } } else { v5 = (unsigned int)(a2 - 19968); v6 = &tab_uni_big57; } } else { v5 = (unsigned int)(a2 - 13198); v6 = &tab_uni_big56; } } else { v5 = (unsigned int)(a2 - 12288); v6 = &tab_uni_big54; } } else { v5 = (unsigned int)(a2 - 9312); v6 = &tab_uni_big53; } } else { v5 = (unsigned int)(a2 - 8211); v6 = &tab_uni_big52; } } else { v5 = (unsigned int)(a2 - 711); v6 = &tab_uni_big51; } } else { v5 = (unsigned int)(a2 - 162); v6 = &tab_uni_big50; } v7 = v6[v5]; if ( v7 ) goto LABEL_15; return 0LL; } return result; }
my_wc_mb_big5: PUSH RBP MOV RBP,RSP MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x00132a75 CMP ESI,0x7f JG 0x00132938 MOV byte ptr [RDX],SIL MOV EAX,0x1 JMP 0x00132a75 LAB_00132938: LEA EDI,[RSI + -0xa2] CMP EDI,0x55 JA 0x0013294e MOV ESI,EDI LEA RDI,[0x172230] JMP 0x001329b0 LAB_0013294e: LEA EDI,[RSI + -0x2c7] CMP EDI,0x18a JA 0x00132967 MOV ESI,EDI LEA RDI,[0x1722e0] JMP 0x001329b0 LAB_00132967: LEA EDI,[RSI + -0x2013] CMP EDI,0x2ac JA 0x00132980 MOV ESI,EDI LEA RDI,[0x172600] JMP 0x001329b0 LAB_00132980: LEA EDI,[RSI + -0x2460] CMP EDI,0x1e2 JA 0x00132999 MOV ESI,EDI LEA RDI,[0x172b60] JMP 0x001329b0 LAB_00132999: LEA EDI,[RSI + -0x3000] CMP EDI,0x129 JA 0x001329dd MOV ESI,EDI LEA RDI,[0x172f30] LAB_001329b0: LEA RSI,[RDI + RSI*0x2] MOVZX EDI,word ptr [RSI] TEST EDI,EDI JZ 0x00132a73 LAB_001329bf: LEA RSI,[RDX + 0x2] CMP RSI,RCX JA 0x00132a75 ROL DI,0x8 MOV word ptr [RDX],DI MOV EAX,0x2 JMP 0x00132a75 LAB_001329dd: MOV EDI,0xa1c0 CMP ESI,0x32a3 JZ 0x001329bf LEA EDI,[RSI + -0x338e] CMP EDI,0x47 JA 0x00132a00 MOV ESI,EDI LEA RDI,[0x173190] JMP 0x001329b0 LAB_00132a00: LEA EDI,[RSI + -0x4e00] CMP EDI,0x4683 JA 0x00132a19 MOV ESI,EDI LEA RDI,[0x173220] JMP 0x001329b0 LAB_00132a19: LEA EDI,[RSI + -0x9577] CMP EDI,0xa2d JA 0x00132a35 MOV ESI,EDI LEA RDI,[0x17bf30] JMP 0x001329b0 LAB_00132a35: MOV EDI,ESI AND EDI,0x7ffffffe CMP EDI,0xfa0c JNZ 0x00132a57 ADD ESI,0xffff05f4 LEA RDI,[0x17d72c] JMP 0x001329b0 LAB_00132a57: ADD ESI,0xffff01d0 CMP ESI,0x1cd JA 0x00132a73 MOV ESI,ESI LEA RDI,[0x17d390] JMP 0x001329b0 LAB_00132a73: XOR EAX,EAX LAB_00132a75: POP RBP RET
int8 my_wc_mb_big5(int8 param_1,uint param_2,ushort *param_3,ushort *param_4) { int8 uVar1; ulong uVar2; ushort uVar3; int1 *puVar4; uVar1 = 0xffffff9b; if (param_4 <= param_3) { return 0xffffff9b; } if ((int)param_2 < 0x80) { *(char *)param_3 = (char)param_2; return 1; } if (param_2 - 0xa2 < 0x56) { uVar2 = (ulong)(param_2 - 0xa2); puVar4 = tab_uni_big50; } else if (param_2 - 0x2c7 < 0x18b) { uVar2 = (ulong)(param_2 - 0x2c7); puVar4 = tab_uni_big51; } else if (param_2 - 0x2013 < 0x2ad) { uVar2 = (ulong)(param_2 - 0x2013); puVar4 = tab_uni_big52; } else if (param_2 - 0x2460 < 0x1e3) { uVar2 = (ulong)(param_2 - 0x2460); puVar4 = tab_uni_big53; } else if (param_2 - 0x3000 < 0x12a) { uVar2 = (ulong)(param_2 - 0x3000); puVar4 = tab_uni_big54; } else { uVar3 = 0xa1c0; if (param_2 == 0x32a3) goto LAB_001329bf; if (param_2 - 0x338e < 0x48) { uVar2 = (ulong)(param_2 - 0x338e); puVar4 = tab_uni_big56; } else if (param_2 - 0x4e00 < 0x4684) { uVar2 = (ulong)(param_2 - 0x4e00); puVar4 = tab_uni_big57; } else if (param_2 - 0x9577 < 0xa2e) { uVar2 = (ulong)(param_2 - 0x9577); puVar4 = tab_uni_big58; } else if ((param_2 & 0x7ffffffe) == 0xfa0c) { uVar2 = (ulong)(param_2 - 0xfa0c); puVar4 = (int1 *)&tab_uni_big59; } else { if (0x1cd < param_2 - 0xfe30) { return 0; } uVar2 = (ulong)(param_2 - 0xfe30); puVar4 = tab_uni_big510; } } uVar3 = *(ushort *)((long)puVar4 + uVar2 * 2); if (uVar3 == 0) { return 0; } LAB_001329bf: if (param_3 + 1 <= param_4) { *param_3 = uVar3 << 8 | uVar3 >> 8; uVar1 = 2; } return uVar1; }
16,683
my_is_symlink
eloqsql/mysys/my_symlink.c
int my_is_symlink(const char *filename __attribute__((unused))) { #if defined (HAVE_LSTAT) && defined (S_ISLNK) struct stat stat_buff; if (lstat(filename, &stat_buff)) return 0; MSAN_STAT_WORKAROUND(&stat_buff); return !!S_ISLNK(stat_buff.st_mode); #elif defined (_WIN32) DWORD dwAttr = GetFileAttributes(filename); return (dwAttr != INVALID_FILE_ATTRIBUTES) && (dwAttr & FILE_ATTRIBUTE_REPARSE_POINT); #else /* No symlinks */ return 0; #endif }
O3
c
my_is_symlink: pushq %rbp movq %rsp, %rbp pushq %rbx subq $0x98, %rsp leaq -0x98(%rbp), %rbx movq %rbx, %rsi callq 0x36630 movl 0x18(%rbx), %edx andl $0xf000, %edx # imm = 0xF000 xorl $0xa000, %edx # imm = 0xA000 xorl %ecx, %ecx orl %eax, %edx sete %cl movl %ecx, %eax addq $0x98, %rsp popq %rbx popq %rbp retq
my_is_symlink: push rbp mov rbp, rsp push rbx sub rsp, 98h lea rbx, [rbp+var_98] mov rsi, rbx call _lstat64 mov edx, [rbx+18h] and edx, 0F000h xor edx, 0A000h xor ecx, ecx or edx, eax setz cl mov eax, ecx add rsp, 98h pop rbx pop rbp retn
_BOOL8 my_is_symlink(long long a1) { int v1; // eax _BYTE v3[24]; // [rsp+8h] [rbp-98h] BYREF __int16 v4; // [rsp+20h] [rbp-80h] v1 = lstat64(a1, v3); return (v1 | v4 & 0xF000 ^ 0xA000) == 0; }
my_is_symlink: PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x98 LEA RBX,[RBP + -0x98] MOV RSI,RBX CALL 0x00136630 MOV EDX,dword ptr [RBX + 0x18] AND EDX,0xf000 XOR EDX,0xa000 XOR ECX,ECX OR EDX,EAX SETZ CL MOV EAX,ECX ADD RSP,0x98 POP RBX POP RBP RET
bool my_is_symlink(char *param_1) { int iVar1; stat64 local_a0; iVar1 = lstat64(param_1,&local_a0); return (local_a0.st_mode & 0xf000) == 0xa000 && iVar1 == 0; }
16,684
my_charset_get_by_name
eloqsql/mysys/charset.c
CHARSET_INFO * my_charset_get_by_name(MY_CHARSET_LOADER *loader, const char *cs_name, uint cs_flags, myf flags) { uint cs_number; CHARSET_INFO *cs; DBUG_ENTER("get_charset_by_csname"); DBUG_PRINT("enter",("name: '%s'", cs_name)); my_pthread_once(&charsets_initialized, init_available_charsets); cs_number= get_charset_number(cs_name, cs_flags, flags); cs= cs_number ? get_internal_charset(loader, cs_number, flags) : NULL; if (!cs && (flags & MY_WME)) { char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)]; strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX); my_error(EE_UNKNOWN_CHARSET, MYF(ME_BELL), cs_name, index_file); } DBUG_RETURN(cs); }
O3
c
my_charset_get_by_name: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x220, %rsp # imm = 0x220 movq %rcx, %r15 movl %edx, %r12d movq %rsi, %rbx movq %rdi, %r14 movq %fs:0x28, %rax movq %rax, -0x28(%rbp) leaq 0x391576(%rip), %rdi # 0x3dbcf0 leaq -0x9ae(%rip), %rsi # 0x49dd3 callq 0x26300 movq %rbx, %rdi movl %r12d, %esi movq %r15, %rdx callq 0x49fbe testl %eax, %eax je 0x4a7aa movq %r14, %rdi movl %eax, %esi movq %r15, %rdx callq 0x4a262 movq %rax, %r14 jmp 0x4a7ad xorl %r14d, %r14d testq %r14, %r14 setne %al testb $0x10, %r15b sete %cl orb %al, %cl jne 0x4a7f7 leaq -0x240(%rbp), %r15 movq %r15, %rdi callq 0x49b93 movabsq $0x6d782e7865646e49, %rcx # imm = 0x6D782E7865646E49 movq %rcx, (%rax) movw $0x6c, 0x8(%rax) movl $0x4, %esi movl $0x16, %edi movq %rbx, %rdx movq %r15, %rcx xorl %eax, %eax callq 0x4c83b movq %fs:0x28, %rax cmpq -0x28(%rbp), %rax jne 0x4a819 movq %r14, %rax addq $0x220, %rsp # imm = 0x220 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq callq 0x263b0
my_charset_get_by_name: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 220h mov r15, rcx mov r12d, edx mov rbx, rsi mov r14, rdi mov rax, fs:28h mov [rbp+var_28], rax lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once mov rdi, rbx mov esi, r12d mov rdx, r15 call get_charset_number test eax, eax jz short loc_4A7AA mov rdi, r14 mov esi, eax mov rdx, r15 call get_internal_charset mov r14, rax jmp short loc_4A7AD loc_4A7AA: xor r14d, r14d loc_4A7AD: test r14, r14 setnz al test r15b, 10h setz cl or cl, al jnz short loc_4A7F7 lea r15, [rbp+var_240] mov rdi, r15 call get_charsets_dir mov rcx, 6D782E7865646E49h mov [rax], rcx mov word ptr [rax+8], 6Ch ; 'l' mov esi, 4 mov edi, 16h mov rdx, rbx mov rcx, r15 xor eax, eax call my_error loc_4A7F7: mov rax, fs:28h cmp rax, [rbp+var_28] jnz short loc_4A819 mov rax, r14 add rsp, 220h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_4A819: call ___stack_chk_fail
long long my_charset_get_by_name(long long a1, long long a2, unsigned int a3, long long a4) { unsigned int charset_number; // eax long long internal_charset; // r14 int v8; // r8d int v9; // r9d _WORD v11[268]; // [rsp+0h] [rbp-240h] BYREF unsigned long long v12; // [rsp+218h] [rbp-28h] v12 = __readfsqword(0x28u); pthread_once(&charsets_initialized, init_available_charsets); charset_number = get_charset_number(a2, a3, a4); if ( charset_number ) internal_charset = get_internal_charset(a1, charset_number, a4); else internal_charset = 0LL; if ( internal_charset == 0 && (a4 & 0x10) != 0 ) { strcpy((char *)get_charsets_dir(v11), "Index.xml"); my_error(22, 4, a2, (unsigned int)v11, v8, v9); } return internal_charset; }
my_charset_get_by_name: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x220 MOV R15,RCX MOV R12D,EDX MOV RBX,RSI MOV R14,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX LEA RDI,[0x4dbcf0] LEA RSI,[0x149dd3] CALL 0x00126300 MOV RDI,RBX MOV ESI,R12D MOV RDX,R15 CALL 0x00149fbe TEST EAX,EAX JZ 0x0014a7aa MOV RDI,R14 MOV ESI,EAX MOV RDX,R15 CALL 0x0014a262 MOV R14,RAX JMP 0x0014a7ad LAB_0014a7aa: XOR R14D,R14D LAB_0014a7ad: TEST R14,R14 SETNZ AL TEST R15B,0x10 SETZ CL OR CL,AL JNZ 0x0014a7f7 LEA R15,[RBP + -0x240] MOV RDI,R15 CALL 0x00149b93 MOV RCX,0x6d782e7865646e49 MOV qword ptr [RAX],RCX MOV word ptr [RAX + 0x8],0x6c MOV ESI,0x4 MOV EDI,0x16 MOV RDX,RBX MOV RCX,R15 XOR EAX,EAX CALL 0x0014c83b LAB_0014a7f7: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x28] JNZ 0x0014a819 MOV RAX,R14 ADD RSP,0x220 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0014a819: CALL 0x001263b0
long my_charset_get_by_name(int8 param_1,int8 param_2,int4 param_3,ulong param_4) { int iVar1; long lVar2; int8 *puVar3; long in_FS_OFFSET; int1 local_248 [536]; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); pthread_once(&charsets_initialized,init_available_charsets); iVar1 = get_charset_number(param_2,param_3,param_4); if (iVar1 == 0) { lVar2 = 0; } else { lVar2 = get_internal_charset(param_1,iVar1,param_4); } if ((param_4 & 0x10) != 0 && lVar2 == 0) { puVar3 = (int8 *)get_charsets_dir(local_248); *puVar3 = 0x6d782e7865646e49; *(int2 *)(puVar3 + 1) = 0x6c; my_error(0x16,4,param_2,local_248); } if (*(long *)(in_FS_OFFSET + 0x28) == local_30) { return lVar2; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
16,685
translog_wait_for_buffer_free
eloqsql/storage/maria/ma_loghandler.c
static void translog_wait_for_buffer_free(struct st_translog_buffer *buffer) { TRANSLOG_ADDRESS offset= buffer->offset; TRANSLOG_FILE *file= buffer->file; uint8 ver= buffer->ver; DBUG_ENTER("translog_wait_for_buffer_free"); DBUG_PRINT("enter", ("Buffer #%u %p copies in progress: %u " "is closing %u File: %d size: %lu", (uint) buffer->buffer_no, buffer, (uint) buffer->copy_to_buffer_in_progress, (uint) buffer->is_closing_buffer, (buffer->file ? buffer->file->handler.file : -1), (ulong) buffer->size)); translog_wait_for_writers(buffer); if (offset != buffer->offset || file != buffer->file || ver != buffer->ver) DBUG_VOID_RETURN; /* the buffer if already freed */ while (buffer->file != NULL) { DBUG_PRINT("info", ("wait for writers... buffer: #%u %p", (uint) buffer->buffer_no, buffer)); mysql_cond_wait(&buffer->waiting_filling_buffer, &buffer->mutex); DBUG_PRINT("info", ("wait for writers done. buffer: #%u %p", (uint) buffer->buffer_no, buffer)); } DBUG_ASSERT(buffer->copy_to_buffer_in_progress == 0); DBUG_VOID_RETURN; }
O3
c
translog_wait_for_buffer_free: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdi, %rbx movq 0x100010(%rdi), %r12 movq 0x100038(%rdi), %r14 movb 0x1000d9(%rdi), %r15b callq 0x4ff14 cmpq 0x100010(%rbx), %r12 jne 0x50e6b cmpq 0x100038(%rbx), %r14 jne 0x50e6b cmpb 0x1000d9(%rbx), %r15b setne %al testq %r14, %r14 sete %cl orb %al, %cl je 0x50e74 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq 0x100040(%rbx), %r14 leaq 0x100090(%rbx), %r15 leaq 0x8a2af(%rip), %r12 # 0xdb138 cmpq $0x0, 0x100070(%rbx) jne 0x50eaa movq %r14, %rdi movq %r15, %rsi callq 0x29430 cmpq $0x0, 0x100038(%rbx) jne 0x50e89 jmp 0x50e6b movq %r14, %rdi movq %r15, %rsi movq %r12, %rdx movl $0x832, %ecx # imm = 0x832 callq 0x2eea0 jmp 0x50e9e
translog_wait_for_buffer_free: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rdi mov r12, ds:qword_100010[rdi] mov r14, ds:qword_100038[rdi] mov r15b, ds:byte_1000D9[rdi] call translog_wait_for_writers cmp r12, ds:qword_100010[rbx] jnz short loc_50E6B cmp r14, ds:qword_100038[rbx] jnz short loc_50E6B cmp r15b, ds:byte_1000D9[rbx] setnz al test r14, r14 setz cl or cl, al jz short loc_50E74 loc_50E6B: pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_50E74: lea r14, unk_100040[rbx] lea r15, unk_100090[rbx] lea r12, aWorkspaceLlm4b_7; "/workspace/llm4binary/github2025/eloqsq"... loc_50E89: cmp ds:qword_100070[rbx], 0 jnz short loc_50EAA mov rdi, r14 mov rsi, r15 call _pthread_cond_wait loc_50E9E: cmp ds:qword_100038[rbx], 0 jnz short loc_50E89 jmp short loc_50E6B loc_50EAA: mov rdi, r14 mov rsi, r15 mov rdx, r12 mov ecx, 832h call psi_cond_wait jmp short loc_50E9E
unsigned __int8 translog_wait_for_buffer_free(long long a1) { long long v1; // r12 long long v2; // r14 char v3; // r15 unsigned __int8 result; // al v1 = *(long long *)((char *)&qword_100010 + a1); v2 = *(long long *)((char *)&qword_100038 + a1); v3 = byte_1000D9[a1]; result = translog_wait_for_writers(a1); if ( v1 == *(long long *)((char *)&qword_100010 + a1) && v2 == *(long long *)((char *)&qword_100038 + a1) ) { result = v3 != byte_1000D9[a1]; if ( !(result | (v2 == 0)) ) { do { if ( *(long long *)((char *)&qword_100070 + a1) ) result = psi_cond_wait( (long long)&unk_100040 + a1, (long long)&unk_100090 + a1, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0x832u); else result = pthread_cond_wait((char *)&unk_100040 + a1, (char *)&unk_100090 + a1); } while ( *(long long *)((char *)&qword_100038 + a1) ); } } return result; }
translog_wait_for_buffer_free: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RDI MOV R12,qword ptr [RDI + 0x100010] MOV R14,qword ptr [RDI + 0x100038] MOV R15B,byte ptr [RDI + 0x1000d9] CALL 0x0014ff14 CMP R12,qword ptr [RBX + 0x100010] JNZ 0x00150e6b CMP R14,qword ptr [RBX + 0x100038] JNZ 0x00150e6b CMP R15B,byte ptr [RBX + 0x1000d9] SETNZ AL TEST R14,R14 SETZ CL OR CL,AL JZ 0x00150e74 LAB_00150e6b: POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00150e74: LEA R14,[RBX + 0x100040] LEA R15,[RBX + 0x100090] LEA R12,[0x1db138] LAB_00150e89: CMP qword ptr [RBX + 0x100070],0x0 JNZ 0x00150eaa MOV RDI,R14 MOV RSI,R15 CALL 0x00129430 LAB_00150e9e: CMP qword ptr [RBX + 0x100038],0x0 JNZ 0x00150e89 JMP 0x00150e6b LAB_00150eaa: MOV RDI,R14 MOV RSI,R15 MOV RDX,R12 MOV ECX,0x832 CALL 0x0012eea0 JMP 0x00150e9e
void translog_wait_for_buffer_free(long param_1) { pthread_cond_t *__cond; pthread_mutex_t *__mutex; char cVar1; long lVar2; long lVar3; lVar2 = *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7); lVar3 = *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f); cVar1 = *(char *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_memsz + param_1 + 1); translog_wait_for_writers(); if (((lVar2 == *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7)) && (lVar3 == *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f))) && (lVar3 != 0 && cVar1 == *(char *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_memsz + param_1 + 1))) { __cond = (pthread_cond_t *)((long)&Elf64_Phdr_ARRAY_00100040[0].p_type + param_1); __mutex = (pthread_mutex_t *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_paddr + param_1); do { if (*(long *)((long)&Elf64_Phdr_ARRAY_00100040[0].p_align + param_1) == 0) { pthread_cond_wait(__cond,__mutex); } else { psi_cond_wait(__cond,__mutex, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",0x832 ); } } while (*(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f) != 0); } return; }
16,686
testing::Test* testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::TestFactoryBase, testing::Test*>(testing::internal::TestFactoryBase*, testing::Test* (testing::internal::TestFactoryBase::*)(), char const*)
giladroyz[P]FindPeaks/build_O0/_deps/googletest-src/googletest/src/gtest.cc
Result HandleSehExceptionsInMethodIfSupported(T* object, Result (T::*method)(), const char* location) { #if GTEST_HAS_SEH __try { return (object->*method)(); } __except (internal::UnitTestOptions::GTestProcessSEH( // NOLINT GetExceptionCode(), location)) { return static_cast<Result>(0); } #else (void)location; return (object->*method)(); #endif // GTEST_HAS_SEH }
O0
cpp
testing::Test* testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::TestFactoryBase, testing::Test*>(testing::internal::TestFactoryBase*, testing::Test* (testing::internal::TestFactoryBase::*)(), char const*): pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rsi, -0x10(%rbp) movq %rdx, -0x8(%rbp) movq -0x10(%rbp), %rax movq -0x8(%rbp), %rdx movq %rdi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rax, -0x28(%rbp) movq %rcx, -0x30(%rbp) movq -0x18(%rbp), %rcx movq -0x28(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x20(%rbp), %rdx addq %rdx, %rcx movq %rcx, -0x38(%rbp) andq $0x1, %rax cmpq $0x0, %rax je 0x645e2 movq -0x40(%rbp), %rcx movq -0x38(%rbp), %rax movq (%rax), %rax subq $0x1, %rcx movq (%rax,%rcx), %rax movq %rax, -0x48(%rbp) jmp 0x645ea movq -0x40(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x38(%rbp), %rdi movq -0x48(%rbp), %rax callq *%rax addq $0x50, %rsp popq %rbp retq nopw (%rax,%rax)
_ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS0_15TestFactoryBaseEPNS_4TestEEET0_PT_MS6_FS5_vEPKc: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rsi mov [rbp+var_8], rdx mov rax, [rbp+var_10] mov rdx, [rbp+var_8] mov [rbp+var_18], rdi mov [rbp+var_20], rdx mov [rbp+var_28], rax mov [rbp+var_30], rcx mov rcx, [rbp+var_18] mov rax, [rbp+var_28] mov [rbp+var_40], rax mov rdx, [rbp+var_20] add rcx, rdx mov [rbp+var_38], rcx and rax, 1 cmp rax, 0 jz short loc_645E2 mov rcx, [rbp+var_40] mov rax, [rbp+var_38] mov rax, [rax] sub rcx, 1 mov rax, [rax+rcx] mov [rbp+var_48], rax jmp short loc_645EA loc_645E2: mov rax, [rbp+var_40] mov [rbp+var_48], rax loc_645EA: mov rdi, [rbp+var_38] mov rax, [rbp+var_48] call rax add rsp, 50h pop rbp retn
long long testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::TestFactoryBase,testing::Test *>( long long a1, long long ( *a2)(_QWORD), long long a3) { _QWORD *v4; // [rsp+18h] [rbp-38h] v4 = (_QWORD *)(a3 + a1); if ( ((unsigned __int8)a2 & 1) != 0 ) return (*(long long ( **)(_QWORD *))((char *)a2 + *v4 - 1))(v4); else return a2(v4); }
HandleSehExceptionsInMethodIfSupported<testing::internal::TestFactoryBase,testing::Test*>: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x8],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RAX MOV qword ptr [RBP + -0x30],RCX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x40],RAX MOV RDX,qword ptr [RBP + -0x20] ADD RCX,RDX MOV qword ptr [RBP + -0x38],RCX AND RAX,0x1 CMP RAX,0x0 JZ 0x001645e2 MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX] SUB RCX,0x1 MOV RAX,qword ptr [RAX + RCX*0x1] MOV qword ptr [RBP + -0x48],RAX JMP 0x001645ea LAB_001645e2: MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x48],RAX LAB_001645ea: MOV RDI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x48] CALL RAX ADD RSP,0x50 POP RBP RET
/* testing::Test* testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::TestFactoryBase, testing::Test*>(testing::internal::TestFactoryBase*, testing::Test* (testing::internal::TestFactoryBase::*)(), char const*) */ Test * testing::internal:: HandleSehExceptionsInMethodIfSupported<testing::internal::TestFactoryBase,testing::Test*> (TestFactoryBase *param_1,_func_Test_ptr *param_2,char *param_3) { Test *pTVar1; _func_Test_ptr *local_50; local_50 = param_2; if (((ulong)param_2 & 1) != 0) { local_50 = *(_func_Test_ptr **)(param_2 + *(long *)(param_1 + (long)param_3) + -1); } pTVar1 = (*local_50)(param_1 + (long)param_3); return pTVar1; }
16,687
minja::ElifTemplateToken::~ElifTemplateToken()
monkey531[P]llama/common/minja.hpp
ElifTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && c) : TemplateToken(Type::Elif, location, pre, post), condition(std::move(c)) {}
O3
cpp
minja::ElifTemplateToken::~ElifTemplateToken(): pushq %rbx movq %rdi, %rbx leaq 0x94d41(%rip), %rax # 0x12cb58 addq $0x10, %rax movq %rax, (%rdi) movq 0x38(%rdi), %rdi testq %rdi, %rdi je 0x97e2c callq 0x6d556 leaq 0x944a5(%rip), %rax # 0x12c2d8 addq $0x10, %rax movq %rax, (%rbx) movq 0x18(%rbx), %rdi testq %rdi, %rdi je 0x97e48 callq 0x6d556 movl $0x40, %esi movq %rbx, %rdi popq %rbx jmp 0x1b8b0
_ZN5minja17ElifTemplateTokenD0Ev: push rbx mov rbx, rdi lea rax, _ZTVN5minja17ElifTemplateTokenE; `vtable for'minja::ElifTemplateToken add rax, 10h mov [rdi], rax mov rdi, [rdi+38h] test rdi, rdi jz short loc_97E2C call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_97E2C: lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken add rax, 10h mov [rbx], rax mov rdi, [rbx+18h] test rdi, rdi jz short loc_97E48 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_97E48: mov esi, 40h ; '@'; unsigned __int64 mov rdi, rbx; void * pop rbx jmp __ZdlPvm; operator delete(void *,ulong)
void minja::ElifTemplateToken::~ElifTemplateToken(minja::ElifTemplateToken *this) { volatile signed __int32 *v2; // rdi volatile signed __int32 *v3; // rdi *(_QWORD *)this = &`vtable for'minja::ElifTemplateToken + 2; v2 = (volatile signed __int32 *)*((_QWORD *)this + 7); if ( v2 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2); *(_QWORD *)this = &`vtable for'minja::TemplateToken + 2; v3 = (volatile signed __int32 *)*((_QWORD *)this + 3); if ( v3 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3); operator delete(this, 0x40uLL); }
~ElifTemplateToken: PUSH RBX MOV RBX,RDI LEA RAX,[0x22cb58] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RDI + 0x38] TEST RDI,RDI JZ 0x00197e2c CALL 0x0016d556 LAB_00197e2c: LEA RAX,[0x22c2d8] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RBX + 0x18] TEST RDI,RDI JZ 0x00197e48 CALL 0x0016d556 LAB_00197e48: MOV ESI,0x40 MOV RDI,RBX POP RBX JMP 0x0011b8b0
/* minja::ElifTemplateToken::~ElifTemplateToken() */ void __thiscall minja::ElifTemplateToken::~ElifTemplateToken(ElifTemplateToken *this) { *(int ***)this = &PTR__ElifTemplateToken_0022cb68; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38)); } *(int ***)this = &PTR__TemplateToken_0022c2e8; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18)); } operator_delete(this,0x40); return; }
16,688
fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender, char>>::get(int) const
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/core.h
FMT_CONSTEXPR auto get(int id) const -> format_arg { format_arg arg; if (!is_packed()) { if (id < max_size()) arg = args_[id]; return arg; } if (id >= detail::max_packed_args) return arg; arg.type_ = type(id); if (arg.type_ == detail::type::none_type) return arg; arg.value_ = values_[id]; return arg; }
O0
c
fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender, char>>::get(int) const: subq $0x38, %rsp movq %rdi, 0x10(%rsp) movq %rdi, %rax movq %rax, 0x18(%rsp) movq %rsi, 0x30(%rsp) movl %edx, 0x2c(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x20(%rsp) callq 0xccdc0 movq 0x20(%rsp), %rdi callq 0xcce00 testb $0x1, %al jne 0xcb503 movq 0x20(%rsp), %rdi movl 0x2c(%rsp), %eax movl %eax, 0xc(%rsp) callq 0xcce30 movl %eax, %ecx movl 0xc(%rsp), %eax cmpl %ecx, %eax jge 0xcb501 movq 0x10(%rsp), %rax movq 0x20(%rsp), %rcx movq 0x8(%rcx), %rcx movslq 0x2c(%rsp), %rdx shlq $0x5, %rdx addq %rdx, %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rdx movq %rdx, 0x8(%rax) movl 0x10(%rcx), %ecx movl %ecx, 0x10(%rax) jmp 0xcb554 cmpl $0xf, 0x2c(%rsp) jl 0xcb50c jmp 0xcb554 movq 0x20(%rsp), %rdi movl 0x2c(%rsp), %esi callq 0xcce90 movl %eax, %ecx movq 0x10(%rsp), %rax movl %ecx, 0x10(%rax) cmpl $0x0, 0x10(%rax) jne 0xcb52c jmp 0xcb554 movq 0x10(%rsp), %rax movq 0x20(%rsp), %rcx movq 0x8(%rcx), %rcx movslq 0x2c(%rsp), %rdx shlq $0x4, %rdx addq %rdx, %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) movq 0x18(%rsp), %rax addq $0x38, %rsp retq nop
_ZNK3fmt3v1017basic_format_argsINS0_20basic_format_contextINS0_8appenderEcEEE3getEi: sub rsp, 38h mov [rsp+38h+var_28], rdi mov rax, rdi mov [rsp+38h+var_20], rax mov [rsp+38h+var_8], rsi mov [rsp+38h+var_C], edx mov rax, [rsp+38h+var_8] mov [rsp+38h+var_18], rax call _ZN3fmt3v1016basic_format_argINS0_20basic_format_contextINS0_8appenderEcEEEC2Ev; fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>>::basic_format_arg(void) mov rdi, [rsp+38h+var_18] call _ZNK3fmt3v1017basic_format_argsINS0_20basic_format_contextINS0_8appenderEcEEE9is_packedEv; fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>::is_packed(void) test al, 1 jnz short loc_CB503 mov rdi, [rsp+38h+var_18] mov eax, [rsp+38h+var_C] mov [rsp+38h+var_2C], eax call _ZNK3fmt3v1017basic_format_argsINS0_20basic_format_contextINS0_8appenderEcEEE8max_sizeEv; fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>::max_size(void) mov ecx, eax mov eax, [rsp+38h+var_2C] cmp eax, ecx jge short loc_CB501 mov rax, [rsp+38h+var_28] mov rcx, [rsp+38h+var_18] mov rcx, [rcx+8] movsxd rdx, [rsp+38h+var_C] shl rdx, 5 add rcx, rdx mov rdx, [rcx] mov [rax], rdx mov rdx, [rcx+8] mov [rax+8], rdx mov ecx, [rcx+10h] mov [rax+10h], ecx loc_CB501: jmp short loc_CB554 loc_CB503: cmp [rsp+38h+var_C], 0Fh jl short loc_CB50C jmp short loc_CB554 loc_CB50C: mov rdi, [rsp+38h+var_18] mov esi, [rsp+38h+var_C] call _ZNK3fmt3v1017basic_format_argsINS0_20basic_format_contextINS0_8appenderEcEEE4typeEi; fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>::type(int) mov ecx, eax mov rax, [rsp+38h+var_28] mov [rax+10h], ecx cmp dword ptr [rax+10h], 0 jnz short loc_CB52C jmp short loc_CB554 loc_CB52C: mov rax, [rsp+38h+var_28] mov rcx, [rsp+38h+var_18] mov rcx, [rcx+8] movsxd rdx, [rsp+38h+var_C] shl rdx, 4 add rcx, rdx mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx loc_CB554: mov rax, [rsp+38h+var_20] add rsp, 38h retn
long long fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>::get( long long a1, long long a2, int a3) { long long v3; // rcx _QWORD *v4; // rcx fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>>::basic_format_arg(); if ( (fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>::is_packed(a2) & 1) != 0 ) { if ( a3 < 15 ) { *(_DWORD *)(a1 + 16) = fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>::type( a2, (unsigned int)a3); if ( *(_DWORD *)(a1 + 16) ) { v4 = (_QWORD *)(16LL * a3 + *(_QWORD *)(a2 + 8)); *(_QWORD *)a1 = *v4; *(_QWORD *)(a1 + 8) = v4[1]; } } } else if ( a3 < (int)fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>::max_size(a2) ) { v3 = 32LL * a3 + *(_QWORD *)(a2 + 8); *(_QWORD *)a1 = *(_QWORD *)v3; *(_QWORD *)(a1 + 8) = *(_QWORD *)(v3 + 8); *(_DWORD *)(a1 + 16) = *(_DWORD *)(v3 + 16); } return a1; }
get: SUB RSP,0x38 MOV qword ptr [RSP + 0x10],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x30],RSI MOV dword ptr [RSP + 0x2c],EDX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x20],RAX CALL 0x001ccdc0 MOV RDI,qword ptr [RSP + 0x20] CALL 0x001cce00 TEST AL,0x1 JNZ 0x001cb503 MOV RDI,qword ptr [RSP + 0x20] MOV EAX,dword ptr [RSP + 0x2c] MOV dword ptr [RSP + 0xc],EAX CALL 0x001cce30 MOV ECX,EAX MOV EAX,dword ptr [RSP + 0xc] CMP EAX,ECX JGE 0x001cb501 MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RCX + 0x8] MOVSXD RDX,dword ptr [RSP + 0x2c] SHL RDX,0x5 ADD RCX,RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RDX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RDX MOV ECX,dword ptr [RCX + 0x10] MOV dword ptr [RAX + 0x10],ECX LAB_001cb501: JMP 0x001cb554 LAB_001cb503: CMP dword ptr [RSP + 0x2c],0xf JL 0x001cb50c JMP 0x001cb554 LAB_001cb50c: MOV RDI,qword ptr [RSP + 0x20] MOV ESI,dword ptr [RSP + 0x2c] CALL 0x001cce90 MOV ECX,EAX MOV RAX,qword ptr [RSP + 0x10] MOV dword ptr [RAX + 0x10],ECX CMP dword ptr [RAX + 0x10],0x0 JNZ 0x001cb52c JMP 0x001cb554 LAB_001cb52c: MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RCX + 0x8] MOVSXD RDX,dword ptr [RSP + 0x2c] SHL RDX,0x4 ADD RCX,RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX LAB_001cb554: MOV RAX,qword ptr [RSP + 0x18] ADD RSP,0x38 RET
/* fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender, char> >::get(int) const */ basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>> * fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>::get (int param_1) { int iVar1; int4 uVar2; ulong uVar3; int8 *puVar4; int in_EDX; basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>> *in_RSI; int4 in_register_0000003c; basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>> *this; this = (basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>> *) CONCAT44(in_register_0000003c,param_1); basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>>::basic_format_arg(this); uVar3 = is_packed(in_RSI); if ((uVar3 & 1) == 0) { iVar1 = max_size(in_RSI); if (in_EDX < iVar1) { puVar4 = (int8 *)(*(long *)(in_RSI + 8) + (long)in_EDX * 0x20); *(int8 *)this = *puVar4; *(int8 *)(this + 8) = puVar4[1]; *(int4 *)(this + 0x10) = *(int4 *)(puVar4 + 2); } } else if (in_EDX < 0xf) { uVar2 = type(in_RSI,in_EDX); *(int4 *)(this + 0x10) = uVar2; if (*(int *)(this + 0x10) != 0) { puVar4 = (int8 *)(*(long *)(in_RSI + 8) + (long)in_EDX * 0x10); *(int8 *)this = *puVar4; *(int8 *)(this + 8) = puVar4[1]; } } return this; }
16,689
qoraal_init_default
navaro[P]qoraal-tictactoe/build_O3/_deps/qoraal-src/src/qoraal.c
int32_t qoraal_init_default (const QORAAL_CFG_T * instance, SVC_SERVICE_T * list) { int32_t res = qoraal_instance_init (instance) ; if (res != EOK) { return E_UNEXP ; } svc_events_init () ; svc_tasks_init (0) ; svc_wdt_init () ; svc_logger_init (SERVICE_PRIO_QUEUE3) ; svc_threads_init () ; svc_shell_init () ; if (list) { svc_service_services_init (list) ; } keep_servicescmds () ; return EOK ; }
O3
c
qoraal_init_default: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rsi, %rbx callq 0x14114 callq 0x15ae0 xorl %edi, %edi callq 0x18bab callq 0x19868 movl $0x3, %edi callq 0x15d64 callq 0x19614 callq 0x17ac9 testq %rbx, %rbx je 0x141a5 movq %rbx, %rdi callq 0x16a71 callq 0x1c64d xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %rbp retq
qoraal_init_default: push rbp mov rbp, rsp push rbx push rax mov rbx, rsi call qoraal_instance_init call svc_events_init xor edi, edi call svc_tasks_init call svc_wdt_init mov edi, 3 call svc_logger_init call svc_threads_init call svc_shell_init test rbx, rbx jz short loc_141A5 mov rdi, rbx call svc_service_services_init loc_141A5: call keep_servicescmds xor eax, eax add rsp, 8 pop rbx pop rbp retn
long long qoraal_init_default(_QWORD *a1, long long a2) { long long v2; // rdi qoraal_instance_init(a1); svc_events_init(a1); svc_tasks_init(0LL); svc_wdt_init(0LL); v2 = 3LL; svc_logger_init(3LL); svc_threads_init(3LL); svc_shell_init(3LL); if ( a2 ) { v2 = a2; svc_service_services_init(a2); } keep_servicescmds(v2); return 0LL; }
qoraal_init_default: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RSI CALL 0x00114114 CALL 0x00115ae0 XOR EDI,EDI CALL 0x00118bab CALL 0x00119868 MOV EDI,0x3 CALL 0x00115d64 CALL 0x00119614 CALL 0x00117ac9 TEST RBX,RBX JZ 0x001141a5 MOV RDI,RBX CALL 0x00116a71 LAB_001141a5: CALL 0x0011c64d XOR EAX,EAX ADD RSP,0x8 POP RBX POP RBP RET
int8 qoraal_init_default(int8 param_1,long param_2) { qoraal_instance_init(); svc_events_init(); svc_tasks_init(0); svc_wdt_init(); svc_logger_init(3); svc_threads_init(); svc_shell_init(); if (param_2 != 0) { svc_service_services_init(param_2); } keep_servicescmds(); return 0; }
16,690
nglog::LogDestination::MaybeLogToEmail(nglog::LogSeverity, char const*, unsigned long)
ng-log[P]ng-log/src/logging.cc
inline void LogDestination::MaybeLogToEmail(LogSeverity severity, const char* message, size_t len) { if (severity >= email_logging_severity_ || severity >= FLAGS_logemaillevel) { string to(FLAGS_alsologtoemail); if (!addresses_.empty()) { if (!to.empty()) { to += ","; } to += addresses_; } const string subject(string("[LOG] ") + LogSeverityNames[severity] + ": " + tools::ProgramInvocationShortName()); string body(hostname()); body += "\n\n"; body.append(message, len); // should NOT use SendEmail(). The caller of this function holds the // log_mutex and SendEmail() calls LOG/VLOG which will block trying to // acquire the log_mutex object. Use SendEmailInternal() and set // use_logging to false. SendEmailInternal(to.c_str(), subject.c_str(), body.c_str(), false); } }
O2
cpp
nglog::LogDestination::MaybeLogToEmail(nglog::LogSeverity, char const*, unsigned long): pushq %rbp pushq %r14 pushq %rbx subq $0xb0, %rsp movq %rdx, %rbx movq %rsi, %r14 movl %edi, %ebp cmpl %edi, 0x213cf(%rip) # 0x315e0 jbe 0x10222 leaq 0x21926(%rip), %rax # 0x31b40 cmpl %ebp, (%rax) jg 0x1035b leaq 0x20357(%rip), %rax # 0x30580 movq (%rax), %rsi leaq 0x30(%rsp), %rdi callq 0x87f0 cmpq $0x0, 0x21a3a(%rip) # 0x31c78 je 0x1026a cmpq $0x0, 0x38(%rsp) je 0x10259 leaq 0x10bf1(%rip), %rsi # 0x20e40 leaq 0x30(%rsp), %rdi callq 0x8ac0 leaq 0x21a10(%rip), %rsi # 0x31c70 leaq 0x30(%rsp), %rdi callq 0x8af0 leaq 0x10bd1(%rip), %rsi # 0x20e42 leaq 0x50(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0xa202 movl %ebp, %eax leaq 0x20337(%rip), %rcx # 0x305c0 movq (%rcx,%rax,8), %rdx leaq 0x70(%rsp), %rdi leaq 0x50(%rsp), %rsi callq 0x10a7c leaq 0x10a51(%rip), %rdx # 0x20cf4 leaq 0x10(%rsp), %rdi leaq 0x70(%rsp), %rsi callq 0x10a7c callq 0x1e989 leaq 0x90(%rsp), %rdi leaq 0x10(%rsp), %rsi movq %rax, %rdx callq 0x10a7c leaq 0x10(%rsp), %rdi callq 0x8b78 leaq 0x70(%rsp), %rdi callq 0x8b78 leaq 0x50(%rsp), %rdi callq 0x8b78 callq 0xb27c leaq 0x2199a(%rip), %rsi # 0x31c90 leaq 0x10(%rsp), %rdi callq 0x87f0 leaq 0x10b42(%rip), %rsi # 0x20e49 leaq 0x10(%rsp), %rdi callq 0x8ac0 leaq 0x10(%rsp), %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x80c0 movq 0x30(%rsp), %rdi movq 0x90(%rsp), %rsi movq 0x10(%rsp), %rdx xorl %ecx, %ecx callq 0xcbad leaq 0x10(%rsp), %rdi callq 0x8b78 leaq 0x90(%rsp), %rdi callq 0x8b78 leaq 0x30(%rsp), %rdi callq 0x8b78 addq $0xb0, %rsp popq %rbx popq %r14 popq %rbp retq movq %rax, %rbx jmp 0x1038a movq %rax, %rbx jmp 0x10394 jmp 0x10373 movq %rax, %rbx jmp 0x103b5 movq %rax, %rbx jmp 0x103a8 movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x8b78 leaq 0x70(%rsp), %rdi callq 0x8b78 leaq 0x50(%rsp), %rdi jmp 0x103b0 movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x8b78 leaq 0x90(%rsp), %rdi callq 0x8b78 leaq 0x30(%rsp), %rdi callq 0x8b78 movq %rbx, %rdi callq 0x8a40 nop
_ZN5nglog14LogDestination15MaybeLogToEmailENS_11LogSeverityEPKcm: push rbp push r14 push rbx sub rsp, 0B0h mov rbx, rdx mov r14, rsi mov ebp, edi cmp cs:_ZN5nglog14LogDestination23email_logging_severity_E, edi; nglog::LogDestination::email_logging_severity_ jbe short loc_10222 lea rax, _ZN3fLI19FLAGS_logemaillevelE; fLI::FLAGS_logemaillevel cmp [rax], ebp jg loc_1035B loc_10222: lea rax, _ZN3fLS20FLAGS_alsologtoemailB5cxx11E; fLS::FLAGS_alsologtoemail mov rsi, [rax] lea rdi, [rsp+0C8h+var_98] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) cmp cs:qword_31C78, 0 jz short loc_1026A cmp [rsp+0C8h+var_90], 0 jz short loc_10259 lea rsi, asc_20E40; "," lea rdi, [rsp+0C8h+var_98] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) loc_10259: lea rsi, _ZN5nglog14LogDestination10addresses_B5cxx11E; nglog::LogDestination::addresses_ lea rdi, [rsp+0C8h+var_98] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&) loc_1026A: lea rsi, aLog_0; "[LOG] " lea rdi, [rsp+0C8h+var_78] lea rdx, [rsp+0C8h+var_B9] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov eax, ebp lea rcx, _ZN5nglogL16LogSeverityNamesE; nglog::LogSeverityNames mov rdx, [rcx+rax*8] lea rdi, [rsp+0C8h+var_58] lea rsi, [rsp+0C8h+var_78] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) lea rdx, aRunningDuratio+1Ah; ": " lea rdi, [rsp+0C8h+var_B8]; this lea rsi, [rsp+0C8h+var_58] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) call _ZN5nglog5tools26ProgramInvocationShortNameEv; nglog::tools::ProgramInvocationShortName(void) lea rdi, [rsp+0C8h+var_38] lea rsi, [rsp+0C8h+var_B8] mov rdx, rax call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) lea rdi, [rsp+0C8h+var_B8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0C8h+var_58]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0C8h+var_78]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() call _ZN5nglog14LogDestination8hostnameB5cxx11Ev; nglog::LogDestination::hostname(void) lea rsi, _ZN5nglog14LogDestination9hostname_B5cxx11E; nglog::LogDestination::hostname_ lea rdi, [rsp+0C8h+var_B8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) lea rsi, asc_20E49; "\n\n" lea rdi, [rsp+0C8h+var_B8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rdi, [rsp+0C8h+var_B8] mov rsi, r14 mov rdx, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong) mov rdi, [rsp+0C8h+var_98]; this mov rsi, [rsp+0C8h+var_38]; char * mov rdx, [rsp+0C8h+var_B8]; char * xor ecx, ecx; char * call _ZN5nglogL17SendEmailInternalEPKcS1_S1_b; nglog::SendEmailInternal(char const*,char const*,char const*,bool) lea rdi, [rsp+0C8h+var_B8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0C8h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0C8h+var_98]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_1035B: add rsp, 0B0h pop rbx pop r14 pop rbp retn mov rbx, rax jmp short loc_1038A mov rbx, rax jmp short loc_10394 jmp short $+2 loc_10373: mov rbx, rax jmp short loc_103B5 mov rbx, rax jmp short loc_103A8 mov rbx, rax lea rdi, [rsp+arg_8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_1038A: lea rdi, [rsp+arg_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_10394: lea rdi, [rsp+arg_48] jmp short loc_103B0 mov rbx, rax lea rdi, [rsp+arg_8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_103A8: lea rdi, [rsp+arg_88]; void * loc_103B0: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_103B5: lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
void nglog::LogDestination::MaybeLogToEmail(unsigned int a1, long long a2, long long a3) { long long v4; // rax char *v5[4]; // [rsp+10h] [rbp-B8h] BYREF nglog *v6[4]; // [rsp+30h] [rbp-98h] BYREF _QWORD v7[4]; // [rsp+50h] [rbp-78h] BYREF _BYTE v8[32]; // [rsp+70h] [rbp-58h] BYREF char *v9[7]; // [rsp+90h] [rbp-38h] BYREF if ( nglog::LogDestination::email_logging_severity_ <= a1 || fLI::FLAGS_logemaillevel <= (int)a1 ) { std::string::basic_string(v6); if ( qword_31C78 ) { if ( v6[1] ) std::string::append(v6, ","); std::string::append(v6, &nglog::LogDestination::addresses_[abi:cxx11]); } std::string::basic_string<std::allocator<char>>(v7, (long long)"[LOG] "); std::operator+<char>(v8, v7, nglog::LogSeverityNames[a1]); std::operator+<char>(v5, v8, ": "); v4 = nglog::tools::ProgramInvocationShortName((nglog::tools *)v5); std::operator+<char>(v9, v5, v4); std::string::~string(v5); std::string::~string(v8); std::string::~string(v7); nglog::LogDestination::hostname[abi:cxx11](); std::string::basic_string(v5); std::string::append(v5, "\n\n"); std::string::append(v5, a2, a3); nglog::SendEmailInternal(v6[0], v9[0], (long long)v5[0], 0LL); std::string::~string(v5); std::string::~string(v9); std::string::~string(v6); } }
MaybeLogToEmail: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0xb0 MOV RBX,RDX MOV R14,RSI MOV EBP,EDI CMP dword ptr [0x001315e0],EDI JBE 0x00110222 LEA RAX,[0x131b40] CMP dword ptr [RAX],EBP JG 0x0011035b LAB_00110222: LEA RAX,[0x130580] MOV RSI,qword ptr [RAX] LEA RDI,[RSP + 0x30] CALL 0x001087f0 CMP qword ptr [0x00131c78],0x0 JZ 0x0011026a CMP qword ptr [RSP + 0x38],0x0 JZ 0x00110259 LAB_00110248: LEA RSI,[0x120e40] LEA RDI,[RSP + 0x30] CALL 0x00108ac0 LAB_00110259: LEA RSI,[0x131c70] LEA RDI,[RSP + 0x30] CALL 0x00108af0 LAB_0011026a: LEA RSI,[0x120e42] LEA RDI,[RSP + 0x50] LEA RDX,[RSP + 0xf] CALL 0x0010a202 MOV EAX,EBP LEA RCX,[0x1305c0] MOV RDX,qword ptr [RCX + RAX*0x8] LAB_0011028d: LEA RDI,[RSP + 0x70] LEA RSI,[RSP + 0x50] CALL 0x00110a7c LAB_0011029c: LEA RDX,[0x120cf4] LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x70] CALL 0x00110a7c LAB_001102b2: CALL 0x0011e989 LEA RDI,[RSP + 0x90] LEA RSI,[RSP + 0x10] MOV RDX,RAX CALL 0x00110a7c LEA RDI,[RSP + 0x10] CALL 0x00108b78 LEA RDI,[RSP + 0x70] CALL 0x00108b78 LEA RDI,[RSP + 0x50] CALL 0x00108b78 LAB_001102ea: CALL 0x0010b27c LEA RSI,[0x131c90] LEA RDI,[RSP + 0x10] CALL 0x001087f0 LAB_00110300: LEA RSI,[0x120e49] LEA RDI,[RSP + 0x10] CALL 0x00108ac0 LEA RDI,[RSP + 0x10] MOV RSI,R14 MOV RDX,RBX CALL 0x001080c0 MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x90] MOV RDX,qword ptr [RSP + 0x10] XOR ECX,ECX CALL 0x0010cbad LAB_0011033a: LEA RDI,[RSP + 0x10] CALL 0x00108b78 LEA RDI,[RSP + 0x90] CALL 0x00108b78 LEA RDI,[RSP + 0x30] CALL 0x00108b78 LAB_0011035b: ADD RSP,0xb0 POP RBX POP R14 POP RBP RET
/* nglog::LogDestination::MaybeLogToEmail(nglog::LogSeverity, char const*, unsigned long) */ void nglog::LogDestination::MaybeLogToEmail(uint param_1,ulong param_2) { allocator local_b9; char *local_b8 [4]; char *local_98; long local_90; string local_78 [32]; string local_58 [32]; char *local_38 [4]; if ((email_logging_severity_ <= param_1) || (fLI::FLAGS_logemaillevel <= (int)param_1)) { std::__cxx11::string::string((string *)&local_98,(string *)fLS::FLAGS_alsologtoemail_abi_cxx11_) ; if (addresses__abi_cxx11_._8_8_ != 0) { if (local_90 != 0) { /* try { // try from 00110248 to 00110269 has its CatchHandler @ 00110373 */ std::__cxx11::string::append((char *)&local_98); } std::__cxx11::string::append((string *)&local_98); } /* try { // try from 0011026a to 0011027f has its CatchHandler @ 00110371 */ std::__cxx11::string::string<std::allocator<char>>(local_78,"[LOG] ",&local_b9); /* try { // try from 0011028d to 0011029b has its CatchHandler @ 0011036c */ std::operator+(local_58,(char *)local_78); /* try { // try from 0011029c to 001102b1 has its CatchHandler @ 00110367 */ std::operator+((string *)local_b8,(char *)local_58); /* try { // try from 001102b2 to 001102cb has its CatchHandler @ 0011037d */ tools::ProgramInvocationShortName(); std::operator+((string *)local_38,(char *)local_b8); std::__cxx11::string::~string((string *)local_b8); std::__cxx11::string::~string(local_58); std::__cxx11::string::~string(local_78); /* try { // try from 001102ea to 001102ff has its CatchHandler @ 00110378 */ hostname_abi_cxx11_(); std::__cxx11::string::string((string *)local_b8,(string *)hostname__abi_cxx11_); /* try { // try from 00110300 to 00110339 has its CatchHandler @ 0011039b */ std::__cxx11::string::append((char *)local_b8); std::__cxx11::string::append((char *)local_b8,param_2); SendEmailInternal(local_98,local_38[0],local_b8[0],false); std::__cxx11::string::~string((string *)local_b8); std::__cxx11::string::~string((string *)local_38); std::__cxx11::string::~string((string *)&local_98); } return; }
16,691
nglog::LogDestination::MaybeLogToEmail(nglog::LogSeverity, char const*, unsigned long)
ng-log[P]ng-log/src/logging.cc
inline void LogDestination::MaybeLogToEmail(LogSeverity severity, const char* message, size_t len) { if (severity >= email_logging_severity_ || severity >= FLAGS_logemaillevel) { string to(FLAGS_alsologtoemail); if (!addresses_.empty()) { if (!to.empty()) { to += ","; } to += addresses_; } const string subject(string("[LOG] ") + LogSeverityNames[severity] + ": " + tools::ProgramInvocationShortName()); string body(hostname()); body += "\n\n"; body.append(message, len); // should NOT use SendEmail(). The caller of this function holds the // log_mutex and SendEmail() calls LOG/VLOG which will block trying to // acquire the log_mutex object. Use SendEmailInternal() and set // use_logging to false. SendEmailInternal(to.c_str(), subject.c_str(), body.c_str(), false); } }
O3
cpp
nglog::LogDestination::MaybeLogToEmail(nglog::LogSeverity, char const*, unsigned long): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa8, %rsp movq %rdx, %rbx movq %rsi, %r14 movl %edi, %ebp cmpl %edi, 0x1fe3b(%rip) # 0x31580 jbe 0x11756 leaq 0x2038a(%rip), %rax # 0x31ad8 cmpl %ebp, (%rax) jg 0x119e0 leaq 0x1ee13(%rip), %rax # 0x30570 movq (%rax), %rax leaq 0x38(%rsp), %rcx movq %rcx, -0x10(%rcx) movq (%rax), %rsi movq 0x8(%rax), %rdx addq %rsi, %rdx leaq 0x28(%rsp), %rdi callq 0x98b4 movq 0x20484(%rip), %rdx # 0x31c08 testq %rdx, %rdx je 0x117ba cmpq $0x0, 0x30(%rsp) je 0x117a9 leaq 0x12698(%rip), %rsi # 0x23e30 leaq 0x28(%rsp), %rdi callq 0x7a40 movq 0x2045f(%rip), %rdx # 0x31c08 movq 0x20450(%rip), %rsi # 0x31c00 leaq 0x28(%rsp), %rdi callq 0x7140 leaq 0x98(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x12664(%rip), %rsi # 0x23e32 leaq 0x12663(%rip), %rdx # 0x23e38 leaq 0x88(%rsp), %rdi callq 0xa448 movl %ebp, %eax leaq 0x1edc5(%rip), %rcx # 0x305b0 movq (%rcx,%rax,8), %rsi leaq 0x88(%rsp), %rdi callq 0x7a40 leaq 0x78(%rsp), %r15 movq %r15, -0x10(%r15) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0x11823 movq %rdx, 0x68(%rsp) movq (%rcx), %rdx movq %rdx, 0x78(%rsp) jmp 0x1182a movups (%rcx), %xmm0 movups %xmm0, (%r15) movq 0x8(%rax), %rdx leaq 0x68(%rsp), %rdi movq %rdx, 0x8(%rdi) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) leaq 0x12497(%rip), %rsi # 0x23ce4 callq 0x7a40 leaq 0x18(%rsp), %r13 movq %r13, -0x10(%r13) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0x11879 movq %rdx, 0x8(%rsp) movq (%rcx), %rdx movq %rdx, 0x18(%rsp) jmp 0x11881 movups (%rcx), %xmm0 movups %xmm0, (%r13) movq 0x8(%rax), %rdx movq %rdx, 0x10(%rsp) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) callq 0x21f3b leaq 0x8(%rsp), %rdi movq %rax, %rsi callq 0x7a40 leaq 0x58(%rsp), %rbp movq %rbp, -0x10(%rbp) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0x118d2 movq %rdx, 0x48(%rsp) movq (%rcx), %rdx movq %rdx, 0x58(%rsp) jmp 0x118d9 movups (%rcx), %xmm0 movups %xmm0, (%rbp) movq 0x8(%rax), %rdx movq %rdx, 0x50(%rsp) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x11908 movq 0x18(%rsp), %rsi incq %rsi callq 0x8efc movq 0x68(%rsp), %rdi cmpq %r15, %rdi je 0x1191f movq 0x78(%rsp), %rsi incq %rsi callq 0x8efc movq 0x88(%rsp), %rdi cmpq %r12, %rdi je 0x1193c movq 0x98(%rsp), %rsi incq %rsi callq 0x8efc callq 0xa5ba leaq 0x8(%rsp), %rdi movq %r13, (%rdi) movq 0x202d0(%rip), %rsi # 0x31c20 movq 0x202d1(%rip), %rdx # 0x31c28 addq %rsi, %rdx callq 0x98b4 leaq 0x124d3(%rip), %rsi # 0x23e39 leaq 0x8(%rsp), %rdi callq 0x7a40 leaq 0x8(%rsp), %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x70c0 movq 0x28(%rsp), %rdi movq 0x48(%rsp), %rsi movq 0x8(%rsp), %rdx xorl %ecx, %ecx callq 0xca30 movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x119ad movq 0x18(%rsp), %rsi incq %rsi callq 0x8efc movq 0x48(%rsp), %rdi cmpq %rbp, %rdi leaq 0x38(%rsp), %rbx je 0x119c9 movq 0x58(%rsp), %rsi incq %rsi callq 0x8efc movq 0x28(%rsp), %rdi cmpq %rbx, %rdi je 0x119e0 movq 0x38(%rsp), %rsi incq %rsi callq 0x8efc addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx jmp 0x11a22 movq %rax, %rbx jmp 0x11a39 jmp 0x119fe movq %rax, %rbx jmp 0x11a81 movq %rax, %rbx jmp 0x11a6a movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x11a22 movq 0x18(%rsp), %rsi incq %rsi callq 0x8efc movq 0x68(%rsp), %rdi cmpq %r15, %rdi je 0x11a39 movq 0x78(%rsp), %rsi incq %rsi callq 0x8efc movq 0x88(%rsp), %rdi cmpq %r12, %rdi je 0x11a81 movq 0x98(%rsp), %rsi jmp 0x11a79 movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x11a6a movq 0x18(%rsp), %rsi incq %rsi callq 0x8efc movq 0x48(%rsp), %rdi cmpq %rbp, %rdi je 0x11a81 movq 0x58(%rsp), %rsi incq %rsi callq 0x8efc movq 0x28(%rsp), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x11a9d movq 0x38(%rsp), %rsi incq %rsi callq 0x8efc movq %rbx, %rdi callq 0x79b0 nop
_ZN5nglog14LogDestination15MaybeLogToEmailENS_11LogSeverityEPKcm: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A8h mov rbx, rdx mov r14, rsi mov ebp, edi cmp cs:_ZN5nglog14LogDestination23email_logging_severity_E, edi; nglog::LogDestination::email_logging_severity_ jbe short loc_11756 lea rax, _ZN3fLI19FLAGS_logemaillevelE; fLI::FLAGS_logemaillevel cmp [rax], ebp jg loc_119E0 loc_11756: lea rax, _ZN3fLS20FLAGS_alsologtoemailB5cxx11E; fLS::FLAGS_alsologtoemail mov rax, [rax] lea rcx, [rsp+0D8h+var_A0] mov [rcx-10h], rcx mov rsi, [rax] mov rdx, [rax+8] add rdx, rsi lea rdi, [rsp+0D8h+var_B0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov rdx, cs:qword_31C08 test rdx, rdx jz short loc_117BA cmp [rsp+0D8h+var_A8], 0 jz short loc_117A9 lea rsi, asc_23E30; "," lea rdi, [rsp+0D8h+var_B0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rdx, cs:qword_31C08 loc_117A9: mov rsi, cs:_ZN5nglog14LogDestination10addresses_B5cxx11E; nglog::LogDestination::addresses_ lea rdi, [rsp+0D8h+var_B0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) loc_117BA: lea r12, [rsp+0D8h+var_40] mov [r12-10h], r12 lea rsi, aLog_0; "[LOG] " lea rdx, aLog_0+6; "" lea rdi, [rsp+0D8h+var_50] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov eax, ebp lea rcx, _ZN5nglogL16LogSeverityNamesE; nglog::LogSeverityNames mov rsi, [rcx+rax*8] lea rdi, [rsp+0D8h+var_50] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea r15, [rsp+0D8h+var_60] mov [r15-10h], r15 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_11823 mov [rsp+0D8h+var_70], rdx mov rdx, [rcx] mov [rsp+0D8h+var_60], rdx jmp short loc_1182A loc_11823: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r15], xmm0 loc_1182A: mov rdx, [rax+8] lea rdi, [rsp+0D8h+var_70]; this mov [rdi+8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 lea rsi, aRunningDuratio+1Ah; ": " call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea r13, [rsp+0D8h+var_C0] mov [r13-10h], r13 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_11879 mov [rsp+0D8h+var_D0], rdx mov rdx, [rcx] mov [rsp+0D8h+var_C0], rdx jmp short loc_11881 loc_11879: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r13+0], xmm0 loc_11881: mov rdx, [rax+8] mov [rsp+0D8h+var_C8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 call _ZN5nglog5tools26ProgramInvocationShortNameEv; nglog::tools::ProgramInvocationShortName(void) lea rdi, [rsp+0D8h+var_D0] mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rbp, [rsp+0D8h+var_80] mov [rbp-10h], rbp mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_118D2 mov [rsp+0D8h+var_90], rdx mov rdx, [rcx] mov [rsp+0D8h+var_80], rdx jmp short loc_118D9 loc_118D2: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rbp+0], xmm0 loc_118D9: mov rdx, [rax+8] mov [rsp+0D8h+var_88], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov rdi, [rsp+0D8h+var_D0]; void * cmp rdi, r13 jz short loc_11908 mov rsi, [rsp+0D8h+var_C0] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_11908: mov rdi, [rsp+0D8h+var_70]; void * cmp rdi, r15 jz short loc_1191F mov rsi, [rsp+0D8h+var_60] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_1191F: mov rdi, [rsp+0D8h+var_50]; void * cmp rdi, r12 jz short loc_1193C mov rsi, [rsp+0D8h+var_40] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_1193C: call _ZN5nglog14LogDestination8hostnameB5cxx11Ev; nglog::LogDestination::hostname(void) lea rdi, [rsp+0D8h+var_D0] mov [rdi], r13 mov rsi, cs:_ZN5nglog14LogDestination9hostname_B5cxx11E; nglog::LogDestination::hostname_ mov rdx, cs:qword_31C28 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) lea rsi, asc_23E39; "\n\n" lea rdi, [rsp+0D8h+var_D0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rdi, [rsp+0D8h+var_D0] mov rsi, r14 mov rdx, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm; std::string::append(char const*,ulong) mov rdi, [rsp+0D8h+var_B0]; this mov rsi, [rsp+0D8h+var_90]; char * mov rdx, [rsp+0D8h+var_D0]; char * xor ecx, ecx; char * call _ZN5nglogL17SendEmailInternalEPKcS1_S1_b; nglog::SendEmailInternal(char const*,char const*,char const*,bool) mov rdi, [rsp+0D8h+var_D0]; void * cmp rdi, r13 jz short loc_119AD mov rsi, [rsp+0D8h+var_C0] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_119AD: mov rdi, [rsp+0D8h+var_90]; void * cmp rdi, rbp lea rbx, [rsp+0D8h+var_A0] jz short loc_119C9 mov rsi, [rsp+0D8h+var_80] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_119C9: mov rdi, [rsp+0D8h+var_B0]; void * cmp rdi, rbx jz short loc_119E0 mov rsi, [rsp+0D8h+var_A0] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_119E0: add rsp, 0A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax jmp short loc_11A22 mov rbx, rax jmp short loc_11A39 jmp short $+2 loc_119FE: mov rbx, rax jmp short loc_11A81 mov rbx, rax jmp short loc_11A6A mov rbx, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r13 jz short loc_11A22 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_11A22: mov rdi, [rsp+arg_60]; void * cmp rdi, r15 jz short loc_11A39 mov rsi, [rsp+arg_70] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_11A39: mov rdi, [rsp+arg_80] cmp rdi, r12 jz short loc_11A81 mov rsi, [rsp+arg_90] jmp short loc_11A79 mov rbx, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r13 jz short loc_11A6A mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_11A6A: mov rdi, [rsp+arg_40]; void * cmp rdi, rbp jz short loc_11A81 mov rsi, [rsp+arg_50] loc_11A79: inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_11A81: mov rdi, [rsp+arg_20]; void * lea rax, [rsp+arg_30] cmp rdi, rax jz short loc_11A9D mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_11A9D: mov rdi, rbx call __Unwind_Resume
void nglog::LogDestination::MaybeLogToEmail(unsigned int a1, long long a2, long long a3) { long long v4; // rax __int128 *v5; // rcx long long v6; // rax __int128 *v7; // rcx long long v8; // rax long long v9; // rax __int128 *v10; // rcx char *v11[2]; // [rsp+8h] [rbp-D0h] BYREF __int128 v12; // [rsp+18h] [rbp-C0h] BYREF nglog *v13[2]; // [rsp+28h] [rbp-B0h] BYREF char *v14[2]; // [rsp+38h] [rbp-A0h] BYREF char *v15; // [rsp+48h] [rbp-90h] long long v16; // [rsp+50h] [rbp-88h] __int128 v17; // [rsp+58h] [rbp-80h] BYREF void *v18[2]; // [rsp+68h] [rbp-70h] BYREF __int128 v19; // [rsp+78h] [rbp-60h] BYREF void *v20[2]; // [rsp+88h] [rbp-50h] BYREF _QWORD v21[8]; // [rsp+98h] [rbp-40h] BYREF if ( nglog::LogDestination::email_logging_severity_ <= a1 || fLI::FLAGS_logemaillevel <= (int)a1 ) { v13[0] = (nglog *)v14; std::string::_M_construct<char *>( (long long)v13, (_BYTE *)fLS::FLAGS_alsologtoemail_buf[abi:cxx11], fLS::FLAGS_alsologtoemail_buf[abi:cxx11] + *(&fLS::FLAGS_alsologtoemail_buf[abi:cxx11] + 1)); if ( qword_31C08 ) { if ( v13[1] ) std::string::append(v13, ","); std::string::_M_append(v13, nglog::LogDestination::addresses_[abi:cxx11]); } v20[0] = v21; std::string::_M_construct<char const*>((long long)v20, "[LOG] ", (long long)""); v4 = std::string::append(v20, nglog::LogSeverityNames[a1]); v18[0] = &v19; v5 = (__int128 *)(v4 + 16); if ( *(_QWORD *)v4 == v4 + 16 ) { v19 = *v5; } else { v18[0] = *(void **)v4; *(_QWORD *)&v19 = *(_QWORD *)v5; } v18[1] = *(void **)(v4 + 8); *(_QWORD *)v4 = v5; *(_QWORD *)(v4 + 8) = 0LL; *(_BYTE *)(v4 + 16) = 0; v6 = std::string::append(v18, ": "); v11[0] = (char *)&v12; v7 = (__int128 *)(v6 + 16); if ( *(_QWORD *)v6 == v6 + 16 ) { v12 = *v7; } else { v11[0] = *(char **)v6; *(_QWORD *)&v12 = *(_QWORD *)v7; } v11[1] = *(char **)(v6 + 8); *(_QWORD *)v6 = v7; *(_QWORD *)(v6 + 8) = 0LL; *(_BYTE *)(v6 + 16) = 0; v8 = nglog::tools::ProgramInvocationShortName((nglog::tools *)v18); v9 = std::string::append(v11, v8); v15 = (char *)&v17; v10 = (__int128 *)(v9 + 16); if ( *(_QWORD *)v9 == v9 + 16 ) { v17 = *v10; } else { v15 = *(char **)v9; *(_QWORD *)&v17 = *(_QWORD *)v10; } v16 = *(_QWORD *)(v9 + 8); *(_QWORD *)v9 = v10; *(_QWORD *)(v9 + 8) = 0LL; *(_BYTE *)(v9 + 16) = 0; if ( (__int128 *)v11[0] != &v12 ) operator delete(v11[0]); if ( v18[0] != &v19 ) operator delete(v18[0]); if ( v20[0] != v21 ) operator delete(v20[0]); nglog::LogDestination::hostname[abi:cxx11](); v11[0] = (char *)&v12; std::string::_M_construct<char *>( (long long)v11, (_BYTE *)nglog::LogDestination::hostname_[abi:cxx11], nglog::LogDestination::hostname_[abi:cxx11] + qword_31C28); std::string::append(v11, "\n\n"); std::string::append(v11, a2, a3); nglog::SendEmailInternal(v13[0], v15, v11[0], 0LL); if ( (__int128 *)v11[0] != &v12 ) operator delete(v11[0]); if ( v15 != (char *)&v17 ) operator delete(v15); if ( (char **)v13[0] != v14 ) operator delete(v13[0]); } }
MaybeLogToEmail: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV RBX,RDX MOV R14,RSI MOV EBP,EDI CMP dword ptr [0x00131580],EDI JBE 0x00111756 LEA RAX,[0x131ad8] CMP dword ptr [RAX],EBP JG 0x001119e0 LAB_00111756: LEA RAX,[0x130570] MOV RAX,qword ptr [RAX] LEA RCX,[RSP + 0x38] MOV qword ptr [RCX + -0x10],RCX MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] ADD RDX,RSI LEA RDI,[RSP + 0x28] CALL 0x001098b4 MOV RDX,qword ptr [0x00131c08] TEST RDX,RDX JZ 0x001117ba CMP qword ptr [RSP + 0x30],0x0 JZ 0x001117a9 LAB_00111791: LEA RSI,[0x123e30] LEA RDI,[RSP + 0x28] CALL 0x00107a40 MOV RDX,qword ptr [0x00131c08] LAB_001117a9: MOV RSI,qword ptr [0x00131c00] LEA RDI,[RSP + 0x28] CALL 0x00107140 LAB_001117ba: LEA R12,[RSP + 0x98] MOV qword ptr [R12 + -0x10],R12 LAB_001117c7: LEA RSI,[0x123e32] LEA RDX,[0x123e38] LEA RDI,[RSP + 0x88] CALL 0x0010a448 MOV EAX,EBP LEA RCX,[0x1305b0] MOV RSI,qword ptr [RCX + RAX*0x8] LAB_001117ef: LEA RDI,[RSP + 0x88] CALL 0x00107a40 LEA R15,[RSP + 0x78] MOV qword ptr [R15 + -0x10],R15 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x00111823 MOV qword ptr [RSP + 0x68],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x78],RDX JMP 0x0011182a LAB_00111823: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R15],XMM0 LAB_0011182a: MOV RDX,qword ptr [RAX + 0x8] LEA RDI,[RSP + 0x68] MOV qword ptr [RDI + 0x8],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 LAB_00111846: LEA RSI,[0x123ce4] CALL 0x00107a40 LEA R13,[RSP + 0x18] MOV qword ptr [R13 + -0x10],R13 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x00111879 MOV qword ptr [RSP + 0x8],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x18],RDX JMP 0x00111881 LAB_00111879: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R13],XMM0 LAB_00111881: MOV RDX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 LAB_00111899: CALL 0x00121f3b LEA RDI,[RSP + 0x8] MOV RSI,RAX CALL 0x00107a40 LEA RBP,[RSP + 0x58] MOV qword ptr [RBP + -0x10],RBP MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x001118d2 MOV qword ptr [RSP + 0x48],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x58],RDX JMP 0x001118d9 LAB_001118d2: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RBP],XMM0 LAB_001118d9: MOV RDX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x50],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R13 JZ 0x00111908 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00108efc LAB_00111908: MOV RDI,qword ptr [RSP + 0x68] CMP RDI,R15 JZ 0x0011191f MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x00108efc LAB_0011191f: MOV RDI,qword ptr [RSP + 0x88] CMP RDI,R12 JZ 0x0011193c MOV RSI,qword ptr [RSP + 0x98] INC RSI CALL 0x00108efc LAB_0011193c: CALL 0x0010a5ba LEA RDI,[RSP + 0x8] MOV qword ptr [RDI],R13 MOV RSI,qword ptr [0x00131c20] MOV RDX,qword ptr [0x00131c28] ADD RDX,RSI CALL 0x001098b4 LAB_0011195f: LEA RSI,[0x123e39] LEA RDI,[RSP + 0x8] CALL 0x00107a40 LEA RDI,[RSP + 0x8] MOV RSI,R14 MOV RDX,RBX CALL 0x001070c0 MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x8] XOR ECX,ECX CALL 0x0010ca30 LAB_00111996: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R13 JZ 0x001119ad MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00108efc LAB_001119ad: MOV RDI,qword ptr [RSP + 0x48] CMP RDI,RBP LEA RBX,[RSP + 0x38] JZ 0x001119c9 MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x00108efc LAB_001119c9: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,RBX JZ 0x001119e0 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x00108efc LAB_001119e0: ADD RSP,0xa8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* nglog::LogDestination::MaybeLogToEmail(nglog::LogSeverity, char const*, unsigned long) */ void nglog::LogDestination::MaybeLogToEmail(uint param_1,ulong param_2) { long *plVar1; long *plVar2; long *local_d0; long local_c8; long local_c0; long lStack_b8; long *local_b0; long local_a8; long local_a0 [2]; long *local_90; long local_88; long local_80; long lStack_78; long *local_70; long local_68; long local_60; long lStack_58; long *local_50 [2]; long local_40 [2]; if ((email_logging_severity_ <= param_1) || (fLI::FLAGS_logemaillevel <= (int)param_1)) { local_b0 = local_a0; std::__cxx11::string::_M_construct<char*> (&local_b0,*(long *)fLS::FLAGS_alsologtoemail_abi_cxx11_, *(long *)(fLS::FLAGS_alsologtoemail_abi_cxx11_ + 8) + *(long *)fLS::FLAGS_alsologtoemail_abi_cxx11_); if (_DAT_00131c08 != 0) { if (local_a8 != 0) { /* try { // try from 00111791 to 001117b9 has its CatchHandler @ 001119fe */ std::__cxx11::string::append((char *)&local_b0); } std::__cxx11::string::_M_append((char *)&local_b0,addresses__abi_cxx11_); } /* try { // try from 001117c7 to 001117e1 has its CatchHandler @ 001119fc */ local_50[0] = local_40; std::__cxx11::string::_M_construct<char_const*>(local_50,&DAT_00123e32,&DAT_00123e38); /* try { // try from 001117ef to 001117fb has its CatchHandler @ 001119f7 */ plVar1 = (long *)std::__cxx11::string::append((char *)local_50); plVar2 = plVar1 + 2; if ((long *)*plVar1 == plVar2) { local_60 = *plVar2; lStack_58 = plVar1[3]; local_70 = &local_60; } else { local_60 = *plVar2; local_70 = (long *)*plVar1; } local_68 = plVar1[1]; *plVar1 = (long)plVar2; plVar1[1] = 0; *(int1 *)(plVar1 + 2) = 0; /* try { // try from 00111846 to 00111851 has its CatchHandler @ 001119f2 */ plVar1 = (long *)std::__cxx11::string::append((char *)&local_70); plVar2 = plVar1 + 2; if ((long *)*plVar1 == plVar2) { local_c0 = *plVar2; lStack_b8 = plVar1[3]; local_d0 = &local_c0; } else { local_c0 = *plVar2; local_d0 = (long *)*plVar1; } local_c8 = plVar1[1]; *plVar1 = (long)plVar2; plVar1[1] = 0; *(int1 *)(plVar1 + 2) = 0; /* try { // try from 00111899 to 001118aa has its CatchHandler @ 00111a08 */ tools::ProgramInvocationShortName(); plVar1 = (long *)std::__cxx11::string::append((char *)&local_d0); plVar2 = plVar1 + 2; if ((long *)*plVar1 == plVar2) { local_80 = *plVar2; lStack_78 = plVar1[3]; local_90 = &local_80; } else { local_80 = *plVar2; local_90 = (long *)*plVar1; } local_88 = plVar1[1]; *plVar1 = (long)plVar2; plVar1[1] = 0; *(int1 *)(plVar1 + 2) = 0; if (local_d0 != &local_c0) { operator_delete(local_d0,local_c0 + 1); } if (local_70 != &local_60) { operator_delete(local_70,local_60 + 1); } if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } /* try { // try from 0011193c to 0011195e has its CatchHandler @ 00111a03 */ hostname_abi_cxx11_(); local_d0 = &local_c0; std::__cxx11::string::_M_construct<char*> (&local_d0,hostname__abi_cxx11_,DAT_00131c28 + hostname__abi_cxx11_); /* try { // try from 0011195f to 00111995 has its CatchHandler @ 00111a50 */ std::__cxx11::string::append((char *)&local_d0); std::__cxx11::string::append((char *)&local_d0,param_2); SendEmailInternal((char *)local_b0,(char *)local_90,(char *)local_d0,false); if (local_d0 != &local_c0) { operator_delete(local_d0,local_c0 + 1); } if (local_90 != &local_80) { operator_delete(local_90,local_80 + 1); } if (local_b0 != local_a0) { operator_delete(local_b0,local_a0[0] + 1); } } return; }
16,692
lunasvg::SVGGradientElement::SVGGradientElement(lunasvg::Document*, lunasvg::ElementID)
dmazzella[P]pylunasvg/lunasvg/source/svgpaintelement.cpp
SVGGradientElement::SVGGradientElement(Document* document, ElementID id) : SVGPaintElement(document, id) , SVGURIReference(this) , m_gradientTransform(PropertyID::GradientTransform) , m_gradientUnits(PropertyID::GradientUnits, Units::ObjectBoundingBox) , m_spreadMethod(PropertyID::SpreadMethod, SpreadMethod::Pad) { addProperty(m_gradientTransform); addProperty(m_gradientUnits); addProperty(m_spreadMethod); }
O0
cpp
lunasvg::SVGGradientElement::SVGGradientElement(lunasvg::Document*, lunasvg::ElementID): pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movb %dl, %al movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movb %al, -0x11(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x30(%rbp) movq -0x10(%rbp), %rsi movzbl -0x11(%rbp), %edx callq 0x34e80 movq -0x30(%rbp), %rsi leaq 0x8e30b(%rip), %rax # 0xc33e0 movq %rax, (%rsi) movq %rsi, %rdi addq $0x70, %rdi callq 0x1a300 jmp 0x350e6 movq -0x30(%rbp), %rdi leaq 0x8e2ef(%rip), %rax # 0xc33e0 movq %rax, (%rdi) addq $0xa0, %rdi movq %rdi, -0x38(%rbp) movl $0x19, %esi callq 0x20800 jmp 0x3510b movq -0x30(%rbp), %rdi addq $0xc8, %rdi movq %rdi, -0x40(%rbp) movl $0x1a, %esi movl $0x1, %edx callq 0x21580 jmp 0x3512b movq -0x30(%rbp), %rdi addq $0xd8, %rdi movq %rdi, -0x48(%rbp) movl $0x38, %esi xorl %edx, %edx callq 0x37560 jmp 0x35148 movq -0x30(%rbp), %rdi movq %rdi, %rsi addq $0xa0, %rsi callq 0x19a70 jmp 0x3515d movq -0x30(%rbp), %rdi movq %rdi, %rsi addq $0xc8, %rsi callq 0x19a70 jmp 0x35172 movq -0x30(%rbp), %rdi movq %rdi, %rsi addq $0xd8, %rsi callq 0x19a70 jmp 0x35187 addq $0x50, %rsp popq %rbp retq movq %rax, %rcx movl %edx, %eax movq %rcx, -0x20(%rbp) movl %eax, -0x24(%rbp) jmp 0x351f9 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x20(%rbp) movl %eax, -0x24(%rbp) jmp 0x351ec movq %rax, %rcx movl %edx, %eax movq %rcx, -0x20(%rbp) movl %eax, -0x24(%rbp) jmp 0x351e3 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x20(%rbp) movl %eax, -0x24(%rbp) jmp 0x351da movq -0x48(%rbp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, -0x20(%rbp) movl %eax, -0x24(%rbp) callq 0x27300 movq -0x40(%rbp), %rdi callq 0x215d0 movq -0x38(%rbp), %rdi callq 0xfbe0 movq -0x30(%rbp), %rdi addq $0x70, %rdi callq 0x21270 movq -0x30(%rbp), %rdi callq 0x27320 movq -0x20(%rbp), %rdi callq 0xb6c0 nopl (%rax,%rax)
_ZN7lunasvg18SVGGradientElementC2EPNS_8DocumentENS_9ElementIDE: push rbp mov rbp, rsp sub rsp, 50h mov al, dl mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_11], al mov rdi, [rbp+var_8] mov [rbp+var_30], rdi mov rsi, [rbp+var_10] movzx edx, [rbp+var_11] call _ZN7lunasvg15SVGPaintElementC2EPNS_8DocumentENS_9ElementIDE; lunasvg::SVGPaintElement::SVGPaintElement(lunasvg::Document *,lunasvg::ElementID) mov rsi, [rbp+var_30]; lunasvg::SVGElement * lea rax, off_C33E0 mov [rsi], rax mov rdi, rsi add rdi, 70h ; 'p'; this call _ZN7lunasvg15SVGURIReferenceC2EPNS_10SVGElementE; lunasvg::SVGURIReference::SVGURIReference(lunasvg::SVGElement *) jmp short $+2 loc_350E6: mov rdi, [rbp+var_30] lea rax, off_C33E0 mov [rdi], rax add rdi, 0A0h mov [rbp+var_38], rdi mov esi, 19h call _ZN7lunasvg12SVGTransformC2ENS_10PropertyIDE; lunasvg::SVGTransform::SVGTransform(lunasvg::PropertyID) jmp short $+2 loc_3510B: mov rdi, [rbp+var_30] add rdi, 0C8h mov [rbp+var_40], rdi mov esi, 1Ah mov edx, 1 call _ZN7lunasvg14SVGEnumerationINS_5UnitsEEC2ENS_10PropertyIDES1_; lunasvg::SVGEnumeration<lunasvg::Units>::SVGEnumeration(lunasvg::PropertyID,lunasvg::Units) jmp short $+2 loc_3512B: mov rdi, [rbp+var_30] add rdi, 0D8h mov [rbp+var_48], rdi mov esi, 38h ; '8' xor edx, edx call _ZN7lunasvg14SVGEnumerationINS_12SpreadMethodEEC2ENS_10PropertyIDES1_; lunasvg::SVGEnumeration<lunasvg::SpreadMethod>::SVGEnumeration(lunasvg::PropertyID,lunasvg::SpreadMethod) jmp short $+2 loc_35148: mov rdi, [rbp+var_30]; this mov rsi, rdi add rsi, 0A0h; lunasvg::SVGProperty * call _ZN7lunasvg10SVGElement11addPropertyERNS_11SVGPropertyE; lunasvg::SVGElement::addProperty(lunasvg::SVGProperty &) jmp short $+2 loc_3515D: mov rdi, [rbp+var_30]; this mov rsi, rdi add rsi, 0C8h; lunasvg::SVGProperty * call _ZN7lunasvg10SVGElement11addPropertyERNS_11SVGPropertyE; lunasvg::SVGElement::addProperty(lunasvg::SVGProperty &) jmp short $+2 loc_35172: mov rdi, [rbp+var_30]; this mov rsi, rdi add rsi, 0D8h; lunasvg::SVGProperty * call _ZN7lunasvg10SVGElement11addPropertyERNS_11SVGPropertyE; lunasvg::SVGElement::addProperty(lunasvg::SVGProperty &) jmp short $+2 loc_35187: add rsp, 50h pop rbp retn mov rcx, rax mov eax, edx mov [rbp+var_20], rcx mov [rbp+var_24], eax jmp short loc_351F9 mov rcx, rax mov eax, edx mov [rbp+var_20], rcx mov [rbp+var_24], eax jmp short loc_351EC mov rcx, rax mov eax, edx mov [rbp+var_20], rcx mov [rbp+var_24], eax jmp short loc_351E3 mov rcx, rax mov eax, edx mov [rbp+var_20], rcx mov [rbp+var_24], eax jmp short loc_351DA mov rdi, [rbp+var_48] mov rcx, rax mov eax, edx mov [rbp+var_20], rcx mov [rbp+var_24], eax call _ZN7lunasvg14SVGEnumerationINS_12SpreadMethodEED2Ev; lunasvg::SVGEnumeration<lunasvg::SpreadMethod>::~SVGEnumeration() loc_351DA: mov rdi, [rbp+var_40] call _ZN7lunasvg14SVGEnumerationINS_5UnitsEED2Ev; lunasvg::SVGEnumeration<lunasvg::Units>::~SVGEnumeration() loc_351E3: mov rdi, [rbp+var_38]; this call _ZN7lunasvg12SVGTransformD2Ev; lunasvg::SVGTransform::~SVGTransform() loc_351EC: mov rdi, [rbp+var_30] add rdi, 70h ; 'p'; this call _ZN7lunasvg15SVGURIReferenceD2Ev; lunasvg::SVGURIReference::~SVGURIReference() loc_351F9: mov rdi, [rbp+var_30]; this call _ZN7lunasvg15SVGPaintElementD2Ev; lunasvg::SVGPaintElement::~SVGPaintElement() mov rdi, [rbp+var_20] call __Unwind_Resume
long long lunasvg::SVGGradientElement::SVGGradientElement(_QWORD *a1, lunasvg::Document *a2, char a3) { lunasvg::SVGPaintElement::SVGPaintElement(a1, a2, a3); *a1 = &off_C33E0; lunasvg::SVGURIReference::SVGURIReference((lunasvg::SVGURIReference *)(a1 + 14), (lunasvg::SVGElement *)a1); *a1 = &off_C33E0; lunasvg::SVGTransform::SVGTransform(a1 + 20, 0x19u); lunasvg::SVGEnumeration<lunasvg::Units>::SVGEnumeration((long long)(a1 + 25), 0x1Au, 1); lunasvg::SVGEnumeration<lunasvg::SpreadMethod>::SVGEnumeration(a1 + 27, 56LL, 0LL); lunasvg::SVGElement::addProperty((lunasvg::SVGElement *)a1, (lunasvg::SVGProperty *)(a1 + 20)); lunasvg::SVGElement::addProperty((lunasvg::SVGElement *)a1, (lunasvg::SVGProperty *)(a1 + 25)); return lunasvg::SVGElement::addProperty((lunasvg::SVGElement *)a1, (lunasvg::SVGProperty *)(a1 + 27)); }
SVGGradientElement: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV AL,DL MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV byte ptr [RBP + -0x11],AL MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x30],RDI MOV RSI,qword ptr [RBP + -0x10] MOVZX EDX,byte ptr [RBP + -0x11] CALL 0x00134e80 MOV RSI,qword ptr [RBP + -0x30] LEA RAX,[0x1c33e0] MOV qword ptr [RSI],RAX MOV RDI,RSI ADD RDI,0x70 LAB_001350df: CALL 0x0011a300 JMP 0x001350e6 LAB_001350e6: MOV RDI,qword ptr [RBP + -0x30] LEA RAX,[0x1c33e0] MOV qword ptr [RDI],RAX ADD RDI,0xa0 MOV qword ptr [RBP + -0x38],RDI LAB_001350ff: MOV ESI,0x19 CALL 0x00120800 JMP 0x0013510b LAB_0013510b: MOV RDI,qword ptr [RBP + -0x30] ADD RDI,0xc8 MOV qword ptr [RBP + -0x40],RDI LAB_0013511a: MOV ESI,0x1a MOV EDX,0x1 CALL 0x00121580 JMP 0x0013512b LAB_0013512b: MOV RDI,qword ptr [RBP + -0x30] ADD RDI,0xd8 MOV qword ptr [RBP + -0x48],RDI LAB_0013513a: MOV ESI,0x38 XOR EDX,EDX CALL 0x00137560 JMP 0x00135148 LAB_00135148: MOV RDI,qword ptr [RBP + -0x30] MOV RSI,RDI ADD RSI,0xa0 LAB_00135156: CALL 0x00119a70 JMP 0x0013515d LAB_0013515d: MOV RDI,qword ptr [RBP + -0x30] MOV RSI,RDI ADD RSI,0xc8 CALL 0x00119a70 JMP 0x00135172 LAB_00135172: MOV RDI,qword ptr [RBP + -0x30] MOV RSI,RDI ADD RSI,0xd8 CALL 0x00119a70 LAB_00135185: JMP 0x00135187 LAB_00135187: ADD RSP,0x50 POP RBP RET
/* lunasvg::SVGGradientElement::SVGGradientElement(lunasvg::Document*, lunasvg::ElementID) */ void __thiscall lunasvg::SVGGradientElement::SVGGradientElement (SVGGradientElement *this,int8 param_1,int1 param_3) { SVGPaintElement::SVGPaintElement((SVGPaintElement *)this,param_1,param_3); *(int ***)this = &PTR__SVGGradientElement_001c33e0; /* try { // try from 001350df to 001350e3 has its CatchHandler @ 0013518d */ SVGURIReference::SVGURIReference((SVGURIReference *)(this + 0x70),(SVGElement *)this); *(int ***)this = &PTR__SVGGradientElement_001c33e0; /* try { // try from 001350ff to 00135108 has its CatchHandler @ 0013519b */ SVGTransform::SVGTransform((SVGTransform *)(this + 0xa0),0x19); /* try { // try from 0013511a to 00135128 has its CatchHandler @ 001351a9 */ SVGEnumeration<lunasvg::Units>::SVGEnumeration ((SVGEnumeration<lunasvg::Units> *)(this + 200),0x1a,1); /* try { // try from 0013513a to 00135145 has its CatchHandler @ 001351b7 */ SVGEnumeration<lunasvg::SpreadMethod>::SVGEnumeration ((SVGEnumeration<lunasvg::SpreadMethod> *)(this + 0xd8),0x38,0); /* try { // try from 00135156 to 00135184 has its CatchHandler @ 001351c5 */ SVGElement::addProperty((SVGElement *)this,(SVGProperty *)(this + 0xa0)); SVGElement::addProperty((SVGElement *)this,(SVGProperty *)(this + 200)); SVGElement::addProperty((SVGElement *)this,(SVGProperty *)(this + 0xd8)); return; }
16,693
lunasvg::SVGGradientElement::SVGGradientElement(lunasvg::Document*, lunasvg::ElementID)
dmazzella[P]pylunasvg/lunasvg/source/svgpaintelement.cpp
SVGGradientElement::SVGGradientElement(Document* document, ElementID id) : SVGPaintElement(document, id) , SVGURIReference(this) , m_gradientTransform(PropertyID::GradientTransform) , m_gradientUnits(PropertyID::GradientUnits, Units::ObjectBoundingBox) , m_spreadMethod(PropertyID::SpreadMethod, SpreadMethod::Pad) { addProperty(m_gradientTransform); addProperty(m_gradientUnits); addProperty(m_spreadMethod); }
O1
cpp
lunasvg::SVGGradientElement::SVGGradientElement(lunasvg::Document*, lunasvg::ElementID): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx callq 0xf142 leaq 0x42a6d(%rip), %r14 # 0x5a3c0 movq %r14, (%rbx) leaq 0x70(%rbx), %rdi movq %rbx, %rsi callq 0x101a8 movq %r14, (%rbx) leaq 0xa0(%rbx), %r14 movq %r14, %rdi movl $0x19, %esi callq 0x1f3bc leaq 0x436d0(%rip), %rax # 0x5b050 addq $0x10, %rax movq %rax, 0xa0(%rbx) leaq 0xac(%rbx), %rdi callq 0xc8ec leaq 0xc8(%rbx), %r15 movq %r15, %rdi movl $0x1a, %esi callq 0x1f3bc leaq 0x419ce(%rip), %rax # 0x59380 movq %rax, 0xc8(%rbx) movb $0x1, 0xd1(%rbx) leaq 0xd8(%rbx), %r12 movq %r12, %rdi movl $0x38, %esi callq 0x1f3bc leaq 0x42add(%rip), %rax # 0x5a4b8 movq %rax, 0xd8(%rbx) movb $0x0, 0xe1(%rbx) movq %rbx, %rdi movq %r14, %rsi callq 0xfbfe movq %rbx, %rdi movq %r15, %rsi callq 0xfbfe movq %rbx, %rdi movq %r12, %rsi callq 0xfbfe addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq jmp 0x17a21 jmp 0x17a21 movq %rax, %r14 jmp 0x17a42 jmp 0x17a21 movq %rax, %r14 movq 0x80(%rbx), %rdi leaq 0x90(%rbx), %rax cmpq %rax, %rdi je 0x17a42 movq (%rax), %rsi incq %rsi callq 0xa320 movq %rbx, %rdi callq 0xc5b2 movq %r14, %rdi callq 0xa5c0
_ZN7lunasvg18SVGGradientElementC2EPNS_8DocumentENS_9ElementIDE: push r15 push r14 push r12 push rbx push rax mov rbx, rdi call _ZN7lunasvg10SVGElementC2EPNS_8DocumentENS_9ElementIDE; lunasvg::SVGElement::SVGElement(lunasvg::Document *,lunasvg::ElementID) lea r14, off_5A3C0 mov [rbx], r14 lea rdi, [rbx+70h]; this mov rsi, rbx; lunasvg::SVGElement * call _ZN7lunasvg15SVGURIReferenceC2EPNS_10SVGElementE; lunasvg::SVGURIReference::SVGURIReference(lunasvg::SVGElement *) mov [rbx], r14 lea r14, [rbx+0A0h] mov rdi, r14 mov esi, 19h call _ZN7lunasvg11SVGPropertyC2ENS_10PropertyIDE; lunasvg::SVGProperty::SVGProperty(lunasvg::PropertyID) lea rax, _ZTVN7lunasvg12SVGTransformE; `vtable for'lunasvg::SVGTransform add rax, 10h mov [rbx+0A0h], rax lea rdi, [rbx+0ACh]; this call _ZN7lunasvg9TransformC2Ev; lunasvg::Transform::Transform(void) lea r15, [rbx+0C8h] mov rdi, r15 mov esi, 1Ah call _ZN7lunasvg11SVGPropertyC2ENS_10PropertyIDE; lunasvg::SVGProperty::SVGProperty(lunasvg::PropertyID) lea rax, off_59380 mov [rbx+0C8h], rax mov byte ptr [rbx+0D1h], 1 lea r12, [rbx+0D8h] mov rdi, r12 mov esi, 38h ; '8' call _ZN7lunasvg11SVGPropertyC2ENS_10PropertyIDE; lunasvg::SVGProperty::SVGProperty(lunasvg::PropertyID) lea rax, off_5A4B8 mov [rbx+0D8h], rax mov byte ptr [rbx+0E1h], 0 mov rdi, rbx; this mov rsi, r14; lunasvg::SVGProperty * call _ZN7lunasvg10SVGElement11addPropertyERNS_11SVGPropertyE; lunasvg::SVGElement::addProperty(lunasvg::SVGProperty &) mov rdi, rbx; this mov rsi, r15; lunasvg::SVGProperty * call _ZN7lunasvg10SVGElement11addPropertyERNS_11SVGPropertyE; lunasvg::SVGElement::addProperty(lunasvg::SVGProperty &) mov rdi, rbx; this mov rsi, r12; lunasvg::SVGProperty * call _ZN7lunasvg10SVGElement11addPropertyERNS_11SVGPropertyE; lunasvg::SVGElement::addProperty(lunasvg::SVGProperty &) add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn jmp short loc_17A21 jmp short loc_17A21 mov r14, rax jmp short loc_17A42 jmp short $+2 loc_17A21: mov r14, rax mov rdi, [rbx+80h]; void * lea rax, [rbx+90h] cmp rdi, rax jz short loc_17A42 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_17A42: mov rdi, rbx; this call _ZN7lunasvg10SVGElementD2Ev; lunasvg::SVGElement::~SVGElement() mov rdi, r14 call __Unwind_Resume
_QWORD * lunasvg::SVGGradientElement::SVGGradientElement(lunasvg::SVGElement *a1, long long a2, char a3) { lunasvg::SVGElement::SVGElement((long long)a1, a2, a3); *(_QWORD *)a1 = &off_5A3C0; lunasvg::SVGURIReference::SVGURIReference((lunasvg::SVGElement *)((char *)a1 + 112), a1); *(_QWORD *)a1 = &off_5A3C0; lunasvg::SVGProperty::SVGProperty((char *)a1 + 160, 25LL); *((_QWORD *)a1 + 20) = &`vtable for'lunasvg::SVGTransform + 2; lunasvg::Transform::Transform((lunasvg::SVGElement *)((char *)a1 + 172)); lunasvg::SVGProperty::SVGProperty((char *)a1 + 200, 26LL); *((_QWORD *)a1 + 25) = &off_59380; *((_BYTE *)a1 + 209) = 1; lunasvg::SVGProperty::SVGProperty((char *)a1 + 216, 56LL); *((_QWORD *)a1 + 27) = &off_5A4B8; *((_BYTE *)a1 + 225) = 0; lunasvg::SVGElement::addProperty(a1, (lunasvg::SVGElement *)((char *)a1 + 160)); lunasvg::SVGElement::addProperty(a1, (lunasvg::SVGElement *)((char *)a1 + 200)); return lunasvg::SVGElement::addProperty(a1, (lunasvg::SVGElement *)((char *)a1 + 216)); }
SVGGradientElement: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI CALL 0x0010f142 LEA R14,[0x15a3c0] MOV qword ptr [RBX],R14 LEA RDI,[RBX + 0x70] LAB_0011795a: MOV RSI,RBX CALL 0x001101a8 MOV qword ptr [RBX],R14 LEA R14,[RBX + 0xa0] LAB_0011796c: MOV RDI,R14 MOV ESI,0x19 CALL 0x0011f3bc LEA RAX,[0x15b050] ADD RAX,0x10 MOV qword ptr [RBX + 0xa0],RAX LEA RDI,[RBX + 0xac] CALL 0x0010c8ec LEA R15,[RBX + 0xc8] LAB_0011799e: MOV RDI,R15 MOV ESI,0x1a CALL 0x0011f3bc LEA RAX,[0x159380] MOV qword ptr [RBX + 0xc8],RAX MOV byte ptr [RBX + 0xd1],0x1 LEA R12,[RBX + 0xd8] LAB_001179c7: MOV RDI,R12 MOV ESI,0x38 CALL 0x0011f3bc LEA RAX,[0x15a4b8] MOV qword ptr [RBX + 0xd8],RAX MOV byte ptr [RBX + 0xe1],0x0 LAB_001179e9: MOV RDI,RBX MOV RSI,R14 CALL 0x0010fbfe MOV RDI,RBX MOV RSI,R15 CALL 0x0010fbfe MOV RDI,RBX MOV RSI,R12 CALL 0x0010fbfe LAB_00117a0a: ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* lunasvg::SVGGradientElement::SVGGradientElement(lunasvg::Document*, lunasvg::ElementID) */ void __thiscall lunasvg::SVGGradientElement::SVGGradientElement(SVGGradientElement *this) { SVGElement::SVGElement(); *(int ***)this = &PTR__SVGGradientElement_0015a3c0; /* try { // try from 0011795a to 00117961 has its CatchHandler @ 00117a1a */ SVGURIReference::SVGURIReference((SVGURIReference *)(this + 0x70),(SVGElement *)this); *(int ***)this = &PTR__SVGGradientElement_0015a3c0; /* try { // try from 0011796c to 00117996 has its CatchHandler @ 00117a1f */ SVGProperty::SVGProperty((SVGProperty *)(this + 0xa0),0x19); *(int ***)(this + 0xa0) = &PTR__SVGProperty_0015b060; Transform::Transform((Transform *)(this + 0xac)); /* try { // try from 0011799e to 001179aa has its CatchHandler @ 00117a18 */ SVGProperty::SVGProperty((SVGProperty *)(this + 200),0x1a); *(int ***)(this + 200) = &PTR__SVGProperty_00159380; this[0xd1] = (SVGGradientElement)0x1; /* try { // try from 001179c7 to 001179d3 has its CatchHandler @ 00117a16 */ SVGProperty::SVGProperty((SVGProperty *)(this + 0xd8),0x38); *(int ***)(this + 0xd8) = &PTR__SVGProperty_0015a4b8; this[0xe1] = (SVGGradientElement)0x0; /* try { // try from 001179e9 to 00117a09 has its CatchHandler @ 00117a21 */ SVGElement::addProperty((SVGElement *)this,(SVGProperty *)(this + 0xa0)); SVGElement::addProperty((SVGElement *)this,(SVGProperty *)(this + 200)); SVGElement::addProperty((SVGElement *)this,(SVGProperty *)(this + 0xd8)); return; }
16,694
pick_next
eloqsql/storage/myisam/rt_split.c
static void pick_next(SplitStruct *node, int n_entries, double *g1, double *g2, SplitStruct **choice, int *n_group, int n_dim) { SplitStruct *cur = node; SplitStruct *end = node + n_entries; double max_diff = -DBL_MAX; for (; cur<end; ++cur) { double diff; double abs_diff; if (cur->n_node) { continue; } diff = mbr_join_square(g1, cur->coords, n_dim) - mbr_join_square(g2, cur->coords, n_dim); abs_diff = fabs(diff); if (abs_diff > max_diff) { max_diff = abs_diff; *n_group = 1 + (diff > 0); *choice = cur; } } }
O0
c
pick_next: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movl 0x10(%rbp), %eax movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x8(%rbp), %rax movslq -0xc(%rbp), %rcx shlq $0x5, %rcx addq %rcx, %rax movq %rax, -0x40(%rbp) movsd 0x82393(%rip), %xmm0 # 0x157b08 movsd %xmm0, -0x48(%rbp) movq -0x38(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0xd583b movq -0x38(%rbp), %rax cmpl $0x0, 0x8(%rax) je 0xd5797 jmp 0xd582a movq -0x18(%rbp), %rdi movq -0x38(%rbp), %rax movq 0x18(%rax), %rsi movl 0x10(%rbp), %edx callq 0xd58f0 movsd %xmm0, -0x60(%rbp) movq -0x20(%rbp), %rdi movq -0x38(%rbp), %rax movq 0x18(%rax), %rsi movl 0x10(%rbp), %edx callq 0xd58f0 movaps %xmm0, %xmm1 movsd -0x60(%rbp), %xmm0 subsd %xmm1, %xmm0 movsd %xmm0, -0x50(%rbp) movsd -0x50(%rbp), %xmm0 movaps 0x8274f(%rip), %xmm1 # 0x157f30 pand %xmm1, %xmm0 movsd %xmm0, -0x58(%rbp) movsd -0x58(%rbp), %xmm0 ucomisd -0x48(%rbp), %xmm0 jbe 0xd5828 movsd -0x58(%rbp), %xmm0 movsd %xmm0, -0x48(%rbp) movsd -0x50(%rbp), %xmm0 xorps %xmm1, %xmm1 ucomisd %xmm1, %xmm0 seta %al andb $0x1, %al movzbl %al, %ecx addl $0x1, %ecx movq -0x30(%rbp), %rax movl %ecx, (%rax) movq -0x38(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) jmp 0xd582a movq -0x38(%rbp), %rax addq $0x20, %rax movq %rax, -0x38(%rbp) jmp 0xd577a addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
pick_next_0: push rbp mov rbp, rsp sub rsp, 60h mov eax, [rbp+arg_0] mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov rax, [rbp+var_8] mov [rbp+var_38], rax mov rax, [rbp+var_8] movsxd rcx, [rbp+var_C] shl rcx, 5 add rax, rcx mov [rbp+var_40], rax movsd xmm0, cs:qword_157B08 movsd [rbp+var_48], xmm0 loc_D577A: mov rax, [rbp+var_38] cmp rax, [rbp+var_40] jnb loc_D583B mov rax, [rbp+var_38] cmp dword ptr [rax+8], 0 jz short loc_D5797 jmp loc_D582A loc_D5797: mov rdi, [rbp+var_18] mov rax, [rbp+var_38] mov rsi, [rax+18h] mov edx, [rbp+arg_0] call mbr_join_square_0 movsd [rbp+var_60], xmm0 mov rdi, [rbp+var_20] mov rax, [rbp+var_38] mov rsi, [rax+18h] mov edx, [rbp+arg_0] call mbr_join_square_0 movaps xmm1, xmm0 movsd xmm0, [rbp+var_60] subsd xmm0, xmm1 movsd [rbp+var_50], xmm0 movsd xmm0, [rbp+var_50] movaps xmm1, cs:xmmword_157F30 pand xmm0, xmm1 movsd [rbp+var_58], xmm0 movsd xmm0, [rbp+var_58] ucomisd xmm0, [rbp+var_48] jbe short loc_D5828 movsd xmm0, [rbp+var_58] movsd [rbp+var_48], xmm0 movsd xmm0, [rbp+var_50] xorps xmm1, xmm1 ucomisd xmm0, xmm1 setnbe al and al, 1 movzx ecx, al add ecx, 1 mov rax, [rbp+var_30] mov [rax], ecx mov rcx, [rbp+var_38] mov rax, [rbp+var_28] mov [rax], rcx loc_D5828: jmp short $+2 loc_D582A: mov rax, [rbp+var_38] add rax, 20h ; ' ' mov [rbp+var_38], rax jmp loc_D577A loc_D583B: add rsp, 60h pop rbp retn
unsigned long long pick_next_0( unsigned long long a1, int a2, long long a3, long long a4, unsigned long long *a5, _DWORD *a6, unsigned int a7) { unsigned long long result; // rax double v8; // [rsp+0h] [rbp-60h] double v9; // [rsp+8h] [rbp-58h] double v10; // [rsp+10h] [rbp-50h] double v11; // [rsp+18h] [rbp-48h] unsigned long long v12; // [rsp+28h] [rbp-38h] v12 = a1; v11 = -1.797693134862316e308; while ( 1 ) { result = v12; if ( v12 >= 32LL * a2 + a1 ) break; if ( !*(_DWORD *)(v12 + 8) ) { v8 = mbr_join_square_0(a3, *(_QWORD *)(v12 + 24), a7); v10 = v8 - mbr_join_square_0(a4, *(_QWORD *)(v12 + 24), a7); v9 = *(double *)_mm_and_si128((__m128i)*(unsigned long long *)&v10, (__m128i)xmmword_157F30).m128i_i64; if ( v9 > v11 ) { v11 = v9; *a6 = (v10 > 0.0) + 1; *a5 = v12; } } v12 += 32LL; } return result; }
pick_next: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV EAX,dword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0xc] SHL RCX,0x5 ADD RAX,RCX MOV qword ptr [RBP + -0x40],RAX MOVSD XMM0,qword ptr [0x00257b08] MOVSD qword ptr [RBP + -0x48],XMM0 LAB_001d577a: MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x40] JNC 0x001d583b MOV RAX,qword ptr [RBP + -0x38] CMP dword ptr [RAX + 0x8],0x0 JZ 0x001d5797 JMP 0x001d582a LAB_001d5797: MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RAX + 0x18] MOV EDX,dword ptr [RBP + 0x10] CALL 0x001d58f0 MOVSD qword ptr [RBP + -0x60],XMM0 MOV RDI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RAX + 0x18] MOV EDX,dword ptr [RBP + 0x10] CALL 0x001d58f0 MOVAPS XMM1,XMM0 MOVSD XMM0,qword ptr [RBP + -0x60] SUBSD XMM0,XMM1 MOVSD qword ptr [RBP + -0x50],XMM0 MOVSD XMM0,qword ptr [RBP + -0x50] MOVAPS XMM1,xmmword ptr [0x00257f30] PAND XMM0,XMM1 MOVSD qword ptr [RBP + -0x58],XMM0 MOVSD XMM0,qword ptr [RBP + -0x58] UCOMISD XMM0,qword ptr [RBP + -0x48] JBE 0x001d5828 MOVSD XMM0,qword ptr [RBP + -0x58] MOVSD qword ptr [RBP + -0x48],XMM0 MOVSD XMM0,qword ptr [RBP + -0x50] XORPS XMM1,XMM1 UCOMISD XMM0,XMM1 SETA AL AND AL,0x1 MOVZX ECX,AL ADD ECX,0x1 MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX],ECX MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX LAB_001d5828: JMP 0x001d582a LAB_001d582a: MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x20 MOV qword ptr [RBP + -0x38],RAX JMP 0x001d577a LAB_001d583b: ADD RSP,0x60 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void pick_next(ulong param_1,int param_2,int8 param_3,int8 param_4,ulong *param_5, int *param_6,int4 param_7) { double dVar1; double dVar2; int4 local_58; int4 uStack_54; int8 local_50; int8 local_40; local_50 = DAT_00257b08; for (local_40 = param_1; local_40 < param_1 + (long)param_2 * 0x20; local_40 = local_40 + 0x20) { if (*(int *)(local_40 + 8) == 0) { dVar1 = (double)mbr_join_square(param_3,*(int8 *)(local_40 + 0x18),param_7); dVar2 = (double)mbr_join_square(param_4,*(int8 *)(local_40 + 0x18),param_7); dVar1 = dVar1 - dVar2; local_58 = SUB84(dVar1,0); uStack_54 = (uint)((ulong)dVar1 >> 0x20); if (local_50 < (double)CONCAT44(uStack_54 & _UNK_00257f34,local_58 & _DAT_00257f30)) { local_50 = (double)CONCAT44(uStack_54 & _UNK_00257f34,local_58 & _DAT_00257f30); *param_6 = (0.0 < dVar1) + 1; *param_5 = local_40; } } } return; }
16,695
my_coll_lexem_print_error
eloqsql/strings/ctype-uca.c
static void my_coll_lexem_print_error(MY_COLL_LEXEM *lexem, char *errstr, size_t errsize, const char *txt) { char tail[30]; size_t len= lexem->end - lexem->prev; strmake (tail, lexem->prev, (size_t) MY_MIN(len, sizeof(tail)-1)); errstr[errsize-1]= '\0'; my_snprintf(errstr, errsize - 1, "%s at '%s'", txt[0] ? txt : "Syntax error", tail); }
O0
c
my_coll_lexem_print_error: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x38(%rbp) movq %rsi, -0x40(%rbp) movq %rdx, -0x48(%rbp) movq %rcx, -0x50(%rbp) movq -0x38(%rbp), %rax movq 0x10(%rax), %rax movq -0x38(%rbp), %rcx movq 0x18(%rcx), %rcx subq %rcx, %rax movq %rax, -0x58(%rbp) leaq -0x30(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x38(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x60(%rbp) cmpq $0x1d, -0x58(%rbp) jae 0x5a324 movq -0x58(%rbp), %rax movq %rax, -0x70(%rbp) jmp 0x5a32f movl $0x1d, %eax movq %rax, -0x70(%rbp) jmp 0x5a32f movq -0x60(%rbp), %rsi movq -0x68(%rbp), %rdi movq -0x70(%rbp), %rdx callq 0x82b50 movq -0x40(%rbp), %rax movq -0x48(%rbp), %rcx subq $0x1, %rcx movb $0x0, (%rax,%rcx) movq -0x40(%rbp), %rax movq %rax, -0x80(%rbp) movq -0x48(%rbp), %rax subq $0x1, %rax movq %rax, -0x78(%rbp) movq -0x50(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax je 0x5a37d movq -0x50(%rbp), %rax movq %rax, -0x88(%rbp) jmp 0x5a38d leaq 0x2db0f(%rip), %rax # 0x87e93 movq %rax, -0x88(%rbp) jmp 0x5a38d movq -0x78(%rbp), %rsi movq -0x80(%rbp), %rdi movq -0x88(%rbp), %rcx leaq 0x2dae5(%rip), %rdx # 0x87e88 xorl %eax, %eax leaq -0x30(%rbp), %r8 callq 0x82020 movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x5a3c9 addq $0x90, %rsp popq %rbp retq callq 0x242c0 nop
my_coll_lexem_print_error: push rbp mov rbp, rsp sub rsp, 90h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_38], rdi mov [rbp+var_40], rsi mov [rbp+var_48], rdx mov [rbp+var_50], rcx mov rax, [rbp+var_38] mov rax, [rax+10h] mov rcx, [rbp+var_38] mov rcx, [rcx+18h] sub rax, rcx mov [rbp+var_58], rax lea rax, [rbp+var_30] mov [rbp+var_68], rax mov rax, [rbp+var_38] mov rax, [rax+18h] mov [rbp+var_60], rax cmp [rbp+var_58], 1Dh jnb short loc_5A324 mov rax, [rbp+var_58] mov [rbp+var_70], rax jmp short loc_5A32F loc_5A324: mov eax, 1Dh mov [rbp+var_70], rax jmp short $+2 loc_5A32F: mov rsi, [rbp+var_60] mov rdi, [rbp+var_68] mov rdx, [rbp+var_70] call strmake mov rax, [rbp+var_40] mov rcx, [rbp+var_48] sub rcx, 1 mov byte ptr [rax+rcx], 0 mov rax, [rbp+var_40] mov [rbp+var_80], rax mov rax, [rbp+var_48] sub rax, 1 mov [rbp+var_78], rax mov rax, [rbp+var_50] movsx eax, byte ptr [rax] cmp eax, 0 jz short loc_5A37D mov rax, [rbp+var_50] mov [rbp+var_88], rax jmp short loc_5A38D loc_5A37D: lea rax, aSyntaxError; "Syntax error" mov [rbp+var_88], rax jmp short $+2 loc_5A38D: mov rsi, [rbp+var_78] mov rdi, [rbp+var_80] mov rcx, [rbp+var_88] lea rdx, aSAtS; "%s at '%s'" xor eax, eax lea r8, [rbp+var_30] call my_snprintf mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_5A3C9 add rsp, 90h pop rbp retn loc_5A3C9: call ___stack_chk_fail
unsigned long long my_coll_lexem_print_error(long long a1, long long a2, long long a3, _BYTE *a4) { int v4; // r9d int v6; // [rsp+18h] [rbp-78h] long long v7; // [rsp+30h] [rbp-60h] unsigned long long v8; // [rsp+38h] [rbp-58h] _BYTE v11[40]; // [rsp+60h] [rbp-30h] BYREF unsigned long long v12; // [rsp+88h] [rbp-8h] v12 = __readfsqword(0x28u); v8 = *(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 24); v7 = *(_QWORD *)(a1 + 24); if ( v8 >= 0x1D ) strmake(v11, v7, 29LL); else strmake(v11, v7, v8); *(_BYTE *)(a2 + a3 - 1) = 0; v6 = a3 - 1; if ( *a4 ) my_snprintf(a2, v6, (unsigned int)"%s at '%s'", (_DWORD)a4, (unsigned int)v11, v4); else my_snprintf(a2, v6, (unsigned int)"%s at '%s'", (unsigned int)"Syntax error", (unsigned int)v11, v4); return __readfsqword(0x28u); }
my_coll_lexem_print_error: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x38],RDI MOV qword ptr [RBP + -0x40],RSI MOV qword ptr [RBP + -0x48],RDX MOV qword ptr [RBP + -0x50],RCX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RCX + 0x18] SUB RAX,RCX MOV qword ptr [RBP + -0x58],RAX LEA RAX,[RBP + -0x30] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x60],RAX CMP qword ptr [RBP + -0x58],0x1d JNC 0x0015a324 MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x70],RAX JMP 0x0015a32f LAB_0015a324: MOV EAX,0x1d MOV qword ptr [RBP + -0x70],RAX JMP 0x0015a32f LAB_0015a32f: MOV RSI,qword ptr [RBP + -0x60] MOV RDI,qword ptr [RBP + -0x68] MOV RDX,qword ptr [RBP + -0x70] CALL 0x00182b50 MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x48] SUB RCX,0x1 MOV byte ptr [RAX + RCX*0x1],0x0 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x48] SUB RAX,0x1 MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x50] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JZ 0x0015a37d MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x88],RAX JMP 0x0015a38d LAB_0015a37d: LEA RAX,[0x187e93] MOV qword ptr [RBP + -0x88],RAX JMP 0x0015a38d LAB_0015a38d: MOV RSI,qword ptr [RBP + -0x78] MOV RDI,qword ptr [RBP + -0x80] MOV RCX,qword ptr [RBP + -0x88] LEA RDX,[0x187e88] XOR EAX,EAX LEA R8,[RBP + -0x30] CALL 0x00182020 MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0015a3c9 ADD RSP,0x90 POP RBP RET LAB_0015a3c9: CALL 0x001242c0
void my_coll_lexem_print_error(long param_1,long param_2,long param_3,char *param_4) { long in_FS_OFFSET; char *local_90; ulong local_78; int1 local_38 [40]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_78 = *(long *)(param_1 + 0x10) - *(long *)(param_1 + 0x18); if (0x1c < local_78) { local_78 = 0x1d; } strmake(local_38,*(int8 *)(param_1 + 0x18),local_78); *(int1 *)(param_2 + param_3 + -1) = 0; local_90 = param_4; if (*param_4 == '\0') { local_90 = "Syntax error"; } my_snprintf(param_2,param_3 + -1,"%s at \'%s\'",local_90,local_38); if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return; }
16,696
ma_ck_real_write_btree
eloqsql/storage/maria/ma_write.c
my_bool _ma_ck_real_write_btree(MARIA_HA *info, MARIA_KEY *key, my_off_t *root, uint32 comp_flag) { int error; DBUG_ENTER("_ma_ck_real_write_btree"); /* key_length parameter is used only if comp_flag is SEARCH_FIND */ if (*root == HA_OFFSET_ERROR || (error= w_search(info, comp_flag, key, *root, (MARIA_PAGE *) 0, (uchar*) 0, 1)) > 0) error= _ma_enlarge_root(info, key, root); DBUG_RETURN(error != 0); }
O3
c
ma_ck_real_write_btree: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 movq (%rdx), %rax cmpq $-0x1, %rax je 0x64a5d movl $0x1, (%rsp) movq %r15, %rdi movl %ecx, %esi movq %r14, %rdx movq %rax, %rcx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x64a7e testl %eax, %eax jle 0x64a6e movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x64ec8 movzbl %al, %eax testl %eax, %eax setne %al addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
_ma_ck_real_write_btree: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdx mov r14, rsi mov r15, rdi mov rax, [rdx] cmp rax, 0FFFFFFFFFFFFFFFFh jz short loc_64A5D mov [rsp+20h+var_20], 1 mov rdi, r15 mov esi, ecx mov rdx, r14 mov rcx, rax xor r8d, r8d xor r9d, r9d call w_search test eax, eax jle short loc_64A6E loc_64A5D: mov rdi, r15 mov rsi, r14 mov rdx, rbx call _ma_enlarge_root movzx eax, al loc_64A6E: test eax, eax setnz al add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
bool ma_ck_real_write_btree(long long a1, long long a2, _QWORD *a3, int a4) { int v5; // eax if ( *a3 == -1LL || (v5 = w_search(a1, a4, a2, *a3, 0, 0, 1), v5 > 0) ) v5 = (unsigned __int8)ma_enlarge_root(a1, a2, a3); return v5 != 0; }
_ma_ck_real_write_btree: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14,RSI MOV R15,RDI MOV RAX,qword ptr [RDX] CMP RAX,-0x1 JZ 0x00164a5d MOV dword ptr [RSP],0x1 MOV RDI,R15 MOV ESI,ECX MOV RDX,R14 MOV RCX,RAX XOR R8D,R8D XOR R9D,R9D CALL 0x00164a7e TEST EAX,EAX JLE 0x00164a6e LAB_00164a5d: MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX CALL 0x00164ec8 MOVZX EAX,AL LAB_00164a6e: TEST EAX,EAX SETNZ AL ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
bool _ma_ck_real_write_btree(int8 param_1,int8 param_2,long *param_3,int4 param_4) { byte bVar1; uint uVar2; if (*param_3 != -1) { uVar2 = w_search(param_1,param_4,param_2,*param_3,0,0,1); if ((int)uVar2 < 1) goto LAB_00164a6e; } bVar1 = _ma_enlarge_root(param_1,param_2,param_3); uVar2 = (uint)bVar1; LAB_00164a6e: return uVar2 != 0; }
16,697
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::erase<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, 0>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>)
hkr04[P]cpp-mcp/common/json.hpp
IteratorType erase(IteratorType pos) { // make sure iterator fits the current value if (JSON_HEDLEY_UNLIKELY(this != pos.m_object)) { JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value", this)); } IteratorType result = end(); switch (m_data.m_type) { case value_t::boolean: case value_t::number_float: case value_t::number_integer: case value_t::number_unsigned: case value_t::string: case value_t::binary: { if (JSON_HEDLEY_UNLIKELY(!pos.m_it.primitive_iterator.is_begin())) { JSON_THROW(invalid_iterator::create(205, "iterator out of range", this)); } if (is_string()) { AllocatorType<string_t> alloc; std::allocator_traits<decltype(alloc)>::destroy(alloc, m_data.m_value.string); std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_data.m_value.string, 1); m_data.m_value.string = nullptr; } else if (is_binary()) { AllocatorType<binary_t> alloc; std::allocator_traits<decltype(alloc)>::destroy(alloc, m_data.m_value.binary); std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_data.m_value.binary, 1); m_data.m_value.binary = nullptr; } m_data.m_type = value_t::null; assert_invariant(); break; } case value_t::object: { result.m_it.object_iterator = m_data.m_value.object->erase(pos.m_it.object_iterator); break; } case value_t::array: { result.m_it.array_iterator = m_data.m_value.array->erase(pos.m_it.array_iterator); break; } case value_t::null: case value_t::discarded: default: JSON_THROW(type_error::create(307, detail::concat("cannot use erase() with ", type_name()), this)); } return result; }
O1
cpp
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::erase<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, 0>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x30, %rsp movq %rsi, %r14 cmpq %rsi, (%rdx) jne 0x1944b movq %rdx, %r15 movq %rdi, %rbx movq %r14, %rsi callq 0xf97e movzbl (%r14), %eax leal -0x3(%rax), %ecx cmpl $0x6, %ecx jae 0x193c9 cmpq $0x0, 0x18(%r15) jne 0x194ae cmpl $0x8, %eax je 0x193ea cmpl $0x3, %eax jne 0x19420 leaq 0x8(%r14), %r12 movq 0x8(%r14), %rax movq (%rax), %rdi addq $0x10, %rax movl $0x20, %r15d cmpq %rax, %rdi je 0x1940c movq (%rax), %rsi incq %rsi jmp 0x19407 cmpl $0x1, %eax je 0x19434 cmpl $0x2, %eax jne 0x1950e movq 0x8(%r14), %rdi movq 0x10(%r15), %rsi callq 0x1993e movq %rax, 0x10(%rbx) jmp 0x19424 leaq 0x8(%r14), %r12 movq 0x8(%r14), %rax movq (%rax), %rdi movl $0x28, %r15d testq %rdi, %rdi je 0x1940c movq 0x10(%rax), %rsi subq %rdi, %rsi callq 0x5460 movq (%r12), %rdi movq %r15, %rsi callq 0x5460 movq $0x0, (%r12) movb $0x0, (%r14) movq %rbx, %rax addq $0x30, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq 0x8(%r14), %rdi movq 0x8(%r15), %rsi leaq 0x30(%rsi), %rdx callq 0x19644 movq %rax, 0x8(%rbx) jmp 0x19424 movl $0x20, %edi callq 0x5200 movq %rax, %rbx leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x8605(%rip), %rsi # 0x21a6d leaq 0x8621(%rip), %rdx # 0x21a90 leaq 0x8(%rsp), %rdi callq 0x79a2 movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0xca, %esi movq %r14, %rcx callq 0x11f80 xorl %ebp, %ebp leaq 0x1262e(%rip), %rsi # 0x2bac8 leaq -0x103ef(%rip), %rdx # 0x90b2 movq %rbx, %rdi callq 0x5720 jmp 0x1956c movl $0x20, %edi callq 0x5200 movq %rax, %rbx leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x85c6(%rip), %rsi # 0x21a91 leaq 0x85d4(%rip), %rdx # 0x21aa6 leaq 0x8(%rsp), %rdi callq 0x79a2 movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0xcd, %esi movq %r14, %rcx callq 0x11f80 xorl %ebp, %ebp leaq 0x125cb(%rip), %rsi # 0x2bac8 leaq -0x10452(%rip), %rdx # 0x90b2 movq %rbx, %rdi callq 0x5720 jmp 0x1956c movl $0x20, %edi callq 0x5200 movq %rax, %rbx movq %r14, %rdi callq 0x8d88 leaq 0x28(%rsp), %rdx movq %rax, (%rdx) leaq 0x8575(%rip), %rsi # 0x21aa7 leaq 0x8(%rsp), %rdi callq 0x195bc movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0x133, %esi # imm = 0x133 movq %r14, %rcx callq 0x96a0 xorl %ebp, %ebp leaq 0x122db(%rip), %rsi # 0x2b838 leaq -0x104b2(%rip), %rdx # 0x90b2 movq %rbx, %rdi callq 0x5720 movq %rax, %r14 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi jne 0x19592 jmp 0x195a7 jmp 0x195a1 jmp 0x19585 jmp 0x195a1 movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x195a7 movq 0x18(%rsp), %rsi incq %rsi callq 0x5460 jmp 0x195a7 movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0x195b4 movq %rbx, %rdi callq 0x5300 movq %r14, %rdi callq 0x5740
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_: push rbp; int push r15; int push r14; char push r12; int push rbx; __int64 sub rsp, 30h mov r14, rsi cmp [rdx], rsi jnz loc_1944B mov r15, rdx mov rbx, rdi mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE3endEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::end(void) movzx eax, byte ptr [r14] lea ecx, [rax-3] cmp ecx, 6 jnb short loc_193C9 cmp qword ptr [r15+18h], 0 jnz loc_194AE cmp eax, 8 jz short loc_193EA cmp eax, 3 jnz short loc_19420 lea r12, [r14+8] mov rax, [r14+8] mov rdi, [rax] add rax, 10h mov r15d, 20h ; ' ' cmp rdi, rax jz short loc_1940C mov rsi, [rax] inc rsi jmp short loc_19407 loc_193C9: cmp eax, 1 jz short loc_19434 cmp eax, 2 jnz loc_1950E mov rdi, [r14+8] mov rsi, [r15+10h] call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE8_M_eraseEN9__gnu_cxx17__normal_iteratorIPSD_SF_EE; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::_M_erase(__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>*,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>) mov [rbx+10h], rax jmp short loc_19424 loc_193EA: lea r12, [r14+8] mov rax, [r14+8] mov rdi, [rax]; void * mov r15d, 28h ; '(' test rdi, rdi jz short loc_1940C mov rsi, [rax+10h] sub rsi, rdi; unsigned __int64 loc_19407: call __ZdlPvm; operator delete(void *,ulong) loc_1940C: mov rdi, [r12]; void * mov rsi, r15; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) mov qword ptr [r12], 0 loc_19420: mov byte ptr [r14], 0 loc_19424: mov rax, rbx add rsp, 30h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_19434: mov rdi, [r14+8] mov rsi, [r15+8] lea rdx, [rsi+30h] call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEESP_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::erase(__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>*,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>,__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>*,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>) mov [rbx+8], rax jmp short loc_19424 loc_1944B: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r15, [rsp+58h+var_40] mov [r15-10h], r15 lea rsi, aIteratorDoesNo; "iterator does not fit current value" lea rdx, aIteratorDoesNo+23h; "" lea rdi, [rsp+58h+var_50] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov bpl, 1 lea rdx, [rsp+58h+var_50] mov rdi, rbx; this mov esi, 0CAh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp loc_1956C loc_194AE: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r15, [rsp+58h+var_40] mov [r15-10h], r15 lea rsi, aIteratorOutOfR; "iterator out of range" lea rdx, aIteratorOutOfR+15h; "" lea rdi, [rsp+58h+var_50] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov bpl, 1 lea rdx, [rsp+58h+var_50] mov rdi, rbx; this mov esi, 0CDh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_1956C loc_1950E: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+58h+var_30] mov [rdx], rax lea rsi, aCannotUseErase; "cannot use erase() with " lea rdi, [rsp+58h+var_50] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA25_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[25],char const*>(char const(&)[25],char const* &&) mov bpl, 1 lea rdx, [rsp+58h+var_50] mov rdi, rbx; this mov esi, 133h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_1956C: mov r14, rax lea rax, [rsp+58h+var_40] mov rdi, [rax-10h] cmp rdi, rax jnz short loc_19592 jmp short loc_195A7 jmp short loc_195A1 jmp short loc_19585 jmp short loc_195A1 loc_19585: mov r14, rax mov rdi, [rsp+58h+var_50]; void * cmp rdi, r15 jz short loc_195A7 loc_19592: mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_195A7 loc_195A1: mov r14, rax mov bpl, 1 loc_195A7: test bpl, bpl jz short loc_195B4 mov rdi, rbx; void * call ___cxa_free_exception loc_195B4: mov rdi, r14 call __Unwind_Resume
_QWORD * ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_( _QWORD *a1, unsigned __int8 *a2, unsigned __int8 **a3) { int v6; // eax void **v7; // r12 void **v8; // rax _QWORD *v9; // rdi _QWORD *v10; // rax unsigned long long v11; // r15 unsigned long long v12; // rsi long long v13; // rax nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx nlohmann::json_abi_v3_11_3::detail::exception *v16; // rbx nlohmann::json_abi_v3_11_3::detail::exception *v17; // rbx void *v18[2]; // [rsp+8h] [rbp-50h] BYREF _QWORD v19[8]; // [rsp+18h] [rbp-40h] BYREF if ( *a3 != a2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v18[0] = v19; std::string::_M_construct<char const*>(v18, "iterator does not fit current value", (long long)""); ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 202, v18); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::invalid_iterator, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::end( a1, a2); v6 = *a2; if ( (unsigned int)(v6 - 3) < 6 ) { if ( a3[3] ) { v16 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v18[0] = v19; std::string::_M_construct<char const*>(v18, "iterator out of range", (long long)""); ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( v16, 205, v18); __cxa_throw( v16, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::invalid_iterator, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } if ( v6 == 8 ) { v7 = (void **)(a2 + 8); v13 = *((_QWORD *)a2 + 1); v9 = *(_QWORD **)v13; v11 = 40LL; if ( *(_QWORD *)v13 ) { v12 = *(_QWORD *)(v13 + 16) - (_QWORD)v9; goto LABEL_13; } } else { if ( v6 != 3 ) { LABEL_15: *a2 = 0; return a1; } v7 = (void **)(a2 + 8); v8 = (void **)*((_QWORD *)a2 + 1); v9 = *v8; v10 = v8 + 2; v11 = 32LL; if ( v9 != v10 ) { v12 = *v10 + 1LL; LABEL_13: operator delete(v9, v12); } } operator delete(*v7, v11); *v7 = 0LL; goto LABEL_15; } if ( v6 == 1 ) { a1[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>>>>::erase( *((_QWORD *)a2 + 1), a3[1], a3[1] + 48); } else { if ( v6 != 2 ) { v17 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v19[2] = 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(a2); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[25],char const*>( v18, "cannot use erase() with "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( v17, 307, v18); __cxa_throw( v17, (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); } a1[2] = std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::_M_erase( *((_QWORD *)a2 + 1), a3[2]); } return a1; }
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x30 MOV R14,RSI CMP qword ptr [RDX],RSI JNZ 0x0011944b MOV R15,RDX MOV RBX,RDI MOV RSI,R14 CALL 0x0010f97e MOVZX EAX,byte ptr [R14] LEA ECX,[RAX + -0x3] CMP ECX,0x6 JNC 0x001193c9 CMP qword ptr [R15 + 0x18],0x0 JNZ 0x001194ae CMP EAX,0x8 JZ 0x001193ea CMP EAX,0x3 JNZ 0x00119420 LEA R12,[R14 + 0x8] MOV RAX,qword ptr [R14 + 0x8] MOV RDI,qword ptr [RAX] ADD RAX,0x10 MOV R15D,0x20 CMP RDI,RAX JZ 0x0011940c MOV RSI,qword ptr [RAX] INC RSI JMP 0x00119407 LAB_001193c9: CMP EAX,0x1 JZ 0x00119434 CMP EAX,0x2 JNZ 0x0011950e MOV RDI,qword ptr [R14 + 0x8] MOV RSI,qword ptr [R15 + 0x10] CALL 0x0011993e MOV qword ptr [RBX + 0x10],RAX JMP 0x00119424 LAB_001193ea: LEA R12,[R14 + 0x8] MOV RAX,qword ptr [R14 + 0x8] MOV RDI,qword ptr [RAX] MOV R15D,0x28 TEST RDI,RDI JZ 0x0011940c MOV RSI,qword ptr [RAX + 0x10] SUB RSI,RDI LAB_00119407: CALL 0x00105460 LAB_0011940c: MOV RDI,qword ptr [R12] MOV RSI,R15 CALL 0x00105460 MOV qword ptr [R12],0x0 LAB_00119420: MOV byte ptr [R14],0x0 LAB_00119424: MOV RAX,RBX ADD RSP,0x30 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00119434: MOV RDI,qword ptr [R14 + 0x8] MOV RSI,qword ptr [R15 + 0x8] LEA RDX,[RSI + 0x30] CALL 0x00119644 MOV qword ptr [RBX + 0x8],RAX JMP 0x00119424 LAB_0011944b: MOV EDI,0x20 CALL 0x00105200 MOV RBX,RAX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 LAB_00119461: LEA RSI,[0x121a6d] LEA RDX,[0x121a90] LEA RDI,[RSP + 0x8] CALL 0x001079a2 MOV BPL,0x1 LAB_0011947c: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0xca MOV RCX,R14 CALL 0x00111f80 XOR EBP,EBP LEA RSI,[0x12bac8] LEA RDX,[0x1090b2] MOV RDI,RBX CALL 0x00105720 LAB_001194ae: MOV EDI,0x20 CALL 0x00105200 MOV RBX,RAX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 LAB_001194c4: LEA RSI,[0x121a91] LEA RDX,[0x121aa6] LEA RDI,[RSP + 0x8] CALL 0x001079a2 MOV BPL,0x1 LAB_001194df: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0xcd MOV RCX,R14 CALL 0x00111f80 XOR EBP,EBP LEA RSI,[0x12bac8] LEA RDX,[0x1090b2] MOV RDI,RBX CALL 0x00105720 LAB_0011950e: MOV EDI,0x20 CALL 0x00105200 MOV RBX,RAX MOV RDI,R14 CALL 0x00108d88 LEA RDX,[RSP + 0x28] MOV qword ptr [RDX],RAX LAB_0011952b: LEA RSI,[0x121aa7] LEA RDI,[RSP + 0x8] CALL 0x001195bc MOV BPL,0x1 LAB_0011953f: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0x133 MOV RCX,R14 CALL 0x001096a0 XOR EBP,EBP LEA RSI,[0x12b838] LEA RDX,[0x1090b2] MOV RDI,RBX CALL 0x00105720
long _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_ (long param_1, basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *param_2,long *param_3) { basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> bVar1; long *plVar2; int8 uVar3; ulong uVar4; long *plVar5; ulong uVar6; int1 *local_50 [2]; int1 local_40 [16]; char *local_30; if ((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)*param_3 != param_2) { uVar3 = __cxa_allocate_exception(0x20); local_50[0] = local_40; /* try { // try from 00119461 to 00119478 has its CatchHandler @ 001195a1 */ std::__cxx11::string::_M_construct<char_const*> (local_50,"iterator does not fit current value",""); /* try { // try from 0011947c to 001194a8 has its CatchHandler @ 00119585 */ _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar3,0xca,local_50,param_2); /* WARNING: Subroutine does not return */ __cxa_throw(uVar3,&nlohmann::json_abi_v3_11_3::detail::invalid_iterator::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::end(); bVar1 = *param_2; if (5 < (byte)bVar1 - 3) { if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar3 = nlohmann::json_abi_v3_11_3:: ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::erase(*(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> **)(param_2 + 8),param_3[1],param_3[1] + 0x30); *(int8 *)(param_1 + 8) = uVar3; return param_1; } if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2) { uVar3 = std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::_M_erase(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(param_2 + 8),param_3[2]); *(int8 *)(param_1 + 0x10) = uVar3; return param_1; } uVar3 = __cxa_allocate_exception(0x20); local_30 = (char *)nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name(param_2); /* try { // try from 0011952b to 0011953b has its CatchHandler @ 0011957f */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[25],char_const*> ((detail *)local_50,"cannot use erase() with ",&local_30); /* try { // try from 0011953f to 0011956b has its CatchHandler @ 0011956c */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar3,0x133,local_50,param_2); /* WARNING: Subroutine does not return */ __cxa_throw(uVar3,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } if (param_3[3] != 0) { uVar3 = __cxa_allocate_exception(0x20); local_50[0] = local_40; /* try { // try from 001194c4 to 001194db has its CatchHandler @ 00119583 */ std::__cxx11::string::_M_construct<char_const*>(local_50,"iterator out of range",""); /* try { // try from 001194df to 0011950b has its CatchHandler @ 00119581 */ _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar3,0xcd,local_50,param_2); /* WARNING: Subroutine does not return */ __cxa_throw(uVar3,&nlohmann::json_abi_v3_11_3::detail::invalid_iterator::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x8) { plVar5 = (long *)**(long **)(param_2 + 8); uVar6 = 0x28; if (plVar5 != (long *)0x0) { uVar4 = (*(long **)(param_2 + 8))[2] - (long)plVar5; LAB_00119407: operator_delete(plVar5,uVar4); } } else { if (bVar1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x3) goto LAB_00119420; plVar5 = (long *)**(long **)(param_2 + 8); plVar2 = *(long **)(param_2 + 8) + 2; uVar6 = 0x20; if (plVar5 != plVar2) { uVar4 = *plVar2 + 1; goto LAB_00119407; } } operator_delete(*(void **)(param_2 + 8),uVar6); *(int8 *)(param_2 + 8) = 0; LAB_00119420: *param_2 = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0; return param_1; }
16,698
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::erase<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, 0>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>)
hkr04[P]cpp-mcp/common/json.hpp
IteratorType erase(IteratorType pos) { // make sure iterator fits the current value if (JSON_HEDLEY_UNLIKELY(this != pos.m_object)) { JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value", this)); } IteratorType result = end(); switch (m_data.m_type) { case value_t::boolean: case value_t::number_float: case value_t::number_integer: case value_t::number_unsigned: case value_t::string: case value_t::binary: { if (JSON_HEDLEY_UNLIKELY(!pos.m_it.primitive_iterator.is_begin())) { JSON_THROW(invalid_iterator::create(205, "iterator out of range", this)); } if (is_string()) { AllocatorType<string_t> alloc; std::allocator_traits<decltype(alloc)>::destroy(alloc, m_data.m_value.string); std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_data.m_value.string, 1); m_data.m_value.string = nullptr; } else if (is_binary()) { AllocatorType<binary_t> alloc; std::allocator_traits<decltype(alloc)>::destroy(alloc, m_data.m_value.binary); std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_data.m_value.binary, 1); m_data.m_value.binary = nullptr; } m_data.m_type = value_t::null; assert_invariant(); break; } case value_t::object: { result.m_it.object_iterator = m_data.m_value.object->erase(pos.m_it.object_iterator); break; } case value_t::array: { result.m_it.array_iterator = m_data.m_value.array->erase(pos.m_it.array_iterator); break; } case value_t::null: case value_t::discarded: default: JSON_THROW(type_error::create(307, detail::concat("cannot use erase() with ", type_name()), this)); } return result; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::erase<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, 0>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movq %rsi, %r14 cmpq %rsi, (%rdx) jne 0x15ad2 movq %rdx, %r15 movq %rdi, %rbx movq %r14, %rsi callq 0xdb94 movzbl (%r14), %eax leal -0x3(%rax), %ecx cmpl $0x6, %ecx jae 0x15a70 cmpq $0x0, 0x18(%r15) jne 0x15b26 cmpl $0x8, %eax je 0x15a91 cmpl $0x3, %eax jne 0x15aad leaq 0x8(%r14), %r15 movq 0x8(%r14), %rdi callq 0x51d0 pushq $0x20 jmp 0x15aa0 cmpl $0x1, %eax je 0x15abf cmpl $0x2, %eax jne 0x15b77 movq 0x8(%r14), %rdi movq 0x10(%r15), %rsi callq 0x15c0a movq %rax, 0x10(%rbx) jmp 0x15ab1 leaq 0x8(%r14), %r15 movq 0x8(%r14), %rdi callq 0x702c pushq $0x28 popq %rsi movq (%r15), %rdi callq 0x5490 andq $0x0, (%r15) movb $0x0, (%r14) movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq 0x8(%r14), %rdi movq 0x8(%r15), %rsi callq 0x15c00 movq %rax, 0x8(%rbx) jmp 0x15ab1 pushq $0x20 popq %rdi callq 0x5220 movq %rax, %rbx leaq 0x7f75(%rip), %rsi # 0x1da59 leaq 0x8(%rsp), %rdi movq %rsp, %rdx callq 0x62e2 movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0xca, %esi movq %r14, %rcx callq 0xfd54 xorl %ebp, %ebp leaq 0x15fc6(%rip), %rsi # 0x2bad8 leaq -0xd8df(%rip), %rdx # 0x823a movq %rbx, %rdi callq 0x5730 jmp 0x15bd1 pushq $0x20 popq %rdi callq 0x5220 movq %rax, %rbx leaq 0x7f45(%rip), %rsi # 0x1da7d leaq 0x8(%rsp), %rdi movq %rsp, %rdx callq 0x62e2 movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0xcd, %esi movq %r14, %rcx callq 0xfd54 xorl %ebp, %ebp leaq 0x15f72(%rip), %rsi # 0x2bad8 leaq -0xd933(%rip), %rdx # 0x823a movq %rbx, %rdi callq 0x5730 jmp 0x15bd1 pushq $0x20 popq %rdi callq 0x5220 movq %rax, %rbx movq %r14, %rdi callq 0x7c14 movq %rsp, %rdx movq %rax, (%rdx) leaq 0x7efc(%rip), %rsi # 0x1da93 leaq 0x8(%rsp), %rdi callq 0x15c0f movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0x133, %esi # imm = 0x133 movq %r14, %rcx callq 0x87f8 xorl %ebp, %ebp leaq 0x15cae(%rip), %rsi # 0x2b870 leaq -0xd98f(%rip), %rdx # 0x823a movq %rbx, %rdi callq 0x5730 jmp 0x15bd9 jmp 0x15bed jmp 0x15bd9 jmp 0x15bed movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x51d0 testb %bpl, %bpl jne 0x15bf0 jmp 0x15bf8 movq %rax, %r14 movq %rbx, %rdi callq 0x5330 movq %r14, %rdi callq 0x5750
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_: push rbp; char push r15; int push r14; int push rbx; int sub rsp, 28h mov r14, rsi cmp [rdx], rsi jnz loc_15AD2 mov r15, rdx mov rbx, rdi mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE3endEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::end(void) movzx eax, byte ptr [r14] lea ecx, [rax-3] cmp ecx, 6 jnb short loc_15A70 cmp qword ptr [r15+18h], 0 jnz loc_15B26 cmp eax, 8 jz short loc_15A91 cmp eax, 3 jnz short loc_15AAD lea r15, [r14+8] mov rdi, [r14+8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() push 20h ; ' ' jmp short loc_15AA0 loc_15A70: cmp eax, 1 jz short loc_15ABF cmp eax, 2 jnz loc_15B77 mov rdi, [r14+8] mov rsi, [r15+10h] call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKSD_SF_EE; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::erase(__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const*,std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>) mov [rbx+10h], rax jmp short loc_15AB1 loc_15A91: lea r15, [r14+8] mov rdi, [r14+8] call _ZNSt12_Vector_baseIhSaIhEED2Ev; std::_Vector_base<uchar>::~_Vector_base() push 28h ; '(' loc_15AA0: pop rsi; unsigned __int64 mov rdi, [r15]; void * call __ZdlPvm; operator delete(void *,ulong) and qword ptr [r15], 0 loc_15AAD: mov byte ptr [r14], 0 loc_15AB1: mov rax, rbx add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn loc_15ABF: mov rdi, [r14+8] mov rsi, [r15+8] call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEE; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::erase(__gnu_cxx::__normal_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>*,std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>) mov [rbx+8], rax jmp short loc_15AB1 loc_15AD2: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aIteratorDoesNo; "iterator does not fit current value" lea rdi, [rsp+48h+var_40] mov rdx, rsp call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov bpl, 1 lea rdx, [rsp+48h+var_40] mov rdi, rbx; this mov esi, 0CAh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp loc_15BD1 loc_15B26: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aIteratorOutOfR; "iterator out of range" lea rdi, [rsp+48h+var_40] mov rdx, rsp call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov bpl, 1 lea rdx, [rsp+48h+var_40] mov rdi, rbx; this mov esi, 0CDh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_15BD1 loc_15B77: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) mov rdx, rsp mov [rdx], rax lea rsi, aCannotUseErase; "cannot use erase() with " lea rdi, [rsp+48h+var_40] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA25_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[25],char const*>(char const(&)[25],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_40] mov rdi, rbx; this mov esi, 133h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_15BD1: jmp short loc_15BD9 jmp short loc_15BED jmp short loc_15BD9 jmp short loc_15BED loc_15BD9: mov r14, rax lea rdi, [rsp+48h+var_40] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_15BF0 jmp short loc_15BF8 loc_15BED: mov r14, rax loc_15BF0: mov rdi, rbx; void * call ___cxa_free_exception loc_15BF8: mov rdi, r14 call __Unwind_Resume
long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_( long long a1, unsigned __int8 *a2, unsigned __int8 **a3) { int v4; // eax _QWORD *v5; // r15 nlohmann::json_abi_v3_11_3::detail::invalid_iterator *exception; // rbx nlohmann::json_abi_v3_11_3::detail::invalid_iterator *v8; // rbx nlohmann::json_abi_v3_11_3::detail::type_error *v9; // rbx _QWORD v10[8]; // [rsp+8h] [rbp-40h] BYREF if ( *a3 != a2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::invalid_iterator *)__cxa_allocate_exception(0x20uLL); std::string::basic_string<std::allocator<char>>(v10, (long long)"iterator does not fit current value"); ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 202, (long long)v10); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::invalid_iterator, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::end( a1, (long long)a2); v4 = *a2; if ( (unsigned int)(v4 - 3) < 6 ) { if ( a3[3] ) { v8 = (nlohmann::json_abi_v3_11_3::detail::invalid_iterator *)__cxa_allocate_exception(0x20uLL); std::string::basic_string<std::allocator<char>>(v10, (long long)"iterator out of range"); ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( v8, 205, (long long)v10); __cxa_throw( v8, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::invalid_iterator, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } if ( v4 == 8 ) { v5 = a2 + 8; std::_Vector_base<unsigned char>::~_Vector_base(*((_QWORD **)a2 + 1)); operator delete(*((void **)a2 + 1), 0x28uLL); } else { if ( v4 != 3 ) { LABEL_12: *a2 = 0; return a1; } v5 = a2 + 8; std::string::~string(*((_QWORD *)a2 + 1)); operator delete(*((void **)a2 + 1), 0x20uLL); } *v5 = 0LL; goto LABEL_12; } if ( v4 == 1 ) { *(_QWORD *)(a1 + 8) = 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>>>>::erase( *((_QWORD *)a2 + 1), a3[1]); } else { if ( v4 != 2 ) { v9 = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); 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(a2); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[25],char const*>( v10, "cannot use erase() with "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( v9, 307, (long long)v10); __cxa_throw( v9, (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); } *(_QWORD *)(a1 + 16) = 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>>::erase( *((_QWORD *)a2 + 1), a3[2]); } return a1; }
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x28 MOV R14,RSI CMP qword ptr [RDX],RSI JNZ 0x00115ad2 MOV R15,RDX MOV RBX,RDI MOV RSI,R14 CALL 0x0010db94 MOVZX EAX,byte ptr [R14] LEA ECX,[RAX + -0x3] CMP ECX,0x6 JNC 0x00115a70 CMP qword ptr [R15 + 0x18],0x0 JNZ 0x00115b26 CMP EAX,0x8 JZ 0x00115a91 CMP EAX,0x3 JNZ 0x00115aad LEA R15,[R14 + 0x8] MOV RDI,qword ptr [R14 + 0x8] CALL 0x001051d0 PUSH 0x20 JMP 0x00115aa0 LAB_00115a70: CMP EAX,0x1 JZ 0x00115abf CMP EAX,0x2 JNZ 0x00115b77 MOV RDI,qword ptr [R14 + 0x8] MOV RSI,qword ptr [R15 + 0x10] CALL 0x00115c0a MOV qword ptr [RBX + 0x10],RAX JMP 0x00115ab1 LAB_00115a91: LEA R15,[R14 + 0x8] MOV RDI,qword ptr [R14 + 0x8] CALL 0x0010702c PUSH 0x28 LAB_00115aa0: POP RSI MOV RDI,qword ptr [R15] CALL 0x00105490 AND qword ptr [R15],0x0 LAB_00115aad: MOV byte ptr [R14],0x0 LAB_00115ab1: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET LAB_00115abf: MOV RDI,qword ptr [R14 + 0x8] MOV RSI,qword ptr [R15 + 0x8] CALL 0x00115c00 MOV qword ptr [RBX + 0x8],RAX JMP 0x00115ab1 LAB_00115ad2: PUSH 0x20 POP RDI CALL 0x00105220 MOV RBX,RAX LAB_00115add: LEA RSI,[0x11da59] LEA RDI,[RSP + 0x8] MOV RDX,RSP CALL 0x001062e2 MOV BPL,0x1 LAB_00115af4: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0xca MOV RCX,R14 CALL 0x0010fd54 XOR EBP,EBP LEA RSI,[0x12bad8] LEA RDX,[0x10823a] MOV RDI,RBX CALL 0x00105730 LAB_00115b26: PUSH 0x20 POP RDI CALL 0x00105220 MOV RBX,RAX LAB_00115b31: LEA RSI,[0x11da7d] LEA RDI,[RSP + 0x8] MOV RDX,RSP CALL 0x001062e2 MOV BPL,0x1 LAB_00115b48: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0xcd MOV RCX,R14 CALL 0x0010fd54 XOR EBP,EBP LEA RSI,[0x12bad8] LEA RDX,[0x10823a] MOV RDI,RBX CALL 0x00105730 LAB_00115b77: PUSH 0x20 POP RDI CALL 0x00105220 MOV RBX,RAX MOV RDI,R14 CALL 0x00107c14 MOV RDX,RSP MOV qword ptr [RDX],RAX LAB_00115b90: LEA RSI,[0x11da93] LEA RDI,[RSP + 0x8] CALL 0x00115c0f MOV BPL,0x1 LAB_00115ba4: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0x133 MOV RCX,R14 CALL 0x001087f8 XOR EBP,EBP LEA RSI,[0x12b870] LEA RDX,[0x10823a] MOV RDI,RBX CALL 0x00105730
long _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_ (long param_1, basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *param_2,long *param_3) { basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> bVar1; int8 uVar2; ulong uStack_50; char *local_48; string local_40 [32]; if ((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)*param_3 != param_2) { uVar2 = __cxa_allocate_exception(0x20); /* try { // try from 00115add to 00115af0 has its CatchHandler @ 00115bed */ std::__cxx11::string::string<std::allocator<char>> (local_40,"iterator does not fit current value",(allocator *)&local_48); /* try { // try from 00115af4 to 00115b20 has its CatchHandler @ 00115bd9 */ _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar2,0xca,local_40,param_2); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::invalid_iterator::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::end(); bVar1 = *param_2; if (5 < (byte)bVar1 - 3) { if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar2 = nlohmann::json_abi_v3_11_3:: ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::erase(*(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> **)(param_2 + 8),param_3[1]); *(int8 *)(param_1 + 8) = uVar2; return param_1; } if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2) { uVar2 = 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>>> ::erase(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(param_2 + 8),param_3[2]); *(int8 *)(param_1 + 0x10) = uVar2; return param_1; } uVar2 = __cxa_allocate_exception(0x20); local_48 = (char *)nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name(param_2); /* try { // try from 00115b90 to 00115ba0 has its CatchHandler @ 00115bd3 */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[25],char_const*> ((detail *)local_40,"cannot use erase() with ",&local_48); /* try { // try from 00115ba4 to 00115bd0 has its CatchHandler @ 00115bd1 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar2,0x133,local_40,param_2); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } if (param_3[3] != 0) { uVar2 = __cxa_allocate_exception(0x20); /* try { // try from 00115b31 to 00115b44 has its CatchHandler @ 00115bd7 */ std::__cxx11::string::string<std::allocator<char>> (local_40,"iterator out of range",(allocator *)&local_48); /* try { // try from 00115b48 to 00115b74 has its CatchHandler @ 00115bd5 */ _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar2,0xcd,local_40,param_2); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::invalid_iterator::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x8) { std::_Vector_base<unsigned_char,std::allocator<unsigned_char>>::~_Vector_base (*(_Vector_base<unsigned_char,std::allocator<unsigned_char>> **)(param_2 + 8)); uStack_50 = 0x28; } else { if (bVar1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x3) goto LAB_00115aad; std::__cxx11::string::~string(*(string **)(param_2 + 8)); uStack_50 = 0x20; } operator_delete(*(void **)(param_2 + 8),uStack_50); *(int8 *)(param_2 + 8) = 0; LAB_00115aad: *param_2 = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0; return param_1; }
16,699
my_wc_mb_cp932
eloqsql/strings/ctype-cp932.c
static int my_wc_mb_cp932(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { int code; if ((int) wc < 0x80) /* ASCII: [U+0000..U+007F] -> [00-7F] */ { /* This branch is for performance purposes on ASCII range, to avoid using unicode_to_cp932[]: about 10% improvement. */ if (s >= e) return MY_CS_TOOSMALL; s[0]= (uchar) wc; return 1; } if (wc > 0xFFFF || !(code= unicode_to_cp932[wc])) /* Bad Unicode code point */ return MY_CS_ILUNI; if (code <= 0xFF) { /* JIS-X-0201 HALF WIDTH KATAKANA [U+FF61..U+FF9F] -> [A1..DF] */ if (s >= e) return MY_CS_TOOSMALL; s[0]= code; return 1; } if (s + 2 > e) return MY_CS_TOOSMALL2; MY_PUT_MB2(s, code); /* JIS-X-0208(MS) */ return 2; }
O3
c
my_wc_mb_cp932: pushq %rbp movq %rsp, %rbp cmpl $0x7f, %esi jg 0xb5748 movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0xb5796 movb %sil, (%rdx) movl $0x1, %eax jmp 0xb5796 xorl %eax, %eax cmpq $0xffff, %rsi # imm = 0xFFFF ja 0xb5796 leaq 0x6e556(%rip), %rdi # 0x123cb0 movzwl (%rdi,%rsi,2), %esi testw %si, %si je 0xb5796 movzwl %si, %eax cmpl $0xff, %eax ja 0xb577c movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0xb5796 movb %sil, (%rdx) jmp 0xb5741 leaq 0x2(%rdx), %rdi movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %rdi ja 0xb5796 rolw $0x8, %si movw %si, (%rdx) movl $0x2, %eax popq %rbp retq
my_wc_mb_cp932: push rbp mov rbp, rsp cmp esi, 7Fh jg short loc_B5748 mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short loc_B5796 mov [rdx], sil loc_B5741: mov eax, 1 jmp short loc_B5796 loc_B5748: xor eax, eax cmp rsi, 0FFFFh ja short loc_B5796 lea rdi, unicode_to_cp932 movzx esi, word ptr [rdi+rsi*2] test si, si jz short loc_B5796 movzx eax, si cmp eax, 0FFh ja short loc_B577C mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short loc_B5796 mov [rdx], sil jmp short loc_B5741 loc_B577C: lea rdi, [rdx+2] mov eax, 0FFFFFF9Ah cmp rdi, rcx ja short loc_B5796 rol si, 8 mov [rdx], si mov eax, 2 loc_B5796: pop rbp retn
long long my_wc_mb_cp932(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { long long result; // rax unsigned __int16 v5; // si if ( (int)a2 <= 127 ) { result = 4294967195LL; if ( (unsigned long long)a3 >= a4 ) return result; *a3 = a2; return 1LL; } result = 0LL; if ( a2 <= 0xFFFF ) { v5 = unicode_to_cp932[a2]; if ( v5 ) { if ( v5 > 0xFFu ) { result = 4294967194LL; if ( (unsigned long long)(a3 + 2) <= a4 ) { *(_WORD *)a3 = __ROL2__(v5, 8); return 2LL; } } else { result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { *a3 = v5; return 1LL; } } } } return result; }
my_wc_mb_cp932: PUSH RBP MOV RBP,RSP CMP ESI,0x7f JG 0x001b5748 MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x001b5796 MOV byte ptr [RDX],SIL LAB_001b5741: MOV EAX,0x1 JMP 0x001b5796 LAB_001b5748: XOR EAX,EAX CMP RSI,0xffff JA 0x001b5796 LEA RDI,[0x223cb0] MOVZX ESI,word ptr [RDI + RSI*0x2] TEST SI,SI JZ 0x001b5796 MOVZX EAX,SI CMP EAX,0xff JA 0x001b577c MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x001b5796 MOV byte ptr [RDX],SIL JMP 0x001b5741 LAB_001b577c: LEA RDI,[RDX + 0x2] MOV EAX,0xffffff9a CMP RDI,RCX JA 0x001b5796 ROL SI,0x8 MOV word ptr [RDX],SI MOV EAX,0x2 LAB_001b5796: POP RBP RET
int8 my_wc_mb_cp932(int8 param_1,ulong param_2,ushort *param_3,ushort *param_4) { ushort uVar1; if ((int)param_2 < 0x80) { if (param_4 <= param_3) { return 0xffffff9b; } *(char *)param_3 = (char)param_2; } else { if (0xffff < param_2) { return 0; } uVar1 = *(ushort *)(unicode_to_cp932 + param_2 * 2); if (uVar1 == 0) { return 0; } if (0xff < uVar1) { if (param_4 < param_3 + 1) { return 0xffffff9a; } *param_3 = uVar1 << 8 | uVar1 >> 8; return 2; } if (param_4 <= param_3) { return 0xffffff9b; } *(char *)param_3 = (char)uVar1; } return 1; }