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
25,500
evmone::Result evmone::instr::core::extcall_impl<(evmone::Opcode)248>(evmone::StackTop, long, evmone::ExecutionState&)
corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/instructions_calls.cpp
Result extcall_impl(StackTop stack, int64_t gas_left, ExecutionState& state) noexcept { static_assert(Op == OP_EXTCALL || Op == OP_EXTDELEGATECALL || Op == OP_EXTSTATICCALL); const auto dst_u256 = stack.pop(); const auto input_offset_u256 = stack.pop(); const auto input_size_u256 = stack.pop(); const auto value = (Op == OP_EXTSTATICCALL || Op == OP_EXTDELEGATECALL) ? 0 : stack.pop(); const auto has_value = value != 0; stack.push(EXTCALL_ABORT); // Assume (hard) failure. state.return_data.clear(); // Address space expansion ready check. static constexpr auto ADDRESS_MAX = (uint256{1} << 160) - 1; if (dst_u256 > ADDRESS_MAX) return {EVMC_ARGUMENT_OUT_OF_RANGE, gas_left}; const auto dst = intx::be::trunc<evmc::address>(dst_u256); if (state.host.access_account(dst) == EVMC_ACCESS_COLD) { if ((gas_left -= instr::additional_cold_account_access_cost) < 0) return {EVMC_OUT_OF_GAS, gas_left}; } const auto target_addr_or_result = get_target_address(dst, gas_left, state); if (const auto* result = std::get_if<Result>(&target_addr_or_result)) return *result; const auto* addr_ptr = std::get_if<evmc::address>(&target_addr_or_result); const auto& code_addr = *addr_ptr; if (!check_memory(gas_left, state.memory, input_offset_u256, input_size_u256)) return {EVMC_OUT_OF_GAS, gas_left}; const auto input_offset = static_cast<size_t>(input_offset_u256); const auto input_size = static_cast<size_t>(input_size_u256); evmc_message msg{.kind = to_call_kind(Op)}; msg.flags = (Op == OP_EXTSTATICCALL) ? uint32_t{EVMC_STATIC} : state.msg->flags; if (dst != code_addr) msg.flags |= EVMC_DELEGATED; else msg.flags &= ~std::underlying_type_t<evmc_flags>{EVMC_DELEGATED}; msg.depth = state.msg->depth + 1; msg.recipient = (Op != OP_EXTDELEGATECALL) ? dst : state.msg->recipient; msg.code_address = code_addr; msg.sender = (Op == OP_EXTDELEGATECALL) ? state.msg->sender : state.msg->recipient; msg.value = (Op == OP_EXTDELEGATECALL) ? state.msg->value : intx::be::store<evmc::uint256be>(value); if (input_size > 0) { // input_offset may be garbage if input_size == 0. msg.input_data = &state.memory[input_offset]; msg.input_size = input_size; } auto cost = has_value ? CALL_VALUE_COST : 0; if constexpr (Op == OP_EXTCALL) { if (has_value && state.in_static_mode()) return {EVMC_STATIC_MODE_VIOLATION, gas_left}; if (has_value && !state.host.account_exists(dst)) cost += ACCOUNT_CREATION_COST; } if ((gas_left -= cost) < 0) return {EVMC_OUT_OF_GAS, gas_left}; msg.gas = gas_left - std::max(gas_left / 64, MIN_RETAINED_GAS); if (msg.gas < MIN_CALLEE_GAS || state.msg->depth >= 1024 || (has_value && intx::be::load<uint256>(state.host.get_balance(state.msg->recipient)) < value)) { stack.top() = EXTCALL_REVERT; return {EVMC_SUCCESS, gas_left}; // "Light" failure. } if constexpr (Op == OP_EXTDELEGATECALL) { // The code targeted by EXTDELEGATECALL must also be an EOF. // This restriction has been added to EIP-3540 in // https://github.com/ethereum/EIPs/pull/7131 uint8_t target_code_prefix[2]; const auto s = state.host.copy_code( msg.code_address, 0, target_code_prefix, std::size(target_code_prefix)); if (!is_eof_container({target_code_prefix, s})) { stack.top() = EXTCALL_REVERT; return {EVMC_SUCCESS, gas_left}; // "Light" failure. } } const auto result = state.host.call(msg); state.return_data.assign(result.output_data, result.output_size); if (result.status_code == EVMC_SUCCESS) stack.top() = EXTCALL_SUCCESS; else if (result.status_code == EVMC_REVERT) stack.top() = EXTCALL_REVERT; else stack.top() = EXTCALL_ABORT; const auto gas_used = msg.gas - result.gas_left; gas_left -= gas_used; state.gas_refund += result.gas_refund; return {EVMC_SUCCESS, gas_left}; }
O3
cpp
evmone::Result evmone::instr::core::extcall_impl<(evmone::Opcode)248>(evmone::StackTop, long, evmone::ExecutionState&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1b8, %rsp # imm = 0x1B8 movq %rdx, %r14 movq %rsi, %rbx movq %rdi, %r15 movq (%rdi), %rax movq 0x8(%rdi), %rcx movq 0x10(%rdi), %rdx movq 0x18(%rdi), %rsi movq -0x20(%rdi), %r13 movq -0x18(%rdi), %r11 movq -0x10(%rdi), %r10 movq -0x8(%rdi), %r12 movdqu -0x40(%rdi), %xmm1 movdqu -0x30(%rdi), %xmm2 movq $0x2, -0x40(%rdi) pxor %xmm0, %xmm0 movdqu %xmm0, -0x38(%rdi) xorl %edi, %edi movq %rdi, -0x28(%r15) movq %rdi, 0x50(%r14) movq 0x48(%r14), %r8 movb $0x0, (%r8) movl $0xffffffff, %r8d # imm = 0xFFFFFFFF movq %rdx, %r9 xorq %r8, %r9 orq %rsi, %r9 movq %rdx, %r9 jne 0x499ef movq $-0x1, %r8 movq %rax, %r9 movq %rcx, %rsi movq $-0x1, %rdi movl $0xe, %ebp cmpq %r9, %r8 sbbq %rsi, %rdi jb 0x49dfe movdqa %xmm2, 0x20(%rsp) movdqa %xmm1, 0x10(%rsp) movq %r12, 0x58(%rsp) movq %r11, 0x60(%rsp) movq %r10, 0x68(%rsp) bswapq %rdx bswapq %rcx bswapq %rax shrq $0x20, %rdx leaq 0x40(%rsp), %r12 movl %edx, (%r12) movq %rcx, 0x4(%r12) movq %rax, 0xc(%r12) movq 0x30(%r14), %rax movq 0x38(%r14), %rdi movq %r12, %rsi callq *0x60(%rax) testl %eax, %eax je 0x49a5b movdqa 0x10(%rsp), %xmm1 movdqa 0x20(%rsp), %xmm2 jmp 0x49a83 leaq -0x9c4(%rbx), %rax movl $0x3, %ebp cmpq $0x9c4, %rbx # imm = 0x9C4 movq %rax, %rbx movdqa 0x10(%rsp), %xmm1 movdqa 0x20(%rsp), %xmm2 jl 0x49dfb cmpl $0xc, 0x40(%r14) jg 0x49a9e movq 0x40(%rsp), %r11 movq 0x48(%rsp), %rdi movl 0x50(%rsp), %r8d jmp 0x49b23 movq %r13, %rbp leaq 0x28(%r14), %rsi leaq 0xb8(%rsp), %r13 movq %r13, %rdi movq %r12, %rdx callq 0x50b30 cmpb $0x1, 0x14(%r13) jne 0x49b06 movq 0x30(%r14), %rax movq 0x38(%r14), %rdi leaq 0xb8(%rsp), %r12 movq %r12, %rsi callq *0x60(%rax) testl %eax, %eax movq $-0xa28, %rcx # imm = 0xF5D8 movq $-0x64, %rax cmoveq %rcx, %rax addq %rbx, %rax movdqa 0x10(%rsp), %xmm1 movdqa 0x20(%rsp), %xmm2 js 0x49e15 movq %rbp, %r13 movq %rax, %rbx jmp 0x49b15 movq %rbp, %r13 movdqa 0x10(%rsp), %xmm1 movdqa 0x20(%rsp), %xmm2 movq (%r12), %r11 movq 0x8(%r12), %rdi movl 0x10(%r12), %r8d movdqa %xmm2, %xmm0 por %xmm1, %xmm0 leaq 0x8(%r14), %r12 ptest %xmm0, %xmm0 movq 0x68(%rsp), %rdx movq 0x60(%rsp), %r9 movq 0x58(%rsp), %r10 je 0x49bd0 pextrq $0x1, %xmm2, %rax movq %xmm2, %rcx orq %rax, %rcx pextrq $0x1, %xmm1, %rax movl $0x3, %ebp orq %rcx, %rax jne 0x49df8 movq %xmm1, %rax movq %rax, 0x10(%rsp) shrq $0x20, %rax jne 0x49df8 orq %r9, %rdx orq %r10, %rdx movq %r13, %rax shrq $0x20, %rax orq %rdx, %rax jne 0x49df8 movq 0x10(%rsp), %rax leaq (%rax,%r13), %rdx cmpq 0x10(%r14), %rdx movq %rdi, 0x20(%rsp) movl %r8d, 0xc(%rsp) movq %r11, 0x38(%rsp) jbe 0x49bc3 movq %rbx, %rdi movq %r12, %rsi callq 0x41c31 movq %rax, %rbx movq %rbx, %rax testq %rbx, %rbx jns 0x49be5 jmp 0x49dfb movl %r8d, 0xc(%rsp) movq %rdi, 0x20(%rsp) movq %r11, 0x38(%rsp) movq %xmm1, 0x10(%rsp) movq %r13, %rbp leaq 0xc0(%rsp), %r13 movl $0xb0, %edx movq %r13, %rdi xorl %esi, %esi callq 0x22190 movl $0x1, -0x8(%r13) movq 0x20(%r14), %rax movl 0x4(%rax), %ecx movl %ecx, -0x4(%r13) movq 0x38(%rsp), %rdi cmpq %rdi, 0x40(%rsp) movq 0x20(%rsp), %r8 jne 0x49c41 cmpq %r8, 0x48(%rsp) jne 0x49c41 xorl %edx, %edx movl 0xc(%rsp), %r9d cmpl %r9d, 0x50(%rsp) setne %dl andl $-0x3, %ecx leal (%rcx,%rdx,2), %ecx jmp 0x49c49 orl $0x2, %ecx movl 0xc(%rsp), %r9d movq 0x10(%rsp), %rsi movl %ecx, 0xbc(%rsp) movl 0x8(%rax), %ecx leal 0x1(%rcx), %edx movl %edx, 0xc0(%rsp) movups 0x18(%rax), %xmm0 movups %xmm0, 0xd0(%rsp) movl 0x28(%rax), %edx movl %edx, 0xe0(%rsp) movq %rdi, 0x148(%rsp) movq %r8, 0x150(%rsp) movl %r9d, 0x158(%rsp) movups 0x2c(%rax), %xmm0 movups %xmm0, 0xe4(%rsp) movl 0x3c(%rax), %edx movl %edx, 0xf4(%rsp) movdqu 0x50(%rax), %xmm0 movdqu 0x60(%rax), %xmm1 movdqu %xmm1, 0x118(%rsp) movdqu %xmm0, 0x108(%rsp) testq %rsi, %rsi je 0x49cdb addq (%r12), %rbp movq %rbp, 0xf8(%rsp) movq %rsi, 0x100(%rsp) testq %rbx, %rbx js 0x49df3 leaq -0x40(%r15), %r12 addq $-0x38, %r15 movq %rbx, %rax shrq $0x6, %rax cmpq $0x1389, %rax # imm = 0x1389 movl $0x1388, %edx # imm = 0x1388 cmovaeq %rax, %rdx movq %rbx, %rax subq %rdx, %rax movq %rax, 0xc8(%rsp) cmpq $0x8fc, %rax # imm = 0x8FC setl %al cmpl $0x400, %ecx # imm = 0x400 setge %cl orb %al, %cl cmpb $0x1, %cl je 0x49dd6 leaq 0x170(%rsp), %rsi movq %rdi, (%rsi) movq %r8, 0x8(%rsi) movl %r9d, 0x10(%rsi) movq 0x30(%r14), %rax movq 0x38(%r14), %rdi leaq 0x70(%rsp), %rcx movl $0x2, %r8d xorl %edx, %edx callq *0x30(%rax) leaq 0x70(%rsp), %rsi movq %rax, %rdi callq 0x4333b testb %al, %al je 0x49dd6 movq 0x30(%r14), %rax movq 0x38(%r14), %rsi leaq 0x170(%rsp), %rdi leaq 0xb8(%rsp), %rdx callq *0x40(%rax) leaq 0x48(%r14), %rax leaq 0x70(%rsp), %rdx leaq 0x170(%rsp), %rsi movl $0x9, %ecx movq %rdx, %rdi rep movsq (%rsi), %es:(%rdi) movq 0x18(%rdx), %rcx movq 0x20(%rdx), %r8 movq 0x50(%r14), %rdx movq %rax, %rdi xorl %esi, %esi callq 0x4b39a movl 0x70(%rsp), %eax cmpl $0x2, %eax je 0x49e1c testl %eax, %eax jne 0x49e26 pxor %xmm0, %xmm0 movdqu %xmm0, 0x10(%r12) movdqu %xmm0, (%r12) jmp 0x49e3f movq $0x1, (%r12) pxor %xmm0, %xmm0 movdqu %xmm0, (%r15) movq $0x0, 0x10(%r15) xorl %ebp, %ebp jmp 0x49df8 movl $0x3, %ebp movq %rbx, %rax movq %rax, %rbx movl %ebp, %eax movq %rbx, %rdx addq $0x1b8, %rsp # imm = 0x1B8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x3, %ebp jmp 0x49dfb movq $0x1, (%r12) jmp 0x49e2e movq $0x2, (%r12) pxor %xmm0, %xmm0 movdqu %xmm0, (%r15) movq $0x0, 0x10(%r15) subq 0xc8(%rsp), %rbx addq 0x78(%rsp), %rbx movq 0x80(%rsp), %rax addq %rax, (%r14) movq 0x98(%rsp), %rax testq %rax, %rax je 0x49def leaq 0x70(%rsp), %rdi callq *%rax jmp 0x49def jmp 0x49e77 jmp 0x49e77 jmp 0x49e77 jmp 0x49e77 jmp 0x49e77 movq %rax, %rdi callq 0x30061
_ZN6evmone5instr4core12extcall_implILNS_6OpcodeE249EEENS_6ResultENS_8StackTopElRNS_14ExecutionStateE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 1B8h mov r14, rdx mov rbx, rsi mov r15, rdi mov rax, [rdi] mov rcx, [rdi+8] mov rdx, [rdi+10h] mov rsi, [rdi+18h] mov r13, [rdi-20h] mov r11, [rdi-18h] mov r10, [rdi-10h] mov r12, [rdi-8] movdqu xmm1, xmmword ptr [rdi-40h] movdqu xmm2, xmmword ptr [rdi-30h] mov qword ptr [rdi-40h], 2 pxor xmm0, xmm0 movdqu xmmword ptr [rdi-38h], xmm0 xor edi, edi mov [r15-28h], rdi mov [r14+50h], rdi mov r8, [r14+48h] mov byte ptr [r8], 0 mov r8d, 0FFFFFFFFh mov r9, rdx xor r9, r8 or r9, rsi mov r9, rdx jnz short loc_499EF mov r8, 0FFFFFFFFFFFFFFFFh mov r9, rax mov rsi, rcx mov rdi, 0FFFFFFFFFFFFFFFFh loc_499EF: mov ebp, 0Eh cmp r8, r9 sbb rdi, rsi jb loc_49DFE movdqa [rsp+1E8h+var_1C8], xmm2 movdqa [rsp+1E8h+var_1D8], xmm1 mov [rsp+1E8h+var_190], r12 mov [rsp+1E8h+var_188], r11 mov [rsp+1E8h+var_180], r10 bswap rdx bswap rcx bswap rax shr rdx, 20h lea r12, [rsp+1E8h+var_1A8] mov [r12], edx mov [r12+4], rcx mov [r12+0Ch], rax mov rax, [r14+30h] mov rdi, [r14+38h] mov rsi, r12 call qword ptr [rax+60h] test eax, eax jz short loc_49A5B movdqa xmm1, [rsp+1E8h+var_1D8] movdqa xmm2, [rsp+1E8h+var_1C8] jmp short loc_49A83 loc_49A5B: lea rax, [rbx-9C4h] mov ebp, 3 cmp rbx, 9C4h mov rbx, rax movdqa xmm1, [rsp+1E8h+var_1D8] movdqa xmm2, [rsp+1E8h+var_1C8] jl loc_49DFB loc_49A83: cmp dword ptr [r14+40h], 0Ch jg short loc_49A9E mov r11, [rsp+1E8h+var_1A8] mov rdi, [rsp+1E8h+var_1A0] mov r8d, [rsp+1E8h+var_198] jmp loc_49B23 loc_49A9E: mov rbp, r13 lea rsi, [r14+28h] lea r13, [rsp+1E8h+var_130] mov rdi, r13 mov rdx, r12 call _ZN6evmone20get_delegate_addressERKN4evmc13HostInterfaceERKNS0_7addressE; evmone::get_delegate_address(evmc::HostInterface const&,evmc::address const&) cmp byte ptr [r13+14h], 1 jnz short loc_49B06 mov rax, [r14+30h] mov rdi, [r14+38h] lea r12, [rsp+1E8h+var_130] mov rsi, r12 call qword ptr [rax+60h] test eax, eax mov rcx, 0FFFFFFFFFFFFF5D8h mov rax, 0FFFFFFFFFFFFFF9Ch cmovz rax, rcx add rax, rbx movdqa xmm1, [rsp+1E8h+var_1D8] movdqa xmm2, [rsp+1E8h+var_1C8] js loc_49E15 mov r13, rbp mov rbx, rax jmp short loc_49B15 loc_49B06: mov r13, rbp movdqa xmm1, [rsp+1E8h+var_1D8] movdqa xmm2, [rsp+1E8h+var_1C8] loc_49B15: mov r11, [r12] mov rdi, [r12+8] mov r8d, [r12+10h] loc_49B23: movdqa xmm0, xmm2 por xmm0, xmm1 lea r12, [r14+8] ptest xmm0, xmm0 mov rdx, [rsp+1E8h+var_180] mov r9, [rsp+1E8h+var_188] mov r10, [rsp+1E8h+var_190] jz loc_49BD0 pextrq rax, xmm2, 1 movq rcx, xmm2 or rcx, rax; unsigned __int64 pextrq rax, xmm1, 1 mov ebp, 3 or rax, rcx jnz loc_49DF8 movq rax, xmm1 mov qword ptr [rsp+1E8h+var_1D8], rax shr rax, 20h jnz loc_49DF8 or rdx, r9 or rdx, r10 mov rax, r13 shr rax, 20h or rax, rdx jnz loc_49DF8 mov rax, qword ptr [rsp+1E8h+var_1D8] lea rdx, [rax+r13]; evmone::Memory * cmp rdx, [r14+10h] mov qword ptr [rsp+1E8h+var_1C8], rdi mov [rsp+1E8h+var_1DC], r8d mov [rsp+1E8h+var_1B0], r11 jbe short loc_49BC3 mov rdi, rbx; this mov rsi, r12; __int64 call _ZN6evmone11grow_memoryElRNS_6MemoryEm; evmone::grow_memory(long,evmone::Memory &,ulong) mov rbx, rax loc_49BC3: mov rax, rbx test rbx, rbx jns short loc_49BE5 jmp loc_49DFB loc_49BD0: mov [rsp+1E8h+var_1DC], r8d mov qword ptr [rsp+1E8h+var_1C8], rdi mov [rsp+1E8h+var_1B0], r11 movq qword ptr [rsp+1E8h+var_1D8], xmm1 loc_49BE5: mov rbp, r13 lea r13, [rsp+1E8h+var_128] mov edx, 0B0h mov rdi, r13 xor esi, esi call _memset mov dword ptr [r13-8], 1 mov rax, [r14+20h] mov ecx, [rax+4] mov [r13-4], ecx mov rdi, [rsp+1E8h+var_1B0] cmp [rsp+1E8h+var_1A8], rdi mov r8, qword ptr [rsp+1E8h+var_1C8] jnz short loc_49C41 cmp [rsp+1E8h+var_1A0], r8 jnz short loc_49C41 xor edx, edx mov r9d, [rsp+1E8h+var_1DC] cmp [rsp+1E8h+var_198], r9d setnz dl and ecx, 0FFFFFFFDh lea ecx, [rcx+rdx*2] jmp short loc_49C49 loc_49C41: or ecx, 2 mov r9d, [rsp+1E8h+var_1DC] loc_49C49: mov rsi, qword ptr [rsp+1E8h+var_1D8] mov [rsp+1E8h+var_12C], ecx mov ecx, [rax+8] lea edx, [rcx+1] mov [rsp+1E8h+var_128], edx movups xmm0, xmmword ptr [rax+18h] movups [rsp+1E8h+var_118], xmm0 mov edx, [rax+28h] mov [rsp+1E8h+var_108], edx mov [rsp+1E8h+var_A0], rdi mov [rsp+1E8h+var_98], r8 mov [rsp+1E8h+var_90], r9d movups xmm0, xmmword ptr [rax+2Ch] movups [rsp+1E8h+var_104], xmm0 mov edx, [rax+3Ch] mov [rsp+1E8h+var_F4], edx movdqu xmm0, xmmword ptr [rax+50h] movdqu xmm1, xmmword ptr [rax+60h] movdqu [rsp+1E8h+var_D0], xmm1 movdqu [rsp+1E8h+var_E0], xmm0 test rsi, rsi jz short loc_49CDB add rbp, [r12] mov [rsp+1E8h+var_F0], rbp mov [rsp+1E8h+var_E8], rsi loc_49CDB: test rbx, rbx js loc_49DF3 lea r12, [r15-40h] add r15, 0FFFFFFFFFFFFFFC8h mov rax, rbx shr rax, 6 cmp rax, 1389h mov edx, 1388h cmovnb rdx, rax mov rax, rbx sub rax, rdx mov [rsp+1E8h+var_120], rax cmp rax, 8FCh setl al cmp ecx, 400h setnl cl or cl, al cmp cl, 1 jz loc_49DD6 lea rsi, [rsp+1E8h+var_78] mov [rsi], rdi mov [rsi+8], r8 mov [rsi+10h], r9d mov rax, [r14+30h] mov rdi, [r14+38h] lea rcx, [rsp+1E8h+var_178] mov r8d, 2 xor edx, edx call qword ptr [rax+30h] lea rsi, [rsp+1E8h+var_178] mov rdi, rax call _ZN6evmone16is_eof_containerESt17basic_string_viewIhN4evmc11byte_traitsIhEEE; evmone::is_eof_container(std::basic_string_view<uchar,evmc::byte_traits<uchar>>) test al, al jz short loc_49DD6 mov rax, [r14+30h] mov rsi, [r14+38h] lea rdi, [rsp+1E8h+var_78] lea rdx, [rsp+1E8h+var_130] call qword ptr [rax+40h] lea rax, [r14+48h] lea rdx, [rsp+1E8h+var_178] lea rsi, [rsp+1E8h+var_78] mov ecx, 9 mov rdi, rdx rep movsq mov rcx, [rdx+18h] mov r8, [rdx+20h] mov rdx, [r14+50h] mov rdi, rax xor esi, esi call _ZNSt7__cxx1112basic_stringIhN4evmc11byte_traitsIhEESaIhEE10_M_replaceEmmPKhm; std::basic_string<uchar,evmc::byte_traits<uchar>,std::allocator<uchar>>::_M_replace(ulong,ulong,uchar const*,ulong) mov eax, [rsp+1E8h+var_178] cmp eax, 2 jz short loc_49E1C test eax, eax jnz short loc_49E26 pxor xmm0, xmm0 movdqu xmmword ptr [r12+10h], xmm0 movdqu xmmword ptr [r12], xmm0 jmp short loc_49E3F loc_49DD6: mov qword ptr [r12], 1 pxor xmm0, xmm0 movdqu xmmword ptr [r15], xmm0 mov qword ptr [r15+10h], 0 loc_49DEF: xor ebp, ebp jmp short loc_49DF8 loc_49DF3: mov ebp, 3 loc_49DF8: mov rax, rbx loc_49DFB: mov rbx, rax loc_49DFE: mov eax, ebp mov rdx, rbx add rsp, 1B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_49E15: mov ebp, 3 jmp short loc_49DFB loc_49E1C: mov qword ptr [r12], 1 jmp short loc_49E2E loc_49E26: mov qword ptr [r12], 2 loc_49E2E: pxor xmm0, xmm0 movdqu xmmword ptr [r15], xmm0 mov qword ptr [r15+10h], 0 loc_49E3F: sub rbx, [rsp+1E8h+var_120] add rbx, [rsp+1E8h+var_170] mov rax, [rsp+1E8h+var_168] add [r14], rax mov rax, [rsp+1E8h+var_150] test rax, rax jz short loc_49DEF lea rdi, [rsp+1E8h+var_178] call rax jmp short loc_49DEF jmp short loc_49E77 jmp short loc_49E77 jmp short loc_49E77 jmp short loc_49E77 jmp short $+2 loc_49E77: mov rdi, rax call __clang_call_terminate
long long evmone::instr::core::extcall_impl<(evmone::Opcode)249>( unsigned long long *a1, long long a2, long long a3, double a4, double a5, double a6, double a7) { unsigned long long v10; // rax unsigned long long v11; // rcx unsigned long long v12; // rdx unsigned long long v13; // rsi unsigned long long v14; // r13 long long v15; // r11 long long v16; // r10 long long v17; // r12 __m128i v18; // xmm1 __m128i v19; // xmm2 long long v20; // rdi long long v21; // r8 unsigned long long v22; // r9 unsigned int v23; // ebp int *v24; // r12 double v25; // xmm4_8 __m128i v26; // xmm1 __m128i v27; // xmm2 bool v28; // cc long long v29; // r11 long long v30; // rdi int v31; // r8d bool v32; // zf long long v33; // rax bool v34; // sf long long v35; // rax __m128i v36; // xmm0 long long v37; // rax int v38; // ecx int v39; // r9d int v40; // ecx int v41; // ecx __m128i v42; // xmm0 unsigned long long *v43; // r12 unsigned long long *v44; // r15 long long v45; // rdx unsigned long long v46; // rax int v48; // [rsp+Ch] [rbp-1DCh] __m128i v49; // [rsp+10h] [rbp-1D8h] BYREF __m128i v50; // [rsp+20h] [rbp-1C8h] BYREF long long v51; // [rsp+38h] [rbp-1B0h] _BYTE v52[20]; // [rsp+40h] [rbp-1A8h] BYREF long long v53; // [rsp+58h] [rbp-190h] long long v54; // [rsp+60h] [rbp-188h] long long v55; // [rsp+68h] [rbp-180h] _QWORD v56[9]; // [rsp+70h] [rbp-178h] BYREF int v57; // [rsp+B8h] [rbp-130h] BYREF int v58; // [rsp+BCh] [rbp-12Ch] int v59; // [rsp+C0h] [rbp-128h] BYREF long long v60; // [rsp+C8h] [rbp-120h] __int128 v61; // [rsp+D0h] [rbp-118h] int v62; // [rsp+E0h] [rbp-108h] __int128 v63; // [rsp+E4h] [rbp-104h] int v64; // [rsp+F4h] [rbp-F4h] unsigned long long v65; // [rsp+F8h] [rbp-F0h] long long v66; // [rsp+100h] [rbp-E8h] __m128i v67; // [rsp+108h] [rbp-E0h] __m128i v68; // [rsp+118h] [rbp-D0h] long long v69; // [rsp+148h] [rbp-A0h] long long v70; // [rsp+150h] [rbp-98h] int v71; // [rsp+158h] [rbp-90h] _QWORD v72[15]; // [rsp+170h] [rbp-78h] BYREF v10 = *a1; v11 = a1[1]; v12 = a1[2]; v13 = a1[3]; v14 = *(a1 - 4); v15 = *(a1 - 3); v16 = *(a1 - 2); v17 = *(a1 - 1); v18 = _mm_loadu_si128((const __m128i *)a1 - 4); v19 = _mm_loadu_si128((const __m128i *)a1 - 3); *(a1 - 8) = 2LL; *(_OWORD *)(a1 - 7) = 0LL; v20 = 0LL; *(a1 - 5) = 0LL; *(_QWORD *)(a3 + 80) = 0LL; **(_BYTE **)(a3 + 72) = 0; v21 = 0xFFFFFFFFLL; v22 = v12; if ( !(v13 | v12 ^ 0xFFFFFFFF) ) { v21 = -1LL; v22 = v10; v13 = v11; v20 = -1LL; } v23 = 14; if ( __PAIR128__(v20, v21) >= __PAIR128__(v13, v22) ) { v50 = v19; v49 = v18; v53 = v17; v54 = v15; v55 = v16; v24 = (int *)v52; *(_DWORD *)v52 = _byteswap_uint64(v12) >> 32; *(_QWORD *)&v52[4] = _byteswap_uint64(v11); *(_QWORD *)&v52[12] = _byteswap_uint64(v10); if ( (*(unsigned int ( **)(_QWORD, _BYTE *))(*(_QWORD *)(a3 + 48) + 96LL))(*(_QWORD *)(a3 + 56), v52) ) { v26 = _mm_load_si128(&v49); v27 = _mm_load_si128(&v50); } else { v23 = 3; v28 = a2 < 2500; a2 -= 2500LL; v26 = _mm_load_si128(&v49); v27 = _mm_load_si128(&v50); if ( v28 ) return v23; } if ( *(int *)(a3 + 64) > 12 ) { evmone::get_delegate_address(&v57, a3 + 40, v52, 0.0, *(double *)v26.m128i_i64, *(double *)v27.m128i_i64, a7, v25); if ( BYTE4(v60) == 1 ) { v24 = &v57; v32 = (*(unsigned int ( **)(_QWORD, int *))(*(_QWORD *)(a3 + 48) + 96LL))(*(_QWORD *)(a3 + 56), &v57) == 0; v33 = -100LL; if ( v32 ) v33 = -2600LL; v34 = a2 + v33 < 0; v35 = a2 + v33; v26 = _mm_load_si128(&v49); v27 = _mm_load_si128(&v50); if ( v34 ) return 3; a2 = v35; } else { v26 = _mm_load_si128(&v49); v27 = _mm_load_si128(&v50); } v29 = *(_QWORD *)v24; v30 = *((_QWORD *)v24 + 1); v31 = v24[4]; } else { v29 = *(_QWORD *)v52; v30 = *(_QWORD *)&v52[8]; v31 = *(_DWORD *)&v52[16]; } v36 = _mm_or_si128(v27, v26); if ( _mm_testz_si128(v36, v36) ) { v48 = v31; v50.m128i_i64[0] = v30; v51 = v29; v49.m128i_i64[0] = v26.m128i_i64[0]; } else { v23 = 3; if ( _mm_extract_epi64(v27, 1) | v27.m128i_i64[0] | _mm_extract_epi64(v26, 1) ) return v23; v49.m128i_i64[0] = v26.m128i_i64[0]; if ( HIDWORD(v26.m128i_i64[0]) || v53 | v54 | v55 | HIDWORD(v14) ) return v23; v28 = v49.m128i_i64[0] + v14 <= *(_QWORD *)(a3 + 16); v50.m128i_i64[0] = v30; v48 = v31; v51 = v29; if ( !v28 ) a2 = (long long)evmone::grow_memory( (evmone *)a2, (evmone::Memory *)(a3 + 8), (evmone::Memory *)(v49.m128i_i64[0] + v14)); if ( a2 < 0 ) return v23; } memset(&v59, 0LL, 176LL); v57 = 1; v37 = *(_QWORD *)(a3 + 32); v38 = *(_DWORD *)(v37 + 4); v58 = v38; if ( *(_QWORD *)v52 == v51 && *(_QWORD *)&v52[8] == v50.m128i_i64[0] ) { v39 = v48; v40 = (v38 & 0xFFFFFFFD) + 2 * (*(_DWORD *)&v52[16] != v48); } else { v40 = v38 | 2; v39 = v48; } v58 = v40; v41 = *(_DWORD *)(v37 + 8); v59 = v41 + 1; v61 = *(_OWORD *)(v37 + 24); v62 = *(_DWORD *)(v37 + 40); v69 = v51; v70 = v50.m128i_i64[0]; v71 = v39; v63 = *(_OWORD *)(v37 + 44); v64 = *(_DWORD *)(v37 + 60); v42 = _mm_loadu_si128((const __m128i *)(v37 + 80)); v68 = _mm_loadu_si128((const __m128i *)(v37 + 96)); v67 = v42; if ( v49.m128i_i64[0] ) { v65 = *(_QWORD *)(a3 + 8) + v14; v66 = v49.m128i_i64[0]; } if ( a2 < 0 ) return 3; v43 = a1 - 8; v44 = a1 - 7; v45 = 5000LL; if ( (unsigned long long)a2 >> 6 >= 0x1389 ) v45 = (unsigned long long)a2 >> 6; v60 = a2 - v45; if ( a2 - v45 < 2300 || v41 >= 1024 || (v72[0] = v51, v72[1] = v50.m128i_i64[0], LODWORD(v72[2]) = v39, v46 = (*(long long ( **)(_QWORD, _QWORD *, _QWORD, _QWORD *, long long))(*(_QWORD *)(a3 + 48) + 48LL))( *(_QWORD *)(a3 + 56), v72, 0LL, v56, 2LL), !evmone::is_eof_container(v46, v56)) ) { *v43 = 1LL; *(_OWORD *)v44 = 0LL; v44[2] = 0LL; return 0; } (*(void ( **)(_QWORD *, _QWORD, int *))(*(_QWORD *)(a3 + 48) + 64LL))(v72, *(_QWORD *)(a3 + 56), &v57); qmemcpy(v56, v72, sizeof(v56)); std::basic_string<unsigned char,evmc::byte_traits<unsigned char>,std::allocator<unsigned char>>::_M_replace( a3 + 72, 0LL, *(_QWORD *)(a3 + 80), v56[3], v56[4]); if ( LODWORD(v56[0]) == 2 ) { *v43 = 1LL; } else { if ( !LODWORD(v56[0]) ) { *((_OWORD *)v43 + 1) = 0LL; *(_OWORD *)v43 = 0LL; goto LABEL_47; } *v43 = 2LL; } *(_OWORD *)v44 = 0LL; v44[2] = 0LL; LABEL_47: *(_QWORD *)a3 += v56[2]; if ( v56[5] ) ((void ( *)(_QWORD *))v56[5])(v56); return 0; } return v23; }
extcall_impl<(evmone::Opcode)249>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1b8 MOV R14,RDX MOV RBX,RSI MOV R15,RDI MOV RAX,qword ptr [RDI] MOV RCX,qword ptr [RDI + 0x8] MOV RDX,qword ptr [RDI + 0x10] MOV RSI,qword ptr [RDI + 0x18] MOV R13,qword ptr [RDI + -0x20] MOV R11,qword ptr [RDI + -0x18] MOV R10,qword ptr [RDI + -0x10] MOV R12,qword ptr [RDI + -0x8] MOVDQU XMM1,xmmword ptr [RDI + -0x40] MOVDQU XMM2,xmmword ptr [RDI + -0x30] MOV qword ptr [RDI + -0x40],0x2 PXOR XMM0,XMM0 MOVDQU xmmword ptr [RDI + -0x38],XMM0 XOR EDI,EDI MOV qword ptr [R15 + -0x28],RDI MOV qword ptr [R14 + 0x50],RDI MOV R8,qword ptr [R14 + 0x48] MOV byte ptr [R8],0x0 MOV R8D,0xffffffff MOV R9,RDX XOR R9,R8 OR R9,RSI MOV R9,RDX JNZ 0x001499ef MOV R8,-0x1 MOV R9,RAX MOV RSI,RCX MOV RDI,-0x1 LAB_001499ef: MOV EBP,0xe CMP R8,R9 SBB RDI,RSI JC 0x00149dfe MOVDQA xmmword ptr [RSP + 0x20],XMM2 MOVDQA xmmword ptr [RSP + 0x10],XMM1 MOV qword ptr [RSP + 0x58],R12 MOV qword ptr [RSP + 0x60],R11 MOV qword ptr [RSP + 0x68],R10 BSWAP RDX BSWAP RCX BSWAP RAX SHR RDX,0x20 LEA R12,[RSP + 0x40] MOV dword ptr [R12],EDX MOV qword ptr [R12 + 0x4],RCX MOV qword ptr [R12 + 0xc],RAX MOV RAX,qword ptr [R14 + 0x30] MOV RDI,qword ptr [R14 + 0x38] LAB_00149a43: MOV RSI,R12 CALL qword ptr [RAX + 0x60] TEST EAX,EAX JZ 0x00149a5b MOVDQA XMM1,xmmword ptr [RSP + 0x10] MOVDQA XMM2,xmmword ptr [RSP + 0x20] JMP 0x00149a83 LAB_00149a5b: LEA RAX,[RBX + -0x9c4] MOV EBP,0x3 CMP RBX,0x9c4 MOV RBX,RAX MOVDQA XMM1,xmmword ptr [RSP + 0x10] MOVDQA XMM2,xmmword ptr [RSP + 0x20] JL 0x00149dfb LAB_00149a83: CMP dword ptr [R14 + 0x40],0xc JG 0x00149a9e MOV R11,qword ptr [RSP + 0x40] MOV RDI,qword ptr [RSP + 0x48] MOV R8D,dword ptr [RSP + 0x50] JMP 0x00149b23 LAB_00149a9e: MOV RBP,R13 LEA RSI,[R14 + 0x28] LEA R13,[RSP + 0xb8] MOV RDI,R13 MOV RDX,R12 CALL 0x00150b30 CMP byte ptr [R13 + 0x14],0x1 JNZ 0x00149b06 MOV RAX,qword ptr [R14 + 0x30] MOV RDI,qword ptr [R14 + 0x38] LAB_00149ac7: LEA R12,[RSP + 0xb8] MOV RSI,R12 CALL qword ptr [RAX + 0x60] LAB_00149ad5: TEST EAX,EAX MOV RCX,-0xa28 MOV RAX,-0x64 CMOVZ RAX,RCX ADD RAX,RBX MOVDQA XMM1,xmmword ptr [RSP + 0x10] MOVDQA XMM2,xmmword ptr [RSP + 0x20] JS 0x00149e15 MOV R13,RBP MOV RBX,RAX JMP 0x00149b15 LAB_00149b06: MOV R13,RBP MOVDQA XMM1,xmmword ptr [RSP + 0x10] MOVDQA XMM2,xmmword ptr [RSP + 0x20] LAB_00149b15: MOV R11,qword ptr [R12] MOV RDI,qword ptr [R12 + 0x8] MOV R8D,dword ptr [R12 + 0x10] LAB_00149b23: MOVDQA XMM0,XMM2 POR XMM0,XMM1 LEA R12,[R14 + 0x8] PTEST XMM0,XMM0 MOV RDX,qword ptr [RSP + 0x68] MOV R9,qword ptr [RSP + 0x60] MOV R10,qword ptr [RSP + 0x58] JZ 0x00149bd0 PEXTRQ RAX,XMM2,0x1 MOVQ RCX,XMM2 OR RCX,RAX PEXTRQ RAX,XMM1,0x1 MOV EBP,0x3 OR RAX,RCX JNZ 0x00149df8 MOVQ RAX,XMM1 MOV qword ptr [RSP + 0x10],RAX SHR RAX,0x20 JNZ 0x00149df8 OR RDX,R9 OR RDX,R10 MOV RAX,R13 SHR RAX,0x20 OR RAX,RDX JNZ 0x00149df8 MOV RAX,qword ptr [RSP + 0x10] LEA RDX,[RAX + R13*0x1] CMP RDX,qword ptr [R14 + 0x10] MOV qword ptr [RSP + 0x20],RDI MOV dword ptr [RSP + 0xc],R8D MOV qword ptr [RSP + 0x38],R11 JBE 0x00149bc3 MOV RDI,RBX MOV RSI,R12 CALL 0x00141c31 MOV RBX,RAX LAB_00149bc3: MOV RAX,RBX TEST RBX,RBX JNS 0x00149be5 JMP 0x00149dfb LAB_00149bd0: MOV dword ptr [RSP + 0xc],R8D MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x38],R11 MOVQ qword ptr [RSP + 0x10],XMM1 LAB_00149be5: MOV RBP,R13 LEA R13,[RSP + 0xc0] MOV EDX,0xb0 MOV RDI,R13 XOR ESI,ESI CALL 0x00122190 MOV dword ptr [R13 + -0x8],0x1 MOV RAX,qword ptr [R14 + 0x20] MOV ECX,dword ptr [RAX + 0x4] MOV dword ptr [R13 + -0x4],ECX MOV RDI,qword ptr [RSP + 0x38] CMP qword ptr [RSP + 0x40],RDI MOV R8,qword ptr [RSP + 0x20] JNZ 0x00149c41 CMP qword ptr [RSP + 0x48],R8 JNZ 0x00149c41 XOR EDX,EDX MOV R9D,dword ptr [RSP + 0xc] CMP dword ptr [RSP + 0x50],R9D SETNZ DL AND ECX,0xfffffffd LEA ECX,[RCX + RDX*0x2] JMP 0x00149c49 LAB_00149c41: OR ECX,0x2 MOV R9D,dword ptr [RSP + 0xc] LAB_00149c49: MOV RSI,qword ptr [RSP + 0x10] MOV dword ptr [RSP + 0xbc],ECX MOV ECX,dword ptr [RAX + 0x8] LEA EDX,[RCX + 0x1] MOV dword ptr [RSP + 0xc0],EDX MOVUPS XMM0,xmmword ptr [RAX + 0x18] MOVUPS xmmword ptr [RSP + 0xd0],XMM0 MOV EDX,dword ptr [RAX + 0x28] MOV dword ptr [RSP + 0xe0],EDX MOV qword ptr [RSP + 0x148],RDI MOV qword ptr [RSP + 0x150],R8 MOV dword ptr [RSP + 0x158],R9D MOVUPS XMM0,xmmword ptr [RAX + 0x2c] MOVUPS xmmword ptr [RSP + 0xe4],XMM0 MOV EDX,dword ptr [RAX + 0x3c] MOV dword ptr [RSP + 0xf4],EDX MOVDQU XMM0,xmmword ptr [RAX + 0x50] MOVDQU XMM1,xmmword ptr [RAX + 0x60] MOVDQU xmmword ptr [RSP + 0x118],XMM1 MOVDQU xmmword ptr [RSP + 0x108],XMM0 TEST RSI,RSI JZ 0x00149cdb ADD RBP,qword ptr [R12] MOV qword ptr [RSP + 0xf8],RBP MOV qword ptr [RSP + 0x100],RSI LAB_00149cdb: TEST RBX,RBX JS 0x00149df3 LEA R12,[R15 + -0x40] ADD R15,-0x38 MOV RAX,RBX SHR RAX,0x6 CMP RAX,0x1389 MOV EDX,0x1388 CMOVNC RDX,RAX MOV RAX,RBX SUB RAX,RDX MOV qword ptr [RSP + 0xc8],RAX CMP RAX,0x8fc SETL AL CMP ECX,0x400 SETGE CL OR CL,AL CMP CL,0x1 JZ 0x00149dd6 LEA RSI,[RSP + 0x170] MOV qword ptr [RSI],RDI MOV qword ptr [RSI + 0x8],R8 MOV dword ptr [RSI + 0x10],R9D MOV RAX,qword ptr [R14 + 0x30] MOV RDI,qword ptr [R14 + 0x38] LAB_00149d48: LEA RCX,[RSP + 0x70] MOV R8D,0x2 XOR EDX,EDX CALL qword ptr [RAX + 0x30] LEA RSI,[RSP + 0x70] MOV RDI,RAX CALL 0x0014333b TEST AL,AL JZ 0x00149dd6 MOV RAX,qword ptr [R14 + 0x30] MOV RSI,qword ptr [R14 + 0x38] LAB_00149d71: LEA RDI,[RSP + 0x170] LEA RDX,[RSP + 0xb8] CALL qword ptr [RAX + 0x40] LEA RAX,[R14 + 0x48] LEA RDX,[RSP + 0x70] LEA RSI,[RSP + 0x170] MOV ECX,0x9 MOV RDI,RDX MOVSQ.REP RDI,RSI MOV RCX,qword ptr [RDX + 0x18] MOV R8,qword ptr [RDX + 0x20] MOV RDX,qword ptr [R14 + 0x50] LAB_00149dac: MOV RDI,RAX XOR ESI,ESI CALL 0x0014b39a MOV EAX,dword ptr [RSP + 0x70] CMP EAX,0x2 JZ 0x00149e1c TEST EAX,EAX JNZ 0x00149e26 PXOR XMM0,XMM0 MOVDQU xmmword ptr [R12 + 0x10],XMM0 MOVDQU xmmword ptr [R12],XMM0 JMP 0x00149e3f LAB_00149dd6: MOV qword ptr [R12],0x1 PXOR XMM0,XMM0 MOVDQU xmmword ptr [R15],XMM0 MOV qword ptr [R15 + 0x10],0x0 LAB_00149def: XOR EBP,EBP JMP 0x00149df8 LAB_00149df3: MOV EBP,0x3 LAB_00149df8: MOV RAX,RBX LAB_00149dfb: MOV RBX,RAX LAB_00149dfe: MOV EAX,EBP MOV RDX,RBX ADD RSP,0x1b8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00149e15: MOV EBP,0x3 JMP 0x00149dfb LAB_00149e1c: MOV qword ptr [R12],0x1 JMP 0x00149e2e LAB_00149e26: MOV qword ptr [R12],0x2 LAB_00149e2e: PXOR XMM0,XMM0 MOVDQU xmmword ptr [R15],XMM0 MOV qword ptr [R15 + 0x10],0x0 LAB_00149e3f: SUB RBX,qword ptr [RSP + 0xc8] ADD RBX,qword ptr [RSP + 0x78] MOV RAX,qword ptr [RSP + 0x80] ADD qword ptr [R14],RAX MOV RAX,qword ptr [RSP + 0x98] TEST RAX,RAX JZ 0x00149def LAB_00149e64: LEA RDI,[RSP + 0x70] CALL RAX JMP 0x00149def
/* evmone::Result evmone::instr::core::extcall_impl<(evmone::Opcode)249>(evmone::StackTop, long, evmone::ExecutionState&) */ int1 [16] evmone::instr::core::extcall_impl<(evmone::Opcode)249>(ulong *param_1,ulong param_2,long *param_3) { int1 (*pauVar1) [16]; ulong uVar2; ulong uVar3; ulong uVar4; long lVar5; uint uVar6; char cVar7; int iVar8; ulong uVar9; evmone *peVar10; long lVar11; ulong uVar12; int8 uVar13; ulong uVar14; long *plVar15; ulong uVar16; long lVar17; long *plVar18; uint uVar19; ulong uVar20; ulong uVar21; address *paVar22; byte bVar23; int1 auVar24 [16]; int1 auVar25 [16]; uint local_1a8; uint uStack_1a4; uint uStack_1a0; uint uStack_19c; uint uStack_198; ulong local_190; ulong local_188; ulong local_180; int local_178 [2]; long local_170; long local_168; uchar *local_160; ulong local_158; code *local_150; int4 local_130; uint uStack_12c; int local_128 [2]; int8 local_120; int8 local_118; int8 uStack_110; int4 local_108; int8 local_104; int8 uStack_fc; int4 local_f4; long local_f0; ulong local_e8; int8 local_e0; int8 uStack_d8; int8 local_d0; int8 uStack_c8; long local_a0; long local_98; uint local_90; long local_78; long local_70; uint local_68; bVar23 = 0; uVar12 = *param_1; uVar2 = param_1[1]; uVar3 = param_1[2]; uVar14 = param_1[3]; uVar4 = param_1[-4]; local_188 = param_1[-3]; local_180 = param_1[-2]; local_190 = param_1[-1]; param_1[-8] = 2; *(int1 (*) [16])(param_1 + -7) = (int1 [16])0x0; uVar16 = 0; param_1[-5] = 0; param_3[10] = 0; *(int1 *)param_3[9] = 0; uVar20 = 0xffffffff; uVar21 = uVar3; if (uVar3 == 0xffffffff && uVar14 == 0) { uVar20 = 0xffffffffffffffff; uVar16 = 0xffffffffffffffff; uVar14 = uVar2; uVar21 = uVar12; } uVar13 = 0xe; uVar9 = param_2; if (uVar16 < uVar14 || uVar16 - uVar14 < (ulong)(uVar20 < uVar21)) goto LAB_00149dfe; local_1a8 = (uint)(uVar3 >> 0x18) & 0xff | (uint)(uVar3 >> 8) & 0xff00 | (uint)(((uVar3 & 0xff00) << 0x28) >> 0x20) | (uint)((uVar3 << 0x38) >> 0x20); uVar6 = (uint)(uVar2 >> 0x18); uVar19 = (uint)(uVar2 >> 8); uStack_1a4 = (uint)(byte)(uVar2 >> 0x38) | ((uint)(uVar2 >> 0x20) & 0xff0000) >> 8 | uVar6 & 0xff0000 | uVar19 & 0xff000000; uStack_1a0 = uVar6 & 0xff | uVar19 & 0xff00 | (uint)(((uVar2 & 0xff00) << 0x28) >> 0x20) | (uint)((uVar2 << 0x38) >> 0x20); uVar6 = (uint)(uVar12 >> 0x18); uVar19 = (uint)(uVar12 >> 8); uStack_19c = (uint)(byte)(uVar12 >> 0x38) | ((uint)(uVar12 >> 0x20) & 0xff0000) >> 8 | uVar6 & 0xff0000 | uVar19 & 0xff000000; uStack_198 = uVar6 & 0xff | uVar19 & 0xff00 | (uint)(((uVar12 & 0xff00) << 0x28) >> 0x20) | (uint)((uVar12 << 0x38) >> 0x20); paVar22 = (address *)&local_1a8; /* try { // try from 00149a43 to 00149a48 has its CatchHandler @ 00149e77 */ iVar8 = (**(code **)(param_3[6] + 0x60))(param_3[7]); if (iVar8 == 0) { uVar9 = param_2 - 0x9c4; uVar13 = 3; if ((long)param_2 < 0x9c4) goto LAB_00149dfe; } if ((int)param_3[8] < 0xd) { lVar11 = CONCAT44(uStack_1a4,local_1a8); lVar17 = CONCAT44(uStack_19c,uStack_1a0); uVar19 = uStack_198; } else { get_delegate_address((evmone *)&local_130,(HostInterface *)(param_3 + 5),paVar22); if (local_120._4_1_ == '\x01') { /* try { // try from 00149ac7 to 00149ad4 has its CatchHandler @ 00149e75 */ paVar22 = (address *)&local_130; iVar8 = (**(code **)(param_3[6] + 0x60))(param_3[7]); lVar11 = -100; if (iVar8 == 0) { lVar11 = -0xa28; } uVar9 = lVar11 + uVar9; if ((long)uVar9 < 0) { uVar13 = 3; goto LAB_00149dfe; } } lVar11 = *(long *)paVar22; lVar17 = *(long *)(paVar22 + 8); uVar19 = *(uint *)(paVar22 + 0x10); } auVar24 = *(int1 (*) [16])(param_1 + -6); auVar25 = *(int1 (*) [16])(param_1 + -8); uVar12 = auVar25._0_8_; if (auVar24 != (int1 [16])0x0 || auVar25 != (int1 [16])0x0) { uVar13 = 3; if (((auVar25._8_8_ != 0 || (auVar24._0_8_ != 0 || auVar24._8_8_ != 0)) || (uVar12 >> 0x20 != 0) ) || (uVar4 >> 0x20 != 0 || ((local_180 != 0 || local_188 != 0) || local_190 != 0))) goto LAB_00149dfe; if ((ulong)param_3[2] < uVar12 + uVar4) { uVar9 = grow_memory(uVar9,(Memory *)(param_3 + 1),uVar12 + uVar4); } if ((long)uVar9 < 0) goto LAB_00149dfe; } memset(local_128,0,0xb0); local_130 = 1; lVar5 = param_3[4]; if ((CONCAT44(uStack_1a4,local_1a8) == lVar11) && (CONCAT44(uStack_19c,uStack_1a0) == lVar17)) { uStack_12c = (*(uint *)(lVar5 + 4) & 0xfffffffd) + (uint)(uStack_198 != uVar19) * 2; } else { uStack_12c = *(uint *)(lVar5 + 4) | 2; } local_128[0] = *(int *)(lVar5 + 8) + 1; local_118 = *(int8 *)(lVar5 + 0x18); uStack_110 = *(int8 *)(lVar5 + 0x20); local_108 = *(int4 *)(lVar5 + 0x28); local_104 = *(int8 *)(lVar5 + 0x2c); uStack_fc = *(int8 *)(lVar5 + 0x34); local_f4 = *(int4 *)(lVar5 + 0x3c); local_e0 = *(int8 *)(lVar5 + 0x50); uStack_d8 = *(int8 *)(lVar5 + 0x58); local_d0 = *(int8 *)(lVar5 + 0x60); uStack_c8 = *(int8 *)(lVar5 + 0x68); if (uVar12 != 0) { local_f0 = uVar4 + param_3[1]; local_e8 = uVar12; } if ((long)uVar9 < 0) { uVar13 = 3; goto LAB_00149dfe; } pauVar1 = (int1 (*) [16])(param_1 + -8); uVar12 = 5000; if (5000 < uVar9 >> 6) { uVar12 = uVar9 >> 6; } local_120 = uVar9 - uVar12; if (*(int *)(lVar5 + 8) < 0x400 && 0x8fb < local_120) { /* try { // try from 00149d48 to 00149d57 has its CatchHandler @ 00149e73 */ local_a0 = lVar11; local_98 = lVar17; local_90 = uVar19; local_78 = lVar11; local_70 = lVar17; local_68 = uVar19; peVar10 = (evmone *)(**(code **)(param_3[6] + 0x30))(param_3[7],&local_78,0,local_178,2); cVar7 = is_eof_container(peVar10,local_178); if (cVar7 == '\0') goto LAB_00149dd6; /* try { // try from 00149d71 to 00149d83 has its CatchHandler @ 00149e71 */ (**(code **)(param_3[6] + 0x40))(&local_78,param_3[7],&local_130); plVar15 = &local_78; plVar18 = (long *)local_178; for (lVar11 = 9; lVar11 != 0; lVar11 = lVar11 + -1) { *plVar18 = *plVar15; plVar15 = plVar15 + (ulong)bVar23 * -2 + 1; plVar18 = plVar18 + (ulong)bVar23 * -2 + 1; } /* try { // try from 00149dac to 00149db5 has its CatchHandler @ 00149e6f */ std::__cxx11:: basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>>:: _M_replace((basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>> *)(param_3 + 9),0,param_3[10],local_160,local_158); if (local_178[0] == 2) { *(int8 *)*pauVar1 = 1; LAB_00149e2e: *(int1 (*) [16])(param_1 + -7) = (int1 [16])0x0; param_1[-5] = 0; } else { if (local_178[0] != 0) { *(int8 *)*pauVar1 = 2; goto LAB_00149e2e; } *(int1 (*) [16])(param_1 + -6) = (int1 [16])0x0; *pauVar1 = (int1 [16])0x0; } uVar9 = (uVar9 - local_120) + local_170; *param_3 = *param_3 + local_168; if (local_150 != (code *)0x0) { /* try { // try from 00149e64 to 00149e6a has its CatchHandler @ 00149e6d */ (*local_150)(local_178); } } else { LAB_00149dd6: *(int8 *)*pauVar1 = 1; *(int1 (*) [16])(param_1 + -7) = (int1 [16])0x0; param_1[-5] = 0; } uVar13 = 0; LAB_00149dfe: auVar25._8_8_ = uVar9; auVar25._0_8_ = uVar13; return auVar25; }
25,501
void OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>::assignSmoothLimitMask<OpenSubdiv::v3_6_0::Far::LoopLimits<float>::LimitVertex, OpenSubdiv::v3_6_0::Far::LoopLimits<float>::LimitMask>(OpenSubdiv::v3_6_0::Far::LoopLimits<float>::LimitVertex const&, OpenSubdiv::v3_6_0::Far::LoopLimits<float>::LimitMask&) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../sdc/loopScheme.h
inline void Scheme<SCHEME_LOOP>::assignSmoothLimitMask(VERTEX const& vertex, MASK& posMask) const { typedef typename MASK::Weight Weight; int valence = vertex.GetNumFaces(); posMask.SetNumVertexWeights(1); posMask.SetNumEdgeWeights(valence); posMask.SetNumFaceWeights(0); posMask.SetFaceWeightsForFaceCenters(false); // Specialize for the regular case: 1/12 per edge-vert, 1/2 for the vert itself: if (valence == 6) { Weight eWeight = (Weight) (1.0 / 12.0); Weight vWeight = 0.5f; posMask.VertexWeight(0) = vWeight; posMask.EdgeWeight(0) = eWeight; posMask.EdgeWeight(1) = eWeight; posMask.EdgeWeight(2) = eWeight; posMask.EdgeWeight(3) = eWeight; posMask.EdgeWeight(4) = eWeight; posMask.EdgeWeight(5) = eWeight; } else { double dValence = (double) valence; double invValence = 1.0f / dValence; double cosTheta = std::cos(std::numbers::pi * 2.0f * invValence); double beta = 0.25f * cosTheta + 0.375f; double gamma = (0.625f - (beta * beta)) * invValence; Weight eWeight = (Weight) (1.0f / (dValence + 3.0f / (8.0f * gamma))); Weight vWeight = (Weight) (1.0f - (eWeight * dValence)); posMask.VertexWeight(0) = vWeight; for (int i = 0; i < valence; ++i) { posMask.EdgeWeight(i) = eWeight; } } }
O0
c
void OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>::assignSmoothLimitMask<OpenSubdiv::v3_6_0::Far::LoopLimits<float>::LimitVertex, OpenSubdiv::v3_6_0::Far::LoopLimits<float>::LimitMask>(OpenSubdiv::v3_6_0::Far::LoopLimits<float>::LimitVertex const&, OpenSubdiv::v3_6_0::Far::LoopLimits<float>::LimitMask&) const: pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x10(%rbp), %rdi callq 0xcc5b0 movl %eax, -0x1c(%rbp) movq -0x18(%rbp), %rdi movl $0x1, %esi callq 0xcfda0 movq -0x18(%rbp), %rdi movl -0x1c(%rbp), %esi callq 0xc8e80 movq -0x18(%rbp), %rdi xorl %esi, %esi callq 0xd72c0 movq -0x18(%rbp), %rdi xorl %esi, %esi callq 0xd69b0 cmpl $0x6, -0x1c(%rbp) jne 0x1246db movsd 0xc9a6b(%rip), %xmm0 # 0x1ee030 movsd %xmm0, -0x28(%rbp) movsd 0xc7fd6(%rip), %xmm0 # 0x1ec5a8 movsd %xmm0, -0x30(%rbp) movsd -0x30(%rbp), %xmm0 movsd %xmm0, -0xa8(%rbp) movq -0x18(%rbp), %rdi xorl %esi, %esi callq 0xca270 movsd -0xa8(%rbp), %xmm0 movsd %xmm0, (%rax) movsd -0x28(%rbp), %xmm0 movsd %xmm0, -0xa0(%rbp) movq -0x18(%rbp), %rdi xorl %esi, %esi callq 0xc37e0 movsd -0xa0(%rbp), %xmm0 movsd %xmm0, (%rax) movsd -0x28(%rbp), %xmm0 movsd %xmm0, -0x98(%rbp) movq -0x18(%rbp), %rdi movl $0x1, %esi callq 0xc37e0 movsd -0x98(%rbp), %xmm0 movsd %xmm0, (%rax) movsd -0x28(%rbp), %xmm0 movsd %xmm0, -0x90(%rbp) movq -0x18(%rbp), %rdi movl $0x2, %esi callq 0xc37e0 movsd -0x90(%rbp), %xmm0 movsd %xmm0, (%rax) movsd -0x28(%rbp), %xmm0 movsd %xmm0, -0x88(%rbp) movq -0x18(%rbp), %rdi movl $0x3, %esi callq 0xc37e0 movsd -0x88(%rbp), %xmm0 movsd %xmm0, (%rax) movsd -0x28(%rbp), %xmm0 movsd %xmm0, -0x80(%rbp) movq -0x18(%rbp), %rdi movl $0x4, %esi callq 0xc37e0 movsd -0x80(%rbp), %xmm0 movsd %xmm0, (%rax) movsd -0x28(%rbp), %xmm0 movsd %xmm0, -0x78(%rbp) movq -0x18(%rbp), %rdi movl $0x5, %esi callq 0xc37e0 movsd -0x78(%rbp), %xmm0 movsd %xmm0, (%rax) jmp 0x124839 cvtsi2sdl -0x1c(%rbp), %xmm0 movsd %xmm0, -0x38(%rbp) movsd 0xc7eab(%rip), %xmm0 # 0x1ec598 divsd -0x38(%rbp), %xmm0 movsd %xmm0, -0x40(%rbp) movsd 0xc7eb1(%rip), %xmm0 # 0x1ec5b0 mulsd -0x40(%rbp), %xmm0 callq 0xd67d0 movsd %xmm0, -0x48(%rbp) movsd -0x48(%rbp), %xmm0 movsd 0xc98f5(%rip), %xmm1 # 0x1ee010 mulsd %xmm1, %xmm0 movsd 0xc98f1(%rip), %xmm1 # 0x1ee018 addsd %xmm1, %xmm0 movsd %xmm0, -0x50(%rbp) movsd -0x50(%rbp), %xmm0 movsd -0x50(%rbp), %xmm1 movq %xmm0, %rax movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 xorq %rcx, %rax movq %rax, %xmm0 mulsd %xmm1, %xmm0 movsd 0xc98ab(%rip), %xmm1 # 0x1ee008 addsd %xmm1, %xmm0 mulsd -0x40(%rbp), %xmm0 movsd %xmm0, -0x58(%rbp) movsd -0x38(%rbp), %xmm1 movsd 0xc7ed8(%rip), %xmm2 # 0x1ec650 mulsd -0x58(%rbp), %xmm2 movsd 0xc7e63(%rip), %xmm0 # 0x1ec5e8 divsd %xmm2, %xmm0 addsd %xmm0, %xmm1 movsd 0xc7e03(%rip), %xmm0 # 0x1ec598 divsd %xmm1, %xmm0 movsd %xmm0, -0x60(%rbp) movsd -0x60(%rbp), %xmm0 movsd -0x38(%rbp), %xmm1 movq %xmm0, %rax movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 xorq %rcx, %rax movq %rax, %xmm0 mulsd %xmm1, %xmm0 movsd 0xc7dcd(%rip), %xmm1 # 0x1ec598 addsd %xmm1, %xmm0 movsd %xmm0, -0x68(%rbp) movsd -0x68(%rbp), %xmm0 movsd %xmm0, -0xb0(%rbp) movq -0x18(%rbp), %rdi xorl %esi, %esi callq 0xca270 movsd -0xb0(%rbp), %xmm0 movsd %xmm0, (%rax) movl $0x0, -0x6c(%rbp) movl -0x6c(%rbp), %eax cmpl -0x1c(%rbp), %eax jge 0x124837 movsd -0x60(%rbp), %xmm0 movsd %xmm0, -0xb8(%rbp) movq -0x18(%rbp), %rdi movl -0x6c(%rbp), %esi callq 0xc37e0 movsd -0xb8(%rbp), %xmm0 movsd %xmm0, (%rax) movl -0x6c(%rbp), %eax addl $0x1, %eax movl %eax, -0x6c(%rbp) jmp 0x1247ff jmp 0x124839 addq $0xc0, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
_ZNK10OpenSubdiv6v3_6_03Sdc6SchemeILNS1_10SchemeTypeE2EE21assignSmoothLimitMaskINS0_3Far10LoopLimitsIdE11LimitVertexENS8_9LimitMaskEEEvRKT_RT0_: push rbp mov rbp, rsp sub rsp, 0C0h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rdi, [rbp+var_10] call __ZNK10OpenSubdiv6v3_6_03Far10LoopLimitsIdE11LimitVertex11GetNumFacesEv; OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitVertex::GetNumFaces(void) mov [rbp+var_1C], eax mov rdi, [rbp+var_18] mov esi, 1 call __ZN10OpenSubdiv6v3_6_03Far10LoopLimitsIdE9LimitMask19SetNumVertexWeightsEi; OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::SetNumVertexWeights(int) mov rdi, [rbp+var_18] mov esi, [rbp+var_1C] call __ZN10OpenSubdiv6v3_6_03Far10LoopLimitsIdE9LimitMask17SetNumEdgeWeightsEi; OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::SetNumEdgeWeights(int) mov rdi, [rbp+var_18] xor esi, esi call __ZN10OpenSubdiv6v3_6_03Far10LoopLimitsIdE9LimitMask17SetNumFaceWeightsEi; OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::SetNumFaceWeights(int) mov rdi, [rbp+var_18] xor esi, esi call __ZN10OpenSubdiv6v3_6_03Far10LoopLimitsIdE9LimitMask28SetFaceWeightsForFaceCentersEb; OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::SetFaceWeightsForFaceCenters(bool) cmp [rbp+var_1C], 6 jnz loc_1246DB movsd xmm0, cs:qword_1EE030 movsd [rbp+var_28], xmm0 movsd xmm0, cs:qword_1EC5A8 movsd [rbp+var_30], xmm0 movsd xmm0, [rbp+var_30] movsd [rbp+var_A8], xmm0 mov rdi, [rbp+var_18] xor esi, esi call __ZN10OpenSubdiv6v3_6_03Far10LoopLimitsIdE9LimitMask12VertexWeightEi; OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::VertexWeight(int) movsd xmm0, [rbp+var_A8] movsd qword ptr [rax], xmm0 movsd xmm0, [rbp+var_28] movsd [rbp+var_A0], xmm0 mov rdi, [rbp+var_18] xor esi, esi call __ZN10OpenSubdiv6v3_6_03Far10LoopLimitsIdE9LimitMask10EdgeWeightEi; OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::EdgeWeight(int) movsd xmm0, [rbp+var_A0] movsd qword ptr [rax], xmm0 movsd xmm0, [rbp+var_28] movsd [rbp+var_98], xmm0 mov rdi, [rbp+var_18] mov esi, 1 call __ZN10OpenSubdiv6v3_6_03Far10LoopLimitsIdE9LimitMask10EdgeWeightEi; OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::EdgeWeight(int) movsd xmm0, [rbp+var_98] movsd qword ptr [rax], xmm0 movsd xmm0, [rbp+var_28] movsd [rbp+var_90], xmm0 mov rdi, [rbp+var_18] mov esi, 2 call __ZN10OpenSubdiv6v3_6_03Far10LoopLimitsIdE9LimitMask10EdgeWeightEi; OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::EdgeWeight(int) movsd xmm0, [rbp+var_90] movsd qword ptr [rax], xmm0 movsd xmm0, [rbp+var_28] movsd [rbp+var_88], xmm0 mov rdi, [rbp+var_18] mov esi, 3 call __ZN10OpenSubdiv6v3_6_03Far10LoopLimitsIdE9LimitMask10EdgeWeightEi; OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::EdgeWeight(int) movsd xmm0, [rbp+var_88] movsd qword ptr [rax], xmm0 movsd xmm0, [rbp+var_28] movsd [rbp+var_80], xmm0 mov rdi, [rbp+var_18] mov esi, 4 call __ZN10OpenSubdiv6v3_6_03Far10LoopLimitsIdE9LimitMask10EdgeWeightEi; OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::EdgeWeight(int) movsd xmm0, [rbp+var_80] movsd qword ptr [rax], xmm0 movsd xmm0, [rbp+var_28] movsd [rbp+var_78], xmm0 mov rdi, [rbp+var_18] mov esi, 5 call __ZN10OpenSubdiv6v3_6_03Far10LoopLimitsIdE9LimitMask10EdgeWeightEi; OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::EdgeWeight(int) movsd xmm0, [rbp+var_78] movsd qword ptr [rax], xmm0 jmp loc_124839 loc_1246DB: cvtsi2sd xmm0, [rbp+var_1C] movsd [rbp+var_38], xmm0 movsd xmm0, cs:qword_1EC598 divsd xmm0, [rbp+var_38] movsd [rbp+var_40], xmm0 movsd xmm0, cs:qword_1EC5B0 mulsd xmm0, [rbp+var_40] call _cos movsd [rbp+var_48], xmm0 movsd xmm0, [rbp+var_48] movsd xmm1, cs:qword_1EE010 mulsd xmm0, xmm1 movsd xmm1, cs:qword_1EE018 addsd xmm0, xmm1 movsd [rbp+var_50], xmm0 movsd xmm0, [rbp+var_50] movsd xmm1, [rbp+var_50] movq rax, xmm0 mov rcx, 8000000000000000h xor rax, rcx movq xmm0, rax mulsd xmm0, xmm1 movsd xmm1, cs:qword_1EE008 addsd xmm0, xmm1 mulsd xmm0, [rbp+var_40] movsd [rbp+var_58], xmm0 movsd xmm1, [rbp+var_38] movsd xmm2, cs:qword_1EC650 mulsd xmm2, [rbp+var_58] movsd xmm0, cs:qword_1EC5E8 divsd xmm0, xmm2 addsd xmm1, xmm0 movsd xmm0, cs:qword_1EC598 divsd xmm0, xmm1 movsd [rbp+var_60], xmm0 movsd xmm0, [rbp+var_60] movsd xmm1, [rbp+var_38] movq rax, xmm0 mov rcx, 8000000000000000h xor rax, rcx movq xmm0, rax mulsd xmm0, xmm1 movsd xmm1, cs:qword_1EC598 addsd xmm0, xmm1 movsd [rbp+var_68], xmm0 movsd xmm0, [rbp+var_68] movsd [rbp+var_B0], xmm0 mov rdi, [rbp+var_18] xor esi, esi call __ZN10OpenSubdiv6v3_6_03Far10LoopLimitsIdE9LimitMask12VertexWeightEi; OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::VertexWeight(int) movsd xmm0, [rbp+var_B0] movsd qword ptr [rax], xmm0 mov [rbp+var_6C], 0 loc_1247FF: mov eax, [rbp+var_6C] cmp eax, [rbp+var_1C] jge short loc_124837 movsd xmm0, [rbp+var_60] movsd [rbp+var_B8], xmm0 mov rdi, [rbp+var_18] mov esi, [rbp+var_6C] call __ZN10OpenSubdiv6v3_6_03Far10LoopLimitsIdE9LimitMask10EdgeWeightEi; OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::EdgeWeight(int) movsd xmm0, [rbp+var_B8] movsd qword ptr [rax], xmm0 mov eax, [rbp+var_6C] add eax, 1 mov [rbp+var_6C], eax jmp short loc_1247FF loc_124837: jmp short $+2 loc_124839: add rsp, 0C0h pop rbp retn
long long OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>::assignSmoothLimitMask<OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitVertex,OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask>( long long a1, long long a2, long long a3) { long long result; // rax double v4; // xmm2_8 unsigned int i; // [rsp+54h] [rbp-6Ch] double v6; // [rsp+70h] [rbp-50h] double v7; // [rsp+80h] [rbp-40h] int NumFaces; // [rsp+A4h] [rbp-1Ch] NumFaces = OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitVertex::GetNumFaces(a2); OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::SetNumVertexWeights(a3, 1LL); OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::SetNumEdgeWeights(a3, (unsigned int)NumFaces); OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::SetNumFaceWeights(a3, 0LL); OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::SetFaceWeightsForFaceCenters(a3, 0LL); if ( NumFaces == 6 ) { *(_QWORD *)OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::VertexWeight(a3, 0LL) = 0x3FE0000000000000LL; *(_QWORD *)OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::EdgeWeight(a3, 0LL) = 0x3FB5555555555555LL; *(_QWORD *)OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::EdgeWeight(a3, 1LL) = 0x3FB5555555555555LL; *(_QWORD *)OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::EdgeWeight(a3, 2LL) = 0x3FB5555555555555LL; *(_QWORD *)OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::EdgeWeight(a3, 3LL) = 0x3FB5555555555555LL; *(_QWORD *)OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::EdgeWeight(a3, 4LL) = 0x3FB5555555555555LL; result = OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::EdgeWeight(a3, 5LL); *(_QWORD *)result = 0x3FB5555555555555LL; } else { v7 = 1.0 / (double)NumFaces; v6 = cos(6.283185307179586 * v7) * 0.25 + 0.375; v4 = 8.0 * ((-v6 * v6 + 0.625) * v7); *(double *)OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::VertexWeight(a3, 0LL) = -(1.0 / ((double)NumFaces + 3.0 / v4)) * (double)NumFaces + 1.0; for ( i = 0; ; ++i ) { result = i; if ( (int)i >= NumFaces ) break; *(double *)OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask::EdgeWeight(a3, i) = 1.0 / ((double)NumFaces + 3.0 / v4); } } return result; }
25,502
void OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>::assignSmoothLimitMask<OpenSubdiv::v3_6_0::Far::LoopLimits<float>::LimitVertex, OpenSubdiv::v3_6_0::Far::LoopLimits<float>::LimitMask>(OpenSubdiv::v3_6_0::Far::LoopLimits<float>::LimitVertex const&, OpenSubdiv::v3_6_0::Far::LoopLimits<float>::LimitMask&) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/../sdc/loopScheme.h
inline void Scheme<SCHEME_LOOP>::assignSmoothLimitMask(VERTEX const& vertex, MASK& posMask) const { typedef typename MASK::Weight Weight; int valence = vertex.GetNumFaces(); posMask.SetNumVertexWeights(1); posMask.SetNumEdgeWeights(valence); posMask.SetNumFaceWeights(0); posMask.SetFaceWeightsForFaceCenters(false); // Specialize for the regular case: 1/12 per edge-vert, 1/2 for the vert itself: if (valence == 6) { Weight eWeight = (Weight) (1.0 / 12.0); Weight vWeight = 0.5f; posMask.VertexWeight(0) = vWeight; posMask.EdgeWeight(0) = eWeight; posMask.EdgeWeight(1) = eWeight; posMask.EdgeWeight(2) = eWeight; posMask.EdgeWeight(3) = eWeight; posMask.EdgeWeight(4) = eWeight; posMask.EdgeWeight(5) = eWeight; } else { double dValence = (double) valence; double invValence = 1.0f / dValence; double cosTheta = std::cos(std::numbers::pi * 2.0f * invValence); double beta = 0.25f * cosTheta + 0.375f; double gamma = (0.625f - (beta * beta)) * invValence; Weight eWeight = (Weight) (1.0f / (dValence + 3.0f / (8.0f * gamma))); Weight vWeight = (Weight) (1.0f - (eWeight * dValence)); posMask.VertexWeight(0) = vWeight; for (int i = 0; i < valence; ++i) { posMask.EdgeWeight(i) = eWeight; } } }
O2
c
void OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>::assignSmoothLimitMask<OpenSubdiv::v3_6_0::Far::LoopLimits<float>::LimitVertex, OpenSubdiv::v3_6_0::Far::LoopLimits<float>::LimitMask>(OpenSubdiv::v3_6_0::Far::LoopLimits<float>::LimitVertex const&, OpenSubdiv::v3_6_0::Far::LoopLimits<float>::LimitMask&) const: pushq %r14 pushq %rbx subq $0x18, %rsp movq %rdx, %rbx movl (%rsi), %r14d movl %r14d, 0x8(%rdx) cmpl $0x6, %r14d jne 0x6f730 movq (%rbx), %rax movaps 0x50acb(%rip), %xmm0 # 0xc01d0 movups %xmm0, (%rax) movapd 0x50ad0(%rip), %xmm0 # 0xc01e0 movupd %xmm0, 0x10(%rax) movupd %xmm0, 0x20(%rax) movabsq $0x3fb5555555555555, %rcx # imm = 0x3FB5555555555555 movq %rcx, 0x30(%rax) addq $0x18, %rsp popq %rbx popq %r14 retq cvtsi2sd %r14d, %xmm1 movsd %xmm1, 0x10(%rsp) movsd 0x4edc5(%rip), %xmm2 # 0xbe508 divsd %xmm1, %xmm2 movsd %xmm2, 0x8(%rsp) movsd 0x4eda3(%rip), %xmm0 # 0xbe4f8 mulsd %xmm2, %xmm0 callq 0x557b0 mulsd 0x508ea(%rip), %xmm0 # 0xc0050 addsd 0x508ea(%rip), %xmm0 # 0xc0058 mulsd %xmm0, %xmm0 movsd 0x508e6(%rip), %xmm1 # 0xc0060 subsd %xmm0, %xmm1 mulsd 0x8(%rsp), %xmm1 mulsd 0x508dc(%rip), %xmm1 # 0xc0068 movsd 0x4ed94(%rip), %xmm2 # 0xbe528 divsd %xmm1, %xmm2 movsd 0x10(%rsp), %xmm3 addsd %xmm3, %xmm2 movsd 0x4ed5e(%rip), %xmm1 # 0xbe508 movapd %xmm1, %xmm0 divsd %xmm2, %xmm0 mulsd %xmm0, %xmm3 subsd %xmm3, %xmm1 movq (%rbx), %rax movsd %xmm1, (%rax) xorl %ecx, %ecx testl %r14d, %r14d cmovlel %ecx, %r14d cmpq %rcx, %r14 je 0x6f728 movsd %xmm0, 0x8(%rax,%rcx,8) incq %rcx jmp 0x6f7ca
_ZNK10OpenSubdiv6v3_6_03Sdc6SchemeILNS1_10SchemeTypeE2EE21assignSmoothLimitMaskINS0_3Far10LoopLimitsIdE11LimitVertexENS8_9LimitMaskEEEvRKT_RT0_: push r14 push rbx sub rsp, 18h mov rbx, rdx mov r14d, [rsi] mov [rdx+8], r14d cmp r14d, 6 jnz short loc_6F730 mov rax, [rbx] movaps xmm0, cs:xmmword_C01D0 movups xmmword ptr [rax], xmm0 movapd xmm0, cs:xmmword_C01E0 movupd xmmword ptr [rax+10h], xmm0 movupd xmmword ptr [rax+20h], xmm0 mov rcx, 3FB5555555555555h mov [rax+30h], rcx loc_6F728: add rsp, 18h pop rbx pop r14 retn loc_6F730: cvtsi2sd xmm1, r14d movsd [rsp+28h+var_18], xmm1 movsd xmm2, cs:qword_BE508 divsd xmm2, xmm1 movsd [rsp+28h+var_20], xmm2 movsd xmm0, cs:qword_BE4F8 mulsd xmm0, xmm2 call _cos mulsd xmm0, cs:qword_C0050 addsd xmm0, cs:qword_C0058 mulsd xmm0, xmm0 movsd xmm1, cs:qword_C0060 subsd xmm1, xmm0 mulsd xmm1, [rsp+28h+var_20] mulsd xmm1, cs:qword_C0068 movsd xmm2, cs:qword_BE528 divsd xmm2, xmm1 movsd xmm3, [rsp+28h+var_18] addsd xmm2, xmm3 movsd xmm1, cs:qword_BE508 movapd xmm0, xmm1 divsd xmm0, xmm2 mulsd xmm3, xmm0 subsd xmm1, xmm3 mov rax, [rbx] movsd qword ptr [rax], xmm1 xor ecx, ecx test r14d, r14d cmovle r14d, ecx loc_6F7CA: cmp r14, rcx jz loc_6F728 movsd qword ptr [rax+rcx*8+8], xmm0 inc rcx jmp short loc_6F7CA
double * OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>::assignSmoothLimitMask<OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitVertex,OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask>( long long a1, unsigned int *a2, long long a3) { long long v4; // r14 double *result; // rax double v6; // xmm0_8 double v7; // xmm2_8 long long v8; // rcx double v9; // [rsp+8h] [rbp-20h] v4 = *a2; *(_DWORD *)(a3 + 8) = v4; if ( (_DWORD)v4 == 6 ) { result = *(double **)a3; *(_OWORD *)result = xmmword_C01D0; *((_OWORD *)result + 1) = xmmword_C01E0; *((_OWORD *)result + 2) = xmmword_C01E0; result[6] = 0.08333333333333333; } else { v9 = 1.0 / (double)(int)v4; v6 = cos(6.283185307179586 * v9); v7 = 3.0 / ((0.625 - (v6 * 0.25 + 0.375) * (v6 * 0.25 + 0.375)) * v9 * 8.0) + (double)(int)v4; result = *(double **)a3; **(double **)a3 = 1.0 - (double)(int)v4 * (1.0 / v7); v8 = 0LL; if ( (int)v4 <= 0 ) v4 = 0LL; while ( v4 != v8 ) result[++v8] = 1.0 / v7; } return result; }
assignSmoothLimitMask<OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitVertex,OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask>: PUSH R14 PUSH RBX SUB RSP,0x18 MOV RBX,RDX MOV R14D,dword ptr [RSI] MOV dword ptr [RDX + 0x8],R14D CMP R14D,0x6 JNZ 0x0016f730 MOV RAX,qword ptr [RBX] MOVAPS XMM0,xmmword ptr [0x001c01d0] MOVUPS xmmword ptr [RAX],XMM0 MOVAPD XMM0,xmmword ptr [0x001c01e0] MOVUPD xmmword ptr [RAX + 0x10],XMM0 MOVUPD xmmword ptr [RAX + 0x20],XMM0 MOV RCX,0x3fb5555555555555 MOV qword ptr [RAX + 0x30],RCX LAB_0016f728: ADD RSP,0x18 POP RBX POP R14 RET LAB_0016f730: CVTSI2SD XMM1,R14D MOVSD qword ptr [RSP + 0x10],XMM1 MOVSD XMM2,qword ptr [0x001be508] DIVSD XMM2,XMM1 MOVSD qword ptr [RSP + 0x8],XMM2 MOVSD XMM0,qword ptr [0x001be4f8] MULSD XMM0,XMM2 CALL 0x001557b0 MULSD XMM0,qword ptr [0x001c0050] ADDSD XMM0,qword ptr [0x001c0058] MULSD XMM0,XMM0 MOVSD XMM1,qword ptr [0x001c0060] SUBSD XMM1,XMM0 MULSD XMM1,qword ptr [RSP + 0x8] MULSD XMM1,qword ptr [0x001c0068] MOVSD XMM2,qword ptr [0x001be528] DIVSD XMM2,XMM1 MOVSD XMM3,qword ptr [RSP + 0x10] ADDSD XMM2,XMM3 MOVSD XMM1,qword ptr [0x001be508] MOVAPD XMM0,XMM1 DIVSD XMM0,XMM2 MULSD XMM3,XMM0 SUBSD XMM1,XMM3 MOV RAX,qword ptr [RBX] MOVSD qword ptr [RAX],XMM1 XOR ECX,ECX TEST R14D,R14D CMOVLE R14D,ECX LAB_0016f7ca: CMP R14,RCX JZ 0x0016f728 MOVSD qword ptr [RAX + RCX*0x8 + 0x8],XMM0 INC RCX JMP 0x0016f7ca
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* void OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>::assignSmoothLimitMask<OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitVertex, OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask>(OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitVertex const&, OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask&) const */ void __thiscall OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2>:: assignSmoothLimitMask<OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitVertex,OpenSubdiv::v3_6_0::Far::LoopLimits<double>::LimitMask> (Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)2> *this,LimitVertex *param_1, LimitMask *param_2) { uint uVar1; int8 *puVar2; double *pdVar3; double dVar4; int8 uVar5; int8 uVar6; ulong uVar7; ulong uVar8; double dVar9; double dVar10; uVar1 = *(uint *)param_1; *(uint *)(param_2 + 8) = uVar1; uVar5 = _UNK_001c01d8; if (uVar1 == 6) { puVar2 = *(int8 **)param_2; *puVar2 = _DAT_001c01d0; puVar2[1] = uVar5; uVar6 = _UNK_001c01e8; uVar5 = _DAT_001c01e0; puVar2[2] = _DAT_001c01e0; puVar2[3] = uVar6; puVar2[4] = uVar5; puVar2[5] = uVar6; puVar2[6] = 0x3fb5555555555555; } else { dVar9 = (double)(int)uVar1; dVar10 = DAT_001be508 / dVar9; dVar4 = cos(DAT_001be4f8 * dVar10); dVar4 = dVar4 * DAT_001c0050 + _DAT_001c0058; dVar4 = DAT_001be508 / (DAT_001be528 / ((DAT_001c0060 - dVar4 * dVar4) * dVar10 * DAT_001c0068) + dVar9); pdVar3 = *(double **)param_2; *pdVar3 = DAT_001be508 - dVar9 * dVar4; uVar7 = 0; uVar8 = (ulong)uVar1; if ((int)uVar1 < 1) { uVar8 = uVar7; } for (; uVar8 != uVar7; uVar7 = uVar7 + 1) { pdVar3[uVar7 + 1] = dVar4; } } return; }
25,503
CLI::detail::sum_string_vector(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&)
MikePodsytnik[P]TCRtrie/build_O0/_deps/cli11-src/include/CLI/TypeTools.hpp
inline std::string sum_string_vector(const std::vector<std::string> &values) { double val{0.0}; bool fail{false}; std::string output; for(const auto &arg : values) { double tv{0.0}; auto comp = lexical_cast(arg, tv); if(!comp) { try { tv = static_cast<double>(detail::to_flag_value(arg)); } catch(const std::exception &) { fail = true; break; } } val += tv; } if(fail) { for(const auto &arg : values) { output.append(arg); } } else { if(val <= static_cast<double>((std::numeric_limits<std::int64_t>::min)()) || val >= static_cast<double>((std::numeric_limits<std::int64_t>::max)()) || std::ceil(val) == std::floor(val)) { output = detail::value_string(static_cast<int64_t>(val)); } else { output = detail::value_string(val); } } return output; }
O0
cpp
CLI::detail::sum_string_vector(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&): pushq %rbp movq %rsp, %rbp subq $0x130, %rsp # imm = 0x130 movq %rdi, -0x100(%rbp) movq %rdi, %rax movq %rax, -0xf8(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) xorps %xmm0, %xmm0 movsd %xmm0, -0x18(%rbp) movb $0x0, -0x19(%rbp) movb $0x0, -0x1a(%rbp) callq 0x9890 movq -0x10(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rdi callq 0x1b060 movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rdi callq 0x1b090 movq %rax, -0x38(%rbp) leaq -0x30(%rbp), %rdi leaq -0x38(%rbp), %rsi callq 0x1b0c0 testb $0x1, %al jne 0x20911 jmp 0x20a0d leaq -0x30(%rbp), %rdi callq 0x1b100 movq %rax, -0x40(%rbp) movq $0x0, -0x48(%rbp) movq -0x40(%rbp), %rdi leaq -0x48(%rbp), %rsi callq 0x21540 movb %al, -0x101(%rbp) jmp 0x2093b movb -0x101(%rbp), %al andb $0x1, %al movb %al, -0x49(%rbp) testb $0x1, -0x49(%rbp) jne 0x209f0 movq -0x40(%rbp), %rsi leaq -0x80(%rbp), %rdi callq 0x9250 jmp 0x2095f leaq -0x80(%rbp), %rdi callq 0x215e0 movq %rax, -0x110(%rbp) jmp 0x20971 movq -0x110(%rbp), %rax cvtsi2sd %rax, %xmm0 movsd %xmm0, -0x48(%rbp) leaq -0x80(%rbp), %rdi callq 0x9b90 jmp 0x209ee movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) jmp 0x20bb3 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) jmp 0x209c1 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) leaq -0x80(%rbp), %rdi callq 0x9b90 movl -0x5c(%rbp), %eax movl $0x1, %ecx cmpl %ecx, %eax jne 0x20bb3 movq -0x58(%rbp), %rdi callq 0x9220 movq %rax, -0x88(%rbp) movb $0x1, -0x19(%rbp) callq 0x99a0 jmp 0x209ec jmp 0x20a0d jmp 0x209f0 movsd -0x48(%rbp), %xmm0 addsd -0x18(%rbp), %xmm0 movsd %xmm0, -0x18(%rbp) leaq -0x30(%rbp), %rdi callq 0x1b160 jmp 0x208fb testb $0x1, -0x19(%rbp) je 0x20a9e movq -0x10(%rbp), %rax movq %rax, -0x90(%rbp) movq -0x90(%rbp), %rdi callq 0x1b060 movq %rax, -0x98(%rbp) movq -0x90(%rbp), %rdi callq 0x1b090 movq %rax, -0xa0(%rbp) leaq -0x98(%rbp), %rdi leaq -0xa0(%rbp), %rsi callq 0x1b0c0 testb $0x1, %al jne 0x20a61 jmp 0x20a99 leaq -0x98(%rbp), %rdi callq 0x1b100 movq -0x100(%rbp), %rdi movq %rax, -0xa8(%rbp) movq -0xa8(%rbp), %rsi callq 0x9b20 jmp 0x20a89 jmp 0x20a8b leaq -0x98(%rbp), %rdi callq 0x1b160 jmp 0x20a48 jmp 0x20b8d movsd -0x18(%rbp), %xmm0 movsd %xmm0, -0x118(%rbp) callq 0x21a10 movsd -0x118(%rbp), %xmm1 cvtsi2sd %rax, %xmm0 ucomisd %xmm1, %xmm0 jae 0x20b17 movsd -0x18(%rbp), %xmm0 movsd %xmm0, -0x120(%rbp) callq 0x21a20 movsd -0x120(%rbp), %xmm0 cvtsi2sd %rax, %xmm1 ucomisd %xmm1, %xmm0 jae 0x20b17 movsd -0x18(%rbp), %xmm0 callq 0x90b0 movsd %xmm0, -0x128(%rbp) movsd -0x18(%rbp), %xmm0 callq 0x9a10 movaps %xmm0, %xmm1 movsd -0x128(%rbp), %xmm0 ucomisd %xmm1, %xmm0 jne 0x20b5a jp 0x20b5a cvttsd2si -0x18(%rbp), %rax movq %rax, -0xd0(%rbp) leaq -0xc8(%rbp), %rdi leaq -0xd0(%rbp), %rsi callq 0x21a30 jmp 0x20b39 movq -0x100(%rbp), %rdi leaq -0xc8(%rbp), %rsi callq 0x9790 leaq -0xc8(%rbp), %rdi callq 0x9b90 jmp 0x20b8b leaq -0xf0(%rbp), %rdi leaq -0x18(%rbp), %rsi callq 0x21a60 jmp 0x20b6c movq -0x100(%rbp), %rdi leaq -0xf0(%rbp), %rsi callq 0x9790 leaq -0xf0(%rbp), %rdi callq 0x9b90 jmp 0x20b8d movb $0x1, -0x1a(%rbp) testb $0x1, -0x1a(%rbp) jne 0x20ba3 movq -0x100(%rbp), %rdi callq 0x9b90 movq -0xf8(%rbp), %rax addq $0x130, %rsp # imm = 0x130 popq %rbp retq movq -0x100(%rbp), %rdi callq 0x9b90 movq -0x58(%rbp), %rdi callq 0x9a70 nopl (%rax,%rax)
_ZN3CLI6detail17sum_string_vectorERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE: push rbp mov rbp, rsp sub rsp, 130h mov [rbp+var_100], rdi mov rax, rdi mov [rbp+var_F8], rax mov [rbp+var_8], rdi mov [rbp+var_10], rsi xorps xmm0, xmm0 movsd [rbp+var_18], xmm0 mov [rbp+var_19], 0 mov [rbp+var_1A], 0 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void) mov rax, [rbp+var_10] mov [rbp+var_28], rax mov rdi, [rbp+var_28] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void) mov [rbp+var_30], rax mov rdi, [rbp+var_28] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE3endEv; std::vector<std::string>::end(void) mov [rbp+var_38], rax loc_208FB: lea rdi, [rbp+var_30] lea rsi, [rbp+var_38] call _ZN9__gnu_cxxneIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESH_; __gnu_cxx::operator!=<std::string const*,std::vector<std::string>>(__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>> const&,__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>> const&) test al, 1 jnz short loc_20911 jmp loc_20A0D loc_20911: lea rdi, [rbp+var_30] call _ZNK9__gnu_cxx17__normal_iteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEdeEv; __gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator*(void) mov [rbp+var_40], rax mov [rbp+var_48], 0 mov rdi, [rbp+var_40] lea rsi, [rbp+var_48] call _ZN3CLI6detail12lexical_castIdTnNSt9enable_ifIXeqsr15classify_objectIT_EE5valueLNS0_15object_categoryE10EENS0_7enablerEE4typeELS5_0EEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS3_ mov [rbp+var_101], al jmp short $+2 loc_2093B: mov al, [rbp+var_101] and al, 1 mov [rbp+var_49], al test [rbp+var_49], 1 jnz loc_209F0 mov rsi, [rbp+var_40] lea rdi, [rbp+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&) jmp short $+2 loc_2095F: lea rdi, [rbp+var_80] call _ZN3CLI6detail13to_flag_valueENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::detail::to_flag_value(std::string) mov [rbp+var_110], rax jmp short $+2 loc_20971: mov rax, [rbp+var_110] cvtsi2sd xmm0, rax movsd [rbp+var_48], xmm0 lea rdi, [rbp+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_209EE mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax jmp loc_20BB3 mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax jmp short loc_209C1 mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax lea rdi, [rbp+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_209C1: mov eax, [rbp+var_5C] mov ecx, 1 cmp eax, ecx jnz loc_20BB3 mov rdi, [rbp+var_58]; void * call ___cxa_begin_catch mov [rbp+var_88], rax mov [rbp+var_19], 1 call ___cxa_end_catch jmp short $+2 loc_209EC: jmp short loc_20A0D loc_209EE: jmp short $+2 loc_209F0: movsd xmm0, [rbp+var_48] addsd xmm0, [rbp+var_18] movsd [rbp+var_18], xmm0 lea rdi, [rbp+var_30] call _ZN9__gnu_cxx17__normal_iteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEppEv; __gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator++(void) jmp loc_208FB loc_20A0D: test [rbp+var_19], 1 jz loc_20A9E mov rax, [rbp+var_10] mov [rbp+var_90], rax mov rdi, [rbp+var_90] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void) mov [rbp+var_98], rax mov rdi, [rbp+var_90] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE3endEv; std::vector<std::string>::end(void) mov [rbp+var_A0], rax loc_20A48: lea rdi, [rbp+var_98] lea rsi, [rbp+var_A0] call _ZN9__gnu_cxxneIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESH_; __gnu_cxx::operator!=<std::string const*,std::vector<std::string>>(__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>> const&,__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>> const&) test al, 1 jnz short loc_20A61 jmp short loc_20A99 loc_20A61: lea rdi, [rbp+var_98] call _ZNK9__gnu_cxx17__normal_iteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEdeEv; __gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator*(void) mov rdi, [rbp+var_100] mov [rbp+var_A8], rax mov rsi, [rbp+var_A8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&) jmp short $+2 loc_20A89: jmp short $+2 loc_20A8B: lea rdi, [rbp+var_98] call _ZN9__gnu_cxx17__normal_iteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEppEv; __gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator++(void) jmp short loc_20A48 loc_20A99: jmp loc_20B8D loc_20A9E: movsd xmm0, [rbp+var_18] movsd [rbp+var_118], xmm0 call _ZNSt14numeric_limitsIlE3minEv; std::numeric_limits<long>::min(void) movsd xmm1, [rbp+var_118] cvtsi2sd xmm0, rax ucomisd xmm0, xmm1 jnb short loc_20B17 movsd xmm0, [rbp+var_18] movsd [rbp+var_120], xmm0 call _ZNSt14numeric_limitsIlE3maxEv; std::numeric_limits<long>::max(void) movsd xmm0, [rbp+var_120] cvtsi2sd xmm1, rax ucomisd xmm0, xmm1 jnb short loc_20B17 movsd xmm0, [rbp+var_18] call _ceil movsd [rbp+var_128], xmm0 movsd xmm0, [rbp+var_18] call _floor movaps xmm1, xmm0 movsd xmm0, [rbp+var_128] ucomisd xmm0, xmm1 jnz short loc_20B5A jp short loc_20B5A loc_20B17: cvttsd2si rax, [rbp+var_18] mov [rbp+var_D0], rax lea rdi, [rbp+var_C8] lea rsi, [rbp+var_D0] call _ZN3CLI6detail12value_stringIlTnNSt9enable_ifIXsr3std13is_arithmeticIT_EE5valueENS0_7enablerEE4typeELS4_0EEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS3_ jmp short $+2 loc_20B39: mov rdi, [rbp+var_100] lea rsi, [rbp+var_C8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) lea rdi, [rbp+var_C8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_20B8B loc_20B5A: lea rdi, [rbp+var_F0] lea rsi, [rbp+var_18] call _ZN3CLI6detail12value_stringIdTnNSt9enable_ifIXsr3std13is_arithmeticIT_EE5valueENS0_7enablerEE4typeELS4_0EEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS3_ jmp short $+2 loc_20B6C: mov rdi, [rbp+var_100] lea rsi, [rbp+var_F0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) lea rdi, [rbp+var_F0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_20B8B: jmp short $+2 loc_20B8D: mov [rbp+var_1A], 1 test [rbp+var_1A], 1 jnz short loc_20BA3 mov rdi, [rbp+var_100]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_20BA3: mov rax, [rbp+var_F8] add rsp, 130h pop rbp retn loc_20BB3: mov rdi, [rbp+var_100]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rdi, [rbp+var_58] call __Unwind_Resume
long long CLI::detail::sum_string_vector( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6) { double v7; // [rsp+8h] [rbp-128h] double v8; // [rsp+10h] [rbp-120h] double v9; // [rsp+18h] [rbp-118h] _BYTE v10[32]; // [rsp+40h] [rbp-F0h] BYREF long long v11; // [rsp+60h] [rbp-D0h] BYREF _BYTE v12[32]; // [rsp+68h] [rbp-C8h] BYREF long long v13; // [rsp+88h] [rbp-A8h] long long v14; // [rsp+90h] [rbp-A0h] BYREF long long v15; // [rsp+98h] [rbp-98h] BYREF long long v16; // [rsp+A0h] [rbp-90h] _BYTE v17[36]; // [rsp+B0h] [rbp-80h] BYREF double v19; // [rsp+E8h] [rbp-48h] BYREF long long v20; // [rsp+F0h] [rbp-40h] long long v21; // [rsp+F8h] [rbp-38h] BYREF _QWORD v22[2]; // [rsp+100h] [rbp-30h] BYREF char v23; // [rsp+116h] [rbp-1Ah] char v24; // [rsp+117h] [rbp-19h] double v25; // [rsp+118h] [rbp-18h] BYREF long long v26; // [rsp+120h] [rbp-10h] long long v27; // [rsp+128h] [rbp-8h] v27 = a1; v26 = a2; v25 = 0.0; v24 = 0; v23 = 0; std::string::basic_string(a1, a2, a3, a4, a5, a6); v22[1] = a2; v22[0] = std::vector<std::string>::begin(a2); v21 = std::vector<std::string>::end(a2); while ( __gnu_cxx::operator!=<std::string const*,std::vector<std::string>>((long long)v22, (long long)&v21) ) { v20 = __gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator*((long long)v22); v19 = 0.0; if ( !(ZN3CLI6detail12lexical_castIdTnNSt9enable_ifIXeqsr15classify_objectIT_EE5valueLNS0_15object_categoryE10EENS0_7enablerEE4typeELS5_0EEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS3_( v20, &v19) & 1) ) { std::string::basic_string(v17, v20); v19 = (double)(int)CLI::detail::to_flag_value(v17); std::string::~string(v17); } v25 = v19 + v25; __gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator++(v22); } if ( (v24 & 1) != 0 ) { v16 = v26; v15 = std::vector<std::string>::begin(v26); v14 = std::vector<std::string>::end(v16); while ( __gnu_cxx::operator!=<std::string const*,std::vector<std::string>>((long long)&v15, (long long)&v14) ) { v13 = __gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator*((long long)&v15); std::string::append(a1, v13); __gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator++(&v15); } } else { v9 = v25; if ( (double)(int)std::numeric_limits<long>::min() >= v9 || (v8 = v25, v8 >= (double)(int)std::numeric_limits<long>::max()) || (v7 = ceil(v25), v7 == floor(v25)) ) { v11 = (unsigned int)(int)v25; ZN3CLI6detail12value_stringIlTnNSt9enable_ifIXsr3std13is_arithmeticIT_EE5valueENS0_7enablerEE4typeELS4_0EEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS3_( v12, &v11); std::string::operator=(a1); std::string::~string(v12); } else { ZN3CLI6detail12value_stringIdTnNSt9enable_ifIXsr3std13is_arithmeticIT_EE5valueENS0_7enablerEE4typeELS4_0EEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS3_( v10, &v25); std::string::operator=(a1); std::string::~string(v10); } } return a1; }
sum_string_vector: PUSH RBP MOV RBP,RSP SUB RSP,0x130 MOV qword ptr [RBP + -0x100],RDI MOV RAX,RDI MOV qword ptr [RBP + -0xf8],RAX MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI XORPS XMM0,XMM0 MOVSD qword ptr [RBP + -0x18],XMM0 MOV byte ptr [RBP + -0x19],0x0 MOV byte ptr [RBP + -0x1a],0x0 CALL 0x00109890 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x28] CALL 0x0011b060 MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x28] CALL 0x0011b090 MOV qword ptr [RBP + -0x38],RAX LAB_001208fb: LEA RDI,[RBP + -0x30] LEA RSI,[RBP + -0x38] CALL 0x0011b0c0 TEST AL,0x1 JNZ 0x00120911 JMP 0x00120a0d LAB_00120911: LEA RDI,[RBP + -0x30] CALL 0x0011b100 MOV qword ptr [RBP + -0x40],RAX MOV qword ptr [RBP + -0x48],0x0 MOV RDI,qword ptr [RBP + -0x40] LAB_0012092a: LEA RSI,[RBP + -0x48] CALL 0x00121540 MOV byte ptr [RBP + -0x101],AL JMP 0x0012093b LAB_0012093b: MOV AL,byte ptr [RBP + -0x101] AND AL,0x1 MOV byte ptr [RBP + -0x49],AL TEST byte ptr [RBP + -0x49],0x1 JNZ 0x001209f0 MOV RSI,qword ptr [RBP + -0x40] LAB_00120954: LEA RDI,[RBP + -0x80] CALL 0x00109250 JMP 0x0012095f LAB_0012095f: LEA RDI,[RBP + -0x80] CALL 0x001215e0 LAB_00120968: MOV qword ptr [RBP + -0x110],RAX JMP 0x00120971 LAB_00120971: MOV RAX,qword ptr [RBP + -0x110] CVTSI2SD XMM0,RAX MOVSD qword ptr [RBP + -0x48],XMM0 LEA RDI,[RBP + -0x80] CALL 0x00109b90 JMP 0x001209ee LAB_001209ee: JMP 0x001209f0 LAB_001209f0: MOVSD XMM0,qword ptr [RBP + -0x48] ADDSD XMM0,qword ptr [RBP + -0x18] MOVSD qword ptr [RBP + -0x18],XMM0 LEA RDI,[RBP + -0x30] CALL 0x0011b160 JMP 0x001208fb LAB_00120a0d: TEST byte ptr [RBP + -0x19],0x1 JZ 0x00120a9e MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x90],RAX MOV RDI,qword ptr [RBP + -0x90] CALL 0x0011b060 MOV qword ptr [RBP + -0x98],RAX MOV RDI,qword ptr [RBP + -0x90] CALL 0x0011b090 MOV qword ptr [RBP + -0xa0],RAX LAB_00120a48: LEA RDI,[RBP + -0x98] LEA RSI,[RBP + -0xa0] CALL 0x0011b0c0 TEST AL,0x1 JNZ 0x00120a61 JMP 0x00120a99 LAB_00120a61: LEA RDI,[RBP + -0x98] CALL 0x0011b100 MOV RDI,qword ptr [RBP + -0x100] MOV qword ptr [RBP + -0xa8],RAX MOV RSI,qword ptr [RBP + -0xa8] CALL 0x00109b20 LAB_00120a87: JMP 0x00120a89 LAB_00120a89: JMP 0x00120a8b LAB_00120a8b: LEA RDI,[RBP + -0x98] CALL 0x0011b160 JMP 0x00120a48 LAB_00120a99: JMP 0x00120b8d LAB_00120a9e: MOVSD XMM0,qword ptr [RBP + -0x18] MOVSD qword ptr [RBP + -0x118],XMM0 CALL 0x00121a10 MOVSD XMM1,qword ptr [RBP + -0x118] CVTSI2SD XMM0,RAX UCOMISD XMM0,XMM1 JNC 0x00120b17 MOVSD XMM0,qword ptr [RBP + -0x18] MOVSD qword ptr [RBP + -0x120],XMM0 CALL 0x00121a20 MOVSD XMM0,qword ptr [RBP + -0x120] CVTSI2SD XMM1,RAX UCOMISD XMM0,XMM1 JNC 0x00120b17 MOVSD XMM0,qword ptr [RBP + -0x18] CALL 0x001090b0 MOVSD qword ptr [RBP + -0x128],XMM0 MOVSD XMM0,qword ptr [RBP + -0x18] CALL 0x00109a10 MOVAPS XMM1,XMM0 MOVSD XMM0,qword ptr [RBP + -0x128] UCOMISD XMM0,XMM1 JNZ 0x00120b5a JP 0x00120b5a LAB_00120b17: CVTTSD2SI RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0xd0],RAX LAB_00120b24: LEA RDI,[RBP + -0xc8] LEA RSI,[RBP + -0xd0] CALL 0x00121a30 JMP 0x00120b39 LAB_00120b39: MOV RDI,qword ptr [RBP + -0x100] LEA RSI,[RBP + -0xc8] CALL 0x00109790 LEA RDI,[RBP + -0xc8] CALL 0x00109b90 JMP 0x00120b8b LAB_00120b5a: LEA RDI,[RBP + -0xf0] LEA RSI,[RBP + -0x18] CALL 0x00121a60 LAB_00120b6a: JMP 0x00120b6c LAB_00120b6c: MOV RDI,qword ptr [RBP + -0x100] LEA RSI,[RBP + -0xf0] CALL 0x00109790 LEA RDI,[RBP + -0xf0] CALL 0x00109b90 LAB_00120b8b: JMP 0x00120b8d LAB_00120b8d: MOV byte ptr [RBP + -0x1a],0x1 TEST byte ptr [RBP + -0x1a],0x1 JNZ 0x00120ba3 MOV RDI,qword ptr [RBP + -0x100] CALL 0x00109b90 LAB_00120ba3: MOV RAX,qword ptr [RBP + -0xf8] ADD RSP,0x130 POP RBP RET
/* WARNING: Removing unreachable block (ram,0x00120b97) */ /* CLI::detail::sum_string_vector(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&) */ detail * __thiscall CLI::detail::sum_string_vector(detail *this,vector *param_1) { bool bVar1; long lVar2; double dVar3; double dVar4; string local_f8 [32]; long local_d8; string local_d0 [32]; int8 local_b0; int8 local_a8; int8 local_a0; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_98; string local_88 [55]; byte local_51; double local_50; string *local_48; int8 local_40; int8 local_38; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_30; int1 local_22; byte local_21; double local_20; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_18; detail *local_10; local_20 = 0.0; local_21 = 0; local_22 = 0; local_18 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1; local_10 = this; std::__cxx11::string::string((string *)this); local_30 = local_18; local_38 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::begin(local_18) ; local_40 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::end(local_30); while (bVar1 = __gnu_cxx::operator!= ((__normal_iterator *)&local_38,(__normal_iterator *)&local_40), dVar3 = local_20, bVar1) { local_48 = (string *) __gnu_cxx:: __normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::operator*((__normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *)&local_38); local_50 = 0.0; /* try { // try from 0012092a to 00120932 has its CatchHandler @ 0012098d */ local_51 = _ZN3CLI6detail12lexical_castIdTnNSt9enable_ifIXeqsr15classify_objectIT_EE5valueLNS0_15object_categoryE10EENS0_7enablerEE4typeELS5_0EEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS3_ (local_48,&local_50); local_51 = local_51 & 1; if (local_51 == 0) { /* try { // try from 00120954 to 0012095c has its CatchHandler @ 0012099e */ std::__cxx11::string::string(local_88,local_48); /* try { // try from 0012095f to 00120967 has its CatchHandler @ 001209ac */ lVar2 = to_flag_value(local_88); local_50 = (double)lVar2; std::__cxx11::string::~string(local_88); } local_20 = local_50 + local_20; __gnu_cxx:: __normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::operator++((__normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *)&local_38); } if ((local_21 & 1) == 0) { lVar2 = std::numeric_limits<long>::min(); dVar4 = local_20; if (((double)lVar2 < dVar3) && (lVar2 = std::numeric_limits<long>::max(), dVar4 < (double)lVar2) ) { dVar3 = ceil(local_20); dVar4 = floor(local_20); if ((dVar3 != dVar4) || (NAN(dVar3) || NAN(dVar4))) { _ZN3CLI6detail12value_stringIdTnNSt9enable_ifIXsr3std13is_arithmeticIT_EE5valueENS0_7enablerEE4typeELS4_0EEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS3_ (local_f8,&local_20); std::__cxx11::string::operator=((string *)this,local_f8); std::__cxx11::string::~string(local_f8); return this; } } local_d8 = (long)local_20; /* try { // try from 00120b24 to 00120b69 has its CatchHandler @ 0012098d */ _ZN3CLI6detail12value_stringIlTnNSt9enable_ifIXsr3std13is_arithmeticIT_EE5valueENS0_7enablerEE4typeELS4_0EEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS3_ (local_d0,&local_d8); std::__cxx11::string::operator=((string *)this,local_d0); std::__cxx11::string::~string(local_d0); } else { local_98 = local_18; local_a0 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::begin (local_18); local_a8 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::end(local_98) ; while (bVar1 = __gnu_cxx::operator!= ((__normal_iterator *)&local_a0,(__normal_iterator *)&local_a8), bVar1) { local_b0 = __gnu_cxx:: __normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::operator*((__normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *)&local_a0); std::__cxx11::string::append((string *)this); __gnu_cxx:: __normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::operator++((__normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *)&local_a0); } } return this; }
25,504
minja::ExpressionNode::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 (!expr) throw std::runtime_error("ExpressionNode.expr is null"); auto result = expr->evaluate(context); if (result.is_string()) { out << result.get<std::string>(); } else if (result.is_boolean()) { out << (result.get<bool>() ? "True" : "False"); } else if (!result.is_null()) { out << result.dump(); } }
O2
cpp
minja::ExpressionNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const: pushq %r14 pushq %rbx subq $0x78, %rsp movq %rsi, %rbx movq 0x20(%rdi), %rsi testq %rsi, %rsi je 0x75a54 leaq 0x28(%rsp), %r14 movq %r14, %rdi callq 0x62d8e movzbl 0x40(%r14), %eax cmpl $0x4, %eax je 0x759d3 cmpl $0x3, %eax jne 0x759fb leaq 0x8(%rsp), %rdi leaq 0x28(%rsp), %rsi callq 0x63c40 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x237f0 jmp 0x75a38 leaq 0x28(%rsp), %rdi callq 0x63b8a leaq 0x3ea18(%rip), %rcx # 0xb43fc leaq 0x3ea16(%rip), %rsi # 0xb4401 testb %al, %al cmovneq %rcx, %rsi movq %rbx, %rdi callq 0x238d0 jmp 0x75a42 testb %al, %al jne 0x75a17 cmpq $0x0, 0x48(%rsp) jne 0x75a17 cmpq $0x0, 0x38(%rsp) jne 0x75a17 cmpq $0x0, 0x58(%rsp) je 0x75a42 leaq 0x8(%rsp), %rdi leaq 0x28(%rsp), %rsi pushq $-0x1 popq %rdx xorl %ecx, %ecx callq 0x6320c leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x237f0 leaq 0x8(%rsp), %rdi callq 0x241e8 leaq 0x28(%rsp), %rdi callq 0x6301e addq $0x78, %rsp popq %rbx popq %r14 retq pushq $0x10 popq %rdi callq 0x23470 movq %rax, %r14 leaq 0x3f97d(%rip), %rsi # 0xb53e3 movq %rax, %rdi callq 0x23330 movq 0x8857b(%rip), %rsi # 0xfdff0 movq 0x884dc(%rip), %rdx # 0xfdf58 movq %r14, %rdi callq 0x23f30 jmp 0x75a88 jmp 0x75aa6 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x241e8 jmp 0x75aa9 jmp 0x75aa6 movq %rax, %rbx movq %r14, %rdi callq 0x236b0 jmp 0x75ab3 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x6301e movq %rbx, %rdi callq 0x23fb0 nop
_ZNK5minja14ExpressionNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE: push r14 push rbx sub rsp, 78h mov rbx, rsi mov rsi, [rdi+20h] test rsi, rsi jz loc_75A54 lea r14, [rsp+88h+var_60] mov rdi, r14 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) movzx eax, byte ptr [r14+40h] cmp eax, 4 jz short loc_759D3 cmp eax, 3 jnz short loc_759FB lea rdi, [rsp+88h+var_80] lea rsi, [rsp+88h+var_60] call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void) lea rsi, [rsp+88h+var_80] mov rdi, rbx call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) jmp short loc_75A38 loc_759D3: lea rdi, [rsp+88h+var_60] call _ZNK5minja5Value3getIbEET_v; minja::Value::get<bool>(void) lea rcx, aTrue_0; "True" lea rsi, aFalse; "False" test al, al cmovnz rsi, rcx mov rdi, rbx call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short loc_75A42 loc_759FB: test al, al jnz short loc_75A17 cmp [rsp+88h+var_40], 0 jnz short loc_75A17 cmp [rsp+88h+var_50], 0 jnz short loc_75A17 cmp [rsp+88h+var_30], 0 jz short loc_75A42 loc_75A17: lea rdi, [rsp+88h+var_80] lea rsi, [rsp+88h+var_60] push 0FFFFFFFFFFFFFFFFh pop rdx xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, [rsp+88h+var_80] mov rdi, rbx call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) loc_75A38: lea rdi, [rsp+88h+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_75A42: lea rdi, [rsp+88h+var_60]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() add rsp, 78h pop rbx pop r14 retn loc_75A54: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aExpressionnode; "ExpressionNode.expr is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp short loc_75A88 jmp short loc_75AA6 loc_75A88: mov rbx, rax lea rdi, [rsp+88h+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_75AA9 jmp short loc_75AA6 mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_75AB3 loc_75AA6: mov rbx, rax loc_75AA9: lea rdi, [rsp+88h+var_60]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_75AB3: mov rdi, rbx call __Unwind_Resume
void minja::ExpressionNode::do_render(long long a1, long long a2) { void (***v3)(void); // rsi const char *v4; // rsi std::runtime_error *exception; // r14 _BYTE v6[32]; // [rsp+8h] [rbp-80h] BYREF _BYTE v7[16]; // [rsp+28h] [rbp-60h] BYREF long long v8; // [rsp+38h] [rbp-50h] long long v9; // [rsp+48h] [rbp-40h] long long v10; // [rsp+58h] [rbp-30h] char v11; // [rsp+68h] [rbp-20h] v3 = *(void (****)(void))(a1 + 32); if ( !v3 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "ExpressionNode.expr is null"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Expression::evaluate((long long)v7, v3); if ( v11 == 4 ) { v4 = "False"; if ( (unsigned __int8)minja::Value::get<bool>((minja::Value *)v7) ) v4 = "True"; std::operator<<<std::char_traits<char>>(a2, v4); } else { if ( v11 == 3 ) { minja::Value::get<std::string>((long long)v6, (minja::Value *)v7); std::operator<<<char>(a2, v6); LABEL_13: std::string::~string(v6); goto LABEL_14; } if ( v11 || v9 || v8 || v10 ) { minja::Value::dump[abi:cxx11]((long long)v6, (long long)v7, 0xFFFFFFFF, 0); std::operator<<<char>(a2, v6); goto LABEL_13; } } LABEL_14: minja::Value::~Value((minja::Value *)v7); }
do_render: PUSH R14 PUSH RBX SUB RSP,0x78 MOV RBX,RSI MOV RSI,qword ptr [RDI + 0x20] TEST RSI,RSI JZ 0x00175a54 LEA R14,[RSP + 0x28] MOV RDI,R14 CALL 0x00162d8e MOVZX EAX,byte ptr [R14 + 0x40] CMP EAX,0x4 JZ 0x001759d3 CMP EAX,0x3 JNZ 0x001759fb LAB_001759b5: LEA RDI,[RSP + 0x8] LEA RSI,[RSP + 0x28] CALL 0x00163c40 LAB_001759c4: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x001237f0 JMP 0x00175a38 LAB_001759d3: LEA RDI,[RSP + 0x28] CALL 0x00163b8a LEA RCX,[0x1b43fc] LEA RSI,[0x1b4401] TEST AL,AL CMOVNZ RSI,RCX MOV RDI,RBX CALL 0x001238d0 JMP 0x00175a42 LAB_001759fb: TEST AL,AL JNZ 0x00175a17 CMP qword ptr [RSP + 0x48],0x0 JNZ 0x00175a17 CMP qword ptr [RSP + 0x38],0x0 JNZ 0x00175a17 CMP qword ptr [RSP + 0x58],0x0 JZ 0x00175a42 LAB_00175a17: LEA RDI,[RSP + 0x8] LEA RSI,[RSP + 0x28] PUSH -0x1 POP RDX XOR ECX,ECX CALL 0x0016320c LAB_00175a2b: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x001237f0 LAB_00175a38: LEA RDI,[RSP + 0x8] CALL 0x001241e8 LAB_00175a42: LEA RDI,[RSP + 0x28] CALL 0x0016301e ADD RSP,0x78 POP RBX POP R14 RET LAB_00175a54: PUSH 0x10 POP RDI CALL 0x00123470 MOV R14,RAX LAB_00175a5f: LEA RSI,[0x1b53e3] MOV RDI,RAX CALL 0x00123330 LAB_00175a6e: MOV RSI,qword ptr [0x001fdff0] MOV RDX,qword ptr [0x001fdf58] MOV RDI,R14 CALL 0x00123f30
/* minja::ExpressionNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&) const */ void minja::ExpressionNode::do_render(ostringstream *param_1,shared_ptr *param_2) { bool bVar1; runtime_error *this; char *pcVar2; string local_80 [32]; Expression local_60 [16]; long local_50; long local_40; long local_30; char local_20; if (*(shared_ptr **)(param_1 + 0x20) == (shared_ptr *)0x0) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00175a5f to 00175a6d has its CatchHandler @ 00175a99 */ std::runtime_error::runtime_error(this,"ExpressionNode.expr is null"); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58); } Expression::evaluate(local_60,*(shared_ptr **)(param_1 + 0x20)); if (local_20 == '\x04') { /* try { // try from 001759d3 to 001759f8 has its CatchHandler @ 00175aa6 */ bVar1 = Value::get<bool>((Value *)local_60); pcVar2 = "False"; if (bVar1) { pcVar2 = "True"; } std::operator<<((ostream *)param_2,pcVar2); } else { if (local_20 == '\x03') { /* try { // try from 001759b5 to 001759c3 has its CatchHandler @ 00175a97 */ Value::get<std::__cxx11::string>(); /* try { // try from 001759c4 to 001759d0 has its CatchHandler @ 00175a88 */ std::operator<<((ostream *)param_2,local_80); } else { if ((((local_20 == '\0') && (local_40 == 0)) && (local_50 == 0)) && (local_30 == 0)) goto LAB_00175a42; /* try { // try from 00175a17 to 00175a2a has its CatchHandler @ 00175a86 */ Value::dump_abi_cxx11_((int)local_80,SUB81(local_60,0)); /* try { // try from 00175a2b to 00175a37 has its CatchHandler @ 00175a84 */ std::operator<<((ostream *)param_2,local_80); } std::__cxx11::string::~string(local_80); } LAB_00175a42: Value::~Value((Value *)local_60); return; }
25,505
nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::moved_or_copied() const
monkey531[P]llama/common/json.hpp
value_type moved_or_copied() const { if (value_ref == nullptr) { return std::move(owned_value); } return *value_ref; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::moved_or_copied() const: pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movq 0x10(%rsi), %rsi testq %rsi, %rsi je 0xa0e39 movq %rbx, %rdi callq 0x5d4a6 jmp 0xa0e63 movups (%r14), %xmm0 movups %xmm0, (%rbx) movq %r14, %rdi xorl %esi, %esi callq 0x58484 movb $0x0, (%r14) movq $0x0, 0x8(%r14) movq %rbx, %rdi movl $0x1, %esi callq 0x58484 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
_ZNK8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15moved_or_copiedEv: push r14 push rbx push rax mov r14, rsi mov rbx, rdi mov rsi, [rsi+10h] test rsi, rsi jz short loc_A0E39 mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) jmp short loc_A0E63 loc_A0E39: movups xmm0, xmmword ptr [r14] movups xmmword ptr [rbx], xmm0 mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov byte ptr [r14], 0 mov qword ptr [r14+8], 0 mov rdi, rbx mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) loc_A0E63: mov rax, rbx add rsp, 8 pop rbx pop r14 retn
unsigned __int8 * nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::moved_or_copied( unsigned __int8 *a1, long long a2) { unsigned __int8 *v3; // rsi v3 = *(unsigned __int8 **)(a2 + 16); if ( v3 ) { nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( a1, v3); } else { *(_OWORD *)a1 = *(_OWORD *)a2; 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); *(_BYTE *)a2 = 0; *(_QWORD *)(a2 + 8) = 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 *)a1); } return a1; }
moved_or_copied: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV RSI,qword ptr [RSI + 0x10] TEST RSI,RSI JZ 0x001a0e39 MOV RDI,RBX CALL 0x0015d4a6 JMP 0x001a0e63 LAB_001a0e39: MOVUPS XMM0,xmmword ptr [R14] MOVUPS xmmword ptr [RBX],XMM0 MOV RDI,R14 XOR ESI,ESI CALL 0x00158484 MOV byte ptr [R14],0x0 MOV qword ptr [R14 + 0x8],0x0 MOV RDI,RBX MOV ESI,0x1 CALL 0x00158484 LAB_001a0e63: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
/* nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::moved_or_copied() const */ void nlohmann::json_abi_v3_11_3::detail:: json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::moved_or_copied(void) { int8 uVar1; int8 *in_RSI; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *in_RDI; if ((basic_json *)in_RSI[2] == (basic_json *)0x0) { uVar1 = in_RSI[1]; *(int8 *)in_RDI = *in_RSI; *(int8 *)(in_RDI + 8) = uVar1; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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(in_RSI,0)); *(int1 *)in_RSI = 0; in_RSI[1] = 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> ::assert_invariant(SUB81(in_RDI,0)); } else { basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(in_RDI,(basic_json *)in_RSI[2]); } return; }
25,506
nlohmann::json_abi_v3_11_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>::set_parents()
7CodeWizard[P]stablediffusion/thirdparty/json.hpp
void set_parents() { #if JSON_DIAGNOSTICS switch (m_type) { case value_t::array: { for (auto& element : *m_value.array) { element.m_parent = this; } break; } case value_t::object: { for (auto& element : *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_2::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_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>::set_parents(): movq %rdi, -0x8(%rsp) retq nopw %cs:(%rax,%rax)
_ZN8nlohmann16json_abi_v3_11_210basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEE11set_parentsEv: mov [rsp+var_8], rdi retn
void nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>::set_parents() { ; }
set_parents: MOV qword ptr [RSP + -0x8],RDI RET
/* nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> > >::set_parents() */ void nlohmann::json_abi_v3_11_2:: basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>> ::set_parents(void) { return; }
25,507
js_object_constructor
bluesky950520[P]quickjs/quickjs.c
static JSValue js_object_constructor(JSContext *ctx, JSValue new_target, int argc, JSValue *argv) { JSValue ret; if (!JS_IsUndefined(new_target) && JS_VALUE_GET_OBJ(new_target) != JS_VALUE_GET_OBJ(JS_GetActiveFunction(ctx))) { ret = js_create_from_ctor(ctx, new_target, JS_CLASS_OBJECT); } else { int tag = JS_VALUE_GET_NORM_TAG(argv[0]); switch(tag) { case JS_TAG_NULL: case JS_TAG_UNDEFINED: ret = JS_NewObject(ctx); break; default: ret = JS_ToObject(ctx, argv[0]); break; } } return ret; }
O0
c
js_object_constructor: subq $0x88, %rsp movq %rsi, 0x68(%rsp) movq %rdx, 0x70(%rsp) movq %rdi, 0x60(%rsp) movl %ecx, 0x5c(%rsp) movq %r8, 0x50(%rsp) movq 0x68(%rsp), %rdi movq 0x70(%rsp), %rsi callq 0x2cfa0 cmpl $0x0, %eax jne 0x5521d movq 0x68(%rsp), %rax movq %rax, (%rsp) movq 0x60(%rsp), %rdi callq 0x84a80 movq %rax, %rcx movq (%rsp), %rax movq %rcx, 0x40(%rsp) movq %rdx, 0x48(%rsp) cmpq 0x40(%rsp), %rax je 0x5521d movq 0x60(%rsp), %rdi movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdx movl $0x1, %ecx callq 0x53b40 movq %rax, 0x30(%rsp) movq %rdx, 0x38(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x78(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x80(%rsp) jmp 0x5529d movq 0x50(%rsp), %rax movl 0x8(%rax), %eax movl %eax, 0x2c(%rsp) movl 0x2c(%rsp), %eax addl $-0x2, %eax subl $0x1, %eax ja 0x55264 jmp 0x55237 movq 0x60(%rsp), %rdi callq 0x292b0 movq %rax, 0x18(%rsp) movq %rdx, 0x20(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x78(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x80(%rsp) jmp 0x5529b movq 0x60(%rsp), %rdi movq 0x50(%rsp), %rax movq (%rax), %rsi movq 0x8(%rax), %rdx callq 0x364b0 movq %rax, 0x8(%rsp) movq %rdx, 0x10(%rsp) movq 0x8(%rsp), %rax movq %rax, 0x78(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x80(%rsp) jmp 0x5529d movq 0x78(%rsp), %rax movq 0x80(%rsp), %rdx addq $0x88, %rsp retq nopw %cs:(%rax,%rax)
js_object_constructor: sub rsp, 88h mov [rsp+88h+var_20], rsi mov [rsp+88h+var_18], rdx mov [rsp+88h+var_28], rdi mov [rsp+88h+var_2C], ecx mov [rsp+88h+var_38], r8 mov rdi, [rsp+88h+var_20] mov rsi, [rsp+88h+var_18] call JS_IsUndefined_0 cmp eax, 0 jnz short loc_5521D mov rax, [rsp+88h+var_20] mov [rsp+88h+var_88], rax mov rdi, [rsp+88h+var_28] call JS_GetActiveFunction mov rcx, rax mov rax, [rsp+88h+var_88] mov [rsp+88h+var_48], rcx mov [rsp+88h+var_40], rdx cmp rax, [rsp+88h+var_48] jz short loc_5521D mov rdi, [rsp+88h+var_28] mov rsi, [rsp+88h+var_20] mov rdx, [rsp+88h+var_18] mov ecx, 1 call js_create_from_ctor mov [rsp+88h+var_58], rax mov [rsp+88h+var_50], rdx mov rax, [rsp+88h+var_58] mov [rsp+88h+var_10], rax mov rax, [rsp+88h+var_50] mov [rsp+88h+var_8], rax jmp loc_5529D loc_5521D: mov rax, [rsp+88h+var_38] mov eax, [rax+8] mov [rsp+88h+var_5C], eax mov eax, [rsp+88h+var_5C] add eax, 0FFFFFFFEh sub eax, 1 ja short loc_55264 jmp short $+2 loc_55237: mov rdi, [rsp+88h+var_28] call JS_NewObject mov [rsp+88h+var_70], rax mov [rsp+88h+var_68], rdx mov rax, [rsp+88h+var_70] mov [rsp+88h+var_10], rax mov rax, [rsp+88h+var_68] mov [rsp+88h+var_8], rax jmp short loc_5529B loc_55264: mov rdi, [rsp+88h+var_28] mov rax, [rsp+88h+var_38] mov rsi, [rax] mov rdx, [rax+8] call JS_ToObject mov [rsp+88h+var_80], rax mov [rsp+88h+var_78], rdx mov rax, [rsp+88h+var_80] mov [rsp+88h+var_10], rax mov rax, [rsp+88h+var_78] mov [rsp+88h+var_8], rax loc_5529B: jmp short $+2 loc_5529D: mov rax, [rsp+88h+var_10] mov rdx, [rsp+88h+var_8] add rsp, 88h retn
_DWORD * js_object_constructor( long long a1, long long a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11, long long a12, long long a13) { long long ActiveFunction; // rcx long long v14; // r8 long long v15; // r9 __m128 v16; // xmm4 __m128 v17; // xmm5 if ( !JS_IsUndefined_0(a2, a3) ) { ActiveFunction = JS_GetActiveFunction(a1); if ( a2 != ActiveFunction ) return (_DWORD *)js_create_from_ctor(a1, a2, a3, 1); } if ( (unsigned int)(*(_DWORD *)(a13 + 8) - 2) > 1 ) return JS_ToObject( a1, *(_DWORD **)a13, *(_QWORD *)(a13 + 8), a4, a5, a6, a7, v16, v17, a10, a11, ActiveFunction, v14, v15); return (_DWORD *)JS_NewObject(a1); }
js_object_constructor: SUB RSP,0x88 MOV qword ptr [RSP + 0x68],RSI MOV qword ptr [RSP + 0x70],RDX MOV qword ptr [RSP + 0x60],RDI MOV dword ptr [RSP + 0x5c],ECX MOV qword ptr [RSP + 0x50],R8 MOV RDI,qword ptr [RSP + 0x68] MOV RSI,qword ptr [RSP + 0x70] CALL 0x0012cfa0 CMP EAX,0x0 JNZ 0x0015521d MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP + 0x60] CALL 0x00184a80 MOV RCX,RAX MOV RAX,qword ptr [RSP] MOV qword ptr [RSP + 0x40],RCX MOV qword ptr [RSP + 0x48],RDX CMP RAX,qword ptr [RSP + 0x40] JZ 0x0015521d MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] MOV ECX,0x1 CALL 0x00153b40 MOV qword ptr [RSP + 0x30],RAX MOV qword ptr [RSP + 0x38],RDX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x78],RAX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x80],RAX JMP 0x0015529d LAB_0015521d: MOV RAX,qword ptr [RSP + 0x50] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RSP + 0x2c],EAX MOV EAX,dword ptr [RSP + 0x2c] ADD EAX,-0x2 SUB EAX,0x1 JA 0x00155264 JMP 0x00155237 LAB_00155237: MOV RDI,qword ptr [RSP + 0x60] CALL 0x001292b0 MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x20],RDX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x78],RAX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x80],RAX JMP 0x0015529b LAB_00155264: MOV RDI,qword ptr [RSP + 0x60] MOV RAX,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] CALL 0x001364b0 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],RDX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x78],RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x80],RAX LAB_0015529b: JMP 0x0015529d LAB_0015529d: MOV RAX,qword ptr [RSP + 0x78] MOV RDX,qword ptr [RSP + 0x80] ADD RSP,0x88 RET
int1 [16] js_object_constructor (int8 param_1,long param_2,int8 param_3,int8 param_4,int8 *param_5 ) { int iVar1; long lVar2; int1 auVar3 [16]; iVar1 = JS_IsUndefined(param_2,param_3); if ((iVar1 == 0) && (lVar2 = JS_GetActiveFunction(param_1), param_2 != lVar2)) { auVar3 = js_create_from_ctor(param_1,param_2,param_3,1); } else if (*(int *)(param_5 + 1) == 2 || *(int *)(param_5 + 1) == 3) { auVar3 = JS_NewObject(param_1); } else { auVar3 = JS_ToObject(param_1,*param_5,param_5[1]); } return auVar3; }
25,508
js_object_constructor
bluesky950520[P]quickjs/quickjs.c
static JSValue js_object_constructor(JSContext *ctx, JSValue new_target, int argc, JSValue *argv) { JSValue ret; if (!JS_IsUndefined(new_target) && JS_VALUE_GET_OBJ(new_target) != JS_VALUE_GET_OBJ(JS_GetActiveFunction(ctx))) { ret = js_create_from_ctor(ctx, new_target, JS_CLASS_OBJECT); } else { int tag = JS_VALUE_GET_NORM_TAG(argv[0]); switch(tag) { case JS_TAG_NULL: case JS_TAG_UNDEFINED: ret = JS_NewObject(ctx); break; default: ret = JS_ToObject(ctx, argv[0]); break; } } return ret; }
O1
c
js_object_constructor: movq %rsi, -0x8(%rsp) cmpl $0x3, %edx je 0x37568 movq -0x8(%rsp), %rax movq 0x18(%rdi), %rcx movq 0x108(%rcx), %rcx cmpq 0x8(%rcx), %rax je 0x37568 movq -0x8(%rsp), %rsi movl $0x1, %ecx jmp 0x36142 movq 0x8(%r8), %rdx movl %edx, %eax andl $-0x2, %eax cmpl $0x2, %eax jne 0x3758c movq 0x40(%rdi), %rax movq 0x10(%rax), %rsi movq 0x18(%rax), %rdx movl $0x1, %ecx jmp 0x202f1 movq (%r8), %rsi jmp 0x261c9
js_object_constructor: mov [rsp+var_8], rsi cmp edx, 3 jz short loc_37568 mov rax, [rsp+var_8] mov rcx, [rdi+18h] mov rcx, [rcx+108h] cmp rax, [rcx+8] jz short loc_37568 mov rsi, [rsp+var_8] mov ecx, 1 jmp js_create_from_ctor loc_37568: mov rdx, [r8+8] mov eax, edx and eax, 0FFFFFFFEh cmp eax, 2 jnz short loc_3758C mov rax, [rdi+40h] mov rsi, [rax+10h] mov rdx, [rax+18h] mov ecx, 1 jmp JS_NewObjectProtoClass loc_3758C: mov rsi, [r8] jmp JS_ToObject
_DWORD * js_object_constructor( long long a1, long long a2, long long a3, long long a4, long long *a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { if ( (_DWORD)a3 != 3 ) { a4 = *(_QWORD *)(*(_QWORD *)(a1 + 24) + 264LL); if ( a2 != *(_QWORD *)(a4 + 8) ) return (_DWORD *)js_create_from_ctor(a1, a2, a3, 1); } if ( (a5[1] & 0xFFFFFFFE) == 2 ) return (_DWORD *)JS_NewObjectProtoClass( a1, *(_QWORD *)(*(_QWORD *)(a1 + 64) + 16LL), *(_QWORD *)(*(_QWORD *)(a1 + 64) + 24LL), 1u); return JS_ToObject(a1, *a5, a5[1], a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
js_object_constructor: MOV qword ptr [RSP + -0x8],RSI CMP EDX,0x3 JZ 0x00137568 MOV RAX,qword ptr [RSP + -0x8] MOV RCX,qword ptr [RDI + 0x18] MOV RCX,qword ptr [RCX + 0x108] CMP RAX,qword ptr [RCX + 0x8] JZ 0x00137568 MOV RSI,qword ptr [RSP + -0x8] MOV ECX,0x1 JMP 0x00136142 LAB_00137568: MOV RDX,qword ptr [R8 + 0x8] MOV EAX,EDX AND EAX,0xfffffffe CMP EAX,0x2 JNZ 0x0013758c MOV RAX,qword ptr [RDI + 0x40] MOV RSI,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RAX + 0x18] MOV ECX,0x1 JMP 0x001202f1 LAB_0013758c: MOV RSI,qword ptr [R8] JMP 0x001261c9
void js_object_constructor (long param_1,long param_2,int8 param_3,int8 param_4,int8 *param_5) { if (((int)param_3 != 3) && (param_2 != *(long *)(*(long *)(*(long *)(param_1 + 0x18) + 0x108) + 8))) { js_create_from_ctor(param_1,param_2,param_3,1); return; } if (((uint)param_5[1] & 0xfffffffe) == 2) { JS_NewObjectProtoClass (param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x10), *(int8 *)(*(long *)(param_1 + 0x40) + 0x18),1); return; } JS_ToObject(param_1,*param_5); return; }
25,509
SlaveCommandHandler::handleCommand(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
666mxvbee[P]BattleShip/lib/Commands/SlaveCommandHandler.cpp
bool SlaveCommandHandler::handleCommand(const std::string& input) { { std::ifstream in("../game_data/settings.txt"); if (in.is_open()) { bool newExit = false; std::string line; while (std::getline(in, line)) { auto pos = line.find('='); if (pos != std::string::npos) { std::string key = line.substr(0, pos); std::string val = line.substr(pos + 1); if (key == "exit" && val == "1") { newExit = true; } } } if (newExit) { settings_.exitGame(); std::cout << "Slave: Detected exit=1 from Master.\n"; } } } if (settings_.getExit()) { std::cout << "Slave: Exiting (because exit=1 in settings).\n"; return true; } std::istringstream iss(input); std::string command; iss >> command; if (command == "shot") { handleShotCommand(iss); } else if (command == "exit") { settings_.exitGame(); std::cout << "Slave: Exiting game.\n"; return true; } else if (command == "print") { std::string sub; iss >> sub; if (sub == "settings") { printSettings(settings_); } else { std::cout << "Slave: Unknown print subcommand.\n"; } } else { std::cout << "Slave: Unknown command.\n"; } return false; }
O1
cpp
SlaveCommandHandler::handleCommand(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x2a8, %rsp # imm = 0x2A8 movq %rsi, %r14 movq %rdi, %rbx leaq 0x3cbf(%rip), %rsi # 0x1b655 leaq 0xa0(%rsp), %r15 movq %r15, %rdi movl $0x8, %edx callq 0x5600 leaq 0x118(%rsp), %rdi callq 0x5080 testb %al, %al je 0x17b5e leaq 0x10(%rsp), %rax movq %rax, -0x10(%rax) movq $0x0, -0x8(%rax) movb $0x0, (%rax) xorl %r13d, %r13d movq %rsp, %r12 movq 0xa0(%rsp), %rax movq -0x18(%rax), %rdi addq %r15, %rdi movl $0xa, %esi callq 0x5350 movsbl %al, %edx movq %r15, %rdi movq %r12, %rsi callq 0x5610 movq (%rax), %rcx movq -0x18(%rcx), %rcx testb $0x5, 0x20(%rax,%rcx) jne 0x17af4 movq 0x8(%rsp), %rdx testq %rdx, %rdx je 0x17a45 movq (%rsp), %rbp movq %rbp, %rdi movl $0x3d, %esi callq 0x53e0 movq %rax, %rcx subq %rbp, %rcx cmpq $0x1, %rax movl $0x0, %ebp sbbq %rbp, %rbp orq %rcx, %rbp jmp 0x17a4c movq $-0x1, %rbp cmpq $-0x1, %rbp je 0x179da leaq 0x20(%rsp), %rdi movq %r12, %rsi xorl %edx, %edx movq %rbp, %rcx callq 0x16392 incq %rbp leaq 0x40(%rsp), %rdi movq %r12, %rsi movq %rbp, %rdx movq $-0x1, %rcx callq 0x16392 leaq 0x20(%rsp), %rdi leaq 0x3c03(%rip), %rsi # 0x1b68d callq 0x752e testl %eax, %eax jne 0x17ab3 leaq 0x40(%rsp), %rdi leaq 0x2fa4(%rip), %rsi # 0x1aa43 callq 0x752e testl %eax, %eax movzbl %r13b, %r13d movl $0x1, %eax cmovel %eax, %r13d movq 0x40(%rsp), %rdi leaq 0x50(%rsp), %rax cmpq %rax, %rdi je 0x17acf movq 0x50(%rsp), %rsi incq %rsi callq 0x5380 movq 0x20(%rsp), %rdi leaq 0x30(%rsp), %rax cmpq %rax, %rdi je 0x179da movq 0x30(%rsp), %rsi incq %rsi callq 0x5380 jmp 0x179da testb $0x1, %r13b je 0x17b43 movq (%rbx), %rsi leaq 0x80(%rsp), %rdi callq 0x6e0c leaq 0x90(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x17b2b movq 0x90(%rsp), %rsi incq %rsi callq 0x5380 movq 0xd46e(%rip), %rdi # 0x24fa0 leaq 0x3c01(%rip), %rsi # 0x1b73a movl $0x24, %edx callq 0x5400 movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x17b5e movq 0x10(%rsp), %rsi incq %rsi callq 0x5380 leaq 0xa0(%rsp), %rdi callq 0x5090 movq (%rbx), %rdi callq 0x6e98 testb %al, %al je 0x17b96 movq 0xd422(%rip), %rdi # 0x24fa0 leaq 0x3bda(%rip), %rsi # 0x1b75f movl $0x2d, %edx callq 0x5400 movb $0x1, %bl jmp 0x17cb2 leaq 0xa0(%rsp), %r15 movq %r15, %rdi movq %r14, %rsi movl $0x8, %edx callq 0x5590 leaq 0x10(%rsp), %r14 movq %r14, -0x10(%r14) movq $0x0, -0x8(%r14) movb $0x0, (%r14) movq %rsp, %rsi movq %r15, %rdi callq 0x5440 leaq 0x3bb8(%rip), %rsi # 0x1b78d movq %rsp, %rdi callq 0x752e testl %eax, %eax je 0x17c25 leaq 0x3aa5(%rip), %rsi # 0x1b68d movq %rsp, %rdi callq 0x752e testl %eax, %eax je 0x17c39 leaq 0x2cd4(%rip), %rsi # 0x1a8cf movq %rsp, %rdi callq 0x752e testl %eax, %eax je 0x17cc6 movq 0xd38e(%rip), %rdi # 0x24fa0 leaq 0x3bba(%rip), %rsi # 0x1b7d3 movl $0x18, %edx callq 0x5400 jmp 0x17c35 leaq 0xa0(%rsp), %rsi movq %rbx, %rdi callq 0x17df4 xorl %ebx, %ebx jmp 0x17c7b movq (%rbx), %rsi leaq 0x60(%rsp), %rdi callq 0x6e0c leaq 0x70(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x17c61 movq 0x70(%rsp), %rsi incq %rsi callq 0x5380 movb $0x1, %bl movq 0xd336(%rip), %rdi # 0x24fa0 leaq 0x3b21(%rip), %rsi # 0x1b792 movl $0x15, %edx callq 0x5400 movq (%rsp), %rdi cmpq %r14, %rdi je 0x17c91 movq 0x10(%rsp), %rsi incq %rsi callq 0x5380 movq 0xd2e8(%rip), %rsi # 0x24f80 leaq 0xa0(%rsp), %rdi callq 0x54c0 leaq 0x118(%rsp), %rdi callq 0x50f0 movl %ebx, %eax addq $0x2a8, %rsp # imm = 0x2A8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x30(%rsp), %r15 movq %r15, -0x10(%r15) movq $0x0, -0x8(%r15) movb $0x0, (%r15) leaq 0xa0(%rsp), %rdi leaq 0x20(%rsp), %rsi callq 0x5440 leaq 0x3ab4(%rip), %rsi # 0x1b7a8 leaq 0x20(%rsp), %rdi callq 0x752e testl %eax, %eax je 0x17d1c movq 0xd297(%rip), %rdi # 0x24fa0 leaq 0x3aa1(%rip), %rsi # 0x1b7b1 movl $0x21, %edx callq 0x5400 jmp 0x17d24 movq (%rbx), %rdi callq 0x18ba0 movq 0x20(%rsp), %rdi cmpq %r15, %rdi je 0x17c35 movq 0x30(%rsp), %rsi incq %rsi callq 0x5380 jmp 0x17c35 movq %rax, %rbx movq 0x20(%rsp), %rdi cmpq %r15, %rdi je 0x17d88 movq 0x30(%rsp), %rsi incq %rsi callq 0x5380 jmp 0x17d88 movq %rax, %rbx movq 0x20(%rsp), %rdi leaq 0x30(%rsp), %rax cmpq %rax, %rdi je 0x17dc4 movq 0x30(%rsp), %rsi incq %rsi callq 0x5380 jmp 0x17dc4 jmp 0x17dc1 jmp 0x17dc1 movq %rax, %rbx movq (%rsp), %rdi cmpq %r14, %rdi je 0x17d9e movq 0x10(%rsp), %rsi incq %rsi callq 0x5380 movq 0xd1db(%rip), %rsi # 0x24f80 leaq 0xa0(%rsp), %rdi callq 0x54c0 leaq 0x118(%rsp), %rdi callq 0x50f0 jmp 0x17dec movq %rax, %rbx movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x17ddf movq 0x10(%rsp), %rsi incq %rsi callq 0x5380 leaq 0xa0(%rsp), %rdi callq 0x5090 movq %rbx, %rdi callq 0x55e0
_ZN19SlaveCommandHandler13handleCommandERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 2A8h mov r14, rsi mov rbx, rdi lea rsi, aGameDataSettin; "../game_data/settings.txt" lea r15, [rsp+2D8h+var_238] mov rdi, r15 mov edx, 8 call __ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode; std::ifstream::basic_ifstream(char const*,std::_Ios_Openmode) lea rdi, [rsp+2D8h+var_1C0] call __ZNKSt12__basic_fileIcE7is_openEv; std::__basic_file<char>::is_open(void) test al, al jz loc_17B5E lea rax, [rsp+2D8h+var_2C8] mov [rax-10h], rax mov qword ptr [rax-8], 0 mov byte ptr [rax], 0 xor r13d, r13d mov r12, rsp loc_179DA: mov rax, qword ptr [rsp+2D8h+var_238] mov rdi, [rax-18h] add rdi, r15 mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx edx, al mov rdi, r15 mov rsi, r12 call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &,char) mov rcx, [rax] mov rcx, [rcx-18h] test byte ptr [rax+rcx+20h], 5 jnz loc_17AF4 mov rdx, [rsp+2D8h+var_2D0] test rdx, rdx jz short loc_17A45 mov rbp, [rsp+2D8h+var_2D8] mov rdi, rbp mov esi, 3Dh ; '=' call _memchr mov rcx, rax sub rcx, rbp cmp rax, 1 mov ebp, 0 sbb rbp, rbp or rbp, rcx jmp short loc_17A4C loc_17A45: mov rbp, 0FFFFFFFFFFFFFFFFh loc_17A4C: cmp rbp, 0FFFFFFFFFFFFFFFFh jz short loc_179DA lea rdi, [rsp+2D8h+var_2B8] mov rsi, r12 xor edx, edx mov rcx, rbp call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) inc rbp lea rdi, [rsp+2D8h+var_298] mov rsi, r12 mov rdx, rbp mov rcx, 0FFFFFFFFFFFFFFFFh call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) lea rdi, [rsp+2D8h+var_2B8] lea rsi, aExit; "exit" call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jnz short loc_17AB3 lea rdi, [rsp+2D8h+var_298] lea rsi, aDc1+2; "1" call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax movzx r13d, r13b mov eax, 1 cmovz r13d, eax loc_17AB3: mov rdi, [rsp+2D8h+var_298]; void * lea rax, [rsp+2D8h+var_288] cmp rdi, rax jz short loc_17ACF mov rsi, [rsp+2D8h+var_288] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_17ACF: mov rdi, [rsp+2D8h+var_2B8]; void * lea rax, [rsp+2D8h+var_2A8] cmp rdi, rax jz loc_179DA mov rsi, [rsp+2D8h+var_2A8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp loc_179DA loc_17AF4: test r13b, 1 jz short loc_17B43 mov rsi, [rbx] lea rdi, [rsp+2D8h+var_258] call _ZN8Settings8exitGameB5cxx11Ev; Settings::exitGame(void) lea rax, [rsp+2D8h+var_248] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_17B2B mov rsi, [rsp+2D8h+var_248] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_17B2B: mov rdi, cs:_ZSt4cout_ptr lea rsi, aSlaveDetectedE_0; "Slave: Detected exit=1 from Master.\n" mov edx, 24h ; '$' call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) loc_17B43: mov rdi, [rsp+2D8h+var_2D8]; void * lea rax, [rsp+2D8h+var_2C8] cmp rdi, rax jz short loc_17B5E mov rsi, [rsp+2D8h+var_2C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_17B5E: lea rdi, [rsp+2D8h+var_238] call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream() mov rdi, [rbx]; this call _ZNK8Settings7getExitEv; Settings::getExit(void) test al, al jz short loc_17B96 mov rdi, cs:_ZSt4cout_ptr lea rsi, aSlaveExitingBe; "Slave: Exiting (because exit=1 in setti"... mov edx, 2Dh ; '-' call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov bl, 1 jmp loc_17CB2 loc_17B96: lea r15, [rsp+2D8h+var_238] mov rdi, r15 mov rsi, r14 mov edx, 8 call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode) lea r14, [rsp+2D8h+var_2C8] mov [r14-10h], r14 mov qword ptr [r14-8], 0 mov byte ptr [r14], 0 mov rsi, rsp mov rdi, r15 call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &) lea rsi, aShot; "shot" mov rdi, rsp call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_17C25 lea rsi, aExit; "exit" mov rdi, rsp call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_17C39 lea rsi, aPrint; "print" mov rdi, rsp call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz loc_17CC6 mov rdi, cs:_ZSt4cout_ptr lea rsi, aSlaveUnknownCo; "Slave: Unknown command.\n" mov edx, 18h call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) jmp short loc_17C35 loc_17C25: lea rsi, [rsp+2D8h+var_238]; int mov rdi, rbx; int call _ZN19SlaveCommandHandler17handleShotCommandERNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE; SlaveCommandHandler::handleShotCommand(std::istringstream &) loc_17C35: xor ebx, ebx jmp short loc_17C7B loc_17C39: mov rsi, [rbx] lea rdi, [rsp+2D8h+var_278] call _ZN8Settings8exitGameB5cxx11Ev; Settings::exitGame(void) lea rax, [rsp+2D8h+var_268] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_17C61 mov rsi, [rsp+2D8h+var_268] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_17C61: mov bl, 1 mov rdi, cs:_ZSt4cout_ptr lea rsi, aSlaveExitingGa_0; "Slave: Exiting game.\n" mov edx, 15h call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) loc_17C7B: mov rdi, [rsp+2D8h+var_2D8]; void * cmp rdi, r14 jz short loc_17C91 mov rsi, [rsp+2D8h+var_2C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_17C91: mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+2D8h+var_238] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream() lea rdi, [rsp+2D8h+var_1C0]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() loc_17CB2: mov eax, ebx add rsp, 2A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_17CC6: lea r15, [rsp+2D8h+var_2A8] mov [r15-10h], r15 mov qword ptr [r15-8], 0 mov byte ptr [r15], 0 lea rdi, [rsp+2D8h+var_238] lea rsi, [rsp+2D8h+var_2B8] call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &) lea rsi, aSettings; "settings" lea rdi, [rsp+2D8h+var_2B8] call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_17D1C mov rdi, cs:_ZSt4cout_ptr lea rsi, aSlaveUnknownPr; "Slave: Unknown print subcommand.\n" mov edx, 21h ; '!' call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) jmp short loc_17D24 loc_17D1C: mov rdi, [rbx]; this call _Z13printSettingsRK8Settings; printSettings(Settings const&) loc_17D24: mov rdi, [rsp+2D8h+var_2B8]; void * cmp rdi, r15 jz loc_17C35 mov rsi, [rsp+2D8h+var_2A8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp loc_17C35 mov rbx, rax mov rdi, [rsp+arg_18]; void * cmp rdi, r15 jz short loc_17D88 mov rsi, [rsp+arg_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_17D88 mov rbx, rax mov rdi, [rsp+arg_18]; void * lea rax, [rsp+arg_28] cmp rdi, rax jz short loc_17DC4 mov rsi, [rsp+arg_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_17DC4 jmp short loc_17DC1 jmp short loc_17DC1 mov rbx, rax loc_17D88: mov rdi, [rsp+0]; void * cmp rdi, r14 jz short loc_17D9E mov rsi, [rsp+arg_8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_17D9E: mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+arg_98] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream() lea rdi, [rsp+arg_110]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() jmp short loc_17DEC loc_17DC1: mov rbx, rax loc_17DC4: mov rdi, [rsp+0]; void * lea rax, [rsp+arg_8] cmp rdi, rax jz short loc_17DDF mov rsi, [rsp+arg_8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_17DDF: lea rdi, [rsp+arg_98] call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream() loc_17DEC: mov rdi, rbx call __Unwind_Resume
long long SlaveCommandHandler::handleCommand(long long *a1, long long a2) { unsigned int v2; // ebx char v3; // r13 char v4; // al _QWORD *v5; // rax void *v6; // rbp long long v7; // rax long long v8; // rbp int v9; // edx int v10; // ecx int v11; // r8d int v12; // r9d void *v14; // [rsp+0h] [rbp-2D8h] BYREF long long v15; // [rsp+8h] [rbp-2D0h] _QWORD v16[2]; // [rsp+10h] [rbp-2C8h] BYREF void *v17; // [rsp+20h] [rbp-2B8h] BYREF long long v18; // [rsp+28h] [rbp-2B0h] _QWORD v19[2]; // [rsp+30h] [rbp-2A8h] BYREF void *v20[2]; // [rsp+40h] [rbp-298h] BYREF long long v21; // [rsp+50h] [rbp-288h] BYREF long long *v22; // [rsp+60h] [rbp-278h] BYREF long long v23; // [rsp+70h] [rbp-268h] BYREF long long *v24; // [rsp+80h] [rbp-258h] BYREF long long v25; // [rsp+90h] [rbp-248h] BYREF int v26[2]; // [rsp+A0h] [rbp-238h] BYREF _BYTE v27[448]; // [rsp+118h] [rbp-1C0h] BYREF v2 = (unsigned int)a1; std::ifstream::basic_ifstream(v26, "../game_data/settings.txt", 8LL); if ( (unsigned __int8)std::__basic_file<char>::is_open(v27) ) { v14 = v16; v15 = 0LL; LOBYTE(v16[0]) = 0; v3 = 0; while ( 1 ) { v4 = std::ios::widen((char *)v26 + *(_QWORD *)(*(_QWORD *)v26 - 24LL), 10LL); v5 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(v26, &v14, (unsigned int)v4); if ( (*((_BYTE *)v5 + *(_QWORD *)(*v5 - 24LL) + 32) & 5) != 0 ) break; if ( v15 ) { v6 = v14; v7 = memchr(v14, 61LL); v8 = (v7 - (_QWORD)v6) | -(long long)(v7 == 0); } else { v8 = -1LL; } if ( v8 != -1 ) { std::string::substr((long long)&v17, (long long)&v14, 0LL); std::string::substr((long long)v20, (long long)&v14, v8 + 1); if ( !(unsigned int)std::string::compare(&v17, (long long)"exit") && !(unsigned int)std::string::compare(v20, (long long)"1") ) { v3 = 1; } if ( v20[0] != &v21 ) operator delete(v20[0], v21 + 1); if ( v17 != v19 ) operator delete(v17, v19[0] + 1LL); } } if ( (v3 & 1) != 0 ) { Settings::exitGame[abi:cxx11](&v24, *a1); if ( v24 != &v25 ) operator delete(v24, v25 + 1); std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Slave: Detected exit=1 from Master.\n", 36LL); } if ( v14 != v16 ) operator delete(v14, v16[0] + 1LL); } std::ifstream::~ifstream(v26); if ( (unsigned __int8)Settings::getExit((Settings *)*a1) ) { std::__ostream_insert<char,std::char_traits<char>>( &std::cout, "Slave: Exiting (because exit=1 in settings).\n", 45LL); LOBYTE(v2) = 1; return v2; } std::istringstream::basic_istringstream(v26, a2, 8LL); v14 = v16; v15 = 0LL; LOBYTE(v16[0]) = 0; std::operator>><char>(v26, &v14); if ( !(unsigned int)std::string::compare(&v14, (long long)"shot") ) { SlaveCommandHandler::handleShotCommand( (int)a1, (int)v26, v9, v10, v11, v12, (int)v14, v15, v16[0], (void *)v16[1], (int)v17, v18); } else { if ( !(unsigned int)std::string::compare(&v14, (long long)"exit") ) { Settings::exitGame[abi:cxx11](&v22, *a1); if ( v22 != &v23 ) operator delete(v22, v23 + 1); LOBYTE(v2) = 1; std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Slave: Exiting game.\n", 21LL); goto LABEL_32; } if ( !(unsigned int)std::string::compare(&v14, (long long)"print") ) { v17 = v19; v18 = 0LL; LOBYTE(v19[0]) = 0; std::operator>><char>(v26, &v17); if ( !(unsigned int)std::string::compare(&v17, (long long)"settings") ) printSettings((const Settings *)*a1); else std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Slave: Unknown print subcommand.\n", 33LL); if ( v17 != v19 ) operator delete(v17, v19[0] + 1LL); } else { std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Slave: Unknown command.\n", 24LL); } } v2 = 0; LABEL_32: if ( v14 != v16 ) operator delete(v14, v16[0] + 1LL); std::istringstream::~istringstream(v26, &`VTT for'std::istringstream); std::ios_base::~ios_base((std::ios_base *)v27); return v2; }
handleCommand: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x2a8 MOV R14,RSI MOV RBX,RDI LEA RSI,[0x11b655] LEA R15,[RSP + 0xa0] MOV RDI,R15 MOV EDX,0x8 CALL 0x00105600 LEA RDI,[RSP + 0x118] CALL 0x00105080 TEST AL,AL JZ 0x00117b5e LEA RAX,[RSP + 0x10] MOV qword ptr [RAX + -0x10],RAX MOV qword ptr [RAX + -0x8],0x0 MOV byte ptr [RAX],0x0 XOR R13D,R13D MOV R12,RSP LAB_001179da: MOV RAX,qword ptr [RSP + 0xa0] MOV RDI,qword ptr [RAX + -0x18] ADD RDI,R15 LAB_001179e9: MOV ESI,0xa CALL 0x00105350 MOVSX EDX,AL MOV RDI,R15 MOV RSI,R12 CALL 0x00105610 MOV RCX,qword ptr [RAX] MOV RCX,qword ptr [RCX + -0x18] TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5 JNZ 0x00117af4 MOV RDX,qword ptr [RSP + 0x8] TEST RDX,RDX JZ 0x00117a45 MOV RBP,qword ptr [RSP] MOV RDI,RBP MOV ESI,0x3d CALL 0x001053e0 MOV RCX,RAX SUB RCX,RBP CMP RAX,0x1 MOV EBP,0x0 SBB RBP,RBP OR RBP,RCX JMP 0x00117a4c LAB_00117a45: MOV RBP,-0x1 LAB_00117a4c: CMP RBP,-0x1 JZ 0x001179da LAB_00117a52: LEA RDI,[RSP + 0x20] MOV RSI,R12 XOR EDX,EDX MOV RCX,RBP CALL 0x00116392 INC RBP LAB_00117a67: LEA RDI,[RSP + 0x40] MOV RSI,R12 MOV RDX,RBP MOV RCX,-0x1 CALL 0x00116392 LEA RDI,[RSP + 0x20] LEA RSI,[0x11b68d] CALL 0x0010752e TEST EAX,EAX JNZ 0x00117ab3 LEA RDI,[RSP + 0x40] LEA RSI,[0x11aa43] CALL 0x0010752e TEST EAX,EAX MOVZX R13D,R13B MOV EAX,0x1 CMOVZ R13D,EAX LAB_00117ab3: MOV RDI,qword ptr [RSP + 0x40] LEA RAX,[RSP + 0x50] CMP RDI,RAX JZ 0x00117acf MOV RSI,qword ptr [RSP + 0x50] INC RSI CALL 0x00105380 LAB_00117acf: MOV RDI,qword ptr [RSP + 0x20] LEA RAX,[RSP + 0x30] CMP RDI,RAX JZ 0x001179da MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x00105380 JMP 0x001179da LAB_00117af4: TEST R13B,0x1 JZ 0x00117b43 MOV RSI,qword ptr [RBX] LAB_00117afd: LEA RDI,[RSP + 0x80] CALL 0x00106e0c LEA RAX,[RSP + 0x90] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00117b2b MOV RSI,qword ptr [RSP + 0x90] INC RSI CALL 0x00105380 LAB_00117b2b: MOV RDI,qword ptr [0x00124fa0] LEA RSI,[0x11b73a] MOV EDX,0x24 CALL 0x00105400 LAB_00117b43: MOV RDI,qword ptr [RSP] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x00117b5e MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x00105380 LAB_00117b5e: LEA RDI,[RSP + 0xa0] CALL 0x00105090 MOV RDI,qword ptr [RBX] CALL 0x00106e98 TEST AL,AL JZ 0x00117b96 MOV RDI,qword ptr [0x00124fa0] LEA RSI,[0x11b75f] MOV EDX,0x2d CALL 0x00105400 MOV BL,0x1 JMP 0x00117cb2 LAB_00117b96: LEA R15,[RSP + 0xa0] MOV RDI,R15 MOV RSI,R14 MOV EDX,0x8 CALL 0x00105590 LEA R14,[RSP + 0x10] MOV qword ptr [R14 + -0x10],R14 MOV qword ptr [R14 + -0x8],0x0 MOV byte ptr [R14],0x0 LAB_00117bc3: MOV RSI,RSP MOV RDI,R15 CALL 0x00105440 LEA RSI,[0x11b78d] MOV RDI,RSP CALL 0x0010752e TEST EAX,EAX JZ 0x00117c25 LEA RSI,[0x11b68d] MOV RDI,RSP CALL 0x0010752e TEST EAX,EAX JZ 0x00117c39 LEA RSI,[0x11a8cf] MOV RDI,RSP CALL 0x0010752e TEST EAX,EAX JZ 0x00117cc6 MOV RDI,qword ptr [0x00124fa0] LEA RSI,[0x11b7d3] MOV EDX,0x18 CALL 0x00105400 JMP 0x00117c35 LAB_00117c25: LEA RSI,[RSP + 0xa0] MOV RDI,RBX CALL 0x00117df4 LAB_00117c35: XOR EBX,EBX JMP 0x00117c7b LAB_00117c39: MOV RSI,qword ptr [RBX] LEA RDI,[RSP + 0x60] CALL 0x00106e0c LEA RAX,[RSP + 0x70] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00117c61 MOV RSI,qword ptr [RSP + 0x70] INC RSI CALL 0x00105380 LAB_00117c61: MOV BL,0x1 MOV RDI,qword ptr [0x00124fa0] LEA RSI,[0x11b792] MOV EDX,0x15 CALL 0x00105400 LAB_00117c7b: MOV RDI,qword ptr [RSP] CMP RDI,R14 JZ 0x00117c91 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x00105380 LAB_00117c91: MOV RSI,qword ptr [0x00124f80] LEA RDI,[RSP + 0xa0] CALL 0x001054c0 LEA RDI,[RSP + 0x118] CALL 0x001050f0 LAB_00117cb2: MOV EAX,EBX ADD RSP,0x2a8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00117cc6: LEA R15,[RSP + 0x30] MOV qword ptr [R15 + -0x10],R15 MOV qword ptr [R15 + -0x8],0x0 MOV byte ptr [R15],0x0 LAB_00117cdb: LEA RDI,[RSP + 0xa0] LEA RSI,[RSP + 0x20] CALL 0x00105440 LEA RSI,[0x11b7a8] LEA RDI,[RSP + 0x20] CALL 0x0010752e TEST EAX,EAX JZ 0x00117d1c MOV RDI,qword ptr [0x00124fa0] LEA RSI,[0x11b7b1] MOV EDX,0x21 CALL 0x00105400 JMP 0x00117d24 LAB_00117d1c: MOV RDI,qword ptr [RBX] CALL 0x00118ba0 LAB_00117d24: MOV RDI,qword ptr [RSP + 0x20] CMP RDI,R15 JZ 0x00117c35 MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x00105380 JMP 0x00117c35
/* SlaveCommandHandler::handleCommand(std::__cxx11::string const&) */ ulong __thiscall SlaveCommandHandler::handleCommand(SlaveCommandHandler *this,string *param_1) { int1 *puVar1; char cVar2; int iVar3; istream *piVar4; void *pvVar5; int7 uVar6; ulong uVar7; bool bVar8; int1 *local_2d8; size_t local_2d0; int1 local_2c8; int7 uStack_2c7; int1 *local_2b8; int8 local_2b0; int1 local_2a8; int7 uStack_2a7; long *local_298 [2]; long local_288 [2]; long *local_278; long local_268 [2]; long *local_258; long local_248 [2]; long local_238 [15]; ios_base local_1c0 [400]; bool bVar9; std::ifstream::ifstream((ifstream *)local_238,"../game_data/settings.txt",8); cVar2 = std::__basic_file<char>::is_open(); if (cVar2 != '\0') { local_2d8 = &local_2c8; local_2d0 = 0; local_2c8 = 0; bVar9 = false; bVar8 = false; while( true ) { /* try { // try from 001179e9 to 00117a00 has its CatchHandler @ 00117dc1 */ cVar2 = std::ios::widen((char)*(int8 *)(local_238[0] + -0x18) + (char)(istream *)local_238); piVar4 = std::getline<char,std::char_traits<char>,std::allocator<char>> ((istream *)local_238,(string *)&local_2d8,cVar2); puVar1 = local_2d8; if (((byte)piVar4[*(long *)(*(long *)piVar4 + -0x18) + 0x20] & 5) != 0) break; if (local_2d0 == 0) { uVar7 = 0xffffffffffffffff; } else { pvVar5 = memchr(local_2d8,0x3d,local_2d0); uVar7 = -(ulong)(pvVar5 == (void *)0x0) | (long)pvVar5 - (long)puVar1; } if (uVar7 != 0xffffffffffffffff) { /* try { // try from 00117a52 to 00117a63 has its CatchHandler @ 00117d81 */ std::__cxx11::string::substr((ulong)&local_2b8,(ulong)&local_2d8); /* try { // try from 00117a67 to 00117a7d has its CatchHandler @ 00117d60 */ std::__cxx11::string::substr((ulong)local_298,(ulong)&local_2d8); iVar3 = std::__cxx11::string::compare((string *)&local_2b8,"exit"); if (iVar3 == 0) { iVar3 = std::__cxx11::string::compare((string *)local_298,"1"); bVar8 = bVar9; if (iVar3 == 0) { bVar9 = true; bVar8 = true; } } if (local_298[0] != local_288) { operator_delete(local_298[0],local_288[0] + 1); } if (local_2b8 != &local_2a8) { operator_delete(local_2b8,CONCAT71(uStack_2a7,local_2a8) + 1); } } } if (bVar8) { /* try { // try from 00117afd to 00117b42 has its CatchHandler @ 00117d83 */ Settings::exitGame_abi_cxx11_(); if (local_258 != local_248) { operator_delete(local_258,local_248[0] + 1); } std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cout_00124fa0,"Slave: Detected exit=1 from Master.\n",0x24); } if (local_2d8 != &local_2c8) { operator_delete(local_2d8,CONCAT71(uStack_2c7,local_2c8) + 1); } } std::ifstream::~ifstream((ifstream *)local_238); cVar2 = Settings::getExit(*(Settings **)this); uVar6 = (int7)((ulong)this >> 8); if (cVar2 != '\0') { std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cout_00124fa0,"Slave: Exiting (because exit=1 in settings).\n",0x2d); uVar7 = CONCAT71(uVar6,1); goto LAB_00117cb2; } std::__cxx11::istringstream::istringstream((istringstream *)local_238,param_1,8); local_2d0 = 0; local_2c8 = 0; local_2d8 = &local_2c8; /* try { // try from 00117bc3 to 00117c7a has its CatchHandler @ 00117d85 */ std::operator>>((istream *)local_238,(string *)&local_2d8); iVar3 = std::__cxx11::string::compare((string *)&local_2d8,"shot"); if (iVar3 == 0) { handleShotCommand(this,(istringstream *)local_238); LAB_00117c35: uVar7 = 0; } else { iVar3 = std::__cxx11::string::compare((string *)&local_2d8,"exit"); if (iVar3 != 0) { iVar3 = std::__cxx11::string::compare((string *)&local_2d8,"print"); if (iVar3 == 0) { local_2b0 = 0; local_2a8 = 0; /* try { // try from 00117cdb to 00117d23 has its CatchHandler @ 00117d44 */ local_2b8 = &local_2a8; std::operator>>((istream *)local_238,(string *)&local_2b8); iVar3 = std::__cxx11::string::compare((string *)&local_2b8,"settings"); if (iVar3 == 0) { printSettings(*(Settings **)this); } else { std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cout_00124fa0,"Slave: Unknown print subcommand.\n",0x21); } if (local_2b8 != &local_2a8) { operator_delete(local_2b8,CONCAT71(uStack_2a7,local_2a8) + 1); } } else { std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cout_00124fa0,"Slave: Unknown command.\n",0x18); } goto LAB_00117c35; } Settings::exitGame_abi_cxx11_(); if (local_278 != local_268) { operator_delete(local_278,local_268[0] + 1); } uVar7 = CONCAT71(uVar6,1); std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cout_00124fa0,"Slave: Exiting game.\n",0x15); } if (local_2d8 != &local_2c8) { operator_delete(local_2d8,CONCAT71(uStack_2c7,local_2c8) + 1); } std::__cxx11::istringstream::~istringstream((istringstream *)local_238); std::ios_base::~ios_base(local_1c0); LAB_00117cb2: return uVar7 & 0xffffffff; }
25,510
SlaveCommandHandler::handleCommand(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
666mxvbee[P]BattleShip/lib/Commands/SlaveCommandHandler.cpp
bool SlaveCommandHandler::handleCommand(const std::string& input) { { std::ifstream in("../game_data/settings.txt"); if (in.is_open()) { bool newExit = false; std::string line; while (std::getline(in, line)) { auto pos = line.find('='); if (pos != std::string::npos) { std::string key = line.substr(0, pos); std::string val = line.substr(pos + 1); if (key == "exit" && val == "1") { newExit = true; } } } if (newExit) { settings_.exitGame(); std::cout << "Slave: Detected exit=1 from Master.\n"; } } } if (settings_.getExit()) { std::cout << "Slave: Exiting (because exit=1 in settings).\n"; return true; } std::istringstream iss(input); std::string command; iss >> command; if (command == "shot") { handleShotCommand(iss); } else if (command == "exit") { settings_.exitGame(); std::cout << "Slave: Exiting game.\n"; return true; } else if (command == "print") { std::string sub; iss >> sub; if (sub == "settings") { printSettings(settings_); } else { std::cout << "Slave: Unknown print subcommand.\n"; } } else { std::cout << "Slave: Unknown command.\n"; } return false; }
O2
cpp
SlaveCommandHandler::handleCommand(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x2b8, %rsp # imm = 0x2B8 movq %rsi, %r15 movq %rdi, %rbx leaq 0x33a6(%rip), %rsi # 0x1866e leaq 0xb0(%rsp), %rdi pushq $0x8 popq %rdx callq 0x55b0 leaq 0x128(%rsp), %rdi callq 0x5080 leaq 0x18(%rsp), %r12 testb %al, %al je 0x153fe movq %r15, 0x48(%rsp) leaq 0x8(%rsp), %r15 movq %r12, (%r15) andq $0x0, 0x8(%r15) movb $0x0, 0x10(%r15) xorl %r13d, %r13d leaq 0xb0(%rsp), %r12 pushq $0x3d popq %rbp movq %r12, %rdi movq %r15, %rsi callq 0x5060 movq (%rax), %rcx movq -0x18(%rcx), %rcx testb $0x5, 0x20(%rax,%rcx) jne 0x153b4 movq %r15, %rdi movl %ebp, %esi xorl %edx, %edx callq 0x13f04 cmpq $-0x1, %rax je 0x15317 movq %rax, %r14 leaq 0x28(%rsp), %rdi movq %r15, %rsi xorl %edx, %edx movq %rax, %rcx callq 0x13f56 incq %r14 leaq 0x50(%rsp), %rdi movq %r15, %rsi movq %r14, %rdx pushq $-0x1 popq %rcx callq 0x13f56 leaq 0x28(%rsp), %rdi leaq 0x3329(%rip), %rsi # 0x186a6 callq 0x6b65 leaq 0x50(%rsp), %r14 testb %al, %al je 0x1539d movq %r14, %rdi leaq 0x26f9(%rip), %rsi # 0x17a8e callq 0x6b65 orb %al, %r13b movq %r14, %rdi callq 0x5bc0 leaq 0x28(%rsp), %rdi callq 0x5bc0 jmp 0x15317 testb $0x1, %r13b je 0x153ea movq (%rbx), %rsi leaq 0x90(%rsp), %rdi callq 0x667e leaq 0x90(%rsp), %rdi callq 0x5bc0 movq 0xfbba(%rip), %rdi # 0x24f98 leaq 0x336e(%rip), %rsi # 0x18753 callq 0x5340 leaq 0x8(%rsp), %rdi callq 0x5bc0 movq 0x48(%rsp), %r15 leaq 0x18(%rsp), %r12 leaq 0xb0(%rsp), %rdi callq 0x5090 movq (%rbx), %rdi callq 0x66ec testb %al, %al je 0x15431 movq 0xfb7a(%rip), %rdi # 0x24f98 leaq 0x3353(%rip), %rsi # 0x18778 callq 0x5340 movb $0x1, %bl jmp 0x154e1 leaq 0xb0(%rsp), %r14 pushq $0x8 popq %rdx movq %r14, %rdi movq %r15, %rsi callq 0x5540 leaq 0x8(%rsp), %rsi movq %r12, (%rsi) andq $0x0, 0x8(%rsi) movb $0x0, 0x10(%rsi) movq %r14, %rdi callq 0x5420 leaq 0x333f(%rip), %rsi # 0x187a6 leaq 0x8(%rsp), %rdi callq 0x6b65 testb %al, %al je 0x15489 leaq 0xb0(%rsp), %rsi movq %rbx, %rdi callq 0x155e6 xorl %ebx, %ebx jmp 0x154ca leaq 0x3216(%rip), %rsi # 0x186a6 leaq 0x8(%rsp), %rdi callq 0x6b65 testb %al, %al je 0x154f5 movq (%rbx), %rsi leaq 0x70(%rsp), %rdi callq 0x667e leaq 0x70(%rsp), %rdi callq 0x5bc0 movb $0x1, %bl movq 0xfada(%rip), %rdi # 0x24f98 leaq 0x32e6(%rip), %rsi # 0x187ab callq 0x5340 leaq 0x8(%rsp), %rdi callq 0x5bc0 leaq 0xb0(%rsp), %rdi callq 0x5180 movl %ebx, %eax addq $0x2b8, %rsp # imm = 0x2B8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x241e(%rip), %rsi # 0x1791a leaq 0x8(%rsp), %rdi callq 0x6b65 testb %al, %al je 0x1554c leaq 0x38(%rsp), %rax movq %rax, -0x10(%rax) andq $0x0, -0x8(%rax) movb $0x0, (%rax) leaq 0xb0(%rsp), %rdi leaq 0x28(%rsp), %rsi callq 0x5420 leaq 0x328d(%rip), %rsi # 0x187c1 leaq 0x28(%rsp), %rdi callq 0x6b65 testb %al, %al je 0x15564 movq (%rbx), %rdi callq 0x16074 jmp 0x15577 movq 0xfa45(%rip), %rdi # 0x24f98 leaq 0x3292(%rip), %rsi # 0x187ec callq 0x5340 jmp 0x15485 movq 0xfa2d(%rip), %rdi # 0x24f98 leaq 0x3258(%rip), %rsi # 0x187ca callq 0x5340 leaq 0x28(%rsp), %rdi callq 0x5bc0 jmp 0x15485 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x5bc0 jmp 0x155ab movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x5bc0 jmp 0x155c7 jmp 0x155c4 jmp 0x155c4 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x5bc0 leaq 0xb0(%rsp), %rdi callq 0x5180 jmp 0x155de movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x5bc0 leaq 0xb0(%rsp), %rdi callq 0x5090 movq %rbx, %rdi callq 0x5590
_ZN19SlaveCommandHandler13handleCommandERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 2B8h mov r15, rsi mov rbx, rdi lea rsi, aGameDataSettin; "../game_data/settings.txt" lea rdi, [rsp+2E8h+var_238] push 8 pop rdx call __ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode; std::ifstream::basic_ifstream(char const*,std::_Ios_Openmode) lea rdi, [rsp+2E8h+var_1C0] call __ZNKSt12__basic_fileIcE7is_openEv; std::__basic_file<char>::is_open(void) lea r12, [rsp+2E8h+var_2D0] test al, al jz loc_153FE mov [rsp+2E8h+var_2A0], r15 lea r15, [rsp+2E8h+var_2E0] mov [r15], r12 and qword ptr [r15+8], 0 mov byte ptr [r15+10h], 0 xor r13d, r13d lea r12, [rsp+2E8h+var_238] push 3Dh ; '=' pop rbp loc_15317: mov rdi, r12 mov rsi, r15 call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &) mov rcx, [rax] mov rcx, [rcx-18h] test byte ptr [rax+rcx+20h], 5 jnz loc_153B4 mov rdi, r15 mov esi, ebp xor edx, edx call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh jz short loc_15317 mov r14, rax lea rdi, [rsp+2E8h+var_2C0] mov rsi, r15 xor edx, edx mov rcx, rax call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) inc r14 lea rdi, [rsp+2E8h+var_298] mov rsi, r15 mov rdx, r14 push 0FFFFFFFFFFFFFFFFh pop rcx call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) lea rdi, [rsp+2E8h+var_2C0] lea rsi, aExit; "exit" call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) lea r14, [rsp+2E8h+var_298] test al, al jz short loc_1539D mov rdi, r14 lea rsi, aDc1+2; "1" call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) or r13b, al loc_1539D: mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+2E8h+var_2C0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp loc_15317 loc_153B4: test r13b, 1 jz short loc_153EA mov rsi, [rbx] lea rdi, [rsp+2E8h+var_258] call _ZN8Settings8exitGameB5cxx11Ev; Settings::exitGame(void) lea rdi, [rsp+2E8h+var_258] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, cs:_ZSt4cout_ptr lea rsi, aSlaveDetectedE_0; "Slave: Detected exit=1 from Master.\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) loc_153EA: lea rdi, [rsp+2E8h+var_2E0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov r15, [rsp+2E8h+var_2A0] lea r12, [rsp+2E8h+var_2D0] loc_153FE: lea rdi, [rsp+2E8h+var_238] call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream() mov rdi, [rbx]; this call _ZNK8Settings7getExitEv; Settings::getExit(void) test al, al jz short loc_15431 mov rdi, cs:_ZSt4cout_ptr lea rsi, aSlaveExitingBe; "Slave: Exiting (because exit=1 in setti"... call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov bl, 1 jmp loc_154E1 loc_15431: lea r14, [rsp+2E8h+var_238] push 8 pop rdx mov rdi, r14 mov rsi, r15 call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode) lea rsi, [rsp+2E8h+var_2E0] mov [rsi], r12 and qword ptr [rsi+8], 0 mov byte ptr [rsi+10h], 0 mov rdi, r14 call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &) lea rsi, aShot; "shot" lea rdi, [rsp+2E8h+var_2E0] call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jz short loc_15489 lea rsi, [rsp+2E8h+var_238] mov rdi, rbx call _ZN19SlaveCommandHandler17handleShotCommandERNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE; SlaveCommandHandler::handleShotCommand(std::istringstream &) loc_15485: xor ebx, ebx jmp short loc_154CA loc_15489: lea rsi, aExit; "exit" lea rdi, [rsp+2E8h+var_2E0] call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jz short loc_154F5 mov rsi, [rbx] lea rdi, [rsp+2E8h+var_278] call _ZN8Settings8exitGameB5cxx11Ev; Settings::exitGame(void) lea rdi, [rsp+2E8h+var_278] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov bl, 1 mov rdi, cs:_ZSt4cout_ptr lea rsi, aSlaveExitingGa_0; "Slave: Exiting game.\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) loc_154CA: lea rdi, [rsp+2E8h+var_2E0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+2E8h+var_238] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream() loc_154E1: mov eax, ebx add rsp, 2B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_154F5: lea rsi, aPrint; "print" lea rdi, [rsp+2E8h+var_2E0] call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jz short loc_1554C lea rax, [rsp+2E8h+var_2B0] mov [rax-10h], rax and qword ptr [rax-8], 0 mov byte ptr [rax], 0 lea rdi, [rsp+2E8h+var_238] lea rsi, [rsp+2E8h+var_2C0] call __ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator>><char>(std::istream &,std::string &) lea rsi, aSettings; "settings" lea rdi, [rsp+2E8h+var_2C0] call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jz short loc_15564 mov rdi, [rbx]; this call _Z13printSettingsRK8Settings; printSettings(Settings const&) jmp short loc_15577 loc_1554C: mov rdi, cs:_ZSt4cout_ptr lea rsi, aSlaveUnknownCo; "Slave: Unknown command.\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp loc_15485 loc_15564: mov rdi, cs:_ZSt4cout_ptr lea rsi, aSlaveUnknownPr; "Slave: Unknown print subcommand.\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) loc_15577: lea rdi, [rsp+2E8h+var_2C0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp loc_15485 mov rbx, rax lea rdi, [rsp+arg_20] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_155AB mov rbx, rax lea rdi, [rsp+arg_20] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_155C7 jmp short loc_155C4 jmp short loc_155C4 mov rbx, rax loc_155AB: lea rdi, [rsp+arg_0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+arg_A8] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream() jmp short loc_155DE loc_155C4: mov rbx, rax loc_155C7: lea rdi, [rsp+arg_0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+arg_A8] call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream() loc_155DE: mov rdi, rbx call __Unwind_Resume
long long SlaveCommandHandler::handleCommand(std::mutex **a1, long long a2) { long long v2; // r15 unsigned int v3; // ebx char v4; // r13 _QWORD *v5; // rax long long v6; // rax long long v7; // r14 int v8; // edx int v9; // ecx int v10; // r8d int v11; // r9d _BYTE *v13; // [rsp+8h] [rbp-2E0h] BYREF long long v14; // [rsp+10h] [rbp-2D8h] _BYTE v15[16]; // [rsp+18h] [rbp-2D0h] BYREF _QWORD v16[2]; // [rsp+28h] [rbp-2C0h] BYREF char v17; // [rsp+38h] [rbp-2B0h] BYREF long long v18; // [rsp+48h] [rbp-2A0h] _BYTE v19[32]; // [rsp+50h] [rbp-298h] BYREF _BYTE v20[32]; // [rsp+70h] [rbp-278h] BYREF _BYTE v21[32]; // [rsp+90h] [rbp-258h] BYREF _BYTE v22[120]; // [rsp+B0h] [rbp-238h] BYREF _BYTE v23[448]; // [rsp+128h] [rbp-1C0h] BYREF v2 = a2; v3 = (unsigned int)a1; std::ifstream::basic_ifstream(v22, "../game_data/settings.txt", 8LL); if ( (unsigned __int8)std::__basic_file<char>::is_open(v23) ) { v18 = a2; v13 = v15; v14 = 0LL; v15[0] = 0; v4 = 0; while ( 1 ) { v5 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(v22, &v13); if ( (*((_BYTE *)v5 + *(_QWORD *)(*v5 - 24LL) + 32) & 5) != 0 ) break; v6 = std::string::find((long long *)&v13, 61, 0LL); if ( v6 != -1 ) { v7 = v6; std::string::substr((long long)v16, (long long)&v13, 0LL, v6); std::string::substr((long long)v19, (long long)&v13, v7 + 1, -1LL); if ( std::operator==<char>((long long)v16) ) v4 |= std::operator==<char>((long long)v19); std::string::~string(); std::string::~string(); } } if ( (v4 & 1) != 0 ) { Settings::exitGame[abi:cxx11]((long long)v21, *a1); std::string::~string(); std::operator<<<std::char_traits<char>>(&std::cout, "Slave: Detected exit=1 from Master.\n"); } std::string::~string(); v2 = v18; } std::ifstream::~ifstream(v22); if ( !(unsigned __int8)Settings::getExit(*a1) ) { std::istringstream::basic_istringstream(v22, v2, 8LL); v13 = v15; v14 = 0LL; v15[0] = 0; std::operator>><char>(v22); if ( std::operator==<char>((long long)&v13) ) { SlaveCommandHandler::handleShotCommand((_DWORD)a1, (unsigned int)v22, v8, v9, v10, v11); } else { if ( std::operator==<char>((long long)&v13) ) { Settings::exitGame[abi:cxx11]((long long)v20, *a1); std::string::~string(); LOBYTE(v3) = 1; std::operator<<<std::char_traits<char>>(&std::cout, "Slave: Exiting game.\n"); goto LABEL_18; } if ( std::operator==<char>((long long)&v13) ) { v16[0] = &v17; v16[1] = 0LL; v17 = 0; std::operator>><char>(v22); if ( std::operator==<char>((long long)v16) ) printSettings(*a1); else std::operator<<<std::char_traits<char>>(&std::cout, "Slave: Unknown print subcommand.\n"); std::string::~string(); } else { std::operator<<<std::char_traits<char>>(&std::cout, "Slave: Unknown command.\n"); } } v3 = 0; LABEL_18: std::string::~string(); std::istringstream::~istringstream(v22); return v3; } std::operator<<<std::char_traits<char>>(&std::cout, "Slave: Exiting (because exit=1 in settings).\n"); LOBYTE(v3) = 1; return v3; }
handleCommand: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x2b8 MOV R15,RSI MOV RBX,RDI LEA RSI,[0x11866e] LEA RDI,[RSP + 0xb0] PUSH 0x8 POP RDX CALL 0x001055b0 LEA RDI,[RSP + 0x128] CALL 0x00105080 LEA R12,[RSP + 0x18] TEST AL,AL JZ 0x001153fe MOV qword ptr [RSP + 0x48],R15 LEA R15,[RSP + 0x8] MOV qword ptr [R15],R12 AND qword ptr [R15 + 0x8],0x0 MOV byte ptr [R15 + 0x10],0x0 XOR R13D,R13D LEA R12,[RSP + 0xb0] PUSH 0x3d POP RBP LAB_00115317: MOV RDI,R12 MOV RSI,R15 CALL 0x00105060 MOV RCX,qword ptr [RAX] MOV RCX,qword ptr [RCX + -0x18] TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5 JNZ 0x001153b4 MOV RDI,R15 MOV ESI,EBP XOR EDX,EDX CALL 0x00113f04 CMP RAX,-0x1 JZ 0x00115317 LAB_00115346: MOV R14,RAX LEA RDI,[RSP + 0x28] MOV RSI,R15 XOR EDX,EDX MOV RCX,RAX CALL 0x00113f56 INC R14 LAB_0011535e: LEA RDI,[RSP + 0x50] MOV RSI,R15 MOV RDX,R14 PUSH -0x1 POP RCX CALL 0x00113f56 LEA RDI,[RSP + 0x28] LEA RSI,[0x1186a6] CALL 0x00106b65 LEA R14,[RSP + 0x50] TEST AL,AL JZ 0x0011539d MOV RDI,R14 LEA RSI,[0x117a8e] CALL 0x00106b65 OR R13B,AL LAB_0011539d: MOV RDI,R14 CALL 0x00105bc0 LEA RDI,[RSP + 0x28] CALL 0x00105bc0 JMP 0x00115317 LAB_001153b4: TEST R13B,0x1 JZ 0x001153ea MOV RSI,qword ptr [RBX] LAB_001153bd: LEA RDI,[RSP + 0x90] CALL 0x0010667e LEA RDI,[RSP + 0x90] CALL 0x00105bc0 MOV RDI,qword ptr [0x00124f98] LEA RSI,[0x118753] CALL 0x00105340 LAB_001153ea: LEA RDI,[RSP + 0x8] CALL 0x00105bc0 MOV R15,qword ptr [RSP + 0x48] LEA R12,[RSP + 0x18] LAB_001153fe: LEA RDI,[RSP + 0xb0] CALL 0x00105090 MOV RDI,qword ptr [RBX] CALL 0x001066ec TEST AL,AL JZ 0x00115431 MOV RDI,qword ptr [0x00124f98] LEA RSI,[0x118778] CALL 0x00105340 MOV BL,0x1 JMP 0x001154e1 LAB_00115431: LEA R14,[RSP + 0xb0] PUSH 0x8 POP RDX MOV RDI,R14 MOV RSI,R15 CALL 0x00105540 LEA RSI,[RSP + 0x8] MOV qword ptr [RSI],R12 AND qword ptr [RSI + 0x8],0x0 MOV byte ptr [RSI + 0x10],0x0 LAB_00115458: MOV RDI,R14 CALL 0x00105420 LEA RSI,[0x1187a6] LEA RDI,[RSP + 0x8] CALL 0x00106b65 TEST AL,AL JZ 0x00115489 LEA RSI,[RSP + 0xb0] MOV RDI,RBX CALL 0x001155e6 LAB_00115485: XOR EBX,EBX JMP 0x001154ca LAB_00115489: LEA RSI,[0x1186a6] LEA RDI,[RSP + 0x8] CALL 0x00106b65 TEST AL,AL JZ 0x001154f5 MOV RSI,qword ptr [RBX] LEA RDI,[RSP + 0x70] CALL 0x0010667e LEA RDI,[RSP + 0x70] CALL 0x00105bc0 MOV BL,0x1 MOV RDI,qword ptr [0x00124f98] LEA RSI,[0x1187ab] CALL 0x00105340 LAB_001154ca: LEA RDI,[RSP + 0x8] CALL 0x00105bc0 LEA RDI,[RSP + 0xb0] CALL 0x00105180 LAB_001154e1: MOV EAX,EBX ADD RSP,0x2b8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001154f5: LEA RSI,[0x11791a] LEA RDI,[RSP + 0x8] CALL 0x00106b65 TEST AL,AL JZ 0x0011554c LEA RAX,[RSP + 0x38] MOV qword ptr [RAX + -0x10],RAX AND qword ptr [RAX + -0x8],0x0 MOV byte ptr [RAX],0x0 LAB_0011551b: LEA RDI,[RSP + 0xb0] LEA RSI,[RSP + 0x28] CALL 0x00105420 LEA RSI,[0x1187c1] LEA RDI,[RSP + 0x28] CALL 0x00106b65 TEST AL,AL JZ 0x00115564 MOV RDI,qword ptr [RBX] CALL 0x00116074 JMP 0x00115577 LAB_0011554c: MOV RDI,qword ptr [0x00124f98] LEA RSI,[0x1187ec] CALL 0x00105340 JMP 0x00115485 LAB_00115564: MOV RDI,qword ptr [0x00124f98] LEA RSI,[0x1187ca] CALL 0x00105340 LAB_00115577: LEA RDI,[RSP + 0x28] CALL 0x00105bc0 JMP 0x00115485
/* SlaveCommandHandler::handleCommand(std::__cxx11::string const&) */ ulong __thiscall SlaveCommandHandler::handleCommand(SlaveCommandHandler *this,string *param_1) { char cVar1; bool bVar2; istream *piVar3; long lVar4; int7 uVar6; ulong uVar5; byte bVar7; int1 *local_2e0; int8 local_2d8; int1 local_2d0 [16]; int1 *local_2c0; int8 local_2b8; int1 local_2b0 [16]; string *local_2a0; string local_298 [32]; string local_278 [32]; string local_258 [32]; ifstream local_238 [520]; std::ifstream::ifstream(local_238,"../game_data/settings.txt",8); cVar1 = std::__basic_file<char>::is_open(); if (cVar1 != '\0') { local_2d8 = 0; local_2d0[0] = 0; bVar7 = 0; local_2e0 = local_2d0; local_2a0 = param_1; while( true ) { /* try { // try from 00115317 to 00115321 has its CatchHandler @ 001155c4 */ piVar3 = std::getline<char,std::char_traits<char>,std::allocator<char>> ((istream *)local_238,(string *)&local_2e0); if (((byte)piVar3[*(long *)(*(long *)piVar3 + -0x18) + 0x20] & 5) != 0) break; lVar4 = std::__cxx11::string::find((string *)&local_2e0,'=',0); if (lVar4 != -1) { /* try { // try from 00115346 to 0011535a has its CatchHandler @ 001155a4 */ std::__cxx11::string::substr((ulong)&local_2c0,(ulong)&local_2e0); /* try { // try from 0011535e to 00115370 has its CatchHandler @ 00115595 */ std::__cxx11::string::substr((ulong)local_298,(ulong)&local_2e0); bVar2 = std::operator==((string *)&local_2c0,"exit"); if (bVar2) { bVar2 = std::operator==(local_298,"1"); bVar7 = bVar7 | bVar2; } std::__cxx11::string::~string(local_298); std::__cxx11::string::~string((string *)&local_2c0); } } if (bVar7 != 0) { /* try { // try from 001153bd to 001153e9 has its CatchHandler @ 001155a6 */ Settings::exitGame_abi_cxx11_(); std::__cxx11::string::~string(local_258); std::operator<<((ostream *)PTR_cout_00124f98,"Slave: Detected exit=1 from Master.\n"); } std::__cxx11::string::~string((string *)&local_2e0); param_1 = local_2a0; } std::ifstream::~ifstream(local_238); cVar1 = Settings::getExit(*(Settings **)this); uVar6 = (int7)((ulong)this >> 8); if (cVar1 != '\0') { std::operator<<((ostream *)PTR_cout_00124f98,"Slave: Exiting (because exit=1 in settings).\n"); uVar5 = CONCAT71(uVar6,1); goto LAB_001154e1; } std::__cxx11::istringstream::istringstream((istringstream *)local_238,param_1,8); local_2d8 = 0; local_2d0[0] = 0; local_2e0 = local_2d0; /* try { // try from 00115458 to 001154c9 has its CatchHandler @ 001155a8 */ std::operator>>((istream *)local_238,(string *)&local_2e0); bVar2 = std::operator==((string *)&local_2e0,"shot"); if (bVar2) { handleShotCommand(this,(istringstream *)local_238); LAB_00115485: uVar5 = 0; } else { bVar2 = std::operator==((string *)&local_2e0,"exit"); if (!bVar2) { bVar2 = std::operator==((string *)&local_2e0,"print"); if (bVar2) { local_2c0 = local_2b0; local_2b8 = 0; local_2b0[0] = 0; /* try { // try from 0011551b to 00115549 has its CatchHandler @ 00115586 */ std::operator>>((istream *)local_238,(string *)&local_2c0); bVar2 = std::operator==((string *)&local_2c0,"settings"); if (bVar2) { printSettings(*(Settings **)this); } else { /* try { // try from 00115564 to 00115576 has its CatchHandler @ 00115586 */ std::operator<<((ostream *)PTR_cout_00124f98,"Slave: Unknown print subcommand.\n"); } std::__cxx11::string::~string((string *)&local_2c0); } else { /* try { // try from 0011554c to 0011555e has its CatchHandler @ 001155a8 */ std::operator<<((ostream *)PTR_cout_00124f98,"Slave: Unknown command.\n"); } goto LAB_00115485; } Settings::exitGame_abi_cxx11_(); std::__cxx11::string::~string(local_278); uVar5 = CONCAT71(uVar6,1); std::operator<<((ostream *)PTR_cout_00124f98,"Slave: Exiting game.\n"); } std::__cxx11::string::~string((string *)&local_2e0); std::__cxx11::istringstream::~istringstream((istringstream *)local_238); LAB_001154e1: return uVar5 & 0xffffffff; }
25,511
my_coll_parser_exec
eloqsql/strings/ctype-uca.c
static int my_coll_parser_exec(MY_COLL_RULE_PARSER *p) { if (!my_coll_parser_scan_settings(p)) return 0; while (my_coll_parser_curr(p)->term == MY_COLL_LEXEM_RESET) { if (!my_coll_parser_scan_rule(p)) return 0; } /* Make sure no unparsed input data left */ return my_coll_parser_scan_term(p, MY_COLL_LEXEM_EOF); }
O0
c
my_coll_parser_exec: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rdi callq 0x85db0 cmpl $0x0, %eax jne 0x85783 movl $0x0, -0x4(%rbp) jmp 0x857ba jmp 0x85785 movq -0x10(%rbp), %rdi callq 0x858e0 cmpl $0x4, (%rax) jne 0x857ac movq -0x10(%rbp), %rdi callq 0x85e00 cmpl $0x0, %eax jne 0x857aa movl $0x0, -0x4(%rbp) jmp 0x857ba jmp 0x85785 movq -0x10(%rbp), %rdi xorl %esi, %esi callq 0x85eb0 movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_coll_parser_exec: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_10], rdi mov rdi, [rbp+var_10] call my_coll_parser_scan_settings cmp eax, 0 jnz short loc_85783 mov [rbp+var_4], 0 jmp short loc_857BA loc_85783: jmp short $+2 loc_85785: mov rdi, [rbp+var_10] call my_coll_parser_curr cmp dword ptr [rax], 4 jnz short loc_857AC mov rdi, [rbp+var_10] call my_coll_parser_scan_rule cmp eax, 0 jnz short loc_857AA mov [rbp+var_4], 0 jmp short loc_857BA loc_857AA: jmp short loc_85785 loc_857AC: mov rdi, [rbp+var_10] xor esi, esi call my_coll_parser_scan_term mov [rbp+var_4], eax loc_857BA: mov eax, [rbp+var_4] add rsp, 10h pop rbp retn
long long my_coll_parser_exec(long long a1) { if ( (unsigned int)my_coll_parser_scan_settings(a1) ) { while ( *(_DWORD *)my_coll_parser_curr(a1) == 4 ) { if ( !(unsigned int)my_coll_parser_scan_rule(a1) ) return 0; } return (unsigned int)my_coll_parser_scan_term(a1, 0LL); } else { return 0; } }
my_coll_parser_exec: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x10],RDI MOV RDI,qword ptr [RBP + -0x10] CALL 0x00185db0 CMP EAX,0x0 JNZ 0x00185783 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001857ba LAB_00185783: JMP 0x00185785 LAB_00185785: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001858e0 CMP dword ptr [RAX],0x4 JNZ 0x001857ac MOV RDI,qword ptr [RBP + -0x10] CALL 0x00185e00 CMP EAX,0x0 JNZ 0x001857aa MOV dword ptr [RBP + -0x4],0x0 JMP 0x001857ba LAB_001857aa: JMP 0x00185785 LAB_001857ac: MOV RDI,qword ptr [RBP + -0x10] XOR ESI,ESI CALL 0x00185eb0 MOV dword ptr [RBP + -0x4],EAX LAB_001857ba: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x10 POP RBP RET
int4 my_coll_parser_exec(int8 param_1) { int iVar1; int4 uVar2; int *piVar3; iVar1 = my_coll_parser_scan_settings(param_1); while( true ) { if (iVar1 == 0) { return 0; } piVar3 = (int *)my_coll_parser_curr(param_1); if (*piVar3 != 4) break; iVar1 = my_coll_parser_scan_rule(param_1); } uVar2 = my_coll_parser_scan_term(param_1,0); return uVar2; }
25,512
my_wc_mb_eucjpms
eloqsql/strings/ctype-eucjpms.c
static int my_wc_mb_eucjpms(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { int jp; if ((int) wc < 0x80) /* ASCII [00-7F] */ { if (s >= e) return MY_CS_TOOSMALL; *s= (uchar) wc; return 1; } if (wc > 0xFFFF) return MY_CS_ILUNI; if ((jp= unicode_to_jisx0208_eucjpms[wc])) /* JIS-X-0208 MS */ { if (s + 2 > e) return MY_CS_TOOSMALL2; MY_PUT_MB2(s, jp); return 2; } if ((jp= unicode_to_jisx0212_eucjpms[wc])) /* JIS-X-0212 MS */ { if (s + 3 > e) return MY_CS_TOOSMALL3; s[0]= 0x8F; MY_PUT_MB2(s + 1, jp); return 3; } if (wc >= 0xFF61 && wc <= 0xFF9F) /* Half width Katakana */ { if (s + 2 > e) return MY_CS_TOOSMALL2; s[0]= 0x8E; s[1]= (uchar) (wc - 0xFEC0); return 2; } return MY_CS_ILUNI; }
O3
c
my_wc_mb_eucjpms: cmpl $0x7f, %esi jg 0x3b541 movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x3b576 movb %sil, (%rdx) movl $0x1, %eax retq xorl %eax, %eax cmpq $0xffff, %rsi # imm = 0xFFFF ja 0x3b576 leaq 0xe6f4d(%rip), %rdi # 0x1224a0 movzwl (%rdi,%rsi,2), %edi testw %di, %di je 0x3b577 leaq 0x2(%rdx), %rsi movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %rsi ja 0x3b576 rolw $0x8, %di movw %di, (%rdx) movl $0x2, %eax retq pushq %rbp movq %rsp, %rbp pushq %rbx leaq 0x106f1d(%rip), %rdi # 0x1424a0 movzwl (%rdi,%rsi,2), %ebx testw %bx, %bx je 0x3b5aa leaq 0x3(%rdx), %rsi movl $0xffffff99, %eax # imm = 0xFFFFFF99 cmpq %rcx, %rsi ja 0x3b5d5 movb $-0x71, (%rdx) movb %bh, 0x1(%rdx) movb %bl, 0x2(%rdx) movl $0x3, %eax jmp 0x3b5d5 leaq -0xff61(%rsi), %rdi cmpq $0x3e, %rdi ja 0x3b5d5 leaq 0x2(%rdx), %rdi movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %rdi ja 0x3b5d5 movb $-0x72, (%rdx) addb $0x40, %sil movb %sil, 0x1(%rdx) movl $0x2, %eax popq %rbx popq %rbp retq
my_wc_mb_eucjpms: cmp esi, 7Fh jg short loc_3B541 mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short locret_3B576 mov [rdx], sil mov eax, 1 retn loc_3B541: xor eax, eax cmp rsi, 0FFFFh ja short locret_3B576 lea rdi, unicode_to_jisx0208_eucjpms movzx edi, word ptr [rdi+rsi*2] test di, di jz short loc_3B577 lea rsi, [rdx+2] mov eax, 0FFFFFF9Ah cmp rsi, rcx ja short locret_3B576 rol di, 8 mov [rdx], di mov eax, 2 locret_3B576: retn loc_3B577: push rbp mov rbp, rsp push rbx lea rdi, unicode_to_jisx0212_eucjpms movzx ebx, word ptr [rdi+rsi*2] test bx, bx jz short loc_3B5AA lea rsi, [rdx+3] mov eax, 0FFFFFF99h cmp rsi, rcx ja short loc_3B5D5 mov byte ptr [rdx], 8Fh mov [rdx+1], bh mov [rdx+2], bl mov eax, 3 jmp short loc_3B5D5 loc_3B5AA: lea rdi, [rsi-0FF61h] cmp rdi, 3Eh ; '>' ja short loc_3B5D5 lea rdi, [rdx+2] mov eax, 0FFFFFF9Ah cmp rdi, rcx ja short loc_3B5D5 mov byte ptr [rdx], 8Eh add sil, 40h ; '@' mov [rdx+1], sil mov eax, 2 loc_3B5D5: pop rbx pop rbp retn
long long my_wc_mb_eucjpms(long long a1, unsigned long long a2, unsigned long long a3, unsigned long long a4) { long long result; // rax __int16 v5; // di __int16 v6; // bx if ( (int)a2 > 127 ) { result = 0LL; if ( a2 <= 0xFFFF ) { v5 = unicode_to_jisx0208_eucjpms[a2]; if ( v5 ) { result = 4294967194LL; if ( a3 + 2 <= a4 ) { *(_WORD *)a3 = __ROL2__(v5, 8); return 2LL; } } else { v6 = unicode_to_jisx0212_eucjpms[a2]; if ( v6 ) { result = 4294967193LL; if ( a3 + 3 <= a4 ) { *(_BYTE *)a3 = -113; *(_BYTE *)(a3 + 1) = HIBYTE(v6); *(_BYTE *)(a3 + 2) = v6; return 3LL; } } else if ( a2 - 65377 <= 0x3E ) { result = 4294967194LL; if ( a3 + 2 <= a4 ) { *(_BYTE *)a3 = -114; *(_BYTE *)(a3 + 1) = a2 + 64; return 2LL; } } } } } else { result = 4294967195LL; if ( a3 < a4 ) { *(_BYTE *)a3 = a2; return 1LL; } } return result; }
my_wc_mb_eucjpms: CMP ESI,0x7f JG 0x0013b541 MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x0013b576 MOV byte ptr [RDX],SIL MOV EAX,0x1 RET LAB_0013b541: XOR EAX,EAX CMP RSI,0xffff JA 0x0013b576 LEA RDI,[0x2224a0] MOVZX EDI,word ptr [RDI + RSI*0x2] TEST DI,DI JZ 0x0013b577 LEA RSI,[RDX + 0x2] MOV EAX,0xffffff9a CMP RSI,RCX JA 0x0013b576 ROL DI,0x8 MOV word ptr [RDX],DI MOV EAX,0x2 LAB_0013b576: RET LAB_0013b577: PUSH RBP MOV RBP,RSP PUSH RBX LEA RDI,[0x2424a0] MOVZX EBX,word ptr [RDI + RSI*0x2] TEST BX,BX JZ 0x0013b5aa LEA RSI,[RDX + 0x3] MOV EAX,0xffffff99 CMP RSI,RCX JA 0x0013b5d5 MOV byte ptr [RDX],0x8f MOV byte ptr [RDX + 0x1],BH MOV byte ptr [RDX + 0x2],BL MOV EAX,0x3 JMP 0x0013b5d5 LAB_0013b5aa: LEA RDI,[RSI + -0xff61] CMP RDI,0x3e JA 0x0013b5d5 LEA RDI,[RDX + 0x2] MOV EAX,0xffffff9a CMP RDI,RCX JA 0x0013b5d5 MOV byte ptr [RDX],0x8e ADD SIL,0x40 MOV byte ptr [RDX + 0x1],SIL MOV EAX,0x2 LAB_0013b5d5: POP RBX POP RBP RET
int8 my_wc_mb_eucjpms(int8 param_1,ulong param_2,ushort *param_3,ushort *param_4) { ushort uVar1; short sVar2; int8 uVar3; if ((int)param_2 < 0x80) { uVar3 = 0xffffff9b; if (param_3 < param_4) { *(char *)param_3 = (char)param_2; return 1; } } else { uVar3 = 0; if (param_2 < 0x10000) { uVar1 = *(ushort *)(unicode_to_jisx0208_eucjpms + param_2 * 2); if (uVar1 == 0) { sVar2 = *(short *)(unicode_to_jisx0212_eucjpms + param_2 * 2); if (sVar2 == 0) { if ((param_2 - 0xff61 < 0x3f) && (uVar3 = 0xffffff9a, param_3 + 1 <= param_4)) { *(char *)param_3 = -0x72; *(char *)((long)param_3 + 1) = (char)param_2 + '@'; uVar3 = 2; } } else { uVar3 = 0xffffff99; if ((ushort *)((long)param_3 + 3) <= param_4) { *(char *)param_3 = -0x71; *(char *)((long)param_3 + 1) = (char)((ushort)sVar2 >> 8); *(char *)(param_3 + 1) = (char)sVar2; uVar3 = 3; } } return uVar3; } uVar3 = 0xffffff9a; if (param_3 + 1 <= param_4) { *param_3 = uVar1 << 8 | uVar1 >> 8; uVar3 = 2; } } } return uVar3; }
25,513
bool httplib::detail::parse_header<bool httplib::detail::read_content_chunked<httplib::Request>(httplib::Stream&, httplib::Request&, std::function<bool (char const*, unsigned long, unsigned long, unsigned long)>)::'lambda'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)>(char const*, char const*, httplib::Request)
hkr04[P]cpp-mcp/common/httplib.h
inline bool parse_header(const char *beg, const char *end, T fn) { // Skip trailing spaces and tabs. while (beg < end && is_space_or_tab(end[-1])) { end--; } auto p = beg; while (p < end && *p != ':') { p++; } if (p == end) { return false; } auto key_end = p; if (*p++ != ':') { return false; } while (p < end && is_space_or_tab(*p)) { p++; } if (p <= end) { auto key_len = key_end - beg; if (!key_len) { return false; } auto key = std::string(beg, key_end); // auto val = (case_ignore::equal(key, "Location") || // case_ignore::equal(key, "Referer")) // ? std::string(p, end) // : decode_url(std::string(p, end), false); auto val = std::string(p, end); if (!detail::fields::is_field_value(val)) { return false; } if (case_ignore::equal(key, "Location") || case_ignore::equal(key, "Referer")) { fn(key, val); } else { fn(key, decode_url(val, false)); } return true; } return false; }
O0
c
bool httplib::detail::parse_header<bool httplib::detail::read_content_chunked<httplib::Request>(httplib::Stream&, httplib::Request&, std::function<bool (char const*, unsigned long, unsigned long, unsigned long)>)::'lambda'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)>(char const*, char const*, httplib::Request): subq $0x168, %rsp # imm = 0x168 movq %rdx, 0x158(%rsp) movq %rdi, 0x150(%rsp) movq %rsi, 0x148(%rsp) movq 0x150(%rsp), %rcx xorl %eax, %eax cmpq 0x148(%rsp), %rcx movb %al, 0x5f(%rsp) jae 0x60a0c movq 0x148(%rsp), %rax movsbl -0x1(%rax), %edi callq 0x215f0 movb %al, 0x5f(%rsp) movb 0x5f(%rsp), %al testb $0x1, %al jne 0x60a16 jmp 0x60a2c movq 0x148(%rsp), %rax addq $-0x1, %rax movq %rax, 0x148(%rsp) jmp 0x609df movq 0x150(%rsp), %rax movq %rax, 0x140(%rsp) movq 0x140(%rsp), %rcx xorl %eax, %eax cmpq 0x148(%rsp), %rcx movb %al, 0x5e(%rsp) jae 0x60a69 movq 0x140(%rsp), %rax movsbl (%rax), %eax cmpl $0x3a, %eax setne %al movb %al, 0x5e(%rsp) movb 0x5e(%rsp), %al testb $0x1, %al jne 0x60a73 jmp 0x60a89 movq 0x140(%rsp), %rax addq $0x1, %rax movq %rax, 0x140(%rsp) jmp 0x60a3c movq 0x140(%rsp), %rax cmpq 0x148(%rsp), %rax jne 0x60aa8 movb $0x0, 0x167(%rsp) jmp 0x60f72 movq 0x140(%rsp), %rax movq %rax, 0x138(%rsp) movq 0x140(%rsp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, 0x140(%rsp) movsbl (%rax), %eax cmpl $0x3a, %eax je 0x60ae4 movb $0x0, 0x167(%rsp) jmp 0x60f72 jmp 0x60ae6 movq 0x140(%rsp), %rcx xorl %eax, %eax cmpq 0x148(%rsp), %rcx movb %al, 0x5d(%rsp) jae 0x60b12 movq 0x140(%rsp), %rax movsbl (%rax), %edi callq 0x215f0 movb %al, 0x5d(%rsp) movb 0x5d(%rsp), %al testb $0x1, %al jne 0x60b1c jmp 0x60b32 movq 0x140(%rsp), %rax addq $0x1, %rax movq %rax, 0x140(%rsp) jmp 0x60ae6 movq 0x140(%rsp), %rax cmpq 0x148(%rsp), %rax ja 0x60f6a movq 0x138(%rsp), %rax movq 0x150(%rsp), %rcx subq %rcx, %rax movq %rax, 0x130(%rsp) cmpq $0x0, 0x130(%rsp) jne 0x60b7b movb $0x0, 0x167(%rsp) jmp 0x60f72 movq 0x150(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x138(%rsp), %rax movq %rax, 0x48(%rsp) leaq 0x10f(%rsp), %rdi movq %rdi, 0x50(%rsp) callq 0xce50 movq 0x40(%rsp), %rsi movq 0x48(%rsp), %rdx movq 0x50(%rsp), %rcx leaq 0x110(%rsp), %rdi callq 0x21620 jmp 0x60bc5 leaq 0x10f(%rsp), %rdi callq 0xc950 movq 0x140(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x148(%rsp), %rax movq %rax, 0x30(%rsp) leaq 0xd7(%rsp), %rdi movq %rdi, 0x38(%rsp) callq 0xce50 movq 0x28(%rsp), %rsi movq 0x30(%rsp), %rdx movq 0x38(%rsp), %rcx leaq 0xd8(%rsp), %rdi callq 0x21620 jmp 0x60c1c leaq 0xd7(%rsp), %rdi callq 0xc950 leaq 0xd8(%rsp), %rdi callq 0x216a0 movb %al, 0x27(%rsp) jmp 0x60c3c movb 0x27(%rsp), %al testb $0x1, %al jne 0x60cc3 jmp 0x60c46 movb $0x0, 0x167(%rsp) movl $0x1, 0xd0(%rsp) jmp 0x60f32 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x100(%rsp) movl %eax, 0xfc(%rsp) leaq 0x10f(%rsp), %rdi callq 0xc950 jmp 0x60f83 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x100(%rsp) movl %eax, 0xfc(%rsp) leaq 0xd7(%rsp), %rdi callq 0xc950 jmp 0x60f5b movq %rax, %rcx movl %edx, %eax movq %rcx, 0x100(%rsp) movl %eax, 0xfc(%rsp) jmp 0x60f4e leaq 0xaf(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0xce50 movq 0x18(%rsp), %rdx movb $0x0, 0x86(%rsp) movb $0x0, 0x85(%rsp) leaq 0x832a7(%rip), %rsi # 0xe3f98 leaq 0xb0(%rsp), %rdi callq 0x12660 jmp 0x60d00 leaq 0x110(%rsp), %rdi leaq 0xb0(%rsp), %rsi callq 0x216c0 movb %al, 0x17(%rsp) jmp 0x60d1b movb 0x17(%rsp), %cl movb $0x1, %al testb $0x1, %cl movb %al, 0x16(%rsp) jne 0x60d8e jmp 0x60d2c leaq 0x87(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0xce50 movq 0x8(%rsp), %rdx movb $0x1, 0x86(%rsp) leaq 0x8324f(%rip), %rsi # 0xe3fa1 leaq 0x88(%rsp), %rdi callq 0x12660 jmp 0x60d61 movb $0x1, 0x85(%rsp) leaq 0x110(%rsp), %rdi leaq 0x88(%rsp), %rsi callq 0x216c0 movb %al, 0x7(%rsp) jmp 0x60d84 movb 0x7(%rsp), %al movb %al, 0x16(%rsp) jmp 0x60d8e movb 0x16(%rsp), %al movb %al, 0x6(%rsp) testb $0x1, 0x85(%rsp) jne 0x60da2 jmp 0x60daf leaq 0x88(%rsp), %rdi callq 0xcfd0 testb $0x1, 0x86(%rsp) jne 0x60dbb jmp 0x60dc8 leaq 0x87(%rsp), %rdi callq 0xc950 leaq 0xb0(%rsp), %rdi callq 0xcfd0 leaq 0xaf(%rsp), %rdi callq 0xc950 movb 0x6(%rsp), %al testb $0x1, %al jne 0x60def jmp 0x60ec1 leaq 0x158(%rsp), %rdi leaq 0x110(%rsp), %rsi leaq 0xd8(%rsp), %rdx callq 0x60f90 jmp 0x60e0e jmp 0x60f1f movq %rax, %rcx movl %edx, %eax movq %rcx, 0x100(%rsp) movl %eax, 0xfc(%rsp) jmp 0x60eaf movq %rax, %rcx movl %edx, %eax movq %rcx, 0x100(%rsp) movl %eax, 0xfc(%rsp) jmp 0x60ea2 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x100(%rsp) movl %eax, 0xfc(%rsp) jmp 0x60e87 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x100(%rsp) movl %eax, 0xfc(%rsp) testb $0x1, 0x85(%rsp) jne 0x60e78 jmp 0x60e85 leaq 0x88(%rsp), %rdi callq 0xcfd0 jmp 0x60e87 testb $0x1, 0x86(%rsp) jne 0x60e93 jmp 0x60ea0 leaq 0x87(%rsp), %rdi callq 0xc950 jmp 0x60ea2 leaq 0xb0(%rsp), %rdi callq 0xcfd0 leaq 0xaf(%rsp), %rdi callq 0xc950 jmp 0x60f4e leaq 0x60(%rsp), %rdi leaq 0xd8(%rsp), %rsi xorl %edx, %edx callq 0x21790 jmp 0x60ed7 leaq 0x158(%rsp), %rdi leaq 0x110(%rsp), %rsi leaq 0x60(%rsp), %rdx callq 0x60f90 jmp 0x60ef3 leaq 0x60(%rsp), %rdi callq 0xcfd0 jmp 0x60f1f movq %rax, %rcx movl %edx, %eax movq %rcx, 0x100(%rsp) movl %eax, 0xfc(%rsp) leaq 0x60(%rsp), %rdi callq 0xcfd0 jmp 0x60f4e movb $0x1, 0x167(%rsp) movl $0x1, 0xd0(%rsp) leaq 0xd8(%rsp), %rdi callq 0xcfd0 leaq 0x110(%rsp), %rdi callq 0xcfd0 jmp 0x60f72 leaq 0xd8(%rsp), %rdi callq 0xcfd0 leaq 0x110(%rsp), %rdi callq 0xcfd0 jmp 0x60f83 movb $0x0, 0x167(%rsp) movb 0x167(%rsp), %al andb $0x1, %al addq $0x168, %rsp # imm = 0x168 retq movq 0x100(%rsp), %rdi callq 0xce40
_ZN7httplib6detail12parse_headerIZNS0_20read_content_chunkedINS_7RequestEEEbRNS_6StreamERT_St8functionIFbPKcmmmEEEUlRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESK_E_EEbSA_SA_S6_: sub rsp, 168h mov [rsp+168h+var_10], rdx mov qword ptr [rsp+168h+var_18], rdi mov qword ptr [rsp+168h+var_20], rsi loc_609DF: mov rcx, qword ptr [rsp+168h+var_18] xor eax, eax cmp rcx, qword ptr [rsp+168h+var_20] mov [rsp+168h+var_109], al jnb short loc_60A0C mov rax, qword ptr [rsp+168h+var_20] movsx edi, byte ptr [rax-1]; this call _ZN7httplib6detail15is_space_or_tabEc; httplib::detail::is_space_or_tab(char) mov [rsp+168h+var_109], al loc_60A0C: mov al, [rsp+168h+var_109] test al, 1 jnz short loc_60A16 jmp short loc_60A2C loc_60A16: mov rax, qword ptr [rsp+168h+var_20] add rax, 0FFFFFFFFFFFFFFFFh mov qword ptr [rsp+168h+var_20], rax jmp short loc_609DF loc_60A2C: mov rax, qword ptr [rsp+168h+var_18] mov [rsp+168h+var_28], rax loc_60A3C: mov rcx, [rsp+168h+var_28] xor eax, eax cmp rcx, qword ptr [rsp+168h+var_20] mov [rsp+168h+var_10A], al jnb short loc_60A69 mov rax, [rsp+168h+var_28] movsx eax, byte ptr [rax] cmp eax, 3Ah ; ':' setnz al mov [rsp+168h+var_10A], al loc_60A69: mov al, [rsp+168h+var_10A] test al, 1 jnz short loc_60A73 jmp short loc_60A89 loc_60A73: mov rax, [rsp+168h+var_28] add rax, 1 mov [rsp+168h+var_28], rax jmp short loc_60A3C loc_60A89: mov rax, [rsp+168h+var_28] cmp rax, qword ptr [rsp+168h+var_20] jnz short loc_60AA8 mov [rsp+168h+var_1], 0 jmp loc_60F72 loc_60AA8: mov rax, [rsp+168h+var_28] mov qword ptr [rsp+168h+var_30], rax mov rax, [rsp+168h+var_28] mov rcx, rax add rcx, 1 mov [rsp+168h+var_28], rcx movsx eax, byte ptr [rax] cmp eax, 3Ah ; ':' jz short loc_60AE4 mov [rsp+168h+var_1], 0 jmp loc_60F72 loc_60AE4: jmp short $+2 loc_60AE6: mov rcx, [rsp+168h+var_28] xor eax, eax cmp rcx, qword ptr [rsp+168h+var_20] mov [rsp+168h+var_10B], al jnb short loc_60B12 mov rax, [rsp+168h+var_28] movsx edi, byte ptr [rax]; this call _ZN7httplib6detail15is_space_or_tabEc; httplib::detail::is_space_or_tab(char) mov [rsp+168h+var_10B], al loc_60B12: mov al, [rsp+168h+var_10B] test al, 1 jnz short loc_60B1C jmp short loc_60B32 loc_60B1C: mov rax, [rsp+168h+var_28] add rax, 1 mov [rsp+168h+var_28], rax jmp short loc_60AE6 loc_60B32: mov rax, [rsp+168h+var_28] cmp rax, qword ptr [rsp+168h+var_20] ja loc_60F6A mov rax, qword ptr [rsp+168h+var_30] mov rcx, qword ptr [rsp+168h+var_18] sub rax, rcx mov [rsp+168h+var_38], rax cmp [rsp+168h+var_38], 0 jnz short loc_60B7B mov [rsp+168h+var_1], 0 jmp loc_60F72 loc_60B7B: mov rax, qword ptr [rsp+168h+var_18] mov qword ptr [rsp+168h+var_128], rax; int mov rax, qword ptr [rsp+168h+var_30] mov qword ptr [rsp+168h+var_120], rax; int lea rdi, [rsp+168h+var_59] mov [rsp+168h+var_118], rdi; __int64 call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, qword ptr [rsp+168h+var_128] mov rdx, qword ptr [rsp+168h+var_120] mov rcx, [rsp+168h+var_118] lea rdi, [rsp+168h+var_59+1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IPKcvEET_S8_RKS3_; std::string::basic_string<char const*,void>(char const*,char const*,std::allocator<char> const&) jmp short $+2 loc_60BC5: lea rdi, [rsp+168h+var_59] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rax, [rsp+168h+var_28] mov [rsp+168h+var_140], rax; void * mov rax, qword ptr [rsp+168h+var_20] mov qword ptr [rsp+168h+var_138], rax; int lea rdi, [rsp+168h+var_91] mov qword ptr [rsp+168h+var_130], rdi; int call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, [rsp+168h+var_140] mov rdx, qword ptr [rsp+168h+var_138] mov rcx, qword ptr [rsp+168h+var_130] lea rdi, [rsp+168h+var_91+1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IPKcvEET_S8_RKS3_; std::string::basic_string<char const*,void>(char const*,char const*,std::allocator<char> const&) jmp short $+2 loc_60C1C: lea rdi, [rsp+168h+var_91] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, [rsp+168h+var_91+1] call _ZN7httplib6detail6fields14is_field_valueERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; httplib::detail::fields::is_field_value(std::string const&) mov [rsp+168h+var_141], al jmp short $+2 loc_60C3C: mov al, [rsp+168h+var_141] test al, 1 jnz short loc_60CC3 jmp short $+2 loc_60C46: mov [rsp+168h+var_1], 0 mov [rsp+168h+var_98], 1 jmp loc_60F32 mov rcx, rax mov eax, edx mov [rsp+arg_F8], rcx mov [rsp+arg_F4], eax lea rdi, [rsp+arg_107] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_60F83 mov rcx, rax mov eax, edx mov [rsp+arg_F8], rcx mov [rsp+arg_F4], eax lea rdi, [rsp+arg_CF] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_60F5B mov rcx, rax mov eax, edx mov [rsp+arg_F8], rcx mov [rsp+arg_F4], eax jmp loc_60F4E loc_60CC3: lea rdi, [rsp+168h+var_B9] mov qword ptr [rsp+168h+var_150], rdi; int call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, qword ptr [rsp+168h+var_150] mov [rsp+168h+var_E2], 0 mov [rsp+168h+var_E3], 0 lea rsi, aLocation; "Location" lea rdi, [rsp+168h+var_B9+1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_60D00: lea rdi, [rsp+168h+var_59+1] lea rsi, [rsp+168h+var_B9+1] call _ZN7httplib6detail11case_ignore5equalERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_; httplib::detail::case_ignore::equal(std::string const&,std::string const&) mov [rsp+168h+var_151], al jmp short $+2 loc_60D1B: mov cl, [rsp+168h+var_151] mov al, 1 test cl, 1 mov [rsp+168h+var_152], al jnz short loc_60D8E jmp short $+2 loc_60D2C: lea rdi, [rsp+168h+var_E1] mov [rsp+168h+var_160], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rsp+168h+var_160] mov [rsp+168h+var_E2], 1 lea rsi, aReferer; "Referer" lea rdi, [rsp+168h+var_E0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_60D61: mov [rsp+168h+var_E3], 1 lea rdi, [rsp+168h+var_59+1] lea rsi, [rsp+168h+var_E0] call _ZN7httplib6detail11case_ignore5equalERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_; httplib::detail::case_ignore::equal(std::string const&,std::string const&) mov [rsp+168h+var_161], al jmp short $+2 loc_60D84: mov al, [rsp+168h+var_161] mov [rsp+168h+var_152], al jmp short $+2 loc_60D8E: mov al, [rsp+168h+var_152] mov [rsp+168h+var_162], al test [rsp+168h+var_E3], 1 jnz short loc_60DA2 jmp short loc_60DAF loc_60DA2: lea rdi, [rsp+168h+var_E0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_60DAF: test [rsp+168h+var_E2], 1 jnz short loc_60DBB jmp short loc_60DC8 loc_60DBB: lea rdi, [rsp+168h+var_E1] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() loc_60DC8: lea rdi, [rsp+168h+var_B9+1]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+168h+var_B9] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov al, [rsp+168h+var_162] test al, 1 jnz short loc_60DEF jmp loc_60EC1 loc_60DEF: lea rdi, [rsp+168h+var_10] lea rsi, [rsp+168h+var_59+1] lea rdx, [rsp+168h+var_91+1] call _ZZN7httplib6detail20read_content_chunkedINS_7RequestEEEbRNS_6StreamERT_St8functionIFbPKcmmmEEENKUlRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESJ_E_clESJ_SJ_; httplib::detail::read_content_chunked<httplib::Request>(httplib::Stream &,httplib::Request &,std::function<bool ()(char const*,ulong,ulong,ulong)>)::{lambda(std::string const&,std::string const&)#1}::operator()(std::string const&,std::string const&) jmp short $+2 loc_60E0E: jmp loc_60F1F mov rcx, rax mov eax, edx mov [rsp+arg_F8], rcx mov [rsp+arg_F4], eax jmp loc_60EAF mov rcx, rax mov eax, edx mov [rsp+arg_F8], rcx mov [rsp+arg_F4], eax jmp short loc_60EA2 mov rcx, rax mov eax, edx mov [rsp+arg_F8], rcx mov [rsp+arg_F4], eax jmp short loc_60E87 mov rcx, rax mov eax, edx mov [rsp+arg_F8], rcx mov [rsp+arg_F4], eax test [rsp+arg_7D], 1 jnz short loc_60E78 jmp short loc_60E85 loc_60E78: lea rdi, [rsp+arg_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_60E85: jmp short $+2 loc_60E87: test [rsp+arg_7E], 1 jnz short loc_60E93 jmp short loc_60EA0 loc_60E93: lea rdi, [rsp+arg_7F] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() loc_60EA0: jmp short $+2 loc_60EA2: lea rdi, [rsp+arg_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_60EAF: lea rdi, [rsp+arg_A7] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_60F4E loc_60EC1: lea rdi, [rsp+168h+var_108]; int lea rsi, [rsp+168h+var_91+1]; int xor edx, edx; int call _ZN7httplib6detail10decode_urlERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb; httplib::detail::decode_url(std::string const&,bool) jmp short $+2 loc_60ED7: lea rdi, [rsp+168h+var_10] lea rsi, [rsp+168h+var_59+1] lea rdx, [rsp+168h+var_108] call _ZZN7httplib6detail20read_content_chunkedINS_7RequestEEEbRNS_6StreamERT_St8functionIFbPKcmmmEEENKUlRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESJ_E_clESJ_SJ_; httplib::detail::read_content_chunked<httplib::Request>(httplib::Stream &,httplib::Request &,std::function<bool ()(char const*,ulong,ulong,ulong)>)::{lambda(std::string const&,std::string const&)#1}::operator()(std::string const&,std::string const&) jmp short $+2 loc_60EF3: lea rdi, [rsp+168h+var_108]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_60F1F mov rcx, rax mov eax, edx mov [rsp+arg_F8], rcx mov [rsp+arg_F4], eax lea rdi, [rsp+arg_58]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_60F4E loc_60F1F: mov [rsp+168h+var_1], 1 mov [rsp+168h+var_98], 1 loc_60F32: lea rdi, [rsp+168h+var_91+1]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+168h+var_59+1]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_60F72 loc_60F4E: lea rdi, [rsp+arg_D0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_60F5B: lea rdi, [rsp+arg_108]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_60F83 loc_60F6A: mov [rsp+168h+var_1], 0 loc_60F72: mov al, [rsp+168h+var_1] and al, 1 add rsp, 168h retn loc_60F83: mov rdi, [rsp+arg_F8] call __Unwind_Resume
char httplib::detail::parse_header<bool httplib::detail::read_content_chunked<httplib::Request>(httplib::Stream &,httplib::Request &,std::function<bool ()(char const*,unsigned long,unsigned long,unsigned long)>)::{lambda(std::string const&,std::string const&)#1}>( long long a1, long long a2, long long a3) { _BYTE *v3; // rax char v5; // [rsp+16h] [rbp-152h] void *v6; // [rsp+28h] [rbp-140h] long long v7; // [rsp+30h] [rbp-138h] void *v8; // [rsp+40h] [rbp-128h] long long v9; // [rsp+48h] [rbp-120h] bool v10; // [rsp+5Dh] [rbp-10Bh] bool v11; // [rsp+5Eh] [rbp-10Ah] bool is_space_or_tab; // [rsp+5Fh] [rbp-109h] int v13[9]; // [rsp+60h] [rbp-108h] BYREF char v14; // [rsp+85h] [rbp-E3h] char v15; // [rsp+86h] [rbp-E2h] char v16; // [rsp+87h] [rbp-E1h] BYREF _BYTE v17[39]; // [rsp+88h] [rbp-E0h] BYREF int v18[8]; // [rsp+AFh] [rbp-B9h] BYREF int v19; // [rsp+D0h] [rbp-98h] int v20[14]; // [rsp+D7h] [rbp-91h] BYREF _BYTE v21[41]; // [rsp+10Fh] [rbp-59h] BYREF int v22[2]; // [rsp+138h] [rbp-30h] void *i; // [rsp+140h] [rbp-28h] int v24[2]; // [rsp+148h] [rbp-20h] int v25[2]; // [rsp+150h] [rbp-18h] long long v26; // [rsp+158h] [rbp-10h] BYREF char v27; // [rsp+167h] [rbp-1h] v26 = a3; *(_QWORD *)v25 = a1; for ( *(_QWORD *)v24 = a2; ; --*(_QWORD *)v24 ) { is_space_or_tab = 0; if ( *(_QWORD *)v25 < *(_QWORD *)v24 ) is_space_or_tab = httplib::detail::is_space_or_tab((httplib::detail *)(unsigned int)*(char *)(*(_QWORD *)v24 - 1LL)); if ( !is_space_or_tab ) break; } for ( i = *(void **)v25; ; i = (char *)i + 1 ) { v11 = 0; if ( (unsigned long long)i < *(_QWORD *)v24 ) v11 = *(_BYTE *)i != 58; if ( !v11 ) break; } if ( i == *(void **)v24 ) { v27 = 0; } else { *(_QWORD *)v22 = i; v3 = i; i = (char *)i + 1; if ( *v3 == 58 ) { while ( 1 ) { v10 = 0; if ( (unsigned long long)i < *(_QWORD *)v24 ) v10 = httplib::detail::is_space_or_tab((httplib::detail *)(unsigned int)*(char *)i); if ( !v10 ) break; i = (char *)i + 1; } if ( (unsigned long long)i > *(_QWORD *)v24 ) { v27 = 0; } else { *(_QWORD *)&v21[33] = *(_QWORD *)v22 - *(_QWORD *)v25; if ( *(_QWORD *)v22 == *(_QWORD *)v25 ) { v27 = 0; } else { v8 = *(void **)v25; v9 = *(_QWORD *)v22; std::allocator<char>::allocator(v21, a2); std::string::basic_string<char const*,void>((long long)&v21[1], (long long)v8, v9, (long long)v21); std::allocator<char>::~allocator(v21); v6 = i; v7 = *(_QWORD *)v24; std::allocator<char>::allocator(v20, v8); std::string::basic_string<char const*,void>((long long)v20 + 1, (long long)v6, v7, (long long)v20); std::allocator<char>::~allocator(v20); if ( (httplib::detail::fields::is_field_value((long long)v20 + 1) & 1) != 0 ) { std::allocator<char>::allocator(v18, v6); v15 = 0; v14 = 0; std::string::basic_string<std::allocator<char>>((long long)v18 + 1, (long long)"Location", (long long)v18); v5 = 1; if ( (httplib::detail::case_ignore::equal((long long)&v21[1], (long long)v18 + 1) & 1) == 0 ) { std::allocator<char>::allocator(&v16, (char *)v18 + 1); v15 = 1; std::string::basic_string<std::allocator<char>>((long long)v17, (long long)"Referer", (long long)&v16); v14 = 1; v5 = httplib::detail::case_ignore::equal((long long)&v21[1], (long long)v17); } if ( (v14 & 1) != 0 ) std::string::~string(v17); if ( (v15 & 1) != 0 ) std::allocator<char>::~allocator(&v16); std::string::~string((char *)v18 + 1); std::allocator<char>::~allocator(v18); if ( (v5 & 1) != 0 ) { httplib::detail::read_content_chunked<httplib::Request>(httplib::Stream &,httplib::Request &,std::function<bool ()(char const*,unsigned long,unsigned long,unsigned long)>)::{lambda(std::string const&,std::string const&)#1}::operator()( &v26, &v21[1], (char *)v20 + 1); } else { httplib::detail::decode_url((long long)v13, (long long)v20 + 1, 0); httplib::detail::read_content_chunked<httplib::Request>(httplib::Stream &,httplib::Request &,std::function<bool ()(char const*,unsigned long,unsigned long,unsigned long)>)::{lambda(std::string const&,std::string const&)#1}::operator()( &v26, &v21[1], v13); std::string::~string(v13); } v27 = 1; v19 = 1; } else { v27 = 0; v19 = 1; } std::string::~string((char *)v20 + 1); std::string::~string(&v21[1]); } } } else { v27 = 0; } } return v27 & 1; }
parse_header<httplib::detail::read_content_chunked<httplib::Request>(httplib::Stream&,httplib::Request&,std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>)::{lambda(std::__cxx11::string_const&,std::__cxx11::string_const&)#1}>: SUB RSP,0x168 MOV qword ptr [RSP + 0x158],RDX MOV qword ptr [RSP + 0x150],RDI MOV qword ptr [RSP + 0x148],RSI LAB_001609df: MOV RCX,qword ptr [RSP + 0x150] XOR EAX,EAX CMP RCX,qword ptr [RSP + 0x148] MOV byte ptr [RSP + 0x5f],AL JNC 0x00160a0c MOV RAX,qword ptr [RSP + 0x148] MOVSX EDI,byte ptr [RAX + -0x1] CALL 0x001215f0 MOV byte ptr [RSP + 0x5f],AL LAB_00160a0c: MOV AL,byte ptr [RSP + 0x5f] TEST AL,0x1 JNZ 0x00160a16 JMP 0x00160a2c LAB_00160a16: MOV RAX,qword ptr [RSP + 0x148] ADD RAX,-0x1 MOV qword ptr [RSP + 0x148],RAX JMP 0x001609df LAB_00160a2c: MOV RAX,qword ptr [RSP + 0x150] MOV qword ptr [RSP + 0x140],RAX LAB_00160a3c: MOV RCX,qword ptr [RSP + 0x140] XOR EAX,EAX CMP RCX,qword ptr [RSP + 0x148] MOV byte ptr [RSP + 0x5e],AL JNC 0x00160a69 MOV RAX,qword ptr [RSP + 0x140] MOVSX EAX,byte ptr [RAX] CMP EAX,0x3a SETNZ AL MOV byte ptr [RSP + 0x5e],AL LAB_00160a69: MOV AL,byte ptr [RSP + 0x5e] TEST AL,0x1 JNZ 0x00160a73 JMP 0x00160a89 LAB_00160a73: MOV RAX,qword ptr [RSP + 0x140] ADD RAX,0x1 MOV qword ptr [RSP + 0x140],RAX JMP 0x00160a3c LAB_00160a89: MOV RAX,qword ptr [RSP + 0x140] CMP RAX,qword ptr [RSP + 0x148] JNZ 0x00160aa8 MOV byte ptr [RSP + 0x167],0x0 JMP 0x00160f72 LAB_00160aa8: MOV RAX,qword ptr [RSP + 0x140] MOV qword ptr [RSP + 0x138],RAX MOV RAX,qword ptr [RSP + 0x140] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RSP + 0x140],RCX MOVSX EAX,byte ptr [RAX] CMP EAX,0x3a JZ 0x00160ae4 MOV byte ptr [RSP + 0x167],0x0 JMP 0x00160f72 LAB_00160ae4: JMP 0x00160ae6 LAB_00160ae6: MOV RCX,qword ptr [RSP + 0x140] XOR EAX,EAX CMP RCX,qword ptr [RSP + 0x148] MOV byte ptr [RSP + 0x5d],AL JNC 0x00160b12 MOV RAX,qword ptr [RSP + 0x140] MOVSX EDI,byte ptr [RAX] CALL 0x001215f0 MOV byte ptr [RSP + 0x5d],AL LAB_00160b12: MOV AL,byte ptr [RSP + 0x5d] TEST AL,0x1 JNZ 0x00160b1c JMP 0x00160b32 LAB_00160b1c: MOV RAX,qword ptr [RSP + 0x140] ADD RAX,0x1 MOV qword ptr [RSP + 0x140],RAX JMP 0x00160ae6 LAB_00160b32: MOV RAX,qword ptr [RSP + 0x140] CMP RAX,qword ptr [RSP + 0x148] JA 0x00160f6a MOV RAX,qword ptr [RSP + 0x138] MOV RCX,qword ptr [RSP + 0x150] SUB RAX,RCX MOV qword ptr [RSP + 0x130],RAX CMP qword ptr [RSP + 0x130],0x0 JNZ 0x00160b7b MOV byte ptr [RSP + 0x167],0x0 JMP 0x00160f72 LAB_00160b7b: MOV RAX,qword ptr [RSP + 0x150] MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0x138] MOV qword ptr [RSP + 0x48],RAX LEA RDI,[RSP + 0x10f] MOV qword ptr [RSP + 0x50],RDI CALL 0x0010ce50 MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x48] MOV RCX,qword ptr [RSP + 0x50] LAB_00160bb6: LEA RDI,[RSP + 0x110] CALL 0x00121620 JMP 0x00160bc5 LAB_00160bc5: LEA RDI,[RSP + 0x10f] CALL 0x0010c950 MOV RAX,qword ptr [RSP + 0x140] MOV qword ptr [RSP + 0x28],RAX MOV RAX,qword ptr [RSP + 0x148] MOV qword ptr [RSP + 0x30],RAX LEA RDI,[RSP + 0xd7] MOV qword ptr [RSP + 0x38],RDI CALL 0x0010ce50 MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RSP + 0x38] LAB_00160c0d: LEA RDI,[RSP + 0xd8] CALL 0x00121620 JMP 0x00160c1c LAB_00160c1c: LEA RDI,[RSP + 0xd7] CALL 0x0010c950 LAB_00160c29: LEA RDI,[RSP + 0xd8] CALL 0x001216a0 MOV byte ptr [RSP + 0x27],AL JMP 0x00160c3c LAB_00160c3c: MOV AL,byte ptr [RSP + 0x27] TEST AL,0x1 JNZ 0x00160cc3 JMP 0x00160c46 LAB_00160c46: MOV byte ptr [RSP + 0x167],0x0 MOV dword ptr [RSP + 0xd0],0x1 JMP 0x00160f32 LAB_00160cc3: LEA RDI,[RSP + 0xaf] MOV qword ptr [RSP + 0x18],RDI CALL 0x0010ce50 MOV RDX,qword ptr [RSP + 0x18] MOV byte ptr [RSP + 0x86],0x0 MOV byte ptr [RSP + 0x85],0x0 LAB_00160cea: LEA RSI,[0x1e3f98] LEA RDI,[RSP + 0xb0] CALL 0x00112660 JMP 0x00160d00 LAB_00160d00: LEA RDI,[RSP + 0x110] LEA RSI,[RSP + 0xb0] CALL 0x001216c0 MOV byte ptr [RSP + 0x17],AL JMP 0x00160d1b LAB_00160d1b: MOV CL,byte ptr [RSP + 0x17] MOV AL,0x1 TEST CL,0x1 MOV byte ptr [RSP + 0x16],AL JNZ 0x00160d8e JMP 0x00160d2c LAB_00160d2c: LEA RDI,[RSP + 0x87] MOV qword ptr [RSP + 0x8],RDI CALL 0x0010ce50 MOV RDX,qword ptr [RSP + 0x8] MOV byte ptr [RSP + 0x86],0x1 LAB_00160d4b: LEA RSI,[0x1e3fa1] LEA RDI,[RSP + 0x88] CALL 0x00112660 JMP 0x00160d61 LAB_00160d61: MOV byte ptr [RSP + 0x85],0x1 LAB_00160d69: LEA RDI,[RSP + 0x110] LEA RSI,[RSP + 0x88] CALL 0x001216c0 MOV byte ptr [RSP + 0x7],AL JMP 0x00160d84 LAB_00160d84: MOV AL,byte ptr [RSP + 0x7] MOV byte ptr [RSP + 0x16],AL JMP 0x00160d8e LAB_00160d8e: MOV AL,byte ptr [RSP + 0x16] MOV byte ptr [RSP + 0x6],AL TEST byte ptr [RSP + 0x85],0x1 JNZ 0x00160da2 JMP 0x00160daf LAB_00160da2: LEA RDI,[RSP + 0x88] CALL 0x0010cfd0 LAB_00160daf: TEST byte ptr [RSP + 0x86],0x1 JNZ 0x00160dbb JMP 0x00160dc8 LAB_00160dbb: LEA RDI,[RSP + 0x87] CALL 0x0010c950 LAB_00160dc8: LEA RDI,[RSP + 0xb0] CALL 0x0010cfd0 LEA RDI,[RSP + 0xaf] CALL 0x0010c950 MOV AL,byte ptr [RSP + 0x6] TEST AL,0x1 JNZ 0x00160def JMP 0x00160ec1 LAB_00160def: LEA RDI,[RSP + 0x158] LEA RSI,[RSP + 0x110] LEA RDX,[RSP + 0xd8] CALL 0x00160f90 JMP 0x00160e0e LAB_00160e0e: JMP 0x00160f1f LAB_00160ec1: LEA RDI,[RSP + 0x60] LEA RSI,[RSP + 0xd8] XOR EDX,EDX CALL 0x00121790 JMP 0x00160ed7 LAB_00160ed7: LEA RDI,[RSP + 0x158] LEA RSI,[RSP + 0x110] LEA RDX,[RSP + 0x60] CALL 0x00160f90 LAB_00160ef1: JMP 0x00160ef3 LAB_00160ef3: LEA RDI,[RSP + 0x60] CALL 0x0010cfd0 JMP 0x00160f1f LAB_00160f1f: MOV byte ptr [RSP + 0x167],0x1 MOV dword ptr [RSP + 0xd0],0x1 LAB_00160f32: LEA RDI,[RSP + 0xd8] CALL 0x0010cfd0 LEA RDI,[RSP + 0x110] CALL 0x0010cfd0 JMP 0x00160f72 LAB_00160f6a: MOV byte ptr [RSP + 0x167],0x0 LAB_00160f72: MOV AL,byte ptr [RSP + 0x167] AND AL,0x1 ADD RSP,0x168 RET
/* bool httplib::detail::parse_header<httplib::detail::read_content_chunked<httplib::Request>(httplib::Stream&, httplib::Request&, std::function<bool (char const*, unsigned long, unsigned long, unsigned long)>)::{lambda(std::__cxx11::string const&, std::__cxx11::string const&)#1}>(char const*, char const*, httplib::detail::read_content_chunked<httplib::Request>(httplib::Stream&, httplib::Request&, std::function<bool (char const*, unsigned long, unsigned long, unsigned long)>)::{lambda(std::__cxx11::string const&, std::__cxx11::string const&)#1}) */ bool httplib::detail:: parse_header<httplib::detail::read_content_chunked<httplib::Request>(httplib::Stream&,httplib::Request&,std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>)::_lambda(std::__cxx11::string_const&,std::__cxx11::string_const&)_1_> (char *param_1,char *param_2,int8 param_3) { char *pcVar1; char *pcVar2; byte bVar3; bool bVar4; byte local_152; byte local_10b; byte local_109; detail local_108 [37]; byte local_e3; byte local_e2; allocator local_e1; string local_e0 [39]; allocator local_b9; string local_b8 [32]; int4 local_98; allocator local_91; string local_90 [55]; allocator local_59; string local_58 [32]; long local_38; char *local_30; char *local_28; char *local_20; char *local_18; int8 local_10; byte local_1; local_20 = param_2; local_18 = param_1; local_10 = param_3; while( true ) { local_109 = 0; if (local_18 < local_20) { local_109 = is_space_or_tab(local_20[-1]); } if ((local_109 & 1) == 0) break; local_20 = local_20 + -1; } local_28 = local_18; while( true ) { bVar4 = false; if (local_28 < local_20) { bVar4 = *local_28 != ':'; } if (!bVar4) break; local_28 = local_28 + 1; } if (local_28 == local_20) { local_1 = 0; } else { local_30 = local_28; if (*local_28 == ':') { do { local_28 = local_28 + 1; local_10b = 0; if (local_28 < local_20) { local_10b = is_space_or_tab(*local_28); } pcVar2 = local_18; pcVar1 = local_30; } while ((local_10b & 1) != 0); if (local_20 < local_28) { local_1 = 0; } else { local_38 = (long)local_30 - (long)local_18; if (local_38 == 0) { local_1 = 0; } else { std::allocator<char>::allocator(); /* try { // try from 00160bb6 to 00160bc2 has its CatchHandler @ 00160c5e */ std::__cxx11::string::string<char_const*,void>(local_58,pcVar2,pcVar1,&local_59); std::allocator<char>::~allocator((allocator<char> *)&local_59); pcVar2 = local_20; pcVar1 = local_28; std::allocator<char>::allocator(); /* try { // try from 00160c0d to 00160c19 has its CatchHandler @ 00160c84 */ std::__cxx11::string::string<char_const*,void>(local_90,pcVar1,pcVar2,&local_91); std::allocator<char>::~allocator((allocator<char> *)&local_91); /* try { // try from 00160c29 to 00160c35 has its CatchHandler @ 00160caa */ bVar3 = fields::is_field_value(local_90); if ((bVar3 & 1) == 0) { local_1 = 0; } else { std::allocator<char>::allocator(); local_e2 = 0; local_e3 = 0; /* try { // try from 00160cea to 00160cfd has its CatchHandler @ 00160e13 */ std::__cxx11::string::string<std::allocator<char>>(local_b8,"Location",&local_b9); /* try { // try from 00160d00 to 00160d14 has its CatchHandler @ 00160e2c */ bVar3 = case_ignore::equal(local_58,local_b8); local_152 = 1; if ((bVar3 & 1) == 0) { std::allocator<char>::allocator(); local_e2 = 1; /* try { // try from 00160d4b to 00160d5e has its CatchHandler @ 00160e42 */ std::__cxx11::string::string<std::allocator<char>>(local_e0,"Referer",&local_e1); local_e3 = 1; /* try { // try from 00160d69 to 00160d7d has its CatchHandler @ 00160e58 */ local_152 = case_ignore::equal(local_58,local_e0); } if ((local_e3 & 1) != 0) { std::__cxx11::string::~string(local_e0); } if ((local_e2 & 1) != 0) { std::allocator<char>::~allocator((allocator<char> *)&local_e1); } std::__cxx11::string::~string(local_b8); std::allocator<char>::~allocator((allocator<char> *)&local_b9); if ((local_152 & 1) == 0) { decode_url(local_108,local_90,false); /* try { // try from 00160ed7 to 00160ef0 has its CatchHandler @ 00160eff */ read_content_chunked<httplib::Request>(httplib::Stream&,httplib::Request&,std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>) ::{lambda(std::__cxx11::string_const&,std::__cxx11::string_const&)#1}::operator() ((_lambda_std____cxx11__string_const__std____cxx11__string_const___1_ *) &local_10,local_58,(string *)local_108); std::__cxx11::string::~string((string *)local_108); } else { /* try { // try from 00160def to 00160ed4 has its CatchHandler @ 00160caa */ read_content_chunked<httplib::Request>(httplib::Stream&,httplib::Request&,std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>) ::{lambda(std::__cxx11::string_const&,std::__cxx11::string_const&)#1}::operator() ((_lambda_std____cxx11__string_const__std____cxx11__string_const___1_ *) &local_10,local_58,local_90); } local_1 = 1; } local_98 = 1; std::__cxx11::string::~string(local_90); std::__cxx11::string::~string(local_58); } } } else { local_1 = 0; } } return (bool)(local_1 & 1); }
25,514
bool httplib::detail::parse_header<bool httplib::detail::read_content_chunked<httplib::Request>(httplib::Stream&, httplib::Request&, std::function<bool (char const*, unsigned long, unsigned long, unsigned long)>)::'lambda'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)>(char const*, char const*, httplib::Request)
hkr04[P]cpp-mcp/common/httplib.h
inline bool parse_header(const char *beg, const char *end, T fn) { // Skip trailing spaces and tabs. while (beg < end && is_space_or_tab(end[-1])) { end--; } auto p = beg; while (p < end && *p != ':') { p++; } if (p == end) { return false; } auto key_end = p; if (*p++ != ':') { return false; } while (p < end && is_space_or_tab(*p)) { p++; } if (p <= end) { auto key_len = key_end - beg; if (!key_len) { return false; } auto key = std::string(beg, key_end); // auto val = (case_ignore::equal(key, "Location") || // case_ignore::equal(key, "Referer")) // ? std::string(p, end) // : decode_url(std::string(p, end), false); auto val = std::string(p, end); if (!detail::fields::is_field_value(val)) { return false; } if (case_ignore::equal(key, "Location") || case_ignore::equal(key, "Referer")) { fn(key, val); } else { fn(key, decode_url(val, false)); } return true; } return false; }
O2
c
bool httplib::detail::parse_header<bool httplib::detail::read_content_chunked<httplib::Request>(httplib::Stream&, httplib::Request&, std::function<bool (char const*, unsigned long, unsigned long, unsigned long)>)::'lambda'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)>(char const*, char const*, httplib::Request): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x88, %rsp movq %rdx, %rbx movq %rdi, %rax movq %rsi, %r14 cmpq %rax, %rsi jbe 0x29b70 leaq -0x1(%r14), %rsi movzbl -0x1(%r14), %ecx cmpl $0x9, %ecx je 0x29b55 cmpl $0x20, %ecx je 0x29b55 leaq 0x1(%rax), %r15 xorl %ecx, %ecx leaq (%rax,%rcx), %rdx cmpq %r14, %rdx jae 0x29b89 cmpb $0x3a, (%rdx) je 0x29b89 incq %rcx jmp 0x29b76 cmpq %rdx, %r14 je 0x29bc0 cmpb $0x3a, (%rdx) jne 0x29bc0 addq %rcx, %r15 cmpq %r14, %r15 jae 0x29bae movzbl (%r15), %esi cmpl $0x20, %esi je 0x29ba9 cmpl $0x9, %esi jne 0x29bae incq %r15 jmp 0x29b96 cmpq %r14, %r15 seta %sil testq %rcx, %rcx sete %cl orb %sil, %cl je 0x29bd2 xorl %ebp, %ebp movl %ebp, %eax addq $0x88, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x38(%rsp), %rcx movq %rcx, -0x10(%rcx) leaq 0x28(%rsp), %rdi movq %rax, %rsi callq 0xdb88 leaq 0x58(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x48(%rsp), %rdi movq %r15, %rsi movq %r14, %rdx callq 0xdb88 leaq 0x48(%rsp), %rdi callq 0x2582b movl %eax, %ebp testb %al, %al je 0x29ccc leaq 0x22914(%rip), %rsi # 0x4c530 leaq 0x8(%rsp), %rdi leaq 0x7(%rsp), %rdx callq 0xcab2 leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rsi callq 0x25e35 testb %al, %al je 0x29c4a leaq 0x8(%rsp), %rdi callq 0xac20 jmp 0x29c8b leaq 0x228e8(%rip), %rsi # 0x4c539 leaq 0x68(%rsp), %rdi leaq 0x6(%rsp), %rdx callq 0xcab2 leaq 0x28(%rsp), %rdi leaq 0x68(%rsp), %rsi callq 0x25e35 movl %eax, %r14d leaq 0x68(%rsp), %rdi callq 0xac20 leaq 0x8(%rsp), %rdi callq 0xac20 testb %r14b, %r14b je 0x29c9f leaq 0x28(%rsp), %rsi leaq 0x48(%rsp), %rdx movq %rbx, %rdi callq 0x258cc jmp 0x29ccc leaq 0x8(%rsp), %rdi leaq 0x48(%rsp), %rsi xorl %edx, %edx callq 0x29d2f leaq 0x28(%rsp), %rsi leaq 0x8(%rsp), %rdx movq %rbx, %rdi callq 0x258cc leaq 0x8(%rsp), %rdi callq 0xac20 leaq 0x48(%rsp), %rdi callq 0xac20 leaq 0x28(%rsp), %rdi callq 0xac20 jmp 0x29bc2 jmp 0x29cfa jmp 0x29d10 movq %rax, %rbx leaq 0x68(%rsp), %rdi callq 0xac20 jmp 0x29cfd jmp 0x29cfa movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0xac20 jmp 0x29d13 jmp 0x29d10 movq %rax, %rbx jmp 0x29d1d movq %rax, %rbx leaq 0x48(%rsp), %rdi callq 0xac20 leaq 0x28(%rsp), %rdi callq 0xac20 movq %rbx, %rdi callq 0xaac0
_ZN7httplib6detail12parse_headerIZNS0_12read_headersERNS_6StreamERSt18unordered_multimapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_NS0_11case_ignore4hashENSB_8equal_toESaISt4pairIKSA_SA_EEEEUlRSF_SK_E_EEbPKcSN_T_: push rbp push r15 push r14 push rbx sub rsp, 88h mov rbx, rdx mov rax, rdi loc_29B55: mov r14, rsi cmp rsi, rax jbe short loc_29B70 lea rsi, [r14-1] movzx ecx, byte ptr [r14-1] cmp ecx, 9 jz short loc_29B55 cmp ecx, 20h ; ' ' jz short loc_29B55 loc_29B70: lea r15, [rax+1] xor ecx, ecx loc_29B76: lea rdx, [rax+rcx] cmp rdx, r14 jnb short loc_29B89 cmp byte ptr [rdx], 3Ah ; ':' jz short loc_29B89 inc rcx jmp short loc_29B76 loc_29B89: cmp r14, rdx jz short loc_29BC0 cmp byte ptr [rdx], 3Ah ; ':' jnz short loc_29BC0 add r15, rcx loc_29B96: cmp r15, r14 jnb short loc_29BAE movzx esi, byte ptr [r15] cmp esi, 20h ; ' ' jz short loc_29BA9 cmp esi, 9 jnz short loc_29BAE loc_29BA9: inc r15 jmp short loc_29B96 loc_29BAE: cmp r15, r14 setnbe sil test rcx, rcx setz cl or cl, sil jz short loc_29BD2 loc_29BC0: xor ebp, ebp loc_29BC2: mov eax, ebp add rsp, 88h pop rbx pop r14 pop r15 pop rbp retn loc_29BD2: lea rcx, [rsp+0A8h+var_70] mov [rcx-10h], rcx lea rdi, [rsp+0A8h+var_80] mov rsi, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rax, [rsp+0A8h+var_50] mov [rax-10h], rax lea rdi, [rsp+0A8h+var_60] mov rsi, r15 mov rdx, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+0A8h+var_60] call _ZN7httplib6detail6fields16is_field_contentERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; httplib::detail::fields::is_field_content(std::string const&) mov ebp, eax test al, al jz loc_29CCC lea rsi, aLocation; "Location" lea rdi, [rsp+0A8h+var_A0] lea rdx, [rsp+0A8h+var_A1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+0A8h+var_80] lea rsi, [rsp+0A8h+var_A0] call _ZN7httplib6detail11case_ignore5equalERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_; httplib::detail::case_ignore::equal(std::string const&,std::string const&) test al, al jz short loc_29C4A lea rdi, [rsp+0A8h+var_A0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_29C8B loc_29C4A: lea rsi, aReferer; "Referer" lea rdi, [rsp+0A8h+var_40] lea rdx, [rsp+0A8h+var_A2] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+0A8h+var_80] lea rsi, [rsp+0A8h+var_40] call _ZN7httplib6detail11case_ignore5equalERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_; httplib::detail::case_ignore::equal(std::string const&,std::string const&) mov r14d, eax lea rdi, [rsp+0A8h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0A8h+var_A0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test r14b, r14b jz short loc_29C9F loc_29C8B: lea rsi, [rsp+0A8h+var_80] lea rdx, [rsp+0A8h+var_60] mov rdi, rbx call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESaIS8_ENSt8__detail10_Select1stEN7httplib6detail11case_ignore8equal_toENSE_4hashENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb0EEEE10_M_emplaceIJRS7_SO_EEENSA_14_Node_iteratorIS8_Lb0ELb1EEESt17integral_constantIbLb0EEDpOT_; std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>::_M_emplace<std::string const&,std::string const&>(std::integral_constant<bool,false>,std::string const&,std::string const&) jmp short loc_29CCC loc_29C9F: lea rdi, [rsp+0A8h+var_A0] lea rsi, [rsp+0A8h+var_60] xor edx, edx call _ZN7httplib6detail10decode_urlERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb; httplib::detail::decode_url(std::string const&,bool) lea rsi, [rsp+0A8h+var_80] lea rdx, [rsp+0A8h+var_A0] mov rdi, rbx call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESaIS8_ENSt8__detail10_Select1stEN7httplib6detail11case_ignore8equal_toENSE_4hashENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb0EEEE10_M_emplaceIJRS7_SO_EEENSA_14_Node_iteratorIS8_Lb0ELb1EEESt17integral_constantIbLb0EEDpOT_; std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>::_M_emplace<std::string const&,std::string const&>(std::integral_constant<bool,false>,std::string const&,std::string const&) lea rdi, [rsp+0A8h+var_A0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_29CCC: lea rdi, [rsp+0A8h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0A8h+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp loc_29BC2 jmp short loc_29CFA jmp short loc_29D10 mov rbx, rax lea rdi, [rsp+arg_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_29CFD jmp short $+2 loc_29CFA: mov rbx, rax loc_29CFD: lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_29D13 jmp short loc_29D10 mov rbx, rax jmp short loc_29D1D loc_29D10: mov rbx, rax loc_29D13: lea rdi, [rsp+arg_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_29D1D: lea rdi, [rsp+arg_20]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
long long httplib::detail::parse_header<httplib::detail::read_headers(httplib::Stream &,std::unordered_multimap<std::string,std::string,httplib::detail::case_ignore::hash,httplib::detail::case_ignore::equal_to,std::allocator<std::pair<std::string const,std::string>>> &)::{lambda(std::string const&,std::string const&)#1}>( _BYTE *a1, unsigned long long a2, long long a3) { unsigned long long v4; // r14 int v5; // ecx long long i; // rcx _BYTE *v7; // rdx _BYTE *j; // r15 int v9; // esi unsigned int v10; // ebp unsigned int v12; // eax char v13; // r14 _QWORD v14[4]; // [rsp+8h] [rbp-A0h] BYREF _QWORD v15[2]; // [rsp+28h] [rbp-80h] BYREF char v16; // [rsp+38h] [rbp-70h] BYREF char *v17[2]; // [rsp+48h] [rbp-60h] BYREF char v18; // [rsp+58h] [rbp-50h] BYREF _QWORD v19[8]; // [rsp+68h] [rbp-40h] BYREF do { v4 = a2; if ( a2 <= (unsigned long long)a1 ) break; --a2; v5 = *(unsigned __int8 *)(v4 - 1); } while ( v5 == 9 || v5 == 32 ); for ( i = 0LL; ; ++i ) { v7 = &a1[i]; if ( (unsigned long long)&a1[i] >= v4 || *v7 == 58 ) break; } if ( (_BYTE *)v4 != v7 && *v7 == 58 ) { for ( j = &a1[i + 1]; (unsigned long long)j < v4; ++j ) { v9 = (unsigned __int8)*j; if ( v9 != 32 && v9 != 9 ) break; } if ( (unsigned long long)j <= v4 && i != 0 ) { v15[0] = &v16; std::string::_M_construct<char const*>((long long)v15, a1, (long long)v7); v17[0] = &v18; std::string::_M_construct<char const*>((long long)v17, j, v4); LOBYTE(v12) = httplib::detail::fields::is_field_content(v17); v10 = v12; if ( (_BYTE)v12 ) { std::string::basic_string<std::allocator<char>>(v14, (long long)"Location"); if ( (unsigned __int8)httplib::detail::case_ignore::equal(v15, v14) ) { std::string::~string(v14); } else { std::string::basic_string<std::allocator<char>>(v19, (long long)"Referer"); v13 = httplib::detail::case_ignore::equal(v15, v19); std::string::~string(v19); std::string::~string(v14); if ( !v13 ) { httplib::detail::decode_url(v14, v17, 0LL); std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>::_M_emplace<std::string const&,std::string const&>( a3, (long long)v15, (long long)v14); std::string::~string(v14); goto LABEL_24; } } std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>::_M_emplace<std::string const&,std::string const&>( a3, (long long)v15, (long long)v17); } LABEL_24: std::string::~string(v17); std::string::~string(v15); return v10; } } return 0; }
parse_header<httplib::detail::read_headers(httplib::Stream&,std::unordered_multimap<std::__cxx11::string,std::__cxx11::string,httplib::detail::case_ignore::hash,httplib::detail::case_ignore::equal_to,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>&)::{lambda(std::__cxx11::string_const&,std::__cxx11::string_const&)#1}>: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x88 MOV RBX,RDX MOV RAX,RDI LAB_00129b55: MOV R14,RSI CMP RSI,RAX JBE 0x00129b70 LEA RSI,[R14 + -0x1] MOVZX ECX,byte ptr [R14 + -0x1] CMP ECX,0x9 JZ 0x00129b55 CMP ECX,0x20 JZ 0x00129b55 LAB_00129b70: LEA R15,[RAX + 0x1] XOR ECX,ECX LAB_00129b76: LEA RDX,[RAX + RCX*0x1] CMP RDX,R14 JNC 0x00129b89 CMP byte ptr [RDX],0x3a JZ 0x00129b89 INC RCX JMP 0x00129b76 LAB_00129b89: CMP R14,RDX JZ 0x00129bc0 CMP byte ptr [RDX],0x3a JNZ 0x00129bc0 ADD R15,RCX LAB_00129b96: CMP R15,R14 JNC 0x00129bae MOVZX ESI,byte ptr [R15] CMP ESI,0x20 JZ 0x00129ba9 CMP ESI,0x9 JNZ 0x00129bae LAB_00129ba9: INC R15 JMP 0x00129b96 LAB_00129bae: CMP R15,R14 SETA SIL TEST RCX,RCX SETZ CL OR CL,SIL JZ 0x00129bd2 LAB_00129bc0: XOR EBP,EBP LAB_00129bc2: MOV EAX,EBP ADD RSP,0x88 POP RBX POP R14 POP R15 POP RBP RET LAB_00129bd2: LEA RCX,[RSP + 0x38] MOV qword ptr [RCX + -0x10],RCX LEA RDI,[RSP + 0x28] MOV RSI,RAX CALL 0x0010db88 LEA RAX,[RSP + 0x58] MOV qword ptr [RAX + -0x10],RAX LAB_00129bf1: LEA RDI,[RSP + 0x48] MOV RSI,R15 MOV RDX,R14 CALL 0x0010db88 LAB_00129c01: LEA RDI,[RSP + 0x48] CALL 0x0012582b MOV EBP,EAX TEST AL,AL JZ 0x00129ccc LAB_00129c15: LEA RSI,[0x14c530] LEA RDI,[RSP + 0x8] LEA RDX,[RSP + 0x7] CALL 0x0010cab2 LAB_00129c2b: LEA RDI,[RSP + 0x28] LEA RSI,[RSP + 0x8] CALL 0x00125e35 TEST AL,AL JZ 0x00129c4a LEA RDI,[RSP + 0x8] CALL 0x0010ac20 JMP 0x00129c8b LAB_00129c4a: LEA RSI,[0x14c539] LEA RDI,[RSP + 0x68] LEA RDX,[RSP + 0x6] CALL 0x0010cab2 LAB_00129c60: LEA RDI,[RSP + 0x28] LEA RSI,[RSP + 0x68] CALL 0x00125e35 MOV R14D,EAX LEA RDI,[RSP + 0x68] CALL 0x0010ac20 LEA RDI,[RSP + 0x8] CALL 0x0010ac20 TEST R14B,R14B JZ 0x00129c9f LAB_00129c8b: LEA RSI,[RSP + 0x28] LEA RDX,[RSP + 0x48] MOV RDI,RBX CALL 0x001258cc JMP 0x00129ccc LAB_00129c9f: LEA RDI,[RSP + 0x8] LEA RSI,[RSP + 0x48] XOR EDX,EDX CALL 0x00129d2f LAB_00129cb0: LEA RSI,[RSP + 0x28] LEA RDX,[RSP + 0x8] MOV RDI,RBX CALL 0x001258cc LAB_00129cc2: LEA RDI,[RSP + 0x8] CALL 0x0010ac20 LAB_00129ccc: LEA RDI,[RSP + 0x48] CALL 0x0010ac20 LEA RDI,[RSP + 0x28] CALL 0x0010ac20 JMP 0x00129bc2
/* bool httplib::detail::parse_header<httplib::detail::read_headers(httplib::Stream&, std::unordered_multimap<std::__cxx11::string, std::__cxx11::string, httplib::detail::case_ignore::hash, httplib::detail::case_ignore::equal_to, std::allocator<std::pair<std::__cxx11::string const, std::__cxx11::string > > >&)::{lambda(std::__cxx11::string const&, std::__cxx11::string const&)#1}>(char const*, char const*, httplib::detail::read_headers(httplib::Stream&, std::unordered_multimap<std::__cxx11::string, std::__cxx11::string, httplib::detail::case_ignore::hash, httplib::detail::case_ignore::equal_to, std::allocator<std::pair<std::__cxx11::string const, std::__cxx11::string > > >&)::{lambda(std::__cxx11::string const&, std::__cxx11::string const&)#1}) */ bool httplib::detail:: parse_header<httplib::detail::read_headers(httplib::Stream&,std::unordered_multimap<std::__cxx11::string,std::__cxx11::string,httplib::detail::case_ignore::hash,httplib::detail::case_ignore::equal_to,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>&)::_lambda(std::__cxx11::string_const&,std::__cxx11::string_const&)_1_> (char *param_1,char *param_2,int8 param_3) { char cVar1; char cVar2; long lVar3; char *pcVar4; char *pcVar5; allocator local_a2; allocator local_a1; string local_a0 [32]; int1 *local_80 [2]; int1 local_70 [16]; int1 *local_60 [2]; int1 local_50 [16]; string local_40 [32]; do { pcVar4 = param_2; if (pcVar4 <= param_1) break; param_2 = pcVar4 + -1; } while ((pcVar4[-1] == '\t') || (pcVar4[-1] == ' ')); for (lVar3 = 0; (pcVar5 = param_1 + lVar3, pcVar5 < pcVar4 && (*pcVar5 != ':')); lVar3 = lVar3 + 1 ) { } if ((pcVar4 != pcVar5) && (*pcVar5 == ':')) { for (pcVar5 = param_1 + lVar3 + 1; (pcVar5 < pcVar4 && ((*pcVar5 == ' ' || (*pcVar5 == '\t')))); pcVar5 = pcVar5 + 1) { } if (lVar3 != 0 && pcVar5 <= pcVar4) { local_80[0] = local_70; std::__cxx11::string::_M_construct<char_const*>(local_80,param_1); local_60[0] = local_50; /* try { // try from 00129bf1 to 00129c00 has its CatchHandler @ 00129d0b */ std::__cxx11::string::_M_construct<char_const*>(local_60,pcVar5,pcVar4); /* try { // try from 00129c01 to 00129c0a has its CatchHandler @ 00129d10 */ cVar1 = fields::is_field_content((string *)local_60); if (cVar1 != '\0') { /* try { // try from 00129c15 to 00129c2a has its CatchHandler @ 00129d09 */ std::__cxx11::string::string<std::allocator<char>>(local_a0,"Location",&local_a1); /* try { // try from 00129c2b to 00129c39 has its CatchHandler @ 00129cfa */ cVar2 = case_ignore::equal((string *)local_80,local_a0); if (cVar2 == '\0') { /* try { // try from 00129c4a to 00129c5f has its CatchHandler @ 00129cf8 */ std::__cxx11::string::string<std::allocator<char>>(local_40,"Referer",&local_a2); /* try { // try from 00129c60 to 00129c6e has its CatchHandler @ 00129ce9 */ cVar2 = case_ignore::equal((string *)local_80,local_40); std::__cxx11::string::~string(local_40); std::__cxx11::string::~string(local_a0); if (cVar2 == '\0') { /* try { // try from 00129c9f to 00129caf has its CatchHandler @ 00129ce7 */ decode_url(local_a0,SUB81(local_60,0)); /* try { // try from 00129cb0 to 00129cc1 has its CatchHandler @ 00129ce5 */ std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>> ::_M_emplace<std::__cxx11::string_const&,std::__cxx11::string_const&> (param_3,local_80,local_a0); std::__cxx11::string::~string(local_a0); goto LAB_00129ccc; } } else { std::__cxx11::string::~string(local_a0); } /* try { // try from 00129c8b to 00129c9c has its CatchHandler @ 00129d10 */ std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>> ::_M_emplace<std::__cxx11::string_const&,std::__cxx11::string_const&> (param_3,local_80,local_60); } LAB_00129ccc: std::__cxx11::string::~string((string *)local_60); std::__cxx11::string::~string((string *)local_80); return (bool)cVar1; } } return false; }
25,515
ma_dynstr_append_quoted
eloqsql/libmariadb/libmariadb/ma_string.c
my_bool ma_dynstr_append_quoted(DYNAMIC_STRING *str, const char *append, size_t len, char quote) { size_t additional= str->alloc_increment; size_t lim= additional; uint i; if (ma_dynstr_realloc(str, len + additional + 2)) return TRUE; str->str[str->length++]= quote; for (i= 0; i < len; i++) { register char c= append[i]; if (c == quote || c == '\\') { if (!lim) { if (ma_dynstr_realloc(str, additional)) return TRUE; lim= additional; } lim--; str->str[str->length++]= '\\'; } str->str[str->length++]= c; } str->str[str->length++]= quote; return FALSE; }
O0
c
ma_dynstr_append_quoted: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movb %cl, %al movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movb %al, -0x21(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi addq -0x30(%rbp), %rsi addq $0x2, %rsi callq 0x37600 cmpb $0x0, %al je 0x3780f movb $0x1, -0x1(%rbp) jmp 0x3790a movb -0x21(%rbp), %dl movq -0x10(%rbp), %rax movq (%rax), %rax movq -0x10(%rbp), %rsi movq 0x8(%rsi), %rcx movq %rcx, %rdi addq $0x1, %rdi movq %rdi, 0x8(%rsi) movb %dl, (%rax,%rcx) movl $0x0, -0x3c(%rbp) movl -0x3c(%rbp), %eax cmpq -0x20(%rbp), %rax jae 0x378e6 movq -0x18(%rbp), %rax movl -0x3c(%rbp), %ecx movb (%rax,%rcx), %al movb %al, -0x3d(%rbp) movsbl -0x3d(%rbp), %eax movsbl -0x21(%rbp), %ecx cmpl %ecx, %eax je 0x37865 movsbl -0x3d(%rbp), %eax cmpl $0x5c, %eax jne 0x378b8 cmpq $0x0, -0x38(%rbp) jne 0x3788e movq -0x10(%rbp), %rdi movq -0x30(%rbp), %rsi callq 0x37600 cmpb $0x0, %al je 0x37886 movb $0x1, -0x1(%rbp) jmp 0x3790a movq -0x30(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax addq $-0x1, %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq -0x10(%rbp), %rdx movq 0x8(%rdx), %rcx movq %rcx, %rsi addq $0x1, %rsi movq %rsi, 0x8(%rdx) movb $0x5c, (%rax,%rcx) movb -0x3d(%rbp), %dl movq -0x10(%rbp), %rax movq (%rax), %rax movq -0x10(%rbp), %rsi movq 0x8(%rsi), %rcx movq %rcx, %rdi addq $0x1, %rdi movq %rdi, 0x8(%rsi) movb %dl, (%rax,%rcx) movl -0x3c(%rbp), %eax addl $0x1, %eax movl %eax, -0x3c(%rbp) jmp 0x37836 movb -0x21(%rbp), %dl movq -0x10(%rbp), %rax movq (%rax), %rax movq -0x10(%rbp), %rsi movq 0x8(%rsi), %rcx movq %rcx, %rdi addq $0x1, %rdi movq %rdi, 0x8(%rsi) movb %dl, (%rax,%rcx) movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ma_dynstr_append_quoted: push rbp mov rbp, rsp sub rsp, 40h mov al, cl mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_21], al mov rax, [rbp+var_10] mov rax, [rax+18h] mov [rbp+var_30], rax mov rax, [rbp+var_30] mov [rbp+var_38], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] add rsi, [rbp+var_30] add rsi, 2 call ma_dynstr_realloc cmp al, 0 jz short loc_3780F mov [rbp+var_1], 1 jmp loc_3790A loc_3780F: mov dl, [rbp+var_21] mov rax, [rbp+var_10] mov rax, [rax] mov rsi, [rbp+var_10] mov rcx, [rsi+8] mov rdi, rcx add rdi, 1 mov [rsi+8], rdi mov [rax+rcx], dl mov [rbp+var_3C], 0 loc_37836: mov eax, [rbp+var_3C] cmp rax, [rbp+var_20] jnb loc_378E6 mov rax, [rbp+var_18] mov ecx, [rbp+var_3C] mov al, [rax+rcx] mov [rbp+var_3D], al movsx eax, [rbp+var_3D] movsx ecx, [rbp+var_21] cmp eax, ecx jz short loc_37865 movsx eax, [rbp+var_3D] cmp eax, 5Ch ; '\' jnz short loc_378B8 loc_37865: cmp [rbp+var_38], 0 jnz short loc_3788E mov rdi, [rbp+var_10] mov rsi, [rbp+var_30] call ma_dynstr_realloc cmp al, 0 jz short loc_37886 mov [rbp+var_1], 1 jmp loc_3790A loc_37886: mov rax, [rbp+var_30] mov [rbp+var_38], rax loc_3788E: mov rax, [rbp+var_38] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_38], rax mov rax, [rbp+var_10] mov rax, [rax] mov rdx, [rbp+var_10] mov rcx, [rdx+8] mov rsi, rcx add rsi, 1 mov [rdx+8], rsi mov byte ptr [rax+rcx], 5Ch ; '\' loc_378B8: mov dl, [rbp+var_3D] mov rax, [rbp+var_10] mov rax, [rax] mov rsi, [rbp+var_10] mov rcx, [rsi+8] mov rdi, rcx add rdi, 1 mov [rsi+8], rdi mov [rax+rcx], dl mov eax, [rbp+var_3C] add eax, 1 mov [rbp+var_3C], eax jmp loc_37836 loc_378E6: mov dl, [rbp+var_21] mov rax, [rbp+var_10] mov rax, [rax] mov rsi, [rbp+var_10] mov rcx, [rsi+8] mov rdi, rcx add rdi, 1 mov [rsi+8], rdi mov [rax+rcx], dl mov [rbp+var_1], 0 loc_3790A: mov al, [rbp+var_1] add rsp, 40h pop rbp retn
char ma_dynstr_append_quoted(long long *a1, long long a2, unsigned long long a3, char a4) { long long v4; // rax long long v5; // rcx long long v6; // rax long long v7; // rcx long long v8; // rax long long v9; // rcx long long v10; // rax long long v11; // rcx char v13; // [rsp+3h] [rbp-3Dh] unsigned int i; // [rsp+4h] [rbp-3Ch] long long v15; // [rsp+8h] [rbp-38h] long long v16; // [rsp+10h] [rbp-30h] v16 = a1[3]; v15 = v16; if ( ma_dynstr_realloc(a1, v16 + a3 + 2) ) return 1; v4 = *a1; v5 = a1[1]; a1[1] = v5 + 1; *(_BYTE *)(v4 + v5) = a4; for ( i = 0; i < a3; ++i ) { v13 = *(_BYTE *)(a2 + i); if ( v13 == a4 || v13 == 92 ) { if ( !v15 ) { if ( ma_dynstr_realloc(a1, v16) ) return 1; v15 = v16; } --v15; v6 = *a1; v7 = a1[1]; a1[1] = v7 + 1; *(_BYTE *)(v6 + v7) = 92; } v8 = *a1; v9 = a1[1]; a1[1] = v9 + 1; *(_BYTE *)(v8 + v9) = v13; } v10 = *a1; v11 = a1[1]; a1[1] = v11 + 1; *(_BYTE *)(v10 + v11) = a4; return 0; }
ma_dynstr_append_quoted: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV AL,CL MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RBP + -0x21],AL MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] ADD RSI,qword ptr [RBP + -0x30] ADD RSI,0x2 CALL 0x00137600 CMP AL,0x0 JZ 0x0013780f MOV byte ptr [RBP + -0x1],0x1 JMP 0x0013790a LAB_0013780f: MOV DL,byte ptr [RBP + -0x21] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RSI + 0x8] MOV RDI,RCX ADD RDI,0x1 MOV qword ptr [RSI + 0x8],RDI MOV byte ptr [RAX + RCX*0x1],DL MOV dword ptr [RBP + -0x3c],0x0 LAB_00137836: MOV EAX,dword ptr [RBP + -0x3c] CMP RAX,qword ptr [RBP + -0x20] JNC 0x001378e6 MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x3c] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x3d],AL MOVSX EAX,byte ptr [RBP + -0x3d] MOVSX ECX,byte ptr [RBP + -0x21] CMP EAX,ECX JZ 0x00137865 MOVSX EAX,byte ptr [RBP + -0x3d] CMP EAX,0x5c JNZ 0x001378b8 LAB_00137865: CMP qword ptr [RBP + -0x38],0x0 JNZ 0x0013788e MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x30] CALL 0x00137600 CMP AL,0x0 JZ 0x00137886 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0013790a LAB_00137886: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x38],RAX LAB_0013788e: MOV RAX,qword ptr [RBP + -0x38] ADD RAX,-0x1 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RDX + 0x8] MOV RSI,RCX ADD RSI,0x1 MOV qword ptr [RDX + 0x8],RSI MOV byte ptr [RAX + RCX*0x1],0x5c LAB_001378b8: MOV DL,byte ptr [RBP + -0x3d] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RSI + 0x8] MOV RDI,RCX ADD RDI,0x1 MOV qword ptr [RSI + 0x8],RDI MOV byte ptr [RAX + RCX*0x1],DL MOV EAX,dword ptr [RBP + -0x3c] ADD EAX,0x1 MOV dword ptr [RBP + -0x3c],EAX JMP 0x00137836 LAB_001378e6: MOV DL,byte ptr [RBP + -0x21] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RSI + 0x8] MOV RDI,RCX ADD RDI,0x1 MOV qword ptr [RSI + 0x8],RDI MOV byte ptr [RAX + RCX*0x1],DL MOV byte ptr [RBP + -0x1],0x0 LAB_0013790a: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x40 POP RBP RET
int1 ma_dynstr_append_quoted(long *param_1,long param_2,ulong param_3,char param_4) { long lVar1; long lVar2; char cVar3; char cVar4; uint local_44; long local_40; int1 local_9; lVar1 = param_1[3]; cVar3 = ma_dynstr_realloc(param_1,param_3 + lVar1 + 2); if (cVar3 == '\0') { lVar2 = param_1[1]; param_1[1] = lVar2 + 1; *(char *)(*param_1 + lVar2) = param_4; local_40 = lVar1; for (local_44 = 0; local_44 < param_3; local_44 = local_44 + 1) { cVar3 = *(char *)(param_2 + (ulong)local_44); if ((cVar3 == param_4) || (cVar3 == '\\')) { if ((local_40 == 0) && (cVar4 = ma_dynstr_realloc(param_1,lVar1), local_40 = lVar1, cVar4 != '\0')) { return 1; } local_40 = local_40 + -1; lVar2 = param_1[1]; param_1[1] = lVar2 + 1; *(int1 *)(*param_1 + lVar2) = 0x5c; } lVar2 = param_1[1]; param_1[1] = lVar2 + 1; *(char *)(*param_1 + lVar2) = cVar3; } lVar1 = param_1[1]; param_1[1] = lVar1 + 1; *(char *)(*param_1 + lVar1) = param_4; local_9 = 0; } else { local_9 = 1; } return local_9; }
25,516
my_ll10tostr_mb2_or_mb4
eloqsql/strings/ctype-ucs2.c
static size_t my_ll10tostr_mb2_or_mb4(CHARSET_INFO *cs, char *dst, size_t len, int radix, longlong val) { char buffer[65]; register char *p, *db, *de; long long_val; int sl= 0; ulonglong uval= (ulonglong) val; if (radix < 0) { if (val < 0) { sl= 1; /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */ uval = (ulonglong)0 - uval; } } p= &buffer[sizeof(buffer)-1]; *p='\0'; if (uval == 0) { *--p= '0'; goto cnv; } while (uval > (ulonglong) LONG_MAX) { ulonglong quo= uval/(uint) 10; uint rem= (uint) (uval- quo* (uint) 10); *--p= '0' + rem; uval= quo; } long_val= (long) uval; while (long_val != 0) { long quo= long_val/10; *--p= (char) ('0' + (long_val - quo*10)); long_val= quo; } cnv: if (sl) { *--p= '-'; } for ( db= dst, de= dst + len ; (dst < de) && *p ; p++) { int cnvres= my_ci_wc_mb(cs, (my_wc_t) p[0], (uchar*) dst, (uchar*) de); if (cnvres > 0) dst+= cnvres; else break; } return (int) (dst -db); }
O0
c
my_ll10tostr_mb2_or_mb4: pushq %rbp movq %rsp, %rbp subq $0xd0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x58(%rbp) movq %rsi, -0x60(%rbp) movq %rdx, -0x68(%rbp) movl %ecx, -0x6c(%rbp) movq %r8, -0x78(%rbp) movl $0x0, -0x9c(%rbp) movq -0x78(%rbp), %rax movq %rax, -0xa8(%rbp) cmpl $0x0, -0x6c(%rbp) jge 0x590c9 cmpq $0x0, -0x78(%rbp) jge 0x590c7 movl $0x1, -0x9c(%rbp) xorl %eax, %eax subq -0xa8(%rbp), %rax movq %rax, -0xa8(%rbp) jmp 0x590c9 leaq -0x50(%rbp), %rax addq $0x40, %rax movq %rax, -0x80(%rbp) movq -0x80(%rbp), %rax movb $0x0, (%rax) cmpq $0x0, -0xa8(%rbp) jne 0x590fe movq -0x80(%rbp), %rax movq %rax, %rcx addq $-0x1, %rcx movq %rcx, -0x80(%rbp) movb $0x30, -0x1(%rax) jmp 0x591dc jmp 0x59100 movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF cmpq %rax, -0xa8(%rbp) jbe 0x59170 movq -0xa8(%rbp), %rax movl $0xa, %ecx xorl %edx, %edx divq %rcx movq %rax, -0xb0(%rbp) movq -0xa8(%rbp), %rax imulq $0xa, -0xb0(%rbp), %rcx subq %rcx, %rax movl %eax, -0xb4(%rbp) movl -0xb4(%rbp), %eax addl $0x30, %eax movb %al, %cl movq -0x80(%rbp), %rax movq %rax, %rdx addq $-0x1, %rdx movq %rdx, -0x80(%rbp) movb %cl, -0x1(%rax) movq -0xb0(%rbp), %rax movq %rax, -0xa8(%rbp) jmp 0x59100 movq -0xa8(%rbp), %rax movq %rax, -0x98(%rbp) cmpq $0x0, -0x98(%rbp) je 0x591da movq -0x98(%rbp), %rax movl $0xa, %ecx cqto idivq %rcx movq %rax, -0xc0(%rbp) movq -0x98(%rbp), %rax imulq $0xa, -0xc0(%rbp), %rcx subq %rcx, %rax addq $0x30, %rax movb %al, %cl movq -0x80(%rbp), %rax movq %rax, %rdx addq $-0x1, %rdx movq %rdx, -0x80(%rbp) movb %cl, -0x1(%rax) movq -0xc0(%rbp), %rax movq %rax, -0x98(%rbp) jmp 0x5917e jmp 0x591dc cmpl $0x0, -0x9c(%rbp) je 0x591f8 movq -0x80(%rbp), %rax movq %rax, %rcx addq $-0x1, %rcx movq %rcx, -0x80(%rbp) movb $0x2d, -0x1(%rax) movq -0x60(%rbp), %rax movq %rax, -0x88(%rbp) movq -0x60(%rbp), %rax addq -0x68(%rbp), %rax movq %rax, -0x90(%rbp) movq -0x60(%rbp), %rcx xorl %eax, %eax cmpq -0x90(%rbp), %rcx movb %al, -0xc5(%rbp) jae 0x5923a movq -0x80(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax setne %al movb %al, -0xc5(%rbp) movb -0xc5(%rbp), %al testb $0x1, %al jne 0x59246 jmp 0x592a8 movq -0x58(%rbp), %rax movq 0xb8(%rax), %rax movq 0x30(%rax), %rax movq -0x58(%rbp), %rdi movq -0x80(%rbp), %rcx movsbq (%rcx), %rsi movq -0x60(%rbp), %rdx movq -0x90(%rbp), %rcx callq *%rax movl %eax, -0xc4(%rbp) cmpl $0x0, -0xc4(%rbp) jle 0x59293 movl -0xc4(%rbp), %ecx movq -0x60(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x60(%rbp) jmp 0x59295 jmp 0x592a8 jmp 0x59297 movq -0x80(%rbp), %rax addq $0x1, %rax movq %rax, -0x80(%rbp) jmp 0x59212 movl -0x60(%rbp), %eax movl -0x88(%rbp), %ecx subl %ecx, %eax cltq movq %rax, -0xd0(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x592de movq -0xd0(%rbp), %rax addq $0xd0, %rsp popq %rbp retq callq 0x242e0 nopw %cs:(%rax,%rax)
my_ll10tostr_mb2_or_mb4: push rbp mov rbp, rsp sub rsp, 0D0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_58], rdi mov [rbp+var_60], rsi mov [rbp+var_68], rdx mov [rbp+var_6C], ecx mov [rbp+var_78], r8 mov [rbp+var_9C], 0 mov rax, [rbp+var_78] mov [rbp+var_A8], rax cmp [rbp+var_6C], 0 jge short loc_590C9 cmp [rbp+var_78], 0 jge short loc_590C7 mov [rbp+var_9C], 1 xor eax, eax sub rax, [rbp+var_A8] mov [rbp+var_A8], rax loc_590C7: jmp short $+2 loc_590C9: lea rax, [rbp+var_50] add rax, 40h ; '@' mov [rbp+var_80], rax mov rax, [rbp+var_80] mov byte ptr [rax], 0 cmp [rbp+var_A8], 0 jnz short loc_590FE mov rax, [rbp+var_80] mov rcx, rax add rcx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_80], rcx mov byte ptr [rax-1], 30h ; '0' jmp loc_591DC loc_590FE: jmp short $+2 loc_59100: mov rax, 7FFFFFFFFFFFFFFFh cmp [rbp+var_A8], rax jbe short loc_59170 mov rax, [rbp+var_A8] mov ecx, 0Ah xor edx, edx div rcx mov [rbp+var_B0], rax mov rax, [rbp+var_A8] imul rcx, [rbp+var_B0], 0Ah sub rax, rcx mov [rbp+var_B4], eax mov eax, [rbp+var_B4] add eax, 30h ; '0' mov cl, al mov rax, [rbp+var_80] mov rdx, rax add rdx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_80], rdx mov [rax-1], cl mov rax, [rbp+var_B0] mov [rbp+var_A8], rax jmp short loc_59100 loc_59170: mov rax, [rbp+var_A8] mov [rbp+var_98], rax loc_5917E: cmp [rbp+var_98], 0 jz short loc_591DA mov rax, [rbp+var_98] mov ecx, 0Ah cqo idiv rcx mov [rbp+var_C0], rax mov rax, [rbp+var_98] imul rcx, [rbp+var_C0], 0Ah sub rax, rcx add rax, 30h ; '0' mov cl, al mov rax, [rbp+var_80] mov rdx, rax add rdx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_80], rdx mov [rax-1], cl mov rax, [rbp+var_C0] mov [rbp+var_98], rax jmp short loc_5917E loc_591DA: jmp short $+2 loc_591DC: cmp [rbp+var_9C], 0 jz short loc_591F8 mov rax, [rbp+var_80] mov rcx, rax add rcx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_80], rcx mov byte ptr [rax-1], 2Dh ; '-' loc_591F8: mov rax, [rbp+var_60] mov [rbp+var_88], rax mov rax, [rbp+var_60] add rax, [rbp+var_68] mov [rbp+var_90], rax loc_59212: mov rcx, [rbp+var_60] xor eax, eax cmp rcx, [rbp+var_90] mov [rbp+var_C5], al jnb short loc_5923A mov rax, [rbp+var_80] movsx eax, byte ptr [rax] cmp eax, 0 setnz al mov [rbp+var_C5], al loc_5923A: mov al, [rbp+var_C5] test al, 1 jnz short loc_59246 jmp short loc_592A8 loc_59246: mov rax, [rbp+var_58] mov rax, [rax+0B8h] mov rax, [rax+30h] mov rdi, [rbp+var_58] mov rcx, [rbp+var_80] movsx rsi, byte ptr [rcx] mov rdx, [rbp+var_60] mov rcx, [rbp+var_90] call rax mov [rbp+var_C4], eax cmp [rbp+var_C4], 0 jle short loc_59293 mov ecx, [rbp+var_C4] mov rax, [rbp+var_60] movsxd rcx, ecx add rax, rcx mov [rbp+var_60], rax jmp short loc_59295 loc_59293: jmp short loc_592A8 loc_59295: jmp short $+2 loc_59297: mov rax, [rbp+var_80] add rax, 1 mov [rbp+var_80], rax jmp loc_59212 loc_592A8: mov eax, dword ptr [rbp+var_60] mov ecx, dword ptr [rbp+var_88] sub eax, ecx cdqe mov [rbp+var_D0], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_592DE mov rax, [rbp+var_D0] add rsp, 0D0h pop rbp retn loc_592DE: call ___stack_chk_fail
long long my_ll10tostr_mb2_or_mb4(long long a1, unsigned long long a2, long long a3, int a4, long long a5) { char *v5; // rax char *v6; // rax char *v7; // rax bool v9; // [rsp+Bh] [rbp-C5h] int v10; // [rsp+Ch] [rbp-C4h] unsigned long long v11; // [rsp+28h] [rbp-A8h] int v12; // [rsp+34h] [rbp-9Ch] signed long long i; // [rsp+38h] [rbp-98h] unsigned long long v14; // [rsp+40h] [rbp-90h] char *v15; // [rsp+50h] [rbp-80h] unsigned long long v16; // [rsp+70h] [rbp-60h] char v17; // [rsp+BFh] [rbp-11h] BYREF char v18; // [rsp+C0h] [rbp-10h] BYREF unsigned long long v19; // [rsp+C8h] [rbp-8h] v19 = __readfsqword(0x28u); v16 = a2; v12 = 0; v11 = a5; if ( a4 < 0 && a5 < 0 ) { v12 = 1; v11 = -a5; } v15 = &v18; v18 = 0; if ( v11 ) { while ( v11 > 0x7FFFFFFFFFFFFFFFLL ) { v5 = v15--; *(v5 - 1) = v11 % 0xA + 48; v11 /= 0xAuLL; } for ( i = v11; i; i /= 10LL ) { v6 = v15--; *(v6 - 1) = i % 10 + 48; } } else { v15 = &v17; v17 = 48; } if ( v12 ) { v7 = v15--; *(v7 - 1) = 45; } v14 = a3 + a2; while ( 1 ) { v9 = 0; if ( v16 < v14 ) v9 = *v15 != 0; if ( !v9 ) break; v10 = (*(long long ( **)(long long, _QWORD, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 48LL))( a1, *v15, v16, v14); if ( v10 <= 0 ) break; v16 += v10; ++v15; } return (int)v16 - (int)a2; }
my_ll10tostr_mb2_or_mb4: PUSH RBP MOV RBP,RSP SUB RSP,0xd0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x58],RDI MOV qword ptr [RBP + -0x60],RSI MOV qword ptr [RBP + -0x68],RDX MOV dword ptr [RBP + -0x6c],ECX MOV qword ptr [RBP + -0x78],R8 MOV dword ptr [RBP + -0x9c],0x0 MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0xa8],RAX CMP dword ptr [RBP + -0x6c],0x0 JGE 0x001590c9 CMP qword ptr [RBP + -0x78],0x0 JGE 0x001590c7 MOV dword ptr [RBP + -0x9c],0x1 XOR EAX,EAX SUB RAX,qword ptr [RBP + -0xa8] MOV qword ptr [RBP + -0xa8],RAX LAB_001590c7: JMP 0x001590c9 LAB_001590c9: LEA RAX,[RBP + -0x50] ADD RAX,0x40 MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x80] MOV byte ptr [RAX],0x0 CMP qword ptr [RBP + -0xa8],0x0 JNZ 0x001590fe MOV RAX,qword ptr [RBP + -0x80] MOV RCX,RAX ADD RCX,-0x1 MOV qword ptr [RBP + -0x80],RCX MOV byte ptr [RAX + -0x1],0x30 JMP 0x001591dc LAB_001590fe: JMP 0x00159100 LAB_00159100: MOV RAX,0x7fffffffffffffff CMP qword ptr [RBP + -0xa8],RAX JBE 0x00159170 MOV RAX,qword ptr [RBP + -0xa8] MOV ECX,0xa XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0xb0],RAX MOV RAX,qword ptr [RBP + -0xa8] IMUL RCX,qword ptr [RBP + -0xb0],0xa SUB RAX,RCX MOV dword ptr [RBP + -0xb4],EAX MOV EAX,dword ptr [RBP + -0xb4] ADD EAX,0x30 MOV CL,AL MOV RAX,qword ptr [RBP + -0x80] MOV RDX,RAX ADD RDX,-0x1 MOV qword ptr [RBP + -0x80],RDX MOV byte ptr [RAX + -0x1],CL MOV RAX,qword ptr [RBP + -0xb0] MOV qword ptr [RBP + -0xa8],RAX JMP 0x00159100 LAB_00159170: MOV RAX,qword ptr [RBP + -0xa8] MOV qword ptr [RBP + -0x98],RAX LAB_0015917e: CMP qword ptr [RBP + -0x98],0x0 JZ 0x001591da MOV RAX,qword ptr [RBP + -0x98] MOV ECX,0xa CQO IDIV RCX MOV qword ptr [RBP + -0xc0],RAX MOV RAX,qword ptr [RBP + -0x98] IMUL RCX,qword ptr [RBP + -0xc0],0xa SUB RAX,RCX ADD RAX,0x30 MOV CL,AL MOV RAX,qword ptr [RBP + -0x80] MOV RDX,RAX ADD RDX,-0x1 MOV qword ptr [RBP + -0x80],RDX MOV byte ptr [RAX + -0x1],CL MOV RAX,qword ptr [RBP + -0xc0] MOV qword ptr [RBP + -0x98],RAX JMP 0x0015917e LAB_001591da: JMP 0x001591dc LAB_001591dc: CMP dword ptr [RBP + -0x9c],0x0 JZ 0x001591f8 MOV RAX,qword ptr [RBP + -0x80] MOV RCX,RAX ADD RCX,-0x1 MOV qword ptr [RBP + -0x80],RCX MOV byte ptr [RAX + -0x1],0x2d LAB_001591f8: MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x88],RAX MOV RAX,qword ptr [RBP + -0x60] ADD RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x90],RAX LAB_00159212: MOV RCX,qword ptr [RBP + -0x60] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x90] MOV byte ptr [RBP + -0xc5],AL JNC 0x0015923a MOV RAX,qword ptr [RBP + -0x80] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0xc5],AL LAB_0015923a: MOV AL,byte ptr [RBP + -0xc5] TEST AL,0x1 JNZ 0x00159246 JMP 0x001592a8 LAB_00159246: MOV RAX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0x30] MOV RDI,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x80] MOVSX RSI,byte ptr [RCX] MOV RDX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RBP + -0x90] CALL RAX MOV dword ptr [RBP + -0xc4],EAX CMP dword ptr [RBP + -0xc4],0x0 JLE 0x00159293 MOV ECX,dword ptr [RBP + -0xc4] MOV RAX,qword ptr [RBP + -0x60] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x60],RAX JMP 0x00159295 LAB_00159293: JMP 0x001592a8 LAB_00159295: JMP 0x00159297 LAB_00159297: MOV RAX,qword ptr [RBP + -0x80] ADD RAX,0x1 MOV qword ptr [RBP + -0x80],RAX JMP 0x00159212 LAB_001592a8: MOV EAX,dword ptr [RBP + -0x60] MOV ECX,dword ptr [RBP + -0x88] SUB EAX,ECX CDQE MOV qword ptr [RBP + -0xd0],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001592de MOV RAX,qword ptr [RBP + -0xd0] ADD RSP,0xd0 POP RBP RET LAB_001592de: CALL 0x001242e0
long my_ll10tostr_mb2_or_mb4(long param_1,ulong param_2,long param_3,int param_4,ulong param_5) { int iVar1; long in_FS_OFFSET; bool bVar2; ulong local_b0; ulong local_a0; int local_90; char *local_88; ulong local_68; char local_19 [9]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); bVar2 = false; local_b0 = param_5; if ((param_4 < 0) && (bVar2 = (long)param_5 < 0, bVar2)) { local_b0 = -param_5; } local_88 = local_19 + 1; local_19[1] = 0; if (local_b0 == 0) { local_88 = local_19; local_19[0] = '0'; } else { while (0x7fffffffffffffff < local_b0) { local_88[-1] = (char)local_b0 + (char)(local_b0 / 10) * -10 + '0'; local_b0 = local_b0 / 10; local_88 = local_88 + -1; } local_a0 = local_b0; while (local_a0 != 0) { local_88[-1] = (char)local_a0 + (char)((long)local_a0 / 10) * -10 + '0'; local_a0 = (long)local_a0 / 10; local_88 = local_88 + -1; } } if (bVar2) { local_88[-1] = '-'; local_88 = local_88 + -1; } local_68 = param_2; while( true ) { bVar2 = false; if (local_68 < param_2 + param_3) { bVar2 = *local_88 != '\0'; } if ((!bVar2) || (iVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30)) (param_1,(long)*local_88,local_68,param_2 + param_3), iVar1 < 1)) break; local_68 = local_68 + (long)iVar1; local_88 = local_88 + 1; } local_90 = (int)param_2; if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return (long)((int)local_68 - local_90); }
25,517
nlohmann::json_abi_v3_11_3::detail::type_error nlohmann::json_abi_v3_11_3::detail::type_error::create<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*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*)
hkr04[P]cpp-mcp/common/json.hpp
static type_error create(int id_, const std::string& what_arg, BasicJsonContext context) { const std::string w = concat(exception::name("type_error", id_), exception::diagnostics(context), what_arg); return {id_, w.c_str()}; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::type_error nlohmann::json_abi_v3_11_3::detail::type_error::create<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*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x98, %rsp movq %rdx, %r15 movl %esi, %ebp movq %rdi, %rbx leaq 0x38(%rsp), %r13 movq %r13, -0x10(%r13) leaq 0x3707d(%rip), %rsi # 0x422d8 leaq 0x37080(%rip), %rdx # 0x422e2 leaq 0x28(%rsp), %rdi callq 0xb820 leaq 0x48(%rsp), %rdi leaq 0x28(%rsp), %rsi movl %ebp, %edx callq 0xb4a6 leaq 0x78(%rsp), %r14 movq %r14, -0x10(%r14) xorl %eax, %eax movq %rax, -0x8(%r14) movb %al, (%r14) leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) movq %rax, -0x8(%r12) movb %al, (%r12) movq 0x8(%r15), %rsi addq 0x50(%rsp), %rsi leaq 0x8(%rsp), %rdi callq 0x8820 movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx leaq 0x8(%rsp), %rdi callq 0x8150 movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdx leaq 0x8(%rsp), %rdi callq 0x8150 movq (%r15), %rsi movq 0x8(%r15), %rdx leaq 0x8(%rsp), %rdi callq 0x8150 movq 0x68(%rsp), %rdi cmpq %r14, %rdi je 0xb305 movq 0x78(%rsp), %rsi incq %rsi callq 0x8580 leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xb320 movq 0x58(%rsp), %rsi incq %rsi callq 0x8580 movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0xb337 movq 0x38(%rsp), %rsi incq %rsi callq 0x8580 movq 0x8(%rsp), %rdx movq %rbx, %rdi movl %ebp, %esi callq 0xb70e leaq 0x50f0b(%rip), %rax # 0x5c258 movq %rax, (%rbx) movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0xb367 movq 0x18(%rsp), %rsi incq %rsi callq 0x8580 movq %rbx, %rax addq $0x98, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0xb3f5 movq 0x18(%rsp), %rsi jmp 0xb3ed movq %rax, %rbx jmp 0xb3de movq %rax, %rbx jmp 0xb3f5 movq %rdx, %rbx movq %rax, %r15 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0xb3b7 movq 0x18(%rsp), %rsi incq %rsi callq 0x8580 leaq 0x68(%rsp), %rdi leaq 0x48(%rsp), %rdx leaq 0x88(%rsp), %r12 movq %r14, %rsi movq %r15, %rcx movl %ebx, %r8d movq %r12, %r9 callq 0x8ab0 movq (%r12), %rbx movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0xb3f5 movq 0x38(%rsp), %rsi incq %rsi callq 0x8580 movq %rbx, %rdi callq 0x8960
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 98h mov r15, rdx mov ebp, esi mov rbx, rdi lea r13, [rsp+0C8h+var_90] mov [r13-10h], r13 lea rsi, aTypeError; "type_error" lea rdx, aTypeError+0Ah; "" lea rdi, [rsp+0C8h+var_A0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+0C8h+var_80]; int lea rsi, [rsp+0C8h+var_A0]; int mov edx, ebp; int call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int) lea r14, [rsp+0C8h+var_50] mov [r14-10h], r14 xor eax, eax mov [r14-8], rax mov [r14], al lea r12, [rsp+0C8h+var_B0] mov [r12-10h], r12 mov [r12-8], rax mov [r12], al mov rsi, [r15+8] add rsi, [rsp+0C8h+var_78] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) mov rsi, qword ptr [rsp+0C8h+var_80] mov rdx, [rsp+0C8h+var_78] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rsi, [rsp+0C8h+var_60] mov rdx, [rsp+0C8h+var_58] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rsi, [r15] mov rdx, [r15+8] lea rdi, [rsp+0C8h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rdi, [rsp+0C8h+var_60]; void * cmp rdi, r14 jz short loc_B305 mov rsi, [rsp+0C8h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B305: lea rax, [rsp+0C8h+var_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_B320 mov rsi, [rsp+0C8h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B320: mov rdi, [rsp+0C8h+var_A0]; void * cmp rdi, r13 jz short loc_B337 mov rsi, [rsp+0C8h+var_90] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B337: mov rdx, [rsp+0C8h+var_C0]; char * mov rdi, rbx; this mov esi, ebp; int call _ZN8nlohmann16json_abi_v3_11_36detail9exceptionC2EiPKc; nlohmann::json_abi_v3_11_3::detail::exception::exception(int,char const*) lea rax, off_5C258 mov [rbx], rax mov rdi, [rsp+0C8h+var_C0]; void * cmp rdi, r12 jz short loc_B367 mov rsi, [rsp+0C8h+var_B0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B367: mov rax, rbx add rsp, 98h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rsp+arg_0] cmp rdi, r12 jz short loc_B3F5 mov rsi, [rsp+arg_10] jmp short loc_B3ED mov rbx, rax jmp short loc_B3DE mov rbx, rax jmp short loc_B3F5 mov rbx, rdx mov r15, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r12 jz short loc_B3B7 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B3B7: lea rdi, [rsp+arg_60] lea rdx, [rsp+arg_40] lea r12, [rsp+arg_80] mov rsi, r14 mov rcx, r15 mov r8d, ebx mov r9, r12 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK__cold_1 mov rbx, [r12] loc_B3DE: mov rdi, [rsp+arg_20]; void * cmp rdi, r13 jz short loc_B3F5 mov rsi, [rsp+arg_30] loc_B3ED: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B3F5: mov rdi, rbx call __Unwind_Resume
nlohmann::json_abi_v3_11_3::detail::exception * ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( nlohmann::json_abi_v3_11_3::detail::exception *this, int a2, _QWORD *a3) { int v4; // ecx int v5; // r8d int v6; // r9d int v8; // [rsp+0h] [rbp-C8h] char *v9; // [rsp+8h] [rbp-C0h] BYREF void *v10; // [rsp+10h] [rbp-B8h] _QWORD v11[2]; // [rsp+18h] [rbp-B0h] BYREF void *v12[2]; // [rsp+28h] [rbp-A0h] BYREF _QWORD v13[2]; // [rsp+38h] [rbp-90h] BYREF int v14[2]; // [rsp+48h] [rbp-80h] BYREF long long v15; // [rsp+50h] [rbp-78h] long long v16; // [rsp+58h] [rbp-70h] BYREF void *v17; // [rsp+68h] [rbp-60h] long long v18; // [rsp+70h] [rbp-58h] _QWORD v19[10]; // [rsp+78h] [rbp-50h] BYREF v12[0] = v13; std::string::_M_construct<char const*>(v12, "type_error", ""); nlohmann::json_abi_v3_11_3::detail::exception::name( (int)v14, (int)v12, a2, v4, v5, v6, v8, (int)v9, v10, v11[0], v11[1]); v17 = v19; v18 = 0LL; LOBYTE(v19[0]) = 0; v9 = (char *)v11; v10 = 0LL; LOBYTE(v11[0]) = 0; std::string::reserve(&v9, v15 + a3[1]); std::string::_M_append(&v9, *(_QWORD *)v14, v15); std::string::_M_append(&v9, v17, v18); std::string::_M_append(&v9, *a3, a3[1]); if ( v17 != v19 ) operator delete(v17, v19[0] + 1LL); if ( *(long long **)v14 != &v16 ) operator delete(*(void **)v14, v16 + 1); if ( v12[0] != v13 ) operator delete(v12[0], v13[0] + 1LL); nlohmann::json_abi_v3_11_3::detail::exception::exception(this, a2, v9); *(_QWORD *)this = off_5C258; if ( v9 != (char *)v11 ) operator delete(v9, v11[0] + 1LL); return this; }
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x98 MOV R15,RDX MOV EBP,ESI MOV RBX,RDI LEA R13,[RSP + 0x38] MOV qword ptr [R13 + -0x10],R13 LAB_0010b254: LEA RSI,[0x1422d8] LEA RDX,[0x1422e2] LEA RDI,[RSP + 0x28] CALL 0x0010b820 LAB_0010b26c: LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x28] MOV EDX,EBP CALL 0x0010b4a6 LEA R14,[RSP + 0x78] MOV qword ptr [R14 + -0x10],R14 XOR EAX,EAX MOV qword ptr [R14 + -0x8],RAX MOV byte ptr [R14],AL LEA R12,[RSP + 0x18] MOV qword ptr [R12 + -0x10],R12 MOV qword ptr [R12 + -0x8],RAX MOV byte ptr [R12],AL MOV RSI,qword ptr [R15 + 0x8] ADD RSI,qword ptr [RSP + 0x50] LAB_0010b2ab: LEA RDI,[RSP + 0x8] CALL 0x00108820 MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] LEA RDI,[RSP + 0x8] CALL 0x00108150 MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] LEA RDI,[RSP + 0x8] CALL 0x00108150 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] LEA RDI,[RSP + 0x8] CALL 0x00108150 MOV RDI,qword ptr [RSP + 0x68] CMP RDI,R14 JZ 0x0010b305 MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x00108580 LAB_0010b305: LEA RAX,[RSP + 0x58] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0010b320 MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x00108580 LAB_0010b320: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R13 JZ 0x0010b337 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x00108580 LAB_0010b337: MOV RDX,qword ptr [RSP + 0x8] LAB_0010b33c: MOV RDI,RBX MOV ESI,EBP CALL 0x0010b70e LAB_0010b346: LEA RAX,[0x15c258] MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R12 JZ 0x0010b367 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00108580 LAB_0010b367: MOV RAX,RBX ADD RSP,0x98 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
exception * _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (exception *param_1,int param_2,ulong *param_3) { char *local_c0; int8 local_b8; char local_b0; int7 uStack_af; long *local_a0 [2]; long local_90 [2]; long *local_80 [2]; long local_70 [2]; int1 *local_60; int8 local_58; int1 local_50; int7 uStack_4f; /* try { // try from 0010b254 to 0010b26b has its CatchHandler @ 0010b395 */ local_a0[0] = local_90; std::__cxx11::string::_M_construct<char_const*>(local_a0,"type_error",""); /* try { // try from 0010b26c to 0010b27c has its CatchHandler @ 0010b390 */ nlohmann::json_abi_v3_11_3::detail::exception::name ((exception *)local_80,(string *)local_a0,param_2); local_58 = 0; local_50 = 0; local_b8 = 0; local_b0 = '\0'; /* try { // try from 0010b2ab to 0010b2ed has its CatchHandler @ 0010b39a */ local_c0 = &local_b0; local_60 = &local_50; std::__cxx11::string::reserve((ulong)&local_c0); std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_80[0]); std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_60); std::__cxx11::string::_M_append((char *)&local_c0,*param_3); if (local_60 != &local_50) { operator_delete(local_60,CONCAT71(uStack_4f,local_50) + 1); } if (local_80[0] != local_70) { operator_delete(local_80[0],local_70[0] + 1); } if (local_a0[0] != local_90) { operator_delete(local_a0[0],local_90[0] + 1); } /* try { // try from 0010b33c to 0010b345 has its CatchHandler @ 0010b37c */ nlohmann::json_abi_v3_11_3::detail::exception::exception(param_1,param_2,local_c0); *(int ***)param_1 = &PTR__exception_0015c258; if (local_c0 != &local_b0) { operator_delete(local_c0,CONCAT71(uStack_af,local_b0) + 1); } return param_1; }
25,518
has_with_scope
bluesky950520[P]quickjs/quickjs.c
static BOOL has_with_scope(JSFunctionDef *s, int scope_level) { /* check if scope chain contains a with statement */ while (s) { int scope_idx = s->scopes[scope_level].first; while (scope_idx >= 0) { JSVarDef *vd = &s->vars[scope_idx]; if (vd->var_name == JS_ATOM__with_) return TRUE; scope_idx = vd->scope_next; } /* check parent scopes */ scope_level = s->parent_scope_level; s = s->parent; } return FALSE; }
O0
c
has_with_scope: movq %rdi, -0x10(%rsp) movl %esi, -0x14(%rsp) cmpq $0x0, -0x10(%rsp) je 0xb407f movq -0x10(%rsp), %rax movq 0xf8(%rax), %rax movslq -0x14(%rsp), %rcx movl 0x4(%rax,%rcx,8), %eax movl %eax, -0x18(%rsp) cmpl $0x0, -0x18(%rsp) jl 0xb4060 movq -0x10(%rsp), %rax movq 0x90(%rax), %rax movslq -0x18(%rsp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x20(%rsp) movq -0x20(%rsp), %rax cmpl $0x55, (%rax) jne 0xb4052 movl $0x1, -0x4(%rsp) jmp 0xb4087 movq -0x20(%rsp), %rax movl 0x8(%rax), %eax movl %eax, -0x18(%rsp) jmp 0xb401a movq -0x10(%rsp), %rax movl 0x14(%rax), %eax movl %eax, -0x14(%rsp) movq -0x10(%rsp), %rax movq 0x8(%rax), %rax movq %rax, -0x10(%rsp) jmp 0xb3ff9 movl $0x0, -0x4(%rsp) movl -0x4(%rsp), %eax retq nopl (%rax)
has_with_scope: mov [rsp+var_10], rdi mov [rsp+var_14], esi loc_B3FF9: cmp [rsp+var_10], 0 jz short loc_B407F mov rax, [rsp+var_10] mov rax, [rax+0F8h] movsxd rcx, [rsp+var_14] mov eax, [rax+rcx*8+4] mov [rsp+var_18], eax loc_B401A: cmp [rsp+var_18], 0 jl short loc_B4060 mov rax, [rsp+var_10] mov rax, [rax+90h] movsxd rcx, [rsp+var_18] shl rcx, 4 add rax, rcx mov [rsp+var_20], rax mov rax, [rsp+var_20] cmp dword ptr [rax], 55h ; 'U' jnz short loc_B4052 mov [rsp+var_4], 1 jmp short loc_B4087 loc_B4052: mov rax, [rsp+var_20] mov eax, [rax+8] mov [rsp+var_18], eax jmp short loc_B401A loc_B4060: mov rax, [rsp+var_10] mov eax, [rax+14h] mov [rsp+var_14], eax mov rax, [rsp+var_10] mov rax, [rax+8] mov [rsp+var_10], rax jmp loc_B3FF9 loc_B407F: mov [rsp+var_4], 0 loc_B4087: mov eax, [rsp+var_4] retn
long long has_with_scope(long long a1, int a2) { _DWORD *v3; // [rsp+0h] [rbp-20h] int i; // [rsp+8h] [rbp-18h] while ( a1 ) { for ( i = *(_DWORD *)(*(_QWORD *)(a1 + 248) + 8LL * a2 + 4); i >= 0; i = v3[2] ) { v3 = (_DWORD *)(16LL * i + *(_QWORD *)(a1 + 144)); if ( *v3 == 85 ) return 1; } a2 = *(_DWORD *)(a1 + 20); a1 = *(_QWORD *)(a1 + 8); } return 0; }
has_with_scope: MOV qword ptr [RSP + -0x10],RDI MOV dword ptr [RSP + -0x14],ESI LAB_001b3ff9: CMP qword ptr [RSP + -0x10],0x0 JZ 0x001b407f MOV RAX,qword ptr [RSP + -0x10] MOV RAX,qword ptr [RAX + 0xf8] MOVSXD RCX,dword ptr [RSP + -0x14] MOV EAX,dword ptr [RAX + RCX*0x8 + 0x4] MOV dword ptr [RSP + -0x18],EAX LAB_001b401a: CMP dword ptr [RSP + -0x18],0x0 JL 0x001b4060 MOV RAX,qword ptr [RSP + -0x10] MOV RAX,qword ptr [RAX + 0x90] MOVSXD RCX,dword ptr [RSP + -0x18] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RSP + -0x20],RAX MOV RAX,qword ptr [RSP + -0x20] CMP dword ptr [RAX],0x55 JNZ 0x001b4052 MOV dword ptr [RSP + -0x4],0x1 JMP 0x001b4087 LAB_001b4052: MOV RAX,qword ptr [RSP + -0x20] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RSP + -0x18],EAX JMP 0x001b401a LAB_001b4060: MOV RAX,qword ptr [RSP + -0x10] MOV EAX,dword ptr [RAX + 0x14] MOV dword ptr [RSP + -0x14],EAX MOV RAX,qword ptr [RSP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + -0x10],RAX JMP 0x001b3ff9 LAB_001b407f: MOV dword ptr [RSP + -0x4],0x0 LAB_001b4087: MOV EAX,dword ptr [RSP + -0x4] RET
int4 has_with_scope(long param_1,int param_2) { int *piVar1; int local_18; int local_14; long local_10; local_14 = param_2; local_10 = param_1; do { if (local_10 == 0) { return 0; } local_18 = *(int *)(*(long *)(local_10 + 0xf8) + 4 + (long)local_14 * 8); while (-1 < local_18) { piVar1 = (int *)(*(long *)(local_10 + 0x90) + (long)local_18 * 0x10); if (*piVar1 == 0x55) { return 1; } local_18 = piVar1[2]; } local_14 = *(int *)(local_10 + 0x14); local_10 = *(long *)(local_10 + 8); } while( true ); }
25,519
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::end_array()
llama.cpp/common/json.hpp
bool end_array() { JSON_ASSERT(!ref_stack.empty()); JSON_ASSERT(ref_stack.back()->is_array()); ref_stack.back()->set_parents(); ref_stack.pop_back(); return true; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::end_array(): pushq %rax movq 0x10(%rdi), %rax cmpq %rax, 0x8(%rdi) je 0x99fd8 movq -0x8(%rax), %rcx cmpb $0x2, (%rcx) jne 0x99ff4 addq $-0x8, %rax movq %rax, 0x10(%rdi) movb $0x1, %al popq %rcx retq leaq 0x8d93a(%rip), %rdi # 0x127919 leaq 0x85b72(%rip), %rdx # 0x11fb58 leaq 0x8e908(%rip), %rcx # 0x1288f5 movl $0x1b01, %esi # imm = 0x1B01 jmp 0x9a00e leaq 0x8d91e(%rip), %rdi # 0x127919 leaq 0x85b56(%rip), %rdx # 0x11fb58 leaq 0x8eb8d(%rip), %rcx # 0x128b96 movl $0x1b02, %esi # imm = 0x1B02 xorl %eax, %eax callq 0x21ef0 nop
_ZN8nlohmann16json_abi_v3_11_36detail19json_sax_dom_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9end_arrayEv: push rax mov rax, [rdi+10h] cmp [rdi+8], rax jz short loc_99FD8 mov rcx, [rax-8] cmp byte ptr [rcx], 2 jnz short loc_99FF4 add rax, 0FFFFFFFFFFFFFFF8h mov [rdi+10h], rax mov al, 1 pop rcx retn loc_99FD8: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRefStackEmpty; "!ref_stack.empty()" mov esi, 1B01h jmp short loc_9A00E loc_99FF4: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRefStackBackIs_0; "ref_stack.back()->is_array()" mov esi, 1B02h loc_9A00E: xor eax, eax call _ggml_abort nop
char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::end_array( long long a1) { long long v1; // rax long long v3; // rsi long long v4; // rdx long long v5; // rcx v1 = *(_QWORD *)(a1 + 16); if ( *(_QWORD *)(a1 + 8) == v1 ) { v3 = 6913LL; ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 6913LL, "GGML_ASSERT(%s) failed", "!ref_stack.empty()"); } else { if ( **(_BYTE **)(v1 - 8) == 2 ) { *(_QWORD *)(a1 + 16) = v1 - 8; return 1; } v3 = 6914LL; ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 6914LL, "GGML_ASSERT(%s) failed", "ref_stack.back()->is_array()"); } return nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::parse_error<nlohmann::json_abi_v3_11_3::detail::out_of_range>( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", v3, v4, v5); }
end_array: PUSH RAX MOV RAX,qword ptr [RDI + 0x10] CMP qword ptr [RDI + 0x8],RAX JZ 0x00199fd8 MOV RCX,qword ptr [RAX + -0x8] CMP byte ptr [RCX],0x2 JNZ 0x00199ff4 ADD RAX,-0x8 MOV qword ptr [RDI + 0x10],RAX MOV AL,0x1 POP RCX RET LAB_00199fd8: LEA RDI,[0x227919] LEA RDX,[0x21fb58] LEA RCX,[0x2288f5] MOV ESI,0x1b01 JMP 0x0019a00e LAB_00199ff4: LEA RDI,[0x227919] LEA RDX,[0x21fb58] LEA RCX,[0x228b96] MOV ESI,0x1b02 LAB_0019a00e: XOR EAX,EAX CALL 0x00121ef0
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::end_array() */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::end_array(json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this) { long lVar1; char *pcVar2; int8 uVar3; lVar1 = *(long *)(this + 0x10); if (*(long *)(this + 8) == lVar1) { pcVar2 = "!ref_stack.empty()"; uVar3 = 0x1b01; } else { if (**(char **)(lVar1 + -8) == '\x02') { *(long *)(this + 0x10) = lVar1 + -8; return CONCAT71((int7)((ulong)(lVar1 + -8) >> 8),1); } pcVar2 = "ref_stack.back()->is_array()"; uVar3 = 0x1b02; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",uVar3, "GGML_ASSERT(%s) failed",pcVar2); }
25,520
HeapGetStats
seiftnesse[P]memoryallocator/src/custom_alloc_stats.c
void HeapGetStats(size_t *allocated, size_t *freed, size_t *count, size_t *peak) { if (allocated) *allocated = allocation_stats.total_allocated; if (freed) *freed = allocation_stats.total_freed; if (count) *count = allocation_stats.allocation_count; if (peak) *peak = allocation_stats.peak_allocation; HEAP_LOG("Stats queried: allocated=%zu, freed=%zu, count=%zu, peak=%zu\n", allocation_stats.total_allocated, allocation_stats.total_freed, allocation_stats.allocation_count, allocation_stats.peak_allocation); }
O3
c
HeapGetStats: testq %rdi, %rdi je 0x2533 movq 0x4103b90(%rip), %rax # 0x41060c0 movq %rax, (%rdi) testq %rsi, %rsi je 0x2542 movq 0x4103b89(%rip), %rax # 0x41060c8 movq %rax, (%rsi) testq %rdx, %rdx je 0x2551 movq 0x4103b82(%rip), %rax # 0x41060d0 movq %rax, (%rdx) testq %rcx, %rcx je 0x2560 movq 0x4103b7b(%rip), %rax # 0x41060d8 movq %rax, (%rcx) retq
HeapGetStats: test rdi, rdi jz short loc_2533 mov rax, cs:allocation_stats mov [rdi], rax loc_2533: test rsi, rsi jz short loc_2542 mov rax, cs:qword_41060C8 mov [rsi], rax loc_2542: test rdx, rdx jz short loc_2551 mov rax, cs:qword_41060D0 mov [rdx], rax loc_2551: test rcx, rcx jz short locret_2560 mov rax, cs:qword_41060D8 mov [rcx], rax locret_2560: retn
long long HeapGetStats(_QWORD *a1, _QWORD *a2, _QWORD *a3, _QWORD *a4) { long long result; // rax if ( a1 ) { result = allocation_stats; *a1 = allocation_stats; } if ( a2 ) { result = qword_41060C8; *a2 = qword_41060C8; } if ( a3 ) { result = qword_41060D0; *a3 = qword_41060D0; } if ( a4 ) { result = qword_41060D8; *a4 = qword_41060D8; } return result; }
HeapGetStats: TEST RDI,RDI JZ 0x00102533 MOV RAX,qword ptr [0x042060c0] MOV qword ptr [RDI],RAX LAB_00102533: TEST RSI,RSI JZ 0x00102542 MOV RAX,qword ptr [0x042060c8] MOV qword ptr [RSI],RAX LAB_00102542: TEST RDX,RDX JZ 0x00102551 MOV RAX,qword ptr [0x042060d0] MOV qword ptr [RDX],RAX LAB_00102551: TEST RCX,RCX JZ 0x00102560 MOV RAX,qword ptr [0x042060d8] MOV qword ptr [RCX],RAX LAB_00102560: RET
void HeapGetStats(int8 *param_1,int8 *param_2,int8 *param_3,int8 *param_4) { if (param_1 != (int8 *)0x0) { *param_1 = allocation_stats; } if (param_2 != (int8 *)0x0) { *param_2 = DAT_042060c8; } if (param_3 != (int8 *)0x0) { *param_3 = DAT_042060d0; } if (param_4 != (int8 *)0x0) { *param_4 = DAT_042060d8; } return; }
25,521
SchemaConverter::_add_rule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/json-schema-to-grammar.cpp
std::string _add_rule(const std::string & name, const std::string & rule) { std::string esc_name = regex_replace(name, INVALID_RULE_CHARS_RE, "-"); if (_rules.find(esc_name) == _rules.end() || _rules[esc_name] == rule) { _rules[esc_name] = rule; return esc_name; } else { int i = 0; while (_rules.find(esc_name + std::to_string(i)) != _rules.end() && _rules[esc_name + std::to_string(i)] != rule) { i++; } std::string key = esc_name + std::to_string(i); _rules[key] = rule; return key; } }
O2
cpp
SchemaConverter::_add_rule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xb8, %rsp movq %rcx, 0x10(%rsp) movq %rsi, %r14 movq %rdi, %r13 leaq 0x70d61(%rip), %rax # 0x1002f0 leaq 0x21623(%rip), %rcx # 0xb0bb9 leaq 0x18(%rsp), %rbx movq %rbx, %rdi movq %rdx, %rsi movq %rax, %rdx xorl %r8d, %r8d callq 0x73672 leaq 0x28(%r14), %rdi movq %rdi, 0x8(%rsp) movq %rbx, %rsi callq 0x8f852 addq $0x30, %r14 cmpq %r14, %rax je 0x8f5e6 leaq 0x18(%rsp), %rsi movq 0x8(%rsp), %rdi callq 0x8f7ec movq %rax, %rdi movq 0x10(%rsp), %rsi callq 0x3bb14 testb %al, %al je 0x8f62e leaq 0x18(%rsp), %rsi movq 0x8(%rsp), %rdi callq 0x8f7ec movq %rax, %rdi movq 0x10(%rsp), %rsi callq 0x234e0 leaq 0x10(%r13), %rcx movq %rcx, (%r13) leaq 0x28(%rsp), %rax movq -0x10(%rax), %rdx cmpq %rax, %rdx je 0x8f6e4 movq %rdx, (%r13) movq 0x28(%rsp), %rcx movq %rcx, 0x10(%r13) jmp 0x8f6ea xorl %esi, %esi leaq 0x78(%rsp), %rbx leaq 0x38(%rsp), %r12 movq %rbx, %rdi movl %esi, 0x4(%rsp) callq 0x3f053 movq %r12, %rdi leaq 0x18(%rsp), %rsi movq %rbx, %rdx callq 0x7c5ca movq 0x8(%rsp), %rdi movq %r12, %rsi callq 0x8f852 cmpq %r14, %rax je 0x8f705 leaq 0x58(%rsp), %r15 movq %r15, %rdi movl 0x4(%rsp), %esi callq 0x3f053 leaq 0x98(%rsp), %rbp movq %rbp, %rdi leaq 0x18(%rsp), %rsi movq %r15, %rdx callq 0x7c5ca movq 0x8(%rsp), %rdi movq %rbp, %rsi callq 0x8e28a movq %rax, %rdi movq 0x10(%rsp), %rsi callq 0x59d5a movl %eax, %r15d movq %rbp, %rdi callq 0x241c8 leaq 0x58(%rsp), %rdi callq 0x241c8 movq %r12, %rdi callq 0x241c8 movq %rbx, %rdi callq 0x241c8 testb %r15b, %r15b je 0x8f719 movl 0x4(%rsp), %esi incl %esi jmp 0x8f63a movups (%rax), %xmm0 movups %xmm0, (%rcx) movq 0x20(%rsp), %rcx movq %rcx, 0x8(%r13) movq %rax, 0x18(%rsp) andq $0x0, 0x20(%rsp) movb $0x0, 0x28(%rsp) jmp 0x8f75d leaq 0x38(%rsp), %rdi callq 0x241c8 leaq 0x78(%rsp), %rdi callq 0x241c8 leaq 0x38(%rsp), %rdi movl 0x4(%rsp), %esi callq 0x3f053 leaq 0x18(%rsp), %rsi leaq 0x38(%rsp), %rdx movq %r13, %rdi callq 0x7c5ca leaq 0x38(%rsp), %rdi callq 0x241c8 movq 0x8(%rsp), %rdi movq %r13, %rsi callq 0x8f7ec movq %rax, %rdi movq 0x10(%rsp), %rsi callq 0x234e0 leaq 0x18(%rsp), %rdi callq 0x241c8 movq %r13, %rax addq $0xb8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x38(%rsp), %rdi jmp 0x8f7d5 jmp 0x8f7c8 movq %rax, %rbx movq %r13, %rdi jmp 0x8f7d5 jmp 0x8f7c8 jmp 0x8f7c8 jmp 0x8f7c8 movq %rax, %rbx jmp 0x8f7ad jmp 0x8f7b9 movq %rax, %rbx leaq 0x98(%rsp), %rdi callq 0x241c8 leaq 0x58(%rsp), %rdi callq 0x241c8 jmp 0x8f7bc movq %rax, %rbx leaq 0x38(%rsp), %rdi callq 0x241c8 jmp 0x8f7d0 movq %rax, %rbx jmp 0x8f7da movq %rax, %rbx leaq 0x78(%rsp), %rdi callq 0x241c8 leaq 0x18(%rsp), %rdi callq 0x241c8 movq %rbx, %rdi callq 0x23f80
_ZN15SchemaConverter9_add_ruleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0B8h mov [rsp+0E8h+var_D8], rcx mov r14, rsi mov r13, rdi lea rax, _Z21INVALID_RULE_CHARS_REB5cxx11; INVALID_RULE_CHARS_RE lea rcx, asc_B0BB8+1; "-" lea rbx, [rsp+0E8h+var_D0] mov rdi, rbx mov rsi, rdx mov rdx, rax xor r8d, r8d call _ZSt13regex_replaceINSt7__cxx1112regex_traitsIcEEcSt11char_traitsIcESaIcEENS0_12basic_stringIT0_T1_T2_EERKSA_RKNS0_11basic_regexIS7_T_EEPKS7_NSt15regex_constants15match_flag_typeE; std::regex_replace<std::regex_traits<char>,char,std::char_traits<char>,std::allocator<char>>(std::string const&,std::basic_regex<char,std::regex_traits<char>> const&,char const*,std::regex_constants::match_flag_type) lea rdi, [r14+28h] mov [rsp+0E8h+var_E0], rdi mov rsi, rbx call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE4findERS7_; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::find(std::string const&) add r14, 30h ; '0' cmp rax, r14 jz short loc_8F5E6 lea rsi, [rsp+0E8h+var_D0] mov rdi, [rsp+0E8h+var_E0] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixERS9_; std::map<std::string,std::string>::operator[](std::string const&) mov rdi, rax mov rsi, [rsp+0E8h+var_D8] call _ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_ test al, al jz short loc_8F62E loc_8F5E6: lea rsi, [rsp+0E8h+var_D0] mov rdi, [rsp+0E8h+var_E0] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixERS9_; std::map<std::string,std::string>::operator[](std::string const&) mov rdi, rax mov rsi, [rsp+0E8h+var_D8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) lea rcx, [r13+10h] mov [r13+0], rcx lea rax, [rsp+0E8h+var_C0] mov rdx, [rax-10h] cmp rdx, rax jz loc_8F6E4 mov [r13+0], rdx mov rcx, [rsp+0E8h+var_C0] mov [r13+10h], rcx jmp loc_8F6EA loc_8F62E: xor esi, esi; int lea rbx, [rsp+0E8h+var_70] lea r12, [rsp+0E8h+var_B0] loc_8F63A: mov rdi, rbx; this mov [rsp+0E8h+var_E4], esi call _ZNSt7__cxx119to_stringEi; std::to_string(int) mov rdi, r12 lea rsi, [rsp+0E8h+var_D0] mov rdx, rbx call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_OS8_; std::operator+<char>(std::string const&,std::string&&) mov rdi, [rsp+0E8h+var_E0] mov rsi, r12 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE4findERS7_; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::find(std::string const&) cmp rax, r14 jz loc_8F705 lea r15, [rsp+0E8h+var_90] mov rdi, r15; this mov esi, [rsp+0E8h+var_E4]; int call _ZNSt7__cxx119to_stringEi; std::to_string(int) lea rbp, [rsp+0E8h+var_50] mov rdi, rbp lea rsi, [rsp+0E8h+var_D0] mov rdx, r15 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_OS8_; std::operator+<char>(std::string const&,std::string&&) mov rdi, [rsp+0E8h+var_E0] mov rsi, rbp call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixEOS5_; std::map<std::string,std::string>::operator[](std::string&&) mov rdi, rax mov rsi, [rsp+0E8h+var_D8] call _ZStneIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EESA_; std::operator!=<char>(std::string const&,std::string const&) mov r15d, eax mov rdi, rbp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0E8h+var_90]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r12; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test r15b, r15b jz short loc_8F719 mov esi, [rsp+0E8h+var_E4] inc esi jmp loc_8F63A loc_8F6E4: movups xmm0, xmmword ptr [rax] movups xmmword ptr [rcx], xmm0 loc_8F6EA: mov rcx, [rsp+0E8h+var_C8] mov [r13+8], rcx mov [rsp+0E8h+var_D0], rax and [rsp+0E8h+var_C8], 0 mov byte ptr [rsp+0E8h+var_C0], 0 jmp short loc_8F75D loc_8F705: lea rdi, [rsp+0E8h+var_B0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0E8h+var_70]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_8F719: lea rdi, [rsp+0E8h+var_B0]; this mov esi, [rsp+0E8h+var_E4]; int call _ZNSt7__cxx119to_stringEi; std::to_string(int) lea rsi, [rsp+0E8h+var_D0] lea rdx, [rsp+0E8h+var_B0] mov rdi, r13 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_OS8_; std::operator+<char>(std::string const&,std::string&&) lea rdi, [rsp+0E8h+var_B0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, [rsp+0E8h+var_E0] mov rsi, r13 call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixERS9_; std::map<std::string,std::string>::operator[](std::string const&) mov rdi, rax mov rsi, [rsp+0E8h+var_D8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) loc_8F75D: lea rdi, [rsp+0E8h+var_D0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, r13 add rsp, 0B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+arg_30] jmp short loc_8F7D5 jmp short loc_8F7C8 mov rbx, rax mov rdi, r13 jmp short loc_8F7D5 jmp short loc_8F7C8 jmp short loc_8F7C8 jmp short loc_8F7C8 mov rbx, rax jmp short loc_8F7AD jmp short loc_8F7B9 mov rbx, rax lea rdi, [rsp+arg_90]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_8F7AD: lea rdi, [rsp+arg_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_8F7BC loc_8F7B9: mov rbx, rax loc_8F7BC: lea rdi, [rsp+arg_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_8F7D0 loc_8F7C8: mov rbx, rax jmp short loc_8F7DA mov rbx, rax loc_8F7D0: lea rdi, [rsp+arg_70]; void * loc_8F7D5: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_8F7DA: lea rdi, [rsp+arg_10]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
long long SchemaConverter::_add_rule(long long a1, long long a2, _QWORD *a3, _QWORD *a4) { long long v4; // r14 _QWORD *v5; // rax long long v6; // rax int i; // esi _QWORD *v8; // rax bool v9; // r15 long long v10; // rax long long v12; // [rsp+8h] [rbp-E0h] __int128 *v14; // [rsp+18h] [rbp-D0h] BYREF long long v15; // [rsp+20h] [rbp-C8h] __int128 v16; // [rsp+28h] [rbp-C0h] BYREF _BYTE v17[32]; // [rsp+38h] [rbp-B0h] BYREF _BYTE v18[32]; // [rsp+58h] [rbp-90h] BYREF _BYTE v19[32]; // [rsp+78h] [rbp-70h] BYREF _BYTE v20[80]; // [rsp+98h] [rbp-50h] BYREF std::regex_replace<std::regex_traits<char>,char,std::char_traits<char>,std::allocator<char>>( (long long)&v14, a3, (long long)&INVALID_RULE_CHARS_RE[abi:cxx11], (long long)"-", 0); v12 = a2 + 40; v4 = a2 + 48; if ( std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::find( a2 + 40, &v14) == a2 + 48 || (v5 = (_QWORD *)std::map<std::string,std::string>::operator[](v12, &v14), std::operator==<char>(v5, a4)) ) { v6 = std::map<std::string,std::string>::operator[](v12, &v14); std::string::_M_assign(v6, a4); *(_QWORD *)a1 = a1 + 16; if ( v14 == &v16 ) { *(_OWORD *)(a1 + 16) = v16; } else { *(_QWORD *)a1 = v14; *(_QWORD *)(a1 + 16) = v16; } *(_QWORD *)(a1 + 8) = v15; v14 = &v16; v15 = 0LL; LOBYTE(v16) = 0; } else { for ( i = 0; ; ++i ) { std::to_string((std::__cxx11 *)v19, i); std::operator+<char>((long long)v17, (long long)&v14, (long long)v19); if ( std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::find( v12, v17) == v4 ) break; std::to_string((std::__cxx11 *)v18, i); std::operator+<char>((long long)v20, (long long)&v14, (long long)v18); v8 = (_QWORD *)std::map<std::string,std::string>::operator[](v12, (long long)v20); v9 = std::operator!=<char>(v8, a4); std::string::~string(v20); std::string::~string(v18); std::string::~string(v17); std::string::~string(v19); if ( !v9 ) goto LABEL_12; } std::string::~string(v17); std::string::~string(v19); LABEL_12: std::to_string((std::__cxx11 *)v17, i); std::operator+<char>(a1, (long long)&v14, (long long)v17); std::string::~string(v17); v10 = std::map<std::string,std::string>::operator[](v12, a1); std::string::_M_assign(v10, a4); } std::string::~string(&v14); return a1; }
_add_rule: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xb8 MOV qword ptr [RSP + 0x10],RCX MOV R14,RSI MOV R13,RDI LEA RAX,[0x2002f0] LEA RCX,[0x1b0bb9] LEA RBX,[RSP + 0x18] MOV RDI,RBX MOV RSI,RDX MOV RDX,RAX XOR R8D,R8D CALL 0x00173672 LEA RDI,[R14 + 0x28] LAB_0018f5b0: MOV qword ptr [RSP + 0x8],RDI MOV RSI,RBX CALL 0x0018f852 ADD R14,0x30 CMP RAX,R14 JZ 0x0018f5e6 LAB_0018f5c6: LEA RSI,[RSP + 0x18] MOV RDI,qword ptr [RSP + 0x8] CALL 0x0018f7ec MOV RDI,RAX MOV RSI,qword ptr [RSP + 0x10] CALL 0x0013bb14 TEST AL,AL JZ 0x0018f62e LAB_0018f5e6: LEA RSI,[RSP + 0x18] MOV RDI,qword ptr [RSP + 0x8] CALL 0x0018f7ec MOV RDI,RAX MOV RSI,qword ptr [RSP + 0x10] CALL 0x001234e0 LEA RCX,[R13 + 0x10] MOV qword ptr [R13],RCX LEA RAX,[RSP + 0x28] MOV RDX,qword ptr [RAX + -0x10] CMP RDX,RAX JZ 0x0018f6e4 MOV qword ptr [R13],RDX MOV RCX,qword ptr [RSP + 0x28] MOV qword ptr [R13 + 0x10],RCX JMP 0x0018f6ea LAB_0018f62e: XOR ESI,ESI LEA RBX,[RSP + 0x78] LEA R12,[RSP + 0x38] LAB_0018f63a: MOV RDI,RBX MOV dword ptr [RSP + 0x4],ESI CALL 0x0013f053 LAB_0018f646: MOV RDI,R12 LEA RSI,[RSP + 0x18] MOV RDX,RBX CALL 0x0017c5ca LAB_0018f656: MOV RDI,qword ptr [RSP + 0x8] MOV RSI,R12 CALL 0x0018f852 CMP RAX,R14 JZ 0x0018f705 LAB_0018f66c: LEA R15,[RSP + 0x58] MOV RDI,R15 MOV ESI,dword ptr [RSP + 0x4] CALL 0x0013f053 LAB_0018f67d: LEA RBP,[RSP + 0x98] MOV RDI,RBP LEA RSI,[RSP + 0x18] MOV RDX,R15 CALL 0x0017c5ca LAB_0018f695: MOV RDI,qword ptr [RSP + 0x8] MOV RSI,RBP CALL 0x0018e28a MOV RDI,RAX MOV RSI,qword ptr [RSP + 0x10] CALL 0x00159d5a MOV R15D,EAX MOV RDI,RBP CALL 0x001241c8 LEA RDI,[RSP + 0x58] CALL 0x001241c8 MOV RDI,R12 CALL 0x001241c8 MOV RDI,RBX CALL 0x001241c8 TEST R15B,R15B JZ 0x0018f719 MOV ESI,dword ptr [RSP + 0x4] INC ESI JMP 0x0018f63a LAB_0018f6e4: MOVUPS XMM0,xmmword ptr [RAX] MOVUPS xmmword ptr [RCX],XMM0 LAB_0018f6ea: MOV RCX,qword ptr [RSP + 0x20] MOV qword ptr [R13 + 0x8],RCX MOV qword ptr [RSP + 0x18],RAX AND qword ptr [RSP + 0x20],0x0 MOV byte ptr [RSP + 0x28],0x0 JMP 0x0018f75d LAB_0018f705: LEA RDI,[RSP + 0x38] CALL 0x001241c8 LEA RDI,[RSP + 0x78] CALL 0x001241c8 LAB_0018f719: LEA RDI,[RSP + 0x38] MOV ESI,dword ptr [RSP + 0x4] CALL 0x0013f053 LAB_0018f727: LEA RSI,[RSP + 0x18] LEA RDX,[RSP + 0x38] MOV RDI,R13 CALL 0x0017c5ca LEA RDI,[RSP + 0x38] CALL 0x001241c8 LAB_0018f743: MOV RDI,qword ptr [RSP + 0x8] MOV RSI,R13 CALL 0x0018f7ec MOV RDI,RAX MOV RSI,qword ptr [RSP + 0x10] CALL 0x001234e0 LAB_0018f75d: LEA RDI,[RSP + 0x18] CALL 0x001241c8 MOV RAX,R13 ADD RSP,0xb8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* SchemaConverter::_add_rule(std::__cxx11::string const&, std::__cxx11::string const&) */ string * SchemaConverter::_add_rule(string *param_1,string *param_2) { _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> *this; char cVar1; bool bVar2; string *psVar3; string *in_RCX; int iVar4; int1 *local_d0; int8 local_c8; int1 local_c0; int7 uStack_bf; int8 uStack_b8; string local_b0 [32]; __cxx11 local_90 [32]; __cxx11 local_70 [32]; string local_50 [32]; std:: regex_replace<std::__cxx11::regex_traits<char>,char,std::char_traits<char>,std::allocator<char>> ((string *)&local_d0); this = (_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> *)(param_2 + 0x28); /* try { // try from 0018f5b0 to 0018f5bc has its CatchHandler @ 0018f792 */ psVar3 = (string *) std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::find(this,(string *)&local_d0); if (psVar3 != param_2 + 0x30) { /* try { // try from 0018f5c6 to 0018f5d4 has its CatchHandler @ 0018f790 */ psVar3 = (string *) std:: map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::operator[]((map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> *)this,(string *)&local_d0); cVar1 = std::operator==(psVar3,in_RCX); if (cVar1 == '\0') { iVar4 = 0; while( true ) { /* try { // try from 0018f63a to 0018f645 has its CatchHandler @ 0018f7c8 */ std::__cxx11::to_string(local_70,iVar4); /* try { // try from 0018f646 to 0018f655 has its CatchHandler @ 0018f7cd */ std::operator+(local_b0,(string *)&local_d0); /* try { // try from 0018f656 to 0018f662 has its CatchHandler @ 0018f7b9 */ psVar3 = (string *) std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::find(this,local_b0); if (psVar3 == param_2 + 0x30) break; /* try { // try from 0018f66c to 0018f67c has its CatchHandler @ 0018f79b */ std::__cxx11::to_string(local_90,iVar4); /* try { // try from 0018f67d to 0018f694 has its CatchHandler @ 0018f796 */ std::operator+(local_50,(string *)&local_d0); /* try { // try from 0018f695 to 0018f6a1 has its CatchHandler @ 0018f79d */ psVar3 = (string *) std:: map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::operator[]((string *)this); bVar2 = std::operator!=(psVar3,in_RCX); std::__cxx11::string::~string(local_50); std::__cxx11::string::~string((string *)local_90); std::__cxx11::string::~string(local_b0); std::__cxx11::string::~string((string *)local_70); if (!bVar2) goto LAB_0018f719; iVar4 = iVar4 + 1; } std::__cxx11::string::~string(local_b0); std::__cxx11::string::~string((string *)local_70); LAB_0018f719: /* try { // try from 0018f719 to 0018f726 has its CatchHandler @ 0018f786 */ std::__cxx11::to_string((__cxx11 *)local_b0,iVar4); /* try { // try from 0018f727 to 0018f738 has its CatchHandler @ 0018f77c */ std::operator+(param_1,(string *)&local_d0); std::__cxx11::string::~string(local_b0); /* try { // try from 0018f743 to 0018f75c has its CatchHandler @ 0018f788 */ psVar3 = (string *) std:: map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::operator[]((map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> *)this,param_1); std::__cxx11::string::_M_assign(psVar3); goto LAB_0018f75d; } } /* try { // try from 0018f5e6 to 0018f601 has its CatchHandler @ 0018f794 */ psVar3 = (string *) std:: map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::operator[]((map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> *)this,(string *)&local_d0); std::__cxx11::string::_M_assign(psVar3); *(string **)param_1 = param_1 + 0x10; if (local_d0 == &local_c0) { *(ulong *)(param_1 + 0x10) = CONCAT71(uStack_bf,local_c0); *(int8 *)(param_1 + 0x18) = uStack_b8; } else { *(int1 **)param_1 = local_d0; *(ulong *)(param_1 + 0x10) = CONCAT71(uStack_bf,local_c0); } *(int8 *)(param_1 + 8) = local_c8; local_c8 = 0; local_c0 = 0; local_d0 = &local_c0; LAB_0018f75d: std::__cxx11::string::~string((string *)&local_d0); return param_1; }
25,522
bitmap_intersect
eloqsql/mysys/my_bitmap.c
void bitmap_intersect(MY_BITMAP *map, const MY_BITMAP *map2) { my_bitmap_map *to= map->bitmap, *from= map2->bitmap, *end; uint len= no_words_in_map(map), len2 = no_words_in_map(map2); DBUG_ASSERT(map->bitmap); DBUG_ASSERT(map2->bitmap); end= to+MY_MIN(len,len2); while (to < end) *to++ &= *from++; if (len2 <= len) { to[-1]&= ~map2->last_word_mask; /* Clear last not relevant bits */ end+= len-len2; while (to < end) *to++= 0; } }
O0
c
bitmap_intersect: 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 movl 0x1c(%rax), %eax addl $0x1f, %eax shrl $0x5, %eax movl %eax, -0x2c(%rbp) movq -0x10(%rbp), %rax movl 0x1c(%rax), %eax addl $0x1f, %eax shrl $0x5, %eax movl %eax, -0x30(%rbp) jmp 0xee984 jmp 0xee986 jmp 0xee988 movq -0x18(%rbp), %rax movq %rax, -0x38(%rbp) movl -0x2c(%rbp), %eax cmpl -0x30(%rbp), %eax jae 0xee9a0 movl -0x2c(%rbp), %eax movl %eax, -0x3c(%rbp) jmp 0xee9a6 movl -0x30(%rbp), %eax movl %eax, -0x3c(%rbp) movq -0x38(%rbp), %rax movl -0x3c(%rbp), %ecx movl %ecx, %ecx shlq $0x2, %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax cmpq -0x28(%rbp), %rax jae 0xee9ea 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) andl (%rax), %ecx movl %ecx, (%rax) jmp 0xee9ba movl -0x30(%rbp), %eax cmpl -0x2c(%rbp), %eax ja 0xeea40 movq -0x10(%rbp), %rax movl 0x18(%rax), %ecx xorl $-0x1, %ecx movq -0x18(%rbp), %rax andl -0x4(%rax), %ecx movl %ecx, -0x4(%rax) movl -0x2c(%rbp), %ecx subl -0x30(%rbp), %ecx movq -0x28(%rbp), %rax movl %ecx, %ecx shlq $0x2, %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax cmpq -0x28(%rbp), %rax jae 0xeea3e movq -0x18(%rbp), %rax movq %rax, %rcx addq $0x4, %rcx movq %rcx, -0x18(%rbp) movl $0x0, (%rax) jmp 0xeea1d jmp 0xeea40 popq %rbp retq nopw %cs:(%rax,%rax)
bitmap_intersect: 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 eax, [rax+1Ch] add eax, 1Fh shr eax, 5 mov [rbp+var_2C], eax mov rax, [rbp+var_10] mov eax, [rax+1Ch] add eax, 1Fh shr eax, 5 mov [rbp+var_30], eax jmp short $+2 loc_EE984: jmp short $+2 loc_EE986: jmp short $+2 loc_EE988: mov rax, [rbp+var_18] mov [rbp+var_38], rax mov eax, [rbp+var_2C] cmp eax, [rbp+var_30] jnb short loc_EE9A0 mov eax, [rbp+var_2C] mov [rbp+var_3C], eax jmp short loc_EE9A6 loc_EE9A0: mov eax, [rbp+var_30] mov [rbp+var_3C], eax loc_EE9A6: mov rax, [rbp+var_38] mov ecx, [rbp+var_3C] mov ecx, ecx shl rcx, 2 add rax, rcx mov [rbp+var_28], rax loc_EE9BA: mov rax, [rbp+var_18] cmp rax, [rbp+var_28] jnb short loc_EE9EA 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 and ecx, [rax] mov [rax], ecx jmp short loc_EE9BA loc_EE9EA: mov eax, [rbp+var_30] cmp eax, [rbp+var_2C] ja short loc_EEA40 mov rax, [rbp+var_10] mov ecx, [rax+18h] xor ecx, 0FFFFFFFFh mov rax, [rbp+var_18] and ecx, [rax-4] mov [rax-4], ecx mov ecx, [rbp+var_2C] sub ecx, [rbp+var_30] mov rax, [rbp+var_28] mov ecx, ecx shl rcx, 2 add rax, rcx mov [rbp+var_28], rax loc_EEA1D: mov rax, [rbp+var_18] cmp rax, [rbp+var_28] jnb short loc_EEA3E mov rax, [rbp+var_18] mov rcx, rax add rcx, 4 mov [rbp+var_18], rcx mov dword ptr [rax], 0 jmp short loc_EEA1D loc_EEA3E: jmp short $+2 loc_EEA40: pop rbp retn
_DWORD * bitmap_intersect(long long a1, long long a2) { int *v2; // rax int v3; // ecx _DWORD *v4; // rax _DWORD *result; // rax _DWORD *v6; // rax unsigned int v7; // [rsp+0h] [rbp-3Ch] unsigned int v8; // [rsp+Ch] [rbp-30h] unsigned int v9; // [rsp+10h] [rbp-2Ch] unsigned long long v10; // [rsp+14h] [rbp-28h] unsigned long long v11; // [rsp+14h] [rbp-28h] int *v12; // [rsp+1Ch] [rbp-20h] _DWORD *v13; // [rsp+24h] [rbp-18h] v13 = *(_DWORD **)a1; v12 = *(int **)a2; v9 = (unsigned int)(*(_DWORD *)(a1 + 28) + 31) >> 5; v8 = (unsigned int)(*(_DWORD *)(a2 + 28) + 31) >> 5; if ( v9 >= v8 ) v7 = (unsigned int)(*(_DWORD *)(a2 + 28) + 31) >> 5; else v7 = (unsigned int)(*(_DWORD *)(a1 + 28) + 31) >> 5; v10 = 4LL * v7 + *(_QWORD *)a1; while ( (unsigned long long)v13 < v10 ) { v2 = v12++; v3 = *v2; v4 = v13++; *v4 &= v3; } result = (_DWORD *)v8; if ( v8 <= v9 ) { *(v13 - 1) &= ~*(_DWORD *)(a2 + 24); v11 = 4LL * (v9 - v8) + v10; while ( 1 ) { result = v13; if ( (unsigned long long)v13 >= v11 ) break; v6 = v13++; *v6 = 0; } } return result; }
bitmap_intersect: 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 EAX,dword ptr [RAX + 0x1c] ADD EAX,0x1f SHR EAX,0x5 MOV dword ptr [RBP + -0x2c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x1c] ADD EAX,0x1f SHR EAX,0x5 MOV dword ptr [RBP + -0x30],EAX JMP 0x001ee984 LAB_001ee984: JMP 0x001ee986 LAB_001ee986: JMP 0x001ee988 LAB_001ee988: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x38],RAX MOV EAX,dword ptr [RBP + -0x2c] CMP EAX,dword ptr [RBP + -0x30] JNC 0x001ee9a0 MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x3c],EAX JMP 0x001ee9a6 LAB_001ee9a0: MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x3c],EAX LAB_001ee9a6: MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + -0x3c] MOV ECX,ECX SHL RCX,0x2 ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX LAB_001ee9ba: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x28] JNC 0x001ee9ea 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 AND ECX,dword ptr [RAX] MOV dword ptr [RAX],ECX JMP 0x001ee9ba LAB_001ee9ea: MOV EAX,dword ptr [RBP + -0x30] CMP EAX,dword ptr [RBP + -0x2c] JA 0x001eea40 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x18] XOR ECX,0xffffffff MOV RAX,qword ptr [RBP + -0x18] AND ECX,dword ptr [RAX + -0x4] MOV dword ptr [RAX + -0x4],ECX MOV ECX,dword ptr [RBP + -0x2c] SUB ECX,dword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x28] MOV ECX,ECX SHL RCX,0x2 ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX LAB_001eea1d: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x28] JNC 0x001eea3e MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX ADD RCX,0x4 MOV qword ptr [RBP + -0x18],RCX MOV dword ptr [RAX],0x0 JMP 0x001eea1d LAB_001eea3e: JMP 0x001eea40 LAB_001eea40: POP RBP RET
void bitmap_intersect(int8 *param_1,int8 *param_2) { uint uVar1; uint uVar2; uint *puVar3; uint local_44; uint *local_28; uint *local_20; uVar1 = *(int *)((long)param_1 + 0x1c) + 0x1fU >> 5; uVar2 = *(int *)((long)param_2 + 0x1c) + 0x1fU >> 5; local_44 = uVar2; if (uVar1 < uVar2) { local_44 = uVar1; } puVar3 = (uint *)*param_1 + local_44; local_28 = (uint *)*param_2; local_20 = (uint *)*param_1; while (local_20 < puVar3) { *local_20 = *local_28 & *local_20; local_28 = local_28 + 1; local_20 = local_20 + 1; } if (uVar2 <= uVar1) { local_20[-1] = (*(uint *)(param_2 + 3) ^ 0xffffffff) & local_20[-1]; while (local_20 < puVar3 + (uVar1 - uVar2)) { *local_20 = 0; local_20 = local_20 + 1; } } return; }
25,523
OpenSubdiv::v3_6_0::Bfr::FaceTopology::FaceTopology(OpenSubdiv::v3_6_0::Sdc::SchemeType, OpenSubdiv::v3_6_0::Sdc::Options)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/faceTopology.cpp
FaceTopology::FaceTopology(Sdc::SchemeType schemeType, Sdc::Options schemeOptions) : _schemeType(schemeType), _schemeOptions(schemeOptions), _regFaceSize(Sdc::SchemeTypeTraits::GetRegularFaceSize(schemeType)), _isInitialized(false) { }
O3
cpp
OpenSubdiv::v3_6_0::Bfr::FaceTopology::FaceTopology(OpenSubdiv::v3_6_0::Sdc::SchemeType, OpenSubdiv::v3_6_0::Sdc::Options): pushq %rbx movq %rdi, %rbx movl %esi, (%rdi) movl %edx, 0x4(%rdi) movl %esi, %edi callq 0x39350 movl %eax, 0xc(%rbx) andb $-0x2, 0x16(%rbx) leaq 0x28(%rbx), %rax movq %rax, 0x18(%rbx) movabsq $0x400000000, %rax # imm = 0x400000000 movq %rax, 0x20(%rbx) movq $0x0, 0x3a8(%rbx) popq %rbx retq
_ZN10OpenSubdiv6v3_6_03Bfr12FaceTopologyC2ENS0_3Sdc10SchemeTypeENS3_7OptionsE: push rbx; Alternative name is 'OpenSubdiv::v3_6_0::Bfr::FaceTopology::FaceTopology(OpenSubdiv::v3_6_0::Sdc::SchemeType, OpenSubdiv::v3_6_0::Sdc::Options)' mov rbx, rdi mov [rdi], esi mov [rdi+4], edx mov edi, esi call __ZN10OpenSubdiv6v3_6_03Sdc16SchemeTypeTraits18GetRegularFaceSizeENS1_10SchemeTypeE; OpenSubdiv::v3_6_0::Sdc::SchemeTypeTraits::GetRegularFaceSize(OpenSubdiv::v3_6_0::Sdc::SchemeType) mov [rbx+0Ch], eax and byte ptr [rbx+16h], 0FEh lea rax, [rbx+28h] mov [rbx+18h], rax mov rax, 400000000h mov [rbx+20h], rax mov qword ptr [rbx+3A8h], 0 pop rbx retn
long long OpenSubdiv::v3_6_0::Bfr::FaceTopology::FaceTopology(long long a1, unsigned int a2, int a3) { long long result; // rax *(_DWORD *)a1 = a2; *(_DWORD *)(a1 + 4) = a3; *(_DWORD *)(a1 + 12) = OpenSubdiv::v3_6_0::Sdc::SchemeTypeTraits::GetRegularFaceSize(a2); *(_BYTE *)(a1 + 22) &= ~1u; *(_QWORD *)(a1 + 24) = a1 + 40; result = 0x400000000LL; *(_QWORD *)(a1 + 32) = 0x400000000LL; *(_QWORD *)(a1 + 936) = 0LL; return result; }
FaceTopology: PUSH RBX MOV RBX,RDI MOV dword ptr [RDI],ESI MOV dword ptr [RDI + 0x4],EDX MOV EDI,ESI CALL 0x00139350 MOV dword ptr [RBX + 0xc],EAX AND byte ptr [RBX + 0x16],0xfe LEA RAX,[RBX + 0x28] MOV qword ptr [RBX + 0x18],RAX MOV RAX,0x400000000 MOV qword ptr [RBX + 0x20],RAX MOV qword ptr [RBX + 0x3a8],0x0 POP RBX RET
/* OpenSubdiv::v3_6_0::Bfr::FaceTopology::FaceTopology(OpenSubdiv::v3_6_0::Sdc::SchemeType, OpenSubdiv::v3_6_0::Sdc::Options) */ void __thiscall OpenSubdiv::v3_6_0::Bfr::FaceTopology::FaceTopology (FaceTopology *this,int4 param_2,int4 param_3) { int4 uVar1; *(int4 *)this = param_2; *(int4 *)(this + 4) = param_3; uVar1 = Sdc::SchemeTypeTraits::GetRegularFaceSize(param_2); *(int4 *)(this + 0xc) = uVar1; this[0x16] = (FaceTopology)((byte)this[0x16] & 0xfe); *(FaceTopology **)(this + 0x18) = this + 0x28; *(int8 *)(this + 0x20) = 0x400000000; *(int8 *)(this + 0x3a8) = 0; return; }
25,524
flux::parser::WhileStmt::clone() const
kvthweatt[P]FluxLang/src/parser/ast.cpp
std::unique_ptr<Stmt> WhileStmt::clone() const { return std::make_unique<WhileStmt>(condition->clone(), body->clone(), range); }
O1
cpp
flux::parser::WhileStmt::clone() const: pushq %r14 pushq %rbx subq $0x18, %rsp movq %rsi, %r14 movq %rdi, %rbx movq 0x28(%rsi), %rsi movq (%rsi), %rax leaq 0x10(%rsp), %rdi callq *0x18(%rax) movq 0x30(%r14), %rsi movq (%rsi), %rax leaq 0x8(%rsp), %rdi callq *0x18(%rax) movl $0x38, %edi callq 0x6270 movq 0x10(%rsp), %rcx xorl %edx, %edx movq %rdx, 0x10(%rsp) movq 0x8(%rsp), %rsi movq %rdx, 0x8(%rsp) leaq 0x2c8aa(%rip), %rdx # 0x3acb0 movq %rdx, (%rax) movups 0x8(%r14), %xmm0 movups 0x18(%r14), %xmm1 movups %xmm0, 0x8(%rax) movups %xmm1, 0x18(%rax) leaq 0x2c026(%rip), %rdx # 0x3a448 movq %rdx, (%rax) movq %rcx, 0x28(%rax) movq %rsi, 0x30(%rax) movq %rax, (%rbx) movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0xe440 movq (%rdi), %rax callq *0x8(%rax) movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0xe450 movq (%rdi), %rax callq *0x8(%rax) movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r14 retq movq %rax, %rbx movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0xe46e movq (%rdi), %rax callq *0x8(%rax) movq $0x0, 0x8(%rsp) jmp 0xe47c movq %rax, %rbx movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0xe48c movq (%rdi), %rax callq *0x8(%rax) movq %rbx, %rdi callq 0x6440
_ZNK4flux6parser9WhileStmt5cloneEv: push r14 push rbx sub rsp, 18h mov r14, rsi mov rbx, rdi mov rsi, [rsi+28h] mov rax, [rsi] lea rdi, [rsp+28h+var_18] call qword ptr [rax+18h] mov rsi, [r14+30h] mov rax, [rsi] lea rdi, [rsp+28h+var_20] call qword ptr [rax+18h] mov edi, 38h ; '8'; unsigned __int64 call __Znwm; operator new(ulong) mov rcx, [rsp+28h+var_18] xor edx, edx mov [rsp+28h+var_18], rdx mov rsi, [rsp+28h+var_20] mov [rsp+28h+var_20], rdx lea rdx, off_3ACB0 mov [rax], rdx movups xmm0, xmmword ptr [r14+8] movups xmm1, xmmword ptr [r14+18h] movups xmmword ptr [rax+8], xmm0 movups xmmword ptr [rax+18h], xmm1 lea rdx, off_3A448 mov [rax], rdx mov [rax+28h], rcx mov [rax+30h], rsi mov [rbx], rax mov rdi, [rsp+28h+var_20] test rdi, rdi jz short loc_E440 mov rax, [rdi] call qword ptr [rax+8] loc_E440: mov rdi, [rsp+28h+var_18] test rdi, rdi jz short loc_E450 mov rax, [rdi] call qword ptr [rax+8] loc_E450: mov rax, rbx add rsp, 18h pop rbx pop r14 retn mov rbx, rax mov rdi, [rsp+arg_0] test rdi, rdi jz short loc_E46E mov rax, [rdi] call qword ptr [rax+8] loc_E46E: mov [rsp+arg_0], 0 jmp short loc_E47C mov rbx, rax loc_E47C: mov rdi, [rsp+arg_8] test rdi, rdi jz short loc_E48C mov rax, [rdi] call qword ptr [rax+8] loc_E48C: mov rdi, rbx call __Unwind_Resume
flux::parser::WhileStmt * flux::parser::WhileStmt::clone(flux::parser::WhileStmt *this, long long a2) { long long v3; // rax long long v4; // rcx long long v5; // rsi __int128 v6; // xmm1 long long v8; // [rsp+8h] [rbp-20h] BYREF _QWORD v9[3]; // [rsp+10h] [rbp-18h] BYREF (*(void ( **)(_QWORD *))(**(_QWORD **)(a2 + 40) + 24LL))(v9); (*(void ( **)(long long *))(**(_QWORD **)(a2 + 48) + 24LL))(&v8); v3 = operator new(0x38uLL); v4 = v9[0]; v9[0] = 0LL; v5 = v8; v8 = 0LL; *(_QWORD *)v3 = &off_3ACB0; v6 = *(_OWORD *)(a2 + 24); *(_OWORD *)(v3 + 8) = *(_OWORD *)(a2 + 8); *(_OWORD *)(v3 + 24) = v6; *(_QWORD *)v3 = off_3A448; *(_QWORD *)(v3 + 40) = v4; *(_QWORD *)(v3 + 48) = v5; *(_QWORD *)this = v3; if ( v8 ) (*(void ( **)(long long))(*(_QWORD *)v8 + 8LL))(v8); if ( v9[0] ) (*(void ( **)(_QWORD))(*(_QWORD *)v9[0] + 8LL))(v9[0]); return this; }
clone: PUSH R14 PUSH RBX SUB RSP,0x18 MOV R14,RSI MOV RBX,RDI MOV RSI,qword ptr [RSI + 0x28] MOV RAX,qword ptr [RSI] LEA RDI,[RSP + 0x10] CALL qword ptr [RAX + 0x18] MOV RSI,qword ptr [R14 + 0x30] MOV RAX,qword ptr [RSI] LAB_0010e3d7: LEA RDI,[RSP + 0x8] CALL qword ptr [RAX + 0x18] LAB_0010e3df: MOV EDI,0x38 CALL 0x00106270 LAB_0010e3e9: MOV RCX,qword ptr [RSP + 0x10] XOR EDX,EDX MOV qword ptr [RSP + 0x10],RDX MOV RSI,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x8],RDX LEA RDX,[0x13acb0] MOV qword ptr [RAX],RDX MOVUPS XMM0,xmmword ptr [R14 + 0x8] MOVUPS XMM1,xmmword ptr [R14 + 0x18] MOVUPS xmmword ptr [RAX + 0x8],XMM0 MOVUPS xmmword ptr [RAX + 0x18],XMM1 LEA RDX,[0x13a448] MOV qword ptr [RAX],RDX MOV qword ptr [RAX + 0x28],RCX MOV qword ptr [RAX + 0x30],RSI MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x0010e440 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0010e440: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x0010e450 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0010e450: MOV RAX,RBX ADD RSP,0x18 POP RBX POP R14 RET
/* WARNING: Removing unreachable block (ram,0x0010e43a) */ /* WARNING: Removing unreachable block (ram,0x0010e44a) */ /* flux::parser::WhileStmt::clone() const */ void flux::parser::WhileStmt::clone(void) { int4 uVar1; int4 uVar2; int4 uVar3; int4 uVar4; int4 uVar5; int4 uVar6; int4 uVar7; int8 *puVar8; long in_RSI; int8 *in_RDI; int8 local_20; int8 local_18; (**(code **)(**(long **)(in_RSI + 0x28) + 0x18))(&local_18); /* try { // try from 0010e3d7 to 0010e3de has its CatchHandler @ 0010e479 */ (**(code **)(**(long **)(in_RSI + 0x30) + 0x18))(&local_20); /* try { // try from 0010e3df to 0010e3e8 has its CatchHandler @ 0010e45b */ puVar8 = (int8 *)operator_new(0x38); *puVar8 = &PTR__Stmt_0013acb0; uVar1 = *(int4 *)(in_RSI + 0xc); uVar2 = *(int4 *)(in_RSI + 0x10); uVar3 = *(int4 *)(in_RSI + 0x14); uVar4 = *(int4 *)(in_RSI + 0x18); uVar5 = *(int4 *)(in_RSI + 0x1c); uVar6 = *(int4 *)(in_RSI + 0x20); uVar7 = *(int4 *)(in_RSI + 0x24); *(int4 *)(puVar8 + 1) = *(int4 *)(in_RSI + 8); *(int4 *)((long)puVar8 + 0xc) = uVar1; *(int4 *)(puVar8 + 2) = uVar2; *(int4 *)((long)puVar8 + 0x14) = uVar3; *(int4 *)(puVar8 + 3) = uVar4; *(int4 *)((long)puVar8 + 0x1c) = uVar5; *(int4 *)(puVar8 + 4) = uVar6; *(int4 *)((long)puVar8 + 0x24) = uVar7; *puVar8 = &PTR__WhileStmt_0013a448; puVar8[5] = local_18; puVar8[6] = local_20; *in_RDI = puVar8; return; }
25,525
flux::parser::WhileStmt::clone() const
kvthweatt[P]FluxLang/src/parser/ast.cpp
std::unique_ptr<Stmt> WhileStmt::clone() const { return std::make_unique<WhileStmt>(condition->clone(), body->clone(), range); }
O2
cpp
flux::parser::WhileStmt::clone() const: pushq %r14 pushq %rbx subq $0x18, %rsp movq %rsi, %r14 movq %rdi, %rbx movq 0x28(%rsi), %rsi movq (%rsi), %rax leaq 0x8(%rsp), %rdi callq *0x18(%rax) movq 0x30(%r14), %rsi movq (%rsi), %rax movq %rsp, %rdi callq *0x18(%rax) addq $0x8, %r14 leaq 0x10(%rsp), %rdi leaq 0x8(%rsp), %rsi movq %rsp, %rdx movq %r14, %rcx callq 0xe3ed movq 0x10(%rsp), %rax andq $0x0, 0x10(%rsp) movq %rax, (%rbx) movq (%rsp), %rdi testq %rdi, %rdi je 0xc44f movq (%rdi), %rax callq *0x8(%rax) movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0xc45f movq (%rdi), %rax callq *0x8(%rax) movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r14 retq movq %rax, %rbx movq (%rsp), %rdi testq %rdi, %rdi je 0xc481 movq (%rdi), %rax callq *0x8(%rax) jmp 0xc481 movq %rax, %rbx movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0xc491 movq (%rdi), %rax callq *0x8(%rax) movq %rbx, %rdi callq 0x63e0 nop
_ZNK4flux6parser9WhileStmt5cloneEv: push r14 push rbx sub rsp, 18h mov r14, rsi mov rbx, rdi mov rsi, [rsi+28h] mov rax, [rsi] lea rdi, [rsp+28h+var_20] call qword ptr [rax+18h] mov rsi, [r14+30h] mov rax, [rsi] mov rdi, rsp call qword ptr [rax+18h] add r14, 8 lea rdi, [rsp+28h+var_18] lea rsi, [rsp+28h+var_20] mov rdx, rsp mov rcx, r14 call _ZSt11make_uniqueIN4flux6parser9WhileStmtEJSt10unique_ptrINS1_4ExprESt14default_deleteIS4_EES3_INS1_4StmtES5_IS8_EERKNS0_6common11SourceRangeEEENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<flux::parser::WhileStmt,std::unique_ptr<flux::parser::Expr>,std::unique_ptr<flux::parser::Stmt>,flux::common::SourceRange const&>(std::unique_ptr<flux::parser::Expr>,std::unique_ptr<flux::parser::Stmt>,flux::common::SourceRange const&) mov rax, [rsp+28h+var_18] and [rsp+28h+var_18], 0 mov [rbx], rax mov rdi, [rsp+28h+var_28] test rdi, rdi jz short loc_C44F mov rax, [rdi] call qword ptr [rax+8] loc_C44F: mov rdi, [rsp+28h+var_20] test rdi, rdi jz short loc_C45F mov rax, [rdi] call qword ptr [rax+8] loc_C45F: mov rax, rbx add rsp, 18h pop rbx pop r14 retn mov rbx, rax mov rdi, [rsp+0] test rdi, rdi jz short loc_C481 mov rax, [rdi] call qword ptr [rax+8] jmp short loc_C481 mov rbx, rax loc_C481: mov rdi, [rsp+arg_0] test rdi, rdi jz short loc_C491 mov rax, [rdi] call qword ptr [rax+8] loc_C491: mov rdi, rbx call __Unwind_Resume
flux::parser::WhileStmt * flux::parser::WhileStmt::clone(flux::parser::WhileStmt *this, long long a2) { long long v2; // rax long long v4; // [rsp+0h] [rbp-28h] BYREF long long v5; // [rsp+8h] [rbp-20h] BYREF _QWORD v6[3]; // [rsp+10h] [rbp-18h] BYREF (*(void ( **)(long long *))(**(_QWORD **)(a2 + 40) + 24LL))(&v5); (*(void ( **)(long long *))(**(_QWORD **)(a2 + 48) + 24LL))(&v4); std::make_unique<flux::parser::WhileStmt,std::unique_ptr<flux::parser::Expr>,std::unique_ptr<flux::parser::Stmt>,flux::common::SourceRange const&>( v6, &v5, &v4, a2 + 8); v2 = v6[0]; v6[0] = 0LL; *(_QWORD *)this = v2; if ( v4 ) (*(void ( **)(long long))(*(_QWORD *)v4 + 8LL))(v4); if ( v5 ) (*(void ( **)(long long))(*(_QWORD *)v5 + 8LL))(v5); return this; }
clone: PUSH R14 PUSH RBX SUB RSP,0x18 MOV R14,RSI MOV RBX,RDI MOV RSI,qword ptr [RSI + 0x28] MOV RAX,qword ptr [RSI] LEA RDI,[RSP + 0x8] CALL qword ptr [RAX + 0x18] MOV RSI,qword ptr [R14 + 0x30] MOV RAX,qword ptr [RSI] LAB_0010c413: MOV RDI,RSP CALL qword ptr [RAX + 0x18] ADD R14,0x8 LAB_0010c41d: LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x8] MOV RDX,RSP MOV RCX,R14 CALL 0x0010e3ed LAB_0010c432: MOV RAX,qword ptr [RSP + 0x10] AND qword ptr [RSP + 0x10],0x0 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RSP] TEST RDI,RDI JZ 0x0010c44f MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0010c44f: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x0010c45f MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0010c45f: MOV RAX,RBX ADD RSP,0x18 POP RBX POP R14 RET
/* flux::parser::WhileStmt::clone() const */ void flux::parser::WhileStmt::clone(void) { int8 uVar1; long in_RSI; int8 *in_RDI; long *local_28; long *local_20; int8 local_18; (**(code **)(**(long **)(in_RSI + 0x28) + 0x18))(&local_20); /* try { // try from 0010c413 to 0010c418 has its CatchHandler @ 0010c47e */ (**(code **)(**(long **)(in_RSI + 0x30) + 0x18))(&local_28); /* try { // try from 0010c41d to 0010c431 has its CatchHandler @ 0010c46a */ std:: make_unique<flux::parser::WhileStmt,std::unique_ptr<flux::parser::Expr,std::default_delete<flux::parser::Expr>>,std::unique_ptr<flux::parser::Stmt,std::default_delete<flux::parser::Stmt>>,flux::common::SourceRange_const&> ((unique_ptr *)&local_18,(unique_ptr *)&local_20,(SourceRange *)&local_28); uVar1 = local_18; local_18 = 0; *in_RDI = uVar1; if (local_28 != (long *)0x0) { (**(code **)(*local_28 + 8))(); } if (local_20 != (long *)0x0) { (**(code **)(*local_20 + 8))(); } return; }
25,526
alloc_root
eloqsql/mysys/my_alloc.c
void *alloc_root(MEM_ROOT *mem_root, size_t length) { #if defined(HAVE_valgrind) && defined(EXTRA_DEBUG) reg1 USED_MEM *next; DBUG_ENTER("alloc_root"); DBUG_PRINT("enter",("root: %p", mem_root)); DBUG_ASSERT(alloc_root_inited(mem_root)); DBUG_EXECUTE_IF("simulate_out_of_memory", { if (mem_root->error_handler) (*mem_root->error_handler)(); DBUG_SET("-d,simulate_out_of_memory"); DBUG_RETURN((void*) 0); /* purecov: inspected */ }); length+=ALIGN_SIZE(sizeof(USED_MEM)); if (!(next = (USED_MEM*) my_malloc(mem_root->m_psi_key, length, MYF(MY_WME | ME_FATAL | MALLOC_FLAG(mem_root->block_size))))) { if (mem_root->error_handler) (*mem_root->error_handler)(); DBUG_RETURN((uchar*) 0); /* purecov: inspected */ } next->next= mem_root->used; next->left= 0; next->size= length; mem_root->used= next; DBUG_PRINT("exit",("ptr: %p", (((char*)next)+ALIGN_SIZE(sizeof(USED_MEM))))); DBUG_RETURN((((uchar*) next)+ALIGN_SIZE(sizeof(USED_MEM)))); #else size_t get_size, block_size; uchar* point; reg1 USED_MEM *next= 0; reg2 USED_MEM **prev; size_t original_length __attribute__((unused)) = length; DBUG_ENTER("alloc_root"); DBUG_PRINT("enter",("root: %p", mem_root)); DBUG_ASSERT(alloc_root_inited(mem_root)); DBUG_EXECUTE_IF("simulate_out_of_memory", { /* Avoid reusing an already allocated block */ if (mem_root->error_handler) (*mem_root->error_handler)(); DBUG_SET("-d,simulate_out_of_memory"); DBUG_RETURN((void*) 0); /* purecov: inspected */ }); length= ALIGN_SIZE(length) + REDZONE_SIZE; if ((*(prev= &mem_root->free)) != NULL) { if ((*prev)->left < length && mem_root->first_block_usage++ >= ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP && (*prev)->left < ALLOC_MAX_BLOCK_TO_DROP) { next= *prev; *prev= next->next; /* Remove block from list */ next->next= mem_root->used; mem_root->used= next; mem_root->first_block_usage= 0; } for (next= *prev ; next && next->left < length ; next= next->next) prev= &next->next; } if (! next) { /* Time to alloc new block */ block_size= (mem_root->block_size & ~1) * (mem_root->block_num >> 2); get_size= length+ALIGN_SIZE(sizeof(USED_MEM)); get_size= MY_MAX(get_size, block_size); if (!(next = (USED_MEM*) my_malloc(mem_root->m_psi_key, get_size, MYF(MY_WME | ME_FATAL | MALLOC_FLAG(mem_root-> block_size))))) { if (mem_root->error_handler) (*mem_root->error_handler)(); DBUG_RETURN((void*) 0); /* purecov: inspected */ } mem_root->block_num++; next->next= *prev; next->size= get_size; next->left= get_size-ALIGN_SIZE(sizeof(USED_MEM)); *prev=next; TRASH_MEM(next); } point= (uchar*) ((char*) next+ (next->size-next->left)); /*TODO: next part may be unneded due to mem_root->first_block_usage counter*/ if ((next->left-= length) < mem_root->min_malloc) { /* Full block */ *prev= next->next; /* Remove block from list */ next->next= mem_root->used; mem_root->used= next; mem_root->first_block_usage= 0; } point+= REDZONE_SIZE; TRASH_ALLOC(point, original_length); DBUG_PRINT("exit",("ptr: %p", point)); DBUG_RETURN((void*) point); #endif }
O3
c
alloc_root: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx addq $0x7, %r14 andq $-0x8, %r14 movq (%rdi), %rax movq %rdi, %r12 testq %rax, %rax je 0x9cce6 cmpq %r14, 0x8(%rax) jae 0x9cccd movl 0x2c(%rbx), %ecx leal 0x1(%rcx), %edx movl %edx, 0x2c(%rbx) cmpl $0xa, %ecx jb 0x9cccd cmpq $0xfff, 0x8(%rax) # imm = 0xFFF ja 0x9cccd movq (%rax), %rcx movq %rcx, (%rbx) movq 0x8(%rbx), %rcx movq %rcx, (%rax) movq %rax, 0x8(%rbx) movl $0x0, 0x2c(%rbx) movq %rbx, %rax movq %rax, %r12 movq (%rax), %rax testq %rax, %rax je 0x9cce6 movq 0x8(%rax), %rdx cmpq %r14, %rdx jb 0x9ccd0 jmp 0x9cd43 movq 0x20(%rbx), %rdx movq %rdx, %rax andq $-0x2, %rax movl 0x28(%rbx), %r15d shrl $0x2, %r15d imulq %rax, %r15 leaq 0x18(%r14), %rax cmpq %r15, %rax cmovaq %rax, %r15 movl 0x38(%rbx), %edi andl $0x1, %edx shll $0x10, %edx orq $0x1010, %rdx # imm = 0x1010 movq %r15, %rsi callq 0x9fd89 testq %rax, %rax je 0x9cd75 incl 0x28(%rbx) movq (%r12), %rcx movq %rcx, (%rax) movq %r15, 0x10(%rax) addq $-0x18, %r15 movq %r15, 0x8(%rax) movq %rax, (%r12) movq 0x8(%rax), %rdx movq 0x10(%rax), %rcx subq %rdx, %rcx addq %rax, %rcx subq %r14, %rdx movq %rdx, 0x8(%rax) cmpq 0x18(%rbx), %rdx jae 0x9cd82 movq (%rax), %rdx movq %rdx, (%r12) movq 0x8(%rbx), %rdx movq %rdx, (%rax) movq %rax, 0x8(%rbx) movl $0x0, 0x2c(%rbx) jmp 0x9cd82 movq 0x30(%rbx), %rax testq %rax, %rax je 0x9cd80 callq *%rax xorl %ecx, %ecx movq %rcx, %rax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
alloc_root: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov r14, rsi mov rbx, rdi add r14, 7 and r14, 0FFFFFFFFFFFFFFF8h mov rax, [rdi] mov r12, rdi test rax, rax jz short loc_9CCE6 cmp [rax+8], r14 jnb short loc_9CCCD mov ecx, [rbx+2Ch] lea edx, [rcx+1] mov [rbx+2Ch], edx cmp ecx, 0Ah jb short loc_9CCCD cmp qword ptr [rax+8], 0FFFh ja short loc_9CCCD mov rcx, [rax] mov [rbx], rcx mov rcx, [rbx+8] mov [rax], rcx mov [rbx+8], rax mov dword ptr [rbx+2Ch], 0 loc_9CCCD: mov rax, rbx loc_9CCD0: mov r12, rax mov rax, [rax] test rax, rax jz short loc_9CCE6 mov rdx, [rax+8] cmp rdx, r14 jb short loc_9CCD0 jmp short loc_9CD43 loc_9CCE6: mov rdx, [rbx+20h] mov rax, rdx and rax, 0FFFFFFFFFFFFFFFEh mov r15d, [rbx+28h] shr r15d, 2 imul r15, rax lea rax, [r14+18h] cmp rax, r15 cmova r15, rax mov edi, [rbx+38h] and edx, 1 shl edx, 10h or rdx, 1010h mov rsi, r15 call my_malloc test rax, rax jz short loc_9CD75 inc dword ptr [rbx+28h] mov rcx, [r12] mov [rax], rcx mov [rax+10h], r15 add r15, 0FFFFFFFFFFFFFFE8h mov [rax+8], r15 mov [r12], rax mov rdx, [rax+8] loc_9CD43: mov rcx, [rax+10h] sub rcx, rdx add rcx, rax sub rdx, r14 mov [rax+8], rdx cmp rdx, [rbx+18h] jnb short loc_9CD82 mov rdx, [rax] mov [r12], rdx mov rdx, [rbx+8] mov [rax], rdx mov [rbx+8], rax mov dword ptr [rbx+2Ch], 0 jmp short loc_9CD82 loc_9CD75: mov rax, [rbx+30h] test rax, rax jz short loc_9CD80 call rax loc_9CD80: xor ecx, ecx loc_9CD82: mov rax, rcx pop rbx pop r12 pop r14 pop r15 pop rbp retn
char * alloc_root(long long a1, long long a2) { unsigned long long v2; // r14 _QWORD *v3; // rax _QWORD *v4; // r12 unsigned int v5; // ecx _QWORD *v6; // rax unsigned long long v7; // rdx long long v8; // rdx unsigned long long v9; // r15 char *v10; // rcx unsigned long long v11; // rdx void (*v12)(void); // rax v2 = (a2 + 7) & 0xFFFFFFFFFFFFFFF8LL; v3 = *(_QWORD **)a1; v4 = (_QWORD *)a1; if ( *(_QWORD *)a1 ) { if ( v3[1] < v2 ) { v5 = *(_DWORD *)(a1 + 44); *(_DWORD *)(a1 + 44) = v5 + 1; if ( v5 >= 0xA && v3[1] <= 0xFFFuLL ) { *(_QWORD *)a1 = *v3; *v3 = *(_QWORD *)(a1 + 8); *(_QWORD *)(a1 + 8) = v3; *(_DWORD *)(a1 + 44) = 0; } } v6 = (_QWORD *)a1; while ( 1 ) { v4 = v6; v6 = (_QWORD *)*v6; if ( !v6 ) break; v7 = v6[1]; if ( v7 >= v2 ) goto LABEL_14; } } v8 = *(_QWORD *)(a1 + 32); v9 = (v8 & 0xFFFFFFFFFFFFFFFELL) * (*(_DWORD *)(a1 + 40) >> 2); if ( v2 + 24 > v9 ) v9 = v2 + 24; v6 = (_QWORD *)my_malloc(*(unsigned int *)(a1 + 56), v9, ((unsigned __int8)(v8 & 1) << 16) | 0x1010LL); if ( v6 ) { ++*(_DWORD *)(a1 + 40); *v6 = *v4; v6[2] = v9; v6[1] = v9 - 24; *v4 = v6; v7 = v6[1]; LABEL_14: v10 = (char *)v6 + v6[2] - v7; v11 = v7 - v2; v6[1] = v11; if ( v11 < *(_QWORD *)(a1 + 24) ) { *v4 = *v6; *v6 = *(_QWORD *)(a1 + 8); *(_QWORD *)(a1 + 8) = v6; *(_DWORD *)(a1 + 44) = 0; } } else { v12 = *(void (**)(void))(a1 + 48); if ( v12 ) v12(); return 0LL; } return v10; }
alloc_root: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R14,RSI MOV RBX,RDI ADD R14,0x7 AND R14,-0x8 MOV RAX,qword ptr [RDI] MOV R12,RDI TEST RAX,RAX JZ 0x0019cce6 CMP qword ptr [RAX + 0x8],R14 JNC 0x0019cccd MOV ECX,dword ptr [RBX + 0x2c] LEA EDX,[RCX + 0x1] MOV dword ptr [RBX + 0x2c],EDX CMP ECX,0xa JC 0x0019cccd CMP qword ptr [RAX + 0x8],0xfff JA 0x0019cccd MOV RCX,qword ptr [RAX] MOV qword ptr [RBX],RCX MOV RCX,qword ptr [RBX + 0x8] MOV qword ptr [RAX],RCX MOV qword ptr [RBX + 0x8],RAX MOV dword ptr [RBX + 0x2c],0x0 LAB_0019cccd: MOV RAX,RBX LAB_0019ccd0: MOV R12,RAX MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x0019cce6 MOV RDX,qword ptr [RAX + 0x8] CMP RDX,R14 JC 0x0019ccd0 JMP 0x0019cd43 LAB_0019cce6: MOV RDX,qword ptr [RBX + 0x20] MOV RAX,RDX AND RAX,-0x2 MOV R15D,dword ptr [RBX + 0x28] SHR R15D,0x2 IMUL R15,RAX LEA RAX,[R14 + 0x18] CMP RAX,R15 CMOVA R15,RAX MOV EDI,dword ptr [RBX + 0x38] AND EDX,0x1 SHL EDX,0x10 OR RDX,0x1010 MOV RSI,R15 CALL 0x0019fd89 TEST RAX,RAX JZ 0x0019cd75 INC dword ptr [RBX + 0x28] MOV RCX,qword ptr [R12] MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x10],R15 ADD R15,-0x18 MOV qword ptr [RAX + 0x8],R15 MOV qword ptr [R12],RAX MOV RDX,qword ptr [RAX + 0x8] LAB_0019cd43: MOV RCX,qword ptr [RAX + 0x10] SUB RCX,RDX ADD RCX,RAX SUB RDX,R14 MOV qword ptr [RAX + 0x8],RDX CMP RDX,qword ptr [RBX + 0x18] JNC 0x0019cd82 MOV RDX,qword ptr [RAX] MOV qword ptr [R12],RDX MOV RDX,qword ptr [RBX + 0x8] MOV qword ptr [RAX],RDX MOV qword ptr [RBX + 0x8],RAX MOV dword ptr [RBX + 0x2c],0x0 JMP 0x0019cd82 LAB_0019cd75: MOV RAX,qword ptr [RBX + 0x30] TEST RAX,RAX JZ 0x0019cd80 CALL RAX LAB_0019cd80: XOR ECX,ECX LAB_0019cd82: MOV RAX,RCX POP RBX POP R12 POP R14 POP R15 POP RBP RET
long alloc_root(long *param_1,long param_2) { uint uVar1; long *plVar2; long lVar3; long *plVar4; long *plVar5; ulong uVar6; ulong uVar7; uVar6 = param_2 + 7U & 0xfffffffffffffff8; plVar2 = (long *)*param_1; plVar5 = param_1; if (plVar2 == (long *)0x0) { LAB_0019cce6: uVar7 = (ulong)(*(uint *)(param_1 + 5) >> 2) * (param_1[4] & 0xfffffffffffffffeU); if (uVar7 < uVar6 + 0x18) { uVar7 = uVar6 + 0x18; } plVar4 = (long *)my_malloc((int)param_1[7],uVar7,((uint)param_1[4] & 1) << 0x10 | 0x1010); if (plVar4 == (long *)0x0) { if ((code *)param_1[6] != (code *)0x0) { (*(code *)param_1[6])(); } return 0; } *(int *)(param_1 + 5) = (int)param_1[5] + 1; *plVar4 = *plVar5; plVar4[2] = uVar7; plVar4[1] = uVar7 - 0x18; *plVar5 = (long)plVar4; uVar7 = plVar4[1]; } else { plVar4 = param_1; if ((((ulong)plVar2[1] < uVar6) && (uVar1 = *(uint *)((long)param_1 + 0x2c), *(uint *)((long)param_1 + 0x2c) = uVar1 + 1, 9 < uVar1)) && ((ulong)plVar2[1] < 0x1000)) { *param_1 = *plVar2; *plVar2 = param_1[1]; param_1[1] = (long)plVar2; *(int4 *)((long)param_1 + 0x2c) = 0; } do { plVar5 = plVar4; plVar4 = (long *)*plVar5; if (plVar4 == (long *)0x0) goto LAB_0019cce6; uVar7 = plVar4[1]; } while (uVar7 < uVar6); } lVar3 = plVar4[2]; plVar4[1] = uVar7 - uVar6; if (uVar7 - uVar6 < (ulong)param_1[3]) { *plVar5 = *plVar4; *plVar4 = param_1[1]; param_1[1] = (long)plVar4; *(int4 *)((long)param_1 + 0x2c) = 0; } return (lVar3 - uVar7) + (long)plVar4; }
25,527
js_worker_ctor_internal
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_worker_ctor_internal(JSContext *ctx, JSValue new_target, JSWorkerMessagePipe *recv_pipe, JSWorkerMessagePipe *send_pipe) { JSRuntime *rt = JS_GetRuntime(ctx); JSThreadState *ts = js_get_thread_state(rt); JSValue obj = JS_UNDEFINED, proto; JSWorkerData *s; /* create the object */ if (JS_IsUndefined(new_target)) { proto = JS_GetClassProto(ctx, ts->worker_class_id); } else { proto = JS_GetPropertyStr(ctx, new_target, "prototype"); if (JS_IsException(proto)) goto fail; } obj = JS_NewObjectProtoClass(ctx, proto, ts->worker_class_id); JS_FreeValue(ctx, proto); if (JS_IsException(obj)) goto fail; s = js_mallocz(ctx, sizeof(*s)); if (!s) goto fail; s->recv_pipe = js_dup_message_pipe(recv_pipe); s->send_pipe = js_dup_message_pipe(send_pipe); JS_SetOpaque(obj, s); return obj; fail: JS_FreeValue(ctx, obj); return JS_EXCEPTION; }
O0
c
js_worker_ctor_internal: subq $0xa8, %rsp movq %rsi, 0x88(%rsp) movq %rdx, 0x90(%rsp) movq %rdi, 0x80(%rsp) movq %rcx, 0x78(%rsp) movq %r8, 0x70(%rsp) movq 0x80(%rsp), %rdi callq 0x26c40 movq %rax, 0x68(%rsp) movq 0x68(%rsp), %rdi callq 0x10310 movq %rax, 0x60(%rsp) movq 0xf30d7(%rip), %rax # 0x108b88 movq %rax, 0x50(%rsp) movq 0xf30d3(%rip), %rax # 0x108b90 movq %rax, 0x58(%rsp) movq 0x88(%rsp), %rdi movq 0x90(%rsp), %rsi callq 0x10670 cmpl $0x0, %eax je 0x15b11 movq 0x80(%rsp), %rdi movq 0x60(%rsp), %rax movl 0x7c(%rax), %esi callq 0x267e0 movq %rax, 0x28(%rsp) movq %rdx, 0x30(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x48(%rsp) jmp 0x15b6e movq 0x80(%rsp), %rdi movq 0x88(%rsp), %rsi movq 0x90(%rsp), %rdx leaq 0xf6d72(%rip), %rcx # 0x10c8a2 callq 0x30bc0 movq %rax, 0x18(%rsp) movq %rdx, 0x20(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x48(%rsp) movq 0x40(%rsp), %rdi movq 0x48(%rsp), %rsi callq 0xf0d0 cmpl $0x0, %eax je 0x15b6c jmp 0x15c54 jmp 0x15b6e movq 0x80(%rsp), %rdi movq 0x60(%rsp), %rax movl 0x7c(%rax), %ecx movq 0x40(%rsp), %rsi movq 0x48(%rsp), %rdx callq 0x28be0 movq %rax, 0x8(%rsp) movq %rdx, 0x10(%rsp) movq 0x8(%rsp), %rax movq %rax, 0x50(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x58(%rsp) movq 0x80(%rsp), %rdi movq 0x40(%rsp), %rsi movq 0x48(%rsp), %rdx callq 0x229d0 movq 0x50(%rsp), %rdi movq 0x58(%rsp), %rsi callq 0xf0d0 cmpl $0x0, %eax je 0x15bd8 jmp 0x15c54 movq 0x80(%rsp), %rdi movl $0x18, %esi callq 0x20a70 movq %rax, 0x38(%rsp) cmpq $0x0, 0x38(%rsp) jne 0x15bf9 jmp 0x15c54 movq 0x78(%rsp), %rdi callq 0x164e0 movq %rax, %rcx movq 0x38(%rsp), %rax movq %rcx, (%rax) movq 0x70(%rsp), %rdi callq 0x164e0 movq %rax, %rcx movq 0x38(%rsp), %rax movq %rcx, 0x8(%rax) movq 0x38(%rsp), %rdx movq 0x50(%rsp), %rdi movq 0x58(%rsp), %rsi callq 0x37030 movq 0x50(%rsp), %rax movq %rax, 0x98(%rsp) movq 0x58(%rsp), %rax movq %rax, 0xa0(%rsp) jmp 0x15c82 movq 0x80(%rsp), %rdi movq 0x50(%rsp), %rsi movq 0x58(%rsp), %rdx callq 0x229d0 movl $0x0, 0x98(%rsp) movq $0x6, 0xa0(%rsp) movq 0x98(%rsp), %rax movq 0xa0(%rsp), %rdx addq $0xa8, %rsp retq nopw (%rax,%rax)
js_worker_ctor_internal: sub rsp, 0A8h mov [rsp+0A8h+var_20], rsi mov [rsp+0A8h+var_18], rdx mov [rsp+0A8h+var_28], rdi mov [rsp+0A8h+var_30], rcx mov [rsp+0A8h+var_38], r8 mov rdi, [rsp+0A8h+var_28] call JS_GetRuntime mov [rsp+0A8h+var_40], rax mov rdi, [rsp+0A8h+var_40] call js_get_thread_state mov [rsp+0A8h+var_48], rax mov rax, cs:qword_108B88 mov [rsp+0A8h+var_58], rax mov rax, cs:qword_108B90 mov [rsp+0A8h+var_50], rax mov rdi, [rsp+0A8h+var_20] mov rsi, [rsp+0A8h+var_18] call JS_IsUndefined cmp eax, 0 jz short loc_15B11 mov rdi, [rsp+0A8h+var_28] mov rax, [rsp+0A8h+var_48] mov esi, [rax+7Ch] call JS_GetClassProto mov [rsp+0A8h+var_80], rax mov [rsp+0A8h+var_78], rdx mov rax, [rsp+0A8h+var_80] mov [rsp+0A8h+var_68], rax mov rax, [rsp+0A8h+var_78] mov [rsp+0A8h+var_60], rax jmp short loc_15B6E loc_15B11: mov rdi, [rsp+0A8h+var_28] mov rsi, [rsp+0A8h+var_20] mov rdx, [rsp+0A8h+var_18] lea rcx, aProxyBadProtot+0Bh; "prototype" call JS_GetPropertyStr mov [rsp+0A8h+var_90], rax mov [rsp+0A8h+var_88], rdx mov rax, [rsp+0A8h+var_90] mov [rsp+0A8h+var_68], rax mov rax, [rsp+0A8h+var_88] mov [rsp+0A8h+var_60], rax mov rdi, [rsp+0A8h+var_68] mov rsi, [rsp+0A8h+var_60] call JS_IsException_0 cmp eax, 0 jz short loc_15B6C jmp loc_15C54 loc_15B6C: jmp short $+2 loc_15B6E: mov rdi, [rsp+0A8h+var_28] mov rax, [rsp+0A8h+var_48] mov ecx, [rax+7Ch] mov rsi, [rsp+0A8h+var_68] mov rdx, [rsp+0A8h+var_60] call JS_NewObjectProtoClass mov [rsp+0A8h+var_A0], rax mov [rsp+0A8h+var_98], rdx mov rax, [rsp+0A8h+var_A0] mov [rsp+0A8h+var_58], rax mov rax, [rsp+0A8h+var_98] mov [rsp+0A8h+var_50], rax mov rdi, [rsp+0A8h+var_28] mov rsi, [rsp+0A8h+var_68] mov rdx, [rsp+0A8h+var_60] call JS_FreeValue mov rdi, [rsp+0A8h+var_58] mov rsi, [rsp+0A8h+var_50] call JS_IsException_0 cmp eax, 0 jz short loc_15BD8 jmp short loc_15C54 loc_15BD8: mov rdi, [rsp+0A8h+var_28] mov esi, 18h call js_mallocz mov [rsp+0A8h+var_70], rax cmp [rsp+0A8h+var_70], 0 jnz short loc_15BF9 jmp short loc_15C54 loc_15BF9: mov rdi, [rsp+0A8h+var_30] call js_dup_message_pipe mov rcx, rax mov rax, [rsp+0A8h+var_70] mov [rax], rcx mov rdi, [rsp+0A8h+var_38] call js_dup_message_pipe mov rcx, rax mov rax, [rsp+0A8h+var_70] mov [rax+8], rcx mov rdx, [rsp+0A8h+var_70] mov rdi, [rsp+0A8h+var_58] mov rsi, [rsp+0A8h+var_50] call JS_SetOpaque mov rax, [rsp+0A8h+var_58] mov [rsp+0A8h+var_10], rax mov rax, [rsp+0A8h+var_50] mov [rsp+0A8h+var_8], rax jmp short loc_15C82 loc_15C54: mov rdi, [rsp+0A8h+var_28] mov rsi, [rsp+0A8h+var_58] mov rdx, [rsp+0A8h+var_50] call JS_FreeValue mov dword ptr [rsp+0A8h+var_10], 0 mov [rsp+0A8h+var_8], 6 loc_15C82: mov rax, [rsp+0A8h+var_10] mov rdx, [rsp+0A8h+var_8] add rsp, 0A8h retn
long long js_worker_ctor_internal(long long a1, long long a2, long long a3, long long a4, long long a5) { int v5; // edx int v6; // ecx int v7; // r8d int v8; // r9d long long v9; // rdx long long v10; // rax long long v11; // rdx long long v12; // rdx long long PropertyStr; // [rsp+18h] [rbp-90h] _QWORD *v15; // [rsp+38h] [rbp-70h] long long ClassProto; // [rsp+40h] [rbp-68h] long long v17; // [rsp+48h] [rbp-60h] long long v18; // [rsp+50h] [rbp-58h] long long v19; // [rsp+58h] [rbp-50h] long long thread_state; // [rsp+60h] [rbp-48h] int Runtime; // [rsp+68h] [rbp-40h] long long v25; // [rsp+98h] [rbp-10h] Runtime = JS_GetRuntime(a1); thread_state = js_get_thread_state(Runtime, a2, v5, v6, v7, v8); v18 = 0LL; v19 = 3LL; if ( JS_IsUndefined(a2, a3) ) { ClassProto = JS_GetClassProto(a1, *(unsigned int *)(thread_state + 124)); v17 = v9; v10 = JS_NewObjectProtoClass(a1, ClassProto, v9, *(unsigned int *)(thread_state + 124)); } else { PropertyStr = JS_GetPropertyStr(a1, a2, a3, "prototype"); ClassProto = PropertyStr; v17 = v12; if ( JS_IsException_0(PropertyStr, v12) ) { LABEL_8: JS_FreeValue(a1, v18, v19); LODWORD(v25) = 0; return v25; } v10 = JS_NewObjectProtoClass(a1, PropertyStr, v17, *(unsigned int *)(thread_state + 124)); } v18 = v10; v19 = v11; JS_FreeValue(a1, ClassProto, v17); if ( JS_IsException_0(v18, v19) ) goto LABEL_8; v15 = (_QWORD *)js_mallocz(a1, 24LL); if ( !v15 ) goto LABEL_8; *v15 = js_dup_message_pipe(a4); v15[1] = js_dup_message_pipe(a5); JS_SetOpaque(v18, v19, v15); return v18; }
js_worker_ctor_internal: SUB RSP,0xa8 MOV qword ptr [RSP + 0x88],RSI MOV qword ptr [RSP + 0x90],RDX MOV qword ptr [RSP + 0x80],RDI MOV qword ptr [RSP + 0x78],RCX MOV qword ptr [RSP + 0x70],R8 MOV RDI,qword ptr [RSP + 0x80] CALL 0x00126c40 MOV qword ptr [RSP + 0x68],RAX MOV RDI,qword ptr [RSP + 0x68] CALL 0x00110310 MOV qword ptr [RSP + 0x60],RAX MOV RAX,qword ptr [0x00208b88] MOV qword ptr [RSP + 0x50],RAX MOV RAX,qword ptr [0x00208b90] MOV qword ptr [RSP + 0x58],RAX MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x90] CALL 0x00110670 CMP EAX,0x0 JZ 0x00115b11 MOV RDI,qword ptr [RSP + 0x80] MOV RAX,qword ptr [RSP + 0x60] MOV ESI,dword ptr [RAX + 0x7c] CALL 0x001267e0 MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x30],RDX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x48],RAX JMP 0x00115b6e LAB_00115b11: MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x88] MOV RDX,qword ptr [RSP + 0x90] LEA RCX,[0x20c8a2] CALL 0x00130bc0 MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x20],RDX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x48],RAX MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x48] CALL 0x0010f0d0 CMP EAX,0x0 JZ 0x00115b6c JMP 0x00115c54 LAB_00115b6c: JMP 0x00115b6e LAB_00115b6e: MOV RDI,qword ptr [RSP + 0x80] MOV RAX,qword ptr [RSP + 0x60] MOV ECX,dword ptr [RAX + 0x7c] MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x48] CALL 0x00128be0 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],RDX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x50],RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x58],RAX MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x48] CALL 0x001229d0 MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x58] CALL 0x0010f0d0 CMP EAX,0x0 JZ 0x00115bd8 JMP 0x00115c54 LAB_00115bd8: MOV RDI,qword ptr [RSP + 0x80] MOV ESI,0x18 CALL 0x00120a70 MOV qword ptr [RSP + 0x38],RAX CMP qword ptr [RSP + 0x38],0x0 JNZ 0x00115bf9 JMP 0x00115c54 LAB_00115bf9: MOV RDI,qword ptr [RSP + 0x78] CALL 0x001164e0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RAX],RCX MOV RDI,qword ptr [RSP + 0x70] CALL 0x001164e0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RAX + 0x8],RCX MOV RDX,qword ptr [RSP + 0x38] MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x58] CALL 0x00137030 MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x98],RAX MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0xa0],RAX JMP 0x00115c82 LAB_00115c54: MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x50] MOV RDX,qword ptr [RSP + 0x58] CALL 0x001229d0 MOV dword ptr [RSP + 0x98],0x0 MOV qword ptr [RSP + 0xa0],0x6 LAB_00115c82: MOV RAX,qword ptr [RSP + 0x98] MOV RDX,qword ptr [RSP + 0xa0] ADD RSP,0xa8 RET
int1 [16] js_worker_ctor_internal (int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5) { int iVar1; int8 uVar2; long lVar3; int8 *puVar4; int1 auVar5 [16]; int1 auVar6 [16]; int8 local_68; int8 local_60; int8 local_58; int8 local_50; int4 local_10; int4 uStack_c; int8 local_8; uVar2 = JS_GetRuntime(param_1); lVar3 = js_get_thread_state(uVar2); auVar6._8_8_ = DAT_00208b90; auVar6._0_8_ = DAT_00208b88; iVar1 = JS_IsUndefined(param_2,param_3); if (iVar1 == 0) { auVar5 = JS_GetPropertyStr(param_1,param_2,param_3,"prototype"); iVar1 = JS_IsException(auVar5._0_8_,auVar5._8_8_); if (iVar1 == 0) goto LAB_00115b6e; } else { auVar5 = JS_GetClassProto(param_1,*(int4 *)(lVar3 + 0x7c)); LAB_00115b6e: local_60 = auVar5._8_8_; local_68 = auVar5._0_8_; auVar6 = JS_NewObjectProtoClass(param_1,local_68,local_60,*(int4 *)(lVar3 + 0x7c)); local_8 = auVar6._8_8_; JS_FreeValue(param_1,local_68,local_60); iVar1 = JS_IsException(auVar6._0_8_,local_8); if ((iVar1 == 0) && (puVar4 = (int8 *)js_mallocz(param_1,0x18), puVar4 != (int8 *)0x0)) { uVar2 = js_dup_message_pipe(param_4); *puVar4 = uVar2; uVar2 = js_dup_message_pipe(param_5); puVar4[1] = uVar2; JS_SetOpaque(auVar6._0_8_,local_8,puVar4); local_10 = auVar6._0_4_; uStack_c = auVar6._4_4_; goto LAB_00115c82; } } local_50 = auVar6._8_8_; local_58 = auVar6._0_8_; JS_FreeValue(param_1,local_58,local_50); local_10 = 0; local_8 = 6; LAB_00115c82: auVar5._4_4_ = uStack_c; auVar5._0_4_ = local_10; auVar5._8_8_ = local_8; return auVar5; }
25,528
js_worker_ctor_internal
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_worker_ctor_internal(JSContext *ctx, JSValue new_target, JSWorkerMessagePipe *recv_pipe, JSWorkerMessagePipe *send_pipe) { JSRuntime *rt = JS_GetRuntime(ctx); JSThreadState *ts = js_get_thread_state(rt); JSValue obj = JS_UNDEFINED, proto; JSWorkerData *s; /* create the object */ if (JS_IsUndefined(new_target)) { proto = JS_GetClassProto(ctx, ts->worker_class_id); } else { proto = JS_GetPropertyStr(ctx, new_target, "prototype"); if (JS_IsException(proto)) goto fail; } obj = JS_NewObjectProtoClass(ctx, proto, ts->worker_class_id); JS_FreeValue(ctx, proto); if (JS_IsException(obj)) goto fail; s = js_mallocz(ctx, sizeof(*s)); if (!s) goto fail; s->recv_pipe = js_dup_message_pipe(recv_pipe); s->send_pipe = js_dup_message_pipe(send_pipe); JS_SetOpaque(obj, s); return obj; fail: JS_FreeValue(ctx, obj); return JS_EXCEPTION; }
O1
c
js_worker_ctor_internal: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, (%rsp) movq %rcx, %r15 movq %rdx, %r14 movq %rsi, %r13 movq %rdi, %rbx callq 0x1f16a xorl %edi, %edi movq %rax, %rsi xorl %eax, %eax callq 0x399df movq %rax, %r12 cmpl $0x3, %r14d jne 0x174bc movl 0x7c(%r12), %esi movq %rbx, %rdi callq 0x1ee47 movq %rax, %rbp movq %rdx, %r14 jmp 0x174e8 leaq 0x863e3(%rip), %rcx # 0x9d8a6 movq %rbx, %rdi movq %r13, %rsi movq %r14, %rdx callq 0x236d6 movq %rdx, %r14 cmpl $0x6, %r14d jne 0x174e5 movl $0x3, %r12d xorl %r13d, %r13d jmp 0x17549 movq %rax, %rbp movl 0x7c(%r12), %ecx movq %rbx, %rdi movq %rbp, %rsi movq %r14, %rdx callq 0x202f1 movq %rax, %r13 movq %rdx, %r12 movq %rbx, %rdi movq %rbp, %rsi movq %r14, %rdx callq 0x1cc9f cmpl $0x6, %r12d je 0x17549 movl $0x18, %esi movq %rbx, %rdi callq 0xed7d testq %rax, %rax je 0x17549 lock incl (%r15) movq %r15, (%rax) movq (%rsp), %rcx lock incl (%rcx) movq %rcx, 0x8(%rax) movq %r13, %rdi movq %r12, %rsi movq %rax, %rdx callq 0x26960 jmp 0x17560 movq %rbx, %rdi movq %r13, %rsi movq %r12, %rdx callq 0x1cc9f movl $0x6, %r12d xorl %r13d, %r13d movq %r13, %rax movq %r12, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_worker_ctor_internal: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov [rsp+38h+var_38], r8 mov r15, rcx mov r14, rdx mov r13, rsi mov rbx, rdi call JS_GetRuntime xor edi, edi mov rsi, rax xor eax, eax call js_std_cmd mov r12, rax cmp r14d, 3 jnz short loc_174BC mov esi, [r12+7Ch] mov rdi, rbx call JS_GetClassProto mov rbp, rax mov r14, rdx jmp short loc_174E8 loc_174BC: lea rcx, aProxyBadProtot+0Bh; "prototype" mov rdi, rbx mov rsi, r13 mov rdx, r14 call JS_GetPropertyStr mov r14, rdx cmp r14d, 6 jnz short loc_174E5 mov r12d, 3 xor r13d, r13d jmp short loc_17549 loc_174E5: mov rbp, rax loc_174E8: mov ecx, [r12+7Ch] mov rdi, rbx mov rsi, rbp mov rdx, r14 call JS_NewObjectProtoClass mov r13, rax mov r12, rdx mov rdi, rbx mov rsi, rbp mov rdx, r14 call JS_FreeValue cmp r12d, 6 jz short loc_17549 mov esi, 18h mov rdi, rbx call js_mallocz test rax, rax jz short loc_17549 lock inc dword ptr [r15] mov [rax], r15 mov rcx, [rsp+38h+var_38] lock inc dword ptr [rcx] mov [rax+8], rcx mov rdi, r13 mov rsi, r12 mov rdx, rax call JS_SetOpaque jmp short loc_17560 loc_17549: mov rdi, rbx mov rsi, r13 mov rdx, r12 call JS_FreeValue mov r12d, 6 xor r13d, r13d loc_17560: mov rax, r13 mov rdx, r12 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long js_worker_ctor_internal( long long a1, long long a2, long long a3, volatile signed __int32 *a4, volatile signed __int32 *a5) { int Runtime; // eax int v8; // edx int v9; // ecx int v10; // r8d int v11; // r9d long long v12; // rax long long v13; // r12 long long ClassProto; // rbp long long v15; // rdx long long v16; // r14 long long PropertyStr; // rax long long v18; // rdx long long v19; // r12 long long v20; // r13 long long v21; // rdx _QWORD *v22; // rax Runtime = JS_GetRuntime(a1); v12 = js_std_cmd(0, Runtime, v8, v9, v10, v11); v13 = v12; if ( (_DWORD)a3 == 3 ) { ClassProto = JS_GetClassProto(a1, *(unsigned int *)(v12 + 124)); v16 = v15; } else { PropertyStr = JS_GetPropertyStr(a1, a2, a3, "prototype"); v16 = v18; if ( (_DWORD)v18 == 6 ) { v19 = 3LL; v20 = 0LL; LABEL_9: JS_FreeValue(a1, v20, v19); return 0LL; } ClassProto = PropertyStr; } v20 = JS_NewObjectProtoClass(a1, ClassProto, v16, *(unsigned int *)(v13 + 124)); v19 = v21; JS_FreeValue(a1, ClassProto, v16); if ( (_DWORD)v19 == 6 ) goto LABEL_9; v22 = (_QWORD *)js_mallocz(a1, 0x18uLL); if ( !v22 ) goto LABEL_9; _InterlockedIncrement(a4); *v22 = a4; _InterlockedIncrement(a5); v22[1] = a5; JS_SetOpaque(v20, v19, v22); return v20; }
js_worker_ctor_internal: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV qword ptr [RSP],R8 MOV R15,RCX MOV R14,RDX MOV R13,RSI MOV RBX,RDI CALL 0x0011f16a XOR EDI,EDI MOV RSI,RAX XOR EAX,EAX CALL 0x001399df MOV R12,RAX CMP R14D,0x3 JNZ 0x001174bc MOV ESI,dword ptr [R12 + 0x7c] MOV RDI,RBX CALL 0x0011ee47 MOV RBP,RAX MOV R14,RDX JMP 0x001174e8 LAB_001174bc: LEA RCX,[0x19d8a6] MOV RDI,RBX MOV RSI,R13 MOV RDX,R14 CALL 0x001236d6 MOV R14,RDX CMP R14D,0x6 JNZ 0x001174e5 MOV R12D,0x3 XOR R13D,R13D JMP 0x00117549 LAB_001174e5: MOV RBP,RAX LAB_001174e8: MOV ECX,dword ptr [R12 + 0x7c] MOV RDI,RBX MOV RSI,RBP MOV RDX,R14 CALL 0x001202f1 MOV R13,RAX MOV R12,RDX MOV RDI,RBX MOV RSI,RBP MOV RDX,R14 CALL 0x0011cc9f CMP R12D,0x6 JZ 0x00117549 MOV ESI,0x18 MOV RDI,RBX CALL 0x0010ed7d TEST RAX,RAX JZ 0x00117549 INC.LOCK dword ptr [R15] MOV qword ptr [RAX],R15 MOV RCX,qword ptr [RSP] INC.LOCK dword ptr [RCX] MOV qword ptr [RAX + 0x8],RCX MOV RDI,R13 MOV RSI,R12 MOV RDX,RAX CALL 0x00126960 JMP 0x00117560 LAB_00117549: MOV RDI,RBX MOV RSI,R13 MOV RDX,R12 CALL 0x0011cc9f MOV R12D,0x6 XOR R13D,R13D LAB_00117560: MOV RAX,R13 MOV RDX,R12 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_worker_ctor_internal (int8 param_1,int8 param_2,int8 param_3,int *param_4,int *param_5) { int8 uVar1; long lVar2; int8 *puVar3; int1 auVar4 [16]; int1 auVar5 [16]; uVar1 = JS_GetRuntime(); lVar2 = js_std_cmd(0,uVar1); if ((int)param_3 == 3) { auVar4 = JS_GetClassProto(param_1,*(int4 *)(lVar2 + 0x7c)); } else { auVar4 = JS_GetPropertyStr(param_1,param_2,param_3,"prototype"); if (auVar4._8_4_ == 6) { auVar5 = ZEXT816(3) << 0x40; goto LAB_00117549; } } auVar5 = JS_NewObjectProtoClass(param_1,auVar4._0_8_,auVar4._8_8_,*(int4 *)(lVar2 + 0x7c)); JS_FreeValue(param_1,auVar4._0_8_,auVar4._8_8_); if ((auVar5._8_4_ != 6) && (puVar3 = (int8 *)js_mallocz(param_1,0x18), puVar3 != (int8 *)0x0)) { LOCK(); *param_4 = *param_4 + 1; UNLOCK(); *puVar3 = param_4; LOCK(); *param_5 = *param_5 + 1; UNLOCK(); puVar3[1] = param_5; JS_SetOpaque(auVar5._0_8_,auVar5._8_8_,puVar3); return auVar5; } LAB_00117549: JS_FreeValue(param_1,auVar5._0_8_,auVar5._8_8_); return ZEXT816(6) << 0x40; }
25,529
my_charset_is_8bit_pure_ascii
eloqsql/strings/ctype-simple.c
static my_bool my_charset_is_8bit_pure_ascii(CHARSET_INFO *cs) { size_t code; if (!cs->tab_to_uni) return 0; for (code= 0; code < 256; code++) { if (cs->tab_to_uni[code] > 0x7F) return 0; } return 1; }
O0
c
my_charset_is_8bit_pure_ascii: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x68(%rax) jne 0x53689 movb $0x0, -0x1(%rbp) jmp 0x536ca movq $0x0, -0x18(%rbp) cmpq $0x100, -0x18(%rbp) # imm = 0x100 jae 0x536c6 movq -0x10(%rbp), %rax movq 0x68(%rax), %rax movq -0x18(%rbp), %rcx movzwl (%rax,%rcx,2), %eax cmpl $0x7f, %eax jle 0x536b6 movb $0x0, -0x1(%rbp) jmp 0x536ca jmp 0x536b8 movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) jmp 0x53691 movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al popq %rbp retq nop
my_charset_is_8bit_pure_ascii: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov rax, [rbp+var_10] cmp qword ptr [rax+68h], 0 jnz short loc_53689 mov [rbp+var_1], 0 jmp short loc_536CA loc_53689: mov [rbp+var_18], 0 loc_53691: cmp [rbp+var_18], 100h jnb short loc_536C6 mov rax, [rbp+var_10] mov rax, [rax+68h] mov rcx, [rbp+var_18] movzx eax, word ptr [rax+rcx*2] cmp eax, 7Fh jle short loc_536B6 mov [rbp+var_1], 0 jmp short loc_536CA loc_536B6: jmp short $+2 loc_536B8: mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax jmp short loc_53691 loc_536C6: mov [rbp+var_1], 1 loc_536CA: mov al, [rbp+var_1] pop rbp retn
char my_charset_is_8bit_pure_ascii(long long a1) { unsigned long long i; // [rsp+0h] [rbp-18h] if ( !*(_QWORD *)(a1 + 104) ) return 0; for ( i = 0LL; i < 0x100; ++i ) { if ( *(unsigned __int16 *)(*(_QWORD *)(a1 + 104) + 2 * i) > 0x7Fu ) return 0; } return 1; }
my_charset_is_8bit_pure_ascii: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x68],0x0 JNZ 0x00153689 MOV byte ptr [RBP + -0x1],0x0 JMP 0x001536ca LAB_00153689: MOV qword ptr [RBP + -0x18],0x0 LAB_00153691: CMP qword ptr [RBP + -0x18],0x100 JNC 0x001536c6 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x68] MOV RCX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX + RCX*0x2] CMP EAX,0x7f JLE 0x001536b6 MOV byte ptr [RBP + -0x1],0x0 JMP 0x001536ca LAB_001536b6: JMP 0x001536b8 LAB_001536b8: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x00153691 LAB_001536c6: MOV byte ptr [RBP + -0x1],0x1 LAB_001536ca: MOV AL,byte ptr [RBP + -0x1] POP RBP RET
int1 my_charset_is_8bit_pure_ascii(long param_1) { ulong local_20; int1 local_9; if (*(long *)(param_1 + 0x68) == 0) { local_9 = 0; } else { for (local_20 = 0; local_20 < 0x100; local_20 = local_20 + 1) { if (0x7f < *(ushort *)(*(long *)(param_1 + 0x68) + local_20 * 2)) { return 0; } } local_9 = 1; } return local_9; }
25,530
my_strtoll10
eloqsql/strings/my_strtoll10.c
longlong my_strtoll10(const char *nptr, char **endptr, int *error) { const char *s, *end, *start, *n_end, *true_end; char *dummy; uchar c; unsigned long i, j, k; ulonglong li; int negative; ulong cutoff, cutoff2, cutoff3; s= nptr; /* If fixed length string */ if (endptr) { end= *endptr; /* Skip leading spaces */ for ( ; s < end && my_isspace(&my_charset_latin1, *s) ; ) s++; if (s == end) goto no_conv; } else { endptr= &dummy; /* Easier end test */ /* Skip leading spaces */ for ( ; ; s++) { if (!*s) goto no_conv; if (!my_isspace(&my_charset_latin1, *s)) break; } /* This number must be big to guard against a lot of pre-zeros */ end= s+65535; /* Can't be longer than this */ } /* Check for a sign. */ negative= 0; if (*s == '-') { *error= -1; /* Mark as negative number */ negative= 1; if (++s == end) goto no_conv; cutoff= MAX_NEGATIVE_NUMBER / LFACTOR2; cutoff2= (MAX_NEGATIVE_NUMBER % LFACTOR2) / 100; cutoff3= MAX_NEGATIVE_NUMBER % 100; } else { *error= 0; if (*s == '+') { if (++s == end) goto no_conv; } cutoff= ULONGLONG_MAX / LFACTOR2; cutoff2= ULONGLONG_MAX % LFACTOR2 / 100; cutoff3= ULONGLONG_MAX % 100; } /* Handle case where we have a lot of pre-zero */ if (*s == '0') { i= 0; do { if (++s == end) goto end_i; /* Return 0 */ } while (*s == '0'); n_end= s+ INIT_CNT; } else { /* Read first digit to check that it's a valid number */ if ((c= (*s-'0')) > 9) goto no_conv; i= c; n_end= ++s+ INIT_CNT-1; } /* Handle first 9 digits and store them in i */ if (n_end > end) n_end= end; for (; s != n_end ; s++) { if ((c= (*s-'0')) > 9) goto end_i; i= i*10+c; } if (s == end) goto end_i; /* Handle next 9 digits and store them in j */ j= 0; start= s; /* Used to know how much to shift i */ n_end= true_end= s + INIT_CNT; if (n_end > end) n_end= end; do { if ((c= (*s-'0')) > 9) goto end_i_and_j; j= j*10+c; } while (++s != n_end); if (s == end) { if (s != true_end) goto end_i_and_j; goto end3; } if ((c= (*s-'0')) > 9) goto end3; /* Handle the next 1 or 2 digits and store them in k */ k=c; if (++s == end || (c= (*s-'0')) > 9) goto end4; k= k*10+c; *endptr= (char*) ++s; /* number string should have ended here */ if (s != end && (c= (*s-'0')) <= 9) goto overflow; /* Check that we didn't get an overflow with the last digit */ if (i > cutoff || (i == cutoff && (j > cutoff2 || (j == cutoff2 && k > cutoff3)))) goto overflow; li=i*LFACTOR2+ (ulonglong) j*100 + k; return (longlong) li; overflow: /* *endptr is set here */ *error= MY_ERRNO_ERANGE; return negative ? LONGLONG_MIN : (longlong) ULONGLONG_MAX; end_i: *endptr= (char*) s; return (negative ? ((longlong) -(long) i) : (longlong) i); end_i_and_j: li= (ulonglong) i * lfactor[(uint) (s-start)] + j; *endptr= (char*) s; return (negative ? -((longlong) li) : (longlong) li); end3: li=(ulonglong) i*LFACTOR+ (ulonglong) j; *endptr= (char*) s; return (negative ? -((longlong) li) : (longlong) li); end4: li=(ulonglong) i*LFACTOR1+ (ulonglong) j * 10 + k; *endptr= (char*) s; if (negative) { if (li > MAX_NEGATIVE_NUMBER) goto overflow; return -((longlong) li); } return (longlong) li; no_conv: /* There was no number to convert. */ *error= MY_ERRNO_EDOM; *endptr= (char *) nptr; return 0; }
O3
c
my_strtoll10: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx testq %rsi, %rsi je 0x5d4ce movq (%rsi), %r8 movq %rdi, %rax cmpq %rdi, %r8 jbe 0x5d4be leaq 0x2bf650(%rip), %rax # 0x31caf0 movq 0x40(%rax), %rcx movq %rdi, %rax movzbl (%rax), %r9d testb $0x8, 0x1(%rcx,%r9) je 0x5d4be incq %rax cmpq %r8, %rax jne 0x5d4a7 movq %r8, %rax cmpq %r8, %rax je 0x5d5ac movb (%rax), %cl movq %r8, %rbx jmp 0x5d51a movb (%rdi), %cl leaq -0x30(%rbp), %rsi testb %cl, %cl je 0x5d5ac leaq 0x2bf60d(%rip), %rax # 0x31caf0 movq 0x40(%rax), %r8 leaq 0xffff(%rdi), %rbx movq %rdi, %rax movzbl %cl, %r9d testb $0x8, 0x1(%r8,%r9) je 0x5d50f movb 0x1(%rax), %cl incq %rax incq %rbx testb %cl, %cl jne 0x5d4f1 jmp 0x5d5ac leaq 0xffff(%rax), %r8 leaq -0x30(%rbp), %rsi cmpb $0x2d, %cl jne 0x5d541 movl $0xffffffff, (%rdx) # imm = 0xFFFFFFFF incq %rax cmpq %r8, %rax je 0x5d5ac movl $0x8, %r9d movl $0x15f797ae, %r10d # imm = 0x15F797AE movl $0x57f5ff8, %r11d # imm = 0x57F5FF8 jmp 0x5d56a movl $0x0, (%rdx) movb (%rax), %r14b cmpb $0x2b, %r14b jne 0x5d56f incq %rax cmpq %r8, %rax je 0x5d5ac movl $0xf, %r9d movl $0x2bef2f5c, %r10d # imm = 0x2BEF2F5C movl $0xafebff0, %r11d # imm = 0xAFEBFF0 movb (%rax), %r14b jmp 0x5d581 movl $0xf, %r9d movl $0x2bef2f5c, %r10d # imm = 0x2BEF2F5C movl $0xafebff0, %r11d # imm = 0xAFEBFF0 cmpb $0x30, %r14b jne 0x5d5a2 xorl %edi, %edi incq %rax cmpq %r8, %rax je 0x5d6b1 cmpb $0x30, (%rax) je 0x5d589 leaq 0x9(%rax), %rbx xorl %edi, %edi jmp 0x5d5ca addb $-0x30, %r14b cmpb $0x9, %r14b jbe 0x5d5bc movl $0x21, (%rdx) movq %rdi, (%rsi) xorl %eax, %eax jmp 0x5d6c1 movzbl %r14b, %edi movq %rax, %rbx incq %rax addq $0x9, %rbx cmpq %r8, %rbx cmovaq %r8, %rbx cmpq %rbx, %rax je 0x5d5f8 movb (%rax), %r14b addb $-0x30, %r14b cmpb $0x9, %r14b ja 0x5d6ae leaq (%rdi,%rdi,4), %rdi movzbl %r14b, %r14d leaq (%r14,%rdi,2), %rdi incq %rax jmp 0x5d5d1 cmpq %r8, %rax je 0x5d6ae leaq 0x9(%rax), %r12 cmpq %r8, %r12 cmovaq %r8, %r12 leaq 0x1(%rax), %r14 movl $0x9, %r13d xorl %ebx, %ebx movb -0x1(%r14), %r15b addb $-0x30, %r15b cmpb $0x9, %r15b ja 0x5d6cc leaq (%rbx,%rbx,4), %rbx movzbl %r15b, %r15d leaq (%r15,%rbx,2), %rbx leaq 0x1(%r14), %r15 decq %r13 cmpq %r12, %r14 movq %r15, %r14 jne 0x5d618 leaq -0x1(%r15), %r14 cmpq %r8, %r12 je 0x5d6f1 movb (%r14), %al addb $-0x30, %al cmpb $0x9, %al ja 0x5d6f6 movzbl %al, %r14d cmpq %r8, %r15 je 0x5d675 movb (%r15), %al addb $-0x30, %al cmpb $0x9, %al jbe 0x5d712 movabsq $0x2540be400, %rax # imm = 0x2540BE400 imulq %rax, %rdi leaq (%rbx,%rbx,4), %rax leaq (%rdi,%rax,2), %rax addq %r14, %rax movq %r15, (%rsi) cmpb $0x2d, %cl jne 0x5d6c1 movabsq $-0x8000000000000000, %rsi # imm = 0x8000000000000000 cmpq %rsi, %rax ja 0x5d74d negq %rax jmp 0x5d6c1 movq %rax, %rbx movq %rdi, %rax negq %rax cmpb $0x2d, %cl movq %rbx, (%rsi) cmovneq %rdi, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq decq %r14 movl %r14d, %edx subl %eax, %edx leaq 0x281bc5(%rip), %rax # 0x2df2a0 imulq (%rax,%rdx,8), %rdi addq %rbx, %rdi movq %rdi, %rax negq %rax cmpb $0x2d, %cl movq %r14, (%rsi) jmp 0x5d6bd testq %r13, %r13 jne 0x5d6cf imulq $0x3b9aca00, %rdi, %rax # imm = 0x3B9ACA00 addq %rax, %rbx movq %rbx, %rax negq %rax cmpb $0x2d, %cl movq %r14, (%rsi) cmovneq %rbx, %rax jmp 0x5d6c1 leaq 0x1(%r15), %r12 movq %r12, (%rsi) cmpq %r8, %r12 je 0x5d72c movb 0x1(%r15), %sil addb $-0x30, %sil cmpb $0xa, %sil jb 0x5d74d cmpq %r11, %rdi ja 0x5d74d leaq (%r14,%r14,4), %rsi movzbl %al, %eax leaq (%rax,%rsi,2), %rsi cmpq %r11, %rdi jne 0x5d768 cmpq %r10, %rbx ja 0x5d74d jne 0x5d768 cmpl %r9d, %esi jbe 0x5d768 xorl %eax, %eax cmpb $0x2d, %cl setne %al movl $0x22, (%rdx) negq %rax btsq $0x3f, %rax jmp 0x5d6c1 movabsq $0x174876e800, %rax # imm = 0x174876E800 imulq %rax, %rdi imulq $0x64, %rbx, %rax addq %rdi, %rax addq %rsi, %rax jmp 0x5d6c1 nopl (%rax)
my_strtoll10: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx test rsi, rsi jz short loc_5D4CE mov r8, [rsi] mov rax, rdi cmp r8, rdi jbe short loc_5D4BE lea rax, my_charset_latin1 mov rcx, [rax+40h] mov rax, rdi loc_5D4A7: movzx r9d, byte ptr [rax] test byte ptr [rcx+r9+1], 8 jz short loc_5D4BE inc rax cmp rax, r8 jnz short loc_5D4A7 mov rax, r8 loc_5D4BE: cmp rax, r8 jz loc_5D5AC mov cl, [rax] mov rbx, r8 jmp short loc_5D51A loc_5D4CE: mov cl, [rdi] lea rsi, [rbp+var_30] test cl, cl jz loc_5D5AC lea rax, my_charset_latin1 mov r8, [rax+40h] lea rbx, [rdi+0FFFFh] mov rax, rdi loc_5D4F1: movzx r9d, cl test byte ptr [r8+r9+1], 8 jz short loc_5D50F mov cl, [rax+1] inc rax inc rbx test cl, cl jnz short loc_5D4F1 jmp loc_5D5AC loc_5D50F: lea r8, [rax+0FFFFh] lea rsi, [rbp+var_30] loc_5D51A: cmp cl, 2Dh ; '-' jnz short loc_5D541 mov dword ptr [rdx], 0FFFFFFFFh inc rax cmp rax, r8 jz short loc_5D5AC mov r9d, 8 mov r10d, 15F797AEh mov r11d, 57F5FF8h jmp short loc_5D56A loc_5D541: mov dword ptr [rdx], 0 mov r14b, [rax] cmp r14b, 2Bh ; '+' jnz short loc_5D56F inc rax cmp rax, r8 jz short loc_5D5AC mov r9d, 0Fh mov r10d, 2BEF2F5Ch mov r11d, 0AFEBFF0h loc_5D56A: mov r14b, [rax] jmp short loc_5D581 loc_5D56F: mov r9d, 0Fh mov r10d, 2BEF2F5Ch mov r11d, 0AFEBFF0h loc_5D581: cmp r14b, 30h ; '0' jnz short loc_5D5A2 xor edi, edi loc_5D589: inc rax cmp rax, r8 jz loc_5D6B1 cmp byte ptr [rax], 30h ; '0' jz short loc_5D589 lea rbx, [rax+9] xor edi, edi jmp short loc_5D5CA loc_5D5A2: add r14b, 0D0h cmp r14b, 9 jbe short loc_5D5BC loc_5D5AC: mov dword ptr [rdx], 21h ; '!' mov [rsi], rdi xor eax, eax jmp loc_5D6C1 loc_5D5BC: movzx edi, r14b mov rbx, rax inc rax add rbx, 9 loc_5D5CA: cmp rbx, r8 cmova rbx, r8 loc_5D5D1: cmp rax, rbx jz short loc_5D5F8 mov r14b, [rax] add r14b, 0D0h cmp r14b, 9 ja loc_5D6AE lea rdi, [rdi+rdi*4] movzx r14d, r14b lea rdi, [r14+rdi*2] inc rax jmp short loc_5D5D1 loc_5D5F8: cmp rax, r8 jz loc_5D6AE lea r12, [rax+9] cmp r12, r8 cmova r12, r8 lea r14, [rax+1] mov r13d, 9 xor ebx, ebx loc_5D618: mov r15b, [r14-1] add r15b, 0D0h cmp r15b, 9 ja loc_5D6CC lea rbx, [rbx+rbx*4] movzx r15d, r15b lea rbx, [r15+rbx*2] lea r15, [r14+1] dec r13 cmp r14, r12 mov r14, r15 jnz short loc_5D618 lea r14, [r15-1] cmp r12, r8 jz loc_5D6F1 mov al, [r14] add al, 0D0h cmp al, 9 ja loc_5D6F6 movzx r14d, al cmp r15, r8 jz short loc_5D675 mov al, [r15] add al, 0D0h cmp al, 9 jbe loc_5D712 loc_5D675: mov rax, 2540BE400h imul rdi, rax lea rax, [rbx+rbx*4] lea rax, [rdi+rax*2] add rax, r14 mov [rsi], r15 cmp cl, 2Dh ; '-' jnz short loc_5D6C1 mov rsi, 8000000000000000h cmp rax, rsi ja loc_5D74D neg rax jmp short loc_5D6C1 loc_5D6AE: mov rbx, rax loc_5D6B1: mov rax, rdi neg rax cmp cl, 2Dh ; '-' mov [rsi], rbx loc_5D6BD: cmovnz rax, rdi loc_5D6C1: pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_5D6CC: dec r14 loc_5D6CF: mov edx, r14d sub edx, eax lea rax, lfactor_0 imul rdi, [rax+rdx*8] add rdi, rbx mov rax, rdi neg rax cmp cl, 2Dh ; '-' mov [rsi], r14 jmp short loc_5D6BD loc_5D6F1: test r13, r13 jnz short loc_5D6CF loc_5D6F6: imul rax, rdi, 3B9ACA00h add rbx, rax mov rax, rbx neg rax cmp cl, 2Dh ; '-' mov [rsi], r14 cmovnz rax, rbx jmp short loc_5D6C1 loc_5D712: lea r12, [r15+1] mov [rsi], r12 cmp r12, r8 jz short loc_5D72C mov sil, [r15+1] add sil, 0D0h cmp sil, 0Ah jb short loc_5D74D loc_5D72C: cmp rdi, r11 ja short loc_5D74D lea rsi, [r14+r14*4] movzx eax, al lea rsi, [rax+rsi*2] cmp rdi, r11 jnz short loc_5D768 cmp rbx, r10 ja short loc_5D74D jnz short loc_5D768 cmp esi, r9d jbe short loc_5D768 loc_5D74D: xor eax, eax cmp cl, 2Dh ; '-' setnz al mov dword ptr [rdx], 22h ; '"' neg rax bts rax, 3Fh ; '?' jmp loc_5D6C1 loc_5D768: mov rax, 174876E800h imul rdi, rax imul rax, rbx, 64h ; 'd' add rax, rdi add rax, rsi jmp loc_5D6C1
unsigned long long my_strtoll10(unsigned __int8 *a1, unsigned long long *a2, _DWORD *a3) { unsigned long long v3; // r8 unsigned __int8 *v4; // rax unsigned __int8 v5; // cl _BYTE *v6; // rbx unsigned int v7; // r9d unsigned long long v8; // r10 unsigned long long v9; // r11 unsigned __int8 v10; // r14 unsigned long long v11; // rdi unsigned __int8 *v12; // rbx unsigned __int8 v13; // r14 unsigned long long result; // rax unsigned __int8 *v15; // rbx unsigned __int8 v16; // r14 unsigned __int8 *v17; // r12 unsigned __int8 *v18; // r14 long long v19; // r13 unsigned long long v20; // rbx unsigned __int8 v21; // r15 _BYTE *v22; // r15 unsigned __int8 *v23; // r14 unsigned __int8 v24; // al long long v25; // r14 unsigned __int8 v26; // al bool v27; // zf unsigned long long v28; // rbx long long v29; // rsi _BYTE v30[48]; // [rsp+0h] [rbp-30h] BYREF if ( a2 ) { v3 = *a2; v4 = a1; if ( *a2 > (unsigned long long)a1 ) { v4 = a1; while ( (*(_BYTE *)(*(_QWORD *)&my_charset_latin1[16] + *v4 + 1LL) & 8) != 0 ) { if ( ++v4 == (unsigned __int8 *)v3 ) { v4 = (unsigned __int8 *)*a2; break; } } } if ( v4 == (unsigned __int8 *)v3 ) goto LABEL_29; v5 = *v4; v6 = (_BYTE *)*a2; } else { v5 = *a1; a2 = (unsigned long long *)v30; if ( !*a1 ) goto LABEL_29; v6 = a1 + 0xFFFF; v4 = a1; while ( (*(_BYTE *)(*(_QWORD *)&my_charset_latin1[16] + v5 + 1LL) & 8) != 0 ) { v5 = *++v4; ++v6; if ( !v5 ) goto LABEL_29; } v3 = (unsigned long long)(v4 + 0xFFFF); a2 = (unsigned long long *)v30; } if ( v5 == 45 ) { *a3 = -1; if ( ++v4 == (unsigned __int8 *)v3 ) goto LABEL_29; v7 = 8; v8 = 368547758LL; v9 = 92233720LL; goto LABEL_21; } *a3 = 0; v10 = *v4; if ( *v4 == 43 ) { if ( ++v4 == (unsigned __int8 *)v3 ) goto LABEL_29; v7 = 15; v8 = 737095516LL; v9 = 184467440LL; LABEL_21: v10 = *v4; goto LABEL_23; } v7 = 15; v8 = 737095516LL; v9 = 184467440LL; LABEL_23: if ( v10 != 48 ) { v13 = v10 - 48; if ( v13 <= 9u ) { v11 = v13; v15 = v4++; v12 = v15 + 9; goto LABEL_31; } LABEL_29: *a3 = 33; *a2 = (unsigned long long)a1; return 0LL; } v11 = 0LL; do { if ( ++v4 == (unsigned __int8 *)v3 ) goto LABEL_50; } while ( *v4 == 48 ); v12 = v4 + 9; v11 = 0LL; LABEL_31: if ( (unsigned long long)v12 > v3 ) v12 = (unsigned __int8 *)v3; while ( v4 != v12 ) { v16 = *v4 - 48; if ( v16 > 9u ) goto LABEL_49; v11 = v16 + 10 * v11; ++v4; } if ( v4 == (unsigned __int8 *)v3 ) { LABEL_49: v6 = v4; LABEL_50: result = -(long long)v11; v27 = v5 == 45; *a2 = (unsigned long long)v6; LABEL_51: if ( !v27 ) return v11; return result; } v17 = v4 + 9; if ( (unsigned long long)(v4 + 9) > v3 ) v17 = (unsigned __int8 *)v3; v18 = v4 + 1; v19 = 9LL; v20 = 0LL; do { v21 = *(v18 - 1) - 48; if ( v21 > 9u ) { v23 = v18 - 1; goto LABEL_55; } v20 = v21 + 10 * v20; v22 = v18 + 1; --v19; v27 = v18++ == v17; } while ( !v27 ); v23 = v22 - 1; if ( v17 == (unsigned __int8 *)v3 ) { if ( !v19 ) { LABEL_57: v28 = 1000000000 * v11 + v20; result = -(long long)v28; *a2 = (unsigned long long)v23; if ( v5 != 45 ) return v28; return result; } LABEL_55: v11 = v20 + lfactor_0[(int)v23 - (int)v4] * v11; result = -(long long)v11; v27 = v5 == 45; *a2 = (unsigned long long)v23; goto LABEL_51; } v24 = *v23 - 48; if ( v24 > 9u ) goto LABEL_57; v25 = v24; if ( v22 == (_BYTE *)v3 || (v26 = *v22 - 48, v26 > 9u) ) { result = v25 + 10000000000LL * v11 + 10 * v20; *a2 = (unsigned long long)v22; if ( v5 != 45 ) return result; if ( result <= 0x8000000000000000LL ) return -(long long)result; LABEL_67: *a3 = 34; return -(long long)(v5 != 45) | 0x8000000000000000LL; } else { *a2 = (unsigned long long)(v22 + 1); if ( v22 + 1 != (_BYTE *)v3 && (unsigned __int8)(v22[1] - 48) < 0xAu ) goto LABEL_67; if ( v11 > v9 ) goto LABEL_67; v29 = v26 + 10 * v25; if ( v11 == v9 && (v20 > v8 || v20 == v8 && (unsigned int)v29 > v7) ) goto LABEL_67; return v29 + 100000000000LL * v11 + 100 * v20; } }
my_strtoll10: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX TEST RSI,RSI JZ 0x0015d4ce MOV R8,qword ptr [RSI] MOV RAX,RDI CMP R8,RDI JBE 0x0015d4be LEA RAX,[0x41caf0] MOV RCX,qword ptr [RAX + 0x40] MOV RAX,RDI LAB_0015d4a7: MOVZX R9D,byte ptr [RAX] TEST byte ptr [RCX + R9*0x1 + 0x1],0x8 JZ 0x0015d4be INC RAX CMP RAX,R8 JNZ 0x0015d4a7 MOV RAX,R8 LAB_0015d4be: CMP RAX,R8 JZ 0x0015d5ac MOV CL,byte ptr [RAX] MOV RBX,R8 JMP 0x0015d51a LAB_0015d4ce: MOV CL,byte ptr [RDI] LEA RSI,[RBP + -0x30] TEST CL,CL JZ 0x0015d5ac LEA RAX,[0x41caf0] MOV R8,qword ptr [RAX + 0x40] LEA RBX,[RDI + 0xffff] MOV RAX,RDI LAB_0015d4f1: MOVZX R9D,CL TEST byte ptr [R8 + R9*0x1 + 0x1],0x8 JZ 0x0015d50f MOV CL,byte ptr [RAX + 0x1] INC RAX INC RBX TEST CL,CL JNZ 0x0015d4f1 JMP 0x0015d5ac LAB_0015d50f: LEA R8,[RAX + 0xffff] LEA RSI,[RBP + -0x30] LAB_0015d51a: CMP CL,0x2d JNZ 0x0015d541 MOV dword ptr [RDX],0xffffffff INC RAX CMP RAX,R8 JZ 0x0015d5ac MOV R9D,0x8 MOV R10D,0x15f797ae MOV R11D,0x57f5ff8 JMP 0x0015d56a LAB_0015d541: MOV dword ptr [RDX],0x0 MOV R14B,byte ptr [RAX] CMP R14B,0x2b JNZ 0x0015d56f INC RAX CMP RAX,R8 JZ 0x0015d5ac MOV R9D,0xf MOV R10D,0x2bef2f5c MOV R11D,0xafebff0 LAB_0015d56a: MOV R14B,byte ptr [RAX] JMP 0x0015d581 LAB_0015d56f: MOV R9D,0xf MOV R10D,0x2bef2f5c MOV R11D,0xafebff0 LAB_0015d581: CMP R14B,0x30 JNZ 0x0015d5a2 XOR EDI,EDI LAB_0015d589: INC RAX CMP RAX,R8 JZ 0x0015d6b1 CMP byte ptr [RAX],0x30 JZ 0x0015d589 LEA RBX,[RAX + 0x9] XOR EDI,EDI JMP 0x0015d5ca LAB_0015d5a2: ADD R14B,0xd0 CMP R14B,0x9 JBE 0x0015d5bc LAB_0015d5ac: MOV dword ptr [RDX],0x21 MOV qword ptr [RSI],RDI XOR EAX,EAX JMP 0x0015d6c1 LAB_0015d5bc: MOVZX EDI,R14B MOV RBX,RAX INC RAX ADD RBX,0x9 LAB_0015d5ca: CMP RBX,R8 CMOVA RBX,R8 LAB_0015d5d1: CMP RAX,RBX JZ 0x0015d5f8 MOV R14B,byte ptr [RAX] ADD R14B,0xd0 CMP R14B,0x9 JA 0x0015d6ae LEA RDI,[RDI + RDI*0x4] MOVZX R14D,R14B LEA RDI,[R14 + RDI*0x2] INC RAX JMP 0x0015d5d1 LAB_0015d5f8: CMP RAX,R8 JZ 0x0015d6ae LEA R12,[RAX + 0x9] CMP R12,R8 CMOVA R12,R8 LEA R14,[RAX + 0x1] MOV R13D,0x9 XOR EBX,EBX LAB_0015d618: MOV R15B,byte ptr [R14 + -0x1] ADD R15B,0xd0 CMP R15B,0x9 JA 0x0015d6cc LEA RBX,[RBX + RBX*0x4] MOVZX R15D,R15B LEA RBX,[R15 + RBX*0x2] LEA R15,[R14 + 0x1] DEC R13 CMP R14,R12 MOV R14,R15 JNZ 0x0015d618 LEA R14,[R15 + -0x1] CMP R12,R8 JZ 0x0015d6f1 MOV AL,byte ptr [R14] ADD AL,0xd0 CMP AL,0x9 JA 0x0015d6f6 MOVZX R14D,AL CMP R15,R8 JZ 0x0015d675 MOV AL,byte ptr [R15] ADD AL,0xd0 CMP AL,0x9 JBE 0x0015d712 LAB_0015d675: MOV RAX,0x2540be400 IMUL RDI,RAX LEA RAX,[RBX + RBX*0x4] LEA RAX,[RDI + RAX*0x2] ADD RAX,R14 MOV qword ptr [RSI],R15 CMP CL,0x2d JNZ 0x0015d6c1 MOV RSI,-0x8000000000000000 CMP RAX,RSI JA 0x0015d74d NEG RAX JMP 0x0015d6c1 LAB_0015d6ae: MOV RBX,RAX LAB_0015d6b1: MOV RAX,RDI NEG RAX CMP CL,0x2d MOV qword ptr [RSI],RBX LAB_0015d6bd: CMOVNZ RAX,RDI LAB_0015d6c1: POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0015d6cc: DEC R14 LAB_0015d6cf: MOV EDX,R14D SUB EDX,EAX LEA RAX,[0x3df2a0] IMUL RDI,qword ptr [RAX + RDX*0x8] ADD RDI,RBX MOV RAX,RDI NEG RAX CMP CL,0x2d MOV qword ptr [RSI],R14 JMP 0x0015d6bd LAB_0015d6f1: TEST R13,R13 JNZ 0x0015d6cf LAB_0015d6f6: IMUL RAX,RDI,0x3b9aca00 ADD RBX,RAX MOV RAX,RBX NEG RAX CMP CL,0x2d MOV qword ptr [RSI],R14 CMOVNZ RAX,RBX JMP 0x0015d6c1 LAB_0015d712: LEA R12,[R15 + 0x1] MOV qword ptr [RSI],R12 CMP R12,R8 JZ 0x0015d72c MOV SIL,byte ptr [R15 + 0x1] ADD SIL,0xd0 CMP SIL,0xa JC 0x0015d74d LAB_0015d72c: CMP RDI,R11 JA 0x0015d74d LEA RSI,[R14 + R14*0x4] MOVZX EAX,AL LEA RSI,[RAX + RSI*0x2] CMP RDI,R11 JNZ 0x0015d768 CMP RBX,R10 JA 0x0015d74d JNZ 0x0015d768 CMP ESI,R9D JBE 0x0015d768 LAB_0015d74d: XOR EAX,EAX CMP CL,0x2d SETNZ AL MOV dword ptr [RDX],0x22 NEG RAX BTS RAX,0x3f JMP 0x0015d6c1 LAB_0015d768: MOV RAX,0x174876e800 IMUL RDI,RAX IMUL RAX,RBX,0x64 ADD RAX,RDI ADD RAX,RSI JMP 0x0015d6c1
ulong my_strtoll10(byte *param_1,ulong *param_2,int4 *param_3) { byte bVar1; byte bVar2; byte *pbVar3; byte *pbVar4; byte *pbVar5; byte bVar6; byte *pbVar7; ulong uVar8; ulong uVar9; uint uVar10; ulong uVar11; ulong uVar12; long lVar13; byte *pbVar14; ulong local_38; pbVar4 = param_1; if (param_2 == (ulong *)0x0) { bVar6 = *param_1; param_2 = &local_38; if (bVar6 != 0) { pbVar7 = param_1 + 0xffff; do { if ((PTR_ctype_latin1_0041cb30[(ulong)bVar6 + 1] & 8) == 0) { pbVar3 = pbVar4 + 0xffff; param_2 = &local_38; goto LAB_0015d51a; } bVar6 = pbVar4[1]; pbVar4 = pbVar4 + 1; pbVar7 = pbVar7 + 1; } while (bVar6 != 0); } goto LAB_0015d5ac; } pbVar7 = (byte *)*param_2; pbVar3 = param_1; if (param_1 < pbVar7) { do { pbVar4 = pbVar3; if ((PTR_ctype_latin1_0041cb30[(ulong)*pbVar3 + 1] & 8) == 0) break; pbVar3 = pbVar3 + 1; pbVar4 = pbVar7; } while (pbVar3 != pbVar7); } if (pbVar4 == pbVar7) goto LAB_0015d5ac; bVar6 = *pbVar4; pbVar3 = pbVar7; LAB_0015d51a: if (bVar6 == 0x2d) { *param_3 = 0xffffffff; if (pbVar4 + 1 == pbVar3) goto LAB_0015d5ac; uVar10 = 8; uVar11 = 0x15f797ae; uVar12 = 0x57f5ff8; LAB_0015d56a: pbVar4 = pbVar4 + 1; bVar2 = *pbVar4; } else { *param_3 = 0; bVar2 = *pbVar4; if (bVar2 == 0x2b) { if (pbVar4 + 1 == pbVar3) goto LAB_0015d5ac; uVar10 = 0xf; uVar11 = 0x2bef2f5c; uVar12 = 0xafebff0; goto LAB_0015d56a; } uVar10 = 0xf; uVar11 = 0x2bef2f5c; uVar12 = 0xafebff0; } if (bVar2 == 0x30) { uVar9 = 0; do { pbVar14 = pbVar4; pbVar5 = pbVar14 + 1; if (pbVar5 == pbVar3) goto LAB_0015d6b1; pbVar4 = pbVar5; } while (*pbVar5 == 0x30); pbVar14 = pbVar14 + 10; uVar9 = 0; } else { if (9 < (byte)(bVar2 - 0x30)) { LAB_0015d5ac: *param_3 = 0x21; *param_2 = (ulong)param_1; return 0; } uVar9 = (ulong)(byte)(bVar2 - 0x30); pbVar5 = pbVar4 + 1; pbVar14 = pbVar4 + 9; } if (pbVar3 < pbVar14) { pbVar14 = pbVar3; } for (; pbVar7 = pbVar5, pbVar5 != pbVar14; pbVar5 = pbVar5 + 1) { if (9 < (byte)(*pbVar5 - 0x30)) goto LAB_0015d6b1; uVar9 = (ulong)(byte)(*pbVar5 - 0x30) + uVar9 * 10; } if (pbVar5 != pbVar3) { pbVar4 = pbVar5 + 9; if (pbVar3 < pbVar5 + 9) { pbVar4 = pbVar3; } lVar13 = 9; uVar8 = 0; pbVar7 = pbVar5 + 1; do { pbVar14 = pbVar7; if (9 < (byte)(pbVar14[-1] - 0x30)) { pbVar14 = pbVar14 + -1; goto LAB_0015d6cf; } uVar8 = (ulong)(byte)(pbVar14[-1] - 0x30) + uVar8 * 10; pbVar7 = pbVar14 + 1; lVar13 = lVar13 + -1; } while (pbVar14 != pbVar4); if (pbVar4 == pbVar3) { if (lVar13 != 0) { LAB_0015d6cf: uVar9 = uVar9 * (&lfactor)[(uint)((int)pbVar14 - (int)pbVar5)] + uVar8; *param_2 = (ulong)pbVar14; goto LAB_0015d6bd; } } else { bVar2 = *pbVar14 - 0x30; if (bVar2 < 10) { if ((pbVar7 == pbVar3) || (bVar1 = *pbVar7, 9 < (byte)(bVar1 - 0x30))) { uVar11 = uVar9 * 10000000000 + uVar8 * 10 + (ulong)bVar2; *param_2 = (ulong)pbVar7; if (bVar6 != 0x2d) { return uVar11; } if (uVar11 < 0x8000000000000001) { return -uVar11; } } else { *param_2 = (ulong)(pbVar14 + 2); if ((((pbVar14 + 2 == pbVar3) || (9 < (byte)(pbVar14[2] - 0x30))) && (uVar9 <= uVar12)) && ((lVar13 = (ulong)(byte)(bVar1 - 0x30) + (ulong)bVar2 * 10, uVar9 != uVar12 || ((uVar8 <= uVar11 && ((uVar8 != uVar11 || ((uint)lVar13 <= uVar10)))))))) { return uVar8 * 100 + uVar9 * 100000000000 + lVar13; } } *param_3 = 0x22; return -(ulong)(bVar6 != 0x2d) | 0x8000000000000000; } } uVar8 = uVar8 + uVar9 * 1000000000; *param_2 = (ulong)pbVar14; if (bVar6 == 0x2d) { return -uVar8; } return uVar8; } LAB_0015d6b1: *param_2 = (ulong)pbVar7; LAB_0015d6bd: if (bVar6 == 0x2d) { return -uVar9; } return uVar9; }
25,531
common_context_params_to_llama(common_params const&)
llama.cpp/common/common.cpp
struct llama_context_params common_context_params_to_llama(const common_params & params) { auto cparams = llama_context_default_params(); cparams.n_ctx = params.n_ctx; cparams.n_seq_max = params.n_parallel; cparams.n_batch = params.n_batch; cparams.n_ubatch = params.n_ubatch; cparams.n_threads = params.cpuparams.n_threads; cparams.n_threads_batch = params.cpuparams_batch.n_threads == -1 ? params.cpuparams.n_threads : params.cpuparams_batch.n_threads; cparams.logits_all = params.logits_all; cparams.embeddings = params.embedding; cparams.rope_scaling_type = params.rope_scaling_type; cparams.rope_freq_base = params.rope_freq_base; cparams.rope_freq_scale = params.rope_freq_scale; cparams.yarn_ext_factor = params.yarn_ext_factor; cparams.yarn_attn_factor = params.yarn_attn_factor; cparams.yarn_beta_fast = params.yarn_beta_fast; cparams.yarn_beta_slow = params.yarn_beta_slow; cparams.yarn_orig_ctx = params.yarn_orig_ctx; cparams.pooling_type = params.pooling_type; cparams.attention_type = params.attention_type; cparams.defrag_thold = params.defrag_thold; cparams.cb_eval = params.cb_eval; cparams.cb_eval_user_data = params.cb_eval_user_data; cparams.offload_kqv = !params.no_kv_offload; cparams.flash_attn = params.flash_attn; cparams.no_perf = params.no_perf; if (params.reranking) { cparams.embeddings = true; cparams.pooling_type = LLAMA_POOLING_TYPE_RANK; } cparams.type_k = params.cache_type_k; cparams.type_v = params.cache_type_v; return cparams; }
O3
cpp
common_context_params_to_llama(common_params const&): pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx callq 0x15c80 movl 0x18(%r14), %eax movl %eax, 0xc(%rbx) movq 0x4(%r14), %rax movq %rax, (%rbx) movl 0xc(%r14), %eax movl %eax, 0x8(%rbx) movl 0x274(%r14), %eax movl %eax, 0x10(%rbx) movl 0x488(%r14), %ecx cmpl $-0x1, %ecx cmovel %eax, %ecx movl %ecx, 0x14(%rbx) movb 0x1029(%r14), %al movb %al, 0x60(%rbx) movb 0x10d8(%r14), %al movb %al, 0x61(%rbx) movups 0x2c(%r14), %xmm0 movups %xmm0, 0x24(%rbx) movsd 0x3c(%r14), %xmm0 movsd %xmm0, 0x34(%rbx) movl 0x44(%r14), %eax movl %eax, 0x3c(%rbx) movq 0x6b4(%r14), %rax movq %rax, 0x18(%rbx) movl 0x6bc(%r14), %eax movl %eax, 0x20(%rbx) movss 0x48(%r14), %xmm0 movss %xmm0, 0x40(%rbx) movups 0x6a0(%r14), %xmm0 movups %xmm0, 0x48(%rbx) movb 0x102f(%r14), %al xorb $0x1, %al movb %al, 0x62(%rbx) movb 0x1025(%r14), %al movb %al, 0x63(%rbx) movb 0x1026(%r14), %al movb %al, 0x64(%rbx) cmpb $0x1, 0x1120(%r14) jne 0x1ea45 movb $0x1, 0x61(%rbx) movl $0x4, 0x1c(%rbx) movq 0x1034(%r14), %rax movq %rax, 0x58(%rbx) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
_Z30common_context_params_to_llamaRK13common_params: push r14 push rbx push rax mov r14, rsi mov rbx, rdi call _llama_context_default_params mov eax, [r14+18h] mov [rbx+0Ch], eax mov rax, [r14+4] mov [rbx], rax mov eax, [r14+0Ch] mov [rbx+8], eax mov eax, [r14+274h] mov [rbx+10h], eax mov ecx, [r14+488h] cmp ecx, 0FFFFFFFFh cmovz ecx, eax mov [rbx+14h], ecx mov al, [r14+1029h] mov [rbx+60h], al mov al, [r14+10D8h] mov [rbx+61h], al movups xmm0, xmmword ptr [r14+2Ch] movups xmmword ptr [rbx+24h], xmm0 movsd xmm0, qword ptr [r14+3Ch] movsd qword ptr [rbx+34h], xmm0 mov eax, [r14+44h] mov [rbx+3Ch], eax mov rax, [r14+6B4h] mov [rbx+18h], rax mov eax, [r14+6BCh] mov [rbx+20h], eax movss xmm0, dword ptr [r14+48h] movss dword ptr [rbx+40h], xmm0 movups xmm0, xmmword ptr [r14+6A0h] movups xmmword ptr [rbx+48h], xmm0 mov al, [r14+102Fh] xor al, 1 mov [rbx+62h], al mov al, [r14+1025h] mov [rbx+63h], al mov al, [r14+1026h] mov [rbx+64h], al cmp byte ptr [r14+1120h], 1 jnz short loc_1EA45 mov byte ptr [rbx+61h], 1 mov dword ptr [rbx+1Ch], 4 loc_1EA45: mov rax, [r14+1034h] mov [rbx+58h], rax mov rax, rbx add rsp, 8 pop rbx pop r14 retn
long long common_context_params_to_llama(long long a1, long long a2) { int v2; // eax int v3; // ecx llama_context_default_params(a1); *(_DWORD *)(a1 + 12) = *(_DWORD *)(a2 + 24); *(_QWORD *)a1 = *(_QWORD *)(a2 + 4); *(_DWORD *)(a1 + 8) = *(_DWORD *)(a2 + 12); v2 = *(_DWORD *)(a2 + 628); *(_DWORD *)(a1 + 16) = v2; v3 = *(_DWORD *)(a2 + 1160); if ( v3 == -1 ) v3 = v2; *(_DWORD *)(a1 + 20) = v3; *(_BYTE *)(a1 + 96) = *(_BYTE *)(a2 + 4137); *(_BYTE *)(a1 + 97) = *(_BYTE *)(a2 + 4312); *(_OWORD *)(a1 + 36) = *(_OWORD *)(a2 + 44); *(_QWORD *)(a1 + 52) = *(_QWORD *)(a2 + 60); *(_DWORD *)(a1 + 60) = *(_DWORD *)(a2 + 68); *(_QWORD *)(a1 + 24) = *(_QWORD *)(a2 + 1716); *(_DWORD *)(a1 + 32) = *(_DWORD *)(a2 + 1724); *(_DWORD *)(a1 + 64) = *(_DWORD *)(a2 + 72); *(_OWORD *)(a1 + 72) = *(_OWORD *)(a2 + 1696); *(_BYTE *)(a1 + 98) = *(_BYTE *)(a2 + 4143) ^ 1; *(_BYTE *)(a1 + 99) = *(_BYTE *)(a2 + 4133); *(_BYTE *)(a1 + 100) = *(_BYTE *)(a2 + 4134); if ( *(_BYTE *)(a2 + 4384) == 1 ) { *(_BYTE *)(a1 + 97) = 1; *(_DWORD *)(a1 + 28) = 4; } *(_QWORD *)(a1 + 88) = *(_QWORD *)(a2 + 4148); return a1; }
common_context_params_to_llama: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI CALL 0x00115c80 MOV EAX,dword ptr [R14 + 0x18] MOV dword ptr [RBX + 0xc],EAX MOV RAX,qword ptr [R14 + 0x4] MOV qword ptr [RBX],RAX MOV EAX,dword ptr [R14 + 0xc] MOV dword ptr [RBX + 0x8],EAX MOV EAX,dword ptr [R14 + 0x274] MOV dword ptr [RBX + 0x10],EAX MOV ECX,dword ptr [R14 + 0x488] CMP ECX,-0x1 CMOVZ ECX,EAX MOV dword ptr [RBX + 0x14],ECX MOV AL,byte ptr [R14 + 0x1029] MOV byte ptr [RBX + 0x60],AL MOV AL,byte ptr [R14 + 0x10d8] MOV byte ptr [RBX + 0x61],AL MOVUPS XMM0,xmmword ptr [R14 + 0x2c] MOVUPS xmmword ptr [RBX + 0x24],XMM0 MOVSD XMM0,qword ptr [R14 + 0x3c] MOVSD qword ptr [RBX + 0x34],XMM0 MOV EAX,dword ptr [R14 + 0x44] MOV dword ptr [RBX + 0x3c],EAX MOV RAX,qword ptr [R14 + 0x6b4] MOV qword ptr [RBX + 0x18],RAX MOV EAX,dword ptr [R14 + 0x6bc] MOV dword ptr [RBX + 0x20],EAX MOVSS XMM0,dword ptr [R14 + 0x48] MOVSS dword ptr [RBX + 0x40],XMM0 MOVUPS XMM0,xmmword ptr [R14 + 0x6a0] MOVUPS xmmword ptr [RBX + 0x48],XMM0 MOV AL,byte ptr [R14 + 0x102f] XOR AL,0x1 MOV byte ptr [RBX + 0x62],AL MOV AL,byte ptr [R14 + 0x1025] MOV byte ptr [RBX + 0x63],AL MOV AL,byte ptr [R14 + 0x1026] MOV byte ptr [RBX + 0x64],AL CMP byte ptr [R14 + 0x1120],0x1 JNZ 0x0011ea45 MOV byte ptr [RBX + 0x61],0x1 MOV dword ptr [RBX + 0x1c],0x4 LAB_0011ea45: MOV RAX,qword ptr [R14 + 0x1034] MOV qword ptr [RBX + 0x58],RAX MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
/* common_context_params_to_llama(common_params const&) */ common_params * common_context_params_to_llama(common_params *param_1) { int iVar1; int8 uVar2; int iVar3; long in_RSI; llama_context_default_params(); *(int4 *)(param_1 + 0xc) = *(int4 *)(in_RSI + 0x18); *(int8 *)param_1 = *(int8 *)(in_RSI + 4); *(int4 *)(param_1 + 8) = *(int4 *)(in_RSI + 0xc); iVar1 = *(int *)(in_RSI + 0x274); *(int *)(param_1 + 0x10) = iVar1; iVar3 = *(int *)(in_RSI + 0x488); if (*(int *)(in_RSI + 0x488) == -1) { iVar3 = iVar1; } *(int *)(param_1 + 0x14) = iVar3; param_1[0x60] = *(common_params *)(in_RSI + 0x1029); param_1[0x61] = *(common_params *)(in_RSI + 0x10d8); uVar2 = *(int8 *)(in_RSI + 0x34); *(int8 *)(param_1 + 0x24) = *(int8 *)(in_RSI + 0x2c); *(int8 *)(param_1 + 0x2c) = uVar2; *(int8 *)(param_1 + 0x34) = *(int8 *)(in_RSI + 0x3c); *(int4 *)(param_1 + 0x3c) = *(int4 *)(in_RSI + 0x44); *(int8 *)(param_1 + 0x18) = *(int8 *)(in_RSI + 0x6b4); *(int4 *)(param_1 + 0x20) = *(int4 *)(in_RSI + 0x6bc); *(int4 *)(param_1 + 0x40) = *(int4 *)(in_RSI + 0x48); uVar2 = *(int8 *)(in_RSI + 0x6a8); *(int8 *)(param_1 + 0x48) = *(int8 *)(in_RSI + 0x6a0); *(int8 *)(param_1 + 0x50) = uVar2; param_1[0x62] = (common_params)(*(byte *)(in_RSI + 0x102f) ^ 1); param_1[99] = *(common_params *)(in_RSI + 0x1025); param_1[100] = *(common_params *)(in_RSI + 0x1026); if (*(char *)(in_RSI + 0x1120) == '\x01') { param_1[0x61] = (common_params)0x1; *(int4 *)(param_1 + 0x1c) = 4; } *(int8 *)(param_1 + 0x58) = *(int8 *)(in_RSI + 0x1034); return param_1; }
25,532
my_parse_charset_xml
eloqsql/strings/ctype.c
my_bool my_parse_charset_xml(MY_CHARSET_LOADER *loader, const char *buf, size_t len) { MY_XML_PARSER p; struct my_cs_file_info info; my_bool rc; my_charset_file_init(&info); my_xml_parser_create(&p); my_xml_set_enter_handler(&p,cs_enter); my_xml_set_value_handler(&p,cs_value); my_xml_set_leave_handler(&p,cs_leave); info.loader= loader; my_xml_set_user_data(&p, (void *) &info); rc= (my_xml_parse(&p,buf,len) == MY_XML_OK) ? FALSE : TRUE; my_xml_parser_free(&p); my_charset_file_free(&info); if (rc != MY_XML_OK) { const char *errstr= my_xml_error_string(&p); if (sizeof(loader->error) > 32 + strlen(errstr)) { /* We cannot use my_snprintf() here. See previous comment. */ sprintf(loader->error, "at line %d pos %d: %s", my_xml_error_lineno(&p)+1, (int) my_xml_error_pos(&p), my_xml_error_string(&p)); } } return rc; }
O3
c
my_parse_charset_xml: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x928, %rsp # imm = 0x928 movq %rdx, %r14 movq %rsi, %r12 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) leaq -0x260(%rbp), %r15 movl $0xc8, %edx movq %r15, %rdi xorl %esi, %esi callq 0x24180 xorps %xmm0, %xmm0 movups %xmm0, -0x58(%r15) movups %xmm0, -0x4f(%r15) leaq -0x190(%rbp), %r13 movq %r13, %rdi callq 0x5b0ec leaq 0x10e(%rip), %rsi # 0x53fed movq %r13, %rdi callq 0x5b161 leaq 0x1ec(%rip), %rsi # 0x540da movq %r13, %rdi callq 0x5b154 leaq 0x9e5(%rip), %rsi # 0x548e2 movq %r13, %rdi callq 0x5b16e movq %rbx, -0x948(%rbp) movq %rbx, 0xc8(%r15) leaq -0x940(%rbp), %rbx movq %r13, %rdi movq %rbx, %rsi callq 0x5b17b movq %r13, %rdi movq %r12, %rsi movq %r14, %rdx callq 0x5a64c movl %eax, %r14d movq %r13, %rdi callq 0x5b128 movq -0x58(%r15), %rdi movq 0x7a8(%rbx), %rax callq *0x98(%rax) testl %r14d, %r14d je 0x53fc1 leaq -0x190(%rbp), %rdi callq 0x5b188 movq %rax, %rdi callq 0x24120 addq $0x20, %rax cmpq $0x7f, %rax ja 0x53fc1 leaq -0x190(%rbp), %rbx movq %rbx, %rdi callq 0x5b1c5 leal 0x1(%rax), %r15d movq %rbx, %rdi callq 0x5b192 movq %rax, %r12 movq %rbx, %rdi callq 0x5b188 movq %rax, (%rsp) leaq 0xafb3(%rip), %rcx # 0x5ef56 movl $0x80, %edx movq -0x948(%rbp), %rdi movl $0x1, %esi movl %r15d, %r8d movl %r12d, %r9d xorl %eax, %eax callq 0x241c0 testl %r14d, %r14d setne %al movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0x53fe8 addq $0x928, %rsp # imm = 0x928 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x24320
my_parse_charset_xml: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 928h mov r14, rdx mov r12, rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax lea r15, [rbp+var_260] mov edx, 0C8h mov rdi, r15 xor esi, esi call _memset xorps xmm0, xmm0 movups xmmword ptr [r15-58h], xmm0 movups xmmword ptr [r15-4Fh], xmm0 lea r13, [rbp+var_190] mov rdi, r13 call my_xml_parser_create lea rsi, cs_enter mov rdi, r13 call my_xml_set_enter_handler lea rsi, cs_value mov rdi, r13 call my_xml_set_value_handler lea rsi, cs_leave mov rdi, r13 call my_xml_set_leave_handler mov [rbp+var_948], rbx mov [r15+0C8h], rbx lea rbx, [rbp+var_940] mov rdi, r13 mov rsi, rbx call my_xml_set_user_data mov rdi, r13 mov rsi, r12 mov rdx, r14 call my_xml_parse mov r14d, eax mov rdi, r13 call my_xml_parser_free mov rdi, [r15-58h] mov rax, [rbx+7A8h] call qword ptr [rax+98h] test r14d, r14d jz short loc_53FC1 lea rdi, [rbp+var_190] call my_xml_error_string mov rdi, rax call _strlen add rax, 20h ; ' ' cmp rax, 7Fh ja short loc_53FC1 lea rbx, [rbp+var_190] mov rdi, rbx call my_xml_error_lineno lea r15d, [rax+1] mov rdi, rbx call my_xml_error_pos mov r12, rax mov rdi, rbx call my_xml_error_string mov [rsp+950h+var_950], rax lea rcx, aAtLineDPosDS; "at line %d pos %d: %s" mov edx, 80h mov rdi, [rbp+var_948] mov esi, 1 mov r8d, r15d mov r9d, r12d xor eax, eax call ___sprintf_chk loc_53FC1: test r14d, r14d setnz al mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz short loc_53FE8 add rsp, 928h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_53FE8: call ___stack_chk_fail
bool my_parse_charset_xml(long long a1, long long a2, long long a3) { int v4; // r14d long long v5; // rax int v6; // r15d int v7; // r12d const char *v8; // rax _QWORD v10[220]; // [rsp+10h] [rbp-940h] BYREF _BYTE v11[200]; // [rsp+6F0h] [rbp-260h] BYREF long long v12; // [rsp+7B8h] [rbp-198h] _BYTE v13[352]; // [rsp+7C0h] [rbp-190h] BYREF unsigned long long v14; // [rsp+920h] [rbp-30h] v14 = __readfsqword(0x28u); memset(v11, 0LL, sizeof(v11)); memset(&v10[209], 0, 25); my_xml_parser_create(v13); my_xml_set_enter_handler(v13, cs_enter); my_xml_set_value_handler(v13, cs_value); my_xml_set_leave_handler(v13, cs_leave); v12 = a1; my_xml_set_user_data(v13, v10); v4 = my_xml_parse(v13, a2, a3); my_xml_parser_free(v13); (*(void ( **)(_QWORD))(v12 + 152))(v10[209]); if ( v4 ) { v5 = my_xml_error_string(v13); if ( (unsigned long long)(strlen(v5) + 32) <= 0x7F ) { v6 = my_xml_error_lineno(v13) + 1; v7 = my_xml_error_pos(v13); v8 = (const char *)my_xml_error_string(v13); __sprintf_chk(a1, 1LL, 128LL, "at line %d pos %d: %s", v6, v7, v8); } } return v4 != 0; }
my_parse_charset_xml: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x928 MOV R14,RDX MOV R12,RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX LEA R15,[RBP + -0x260] MOV EDX,0xc8 MOV RDI,R15 XOR ESI,ESI CALL 0x00124180 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R15 + -0x58],XMM0 MOVUPS xmmword ptr [R15 + -0x4f],XMM0 LEA R13,[RBP + -0x190] MOV RDI,R13 CALL 0x0015b0ec LEA RSI,[0x153fed] MOV RDI,R13 CALL 0x0015b161 LEA RSI,[0x1540da] MOV RDI,R13 CALL 0x0015b154 LEA RSI,[0x1548e2] MOV RDI,R13 CALL 0x0015b16e MOV qword ptr [RBP + -0x948],RBX MOV qword ptr [R15 + 0xc8],RBX LEA RBX,[RBP + -0x940] MOV RDI,R13 MOV RSI,RBX CALL 0x0015b17b MOV RDI,R13 MOV RSI,R12 MOV RDX,R14 CALL 0x0015a64c MOV R14D,EAX MOV RDI,R13 CALL 0x0015b128 MOV RDI,qword ptr [R15 + -0x58] MOV RAX,qword ptr [RBX + 0x7a8] CALL qword ptr [RAX + 0x98] TEST R14D,R14D JZ 0x00153fc1 LEA RDI,[RBP + -0x190] CALL 0x0015b188 MOV RDI,RAX CALL 0x00124120 ADD RAX,0x20 CMP RAX,0x7f JA 0x00153fc1 LEA RBX,[RBP + -0x190] MOV RDI,RBX CALL 0x0015b1c5 LEA R15D,[RAX + 0x1] MOV RDI,RBX CALL 0x0015b192 MOV R12,RAX MOV RDI,RBX CALL 0x0015b188 MOV qword ptr [RSP],RAX LEA RCX,[0x15ef56] MOV EDX,0x80 MOV RDI,qword ptr [RBP + -0x948] MOV ESI,0x1 MOV R8D,R15D MOV R9D,R12D XOR EAX,EAX CALL 0x001241c0 LAB_00153fc1: TEST R14D,R14D SETNZ AL MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x00153fe8 ADD RSP,0x928 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00153fe8: CALL 0x00124320
bool my_parse_charset_xml(long param_1,int8 param_2,int8 param_3) { int iVar1; int iVar2; int4 uVar3; char *__s; size_t sVar4; int8 uVar5; long in_FS_OFFSET; int1 local_948 [1672]; int8 local_2c0; int1 uStack_2b8; int7 uStack_2b7; int1 uStack_2b0; int8 uStack_2af; int1 local_268 [200]; long local_1a0; int1 local_198 [352]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); memset(local_268,0,200); local_2c0 = 0; uStack_2b8 = 0; uStack_2b7 = 0; uStack_2b0 = 0; uStack_2af = 0; my_xml_parser_create(local_198); my_xml_set_enter_handler(local_198,cs_enter); my_xml_set_value_handler(local_198,cs_value); my_xml_set_leave_handler(local_198,cs_leave); local_1a0 = param_1; my_xml_set_user_data(local_198,local_948); iVar1 = my_xml_parse(local_198,param_2,param_3); my_xml_parser_free(local_198); (**(code **)(local_1a0 + 0x98))(local_2c0); if (iVar1 != 0) { __s = (char *)my_xml_error_string(local_198); sVar4 = strlen(__s); if (sVar4 + 0x20 < 0x80) { iVar2 = my_xml_error_lineno(local_198); uVar3 = my_xml_error_pos(local_198); uVar5 = my_xml_error_string(local_198); __sprintf_chk(param_1,1,0x80,"at line %d pos %d: %s",iVar2 + 1,uVar3,uVar5); } } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return iVar1 != 0; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
25,533
LefDefParser::lefwLayerAntennaCumRoutingPlusCut()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwLayerAntennaCumRoutingPlusCut() { if (!lefwFile) return LEFW_UNINITIALIZED; if (lefwState != LEFW_LAYERROUTING_START && lefwState != LEFW_LAYERROUTING && lefwState != LEFW_LAYER_START && lefwState != LEFW_LAYER) return LEFW_BAD_ORDER; if (!lefwIsRouting && !lefwIsCut) return LEFW_BAD_DATA; /* WANDA if ((versionNum < 5.4) && (diffUseOnly && strcmp(diffUseOnly, "DIFFUSEONLY") == 0)) return LEFW_WRONG_VERSION; */ if (lefwWriteEncrypt) encPrint(lefwFile, (char*) " ANTENNACUMROUTINGPLUSCUT ;\n"); else { fprintf(lefwFile, " ANTENNACUMROUTINGPLUSCUT ;\n"); } lefwLines++; return LEFW_OK; }
O0
cpp
LefDefParser::lefwLayerAntennaCumRoutingPlusCut(): pushq %rax leaq 0xa3768(%rip), %rax # 0xc5250 cmpq $0x0, (%rax) jne 0x21afb movl $0x1, 0x4(%rsp) jmp 0x21baf leaq 0xa399e(%rip), %rax # 0xc54a0 cmpl $0x7, (%rax) je 0x21b35 leaq 0xa3992(%rip), %rax # 0xc54a0 cmpl $0x1f, (%rax) je 0x21b35 leaq 0xa3986(%rip), %rax # 0xc54a0 cmpl $0x6, (%rax) je 0x21b35 leaq 0xa397a(%rip), %rax # 0xc54a0 cmpl $0x1c, (%rax) je 0x21b35 movl $0x2, 0x4(%rsp) jmp 0x21baf leaq 0xa39d8(%rip), %rax # 0xc5514 cmpl $0x0, (%rax) jne 0x21b57 leaq 0xa398c(%rip), %rax # 0xc54d4 cmpl $0x0, (%rax) jne 0x21b57 movl $0x3, 0x4(%rsp) jmp 0x21baf cmpl $0x0, 0xa39de(%rip) # 0xc553c je 0x21b7a leaq 0xa36e9(%rip), %rax # 0xc5250 movq (%rax), %rdi leaq 0x719af(%rip), %rsi # 0x93520 movb $0x0, %al callq 0x8bf50 jmp 0x21b92 leaq 0xa36cf(%rip), %rax # 0xc5250 movq (%rax), %rdi leaq 0x71995(%rip), %rsi # 0x93520 movb $0x0, %al callq 0x2370 leaq 0xa3903(%rip), %rax # 0xc549c movl (%rax), %ecx addl $0x1, %ecx leaq 0xa38f7(%rip), %rax # 0xc549c movl %ecx, (%rax) movl $0x0, 0x4(%rsp) movl 0x4(%rsp), %eax popq %rcx retq nopw %cs:(%rax,%rax)
_ZN12LefDefParser33lefwLayerAntennaCumRoutingPlusCutEv: push rax lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile cmp qword ptr [rax], 0 jnz short loc_21AFB mov [rsp+8+var_4], 1 jmp loc_21BAF loc_21AFB: lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 7 jz short loc_21B35 lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 1Fh jz short loc_21B35 lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 6 jz short loc_21B35 lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 1Ch jz short loc_21B35 mov [rsp+8+var_4], 2 jmp short loc_21BAF loc_21B35: lea rax, _ZN12LefDefParser13lefwIsRoutingE; LefDefParser::lefwIsRouting cmp dword ptr [rax], 0 jnz short loc_21B57 lea rax, _ZN12LefDefParser9lefwIsCutE; LefDefParser::lefwIsCut cmp dword ptr [rax], 0 jnz short loc_21B57 mov [rsp+8+var_4], 3 jmp short loc_21BAF loc_21B57: cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt jz short loc_21B7A lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] lea rsi, aAntennacumrout; " ANTENNACUMROUTINGPLUSCUT ;\n" mov al, 0 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_21B92 loc_21B7A: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] lea rsi, aAntennacumrout; " ANTENNACUMROUTINGPLUSCUT ;\n" mov al, 0 call _fprintf loc_21B92: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov ecx, [rax] add ecx, 1 lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov [rax], ecx mov [rsp+8+var_4], 0 loc_21BAF: mov eax, [rsp+8+var_4] pop rcx retn
long long LefDefParser::lefwLayerAntennaCumRoutingPlusCut( LefDefParser *this, long long a2, int a3, int a4, int a5, int a6) { if ( *(_QWORD *)&LefDefParser::lefwFile ) { if ( LefDefParser::lefwState == 7 || LefDefParser::lefwState == 31 || LefDefParser::lefwState == 6 || LefDefParser::lefwState == 28 ) { if ( LefDefParser::lefwIsRouting || LefDefParser::lefwIsCut ) { if ( LefDefParser::lefwWriteEncrypt ) LefDefParser::encPrint( LefDefParser::lefwFile, (unsigned int)" ANTENNACUMROUTINGPLUSCUT ;\n", a3, a4, a5, a6); else fprintf(*(_QWORD *)&LefDefParser::lefwFile, " ANTENNACUMROUTINGPLUSCUT ;\n"); ++LefDefParser::lefwLines; return 0; } else { return 3; } } else { return 2; } } else { return 1; } }
lefwLayerAntennaCumRoutingPlusCut: PUSH RAX LEA RAX,[0x1c5250] CMP qword ptr [RAX],0x0 JNZ 0x00121afb MOV dword ptr [RSP + 0x4],0x1 JMP 0x00121baf LAB_00121afb: LEA RAX,[0x1c54a0] CMP dword ptr [RAX],0x7 JZ 0x00121b35 LEA RAX,[0x1c54a0] CMP dword ptr [RAX],0x1f JZ 0x00121b35 LEA RAX,[0x1c54a0] CMP dword ptr [RAX],0x6 JZ 0x00121b35 LEA RAX,[0x1c54a0] CMP dword ptr [RAX],0x1c JZ 0x00121b35 MOV dword ptr [RSP + 0x4],0x2 JMP 0x00121baf LAB_00121b35: LEA RAX,[0x1c5514] CMP dword ptr [RAX],0x0 JNZ 0x00121b57 LEA RAX,[0x1c54d4] CMP dword ptr [RAX],0x0 JNZ 0x00121b57 MOV dword ptr [RSP + 0x4],0x3 JMP 0x00121baf LAB_00121b57: CMP dword ptr [0x001c553c],0x0 JZ 0x00121b7a LEA RAX,[0x1c5250] MOV RDI,qword ptr [RAX] LEA RSI,[0x193520] MOV AL,0x0 CALL 0x0018bf50 JMP 0x00121b92 LAB_00121b7a: LEA RAX,[0x1c5250] MOV RDI,qword ptr [RAX] LEA RSI,[0x193520] MOV AL,0x0 CALL 0x00102370 LAB_00121b92: LEA RAX,[0x1c549c] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x1c549c] MOV dword ptr [RAX],ECX MOV dword ptr [RSP + 0x4],0x0 LAB_00121baf: MOV EAX,dword ptr [RSP + 0x4] POP RCX RET
/* LefDefParser::lefwLayerAntennaCumRoutingPlusCut() */ int4 LefDefParser::lefwLayerAntennaCumRoutingPlusCut(void) { int4 local_4; if (lefwFile == (_IO_FILE *)0x0) { local_4 = 1; } else if ((((lefwState == 7) || (lefwState == 0x1f)) || (lefwState == 6)) || (lefwState == 0x1c)) { if ((lefwIsRouting == 0) && (lefwIsCut == 0)) { local_4 = 3; } else { if (lefwWriteEncrypt == 0) { fprintf(lefwFile," ANTENNACUMROUTINGPLUSCUT ;\n"); } else { encPrint(lefwFile," ANTENNACUMROUTINGPLUSCUT ;\n"); } lefwLines = lefwLines + 1; local_4 = 0; } } else { local_4 = 2; } return local_4; }
25,534
LefDefParser::lefwLayerAntennaCumRoutingPlusCut()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwLayerAntennaCumRoutingPlusCut() { if (!lefwFile) return LEFW_UNINITIALIZED; if (lefwState != LEFW_LAYERROUTING_START && lefwState != LEFW_LAYERROUTING && lefwState != LEFW_LAYER_START && lefwState != LEFW_LAYER) return LEFW_BAD_ORDER; if (!lefwIsRouting && !lefwIsCut) return LEFW_BAD_DATA; /* WANDA if ((versionNum < 5.4) && (diffUseOnly && strcmp(diffUseOnly, "DIFFUSEONLY") == 0)) return LEFW_WRONG_VERSION; */ if (lefwWriteEncrypt) encPrint(lefwFile, (char*) " ANTENNACUMROUTINGPLUSCUT ;\n"); else { fprintf(lefwFile, " ANTENNACUMROUTINGPLUSCUT ;\n"); } lefwLines++; return LEFW_OK; }
O3
cpp
LefDefParser::lefwLayerAntennaCumRoutingPlusCut(): leaq 0x7659d(%rip), %rax # 0x8d0f0 movq (%rax), %rcx testq %rcx, %rcx je 0x16bae leaq 0x767de(%rip), %rax # 0x8d340 movl (%rax), %edx movl $0x2, %eax cmpl $0x1f, %edx ja 0x16bd9 movl $0x900000c0, %esi # imm = 0x900000C0 btl %edx, %esi jae 0x16bd9 leaq 0x76835(%rip), %rdx # 0x8d3b4 leaq 0x767ee(%rip), %rax # 0x8d374 movl (%rax), %esi movl $0x3, %eax orl (%rdx), %esi je 0x16bd9 pushq %rax cmpb $0x1, 0x76843(%rip) # 0x8d3dc jne 0x16bb4 leaq 0x44966(%rip), %rsi # 0x5b508 movq %rcx, %rdi xorl %eax, %eax callq 0x55afd jmp 0x16bca movl $0x1, %eax retq leaq 0x4494d(%rip), %rdi # 0x5b508 movl $0x1e, %esi movl $0x1, %edx callq 0x23d0 leaq 0x7676b(%rip), %rax # 0x8d33c incl (%rax) xorl %eax, %eax addq $0x8, %rsp retq
_ZN12LefDefParser33lefwLayerAntennaCumRoutingPlusCutEv: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rcx, [rax] test rcx, rcx jz short loc_16BAE lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState mov edx, [rax] mov eax, 2 cmp edx, 1Fh ja short locret_16BD9 mov esi, 900000C0h bt esi, edx jnb short locret_16BD9 lea rdx, _ZN12LefDefParser13lefwIsRoutingE; LefDefParser::lefwIsRouting lea rax, _ZN12LefDefParser9lefwIsCutE; LefDefParser::lefwIsCut mov esi, [rax] mov eax, 3 or esi, [rdx] jz short locret_16BD9 push rax cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt jnz short loc_16BB4 lea rsi, aAntennacumrout; " ANTENNACUMROUTINGPLUSCUT ;\n" mov rdi, rcx xor eax, eax call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_16BCA loc_16BAE: mov eax, 1 retn loc_16BB4: lea rdi, aAntennacumrout; " ANTENNACUMROUTINGPLUSCUT ;\n" mov esi, 1Eh mov edx, 1 call _fwrite loc_16BCA: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines inc dword ptr [rax] xor eax, eax add rsp, 8 locret_16BD9: retn
long long LefDefParser::lefwLayerAntennaCumRoutingPlusCut( LefDefParser *this, long long a2, long long a3, long long a4, int a5, int a6) { long long result; // rax int v7; // esi if ( !*(_QWORD *)&LefDefParser::lefwFile ) return 1LL; result = 2LL; if ( LefDefParser::lefwState <= 0x1F ) { v7 = -1879048000; if ( _bittest(&v7, LefDefParser::lefwState) ) { result = 3LL; if ( LefDefParser::lefwIsRouting | LefDefParser::lefwIsCut ) { if ( LefDefParser::lefwWriteEncrypt == 1 ) LefDefParser::encPrint( LefDefParser::lefwFile, (unsigned int)" ANTENNACUMROUTINGPLUSCUT ;\n", (unsigned int)&LefDefParser::lefwIsRouting, LefDefParser::lefwFile, a5, a6); else fwrite(" ANTENNACUMROUTINGPLUSCUT ;\n", 30LL, 1LL, *(_QWORD *)&LefDefParser::lefwFile); ++LefDefParser::lefwLines; return 0LL; } } } return result; }
lefwLayerAntennaCumRoutingPlusCut: LEA RAX,[0x18d0f0] MOV RCX,qword ptr [RAX] TEST RCX,RCX JZ 0x00116bae LEA RAX,[0x18d340] MOV EDX,dword ptr [RAX] MOV EAX,0x2 CMP EDX,0x1f JA 0x00116bd9 MOV ESI,0x900000c0 BT ESI,EDX JNC 0x00116bd9 LEA RDX,[0x18d3b4] LEA RAX,[0x18d374] MOV ESI,dword ptr [RAX] MOV EAX,0x3 OR ESI,dword ptr [RDX] JZ 0x00116bd9 PUSH RAX CMP byte ptr [0x0018d3dc],0x1 JNZ 0x00116bb4 LEA RSI,[0x15b508] MOV RDI,RCX XOR EAX,EAX CALL 0x00155afd JMP 0x00116bca LAB_00116bae: MOV EAX,0x1 RET LAB_00116bb4: LEA RDI,[0x15b508] MOV ESI,0x1e MOV EDX,0x1 CALL 0x001023d0 LAB_00116bca: LEA RAX,[0x18d33c] INC dword ptr [RAX] XOR EAX,EAX ADD RSP,0x8 LAB_00116bd9: RET
/* LefDefParser::lefwLayerAntennaCumRoutingPlusCut() */ int8 LefDefParser::lefwLayerAntennaCumRoutingPlusCut(void) { int8 uVar1; if (lefwFile != (_IO_FILE *)0x0) { uVar1 = 2; if (((lefwState < 0x20) && ((0x900000c0U >> (lefwState & 0x1f) & 1) != 0)) && (uVar1 = 3, lefwIsCut != 0 || lefwIsRouting != 0)) { if (lefwWriteEncrypt == '\x01') { encPrint(lefwFile," ANTENNACUMROUTINGPLUSCUT ;\n"); } else { fwrite(" ANTENNACUMROUTINGPLUSCUT ;\n",0x1e,1,lefwFile); } lefwLines = lefwLines + 1; uVar1 = 0; } return uVar1; } return 1; }
25,535
bool nlohmann::json_abi_v3_11_3::operator==<unsigned long, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, unsigned long)
monkey531[P]llama/common/json.hpp
bool operator==(const_reference lhs, ScalarType rhs) noexcept { return lhs == basic_json(rhs); }
O3
cpp
bool nlohmann::json_abi_v3_11_3::operator==<unsigned long, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, unsigned long): pushq %r14 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx xorps %xmm0, %xmm0 movq %rsp, %r14 movaps %xmm0, (%r14) movq %r14, %rdi callq 0x6083e movq %r14, %rdi movl $0x1, %esi callq 0x58484 movq %rbx, %rdi movq %r14, %rsi callq 0x8cd20 movl %eax, %ebx movq %r14, %rdi xorl %esi, %esi callq 0x58484 movq %r14, %rdi callq 0x5d972 movl %ebx, %eax addq $0x18, %rsp popq %rbx popq %r14 retq nop
_ZN8nlohmann16json_abi_v3_11_3eqImTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEES3_: push r14 push rbx sub rsp, 18h mov rbx, rdi xorps xmm0, xmm0 mov r14, rsp movaps xmmword ptr [r14], xmm0 mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE6EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_17number_unsigned_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)6>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::number_unsigned_t) mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov ebx, eax mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov eax, ebx add rsp, 18h pop rbx pop r14 retn
long long ZN8nlohmann16json_abi_v3_11_3eqImTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEES3_( unsigned __int8 *a1, long long a2) { unsigned int v2; // ebx _OWORD v4[2]; // [rsp+0h] [rbp-28h] BYREF v4[0] = 0LL; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)6>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( (unsigned __int8 *)v4, a2); 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 *)v4); v2 = nlohmann::json_abi_v3_11_3::operator==(a1, (unsigned __int8 *)v4, (__m128d)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 *)v4); 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(v4); return v2; }
_ZN8nlohmann16json_abi_v3_11_3eqImTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEES3_: PUSH R14 PUSH RBX SUB RSP,0x18 MOV RBX,RDI XORPS XMM0,XMM0 MOV R14,RSP MOVAPS xmmword ptr [R14],XMM0 MOV RDI,R14 CALL 0x0016083e MOV RDI,R14 MOV ESI,0x1 CALL 0x00158484 MOV RDI,RBX MOV RSI,R14 CALL 0x0018cd20 MOV EBX,EAX MOV RDI,R14 XOR ESI,ESI CALL 0x00158484 MOV RDI,R14 CALL 0x0015d972 MOV EAX,EBX ADD RSP,0x18 POP RBX POP R14 RET
int4 _ZN8nlohmann16json_abi_v3_11_3eqImTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEES3_ (basic_json *param_1) { int4 uVar1; int8 local_28; int8 uStack_20; local_28 = 0; uStack_20 = 0; nlohmann::json_abi_v3_11_3::detail:: external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)6>:: construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (&local_28); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(&local_28,0)); uVar1 = nlohmann::json_abi_v3_11_3::operator==(param_1,(basic_json *)&local_28); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(&local_28,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)&local_28); return uVar1; }
25,536
my_strerror
eloqsql/strings/my_vsnprintf.c
const char* my_strerror(char *buf, size_t len, int nr) { char *msg= NULL; buf[0]= '\0'; /* failsafe */ if (nr <= 0) { strmake(buf, (nr == 0 ? "Internal error/check (Not system error)" : "Internal error < 0 (Not system error)"), len-1); return buf; } /* These (handler-) error messages are shared by perror, as required by the principle of least surprise. */ if ((nr >= HA_ERR_FIRST) && (nr <= HA_ERR_LAST)) { msg= (char *) handler_error_messages[nr - HA_ERR_FIRST]; strmake(buf, msg, len - 1); } else { /* On Windows, do things the Windows way. On a system that supports both the GNU and the XSI variant, use whichever was configured (GNU); if this choice is not advertised, use the default (POSIX/XSI). Testing for __GNUC__ is not sufficient to determine whether this choice exists. */ #if defined(_WIN32) strerror_s(buf, len, nr); #elif ((defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE >= 200112L)) || \ (defined _XOPEN_SOURCE && (_XOPEN_SOURCE >= 600))) && \ ! defined _GNU_SOURCE strerror_r(nr, buf, len); /* I can build with or without GNU */ #elif defined(__GLIBC__) && defined (_GNU_SOURCE) char *r= strerror_r(nr, buf, len); if (r != buf) /* Want to help, GNU? */ strmake(buf, r, len - 1); /* Then don't. */ #else strerror_r(nr, buf, len); #endif } /* strerror() return values are implementation-dependent, so let's be pragmatic. */ if (!buf[0]) strmake(buf, "unknown error", len - 1); return buf; }
O3
c
my_strerror: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx movb $0x0, (%rdi) testl %edx, %edx jle 0x4a0aa leal -0x78(%rdx), %eax cmpl $0x4e, %eax ja 0x4a0be movl %eax, %eax leaq 0x8df7b(%rip), %rcx # 0xd801c movslq (%rcx,%rax,4), %rsi addq %rcx, %rsi jmp 0x4a0d3 leaq 0x160c8(%rip), %rax # 0x60179 leaq 0x160e9(%rip), %rsi # 0x601a1 cmoveq %rax, %rsi jmp 0x4a0eb movl %edx, %edi movq %rbx, %rsi movq %r14, %rdx callq 0x250c0 movq %rax, %rsi cmpq %rbx, %rax je 0x4a0df leaq -0x1(%r14), %rdx movq %rbx, %rdi callq 0x4a33c cmpb $0x0, (%rbx) jne 0x4a0f9 leaq 0x160dc(%rip), %rsi # 0x601c7 decq %r14 movq %rbx, %rdi movq %r14, %rdx callq 0x4a33c movq %rbx, %rax popq %rbx popq %r14 popq %rbp retq
my_strerror: push rbp mov rbp, rsp push r14 push rbx mov r14, rsi mov rbx, rdi mov byte ptr [rdi], 0 test edx, edx jle short loc_4A0AA lea eax, [rdx-78h] cmp eax, 4Eh ; 'N' ja short loc_4A0BE mov eax, eax lea rcx, handler_error_messages_rel movsxd rsi, dword ptr [rcx+rax*4] add rsi, rcx jmp short loc_4A0D3 loc_4A0AA: lea rax, aInternalErrorC; "Internal error/check (Not system error)" lea rsi, aInternalError0; "Internal error < 0 (Not system error)" cmovz rsi, rax jmp short loc_4A0EB loc_4A0BE: mov edi, edx mov rsi, rbx mov rdx, r14 call _strerror_r mov rsi, rax cmp rax, rbx jz short loc_4A0DF loc_4A0D3: lea rdx, [r14-1] mov rdi, rbx call strmake loc_4A0DF: cmp byte ptr [rbx], 0 jnz short loc_4A0F9 lea rsi, aUnknownError; "unknown error" loc_4A0EB: dec r14 mov rdi, rbx mov rdx, r14 call strmake loc_4A0F9: mov rax, rbx pop rbx pop r14 pop rbp retn
char * my_strerror(char *a1, long long a2, int a3) { char *v4; // rsi const char *v5; // rsi *a1 = 0; if ( a3 <= 0 ) { v5 = "Internal error < 0 (Not system error)"; if ( !a3 ) v5 = "Internal error/check (Not system error)"; goto LABEL_11; } if ( (unsigned int)(a3 - 120) > 0x4E ) { v4 = (char *)strerror_r((unsigned int)a3, a1, a2); if ( v4 == a1 ) goto LABEL_9; } else { v4 = (char *)handler_error_messages_rel + handler_error_messages_rel[a3 - 120]; } strmake(a1, v4, a2 - 1); LABEL_9: if ( !*a1 ) { v5 = "unknown error"; LABEL_11: strmake(a1, v5, a2 - 1); } return a1; }
my_strerror: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV R14,RSI MOV RBX,RDI MOV byte ptr [RDI],0x0 TEST EDX,EDX JLE 0x0014a0aa LEA EAX,[RDX + -0x78] CMP EAX,0x4e JA 0x0014a0be MOV EAX,EAX LEA RCX,[0x1d801c] MOVSXD RSI,dword ptr [RCX + RAX*0x4] ADD RSI,RCX JMP 0x0014a0d3 LAB_0014a0aa: LEA RAX,[0x160179] LEA RSI,[0x1601a1] CMOVZ RSI,RAX JMP 0x0014a0eb LAB_0014a0be: MOV EDI,EDX MOV RSI,RBX MOV RDX,R14 CALL 0x001250c0 MOV RSI,RAX CMP RAX,RBX JZ 0x0014a0df LAB_0014a0d3: LEA RDX,[R14 + -0x1] MOV RDI,RBX CALL 0x0014a33c LAB_0014a0df: CMP byte ptr [RBX],0x0 JNZ 0x0014a0f9 LEA RSI,[0x1601c7] LAB_0014a0eb: DEC R14 MOV RDI,RBX MOV RDX,R14 CALL 0x0014a33c LAB_0014a0f9: MOV RAX,RBX POP RBX POP R14 POP RBP RET
char * my_strerror(char *param_1,size_t param_2,int param_3) { char *pcVar1; *param_1 = '\0'; if (param_3 < 1) { pcVar1 = "Internal error < 0 (Not system error)"; if (param_3 == 0) { pcVar1 = "Internal error/check (Not system error)"; } goto LAB_0014a0eb; } if (param_3 - 0x78U < 0x4f) { pcVar1 = handler_error_messages_rel + *(int *)(handler_error_messages_rel + (ulong)(param_3 - 0x78U) * 4); LAB_0014a0d3: strmake(param_1,pcVar1,param_2 - 1); } else { pcVar1 = strerror_r(param_3,param_1,param_2); if (pcVar1 != param_1) goto LAB_0014a0d3; } if (*param_1 != '\0') { return param_1; } pcVar1 = "unknown error"; LAB_0014a0eb: strmake(param_1,pcVar1,param_2 - 1); return param_1; }
25,537
thr_reschedule_write_lock
eloqsql/mysys/thr_lock.c
my_bool thr_reschedule_write_lock(THR_LOCK_DATA *data, ulong lock_wait_timeout) { THR_LOCK *lock=data->lock; enum thr_lock_type write_lock_type; DBUG_ENTER("thr_reschedule_write_lock"); mysql_mutex_lock(&lock->mutex); if (!lock->read_wait.data) /* No waiting read locks */ { mysql_mutex_unlock(&lock->mutex); DBUG_RETURN(0); } write_lock_type= data->type; data->type=TL_WRITE_DELAYED; if (lock->update_status) (*lock->update_status)(data->status_param); if (((*data->prev)=data->next)) /* remove from lock-list */ data->next->prev= data->prev; else lock->write.last=data->prev; if ((data->next=lock->write_wait.data)) /* Put first in lock_list */ data->next->prev= &data->next; else lock->write_wait.last= &data->next; data->prev= &lock->write_wait.data; data->cond=get_cond(); /* This was zero */ lock->write_wait.data=data; free_all_read_locks(lock,0); mysql_mutex_unlock(&lock->mutex); DBUG_RETURN(thr_upgrade_write_delay_lock(data, write_lock_type, lock_wait_timeout)); }
O0
c
thr_reschedule_write_lock: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rdi addq $0x18, %rdi leaq 0x5b326(%rip), %rsi # 0x1557c1 movl $0x5de, %edx # imm = 0x5DE callq 0xf87b0 movq -0x20(%rbp), %rax cmpq $0x0, 0x60(%rax) jne 0xfa4c6 movq -0x20(%rbp), %rdi addq $0x18, %rdi callq 0xf8820 movb $0x0, -0x1(%rbp) jmp 0xfa5df movq -0x10(%rbp), %rax movl 0x40(%rax), %eax movl %eax, -0x24(%rbp) movq -0x10(%rbp), %rax movl $0x9, 0x40(%rax) movq -0x20(%rbp), %rax cmpq $0x0, 0xc0(%rax) je 0xfa4fe movq -0x20(%rbp), %rax movq 0xc0(%rax), %rax movq -0x10(%rbp), %rcx movq 0x28(%rcx), %rdi callq *%rax movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq -0x10(%rbp), %rcx movq 0x10(%rcx), %rcx movq %rax, (%rcx) cmpq $0x0, %rax je 0xfa52d movq -0x10(%rbp), %rax movq 0x10(%rax), %rcx movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rcx, 0x10(%rax) jmp 0xfa540 movq -0x10(%rbp), %rax movq 0x10(%rax), %rcx movq -0x20(%rbp), %rax movq %rcx, 0x98(%rax) movq -0x20(%rbp), %rax movq 0x80(%rax), %rax movq -0x10(%rbp), %rcx movq %rax, 0x8(%rcx) cmpq $0x0, %rax je 0xfa56f movq -0x10(%rbp), %rcx addq $0x8, %rcx movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rcx, 0x10(%rax) jmp 0xfa582 movq -0x10(%rbp), %rcx addq $0x8, %rcx movq -0x20(%rbp), %rax movq %rcx, 0x88(%rax) movq -0x20(%rbp), %rcx addq $0x80, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x10(%rax) callq 0xfa5f0 movq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x20(%rax) movq -0x10(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, 0x80(%rax) movq -0x20(%rbp), %rdi xorl %esi, %esi callq 0xfa600 movq -0x20(%rbp), %rdi addq $0x18, %rdi callq 0xf8820 movq -0x10(%rbp), %rdi movl -0x24(%rbp), %esi movq -0x18(%rbp), %rdx callq 0xf9ef0 movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
thr_reschedule_write_lock: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] mov rax, [rax+18h] mov [rbp+var_20], rax mov rdi, [rbp+var_20] add rdi, 18h lea rsi, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 5DEh call inline_mysql_mutex_lock_27 mov rax, [rbp+var_20] cmp qword ptr [rax+60h], 0 jnz short loc_FA4C6 mov rdi, [rbp+var_20] add rdi, 18h call inline_mysql_mutex_unlock_28 mov [rbp+var_1], 0 jmp loc_FA5DF loc_FA4C6: mov rax, [rbp+var_10] mov eax, [rax+40h] mov [rbp+var_24], eax mov rax, [rbp+var_10] mov dword ptr [rax+40h], 9 mov rax, [rbp+var_20] cmp qword ptr [rax+0C0h], 0 jz short loc_FA4FE mov rax, [rbp+var_20] mov rax, [rax+0C0h] mov rcx, [rbp+var_10] mov rdi, [rcx+28h] call rax loc_FA4FE: mov rax, [rbp+var_10] mov rax, [rax+8] mov rcx, [rbp+var_10] mov rcx, [rcx+10h] mov [rcx], rax cmp rax, 0 jz short loc_FA52D mov rax, [rbp+var_10] mov rcx, [rax+10h] mov rax, [rbp+var_10] mov rax, [rax+8] mov [rax+10h], rcx jmp short loc_FA540 loc_FA52D: mov rax, [rbp+var_10] mov rcx, [rax+10h] mov rax, [rbp+var_20] mov [rax+98h], rcx loc_FA540: mov rax, [rbp+var_20] mov rax, [rax+80h] mov rcx, [rbp+var_10] mov [rcx+8], rax cmp rax, 0 jz short loc_FA56F mov rcx, [rbp+var_10] add rcx, 8 mov rax, [rbp+var_10] mov rax, [rax+8] mov [rax+10h], rcx jmp short loc_FA582 loc_FA56F: mov rcx, [rbp+var_10] add rcx, 8 mov rax, [rbp+var_20] mov [rax+88h], rcx loc_FA582: mov rcx, [rbp+var_20] add rcx, 80h mov rax, [rbp+var_10] mov [rax+10h], rcx call get_cond mov rcx, rax mov rax, [rbp+var_10] mov [rax+20h], rcx mov rcx, [rbp+var_10] mov rax, [rbp+var_20] mov [rax+80h], rcx mov rdi, [rbp+var_20] xor esi, esi call free_all_read_locks mov rdi, [rbp+var_20] add rdi, 18h call inline_mysql_mutex_unlock_28 mov rdi, [rbp+var_10] mov esi, [rbp+var_24] mov rdx, [rbp+var_18] call thr_upgrade_write_delay_lock mov [rbp+var_1], al loc_FA5DF: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char thr_reschedule_write_lock(long long a1, long long a2) { long long v2; // rax long long v3; // rax int v5; // [rsp+Ch] [rbp-24h] long long v6; // [rsp+10h] [rbp-20h] v6 = *(_QWORD *)(a1 + 24); inline_mysql_mutex_lock_27(v6 + 24, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c", 0x5DEu); if ( *(_QWORD *)(v6 + 96) ) { v5 = *(_DWORD *)(a1 + 64); *(_DWORD *)(a1 + 64) = 9; if ( *(_QWORD *)(v6 + 192) ) (*(void ( **)(_QWORD))(v6 + 192))(*(_QWORD *)(a1 + 40)); v2 = *(_QWORD *)(a1 + 8); **(_QWORD **)(a1 + 16) = v2; if ( v2 ) *(_QWORD *)(*(_QWORD *)(a1 + 8) + 16LL) = *(_QWORD *)(a1 + 16); else *(_QWORD *)(v6 + 152) = *(_QWORD *)(a1 + 16); v3 = *(_QWORD *)(v6 + 128); *(_QWORD *)(a1 + 8) = v3; if ( v3 ) *(_QWORD *)(*(_QWORD *)(a1 + 8) + 16LL) = a1 + 8; else *(_QWORD *)(v6 + 136) = a1 + 8; *(_QWORD *)(a1 + 16) = v6 + 128; *(_QWORD *)(a1 + 32) = get_cond(); *(_QWORD *)(v6 + 128) = a1; free_all_read_locks(v6, 0LL); inline_mysql_mutex_unlock_28(v6 + 24); return thr_upgrade_write_delay_lock(a1, v5, a2); } else { inline_mysql_mutex_unlock_28(v6 + 24); return 0; } }
thr_reschedule_write_lock: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x18 LEA RSI,[0x2557c1] MOV EDX,0x5de CALL 0x001f87b0 MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX + 0x60],0x0 JNZ 0x001fa4c6 MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x18 CALL 0x001f8820 MOV byte ptr [RBP + -0x1],0x0 JMP 0x001fa5df LAB_001fa4c6: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x40] MOV dword ptr [RBP + -0x24],EAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x40],0x9 MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX + 0xc0],0x0 JZ 0x001fa4fe MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0xc0] MOV RCX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RCX + 0x28] CALL RAX LAB_001fa4fe: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x10] MOV qword ptr [RCX],RAX CMP RAX,0x0 JZ 0x001fa52d MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RAX + 0x10],RCX JMP 0x001fa540 LAB_001fa52d: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x98],RCX LAB_001fa540: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x80] MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x8],RAX CMP RAX,0x0 JZ 0x001fa56f MOV RCX,qword ptr [RBP + -0x10] ADD RCX,0x8 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RAX + 0x10],RCX JMP 0x001fa582 LAB_001fa56f: MOV RCX,qword ptr [RBP + -0x10] ADD RCX,0x8 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x88],RCX LAB_001fa582: MOV RCX,qword ptr [RBP + -0x20] ADD RCX,0x80 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x10],RCX CALL 0x001fa5f0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x20],RCX MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x80],RCX MOV RDI,qword ptr [RBP + -0x20] XOR ESI,ESI CALL 0x001fa600 MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x18 CALL 0x001f8820 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x24] MOV RDX,qword ptr [RBP + -0x18] CALL 0x001f9ef0 MOV byte ptr [RBP + -0x1],AL LAB_001fa5df: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 thr_reschedule_write_lock(long param_1,int8 param_2) { int4 uVar1; long lVar2; long lVar3; int8 uVar4; int1 local_9; lVar2 = *(long *)(param_1 + 0x18); inline_mysql_mutex_lock (lVar2 + 0x18,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x5de); if (*(long *)(lVar2 + 0x60) == 0) { inline_mysql_mutex_unlock(lVar2 + 0x18); local_9 = 0; } else { uVar1 = *(int4 *)(param_1 + 0x40); *(int4 *)(param_1 + 0x40) = 9; if (*(long *)(lVar2 + 0xc0) != 0) { (**(code **)(lVar2 + 0xc0))(*(int8 *)(param_1 + 0x28)); } lVar3 = *(long *)(param_1 + 8); **(long **)(param_1 + 0x10) = lVar3; if (lVar3 == 0) { *(int8 *)(lVar2 + 0x98) = *(int8 *)(param_1 + 0x10); } else { *(int8 *)(*(long *)(param_1 + 8) + 0x10) = *(int8 *)(param_1 + 0x10); } lVar3 = *(long *)(lVar2 + 0x80); *(long *)(param_1 + 8) = lVar3; if (lVar3 == 0) { *(long *)(lVar2 + 0x88) = param_1 + 8; } else { *(long *)(*(long *)(param_1 + 8) + 0x10) = param_1 + 8; } *(long *)(param_1 + 0x10) = lVar2 + 0x80; uVar4 = get_cond(); *(int8 *)(param_1 + 0x20) = uVar4; *(long *)(lVar2 + 0x80) = param_1; free_all_read_locks(lVar2,0); inline_mysql_mutex_unlock(lVar2 + 0x18); local_9 = thr_upgrade_write_delay_lock(param_1,uVar1,param_2); } return local_9; }
25,538
testing::internal::ShouldShard(char const*, char const*, bool)
seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/src/gtest.cc
bool ShouldShard(const char* total_shards_env, const char* shard_index_env, bool in_subprocess_for_death_test) { if (in_subprocess_for_death_test) { return false; } const int32_t total_shards = Int32FromEnvOrDie(total_shards_env, -1); const int32_t shard_index = Int32FromEnvOrDie(shard_index_env, -1); if (total_shards == -1 && shard_index == -1) { return false; } else if (total_shards == -1 && shard_index != -1) { const Message msg = Message() << "Invalid environment variables: you have " << kTestShardIndex << " = " << shard_index << ", but have left " << kTestTotalShards << " unset.\n"; ColoredPrintf(GTestColor::kRed, "%s", msg.GetString().c_str()); fflush(stdout); exit(EXIT_FAILURE); } else if (total_shards != -1 && shard_index == -1) { const Message msg = Message() << "Invalid environment variables: you have " << kTestTotalShards << " = " << total_shards << ", but have left " << kTestShardIndex << " unset.\n"; ColoredPrintf(GTestColor::kRed, "%s", msg.GetString().c_str()); fflush(stdout); exit(EXIT_FAILURE); } else if (shard_index < 0 || shard_index >= total_shards) { const Message msg = Message() << "Invalid environment variables: we require 0 <= " << kTestShardIndex << " < " << kTestTotalShards << ", but you have " << kTestShardIndex << "=" << shard_index << ", " << kTestTotalShards << "=" << total_shards << ".\n"; ColoredPrintf(GTestColor::kRed, "%s", msg.GetString().c_str()); fflush(stdout); exit(EXIT_FAILURE); } return total_shards > 1; }
O1
cpp
testing::internal::ShouldShard(char const*, char const*, bool): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp testl %edx, %edx jne 0x26567 movq %rsi, %r14 movl $0xffffffff, %esi # imm = 0xFFFFFFFF callq 0x2698d movl %eax, %ebx movq %r14, %rdi movl $0xffffffff, %esi # imm = 0xFFFFFFFF callq 0x2698d movl %eax, %ebp andl %ebx, %eax cmpl $-0x1, %eax je 0x26567 cmpl $-0x1, %ebx setne %al cmpl $-0x1, %ebp sete %cl orb %al, %cl je 0x26572 cmpl $-0x1, %ebp setne %al cmpl $-0x1, %ebx sete %cl orb %al, %cl je 0x26674 testl %ebp, %ebp js 0x26794 cmpl %ebx, %ebp jge 0x26794 cmpl $0x2, %ebx setge %al jmp 0x26569 xorl %eax, %eax addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq leaq 0x8(%rsp), %rbx movq %rbx, %rdi callq 0x20c50 movq (%rbx), %rdi addq $0x10, %rdi leaq 0x1d74a(%rip), %rsi # 0x43cd7 movl $0x28, %edx callq 0x95a0 movq 0x8(%rsp), %rdi addq $0x10, %rdi leaq 0x1ab49(%rip), %rsi # 0x410f0 movl $0x11, %edx callq 0x95a0 movq 0x8(%rsp), %rdi addq $0x10, %rdi leaq 0x1d7ca(%rip), %rsi # 0x43d8b movl $0x3, %edx callq 0x95a0 movq 0x8(%rsp), %rdi addq $0x10, %rdi movl %ebp, %esi callq 0x9960 movq 0x8(%rsp), %rdi addq $0x10, %rdi leaq 0x1d715(%rip), %rsi # 0x43d00 movl $0x10, %edx callq 0x95a0 movq 0x8(%rsp), %rdi addq $0x10, %rdi leaq 0x1aacb(%rip), %rsi # 0x410d0 movl $0x12, %edx callq 0x95a0 movq 0x8(%rsp), %rdi addq $0x10, %rdi leaq 0x1d6f2(%rip), %rsi # 0x43d11 movl $0x8, %edx callq 0x95a0 leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rsi callq 0x38418 movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x26648 movq (%rdi), %rax callq *0x8(%rax) movq 0x28(%rsp), %rsi leaq 0x8(%rsp), %rdi callq 0x20eb3 movq 0x8(%rsp), %rdx leaq 0x1d72e(%rip), %rsi # 0x43d91 movl $0x1, %edi xorl %eax, %eax callq 0x26396 jmp 0x26771 leaq 0x8(%rsp), %r14 movq %r14, %rdi callq 0x20c50 movq (%r14), %rdi addq $0x10, %rdi leaq 0x1d648(%rip), %rsi # 0x43cd7 movl $0x28, %edx callq 0x95a0 movq 0x8(%rsp), %rdi addq $0x10, %rdi leaq 0x1aa27(%rip), %rsi # 0x410d0 movl $0x12, %edx callq 0x95a0 movq 0x8(%rsp), %rdi addq $0x10, %rdi leaq 0x1d6c8(%rip), %rsi # 0x43d8b movl $0x3, %edx callq 0x95a0 movq 0x8(%rsp), %rdi addq $0x10, %rdi movl %ebx, %esi callq 0x9960 movq 0x8(%rsp), %rdi addq $0x10, %rdi leaq 0x1d613(%rip), %rsi # 0x43d00 movl $0x10, %edx callq 0x95a0 movq 0x8(%rsp), %rdi addq $0x10, %rdi leaq 0x1a9e9(%rip), %rsi # 0x410f0 movl $0x11, %edx callq 0x95a0 movq 0x8(%rsp), %rdi addq $0x10, %rdi leaq 0x1d5f0(%rip), %rsi # 0x43d11 movl $0x8, %edx callq 0x95a0 leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rsi callq 0x38418 movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x2674a movq (%rdi), %rax callq *0x8(%rax) movq 0x28(%rsp), %rsi leaq 0x8(%rsp), %rdi callq 0x20eb3 movq 0x8(%rsp), %rdx leaq 0x1d62c(%rip), %rsi # 0x43d91 movl $0x1, %edi xorl %eax, %eax callq 0x26396 leaq 0x8(%rsp), %rdi callq 0x9aa8 movq 0x337fe(%rip), %rax # 0x59f80 movq (%rax), %rdi callq 0x95f0 movl $0x1, %edi callq 0x9650 leaq 0x8(%rsp), %r14 movq %r14, %rdi callq 0x20c50 movq (%r14), %rdi addq $0x10, %rdi leaq 0x1d56b(%rip), %rsi # 0x43d1a movl $0x2f, %edx callq 0x95a0 movq 0x8(%rsp), %rdi addq $0x10, %rdi leaq 0x1a927(%rip), %rsi # 0x410f0 movl $0x11, %edx callq 0x95a0 movq 0x8(%rsp), %rdi addq $0x10, %rdi leaq 0x1d567(%rip), %rsi # 0x43d4a movl $0x3, %edx callq 0x95a0 movq 0x8(%rsp), %rdi addq $0x10, %rdi leaq 0x1a8d3(%rip), %rsi # 0x410d0 movl $0x12, %edx callq 0x95a0 movq 0x8(%rsp), %rdi addq $0x10, %rdi leaq 0x1d537(%rip), %rsi # 0x43d4e movl $0xf, %edx callq 0x95a0 movq 0x8(%rsp), %rdi addq $0x10, %rdi leaq 0x1a8bf(%rip), %rsi # 0x410f0 movl $0x11, %edx callq 0x95a0 movq 0x8(%rsp), %rdi addq $0x10, %rdi leaq 0x19f28(%rip), %rsi # 0x40773 movl $0x1, %edx callq 0x95a0 movq 0x8(%rsp), %rdi addq $0x10, %rdi movl %ebp, %esi callq 0x9960 movq 0x8(%rsp), %rdi addq $0x10, %rdi leaq 0x1e263(%rip), %rsi # 0x44ad8 movl $0x2, %edx callq 0x95a0 movq 0x8(%rsp), %rdi addq $0x10, %rdi leaq 0x1a841(%rip), %rsi # 0x410d0 movl $0x12, %edx callq 0x95a0 movq 0x8(%rsp), %rdi addq $0x10, %rdi leaq 0x19eca(%rip), %rsi # 0x40773 movl $0x1, %edx callq 0x95a0 movq 0x8(%rsp), %rdi addq $0x10, %rdi movl %ebx, %esi callq 0x9960 movq 0x8(%rsp), %rdi addq $0x10, %rdi leaq 0x1cc63(%rip), %rsi # 0x43536 movl $0x2, %edx callq 0x95a0 leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rsi callq 0x38418 movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x268fc movq (%rdi), %rax callq *0x8(%rax) movq 0x28(%rsp), %rsi leaq 0x8(%rsp), %rdi callq 0x20eb3 movq 0x8(%rsp), %rdx leaq 0x1d47a(%rip), %rsi # 0x43d91 movl $0x1, %edi xorl %eax, %eax callq 0x26396 jmp 0x26771 jmp 0x2692e jmp 0x26950 jmp 0x2692e movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x26953 movq 0x18(%rsp), %rsi incq %rsi callq 0x94c0 jmp 0x26953 jmp 0x26950 movq %rax, %rbx movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x26963 movq (%rdi), %rax callq *0x8(%rax) movq $0x0, 0x28(%rsp) jmp 0x26985 jmp 0x26972 jmp 0x26972 movq %rax, %rbx movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x26985 movq (%rdi), %rax callq *0x8(%rax) movq %rbx, %rdi callq 0x99a0
_ZN7testing8internal11ShouldShardEPKcS2_b: push rbp push r14 push rbx sub rsp, 30h test edx, edx jnz short loc_26567 mov r14, rsi mov esi, 0FFFFFFFFh; char * call _ZN7testing8internal17Int32FromEnvOrDieEPKci; testing::internal::Int32FromEnvOrDie(char const*,int) mov ebx, eax mov rdi, r14; this mov esi, 0FFFFFFFFh; char * call _ZN7testing8internal17Int32FromEnvOrDieEPKci; testing::internal::Int32FromEnvOrDie(char const*,int) mov ebp, eax and eax, ebx cmp eax, 0FFFFFFFFh jz short loc_26567 cmp ebx, 0FFFFFFFFh setnz al cmp ebp, 0FFFFFFFFh setz cl or cl, al jz short loc_26572 cmp ebp, 0FFFFFFFFh setnz al cmp ebx, 0FFFFFFFFh setz cl or cl, al jz loc_26674 test ebp, ebp js loc_26794 cmp ebp, ebx jge loc_26794 cmp ebx, 2 setnl al jmp short loc_26569 loc_26567: xor eax, eax loc_26569: add rsp, 30h pop rbx pop r14 pop rbp retn loc_26572: lea rbx, [rsp+48h+var_40] mov rdi, rbx; this call _ZN7testing7MessageC2Ev; testing::Message::Message(void) mov rdi, [rbx] add rdi, 10h lea rsi, aInvalidEnviron; "Invalid environment variables: you have"... mov edx, 28h ; '(' call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+48h+var_40] add rdi, 10h lea rsi, _ZN7testingL15kTestShardIndexE; "GTEST_SHARD_INDEX" mov edx, 11h call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+48h+var_40] add rdi, 10h lea rsi, aS_2+6; " = " mov edx, 3 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+48h+var_40] add rdi, 10h mov esi, ebp call __ZNSolsEi; std::ostream::operator<<(int) mov rdi, [rsp+48h+var_40] add rdi, 10h lea rsi, aButHaveLeft; ", but have left " mov edx, 10h call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+48h+var_40] add rdi, 10h lea rsi, _ZN7testingL16kTestTotalShardsE; "GTEST_TOTAL_SHARDS" mov edx, 12h call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+48h+var_40] add rdi, 10h lea rsi, aUnset; " unset.\n" mov edx, 8 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rdi, [rsp+48h+var_20]; this lea rsi, [rsp+48h+var_40]; testing::Message * call _ZN7testing7MessageC2ERKS0_; testing::Message::Message(testing::Message const&) mov rdi, [rsp+48h+var_40] test rdi, rdi jz short loc_26648 mov rax, [rdi] call qword ptr [rax+8] loc_26648: mov rsi, [rsp+48h+var_20] lea rdi, [rsp+48h+var_40] call _ZN7testing8internal20StringStreamToStringEPNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE; testing::internal::StringStreamToString(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> *) mov rdx, [rsp+48h+var_40] lea rsi, aS_0+2; "%s" mov edi, 1 xor eax, eax call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...) jmp loc_26771 loc_26674: lea r14, [rsp+48h+var_40] mov rdi, r14; this call _ZN7testing7MessageC2Ev; testing::Message::Message(void) mov rdi, [r14] add rdi, 10h lea rsi, aInvalidEnviron; "Invalid environment variables: you have"... mov edx, 28h ; '(' call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+48h+var_40] add rdi, 10h lea rsi, _ZN7testingL16kTestTotalShardsE; "GTEST_TOTAL_SHARDS" mov edx, 12h call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+48h+var_40] add rdi, 10h lea rsi, aS_2+6; " = " mov edx, 3 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+48h+var_40] add rdi, 10h mov esi, ebx call __ZNSolsEi; std::ostream::operator<<(int) mov rdi, [rsp+48h+var_40] add rdi, 10h lea rsi, aButHaveLeft; ", but have left " mov edx, 10h call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+48h+var_40] add rdi, 10h lea rsi, _ZN7testingL15kTestShardIndexE; "GTEST_SHARD_INDEX" mov edx, 11h call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+48h+var_40] add rdi, 10h lea rsi, aUnset; " unset.\n" mov edx, 8 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rdi, [rsp+48h+var_20]; this lea rsi, [rsp+48h+var_40]; testing::Message * call _ZN7testing7MessageC2ERKS0_; testing::Message::Message(testing::Message const&) mov rdi, [rsp+48h+var_40] test rdi, rdi jz short loc_2674A mov rax, [rdi] call qword ptr [rax+8] loc_2674A: mov rsi, [rsp+48h+var_20] lea rdi, [rsp+48h+var_40] call _ZN7testing8internal20StringStreamToStringEPNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE; testing::internal::StringStreamToString(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> *) mov rdx, [rsp+48h+var_40] lea rsi, aS_0+2; "%s" mov edi, 1 xor eax, eax call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...) loc_26771: lea rdi, [rsp+48h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush mov edi, 1 call _exit loc_26794: lea r14, [rsp+48h+var_40] mov rdi, r14; this call _ZN7testing7MessageC2Ev; testing::Message::Message(void) mov rdi, [r14] add rdi, 10h lea rsi, aInvalidEnviron_0; "Invalid environment variables: we requi"... mov edx, 2Fh ; '/' call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+48h+var_40] add rdi, 10h lea rsi, _ZN7testingL15kTestShardIndexE; "GTEST_SHARD_INDEX" mov edx, 11h call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+48h+var_40] add rdi, 10h lea rsi, asc_43D4A; " < " mov edx, 3 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+48h+var_40] add rdi, 10h lea rsi, _ZN7testingL16kTestTotalShardsE; "GTEST_TOTAL_SHARDS" mov edx, 12h call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+48h+var_40] add rdi, 10h lea rsi, aButYouHave; ", but you have " mov edx, 0Fh call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+48h+var_40] add rdi, 10h lea rsi, _ZN7testingL15kTestShardIndexE; "GTEST_SHARD_INDEX" mov edx, 11h call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+48h+var_40] add rdi, 10h lea rsi, asc_40772+1; "=" mov edx, 1 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+48h+var_40] add rdi, 10h mov esi, ebp call __ZNSolsEi; std::ostream::operator<<(int) mov rdi, [rsp+48h+var_40] add rdi, 10h lea rsi, aMustBeInRange0+15h; ", " mov edx, 2 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+48h+var_40] add rdi, 10h lea rsi, _ZN7testingL16kTestTotalShardsE; "GTEST_TOTAL_SHARDS" mov edx, 12h call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+48h+var_40] add rdi, 10h lea rsi, asc_40772+1; "=" mov edx, 1 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+48h+var_40] add rdi, 10h mov esi, ebx call __ZNSolsEi; std::ostream::operator<<(int) mov rdi, [rsp+48h+var_40] add rdi, 10h lea rsi, aNoteRandomizin+32h; ".\n" mov edx, 2 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rdi, [rsp+48h+var_20]; this lea rsi, [rsp+48h+var_40]; testing::Message * call _ZN7testing7MessageC2ERKS0_; testing::Message::Message(testing::Message const&) mov rdi, [rsp+48h+var_40] test rdi, rdi jz short loc_268FC mov rax, [rdi] call qword ptr [rax+8] loc_268FC: mov rsi, [rsp+48h+var_20] lea rdi, [rsp+48h+var_40] call _ZN7testing8internal20StringStreamToStringEPNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE; testing::internal::StringStreamToString(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> *) mov rdx, [rsp+48h+var_40] lea rsi, aS_0+2; "%s" mov edi, 1 xor eax, eax call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...) jmp loc_26771 jmp short loc_2692E jmp short loc_26950 jmp short $+2 loc_2692E: mov rbx, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_26953 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_26953 jmp short $+2 loc_26950: mov rbx, rax loc_26953: mov rdi, [rsp+arg_20] test rdi, rdi jz short loc_26963 mov rax, [rdi] call qword ptr [rax+8] loc_26963: mov [rsp+arg_20], 0 jmp short loc_26985 jmp short loc_26972 jmp short $+2 loc_26972: mov rbx, rax mov rdi, [rsp+arg_0] test rdi, rdi jz short loc_26985 mov rax, [rdi] call qword ptr [rax+8] loc_26985: mov rdi, rbx call __Unwind_Resume
bool testing::internal::ShouldShard( testing::internal *this, testing::internal *a2, const char *a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { int v11; // ebx int v12; // edx int v13; // ebp long long v15; // rcx long long v16; // r8 long long v17; // r9 __m128 v18; // xmm4 __m128 v19; // xmm5 char v20; // [rsp+0h] [rbp-48h] long long v21[4]; // [rsp+8h] [rbp-40h] BYREF long long v22[4]; // [rsp+28h] [rbp-20h] BYREF if ( !(_DWORD)a3 ) { v11 = testing::internal::Int32FromEnvOrDie(this, (const char *)0xFFFFFFFFLL, 0); v13 = testing::internal::Int32FromEnvOrDie(a2, (const char *)0xFFFFFFFFLL, v12); if ( (v11 & v13) != 0xFFFFFFFF ) { if ( v11 != -1 || v13 == -1 ) { if ( v13 != -1 || v11 == -1 ) { if ( v13 >= 0 && v13 < v11 ) return v11 >= 2; testing::Message::Message((testing::Message *)v21); std::__ostream_insert<char,std::char_traits<char>>( v21[0] + 16, "Invalid environment variables: we require 0 <= ", 47LL); std::__ostream_insert<char,std::char_traits<char>>(v21[0] + 16, "GTEST_SHARD_INDEX", 17LL); std::__ostream_insert<char,std::char_traits<char>>(v21[0] + 16, " < ", 3LL); std::__ostream_insert<char,std::char_traits<char>>(v21[0] + 16, "GTEST_TOTAL_SHARDS", 18LL); std::__ostream_insert<char,std::char_traits<char>>(v21[0] + 16, ", but you have ", 15LL); std::__ostream_insert<char,std::char_traits<char>>(v21[0] + 16, "GTEST_SHARD_INDEX", 17LL); std::__ostream_insert<char,std::char_traits<char>>(v21[0] + 16, "=", 1LL); std::ostream::operator<<(v21[0] + 16, (unsigned int)v13); std::__ostream_insert<char,std::char_traits<char>>(v21[0] + 16, ", ", 2LL); std::__ostream_insert<char,std::char_traits<char>>(v21[0] + 16, "GTEST_TOTAL_SHARDS", 18LL); std::__ostream_insert<char,std::char_traits<char>>(v21[0] + 16, "=", 1LL); std::ostream::operator<<(v21[0] + 16, (unsigned int)v11); std::__ostream_insert<char,std::char_traits<char>>(v21[0] + 16, ".\n", 2LL); testing::Message::Message((testing::Message *)v22, (const testing::Message *)v21); if ( v21[0] ) (*(void ( **)(long long))(*(_QWORD *)v21[0] + 8LL))(v21[0]); } else { testing::Message::Message((testing::Message *)v21); std::__ostream_insert<char,std::char_traits<char>>( v21[0] + 16, "Invalid environment variables: you have ", 40LL); std::__ostream_insert<char,std::char_traits<char>>(v21[0] + 16, "GTEST_TOTAL_SHARDS", 18LL); std::__ostream_insert<char,std::char_traits<char>>(v21[0] + 16, " = ", 3LL); std::ostream::operator<<(v21[0] + 16, (unsigned int)v11); std::__ostream_insert<char,std::char_traits<char>>(v21[0] + 16, ", but have left ", 16LL); std::__ostream_insert<char,std::char_traits<char>>(v21[0] + 16, "GTEST_SHARD_INDEX", 17LL); std::__ostream_insert<char,std::char_traits<char>>(v21[0] + 16, " unset.\n", 8LL); testing::Message::Message((testing::Message *)v22, (const testing::Message *)v21); if ( v21[0] ) (*(void ( **)(long long))(*(_QWORD *)v21[0] + 8LL))(v21[0]); } } else { testing::Message::Message((testing::Message *)v21); std::__ostream_insert<char,std::char_traits<char>>( v21[0] + 16, "Invalid environment variables: you have ", 40LL); std::__ostream_insert<char,std::char_traits<char>>(v21[0] + 16, "GTEST_SHARD_INDEX", 17LL); std::__ostream_insert<char,std::char_traits<char>>(v21[0] + 16, " = ", 3LL); std::ostream::operator<<(v21[0] + 16, (unsigned int)v13); std::__ostream_insert<char,std::char_traits<char>>(v21[0] + 16, ", but have left ", 16LL); std::__ostream_insert<char,std::char_traits<char>>(v21[0] + 16, "GTEST_TOTAL_SHARDS", 18LL); std::__ostream_insert<char,std::char_traits<char>>(v21[0] + 16, " unset.\n", 8LL); testing::Message::Message((testing::Message *)v22, (const testing::Message *)v21); if ( v21[0] ) (*(void ( **)(long long))(*(_QWORD *)v21[0] + 8LL))(v21[0]); } testing::internal::StringStreamToString((long long)v21, v22[0]); testing::internal::ColoredPrintf(1, (long long)"%s", v21[0], v15, v16, v17, a4, a5, a6, a7, v18, v19, a10, a11, v20); std::string::~string(v21); fflush(stdout); exit(1LL); } } return 0; }
ShouldShard: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 TEST EDX,EDX JNZ 0x00126567 MOV R14,RSI MOV ESI,0xffffffff CALL 0x0012698d MOV EBX,EAX MOV RDI,R14 MOV ESI,0xffffffff CALL 0x0012698d MOV EBP,EAX AND EAX,EBX CMP EAX,-0x1 JZ 0x00126567 CMP EBX,-0x1 SETNZ AL CMP EBP,-0x1 SETZ CL OR CL,AL JZ 0x00126572 CMP EBP,-0x1 SETNZ AL CMP EBX,-0x1 SETZ CL OR CL,AL JZ 0x00126674 TEST EBP,EBP JS 0x00126794 CMP EBP,EBX JGE 0x00126794 CMP EBX,0x2 SETGE AL JMP 0x00126569 LAB_00126567: XOR EAX,EAX LAB_00126569: ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_00126572: LEA RBX,[RSP + 0x8] MOV RDI,RBX CALL 0x00120c50 MOV RDI,qword ptr [RBX] ADD RDI,0x10 LAB_00126586: LEA RSI,[0x143cd7] MOV EDX,0x28 CALL 0x001095a0 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x10 LEA RSI,[0x1410f0] MOV EDX,0x11 CALL 0x001095a0 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x10 LEA RSI,[0x143d8b] MOV EDX,0x3 CALL 0x001095a0 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x10 MOV ESI,EBP CALL 0x00109960 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x10 LEA RSI,[0x143d00] MOV EDX,0x10 CALL 0x001095a0 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x10 LEA RSI,[0x1410d0] MOV EDX,0x12 CALL 0x001095a0 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x10 LEA RSI,[0x143d11] MOV EDX,0x8 CALL 0x001095a0 LEA RDI,[RSP + 0x28] LEA RSI,[RSP + 0x8] CALL 0x00138418 LAB_00126638: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x00126648 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_00126648: MOV RSI,qword ptr [RSP + 0x28] LAB_0012664d: LEA RDI,[RSP + 0x8] CALL 0x00120eb3 MOV RDX,qword ptr [RSP + 0x8] LAB_0012665c: LEA RSI,[0x143d91] MOV EDI,0x1 XOR EAX,EAX CALL 0x00126396 LAB_0012666f: JMP 0x00126771 LAB_00126674: LEA R14,[RSP + 0x8] MOV RDI,R14 CALL 0x00120c50 MOV RDI,qword ptr [R14] ADD RDI,0x10 LAB_00126688: LEA RSI,[0x143cd7] MOV EDX,0x28 CALL 0x001095a0 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x10 LEA RSI,[0x1410d0] MOV EDX,0x12 CALL 0x001095a0 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x10 LEA RSI,[0x143d8b] MOV EDX,0x3 CALL 0x001095a0 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x10 MOV ESI,EBX CALL 0x00109960 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x10 LEA RSI,[0x143d00] MOV EDX,0x10 CALL 0x001095a0 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x10 LEA RSI,[0x1410f0] MOV EDX,0x11 CALL 0x001095a0 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x10 LEA RSI,[0x143d11] MOV EDX,0x8 CALL 0x001095a0 LEA RDI,[RSP + 0x28] LEA RSI,[RSP + 0x8] CALL 0x00138418 LAB_0012673a: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x0012674a MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0012674a: MOV RSI,qword ptr [RSP + 0x28] LAB_0012674f: LEA RDI,[RSP + 0x8] CALL 0x00120eb3 MOV RDX,qword ptr [RSP + 0x8] LAB_0012675e: LEA RSI,[0x143d91] MOV EDI,0x1 XOR EAX,EAX CALL 0x00126396 LAB_00126771: LEA RDI,[RSP + 0x8] CALL 0x00109aa8 MOV RAX,qword ptr [0x00159f80] MOV RDI,qword ptr [RAX] CALL 0x001095f0 MOV EDI,0x1 CALL 0x00109650 LAB_00126794: LEA R14,[RSP + 0x8] MOV RDI,R14 CALL 0x00120c50 MOV RDI,qword ptr [R14] ADD RDI,0x10 LAB_001267a8: LEA RSI,[0x143d1a] MOV EDX,0x2f CALL 0x001095a0 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x10 LEA RSI,[0x1410f0] MOV EDX,0x11 CALL 0x001095a0 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x10 LEA RSI,[0x143d4a] MOV EDX,0x3 CALL 0x001095a0 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x10 LEA RSI,[0x1410d0] MOV EDX,0x12 CALL 0x001095a0 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x10 LEA RSI,[0x143d4e] MOV EDX,0xf CALL 0x001095a0 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x10 LEA RSI,[0x1410f0] MOV EDX,0x11 CALL 0x001095a0 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x10 LEA RSI,[0x140773] MOV EDX,0x1 CALL 0x001095a0 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x10 MOV ESI,EBP CALL 0x00109960 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x10 LEA RSI,[0x144ad8] MOV EDX,0x2 CALL 0x001095a0 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x10 LEA RSI,[0x1410d0] MOV EDX,0x12 CALL 0x001095a0 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x10 LEA RSI,[0x140773] MOV EDX,0x1 CALL 0x001095a0 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x10 MOV ESI,EBX CALL 0x00109960 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x10 LEA RSI,[0x143536] MOV EDX,0x2 CALL 0x001095a0 LEA RDI,[RSP + 0x28] LEA RSI,[RSP + 0x8] CALL 0x00138418 LAB_001268ec: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x001268fc MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_001268fc: MOV RSI,qword ptr [RSP + 0x28] LAB_00126901: LEA RDI,[RSP + 0x8] CALL 0x00120eb3 MOV RDX,qword ptr [RSP + 0x8] LAB_00126910: LEA RSI,[0x143d91] MOV EDI,0x1 XOR EAX,EAX CALL 0x00126396 LAB_00126923: JMP 0x00126771
/* testing::internal::ShouldShard(char const*, char const*, bool) */ int4 testing::internal::ShouldShard(char *param_1,char *param_2,bool param_3) { uint uVar1; uint uVar2; int7 in_register_00000011; long *local_40 [4]; Message local_20 [8]; if ((int)CONCAT71(in_register_00000011,param_3) == 0) { uVar1 = Int32FromEnvOrDie(param_1,-1); uVar2 = Int32FromEnvOrDie(param_2,-1); if ((uVar2 & uVar1) != 0xffffffff) { if (uVar2 == 0xffffffff || uVar1 != 0xffffffff) { if (uVar1 == 0xffffffff || uVar2 != 0xffffffff) { if ((-1 < (int)uVar2) && ((int)uVar2 < (int)uVar1)) { return CONCAT31((int3)((uVar2 & uVar1) >> 8),1 < (int)uVar1); } Message::Message((Message *)local_40); /* try { // try from 001267a8 to 001268eb has its CatchHandler @ 00126972 */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)(local_40[0] + 2),"Invalid environment variables: we require 0 <= ", 0x2f); std::__ostream_insert<char,std::char_traits<char>> ((ostream *)(local_40[0] + 2),"GTEST_SHARD_INDEX",0x11); std::__ostream_insert<char,std::char_traits<char>>((ostream *)(local_40[0] + 2)," < ",3); std::__ostream_insert<char,std::char_traits<char>> ((ostream *)(local_40[0] + 2),"GTEST_TOTAL_SHARDS",0x12); std::__ostream_insert<char,std::char_traits<char>> ((ostream *)(local_40[0] + 2),", but you have ",0xf); std::__ostream_insert<char,std::char_traits<char>> ((ostream *)(local_40[0] + 2),"GTEST_SHARD_INDEX",0x11); std::__ostream_insert<char,std::char_traits<char>>((ostream *)(local_40[0] + 2),"=",1); std::ostream::operator<<((ostream *)(local_40[0] + 2),uVar2); std::__ostream_insert<char,std::char_traits<char>>((ostream *)(local_40[0] + 2),", ",2); std::__ostream_insert<char,std::char_traits<char>> ((ostream *)(local_40[0] + 2),"GTEST_TOTAL_SHARDS",0x12); std::__ostream_insert<char,std::char_traits<char>>((ostream *)(local_40[0] + 2),"=",1); std::ostream::operator<<((ostream *)(local_40[0] + 2),uVar1); std::__ostream_insert<char,std::char_traits<char>>((ostream *)(local_40[0] + 2),".\n",2); Message::Message(local_20,(Message *)local_40); if (local_40[0] != (long *)0x0) { (**(code **)(*local_40[0] + 8))(); } /* try { // try from 00126901 to 0012690a has its CatchHandler @ 0012692a */ StringStreamToString((stringstream *)local_40); /* try { // try from 00126910 to 00126922 has its CatchHandler @ 00126928 */ ColoredPrintf(1,&DAT_00143d91,local_40[0]); } else { Message::Message((Message *)local_40); /* try { // try from 00126688 to 00126739 has its CatchHandler @ 0012696e */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)(local_40[0] + 2),"Invalid environment variables: you have ",0x28); std::__ostream_insert<char,std::char_traits<char>> ((ostream *)(local_40[0] + 2),"GTEST_TOTAL_SHARDS",0x12); std::__ostream_insert<char,std::char_traits<char>>((ostream *)(local_40[0] + 2)," = ",3); std::ostream::operator<<((ostream *)(local_40[0] + 2),uVar1); std::__ostream_insert<char,std::char_traits<char>> ((ostream *)(local_40[0] + 2),", but have left ",0x10); std::__ostream_insert<char,std::char_traits<char>> ((ostream *)(local_40[0] + 2),"GTEST_SHARD_INDEX",0x11); std::__ostream_insert<char,std::char_traits<char>> ((ostream *)(local_40[0] + 2)," unset.\n",8); Message::Message(local_20,(Message *)local_40); if (local_40[0] != (long *)0x0) { (**(code **)(*local_40[0] + 8))(); } /* try { // try from 0012674f to 00126758 has its CatchHandler @ 0012694e */ StringStreamToString((stringstream *)local_40); /* try { // try from 0012675e to 00126770 has its CatchHandler @ 0012692c */ ColoredPrintf(1,&DAT_00143d91,local_40[0]); } } else { Message::Message((Message *)local_40); /* try { // try from 00126586 to 00126637 has its CatchHandler @ 00126970 */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)(local_40[0] + 2),"Invalid environment variables: you have ",0x28); std::__ostream_insert<char,std::char_traits<char>> ((ostream *)(local_40[0] + 2),"GTEST_SHARD_INDEX",0x11); std::__ostream_insert<char,std::char_traits<char>>((ostream *)(local_40[0] + 2)," = ",3); std::ostream::operator<<((ostream *)(local_40[0] + 2),uVar2); std::__ostream_insert<char,std::char_traits<char>> ((ostream *)(local_40[0] + 2),", but have left ",0x10); std::__ostream_insert<char,std::char_traits<char>> ((ostream *)(local_40[0] + 2),"GTEST_TOTAL_SHARDS",0x12); std::__ostream_insert<char,std::char_traits<char>> ((ostream *)(local_40[0] + 2)," unset.\n",8); Message::Message(local_20,(Message *)local_40); if (local_40[0] != (long *)0x0) { (**(code **)(*local_40[0] + 8))(); } /* try { // try from 0012664d to 00126656 has its CatchHandler @ 00126950 */ StringStreamToString((stringstream *)local_40); /* try { // try from 0012665c to 0012666e has its CatchHandler @ 0012692e */ ColoredPrintf(1,&DAT_00143d91,local_40[0]); } std::__cxx11::string::~string((string *)local_40); fflush(*(FILE **)PTR_stdout_00159f80); /* WARNING: Subroutine does not return */ exit(1); } } return 0; }
25,539
frobenius_map_fp6
corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/fp12_tower.c
static void frobenius_map_fp6(vec384fp6 ret, const vec384fp6 a, size_t n) { static const vec384x coeffs1[] = { /* (u + 1)^((P^n - 1) / 3) */ { { 0 }, { TO_LIMB_T(0xcd03c9e48671f071), TO_LIMB_T(0x5dab22461fcda5d2), TO_LIMB_T(0x587042afd3851b95), TO_LIMB_T(0x8eb60ebe01bacb9e), TO_LIMB_T(0x03f97d6e83d050d2), TO_LIMB_T(0x18f0206554638741) } }, { { TO_LIMB_T(0x30f1361b798a64e8), TO_LIMB_T(0xf3b8ddab7ece5a2a), TO_LIMB_T(0x16a8ca3ac61577f7), TO_LIMB_T(0xc26a2ff874fd029b), TO_LIMB_T(0x3636b76660701c6e), TO_LIMB_T(0x051ba4ab241b6160) } }, { { 0 }, { ONE_MONT_P } } }; static const vec384 coeffs2[] = { /* (u + 1)^((2P^n - 2) / 3) */ { TO_LIMB_T(0x890dc9e4867545c3), TO_LIMB_T(0x2af322533285a5d5), TO_LIMB_T(0x50880866309b7e2c), TO_LIMB_T(0xa20d1b8c7e881024), TO_LIMB_T(0x14e4f04fe2db9068), TO_LIMB_T(0x14e56d3f1564853a) }, { TO_LIMB_T(0xcd03c9e48671f071), TO_LIMB_T(0x5dab22461fcda5d2), TO_LIMB_T(0x587042afd3851b95), TO_LIMB_T(0x8eb60ebe01bacb9e), TO_LIMB_T(0x03f97d6e83d050d2), TO_LIMB_T(0x18f0206554638741) }, { TO_LIMB_T(0x43f5fffffffcaaae), TO_LIMB_T(0x32b7fff2ed47fffd), TO_LIMB_T(0x07e83a49a2e99d69), TO_LIMB_T(0xeca8f3318332bb7a), TO_LIMB_T(0xef148d1ea0f4c069), TO_LIMB_T(0x040ab3263eff0206) } }; frobenius_map_fp2(ret[0], a[0], n); frobenius_map_fp2(ret[1], a[1], n); frobenius_map_fp2(ret[2], a[2], n); --n; /* implied ONE_MONT_P at index 0 */ mul_fp2(ret[1], ret[1], coeffs1[n]); mul_fp(ret[2][0], ret[2][0], coeffs2[n]); mul_fp(ret[2][1], ret[2][1], coeffs2[n]); }
O3
c
frobenius_map_fp6: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, -0x30(%rbp) movq %rsi, %r12 movq %rdi, %rbx movups (%rsi), %xmm0 movups 0x10(%rsi), %xmm1 movups 0x20(%rsi), %xmm2 movups %xmm2, 0x20(%rdi) movups %xmm1, 0x10(%rdi) movups %xmm0, (%rdi) addq $0x30, %rdi addq $0x30, %rsi movl %edx, %r15d andl $0x1, %r15d leaq 0x2419e(%rip), %r14 # 0x8a910 movq %r15, %rdx movq %r14, %rcx callq 0x6dc80 leaq 0x60(%rbx), %r13 movups 0x60(%r12), %xmm0 movups 0x70(%r12), %xmm1 movups 0x80(%r12), %xmm2 movups %xmm2, 0x80(%rbx) movups %xmm1, 0x70(%rbx) movups %xmm0, 0x60(%rbx) movl $0x90, %esi leaq (%rbx,%rsi), %rdi addq %r12, %rsi movq %r15, %rdx movq %r14, %rcx callq 0x6dc80 leaq 0xc0(%rbx), %r14 movups 0xc0(%r12), %xmm0 movups 0xd0(%r12), %xmm1 movups 0xe0(%r12), %xmm2 movups %xmm2, 0xe0(%rbx) movups %xmm1, 0xd0(%rbx) movups %xmm0, 0xc0(%rbx) movl $0xf0, %eax addq %rax, %rbx addq %rax, %r12 movq %rbx, %rdi movq %r12, %rsi movq %r15, %rdx leaq 0x24102(%rip), %r12 # 0x8a910 movq %r12, %rcx callq 0x6dc80 movq -0x30(%rbp), %rax leaq (%rax,%rax,2), %r15 addq $-0x3, %r15 movq %r15, %rax shlq $0x5, %rax leaq 0x25af0(%rip), %rdx # 0x8c320 addq %rax, %rdx movabsq $-0x760c000300030003, %r8 # imm = 0x89F3FFFCFFFCFFFD movq %r13, %rdi movq %r13, %rsi movq %r12, %rcx movq %r12, %r13 callq 0x71b60 shlq $0x4, %r15 leaq 0x25be7(%rip), %r12 # 0x8c440 addq %r15, %r12 movq %r14, %rdi movq %r14, %rsi movq %r12, %rdx movq %r13, %rcx movabsq $-0x760c000300030003, %r14 # imm = 0x89F3FFFCFFFCFFFD movq %r14, %r8 callq 0x72e60 movq %rbx, %rdi movq %rbx, %rsi movq %r12, %rdx movq %r13, %rcx movq %r14, %r8 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x72e60
frobenius_map_fp6: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov [rbp+var_30], rdx mov r12, rsi mov rbx, rdi movups xmm0, xmmword ptr [rsi] movups xmm1, xmmword ptr [rsi+10h] movups xmm2, xmmword ptr [rsi+20h] movups xmmword ptr [rdi+20h], xmm2 movups xmmword ptr [rdi+10h], xmm1 movups xmmword ptr [rdi], xmm0 add rdi, 30h ; '0' add rsi, 30h ; '0' mov r15d, edx and r15d, 1 lea r14, BLS12_381_P mov rdx, r15 mov rcx, r14 call cneg_mod_384 lea r13, [rbx+60h] movups xmm0, xmmword ptr [r12+60h] movups xmm1, xmmword ptr [r12+70h] movups xmm2, xmmword ptr [r12+80h] movups xmmword ptr [rbx+80h], xmm2 movups xmmword ptr [rbx+70h], xmm1 movups xmmword ptr [rbx+60h], xmm0 mov esi, 90h lea rdi, [rbx+rsi] add rsi, r12 mov rdx, r15 mov rcx, r14 call cneg_mod_384 lea r14, [rbx+0C0h] movups xmm0, xmmword ptr [r12+0C0h] movups xmm1, xmmword ptr [r12+0D0h] movups xmm2, xmmword ptr [r12+0E0h] movups xmmword ptr [rbx+0E0h], xmm2 movups xmmword ptr [rbx+0D0h], xmm1 movups xmmword ptr [rbx+0C0h], xmm0 mov eax, 0F0h add rbx, rax add r12, rax mov rdi, rbx mov rsi, r12 mov rdx, r15 lea r12, BLS12_381_P mov rcx, r12 call cneg_mod_384 mov rax, [rbp+var_30] lea r15, [rax+rax*2] add r15, 0FFFFFFFFFFFFFFFDh mov rax, r15 shl rax, 5 lea rdx, frobenius_map_fp6_coeffs1 add rdx, rax mov r8, 89F3FFFCFFFCFFFDh mov rdi, r13 mov rsi, r13 mov rcx, r12 mov r13, r12 call mul_mont_384x shl r15, 4 lea r12, frobenius_map_fp6_coeffs2 add r12, r15 mov rdi, r14 mov rsi, r14 mov rdx, r12 mov rcx, r13 mov r14, 89F3FFFCFFFCFFFDh mov r8, r14 call mul_mont_384 mov rdi, rbx mov rsi, rbx mov rdx, r12 mov rcx, r13 mov r8, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp mul_mont_384
long long frobenius_map_fp6(_OWORD *a1, __int128 *a2, long long a3) { __int128 v3; // xmm0 __int128 v4; // xmm1 long long v5; // r15 __int128 v6; // xmm0 __int128 v7; // xmm1 __int128 v8; // xmm0 __int128 v9; // xmm1 long long v10; // r15 v3 = *a2; v4 = a2[1]; a1[2] = a2[2]; a1[1] = v4; *a1 = v3; v5 = a3 & 1; cneg_mod_384(a1 + 3, a2 + 3, v5, &BLS12_381_P); v6 = a2[6]; v7 = a2[7]; a1[8] = a2[8]; a1[7] = v7; a1[6] = v6; cneg_mod_384(a1 + 9, a2 + 9, v5, &BLS12_381_P); v8 = a2[12]; v9 = a2[13]; a1[14] = a2[14]; a1[13] = v9; a1[12] = v8; cneg_mod_384(a1 + 15, a2 + 15, v5, &BLS12_381_P); mul_mont_384x(a1 + 6, a1 + 6, (char *)&frobenius_map_fp6_coeffs1 + 96 * a3 - 96, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); v10 = 16 * (3 * a3 - 3); mul_mont_384(a1 + 12, a1 + 12, (char *)&frobenius_map_fp6_coeffs2 + v10, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); return mul_mont_384(a1 + 15, a1 + 15, (char *)&frobenius_map_fp6_coeffs2 + v10, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); }
frobenius_map_fp6: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV qword ptr [RBP + -0x30],RDX MOV R12,RSI MOV RBX,RDI MOVUPS XMM0,xmmword ptr [RSI] MOVUPS XMM1,xmmword ptr [RSI + 0x10] MOVUPS XMM2,xmmword ptr [RSI + 0x20] MOVUPS xmmword ptr [RDI + 0x20],XMM2 MOVUPS xmmword ptr [RDI + 0x10],XMM1 MOVUPS xmmword ptr [RDI],XMM0 ADD RDI,0x30 ADD RSI,0x30 MOV R15D,EDX AND R15D,0x1 LEA R14,[0x18a910] MOV RDX,R15 MOV RCX,R14 CALL 0x0016dc80 LEA R13,[RBX + 0x60] MOVUPS XMM0,xmmword ptr [R12 + 0x60] MOVUPS XMM1,xmmword ptr [R12 + 0x70] MOVUPS XMM2,xmmword ptr [R12 + 0x80] MOVUPS xmmword ptr [RBX + 0x80],XMM2 MOVUPS xmmword ptr [RBX + 0x70],XMM1 MOVUPS xmmword ptr [RBX + 0x60],XMM0 MOV ESI,0x90 LEA RDI,[RBX + RSI*0x1] ADD RSI,R12 MOV RDX,R15 MOV RCX,R14 CALL 0x0016dc80 LEA R14,[RBX + 0xc0] MOVUPS XMM0,xmmword ptr [R12 + 0xc0] MOVUPS XMM1,xmmword ptr [R12 + 0xd0] MOVUPS XMM2,xmmword ptr [R12 + 0xe0] MOVUPS xmmword ptr [RBX + 0xe0],XMM2 MOVUPS xmmword ptr [RBX + 0xd0],XMM1 MOVUPS xmmword ptr [RBX + 0xc0],XMM0 MOV EAX,0xf0 ADD RBX,RAX ADD R12,RAX MOV RDI,RBX MOV RSI,R12 MOV RDX,R15 LEA R12,[0x18a910] MOV RCX,R12 CALL 0x0016dc80 MOV RAX,qword ptr [RBP + -0x30] LEA R15,[RAX + RAX*0x2] ADD R15,-0x3 MOV RAX,R15 SHL RAX,0x5 LEA RDX,[0x18c320] ADD RDX,RAX MOV R8,-0x760c000300030003 MOV RDI,R13 MOV RSI,R13 MOV RCX,R12 MOV R13,R12 CALL 0x00171b60 SHL R15,0x4 LEA R12,[0x18c440] ADD R12,R15 MOV RDI,R14 MOV RSI,R14 MOV RDX,R12 MOV RCX,R13 MOV R14,-0x760c000300030003 MOV R8,R14 CALL 0x00172e60 MOV RDI,RBX MOV RSI,RBX MOV RDX,R12 MOV RCX,R13 MOV R8,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00172e60
void frobenius_map_fp6(int4 *param_1,int4 *param_2,long param_3) { int4 uVar1; int4 uVar2; int4 uVar3; int4 uVar4; int4 uVar5; int4 uVar6; int4 uVar7; int4 uVar8; int4 uVar9; int4 uVar10; int4 uVar11; int4 *puVar12; uint uVar13; long lVar14; uVar1 = *param_2; uVar2 = param_2[1]; uVar3 = param_2[2]; uVar4 = param_2[3]; uVar5 = param_2[4]; uVar6 = param_2[5]; uVar7 = param_2[6]; uVar8 = param_2[7]; uVar9 = param_2[9]; uVar10 = param_2[10]; uVar11 = param_2[0xb]; param_1[8] = param_2[8]; param_1[9] = uVar9; param_1[10] = uVar10; param_1[0xb] = uVar11; param_1[4] = uVar5; param_1[5] = uVar6; param_1[6] = uVar7; param_1[7] = uVar8; *param_1 = uVar1; param_1[1] = uVar2; param_1[2] = uVar3; param_1[3] = uVar4; uVar13 = (uint)param_3 & 1; cneg_mod_384(param_1 + 0xc,param_2 + 0xc,uVar13,BLS12_381_P); uVar1 = param_2[0x18]; uVar2 = param_2[0x19]; uVar3 = param_2[0x1a]; uVar4 = param_2[0x1b]; uVar5 = param_2[0x1c]; uVar6 = param_2[0x1d]; uVar7 = param_2[0x1e]; uVar8 = param_2[0x1f]; uVar9 = param_2[0x21]; uVar10 = param_2[0x22]; uVar11 = param_2[0x23]; param_1[0x20] = param_2[0x20]; param_1[0x21] = uVar9; param_1[0x22] = uVar10; param_1[0x23] = uVar11; param_1[0x1c] = uVar5; param_1[0x1d] = uVar6; param_1[0x1e] = uVar7; param_1[0x1f] = uVar8; param_1[0x18] = uVar1; param_1[0x19] = uVar2; param_1[0x1a] = uVar3; param_1[0x1b] = uVar4; cneg_mod_384(param_1 + 0x24,param_2 + 0x24,uVar13,BLS12_381_P); uVar1 = param_2[0x30]; uVar2 = param_2[0x31]; uVar3 = param_2[0x32]; uVar4 = param_2[0x33]; uVar5 = param_2[0x34]; uVar6 = param_2[0x35]; uVar7 = param_2[0x36]; uVar8 = param_2[0x37]; uVar9 = param_2[0x39]; uVar10 = param_2[0x3a]; uVar11 = param_2[0x3b]; param_1[0x38] = param_2[0x38]; param_1[0x39] = uVar9; param_1[0x3a] = uVar10; param_1[0x3b] = uVar11; param_1[0x34] = uVar5; param_1[0x35] = uVar6; param_1[0x36] = uVar7; param_1[0x37] = uVar8; param_1[0x30] = uVar1; param_1[0x31] = uVar2; param_1[0x32] = uVar3; param_1[0x33] = uVar4; puVar12 = param_1 + 0x3c; cneg_mod_384(puVar12,param_2 + 0x3c,uVar13,BLS12_381_P); lVar14 = param_3 * 3 + -3; mul_mont_384x(param_1 + 0x18,param_1 + 0x18,frobenius_map_fp6_coeffs1 + lVar14 * 0x20,BLS12_381_P, 0x89f3fffcfffcfffd); mul_mont_384(param_1 + 0x30,param_1 + 0x30,frobenius_map_fp6_coeffs2 + lVar14 * 0x10,BLS12_381_P, 0x89f3fffcfffcfffd); mul_mont_384(puVar12,puVar12,frobenius_map_fp6_coeffs2 + lVar14 * 0x10,BLS12_381_P, 0x89f3fffcfffcfffd); return; }
25,540
minja::Value::dump(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, int, int, bool) const::'lambda'(int)::operator()(int) const
monkey531[P]llama/common/minja.hpp
void dump(std::ostringstream & out, int indent = -1, int level = 0, bool to_json = false) const { auto print_indent = [&](int level) { if (indent > 0) { out << "\n"; for (int i = 0, n = level * indent; i < n; ++i) out << ' '; } }; auto print_sub_sep = [&]() { out << ','; if (indent < 0) out << ' '; else print_indent(level + 1); }; auto string_quote = to_json ? '"' : '\''; if (is_null()) out << "null"; else if (array_) { out << "["; print_indent(level + 1); for (size_t i = 0; i < array_->size(); ++i) { if (i) print_sub_sep(); (*array_)[i].dump(out, indent, level + 1, to_json); } print_indent(level); out << "]"; } else if (object_) { out << "{"; print_indent(level + 1); for (auto begin = object_->begin(), it = begin; it != object_->end(); ++it) { if (it != begin) print_sub_sep(); if (it->first.is_string()) { dump_string(it->first, out, string_quote); } else { out << string_quote << it->first.dump() << string_quote; } out << ": "; it->second.dump(out, indent, level + 1, to_json); } print_indent(level); out << "}"; } else if (callable_) { throw std::runtime_error("Cannot dump callable to JSON"); } else if (is_boolean() && !to_json) { out << (this->to_bool() ? "True" : "False"); } else if (is_string() && !to_json) { dump_string(primitive_, out, string_quote); } else { out << primitive_.dump(); } }
O2
cpp
minja::Value::dump(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, int, int, bool) const::'lambda'(int)::operator()(int) const: pushq %rbp pushq %r14 pushq %rbx movq (%rdi), %rax cmpl $0x0, (%rax) jle 0x63080 movl %esi, %ebp movq %rdi, %rbx movq 0x8(%rdi), %rdi leaq 0x4ba92(%rip), %rsi # 0xaeae8 callq 0x238c0 movq (%rbx), %rax imull (%rax), %ebp xorl %r14d, %r14d testl %ebp, %ebp cmovgl %ebp, %r14d pushq $0x20 popq %rbp subl $0x1, %r14d jb 0x63080 movq 0x8(%rbx), %rdi movl %ebp, %esi callq 0x23a50 jmp 0x6306d popq %rbx popq %r14 popq %rbp retq nop
_ZZNK5minja5Value4dumpERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEEiibENKUliE_clEi: push rbp push r14 push rbx mov rax, [rdi] cmp dword ptr [rax], 0 jle short loc_63080 mov ebp, esi mov rbx, rdi mov rdi, [rdi+8] lea rsi, aErrorWhileHand_0+33h; "\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rax, [rbx] imul ebp, [rax] xor r14d, r14d test ebp, ebp cmovg r14d, ebp push 20h ; ' ' pop rbp loc_6306D: sub r14d, 1 jb short loc_63080 mov rdi, [rbx+8] mov esi, ebp call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) jmp short loc_6306D loc_63080: pop rbx pop r14 pop rbp retn
int * minja::Value::dump(std::ostringstream &,int,int,bool)const::{lambda(int)#1}::operator()( int **a1, int a2) { int *result; // rax int v3; // r14d result = *a1; if ( **a1 > 0 ) { std::operator<<<std::char_traits<char>>(a1[1], "\n"); result = *a1; v3 = 0; if ( **a1 * a2 > 0 ) v3 = **a1 * a2; while ( v3-- != 0 ) result = (int *)std::operator<<<std::char_traits<char>>(a1[1], 32LL); } return result; }
operator(): PUSH RBP PUSH R14 PUSH RBX MOV RAX,qword ptr [RDI] CMP dword ptr [RAX],0x0 JLE 0x00163080 MOV EBP,ESI MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x8] LEA RSI,[0x1aeae8] CALL 0x001238c0 MOV RAX,qword ptr [RBX] IMUL EBP,dword ptr [RAX] XOR R14D,R14D TEST EBP,EBP CMOVG R14D,EBP PUSH 0x20 POP RBP LAB_0016306d: SUB R14D,0x1 JC 0x00163080 MOV RDI,qword ptr [RBX + 0x8] MOV ESI,EBP CALL 0x00123a50 JMP 0x0016306d LAB_00163080: POP RBX POP R14 POP RBP RET
/* minja::Value::dump(std::__cxx11::ostringstream&, int, int, bool) const::{lambda(int)#1}::TEMPNAMEPLACEHOLDERVALUE(int) const */ _func_dump_ostringstream_ptr_int_int_bool * __thiscall const::{lambda(int)#1}::operator()(_lambda_int__1_ *this,int param_1) { ostream *poVar1; int iVar2; poVar1 = *(ostream **)this; if (0 < *(int *)poVar1) { std::operator<<(*(ostream **)(this + 8),"\n"); poVar1 = *(ostream **)this; iVar2 = 0; if (0 < param_1 * *(int *)poVar1) { iVar2 = param_1 * *(int *)poVar1; } while (iVar2 != 0) { poVar1 = std::operator<<(*(ostream **)(this + 8),' '); iVar2 = iVar2 + -1; } } return (_func_dump_ostringstream_ptr_int_int_bool *)poVar1; }
25,541
ma_gets
eloqsql/libmariadb/libmariadb/ma_io.c
char *ma_gets(char *ptr, size_t size, MA_FILE *file) { if (!file) return NULL; switch (file->type) { case MA_FILE_LOCAL: return fgets(ptr, (int)size, (FILE *)file->ptr); break; #ifdef HAVE_REMOTEIO case MA_FILE_REMOTE: return rio_plugin->methods->mgets(ptr, size, file); break; #endif default: return NULL; } }
O3
c
ma_gets: pushq %rbp movq %rsp, %rbp testq %rdx, %rdx je 0x2b712 movl (%rdx), %eax cmpl $0x2, %eax je 0x2b716 cmpl $0x1, %eax jne 0x2b712 movq 0x8(%rdx), %rdx popq %rbp jmp 0x13700 xorl %eax, %eax popq %rbp retq leaq 0x25463(%rip), %rax # 0x50b80 movq (%rax), %rax movq 0x58(%rax), %rax movq 0x20(%rax), %rax popq %rbp jmpq *%rax nop
ma_gets: push rbp mov rbp, rsp test rdx, rdx jz short loc_2B712 mov eax, [rdx] cmp eax, 2 jz short loc_2B716 cmp eax, 1 jnz short loc_2B712 mov rdx, [rdx+8] pop rbp jmp _fgets loc_2B712: xor eax, eax pop rbp retn loc_2B716: lea rax, rio_plugin mov rax, [rax] mov rax, [rax+58h] mov rax, [rax+20h] pop rbp jmp rax
long long ma_gets(long long a1, long long a2, long long a3) { if ( !a3 ) return 0LL; if ( *(_DWORD *)a3 != 2 ) { if ( *(_DWORD *)a3 == 1 ) return fgets(a1, a2, *(_QWORD *)(a3 + 8)); return 0LL; } return (*(long long (**)(void))(*(_QWORD *)(rio_plugin + 88LL) + 32LL))(); }
ma_gets: PUSH RBP MOV RBP,RSP TEST RDX,RDX JZ 0x0012b712 MOV EAX,dword ptr [RDX] CMP EAX,0x2 JZ 0x0012b716 CMP EAX,0x1 JNZ 0x0012b712 MOV RDX,qword ptr [RDX + 0x8] POP RBP JMP 0x00113700 LAB_0012b712: XOR EAX,EAX POP RBP RET LAB_0012b716: LEA RAX,[0x150b80] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x58] MOV RAX,qword ptr [RAX + 0x20] POP RBP JMP RAX
char * ma_gets(char *param_1,int param_2,int *param_3) { char *pcVar1; if (param_3 != (int *)0x0) { if (*param_3 == 2) { /* WARNING: Could not recover jumptable at 0x0012b729. Too many branches */ /* WARNING: Treating indirect jump as call */ pcVar1 = (char *)(**(code **)(*(long *)(rio_plugin + 0x58) + 0x20))(); return pcVar1; } if (*param_3 == 1) { pcVar1 = fgets(param_1,param_2,*(FILE **)(param_3 + 2)); return pcVar1; } } return (char *)0x0; }
25,542
process_int_arg
eloqsql/strings/my_vsnprintf.c
static char *process_int_arg(char *to, const char *end, size_t length, longlong par, char arg_type, uint print_type) { size_t res_length, to_length; char *store_start= to, *store_end; char buff[32]; if ((to_length= (size_t) (end-to)) < 16 || length) store_start= buff; if (arg_type == 'd' || arg_type == 'i') store_end= longlong10_to_str(par, store_start, -10); else if (arg_type == 'u') store_end= longlong10_to_str(par, store_start, 10); else if (arg_type == 'p') { store_start[0]= '0'; store_start[1]= 'x'; store_end= ll2str(par, store_start + 2, 16, 0); } else if (arg_type == 'o') { store_end= ll2str(par, store_start, 8, 0); } else { DBUG_ASSERT(arg_type == 'X' || arg_type =='x'); store_end= ll2str(par, store_start, 16, (arg_type == 'X')); } if ((res_length= (size_t) (store_end - store_start)) > to_length) return to; /* num doesn't fit in output */ /* If %#d syntax was used, we have to pre-zero/pre-space the string */ if (store_start == buff) { length= MY_MIN(length, to_length); if (res_length < length) { size_t diff= (length- res_length); bfill(to, diff, (print_type & PREZERO_ARG) ? '0' : ' '); if (arg_type == 'p' && print_type & PREZERO_ARG) { if (diff > 1) to[1]= 'x'; else store_start[0]= 'x'; store_start[1]= '0'; } to+= diff; } bmove(to, store_start, res_length); } to+= res_length; return to; }
O0
c
process_int_arg: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movb %r8b, %al movq %fs:0x28, %r8 movq %r8, -0x8(%rbp) movq %rdi, -0x40(%rbp) movq %rsi, -0x48(%rbp) movq %rdx, -0x50(%rbp) movq %rcx, -0x58(%rbp) movb %al, -0x59(%rbp) movl %r9d, -0x60(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x78(%rbp) movq -0x48(%rbp), %rax movq -0x40(%rbp), %rcx subq %rcx, %rax movq %rax, -0x70(%rbp) cmpq $0x10, %rax jb 0x81ca6 cmpq $0x0, -0x50(%rbp) je 0x81cae leaq -0x30(%rbp), %rax movq %rax, -0x78(%rbp) movsbl -0x59(%rbp), %eax cmpl $0x64, %eax je 0x81cc0 movsbl -0x59(%rbp), %eax cmpl $0x69, %eax jne 0x81cdb movq -0x58(%rbp), %rdi movq -0x78(%rbp), %rsi movl $0xfffffff6, %edx # imm = 0xFFFFFFF6 callq 0x7f2a0 movq %rax, -0x80(%rbp) jmp 0x81d87 movsbl -0x59(%rbp), %eax cmpl $0x75, %eax jne 0x81cff movq -0x58(%rbp), %rdi movq -0x78(%rbp), %rsi movl $0xa, %edx callq 0x7f2a0 movq %rax, -0x80(%rbp) jmp 0x81d85 movsbl -0x59(%rbp), %eax cmpl $0x70, %eax jne 0x81d35 movq -0x78(%rbp), %rax movb $0x30, (%rax) movq -0x78(%rbp), %rax movb $0x78, 0x1(%rax) movq -0x58(%rbp), %rdi movq -0x78(%rbp), %rsi addq $0x2, %rsi movl $0x10, %edx xorl %ecx, %ecx callq 0x7f0a0 movq %rax, -0x80(%rbp) jmp 0x81d83 movsbl -0x59(%rbp), %eax cmpl $0x6f, %eax jne 0x81d58 movq -0x58(%rbp), %rdi movq -0x78(%rbp), %rsi movl $0x8, %edx xorl %ecx, %ecx callq 0x7f0a0 movq %rax, -0x80(%rbp) jmp 0x81d81 jmp 0x81d5a jmp 0x81d5c movq -0x58(%rbp), %rdi movq -0x78(%rbp), %rsi movsbl -0x59(%rbp), %eax cmpl $0x58, %eax sete %al andb $0x1, %al movzbl %al, %ecx movl $0x10, %edx callq 0x7f0a0 movq %rax, -0x80(%rbp) jmp 0x81d83 jmp 0x81d85 jmp 0x81d87 movq -0x80(%rbp), %rax movq -0x78(%rbp), %rcx subq %rcx, %rax movq %rax, -0x68(%rbp) cmpq -0x70(%rbp), %rax jbe 0x81da9 movq -0x40(%rbp), %rax movq %rax, -0x38(%rbp) jmp 0x81e94 movq -0x78(%rbp), %rax leaq -0x30(%rbp), %rcx cmpq %rcx, %rax jne 0x81e80 movq -0x50(%rbp), %rax cmpq -0x70(%rbp), %rax jae 0x81dd1 movq -0x50(%rbp), %rax movq %rax, -0x90(%rbp) jmp 0x81ddc movq -0x70(%rbp), %rax movq %rax, -0x90(%rbp) movq -0x90(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x68(%rbp), %rax cmpq -0x50(%rbp), %rax jae 0x81e6f movq -0x50(%rbp), %rax subq -0x68(%rbp), %rax movq %rax, -0x88(%rbp) movq -0x40(%rbp), %rdi movl -0x60(%rbp), %edx andl $0x4, %edx movl $0x20, %eax movl $0x30, %ecx cmpl $0x0, %edx cmovnel %ecx, %eax movq -0x88(%rbp), %rdx movzbl %al, %esi callq 0x24180 movsbl -0x59(%rbp), %eax cmpl $0x70, %eax jne 0x81e60 movl -0x60(%rbp), %eax andl $0x4, %eax cmpl $0x0, %eax je 0x81e60 cmpq $0x1, -0x88(%rbp) jbe 0x81e51 movq -0x40(%rbp), %rax movb $0x78, 0x1(%rax) jmp 0x81e58 movq -0x78(%rbp), %rax movb $0x78, (%rax) movq -0x78(%rbp), %rax movb $0x30, 0x1(%rax) movq -0x88(%rbp), %rax addq -0x40(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rdi movq -0x78(%rbp), %rsi movq -0x68(%rbp), %rdx callq 0x244c0 movq -0x68(%rbp), %rax addq -0x40(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x98(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x81ec1 movq -0x98(%rbp), %rax addq $0xa0, %rsp popq %rbp retq callq 0x242c0 nopw %cs:(%rax,%rax)
process_int_arg: push rbp mov rbp, rsp sub rsp, 0A0h mov al, r8b mov r8, fs:28h mov [rbp+var_8], r8 mov [rbp+var_40], rdi mov [rbp+var_48], rsi mov [rbp+var_50], rdx mov [rbp+var_58], rcx mov [rbp+var_59], al mov [rbp+var_60], r9d mov rax, [rbp+var_40] mov [rbp+var_78], rax mov rax, [rbp+var_48] mov rcx, [rbp+var_40] sub rax, rcx mov [rbp+var_70], rax cmp rax, 10h jb short loc_81CA6 cmp [rbp+var_50], 0 jz short loc_81CAE loc_81CA6: lea rax, [rbp+var_30] mov [rbp+var_78], rax loc_81CAE: movsx eax, [rbp+var_59] cmp eax, 64h ; 'd' jz short loc_81CC0 movsx eax, [rbp+var_59] cmp eax, 69h ; 'i' jnz short loc_81CDB loc_81CC0: mov rdi, [rbp+var_58] mov rsi, [rbp+var_78] mov edx, 0FFFFFFF6h call int10_to_str mov [rbp+var_80], rax jmp loc_81D87 loc_81CDB: movsx eax, [rbp+var_59] cmp eax, 75h ; 'u' jnz short loc_81CFF mov rdi, [rbp+var_58] mov rsi, [rbp+var_78] mov edx, 0Ah call int10_to_str mov [rbp+var_80], rax jmp loc_81D85 loc_81CFF: movsx eax, [rbp+var_59] cmp eax, 70h ; 'p' jnz short loc_81D35 mov rax, [rbp+var_78] mov byte ptr [rax], 30h ; '0' mov rax, [rbp+var_78] mov byte ptr [rax+1], 78h ; 'x' mov rdi, [rbp+var_58] mov rsi, [rbp+var_78] add rsi, 2 mov edx, 10h xor ecx, ecx call int2str mov [rbp+var_80], rax jmp short loc_81D83 loc_81D35: movsx eax, [rbp+var_59] cmp eax, 6Fh ; 'o' jnz short loc_81D58 mov rdi, [rbp+var_58] mov rsi, [rbp+var_78] mov edx, 8 xor ecx, ecx call int2str mov [rbp+var_80], rax jmp short loc_81D81 loc_81D58: jmp short $+2 loc_81D5A: jmp short $+2 loc_81D5C: mov rdi, [rbp+var_58] mov rsi, [rbp+var_78] movsx eax, [rbp+var_59] cmp eax, 58h ; 'X' setz al and al, 1 movzx ecx, al mov edx, 10h call int2str mov [rbp+var_80], rax loc_81D81: jmp short $+2 loc_81D83: jmp short $+2 loc_81D85: jmp short $+2 loc_81D87: mov rax, [rbp+var_80] mov rcx, [rbp+var_78] sub rax, rcx mov [rbp+var_68], rax cmp rax, [rbp+var_70] jbe short loc_81DA9 mov rax, [rbp+var_40] mov [rbp+var_38], rax jmp loc_81E94 loc_81DA9: mov rax, [rbp+var_78] lea rcx, [rbp+var_30] cmp rax, rcx jnz loc_81E80 mov rax, [rbp+var_50] cmp rax, [rbp+var_70] jnb short loc_81DD1 mov rax, [rbp+var_50] mov [rbp+var_90], rax jmp short loc_81DDC loc_81DD1: mov rax, [rbp+var_70] mov [rbp+var_90], rax loc_81DDC: mov rax, [rbp+var_90] mov [rbp+var_50], rax mov rax, [rbp+var_68] cmp rax, [rbp+var_50] jnb short loc_81E6F mov rax, [rbp+var_50] sub rax, [rbp+var_68] mov [rbp+var_88], rax mov rdi, [rbp+var_40] mov edx, [rbp+var_60] and edx, 4 mov eax, 20h ; ' ' mov ecx, 30h ; '0' cmp edx, 0 cmovnz eax, ecx mov rdx, [rbp+var_88] movzx esi, al call _memset movsx eax, [rbp+var_59] cmp eax, 70h ; 'p' jnz short loc_81E60 mov eax, [rbp+var_60] and eax, 4 cmp eax, 0 jz short loc_81E60 cmp [rbp+var_88], 1 jbe short loc_81E51 mov rax, [rbp+var_40] mov byte ptr [rax+1], 78h ; 'x' jmp short loc_81E58 loc_81E51: mov rax, [rbp+var_78] mov byte ptr [rax], 78h ; 'x' loc_81E58: mov rax, [rbp+var_78] mov byte ptr [rax+1], 30h ; '0' loc_81E60: mov rax, [rbp+var_88] add rax, [rbp+var_40] mov [rbp+var_40], rax loc_81E6F: mov rdi, [rbp+var_40] mov rsi, [rbp+var_78] mov rdx, [rbp+var_68] call _memmove loc_81E80: mov rax, [rbp+var_68] add rax, [rbp+var_40] mov [rbp+var_40], rax mov rax, [rbp+var_40] mov [rbp+var_38], rax loc_81E94: mov rax, [rbp+var_38] mov [rbp+var_98], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_81EC1 mov rax, [rbp+var_98] add rsp, 0A0h pop rbp retn loc_81EC1: call ___stack_chk_fail
_BYTE * process_int_arg(_BYTE *a1, long long a2, unsigned long long a3, long long a4, char a5, char a6) { unsigned __int8 v6; // al unsigned long long v8; // [rsp+10h] [rbp-90h] unsigned long long v9; // [rsp+18h] [rbp-88h] _BYTE *v10; // [rsp+20h] [rbp-80h] _BYTE *v11; // [rsp+28h] [rbp-78h] unsigned long long v12; // [rsp+30h] [rbp-70h] unsigned long long v13; // [rsp+38h] [rbp-68h] _BYTE *v17; // [rsp+60h] [rbp-40h] _BYTE v19[40]; // [rsp+70h] [rbp-30h] BYREF unsigned long long v20; // [rsp+98h] [rbp-8h] v20 = __readfsqword(0x28u); v17 = a1; v11 = a1; v12 = a2 - (_QWORD)a1; if ( (unsigned long long)(a2 - (_QWORD)a1) < 0x10 || a3 ) v11 = v19; switch ( a5 ) { case 'd': case 'i': v10 = int10_to_str(a4, v11, -10); break; case 'u': v10 = int10_to_str(a4, v11, 10); break; case 'p': *v11 = 48; v11[1] = 120; v10 = int2str(a4, v11 + 2, 16, 0); break; case 'o': v10 = int2str(a4, v11, 8, 0); break; default: v10 = int2str(a4, v11, 16, a5 == 88); break; } v13 = v10 - v11; if ( v10 - v11 > v12 ) return a1; if ( v11 == v19 ) { if ( a3 >= v12 ) v8 = a2 - (_QWORD)a1; else v8 = a3; if ( v13 < v8 ) { v9 = v8 - v13; v6 = 32; if ( (a6 & 4) != 0 ) v6 = 48; memset(a1, v6, v9); if ( a5 == 112 && (a6 & 4) != 0 ) { if ( v9 <= 1 ) *v11 = 120; else a1[1] = 120; v11[1] = 48; } v17 = &a1[v9]; } memmove(v17, v11, v13); } return &v17[v13]; }
process_int_arg: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV AL,R8B MOV R8,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],R8 MOV qword ptr [RBP + -0x40],RDI MOV qword ptr [RBP + -0x48],RSI MOV qword ptr [RBP + -0x50],RDX MOV qword ptr [RBP + -0x58],RCX MOV byte ptr [RBP + -0x59],AL MOV dword ptr [RBP + -0x60],R9D MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x40] SUB RAX,RCX MOV qword ptr [RBP + -0x70],RAX CMP RAX,0x10 JC 0x00181ca6 CMP qword ptr [RBP + -0x50],0x0 JZ 0x00181cae LAB_00181ca6: LEA RAX,[RBP + -0x30] MOV qword ptr [RBP + -0x78],RAX LAB_00181cae: MOVSX EAX,byte ptr [RBP + -0x59] CMP EAX,0x64 JZ 0x00181cc0 MOVSX EAX,byte ptr [RBP + -0x59] CMP EAX,0x69 JNZ 0x00181cdb LAB_00181cc0: MOV RDI,qword ptr [RBP + -0x58] MOV RSI,qword ptr [RBP + -0x78] MOV EDX,0xfffffff6 CALL 0x0017f2a0 MOV qword ptr [RBP + -0x80],RAX JMP 0x00181d87 LAB_00181cdb: MOVSX EAX,byte ptr [RBP + -0x59] CMP EAX,0x75 JNZ 0x00181cff MOV RDI,qword ptr [RBP + -0x58] MOV RSI,qword ptr [RBP + -0x78] MOV EDX,0xa CALL 0x0017f2a0 MOV qword ptr [RBP + -0x80],RAX JMP 0x00181d85 LAB_00181cff: MOVSX EAX,byte ptr [RBP + -0x59] CMP EAX,0x70 JNZ 0x00181d35 MOV RAX,qword ptr [RBP + -0x78] MOV byte ptr [RAX],0x30 MOV RAX,qword ptr [RBP + -0x78] MOV byte ptr [RAX + 0x1],0x78 MOV RDI,qword ptr [RBP + -0x58] MOV RSI,qword ptr [RBP + -0x78] ADD RSI,0x2 MOV EDX,0x10 XOR ECX,ECX CALL 0x0017f0a0 MOV qword ptr [RBP + -0x80],RAX JMP 0x00181d83 LAB_00181d35: MOVSX EAX,byte ptr [RBP + -0x59] CMP EAX,0x6f JNZ 0x00181d58 MOV RDI,qword ptr [RBP + -0x58] MOV RSI,qword ptr [RBP + -0x78] MOV EDX,0x8 XOR ECX,ECX CALL 0x0017f0a0 MOV qword ptr [RBP + -0x80],RAX JMP 0x00181d81 LAB_00181d58: JMP 0x00181d5a LAB_00181d5a: JMP 0x00181d5c LAB_00181d5c: MOV RDI,qword ptr [RBP + -0x58] MOV RSI,qword ptr [RBP + -0x78] MOVSX EAX,byte ptr [RBP + -0x59] CMP EAX,0x58 SETZ AL AND AL,0x1 MOVZX ECX,AL MOV EDX,0x10 CALL 0x0017f0a0 MOV qword ptr [RBP + -0x80],RAX LAB_00181d81: JMP 0x00181d83 LAB_00181d83: JMP 0x00181d85 LAB_00181d85: JMP 0x00181d87 LAB_00181d87: MOV RAX,qword ptr [RBP + -0x80] MOV RCX,qword ptr [RBP + -0x78] SUB RAX,RCX MOV qword ptr [RBP + -0x68],RAX CMP RAX,qword ptr [RBP + -0x70] JBE 0x00181da9 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x38],RAX JMP 0x00181e94 LAB_00181da9: MOV RAX,qword ptr [RBP + -0x78] LEA RCX,[RBP + -0x30] CMP RAX,RCX JNZ 0x00181e80 MOV RAX,qword ptr [RBP + -0x50] CMP RAX,qword ptr [RBP + -0x70] JNC 0x00181dd1 MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x90],RAX JMP 0x00181ddc LAB_00181dd1: MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x90],RAX LAB_00181ddc: MOV RAX,qword ptr [RBP + -0x90] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x68] CMP RAX,qword ptr [RBP + -0x50] JNC 0x00181e6f MOV RAX,qword ptr [RBP + -0x50] SUB RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x88],RAX MOV RDI,qword ptr [RBP + -0x40] MOV EDX,dword ptr [RBP + -0x60] AND EDX,0x4 MOV EAX,0x20 MOV ECX,0x30 CMP EDX,0x0 CMOVNZ EAX,ECX MOV RDX,qword ptr [RBP + -0x88] MOVZX ESI,AL CALL 0x00124180 MOVSX EAX,byte ptr [RBP + -0x59] CMP EAX,0x70 JNZ 0x00181e60 MOV EAX,dword ptr [RBP + -0x60] AND EAX,0x4 CMP EAX,0x0 JZ 0x00181e60 CMP qword ptr [RBP + -0x88],0x1 JBE 0x00181e51 MOV RAX,qword ptr [RBP + -0x40] MOV byte ptr [RAX + 0x1],0x78 JMP 0x00181e58 LAB_00181e51: MOV RAX,qword ptr [RBP + -0x78] MOV byte ptr [RAX],0x78 LAB_00181e58: MOV RAX,qword ptr [RBP + -0x78] MOV byte ptr [RAX + 0x1],0x30 LAB_00181e60: MOV RAX,qword ptr [RBP + -0x88] ADD RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x40],RAX LAB_00181e6f: MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x78] MOV RDX,qword ptr [RBP + -0x68] CALL 0x001244c0 LAB_00181e80: MOV RAX,qword ptr [RBP + -0x68] ADD RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x38],RAX LAB_00181e94: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x98],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00181ec1 MOV RAX,qword ptr [RBP + -0x98] ADD RSP,0xa0 POP RBP RET LAB_00181ec1: CALL 0x001242c0
int1 * process_int_arg(int1 *param_1,long param_2,ulong param_3,int8 param_4,char param_5, uint param_6) { byte bVar1; ulong __n; long in_FS_OFFSET; ulong local_98; long local_88; int1 *local_80; int1 *local_48; int1 *local_40; int1 local_38 [40]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_98 = param_2 - (long)param_1; if ((local_98 < 0x10) || (local_80 = param_1, param_3 != 0)) { local_80 = local_38; } if ((param_5 == 'd') || (param_5 == 'i')) { local_88 = int10_to_str(param_4,local_80,0xfffffff6); } else if (param_5 == 'u') { local_88 = int10_to_str(param_4,local_80,10); } else if (param_5 == 'p') { *local_80 = 0x30; local_80[1] = 0x78; local_88 = int2str(param_4,local_80 + 2,0x10,0); } else if (param_5 == 'o') { local_88 = int2str(param_4,local_80,8,0); } else { local_88 = int2str(param_4,local_80,0x10,param_5 == 'X'); } __n = local_88 - (long)local_80; local_40 = param_1; if (__n <= local_98) { local_48 = param_1; if (local_80 == local_38) { if (param_3 < local_98) { local_98 = param_3; } if (__n < local_98) { local_98 = local_98 - __n; bVar1 = 0x20; if ((param_6 & 4) != 0) { bVar1 = 0x30; } memset(param_1,(uint)bVar1,local_98); if ((param_5 == 'p') && ((param_6 & 4) != 0)) { if (local_98 < 2) { *local_80 = 0x78; } else { param_1[1] = 0x78; } local_80[1] = 0x30; } local_48 = param_1 + local_98; } memmove(local_48,local_80,__n); } local_40 = local_48 + __n; } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_40; }
25,543
glfwPlatformGetPhysicalDevicePresentationSupport
untodesu[P]riteg/build_O3/_deps/glfw-src/src/x11_window.c
int _glfwPlatformGetPhysicalDevicePresentationSupport(VkInstance instance, VkPhysicalDevice device, uint32_t queuefamily) { VisualID visualID = XVisualIDFromVisual(DefaultVisual(_glfw.x11.display, _glfw.x11.screen)); if (_glfw.vk.KHR_xcb_surface && _glfw.x11.x11xcb.handle) { PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR vkGetPhysicalDeviceXcbPresentationSupportKHR = (PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR) vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceXcbPresentationSupportKHR"); if (!vkGetPhysicalDeviceXcbPresentationSupportKHR) { _glfwInputError(GLFW_API_UNAVAILABLE, "X11: Vulkan instance missing VK_KHR_xcb_surface extension"); return GLFW_FALSE; } xcb_connection_t* connection = XGetXCBConnection(_glfw.x11.display); if (!connection) { _glfwInputError(GLFW_PLATFORM_ERROR, "X11: Failed to retrieve XCB connection"); return GLFW_FALSE; } return vkGetPhysicalDeviceXcbPresentationSupportKHR(device, queuefamily, connection, visualID); } else { PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR vkGetPhysicalDeviceXlibPresentationSupportKHR = (PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR) vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceXlibPresentationSupportKHR"); if (!vkGetPhysicalDeviceXlibPresentationSupportKHR) { _glfwInputError(GLFW_API_UNAVAILABLE, "X11: Vulkan instance missing VK_KHR_xlib_surface extension"); return GLFW_FALSE; } return vkGetPhysicalDeviceXlibPresentationSupportKHR(device, queuefamily, _glfw.x11.display, visualID); } }
O3
c
glfwPlatformGetPhysicalDevicePresentationSupport: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movl %edx, %ebx movq %rsi, %r14 movq %rdi, %r12 leaq 0x82cb4(%rip), %r13 # 0xa8638 movq 0x1fec0(%r13), %rax movq 0xe8(%rax), %rax movslq 0x1fec8(%r13), %rcx shlq $0x7, %rcx movq 0x40(%rax,%rcx), %rdi callq 0xce30 movq %rax, %r15 cmpl $0x0, 0x1fea8(%r13) movq 0x1fe98(%r13), %rax je 0x259fc cmpq $0x0, 0x206b8(%r13) je 0x259fc leaq 0x602bd(%rip), %rsi # 0x85c89 movq %r12, %rdi callq *%rax testq %rax, %rax je 0x25a30 movq %rax, %r12 movq 0x1fec0(%r13), %rdi callq *0x206c0(%r13) testq %rax, %rax je 0x25a3e movq %r14, %rdi movl %ebx, %esi movq %rax, %rdx movq %r15, %rcx movq %r12, %rax jmp 0x25a1c leaq 0x60314(%rip), %rsi # 0x85d17 movq %r12, %rdi callq *%rax testq %rax, %rax je 0x25a27 movq 0x1fec0(%r13), %rdx movq %r14, %rdi movl %ebx, %esi movq %r15, %rcx popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 jmpq *%rax leaq 0x60317(%rip), %rsi # 0x85d45 jmp 0x25a37 leaq 0x6027f(%rip), %rsi # 0x85cb6 movl $0x10006, %edi # imm = 0x10006 jmp 0x25a4a leaq 0x602ab(%rip), %rsi # 0x85cf0 movl $0x10008, %edi # imm = 0x10008 xorl %eax, %eax callq 0x18e91 xorl %eax, %eax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
_glfwPlatformGetPhysicalDevicePresentationSupport: push r15 push r14 push r13 push r12 push rbx mov ebx, edx mov r14, rsi mov r12, rdi lea r13, _glfw mov rax, [r13+1FEC0h] mov rax, [rax+0E8h] movsxd rcx, dword ptr [r13+1FEC8h] shl rcx, 7 mov rdi, [rax+rcx+40h] call _XVisualIDFromVisual mov r15, rax cmp dword ptr [r13+1FEA8h], 0 mov rax, [r13+1FE98h] jz short loc_259FC cmp qword ptr [r13+206B8h], 0 jz short loc_259FC lea rsi, aVkgetphysicald; "vkGetPhysicalDeviceXcbPresentationSuppo"... mov rdi, r12 call rax test rax, rax jz short loc_25A30 mov r12, rax mov rdi, [r13+1FEC0h] call qword ptr ds:loc_206C0[r13] test rax, rax jz short loc_25A3E mov rdi, r14 mov esi, ebx mov rdx, rax mov rcx, r15 mov rax, r12 jmp short loc_25A1C loc_259FC: lea rsi, aVkgetphysicald_0; "vkGetPhysicalDeviceXlibPresentationSupp"... mov rdi, r12 call rax test rax, rax jz short loc_25A27 mov rdx, [r13+1FEC0h] mov rdi, r14 mov esi, ebx mov rcx, r15 loc_25A1C: pop rbx pop r12 pop r13 pop r14 pop r15 jmp rax loc_25A27: lea rsi, aX11VulkanInsta; "X11: Vulkan instance missing VK_KHR_xli"... jmp short loc_25A37 loc_25A30: lea rsi, aX11VulkanInsta_0; "X11: Vulkan instance missing VK_KHR_xcb"... loc_25A37: mov edi, offset loc_10006 jmp short loc_25A4A loc_25A3E: lea rsi, aX11FailedToRet; "X11: Failed to retrieve XCB connection" mov edi, 10008h loc_25A4A: xor eax, eax call _glfwInputError xor eax, eax pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long glfwPlatformGetPhysicalDevicePresentationSupport(long long a1, long long a2, unsigned int a3) { long long v4; // r15 long long ( *v5)(long long, const char *); // rax long long v6; // rax long long ( *v7)(long long, long long, long long, long long); // r12 long long v8; // rax long long v9; // rdi long long v10; // rsi long long v11; // rdx long long v12; // rcx long long ( *v13)(long long, long long, long long, long long); // rax const char *v15; // rsi void *v16; // rdi v4 = XVisualIDFromVisual(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)&glfw[32688] + 232LL) + ((long long)(int)glfw[32690] << 7) + 64)); v5 = *(long long ( **)(long long, const char *))&glfw[32678]; if ( !glfw[32682] || !*(_QWORD *)&glfw[33198] ) { v13 = (long long ( *)(long long, long long, long long, long long))v5( a1, "vkGetPhysicalDeviceXlibPresentationSupportKHR"); if ( v13 ) { v11 = *(_QWORD *)&glfw[32688]; v9 = a2; v10 = a3; v12 = v4; return v13(v9, v10, v11, v12); } v15 = "X11: Vulkan instance missing VK_KHR_xlib_surface extension"; goto LABEL_11; } v6 = v5(a1, "vkGetPhysicalDeviceXcbPresentationSupportKHR"); if ( !v6 ) { v15 = "X11: Vulkan instance missing VK_KHR_xcb_surface extension"; LABEL_11: v16 = &loc_10006; goto LABEL_13; } v7 = (long long ( *)(long long, long long, long long, long long))v6; v8 = (*(long long ( **)(_QWORD))((char *)&loc_206C0 + (_QWORD)glfw))(*(_QWORD *)&glfw[32688]); if ( v8 ) { v9 = a2; v10 = a3; v11 = v8; v12 = v4; v13 = v7; return v13(v9, v10, v11, v12); } v15 = "X11: Failed to retrieve XCB connection"; LODWORD(v16) = 65544; LABEL_13: glfwInputError((unsigned int)v16, (long long)v15); return 0LL; }
_glfwPlatformGetPhysicalDevicePresentationSupport: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV EBX,EDX MOV R14,RSI MOV R12,RDI LEA R13,[0x1a8638] MOV RAX,qword ptr [R13 + 0x1fec0] MOV RAX,qword ptr [RAX + 0xe8] MOVSXD RCX,dword ptr [R13 + 0x1fec8] SHL RCX,0x7 MOV RDI,qword ptr [RAX + RCX*0x1 + 0x40] CALL 0x0010ce30 MOV R15,RAX CMP dword ptr [R13 + 0x1fea8],0x0 MOV RAX,qword ptr [R13 + 0x1fe98] JZ 0x001259fc CMP qword ptr [R13 + 0x206b8],0x0 JZ 0x001259fc LEA RSI,[0x185c89] MOV RDI,R12 CALL RAX TEST RAX,RAX JZ 0x00125a30 MOV R12,RAX MOV RDI,qword ptr [R13 + 0x1fec0] CALL qword ptr [R13 + 0x206c0] TEST RAX,RAX JZ 0x00125a3e MOV RDI,R14 MOV ESI,EBX MOV RDX,RAX MOV RCX,R15 MOV RAX,R12 JMP 0x00125a1c LAB_001259fc: LEA RSI,[0x185d17] MOV RDI,R12 CALL RAX TEST RAX,RAX JZ 0x00125a27 MOV RDX,qword ptr [R13 + 0x1fec0] MOV RDI,R14 MOV ESI,EBX MOV RCX,R15 LAB_00125a1c: POP RBX POP R12 POP R13 POP R14 POP R15 JMP RAX LAB_00125a27: LEA RSI,[0x185d45] JMP 0x00125a37 LAB_00125a30: LEA RSI,[0x185cb6] LAB_00125a37: MOV EDI,0x10006 JMP 0x00125a4a LAB_00125a3e: LEA RSI,[0x185cf0] MOV EDI,0x10008 LAB_00125a4a: XOR EAX,EAX CALL 0x00118e91 XOR EAX,EAX POP RBX POP R12 POP R13 POP R14 POP R15 RET
int8 _glfwPlatformGetPhysicalDevicePresentationSupport (int8 param_1,int8 param_2,int4 param_3) { int8 uVar1; code *UNRECOVERED_JUMPTABLE; long lVar2; char *pcVar3; uVar1 = XVisualIDFromVisual(*(int8 *) (*(long *)(DAT_001c84f8 + 0xe8) + 0x40 + (long)DAT_001c8500 * 0x80)); if ((DAT_001c84e0 == 0) || (DAT_001c8cf0 == 0)) { UNRECOVERED_JUMPTABLE = (code *)(*DAT_001c84d0)(param_1,"vkGetPhysicalDeviceXlibPresentationSupportKHR"); lVar2 = DAT_001c84f8; if (UNRECOVERED_JUMPTABLE != (code *)0x0) { LAB_00125a1c: /* WARNING: Could not recover jumptable at 0x00125a25. Too many branches */ /* WARNING: Treating indirect jump as call */ uVar1 = (*UNRECOVERED_JUMPTABLE)(param_2,param_3,lVar2,uVar1); return uVar1; } pcVar3 = "X11: Vulkan instance missing VK_KHR_xlib_surface extension"; } else { UNRECOVERED_JUMPTABLE = (code *)(*DAT_001c84d0)(param_1,"vkGetPhysicalDeviceXcbPresentationSupportKHR"); if (UNRECOVERED_JUMPTABLE != (code *)0x0) { lVar2 = (*DAT_001c8cf8)(DAT_001c84f8); if (lVar2 != 0) goto LAB_00125a1c; pcVar3 = "X11: Failed to retrieve XCB connection"; uVar1 = 0x10008; goto LAB_00125a4a; } pcVar3 = "X11: Vulkan instance missing VK_KHR_xcb_surface extension"; } uVar1 = 0x10006; LAB_00125a4a: _glfwInputError(uVar1,pcVar3); return 0; }
25,544
Json::StyledStreamWriter::writeArrayValue(Json::Value const&)
aimrt_mujoco_sim/_deps/jsoncpp-src/src/lib_json/json_writer.cpp
void StyledStreamWriter::writeArrayValue(const Value& value) { unsigned size = value.size(); if (size == 0) pushValue("[]"); else { bool isArrayMultiLine = isMultilineArray(value); if (isArrayMultiLine) { writeWithIndent("["); indent(); bool hasChildValue = !childValues_.empty(); unsigned index = 0; for (;;) { const Value& childValue = value[index]; writeCommentBeforeValue(childValue); if (hasChildValue) writeWithIndent(childValues_[index]); else { if (!indented_) writeIndent(); indented_ = true; writeValue(childValue); indented_ = false; } if (++index == size) { writeCommentAfterValueOnSameLine(childValue); break; } *document_ << ","; writeCommentAfterValueOnSameLine(childValue); } unindent(); writeWithIndent("]"); } else // output on a single line { assert(childValues_.size() == size); *document_ << "[ "; for (unsigned index = 0; index < size; ++index) { if (index > 0) *document_ << ", "; *document_ << childValues_[index]; } *document_ << " ]"; } } }
O3
cpp
Json::StyledStreamWriter::writeArrayValue(Json::Value const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rsi, %r12 movq %rdi, %rbx movq %rsi, %rdi callq 0x77f28 movq %rax, (%rsp) testl %eax, %eax je 0x7dad4 movq %rbx, %rdi movq %r12, %rsi callq 0x7dc72 testb %al, %al je 0x7db07 leaq 0x18(%rsp), %r14 movq %r14, -0x10(%r14) leaq 0xbf61(%rip), %rsi # 0x89946 leaq 0xbf5b(%rip), %rdx # 0x89947 leaq 0x8(%rsp), %rdi callq 0x1e620 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x7dc16 movq 0x8(%rsp), %rdi cmpq %r14, %rdi je 0x7da12 callq 0x1f0e0 leaq 0x20(%rbx), %rdi movq 0x48(%rbx), %rsi movq 0x50(%rbx), %rdx movq %rdi, 0x28(%rsp) callq 0x201d0 movq (%rbx), %rax movq %rax, 0x30(%rsp) movq 0x8(%rbx), %r14 movq (%rsp), %rax decl %eax movq %rax, (%rsp) xorl %r15d, %r15d xorl %ebp, %ebp movq %r12, %r13 movq %r12, %rdi movl %ebp, %esi callq 0x784f6 movq %rax, %r12 movq %rbx, %rdi movq %rax, %rsi callq 0x7d322 cmpq %r14, 0x30(%rsp) je 0x7da75 movq (%rbx), %rsi addq %r15, %rsi movq %rbx, %rdi callq 0x7dc16 jmp 0x7da9b movb 0x68(%rbx), %al testb $0x2, %al jne 0x7da87 movq %rbx, %rdi callq 0x7d41a movb 0x68(%rbx), %al orb $0x2, %al movb %al, 0x68(%rbx) movq %rbx, %rdi movq %r12, %rsi callq 0x7d44e andb $-0x3, 0x68(%rbx) cmpq %rbp, (%rsp) je 0x7db85 incq %rbp movq 0x18(%rbx), %rdi movl $0x1, %edx leaq 0xa743(%rip), %rsi # 0x881fb callq 0x1f400 movq %rbx, %rdi movq %r12, %rsi callq 0x7d882 addq $0x20, %r15 movq %r13, %r12 jmp 0x7da43 leaq 0x18(%rsp), %r14 movq %r14, -0x10(%r14) leaq 0xbe5f(%rip), %rsi # 0x89943 leaq 0xbe5a(%rip), %rdx # 0x89945 leaq 0x8(%rsp), %rdi callq 0x1e620 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x7d97c jmp 0x7dbd1 movq 0x18(%rbx), %rdi leaq 0x9803(%rip), %rsi # 0x87315 movl $0x2, %edx callq 0x1f400 movl (%rsp), %r15d shlq $0x5, %r15 xorl %r12d, %r12d leaq 0x97eb(%rip), %r14 # 0x87319 testq %r12, %r12 je 0x7db44 movq 0x18(%rbx), %rdi movl $0x2, %edx movq %r14, %rsi callq 0x1f400 movq (%rbx), %rax movq 0x18(%rbx), %rdi movq (%rax,%r12), %rsi movq 0x8(%rax,%r12), %rdx callq 0x1f400 addq $0x20, %r12 cmpq %r12, %r15 jne 0x7db2e movq 0x18(%rbx), %rdi leaq 0x97af(%rip), %rsi # 0x8731c movl $0x2, %edx addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x1f400 movq %rbx, %rdi movq %r12, %rsi callq 0x7d882 movq 0x28(%rbx), %rsi subq 0x50(%rbx), %rsi movq 0x28(%rsp), %rdi xorl %edx, %edx callq 0x1e5b0 leaq 0x8(%rsp), %rdi leaq 0x18(%rsp), %r14 movq %r14, (%rdi) leaq 0x9765(%rip), %rsi # 0x8731d leaq 0x975f(%rip), %rdx # 0x8731e callq 0x1e620 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x7dc16 movq 0x8(%rsp), %rdi cmpq %r14, %rdi je 0x7dbe0 callq 0x1f0e0 addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x7dbf7 jmp 0x7dc0b jmp 0x7dbf7 jmp 0x7dc0b movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r14, %rdi je 0x7dc0e callq 0x1f0e0 jmp 0x7dc0e movq %rax, %rbx movq %rbx, %rdi callq 0x1ffd0
_ZN4Json18StyledStreamWriter15writeArrayValueERKNS_5ValueE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r12, rsi mov rbx, rdi mov rdi, rsi; this call _ZNK4Json5Value4sizeEv; Json::Value::size(void) mov [rsp+68h+var_68], rax test eax, eax jz loc_7DAD4 mov rdi, rbx; this mov rsi, r12; Json::Value * call _ZN4Json18StyledStreamWriter16isMultilineArrayERKNS_5ValueE; Json::StyledStreamWriter::isMultilineArray(Json::Value const&) test al, al jz loc_7DB07 lea r14, [rsp+68h+var_50] mov [r14-10h], r14 lea rsi, asc_89946; "[" lea rdx, asc_89946+1; "" lea rdi, [rsp+68h+var_60] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rsi, [rsp+68h+var_60] mov rdi, rbx; this call _ZN4Json18StyledStreamWriter15writeWithIndentERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Json::StyledStreamWriter::writeWithIndent(std::string const&) mov rdi, [rsp+68h+var_60]; void * cmp rdi, r14 jz short loc_7DA12 call __ZdlPv; operator delete(void *) loc_7DA12: lea rdi, [rbx+20h] mov rsi, [rbx+48h] mov rdx, [rbx+50h] mov [rsp+68h+var_40], rdi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rax, [rbx] mov [rsp+68h+var_38], rax mov r14, [rbx+8] mov rax, [rsp+68h+var_68] dec eax mov [rsp+68h+var_68], rax xor r15d, r15d xor ebp, ebp loc_7DA43: mov r13, r12 mov rdi, r12 mov esi, ebp call _ZNK4Json5ValueixEj; Json::Value::operator[](uint) mov r12, rax mov rdi, rbx; this mov rsi, rax; Json::Value * call _ZN4Json18StyledStreamWriter23writeCommentBeforeValueERKNS_5ValueE; Json::StyledStreamWriter::writeCommentBeforeValue(Json::Value const&) cmp [rsp+68h+var_38], r14 jz short loc_7DA75 mov rsi, [rbx] add rsi, r15 mov rdi, rbx; this call _ZN4Json18StyledStreamWriter15writeWithIndentERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Json::StyledStreamWriter::writeWithIndent(std::string const&) jmp short loc_7DA9B loc_7DA75: mov al, [rbx+68h] test al, 2 jnz short loc_7DA87 mov rdi, rbx; this call _ZN4Json18StyledStreamWriter11writeIndentEv; Json::StyledStreamWriter::writeIndent(void) mov al, [rbx+68h] loc_7DA87: or al, 2 mov [rbx+68h], al mov rdi, rbx; this mov rsi, r12; Json::Value * call _ZN4Json18StyledStreamWriter10writeValueERKNS_5ValueE; Json::StyledStreamWriter::writeValue(Json::Value const&) and byte ptr [rbx+68h], 0FDh loc_7DA9B: cmp [rsp+68h+var_68], rbp jz loc_7DB85 inc rbp mov rdi, [rbx+18h] mov edx, 1 lea rsi, asc_881FB; "," call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, rbx; this mov rsi, r12; Json::Value * call _ZN4Json18StyledStreamWriter32writeCommentAfterValueOnSameLineERKNS_5ValueE; Json::StyledStreamWriter::writeCommentAfterValueOnSameLine(Json::Value const&) add r15, 20h ; ' ' mov r12, r13 jmp loc_7DA43 loc_7DAD4: lea r14, [rsp+68h+var_50] mov [r14-10h], r14 lea rsi, asc_89943; "[]" lea rdx, asc_89943+2; "" lea rdi, [rsp+68h+var_60] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rsi, [rsp+68h+var_60] mov rdi, rbx call _ZN4Json18StyledStreamWriter9pushValueERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Json::StyledStreamWriter::pushValue(std::string const&) jmp loc_7DBD1 loc_7DB07: mov rdi, [rbx+18h] lea rsi, asc_87315; "[ " mov edx, 2 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov r15d, dword ptr [rsp+68h+var_68] shl r15, 5 xor r12d, r12d lea r14, asc_87318+1; ", " loc_7DB2E: test r12, r12 jz short loc_7DB44 mov rdi, [rbx+18h] mov edx, 2 mov rsi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) loc_7DB44: mov rax, [rbx] mov rdi, [rbx+18h] mov rsi, [rax+r12] mov rdx, [rax+r12+8] call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) add r12, 20h ; ' ' cmp r15, r12 jnz short loc_7DB2E mov rdi, [rbx+18h] lea rsi, asc_8731C; " ]" mov edx, 2 add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) loc_7DB85: mov rdi, rbx; this mov rsi, r12; Json::Value * call _ZN4Json18StyledStreamWriter32writeCommentAfterValueOnSameLineERKNS_5ValueE; Json::StyledStreamWriter::writeCommentAfterValueOnSameLine(Json::Value const&) mov rsi, [rbx+28h] sub rsi, [rbx+50h] mov rdi, [rsp+68h+var_40] xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char) lea rdi, [rsp+68h+var_60] lea r14, [rsp+68h+var_50] mov [rdi], r14 lea rsi, asc_8731C+1; "]" lea rdx, asc_8731C+2; "" call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rsi, [rsp+68h+var_60] mov rdi, rbx; this call _ZN4Json18StyledStreamWriter15writeWithIndentERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Json::StyledStreamWriter::writeWithIndent(std::string const&) loc_7DBD1: mov rdi, [rsp+68h+var_60]; void * cmp rdi, r14 jz short loc_7DBE0 call __ZdlPv; operator delete(void *) loc_7DBE0: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_7DBF7 jmp short loc_7DC0B jmp short loc_7DBF7 jmp short loc_7DC0B loc_7DBF7: mov rbx, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r14 jz short loc_7DC0E call __ZdlPv; operator delete(void *) jmp short loc_7DC0E loc_7DC0B: mov rbx, rax loc_7DC0E: mov rdi, rbx call __Unwind_Resume
void Json::StyledStreamWriter::writeArrayValue(Json::StyledStreamWriter *this, const Json::Value *a2) { Json::Value *v2; // r12 long long v3; // rsi long long v4; // rdx long long v5; // r14 long long v6; // r15 long long v7; // rbp Json::Value *v8; // r13 const Json::Value *v9; // r12 char v10; // al long long v11; // r12 unsigned int v12; // [rsp+0h] [rbp-68h] long long v13; // [rsp+0h] [rbp-68h] void *v14[2]; // [rsp+8h] [rbp-60h] BYREF _BYTE v15[16]; // [rsp+18h] [rbp-50h] BYREF char *v16; // [rsp+28h] [rbp-40h] long long v17; // [rsp+30h] [rbp-38h] v2 = a2; v12 = Json::Value::size(a2); if ( !v12 ) { v14[0] = v15; std::string::_M_construct<char const*>(v14, "[]", ""); Json::StyledStreamWriter::pushValue((long long)this, v14); LABEL_20: if ( v14[0] != v15 ) operator delete(v14[0]); return; } if ( (unsigned __int8)Json::StyledStreamWriter::isMultilineArray(this, a2) ) { v14[0] = v15; std::string::_M_construct<char const*>(v14, "[", ""); Json::StyledStreamWriter::writeWithIndent(this); if ( v14[0] != v15 ) operator delete(v14[0]); v3 = *((_QWORD *)this + 9); v4 = *((_QWORD *)this + 10); v16 = (char *)this + 32; std::string::_M_append((char *)this + 32, v3, v4); v17 = *(_QWORD *)this; v5 = *((_QWORD *)this + 1); v13 = v12 - 1; v6 = 0LL; v7 = 0LL; while ( 1 ) { v8 = v2; v9 = (const Json::Value *)Json::Value::operator[](v2, v7); Json::StyledStreamWriter::writeCommentBeforeValue(this, v9); if ( v17 == v5 ) { v10 = *((_BYTE *)this + 104); if ( (v10 & 2) == 0 ) { Json::StyledStreamWriter::writeIndent(this); v10 = *((_BYTE *)this + 104); } *((_BYTE *)this + 104) = v10 | 2; Json::StyledStreamWriter::writeValue(this, v9); *((_BYTE *)this + 104) &= ~2u; } else { Json::StyledStreamWriter::writeWithIndent(this); } if ( v13 == v7 ) break; ++v7; std::__ostream_insert<char,std::char_traits<char>>(*((_QWORD *)this + 3), ",", 1LL); Json::StyledStreamWriter::writeCommentAfterValueOnSameLine(this, v9); v6 += 32LL; v2 = v8; } Json::StyledStreamWriter::writeCommentAfterValueOnSameLine(this, v9); std::string::resize(v16, *((_QWORD *)this + 5) - *((_QWORD *)this + 10), 0LL); v14[0] = v15; std::string::_M_construct<char const*>(v14, "]", ""); Json::StyledStreamWriter::writeWithIndent(this); goto LABEL_20; } std::__ostream_insert<char,std::char_traits<char>>(*((_QWORD *)this + 3), "[ ", 2LL); v11 = 0LL; do { if ( v11 ) std::__ostream_insert<char,std::char_traits<char>>(*((_QWORD *)this + 3), ", ", 2LL); std::__ostream_insert<char,std::char_traits<char>>( *((_QWORD *)this + 3), *(_QWORD *)(*(_QWORD *)this + v11), *(_QWORD *)(*(_QWORD *)this + v11 + 8)); v11 += 32LL; } while ( 32LL * v12 != v11 ); std::__ostream_insert<char,std::char_traits<char>>(*((_QWORD *)this + 3), " ]", 2LL); }
writeArrayValue: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R12,RSI MOV RBX,RDI MOV RDI,RSI CALL 0x00177f28 MOV qword ptr [RSP],RAX TEST EAX,EAX JZ 0x0017dad4 MOV RDI,RBX MOV RSI,R12 CALL 0x0017dc72 TEST AL,AL JZ 0x0017db07 LEA R14,[RSP + 0x18] MOV qword ptr [R14 + -0x10],R14 LAB_0017d9de: LEA RSI,[0x189946] LEA RDX,[0x189947] LEA RDI,[RSP + 0x8] CALL 0x0011e620 LAB_0017d9f6: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x0017dc16 LAB_0017da03: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R14 JZ 0x0017da12 CALL 0x0011f0e0 LAB_0017da12: LEA RDI,[RBX + 0x20] MOV RSI,qword ptr [RBX + 0x48] MOV RDX,qword ptr [RBX + 0x50] MOV qword ptr [RSP + 0x28],RDI CALL 0x001201d0 MOV RAX,qword ptr [RBX] MOV qword ptr [RSP + 0x30],RAX MOV R14,qword ptr [RBX + 0x8] MOV RAX,qword ptr [RSP] DEC EAX MOV qword ptr [RSP],RAX XOR R15D,R15D XOR EBP,EBP LAB_0017da43: MOV R13,R12 MOV RDI,R12 MOV ESI,EBP CALL 0x001784f6 MOV R12,RAX MOV RDI,RBX MOV RSI,RAX CALL 0x0017d322 CMP qword ptr [RSP + 0x30],R14 JZ 0x0017da75 MOV RSI,qword ptr [RBX] ADD RSI,R15 MOV RDI,RBX CALL 0x0017dc16 JMP 0x0017da9b LAB_0017da75: MOV AL,byte ptr [RBX + 0x68] TEST AL,0x2 JNZ 0x0017da87 MOV RDI,RBX CALL 0x0017d41a MOV AL,byte ptr [RBX + 0x68] LAB_0017da87: OR AL,0x2 MOV byte ptr [RBX + 0x68],AL MOV RDI,RBX MOV RSI,R12 CALL 0x0017d44e AND byte ptr [RBX + 0x68],0xfd LAB_0017da9b: CMP qword ptr [RSP],RBP JZ 0x0017db85 INC RBP MOV RDI,qword ptr [RBX + 0x18] MOV EDX,0x1 LEA RSI,[0x1881fb] CALL 0x0011f400 MOV RDI,RBX MOV RSI,R12 CALL 0x0017d882 ADD R15,0x20 MOV R12,R13 JMP 0x0017da43 LAB_0017dad4: LEA R14,[RSP + 0x18] MOV qword ptr [R14 + -0x10],R14 LAB_0017dadd: LEA RSI,[0x189943] LEA RDX,[0x189945] LEA RDI,[RSP + 0x8] CALL 0x0011e620 LAB_0017daf5: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x0017d97c LAB_0017db02: JMP 0x0017dbd1 LAB_0017db07: MOV RDI,qword ptr [RBX + 0x18] LEA RSI,[0x187315] MOV EDX,0x2 CALL 0x0011f400 MOV R15D,dword ptr [RSP] SHL R15,0x5 XOR R12D,R12D LEA R14,[0x187319] LAB_0017db2e: TEST R12,R12 JZ 0x0017db44 MOV RDI,qword ptr [RBX + 0x18] MOV EDX,0x2 MOV RSI,R14 CALL 0x0011f400 LAB_0017db44: MOV RAX,qword ptr [RBX] MOV RDI,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RAX + R12*0x1] MOV RDX,qword ptr [RAX + R12*0x1 + 0x8] CALL 0x0011f400 ADD R12,0x20 CMP R15,R12 JNZ 0x0017db2e MOV RDI,qword ptr [RBX + 0x18] LEA RSI,[0x18731c] MOV EDX,0x2 ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0011f400 LAB_0017db85: MOV RDI,RBX MOV RSI,R12 CALL 0x0017d882 MOV RSI,qword ptr [RBX + 0x28] SUB RSI,qword ptr [RBX + 0x50] MOV RDI,qword ptr [RSP + 0x28] XOR EDX,EDX CALL 0x0011e5b0 LEA RDI,[RSP + 0x8] LEA R14,[RSP + 0x18] MOV qword ptr [RDI],R14 LAB_0017dbb1: LEA RSI,[0x18731d] LEA RDX,[0x18731e] CALL 0x0011e620 LAB_0017dbc4: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x0017dc16 LAB_0017dbd1: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R14 JZ 0x0017dbe0 CALL 0x0011f0e0 LAB_0017dbe0: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* Json::StyledStreamWriter::writeArrayValue(Json::Value const&) */ void __thiscall Json::StyledStreamWriter::writeArrayValue(StyledStreamWriter *this,Value *param_1) { char cVar1; StyledStreamWriter SVar2; uint uVar3; Value *pVVar4; ulong uVar5; long lVar6; long lVar7; int1 *local_60 [2]; int1 local_50 [16]; string *local_40; long local_38; uVar3 = Value::size(param_1); if (uVar3 == 0) { local_60[0] = local_50; /* try { // try from 0017dadd to 0017daf4 has its CatchHandler @ 0017dc0b */ std::__cxx11::string::_M_construct<char_const*>(local_60,&DAT_00189943,&DAT_00189945); /* try { // try from 0017daf5 to 0017db01 has its CatchHandler @ 0017dbf7 */ pushValue(this,(string *)local_60); } else { cVar1 = isMultilineArray(this,param_1); if (cVar1 == '\0') { std::__ostream_insert<char,std::char_traits<char>>(*(ostream **)(this + 0x18),"[ ",2); lVar6 = 0; do { if (lVar6 != 0) { std::__ostream_insert<char,std::char_traits<char>>(*(ostream **)(this + 0x18),", ",2); } std::__ostream_insert<char,std::char_traits<char>> (*(ostream **)(this + 0x18),*(char **)(*(long *)this + lVar6), *(long *)(*(long *)this + 8 + lVar6)); lVar6 = lVar6 + 0x20; } while ((ulong)uVar3 << 5 != lVar6); std::__ostream_insert<char,std::char_traits<char>>(*(ostream **)(this + 0x18)," ]",2); return; } /* try { // try from 0017d9de to 0017d9f5 has its CatchHandler @ 0017dbf5 */ local_60[0] = local_50; std::__cxx11::string::_M_construct<char_const*>(local_60,&DAT_00189946,&DAT_00189947); /* try { // try from 0017d9f6 to 0017da02 has its CatchHandler @ 0017dbf3 */ writeWithIndent(this,(string *)local_60); if (local_60[0] != local_50) { operator_delete(local_60[0]); } local_40 = (string *)(this + 0x20); std::__cxx11::string::_M_append(local_40,*(char **)(this + 0x48),*(ulong *)(this + 0x50)); local_38 = *(long *)this; lVar6 = *(long *)(this + 8); lVar7 = 0; uVar5 = 0; while( true ) { pVVar4 = (Value *)Value::operator[](param_1,(uint)uVar5); writeCommentBeforeValue(this,pVVar4); if (local_38 == lVar6) { SVar2 = this[0x68]; if (((byte)SVar2 & 2) == 0) { writeIndent(this); SVar2 = this[0x68]; } this[0x68] = (StyledStreamWriter)((byte)SVar2 | 2); writeValue(this,pVVar4); this[0x68] = (StyledStreamWriter)((byte)this[0x68] & 0xfd); } else { writeWithIndent(this,(string *)(*(long *)this + lVar7)); } if (uVar3 - 1 == uVar5) break; uVar5 = uVar5 + 1; std::__ostream_insert<char,std::char_traits<char>>(*(ostream **)(this + 0x18),",",1); writeCommentAfterValueOnSameLine(this,pVVar4); lVar7 = lVar7 + 0x20; } writeCommentAfterValueOnSameLine(this,pVVar4); std::__cxx11::string::resize(local_40,*(long *)(this + 0x28) - *(long *)(this + 0x50),'\0'); local_60[0] = local_50; /* try { // try from 0017dbb1 to 0017dbc3 has its CatchHandler @ 0017dbf1 */ std::__cxx11::string::_M_construct<char_const*>(local_60,&DAT_0018731d,&DAT_0018731e); /* try { // try from 0017dbc4 to 0017dbd0 has its CatchHandler @ 0017dbef */ writeWithIndent(this,(string *)local_60); } if (local_60[0] != local_50) { operator_delete(local_60[0]); } return; }
25,545
blst_p2_serialize
corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/e2.c
void blst_p2_serialize(unsigned char out[192], const POINTonE2 *in) { POINTonE2_Serialize(out, in); }
O1
c
blst_p2_serialize: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx leaq 0xc0(%rsi), %rdi movl $0x60, %esi callq 0x30680 testq %rax, %rax je 0x1c61d movl $0xc0, %edx movq %rbx, %rdi xorl %esi, %esi callq 0x5110 movb $0x40, (%rbx) popq %rbx popq %r14 popq %rbp retq movq %rbx, %rdi movq %r14, %rsi popq %rbx popq %r14 popq %rbp jmp 0x1e0bf
blst_p2_serialize: push rbp mov rbp, rsp push r14 push rbx mov r14, rsi mov rbx, rdi lea rdi, [rsi+0C0h] mov esi, 60h ; '`' call vec_is_zero_16x test rax, rax jz short loc_1C61D mov edx, 0C0h mov rdi, rbx xor esi, esi call _memset mov byte ptr [rbx], 40h ; '@' pop rbx pop r14 pop rbp retn loc_1C61D: mov rdi, rbx mov rsi, r14 pop rbx pop r14 pop rbp jmp POINTonE2_Serialize_BE
long long blst_p2_serialize(_BYTE *a1, long long a2) { long long result; // rax if ( !vec_is_zero_16x(a2 + 192, 96LL) ) return POINTonE2_Serialize_BE(a1, a2); result = memset(a1, 0LL, 192LL); *a1 = 64; return result; }
blst_p2_serialize: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV R14,RSI MOV RBX,RDI LEA RDI,[RSI + 0xc0] MOV ESI,0x60 CALL 0x00130680 TEST RAX,RAX JZ 0x0011c61d MOV EDX,0xc0 MOV RDI,RBX XOR ESI,ESI CALL 0x00105110 MOV byte ptr [RBX],0x40 POP RBX POP R14 POP RBP RET LAB_0011c61d: MOV RDI,RBX MOV RSI,R14 POP RBX POP R14 POP RBP JMP 0x0011e0bf
void blst_p2_serialize(int1 *param_1,long param_2) { long lVar1; lVar1 = vec_is_zero_16x(param_2 + 0xc0); if (lVar1 != 0) { memset(param_1,0,0xc0); *param_1 = 0x40; return; } POINTonE2_Serialize_BE(param_1,param_2); return; }
25,546
my_charpos_utf16
eloqsql/strings/ctype-ucs2.c
static size_t my_charpos_utf16(CHARSET_INFO *cs, const char *b, const char *e, size_t pos) { const char *b0= b; uint charlen; for ( ; pos; b+= charlen, pos--) { if (!(charlen= my_ismbchar(cs, b, e))) return (e + 2 - b0); /* Error, return pos outside the string */ } return (size_t) (pos ? (e + 2 - b0) : (b - b0)); }
O3
c
my_charpos_utf16: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rsi, %r12 testq %rcx, %rcx je 0xc9b05 movq %rcx, %r15 movq %rdx, %r14 movq %rdi, %r13 movq %rbx, %r12 movq 0xb8(%r13), %rax movq %r13, %rdi movq %r12, %rsi movq %r14, %rdx callq *0xc0(%rax) cmpl $0x1, %eax jle 0xc9afe movl %eax, %eax addq %rax, %r12 decq %r15 jne 0xc9ad7 jmp 0xc9b05 addq $0x2, %r14 movq %r14, %r12 subq %rbx, %r12 movq %r12, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_charpos_utf16: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi mov r12, rsi test rcx, rcx jz short loc_C9B05 mov r15, rcx mov r14, rdx mov r13, rdi mov r12, rbx loc_C9AD7: mov rax, [r13+0B8h] mov rdi, r13 mov rsi, r12 mov rdx, r14 call qword ptr [rax+0C0h] cmp eax, 1 jle short loc_C9AFE mov eax, eax add r12, rax dec r15 jnz short loc_C9AD7 jmp short loc_C9B05 loc_C9AFE: add r14, 2 mov r12, r14 loc_C9B05: sub r12, rbx mov rax, r12 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_charpos_utf16(long long a1, long long a2, long long a3, long long a4) { long long v4; // r12 long long v5; // r15 int v7; // eax v4 = a2; if ( a4 ) { v5 = a4; v4 = a2; while ( 1 ) { v7 = (*(long long ( **)(long long, long long, long long))(*(_QWORD *)(a1 + 184) + 192LL))(a1, v4, a3); if ( v7 <= 1 ) break; v4 += (unsigned int)v7; if ( !--v5 ) return v4 - a2; } v4 = a3 + 2; } return v4 - a2; }
my_charpos_utf16: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI MOV R12,RSI TEST RCX,RCX JZ 0x001c9b05 MOV R15,RCX MOV R14,RDX MOV R13,RDI MOV R12,RBX LAB_001c9ad7: MOV RAX,qword ptr [R13 + 0xb8] MOV RDI,R13 MOV RSI,R12 MOV RDX,R14 CALL qword ptr [RAX + 0xc0] CMP EAX,0x1 JLE 0x001c9afe MOV EAX,EAX ADD R12,RAX DEC R15 JNZ 0x001c9ad7 JMP 0x001c9b05 LAB_001c9afe: ADD R14,0x2 MOV R12,R14 LAB_001c9b05: SUB R12,RBX MOV RAX,R12 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_charpos_utf16(long param_1,long param_2,long param_3,long param_4) { uint uVar1; long lVar2; lVar2 = param_2; if (param_4 != 0) { do { uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,lVar2,param_3); if ((int)uVar1 < 2) { lVar2 = param_3 + 2; break; } lVar2 = lVar2 + (ulong)uVar1; param_4 = param_4 + -1; } while (param_4 != 0); } return lVar2 - param_2; }
25,547
bool nlohmann::json_abi_v3_11_3::operator!=<bool, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, bool)
monkey531[P]llama/common/json.hpp
bool operator!=(const_reference lhs, ScalarType rhs) noexcept { return lhs != basic_json(rhs); }
O3
cpp
bool nlohmann::json_abi_v3_11_3::operator!=<bool, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, bool): pushq %r14 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx xorps %xmm0, %xmm0 movq %rsp, %r14 movaps %xmm0, (%r14) movq %r14, %rdi callq 0x5fcac movq %r14, %rdi movl $0x1, %esi callq 0x58644 movq %rbx, %rdi movq %r14, %rsi callq 0xab459 movl %eax, %ebx movq %r14, %rdi xorl %esi, %esi callq 0x58644 movq %r14, %rdi callq 0x5db32 movl %ebx, %eax addq $0x18, %rsp popq %rbx popq %r14 retq nop
_ZN8nlohmann16json_abi_v3_11_3neIbTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEES3_: push r14 push rbx sub rsp, 18h mov rbx, rdi xorps xmm0, xmm0 mov r14, rsp movaps xmmword ptr [r14], xmm0 mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE4EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_NSJ_9boolean_tE; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)4>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::boolean_t) mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_3neERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::operator!=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov ebx, eax mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov eax, ebx add rsp, 18h pop rbx pop r14 retn
long long ZN8nlohmann16json_abi_v3_11_3neIbTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEES3_( unsigned __int8 *a1, unsigned __int8 a2) { unsigned int v2; // eax unsigned int v3; // ebx _OWORD v5[2]; // [rsp+0h] [rbp-28h] BYREF v5[0] = 0LL; nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)4>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( (unsigned __int8 *)v5, a2); 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 *)v5); LOBYTE(v2) = nlohmann::json_abi_v3_11_3::operator!=(a1, (unsigned __int8 *)v5, (__m128d)0LL); v3 = v2; 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 *)v5); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v5); return v3; }
_ZN8nlohmann16json_abi_v3_11_3neIbTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEES3_: PUSH R14 PUSH RBX SUB RSP,0x18 MOV RBX,RDI XORPS XMM0,XMM0 MOV R14,RSP MOVAPS xmmword ptr [R14],XMM0 MOV RDI,R14 CALL 0x0015fcac MOV RDI,R14 MOV ESI,0x1 CALL 0x00158644 MOV RDI,RBX MOV RSI,R14 CALL 0x001ab459 MOV EBX,EAX MOV RDI,R14 XOR ESI,ESI CALL 0x00158644 MOV RDI,R14 CALL 0x0015db32 MOV EAX,EBX ADD RSP,0x18 POP RBX POP R14 RET
int4 _ZN8nlohmann16json_abi_v3_11_3neIbTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEES3_ (basic_json *param_1) { int4 uVar1; int8 local_28; int8 uStack_20; local_28 = 0; uStack_20 = 0; nlohmann::json_abi_v3_11_3::detail:: external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)4>:: construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (&local_28); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(&local_28,0)); uVar1 = nlohmann::json_abi_v3_11_3::operator!=(param_1,(basic_json *)&local_28); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(&local_28,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)&local_28); return uVar1; }
25,548
set_page_bits
eloqsql/storage/maria/ma_bitmap.c
static my_bool set_page_bits(MARIA_HA *info, MARIA_FILE_BITMAP *bitmap, pgcache_page_no_t page, uint fill_pattern) { pgcache_page_no_t bitmap_page; uint offset_page, offset, tmp, org_tmp, used_offset; uchar *data; DBUG_ENTER("set_page_bits"); DBUG_ASSERT(fill_pattern <= 7); bitmap_page= page - page % bitmap->pages_covered; if (bitmap_page != bitmap->page && _ma_change_bitmap_page(info, bitmap, bitmap_page)) DBUG_RETURN(1); /* Find page number from start of bitmap */ offset_page= (uint) (page - bitmap->page - 1); /* Mark place used by reading/writing 2 bytes at a time to handle bitmaps in overlapping bytes */ offset_page*= 3; offset= offset_page & 7; data= bitmap->map + offset_page / 8; org_tmp= tmp= uint2korr(data); tmp= (tmp & ~(7 << offset)) | (fill_pattern << offset); if (tmp == org_tmp) DBUG_RETURN(0); /* No changes */ /* Take care to not write bytes outside of bitmap. fill_pattern is 3 bits, so we need to write two bytes if bit position we write to is > (8-3) */ if (offset > 5) int2store(data, tmp); else data[0]= tmp; /* Reset full_head_size or full_tail_size if we are releasing data before it. Increase used_size if we are allocating data. */ used_offset= (uint) (data - bitmap->map); if (fill_pattern < 4) set_if_smaller(bitmap->full_head_size, used_offset); if (fill_pattern == 0 || (fill_pattern > 4 && fill_pattern < 7)) set_if_smaller(bitmap->full_tail_size, used_offset); if (fill_pattern != 0) { /* Calulcate which was the last changed byte */ used_offset+= offset > 5 ? 2 : 1; set_if_bigger(bitmap->used_size, used_offset); } _ma_check_bitmap(bitmap); bitmap->changed= 1; DBUG_EXECUTE("bitmap", _ma_print_bitmap_changes(bitmap);); if (fill_pattern != FULL_HEAD_PAGE && fill_pattern != FULL_TAIL_PAGE) set_if_smaller(info->s->state.first_bitmap_with_space, bitmap_page); /* Note that if the condition above is false (page is full), and all pages of this bitmap are now full, and that bitmap page was first_bitmap_with_space, we don't modify first_bitmap_with_space, indeed its value still tells us where to start our search for a bitmap with space (which is for sure after this full one). That does mean that first_bitmap_with_space is only a lower bound. */ DBUG_RETURN(0); }
O0
c
set_page_bits: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) jmp 0x60649 movq -0x20(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x20(%rbp), %rax movq -0x18(%rbp), %rcx xorl %edx, %edx divq 0x138(%rcx) movq -0x60(%rbp), %rax subq %rdx, %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movq -0x18(%rbp), %rcx cmpq 0x10(%rcx), %rax je 0x6069f movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x30(%rbp), %rdx callq 0x5fb50 movsbl %al, %eax cmpl $0x0, %eax je 0x6069f jmp 0x60696 movb $0x1, -0x1(%rbp) jmp 0x6082d movq -0x20(%rbp), %rax movq -0x18(%rbp), %rcx subq 0x10(%rcx), %rax subq $0x1, %rax movl %eax, -0x34(%rbp) imull $0x3, -0x34(%rbp), %eax movl %eax, -0x34(%rbp) movl -0x34(%rbp), %eax andl $0x7, %eax movl %eax, -0x38(%rbp) movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movl -0x34(%rbp), %ecx shrl $0x3, %ecx movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movzwl (%rax), %eax movl %eax, -0x3c(%rbp) movl %eax, -0x40(%rbp) movl -0x3c(%rbp), %eax movl -0x38(%rbp), %ecx movl $0x7, %edx shll %cl, %edx movl %edx, %ecx xorl $-0x1, %ecx andl %ecx, %eax movl -0x24(%rbp), %edx movl -0x38(%rbp), %ecx shll %cl, %edx movl %edx, %ecx orl %ecx, %eax movl %eax, -0x3c(%rbp) movl -0x3c(%rbp), %eax cmpl -0x40(%rbp), %eax jne 0x6071c jmp 0x60713 movb $0x0, -0x1(%rbp) jmp 0x6082d cmpl $0x5, -0x38(%rbp) jbe 0x6073b jmp 0x60724 movq -0x50(%rbp), %rax movq %rax, -0x58(%rbp) movl -0x3c(%rbp), %eax movw %ax, %cx movq -0x58(%rbp), %rax movw %cx, (%rax) jmp 0x60746 movl -0x3c(%rbp), %eax movb %al, %cl movq -0x50(%rbp), %rax movb %cl, (%rax) movq -0x50(%rbp), %rax movq -0x18(%rbp), %rcx movq 0x8(%rcx), %rcx subq %rcx, %rax movl %eax, -0x44(%rbp) cmpl $0x4, -0x24(%rbp) jae 0x6077a jmp 0x60760 movq -0x18(%rbp), %rax movl 0x28(%rax), %eax cmpl -0x44(%rbp), %eax jbe 0x60776 movl -0x44(%rbp), %ecx movq -0x18(%rbp), %rax movl %ecx, 0x28(%rax) jmp 0x60778 jmp 0x6077a cmpl $0x0, -0x24(%rbp) je 0x6078c cmpl $0x4, -0x24(%rbp) jbe 0x607a8 cmpl $0x7, -0x24(%rbp) jae 0x607a8 jmp 0x6078e movq -0x18(%rbp), %rax movl 0x2c(%rax), %eax cmpl -0x44(%rbp), %eax jbe 0x607a4 movl -0x44(%rbp), %ecx movq -0x18(%rbp), %rax movl %ecx, 0x2c(%rax) jmp 0x607a6 jmp 0x607a8 cmpl $0x0, -0x24(%rbp) je 0x607e1 movl -0x38(%rbp), %edx movl $0x1, %eax movl $0x2, %ecx cmpl $0x5, %edx cmoval %ecx, %eax addl -0x44(%rbp), %eax movl %eax, -0x44(%rbp) movq -0x18(%rbp), %rax movl 0x24(%rax), %eax cmpl -0x44(%rbp), %eax jae 0x607dd movl -0x44(%rbp), %ecx movq -0x18(%rbp), %rax movl %ecx, 0x24(%rax) jmp 0x607df jmp 0x607e1 jmp 0x607e3 jmp 0x607e5 movq -0x18(%rbp), %rax movb $0x1, 0x20(%rax) jmp 0x607ef cmpl $0x4, -0x24(%rbp) je 0x60827 cmpl $0x7, -0x24(%rbp) je 0x60827 jmp 0x607fd movq -0x10(%rbp), %rax movq (%rax), %rax movq 0xd0(%rax), %rax cmpq -0x30(%rbp), %rax jbe 0x60823 movq -0x30(%rbp), %rcx movq -0x10(%rbp), %rax movq (%rax), %rax movq %rcx, 0xd0(%rax) jmp 0x60825 jmp 0x60827 jmp 0x60829 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
set_page_bits: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], ecx jmp short $+2 loc_60649: mov rax, [rbp+var_20] mov [rbp+var_60], rax mov rax, [rbp+var_20] mov rcx, [rbp+var_18] xor edx, edx div qword ptr [rcx+138h] mov rax, [rbp+var_60] sub rax, rdx mov [rbp+var_30], rax mov rax, [rbp+var_30] mov rcx, [rbp+var_18] cmp rax, [rcx+10h] jz short loc_6069F mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_30] call _ma_change_bitmap_page movsx eax, al cmp eax, 0 jz short loc_6069F jmp short $+2 loc_60696: mov [rbp+var_1], 1 jmp loc_6082D loc_6069F: mov rax, [rbp+var_20] mov rcx, [rbp+var_18] sub rax, [rcx+10h] sub rax, 1 mov [rbp+var_34], eax imul eax, [rbp+var_34], 3 mov [rbp+var_34], eax mov eax, [rbp+var_34] and eax, 7 mov [rbp+var_38], eax mov rax, [rbp+var_18] mov rax, [rax+8] mov ecx, [rbp+var_34] shr ecx, 3 mov ecx, ecx add rax, rcx mov [rbp+var_50], rax mov rax, [rbp+var_50] movzx eax, word ptr [rax] mov [rbp+var_3C], eax mov [rbp+var_40], eax mov eax, [rbp+var_3C] mov ecx, [rbp+var_38] mov edx, 7 shl edx, cl mov ecx, edx xor ecx, 0FFFFFFFFh and eax, ecx mov edx, [rbp+var_24] mov ecx, [rbp+var_38] shl edx, cl mov ecx, edx or eax, ecx mov [rbp+var_3C], eax mov eax, [rbp+var_3C] cmp eax, [rbp+var_40] jnz short loc_6071C jmp short $+2 loc_60713: mov [rbp+var_1], 0 jmp loc_6082D loc_6071C: cmp [rbp+var_38], 5 jbe short loc_6073B jmp short $+2 loc_60724: mov rax, [rbp+var_50] mov [rbp+var_58], rax mov eax, [rbp+var_3C] mov cx, ax mov rax, [rbp+var_58] mov [rax], cx jmp short loc_60746 loc_6073B: mov eax, [rbp+var_3C] mov cl, al mov rax, [rbp+var_50] mov [rax], cl loc_60746: mov rax, [rbp+var_50] mov rcx, [rbp+var_18] mov rcx, [rcx+8] sub rax, rcx mov [rbp+var_44], eax cmp [rbp+var_24], 4 jnb short loc_6077A jmp short $+2 loc_60760: mov rax, [rbp+var_18] mov eax, [rax+28h] cmp eax, [rbp+var_44] jbe short loc_60776 mov ecx, [rbp+var_44] mov rax, [rbp+var_18] mov [rax+28h], ecx loc_60776: jmp short $+2 loc_60778: jmp short $+2 loc_6077A: cmp [rbp+var_24], 0 jz short loc_6078C cmp [rbp+var_24], 4 jbe short loc_607A8 cmp [rbp+var_24], 7 jnb short loc_607A8 loc_6078C: jmp short $+2 loc_6078E: mov rax, [rbp+var_18] mov eax, [rax+2Ch] cmp eax, [rbp+var_44] jbe short loc_607A4 mov ecx, [rbp+var_44] mov rax, [rbp+var_18] mov [rax+2Ch], ecx loc_607A4: jmp short $+2 loc_607A6: jmp short $+2 loc_607A8: cmp [rbp+var_24], 0 jz short loc_607E1 mov edx, [rbp+var_38] mov eax, 1 mov ecx, 2 cmp edx, 5 cmova eax, ecx add eax, [rbp+var_44] mov [rbp+var_44], eax mov rax, [rbp+var_18] mov eax, [rax+24h] cmp eax, [rbp+var_44] jnb short loc_607DD mov ecx, [rbp+var_44] mov rax, [rbp+var_18] mov [rax+24h], ecx loc_607DD: jmp short $+2 loc_607DF: jmp short $+2 loc_607E1: jmp short $+2 loc_607E3: jmp short $+2 loc_607E5: mov rax, [rbp+var_18] mov byte ptr [rax+20h], 1 jmp short $+2 loc_607EF: cmp [rbp+var_24], 4 jz short loc_60827 cmp [rbp+var_24], 7 jz short loc_60827 jmp short $+2 loc_607FD: mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+0D0h] cmp rax, [rbp+var_30] jbe short loc_60823 mov rcx, [rbp+var_30] mov rax, [rbp+var_10] mov rax, [rax] mov [rax+0D0h], rcx loc_60823: jmp short $+2 loc_60825: jmp short $+2 loc_60827: jmp short $+2 loc_60829: mov [rbp+var_1], 0 loc_6082D: mov al, [rbp+var_1] add rsp, 60h pop rbp retn
char set_page_bits(long long *a1, long long a2, unsigned long long a3, unsigned int a4) { int v4; // eax _BYTE *v6; // [rsp+10h] [rbp-50h] unsigned int v7; // [rsp+1Ch] [rbp-44h] unsigned int v8; // [rsp+1Ch] [rbp-44h] int v9; // [rsp+20h] [rbp-40h] int v10; // [rsp+24h] [rbp-3Ch] unsigned int v11; // [rsp+28h] [rbp-38h] unsigned int v12; // [rsp+2Ch] [rbp-34h] unsigned long long v13; // [rsp+30h] [rbp-30h] int v15; // [rsp+40h] [rbp-20h] v15 = a3; v13 = a3 - a3 % *(_QWORD *)(a2 + 312); if ( v13 != *(_QWORD *)(a2 + 16) && ma_change_bitmap_page(a1, a2, v13) ) return 1; v12 = 3 * (v15 - *(_DWORD *)(a2 + 16) - 1); v11 = v12 & 7; v6 = (_BYTE *)((v12 >> 3) + *(_QWORD *)(a2 + 8)); v9 = *(unsigned __int16 *)v6; v10 = (a4 << (v12 & 7)) | ~(7 << (v12 & 7)) & v9; if ( v10 == v9 ) return 0; if ( v11 <= 5 ) *v6 = v10; else *(_WORD *)v6 = v10; v7 = (_DWORD)v6 - *(_QWORD *)(a2 + 8); if ( a4 < 4 && *(_DWORD *)(a2 + 40) > v7 ) *(_DWORD *)(a2 + 40) = v7; if ( (!a4 || a4 > 4 && a4 < 7) && *(_DWORD *)(a2 + 44) > v7 ) *(_DWORD *)(a2 + 44) = v7; if ( a4 ) { v4 = 1; if ( v11 > 5 ) v4 = 2; v8 = v7 + v4; if ( *(_DWORD *)(a2 + 36) < v8 ) *(_DWORD *)(a2 + 36) = v8; } *(_BYTE *)(a2 + 32) = 1; if ( a4 != 4 && a4 != 7 && *(_QWORD *)(*a1 + 208) > v13 ) *(_QWORD *)(*a1 + 208) = v13; return 0; }
set_page_bits: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX JMP 0x00160649 LAB_00160649: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x18] XOR EDX,EDX DIV qword ptr [RCX + 0x138] MOV RAX,qword ptr [RBP + -0x60] SUB RAX,RDX MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RCX + 0x10] JZ 0x0016069f MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x30] CALL 0x0015fb50 MOVSX EAX,AL CMP EAX,0x0 JZ 0x0016069f JMP 0x00160696 LAB_00160696: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0016082d LAB_0016069f: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x18] SUB RAX,qword ptr [RCX + 0x10] SUB RAX,0x1 MOV dword ptr [RBP + -0x34],EAX IMUL EAX,dword ptr [RBP + -0x34],0x3 MOV dword ptr [RBP + -0x34],EAX MOV EAX,dword ptr [RBP + -0x34] AND EAX,0x7 MOV dword ptr [RBP + -0x38],EAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV ECX,dword ptr [RBP + -0x34] SHR ECX,0x3 MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x50] MOVZX EAX,word ptr [RAX] MOV dword ptr [RBP + -0x3c],EAX MOV dword ptr [RBP + -0x40],EAX MOV EAX,dword ptr [RBP + -0x3c] MOV ECX,dword ptr [RBP + -0x38] MOV EDX,0x7 SHL EDX,CL MOV ECX,EDX XOR ECX,0xffffffff AND EAX,ECX MOV EDX,dword ptr [RBP + -0x24] MOV ECX,dword ptr [RBP + -0x38] SHL EDX,CL MOV ECX,EDX OR EAX,ECX MOV dword ptr [RBP + -0x3c],EAX MOV EAX,dword ptr [RBP + -0x3c] CMP EAX,dword ptr [RBP + -0x40] JNZ 0x0016071c JMP 0x00160713 LAB_00160713: MOV byte ptr [RBP + -0x1],0x0 JMP 0x0016082d LAB_0016071c: CMP dword ptr [RBP + -0x38],0x5 JBE 0x0016073b JMP 0x00160724 LAB_00160724: MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x58],RAX MOV EAX,dword ptr [RBP + -0x3c] MOV CX,AX MOV RAX,qword ptr [RBP + -0x58] MOV word ptr [RAX],CX JMP 0x00160746 LAB_0016073b: MOV EAX,dword ptr [RBP + -0x3c] MOV CL,AL MOV RAX,qword ptr [RBP + -0x50] MOV byte ptr [RAX],CL LAB_00160746: MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX + 0x8] SUB RAX,RCX MOV dword ptr [RBP + -0x44],EAX CMP dword ptr [RBP + -0x24],0x4 JNC 0x0016077a JMP 0x00160760 LAB_00160760: MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x28] CMP EAX,dword ptr [RBP + -0x44] JBE 0x00160776 MOV ECX,dword ptr [RBP + -0x44] MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x28],ECX LAB_00160776: JMP 0x00160778 LAB_00160778: JMP 0x0016077a LAB_0016077a: CMP dword ptr [RBP + -0x24],0x0 JZ 0x0016078c CMP dword ptr [RBP + -0x24],0x4 JBE 0x001607a8 CMP dword ptr [RBP + -0x24],0x7 JNC 0x001607a8 LAB_0016078c: JMP 0x0016078e LAB_0016078e: MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x2c] CMP EAX,dword ptr [RBP + -0x44] JBE 0x001607a4 MOV ECX,dword ptr [RBP + -0x44] MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x2c],ECX LAB_001607a4: JMP 0x001607a6 LAB_001607a6: JMP 0x001607a8 LAB_001607a8: CMP dword ptr [RBP + -0x24],0x0 JZ 0x001607e1 MOV EDX,dword ptr [RBP + -0x38] MOV EAX,0x1 MOV ECX,0x2 CMP EDX,0x5 CMOVA EAX,ECX ADD EAX,dword ptr [RBP + -0x44] MOV dword ptr [RBP + -0x44],EAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x24] CMP EAX,dword ptr [RBP + -0x44] JNC 0x001607dd MOV ECX,dword ptr [RBP + -0x44] MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x24],ECX LAB_001607dd: JMP 0x001607df LAB_001607df: JMP 0x001607e1 LAB_001607e1: JMP 0x001607e3 LAB_001607e3: JMP 0x001607e5 LAB_001607e5: MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x20],0x1 JMP 0x001607ef LAB_001607ef: CMP dword ptr [RBP + -0x24],0x4 JZ 0x00160827 CMP dword ptr [RBP + -0x24],0x7 JZ 0x00160827 JMP 0x001607fd LAB_001607fd: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0xd0] CMP RAX,qword ptr [RBP + -0x30] JBE 0x00160823 MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0xd0],RCX LAB_00160823: JMP 0x00160825 LAB_00160825: JMP 0x00160827 LAB_00160827: JMP 0x00160829 LAB_00160829: MOV byte ptr [RBP + -0x1],0x0 LAB_0016082d: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x60 POP RBP RET
int1 set_page_bits(long *param_1,long param_2,ulong param_3,uint param_4) { char cVar1; uint uVar2; uint uVar3; int iVar4; ulong uVar5; ushort *puVar6; int1 local_9; uVar5 = param_3 - param_3 % *(ulong *)(param_2 + 0x138); if ((uVar5 == *(ulong *)(param_2 + 0x10)) || (cVar1 = _ma_change_bitmap_page(param_1,param_2,uVar5), cVar1 == '\0')) { uVar2 = (((int)param_3 - (int)*(int8 *)(param_2 + 0x10)) + -1) * 3; uVar3 = uVar2 & 7; puVar6 = (ushort *)(*(long *)(param_2 + 8) + (ulong)(uVar2 >> 3)); uVar2 = (uint)*puVar6 & (7 << (sbyte)uVar3 ^ 0xffffffffU) | param_4 << (sbyte)uVar3; if (uVar2 == *puVar6) { local_9 = 0; } else { if (uVar3 < 6) { *(char *)puVar6 = (char)uVar2; } else { *puVar6 = (ushort)uVar2; } uVar2 = (int)puVar6 - (int)*(int8 *)(param_2 + 8); if ((param_4 < 4) && (uVar2 < *(uint *)(param_2 + 0x28))) { *(uint *)(param_2 + 0x28) = uVar2; } if (((param_4 == 0) || ((4 < param_4 && (param_4 < 7)))) && (uVar2 < *(uint *)(param_2 + 0x2c))) { *(uint *)(param_2 + 0x2c) = uVar2; } if (param_4 != 0) { iVar4 = 1; if (5 < uVar3) { iVar4 = 2; } if (*(uint *)(param_2 + 0x24) < iVar4 + uVar2) { *(uint *)(param_2 + 0x24) = iVar4 + uVar2; } } *(int1 *)(param_2 + 0x20) = 1; if (((param_4 != 4) && (param_4 != 7)) && (uVar5 < *(ulong *)(*param_1 + 0xd0))) { *(ulong *)(*param_1 + 0xd0) = uVar5; } local_9 = 0; } } else { local_9 = 1; } return local_9; }
25,549
JS_NumberIsInteger
bluesky950520[P]quickjs/quickjs.c
static int JS_NumberIsInteger(JSContext *ctx, JSValue val) { double d; if (!JS_IsNumber(val)) return FALSE; if (unlikely(JS_ToFloat64(ctx, &d, val))) return -1; return isfinite(d) && floor(d) == d; }
O0
c
JS_NumberIsInteger: subq $0x38, %rsp movq %rsi, 0x20(%rsp) movq %rdx, 0x28(%rsp) movq %rdi, 0x18(%rsp) movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x506d0 cmpl $0x0, %eax jne 0x36824 movl $0x0, 0x34(%rsp) jmp 0x368bd movq 0x18(%rsp), %rdi movq 0x20(%rsp), %rdx movq 0x28(%rsp), %rcx leaq 0x10(%rsp), %rsi callq 0x38580 cmpl $0x0, %eax setne %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x3685e movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF jmp 0x368bd movsd 0x10(%rsp), %xmm0 movq %xmm0, %rax movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF andq %rcx, %rax movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000 subq %rcx, %rax setl %cl xorl %eax, %eax testb $0x1, %cl movb %al, 0xf(%rsp) jne 0x36893 jmp 0x368b0 movsd 0x10(%rsp), %xmm0 callq 0xe850 ucomisd 0x10(%rsp), %xmm0 sete %al setnp %cl andb %cl, %al movb %al, 0xf(%rsp) movb 0xf(%rsp), %al andb $0x1, %al movzbl %al, %eax movl %eax, 0x34(%rsp) movl 0x34(%rsp), %eax addq $0x38, %rsp retq nopw %cs:(%rax,%rax)
JS_NumberIsInteger: sub rsp, 38h mov [rsp+38h+var_18], rsi mov [rsp+38h+var_10], rdx mov [rsp+38h+var_20], rdi mov rdi, [rsp+38h+var_18] mov rsi, [rsp+38h+var_10] call JS_IsNumber cmp eax, 0 jnz short loc_36824 mov [rsp+38h+var_4], 0 jmp loc_368BD loc_36824: mov rdi, [rsp+38h+var_20] mov rdx, [rsp+38h+var_18] mov rcx, [rsp+38h+var_10] lea rsi, [rsp+38h+var_28] call JS_ToFloat64 cmp eax, 0 setnz al xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_3685E mov [rsp+38h+var_4], 0FFFFFFFFh jmp short loc_368BD loc_3685E: movsd xmm0, [rsp+38h+var_28] movq rax, xmm0 mov rcx, 7FFFFFFFFFFFFFFFh and rax, rcx mov rcx, 7FF0000000000000h sub rax, rcx setl cl xor eax, eax test cl, 1 mov [rsp+38h+var_29], al jnz short loc_36893 jmp short loc_368B0 loc_36893: movsd xmm0, [rsp+38h+var_28] call _floor ucomisd xmm0, [rsp+38h+var_28] setz al setnp cl and al, cl mov [rsp+38h+var_29], al loc_368B0: mov al, [rsp+38h+var_29] and al, 1 movzx eax, al mov [rsp+38h+var_4], eax loc_368BD: mov eax, [rsp+38h+var_4] add rsp, 38h retn
long long JS_NumberIsInteger(long long a1, long long a2, long long a3) { double v3; // xmm0_8 bool v5; // [rsp+Fh] [rbp-29h] double v6; // [rsp+10h] [rbp-28h] BYREF long long v7; // [rsp+18h] [rbp-20h] long long v8; // [rsp+20h] [rbp-18h] long long v9; // [rsp+28h] [rbp-10h] v8 = a2; v9 = a3; v7 = a1; if ( (unsigned int)JS_IsNumber(a2, a3) ) { if ( (unsigned int)JS_ToFloat64(v7, &v6, v8, v9) ) { return (unsigned int)-1; } else { v5 = 0; if ( (*(_QWORD *)&v6 & 0x7FFFFFFFFFFFFFFFuLL) < 0x7FF0000000000000LL ) { v3 = floor(v6); return v3 == v6; } return v5; } } else { return 0; } }
JS_NumberIsInteger: SUB RSP,0x38 MOV qword ptr [RSP + 0x20],RSI MOV qword ptr [RSP + 0x28],RDX MOV qword ptr [RSP + 0x18],RDI MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x28] CALL 0x001506d0 CMP EAX,0x0 JNZ 0x00136824 MOV dword ptr [RSP + 0x34],0x0 JMP 0x001368bd LAB_00136824: MOV RDI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x28] LEA RSI,[RSP + 0x10] CALL 0x00138580 CMP EAX,0x0 SETNZ AL XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x0013685e MOV dword ptr [RSP + 0x34],0xffffffff JMP 0x001368bd LAB_0013685e: MOVSD XMM0,qword ptr [RSP + 0x10] MOVQ RAX,XMM0 MOV RCX,0x7fffffffffffffff AND RAX,RCX MOV RCX,0x7ff0000000000000 SUB RAX,RCX SETL CL XOR EAX,EAX TEST CL,0x1 MOV byte ptr [RSP + 0xf],AL JNZ 0x00136893 JMP 0x001368b0 LAB_00136893: MOVSD XMM0,qword ptr [RSP + 0x10] CALL 0x0010e850 UCOMISD XMM0,qword ptr [RSP + 0x10] SETZ AL SETNP CL AND AL,CL MOV byte ptr [RSP + 0xf],AL LAB_001368b0: MOV AL,byte ptr [RSP + 0xf] AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RSP + 0x34],EAX LAB_001368bd: MOV EAX,dword ptr [RSP + 0x34] ADD RSP,0x38 RET
uint JS_NumberIsInteger(int8 param_1,int8 param_2,int8 param_3) { int iVar1; double dVar2; bool local_29; double local_28; int8 local_20; int8 local_18; int8 local_10; uint local_4; local_20 = param_1; local_18 = param_2; local_10 = param_3; iVar1 = JS_IsNumber(param_2,param_3); if (iVar1 == 0) { local_4 = 0; } else { iVar1 = JS_ToFloat64(local_20,&local_28,local_18,local_10); if (iVar1 == 0) { local_29 = false; if ((ulong)ABS(local_28) < 0x7ff0000000000000) { dVar2 = floor(local_28); local_29 = dVar2 == local_28; } local_4 = (uint)local_29; } else { local_4 = 0xffffffff; } } return local_4; }
25,550
JS_NumberIsInteger
bluesky950520[P]quickjs/quickjs.c
static int JS_NumberIsInteger(JSContext *ctx, JSValue val) { double d; if (!JS_IsNumber(val)) return FALSE; if (unlikely(JS_ToFloat64(ctx, &d, val))) return -1; return isfinite(d) && floor(d) == d; }
O3
c
JS_NumberIsInteger: pushq %rbx subq $0x10, %rsp movq %rdx, %rcx movq %rsi, %rdx xorl %ebx, %ebx cmpl $0x7, %ecx je 0xfc25 testl %ecx, %ecx jne 0xfc81 cmpl $0x2, %ecx ja 0xfc30 cvtsi2sd %edx, %xmm0 jmp 0xfc50 cmpl $0x7, %ecx jne 0xfc3c movq %rdx, %xmm0 jmp 0xfc50 leaq 0x8(%rsp), %rsi callq 0x3f579 testl %eax, %eax jne 0xfc89 movq 0x8(%rsp), %xmm0 movq %xmm0, %rax btrq $0x3f, %rax movabsq $0x7fefffffffffffff, %rcx # imm = 0x7FEFFFFFFFFFFFFF cmpq %rcx, %rax jg 0xfc81 movq %xmm0, (%rsp) callq 0xe860 cmpeqsd (%rsp), %xmm0 movq %xmm0, %rbx andl $0x1, %ebx movl %ebx, %eax addq $0x10, %rsp popq %rbx retq pushq $-0x1 popq %rbx jmp 0xfc81
JS_NumberIsInteger: push rbx sub rsp, 10h mov rcx, rdx mov rdx, rsi xor ebx, ebx cmp ecx, 7 jz short loc_FC25 test ecx, ecx jnz short loc_FC81 loc_FC25: cmp ecx, 2 ja short loc_FC30 cvtsi2sd xmm0, edx jmp short loc_FC50 loc_FC30: cmp ecx, 7 jnz short loc_FC3C movq xmm0, rdx jmp short loc_FC50 loc_FC3C: lea rsi, [rsp+18h+var_10] call __JS_ToFloat64Free test eax, eax jnz short loc_FC89 movq xmm0, [rsp+18h+var_10] loc_FC50: movq rax, xmm0 btr rax, 3Fh ; '?' mov rcx, 7FEFFFFFFFFFFFFFh cmp rax, rcx jg short loc_FC81 movq [rsp+18h+var_18], xmm0 call _floor cmpeqsd xmm0, [rsp+18h+var_18] movq rbx, xmm0 and ebx, 1 loc_FC81: mov eax, ebx add rsp, 10h pop rbx retn loc_FC89: push 0FFFFFFFFFFFFFFFFh pop rbx jmp short loc_FC81
long long JS_NumberIsInteger(__m128d a1, long long a2, unsigned long long a3, unsigned int a4) { unsigned int v4; // ebx __m128d v5; // rt1 double v7; // [rsp+0h] [rbp-18h] v4 = 0; if ( a4 == 7 || !a4 ) { if ( a4 > 2 ) a1 = (__m128d)a3; else a1.m128d_f64[0] = (double)(int)a3; if ( (*(_QWORD *)&a1.m128d_f64[0] & 0x7FFFFFFFFFFFFFFFuLL) <= 0x7FEFFFFFFFFFFFFFLL ) { v7 = a1.m128d_f64[0]; a1.m128d_f64[0] = floor(a1.m128d_f64[0]); v5.m128d_f64[0] = v7; return *(_OWORD *)&_mm_cmpeq_sd(a1, v5) & 1; } } return v4; }
JS_NumberIsInteger: PUSH RBX SUB RSP,0x10 MOV RCX,RDX MOV RDX,RSI XOR EBX,EBX CMP ECX,0x7 JZ 0x0010fc25 TEST ECX,ECX JNZ 0x0010fc81 LAB_0010fc25: CMP ECX,0x2 JA 0x0010fc30 CVTSI2SD XMM0,EDX JMP 0x0010fc50 LAB_0010fc30: CMP ECX,0x7 JNZ 0x0010fc3c MOVQ XMM0,RDX JMP 0x0010fc50 LAB_0010fc3c: LEA RSI,[RSP + 0x8] CALL 0x0013f579 TEST EAX,EAX JNZ 0x0010fc89 MOVQ XMM0,qword ptr [RSP + 0x8] LAB_0010fc50: MOVQ RAX,XMM0 BTR RAX,0x3f MOV RCX,0x7fefffffffffffff CMP RAX,RCX JG 0x0010fc81 MOVQ qword ptr [RSP],XMM0 CALL 0x0010e860 CMPEQSD XMM0,qword ptr [RSP] MOVQ RBX,XMM0 AND EBX,0x1 LAB_0010fc81: MOV EAX,EBX ADD RSP,0x10 POP RBX RET LAB_0010fc89: PUSH -0x1 POP RBX JMP 0x0010fc81
uint JS_NumberIsInteger(int8 param_1,double param_2,uint param_3) { int iVar1; uint uVar2; double dVar3; double local_10; uVar2 = 0; if ((param_3 == 7) || (param_3 == 0)) { if (param_3 < 3) { param_2 = (double)SUB84(param_2,0); } else if ((param_3 != 7) && (iVar1 = __JS_ToFloat64Free(param_1,&local_10), param_2 = local_10, iVar1 != 0)) { return 0xffffffff; } if ((ulong)ABS(param_2) < 0x7ff0000000000000) { dVar3 = floor(param_2); uVar2 = -(uint)(dVar3 == param_2) & 1; } } return uVar2; }
25,551
mi_uint7korr
eloqsql/include/byte_order_generic_x86_64.h
static inline ulonglong mi_uint7korr(const void *p) { ulonglong a= *(uint32 *) p; ulonglong b= *(uint16 *) (4 + (char *) p); ulonglong c= *(6 + (uchar *) p); ulonglong v= (a | (b << 32) | (c << 48)) << 8; asm ("bswapq %0" : "=r" (v) : "0" (v)); return v; }
O0
c
mi_uint7korr: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movl (%rax), %eax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax movzwl 0x4(%rax), %eax movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rax movzbl 0x6(%rax), %eax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq -0x18(%rbp), %rcx shlq $0x20, %rcx orq %rcx, %rax movq -0x20(%rbp), %rcx shlq $0x30, %rcx orq %rcx, %rax shlq $0x8, %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax bswapq %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax popq %rbp retq nopl (%rax)
mi_uint7korr: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov eax, [rax] mov [rbp+var_10], rax mov rax, [rbp+var_8] movzx eax, word ptr [rax+4] mov [rbp+var_18], rax mov rax, [rbp+var_8] movzx eax, byte ptr [rax+6] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rcx, [rbp+var_18] shl rcx, 20h or rax, rcx mov rcx, [rbp+var_20] shl rcx, 30h or rax, rcx shl rax, 8 mov [rbp+var_28], rax mov rax, [rbp+var_28] bswap rax mov [rbp+var_28], rax mov rax, [rbp+var_28] pop rbp retn
unsigned long long mi_uint7korr(unsigned int *a1) { return _byteswap_uint64((((unsigned long long)*((unsigned __int8 *)a1 + 6) << 48) | ((unsigned long long)*((unsigned __int16 *)a1 + 2) << 32) | *a1) << 8); }
mi_uint7korr: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,word ptr [RAX + 0x4] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x6] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x18] SHL RCX,0x20 OR RAX,RCX MOV RCX,qword ptr [RBP + -0x20] SHL RCX,0x30 OR RAX,RCX SHL RAX,0x8 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] BSWAP RAX MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] POP RBP RET
ulong mi_uint7korr(uint7 *param_1) { ulong uVar1; uVar1 = (ulong)*param_1 << 8; return uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 | (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 | (uVar1 & 0xff00) << 0x28; }
25,552
ma_trid_from_key
eloqsql/storage/maria/ma_search.c
TrID _ma_trid_from_key(const MARIA_KEY *key) { if (!(key->flag & (SEARCH_PAGE_KEY_HAS_TRANSID | SEARCH_USER_KEY_HAS_TRANSID))) return 0; return transid_get_packed(key->keyinfo->share, key->data + key->data_length + key->keyinfo->share->rec_reflength); }
O3
c
ma_trid_from_key: pushq %rbp movq %rsp, %rbp testb $0x18, 0x1a(%rdi) je 0x3dc11 movq 0x8(%rdi), %rax movq (%rax), %rax movl 0x10(%rdi), %ecx addq (%rdi), %rcx movl 0x740(%rax), %esi addq %rcx, %rsi movq %rax, %rdi popq %rbp jmp 0x41abd xorl %eax, %eax popq %rbp retq
_ma_trid_from_key: push rbp mov rbp, rsp test byte ptr [rdi+1Ah], 18h jz short loc_3DC11 mov rax, [rdi+8] mov rax, [rax] mov ecx, [rdi+10h] add rcx, [rdi] mov esi, [rax+740h] add rsi, rcx mov rdi, rax pop rbp jmp transid_get_packed loc_3DC11: xor eax, eax pop rbp retn
long long ma_trid_from_key(long long a1) { if ( (*(_BYTE *)(a1 + 26) & 0x18) != 0 ) return transid_get_packed( **(_QWORD **)(a1 + 8), *(_QWORD *)a1 + *(unsigned int *)(a1 + 16) + *(unsigned int *)(**(_QWORD **)(a1 + 8) + 1856LL)); else return 0LL; }
_ma_trid_from_key: PUSH RBP MOV RBP,RSP TEST byte ptr [RDI + 0x1a],0x18 JZ 0x0013dc11 MOV RAX,qword ptr [RDI + 0x8] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RDI + 0x10] ADD RCX,qword ptr [RDI] MOV ESI,dword ptr [RAX + 0x740] ADD RSI,RCX MOV RDI,RAX POP RBP JMP 0x00141abd LAB_0013dc11: XOR EAX,EAX POP RBP RET
int8 _ma_trid_from_key(long *param_1) { int8 uVar1; if ((*(byte *)((long)param_1 + 0x1a) & 0x18) != 0) { uVar1 = transid_get_packed(*(long *)param_1[1], (ulong)*(uint *)(*(long *)param_1[1] + 0x740) + (ulong)*(uint *)(param_1 + 2) + *param_1); return uVar1; } return 0; }
25,553
js_string_substr
bluesky950520[P]quickjs/quickjs.c
static JSValue js_string_substr(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue str, ret; int a, len, n; JSString *p; str = JS_ToStringCheckObject(ctx, this_val); if (JS_IsException(str)) return str; p = JS_VALUE_GET_STRING(str); len = p->len; if (JS_ToInt32Clamp(ctx, &a, argv[0], 0, len, len)) { JS_FreeValue(ctx, str); return JS_EXCEPTION; } n = len - a; if (!JS_IsUndefined(argv[1])) { if (JS_ToInt32Clamp(ctx, &n, argv[1], 0, len - a, 0)) { JS_FreeValue(ctx, str); return JS_EXCEPTION; } } ret = js_sub_string(ctx, p, a, a + n); JS_FreeValue(ctx, str); return ret; }
O1
c
js_string_substr: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %r8, %rbp movq %rdi, %r14 callq 0x419eb movq %rdx, %rbx movq %rax, 0x20(%rsp) cmpl $0x6, %ebx jne 0x7b3e2 movq %rax, %r15 jmp 0x7b48c movq 0x20(%rsp), %r13 movl $0x7fffffff, %r12d # imm = 0x7FFFFFFF andl 0x4(%r13), %r12d movq (%rbp), %rdx movq 0x8(%rbp), %rcx movl %r12d, (%rsp) leaq 0x1c(%rsp), %rsi xorl %r15d, %r15d movq %r14, %rdi xorl %r8d, %r8d movl %r12d, %r9d callq 0x26b42 testl %eax, %eax je 0x7b41f movl $0x6, %r12d jmp 0x7b478 movl 0x1c(%rsp), %edx subl %edx, %r12d movl %r12d, 0x14(%rsp) movq 0x18(%rbp), %rcx cmpl $0x3, %ecx je 0x7b461 movl %edx, 0x18(%rsp) movq 0x10(%rbp), %rdx movl $0x0, (%rsp) leaq 0x14(%rsp), %rsi xorl %r15d, %r15d movq %r14, %rdi xorl %r8d, %r8d movl %r12d, %r9d callq 0x26b42 movl 0x18(%rsp), %edx testl %eax, %eax jne 0x7b417 movl 0x14(%rsp), %ecx addl %edx, %ecx movq %r14, %rdi movq %r13, %rsi callq 0x33bbb movq %rax, %r15 movq %rdx, %r12 movq 0x20(%rsp), %rsi movq 0x18(%r14), %rdi movq %rbx, %rdx callq 0x1ccb2 movq %r12, %rbx movq %r15, %rax movq %rbx, %rdx addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_string_substr: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbp, r8 mov r14, rdi call JS_ToStringCheckObject mov rbx, rdx mov [rsp+58h+var_38], rax cmp ebx, 6 jnz short loc_7B3E2 mov r15, rax jmp loc_7B48C loc_7B3E2: mov r13, [rsp+58h+var_38] mov r12d, 7FFFFFFFh and r12d, [r13+4] mov rdx, [rbp+0] mov rcx, [rbp+8] mov [rsp+58h+var_58], r12d lea rsi, [rsp+58h+var_3C] xor r15d, r15d mov rdi, r14 xor r8d, r8d mov r9d, r12d call JS_ToInt32Clamp test eax, eax jz short loc_7B41F loc_7B417: mov r12d, 6 jmp short loc_7B478 loc_7B41F: mov edx, [rsp+58h+var_3C] sub r12d, edx mov [rsp+58h+var_44], r12d mov rcx, [rbp+18h] cmp ecx, 3 jz short loc_7B461 mov [rsp+58h+var_40], edx mov rdx, [rbp+10h] mov [rsp+58h+var_58], 0 lea rsi, [rsp+58h+var_44] xor r15d, r15d mov rdi, r14 xor r8d, r8d mov r9d, r12d call JS_ToInt32Clamp mov edx, [rsp+58h+var_40] test eax, eax jnz short loc_7B417 loc_7B461: mov ecx, [rsp+58h+var_44] add ecx, edx mov rdi, r14 mov rsi, r13 call js_sub_string mov r15, rax mov r12, rdx loc_7B478: mov rsi, [rsp+58h+var_38] mov rdi, [r14+18h] mov rdx, rbx call JS_FreeValueRT mov rbx, r12 loc_7B48C: mov rax, r15 mov rdx, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_DWORD * js_string_substr( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { _DWORD *v15; // rax long long v16; // rdx long long v17; // rbx long long v18; // r15 _DWORD *v19; // r13 int v20; // r12d int v21; // edx int v22; // r12d long long v23; // rcx int v24; // eax int v26; // [rsp+14h] [rbp-44h] BYREF int v27; // [rsp+18h] [rbp-40h] int v28; // [rsp+1Ch] [rbp-3Ch] BYREF _DWORD *v29; // [rsp+20h] [rbp-38h] v15 = (_DWORD *)JS_ToStringCheckObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v17 = v16; v29 = v15; if ( (_DWORD)v16 == 6 ) return v15; v19 = v29; v20 = v29[1] & 0x7FFFFFFF; v18 = 0LL; if ( !(unsigned int)JS_ToInt32Clamp(a1, &v28, *(_DWORD **)a5, *(_QWORD *)(a5 + 8), 0, v20, v20) ) { v21 = v28; v22 = v20 - v28; v26 = v22; v23 = *(_QWORD *)(a5 + 24); if ( (_DWORD)v23 == 3 || (v27 = v28, v18 = 0LL, v24 = JS_ToInt32Clamp(a1, &v26, *(_DWORD **)(a5 + 16), v23, 0, v22, 0), v21 = v27, !v24) ) { v18 = js_sub_string(a1, (long long)v19, v21, v21 + v26); } } JS_FreeValueRT(*(_QWORD *)(a1 + 24), v29, v17); return (_DWORD *)v18; }
js_string_substr: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBP,R8 MOV R14,RDI CALL 0x001419eb MOV RBX,RDX MOV qword ptr [RSP + 0x20],RAX CMP EBX,0x6 JNZ 0x0017b3e2 MOV R15,RAX JMP 0x0017b48c LAB_0017b3e2: MOV R13,qword ptr [RSP + 0x20] MOV R12D,0x7fffffff AND R12D,dword ptr [R13 + 0x4] MOV RDX,qword ptr [RBP] MOV RCX,qword ptr [RBP + 0x8] MOV dword ptr [RSP],R12D LEA RSI,[RSP + 0x1c] XOR R15D,R15D MOV RDI,R14 XOR R8D,R8D MOV R9D,R12D CALL 0x00126b42 TEST EAX,EAX JZ 0x0017b41f LAB_0017b417: MOV R12D,0x6 JMP 0x0017b478 LAB_0017b41f: MOV EDX,dword ptr [RSP + 0x1c] SUB R12D,EDX MOV dword ptr [RSP + 0x14],R12D MOV RCX,qword ptr [RBP + 0x18] CMP ECX,0x3 JZ 0x0017b461 MOV dword ptr [RSP + 0x18],EDX MOV RDX,qword ptr [RBP + 0x10] MOV dword ptr [RSP],0x0 LEA RSI,[RSP + 0x14] XOR R15D,R15D MOV RDI,R14 XOR R8D,R8D MOV R9D,R12D CALL 0x00126b42 MOV EDX,dword ptr [RSP + 0x18] TEST EAX,EAX JNZ 0x0017b417 LAB_0017b461: MOV ECX,dword ptr [RSP + 0x14] ADD ECX,EDX MOV RDI,R14 MOV RSI,R13 CALL 0x00133bbb MOV R15,RAX MOV R12,RDX LAB_0017b478: MOV RSI,qword ptr [RSP + 0x20] MOV RDI,qword ptr [R14 + 0x18] MOV RDX,RBX CALL 0x0011ccb2 MOV RBX,R12 LAB_0017b48c: MOV RAX,R15 MOV RDX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_string_substr(long param_1) { int iVar1; long lVar2; int8 *in_R8; uint uVar3; int1 auVar4 [16]; int1 auVar5 [16]; int local_44; int local_40; int local_3c; long local_38; auVar4 = JS_ToStringCheckObject(); lVar2 = auVar4._0_8_; if (auVar4._8_4_ == 6) { return auVar4; } uVar3 = *(uint *)(lVar2 + 4) & 0x7fffffff; local_38 = lVar2; iVar1 = JS_ToInt32Clamp(param_1,&local_3c,*in_R8,in_R8[1],0,uVar3,uVar3); if (iVar1 == 0) { local_44 = uVar3 - local_3c; if ((int)in_R8[3] != 3) { local_40 = local_3c; iVar1 = JS_ToInt32Clamp(param_1,&local_44,in_R8[2],in_R8[3],0,local_44,0); local_3c = local_40; if (iVar1 != 0) goto LAB_0017b417; } auVar5 = js_sub_string(param_1,lVar2,local_3c,local_44 + local_3c); } else { LAB_0017b417: auVar5 = ZEXT816(6) << 0x40; } JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_38,auVar4._8_8_); return auVar5; }
25,554
js_string_substr
bluesky950520[P]quickjs/quickjs.c
static JSValue js_string_substr(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue str, ret; int a, len, n; JSString *p; str = JS_ToStringCheckObject(ctx, this_val); if (JS_IsException(str)) return str; p = JS_VALUE_GET_STRING(str); len = p->len; if (JS_ToInt32Clamp(ctx, &a, argv[0], 0, len, len)) { JS_FreeValue(ctx, str); return JS_EXCEPTION; } n = len - a; if (!JS_IsUndefined(argv[1])) { if (JS_ToInt32Clamp(ctx, &n, argv[1], 0, len - a, 0)) { JS_FreeValue(ctx, str); return JS_EXCEPTION; } } ret = js_sub_string(ctx, p, a, a + n); JS_FreeValue(ctx, str); return ret; }
O2
c
js_string_substr: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r8, %r13 movq %rdi, %r15 callq 0x39714 movq %rax, %rbx movq %rdx, %r14 cmpl $0x6, %r14d je 0x67885 movl $0x7fffffff, %ebp # imm = 0x7FFFFFFF andl 0x4(%rbx), %ebp movq (%r13), %rdx movq 0x8(%r13), %rcx movl %ebp, (%rsp) leaq 0x14(%rsp), %rsi xorl %r12d, %r12d movq %r15, %rdi xorl %r8d, %r8d movl %ebp, %r9d callq 0x20859 testl %eax, %eax je 0x6781b pushq $0x6 popq %r13 jmp 0x67871 movl 0x14(%rsp), %edx subl %edx, %ebp movl %ebp, 0xc(%rsp) movq 0x18(%r13), %rcx cmpl $0x3, %ecx je 0x6785c movl %edx, 0x10(%rsp) movq 0x10(%r13), %rdx andl $0x0, (%rsp) leaq 0xc(%rsp), %rsi xorl %r12d, %r12d movq %r15, %rdi xorl %r8d, %r8d movl %ebp, %r9d callq 0x20859 testl %eax, %eax jne 0x67815 movl 0xc(%rsp), %ebp movl 0x10(%rsp), %edx addl %edx, %ebp movq %r15, %rdi movq %rbx, %rsi movl %ebp, %ecx callq 0x2d6a1 movq %rax, %r12 movq %rdx, %r13 movq %r15, %rdi movq %rbx, %rsi movq %r14, %rdx callq 0x174a2 movq %r12, %rbx movq %r13, %r14 movq %rbx, %rax movq %r14, %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_string_substr: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r13, r8 mov r15, rdi call JS_ToStringCheckObject mov rbx, rax mov r14, rdx cmp r14d, 6 jz loc_67885 mov ebp, 7FFFFFFFh and ebp, [rbx+4] mov rdx, [r13+0] mov rcx, [r13+8] mov [rsp+48h+var_48], ebp lea rsi, [rsp+48h+var_34] xor r12d, r12d mov rdi, r15 xor r8d, r8d mov r9d, ebp call JS_ToInt32Clamp test eax, eax jz short loc_6781B loc_67815: push 6 pop r13 jmp short loc_67871 loc_6781B: mov edx, [rsp+48h+var_34] sub ebp, edx mov [rsp+48h+var_3C], ebp mov rcx, [r13+18h] cmp ecx, 3 jz short loc_6785C mov [rsp+48h+var_38], edx mov rdx, [r13+10h] and [rsp+48h+var_48], 0 lea rsi, [rsp+48h+var_3C] xor r12d, r12d mov rdi, r15 xor r8d, r8d mov r9d, ebp call JS_ToInt32Clamp test eax, eax jnz short loc_67815 mov ebp, [rsp+48h+var_3C] mov edx, [rsp+48h+var_38] loc_6785C: add ebp, edx mov rdi, r15 mov rsi, rbx mov ecx, ebp call js_sub_string mov r12, rax mov r13, rdx loc_67871: mov rdi, r15 mov rsi, rbx mov rdx, r14 call JS_FreeValue mov rbx, r12 mov r14, r13 loc_67885: mov rax, rbx mov rdx, r14 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_DWORD * js_string_substr( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v15; // rax _DWORD *v16; // rbx long long v17; // rdx long long v18; // r14 int v19; // ebp long long v20; // r12 long long v21; // rdx int v22; // ebp long long v23; // rcx int v25; // [rsp+Ch] [rbp-3Ch] BYREF unsigned int v26; // [rsp+10h] [rbp-38h] unsigned int v27[13]; // [rsp+14h] [rbp-34h] BYREF v15 = JS_ToStringCheckObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v16 = (_DWORD *)v15; v18 = v17; if ( (_DWORD)v17 != 6 ) { v19 = *(_DWORD *)(v15 + 4) & 0x7FFFFFFF; v20 = 0LL; if ( !(unsigned int)JS_ToInt32Clamp(a1, (int *)v27, *(_DWORD **)a5, *(_QWORD *)(a5 + 8), 0, v19, v19) ) { v21 = v27[0]; v22 = v19 - v27[0]; v25 = v22; v23 = *(_QWORD *)(a5 + 24); if ( (_DWORD)v23 != 3 ) { v26 = v27[0]; v20 = 0LL; if ( (unsigned int)JS_ToInt32Clamp(a1, &v25, *(_DWORD **)(a5 + 16), v23, 0, v22, 0) ) goto LABEL_8; v22 = v25; v21 = v26; } v20 = js_sub_string(a1, v16, v21, (int)v21 + v22); } LABEL_8: JS_FreeValue(a1, (long long)v16, v18); return (_DWORD *)v20; } return v16; }
js_string_substr: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R13,R8 MOV R15,RDI CALL 0x00139714 MOV RBX,RAX MOV R14,RDX CMP R14D,0x6 JZ 0x00167885 MOV EBP,0x7fffffff AND EBP,dword ptr [RBX + 0x4] MOV RDX,qword ptr [R13] MOV RCX,qword ptr [R13 + 0x8] MOV dword ptr [RSP],EBP LEA RSI,[RSP + 0x14] XOR R12D,R12D MOV RDI,R15 XOR R8D,R8D MOV R9D,EBP CALL 0x00120859 TEST EAX,EAX JZ 0x0016781b LAB_00167815: PUSH 0x6 POP R13 JMP 0x00167871 LAB_0016781b: MOV EDX,dword ptr [RSP + 0x14] SUB EBP,EDX MOV dword ptr [RSP + 0xc],EBP MOV RCX,qword ptr [R13 + 0x18] CMP ECX,0x3 JZ 0x0016785c MOV dword ptr [RSP + 0x10],EDX MOV RDX,qword ptr [R13 + 0x10] AND dword ptr [RSP],0x0 LEA RSI,[RSP + 0xc] XOR R12D,R12D MOV RDI,R15 XOR R8D,R8D MOV R9D,EBP CALL 0x00120859 TEST EAX,EAX JNZ 0x00167815 MOV EBP,dword ptr [RSP + 0xc] MOV EDX,dword ptr [RSP + 0x10] LAB_0016785c: ADD EBP,EDX MOV RDI,R15 MOV RSI,RBX MOV ECX,EBP CALL 0x0012d6a1 MOV R12,RAX MOV R13,RDX LAB_00167871: MOV RDI,R15 MOV RSI,RBX MOV RDX,R14 CALL 0x001174a2 MOV RBX,R12 MOV R14,R13 LAB_00167885: MOV RAX,RBX MOV RDX,R14 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_string_substr(int8 param_1) { int iVar1; long lVar2; uint uVar3; int8 *in_R8; int1 auVar4 [16]; int1 auVar5 [16]; int local_3c; int local_38; int local_34; auVar4 = JS_ToStringCheckObject(); lVar2 = auVar4._0_8_; if (auVar4._8_4_ == 6) { return auVar4; } uVar3 = *(uint *)(lVar2 + 4) & 0x7fffffff; iVar1 = JS_ToInt32Clamp(param_1,&local_34,*in_R8,in_R8[1],0,uVar3,uVar3); if (iVar1 == 0) { local_3c = uVar3 - local_34; if ((int)in_R8[3] != 3) { local_38 = local_34; iVar1 = JS_ToInt32Clamp(param_1,&local_3c,in_R8[2],in_R8[3],0,local_3c,0); local_34 = local_38; if (iVar1 != 0) goto LAB_00167815; } auVar5 = js_sub_string(param_1,lVar2,local_34,local_3c + local_34); } else { LAB_00167815: auVar5 = ZEXT816(6) << 0x40; } JS_FreeValue(param_1,lVar2,auVar4._8_8_); return auVar5; }
25,555
js_string_substr
bluesky950520[P]quickjs/quickjs.c
static JSValue js_string_substr(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue str, ret; int a, len, n; JSString *p; str = JS_ToStringCheckObject(ctx, this_val); if (JS_IsException(str)) return str; p = JS_VALUE_GET_STRING(str); len = p->len; if (JS_ToInt32Clamp(ctx, &a, argv[0], 0, len, len)) { JS_FreeValue(ctx, str); return JS_EXCEPTION; } n = len - a; if (!JS_IsUndefined(argv[1])) { if (JS_ToInt32Clamp(ctx, &n, argv[1], 0, len - a, 0)) { JS_FreeValue(ctx, str); return JS_EXCEPTION; } } ret = js_sub_string(ctx, p, a, a + n); JS_FreeValue(ctx, str); return ret; }
O3
c
js_string_substr: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r8, %r12 movq %rdi, %r15 callq 0x4350b movq %rax, %r14 movq %rdx, %rbx cmpl $0x6, %ebx jne 0x7df01 movq %r14, %r13 movq %rbx, %r12 jmp 0x7dfd9 movl $0x7fffffff, %ebp # imm = 0x7FFFFFFF andl 0x4(%r14), %ebp movq (%r12), %rdx movq 0x8(%r12), %rcx movl %ebp, (%rsp) leaq 0x14(%rsp), %rsi movq %r15, %rdi xorl %r8d, %r8d movl %ebp, %r9d callq 0x271f4 testl %eax, %eax je 0x7df56 cmpl $-0x9, %ebx jb 0x7dfd0 movq 0x18(%r15), %rdi movl (%r14), %eax leal -0x1(%rax), %ecx movl %ecx, (%r14) movl $0x6, %r12d xorl %r13d, %r13d cmpl $0x2, %eax jl 0x7dfc3 jmp 0x7dfd9 movl 0x14(%rsp), %r13d subl %r13d, %ebp movl %ebp, 0x10(%rsp) movq 0x18(%r12), %rcx cmpl $0x3, %ecx je 0x7df93 movq 0x10(%r12), %rdx movl $0x0, (%rsp) leaq 0x10(%rsp), %rsi movq %r15, %rdi xorl %r8d, %r8d movl %ebp, %r9d callq 0x271f4 testl %eax, %eax jne 0x7df2d movl 0x10(%rsp), %ebp addl %r13d, %ebp movq %r15, %rdi movq %r14, %rsi movl %r13d, %edx movl %ebp, %ecx callq 0x349c6 movq %rax, %r13 movq %rdx, %r12 cmpl $-0x9, %ebx jb 0x7dfd9 movq 0x18(%r15), %rdi movl (%r14), %eax leal -0x1(%rax), %ecx movl %ecx, (%r14) cmpl $0x1, %eax jg 0x7dfd9 movq %r14, %rsi movq %rbx, %rdx callq 0x20d90 jmp 0x7dfd9 movl $0x6, %r12d xorl %r13d, %r13d movq %r13, %rax movq %r12, %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_string_substr: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r12, r8 mov r15, rdi call JS_ToStringCheckObject mov r14, rax mov rbx, rdx cmp ebx, 6 jnz short loc_7DF01 mov r13, r14 mov r12, rbx jmp loc_7DFD9 loc_7DF01: mov ebp, 7FFFFFFFh and ebp, [r14+4] mov rdx, [r12] mov rcx, [r12+8] mov [rsp+48h+var_48], ebp lea rsi, [rsp+48h+var_34] mov rdi, r15 xor r8d, r8d mov r9d, ebp call JS_ToInt32Clamp test eax, eax jz short loc_7DF56 loc_7DF2D: cmp ebx, 0FFFFFFF7h jb loc_7DFD0 mov rdi, [r15+18h] mov eax, [r14] lea ecx, [rax-1] mov [r14], ecx mov r12d, 6 xor r13d, r13d cmp eax, 2 jl short loc_7DFC3 jmp loc_7DFD9 loc_7DF56: mov r13d, [rsp+48h+var_34] sub ebp, r13d mov [rsp+48h+var_38], ebp mov rcx, [r12+18h] cmp ecx, 3 jz short loc_7DF93 mov rdx, [r12+10h] mov [rsp+48h+var_48], 0 lea rsi, [rsp+48h+var_38] mov rdi, r15 xor r8d, r8d mov r9d, ebp call JS_ToInt32Clamp test eax, eax jnz short loc_7DF2D mov ebp, [rsp+48h+var_38] loc_7DF93: add ebp, r13d mov rdi, r15 mov rsi, r14 mov edx, r13d mov ecx, ebp call js_sub_string mov r13, rax mov r12, rdx cmp ebx, 0FFFFFFF7h jb short loc_7DFD9 mov rdi, [r15+18h] mov eax, [r14] lea ecx, [rax-1] mov [r14], ecx cmp eax, 1 jg short loc_7DFD9 loc_7DFC3: mov rsi, r14 mov rdx, rbx call js_free_value_rt jmp short loc_7DFD9 loc_7DFD0: mov r12d, 6 xor r13d, r13d loc_7DFD9: mov rax, r13 mov rdx, r12 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long js_string_substr( long long a1, _DWORD *a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { unsigned long long v15; // rax _QWORD *v16; // r14 long long v17; // rdx long long v18; // rbx long long v19; // r13 int v20; // ebp long long v21; // r8 long long v22; // r9 long long v23; // rdi int v24; // eax long long v25; // rcx int v26; // r13d int v27; // ebp long long v28; // rcx int v29; // eax int v31; // [rsp+10h] [rbp-38h] BYREF int v32[13]; // [rsp+14h] [rbp-34h] BYREF v15 = JS_ToStringCheckObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v16 = (_QWORD *)v15; v18 = v17; if ( (_DWORD)v17 == 6 ) return v15; v20 = *(_DWORD *)(v15 + 4) & 0x7FFFFFFF; if ( (unsigned int)JS_ToInt32Clamp(a1, v32, *(_DWORD **)a5, *(_QWORD *)(a5 + 8), 0, v20, v20) ) goto LABEL_4; v26 = v32[0]; v27 = v20 - v32[0]; v31 = v27; v28 = *(_QWORD *)(a5 + 24); if ( (_DWORD)v28 != 3 ) { if ( (unsigned int)JS_ToInt32Clamp(a1, &v31, *(_DWORD **)(a5 + 16), v28, 0, v27, 0) ) { LABEL_4: if ( (unsigned int)v18 < 0xFFFFFFF7 ) return 0LL; v23 = *(_QWORD *)(a1 + 24); v24 = *(_DWORD *)v16; v25 = (unsigned int)(*(_DWORD *)v16 - 1); *(_DWORD *)v16 = v25; v19 = 0LL; if ( v24 >= 2 ) return v19; goto LABEL_12; } v27 = v31; } v19 = js_sub_string(a1, (long long)v16, v26, v26 + v27); if ( (unsigned int)v18 >= 0xFFFFFFF7 ) { v23 = *(_QWORD *)(a1 + 24); v29 = *(_DWORD *)v16; v25 = (unsigned int)(*(_DWORD *)v16 - 1); *(_DWORD *)v16 = v25; if ( v29 <= 1 ) LABEL_12: js_free_value_rt(v23, v16, v18, v25, v21, v22); } return v19; }
js_string_substr: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R12,R8 MOV R15,RDI CALL 0x0014350b MOV R14,RAX MOV RBX,RDX CMP EBX,0x6 JNZ 0x0017df01 MOV R13,R14 MOV R12,RBX JMP 0x0017dfd9 LAB_0017df01: MOV EBP,0x7fffffff AND EBP,dword ptr [R14 + 0x4] MOV RDX,qword ptr [R12] MOV RCX,qword ptr [R12 + 0x8] MOV dword ptr [RSP],EBP LEA RSI,[RSP + 0x14] MOV RDI,R15 XOR R8D,R8D MOV R9D,EBP CALL 0x001271f4 TEST EAX,EAX JZ 0x0017df56 LAB_0017df2d: CMP EBX,-0x9 JC 0x0017dfd0 MOV RDI,qword ptr [R15 + 0x18] MOV EAX,dword ptr [R14] LEA ECX,[RAX + -0x1] MOV dword ptr [R14],ECX MOV R12D,0x6 XOR R13D,R13D CMP EAX,0x2 JL 0x0017dfc3 JMP 0x0017dfd9 LAB_0017df56: MOV R13D,dword ptr [RSP + 0x14] SUB EBP,R13D MOV dword ptr [RSP + 0x10],EBP MOV RCX,qword ptr [R12 + 0x18] CMP ECX,0x3 JZ 0x0017df93 MOV RDX,qword ptr [R12 + 0x10] MOV dword ptr [RSP],0x0 LEA RSI,[RSP + 0x10] MOV RDI,R15 XOR R8D,R8D MOV R9D,EBP CALL 0x001271f4 TEST EAX,EAX JNZ 0x0017df2d MOV EBP,dword ptr [RSP + 0x10] LAB_0017df93: ADD EBP,R13D MOV RDI,R15 MOV RSI,R14 MOV EDX,R13D MOV ECX,EBP CALL 0x001349c6 MOV R13,RAX MOV R12,RDX CMP EBX,-0x9 JC 0x0017dfd9 MOV RDI,qword ptr [R15 + 0x18] MOV EAX,dword ptr [R14] LEA ECX,[RAX + -0x1] MOV dword ptr [R14],ECX CMP EAX,0x1 JG 0x0017dfd9 LAB_0017dfc3: MOV RSI,R14 MOV RDX,RBX CALL 0x00120d90 JMP 0x0017dfd9 LAB_0017dfd0: MOV R12D,0x6 XOR R13D,R13D LAB_0017dfd9: MOV RAX,R13 MOV RDX,R12 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_string_substr(long param_1) { int8 uVar1; int1 auVar2 [16]; int iVar3; int *piVar4; uint uVar5; uint uVar6; int8 *in_R8; int1 auVar7 [16]; int1 auVar8 [16]; int local_38; int local_34; auVar7 = JS_ToStringCheckObject(); piVar4 = auVar7._0_8_; uVar5 = auVar7._8_4_; if (uVar5 == 6) { return auVar7; } uVar6 = piVar4[1] & 0x7fffffff; iVar3 = JS_ToInt32Clamp(param_1,&local_34,*in_R8,in_R8[1],0,uVar6,uVar6); if (iVar3 == 0) { local_38 = uVar6 - local_34; if (((int)in_R8[3] == 3) || (iVar3 = JS_ToInt32Clamp(param_1,&local_38,in_R8[2],in_R8[3],0,local_38,0), iVar3 == 0)) { auVar8 = js_sub_string(param_1,piVar4,local_34,local_38 + local_34); if (uVar5 < 0xfffffff7) { return auVar8; } uVar1 = *(int8 *)(param_1 + 0x18); iVar3 = *piVar4; *piVar4 = iVar3 + -1; auVar2 = auVar8; goto joined_r0x0017dfc1; } } if (uVar5 < 0xfffffff7) { return ZEXT816(6) << 0x40; } uVar1 = *(int8 *)(param_1 + 0x18); iVar3 = *piVar4; *piVar4 = iVar3 + -1; auVar2 = ZEXT816(6) << 0x40; auVar8 = ZEXT816(6) << 0x40; joined_r0x0017dfc1: if (iVar3 < 2) { js_free_value_rt(uVar1,piVar4,auVar7._8_8_); auVar8 = auVar2; } return auVar8; }
25,556
signed char const& gguf_kv::get_val<signed char>(unsigned long) const
monkey531[P]llama/ggml/src/gguf.cpp
const T & get_val(const size_t i = 0) const { GGML_ASSERT(type_to_gguf_type<T>::value == type); if constexpr (std::is_same<T, std::string>::value) { GGML_ASSERT(data_string.size() >= i+1); return data_string[i]; } const size_t type_size = gguf_type_size(type); GGML_ASSERT(data.size() % type_size == 0); GGML_ASSERT(data.size() >= (i+1)*type_size); return reinterpret_cast<const T *>(data.data())[i]; }
O0
cpp
signed char const& gguf_kv::get_val<signed char>(unsigned long) const: subq $0x28, %rsp movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movq 0x20(%rsp), %rcx movq %rcx, 0x8(%rsp) movl $0x7, %eax cmpl 0x24(%rcx), %eax je 0x94e03 leaq 0x2ec28(%rip), %rdi # 0xc3a11 movl $0xb7, %esi leaq 0x1f80c(%rip), %rdx # 0xb4601 leaq 0x2f3ee(%rip), %rcx # 0xc41ea movb $0x0, %al callq 0x46770 movq 0x8(%rsp), %rax movl 0x24(%rax), %edi callq 0x471f0 movq 0x8(%rsp), %rdi movq %rax, 0x10(%rsp) addq $0x28, %rdi callq 0x47380 xorl %ecx, %ecx movl %ecx, %edx divq 0x10(%rsp) cmpq $0x0, %rdx je 0x94e53 leaq 0x2ebd8(%rip), %rdi # 0xc3a11 movl $0xbd, %esi leaq 0x1f7bc(%rip), %rdx # 0xb4601 leaq 0x2f102(%rip), %rcx # 0xc3f4e movb $0x0, %al callq 0x46770 movq 0x8(%rsp), %rdi addq $0x28, %rdi callq 0x47380 movq 0x18(%rsp), %rcx addq $0x1, %rcx imulq 0x10(%rsp), %rcx cmpq %rcx, %rax jae 0x94e96 leaq 0x2eb95(%rip), %rdi # 0xc3a11 movl $0xbe, %esi leaq 0x1f779(%rip), %rdx # 0xb4601 leaq 0x2f37f(%rip), %rcx # 0xc420e movb $0x0, %al callq 0x46770 movq 0x8(%rsp), %rdi addq $0x28, %rdi callq 0x42990 addq 0x18(%rsp), %rax addq $0x28, %rsp retq nop
_ZNK7gguf_kv7get_valIbEERKT_m: sub rsp, 28h mov [rsp+28h+var_8], rdi mov [rsp+28h+var_10], rsi mov rcx, [rsp+28h+var_8] mov [rsp+28h+var_20], rcx mov eax, 7 cmp eax, [rcx+24h] jz short loc_94E03 lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... mov esi, 0B7h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTypeToGgufType; "type_to_gguf_type<T>::value == type" mov al, 0 call _ggml_abort loc_94E03: mov rax, [rsp+28h+var_20] mov edi, [rax+24h] call __Z14gguf_type_size9gguf_type; gguf_type_size(gguf_type) mov rdi, [rsp+28h+var_20] mov [rsp+28h+var_18], rax add rdi, 28h ; '(' call __ZNKSt6vectorIaSaIaEE4sizeEv; std::vector<signed char>::size(void) xor ecx, ecx mov edx, ecx div [rsp+28h+var_18] cmp rdx, 0 jz short loc_94E53 lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... mov esi, 0BDh lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCtxKvKeyIdData+10h; "data.size() % type_size == 0" mov al, 0 call _ggml_abort loc_94E53: mov rdi, [rsp+28h+var_20] add rdi, 28h ; '(' call __ZNKSt6vectorIaSaIaEE4sizeEv; std::vector<signed char>::size(void) mov rcx, [rsp+28h+var_10] add rcx, 1 imul rcx, [rsp+28h+var_18] cmp rax, rcx jnb short loc_94E96 lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... mov esi, 0BEh lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aDataSizeI1Type; "data.size() >= (i+1)*type_size" mov al, 0 call _ggml_abort loc_94E96: mov rdi, [rsp+28h+var_20] add rdi, 28h ; '(' call __ZNKSt6vectorIaSaIaEE4dataEv; std::vector<signed char>::data(void) add rax, [rsp+28h+var_10] add rsp, 28h retn
long long gguf_kv::get_val<bool>(long long a1, long long a2) { unsigned long long v3; // [rsp+10h] [rbp-18h] if ( *(_DWORD *)(a1 + 36) != 7 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/gguf.cpp", 183, (long long)"GGML_ASSERT(%s) failed", "type_to_gguf_type<T>::value == type"); v3 = gguf_type_size(*(_DWORD *)(a1 + 36)); if ( std::vector<signed char>::size(a1 + 40) % v3 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/gguf.cpp", 189, (long long)"GGML_ASSERT(%s) failed", "data.size() % type_size == 0"); if ( std::vector<signed char>::size(a1 + 40) < v3 * (a2 + 1) ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/gguf.cpp", 190, (long long)"GGML_ASSERT(%s) failed", "data.size() >= (i+1)*type_size"); return a2 + std::vector<signed char>::data(a1 + 40); }
get_val<bool>: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RSI MOV RCX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x8],RCX MOV EAX,0x7 CMP EAX,dword ptr [RCX + 0x24] JZ 0x00194e03 LEA RDI,[0x1c3a11] MOV ESI,0xb7 LEA RDX,[0x1b4601] LEA RCX,[0x1c41ea] MOV AL,0x0 CALL 0x00146770 LAB_00194e03: MOV RAX,qword ptr [RSP + 0x8] MOV EDI,dword ptr [RAX + 0x24] CALL 0x001471f0 MOV RDI,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x10],RAX ADD RDI,0x28 CALL 0x00147380 XOR ECX,ECX MOV EDX,ECX DIV qword ptr [RSP + 0x10] CMP RDX,0x0 JZ 0x00194e53 LEA RDI,[0x1c3a11] MOV ESI,0xbd LEA RDX,[0x1b4601] LEA RCX,[0x1c3f4e] MOV AL,0x0 CALL 0x00146770 LAB_00194e53: MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x28 CALL 0x00147380 MOV RCX,qword ptr [RSP + 0x18] ADD RCX,0x1 IMUL RCX,qword ptr [RSP + 0x10] CMP RAX,RCX JNC 0x00194e96 LEA RDI,[0x1c3a11] MOV ESI,0xbe LEA RDX,[0x1b4601] LEA RCX,[0x1c420e] MOV AL,0x0 CALL 0x00146770 LAB_00194e96: MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x28 CALL 0x00142990 ADD RAX,qword ptr [RSP + 0x18] ADD RSP,0x28 RET
/* bool const& gguf_kv::get_val<bool>(unsigned long) const */ bool * __thiscall gguf_kv::get_val<bool>(gguf_kv *this,ulong param_1) { ulong uVar1; ulong uVar2; long lVar3; if (*(int *)(this + 0x24) != 7) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/gguf.cpp",0xb7, "GGML_ASSERT(%s) failed"); } uVar1 = gguf_type_size(*(int4 *)(this + 0x24)); uVar2 = std::vector<signed_char,std::allocator<signed_char>>::size ((vector<signed_char,std::allocator<signed_char>> *)(this + 0x28)); if (uVar2 % uVar1 != 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/gguf.cpp",0xbd, "GGML_ASSERT(%s) failed","data.size() % type_size == 0"); } uVar2 = std::vector<signed_char,std::allocator<signed_char>>::size ((vector<signed_char,std::allocator<signed_char>> *)(this + 0x28)); if (uVar2 < (param_1 + 1) * uVar1) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/gguf.cpp",0xbe, "GGML_ASSERT(%s) failed","data.size() >= (i+1)*type_size"); } lVar3 = std::vector<signed_char,std::allocator<signed_char>>::data ((vector<signed_char,std::allocator<signed_char>> *)(this + 0x28)); return (bool *)(lVar3 + param_1); }
25,557
signed char const& gguf_kv::get_val<signed char>(unsigned long) const
monkey531[P]llama/ggml/src/gguf.cpp
const T & get_val(const size_t i = 0) const { GGML_ASSERT(type_to_gguf_type<T>::value == type); if constexpr (std::is_same<T, std::string>::value) { GGML_ASSERT(data_string.size() >= i+1); return data_string[i]; } const size_t type_size = gguf_type_size(type); GGML_ASSERT(data.size() % type_size == 0); GGML_ASSERT(data.size() >= (i+1)*type_size); return reinterpret_cast<const T *>(data.data())[i]; }
O1
cpp
signed char const& gguf_kv::get_val<signed char>(unsigned long) const: pushq %rax cmpl $0x8, 0x24(%rdi) jne 0x40b4e movq 0x40(%rdi), %rax movq 0x48(%rdi), %rcx subq %rax, %rcx sarq $0x5, %rcx leaq 0x1(%rsi), %rdx cmpq %rdx, %rcx jb 0x40b6a shlq $0x5, %rsi addq %rsi, %rax popq %rcx retq leaq 0x191c0(%rip), %rdi # 0x59d15 leaq 0x9afd(%rip), %rdx # 0x4a659 leaq 0x199b5(%rip), %rcx # 0x5a518 movl $0xb7, %esi jmp 0x40b84 leaq 0x191a4(%rip), %rdi # 0x59d15 leaq 0x9ae1(%rip), %rdx # 0x4a659 leaq 0x199dc(%rip), %rcx # 0x5a55b movl $0xb9, %esi xorl %eax, %eax callq 0x17c70 nop
_ZNK7gguf_kv7get_valINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERKT_m: push rax cmp dword ptr [rdi+24h], 8 jnz short loc_40B4E mov rax, [rdi+40h] mov rcx, [rdi+48h] sub rcx, rax sar rcx, 5 lea rdx, [rsi+1] cmp rcx, rdx jb short loc_40B6A shl rsi, 5 add rax, rsi pop rcx retn loc_40B4E: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTypeToGgufType; "type_to_gguf_type<T>::value == type" mov esi, 0B7h jmp short loc_40B84 loc_40B6A: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aDataStringSize; "data_string.size() >= i+1" mov esi, 0B9h loc_40B84: xor eax, eax call _ggml_abort
long long gguf_kv::get_val<std::string>(long long a1, long long a2, long long a3, long long a4, int a5, int a6) { long long v6; // rax const char *v8; // rcx int v9; // esi if ( *(_DWORD *)(a1 + 36) != 8 ) { v8 = "type_to_gguf_type<T>::value == type"; v9 = 183; goto LABEL_6; } v6 = *(_QWORD *)(a1 + 64); if ( (*(_QWORD *)(a1 + 72) - v6) >> 5 < (unsigned long long)(a2 + 1) ) { v8 = "data_string.size() >= i+1"; v9 = 185; LABEL_6: ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/gguf.cpp", v9, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v8, a5, a6); } return 32 * a2 + v6; }
get_val<std::__cxx11::string>: PUSH RAX CMP dword ptr [RDI + 0x24],0x8 JNZ 0x00140b4e MOV RAX,qword ptr [RDI + 0x40] MOV RCX,qword ptr [RDI + 0x48] SUB RCX,RAX SAR RCX,0x5 LEA RDX,[RSI + 0x1] CMP RCX,RDX JC 0x00140b6a SHL RSI,0x5 ADD RAX,RSI POP RCX RET LAB_00140b4e: LEA RDI,[0x159d15] LEA RDX,[0x14a659] LEA RCX,[0x15a518] MOV ESI,0xb7 JMP 0x00140b84 LAB_00140b6a: LEA RDI,[0x159d15] LEA RDX,[0x14a659] LEA RCX,[0x15a55b] MOV ESI,0xb9 LAB_00140b84: XOR EAX,EAX CALL 0x00117c70
/* std::__cxx11::string const& gguf_kv::get_val<std::__cxx11::string >(unsigned long) const */ string * __thiscall gguf_kv::get_val<std::__cxx11::string>(gguf_kv *this,ulong param_1) { char *pcVar1; int8 uVar2; if (*(int *)(this + 0x24) == 8) { if (param_1 + 1 <= (ulong)(*(long *)(this + 0x48) - *(long *)(this + 0x40) >> 5)) { return (string *)(*(long *)(this + 0x40) + param_1 * 0x20); } pcVar1 = "data_string.size() >= i+1"; uVar2 = 0xb9; } else { pcVar1 = "type_to_gguf_type<T>::value == type"; uVar2 = 0xb7; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/gguf.cpp",uVar2, "GGML_ASSERT(%s) failed",pcVar1); }
25,558
signed char const& gguf_kv::get_val<signed char>(unsigned long) const
monkey531[P]llama/ggml/src/gguf.cpp
const T & get_val(const size_t i = 0) const { GGML_ASSERT(type_to_gguf_type<T>::value == type); if constexpr (std::is_same<T, std::string>::value) { GGML_ASSERT(data_string.size() >= i+1); return data_string[i]; } const size_t type_size = gguf_type_size(type); GGML_ASSERT(data.size() % type_size == 0); GGML_ASSERT(data.size() >= (i+1)*type_size); return reinterpret_cast<const T *>(data.data())[i]; }
O2
cpp
signed char const& gguf_kv::get_val<signed char>(unsigned long) const: pushq %r14 pushq %rbx pushq %rax cmpl $0x5, 0x24(%rdi) jne 0x41d84 movq %rsi, %rbx movq %rdi, %r14 pushq $0x5 popq %rdi callq 0x1eb80 movq %rax, %rcx movq 0x28(%r14), %rdi movq 0x30(%r14), %rsi subq %rdi, %rsi movq %rsi, %rax xorl %edx, %edx divq %rcx testq %rdx, %rdx jne 0x41da0 leaq 0x1(%rbx), %rax imulq %rax, %rcx cmpq %rcx, %rsi jb 0x41dbc leaq (%rdi,%rbx,4), %rax addq $0x8, %rsp popq %rbx popq %r14 retq leaq 0x18a7a(%rip), %rdi # 0x5a805 leaq 0x983b(%rip), %rdx # 0x4b5cd leaq 0x1926f(%rip), %rcx # 0x5b008 movl $0xb7, %esi jmp 0x41dd6 leaq 0x18a5e(%rip), %rdi # 0x5a805 leaq 0x981f(%rip), %rdx # 0x4b5cd leaq 0x18f8d(%rip), %rcx # 0x5ad42 movl $0xbd, %esi jmp 0x41dd6 leaq 0x18a42(%rip), %rdi # 0x5a805 leaq 0x9803(%rip), %rdx # 0x4b5cd leaq 0x1925b(%rip), %rcx # 0x5b02c movl $0xbe, %esi xorl %eax, %eax callq 0x1e760 nop
_ZNK7gguf_kv7get_valIiEERKT_m: push r14 push rbx push rax cmp dword ptr [rdi+24h], 5 jnz short loc_41D84 mov rbx, rsi mov r14, rdi push 5 pop rdi call __Z14gguf_type_size9gguf_type; gguf_type_size(gguf_type) mov rcx, rax mov rdi, [r14+28h] mov rsi, [r14+30h] sub rsi, rdi mov rax, rsi xor edx, edx div rcx test rdx, rdx jnz short loc_41DA0 lea rax, [rbx+1] imul rcx, rax cmp rsi, rcx jb short loc_41DBC lea rax, [rdi+rbx*4] add rsp, 8 pop rbx pop r14 retn loc_41D84: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTypeToGgufType; "type_to_gguf_type<T>::value == type" mov esi, 0B7h jmp short loc_41DD6 loc_41DA0: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCtxKvKeyIdData+10h; "data.size() % type_size == 0" mov esi, 0BDh jmp short loc_41DD6 loc_41DBC: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aDataSizeI1Type; "data.size() >= (i+1)*type_size" mov esi, 0BEh loc_41DD6: xor eax, eax call _ggml_abort
long long gguf_kv::get_val<int>( long long a1, long long a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, long long a12, long long a13, long long a14) { char v14; // al unsigned long long v16; // rcx long long v17; // rdi char *v19; // rcx int v20; // esi char v21; // [rsp-8h] [rbp-18h] v21 = v14; if ( *(_DWORD *)(a1 + 36) != 5 ) { v19 = "type_to_gguf_type<T>::value == type"; v20 = 183; goto LABEL_8; } v16 = gguf_type_size(5LL, a2, a3); v17 = *(_QWORD *)(a1 + 40); if ( (*(_QWORD *)(a1 + 48) - v17) % v16 ) { v19 = "data.size() % type_size == 0"; v20 = 189; goto LABEL_8; } if ( *(_QWORD *)(a1 + 48) - v17 < (a2 + 1) * v16 ) { v19 = "data.size() >= (i+1)*type_size"; v20 = 190; LABEL_8: ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/gguf.cpp", v20, (long long)"GGML_ASSERT(%s) failed", (long long)v19, a13, a14, a4, a5, a6, a7, a8, a9, a10, a11, v21); } return v17 + 4 * a2; }
get_val<int>: PUSH R14 PUSH RBX PUSH RAX CMP dword ptr [RDI + 0x24],0x5 JNZ 0x00141d84 MOV RBX,RSI MOV R14,RDI PUSH 0x5 POP RDI CALL 0x0011eb80 MOV RCX,RAX MOV RDI,qword ptr [R14 + 0x28] MOV RSI,qword ptr [R14 + 0x30] SUB RSI,RDI MOV RAX,RSI XOR EDX,EDX DIV RCX TEST RDX,RDX JNZ 0x00141da0 LEA RAX,[RBX + 0x1] IMUL RCX,RAX CMP RSI,RCX JC 0x00141dbc LEA RAX,[RDI + RBX*0x4] ADD RSP,0x8 POP RBX POP R14 RET LAB_00141d84: LEA RDI,[0x15a805] LEA RDX,[0x14b5cd] LEA RCX,[0x15b008] MOV ESI,0xb7 JMP 0x00141dd6 LAB_00141da0: LEA RDI,[0x15a805] LEA RDX,[0x14b5cd] LEA RCX,[0x15ad42] MOV ESI,0xbd JMP 0x00141dd6 LAB_00141dbc: LEA RDI,[0x15a805] LEA RDX,[0x14b5cd] LEA RCX,[0x15b02c] MOV ESI,0xbe LAB_00141dd6: XOR EAX,EAX CALL 0x0011e760
/* int const& gguf_kv::get_val<int>(unsigned long) const */ int * __thiscall gguf_kv::get_val<int>(gguf_kv *this,ulong param_1) { ulong uVar1; char *pcVar2; ulong uVar3; int8 uVar4; if (*(int *)(this + 0x24) == 5) { uVar1 = gguf_type_size(5); uVar3 = *(long *)(this + 0x30) - *(long *)(this + 0x28); if (uVar3 % uVar1 == 0) { if (uVar1 * (param_1 + 1) <= uVar3) { return (int *)(*(long *)(this + 0x28) + param_1 * 4); } pcVar2 = "data.size() >= (i+1)*type_size"; uVar4 = 0xbe; } else { pcVar2 = "data.size() % type_size == 0"; uVar4 = 0xbd; } } else { pcVar2 = "type_to_gguf_type<T>::value == type"; uVar4 = 0xb7; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/gguf.cpp",uVar4, "GGML_ASSERT(%s) failed",pcVar2); }
25,559
signed char const& gguf_kv::get_val<signed char>(unsigned long) const
monkey531[P]llama/ggml/src/gguf.cpp
const T & get_val(const size_t i = 0) const { GGML_ASSERT(type_to_gguf_type<T>::value == type); if constexpr (std::is_same<T, std::string>::value) { GGML_ASSERT(data_string.size() >= i+1); return data_string[i]; } const size_t type_size = gguf_type_size(type); GGML_ASSERT(data.size() % type_size == 0); GGML_ASSERT(data.size() >= (i+1)*type_size); return reinterpret_cast<const T *>(data.data())[i]; }
O3
cpp
signed char const& gguf_kv::get_val<signed char>(unsigned long) const: pushq %rax cmpl $0xa, 0x24(%rdi) jne 0x4077d movq 0x6ac1c(%rip), %rcx # 0xab330 testq %rcx, %rcx je 0x40749 leaq 0x6ac08(%rip), %rax # 0xab328 xorl %edx, %edx cmpl $0xa, 0x20(%rcx) setl %dl cmovgeq %rcx, %rax movq 0x10(%rcx,%rdx,8), %rcx testq %rcx, %rcx jne 0x40720 leaq 0x6abea(%rip), %rcx # 0xab328 cmpq %rcx, %rax je 0x40749 cmpl $0xa, 0x20(%rax) jle 0x40777 xorl %r8d, %r8d movq 0x28(%rdi), %r9 movq 0x30(%rdi), %rcx subq %r9, %rcx movq %rcx, %rax xorl %edx, %edx divq %r8 testq %rdx, %rdx jne 0x40799 leaq 0x1(%rsi), %rax imulq %rax, %r8 cmpq %r8, %rcx jb 0x407b5 leaq (%r9,%rsi,8), %rax popq %rcx retq movq 0x28(%rax), %r8 jmp 0x4074c leaq 0x19551(%rip), %rdi # 0x59cd5 leaq 0x9ed2(%rip), %rdx # 0x4a65d leaq 0x19d46(%rip), %rcx # 0x5a4d8 movl $0xb7, %esi jmp 0x407cf leaq 0x19535(%rip), %rdi # 0x59cd5 leaq 0x9eb6(%rip), %rdx # 0x4a65d leaq 0x19a64(%rip), %rcx # 0x5a212 movl $0xbd, %esi jmp 0x407cf leaq 0x19519(%rip), %rdi # 0x59cd5 leaq 0x9e9a(%rip), %rdx # 0x4a65d leaq 0x19d32(%rip), %rcx # 0x5a4fc movl $0xbe, %esi xorl %eax, %eax callq 0x17c60
_ZNK7gguf_kv7get_valImEERKT_m: push rax cmp dword ptr [rdi+24h], 0Ah jnz short loc_4077D mov rcx, cs:qword_AB330 test rcx, rcx jz short loc_40749 lea rax, unk_AB328 loc_40720: xor edx, edx cmp dword ptr [rcx+20h], 0Ah setl dl cmovge rax, rcx mov rcx, [rcx+rdx*8+10h] test rcx, rcx jnz short loc_40720 lea rcx, unk_AB328 cmp rax, rcx jz short loc_40749 cmp dword ptr [rax+20h], 0Ah jle short loc_40777 loc_40749: xor r8d, r8d loc_4074C: mov r9, [rdi+28h] mov rcx, [rdi+30h] sub rcx, r9 mov rax, rcx xor edx, edx div r8 test rdx, rdx jnz short loc_40799 lea rax, [rsi+1] imul r8, rax cmp rcx, r8 jb short loc_407B5 lea rax, [r9+rsi*8] pop rcx retn loc_40777: mov r8, [rax+28h] jmp short loc_4074C loc_4077D: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTypeToGgufType; "type_to_gguf_type<T>::value == type" mov esi, 0B7h jmp short loc_407CF loc_40799: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCtxKvKeyIdData+10h; "data.size() % type_size == 0" mov esi, 0BDh jmp short loc_407CF loc_407B5: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aDataSizeI1Type; "data.size() >= (i+1)*type_size" mov esi, 0BEh loc_407CF: xor eax, eax call _ggml_abort
long long gguf_kv::get_val<unsigned long>( long long a1, long long a2, long long a3, long long a4, unsigned long long a5, long long a6) { long long v6; // rcx int *v7; // rax char *v9; // rcx int v10; // esi if ( *(_DWORD *)(a1 + 36) != 10 ) { v9 = "type_to_gguf_type<T>::value == type"; v10 = 183; goto LABEL_17; } v6 = qword_AB330; if ( !qword_AB330 ) goto LABEL_9; v7 = (int *)&unk_AB328; do { if ( *(int *)(v6 + 32) >= 10 ) v7 = (int *)v6; v6 = *(_QWORD *)(v6 + 8LL * (*(_DWORD *)(v6 + 32) < 10) + 16); } while ( v6 ); if ( v7 != (int *)&unk_AB328 && v7[8] <= 10 ) a5 = *((_QWORD *)v7 + 5); else LABEL_9: a5 = 0LL; a6 = *(_QWORD *)(a1 + 40); if ( (*(_QWORD *)(a1 + 48) - a6) % a5 ) { v9 = "data.size() % type_size == 0"; v10 = 189; goto LABEL_17; } a5 *= a2 + 1; if ( *(_QWORD *)(a1 + 48) - a6 < a5 ) { v9 = "data.size() >= (i+1)*type_size"; v10 = 190; LABEL_17: ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/gguf.cpp", v10, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v9, a5, a6); } return a6 + 8 * a2; }
get_val<unsigned_long>: PUSH RAX CMP dword ptr [RDI + 0x24],0xa JNZ 0x0014077d MOV RCX,qword ptr [0x001ab330] TEST RCX,RCX JZ 0x00140749 LEA RAX,[0x1ab328] LAB_00140720: XOR EDX,EDX CMP dword ptr [RCX + 0x20],0xa SETL DL CMOVGE RAX,RCX MOV RCX,qword ptr [RCX + RDX*0x8 + 0x10] TEST RCX,RCX JNZ 0x00140720 LEA RCX,[0x1ab328] CMP RAX,RCX JZ 0x00140749 CMP dword ptr [RAX + 0x20],0xa JLE 0x00140777 LAB_00140749: XOR R8D,R8D LAB_0014074c: MOV R9,qword ptr [RDI + 0x28] MOV RCX,qword ptr [RDI + 0x30] SUB RCX,R9 MOV RAX,RCX XOR EDX,EDX DIV R8 TEST RDX,RDX JNZ 0x00140799 LEA RAX,[RSI + 0x1] IMUL R8,RAX CMP RCX,R8 JC 0x001407b5 LEA RAX,[R9 + RSI*0x8] POP RCX RET LAB_00140777: MOV R8,qword ptr [RAX + 0x28] JMP 0x0014074c LAB_0014077d: LEA RDI,[0x159cd5] LEA RDX,[0x14a65d] LEA RCX,[0x15a4d8] MOV ESI,0xb7 JMP 0x001407cf LAB_00140799: LEA RDI,[0x159cd5] LEA RDX,[0x14a65d] LEA RCX,[0x15a212] MOV ESI,0xbd JMP 0x001407cf LAB_001407b5: LEA RDI,[0x159cd5] LEA RDX,[0x14a65d] LEA RCX,[0x15a4fc] MOV ESI,0xbe LAB_001407cf: XOR EAX,EAX CALL 0x00117c60
/* unsigned long const& gguf_kv::get_val<unsigned long>(unsigned long) const */ ulong * __thiscall gguf_kv::get_val<unsigned_long>(gguf_kv *this,ulong param_1) { long lVar1; long lVar2; ulong uVar3; char *pcVar4; int8 uVar5; ulong uVar6; if (*(int *)(this + 0x24) != 10) { pcVar4 = "type_to_gguf_type<T>::value == type"; uVar5 = 0xb7; goto LAB_001407cf; } if (GGUF_TYPE_SIZE._16_8_ == 0) { LAB_00140749: uVar6 = 0; } else { lVar1 = 0x1ab328; lVar2 = GGUF_TYPE_SIZE._16_8_; do { if (9 < *(int *)(lVar2 + 0x20)) { lVar1 = lVar2; } lVar2 = *(long *)(lVar2 + 0x10 + (ulong)(*(int *)(lVar2 + 0x20) < 10) * 8); } while (lVar2 != 0); if ((lVar1 == 0x1ab328) || (10 < *(int *)(lVar1 + 0x20))) goto LAB_00140749; uVar6 = *(ulong *)(lVar1 + 0x28); } uVar3 = *(long *)(this + 0x30) - *(long *)(this + 0x28); if (uVar3 % uVar6 == 0) { if (uVar6 * (param_1 + 1) <= uVar3) { return (ulong *)(*(long *)(this + 0x28) + param_1 * 8); } pcVar4 = "data.size() >= (i+1)*type_size"; uVar5 = 0xbe; } else { pcVar4 = "data.size() % type_size == 0"; uVar5 = 0xbd; } LAB_001407cf: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/gguf.cpp",uVar5, "GGML_ASSERT(%s) failed",pcVar4); }
25,560
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::erase<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, 0>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>)
monkey531[P]llama/common/./json.hpp
IteratorType erase(IteratorType pos) { // make sure iterator fits the current value if (JSON_HEDLEY_UNLIKELY(this != pos.m_object)) { JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value", this)); } IteratorType result = end(); switch (m_data.m_type) { case value_t::boolean: case value_t::number_float: case value_t::number_integer: case value_t::number_unsigned: case value_t::string: case value_t::binary: { if (JSON_HEDLEY_UNLIKELY(!pos.m_it.primitive_iterator.is_begin())) { JSON_THROW(invalid_iterator::create(205, "iterator out of range", this)); } if (is_string()) { AllocatorType<string_t> alloc; std::allocator_traits<decltype(alloc)>::destroy(alloc, m_data.m_value.string); std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_data.m_value.string, 1); m_data.m_value.string = nullptr; } else if (is_binary()) { AllocatorType<binary_t> alloc; std::allocator_traits<decltype(alloc)>::destroy(alloc, m_data.m_value.binary); std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_data.m_value.binary, 1); m_data.m_value.binary = nullptr; } m_data.m_type = value_t::null; assert_invariant(); break; } case value_t::object: { result.m_it.object_iterator = m_data.m_value.object->erase(pos.m_it.object_iterator); break; } case value_t::array: { result.m_it.array_iterator = m_data.m_value.array->erase(pos.m_it.array_iterator); break; } case value_t::null: case value_t::discarded: default: JSON_THROW(type_error::create(307, detail::concat("cannot use erase() with ", type_name()), this)); } return result; }
O1
cpp
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::erase<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, 0>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x30, %rsp movq %rsi, %r14 cmpq %rsi, (%rdx) jne 0x2e5d0 movq %rdx, %r15 movq %rdi, %rbx movq %r14, %rsi callq 0x2e336 movzbl (%r14), %eax leal -0x3(%rax), %ecx cmpl $0x6, %ecx jae 0x2e541 cmpq $0x0, 0x18(%r15) jne 0x2e633 cmpl $0x8, %eax je 0x2e562 cmpl $0x3, %eax jne 0x2e598 leaq 0x8(%r14), %r12 movq 0x8(%r14), %rax movq (%rax), %rdi addq $0x10, %rax movl $0x20, %r15d cmpq %rax, %rdi je 0x2e584 movq (%rax), %rsi incq %rsi jmp 0x2e57f cmpl $0x1, %eax je 0x2e5b9 cmpl $0x2, %eax jne 0x2e693 movq 0x8(%r14), %rdi movq 0x10(%r15), %rsi callq 0x2fc36 movq %rax, 0x10(%rbx) jmp 0x2e5a9 leaq 0x8(%r14), %r12 movq 0x8(%r14), %rax movq (%rax), %rdi movl $0x28, %r15d testq %rdi, %rdi je 0x2e584 movq 0x10(%rax), %rsi subq %rdi, %rsi callq 0x196b0 movq (%r12), %rdi movq %r15, %rsi callq 0x196b0 movq $0x0, (%r12) movb $0x0, (%r14) movq %r14, %rdi movl $0x1, %esi callq 0x28fd0 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 0x2f7ee movq %rax, 0x8(%rbx) jmp 0x2e5a9 movl $0x20, %edi callq 0x19370 movq %rax, %rbx leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x888a7(%rip), %rsi # 0xb6e94 leaq 0x888c3(%rip), %rdx # 0xb6eb7 leaq 0x8(%rsp), %rdi callq 0x32ea4 movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0xca, %esi movq %r14, %rcx callq 0x2f31a xorl %ebp, %ebp leaq 0xbe8c1(%rip), %rsi # 0xecee0 leaq -0x2cd8(%rip), %rdx # 0x2b94e movq %rbx, %rdi callq 0x19b70 jmp 0x2e6f1 movl $0x20, %edi callq 0x19370 movq %rax, %rbx leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x88868(%rip), %rsi # 0xb6eb8 leaq 0x88876(%rip), %rdx # 0xb6ecd leaq 0x8(%rsp), %rdi callq 0x32ea4 movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0xcd, %esi movq %r14, %rcx callq 0x2f31a xorl %ebp, %ebp leaq 0xbe85e(%rip), %rsi # 0xecee0 leaq -0x2d3b(%rip), %rdx # 0x2b94e movq %rbx, %rdi callq 0x19b70 jmp 0x2e6f1 movl $0x20, %edi callq 0x19370 movq %rax, %rbx movq %r14, %rdi callq 0x2f7ce leaq 0x28(%rsp), %rdx movq %rax, (%rdx) leaq 0x88817(%rip), %rsi # 0xb6ece leaq 0x8(%rsp), %rdi callq 0x2f745 movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0x133, %esi # imm = 0x133 movq %r14, %rcx callq 0x2f57a xorl %ebp, %ebp leaq 0xbe83e(%rip), %rsi # 0xecf20 leaq -0x2d9b(%rip), %rdx # 0x2b94e movq %rbx, %rdi callq 0x19b70 movq %rax, %r14 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi jne 0x2e717 jmp 0x2e72c jmp 0x2e726 jmp 0x2e70a jmp 0x2e726 movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x2e72c movq 0x18(%rsp), %rsi incq %rsi callq 0x196b0 jmp 0x2e72c movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0x2e739 movq %rbx, %rdi callq 0x19510 movq %r14, %rdi callq 0x19be0 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_: push rbp; int push r15; int push r14; char push r12; int push rbx; __int64 sub rsp, 30h mov r14, rsi cmp [rdx], rsi jnz loc_2E5D0 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_2E541 cmp qword ptr [r15+18h], 0 jnz loc_2E633 cmp eax, 8 jz short loc_2E562 cmp eax, 3 jnz short loc_2E598 lea r12, [r14+8] mov rax, [r14+8] mov rdi, [rax] add rax, 10h mov r15d, 20h ; ' ' cmp rdi, rax jz short loc_2E584 mov rsi, [rax] inc rsi jmp short loc_2E57F loc_2E541: cmp eax, 1 jz short loc_2E5B9 cmp eax, 2 jnz loc_2E693 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_2E5A9 loc_2E562: lea r12, [r14+8] mov rax, [r14+8] mov rdi, [rax]; void * mov r15d, 28h ; '(' test rdi, rdi jz short loc_2E584 mov rsi, [rax+10h] sub rsi, rdi; unsigned __int64 loc_2E57F: call __ZdlPvm; operator delete(void *,ulong) loc_2E584: mov rdi, [r12]; void * mov rsi, r15; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) mov qword ptr [r12], 0 loc_2E598: mov byte ptr [r14], 0 mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) loc_2E5A9: mov rax, rbx add rsp, 30h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_2E5B9: 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_2E5A9 loc_2E5D0: 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_2E6F1 loc_2E633: 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_2E6F1 loc_2E693: 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_2E6F1: mov r14, rax lea rax, [rsp+58h+var_40] mov rdi, [rax-10h] cmp rdi, rax jnz short loc_2E717 jmp short loc_2E72C jmp short loc_2E726 jmp short loc_2E70A jmp short loc_2E726 loc_2E70A: mov r14, rax mov rdi, [rsp+58h+var_50]; void * cmp rdi, r15 jz short loc_2E72C loc_2E717: mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_2E72C loc_2E726: mov r14, rax mov bpl, 1 loc_2E72C: test bpl, bpl jz short loc_2E739 mov rdi, rbx; void * call ___cxa_free_exception loc_2E739: mov rdi, r14 call __Unwind_Resume
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x30 MOV R14,RSI CMP qword ptr [RDX],RSI JNZ 0x0012e5d0 MOV R15,RDX MOV RBX,RDI MOV RSI,R14 CALL 0x0012e336 MOVZX EAX,byte ptr [R14] LEA ECX,[RAX + -0x3] CMP ECX,0x6 JNC 0x0012e541 CMP qword ptr [R15 + 0x18],0x0 JNZ 0x0012e633 CMP EAX,0x8 JZ 0x0012e562 CMP EAX,0x3 JNZ 0x0012e598 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 0x0012e584 MOV RSI,qword ptr [RAX] INC RSI JMP 0x0012e57f LAB_0012e541: CMP EAX,0x1 JZ 0x0012e5b9 CMP EAX,0x2 JNZ 0x0012e693 MOV RDI,qword ptr [R14 + 0x8] MOV RSI,qword ptr [R15 + 0x10] CALL 0x0012fc36 MOV qword ptr [RBX + 0x10],RAX JMP 0x0012e5a9 LAB_0012e562: LEA R12,[R14 + 0x8] MOV RAX,qword ptr [R14 + 0x8] MOV RDI,qword ptr [RAX] MOV R15D,0x28 TEST RDI,RDI JZ 0x0012e584 MOV RSI,qword ptr [RAX + 0x10] SUB RSI,RDI LAB_0012e57f: CALL 0x001196b0 LAB_0012e584: MOV RDI,qword ptr [R12] MOV RSI,R15 CALL 0x001196b0 MOV qword ptr [R12],0x0 LAB_0012e598: MOV byte ptr [R14],0x0 MOV RDI,R14 MOV ESI,0x1 CALL 0x00128fd0 LAB_0012e5a9: MOV RAX,RBX ADD RSP,0x30 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0012e5b9: MOV RDI,qword ptr [R14 + 0x8] MOV RSI,qword ptr [R15 + 0x8] LEA RDX,[RSI + 0x30] CALL 0x0012f7ee MOV qword ptr [RBX + 0x8],RAX JMP 0x0012e5a9 LAB_0012e5d0: MOV EDI,0x20 CALL 0x00119370 MOV RBX,RAX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 LAB_0012e5e6: LEA RSI,[0x1b6e94] LEA RDX,[0x1b6eb7] LEA RDI,[RSP + 0x8] CALL 0x00132ea4 MOV BPL,0x1 LAB_0012e601: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0xca MOV RCX,R14 CALL 0x0012f31a XOR EBP,EBP LEA RSI,[0x1ecee0] LEA RDX,[0x12b94e] MOV RDI,RBX CALL 0x00119b70 LAB_0012e633: MOV EDI,0x20 CALL 0x00119370 MOV RBX,RAX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 LAB_0012e649: LEA RSI,[0x1b6eb8] LEA RDX,[0x1b6ecd] LEA RDI,[RSP + 0x8] CALL 0x00132ea4 MOV BPL,0x1 LAB_0012e664: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0xcd MOV RCX,R14 CALL 0x0012f31a XOR EBP,EBP LEA RSI,[0x1ecee0] LEA RDX,[0x12b94e] MOV RDI,RBX CALL 0x00119b70 LAB_0012e693: MOV EDI,0x20 CALL 0x00119370 MOV RBX,RAX MOV RDI,R14 CALL 0x0012f7ce LEA RDX,[RSP + 0x28] MOV qword ptr [RDX],RAX LAB_0012e6b0: LEA RSI,[0x1b6ece] LEA RDI,[RSP + 0x8] CALL 0x0012f745 MOV BPL,0x1 LAB_0012e6c4: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0x133 MOV RCX,R14 CALL 0x0012f57a XOR EBP,EBP LEA RSI,[0x1ecf20] LEA RDX,[0x12b94e] MOV RDI,RBX CALL 0x00119b70
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 0012e5e6 to 0012e5fd has its CatchHandler @ 0012e726 */ std::__cxx11::string::_M_construct<char_const*> (local_50,"iterator does not fit current value",""); /* try { // try from 0012e601 to 0012e62d has its CatchHandler @ 0012e70a */ _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 0012e6b0 to 0012e6c0 has its CatchHandler @ 0012e704 */ 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 0012e6c4 to 0012e6f0 has its CatchHandler @ 0012e6f1 */ _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 0012e649 to 0012e660 has its CatchHandler @ 0012e708 */ std::__cxx11::string::_M_construct<char_const*>(local_50,"iterator out of range",""); /* try { // try from 0012e664 to 0012e690 has its CatchHandler @ 0012e706 */ _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_0012e57f: 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_0012e598; plVar5 = (long *)**(long **)(param_2 + 8); plVar2 = *(long **)(param_2 + 8) + 2; uVar6 = 0x20; if (plVar5 != plVar2) { uVar4 = *plVar2 + 1; goto LAB_0012e57f; } } operator_delete(*(void **)(param_2 + 8),uVar6); *(int8 *)(param_2 + 8) = 0; LAB_0012e598: *param_2 = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(param_2,0)); return param_1; }
25,561
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeTagsFromParentEdges()
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/../vtr/refinement.h
Index getFirstChildEdgeFromEdges() const { return _firstChildEdgeFromEdge; }
O2
c
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeTagsFromParentEdges(): movslq 0x48(%rdi), %rax movslq 0x30(%rdi), %rcx addq %rax, %rcx cmpq %rcx, %rax jge 0x619f7 movq 0x120(%rdi), %rdx movslq (%rdx,%rax,4), %rdx movq 0x8(%rdi), %rsi movq 0x10(%rdi), %r8 movq 0xf0(%rsi), %rsi movq 0xf0(%r8), %r8 movb (%rsi,%rdx), %dl movb %dl, (%r8,%rax) incq %rax jmp 0x619c5 retq
_ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement31populateEdgeTagsFromParentEdgesEv: movsxd rax, dword ptr [rdi+48h] movsxd rcx, dword ptr [rdi+30h] add rcx, rax loc_619C5: cmp rax, rcx jge short locret_619F7 mov rdx, [rdi+120h] movsxd rdx, dword ptr [rdx+rax*4] mov rsi, [rdi+8] mov r8, [rdi+10h] mov rsi, [rsi+0F0h] mov r8, [r8+0F0h] mov dl, [rsi+rdx] mov [r8+rax], dl inc rax jmp short loc_619C5 locret_619F7: retn
long long OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeTagsFromParentEdges( OpenSubdiv::v3_6_0::Vtr::internal::Refinement *this) { long long result; // rax long long v2; // rcx result = *((int *)this + 18); v2 = result + *((int *)this + 12); while ( result < v2 ) { *(_BYTE *)(*(_QWORD *)(*((_QWORD *)this + 2) + 240LL) + result) = *(_BYTE *)(*(_QWORD *)(*((_QWORD *)this + 1) + 240LL) + *(int *)(*((_QWORD *)this + 36) + 4 * result)); ++result; } return result; }
populateEdgeTagsFromParentEdges: MOVSXD RAX,dword ptr [RDI + 0x48] MOVSXD RCX,dword ptr [RDI + 0x30] ADD RCX,RAX LAB_001619c5: CMP RAX,RCX JGE 0x001619f7 MOV RDX,qword ptr [RDI + 0x120] MOVSXD RDX,dword ptr [RDX + RAX*0x4] MOV RSI,qword ptr [RDI + 0x8] MOV R8,qword ptr [RDI + 0x10] MOV RSI,qword ptr [RSI + 0xf0] MOV R8,qword ptr [R8 + 0xf0] MOV DL,byte ptr [RSI + RDX*0x1] MOV byte ptr [R8 + RAX*0x1],DL INC RAX JMP 0x001619c5 LAB_001619f7: RET
/* OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeTagsFromParentEdges() */ void __thiscall OpenSubdiv::v3_6_0::Vtr::internal::Refinement::populateEdgeTagsFromParentEdges(Refinement *this) { long lVar1; long lVar2; lVar1 = (long)*(int *)(this + 0x48); lVar2 = *(int *)(this + 0x30) + lVar1; for (; lVar1 < lVar2; lVar1 = lVar1 + 1) { *(int1 *)(*(long *)(*(long *)(this + 0x10) + 0xf0) + lVar1) = *(int1 *) (*(long *)(*(long *)(this + 8) + 0xf0) + (long)*(int *)(*(long *)(this + 0x120) + lVar1 * 4)); } return; }
25,562
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const
monkey531[P]llama/common/json.hpp
const_reference operator[](size_type idx) const { // const operator[] only works for arrays if (JSON_HEDLEY_LIKELY(is_array())) { return m_data.m_value.array->operator[](idx); } JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this)); }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const: pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 cmpb $0x2, (%rdi) jne 0x75429 movq 0x8(%r14), %rax shlq $0x4, %rsi addq (%rax), %rsi movq %rsi, %rax addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x20, %edi callq 0x193b0 movq %rax, %rbx movq %r14, %rdi callq 0x5108e leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x47d2a(%rip), %rsi # 0xbd177 leaq 0x10(%rsp), %rdi callq 0x754bf movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x131, %esi # imm = 0x131 movq %r14, %rcx callq 0x50e36 xorl %ebp, %ebp leaq 0x79e50(%rip), %rsi # 0xef2c8 leaq -0x165df(%rip), %rdx # 0x5eea0 movq %rbx, %rdi callq 0x19d60 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x754a5 movq 0x20(%rsp), %rsi incq %rsi callq 0x197f0 testb %bpl, %bpl jne 0x754af jmp 0x754b7 movq %rax, %r14 movq %rbx, %rdi callq 0x195a0 movq %r14, %rdi callq 0x19dc0
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm: push rbp; char push r14; int push rbx; __int64 sub rsp, 30h mov r14, rdi cmp byte ptr [rdi], 2 jnz short loc_75429 mov rax, [r14+8] shl rsi, 4 add rsi, [rax] mov rax, rsi add rsp, 30h pop rbx pop r14 pop rbp retn loc_75429: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aCannotUseOpera; "cannot use operator[] with a numeric ar"... lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(char const(&)[52],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 131h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_754A5 mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_754A5: test bpl, bpl jnz short loc_754AF jmp short loc_754B7 mov r14, rax loc_754AF: mov rdi, rbx; void * call ___cxa_free_exception loc_754B7: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]( long long a1, long long a2) { nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx _QWORD v4[2]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 != 2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__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((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>( v4, "cannot use operator[] with a numeric argument with "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 305, v4); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return **(_QWORD **)(a1 + 8) + 16 * a2; }
operator[]: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI CMP byte ptr [RDI],0x2 JNZ 0x00175429 MOV RAX,qword ptr [R14 + 0x8] SHL RSI,0x4 ADD RSI,qword ptr [RAX] MOV RAX,RSI ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_00175429: MOV EDI,0x20 CALL 0x001193b0 MOV RBX,RAX MOV RDI,R14 CALL 0x0015108e LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_00175446: LEA RSI,[0x1bd177] LEA RDI,[RSP + 0x10] CALL 0x001754bf MOV BPL,0x1 LAB_0017545a: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x131 MOV RCX,R14 CALL 0x00150e36 XOR EBP,EBP LEA RSI,[0x1ef2c8] LEA RDX,[0x15eea0] MOV RDI,RBX CALL 0x00119d60
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::operator[](unsigned long) const */ long __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,ulong param_1) { int8 uVar1; char *local_40; detail local_38 [32]; if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2) { return param_1 * 0x10 + **(long **)(this + 8); } uVar1 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 00175446 to 00175456 has its CatchHandler @ 001754ac */ detail::concat<std::__cxx11::string,char_const(&)[52],char_const*> (local_38,"cannot use operator[] with a numeric argument with ",&local_40); /* try { // try from 0017545a to 00175486 has its CatchHandler @ 00175487 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar1,0x131,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception); }
25,563
ImPlot3D::StyleColorsAuto(ImPlot3DStyle*)
zkingston[P]unknot/build_O1/_deps/implot3d-src/implot3d.cpp
void StyleColorsAuto(ImPlot3DStyle* dst) { ImPlot3DStyle* style = dst ? dst : &ImPlot3D::GetStyle(); ImVec4* colors = style->Colors; colors[ImPlot3DCol_Line] = IMPLOT3D_AUTO_COL; colors[ImPlot3DCol_Fill] = IMPLOT3D_AUTO_COL; colors[ImPlot3DCol_MarkerOutline] = IMPLOT3D_AUTO_COL; colors[ImPlot3DCol_MarkerFill] = IMPLOT3D_AUTO_COL; colors[ImPlot3DCol_TitleText] = IMPLOT3D_AUTO_COL; colors[ImPlot3DCol_InlayText] = IMPLOT3D_AUTO_COL; colors[ImPlot3DCol_FrameBg] = IMPLOT3D_AUTO_COL; colors[ImPlot3DCol_PlotBg] = IMPLOT3D_AUTO_COL; colors[ImPlot3DCol_PlotBorder] = IMPLOT3D_AUTO_COL; colors[ImPlot3DCol_LegendBg] = IMPLOT3D_AUTO_COL; colors[ImPlot3DCol_LegendBorder] = IMPLOT3D_AUTO_COL; colors[ImPlot3DCol_LegendText] = IMPLOT3D_AUTO_COL; colors[ImPlot3DCol_AxisText] = IMPLOT3D_AUTO_COL; colors[ImPlot3DCol_AxisGrid] = IMPLOT3D_AUTO_COL; colors[ImPlot3DCol_AxisTick] = IMPLOT3D_AUTO_COL; }
O1
cpp
ImPlot3D::StyleColorsAuto(ImPlot3DStyle*): movl $0x94, %eax addq 0x2e378b(%rip), %rax # 0x336c98 testq %rdi, %rdi cmovneq %rdi, %rax movaps 0x241085(%rip), %xmm0 # 0x2945a0 movups %xmm0, 0x4c(%rax) movups %xmm0, 0x5c(%rax) movups %xmm0, 0x6c(%rax) movups %xmm0, 0x7c(%rax) movups %xmm0, 0x8c(%rax) movups %xmm0, 0x9c(%rax) movups %xmm0, 0xac(%rax) movups %xmm0, 0xbc(%rax) movups %xmm0, 0xcc(%rax) movups %xmm0, 0xdc(%rax) movups %xmm0, 0xec(%rax) movups %xmm0, 0xfc(%rax) movups %xmm0, 0x10c(%rax) movups %xmm0, 0x11c(%rax) movups %xmm0, 0x12c(%rax) retq
_ZN8ImPlot3D15StyleColorsAutoEP13ImPlot3DStyle: mov eax, 94h add rax, cs:_ZN8ImPlot3D9GImPlot3DE; ImPlot3D::GImPlot3D test rdi, rdi cmovnz rax, rdi movaps xmm0, cs:xmmword_2945A0 movups xmmword ptr [rax+4Ch], xmm0 movups xmmword ptr [rax+5Ch], xmm0 movups xmmword ptr [rax+6Ch], xmm0 movups xmmword ptr [rax+7Ch], xmm0 movups xmmword ptr [rax+8Ch], xmm0 movups xmmword ptr [rax+9Ch], xmm0 movups xmmword ptr [rax+0ACh], xmm0 movups xmmword ptr [rax+0BCh], xmm0 movups xmmword ptr [rax+0CCh], xmm0 movups xmmword ptr [rax+0DCh], xmm0 movups xmmword ptr [rax+0ECh], xmm0 movups xmmword ptr [rax+0FCh], xmm0 movups xmmword ptr [rax+10Ch], xmm0 movups xmmword ptr [rax+11Ch], xmm0 movups xmmword ptr [rax+12Ch], xmm0 retn
ImPlot3D * ImPlot3D::StyleColorsAuto(ImPlot3D *this, ImPlot3DStyle *a2) { ImPlot3D *result; // rax result = (ImGui *)((char *)ImPlot3D::GImPlot3D + 148); if ( this ) result = this; *(_OWORD *)((char *)result + 76) = xmmword_2945A0; *(_OWORD *)((char *)result + 92) = xmmword_2945A0; *(_OWORD *)((char *)result + 108) = xmmword_2945A0; *(_OWORD *)((char *)result + 124) = xmmword_2945A0; *(_OWORD *)((char *)result + 140) = xmmword_2945A0; *(_OWORD *)((char *)result + 156) = xmmword_2945A0; *(_OWORD *)((char *)result + 172) = xmmword_2945A0; *(_OWORD *)((char *)result + 188) = xmmword_2945A0; *(_OWORD *)((char *)result + 204) = xmmword_2945A0; *(_OWORD *)((char *)result + 220) = xmmword_2945A0; *(_OWORD *)((char *)result + 236) = xmmword_2945A0; *(_OWORD *)((char *)result + 252) = xmmword_2945A0; *(_OWORD *)((char *)result + 268) = xmmword_2945A0; *(_OWORD *)((char *)result + 284) = xmmword_2945A0; *(_OWORD *)((char *)result + 300) = xmmword_2945A0; return result; }
StyleColorsAuto: MOV EAX,0x94 ADD RAX,qword ptr [0x00436c98] TEST RDI,RDI CMOVNZ RAX,RDI MOVAPS XMM0,xmmword ptr [0x003945a0] MOVUPS xmmword ptr [RAX + 0x4c],XMM0 MOVUPS xmmword ptr [RAX + 0x5c],XMM0 MOVUPS xmmword ptr [RAX + 0x6c],XMM0 MOVUPS xmmword ptr [RAX + 0x7c],XMM0 MOVUPS xmmword ptr [RAX + 0x8c],XMM0 MOVUPS xmmword ptr [RAX + 0x9c],XMM0 MOVUPS xmmword ptr [RAX + 0xac],XMM0 MOVUPS xmmword ptr [RAX + 0xbc],XMM0 MOVUPS xmmword ptr [RAX + 0xcc],XMM0 MOVUPS xmmword ptr [RAX + 0xdc],XMM0 MOVUPS xmmword ptr [RAX + 0xec],XMM0 MOVUPS xmmword ptr [RAX + 0xfc],XMM0 MOVUPS xmmword ptr [RAX + 0x10c],XMM0 MOVUPS xmmword ptr [RAX + 0x11c],XMM0 MOVUPS xmmword ptr [RAX + 0x12c],XMM0 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* ImPlot3D::StyleColorsAuto(ImPlot3DStyle*) */ void ImPlot3D::StyleColorsAuto(ImPlot3DStyle *param_1) { int8 uVar1; int8 uVar2; ImPlot3DStyle *pIVar3; uVar2 = _UNK_003945a8; uVar1 = _DAT_003945a0; pIVar3 = (ImPlot3DStyle *)(GImPlot3D + 0x94); if (param_1 != (ImPlot3DStyle *)0x0) { pIVar3 = param_1; } *(int8 *)(pIVar3 + 0x4c) = _DAT_003945a0; *(int8 *)(pIVar3 + 0x54) = uVar2; *(int8 *)(pIVar3 + 0x5c) = uVar1; *(int8 *)(pIVar3 + 100) = uVar2; *(int8 *)(pIVar3 + 0x6c) = uVar1; *(int8 *)(pIVar3 + 0x74) = uVar2; *(int8 *)(pIVar3 + 0x7c) = uVar1; *(int8 *)(pIVar3 + 0x84) = uVar2; *(int8 *)(pIVar3 + 0x8c) = uVar1; *(int8 *)(pIVar3 + 0x94) = uVar2; *(int8 *)(pIVar3 + 0x9c) = uVar1; *(int8 *)(pIVar3 + 0xa4) = uVar2; *(int8 *)(pIVar3 + 0xac) = uVar1; *(int8 *)(pIVar3 + 0xb4) = uVar2; *(int8 *)(pIVar3 + 0xbc) = uVar1; *(int8 *)(pIVar3 + 0xc4) = uVar2; *(int8 *)(pIVar3 + 0xcc) = uVar1; *(int8 *)(pIVar3 + 0xd4) = uVar2; *(int8 *)(pIVar3 + 0xdc) = uVar1; *(int8 *)(pIVar3 + 0xe4) = uVar2; *(int8 *)(pIVar3 + 0xec) = uVar1; *(int8 *)(pIVar3 + 0xf4) = uVar2; *(int8 *)(pIVar3 + 0xfc) = uVar1; *(int8 *)(pIVar3 + 0x104) = uVar2; *(int8 *)(pIVar3 + 0x10c) = uVar1; *(int8 *)(pIVar3 + 0x114) = uVar2; *(int8 *)(pIVar3 + 0x11c) = uVar1; *(int8 *)(pIVar3 + 0x124) = uVar2; *(int8 *)(pIVar3 + 300) = uVar1; *(int8 *)(pIVar3 + 0x134) = uVar2; return; }
25,564
short const cxpr::ceil<short, float>(float)
untodesu[P]voxelius/core/constexpr.hh
constexpr static inline const T cxpr::ceil(const F x) { static_assert(std::is_integral_v<T>); static_assert(std::is_floating_point_v<F>); const T ival = static_cast<T>(x); if(ival < x) return ival + static_cast<T>(1); return ival; }
O0
cpp
short const cxpr::ceil<short, float>(float): pushq %rbp movq %rsp, %rbp movss %xmm0, -0x8(%rbp) movss -0x8(%rbp), %xmm0 cvttss2si %xmm0, %eax movw %ax, -0xa(%rbp) movswl -0xa(%rbp), %eax cvtsi2ss %eax, %xmm1 movss -0x8(%rbp), %xmm0 ucomiss %xmm1, %xmm0 jbe 0x92e25 movswl -0xa(%rbp), %eax addl $0x1, %eax movw %ax, -0x2(%rbp) jmp 0x92e2d movw -0xa(%rbp), %ax movw %ax, -0x2(%rbp) movw -0x2(%rbp), %ax popq %rbp retq nopw %cs:(%rax,%rax)
_ZN4cxprL4ceilIsfEEKT_T0_: push rbp mov rbp, rsp movss [rbp+var_8], xmm0 movss xmm0, [rbp+var_8] cvttss2si eax, xmm0 mov [rbp+var_A], ax movsx eax, [rbp+var_A] cvtsi2ss xmm1, eax movss xmm0, [rbp+var_8] ucomiss xmm0, xmm1 jbe short loc_92E25 movsx eax, [rbp+var_A] add eax, 1 mov [rbp+var_2], ax jmp short loc_92E2D loc_92E25: mov ax, [rbp+var_A] mov [rbp+var_2], ax loc_92E2D: mov ax, [rbp+var_2] pop rbp retn
__int16 cxpr::ceil<short,float>(float a1) { __int16 v2; // [rsp+0h] [rbp-Ah] v2 = (int)a1; if ( a1 <= (float)v2 ) return (int)a1; else return v2 + 1; }
ceil<short,float>: PUSH RBP MOV RBP,RSP MOVSS dword ptr [RBP + -0x8],XMM0 MOVSS XMM0,dword ptr [RBP + -0x8] CVTTSS2SI EAX,XMM0 MOV word ptr [RBP + -0xa],AX MOVSX EAX,word ptr [RBP + -0xa] CVTSI2SS XMM1,EAX MOVSS XMM0,dword ptr [RBP + -0x8] UCOMISS XMM0,XMM1 JBE 0x00192e25 MOVSX EAX,word ptr [RBP + -0xa] ADD EAX,0x1 MOV word ptr [RBP + -0x2],AX JMP 0x00192e2d LAB_00192e25: MOV AX,word ptr [RBP + -0xa] MOV word ptr [RBP + -0x2],AX LAB_00192e2d: MOV AX,word ptr [RBP + -0x2] POP RBP RET
/* short const cxpr::ceil<short, float>(float) */ short cxpr::ceil<short,float>(float param_1) { short local_a; local_a = (short)(int)param_1; if ((float)(int)local_a < param_1) { local_a = local_a + 1; } return local_a; }
25,565
ankerl::nanobench::BigO::collectRangeMeasure(std::vector<ankerl::nanobench::Result, std::allocator<ankerl::nanobench::Result>> const&)
BadAccessGuards/build_O0/_deps/nanobench-src/src/include/nanobench.h
BigO::RangeMeasure BigO::collectRangeMeasure(std::vector<Result> const& results) { BigO::RangeMeasure rangeMeasure; for (auto const& result : results) { if (result.config().mComplexityN > 0.0) { rangeMeasure.emplace_back(result.config().mComplexityN, result.median(Result::Measure::elapsed)); } } return rangeMeasure; }
O0
c
ankerl::nanobench::BigO::collectRangeMeasure(std::vector<ankerl::nanobench::Result, std::allocator<ankerl::nanobench::Result>> const&): pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x60(%rbp) movq %rdi, %rax movq %rax, -0x58(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movb $0x0, -0x11(%rbp) callq 0x1efd0 movq -0x10(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rdi callq 0x1eff0 movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rdi callq 0x1f020 movq %rax, -0x30(%rbp) leaq -0x28(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0x1f050 testb $0x1, %al jne 0x18b3c jmp 0x18bcb leaq -0x28(%rbp), %rdi callq 0x1f090 movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rdi callq 0x13dd0 movsd 0x68(%rax), %xmm0 xorps %xmm1, %xmm1 ucomisd %xmm1, %xmm0 jbe 0x18bbb movq -0x38(%rbp), %rdi callq 0x13dd0 addq $0x68, %rax movq %rax, -0x70(%rbp) movq -0x38(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x17780 movsd %xmm0, -0x68(%rbp) jmp 0x18b85 movq -0x70(%rbp), %rsi movq -0x60(%rbp), %rdi movsd -0x68(%rbp), %xmm0 movsd %xmm0, -0x40(%rbp) leaq -0x40(%rbp), %rdx callq 0x1f0b0 jmp 0x18ba2 jmp 0x18bbb movq -0x60(%rbp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, -0x48(%rbp) movl %eax, -0x4c(%rbp) callq 0x1ecf0 jmp 0x18be8 jmp 0x18bbd leaq -0x28(%rbp), %rdi callq 0x1f130 jmp 0x18b26 movb $0x1, -0x11(%rbp) testb $0x1, -0x11(%rbp) jne 0x18bde movq -0x60(%rbp), %rdi callq 0x1ecf0 movq -0x58(%rbp), %rax addq $0x70, %rsp popq %rbp retq movq -0x48(%rbp), %rdi callq 0x47a0 nopw %cs:(%rax,%rax)
_ZN6ankerl9nanobench4BigO19collectRangeMeasureERKSt6vectorINS0_6ResultESaIS3_EE: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_60], rdi mov rax, rdi mov [rbp+var_58], rax mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_11], 0 call _ZNSt6vectorISt4pairIddESaIS1_EEC2Ev; std::vector<std::pair<double,double>>::vector(void) mov rax, [rbp+var_10] mov [rbp+var_20], rax mov rdi, [rbp+var_20] call _ZNKSt6vectorIN6ankerl9nanobench6ResultESaIS2_EE5beginEv; std::vector<ankerl::nanobench::Result>::begin(void) mov [rbp+var_28], rax mov rdi, [rbp+var_20] call _ZNKSt6vectorIN6ankerl9nanobench6ResultESaIS2_EE3endEv; std::vector<ankerl::nanobench::Result>::end(void) mov [rbp+var_30], rax loc_18B26: lea rdi, [rbp+var_28] lea rsi, [rbp+var_30] call _ZN9__gnu_cxxneIPKN6ankerl9nanobench6ResultESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_; __gnu_cxx::operator!=<ankerl::nanobench::Result const*,std::vector<ankerl::nanobench::Result>>(__gnu_cxx::__normal_iterator<ankerl::nanobench::Result const*,std::vector<ankerl::nanobench::Result>> const&,__gnu_cxx::__normal_iterator<ankerl::nanobench::Result const*,std::vector<ankerl::nanobench::Result>> const&) test al, 1 jnz short loc_18B3C jmp loc_18BCB loc_18B3C: lea rdi, [rbp+var_28] call _ZNK9__gnu_cxx17__normal_iteratorIPKN6ankerl9nanobench6ResultESt6vectorIS3_SaIS3_EEEdeEv; __gnu_cxx::__normal_iterator<ankerl::nanobench::Result const*,std::vector<ankerl::nanobench::Result>>::operator*(void) mov [rbp+var_38], rax mov rdi, [rbp+var_38]; this call _ZNK6ankerl9nanobench6Result6configEv; ankerl::nanobench::Result::config(void) movsd xmm0, qword ptr [rax+68h] xorps xmm1, xmm1 ucomisd xmm0, xmm1 jbe short loc_18BBB mov rdi, [rbp+var_38]; this call _ZNK6ankerl9nanobench6Result6configEv; ankerl::nanobench::Result::config(void) add rax, 68h ; 'h' mov [rbp+var_70], rax mov rdi, [rbp+var_38] xor eax, eax mov esi, eax call _ZNK6ankerl9nanobench6Result6medianENS1_7MeasureE; ankerl::nanobench::Result::median(ankerl::nanobench::Result::Measure) movsd [rbp+var_68], xmm0 jmp short $+2 loc_18B85: mov rsi, [rbp+var_70] mov rdi, [rbp+var_60] movsd xmm0, [rbp+var_68] movsd [rbp+var_40], xmm0 lea rdx, [rbp+var_40] call _ZNSt6vectorISt4pairIddESaIS1_EE12emplace_backIJRKddEEERS1_DpOT_; std::vector<std::pair<double,double>>::emplace_back<double const&,double>(double const&,double &&) jmp short $+2 loc_18BA2: jmp short loc_18BBB mov rdi, [rbp+var_60] mov rcx, rax mov eax, edx mov [rbp+var_48], rcx mov [rbp+var_4C], eax call _ZNSt6vectorISt4pairIddESaIS1_EED2Ev; std::vector<std::pair<double,double>>::~vector() jmp short loc_18BE8 loc_18BBB: jmp short $+2 loc_18BBD: lea rdi, [rbp+var_28] call _ZN9__gnu_cxx17__normal_iteratorIPKN6ankerl9nanobench6ResultESt6vectorIS3_SaIS3_EEEppEv; __gnu_cxx::__normal_iterator<ankerl::nanobench::Result const*,std::vector<ankerl::nanobench::Result>>::operator++(void) jmp loc_18B26 loc_18BCB: mov [rbp+var_11], 1 test [rbp+var_11], 1 jnz short loc_18BDE mov rdi, [rbp+var_60] call _ZNSt6vectorISt4pairIddESaIS1_EED2Ev; std::vector<std::pair<double,double>>::~vector() loc_18BDE: mov rax, [rbp+var_58] add rsp, 70h pop rbp retn loc_18BE8: mov rdi, [rbp+var_48] call __Unwind_Resume
long long ankerl::nanobench::BigO::collectRangeMeasure(long long a1, long long a2) { char *v3; // [rsp+0h] [rbp-70h] double v4; // [rsp+30h] [rbp-40h] BYREF ankerl::nanobench::Result *v5; // [rsp+38h] [rbp-38h] long long v6; // [rsp+40h] [rbp-30h] BYREF _QWORD v7[2]; // [rsp+48h] [rbp-28h] BYREF char v8; // [rsp+5Fh] [rbp-11h] long long v9; // [rsp+60h] [rbp-10h] long long v10; // [rsp+68h] [rbp-8h] v10 = a1; v9 = a2; v8 = 0; std::vector<std::pair<double,double>>::vector(); v7[1] = a2; v7[0] = std::vector<ankerl::nanobench::Result>::begin(a2); v6 = std::vector<ankerl::nanobench::Result>::end(a2); while ( (__gnu_cxx::operator!=<ankerl::nanobench::Result const*,std::vector<ankerl::nanobench::Result>>(v7, &v6) & 1) != 0 ) { v5 = (ankerl::nanobench::Result *)__gnu_cxx::__normal_iterator<ankerl::nanobench::Result const*,std::vector<ankerl::nanobench::Result>>::operator*(v7); if ( *((double *)ankerl::nanobench::Result::config(v5) + 13) > 0.0 ) { v3 = (char *)ankerl::nanobench::Result::config(v5) + 104; v4 = ankerl::nanobench::Result::median((long long)v5, 0LL); std::vector<std::pair<double,double>>::emplace_back<double const&,double>(a1, v3, &v4); } __gnu_cxx::__normal_iterator<ankerl::nanobench::Result const*,std::vector<ankerl::nanobench::Result>>::operator++(v7); } return a1; }
collectRangeMeasure: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x60],RDI MOV RAX,RDI MOV qword ptr [RBP + -0x58],RAX MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV byte ptr [RBP + -0x11],0x0 CALL 0x0011efd0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x20] CALL 0x0011eff0 MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x20] CALL 0x0011f020 MOV qword ptr [RBP + -0x30],RAX LAB_00118b26: LEA RDI,[RBP + -0x28] LEA RSI,[RBP + -0x30] CALL 0x0011f050 TEST AL,0x1 JNZ 0x00118b3c JMP 0x00118bcb LAB_00118b3c: LEA RDI,[RBP + -0x28] CALL 0x0011f090 MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x38] CALL 0x00113dd0 MOVSD XMM0,qword ptr [RAX + 0x68] XORPS XMM1,XMM1 UCOMISD XMM0,XMM1 JBE 0x00118bbb MOV RDI,qword ptr [RBP + -0x38] CALL 0x00113dd0 ADD RAX,0x68 MOV qword ptr [RBP + -0x70],RAX MOV RDI,qword ptr [RBP + -0x38] LAB_00118b75: XOR EAX,EAX MOV ESI,EAX CALL 0x00117780 MOVSD qword ptr [RBP + -0x68],XMM0 JMP 0x00118b85 LAB_00118b85: MOV RSI,qword ptr [RBP + -0x70] MOV RDI,qword ptr [RBP + -0x60] MOVSD XMM0,qword ptr [RBP + -0x68] MOVSD qword ptr [RBP + -0x40],XMM0 LEA RDX,[RBP + -0x40] CALL 0x0011f0b0 LAB_00118ba0: JMP 0x00118ba2 LAB_00118ba2: JMP 0x00118bbb LAB_00118bbb: JMP 0x00118bbd LAB_00118bbd: LEA RDI,[RBP + -0x28] CALL 0x0011f130 JMP 0x00118b26 LAB_00118bcb: MOV byte ptr [RBP + -0x11],0x1 TEST byte ptr [RBP + -0x11],0x1 JNZ 0x00118bde MOV RDI,qword ptr [RBP + -0x60] CALL 0x0011ecf0 LAB_00118bde: MOV RAX,qword ptr [RBP + -0x58] ADD RSP,0x70 POP RBP RET
/* WARNING: Removing unreachable block (ram,0x00118bd5) */ /* ankerl::nanobench::BigO::collectRangeMeasure(std::vector<ankerl::nanobench::Result, std::allocator<ankerl::nanobench::Result> > const&) */ BigO * __thiscall ankerl::nanobench::BigO::collectRangeMeasure(BigO *this,vector *param_1) { bool bVar1; long lVar2; double local_48; Result *local_40; int8 local_38; int8 local_30; vector<ankerl::nanobench::Result,std::allocator<ankerl::nanobench::Result>> *local_28; int1 local_19; vector<ankerl::nanobench::Result,std::allocator<ankerl::nanobench::Result>> *local_18; BigO *local_10; local_19 = 0; local_18 = (vector<ankerl::nanobench::Result,std::allocator<ankerl::nanobench::Result>> *)param_1; local_10 = this; std::vector<std::pair<double,double>,std::allocator<std::pair<double,double>>>::vector ((vector<std::pair<double,double>,std::allocator<std::pair<double,double>>> *)this); local_28 = local_18; local_30 = std::vector<ankerl::nanobench::Result,std::allocator<ankerl::nanobench::Result>>::begin (local_18); local_38 = std::vector<ankerl::nanobench::Result,std::allocator<ankerl::nanobench::Result>>::end (local_28); while (bVar1 = __gnu_cxx::operator!= ((__normal_iterator *)&local_30,(__normal_iterator *)&local_38), bVar1) { local_40 = (Result *) __gnu_cxx:: __normal_iterator<ankerl::nanobench::Result_const*,std::vector<ankerl::nanobench::Result,std::allocator<ankerl::nanobench::Result>>> ::operator*((__normal_iterator<ankerl::nanobench::Result_const*,std::vector<ankerl::nanobench::Result,std::allocator<ankerl::nanobench::Result>>> *)&local_30); lVar2 = Result::config(local_40); if (0.0 < *(double *)(lVar2 + 0x68)) { lVar2 = Result::config(local_40); /* try { // try from 00118b75 to 00118b9f has its CatchHandler @ 00118ba4 */ local_48 = (double)Result::median(local_40,0); std::vector<std::pair<double,double>,std::allocator<std::pair<double,double>>>:: emplace_back<double_const&,double> ((vector<std::pair<double,double>,std::allocator<std::pair<double,double>>> *)this, (double *)(lVar2 + 0x68),&local_48); } __gnu_cxx:: __normal_iterator<ankerl::nanobench::Result_const*,std::vector<ankerl::nanobench::Result,std::allocator<ankerl::nanobench::Result>>> ::operator++((__normal_iterator<ankerl::nanobench::Result_const*,std::vector<ankerl::nanobench::Result,std::allocator<ankerl::nanobench::Result>>> *)&local_30); } return this; }
25,566
minja::TemplateNode::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 render(std::ostringstream & out, const std::shared_ptr<Context> & context) const { try { do_render(out, context); } catch (const LoopControlException & e) { // TODO: make stack creation lazy. Only needed if it was thrown outside of a loop. std::ostringstream err; err << e.what(); if (location_.source) err << error_location_suffix(*location_.source, location_.pos); throw LoopControlException(err.str(), e.control_type); } catch (const std::exception & e) { std::ostringstream err; err << e.what(); if (location_.source) err << error_location_suffix(*location_.source, location_.pos); throw std::runtime_error(err.str()); } }
O3
cpp
minja::TemplateNode::render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const: pushq %rbp pushq %r14 pushq %rbx subq $0x1a0, %rsp # imm = 0x1A0 movq %rdi, %r14 movq (%rdi), %rax callq *(%rax) addq $0x1a0, %rsp # imm = 0x1A0 popq %rbx popq %r14 popq %rbp retq movq %rax, %rbx cmpl $0x2, %edx jne 0x9a84d movq %rbx, %rdi callq 0x1a390 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x1ab90 movq (%rbx), %rax movq %rbx, %rdi callq *0x10(%rax) leaq 0x28(%rsp), %rdi movq %rax, %rsi callq 0x1a8a0 movq 0x8(%r14), %rsi testq %rsi, %rsi jne 0x9a8d2 movl $0x18, %edi callq 0x1a450 movq %rax, %r14 leaq 0x30(%rsp), %rsi leaq 0x8(%rsp), %rdi callq 0x1adb0 movl 0x10(%rbx), %ebx movb $0x1, %bpl leaq 0x8(%rsp), %rsi movq %r14, %rdi callq 0x1aad0 leaq 0x907f3(%rip), %rax # 0x12b018 addq $0x10, %rax movq %rax, (%r14) movl %ebx, 0x10(%r14) xorl %ebp, %ebp leaq 0x907c7(%rip), %rsi # 0x12b000 movq 0x91740(%rip), %rdx # 0x12bf80 movq %r14, %rdi callq 0x1af10 jmp 0x9a8d2 cmpl $0x1, %edx jne 0x9aa6f movq %rbx, %rdi callq 0x1a390 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x1ab90 movq (%rbx), %rax movq %rbx, %rdi callq *0x10(%rax) leaq 0x28(%rsp), %rdi movq %rax, %rsi callq 0x1a8a0 movq 0x8(%r14), %rsi testq %rsi, %rsi jne 0x9a918 movl $0x10, %edi callq 0x1a450 movq %rax, %r14 leaq 0x30(%rsp), %rsi leaq 0x8(%rsp), %rdi callq 0x1adb0 movb $0x1, %bpl leaq 0x8(%rsp), %rsi movq %r14, %rdi callq 0x1ae20 xorl %ebp, %ebp movq 0x9172d(%rip), %rsi # 0x12bff0 movq 0x91696(%rip), %rdx # 0x12bf60 movq %r14, %rdi callq 0x1af10 movq 0x18(%r14), %rdx leaq 0x8(%rsp), %rdi callq 0x7818c movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x28(%rsp), %rdi callq 0x1aa00 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9a7ef movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8e0 jmp 0x9a7ef movq 0x18(%r14), %rdx leaq 0x8(%rsp), %rdi callq 0x7818c movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x28(%rsp), %rdi callq 0x1aa00 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9a88e movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8e0 jmp 0x9a88e movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9aa1a movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8e0 jmp 0x9aa1a jmp 0x9aa17 movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9aa47 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8e0 jmp 0x9aa47 movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9a9cf movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8e0 testb %bpl, %bpl jne 0x9a9d9 jmp 0x9aa1a movq %rax, %rbx movq %r14, %rdi callq 0x1a690 jmp 0x9aa1a jmp 0x9aa44 movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9aa03 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8e0 testb %bpl, %bpl jne 0x9aa0d jmp 0x9aa47 movq %rax, %rbx movq %r14, %rdi callq 0x1a690 jmp 0x9aa47 movq %rax, %rbx movq 0x91557(%rip), %rsi # 0x12bf78 leaq 0x28(%rsp), %rdi callq 0x1a4b0 leaq 0x98(%rsp), %rdi callq 0x1a2c0 jmp 0x9aa3d movq %rax, %rbx callq 0x1ae50 jmp 0x9aa6f movq %rax, %rbx movq 0x9152a(%rip), %rsi # 0x12bf78 leaq 0x28(%rsp), %rdi callq 0x1a4b0 leaq 0x98(%rsp), %rdi callq 0x1a2c0 jmp 0x9aa6a movq %rax, %rbx callq 0x1ae50 movq %rbx, %rdi callq 0x1af90 movq %rax, %rdi callq 0x22203 nop
_ZNK5minja12TemplateNode6renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE: push rbp push r14 push rbx sub rsp, 1A0h mov r14, rdi mov rax, [rdi] call qword ptr [rax] add rsp, 1A0h pop rbx pop r14 pop rbp retn mov rbx, rax cmp edx, 2 jnz loc_9A84D mov rdi, rbx; void * call ___cxa_begin_catch mov rbx, rax lea rdi, [rsp+arg_20] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) mov rax, [rbx] mov rdi, rbx call qword ptr [rax+10h] lea rdi, [rsp+arg_20] mov rsi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rsi, [r14+8]; int test rsi, rsi jnz loc_9A8D2 loc_9A7EF: mov edi, 18h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, [rsp+arg_28] lea rdi, [rsp+arg_0] call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov ebx, [rbx+10h] mov bpl, 1 lea rsi, [rsp+arg_0] mov rdi, r14 call __ZNSt13runtime_errorC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) lea rax, _ZTVN5minja20LoopControlExceptionE; `vtable for'minja::LoopControlException add rax, 10h mov [r14], rax mov [r14+10h], ebx xor ebp, ebp lea rsi, _ZTIN5minja20LoopControlExceptionE; lptinfo mov rdx, cs:_ZNSt13runtime_errorD2Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw
long long minja::TemplateNode::render(long long ( ***a1)(_QWORD)) { return (**a1)(a1); }
render: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x1a0 MOV R14,RDI MOV RAX,qword ptr [RDI] LAB_0019a79d: CALL qword ptr [RAX] LAB_0019a79f: ADD RSP,0x1a0 POP RBX POP R14 POP RBP RET
/* minja::TemplateNode::render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&) const */ void minja::TemplateNode::render(ostringstream *param_1,shared_ptr *param_2) { /* try { // try from 0019a79d to 0019a79e has its CatchHandler @ 0019a7ab */ (*(code *)**(int8 **)param_1)(); return; }
25,567
LefDefParser::defiBox::addPoint(LefDefParser::defiGeometries*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiSite.cpp
void defiBox::addPoint(defiGeometries* geom) { struct defiPoints* p; struct defiPoints* tp; int x, y; int i; p = (struct defiPoints*)malloc(sizeof(struct defiPoints)); p->numPoints = geom->numPoints(); p->x = (int*)malloc(sizeof(int)*p->numPoints); p->y = (int*)malloc(sizeof(int)*p->numPoints); for (i = 0; i < p->numPoints; i++) { geom->points(i, &x, &y); p->x[i] = x; p->y[i] = y; // for backward compatibility assign the first 2 points to xl, yl, xh & yh if (i == 0) { xl_ = x; yl_ = y; } else if (i == 1) { xh_ = x; yh_ = y; } } if (points_) { tp = points_; free((char*)(tp->x)); free((char*)(tp->y)); free((char*)(tp)); } points_ = p; }
O3
cpp
LefDefParser::defiBox::addPoint(LefDefParser::defiGeometries*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rsi, %r15 movq %rdi, (%rsp) movl $0x18, %edi callq 0x7270 movq %rax, %rbx movq %r15, %rdi callq 0x1bcb6 movl %eax, (%rbx) movslq %eax, %r14 leaq (,%r14,4), %r13 movq %r13, %rdi callq 0x7270 movq %rax, %r12 movq %rax, 0x8(%rbx) movq %r13, %rdi callq 0x7270 movq %rbx, 0x10(%rsp) movq %rax, 0x10(%rbx) testl %r14d, %r14d jle 0x2d04e movq %rax, %r13 movq (%rsp), %rax leaq 0x8(%rax), %rcx movq %rcx, 0x20(%rsp) leaq 0xc(%rax), %rcx movq %rcx, 0x18(%rsp) leaq 0x4(%rax), %rbx xorl %ebp, %ebp movq %r15, %rdi movl %ebp, %esi leaq 0xc(%rsp), %rdx leaq 0x8(%rsp), %rcx callq 0x1bcba movl 0xc(%rsp), %eax movl %eax, (%r12,%rbp,4) movl 0x8(%rsp), %ecx movl %ecx, (%r13,%rbp,4) movq (%rsp), %rdx movq %rbx, %rsi testl %ebp, %ebp je 0x2d042 cmpl $0x1, %ebp jne 0x2d046 movq 0x20(%rsp), %rdx movq 0x18(%rsp), %rsi movl %eax, (%rdx) movl %ecx, (%rsi) incq %rbp cmpq %r14, %rbp jl 0x2d003 movq (%rsp), %rax movq 0x10(%rax), %r14 testq %r14, %r14 je 0x2d075 movq 0x8(%r14), %rdi callq 0x7220 movq 0x10(%r14), %rdi callq 0x7220 movq %r14, %rdi callq 0x7220 movq (%rsp), %rax movq 0x10(%rsp), %rcx movq %rcx, 0x10(%rax) addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN12LefDefParser7defiBox8addPointEPNS_14defiGeometriesE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r15, rsi mov [rsp+58h+var_58], rdi mov edi, 18h call _malloc mov rbx, rax mov rdi, r15; this call _ZNK12LefDefParser14defiGeometries9numPointsEv; LefDefParser::defiGeometries::numPoints(void) mov [rbx], eax movsxd r14, eax lea r13, ds:0[r14*4] mov rdi, r13 call _malloc mov r12, rax mov [rbx+8], rax mov rdi, r13 call _malloc mov [rsp+58h+var_48], rbx mov [rbx+10h], rax test r14d, r14d jle short loc_2D04E mov r13, rax mov rax, [rsp+58h+var_58] lea rcx, [rax+8] mov [rsp+58h+var_38], rcx lea rcx, [rax+0Ch] mov [rsp+58h+var_40], rcx lea rbx, [rax+4] xor ebp, ebp loc_2D003: mov rdi, r15; this mov esi, ebp; int lea rdx, [rsp+58h+var_4C]; int * lea rcx, [rsp+58h+var_50]; int * call _ZNK12LefDefParser14defiGeometries6pointsEiPiS1_; LefDefParser::defiGeometries::points(int,int *,int *) mov eax, [rsp+58h+var_4C] mov [r12+rbp*4], eax mov ecx, [rsp+58h+var_50] mov [r13+rbp*4+0], ecx mov rdx, [rsp+58h+var_58] mov rsi, rbx test ebp, ebp jz short loc_2D042 cmp ebp, 1 jnz short loc_2D046 mov rdx, [rsp+58h+var_38] mov rsi, [rsp+58h+var_40] loc_2D042: mov [rdx], eax mov [rsi], ecx loc_2D046: inc rbp cmp rbp, r14 jl short loc_2D003 loc_2D04E: mov rax, [rsp+58h+var_58] mov r14, [rax+10h] test r14, r14 jz short loc_2D075 mov rdi, [r14+8] call _free mov rdi, [r14+10h] call _free mov rdi, r14 call _free loc_2D075: mov rax, [rsp+58h+var_58] mov rcx, [rsp+58h+var_48] mov [rax+10h], rcx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
LefDefParser::defiBox * LefDefParser::defiBox::addPoint(void ***this, LefDefParser::defiGeometries *a2) { long long v3; // rbx int v4; // eax long long v5; // r14 unsigned long long v6; // r13 long long v7; // r12 long long v8; // rax long long v9; // r13 long long v10; // rbp int v11; // eax int v12; // ecx LefDefParser::defiBox *v13; // rdx int *v14; // rsi void **v15; // r14 LefDefParser::defiBox *result; // rax int v17; // [rsp+8h] [rbp-50h] BYREF int v18; // [rsp+Ch] [rbp-4Ch] BYREF long long v19; // [rsp+10h] [rbp-48h] int *v20; // [rsp+18h] [rbp-40h] LefDefParser::defiBox *v21; // [rsp+20h] [rbp-38h] v3 = malloc(0x18uLL); v4 = LefDefParser::defiGeometries::numPoints(a2); *(_DWORD *)v3 = v4; v5 = v4; v6 = 4LL * v4; v7 = malloc(v6); *(_QWORD *)(v3 + 8) = v7; v8 = malloc(v6); v19 = v3; *(_QWORD *)(v3 + 16) = v8; if ( (int)v5 > 0 ) { v9 = v8; v21 = (LefDefParser::defiBox *)(this + 1); v20 = (int *)this + 3; v10 = 0LL; while ( 1 ) { LefDefParser::defiGeometries::points(a2, v10, &v18, &v17); v11 = v18; *(_DWORD *)(v7 + 4 * v10) = v18; v12 = v17; *(_DWORD *)(v9 + 4 * v10) = v17; v13 = (LefDefParser::defiBox *)this; v14 = (int *)this + 1; if ( !(_DWORD)v10 ) goto LABEL_6; if ( (_DWORD)v10 == 1 ) break; LABEL_7: if ( ++v10 >= v5 ) goto LABEL_8; } v13 = v21; v14 = v20; LABEL_6: *(_DWORD *)v13 = v11; *v14 = v12; goto LABEL_7; } LABEL_8: v15 = this[2]; if ( v15 ) { free(v15[1]); free(v15[2]); free(v15); } result = (LefDefParser::defiBox *)this; this[2] = (void **)v19; return result; }
addPoint: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R15,RSI MOV qword ptr [RSP],RDI MOV EDI,0x18 CALL 0x00107270 MOV RBX,RAX MOV RDI,R15 CALL 0x0011bcb6 MOV dword ptr [RBX],EAX MOVSXD R14,EAX LEA R13,[R14*0x4] MOV RDI,R13 CALL 0x00107270 MOV R12,RAX MOV qword ptr [RBX + 0x8],RAX MOV RDI,R13 CALL 0x00107270 MOV qword ptr [RSP + 0x10],RBX MOV qword ptr [RBX + 0x10],RAX TEST R14D,R14D JLE 0x0012d04e MOV R13,RAX MOV RAX,qword ptr [RSP] LEA RCX,[RAX + 0x8] MOV qword ptr [RSP + 0x20],RCX LEA RCX,[RAX + 0xc] MOV qword ptr [RSP + 0x18],RCX LEA RBX,[RAX + 0x4] XOR EBP,EBP LAB_0012d003: MOV RDI,R15 MOV ESI,EBP LEA RDX,[RSP + 0xc] LEA RCX,[RSP + 0x8] CALL 0x0011bcba MOV EAX,dword ptr [RSP + 0xc] MOV dword ptr [R12 + RBP*0x4],EAX MOV ECX,dword ptr [RSP + 0x8] MOV dword ptr [R13 + RBP*0x4],ECX MOV RDX,qword ptr [RSP] MOV RSI,RBX TEST EBP,EBP JZ 0x0012d042 CMP EBP,0x1 JNZ 0x0012d046 MOV RDX,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] LAB_0012d042: MOV dword ptr [RDX],EAX MOV dword ptr [RSI],ECX LAB_0012d046: INC RBP CMP RBP,R14 JL 0x0012d003 LAB_0012d04e: MOV RAX,qword ptr [RSP] MOV R14,qword ptr [RAX + 0x10] TEST R14,R14 JZ 0x0012d075 MOV RDI,qword ptr [R14 + 0x8] CALL 0x00107220 MOV RDI,qword ptr [R14 + 0x10] CALL 0x00107220 MOV RDI,R14 CALL 0x00107220 LAB_0012d075: MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x10],RCX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* LefDefParser::defiBox::addPoint(LefDefParser::defiGeometries*) */ void __thiscall LefDefParser::defiBox::addPoint(defiBox *this,defiGeometries *param_1) { size_t __size; int iVar1; int *piVar2; void *pvVar3; void *pvVar4; defiBox *pdVar5; int iVar6; long lVar7; defiBox *pdVar8; int local_50; int local_4c; int *local_48; defiBox *local_40; defiBox *local_38; piVar2 = (int *)malloc(0x18); iVar1 = defiGeometries::numPoints(param_1); *piVar2 = iVar1; __size = (long)iVar1 * 4; pvVar3 = malloc(__size); *(void **)(piVar2 + 2) = pvVar3; pvVar4 = malloc(__size); *(void **)(piVar2 + 4) = pvVar4; local_48 = piVar2; if (0 < iVar1) { local_38 = this + 8; local_40 = this + 0xc; lVar7 = 0; do { iVar6 = (int)lVar7; defiGeometries::points(param_1,iVar6,&local_4c,&local_50); *(int *)((long)pvVar3 + lVar7 * 4) = local_4c; *(int *)((long)pvVar4 + lVar7 * 4) = local_50; pdVar5 = this; pdVar8 = this + 4; if ((iVar6 == 0) || (pdVar5 = local_38, pdVar8 = local_40, iVar6 == 1)) { *(int *)pdVar5 = local_4c; *(int *)pdVar8 = local_50; } lVar7 = lVar7 + 1; } while (lVar7 < iVar1); } pvVar3 = *(void **)(this + 0x10); if (pvVar3 != (void *)0x0) { free(*(void **)((long)pvVar3 + 8)); free(*(void **)((long)pvVar3 + 0x10)); free(pvVar3); } *(int **)(this + 0x10) = local_48; return; }
25,568
HeapVerifyIntegrity
seiftnesse[P]memoryallocator/src/custom_alloc_util.c
int HeapVerifyIntegrity(int repair) { int segments_verified = 0; int segments_repaired = 0; int errors = verify_heap_integrity(repair, &segments_verified, &segments_repaired); HEAP_LOG("Integrity verification results: %d segments, %d errors, %d repaired\n", segments_verified, errors, segments_repaired); // Return the number of errors found (0 = no errors) return errors; }
O1
c
HeapVerifyIntegrity: pushq %rax xorl %eax, %eax leaq 0x4(%rsp), %rsi movl %eax, (%rsi) movq %rsp, %rdx movl %eax, (%rdx) callq 0x2bdf popq %rcx retq
HeapVerifyIntegrity: push rax xor eax, eax lea rsi, [rsp+8+var_4] mov [rsi], eax mov rdx, rsp mov [rdx], eax call verify_heap_integrity pop rcx retn
long long HeapVerifyIntegrity(int a1) { int v2; // [rsp-4h] [rbp-8h] BYREF int v3; // [rsp+0h] [rbp-4h] BYREF v3 = 0; v2 = 0; return verify_heap_integrity(a1, &v3, &v2); }
HeapVerifyIntegrity: PUSH RAX XOR EAX,EAX LEA RSI,[RSP + 0x4] MOV dword ptr [RSI],EAX MOV RDX,RSP MOV dword ptr [RDX],EAX CALL 0x00102bdf POP RCX RET
void HeapVerifyIntegrity(void) { verify_heap_integrity(); return; }
25,569
HeapVerifyIntegrity
seiftnesse[P]memoryallocator/src/custom_alloc_util.c
int HeapVerifyIntegrity(int repair) { int segments_verified = 0; int segments_repaired = 0; int errors = verify_heap_integrity(repair, &segments_verified, &segments_repaired); HEAP_LOG("Integrity verification results: %d segments, %d errors, %d repaired\n", segments_verified, errors, segments_repaired); // Return the number of errors found (0 = no errors) return errors; }
O3
c
HeapVerifyIntegrity: pushq %rax leaq 0x4(%rsp), %rsi movq %rsp, %rdx callq 0x2af9 popq %rcx retq
HeapVerifyIntegrity: push rax lea rsi, [rsp+8+var_4] mov rdx, rsp call verify_heap_integrity pop rcx retn
long long HeapVerifyIntegrity(int a1) { long long v1; // rax long long v3; // [rsp-4h] [rbp-8h] BYREF v3 = v1; return verify_heap_integrity(a1, (_DWORD *)&v3 + 1, &v3); }
HeapVerifyIntegrity: PUSH RAX LEA RSI,[RSP + 0x4] MOV RDX,RSP CALL 0x00102af9 POP RCX RET
void HeapVerifyIntegrity(int8 param_1) { int1 auStack_8 [4]; int1 local_4 [4]; verify_heap_integrity(param_1,local_4,auStack_8); return; }
25,570
ma_apply_redo_bitmap_new_page
eloqsql/storage/maria/ma_bitmap.c
my_bool _ma_apply_redo_bitmap_new_page(MARIA_HA *info, LSN lsn __attribute__ ((unused)), const uchar *header) { MARIA_SHARE *share= info->s; MARIA_FILE_BITMAP *bitmap= &share->bitmap; my_bool error; pgcache_page_no_t from, to, min_from; DBUG_ENTER("_ma_apply_redo_bitmap_new_page"); from= page_korr(header); to= page_korr(header + PAGE_STORE_SIZE); DBUG_PRINT("info", ("from: %lu to: %lu", (ulong)from, (ulong)to)); if ((from > to) || (from % bitmap->pages_covered) != 0 || (to % bitmap->pages_covered) != 0) { error= TRUE; /* corrupted log record */ goto err; } min_from= (share->state.state.data_file_length / bitmap->block_size - 1) / bitmap->pages_covered + 1; min_from*= bitmap->pages_covered; if (from < min_from) { DBUG_PRINT("info", ("overwrite bitmap pages from %lu", (ulong)min_from)); /* We have to overwrite. It could be that there was a bitmap page in memory, covering a data page which went to disk, then crash: the bitmap page is now full of zeros and is ==min_from, we have to overwrite it with correct checksum. */ } share->state.changed|= STATE_CHANGED; bzero(info->buff, bitmap->block_size); if (!(error= _ma_bitmap_create_missing_into_pagecache(share, bitmap, from, to, info->buff))) share->state.state.data_file_length= (to + 1) * bitmap->block_size; err: DBUG_RETURN(error); }
O0
c
ma_apply_redo_bitmap_new_page: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax addq $0xa10, %rax # imm = 0xA10 movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rdi callq 0x43fe0 movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rdi addq $0x5, %rdi callq 0x43fe0 movq %rax, -0x40(%rbp) jmp 0x4449d movq -0x38(%rbp), %rax cmpq -0x40(%rbp), %rax ja 0x444d5 movq -0x38(%rbp), %rax movq -0x28(%rbp), %rcx xorl %edx, %edx divq 0x138(%rcx) cmpq $0x0, %rdx jne 0x444d5 movq -0x40(%rbp), %rax movq -0x28(%rbp), %rcx xorl %edx, %edx divq 0x138(%rcx) cmpq $0x0, %rdx je 0x444de movb $0x1, -0x29(%rbp) jmp 0x445aa movq -0x20(%rbp), %rax movq 0x40(%rax), %rax movq -0x28(%rbp), %rcx movl 0x134(%rcx), %ecx xorl %edx, %edx divq %rcx subq $0x1, %rax movq -0x28(%rbp), %rcx xorl %edx, %edx divq 0x138(%rcx) addq $0x1, %rax movq %rax, -0x48(%rbp) movq -0x28(%rbp), %rax movq 0x138(%rax), %rax imulq -0x48(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x38(%rbp), %rax cmpq -0x48(%rbp), %rax jae 0x44532 jmp 0x4452e jmp 0x44530 jmp 0x44532 movq -0x20(%rbp), %rax movl 0x170(%rax), %ecx orl $0x1, %ecx movl %ecx, 0x170(%rax) movq -0x8(%rbp), %rax movq 0x378(%rax), %rdi movq -0x28(%rbp), %rax movl 0x134(%rax), %eax movl %eax, %edx xorl %esi, %esi callq 0x2a2c0 movq -0x20(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x38(%rbp), %rdx movq -0x40(%rbp), %rcx movq -0x8(%rbp), %rax movq 0x378(%rax), %r8 callq 0x445c0 movb %al, -0x29(%rbp) cmpb $0x0, %al jne 0x445a8 movq -0x40(%rbp), %rcx addq $0x1, %rcx movq -0x28(%rbp), %rax movl 0x134(%rax), %eax imulq %rax, %rcx movq -0x20(%rbp), %rax movq %rcx, 0x40(%rax) jmp 0x445aa jmp 0x445ac movb -0x29(%rbp), %al movb %al, -0x49(%rbp) movb -0x49(%rbp), %al addq $0x50, %rsp popq %rbp retq nopl (%rax,%rax)
_ma_apply_redo_bitmap_new_page: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_20], rax mov rax, [rbp+var_20] add rax, 0A10h mov [rbp+var_28], rax mov rdi, [rbp+var_18] call uint5korr mov [rbp+var_38], rax mov rdi, [rbp+var_18] add rdi, 5 call uint5korr mov [rbp+var_40], rax jmp short $+2 loc_4449D: mov rax, [rbp+var_38] cmp rax, [rbp+var_40] ja short loc_444D5 mov rax, [rbp+var_38] mov rcx, [rbp+var_28] xor edx, edx div qword ptr [rcx+138h] cmp rdx, 0 jnz short loc_444D5 mov rax, [rbp+var_40] mov rcx, [rbp+var_28] xor edx, edx div qword ptr [rcx+138h] cmp rdx, 0 jz short loc_444DE loc_444D5: mov [rbp+var_29], 1 jmp loc_445AA loc_444DE: mov rax, [rbp+var_20] mov rax, [rax+40h] mov rcx, [rbp+var_28] mov ecx, [rcx+134h] xor edx, edx div rcx sub rax, 1 mov rcx, [rbp+var_28] xor edx, edx div qword ptr [rcx+138h] add rax, 1 mov [rbp+var_48], rax mov rax, [rbp+var_28] mov rax, [rax+138h] imul rax, [rbp+var_48] mov [rbp+var_48], rax mov rax, [rbp+var_38] cmp rax, [rbp+var_48] jnb short loc_44532 jmp short $+2 loc_4452E: jmp short $+2 loc_44530: jmp short $+2 loc_44532: mov rax, [rbp+var_20] mov ecx, [rax+170h] or ecx, 1 mov [rax+170h], ecx mov rax, [rbp+var_8] mov rdi, [rax+378h] mov rax, [rbp+var_28] mov eax, [rax+134h] mov edx, eax xor esi, esi call _memset mov rdi, [rbp+var_20] mov rsi, [rbp+var_28] mov rdx, [rbp+var_38] mov rcx, [rbp+var_40] mov rax, [rbp+var_8] mov r8, [rax+378h] call _ma_bitmap_create_missing_into_pagecache mov [rbp+var_29], al cmp al, 0 jnz short loc_445A8 mov rcx, [rbp+var_40] add rcx, 1 mov rax, [rbp+var_28] mov eax, [rax+134h] imul rcx, rax mov rax, [rbp+var_20] mov [rax+40h], rcx loc_445A8: jmp short $+2 loc_445AA: jmp short $+2 loc_445AC: mov al, [rbp+var_29] mov [rbp+var_49], al mov al, [rbp+var_49] add rsp, 50h pop rbp retn
char ma_apply_redo_bitmap_new_page(long long *a1, long long a2, unsigned int *a3) { unsigned long long v4; // [rsp+10h] [rbp-40h] unsigned long long v5; // [rsp+18h] [rbp-38h] char missing_into_pagecache; // [rsp+27h] [rbp-29h] long long v7; // [rsp+28h] [rbp-28h] long long v8; // [rsp+30h] [rbp-20h] v8 = *a1; v7 = *a1 + 2576; v5 = uint5korr(a3); v4 = uint5korr((unsigned int *)((char *)a3 + 5)); if ( v5 > v4 || v5 % *(_QWORD *)(v7 + 312) || v4 % *(_QWORD *)(v7 + 312) ) return 1; *(_DWORD *)(v8 + 368) |= 1u; memset(a1[111], 0LL, *(unsigned int *)(v7 + 308)); missing_into_pagecache = ma_bitmap_create_missing_into_pagecache(v8, v7, v5, v4, a1[111]); if ( !missing_into_pagecache ) *(_QWORD *)(v8 + 64) = *(unsigned int *)(v7 + 308) * (v4 + 1); return missing_into_pagecache; }
_ma_apply_redo_bitmap_new_page: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0xa10 MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x00143fe0 MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x5 CALL 0x00143fe0 MOV qword ptr [RBP + -0x40],RAX JMP 0x0014449d LAB_0014449d: MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x40] JA 0x001444d5 MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x28] XOR EDX,EDX DIV qword ptr [RCX + 0x138] CMP RDX,0x0 JNZ 0x001444d5 MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x28] XOR EDX,EDX DIV qword ptr [RCX + 0x138] CMP RDX,0x0 JZ 0x001444de LAB_001444d5: MOV byte ptr [RBP + -0x29],0x1 JMP 0x001445aa LAB_001444de: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RCX + 0x134] XOR EDX,EDX DIV RCX SUB RAX,0x1 MOV RCX,qword ptr [RBP + -0x28] XOR EDX,EDX DIV qword ptr [RCX + 0x138] ADD RAX,0x1 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x138] IMUL RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x48] JNC 0x00144532 JMP 0x0014452e LAB_0014452e: JMP 0x00144530 LAB_00144530: JMP 0x00144532 LAB_00144532: MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0x170] OR ECX,0x1 MOV dword ptr [RAX + 0x170],ECX MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x378] MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0x134] MOV EDX,EAX XOR ESI,ESI CALL 0x0012a2c0 MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x8] MOV R8,qword ptr [RAX + 0x378] CALL 0x001445c0 MOV byte ptr [RBP + -0x29],AL CMP AL,0x0 JNZ 0x001445a8 MOV RCX,qword ptr [RBP + -0x40] ADD RCX,0x1 MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0x134] IMUL RCX,RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x40],RCX LAB_001445a8: JMP 0x001445aa LAB_001445aa: JMP 0x001445ac LAB_001445ac: MOV AL,byte ptr [RBP + -0x29] MOV byte ptr [RBP + -0x49],AL MOV AL,byte ptr [RBP + -0x49] ADD RSP,0x50 POP RBP RET
char _ma_apply_redo_bitmap_new_page(long *param_1,int8 param_2,long param_3) { long lVar1; ulong uVar2; ulong uVar3; char local_31; lVar1 = *param_1; uVar2 = uint5korr(param_3); uVar3 = uint5korr(param_3 + 5); if (((uVar3 < uVar2) || (uVar2 % *(ulong *)(lVar1 + 0xb48) != 0)) || (uVar3 % *(ulong *)(lVar1 + 0xb48) != 0)) { local_31 = '\x01'; } else { *(uint *)(lVar1 + 0x170) = *(uint *)(lVar1 + 0x170) | 1; memset((void *)param_1[0x6f],0,(ulong)*(uint *)(lVar1 + 0xb44)); local_31 = _ma_bitmap_create_missing_into_pagecache (lVar1,lVar1 + 0xa10,uVar2,uVar3,param_1[0x6f]); if (local_31 == '\0') { *(ulong *)(lVar1 + 0x40) = (uVar3 + 1) * (ulong)*(uint *)(lVar1 + 0xb44); } } return local_31; }
25,571
skip
eloqsql/unittest/mytap/tap.c
void skip(int how_many, char const * const fmt, ...) { char reason[80]; if (fmt && *fmt) { va_list ap; va_start(ap, fmt); vsnprintf(reason, sizeof(reason), fmt, ap); va_end(ap); } else reason[0] = '\0'; while (how_many-- > 0) { va_list ap; memset((char*) &ap, 0, sizeof(ap)); /* Keep compiler happy */ vemit_tap(1, NULL, ap); emit_dir("skip", reason); emit_endl(); } }
O0
c
skip: pushq %rbp movq %rsp, %rbp subq $0x160, %rsp # imm = 0x160 testb %al, %al je 0xda1b7 movaps %xmm0, -0x130(%rbp) movaps %xmm1, -0x120(%rbp) movaps %xmm2, -0x110(%rbp) movaps %xmm3, -0x100(%rbp) movaps %xmm4, -0xf0(%rbp) movaps %xmm5, -0xe0(%rbp) movaps %xmm6, -0xd0(%rbp) movaps %xmm7, -0xc0(%rbp) movq %r9, -0x138(%rbp) movq %r8, -0x140(%rbp) movq %rcx, -0x148(%rbp) movq %rdx, -0x150(%rbp) movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movl %edi, -0x64(%rbp) movq %rsi, -0x70(%rbp) cmpq $0x0, -0x70(%rbp) je 0xda243 movq -0x70(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax je 0xda243 leaq -0x90(%rbp), %rax leaq -0x160(%rbp), %rcx movq %rcx, 0x10(%rax) leaq 0x10(%rbp), %rcx movq %rcx, 0x8(%rax) movl $0x30, 0x4(%rax) movl $0x10, (%rax) leaq -0x60(%rbp), %rdi movq -0x70(%rbp), %rdx leaq -0x90(%rbp), %rcx movl $0x50, %esi callq 0x2a520 leaq -0x90(%rbp), %rax jmp 0xda247 movb $0x0, -0x60(%rbp) jmp 0xda249 movl -0x64(%rbp), %eax movl %eax, %ecx addl $-0x1, %ecx movl %ecx, -0x64(%rbp) cmpl $0x0, %eax jle 0xda298 leaq -0xb0(%rbp), %rdi xorl %esi, %esi movl $0x18, %edx callq 0x2a2c0 leaq -0xb0(%rbp), %rdx movl $0x1, %edi xorl %eax, %eax movl %eax, %esi callq 0xd9fc0 leaq -0x60(%rbp), %rsi leaq 0x79b50(%rip), %rdi # 0x153ddc callq 0xda0a0 callq 0xda500 jmp 0xda249 movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xda2b3 addq $0x160, %rsp # imm = 0x160 popq %rbp retq callq 0x2a270 nopl (%rax,%rax)
skip: push rbp mov rbp, rsp sub rsp, 160h test al, al jz short loc_DA1B7 movaps [rbp+var_130], xmm0 movaps [rbp+var_120], xmm1 movaps [rbp+var_110], xmm2 movaps [rbp+var_100], xmm3 movaps [rbp+var_F0], xmm4 movaps [rbp+var_E0], xmm5 movaps [rbp+var_D0], xmm6 movaps [rbp+var_C0], xmm7 loc_DA1B7: mov [rbp+var_138], r9 mov [rbp+var_140], r8 mov [rbp+var_148], rcx mov [rbp+var_150], rdx mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_64], edi mov [rbp+var_70], rsi cmp [rbp+var_70], 0 jz short loc_DA243 mov rax, [rbp+var_70] movsx eax, byte ptr [rax] cmp eax, 0 jz short loc_DA243 lea rax, [rbp+var_90] lea rcx, [rbp+var_160] mov [rax+10h], rcx lea rcx, [rbp+arg_0] mov [rax+8], rcx mov dword ptr [rax+4], 30h ; '0' mov dword ptr [rax], 10h lea rdi, [rbp+var_60] mov rdx, [rbp+var_70] lea rcx, [rbp+var_90] mov esi, 50h ; 'P' call _vsnprintf lea rax, [rbp+var_90] jmp short loc_DA247 loc_DA243: mov [rbp+var_60], 0 loc_DA247: jmp short $+2 loc_DA249: mov eax, [rbp+var_64] mov ecx, eax add ecx, 0FFFFFFFFh mov [rbp+var_64], ecx cmp eax, 0 jle short loc_DA298 lea rdi, [rbp+var_B0] xor esi, esi mov edx, 18h call _memset lea rdx, [rbp+var_B0] mov edi, 1 xor eax, eax mov esi, eax call vemit_tap lea rsi, [rbp+var_60] lea rdi, aSkip; "skip" call emit_dir call emit_endl jmp short loc_DA249 loc_DA298: mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_DA2B3 add rsp, 160h pop rbp retn loc_DA2B3: call ___stack_chk_fail
unsigned long long skip(int a1, _BYTE *a2, ...) { int v2; // eax _BYTE v4[32]; // [rsp+B0h] [rbp-B0h] BYREF va_list va; // [rsp+D0h] [rbp-90h] BYREF _BYTE *v6; // [rsp+F0h] [rbp-70h] int v7; // [rsp+FCh] [rbp-64h] char v8[88]; // [rsp+100h] [rbp-60h] BYREF unsigned long long v9; // [rsp+158h] [rbp-8h] v9 = __readfsqword(0x28u); v7 = a1; v6 = a2; if ( a2 && *v6 ) { va_start(va, a2); vsnprintf(v8, 80LL, v6, va); } else { v8[0] = 0; } while ( 1 ) { v2 = v7--; if ( v2 <= 0 ) break; memset(v4, 0LL, 24LL); vemit_tap(1, 0LL, (long long)v4); emit_dir("skip", v8); emit_endl(); } return __readfsqword(0x28u); }
skip: PUSH RBP MOV RBP,RSP SUB RSP,0x160 TEST AL,AL JZ 0x001da1b7 MOVAPS xmmword ptr [RBP + -0x130],XMM0 MOVAPS xmmword ptr [RBP + -0x120],XMM1 MOVAPS xmmword ptr [RBP + -0x110],XMM2 MOVAPS xmmword ptr [RBP + -0x100],XMM3 MOVAPS xmmword ptr [RBP + -0xf0],XMM4 MOVAPS xmmword ptr [RBP + -0xe0],XMM5 MOVAPS xmmword ptr [RBP + -0xd0],XMM6 MOVAPS xmmword ptr [RBP + -0xc0],XMM7 LAB_001da1b7: MOV qword ptr [RBP + -0x138],R9 MOV qword ptr [RBP + -0x140],R8 MOV qword ptr [RBP + -0x148],RCX MOV qword ptr [RBP + -0x150],RDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0x64],EDI MOV qword ptr [RBP + -0x70],RSI CMP qword ptr [RBP + -0x70],0x0 JZ 0x001da243 MOV RAX,qword ptr [RBP + -0x70] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JZ 0x001da243 LEA RAX,[RBP + -0x90] LEA RCX,[RBP + -0x160] MOV qword ptr [RAX + 0x10],RCX LEA RCX,[RBP + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV dword ptr [RAX + 0x4],0x30 MOV dword ptr [RAX],0x10 LEA RDI,[RBP + -0x60] MOV RDX,qword ptr [RBP + -0x70] LEA RCX,[RBP + -0x90] MOV ESI,0x50 CALL 0x0012a520 LEA RAX,[RBP + -0x90] JMP 0x001da247 LAB_001da243: MOV byte ptr [RBP + -0x60],0x0 LAB_001da247: JMP 0x001da249 LAB_001da249: MOV EAX,dword ptr [RBP + -0x64] MOV ECX,EAX ADD ECX,-0x1 MOV dword ptr [RBP + -0x64],ECX CMP EAX,0x0 JLE 0x001da298 LEA RDI,[RBP + -0xb0] XOR ESI,ESI MOV EDX,0x18 CALL 0x0012a2c0 LEA RDX,[RBP + -0xb0] MOV EDI,0x1 XOR EAX,EAX MOV ESI,EAX CALL 0x001d9fc0 LEA RSI,[RBP + -0x60] LEA RDI,[0x253ddc] CALL 0x001da0a0 CALL 0x001da500 JMP 0x001da249 LAB_001da298: MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001da2b3 ADD RSP,0x160 POP RBP RET LAB_001da2b3: CALL 0x0012a270
void skip(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8,int param_9, char *param_10,int8 param_11,int8 param_12,int8 param_13, int8 param_14) { char in_AL; long in_FS_OFFSET; int1 local_168 [16]; int8 local_158; int8 local_150; int8 local_148; int8 local_140; int8 local_138; int8 local_128; int8 local_118; int8 local_108; int8 local_f8; int8 local_e8; int8 local_d8; int8 local_c8; int1 local_b8 [32]; int4 local_98; int4 local_94; int1 *local_90; int1 *local_88; char *local_78; int local_6c; char local_68 [88]; long local_10; if (in_AL != '\0') { local_138 = param_1; local_128 = param_2; local_118 = param_3; local_108 = param_4; local_f8 = param_5; local_e8 = param_6; local_d8 = param_7; local_c8 = param_8; } local_10 = *(long *)(in_FS_OFFSET + 0x28); local_158 = param_11; local_150 = param_12; local_148 = param_13; local_140 = param_14; local_78 = param_10; local_6c = param_9; if ((param_10 == (char *)0x0) || (*param_10 == '\0')) { local_68[0] = '\0'; } else { local_88 = local_168; local_90 = &stack0x00000008; local_94 = 0x30; local_98 = 0x10; vsnprintf(local_68,0x50,param_10,&local_98); } while (0 < local_6c) { local_6c = local_6c + -1; memset(local_b8,0,0x18); vemit_tap(1,0,local_b8); emit_dir(&DAT_00253ddc); emit_endl(); } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { local_6c = local_6c + -1; /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return; }
25,572
skip
eloqsql/unittest/mytap/tap.c
void skip(int how_many, char const * const fmt, ...) { char reason[80]; if (fmt && *fmt) { va_list ap; va_start(ap, fmt); vsnprintf(reason, sizeof(reason), fmt, ap); va_end(ap); } else reason[0] = '\0'; while (how_many-- > 0) { va_list ap; memset((char*) &ap, 0, sizeof(ap)); /* Keep compiler happy */ vemit_tap(1, NULL, ap); emit_dir("skip", reason); emit_endl(); } }
O3
c
skip: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x128, %rsp # imm = 0x128 movl %edi, %ebx movq %rdx, -0x140(%rbp) movq %rcx, -0x138(%rbp) movq %r8, -0x130(%rbp) movq %r9, -0x128(%rbp) testb %al, %al je 0x915ef movaps %xmm0, -0x120(%rbp) movaps %xmm1, -0x110(%rbp) movaps %xmm2, -0x100(%rbp) movaps %xmm3, -0xf0(%rbp) movaps %xmm4, -0xe0(%rbp) movaps %xmm5, -0xd0(%rbp) movaps %xmm6, -0xc0(%rbp) movaps %xmm7, -0xb0(%rbp) movq %fs:0x28, %rax movq %rax, -0x30(%rbp) testq %rsi, %rsi je 0x9164d movq %rsi, %r10 cmpb $0x0, (%rsi) je 0x9164d leaq -0x150(%rbp), %rax leaq -0xa0(%rbp), %r9 movq %rax, 0x10(%r9) leaq 0x10(%rbp), %rax movq %rax, 0x8(%r9) movabsq $0x3000000010, %rax # imm = 0x3000000010 movq %rax, (%r9) leaq -0x80(%rbp), %rdi movl $0x50, %esi movl $0x50, %ecx movl $0x1, %edx movq %r10, %r8 callq 0x291a0 jmp 0x91651 movb $0x0, -0x80(%rbp) testl %ebx, %ebx jle 0x916e1 incl %ebx movq 0x2f2946(%rip), %r15 # 0x383fa8 leaq 0x4a8fb(%rip), %r12 # 0xdbf64 leaq -0x80(%rbp), %r13 leaq 0x4e7a4(%rip), %r14 # 0xdfe18 xorps %xmm0, %xmm0 movaps %xmm0, -0xa0(%rbp) movq $0x0, -0x90(%rbp) movl $0x1, %edi xorl %esi, %esi leaq -0xa0(%rbp), %rdx callq 0x91435 movq (%r15), %rdi movl $0x1, %esi leaq 0x4a925(%rip), %rdx # 0xdbfd0 movq %r12, %rcx movq %r13, %r8 xorl %eax, %eax callq 0x29200 movq (%r15), %rdi callq 0x29400 movq (%r15), %rdi movl $0x1, %esi movq %r14, %rdx xorl %eax, %eax callq 0x29200 movq (%r15), %rdi callq 0x29400 decl %ebx cmpl $0x1, %ebx ja 0x91674 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x91702 addq $0x128, %rsp # imm = 0x128 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29270
skip: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 128h mov ebx, edi mov [rbp+var_140], rdx mov [rbp+var_138], rcx mov [rbp+var_130], r8 mov [rbp+var_128], r9 test al, al jz short loc_915EF movaps [rbp+var_120], xmm0 movaps [rbp+var_110], xmm1 movaps [rbp+var_100], xmm2 movaps [rbp+var_F0], xmm3 movaps [rbp+var_E0], xmm4 movaps [rbp+var_D0], xmm5 movaps [rbp+var_C0], xmm6 movaps [rbp+var_B0], xmm7 loc_915EF: mov rax, fs:28h mov [rbp+var_30], rax test rsi, rsi jz short loc_9164D mov r10, rsi cmp byte ptr [rsi], 0 jz short loc_9164D lea rax, [rbp+var_150] lea r9, [rbp+var_A0] mov [r9+10h], rax lea rax, [rbp+arg_0] mov [r9+8], rax mov rax, 3000000010h mov [r9], rax lea rdi, [rbp+var_80] mov esi, 50h ; 'P' mov ecx, 50h ; 'P' mov edx, 1 mov r8, r10 call ___vsnprintf_chk jmp short loc_91651 loc_9164D: mov [rbp+var_80], 0 loc_91651: test ebx, ebx jle loc_916E1 inc ebx mov r15, cs:stdout_ptr lea r12, aSkip; "skip" lea r13, [rbp+var_80] lea r14, asc_DFE15+3; "\n" loc_91674: xorps xmm0, xmm0 movaps [rbp+var_A0], xmm0 mov [rbp+var_90], 0 mov edi, 1 xor esi, esi lea rdx, [rbp+var_A0] call vemit_tap mov rdi, [r15] mov esi, 1 lea rdx, aSS; " # %s %s" mov rcx, r12 mov r8, r13 xor eax, eax call ___fprintf_chk mov rdi, [r15] call _fflush mov rdi, [r15] mov esi, 1 mov rdx, r14 xor eax, eax call ___fprintf_chk mov rdi, [r15] call _fflush dec ebx cmp ebx, 1 ja short loc_91674 loc_916E1: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_91702 add rsp, 128h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_91702: call ___stack_chk_fail
unsigned long long skip(int a1, _BYTE *a2, ...) { unsigned int v2; // ebx va_list va; // [rsp+B0h] [rbp-A0h] BYREF char v5[80]; // [rsp+D0h] [rbp-80h] BYREF unsigned long long v6; // [rsp+120h] [rbp-30h] v6 = __readfsqword(0x28u); if ( a2 && *a2 ) { va_start(va, a2); __vsnprintf_chk(v5, 80LL, 1LL, 80LL, a2, va); } else { v5[0] = 0; } if ( a1 > 0 ) { v2 = a1 + 1; do { memset(va, 0, sizeof(va)); vemit_tap(1, 0LL, (long long)va); __fprintf_chk(stdout, 1LL, " # %s %s", "skip", v5); fflush(stdout); __fprintf_chk(stdout, 1LL, "\n"); fflush(stdout); --v2; } while ( v2 > 1 ); } return __readfsqword(0x28u); }
skip: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x128 MOV EBX,EDI MOV qword ptr [RBP + -0x140],RDX MOV qword ptr [RBP + -0x138],RCX MOV qword ptr [RBP + -0x130],R8 MOV qword ptr [RBP + -0x128],R9 TEST AL,AL JZ 0x001915ef MOVAPS xmmword ptr [RBP + -0x120],XMM0 MOVAPS xmmword ptr [RBP + -0x110],XMM1 MOVAPS xmmword ptr [RBP + -0x100],XMM2 MOVAPS xmmword ptr [RBP + -0xf0],XMM3 MOVAPS xmmword ptr [RBP + -0xe0],XMM4 MOVAPS xmmword ptr [RBP + -0xd0],XMM5 MOVAPS xmmword ptr [RBP + -0xc0],XMM6 MOVAPS xmmword ptr [RBP + -0xb0],XMM7 LAB_001915ef: MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX TEST RSI,RSI JZ 0x0019164d MOV R10,RSI CMP byte ptr [RSI],0x0 JZ 0x0019164d LEA RAX,[RBP + -0x150] LEA R9,[RBP + -0xa0] MOV qword ptr [R9 + 0x10],RAX LEA RAX,[RBP + 0x10] MOV qword ptr [R9 + 0x8],RAX MOV RAX,0x3000000010 MOV qword ptr [R9],RAX LEA RDI,[RBP + -0x80] MOV ESI,0x50 MOV ECX,0x50 MOV EDX,0x1 MOV R8,R10 CALL 0x001291a0 JMP 0x00191651 LAB_0019164d: MOV byte ptr [RBP + -0x80],0x0 LAB_00191651: TEST EBX,EBX JLE 0x001916e1 INC EBX MOV R15,qword ptr [0x00483fa8] LEA R12,[0x1dbf64] LEA R13,[RBP + -0x80] LEA R14,[0x1dfe18] LAB_00191674: XORPS XMM0,XMM0 MOVAPS xmmword ptr [RBP + -0xa0],XMM0 MOV qword ptr [RBP + -0x90],0x0 MOV EDI,0x1 XOR ESI,ESI LEA RDX,[RBP + -0xa0] CALL 0x00191435 MOV RDI,qword ptr [R15] MOV ESI,0x1 LEA RDX,[0x1dbfd0] MOV RCX,R12 MOV R8,R13 XOR EAX,EAX CALL 0x00129200 MOV RDI,qword ptr [R15] CALL 0x00129400 MOV RDI,qword ptr [R15] MOV ESI,0x1 MOV RDX,R14 XOR EAX,EAX CALL 0x00129200 MOV RDI,qword ptr [R15] CALL 0x00129400 DEC EBX CMP EBX,0x1 JA 0x00191674 LAB_001916e1: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00191702 ADD RSP,0x128 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00191702: CALL 0x00129270
void skip(int4 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8,int param_9, char *param_10,int8 param_11,int8 param_12,int8 param_13, int8 param_14) { int *puVar1; char in_AL; uint uVar2; long in_FS_OFFSET; int1 local_158 [16]; int8 local_148; int8 local_140; int8 local_138; int8 local_130; int4 local_128; int8 local_118; int8 local_108; int8 local_f8; int8 local_e8; int8 local_d8; int8 local_c8; int8 local_b8; int8 local_a8; int1 *puStack_a0; int1 *local_98; int1 local_88 [80]; long local_38; if (in_AL != '\0') { local_128 = param_1; local_118 = param_2; local_108 = param_3; local_f8 = param_4; local_e8 = param_5; local_d8 = param_6; local_c8 = param_7; local_b8 = param_8; } local_38 = *(long *)(in_FS_OFFSET + 0x28); local_148 = param_11; local_140 = param_12; local_138 = param_13; local_130 = param_14; if ((param_10 == (char *)0x0) || (*param_10 == '\0')) { local_88[0] = 0; } else { local_98 = local_158; puStack_a0 = &stack0x00000008; local_a8 = 0x3000000010; __vsnprintf_chk(local_88,0x50,1,0x50,param_10); } puVar1 = PTR_stdout_00483fa8; if (0 < param_9) { uVar2 = param_9 + 1; do { local_a8 = 0; puStack_a0 = (int1 *)0x0; local_98 = (int1 *)0x0; vemit_tap(1,0,&local_a8); __fprintf_chk(*(int8 *)puVar1,1," # %s %s",&DAT_001dbf64,local_88); fflush(*(FILE **)puVar1); __fprintf_chk(*(int8 *)puVar1,1,&DAT_001dfe18); fflush(*(FILE **)puVar1); uVar2 = uVar2 - 1; } while (1 < uVar2); } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
25,573
strmake
eloqsql/strings/strmake.c
char *strmake(register char *dst, register const char *src, size_t length) { while (length--) { if (! (*dst++ = *src++)) { #ifdef EXTRA_DEBUG /* 'length' is the maximum length of the string; the buffer needs to be one character larger to accommodate the terminating '\0'. This is easy to get wrong, so we make sure we write to the entire length of the buffer to identify incorrect buffer-sizes. We only initialism the "unused" part of the buffer here, a) for efficiency, and b) because dst==src is allowed, so initializing the entire buffer would overwrite the source-string. Also, we write a character rather than '\0' as this makes spotting these problems in the results easier. If we are using purify/valgrind, we only set one character at end to be able to detect also wrong accesses after the end of dst. */ if (length) { #ifdef HAVE_valgrind dst[length-1]= 'Z'; #else bfill(dst, length-1, (int) 'Z'); #endif /* HAVE_valgrind */ } #endif /* EXTRA_DEBUG */ return dst-1; } } *dst=0; return dst; }
O3
c
strmake: pushq %rbp movq %rsp, %rbp movq %rdi, %rax xorl %edi, %edi movq %rdi, %rcx cmpq %rdi, %rdx je 0xd6d4c movb (%rsi,%rcx), %r8b movb %r8b, (%rax,%rcx) leaq 0x1(%rcx), %rdi testb %r8b, %r8b jne 0xd6d31 jmp 0xd6d50 movb $0x0, (%rax,%rcx) addq %rcx, %rax popq %rbp retq nopl (%rax)
strmake: push rbp mov rbp, rsp mov rax, rdi xor edi, edi loc_D6D31: mov rcx, rdi cmp rdx, rdi jz short loc_D6D4C mov r8b, [rsi+rcx] mov [rax+rcx], r8b lea rdi, [rcx+1] test r8b, r8b jnz short loc_D6D31 jmp short loc_D6D50 loc_D6D4C: mov byte ptr [rax+rcx], 0 loc_D6D50: add rax, rcx pop rbp retn
long long strmake(long long a1, long long a2, long long a3) { long long v4; // rdi long long v5; // rcx char v6; // r8 v4 = 0LL; while ( 1 ) { v5 = v4; if ( a3 == v4 ) break; v6 = *(_BYTE *)(a2 + v4); *(_BYTE *)(a1 + v4++) = v6; if ( !v6 ) return v5 + a1; } *(_BYTE *)(a1 + v4) = 0; return v5 + a1; }
strmake: PUSH RBP MOV RBP,RSP MOV RAX,RDI XOR EDI,EDI LAB_001d6d31: MOV RCX,RDI CMP RDX,RDI JZ 0x001d6d4c MOV R8B,byte ptr [RSI + RCX*0x1] MOV byte ptr [RAX + RCX*0x1],R8B LEA RDI,[RCX + 0x1] TEST R8B,R8B JNZ 0x001d6d31 JMP 0x001d6d50 LAB_001d6d4c: MOV byte ptr [RAX + RCX*0x1],0x0 LAB_001d6d50: ADD RAX,RCX POP RBP RET
long strmake(long param_1,long param_2,long param_3) { char cVar1; long lVar2; long lVar3; lVar2 = 0; do { lVar3 = lVar2; if (param_3 == lVar3) { *(int1 *)(param_1 + lVar3) = 0; break; } cVar1 = *(char *)(param_2 + lVar3); *(char *)(param_1 + lVar3) = cVar1; lVar2 = lVar3 + 1; } while (cVar1 != '\0'); return param_1 + lVar3; }
25,574
JS_EvalFunctionInternal
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_EvalFunctionInternal(JSContext *ctx, JSValue fun_obj, JSValue this_obj, JSVarRef **var_refs, JSStackFrame *sf) { JSValue ret_val; uint32_t tag; tag = JS_VALUE_GET_TAG(fun_obj); if (tag == JS_TAG_FUNCTION_BYTECODE) { fun_obj = js_closure(ctx, fun_obj, var_refs, sf); ret_val = JS_CallFree(ctx, fun_obj, this_obj, 0, NULL); } else if (tag == JS_TAG_MODULE) { JSModuleDef *m; m = JS_VALUE_GET_PTR(fun_obj); /* the module refcount should be >= 2 */ JS_FreeValue(ctx, fun_obj); if (js_create_module_function(ctx, m) < 0) goto fail; if (js_link_module(ctx, m) < 0) goto fail; ret_val = js_evaluate_module(ctx, m); if (JS_IsException(ret_val)) { fail: return JS_EXCEPTION; } } else { JS_FreeValue(ctx, fun_obj); ret_val = JS_ThrowTypeError(ctx, "bytecode function expected"); } return ret_val; }
O0
c
JS_EvalFunctionInternal: subq $0xa8, %rsp movq 0xb0(%rsp), %rax movq %rsi, 0x88(%rsp) movq %rdx, 0x90(%rsp) movq %rcx, 0x78(%rsp) movq %r8, 0x80(%rsp) movq %rdi, 0x70(%rsp) movq %r9, 0x68(%rsp) movq 0x90(%rsp), %rax movl %eax, 0x54(%rsp) cmpl $-0x2, 0x54(%rsp) jne 0x4aa6f movq 0x70(%rsp), %rdi movq 0x68(%rsp), %rcx movq 0xb0(%rsp), %r8 movq 0x88(%rsp), %rsi movq 0x90(%rsp), %rdx callq 0x64010 movq %rax, 0x40(%rsp) movq %rdx, 0x48(%rsp) movq 0x40(%rsp), %rax movq %rax, 0x88(%rsp) movq 0x48(%rsp), %rax movq %rax, 0x90(%rsp) movq 0x70(%rsp), %rdi movq 0x88(%rsp), %rsi movq 0x90(%rsp), %rdx movq 0x78(%rsp), %rcx movq 0x80(%rsp), %r8 xorl %r9d, %r9d xorl %eax, %eax movq $0x0, (%rsp) callq 0x2e280 movq %rax, 0x30(%rsp) movq %rdx, 0x38(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x58(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x60(%rsp) jmp 0x4ab78 cmpl $-0x3, 0x54(%rsp) jne 0x4ab2b movq 0x88(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x70(%rsp), %rdi movq 0x88(%rsp), %rsi movq 0x90(%rsp), %rdx callq 0x23c90 movq 0x70(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x752f0 cmpl $0x0, %eax jge 0x4aab7 jmp 0x4ab10 movq 0x70(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x75480 cmpl $0x0, %eax jge 0x4aacd jmp 0x4ab10 movq 0x70(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x75510 movq %rax, 0x18(%rsp) movq %rdx, 0x20(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x58(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x60(%rsp) movq 0x58(%rsp), %rdi movq 0x60(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0x4ab29 jmp 0x4ab10 movl $0x0, 0x98(%rsp) movq $0x6, 0xa0(%rsp) jmp 0x4ab92 jmp 0x4ab76 movq 0x70(%rsp), %rdi movq 0x88(%rsp), %rsi movq 0x90(%rsp), %rdx callq 0x23c90 movq 0x70(%rsp), %rdi leaq 0xc3d10(%rip), %rsi # 0x10e861 movb $0x0, %al callq 0x2d300 movq %rax, 0x8(%rsp) movq %rdx, 0x10(%rsp) movq 0x8(%rsp), %rax movq %rax, 0x58(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x60(%rsp) jmp 0x4ab78 movq 0x58(%rsp), %rax movq %rax, 0x98(%rsp) movq 0x60(%rsp), %rax movq %rax, 0xa0(%rsp) movq 0x98(%rsp), %rax movq 0xa0(%rsp), %rdx addq $0xa8, %rsp retq nopw (%rax,%rax)
JS_EvalFunctionInternal: sub rsp, 0A8h mov rax, [rsp+0A8h+arg_0] mov [rsp+0A8h+var_20], rsi mov [rsp+0A8h+var_18], rdx mov [rsp+0A8h+var_30], rcx mov [rsp+0A8h+var_28], r8 mov [rsp+0A8h+var_38], rdi mov [rsp+0A8h+var_40], r9 mov rax, [rsp+0A8h+var_18] mov [rsp+0A8h+var_54], eax cmp [rsp+0A8h+var_54], 0FFFFFFFEh jnz loc_4AA6F mov rdi, [rsp+0A8h+var_38] mov rcx, [rsp+0A8h+var_40] mov r8, [rsp+0A8h+arg_0] mov rsi, [rsp+0A8h+var_20] mov rdx, [rsp+0A8h+var_18] call js_closure mov [rsp+0A8h+var_68], rax mov [rsp+0A8h+var_60], rdx mov rax, [rsp+0A8h+var_68] mov [rsp+0A8h+var_20], rax mov rax, [rsp+0A8h+var_60] mov [rsp+0A8h+var_18], rax mov rdi, [rsp+0A8h+var_38] mov rsi, [rsp+0A8h+var_20] mov rdx, [rsp+0A8h+var_18] mov rcx, [rsp+0A8h+var_30] mov r8, [rsp+0A8h+var_28] xor r9d, r9d xor eax, eax mov [rsp+0A8h+var_A8], 0 call JS_CallFree mov [rsp+0A8h+var_78], rax mov [rsp+0A8h+var_70], rdx mov rax, [rsp+0A8h+var_78] mov [rsp+0A8h+var_50], rax mov rax, [rsp+0A8h+var_70] mov [rsp+0A8h+var_48], rax jmp loc_4AB78 loc_4AA6F: cmp [rsp+0A8h+var_54], 0FFFFFFFDh jnz loc_4AB2B mov rax, [rsp+0A8h+var_20] mov [rsp+0A8h+var_80], rax mov rdi, [rsp+0A8h+var_38] mov rsi, [rsp+0A8h+var_20] mov rdx, [rsp+0A8h+var_18] call JS_FreeValue mov rdi, [rsp+0A8h+var_38] mov rsi, [rsp+0A8h+var_80] call js_create_module_function cmp eax, 0 jge short loc_4AAB7 jmp short loc_4AB10 loc_4AAB7: mov rdi, [rsp+0A8h+var_38] mov rsi, [rsp+0A8h+var_80] call js_link_module cmp eax, 0 jge short loc_4AACD jmp short loc_4AB10 loc_4AACD: mov rdi, [rsp+0A8h+var_38] mov rsi, [rsp+0A8h+var_80] call js_evaluate_module mov [rsp+0A8h+var_90], rax mov [rsp+0A8h+var_88], rdx mov rax, [rsp+0A8h+var_90] mov [rsp+0A8h+var_50], rax mov rax, [rsp+0A8h+var_88] mov [rsp+0A8h+var_48], rax mov rdi, [rsp+0A8h+var_50] mov rsi, [rsp+0A8h+var_48] call JS_IsException_1 cmp eax, 0 jz short loc_4AB29 jmp short $+2 loc_4AB10: mov dword ptr [rsp+0A8h+var_10], 0 mov [rsp+0A8h+var_8], 6 jmp short loc_4AB92 loc_4AB29: jmp short loc_4AB76 loc_4AB2B: mov rdi, [rsp+0A8h+var_38] mov rsi, [rsp+0A8h+var_20] mov rdx, [rsp+0A8h+var_18] call JS_FreeValue mov rdi, [rsp+0A8h+var_38] lea rsi, aBytecodeFuncti_0; "bytecode function expected" mov al, 0 call JS_ThrowTypeError mov [rsp+0A8h+var_A0], rax mov [rsp+0A8h+var_98], rdx mov rax, [rsp+0A8h+var_A0] mov [rsp+0A8h+var_50], rax mov rax, [rsp+0A8h+var_98] mov [rsp+0A8h+var_48], rax loc_4AB76: jmp short $+2 loc_4AB78: mov rax, [rsp+0A8h+var_50] mov [rsp+0A8h+var_10], rax mov rax, [rsp+0A8h+var_48] mov [rsp+0A8h+var_8], rax loc_4AB92: mov rax, [rsp+0A8h+var_10] mov rdx, [rsp+0A8h+var_8] add rsp, 0A8h retn
long long JS_EvalFunctionInternal( long long a1, long long a2, long long a3, int a4, int a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14, long long a15) { long long v15; // rdx int v16; // edx long long v17; // rdx long long v18; // rcx long long v19; // r8 long long v20; // r9 __m128 v21; // xmm4 __m128 v22; // xmm5 char v24; // [rsp+0h] [rbp-A8h] long long v25; // [rsp+40h] [rbp-68h] long long v26; // [rsp+58h] [rbp-50h] long long v29; // [rsp+98h] [rbp-10h] if ( (_DWORD)a3 == -2 ) { v25 = js_closure(a1, a2, a3, a6, a15, *(double *)a7.m128_u64); return JS_CallFree(a1, v25, v15, a4, a5, 0, 0LL); } if ( (_DWORD)a3 != -3 ) { JS_FreeValue(a1, a2, a3); return JS_ThrowTypeError( a1, (long long)"bytecode function expected", v17, v18, v19, v20, a7, a8, a9, a10, v21, v22, a13, a14, v24); } JS_FreeValue(a1, a2, a3); if ( (int)js_create_module_function(a1, a2) >= 0 && (int)js_link_module(a1, a2) >= 0 ) { v26 = js_evaluate_module(a1, a2); if ( !JS_IsException_1(v26, v16) ) return v26; } LODWORD(v29) = 0; return v29; }
JS_EvalFunctionInternal: SUB RSP,0xa8 MOV RAX,qword ptr [RSP + 0xb0] MOV qword ptr [RSP + 0x88],RSI MOV qword ptr [RSP + 0x90],RDX MOV qword ptr [RSP + 0x78],RCX MOV qword ptr [RSP + 0x80],R8 MOV qword ptr [RSP + 0x70],RDI MOV qword ptr [RSP + 0x68],R9 MOV RAX,qword ptr [RSP + 0x90] MOV dword ptr [RSP + 0x54],EAX CMP dword ptr [RSP + 0x54],-0x2 JNZ 0x0014aa6f MOV RDI,qword ptr [RSP + 0x70] MOV RCX,qword ptr [RSP + 0x68] MOV R8,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0x88] MOV RDX,qword ptr [RSP + 0x90] CALL 0x00164010 MOV qword ptr [RSP + 0x40],RAX MOV qword ptr [RSP + 0x48],RDX MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x88],RAX MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x90],RAX MOV RDI,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RSP + 0x88] MOV RDX,qword ptr [RSP + 0x90] MOV RCX,qword ptr [RSP + 0x78] MOV R8,qword ptr [RSP + 0x80] XOR R9D,R9D XOR EAX,EAX MOV qword ptr [RSP],0x0 CALL 0x0012e280 MOV qword ptr [RSP + 0x30],RAX MOV qword ptr [RSP + 0x38],RDX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x60],RAX JMP 0x0014ab78 LAB_0014aa6f: CMP dword ptr [RSP + 0x54],-0x3 JNZ 0x0014ab2b MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RSP + 0x88] MOV RDX,qword ptr [RSP + 0x90] CALL 0x00123c90 MOV RDI,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RSP + 0x28] CALL 0x001752f0 CMP EAX,0x0 JGE 0x0014aab7 JMP 0x0014ab10 LAB_0014aab7: MOV RDI,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RSP + 0x28] CALL 0x00175480 CMP EAX,0x0 JGE 0x0014aacd JMP 0x0014ab10 LAB_0014aacd: MOV RDI,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RSP + 0x28] CALL 0x00175510 MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x20],RDX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x60],RAX MOV RDI,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x60] CALL 0x00123cc0 CMP EAX,0x0 JZ 0x0014ab29 JMP 0x0014ab10 LAB_0014ab10: MOV dword ptr [RSP + 0x98],0x0 MOV qword ptr [RSP + 0xa0],0x6 JMP 0x0014ab92 LAB_0014ab29: JMP 0x0014ab76 LAB_0014ab2b: MOV RDI,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RSP + 0x88] MOV RDX,qword ptr [RSP + 0x90] CALL 0x00123c90 MOV RDI,qword ptr [RSP + 0x70] LEA RSI,[0x20e861] MOV AL,0x0 CALL 0x0012d300 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],RDX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x60],RAX LAB_0014ab76: JMP 0x0014ab78 LAB_0014ab78: MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x98],RAX MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0xa0],RAX LAB_0014ab92: MOV RAX,qword ptr [RSP + 0x98] MOV RDX,qword ptr [RSP + 0xa0] ADD RSP,0xa8 RET
int1 [16] JS_EvalFunctionInternal (int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7) { int iVar1; int1 auVar2 [16]; int8 local_48; int4 local_10; int4 uStack_c; int8 local_8; if ((int)param_3 == -2) { auVar2 = js_closure(param_1,param_2,param_3,param_6,param_7); auVar2 = JS_CallFree(param_1,auVar2._0_8_,auVar2._8_8_,param_4,param_5,0,0); } else { if ((int)param_3 == -3) { JS_FreeValue(param_1,param_2,param_3); iVar1 = js_create_module_function(param_1,param_2); if ((-1 < iVar1) && (iVar1 = js_link_module(param_1,param_2), -1 < iVar1)) { auVar2 = js_evaluate_module(param_1,param_2); iVar1 = JS_IsException(auVar2._0_8_,auVar2._8_8_); if (iVar1 == 0) goto LAB_0014ab78; } local_10 = 0; local_8 = 6; goto LAB_0014ab92; } JS_FreeValue(param_1,param_2,param_3); auVar2 = JS_ThrowTypeError(param_1,"bytecode function expected"); } LAB_0014ab78: local_48 = auVar2._8_8_; local_10 = auVar2._0_4_; uStack_c = auVar2._4_4_; local_8 = local_48; LAB_0014ab92: auVar2._4_4_ = uStack_c; auVar2._0_4_ = local_10; auVar2._8_8_ = local_8; return auVar2; }
25,575
JS_EvalFunctionInternal
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_EvalFunctionInternal(JSContext *ctx, JSValue fun_obj, JSValue this_obj, JSVarRef **var_refs, JSStackFrame *sf) { JSValue ret_val; uint32_t tag; tag = JS_VALUE_GET_TAG(fun_obj); if (tag == JS_TAG_FUNCTION_BYTECODE) { fun_obj = js_closure(ctx, fun_obj, var_refs, sf); ret_val = JS_CallFree(ctx, fun_obj, this_obj, 0, NULL); } else if (tag == JS_TAG_MODULE) { JSModuleDef *m; m = JS_VALUE_GET_PTR(fun_obj); /* the module refcount should be >= 2 */ JS_FreeValue(ctx, fun_obj); if (js_create_module_function(ctx, m) < 0) goto fail; if (js_link_module(ctx, m) < 0) goto fail; ret_val = js_evaluate_module(ctx, m); if (JS_IsException(ret_val)) { fail: return JS_EXCEPTION; } } else { JS_FreeValue(ctx, fun_obj); ret_val = JS_ThrowTypeError(ctx, "bytecode function expected"); } return ret_val; }
O1
c
JS_EvalFunctionInternal: pushq %r15 pushq %r14 pushq %rbx subq $0x60, %rsp movq %rdi, %rbx movq %rsi, 0x30(%rsp) cmpl $-0x3, %edx je 0x31271 cmpl $-0x2, %edx jne 0x312cc movq %r8, %r14 movq %rcx, %r15 movq 0x80(%rsp), %r8 movq %rbx, %rdi movq %r9, %rcx callq 0x3efde movq %rax, 0x30(%rsp) movq $0x0, (%rsp) movq %rbx, %rdi movq %rax, %rsi movq %r15, %rcx movq %r14, %r8 xorl %r9d, %r9d callq 0x22c9d movq %rax, %r14 jmp 0x314f2 movq 0x30(%rsp), %r14 movq 0x18(%rbx), %rdi movq %r14, %rsi callq 0x1d8c6 movq %rbx, %rdi movq %r14, %rsi callq 0x4444b testl %eax, %eax js 0x313cb leaq 0x20(%rsp), %rdx movq $0x0, (%rdx) movq %rbx, %rdi movq %r14, %rsi xorl %ecx, %ecx callq 0x4461d testl %eax, %eax jns 0x312fb movq 0x20(%rsp), %rcx testq %rcx, %rcx je 0x312f3 movb $0x0, 0x83(%rcx) movq 0x90(%rcx), %rcx jmp 0x312b7 movq 0x18(%rbx), %rdi callq 0x1d8c6 leaq 0x6e521(%rip), %rsi # 0x9f7fd xorl %r14d, %r14d movq %rbx, %rdi xorl %eax, %eax callq 0x22567 movl $0x6, %edx jmp 0x314f2 testl %eax, %eax js 0x313cb movl $0xfe000000, %eax # imm = 0xFE000000 andl 0x80(%r14), %eax cmpl $0x4000000, %eax # imm = 0x4000000 jne 0x31315 movq 0xb8(%r14), %r14 movq 0xc8(%r14), %rax cmpl $0x3, %eax jne 0x313d2 leaq 0xd0(%r14), %rsi xorl %r15d, %r15d movl $0x3, %ecx movq %rbx, %rdi xorl %edx, %edx callq 0x362b6 movq %rax, 0xc0(%r14) movq %rdx, 0xc8(%r14) movl $0x6, %eax movl $0x0, %esi cmpl $0x6, %edx je 0x314d4 leaq 0x38(%rsp), %rcx movq $0x0, (%rcx) leaq 0x40(%rsp), %r8 movq %rbx, %rdi movq %r14, %rsi xorl %edx, %edx callq 0x44a7b testl %eax, %eax js 0x313de cmpl $0x0, 0xac(%r14) jne 0x314a8 xorl %eax, %eax leaq 0x50(%rsp), %rcx movl %eax, (%rcx) movl $0x3, %edi movq %rdi, 0x8(%rcx) movq 0xd0(%r14), %rsi movq 0xd8(%r14), %rdx movl %eax, 0x20(%rsp) movq %rdi, 0x28(%rsp) movups 0x20(%rsp), %xmm0 movups %xmm0, (%rsp) movq %rcx, 0x10(%rsp) jmp 0x3147e xorl %edx, %edx jmp 0x314e0 movq 0xc0(%r14), %r15 jmp 0x314b6 movq 0x38(%rsp), %rax testq %rax, %rax je 0x31432 movq 0x40(%rsp), %rcx movq 0x48(%rsp), %rdx movb $0x5, 0x83(%rax) movb $0x1, 0xf0(%rax) movq %rcx, 0x20(%rsp) cmpl $-0x9, %edx jb 0x31411 movq 0x20(%rsp), %rsi incl (%rsi) movq %rcx, 0xf8(%rax) movq %rdx, 0x100(%rax) movq %r14, 0xb8(%rax) movq 0x90(%rax), %rax testq %rax, %rax jne 0x313f2 movq %rax, 0x38(%rsp) movq 0x40(%rsp), %rsi movq 0x48(%rsp), %rdx movq 0x18(%rbx), %rdi callq 0x1d8c6 leaq 0xf8(%r14), %rax movq 0xe0(%r14), %rsi movq 0xe8(%r14), %rdx movl $0x0, 0x20(%rsp) movq $0x3, 0x28(%rsp) movups 0x20(%rsp), %xmm0 movups %xmm0, (%rsp) movq %rax, 0x10(%rsp) movl $0x2, 0x18(%rsp) movl $0x3, %r8d movq %rbx, %rdi xorl %ecx, %ecx movl $0x1, %r9d callq 0x284ca movq 0x18(%rbx), %rdi movq %rax, %rsi callq 0x1d8c6 movq 0xc0(%r14), %r15 movq 0xc8(%r14), %rax movq %r15, 0x20(%rsp) cmpl $-0x9, %eax jb 0x314c7 movq 0x20(%rsp), %rcx incl (%rcx) movabsq $-0x100000000, %rsi # imm = 0xFFFFFFFF00000000 andq %r15, %rsi movl %r15d, %ecx orq %rsi, %rcx cmpl $0x6, %eax setne %dl xorl %r14d, %r14d testb %dl, %dl movl $0x6, %edx cmovneq %rax, %rdx cmovneq %rcx, %r14 movq %r14, %rax addq $0x60, %rsp popq %rbx popq %r14 popq %r15 retq
JS_EvalFunctionInternal: push r15 push r14 push rbx sub rsp, 60h mov rbx, rdi mov [rsp+78h+var_48], rsi cmp edx, 0FFFFFFFDh jz short loc_31271 cmp edx, 0FFFFFFFEh jnz loc_312CC mov r14, r8 mov r15, rcx mov r8, [rsp+78h+arg_0] mov rdi, rbx mov rcx, r9 call js_closure mov [rsp+78h+var_48], rax mov qword ptr [rsp+78h+var_78], 0 mov rdi, rbx mov rsi, rax mov rcx, r15 mov r8, r14 xor r9d, r9d call JS_CallFree mov r14, rax jmp loc_314F2 loc_31271: mov r14, [rsp+78h+var_48] mov rdi, [rbx+18h] mov rsi, r14 call JS_FreeValueRT mov rdi, rbx mov rsi, r14 call js_create_module_function test eax, eax js loc_313CB lea rdx, [rsp+78h+var_58] mov qword ptr [rdx], 0 mov rdi, rbx mov rsi, r14 xor ecx, ecx call js_inner_module_linking test eax, eax jns short loc_312FB mov rcx, qword ptr [rsp+78h+var_58] loc_312B7: test rcx, rcx jz short loc_312F3 mov byte ptr [rcx+83h], 0 mov rcx, [rcx+90h] jmp short loc_312B7 loc_312CC: mov rdi, [rbx+18h] call JS_FreeValueRT lea rsi, aBytecodeFuncti_0; "bytecode function expected" xor r14d, r14d mov rdi, rbx xor eax, eax call JS_ThrowTypeError mov edx, 6 jmp loc_314F2 loc_312F3: test eax, eax js loc_313CB loc_312FB: mov eax, 0FE000000h and eax, [r14+80h] cmp eax, 4000000h jnz short loc_31315 mov r14, [r14+0B8h] loc_31315: mov rax, [r14+0C8h] cmp eax, 3 jnz loc_313D2 lea rsi, [r14+0D0h] xor r15d, r15d mov ecx, 3 mov rdi, rbx xor edx, edx call js_new_promise_capability mov [r14+0C0h], rax mov [r14+0C8h], rdx mov eax, 6 mov esi, 0 cmp edx, 6 jz loc_314D4 lea rcx, [rsp+78h+var_40] mov qword ptr [rcx], 0 lea r8, [rsp+78h+var_38] mov rdi, rbx mov rsi, r14 xor edx, edx call js_inner_module_evaluation test eax, eax js short loc_313DE cmp dword ptr [r14+0ACh], 0 jnz loc_314A8 xor eax, eax lea rcx, [rsp+78h+var_28] mov [rcx], eax mov edi, 3 mov [rcx+8], rdi mov rsi, [r14+0D0h] mov rdx, [r14+0D8h] mov dword ptr [rsp+78h+var_58], eax mov qword ptr [rsp+78h+var_58+8], rdi movups xmm0, [rsp+78h+var_58] movups [rsp+78h+var_78], xmm0 mov [rsp+78h+var_68], rcx jmp loc_3147E loc_313CB: xor edx, edx jmp loc_314E0 loc_313D2: mov r15, [r14+0C0h] jmp loc_314B6 loc_313DE: mov rax, [rsp+78h+var_40] test rax, rax jz short loc_31432 mov rcx, [rsp+78h+var_38] mov rdx, [rsp+78h+var_30] loc_313F2: mov byte ptr [rax+83h], 5 mov byte ptr [rax+0F0h], 1 mov qword ptr [rsp+78h+var_58], rcx cmp edx, 0FFFFFFF7h jb short loc_31411 mov rsi, qword ptr [rsp+78h+var_58] inc dword ptr [rsi] loc_31411: mov [rax+0F8h], rcx mov [rax+100h], rdx mov [rax+0B8h], r14 mov rax, [rax+90h] test rax, rax jnz short loc_313F2 loc_31432: mov [rsp+78h+var_40], rax mov rsi, [rsp+78h+var_38] mov rdx, [rsp+78h+var_30] mov rdi, [rbx+18h] call JS_FreeValueRT lea rax, [r14+0F8h] mov rsi, [r14+0E0h] mov rdx, [r14+0E8h] mov dword ptr [rsp+78h+var_58], 0 mov qword ptr [rsp+78h+var_58+8], 3 movups xmm0, [rsp+78h+var_58] movups [rsp+78h+var_78], xmm0 mov [rsp+78h+var_68], rax loc_3147E: mov [rsp+78h+var_60], 2 mov r8d, 3 mov rdi, rbx xor ecx, ecx mov r9d, 1 call JS_CallInternal mov rdi, [rbx+18h] mov rsi, rax call JS_FreeValueRT loc_314A8: mov r15, [r14+0C0h] mov rax, [r14+0C8h] loc_314B6: mov qword ptr [rsp+78h+var_58], r15 cmp eax, 0FFFFFFF7h jb short loc_314C7 mov rcx, qword ptr [rsp+78h+var_58] inc dword ptr [rcx] loc_314C7: mov rsi, 0FFFFFFFF00000000h and rsi, r15 loc_314D4: mov ecx, r15d or rcx, rsi cmp eax, 6 setnz dl loc_314E0: xor r14d, r14d test dl, dl mov edx, 6 cmovnz rdx, rax cmovnz r14, rcx loc_314F2: mov rax, r14 add rsp, 60h pop rbx pop r14 pop r15 retn
long long JS_EvalFunctionInternal( long long a1, _DWORD *a2, long long a3, int a4, int a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14, long long a15) { long long v17; // rdx long long v18; // r14 _DWORD *v19; // r14 unsigned long long i; // rcx long long v21; // rdx long long v22; // rcx long long v23; // r8 long long v24; // r9 __m128 v25; // xmm4 __m128 v26; // xmm5 long long v27; // rax unsigned long long v28; // r15 long long v29; // rdx unsigned long long v30; // rsi __m128 v31; // xmm4 __m128 v32; // xmm5 long long v33; // rsi long long v34; // rdx _DWORD *v35; // rax long long v36; // rdx bool v37; // dl long long v38; // rax _DWORD *v39; // rcx long long v40; // rdx long long v41; // rsi long long v42; // rdx __m128 v43; // xmm4 __m128 v44; // xmm5 char v46; // [rsp+0h] [rbp-78h] __m128 v47; // [rsp+20h] [rbp-58h] BYREF _DWORD *v48; // [rsp+30h] [rbp-48h] long long v49; // [rsp+38h] [rbp-40h] BYREF _DWORD *v50; // [rsp+40h] [rbp-38h] BYREF long long v51; // [rsp+48h] [rbp-30h] int v52; // [rsp+50h] [rbp-28h] BYREF long long v53; // [rsp+58h] [rbp-20h] v48 = a2; if ( (_DWORD)a3 != -3 ) { if ( (_DWORD)a3 == -2 ) { v48 = (_DWORD *)js_closure(a1, a2, a3, a6, a15); return JS_CallFree(a1, v48, v17, a4, a5, 0, 0LL); } else { JS_FreeValueRT(*(_QWORD *)(a1 + 24), a2, a3); v18 = 0LL; JS_ThrowTypeError( a1, (long long)"bytecode function expected", v21, v22, v23, v24, a7, a8, a9, a10, v25, v26, a13, a14, v46); } return v18; } v19 = v48; JS_FreeValueRT(*(_QWORD *)(a1 + 24), v48, a3); if ( (int)js_create_module_function(a1, v48) < 0 ) goto LABEL_18; v47.m128_u64[0] = 0LL; if ( (int)js_inner_module_linking(a1, v48, &v47, 0LL) < 0 ) { for ( i = v47.m128_u64[0]; i; i = *(_QWORD *)(i + 144) ) *(_BYTE *)(i + 131) = 0; LABEL_18: v37 = 0; goto LABEL_32; } if ( (v19[32] & 0xFE000000) == 0x4000000 ) v19 = (_DWORD *)*((_QWORD *)v19 + 23); v27 = *((_QWORD *)v19 + 25); if ( (_DWORD)v27 != 3 ) { v28 = *((_QWORD *)v19 + 24); LABEL_28: v47.m128_u64[0] = v28; if ( (unsigned int)v27 >= 0xFFFFFFF7 ) ++*(_DWORD *)v47.m128_u64[0]; v30 = v28 & 0xFFFFFFFF00000000LL; goto LABEL_31; } LODWORD(v28) = 0; *((_QWORD *)v19 + 24) = js_new_promise_capability(a1, v19 + 52, 0LL); *((_QWORD *)v19 + 25) = v29; LODWORD(v27) = 6; v30 = 0LL; if ( (_DWORD)v29 != 6 ) { v49 = 0LL; if ( (int)js_inner_module_evaluation(a1, v19, 0LL, &v49, &v50) < 0 ) { v38 = v49; if ( v49 ) { v39 = v50; v40 = v51; do { *(_BYTE *)(v38 + 131) = 5; *(_BYTE *)(v38 + 240) = 1; v47.m128_u64[0] = (unsigned long long)v39; if ( (unsigned int)v40 >= 0xFFFFFFF7 ) ++*(_DWORD *)v47.m128_u64[0]; *(_QWORD *)(v38 + 248) = v39; *(_QWORD *)(v38 + 256) = v40; *(_QWORD *)(v38 + 184) = v19; v38 = *(_QWORD *)(v38 + 144); } while ( v38 ); } v49 = v38; JS_FreeValueRT(*(_QWORD *)(a1 + 24), v50, v51); v41 = *((_QWORD *)v19 + 28); v42 = *((_QWORD *)v19 + 29); v47.m128_i32[0] = 0; v47.m128_u64[1] = 3LL; v35 = (_DWORD *)JS_CallInternal( a1, v41, v42, 0LL, 3LL, 1LL, v47, a8, a9, a10, v43, v44, a13, a14, 0, 3, (long long)(v19 + 62), 2u); } else { if ( v19[43] ) { LABEL_27: v28 = *((_QWORD *)v19 + 24); v27 = *((_QWORD *)v19 + 25); goto LABEL_28; } v52 = 0; v53 = 3LL; v33 = *((_QWORD *)v19 + 26); v34 = *((_QWORD *)v19 + 27); v47.m128_i32[0] = 0; v47.m128_u64[1] = 3LL; v35 = (_DWORD *)JS_CallInternal( a1, v33, v34, 0LL, 3LL, 1LL, v47, a8, a9, a10, v31, v32, a13, a14, 0, 3, (long long)&v52, 2u); } JS_FreeValueRT(*(_QWORD *)(a1 + 24), v35, v36); goto LABEL_27; } LABEL_31: i = v30 | (unsigned int)v28; v37 = (_DWORD)v27 != 6; LABEL_32: v18 = 0LL; if ( v37 ) return i; return v18; }
JS_EvalFunctionInternal: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x60 MOV RBX,RDI MOV qword ptr [RSP + 0x30],RSI CMP EDX,-0x3 JZ 0x00131271 CMP EDX,-0x2 JNZ 0x001312cc MOV R14,R8 MOV R15,RCX MOV R8,qword ptr [RSP + 0x80] MOV RDI,RBX MOV RCX,R9 CALL 0x0013efde MOV qword ptr [RSP + 0x30],RAX MOV qword ptr [RSP],0x0 MOV RDI,RBX MOV RSI,RAX MOV RCX,R15 MOV R8,R14 XOR R9D,R9D CALL 0x00122c9d MOV R14,RAX JMP 0x001314f2 LAB_00131271: MOV R14,qword ptr [RSP + 0x30] MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R14 CALL 0x0011d8c6 MOV RDI,RBX MOV RSI,R14 CALL 0x0014444b TEST EAX,EAX JS 0x001313cb LEA RDX,[RSP + 0x20] MOV qword ptr [RDX],0x0 MOV RDI,RBX MOV RSI,R14 XOR ECX,ECX CALL 0x0014461d TEST EAX,EAX JNS 0x001312fb MOV RCX,qword ptr [RSP + 0x20] LAB_001312b7: TEST RCX,RCX JZ 0x001312f3 MOV byte ptr [RCX + 0x83],0x0 MOV RCX,qword ptr [RCX + 0x90] JMP 0x001312b7 LAB_001312cc: MOV RDI,qword ptr [RBX + 0x18] CALL 0x0011d8c6 LEA RSI,[0x19f7fd] XOR R14D,R14D MOV RDI,RBX XOR EAX,EAX CALL 0x00122567 MOV EDX,0x6 JMP 0x001314f2 LAB_001312f3: TEST EAX,EAX JS 0x001313cb LAB_001312fb: MOV EAX,0xfe000000 AND EAX,dword ptr [R14 + 0x80] CMP EAX,0x4000000 JNZ 0x00131315 MOV R14,qword ptr [R14 + 0xb8] LAB_00131315: MOV RAX,qword ptr [R14 + 0xc8] CMP EAX,0x3 JNZ 0x001313d2 LEA RSI,[R14 + 0xd0] XOR R15D,R15D MOV ECX,0x3 MOV RDI,RBX XOR EDX,EDX CALL 0x001362b6 MOV qword ptr [R14 + 0xc0],RAX MOV qword ptr [R14 + 0xc8],RDX MOV EAX,0x6 MOV ESI,0x0 CMP EDX,0x6 JZ 0x001314d4 LEA RCX,[RSP + 0x38] MOV qword ptr [RCX],0x0 LEA R8,[RSP + 0x40] MOV RDI,RBX MOV RSI,R14 XOR EDX,EDX CALL 0x00144a7b TEST EAX,EAX JS 0x001313de CMP dword ptr [R14 + 0xac],0x0 JNZ 0x001314a8 XOR EAX,EAX LEA RCX,[RSP + 0x50] MOV dword ptr [RCX],EAX MOV EDI,0x3 MOV qword ptr [RCX + 0x8],RDI MOV RSI,qword ptr [R14 + 0xd0] MOV RDX,qword ptr [R14 + 0xd8] MOV dword ptr [RSP + 0x20],EAX MOV qword ptr [RSP + 0x28],RDI MOVUPS XMM0,xmmword ptr [RSP + 0x20] MOVUPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x10],RCX JMP 0x0013147e LAB_001313cb: XOR EDX,EDX JMP 0x001314e0 LAB_001313d2: MOV R15,qword ptr [R14 + 0xc0] JMP 0x001314b6 LAB_001313de: MOV RAX,qword ptr [RSP + 0x38] TEST RAX,RAX JZ 0x00131432 MOV RCX,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x48] LAB_001313f2: MOV byte ptr [RAX + 0x83],0x5 MOV byte ptr [RAX + 0xf0],0x1 MOV qword ptr [RSP + 0x20],RCX CMP EDX,-0x9 JC 0x00131411 MOV RSI,qword ptr [RSP + 0x20] INC dword ptr [RSI] LAB_00131411: MOV qword ptr [RAX + 0xf8],RCX MOV qword ptr [RAX + 0x100],RDX MOV qword ptr [RAX + 0xb8],R14 MOV RAX,qword ptr [RAX + 0x90] TEST RAX,RAX JNZ 0x001313f2 LAB_00131432: MOV qword ptr [RSP + 0x38],RAX MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x48] MOV RDI,qword ptr [RBX + 0x18] CALL 0x0011d8c6 LEA RAX,[R14 + 0xf8] MOV RSI,qword ptr [R14 + 0xe0] MOV RDX,qword ptr [R14 + 0xe8] MOV dword ptr [RSP + 0x20],0x0 MOV qword ptr [RSP + 0x28],0x3 MOVUPS XMM0,xmmword ptr [RSP + 0x20] MOVUPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x10],RAX LAB_0013147e: MOV dword ptr [RSP + 0x18],0x2 MOV R8D,0x3 MOV RDI,RBX XOR ECX,ECX MOV R9D,0x1 CALL 0x001284ca MOV RDI,qword ptr [RBX + 0x18] MOV RSI,RAX CALL 0x0011d8c6 LAB_001314a8: MOV R15,qword ptr [R14 + 0xc0] MOV RAX,qword ptr [R14 + 0xc8] LAB_001314b6: MOV qword ptr [RSP + 0x20],R15 CMP EAX,-0x9 JC 0x001314c7 MOV RCX,qword ptr [RSP + 0x20] INC dword ptr [RCX] LAB_001314c7: MOV RSI,-0x100000000 AND RSI,R15 LAB_001314d4: MOV ECX,R15D OR RCX,RSI CMP EAX,0x6 SETNZ DL LAB_001314e0: XOR R14D,R14D TEST DL,DL MOV EDX,0x6 CMOVNZ RDX,RAX CMOVNZ R14,RCX LAB_001314f2: MOV RAX,R14 ADD RSP,0x60 POP RBX POP R14 POP R15 RET
ulong JS_EvalFunctionInternal (long param_1,long param_2,int8 param_3,ulong param_4,int8 param_5, int8 param_6,int8 param_7) { int iVar1; uint uVar2; ulong uVar3; int8 uVar4; int *piVar5; int8 uVar6; bool bVar7; int1 auVar8 [16]; int4 *puVar9; int *local_58; int8 uStack_50; long local_48; long local_40; int *local_38; int8 local_30; int4 local_28 [2]; int8 local_20; local_48 = param_2; if ((int)param_3 != -3) { if ((int)param_3 == -2) { auVar8 = js_closure(param_1,param_2,param_3,param_6,param_7); local_48 = auVar8._0_8_; uVar3 = JS_CallFree(param_1,local_48,auVar8._8_8_,param_4,param_5,0,0); return uVar3; } JS_FreeValueRT(*(int8 *)(param_1 + 0x18)); JS_ThrowTypeError(param_1,"bytecode function expected"); return 0; } JS_FreeValueRT(*(int8 *)(param_1 + 0x18),param_2); iVar1 = js_create_module_function(param_1,param_2); if (iVar1 < 0) { LAB_001313cb: bVar7 = false; goto LAB_001314e0; } local_58 = (int *)0x0; iVar1 = js_inner_module_linking(param_1,param_2,&local_58,0); piVar5 = local_58; if (iVar1 < 0) { for (; piVar5 != (int *)0x0; piVar5 = *(int **)(piVar5 + 0x24)) { *(int1 *)((long)piVar5 + 0x83) = 0; } param_4 = 0; if (iVar1 < 0) goto LAB_001313cb; } if ((*(uint *)(param_2 + 0x80) & 0xfe000000) == 0x4000000) { param_2 = *(long *)(param_2 + 0xb8); } uVar2 = (uint)*(int8 *)(param_2 + 200); if (uVar2 == 3) { piVar5 = (int *)0x0; auVar8 = js_new_promise_capability(param_1,param_2 + 0xd0,0,3); *(int1 (*) [16])(param_2 + 0xc0) = auVar8; uVar2 = 6; param_4 = 0; if (auVar8._8_4_ != 6) { local_40 = 0; iVar1 = js_inner_module_evaluation(param_1,param_2,0,&local_40,&local_38); if (iVar1 < 0) { for (; local_40 != 0; local_40 = *(long *)(local_40 + 0x90)) { *(int1 *)(local_40 + 0x83) = 5; *(int1 *)(local_40 + 0xf0) = 1; if (0xfffffff6 < (uint)local_30) { *local_38 = *local_38 + 1; } *(int **)(local_40 + 0xf8) = local_38; *(int8 *)(local_40 + 0x100) = local_30; *(long *)(local_40 + 0xb8) = param_2; local_58 = local_38; } JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_38,local_30); puVar9 = (int4 *)(param_2 + 0xf8); uVar4 = *(int8 *)(param_2 + 0xe0); uVar6 = *(int8 *)(param_2 + 0xe8); piVar5 = local_58; LAB_0013147e: local_58 = (int *)((ulong)piVar5 & 0xffffffff00000000); uStack_50 = 3; uVar4 = JS_CallInternal(param_1,uVar4,uVar6,0,3,1,(ulong)piVar5 & 0xffffffff00000000,3, puVar9,2); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar4); } else if (*(int *)(param_2 + 0xac) == 0) { puVar9 = local_28; local_28[0] = 0; local_20 = 3; uVar4 = *(int8 *)(param_2 + 0xd0); uVar6 = *(int8 *)(param_2 + 0xd8); piVar5 = local_58; goto LAB_0013147e; } piVar5 = *(int **)(param_2 + 0xc0); uVar2 = (uint)*(int8 *)(param_2 + 200); goto LAB_001314b6; } } else { piVar5 = *(int **)(param_2 + 0xc0); LAB_001314b6: if (0xfffffff6 < uVar2) { *piVar5 = *piVar5 + 1; } param_4 = (ulong)piVar5 & 0xffffffff00000000; } param_4 = (ulong)piVar5 & 0xffffffff | param_4; bVar7 = uVar2 != 6; LAB_001314e0: uVar3 = 0; if (bVar7) { uVar3 = param_4; } return uVar3; }
25,576
JS_EvalFunctionInternal
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_EvalFunctionInternal(JSContext *ctx, JSValue fun_obj, JSValue this_obj, JSVarRef **var_refs, JSStackFrame *sf) { JSValue ret_val; uint32_t tag; tag = JS_VALUE_GET_TAG(fun_obj); if (tag == JS_TAG_FUNCTION_BYTECODE) { fun_obj = js_closure(ctx, fun_obj, var_refs, sf); ret_val = JS_CallFree(ctx, fun_obj, this_obj, 0, NULL); } else if (tag == JS_TAG_MODULE) { JSModuleDef *m; m = JS_VALUE_GET_PTR(fun_obj); /* the module refcount should be >= 2 */ JS_FreeValue(ctx, fun_obj); if (js_create_module_function(ctx, m) < 0) goto fail; if (js_link_module(ctx, m) < 0) goto fail; ret_val = js_evaluate_module(ctx, m); if (JS_IsException(ret_val)) { fail: return JS_EXCEPTION; } } else { JS_FreeValue(ctx, fun_obj); ret_val = JS_ThrowTypeError(ctx, "bytecode function expected"); } return ret_val; }
O2
c
JS_EvalFunctionInternal: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rsi, %r14 movq %rdi, %rbx cmpl $-0x3, %edx je 0x297b3 cmpl $-0x2, %edx jne 0x29868 movq %r8, %r15 movq %rcx, %r12 movq 0x60(%rsp), %r8 movq %rbx, %rdi movq %r14, %rsi movq %r9, %rcx callq 0x37433 andq $0x0, (%rsp) movq %rbx, %rdi movq %rax, %rsi movq %r12, %rcx movq %r15, %r8 xorl %r9d, %r9d callq 0x1cd8e movq %rax, %r14 movq %rdx, %r15 jmp 0x299aa movq %rbx, %rdi movq %r14, %rsi callq 0x1801e movq %rbx, %rdi movq %r14, %rsi callq 0x3bfa3 pushq $0x6 popq %r15 testl %eax, %eax js 0x29860 leaq 0x10(%rsp), %r12 andq $0x0, (%r12) movq %rbx, %rdi movq %r14, %rsi movq %r12, %rdx xorl %ecx, %ecx callq 0x3c1a2 testl %eax, %eax js 0x29857 movl $0xfe000000, %eax # imm = 0xFE000000 andl 0x80(%r14), %eax cmpl $0x4000000, %eax # imm = 0x4000000 jne 0x2980d movq 0xb8(%r14), %r14 movq 0xc8(%r14), %rax cmpl $0x3, %eax jne 0x29890 leaq 0xd0(%r14), %rsi movq %rbx, %rdi callq 0x2956d movq %rax, 0xc0(%r14) movq %rdx, 0xc8(%r14) cmpl $0x6, %edx jne 0x2989c pushq $0x6 popq %rax xorl %ecx, %ecx xorl %edx, %edx jmp 0x29993 movb $0x0, 0x83(%r12) addq $0x90, %r12 movq (%r12), %r12 testq %r12, %r12 jne 0x29847 xorl %r14d, %r14d jmp 0x299aa movq %rbx, %rdi movq %r14, %rsi callq 0x1801e leaq 0x5ced3(%rip), %rsi # 0x8674d xorl %r14d, %r14d movq %rbx, %rdi xorl %eax, %eax callq 0x1c64d pushq $0x6 popq %r15 jmp 0x299aa movq 0xc0(%r14), %rcx jmp 0x2997f leaq 0x20(%rsp), %r15 andq $0x0, (%r15) leaq 0x10(%rsp), %r8 movq %rbx, %rdi movq %r14, %rsi xorl %edx, %edx movq %r15, %rcx callq 0x3c554 testl %eax, %eax js 0x298ec cmpl $0x0, 0xac(%r14) jne 0x29971 leaq 0x28(%rsp), %rax andl $0x0, (%rax) movq $0x3, 0x8(%rax) movq 0xd0(%r14), %rsi movq 0xd8(%r14), %rdx jmp 0x29950 movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rdx movq (%r15), %r15 testq %r15, %r15 je 0x29933 movb $0x5, 0x83(%r15) movb $0x1, 0xf0(%r15) cmpl $-0x9, %edx jb 0x29915 incl (%rsi) movq %rsi, 0xf8(%r15) movq %rdx, 0x100(%r15) movq %r14, 0xb8(%r15) addq $0x90, %r15 jmp 0x298f6 movq %rbx, %rdi callq 0x1801e leaq 0xf8(%r14), %rax movq 0xe0(%r14), %rsi movq 0xe8(%r14), %rdx movq %rax, (%rsp) pushq $0x3 popq %r8 pushq $0x1 popq %r9 movq %rbx, %rdi xorl %ecx, %ecx callq 0x21eb6 movq %rbx, %rdi movq %rax, %rsi callq 0x1801e movq 0xc0(%r14), %rcx movq 0xc8(%r14), %rax cmpl $-0x9, %eax jb 0x29986 incl (%rcx) movabsq $-0x100000000, %rdx # imm = 0xFFFFFFFF00000000 andq %rcx, %rdx movl %ecx, %ecx orq %rdx, %rcx xorl %r14d, %r14d cmpl $0x6, %eax pushq $0x6 popq %r15 cmovneq %rax, %r15 cmovneq %rcx, %r14 movq %r14, %rax movq %r15, %rdx addq $0x38, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
JS_EvalFunctionInternal: push r15 push r14 push r12 push rbx sub rsp, 38h mov r14, rsi mov rbx, rdi cmp edx, 0FFFFFFFDh jz short loc_297B3 cmp edx, 0FFFFFFFEh jnz loc_29868 mov r15, r8 mov r12, rcx mov r8, [rsp+58h+arg_0] mov rdi, rbx mov rsi, r14 mov rcx, r9 call js_closure and [rsp+58h+var_58], 0 mov rdi, rbx mov rsi, rax mov rcx, r12 mov r8, r15 xor r9d, r9d call JS_CallFree mov r14, rax mov r15, rdx jmp loc_299AA loc_297B3: mov rdi, rbx mov rsi, r14 call JS_FreeValue mov rdi, rbx mov rsi, r14 call js_create_module_function push 6 pop r15 test eax, eax js loc_29860 lea r12, [rsp+58h+var_48] and qword ptr [r12], 0 mov rdi, rbx mov rsi, r14 mov rdx, r12 xor ecx, ecx call js_inner_module_linking test eax, eax js short loc_29857 mov eax, 0FE000000h and eax, [r14+80h] cmp eax, 4000000h jnz short loc_2980D mov r14, [r14+0B8h] loc_2980D: mov rax, [r14+0C8h] cmp eax, 3 jnz short loc_29890 lea rsi, [r14+0D0h] mov rdi, rbx call JS_NewPromiseCapability mov [r14+0C0h], rax mov [r14+0C8h], rdx cmp edx, 6 jnz short loc_2989C push 6 pop rax xor ecx, ecx xor edx, edx jmp loc_29993 loc_29847: mov byte ptr [r12+83h], 0 add r12, 90h loc_29857: mov r12, [r12] test r12, r12 jnz short loc_29847 loc_29860: xor r14d, r14d jmp loc_299AA loc_29868: mov rdi, rbx mov rsi, r14 call JS_FreeValue lea rsi, aBytecodeFuncti_0; "bytecode function expected" xor r14d, r14d mov rdi, rbx xor eax, eax call JS_ThrowTypeError push 6 pop r15 jmp loc_299AA loc_29890: mov rcx, [r14+0C0h] jmp loc_2997F loc_2989C: lea r15, [rsp+58h+var_38] and qword ptr [r15], 0 lea r8, [rsp+58h+var_48] mov rdi, rbx mov rsi, r14 xor edx, edx mov rcx, r15 call js_inner_module_evaluation test eax, eax js short loc_298EC cmp dword ptr [r14+0ACh], 0 jnz loc_29971 lea rax, [rsp+58h+var_30] and dword ptr [rax], 0 mov qword ptr [rax+8], 3 mov rsi, [r14+0D0h] mov rdx, [r14+0D8h] jmp short loc_29950 loc_298EC: mov rsi, [rsp+58h+var_48] mov rdx, [rsp+58h+var_40] loc_298F6: mov r15, [r15] test r15, r15 jz short loc_29933 mov byte ptr [r15+83h], 5 mov byte ptr [r15+0F0h], 1 cmp edx, 0FFFFFFF7h jb short loc_29915 inc dword ptr [rsi] loc_29915: mov [r15+0F8h], rsi mov [r15+100h], rdx mov [r15+0B8h], r14 add r15, 90h jmp short loc_298F6 loc_29933: mov rdi, rbx call JS_FreeValue lea rax, [r14+0F8h] mov rsi, [r14+0E0h] mov rdx, [r14+0E8h] loc_29950: mov [rsp+58h+var_58], rax push 3 pop r8 push 1 pop r9 mov rdi, rbx xor ecx, ecx call JS_Call mov rdi, rbx mov rsi, rax call JS_FreeValue loc_29971: mov rcx, [r14+0C0h] mov rax, [r14+0C8h] loc_2997F: cmp eax, 0FFFFFFF7h jb short loc_29986 inc dword ptr [rcx] loc_29986: mov rdx, 0FFFFFFFF00000000h and rdx, rcx loc_29993: mov ecx, ecx or rcx, rdx xor r14d, r14d cmp eax, 6 push 6 pop r15 cmovnz r15, rax cmovnz r14, rcx loc_299AA: mov rax, r14 mov rdx, r15 add rsp, 38h pop rbx pop r12 pop r14 pop r15 retn
long long JS_EvalFunctionInternal( long long a1, long long a2, long long a3, int a4, int a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14, long long a15) { long long v15; // r14 long long v18; // rax long long v19; // rdx long long v20; // r14 long long *v21; // r12 long long v22; // rax long long v23; // rdx unsigned long long v24; // rcx unsigned long long v25; // rdx long long v26; // r12 long long v27; // rdx long long v28; // rcx long long v29; // r8 long long v30; // r9 __m128 v31; // xmm4 __m128 v32; // xmm5 long long *v33; // r15 int *v34; // rax long long v35; // rsi long long v36; // rdx _DWORD *v37; // rsi long long v38; // rdx long long v39; // r15 long long v40; // rax long long v41; // rdx unsigned long long v42; // rcx char v44; // [rsp+0h] [rbp-58h] _QWORD v45[2]; // [rsp+10h] [rbp-48h] BYREF long long v46; // [rsp+20h] [rbp-38h] BYREF int v47; // [rsp+28h] [rbp-30h] BYREF long long v48; // [rsp+30h] [rbp-28h] v15 = a2; if ( (_DWORD)a3 != -3 ) { if ( (_DWORD)a3 == -2 ) { v18 = js_closure(a1, a2, a3, a6, a15); return JS_CallFree(a1, v18, v19, a4, a5, 0, 0LL); } else { JS_FreeValue(a1, a2, a3); v20 = 0LL; JS_ThrowTypeError( a1, (long long)"bytecode function expected", v27, v28, v29, v30, a7, a8, a9, a10, v31, v32, a13, a14, v44); } return v20; } JS_FreeValue(a1, a2, a3); if ( (int)js_create_module_function(a1, a2) < 0 ) return 0LL; v21 = v45; v45[0] = 0LL; if ( (int)js_inner_module_linking(a1, a2, v45, 0LL) < 0 ) { while ( 1 ) { v26 = *v21; if ( !v26 ) break; *(_BYTE *)(v26 + 131) = 0; v21 = (long long *)(v26 + 144); } return 0LL; } if ( (*(_DWORD *)(a2 + 128) & 0xFE000000) == 0x4000000 ) v15 = *(_QWORD *)(a2 + 184); v22 = *(_QWORD *)(v15 + 200); if ( (_DWORD)v22 != 3 ) { v24 = *(_QWORD *)(v15 + 192); LABEL_27: if ( (unsigned int)v22 >= 0xFFFFFFF7 ) ++*(_DWORD *)v24; v25 = v24 & 0xFFFFFFFF00000000LL; goto LABEL_30; } *(_QWORD *)(v15 + 192) = JS_NewPromiseCapability(a1, v15 + 208); *(_QWORD *)(v15 + 200) = v23; if ( (_DWORD)v23 != 6 ) { v33 = &v46; v46 = 0LL; if ( (int)js_inner_module_evaluation(a1, v15, 0LL, &v46, v45) < 0 ) { v37 = (_DWORD *)v45[0]; v38 = v45[1]; while ( 1 ) { v39 = *v33; if ( !v39 ) break; *(_BYTE *)(v39 + 131) = 5; *(_BYTE *)(v39 + 240) = 1; if ( (unsigned int)v38 >= 0xFFFFFFF7 ) ++*v37; *(_QWORD *)(v39 + 248) = v37; *(_QWORD *)(v39 + 256) = v38; *(_QWORD *)(v39 + 184) = v15; v33 = (long long *)(v39 + 144); } JS_FreeValue(a1, (long long)v37, v38); v34 = (int *)(v15 + 248); v35 = *(_QWORD *)(v15 + 224); v36 = *(_QWORD *)(v15 + 232); } else { if ( *(_DWORD *)(v15 + 172) ) { LABEL_26: v24 = *(_QWORD *)(v15 + 192); v22 = *(_QWORD *)(v15 + 200); goto LABEL_27; } v34 = &v47; v47 = 0; v48 = 3LL; v35 = *(_QWORD *)(v15 + 208); v36 = *(_QWORD *)(v15 + 216); } v40 = JS_Call(a1, v35, v36, 0, 3, 1, (long long)v34); JS_FreeValue(a1, v40, v41); goto LABEL_26; } LODWORD(v22) = 6; LODWORD(v24) = 0; v25 = 0LL; LABEL_30: v42 = v25 | (unsigned int)v24; v20 = 0LL; if ( (_DWORD)v22 != 6 ) return v42; return v20; }
JS_EvalFunctionInternal: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R14,RSI MOV RBX,RDI CMP EDX,-0x3 JZ 0x001297b3 CMP EDX,-0x2 JNZ 0x00129868 MOV R15,R8 MOV R12,RCX MOV R8,qword ptr [RSP + 0x60] MOV RDI,RBX MOV RSI,R14 MOV RCX,R9 CALL 0x00137433 AND qword ptr [RSP],0x0 MOV RDI,RBX MOV RSI,RAX MOV RCX,R12 MOV R8,R15 XOR R9D,R9D CALL 0x0011cd8e MOV R14,RAX MOV R15,RDX JMP 0x001299aa LAB_001297b3: MOV RDI,RBX MOV RSI,R14 CALL 0x0011801e MOV RDI,RBX MOV RSI,R14 CALL 0x0013bfa3 PUSH 0x6 POP R15 TEST EAX,EAX JS 0x00129860 LEA R12,[RSP + 0x10] AND qword ptr [R12],0x0 MOV RDI,RBX MOV RSI,R14 MOV RDX,R12 XOR ECX,ECX CALL 0x0013c1a2 TEST EAX,EAX JS 0x00129857 MOV EAX,0xfe000000 AND EAX,dword ptr [R14 + 0x80] CMP EAX,0x4000000 JNZ 0x0012980d MOV R14,qword ptr [R14 + 0xb8] LAB_0012980d: MOV RAX,qword ptr [R14 + 0xc8] CMP EAX,0x3 JNZ 0x00129890 LEA RSI,[R14 + 0xd0] MOV RDI,RBX CALL 0x0012956d MOV qword ptr [R14 + 0xc0],RAX MOV qword ptr [R14 + 0xc8],RDX CMP EDX,0x6 JNZ 0x0012989c PUSH 0x6 POP RAX XOR ECX,ECX XOR EDX,EDX JMP 0x00129993 LAB_00129847: MOV byte ptr [R12 + 0x83],0x0 ADD R12,0x90 LAB_00129857: MOV R12,qword ptr [R12] TEST R12,R12 JNZ 0x00129847 LAB_00129860: XOR R14D,R14D JMP 0x001299aa LAB_00129868: MOV RDI,RBX MOV RSI,R14 CALL 0x0011801e LEA RSI,[0x18674d] XOR R14D,R14D MOV RDI,RBX XOR EAX,EAX CALL 0x0011c64d PUSH 0x6 POP R15 JMP 0x001299aa LAB_00129890: MOV RCX,qword ptr [R14 + 0xc0] JMP 0x0012997f LAB_0012989c: LEA R15,[RSP + 0x20] AND qword ptr [R15],0x0 LEA R8,[RSP + 0x10] MOV RDI,RBX MOV RSI,R14 XOR EDX,EDX MOV RCX,R15 CALL 0x0013c554 TEST EAX,EAX JS 0x001298ec CMP dword ptr [R14 + 0xac],0x0 JNZ 0x00129971 LEA RAX,[RSP + 0x28] AND dword ptr [RAX],0x0 MOV qword ptr [RAX + 0x8],0x3 MOV RSI,qword ptr [R14 + 0xd0] MOV RDX,qword ptr [R14 + 0xd8] JMP 0x00129950 LAB_001298ec: MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x18] LAB_001298f6: MOV R15,qword ptr [R15] TEST R15,R15 JZ 0x00129933 MOV byte ptr [R15 + 0x83],0x5 MOV byte ptr [R15 + 0xf0],0x1 CMP EDX,-0x9 JC 0x00129915 INC dword ptr [RSI] LAB_00129915: MOV qword ptr [R15 + 0xf8],RSI MOV qword ptr [R15 + 0x100],RDX MOV qword ptr [R15 + 0xb8],R14 ADD R15,0x90 JMP 0x001298f6 LAB_00129933: MOV RDI,RBX CALL 0x0011801e LEA RAX,[R14 + 0xf8] MOV RSI,qword ptr [R14 + 0xe0] MOV RDX,qword ptr [R14 + 0xe8] LAB_00129950: MOV qword ptr [RSP],RAX PUSH 0x3 POP R8 PUSH 0x1 POP R9 MOV RDI,RBX XOR ECX,ECX CALL 0x00121eb6 MOV RDI,RBX MOV RSI,RAX CALL 0x0011801e LAB_00129971: MOV RCX,qword ptr [R14 + 0xc0] MOV RAX,qword ptr [R14 + 0xc8] LAB_0012997f: CMP EAX,-0x9 JC 0x00129986 INC dword ptr [RCX] LAB_00129986: MOV RDX,-0x100000000 AND RDX,RCX LAB_00129993: MOV ECX,ECX OR RCX,RDX XOR R14D,R14D CMP EAX,0x6 PUSH 0x6 POP R15 CMOVNZ R15,RAX CMOVNZ R14,RCX LAB_001299aa: MOV RAX,R14 MOV RDX,R15 ADD RSP,0x38 POP RBX POP R12 POP R14 POP R15 RET
int1 [16] JS_EvalFunctionInternal (int8 param_1,long param_2,int8 param_3,int8 param_4,int8 param_5, int8 param_6,int8 param_7) { long lVar1; int iVar2; int4 *puVar3; int8 uVar4; int *piVar5; int8 uVar6; ulong uVar7; int **ppiVar8; long *plVar9; int1 auVar10 [16]; int *local_48; int8 local_40; long local_38; int4 local_30 [2]; int8 local_28; if ((int)param_3 != -3) { if ((int)param_3 == -2) { auVar10 = js_closure(param_1,param_2,param_3,param_6,param_7); auVar10 = JS_CallFree(param_1,auVar10._0_8_,auVar10._8_8_,param_4,param_5,0,0); return auVar10; } JS_FreeValue(param_1,param_2); JS_ThrowTypeError(param_1,"bytecode function expected"); return ZEXT816(6) << 0x40; } JS_FreeValue(param_1,param_2); iVar2 = js_create_module_function(param_1,param_2); if (iVar2 < 0) { LAB_00129860: return ZEXT816(6) << 0x40; } ppiVar8 = &local_48; local_48 = (int *)0x0; iVar2 = js_inner_module_linking(param_1,param_2,ppiVar8,0); if (iVar2 < 0) { while (piVar5 = *ppiVar8, piVar5 != (int *)0x0) { *(int1 *)((long)piVar5 + 0x83) = 0; ppiVar8 = (int **)(piVar5 + 0x24); } goto LAB_00129860; } if ((*(uint *)(param_2 + 0x80) & 0xfe000000) == 0x4000000) { param_2 = *(long *)(param_2 + 0xb8); } uVar4 = *(int8 *)(param_2 + 200); if ((int)uVar4 == 3) { auVar10 = JS_NewPromiseCapability(param_1,param_2 + 0xd0); *(int1 (*) [16])(param_2 + 0xc0) = auVar10; if (auVar10._8_4_ == 6) { uVar4 = 6; piVar5 = (int *)0x0; uVar7 = 0; goto LAB_00129993; } plVar9 = &local_38; local_38 = 0; iVar2 = js_inner_module_evaluation(param_1,param_2,0,plVar9,&local_48); if (iVar2 < 0) { while (lVar1 = *plVar9, lVar1 != 0) { *(int1 *)(lVar1 + 0x83) = 5; *(int1 *)(lVar1 + 0xf0) = 1; if (0xfffffff6 < (uint)local_40) { *local_48 = *local_48 + 1; } *(int **)(lVar1 + 0xf8) = local_48; *(int8 *)(lVar1 + 0x100) = local_40; *(long *)(lVar1 + 0xb8) = param_2; plVar9 = (long *)(lVar1 + 0x90); } JS_FreeValue(param_1); puVar3 = (int4 *)(param_2 + 0xf8); uVar4 = *(int8 *)(param_2 + 0xe0); uVar6 = *(int8 *)(param_2 + 0xe8); LAB_00129950: uVar4 = JS_Call(param_1,uVar4,uVar6,0,3,1,puVar3); JS_FreeValue(param_1,uVar4); } else if (*(int *)(param_2 + 0xac) == 0) { puVar3 = local_30; local_30[0] = 0; local_28 = 3; uVar4 = *(int8 *)(param_2 + 0xd0); uVar6 = *(int8 *)(param_2 + 0xd8); goto LAB_00129950; } piVar5 = *(int **)(param_2 + 0xc0); uVar4 = *(int8 *)(param_2 + 200); } else { piVar5 = *(int **)(param_2 + 0xc0); } if (0xfffffff6 < (uint)uVar4) { *piVar5 = *piVar5 + 1; } uVar7 = (ulong)piVar5 & 0xffffffff00000000; LAB_00129993: auVar10._8_8_ = uVar4; auVar10._0_8_ = (ulong)piVar5 & 0xffffffff | uVar7; if ((int)uVar4 == 6) { return ZEXT816(6) << 0x40; } return auVar10; }
25,577
ma_stmt_execute_generate_bulk_request
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
unsigned char* ma_stmt_execute_generate_bulk_request(MYSQL_STMT *stmt, size_t *request_len) { /* execute packet has the following format: Offset Length Description ----------------------------------------- 0 4 Statement id 4 2 Flags (cursor type): STMT_BULK_FLAG_CLIENT_SEND_TYPES = 128 STMT_BULK_FLAG_INSERT_ID_REQUEST = 64 ----------------------------------------- if (stmt->send_types_to_server): for (i=0; i < param_count; i++) 1st byte: parameter type 2nd byte flag: unsigned flag (32768) ------------------------------------------ for (i=0; i < param_count; i++) 1 indicator variable STMT_INDICATOR_NONE 0 STMT_INDICATOR_NULL 1 STMT_INDICATOR_DEFAULT 2 STMT_INDICATOR_IGNORE 3 STMT_INDICATOR_SKIP_SET 4 n data from bind buffer */ size_t length= 1024; size_t free_bytes= 0; ushort flags= 0; uint i, j; uchar *start= NULL, *p; if (!MARIADB_STMT_BULK_SUPPORTED(stmt)) { stmt_set_error(stmt, CR_FUNCTION_NOT_SUPPORTED, "IM001", CER(CR_FUNCTION_NOT_SUPPORTED), "Bulk operation"); return NULL; } if (!stmt->param_count) { stmt_set_error(stmt, CR_BULK_WITHOUT_PARAMETERS, "IM001", CER(CR_BULK_WITHOUT_PARAMETERS)); return NULL; } /* preallocate length bytes */ if (!(start= p= (uchar *)malloc(length))) goto mem_error; int4store(p, stmt->stmt_id); p += STMT_ID_LENGTH; /* todo: request to return auto generated ids */ if (stmt->send_types_to_server) flags|= STMT_BULK_FLAG_CLIENT_SEND_TYPES; int2store(p, flags); p+=2; /* When using mariadb_stmt_execute_direct stmt->paran_count is not known, so we need to assign prebind_params, which was previously set by mysql_stmt_attr_set */ if (!stmt->param_count && stmt->prebind_params) stmt->param_count= stmt->prebind_params; if (stmt->param_count) { free_bytes= length - (p - start); /* Store type information: 2 bytes per type */ if (stmt->send_types_to_server) { if (free_bytes < stmt->param_count * 2 + 20) { size_t offset= p - start; length= offset + stmt->param_count * 2 + 20; if (!(start= (uchar *)realloc(start, length))) goto mem_error; p= start + offset; } for (i = 0; i < stmt->param_count; i++) { /* this differs from mysqlnd, c api supports unsigned !! */ uint buffer_type= stmt->params[i].buffer_type | (stmt->params[i].is_unsigned ? 32768 : 0); int2store(p, buffer_type); p+= 2; } } /* calculate data size */ for (j=0; j < stmt->array_size; j++) { /* If callback for parameters was specified, we need to update bind information for new row */ if (stmt->param_callback) stmt->param_callback(stmt->user_data, stmt->params, j); if (mysql_stmt_skip_paramset(stmt, j)) continue; for (i=0; i < stmt->param_count; i++) { size_t size= 0; my_bool has_data= TRUE; signed char indicator= ma_get_indicator(stmt, i, j); /* check if we need to send data */ if (indicator > 0) has_data= FALSE; size= 1; /* Please note that mysql_stmt_send_long_data is not supported current when performing bulk execute */ if (has_data) { switch (stmt->params[i].buffer_type) { case MYSQL_TYPE_NULL: has_data= FALSE; indicator= STMT_INDICATOR_NULL; break; case MYSQL_TYPE_TINY_BLOB: case MYSQL_TYPE_MEDIUM_BLOB: case MYSQL_TYPE_LONG_BLOB: case MYSQL_TYPE_BLOB: case MYSQL_TYPE_VARCHAR: case MYSQL_TYPE_VAR_STRING: case MYSQL_TYPE_STRING: case MYSQL_TYPE_JSON: case MYSQL_TYPE_DECIMAL: case MYSQL_TYPE_NEWDECIMAL: case MYSQL_TYPE_GEOMETRY: case MYSQL_TYPE_NEWDATE: case MYSQL_TYPE_ENUM: case MYSQL_TYPE_BIT: case MYSQL_TYPE_SET: size+= 5; /* max 8 bytes for size */ if (!stmt->param_callback) { if (indicator == STMT_INDICATOR_NTS || (!stmt->row_size && ma_get_length(stmt,i,j) == -1)) { size+= strlen(ma_get_buffer_offset(stmt, stmt->params[i].buffer_type, stmt->params[i].buffer,j)); } else size+= (size_t)ma_get_length(stmt, i, j); } else { size+= stmt->params[i].buffer_length; } break; default: size+= mysql_ps_fetch_functions[stmt->params[i].buffer_type].pack_len; break; } } free_bytes= length - (p - start); if (free_bytes < size + 20) { size_t offset= p - start; length= MAX(2 * length, offset + size + 20); if (!(start= (uchar *)realloc(start, length))) goto mem_error; p= start + offset; } int1store(p, indicator > 0 ? indicator : 0); p++; if (has_data) { store_param(stmt, i, &p, (stmt->param_callback) ? 0 : j); } } } } stmt->send_types_to_server= 0; *request_len = (size_t)(p - start); return start; mem_error: SET_CLIENT_STMT_ERROR(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); free(start); *request_len= 0; return NULL; }
O3
c
ma_stmt_execute_generate_bulk_request: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq 0x38(%rdi), %rax testq %rax, %rax je 0x63702 testb $0x1, 0x370(%rax) jne 0x63702 movq 0x4f0(%rax), %rax testb $0x4, 0x70(%rax) jne 0x6373b leaq 0x30a5b7(%rip), %rax # 0x36dcc0 movq 0x18(%rax), %rcx leaq 0x5a3e2(%rip), %rdx # 0xbdaf6 leaq 0x5a3e1(%rip), %r8 # 0xbdafc movl $0x138b, %esi # imm = 0x138B xorl %eax, %eax callq 0x62374 xorl %edi, %edi movq %rdi, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl 0x64(%rdi), %r13d testq %r13, %r13 je 0x63811 movq %rsi, -0x58(%rbp) movq %rdi, -0x48(%rbp) movl $0x400, %edi # imm = 0x400 callq 0x3aa90 testq %rax, %rax je 0x63ac5 movq %rax, %rdi movq -0x48(%rbp), %rbx movl 0x40(%rbx), %eax movl %eax, (%rdi) movb 0x68(%rbx), %cl testb %cl, %cl setne %dl shlb $0x7, %dl movq %rdi, %rax addq $0x6, %rax movb %dl, 0x4(%rdi) movb $0x0, 0x5(%rdi) movq %rax, -0x50(%rbp) testb %cl, %cl je 0x63834 leal -0x3e7(,%r13,2), %ecx movl $0x400, %r8d # imm = 0x400 cmpl $0xfffffc04, %ecx # imm = 0xFFFFFC04 ja 0x637d7 leal (,%r13,2), %eax movl %eax, %esi addq $0x1a, %rsi movq %rsi, %r14 callq 0x3a0f0 testq %rax, %rax je 0x63ac5 movq %rax, %rdi addq $0x6, %rax movq -0x48(%rbp), %rbx movq %r14, %r8 movq 0x70(%rbx), %rcx addq $0x65, %rcx xorl %edx, %edx movl -0x5(%rcx), %esi xorl %ebx, %ebx cmpb $0x0, (%rcx) setne %bl shll $0xf, %ebx orl %esi, %ebx movb %sil, (%rax) movb %bh, 0x1(%rax) addq $0x2, %rax incq %rdx addq $0x70, %rcx cmpq %r13, %rdx jb 0x637e1 movq %rax, -0x50(%rbp) movq -0x48(%rbp), %rbx jmp 0x6383a leaq 0x30a4a8(%rip), %rax # 0x36dcc0 movq 0x30(%rax), %rcx leaq 0x5a2d3(%rip), %rdx # 0xbdaf6 movl $0x138e, %esi # imm = 0x138E xorl %eax, %eax callq 0x62374 jmp 0x63727 movl $0x400, %r8d # imm = 0x400 cmpl $0x0, 0x368(%rbx) je 0x63ab2 xorl %r12d, %r12d movq %r8, -0x40(%rbp) movq %rdi, -0x38(%rbp) movq 0x390(%rbx), %rax testq %rax, %rax je 0x63872 movq 0x380(%rbx), %rdi movq 0x70(%rbx), %rsi movl %r12d, %edx callq *%rax movl 0x64(%rbx), %r13d testl %r13d, %r13d je 0x63898 xorl %r14d, %r14d movq %rbx, %rdi movl %r14d, %esi movq %r12, %rdx callq 0x632ee cmpb $0x4, %al je 0x63a94 incl %r14d cmpl %r14d, %r13d jne 0x6387a testl %r13d, %r13d je 0x63a91 xorl %r15d, %r15d xorl %r14d, %r14d movq %r12, -0x30(%rbp) movq %rbx, %rdi movl %r14d, %esi movq %r12, %rdx callq 0x632ee movl %eax, %r12d movq %rbx, %rcx movb $0x1, %bl movl $0x1, %eax testb %r12b, %r12b jle 0x638d8 movl %r12d, %r13d movq -0x38(%rbp), %rdi movq -0x40(%rbp), %r9 jmp 0x6394c movq 0x70(%rcx), %rdx movslq 0x60(%rdx,%r15), %rcx cmpq $0xf4, %rcx movq -0x38(%rbp), %rdi movq -0x40(%rbp), %r9 jle 0x638ff leal -0xf5(%rcx), %eax cmpl $0xa, %eax jbe 0x6392c jmp 0x63915 leal -0xe(%rcx), %esi cmpl $0x3, %esi jb 0x6392c testl %ecx, %ecx je 0x6392c movb $0x1, %bl movb $0x1, %r13b cmpl $0x6, %ecx je 0x6394c movl %ecx, %eax leaq (%rax,%rax,2), %rax leaq 0x3833ce(%rip), %rcx # 0x3e6cf0 movslq 0x8(%rcx,%rax,8), %rax incq %rax jmp 0x63947 movq -0x48(%rbp), %r8 cmpq $0x0, 0x390(%r8) je 0x639f0 movq 0x40(%rdx,%r15), %rax addq $0x6, %rax xorl %ebx, %ebx movl %r12d, %r13d movq -0x50(%rbp), %rcx movq %rcx, %r12 subq %rdi, %r12 movq %r9, %rdx subq %r12, %rdx addq $0x14, %rax cmpq %rax, %rdx jae 0x63994 movq %r9, %rcx addq %r9, %rcx addq %r12, %rax cmpq %rax, %rcx movq %rax, %rsi cmovaq %rcx, %rsi movq %rsi, -0x40(%rbp) callq 0x3a0f0 testq %rax, %rax je 0x63ac5 movq %rax, -0x38(%rbp) addq %rax, %r12 movq %r12, %rcx movzbl %r13b, %eax testb %al, %al movl $0x0, %edx cmovlel %edx, %eax movb %al, (%rcx) incq %rcx movq %rcx, -0x50(%rbp) testb %bl, %bl movq -0x48(%rbp), %rbx movq -0x30(%rbp), %r12 jne 0x639d7 cmpq $0x0, 0x390(%rbx) movl $0x0, %ecx cmoveq %r12, %rcx movq %rbx, %rdi movl %r14d, %esi leaq -0x50(%rbp), %rdx callq 0x62eb1 incq %r14 movl 0x64(%rbx), %r13d addq $0x70, %r15 cmpq %r13, %r14 jb 0x638ab jmp 0x63a94 cmpb $-0x1, %r12b je 0x63a35 movq 0x370(%r8), %rsi movq (%rdx,%r15), %rax testq %rsi, %rsi je 0x63a15 testq %rax, %rax je 0x63a7d imulq -0x30(%rbp), %rsi addq %rsi, %rax jmp 0x63a2d testq %rax, %rax je 0x63a7d movq -0x30(%rbp), %rsi cmpq $-0x1, (%rax,%rsi,8) je 0x63a35 movq -0x30(%rbp), %rcx leaq (%rax,%rcx,8), %rax movq (%rax), %rax jmp 0x63943 movq 0x10(%rdx,%r15), %rdi cmpl $0x0, 0x368(%r8) je 0x63a6d movq 0x370(%r8), %rax testq %rax, %rax jne 0x63a65 leaq (%rcx,%rcx,2), %rax leaq 0x383295(%rip), %rcx # 0x3e6cf0 movslq 0x8(%rcx,%rax,8), %rax testq %rax, %rax jle 0x63a87 imulq -0x30(%rbp), %rax addq %rax, %rdi callq 0x3a4c0 addq $0x6, %rax xorl %ebx, %ebx jmp 0x638cb movl $0x6, %eax jmp 0x63947 movq -0x30(%rbp), %rax movq (%rdi,%rax,8), %rdi jmp 0x63a6d xorl %r13d, %r13d movq -0x38(%rbp), %rdi movq -0x40(%rbp), %r8 incq %r12 movl 0x368(%rbx), %eax cmpq %rax, %r12 jb 0x6384a movq -0x50(%rbp), %rax movb $0x0, 0x68(%rbx) subq %rdi, %rax movq -0x58(%rbp), %rcx movq %rax, (%rcx) jmp 0x63729 movq -0x48(%rbp), %rbx movl $0x7d8, 0x108(%rbx) # imm = 0x7D8 leaq 0x30d(%rbx), %rdi leaq 0x309fcf(%rip), %rax # 0x36dab0 movq (%rax), %rsi movl $0x5, %edx callq 0x3a1a0 xorl %eax, %eax movb %al, 0x312(%rbx) leaq 0x10c(%rbx), %rdi leaq 0x309fbc(%rip), %rax # 0x36dac0 movq 0x40(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x3a1a0 xorl %edi, %edi movb %dil, 0x30b(%rbx) movq -0x58(%rbp), %rax movq $0x0, (%rax) jmp 0x63729
ma_stmt_execute_generate_bulk_request: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov rax, [rdi+38h] test rax, rax jz short loc_63702 test byte ptr [rax+370h], 1 jnz short loc_63702 mov rax, [rax+4F0h] test byte ptr [rax+70h], 4 jnz short loc_6373B loc_63702: lea rax, mariadb_client_errors mov rcx, [rax+18h] lea rdx, aIm001; "IM001" lea r8, aBulkOperation; "Bulk operation" mov esi, 138Bh xor eax, eax call stmt_set_error loc_63727: xor edi, edi loc_63729: mov rax, rdi add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6373B: mov r13d, [rdi+64h] test r13, r13 jz loc_63811 mov [rbp+var_58], rsi mov [rbp+var_48], rdi mov edi, 400h call _malloc test rax, rax jz loc_63AC5 mov rdi, rax mov rbx, [rbp+var_48] mov eax, [rbx+40h] mov [rdi], eax mov cl, [rbx+68h] test cl, cl setnz dl shl dl, 7 mov rax, rdi add rax, 6 mov [rdi+4], dl mov byte ptr [rdi+5], 0 mov [rbp+var_50], rax test cl, cl jz loc_63834 lea ecx, ds:0FFFFFFFFFFFFFC19h[r13*2] mov r8d, 400h cmp ecx, 0FFFFFC04h ja short loc_637D7 lea eax, ds:0[r13*2] mov esi, eax add rsi, 1Ah mov r14, rsi call _realloc test rax, rax jz loc_63AC5 mov rdi, rax add rax, 6 mov rbx, [rbp+var_48] mov r8, r14 loc_637D7: mov rcx, [rbx+70h] add rcx, 65h ; 'e' xor edx, edx loc_637E1: mov esi, [rcx-5] xor ebx, ebx cmp byte ptr [rcx], 0 setnz bl shl ebx, 0Fh or ebx, esi mov [rax], sil mov [rax+1], bh add rax, 2 inc rdx add rcx, 70h ; 'p' cmp rdx, r13 jb short loc_637E1 mov [rbp+var_50], rax mov rbx, [rbp+var_48] jmp short loc_6383A loc_63811: lea rax, mariadb_client_errors mov rcx, [rax+30h] lea rdx, aIm001; "IM001" mov esi, 138Eh xor eax, eax call stmt_set_error jmp loc_63727 loc_63834: mov r8d, 400h loc_6383A: cmp dword ptr [rbx+368h], 0 jz loc_63AB2 xor r12d, r12d loc_6384A: mov [rbp+var_40], r8 mov [rbp+var_38], rdi mov rax, [rbx+390h] test rax, rax jz short loc_63872 mov rdi, [rbx+380h] mov rsi, [rbx+70h] mov edx, r12d call rax mov r13d, [rbx+64h] loc_63872: test r13d, r13d jz short loc_63898 xor r14d, r14d loc_6387A: mov rdi, rbx mov esi, r14d mov rdx, r12 call ma_get_indicator cmp al, 4 jz loc_63A94 inc r14d cmp r13d, r14d jnz short loc_6387A loc_63898: test r13d, r13d jz loc_63A91 xor r15d, r15d xor r14d, r14d mov [rbp+var_30], r12 loc_638AB: mov rdi, rbx mov esi, r14d mov rdx, r12 call ma_get_indicator mov r12d, eax mov rcx, rbx mov bl, 1 mov eax, 1 test r12b, r12b jle short loc_638D8 loc_638CB: mov r13d, r12d mov rdi, [rbp+var_38] mov r9, [rbp+var_40] jmp short loc_6394C loc_638D8: mov rdx, [rcx+70h] movsxd rcx, dword ptr [rdx+r15+60h] cmp rcx, 0F4h mov rdi, [rbp+var_38] mov r9, [rbp+var_40] jle short loc_638FF lea eax, [rcx-0F5h] cmp eax, 0Ah jbe short loc_6392C jmp short loc_63915 loc_638FF: lea esi, [rcx-0Eh] cmp esi, 3 jb short loc_6392C test ecx, ecx jz short loc_6392C mov bl, 1 mov r13b, 1 cmp ecx, 6 jz short loc_6394C loc_63915: mov eax, ecx lea rax, [rax+rax*2] lea rcx, mysql_ps_fetch_functions movsxd rax, dword ptr [rcx+rax*8+8] inc rax jmp short loc_63947 loc_6392C: mov r8, [rbp+var_48] cmp qword ptr [r8+390h], 0 jz loc_639F0 mov rax, [rdx+r15+40h] loc_63943: add rax, 6 loc_63947: xor ebx, ebx mov r13d, r12d loc_6394C: mov rcx, [rbp+var_50] mov r12, rcx sub r12, rdi mov rdx, r9 sub rdx, r12 add rax, 14h cmp rdx, rax jnb short loc_63994 mov rcx, r9 add rcx, r9 add rax, r12 cmp rcx, rax mov rsi, rax cmova rsi, rcx mov [rbp+var_40], rsi call _realloc test rax, rax jz loc_63AC5 mov [rbp+var_38], rax add r12, rax mov rcx, r12 loc_63994: movzx eax, r13b test al, al mov edx, 0 cmovle eax, edx mov [rcx], al inc rcx mov [rbp+var_50], rcx test bl, bl mov rbx, [rbp+var_48] mov r12, [rbp+var_30] jnz short loc_639D7 cmp qword ptr [rbx+390h], 0 mov ecx, 0 cmovz rcx, r12 mov rdi, rbx mov esi, r14d lea rdx, [rbp+var_50] call store_param loc_639D7: inc r14 mov r13d, [rbx+64h] add r15, 70h ; 'p' cmp r14, r13 jb loc_638AB jmp loc_63A94 loc_639F0: cmp r12b, 0FFh jz short loc_63A35 mov rsi, [r8+370h] mov rax, [rdx+r15] test rsi, rsi jz short loc_63A15 test rax, rax jz short loc_63A7D imul rsi, [rbp+var_30] add rax, rsi jmp short loc_63A2D loc_63A15: test rax, rax jz short loc_63A7D mov rsi, [rbp+var_30] cmp qword ptr [rax+rsi*8], 0FFFFFFFFFFFFFFFFh jz short loc_63A35 mov rcx, [rbp+var_30] lea rax, [rax+rcx*8] loc_63A2D: mov rax, [rax] jmp loc_63943 loc_63A35: mov rdi, [rdx+r15+10h] cmp dword ptr [r8+368h], 0 jz short loc_63A6D mov rax, [r8+370h] test rax, rax jnz short loc_63A65 lea rax, [rcx+rcx*2] lea rcx, mysql_ps_fetch_functions movsxd rax, dword ptr [rcx+rax*8+8] test rax, rax jle short loc_63A87 loc_63A65: imul rax, [rbp+var_30] add rdi, rax loc_63A6D: call _strlen add rax, 6 xor ebx, ebx jmp loc_638CB loc_63A7D: mov eax, 6 jmp loc_63947 loc_63A87: mov rax, [rbp+var_30] mov rdi, [rdi+rax*8] jmp short loc_63A6D loc_63A91: xor r13d, r13d loc_63A94: mov rdi, [rbp+var_38] mov r8, [rbp+var_40] inc r12 mov eax, [rbx+368h] cmp r12, rax jb loc_6384A mov rax, [rbp+var_50] loc_63AB2: mov byte ptr [rbx+68h], 0 sub rax, rdi mov rcx, [rbp+var_58] mov [rcx], rax jmp loc_63729 loc_63AC5: mov rbx, [rbp+var_48] mov dword ptr [rbx+108h], 7D8h lea rdi, [rbx+30Dh] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy xor eax, eax mov [rbx+312h], al lea rdi, [rbx+10Ch] lea rax, client_errors mov rsi, [rax+40h] mov edx, 200h call _strncpy xor edi, edi mov [rbx+30Bh], dil mov rax, [rbp+var_58] mov qword ptr [rax], 0 jmp loc_63729
long long ma_stmt_execute_generate_bulk_request(long long a1, _QWORD *a2) { long long v2; // rax long long v3; // rdi unsigned long long v5; // r13 _DWORD *v6; // rax char *v7; // rcx long long v8; // rbx char *v9; // rax long long v10; // r8 long long v11; // rax unsigned long long v12; // rdx int v13; // esi __int16 v14; // bx unsigned long long v15; // r12 void ( *v16)(_QWORD, _QWORD, _QWORD, char *); // rax unsigned int v17; // r14d long long v18; // r15 unsigned long long v19; // r14 long long v20; // r8 char indicator; // r12 long long v22; // rcx char v23; // bl long long v24; // rax char v25; // r13 long long v26; // rdi long long v27; // r9 long long v28; // rdx long long v29; // rcx long long v30; // rax char *v31; // rcx char *v32; // r12 unsigned long long v33; // rax long long v34; // rsi long long v35; // rax char v36; // al bool v37; // zf long long v38; // rcx long long v39; // rsi long long v40; // rax long long *v41; // rax long long v42; // rdi long long v43; // rax long long v44; // rbx char *v46; // [rsp+10h] [rbp-50h] BYREF long long v47; // [rsp+18h] [rbp-48h] long long v48; // [rsp+20h] [rbp-40h] long long v49; // [rsp+28h] [rbp-38h] unsigned long long v50; // [rsp+30h] [rbp-30h] v2 = *(_QWORD *)(a1 + 56); if ( !v2 || (*(_BYTE *)(v2 + 880) & 1) != 0 || (*(_BYTE *)(*(_QWORD *)(v2 + 1264) + 112LL) & 4) == 0 ) { stmt_set_error(a1, 5003, (long long)"IM001", mariadb_client_errors[3], "Bulk operation"); return 0LL; } v5 = *(unsigned int *)(a1 + 100); if ( !*(_DWORD *)(a1 + 100) ) { stmt_set_error(a1, 5006, (long long)"IM001", mariadb_client_errors[6]); return 0LL; } v47 = a1; v6 = (_DWORD *)malloc(1024LL); if ( !v6 ) goto LABEL_73; v3 = (long long)v6; v8 = v47; *v6 = *(_DWORD *)(v47 + 64); LOBYTE(v7) = *(_BYTE *)(v8 + 104); v9 = (char *)v6 + 6; *(_BYTE *)(v3 + 4) = ((_BYTE)v7 != 0) << 7; *(_BYTE *)(v3 + 5) = 0; v46 = v9; if ( (_BYTE)v7 ) { v10 = 1024LL; if ( (unsigned int)(2 * v5 - 999) > 0xFFFFFC04 ) goto LABEL_13; v11 = realloc(v3, (unsigned int)(2 * v5) + 26LL); if ( v11 ) { v3 = v11; v9 = (char *)(v11 + 6); v8 = v47; v10 = (unsigned int)(2 * v5) + 26LL; LABEL_13: v7 = (char *)(*(_QWORD *)(v8 + 112) + 101LL); v12 = 0LL; do { v13 = *(_DWORD *)(v7 - 5); v14 = v13 | ((*v7 != 0) << 15); *v9 = v13; v9[1] = HIBYTE(v14); v9 += 2; ++v12; v7 += 112; } while ( v12 < v5 ); v46 = v9; v8 = v47; goto LABEL_18; } LABEL_73: v44 = v47; *(_DWORD *)(v47 + 264) = 2008; strncpy(v44 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(v44 + 786) = 0; strncpy(v44 + 268, client_errors[8], 512LL); v3 = 0LL; *(_BYTE *)(v44 + 779) = 0; *a2 = 0LL; return v3; } v10 = 1024LL; LABEL_18: if ( !*(_DWORD *)(v8 + 872) ) goto LABEL_72; v15 = 0LL; do { v48 = v10; v49 = v3; v16 = *(void ( **)(_QWORD, _QWORD, _QWORD, char *))(v8 + 912); if ( v16 ) { v16(*(_QWORD *)(v8 + 896), *(_QWORD *)(v8 + 112), (unsigned int)v15, v7); LODWORD(v5) = *(_DWORD *)(v8 + 100); } if ( !(_DWORD)v5 ) { LABEL_26: if ( !(_DWORD)v5 ) { LODWORD(v5) = 0; goto LABEL_70; } v18 = 0LL; v19 = 0LL; v50 = v15; while ( 1 ) { indicator = ma_get_indicator(v8, v19, v15); v22 = v8; v23 = 1; v24 = 1LL; if ( indicator > 0 ) goto LABEL_29; v28 = *(_QWORD *)(v22 + 112); v29 = *(int *)(v28 + v18 + 96); v26 = v49; v27 = v48; if ( v29 <= 244 ) { if ( (unsigned int)(v29 - 14) >= 3 && (_DWORD)v29 ) { v23 = 1; v25 = 1; if ( (_DWORD)v29 == 6 ) goto LABEL_41; LABEL_36: v24 = mysql_ps_fetch_functions[6 * (unsigned int)v29 + 2] + 1LL; goto LABEL_40; } } else if ( (unsigned int)(v29 - 245) > 0xA ) { goto LABEL_36; } v20 = v47; if ( *(_QWORD *)(v47 + 912) ) { v30 = *(_QWORD *)(v28 + v18 + 64); } else { if ( indicator == -1 ) goto LABEL_62; v39 = *(_QWORD *)(v47 + 880); v40 = *(_QWORD *)(v28 + v18); if ( v39 ) { if ( !v40 ) goto LABEL_67; v41 = (long long *)(v50 * v39 + v40); } else { if ( !v40 ) { LABEL_67: v24 = 6LL; goto LABEL_40; } if ( *(_QWORD *)(v40 + 8 * v50) == -1LL ) { LABEL_62: v42 = *(_QWORD *)(v28 + v18 + 16); if ( *(_DWORD *)(v47 + 872) ) { v43 = *(_QWORD *)(v47 + 880); if ( v43 || (v43 = mysql_ps_fetch_functions[6 * v29 + 2], v43 > 0) ) v42 += v50 * v43; else v42 = *(_QWORD *)(v42 + 8 * v50); } v24 = strlen(v42) + 6; v23 = 0; LABEL_29: v25 = indicator; v26 = v49; v27 = v48; goto LABEL_41; } v41 = (long long *)(v40 + 8 * v50); } v30 = *v41; } v24 = v30 + 6; LABEL_40: v23 = 0; v25 = indicator; LABEL_41: v31 = v46; v32 = &v46[-v26]; v33 = v24 + 20; if ( v27 - (long long)&v46[-v26] < v33 ) { v34 = (long long)&v32[v33]; if ( 2 * v27 > (unsigned long long)&v32[v33] ) v34 = 2 * v27; v48 = v34; v35 = realloc(v26, v34); if ( !v35 ) goto LABEL_73; v49 = v35; v31 = &v32[v35]; } v36 = v25; if ( v25 <= 0 ) v36 = 0; *v31 = v36; v7 = v31 + 1; v46 = v7; v37 = v23 == 0; v8 = v47; v15 = v50; if ( v37 ) { v38 = 0LL; if ( !*(_QWORD *)(v47 + 912) ) v38 = v50; store_param(v47, v19, &v46, v38, v20, v27); } ++v19; v5 = *(unsigned int *)(v8 + 100); v18 += 112LL; if ( v19 >= v5 ) goto LABEL_70; } } v17 = 0; while ( ma_get_indicator(v8, v17, v15) != 4 ) { if ( (_DWORD)v5 == ++v17 ) goto LABEL_26; } LABEL_70: v3 = v49; v10 = v48; ++v15; } while ( v15 < *(unsigned int *)(v8 + 872) ); v9 = v46; LABEL_72: *(_BYTE *)(v8 + 104) = 0; *a2 = &v9[-v3]; return v3; }
ma_stmt_execute_generate_bulk_request: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV RAX,qword ptr [RDI + 0x38] TEST RAX,RAX JZ 0x00163702 TEST byte ptr [RAX + 0x370],0x1 JNZ 0x00163702 MOV RAX,qword ptr [RAX + 0x4f0] TEST byte ptr [RAX + 0x70],0x4 JNZ 0x0016373b LAB_00163702: LEA RAX,[0x46dcc0] MOV RCX,qword ptr [RAX + 0x18] LEA RDX,[0x1bdaf6] LEA R8,[0x1bdafc] MOV ESI,0x138b XOR EAX,EAX CALL 0x00162374 LAB_00163727: XOR EDI,EDI LAB_00163729: MOV RAX,RDI ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016373b: MOV R13D,dword ptr [RDI + 0x64] TEST R13,R13 JZ 0x00163811 MOV qword ptr [RBP + -0x58],RSI MOV qword ptr [RBP + -0x48],RDI MOV EDI,0x400 CALL 0x0013aa90 TEST RAX,RAX JZ 0x00163ac5 MOV RDI,RAX MOV RBX,qword ptr [RBP + -0x48] MOV EAX,dword ptr [RBX + 0x40] MOV dword ptr [RDI],EAX MOV CL,byte ptr [RBX + 0x68] TEST CL,CL SETNZ DL SHL DL,0x7 MOV RAX,RDI ADD RAX,0x6 MOV byte ptr [RDI + 0x4],DL MOV byte ptr [RDI + 0x5],0x0 MOV qword ptr [RBP + -0x50],RAX TEST CL,CL JZ 0x00163834 LEA ECX,[-0x3e7 + R13*0x2] MOV R8D,0x400 CMP ECX,0xfffffc04 JA 0x001637d7 LEA EAX,[R13*0x2] MOV ESI,EAX ADD RSI,0x1a MOV R14,RSI CALL 0x0013a0f0 TEST RAX,RAX JZ 0x00163ac5 MOV RDI,RAX ADD RAX,0x6 MOV RBX,qword ptr [RBP + -0x48] MOV R8,R14 LAB_001637d7: MOV RCX,qword ptr [RBX + 0x70] ADD RCX,0x65 XOR EDX,EDX LAB_001637e1: MOV ESI,dword ptr [RCX + -0x5] XOR EBX,EBX CMP byte ptr [RCX],0x0 SETNZ BL SHL EBX,0xf OR EBX,ESI MOV byte ptr [RAX],SIL MOV byte ptr [RAX + 0x1],BH ADD RAX,0x2 INC RDX ADD RCX,0x70 CMP RDX,R13 JC 0x001637e1 MOV qword ptr [RBP + -0x50],RAX MOV RBX,qword ptr [RBP + -0x48] JMP 0x0016383a LAB_00163811: LEA RAX,[0x46dcc0] MOV RCX,qword ptr [RAX + 0x30] LEA RDX,[0x1bdaf6] MOV ESI,0x138e XOR EAX,EAX CALL 0x00162374 JMP 0x00163727 LAB_00163834: MOV R8D,0x400 LAB_0016383a: CMP dword ptr [RBX + 0x368],0x0 JZ 0x00163ab2 XOR R12D,R12D LAB_0016384a: MOV qword ptr [RBP + -0x40],R8 MOV qword ptr [RBP + -0x38],RDI MOV RAX,qword ptr [RBX + 0x390] TEST RAX,RAX JZ 0x00163872 MOV RDI,qword ptr [RBX + 0x380] MOV RSI,qword ptr [RBX + 0x70] MOV EDX,R12D CALL RAX MOV R13D,dword ptr [RBX + 0x64] LAB_00163872: TEST R13D,R13D JZ 0x00163898 XOR R14D,R14D LAB_0016387a: MOV RDI,RBX MOV ESI,R14D MOV RDX,R12 CALL 0x001632ee CMP AL,0x4 JZ 0x00163a94 INC R14D CMP R13D,R14D JNZ 0x0016387a LAB_00163898: TEST R13D,R13D JZ 0x00163a91 XOR R15D,R15D XOR R14D,R14D MOV qword ptr [RBP + -0x30],R12 LAB_001638ab: MOV RDI,RBX MOV ESI,R14D MOV RDX,R12 CALL 0x001632ee MOV R12D,EAX MOV RCX,RBX MOV BL,0x1 MOV EAX,0x1 TEST R12B,R12B JLE 0x001638d8 LAB_001638cb: MOV R13D,R12D MOV RDI,qword ptr [RBP + -0x38] MOV R9,qword ptr [RBP + -0x40] JMP 0x0016394c LAB_001638d8: MOV RDX,qword ptr [RCX + 0x70] MOVSXD RCX,dword ptr [RDX + R15*0x1 + 0x60] CMP RCX,0xf4 MOV RDI,qword ptr [RBP + -0x38] MOV R9,qword ptr [RBP + -0x40] JLE 0x001638ff LEA EAX,[RCX + -0xf5] CMP EAX,0xa JBE 0x0016392c JMP 0x00163915 LAB_001638ff: LEA ESI,[RCX + -0xe] CMP ESI,0x3 JC 0x0016392c TEST ECX,ECX JZ 0x0016392c MOV BL,0x1 MOV R13B,0x1 CMP ECX,0x6 JZ 0x0016394c LAB_00163915: MOV EAX,ECX LEA RAX,[RAX + RAX*0x2] LEA RCX,[0x4e6cf0] MOVSXD RAX,dword ptr [RCX + RAX*0x8 + 0x8] INC RAX JMP 0x00163947 LAB_0016392c: MOV R8,qword ptr [RBP + -0x48] CMP qword ptr [R8 + 0x390],0x0 JZ 0x001639f0 MOV RAX,qword ptr [RDX + R15*0x1 + 0x40] LAB_00163943: ADD RAX,0x6 LAB_00163947: XOR EBX,EBX MOV R13D,R12D LAB_0016394c: MOV RCX,qword ptr [RBP + -0x50] MOV R12,RCX SUB R12,RDI MOV RDX,R9 SUB RDX,R12 ADD RAX,0x14 CMP RDX,RAX JNC 0x00163994 MOV RCX,R9 ADD RCX,R9 ADD RAX,R12 CMP RCX,RAX MOV RSI,RAX CMOVA RSI,RCX MOV qword ptr [RBP + -0x40],RSI CALL 0x0013a0f0 TEST RAX,RAX JZ 0x00163ac5 MOV qword ptr [RBP + -0x38],RAX ADD R12,RAX MOV RCX,R12 LAB_00163994: MOVZX EAX,R13B TEST AL,AL MOV EDX,0x0 CMOVLE EAX,EDX MOV byte ptr [RCX],AL INC RCX MOV qword ptr [RBP + -0x50],RCX TEST BL,BL MOV RBX,qword ptr [RBP + -0x48] MOV R12,qword ptr [RBP + -0x30] JNZ 0x001639d7 CMP qword ptr [RBX + 0x390],0x0 MOV ECX,0x0 CMOVZ RCX,R12 MOV RDI,RBX MOV ESI,R14D LEA RDX,[RBP + -0x50] CALL 0x00162eb1 LAB_001639d7: INC R14 MOV R13D,dword ptr [RBX + 0x64] ADD R15,0x70 CMP R14,R13 JC 0x001638ab JMP 0x00163a94 LAB_001639f0: CMP R12B,0xff JZ 0x00163a35 MOV RSI,qword ptr [R8 + 0x370] MOV RAX,qword ptr [RDX + R15*0x1] TEST RSI,RSI JZ 0x00163a15 TEST RAX,RAX JZ 0x00163a7d IMUL RSI,qword ptr [RBP + -0x30] ADD RAX,RSI JMP 0x00163a2d LAB_00163a15: TEST RAX,RAX JZ 0x00163a7d MOV RSI,qword ptr [RBP + -0x30] CMP qword ptr [RAX + RSI*0x8],-0x1 JZ 0x00163a35 MOV RCX,qword ptr [RBP + -0x30] LEA RAX,[RAX + RCX*0x8] LAB_00163a2d: MOV RAX,qword ptr [RAX] JMP 0x00163943 LAB_00163a35: MOV RDI,qword ptr [RDX + R15*0x1 + 0x10] CMP dword ptr [R8 + 0x368],0x0 JZ 0x00163a6d MOV RAX,qword ptr [R8 + 0x370] TEST RAX,RAX JNZ 0x00163a65 LEA RAX,[RCX + RCX*0x2] LEA RCX,[0x4e6cf0] MOVSXD RAX,dword ptr [RCX + RAX*0x8 + 0x8] TEST RAX,RAX JLE 0x00163a87 LAB_00163a65: IMUL RAX,qword ptr [RBP + -0x30] ADD RDI,RAX LAB_00163a6d: CALL 0x0013a4c0 ADD RAX,0x6 XOR EBX,EBX JMP 0x001638cb LAB_00163a7d: MOV EAX,0x6 JMP 0x00163947 LAB_00163a87: MOV RAX,qword ptr [RBP + -0x30] MOV RDI,qword ptr [RDI + RAX*0x8] JMP 0x00163a6d LAB_00163a91: XOR R13D,R13D LAB_00163a94: MOV RDI,qword ptr [RBP + -0x38] MOV R8,qword ptr [RBP + -0x40] INC R12 MOV EAX,dword ptr [RBX + 0x368] CMP R12,RAX JC 0x0016384a MOV RAX,qword ptr [RBP + -0x50] LAB_00163ab2: MOV byte ptr [RBX + 0x68],0x0 SUB RAX,RDI MOV RCX,qword ptr [RBP + -0x58] MOV qword ptr [RCX],RAX JMP 0x00163729 LAB_00163ac5: MOV RBX,qword ptr [RBP + -0x48] MOV dword ptr [RBX + 0x108],0x7d8 LEA RDI,[RBX + 0x30d] LEA RAX,[0x46dab0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x0013a1a0 XOR EAX,EAX MOV byte ptr [RBX + 0x312],AL LEA RDI,[RBX + 0x10c] LEA RAX,[0x46dac0] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x200 CALL 0x0013a1a0 XOR EDI,EDI MOV byte ptr [RBX + 0x30b],DIL MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RAX],0x0 JMP 0x00163729
int4 * ma_stmt_execute_generate_bulk_request(long param_1,long *param_2) { uint uVar1; int4 uVar2; bool bVar3; char cVar4; char cVar5; int4 *puVar6; long lVar7; char *pcVar8; ulong uVar9; ulong uVar10; size_t sVar11; long lVar12; int iVar13; int iVar14; ulong uVar15; long lVar16; char *local_58; long local_50; size_t local_48; int4 *local_40; ulong local_38; lVar12 = *(long *)(param_1 + 0x38); if (((lVar12 == 0) || ((*(byte *)(lVar12 + 0x370) & 1) != 0)) || ((*(byte *)(*(long *)(lVar12 + 0x4f0) + 0x70) & 4) == 0)) { stmt_set_error(param_1,0x138b,"IM001",mariadb_client_errors._24_8_,"Bulk operation"); } else { uVar1 = *(uint *)(param_1 + 100); uVar9 = (ulong)uVar1; if (uVar9 != 0) { local_50 = param_1; puVar6 = (int4 *)malloc(0x400); if (puVar6 != (int4 *)0x0) { *puVar6 = *(int4 *)(local_50 + 0x40); cVar4 = *(char *)(local_50 + 0x68); local_58 = (char *)((long)puVar6 + 6); *(char *)(puVar6 + 1) = (cVar4 != '\0') << 7; *(int1 *)((long)puVar6 + 5) = 0; if (cVar4 == '\0') { local_40 = puVar6; local_48 = 0x400; } else { sVar11 = 0x400; if (uVar1 * 2 - 999 < 0xfffffc05) { sVar11 = (ulong)(uVar1 * 2) + 0x1a; puVar6 = (int4 *)realloc(puVar6,sVar11); if (puVar6 == (int4 *)0x0) goto LAB_00163ac5; local_58 = (char *)((long)puVar6 + 6); } pcVar8 = (char *)(*(long *)(local_50 + 0x70) + 0x65); uVar10 = 0; do { uVar2 = *(int4 *)(pcVar8 + -5); cVar4 = *pcVar8; *local_58 = (char)uVar2; local_58[1] = (byte)(((uint)(cVar4 != '\0') << 0xf) >> 8) | (byte)((uint)uVar2 >> 8); local_58 = local_58 + 2; uVar10 = uVar10 + 1; pcVar8 = pcVar8 + 0x70; local_40 = puVar6; local_48 = sVar11; } while (uVar10 < uVar9); } lVar12 = local_50; if (*(int *)(local_50 + 0x368) != 0) { uVar10 = 0; do { if (*(code **)(lVar12 + 0x390) != (code *)0x0) { (**(code **)(lVar12 + 0x390)) (*(int8 *)(lVar12 + 0x380),*(int8 *)(lVar12 + 0x70), uVar10 & 0xffffffff); uVar9 = (ulong)*(uint *)(lVar12 + 100); } iVar13 = (int)uVar9; if (iVar13 != 0) { iVar14 = 0; do { cVar4 = ma_get_indicator(lVar12,iVar14,uVar10); if (cVar4 == '\x04') goto LAB_00163a94; iVar14 = iVar14 + 1; } while (iVar13 != iVar14); } if (iVar13 == 0) { uVar9 = 0; } else { lVar16 = 0; uVar15 = 0; local_38 = uVar10; do { cVar5 = ma_get_indicator(lVar12,uVar15 & 0xffffffff,uVar10); bVar3 = true; lVar7 = 1; cVar4 = cVar5; if (cVar5 < '\x01') { lVar12 = *(long *)(lVar12 + 0x70); uVar1 = *(uint *)(lVar12 + 0x60 + lVar16); if ((long)(int)uVar1 < 0xf5) { if ((uVar1 - 0xe < 3) || (uVar1 == 0)) goto LAB_0016392c; bVar3 = true; cVar4 = '\x01'; if (uVar1 != 6) goto LAB_00163915; } else { if (uVar1 - 0xf5 < 0xb) { LAB_0016392c: if (*(long *)(local_50 + 0x390) == 0) { if (cVar5 == -1) { LAB_00163a35: pcVar8 = *(char **)(lVar12 + 0x10 + lVar16); if (*(int *)(local_50 + 0x368) != 0) { lVar12 = *(long *)(local_50 + 0x370); if ((lVar12 == 0) && (lVar12 = (long)(int)(&DAT_004e6cf8)[(long)(int)uVar1 * 6], lVar12 < 1)) { pcVar8 = *(char **)(pcVar8 + local_38 * 8); } else { pcVar8 = pcVar8 + lVar12 * local_38; } } sVar11 = strlen(pcVar8); lVar7 = sVar11 + 6; bVar3 = false; goto LAB_0016394c; } lVar7 = *(long *)(lVar12 + lVar16); if (*(long *)(local_50 + 0x370) == 0) { if (lVar7 == 0) goto LAB_00163a7d; if (*(long *)(lVar7 + local_38 * 8) == -1) goto LAB_00163a35; lVar12 = local_38 * 8; } else { if (lVar7 == 0) { LAB_00163a7d: lVar7 = 6; goto LAB_00163947; } lVar12 = *(long *)(local_50 + 0x370) * local_38; } lVar7 = *(long *)(lVar7 + lVar12); } else { lVar7 = *(long *)(lVar12 + 0x40 + lVar16); } lVar7 = lVar7 + 6; } else { LAB_00163915: lVar7 = (long)(int)(&DAT_004e6cf8)[(ulong)uVar1 * 6] + 1; } LAB_00163947: bVar3 = false; cVar4 = cVar5; } } LAB_0016394c: lVar12 = (long)local_58 - (long)local_40; if (local_48 - lVar12 < lVar7 + 0x14U) { uVar9 = local_48 * 2; local_48 = lVar7 + 0x14U + lVar12; if (local_48 < uVar9) { local_48 = uVar9; } puVar6 = (int4 *)realloc(local_40,local_48); if (puVar6 == (int4 *)0x0) goto LAB_00163ac5; local_58 = (char *)(lVar12 + (long)puVar6); local_40 = puVar6; } uVar10 = local_38; lVar12 = local_50; if (cVar4 < '\x01') { cVar4 = '\0'; } *local_58 = cVar4; local_58 = local_58 + 1; if (!bVar3) { uVar9 = 0; if (*(long *)(local_50 + 0x390) == 0) { uVar9 = local_38; } store_param(local_50,uVar15 & 0xffffffff,&local_58,uVar9); } uVar15 = uVar15 + 1; uVar9 = (ulong)*(uint *)(lVar12 + 100); lVar16 = lVar16 + 0x70; } while (uVar15 < uVar9); } LAB_00163a94: uVar10 = uVar10 + 1; } while (uVar10 < *(uint *)(lVar12 + 0x368)); } *(int1 *)(lVar12 + 0x68) = 0; *param_2 = (long)local_58 - (long)local_40; return local_40; } LAB_00163ac5: lVar12 = local_50; *(int4 *)(local_50 + 0x108) = 0x7d8; strncpy((char *)(local_50 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(lVar12 + 0x312) = 0; strncpy((char *)(lVar12 + 0x10c),PTR_s_Client_run_out_of_memory_0046db00,0x200); *(int1 *)(lVar12 + 0x30b) = 0; *param_2 = 0; return (int4 *)0x0; } stmt_set_error(param_1,0x138e,"IM001",mariadb_client_errors._48_8_); } return (int4 *)0x0; }
25,578
testing::internal::AlwaysTrue()
seiftnesse[P]memoryallocator/build_O0/_deps/googletest-src/googletest/src/gtest.cc
bool AlwaysTrue() { #if GTEST_HAS_EXCEPTIONS // This condition is always false so AlwaysTrue() never actually throws, // but it makes the compiler think that it may throw. if (IsTrue(false)) throw ClassUniqueToAlwaysTrue(); #endif // GTEST_HAS_EXCEPTIONS return true; }
O0
cpp
testing::internal::AlwaysTrue(): pushq %rbp movq %rsp, %rbp xorl %edi, %edi callq 0x21ef0 testb $0x1, %al jne 0x2dac1 jmp 0x2dade movl $0x1, %edi callq 0xb320 movq %rax, %rdi leaq 0x753ab(%rip), %rsi # 0xa2e80 xorl %eax, %eax movl %eax, %edx callq 0xbc80 movb $0x1, %al andb $0x1, %al popq %rbp retq nopw %cs:(%rax,%rax)
_ZN7testing8internal10AlwaysTrueEv: push rbp mov rbp, rsp xor edi, edi; this call _ZN7testing8internal6IsTrueEb; testing::internal::IsTrue(bool) test al, 1 jnz short loc_2DAC1 jmp short loc_2DADE loc_2DAC1: mov edi, 1; thrown_size call ___cxa_allocate_exception mov rdi, rax; void * lea rsi, _ZTIN7testing8internal12_GLOBAL__N_123ClassUniqueToAlwaysTrueE; lptinfo xor eax, eax mov edx, eax; void (*)(void *) call ___cxa_throw loc_2DADE: mov al, 1 and al, 1 pop rbp retn
char testing::internal::AlwaysTrue(testing::internal *this) { void *exception; // rax if ( (testing::internal::IsTrue(0LL) & 1) != 0 ) { exception = __cxa_allocate_exception(1uLL); __cxa_throw( exception, (struct type_info *)&`typeinfo for'testing::internal::`anonymous namespace'::ClassUniqueToAlwaysTrue, 0LL); } return 1; }
AlwaysTrue: PUSH RBP MOV RBP,RSP XOR EDI,EDI CALL 0x00121ef0 TEST AL,0x1 JNZ 0x0012dac1 JMP 0x0012dade LAB_0012dac1: MOV EDI,0x1 CALL 0x0010b320 MOV RDI,RAX LEA RSI,[0x1a2e80] XOR EAX,EAX MOV EDX,EAX CALL 0x0010bc80 LAB_0012dade: MOV AL,0x1 AND AL,0x1 POP RBP RET
/* testing::internal::AlwaysTrue() */ int8 testing::internal::AlwaysTrue(void) { ulong uVar1; int8 uVar2; uVar1 = IsTrue(false); if ((uVar1 & 1) == 0) { return 1; } uVar2 = __cxa_allocate_exception(1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&(anonymous_namespace)::ClassUniqueToAlwaysTrue::typeinfo,0); }
25,579
unsigned __int128 fmt::v10::detail::bit_cast<unsigned __int128, long double, 0>(long double const&)
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h
FMT_CONSTEXPR20 auto bit_cast(const From& from) -> To { #ifdef __cpp_lib_bit_cast if (is_constant_evaluated()) return std::bit_cast<To>(from); #endif auto to = To(); // The cast suppresses a bogus -Wclass-memaccess on GCC. std::memcpy(static_cast<void*>(&to), &from, sizeof(to)); return to; }
O0
c
unsigned __int128 fmt::v10::detail::bit_cast<unsigned __int128, long double, 0>(long double const&): movq %rdi, -0x20(%rsp) movq $0x0, -0x30(%rsp) movq $0x0, -0x38(%rsp) movq -0x20(%rsp), %rax movups (%rax), %xmm0 movaps %xmm0, -0x38(%rsp) movq -0x38(%rsp), %rax movq -0x30(%rsp), %rcx movq %rcx, -0x10(%rsp) movq %rax, -0x18(%rsp) movq -0x18(%rsp), %rax movq -0x10(%rsp), %rdx retq nopw %cs:(%rax,%rax) nopl (%rax)
_ZN3fmt3v106detail8bit_castIoeTnNSt9enable_ifIXeqstT_stT0_EiE4typeELi0EEES4_RKS5_: mov [rsp+var_20], rdi mov qword ptr [rsp+var_38+8], 0 mov qword ptr [rsp+var_38], 0 mov rax, [rsp+var_20] movups xmm0, xmmword ptr [rax] movaps [rsp+var_38], xmm0 mov rax, qword ptr [rsp+var_38] mov rcx, qword ptr [rsp+var_38+8] mov [rsp+var_10], rcx mov [rsp+var_18], rax mov rax, [rsp+var_18] mov rdx, [rsp+var_10] retn
long long ZN3fmt3v106detail8bit_castIoeTnNSt9enable_ifIXeqstT_stT0_EiE4typeELi0EEES4_RKS5_(long long a1) { return *(_OWORD *)a1; }
_ZN3fmt3v106detail8bit_castIoeTnNSt9enable_ifIXeqstT_stT0_EiE4typeELi0EEES4_RKS5_: MOV qword ptr [RSP + -0x20],RDI MOV qword ptr [RSP + -0x30],0x0 MOV qword ptr [RSP + -0x38],0x0 MOV RAX,qword ptr [RSP + -0x20] MOVUPS XMM0,xmmword ptr [RAX] MOVAPS xmmword ptr [RSP + -0x38],XMM0 MOV RAX,qword ptr [RSP + -0x38] MOV RCX,qword ptr [RSP + -0x30] MOV qword ptr [RSP + -0x10],RCX MOV qword ptr [RSP + -0x18],RAX MOV RAX,qword ptr [RSP + -0x18] MOV RDX,qword ptr [RSP + -0x10] RET
int1 [16] _ZN3fmt3v106detail8bit_castIoeTnNSt9enable_ifIXeqstT_stT0_EiE4typeELi0EEES4_RKS5_ (int1 (*param_1) [16]) { return *param_1; }
25,580
common_sampler_type_to_chr(common_sampler_type)
monkey531[P]llama/common/sampling.cpp
char common_sampler_type_to_chr(enum common_sampler_type cnstr) { switch (cnstr) { case COMMON_SAMPLER_TYPE_DRY: return 'd'; case COMMON_SAMPLER_TYPE_TOP_K: return 'k'; case COMMON_SAMPLER_TYPE_TYPICAL_P: return 'y'; case COMMON_SAMPLER_TYPE_TOP_P: return 'p'; case COMMON_SAMPLER_TYPE_MIN_P: return 'm'; case COMMON_SAMPLER_TYPE_TEMPERATURE: return 't'; case COMMON_SAMPLER_TYPE_XTC: return 'x'; case COMMON_SAMPLER_TYPE_INFILL: return 'i'; case COMMON_SAMPLER_TYPE_PENALTIES: return 'e'; default : return '?'; } }
O2
cpp
common_sampler_type_to_chr(common_sampler_type): decl %edi movb $0x3f, %al cmpl $0x9, %edi ja 0x9adc3 movl %edi, %eax leaq 0x2052c(%rip), %rcx # 0xbb2ec movb (%rax,%rcx), %al retq
_Z26common_sampler_type_to_chr19common_sampler_type: dec edi mov al, 3Fh ; '?' cmp edi, 9 ja short locret_9ADC3 mov eax, edi lea rcx, aDkpmYtxie; "dkpm?ytxie" mov al, [rax+rcx] locret_9ADC3: retn
char common_sampler_type_to_chr(int a1) { unsigned int v1; // edi char result; // al v1 = a1 - 1; result = 63; if ( v1 <= 9 ) return aDkpmYtxie[v1]; return result; }
common_sampler_type_to_chr: DEC EDI MOV AL,0x3f CMP EDI,0x9 JA 0x0019adc3 MOV EAX,EDI LEA RCX,[0x1bb2ec] MOV AL,byte ptr [RAX + RCX*0x1] LAB_0019adc3: RET
/* common_sampler_type_to_chr(common_sampler_type) */ char common_sampler_type_to_chr(int param_1) { char cVar1; cVar1 = '?'; if (param_1 - 1U < 10) { cVar1 = "dkpm?ytxie"[param_1 - 1U]; } return cVar1; }
25,581
common_sampler_type_to_chr(common_sampler_type)
monkey531[P]llama/common/sampling.cpp
char common_sampler_type_to_chr(enum common_sampler_type cnstr) { switch (cnstr) { case COMMON_SAMPLER_TYPE_DRY: return 'd'; case COMMON_SAMPLER_TYPE_TOP_K: return 'k'; case COMMON_SAMPLER_TYPE_TYPICAL_P: return 'y'; case COMMON_SAMPLER_TYPE_TOP_P: return 'p'; case COMMON_SAMPLER_TYPE_MIN_P: return 'm'; case COMMON_SAMPLER_TYPE_TEMPERATURE: return 't'; case COMMON_SAMPLER_TYPE_XTC: return 'x'; case COMMON_SAMPLER_TYPE_INFILL: return 'i'; case COMMON_SAMPLER_TYPE_PENALTIES: return 'e'; default : return '?'; } }
O3
cpp
common_sampler_type_to_chr(common_sampler_type): decl %edi movb $0x3f, %al cmpl $0x9, %edi ja 0xd0b08 movl %edi, %eax leaq 0x2680b(%rip), %rcx # 0xf7310 movb (%rax,%rcx), %al retq
_Z26common_sampler_type_to_chr19common_sampler_type: dec edi mov al, 3Fh ; '?' cmp edi, 9 ja short locret_D0B08 mov eax, edi lea rcx, aDkpmYtxie; "dkpm?ytxie" mov al, [rax+rcx] locret_D0B08: retn
char common_sampler_type_to_chr(int a1) { unsigned int v1; // edi char result; // al v1 = a1 - 1; result = 63; if ( v1 <= 9 ) return aDkpmYtxie[v1]; return result; }
common_sampler_type_to_chr: DEC EDI MOV AL,0x3f CMP EDI,0x9 JA 0x001d0b08 MOV EAX,EDI LEA RCX,[0x1f7310] MOV AL,byte ptr [RAX + RCX*0x1] LAB_001d0b08: RET
/* common_sampler_type_to_chr(common_sampler_type) */ char common_sampler_type_to_chr(int param_1) { char cVar1; cVar1 = '?'; if (param_1 - 1U < 10) { cVar1 = "dkpm?ytxie"[param_1 - 1U]; } return cVar1; }
25,582
ELFIO::endianess_convertor::operator()(unsigned short) const
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/include/elfio/elfio_utils.hpp
uint16_t operator()( uint16_t value ) const { if ( !need_conversion ) { return value; } value = ( ( value & 0x00FF ) << 8 ) | ( ( value & 0xFF00 ) >> 8 ); return value; }
O0
cpp
ELFIO::endianess_convertor::operator()(unsigned short) const: movw %si, %ax movq %rdi, -0x10(%rsp) movw %ax, -0x12(%rsp) movq -0x10(%rsp), %rax testb $0x1, (%rax) jne 0x17a13 movw -0x12(%rsp), %ax movw %ax, -0x2(%rsp) jmp 0x17a3f movzwl -0x12(%rsp), %eax andl $0xff, %eax shll $0x8, %eax movzwl -0x12(%rsp), %ecx andl $0xff00, %ecx # imm = 0xFF00 sarl $0x8, %ecx orl %ecx, %eax movw %ax, -0x12(%rsp) movw -0x12(%rsp), %ax movw %ax, -0x2(%rsp) movw -0x2(%rsp), %ax retq nopw %cs:(%rax,%rax) nop
_ZNK5ELFIO19endianess_convertorclEt: mov ax, si mov [rsp+var_10], rdi mov [rsp+var_12], ax mov rax, [rsp+var_10] test byte ptr [rax], 1 jnz short loc_17A13 mov ax, [rsp+var_12] mov [rsp+var_2], ax jmp short loc_17A3F loc_17A13: movzx eax, [rsp+var_12] and eax, 0FFh shl eax, 8 movzx ecx, [rsp+var_12] and ecx, 0FF00h sar ecx, 8 or eax, ecx mov [rsp+var_12], ax mov ax, [rsp+var_12] mov [rsp+var_2], ax loc_17A3F: mov ax, [rsp+var_2] retn
__int16 ELFIO::endianess_convertor::operator()(_BYTE *a1, __int16 a2) { __int16 v3; // [rsp+0h] [rbp-12h] v3 = a2; if ( (*a1 & 1) != 0 ) return ((a2 & 0xFF00) >> 8) | ((unsigned __int8)a2 << 8); return v3; }
operator(): MOV AX,SI MOV qword ptr [RSP + -0x10],RDI MOV word ptr [RSP + -0x12],AX MOV RAX,qword ptr [RSP + -0x10] TEST byte ptr [RAX],0x1 JNZ 0x00117a13 MOV AX,word ptr [RSP + -0x12] MOV word ptr [RSP + -0x2],AX JMP 0x00117a3f LAB_00117a13: MOVZX EAX,word ptr [RSP + -0x12] AND EAX,0xff SHL EAX,0x8 MOVZX ECX,word ptr [RSP + -0x12] AND ECX,0xff00 SAR ECX,0x8 OR EAX,ECX MOV word ptr [RSP + -0x12],AX MOV AX,word ptr [RSP + -0x12] MOV word ptr [RSP + -0x2],AX LAB_00117a3f: MOV AX,word ptr [RSP + -0x2] RET
/* ELFIO::endianess_convertor::TEMPNAMEPLACEHOLDERVALUE(unsigned short) const */ int8 __thiscall ELFIO::endianess_convertor::operator()(endianess_convertor *this,ushort param_1) { int6 uVar1; int2 local_2; if (((byte)*this & 1) == 0) { uVar1 = (int6)((ulong)this >> 0x10); local_2 = param_1; } else { local_2 = (ushort)((param_1 & 0xff) << 8) | param_1 >> 8; uVar1 = 0; } return CONCAT62(uVar1,local_2); }
25,583
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 0x307e8 movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x30836 movb %sil, (%rdx) movl $0x1, %eax jmp 0x30836 xorl %eax, %eax cmpq $0xffff, %rsi # imm = 0xFFFF ja 0x30836 leaq 0x67386(%rip), %rdi # 0x97b80 movzwl (%rdi,%rsi,2), %esi testw %si, %si je 0x30836 movzwl %si, %eax cmpl $0xff, %eax ja 0x3081c movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x30836 movb %sil, (%rdx) jmp 0x307e1 leaq 0x2(%rdx), %rdi movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %rdi ja 0x30836 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_307E8 mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short loc_30836 mov [rdx], sil loc_307E1: mov eax, 1 jmp short loc_30836 loc_307E8: xor eax, eax cmp rsi, 0FFFFh ja short loc_30836 lea rdi, unicode_to_cp932 movzx esi, word ptr [rdi+rsi*2] test si, si jz short loc_30836 movzx eax, si cmp eax, 0FFh ja short loc_3081C mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short loc_30836 mov [rdx], sil jmp short loc_307E1 loc_3081C: lea rdi, [rdx+2] mov eax, 0FFFFFF9Ah cmp rdi, rcx ja short loc_30836 rol si, 8 mov [rdx], si mov eax, 2 loc_30836: 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 0x001307e8 MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x00130836 MOV byte ptr [RDX],SIL LAB_001307e1: MOV EAX,0x1 JMP 0x00130836 LAB_001307e8: XOR EAX,EAX CMP RSI,0xffff JA 0x00130836 LEA RDI,[0x197b80] MOVZX ESI,word ptr [RDI + RSI*0x2] TEST SI,SI JZ 0x00130836 MOVZX EAX,SI CMP EAX,0xff JA 0x0013081c MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x00130836 MOV byte ptr [RDX],SIL JMP 0x001307e1 LAB_0013081c: LEA RDI,[RDX + 0x2] MOV EAX,0xffffff9a CMP RDI,RCX JA 0x00130836 ROL SI,0x8 MOV word ptr [RDX],SI MOV EAX,0x2 LAB_00130836: 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; }
25,584
bitmap_intersect
eloqsql/mysys/my_bitmap.c
void bitmap_intersect(MY_BITMAP *map, const MY_BITMAP *map2) { my_bitmap_map *to= map->bitmap, *from= map2->bitmap, *end; uint len= no_words_in_map(map), len2 = no_words_in_map(map2); DBUG_ASSERT(map->bitmap); DBUG_ASSERT(map2->bitmap); end= to+MY_MIN(len,len2); while (to < end) *to++ &= *from++; if (len2 <= len) { to[-1]&= ~map2->last_word_mask; /* Clear last not relevant bits */ end+= len-len2; while (to < end) *to++= 0; } }
O3
c
bitmap_intersect: pushq %rbp movq %rsp, %rbp pushq %rbx movq (%rdi), %rax movl 0x1c(%rdi), %ecx addl $0x1f, %ecx shrl $0x5, %ecx movl 0x1c(%rsi), %r9d addl $0x1f, %r9d shrl $0x5, %r9d cmpl %r9d, %ecx movl %r9d, %r8d cmovbl %ecx, %r8d leaq (%rax,%r8,4), %r10 testl %r8d, %r8d je 0xa2533 movq (%rsi), %r11 movq %rax, %rdx movq %rax, %rdi movl (%r11), %ebx andl %ebx, (%rdi) addq $0x4, %r11 addq $0x4, %rdi addq $0x4, %rdx cmpq %r10, %rdi jb 0xa251b jmp 0xa2539 movq %rax, %rdx movq %rax, %rdi subl %r9d, %ecx jb 0xa2578 movl 0x18(%rsi), %esi notl %esi andl %esi, -0x4(%rdi) leaq (%r10,%rcx,4), %rsi cmpq %rsi, %rdi jae 0xa2578 addq %r8, %rcx leaq (%rax,%rcx,4), %rax leaq 0x4(%rdx), %rcx cmpq %rcx, %rax cmovaq %rax, %rcx notq %rdx addq %rcx, %rdx andq $-0x4, %rdx addq $0x4, %rdx xorl %esi, %esi popq %rbx popq %rbp jmp 0x2a290 popq %rbx popq %rbp retq
bitmap_intersect: push rbp mov rbp, rsp push rbx mov rax, [rdi] mov ecx, [rdi+1Ch] add ecx, 1Fh shr ecx, 5 mov r9d, [rsi+1Ch] add r9d, 1Fh shr r9d, 5 cmp ecx, r9d mov r8d, r9d cmovb r8d, ecx lea r10, [rax+r8*4] test r8d, r8d jz short loc_A2533 mov r11, [rsi] mov rdx, rax mov rdi, rax loc_A251B: mov ebx, [r11] and [rdi], ebx add r11, 4 add rdi, 4 add rdx, 4 cmp rdi, r10 jb short loc_A251B jmp short loc_A2539 loc_A2533: mov rdx, rax mov rdi, rax loc_A2539: sub ecx, r9d jb short loc_A2578 mov esi, [rsi+18h] not esi and [rdi-4], esi lea rsi, [r10+rcx*4] cmp rdi, rsi jnb short loc_A2578 add rcx, r8 lea rax, [rax+rcx*4] lea rcx, [rdx+4] cmp rax, rcx cmova rcx, rax not rdx add rdx, rcx and rdx, 0FFFFFFFFFFFFFFFCh add rdx, 4 xor esi, esi pop rbx pop rbp jmp _memset loc_A2578: pop rbx pop rbp retn
long long bitmap_intersect(long long a1, long long a2) { long long result; // rax unsigned int v3; // ecx unsigned int v4; // r9d long long v5; // r8 unsigned long long v6; // r10 _DWORD *v7; // r11 long long v8; // rdx _DWORD *v9; // rdi bool v10; // cf unsigned int v11; // ecx unsigned long long v12; // rax unsigned long long v13; // rcx result = *(_QWORD *)a1; v3 = (unsigned int)(*(_DWORD *)(a1 + 28) + 31) >> 5; v4 = (unsigned int)(*(_DWORD *)(a2 + 28) + 31) >> 5; v5 = v4; if ( v3 < v4 ) v5 = v3; v6 = result + 4 * v5; if ( (_DWORD)v5 ) { v7 = *(_DWORD **)a2; v8 = *(_QWORD *)a1; v9 = *(_DWORD **)a1; do { *v9++ &= *v7++; v8 += 4LL; } while ( (unsigned long long)v9 < v6 ); } else { v8 = *(_QWORD *)a1; v9 = *(_DWORD **)a1; } v10 = v3 < v4; v11 = v3 - v4; if ( !v10 ) { *(v9 - 1) &= ~*(_DWORD *)(a2 + 24); if ( (unsigned long long)v9 < v6 + 4LL * v11 ) { v12 = result + 4 * (v5 + v11); v13 = v8 + 4; if ( v12 > v8 + 4 ) v13 = v12; return memset(v9, 0LL, ((v13 + ~v8) & 0xFFFFFFFFFFFFFFFCLL) + 4); } } return result; }
bitmap_intersect: PUSH RBP MOV RBP,RSP PUSH RBX MOV RAX,qword ptr [RDI] MOV ECX,dword ptr [RDI + 0x1c] ADD ECX,0x1f SHR ECX,0x5 MOV R9D,dword ptr [RSI + 0x1c] ADD R9D,0x1f SHR R9D,0x5 CMP ECX,R9D MOV R8D,R9D CMOVC R8D,ECX LEA R10,[RAX + R8*0x4] TEST R8D,R8D JZ 0x001a2533 MOV R11,qword ptr [RSI] MOV RDX,RAX MOV RDI,RAX LAB_001a251b: MOV EBX,dword ptr [R11] AND dword ptr [RDI],EBX ADD R11,0x4 ADD RDI,0x4 ADD RDX,0x4 CMP RDI,R10 JC 0x001a251b JMP 0x001a2539 LAB_001a2533: MOV RDX,RAX MOV RDI,RAX LAB_001a2539: SUB ECX,R9D JC 0x001a2578 MOV ESI,dword ptr [RSI + 0x18] NOT ESI AND dword ptr [RDI + -0x4],ESI LEA RSI,[R10 + RCX*0x4] CMP RDI,RSI JNC 0x001a2578 ADD RCX,R8 LEA RAX,[RAX + RCX*0x4] LEA RCX,[RDX + 0x4] CMP RAX,RCX CMOVA RCX,RAX NOT RDX ADD RDX,RCX AND RDX,-0x4 ADD RDX,0x4 XOR ESI,ESI POP RBX POP RBP JMP 0x0012a290 LAB_001a2578: POP RBX POP RBP RET
void bitmap_intersect(int8 *param_1,int8 *param_2) { uint *puVar1; uint uVar2; uint uVar3; uint *puVar4; uint *puVar5; uint *__s; uint uVar6; puVar1 = (uint *)*param_1; uVar3 = *(int *)((long)param_1 + 0x1c) + 0x1fU >> 5; uVar6 = *(int *)((long)param_2 + 0x1c) + 0x1fU >> 5; uVar2 = uVar6; if (uVar3 < uVar6) { uVar2 = uVar3; } puVar5 = puVar1; __s = puVar1; if (uVar2 != 0) { puVar4 = (uint *)*param_2; do { *__s = *__s & *puVar4; puVar4 = puVar4 + 1; __s = __s + 1; puVar5 = puVar5 + 1; } while (__s < puVar1 + uVar2); } if ((uVar6 <= uVar3) && (__s[-1] = __s[-1] & ~*(uint *)(param_2 + 3), __s < puVar1 + uVar2 + (uVar3 - uVar6))) { puVar4 = puVar5 + 1; if (puVar5 + 1 < puVar1 + (ulong)(uVar3 - uVar6) + (ulong)uVar2) { puVar4 = puVar1 + (ulong)(uVar3 - uVar6) + (ulong)uVar2; } memset(__s,0,(~(ulong)puVar5 + (long)puVar4 & 0xfffffffffffffffc) + 4); return; } return; }
25,585
my_strcasecmp_mb
eloqsql/strings/ctype-mb.c
int my_strcasecmp_mb(CHARSET_INFO * cs,const char *s, const char *t) { register uint32 l; register const uchar *map=cs->to_upper; while (*s && *t) { /* Pointing after the '\0' is safe here. */ if ((l=my_ismbchar(cs, s, s + cs->mbmaxlen))) { while (l--) if (*s++ != *t++) return 1; } else if (my_ci_charlen(cs, (const uchar *) t, (const uchar *) t + cs->mbmaxlen) > 1) return 1; else if (map[(uchar) *s++] != map[(uchar) *t++]) return 1; } /* At least one of '*s' and '*t' is zero here. */ return (*t != *s); }
O3
c
my_strcasecmp_mb: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdx, %rbx movb (%rsi), %cl testb %cl, %cl je 0xb9dcb cmpb $0x0, (%rbx) je 0xb9dcd movq %rsi, %r15 movq %rdi, %r14 movq 0x50(%rdi), %r12 movl 0x9c(%r14), %edx addq %r15, %rdx movq 0xb8(%r14), %rax movq %r14, %rdi movq %r15, %rsi callq *0xc0(%rax) cmpl $0x2, %eax jge 0xb9d90 movl 0x9c(%r14), %edx addq %rbx, %rdx movq 0xb8(%r14), %rax movq %r14, %rdi movq %rbx, %rsi callq *0xc0(%rax) movl %eax, %ecx movl $0x1, %eax cmpl $0x1, %ecx jg 0xb9ddb movzbl (%r15), %ecx movb (%r12,%rcx), %cl movzbl (%rbx), %edx cmpb (%r12,%rdx), %cl jne 0xb9ddb incq %r15 incq %rbx jmp 0xb9db9 movl %eax, %eax leaq (%r15,%rax), %rcx leaq (%rbx,%rax), %rdx xorl %esi, %esi cmpl %esi, %eax je 0xb9db3 movb (%r15,%rsi), %dil leaq 0x1(%rsi), %r8 cmpb (%rbx,%rsi), %dil movq %r8, %rsi je 0xb9d9c jmp 0xb9dd6 movq %rcx, %r15 movq %rdx, %rbx movb (%r15), %cl testb %cl, %cl je 0xb9dcb cmpb $0x0, (%rbx) jne 0xb9d2c jmp 0xb9dcd xorl %ecx, %ecx xorl %eax, %eax cmpb %cl, (%rbx) setne %al jmp 0xb9ddb movl $0x1, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
my_strcasecmp_mb: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rdx mov cl, [rsi] test cl, cl jz loc_B9DCB cmp byte ptr [rbx], 0 jz loc_B9DCD mov r15, rsi mov r14, rdi mov r12, [rdi+50h] loc_B9D2C: mov edx, [r14+9Ch] add rdx, r15 mov rax, [r14+0B8h] mov rdi, r14 mov rsi, r15 call qword ptr [rax+0C0h] cmp eax, 2 jge short loc_B9D90 mov edx, [r14+9Ch] add rdx, rbx mov rax, [r14+0B8h] mov rdi, r14 mov rsi, rbx call qword ptr [rax+0C0h] mov ecx, eax mov eax, 1 cmp ecx, 1 jg short loc_B9DDB movzx ecx, byte ptr [r15] mov cl, [r12+rcx] movzx edx, byte ptr [rbx] cmp cl, [r12+rdx] jnz short loc_B9DDB inc r15 inc rbx jmp short loc_B9DB9 loc_B9D90: mov eax, eax lea rcx, [r15+rax] lea rdx, [rbx+rax] xor esi, esi loc_B9D9C: cmp eax, esi jz short loc_B9DB3 mov dil, [r15+rsi] lea r8, [rsi+1] cmp dil, [rbx+rsi] mov rsi, r8 jz short loc_B9D9C jmp short loc_B9DD6 loc_B9DB3: mov r15, rcx mov rbx, rdx loc_B9DB9: mov cl, [r15] test cl, cl jz short loc_B9DCB cmp byte ptr [rbx], 0 jnz loc_B9D2C jmp short loc_B9DCD loc_B9DCB: xor ecx, ecx loc_B9DCD: xor eax, eax cmp [rbx], cl setnz al jmp short loc_B9DDB loc_B9DD6: mov eax, 1 loc_B9DDB: pop rbx pop r12 pop r14 pop r15 pop rbp retn
_BOOL8 my_strcasecmp_mb(long long a1, unsigned __int8 *a2, _BYTE *a3) { _BYTE *v3; // rbx unsigned __int8 v4; // cl unsigned __int8 *v5; // r15 long long v6; // r12 int v7; // eax int v8; // ecx _BOOL8 result; // rax long long i; // rsi v3 = a3; v4 = *a2; if ( *a2 ) { if ( *a3 ) { v5 = a2; v6 = *(_QWORD *)(a1 + 80); do { v7 = (*(long long ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v5, &v5[*(unsigned int *)(a1 + 156)]); if ( v7 >= 2 ) { for ( i = 0LL; v7 != (_DWORD)i; ++i ) { if ( v5[i] != v3[i] ) return 1LL; } v5 += (unsigned int)v7; v3 += (unsigned int)v7; } else { v8 = (*(long long ( **)(long long, _BYTE *, _BYTE *))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v3, &v3[*(unsigned int *)(a1 + 156)]); result = 1LL; if ( v8 > 1 || *(_BYTE *)(v6 + *v5) != *(_BYTE *)(v6 + (unsigned __int8)*v3) ) return result; ++v5; ++v3; } v4 = *v5; if ( !*v5 ) goto LABEL_16; } while ( *v3 ); } } else { LABEL_16: v4 = 0; } return *v3 != v4; }
my_strcasecmp_mb: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RDX MOV CL,byte ptr [RSI] TEST CL,CL JZ 0x001b9dcb CMP byte ptr [RBX],0x0 JZ 0x001b9dcd MOV R15,RSI MOV R14,RDI MOV R12,qword ptr [RDI + 0x50] LAB_001b9d2c: MOV EDX,dword ptr [R14 + 0x9c] ADD RDX,R15 MOV RAX,qword ptr [R14 + 0xb8] MOV RDI,R14 MOV RSI,R15 CALL qword ptr [RAX + 0xc0] CMP EAX,0x2 JGE 0x001b9d90 MOV EDX,dword ptr [R14 + 0x9c] ADD RDX,RBX MOV RAX,qword ptr [R14 + 0xb8] MOV RDI,R14 MOV RSI,RBX CALL qword ptr [RAX + 0xc0] MOV ECX,EAX MOV EAX,0x1 CMP ECX,0x1 JG 0x001b9ddb MOVZX ECX,byte ptr [R15] MOV CL,byte ptr [R12 + RCX*0x1] MOVZX EDX,byte ptr [RBX] CMP CL,byte ptr [R12 + RDX*0x1] JNZ 0x001b9ddb INC R15 INC RBX JMP 0x001b9db9 LAB_001b9d90: MOV EAX,EAX LEA RCX,[R15 + RAX*0x1] LEA RDX,[RBX + RAX*0x1] XOR ESI,ESI LAB_001b9d9c: CMP EAX,ESI JZ 0x001b9db3 MOV DIL,byte ptr [R15 + RSI*0x1] LEA R8,[RSI + 0x1] CMP DIL,byte ptr [RBX + RSI*0x1] MOV RSI,R8 JZ 0x001b9d9c JMP 0x001b9dd6 LAB_001b9db3: MOV R15,RCX MOV RBX,RDX LAB_001b9db9: MOV CL,byte ptr [R15] TEST CL,CL JZ 0x001b9dcb CMP byte ptr [RBX],0x0 JNZ 0x001b9d2c JMP 0x001b9dcd LAB_001b9dcb: XOR ECX,ECX LAB_001b9dcd: XOR EAX,EAX CMP byte ptr [RBX],CL SETNZ AL JMP 0x001b9ddb LAB_001b9dd6: MOV EAX,0x1 LAB_001b9ddb: POP RBX POP R12 POP R14 POP R15 POP RBP RET
bool my_strcasecmp_mb(long param_1,byte *param_2,byte *param_3) { byte *pbVar1; byte *pbVar2; long lVar3; uint uVar4; int iVar5; byte bVar6; byte *pbVar7; long lVar8; byte *pbVar9; bVar6 = *param_2; if (bVar6 == 0) { LAB_001b9dcb: bVar6 = 0; } else if (*param_3 != 0) { lVar3 = *(long *)(param_1 + 0x50); pbVar7 = param_3; do { uVar4 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0)) (param_1,param_2,param_2 + *(uint *)(param_1 + 0x9c)); if ((int)uVar4 < 2) { iVar5 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0)) (param_1,pbVar7,pbVar7 + *(uint *)(param_1 + 0x9c)); if (1 < iVar5) { return true; } if (*(char *)(lVar3 + (ulong)*param_2) != *(char *)(lVar3 + (ulong)*pbVar7)) { return true; } pbVar9 = param_2 + 1; param_3 = pbVar7 + 1; } else { pbVar9 = param_2 + uVar4; param_3 = pbVar7 + uVar4; lVar8 = 0; while (uVar4 != (uint)lVar8) { pbVar1 = param_2 + lVar8; pbVar2 = pbVar7 + lVar8; lVar8 = lVar8 + 1; if (*pbVar1 != *pbVar2) { return true; } } } bVar6 = *pbVar9; if (bVar6 == 0) goto LAB_001b9dcb; pbVar7 = param_3; param_2 = pbVar9; } while (*param_3 != 0); } return *param_3 != bVar6; }
25,586
google::protobuf::compiler::php::(anonymous namespace)::GenerateCEnum(google::protobuf::EnumDescriptor const*, google::protobuf::io::Printer*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/php/php_generator.cc
void GenerateCEnum(const EnumDescriptor* desc, io::Printer* printer) { std::string c_name = desc->full_name(); c_name = StringReplace(c_name, ".", "_", true); std::string php_name = FullClassName(desc, Options()); php_name = StringReplace(php_name, "\\", "\\\\", true); printer->Print( "/* $c_name$ */\n" "\n" "zend_class_entry* $c_name$_ce;\n" "\n" "PHP_METHOD($c_name$, name) {\n" " $file_c_name$_AddDescriptor();\n" " const upb_DefPool *symtab = DescriptorPool_GetSymbolTable();\n" " const upb_EnumDef *e = upb_DefPool_FindEnumByName(symtab, \"$name$\");\n" " zend_long value;\n" " if (zend_parse_parameters(ZEND_NUM_ARGS(), \"l\", &value) ==\n" " FAILURE) {\n" " return;\n" " }\n" " const upb_EnumValueDef* ev =\n" " upb_EnumDef_FindValueByNumber(e, value);\n" " if (!ev) {\n" " zend_throw_exception_ex(NULL, 0,\n" " \"$php_name$ has no name \"\n" " \"defined for value \" ZEND_LONG_FMT \".\",\n" " value);\n" " return;\n" " }\n" " RETURN_STRING(upb_EnumValueDef_Name(ev));\n" "}\n" "\n" "PHP_METHOD($c_name$, value) {\n" " $file_c_name$_AddDescriptor();\n" " const upb_DefPool *symtab = DescriptorPool_GetSymbolTable();\n" " const upb_EnumDef *e = upb_DefPool_FindEnumByName(symtab, \"$name$\");\n" " char *name = NULL;\n" " size_t name_len;\n" " if (zend_parse_parameters(ZEND_NUM_ARGS(), \"s\", &name,\n" " &name_len) == FAILURE) {\n" " return;\n" " }\n" " const upb_EnumValueDef* ev = upb_EnumDef_FindValueByNameWithSize(\n" " e, name, name_len);\n" " if (!ev) {\n" " zend_throw_exception_ex(NULL, 0,\n" " \"$php_name$ has no value \"\n" " \"defined for name %s.\",\n" " name);\n" " return;\n" " }\n" " RETURN_LONG(upb_EnumValueDef_Number(ev));\n" "}\n" "\n" "static zend_function_entry $c_name$_phpmethods[] = {\n" " PHP_ME($c_name$, name, arginfo_lookup, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)\n" " PHP_ME($c_name$, value, arginfo_lookup, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)\n" " ZEND_FE_END\n" "};\n" "\n" "static void $c_name$_ModuleInit() {\n" " zend_class_entry tmp_ce;\n" "\n" " INIT_CLASS_ENTRY(tmp_ce, \"$php_name$\",\n" " $c_name$_phpmethods);\n" "\n" " $c_name$_ce = zend_register_internal_class(&tmp_ce);\n", "name", desc->full_name(), "file_c_name", FilenameCName(desc->file()), "c_name", c_name, "php_name", php_name); for (int i = 0; i < desc->value_count(); i++) { const EnumValueDescriptor* value = desc->value(i); printer->Print( " zend_declare_class_constant_long($c_name$_ce, \"$name$\",\n" " strlen(\"$name$\"), $num$);\n", "c_name", c_name, "name", value->name(), "num", std::to_string(value->number())); } printer->Print( "}\n" "\n"); }
O3
cpp
google::protobuf::compiler::php::(anonymous namespace)::GenerateCEnum(google::protobuf::EnumDescriptor const*, google::protobuf::io::Printer*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xd8, %rsp movq %rsi, 0x8(%rsp) movq %rdi, %rbp movq 0x8(%rdi), %rax leaq 0xa0(%rsp), %rcx movq %rcx, -0x10(%rcx) movq 0x20(%rax), %rsi movq 0x28(%rax), %rdx addq %rsi, %rdx leaq 0x90(%rsp), %rdi callq 0x2586a leaq 0x60(%rsp), %r14 movq %r14, -0x10(%r14) leaq 0x190e26(%rip), %rsi # 0x1f037f leaq 0x190e20(%rip), %rdx # 0x1f0380 leaq 0x50(%rsp), %rdi callq 0x250b2 leaq 0x80(%rsp), %r13 movq %r13, -0x10(%r13) leaq 0x14a454(%rip), %rsi # 0x1a99d1 leaq 0x14a44e(%rip), %rdx # 0x1a99d2 leaq 0x70(%rsp), %rdi callq 0x250b2 leaq 0x10(%rsp), %rdi leaq 0x90(%rsp), %rsi leaq 0x50(%rsp), %rdx leaq 0x70(%rsp), %rcx movl $0x1, %r8d callq 0x1096a8 leaq 0x90(%rsp), %r15 leaq 0x10(%rsp), %rbx movq %r15, %rdi movq %rbx, %rsi callq 0x1f5d0 movq (%rbx), %rdi leaq 0x20(%rsp), %rax cmpq %rax, %rdi je 0x5f5da callq 0x1f4a0 movq 0x70(%rsp), %rdi cmpq %r13, %rdi je 0x5f5e9 callq 0x1f4a0 movq 0x50(%rsp), %rdi cmpq %r14, %rdi je 0x5f5f8 callq 0x1f4a0 xorps %xmm0, %xmm0 leaq 0x10(%rsp), %rdx movaps %xmm0, 0x10(%rdx) movaps %xmm0, (%rdx) leaq 0x20(%rsp), %rax movq %rax, 0x20(%rdx) movq %rax, 0x28(%rdx) movq $0x0, 0x30(%rdx) leaq 0x50(%rsp), %rdi movq %rbp, %rsi callq 0x5e4cc leaq 0x18(%rsp), %rdi callq 0x2e584 leaq 0x70(%rsp), %rdi movq %r13, (%rdi) leaq 0x13d50d(%rip), %rsi # 0x19cb4f leaq 0x13d507(%rip), %rdx # 0x19cb50 callq 0x250b2 leaq 0xc8(%rsp), %r14 movq %r14, -0x10(%r14) leaq 0x1429ae(%rip), %rsi # 0x1a200f leaq 0x1429a9(%rip), %rdx # 0x1a2011 leaq 0xb8(%rsp), %rdi callq 0x250b2 leaq 0x10(%rsp), %rdi leaq 0x50(%rsp), %rsi leaq 0x70(%rsp), %rdx leaq 0xb8(%rsp), %rcx movl $0x1, %r8d callq 0x1096a8 leaq 0x50(%rsp), %rbx leaq 0x10(%rsp), %r12 movq %rbx, %rdi movq %r12, %rsi callq 0x1f5d0 movq (%r12), %rdi leaq 0x20(%rsp), %rax cmpq %rax, %rdi je 0x5f6bf callq 0x1f4a0 movq 0xb8(%rsp), %rdi cmpq %r14, %rdi je 0x5f6d1 callq 0x1f4a0 movq 0x70(%rsp), %rdi cmpq %r13, %rdi je 0x5f6e0 callq 0x1f4a0 movq 0x8(%rbp), %r13 movq 0x10(%rbp), %rax movq 0x8(%rax), %rax movq (%rax), %rsi movq 0x8(%rax), %rdx leaq 0x10(%rsp), %rdi callq 0x5ed0e addq $0x20, %r13 leaq 0x147737(%rip), %rax # 0x1a6e3f leaq 0x146a84(%rip), %r10 # 0x1a6193 leaq 0x147732(%rip), %rsi # 0x1a6e48 leaq 0x13d5fe(%rip), %rdx # 0x19cd1b leaq 0x146e8f(%rip), %r8 # 0x1a65b3 leaq 0x10(%rsp), %r9 movq 0x8(%rsp), %rdi movq %r13, %rcx pushq %rbx pushq %rax pushq %r15 pushq %r10 callq 0x627e8 addq $0x20, %rsp movq 0x10(%rsp), %rdi leaq 0x20(%rsp), %rax cmpq %rax, %rdi je 0x5f754 callq 0x1f4a0 cmpl $0x0, 0x4(%rbp) jle 0x5f877 xorl %r12d, %r12d movl $0xd1b71759, %edi # imm = 0xD1B71759 movq %rbp, 0xb0(%rsp) movq 0x28(%rbp), %rax movq %r12, %rcx shlq $0x5, %rcx movl 0x4(%rax,%rcx), %r15d movl %r15d, %r13d negl %r13d cmovsl %r15d, %r13d movl $0x1, %ebp cmpl $0xa, %r13d jb 0x5f7d3 movl $0x4, %ebp movl %r13d, %edx cmpl $0x63, %edx jbe 0x5f7cc cmpl $0x3e7, %edx # imm = 0x3E7 jbe 0x5f7d1 cmpl $0x2710, %edx # imm = 0x2710 jb 0x5f7d3 movl %edx, %esi imulq %rdi, %rsi shrq $0x2d, %rsi addl $0x4, %ebp cmpl $0x1869f, %edx # imm = 0x1869F movl %esi, %edx ja 0x5f79b addl $-0x3, %ebp jmp 0x5f7d3 addl $-0x2, %ebp jmp 0x5f7d3 decl %ebp movq 0x8(%rax,%rcx), %rbx shrl $0x1f, %r15d leal (%r15,%rbp), %esi leaq 0x20(%rsp), %rax movq %rax, 0x10(%rsp) leaq 0x10(%rsp), %r14 movq %r14, %rdi movl $0x2d, %edx callq 0x1f580 addq 0x10(%rsp), %r15 movq %r15, %rdi movl %ebp, %esi movl %r13d, %edx callq 0x62b19 movq 0x8(%rsp), %rdi leaq 0x147d63(%rip), %rsi # 0x1a757d leaq 0x146972(%rip), %rdx # 0x1a6193 leaq 0x90(%rsp), %rcx leaq 0x13d4eb(%rip), %r8 # 0x19cd1b movq %rbx, %r9 pushq %r14 leaq 0x142f9f(%rip), %rax # 0x1a27db pushq %rax callq 0x62864 addq $0x10, %rsp movq 0x10(%rsp), %rdi leaq 0x20(%rsp), %rax cmpq %rax, %rdi movq 0xb0(%rsp), %rbp je 0x5f862 callq 0x1f4a0 incq %r12 movslq 0x4(%rbp), %rax cmpq %rax, %r12 movl $0xd1b71759, %edi # imm = 0xD1B71759 jl 0x5f76e leaq 0x160c05(%rip), %rsi # 0x1c0483 movq 0x8(%rsp), %rdi callq 0x2e40a movq 0x50(%rsp), %rdi leaq 0x60(%rsp), %rax cmpq %rax, %rdi leaq 0xa0(%rsp), %rbx je 0x5f8a4 callq 0x1f4a0 movq 0x90(%rsp), %rdi cmpq %rbx, %rdi je 0x5f8b6 callq 0x1f4a0 addq $0xd8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x5f93f movq %rax, %rbx movq 0x10(%rsp), %rdi leaq 0x20(%rsp), %rax cmpq %rax, %rdi je 0x5f95b jmp 0x5f956 jmp 0x5f93f movq %rax, %rbx movq 0xb8(%rsp), %rdi cmpq %r14, %rdi je 0x5f8fa callq 0x1f4a0 jmp 0x5f8fa movq %rax, %rbx movq 0x70(%rsp), %rdi cmpq %r13, %rdi je 0x5f95b jmp 0x5f956 jmp 0x5f93f movq %rax, %rbx leaq 0x18(%rsp), %rdi callq 0x2e584 jmp 0x5f96f movq %rax, %rbx movq 0x70(%rsp), %rdi cmpq %r13, %rdi je 0x5f92e callq 0x1f4a0 jmp 0x5f92e movq %rax, %rbx movq 0x50(%rsp), %rdi cmpq %r14, %rdi je 0x5f96f jmp 0x5f96a movq %rax, %rbx jmp 0x5f96f movq %rax, %rbx jmp 0x5f95b movq %rax, %rbx movq 0x10(%rsp), %rdi leaq 0x20(%rsp), %rax cmpq %rax, %rdi je 0x5f95b callq 0x1f4a0 movq 0x50(%rsp), %rdi leaq 0x60(%rsp), %rax cmpq %rax, %rdi je 0x5f96f callq 0x1f4a0 movq 0x90(%rsp), %rdi leaq 0xa0(%rsp), %rax cmpq %rax, %rdi je 0x5f989 callq 0x1f4a0 movq %rbx, %rdi callq 0x1f860
_ZN6google8protobuf8compiler3php12_GLOBAL__N_113GenerateCEnumEPKNS0_14EnumDescriptorEPNS0_2io7PrinterE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0D8h mov qword ptr [rsp+108h+var_100], rsi; int mov rbp, rdi mov rax, [rdi+8] lea rcx, [rsp+108h+var_68] mov [rcx-10h], rcx mov rsi, [rax+20h] mov rdx, [rax+28h] add rdx, rsi lea rdi, [rsp+108h+var_78] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea r14, [rsp+108h+var_A8] mov [r14-10h], r14 lea rsi, aWhichIsNotDefi+77h; "." lea rdx, aWhichIsNotDefi+78h; "" lea rdi, [rsp+108h+var_B8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r13, [rsp+108h+var_88] mov [r13-10h], r13 lea rsi, aPb_0+2; "_" lea rdx, aPb_0+3; "" lea rdi, [rsp+108h+var_98] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+108h+var_F8] lea rsi, [rsp+108h+var_78] lea rdx, [rsp+108h+var_B8] lea rcx, [rsp+108h+var_98] mov r8d, 1 call _ZN6google8protobuf13StringReplaceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_b; google::protobuf::StringReplace(std::string const&,std::string const&,std::string const&,bool) lea r15, [rsp+108h+var_78] lea rbx, [rsp+108h+var_F8] mov rdi, r15 mov rsi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [rbx]; void * lea rax, [rsp+108h+var_E8] cmp rdi, rax jz short loc_5F5DA call __ZdlPv; operator delete(void *) loc_5F5DA: mov rdi, [rsp+108h+var_98]; void * cmp rdi, r13 jz short loc_5F5E9 call __ZdlPv; operator delete(void *) loc_5F5E9: mov rdi, [rsp+108h+var_B8]; void * cmp rdi, r14 jz short loc_5F5F8 call __ZdlPv; operator delete(void *) loc_5F5F8: xorps xmm0, xmm0 lea rdx, [rsp+108h+var_F8] movaps xmmword ptr [rdx+10h], xmm0 movaps xmmword ptr [rdx], xmm0 lea rax, [rsp+108h+var_E8] mov [rdx+20h], rax mov [rdx+28h], rax mov qword ptr [rdx+30h], 0 lea rdi, [rsp+108h+var_B8] mov rsi, rbp call _ZN6google8protobuf8compiler3php12_GLOBAL__N_113FullClassNameINS0_14EnumDescriptorEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKT_RKNS2_7OptionsE; google::protobuf::compiler::php::`anonymous namespace'::FullClassName<google::protobuf::EnumDescriptor>(google::protobuf::EnumDescriptor const*,google::protobuf::compiler::php::Options const&) lea rdi, [rsp+108h+var_F0] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EED2Ev; std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::~_Rb_tree() lea rdi, [rsp+108h+var_98] mov [rdi], r13 lea rsi, asc_19CB4E+1; "\\" lea rdx, asc_19CB4E+2; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r14, [rsp+108h+var_40] mov [r14-10h], r14 lea rsi, asc_1A200F; "\\\\" lea rdx, asc_1A200F+2; "" lea rdi, [rsp+108h+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) lea rdi, [rsp+108h+var_F8] lea rsi, [rsp+108h+var_B8] lea rdx, [rsp+108h+var_98] lea rcx, [rsp+108h+var_50] mov r8d, 1 call _ZN6google8protobuf13StringReplaceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_b; google::protobuf::StringReplace(std::string const&,std::string const&,std::string const&,bool) lea rbx, [rsp+108h+var_B8] lea r12, [rsp+108h+var_F8] mov rdi, rbx mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r12]; void * lea rax, [rsp+108h+var_E8] cmp rdi, rax jz short loc_5F6BF call __ZdlPv; operator delete(void *) loc_5F6BF: mov rdi, [rsp+108h+var_50]; void * cmp rdi, r14 jz short loc_5F6D1 call __ZdlPv; operator delete(void *) loc_5F6D1: mov rdi, [rsp+108h+var_98]; void * cmp rdi, r13 jz short loc_5F6E0 call __ZdlPv; operator delete(void *) loc_5F6E0: mov r13, [rbp+8] mov rax, [rbp+10h] mov rax, [rax+8] mov rsi, [rax]; int mov rdx, [rax+8]; int lea rdi, [rsp+108h+var_F8]; int call _ZN6google8protobuf8compiler3php12_GLOBAL__N_113FilenameCNameB5cxx11EPKNS0_14FileDescriptorE; google::protobuf::compiler::php::`anonymous namespace'::FilenameCName(google::protobuf::FileDescriptor const*) add r13, 20h ; ' ' lea rax, aPhpName; "php_name" lea r10, aMetadataCName+9; "c_name" lea rsi, aCNameZendClass_0; "/* $c_name$ */\n\nzend_class_entry* $c_"... lea rdx, aAnnotationPrag+12h; "name" lea r8, aFileCName; "file_c_name" lea r9, [rsp+108h+var_F8] mov rdi, qword ptr [rsp+108h+var_100] mov rcx, r13 push rbx push rax push r15 push r10 call _ZN6google8protobuf2io7Printer5PrintIJA5_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA12_cSA_A7_cSA_A9_cSA_EEEvPKcDpRKT_; google::protobuf::io::Printer::Print<char [5],std::string,char [12],std::string,char [7],std::string,char [9],std::string>(char const*,char [5],std::string,char [12],std::string,char [7],std::string,char [9],std::string const&) add rsp, 20h mov rdi, [rsp+108h+var_F8]; void * lea rax, [rsp+108h+var_E8] cmp rdi, rax jz short loc_5F754 call __ZdlPv; operator delete(void *) loc_5F754: cmp dword ptr [rbp+4], 0 jle loc_5F877 xor r12d, r12d mov edi, 0D1B71759h mov [rsp+108h+var_58], rbp loc_5F76E: mov rax, [rbp+28h] mov rcx, r12 shl rcx, 5 mov r15d, [rax+rcx+4] mov r13d, r15d neg r13d cmovs r13d, r15d mov ebp, 1 cmp r13d, 0Ah jb short loc_5F7D3 mov ebp, 4 mov edx, r13d loc_5F79B: cmp edx, 63h ; 'c' jbe short loc_5F7CC cmp edx, 3E7h jbe short loc_5F7D1 cmp edx, 2710h jb short loc_5F7D3 mov esi, edx imul rsi, rdi shr rsi, 2Dh add ebp, 4 cmp edx, 1869Fh mov edx, esi ja short loc_5F79B add ebp, 0FFFFFFFDh jmp short loc_5F7D3 loc_5F7CC: add ebp, 0FFFFFFFEh jmp short loc_5F7D3 loc_5F7D1: dec ebp loc_5F7D3: mov rbx, [rax+rcx+8] shr r15d, 1Fh lea esi, [r15+rbp] lea rax, [rsp+108h+var_E8] mov [rsp+108h+var_F8], rax lea r14, [rsp+108h+var_F8] mov rdi, r14 mov edx, 2Dh ; '-' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) add r15, [rsp+108h+var_F8] mov rdi, r15 mov esi, ebp mov edx, r13d call _ZNSt8__detail18__to_chars_10_implIjEEvPcjT_; std::__detail::__to_chars_10_impl<uint>(char *,uint,uint) mov rdi, qword ptr [rsp+108h+var_100] lea rsi, aZendDeclareCla; " zend_declare_class_constant_long($c_n"... lea rdx, aMetadataCName+9; "c_name" lea rcx, [rsp+108h+var_78] lea r8, aAnnotationPrag+12h; "name" mov r9, rbx push r14 lea rax, aEnum+2; "num" push rax call _ZN6google8protobuf2io7Printer5PrintIJA7_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA5_cSA_A4_cSA_EEEvPKcDpRKT_; google::protobuf::io::Printer::Print<char [7],std::string,char [5],std::string,char [4],std::string>(char const*,char [7],std::string,char [5],std::string,char [4],std::string const&) add rsp, 10h mov rdi, [rsp+108h+var_F8]; void * lea rax, [rsp+108h+var_E8] cmp rdi, rax mov rbp, [rsp+108h+var_58] jz short loc_5F862 call __ZdlPv; operator delete(void *) loc_5F862: inc r12 movsxd rax, dword ptr [rbp+4] cmp r12, rax mov edi, 0D1B71759h jl loc_5F76E loc_5F877: lea rsi, aConstructUsing+55h; "}\n\n" mov rdi, qword ptr [rsp+108h+var_100] call _ZN6google8protobuf2io7Printer5PrintIJEEEvPKcDpRKT_ mov rdi, [rsp+108h+var_B8]; void * lea rax, [rsp+108h+var_A8] cmp rdi, rax lea rbx, [rsp+108h+var_68] jz short loc_5F8A4 call __ZdlPv; operator delete(void *) loc_5F8A4: mov rdi, [rsp+108h+var_78]; void * cmp rdi, rbx jz short loc_5F8B6 call __ZdlPv; operator delete(void *) loc_5F8B6: add rsp, 0D8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_5F93F mov rbx, rax mov rdi, [rsp+arg_8] lea rax, [rsp+arg_18] cmp rdi, rax jz short loc_5F95B jmp short loc_5F956 jmp short loc_5F93F mov rbx, rax mov rdi, [rsp+arg_B0]; void * cmp rdi, r14 jz short loc_5F8FA call __ZdlPv; operator delete(void *) jmp short loc_5F8FA mov rbx, rax loc_5F8FA: mov rdi, [rsp+arg_68] cmp rdi, r13 jz short loc_5F95B jmp short loc_5F956 jmp short loc_5F93F mov rbx, rax lea rdi, [rsp+arg_10] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EED2Ev; std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::~_Rb_tree() jmp short loc_5F96F mov rbx, rax mov rdi, [rsp+arg_68]; void * cmp rdi, r13 jz short loc_5F92E call __ZdlPv; operator delete(void *) jmp short loc_5F92E mov rbx, rax loc_5F92E: mov rdi, [rsp+arg_48] cmp rdi, r14 jz short loc_5F96F jmp short loc_5F96A mov rbx, rax jmp short loc_5F96F loc_5F93F: mov rbx, rax jmp short loc_5F95B mov rbx, rax mov rdi, [rsp+arg_8]; void * lea rax, [rsp+arg_18] cmp rdi, rax jz short loc_5F95B loc_5F956: call __ZdlPv; operator delete(void *) loc_5F95B: mov rdi, [rsp+arg_48]; void * lea rax, [rsp+arg_58] cmp rdi, rax jz short loc_5F96F loc_5F96A: call __ZdlPv; operator delete(void *) loc_5F96F: mov rdi, [rsp+arg_88]; void * lea rax, [rsp+arg_98] cmp rdi, rax jz short loc_5F989 call __ZdlPv; operator delete(void *) loc_5F989: mov rdi, rbx call __Unwind_Resume
void google::protobuf::compiler::php::`anonymous namespace'::GenerateCEnum( google::protobuf::compiler::php::_anonymous_namespace_ *this, const google::protobuf::EnumDescriptor *a2, google::protobuf::io::Printer *a3) { google::protobuf::compiler::php::_anonymous_namespace_ *v3; // rbp long long v4; // rax long long v5; // r12 long long v6; // rax unsigned int v7; // r13d unsigned int v8; // ebp unsigned int v9; // edx bool v10; // cc long long v11; // rbx unsigned int v12; // r15d __int128 v13; // [rsp+10h] [rbp-F8h] BYREF __int128 v14; // [rsp+20h] [rbp-E8h] BYREF __int128 *v15; // [rsp+30h] [rbp-D8h] __int128 *v16; // [rsp+38h] [rbp-D0h] long long v17; // [rsp+40h] [rbp-C8h] void *v18[2]; // [rsp+50h] [rbp-B8h] BYREF _BYTE v19[16]; // [rsp+60h] [rbp-A8h] BYREF void *v20[2]; // [rsp+70h] [rbp-98h] BYREF _BYTE v21[16]; // [rsp+80h] [rbp-88h] BYREF void *v22[2]; // [rsp+90h] [rbp-78h] BYREF _BYTE v23[16]; // [rsp+A0h] [rbp-68h] BYREF google::protobuf::compiler::php::_anonymous_namespace_ *v24; // [rsp+B0h] [rbp-58h] void *v25[2]; // [rsp+B8h] [rbp-50h] BYREF _BYTE v26[64]; // [rsp+C8h] [rbp-40h] BYREF v3 = this; v4 = *((_QWORD *)this + 1); v22[0] = v23; std::string::_M_construct<char *>((long long)v22, *(_BYTE **)(v4 + 32), *(_QWORD *)(v4 + 32) + *(_QWORD *)(v4 + 40)); v18[0] = v19; std::string::_M_construct<char const*>((long long)v18, ".", (long long)""); v20[0] = v21; std::string::_M_construct<char const*>((long long)v20, "_", (long long)""); google::protobuf::StringReplace(&v13, v22, v18, v20, 1LL); std::string::operator=(v22, &v13); if ( (__int128 *)v13 != &v14 ) operator delete((void *)v13); if ( v20[0] != v21 ) operator delete(v20[0]); if ( v18[0] != v19 ) operator delete(v18[0]); v14 = 0LL; v13 = 0LL; v15 = &v14; v16 = &v14; v17 = 0LL; google::protobuf::compiler::php::`anonymous namespace'::FullClassName<google::protobuf::EnumDescriptor>( (long long)v18, (long long)this, (unsigned int *)&v13); std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::~_Rb_tree((long long)&v13 + 8); v20[0] = v21; std::string::_M_construct<char const*>((long long)v20, "\\", (long long)""); v25[0] = v26; std::string::_M_construct<char const*>((long long)v25, "\\\\", (long long)""); google::protobuf::StringReplace(&v13, v18, v20, v25, 1LL); std::string::operator=(v18, &v13); if ( (__int128 *)v13 != &v14 ) operator delete((void *)v13); if ( v25[0] != v26 ) operator delete(v25[0]); if ( v20[0] != v21 ) operator delete(v20[0]); google::protobuf::compiler::php::`anonymous namespace'::FilenameCName[abi:cxx11]( &v13, **(_BYTE ***)(*((_QWORD *)this + 2) + 8LL), *(_QWORD *)(*(_QWORD *)(*((_QWORD *)this + 2) + 8LL) + 8LL)); google::protobuf::io::Printer::Print<char [5],std::string,char [12],std::string,char [7],std::string,char [9],std::string>( a2, "/* $c_name$ */\n" "\n" "zend_class_entry* $c_name$_ce;\n" "\n" "PHP_METHOD($c_name$, name) {\n" " $file_c_name$_AddDescriptor();\n" " const upb_DefPool *symtab = DescriptorPool_GetSymbolTable();\n" " const upb_EnumDef *e = upb_DefPool_FindEnumByName(symtab, \"$name$\");\n" " zend_long value;\n" " if (zend_parse_parameters(ZEND_NUM_ARGS(), \"l\", &value) ==\n" " FAILURE) {\n" " return;\n" " }\n" " const upb_EnumValueDef* ev =\n" " upb_EnumDef_FindValueByNumber(e, value);\n" " if (!ev) {\n" " zend_throw_exception_ex(NULL, 0,\n" " \"$php_name$ has no name \"\n" " \"defined for value \" ZEND_LONG_FMT \".\",\n" " value);\n" " return;\n" " }\n" " RETURN_STRING(upb_EnumValueDef_Name(ev));\n" "}\n" "\n" "PHP_METHOD($c_name$, value) {\n" " $file_c_name$_AddDescriptor();\n" " const upb_DefPool *symtab = DescriptorPool_GetSymbolTable();\n" " const upb_EnumDef *e = upb_DefPool_FindEnumByName(symtab, \"$name$\");\n" " char *name = NULL;\n" " size_t name_len;\n" " if (zend_parse_parameters(ZEND_NUM_ARGS(), \"s\", &name,\n" " &name_len) == FAILURE) {\n" " return;\n" " }\n" " const upb_EnumValueDef* ev = upb_EnumDef_FindValueByNameWithSize(\n" " e, name, name_len);\n" " if (!ev) {\n" " zend_throw_exception_ex(NULL, 0,\n" " \"$php_name$ has no value \"\n" " \"defined for name %s.\",\n" " name);\n" " return;\n" " }\n" " RETURN_LONG(upb_EnumValueDef_Number(ev));\n" "}\n" "\n" "static zend_function_entry $c_name$_phpmethods[] = {\n" " PHP_ME($c_name$, name, arginfo_lookup, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)\n" " PHP_ME($c_name$, value, arginfo_lookup, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)\n" " ZEND_FE_END\n" "};\n" "\n" "static void $c_name$_ModuleInit() {\n" " zend_class_entry tmp_ce;\n" "\n" " INIT_CLASS_ENTRY(tmp_ce, \"$php_name$\",\n" " $c_name$_phpmethods);\n" "\n" " $c_name$_ce = zend_register_internal_class(&tmp_ce);\n", "name"); if ( (__int128 *)v13 != &v14 ) operator delete((void *)v13); if ( *((int *)this + 1) > 0 ) { v5 = 0LL; v24 = this; do { v6 = *((_QWORD *)v3 + 5); v7 = -*(_DWORD *)(v6 + 32 * v5 + 4); if ( *(int *)(v6 + 32 * v5 + 4) > 0 ) v7 = *(_DWORD *)(v6 + 32 * v5 + 4); v8 = 1; if ( v7 >= 0xA ) { v8 = 4; v9 = v7; while ( 1 ) { if ( v9 <= 0x63 ) { v8 -= 2; goto LABEL_28; } if ( v9 <= 0x3E7 ) break; if ( v9 < 0x2710 ) goto LABEL_28; v8 += 4; v10 = v9 <= 0x1869F; v9 /= 0x2710u; if ( v10 ) { v8 -= 3; goto LABEL_28; } } --v8; } LABEL_28: v11 = *(_QWORD *)(v6 + 32 * v5 + 8); v12 = *(_DWORD *)(v6 + 32 * v5 + 4) >> 31; *(_QWORD *)&v13 = &v14; std::string::_M_construct(&v13, v12 + v8, 45LL); std::__detail::__to_chars_10_impl<unsigned int>(v13 + v12, v8, v7); google::protobuf::io::Printer::Print<char [7],std::string,char [5],std::string,char [4],std::string>( a2, " zend_declare_class_constant_long($c_name$_ce, \"$name$\",\n" " strlen(\"$name$\"), $num$);\n", "c_name", v22, "name", v11, "num", &v13); v3 = v24; if ( (__int128 *)v13 != &v14 ) operator delete((void *)v13); ++v5; } while ( v5 < *((int *)v3 + 1) ); } google::protobuf::io::Printer::Print<>(a2, "}\n\n"); if ( v18[0] != v19 ) operator delete(v18[0]); if ( v22[0] != v23 ) operator delete(v22[0]); }
GenerateCEnum: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xd8 MOV qword ptr [RSP + 0x8],RSI MOV RBP,RDI MOV RAX,qword ptr [RDI + 0x8] LEA RCX,[RSP + 0xa0] MOV qword ptr [RCX + -0x10],RCX MOV RSI,qword ptr [RAX + 0x20] MOV RDX,qword ptr [RAX + 0x28] ADD RDX,RSI LEA RDI,[RSP + 0x90] CALL 0x0012586a LEA R14,[RSP + 0x60] MOV qword ptr [R14 + -0x10],R14 LAB_0015f552: LEA RSI,[0x2f037f] LEA RDX,[0x2f0380] LEA RDI,[RSP + 0x50] CALL 0x001250b2 LEA R13,[RSP + 0x80] MOV qword ptr [R13 + -0x10],R13 LAB_0015f576: LEA RSI,[0x2a99d1] LEA RDX,[0x2a99d2] LEA RDI,[RSP + 0x70] CALL 0x001250b2 LAB_0015f58e: LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x90] LEA RDX,[RSP + 0x50] LEA RCX,[RSP + 0x70] MOV R8D,0x1 CALL 0x002096a8 LEA R15,[RSP + 0x90] LEA RBX,[RSP + 0x10] MOV RDI,R15 MOV RSI,RBX CALL 0x0011f5d0 MOV RDI,qword ptr [RBX] LEA RAX,[RSP + 0x20] CMP RDI,RAX JZ 0x0015f5da CALL 0x0011f4a0 LAB_0015f5da: MOV RDI,qword ptr [RSP + 0x70] CMP RDI,R13 JZ 0x0015f5e9 CALL 0x0011f4a0 LAB_0015f5e9: MOV RDI,qword ptr [RSP + 0x50] CMP RDI,R14 JZ 0x0015f5f8 CALL 0x0011f4a0 LAB_0015f5f8: XORPS XMM0,XMM0 LEA RDX,[RSP + 0x10] MOVAPS xmmword ptr [RDX + 0x10],XMM0 MOVAPS xmmword ptr [RDX],XMM0 LEA RAX,[RSP + 0x20] MOV qword ptr [RDX + 0x20],RAX MOV qword ptr [RDX + 0x28],RAX MOV qword ptr [RDX + 0x30],0x0 LAB_0015f61c: LEA RDI,[RSP + 0x50] MOV RSI,RBP CALL 0x0015e4cc LEA RDI,[RSP + 0x18] CALL 0x0012e584 LEA RDI,[RSP + 0x70] MOV qword ptr [RDI],R13 LAB_0015f63b: LEA RSI,[0x29cb4f] LEA RDX,[0x29cb50] CALL 0x001250b2 LEA R14,[RSP + 0xc8] MOV qword ptr [R14 + -0x10],R14 LAB_0015f65a: LEA RSI,[0x2a200f] LEA RDX,[0x2a2011] LEA RDI,[RSP + 0xb8] CALL 0x001250b2 LAB_0015f675: LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x50] LEA RDX,[RSP + 0x70] LEA RCX,[RSP + 0xb8] MOV R8D,0x1 CALL 0x002096a8 LEA RBX,[RSP + 0x50] LEA R12,[RSP + 0x10] MOV RDI,RBX MOV RSI,R12 CALL 0x0011f5d0 MOV RDI,qword ptr [R12] LEA RAX,[RSP + 0x20] CMP RDI,RAX JZ 0x0015f6bf CALL 0x0011f4a0 LAB_0015f6bf: MOV RDI,qword ptr [RSP + 0xb8] CMP RDI,R14 JZ 0x0015f6d1 CALL 0x0011f4a0 LAB_0015f6d1: MOV RDI,qword ptr [RSP + 0x70] CMP RDI,R13 JZ 0x0015f6e0 CALL 0x0011f4a0 LAB_0015f6e0: MOV R13,qword ptr [RBP + 0x8] MOV RAX,qword ptr [RBP + 0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] LAB_0015f6f3: LEA RDI,[RSP + 0x10] CALL 0x0015ed0e ADD R13,0x20 LAB_0015f701: LEA RAX,[0x2a6e3f] LEA R10,[0x2a6193] LEA RSI,[0x2a6e48] LEA RDX,[0x29cd1b] LEA R8,[0x2a65b3] LEA R9,[RSP + 0x10] MOV RDI,qword ptr [RSP + 0x8] MOV RCX,R13 PUSH RBX PUSH RAX PUSH R15 PUSH R10 CALL 0x001627e8 ADD RSP,0x20 MOV RDI,qword ptr [RSP + 0x10] LEA RAX,[RSP + 0x20] CMP RDI,RAX JZ 0x0015f754 CALL 0x0011f4a0 LAB_0015f754: CMP dword ptr [RBP + 0x4],0x0 JLE 0x0015f877 XOR R12D,R12D MOV EDI,0xd1b71759 MOV qword ptr [RSP + 0xb0],RBP LAB_0015f76e: MOV RAX,qword ptr [RBP + 0x28] MOV RCX,R12 SHL RCX,0x5 MOV R15D,dword ptr [RAX + RCX*0x1 + 0x4] MOV R13D,R15D NEG R13D CMOVS R13D,R15D MOV EBP,0x1 CMP R13D,0xa JC 0x0015f7d3 MOV EBP,0x4 MOV EDX,R13D LAB_0015f79b: CMP EDX,0x63 JBE 0x0015f7cc CMP EDX,0x3e7 JBE 0x0015f7d1 CMP EDX,0x2710 JC 0x0015f7d3 MOV ESI,EDX IMUL RSI,RDI SHR RSI,0x2d ADD EBP,0x4 CMP EDX,0x1869f MOV EDX,ESI JA 0x0015f79b ADD EBP,-0x3 JMP 0x0015f7d3 LAB_0015f7cc: ADD EBP,-0x2 JMP 0x0015f7d3 LAB_0015f7d1: DEC EBP LAB_0015f7d3: MOV RBX,qword ptr [RAX + RCX*0x1 + 0x8] SHR R15D,0x1f LEA ESI,[R15 + RBP*0x1] LEA RAX,[RSP + 0x20] MOV qword ptr [RSP + 0x10],RAX LAB_0015f7ea: LEA R14,[RSP + 0x10] MOV RDI,R14 MOV EDX,0x2d CALL 0x0011f580 ADD R15,qword ptr [RSP + 0x10] MOV RDI,R15 MOV ESI,EBP MOV EDX,R13D CALL 0x00162b19 LAB_0015f80e: MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[0x2a757d] LEA RDX,[0x2a6193] LEA RCX,[RSP + 0x90] LEA R8,[0x29cd1b] MOV R9,RBX PUSH R14 LEA RAX,[0x2a27db] PUSH RAX CALL 0x00162864 ADD RSP,0x10 MOV RDI,qword ptr [RSP + 0x10] LEA RAX,[RSP + 0x20] CMP RDI,RAX MOV RBP,qword ptr [RSP + 0xb0] JZ 0x0015f862 CALL 0x0011f4a0 LAB_0015f862: INC R12 MOVSXD RAX,dword ptr [RBP + 0x4] CMP R12,RAX MOV EDI,0xd1b71759 JL 0x0015f76e LAB_0015f877: LEA RSI,[0x2c0483] MOV RDI,qword ptr [RSP + 0x8] CALL 0x0012e40a LAB_0015f888: MOV RDI,qword ptr [RSP + 0x50] LEA RAX,[RSP + 0x60] CMP RDI,RAX LEA RBX,[RSP + 0xa0] JZ 0x0015f8a4 CALL 0x0011f4a0 LAB_0015f8a4: MOV RDI,qword ptr [RSP + 0x90] CMP RDI,RBX JZ 0x0015f8b6 CALL 0x0011f4a0 LAB_0015f8b6: ADD RSP,0xd8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* google::protobuf::compiler::php::(anonymous namespace)::GenerateCEnum(google::protobuf::EnumDescriptor const*, google::protobuf::io::Printer*) */ void google::protobuf::compiler::php::(anonymous_namespace)::GenerateCEnum (EnumDescriptor *param_1,Printer *param_2) { uint uVar1; char *pcVar2; uint uVar3; uint uVar4; uint uVar5; uint uVar6; ulong uVar7; long lVar8; int8 *local_f8; int8 uStack_f0; int8 local_e8; int8 uStack_e0; int8 *local_d8; int8 *local_d0; int8 local_c8; int1 *local_b8 [2]; int1 local_a8 [16]; int1 *local_98 [2]; int1 local_88 [16]; int1 *local_78 [2]; int1 local_68 [16]; EnumDescriptor *local_58; int1 *local_50 [2]; int1 local_40 [16]; local_78[0] = local_68; lVar8 = *(long *)(*(long *)(param_1 + 8) + 0x20); std::__cxx11::string::_M_construct<char*> (local_78,lVar8,*(long *)(*(long *)(param_1 + 8) + 0x28) + lVar8); /* try { // try from 0015f552 to 0015f569 has its CatchHandler @ 0015f93a */ local_b8[0] = local_a8; std::__cxx11::string::_M_construct<char_const*>(local_b8,".",""); /* try { // try from 0015f576 to 0015f58d has its CatchHandler @ 0015f92b */ local_98[0] = local_88; std::__cxx11::string::_M_construct<char_const*>(local_98,&DAT_002a99d1,&DAT_002a99d2); /* try { // try from 0015f58e to 0015f5af has its CatchHandler @ 0015f917 */ StringReplace((protobuf *)&local_f8,(string *)local_78,(string *)local_b8,(string *)local_98,true) ; std::__cxx11::string::operator=((string *)local_78,(string *)&local_f8); if (local_f8 != &local_e8) { operator_delete(local_f8); } if (local_98[0] != local_88) { operator_delete(local_98[0]); } if (local_b8[0] != local_a8) { operator_delete(local_b8[0]); } local_e8 = 0; uStack_e0 = 0; local_f8 = (int8 *)0x0; uStack_f0 = 0; local_d8 = &local_e8; local_c8 = 0; /* try { // try from 0015f61c to 0015f628 has its CatchHandler @ 0015f908 */ local_d0 = local_d8; FullClassName<google::protobuf::EnumDescriptor> ((_anonymous_namespace_ *)local_b8,param_1,(Options *)&local_f8); std:: _Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> ::~_Rb_tree((_Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>> *)&uStack_f0); local_98[0] = local_88; /* try { // try from 0015f63b to 0015f64d has its CatchHandler @ 0015f906 */ std::__cxx11::string::_M_construct<char_const*>(local_98,&DAT_0029cb4f,&DAT_0029cb50); /* try { // try from 0015f65a to 0015f674 has its CatchHandler @ 0015f8f7 */ local_50[0] = local_40; std::__cxx11::string::_M_construct<char_const*>(local_50,&DAT_002a200f,&DAT_002a2011); /* try { // try from 0015f675 to 0015f696 has its CatchHandler @ 0015f8e0 */ StringReplace((protobuf *)&local_f8,(string *)local_b8,(string *)local_98,(string *)local_50,true) ; std::__cxx11::string::operator=((string *)local_b8,(string *)&local_f8); if (local_f8 != &local_e8) { operator_delete(local_f8); } if (local_50[0] != local_40) { operator_delete(local_50[0]); } if (local_98[0] != local_88) { operator_delete(local_98[0]); } lVar8 = *(long *)(param_1 + 8); /* try { // try from 0015f6f3 to 0015f6fc has its CatchHandler @ 0015f8de */ FilenameCName_abi_cxx11_((FileDescriptor *)&local_f8); /* try { // try from 0015f701 to 0015f73f has its CatchHandler @ 0015f8ca */ io::Printer:: Print<char[5],std::__cxx11::string,char[12],std::__cxx11::string,char[7],std::__cxx11::string,char[9],std::__cxx11::string> ((char *)param_2, "/* $c_name$ */\n\nzend_class_entry* $c_name$_ce;\n\nPHP_METHOD($c_name$, name) {\n $file_c_name$_AddDescriptor();\n const upb_DefPool *symtab = DescriptorPool_GetSymbolTable();\n const upb_EnumDef *e = upb_DefPool_FindEnumByName(symtab, \"$name$\");\n zend_long value;\n if (zend_parse_parameters(ZEND_NUM_ARGS(), \"l\", &value) ==\n FAILURE) {\n return;\n }\n const upb_EnumValueDef* ev =\n upb_EnumDef_FindValueByNumber(e, value);\n if (!ev) {\n zend_throw_exception_ex(NULL, 0,\n \"$php_name$ has no name \"\n \"defined for value \" ZEND_LONG_FMT \".\",\n value);\n return;\n }\n RETURN_STRING(upb_EnumValueDef_Name(ev));\n}\n\nPHP_METHOD($c_name$, value) {\n $file_c_name$_AddDescriptor();\n const upb_DefPool *symtab = DescriptorPool_GetSymbolTable();\n const upb_EnumDef *e = upb_DefPool_FindEnumByName(symtab, \"$name$\");\n char *name = NULL;\n size_t name_len;\n if (zend_parse_parameters(ZEND_NUM_ARGS(), \"s\", &name,\n &name_len) == FAILURE) {\n return;\n }\n const upb_EnumValueDef* ev = upb_EnumDef_FindValueByNameWithSize(\n e, name, name_len);\n if (!ev) {\n zend_throw_exception_ex(NULL, 0,\n \"$php_name$ has no value \"\n \"defined for name %s.\",\n name);\n return;\n }\n RETURN_LONG(upb_EnumValueDef_Number(ev));\n}\n\nstatic zend_function_entry $c_name$_phpmethods[] = {\n PHP_ME($c_name$, name, arginfo_lookup, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)\n PHP_ME($c_name$, value, arginfo_lookup, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)\n ZEND_FE_END\n};\n\nstatic void $c_name$_ModuleInit() {\n zend_class_entry tmp_ce;\n\n INIT_CLASS_ENTRY(tmp_ce, \"$php_name$\",\n $c_name$_phpmethods);\n\n $c_name$_ce = zend_register_internal_class(&tmp_ce);\n" ,(string *)0x29cd1b,(char *)(lVar8 + 0x20),(string *)"file_c_name",(char *)&local_f8, (string *)0x2a6193,(char *)local_78,(string *)"php_name"); if (local_f8 != &local_e8) { operator_delete(local_f8); } if (0 < *(int *)(param_1 + 4)) { lVar8 = 0; local_58 = param_1; do { uVar1 = *(uint *)(*(long *)(param_1 + 0x28) + 4 + lVar8 * 0x20); uVar3 = -uVar1; if (0 < (int)uVar1) { uVar3 = uVar1; } uVar6 = 1; if (9 < uVar3) { uVar7 = (ulong)uVar3; uVar4 = 4; do { uVar6 = uVar4; uVar5 = (uint)uVar7; if (uVar5 < 100) { uVar6 = uVar6 - 2; goto LAB_0015f7d3; } if (uVar5 < 1000) { uVar6 = uVar6 - 1; goto LAB_0015f7d3; } if (uVar5 < 10000) goto LAB_0015f7d3; uVar7 = uVar7 / 10000; uVar4 = uVar6 + 4; } while (99999 < uVar5); uVar6 = uVar6 + 1; } LAB_0015f7d3: pcVar2 = *(char **)(*(long *)(param_1 + 0x28) + 8 + lVar8 * 0x20); local_f8 = &local_e8; /* try { // try from 0015f7ea to 0015f7fb has its CatchHandler @ 0015f93f */ std::__cxx11::string::_M_construct((ulong)&local_f8,(char)uVar6 - (char)((int)uVar1 >> 0x1f)); std::__detail::__to_chars_10_impl<unsigned_int> ((char *)((ulong)(uVar1 >> 0x1f) + (long)local_f8),uVar6,uVar3); /* try { // try from 0015f80e to 0015f845 has its CatchHandler @ 0015f944 */ io::Printer:: Print<char[7],std::__cxx11::string,char[5],std::__cxx11::string,char[4],std::__cxx11::string> ((char *)param_2, " zend_declare_class_constant_long($c_name$_ce, \"$name$\",\n strlen(\"$name$\"), $num$);\n" ,(string *)0x2a6193,(char *)local_78,(string *)0x29cd1b,pcVar2, (string *)&DAT_002a27db); param_1 = local_58; if (local_f8 != &local_e8) { operator_delete(local_f8); } lVar8 = lVar8 + 1; } while (lVar8 < *(int *)(param_1 + 4)); } /* try { // try from 0015f877 to 0015f887 has its CatchHandler @ 0015f8c8 */ io::Printer::Print<>(param_2,"}\n\n"); if (local_b8[0] != local_a8) { operator_delete(local_b8[0]); } if (local_78[0] != local_68) { operator_delete(local_78[0]); } return; }
25,587
write_hook_for_undo_key_delete
eloqsql/storage/maria/ma_key_recover.c
my_bool write_hook_for_undo_key_delete(enum translog_record_type type, TRN *trn, MARIA_HA *tbl_info, LSN *lsn, void *hook_arg) { struct st_msg_to_write_hook_for_undo_key *msg= (struct st_msg_to_write_hook_for_undo_key *) hook_arg; MARIA_SHARE *share= tbl_info->s; if (msg->auto_increment > 0) /* If auto increment key */ { /* Restore auto increment if no one has changed it in between */ if (share->last_auto_increment == tbl_info->last_auto_increment && tbl_info->last_auto_increment != ~(ulonglong) 0) share->state.auto_increment= tbl_info->last_auto_increment; } return write_hook_for_undo_key(type, trn, tbl_info, lsn, hook_arg); }
O3
c
write_hook_for_undo_key_delete: cmpq $0x0, 0x18(%r8) je 0x59a1e pushq %rbp movq %rsp, %rbp movq (%rdx), %rax movq 0x610(%rax), %r9 movq 0x3e8(%rdx), %r10 cmpq %r10, %r9 setne %r11b cmpq $-0x1, %r10 sete %r10b orb %r11b, %r10b jne 0x59afc movq %r9, 0xd8(%rax) popq %rbp jmp 0x59a1e
write_hook_for_undo_key_delete: cmp qword ptr [r8+18h], 0 jz write_hook_for_undo_key push rbp mov rbp, rsp mov rax, [rdx] mov r9, [rax+610h] mov r10, [rdx+3E8h] cmp r9, r10 setnz r11b cmp r10, 0FFFFFFFFFFFFFFFFh setz r10b or r10b, r11b jnz short loc_59AFC mov [rax+0D8h], r9 loc_59AFC: pop rbp jmp write_hook_for_undo_key
long long write_hook_for_undo_key_delete(unsigned int a1, long long a2, long long a3, long long a4, long long a5) { long long v6; // r9 if ( *(_QWORD *)(a5 + 24) ) { v6 = *(_QWORD *)(*(_QWORD *)a3 + 1552LL); if ( v6 == *(_QWORD *)(a3 + 1000) && *(_QWORD *)(a3 + 1000) != -1LL ) *(_QWORD *)(*(_QWORD *)a3 + 216LL) = v6; } return write_hook_for_undo_key(a1, a2, a3, a4, a5); }
write_hook_for_undo_key_delete: CMP qword ptr [R8 + 0x18],0x0 JZ 0x00159a1e PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDX] MOV R9,qword ptr [RAX + 0x610] MOV R10,qword ptr [RDX + 0x3e8] CMP R9,R10 SETNZ R11B CMP R10,-0x1 SETZ R10B OR R10B,R11B JNZ 0x00159afc MOV qword ptr [RAX + 0xd8],R9 LAB_00159afc: POP RBP JMP 0x00159a1e
void write_hook_for_undo_key_delete (int4 param_1,int8 param_2,long *param_3,int8 param_4, int8 *param_5) { long lVar1; if (param_5[3] != 0) { lVar1 = *(long *)(*param_3 + 0x610); if (param_3[0x7d] != -1 && lVar1 == param_3[0x7d]) { *(long *)(*param_3 + 0xd8) = lVar1; } write_hook_for_undo_key(); return; } *(int8 *)*param_5 = param_5[1]; if (*(char *)((long)param_3 + 0x67e) != '\0') { _ma_unlock_key_del(param_3); } write_hook_for_undo(param_1,param_2,param_3,param_4,0); return; }
25,588
coro::shared_mutex<coro::thread_pool>::shared_mutex(std::shared_ptr<coro::thread_pool>)
AlayaLite/build_O3/_deps/libcoro-src/include/coro/shared_mutex.hpp
explicit shared_mutex(std::shared_ptr<executor_type> e) : m_executor(std::move(e)) { if (m_executor == nullptr) { throw std::runtime_error{"shared_mutex cannot have a nullptr executor"}; } }
O3
cpp
coro::shared_mutex<coro::thread_pool>::shared_mutex(std::shared_ptr<coro::thread_pool>): pushq %r15 pushq %r14 pushq %rbx xorl %eax, %eax movq %rax, 0x8(%rdi) movups (%rsi), %xmm0 movq %rax, 0x8(%rsi) movups %xmm0, (%rdi) movq %rax, (%rsi) xorps %xmm0, %xmm0 movups %xmm0, 0x2c(%rdi) movups %xmm0, 0x20(%rdi) movups %xmm0, 0x10(%rdi) movups %xmm0, 0x40(%rdi) movups %xmm0, 0x50(%rdi) cmpq %rax, (%rdi) je 0x2e0a popq %rbx popq %r14 popq %r15 retq movq %rdi, %rbx movl $0x10, %edi callq 0x20b0 movq %rax, %r15 leaq 0x3327(%rip), %rsi # 0x6148 movq %rax, %rdi callq 0x2080 movq 0x71c0(%rip), %rsi # 0x9ff0 movq 0x7171(%rip), %rdx # 0x9fa8 movq %r15, %rdi callq 0x2240 movq %rax, %r14 jmp 0x2e4f movq %rax, %r14 movq %r15, %rdi callq 0x2100 movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x2e5d callq 0x30f6 movq %r14, %rdi callq 0x2250 nop
_ZN4coro12shared_mutexINS_11thread_poolEEC2ESt10shared_ptrIS1_E: push r15 push r14 push rbx xor eax, eax mov [rdi+8], rax movups xmm0, xmmword ptr [rsi] mov [rsi+8], rax movups xmmword ptr [rdi], xmm0 mov [rsi], rax xorps xmm0, xmm0 movups xmmword ptr [rdi+2Ch], xmm0 movups xmmword ptr [rdi+20h], xmm0 movups xmmword ptr [rdi+10h], xmm0 movups xmmword ptr [rdi+40h], xmm0 movups xmmword ptr [rdi+50h], xmm0 cmp [rdi], rax jz short loc_2E0A pop rbx pop r14 pop r15 retn loc_2E0A: mov rbx, rdi mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aSharedMutexCan; "shared_mutex cannot have a nullptr exec"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r15; void * call ___cxa_throw mov r14, rax jmp short loc_2E4F mov r14, rax mov rdi, r15; void * call ___cxa_free_exception loc_2E4F: mov rdi, [rbx+8] test rdi, rdi jz short loc_2E5D call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_2E5D: mov rdi, r14 call __Unwind_Resume
long long coro::shared_mutex<coro::thread_pool>::shared_mutex(long long a1, __int128 *a2) { long long result; // rax __int128 v3; // xmm0 std::runtime_error *exception; // r15 result = 0LL; *(_QWORD *)(a1 + 8) = 0LL; v3 = *a2; *((_QWORD *)a2 + 1) = 0LL; *(_OWORD *)a1 = v3; *(_QWORD *)a2 = 0LL; *(_OWORD *)(a1 + 44) = 0LL; *(_OWORD *)(a1 + 32) = 0LL; *(_OWORD *)(a1 + 16) = 0LL; *(_OWORD *)(a1 + 64) = 0LL; *(_OWORD *)(a1 + 80) = 0LL; if ( !*(_QWORD *)a1 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "shared_mutex cannot have a nullptr executor"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } return result; }
shared_mutex: PUSH R15 PUSH R14 PUSH RBX XOR EAX,EAX MOV qword ptr [RDI + 0x8],RAX MOVUPS XMM0,xmmword ptr [RSI] MOV qword ptr [RSI + 0x8],RAX MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RSI],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x2c],XMM0 MOVUPS xmmword ptr [RDI + 0x20],XMM0 MOVUPS xmmword ptr [RDI + 0x10],XMM0 MOVUPS xmmword ptr [RDI + 0x40],XMM0 MOVUPS xmmword ptr [RDI + 0x50],XMM0 CMP qword ptr [RDI],RAX JZ 0x00102e0a POP RBX POP R14 POP R15 RET LAB_00102e0a: MOV RBX,RDI MOV EDI,0x10 CALL 0x001020b0 MOV R15,RAX LAB_00102e1a: LEA RSI,[0x106148] MOV RDI,RAX CALL 0x00102080 LAB_00102e29: MOV RSI,qword ptr [0x00109ff0] MOV RDX,qword ptr [0x00109fa8] MOV RDI,R15 CALL 0x00102240
/* coro::shared_mutex<coro::thread_pool>::shared_mutex(std::shared_ptr<coro::thread_pool>) */ void __thiscall coro::shared_mutex<coro::thread_pool>::shared_mutex (shared_mutex<coro::thread_pool> *this,int8 *param_2) { int8 uVar1; runtime_error *this_00; *(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 + 0x2c) = 0; *(int8 *)(this + 0x34) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; *(int8 *)(this + 0x50) = 0; *(int8 *)(this + 0x58) = 0; if (*(long *)this != 0) { return; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00102e1a to 00102e28 has its CatchHandler @ 00102e44 */ std::runtime_error::runtime_error(this_00,"shared_mutex cannot have a nullptr executor"); /* try { // try from 00102e29 to 00102e3e has its CatchHandler @ 00102e3f */ /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_00109ff0,PTR__runtime_error_00109fa8); }
25,589
js_parse_check_duplicate_parameter
bluesky950520[P]quickjs/quickjs.c
static int js_parse_check_duplicate_parameter(JSParseState *s, JSAtom name) { /* Check for duplicate parameter names */ JSFunctionDef *fd = s->cur_func; int i; for (i = 0; i < fd->arg_count; i++) { if (fd->args[i].var_name == name) goto duplicate; } for (i = 0; i < fd->var_count; i++) { if (fd->vars[i].var_name == name) goto duplicate; } return 0; duplicate: return js_parse_error(s, "Duplicate parameter name not allowed in this context"); }
O0
c
js_parse_check_duplicate_parameter: subq $0x28, %rsp movq %rdi, 0x18(%rsp) movl %esi, 0x14(%rsp) movq 0x18(%rsp), %rax movq 0x90(%rax), %rax movq %rax, 0x8(%rsp) movl $0x0, 0x4(%rsp) movl 0x4(%rsp), %eax movq 0x8(%rsp), %rcx cmpl 0xb4(%rcx), %eax jge 0xad028 movq 0x8(%rsp), %rax movq 0xa8(%rax), %rax movslq 0x4(%rsp), %rcx shlq $0x4, %rcx addq %rcx, %rax movl (%rax), %eax cmpl 0x14(%rsp), %eax jne 0xad019 jmp 0xad07c jmp 0xad01b movl 0x4(%rsp), %eax addl $0x1, %eax movl %eax, 0x4(%rsp) jmp 0xacfe6 movl $0x0, 0x4(%rsp) movl 0x4(%rsp), %eax movq 0x8(%rsp), %rcx cmpl 0xa4(%rcx), %eax jge 0xad072 movq 0x8(%rsp), %rax movq 0x90(%rax), %rax movslq 0x4(%rsp), %rcx shlq $0x4, %rcx addq %rcx, %rax movl (%rax), %eax cmpl 0x14(%rsp), %eax jne 0xad063 jmp 0xad07c jmp 0xad065 movl 0x4(%rsp), %eax addl $0x1, %eax movl %eax, 0x4(%rsp) jmp 0xad030 movl $0x0, 0x24(%rsp) jmp 0xad093 movq 0x18(%rsp), %rdi leaq 0x693aa(%rip), %rsi # 0x116432 movb $0x0, %al callq 0x4e980 movl %eax, 0x24(%rsp) movl 0x24(%rsp), %eax addq $0x28, %rsp retq nopl (%rax)
js_parse_check_duplicate_parameter: sub rsp, 28h mov [rsp+28h+var_10], rdi mov [rsp+28h+var_14], esi mov rax, [rsp+28h+var_10] mov rax, [rax+90h] mov [rsp+28h+var_20], rax mov [rsp+28h+var_24], 0 loc_ACFE6: mov eax, [rsp+28h+var_24] mov rcx, [rsp+28h+var_20] cmp eax, [rcx+0B4h] jge short loc_AD028 mov rax, [rsp+28h+var_20] mov rax, [rax+0A8h] movsxd rcx, [rsp+28h+var_24] shl rcx, 4 add rax, rcx mov eax, [rax] cmp eax, [rsp+28h+var_14] jnz short loc_AD019 jmp short loc_AD07C loc_AD019: jmp short $+2 loc_AD01B: mov eax, [rsp+28h+var_24] add eax, 1 mov [rsp+28h+var_24], eax jmp short loc_ACFE6 loc_AD028: mov [rsp+28h+var_24], 0 loc_AD030: mov eax, [rsp+28h+var_24] mov rcx, [rsp+28h+var_20] cmp eax, [rcx+0A4h] jge short loc_AD072 mov rax, [rsp+28h+var_20] mov rax, [rax+90h] movsxd rcx, [rsp+28h+var_24] shl rcx, 4 add rax, rcx mov eax, [rax] cmp eax, [rsp+28h+var_14] jnz short loc_AD063 jmp short loc_AD07C loc_AD063: jmp short $+2 loc_AD065: mov eax, [rsp+28h+var_24] add eax, 1 mov [rsp+28h+var_24], eax jmp short loc_AD030 loc_AD072: mov [rsp+28h+var_4], 0 jmp short loc_AD093 loc_AD07C: mov rdi, [rsp+28h+var_10] lea rsi, aDuplicateParam; "Duplicate parameter name not allowed in"... mov al, 0 call js_parse_error mov [rsp+28h+var_4], eax loc_AD093: mov eax, [rsp+28h+var_4] add rsp, 28h retn
long long js_parse_check_duplicate_parameter( _QWORD *a1, int a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, long long a12, long long a13, long long a14) { long long v14; // rcx char v16; // [rsp+0h] [rbp-28h] int i; // [rsp+4h] [rbp-24h] int j; // [rsp+4h] [rbp-24h] long long v19; // [rsp+8h] [rbp-20h] v19 = a1[18]; for ( i = 0; i < *(_DWORD *)(v19 + 180); ++i ) { v14 = 16LL * i; if ( *(_DWORD *)(v14 + *(_QWORD *)(v19 + 168)) == a2 ) return (unsigned int)js_parse_error( a1, (long long)"Duplicate parameter name not allowed in this context", a3, v14, a13, a14, a4, a5, a6, a7, a8, a9, a10, a11, v16); } for ( j = 0; j < *(_DWORD *)(v19 + 164); ++j ) { v14 = 16LL * j; if ( *(_DWORD *)(v14 + *(_QWORD *)(v19 + 144)) == a2 ) return (unsigned int)js_parse_error( a1, (long long)"Duplicate parameter name not allowed in this context", a3, v14, a13, a14, a4, a5, a6, a7, a8, a9, a10, a11, v16); } return 0; }
js_parse_check_duplicate_parameter: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV dword ptr [RSP + 0x14],ESI MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x90] MOV qword ptr [RSP + 0x8],RAX MOV dword ptr [RSP + 0x4],0x0 LAB_001acfe6: MOV EAX,dword ptr [RSP + 0x4] MOV RCX,qword ptr [RSP + 0x8] CMP EAX,dword ptr [RCX + 0xb4] JGE 0x001ad028 MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0xa8] MOVSXD RCX,dword ptr [RSP + 0x4] SHL RCX,0x4 ADD RAX,RCX MOV EAX,dword ptr [RAX] CMP EAX,dword ptr [RSP + 0x14] JNZ 0x001ad019 JMP 0x001ad07c LAB_001ad019: JMP 0x001ad01b LAB_001ad01b: MOV EAX,dword ptr [RSP + 0x4] ADD EAX,0x1 MOV dword ptr [RSP + 0x4],EAX JMP 0x001acfe6 LAB_001ad028: MOV dword ptr [RSP + 0x4],0x0 LAB_001ad030: MOV EAX,dword ptr [RSP + 0x4] MOV RCX,qword ptr [RSP + 0x8] CMP EAX,dword ptr [RCX + 0xa4] JGE 0x001ad072 MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x90] MOVSXD RCX,dword ptr [RSP + 0x4] SHL RCX,0x4 ADD RAX,RCX MOV EAX,dword ptr [RAX] CMP EAX,dword ptr [RSP + 0x14] JNZ 0x001ad063 JMP 0x001ad07c LAB_001ad063: JMP 0x001ad065 LAB_001ad065: MOV EAX,dword ptr [RSP + 0x4] ADD EAX,0x1 MOV dword ptr [RSP + 0x4],EAX JMP 0x001ad030 LAB_001ad072: MOV dword ptr [RSP + 0x24],0x0 JMP 0x001ad093 LAB_001ad07c: MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[0x216432] MOV AL,0x0 CALL 0x0014e980 MOV dword ptr [RSP + 0x24],EAX LAB_001ad093: MOV EAX,dword ptr [RSP + 0x24] ADD RSP,0x28 RET
int4 js_parse_check_duplicate_parameter(long param_1,int param_2) { long lVar1; int4 uVar2; int local_24; lVar1 = *(long *)(param_1 + 0x90); for (local_24 = 0; local_24 < *(int *)(lVar1 + 0xb4); local_24 = local_24 + 1) { if (*(int *)(*(long *)(lVar1 + 0xa8) + (long)local_24 * 0x10) == param_2) goto LAB_001ad07c; } local_24 = 0; while( true ) { if (*(int *)(lVar1 + 0xa4) <= local_24) { return 0; } if (*(int *)(*(long *)(lVar1 + 0x90) + (long)local_24 * 0x10) == param_2) break; local_24 = local_24 + 1; } LAB_001ad07c: uVar2 = js_parse_error(param_1,"Duplicate parameter name not allowed in this context"); return uVar2; }
25,590
js_parse_check_duplicate_parameter
bluesky950520[P]quickjs/quickjs.c
static int js_parse_check_duplicate_parameter(JSParseState *s, JSAtom name) { /* Check for duplicate parameter names */ JSFunctionDef *fd = s->cur_func; int i; for (i = 0; i < fd->arg_count; i++) { if (fd->args[i].var_name == name) goto duplicate; } for (i = 0; i < fd->var_count; i++) { if (fd->vars[i].var_name == name) goto duplicate; } return 0; duplicate: return js_parse_error(s, "Duplicate parameter name not allowed in this context"); }
O1
c
js_parse_check_duplicate_parameter: pushq %rax movq 0x90(%rdi), %rax movslq 0xb4(%rax), %rcx testq %rcx, %rcx jle 0x68d9f movq 0xa8(%rax), %rdx shlq $0x4, %rcx xorl %r8d, %r8d cmpl %esi, (%rdx,%r8) je 0x68dca addq $0x10, %r8 cmpq %r8, %rcx jne 0x68d90 movslq 0xa4(%rax), %rcx testq %rcx, %rcx jle 0x68dc6 movq 0x90(%rax), %rax shlq $0x4, %rcx xorl %edx, %edx cmpl %esi, (%rax,%rdx) je 0x68dca addq $0x10, %rdx cmpq %rdx, %rcx jne 0x68db8 xorl %eax, %eax jmp 0x68ddd leaq 0x3c675(%rip), %rsi # 0xa5446 xorl %eax, %eax callq 0x33d45 movl $0xffffffff, %eax # imm = 0xFFFFFFFF popq %rcx retq
js_parse_check_duplicate_parameter: push rax mov rax, [rdi+90h] movsxd rcx, dword ptr [rax+0B4h] test rcx, rcx jle short loc_68D9F mov rdx, [rax+0A8h] shl rcx, 4 xor r8d, r8d loc_68D90: cmp [rdx+r8], esi jz short loc_68DCA add r8, 10h cmp rcx, r8 jnz short loc_68D90 loc_68D9F: movsxd rcx, dword ptr [rax+0A4h] test rcx, rcx jle short loc_68DC6 mov rax, [rax+90h] shl rcx, 4 xor edx, edx loc_68DB8: cmp [rax+rdx], esi jz short loc_68DCA add rdx, 10h cmp rcx, rdx jnz short loc_68DB8 loc_68DC6: xor eax, eax jmp short loc_68DDD loc_68DCA: lea rsi, aDuplicateParam; "Duplicate parameter name not allowed in"... xor eax, eax call js_parse_error mov eax, 0FFFFFFFFh loc_68DDD: pop rcx retn
long long js_parse_check_duplicate_parameter( long long *a1, int a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, long long a11, long long a12, long long a13, long long a14) { char v14; // al long long v15; // rax long long v16; // rcx long long v17; // rdx long long v18; // rcx long long v19; // rcx long long v20; // rax char v22; // [rsp-8h] [rbp-8h] v22 = v14; v15 = a1[18]; v16 = *(int *)(v15 + 180); if ( v16 <= 0 ) { LABEL_5: v19 = *(int *)(v15 + 164); if ( v19 <= 0 ) return 0LL; v20 = *(_QWORD *)(v15 + 144); v18 = 16 * v19; v17 = 0LL; while ( *(_DWORD *)(v20 + v17) != a2 ) { v17 += 16LL; if ( v18 == v17 ) return 0LL; } } else { v17 = *(_QWORD *)(v15 + 168); v18 = 16 * v16; a13 = 0LL; while ( *(_DWORD *)(v17 + a13) != a2 ) { a13 += 16LL; if ( v18 == a13 ) goto LABEL_5; } } js_parse_error( a1, (long long)"Duplicate parameter name not allowed in this context", v17, v18, a13, a14, a3, a4, a5, a6, a7, a8, a9, a10, v22); return 0xFFFFFFFFLL; }
js_parse_check_duplicate_parameter: PUSH RAX MOV RAX,qword ptr [RDI + 0x90] MOVSXD RCX,dword ptr [RAX + 0xb4] TEST RCX,RCX JLE 0x00168d9f MOV RDX,qword ptr [RAX + 0xa8] SHL RCX,0x4 XOR R8D,R8D LAB_00168d90: CMP dword ptr [RDX + R8*0x1],ESI JZ 0x00168dca ADD R8,0x10 CMP RCX,R8 JNZ 0x00168d90 LAB_00168d9f: MOVSXD RCX,dword ptr [RAX + 0xa4] TEST RCX,RCX JLE 0x00168dc6 MOV RAX,qword ptr [RAX + 0x90] SHL RCX,0x4 XOR EDX,EDX LAB_00168db8: CMP dword ptr [RAX + RDX*0x1],ESI JZ 0x00168dca ADD RDX,0x10 CMP RCX,RDX JNZ 0x00168db8 LAB_00168dc6: XOR EAX,EAX JMP 0x00168ddd LAB_00168dca: LEA RSI,[0x1a5446] XOR EAX,EAX CALL 0x00133d45 MOV EAX,0xffffffff LAB_00168ddd: POP RCX RET
int8 js_parse_check_duplicate_parameter(long param_1,int param_2) { long lVar1; long lVar2; lVar1 = *(long *)(param_1 + 0x90); if (0 < (long)*(int *)(lVar1 + 0xb4)) { lVar2 = 0; do { if (*(int *)(*(long *)(lVar1 + 0xa8) + lVar2) == param_2) goto LAB_00168dca; lVar2 = lVar2 + 0x10; } while ((long)*(int *)(lVar1 + 0xb4) * 0x10 != lVar2); } if (0 < (long)*(int *)(lVar1 + 0xa4)) { lVar2 = 0; do { if (*(int *)(*(long *)(lVar1 + 0x90) + lVar2) == param_2) { LAB_00168dca: js_parse_error(param_1,"Duplicate parameter name not allowed in this context"); return 0xffffffff; } lVar2 = lVar2 + 0x10; } while ((long)*(int *)(lVar1 + 0xa4) * 0x10 != lVar2); } return 0; }
25,591
js_parse_check_duplicate_parameter
bluesky950520[P]quickjs/quickjs.c
static int js_parse_check_duplicate_parameter(JSParseState *s, JSAtom name) { /* Check for duplicate parameter names */ JSFunctionDef *fd = s->cur_func; int i; for (i = 0; i < fd->arg_count; i++) { if (fd->args[i].var_name == name) goto duplicate; } for (i = 0; i < fd->var_count; i++) { if (fd->vars[i].var_name == name) goto duplicate; } return 0; duplicate: return js_parse_error(s, "Duplicate parameter name not allowed in this context"); }
O2
c
js_parse_check_duplicate_parameter: pushq %rax movq 0x90(%rdi), %rcx movl 0xb4(%rcx), %eax xorl %edx, %edx testl %eax, %eax cmovlel %edx, %eax shlq $0x4, %rax addq $0x10, %rax leaq 0x10(%rdx), %r8 cmpq %r8, %rax je 0x59bb7 movq 0xa8(%rcx), %r9 cmpl %esi, (%r9,%rdx) movq %r8, %rdx jne 0x59b9c jmp 0x59be8 movl 0xa4(%rcx), %edx xorl %eax, %eax testl %edx, %edx cmovlel %eax, %edx shlq $0x4, %rdx addq $0x10, %rdx xorl %r8d, %r8d leaq 0x10(%r8), %r9 cmpq %r9, %rdx je 0x59bf9 movq 0x90(%rcx), %r10 cmpl %esi, (%r10,%r8) movq %r9, %r8 jne 0x59bcf leaq 0x31791(%rip), %rsi # 0x8b380 xorl %eax, %eax callq 0x2c007 pushq $-0x1 popq %rax popq %rcx retq
js_parse_check_duplicate_parameter: push rax mov rcx, [rdi+90h] mov eax, [rcx+0B4h] xor edx, edx test eax, eax cmovle eax, edx shl rax, 4 add rax, 10h loc_59B9C: lea r8, [rdx+10h] cmp rax, r8 jz short loc_59BB7 mov r9, [rcx+0A8h] cmp [r9+rdx], esi mov rdx, r8 jnz short loc_59B9C jmp short loc_59BE8 loc_59BB7: mov edx, [rcx+0A4h] xor eax, eax test edx, edx cmovle edx, eax shl rdx, 4 add rdx, 10h xor r8d, r8d loc_59BCF: lea r9, [r8+10h] cmp rdx, r9 jz short loc_59BF9 mov r10, [rcx+90h] cmp [r10+r8], esi mov r8, r9 jnz short loc_59BCF loc_59BE8: lea rsi, aDuplicateParam; "Duplicate parameter name not allowed in"... xor eax, eax call js_parse_error push 0FFFFFFFFFFFFFFFFh pop rax loc_59BF9: pop rcx retn
long long js_parse_check_duplicate_parameter( long long *a1, int a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10) { char v10; // al long long v11; // rcx long long v12; // rax long long v13; // rdx long long v14; // rax long long v15; // r8 long long v16; // r9 bool v17; // zf long long v18; // rdx long long result; // rax char v20; // [rsp-8h] [rbp-8h] v20 = v10; v11 = a1[18]; v12 = *(unsigned int *)(v11 + 180); v13 = 0LL; if ( (int)v12 <= 0 ) v12 = 0LL; v14 = 16 * v12 + 16; while ( 1 ) { v15 = v13 + 16; if ( v14 == v13 + 16 ) break; v16 = *(_QWORD *)(v11 + 168); v17 = *(_DWORD *)(v16 + v13) == a2; v13 += 16LL; if ( v17 ) { LABEL_12: js_parse_error( a1, (long long)"Duplicate parameter name not allowed in this context", v13, v11, v15, v16, a3, a4, a5, a6, a7, a8, a9, a10, v20); return -1LL; } } v18 = *(unsigned int *)(v11 + 164); result = 0LL; if ( (int)v18 <= 0 ) v18 = 0LL; v13 = 16 * v18 + 16; v15 = 0LL; while ( 1 ) { v16 = v15 + 16; if ( v13 == v15 + 16 ) return result; v17 = *(_DWORD *)(*(_QWORD *)(v11 + 144) + v15) == a2; v15 += 16LL; if ( v17 ) goto LABEL_12; } }
js_parse_check_duplicate_parameter: PUSH RAX MOV RCX,qword ptr [RDI + 0x90] MOV EAX,dword ptr [RCX + 0xb4] XOR EDX,EDX TEST EAX,EAX CMOVLE EAX,EDX SHL RAX,0x4 ADD RAX,0x10 LAB_00159b9c: LEA R8,[RDX + 0x10] CMP RAX,R8 JZ 0x00159bb7 MOV R9,qword ptr [RCX + 0xa8] CMP dword ptr [R9 + RDX*0x1],ESI MOV RDX,R8 JNZ 0x00159b9c JMP 0x00159be8 LAB_00159bb7: MOV EDX,dword ptr [RCX + 0xa4] XOR EAX,EAX TEST EDX,EDX CMOVLE EDX,EAX SHL RDX,0x4 ADD RDX,0x10 XOR R8D,R8D LAB_00159bcf: LEA R9,[R8 + 0x10] CMP RDX,R9 JZ 0x00159bf9 MOV R10,qword ptr [RCX + 0x90] CMP dword ptr [R10 + R8*0x1],ESI MOV R8,R9 JNZ 0x00159bcf LAB_00159be8: LEA RSI,[0x18b380] XOR EAX,EAX CALL 0x0012c007 PUSH -0x1 POP RAX LAB_00159bf9: POP RCX RET
int8 js_parse_check_duplicate_parameter(long param_1,int param_2) { int *piVar1; long lVar2; ulong uVar3; ulong uVar4; long lVar5; lVar2 = *(long *)(param_1 + 0x90); uVar3 = (ulong)*(uint *)(lVar2 + 0xb4); if ((int)*(uint *)(lVar2 + 0xb4) < 1) { uVar3 = 0; } uVar4 = 0; while (uVar3 * 0x10 + 0x10 != uVar4 + 0x10) { piVar1 = (int *)(*(long *)(lVar2 + 0xa8) + uVar4); uVar4 = uVar4 + 0x10; if (*piVar1 == param_2) goto LAB_00159be8; } uVar3 = (ulong)*(uint *)(lVar2 + 0xa4); if ((int)*(uint *)(lVar2 + 0xa4) < 1) { uVar3 = 0; } lVar5 = 0; do { if (uVar3 * 0x10 + 0x10 == lVar5 + 0x10) { return 0; } piVar1 = (int *)(*(long *)(lVar2 + 0x90) + lVar5); lVar5 = lVar5 + 0x10; } while (*piVar1 != param_2); LAB_00159be8: js_parse_error(param_1,"Duplicate parameter name not allowed in this context"); return 0xffffffffffffffff; }
25,592
nglog::DumpStackTrace(int, void (*)(char const*, void*), void*)
ng-log[P]ng-log/src/utilities.cc
static void DumpStackTrace(int skip_count, DebugWriter* writerfn, void* arg) { // Print stack trace void* stack[32]; int depth = GetStackTrace(stack, ARRAYSIZE(stack), skip_count + 1); for (int i = 0; i < depth; i++) { # if defined(HAVE_SYMBOLIZE) if (FLAGS_symbolize_stacktrace) { DumpPCAndSymbol(writerfn, arg, stack[i], " "); } else { DumpPC(writerfn, arg, stack[i], " "); } # else DumpPC(writerfn, arg, stack[i], " "); # endif } }
O0
cpp
nglog::DumpStackTrace(int, void (*)(char const*, void*), void*): pushq %rbp movq %rsp, %rbp subq $0x130, %rsp # imm = 0x130 movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) leaq -0x120(%rbp), %rdi movl -0x4(%rbp), %edx addl $0x1, %edx movl $0x20, %esi callq 0x4da50 movl %eax, -0x124(%rbp) movl $0x0, -0x128(%rbp) movl -0x128(%rbp), %eax cmpl -0x124(%rbp), %eax jge 0x4fc22 leaq 0x2820f(%rip), %rax # 0x77dd1 testb $0x1, (%rax) je 0x4fbec movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movslq -0x128(%rbp), %rax movq -0x120(%rbp,%rax,8), %rdx leaq 0x3476(%rip), %rcx # 0x5305b callq 0x4fde0 jmp 0x4fc0f movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movslq -0x128(%rbp), %rax movq -0x120(%rbp,%rax,8), %rdx leaq 0x3451(%rip), %rcx # 0x5305b callq 0x4fe90 jmp 0x4fc11 movl -0x128(%rbp), %eax addl $0x1, %eax movl %eax, -0x128(%rbp) jmp 0x4fbad addq $0x130, %rsp # imm = 0x130 popq %rbp retq nopl (%rax,%rax)
_ZN5nglogL14DumpStackTraceEiPFvPKcPvES2_: push rbp mov rbp, rsp sub rsp, 130h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx lea rdi, [rbp+var_120]; this mov edx, [rbp+var_4] add edx, 1; int mov esi, offset qword_20; void ** call _ZN5nglog5tools13GetStackTraceEPPvii; nglog::tools::GetStackTrace(void **,int,int) mov [rbp+var_124], eax mov [rbp+var_128], 0 loc_4FBAD: mov eax, [rbp+var_128] cmp eax, [rbp+var_124] jge short loc_4FC22 lea rax, _ZN3fLB26FLAGS_symbolize_stacktraceE; fLB::FLAGS_symbolize_stacktrace test byte ptr [rax], 1 jz short loc_4FBEC mov rdi, [rbp+var_10]; this mov rsi, [rbp+var_18]; void (*)(const char *, void *) movsxd rax, [rbp+var_128] mov rdx, [rbp+rax*8+var_120]; void * lea rcx, asc_5305B; " " call _ZN5nglogL15DumpPCAndSymbolEPFvPKcPvES2_S2_S1_; nglog::DumpPCAndSymbol(void (*)(char const*,void *),void *,void *,char const*) jmp short loc_4FC0F loc_4FBEC: mov rdi, [rbp+var_10]; this mov rsi, [rbp+var_18]; void (*)(const char *, void *) movsxd rax, [rbp+var_128] mov rdx, [rbp+rax*8+var_120]; void * lea rcx, asc_5305B; " " call _ZN5nglogL6DumpPCEPFvPKcPvES2_S2_S1_; nglog::DumpPC(void (*)(char const*,void *),void *,void *,char const*) loc_4FC0F: jmp short $+2 loc_4FC11: mov eax, [rbp+var_128] add eax, 1 mov [rbp+var_128], eax jmp short loc_4FBAD loc_4FC22: add rsp, 130h pop rbp retn
long long nglog::DumpStackTrace(nglog *this, nglog *a2, void (*a3)(const char *, void *), void *a4) { const char *v4; // r8 long long result; // rax unsigned int i; // [rsp+8h] [rbp-128h] int StackTrace; // [rsp+Ch] [rbp-124h] void *v8[33]; // [rsp+10h] [rbp-120h] BYREF void (*v9)(const char *, void *); // [rsp+118h] [rbp-18h] nglog *v10; // [rsp+120h] [rbp-10h] int v11; // [rsp+12Ch] [rbp-4h] v11 = (int)this; v10 = a2; v9 = a3; StackTrace = nglog::tools::GetStackTrace((nglog::tools *)v8, (void **)&qword_20, (int)this + 1); for ( i = 0; ; ++i ) { result = i; if ( (int)i >= StackTrace ) break; if ( (fLB::FLAGS_symbolize_stacktrace & 1) != 0 ) nglog::DumpPCAndSymbol(v10, v9, v8[i], " ", v4); else nglog::DumpPC(v10, v9, v8[i], " ", v4); } return result; }
DumpStackTrace: PUSH RBP MOV RBP,RSP SUB RSP,0x130 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX LEA RDI,[RBP + -0x120] MOV EDX,dword ptr [RBP + -0x4] ADD EDX,0x1 MOV ESI,0x20 CALL 0x0014da50 MOV dword ptr [RBP + -0x124],EAX MOV dword ptr [RBP + -0x128],0x0 LAB_0014fbad: MOV EAX,dword ptr [RBP + -0x128] CMP EAX,dword ptr [RBP + -0x124] JGE 0x0014fc22 LEA RAX,[0x177dd1] TEST byte ptr [RAX],0x1 JZ 0x0014fbec MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOVSXD RAX,dword ptr [RBP + -0x128] MOV RDX,qword ptr [RBP + RAX*0x8 + -0x120] LEA RCX,[0x15305b] CALL 0x0014fde0 JMP 0x0014fc0f LAB_0014fbec: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOVSXD RAX,dword ptr [RBP + -0x128] MOV RDX,qword ptr [RBP + RAX*0x8 + -0x120] LEA RCX,[0x15305b] CALL 0x0014fe90 LAB_0014fc0f: JMP 0x0014fc11 LAB_0014fc11: MOV EAX,dword ptr [RBP + -0x128] ADD EAX,0x1 MOV dword ptr [RBP + -0x128],EAX JMP 0x0014fbad LAB_0014fc22: ADD RSP,0x130 POP RBP RET
/* nglog::DumpStackTrace(int, void (*)(char const*, void*), void*) */ void nglog::DumpStackTrace(int param_1,_func_void_char_ptr_void_ptr *param_2,void *param_3) { int iVar1; int local_130; void *local_128 [33]; void *local_20; _func_void_char_ptr_void_ptr *local_18; int local_c; local_20 = param_3; local_18 = param_2; local_c = param_1; iVar1 = tools::GetStackTrace(local_128,0x20,param_1 + 1); for (local_130 = 0; local_130 < iVar1; local_130 = local_130 + 1) { if ((fLB::FLAGS_symbolize_stacktrace & 1) == 0) { DumpPC(local_18,local_20,local_128[local_130]," "); } else { DumpPCAndSymbol(local_18,local_20,local_128[local_130]," "); } } return; }
25,593
nglog::DumpStackTrace(int, void (*)(char const*, void*), void*)
ng-log[P]ng-log/src/utilities.cc
static void DumpStackTrace(int skip_count, DebugWriter* writerfn, void* arg) { // Print stack trace void* stack[32]; int depth = GetStackTrace(stack, ARRAYSIZE(stack), skip_count + 1); for (int i = 0; i < depth; i++) { # if defined(HAVE_SYMBOLIZE) if (FLAGS_symbolize_stacktrace) { DumpPCAndSymbol(writerfn, arg, stack[i], " "); } else { DumpPC(writerfn, arg, stack[i], " "); } # else DumpPC(writerfn, arg, stack[i], " "); # endif } }
O1
cpp
nglog::DumpStackTrace(int, void (*)(char const*, void*), void*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x918, %rsp # imm = 0x918 movq %rsi, %rbx movq %rdi, %r14 leaq 0x10(%rsp), %rdi movl $0x20, %esi movl $0x2, %edx callq 0x21408 testl %eax, %eax jle 0x22614 movl %eax, %r13d leaq 0x110(%rsp), %r15 xorl %ebp, %ebp movq 0x10(%rsp,%rbp,8), %r12 leaq 0xf657(%rip), %rax # 0x31bb9 cmpb $0x1, (%rax) jne 0x225d9 leaq -0x1(%r12), %rdi movl $0x400, %edx # imm = 0x400 movq %r15, %rsi xorl %ecx, %ecx callq 0x216ae testb %al, %al leaq 0x130c(%rip), %rax # 0x23890 cmovneq %r15, %rax movq %rax, (%rsp) movl $0x400, %esi # imm = 0x400 movq %r13, %r15 movq %r14, %r13 movq %rbx, %r14 leaq 0x510(%rsp), %rbx movq %rbx, %rdi leaq 0x2c8f(%rip), %rdx # 0x2523b leaq 0x29e8(%rip), %rcx # 0x24f9b movl $0x12, %r8d movq %r12, %r9 xorl %eax, %eax callq 0x78e0 movq %rbx, %rdi movq %r14, %rbx movq %r13, %r14 movq %r15, %r13 leaq 0x110(%rsp), %r15 jmp 0x22602 movl $0x64, %esi movq %r15, %rdi leaq 0x2c60(%rip), %rdx # 0x25248 leaq 0x29ac(%rip), %rcx # 0x24f9b movl $0x12, %r8d movq %r12, %r9 xorl %eax, %eax callq 0x78e0 movq %r15, %rdi movq %rbx, %rsi callq *%r14 incq %rbp cmpq %rbp, %r13 jne 0x22556 addq $0x918, %rsp # imm = 0x918 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN5nglogL14DumpStackTraceEiPFvPKcPvES2_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 918h mov rbx, rsi mov r14, rdi lea rdi, [rsp+948h+var_938]; this mov esi, offset qword_20; void ** mov edx, 2; int call _ZN5nglog5tools13GetStackTraceEPPvii; nglog::tools::GetStackTrace(void **,int,int) test eax, eax jle loc_22614 mov r13d, eax lea r15, [rsp+948h+var_838] xor ebp, ebp loc_22556: mov r12, [rsp+rbp*8+948h+var_938] lea rax, _ZN3fLB26FLAGS_symbolize_stacktraceE; fLB::FLAGS_symbolize_stacktrace cmp byte ptr [rax], 1 jnz short loc_225D9 lea rdi, [r12-1] mov edx, 400h mov rsi, r15 xor ecx, ecx call _ZN5nglog5tools9SymbolizeEPvPcmNS0_16SymbolizeOptionsE; nglog::tools::Symbolize(void *,char *,ulong,nglog::tools::SymbolizeOptions) test al, al lea rax, aUnknown; "(unknown)" cmovnz rax, r15 mov [rsp+948h+var_948], rax mov esi, 400h mov r15, r13 mov r13, r14 mov r14, rbx lea rbx, [rsp+948h+var_438] mov rdi, rbx lea rdx, aSPS; "%s@ %*p %s\n" lea rcx, asc_24F9B; " " mov r8d, 12h mov r9, r12 xor eax, eax call _snprintf mov rdi, rbx mov rbx, r14 mov r14, r13 mov r13, r15 lea r15, [rsp+948h+var_838] jmp short loc_22602 loc_225D9: mov esi, 64h ; 'd' mov rdi, r15 lea rdx, aSP; "%s@ %*p\n" lea rcx, asc_24F9B; " " mov r8d, 12h mov r9, r12 xor eax, eax call _snprintf mov rdi, r15 loc_22602: mov rsi, rbx call r14 inc rbp cmp r13, rbp jnz loc_22556 loc_22614: add rsp, 918h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long nglog::DumpStackTrace(nglog *this, long long a2, void (*a3)(const char *, void *), void *a4) { long long result; // rax long long v5; // r13 long long i; // rbp const void *v7; // r12 bool v8; // zf const char *v9; // rax _QWORD v10[32]; // [rsp+10h] [rbp-938h] BYREF _BYTE v11[1024]; // [rsp+110h] [rbp-838h] BYREF _BYTE v12[1080]; // [rsp+510h] [rbp-438h] BYREF result = nglog::tools::GetStackTrace((nglog::tools *)v10, (void **)&qword_20, 2); if ( (int)result > 0 ) { v5 = (unsigned int)result; for ( i = 0LL; i != v5; ++i ) { v7 = (const void *)v10[i]; if ( fLB::FLAGS_symbolize_stacktrace == 1 ) { v8 = (unsigned __int8)nglog::tools::Symbolize( (unsigned long long)v7 - 1, (nglog::tools::_anonymous_namespace_ *)v11, (char *)&stru_3F0.st_size) == 0; v9 = "(unknown)"; if ( !v8 ) v9 = v11; snprintf(v12, 1024LL, "%s@ %*p %s\n", " ", 18, v7, v9); result = ((long long ( *)(_BYTE *, long long))this)(v12, a2); } else { snprintf(v11, 100LL, "%s@ %*p\n", " ", 18, (const void *)v10[i]); result = ((long long ( *)(_BYTE *, long long))this)(v11, a2); } } } return result; }
DumpStackTrace: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x918 MOV RBX,RSI MOV R14,RDI LEA RDI,[RSP + 0x10] MOV ESI,0x20 MOV EDX,0x2 CALL 0x00121408 TEST EAX,EAX JLE 0x00122614 MOV R13D,EAX LEA R15,[RSP + 0x110] XOR EBP,EBP LAB_00122556: MOV R12,qword ptr [RSP + RBP*0x8 + 0x10] LEA RAX,[0x131bb9] CMP byte ptr [RAX],0x1 JNZ 0x001225d9 LEA RDI,[R12 + -0x1] MOV EDX,0x400 MOV RSI,R15 XOR ECX,ECX CALL 0x001216ae TEST AL,AL LEA RAX,[0x123890] CMOVNZ RAX,R15 MOV qword ptr [RSP],RAX MOV ESI,0x400 MOV R15,R13 MOV R13,R14 MOV R14,RBX LEA RBX,[RSP + 0x510] MOV RDI,RBX LEA RDX,[0x12523b] LEA RCX,[0x124f9b] MOV R8D,0x12 MOV R9,R12 XOR EAX,EAX CALL 0x001078e0 MOV RDI,RBX MOV RBX,R14 MOV R14,R13 MOV R13,R15 LEA R15,[RSP + 0x110] JMP 0x00122602 LAB_001225d9: MOV ESI,0x64 MOV RDI,R15 LEA RDX,[0x125248] LEA RCX,[0x124f9b] MOV R8D,0x12 MOV R9,R12 XOR EAX,EAX CALL 0x001078e0 MOV RDI,R15 LAB_00122602: MOV RSI,RBX CALL R14 INC RBP CMP R13,RBP JNZ 0x00122556 LAB_00122614: ADD RSP,0x918 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nglog::DumpStackTrace(int, void (*)(char const*, void*), void*) */ void nglog::DumpStackTrace(int param_1,_func_void_char_ptr_void_ptr *param_2,void *param_3) { void *pvVar1; char cVar2; uint uVar3; char *pcVar4; ulong uVar5; int4 in_register_0000003c; char *__s; void *local_938 [32]; char local_838 [1024]; char local_438 [1032]; uVar3 = tools::GetStackTrace(local_938,0x20,2); if (0 < (int)uVar3) { uVar5 = 0; do { __s = local_838; pvVar1 = local_938[uVar5]; if (fLB::FLAGS_symbolize_stacktrace == '\x01') { cVar2 = tools::Symbolize((long)pvVar1 + -1,__s,0x400,0); pcVar4 = "(unknown)"; if (cVar2 != '\0') { pcVar4 = __s; } __s = local_438; snprintf(__s,0x400,"%s@ %*p %s\n",&DAT_00124f9b,0x12,pvVar1,pcVar4); } else { snprintf(__s,100,"%s@ %*p\n",&DAT_00124f9b,0x12,pvVar1); } (*(code *)CONCAT44(in_register_0000003c,param_1))(__s,param_2); uVar5 = uVar5 + 1; } while (uVar3 != uVar5); } return; }
25,594
MainWindow::qt_metacall(QMetaObject::Call, int, void**)
LeafBlue[P]myElevetor/build_O1/myElevetor_autogen/EWIEGA46WW/moc_mainwindow.cpp
int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QMainWindow::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 1) qt_static_metacall(this, _c, _id, _a); _id -= 1; } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { if (_id < 1) *reinterpret_cast<QMetaType *>(_a[0]) = QMetaType(); _id -= 1; } return _id; }
O1
cpp
MainWindow::qt_metacall(QMetaObject::Call, int, void**): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rcx, %r14 movl %esi, %ebp movq %rdi, %r15 callq 0x4350 movl %eax, %ebx testl %eax, %eax js 0x4b1d cmpl $0x7, %ebp je 0x4b0d testl %ebp, %ebp jne 0x4b1d testl %ebx, %ebx jne 0x4b1b movq 0x8(%r14), %rsi movq %r15, %rdi callq 0x4f66 jmp 0x4b1b testl %ebx, %ebx jne 0x4b1b movq (%r14), %rax movq $0x0, (%rax) decl %ebx movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
_ZN10MainWindow11qt_metacallEN11QMetaObject4CallEiPPv: push rbp push r15 push r14 push rbx push rax mov r14, rcx mov ebp, esi mov r15, rdi call __ZN11QMainWindow11qt_metacallEN11QMetaObject4CallEiPPv; QMainWindow::qt_metacall(QMetaObject::Call,int,void **) mov ebx, eax test eax, eax js short loc_4B1D cmp ebp, 7 jz short loc_4B0D test ebp, ebp jnz short loc_4B1D test ebx, ebx jnz short loc_4B1B mov rsi, [r14+8]; Elevetor * mov rdi, r15; this call _ZN10MainWindow15update_endstairER8Elevetor; MainWindow::update_endstair(Elevetor &) jmp short loc_4B1B loc_4B0D: test ebx, ebx jnz short loc_4B1B mov rax, [r14] mov qword ptr [rax], 0 loc_4B1B: dec ebx loc_4B1D: mov eax, ebx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long MainWindow::qt_metacall(MainWindow *this, int a2, long long a3, long long a4) { int v5; // ebx v5 = QMainWindow::qt_metacall(this); if ( v5 >= 0 ) { if ( a2 == 7 ) { if ( !v5 ) **(_QWORD **)a4 = 0LL; goto LABEL_8; } if ( !a2 ) { if ( !v5 ) MainWindow::update_endstair(this, *(Elevetor **)(a4 + 8)); LABEL_8: --v5; } } return (unsigned int)v5; }
qt_metacall: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,RCX MOV EBP,ESI MOV R15,RDI CALL 0x00104350 MOV EBX,EAX TEST EAX,EAX JS 0x00104b1d CMP EBP,0x7 JZ 0x00104b0d TEST EBP,EBP JNZ 0x00104b1d TEST EBX,EBX JNZ 0x00104b1b MOV RSI,qword ptr [R14 + 0x8] MOV RDI,R15 CALL 0x00104f66 JMP 0x00104b1b LAB_00104b0d: TEST EBX,EBX JNZ 0x00104b1b MOV RAX,qword ptr [R14] MOV qword ptr [RAX],0x0 LAB_00104b1b: DEC EBX LAB_00104b1d: MOV EAX,EBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
/* MainWindow::qt_metacall(QMetaObject::Call, int, void**) */ int __thiscall MainWindow::qt_metacall(MainWindow *this,int param_2,int8 param_3,int8 *param_4) { int iVar1; iVar1 = QMainWindow::qt_metacall(); if (-1 < iVar1) { if (param_2 == 7) { if (iVar1 == 0) { *(int8 *)*param_4 = 0; } } else { if (param_2 != 0) { return iVar1; } if (iVar1 == 0) { update_endstair(this,(Elevetor *)param_4[1]); } } iVar1 = iVar1 + -1; } return iVar1; }
25,595
mysql_real_query_start
eloqsql/libmariadb/libmariadb/mariadb_async.c
int STDCALL mysql_real_query_start(int *ret, MYSQL *mysql, const char *stmt_str, unsigned long length) { int res; struct mysql_async_context *b; struct mysql_real_query_params parms; b= mysql->options.extension->async_context; { WIN_SET_NONBLOCKING(mysql) parms.mysql= mysql; parms.stmt_str= stmt_str; parms.length= length; } b->active= 1; res= my_context_spawn(&b->async_context, mysql_real_query_start_internal, &parms); b->active= b->suspended= 0; if (res > 0) { /* Suspended. */ b->suspended= 1; return b->events_to_wait_for; } if (res < 0) { set_mariadb_error((mysql), CR_OUT_OF_MEMORY, unknown_sqlstate); *ret= 1; } else *ret= b->ret_result.r_int; return 0; }
O0
c
mysql_real_query_start: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x18(%rbp), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x38(%rbp), %rax movb $0x1, 0x14(%rax) movq -0x38(%rbp), %rdi addq $0x38, %rdi leaq 0xd6(%rip), %rsi # 0xc07d0 leaq -0x50(%rbp), %rdx callq 0xc7950 movl %eax, -0x2c(%rbp) movq -0x38(%rbp), %rax movb $0x0, 0x15(%rax) movq -0x38(%rbp), %rax movb $0x0, 0x14(%rax) cmpl $0x0, -0x2c(%rbp) jle 0xc0732 movq -0x38(%rbp), %rax movb $0x1, 0x15(%rax) movq -0x38(%rbp), %rax movl (%rax), %eax movl %eax, -0x4(%rbp) jmp 0xc07bd cmpl $0x0, -0x2c(%rbp) jge 0xc07a9 jmp 0xc073a movq -0x18(%rbp), %rax movl $0x7d8, 0x90(%rax) # imm = 0x7D8 movq -0x18(%rbp), %rdi addq $0x297, %rdi # imm = 0x297 leaq 0x1f2296(%rip), %rax # 0x2b29f0 movq (%rax), %rsi movl $0x5, %edx callq 0x3a140 movq -0x18(%rbp), %rax movb $0x0, 0x29c(%rax) movq -0x18(%rbp), %rdi addq $0x97, %rdi leaq 0x1f227c(%rip), %rax # 0x2b2a00 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x3a140 movq -0x18(%rbp), %rax movb $0x0, 0x296(%rax) movq -0x10(%rbp), %rax movl $0x1, (%rax) jmp 0xc07b6 movq -0x38(%rbp), %rax movl 0x8(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mysql_real_query_start: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_18] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_38], rax mov rax, [rbp+var_18] mov [rbp+var_50], rax mov rax, [rbp+var_20] mov [rbp+var_48], rax mov rax, [rbp+var_28] mov [rbp+var_40], rax mov rax, [rbp+var_38] mov byte ptr [rax+14h], 1 mov rdi, [rbp+var_38] add rdi, 38h ; '8' lea rsi, mysql_real_query_start_internal lea rdx, [rbp+var_50] call my_context_spawn mov [rbp+var_2C], eax mov rax, [rbp+var_38] mov byte ptr [rax+15h], 0 mov rax, [rbp+var_38] mov byte ptr [rax+14h], 0 cmp [rbp+var_2C], 0 jle short loc_C0732 mov rax, [rbp+var_38] mov byte ptr [rax+15h], 1 mov rax, [rbp+var_38] mov eax, [rax] mov [rbp+var_4], eax jmp loc_C07BD loc_C0732: cmp [rbp+var_2C], 0 jge short loc_C07A9 jmp short $+2 loc_C073A: mov rax, [rbp+var_18] mov dword ptr [rax+90h], 7D8h mov rdi, [rbp+var_18] add rdi, 297h lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_18] mov byte ptr [rax+29Ch], 0 mov rdi, [rbp+var_18] add rdi, 97h lea rax, client_errors mov rsi, [rax+40h] mov edx, 1FFh call _strncpy mov rax, [rbp+var_18] mov byte ptr [rax+296h], 0 mov rax, [rbp+var_10] mov dword ptr [rax], 1 jmp short loc_C07B6 loc_C07A9: mov rax, [rbp+var_38] mov ecx, [rax+8] mov rax, [rbp+var_10] mov [rax], ecx loc_C07B6: mov [rbp+var_4], 0 loc_C07BD: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long mysql_real_query_start(_DWORD *a1, long long a2, long long a3, long long a4) { _QWORD v5[3]; // [rsp+0h] [rbp-50h] BYREF unsigned int *v6; // [rsp+18h] [rbp-38h] int v7; // [rsp+24h] [rbp-2Ch] long long v8; // [rsp+28h] [rbp-28h] long long v9; // [rsp+30h] [rbp-20h] long long v10; // [rsp+38h] [rbp-18h] _DWORD *v11; // [rsp+40h] [rbp-10h] v11 = a1; v10 = a2; v9 = a3; v8 = a4; v6 = *(unsigned int **)(*(_QWORD *)(a2 + 1152) + 40LL); v5[0] = a2; v5[1] = a3; v5[2] = a4; *((_BYTE *)v6 + 20) = 1; v7 = my_context_spawn(v6 + 14, mysql_real_query_start_internal, v5); *((_BYTE *)v6 + 21) = 0; *((_BYTE *)v6 + 20) = 0; if ( v7 <= 0 ) { if ( v7 >= 0 ) { *v11 = v6[2]; } else { *(_DWORD *)(v10 + 144) = 2008; strncpy(v10 + 663, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(v10 + 668) = 0; strncpy(v10 + 151, client_errors[8], 511LL); *(_BYTE *)(v10 + 662) = 0; *v11 = 1; } return 0; } else { *((_BYTE *)v6 + 21) = 1; return *v6; } }
mysql_real_query_start: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x14],0x1 MOV RDI,qword ptr [RBP + -0x38] ADD RDI,0x38 LEA RSI,[0x1c07d0] LEA RDX,[RBP + -0x50] CALL 0x001c7950 MOV dword ptr [RBP + -0x2c],EAX MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x15],0x0 MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x14],0x0 CMP dword ptr [RBP + -0x2c],0x0 JLE 0x001c0732 MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x15],0x1 MOV RAX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4],EAX JMP 0x001c07bd LAB_001c0732: CMP dword ptr [RBP + -0x2c],0x0 JGE 0x001c07a9 JMP 0x001c073a LAB_001c073a: MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x90],0x7d8 MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x297 LEA RAX,[0x3b29f0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x0013a140 MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x29c],0x0 MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x97 LEA RAX,[0x3b2a00] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x0013a140 MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x296],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],0x1 JMP 0x001c07b6 LAB_001c07a9: MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX LAB_001c07b6: MOV dword ptr [RBP + -0x4],0x0 LAB_001c07bd: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
int4 mysql_real_query_start(int4 *param_1,long param_2,int8 param_3,int8 param_4) { long local_58; int8 local_50; int8 local_48; int4 *local_40; int local_34; int8 local_30; int8 local_28; long local_20; int4 *local_18; int4 local_c; local_40 = *(int4 **)(*(long *)(param_2 + 0x480) + 0x28); *(int1 *)(local_40 + 5) = 1; local_58 = param_2; local_50 = param_3; local_48 = param_4; local_30 = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; local_34 = my_context_spawn(local_40 + 0xe,mysql_real_query_start_internal,&local_58); *(int1 *)((long)local_40 + 0x15) = 0; *(int1 *)(local_40 + 5) = 0; if (local_34 < 1) { if (local_34 < 0) { *(int4 *)(local_20 + 0x90) = 0x7d8; strncpy((char *)(local_20 + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(local_20 + 0x29c) = 0; strncpy((char *)(local_20 + 0x97),PTR_s_Client_run_out_of_memory_003b2a40,0x1ff); *(int1 *)(local_20 + 0x296) = 0; *local_18 = 1; } else { *local_18 = local_40[2]; } local_c = 0; } else { *(int1 *)((long)local_40 + 0x15) = 1; local_c = *local_40; } return local_c; }
25,596
my_init_large_pages
eloqsql/mysys/my_largepage.c
int my_init_large_pages(my_bool super_large_pages) { #ifdef _WIN32 if (!my_obtain_privilege(SE_LOCK_MEMORY_NAME)) { my_printf_error(EE_PERM_LOCK_MEMORY, "Lock Pages in memory access rights required for use with" " large-pages, see https://mariadb.com/kb/en/library/" "mariadb-memory-allocation/#huge-pages", MYF(MY_WME)); } my_large_page_size= GetLargePageMinimum(); #endif my_use_large_pages= 1; my_get_large_page_sizes(my_large_page_sizes); #ifndef HAVE_LARGE_PAGES my_printf_error(EE_OUTOFMEMORY, "No large page support on this platform", MYF(MY_WME)); #endif #ifdef HAVE_SOLARIS_LARGE_PAGES /* tell the kernel that we want to use 4/256MB page for heap storage and also for the stack. We use 4 MByte as default and if the super-large-page is set we increase it to 256 MByte. 256 MByte is for server installations with GBytes of RAM memory where the MySQL Server will have page caches and other memory regions measured in a number of GBytes. We use as big pages as possible which isn't bigger than the above desired page sizes. */ int nelem= 0; size_t max_desired_page_size= (super_large_pages ? 256 : 4) * 1024 * 1024; size_t max_page_size= my_next_large_page_size(max_desired_page_size, &nelem); if (max_page_size > 0) { struct memcntl_mha mpss; mpss.mha_cmd= MHA_MAPSIZE_BSSBRK; mpss.mha_pagesize= max_page_size; mpss.mha_flags= 0; if (memcntl(NULL, 0, MC_HAT_ADVISE, (caddr_t) &mpss, 0, 0)) { my_error(EE_MEMCNTL, MYF(ME_WARNING | ME_ERROR_LOG_ONLY), "MC_HAT_ADVISE", "MHA_MAPSIZE_BSSBRK"); } mpss.mha_cmd= MHA_MAPSIZE_STACK; if (memcntl(NULL, 0, MC_HAT_ADVISE, (caddr_t) &mpss, 0, 0)) { my_error(EE_MEMCNTL, MYF(ME_WARNING | ME_ERROR_LOG_ONLY), "MC_HAT_ADVISE", "MHA_MAPSIZE_STACK"); } } #endif /* HAVE_SOLARIS_LARGE_PAGES */ return 0; }
O3
c
my_init_large_pages: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movb $0x1, 0xb6106f(%rip) # 0xc08930 leaq 0x34fc6(%rip), %rdi # 0xdc88e callq 0x29490 testq %rax, %rax je 0xa79d8 movq %rax, %rbx leaq 0x34fc7(%rip), %r14 # 0xdc8a7 leaq 0xb61059(%rip), %r13 # 0xc08940 xorl %r15d, %r15d movq %rbx, %rdi callq 0x294a0 testq %rax, %rax je 0xa7990 movq %rax, %r12 movl %r15d, -0x2c(%rbp) movslq %r15d, %r15 leaq 0x13(%r12), %rsi movl $0xa, %edx movq %r14, %rdi callq 0x291b0 testl %eax, %eax jne 0xa7973 addq $0x1d, %r12 movq %r12, %rdi xorl %esi, %esi movl $0xa, %edx callq 0x29070 shlq $0xa, %rax movq %rax, (%r13,%r15,8) leaq -0x1(%rax), %rcx testq %rcx, %rax je 0xa7979 movl $0x480, %edx # imm = 0x480 xorl %edi, %edi leaq 0x34f64(%rip), %rsi # 0xdc8b2 movq %rax, %rcx xorl %eax, %eax callq 0x9e0ed movq $0x0, (%r13,%r15,8) movq %rbx, %rdi callq 0x294a0 movq %rax, %r12 testq %rax, %rax jne 0xa7905 jmp 0xa798c movl -0x2c(%rbp), %r15d jmp 0xa7980 movl -0x2c(%rbp), %r15d incl %r15d cmpl $0x7, %r15d jle 0xa78ea jmp 0xa7990 movl -0x2c(%rbp), %r15d movq %rbx, %rdi callq 0x29470 testl %eax, %eax je 0xa79bb callq 0x29790 movl (%rax), %ecx leaq 0x34ee4(%rip), %rdx # 0xdc88e movl $0x4, %esi movl $0x4, %edi xorl %eax, %eax callq 0x9dfd3 movslq %r15d, %rsi leaq 0xb60f7b(%rip), %rdi # 0xc08940 leaq 0x529(%rip), %rcx # 0xa7ef5 movl $0x8, %edx callq 0x295c0 jmp 0xa79f7 callq 0x29790 movl (%rax), %ecx leaq 0x34ea8(%rip), %rdx # 0xdc88e movl $0x4, %esi movl $0xc, %edi xorl %eax, %eax callq 0x9dfd3 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_init_large_pages: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov cs:my_use_large_pages, 1 lea rdi, aSysKernelMmHug; "/sys/kernel/mm/hugepages" call _opendir test rax, rax jz loc_A79D8 mov rbx, rax lea r14, aHugepages; "hugepages-" lea r13, my_large_page_sizes xor r15d, r15d loc_A78EA: mov rdi, rbx call _readdir64 test rax, rax jz loc_A7990 mov r12, rax mov [rbp+var_2C], r15d movsxd r15, r15d loc_A7905: lea rsi, [r12+13h] mov edx, 0Ah mov rdi, r14 call _strncmp test eax, eax jnz short loc_A7973 add r12, 1Dh mov rdi, r12 xor esi, esi mov edx, 0Ah call ___isoc23_strtoul shl rax, 0Ah mov [r13+r15*8+0], rax lea rcx, [rax-1] test rax, rcx jz short loc_A7979 mov edx, 480h xor edi, edi lea rsi, aNonPowerOf2Lar; "non-power of 2 large page size (%zu) fo"... mov rcx, rax xor eax, eax call my_printf_error mov qword ptr [r13+r15*8+0], 0 mov rdi, rbx call _readdir64 mov r12, rax test rax, rax jnz short loc_A7905 jmp short loc_A798C loc_A7973: mov r15d, [rbp+var_2C] jmp short loc_A7980 loc_A7979: mov r15d, [rbp+var_2C] inc r15d loc_A7980: cmp r15d, 7 jle loc_A78EA jmp short loc_A7990 loc_A798C: mov r15d, [rbp+var_2C] loc_A7990: mov rdi, rbx call _closedir test eax, eax jz short loc_A79BB call ___errno_location mov ecx, [rax] lea rdx, aSysKernelMmHug; "/sys/kernel/mm/hugepages" mov esi, 4 mov edi, 4 xor eax, eax call my_error loc_A79BB: movsxd rsi, r15d lea rdi, my_large_page_sizes lea rcx, size_t_cmp mov edx, 8 call _qsort jmp short loc_A79F7 loc_A79D8: call ___errno_location mov ecx, [rax] lea rdx, aSysKernelMmHug; "/sys/kernel/mm/hugepages" mov esi, 4 mov edi, 0Ch xor eax, eax call my_error loc_A79F7: xor eax, eax add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_init_large_pages( __m128 a1, __m128 a2, __m128 a3, __m128 a4, double a5, double a6, __m128 a7, __m128 a8) { char v8; // al long long v9; // rax long long v10; // rbx int v11; // r15d long long v12; // rax long long v13; // r12 long long v14; // rax long long v15; // r8 long long v16; // r9 __m128 v17; // xmm4 __m128 v18; // xmm5 unsigned int *v19; // rax unsigned int *v20; // rax char v22; // [rsp-4h] [rbp-30h] int v23; // [rsp+0h] [rbp-2Ch] v22 = v8; my_use_large_pages = 1; v9 = opendir("/sys/kernel/mm/hugepages"); if ( v9 ) { v10 = v9; v11 = 0; do { v12 = readdir64(v10); if ( !v12 ) break; v13 = v12; v23 = v11; while ( 1 ) { if ( (unsigned int)strncmp("hugepages-", v13 + 19, 10LL) ) { v11 = v23; goto LABEL_11; } v14 = __isoc23_strtoul(v13 + 29, 0LL, 10LL) << 10; my_large_page_sizes[v11] = v14; if ( ((v14 - 1) & v14) == 0 ) break; my_printf_error( 0, (long long)"non-power of 2 large page size (%zu) found, skipping", 1152, v14, v15, v16, a1, a2, a3, a4, v17, v18, a7, a8, v22); my_large_page_sizes[v11] = 0LL; v13 = readdir64(v10); if ( !v13 ) { v11 = v23; goto LABEL_12; } } v11 = v23 + 1; LABEL_11: ; } while ( v11 <= 7 ); LABEL_12: if ( (unsigned int)closedir(v10) ) { v19 = (unsigned int *)__errno_location(v10); my_error(4u, 4LL, "/sys/kernel/mm/hugepages", *v19); } qsort(my_large_page_sizes, v11, 8LL, size_t_cmp); } else { v20 = (unsigned int *)__errno_location("/sys/kernel/mm/hugepages"); my_error(0xCu, 4LL, "/sys/kernel/mm/hugepages", *v20); } return 0LL; }
my_init_large_pages: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV byte ptr [0x00d08930],0x1 LEA RDI,[0x1dc88e] CALL 0x00129490 TEST RAX,RAX JZ 0x001a79d8 MOV RBX,RAX LEA R14,[0x1dc8a7] LEA R13,[0xd08940] XOR R15D,R15D LAB_001a78ea: MOV RDI,RBX CALL 0x001294a0 TEST RAX,RAX JZ 0x001a7990 MOV R12,RAX MOV dword ptr [RBP + -0x2c],R15D MOVSXD R15,R15D LAB_001a7905: LEA RSI,[R12 + 0x13] MOV EDX,0xa MOV RDI,R14 CALL 0x001291b0 TEST EAX,EAX JNZ 0x001a7973 ADD R12,0x1d MOV RDI,R12 XOR ESI,ESI MOV EDX,0xa CALL 0x00129070 SHL RAX,0xa MOV qword ptr [R13 + R15*0x8],RAX LEA RCX,[RAX + -0x1] TEST RAX,RCX JZ 0x001a7979 MOV EDX,0x480 XOR EDI,EDI LEA RSI,[0x1dc8b2] MOV RCX,RAX XOR EAX,EAX CALL 0x0019e0ed MOV qword ptr [R13 + R15*0x8],0x0 MOV RDI,RBX CALL 0x001294a0 MOV R12,RAX TEST RAX,RAX JNZ 0x001a7905 JMP 0x001a798c LAB_001a7973: MOV R15D,dword ptr [RBP + -0x2c] JMP 0x001a7980 LAB_001a7979: MOV R15D,dword ptr [RBP + -0x2c] INC R15D LAB_001a7980: CMP R15D,0x7 JLE 0x001a78ea JMP 0x001a7990 LAB_001a798c: MOV R15D,dword ptr [RBP + -0x2c] LAB_001a7990: MOV RDI,RBX CALL 0x00129470 TEST EAX,EAX JZ 0x001a79bb CALL 0x00129790 MOV ECX,dword ptr [RAX] LEA RDX,[0x1dc88e] MOV ESI,0x4 MOV EDI,0x4 XOR EAX,EAX CALL 0x0019dfd3 LAB_001a79bb: MOVSXD RSI,R15D LEA RDI,[0xd08940] LEA RCX,[0x1a7ef5] MOV EDX,0x8 CALL 0x001295c0 JMP 0x001a79f7 LAB_001a79d8: CALL 0x00129790 MOV ECX,dword ptr [RAX] LEA RDX,[0x1dc88e] MOV ESI,0x4 MOV EDI,0xc XOR EAX,EAX CALL 0x0019dfd3 LAB_001a79f7: XOR EAX,EAX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 my_init_large_pages(void) { int iVar1; DIR *__dirp; dirent64 *pdVar2; long lVar3; ulong uVar4; int *piVar5; int iVar6; my_use_large_pages = 1; __dirp = opendir("/sys/kernel/mm/hugepages"); if (__dirp == (DIR *)0x0) { piVar5 = __errno_location(); my_error(0xc,4,"/sys/kernel/mm/hugepages",*piVar5); } else { iVar6 = 0; while (pdVar2 = readdir64(__dirp), pdVar2 != (dirent64 *)0x0) { while (iVar1 = strncmp("hugepages-",pdVar2->d_name,10), iVar1 == 0) { lVar3 = __isoc23_strtoul(pdVar2->d_name + 10,0,10); uVar4 = lVar3 * 0x400; (&my_large_page_sizes)[iVar6] = uVar4; if ((uVar4 & uVar4 - 1) == 0) { iVar6 = iVar6 + 1; break; } my_printf_error(0,"non-power of 2 large page size (%zu) found, skipping",0x480,uVar4); (&my_large_page_sizes)[iVar6] = 0; pdVar2 = readdir64(__dirp); if (pdVar2 == (dirent64 *)0x0) goto LAB_001a7990; } if (7 < iVar6) break; } LAB_001a7990: iVar1 = closedir(__dirp); if (iVar1 != 0) { piVar5 = __errno_location(); my_error(4,4,"/sys/kernel/mm/hugepages",*piVar5); } qsort(&my_large_page_sizes,(long)iVar6,8,size_t_cmp); } return 0; }
25,597
ma_clear_session_state
eloqsql/libmariadb/libmariadb/mariadb_lib.c
static void ma_clear_session_state(MYSQL *mysql) { uint i; if (!mysql || !mysql->extension) return; for (i= SESSION_TRACK_BEGIN; i <= SESSION_TRACK_END; i++) { list_free(mysql->extension->session_state[i].list, 0); } memset(mysql->extension->session_state, 0, sizeof(struct st_mariadb_session_state) * SESSION_TRACK_TYPES); }
O3
c
ma_clear_session_state: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx testq %rdi, %rdi je 0x1a304 movq %rdi, %rbx cmpq $0x0, 0x4f0(%rdi) je 0x1a304 movl $0x8, %r14d movq 0x4f0(%rbx), %rax movq (%rax,%r14), %rdi xorl %esi, %esi callq 0x1cd0f addq $0x10, %r14 cmpq $0x68, %r14 jne 0x1a2c6 movq 0x4f0(%rbx), %rax xorps %xmm0, %xmm0 movups %xmm0, 0x58(%rax) movups %xmm0, 0x48(%rax) movups %xmm0, 0x38(%rax) movups %xmm0, 0x28(%rax) movups %xmm0, 0x18(%rax) movups %xmm0, 0x8(%rax) popq %rbx popq %r14 popq %rbp retq
ma_clear_session_state: push rbp mov rbp, rsp push r14 push rbx test rdi, rdi jz short loc_1A304 mov rbx, rdi cmp qword ptr [rdi+4F0h], 0 jz short loc_1A304 mov r14d, 8 loc_1A2C6: mov rax, [rbx+4F0h] mov rdi, [rax+r14] xor esi, esi call list_free add r14, 10h cmp r14, 68h ; 'h' jnz short loc_1A2C6 mov rax, [rbx+4F0h] xorps xmm0, xmm0 movups xmmword ptr [rax+58h], xmm0 movups xmmword ptr [rax+48h], xmm0 movups xmmword ptr [rax+38h], xmm0 movups xmmword ptr [rax+28h], xmm0 movups xmmword ptr [rax+18h], xmm0 movups xmmword ptr [rax+8], xmm0 loc_1A304: pop rbx pop r14 pop rbp retn
long long ma_clear_session_state(long long a1) { long long i; // r14 long long result; // rax if ( a1 && *(_QWORD *)(a1 + 1264) ) { for ( i = 8LL; i != 104; i += 16LL ) list_free(*(_QWORD *)(*(_QWORD *)(a1 + 1264) + i), 0LL); result = *(_QWORD *)(a1 + 1264); *(_OWORD *)(result + 88) = 0LL; *(_OWORD *)(result + 72) = 0LL; *(_OWORD *)(result + 56) = 0LL; *(_OWORD *)(result + 40) = 0LL; *(_OWORD *)(result + 24) = 0LL; *(_OWORD *)(result + 8) = 0LL; } return result; }
ma_clear_session_state: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX TEST RDI,RDI JZ 0x0011a304 MOV RBX,RDI CMP qword ptr [RDI + 0x4f0],0x0 JZ 0x0011a304 MOV R14D,0x8 LAB_0011a2c6: MOV RAX,qword ptr [RBX + 0x4f0] MOV RDI,qword ptr [RAX + R14*0x1] XOR ESI,ESI CALL 0x0011cd0f ADD R14,0x10 CMP R14,0x68 JNZ 0x0011a2c6 MOV RAX,qword ptr [RBX + 0x4f0] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + 0x58],XMM0 MOVUPS xmmword ptr [RAX + 0x48],XMM0 MOVUPS xmmword ptr [RAX + 0x38],XMM0 MOVUPS xmmword ptr [RAX + 0x28],XMM0 MOVUPS xmmword ptr [RAX + 0x18],XMM0 MOVUPS xmmword ptr [RAX + 0x8],XMM0 LAB_0011a304: POP RBX POP R14 POP RBP RET
void ma_clear_session_state(long param_1) { long lVar1; if ((param_1 != 0) && (*(long *)(param_1 + 0x4f0) != 0)) { lVar1 = 8; do { list_free(*(int8 *)(*(long *)(param_1 + 0x4f0) + lVar1),0); lVar1 = lVar1 + 0x10; } while (lVar1 != 0x68); lVar1 = *(long *)(param_1 + 0x4f0); *(int8 *)(lVar1 + 0x58) = 0; *(int8 *)(lVar1 + 0x60) = 0; *(int8 *)(lVar1 + 0x48) = 0; *(int8 *)(lVar1 + 0x50) = 0; *(int8 *)(lVar1 + 0x38) = 0; *(int8 *)(lVar1 + 0x40) = 0; *(int8 *)(lVar1 + 0x28) = 0; *(int8 *)(lVar1 + 0x30) = 0; *(int8 *)(lVar1 + 0x18) = 0; *(int8 *)(lVar1 + 0x20) = 0; *(int8 *)(lVar1 + 8) = 0; *(int8 *)(lVar1 + 0x10) = 0; } return; }
25,598
js_array_from_iterator
bluesky950520[P]quickjs/quickjs.c
static JSValue js_array_from_iterator(JSContext *ctx, uint32_t *plen, JSValue obj, JSValue method) { JSValue arr, iter, next_method = JS_UNDEFINED, val; BOOL done; uint32_t k; *plen = 0; arr = JS_NewArray(ctx); if (JS_IsException(arr)) return arr; iter = JS_GetIterator2(ctx, obj, method); if (JS_IsException(iter)) goto fail; next_method = JS_GetProperty(ctx, iter, JS_ATOM_next); if (JS_IsException(next_method)) goto fail; k = 0; for(;;) { val = JS_IteratorNext(ctx, iter, next_method, 0, NULL, &done); if (JS_IsException(val)) goto fail; if (done) { JS_FreeValue(ctx, val); break; } if (JS_CreateDataPropertyUint32(ctx, arr, k, val, JS_PROP_THROW) < 0) goto fail; k++; } JS_FreeValue(ctx, next_method); JS_FreeValue(ctx, iter); *plen = k; return arr; fail: JS_FreeValue(ctx, next_method); JS_FreeValue(ctx, iter); JS_FreeValue(ctx, arr); return JS_EXCEPTION; }
O1
c
js_array_from_iterator: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %r9, %r12 movq %r8, %r13 movq %rcx, %rbp movq %rdx, %r14 movq %rdi, %r15 movq %rsi, 0x30(%rsp) andl $0x0, (%rsi) movq 0x38(%rdi), %rsi incl (%rsi) pushq $0x2 popq %rdx callq 0xf516 movq %rdx, %rbx cmpl $0x6, %ebx jne 0x12c1e movabsq $-0x100000000, %rdx # imm = 0xFFFFFFFF00000000 movq %rax, %rcx andq %rdx, %rcx jmp 0x12d7d movq %rax, 0x28(%rsp) movq %r15, %rdi movq %r14, %rsi movq %rbp, %rdx movq %r13, %rcx movq %r12, %r8 callq 0x41a70 movq %rax, %r13 movq %rdx, %r12 cmpl $0x6, %r12d jne 0x12c4e pushq $0x3 popq %rbp xorl %r14d, %r14d jmp 0x12d47 andl $0x0, 0x8(%rsp) andq $0x0, (%rsp) pushq $0x6b popq %rcx movq %r15, %rdi movq %r13, %rsi movq %r12, %rdx movq %r13, %r8 movq %r12, %r9 callq 0x22fa3 movq %rax, %r14 movq %rdx, %rbp cmpl $0x6, %ebp je 0x12d47 leaq 0x1c(%rsp), %rax andq $0x0, (%rsp) movq %rax, 0x8(%rsp) movq %r15, %rdi movq %r13, %rsi movq %r12, %rdx movq %r14, %rcx movq %rbp, %r8 xorl %r9d, %r9d callq 0x41afc cmpl $0x6, %edx je 0x12d47 movq %r14, 0x20(%rsp) xorl %r14d, %r14d cmpl $0x0, 0x1c(%rsp) jne 0x12d94 movl %r14d, %esi movq %rax, 0x38(%rsp) cvtsi2sd %rsi, %xmm0 testl %r14d, %r14d movq %xmm0, %rcx cmovnsq %rsi, %rcx movq %rdx, 0x40(%rsp) pushq $0x7 popq %r8 movl $0x0, %eax cmovnsq %rax, %r8 movups 0x38(%rsp), %xmm0 movups %xmm0, (%rsp) movq %r15, %rdi movq 0x28(%rsp), %rsi movq %rbx, %rdx movl $0x4007, %r9d # imm = 0x4007 callq 0x26b2d testl %eax, %eax js 0x12d42 incl %r14d andq $0x0, (%rsp) leaq 0x1c(%rsp), %rax movq %rax, 0x8(%rsp) movq %r15, %rdi movq %r13, %rsi movq %r12, %rdx movq 0x20(%rsp), %rcx movq %rbp, %r8 xorl %r9d, %r9d callq 0x41afc cmpl $0x6, %edx jne 0x12cb5 movq 0x20(%rsp), %r14 movq 0x18(%r15), %rdi movq %r14, %rsi movq %rbp, %rdx callq 0x1d8c6 movq 0x18(%r15), %rdi movq %r13, %rsi movq %r12, %rdx callq 0x1d8c6 movq 0x18(%r15), %rdi movq 0x28(%rsp), %rsi movq %rbx, %rdx callq 0x1d8c6 pushq $0x6 popq %rbx xorl %eax, %eax xorl %ecx, %ecx movl %eax, %eax orq %rcx, %rax movq %rbx, %rdx addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x18(%r15), %rdi movq %rax, %rsi callq 0x1d8c6 movq 0x18(%r15), %rdi movq 0x20(%rsp), %rsi movq %rbp, %rdx callq 0x1d8c6 movq 0x18(%r15), %rdi movq %r13, %rsi movq %r12, %rdx callq 0x1d8c6 movq 0x30(%rsp), %rax movl %r14d, (%rax) movabsq $-0x100000000, %rdx # imm = 0xFFFFFFFF00000000 movq 0x28(%rsp), %rax jmp 0x12c13
js_array_from_iterator: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r12, r9 mov r13, r8 mov rbp, rcx mov r14, rdx mov r15, rdi mov [rsp+78h+var_48], rsi and dword ptr [rsi], 0 mov rsi, [rdi+38h] inc dword ptr [rsi] push 2 pop rdx call JS_NewObjectFromShape mov rbx, rdx cmp ebx, 6 jnz short loc_12C1E mov rdx, 0FFFFFFFF00000000h loc_12C13: mov rcx, rax and rcx, rdx jmp loc_12D7D loc_12C1E: mov [rsp+78h+var_50], rax mov rdi, r15 mov rsi, r14 mov rdx, rbp mov rcx, r13 mov r8, r12 call JS_GetIterator2 mov r13, rax mov r12, rdx cmp r12d, 6 jnz short loc_12C4E push 3 pop rbp xor r14d, r14d jmp loc_12D47 loc_12C4E: and dword ptr [rsp+78h+var_78+8], 0 and qword ptr [rsp+78h+var_78], 0 push 6Bh ; 'k' pop rcx mov rdi, r15 mov rsi, r13 mov rdx, r12 mov r8, r13 mov r9, r12 call JS_GetPropertyInternal2 mov r14, rax mov rbp, rdx cmp ebp, 6 jz loc_12D47 lea rax, [rsp+78h+var_5C] and qword ptr [rsp+78h+var_78], 0 mov qword ptr [rsp+78h+var_78+8], rax mov rdi, r15 mov rsi, r13 mov rdx, r12 mov rcx, r14 mov r8, rbp xor r9d, r9d call JS_IteratorNext cmp edx, 6 jz loc_12D47 mov [rsp+78h+var_58], r14 xor r14d, r14d loc_12CB5: cmp [rsp+78h+var_5C], 0 jnz loc_12D94 mov esi, r14d mov qword ptr [rsp+78h+var_40], rax cvtsi2sd xmm0, rsi test r14d, r14d movq rcx, xmm0 cmovns rcx, rsi mov qword ptr [rsp+78h+var_40+8], rdx push 7 pop r8 mov eax, 0 cmovns r8, rax movups xmm0, [rsp+78h+var_40] movups [rsp+78h+var_78], xmm0 mov rdi, r15 mov rsi, [rsp+78h+var_50] mov rdx, rbx mov r9d, 4007h call JS_DefinePropertyValueValue test eax, eax js short loc_12D42 inc r14d and qword ptr [rsp+78h+var_78], 0 lea rax, [rsp+78h+var_5C] mov qword ptr [rsp+78h+var_78+8], rax mov rdi, r15 mov rsi, r13 mov rdx, r12 mov rcx, [rsp+78h+var_58] mov r8, rbp xor r9d, r9d call JS_IteratorNext cmp edx, 6 jnz loc_12CB5 loc_12D42: mov r14, [rsp+78h+var_58] loc_12D47: mov rdi, [r15+18h] mov rsi, r14 mov rdx, rbp call JS_FreeValueRT mov rdi, [r15+18h] mov rsi, r13 mov rdx, r12 call JS_FreeValueRT mov rdi, [r15+18h] mov rsi, [rsp+78h+var_50] mov rdx, rbx call JS_FreeValueRT push 6 pop rbx xor eax, eax xor ecx, ecx loc_12D7D: mov eax, eax or rax, rcx mov rdx, rbx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_12D94: mov rdi, [r15+18h] mov rsi, rax call JS_FreeValueRT mov rdi, [r15+18h] mov rsi, [rsp+78h+var_58] mov rdx, rbp call JS_FreeValueRT mov rdi, [r15+18h] mov rsi, r13 mov rdx, r12 call JS_FreeValueRT mov rax, [rsp+78h+var_48] mov [rax], r14d mov rdx, 0FFFFFFFF00000000h mov rax, [rsp+78h+var_50] jmp loc_12C13
unsigned long long js_array_from_iterator(long long a1, int *a2, long long a3, long long a4, long long a5, long long a6) { _DWORD *v10; // rsi long long v11; // rax int v12; // edx int v13; // ebx unsigned long long v14; // rcx long long Iterator2; // rax int v16; // edx long long v17; // r13 int v18; // r12d long long PropertyInternal2; // r14 int v20; // edx int v21; // ebp long long v22; // rax long long v23; // rdx int v24; // r14d double v25; // rcx int v26; // r8d int v28; // [rsp+1Ch] [rbp-5Ch] BYREF long long v29; // [rsp+20h] [rbp-58h] long long v30; // [rsp+28h] [rbp-50h] int *v31; // [rsp+30h] [rbp-48h] long long v32; // [rsp+38h] [rbp-40h] long long v33; // [rsp+40h] [rbp-38h] v31 = a2; *a2 = 0; v10 = *(_DWORD **)(a1 + 56); ++*v10; v11 = JS_NewObjectFromShape(a1, v10, 2u); v13 = v12; if ( v12 != 6 ) { v30 = v11; Iterator2 = JS_GetIterator2(a1, a3, a4, a5, a6); v17 = Iterator2; v18 = v16; if ( v16 == 6 ) { PropertyInternal2 = 0LL; } else { PropertyInternal2 = JS_GetPropertyInternal2(a1, Iterator2, v16, 107, Iterator2, v16, 0LL, 0); v21 = v20; if ( v20 != 6 ) { v22 = JS_IteratorNext(a1, v17, v18, PropertyInternal2, v20, 0, 0LL, (long long)&v28); if ( (_DWORD)v23 != 6 ) { v29 = PropertyInternal2; v24 = 0; while ( !v28 ) { v32 = v22; v25 = (double)v24; if ( v24 >= 0 ) LODWORD(v25) = v24; v33 = v23; v26 = 7; if ( v24 >= 0 ) v26 = 0; if ( (int)JS_DefinePropertyValueValue(a1, v30, v13, LODWORD(v25), v26, 16391, v32, v33) >= 0 ) { ++v24; v22 = JS_IteratorNext(a1, v17, v18, v29, v21, 0, 0LL, (long long)&v28); if ( (_DWORD)v23 != 6 ) continue; } PropertyInternal2 = v29; goto LABEL_16; } JS_FreeValueRT(*(_QWORD *)(a1 + 24), v22); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v29); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v17); *v31 = v24; v11 = v30; goto LABEL_2; } } } LABEL_16: JS_FreeValueRT(*(_QWORD *)(a1 + 24), PropertyInternal2); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v17); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v30); LODWORD(v11) = 0; v14 = 0LL; return v14 | (unsigned int)v11; } LABEL_2: v14 = v11 & 0xFFFFFFFF00000000LL; return v14 | (unsigned int)v11; }
js_array_from_iterator: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R12,R9 MOV R13,R8 MOV RBP,RCX MOV R14,RDX MOV R15,RDI MOV qword ptr [RSP + 0x30],RSI AND dword ptr [RSI],0x0 MOV RSI,qword ptr [RDI + 0x38] INC dword ptr [RSI] PUSH 0x2 POP RDX CALL 0x0010f516 MOV RBX,RDX CMP EBX,0x6 JNZ 0x00112c1e MOV RDX,-0x100000000 LAB_00112c13: MOV RCX,RAX AND RCX,RDX JMP 0x00112d7d LAB_00112c1e: MOV qword ptr [RSP + 0x28],RAX MOV RDI,R15 MOV RSI,R14 MOV RDX,RBP MOV RCX,R13 MOV R8,R12 CALL 0x00141a70 MOV R13,RAX MOV R12,RDX CMP R12D,0x6 JNZ 0x00112c4e PUSH 0x3 POP RBP XOR R14D,R14D JMP 0x00112d47 LAB_00112c4e: AND dword ptr [RSP + 0x8],0x0 AND qword ptr [RSP],0x0 PUSH 0x6b POP RCX MOV RDI,R15 MOV RSI,R13 MOV RDX,R12 MOV R8,R13 MOV R9,R12 CALL 0x00122fa3 MOV R14,RAX MOV RBP,RDX CMP EBP,0x6 JZ 0x00112d47 LEA RAX,[RSP + 0x1c] AND qword ptr [RSP],0x0 MOV qword ptr [RSP + 0x8],RAX MOV RDI,R15 MOV RSI,R13 MOV RDX,R12 MOV RCX,R14 MOV R8,RBP XOR R9D,R9D CALL 0x00141afc CMP EDX,0x6 JZ 0x00112d47 MOV qword ptr [RSP + 0x20],R14 XOR R14D,R14D LAB_00112cb5: CMP dword ptr [RSP + 0x1c],0x0 JNZ 0x00112d94 MOV ESI,R14D MOV qword ptr [RSP + 0x38],RAX CVTSI2SD XMM0,RSI TEST R14D,R14D MOVQ RCX,XMM0 CMOVNS RCX,RSI MOV qword ptr [RSP + 0x40],RDX PUSH 0x7 POP R8 MOV EAX,0x0 CMOVNS R8,RAX MOVUPS XMM0,xmmword ptr [RSP + 0x38] MOVUPS xmmword ptr [RSP],XMM0 MOV RDI,R15 MOV RSI,qword ptr [RSP + 0x28] MOV RDX,RBX MOV R9D,0x4007 CALL 0x00126b2d TEST EAX,EAX JS 0x00112d42 INC R14D AND qword ptr [RSP],0x0 LEA RAX,[RSP + 0x1c] MOV qword ptr [RSP + 0x8],RAX MOV RDI,R15 MOV RSI,R13 MOV RDX,R12 MOV RCX,qword ptr [RSP + 0x20] MOV R8,RBP XOR R9D,R9D CALL 0x00141afc CMP EDX,0x6 JNZ 0x00112cb5 LAB_00112d42: MOV R14,qword ptr [RSP + 0x20] LAB_00112d47: MOV RDI,qword ptr [R15 + 0x18] MOV RSI,R14 MOV RDX,RBP CALL 0x0011d8c6 MOV RDI,qword ptr [R15 + 0x18] MOV RSI,R13 MOV RDX,R12 CALL 0x0011d8c6 MOV RDI,qword ptr [R15 + 0x18] MOV RSI,qword ptr [RSP + 0x28] MOV RDX,RBX CALL 0x0011d8c6 PUSH 0x6 POP RBX XOR EAX,EAX XOR ECX,ECX LAB_00112d7d: MOV EAX,EAX OR RAX,RCX MOV RDX,RBX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00112d94: MOV RDI,qword ptr [R15 + 0x18] MOV RSI,RAX CALL 0x0011d8c6 MOV RDI,qword ptr [R15 + 0x18] MOV RSI,qword ptr [RSP + 0x20] MOV RDX,RBP CALL 0x0011d8c6 MOV RDI,qword ptr [R15 + 0x18] MOV RSI,R13 MOV RDX,R12 CALL 0x0011d8c6 MOV RAX,qword ptr [RSP + 0x30] MOV dword ptr [RAX],R14D MOV RDX,-0x100000000 MOV RAX,qword ptr [RSP + 0x28] JMP 0x00112c13
int1 [16] js_array_from_iterator (long param_1,int *param_2,int8 param_3,int8 param_4,int8 param_5, int8 param_6) { int *piVar1; int iVar2; int8 uVar3; ulong uVar4; double dVar5; int8 uVar6; int8 uVar7; int8 uVar8; int8 uVar9; int iVar10; double dVar11; int1 auVar12 [16]; int1 auVar13 [16]; ulong in_stack_ffffffffffffff90; int local_5c; int8 local_58; ulong local_50; int *local_48; int1 local_40 [16]; *param_2 = 0; piVar1 = *(int **)(param_1 + 0x38); *piVar1 = *piVar1 + 1; local_48 = param_2; auVar12 = JS_NewObjectFromShape(param_1,piVar1,2); uVar8 = auVar12._8_8_; local_50 = auVar12._0_8_; if (auVar12._8_4_ == 6) { LAB_00112c13: uVar4 = local_50 & 0xffffffff00000000; } else { auVar12 = JS_GetIterator2(param_1,param_3,param_4,param_5,param_6); uVar6 = auVar12._8_8_; uVar3 = auVar12._0_8_; if (auVar12._8_4_ == 6) { auVar12 = ZEXT816(3) << 0x40; } else { auVar12 = JS_GetPropertyInternal2 (param_1,uVar3,uVar6,0x6b,uVar3,uVar6,0, in_stack_ffffffffffffff90 & 0xffffffff00000000); uVar7 = auVar12._8_8_; if (auVar12._8_4_ != 6) { auVar13 = JS_IteratorNext(param_1,uVar3,uVar6,auVar12._0_8_,uVar7,0,0,&local_5c); if (auVar13._8_4_ != 6) { dVar11 = 0.0; local_58 = auVar12._0_8_; do { iVar10 = SUB84(dVar11,0); if (local_5c != 0) { JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar13._0_8_); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_58,uVar7); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar3,uVar6); *local_48 = iVar10; goto LAB_00112c13; } dVar5 = (double)(long)dVar11; if (-1 < iVar10) { dVar5 = dVar11; } uVar9 = 7; if (-1 < iVar10) { uVar9 = 0; } local_40 = auVar13; iVar2 = JS_DefinePropertyValueValue(param_1,local_50,uVar8,dVar5,uVar9,0x4007,auVar13); auVar12._8_8_ = uVar7; auVar12._0_8_ = local_58; if (iVar2 < 0) break; dVar11 = (double)(ulong)(iVar10 + 1); auVar13 = JS_IteratorNext(param_1,uVar3,uVar6,local_58,uVar7,0,0,&local_5c); auVar12._0_8_ = local_58; } while (auVar13._8_4_ != 6); } } } JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar12._0_8_,auVar12._8_8_); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar3,uVar6); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_50,uVar8); uVar8 = 6; local_50 = 0; uVar4 = 0; } auVar13._0_8_ = local_50 & 0xffffffff | uVar4; auVar13._8_8_ = uVar8; return auVar13; }
25,599
string_split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/common.cpp
std::vector<std::string> string_split(const std::string & str, const std::string & delimiter) { std::vector<std::string> parts; size_t start = 0; size_t end = str.find(delimiter); while (end != std::string::npos) { parts.push_back(str.substr(start, end - start)); start = end + delimiter.length(); end = str.find(delimiter, start); } parts.push_back(str.substr(start)); return parts; }
O3
cpp
string_split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movq $0x0, 0x10(%rdi) movq (%rdx), %rsi movq 0x8(%rdx), %rcx xorl %ebp, %ebp movq %r14, %rdi xorl %edx, %edx callq 0x1bfe0 cmpq $-0x1, %rax je 0x74cc2 movq %rax, %r12 xorl %ebp, %ebp leaq 0x8(%rsp), %r13 movq %r12, %rcx subq %rbp, %rcx movq %r13, %rdi movq %r14, %rsi movq %rbp, %rdx callq 0x1b940 movq %rbx, %rdi movq %r13, %rsi callq 0x5854a movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x74ca1 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8e0 movq (%r15), %rsi movq 0x8(%r15), %rcx movq %r12, %rbp addq %rcx, %rbp movq %r14, %rdi movq %rbp, %rdx callq 0x1bfe0 movq %rax, %r12 cmpq $-0x1, %rax jne 0x74c66 leaq 0x8(%rsp), %rdi movq %r14, %rsi movq %rbp, %rdx movq $-0x1, %rcx callq 0x1b940 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x5854a leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x74d01 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8e0 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi jmp 0x74d35 jmp 0x74d23 movq %rax, %r14 jmp 0x74d47 movq %rax, %r14 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x74d47 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8e0 movq %rbx, %rdi callq 0x23e92 movq %r14, %rdi callq 0x1c030
_Z12string_splitRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r15, rdx mov r14, rsi mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov qword ptr [rdi+10h], 0 mov rsi, [rdx] mov rcx, [rdx+8] xor ebp, ebp mov rdi, r14 xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm; std::string::find(char const*,ulong,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh jz short loc_74CC2 mov r12, rax xor ebp, ebp lea r13, [rsp+58h+var_50] loc_74C66: mov rcx, r12 sub rcx, rbp mov rdi, r13 mov rsi, r14 mov rdx, rbp call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rdi, rbx mov rsi, r13 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) mov rdi, [rsp+58h+var_50]; void * lea rax, [rsp+58h+var_40] cmp rdi, rax jz short loc_74CA1 mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_74CA1: mov rsi, [r15] mov rcx, [r15+8] mov rbp, r12 add rbp, rcx mov rdi, r14 mov rdx, rbp call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm; std::string::find(char const*,ulong,ulong) mov r12, rax cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_74C66 loc_74CC2: lea rdi, [rsp+58h+var_50] mov rsi, r14 mov rdx, rbp mov rcx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) lea rsi, [rsp+58h+var_50] mov rdi, rbx call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) lea rax, [rsp+58h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_74D01 mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_74D01: mov rax, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h] jmp short loc_74D35 jmp short $+2 loc_74D23: mov r14, rax jmp short loc_74D47 mov r14, rax mov rdi, [rsp+arg_0]; void * lea rax, [rsp+arg_10] loc_74D35: cmp rdi, rax jz short loc_74D47 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_74D47: mov rdi, rbx call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, r14 call __Unwind_Resume
long long string_split(long long a1, long long a2, _QWORD *a3) { long long v4; // rbp long long v5; // rax long long v6; // r12 long long v7; // rcx void *v9[2]; // [rsp+8h] [rbp-50h] BYREF _QWORD v10[8]; // [rsp+18h] [rbp-40h] BYREF *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; v4 = 0LL; v5 = std::string::find(a2, *a3, 0LL, a3[1]); if ( v5 != -1 ) { v6 = v5; v4 = 0LL; do { std::string::substr(v9, a2, v4, v6 - v4); std::vector<std::string>::emplace_back<std::string>(a1, (long long)v9); if ( v9[0] != v10 ) operator delete(v9[0], v10[0] + 1LL); v7 = a3[1]; v4 = v7 + v6; v6 = std::string::find(a2, *a3, v7 + v6, v7); } while ( v6 != -1 ); } std::string::substr(v9, a2, v4, -1LL); std::vector<std::string>::emplace_back<std::string>(a1, (long long)v9); if ( v9[0] != v10 ) operator delete(v9[0], v10[0] + 1LL); return a1; }
string_split: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R15,RDX MOV R14,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x10],0x0 MOV RSI,qword ptr [RDX] MOV RCX,qword ptr [RDX + 0x8] XOR EBP,EBP MOV RDI,R14 XOR EDX,EDX CALL 0x0011bfe0 CMP RAX,-0x1 JZ 0x00174cc2 MOV R12,RAX XOR EBP,EBP LEA R13,[RSP + 0x8] LAB_00174c66: MOV RCX,R12 SUB RCX,RBP LAB_00174c6c: MOV RDI,R13 MOV RSI,R14 MOV RDX,RBP CALL 0x0011b940 LAB_00174c7a: MOV RDI,RBX MOV RSI,R13 CALL 0x0015854a MOV RDI,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x00174ca1 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011b8e0 LAB_00174ca1: MOV RSI,qword ptr [R15] MOV RCX,qword ptr [R15 + 0x8] MOV RBP,R12 ADD RBP,RCX MOV RDI,R14 MOV RDX,RBP CALL 0x0011bfe0 MOV R12,RAX CMP RAX,-0x1 JNZ 0x00174c66 LAB_00174cc2: LEA RDI,[RSP + 0x8] MOV RSI,R14 MOV RDX,RBP MOV RCX,-0x1 CALL 0x0011b940 LAB_00174cd9: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x0015854a LAB_00174ce6: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00174d01 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011b8e0 LAB_00174d01: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* string_split(std::__cxx11::string const&, std::__cxx11::string const&) */ string * string_split(string *param_1,string *param_2) { long lVar1; ulong *in_RDX; long *local_50 [2]; long local_40 [2]; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; lVar1 = std::__cxx11::string::find((char *)param_2,*in_RDX,0); if (lVar1 != -1) { do { /* try { // try from 00174c6c to 00174c79 has its CatchHandler @ 00174d23 */ std::__cxx11::string::substr((ulong)local_50,(ulong)param_2); /* try { // try from 00174c7a to 00174c84 has its CatchHandler @ 00174d28 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string> ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1, (string *)local_50); if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } lVar1 = std::__cxx11::string::find((char *)param_2,*in_RDX,lVar1 + in_RDX[1]); } while (lVar1 != -1); } /* try { // try from 00174cc2 to 00174cd8 has its CatchHandler @ 00174d21 */ std::__cxx11::string::substr((ulong)local_50,(ulong)param_2); /* try { // try from 00174cd9 to 00174ce5 has its CatchHandler @ 00174d13 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string> ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1, (string *)local_50); if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } return param_1; }